@bigbinary/neeto-form-frontend 4.4.63 → 4.4.65
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/cjs/v2/ExternalForm.js +1 -1
- package/dist/cjs/v2/UrlBuilder.js +1 -1
- package/dist/cjs/v2/index.js +1 -1
- package/dist/cjs/v2/{utils-DikYb6uE.js → utils-GA0zyhob.js} +41 -28
- package/dist/cjs/v2/utils-GA0zyhob.js.map +1 -0
- package/dist/v2/ExternalForm.js +1 -1
- package/dist/v2/UrlBuilder.js +1 -1
- package/dist/v2/index.js +1 -1
- package/dist/v2/main.css +1 -1
- package/dist/v2/main.css.map +1 -1
- package/dist/v2/{utils-B0TUyMcM.js → utils-BB9FJ3WI.js} +42 -29
- package/dist/v2/utils-BB9FJ3WI.js.map +1 -0
- package/package.json +9 -9
- package/dist/cjs/v2/utils-DikYb6uE.js.map +0 -1
- package/dist/v2/utils-B0TUyMcM.js.map +0 -1
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-10-
|
|
1
|
+
Built at 2026-10-20T11:03:05.559Z
|
|
@@ -20,7 +20,7 @@ var reactI18next = require('react-i18next');
|
|
|
20
20
|
var useFormApi = require('./useFormApi-BpB-Kqbw.js');
|
|
21
21
|
var index$1 = require('./index-NFq_E15P.js');
|
|
22
22
|
var jsxRuntime = require('react/jsx-runtime');
|
|
23
|
-
var utils = require('./utils-
|
|
23
|
+
var utils = require('./utils-GA0zyhob.js');
|
|
24
24
|
var yup = require('./yup-D2FUYjqU.js');
|
|
25
25
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
26
26
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/v2/react-utils');
|
|
@@ -12,7 +12,7 @@ var PageLoader = require('@bigbinary/neeto-molecules/v2/PageLoader');
|
|
|
12
12
|
var ramda = require('ramda');
|
|
13
13
|
var reactI18next = require('react-i18next');
|
|
14
14
|
var useFormApi = require('./useFormApi-BpB-Kqbw.js');
|
|
15
|
-
var utils = require('./utils-
|
|
15
|
+
var utils = require('./utils-GA0zyhob.js');
|
|
16
16
|
var libphonenumberJs = require('libphonenumber-js');
|
|
17
17
|
var yup = require('./yup-D2FUYjqU.js');
|
|
18
18
|
var jsxRuntime = require('react/jsx-runtime');
|
package/dist/cjs/v2/index.js
CHANGED
|
@@ -52,7 +52,7 @@ require('@babel/runtime/regenerator');
|
|
|
52
52
|
require('@bigbinary/neeto-molecules/v2/HelpPopover');
|
|
53
53
|
require('@bigbinary/neeto-hotkeys');
|
|
54
54
|
require('@bigbinary/neeto-molecules/v2/PageLoader');
|
|
55
|
-
require('./utils-
|
|
55
|
+
require('./utils-GA0zyhob.js');
|
|
56
56
|
require('libphonenumber-js');
|
|
57
57
|
require('@bigbinary/neeto-editor-frontend/v2/EditorContent');
|
|
58
58
|
require('@bigbinary/neeto-molecules/v2/PhoneNumber');
|
|
@@ -2203,7 +2203,15 @@ var Choices = function Choices(_ref) {
|
|
|
2203
2203
|
handleChoiceValueChange("");
|
|
2204
2204
|
};
|
|
2205
2205
|
var handleChoiceCardClick = function handleChoiceCardClick(event, option, index, isChecked) {
|
|
2206
|
-
|
|
2206
|
+
// Radix re-dispatches an untrusted, bubbling click from its hidden input
|
|
2207
|
+
// whenever a radio/checkbox's checked state changes. Treating that as a
|
|
2208
|
+
// card click toggles the value again, which fires another one — an
|
|
2209
|
+
// infinite update loop. Only react to real user clicks.
|
|
2210
|
+
if (!event.nativeEvent.isTrusted) return;
|
|
2211
|
+
|
|
2212
|
+
// atoms RadioGroup.Item has no `field` wrapper (Checkbox does), so match
|
|
2213
|
+
// the radio button and its label explicitly.
|
|
2214
|
+
var clickedOutsideControl = !event.target.closest("[data-slot='field'], [role='radio'], label");
|
|
2207
2215
|
if (!disabled && clickedOutsideControl) {
|
|
2208
2216
|
if (isCheckBox) {
|
|
2209
2217
|
onChange({
|
|
@@ -2288,11 +2296,6 @@ var Choices = function Choices(_ref) {
|
|
|
2288
2296
|
id: option.id,
|
|
2289
2297
|
label: option.label,
|
|
2290
2298
|
value: option.id,
|
|
2291
|
-
labelProps: {
|
|
2292
|
-
className: classnames({
|
|
2293
|
-
"cursor-not-allowed": disabled
|
|
2294
|
-
})
|
|
2295
|
-
},
|
|
2296
2299
|
onKeyDown: function onKeyDown(event) {
|
|
2297
2300
|
return handleChoiceKeyDown(event, option.id);
|
|
2298
2301
|
}
|
|
@@ -2418,6 +2421,7 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
|
|
|
2418
2421
|
nodeId = question.nodeId,
|
|
2419
2422
|
isReadOnly = question.isReadOnly;
|
|
2420
2423
|
var label = yup.fieldWithFallback(question, "label");
|
|
2424
|
+
var inputId = React.useId();
|
|
2421
2425
|
var _useField = formik.useField({
|
|
2422
2426
|
name: name || nodeId,
|
|
2423
2427
|
validate: validateFieldValue({
|
|
@@ -2434,27 +2438,36 @@ var PhoneNumberField = function PhoneNumberField(_ref) {
|
|
|
2434
2438
|
_useField2$2 = _useField2[2],
|
|
2435
2439
|
setValue = _useField2$2.setValue,
|
|
2436
2440
|
setTouched = _useField2$2.setTouched;
|
|
2437
|
-
return /*#__PURE__*/jsxRuntime.
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2441
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2442
|
+
className: "flex w-full flex-col gap-2",
|
|
2443
|
+
children: [label && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
|
|
2444
|
+
className: "neeto-form-engine-label",
|
|
2445
|
+
"data-testid": "".concat(neetoCist.hyphenate(label), "-input-label"),
|
|
2446
|
+
htmlFor: inputId,
|
|
2447
|
+
required: isRequired,
|
|
2448
|
+
children: label
|
|
2449
|
+
}), /*#__PURE__*/jsxRuntime.jsx(PhoneNumber.PhoneNumberInput, {
|
|
2450
|
+
autoComplete: autoComplete,
|
|
2451
|
+
size: size,
|
|
2452
|
+
value: value,
|
|
2453
|
+
className: "neeto-form-engine-input__wrapper items-stretch",
|
|
2454
|
+
disabled: isReadOnly,
|
|
2455
|
+
error: touched ? error : "",
|
|
2456
|
+
id: inputId,
|
|
2457
|
+
initialCountryCode: (_getPhoneData = getPhoneData(value)) === null || _getPhoneData === void 0 ? void 0 : _getPhoneData.country,
|
|
2458
|
+
placeholder: yup.fieldWithFallback(question, "placeholder"),
|
|
2459
|
+
required: isRequired,
|
|
2460
|
+
selectProps: {
|
|
2461
|
+
isDisabled: isReadOnly,
|
|
2462
|
+
menuPlacement: isLastFewElements ? "top" : "auto",
|
|
2463
|
+
menuPortalTarget: document.body,
|
|
2464
|
+
menuPosition: "fixed"
|
|
2465
|
+
},
|
|
2466
|
+
onBlur: function onBlur() {
|
|
2467
|
+
return setTouched(true);
|
|
2468
|
+
},
|
|
2469
|
+
onChange: setValue
|
|
2470
|
+
})]
|
|
2458
2471
|
});
|
|
2459
2472
|
};
|
|
2460
2473
|
|
|
@@ -3007,4 +3020,4 @@ exports.getFieldComponent = getFieldComponent;
|
|
|
3007
3020
|
exports.getWithExpiry = getWithExpiry;
|
|
3008
3021
|
exports.mergeRefs = mergeRefs;
|
|
3009
3022
|
exports.renderButtonsInOrder = renderButtonsInOrder;
|
|
3010
|
-
//# sourceMappingURL=utils-
|
|
3023
|
+
//# sourceMappingURL=utils-GA0zyhob.js.map
|