bhl-forms 0.6.5 → 0.6.6

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 (74) hide show
  1. package/dist/bhl-forms.iife.js +1 -1
  2. package/dist/bhl-forms.modern.iife.js +1 -1
  3. package/dist/bhl-forms.modern.umd.js +1 -1
  4. package/dist/bhl-forms.umd.js +1 -1
  5. package/dist/forms/accidentsAndInjuries.es.js +1441 -861
  6. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  7. package/dist/forms/accidentsAndInjuries.json +1 -1
  8. package/dist/forms/appraisals.es.js +115 -115
  9. package/dist/forms/appraisals.iife.js +1 -1
  10. package/dist/forms/childAndFamily.es.js +789 -763
  11. package/dist/forms/childAndFamily.iife.js +1 -1
  12. package/dist/forms/childAndFamily.json +1 -1
  13. package/dist/forms/childAndFamilySingle.es.js +755 -745
  14. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  15. package/dist/forms/childAndFamilySingle.json +1 -1
  16. package/dist/forms/civilLawsuit.es.js +835 -804
  17. package/dist/forms/civilLawsuit.iife.js +1 -1
  18. package/dist/forms/civilLawsuit.json +1 -1
  19. package/dist/forms/coins.es.js +115 -115
  20. package/dist/forms/coins.iife.js +1 -1
  21. package/dist/forms/contracts.es.js +1454 -715
  22. package/dist/forms/contracts.iife.js +1 -1
  23. package/dist/forms/contracts.json +1 -1
  24. package/dist/forms/criminal.es.js +870 -823
  25. package/dist/forms/criminal.iife.js +1 -1
  26. package/dist/forms/criminal.json +1 -1
  27. package/dist/forms/employmentAndWorkplace.es.js +1827 -1188
  28. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  29. package/dist/forms/employmentAndWorkplace.json +1 -1
  30. package/dist/forms/generalLegal.es.js +852 -806
  31. package/dist/forms/generalLegal.iife.js +1 -1
  32. package/dist/forms/generalLegal.json +1 -1
  33. package/dist/forms/generalLegalPopUnder.es.js +852 -805
  34. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  35. package/dist/forms/generalLegalPopUnder.json +1 -1
  36. package/dist/forms/generalLegalSingle.es.js +1525 -1501
  37. package/dist/forms/generalLegalSingle.iife.js +1 -1
  38. package/dist/forms/generalLegalSingle.json +1 -1
  39. package/dist/forms/generalLegalThankYou.es.js +708 -693
  40. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  41. package/dist/forms/generalLegalThankYou.json +1 -1
  42. package/dist/forms/harassmentAndDiscrimination.es.js +1465 -681
  43. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  44. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  45. package/dist/forms/malpractice.es.js +1764 -1066
  46. package/dist/forms/malpractice.iife.js +1 -1
  47. package/dist/forms/malpractice.json +1 -1
  48. package/dist/forms/mechanics.es.js +115 -115
  49. package/dist/forms/mechanics.iife.js +1 -1
  50. package/dist/forms/realEstate.es.js +1556 -1208
  51. package/dist/forms/realEstate.iife.js +1 -1
  52. package/dist/forms/realEstate.json +1 -1
  53. package/dist/forms/repossession.es.js +1811 -1085
  54. package/dist/forms/repossession.iife.js +1 -1
  55. package/dist/forms/repossession.json +1 -1
  56. package/dist/forms/ssdi.es.js +672 -672
  57. package/dist/forms/ssdi.iife.js +1 -1
  58. package/dist/forms/ssdi.json +1 -1
  59. package/dist/forms/testForm.es.js +473 -468
  60. package/dist/forms/testForm.iife.js +1 -1
  61. package/dist/forms/testForm.json +1 -1
  62. package/dist/forms/testRedirects.es.js +104 -101
  63. package/dist/forms/testRedirects.iife.js +1 -1
  64. package/dist/forms/testRedirects.json +1 -1
  65. package/dist/forms/vets.es.js +115 -115
  66. package/dist/forms/vets.iife.js +1 -1
  67. package/dist/forms/willsAndTrusts.es.js +1298 -705
  68. package/dist/forms/willsAndTrusts.iife.js +1 -1
  69. package/dist/forms/willsAndTrusts.json +1 -1
  70. package/dist/main.css +1 -1
  71. package/package.json +1 -1
  72. package/dist/forms/generalLegalPopUnderTF.es.js +0 -3087
  73. package/dist/forms/generalLegalPopUnderTF.iife.js +0 -1
  74. package/dist/forms/generalLegalPopUnderTF.json +0 -1
@@ -15,376 +15,6 @@ const DEFAULT_FINAL_HEADLINE_DYNAMIC = '$getKey($meta, "finalHeadlines." + $get(
15
15
  const DEFAULT_FINAL_SUBHEADLINE = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
16
16
  const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
17
17
 
