bhl-forms 0.7.3 → 0.7.5
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.
- package/dist/bhl-forms.es.js +551 -543
- package/dist/bhl-forms.iife.js +4 -4
- package/dist/bhl-forms.modern.es.js +649 -649
- package/dist/bhl-forms.modern.iife.js +7 -7
- package/dist/bhl-forms.modern.umd.js +7 -7
- package/dist/bhl-forms.umd.js +4 -4
- package/dist/forms/accidentsAndInjuries.es.js +1461 -1151
- package/dist/forms/accidentsAndInjuries.iife.js +1 -1
- package/dist/forms/accidentsAndInjuries.json +1 -1
- package/dist/forms/appraisals.es.js +138 -137
- package/dist/forms/appraisals.iife.js +1 -1
- package/dist/forms/business.es.js +1434 -1149
- package/dist/forms/business.iife.js +1 -1
- package/dist/forms/business.json +1 -1
- package/dist/forms/childAndFamily.es.js +1329 -1043
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/childAndFamilySingle.es.js +1528 -1378
- package/dist/forms/childAndFamilySingle.iife.js +1 -1
- package/dist/forms/childAndFamilySingle.json +1 -1
- package/dist/forms/civilLawsuit.es.js +2000 -1807
- package/dist/forms/civilLawsuit.iife.js +1 -1
- package/dist/forms/civilLawsuit.json +1 -1
- package/dist/forms/coins.es.js +138 -137
- package/dist/forms/coins.iife.js +1 -1
- package/dist/forms/contracts.es.js +1349 -1050
- package/dist/forms/contracts.iife.js +1 -1
- package/dist/forms/contracts.json +1 -1
- package/dist/forms/criminal.es.js +1832 -1711
- package/dist/forms/criminal.iife.js +1 -1
- package/dist/forms/criminal.json +1 -1
- package/dist/forms/divorce.es.js +1541 -1385
- package/dist/forms/divorce.iife.js +1 -1
- package/dist/forms/divorce.json +1 -1
- package/dist/forms/employmentAndWorkplace.es.js +1833 -1678
- package/dist/forms/employmentAndWorkplace.iife.js +1 -1
- package/dist/forms/employmentAndWorkplace.json +1 -1
- package/dist/forms/generalHomeImprovement.es.js +2381 -2010
- package/dist/forms/generalHomeImprovement.iife.js +1 -1
- package/dist/forms/generalHomeImprovement.json +1 -1
- package/dist/forms/generalHomeImprovementThankYou.es.js +1795 -2008
- package/dist/forms/generalHomeImprovementThankYou.iife.js +1 -1
- package/dist/forms/generalHomeImprovementThankYou.json +1 -1
- package/dist/forms/generalLegal.es.js +3037 -2535
- package/dist/forms/generalLegal.iife.js +1 -1
- package/dist/forms/generalLegal.json +1 -1
- package/dist/forms/generalLegalJustAnswer.es.js +3216 -2872
- package/dist/forms/generalLegalJustAnswer.iife.js +1 -1
- package/dist/forms/generalLegalJustAnswer.json +1 -1
- package/dist/forms/generalLegalPopUnder.es.js +3037 -2535
- package/dist/forms/generalLegalPopUnder.iife.js +1 -1
- package/dist/forms/generalLegalPopUnder.json +1 -1
- package/dist/forms/generalLegalPopUnderSingle.es.js +3216 -2872
- package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
- package/dist/forms/generalLegalPopUnderSingle.json +1 -1
- package/dist/forms/generalLegalSingle.es.js +3216 -2872
- package/dist/forms/generalLegalSingle.iife.js +1 -1
- package/dist/forms/generalLegalSingle.json +1 -1
- package/dist/forms/generalLegalThankYou.es.js +2825 -2303
- package/dist/forms/generalLegalThankYou.iife.js +1 -1
- package/dist/forms/generalLegalThankYou.json +1 -1
- package/dist/forms/generalLegalThankYouConsultation.es.js +3216 -2872
- package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
- package/dist/forms/generalLegalThankYouConsultation.json +1 -1
- package/dist/forms/harassmentAndDiscrimination.es.js +1425 -1120
- package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
- package/dist/forms/harassmentAndDiscrimination.json +1 -1
- package/dist/forms/landlordTenant.es.js +1395 -1106
- package/dist/forms/landlordTenant.iife.js +1 -1
- package/dist/forms/landlordTenant.json +1 -1
- package/dist/forms/malpractice.es.js +1531 -1223
- package/dist/forms/malpractice.iife.js +1 -1
- package/dist/forms/malpractice.json +1 -1
- package/dist/forms/mechanics.es.js +702 -530
- package/dist/forms/mechanics.iife.js +1 -1
- package/dist/forms/mechanics.json +1 -1
- package/dist/forms/patentsAndIP.es.js +1830 -1652
- package/dist/forms/patentsAndIP.iife.js +1 -1
- package/dist/forms/patentsAndIP.json +1 -1
- package/dist/forms/realEstate.es.js +2852 -2405
- package/dist/forms/realEstate.iife.js +1 -1
- package/dist/forms/realEstate.json +1 -1
- package/dist/forms/repossession.es.js +1568 -1251
- package/dist/forms/repossession.iife.js +1 -1
- package/dist/forms/repossession.json +1 -1
- package/dist/forms/ssdi.es.js +635 -520
- package/dist/forms/ssdi.iife.js +1 -1
- package/dist/forms/ssdi.json +1 -1
- package/dist/forms/testForm.es.js +409 -371
- package/dist/forms/testForm.iife.js +1 -1
- package/dist/forms/testForm.json +1 -1
- package/dist/forms/testRedirects.es.js +421 -316
- package/dist/forms/testRedirects.iife.js +1 -1
- package/dist/forms/testRedirects.json +1 -1
- package/dist/forms/vets.es.js +138 -137
- package/dist/forms/vets.iife.js +1 -1
- package/dist/forms/willsAndTrusts.es.js +1428 -1112
- package/dist/forms/willsAndTrusts.iife.js +1 -1
- package/dist/forms/willsAndTrusts.json +1 -1
- package/dist/main.css +1 -1
- package/package.json +1 -1
|
@@ -10,32 +10,65 @@ const radio = (updates) => {
|
|
|
10
10
|
if (updates.name && !updates.id) {
|
|
11
11
|
updates.id = updates.name;
|
|
12
12
|
}
|
|
13
|
-
return merge(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
return merge(
|
|
14
|
+
{
|
|
15
|
+
$formkit: "radio",
|
|
16
|
+
validation: "required",
|
|
17
|
+
validationMessages: {
|
|
18
|
+
required: "Field is required",
|
|
19
|
+
},
|
|
20
|
+
optionsClass: "t-pt-3 t-pl-1",
|
|
21
|
+
legendClass: "required",
|
|
18
22
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, updates)
|
|
23
|
+
updates
|
|
24
|
+
)
|
|
22
25
|
};
|
|
23
26
|
|
|
24
27
|
const col2Radio = (updates) => {
|
|
25
|
-
updates.legendClass =
|
|
26
|
-
updates.fieldsetClass =
|
|
27
|
-
updates.optionsClass =
|
|
28
|
-
updates.innerClass =
|
|
29
|
-
updates.wrapperClass =
|
|
28
|
+
updates.legendClass = "required";
|
|
29
|
+
updates.fieldsetClass = "$reset";
|
|
30
|
+
updates.optionsClass = "t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
|
|
31
|
+
updates.innerClass = "t-items-start";
|
|
32
|
+
updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
|
|
33
|
+
return radio(updates)
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// TODO: rename
|
|
37
|
+
const col2RadioCenter = (updates) => {
|
|
38
|
+
updates.legendClass = "required t-w-[100%] t-text-center";
|
|
39
|
+
if (typeof updates.fieldsetClass === "undefined") {
|
|
40
|
+
updates.fieldsetClass = "$reset t-flex t-justify-center";
|
|
41
|
+
}
|
|
42
|
+
updates.innerClass = "t-items-start";
|
|
43
|
+
updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
|
|
44
|
+
updates.optionClass = "t-pl-4 md:t-pl-8 md:t-min-w-[200px]";
|
|
45
|
+
updates.optionsClass = "t-pl-4 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
|
|
46
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
47
|
+
updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
|
|
30
48
|
return radio(updates)
|
|
31
49
|
};
|
|
32
50
|
|
|
33
51
|
const sbs2ItemRadio = (updates) => {
|
|
34
|
-
updates.legendClass =
|
|
35
|
-
updates.fieldsetClass =
|
|
36
|
-
updates.optionsClass =
|
|
37
|
-
updates.innerClass =
|
|
38
|
-
updates.optionClass =
|
|
52
|
+
updates.legendClass = "legend-left t-pb-1 required";
|
|
53
|
+
updates.fieldsetClass = "$reset side-by-side t-items-center";
|
|
54
|
+
updates.optionsClass = "t-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center";
|
|
55
|
+
updates.innerClass = "t-flex t-items-center";
|
|
56
|
+
updates.optionClass = "t-pr-1";
|
|
57
|
+
return radio(updates)
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const verticalButtonRadio = (updates) => {
|
|
61
|
+
updates.legendClass = "legend-left";
|
|
62
|
+
updates.fieldsetClass = "$reset t-flex t-justify-center t-flex-col-reverse t-items-center";
|
|
63
|
+
if (typeof updates.optionsClass === "undefined") {
|
|
64
|
+
updates.optionsClass = "t-flex t-flex-col sm:t-flex-row t-justify-center t-my-3";
|
|
65
|
+
}
|
|
66
|
+
updates.optionClass = "radiobtn t-my-2 sm:t-my-0 t-mx-2 md:t-mx-5";
|
|
67
|
+
updates.wrapperClass = "$reset formkit-wrapper t-mb-0 t-flex t-items-center t-h-[100%]";
|
|
68
|
+
updates.labelClass = "t-font-semibold t-text-[#1e448f] t-w-[100%]";
|
|
69
|
+
updates.decoratorIcon = false;
|
|
70
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
71
|
+
updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
|
|
39
72
|
return radio(updates)
|
|
40
73
|
};
|
|
41
74
|
|
|
@@ -43,23 +76,35 @@ const select = (updates) => {
|
|
|
43
76
|
if (updates.name && !updates.id) {
|
|
44
77
|
updates.id = updates.name;
|
|
45
78
|
}
|
|
46
|
-
return merge(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
79
|
+
return merge(
|
|
80
|
+
{
|
|
81
|
+
$formkit: "select",
|
|
82
|
+
placeholder: "Please Select",
|
|
83
|
+
validation: "required",
|
|
84
|
+
validationMessages: {
|
|
85
|
+
required: "Field is required",
|
|
86
|
+
},
|
|
87
|
+
inputClass: "t-bg-white",
|
|
88
|
+
labelClass: "required",
|
|
52
89
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, updates)
|
|
90
|
+
updates
|
|
91
|
+
)
|
|
56
92
|
};
|
|
57
93
|
|
|
58
94
|
const sbsSelect = (updates) => {
|
|
59
|
-
updates.labelClass =
|
|
60
|
-
updates.wrapperClass =
|
|
61
|
-
updates.innerClass =
|
|
62
|
-
updates.helpClass =
|
|
95
|
+
updates.labelClass = "required";
|
|
96
|
+
updates.wrapperClass = "side-by-side t-items-center";
|
|
97
|
+
updates.innerClass = "select-height-content";
|
|
98
|
+
updates.helpClass = "t-mt-2.5 md:t-text-right md:t-mt-[-5px]";
|
|
99
|
+
return select(updates)
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const verticalSelect = (updates) => {
|
|
103
|
+
updates.labelClass = "required";
|
|
104
|
+
updates.wrapperClass = "t-flex t-justify-center";
|
|
105
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
106
|
+
updates.inputClass = "t-min-w-[150px] t-bg-white";
|
|
107
|
+
updates.helpClass = "t-mt-2.5 t-text-center";
|
|
63
108
|
return select(updates)
|
|
64
109
|
};
|
|
65
110
|
|
|
@@ -67,221 +112,290 @@ const text = (updates) => {
|
|
|
67
112
|
if (updates.name && !updates.id) {
|
|
68
113
|
updates.id = updates.name;
|
|
69
114
|
}
|
|
70
|
-
return merge(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
115
|
+
return merge(
|
|
116
|
+
{
|
|
117
|
+
$formkit: "text",
|
|
118
|
+
validation: "required",
|
|
119
|
+
validationMessages: {
|
|
120
|
+
required: "Field is required",
|
|
121
|
+
},
|
|
122
|
+
labelClass: "required",
|
|
75
123
|
},
|
|
76
|
-
|
|
77
|
-
|
|
124
|
+
updates
|
|
125
|
+
)
|
|
78
126
|
};
|
|
79
127
|
|
|
80
128
|
const sbsText = (updates) => {
|
|
81
|
-
updates.wrapperClass =
|
|
129
|
+
updates.wrapperClass = "side-by-side t-items-center";
|
|
82
130
|
return text(updates)
|
|
83
131
|
};
|
|
84
132
|
|
|
85
133
|
const verticalText = (updates) => {
|
|
86
|
-
updates.wrapperClass =
|
|
87
|
-
updates.messagesClass =
|
|
88
|
-
updates.inputClass =
|
|
89
|
-
updates.helpClass =
|
|
134
|
+
updates.wrapperClass = "t-flex t-justify-center";
|
|
135
|
+
updates.messagesClass = "t-flex t-justify-center";
|
|
136
|
+
updates.inputClass = "t-text-center";
|
|
137
|
+
updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
|
|
90
138
|
return text(updates)
|
|
91
139
|
};
|
|
92
140
|
|
|
93
|
-
|
|
94
141
|
const zipcode = (scope, vertical, updates = {}) => {
|
|
95
142
|
const func = vertical ? verticalText : sbsText;
|
|
96
|
-
const label = vertical ?
|
|
97
|
-
const help = vertical ?
|
|
143
|
+
const label = vertical ? updates.label : "Zip Code:";
|
|
144
|
+
const help = vertical ? updates.help ?? "We try to match you with local help" : null;
|
|
98
145
|
return func({
|
|
99
146
|
label,
|
|
100
147
|
help,
|
|
101
|
-
placeholder:
|
|
102
|
-
name: scope ? scope +
|
|
148
|
+
placeholder: "#####",
|
|
149
|
+
name: scope ? scope + ":" + "Zip" : "Zip",
|
|
103
150
|
maxlength: 5,
|
|
104
151
|
inputmode: "numeric",
|
|
105
|
-
autocomplete:
|
|
106
|
-
validation:
|
|
152
|
+
autocomplete: "postal-code",
|
|
153
|
+
validation: "required|matches:/^[0-9]{5}$/",
|
|
107
154
|
validationMessages: {
|
|
108
|
-
required:
|
|
109
|
-
matches:
|
|
155
|
+
required: "Zip Code is required",
|
|
156
|
+
matches: "Invalid Zip Code",
|
|
110
157
|
},
|
|
111
|
-
...updates
|
|
158
|
+
...updates,
|
|
112
159
|
})
|
|
113
160
|
};
|
|
114
161
|
|
|
115
|
-
const civilDefense = (updates) =>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if: '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"'
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
'Automobile Accident',
|
|
132
|
-
'Contract Disputes',
|
|
133
|
-
'Defamation and Slander',
|
|
134
|
-
'Dog Bite',
|
|
135
|
-
'Employment and Workplace',
|
|
136
|
-
'Fraud',
|
|
137
|
-
'Medical Malpractice',
|
|
138
|
-
'Personal Injury',
|
|
139
|
-
'Property Damage',
|
|
140
|
-
'Small Claims',
|
|
141
|
-
'Real Estate',
|
|
142
|
-
'Not Sure or Other'
|
|
143
|
-
]
|
|
144
|
-
}, updates));
|
|
145
|
-
|
|
146
|
-
const employmentAndWorkplaceTOLPDisplay = (updates) => col2Radio(merge({
|
|
147
|
-
name: 'Type_Of_Legal_Problem_Display',
|
|
148
|
-
if: '$get(Type_Of_Legal_Problem).value == "Employment and Workplace"',
|
|
149
|
-
label: 'Select The Workplace Issue:',
|
|
150
|
-
options: [
|
|
151
|
-
'Workplace Harassment',
|
|
152
|
-
'Workplace Discrimination',
|
|
153
|
-
'Wrongful Termination',
|
|
154
|
-
'Payment Disputes',
|
|
155
|
-
'Workers Compensation',
|
|
156
|
-
'Personal Injury',
|
|
157
|
-
'Unemployment',
|
|
158
|
-
'Other Workplace Issues'
|
|
159
|
-
]
|
|
160
|
-
}, updates));
|
|
162
|
+
const civilDefense = (scope, vertical, updates = {}) => {
|
|
163
|
+
const func = vertical ? verticalButtonRadio : sbs2ItemRadio;
|
|
164
|
+
const label = vertical ? updates.label : "Do You Need Representation to File a Lawsuit or Defend One?";
|
|
165
|
+
const _if = vertical ? updates.if : '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"';
|
|
166
|
+
return func(
|
|
167
|
+
merge(
|
|
168
|
+
{
|
|
169
|
+
label,
|
|
170
|
+
if: _if,
|
|
171
|
+
name: scope ? scope + ":" + "Civil_Defense" : "Civil_Defense",
|
|
172
|
+
options: ["Defend a Lawsuit", "File a Lawsuit"],
|
|
173
|
+
},
|
|
174
|
+
updates
|
|
175
|
+
)
|
|
176
|
+
)
|
|
177
|
+
};
|
|
161
178
|
|
|
179
|
+
const civilLawsuitTOLPDisplay = (scope, vertical, updates = {}) => {
|
|
180
|
+
const func = vertical ? col2RadioCenter : col2Radio;
|
|
181
|
+
const label = vertical ? updates.label : "Select The Type of Lawsuit You Would Like to File:";
|
|
182
|
+
const _if = vertical
|
|
183
|
+
? null
|
|
184
|
+
: '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit" && $get(Civil_Defense).value == "File a Lawsuit"';
|
|
185
|
+
return func(
|
|
186
|
+
merge(
|
|
187
|
+
{
|
|
188
|
+
label,
|
|
189
|
+
if: _if,
|
|
190
|
+
name: scope ? scope + ":" + "Type_Of_Legal_Problem_Display" : "Type_Of_Legal_Problem_Display",
|
|
191
|
+
options: [
|
|
192
|
+
"Automobile Accident",
|
|
193
|
+
"Contract Disputes",
|
|
194
|
+
"Defamation and Slander",
|
|
195
|
+
"Dog Bite",
|
|
196
|
+
"Employment and Workplace",
|
|
197
|
+
"Fraud",
|
|
198
|
+
"Medical Malpractice",
|
|
199
|
+
"Personal Injury",
|
|
200
|
+
"Property Damage",
|
|
201
|
+
"Small Claims",
|
|
202
|
+
"Real Estate",
|
|
203
|
+
"Not Sure or Other",
|
|
204
|
+
],
|
|
205
|
+
},
|
|
206
|
+
updates
|
|
207
|
+
)
|
|
208
|
+
)
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const employmentAndWorkplaceTOLPDisplay = (scope, vertical, updates = {}) => {
|
|
212
|
+
const func = vertical ? col2RadioCenter : col2Radio;
|
|
213
|
+
const label = vertical ? updates.label : "Select The Workplace Issue:";
|
|
214
|
+
return func(
|
|
215
|
+
merge(
|
|
216
|
+
{
|
|
217
|
+
label,
|
|
218
|
+
if: '$get(Type_Of_Legal_Problem).value == "Employment and Workplace"',
|
|
219
|
+
name: scope ? scope + ":" + "Type_Of_Legal_Problem_Display" : "Type_Of_Legal_Problem_Display",
|
|
220
|
+
options: [
|
|
221
|
+
"Workplace Harassment",
|
|
222
|
+
"Workplace Discrimination",
|
|
223
|
+
"Wrongful Termination",
|
|
224
|
+
"Payment Disputes",
|
|
225
|
+
"Workers Compensation",
|
|
226
|
+
"Personal Injury",
|
|
227
|
+
"Unemployment",
|
|
228
|
+
"Other Workplace Issues",
|
|
229
|
+
],
|
|
230
|
+
},
|
|
231
|
+
updates
|
|
232
|
+
)
|
|
233
|
+
)
|
|
234
|
+
};
|
|
162
235
|
|
|
163
236
|
const TOLPOptions = [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
237
|
+
"Adoption",
|
|
238
|
+
"Asbestos and Mesothelioma",
|
|
239
|
+
"Auto and Car Accidents",
|
|
240
|
+
"Bankruptcy",
|
|
241
|
+
"Birth Certificate and Name Change",
|
|
242
|
+
"Business Lawyers",
|
|
243
|
+
"Child Custody",
|
|
244
|
+
"Child Support",
|
|
245
|
+
"Civil Rights and Discrimination",
|
|
246
|
+
"Consumer Lawyers",
|
|
247
|
+
"Copyrights and Trademarks",
|
|
248
|
+
"Criminal and Felony",
|
|
249
|
+
"Debt and Collections",
|
|
250
|
+
"Defend a Lawsuit",
|
|
251
|
+
"Divorce and Separation",
|
|
252
|
+
"DUI and DWI",
|
|
253
|
+
"Elder Law",
|
|
254
|
+
"Employment and Workplace",
|
|
255
|
+
"Expungement",
|
|
256
|
+
"Family Issues",
|
|
257
|
+
"File a Lawsuit",
|
|
258
|
+
"Foreclosure",
|
|
259
|
+
"Guardianship",
|
|
260
|
+
"Harassment and Discrimination",
|
|
261
|
+
"Identity Theft",
|
|
262
|
+
"Immigration and Visas",
|
|
263
|
+
"Insurance",
|
|
264
|
+
"Landlord and Tenant",
|
|
265
|
+
"Lemon Law",
|
|
266
|
+
"Long Term Disability",
|
|
267
|
+
"Medical Malpractice",
|
|
268
|
+
"Non-Workplace Discrimination",
|
|
269
|
+
"Non-Workplace Harassment",
|
|
270
|
+
"Patents and Intellectual Property",
|
|
271
|
+
"Personal Injury",
|
|
272
|
+
"Power of Attorney",
|
|
273
|
+
"Probate and Estates",
|
|
274
|
+
"Product Liability",
|
|
275
|
+
"Property Damage",
|
|
276
|
+
"Real Estate",
|
|
277
|
+
"Sexual Harassment",
|
|
278
|
+
"Social Security Disability and Insurance",
|
|
279
|
+
"Tax and IRS",
|
|
280
|
+
"Traffic and Tickets",
|
|
281
|
+
"Unemployment",
|
|
282
|
+
"Victim of a Crime",
|
|
283
|
+
"Wills and Trusts",
|
|
284
|
+
"Workers Compensation",
|
|
285
|
+
"Workplace Discrimination",
|
|
286
|
+
"Workplace Harassment",
|
|
287
|
+
"Wrongful Death",
|
|
288
|
+
"Wrongful Termination",
|
|
289
|
+
"Not Sure or Other",
|
|
217
290
|
];
|
|
218
291
|
|
|
219
|
-
const generalTOLP = (updates) =>
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
292
|
+
const generalTOLP = (scope, vertical, updates = {}) => {
|
|
293
|
+
const func = vertical ? verticalSelect : sbsSelect;
|
|
294
|
+
const label = vertical ? updates.label : "Type of Help Needed:";
|
|
295
|
+
return func(
|
|
296
|
+
merge(
|
|
297
|
+
{
|
|
298
|
+
label,
|
|
299
|
+
name: scope ? scope + ":" + "Type_Of_Legal_Problem" : "Type_Of_Legal_Problem",
|
|
300
|
+
id: scope ? scope + ":" + "Type_Of_Legal_Problem" : "Type_Of_Legal_Problem",
|
|
301
|
+
options: TOLPOptions,
|
|
302
|
+
},
|
|
303
|
+
updates
|
|
304
|
+
)
|
|
305
|
+
)
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
const landlordTenantIssueRadio = (scope, vertical, updates = {}) => {
|
|
309
|
+
const func = vertical ? col2RadioCenter : col2Radio;
|
|
310
|
+
const label = vertical ? updates.label : "What is the Landlord / Tenant Issue?";
|
|
311
|
+
const _if = vertical ? updates.if : '$get(Type_Of_Legal_Problem).value == "Landlord and Tenant"';
|
|
312
|
+
return func(
|
|
313
|
+
merge(
|
|
314
|
+
{
|
|
315
|
+
label,
|
|
316
|
+
if: _if,
|
|
317
|
+
id: scope ? scope + ":" + "Landlord_Tenant_Issue" : "Landlord_Tenant_Issue",
|
|
318
|
+
name: scope ? scope + ":" + "Landlord_Tenant_Issue" : "Landlord_Tenant_Issue",
|
|
319
|
+
options: [
|
|
320
|
+
"Eviction",
|
|
321
|
+
"Repairs and Maintenance",
|
|
322
|
+
"Lease and Rental Agreements",
|
|
323
|
+
"Discrimination",
|
|
324
|
+
"Right of Entry and Privacy",
|
|
325
|
+
"Screening and Applications",
|
|
326
|
+
"Environmental Hazards",
|
|
327
|
+
"Other Dispute",
|
|
328
|
+
],
|
|
329
|
+
},
|
|
330
|
+
updates
|
|
331
|
+
)
|
|
332
|
+
)
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
const realEstateTOLPDisplay = (scope, vertical, updates = {}) => {
|
|
336
|
+
const func = vertical ? col2RadioCenter : col2Radio;
|
|
337
|
+
const label = vertical ? updates.label : "Select The Real Estate Issue:";
|
|
338
|
+
const _if = vertical ? updates.if : '$get(Type_Of_Legal_Problem).value == "Real Estate"';
|
|
339
|
+
return func(
|
|
340
|
+
merge(
|
|
341
|
+
{
|
|
342
|
+
label,
|
|
343
|
+
if: _if,
|
|
344
|
+
name: scope ? scope + ":" + "Type_Of_Legal_Problem_Display" : "Type_Of_Legal_Problem_Display",
|
|
345
|
+
options: [
|
|
346
|
+
"Contracts and Agreements",
|
|
347
|
+
"Deeds, Liens, and Titles",
|
|
348
|
+
"Foreclosure",
|
|
349
|
+
"Insurance",
|
|
350
|
+
"Landlord and Tenant",
|
|
351
|
+
"Loans and Mortgages",
|
|
352
|
+
"Wills, Trusts, and Estates",
|
|
353
|
+
"Property Damage",
|
|
354
|
+
"Not Sure or Other",
|
|
355
|
+
],
|
|
356
|
+
},
|
|
357
|
+
updates
|
|
358
|
+
)
|
|
359
|
+
)
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
const criminalTOLPDisplay = (scope, vertical, updates = {}) => {
|
|
363
|
+
const func = vertical ? col2RadioCenter : col2Radio;
|
|
364
|
+
const label = vertical ? updates.label : "Select The Criminal Issue:";
|
|
365
|
+
const _if = vertical ? updates.if : '$get(Type_Of_Legal_Problem).value == "Criminal and Felony"';
|
|
366
|
+
return func(
|
|
367
|
+
merge(
|
|
368
|
+
{
|
|
369
|
+
label,
|
|
370
|
+
if: _if,
|
|
371
|
+
name: scope ? scope + ":" + "Type_Of_Legal_Problem_Display" : "Type_Of_Legal_Problem_Display",
|
|
372
|
+
options: [
|
|
373
|
+
"Criminal Defense",
|
|
374
|
+
"Victim of a Crime",
|
|
375
|
+
"DUI and DWI",
|
|
376
|
+
"Expungement",
|
|
377
|
+
"Harassment",
|
|
378
|
+
"Not Sure or Other",
|
|
379
|
+
],
|
|
380
|
+
},
|
|
381
|
+
updates
|
|
382
|
+
)
|
|
383
|
+
)
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
|
|
387
|
+
const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
|
|
242
388
|
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
label: 'Select The Type of Real Estate Issue:',
|
|
247
|
-
options: [
|
|
248
|
-
'Contracts and Agreements',
|
|
249
|
-
'Deeds, Liens, and Titles',
|
|
250
|
-
'Foreclosure',
|
|
251
|
-
'Insurance',
|
|
252
|
-
'Landlord and Tenant',
|
|
253
|
-
'Loans and Mortgages',
|
|
254
|
-
'Wills, Trusts, and Estates',
|
|
255
|
-
'Property Damage',
|
|
256
|
-
'Not Sure or Other'
|
|
257
|
-
]
|
|
258
|
-
}, updates));
|
|
259
|
-
|
|
260
|
-
const criminalTOLPDisplay = (updates) => col2Radio(merge({
|
|
261
|
-
name: 'Type_Of_Legal_Problem_Display',
|
|
262
|
-
if: '$get(Type_Of_Legal_Problem).value == "Criminal and Felony"',
|
|
263
|
-
label: 'Which Type of Criminal Issue?',
|
|
264
|
-
options: [
|
|
265
|
-
'Criminal Defense',
|
|
266
|
-
'Victim of a Crime',
|
|
267
|
-
'DUI and DWI',
|
|
268
|
-
'Expungement',
|
|
269
|
-
'Harassment',
|
|
270
|
-
'Not Sure or Other',
|
|
271
|
-
]
|
|
272
|
-
}, updates));
|
|
273
|
-
|
|
274
|
-
const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
|
|
275
|
-
const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
|
|
276
|
-
|
|
277
|
-
const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
|
|
389
|
+
const isInput = (n) => {
|
|
390
|
+
return n.type !== "group" && n.type !== "section" && n.type !== "form" && n.$formkit !== "hidden" && !n.children
|
|
391
|
+
};
|
|
278
392
|
|
|
279
393
|
const findLastInput = (n) => {
|
|
280
394
|
if (isInput(n)) {
|
|
281
395
|
return n
|
|
282
396
|
}
|
|
283
397
|
for (var i = n.children.length - 1; i >= 0; i--) {
|
|
284
|
-
if (typeof n.children ===
|
|
398
|
+
if (typeof n.children === "string") {
|
|
285
399
|
continue
|
|
286
400
|
}
|
|
287
401
|
const child = n.children[i];
|
|
@@ -297,12 +411,12 @@ const findLastInput = (n) => {
|
|
|
297
411
|
};
|
|
298
412
|
|
|
299
413
|
const stepDefaults = (step, stepKey) => ({
|
|
300
|
-
$el:
|
|
414
|
+
$el: "section",
|
|
301
415
|
if: '$stepEnabled("' + step + '")',
|
|
302
416
|
attrs: {
|
|
303
417
|
hidden: '$activeStep !== "' + step + '"',
|
|
304
|
-
key: stepKey ? stepKey : step
|
|
305
|
-
}
|
|
418
|
+
key: stepKey ? stepKey : step,
|
|
419
|
+
},
|
|
306
420
|
});
|
|
307
421
|
|
|
308
422
|
function step(name, inputs, updates = {}) {
|
|
@@ -325,27 +439,24 @@ function step(name, inputs, updates = {}) {
|
|
|
325
439
|
}
|
|
326
440
|
}
|
|
327
441
|
|
|
328
|
-
return merge(
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
]
|
|
342
|
-
}
|
|
343
|
-
)
|
|
442
|
+
return merge(stepDefaults(name, stepKey), {
|
|
443
|
+
children: [
|
|
444
|
+
{
|
|
445
|
+
$formkit: "group",
|
|
446
|
+
id: name,
|
|
447
|
+
name: name,
|
|
448
|
+
nextStepMap: nextStepMap,
|
|
449
|
+
triggerRedirectMap: triggerRedirectMap,
|
|
450
|
+
autoFocus: autoFocus,
|
|
451
|
+
children: inputs,
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
})
|
|
344
455
|
}
|
|
345
456
|
|
|
346
457
|
function generalLegalTOLPAndZip(updates = {}) {
|
|
347
458
|
return step(
|
|
348
|
-
|
|
459
|
+
"generalLegalTOLPAndZip",
|
|
349
460
|
[
|
|
350
461
|
generalTOLP(),
|
|
351
462
|
civilDefense(),
|
|
@@ -354,7 +465,7 @@ function generalLegalTOLPAndZip(updates = {}) {
|
|
|
354
465
|
employmentAndWorkplaceTOLPDisplay(),
|
|
355
466
|
landlordTenantIssueRadio(),
|
|
356
467
|
realEstateTOLPDisplay(),
|
|
357
|
-
zipcode()
|
|
468
|
+
zipcode(),
|
|
358
469
|
],
|
|
359
470
|
updates
|
|
360
471
|
)
|
|
@@ -362,87 +473,87 @@ function generalLegalTOLPAndZip(updates = {}) {
|
|
|
362
473
|
|
|
363
474
|
function formNavigationOnlySubmit(updates = {}) {
|
|
364
475
|
return {
|
|
365
|
-
$el:
|
|
476
|
+
$el: "div",
|
|
366
477
|
attrs: {
|
|
367
|
-
class:
|
|
478
|
+
class: "step-nav",
|
|
368
479
|
},
|
|
369
480
|
children: [
|
|
370
481
|
{
|
|
371
|
-
$formkit:
|
|
372
|
-
name:
|
|
373
|
-
children:
|
|
482
|
+
$formkit: "button",
|
|
483
|
+
name: "hidden_button",
|
|
484
|
+
children: "Hidden",
|
|
374
485
|
style: {
|
|
375
|
-
if:
|
|
376
|
-
then:
|
|
377
|
-
}
|
|
486
|
+
if: "$activeStep === $firstStep()",
|
|
487
|
+
then: "visibility: hidden;",
|
|
488
|
+
},
|
|
378
489
|
},
|
|
379
490
|
{
|
|
380
|
-
$formkit:
|
|
381
|
-
name:
|
|
382
|
-
label: updates.submitLabel ||
|
|
383
|
-
}
|
|
384
|
-
]
|
|
491
|
+
$formkit: "submit",
|
|
492
|
+
name: "submit_button",
|
|
493
|
+
label: updates.submitLabel || "Chat Now",
|
|
494
|
+
},
|
|
495
|
+
],
|
|
385
496
|
}
|
|
386
497
|
}
|
|
387
498
|
|
|
388
499
|
const formDetails = () => ({
|
|
389
|
-
$el:
|
|
500
|
+
$el: "pre",
|
|
390
501
|
if: '$urlParam("fdbg", "") == 1',
|
|
391
502
|
children: [
|
|
392
503
|
{
|
|
393
|
-
$el:
|
|
394
|
-
children:
|
|
504
|
+
$el: "pre",
|
|
505
|
+
children: "$stringify( $get(form).value )",
|
|
395
506
|
attrs: {
|
|
396
|
-
class:
|
|
397
|
-
style:
|
|
398
|
-
}
|
|
507
|
+
class: "t-text-xs",
|
|
508
|
+
style: "overflow: scroll",
|
|
509
|
+
},
|
|
399
510
|
},
|
|
400
511
|
{
|
|
401
|
-
$el:
|
|
402
|
-
children: [
|
|
512
|
+
$el: "pre",
|
|
513
|
+
children: ["activeStep: ", "$activeStep"],
|
|
403
514
|
attrs: {
|
|
404
|
-
class:
|
|
405
|
-
style:
|
|
406
|
-
}
|
|
515
|
+
class: "t-text-xs",
|
|
516
|
+
style: "overflow: scroll",
|
|
517
|
+
},
|
|
407
518
|
},
|
|
408
519
|
{
|
|
409
|
-
$el:
|
|
410
|
-
children: [
|
|
520
|
+
$el: "pre",
|
|
521
|
+
children: ["stepHistory: ", "$stepHistory"],
|
|
411
522
|
attrs: {
|
|
412
|
-
class:
|
|
413
|
-
style:
|
|
414
|
-
}
|
|
523
|
+
class: "t-text-xs",
|
|
524
|
+
style: "overflow: scroll",
|
|
525
|
+
},
|
|
415
526
|
},
|
|
416
527
|
{
|
|
417
|
-
$el:
|
|
418
|
-
children: [
|
|
528
|
+
$el: "pre",
|
|
529
|
+
children: ["stepQueue: ", "$stepQueue"],
|
|
419
530
|
attrs: {
|
|
420
|
-
class:
|
|
421
|
-
style:
|
|
422
|
-
}
|
|
531
|
+
class: "t-text-xs",
|
|
532
|
+
style: "overflow: scroll",
|
|
533
|
+
},
|
|
423
534
|
},
|
|
424
535
|
{
|
|
425
|
-
$el:
|
|
426
|
-
children: [
|
|
536
|
+
$el: "pre",
|
|
537
|
+
children: ["steps: ", "$stepKeys()"],
|
|
427
538
|
attrs: {
|
|
428
|
-
class:
|
|
429
|
-
style:
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
]
|
|
539
|
+
class: "t-text-xs",
|
|
540
|
+
style: "overflow: scroll",
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
],
|
|
433
544
|
});
|
|
434
545
|
|
|
435
546
|
const formPropDefaults = {
|
|
436
|
-
type:
|
|
437
|
-
id:
|
|
438
|
-
config: { validationVisibility:
|
|
547
|
+
type: "form",
|
|
548
|
+
id: "form",
|
|
549
|
+
config: { validationVisibility: "submit" },
|
|
439
550
|
onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
|
|
440
|
-
plugins:
|
|
551
|
+
plugins: "$plugins",
|
|
441
552
|
actions: false,
|
|
442
|
-
anchorElement:
|
|
553
|
+
anchorElement: "form-anchor",
|
|
443
554
|
useLocalStorage: true,
|
|
444
555
|
prepop: {
|
|
445
|
-
fromURL: true
|
|
556
|
+
fromURL: true,
|
|
446
557
|
},
|
|
447
558
|
errorCodes: {
|
|
448
559
|
403: { message: "An Error Occurred", abort: false },
|
|
@@ -450,7 +561,7 @@ const formPropDefaults = {
|
|
|
450
561
|
429: "An Error Occurred",
|
|
451
562
|
504: { message: "An Error Occurred", abort: false },
|
|
452
563
|
},
|
|
453
|
-
formClass:
|
|
564
|
+
formClass: "!t-max-w-[40rem]",
|
|
454
565
|
};
|
|
455
566
|
|
|
456
567
|
// export function filteredNextStepsMapLegal(keyList) {
|
|
@@ -460,10 +571,7 @@ const formPropDefaults = {
|
|
|
460
571
|
// }
|
|
461
572
|
|
|
462
573
|
function formProps(updates) {
|
|
463
|
-
const props = merge(
|
|
464
|
-
formPropDefaults,
|
|
465
|
-
updates
|
|
466
|
-
);
|
|
574
|
+
const props = merge(formPropDefaults, updates);
|
|
467
575
|
if (props.formId && !props.name) {
|
|
468
576
|
props.name = props.formId;
|
|
469
577
|
}
|
|
@@ -471,76 +579,73 @@ function formProps(updates) {
|
|
|
471
579
|
}
|
|
472
580
|
|
|
473
581
|
const formAnchorDefaults = {
|
|
474
|
-
$el:
|
|
582
|
+
$el: "div",
|
|
475
583
|
children: [
|
|
476
584
|
{
|
|
477
|
-
$el:
|
|
585
|
+
$el: "div",
|
|
478
586
|
attrs: {
|
|
479
|
-
id:
|
|
480
|
-
class:
|
|
481
|
-
style: { top:
|
|
482
|
-
}
|
|
483
|
-
}
|
|
587
|
+
id: "form-anchor",
|
|
588
|
+
class: "t-absolute",
|
|
589
|
+
style: { top: "-30px", left: 0 },
|
|
590
|
+
},
|
|
591
|
+
},
|
|
484
592
|
],
|
|
485
593
|
attrs: {
|
|
486
|
-
class:
|
|
487
|
-
}
|
|
594
|
+
class: "t-relative",
|
|
595
|
+
},
|
|
488
596
|
};
|
|
489
597
|
|
|
490
598
|
function formAnchor(updates) {
|
|
491
|
-
return merge(
|
|
492
|
-
formAnchorDefaults,
|
|
493
|
-
updates
|
|
494
|
-
)
|
|
599
|
+
return merge(formAnchorDefaults, updates)
|
|
495
600
|
}
|
|
496
601
|
|
|
497
602
|
function headlineDefaults(updates = {}) {
|
|
498
603
|
return {
|
|
499
|
-
$el:
|
|
604
|
+
$el: "h1",
|
|
500
605
|
attrs: {
|
|
501
|
-
class:
|
|
502
|
-
|
|
606
|
+
class:
|
|
607
|
+
"t-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3" +
|
|
608
|
+
" " +
|
|
609
|
+
(updates.headlineClass || ""),
|
|
610
|
+
},
|
|
503
611
|
}
|
|
504
612
|
}
|
|
505
613
|
|
|
506
614
|
function headline(updates = {}) {
|
|
507
|
-
return merge(
|
|
508
|
-
headlineDefaults(updates),
|
|
509
|
-
updates
|
|
510
|
-
)
|
|
615
|
+
return merge(headlineDefaults(updates), updates)
|
|
511
616
|
}
|
|
512
617
|
|
|
513
618
|
const hiddenInputsBase = [
|
|
514
619
|
{
|
|
515
|
-
$formkit:
|
|
620
|
+
$formkit: "hidden",
|
|
516
621
|
name: "gclid",
|
|
517
|
-
value: null
|
|
622
|
+
value: null,
|
|
518
623
|
},
|
|
519
624
|
{
|
|
520
|
-
$formkit:
|
|
625
|
+
$formkit: "hidden",
|
|
521
626
|
name: "campaignid",
|
|
522
|
-
value: null
|
|
627
|
+
value: null,
|
|
523
628
|
},
|
|
524
629
|
{
|
|
525
|
-
$formkit:
|
|
630
|
+
$formkit: "hidden",
|
|
526
631
|
name: "s",
|
|
527
|
-
value: null
|
|
528
|
-
}
|
|
632
|
+
value: null,
|
|
633
|
+
},
|
|
529
634
|
];
|
|
530
635
|
|
|
531
636
|
const hiddenInputsMechanics = [
|
|
532
637
|
{
|
|
533
|
-
$formkit:
|
|
638
|
+
$formkit: "hidden",
|
|
534
639
|
name: "vertical",
|
|
535
|
-
value: "AutoRepair"
|
|
640
|
+
value: "AutoRepair",
|
|
536
641
|
},
|
|
537
642
|
{
|
|
538
|
-
$formkit:
|
|
643
|
+
$formkit: "hidden",
|
|
539
644
|
name: "Category",
|
|
540
645
|
id: "Category",
|
|
541
|
-
value: "Mechanics"
|
|
646
|
+
value: "Mechanics",
|
|
542
647
|
},
|
|
543
|
-
...hiddenInputsBase
|
|
648
|
+
...hiddenInputsBase,
|
|
544
649
|
];
|
|
545
650
|
|
|
546
651
|
const schema = [
|