@bigbinary/neeto-form-frontend 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +276 -97
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +266 -87
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4,10 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React$2 = require('react');
|
|
6
6
|
var formik = require('formik');
|
|
7
|
-
var
|
|
7
|
+
var ramda = require('ramda');
|
|
8
8
|
var PageLoader = require('neetomolecules/PageLoader');
|
|
9
9
|
var neetoui = require('@bigbinary/neetoui');
|
|
10
|
-
var ramda = require('ramda');
|
|
11
10
|
var ReactDOM = require('react-dom');
|
|
12
11
|
var i18next = require('i18next');
|
|
13
12
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
@@ -76,22 +75,22 @@ function _extends$8() {
|
|
|
76
75
|
return _extends$8.apply(this, arguments);
|
|
77
76
|
}
|
|
78
77
|
|
|
79
|
-
function _typeof$
|
|
78
|
+
function _typeof$7(obj) {
|
|
80
79
|
"@babel/helpers - typeof";
|
|
81
80
|
|
|
82
|
-
return _typeof$
|
|
81
|
+
return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
83
82
|
return typeof obj;
|
|
84
83
|
} : function (obj) {
|
|
85
84
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
86
|
-
}, _typeof$
|
|
85
|
+
}, _typeof$7(obj);
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
function _toPrimitive$1(input, hint) {
|
|
90
|
-
if (_typeof$
|
|
89
|
+
if (_typeof$7(input) !== "object" || input === null) return input;
|
|
91
90
|
var prim = input[Symbol.toPrimitive];
|
|
92
91
|
if (prim !== undefined) {
|
|
93
92
|
var res = prim.call(input, hint || "default");
|
|
94
|
-
if (_typeof$
|
|
93
|
+
if (_typeof$7(res) !== "object") return res;
|
|
95
94
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
96
95
|
}
|
|
97
96
|
return (hint === "string" ? String : Number)(input);
|
|
@@ -99,7 +98,7 @@ function _toPrimitive$1(input, hint) {
|
|
|
99
98
|
|
|
100
99
|
function _toPropertyKey$1(arg) {
|
|
101
100
|
var key = _toPrimitive$1(arg, "string");
|
|
102
|
-
return _typeof$
|
|
101
|
+
return _typeof$7(key) === "symbol" ? key : String(key);
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
function _defineProperty$7(obj, key, value) {
|
|
@@ -244,6 +243,131 @@ var QUERY_KEYS = (cov_4tvsihi60().s[4]++, {
|
|
|
244
243
|
});
|
|
245
244
|
var DEFAULT_STALE_TIME = (cov_4tvsihi60().s[5]++, 3200000); // 1 hour
|
|
246
245
|
|
|
246
|
+
function _arrayWithHoles$5(arr) {
|
|
247
|
+
if (Array.isArray(arr)) return arr;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function _iterableToArrayLimit$5(arr, i) {
|
|
251
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
252
|
+
if (null != _i) {
|
|
253
|
+
var _s,
|
|
254
|
+
_e,
|
|
255
|
+
_x,
|
|
256
|
+
_r,
|
|
257
|
+
_arr = [],
|
|
258
|
+
_n = !0,
|
|
259
|
+
_d = !1;
|
|
260
|
+
try {
|
|
261
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
262
|
+
if (Object(_i) !== _i) return;
|
|
263
|
+
_n = !1;
|
|
264
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
265
|
+
} catch (err) {
|
|
266
|
+
_d = !0, _e = err;
|
|
267
|
+
} finally {
|
|
268
|
+
try {
|
|
269
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
|
270
|
+
} finally {
|
|
271
|
+
if (_d) throw _e;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return _arr;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function _arrayLikeToArray$h(arr, len) {
|
|
279
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
280
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
281
|
+
return arr2;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function _unsupportedIterableToArray$h(o, minLen) {
|
|
285
|
+
if (!o) return;
|
|
286
|
+
if (typeof o === "string") return _arrayLikeToArray$h(o, minLen);
|
|
287
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
288
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
289
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
290
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$h(o, minLen);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
function _nonIterableRest$5() {
|
|
294
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
function _slicedToArray$5(arr, i) {
|
|
298
|
+
return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$5();
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function _typeof$6(obj) {
|
|
302
|
+
"@babel/helpers - typeof";
|
|
303
|
+
|
|
304
|
+
return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
305
|
+
return typeof obj;
|
|
306
|
+
} : function (obj) {
|
|
307
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
308
|
+
}, _typeof$6(obj);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* @template {Function} T
|
|
313
|
+
* @param {T} func
|
|
314
|
+
* @returns {T}
|
|
315
|
+
*/
|
|
316
|
+
var nullSafe = function nullSafe(func) {
|
|
317
|
+
return (
|
|
318
|
+
// @ts-ignore
|
|
319
|
+
ramda.curryN(func.length, function () {
|
|
320
|
+
var _ref;
|
|
321
|
+
var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
|
|
322
|
+
return ramda.isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
|
|
323
|
+
})
|
|
324
|
+
);
|
|
325
|
+
};
|
|
326
|
+
var noop$4 = function noop() {};
|
|
327
|
+
var isNotPresent = /*#__PURE__*/ramda.either(ramda.isNil, ramda.isEmpty);
|
|
328
|
+
var isPresent = /*#__PURE__*/ramda.complement(isNotPresent);
|
|
329
|
+
|
|
330
|
+
var matchesImpl = function matchesImpl(pattern, object) {
|
|
331
|
+
var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
|
|
332
|
+
if (object === pattern) return true;
|
|
333
|
+
if (typeof pattern === "function" && pattern(object, __parent)) return true;
|
|
334
|
+
if (ramda.isNil(pattern) || ramda.isNil(object)) return false;
|
|
335
|
+
if (_typeof$6(pattern) !== "object") return false;
|
|
336
|
+
return Object.entries(pattern).every(function (_ref) {
|
|
337
|
+
var _ref2 = _slicedToArray$5(_ref, 2),
|
|
338
|
+
key = _ref2[0],
|
|
339
|
+
value = _ref2[1];
|
|
340
|
+
return matchesImpl(value, object[key], __parent);
|
|
341
|
+
});
|
|
342
|
+
};
|
|
343
|
+
var matches = /*#__PURE__*/ramda.curry(function (pattern, object) {
|
|
344
|
+
return matchesImpl(pattern, object);
|
|
345
|
+
});
|
|
346
|
+
var filterNonNull = function filterNonNull(object) {
|
|
347
|
+
return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
|
|
348
|
+
var _ref6 = _slicedToArray$5(_ref5, 2),
|
|
349
|
+
v = _ref6[1];
|
|
350
|
+
return !ramda.isNil(v);
|
|
351
|
+
}).map(function (_ref7) {
|
|
352
|
+
var _ref8 = _slicedToArray$5(_ref7, 2),
|
|
353
|
+
k = _ref8[0],
|
|
354
|
+
v = _ref8[1];
|
|
355
|
+
return [k, _typeof$6(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
|
|
356
|
+
}));
|
|
357
|
+
};
|
|
358
|
+
nullSafe(filterNonNull);
|
|
359
|
+
var findById = /*#__PURE__*/ramda.curry(function (id, array) {
|
|
360
|
+
return array.find(function (item) {
|
|
361
|
+
return item.id === id;
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
var findBy = /*#__PURE__*/ramda.curry(function (pattern, array) {
|
|
365
|
+
return array.find(matches(pattern));
|
|
366
|
+
});
|
|
367
|
+
var removeBy = /*#__PURE__*/ramda.curry(function (pattern, array) {
|
|
368
|
+
return array.filter(ramda.complement(matches(pattern)));
|
|
369
|
+
});
|
|
370
|
+
|
|
247
371
|
function _setPrototypeOf$2(o, p) {
|
|
248
372
|
_setPrototypeOf$2 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
249
373
|
o.__proto__ = p;
|
|
@@ -19180,8 +19304,8 @@ var useBuildFormStore = (cov_2rhjwge57i().s[0]++, zustand.create(reactUtils.with
|
|
|
19180
19304
|
isSubmitting: false,
|
|
19181
19305
|
isValid: true,
|
|
19182
19306
|
errors: [],
|
|
19183
|
-
submitForm:
|
|
19184
|
-
resetForm:
|
|
19307
|
+
submitForm: noop$4,
|
|
19308
|
+
resetForm: noop$4
|
|
19185
19309
|
},
|
|
19186
19310
|
setFormData: function setFormData(payload) {
|
|
19187
19311
|
cov_2rhjwge57i().f[1]++;
|
|
@@ -30121,7 +30245,7 @@ var getActiveQuestionKindDetails = function getActiveQuestionKindDetails(_ref) {
|
|
|
30121
30245
|
var _ref2 = (cov_18silvsqg9().s[1]++, item),
|
|
30122
30246
|
kind = _ref2.kind,
|
|
30123
30247
|
label = _ref2.label;
|
|
30124
|
-
var _ref3 = (cov_18silvsqg9().s[2]++,
|
|
30248
|
+
var _ref3 = (cov_18silvsqg9().s[2]++, findBy({
|
|
30125
30249
|
type: kind
|
|
30126
30250
|
}, allQuestionKinds)),
|
|
30127
30251
|
FieldComponent = _ref3.component,
|
|
@@ -31710,7 +31834,7 @@ var BuildForm = function BuildForm(_ref) {
|
|
|
31710
31834
|
cov_2nbnnlcv5p().s[20]++;
|
|
31711
31835
|
return false;
|
|
31712
31836
|
}));
|
|
31713
|
-
var defaultQuestionKinds = (cov_2nbnnlcv5p().s[21]++, allowAdditionalGuests ? (cov_2nbnnlcv5p().b[17][0]++, QUESTION_KINDS) : (cov_2nbnnlcv5p().b[17][1]++,
|
|
31837
|
+
var defaultQuestionKinds = (cov_2nbnnlcv5p().s[21]++, allowAdditionalGuests ? (cov_2nbnnlcv5p().b[17][0]++, QUESTION_KINDS) : (cov_2nbnnlcv5p().b[17][1]++, removeBy({
|
|
31714
31838
|
type: QUESTION_KIND.ADDITIONAL_GUESTS.value
|
|
31715
31839
|
}, QUESTION_KINDS)));
|
|
31716
31840
|
cov_2nbnnlcv5p().s[22]++;
|
|
@@ -31741,7 +31865,7 @@ var BuildForm = function BuildForm(_ref) {
|
|
|
31741
31865
|
showActionBlock: showActionBlock,
|
|
31742
31866
|
showAddQuestionDivider: showAddQuestionDivider,
|
|
31743
31867
|
submitButtonProps: submitButtonProps,
|
|
31744
|
-
questionKinds:
|
|
31868
|
+
questionKinds: isPresent(questionKinds) ? (cov_2nbnnlcv5p().b[18][0]++, questionKinds) : (cov_2nbnnlcv5p().b[18][1]++, defaultQuestionKinds),
|
|
31745
31869
|
onValueChange: onValueChange,
|
|
31746
31870
|
onChange: function onChange(event) {
|
|
31747
31871
|
cov_2nbnnlcv5p().f[10]++;
|
|
@@ -33834,7 +33958,7 @@ var Callout = function Callout(_ref) {
|
|
|
33834
33958
|
"neeto-form-engine-callout--static": position === CALLOUT_POSITIONS.STATIC,
|
|
33835
33959
|
"neeto-form-engine-callout--absolute": position === CALLOUT_POSITIONS.ABSOLUTE
|
|
33836
33960
|
}, className, className))
|
|
33837
|
-
}, (cov_5g983l5mw().b[4][0]++,
|
|
33961
|
+
}, (cov_5g983l5mw().b[4][0]++, isPresent(onClose)) && (cov_5g983l5mw().b[4][1]++, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
33838
33962
|
className: "neeto-form-engine-callout__close",
|
|
33839
33963
|
onClick: onClose
|
|
33840
33964
|
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Close, {
|
|
@@ -38136,7 +38260,7 @@ var MultipleEmailInput = function MultipleEmailInput(_ref) {
|
|
|
38136
38260
|
_ref4$ = _ref4[2],
|
|
38137
38261
|
setValue = _ref4$.setValue,
|
|
38138
38262
|
setTouched = _ref4$.setTouched;
|
|
38139
|
-
var _ref5 = (cov_2bcewcub9k().s[3]++, React$2.useState(
|
|
38263
|
+
var _ref5 = (cov_2bcewcub9k().s[3]++, React$2.useState(isPresent(field.value))),
|
|
38140
38264
|
_ref6 = _slicedToArray$4(_ref5, 2),
|
|
38141
38265
|
isInputVisible = _ref6[0],
|
|
38142
38266
|
setIsInputVisible = _ref6[1];
|
|
@@ -47109,7 +47233,7 @@ var generateFormResponse = function generateFormResponse(response, questions) {
|
|
|
47109
47233
|
cov_1l3yhm377b().s[35]++;
|
|
47110
47234
|
if ((cov_1l3yhm377b().b[14][0]++, kind === QUESTION_KIND.RADIO.value) || (cov_1l3yhm377b().b[14][1]++, kind === QUESTION_KIND.DROPDOWN.value)) {
|
|
47111
47235
|
cov_1l3yhm377b().b[13][0]++;
|
|
47112
|
-
var option = (cov_1l3yhm377b().s[36]++,
|
|
47236
|
+
var option = (cov_1l3yhm377b().s[36]++, findById(responseValue, optionsAttributes));
|
|
47113
47237
|
cov_1l3yhm377b().s[37]++;
|
|
47114
47238
|
if (option) {
|
|
47115
47239
|
cov_1l3yhm377b().b[15][0]++;
|
|
@@ -49084,7 +49208,7 @@ var OptionsField = function OptionsField(_ref) {
|
|
|
49084
49208
|
name: name,
|
|
49085
49209
|
options: transformedOptions,
|
|
49086
49210
|
type: kind,
|
|
49087
|
-
value: kind === QUESTION_KIND.DROPDOWN.value ? (cov_1i8uylwhkg().b[3][0]++,
|
|
49211
|
+
value: kind === QUESTION_KIND.DROPDOWN.value ? (cov_1i8uylwhkg().b[3][0]++, findBy({
|
|
49088
49212
|
value: value
|
|
49089
49213
|
}, transformedOptions)) : (cov_1i8uylwhkg().b[3][1]++, value),
|
|
49090
49214
|
onChange: kind === QUESTION_KIND.DROPDOWN.value ? (cov_1i8uylwhkg().b[4][0]++, handleSelect) : (cov_1i8uylwhkg().b[4][1]++, onChange)
|
|
@@ -50012,7 +50136,7 @@ var RatingField = function RatingField(_ref) {
|
|
|
50012
50136
|
|
|
50013
50137
|
function cov_169joloac6() {
|
|
50014
50138
|
var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/ExternalForm/Fields/RichTextEditor.jsx";
|
|
50015
|
-
var hash = "
|
|
50139
|
+
var hash = "606c74303adb3d540387836761d6cccb9f3cc43f";
|
|
50016
50140
|
var global = new Function("return this")();
|
|
50017
50141
|
var gcv = "__coverage__";
|
|
50018
50142
|
var coverageData = {
|
|
@@ -50020,61 +50144,81 @@ function cov_169joloac6() {
|
|
|
50020
50144
|
statementMap: {
|
|
50021
50145
|
"0": {
|
|
50022
50146
|
start: {
|
|
50023
|
-
line:
|
|
50147
|
+
line: 10,
|
|
50024
50148
|
column: 23
|
|
50025
50149
|
},
|
|
50026
50150
|
end: {
|
|
50027
|
-
line:
|
|
50151
|
+
line: 54,
|
|
50028
50152
|
column: 1
|
|
50029
50153
|
}
|
|
50030
50154
|
},
|
|
50031
50155
|
"1": {
|
|
50032
50156
|
start: {
|
|
50033
|
-
line:
|
|
50157
|
+
line: 11,
|
|
50034
50158
|
column: 69
|
|
50035
50159
|
},
|
|
50036
50160
|
end: {
|
|
50037
|
-
line:
|
|
50161
|
+
line: 11,
|
|
50038
50162
|
column: 77
|
|
50039
50163
|
}
|
|
50040
50164
|
},
|
|
50041
50165
|
"2": {
|
|
50042
50166
|
start: {
|
|
50043
|
-
line:
|
|
50167
|
+
line: 13,
|
|
50168
|
+
column: 31
|
|
50169
|
+
},
|
|
50170
|
+
end: {
|
|
50171
|
+
line: 13,
|
|
50172
|
+
column: 60
|
|
50173
|
+
}
|
|
50174
|
+
},
|
|
50175
|
+
"3": {
|
|
50176
|
+
start: {
|
|
50177
|
+
line: 15,
|
|
50044
50178
|
column: 2
|
|
50045
50179
|
},
|
|
50046
50180
|
end: {
|
|
50047
|
-
line:
|
|
50181
|
+
line: 53,
|
|
50048
50182
|
column: 4
|
|
50049
50183
|
}
|
|
50050
50184
|
},
|
|
50051
|
-
"
|
|
50185
|
+
"4": {
|
|
50052
50186
|
start: {
|
|
50053
|
-
line:
|
|
50187
|
+
line: 29,
|
|
50054
50188
|
column: 10
|
|
50055
50189
|
},
|
|
50056
50190
|
end: {
|
|
50057
|
-
line:
|
|
50191
|
+
line: 29,
|
|
50192
|
+
column: 75
|
|
50193
|
+
}
|
|
50194
|
+
},
|
|
50195
|
+
"5": {
|
|
50196
|
+
start: {
|
|
50197
|
+
line: 33,
|
|
50198
|
+
column: 10
|
|
50199
|
+
},
|
|
50200
|
+
end: {
|
|
50201
|
+
line: 49,
|
|
50058
50202
|
column: 12
|
|
50059
50203
|
}
|
|
50060
50204
|
},
|
|
50061
|
-
"
|
|
50205
|
+
"6": {
|
|
50062
50206
|
start: {
|
|
50063
|
-
line:
|
|
50207
|
+
line: 46,
|
|
50064
50208
|
column: 26
|
|
50065
50209
|
},
|
|
50066
50210
|
end: {
|
|
50067
|
-
line:
|
|
50211
|
+
line: 46,
|
|
50068
50212
|
column: 58
|
|
50069
50213
|
}
|
|
50070
50214
|
},
|
|
50071
|
-
"
|
|
50215
|
+
"7": {
|
|
50072
50216
|
start: {
|
|
50073
|
-
line:
|
|
50217
|
+
line: 47,
|
|
50074
50218
|
column: 31
|
|
50075
50219
|
},
|
|
50076
50220
|
end: {
|
|
50077
|
-
line:
|
|
50221
|
+
line: 47,
|
|
50078
50222
|
column: 62
|
|
50079
50223
|
}
|
|
50080
50224
|
}
|
|
@@ -50084,222 +50228,246 @@ function cov_169joloac6() {
|
|
|
50084
50228
|
name: "(anonymous_0)",
|
|
50085
50229
|
decl: {
|
|
50086
50230
|
start: {
|
|
50087
|
-
line:
|
|
50231
|
+
line: 10,
|
|
50088
50232
|
column: 23
|
|
50089
50233
|
},
|
|
50090
50234
|
end: {
|
|
50091
|
-
line:
|
|
50235
|
+
line: 10,
|
|
50092
50236
|
column: 24
|
|
50093
50237
|
}
|
|
50094
50238
|
},
|
|
50095
50239
|
loc: {
|
|
50096
50240
|
start: {
|
|
50097
|
-
line:
|
|
50241
|
+
line: 10,
|
|
50098
50242
|
column: 70
|
|
50099
50243
|
},
|
|
50100
50244
|
end: {
|
|
50101
|
-
line:
|
|
50245
|
+
line: 54,
|
|
50102
50246
|
column: 1
|
|
50103
50247
|
}
|
|
50104
50248
|
},
|
|
50105
|
-
line:
|
|
50249
|
+
line: 10
|
|
50106
50250
|
},
|
|
50107
50251
|
"1": {
|
|
50108
50252
|
name: "(anonymous_1)",
|
|
50109
50253
|
decl: {
|
|
50110
50254
|
start: {
|
|
50111
|
-
line:
|
|
50255
|
+
line: 28,
|
|
50256
|
+
column: 22
|
|
50257
|
+
},
|
|
50258
|
+
end: {
|
|
50259
|
+
line: 28,
|
|
50260
|
+
column: 23
|
|
50261
|
+
}
|
|
50262
|
+
},
|
|
50263
|
+
loc: {
|
|
50264
|
+
start: {
|
|
50265
|
+
line: 29,
|
|
50266
|
+
column: 10
|
|
50267
|
+
},
|
|
50268
|
+
end: {
|
|
50269
|
+
line: 29,
|
|
50270
|
+
column: 75
|
|
50271
|
+
}
|
|
50272
|
+
},
|
|
50273
|
+
line: 29
|
|
50274
|
+
},
|
|
50275
|
+
"2": {
|
|
50276
|
+
name: "(anonymous_2)",
|
|
50277
|
+
decl: {
|
|
50278
|
+
start: {
|
|
50279
|
+
line: 32,
|
|
50112
50280
|
column: 9
|
|
50113
50281
|
},
|
|
50114
50282
|
end: {
|
|
50115
|
-
line:
|
|
50283
|
+
line: 32,
|
|
50116
50284
|
column: 10
|
|
50117
50285
|
}
|
|
50118
50286
|
},
|
|
50119
50287
|
loc: {
|
|
50120
50288
|
start: {
|
|
50121
|
-
line:
|
|
50289
|
+
line: 33,
|
|
50122
50290
|
column: 10
|
|
50123
50291
|
},
|
|
50124
50292
|
end: {
|
|
50125
|
-
line:
|
|
50293
|
+
line: 49,
|
|
50126
50294
|
column: 12
|
|
50127
50295
|
}
|
|
50128
50296
|
},
|
|
50129
|
-
line:
|
|
50297
|
+
line: 33
|
|
50130
50298
|
},
|
|
50131
|
-
"
|
|
50132
|
-
name: "(
|
|
50299
|
+
"3": {
|
|
50300
|
+
name: "(anonymous_3)",
|
|
50133
50301
|
decl: {
|
|
50134
50302
|
start: {
|
|
50135
|
-
line:
|
|
50303
|
+
line: 46,
|
|
50136
50304
|
column: 20
|
|
50137
50305
|
},
|
|
50138
50306
|
end: {
|
|
50139
|
-
line:
|
|
50307
|
+
line: 46,
|
|
50140
50308
|
column: 21
|
|
50141
50309
|
}
|
|
50142
50310
|
},
|
|
50143
50311
|
loc: {
|
|
50144
50312
|
start: {
|
|
50145
|
-
line:
|
|
50313
|
+
line: 46,
|
|
50146
50314
|
column: 26
|
|
50147
50315
|
},
|
|
50148
50316
|
end: {
|
|
50149
|
-
line:
|
|
50317
|
+
line: 46,
|
|
50150
50318
|
column: 58
|
|
50151
50319
|
}
|
|
50152
50320
|
},
|
|
50153
|
-
line:
|
|
50321
|
+
line: 46
|
|
50154
50322
|
},
|
|
50155
|
-
"
|
|
50156
|
-
name: "(
|
|
50323
|
+
"4": {
|
|
50324
|
+
name: "(anonymous_4)",
|
|
50157
50325
|
decl: {
|
|
50158
50326
|
start: {
|
|
50159
|
-
line:
|
|
50327
|
+
line: 47,
|
|
50160
50328
|
column: 22
|
|
50161
50329
|
},
|
|
50162
50330
|
end: {
|
|
50163
|
-
line:
|
|
50331
|
+
line: 47,
|
|
50164
50332
|
column: 23
|
|
50165
50333
|
}
|
|
50166
50334
|
},
|
|
50167
50335
|
loc: {
|
|
50168
50336
|
start: {
|
|
50169
|
-
line:
|
|
50337
|
+
line: 47,
|
|
50170
50338
|
column: 31
|
|
50171
50339
|
},
|
|
50172
50340
|
end: {
|
|
50173
|
-
line:
|
|
50341
|
+
line: 47,
|
|
50174
50342
|
column: 62
|
|
50175
50343
|
}
|
|
50176
50344
|
},
|
|
50177
|
-
line:
|
|
50345
|
+
line: 47
|
|
50178
50346
|
}
|
|
50179
50347
|
},
|
|
50180
50348
|
branchMap: {
|
|
50181
50349
|
"0": {
|
|
50182
50350
|
loc: {
|
|
50183
50351
|
start: {
|
|
50184
|
-
line:
|
|
50352
|
+
line: 10,
|
|
50185
50353
|
column: 47
|
|
50186
50354
|
},
|
|
50187
50355
|
end: {
|
|
50188
|
-
line:
|
|
50356
|
+
line: 10,
|
|
50189
50357
|
column: 63
|
|
50190
50358
|
}
|
|
50191
50359
|
},
|
|
50192
50360
|
type: "default-arg",
|
|
50193
50361
|
locations: [{
|
|
50194
50362
|
start: {
|
|
50195
|
-
line:
|
|
50363
|
+
line: 10,
|
|
50196
50364
|
column: 61
|
|
50197
50365
|
},
|
|
50198
50366
|
end: {
|
|
50199
|
-
line:
|
|
50367
|
+
line: 10,
|
|
50200
50368
|
column: 63
|
|
50201
50369
|
}
|
|
50202
50370
|
}],
|
|
50203
|
-
line:
|
|
50371
|
+
line: 10
|
|
50204
50372
|
},
|
|
50205
50373
|
"1": {
|
|
50206
50374
|
loc: {
|
|
50207
50375
|
start: {
|
|
50208
|
-
line:
|
|
50376
|
+
line: 18,
|
|
50209
50377
|
column: 9
|
|
50210
50378
|
},
|
|
50211
50379
|
end: {
|
|
50212
|
-
line:
|
|
50380
|
+
line: 22,
|
|
50213
50381
|
column: 9
|
|
50214
50382
|
}
|
|
50215
50383
|
},
|
|
50216
50384
|
type: "binary-expr",
|
|
50217
50385
|
locations: [{
|
|
50218
50386
|
start: {
|
|
50219
|
-
line:
|
|
50387
|
+
line: 18,
|
|
50220
50388
|
column: 9
|
|
50221
50389
|
},
|
|
50222
50390
|
end: {
|
|
50223
|
-
line:
|
|
50391
|
+
line: 18,
|
|
50224
50392
|
column: 14
|
|
50225
50393
|
}
|
|
50226
50394
|
}, {
|
|
50227
50395
|
start: {
|
|
50228
|
-
line:
|
|
50396
|
+
line: 19,
|
|
50229
50397
|
column: 10
|
|
50230
50398
|
},
|
|
50231
50399
|
end: {
|
|
50232
|
-
line:
|
|
50400
|
+
line: 21,
|
|
50233
50401
|
column: 18
|
|
50234
50402
|
}
|
|
50235
50403
|
}],
|
|
50236
|
-
line:
|
|
50404
|
+
line: 18
|
|
50237
50405
|
},
|
|
50238
50406
|
"2": {
|
|
50239
50407
|
loc: {
|
|
50240
50408
|
start: {
|
|
50241
|
-
line:
|
|
50409
|
+
line: 26,
|
|
50242
50410
|
column: 14
|
|
50243
50411
|
},
|
|
50244
50412
|
end: {
|
|
50245
|
-
line:
|
|
50413
|
+
line: 26,
|
|
50246
50414
|
column: 28
|
|
50247
50415
|
}
|
|
50248
50416
|
},
|
|
50249
50417
|
type: "binary-expr",
|
|
50250
50418
|
locations: [{
|
|
50251
50419
|
start: {
|
|
50252
|
-
line:
|
|
50420
|
+
line: 26,
|
|
50253
50421
|
column: 14
|
|
50254
50422
|
},
|
|
50255
50423
|
end: {
|
|
50256
|
-
line:
|
|
50424
|
+
line: 26,
|
|
50257
50425
|
column: 18
|
|
50258
50426
|
}
|
|
50259
50427
|
}, {
|
|
50260
50428
|
start: {
|
|
50261
|
-
line:
|
|
50429
|
+
line: 26,
|
|
50262
50430
|
column: 22
|
|
50263
50431
|
},
|
|
50264
50432
|
end: {
|
|
50265
|
-
line:
|
|
50433
|
+
line: 26,
|
|
50266
50434
|
column: 28
|
|
50267
50435
|
}
|
|
50268
50436
|
}],
|
|
50269
|
-
line:
|
|
50437
|
+
line: 26
|
|
50270
50438
|
},
|
|
50271
50439
|
"3": {
|
|
50272
50440
|
loc: {
|
|
50273
50441
|
start: {
|
|
50274
|
-
line:
|
|
50442
|
+
line: 35,
|
|
50275
50443
|
column: 19
|
|
50276
50444
|
},
|
|
50277
50445
|
end: {
|
|
50278
|
-
line:
|
|
50446
|
+
line: 35,
|
|
50279
50447
|
column: 49
|
|
50280
50448
|
}
|
|
50281
50449
|
},
|
|
50282
50450
|
type: "cond-expr",
|
|
50283
50451
|
locations: [{
|
|
50284
50452
|
start: {
|
|
50285
|
-
line:
|
|
50453
|
+
line: 35,
|
|
50286
50454
|
column: 34
|
|
50287
50455
|
},
|
|
50288
50456
|
end: {
|
|
50289
|
-
line:
|
|
50457
|
+
line: 35,
|
|
50290
50458
|
column: 44
|
|
50291
50459
|
}
|
|
50292
50460
|
}, {
|
|
50293
50461
|
start: {
|
|
50294
|
-
line:
|
|
50462
|
+
line: 35,
|
|
50295
50463
|
column: 47
|
|
50296
50464
|
},
|
|
50297
50465
|
end: {
|
|
50298
|
-
line:
|
|
50466
|
+
line: 35,
|
|
50299
50467
|
column: 49
|
|
50300
50468
|
}
|
|
50301
50469
|
}],
|
|
50302
|
-
line:
|
|
50470
|
+
line: 35
|
|
50303
50471
|
}
|
|
50304
50472
|
},
|
|
50305
50473
|
s: {
|
|
@@ -50308,13 +50476,16 @@ function cov_169joloac6() {
|
|
|
50308
50476
|
"2": 0,
|
|
50309
50477
|
"3": 0,
|
|
50310
50478
|
"4": 0,
|
|
50311
|
-
"5": 0
|
|
50479
|
+
"5": 0,
|
|
50480
|
+
"6": 0,
|
|
50481
|
+
"7": 0
|
|
50312
50482
|
},
|
|
50313
50483
|
f: {
|
|
50314
50484
|
"0": 0,
|
|
50315
50485
|
"1": 0,
|
|
50316
50486
|
"2": 0,
|
|
50317
|
-
"3": 0
|
|
50487
|
+
"3": 0,
|
|
50488
|
+
"4": 0
|
|
50318
50489
|
},
|
|
50319
50490
|
b: {
|
|
50320
50491
|
"0": [0],
|
|
@@ -50323,7 +50494,7 @@ function cov_169joloac6() {
|
|
|
50323
50494
|
"3": [0, 0]
|
|
50324
50495
|
},
|
|
50325
50496
|
_coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
|
|
50326
|
-
hash: "
|
|
50497
|
+
hash: "606c74303adb3d540387836761d6cccb9f3cc43f"
|
|
50327
50498
|
};
|
|
50328
50499
|
var coverage = global[gcv] || (global[gcv] = {});
|
|
50329
50500
|
if (!coverage[path] || coverage[path].hash !== hash) {
|
|
@@ -50353,7 +50524,8 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
50353
50524
|
isRequired = _ref2.isRequired,
|
|
50354
50525
|
nodeId = _ref2.nodeId,
|
|
50355
50526
|
placeholder = _ref2.placeholder;
|
|
50356
|
-
cov_169joloac6().s[2]
|
|
50527
|
+
var debouncedPlaceholder = (cov_169joloac6().s[2]++, reactUtils.useDebounce(placeholder, 300));
|
|
50528
|
+
cov_169joloac6().s[3]++;
|
|
50357
50529
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
50358
50530
|
className: "neeto-form-engine-input__wrapper"
|
|
50359
50531
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -50361,33 +50533,40 @@ var RichTextEditor = function RichTextEditor(_ref) {
|
|
|
50361
50533
|
}, (cov_169joloac6().b[1][0]++, label) && (cov_169joloac6().b[1][1]++, /*#__PURE__*/React__default["default"].createElement("label", {
|
|
50362
50534
|
className: "neeto-form-engine-label"
|
|
50363
50535
|
}, getLabel$1(label, isRequired)))), /*#__PURE__*/React__default["default"].createElement(formik.FastField, {
|
|
50536
|
+
debouncedPlaceholder: debouncedPlaceholder,
|
|
50364
50537
|
name: (cov_169joloac6().b[2][0]++, name) || (cov_169joloac6().b[2][1]++, nodeId),
|
|
50365
50538
|
validate: validateFieldValue({
|
|
50366
50539
|
kind: kind,
|
|
50367
50540
|
label: label,
|
|
50368
50541
|
isRequired: isRequired
|
|
50369
|
-
})
|
|
50542
|
+
}),
|
|
50543
|
+
shouldUpdate: function shouldUpdate(nextProps, prevProps) {
|
|
50544
|
+
cov_169joloac6().f[1]++;
|
|
50545
|
+
cov_169joloac6().s[4]++;
|
|
50546
|
+
return nextProps.debouncedPlaceholder !== prevProps.debouncedPlaceholder;
|
|
50547
|
+
}
|
|
50370
50548
|
}, function (_ref3) {
|
|
50371
50549
|
var field = _ref3.field,
|
|
50372
50550
|
form = _ref3.form,
|
|
50373
50551
|
meta = _ref3.meta;
|
|
50374
|
-
cov_169joloac6().f[
|
|
50375
|
-
cov_169joloac6().s[
|
|
50552
|
+
cov_169joloac6().f[2]++;
|
|
50553
|
+
cov_169joloac6().s[5]++;
|
|
50376
50554
|
return /*#__PURE__*/React__default["default"].createElement(neetoEditor.Editor, _extends$8({
|
|
50377
50555
|
className: "neeto-form-engine-rich-text-input",
|
|
50378
50556
|
error: meta.touched ? (cov_169joloac6().b[3][0]++, meta.error) : (cov_169joloac6().b[3][1]++, ""),
|
|
50379
50557
|
initialValue: field.value,
|
|
50380
|
-
|
|
50558
|
+
key: debouncedPlaceholder,
|
|
50559
|
+
placeholder: debouncedPlaceholder,
|
|
50381
50560
|
ref: editorRef,
|
|
50382
50561
|
addons: ["attachments", "block-quote", "code-block", "image-upload"],
|
|
50383
50562
|
onBlur: function onBlur() {
|
|
50384
|
-
cov_169joloac6().f[
|
|
50385
|
-
cov_169joloac6().s[
|
|
50563
|
+
cov_169joloac6().f[3]++;
|
|
50564
|
+
cov_169joloac6().s[6]++;
|
|
50386
50565
|
return form.setFieldTouched(name, true);
|
|
50387
50566
|
},
|
|
50388
50567
|
onChange: function onChange(value) {
|
|
50389
|
-
cov_169joloac6().f[
|
|
50390
|
-
cov_169joloac6().s[
|
|
50568
|
+
cov_169joloac6().f[4]++;
|
|
50569
|
+
cov_169joloac6().s[7]++;
|
|
50391
50570
|
return form.setFieldValue(name, value);
|
|
50392
50571
|
}
|
|
50393
50572
|
}, editorProps));
|
|
@@ -55395,7 +55574,7 @@ var ExternalForm = function ExternalForm(_ref) {
|
|
|
55395
55574
|
questions: []
|
|
55396
55575
|
}) : _ref16$data,
|
|
55397
55576
|
isLoading = _ref16.isLoading;
|
|
55398
|
-
var keyPressRef = (cov_2jkcclu7mz().s[68]++, reactUtils.useHotKeys("command+enter", (cov_2jkcclu7mz().b[27][0]++, (_formikInnerRef$curre = formikInnerRef.current) === null || _formikInnerRef$curre === void 0 ? void 0 : _formikInnerRef$curre.handleSubmit) || (cov_2jkcclu7mz().b[27][1]++,
|
|
55577
|
+
var keyPressRef = (cov_2jkcclu7mz().s[68]++, reactUtils.useHotKeys("command+enter", (cov_2jkcclu7mz().b[27][0]++, (_formikInnerRef$curre = formikInnerRef.current) === null || _formikInnerRef$curre === void 0 ? void 0 : _formikInnerRef$curre.handleSubmit) || (cov_2jkcclu7mz().b[27][1]++, noop$4), {
|
|
55399
55578
|
mode: "scoped"
|
|
55400
55579
|
}));
|
|
55401
55580
|
cov_2jkcclu7mz().s[69]++;
|
|
@@ -55505,7 +55684,7 @@ var ExternalForm = function ExternalForm(_ref) {
|
|
|
55505
55684
|
label: "Cancel"
|
|
55506
55685
|
}, cancelButtonProps)))))), (cov_2jkcclu7mz().b[44][0]++, !customSubmitHandler) && (cov_2jkcclu7mz().b[44][1]++, /*#__PURE__*/React__default["default"].createElement(Callout, {
|
|
55507
55686
|
callout: {
|
|
55508
|
-
isVisible:
|
|
55687
|
+
isVisible: isPresent(error),
|
|
55509
55688
|
title: t("neetoForm.callouts.submitError"),
|
|
55510
55689
|
message: error
|
|
55511
55690
|
},
|