18
- const formPropDefaults = {
19
- type: 'form',
20
- id: 'form',
21
- config: { validationVisibility: 'submit' },
22
- onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
23
- plugins: '$plugins',
24
- actions: false,
25
- anchorElement: 'form-anchor',
26
- useLocalStorage: true,
27
- prepop: {
28
- fromURL: true
29
- },
30
- errorCodes: {
31
- 403: { message: "An Error Occurred", abort: false },
32
- 409: { abort: false },
33
- 429: "An Error Occurred",
34
- 504: { message: "An Error Occurred", abort: false },
35
- },
36
- formClass: '!t-max-w-[40rem]'
37
- };
38
-
39
- function formProps(updates) {
40
- const props = merge(
41
- formPropDefaults,
42
- updates
43
- );
44
- if (props.formId && !props.name) {
45
- props.name = props.formId;
46
- }
47
- return props
48
- }
49
-
50
- const metaDefaults = {
51
- tcpaLanguage: TCPA_LANGUAGE
52
- };
53
-
54
- function metaProps(updates) {
55
- const data = merge(
56
- metaDefaults,
57
- updates
58
- );
59
- return {
60
- type: 'meta',
61
- data
62
- }
63
- }
64
-
65
- function defaultMetaProps() {
66
- return metaProps({
67
- defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
68
- commentsPlaceholders: TOLPCommentsPlaceholders,
69
- defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
70
- finalHeadlines: TOLPFinalHeadlines,
71
- defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
72
- finalSubHeadlines: TOLPFinalSubHeadlines,
73
- // Added everywhere for now
74
- // trustedFormTOLPs: trustedFormTOLPs
75
- })
76
- }
77
-
78
- const formAnchorDefaults = {
79
- $el: 'div',
80
- children: [
81
- {
82
- $el: 'div',
83
- attrs: {
84
- id: 'form-anchor',
85
- class: 't-absolute',
86
- style: { top: '-30px', left: 0 }
87
- }
88
- }
89
- ],
90
- attrs: {
91
- class: 't-relative'
92
- }
93
- };
94
-
95
- function formAnchor(updates) {
96
- return merge(
97
- formAnchorDefaults,
98
- updates
99
- )
100
- }
101
-
102
- const progressBarDefaults = {
103
- $el: 'div',
104
- attrs: {
105
- class: 't-mt-7 t-mb-5 t-w-full t-flex t-flex-col t-justify-center t-items-center',
106
- style: {
107
- if: '$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())',
108
- then: 'display: none'
109
- },
110
- },
111
- children: [
112
- {
113
- $el: 'div',
114
- attrs: {
115
- class: 't-flex t-justify-center'
116
- },
117
- children: [
118
- {
119
- $el: 'span',
120
- attrs: {
121
- id: 'progress-bar-text',
122
- class: 't-text-sm t-mb-1'
123
- },
124
- children: [
125
- "0% Complete"
126
- ]
127
- },
128
- ]
129
- },
130
- {
131
- $el: 'div',
132
- attrs: {
133
- class: 't-bg-gray-100 t-w-9/12 t-rounded'
134
- },
135
- children: [
136
- {
137
- $el: 'div',
138
- attrs: {
139
- id: 'progress-bar',
140
- class: 't-flex t-flex-col t-justify-center t-text-center t-whitespace-nowrap t-w-[10%] t-h-1.5 t-rounded t-text-white t-bg-[#007bff]',
141
- style: {
142
- transition: 'width 0.5s ease'
143
- },
144
- },
145
- }
146
- ]
147
- }
148
- ]
149
- };
150
-
151
- function progressBar(updates) {
152
- return merge(
153
- progressBarDefaults,
154
- updates
155
- )
156
- }
157
-
158
- function headlineDefaults(updates = {}) {
159
- return {
160
- $el: 'h1',
161
- attrs: {
162
- 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 || '')
163
- }
164
- }
165
- }
166
-
167
- function headline(updates = {}) {
168
- return merge(
169
- headlineDefaults(updates),
170
- updates
171
- )
172
- }
173
-
174
- function subHeadlineDefaults(updates = {}) {
175
- return {
176
- $el: 'h3',
177
- attrs: {
178
- 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 || '')
179
- }
180
- }
181
- }
182
-
183
- function subHeadline(updates = {}) {
184
- return merge(
185
- subHeadlineDefaults(updates),
186
- updates
187
- )
188
- }
189
-
190
- const secureIconDefault = {
191
- $el: 'div',
192
- if: '$activeStep === $lastStep()',
193
- attrs: {
194
- class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
195
- },
196
- children: [
197
- {
198
- $el: 'img',
199
- attrs: {
200
- loading: 'lazy',
201
- alt: '',
202
- style: {
203
- border: 0
204
- },
205
- width: '25',
206
- height: '25',
207
- src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
208
- }
209
- },
210
- {
211
- $el: 'span',
212
- children: 'Secure & Encrypted',
213
- attrs: {
214
- class: 't-pl-2 t-pt-1 t-font-medium'
215
- }
216
- }
217
- ]
218
- };
219
-
220
-
221
- function secureIcon(updates) {
222
- return merge(
223
- secureIconDefault,
224
- updates
225
- )
226
- }
227
-
228
- const hiddenInputsBase = [
229
- {
230
- $formkit: 'hidden',
231
- name: "gclid",
232
- value: null
233
- },
234
- {
235
- $formkit: 'hidden',
236
- name: "campaignid",
237
- value: null
238
- },
239
- {
240
- $formkit: 'hidden',
241
- name: "s",
242
- value: null
243
- }
244
- ];
245
-
246
- const hiddenInputsLegal = [
247
- {
248
- $formkit: 'hidden',
249
- name: "vertical",
250
- value: "Legal"
251
- },
252
- {
253
- $formkit: 'hidden',
254
- name: "TCPA_Language",
255
- value: "$meta.tcpaLanguage"
256
- },
257
- ...hiddenInputsBase
258
- ];
259
-
260
- const legalRedirectMapDefaults = {
261
- '*': LegalRedirectUrl()
262
- };
263
-
264
-
265
- function legalRedirectMap(updates) {
266
- return merge(
267
- legalRedirectMapDefaults,
268
- updates
269
- )
270
- }
271
-
272
- const TOLPCommentsPlaceholders = {
273
- 'Adoption': 'Example: "I need help with adoption forms"',
274
- 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
275
- 'Auto and Car Accidents': 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
276
- 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
277
- 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
278
- 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
279
- 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
280
- 'Child Custody': 'Example: "Need help getting custody"',
281
- 'Child Support': 'Example: "Issues with child support payments"',
282
- 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
283
- 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
284
- 'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
285
- 'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
286
- 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
287
- 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
288
- 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
289
- 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
290
- 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
291
- 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
292
- 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
293
- 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
294
- 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
295
- 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
296
- 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
297
- 'Guardianship': 'Example: "I need help with guardianship documents"',
298
- 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
299
- 'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
300
- 'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
301
- 'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
302
- 'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
303
- 'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
304
- 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
305
- 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
306
- 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
307
- 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
308
- 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
309
- 'Long Term Disability': 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
310
- 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
311
- 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
312
- 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
313
- 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
314
- 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
315
- 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
316
- 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
317
- 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
318
- 'Social Security Disability and Insurance': 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
319
- 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
320
- 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
321
- 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
322
- 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
323
- 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
324
- 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
325
- 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
326
- 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
327
- 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
328
- };
329
-
330
- const TOLPFinalHeadlines = {
331
- // 'Adoption': '',
332
- };
333
-
334
- const TOLPFinalSubHeadlines = {
335
- 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
336
- // 'Asbestos and Mesothelioma': '',
337
- 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
338
- 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
339
- // 'Birth Certificate and Name Change': '',
340
- // 'Business Lawyers': '',
341
- // 'Child Custody and Support': '',
342
- // 'Civil Rights and Discrimination': '',
343
- // 'Civil Lawsuit': '',
344
- // 'Consumer Lawyers': '',
345
- 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
346
- // 'Criminal and Felony': '',
347
- // 'Debt and Collections': '',
348
- 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
349
- 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
350
- 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
351
- // 'Employment and Workplace': '',
352
- // 'Expungement': '',
353
- // 'Family Issues': '',
354
- 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
355
- 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
356
- // 'Harassment and Discrimination': '',
357
- // 'Identity Theft': '',
358
- 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
359
- // 'Insurance': '',
360
- 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
361
- // 'Lemon Law': '',
362
- 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
363
- 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
364
- 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
365
- 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
366
- // 'Power of Attorney': '',
367
- 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
368
- // 'Product Liability': '',
369
- // 'Property Damage': '',
370
- 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
371
- 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
372
- 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
373
- // 'Traffic and Tickets': '',
374
- 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
375
- // 'Victim of a Crime': '',
376
- // 'Wills and Trusts': '',
377
- 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
378
- // 'Wrongful Death': '',
379
- // 'Wrongful Termination': '',
380
- // 'Not Sure or Other': ''
381
- // 'Sexual Harassment': '',
382
- // 'Workplace Harassment': '',
383
- // 'Non-Workplace Harassment': '',
384
- // 'Workplace Discrimination': '',
385
- // 'Non-Workplace Discrimination': '',
386
- };
387
-
388
18
  // ------ Common Base Settings
