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