@bigbinary/neeto-form-frontend 4.4.21 → 4.4.23
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/.ready +1 -1
- package/dist/BuildForm.js +1 -1
- package/dist/ExternalForm.js +2 -2
- package/dist/UrlBuilder.js +32 -9
- package/dist/UrlBuilder.js.map +1 -1
- package/dist/cjs/BuildForm.js +1 -1
- package/dist/cjs/ExternalForm.js +2 -2
- package/dist/cjs/UrlBuilder.js +31 -8
- package/dist/cjs/UrlBuilder.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{utils-M4RFi_Dg.js → utils-C2wi7ZvB.js} +11 -3
- package/dist/utils-C2wi7ZvB.js.map +1 -0
- package/dist/{utils-DDqyUd-y.js → utils-C3txY6sk.js} +12 -4
- package/dist/utils-C3txY6sk.js.map +1 -0
- package/dist/{yup-C_bfpTXI.js → yup-BRXHsDoc.js} +2 -2
- package/dist/yup-BRXHsDoc.js.map +1 -0
- package/dist/{yup-HtJir_DP.js → yup-DIWktb9n.js} +3 -3
- package/dist/yup-DIWktb9n.js.map +1 -0
- package/package.json +23 -23
- package/dist/utils-DDqyUd-y.js.map +0 -1
- package/dist/utils-M4RFi_Dg.js.map +0 -1
- package/dist/yup-C_bfpTXI.js.map +0 -1
- package/dist/yup-HtJir_DP.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState, useImperativeHandle, memo, Fragment as Fragment$1 } from 'react';
|
|
2
2
|
import { useFormikContext, useField, Field as Field$1, FastField } from 'formik';
|
|
3
|
-
import { isPresent,
|
|
3
|
+
import { isPresent, findBy, isNotEmpty, filterBy, findById, isNotPresent, hyphenate, noop, toLabelAndValue, getRandomInt, randomPick, slugify, notEqualsDeep } from '@bigbinary/neeto-cist';
|
|
4
4
|
import { i as isFunction, b as isEmptyValues, f as fieldWithFallback } from './index-DhtQJpD_.js';
|
|
5
5
|
import { dayjs, getFromLocalStorage, setToLocalStorage, removeFromLocalStorage, withEventTargetValue, buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
6
6
|
import { parsePhoneNumber } from 'libphonenumber-js';
|
|
@@ -20,7 +20,7 @@ import { isEditorEmpty } from '@bigbinary/neeto-editor/utils';
|
|
|
20
20
|
import { validation, PhoneNumberInput } from '@bigbinary/neeto-molecules/PhoneNumber';
|
|
21
21
|
import i18next from 'i18next';
|
|
22
22
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
23
|
-
import {
|
|
23
|
+
import { Q as QUESTION_KIND, A as ADDRESS_FIELD_TYPES, S as SPOT_QUESTION_DEFAULT_VALUE, P as PARENTHESES_REGEX, R as RATING_VALUES, E as EMAIL_REGEX, c as SCHEMA_LESS_QUESTION_KINDS, d as SIX_DIGIT_NUMBER_REGEX, e as ADDRESS_FIELD_WIDTHS, f as LABEL_FIELDS, g as generateArray, D as DEFAULT_CHOICE_QUESTION_ATTRIBUTES, h as RADIO_DESELECT_KEYS, i as RATING_OPTIONS, I as ICONS_MAP } from './yup-DIWktb9n.js';
|
|
24
24
|
import _toArray from '@babel/runtime/helpers/toArray';
|
|
25
25
|
import * as yup from 'yup';
|
|
26
26
|
import classnames from 'classnames';
|
|
@@ -508,7 +508,15 @@ var generateInitValues = function generateInitValues(_ref9) {
|
|
|
508
508
|
{
|
|
509
509
|
var _valuesMap$id$value7, _valuesMap10;
|
|
510
510
|
initValues[id] = (_valuesMap$id$value7 = (_valuesMap10 = valuesMap) === null || _valuesMap10 === void 0 || (_valuesMap10 = _valuesMap10[id]) === null || _valuesMap10 === void 0 ? void 0 : _valuesMap10.value) !== null && _valuesMap$id$value7 !== void 0 ? _valuesMap$id$value7 : fields.reduce(function (values, field) {
|
|
511
|
-
|
|
511
|
+
var value = resolveQueryParamValue(fieldCodes["".concat(fieldCode, ".").concat(field.label)]);
|
|
512
|
+
if (field.fieldType === ADDRESS_FIELD_TYPES.SELECT) {
|
|
513
|
+
var _field$properties;
|
|
514
|
+
values[field.id] = findBy({
|
|
515
|
+
label: value
|
|
516
|
+
}, (_field$properties = field.properties) === null || _field$properties === void 0 ? void 0 : _field$properties.options) ? value : "";
|
|
517
|
+
} else {
|
|
518
|
+
values[field.id] = value || "";
|
|
519
|
+
}
|
|
512
520
|
return values;
|
|
513
521
|
}, {});
|
|
514
522
|
return;
|
|
@@ -2728,4 +2736,4 @@ var getVisibleOptions = function getVisibleOptions(options) {
|
|
|
2728
2736
|
};
|
|
2729
2737
|
|
|
2730
2738
|
export { FormikWrap as F, generateInitValues as a, buildAutoCompleteAttribute as b, clientI18nInstance as c, getWithExpiry as d, clearEmailVerificationDetails as e, generateFormResponse as f, getFieldComponent as g, clearLocalStorageValues as h, mergeRefs as m, renderButtonsInOrder as r };
|
|
2731
|
-
//# sourceMappingURL=utils-
|
|
2739
|
+
//# sourceMappingURL=utils-C3txY6sk.js.map
|