@wix/form-elements 1.83.0 → 1.85.0
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/component/{appointment-rac-ky2cE6hE.js → appointment-rac-CCaJ6P5r.js} +78 -78
- package/dist/component/{bookings-address-rac-Bxc6H9Pb.js → bookings-address-rac-DEt9SGPG.js} +1 -1
- package/dist/component/{bookings-email-rac-Dw1Xttdx.js → bookings-email-rac-BydOvOUZ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-dgHOrJaJ.js → bookings-first-name-rac-BoQki0Pb.js} +1 -1
- package/dist/component/{bookings-header-rac-Bl9RYGWo.js → bookings-header-rac-DK-EcXrk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BeqYpbZq.js → bookings-last-name-rac-BuGIyd43.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-C1k6o0A5.js → bookings-login-bar-rac-Cr500ehb.js} +6 -6
- package/dist/component/{bookings-phone-rac-ByhaJrwE.js → bookings-phone-rac-Bq2zdMxo.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Mw5-ZiIn.js → bookings-rich-text-rac-DRmfusX9.js} +1 -1
- package/dist/component/{checkbox-field-rac-CMEI5t4Y.js → checkbox-field-rac-b9mcZlMP.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-CP21R7_s.js → checkbox-group-field-headless-BSNhdCfs.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-DGOZjSIY.js → checkbox-group-field-rac-BObfui8r.js} +6 -6
- package/dist/component/{checkbox-group-rac-CEGtshrl.js → checkbox-group-rac-CBNMgBHU.js} +1 -1
- package/dist/component/{checkbox-rac-DCnRh1WF.js → checkbox-rac-DXh-i6Ot.js} +1 -1
- package/dist/component/{contacts-address-rac-CZb_5N5o.js → contacts-address-rac-BDQLFakc.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DZlwSyp5.js → contacts-birthdate-rac-BUMVVVfb.js} +1 -1
- package/dist/component/{contacts-company-rac-BNEF6LjB.js → contacts-company-rac-CidGcaA3.js} +1 -1
- package/dist/component/{contacts-email-rac-CAgk_zfN.js → contacts-email-rac-GePAhKDQ.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DyTVcmrX.js → contacts-first-name-rac-kw5sIBEE.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DrFcDcGr.js → contacts-last-name-rac-DzoZKs1n.js} +1 -1
- package/dist/component/{contacts-phone-rac-UAPALlFx.js → contacts-phone-rac-CxVW4Zp0.js} +1 -1
- package/dist/component/{contacts-position-rac-CJ1M4kJJ.js → contacts-position-rac-CXFxlSty.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-1cEd5s1l.js → contacts-subscribe-rac-kpRGeELB.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-CqnO__fd.js → contacts-tax-id-rac-B5qw-rtP.js} +1 -1
- package/dist/component/{date-availability-COM2EaRy.js → date-availability-BCDMem-_.js} +1 -1
- package/dist/component/{date-input-field-rac-CuuWbw42.js → date-input-field-rac-BLDZ4_Mw.js} +43 -43
- package/dist/component/{date-input-rac-DfVmj9Gc.js → date-input-rac-B1WGYKOp.js} +1 -1
- package/dist/component/{date-picker-field-rac-BFCZik9T.js → date-picker-field-rac-BNd8aZ0c.js} +20 -20
- package/dist/component/{date-picker-rac-C2vajJpb.js → date-picker-rac-ItWxSngw.js} +1 -1
- package/dist/component/date-time-input-field-rac-Ch8z0NRT.js +423 -0
- package/dist/component/{date-time-input-rac-D4FEieQz.js → date-time-input-rac-FebIovNN.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BDBBTNNo.js → dext-checkbox-group-rac-BXYHMQ3R.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DAAhNboR.js → dext-checkbox-rac-C78ScIGY.js} +1 -1
- package/dist/component/{dext-date-picker-rac-me7XbR5z.js → dext-date-picker-rac-BptT4fhe.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DLsUl2Eg.js → dext-date-time-input-rac-RWJ51IjA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C3vVIRir.js → dext-dropdown-rac-DZDOtSIG.js} +1 -1
- package/dist/component/{dext-email-rac-a8qXYTLP.js → dext-email-rac-CJceqZsw.js} +1 -1
- package/dist/component/{dext-number-input-rac-DdDnL_fX.js → dext-number-input-rac-buSXk49E.js} +1 -1
- package/dist/component/{dext-phone-rac-ByaxbHpO.js → dext-phone-rac-CeHUOWck.js} +1 -1
- package/dist/component/{dext-radio-group-rac-Bzubt7Uy.js → dext-radio-group-rac-CNyNSfeP.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BZ1EvOkG.js → dext-rating-input-rac-mmdh9tYT.js} +1 -1
- package/dist/component/{dext-tags-rac-C_R89noV.js → dext-tags-rac-CqJ4iv-V.js} +2 -2
- package/dist/component/{dext-text-area-rac-DRpYeQ-K.js → dext-text-area-rac-P1EzLNDE.js} +1 -1
- package/dist/component/{dext-text-input-rac-D_RtbQQ-.js → dext-text-input-rac-Dtz4ZLj7.js} +1 -1
- package/dist/component/{dext-url-input-rac-BSSjSbIo.js → dext-url-input-rac-DUVbW2yl.js} +1 -1
- package/dist/component/{donation-rac-De0KyyGR.js → donation-rac-Nn7z8_to.js} +43 -43
- package/dist/component/{dropdown-field-headless-DNhnTDlD.js → dropdown-field-headless-CT4uSCPR.js} +11 -11
- package/dist/component/{dropdown-field-rac-Bq_FNv9a.js → dropdown-field-rac-CUiyFJi_.js} +5 -5
- package/dist/component/{dropdown-rac-0UIyqF15.js → dropdown-rac-Bs_PVy1q.js} +1 -1
- package/dist/component/{ecom-address-rac-7IVbvs3J.js → ecom-address-rac-BTXwDlMM.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DilgIpiG.js → ecom-subscription-checkbox-rac-CGI84A37.js} +3 -3
- package/dist/component/{email-input-field-rac-CHJ6RSGy.js → email-input-field-rac-DKD7FsQX.js} +54 -54
- package/dist/component/{events-repeater-rac-v18FFLC7.js → events-repeater-rac-B7yIRlyt.js} +30 -30
- package/dist/component/{events-rsvp-rac-BpGLrxsf.js → events-rsvp-rac-C7FOuFmH.js} +3 -3
- package/dist/component/{field-error-headless-DAy-1oAQ.js → field-error-headless-BHTkMu35.js} +1 -1
- package/dist/component/{field-label-headless-BWxHmO0c.js → field-label-headless-D3DwX65k.js} +7 -7
- package/dist/component/{file-upload-rac-BfWN27JT.js → file-upload-rac-B3n_LYYK.js} +85 -85
- package/dist/component/{fixed-payment-rac-Bha61SB4.js → fixed-payment-rac-C6jsiS4-.js} +12 -12
- package/dist/component/{form-D0eeH0lX.js → form-BkmOXzqo.js} +2510 -2487
- package/dist/component/{form-element-classes-Ct1UaxuQ.js → form-element-classes-BsXkFtp2.js} +90 -57
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-uNzfDMbv.js → header-field-rac-FG9EP9--.js} +5 -5
- package/dist/component/{header-rac-B91q4fHl.js → header-rac-DZZgqFjW.js} +1 -1
- package/dist/component/{image-choice-rac-BKcnNGPp.js → image-choice-rac-CXgE6z_f.js} +42 -42
- package/dist/component/{index-BWHymomM.js → index-CSwTHDCX.js} +2 -2
- package/dist/component/{index-BvzLLTKc.js → index-DKV2sNhD.js} +4 -4
- package/dist/component/{isObjectLike-D7Mkqoju.js → isObjectLike-DYfHbEQ3.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Avd9Vlv1.js → multiline-address-field-rac-DnCOKW8F.js} +128 -128
- package/dist/component/{multiline-address-rac-BwQOoejw.js → multiline-address-rac-BZRlzLZq.js} +1 -1
- package/dist/component/{number-input-field-rac-CRqPXDl0.js → number-input-field-rac-BOJNJ50c.js} +30 -30
- package/dist/component/{number-input-rac-0Y8K4e6K.js → number-input-rac-D8ZcIPwq.js} +1 -1
- package/dist/component/{password-rac-C7F6sEB3.js → password-rac-T9PR5j2v.js} +19 -19
- package/dist/component/{payment-input-rac-CTJr4QTK.js → payment-input-rac-C9N3LZOZ.js} +17 -17
- package/dist/component/{phone-input-field-rac-jjSmYCI1.js → phone-input-field-rac-BxUiCV5Z.js} +40 -40
- package/dist/component/{phone-rac-BwSnmgYF.js → phone-rac-BjKFrr86.js} +1 -1
- package/dist/component/{product-list-rac-CTN2wvHE.js → product-list-rac-BG-VK_Hz.js} +41 -41
- package/dist/component/{quiz-radio-group-rac-CZHEDJxr.js → quiz-radio-group-rac-B1x7Yatu.js} +2 -2
- package/dist/component/{radio-button-module-classes-DCz6XS1X.js → radio-button-module-classes-BXWANbga.js} +7 -7
- package/dist/component/{radio-group-field-rac-60MF_9DO.js → radio-group-field-rac-DmEOydAr.js} +4 -4
- package/dist/component/{radio-group-rac-Dqo-Earp.js → radio-group-rac-DAcU_lkj.js} +1 -1
- package/dist/component/{rating-input-field-rac-CzWTwWT8.js → rating-input-field-rac-Cazqeqzw.js} +16 -16
- package/dist/component/{rating-input-rac-Nq4tll2Z.js → rating-input-rac-KJ8FnJTj.js} +1 -1
- package/dist/component/{rich-content-rac.module-sUUSbcSy.js → rich-content-rac.module-PZgMV2M7.js} +1 -1
- package/dist/component/{rich-text-field-rac-BvLfS4I5.js → rich-text-field-rac-DNEeY_m8.js} +3 -3
- package/dist/component/{rich-text-rac-BWkTbWk3.js → rich-text-rac-g9upYD25.js} +1 -1
- package/dist/component/{service-dropdown-rac-DZ3USe7_.js → service-dropdown-rac-CmmWetDa.js} +20 -20
- package/dist/component/{services-multi-choice-rac-D-og7fMo.js → services-multi-choice-rac-D0PJNlq2.js} +7 -7
- package/dist/component/{signature-rac-D3c4fnvN.js → signature-rac-Q4G3uEhw.js} +41 -41
- package/dist/component/submit-button-rac-DdLPGJ6v.js +141 -0
- package/dist/component/{tags-field-rac-DXmZBcpO.js → tags-field-rac-PZ8Vfmsn.js} +72 -72
- package/dist/component/{tags-rac-CoXWx42D.js → tags-rac-DLjeR5G1.js} +1 -1
- package/dist/component/{text-area-field-rac-Cy0Mr29Z.js → text-area-field-rac-BNVK0R0Z.js} +25 -25
- package/dist/component/{text-area-rac-C3Mjmgpa.js → text-area-rac-CNOLe3Vx.js} +1 -1
- package/dist/component/{text-input-field-rac-D1TB9B_M.js → text-input-field-rac-DjdW6TCf.js} +3 -3
- package/dist/component/{text-input-headless-BUa59Rgn.js → text-input-headless-DFWQwZAN.js} +10 -10
- package/dist/component/{text-input-rac-BQ3Z9ws4.js → text-input-rac-GXPtQEjT.js} +1 -1
- package/dist/component/time-input-rac-B_g-erqu.js +159 -0
- package/dist/component/{url-input-field-rac-DINXfZdf.js → url-input-field-rac-CXWYeQLf.js} +19 -19
- package/dist/component/{url-input-rac-Ch9eTIF_.js → url-input-rac-DX-vjyXj.js} +1 -1
- package/dist/component/use-element-state-class-name-lZnP6sE6.js +22 -0
- package/dist/component/{use-service-options-base-BJZhzDyO.js → use-service-options-base-BJE86Rzo.js} +5 -5
- package/dist/component/{use-text-input-class-name-8gMUWeCb.js → use-text-input-class-name-B-GYaltW.js} +5 -5
- package/dist/form.d.ts +58 -2
- package/package.json +5 -3
- package/dist/component/date-time-input-field-rac-B7ne2emo.js +0 -423
- package/dist/component/submit-button-rac-Dn_BGt1n.js +0 -116
- package/dist/component/time-input-rac-Wi0oD5YF.js +0 -155
- package/dist/component/use-element-state-class-name-j8W1zbdG.js +0 -20
|
@@ -2,20 +2,20 @@ import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
|
2
2
|
import L from "classnames";
|
|
3
3
|
import n, { useMemo as w, createContext as Ue, useContext as Se, useState as fe, useRef as B, useCallback as D, useEffect as We } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as _t } from "react-aria";
|
|
5
|
-
import {
|
|
5
|
+
import { ae as bt, c as ft, a9 as Pt, ab as yt, G as Tt, H as qt, u as Mt, z as V, F as K, at as Te, a2 as st, aj as P, ag as T, al as ae, af as Ct, Q as wt, C as ve, a0 as xt, a4 as Bt, aq as kt, ak as $t, ap as Ut, a7 as Wt, Y as Vt, a6 as Kt, am as Yt, j as Ht } from "./form-BkmOXzqo.js";
|
|
6
6
|
import { f as E, a as h } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as jt, V as Jt } from "./headless-styles-CmcyA_pi.js";
|
|
8
8
|
import { TextField as ye, Input as le, ComboBoxStateContext as It, ComboBox as De, Popover as Re, ListBox as Ae, ListBoxItem as _e, Group as Lt, Button as Nt } from "react-aria-components";
|
|
9
|
-
import { D as ie, E as ce } from "./field-error-headless-
|
|
10
|
-
import { L as de } from "./field-label-headless-
|
|
11
|
-
import { e as Gt, c as Xt, a as zt, r as
|
|
9
|
+
import { D as ie, E as ce } from "./field-error-headless-BHTkMu35.js";
|
|
10
|
+
import { L as de } from "./field-label-headless-D3DwX65k.js";
|
|
11
|
+
import { e as Gt, c as Xt, a as zt, r as gt } from "./isObjectLike-DYfHbEQ3.js";
|
|
12
12
|
import { u as Qt } from "./use-invoke-callback-UH73A_J3.js";
|
|
13
13
|
import { C as at } from "./chevron-down-icon-CcpVm6B-.js";
|
|
14
14
|
import { E as z } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { H as be } from "./custom-focus-class-_483Pkwp.js";
|
|
16
16
|
import { s as y } from "./field-rac.module-D06m9T9x.js";
|
|
17
|
-
import { y as Q,
|
|
18
|
-
import { u as Zt } from "./use-text-input-class-name-
|
|
17
|
+
import { y as Q, P as Z, x as lt, B as ge, o as ee, i as te } from "./form-element-classes-BsXkFtp2.js";
|
|
18
|
+
import { u as Zt } from "./use-text-input-class-name-B-GYaltW.js";
|
|
19
19
|
const en = (e, t, r) => {
|
|
20
20
|
var a, l, i, s;
|
|
21
21
|
const o = (a = e.steps) == null ? void 0 : a.map((d) => {
|
|
@@ -50,7 +50,7 @@ function tn(e, t, r = !1) {
|
|
|
50
50
|
const { country: o, subdivision: a, city: l, addressLine: i, streetAddress: s, addressLine2: d, postalCode: m } = e, u = {};
|
|
51
51
|
return t ? (o && (u.country = o), a && (u.subdivision = a), l && (u.city = l), i ? u.addressLine = i : s != null && s.formattedAddressLine && (u.addressLine = s == null ? void 0 : s.formattedAddressLine), d && (u.addressLine = d), m && (u.postalCode = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.streetName = s == null ? void 0 : s.name : r && (s != null && s.formattedAddressLine) && (u.streetName = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.streetNumber = s.number)) : (o && (u.country = o), a && (u.subdivision = a), l && (u.city = l), i ? u.address_line = i : s != null && s.formattedAddressLine && (u.address_line = s == null ? void 0 : s.formattedAddressLine), d && (u.address_line = d), m && (u.postal_code = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.street_name = s == null ? void 0 : s.name : r && (s != null && s.formattedAddressLine) && (u.street_name = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.street_number = s.number)), u;
|
|
52
52
|
}
|
|
53
|
-
const
|
|
53
|
+
const Ot = /* @__PURE__ */ Ue({
|
|
54
54
|
onAddressSelect: () => {
|
|
55
55
|
}
|
|
56
56
|
}), nn = ({ children: e, onAddressSelect: t, autocompleteEnabled: r }) => {
|
|
@@ -61,12 +61,12 @@ const gt = /* @__PURE__ */ Ue({
|
|
|
61
61
|
t,
|
|
62
62
|
r
|
|
63
63
|
]);
|
|
64
|
-
return /* @__PURE__ */ n.createElement(
|
|
64
|
+
return /* @__PURE__ */ n.createElement(Ot.Provider, {
|
|
65
65
|
value: o
|
|
66
66
|
}, e);
|
|
67
67
|
};
|
|
68
68
|
function Ie() {
|
|
69
|
-
return Se(
|
|
69
|
+
return Se(Ot);
|
|
70
70
|
}
|
|
71
71
|
const vt = /* @__PURE__ */ Ue(void 0), rn = ({ children: e, countryCode: t }) => {
|
|
72
72
|
const r = w(() => ({
|
|
@@ -82,7 +82,7 @@ function Le() {
|
|
|
82
82
|
const e = Se(vt);
|
|
83
83
|
return e == null ? void 0 : e.countryCode;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function qe(e) {
|
|
86
86
|
return e != null;
|
|
87
87
|
}
|
|
88
88
|
function on(e, t, r) {
|
|
@@ -96,10 +96,10 @@ function on(e, t, r) {
|
|
|
96
96
|
...o.view,
|
|
97
97
|
...l
|
|
98
98
|
},
|
|
99
|
-
...
|
|
99
|
+
...qe(a) && {
|
|
100
100
|
hidden: !a
|
|
101
101
|
},
|
|
102
|
-
...
|
|
102
|
+
...qe(i) && qe(o.validation) && {
|
|
103
103
|
validation: {
|
|
104
104
|
...o.validation,
|
|
105
105
|
required: i
|
|
@@ -177,35 +177,35 @@ const sn = (e, t) => e.map((r) => ({
|
|
|
177
177
|
apartment: V()
|
|
178
178
|
}), En = ({ id: e, target: t, fieldType: r, form: o, country: a, fieldSettings: l, validation: i, required: s }) => {
|
|
179
179
|
const [d] = fe(pn), { isExperimentEnabled: m } = bt(), u = m(ft.USE_FIELDS_V2), { getCountryAddressForm: C } = Pt(), { isMobile: I, breakpoint: b } = yt(), p = C(a), f = r === K.MULTILINE_ADDRESS || r === K.BOOKINGS_ADDRESS, N = w(() => {
|
|
180
|
-
var
|
|
181
|
-
return Tt(s, (
|
|
180
|
+
var O;
|
|
181
|
+
return Tt(s, (O = i == null ? void 0 : i.predefined) == null ? void 0 : O.multilineAddressOptions);
|
|
182
182
|
}, [
|
|
183
183
|
i,
|
|
184
184
|
s
|
|
185
|
-
]), F = w(() =>
|
|
185
|
+
]), F = w(() => qt(), []);
|
|
186
186
|
return {
|
|
187
187
|
form: w(() => {
|
|
188
|
-
var _,
|
|
188
|
+
var _, g;
|
|
189
189
|
if (!f || !p)
|
|
190
190
|
return o && {
|
|
191
191
|
...o,
|
|
192
192
|
fields: sn(o.fields, d)
|
|
193
193
|
};
|
|
194
|
-
const
|
|
194
|
+
const O = Mt({
|
|
195
195
|
useFieldsV2: u,
|
|
196
196
|
path: t,
|
|
197
197
|
parentId: e,
|
|
198
198
|
includeHiddenFields: !0,
|
|
199
199
|
isMobile: I,
|
|
200
200
|
breakpoint: b,
|
|
201
|
-
form: on(en(p, N, F), l, (
|
|
201
|
+
form: on(en(p, N, F), l, (g = (_ = i == null ? void 0 : i.predefined) == null ? void 0 : _.multilineAddressOptions) == null ? void 0 : g.fields)
|
|
202
202
|
});
|
|
203
|
-
if (!
|
|
204
|
-
return
|
|
205
|
-
const
|
|
203
|
+
if (!O.fields.some((v) => v.properties.hidden))
|
|
204
|
+
return O;
|
|
205
|
+
const q = mn(O);
|
|
206
206
|
return {
|
|
207
|
-
...
|
|
208
|
-
fields:
|
|
207
|
+
...q,
|
|
208
|
+
fields: q.fields.filter((v) => !v.properties.hidden)
|
|
209
209
|
};
|
|
210
210
|
}, [
|
|
211
211
|
p,
|
|
@@ -308,14 +308,14 @@ const Ve = ({ enabled: e }) => {
|
|
|
308
308
|
a
|
|
309
309
|
]);
|
|
310
310
|
};
|
|
311
|
-
var
|
|
311
|
+
var Me, it;
|
|
312
312
|
function yn() {
|
|
313
|
-
if (it) return
|
|
313
|
+
if (it) return Me;
|
|
314
314
|
it = 1;
|
|
315
315
|
var e = Gt(), t = function() {
|
|
316
316
|
return e.Date.now();
|
|
317
317
|
};
|
|
318
|
-
return
|
|
318
|
+
return Me = t, Me;
|
|
319
319
|
}
|
|
320
320
|
var we, ct;
|
|
321
321
|
function Cn() {
|
|
@@ -353,7 +353,7 @@ var ke, mt;
|
|
|
353
353
|
function Nn() {
|
|
354
354
|
if (mt) return ke;
|
|
355
355
|
mt = 1;
|
|
356
|
-
var e = In(), t =
|
|
356
|
+
var e = In(), t = gt(), r = Ln(), o = NaN, a = /^[-+]0x[0-9a-f]+$/i, l = /^0b[01]+$/i, i = /^0o[0-7]+$/i, s = parseInt;
|
|
357
357
|
function d(m) {
|
|
358
358
|
if (typeof m == "number")
|
|
359
359
|
return m;
|
|
@@ -372,61 +372,61 @@ function Nn() {
|
|
|
372
372
|
return ke = d, ke;
|
|
373
373
|
}
|
|
374
374
|
var $e, pt;
|
|
375
|
-
function
|
|
375
|
+
function gn() {
|
|
376
376
|
if (pt) return $e;
|
|
377
377
|
pt = 1;
|
|
378
|
-
var e =
|
|
378
|
+
var e = gt(), t = yn(), r = Nn(), o = "Expected a function", a = Math.max, l = Math.min;
|
|
379
379
|
function i(s, d, m) {
|
|
380
|
-
var u, C, I, b, p, f, N = 0, F = !1, S = !1,
|
|
380
|
+
var u, C, I, b, p, f, N = 0, F = !1, S = !1, O = !0;
|
|
381
381
|
if (typeof s != "function")
|
|
382
382
|
throw new TypeError(o);
|
|
383
|
-
d = r(d) || 0, e(m) && (F = !!m.leading, S = "maxWait" in m, I = S ? a(r(m.maxWait) || 0, d) : I,
|
|
383
|
+
d = r(d) || 0, e(m) && (F = !!m.leading, S = "maxWait" in m, I = S ? a(r(m.maxWait) || 0, d) : I, O = "trailing" in m ? !!m.trailing : O);
|
|
384
384
|
function R(A) {
|
|
385
385
|
var J = u, pe = C;
|
|
386
386
|
return u = C = void 0, N = A, b = s.apply(pe, J), b;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function q(A) {
|
|
389
389
|
return N = A, p = setTimeout(v, d), F ? R(A) : b;
|
|
390
390
|
}
|
|
391
391
|
function _(A) {
|
|
392
392
|
var J = A - f, pe = A - N, Ne = d - J;
|
|
393
393
|
return S ? l(Ne, I - pe) : Ne;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function g(A) {
|
|
396
396
|
var J = A - f, pe = A - N;
|
|
397
397
|
return f === void 0 || J >= d || J < 0 || S && pe >= I;
|
|
398
398
|
}
|
|
399
399
|
function v() {
|
|
400
400
|
var A = t();
|
|
401
|
-
if (
|
|
401
|
+
if (g(A))
|
|
402
402
|
return me(A);
|
|
403
403
|
p = setTimeout(v, _(A));
|
|
404
404
|
}
|
|
405
405
|
function me(A) {
|
|
406
|
-
return p = void 0,
|
|
406
|
+
return p = void 0, O && u ? R(A) : (u = C = void 0, b);
|
|
407
407
|
}
|
|
408
408
|
function x() {
|
|
409
409
|
p !== void 0 && clearTimeout(p), N = 0, u = f = C = p = void 0;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function M() {
|
|
412
412
|
return p === void 0 ? b : me(t());
|
|
413
413
|
}
|
|
414
414
|
function j() {
|
|
415
|
-
var A = t(), J =
|
|
415
|
+
var A = t(), J = g(A);
|
|
416
416
|
if (u = arguments, C = this, f = A, J) {
|
|
417
417
|
if (p === void 0)
|
|
418
|
-
return
|
|
418
|
+
return q(f);
|
|
419
419
|
if (S)
|
|
420
420
|
return clearTimeout(p), p = setTimeout(v, d), R(f);
|
|
421
421
|
}
|
|
422
422
|
return p === void 0 && (p = setTimeout(v, d)), b;
|
|
423
423
|
}
|
|
424
|
-
return j.cancel = x, j.flush =
|
|
424
|
+
return j.cancel = x, j.flush = M, j;
|
|
425
425
|
}
|
|
426
426
|
return $e = i, $e;
|
|
427
427
|
}
|
|
428
|
-
var
|
|
429
|
-
const vn = /* @__PURE__ */ wt(
|
|
428
|
+
var On = gn();
|
|
429
|
+
const vn = /* @__PURE__ */ wt(On), hn = (e, t, r = 200) => {
|
|
430
430
|
const o = B(e), a = D(vn((...l) => {
|
|
431
431
|
o.current(...l);
|
|
432
432
|
}, r), [
|
|
@@ -500,7 +500,7 @@ const vn = /* @__PURE__ */ wt(gn), hn = (e, t, r = 200) => {
|
|
|
500
500
|
e
|
|
501
501
|
]), null;
|
|
502
502
|
}, k = ({ children: e }) => {
|
|
503
|
-
const { id: t, value: r, onChange: o, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: C } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = C || b, f = Ee("addressLine1"), N = E(e, k.Label), F = E(e, k.Input), S = E(e, k.Options),
|
|
503
|
+
const { id: t, value: r, onChange: o, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: C } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = C || b, f = Ee("addressLine1"), N = E(e, k.Label), F = E(e, k.Input), S = E(e, k.Options), O = E(e, k.Description), R = E(e, k.Error);
|
|
504
504
|
return p ? /* @__PURE__ */ n.createElement(u, {
|
|
505
505
|
fieldId: t,
|
|
506
506
|
renderLabel: () => h(N, {
|
|
@@ -516,7 +516,7 @@ const vn = /* @__PURE__ */ wt(gn), hn = (e, t, r = 200) => {
|
|
|
516
516
|
onBlur: d,
|
|
517
517
|
onFocus: m
|
|
518
518
|
}, F, S),
|
|
519
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R,
|
|
519
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, O)
|
|
520
520
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
521
521
|
fieldId: t,
|
|
522
522
|
renderLabel: () => h(N, {
|
|
@@ -533,42 +533,42 @@ const vn = /* @__PURE__ */ wt(gn), hn = (e, t, r = 200) => {
|
|
|
533
533
|
onBlur: d,
|
|
534
534
|
onFocus: m
|
|
535
535
|
}, F),
|
|
536
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R,
|
|
536
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, O)
|
|
537
537
|
});
|
|
538
538
|
}, Sn = ({ children: e, value: t, onChange: r, disabled: o, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
539
539
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), C = Le(), I = Ve({
|
|
540
540
|
enabled: !0
|
|
541
541
|
}), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
|
|
542
542
|
atlas: I
|
|
543
|
-
}), N = w(() => b.map((
|
|
544
|
-
id:
|
|
545
|
-
label:
|
|
543
|
+
}), N = w(() => b.map((g) => ({
|
|
544
|
+
id: g.searchId || "",
|
|
545
|
+
label: g.description || ""
|
|
546
546
|
})), [
|
|
547
547
|
b
|
|
548
|
-
]), F = D((
|
|
548
|
+
]), F = D((g) => {
|
|
549
549
|
p({
|
|
550
|
-
input:
|
|
550
|
+
input: g,
|
|
551
551
|
countryCodes: C ? [
|
|
552
552
|
C
|
|
553
553
|
] : void 0
|
|
554
|
-
}), r(
|
|
554
|
+
}), r(g);
|
|
555
555
|
}, [
|
|
556
556
|
r,
|
|
557
557
|
p,
|
|
558
558
|
C
|
|
559
|
-
]), S = D(async (
|
|
560
|
-
if (!
|
|
559
|
+
]), S = D(async (g) => {
|
|
560
|
+
if (!g)
|
|
561
561
|
return;
|
|
562
562
|
f();
|
|
563
563
|
const v = await (I == null ? void 0 : I.getPlace({
|
|
564
|
-
searchId: String(
|
|
564
|
+
searchId: String(g)
|
|
565
565
|
}));
|
|
566
566
|
v && u && u(v);
|
|
567
567
|
}, [
|
|
568
568
|
u,
|
|
569
569
|
f,
|
|
570
570
|
I
|
|
571
|
-
]),
|
|
571
|
+
]), O = D(() => {
|
|
572
572
|
f(), s == null || s();
|
|
573
573
|
}, [
|
|
574
574
|
s,
|
|
@@ -577,7 +577,7 @@ const vn = /* @__PURE__ */ wt(gn), hn = (e, t, r = 200) => {
|
|
|
577
577
|
d == null || d();
|
|
578
578
|
}, [
|
|
579
579
|
d
|
|
580
|
-
]),
|
|
580
|
+
]), q = E(e, k.Input), _ = E(e, k.Options);
|
|
581
581
|
return /* @__PURE__ */ n.createElement(De, {
|
|
582
582
|
"aria-labelledby": m,
|
|
583
583
|
inputValue: t ?? "",
|
|
@@ -588,12 +588,12 @@ const vn = /* @__PURE__ */ wt(gn), hn = (e, t, r = 200) => {
|
|
|
588
588
|
isReadOnly: a,
|
|
589
589
|
isRequired: l,
|
|
590
590
|
isInvalid: i,
|
|
591
|
-
onBlur:
|
|
591
|
+
onBlur: O,
|
|
592
592
|
onFocus: R,
|
|
593
593
|
allowsCustomValue: !0,
|
|
594
594
|
menuTrigger: "input",
|
|
595
595
|
items: N
|
|
596
|
-
}, h(
|
|
596
|
+
}, h(q, {
|
|
597
597
|
onFocus: R
|
|
598
598
|
}), h(_, {
|
|
599
599
|
options: N
|
|
@@ -766,10 +766,10 @@ const Dt = ({ readOnly: e, disabled: t } = {}) => {
|
|
|
766
766
|
onInputKeyDown: C
|
|
767
767
|
};
|
|
768
768
|
}, Y = ({ children: e }) => {
|
|
769
|
-
const { id: t, value: r, onChange: o, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, options: C } = P(), { labelId: I } = T(), { t: b } = Te(), { language: p } = yt(), f = w(() => (C || []).reduce((x,
|
|
770
|
-
value:
|
|
771
|
-
label: b(`locale-dataset.countries.${ve[
|
|
772
|
-
}), x), []).sort((x,
|
|
769
|
+
const { id: t, value: r, onChange: o, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, options: C } = P(), { labelId: I } = T(), { t: b } = Te(), { language: p } = yt(), f = w(() => (C || []).reduce((x, M) => (M.value && ve.hasOwnProperty(M.value) && x.push({
|
|
770
|
+
value: M.value,
|
|
771
|
+
label: b(`locale-dataset.countries.${ve[M.value].toUpperCase()}`)
|
|
772
|
+
}), x), []).sort((x, M) => x.label.localeCompare(M.label, p)), [
|
|
773
773
|
C,
|
|
774
774
|
b,
|
|
775
775
|
p
|
|
@@ -777,21 +777,21 @@ const Dt = ({ readOnly: e, disabled: t } = {}) => {
|
|
|
777
777
|
o
|
|
778
778
|
]), F = D(() => N(""), [
|
|
779
779
|
N
|
|
780
|
-
]), { onInputKeyDown: S, ...
|
|
780
|
+
]), { onInputKeyDown: S, ...O } = Rt({
|
|
781
781
|
options: f,
|
|
782
782
|
value: r,
|
|
783
783
|
commit: N,
|
|
784
784
|
clear: F,
|
|
785
785
|
onBlur: d
|
|
786
|
-
}), R = Ee("country"),
|
|
786
|
+
}), R = Ee("country"), q = E(e, Y.Label), _ = E(e, Y.Control), g = E(e, Y.Options), v = E(e, Y.Description), me = E(e, Y.Error);
|
|
787
787
|
return /* @__PURE__ */ n.createElement(u, {
|
|
788
788
|
fieldId: t,
|
|
789
|
-
renderLabel: () => h(
|
|
789
|
+
renderLabel: () => h(q, {
|
|
790
790
|
label: R
|
|
791
791
|
}),
|
|
792
792
|
renderInput: () => /* @__PURE__ */ n.createElement(De, {
|
|
793
793
|
"aria-labelledby": I,
|
|
794
|
-
...
|
|
794
|
+
...O,
|
|
795
795
|
isDisabled: a,
|
|
796
796
|
isReadOnly: l,
|
|
797
797
|
isRequired: i,
|
|
@@ -800,7 +800,7 @@ const Dt = ({ readOnly: e, disabled: t } = {}) => {
|
|
|
800
800
|
menuTrigger: "input"
|
|
801
801
|
}, h(_, {
|
|
802
802
|
onKeyDown: S
|
|
803
|
-
}), h(
|
|
803
|
+
}), h(g, {
|
|
804
804
|
options: f
|
|
805
805
|
})),
|
|
806
806
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, me, v)
|
|
@@ -831,11 +831,11 @@ const Dt = ({ readOnly: e, disabled: t } = {}) => {
|
|
|
831
831
|
onClick: u,
|
|
832
832
|
onKeyDown: d
|
|
833
833
|
});
|
|
834
|
-
},
|
|
834
|
+
}, qn = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(Nt, {
|
|
835
835
|
className: t
|
|
836
836
|
}, e);
|
|
837
837
|
he.Input = Tn;
|
|
838
|
-
he.Trigger =
|
|
838
|
+
he.Trigger = qn;
|
|
839
839
|
const He = ({ children: e, className: t, ...r }) => {
|
|
840
840
|
const { options: o } = r, a = E(e, He.Option);
|
|
841
841
|
return /* @__PURE__ */ n.createElement(Re, {
|
|
@@ -847,7 +847,7 @@ const He = ({ children: e, className: t, ...r }) => {
|
|
|
847
847
|
value: l.value,
|
|
848
848
|
label: l.label
|
|
849
849
|
}))));
|
|
850
|
-
},
|
|
850
|
+
}, Mn = ({ className: e, ...t }) => {
|
|
851
851
|
const { value: r, label: o } = t;
|
|
852
852
|
return /* @__PURE__ */ n.createElement(_e, {
|
|
853
853
|
className: e,
|
|
@@ -855,7 +855,7 @@ const He = ({ children: e, className: t, ...r }) => {
|
|
|
855
855
|
textValue: o
|
|
856
856
|
}, o);
|
|
857
857
|
};
|
|
858
|
-
He.Option =
|
|
858
|
+
He.Option = Mn;
|
|
859
859
|
Y.Label = de;
|
|
860
860
|
Y.Control = he;
|
|
861
861
|
Y.Options = He;
|
|
@@ -899,7 +899,7 @@ function Bn({ isAutocompleteEnabled: e }) {
|
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
901
|
const $ = ({ children: e }) => {
|
|
902
|
-
const { id: t, value: r, onChange: o, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: C } = P(), { labelId: I } = T(), b = Le(), { autocompleteEnabled: p } = Ie(), f = !!(b && ve[b] === ve.JP), N = (C || p) && f, F = Ee("zipCode"), S = E(e, $.Label),
|
|
902
|
+
const { id: t, value: r, onChange: o, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: C } = P(), { labelId: I } = T(), b = Le(), { autocompleteEnabled: p } = Ie(), f = !!(b && ve[b] === ve.JP), N = (C || p) && f, F = Ee("zipCode"), S = E(e, $.Label), O = E(e, $.Control), R = E(e, $.Options), q = E(e, $.Description), _ = E(e, $.Error);
|
|
903
903
|
return N ? /* @__PURE__ */ n.createElement(u, {
|
|
904
904
|
fieldId: t,
|
|
905
905
|
renderLabel: () => h(S, {
|
|
@@ -914,8 +914,8 @@ const $ = ({ children: e }) => {
|
|
|
914
914
|
hasError: s,
|
|
915
915
|
onBlur: d,
|
|
916
916
|
onFocus: m
|
|
917
|
-
},
|
|
918
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _,
|
|
917
|
+
}, O, R),
|
|
918
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _, q)
|
|
919
919
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
920
920
|
fieldId: t,
|
|
921
921
|
renderLabel: () => h(S, {
|
|
@@ -931,8 +931,8 @@ const $ = ({ children: e }) => {
|
|
|
931
931
|
isInvalid: s,
|
|
932
932
|
onBlur: d,
|
|
933
933
|
onFocus: m
|
|
934
|
-
},
|
|
935
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _,
|
|
934
|
+
}, O),
|
|
935
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _, q)
|
|
936
936
|
});
|
|
937
937
|
}, kn = ({ children: e, value: t, onChange: r, disabled: o, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
938
938
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), [C, I] = fe(!1), { searchByPostalCode: b } = Bn({
|
|
@@ -944,19 +944,19 @@ const $ = ({ children: e }) => {
|
|
|
944
944
|
}
|
|
945
945
|
] : [], [
|
|
946
946
|
p
|
|
947
|
-
]), F = D(async (
|
|
948
|
-
r(
|
|
949
|
-
const v = await b(
|
|
947
|
+
]), F = D(async (g) => {
|
|
948
|
+
r(g);
|
|
949
|
+
const v = await b(g ?? "");
|
|
950
950
|
f(v);
|
|
951
951
|
}, [
|
|
952
952
|
r,
|
|
953
953
|
b
|
|
954
|
-
]), S = D(async (
|
|
955
|
-
|
|
954
|
+
]), S = D(async (g) => {
|
|
955
|
+
g && (f(void 0), p && u && u(p));
|
|
956
956
|
}, [
|
|
957
957
|
u,
|
|
958
958
|
p
|
|
959
|
-
]),
|
|
959
|
+
]), O = D(() => {
|
|
960
960
|
f(void 0), s == null || s();
|
|
961
961
|
}, [
|
|
962
962
|
s
|
|
@@ -964,7 +964,7 @@ const $ = ({ children: e }) => {
|
|
|
964
964
|
I(!0), d == null || d();
|
|
965
965
|
}, [
|
|
966
966
|
d
|
|
967
|
-
]),
|
|
967
|
+
]), q = E(e, $.Control), _ = E(e, $.Options);
|
|
968
968
|
return /* @__PURE__ */ n.createElement(De, {
|
|
969
969
|
"aria-labelledby": m,
|
|
970
970
|
inputValue: t ?? "",
|
|
@@ -975,12 +975,12 @@ const $ = ({ children: e }) => {
|
|
|
975
975
|
isReadOnly: a,
|
|
976
976
|
isRequired: l,
|
|
977
977
|
isInvalid: i,
|
|
978
|
-
onBlur:
|
|
978
|
+
onBlur: O,
|
|
979
979
|
onFocus: R,
|
|
980
980
|
allowsCustomValue: !0,
|
|
981
981
|
menuTrigger: "input",
|
|
982
982
|
items: N
|
|
983
|
-
}, h(
|
|
983
|
+
}, h(q, {
|
|
984
984
|
onFocus: R
|
|
985
985
|
}), h(_, {
|
|
986
986
|
options: N
|
|
@@ -1038,7 +1038,7 @@ $.Options = Je;
|
|
|
1038
1038
|
$.Description = ie;
|
|
1039
1039
|
$.Error = ce;
|
|
1040
1040
|
const U = ({ children: e }) => {
|
|
1041
|
-
const { id: t, value: r, onChange: o, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: C } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = C || b, f = Ee("streetName"), N = E(e, U.Label), F = E(e, U.Input), S = E(e, U.Options),
|
|
1041
|
+
const { id: t, value: r, onChange: o, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: C } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ie(), p = C || b, f = Ee("streetName"), N = E(e, U.Label), F = E(e, U.Input), S = E(e, U.Options), O = E(e, U.Description), R = E(e, U.Error);
|
|
1042
1042
|
return p ? /* @__PURE__ */ n.createElement(u, {
|
|
1043
1043
|
fieldId: t,
|
|
1044
1044
|
renderLabel: () => h(N, {
|
|
@@ -1054,7 +1054,7 @@ const U = ({ children: e }) => {
|
|
|
1054
1054
|
onBlur: d,
|
|
1055
1055
|
onFocus: m
|
|
1056
1056
|
}, F, S),
|
|
1057
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R,
|
|
1057
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, O)
|
|
1058
1058
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
1059
1059
|
fieldId: t,
|
|
1060
1060
|
renderLabel: () => h(N, {
|
|
@@ -1071,41 +1071,41 @@ const U = ({ children: e }) => {
|
|
|
1071
1071
|
onBlur: d,
|
|
1072
1072
|
onFocus: m
|
|
1073
1073
|
}, F),
|
|
1074
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R,
|
|
1074
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, O)
|
|
1075
1075
|
});
|
|
1076
1076
|
}, Wn = ({ children: e, value: t, onChange: r, disabled: o, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
1077
1077
|
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), C = Le(), I = Ve({
|
|
1078
1078
|
enabled: !0
|
|
1079
1079
|
}), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
|
|
1080
1080
|
atlas: I
|
|
1081
|
-
}), N = E(e, U.Input), F = E(e, U.Options), S = w(() => b.reduce((
|
|
1081
|
+
}), N = E(e, U.Input), F = E(e, U.Options), S = w(() => b.reduce((g, v) => (v.searchId && v.description && g.push({
|
|
1082
1082
|
id: v.searchId,
|
|
1083
1083
|
label: v.description
|
|
1084
|
-
}),
|
|
1084
|
+
}), g), []), [
|
|
1085
1085
|
b
|
|
1086
|
-
]),
|
|
1086
|
+
]), O = D((g) => {
|
|
1087
1087
|
p({
|
|
1088
|
-
input:
|
|
1088
|
+
input: g,
|
|
1089
1089
|
countryCodes: C ? [
|
|
1090
1090
|
C
|
|
1091
1091
|
] : void 0
|
|
1092
|
-
}), r(
|
|
1092
|
+
}), r(g);
|
|
1093
1093
|
}, [
|
|
1094
1094
|
r,
|
|
1095
1095
|
p,
|
|
1096
1096
|
C
|
|
1097
|
-
]), R = D(async (
|
|
1098
|
-
if (f(), !
|
|
1097
|
+
]), R = D(async (g) => {
|
|
1098
|
+
if (f(), !g)
|
|
1099
1099
|
return;
|
|
1100
1100
|
const v = await (I == null ? void 0 : I.getPlace({
|
|
1101
|
-
searchId: String(
|
|
1101
|
+
searchId: String(g)
|
|
1102
1102
|
}));
|
|
1103
1103
|
v && u && u(v);
|
|
1104
1104
|
}, [
|
|
1105
1105
|
u,
|
|
1106
1106
|
f,
|
|
1107
1107
|
I
|
|
1108
|
-
]),
|
|
1108
|
+
]), q = D(() => {
|
|
1109
1109
|
f(), s == null || s();
|
|
1110
1110
|
}, [
|
|
1111
1111
|
s,
|
|
@@ -1118,14 +1118,14 @@ const U = ({ children: e }) => {
|
|
|
1118
1118
|
return /* @__PURE__ */ n.createElement(De, {
|
|
1119
1119
|
"aria-labelledby": m,
|
|
1120
1120
|
inputValue: t ?? "",
|
|
1121
|
-
onInputChange:
|
|
1121
|
+
onInputChange: O,
|
|
1122
1122
|
value: null,
|
|
1123
1123
|
onChange: R,
|
|
1124
1124
|
isDisabled: o,
|
|
1125
1125
|
isReadOnly: a,
|
|
1126
1126
|
isRequired: l,
|
|
1127
1127
|
isInvalid: i,
|
|
1128
|
-
onBlur:
|
|
1128
|
+
onBlur: q,
|
|
1129
1129
|
onFocus: _,
|
|
1130
1130
|
allowsCustomValue: !0,
|
|
1131
1131
|
menuTrigger: "input",
|
|
@@ -1215,8 +1215,8 @@ se.Description = ie;
|
|
|
1215
1215
|
se.Error = ce;
|
|
1216
1216
|
const H = ({ children: e }) => {
|
|
1217
1217
|
const { id: t, value: r, onChange: o, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: C } = T(), { t: I } = Te(), b = Le(), p = b ? ve[b] : void 0, f = b && xt.getCountryByShortKey(b), N = w(() => {
|
|
1218
|
-
var
|
|
1219
|
-
return (Bt(((
|
|
1218
|
+
var M;
|
|
1219
|
+
return (Bt(((M = f == null ? void 0 : f.subdivisions) == null ? void 0 : M.list) || [], p) || []).map((j) => ({
|
|
1220
1220
|
value: j.key,
|
|
1221
1221
|
label: I(j.displayName)
|
|
1222
1222
|
})).sort((j, A) => j.label.localeCompare(A.label));
|
|
@@ -1226,21 +1226,21 @@ const H = ({ children: e }) => {
|
|
|
1226
1226
|
f
|
|
1227
1227
|
]), F = D(() => o(""), [
|
|
1228
1228
|
o
|
|
1229
|
-
]), { onInputKeyDown: S, ...
|
|
1229
|
+
]), { onInputKeyDown: S, ...O } = Rt({
|
|
1230
1230
|
options: N,
|
|
1231
1231
|
value: r,
|
|
1232
1232
|
commit: o,
|
|
1233
1233
|
clear: F,
|
|
1234
1234
|
onBlur: d
|
|
1235
|
-
}), R = Ee("subdivision"),
|
|
1235
|
+
}), R = Ee("subdivision"), q = E(e, H.Label), _ = E(e, H.Control), g = E(e, H.Options), v = E(e, H.Description), me = E(e, H.Error);
|
|
1236
1236
|
return /* @__PURE__ */ n.createElement(u, {
|
|
1237
1237
|
fieldId: t,
|
|
1238
|
-
renderLabel: () => h(
|
|
1238
|
+
renderLabel: () => h(q, {
|
|
1239
1239
|
label: R
|
|
1240
1240
|
}),
|
|
1241
1241
|
renderInput: () => /* @__PURE__ */ n.createElement(De, {
|
|
1242
1242
|
"aria-labelledby": C,
|
|
1243
|
-
...
|
|
1243
|
+
...O,
|
|
1244
1244
|
isDisabled: a,
|
|
1245
1245
|
isReadOnly: l,
|
|
1246
1246
|
isRequired: i,
|
|
@@ -1249,7 +1249,7 @@ const H = ({ children: e }) => {
|
|
|
1249
1249
|
menuTrigger: "input"
|
|
1250
1250
|
}, h(_, {
|
|
1251
1251
|
onKeyDown: S
|
|
1252
|
-
}), h(
|
|
1252
|
+
}), h(g, {
|
|
1253
1253
|
options: N
|
|
1254
1254
|
})),
|
|
1255
1255
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, me, v)
|
|
@@ -1321,12 +1321,12 @@ const Gn = () => ue("country"), Xn = () => ue("subdivision"), zn = () => ue("cit
|
|
|
1321
1321
|
[K.MLA_STREET_NUMBER]: nr,
|
|
1322
1322
|
[K.MLA_APARTMENT]: rr
|
|
1323
1323
|
}, sr = {}, ar = [], c = ({ children: e }) => {
|
|
1324
|
-
const { id: t, form: r, value: o, onChange: a, onFieldBlur: l, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: C, target: I, autocompleteEnabled: b, required: p, fieldType: f } = P(), [N, F] = fe(null), S = kt(),
|
|
1324
|
+
const { id: t, form: r, value: o, onChange: a, onFieldBlur: l, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: C, target: I, autocompleteEnabled: b, required: p, fieldType: f } = P(), [N, F] = fe(null), S = kt(), O = w(() => ({
|
|
1325
1325
|
...S,
|
|
1326
1326
|
...or
|
|
1327
1327
|
}), [
|
|
1328
1328
|
S
|
|
1329
|
-
]), { isExperimentEnabled: R } = bt(),
|
|
1329
|
+
]), { isExperimentEnabled: R } = bt(), q = R(ft.STREETLESS_LOCALITY_FALLBACK), { validateFields: _ } = $t(), g = Ut(), v = Ct(), me = w(() => ({
|
|
1330
1330
|
...v,
|
|
1331
1331
|
actions: {
|
|
1332
1332
|
predict: Kt,
|
|
@@ -1336,7 +1336,7 @@ const Gn = () => ue("country"), Xn = () => ue("subdivision"), zn = () => ue("cit
|
|
|
1336
1336
|
}
|
|
1337
1337
|
}), [
|
|
1338
1338
|
v
|
|
1339
|
-
]), { form: x, isMultilineAddressField:
|
|
1339
|
+
]), { form: x, isMultilineAddressField: M } = En({
|
|
1340
1340
|
id: t,
|
|
1341
1341
|
target: I,
|
|
1342
1342
|
fieldType: f,
|
|
@@ -1348,7 +1348,7 @@ const Gn = () => ue("country"), Xn = () => ue("subdivision"), zn = () => ue("cit
|
|
|
1348
1348
|
}), j = D((W) => {
|
|
1349
1349
|
if (!o)
|
|
1350
1350
|
return;
|
|
1351
|
-
const G = tn(W,
|
|
1351
|
+
const G = tn(W, M, q), Pe = {
|
|
1352
1352
|
...G,
|
|
1353
1353
|
[Ce.COUNTRY]: G[Ce.COUNTRY] ?? o[Ce.COUNTRY]
|
|
1354
1354
|
};
|
|
@@ -1356,10 +1356,10 @@ const Gn = () => ue("country"), Xn = () => ue("subdivision"), zn = () => ue("cit
|
|
|
1356
1356
|
}, [
|
|
1357
1357
|
a,
|
|
1358
1358
|
o,
|
|
1359
|
-
|
|
1360
|
-
|
|
1359
|
+
M,
|
|
1360
|
+
q
|
|
1361
1361
|
]), A = D((W, G) => {
|
|
1362
|
-
if (
|
|
1362
|
+
if (M && W === Ce.COUNTRY && (o == null ? void 0 : o[W]) !== G) {
|
|
1363
1363
|
a == null || a({
|
|
1364
1364
|
[Ce.COUNTRY]: G
|
|
1365
1365
|
});
|
|
@@ -1372,8 +1372,8 @@ const Gn = () => ue("country"), Xn = () => ue("subdivision"), zn = () => ue("cit
|
|
|
1372
1372
|
}, [
|
|
1373
1373
|
a,
|
|
1374
1374
|
o,
|
|
1375
|
-
|
|
1376
|
-
]), J = D(async (W) => _(
|
|
1375
|
+
M
|
|
1376
|
+
]), J = D(async (W) => _(M ? [
|
|
1377
1377
|
...W,
|
|
1378
1378
|
{
|
|
1379
1379
|
path: `${I}/${Ce.COUNTRY}`,
|
|
@@ -1383,7 +1383,7 @@ const Gn = () => ue("country"), Xn = () => ue("subdivision"), zn = () => ue("cit
|
|
|
1383
1383
|
o,
|
|
1384
1384
|
I,
|
|
1385
1385
|
_,
|
|
1386
|
-
|
|
1386
|
+
M
|
|
1387
1387
|
]);
|
|
1388
1388
|
Yt(t, () => {
|
|
1389
1389
|
var Pe;
|
|
@@ -1432,7 +1432,7 @@ const Gn = () => ue("country"), Xn = () => ue("subdivision"), zn = () => ue("cit
|
|
|
1432
1432
|
}, /* @__PURE__ */ n.createElement("legend", {
|
|
1433
1433
|
style: Jt
|
|
1434
1434
|
}, u), /* @__PURE__ */ n.createElement(Ht, {
|
|
1435
|
-
formSchema:
|
|
1435
|
+
formSchema: g,
|
|
1436
1436
|
form: x,
|
|
1437
1437
|
values: o ?? sr,
|
|
1438
1438
|
onFieldChange: A,
|
|
@@ -1440,7 +1440,7 @@ const Gn = () => ue("country"), Xn = () => ue("subdivision"), zn = () => ue("cit
|
|
|
1440
1440
|
onFocus: i,
|
|
1441
1441
|
errors: s ?? ar,
|
|
1442
1442
|
validateFields: J,
|
|
1443
|
-
fields:
|
|
1443
|
+
fields: O,
|
|
1444
1444
|
fieldActions: me
|
|
1445
1445
|
}))))))) : null;
|
|
1446
1446
|
};
|
|
@@ -1453,7 +1453,7 @@ c.PostalCode = $;
|
|
|
1453
1453
|
c.StreetName = U;
|
|
1454
1454
|
c.StreetNumber = se;
|
|
1455
1455
|
c.Apartment = re;
|
|
1456
|
-
const lr = "_postalCodeControl_1tire_1", ir = "_comboControl_1tire_5", cr = "_comboTrigger_1tire_19",
|
|
1456
|
+
const lr = "_postalCodeControl_1tire_1", ir = "_comboControl_1tire_5", cr = "_comboTrigger_1tire_19", Oe = {
|
|
1457
1457
|
postalCodeControl: lr,
|
|
1458
1458
|
comboControl: ir,
|
|
1459
1459
|
comboTrigger: cr
|
|
@@ -1464,15 +1464,15 @@ const lr = "_postalCodeControl_1tire_1", ir = "_comboControl_1tire_5", cr = "_co
|
|
|
1464
1464
|
}, /* @__PURE__ */ n.createElement(c.Country.Label.Required, {
|
|
1465
1465
|
className: L(Z, y.requiredMark)
|
|
1466
1466
|
})), /* @__PURE__ */ n.createElement(c.Country.Control, {
|
|
1467
|
-
className: L(lt, y.input,
|
|
1467
|
+
className: L(lt, y.input, Oe.comboControl)
|
|
1468
1468
|
}, /* @__PURE__ */ n.createElement(c.Country.Control.Input, {
|
|
1469
1469
|
className: L(y.innerInput, be)
|
|
1470
1470
|
}), /* @__PURE__ */ n.createElement(c.Country.Control.Trigger, {
|
|
1471
|
-
className:
|
|
1471
|
+
className: Oe.comboTrigger
|
|
1472
1472
|
}, /* @__PURE__ */ n.createElement(at, {
|
|
1473
1473
|
className: y.dropdownIcon
|
|
1474
1474
|
}))), /* @__PURE__ */ n.createElement(c.Country.Options, {
|
|
1475
|
-
className: L(
|
|
1475
|
+
className: L(ge, y.selectPopover, y.dropdownPopover)
|
|
1476
1476
|
}, /* @__PURE__ */ n.createElement(c.Country.Options.Option, {
|
|
1477
1477
|
className: L(y.selectOption, be)
|
|
1478
1478
|
})), /* @__PURE__ */ n.createElement(c.Country.Error, {
|
|
@@ -1489,7 +1489,7 @@ const lr = "_postalCodeControl_1tire_1", ir = "_comboControl_1tire_5", cr = "_co
|
|
|
1489
1489
|
})), /* @__PURE__ */ n.createElement(c.AddressLine.Input, {
|
|
1490
1490
|
className: e
|
|
1491
1491
|
}), /* @__PURE__ */ n.createElement(c.AddressLine.Options, {
|
|
1492
|
-
className: L(
|
|
1492
|
+
className: L(ge, y.selectPopover, y.dropdownPopover)
|
|
1493
1493
|
}, /* @__PURE__ */ n.createElement(c.AddressLine.Options.Option, {
|
|
1494
1494
|
className: L(y.selectOption, be)
|
|
1495
1495
|
})), /* @__PURE__ */ n.createElement(c.AddressLine.Error, {
|
|
@@ -1530,11 +1530,11 @@ const lr = "_postalCodeControl_1tire_1", ir = "_comboControl_1tire_5", cr = "_co
|
|
|
1530
1530
|
}, /* @__PURE__ */ n.createElement(c.PostalCode.Label.Required, {
|
|
1531
1531
|
className: L(Z, y.requiredMark)
|
|
1532
1532
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Control, {
|
|
1533
|
-
className:
|
|
1533
|
+
className: Oe.postalCodeControl
|
|
1534
1534
|
}, /* @__PURE__ */ n.createElement(c.PostalCode.Control.Input, {
|
|
1535
1535
|
className: e
|
|
1536
1536
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Options, {
|
|
1537
|
-
className: L(
|
|
1537
|
+
className: L(ge, y.selectPopover, y.dropdownPopover)
|
|
1538
1538
|
}, /* @__PURE__ */ n.createElement(c.PostalCode.Options.Option, {
|
|
1539
1539
|
className: L(y.selectOption, be)
|
|
1540
1540
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Error, {
|
|
@@ -1549,15 +1549,15 @@ const lr = "_postalCodeControl_1tire_1", ir = "_comboControl_1tire_5", cr = "_co
|
|
|
1549
1549
|
}, /* @__PURE__ */ n.createElement(c.Subdivision.Label.Required, {
|
|
1550
1550
|
className: L(Z, y.requiredMark)
|
|
1551
1551
|
})), /* @__PURE__ */ n.createElement(c.Subdivision.Control, {
|
|
1552
|
-
className: L(lt, y.input,
|
|
1552
|
+
className: L(lt, y.input, Oe.comboControl)
|
|
1553
1553
|
}, /* @__PURE__ */ n.createElement(c.Subdivision.Control.Input, {
|
|
1554
1554
|
className: L(y.innerInput, be)
|
|
1555
1555
|
}), /* @__PURE__ */ n.createElement(c.Subdivision.Control.Trigger, {
|
|
1556
|
-
className:
|
|
1556
|
+
className: Oe.comboTrigger
|
|
1557
1557
|
}, /* @__PURE__ */ n.createElement(at, {
|
|
1558
1558
|
className: y.dropdownIcon
|
|
1559
1559
|
}))), /* @__PURE__ */ n.createElement(c.Subdivision.Options, {
|
|
1560
|
-
className: L(
|
|
1560
|
+
className: L(ge, y.selectPopover, y.dropdownPopover)
|
|
1561
1561
|
}, /* @__PURE__ */ n.createElement(c.Subdivision.Options.Option, {
|
|
1562
1562
|
className: L(y.selectOption, be)
|
|
1563
1563
|
})), /* @__PURE__ */ n.createElement(c.Subdivision.Error, {
|
|
@@ -1574,7 +1574,7 @@ const lr = "_postalCodeControl_1tire_1", ir = "_comboControl_1tire_5", cr = "_co
|
|
|
1574
1574
|
})), /* @__PURE__ */ n.createElement(c.StreetName.Input, {
|
|
1575
1575
|
className: e
|
|
1576
1576
|
}), /* @__PURE__ */ n.createElement(c.StreetName.Options, {
|
|
1577
|
-
className: L(
|
|
1577
|
+
className: L(ge, y.selectPopover, y.dropdownPopover)
|
|
1578
1578
|
}, /* @__PURE__ */ n.createElement(c.StreetName.Options.Option, {
|
|
1579
1579
|
className: L(y.selectOption, be)
|
|
1580
1580
|
})), /* @__PURE__ */ n.createElement(c.StreetName.Error, {
|