bhl-forms 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/bhl-forms.es.js +6452 -7469
  2. package/dist/bhl-forms.iife.js +4 -11
  3. package/dist/bhl-forms.modern.es.js +16311 -0
  4. package/dist/bhl-forms.modern.iife.js +14 -0
  5. package/dist/bhl-forms.modern.umd.js +14 -0
  6. package/dist/bhl-forms.umd.js +4 -11
  7. package/dist/forms/accidentsAndInjuries.es.js +1285 -0
  8. package/dist/forms/accidentsAndInjuries.iife.js +1 -0
  9. package/dist/forms/accidentsAndInjuries.json +1 -0
  10. package/dist/forms/appraisals.es.js +346 -0
  11. package/dist/forms/appraisals.iife.js +1 -0
  12. package/dist/forms/appraisals.json +1 -0
  13. package/dist/forms/childAndFamily.es.js +1685 -0
  14. package/dist/forms/childAndFamily.iife.js +1 -0
  15. package/dist/forms/childAndFamily.json +1 -0
  16. package/dist/forms/childAndFamilySingle.es.js +1816 -0
  17. package/dist/forms/childAndFamilySingle.iife.js +1 -0
  18. package/dist/forms/childAndFamilySingle.json +1 -0
  19. package/dist/forms/civilLawsuit.es.js +2156 -0
  20. package/dist/forms/civilLawsuit.iife.js +1 -0
  21. package/dist/forms/civilLawsuit.json +1 -0
  22. package/dist/forms/coins.es.js +346 -0
  23. package/dist/forms/coins.iife.js +1 -0
  24. package/dist/forms/coins.json +1 -0
  25. package/dist/forms/contracts.es.js +1000 -0
  26. package/dist/forms/contracts.iife.js +1 -0
  27. package/dist/forms/contracts.json +1 -0
  28. package/dist/forms/criminal.es.js +3254 -0
  29. package/dist/forms/criminal.iife.js +1 -0
  30. package/dist/forms/criminal.json +1 -0
  31. package/dist/forms/employmentAndWorkplace.es.js +1386 -0
  32. package/dist/forms/employmentAndWorkplace.iife.js +1 -0
  33. package/dist/forms/employmentAndWorkplace.json +1 -0
  34. package/dist/forms/generalLegal.es.js +3393 -0
  35. package/dist/forms/generalLegal.iife.js +1 -0
  36. package/dist/forms/generalLegal.json +1 -0
  37. package/dist/forms/generalLegalPopUnder.es.js +3395 -0
  38. package/dist/forms/generalLegalPopUnder.iife.js +1 -0
  39. package/dist/forms/generalLegalPopUnder.json +1 -0
  40. package/dist/forms/generalLegalPopUnderTF.es.js +3093 -0
  41. package/dist/forms/generalLegalPopUnderTF.iife.js +1 -0
  42. package/dist/forms/generalLegalPopUnderTF.json +1 -0
  43. package/dist/forms/generalLegalSingle.es.js +4315 -0
  44. package/dist/forms/generalLegalSingle.iife.js +1 -0
  45. package/dist/forms/generalLegalSingle.json +1 -0
  46. package/dist/forms/generalLegalThankYou.es.js +3073 -0
  47. package/dist/forms/generalLegalThankYou.iife.js +1 -0
  48. package/dist/forms/generalLegalThankYou.json +1 -0
  49. package/dist/forms/harassmentAndDiscrimination.es.js +1036 -0
  50. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -0
  51. package/dist/forms/harassmentAndDiscrimination.json +1 -0
  52. package/dist/forms/malpractice.es.js +1259 -0
  53. package/dist/forms/malpractice.iife.js +1 -0
  54. package/dist/forms/malpractice.json +1 -0
  55. package/dist/forms/mechanics.es.js +386 -0
  56. package/dist/forms/mechanics.iife.js +1 -0
  57. package/dist/forms/mechanics.json +1 -0
  58. package/dist/forms/realEstate.es.js +2956 -0
  59. package/dist/forms/realEstate.iife.js +1 -0
  60. package/dist/forms/realEstate.json +1 -0
  61. package/dist/forms/repossession.es.js +1267 -0
  62. package/dist/forms/repossession.iife.js +1 -0
  63. package/dist/forms/repossession.json +1 -0
  64. package/dist/forms/ssdi.es.js +1079 -0
  65. package/dist/forms/ssdi.iife.js +1 -0
  66. package/dist/forms/ssdi.json +1 -0
  67. package/dist/forms/testForm.es.js +730 -0
  68. package/dist/forms/testForm.iife.js +1 -0
  69. package/dist/forms/testForm.json +1 -0
  70. package/dist/forms/testRedirects.es.js +542 -0
  71. package/dist/forms/testRedirects.iife.js +1 -0
  72. package/dist/forms/testRedirects.json +1 -0
  73. package/dist/forms/vets.es.js +349 -0
  74. package/dist/forms/vets.iife.js +1 -0
  75. package/dist/forms/vets.json +1 -0
  76. package/dist/forms/willsAndTrusts.es.js +1220 -0
  77. package/dist/forms/willsAndTrusts.iife.js +1 -0
  78. package/dist/forms/willsAndTrusts.json +1 -0
  79. package/package.json +5 -5