389
19
 
390
20
  const checkbox = (updates) => {
@@ -1144,10 +774,47 @@ const findLastInput = (n) => {
1144
774
  if (res) {
1145
775
  return res
1146
776
  }
1147
- }
1148
- return null
777
+ }
778
+ return null
779
+ };
780
+
781
+ const secureIconDefault = {
782
+ $el: 'div',
783
+ if: '$activeStep === $lastStep()',
784
+ attrs: {
785
+ class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
786
+ },
787
+ children: [
788
+ {
789
+ $el: 'img',
790
+ attrs: {
791
+ loading: 'lazy',
792
+ alt: '',
793
+ style: {
794
+ border: 0
795
+ },
796
+ width: '25',
797
+ height: '25',
798
+ src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
799
+ }
800
+ },
801
+ {
802
+ $el: 'span',
803
+ children: 'Secure & Encrypted',
804
+ attrs: {
805
+ class: 't-pl-2 t-pt-1 t-font-medium'
806
+ }
807
+ }
808
+ ]
1149
809
  };
1150
810
 
811
+ function secureIcon(updates) {
812
+ return merge(
813
+ secureIconDefault,
814
+ updates
815
+ )
816
+ }
817
+
1151
818
  function crossSellQuestionsStepHeadline(updates) {
1152
819
  return {
1153
820
  $el: 'h3',
@@ -1292,399 +959,774 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
1292
959
  )
1293
960
  }
1294
961
 
1295
- // Single question step
1296
- function sqstep(name, input, defaultHeadline, updates = {}) {
1297
- return step(
1298
- name,
1299
- [
1300
- verticalStepHeadline({ headline: updates.headline ?? defaultHeadline, headlineClass: updates.headlineClass }),
1301
- ...Array.isArray(input) ? input : [input],
1302
- ],
1303
- updates.nextOnEnter,
1304
- typeof updates.nextOnInput === 'undefined' ? true : updates.nextOnInput,
1305
- updates.stepKey,
1306
- updates.nextStepMap
962
+ // Single question step
963
+ function sqstep(name, input, defaultHeadline, updates = {}) {
964
+ return step(
965
+ name,
966
+ [
967
+ verticalStepHeadline({ headline: updates.headline ?? defaultHeadline, headlineClass: updates.headlineClass }),
968
+ ...Array.isArray(input) ? input : [input],
969
+ ],
970
+ updates.nextOnEnter,
971
+ typeof updates.nextOnInput === 'undefined' ? true : updates.nextOnInput,
972
+ updates.stepKey,
973
+ updates.nextStepMap
974
+ )
975
+ }
976
+
977
+ function commentsWithBankruptcy(updates = {}) {
978
+ return step(
979
+ 'commentsWithBankruptcy',
980
+ [
981
+ commentsStepHeadline(updates),
982
+ comments({
983
+ label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
984
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
985
+ inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
986
+ }),
987
+ bankruptcyCrossSell(),
988
+ {
989
+ $el: 'div',
990
+ if: '$get(CrossSell_Bankruptcy).value == true',
991
+ children: [
992
+ comments({
993
+ label: 'Bankruptcy or debt details:',
994
+ placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
995
+ inputClass: '!t-h-16'
996
+ }, 'CrossSell:Bankruptcy')
997
+ ],
998
+ }
999
+ ],
1000
+ false // nextOnEnter
1001
+ )
1002
+ }
1003
+
1004
+ function contactInfo(updates = {}) {
1005
+ return step(
1006
+ 'contactInfo',
1007
+ [
1008
+ contactStepHeadline(updates),
1009
+ contactStepSubHeadline(updates),
1010
+ trustedFormScript(),
1011
+ email(),
1012
+ phone(),
1013
+ TCPAConsent(),
1014
+ secureIcon()
1015
+ ],
1016
+ false, // nextOnEnter
1017
+ )
1018
+ }
1019
+
1020
+ function firstAndLastV2(updates = {}) {
1021
+ return step(
1022
+ 'firstAndLast',
1023
+ [
1024
+ firstAndLastStepHeadline(updates),
1025
+ firstName(),
1026
+ lastName()
1027
+ ],
1028
+ updates.nextOnEnter
1029
+ )
1030
+ }
1031
+
1032
+
1033
+ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1034
+ return step(
1035
+ 'autoAndCarAccidentCrossSellQuestions',
1036
+ [
1037
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1038
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your accident:' }),
1039
+ AutoAndCarAccidentsQuestions("true", 'CrossSell:Auto_and_Car_Accidents'),
1040
+ comments(
1041
+ {
1042
+ label: 'Accident Description:',
1043
+ placeholder: 'Please describe your accident in a few words...',
1044
+ inputClass: '!t-h-16'
1045
+ },
1046
+ 'CrossSell:Auto_and_Car_Accidents'
1047
+ )
1048
+ ],
1049
+ updates.nextOnEnter
1050
+ )
1051
+ }
1052
+
1053
+ function duiAndDWICrossSellQuestions(updates = {}) {
1054
+ return step(
1055
+ 'duiAndDWICrossSellQuestions',
1056
+ [
1057
+ crossSellQuestionsStepHeadline({ headline: 'About Your DUI/DWI' }),
1058
+ DUIAndDWIQuestions("true", 'CrossSell:DUI_and_DWI'),
1059
+ comments(
1060
+ {
1061
+ label: 'Incident Description:',
1062
+ placeholder: 'Please describe your incident in a few words...',
1063
+ inputClass: '!t-h-16'
1064
+ },
1065
+ 'CrossSell:DUI_and_DWI'
1066
+ )
1067
+ ],
1068
+ updates.nextOnEnter
1069
+ )
1070
+ }
1071
+
1072
+ function ssdiCrossSellQuestions(updates = {}) {
1073
+ return step(
1074
+ 'ssdiCrossSellQuestions',
1075
+ [
1076
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1077
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your disability:' }),
1078
+ SocialSecurityDisabilityAndInsuranceQuestions("true", 'CrossSell:Social_Security_Disability_and_Insurance'),
1079
+ comments(
1080
+ {
1081
+ label: 'Description:',
1082
+ placeholder: 'Please describe your situation in a few words...',
1083
+ inputClass: '!t-h-16'
1084
+ },
1085
+ 'CrossSell:Social_Security_Disability_and_Insurance'
1086
+ )
1087
+ ],
1088
+ updates.nextOnEnter
1089
+ )
1090
+ }
1091
+
1092
+ function personalInjuryCrossSellQuestions(updates = {}) {
1093
+ return step(
1094
+ 'personalInjuryCrossSellQuestions',
1095
+ [
1096
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1097
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1098
+ PersonalInjuryQuestions("true", 'CrossSell:Personal_Injury'),
1099
+ comments(
1100
+ {
1101
+ label: 'Injury Description:',
1102
+ placeholder: 'Please describe your injury in a few words...',
1103
+ inputClass: '!t-h-16'
1104
+ },
1105
+ 'CrossSell:Personal_Injury'
1106
+ )
1107
+ ],
1108
+ updates.nextOnEnter
1109
+ )
1110
+ }
1111
+
1112
+ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1113
+ return step(
1114
+ 'powerOfAttorneyCrossSellQuestions',
1115
+ [
1116
+ crossSellQuestionsStepHeadline({ headline: 'Power of Attorney Information' }),
1117
+ PowerofAttorneyQuestions("true", 'CrossSell:Power_of_Attorney'),
1118
+ comments(
1119
+ {
1120
+ label: 'Description:',
1121
+ placeholder: 'Please describe your situation in a few words...',
1122
+ inputClass: '!t-h-16'
1123
+ },
1124
+ 'CrossSell:Power_of_Attorney'
1125
+ )
1126
+ ],
1127
+ updates.nextOnEnter
1128
+ )
1129
+ }
1130
+
1131
+ function willsAndTrustsCrossSellQuestions(updates = {}) {
1132
+ return step(
1133
+ 'willsAndTrustsCrossSellQuestions',
1134
+ [
1135
+ crossSellQuestionsStepHeadline({ headline: 'Will or Trust Information' }),
1136
+ WillsAndTrustsQuestions("true", 'CrossSell:Wills_and_Trusts'),
1137
+ comments(
1138
+ {
1139
+ label: 'Description:',
1140
+ placeholder: 'Please describe your situation in a few words...',
1141
+ inputClass: '!t-h-16'
1142
+ },
1143
+ 'CrossSell:Wills_and_Trusts'
1144
+ )
1145
+ ],
1146
+ updates.nextOnEnter
1147
+ )
1148
+ }
1149
+
1150
+ function legalCrossSells(updates = {}) {
1151
+ return step(
1152
+ 'legalCrossSells',
1153
+ [
1154
+ legalCrossSellsStepHeadline(updates),
1155
+ legalCrossSells$1(),
1156
+ ],
1157
+ updates.nextOnEnter,
1158
+ false,
1159
+ // Note: we should probably scope this stepKey to this step name
1160
+ '$get(Type_Of_Legal_Problem).value'
1161
+ )
1162
+ }
1163
+
1164
+ function childAndFamilyTOLP(updates = {}) {
1165
+ return step(
1166
+ 'childAndFamilyTOLP',
1167
+ [
1168
+ childAndFamilyTOLPCenter()
1169
+ ],
1170
+ updates.nextOnEnter,
1171
+ updates.nextOnInput,
1172
+ updates.stepKey,
1173
+ updates.nextStepMap
1174
+ )
1175
+ }
1176
+
1177
+ function zipcode(updates = {}) {
1178
+ return sqstep(
1179
+ 'zipcode',
1180
+ zipcodeCenter(),
1181
+ 'Please verify your Zip Code',
1182
+ updates
1183
+ )
1184
+ }
1185
+
1186
+ function maritalStatus(updates = {}) {
1187
+ return sqstep(
1188
+ 'maritalStatus',
1189
+ maritalStatusCenter(),
1190
+ 'What is your marital status?',
1191
+ updates
1192
+ )
1193
+ }
1194
+
1195
+ function haveChildren(updates = {}) {
1196
+ return sqstep(
1197
+ 'haveChildren',
1198
+ haveChildrenCenter(),
1199
+ 'Do you have children?',
1200
+ updates
1201
+ )
1202
+ }
1203
+
1204
+ function childRelationship(updates = {}) {
1205
+ return sqstep(
1206
+ 'childRelationship',
1207
+ childRelationshipCenter(),
1208
+ 'Your relationship to the children:',
1209
+ updates
1307
1210
  )
1308
1211
  }
