@bigbinary/neeto-form-frontend 4.4.28 → 4.4.29
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/ExternalForm.js +5 -3
- package/dist/ExternalForm.js.map +1 -1
- package/dist/UrlBuilder.js +1 -1
- package/dist/cjs/ExternalForm.js +5 -3
- package/dist/cjs/ExternalForm.js.map +1 -1
- package/dist/cjs/UrlBuilder.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{utils-BznuQ58u.js → utils-DDBCeNw7.js} +11 -7
- package/dist/cjs/utils-DDBCeNw7.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{utils-CamvCi6R.js → utils-G-wqcNVe.js} +11 -7
- package/dist/utils-G-wqcNVe.js.map +1 -0
- package/package.json +1 -1
- package/types.d.ts +1 -0
- package/dist/cjs/utils-BznuQ58u.js.map +0 -1
- package/dist/utils-CamvCi6R.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -93,7 +93,7 @@ import '@bigbinary/neeto-icons/Warning';
|
|
|
93
93
|
import '@bigbinary/neeto-molecules/PageLoader';
|
|
94
94
|
import '@bigbinary/neetoui/Callout';
|
|
95
95
|
import '@bigbinary/neeto-icons/Check';
|
|
96
|
-
import './utils-
|
|
96
|
+
import './utils-G-wqcNVe.js';
|
|
97
97
|
import 'libphonenumber-js';
|
|
98
98
|
import '@bigbinary/neeto-editor/EditorContent';
|
|
99
99
|
import '@bigbinary/neetoui/MultiEmailInput';
|
|
@@ -266,9 +266,13 @@ var getMultipleOptionsFromURL = function getMultipleOptionsFromURL(_ref2) {
|
|
|
266
266
|
var optionsAttributes = _ref2.optionsAttributes,
|
|
267
267
|
fieldCodes = _ref2.fieldCodes,
|
|
268
268
|
fieldCode = _ref2.fieldCode;
|
|
269
|
-
var
|
|
270
|
-
if (!
|
|
271
|
-
|
|
269
|
+
var rawValue = fieldCodes[fieldCode];
|
|
270
|
+
if (!rawValue) return new Array(optionsAttributes.length).fill(false);
|
|
271
|
+
|
|
272
|
+
// Multi-select values arrive either as a comma-separated string (URL params)
|
|
273
|
+
// or as an array (prefill-token JSON payload); support both. Coerce scalars
|
|
274
|
+
// to string so a numeric token value doesn't blow up on `.split`.
|
|
275
|
+
var allOptions = (Array.isArray(rawValue) ? rawValue : String(rawValue).split(",")).map(trim);
|
|
272
276
|
return optionsAttributes.map(function (option) {
|
|
273
277
|
return allOptions.includes(option.label);
|
|
274
278
|
});
|
|
@@ -285,9 +289,9 @@ var getStarRatingOrOpinionScaleFromUrl = function getStarRatingOrOpinionScaleFro
|
|
|
285
289
|
var getAdditionalGuestsFromUrl = function getAdditionalGuestsFromUrl(_ref4) {
|
|
286
290
|
var fieldCodes = _ref4.fieldCodes,
|
|
287
291
|
fieldCode = _ref4.fieldCode;
|
|
288
|
-
var
|
|
289
|
-
|
|
290
|
-
|
|
292
|
+
var rawValue = fieldCodes[fieldCode];
|
|
293
|
+
if (!rawValue) return [];
|
|
294
|
+
var allEmails = Array.isArray(rawValue) ? rawValue : String(rawValue).split(",");
|
|
291
295
|
return allEmails.map(function (email) {
|
|
292
296
|
return {
|
|
293
297
|
label: email.trim(),
|
|
@@ -2738,4 +2742,4 @@ var getVisibleOptions = function getVisibleOptions(options) {
|
|
|
2738
2742
|
};
|
|
2739
2743
|
|
|
2740
2744
|
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 };
|
|
2741
|
-
//# sourceMappingURL=utils-
|
|
2745
|
+
//# sourceMappingURL=utils-G-wqcNVe.js.map
|