@@ -0,0 +1 @@
1
+ [{"$el":"div","children":[{"$el":"div","attrs":{"id":"form-anchor","class":"t-absolute","style":{"top":"-30px","left":0}}}],"attrs":{"class":"t-relative"}},{"$cmp":"FormKit","props":{"type":"form","id":"form","config":{"validationVisibility":"submit"},"onSubmit":"$submit($submitUrl, $prepData, $handleRedirect, \"text/plain; charset=UTF-8\")","plugins":"$plugins","actions":false,"anchorElement":"form-anchor","useLocalStorage":true,"prepop":{"fromURL":true},"errorCodes":{"403":{"message":"An Error Occurred","abort":false},"409":{"abort":false},"429":"An Error Occurred","504":{"message":"An Error Occurred","abort":false}},"formClass":"!t-max-w-[36rem]","formId":"testRedirects","redirectMap":{"*":"https://listings.ziplawyer.com/api/v1/redirect?zone_id=4&vertical=Legal&category=${properties.Type_Of_Legal_Problem}&Degree_Of_Interest=${properties.Degree_Of_Interest}&zip_code=${properties.Zip}&sub_id=${properties.vid}"},"name":"testRedirects"},"children":[{"$el":"h1","attrs":{"class":"t-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3 "},"children":"$urlParam(\"hl\", \"Have Questions for a Lawyer?\")","if":"$activeStep === $firstStep()"},{"$formkit":"hidden","name":"vertical","value":"AutoRepair"},{"$formkit":"hidden","name":"gclid","value":null},{"$formkit":"hidden","name":"campaignid","value":null},{"$formkit":"hidden","name":"s","value":null},{"$el":"div","attrs":{"class":"form-body"},"children":[{"$el":"section","if":"$stepEnabled(\"generalLegalTOLPAndZip\")","attrs":{"hidden":"$activeStep !== \"generalLegalTOLPAndZip\"","key":"generalLegalTOLPAndZip"},"children":[{"$formkit":"group","id":"generalLegalTOLPAndZip","name":"generalLegalTOLPAndZip","children":[{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"Type of Help Needed:","name":"Type_Of_Legal_Problem","id":"Type_Of_Legal_Problem","options":["Adoption","Asbestos and Mesothelioma","Auto and Car Accidents","Bankruptcy","Birth Certificate and Name Change","Business Lawyers","Child Custody","Child Support","Civil Rights and Discrimination","Consumer Lawyers","Copyrights and Trademarks","Criminal and Felony","Debt and Collections","Defend a Lawsuit","Divorce and Separation","DUI and DWI","Elder Law","Employment and Workplace","Expungement","Family Issues","File a Lawsuit","Foreclosure","Guardianship","Harassment and Discrimination","Identity Theft","Immigration and Visas","Insurance","Landlord and Tenant","Lemon Law","Long Term Disability","Medical Malpractice","Non-Workplace Discrimination","Non-Workplace Harassment","Patents and Intellectual Property","Personal Injury","Power of Attorney","Probate and Estates","Product Liability","Property Damage","Real Estate","Sexual Harassment","Social Security Disability and Insurance","Tax and IRS","Traffic and Tickets","Unemployment","Victim of a Crime","Wills and Trusts","Workers Compensation","Workplace Discrimination","Workplace Harassment","Wrongful Death","Wrongful Termination","Not Sure or Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content","helpClass":"t-mt-2.5 md:t-text-right md:t-mt-[-5px]"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center","legendClass":"legend-left t-pb-1 required","name":"Civil_Defense","id":"Civil_Defense","if":"$get(Type_Of_Legal_Problem).value == \"Civil Lawsuit\"","label":"Do You Need Representation to File a Lawsuit or Defend One?","options":{"Yes":"Defend a Lawsuit","No":"File a Lawsuit"},"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center","optionClass":"t-pr-1"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"required","name":"Type_Of_Legal_Problem_Display","if":"$get(Type_Of_Legal_Problem).value == \"Civil Lawsuit\" && $get(Civil_Defense).value == \"No\"","label":"Select The Type of Lawsuit You Would Like to File:","options":["Automobile Accident","Contract Disputes","Defamation and Slander","Dog Bite","Employment and Workplace","Fraud","Medical Malpractice","Personal Injury","Property Damage","Small Claims","Real Estate","Other (describe on next page)"],"fieldsetClass":"$reset","innerClass":"t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3","id":"Type_Of_Legal_Problem_Display"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"required","name":"Type_Of_Legal_Problem_Display","if":"$get(Type_Of_Legal_Problem).value == \"Criminal and Felony\"","label":"Which Type of Criminal Issue?","options":["Criminal Defense","Victim of a Crime","DUI and DWI","Expungement","Harassment","Not Sure or Other"],"fieldsetClass":"$reset","innerClass":"t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3","id":"Type_Of_Legal_Problem_Display"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"required","name":"Type_Of_Legal_Problem_Display","if":"$get(Type_Of_Legal_Problem).value == \"Employment and Workplace\"","label":"Select The Workplace Issue:","options":["Workplace Harassment","Workplace Discrimination","Wrongful Termination","Payment Disputes","Workers Compensation","Personal Injury","Unemployment","Other Workplace Issues"],"fieldsetClass":"$reset","innerClass":"t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3","id":"Type_Of_Legal_Problem_Display"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"required","label":"What is the Landlord / Tenant Issue?","if":"$get(Type_Of_Legal_Problem).value == \"Landlord and Tenant\"","id":"Landlord_Tenant_Issue","name":"Landlord_Tenant_Issue","options":["Eviction","Repairs and Maintenance","Lease and Rental Agreements","Discrimination","Right of Entry and Privacy","Screening and Applications","Environmental Hazards","Other Dispute"],"fieldsetClass":"$reset","innerClass":"t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"required","name":"Type_Of_Legal_Problem_Display","if":"$get(Type_Of_Legal_Problem).value == \"Real Estate\"","label":"Select The Type of Real Estate Issue:","options":["Contracts and Agreements","Deeds, Liens, and Titles","Foreclosure","Insurance","Landlord and Tenant","Loans and Mortgages","Wills, Trusts, and Estates","Property Damage","Other Real Estate Issues"],"fieldsetClass":"$reset","innerClass":"t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3","id":"Type_Of_Legal_Problem_Display"},{"$formkit":"text","validation":"required|matches:/^[0-9]{5}$/","validationMessages":{"required":"Zip Code is required","matches":"Invalid Zip Code"},"labelClass":"required","label":"Zip Code:","placeholder":"#####","name":"Zip","maxlength":5,"inputmode":"numeric","autocomplete":"postal-code","wrapperClass":"side-by-side t-items-center","id":"Zip","onKeypress":"$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))"}]}]},{"$el":"div","attrs":{"class":"step-nav"},"children":[{"$formkit":"button","name":"hidden_button","children":"Hidden","style":{"if":"$activeStep === $firstStep()","then":"visibility: hidden;"}},{"$formkit":"submit","name":"submit_button","label":"Chat Now"}]},{"$el":"pre","if":"$urlParam(\"fdbg\", \"\") == 1","children":[{"$el":"pre","children":"$stringify( $get(form).value )","attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["activeStep: ","$activeStep"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["stepHistory: ","$stepHistory"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["stepQueue: ","$stepQueue"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["steps: ","$stepKeys()"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}}]}]}]}]
@@ -0,0 +1,349 @@
1
+ function merge() {
2
+ return Object.assign({}, ...arguments)
3
+ }
4
+
5
+ function RedirectUrl(domain, vertical, category) {
6
+ return 'https://listings.' + domain + '/api/v1/redirect?zone_id=4&sub_id=${properties.vid}&vertical=' + encodeURIComponent(vertical) + '&category=' + encodeURIComponent(category)
7
+ }
8
+
9
+ function RedirectUrlComments(domain, vertical, category) {
10
+ return RedirectUrl(domain, vertical, category) + '&Comments=${properties.Comments}'
11
+ }
12
+
13
+ const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
14
+ const DEFAULT_COMMENTS_LABEL = 'Please briefly describe your legal issue in a few words:';
15
+
16
+ const formPropDefaults = {
17
+ type: 'form',
18
+ id: 'form',
19
+ config: { validationVisibility: 'submit' },
20
+ onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
21
+ plugins: '$plugins',
22
+ actions: false,
23
+ anchorElement: 'form-anchor',
24
+ useLocalStorage: true,
25
+ prepop: {
26
+ fromURL: true
27
+ },
28
+ errorCodes: {
29
+ 403: { message: "An Error Occurred", abort: false },
30
+ 409: { abort: false },
31
+ 429: "An Error Occurred",
32
+ 504: { message: "An Error Occurred", abort: false },
33
+ },
34
+ formClass: '!t-max-w-[40rem]'
35
+ };
36
+
37
+ function formProps(updates) {
38
+ const props = merge(
39
+ formPropDefaults,
40
+ updates
41
+ );
42
+ if (props.formId && !props.name) {
43
+ props.name = props.formId;
44
+ }
45
+ return props
46
+ }
47
+
48
+ const formAnchorDefaults = {
49
+ $el: 'div',
50
+ children: [
51
+ {
52
+ $el: 'div',
53
+ attrs: {
54
+ id: 'form-anchor',
55
+ class: 't-absolute',
56
+ style: { top: '-30px', left: 0 }
57
+ }
58
+ }
59
+ ],
60
+ attrs: {
61
+ class: 't-relative'
62
+ }
63
+ };
64
+
65
+ function formAnchor(updates) {
66
+ return merge(
67
+ formAnchorDefaults,
68
+ updates
69
+ )
70
+ }
71
+
72
+ function headlineDefaults(updates = {}) {
73
+ return {
74
+ $el: 'h1',
75
+ attrs: {
76
+ class: 't-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3' + ' ' + (updates.headlineClass || '')
77
+ }
78
+ }
79
+ }
80
+
81
+ function headline(updates = {}) {
82
+ return merge(
83
+ headlineDefaults(updates),
84
+ updates
85
+ )
86
+ }
87
+
88
+ function subHeadlineDefaults(updates = {}) {
89
+ return {
90
+ $el: 'h3',
91
+ attrs: {
92
+ class: 't-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10' + ' ' + (updates.subheadlineClass || '')
93
+ }
94
+ }
95
+ }
96
+
97
+ function subHeadline(updates = {}) {
98
+ return merge(
99
+ subHeadlineDefaults(updates),
100
+ updates
101
+ )
102
+ }
103
+
104
+ const hiddenInputsBase = [
105
+ {
106
+ $formkit: 'hidden',
107
+ name: "gclid",
108
+ value: null
109
+ },
110
+ {
111
+ $formkit: 'hidden',
112
+ name: "campaignid",
113
+ value: null
114
+ },
115
+ {
116
+ $formkit: 'hidden',
117
+ name: "s",
118
+ value: null
119
+ }
120
+ ];
121
+
122
+ const hiddenInputsVets = [
123
+ {
124
+ $formkit: 'hidden',
125
+ name: "vertical",
126
+ value: "Pets"
127
+ },
128
+ ...hiddenInputsBase
129
+ ];
130
+
131
+ const textArea = (updates) => {
132
+ if (updates.name && !updates.id) {
133
+ updates.id = updates.name;
134
+ }
135
+ return merge({
136
+ $formkit: 'textarea',
137
+ rows: 5,
138
+ maxlength: 500,
139
+ validation: 'required',
140
+ validationMessages: {
141
+ required: 'Field is required'
142
+ },
143
+ innerClass: 't-max-w-xl',
144
+ labelClass: 'required'
145
+ }, updates)
146
+ };
147
+
148
+ const comments$1 = (updates, scope) => textArea(
149
+ merge({
150
+ name: scope ? scope + ':' + 'Comments' : 'Comments',
151
+ label: 'Please briefly describe your situation in a few words:',
152
+ placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
153
+ }, updates)
154
+ );
155
+
156
+ const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
157
+ const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
158
+
159
+ const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
160
+
161
+ const findLastInput = (n) => {
162
+ if (isInput(n)) {
163
+ return n
164
+ }
165
+ for (var i = n.children.length - 1; i >= 0; i--) {
166
+ if (typeof n.children === 'string') {
167
+ continue
168
+ }
169
+ const child = n.children[i];
170
+ if (isInput(child)) {
171
+ return child
172
+ }
173
+ const res = findLastInput(child);
174
+ if (res) {
175
+ return res
176
+ }
177
+ }
178
+ return null
179
+ };
180
+
181
+ const stepDefaults = (step, stepKey) => ({
182
+ $el: 'section',
183
+ if: '$stepEnabled("' + step + '")',
184
+ attrs: {
185
+ hidden: '$activeStep !== "' + step + '"',
186
+ key: stepKey ? stepKey : step
187
+ }
188
+ });
189
+
190
+ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
191
+ if (typeof nextOnEnter === 'undefined') {
192
+ nextOnEnter = true;
193
+ }
194
+ if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
195
+ const lastInput = findLastInput(inputs[inputs.length - 1]);
196
+ if (lastInput && nextOnEnter === true) {
197
+ lastInput.onKeypress = NEXT_ON_ENTER;
198
+ }
199
+ if (lastInput && nextOnInput === true) {
200
+ lastInput.onInput = NEXT_ON_INPUT;
201
+ }
202
+ }
203
+
204
+ return merge(
205
+ stepDefaults(name, stepKey),
206
+ {
207
+ children: [
208
+ {
209
+ $formkit: 'group',
210
+ id: name,
211
+ name: name,
212
+ nextStepMap: nextStepMap,
213
+ autoFocus: autoFocus,
214
+ children: inputs
215
+ }
216
+ ]
217
+ }
218
+ )
219
+ }
220
+
221
+ function comments(updates = {}) {
222
+ return step(
223
+ 'comments',
224
+ [
225
+ comments$1({
226
+ label: updates.label || DEFAULT_COMMENTS_LABEL,
227
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC
228
+ })
229
+ ],
230
+ updates.nextOnEnter
231
+ )
232
+ }
233
+
234
+ function formNavigationOnlySubmit(updates = {}) {
235
+ return {
236
+ $el: 'div',
237
+ attrs: {
238
+ class: 'step-nav'
239
+ },
240
+ children: [
241
+ {
242
+ $formkit: 'button',
243
+ name: 'hidden_button',
244
+ children: 'Hidden',
245
+ style: {
246
+ if: '$activeStep === $firstStep()',
247
+ then: 'visibility: hidden;'
248
+ }
249
+ },
250
+ {
251
+ $formkit: 'submit',
252
+ name: 'submit_button',
253
+ label: updates.submitLabel || 'Chat Now'
254
+ }
255
+ ]
256
+ }
257
+ }
258
+
259
+ const formDetails = () => ({
260
+ $el: 'pre',
261
+ if: '$urlParam("fdbg", "") == 1',
262
+ children: [
263
+ {
264
+ $el: 'pre',
265
+ children: '$stringify( $get(form).value )',
266
+ attrs: {
267
+ class: 't-text-xs',
268
+ style: 'overflow: scroll'
269
+ }
270
+ },
271
+ {
272
+ $el: 'pre',
273
+ children: ['activeStep: ', '$activeStep'],
274
+ attrs: {
275
+ class: 't-text-xs',
276
+ style: 'overflow: scroll'
277
+ }
278
+ },
279
+ {
280
+ $el: 'pre',
281
+ children: ['stepHistory: ', '$stepHistory'],
282
+ attrs: {
283
+ class: 't-text-xs',
284
+ style: 'overflow: scroll'
285
+ }
286
+ },
287
+ {
288
+ $el: 'pre',
289
+ children: ['stepQueue: ', '$stepQueue'],
290
+ attrs: {
291
+ class: 't-text-xs',
292
+ style: 'overflow: scroll'
293
+ }
294
+ },
295
+ {
296
+ $el: 'pre',
297
+ children: ['steps: ', '$stepKeys()'],
298
+ attrs: {
299
+ class: 't-text-xs',
300
+ style: 'overflow: scroll'
301
+ }
302
+ }
303
+ ]
304
+ });
305
+
306
+ const schema = [
307
+ formAnchor(),
308
+ {
309
+ $cmp: 'FormKit',
310
+ props: formProps({
311
+ formId: 'vets',
312
+ redirectMap: {
313
+ '*': RedirectUrlComments('zipanswers.com', 'Pets', 'Veterinarians')
314
+ },
315
+ popUnderMap: {
316
+ '*': RedirectUrl('zipanswers.com', 'Pets', 'Pet Care')
317
+ },
318
+ formClass: '!t-max-w-[36rem]'
319
+ }),
320
+ children: [
321
+ headline({
322
+ children: '$urlParam("hl", "Have Questions About Your Pet?")',
323
+ if: '$activeStep === $firstStep()'
324
+ }),
325
+ subHeadline({
326
+ children: '$urlParam("shl", "Get Answers Within Minutes!")',
327
+ if: '$activeStep === $firstStep()'
328
+ }),
329
+ ...hiddenInputsVets,
330
+ {
331
+ $el: 'div',
332
+ attrs: {
333
+ class: 'form-body'
334
+ },
335
+ children: [
336
+ comments({
337
+ label: 'Please describe your issue in a few words:',
338
+ placeholder: 'Example: "My dog is limping and I need to know if I should take him to the vet"',
339
+ nextOnEnter: false
340
+ }),
341
+ formNavigationOnlySubmit(),
342
+ formDetails()
343
+ ]
344
+ }
345
+ ]
346
+ }
347
+ ];
348
+
349
+ export { schema as default };
@@ -0,0 +1 @@
1
+ var vets=function(){"use strict";function e(){return Object.assign({},...arguments)}function t(e,t,r){return"https://listings."+e+"/api/v1/redirect?zone_id=4&sub_id=${properties.vid}&vertical="+encodeURIComponent(t)+"&category="+encodeURIComponent(r)}const r={type:"form",id:"form",config:{validationVisibility:"submit"},onSubmit:'$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',plugins:"$plugins",actions:!1,anchorElement:"form-anchor",useLocalStorage:!0,prepop:{fromURL:!0},errorCodes:{403:{message:"An Error Occurred",abort:!1},409:{abort:!1},429:"An Error Occurred",504:{message:"An Error Occurred",abort:!1}},formClass:"!t-max-w-[40rem]"};const n=[{$formkit:"hidden",name:"vertical",value:"Pets"},{$formkit:"hidden",name:"gclid",value:null},{$formkit:"hidden",name:"campaignid",value:null},{$formkit:"hidden",name:"s",value:null}],i=(t,r)=>(t=>(t.name&&!t.id&&(t.id=t.name),e({$formkit:"textarea",rows:5,maxlength:500,validation:"required",validationMessages:{required:"Field is required"},innerClass:"t-max-w-xl",labelClass:"required"},t)))(e({name:r?r+":Comments":"Comments",label:"Please briefly describe your situation in a few words:",placeholder:'For Example: "I would like help with child support payments" or "I need help with visitation rights"'},t)),s="$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))",l="$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))",o=e=>"group"!==e.type&&"section"!==e.type&&"form"!==e.type&&"hidden"!==e.$formkit&&!e.children,a=e=>{if(o(e))return e;for(var t=e.children.length-1;t>=0;t--){if("string"==typeof e.children)continue;const r=e.children[t];if(o(r))return r;const n=a(r);if(n)return n}return null},c=(e,t)=>({$el:"section",if:'$stepEnabled("'+e+'")',attrs:{hidden:'$activeStep !== "'+e+'"',key:t||e}});const d=[e({$el:"div",children:[{$el:"div",attrs:{id:"form-anchor",class:"t-absolute",style:{top:"-30px",left:0}}}],attrs:{class:"t-relative"}},f),{$cmp:"FormKit",props:function(t){const n=e(r,t);return n.formId&&!n.name&&(n.name=n.formId),n}({formId:"vets",redirectMap:{"*":(u="zipanswers.com",m="Pets",p="Veterinarians",t(u,m,p)+"&Comments=${properties.Comments}")},popUnderMap:{"*":t("zipanswers.com","Pets","Pet Care")},formClass:"!t-max-w-[36rem]"}),children:[function(t={}){return e(function(e={}){return{$el:"h1",attrs:{class:"t-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3 "+(e.headlineClass||"")}}}(t),t)}({children:'$urlParam("hl", "Have Questions About Your Pet?")',if:"$activeStep === $firstStep()"}),function(t={}){return e(function(e={}){return{$el:"h3",attrs:{class:"t-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10 "+(e.subheadlineClass||"")}}}(t),t)}({children:'$urlParam("shl", "Get Answers Within Minutes!")',if:"$activeStep === $firstStep()"}),...n,{$el:"div",attrs:{class:"form-body"},children:[function(t={}){return function(t,r,n=!0,i=!1,o,d,u){if(void 0===n&&(n=!0),r&&r.length&&(n||i)){const e=a(r[r.length-1]);e&&!0===n&&(e.onKeypress=s),e&&!0===i&&(e.onInput=l)}return e(c(t,o),{children:[{$formkit:"group",id:t,name:t,nextStepMap:d,autoFocus:u,children:r}]})}("comments",[i({label:t.label||"Please briefly describe your legal issue in a few words:",placeholder:t.placeholder||'$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)'})],t.nextOnEnter)}({label:"Please describe your issue in a few words:",placeholder:'Example: "My dog is limping and I need to know if I should take him to the vet"',nextOnEnter:!1}),function(e={}){return{$el:"div",attrs:{class:"step-nav"},children:[{$formkit:"button",name:"hidden_button",children:"Hidden",style:{if:"$activeStep === $firstStep()",then:"visibility: hidden;"}},{$formkit:"submit",name:"submit_button",label:e.submitLabel||"Chat Now"}]}}(),{$el:"pre",if:'$urlParam("fdbg", "") == 1',children:[{$el:"pre",children:"$stringify( $get(form).value )",attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["activeStep: ","$activeStep"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["stepHistory: ","$stepHistory"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["stepQueue: ","$stepQueue"],attrs:{class:"t-text-xs",style:"overflow: scroll"}},{$el:"pre",children:["steps: ","$stepKeys()"],attrs:{class:"t-text-xs",style:"overflow: scroll"}}]}]}]}];var u,m,p,f;return d}();
@@ -0,0 +1 @@
1
+ [{"$el":"div","children":[{"$el":"div","attrs":{"id":"form-anchor","class":"t-absolute","style":{"top":"-30px","left":0}}}],"attrs":{"class":"t-relative"}},{"$cmp":"FormKit","props":{"type":"form","id":"form","config":{"validationVisibility":"submit"},"onSubmit":"$submit($submitUrl, $prepData, $handleRedirect, \"text/plain; charset=UTF-8\")","plugins":"$plugins","actions":false,"anchorElement":"form-anchor","useLocalStorage":true,"prepop":{"fromURL":true},"errorCodes":{"403":{"message":"An Error Occurred","abort":false},"409":{"abort":false},"429":"An Error Occurred","504":{"message":"An Error Occurred","abort":false}},"formClass":"!t-max-w-[36rem]","formId":"vets","redirectMap":{"*":"https://listings.zipanswers.com/api/v1/redirect?zone_id=4&sub_id=${properties.vid}&vertical=Pets&category=Veterinarians&Comments=${properties.Comments}"},"popUnderMap":{"*":"https://listings.zipanswers.com/api/v1/redirect?zone_id=4&sub_id=${properties.vid}&vertical=Pets&category=Pet%20Care"},"name":"vets"},"children":[{"$el":"h1","attrs":{"class":"t-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3 "},"children":"$urlParam(\"hl\", \"Have Questions About Your Pet?\")","if":"$activeStep === $firstStep()"},{"$el":"h3","attrs":{"class":"t-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10 "},"children":"$urlParam(\"shl\", \"Get Answers Within Minutes!\")","if":"$activeStep === $firstStep()"},{"$formkit":"hidden","name":"vertical","value":"Pets"},{"$formkit":"hidden","name":"gclid","value":null},{"$formkit":"hidden","name":"campaignid","value":null},{"$formkit":"hidden","name":"s","value":null},{"$el":"div","attrs":{"class":"form-body"},"children":[{"$el":"section","if":"$stepEnabled(\"comments\")","attrs":{"hidden":"$activeStep !== \"comments\"","key":"comments"},"children":[{"$formkit":"group","id":"comments","name":"comments","children":[{"$formkit":"textarea","rows":5,"maxlength":500,"validation":"required","validationMessages":{"required":"Field is required"},"innerClass":"t-max-w-xl","labelClass":"required","name":"Comments","label":"Please describe your issue in a few words:","placeholder":"Example: \"My dog is limping and I need to know if I should take him to the vet\"","id":"Comments"}]}]},{"$el":"div","attrs":{"class":"step-nav"},"children":[{"$formkit":"button","name":"hidden_button","children":"Hidden","style":{"if":"$activeStep === $firstStep()","then":"visibility: hidden;"}},{"$formkit":"submit","name":"submit_button","label":"Chat Now"}]},{"$el":"pre","if":"$urlParam(\"fdbg\", \"\") == 1","children":[{"$el":"pre","children":"$stringify( $get(form).value )","attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["activeStep: ","$activeStep"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["stepHistory: ","$stepHistory"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["stepQueue: ","$stepQueue"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["steps: ","$stepKeys()"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}}]}]}]}]