1309
1212
 
1310
- function commentsWithBankruptcyV2(updates = {}) {
1311
- return step(
1312
- 'commentsWithBankruptcy',
1313
- [
1314
- commentsStepHeadline(updates),
1315
- comments({
1316
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
1317
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1318
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-40' : updates.inputClass,
1319
- }),
1320
- bankruptcyCrossSell(),
1321
- {
1322
- $el: 'div',
1323
- if: '$get(CrossSell_Bankruptcy).value == true',
1324
- children: [
1325
- comments({
1326
- label: 'Bankruptcy or debt details:',
1327
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1328
- inputClass: '!t-h-16'
1329
- }, 'CrossSell:Bankruptcy')
1330
- ],
1331
- }
1332
- ],
1333
- updates.nextOnEnter,
1213
+ function childHome(updates = {}) {
1214
+ return sqstep(
1215
+ 'childHome',
1216
+ childHomeCenter(),
1217
+ 'Who do the children currently live with?',
1218
+ updates
1334
1219
  )
1335
1220
  }
1336
1221
 
1337
- function contactInfoTF(updates = {}) {
1338
- return step(
1339
- 'contactInfo',
1340
- [
1341
- contactStepHeadline(updates),
1342
- contactStepSubHeadline(updates),
1343
- trustedFormScript(),
1344
- email(),
1345
- phone(),
1346
- TCPAConsent(),
1347
- secureIcon()
1348
- ],
1349
- updates.nextOnEnter
1222
+ function childPrimaryCaregiver(updates = {}) {
1223
+ return sqstep(
1224
+ 'childPrimaryCaregiver',
1225
+ childPrimaryCaregiverCenter(),
1226
+ 'Who is the primary caregiver?',
1227
+ updates
1350
1228
  )
1351
1229
  }
1352
1230
 
1353
- function firstAndLastV2(updates = {}) {
1354
- return step(
1355
- 'firstAndLast',
1356
- [
1357
- firstAndLastStepHeadline(updates),
1358
- firstName(),
1359
- lastName()
1360
- ],
1361
- updates.nextOnEnter
1231
+ function haveAttorney(updates = {}) {
1232
+ return sqstep(
1233
+ 'haveAttorney',
1234
+ haveAttorneyCenter(),
1235
+ 'Already working with an attorney?',
1236
+ updates
1362
1237
  )
1363
1238
  }
1364
1239
 
1365
-
1366
- function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1367
- return step(
1368
- 'autoAndCarAccidentCrossSellQuestions',
1369
- [
1370
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1371
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your accident:' }),
1372
- AutoAndCarAccidentsQuestions("true", 'CrossSell:Auto_and_Car_Accidents'),
1373
- comments(
1374
- {
1375
- label: 'Accident Description:',
1376
- placeholder: 'Please describe your accident in a few words...',
1377
- inputClass: '!t-h-16'
1378
- },
1379
- 'CrossSell:Auto_and_Car_Accidents'
1380
- )
1381
- ],
1382
- updates.nextOnEnter
1240
+ function degreeOfInterest(updates = {}) {
1241
+ return sqstep(
1242
+ 'degreeOfInterest',
1243
+ degreeOfInterestCenter(),
1244
+ 'Could you pay if your issue could be resolved?',
1245
+ updates
1383
1246
  )
1384
1247
  }
1385
1248
 
1386
- function duiAndDWICrossSellQuestions(updates = {}) {
1387
- return step(
1388
- 'duiAndDWICrossSellQuestions',
1389
- [
1390
- crossSellQuestionsStepHeadline({ headline: 'About Your DUI/DWI' }),
1391
- DUIAndDWIQuestions("true", 'CrossSell:DUI_and_DWI'),
1392
- comments(
1393
- {
1394
- label: 'Incident Description:',
1395
- placeholder: 'Please describe your incident in a few words...',
1396
- inputClass: '!t-h-16'
1397
- },
1398
- 'CrossSell:DUI_and_DWI'
1399
- )
1400
- ],
1401
- updates.nextOnEnter
1249
+ function lawyerPaymentMethod(updates = {}) {
1250
+ return sqstep(
1251
+ 'lawyerPaymentMethod',
1252
+ lawyerPaymentMethodCenter(),
1253
+ 'How would you pay if a solution required it?',
1254
+ updates
1402
1255
  )
1403
1256
  }
1404
1257
 
1405
- function ssdiCrossSellQuestions(updates = {}) {
1406
- return step(
1407
- 'ssdiCrossSellQuestions',
1408
- [
1409
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1410
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your disability:' }),
1411
- SocialSecurityDisabilityAndInsuranceQuestions("true", 'CrossSell:Social_Security_Disability_and_Insurance'),
1412
- comments(
1413
- {
1414
- label: 'Description:',
1415
- placeholder: 'Please describe your situation in a few words...',
1416
- inputClass: '!t-h-16'
1417
- },
1418
- 'CrossSell:Social_Security_Disability_and_Insurance'
1419
- )
1420
- ],
1421
- updates.nextOnEnter
1422
- )
1258
+ // ------ Common
1259
+
1260
+ const formNavigation = () => ({
1261
+ $el: 'div',
1262
+ attrs: {
1263
+ class: 'step-nav'
1264
+ },
1265
+ children: [
1266
+ {
1267
+ $formkit: 'button',
1268
+ name: 'back_button',
1269
+ onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1270
+ children: 'Back',
1271
+ style: {
1272
+ if: '$activeStep === $firstStep()',
1273
+ then: 'visibility: hidden;'
1274
+ }
1275
+ },
1276
+ {
1277
+ $formkit: 'button',
1278
+ name: 'next_button',
1279
+ onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1280
+ children: {
1281
+ if: '$activeStep === $firstStep()',
1282
+ then: 'Start',
1283
+ else: 'Next'
1284
+ },
1285
+ outerClass: {
1286
+ if: '$activeStep === $lastStep()',
1287
+ then: 't-hidden',
1288
+ else: ''
1289
+ },
1290
+ style: {
1291
+ if: '$activeStep === $lastStep()',
1292
+ then: 'display: none;'
1293
+ }
1294
+ },
1295
+ {
1296
+ $formkit: 'submit',
1297
+ name: 'submit_button',
1298
+ label: 'Submit',
1299
+ if: '$activeStep === $lastStep()',
1300
+ style: {
1301
+ if: '$activeStep !== $lastStep()',
1302
+ then: 'display: none;'
1303
+ }
1304
+ }
1305
+ ]
1306
+ });
1307
+
1308
+ const formDetails = () => ({
1309
+ $el: 'pre',
1310
+ if: '$urlParam("fdbg", "") == 1',
1311
+ children: [
1312
+ {
1313
+ $el: 'pre',
1314
+ children: '$stringify( $get(form).value )',
1315
+ attrs: {
1316
+ class: 't-text-xs',
1317
+ style: 'overflow: scroll'
1318
+ }
1319
+ },
1320
+ {
1321
+ $el: 'pre',
1322
+ children: ['activeStep: ', '$activeStep'],
1323
+ attrs: {
1324
+ class: 't-text-xs',
1325
+ style: 'overflow: scroll'
1326
+ }
1327
+ },
1328
+ {
1329
+ $el: 'pre',
1330
+ children: ['stepHistory: ', '$stepHistory'],
1331
+ attrs: {
1332
+ class: 't-text-xs',
1333
+ style: 'overflow: scroll'
1334
+ }
1335
+ },
1336
+ {
1337
+ $el: 'pre',
1338
+ children: ['stepQueue: ', '$stepQueue'],
1339
+ attrs: {
1340
+ class: 't-text-xs',
1341
+ style: 'overflow: scroll'
1342
+ }
1343
+ },
1344
+ {
1345
+ $el: 'pre',
1346
+ children: ['steps: ', '$stepKeys()'],
1347
+ attrs: {
1348
+ class: 't-text-xs',
1349
+ style: 'overflow: scroll'
1350
+ }
1351
+ }
1352
+ ]
1353
+ });
1354
+
1355
+ const formPropDefaults = {
1356
+ type: 'form',
1357
+ id: 'form',
1358
+ config: { validationVisibility: 'submit' },
1359
+ onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
1360
+ plugins: '$plugins',
1361
+ actions: false,
1362
+ anchorElement: 'form-anchor',
1363
+ useLocalStorage: true,
1364
+ prepop: {
1365
+ fromURL: true
1366
+ },
1367
+ errorCodes: {
1368
+ 403: { message: "An Error Occurred", abort: false },
1369
+ 409: { abort: false },
1370
+ 429: "An Error Occurred",
1371
+ 504: { message: "An Error Occurred", abort: false },
1372
+ },
1373
+ formClass: '!t-max-w-[40rem]'
1374
+ };
1375
+
1376
+ function formProps(updates) {
1377
+ const props = merge(
1378
+ formPropDefaults,
1379
+ updates
1380
+ );
1381
+ if (props.formId && !props.name) {
1382
+ props.name = props.formId;
1383
+ }
1384
+ return props
1385
+ }
1386
+
1387
+ const metaDefaults = {
1388
+ tcpaLanguage: TCPA_LANGUAGE
1389
+ };
1390
+
1391
+ function metaProps(updates) {
1392
+ const data = merge(
1393
+ metaDefaults,
1394
+ updates
1395
+ );
1396
+ return {
1397
+ type: 'meta',
1398
+ data
1399
+ }
1423
1400
  }
1424
1401
 
1425
- function personalInjuryCrossSellQuestions(updates = {}) {
1426
- return step(
1427
- 'personalInjuryCrossSellQuestions',
1428
- [
1429
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1430
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1431
- PersonalInjuryQuestions("true", 'CrossSell:Personal_Injury'),
1432
- comments(
1433
- {
1434
- label: 'Injury Description:',
1435
- placeholder: 'Please describe your injury in a few words...',
1436
- inputClass: '!t-h-16'
1437
- },
1438
- 'CrossSell:Personal_Injury'
1439
- )
1440
- ],
1441
- updates.nextOnEnter
1442
- )
1402
+ function defaultMetaProps() {
1403
+ return metaProps({
1404
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1405
+ commentsPlaceholders: TOLPCommentsPlaceholders,
1406
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
1407
+ finalHeadlines: TOLPFinalHeadlines,
1408
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
1409
+ finalSubHeadlines: TOLPFinalSubHeadlines,
1410
+ })
1443
1411
  }
1444
1412
 
1445
- function powerOfAttorneyCrossSellQuestions(updates = {}) {
1446
- return step(
1447
- 'powerOfAttorneyCrossSellQuestions',
1448
- [
1449
- crossSellQuestionsStepHeadline({ headline: 'Power of Attorney Information' }),
1450
- PowerofAttorneyQuestions("true", 'CrossSell:Power_of_Attorney'),
1451
- comments(
1452
- {
1453
- label: 'Description:',
1454
- placeholder: 'Please describe your situation in a few words...',
1455
- inputClass: '!t-h-16'
1456
- },
1457
- 'CrossSell:Power_of_Attorney'
1458
- )
1459
- ],
1460
- updates.nextOnEnter
1413
+ const dynamicSchemaNode = {
1414
+ $cmp: 'FormKitSchema',
1415
+ if: '$get(Type_Of_Legal_Problem).value',
1416
+ props: {
1417
+ schema: '$meta.dynamicSchema',
1418
+ data: '$buildData($meta)'
1419
+ }
1420
+ };
1421
+
1422
+ const formAnchorDefaults = {
1423
+ $el: 'div',
1424
+ children: [
1425
+ {
1426
+ $el: 'div',
1427
+ attrs: {
1428
+ id: 'form-anchor',
1429
+ class: 't-absolute',
1430
+ style: { top: '-30px', left: 0 }
1431
+ }
1432
+ }
1433
+ ],
1434
+ attrs: {
1435
+ class: 't-relative'
1436
+ }
1437
+ };
1438
+
1439
+ function formAnchor(updates) {
1440
+ return merge(
1441
+ formAnchorDefaults,
1442
+ updates
1461
1443
  )
1462
1444
  }
1463
1445
 
1464
- function willsAndTrustsCrossSellQuestions(updates = {}) {
1465
- return step(
1466
- 'willsAndTrustsCrossSellQuestions',
1467
- [
1468
- crossSellQuestionsStepHeadline({ headline: 'Will or Trust Information' }),
1469
- WillsAndTrustsQuestions("true", 'CrossSell:Wills_and_Trusts'),
1470
- comments(
1446
+ const progressBarDefaults = {
1447
+ $el: 'div',
1448
+ attrs: {
1449
+ class: 't-mt-7 t-mb-5 t-w-full t-flex t-flex-col t-justify-center t-items-center',
1450
+ style: {
1451
+ if: '$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())',
1452
+ then: 'display: none'
1453
+ },
1454
+ },
1455
+ children: [
1456
+ {
1457
+ $el: 'div',
1458
+ attrs: {
1459
+ class: 't-flex t-justify-center'
1460
+ },
1461
+ children: [
1471
1462
  {
1472
- label: 'Description:',
1473
- placeholder: 'Please describe your situation in a few words...',
1474
- inputClass: '!t-h-16'
1463
+ $el: 'span',
1464
+ attrs: {
1465
+ id: 'progress-bar-text',
1466
+ class: 't-text-sm t-mb-1'
1467
+ },
1468
+ children: [
1469
+ "0% Complete"
1470
+ ]
1475
1471
  },
1476
- 'CrossSell:Wills_and_Trusts'
1477
- )
1478
- ],
1479
- updates.nextOnEnter
1480
- )
1481
- }
1472
+ ]
1473
+ },
1474
+ {
1475
+ $el: 'div',
1476
+ attrs: {
1477
+ class: 't-bg-gray-100 t-w-9/12 t-rounded'
1478
+ },
1479
+ children: [
1480
+ {
1481
+ $el: 'div',
1482
+ attrs: {
1483
+ id: 'progress-bar',
1484
+ class: 't-flex t-flex-col t-justify-center t-text-center t-whitespace-nowrap t-w-[10%] t-h-1.5 t-rounded t-text-white t-bg-[#007bff]',
1485
+ style: {
1486
+ transition: 'width 0.5s ease'
1487
+ },
1488
+ },
1489
+ }
1490
+ ]
1491
+ }
1492
+ ]
1493
+ };
1482
1494
 
1483
- function legalCrossSells(updates = {}) {
1484
- return step(
1485
- 'legalCrossSells',
1486
- [
1487
- legalCrossSellsStepHeadline(updates),
1488
- legalCrossSells$1(),
1489
- ],
1490
- updates.nextOnEnter,
1491
- false,
1492
- // Note: we should probably scope this stepKey to this step name
1493
- '$get(Type_Of_Legal_Problem).value'
1495
+ function progressBar(updates) {
1496
+ return merge(
1497
+ progressBarDefaults,
1498
+ updates
1494
1499
  )
1495
1500
  }
1496
1501
 
1497
- function childAndFamilyTOLP(updates = {}) {
1498
- return step(
1499
- 'childAndFamilyTOLP',
1500
- [
1501
- childAndFamilyTOLPCenter()
1502
- ],
1503
- updates.nextOnEnter,
1504
- updates.nextOnInput,
1505
- updates.stepKey,
1506
- updates.nextStepMap
1507
- )
1502
+ function headlineDefaults(updates = {}) {
1503
+ return {
1504
+ $el: 'h1',
1505
+ attrs: {
1506
+ 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 || '')
1507
+ }
1508
+ }
1508
1509
  }
1509
1510
 
1510
- function zipcode(updates = {}) {
1511
- return sqstep(
1512
- 'zipcode',
1513
- zipcodeCenter(),
1514
- 'Please verify your Zip Code',
1511
+ function headline(updates = {}) {
1512
+ return merge(
1513
+ headlineDefaults(updates),
1515
1514
  updates
1516
1515
  )
1517
1516
  }
1518
1517
 
1519
- function maritalStatus(updates = {}) {
1520
- return sqstep(
1521
- 'maritalStatus',
1522
- maritalStatusCenter(),
1523
- 'What is your marital status?',
1524
- updates
1525
- )
1518
+ function subHeadlineDefaults(updates = {}) {
1519
+ return {
1520
+ $el: 'h3',
1521
+ attrs: {
1522
+ 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 || '')
1523
+ }
1524
+ }
1526
1525
  }
1527
1526
 
1528
- function haveChildren(updates = {}) {
1529
- return sqstep(
1530
- 'haveChildren',
1531
- haveChildrenCenter(),
1532
- 'Do you have children?',
1527
+ function subHeadline(updates = {}) {
1528
+ return merge(
1529
+ subHeadlineDefaults(updates),
1533
1530
  updates
1534
1531
  )
1535
1532
  }
1536
1533
 
1537
- function childRelationship(updates = {}) {
1538
- return sqstep(
1539
- 'childRelationship',
1540
- childRelationshipCenter(),
1541
- 'Your relationship to the children:',
1542
- updates
1543
- )
1544
- }
1534
+ const hiddenInputsBase = [
1535
+ {
1536
+ $formkit: 'hidden',
1537
+ name: "gclid",
1538
+ value: null
1539
+ },
1540
+ {
1541
+ $formkit: 'hidden',
1542
+ name: "campaignid",
1543
+ value: null
1544
+ },
1545
+ {
1546
+ $formkit: 'hidden',
1547
+ name: "s",
1548
+ value: null
1549
+ }
1550
+ ];
1551
+
1552
+ const hiddenInputsLegal = [
1553
+ {
1554
+ $formkit: 'hidden',
1555
+ name: "vertical",
1556
+ value: "Legal"
1557
+ },
1558
+ {
1559
+ $formkit: 'hidden',
1560
+ name: "TCPA_Language",
1561
+ value: "$meta.tcpaLanguage"
1562
+ },
1563
+ ...hiddenInputsBase
1564
+ ];
1545
1565
 
1546
- function childHome(updates = {}) {
1547
- return sqstep(
1548
- 'childHome',
1549
- childHomeCenter(),
1550
- 'Who do the children currently live with?',
1551
- updates
1552
- )
1553
- }
1566
+ const legalRedirectMapDefaults = {
1567
+ '*': LegalRedirectUrl()
1568
+ };
1554
1569
 
1555
- function childPrimaryCaregiver(updates = {}) {
1556
- return sqstep(
1557
- 'childPrimaryCaregiver',
1558
- childPrimaryCaregiverCenter(),
1559
- 'Who is the primary caregiver?',
1560
- updates
1561
- )
1562
- }
1563
1570
 
1564
- function haveAttorney(updates = {}) {
1565
- return sqstep(
1566
- 'haveAttorney',
1567
- haveAttorneyCenter(),
1568
- 'Already working with an attorney?',
1571
+ function legalRedirectMap(updates) {
1572
+ return merge(
1573
+ legalRedirectMapDefaults,
1569
1574
  updates
1570
1575
  )
1571
1576
  }
1572
1577
 
1573
- function degreeOfInterest(updates = {}) {
1574
- return sqstep(
1575
- 'degreeOfInterest',
1576
- degreeOfInterestCenter(),
1577
- 'Could you pay if your issue could be resolved?',
1578
- updates
1579
- )
1580
- }
1578
+ const TOLPCommentsPlaceholders = {
1579
+ 'Adoption': 'Example: "I need help with adoption forms"',
1580
+ 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1581
+ 'Auto and Car Accidents': 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1582
+ 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
1583
+ 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
1584
+ 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1585
+ 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
1586
+ 'Child Custody': 'Example: "Need help getting custody"',
1587
+ 'Child Support': 'Example: "Issues with child support payments"',
1588
+ 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
1589
+ 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
1590
+ 'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
1591
+ 'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
1592
+ 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
1593
+ 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
1594
+ 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
1595
+ 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
1596
+ 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
1597
+ 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
1598
+ 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
1599
+ 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
1600
+ 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
1601
+ 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
1602
+ 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
1603
+ 'Guardianship': 'Example: "I need help with guardianship documents"',
1604
+ 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
1605
+ 'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
1606
+ 'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
1607
+ 'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
1608
+ 'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
1609
+ 'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
1610
+ 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
1611
+ 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
1612
+ 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
1613
+ 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
1614
+ 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
1615
+ 'Long Term Disability': 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
1616
+ 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
1617
+ 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
1618
+ 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
1619
+ 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
1620
+ 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
1621
+ 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
1622
+ 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
1623
+ 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
1624
+ 'Social Security Disability and Insurance': 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
1625
+ 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
1626
+ 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
1627
+ 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
1628
+ 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
1629
+ 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
1630
+ 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
1631
+ 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
1632
+ 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
1633
+ 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
1634
+ };
1581
1635
 
1582
- function lawyerPaymentMethod(updates = {}) {
1583
- return sqstep(
1584
- 'lawyerPaymentMethod',
1585
- lawyerPaymentMethodCenter(),
1586
- 'How would you pay if a solution required it?',
1587
- updates
1588
- )
1589
- }
1636
+ const TOLPFinalHeadlines = {
1637
+ // 'Adoption': '',
1638
+ };
1590
1639
 
1591
- const formNavigationV2 = () => ({
1592
- $el: 'div',
1593
- attrs: {
1594
- class: 'step-nav'
1595
- },
1596
- children: [
1597
- {
1598
- $formkit: 'button',
1599
- name: 'back_button',
1600
- onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1601
- children: 'Back',
1602
- style: {
1603
- if: '$activeStep === $firstStep()',
1604
- then: 'visibility: hidden;'
1605
- }
1606
- },
1607
- {
1608
- $formkit: 'button',
1609
- name: 'next_button',
1610
- onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1611
- children: {
1612
- if: '$activeStep === $firstStep()',
1613
- then: 'Start',
1614
- else: 'Next'
1615
- },
1616
- outerClass: {
1617
- if: '$activeStep === $lastStep()',
1618
- then: 't-hidden',
1619
- else: ''
1620
- },
1621
- style: {
1622
- if: '$activeStep === $lastStep()',
1623
- then: 'display: none;'
1624
- }
1625
- },
1626
- {
1627
- $formkit: 'submit',
1628
- name: 'submit_button',
1629
- label: 'Submit',
1630
- if: '$activeStep === $lastStep()',
1631
- style: {
1632
- if: '$activeStep !== $lastStep()',
1633
- then: 'display: none;'
1634
- }
1635
- }
1636
- ]
1637
- });
1640
+ const TOLPFinalSubHeadlines = {
1641
+ 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
1642
+ // 'Asbestos and Mesothelioma': '',
1643
+ 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
1644
+ 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
1645
+ // 'Birth Certificate and Name Change': '',
1646
+ // 'Business Lawyers': '',
1647
+ // 'Child Custody and Support': '',
1648
+ // 'Civil Rights and Discrimination': '',
1649
+ // 'Civil Lawsuit': '',
1650
+ // 'Consumer Lawyers': '',
1651
+ 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
1652
+ // 'Criminal and Felony': '',
1653
+ // 'Debt and Collections': '',
1654
+ 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
1655
+ 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
1656
+ 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
1657
+ // 'Employment and Workplace': '',
1658
+ // 'Expungement': '',
1659
+ // 'Family Issues': '',
1660
+ 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
1661
+ 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
1662
+ // 'Harassment and Discrimination': '',
1663
+ // 'Identity Theft': '',
1664
+ 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
1665
+ // 'Insurance': '',
1666
+ 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
1667
+ // 'Lemon Law': '',
1668
+ 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
1669
+ 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
1670
+ 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
1671
+ 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
1672
+ // 'Power of Attorney': '',
1673
+ 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
1674
+ // 'Product Liability': '',
1675
+ // 'Property Damage': '',
1676
+ 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
1677
+ 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
1678
+ 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
1679
+ // 'Traffic and Tickets': '',
1680
+ 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
1681
+ // 'Victim of a Crime': '',
1682
+ // 'Wills and Trusts': '',
1683
+ 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
1684
+ // 'Wrongful Death': '',
1685
+ // 'Wrongful Termination': '',
1686
+ // 'Not Sure or Other': ''
1687
+ // 'Sexual Harassment': '',
1688
+ // 'Workplace Harassment': '',
1689
+ // 'Non-Workplace Harassment': '',
1690
+ // 'Workplace Discrimination': '',
1691
+ // 'Non-Workplace Discrimination': '',
1692
+ };
1638
1693
 
1639
- const formDetails = () => ({
1640
- $el: 'pre',
1641
- if: '$urlParam("fdbg", "") == 1',
1642
- children: [
1643
- {
1644
- $el: 'pre',
1645
- children: '$stringify( $get(form).value )',
1646
- attrs: {
1647
- class: 't-text-xs',
1648
- style: 'overflow: scroll'
1649
- }
1650
- },
1651
- {
1652
- $el: 'pre',
1653
- children: ['activeStep: ', '$activeStep'],
1654
- attrs: {
1655
- class: 't-text-xs',
1656
- style: 'overflow: scroll'
1657
- }
1658
- },
1659
- {
1660
- $el: 'pre',
1661
- children: ['stepHistory: ', '$stepHistory'],
1662
- attrs: {
1663
- class: 't-text-xs',
1664
- style: 'overflow: scroll'
1665
- }
1666
- },
1667
- {
1668
- $el: 'pre',
1669
- children: ['stepQueue: ', '$stepQueue'],
1670
- attrs: {
1671
- class: 't-text-xs',
1672
- style: 'overflow: scroll'
1673
- }
1674
- },
1675
- {
1676
- $el: 'pre',
1677
- children: ['steps: ', '$stepKeys()'],
1678
- attrs: {
1679
- class: 't-text-xs',
1680
- style: 'overflow: scroll'
1681
- }
1682
- }
1683
- ]
1684
- });
1694
+ const meta = defaultMetaProps();
1695
+
1696
+ meta.data.dynamicSchema = [
1697
+ zipcode(),
1698
+ maritalStatus(),
1699
+ haveChildren(),
1700
+ childRelationship(),
1701
+ childHome(),
1702
+ childPrimaryCaregiver(),
1703
+ haveAttorney(),
1704
+ degreeOfInterest(),
1705
+ lawyerPaymentMethod(),
1706
+ commentsWithBankruptcy({
1707
+ label: null,
1708
+ headline: 'Please briefly describe your situation:',
1709
+ headlineClass: '!t-text-dark',
1710
+ }),
1711
+ legalCrossSells({
1712
+ headlineClass: '!t-text-dark'
1713
+ }),
1714
+ // Note: this is purposefully limited to a subset of values
1715
+ // that could show up in the Legal_CrossSells input because
1716
+ // this form only allows a handful of TOLPs on stage 1!
1717
+ autoAndCarAccidentCrossSellQuestions(),
1718
+ personalInjuryCrossSellQuestions(),
1719
+ duiAndDWICrossSellQuestions(),
1720
+ ssdiCrossSellQuestions(),
1721
+ powerOfAttorneyCrossSellQuestions(),
1722
+ willsAndTrustsCrossSellQuestions(),
1723
+ firstAndLastV2({
1724
+ headlineClass: '!t-text-dark'
1725
+ }),
1726
+ ];
1685
1727
 
1686
1728
  const schema = [
1687
- defaultMetaProps(),
1729
+ meta,
1688
1730
  formAnchor(),
1689
1731
  {
1690
1732
  $cmp: 'FormKit',
@@ -1760,41 +1802,9 @@ const schema = [
1760
1802
  ]
1761
1803
  }
1762
1804
  }),
1763
- zipcode(),
1764
- maritalStatus(),
1765
- haveChildren(),
1766
- childRelationship(),
1767
- childHome(),
1768
- childPrimaryCaregiver(),
1769
- haveAttorney(),
1770
- degreeOfInterest(),
1771
- lawyerPaymentMethod(),
1772
- commentsWithBankruptcyV2({
1773
- nextOnEnter: false,
1774
- label: null,
1775
- headline: 'Please briefly describe your situation:',
1776
- headlineClass: '!t-text-dark',
1777
- inputClass: '!t-h-32'
1778
- }),
1779
- legalCrossSells({
1780
- headlineClass: '!t-text-dark'
1781
- }),
1782
- // Note: this is purposefully limited to a subset of values
1783
- // that could show up in the Legal_CrossSells input because
1784
- // this form only allows a handful of TOLPs on stage 1!
1785
- autoAndCarAccidentCrossSellQuestions(),
1786
- personalInjuryCrossSellQuestions(),
1787
- duiAndDWICrossSellQuestions(),
1788
- ssdiCrossSellQuestions(),
1789
- powerOfAttorneyCrossSellQuestions(),
1790
- willsAndTrustsCrossSellQuestions(),
1791
- firstAndLastV2({
1792
- headlineClass: '!t-text-dark'
1793
- }),
1794
- contactInfoTF({
1795
- nextOnEnter: false
1796
- }),
1797
- formNavigationV2(),
1805
+ dynamicSchemaNode,
1806
+ contactInfo(),
1807
+ formNavigation(),
1798
1808
  formDetails()
1799
1809
  ]
1800
1810
  }