@zengenti/contensis-react-base 3.0.2-beta.0 → 3.0.2-beta.10
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/cjs/{App-ee485b92.js → App-81a45001.js} +111 -427
- package/cjs/App-81a45001.js.map +1 -0
- package/cjs/ContensisDeliveryApi-de88df2a.js +231 -0
- package/cjs/ContensisDeliveryApi-de88df2a.js.map +1 -0
- package/cjs/{RouteLoader-3aa6456e.js → RouteLoader-47d70a26.js} +23 -37
- package/{esm/RouteLoader-5171c63f.js.map → cjs/RouteLoader-47d70a26.js.map} +1 -1
- package/cjs/{ToJs-a9a8522b.js → ToJs-61c03582.js} +3 -4
- package/cjs/{ToJs-a9a8522b.js.map → ToJs-61c03582.js.map} +1 -1
- package/cjs/client.js +20 -27
- package/cjs/client.js.map +1 -1
- package/cjs/contensis-react-base.js +124 -188
- package/cjs/contensis-react-base.js.map +1 -1
- package/cjs/forms.js +430 -545
- package/cjs/forms.js.map +1 -1
- package/cjs/{fromJSLeaveImmer-e74c673c.js → fromJSLeaveImmer-7c363211.js} +1 -4
- package/cjs/{fromJSLeaveImmer-e74c673c.js.map → fromJSLeaveImmer-7c363211.js.map} +1 -1
- package/cjs/{login-840860bc.js → login-51b66359.js} +64 -113
- package/cjs/login-51b66359.js.map +1 -0
- package/cjs/{reducers-3a4f8971.js → reducers-9afb5f89.js} +14 -31
- package/cjs/reducers-9afb5f89.js.map +1 -0
- package/cjs/redux.js +17 -17
- package/cjs/redux.js.map +1 -1
- package/cjs/routing.js +6 -7
- package/cjs/routing.js.map +1 -1
- package/cjs/{sagas-7c19ce8e.js → sagas-6d12e7ca.js} +224 -283
- package/cjs/sagas-6d12e7ca.js.map +1 -0
- package/cjs/search.js +74 -82
- package/cjs/search.js.map +1 -1
- package/cjs/{selectors-656da4b7.js → selectors-c76c2676.js} +84 -7
- package/cjs/selectors-c76c2676.js.map +1 -0
- package/cjs/urls-6fcaf4c6.js.map +1 -1
- package/cjs/user.js +4 -13
- package/cjs/user.js.map +1 -1
- package/cjs/util.js +45 -53
- package/cjs/util.js.map +1 -1
- package/cjs/{version-78dfc3bd.js → version-38afaf2a.js} +45 -158
- package/cjs/version-38afaf2a.js.map +1 -0
- package/cjs/version-886f49d8.js +98 -0
- package/cjs/version-886f49d8.js.map +1 -0
- package/esm/{App-640239d2.js → App-5f914483.js} +93 -407
- package/esm/App-5f914483.js.map +1 -0
- package/esm/ContensisDeliveryApi-ad06857d.js +227 -0
- package/esm/ContensisDeliveryApi-ad06857d.js.map +1 -0
- package/esm/{RouteLoader-5171c63f.js → RouteLoader-f5d5f733.js} +22 -36
- package/{cjs/RouteLoader-3aa6456e.js.map → esm/RouteLoader-f5d5f733.js.map} +1 -1
- package/esm/{ToJs-4e02a04d.js → ToJs-0066e629.js} +3 -4
- package/esm/{ToJs-4e02a04d.js.map → ToJs-0066e629.js.map} +1 -1
- package/esm/client.js +15 -22
- package/esm/client.js.map +1 -1
- package/esm/contensis-react-base.js +119 -183
- package/esm/contensis-react-base.js.map +1 -1
- package/esm/forms.js +432 -547
- package/esm/forms.js.map +1 -1
- package/esm/{fromJSLeaveImmer-0114ffcf.js → fromJSLeaveImmer-e2dacd63.js} +1 -4
- package/esm/{fromJSLeaveImmer-0114ffcf.js.map → fromJSLeaveImmer-e2dacd63.js.map} +1 -1
- package/esm/{login-57395c9c.js → login-4d07c2de.js} +63 -112
- package/esm/login-4d07c2de.js.map +1 -0
- package/esm/{reducers-8e5d6232.js → reducers-3d5c37d1.js} +14 -31
- package/esm/reducers-3d5c37d1.js.map +1 -0
- package/esm/redux.js +9 -8
- package/esm/redux.js.map +1 -1
- package/esm/routing.js +3 -4
- package/esm/routing.js.map +1 -1
- package/esm/{sagas-8d8945e6.js → sagas-53d2aefb.js} +176 -238
- package/esm/sagas-53d2aefb.js.map +1 -0
- package/esm/search.js +75 -83
- package/esm/search.js.map +1 -1
- package/esm/{selectors-a5e5835b.js → selectors-3f0d804d.js} +70 -7
- package/esm/selectors-3f0d804d.js.map +1 -0
- package/esm/urls-eac9a747.js.map +1 -1
- package/esm/user.js +6 -15
- package/esm/user.js.map +1 -1
- package/esm/util.js +42 -53
- package/esm/util.js.map +1 -1
- package/esm/{version-e3a5ec66.js → version-dd31c7f0.js} +32 -141
- package/esm/version-dd31c7f0.js.map +1 -0
- package/esm/version-f4629693.js +87 -0
- package/esm/version-f4629693.js.map +1 -0
- package/models/forms/index.d.ts +1 -3
- package/models/search/models/Search.d.ts +2 -1
- package/models/search/models/SearchActions.d.ts +5 -0
- package/models/search/models/SearchProps.d.ts +4 -1
- package/models/search/models/SearchState.d.ts +1 -0
- package/models/search/redux/actions.d.ts +5 -0
- package/models/search/redux/reducers.d.ts +3 -0
- package/models/search/redux/selectors.d.ts +1 -0
- package/models/search/redux/types.d.ts +1 -0
- package/models/util/ContensisDeliveryApi.d.ts +6 -0
- package/models/util/index.d.ts +1 -0
- package/package.json +1 -1
- package/cjs/App-ee485b92.js.map +0 -1
- package/cjs/actions-8dc9e8de.js +0 -87
- package/cjs/actions-8dc9e8de.js.map +0 -1
- package/cjs/login-840860bc.js.map +0 -1
- package/cjs/reducers-3a4f8971.js.map +0 -1
- package/cjs/sagas-7c19ce8e.js.map +0 -1
- package/cjs/selectors-656da4b7.js.map +0 -1
- package/cjs/version-78dfc3bd.js.map +0 -1
- package/cjs/version-eba6d09b.js +0 -20
- package/cjs/version-eba6d09b.js.map +0 -1
- package/esm/App-640239d2.js.map +0 -1
- package/esm/actions-180948dd.js +0 -72
- package/esm/actions-180948dd.js.map +0 -1
- package/esm/login-57395c9c.js.map +0 -1
- package/esm/reducers-8e5d6232.js.map +0 -1
- package/esm/sagas-8d8945e6.js.map +0 -1
- package/esm/selectors-a5e5835b.js.map +0 -1
- package/esm/version-2485e2fb.js +0 -15
- package/esm/version-2485e2fb.js.map +0 -1
- package/esm/version-e3a5ec66.js.map +0 -1
package/cjs/forms.js
CHANGED
|
@@ -47,8 +47,13 @@ const initialStatus = {
|
|
|
47
47
|
isLoading: true,
|
|
48
48
|
isSubmitting: false,
|
|
49
49
|
hasSuccess: false,
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
hasError: false,
|
|
51
|
+
messages: {
|
|
52
|
+
success: null
|
|
53
|
+
},
|
|
54
|
+
validation: {
|
|
55
|
+
sent: false
|
|
56
|
+
}
|
|
52
57
|
};
|
|
53
58
|
const initialPagingInfo = {
|
|
54
59
|
pageIndex: 0,
|
|
@@ -80,7 +85,6 @@ var reducer = immer.produce((state, action) => {
|
|
|
80
85
|
state[formId] = initialFormData;
|
|
81
86
|
return;
|
|
82
87
|
}
|
|
83
|
-
|
|
84
88
|
case SET_FORM_DATA:
|
|
85
89
|
{
|
|
86
90
|
const {
|
|
@@ -101,7 +105,6 @@ var reducer = immer.produce((state, action) => {
|
|
|
101
105
|
state[formId].settings = settings;
|
|
102
106
|
return;
|
|
103
107
|
}
|
|
104
|
-
|
|
105
108
|
case SET_CURRENT_PAGE:
|
|
106
109
|
{
|
|
107
110
|
const {
|
|
@@ -115,7 +118,6 @@ var reducer = immer.produce((state, action) => {
|
|
|
115
118
|
state[formId].pagingInfo.pageCount = pageCount;
|
|
116
119
|
return;
|
|
117
120
|
}
|
|
118
|
-
|
|
119
121
|
case SET_FIELD_VALUE:
|
|
120
122
|
{
|
|
121
123
|
const {
|
|
@@ -126,17 +128,18 @@ var reducer = immer.produce((state, action) => {
|
|
|
126
128
|
state[formId].data[id] = value;
|
|
127
129
|
return;
|
|
128
130
|
}
|
|
129
|
-
|
|
130
131
|
case SET_DEFAULT_FIELD_VALUE:
|
|
131
132
|
{
|
|
132
133
|
const {
|
|
133
134
|
formId,
|
|
134
135
|
value
|
|
135
136
|
} = action || {};
|
|
136
|
-
state[formId].data =
|
|
137
|
+
state[formId].data = {
|
|
138
|
+
...state[formId].data,
|
|
139
|
+
...value
|
|
140
|
+
};
|
|
137
141
|
return;
|
|
138
142
|
}
|
|
139
|
-
|
|
140
143
|
case SET_CHECKBOX_VALUE:
|
|
141
144
|
{
|
|
142
145
|
const {
|
|
@@ -146,12 +149,12 @@ var reducer = immer.produce((state, action) => {
|
|
|
146
149
|
isChecked
|
|
147
150
|
} = action || {};
|
|
148
151
|
let values = state[formId].data[id] || [];
|
|
149
|
-
if (isChecked) state[formId].data[id] = {
|
|
152
|
+
if (isChecked) state[formId].data[id] = {
|
|
153
|
+
...values,
|
|
150
154
|
value
|
|
151
155
|
};else state[formId].data[id] = values.filter(v => v !== value);
|
|
152
156
|
return;
|
|
153
157
|
}
|
|
154
|
-
|
|
155
158
|
case SET_DATE_RANGE_VALUES:
|
|
156
159
|
{
|
|
157
160
|
const {
|
|
@@ -163,7 +166,6 @@ var reducer = immer.produce((state, action) => {
|
|
|
163
166
|
state[formId].data[id][dateType] = value;
|
|
164
167
|
return;
|
|
165
168
|
}
|
|
166
|
-
|
|
167
169
|
case SET_FIELD_ERROR:
|
|
168
170
|
{
|
|
169
171
|
const {
|
|
@@ -173,7 +175,6 @@ var reducer = immer.produce((state, action) => {
|
|
|
173
175
|
state[formId].fieldErrors = value;
|
|
174
176
|
return;
|
|
175
177
|
}
|
|
176
|
-
|
|
177
178
|
case SET_SUBMITTING_FORM:
|
|
178
179
|
{
|
|
179
180
|
const {
|
|
@@ -183,7 +184,6 @@ var reducer = immer.produce((state, action) => {
|
|
|
183
184
|
state[formId].status.isSubmitting = isSubmitting;
|
|
184
185
|
return;
|
|
185
186
|
}
|
|
186
|
-
|
|
187
187
|
case SUBMIT_FORM_SUCCESS:
|
|
188
188
|
{
|
|
189
189
|
const {
|
|
@@ -192,19 +192,29 @@ var reducer = immer.produce((state, action) => {
|
|
|
192
192
|
state[formId].status.hasError = false;
|
|
193
193
|
state[formId].status.isSubmitting = false;
|
|
194
194
|
state[formId].status.hasSuccess = true;
|
|
195
|
+
state[formId].status.validation.sent = false;
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
case SUBMIT_FORM_FOR_VALIDATION:
|
|
199
|
+
{
|
|
200
|
+
const {
|
|
201
|
+
formId
|
|
202
|
+
} = action || {};
|
|
203
|
+
state[formId].status.validation.sent = true;
|
|
204
|
+
state[formId].status.isSubmitting = false;
|
|
205
|
+
state[formId].status.hasSuccess = false;
|
|
206
|
+
state[formId].status.hasError = false;
|
|
195
207
|
return;
|
|
196
208
|
}
|
|
197
|
-
|
|
198
209
|
case SET_SUCCESS_MESSAGE:
|
|
199
210
|
{
|
|
200
211
|
const {
|
|
201
212
|
formId,
|
|
202
213
|
message
|
|
203
214
|
} = action || {};
|
|
204
|
-
state[formId].status.
|
|
215
|
+
state[formId].status.message.success = message;
|
|
205
216
|
return;
|
|
206
217
|
}
|
|
207
|
-
|
|
208
218
|
case SUBMIT_FORM_ERROR:
|
|
209
219
|
{
|
|
210
220
|
const {
|
|
@@ -212,9 +222,9 @@ var reducer = immer.produce((state, action) => {
|
|
|
212
222
|
} = action || {};
|
|
213
223
|
state[formId].status.hasError = true;
|
|
214
224
|
state[formId].status.isSubmitting = false;
|
|
225
|
+
state[formId].status.validation.sent = false;
|
|
215
226
|
return;
|
|
216
227
|
}
|
|
217
|
-
|
|
218
228
|
case SET_FORM_ENTRIES:
|
|
219
229
|
{
|
|
220
230
|
const {
|
|
@@ -230,7 +240,6 @@ var reducer = immer.produce((state, action) => {
|
|
|
230
240
|
state[formId].entries = entryObject;
|
|
231
241
|
return;
|
|
232
242
|
}
|
|
233
|
-
|
|
234
243
|
case SET_ERROR:
|
|
235
244
|
{
|
|
236
245
|
const {
|
|
@@ -240,89 +249,79 @@ var reducer = immer.produce((state, action) => {
|
|
|
240
249
|
state[formId].status.isSubmitting = false;
|
|
241
250
|
return;
|
|
242
251
|
}
|
|
243
|
-
|
|
244
252
|
default:
|
|
245
253
|
return state;
|
|
246
254
|
}
|
|
247
255
|
}, initialState);
|
|
248
256
|
|
|
249
257
|
const selectForms = state => state.forms;
|
|
250
|
-
const makeSelectPagedFields = formId => reselect.createSelector(
|
|
251
|
-
if (
|
|
252
|
-
|
|
253
|
-
const
|
|
258
|
+
const makeSelectPagedFields = formId => reselect.createSelector(selectForms, forms => {
|
|
259
|
+
if (forms !== null && forms !== void 0 && forms[formId]) {
|
|
260
|
+
var _forms$formId, _forms$formId2;
|
|
261
|
+
const pagingInfo = forms === null || forms === void 0 ? void 0 : (_forms$formId = forms[formId]) === null || _forms$formId === void 0 ? void 0 : _forms$formId.pagingInfo;
|
|
262
|
+
const fields = forms === null || forms === void 0 ? void 0 : (_forms$formId2 = forms[formId]) === null || _forms$formId2 === void 0 ? void 0 : _forms$formId2.fields;
|
|
254
263
|
if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0 && pagingInfo.pageCount > 1) return fields.filter(f => f.groupId == pagingInfo.currentPageId);else return fields;
|
|
255
264
|
}
|
|
256
265
|
});
|
|
257
|
-
const makeSelectFormStatus = formId => reselect.createSelector(selectForms,
|
|
258
|
-
var
|
|
259
|
-
|
|
260
|
-
return (_form$formId = form[formId]) === null || _form$formId === void 0 ? void 0 : _form$formId.status;
|
|
266
|
+
const makeSelectFormStatus = formId => reselect.createSelector(selectForms, forms => {
|
|
267
|
+
var _forms$formId3;
|
|
268
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId3 = forms[formId]) === null || _forms$formId3 === void 0 ? void 0 : _forms$formId3.status;
|
|
261
269
|
});
|
|
262
|
-
const makeSelectPagingInfo = formId => reselect.createSelector(selectForms,
|
|
263
|
-
var
|
|
264
|
-
|
|
265
|
-
return (_form$formId2 = form[formId]) === null || _form$formId2 === void 0 ? void 0 : _form$formId2.pagingInfo;
|
|
270
|
+
const makeSelectPagingInfo = formId => reselect.createSelector(selectForms, forms => {
|
|
271
|
+
var _forms$formId4;
|
|
272
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId4 = forms[formId]) === null || _forms$formId4 === void 0 ? void 0 : _forms$formId4.pagingInfo;
|
|
266
273
|
});
|
|
267
|
-
const makeSelectFormSettings = formId => reselect.createSelector(selectForms,
|
|
268
|
-
var
|
|
269
|
-
|
|
270
|
-
return (_form$formId3 = form[formId]) === null || _form$formId3 === void 0 ? void 0 : _form$formId3.settings;
|
|
274
|
+
const makeSelectFormSettings = formId => reselect.createSelector(selectForms, forms => {
|
|
275
|
+
var _forms$formId5;
|
|
276
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId5 = forms[formId]) === null || _forms$formId5 === void 0 ? void 0 : _forms$formId5.settings;
|
|
271
277
|
});
|
|
272
|
-
const makeSelectFormFieldErrors = formId => reselect.createSelector(selectForms,
|
|
273
|
-
var
|
|
274
|
-
|
|
275
|
-
return (_form$formId4 = form[formId]) === null || _form$formId4 === void 0 ? void 0 : _form$formId4.fieldErrors;
|
|
278
|
+
const makeSelectFormFieldErrors = formId => reselect.createSelector(selectForms, forms => {
|
|
279
|
+
var _forms$formId6;
|
|
280
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId6 = forms[formId]) === null || _forms$formId6 === void 0 ? void 0 : _forms$formId6.fieldErrors;
|
|
276
281
|
});
|
|
277
|
-
const makeSelectFormEntries = formId => reselect.createSelector(selectForms,
|
|
278
|
-
var
|
|
279
|
-
|
|
280
|
-
return (_form$formId5 = form[formId]) === null || _form$formId5 === void 0 ? void 0 : _form$formId5.entries;
|
|
282
|
+
const makeSelectFormEntries = formId => reselect.createSelector(selectForms, forms => {
|
|
283
|
+
var _forms$formId7;
|
|
284
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId7 = forms[formId]) === null || _forms$formId7 === void 0 ? void 0 : _forms$formId7.entries;
|
|
281
285
|
});
|
|
282
|
-
const makeSelectFormPostData = formId => reselect.createSelector(selectForms,
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
return (_form$formId6 = form[formId]) === null || _form$formId6 === void 0 ? void 0 : _form$formId6.data;
|
|
286
|
+
const makeSelectFormPostData = formId => reselect.createSelector(selectForms, forms => {
|
|
287
|
+
var _forms$formId8;
|
|
288
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId8 = forms[formId]) === null || _forms$formId8 === void 0 ? void 0 : _forms$formId8.data;
|
|
286
289
|
});
|
|
287
290
|
const makeSelectIsLoading = formId => reselect.createSelector(selectForms, forms => {
|
|
288
|
-
var _forms$
|
|
289
|
-
|
|
290
|
-
return (_forms$formId = forms[formId]) === null || _forms$formId === void 0 ? void 0 : _forms$formId.status.isLoading;
|
|
291
|
+
var _forms$formId9;
|
|
292
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId9 = forms[formId]) === null || _forms$formId9 === void 0 ? void 0 : _forms$formId9.status.isLoading;
|
|
291
293
|
});
|
|
292
294
|
const makeSelectIsSubmitting = formId => reselect.createSelector(selectForms, forms => {
|
|
293
|
-
var _forms$
|
|
294
|
-
|
|
295
|
-
return (_forms$formId2 = forms[formId]) === null || _forms$formId2 === void 0 ? void 0 : _forms$formId2.status.isSubmitting;
|
|
295
|
+
var _forms$formId10;
|
|
296
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId10 = forms[formId]) === null || _forms$formId10 === void 0 ? void 0 : _forms$formId10.status.isSubmitting;
|
|
296
297
|
});
|
|
297
298
|
const makeSelectHasSuccess = formId => reselect.createSelector(selectForms, forms => {
|
|
298
|
-
var _forms$
|
|
299
|
-
|
|
300
|
-
return (_forms$formId3 = forms[formId]) === null || _forms$formId3 === void 0 ? void 0 : _forms$formId3.status.hasSuccess;
|
|
299
|
+
var _forms$formId11;
|
|
300
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId11 = forms[formId]) === null || _forms$formId11 === void 0 ? void 0 : _forms$formId11.status.hasSuccess;
|
|
301
301
|
});
|
|
302
302
|
const makeSelectHasError = formId => reselect.createSelector(selectForms, forms => {
|
|
303
|
-
var _forms$
|
|
304
|
-
|
|
305
|
-
return (_forms$formId4 = forms[formId]) === null || _forms$formId4 === void 0 ? void 0 : _forms$formId4.status.hasError;
|
|
303
|
+
var _forms$formId12;
|
|
304
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId12 = forms[formId]) === null || _forms$formId12 === void 0 ? void 0 : _forms$formId12.status.hasError;
|
|
306
305
|
});
|
|
307
306
|
const makeSelectFormFields = formId => reselect.createSelector(selectForms, forms => {
|
|
308
|
-
var _forms$
|
|
309
|
-
|
|
310
|
-
return (_forms$formId5 = forms[formId]) === null || _forms$formId5 === void 0 ? void 0 : _forms$formId5.fields;
|
|
307
|
+
var _forms$formId13;
|
|
308
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId13 = forms[formId]) === null || _forms$formId13 === void 0 ? void 0 : _forms$formId13.fields;
|
|
311
309
|
});
|
|
312
310
|
const makeSelectDefaultLang = formId => reselect.createSelector(selectForms, forms => {
|
|
313
|
-
var _forms$
|
|
314
|
-
|
|
315
|
-
return (_forms$formId6 = forms[formId]) === null || _forms$formId6 === void 0 ? void 0 : _forms$formId6.defaultLanguage;
|
|
311
|
+
var _forms$formId14;
|
|
312
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId14 = forms[formId]) === null || _forms$formId14 === void 0 ? void 0 : _forms$formId14.defaultLanguage;
|
|
316
313
|
});
|
|
317
314
|
const makeSelectFormSuccessMessage = formId => reselect.createSelector(selectForms, forms => {
|
|
318
|
-
var _forms$
|
|
319
|
-
|
|
320
|
-
|
|
315
|
+
var _forms$formId15;
|
|
316
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId15 = forms[formId]) === null || _forms$formId15 === void 0 ? void 0 : _forms$formId15.status.messages.success;
|
|
317
|
+
});
|
|
318
|
+
const makeSelectFormValidationSent = formId => reselect.createSelector(selectForms, forms => {
|
|
319
|
+
var _forms$formId16;
|
|
320
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId16 = forms[formId]) === null || _forms$formId16 === void 0 ? void 0 : _forms$formId16.status.validation.sent;
|
|
321
321
|
});
|
|
322
322
|
const makeSelectFormGroup$1 = formId => reselect.createSelector(selectForms, forms => {
|
|
323
|
-
var _forms$
|
|
324
|
-
|
|
325
|
-
return (_forms$formId8 = forms[formId]) === null || _forms$formId8 === void 0 ? void 0 : _forms$formId8.groups;
|
|
323
|
+
var _forms$formId17;
|
|
324
|
+
return forms === null || forms === void 0 ? void 0 : (_forms$formId17 = forms[formId]) === null || _forms$formId17 === void 0 ? void 0 : _forms$formId17.groups;
|
|
326
325
|
});
|
|
327
326
|
const selectors = {
|
|
328
327
|
selectForms,
|
|
@@ -339,6 +338,7 @@ const selectors = {
|
|
|
339
338
|
makeSelectFormFields,
|
|
340
339
|
makeSelectDefaultLang,
|
|
341
340
|
makeSelectFormSuccessMessage,
|
|
341
|
+
makeSelectFormValidationSent,
|
|
342
342
|
makeSelectFormGroup: makeSelectFormGroup$1,
|
|
343
343
|
makeSelectHasError
|
|
344
344
|
};
|
|
@@ -383,19 +383,24 @@ const postForm = async formObj => {
|
|
|
383
383
|
const submitted = await request(URI, options);
|
|
384
384
|
return submitted;
|
|
385
385
|
};
|
|
386
|
-
|
|
387
386
|
const request = async (url, options) => {
|
|
388
387
|
return fetch(url, options).then(response => response.json()).then(result => {
|
|
389
388
|
return result;
|
|
390
|
-
})
|
|
389
|
+
})
|
|
390
|
+
// eslint-disable-next-line no-console
|
|
391
391
|
.catch(error => console.log('error', error));
|
|
392
392
|
};
|
|
393
393
|
|
|
394
394
|
const domains = ['1033edge.com', '11mail.com', '123.com', '123box.net', '123india.com', '123mail.cl', '123qwe.co.uk', '126.com', '150ml.com', '15meg4free.com', '163.com', '1coolplace.com', '1freeemail.com', '1funplace.com', '1internetdrive.com', '1mail.net', '1me.net', '1mum.com', '1musicrow.com', '1netdrive.com', '1nsyncfan.com', '1under.com', '1webave.com', '1webhighway.com', '212.com', '24horas.com', '2911.net', '2bmail.co.uk', '2d2i.com', '2die4.com', '3000.it', '321media.com', '37.com', '3ammagazine.com', '3dmail.com', '3email.com', '3xl.net', '444.net', '4email.com', '4email.net', '4mg.com', '4newyork.com', '4x4man.com', '5iron.com', '5star.com', '88.am', '8848.net', '888.nu', '97rock.com', 'aaamail.zzn.com', 'aamail.net', 'aaronkwok.net', 'abbeyroadlondon.co.uk', 'abcflash.net', 'abdulnour.com', 'aberystwyth.com', 'abolition-now.com', 'about.com', 'academycougars.com', 'acceso.or.cr', 'access4less.net', 'accessgcc.com', 'ace-of-base.com', 'acmecity.com', 'acmemail.net', 'acninc.net', 'adelphia.net', 'adexec.com', 'adfarrow.com', 'adios.net', 'ados.fr', 'advalvas.be', 'aeiou.pt', 'aemail4u.com', 'aeneasmail.com', 'afreeinternet.com', 'africamail.com', 'agoodmail.com', 'ahaa.dk', 'aichi.com', 'aim.com', 'airforce.net', 'airforceemail.com', 'airmail.net', 'airpost.net', 'ajacied.com', 'ak47.hu', 'aknet.kg', 'albawaba.com', 'alex4all.com', 'alexandria.cc', 'algeria.com', 'alhilal.net', 'alibaba.com', 'alice.it', 'aliceadsl.fr', 'alive.cz', 'aliyun.com', 'allmail.net', 'alloymail.com', 'allracing.com', 'allsaintsfan.com', 'alltel.net', 'alskens.dk', 'altavista.com', 'altavista.net', 'altavista.se', 'alternativagratis.com', 'alumnidirector.com', 'alvilag.hu', 'amele.com', 'america.hm', 'ameritech.net', 'amnetsal.com', 'amrer.net', 'amuro.net', 'amuromail.com', 'ananzi.co.za', 'ancestry.com', 'andylau.net', 'anfmail.com', 'angelfan.com', 'angelfire.com', 'animal.net', 'animalhouse.com', 'animalwoman.net', 'anjungcafe.com', 'anote.com', 'another.com', 'anotherwin95.com', 'anti-social.com', 'antisocial.com', 'antongijsen.com', 'antwerpen.com', 'anymoment.com', 'anytimenow.com', 'aol.com', 'aol.it', 'apexmail.com', 'apmail.com', 'apollo.lv', 'approvers.net', 'arabia.com', 'arabtop.net', 'arcademaster.com', 'archaeologist.com', 'arcor.de', 'arcotronics.bg', 'argentina.com', 'aristotle.org', 'army.net', 'arnet.com.ar', 'artlover.com', 'artlover.com.au', 'as-if.com', 'asean-mail.com', 'asheville.com', 'asia-links.com', 'asia.com', 'asiafind.com', 'asianavenue.com', 'asiancityweb.com', 'asiansonly.net', 'asianwired.net', 'asiapoint.net', 'assala.com', 'assamesemail.com', 'astroboymail.com', 'astrolover.com', 'astrosfan.com', 'astrosfan.net', 'asurfer.com', 'athenachu.net', 'atina.cl', 'atl.lv', 'atlanticbb.net', 'atlaswebmail.com', 'atlink.com', 'ato.check.com', 'atozasia.com', 'att.net', 'att.net', 'attbi.com', 'attglobal.net', 'attglobal.net', 'attymail.com', 'au.ru', 'ausi.com', 'austin.rr.com', 'australia.edu', 'australiamail.com', 'austrosearch.net', 'autoescuelanerja.com', 'automotiveauthority.com', 'avh.hu', 'awsom.net', 'axoskate.com', 'ayna.com', 'azimiweb.com', 'bachelorboy.com', 'bachelorgal.com', 'backpackers.com', 'backstreet-boys.com', 'backstreetboysclub.com', 'bagherpour.com', 'bangkok.com', 'bangkok2000.com', 'bannertown.net', 'baptistmail.com', 'baptized.com', 'barcelona.com', 'baseballmail.com', 'basketballmail.com', 'batuta.net', 'baudoinconsulting.com', 'bboy.zzn.com', 'bcpl.net', 'bcvibes.com', 'beeebank.com', 'beenhad.com', 'beep.ru', 'beer.com', 'beethoven.com', 'belice.com', 'belizehome.com', 'bellatlantic.net', 'bellnet.ca', 'bellsouth.net', 'bellsouth.net', 'berkscounty.com', 'berlin.com', 'berlin.de', 'berlinexpo.de', 'bestmail.us', 'bestweb.net', 'bettergolf.net', 'bev.net', 'bharatmail.com', 'bigassweb.com', 'bigblue.net.au', 'bigboab.com', 'bigfoot.com', 'bigfoot.de', 'bigger.com', 'bigmailbox.com', 'bigpond.com', 'bigpond.com.au', 'bigpond.net.au', 'bigramp.com', 'bikemechanics.com', 'bikeracer.com', 'bikeracers.net', 'bikerider.com', 'billsfan.com', 'billsfan.net', 'bimamail.com', 'bimla.net', 'birdowner.net', 'bisons.com', 'bitmail.com', 'bitpage.net', 'bizhosting.com', 'bla-bla.com', 'blackburnmail.com', 'blackplanet.com', 'blacksburg.net', 'blazemail.com', 'blazenet.net', 'bluehyppo.com', 'bluemail.ch', 'bluemail.dk', 'bluesfan.com', 'bluewin.ch', 'blueyonder.co.uk', 'blushmail.com', 'bmlsports.net', 'boardermail.com', 'boatracers.com', 'bol.com.br', 'bolando.com', 'bollywoodz.com', 'bolt.com', 'boltonfans.com', 'bombdiggity.com', 'bonbon.net', 'boom.com', 'bootmail.com', 'bornnaked.com', 'bossofthemoss.com', 'bostonoffice.com', 'bounce.net', 'box.az', 'boxbg.com', 'boxemail.com', 'boxfrog.com', 'boyzoneclub.com', 'bradfordfans.com', 'brasilia.net', 'brazilmail.com.br', 'breathe.com', 'bresnan.net', 'brfree.com.br', 'bright.net', 'britneyclub.com', 'brittonsign.com', 'broadcast.net', 'bt.com', 'btinternet.com', 'btopenworld.co.uk', 'buffymail.com', 'bullsfan.com', 'bullsgame.com', 'bumerang.ro', 'bunko.com', 'buryfans.com', 'business-man.com', 'businessman.net', 'businessweekmail.com', 'busta-rhymes.com', 'busymail.com', 'buyersusa.com', 'bvimailbox.com', 'byteme.com', 'c2i.net', 'c3.hu', 'c4.com', 'cabacabana.com', 'cableone.net', 'caere.it', 'cairomail.com', 'cais.net', 'callnetuk.com', 'callsign.net', 'caltanet.it', 'camidge.com', 'canada-11.com', 'canada.com', 'canadianmail.com', 'canoemail.com', 'canwetalk.com', 'capu.net', 'caramail.com', 'care2.com', 'careerbuildermail.com', 'carioca.net', 'cartestraina.ro', 'casablancaresort.com', 'casino.com', 'catcha.com', 'catholic.org', 'catlover.com', 'catsrule.garfield.com', 'ccnmail.com', 'cd2.com', 'celineclub.com', 'celtic.com', 'centoper.it', 'centralpets.com', 'centrum.cz', 'centrum.sk', 'centurytel.net', 'cfl.rr.com', 'cgac.es', 'chaiyomail.com', 'chance2mail.com', 'chandrasekar.net', 'charm.net', 'charmedmail.com', 'charter.net', 'chat.ru', 'chattown.com', 'chauhanweb.com', 'check.com', 'check1check.com', 'cheerful.com', 'chek.com', 'chello.nl', 'chemist.com', 'chequemail.com', 'cheyenneweb.com', 'chez.com', 'chickmail.com', 'china.net.vg', 'chinalook.com', 'chirk.com', 'chocaholic.com.au', 'christianmail.net', 'churchusa.com', 'cia-agent.com', 'cia.hu', 'ciaoweb.it', 'cicciociccio.com', 'cincinow.net', 'citeweb.net', 'citlink.net', 'city-of-bath.org', 'city-of-birmingham.com', 'city-of-brighton.org', 'city-of-cambridge.com', 'city-of-coventry.com', 'city-of-edinburgh.com', 'city-of-lichfield.com', 'city-of-lincoln.com', 'city-of-liverpool.com', 'city-of-manchester.com', 'city-of-nottingham.com', 'city-of-oxford.com', 'city-of-swansea.com', 'city-of-westminster.com', 'city-of-westminster.net', 'city-of-york.net', 'city2city.com', 'cityofcardiff.net', 'cityoflondon.org', 'claramail.com', 'classicalfan.com', 'classicmail.co.za', 'clerk.com', 'cliffhanger.com', 'close2you.net', 'club-internet.fr', 'club4x4.net', 'clubalfa.com', 'clubbers.net', 'clubducati.com', 'clubhonda.net', 'clubvdo.net', 'cluemail.com', 'cmpmail.com', 'cnnsimail.com', 'codec.ro', 'coder.hu', 'coid.biz', 'coldmail.com', 'collectiblesuperstore.com', 'collegebeat.com', 'collegeclub.com', 'collegemail.com', 'colleges.com', 'columbus.rr.com', 'columbusrr.com', 'columnist.com', 'comcast.net', 'comic.com', 'communityconnect.com', 'comprendemail.com', 'compuserve.com', 'computer-freak.com', 'computermail.net', 'concentric.net', 'conexcol.com', 'conk.com', 'connect4free.net', 'connectbox.com', 'conok.com', 'consultant.com', 'cookiemonster.com', 'cool.br', 'coolgoose.ca', 'coolgoose.com', 'coolkiwi.com', 'coollist.com', 'coolmail.com', 'coolmail.net', 'coolsend.com', 'cooooool.com', 'cooperation.net', 'cooperationtogo.net', 'copacabana.com', 'cornells.com', 'cornerpub.com', 'corporatedirtbag.com', 'correo.terra.com.gt', 'cortinet.com', 'cotas.net', 'counsellor.com', 'countrylover.com', 'covad.net', 'cox.net', 'coxinet.net', 'coxmail.com', 'cpaonline.net', 'cracker.hu', 'crazedanddazed.com', 'crazysexycool.com', 'cristianemail.com', 'critterpost.com', 'croeso.com', 'crosshairs.com', 'crosslink.net', 'crosswinds.net', 'crwmail.com', 'cry4helponline.com', 'cs.com', 'csi.com', 'csinibaba.hu', 'cuemail.com', 'curio-city.com', 'cute-girl.com', 'cuteandcuddly.com', 'cutey.com', 'cww.de', 'cyber-africa.net', 'cyber4all.com', 'cyberbabies.com', 'cybercafemaui.com', 'cyberdude.com', 'cyberforeplay.net', 'cybergal.com', 'cybergrrl.com', 'cyberinbox.com', 'cyberleports.com', 'cybermail.net', 'cybernet.it', 'cyberspace-asia.com', 'cybertrains.org', 'cyclefanz.com', 'cynetcity.com', 'dabsol.net', 'dadacasa.com', 'daha.com', 'dailypioneer.com', 'dallas.theboys.com', 'dangerous-minds.com', 'dansegulvet.com', 'data54.com', 'daum.net', 'davegracey.com', 'dawnsonmail.com', 'dawsonmail.com', 'dazedandconfused.com', 'dbzmail.com', 'dca.net', 'dcemail.com', 'deadlymob.org', 'deal-maker.com', 'dearriba.com', 'death-star.com', 'dejanews.com', 'deliveryman.com', 'deltanet.com', 'deneg.net', 'depechemode.com', 'deseretmail.com', 'desertmail.com', 'desilota.com', 'deskmail.com', 'deskpilot.com', 'destin.com', 'detik.com', 'deutschland-net.com', 'devotedcouples.com', 'dfwatson.com', 'di-ve.com', 'digibel.be', 'diplomats.com', 'direcway.com', 'dirtracer.com', 'discofan.com', 'discovery.com', 'discoverymail.com', 'disinfo.net', 'dmailman.com', 'dmv.com', 'dnsmadeeasy.com', 'doctor.com', 'dog.com', 'doglover.com', 'dogmail.co.uk', 'dogsnob.net', 'doityourself.com', 'doneasy.com', 'donjuan.com', 'dontgotmail.com', 'dontmesswithtexas.com', 'doramail.com', 'dostmail.com', 'dotcom.fr', 'dott.it', 'dplanet.ch', 'dr.com', 'dragoncon.net', 'dragracer.com', 'dropzone.com', 'drotposta.hu', 'dslextreme.com', 'dubaimail.com', 'dublin.com', 'dublin.ie', 'dunlopdriver.com', 'dunloprider.com', 'duno.com', 'dwp.net', 'dygo.com', 'dynamitemail.com', 'e-apollo.lv', 'e-mail.dk', 'e-mail.ru', 'e-mailanywhere.com', 'e-mails.ru', 'e-tapaal.com', 'earthalliance.com', 'earthcam.net', 'earthdome.com', 'earthling.net', 'earthlink.net', 'earthonline.net', 'eastcoast.co.za', 'eastmail.com', 'easy.to', 'easypost.com', 'eatmydirt.com', 'ecardmail.com', 'ecbsolutions.net', 'echina.com', 'ecompare.com', 'edge.net', 'edmail.com', 'ednatx.com', 'edtnmail.com', 'educacao.te.pt', 'educastmail.com', 'ehmail.com', 'eircom.net', 'elsitio.com', 'elvis.com', 'email-london.co.uk', 'email.com', 'email.cz', 'email.ee', 'email.it', 'email.nu', 'email.ro', 'email.ru', 'email.si', 'email.women.com', 'email2me.net', 'emailacc.com', 'emailaccount.com', 'emailchoice.com', 'emailcorner.net', 'emailem.com', 'emailengine.net', 'emailforyou.net', 'emailgroups.net', 'emailpinoy.com', 'emailplanet.com', 'emails.ru', 'emailuser.net', 'emailx.net', 'ematic.com', 'embarqmail.com', 'emumail.com', 'end-war.com', 'enel.net', 'engineer.com', 'england.com', 'england.edu', 'enter.net', 'epatra.com', 'epix.net', 'epost.de', 'eposta.hu', 'eqqu.com', 'eramail.co.za', 'eresmas.com', 'eriga.lv', 'erols.com', 'estranet.it', 'ethos.st', 'etoast.com', 'etrademail.com', 'eudoramail.com', 'europe.com', 'euroseek.com', 'every1.net', 'everyday.com.kh', 'everyone.net', 'examnotes.net', 'excite.co.jp', 'excite.com', 'excite.it', 'execs.com', 'expressasia.com', 'extenda.net', 'extended.com', 'eyou.com', 'ezcybersearch.com', 'ezmail.egine.com', 'ezmail.ru', 'ezrs.com', 'ezy.net', 'f1fans.net', 'facebook.com', 'fan.com', 'fan.theboys.com', 'fansonlymail.com', 'fantasticmail.com', 'farang.net', 'faroweb.com', 'fastem.com', 'fastemail.us', 'fastemailer.com', 'fastermail.com', 'fastimap.com', 'fastmail.fm', 'fastmailbox.net', 'fastmessaging.com', 'fatcock.net', 'fathersrightsne.org', 'fbi-agent.com', 'fbi.hu', 'fcc.net', 'federalcontractors.com', 'felicity.com', 'felicitymail.com', 'femenino.com', 'fetchmail.co.uk', 'fetchmail.com', 'feyenoorder.com', 'ffanet.com', 'fiberia.com', 'fibertel.com.ar', 'filipinolinks.com', 'financemail.net', 'financier.com', 'findmail.com', 'finebody.com', 'finfin.com', 'fire-brigade.com', 'fishburne.org', 'flashcom.net', 'flashemail.com', 'flashmail.com', 'flashmail.net', 'flipcode.com', 'fmail.co.uk', 'fmailbox.com', 'fmgirl.com', 'fmguy.com', 'fnbmail.co.za', 'fnmail.com', 'folkfan.com', 'foodmail.com', 'football.theboys.com', 'footballmail.com', 'for-president.com', 'forfree.at', 'forpresident.com', 'forthnet.gr', 'fortuncity.com', 'fortunecity.com', 'forum.dk', 'foxmail.com', 'free-org.com', 'free.com.pe', 'free.fr', 'freeaccess.nl', 'freeaccount.com', 'freeandsingle.com', 'freedom.usa.com', 'freedomlover.com', 'freegates.be', 'freeghana.com', 'freeler.nl', 'freemail.c3.hu', 'freemail.com.au', 'freemail.com.pk', 'freemail.de', 'freemail.et', 'freemail.gr', 'freemail.hu', 'freemail.it', 'freemail.lt', 'freemail.nl', 'freemail.org.mk', 'freenet.de', 'freenet.kg', 'freeola.com', 'freeola.net', 'freeserve.co.uk', 'freestamp.com', 'freestart.hu', 'freesurf.fr', 'freesurf.nl', 'freeuk.com', 'freeuk.net', 'freeukisp.co.uk', 'freeweb.org', 'freewebemail.com', 'freeyellow.com', 'freezone.co.uk', 'fresnomail.com', 'friends-cafe.com', 'friendsfan.com', 'from-africa.com', 'from-america.com', 'from-argentina.com', 'from-asia.com', 'from-australia.com', 'from-belgium.com', 'from-brazil.com', 'from-canada.com', 'from-china.net', 'from-england.com', 'from-europe.com', 'from-france.net', 'from-germany.net', 'from-holland.com', 'from-israel.com', 'from-italy.net', 'from-japan.net', 'from-korea.com', 'from-mexico.com', 'from-outerspace.com', 'from-russia.com', 'from-spain.net', 'fromalabama.com', 'fromalaska.com', 'fromarizona.com', 'fromarkansas.com', 'fromcalifornia.com', 'fromcolorado.com', 'fromconnecticut.com', 'fromdelaware.com', 'fromflorida.net', 'fromgeorgia.com', 'fromhawaii.net', 'fromidaho.com', 'fromillinois.com', 'fromindiana.com', 'fromiowa.com', 'fromjupiter.com', 'fromkansas.com', 'fromkentucky.com', 'fromlouisiana.com', 'frommaine.net', 'frommaryland.com', 'frommassachusetts.com', 'frommiami.com', 'frommichigan.com', 'fromminnesota.com', 'frommississippi.com', 'frommissouri.com', 'frommontana.com', 'fromnebraska.com', 'fromnevada.com', 'fromnewhampshire.com', 'fromnewjersey.com', 'fromnewmexico.com', 'fromnewyork.net', 'fromnorthcarolina.com', 'fromnorthdakota.com', 'fromohio.com', 'fromoklahoma.com', 'fromoregon.net', 'frompennsylvania.com', 'fromrhodeisland.com', 'fromru.com', 'fromsouthcarolina.com', 'fromsouthdakota.com', 'fromtennessee.com', 'fromtexas.com', 'fromthestates.com', 'fromutah.com', 'fromvermont.com', 'fromvirginia.com', 'fromwashington.com', 'fromwashingtondc.com', 'fromwestvirginia.com', 'fromwisconsin.com', 'fromwyoming.com', 'front.ru', 'frontier.com', 'frontiernet.net', 'frostbyte.uk.net', 'fsmail.net', 'ftml.net', 'fullchannel.net', 'fullmail.com', 'funkfan.com', 'fuorissimo.com', 'furnitureprovider.com', 'fuse.net', 'fut.es', 'fwnb.com', 'fxsmails.com', 'galamb.net', 'galaxy5.com', 'gamebox.net', 'gamegeek.com', 'games.com', 'gamespotmail.com', 'garbage.com', 'gardener.com', 'gateway.net', 'gawab.com', 'gaybrighton.co.uk', 'gaza.net', 'gazeta.pl', 'gazibooks.com', 'gci.net', 'gee-wiz.com', 'geecities.com', 'geek.com', 'geek.hu', 'geeklife.com', 'general-hospital.com', 'geocities.com', 'geologist.com', 'geopia.com', 'gh2000.com', 'ghanamail.com', 'ghostmail.com', 'giantsfan.com', 'giga4u.de', 'gigileung.org', 'givepeaceachance.com', 'glay.org', 'glendale.net', 'globalfree.it', 'globalpagan.com', 'globalsite.com.br', 'globo.com', 'globomail.com', 'gmail.com', 'gmx.at', 'gmx.com', 'gmx.de', 'gmx.fr', 'gmx.li', 'gmx.net', 'gnwmail.com', 'go.com', 'go.ro', 'go.ru', 'go2.com.py', 'go2net.com', 'gocollege.com', 'gocubs.com', 'gofree.co.uk', 'goldenmail.ru', 'goldmail.ru', 'golfemail.com', 'golfmail.be', 'gonavy.net', 'goodstick.com', 'google.com', 'googlemail.com', 'goplay.com', 'gorontalo.net', 'gospelfan.com', 'gothere.uk.com', 'gotmail.com', 'gotomy.com', 'govolsfan.com', 'gportal.hu', 'grabmail.com', 'graffiti.net', 'gramszu.net', 'grapplers.com', 'gratisweb.com', 'grungecafe.com', 'gtemail.net', 'gti.net', 'gtmc.net', 'gua.net', 'guessmail.com', 'guju.net', 'gurlmail.com', 'guy.com', 'guy2.com', 'guyanafriends.com', 'gyorsposta.com', 'gyorsposta.hu', 'hackermail.net', 'hailmail.net', 'hairdresser.net', 'hamptonroads.com', 'handbag.com', 'handleit.com', 'hang-ten.com', 'hanmail.net', 'happemail.com', 'happycounsel.com', 'happypuppy.com', 'hardcorefreak.com', 'hawaii.rr.com', 'hawaiiantel.net', 'headbone.com', 'heartthrob.com', 'heerschap.com', 'heesun.net', 'hehe.com', 'hello.hu', 'hello.net.au', 'hello.to', 'helter-skelter.com', 'hempseed.com', 'herediano.com', 'heremail.com', 'herono1.com', 'hetnet.nl', 'hey.to', 'hhdevel.com', 'highmilton.com', 'highquality.com', 'highveldmail.co.za', 'hiphopfan.com', 'hispavista.com', 'hitthe.net', 'hkg.net', 'hkstarphoto.com', 'hockeymail.com', 'hollywoodkids.com', 'home-email.com', 'home.nl', 'home.no.net', 'home.ro', 'home.se', 'homeart.com', 'homelocator.com', 'homemail.com', 'homestead.com', 'homeworkcentral.com', 'hongkong.com', 'hookup.net', 'hoopsmail.com', 'horrormail.com', 'host-it.com.sg', 'hot-shot.com', 'hot.ee', 'hotbot.com', 'hotbrev.com', 'hotepmail.com', 'hotfire.net', 'hotletter.com', 'hotmail.be', 'hotmail.co.il', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.br', 'hotmail.com.mx', 'hotmail.de', 'hotmail.es', 'hotmail.fr', 'hotmail.it', 'hotmail.kg', 'hotmail.kz', 'hotmail.ru', 'hotpop.com', 'hotpop3.com', 'hotvoice.com', 'housefancom', 'housemail.com', 'hsuchi.net', 'html.tou.com', 'hughes.net', 'hunsa.com', 'hush.com', 'hushmail.com', 'hypernautica.com', 'i-connect.com', 'i-france.com', 'i-mail.com.au', 'i-p.com', 'i-plus.net', 'i.am', 'i12.com', 'iamawoman.com', 'iamwaiting.com', 'iamwasted.com', 'iamyours.com', 'ibm.net', 'icestorm.com', 'icloud.com', 'icmsconsultants.com', 'icq.com', 'icqmail.com', 'icrazy.com', 'id-base.com', 'ididitmyway.com', 'idirect.com', 'iespana.es', 'ifoward.com', 'ig.com.br', 'ignazio.it', 'ignmail.com', 'ihateclowns.com', 'ihwy.com', 'iinet.net.au', 'ijustdontcare.com', 'ilovechocolate.com', 'ilovejesus.com', 'ilovethemovies.com', 'ilovetocollect.net', 'ilse.nl', 'imaginemail.com', 'imail.org', 'imail.ru', 'imailbox.com', 'imel.org', 'imneverwrong.com', 'imposter.co.uk', 'imstressed.com', 'imtoosexy.com', 'in-box.net', 'iname.com', 'inbox.com', 'inbox.net', 'inbox.ru', 'incamail.com', 'incredimail.com', 'indexa.fr', 'india.com', 'indiatimes.com', 'indo-mail.com', 'indocities.com', 'indomail.com', 'indyracers.com', 'info-media.de', 'info66.com', 'infohq.com', 'infomail.es', 'infomart.or.jp', 'infospacemail.com', 'infovia.com.ar', 'inicia.es', 'inmail.sk', 'innocent.com', 'inorbit.com', 'insidebaltimore.net', 'insight.rr.com', 'insurer.com', 'integra.net', 'interaccess.com', 'interburp.com', 'interfree.it', 'interia.pl', 'interlap.com.ar', 'intermail.co.il', 'internet-club.com', 'internet-police.com', 'internetbiz.com', 'internetdrive.com', 'internetegypt.com', 'internetemails.net', 'internetmailing.net', 'internetmci.com', 'investormail.com', 'inwind.it', 'iobox.com', 'iobox.fi', 'iol.it', 'ionet.net', 'iowaemail.com', 'ip3.com', 'iprimus.com.au', 'iqemail.com', 'irangate.net', 'iraqmail.com', 'ireland.com', 'irj.hu', 'isellcars.com', 'islamonline.net', 'isleuthmail.com', 'ismart.net', 'isonfire.com', 'isp9.net', 'itelefonica.com.br', 'itloox.com', 'itmom.com', 'itol.com', 'ivebeenframed.com', 'ivillage.com', 'iwan-fals.com', 'iwmail.com', 'iwon.com', 'izadpanah.com', 'jahoopa.com', 'jakuza.hu', 'japan.com', 'jaydemail.com', 'jazzandjava.com', 'jazzfan.com', 'jazzgame.com', 'jerusalemmail.com', 'jetemail.net', 'jewishmail.com', 'jippii.fi', 'jmail.co.za', 'joinme.com', 'jokes.com', 'jordanmail.com', 'journalist.com', 'jovem.te.pt', 'joymail.com', 'jpopmail.com', 'jubiimail.dk', 'jump.com', 'jumpy.it', 'juniormail.com', 'juno.com', 'justemail.net', 'justicemail.com', 'kaazoo.com', 'kaixo.com', 'kalpoint.com', 'kansascity.com', 'kapoorweb.com', 'karachian.com', 'karachioye.com', 'karbasi.com', 'katamail.com', 'kayafmmail.co.za', 'kbjrmail.com', 'kcks.com', 'keg-party.com', 'keko.com.ar', 'kellychen.com', 'keromail.com', 'keyemail.com', 'kgb.hu', 'khosropour.com', 'kickassmail.com', 'killermail.com', 'kimo.com', 'kinki-kids.com', 'kittymail.com', 'kitznet.at', 'kiwibox.com', 'kiwitown.com', 'kmail.com.au', 'konx.com', 'korea.com', 'kozmail.com', 'krongthip.com', 'krunis.com', 'ksanmail.com', 'ksee24mail.com', 'kube93mail.com', 'kukamail.com', 'kumarweb.com', 'kuwait-mail.com', 'la.com', 'ladymail.cz', 'lagerlouts.com', 'lahoreoye.com', 'lakmail.com', 'lamer.hu', 'land.ru', 'lankamail.com', 'laposte.net', 'latemodels.com', 'latinmail.com', 'latino.com', 'lavabit.com', 'law.com', 'lawyer.com', 'leehom.net', 'legalactions.com', 'legislator.com', 'leonlai.net', 'letsgomets.net', 'letterbox.com', 'levele.com', 'levele.hu', 'lex.bg', 'lexis-nexis-mail.com', 'libero.it', 'liberomail.com', 'lick101.com', 'linkmaster.com', 'linktrader.com', 'linuxfreemail.com', 'linuxmail.org', 'lionsfan.com.au', 'liontrucks.com', 'liquidinformation.net', 'list.ru', 'littleblueroom.com', 'live.be', 'live.ca', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.au', 'live.com.mx', 'live.de', 'live.fr', 'live.it', 'live.nl', 'liverpoolfans.com', 'llandudno.com', 'llangollen.com', 'lmxmail.sk', 'lobbyist.com', 'localbar.com', 'london.com', 'loobie.com', 'looksmart.co.uk', 'looksmart.com', 'looksmart.com.au', 'lopezclub.com', 'louiskoo.com', 'love.com', 'love.cz', 'loveable.com', 'lovelygirl.net', 'lovemail.com', 'lover-boy.com', 'lovergirl.com', 'lovingjesus.com', 'lowandslow.com', 'luso.pt', 'luukku.com', 'lycos.co.uk', 'lycos.com', 'lycos.es', 'lycos.it', 'lycos.ne.jp', 'lycosemail.com', 'lycosmail.com', 'm-a-i-l.com', 'm-hmail.com', 'm4.org', 'mac.com', 'macbox.com', 'macfreak.com', 'machinecandy.com', 'macmail.com', 'madcreations.com', 'madrid.com', 'maffia.hu', 'magicmail.co.za', 'mahmoodweb.com', 'mail-awu.de', 'mail-box.cz', 'mail-center.com', 'mail-central.com', 'mail-page.com', 'mail.austria.com', 'mail.az', 'mail.be', 'mail.bulgaria.com', 'mail.byte.it', 'mail.co.za', 'mail.com', 'mail.ee', 'mail.entrepeneurmag.com', 'mail.freetown.com', 'mail.gr', 'mail.hitthebeach.com', 'mail.kmsp.com', 'mail.md', 'mail.nu', 'mail.org.uk', 'mail.pf', 'mail.pharmacy.com', 'mail.pt', 'mail.r-o-o-t.com', 'mail.ru', 'mail.salu.net', 'mail.sisna.com', 'mail.spaceports.com', 'mail.theboys.com', 'mail.usa.com', 'mail.vasarhely.hu', 'mail15.com', 'mail1st.com', 'mail2007.com', 'mail2aaron.com', 'mail2abby.com', 'mail2abc.com', 'mail2actor.com', 'mail2admiral.com', 'mail2adorable.com', 'mail2adoration.com', 'mail2adore.com', 'mail2adventure.com', 'mail2aeolus.com', 'mail2aether.com', 'mail2affection.com', 'mail2afghanistan.com', 'mail2africa.com', 'mail2agent.com', 'mail2aha.com', 'mail2ahoy.com', 'mail2aim.com', 'mail2air.com', 'mail2airbag.com', 'mail2airforce.com', 'mail2airport.com', 'mail2alabama.com', 'mail2alan.com', 'mail2alaska.com', 'mail2albania.com', 'mail2alcoholic.com', 'mail2alec.com', 'mail2alexa.com', 'mail2algeria.com', 'mail2alicia.com', 'mail2alien.com', 'mail2allan.com', 'mail2allen.com', 'mail2allison.com', 'mail2alpha.com', 'mail2alyssa.com', 'mail2amanda.com', 'mail2amazing.com', 'mail2amber.com', 'mail2america.com', 'mail2american.com', 'mail2andorra.com', 'mail2andrea.com', 'mail2andy.com', 'mail2anesthesiologist.com', 'mail2angela.com', 'mail2angola.com', 'mail2ann.com', 'mail2anna.com', 'mail2anne.com', 'mail2anthony.com', 'mail2anything.com', 'mail2aphrodite.com', 'mail2apollo.com', 'mail2april.com', 'mail2aquarius.com', 'mail2arabia.com', 'mail2arabic.com', 'mail2architect.com', 'mail2ares.com', 'mail2argentina.com', 'mail2aries.com', 'mail2arizona.com', 'mail2arkansas.com', 'mail2armenia.com', 'mail2army.com', 'mail2arnold.com', 'mail2art.com', 'mail2artemus.com', 'mail2arthur.com', 'mail2artist.com', 'mail2ashley.com', 'mail2ask.com', 'mail2astronomer.com', 'mail2athena.com', 'mail2athlete.com', 'mail2atlas.com', 'mail2atom.com', 'mail2attitude.com', 'mail2auction.com', 'mail2aunt.com', 'mail2australia.com', 'mail2austria.com', 'mail2azerbaijan.com', 'mail2baby.com', 'mail2bahamas.com', 'mail2bahrain.com', 'mail2ballerina.com', 'mail2ballplayer.com', 'mail2band.com', 'mail2bangladesh.com', 'mail2bank.com', 'mail2banker.com', 'mail2bankrupt.com', 'mail2baptist.com', 'mail2bar.com', 'mail2barbados.com', 'mail2barbara.com', 'mail2barter.com', 'mail2basketball.com', 'mail2batter.com', 'mail2beach.com', 'mail2beast.com', 'mail2beatles.com', 'mail2beauty.com', 'mail2becky.com', 'mail2beijing.com', 'mail2belgium.com', 'mail2belize.com', 'mail2ben.com', 'mail2bernard.com', 'mail2beth.com', 'mail2betty.com', 'mail2beverly.com', 'mail2beyond.com', 'mail2biker.com', 'mail2bill.com', 'mail2billionaire.com', 'mail2billy.com', 'mail2bio.com', 'mail2biologist.com', 'mail2black.com', 'mail2blackbelt.com', 'mail2blake.com', 'mail2blind.com', 'mail2blonde.com', 'mail2blues.com', 'mail2bob.com', 'mail2bobby.com', 'mail2bolivia.com', 'mail2bombay.com', 'mail2bonn.com', 'mail2bookmark.com', 'mail2boreas.com', 'mail2bosnia.com', 'mail2boston.com', 'mail2botswana.com', 'mail2bradley.com', 'mail2brazil.com', 'mail2breakfast.com', 'mail2brian.com', 'mail2bride.com', 'mail2brittany.com', 'mail2broker.com', 'mail2brook.com', 'mail2bruce.com', 'mail2brunei.com', 'mail2brunette.com', 'mail2brussels.com', 'mail2bryan.com', 'mail2bug.com', 'mail2bulgaria.com', 'mail2business.com', 'mail2buy.com', 'mail2ca.com', 'mail2california.com', 'mail2calvin.com', 'mail2cambodia.com', 'mail2cameroon.com', 'mail2canada.com', 'mail2cancer.com', 'mail2capeverde.com', 'mail2capricorn.com', 'mail2cardinal.com', 'mail2cardiologist.com', 'mail2care.com', 'mail2caroline.com', 'mail2carolyn.com', 'mail2casey.com', 'mail2cat.com', 'mail2caterer.com', 'mail2cathy.com', 'mail2catlover.com', 'mail2catwalk.com', 'mail2cell.com', 'mail2chad.com', 'mail2champaign.com', 'mail2charles.com', 'mail2chef.com', 'mail2chemist.com', 'mail2cherry.com', 'mail2chicago.com', 'mail2chile.com', 'mail2china.com', 'mail2chinese.com', 'mail2chocolate.com', 'mail2christian.com', 'mail2christie.com', 'mail2christmas.com', 'mail2christy.com', 'mail2chuck.com', 'mail2cindy.com', 'mail2clark.com', 'mail2classifieds.com', 'mail2claude.com', 'mail2cliff.com', 'mail2clinic.com', 'mail2clint.com', 'mail2close.com', 'mail2club.com', 'mail2coach.com', 'mail2coastguard.com', 'mail2colin.com', 'mail2college.com', 'mail2colombia.com', 'mail2color.com', 'mail2colorado.com', 'mail2columbia.com', 'mail2comedian.com', 'mail2composer.com', 'mail2computer.com', 'mail2computers.com', 'mail2concert.com', 'mail2congo.com', 'mail2connect.com', 'mail2connecticut.com', 'mail2consultant.com', 'mail2convict.com', 'mail2cook.com', 'mail2cool.com', 'mail2cory.com', 'mail2costarica.com', 'mail2country.com', 'mail2courtney.com', 'mail2cowboy.com', 'mail2cowgirl.com', 'mail2craig.com', 'mail2crave.com', 'mail2crazy.com', 'mail2create.com', 'mail2croatia.com', 'mail2cry.com', 'mail2crystal.com', 'mail2cuba.com', 'mail2culture.com', 'mail2curt.com', 'mail2customs.com', 'mail2cute.com', 'mail2cutey.com', 'mail2cynthia.com', 'mail2cyprus.com', 'mail2czechrepublic.com', 'mail2dad.com', 'mail2dale.com', 'mail2dallas.com', 'mail2dan.com', 'mail2dana.com', 'mail2dance.com', 'mail2dancer.com', 'mail2danielle.com', 'mail2danny.com', 'mail2darlene.com', 'mail2darling.com', 'mail2darren.com', 'mail2daughter.com', 'mail2dave.com', 'mail2dawn.com', 'mail2dc.com', 'mail2dealer.com', 'mail2deanna.com', 'mail2dearest.com', 'mail2debbie.com', 'mail2debby.com', 'mail2deer.com', 'mail2delaware.com', 'mail2delicious.com', 'mail2demeter.com', 'mail2democrat.com', 'mail2denise.com', 'mail2denmark.com', 'mail2dennis.com', 'mail2dentist.com', 'mail2derek.com', 'mail2desert.com', 'mail2devoted.com', 'mail2devotion.com', 'mail2diamond.com', 'mail2diana.com', 'mail2diane.com', 'mail2diehard.com', 'mail2dilemma.com', 'mail2dillon.com', 'mail2dinner.com', 'mail2dinosaur.com', 'mail2dionysos.com', 'mail2diplomat.com', 'mail2director.com', 'mail2dirk.com', 'mail2disco.com', 'mail2dive.com', 'mail2diver.com', 'mail2divorced.com', 'mail2djibouti.com', 'mail2doctor.com', 'mail2doglover.com', 'mail2dominic.com', 'mail2dominica.com', 'mail2dominicanrepublic.com', 'mail2don.com', 'mail2donald.com', 'mail2donna.com', 'mail2doris.com', 'mail2dorothy.com', 'mail2doug.com', 'mail2dough.com', 'mail2douglas.com', 'mail2dow.com', 'mail2downtown.com', 'mail2dream.com', 'mail2dreamer.com', 'mail2dude.com', 'mail2dustin.com', 'mail2dyke.com', 'mail2dylan.com', 'mail2earl.com', 'mail2earth.com', 'mail2eastend.com', 'mail2eat.com', 'mail2economist.com', 'mail2ecuador.com', 'mail2eddie.com', 'mail2edgar.com', 'mail2edwin.com', 'mail2egypt.com', 'mail2electron.com', 'mail2eli.com', 'mail2elizabeth.com', 'mail2ellen.com', 'mail2elliot.com', 'mail2elsalvador.com', 'mail2elvis.com', 'mail2emergency.com', 'mail2emily.com', 'mail2engineer.com', 'mail2english.com', 'mail2environmentalist.com', 'mail2eos.com', 'mail2eric.com', 'mail2erica.com', 'mail2erin.com', 'mail2erinyes.com', 'mail2eris.com', 'mail2eritrea.com', 'mail2ernie.com', 'mail2eros.com', 'mail2estonia.com', 'mail2ethan.com', 'mail2ethiopia.com', 'mail2eu.com', 'mail2europe.com', 'mail2eurus.com', 'mail2eva.com', 'mail2evan.com', 'mail2evelyn.com', 'mail2everything.com', 'mail2exciting.com', 'mail2expert.com', 'mail2fairy.com', 'mail2faith.com', 'mail2fanatic.com', 'mail2fancy.com', 'mail2fantasy.com', 'mail2farm.com', 'mail2farmer.com', 'mail2fashion.com', 'mail2fat.com', 'mail2feeling.com', 'mail2female.com', 'mail2fever.com', 'mail2fighter.com', 'mail2fiji.com', 'mail2filmfestival.com', 'mail2films.com', 'mail2finance.com', 'mail2finland.com', 'mail2fireman.com', 'mail2firm.com', 'mail2fisherman.com', 'mail2flexible.com', 'mail2florence.com', 'mail2florida.com', 'mail2floyd.com', 'mail2fly.com', 'mail2fond.com', 'mail2fondness.com', 'mail2football.com', 'mail2footballfan.com', 'mail2found.com', 'mail2france.com', 'mail2frank.com', 'mail2frankfurt.com', 'mail2franklin.com', 'mail2fred.com', 'mail2freddie.com', 'mail2free.com', 'mail2freedom.com', 'mail2french.com', 'mail2freudian.com', 'mail2friendship.com', 'mail2from.com', 'mail2fun.com', 'mail2gabon.com', 'mail2gabriel.com', 'mail2gail.com', 'mail2galaxy.com', 'mail2gambia.com', 'mail2games.com', 'mail2gary.com', 'mail2gavin.com', 'mail2gemini.com', 'mail2gene.com', 'mail2genes.com', 'mail2geneva.com', 'mail2george.com', 'mail2georgia.com', 'mail2gerald.com', 'mail2german.com', 'mail2germany.com', 'mail2ghana.com', 'mail2gilbert.com', 'mail2gina.com', 'mail2girl.com', 'mail2glen.com', 'mail2gloria.com', 'mail2goddess.com', 'mail2gold.com', 'mail2golfclub.com', 'mail2golfer.com', 'mail2gordon.com', 'mail2government.com', 'mail2grab.com', 'mail2grace.com', 'mail2graham.com', 'mail2grandma.com', 'mail2grandpa.com', 'mail2grant.com', 'mail2greece.com', 'mail2green.com', 'mail2greg.com', 'mail2grenada.com', 'mail2gsm.com', 'mail2guard.com', 'mail2guatemala.com', 'mail2guy.com', 'mail2hades.com', 'mail2haiti.com', 'mail2hal.com', 'mail2handhelds.com', 'mail2hank.com', 'mail2hannah.com', 'mail2harold.com', 'mail2harry.com', 'mail2hawaii.com', 'mail2headhunter.com', 'mail2heal.com', 'mail2heather.com', 'mail2heaven.com', 'mail2hebe.com', 'mail2hecate.com', 'mail2heidi.com', 'mail2helen.com', 'mail2hell.com', 'mail2help.com', 'mail2helpdesk.com', 'mail2henry.com', 'mail2hephaestus.com', 'mail2hera.com', 'mail2hercules.com', 'mail2herman.com', 'mail2hermes.com', 'mail2hespera.com', 'mail2hestia.com', 'mail2highschool.com', 'mail2hindu.com', 'mail2hip.com', 'mail2hiphop.com', 'mail2holland.com', 'mail2holly.com', 'mail2hollywood.com', 'mail2homer.com', 'mail2honduras.com', 'mail2honey.com', 'mail2hongkong.com', 'mail2hope.com', 'mail2horse.com', 'mail2hot.com', 'mail2hotel.com', 'mail2houston.com', 'mail2howard.com', 'mail2hugh.com', 'mail2human.com', 'mail2hungary.com', 'mail2hungry.com', 'mail2hygeia.com', 'mail2hyperspace.com', 'mail2hypnos.com', 'mail2ian.com', 'mail2ice-cream.com', 'mail2iceland.com', 'mail2idaho.com', 'mail2idontknow.com', 'mail2illinois.com', 'mail2imam.com', 'mail2in.com', 'mail2india.com', 'mail2indian.com', 'mail2indiana.com', 'mail2indonesia.com', 'mail2infinity.com', 'mail2intense.com', 'mail2iowa.com', 'mail2iran.com', 'mail2iraq.com', 'mail2ireland.com', 'mail2irene.com', 'mail2iris.com', 'mail2irresistible.com', 'mail2irving.com', 'mail2irwin.com', 'mail2isaac.com', 'mail2israel.com', 'mail2italian.com', 'mail2italy.com', 'mail2jackie.com', 'mail2jacob.com', 'mail2jail.com', 'mail2jaime.com', 'mail2jake.com', 'mail2jamaica.com', 'mail2james.com', 'mail2jamie.com', 'mail2jan.com', 'mail2jane.com', 'mail2janet.com', 'mail2janice.com', 'mail2japan.com', 'mail2japanese.com', 'mail2jasmine.com', 'mail2jason.com', 'mail2java.com', 'mail2jay.com', 'mail2jazz.com', 'mail2jed.com', 'mail2jeffrey.com', 'mail2jennifer.com', 'mail2jenny.com', 'mail2jeremy.com', 'mail2jerry.com', 'mail2jessica.com', 'mail2jessie.com', 'mail2jesus.com', 'mail2jew.com', 'mail2jeweler.com', 'mail2jim.com', 'mail2jimmy.com', 'mail2joan.com', 'mail2joann.com', 'mail2joanna.com', 'mail2jody.com', 'mail2joe.com', 'mail2joel.com', 'mail2joey.com', 'mail2john.com', 'mail2join.com', 'mail2jon.com', 'mail2jonathan.com', 'mail2jones.com', 'mail2jordan.com', 'mail2joseph.com', 'mail2josh.com', 'mail2joy.com', 'mail2juan.com', 'mail2judge.com', 'mail2judy.com', 'mail2juggler.com', 'mail2julian.com', 'mail2julie.com', 'mail2jumbo.com', 'mail2junk.com', 'mail2justin.com', 'mail2justme.com', 'mail2kansas.com', 'mail2karate.com', 'mail2karen.com', 'mail2karl.com', 'mail2karma.com', 'mail2kathleen.com', 'mail2kathy.com', 'mail2katie.com', 'mail2kay.com', 'mail2kazakhstan.com', 'mail2keen.com', 'mail2keith.com', 'mail2kelly.com', 'mail2kelsey.com', 'mail2ken.com', 'mail2kendall.com', 'mail2kennedy.com', 'mail2kenneth.com', 'mail2kenny.com', 'mail2kentucky.com', 'mail2kenya.com', 'mail2kerry.com', 'mail2kevin.com', 'mail2kim.com', 'mail2kimberly.com', 'mail2king.com', 'mail2kirk.com', 'mail2kiss.com', 'mail2kosher.com', 'mail2kristin.com', 'mail2kurt.com', 'mail2kuwait.com', 'mail2kyle.com', 'mail2kyrgyzstan.com', 'mail2la.com', 'mail2lacrosse.com', 'mail2lance.com', 'mail2lao.com', 'mail2larry.com', 'mail2latvia.com', 'mail2laugh.com', 'mail2laura.com', 'mail2lauren.com', 'mail2laurie.com', 'mail2lawrence.com', 'mail2lawyer.com', 'mail2lebanon.com', 'mail2lee.com', 'mail2leo.com', 'mail2leon.com', 'mail2leonard.com', 'mail2leone.com', 'mail2leslie.com', 'mail2letter.com', 'mail2liberia.com', 'mail2libertarian.com', 'mail2libra.com', 'mail2libya.com', 'mail2liechtenstein.com', 'mail2life.com', 'mail2linda.com', 'mail2linux.com', 'mail2lionel.com', 'mail2lipstick.com', 'mail2liquid.com', 'mail2lisa.com', 'mail2lithuania.com', 'mail2litigator.com', 'mail2liz.com', 'mail2lloyd.com', 'mail2lois.com', 'mail2lola.com', 'mail2london.com', 'mail2looking.com', 'mail2lori.com', 'mail2lost.com', 'mail2lou.com', 'mail2louis.com', 'mail2louisiana.com', 'mail2lovable.com', 'mail2love.com', 'mail2lucky.com', 'mail2lucy.com', 'mail2lunch.com', 'mail2lust.com', 'mail2luxembourg.com', 'mail2luxury.com', 'mail2lyle.com', 'mail2lynn.com', 'mail2madagascar.com', 'mail2madison.com', 'mail2madrid.com', 'mail2maggie.com', 'mail2mail4.com', 'mail2maine.com', 'mail2malawi.com', 'mail2malaysia.com', 'mail2maldives.com', 'mail2mali.com', 'mail2malta.com', 'mail2mambo.com', 'mail2man.com', 'mail2mandy.com', 'mail2manhunter.com', 'mail2mankind.com', 'mail2many.com', 'mail2marc.com', 'mail2marcia.com', 'mail2margaret.com', 'mail2margie.com', 'mail2marhaba.com', 'mail2maria.com', 'mail2marilyn.com', 'mail2marines.com', 'mail2mark.com', 'mail2marriage.com', 'mail2married.com', 'mail2marries.com', 'mail2mars.com', 'mail2marsha.com', 'mail2marshallislands.com', 'mail2martha.com', 'mail2martin.com', 'mail2marty.com', 'mail2marvin.com', 'mail2mary.com', 'mail2maryland.com', 'mail2mason.com', 'mail2massachusetts.com', 'mail2matt.com', 'mail2matthew.com', 'mail2maurice.com', 'mail2mauritania.com', 'mail2mauritius.com', 'mail2max.com', 'mail2maxwell.com', 'mail2maybe.com', 'mail2mba.com', 'mail2me4u.com', 'mail2mechanic.com', 'mail2medieval.com', 'mail2megan.com', 'mail2mel.com', 'mail2melanie.com', 'mail2melissa.com', 'mail2melody.com', 'mail2member.com', 'mail2memphis.com', 'mail2methodist.com', 'mail2mexican.com', 'mail2mexico.com', 'mail2mgz.com', 'mail2miami.com', 'mail2michael.com', 'mail2michelle.com', 'mail2michigan.com', 'mail2mike.com', 'mail2milan.com', 'mail2milano.com', 'mail2mildred.com', 'mail2milkyway.com', 'mail2millennium.com', 'mail2millionaire.com', 'mail2milton.com', 'mail2mime.com', 'mail2mindreader.com', 'mail2mini.com', 'mail2minister.com', 'mail2minneapolis.com', 'mail2minnesota.com', 'mail2miracle.com', 'mail2missionary.com', 'mail2mississippi.com', 'mail2missouri.com', 'mail2mitch.com', 'mail2model.com', 'mail2moldova.commail2molly.com', 'mail2mom.com', 'mail2monaco.com', 'mail2money.com', 'mail2mongolia.com', 'mail2monica.com', 'mail2montana.com', 'mail2monty.com', 'mail2moon.com', 'mail2morocco.com', 'mail2morpheus.com', 'mail2mors.com', 'mail2moscow.com', 'mail2moslem.com', 'mail2mouseketeer.com', 'mail2movies.com', 'mail2mozambique.com', 'mail2mp3.com', 'mail2mrright.com', 'mail2msright.com', 'mail2museum.com', 'mail2music.com', 'mail2musician.com', 'mail2muslim.com', 'mail2my.com', 'mail2myboat.com', 'mail2mycar.com', 'mail2mycell.com', 'mail2mygsm.com', 'mail2mylaptop.com', 'mail2mymac.com', 'mail2mypager.com', 'mail2mypalm.com', 'mail2mypc.com', 'mail2myphone.com', 'mail2myplane.com', 'mail2namibia.com', 'mail2nancy.com', 'mail2nasdaq.com', 'mail2nathan.com', 'mail2nauru.com', 'mail2navy.com', 'mail2neal.com', 'mail2nebraska.com', 'mail2ned.com', 'mail2neil.com', 'mail2nelson.com', 'mail2nemesis.com', 'mail2nepal.com', 'mail2netherlands.com', 'mail2network.com', 'mail2nevada.com', 'mail2newhampshire.com', 'mail2newjersey.com', 'mail2newmexico.com', 'mail2newyork.com', 'mail2newzealand.com', 'mail2nicaragua.com', 'mail2nick.com', 'mail2nicole.com', 'mail2niger.com', 'mail2nigeria.com', 'mail2nike.com', 'mail2no.com', 'mail2noah.com', 'mail2noel.com', 'mail2noelle.com', 'mail2normal.com', 'mail2norman.com', 'mail2northamerica.com', 'mail2northcarolina.com', 'mail2northdakota.com', 'mail2northpole.com', 'mail2norway.com', 'mail2notus.com', 'mail2noway.com', 'mail2nowhere.com', 'mail2nuclear.com', 'mail2nun.com', 'mail2ny.com', 'mail2oasis.com', 'mail2oceanographer.com', 'mail2ohio.com', 'mail2ok.com', 'mail2oklahoma.com', 'mail2oliver.com', 'mail2oman.com', 'mail2one.com', 'mail2onfire.com', 'mail2online.com', 'mail2oops.com', 'mail2open.com', 'mail2ophthalmologist.com', 'mail2optometrist.com', 'mail2oregon.com', 'mail2oscars.com', 'mail2oslo.com', 'mail2painter.com', 'mail2pakistan.com', 'mail2palau.com', 'mail2pan.com', 'mail2panama.com', 'mail2paraguay.com', 'mail2paralegal.com', 'mail2paris.com', 'mail2park.com', 'mail2parker.com', 'mail2party.com', 'mail2passion.com', 'mail2pat.com', 'mail2patricia.com', 'mail2patrick.com', 'mail2patty.com', 'mail2paul.com', 'mail2paula.com', 'mail2pay.com', 'mail2peace.com', 'mail2pediatrician.com', 'mail2peggy.com', 'mail2pennsylvania.com', 'mail2perry.com', 'mail2persephone.com', 'mail2persian.com', 'mail2peru.com', 'mail2pete.com', 'mail2peter.com', 'mail2pharmacist.com', 'mail2phil.com', 'mail2philippines.com', 'mail2phoenix.com', 'mail2phonecall.com', 'mail2phyllis.com', 'mail2pickup.com', 'mail2pilot.com', 'mail2pisces.com', 'mail2planet.com', 'mail2platinum.com', 'mail2plato.com', 'mail2pluto.com', 'mail2pm.com', 'mail2podiatrist.com', 'mail2poet.com', 'mail2poland.com', 'mail2policeman.com', 'mail2policewoman.com', 'mail2politician.com', 'mail2pop.com', 'mail2pope.com', 'mail2popular.com', 'mail2portugal.com', 'mail2poseidon.com', 'mail2potatohead.com', 'mail2power.com', 'mail2presbyterian.com', 'mail2president.com', 'mail2priest.com', 'mail2prince.com', 'mail2princess.com', 'mail2producer.com', 'mail2professor.com', 'mail2protect.com', 'mail2psychiatrist.com', 'mail2psycho.com', 'mail2psychologist.com', 'mail2qatar.com', 'mail2queen.com', 'mail2rabbi.com', 'mail2race.com', 'mail2racer.com', 'mail2rachel.com', 'mail2rage.com', 'mail2rainmaker.com', 'mail2ralph.com', 'mail2randy.com', 'mail2rap.com', 'mail2rare.com', 'mail2rave.com', 'mail2ray.com', 'mail2raymond.com', 'mail2realtor.com', 'mail2rebecca.com', 'mail2recruiter.com', 'mail2recycle.com', 'mail2redhead.com', 'mail2reed.com', 'mail2reggie.com', 'mail2register.com', 'mail2rent.com', 'mail2republican.com', 'mail2resort.com', 'mail2rex.com', 'mail2rhodeisland.com', 'mail2rich.com', 'mail2richard.com', 'mail2ricky.com', 'mail2ride.com', 'mail2riley.com', 'mail2rita.com', 'mail2rob.com', 'mail2robert.com', 'mail2roberta.com', 'mail2robin.com', 'mail2rock.com', 'mail2rocker.com', 'mail2rod.com', 'mail2rodney.com', 'mail2romania.com', 'mail2rome.com', 'mail2ron.com', 'mail2ronald.com', 'mail2ronnie.com', 'mail2rose.com', 'mail2rosie.com', 'mail2roy.com', 'mail2rudy.com', 'mail2rugby.com', 'mail2runner.com', 'mail2russell.com', 'mail2russia.com', 'mail2russian.com', 'mail2rusty.com', 'mail2ruth.com', 'mail2rwanda.com', 'mail2ryan.com', 'mail2sa.com', 'mail2sabrina.com', 'mail2safe.com', 'mail2sagittarius.com', 'mail2sail.com', 'mail2sailor.com', 'mail2sal.com', 'mail2salaam.com', 'mail2sam.com', 'mail2samantha.com', 'mail2samoa.com', 'mail2samurai.com', 'mail2sandra.com', 'mail2sandy.com', 'mail2sanfrancisco.com', 'mail2sanmarino.com', 'mail2santa.com', 'mail2sara.com', 'mail2sarah.com', 'mail2sat.com', 'mail2saturn.com', 'mail2saudi.com', 'mail2saudiarabia.com', 'mail2save.com', 'mail2savings.com', 'mail2school.com', 'mail2scientist.com', 'mail2scorpio.com', 'mail2scott.com', 'mail2sean.com', 'mail2search.com', 'mail2seattle.com', 'mail2secretagent.com', 'mail2senate.com', 'mail2senegal.com', 'mail2sensual.com', 'mail2seth.com', 'mail2sevenseas.com', 'mail2sexy.com', 'mail2seychelles.com', 'mail2shane.com', 'mail2sharon.com', 'mail2shawn.com', 'mail2ship.com', 'mail2shirley.com', 'mail2shoot.com', 'mail2shuttle.com', 'mail2sierraleone.com', 'mail2simon.com', 'mail2singapore.com', 'mail2single.com', 'mail2site.com', 'mail2skater.com', 'mail2skier.com', 'mail2sky.com', 'mail2sleek.com', 'mail2slim.com', 'mail2slovakia.com', 'mail2slovenia.com', 'mail2smile.com', 'mail2smith.com', 'mail2smooth.com', 'mail2soccer.com', 'mail2soccerfan.com', 'mail2socialist.com', 'mail2soldier.com', 'mail2somalia.com', 'mail2son.com', 'mail2song.com', 'mail2sos.com', 'mail2sound.com', 'mail2southafrica.com', 'mail2southamerica.com', 'mail2southcarolina.com', 'mail2southdakota.com', 'mail2southkorea.com', 'mail2southpole.com', 'mail2spain.com', 'mail2spanish.com', 'mail2spare.com', 'mail2spectrum.com', 'mail2splash.com', 'mail2sponsor.com', 'mail2sports.com', 'mail2srilanka.com', 'mail2stacy.com', 'mail2stan.com', 'mail2stanley.com', 'mail2star.com', 'mail2state.com', 'mail2stephanie.com', 'mail2steve.com', 'mail2steven.com', 'mail2stewart.com', 'mail2stlouis.com', 'mail2stock.com', 'mail2stockholm.com', 'mail2stockmarket.com', 'mail2storage.com', 'mail2store.com', 'mail2strong.com', 'mail2student.com', 'mail2studio.com', 'mail2studio54.com', 'mail2stuntman.com', 'mail2subscribe.com', 'mail2sudan.com', 'mail2superstar.com', 'mail2surfer.com', 'mail2suriname.com', 'mail2susan.com', 'mail2suzie.com', 'mail2swaziland.com', 'mail2sweden.com', 'mail2sweetheart.com', 'mail2swim.com', 'mail2swimmer.com', 'mail2swiss.com', 'mail2switzerland.com', 'mail2sydney.com', 'mail2sylvia.com', 'mail2syria.com', 'mail2taboo.com', 'mail2taiwan.com', 'mail2tajikistan.com', 'mail2tammy.com', 'mail2tango.com', 'mail2tanya.com', 'mail2tanzania.com', 'mail2tara.com', 'mail2taurus.com', 'mail2taxi.com', 'mail2taxidermist.com', 'mail2taylor.com', 'mail2taz.com', 'mail2teacher.com', 'mail2technician.com', 'mail2ted.com', 'mail2telephone.com', 'mail2teletubbie.com', 'mail2tenderness.com', 'mail2tennessee.com', 'mail2tennis.com', 'mail2tennisfan.com', 'mail2terri.com', 'mail2terry.com', 'mail2test.com', 'mail2texas.com', 'mail2thailand.com', 'mail2therapy.com', 'mail2think.com', 'mail2tickets.com', 'mail2tiffany.com', 'mail2tim.com', 'mail2time.com', 'mail2timothy.com', 'mail2tina.com', 'mail2titanic.com', 'mail2toby.com', 'mail2todd.com', 'mail2togo.com', 'mail2tom.com', 'mail2tommy.com', 'mail2tonga.com', 'mail2tony.com', 'mail2touch.com', 'mail2tourist.com', 'mail2tracey.com', 'mail2tracy.com', 'mail2tramp.com', 'mail2travel.com', 'mail2traveler.com', 'mail2travis.com', 'mail2trekkie.com', 'mail2trex.com', 'mail2triallawyer.com', 'mail2trick.com', 'mail2trillionaire.com', 'mail2troy.com', 'mail2truck.com', 'mail2trump.com', 'mail2try.com', 'mail2tunisia.com', 'mail2turbo.com', 'mail2turkey.com', 'mail2turkmenistan.com', 'mail2tv.com', 'mail2tycoon.com', 'mail2tyler.com', 'mail2u4me.com', 'mail2uae.com', 'mail2uganda.com', 'mail2uk.com', 'mail2ukraine.com', 'mail2uncle.com', 'mail2unsubscribe.com', 'mail2uptown.com', 'mail2uruguay.com', 'mail2usa.com', 'mail2utah.com', 'mail2uzbekistan.com', 'mail2v.com', 'mail2vacation.com', 'mail2valentines.com', 'mail2valerie.com', 'mail2valley.com', 'mail2vamoose.com', 'mail2vanessa.com', 'mail2vanuatu.com', 'mail2venezuela.com', 'mail2venous.com', 'mail2venus.com', 'mail2vermont.com', 'mail2vickie.com', 'mail2victor.com', 'mail2victoria.com', 'mail2vienna.com', 'mail2vietnam.com', 'mail2vince.com', 'mail2virginia.com', 'mail2virgo.com', 'mail2visionary.com', 'mail2vodka.com', 'mail2volleyball.com', 'mail2waiter.com', 'mail2wallstreet.com', 'mail2wally.com', 'mail2walter.com', 'mail2warren.com', 'mail2washington.com', 'mail2wave.com', 'mail2way.com', 'mail2waycool.com', 'mail2wayne.com', 'mail2webmaster.com', 'mail2webtop.com', 'mail2webtv.com', 'mail2weird.com', 'mail2wendell.com', 'mail2wendy.com', 'mail2westend.com', 'mail2westvirginia.com', 'mail2whether.com', 'mail2whip.com', 'mail2white.com', 'mail2whitehouse.com', 'mail2whitney.com', 'mail2why.com', 'mail2wilbur.com', 'mail2wild.com', 'mail2willard.com', 'mail2willie.com', 'mail2wine.com', 'mail2winner.com', 'mail2wired.com', 'mail2wisconsin.com', 'mail2woman.com', 'mail2wonder.com', 'mail2world.com', 'mail2worship.com', 'mail2wow.com', 'mail2www.com', 'mail2wyoming.com', 'mail2xfiles.com', 'mail2xox.com', 'mail2yachtclub.com', 'mail2yahalla.com', 'mail2yemen.com', 'mail2yes.com', 'mail2yugoslavia.com', 'mail2zack.com', 'mail2zambia.com', 'mail2zenith.com', 'mail2zephir.com', 'mail2zeus.com', 'mail2zipper.com', 'mail2zoo.com', 'mail2zoologist.com', 'mail2zurich.com', 'mail3000.com', 'mail333.com', 'mailandftp.com', 'mailandnews.com', 'mailas.com', 'mailasia.com', 'mailbolt.com', 'mailbomb.net', 'mailboom.com', 'mailbox.as', 'mailbox.co.za', 'mailbox.gr', 'mailbox.hu', 'mailbr.com.br', 'mailc.net', 'mailcan.com', 'mailcc.com', 'mailchoose.co', 'mailcity.com', 'mailclub.fr', 'mailclub.net', 'mailexcite.com', 'mailforce.net', 'mailftp.com', 'mailgate.gr', 'mailgenie.net', 'mailhaven.com', 'mailhood.com', 'mailingweb.com', 'mailisent.com', 'mailite.com', 'mailme.dk', 'mailmight.com', 'mailmij.nl', 'mailnew.com', 'mailops.com', 'mailoye.com', 'mailpanda.com', 'mailpost.zzn.com', 'mailpride.com', 'mailpuppy.com', 'mailroom.com', 'mailru.com', 'mailsent.net', 'mailshuttle.com', 'mailstart.com', 'mailstartplus.com', 'mailsurf.com', 'mailtag.com', 'mailto.de', 'mailup.net', 'mailwire.com', 'maktoob.com', 'malayalamtelevision.net', 'manager.de', 'mantrafreenet.com', 'mantramail.com', 'mantraonline.com', 'marchmail.com', 'mariah-carey.ml.org', 'mariahc.com', 'marijuana.nl', 'marketing.lu', 'married-not.com', 'marsattack.com', 'martindalemail.com', 'masrawy.com', 'matmail.com', 'mauimail.com', 'mauritius.com', 'maxleft.com', 'maxmail.co.uk', 'mbox.com.au', 'mchsi.com', 'mciworldcom.net', 'me-mail.hu', 'me.com', 'medical.net.au', 'medione.net', 'medmail.com', 'medscape.com', 'meetingmall.com', 'megago.com', 'megamail.pt', 'megapathdsl.net', 'megapoint.com', 'mehrani.com', 'mehtaweb.com', 'mekhong.com', 'melodymail.com', 'meloo.com', 'members.student.com', 'message.hu', 'messages.to', 'metacrawler.com', 'metalfan.com', 'metta.lk', 'miatadriver.com', 'miesto.sk', 'mighty.co.za', 'miho-nakayama.com', 'mikrotamanet.com', 'millionaireintraining.com', 'milmail.com', 'mindless.com', 'mindspring.com', 'mini-mail.com', 'misery.net', 'mittalweb.com', 'mixmail.com', 'mjfrogmail.com', 'ml1.net', 'mobilbatam.com', 'mochamail.com', 'mohammed.com', 'moldova.cc', 'moldova.com', 'moldovacc.com', 'money.net', 'montevideo.com.uy', 'moonman.com', 'moose-mail.com', 'mortaza.com', 'mosaicfx.com', 'most-wanted.com', 'mostlysunny.com', 'motormania.com', 'movemail.com', 'movieluver.com', 'mp4.it', 'mr-potatohead.com', 'mrpost.com', 'mscold.com', 'msgbox.com', 'msn.com', 'mttestdriver.com', 'mundomail.net', 'munich.com', 'music.com', 'musician.org', 'musicscene.org', 'mybox.it', 'mycabin.com', 'mycampus.com', 'mycity.com', 'mycool.com', 'mydomain.com', 'mydotcomaddress.com', 'myfamily.com', 'mygo.com', 'myiris.com', 'mynamedot.com', 'mynetaddress.com', 'myownemail.com', 'myownfriends.com', 'mypad.com', 'mypersonalemail.com', 'myplace.com', 'myrealbox.com', 'myremarq.com', 'myself.com', 'mystupidjob.com', 'mythirdage.com', 'myway.com', 'myworldmail.com', 'n2.com', 'n2business.com', 'n2mail.com', 'n2software.com', 'nabc.biz', 'nafe.com', 'nagpal.net', 'nakedgreens.com', 'name.com', 'nameplanet.com', 'nandomail.com', 'naplesnews.net', 'naseej.com', 'nate.com', 'nativestar.net', 'nativeweb.net', 'naui.net', 'nauticom.net', 'naver.com', 'navigator.lv', 'navy.org', 'naz.com', 'nchoicemail.com', 'neeva.net', 'nemra1.com', 'nenter.com', 'neo.rr.com', 'nervhq.org', 'net-pager.net', 'net4b.pt', 'net4you.at', 'netbounce.com', 'netbroadcaster.com', 'netby.dk', 'netcenter-vn.net', 'netcom.ca', 'netcom.com', 'netcourrier.com', 'netexecutive.com', 'netexpressway.com', 'netgenie.com', 'netian.com', 'netizen.com.ar', 'netlane.com', 'netlimit.com', 'netmanor.com', 'netmongol.com', 'netnet.com.sg', 'netpiper.com', 'netposta.net', 'netradiomail.com', 'netralink.com', 'netscape.com', 'netscape.net', 'netscapeonline.co.uk', 'netsero.net', 'netspeedway.com', 'netsquare.com', 'netster.com', 'nettaxi.com', 'netzero.com', 'netzero.net', 'neuf.fr', 'newmail.com', 'newmail.net', 'newmail.ru', 'newyork.com', 'nexxmail.com', 'nfmail.com', 'nhmail.com', 'nicebush.com', 'nicegal.com', 'nicholastse.net', 'nicolastse.com', 'nightmail.com', 'nikopage.com', 'nimail.com', 'nirvanafan.com', 'noavar.com', 'norika-fujiwara.com', 'norikomail.com', 'northgates.net', 'nospammail.net', 'ntlworld.com', 'ntscan.com', 'ny.com', 'nyc.com', 'nycmail.com', 'nzoomail.com', 'o-tay.com', 'o2.co.uk', 'oaklandas-fan.com', 'oceanfree.net', 'oddpost.com', 'odmail.com', 'office-email.com', 'officedomain.com', 'offroadwarrior.com', 'oi.com.br', 'oicexchange.com', 'okbank.com', 'okhuman.com', 'okmad.com', 'okmagic.com', 'okname.net', 'okuk.com', 'oldies1041.com', 'oldies104mail.com', 'ole.com', 'olemail.com', 'olg.com', 'olympist.net', 'omaninfo.com', 'onebox.com', 'onenet.com.ar', 'onet.pl', 'oninet.pt', 'online.de', 'online.ie', 'onlinewiz.com', 'onmilwaukee.com', 'onobox.com', 'onvillage.com', 'operafan.com', 'operamail.com', 'optician.com', 'optonline.net', 'optusnet.com.au', 'orange.fr', 'orange.net', 'orbitel.bg', 'orgmail.net', 'osite.com.br', 'oso.com', 'otakumail.com', 'our-computer.com', 'our-office.com', 'our.st', 'ourbrisbane.com', 'ournet.md', 'outel.com', 'outgun.com', 'outlook.com', 'outlook.com.br', 'over-the-rainbow.com', 'ownmail.net', 'ozbytes.net.au', 'ozemail.com.au', 'pacbell.net', 'pacific-re.com', 'packersfan.com', 'pagina.de', 'pagons.org', 'pakistanoye.com', 'palestinemail.com', 'parkjiyoon.com', 'parrot.com', 'parsmail.com', 'partlycloudy.com', 'partynight.at', 'parvazi.com', 'passwordmail.com', 'pathfindermail.com', 'patmedia.net', 'pconnections.net', 'pcpostal.com', 'pcsrock.com', 'peachworld.com', 'pediatrician.com', 'pemail.net', 'penpen.com', 'peoplepc.com', 'peopleweb.com', 'perfectmail.com', 'personal.ro', 'personales.com', 'petml.com', 'pettypool.com', 'pezeshkpour.com', 'phayze.com', 'phreaker.net', 'pickupman.com', 'picusnet.com', 'pigpig.net', 'pinoymail.com', 'pipeline.com', 'piracha.net', 'pisem.net', 'planet-mail.com', 'planet.nl', 'planetaccess.com', 'planetall.com', 'planetarymotion.net', 'planetdirect.com', 'planetearthinter.net', 'planetout.com', 'plasa.com', 'playersodds.com', 'playful.com', 'plusmail.com.br', 'pmail.net', 'pobox.com', 'pobox.hu', 'pobox.sk', 'pochta.ru', 'poczta.fm', 'poetic.com', 'polbox.com', 'policeoffice.com', 'pool-sharks.com', 'poond.com', 'popaccount.com', 'popmail.com', 'popsmail.com', 'popstar.com', 'populus.net', 'portableoffice.com', 'portugalmail.com', 'portugalmail.pt', 'portugalnet.com', 'positive-thinking.com', 'post.com', 'post.cz', 'post.sk', 'posta.net', 'posta.ro', 'postaccesslite.com', 'postafree.com', 'postaweb.com', 'poste.it', 'postinbox.com', 'postino.ch', 'postmark.net', 'postmaster.co.uk', 'postpro.net', 'pousa.com', 'powerfan.com', 'praize.com', 'premiumservice.com', 'presidency.com', 'press.co.jp', 'priest.com', 'primposta.com', 'primposta.hu', 'pro.hu', 'probemail.com', 'prodigy.net', 'prodigy.net.mx', 'progetplus.it', 'programmer.net', 'programozo.hu', 'proinbox.com', 'project2k.com', 'prolaunch.com', 'promessage.com', 'prontomail.com', 'protonmail.com', 'psi.net', 'psv-supporter.com', 'ptd.net', 'public.usa.com', 'publicist.com', 'pulp-fiction.com', 'punkass.com', 'qatarmail.com', 'qis.net', 'qprfans.com', 'qq.com', 'qrio.com', 'quackquack.com', 'quakemail.com', 'qudsmail.com', 'quepasa.com', 'quickwebmail.com', 'quiklinks.com', 'quikmail.com', 'qwest.net', 'qwestoffice.net', 'r-o-o-t.com', 'r7.com', 'raakim.com', 'racedriver.com', 'racefanz.com', 'racingfan.com.au', 'racingmail.com', 'radicalz.com', 'ragingbull.com', 'rambler.ru', 'ranmamail.com', 'rastogi.net', 'ratt-n-roll.com', 'rattle-snake.com', 'ravearena.com', 'ravemail.com', 'razormail.com', 'rccgmail.org', 'rcn.com', 'realemail.net', 'reallyfast.biz', 'realradiomail.com', 'recycler.com', 'rediffmail.com', 'rediffmailpro.com', 'rednecks.com', 'redseven.de', 'redsfans.com', 'reggafan.com', 'registerednurses.com', 'repairman.com', 'reply.hu', 'representative.com', 'rescueteam.com', 'resumemail.com', 'rezai.com', 'richmondhill.com', 'rickymail.com', 'rin.ru', 'riopreto.com.br', 'rn.com', 'roadrunner.com', 'roanokemail.com', 'rock.com', 'rocketmail.com', 'rockfan.com', 'rodrun.com', 'rome.com', 'roosh.com', 'rotfl.com', 'roughnet.com', 'rr.com', 'rrohio.com', 'rsub.com', 'rubyridge.com', 'runbox.com', 'rushpost.com', 'ruttolibero.com', 'rvshop.com', 's-mail.com', 'sabreshockey.com', 'sacbeemail.com', 'safarimail.com', 'safe-mail.net', 'sagra.lu', 'sailormoon.com', 'saintly.com', 'saintmail.net', 'sale-sale-sale.com', 'salehi.net', 'samerica.com', 'samilan.net', 'sammimail.com', 'sanfranmail.com', 'sanook.com', 'sapo.pt', 'sativa.ro.org', 'saudia.com', 'sayhi.net', 'sbcglobal.net', 'scandalmail.com', 'schizo.com', 'schoolemail.com', 'schoolmail.com', 'schoolsucks.com', 'schweiz.org', 'sci.fi', 'science.com.au', 'scientist.com', 'scifianime.com', 'scottishmail.co.uk', 'scubadiving.com', 'seanet.com', 'searchwales.com', 'sebil.com', 'secret-police.com', 'secretservices.net', 'seductive.com', 'seekstoyboy.com', 'seguros.com.br', 'send.hu', 'sendme.cz', 'sent.com', 'sentrismail.com', 'serga.com.ar', 'servemymail.com', 'sesmail.com', 'sexmagnet.com', 'seznam.cz', 'sfr.fr', 'shahweb.net', 'shaniastuff.com', 'sharewaredevelopers.com', 'sharmaweb.com', 'shaw.ca', 'she.com', 'shootmail.com', 'shotgun.hu', 'shuf.com', 'sialkotcity.com', 'sialkotian.com', 'sialkotoye.com', 'sify.com', 'silkroad.net', 'sina.cn', 'sina.com', 'sinamail.com', 'singapore.com', 'singmail.com', 'singnet.com.sg', 'singpost.com', 'skafan.com', 'skim.com', 'skizo.hu', 'sky.com', 'skynet.be', 'slamdunkfan.com', 'slingshot.com', 'slo.net', 'slotter.com', 'smapxsmap.net', 'smileyface.comsmithemail.net', 'smoothmail.com', 'snail-mail.net', 'snail-mail.ney', 'snakemail.com', 'sndt.net', 'sneakemail.com', 'snet.net', 'snip.net', 'sniper.hu', 'snoopymail.com', 'snowboarding.com', 'snowdonia.net', 'socamail.com', 'socceramerica.net', 'soccermail.com', 'soccermomz.com', 'sociologist.com', 'softhome.net', 'sol.dk', 'soldier.hu', 'soon.com', 'soulfoodcookbook.com', 'sp.nl', 'space-bank.com', 'space-man.com', 'space-ship.com', 'space-travel.com', 'space.com', 'spaceart.com', 'spacebank.com', 'spacemart.com', 'spacetowns.com', 'spacewar.com', 'spamex.com', 'spartapiet.com', 'spazmail.com', 'speedemail.net', 'speedpost.net', 'speedrules.com', 'speedrulz.com', 'speedy.com.ar', 'spils.com', 'spinfinder.com', 'sportemail.com', 'sportsmail.com', 'sporttruckdriver.com', 'spray.no', 'spray.se', 'sprintmail.com', 'sprynet.com', 'spymac.com', 'srilankan.net', 'st-davids.net', 'stade.fr', 'stalag13.com', 'stargateradio.com', 'starmail.com', 'starmail.org', 'starmedia.com', 'starplace.com', 'starpower.net', 'starspath.com', 'start.com.au', 'starting-point.com', 'startrekmail.com', 'stealthmail.com', 'stockracer.com', 'stones.com', 'stopdropandroll.com', 'storksite.com', 'stribmail.com', 'strompost.com', 'strongguy.com', 'studentcenter.org', 'subnetwork.com', 'subram.com', 'sudanmail.net', 'suhabi.com', 'suisse.org', 'sukhumvit.net', 'sunpoint.net', 'sunrise-sunset.com', 'sunsgame.com', 'sunumail.sn', 'superdada.com', 'supereva.it', 'supermail.ru', 'surat.com', 'surf3.net', 'surfree.com', 'surfy.net', 'surimail.com', 'survivormail.com', 'swbell.net', 'sweb.cz', 'swiftdesk.com', 'swingeasyhithard.com', 'swingfan.com', 'swipermail.zzn.com', 'swirve.com', 'swissinfo.org', 'swissmail.net', 'switchboardmail.com', 'switzerland.org', 'swva.net', 'sx172.com', 'sympatico.ca', 'syom.com', 'syriamail.com', 't-online.de', 't2mail.com', 'takuyakimura.com', 'talk21.com', 'talkcity.com', 'talktalk.co.uk', 'tamil.com', 'tampabay.rr.com', 'tatanova.com', 'tbwt.com', 'tds.net', 'teamdiscovery.com', 'teamtulsa.net', 'tech4peace.org', 'techemail.com', 'techie.com', 'technisamail.co.za', 'technologist.com', 'techpointer.com', 'techscout.com', 'techseek.com', 'techspot.com', 'teenagedirtbag.com', 'telebot.com', 'telebot.net', 'teleline.es', 'telenet.be', 'telerymd.com', 'teleserve.dynip.com', 'teletu.it', 'telinco.net', 'telkom.net', 'telpage.net', 'telus.net', 'temtulsa.net', 'tenchiclub.com', 'tenderkiss.com', 'tennismail.com', 'terra.cl', 'terra.com', 'terra.com.ar', 'terra.com.br', 'terra.es', 'tfanus.com.er', 'tfz.net', 'thai.com', 'thaimail.com', 'thaimail.net', 'the-african.com', 'the-airforce.com', 'the-aliens.com', 'the-american.com', 'the-animal.com', 'the-army.com', 'the-astronaut.com', 'the-beauty.com', 'the-big-apple.com', 'the-biker.com', 'the-boss.com', 'the-brazilian.com', 'the-canadian.com', 'the-canuck.com', 'the-captain.com', 'the-chinese.com', 'the-country.com', 'the-cowboy.com', 'the-davis-home.com', 'the-dutchman.com', 'the-eagles.com', 'the-englishman.com', 'the-fastest.net', 'the-fool.com', 'the-frenchman.com', 'the-galaxy.net', 'the-genius.com', 'the-gentleman.com', 'the-german.com', 'the-gremlin.com', 'the-hooligan.com', 'the-italian.com', 'the-japanese.com', 'the-lair.com', 'the-madman.com', 'the-mailinglist.com', 'the-marine.com', 'the-master.com', 'the-mexican.com', 'the-ministry.com', 'the-monkey.com', 'the-newsletter.net', 'the-pentagon.com', 'the-police.com', 'the-prayer.com', 'the-professional.com', 'the-quickest.com', 'the-russian.com', 'the-snake.com', 'the-spaceman.com', 'the-stock-market.com', 'the-student.net', 'the-whitehouse.net', 'the-wild-west.com', 'the18th.com', 'thecoolguy.com', 'thecriminals.com', 'thedoghousemail.com', 'thedorm.com', 'theend.hu', 'theglobe.com', 'thegolfcourse.com', 'thegooner.com', 'theheadoffice.com', 'thelanddownunder.com', 'themillionare.net', 'theoffice.net', 'thepokerface.com', 'thepostmaster.net', 'theraces.com', 'theracetrack.com', 'thestreetfighter.com', 'theteebox.com', 'thewatercooler.com', 'thewebpros.co.uk', 'thewizzard.com', 'thewizzkid.com', 'thezhangs.net', 'thirdage.com', 'thisgirl.com', 'thoic.com', 'thundermail.com', 'tidni.com', 'timein.net', 'tin.it', 'tiscali.at', 'tiscali.be', 'tiscali.co.uk', 'tiscali.it', 'tiscali.lu', 'tiscali.se', 'tkcity.com', 'toolsource.com', 'topchat.com', 'topgamers.co.uk', 'topletter.com', 'topmail.com.ar', 'topsurf.com', 'topteam.bg', 'torchmail.com', 'tot.net', 'totalmusic.net', 'toughguy.net', 'tpg.com.au', 'travel.li', 'trialbytrivia.com', 'tritium.net', 'trmailbox.com', 'tropicalstorm.com', 'truckers.com', 'truckerz.com', 'truckracer.com', 'trust-me.com', 'tsamail.co.za', 'ttml.co.in', 'tunisiamail.com', 'turkey.com', 'tvcablenet.be', 'twinstarsmail.com', 'tycoonmail.com', 'typemail.com', 'u2club.com', 'uae.ac', 'uaemail.com', 'ubbi.com', 'ubbi.com.br', 'uboot.com', 'uk2k.com', 'uk2net.com', 'uk7.net', 'uk8.net', 'ukbuilder.com', 'ukcool.com', 'ukdreamcast.com', 'ukmail.org', 'ukmax.com', 'ukr.net', 'uku.co.uk', 'ultapulta.com', 'ultrapostman.com', 'ummah.org', 'umpire.com', 'unbounded.com', 'unforgettable.com', 'uni.de', 'unican.es', 'unihome.com', 'universal.pt', 'uno.ee', 'uno.it', 'unofree.it', 'unomail.com', 'uol.com.ar', 'uol.com.br', 'uol.com.co', 'uol.com.mx', 'uol.com.ve', 'uole.com', 'uole.com.ve', 'uolmail.com', 'uomail.com', 'upf.org', 'ureach.com', 'urgentmail.biz', 'usa.com', 'usa.net', 'usaaccess.net', 'usanetmail.com', 'usermail.com', 'usit.net', 'usma.net', 'usmc.net', 'uswestmail.net', 'uu.net', 'uymail.com', 'uyuyuy.com', 'v-sexi.com', 'vahoo.com', 'varbizmail.com', 'vcmail.com', 'velnet.co.uk', 'velocall.com', 'verizon.net', 'verizonmail.com', 'veryfast.biz', 'veryspeedy.net', 'videotron.ca', 'violinmakers.co.uk', 'vip.gr', 'vipmail.ru', 'virgilio.it', 'virgin.net', 'virginmedia.com', 'virtualactive.com', 'virtualmail.com', 'visitmail.com', 'visitweb.com', 'visto.com', 'visualcities.com', 'vivavelocity.com', 'vivianhsu.net', 'vjmail.com', 'vjtimail.com', 'vlmail.com', 'vnn.vn', 'voila.fr', 'volcanomail.com', 'voo.be', 'vote-democrats.com', 'vote-hillary.com', 'vote-republicans.com', 'vote4gop.org', 'votenet.com', 'vr9.com', 'w3.to', 'wahoye.com', 'wales2000.net', 'wam.co.za', 'wanadoo.co.uk', 'wanadoo.es', 'wanadoo.fr', 'warmmail.com', 'warpmail.net', 'warrior.hu', 'waumail.com', 'wbdet.com', 'wearab.net', 'web-mail.com.ar', 'web-police.com', 'web.de', 'webave.com', 'webcammail.com', 'webcity.ca', 'webdream.com', 'webinbox.com', 'webindia123.com', 'webjump.com', 'webmail.bellsouth.net', 'webmail.co.yu', 'webmail.co.za', 'webmail.hu', 'webmails.com', 'webprogramming.com', 'webstable.net', 'webstation.com', 'websurfer.co.za', 'webtopmail.com', 'weedmail.com', 'weekmail.com', 'weekonline.com', 'wehshee.com', 'welsh-lady.com', 'whale-mail.com', 'whartontx.com', 'wheelweb.com', 'whipmail.com', 'whoever.com', 'whoopymail.com', 'wickedmail.com', 'wideopenwest.com', 'wildmail.com', 'windrivers.net', 'windstream.net', 'wingnutz.com', 'winmail.com.au', 'winning.com', 'witty.com', 'wiz.cc', 'wkbwmail.com', 'woh.rr.com', 'wolf-web.com', 'wombles.com', 'wonder-net.com', 'wongfaye.com', 'wooow.it', 'workmail.com', 'worldemail.com', 'worldmailer.com', 'worldnet.att.net', 'wosaddict.com', 'wouldilie.com', 'wow.com', 'wowgirl.com', 'wowmail.com', 'wowway.com', 'wp.pl', 'wptamail.com', 'wrestlingpages.com', 'wrexham.net', 'writeme.com', 'writemeback.com', 'wrongmail.com', 'wtvhmail.com', 'wwdg.com', 'www.com', 'www2000.net', 'wx88.net', 'wxs.net', 'wyrm.supernews.com', 'x-mail.net', 'x-networks.net', 'x5g.com', 'xmastime.com', 'xmsg.com', 'xoom.com', 'xoommail.com', 'xpressmail.zzn.com', 'xsmail.com', 'xuno.com', 'xzapmail.com', 'ya.ru', 'yada-yada.com', 'yaho.com', 'yahoo.ca', 'yahoo.co.id', 'yahoo.co.in', 'yahoo.co.jp', 'yahoo.co.kr', 'yahoo.co.nz', 'yahoo.co.uk', 'yahoo.com', 'yahoo.com.ar', 'yahoo.com.au', 'yahoo.com.br', 'yahoo.com.cn', 'yahoo.com.hk', 'yahoo.com.is', 'yahoo.com.mx', 'yahoo.com.ph', 'yahoo.com.ru', 'yahoo.com.sg', 'yahoo.de', 'yahoo.dk', 'yahoo.es', 'yahoo.fr', 'yahoo.ie', 'yahoo.in', 'yahoo.it', 'yahoo.jp', 'yahoo.ru', 'yahoo.se', 'yahoofs.com', 'yalla.com', 'yalla.com.lb', 'yalook.com', 'yam.com', 'yandex.com', 'yandex.ru', 'yapost.com', 'yawmail.com', 'yclub.com', 'yebox.com', 'yehaa.com', 'yehey.com', 'yemenmail.com', 'yepmail.net', 'yesbox.net', 'ygm.com', 'yifan.net', 'ymail.com', 'ynnmail.com', 'yogotemail.com', 'yopolis.com', 'youareadork.com', 'youpy.com', 'your-house.com', 'yourinbox.com', 'yourlover.net', 'yourname.ddns.org', 'yourname.freeservers.com', 'yournightmare.com', 'yours.com', 'yourssincerely.com', 'yoursubdomain.findhere.com', 'yoursubdomain.zzn.com', 'yourteacher.net', 'yourwap.com', 'youvegotmail.net', 'yuuhuu.net', 'yyhmail.com', 'zahadum.com', 'zcities.com', 'zdnetmail.com', 'zeeks.com', 'zeepost.nl', 'zensearch.net', 'zhaowei.net', 'zionweb.org', 'zip.net', 'zipido.com', 'ziplink.net', 'ziplip.com', 'zipmail.com', 'zipmail.com.br', 'zipmax.com', 'zmail.ru', 'zoho.com', 'zonnet.nl', 'zoominternet.net', 'zubee.com', 'zuvio.com', 'zuzzurello.com', 'zwallet.com', 'zybermail.com', 'zydecofan.com', 'zzn.com', 'zzom.co.uk'];
|
|
395
395
|
|
|
396
|
-
const
|
|
396
|
+
const doA11yValidation = (v, field, formValidationSent) => {
|
|
397
|
+
const error = doValidateField(field, v);
|
|
398
|
+
if (JSON.stringify(field.validations) !== '{}') {
|
|
399
|
+
if (((v === null || v === void 0 ? void 0 : v.length) >= 1 || formValidationSent) && (error === null || error === void 0 ? void 0 : error.fieldId) === field.id) return 'true';else if ((v === null || v === void 0 ? void 0 : v.length) >= 1) return 'false';else return '';
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
const doValidateField = (field, value) => {
|
|
397
403
|
var _field$validations, _field$validations$re;
|
|
398
|
-
|
|
399
404
|
const isRequired = field.validations && field.validations.required;
|
|
400
405
|
const minLength = field.validations && field.validations.minLength;
|
|
401
406
|
const maxLength = field.validations && field.validations.maxLength;
|
|
@@ -403,10 +408,8 @@ const validateInput = (field, value) => {
|
|
|
403
408
|
const integer = field.dataType === 'integer';
|
|
404
409
|
const decimal = field.dataType === 'decimal';
|
|
405
410
|
const isBusinessEmail = field.id === 'businessEmail';
|
|
406
|
-
|
|
407
|
-
if (isRequired && !value) {
|
|
411
|
+
if (isRequired && (value === null || value === void 0 ? void 0 : value.length) <= 0) {
|
|
408
412
|
var _isRequired$message, _field$name;
|
|
409
|
-
|
|
410
413
|
const errorMessage = (isRequired === null || isRequired === void 0 ? void 0 : (_isRequired$message = isRequired.message) === null || _isRequired$message === void 0 ? void 0 : _isRequired$message['en-GB']) || `${(_field$name = field.name) === null || _field$name === void 0 ? void 0 : _field$name['en-GB']} is required`;
|
|
411
414
|
return {
|
|
412
415
|
fieldId: field.id,
|
|
@@ -414,7 +417,6 @@ const validateInput = (field, value) => {
|
|
|
414
417
|
message: errorMessage
|
|
415
418
|
};
|
|
416
419
|
}
|
|
417
|
-
|
|
418
420
|
if (minLength && minLength.value > value.length) {
|
|
419
421
|
const errorMessage = minLength.message ? minLength.message['en-GB'] : `Minimum characters ${minLength.value}`;
|
|
420
422
|
return {
|
|
@@ -423,7 +425,6 @@ const validateInput = (field, value) => {
|
|
|
423
425
|
message: errorMessage
|
|
424
426
|
};
|
|
425
427
|
}
|
|
426
|
-
|
|
427
428
|
if (maxLength && maxLength.value < value.length) {
|
|
428
429
|
const errorMessage = maxLength.message && maxLength.message['en-GB'] ? maxLength.message['en-GB'] : `Maximum characters ${maxLength.value}`;
|
|
429
430
|
return {
|
|
@@ -433,14 +434,10 @@ const validateInput = (field, value) => {
|
|
|
433
434
|
};
|
|
434
435
|
}
|
|
435
436
|
/** Check Regex and Business Emails */
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
if (hasRegex && (value === null || value === void 0 ? void 0 : value.length) > 0) {
|
|
437
|
+
if (hasRegex && value.length >= 1) {
|
|
439
438
|
var _r$message;
|
|
440
|
-
|
|
441
439
|
const r = field.validations.regex;
|
|
442
440
|
const msg = (r === null || r === void 0 ? void 0 : (_r$message = r.message) === null || _r$message === void 0 ? void 0 : _r$message['en-GB']) || `${field.name['en-GB']} is invalid`;
|
|
443
|
-
|
|
444
441
|
if (isValidRegex(field, value) && isBusinessEmail) {
|
|
445
442
|
if (!isBusinessEmailValid(field, value)) {
|
|
446
443
|
return {
|
|
@@ -457,10 +454,8 @@ const validateInput = (field, value) => {
|
|
|
457
454
|
};
|
|
458
455
|
}
|
|
459
456
|
}
|
|
460
|
-
|
|
461
457
|
if (integer) {
|
|
462
458
|
const isInteger = value % 1 === 0;
|
|
463
|
-
|
|
464
459
|
if (!isInteger) {
|
|
465
460
|
const errorMessage = `${value} is not an ${field.dataType}`;
|
|
466
461
|
return {
|
|
@@ -470,10 +465,8 @@ const validateInput = (field, value) => {
|
|
|
470
465
|
};
|
|
471
466
|
}
|
|
472
467
|
}
|
|
473
|
-
|
|
474
468
|
if (decimal) {
|
|
475
469
|
const isDecimal = value % 1 !== 0;
|
|
476
|
-
|
|
477
470
|
if (!isDecimal) {
|
|
478
471
|
const errorMessage = `${value} is not an ${field.dataType}`;
|
|
479
472
|
return {
|
|
@@ -484,23 +477,69 @@ const validateInput = (field, value) => {
|
|
|
484
477
|
}
|
|
485
478
|
}
|
|
486
479
|
};
|
|
487
|
-
|
|
488
480
|
const isValidRegex = (field, value) => {
|
|
489
481
|
const regex = field.validations.regex.pattern;
|
|
490
482
|
const regexPattern = RegExp(regex);
|
|
491
483
|
if (!regexPattern.test(value)) return false;else return true;
|
|
492
484
|
};
|
|
493
|
-
|
|
494
485
|
const isBusinessEmailValid = (field, value) => {
|
|
495
486
|
const domain = value.split('@').pop();
|
|
496
487
|
if (!domains.includes(domain)) return true;else return false;
|
|
497
488
|
};
|
|
498
489
|
|
|
499
|
-
const
|
|
490
|
+
const doCreateMessage = (type, minLength, maxLength, currentLength, defaultLanguage) => {
|
|
491
|
+
if (!type) return null;
|
|
492
|
+
switch (type) {
|
|
493
|
+
case 'min':
|
|
494
|
+
{
|
|
495
|
+
if (!minLength) return;
|
|
496
|
+
const minLengthVal = minLength && minLength.value;
|
|
497
|
+
const errorMessage = minLength && minLength.message && minLength.message[defaultLanguage];
|
|
498
|
+
const minText = `Minimum of ${minLengthVal.toString()} characters`;
|
|
499
|
+
if (errorMessage) {
|
|
500
|
+
return errorMessage;
|
|
501
|
+
} else {
|
|
502
|
+
return minText;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
case 'max':
|
|
506
|
+
{
|
|
507
|
+
if (!maxLength) return;
|
|
508
|
+
const maxLengthVal = maxLength && maxLength.value;
|
|
509
|
+
const errorMessage = maxLength && maxLength.message && maxLength.message[defaultLanguage];
|
|
510
|
+
const maxText = `Maximum of ${maxLengthVal.toString()} characters`;
|
|
511
|
+
if (errorMessage) {
|
|
512
|
+
return errorMessage;
|
|
513
|
+
} else {
|
|
514
|
+
return maxText;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
case 'between':
|
|
518
|
+
{
|
|
519
|
+
if (!maxLength || !minLength) return;
|
|
520
|
+
const minLengthVal = minLength && minLength.value;
|
|
521
|
+
const maxLengthVal = maxLength && maxLength.value;
|
|
522
|
+
const errorMessage = minLength && minLength.message && minLength.message[defaultLanguage];
|
|
523
|
+
const rangeText = `Between ${minLengthVal.toString()}-${maxLengthVal.toString()} characters)`;
|
|
524
|
+
if (errorMessage) {
|
|
525
|
+
return errorMessage;
|
|
526
|
+
} else if (currentLength < minLengthVal) {
|
|
527
|
+
return `${(minLengthVal - currentLength).toString()} character${minLengthVal > 1 ? 's' : ''} required ${rangeText}`;
|
|
528
|
+
} else if (currentLength > maxLengthVal) {
|
|
529
|
+
return `${(currentLength - maxLengthVal).toString()} character${currentLength - maxLengthVal > 1 ? 's' : ''} over ${rangeText}`;
|
|
530
|
+
} else if (currentLength) {
|
|
531
|
+
return `${(maxLengthVal - currentLength).toString()} characters remaining ${rangeText}`;
|
|
532
|
+
} else {
|
|
533
|
+
return rangeText;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
default:
|
|
537
|
+
return null;
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
const getFieldType = field => {
|
|
500
541
|
var _field$editor, _field$editor$propert;
|
|
501
|
-
|
|
502
542
|
if (!field) return null;
|
|
503
|
-
|
|
504
543
|
if (field.dataType === 'string' && field.editor && field.editor.id === 'multiline') {
|
|
505
544
|
return 'textarea';
|
|
506
545
|
} else if (field.dataType === 'string' && field.editor && field.editor.id === 'list-dropdown') {
|
|
@@ -524,28 +563,25 @@ const MakeFieldType = field => {
|
|
|
524
563
|
}
|
|
525
564
|
};
|
|
526
565
|
|
|
527
|
-
const
|
|
528
|
-
|
|
529
|
-
function* validateForm(action) {
|
|
566
|
+
const sagas = [effects.takeEvery(SUBMIT_FORM_SUCCESS, onFormSuccess), effects.takeEvery(SUBMIT_FORM_FOR_VALIDATION, doValidateForm), effects.takeEvery(SUBMIT_FORM, onSubmitForm), effects.takeEvery(SET_FORM_ID, doFetchForm), effects.takeLatest(VALIDATE_FIELD, onValidateField$1), effects.takeEvery(PAGE_FORWARD, doTogglePage), effects.takeEvery(PAGE_BACK, doTogglePage), effects.takeEvery(SET_FORM_DATA, getEntryPickerData), effects.takeLatest(SET_FORM_DATA, setDefaultValueFields)];
|
|
567
|
+
function* doValidateForm(action) {
|
|
530
568
|
const {
|
|
531
569
|
formId
|
|
532
570
|
} = action;
|
|
533
|
-
yield
|
|
571
|
+
yield onValidateAllFields(formId);
|
|
534
572
|
yield effects.put({
|
|
535
573
|
type: SUBMIT_FORM,
|
|
536
574
|
formId
|
|
537
575
|
});
|
|
538
576
|
}
|
|
539
|
-
|
|
540
|
-
function* validateField$1(action) {
|
|
577
|
+
function* onValidateField$1(action) {
|
|
541
578
|
const {
|
|
542
579
|
formId,
|
|
543
580
|
id,
|
|
544
581
|
value
|
|
545
582
|
} = action;
|
|
546
|
-
yield effects.call(
|
|
583
|
+
if ((value === null || value === void 0 ? void 0 : value.length) >= 1) yield effects.call(onValidateSingleField, formId, id, value);
|
|
547
584
|
}
|
|
548
|
-
|
|
549
585
|
function* validateGroupfields(formId, groupId) {
|
|
550
586
|
const state = yield effects.select();
|
|
551
587
|
const selectPostData = makeSelectFormPostData(formId);
|
|
@@ -556,12 +592,10 @@ function* validateGroupfields(formId, groupId) {
|
|
|
556
592
|
let newErrors = [];
|
|
557
593
|
groupFields.forEach(field => {
|
|
558
594
|
let val = '';
|
|
559
|
-
|
|
560
595
|
if (postData[field.id]) {
|
|
561
596
|
val = postData[field.id];
|
|
562
597
|
}
|
|
563
|
-
|
|
564
|
-
const err = validateInput(field, val);
|
|
598
|
+
const err = doValidateField(field, val);
|
|
565
599
|
if (err) newErrors.push(err);
|
|
566
600
|
});
|
|
567
601
|
yield effects.put({
|
|
@@ -570,8 +604,7 @@ function* validateGroupfields(formId, groupId) {
|
|
|
570
604
|
value: newErrors
|
|
571
605
|
});
|
|
572
606
|
}
|
|
573
|
-
|
|
574
|
-
function* validateAllfields(formId) {
|
|
607
|
+
function* onValidateAllFields(formId) {
|
|
575
608
|
const state = yield effects.select();
|
|
576
609
|
const selectPostData = makeSelectFormPostData(formId);
|
|
577
610
|
const postData = selectPostData(state);
|
|
@@ -580,12 +613,10 @@ function* validateAllfields(formId) {
|
|
|
580
613
|
let newErrors = [];
|
|
581
614
|
fields.forEach(field => {
|
|
582
615
|
let val = '';
|
|
583
|
-
|
|
584
616
|
if (postData[field.id]) {
|
|
585
617
|
val = postData[field.id];
|
|
586
618
|
}
|
|
587
|
-
|
|
588
|
-
const err = validateInput(field, val);
|
|
619
|
+
const err = doValidateField(field, val);
|
|
589
620
|
if (err) newErrors.push(err);
|
|
590
621
|
});
|
|
591
622
|
yield effects.put({
|
|
@@ -594,23 +625,22 @@ function* validateAllfields(formId) {
|
|
|
594
625
|
value: newErrors
|
|
595
626
|
});
|
|
596
627
|
}
|
|
597
|
-
|
|
598
|
-
function* validateSingleField(formId, fieldId, value) {
|
|
628
|
+
function* onValidateSingleField(formId, fieldId, value) {
|
|
599
629
|
const state = yield effects.select();
|
|
600
630
|
const selectFormFields = makeSelectFormFields(formId);
|
|
601
631
|
const fields = selectFormFields(state);
|
|
602
632
|
const selectFormFieldErrors = makeSelectFormFieldErrors(formId);
|
|
603
633
|
const errors = selectFormFieldErrors(state);
|
|
604
634
|
const fieldData = fields.find(f => f.id == fieldId);
|
|
605
|
-
const newErrors = [];
|
|
606
|
-
|
|
635
|
+
const newErrors = [];
|
|
636
|
+
//loop through current errors to remove any of the item we currently edit
|
|
607
637
|
errors.forEach(error => {
|
|
608
638
|
if (error.fieldId !== fieldId) {
|
|
609
639
|
//push any existing errors to new array
|
|
610
640
|
newErrors.push(error);
|
|
611
641
|
}
|
|
612
642
|
});
|
|
613
|
-
const err =
|
|
643
|
+
const err = doValidateField(fieldData, value);
|
|
614
644
|
if (err) newErrors.push(err);
|
|
615
645
|
yield effects.put({
|
|
616
646
|
type: SET_FIELD_ERROR,
|
|
@@ -618,8 +648,7 @@ function* validateSingleField(formId, fieldId, value) {
|
|
|
618
648
|
value: newErrors
|
|
619
649
|
});
|
|
620
650
|
}
|
|
621
|
-
|
|
622
|
-
function* togglePage(action) {
|
|
651
|
+
function* doTogglePage(action) {
|
|
623
652
|
const {
|
|
624
653
|
formId,
|
|
625
654
|
pageIndex
|
|
@@ -627,11 +656,9 @@ function* togglePage(action) {
|
|
|
627
656
|
const state = yield effects.select();
|
|
628
657
|
const selectFormGroups = makeSelectFormGroup(formId);
|
|
629
658
|
const formGroups = selectFormGroups(state);
|
|
630
|
-
|
|
631
659
|
if (action.type === PAGE_FORWARD) {
|
|
632
660
|
yield validateGroupfields(formId, formGroups[pageIndex].id);
|
|
633
661
|
}
|
|
634
|
-
|
|
635
662
|
yield effects.put({
|
|
636
663
|
type: SET_CURRENT_PAGE,
|
|
637
664
|
formId: formId,
|
|
@@ -640,17 +667,13 @@ function* togglePage(action) {
|
|
|
640
667
|
pageIndex: pageIndex
|
|
641
668
|
});
|
|
642
669
|
}
|
|
643
|
-
|
|
644
|
-
function* fetchForm(action) {
|
|
670
|
+
function* doFetchForm(action) {
|
|
645
671
|
var _schema$groups;
|
|
646
|
-
|
|
647
672
|
const formId = action.formId;
|
|
648
673
|
const schema = yield getFormSchema(formId);
|
|
649
674
|
const groups = schema === null || schema === void 0 ? void 0 : (_schema$groups = schema.groups) === null || _schema$groups === void 0 ? void 0 : _schema$groups.filter(group => group.id !== 'private' && group.id !== 'settings');
|
|
650
|
-
|
|
651
675
|
if (formId && schema) {
|
|
652
676
|
var _schema$groups2, _submitButtonText$def;
|
|
653
|
-
|
|
654
677
|
if ((schema === null || schema === void 0 ? void 0 : (_schema$groups2 = schema.groups) === null || _schema$groups2 === void 0 ? void 0 : _schema$groups2.length) > 0) {
|
|
655
678
|
yield effects.put({
|
|
656
679
|
type: SET_CURRENT_PAGE,
|
|
@@ -660,11 +683,11 @@ function* fetchForm(action) {
|
|
|
660
683
|
pageCount: groups.length
|
|
661
684
|
});
|
|
662
685
|
}
|
|
663
|
-
|
|
664
686
|
const submitButtonText = schema.fields.find(f => f.id === 'submitButtonText');
|
|
665
687
|
const fields = schema === null || schema === void 0 ? void 0 : schema.fields.map(field => {
|
|
666
|
-
return {
|
|
667
|
-
|
|
688
|
+
return {
|
|
689
|
+
...field,
|
|
690
|
+
type: getFieldType(field)
|
|
668
691
|
};
|
|
669
692
|
});
|
|
670
693
|
yield effects.put({
|
|
@@ -679,18 +702,15 @@ function* fetchForm(action) {
|
|
|
679
702
|
});
|
|
680
703
|
}
|
|
681
704
|
}
|
|
682
|
-
|
|
683
|
-
function* formSuccess(action) {
|
|
705
|
+
function* onFormSuccess(action) {
|
|
684
706
|
const state = yield effects.select();
|
|
685
707
|
const selectFormFields = makeSelectFormFields(action.formId);
|
|
686
708
|
const fields = selectFormFields(state);
|
|
687
709
|
const redirect = fields.find(f => f.id === 'formSettingsRedirect');
|
|
688
710
|
const message = fields.find(f => f.id === 'formSettingsMessage');
|
|
689
|
-
|
|
690
711
|
if (redirect !== null && redirect !== void 0 && redirect.default) {
|
|
691
712
|
window.location.href = redirect.default['en-GB'];
|
|
692
713
|
}
|
|
693
|
-
|
|
694
714
|
if (message !== null && message !== void 0 && message.default) {
|
|
695
715
|
yield effects.put({
|
|
696
716
|
type: SET_SUCCESS_MESSAGE,
|
|
@@ -699,8 +719,7 @@ function* formSuccess(action) {
|
|
|
699
719
|
});
|
|
700
720
|
}
|
|
701
721
|
}
|
|
702
|
-
|
|
703
|
-
function* submitForm$1(action) {
|
|
722
|
+
function* onSubmitForm(action) {
|
|
704
723
|
const {
|
|
705
724
|
formId
|
|
706
725
|
} = action || {};
|
|
@@ -708,10 +727,8 @@ function* submitForm$1(action) {
|
|
|
708
727
|
const selectFormFieldErrors = makeSelectFormFieldErrors(formId);
|
|
709
728
|
const errors = selectFormFieldErrors(state);
|
|
710
729
|
const canSubmit = (errors === null || errors === void 0 ? void 0 : errors.length) === 0;
|
|
711
|
-
|
|
712
730
|
if (canSubmit) {
|
|
713
731
|
var _formResObj$sys;
|
|
714
|
-
|
|
715
732
|
yield effects.put({
|
|
716
733
|
type: SET_SUBMITTING_FORM,
|
|
717
734
|
isSubmitting: true,
|
|
@@ -724,7 +741,6 @@ function* submitForm$1(action) {
|
|
|
724
741
|
formPost: rawData.data
|
|
725
742
|
};
|
|
726
743
|
const formResObj = yield postForm(formObj);
|
|
727
|
-
|
|
728
744
|
if (formResObj !== null && formResObj !== void 0 && (_formResObj$sys = formResObj.sys) !== null && _formResObj$sys !== void 0 && _formResObj$sys.id) {
|
|
729
745
|
yield effects.put({
|
|
730
746
|
type: SUBMIT_FORM_SUCCESS,
|
|
@@ -738,7 +754,6 @@ function* submitForm$1(action) {
|
|
|
738
754
|
}
|
|
739
755
|
}
|
|
740
756
|
}
|
|
741
|
-
|
|
742
757
|
function* setDefaultValueFields(action) {
|
|
743
758
|
const {
|
|
744
759
|
formId,
|
|
@@ -750,15 +765,12 @@ function* setDefaultValueFields(action) {
|
|
|
750
765
|
fields.forEach(field => {
|
|
751
766
|
if (field.dataType == 'string' && field.default) {
|
|
752
767
|
const val = field.default[defaultLanguage];
|
|
753
|
-
|
|
754
768
|
if (val) {
|
|
755
769
|
fieldObj[field.id] = val;
|
|
756
770
|
}
|
|
757
771
|
}
|
|
758
|
-
|
|
759
772
|
if (field.id == 'sourceEntry') {
|
|
760
773
|
const val = entryId;
|
|
761
|
-
|
|
762
774
|
if (val) {
|
|
763
775
|
fieldObj[field.id] = val;
|
|
764
776
|
}
|
|
@@ -770,7 +782,6 @@ function* setDefaultValueFields(action) {
|
|
|
770
782
|
value: fieldObj
|
|
771
783
|
});
|
|
772
784
|
}
|
|
773
|
-
|
|
774
785
|
function* getEntryPickerData(action) {
|
|
775
786
|
const {
|
|
776
787
|
formId,
|
|
@@ -778,7 +789,6 @@ function* getEntryPickerData(action) {
|
|
|
778
789
|
} = action;
|
|
779
790
|
const entriesToGet = fields.filter(f => f.dataFormat == 'entry');
|
|
780
791
|
let entriesList = [];
|
|
781
|
-
|
|
782
792
|
if (entriesToGet) {
|
|
783
793
|
entriesList = yield effects.all(entriesToGet.map(entry => {
|
|
784
794
|
const entriesObj = {
|
|
@@ -801,8 +811,7 @@ const action = (type, payload = {}) => ({
|
|
|
801
811
|
type,
|
|
802
812
|
...payload
|
|
803
813
|
});
|
|
804
|
-
|
|
805
|
-
const submitForm = formId => action(SUBMIT_FORM_FOR_VALIDATION, {
|
|
814
|
+
const onSubmit = formId => action(SUBMIT_FORM_FOR_VALIDATION, {
|
|
806
815
|
formId
|
|
807
816
|
});
|
|
808
817
|
const setFormId = formId => action(SET_FORM_ID, {
|
|
@@ -825,66 +834,87 @@ const setDateRangeValues = (formId, id, dateType, value) => action(SET_DATE_RANG
|
|
|
825
834
|
dateType,
|
|
826
835
|
value
|
|
827
836
|
});
|
|
828
|
-
const
|
|
837
|
+
const onValidateField = (formId, id, value) => action(VALIDATE_FIELD, {
|
|
829
838
|
formId,
|
|
830
839
|
id,
|
|
831
840
|
value
|
|
832
841
|
});
|
|
833
|
-
const
|
|
842
|
+
const doTogglePageForward = (formId, pageIndex) => action(PAGE_FORWARD, {
|
|
834
843
|
formId,
|
|
835
844
|
pageIndex
|
|
836
845
|
});
|
|
837
|
-
const
|
|
846
|
+
const doTogglePageBack = (formId, pageIndex) => action(PAGE_BACK, {
|
|
838
847
|
formId,
|
|
839
848
|
pageIndex
|
|
840
849
|
});
|
|
841
850
|
const actions = {
|
|
842
|
-
|
|
851
|
+
onSubmit,
|
|
843
852
|
setFormId,
|
|
844
853
|
setValue,
|
|
845
854
|
setCheckboxValue,
|
|
846
855
|
setDateRangeValues,
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
856
|
+
onValidateField,
|
|
857
|
+
doTogglePageForward,
|
|
858
|
+
doTogglePageBack
|
|
850
859
|
};
|
|
851
860
|
|
|
852
|
-
|
|
853
|
-
const
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
861
|
+
const ThemeContext = /*#__PURE__*/React.createContext();
|
|
862
|
+
const ThemeProvider = ({
|
|
863
|
+
children,
|
|
864
|
+
theme
|
|
865
|
+
}) => {
|
|
866
|
+
return /*#__PURE__*/React__default["default"].createElement(ThemeContext.Provider, {
|
|
867
|
+
value: ""
|
|
868
|
+
}, /*#__PURE__*/React__default["default"].createElement(styled.ThemeProvider, {
|
|
869
|
+
theme: theme
|
|
870
|
+
}, children));
|
|
871
|
+
};
|
|
872
|
+
ThemeProvider.propTypes = {
|
|
873
|
+
children: PropTypes__default["default"].oneOfType([PropTypes__default["default"].arrayOf(PropTypes__default["default"].node), PropTypes__default["default"].node]),
|
|
874
|
+
theme: PropTypes__default["default"].object
|
|
875
|
+
};
|
|
859
876
|
|
|
860
|
-
const base_white = '#FFF';
|
|
861
|
-
const empress_gray = '#757575';
|
|
862
877
|
const colors = {
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
878
|
+
white: '#fff',
|
|
879
|
+
black: '#000',
|
|
880
|
+
dark_grey_lighter: '#757575',
|
|
881
|
+
dark_grey_lightest: '#595959',
|
|
882
|
+
dark_grey_light: '#444',
|
|
883
|
+
dark_grey_dark: '#333',
|
|
884
|
+
dark_grey_darker: '#262626',
|
|
885
|
+
dark_grey_darkest: '#1F1F1F',
|
|
886
|
+
light_grey_lightest: '#FAFAFA',
|
|
887
|
+
light_grey_lighter: '#FDFDFD',
|
|
888
|
+
light_grey_light: '#F0F0F0',
|
|
889
|
+
light_grey_dark: '#DBDBDB',
|
|
890
|
+
light_grey_darker: '#CCCCCC',
|
|
891
|
+
light_grey_darkest: '#949494',
|
|
892
|
+
green_lightest: '#D5FCE9',
|
|
893
|
+
green_lighter: '#A3F2CD',
|
|
894
|
+
green_light: '#74D8A8',
|
|
895
|
+
green_dark: '#0FCE72',
|
|
896
|
+
green_darker: '#008A48',
|
|
897
|
+
green_darkest: '#008545',
|
|
898
|
+
red_lightest: '#F9D7D7',
|
|
899
|
+
red_lighter: '#F4B5B5',
|
|
900
|
+
red_light: '#F67979',
|
|
901
|
+
red_dark: '#d42d2d',
|
|
902
|
+
red_darker: '#ca2121',
|
|
903
|
+
red_darkest: '#B71A1A'
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
const defaultTheme = {
|
|
907
|
+
colors
|
|
879
908
|
};
|
|
880
909
|
|
|
881
910
|
const FormStyled = styled__default["default"].form.withConfig({
|
|
882
|
-
displayName: "
|
|
883
|
-
componentId: "sc-
|
|
911
|
+
displayName: "formstyled__FormStyled",
|
|
912
|
+
componentId: "sc-1t4n03w-0"
|
|
884
913
|
})(["", ";"], ({
|
|
914
|
+
theme,
|
|
885
915
|
useDefaultTheme
|
|
886
916
|
}) => {
|
|
887
|
-
return styled.css(["", ""], useDefaultTheme && styled.css(["> div:not(:first-child){margin-top:16px;}padding:0 16px;.success-message{font-size:18px;margin:0;}.visuallyHidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;}.loading{display:block;margin:24px auto;}label{display:inline-block;.isRequired{color:", ";}}input,textarea,select{display:block;font-family:inherit;background-color:", ";border-radius:3px;border:1px solid ", ";height:40px;padding:8px;margin-top:4px;
|
|
917
|
+
return styled.css(["", ""], useDefaultTheme && styled.css(["> div:not(:first-child){margin-top:16px;}padding:0 16px;.success-message{font-size:18px;margin:0;}.visuallyHidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;}.loading{display:block;margin:24px auto;}label{display:inline-block;.isRequired{color:", ";}}input,textarea,select{display:block;font-family:inherit;background-color:", ";border-radius:3px;border:1px solid ", ";height:40px;padding:8px;margin-top:4px;width:100%;}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px ", " inset;}textarea{height:200px;resize:none;}[aria-invalid='false']{background:", ";border:1px solid ", ";&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px", " inset;}}[aria-invalid='true']{background:", ";border:1px solid ", ";&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px", " inset;}}input ~ .svg{position:absolute;right:8px;top:50%;transform:translateY(-50%);}textarea ~ .svg{position:absolute;right:8px;top:8px;}"], theme.colors.red_darker, theme.colors.white, theme.colors.light_grey_darkest, theme.colors.white, theme.colors.green_lightest, theme.colors.green_darker, theme.colors.green_lightest, theme.colors.red_lightest, theme.colors.red_darker, theme.colors.red_lightest));
|
|
888
918
|
});
|
|
889
919
|
|
|
890
920
|
const Label = ({
|
|
@@ -903,7 +933,6 @@ const Label = ({
|
|
|
903
933
|
className: "visuallyHidden"
|
|
904
934
|
}, " (required)"));
|
|
905
935
|
};
|
|
906
|
-
|
|
907
936
|
Label.propTypes = {
|
|
908
937
|
className: PropTypes__default["default"].string,
|
|
909
938
|
label: PropTypes__default["default"].string,
|
|
@@ -912,74 +941,15 @@ Label.propTypes = {
|
|
|
912
941
|
isHidden: PropTypes__default["default"].bool
|
|
913
942
|
};
|
|
914
943
|
|
|
915
|
-
const CreateMessage = (type, minLength, maxLength, currentLength, defaultLanguage) => {
|
|
916
|
-
if (!type) return null;
|
|
917
|
-
|
|
918
|
-
switch (type) {
|
|
919
|
-
case 'min':
|
|
920
|
-
{
|
|
921
|
-
if (!minLength) return;
|
|
922
|
-
const minLengthVal = minLength && minLength.value;
|
|
923
|
-
const errorMessage = minLength && minLength.message && minLength.message[defaultLanguage];
|
|
924
|
-
const minText = `Minimum of ${minLengthVal.toString()} characters`;
|
|
925
|
-
|
|
926
|
-
if (errorMessage) {
|
|
927
|
-
return errorMessage;
|
|
928
|
-
} else {
|
|
929
|
-
return minText;
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
case 'max':
|
|
934
|
-
{
|
|
935
|
-
if (!maxLength) return;
|
|
936
|
-
const maxLengthVal = maxLength && maxLength.value;
|
|
937
|
-
const errorMessage = maxLength && maxLength.message && maxLength.message[defaultLanguage];
|
|
938
|
-
const maxText = `Maximum of ${maxLengthVal.toString()} characters`;
|
|
939
|
-
|
|
940
|
-
if (errorMessage) {
|
|
941
|
-
return errorMessage;
|
|
942
|
-
} else {
|
|
943
|
-
return maxText;
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
case 'between':
|
|
948
|
-
{
|
|
949
|
-
if (!maxLength || !minLength) return;
|
|
950
|
-
const minLengthVal = minLength && minLength.value;
|
|
951
|
-
const maxLengthVal = maxLength && maxLength.value;
|
|
952
|
-
const errorMessage = minLength && minLength.message && minLength.message[defaultLanguage];
|
|
953
|
-
const rangeText = `Between ${minLengthVal.toString()}-${maxLengthVal.toString()} characters)`;
|
|
954
|
-
|
|
955
|
-
if (errorMessage) {
|
|
956
|
-
return errorMessage;
|
|
957
|
-
} else if (currentLength < minLengthVal) {
|
|
958
|
-
return `${(minLengthVal - currentLength).toString()} character${minLengthVal > 1 ? 's' : ''} required ${rangeText}`;
|
|
959
|
-
} else if (currentLength > maxLengthVal) {
|
|
960
|
-
return `${(currentLength - maxLengthVal).toString()} character${currentLength - maxLengthVal > 1 ? 's' : ''} over ${rangeText}`;
|
|
961
|
-
} else if (currentLength) {
|
|
962
|
-
return `${(maxLengthVal - currentLength).toString()} characters remaining ${rangeText}`;
|
|
963
|
-
} else {
|
|
964
|
-
return rangeText;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
default:
|
|
969
|
-
return null;
|
|
970
|
-
}
|
|
971
|
-
};
|
|
972
|
-
|
|
973
944
|
const CharacterLimitStyled = styled__default["default"].div.withConfig({
|
|
974
|
-
displayName: "
|
|
975
|
-
componentId: "sc-
|
|
945
|
+
displayName: "characterLimit__CharacterLimitStyled",
|
|
946
|
+
componentId: "sc-4gr2nf-0"
|
|
976
947
|
})(["", ";"], ({
|
|
977
948
|
theme,
|
|
978
949
|
useDefaultTheme
|
|
979
950
|
}) => {
|
|
980
951
|
return styled.css(["display:block;", ""], useDefaultTheme && styled.css(["font-size:14px;color:", ";font-weight:400;line-height:24px;text-align:right;max-width:320px;width:100%;"], theme.colors.neutrals.empress_gray));
|
|
981
952
|
});
|
|
982
|
-
|
|
983
953
|
const CharacterLimit = ({
|
|
984
954
|
className,
|
|
985
955
|
value,
|
|
@@ -1002,9 +972,8 @@ const CharacterLimit = ({
|
|
|
1002
972
|
return /*#__PURE__*/React__default["default"].createElement(CharacterLimitStyled, {
|
|
1003
973
|
className: className,
|
|
1004
974
|
useDefaultTheme: useDefaultTheme
|
|
1005
|
-
},
|
|
975
|
+
}, doCreateMessage(type, minLength, maxLength, currentLength, defaultLanguage));
|
|
1006
976
|
};
|
|
1007
|
-
|
|
1008
977
|
CharacterLimit.propTypes = {
|
|
1009
978
|
validations: PropTypes__default["default"].object,
|
|
1010
979
|
value: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].object]),
|
|
@@ -1013,113 +982,114 @@ CharacterLimit.propTypes = {
|
|
|
1013
982
|
useDefaultTheme: PropTypes__default["default"].bool
|
|
1014
983
|
};
|
|
1015
984
|
|
|
1016
|
-
const ErrorMessageStyled = styled__default["default"].div.withConfig({
|
|
1017
|
-
displayName: "ErrorMessage__ErrorMessageStyled",
|
|
1018
|
-
componentId: "sc-1vewdiu-0"
|
|
1019
|
-
})(["", ";"], ({
|
|
1020
|
-
theme,
|
|
1021
|
-
useDefaultTheme
|
|
1022
|
-
}) => {
|
|
1023
|
-
return styled.css(["", ""], useDefaultTheme && styled.css(["display:block;margin-top:8px;color:", ";"], theme.colors.error));
|
|
1024
|
-
});
|
|
1025
|
-
|
|
1026
|
-
const ErrorMessage = ({
|
|
1027
|
-
className,
|
|
1028
|
-
message,
|
|
1029
|
-
useDefaultTheme
|
|
1030
|
-
}) => {
|
|
1031
|
-
return /*#__PURE__*/React__default["default"].createElement(ErrorMessageStyled, {
|
|
1032
|
-
className: className,
|
|
1033
|
-
useDefaultTheme: useDefaultTheme
|
|
1034
|
-
}, message);
|
|
1035
|
-
};
|
|
1036
|
-
|
|
1037
|
-
ErrorMessage.propTypes = {
|
|
1038
|
-
className: PropTypes__default["default"].string,
|
|
1039
|
-
message: PropTypes__default["default"].string.isRequired,
|
|
1040
|
-
useDefaultTheme: PropTypes__default["default"].bool
|
|
1041
|
-
};
|
|
1042
|
-
|
|
1043
985
|
const TextfieldStyled = styled__default["default"].div.withConfig({
|
|
1044
|
-
displayName: "
|
|
1045
|
-
componentId: "sc-
|
|
986
|
+
displayName: "textfield__TextfieldStyled",
|
|
987
|
+
componentId: "sc-whkw86-0"
|
|
1046
988
|
})(["", ";"], ({
|
|
1047
989
|
isHidden
|
|
1048
990
|
}) => {
|
|
1049
991
|
return styled.css(["display:", ";"], isHidden ? 'none' : 'block');
|
|
1050
992
|
});
|
|
1051
|
-
|
|
1052
993
|
const Textfield = ({
|
|
1053
994
|
className,
|
|
995
|
+
field,
|
|
1054
996
|
formId,
|
|
1055
997
|
id,
|
|
1056
998
|
label,
|
|
1057
999
|
type,
|
|
1058
1000
|
setValue,
|
|
1059
|
-
|
|
1001
|
+
onValidateField,
|
|
1060
1002
|
validations,
|
|
1061
1003
|
defaultValue,
|
|
1062
1004
|
defaultLanguage,
|
|
1063
1005
|
placeholder,
|
|
1064
1006
|
isHidden,
|
|
1065
|
-
errors,
|
|
1066
1007
|
useDefaultTheme
|
|
1067
1008
|
}) => {
|
|
1068
|
-
const [
|
|
1009
|
+
const [hasCharLimit, setCharLimit] = React.useState(false);
|
|
1069
1010
|
const isRequired = validations && validations.required ? true : false;
|
|
1070
1011
|
const placeholderText = placeholder && placeholder.properties && placeholder.properties.placeholderText && placeholder.properties.placeholderText[defaultLanguage];
|
|
1071
1012
|
const defaultValueText = defaultValue && defaultValue[defaultLanguage] ? defaultValue[defaultLanguage] : defaultValue;
|
|
1072
|
-
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
setShowCharLimit(false);
|
|
1080
|
-
};
|
|
1081
|
-
|
|
1082
|
-
const _handleFocus = () => {
|
|
1083
|
-
setShowCharLimit(true);
|
|
1084
|
-
};
|
|
1085
|
-
|
|
1013
|
+
const [a11yInvalid, setA11yInvalid] = React.useState('');
|
|
1014
|
+
const [_, setTextfieldValue] = React.useState(defaultValueText || '');
|
|
1015
|
+
const selectFormValidationSent = makeSelectFormValidationSent(formId);
|
|
1016
|
+
const formValidationSent = reactRedux.useSelector(selectFormValidationSent);
|
|
1017
|
+
React.useEffect(() => {
|
|
1018
|
+
if (formValidationSent) setA11yInvalid(doA11yValidation(_, field, true));
|
|
1019
|
+
}, [formValidationSent]);
|
|
1086
1020
|
return /*#__PURE__*/React__default["default"].createElement(TextfieldStyled, {
|
|
1087
|
-
className:
|
|
1021
|
+
className: className,
|
|
1088
1022
|
isHidden: isHidden
|
|
1089
1023
|
}, /*#__PURE__*/React__default["default"].createElement(Label, {
|
|
1090
1024
|
id: id,
|
|
1091
1025
|
label: label,
|
|
1092
1026
|
isRequired: isRequired,
|
|
1093
|
-
className: "
|
|
1094
|
-
}),
|
|
1027
|
+
className: "text-field__label"
|
|
1028
|
+
}), hasCharLimit && /*#__PURE__*/React__default["default"].createElement(CharacterLimit, {
|
|
1095
1029
|
value: defaultValue,
|
|
1096
1030
|
validations: validations,
|
|
1097
1031
|
defaultLanguage: defaultLanguage,
|
|
1098
1032
|
useDefaultTheme: useDefaultTheme
|
|
1099
|
-
}), /*#__PURE__*/React__default["default"].createElement("
|
|
1100
|
-
className:
|
|
1033
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1034
|
+
className: "text-field__input--wrapper",
|
|
1035
|
+
style: {
|
|
1036
|
+
position: 'relative'
|
|
1037
|
+
}
|
|
1038
|
+
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
1039
|
+
className: "text-field__input",
|
|
1101
1040
|
type: type,
|
|
1102
1041
|
defaultValue: defaultValueText,
|
|
1103
1042
|
placeholder: placeholderText,
|
|
1043
|
+
"aria-invalid": a11yInvalid,
|
|
1104
1044
|
id: id,
|
|
1105
1045
|
name: id,
|
|
1106
|
-
onChange: e =>
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1046
|
+
onChange: e => {
|
|
1047
|
+
setTextfieldValue(e.target.value);
|
|
1048
|
+
setValue(formId, id, e.target.value);
|
|
1049
|
+
},
|
|
1050
|
+
onBlur: e => {
|
|
1051
|
+
onValidateField(formId, id, e.target.value);
|
|
1052
|
+
setCharLimit(false);
|
|
1053
|
+
setA11yInvalid(doA11yValidation(e.target.value, field, formValidationSent));
|
|
1054
|
+
},
|
|
1055
|
+
onFocus: () => {
|
|
1056
|
+
setCharLimit(true);
|
|
1057
|
+
}
|
|
1058
|
+
}), a11yInvalid == 'true' && /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
1059
|
+
className: "svg",
|
|
1060
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1061
|
+
focusable: "false",
|
|
1062
|
+
"aria-hidden": "true",
|
|
1063
|
+
role: "presentation",
|
|
1064
|
+
width: "16",
|
|
1065
|
+
height: "16",
|
|
1066
|
+
fill: "none"
|
|
1067
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
1068
|
+
fill: "#333",
|
|
1069
|
+
d: "M12.2 3.807a.664.664 0 0 0-.94 0L8 7.06 4.74 3.8a.665.665 0 0 0-.94.94L7.06 8 3.8 11.26a.664.664 0 1 0 .94.94L8 8.94l3.26 3.26a.665.665 0 0 0 .94-.94L8.94 8l3.26-3.26a.668.668 0 0 0 0-.933Z"
|
|
1070
|
+
})), a11yInvalid == 'false' && /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
1071
|
+
className: "svg",
|
|
1072
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1073
|
+
focusable: "false",
|
|
1074
|
+
"aria-hidden": "true",
|
|
1075
|
+
role: "presentation",
|
|
1076
|
+
width: "16",
|
|
1077
|
+
height: "16",
|
|
1078
|
+
fill: "none"
|
|
1079
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
1080
|
+
fill: "#333",
|
|
1081
|
+
d: "m2 8 4.418 4.667L14 4.659l-1.246-1.326-6.336 6.692-3.18-3.332L2 8Z"
|
|
1082
|
+
}))));
|
|
1113
1083
|
};
|
|
1114
|
-
|
|
1115
1084
|
Textfield.propTypes = {
|
|
1116
1085
|
className: PropTypes__default["default"].string,
|
|
1086
|
+
field: PropTypes__default["default"].any,
|
|
1117
1087
|
formId: PropTypes__default["default"].string,
|
|
1118
1088
|
id: PropTypes__default["default"].string,
|
|
1119
1089
|
label: PropTypes__default["default"].string,
|
|
1120
1090
|
type: PropTypes__default["default"].string,
|
|
1121
1091
|
setValue: PropTypes__default["default"].func,
|
|
1122
|
-
|
|
1092
|
+
onValidateField: PropTypes__default["default"].func,
|
|
1123
1093
|
validations: PropTypes__default["default"].object,
|
|
1124
1094
|
defaultValue: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].object]),
|
|
1125
1095
|
defaultLanguage: PropTypes__default["default"].string,
|
|
@@ -1131,6 +1101,7 @@ Textfield.propTypes = {
|
|
|
1131
1101
|
|
|
1132
1102
|
const Textarea = ({
|
|
1133
1103
|
className,
|
|
1104
|
+
field,
|
|
1134
1105
|
formId,
|
|
1135
1106
|
id,
|
|
1136
1107
|
label,
|
|
@@ -1140,57 +1111,85 @@ const Textarea = ({
|
|
|
1140
1111
|
defaultValue,
|
|
1141
1112
|
defaultLanguage,
|
|
1142
1113
|
placeholder,
|
|
1143
|
-
|
|
1144
|
-
useDefaultTheme
|
|
1145
|
-
errors
|
|
1114
|
+
onValidateField,
|
|
1115
|
+
useDefaultTheme
|
|
1146
1116
|
}) => {
|
|
1147
1117
|
const [showCharLimit, setShowCharLimit] = React.useState(false);
|
|
1148
1118
|
const isRequired = validations && validations.required ? true : false;
|
|
1149
1119
|
const placeholderText = placeholder && placeholder.properties && placeholder.properties.placeholderText && placeholder.properties.placeholderText[defaultLanguage];
|
|
1150
1120
|
const defaultValueText = defaultValue ? defaultValue[defaultLanguage] : null;
|
|
1151
|
-
|
|
1152
|
-
const
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
setShowCharLimit(false);
|
|
1159
|
-
};
|
|
1160
|
-
|
|
1161
|
-
const _handleFocus = () => {
|
|
1162
|
-
setShowCharLimit(true);
|
|
1163
|
-
};
|
|
1164
|
-
|
|
1121
|
+
const [a11yInvalid, setA11yInvalid] = React.useState('');
|
|
1122
|
+
const [_, setTextareaValue] = React.useState(defaultValueText || '');
|
|
1123
|
+
const selectFormValidationSent = makeSelectFormValidationSent(formId);
|
|
1124
|
+
const formValidationSent = reactRedux.useSelector(selectFormValidationSent);
|
|
1125
|
+
React.useEffect(() => {
|
|
1126
|
+
if (formValidationSent) setA11yInvalid(doA11yValidation(_, field, true));
|
|
1127
|
+
}, [formValidationSent]);
|
|
1165
1128
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1166
|
-
className:
|
|
1129
|
+
className: className
|
|
1167
1130
|
}, /*#__PURE__*/React__default["default"].createElement(Label, {
|
|
1168
1131
|
id: id,
|
|
1169
1132
|
label: label,
|
|
1170
1133
|
isRequired: isRequired,
|
|
1171
|
-
className: "
|
|
1134
|
+
className: "text-area__label"
|
|
1172
1135
|
}), showCharLimit && /*#__PURE__*/React__default["default"].createElement(CharacterLimit, {
|
|
1173
1136
|
value: defaultValue,
|
|
1174
1137
|
validations: validations,
|
|
1175
1138
|
defaultLanguage: defaultLanguage,
|
|
1176
1139
|
useDefaultTheme: useDefaultTheme
|
|
1177
|
-
}), /*#__PURE__*/React__default["default"].createElement("
|
|
1178
|
-
className:
|
|
1140
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1141
|
+
className: "text-area__input--wrapper",
|
|
1142
|
+
style: {
|
|
1143
|
+
position: 'relative'
|
|
1144
|
+
}
|
|
1145
|
+
}, /*#__PURE__*/React__default["default"].createElement("textarea", {
|
|
1146
|
+
className: "text-area__input",
|
|
1179
1147
|
type: type,
|
|
1180
1148
|
id: id,
|
|
1181
1149
|
defaultValue: defaultValueText,
|
|
1182
1150
|
placeholder: placeholderText,
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1151
|
+
"aria-invalid": a11yInvalid,
|
|
1152
|
+
onChange: e => {
|
|
1153
|
+
setTextareaValue(e.target.value);
|
|
1154
|
+
setValue(formId, id, e.target.value);
|
|
1155
|
+
},
|
|
1156
|
+
onBlur: e => {
|
|
1157
|
+
onValidateField(formId, id, e.target.value);
|
|
1158
|
+
setShowCharLimit(false);
|
|
1159
|
+
setA11yInvalid(doA11yValidation(e.target.value, field, formValidationSent));
|
|
1160
|
+
},
|
|
1161
|
+
onFocus: () => {
|
|
1162
|
+
setShowCharLimit(true);
|
|
1163
|
+
}
|
|
1164
|
+
}), a11yInvalid == 'true' && /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
1165
|
+
className: "svg",
|
|
1166
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1167
|
+
focusable: "false",
|
|
1168
|
+
"aria-hidden": "true",
|
|
1169
|
+
role: "presentation",
|
|
1170
|
+
width: "16",
|
|
1171
|
+
height: "16",
|
|
1172
|
+
fill: "none"
|
|
1173
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
1174
|
+
fill: "#333",
|
|
1175
|
+
d: "M12.2 3.807a.664.664 0 0 0-.94 0L8 7.06 4.74 3.8a.665.665 0 0 0-.94.94L7.06 8 3.8 11.26a.664.664 0 1 0 .94.94L8 8.94l3.26 3.26a.665.665 0 0 0 .94-.94L8.94 8l3.26-3.26a.668.668 0 0 0 0-.933Z"
|
|
1176
|
+
})), a11yInvalid == 'false' && /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
1177
|
+
className: "svg",
|
|
1178
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1179
|
+
focusable: "false",
|
|
1180
|
+
"aria-hidden": "true",
|
|
1181
|
+
role: "presentation",
|
|
1182
|
+
width: "16",
|
|
1183
|
+
height: "16",
|
|
1184
|
+
fill: "none"
|
|
1185
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
1186
|
+
fill: "#333",
|
|
1187
|
+
d: "m2 8 4.418 4.667L14 4.659l-1.246-1.326-6.336 6.692-3.18-3.332L2 8Z"
|
|
1188
|
+
}))));
|
|
1190
1189
|
};
|
|
1191
|
-
|
|
1192
1190
|
Textarea.propTypes = {
|
|
1193
1191
|
className: PropTypes__default["default"].string,
|
|
1192
|
+
field: PropTypes__default["default"].any,
|
|
1194
1193
|
formId: PropTypes__default["default"].string,
|
|
1195
1194
|
id: PropTypes__default["default"].string,
|
|
1196
1195
|
label: PropTypes__default["default"].string,
|
|
@@ -1200,7 +1199,7 @@ Textarea.propTypes = {
|
|
|
1200
1199
|
defaultValue: PropTypes__default["default"].object,
|
|
1201
1200
|
defaultLanguage: PropTypes__default["default"].string,
|
|
1202
1201
|
placeholder: PropTypes__default["default"].object,
|
|
1203
|
-
|
|
1202
|
+
onValidateField: PropTypes__default["default"].func,
|
|
1204
1203
|
useDefaultTheme: PropTypes__default["default"].bool,
|
|
1205
1204
|
errors: PropTypes__default["default"].array
|
|
1206
1205
|
};
|
|
@@ -1225,7 +1224,6 @@ const HiddenField = ({
|
|
|
1225
1224
|
isHidden: true
|
|
1226
1225
|
});
|
|
1227
1226
|
};
|
|
1228
|
-
|
|
1229
1227
|
HiddenField.propTypes = {
|
|
1230
1228
|
className: PropTypes__default["default"].string,
|
|
1231
1229
|
id: PropTypes__default["default"].string,
|
|
@@ -1249,11 +1247,6 @@ const Dropdown = ({
|
|
|
1249
1247
|
if (!validations) return null;
|
|
1250
1248
|
const isRequired = validations && validations.required ? true : false;
|
|
1251
1249
|
const ddValues = validations && validations.allowedValues && validations.allowedValues.values;
|
|
1252
|
-
|
|
1253
|
-
const _handleChange = (formId, id, value) => {
|
|
1254
|
-
setValue(formId, id, value);
|
|
1255
|
-
};
|
|
1256
|
-
|
|
1257
1250
|
if (!ddValues || ddValues.length < 1) return null;
|
|
1258
1251
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1259
1252
|
className: "dropdown-container"
|
|
@@ -1267,7 +1260,9 @@ const Dropdown = ({
|
|
|
1267
1260
|
id: id,
|
|
1268
1261
|
className: `${className ? className : ''} select-dropdown`,
|
|
1269
1262
|
defaultValue: defaultValue,
|
|
1270
|
-
onBlur: e =>
|
|
1263
|
+
onBlur: e => {
|
|
1264
|
+
setValue(formId, id, e.target.value);
|
|
1265
|
+
}
|
|
1271
1266
|
}, ddValues.map((val, idx) => {
|
|
1272
1267
|
return /*#__PURE__*/React__default["default"].createElement("option", {
|
|
1273
1268
|
key: `${val[defaultLanguage]}-${idx}`,
|
|
@@ -1276,7 +1271,6 @@ const Dropdown = ({
|
|
|
1276
1271
|
}, val[defaultLanguage]);
|
|
1277
1272
|
})));
|
|
1278
1273
|
};
|
|
1279
|
-
|
|
1280
1274
|
Dropdown.propTypes = {
|
|
1281
1275
|
className: PropTypes__default["default"].string,
|
|
1282
1276
|
formId: PropTypes__default["default"].string,
|
|
@@ -1289,14 +1283,13 @@ Dropdown.propTypes = {
|
|
|
1289
1283
|
};
|
|
1290
1284
|
|
|
1291
1285
|
const CheckboxStyled = styled__default["default"].div.withConfig({
|
|
1292
|
-
displayName: "
|
|
1293
|
-
componentId: "sc-
|
|
1286
|
+
displayName: "checkbox__CheckboxStyled",
|
|
1287
|
+
componentId: "sc-gm2o0r-0"
|
|
1294
1288
|
})(["", ";"], ({
|
|
1295
1289
|
useDefaultTheme
|
|
1296
1290
|
}) => {
|
|
1297
1291
|
return styled.css(["", ""], useDefaultTheme && styled.css([".checkbox-wrapper{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;input{height:auto;width:auto;margin:0 4px 0 0;}label{display:inline-block;}}"]));
|
|
1298
1292
|
});
|
|
1299
|
-
|
|
1300
1293
|
const Checkbox = ({
|
|
1301
1294
|
className,
|
|
1302
1295
|
formId,
|
|
@@ -1313,18 +1306,15 @@ const Checkbox = ({
|
|
|
1313
1306
|
// NF change rules of hooks
|
|
1314
1307
|
let isDefaultChecked = defaultValue && defaultValue[defaultLanguage];
|
|
1315
1308
|
const [isChecked, setIsChecked] = React.useState(isDefaultChecked || '');
|
|
1316
|
-
|
|
1317
1309
|
switch (type) {
|
|
1318
1310
|
case 'multiple':
|
|
1319
1311
|
{
|
|
1320
1312
|
if (!validations) return null;
|
|
1321
1313
|
const isRequired = validations && validations.required ? true : false;
|
|
1322
1314
|
const cbValues = validations && validations.allowedValues && validations.allowedValues.values;
|
|
1323
|
-
|
|
1324
1315
|
const _handleChange = (value, isChecked) => {
|
|
1325
1316
|
setCheckboxValue(formId, id, value, isChecked);
|
|
1326
1317
|
};
|
|
1327
|
-
|
|
1328
1318
|
if (!cbValues || cbValues.length < 1) return null;
|
|
1329
1319
|
return /*#__PURE__*/React__default["default"].createElement(CheckboxStyled, {
|
|
1330
1320
|
className: `checkbox-container`,
|
|
@@ -1352,14 +1342,12 @@ const Checkbox = ({
|
|
|
1352
1342
|
}));
|
|
1353
1343
|
}));
|
|
1354
1344
|
}
|
|
1355
|
-
|
|
1356
1345
|
case 'single':
|
|
1357
1346
|
{
|
|
1358
1347
|
const _handleChange = isChecked => {
|
|
1359
1348
|
setIsChecked(isChecked);
|
|
1360
1349
|
setCheckboxValue(formId, id, isChecked);
|
|
1361
1350
|
};
|
|
1362
|
-
|
|
1363
1351
|
return /*#__PURE__*/React__default["default"].createElement(CheckboxStyled, {
|
|
1364
1352
|
className: `checkbox-container`,
|
|
1365
1353
|
useDefaultTheme: useDefaultTheme
|
|
@@ -1381,7 +1369,6 @@ const Checkbox = ({
|
|
|
1381
1369
|
}
|
|
1382
1370
|
}
|
|
1383
1371
|
};
|
|
1384
|
-
|
|
1385
1372
|
Checkbox.propTypes = {
|
|
1386
1373
|
className: PropTypes__default["default"].string,
|
|
1387
1374
|
formId: PropTypes__default["default"].string,
|
|
@@ -1396,14 +1383,13 @@ Checkbox.propTypes = {
|
|
|
1396
1383
|
};
|
|
1397
1384
|
|
|
1398
1385
|
const RadioButtonStyled = styled__default["default"].div.withConfig({
|
|
1399
|
-
displayName: "
|
|
1400
|
-
componentId: "sc-
|
|
1386
|
+
displayName: "radioButton__RadioButtonStyled",
|
|
1387
|
+
componentId: "sc-3mey0f-0"
|
|
1401
1388
|
})(["", ";"], ({
|
|
1402
1389
|
useDefaultTheme
|
|
1403
1390
|
}) => {
|
|
1404
1391
|
return styled.css(["", ""], useDefaultTheme && styled.css([".radio-wrapper{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;input{height:auto;width:auto;margin:0 4px 0 0;}label{display:inline-block;}}"]));
|
|
1405
1392
|
});
|
|
1406
|
-
|
|
1407
1393
|
const RadioButton = ({
|
|
1408
1394
|
className,
|
|
1409
1395
|
formId,
|
|
@@ -1418,11 +1404,6 @@ const RadioButton = ({
|
|
|
1418
1404
|
if (!validations) return null;
|
|
1419
1405
|
const isRequired = validations && validations.required ? true : false;
|
|
1420
1406
|
const cbValues = validations && validations.allowedValues && validations.allowedValues.values;
|
|
1421
|
-
|
|
1422
|
-
const _handleChange = (formId, id, value) => {
|
|
1423
|
-
setValue(formId, id, value);
|
|
1424
|
-
};
|
|
1425
|
-
|
|
1426
1407
|
if (!cbValues || cbValues.length < 1) return null;
|
|
1427
1408
|
return /*#__PURE__*/React__default["default"].createElement(RadioButtonStyled, {
|
|
1428
1409
|
className: "radio-container",
|
|
@@ -1442,7 +1423,9 @@ const RadioButton = ({
|
|
|
1442
1423
|
name: id,
|
|
1443
1424
|
value: val[defaultLanguage],
|
|
1444
1425
|
className: `${className ? className : ''} input-radio`,
|
|
1445
|
-
onChange: e =>
|
|
1426
|
+
onChange: e => {
|
|
1427
|
+
setValue(formId, id, e.target.value);
|
|
1428
|
+
}
|
|
1446
1429
|
}), /*#__PURE__*/React__default["default"].createElement(Label, {
|
|
1447
1430
|
id: val[defaultLanguage],
|
|
1448
1431
|
label: val[defaultLanguage],
|
|
@@ -1450,7 +1433,6 @@ const RadioButton = ({
|
|
|
1450
1433
|
}));
|
|
1451
1434
|
}));
|
|
1452
1435
|
};
|
|
1453
|
-
|
|
1454
1436
|
RadioButton.propTypes = {
|
|
1455
1437
|
className: PropTypes__default["default"].string,
|
|
1456
1438
|
formId: PropTypes__default["default"].string,
|
|
@@ -1482,6 +1464,7 @@ RadioButton.propTypes = {
|
|
|
1482
1464
|
//m > minutes, eg ...T16:05:00 = 5
|
|
1483
1465
|
//t > abbreviated AM / PM, e.g. A or P
|
|
1484
1466
|
//tt > AM / PM, e.g. AM or PM
|
|
1467
|
+
|
|
1485
1468
|
const formatDate = (date, format = 'dd MMMM yyyy') => {
|
|
1486
1469
|
if (!date) return null;
|
|
1487
1470
|
const dateObj = new Date(date);
|
|
@@ -1493,8 +1476,9 @@ const formatDate = (date, format = 'dd MMMM yyyy') => {
|
|
|
1493
1476
|
const dayNameInt = dateObj.getDay();
|
|
1494
1477
|
const timeArr = dateString[1].split(':');
|
|
1495
1478
|
const hour = timeArr[0];
|
|
1496
|
-
const minute = timeArr[1];
|
|
1479
|
+
const minute = timeArr[1];
|
|
1497
1480
|
|
|
1481
|
+
//convert to abstract strings to avoid character replacement along the chain, eg. Monday would match 'M' month single parameter
|
|
1498
1482
|
const YEAR = ['&&', '&'];
|
|
1499
1483
|
const MONTH = ['££££', '£££', '££', '£'];
|
|
1500
1484
|
const DAY = ['%%%%', '%%%', '%%', '%'];
|
|
@@ -1506,16 +1490,13 @@ const formatDate = (date, format = 'dd MMMM yyyy') => {
|
|
|
1506
1490
|
.replace('MMMM', MONTH[0]).replace('MMM', MONTH[1]).replace('MM', MONTH[2]).replace('M', MONTH[3]).replace('dddd', DAY[0]).replace('ddd', DAY[1]).replace('dd', DAY[2]).replace('d', DAY[3]).replace('HH', HOUR24[0]).replace('H', HOUR24[1]).replace('hh', HOUR12[0]).replace('h', HOUR12[1]).replace('mm', MINUTE[0]).replace('m', MINUTE[1]).replace('tt', TF[0]).replace('t', TF[1]).replace(YEAR[0], year).replace(YEAR[1], year.slice(-2)).replace(MONTH[0], monthsLong[parseInt(month, 10)]).replace(MONTH[1], monthsShort[parseInt(month, 10)]).replace(MONTH[2], month).replace(MONTH[3], parseInt(month, 10)).replace(DAY[0], daysLong[dayNameInt]).replace(DAY[1], daysShort[dayNameInt]).replace(DAY[2], day).replace(DAY[3], parseInt(day, 10)).replace(HOUR24[0], hour).replace(HOUR24[1], parseInt(hour, 10)).replace(HOUR12[0], parseHour(hour)).replace(HOUR12[1], parseInt(parseHour(hour), 10)).replace(MINUTE[0], minute).replace(MINUTE[1], parseInt(minute, 10)).replace(TF[0], parseTF(hour)).replace(TF[1], parseTF(hour).slice(0, -1));
|
|
1507
1491
|
return formattedDate;
|
|
1508
1492
|
};
|
|
1509
|
-
|
|
1510
1493
|
const monthsShort = ['', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
1511
1494
|
const monthsLong = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
1512
1495
|
const daysShort = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
|
1513
1496
|
const daysLong = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
|
1514
|
-
|
|
1515
1497
|
const parseHour = hour => {
|
|
1516
1498
|
return hour > 12 ? hour - 12 : hour;
|
|
1517
1499
|
};
|
|
1518
|
-
|
|
1519
1500
|
const parseTF = hour => {
|
|
1520
1501
|
return hour > 11 ? 'PM' : 'AM';
|
|
1521
1502
|
};
|
|
@@ -1533,13 +1514,11 @@ const SingleDate = ({
|
|
|
1533
1514
|
const onlyPassedDates = validations && validations.pastDateTime;
|
|
1534
1515
|
const d = new Date();
|
|
1535
1516
|
const todaysDate = d.toISOString();
|
|
1536
|
-
|
|
1537
1517
|
const _handleChange = (formId, id, value) => {
|
|
1538
1518
|
const d = new Date(value);
|
|
1539
1519
|
const isoDate = d.toISOString();
|
|
1540
1520
|
setValue(formId, id, isoDate);
|
|
1541
1521
|
};
|
|
1542
|
-
|
|
1543
1522
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1544
1523
|
className: "date-container"
|
|
1545
1524
|
}, /*#__PURE__*/React__default["default"].createElement(Label, {
|
|
@@ -1556,7 +1535,6 @@ const SingleDate = ({
|
|
|
1556
1535
|
onChange: e => _handleChange(formId, id, e.target.value)
|
|
1557
1536
|
}));
|
|
1558
1537
|
};
|
|
1559
|
-
|
|
1560
1538
|
SingleDate.propTypes = {
|
|
1561
1539
|
className: PropTypes__default["default"].string,
|
|
1562
1540
|
formId: PropTypes__default["default"].string,
|
|
@@ -1568,14 +1546,13 @@ SingleDate.propTypes = {
|
|
|
1568
1546
|
};
|
|
1569
1547
|
|
|
1570
1548
|
const DateRangeStyled = styled__default["default"].div.withConfig({
|
|
1571
|
-
displayName: "
|
|
1572
|
-
componentId: "sc-
|
|
1549
|
+
displayName: "dateRange__DateRangeStyled",
|
|
1550
|
+
componentId: "sc-1so0ar2-0"
|
|
1573
1551
|
})(["", ";"], ({
|
|
1574
1552
|
useDefaultTheme
|
|
1575
1553
|
}) => {
|
|
1576
1554
|
return styled.css(["", ""], useDefaultTheme && styled.css([".daterange-wrapper{display:flex;flex-direction:column;input{&:first-child{margin:0 0 8px 0;}}}"]));
|
|
1577
1555
|
});
|
|
1578
|
-
|
|
1579
1556
|
const DateRange = ({
|
|
1580
1557
|
className,
|
|
1581
1558
|
id,
|
|
@@ -1591,15 +1568,12 @@ const DateRange = ({
|
|
|
1591
1568
|
const todaysDate = d.toISOString();
|
|
1592
1569
|
const [toDate, setToDate] = React.useState('');
|
|
1593
1570
|
const [fromDate, setFromDate] = React.useState('');
|
|
1594
|
-
|
|
1595
1571
|
const _handleDateChange = (dateType, formId, id, value) => {
|
|
1596
1572
|
_updateDateProps(dateType, value);
|
|
1597
|
-
|
|
1598
1573
|
const d = new Date(value);
|
|
1599
1574
|
const isoDate = d.toISOString();
|
|
1600
1575
|
setDateRangeValues(formId, id, dateType, isoDate);
|
|
1601
1576
|
};
|
|
1602
|
-
|
|
1603
1577
|
const _updateDateProps = (type, date) => {
|
|
1604
1578
|
switch (type) {
|
|
1605
1579
|
case 'from':
|
|
@@ -1609,7 +1583,6 @@ const DateRange = ({
|
|
|
1609
1583
|
setFromDate(newDate);
|
|
1610
1584
|
break;
|
|
1611
1585
|
}
|
|
1612
|
-
|
|
1613
1586
|
case 'to':
|
|
1614
1587
|
{
|
|
1615
1588
|
const d = new Date(date);
|
|
@@ -1617,12 +1590,10 @@ const DateRange = ({
|
|
|
1617
1590
|
setToDate(newDate);
|
|
1618
1591
|
break;
|
|
1619
1592
|
}
|
|
1620
|
-
|
|
1621
1593
|
default:
|
|
1622
1594
|
return;
|
|
1623
1595
|
}
|
|
1624
1596
|
};
|
|
1625
|
-
|
|
1626
1597
|
return /*#__PURE__*/React__default["default"].createElement(DateRangeStyled, {
|
|
1627
1598
|
className: `daterange-container`,
|
|
1628
1599
|
useDefaultTheme: useDefaultTheme
|
|
@@ -1659,7 +1630,6 @@ const DateRange = ({
|
|
|
1659
1630
|
onChange: e => _handleDateChange('to', formId, id, e.target.value)
|
|
1660
1631
|
})));
|
|
1661
1632
|
};
|
|
1662
|
-
|
|
1663
1633
|
DateRange.propTypes = {
|
|
1664
1634
|
className: PropTypes__default["default"].string,
|
|
1665
1635
|
formId: PropTypes__default["default"].string,
|
|
@@ -1672,14 +1642,13 @@ DateRange.propTypes = {
|
|
|
1672
1642
|
};
|
|
1673
1643
|
|
|
1674
1644
|
const EntryPickerStyled = styled__default["default"].div.withConfig({
|
|
1675
|
-
displayName: "
|
|
1676
|
-
componentId: "sc-
|
|
1645
|
+
displayName: "entryPicker__EntryPickerStyled",
|
|
1646
|
+
componentId: "sc-9vev5n-0"
|
|
1677
1647
|
})(["", ";"], ({
|
|
1678
1648
|
useDefaultTheme
|
|
1679
1649
|
}) => {
|
|
1680
1650
|
return styled.css(["", ""], useDefaultTheme && styled.css([".radio-wrapper,.checkbox-wrapper{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;input{height:auto;width:auto;margin:0 4px 0 0;}label{display:inline-block;}}"]));
|
|
1681
1651
|
});
|
|
1682
|
-
|
|
1683
1652
|
const EntryPicker = ({
|
|
1684
1653
|
className,
|
|
1685
1654
|
results,
|
|
@@ -1694,7 +1663,6 @@ const EntryPicker = ({
|
|
|
1694
1663
|
if (!results || results.length > 3) return null;
|
|
1695
1664
|
const isRequired = validations && validations.required ? true : false;
|
|
1696
1665
|
let valArr = [];
|
|
1697
|
-
|
|
1698
1666
|
const _handleChange = (formId, id, value, isChecked) => {
|
|
1699
1667
|
if (type === 'checkbox') {
|
|
1700
1668
|
if (isChecked) {
|
|
@@ -1702,13 +1670,11 @@ const EntryPicker = ({
|
|
|
1702
1670
|
} else if (!isChecked) {
|
|
1703
1671
|
valArr = valArr.filter(valItem => valItem !== value);
|
|
1704
1672
|
}
|
|
1705
|
-
|
|
1706
1673
|
setValue(formId, id, valArr);
|
|
1707
1674
|
} else {
|
|
1708
1675
|
setValue(formId, id, value);
|
|
1709
1676
|
}
|
|
1710
1677
|
};
|
|
1711
|
-
|
|
1712
1678
|
return /*#__PURE__*/React__default["default"].createElement(EntryPickerStyled, {
|
|
1713
1679
|
className: `${type}-container`,
|
|
1714
1680
|
useDefaultTheme: useDefaultTheme
|
|
@@ -1735,7 +1701,6 @@ const EntryPicker = ({
|
|
|
1735
1701
|
}));
|
|
1736
1702
|
}));
|
|
1737
1703
|
};
|
|
1738
|
-
|
|
1739
1704
|
EntryPicker.propTypes = {
|
|
1740
1705
|
className: PropTypes__default["default"].string,
|
|
1741
1706
|
results: PropTypes__default["default"].array,
|
|
@@ -1754,7 +1719,7 @@ const FormComposer = ({
|
|
|
1754
1719
|
formId,
|
|
1755
1720
|
setValue,
|
|
1756
1721
|
setDateRangeValues,
|
|
1757
|
-
|
|
1722
|
+
onValidateField,
|
|
1758
1723
|
defaultLanguage,
|
|
1759
1724
|
errors,
|
|
1760
1725
|
useDefaultTheme,
|
|
@@ -1764,20 +1729,20 @@ const FormComposer = ({
|
|
|
1764
1729
|
if (!fields || fields.length < 1) return null;
|
|
1765
1730
|
return fields.map((field, idx) => {
|
|
1766
1731
|
if (!field) return null;
|
|
1767
|
-
|
|
1768
1732
|
switch (field.type) {
|
|
1769
1733
|
case 'number':
|
|
1770
1734
|
case 'textfield':
|
|
1771
1735
|
{
|
|
1772
1736
|
return /*#__PURE__*/React__default["default"].createElement(Textfield, {
|
|
1773
1737
|
key: `${field.id}-${idx}`,
|
|
1738
|
+
field: field,
|
|
1774
1739
|
type: field.type,
|
|
1775
1740
|
id: field.id,
|
|
1776
1741
|
label: field.name && field.name[defaultLanguage],
|
|
1777
1742
|
formId: formId,
|
|
1778
1743
|
setValue: setValue,
|
|
1779
1744
|
validations: field.validations,
|
|
1780
|
-
|
|
1745
|
+
onValidateField: onValidateField,
|
|
1781
1746
|
defaultLanguage: defaultLanguage,
|
|
1782
1747
|
defaultValue: formData && formData[field.id] || field.default,
|
|
1783
1748
|
placeholder: field.editor,
|
|
@@ -1785,11 +1750,11 @@ const FormComposer = ({
|
|
|
1785
1750
|
useDefaultTheme: useDefaultTheme
|
|
1786
1751
|
});
|
|
1787
1752
|
}
|
|
1788
|
-
|
|
1789
1753
|
case 'textarea':
|
|
1790
1754
|
{
|
|
1791
1755
|
return /*#__PURE__*/React__default["default"].createElement(Textarea, {
|
|
1792
1756
|
key: `${field.id}-${idx}`,
|
|
1757
|
+
field: field,
|
|
1793
1758
|
type: field.type,
|
|
1794
1759
|
id: field.id,
|
|
1795
1760
|
label: field.name && field.name[defaultLanguage],
|
|
@@ -1799,12 +1764,11 @@ const FormComposer = ({
|
|
|
1799
1764
|
defaultLanguage: defaultLanguage,
|
|
1800
1765
|
defaultValue: field.default,
|
|
1801
1766
|
placeholder: field.editor,
|
|
1802
|
-
|
|
1767
|
+
onValidateField: onValidateField,
|
|
1803
1768
|
useDefaultTheme: useDefaultTheme,
|
|
1804
1769
|
errors: errors
|
|
1805
1770
|
});
|
|
1806
1771
|
}
|
|
1807
|
-
|
|
1808
1772
|
case 'dropdown':
|
|
1809
1773
|
{
|
|
1810
1774
|
return /*#__PURE__*/React__default["default"].createElement(Dropdown, {
|
|
@@ -1819,7 +1783,6 @@ const FormComposer = ({
|
|
|
1819
1783
|
useDefaultTheme: useDefaultTheme
|
|
1820
1784
|
});
|
|
1821
1785
|
}
|
|
1822
|
-
|
|
1823
1786
|
case 'checkbox':
|
|
1824
1787
|
{
|
|
1825
1788
|
return /*#__PURE__*/React__default["default"].createElement(Checkbox, {
|
|
@@ -1837,7 +1800,6 @@ const FormComposer = ({
|
|
|
1837
1800
|
setCheckboxValue: setCheckboxValue
|
|
1838
1801
|
});
|
|
1839
1802
|
}
|
|
1840
|
-
|
|
1841
1803
|
case 'radio':
|
|
1842
1804
|
{
|
|
1843
1805
|
return /*#__PURE__*/React__default["default"].createElement(RadioButton, {
|
|
@@ -1852,7 +1814,6 @@ const FormComposer = ({
|
|
|
1852
1814
|
useDefaultTheme: useDefaultTheme
|
|
1853
1815
|
});
|
|
1854
1816
|
}
|
|
1855
|
-
|
|
1856
1817
|
case 'entryPicker':
|
|
1857
1818
|
{
|
|
1858
1819
|
const type = field.dataType === 'objectArray' ? 'checkbox' : 'radio';
|
|
@@ -1865,11 +1826,10 @@ const FormComposer = ({
|
|
|
1865
1826
|
label: field.name && field.name[defaultLanguage],
|
|
1866
1827
|
useDefaultTheme: useDefaultTheme,
|
|
1867
1828
|
setValue: setValue,
|
|
1868
|
-
|
|
1829
|
+
onValidateField: onValidateField,
|
|
1869
1830
|
formId: formId
|
|
1870
1831
|
});
|
|
1871
1832
|
}
|
|
1872
|
-
|
|
1873
1833
|
case 'date':
|
|
1874
1834
|
{
|
|
1875
1835
|
return /*#__PURE__*/React__default["default"].createElement(SingleDate, {
|
|
@@ -1883,7 +1843,6 @@ const FormComposer = ({
|
|
|
1883
1843
|
useDefaultTheme: useDefaultTheme
|
|
1884
1844
|
});
|
|
1885
1845
|
}
|
|
1886
|
-
|
|
1887
1846
|
case 'dateRange':
|
|
1888
1847
|
{
|
|
1889
1848
|
return /*#__PURE__*/React__default["default"].createElement(DateRange, {
|
|
@@ -1896,7 +1855,6 @@ const FormComposer = ({
|
|
|
1896
1855
|
useDefaultTheme: useDefaultTheme
|
|
1897
1856
|
});
|
|
1898
1857
|
}
|
|
1899
|
-
|
|
1900
1858
|
case 'hidden':
|
|
1901
1859
|
{
|
|
1902
1860
|
return /*#__PURE__*/React__default["default"].createElement(HiddenField, {
|
|
@@ -1912,14 +1870,13 @@ const FormComposer = ({
|
|
|
1912
1870
|
}
|
|
1913
1871
|
});
|
|
1914
1872
|
};
|
|
1915
|
-
|
|
1916
1873
|
FormComposer.propTypes = {
|
|
1917
1874
|
fields: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array, PropTypes__default["default"].object]),
|
|
1918
1875
|
formData: PropTypes__default["default"].object,
|
|
1919
1876
|
entries: PropTypes__default["default"].oneOfType([PropTypes__default["default"].array, PropTypes__default["default"].object]),
|
|
1920
1877
|
formId: PropTypes__default["default"].string,
|
|
1921
1878
|
setValue: PropTypes__default["default"].func,
|
|
1922
|
-
|
|
1879
|
+
onValidateField: PropTypes__default["default"].func,
|
|
1923
1880
|
setDateRangeValues: PropTypes__default["default"].func,
|
|
1924
1881
|
defaultLanguage: PropTypes__default["default"].string,
|
|
1925
1882
|
errors: PropTypes__default["default"].array,
|
|
@@ -1927,7 +1884,7 @@ FormComposer.propTypes = {
|
|
|
1927
1884
|
setCheckboxValue: PropTypes__default["default"].func
|
|
1928
1885
|
};
|
|
1929
1886
|
|
|
1930
|
-
const
|
|
1887
|
+
const Loader = ({
|
|
1931
1888
|
className,
|
|
1932
1889
|
color = '#fff',
|
|
1933
1890
|
width = 20,
|
|
@@ -1966,19 +1923,19 @@ const LoadingSpinner = ({
|
|
|
1966
1923
|
})));
|
|
1967
1924
|
};
|
|
1968
1925
|
|
|
1969
|
-
|
|
1970
|
-
displayName: "
|
|
1971
|
-
componentId: "sc-
|
|
1926
|
+
var ButtonStyled = styled__default["default"].button.withConfig({
|
|
1927
|
+
displayName: "buttonstyled",
|
|
1928
|
+
componentId: "sc-1uekf3o-0"
|
|
1972
1929
|
})(["", ";"], ({
|
|
1973
1930
|
theme,
|
|
1974
1931
|
useDefaultTheme
|
|
1975
1932
|
}) => {
|
|
1976
|
-
return styled.css(["", ""], useDefaultTheme && styled.css(["display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin:16px 0 0 0;padding:8px 16px;border-radius:3px;border:1px solid ", ";font-family:inherit;transition:opacity 200ms ease;&:disabled{opacity:0.7;cursor:not-allowed;border-color
|
|
1933
|
+
return styled.css(["", ""], useDefaultTheme && styled.css(["display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin:16px 0 0 0;padding:8px 16px;border-radius:3px;border:1px solid ", ";font-family:inherit;transition:opacity 200ms ease;&:disabled{opacity:0.7;cursor:not-allowed;border-color:", ";background:", ";color:", ";svg{margin-left:4px;circle{stroke:", ";}}}&:hover{opacity:0.7;}"], theme.colors.border, theme.colors.light_grey_light, theme.colors.light_grey_light, theme.colors.light_grey_dark, theme.colors.light_grey_dark));
|
|
1977
1934
|
});
|
|
1978
1935
|
|
|
1979
1936
|
const Button = ({
|
|
1980
1937
|
className,
|
|
1981
|
-
type,
|
|
1938
|
+
type = 'button',
|
|
1982
1939
|
text,
|
|
1983
1940
|
action,
|
|
1984
1941
|
loading,
|
|
@@ -1990,7 +1947,7 @@ const Button = ({
|
|
|
1990
1947
|
onClick: () => action(),
|
|
1991
1948
|
disabled: loading,
|
|
1992
1949
|
useDefaultTheme: useDefaultTheme
|
|
1993
|
-
}, text, loading && /*#__PURE__*/React__default["default"].createElement(
|
|
1950
|
+
}, text, loading && /*#__PURE__*/React__default["default"].createElement(Loader, {
|
|
1994
1951
|
height: 18,
|
|
1995
1952
|
width: 18
|
|
1996
1953
|
}));
|
|
@@ -2004,135 +1961,43 @@ Button.propTypes = {
|
|
|
2004
1961
|
useDefaultTheme: PropTypes__default["default"].bool
|
|
2005
1962
|
};
|
|
2006
1963
|
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
1964
|
+
var CalloutStyled = styled__default["default"].div.withConfig({
|
|
1965
|
+
displayName: "calloutstyled",
|
|
1966
|
+
componentId: "sc-k461qh-0"
|
|
1967
|
+
})(["", ";"], ({
|
|
2011
1968
|
theme
|
|
2012
1969
|
}) => {
|
|
2013
|
-
return
|
|
2014
|
-
|
|
2015
|
-
}, children));
|
|
2016
|
-
};
|
|
2017
|
-
|
|
2018
|
-
ThemeProvider.propTypes = {
|
|
2019
|
-
children: PropTypes__default["default"].oneOfType([PropTypes__default["default"].arrayOf(PropTypes__default["default"].node), PropTypes__default["default"].node]),
|
|
2020
|
-
theme: PropTypes__default["default"].object
|
|
2021
|
-
};
|
|
2022
|
-
|
|
2023
|
-
const mediaQueriesNoUnit = {
|
|
2024
|
-
s: 470,
|
|
2025
|
-
ms: 640,
|
|
2026
|
-
m: 768,
|
|
2027
|
-
ml: 880,
|
|
2028
|
-
l: 1024,
|
|
2029
|
-
xl: 1200,
|
|
2030
|
-
xxl: 1366,
|
|
2031
|
-
wide: 1600
|
|
2032
|
-
};
|
|
2033
|
-
const mediaQueries = {
|
|
2034
|
-
small: mediaQueriesNoUnit.s + 'px',
|
|
2035
|
-
msmall: mediaQueriesNoUnit.ms + 'px',
|
|
2036
|
-
medium: mediaQueriesNoUnit.m + 'px',
|
|
2037
|
-
mlarge: mediaQueriesNoUnit.ml + 'px',
|
|
2038
|
-
large: mediaQueriesNoUnit.l + 'px',
|
|
2039
|
-
xlarge: mediaQueriesNoUnit.xl + 'px',
|
|
2040
|
-
xxlarge: mediaQueriesNoUnit.xxl + 'px',
|
|
2041
|
-
wide: mediaQueriesNoUnit.wide + 'px'
|
|
2042
|
-
};
|
|
2043
|
-
const layout = {
|
|
2044
|
-
mediaQueries: mediaQueries
|
|
2045
|
-
};
|
|
2046
|
-
|
|
2047
|
-
const fontFamily = {
|
|
2048
|
-
Poppins: `'Poppins', Arial, sans-serif`
|
|
2049
|
-
}; //use html tag name as object key
|
|
2050
|
-
//use default object key for base styles
|
|
2051
|
-
//use media query key that corresponds with keys set on mediaQueries object from ./layout to map to relevant screen sizes
|
|
2052
|
-
//uses a mobile first approach to rules
|
|
1970
|
+
return styled.css(["background:#F1F6FD;box-shadow:inset 4px 0 0 ", ";border-radius:0 8px 8px 0;padding:16px 24px;margin-top:8px;span{font-weight:400;font-size:14px;line-height:24px;}"], theme.colors.red_darker);
|
|
1971
|
+
});
|
|
2053
1972
|
|
|
2054
|
-
const
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
line_height: 1.75
|
|
2062
|
-
}
|
|
1973
|
+
const Callout = ({
|
|
1974
|
+
className,
|
|
1975
|
+
text
|
|
1976
|
+
}) => {
|
|
1977
|
+
return /*#__PURE__*/React__default["default"].createElement(CalloutStyled, {
|
|
1978
|
+
className: className
|
|
1979
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", null, text));
|
|
2063
1980
|
};
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
}; // function generateTypeStyles(obj) {
|
|
2068
|
-
// return Object.keys(obj)
|
|
2069
|
-
// .map(mq => {
|
|
2070
|
-
// const props = generateProps(obj[mq]);
|
|
2071
|
-
// if (mq === 'default') {
|
|
2072
|
-
// return `${props.join(' ')}`;
|
|
2073
|
-
// } else {
|
|
2074
|
-
// return `@media only screen and (min-width:${
|
|
2075
|
-
// mediaQueries[mq]
|
|
2076
|
-
// }){${props.join('')}}`;
|
|
2077
|
-
// }
|
|
2078
|
-
// })
|
|
2079
|
-
// .join('');
|
|
2080
|
-
// }
|
|
2081
|
-
// function generateProps(objMQ) {
|
|
2082
|
-
// let props = [];
|
|
2083
|
-
// Object.keys(objMQ).map(prop => {
|
|
2084
|
-
// props.push(`${prop.split('_').join('-')}: ${objMQ[prop]};`);
|
|
2085
|
-
// });
|
|
2086
|
-
// return props;
|
|
2087
|
-
// }
|
|
2088
|
-
|
|
2089
|
-
const defaultTheme = {
|
|
2090
|
-
layout,
|
|
2091
|
-
typographyStyles,
|
|
2092
|
-
typography,
|
|
2093
|
-
colors
|
|
1981
|
+
Callout.propTypes = {
|
|
1982
|
+
className: PropTypes__default["default"].string,
|
|
1983
|
+
text: PropTypes__default["default"].string
|
|
2094
1984
|
};
|
|
2095
1985
|
|
|
2096
1986
|
const Form = ({
|
|
2097
1987
|
className,
|
|
2098
1988
|
formId,
|
|
2099
1989
|
useDefaultTheme = true,
|
|
2100
|
-
|
|
1990
|
+
onCustomSubmit
|
|
2101
1991
|
}) => {
|
|
2102
1992
|
const dispatch = reactRedux.useDispatch();
|
|
2103
|
-
|
|
2104
|
-
const
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
const
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
const _setCheckboxValue = (formId, id, value, isChecked) => {
|
|
2113
|
-
dispatch(setCheckboxValue(formId, id, value, isChecked));
|
|
2114
|
-
};
|
|
2115
|
-
|
|
2116
|
-
const _setDateRangeValues = (formId, id, dateType, value) => {
|
|
2117
|
-
dispatch(setDateRangeValues(formId, id, dateType, value));
|
|
2118
|
-
};
|
|
2119
|
-
|
|
2120
|
-
const _validateField = (formId, id, value) => {
|
|
2121
|
-
dispatch(validateField(formId, id, value));
|
|
2122
|
-
};
|
|
2123
|
-
|
|
2124
|
-
const _togglePageForward = (formId, pageIndex) => {
|
|
2125
|
-
dispatch(togglePageForward(formId, pageIndex));
|
|
2126
|
-
};
|
|
2127
|
-
|
|
2128
|
-
const _togglePageBack = (formId, pageIndex) => {
|
|
2129
|
-
dispatch(togglePageBack(formId, pageIndex));
|
|
2130
|
-
};
|
|
2131
|
-
|
|
2132
|
-
const _submitForm = formId => {
|
|
2133
|
-
dispatch(submitForm(formId));
|
|
2134
|
-
};
|
|
2135
|
-
|
|
1993
|
+
const _setFormId = formId => dispatch(setFormId(formId));
|
|
1994
|
+
const _setValue = (formId, id, value) => dispatch(setValue(formId, id, value));
|
|
1995
|
+
const _setCheckboxValue = (formId, id, value, isChecked) => dispatch(setCheckboxValue(formId, id, value, isChecked));
|
|
1996
|
+
const _setDateRangeValues = (formId, id, dateType, value) => dispatch(setDateRangeValues(formId, id, dateType, value));
|
|
1997
|
+
const _onValidateField = (formId, id, value) => dispatch(onValidateField(formId, id, value));
|
|
1998
|
+
const _doTogglePageForward = (formId, pageIndex) => dispatch(doTogglePageForward(formId, pageIndex));
|
|
1999
|
+
const _doTogglePageBack = (formId, pageIndex) => dispatch(doTogglePageBack(formId, pageIndex));
|
|
2000
|
+
const _onSubmit = formId => dispatch(onSubmit(formId));
|
|
2136
2001
|
React.useEffect(() => {
|
|
2137
2002
|
if (formId) _setFormId(formId);
|
|
2138
2003
|
}, [formId]);
|
|
@@ -2144,6 +2009,7 @@ const Form = ({
|
|
|
2144
2009
|
const selectFormFieldErrors = makeSelectFormFieldErrors(formId);
|
|
2145
2010
|
const selectFormEntries = makeSelectFormEntries(formId);
|
|
2146
2011
|
const selectFormPostData = makeSelectFormPostData(formId);
|
|
2012
|
+
const selectFormValidationSent = makeSelectFormValidationSent(formId);
|
|
2147
2013
|
const status = reactRedux.useSelector(selectFormStatus);
|
|
2148
2014
|
const fields = reactRedux.useSelector(selectFormFields);
|
|
2149
2015
|
const pagingInfo = reactRedux.useSelector(selectPagingInfo);
|
|
@@ -2152,7 +2018,7 @@ const Form = ({
|
|
|
2152
2018
|
const errors = reactRedux.useSelector(selectFormFieldErrors);
|
|
2153
2019
|
const entries = reactRedux.useSelector(selectFormEntries);
|
|
2154
2020
|
const formData = reactRedux.useSelector(selectFormPostData);
|
|
2155
|
-
|
|
2021
|
+
const validate = reactRedux.useSelector(selectFormValidationSent);
|
|
2156
2022
|
if (pagingInfo && pagingInfo.pageCount > 1) {
|
|
2157
2023
|
const isLastPage = pagingInfo.pageCount == pagingInfo.pageIndex + 1;
|
|
2158
2024
|
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
|
|
@@ -2164,14 +2030,14 @@ const Form = ({
|
|
|
2164
2030
|
}, !(status !== null && status !== void 0 && status.hasSuccess) && !(status !== null && status !== void 0 && status.isLoading) && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, pagingInfo.pageIndex > 0 && /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
2165
2031
|
type: "button",
|
|
2166
2032
|
text: "Go Back",
|
|
2167
|
-
action: () =>
|
|
2033
|
+
action: () => _doTogglePageBack(formId, pagingInfo.pageIndex - 1),
|
|
2168
2034
|
useDefaultTheme: useDefaultTheme
|
|
2169
2035
|
}), /*#__PURE__*/React__default["default"].createElement(FormComposer, {
|
|
2170
2036
|
fields: fields,
|
|
2171
2037
|
formData: formData,
|
|
2172
2038
|
formId: formId,
|
|
2173
2039
|
setValue: _setValue,
|
|
2174
|
-
|
|
2040
|
+
onValidateField: _onValidateField,
|
|
2175
2041
|
defaultLanguage: defaultLanguage,
|
|
2176
2042
|
errors: errors,
|
|
2177
2043
|
pagingInfo: pagingInfo,
|
|
@@ -2182,26 +2048,36 @@ const Form = ({
|
|
|
2182
2048
|
}), !isLastPage && /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
2183
2049
|
type: "button",
|
|
2184
2050
|
text: "Next",
|
|
2185
|
-
action: () =>
|
|
2051
|
+
action: () => _doTogglePageForward(formId, pagingInfo.pageIndex + 1),
|
|
2186
2052
|
useDefaultTheme: useDefaultTheme
|
|
2187
2053
|
}), isLastPage && /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
2188
2054
|
text: (settings === null || settings === void 0 ? void 0 : settings.submitButtonText) || "Submit",
|
|
2189
2055
|
type: "button",
|
|
2190
2056
|
loading: status === null || status === void 0 ? void 0 : status.isLoading,
|
|
2191
2057
|
action: () => {
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
if (customSubmit) customSubmit();
|
|
2058
|
+
_onSubmit(formId);
|
|
2059
|
+
if (onCustomSubmit) onCustomSubmit();
|
|
2195
2060
|
},
|
|
2196
2061
|
useDefaultTheme: useDefaultTheme
|
|
2197
|
-
})), (status === null || status === void 0 ? void 0 : status.isLoading) && !(status !== null && status !== void 0 && status.hasSuccess) && /*#__PURE__*/React__default["default"].createElement(
|
|
2062
|
+
})), (status === null || status === void 0 ? void 0 : status.isLoading) && !(status !== null && status !== void 0 && status.hasSuccess) && /*#__PURE__*/React__default["default"].createElement(Loader, {
|
|
2198
2063
|
className: "loading",
|
|
2199
2064
|
height: 24,
|
|
2200
2065
|
width: 24,
|
|
2201
2066
|
color: "#333"
|
|
2202
|
-
}), (status === null || status === void 0 ? void 0 : status.hasSuccess) && (status === null || status === void 0 ? void 0 : status.
|
|
2067
|
+
}), (status === null || status === void 0 ? void 0 : status.hasSuccess) && (status === null || status === void 0 ? void 0 : status.messages.success) && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
2203
2068
|
className: "success-message"
|
|
2204
|
-
}, status.
|
|
2069
|
+
}, status.messages.success), (errors === null || errors === void 0 ? void 0 : errors.length) >= 1 && validate && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2070
|
+
className: "form__errors",
|
|
2071
|
+
role: "alert"
|
|
2072
|
+
}, errors === null || errors === void 0 ? void 0 : errors.map(({
|
|
2073
|
+
message
|
|
2074
|
+
}, i) => {
|
|
2075
|
+
return /*#__PURE__*/React__default["default"].createElement(Callout, {
|
|
2076
|
+
className: "form__error",
|
|
2077
|
+
text: message,
|
|
2078
|
+
key: i
|
|
2079
|
+
});
|
|
2080
|
+
}))));
|
|
2205
2081
|
} else {
|
|
2206
2082
|
return /*#__PURE__*/React__default["default"].createElement(ThemeProvider, {
|
|
2207
2083
|
theme: defaultTheme
|
|
@@ -2214,7 +2090,7 @@ const Form = ({
|
|
|
2214
2090
|
formId: formId,
|
|
2215
2091
|
setValue: _setValue,
|
|
2216
2092
|
setDateRangeValues: _setDateRangeValues,
|
|
2217
|
-
|
|
2093
|
+
onValidateField: _onValidateField,
|
|
2218
2094
|
defaultLanguage: defaultLanguage,
|
|
2219
2095
|
errors: errors,
|
|
2220
2096
|
useDefaultTheme: useDefaultTheme,
|
|
@@ -2225,32 +2101,41 @@ const Form = ({
|
|
|
2225
2101
|
text: (settings === null || settings === void 0 ? void 0 : settings.submitButtonText) || "Submit",
|
|
2226
2102
|
type: "button",
|
|
2227
2103
|
action: () => {
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
if (customSubmit) customSubmit();
|
|
2104
|
+
_onSubmit(formId);
|
|
2105
|
+
if (onCustomSubmit) onCustomSubmit();
|
|
2231
2106
|
},
|
|
2232
2107
|
useDefaultTheme: useDefaultTheme
|
|
2233
|
-
})), (status === null || status === void 0 ? void 0 : status.isLoading) && !(status !== null && status !== void 0 && status.hasSuccess) && /*#__PURE__*/React__default["default"].createElement(
|
|
2108
|
+
})), (status === null || status === void 0 ? void 0 : status.isLoading) && !(status !== null && status !== void 0 && status.hasSuccess) && /*#__PURE__*/React__default["default"].createElement(Loader, {
|
|
2234
2109
|
className: "loading",
|
|
2235
2110
|
height: 24,
|
|
2236
2111
|
width: 24,
|
|
2237
2112
|
color: "#333"
|
|
2238
|
-
}), (status === null || status === void 0 ? void 0 : status.hasSuccess) && (status === null || status === void 0 ? void 0 : status.
|
|
2113
|
+
}), (status === null || status === void 0 ? void 0 : status.hasSuccess) && (status === null || status === void 0 ? void 0 : status.messages.success) && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
2239
2114
|
className: "success-message"
|
|
2240
|
-
}, status.
|
|
2115
|
+
}, status.messages.success), (errors === null || errors === void 0 ? void 0 : errors.length) >= 1 && validate && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2116
|
+
className: "form__errors",
|
|
2117
|
+
role: "alert"
|
|
2118
|
+
}, errors === null || errors === void 0 ? void 0 : errors.map(({
|
|
2119
|
+
message
|
|
2120
|
+
}, i) => {
|
|
2121
|
+
return /*#__PURE__*/React__default["default"].createElement(Callout, {
|
|
2122
|
+
className: "form__error",
|
|
2123
|
+
text: message,
|
|
2124
|
+
key: i
|
|
2125
|
+
});
|
|
2126
|
+
}))));
|
|
2241
2127
|
}
|
|
2242
2128
|
};
|
|
2243
|
-
|
|
2244
2129
|
Form.propTypes = {
|
|
2245
2130
|
className: PropTypes__default["default"].string,
|
|
2246
2131
|
formId: PropTypes__default["default"].string,
|
|
2247
2132
|
useDefaultTheme: PropTypes__default["default"].bool,
|
|
2248
|
-
|
|
2133
|
+
onCustomSubmit: PropTypes__default["default"].func
|
|
2249
2134
|
};
|
|
2250
2135
|
|
|
2136
|
+
exports.Form = Form;
|
|
2251
2137
|
exports.actions = actions;
|
|
2252
|
-
exports["default"] = Form;
|
|
2253
2138
|
exports.reducer = reducer;
|
|
2254
|
-
exports.sagas =
|
|
2139
|
+
exports.sagas = sagas;
|
|
2255
2140
|
exports.selectors = selectors;
|
|
2256
2141
|
//# sourceMappingURL=forms.js.map
|