@wix/form-elements 1.186.0 → 1.188.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-B_kU3lTx.js → appointment-rac-Biwj0bKe.js} +78 -78
- package/dist/component/{bookings-address-rac-BZR-Loac.js → bookings-address-rac-B_o25LOI.js} +1 -1
- package/dist/component/{bookings-email-rac-CCvIRZYM.js → bookings-email-rac-BBcusxbS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-B5AEOOre.js → bookings-first-name-rac-CNTGannm.js} +1 -1
- package/dist/component/{bookings-header-rac-BcvixPiY.js → bookings-header-rac-BTvG2vnk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-JiEUxaqi.js → bookings-last-name-rac-BQumGsz9.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-zPJ3u2Kn.js → bookings-login-bar-rac-Cl_rwWhO.js} +8 -8
- package/dist/component/{bookings-phone-rac-CNNlCp66.js → bookings-phone-rac-B_gXe9Fa.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Rl9b7r3g.js → bookings-rich-text-rac-CbMuPVCB.js} +1 -1
- package/dist/component/{checkbox-field-rac-DP6HkB2N.js → checkbox-field-rac-QwFSqEgs.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-DOFTwxeh.js → checkbox-group-field-headless-CTDMO0TM.js} +38 -38
- package/dist/component/{checkbox-group-field-rac-DhcC_N8m.js → checkbox-group-field-rac-DFUST9Th.js} +4 -4
- package/dist/component/{checkbox-group-rac-Gec8xcgN.js → checkbox-group-rac-CBAE-o1Q.js} +1 -1
- package/dist/component/{checkbox-rac-CAuZNb4B.js → checkbox-rac-DkYPhGTU.js} +1 -1
- package/dist/component/{contacts-address-rac-2WX8POCZ.js → contacts-address-rac-DKf42iJk.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-36zloipl.js → contacts-birthdate-rac-ffPSb2YW.js} +1 -1
- package/dist/component/{contacts-company-rac-skt6F4i0.js → contacts-company-rac-DLVdNbYz.js} +1 -1
- package/dist/component/{contacts-email-rac-BAftc4kl.js → contacts-email-rac-CW8SdcYX.js} +1 -1
- package/dist/component/{contacts-first-name-rac-u6Wiuwxe.js → contacts-first-name-rac-CGdzgpkw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DCh0xW6C.js → contacts-last-name-rac-DNQj7UcW.js} +1 -1
- package/dist/component/{contacts-phone-rac-lhdYji46.js → contacts-phone-rac-zAMIceti.js} +1 -1
- package/dist/component/{contacts-position-rac-jOQ8Zayq.js → contacts-position-rac-DLwn9B2T.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-q4sRxs2n.js → contacts-subscribe-rac-Cy5rxTkC.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-DpzneATH.js → contacts-tax-id-rac-CEfU6N6C.js} +1 -1
- package/dist/component/{date-availability-CKFxphlT.js → date-availability-C9EOQUiy.js} +1 -1
- package/dist/component/{date-input-field-rac-DgwRr6tR.js → date-input-field-rac-F4QQeEtO.js} +57 -57
- package/dist/component/{date-input-rac-CONL_9I5.js → date-input-rac-CJeOgyF5.js} +1 -1
- package/dist/component/{date-picker-field-rac-C1ckFkSh.js → date-picker-field-rac-33ARKAxQ.js} +35 -35
- package/dist/component/{date-picker-rac-CTms7Rxx.js → date-picker-rac-Beaqh84V.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BkjASrCJ.js → date-time-input-field-rac-CB8FfYUM.js} +44 -44
- package/dist/component/{date-time-input-rac-Bc3gu8--.js → date-time-input-rac-DQ9P6IVp.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BYEHlsBv.js → dext-checkbox-group-rac-Cho-hueW.js} +2 -2
- package/dist/component/{dext-checkbox-rac-C6nce0nR.js → dext-checkbox-rac-BIwIwy-y.js} +1 -1
- package/dist/component/{dext-date-picker-rac-COIoyTuy.js → dext-date-picker-rac-C03HJdvX.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DFuslGXT.js → dext-date-time-input-rac-Bo4XfnRA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-GecDU_NU.js → dext-dropdown-rac-CadT1tMH.js} +1 -1
- package/dist/component/{dext-email-rac-C9qXogI5.js → dext-email-rac-DbiEws8H.js} +1 -1
- package/dist/component/{dext-number-input-rac-BO_MqKpQ.js → dext-number-input-rac-XoW8CLvX.js} +1 -1
- package/dist/component/{dext-phone-rac-CZZBLRSj.js → dext-phone-rac-9rFyUD8e.js} +1 -1
- package/dist/component/{dext-radio-group-rac-baaOfskN.js → dext-radio-group-rac-U6BNL7IT.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Cyz7F31J.js → dext-rating-input-rac-BDGUv8jU.js} +1 -1
- package/dist/component/{dext-tags-rac-DiWEHPna.js → dext-tags-rac-CAFGVcIi.js} +2 -2
- package/dist/component/{dext-text-area-rac-BpZnhr2z.js → dext-text-area-rac-DXyzm9oe.js} +1 -1
- package/dist/component/{dext-text-input-rac-CZWOoFkx.js → dext-text-input-rac-C27gdfyG.js} +1 -1
- package/dist/component/{dext-url-input-rac-l98Wixh2.js → dext-url-input-rac-DovYH3_G.js} +1 -1
- package/dist/component/{donation-rac-BcdtetWT.js → donation-rac-DV2aRsDt.js} +60 -60
- package/dist/component/{dropdown-field-rac-Bgjtp3L4.js → dropdown-field-rac-D58C7YZG.js} +3 -3
- package/dist/component/{dropdown-rac-D3x_39ML.js → dropdown-rac-57yZf_yZ.js} +1 -1
- package/dist/component/{ecom-address-rac-Bdk-Q07X.js → ecom-address-rac-Co3WhA7m.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BoAls9a3.js → ecom-subscription-checkbox-rac-CYjsuRA9.js} +2 -2
- package/dist/component/{email-input-field-rac-77Oc4dDD.js → email-input-field-rac-C5G3pVkR.js} +14 -14
- package/dist/component/{events-repeater-rac-GfDVt3z5.js → events-repeater-rac-D5PXSDIH.js} +72 -70
- package/dist/component/{events-rsvp-rac-CsCMAtdq.js → events-rsvp-rac-BfyQNZh6.js} +3 -3
- package/dist/component/{field-error-headless-GKAj6Pxj.js → field-error-headless-RTyrenpC.js} +8 -8
- package/dist/component/{field-label-headless-PD3fGcax.js → field-label-headless-Bd00Hl2z.js} +4 -4
- package/dist/component/{file-upload-rac-CUxGzs3a.js → file-upload-rac-D5pTnsHO.js} +61 -61
- package/dist/component/{fixed-payment-rac-o5xHi-ra.js → fixed-payment-rac-ByxSjPu5.js} +9 -9
- package/dist/component/{form-RdPwfrvb.js → form-BG5UjjLA.js} +3547 -3403
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-C9xA5iqV.js → header-field-rac-Bql6VoAi.js} +2 -2
- package/dist/component/{header-rac-CF1VP6hb.js → header-rac-DWAIn4eY.js} +1 -1
- package/dist/component/{image-choice-rac-BEYEQpY1.js → image-choice-rac-D5dSQ4Xd.js} +11 -11
- package/dist/component/{index-S0Acbl6c.js → index-37eV-JEp.js} +5 -5
- package/dist/component/{index-RuCFDOGc.js → index-DlcCtz4h.js} +4 -4
- package/dist/component/{isObjectLike-Ber_X_Dh.js → isObjectLike-ClPDcTiq.js} +1 -1
- package/dist/component/{multiline-address-field-rac-B2TgOTXA.js → multiline-address-field-rac-CpvwzmpC.js} +345 -345
- package/dist/component/{multiline-address-rac-CmWUcCpu.js → multiline-address-rac-ENim2Bn6.js} +1 -1
- package/dist/component/{number-input-field-rac-Objw_lY1.js → number-input-field-rac-DTRnmRDk.js} +21 -21
- package/dist/component/{number-input-rac-DZSYFSGa.js → number-input-rac-QROlEpkx.js} +1 -1
- package/dist/component/{password-rac-CHJ-pfD8.js → password-rac-jMoyzIP2.js} +47 -47
- package/dist/component/{payment-input-rac-Z_KAjeub.js → payment-input-rac-DOOV4P4b.js} +31 -31
- package/dist/component/{phone-input-field-rac-CyEuc3c9.js → phone-input-field-rac-BA_mTcND.js} +47 -47
- package/dist/component/{phone-rac-DLvx-8X_.js → phone-rac-DXcbIqHK.js} +1 -1
- package/dist/component/{product-list-rac-D17el6c9.js → product-list-rac-CsxR7Ut6.js} +63 -63
- package/dist/component/{quiz-radio-group-rac-Ci8TptOw.js → quiz-radio-group-rac-IQgqvqjs.js} +1 -1
- package/dist/component/{radio-button-module-classes-FofhK-mq.js → radio-button-module-classes-DIFYfYiH.js} +36 -36
- package/dist/component/{radio-group-field-rac-BkSMEX4O.js → radio-group-field-rac-Ca2RlxOl.js} +4 -4
- package/dist/component/{radio-group-rac-BTn-Cxxa.js → radio-group-rac-DDervEEb.js} +1 -1
- package/dist/component/{rating-input-field-rac-CocnyJZF.js → rating-input-field-rac-0kyPo9cU.js} +12 -12
- package/dist/component/{rating-input-rac-BvBiBfeB.js → rating-input-rac-DqPsqUKR.js} +1 -1
- package/dist/component/{rich-content-rac.module-QspdFAOQ.js → rich-content-rac.module-2T_-7jvb.js} +5 -5
- package/dist/component/{rich-text-field-rac-Bhx9hioT.js → rich-text-field-rac-W-eKzhuC.js} +4 -4
- package/dist/component/{rich-text-rac-BQh8FwwS.js → rich-text-rac-CzJfbAyx.js} +1 -1
- package/dist/component/{service-dropdown-rac-BIXPgFFy.js → service-dropdown-rac-BMJy2pZ5.js} +25 -25
- package/dist/component/{services-multi-choice-rac-COQ1PA73.js → services-multi-choice-rac-BBAWlI7U.js} +7 -7
- package/dist/component/{signature-rac-Dg-moI_C.js → signature-rac-Y1GLswrp.js} +22 -22
- package/dist/component/{submit-button-rac-DeDYBkOM.js → submit-button-rac-CSKbrgQ3.js} +17 -17
- package/dist/component/{tags-field-rac-Ddd5j-Rm.js → tags-field-rac-D3zOYcC5.js} +19 -19
- package/dist/component/{tags-rac-CSN4Qj7H.js → tags-rac-Cs77Abgs.js} +1 -1
- package/dist/component/text-area-field-rac-DZZW7rAX.js +74 -0
- package/dist/component/{text-area-rac-CqdvWp7s.js → text-area-rac-BRPp0HnX.js} +1 -1
- package/dist/component/{text-input-field-rac-3fkKXrfo.js → text-input-field-rac-tPDZmLdU.js} +3 -3
- package/dist/component/text-input-headless-tkwEZWs7.js +47 -0
- package/dist/component/{text-input-rac-DAMMZiaZ.js → text-input-rac-DnHt4vkM.js} +1 -1
- package/dist/component/{time-input-rac-CsF1NYzf.js → time-input-rac-Dbg4Nqb5.js} +18 -18
- package/dist/component/url-input-field-rac-3ODFXFRP.js +77 -0
- package/dist/component/{url-input-rac-xe-Fv62_.js → url-input-rac-CPb5o8Of.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-D2bfB7mX.js → use-dropdown-option-class-name-Dd4ncVaY.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-C70Rbjnj.js → use-dropdown-trigger-class-name-zVniRqM7.js} +29 -29
- package/dist/component/{use-element-state-class-name-BxTnecG_.js → use-element-state-class-name-C8jFeDrq.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-CjyA3fHd.js → use-hoverable-input-class-name-B9diy0Mr.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-CzLh9VIQ.js → use-is-forced-open-dropdown-BR1U1l5w.js} +6 -6
- package/dist/component/{use-service-options-base-DcTiL5qj.js → use-service-options-base-yM4rJlq1.js} +3 -3
- package/dist/component/use-text-input-class-name-D6AnBbJx.js +6 -0
- package/package.json +4 -2
- package/dist/component/text-area-field-rac-VYumrKBq.js +0 -74
- package/dist/component/text-input-headless-DMWwlrhh.js +0 -47
- package/dist/component/url-input-field-rac-Cs2W0Y3s.js +0 -77
- package/dist/component/use-text-input-class-name-B-OzR1SQ.js +0 -6
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { RicosViewer as
|
|
1
|
+
import { RicosViewer as z } from "@wix/ricos/viewer";
|
|
2
2
|
import L from "classnames";
|
|
3
|
-
import n, { useMemo as
|
|
4
|
-
import { UNSAFE_PortalProvider as
|
|
5
|
-
import {
|
|
3
|
+
import n, { useMemo as w, createContext as We, useContext as Ie, useState as Ee, useRef as x, useCallback as _, useEffect as Pe } from "react";
|
|
4
|
+
import { UNSAFE_PortalProvider as Mt } from "react-aria";
|
|
5
|
+
import { bH as It, d as Lt, bC as qt, bE as Nt, bf as wt, bg as xt, b8 as Bt, be as W, F as K, bX as Te, bv as ct, bM as P, bJ as M, bO as ae, bV as be, bI as Ot, bk as kt, C as ge, bt as Ut, bx as Vt, bT as $t, bN as Wt, bS as Kt, bA as Yt, bp as Ht, bz as jt, bP as Jt, aP as Xt, Y as zt, _ as G, am as Q, $ as Oe, M as Z, I as ee, Z as Gt, a0 as Qt, a1 as Zt } from "./form-BG5UjjLA.js";
|
|
6
6
|
import { f as b, a as v } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { F as
|
|
8
|
-
import { c as
|
|
9
|
-
import { TextField as
|
|
10
|
-
import { D as ie, E as ce } from "./field-error-headless-
|
|
11
|
-
import { L as de } from "./field-label-headless-
|
|
12
|
-
import { e as
|
|
13
|
-
import { V as
|
|
14
|
-
import { u as
|
|
15
|
-
import { C as
|
|
7
|
+
import { F as en, V as tn } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
+
import { c as nn } from "./use-is-forced-open-dropdown-BR1U1l5w.js";
|
|
9
|
+
import { TextField as fe, Input as le, ComboBoxStateContext as Ke, ComboBox as Fe, Popover as De, ListBox as Me, ListBoxItem as he, Group as gt, Button as vt } from "react-aria-components";
|
|
10
|
+
import { D as ie, E as ce } from "./field-error-headless-RTyrenpC.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-Bd00Hl2z.js";
|
|
12
|
+
import { e as rn, c as on, a as sn, r as St } from "./isObjectLike-ClPDcTiq.js";
|
|
13
|
+
import { V as an, a as ln } from "./use-dropdown-option-class-name-Dd4ncVaY.js";
|
|
14
|
+
import { u as cn } from "./use-invoke-callback-UH73A_J3.js";
|
|
15
|
+
import { C as dt } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
-
import { H as
|
|
17
|
+
import { H as qe } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as C } from "./field-rac.module-DcyJyi2B.js";
|
|
19
|
-
import { u as
|
|
20
|
-
const
|
|
19
|
+
import { u as ut } from "./use-hoverable-input-class-name-B9diy0Mr.js";
|
|
20
|
+
const dn = (e, t, o) => {
|
|
21
21
|
var s, l, i, a;
|
|
22
22
|
const r = (s = e.steps) == null ? void 0 : s.map((d) => {
|
|
23
23
|
var m, u, y, I, p, E;
|
|
@@ -44,49 +44,49 @@ const cn = (e, t, o) => {
|
|
|
44
44
|
steps: r || e.steps
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
-
var
|
|
47
|
+
var Ce = /* @__PURE__ */ (function(e) {
|
|
48
48
|
return e.COUNTRY = "country", e.SUBDIVISION = "subdivision", e.CITY = "city", e.ADDRESS_LINE = "addressLine", e.ADDRESS_LINE_2 = "addressLine2", e.POSTAL_CODE = "postalCode", e.STREET_NAME = "streetName", e.STREET_NUMBER = "streetNumber", e.APARTMENT = "apartment", e;
|
|
49
49
|
})({});
|
|
50
|
-
function
|
|
50
|
+
function un(e, t, o = !1) {
|
|
51
51
|
const { country: r, subdivision: s, city: l, addressLine: i, streetAddress: a, addressLine2: d, postalCode: m } = e, u = {};
|
|
52
52
|
return t ? (r && (u.country = r), s && (u.subdivision = s), l && (u.city = l), i ? u.addressLine = i : a != null && a.formattedAddressLine && (u.addressLine = a == null ? void 0 : a.formattedAddressLine), d && (u.addressLine = d), m && (u.postalCode = m), a != null && a.apt && (u.apartment = a == null ? void 0 : a.apt), a != null && a.name ? u.streetName = a == null ? void 0 : a.name : o && (a != null && a.formattedAddressLine) && (u.streetName = a == null ? void 0 : a.formattedAddressLine), a != null && a.number && (u.streetNumber = a.number)) : (r && (u.country = r), s && (u.subdivision = s), l && (u.city = l), i ? u.address_line = i : a != null && a.formattedAddressLine && (u.address_line = a == null ? void 0 : a.formattedAddressLine), d && (u.address_line = d), m && (u.postal_code = m), a != null && a.apt && (u.apartment = a == null ? void 0 : a.apt), a != null && a.name ? u.street_name = a == null ? void 0 : a.name : o && (a != null && a.formattedAddressLine) && (u.street_name = a == null ? void 0 : a.formattedAddressLine), a != null && a.number && (u.street_number = a.number)), u;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const Ft = /* @__PURE__ */ We({
|
|
55
55
|
onAddressSelect: () => {
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
58
|
-
const r =
|
|
57
|
+
}), mn = ({ children: e, onAddressSelect: t, autocompleteEnabled: o }) => {
|
|
58
|
+
const r = w(() => ({
|
|
59
59
|
onAddressSelect: t,
|
|
60
60
|
autocompleteEnabled: o
|
|
61
61
|
}), [
|
|
62
62
|
t,
|
|
63
63
|
o
|
|
64
64
|
]);
|
|
65
|
-
return /* @__PURE__ */ n.createElement(
|
|
65
|
+
return /* @__PURE__ */ n.createElement(Ft.Provider, {
|
|
66
66
|
value: r
|
|
67
67
|
}, e);
|
|
68
68
|
};
|
|
69
|
-
function
|
|
70
|
-
return
|
|
69
|
+
function Le() {
|
|
70
|
+
return Ie(Ft);
|
|
71
71
|
}
|
|
72
|
-
const
|
|
73
|
-
const o =
|
|
72
|
+
const Dt = /* @__PURE__ */ We(void 0), pn = ({ children: e, countryCode: t }) => {
|
|
73
|
+
const o = w(() => ({
|
|
74
74
|
countryCode: t
|
|
75
75
|
}), [
|
|
76
76
|
t
|
|
77
77
|
]);
|
|
78
|
-
return /* @__PURE__ */ n.createElement(
|
|
78
|
+
return /* @__PURE__ */ n.createElement(Dt.Provider, {
|
|
79
79
|
value: o
|
|
80
80
|
}, e);
|
|
81
81
|
};
|
|
82
|
-
function
|
|
83
|
-
const e =
|
|
82
|
+
function Ne() {
|
|
83
|
+
const e = Ie(Dt);
|
|
84
84
|
return e == null ? void 0 : e.countryCode;
|
|
85
85
|
}
|
|
86
86
|
function we(e) {
|
|
87
87
|
return e != null;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function En(e, t, o) {
|
|
90
90
|
return !t || !o ? e : {
|
|
91
91
|
...e,
|
|
92
92
|
fields: (e.fields ?? []).map((r) => {
|
|
@@ -110,31 +110,31 @@ function pn(e, t, o) {
|
|
|
110
110
|
})
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
const
|
|
113
|
+
const bn = (e, t) => e.map((o) => ({
|
|
114
114
|
...o,
|
|
115
115
|
id: ("target" in o ? t[o.target] : void 0) ?? o.id
|
|
116
|
-
})),
|
|
116
|
+
})), ht = 12, fn = (e) => {
|
|
117
117
|
const t = e.filter((r) => !r.properties.hidden), o = e.filter((r) => r.properties.hidden);
|
|
118
118
|
return {
|
|
119
119
|
visibleFields: t,
|
|
120
120
|
hiddenFields: o
|
|
121
121
|
};
|
|
122
|
-
},
|
|
122
|
+
}, yn = (e) => {
|
|
123
123
|
const t = {};
|
|
124
124
|
return e.forEach((o) => {
|
|
125
125
|
const r = o.layout.row;
|
|
126
126
|
t[r] || (t[r] = []), t[r].push(o);
|
|
127
127
|
}), t;
|
|
128
|
-
},
|
|
128
|
+
}, Cn = (e) => {
|
|
129
129
|
const t = {};
|
|
130
130
|
return Object.keys(e).forEach((o) => {
|
|
131
131
|
const r = parseInt(o, 10), s = e[r];
|
|
132
|
-
s.reduce((i, a) => i + a.layout.width, 0) !==
|
|
132
|
+
s.reduce((i, a) => i + a.layout.width, 0) !== ht && (t[r] = s);
|
|
133
133
|
}), t;
|
|
134
|
-
},
|
|
134
|
+
}, In = (e, t) => e.map((o) => {
|
|
135
135
|
const r = o.layout.row;
|
|
136
136
|
if (t[r] && !o.properties.hidden) {
|
|
137
|
-
const s = t[r], l = s.length, i =
|
|
137
|
+
const s = t[r], l = s.length, i = ht / l, a = s.findIndex((m) => m.id === o.id), d = i * a;
|
|
138
138
|
return {
|
|
139
139
|
...o,
|
|
140
140
|
layout: {
|
|
@@ -145,7 +145,7 @@ const En = (e, t) => e.map((o) => ({
|
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
return o;
|
|
148
|
-
}),
|
|
148
|
+
}), Ln = (e, t, o) => {
|
|
149
149
|
const r = Math.max(...t.map((s) => s.layout.row), -1);
|
|
150
150
|
return e.map((s) => {
|
|
151
151
|
if (s.properties.hidden) {
|
|
@@ -160,13 +160,13 @@ const En = (e, t) => e.map((o) => ({
|
|
|
160
160
|
}
|
|
161
161
|
return s;
|
|
162
162
|
});
|
|
163
|
-
},
|
|
164
|
-
const { visibleFields: t, hiddenFields: o } =
|
|
163
|
+
}, Nn = (e) => {
|
|
164
|
+
const { visibleFields: t, hiddenFields: o } = fn(e.fields), r = yn(t), s = Cn(r), l = In(e.fields, s), i = Ln(l, t, o);
|
|
165
165
|
return {
|
|
166
166
|
...e,
|
|
167
167
|
fields: i
|
|
168
168
|
};
|
|
169
|
-
},
|
|
169
|
+
}, On = () => ({
|
|
170
170
|
country: W(),
|
|
171
171
|
subdivision: W(),
|
|
172
172
|
city: W(),
|
|
@@ -176,37 +176,37 @@ const En = (e, t) => e.map((o) => ({
|
|
|
176
176
|
street_name: W(),
|
|
177
177
|
street_number: W(),
|
|
178
178
|
apartment: W()
|
|
179
|
-
}),
|
|
180
|
-
const [d] = Ee(
|
|
179
|
+
}), gn = ({ id: e, target: t, fieldType: o, form: r, country: s, fieldSettings: l, validation: i, required: a }) => {
|
|
180
|
+
const [d] = Ee(On), { isExperimentEnabled: m } = It(), u = m(Lt.USE_FIELDS_V2), { getCountryAddressForm: y } = qt(), { isMobile: I, breakpoint: p } = Nt(), E = y(s), f = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N = w(() => {
|
|
181
181
|
var g;
|
|
182
182
|
return wt(a, (g = i == null ? void 0 : i.predefined) == null ? void 0 : g.multilineAddressOptions);
|
|
183
183
|
}, [
|
|
184
184
|
i,
|
|
185
185
|
a
|
|
186
|
-
]), F =
|
|
186
|
+
]), F = w(() => xt(), []);
|
|
187
187
|
return {
|
|
188
|
-
form:
|
|
188
|
+
form: w(() => {
|
|
189
189
|
var T, O;
|
|
190
190
|
if (!f || !E)
|
|
191
191
|
return r && {
|
|
192
192
|
...r,
|
|
193
|
-
fields:
|
|
193
|
+
fields: bn(r.fields, d)
|
|
194
194
|
};
|
|
195
|
-
const g =
|
|
195
|
+
const g = Bt({
|
|
196
196
|
useFieldsV2: u,
|
|
197
197
|
path: t,
|
|
198
198
|
parentId: e,
|
|
199
199
|
includeHiddenFields: !0,
|
|
200
200
|
isMobile: I,
|
|
201
201
|
breakpoint: p,
|
|
202
|
-
form:
|
|
202
|
+
form: En(dn(E, N, F), l, (O = (T = i == null ? void 0 : i.predefined) == null ? void 0 : T.multilineAddressOptions) == null ? void 0 : O.fields)
|
|
203
203
|
});
|
|
204
204
|
if (!g.fields.some((h) => h.properties.hidden))
|
|
205
205
|
return g;
|
|
206
|
-
const
|
|
206
|
+
const q = Nn(g);
|
|
207
207
|
return {
|
|
208
|
-
...
|
|
209
|
-
fields:
|
|
208
|
+
...q,
|
|
209
|
+
fields: q.fields.filter((h) => !h.properties.hidden)
|
|
210
210
|
};
|
|
211
211
|
}, [
|
|
212
212
|
E,
|
|
@@ -225,24 +225,24 @@ const En = (e, t) => e.map((o) => ({
|
|
|
225
225
|
]),
|
|
226
226
|
isMultilineAddressField: f
|
|
227
227
|
};
|
|
228
|
-
},
|
|
229
|
-
const o =
|
|
228
|
+
}, _t = /* @__PURE__ */ We(void 0), vn = ({ children: e, fields: t }) => {
|
|
229
|
+
const o = w(() => ({
|
|
230
230
|
fields: t
|
|
231
231
|
}), [
|
|
232
232
|
t
|
|
233
233
|
]);
|
|
234
|
-
return /* @__PURE__ */ n.createElement(
|
|
234
|
+
return /* @__PURE__ */ n.createElement(_t.Provider, {
|
|
235
235
|
value: o
|
|
236
236
|
}, e);
|
|
237
237
|
};
|
|
238
238
|
function ue(e) {
|
|
239
|
-
const t =
|
|
239
|
+
const t = Ie(_t);
|
|
240
240
|
if (!t)
|
|
241
241
|
throw new Error("useAddressFields must be used within AddressFieldsProvider");
|
|
242
242
|
return t.fields[e];
|
|
243
243
|
}
|
|
244
244
|
function me(e) {
|
|
245
|
-
const { t } =
|
|
245
|
+
const { t } = Te(), o = Ne(), r = o && ct.getCountryByShortKey(o), l = (r ? r.addressPartDisplayNames : ct.getDefaultAddressDisplayNames())[e];
|
|
246
246
|
return l ? t(l) : "";
|
|
247
247
|
}
|
|
248
248
|
const ne = ({ children: e }) => {
|
|
@@ -252,7 +252,7 @@ const ne = ({ children: e }) => {
|
|
|
252
252
|
renderLabel: () => v(p, {
|
|
253
253
|
label: I
|
|
254
254
|
}),
|
|
255
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
255
|
+
renderInput: () => /* @__PURE__ */ n.createElement(fe, {
|
|
256
256
|
"aria-labelledby": y,
|
|
257
257
|
value: o ?? "",
|
|
258
258
|
onChange: r,
|
|
@@ -265,14 +265,14 @@ const ne = ({ children: e }) => {
|
|
|
265
265
|
}, E),
|
|
266
266
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
267
267
|
});
|
|
268
|
-
},
|
|
268
|
+
}, Sn = ({ className: e }) => {
|
|
269
269
|
const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
|
|
270
270
|
return ae(() => {
|
|
271
271
|
var i;
|
|
272
272
|
(i = l.current) == null || i.focus({
|
|
273
273
|
preventScroll: !0
|
|
274
274
|
});
|
|
275
|
-
}, t), /* @__PURE__ */ n.createElement(le, {
|
|
275
|
+
}, t), be(l), /* @__PURE__ */ n.createElement(le, {
|
|
276
276
|
ref: l,
|
|
277
277
|
id: r,
|
|
278
278
|
autoComplete: "address-line2",
|
|
@@ -282,12 +282,12 @@ const ne = ({ children: e }) => {
|
|
|
282
282
|
});
|
|
283
283
|
};
|
|
284
284
|
ne.Label = de;
|
|
285
|
-
ne.Input =
|
|
285
|
+
ne.Input = Sn;
|
|
286
286
|
ne.Description = ie;
|
|
287
287
|
ne.Error = ce;
|
|
288
|
-
const
|
|
289
|
-
const { actions: t } =
|
|
290
|
-
return
|
|
288
|
+
const Ye = ({ enabled: e }) => {
|
|
289
|
+
const { actions: t } = Ot(), [o, r] = Ee(W()), s = _(() => r(W()), []);
|
|
290
|
+
return w(() => {
|
|
291
291
|
const { predict: l, getPlace: i, searchByPostalCode: a } = t ?? {};
|
|
292
292
|
if (!(!e || !l || !i || !a))
|
|
293
293
|
return {
|
|
@@ -312,52 +312,52 @@ const Ke = ({ enabled: e }) => {
|
|
|
312
312
|
s
|
|
313
313
|
]);
|
|
314
314
|
};
|
|
315
|
-
var qe, ut;
|
|
316
|
-
function Sn() {
|
|
317
|
-
if (ut) return qe;
|
|
318
|
-
ut = 1;
|
|
319
|
-
var e = nn(), t = function() {
|
|
320
|
-
return e.Date.now();
|
|
321
|
-
};
|
|
322
|
-
return qe = t, qe;
|
|
323
|
-
}
|
|
324
315
|
var xe, mt;
|
|
325
316
|
function Fn() {
|
|
326
317
|
if (mt) return xe;
|
|
327
318
|
mt = 1;
|
|
328
|
-
var e =
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
;
|
|
332
|
-
return r;
|
|
333
|
-
}
|
|
319
|
+
var e = rn(), t = function() {
|
|
320
|
+
return e.Date.now();
|
|
321
|
+
};
|
|
334
322
|
return xe = t, xe;
|
|
335
323
|
}
|
|
336
324
|
var Be, pt;
|
|
337
325
|
function Dn() {
|
|
338
326
|
if (pt) return Be;
|
|
339
327
|
pt = 1;
|
|
340
|
-
var e =
|
|
341
|
-
function o
|
|
342
|
-
|
|
328
|
+
var e = /\s/;
|
|
329
|
+
function t(o) {
|
|
330
|
+
for (var r = o.length; r-- && e.test(o.charAt(r)); )
|
|
331
|
+
;
|
|
332
|
+
return r;
|
|
343
333
|
}
|
|
344
|
-
return Be =
|
|
334
|
+
return Be = t, Be;
|
|
345
335
|
}
|
|
346
336
|
var ke, Et;
|
|
347
337
|
function hn() {
|
|
348
338
|
if (Et) return ke;
|
|
349
339
|
Et = 1;
|
|
350
|
-
var e =
|
|
351
|
-
function r
|
|
352
|
-
return
|
|
340
|
+
var e = Dn(), t = /^\s+/;
|
|
341
|
+
function o(r) {
|
|
342
|
+
return r && r.slice(0, e(r) + 1).replace(t, "");
|
|
353
343
|
}
|
|
354
|
-
return ke =
|
|
344
|
+
return ke = o, ke;
|
|
355
345
|
}
|
|
356
346
|
var Ue, bt;
|
|
357
347
|
function _n() {
|
|
358
348
|
if (bt) return Ue;
|
|
359
349
|
bt = 1;
|
|
360
|
-
var e =
|
|
350
|
+
var e = on(), t = sn(), o = "[object Symbol]";
|
|
351
|
+
function r(s) {
|
|
352
|
+
return typeof s == "symbol" || t(s) && e(s) == o;
|
|
353
|
+
}
|
|
354
|
+
return Ue = r, Ue;
|
|
355
|
+
}
|
|
356
|
+
var Ve, ft;
|
|
357
|
+
function Rn() {
|
|
358
|
+
if (ft) return Ve;
|
|
359
|
+
ft = 1;
|
|
360
|
+
var e = hn(), t = St(), o = _n(), r = NaN, s = /^[-+]0x[0-9a-f]+$/i, l = /^0b[01]+$/i, i = /^0o[0-7]+$/i, a = parseInt;
|
|
361
361
|
function d(m) {
|
|
362
362
|
if (typeof m == "number")
|
|
363
363
|
return m;
|
|
@@ -373,13 +373,13 @@ function _n() {
|
|
|
373
373
|
var y = l.test(m);
|
|
374
374
|
return y || i.test(m) ? a(m.slice(2), y ? 2 : 8) : s.test(m) ? r : +m;
|
|
375
375
|
}
|
|
376
|
-
return
|
|
376
|
+
return Ve = d, Ve;
|
|
377
377
|
}
|
|
378
|
-
var
|
|
379
|
-
function
|
|
380
|
-
if (
|
|
381
|
-
|
|
382
|
-
var e =
|
|
378
|
+
var $e, yt;
|
|
379
|
+
function An() {
|
|
380
|
+
if (yt) return $e;
|
|
381
|
+
yt = 1;
|
|
382
|
+
var e = St(), t = Fn(), o = Rn(), r = "Expected a function", s = Math.max, l = Math.min;
|
|
383
383
|
function i(a, d, m) {
|
|
384
384
|
var u, y, I, p, E, f, N = 0, F = !1, D = !1, g = !0;
|
|
385
385
|
if (typeof a != "function")
|
|
@@ -389,12 +389,12 @@ function Rn() {
|
|
|
389
389
|
var J = u, pe = y;
|
|
390
390
|
return u = y = void 0, N = S, p = a.apply(pe, J), p;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function q(S) {
|
|
393
393
|
return N = S, E = setTimeout(h, d), F ? R(S) : p;
|
|
394
394
|
}
|
|
395
395
|
function T(S) {
|
|
396
|
-
var J = S - f, pe = S - N,
|
|
397
|
-
return D ? l(
|
|
396
|
+
var J = S - f, pe = S - N, _e = d - J;
|
|
397
|
+
return D ? l(_e, I - pe) : _e;
|
|
398
398
|
}
|
|
399
399
|
function O(S) {
|
|
400
400
|
var J = S - f, pe = S - N;
|
|
@@ -409,7 +409,7 @@ function Rn() {
|
|
|
409
409
|
function j(S) {
|
|
410
410
|
return E = void 0, g && u ? R(S) : (u = y = void 0, p);
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function ye() {
|
|
413
413
|
E !== void 0 && clearTimeout(E), N = 0, u = f = y = E = void 0;
|
|
414
414
|
}
|
|
415
415
|
function V() {
|
|
@@ -419,41 +419,41 @@ function Rn() {
|
|
|
419
419
|
var S = t(), J = O(S);
|
|
420
420
|
if (u = arguments, y = this, f = S, J) {
|
|
421
421
|
if (E === void 0)
|
|
422
|
-
return
|
|
422
|
+
return q(f);
|
|
423
423
|
if (D)
|
|
424
424
|
return clearTimeout(E), E = setTimeout(h, d), R(f);
|
|
425
425
|
}
|
|
426
426
|
return E === void 0 && (E = setTimeout(h, d)), p;
|
|
427
427
|
}
|
|
428
|
-
return A.cancel =
|
|
428
|
+
return A.cancel = ye, A.flush = V, A;
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return $e = i, $e;
|
|
431
431
|
}
|
|
432
|
-
var
|
|
433
|
-
const
|
|
434
|
-
const r = x(e), s = _(
|
|
432
|
+
var Pn = An();
|
|
433
|
+
const Tn = /* @__PURE__ */ kt(Pn), Mn = (e, t, o = 200) => {
|
|
434
|
+
const r = x(e), s = _(Tn((...l) => {
|
|
435
435
|
r.current(...l);
|
|
436
436
|
}, o), [
|
|
437
437
|
o
|
|
438
438
|
]);
|
|
439
|
-
return
|
|
439
|
+
return Pe(() => {
|
|
440
440
|
r.current = e;
|
|
441
441
|
}, [
|
|
442
442
|
e,
|
|
443
443
|
t
|
|
444
444
|
]), s;
|
|
445
|
-
},
|
|
445
|
+
}, qn = () => {
|
|
446
446
|
const e = x(!0);
|
|
447
|
-
return
|
|
447
|
+
return Pe(() => () => {
|
|
448
448
|
e.current = !1;
|
|
449
449
|
}, []), () => e.current;
|
|
450
|
-
},
|
|
450
|
+
}, Ct = {
|
|
451
451
|
loading: !1,
|
|
452
452
|
predictions: []
|
|
453
|
-
},
|
|
454
|
-
const [{ loading: r, predictions: s }, l] = Ee(
|
|
455
|
-
i.current++, l(
|
|
456
|
-
}, []), m =
|
|
453
|
+
}, Rt = ({ atlas: e, onError: t }) => {
|
|
454
|
+
const [{ loading: r, predictions: s }, l] = Ee(Ct), i = x(0), a = qn(), d = _(() => {
|
|
455
|
+
i.current++, l(Ct);
|
|
456
|
+
}, []), m = Mn(async ({ input: u, countryCodes: y }) => {
|
|
457
457
|
if (!e || !a())
|
|
458
458
|
return;
|
|
459
459
|
if (!u) {
|
|
@@ -491,11 +491,11 @@ const Pn = /* @__PURE__ */ Bt(An), Tn = (e, t, o = 200) => {
|
|
|
491
491
|
updatePredictions: m,
|
|
492
492
|
clearPredictions: d
|
|
493
493
|
};
|
|
494
|
-
},
|
|
495
|
-
const t =
|
|
494
|
+
}, He = ({ optionCount: e }) => {
|
|
495
|
+
const t = Ie(Ke), o = x(t);
|
|
496
496
|
o.current = t;
|
|
497
497
|
const r = x(e);
|
|
498
|
-
return
|
|
498
|
+
return Pe(() => {
|
|
499
499
|
const s = e > 0 && r.current === 0;
|
|
500
500
|
r.current = e;
|
|
501
501
|
const l = o.current;
|
|
@@ -504,7 +504,7 @@ const Pn = /* @__PURE__ */ Bt(An), Tn = (e, t, o = 200) => {
|
|
|
504
504
|
e
|
|
505
505
|
]), null;
|
|
506
506
|
}, B = ({ children: e }) => {
|
|
507
|
-
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = M(), { autocompleteEnabled: p } =
|
|
507
|
+
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = M(), { autocompleteEnabled: p } = Le(), E = y || p, f = me("addressLine1"), N = b(e, B.Label), F = b(e, B.Input), D = b(e, B.Options), g = b(e, B.Description), R = b(e, B.Error);
|
|
508
508
|
return E ? /* @__PURE__ */ n.createElement(u, {
|
|
509
509
|
fieldId: t,
|
|
510
510
|
renderLabel: () => v(N, {
|
|
@@ -526,7 +526,7 @@ const Pn = /* @__PURE__ */ Bt(An), Tn = (e, t, o = 200) => {
|
|
|
526
526
|
renderLabel: () => v(N, {
|
|
527
527
|
label: f
|
|
528
528
|
}),
|
|
529
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
529
|
+
renderInput: () => /* @__PURE__ */ n.createElement(fe, {
|
|
530
530
|
"aria-labelledby": I,
|
|
531
531
|
value: o ?? "",
|
|
532
532
|
onChange: r,
|
|
@@ -540,11 +540,11 @@ const Pn = /* @__PURE__ */ Bt(An), Tn = (e, t, o = 200) => {
|
|
|
540
540
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
541
541
|
});
|
|
542
542
|
}, wn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: s, required: l, hasError: i, onBlur: a, onFocus: d }) => {
|
|
543
|
-
const { labelId: m } = M(), { onAddressSelect: u } =
|
|
543
|
+
const { labelId: m } = M(), { onAddressSelect: u } = Le(), y = Ne(), I = Ye({
|
|
544
544
|
enabled: !0
|
|
545
|
-
}), { predictions: p, updatePredictions: E, clearPredictions: f } =
|
|
545
|
+
}), { predictions: p, updatePredictions: E, clearPredictions: f } = Rt({
|
|
546
546
|
atlas: I
|
|
547
|
-
}), N =
|
|
547
|
+
}), N = w(() => p.map((O) => ({
|
|
548
548
|
id: O.searchId || "",
|
|
549
549
|
label: O.description || ""
|
|
550
550
|
})), [
|
|
@@ -581,8 +581,8 @@ const Pn = /* @__PURE__ */ Bt(An), Tn = (e, t, o = 200) => {
|
|
|
581
581
|
d == null || d();
|
|
582
582
|
}, [
|
|
583
583
|
d
|
|
584
|
-
]),
|
|
585
|
-
return /* @__PURE__ */ n.createElement(
|
|
584
|
+
]), q = b(e, B.Input), T = b(e, B.Options);
|
|
585
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
586
586
|
"aria-labelledby": m,
|
|
587
587
|
inputValue: t ?? "",
|
|
588
588
|
onInputChange: F,
|
|
@@ -597,21 +597,21 @@ const Pn = /* @__PURE__ */ Bt(An), Tn = (e, t, o = 200) => {
|
|
|
597
597
|
allowsCustomValue: !0,
|
|
598
598
|
menuTrigger: "input",
|
|
599
599
|
items: N
|
|
600
|
-
}, v(
|
|
600
|
+
}, v(q, {
|
|
601
601
|
onFocus: R
|
|
602
602
|
}), v(T, {
|
|
603
603
|
options: N
|
|
604
|
-
}), /* @__PURE__ */ n.createElement(
|
|
604
|
+
}), /* @__PURE__ */ n.createElement(He, {
|
|
605
605
|
optionCount: N.length
|
|
606
606
|
}));
|
|
607
|
-
},
|
|
607
|
+
}, xn = ({ className: e, ...t }) => {
|
|
608
608
|
const { id: o, placeholder: r } = P(), { inputId: s, ariaDescribedBy: l } = M(), { onFocus: i } = t, a = x(null);
|
|
609
609
|
return ae(() => {
|
|
610
610
|
var d;
|
|
611
611
|
(d = a.current) == null || d.focus({
|
|
612
612
|
preventScroll: !0
|
|
613
613
|
});
|
|
614
|
-
}, o), /* @__PURE__ */ n.createElement(le, {
|
|
614
|
+
}, o), be(a), /* @__PURE__ */ n.createElement(le, {
|
|
615
615
|
ref: a,
|
|
616
616
|
id: s,
|
|
617
617
|
autoComplete: "address-line1",
|
|
@@ -620,40 +620,40 @@ const Pn = /* @__PURE__ */ Bt(An), Tn = (e, t, o = 200) => {
|
|
|
620
620
|
placeholder: r,
|
|
621
621
|
onFocus: i
|
|
622
622
|
});
|
|
623
|
-
},
|
|
624
|
-
const o = b(e,
|
|
625
|
-
return /* @__PURE__ */ n.createElement(
|
|
623
|
+
}, je = ({ children: e, className: t }) => {
|
|
624
|
+
const o = b(e, je.Option);
|
|
625
|
+
return /* @__PURE__ */ n.createElement(De, {
|
|
626
626
|
className: t,
|
|
627
627
|
containerPadding: 0,
|
|
628
628
|
offset: 0
|
|
629
|
-
}, /* @__PURE__ */ n.createElement(
|
|
629
|
+
}, /* @__PURE__ */ n.createElement(Me, {
|
|
630
630
|
renderEmptyState: () => null
|
|
631
631
|
}, (r) => v(o, {
|
|
632
632
|
id: r.id,
|
|
633
633
|
label: r.label
|
|
634
634
|
})));
|
|
635
|
-
},
|
|
635
|
+
}, Bn = ({ className: e, ...t }) => {
|
|
636
636
|
const { id: o, label: r } = t;
|
|
637
|
-
return /* @__PURE__ */ n.createElement(
|
|
637
|
+
return /* @__PURE__ */ n.createElement(he, {
|
|
638
638
|
className: e,
|
|
639
639
|
id: o,
|
|
640
640
|
textValue: r
|
|
641
641
|
}, r);
|
|
642
642
|
};
|
|
643
|
-
|
|
643
|
+
je.Option = Bn;
|
|
644
644
|
B.Label = de;
|
|
645
|
-
B.Input =
|
|
646
|
-
B.Options =
|
|
645
|
+
B.Input = xn;
|
|
646
|
+
B.Options = je;
|
|
647
647
|
B.Description = ie;
|
|
648
648
|
B.Error = ce;
|
|
649
649
|
const re = ({ children: e }) => {
|
|
650
|
-
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = M(), { t: I } =
|
|
650
|
+
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = M(), { t: I } = Te(), p = I("field.mla-apartment.label"), E = b(e, re.Label), f = b(e, re.Input), N = b(e, re.Description), F = b(e, re.Error);
|
|
651
651
|
return /* @__PURE__ */ n.createElement(u, {
|
|
652
652
|
fieldId: t,
|
|
653
653
|
renderLabel: () => v(E, {
|
|
654
654
|
label: p
|
|
655
655
|
}),
|
|
656
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
656
|
+
renderInput: () => /* @__PURE__ */ n.createElement(fe, {
|
|
657
657
|
"aria-labelledby": y,
|
|
658
658
|
value: o ?? "",
|
|
659
659
|
onChange: r,
|
|
@@ -666,14 +666,14 @@ const re = ({ children: e }) => {
|
|
|
666
666
|
}, f),
|
|
667
667
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, F, N)
|
|
668
668
|
});
|
|
669
|
-
},
|
|
669
|
+
}, kn = ({ className: e }) => {
|
|
670
670
|
const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
|
|
671
671
|
return ae(() => {
|
|
672
672
|
var i;
|
|
673
673
|
(i = l.current) == null || i.focus({
|
|
674
674
|
preventScroll: !0
|
|
675
675
|
});
|
|
676
|
-
}, t), /* @__PURE__ */ n.createElement(le, {
|
|
676
|
+
}, t), be(l), /* @__PURE__ */ n.createElement(le, {
|
|
677
677
|
ref: l,
|
|
678
678
|
id: r,
|
|
679
679
|
autoComplete: "address-line2",
|
|
@@ -683,7 +683,7 @@ const re = ({ children: e }) => {
|
|
|
683
683
|
});
|
|
684
684
|
};
|
|
685
685
|
re.Label = de;
|
|
686
|
-
re.Input =
|
|
686
|
+
re.Input = kn;
|
|
687
687
|
re.Description = ie;
|
|
688
688
|
re.Error = ce;
|
|
689
689
|
const oe = ({ children: e }) => {
|
|
@@ -693,7 +693,7 @@ const oe = ({ children: e }) => {
|
|
|
693
693
|
renderLabel: () => v(p, {
|
|
694
694
|
label: I
|
|
695
695
|
}),
|
|
696
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
696
|
+
renderInput: () => /* @__PURE__ */ n.createElement(fe, {
|
|
697
697
|
"aria-labelledby": y,
|
|
698
698
|
value: o ?? "",
|
|
699
699
|
onChange: r,
|
|
@@ -706,14 +706,14 @@ const oe = ({ children: e }) => {
|
|
|
706
706
|
}, E),
|
|
707
707
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
708
708
|
});
|
|
709
|
-
},
|
|
709
|
+
}, Un = ({ className: e }) => {
|
|
710
710
|
const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
|
|
711
711
|
return ae(() => {
|
|
712
712
|
var i;
|
|
713
713
|
(i = l.current) == null || i.focus({
|
|
714
714
|
preventScroll: !0
|
|
715
715
|
});
|
|
716
|
-
}, t), /* @__PURE__ */ n.createElement(le, {
|
|
716
|
+
}, t), be(l), /* @__PURE__ */ n.createElement(le, {
|
|
717
717
|
ref: l,
|
|
718
718
|
id: r,
|
|
719
719
|
autoComplete: "address-level2",
|
|
@@ -723,19 +723,19 @@ const oe = ({ children: e }) => {
|
|
|
723
723
|
});
|
|
724
724
|
};
|
|
725
725
|
oe.Label = de;
|
|
726
|
-
oe.Input =
|
|
726
|
+
oe.Input = Un;
|
|
727
727
|
oe.Description = ie;
|
|
728
728
|
oe.Error = ce;
|
|
729
|
-
const
|
|
730
|
-
const t =
|
|
731
|
-
return
|
|
729
|
+
const Vn = ({ isOpen: e }) => {
|
|
730
|
+
const t = Ie(Ke), o = x(!1);
|
|
731
|
+
return Pe(() => {
|
|
732
732
|
e && t && !t.isOpen && t.open(null, "manual"), e && (t == null ? void 0 : t.selectionManager.focusedKey) != null && t.selectionManager.setFocusedKey(null), !e && o.current && (t == null || t.close()), o.current = e;
|
|
733
733
|
}, [
|
|
734
734
|
e,
|
|
735
735
|
t
|
|
736
736
|
]), null;
|
|
737
|
-
},
|
|
738
|
-
const o =
|
|
737
|
+
}, At = ({ readOnly: e, disabled: t } = {}) => {
|
|
738
|
+
const o = Ie(Ke);
|
|
739
739
|
return _(() => {
|
|
740
740
|
!o || o.isOpen || e || t || o.open(null, "manual");
|
|
741
741
|
}, [
|
|
@@ -743,8 +743,8 @@ const Un = ({ isOpen: e }) => {
|
|
|
743
743
|
e,
|
|
744
744
|
t
|
|
745
745
|
]);
|
|
746
|
-
},
|
|
747
|
-
const [l, i] = Ee(null), a =
|
|
746
|
+
}, $n = (e, t) => e.find((o) => o.label.toLocaleLowerCase() === t.toLocaleLowerCase().trim()), Pt = ({ options: e, value: t, commit: o, clear: r, onBlur: s }) => {
|
|
747
|
+
const [l, i] = Ee(null), a = cn(s), d = w(() => {
|
|
748
748
|
var p;
|
|
749
749
|
return t ? ((p = e.find((E) => E.value === t)) == null ? void 0 : p.label) ?? "" : "";
|
|
750
750
|
}, [
|
|
@@ -758,7 +758,7 @@ const Un = ({ isOpen: e }) => {
|
|
|
758
758
|
]), u = _((p) => {
|
|
759
759
|
if (i(p), p === "")
|
|
760
760
|
return;
|
|
761
|
-
const E =
|
|
761
|
+
const E = $n(e, p);
|
|
762
762
|
E && E.value !== t && o(E.value);
|
|
763
763
|
}, [
|
|
764
764
|
o,
|
|
@@ -787,9 +787,9 @@ const Un = ({ isOpen: e }) => {
|
|
|
787
787
|
onInputKeyDown: y
|
|
788
788
|
};
|
|
789
789
|
}, Y = ({ children: e, ...t }) => {
|
|
790
|
-
const { isForcedOpen: o = !1 } = t, { id: r, value: s, onChange: l, disabled: i, readOnly: a, required: d, hasError: m, onBlur: u, onFocus: y, FieldLayout: I, options: p } = P(), { labelId: E } = M(), { t: f } =
|
|
790
|
+
const { isForcedOpen: o = !1 } = t, { id: r, value: s, onChange: l, disabled: i, readOnly: a, required: d, hasError: m, onBlur: u, onFocus: y, FieldLayout: I, options: p } = P(), { labelId: E } = M(), { t: f } = Te(), { language: N } = Nt(), F = w(() => (p || []).reduce((A, S) => (S.value && ge.hasOwnProperty(S.value) && A.push({
|
|
791
791
|
value: S.value,
|
|
792
|
-
label: f(`locale-dataset.countries.${
|
|
792
|
+
label: f(`locale-dataset.countries.${ge[S.value].toUpperCase()}`)
|
|
793
793
|
}), A), []).sort((A, S) => A.label.localeCompare(S.label, N)), [
|
|
794
794
|
p,
|
|
795
795
|
f,
|
|
@@ -798,21 +798,21 @@ const Un = ({ isOpen: e }) => {
|
|
|
798
798
|
l
|
|
799
799
|
]), g = _(() => D(""), [
|
|
800
800
|
D
|
|
801
|
-
]), { onInputKeyDown: R, ...
|
|
801
|
+
]), { onInputKeyDown: R, ...q } = Pt({
|
|
802
802
|
options: F,
|
|
803
803
|
value: s,
|
|
804
804
|
commit: D,
|
|
805
805
|
clear: g,
|
|
806
806
|
onBlur: u
|
|
807
|
-
}), T = me("country"), O = b(e, Y.Label), h = b(e, Y.Control), j = b(e, Y.Options),
|
|
807
|
+
}), T = me("country"), O = b(e, Y.Label), h = b(e, Y.Control), j = b(e, Y.Options), ye = b(e, Y.Description), V = b(e, Y.Error);
|
|
808
808
|
return /* @__PURE__ */ n.createElement(I, {
|
|
809
809
|
fieldId: r,
|
|
810
810
|
renderLabel: () => v(O, {
|
|
811
811
|
label: T
|
|
812
812
|
}),
|
|
813
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
813
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Fe, {
|
|
814
814
|
"aria-labelledby": E,
|
|
815
|
-
...
|
|
815
|
+
...q,
|
|
816
816
|
isDisabled: i,
|
|
817
817
|
isReadOnly: a,
|
|
818
818
|
isRequired: d,
|
|
@@ -824,22 +824,22 @@ const Un = ({ isOpen: e }) => {
|
|
|
824
824
|
}), v(j, {
|
|
825
825
|
options: F,
|
|
826
826
|
isForcedOpen: o
|
|
827
|
-
}), /* @__PURE__ */ n.createElement(
|
|
827
|
+
}), /* @__PURE__ */ n.createElement(Vn, {
|
|
828
828
|
isOpen: o
|
|
829
829
|
})),
|
|
830
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, V,
|
|
830
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, V, ye)
|
|
831
831
|
});
|
|
832
|
-
},
|
|
833
|
-
const { disabled: r, hasError: s } = P(), { onKeyDown: l } = o, i = b(e,
|
|
834
|
-
return /* @__PURE__ */ n.createElement(
|
|
832
|
+
}, ve = ({ children: e, className: t, ...o }) => {
|
|
833
|
+
const { disabled: r, hasError: s } = P(), { onKeyDown: l } = o, i = b(e, ve.Input), a = b(e, ve.Trigger);
|
|
834
|
+
return /* @__PURE__ */ n.createElement(gt, {
|
|
835
835
|
className: t,
|
|
836
836
|
isDisabled: r,
|
|
837
837
|
isInvalid: s
|
|
838
838
|
}, v(i, {
|
|
839
839
|
onKeyDown: l
|
|
840
840
|
}), a);
|
|
841
|
-
},
|
|
842
|
-
const { id: o, placeholder: r, readOnly: s, disabled: l } = P(), { inputId: i, ariaDescribedBy: a } = M(), { onKeyDown: d } = t, m = x(null), u =
|
|
841
|
+
}, Wn = ({ className: e, ...t }) => {
|
|
842
|
+
const { id: o, placeholder: r, readOnly: s, disabled: l } = P(), { inputId: i, ariaDescribedBy: a } = M(), { onKeyDown: d } = t, m = x(null), u = At({
|
|
843
843
|
readOnly: s,
|
|
844
844
|
disabled: l
|
|
845
845
|
});
|
|
@@ -858,52 +858,52 @@ const Un = ({ isOpen: e }) => {
|
|
|
858
858
|
onClick: u,
|
|
859
859
|
onKeyDown: d
|
|
860
860
|
});
|
|
861
|
-
},
|
|
861
|
+
}, Kn = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(vt, {
|
|
862
862
|
className: t
|
|
863
863
|
}, e);
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
const
|
|
867
|
-
const { options: r, isForcedOpen: s } = o, l = b(e,
|
|
868
|
-
return /* @__PURE__ */ n.createElement(
|
|
864
|
+
ve.Input = Wn;
|
|
865
|
+
ve.Trigger = Kn;
|
|
866
|
+
const Je = ({ children: e, className: t, ...o }) => {
|
|
867
|
+
const { options: r, isForcedOpen: s } = o, l = b(e, Je.Option);
|
|
868
|
+
return /* @__PURE__ */ n.createElement(De, {
|
|
869
869
|
className: t,
|
|
870
870
|
containerPadding: 0,
|
|
871
871
|
offset: 0
|
|
872
|
-
}, /* @__PURE__ */ n.createElement(
|
|
872
|
+
}, /* @__PURE__ */ n.createElement(an, {
|
|
873
873
|
isForcedOpen: s
|
|
874
874
|
}, r.map((i) => v(l, {
|
|
875
875
|
key: i.value,
|
|
876
876
|
value: i.value,
|
|
877
877
|
label: i.label
|
|
878
878
|
}))));
|
|
879
|
-
},
|
|
879
|
+
}, Yn = ({ className: e, ...t }) => {
|
|
880
880
|
const { value: o, label: r } = t;
|
|
881
|
-
return /* @__PURE__ */ n.createElement(
|
|
881
|
+
return /* @__PURE__ */ n.createElement(he, {
|
|
882
882
|
className: e,
|
|
883
883
|
id: o,
|
|
884
884
|
textValue: r
|
|
885
885
|
}, r);
|
|
886
886
|
};
|
|
887
|
-
|
|
887
|
+
Je.Option = Yn;
|
|
888
888
|
Y.Label = de;
|
|
889
|
-
Y.Control =
|
|
890
|
-
Y.Options =
|
|
889
|
+
Y.Control = ve;
|
|
890
|
+
Y.Options = Je;
|
|
891
891
|
Y.Description = ie;
|
|
892
892
|
Y.Error = ce;
|
|
893
|
-
const
|
|
894
|
-
function
|
|
893
|
+
const Hn = /(\d{7})|(\d{3}-\d{4})/;
|
|
894
|
+
function jn(e) {
|
|
895
895
|
var t;
|
|
896
|
-
return (t = e.match(
|
|
896
|
+
return (t = e.match(Hn)) == null ? void 0 : t[0];
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Jn({ isAutocompleteEnabled: e }) {
|
|
899
899
|
const t = x({
|
|
900
900
|
hasAddress: !1
|
|
901
|
-
}), o =
|
|
901
|
+
}), o = Ye({
|
|
902
902
|
enabled: e
|
|
903
903
|
});
|
|
904
904
|
return {
|
|
905
905
|
searchByPostalCode: _(async (s) => {
|
|
906
|
-
const l =
|
|
906
|
+
const l = jn(s);
|
|
907
907
|
if (l) {
|
|
908
908
|
if (t.current.postalCode === l && t.current.hasAddress)
|
|
909
909
|
return t.current.address;
|
|
@@ -928,13 +928,13 @@ function jn({ isAutocompleteEnabled: e }) {
|
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
930
|
const k = ({ children: e }) => {
|
|
931
|
-
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = M(), p =
|
|
931
|
+
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = M(), p = Ne(), { autocompleteEnabled: E } = Le(), f = !!(p && ge[p] === ge.JP), N = (y || E) && f, F = me("zipCode"), D = b(e, k.Label), g = b(e, k.Control), R = b(e, k.Options), q = b(e, k.Description), T = b(e, k.Error);
|
|
932
932
|
return N ? /* @__PURE__ */ n.createElement(u, {
|
|
933
933
|
fieldId: t,
|
|
934
934
|
renderLabel: () => v(D, {
|
|
935
935
|
label: F
|
|
936
936
|
}),
|
|
937
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
937
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Xn, {
|
|
938
938
|
value: o,
|
|
939
939
|
onChange: r,
|
|
940
940
|
disabled: s,
|
|
@@ -944,13 +944,13 @@ const k = ({ children: e }) => {
|
|
|
944
944
|
onBlur: d,
|
|
945
945
|
onFocus: m
|
|
946
946
|
}, g, R),
|
|
947
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, T,
|
|
947
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, T, q)
|
|
948
948
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
949
949
|
fieldId: t,
|
|
950
950
|
renderLabel: () => v(D, {
|
|
951
951
|
label: F
|
|
952
952
|
}),
|
|
953
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
953
|
+
renderInput: () => /* @__PURE__ */ n.createElement(fe, {
|
|
954
954
|
"aria-labelledby": I,
|
|
955
955
|
value: o ?? "",
|
|
956
956
|
onChange: r,
|
|
@@ -961,12 +961,12 @@ const k = ({ children: e }) => {
|
|
|
961
961
|
onBlur: d,
|
|
962
962
|
onFocus: m
|
|
963
963
|
}, g),
|
|
964
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, T,
|
|
964
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, T, q)
|
|
965
965
|
});
|
|
966
|
-
},
|
|
967
|
-
const { labelId: m } = M(), { onAddressSelect: u } =
|
|
966
|
+
}, Xn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: s, required: l, hasError: i, onBlur: a, onFocus: d }) => {
|
|
967
|
+
const { labelId: m } = M(), { onAddressSelect: u } = Le(), [y, I] = Ee(!1), { searchByPostalCode: p } = Jn({
|
|
968
968
|
isAutocompleteEnabled: y
|
|
969
|
-
}), [E, f] = Ee(), N =
|
|
969
|
+
}), [E, f] = Ee(), N = w(() => E ? [
|
|
970
970
|
{
|
|
971
971
|
id: W(),
|
|
972
972
|
label: E.formattedAddress || ""
|
|
@@ -993,8 +993,8 @@ const k = ({ children: e }) => {
|
|
|
993
993
|
I(!0), d == null || d();
|
|
994
994
|
}, [
|
|
995
995
|
d
|
|
996
|
-
]),
|
|
997
|
-
return /* @__PURE__ */ n.createElement(
|
|
996
|
+
]), q = b(e, k.Control), T = b(e, k.Options);
|
|
997
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
998
998
|
"aria-labelledby": m,
|
|
999
999
|
inputValue: t ?? "",
|
|
1000
1000
|
onInputChange: F,
|
|
@@ -1009,15 +1009,15 @@ const k = ({ children: e }) => {
|
|
|
1009
1009
|
allowsCustomValue: !0,
|
|
1010
1010
|
menuTrigger: "input",
|
|
1011
1011
|
items: N
|
|
1012
|
-
}, v(
|
|
1012
|
+
}, v(q, {
|
|
1013
1013
|
onFocus: R
|
|
1014
1014
|
}), v(T, {
|
|
1015
1015
|
options: N
|
|
1016
|
-
}), /* @__PURE__ */ n.createElement(
|
|
1016
|
+
}), /* @__PURE__ */ n.createElement(He, {
|
|
1017
1017
|
optionCount: N.length
|
|
1018
1018
|
}));
|
|
1019
|
-
},
|
|
1020
|
-
const { disabled: r, hasError: s } = P(), { onFocus: l } = o, i =
|
|
1019
|
+
}, Xe = ({ children: e, className: t, ...o }) => {
|
|
1020
|
+
const { disabled: r, hasError: s } = P(), { onFocus: l } = o, i = Ne(), a = b(e, Xe.Input);
|
|
1021
1021
|
return /* @__PURE__ */ n.createElement("div", {
|
|
1022
1022
|
className: t,
|
|
1023
1023
|
"data-country": i || void 0,
|
|
@@ -1026,14 +1026,14 @@ const k = ({ children: e }) => {
|
|
|
1026
1026
|
}, v(a, {
|
|
1027
1027
|
onFocus: l
|
|
1028
1028
|
}));
|
|
1029
|
-
},
|
|
1029
|
+
}, zn = ({ className: e, ...t }) => {
|
|
1030
1030
|
const { id: o, placeholder: r } = P(), { inputId: s, ariaDescribedBy: l } = M(), { onFocus: i } = t, a = x(null);
|
|
1031
1031
|
return ae(() => {
|
|
1032
1032
|
var d;
|
|
1033
1033
|
(d = a.current) == null || d.focus({
|
|
1034
1034
|
preventScroll: !0
|
|
1035
1035
|
});
|
|
1036
|
-
}, o), /* @__PURE__ */ n.createElement(le, {
|
|
1036
|
+
}, o), be(a), /* @__PURE__ */ n.createElement(le, {
|
|
1037
1037
|
ref: a,
|
|
1038
1038
|
id: s,
|
|
1039
1039
|
autoComplete: "postal-code",
|
|
@@ -1042,13 +1042,13 @@ const k = ({ children: e }) => {
|
|
|
1042
1042
|
placeholder: r,
|
|
1043
1043
|
onFocus: i
|
|
1044
1044
|
});
|
|
1045
|
-
},
|
|
1046
|
-
const o = b(e,
|
|
1047
|
-
return /* @__PURE__ */ n.createElement(
|
|
1045
|
+
}, ze = ({ children: e, className: t }) => {
|
|
1046
|
+
const o = b(e, ze.Option);
|
|
1047
|
+
return /* @__PURE__ */ n.createElement(De, {
|
|
1048
1048
|
className: t,
|
|
1049
1049
|
containerPadding: 0,
|
|
1050
1050
|
offset: 0
|
|
1051
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1051
|
+
}, /* @__PURE__ */ n.createElement(Me, {
|
|
1052
1052
|
renderEmptyState: () => null
|
|
1053
1053
|
}, (r) => v(o, {
|
|
1054
1054
|
id: r.id,
|
|
@@ -1056,27 +1056,27 @@ const k = ({ children: e }) => {
|
|
|
1056
1056
|
})));
|
|
1057
1057
|
}, Gn = ({ className: e, ...t }) => {
|
|
1058
1058
|
const { id: o, label: r } = t;
|
|
1059
|
-
return /* @__PURE__ */ n.createElement(
|
|
1059
|
+
return /* @__PURE__ */ n.createElement(he, {
|
|
1060
1060
|
className: e,
|
|
1061
1061
|
id: o,
|
|
1062
1062
|
textValue: r
|
|
1063
1063
|
}, r);
|
|
1064
1064
|
};
|
|
1065
|
-
|
|
1066
|
-
|
|
1065
|
+
ze.Option = Gn;
|
|
1066
|
+
Xe.Input = zn;
|
|
1067
1067
|
k.Label = de;
|
|
1068
|
-
k.Control =
|
|
1069
|
-
k.Options =
|
|
1068
|
+
k.Control = Xe;
|
|
1069
|
+
k.Options = ze;
|
|
1070
1070
|
k.Description = ie;
|
|
1071
1071
|
k.Error = ce;
|
|
1072
1072
|
const U = ({ children: e }) => {
|
|
1073
|
-
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = M(), { autocompleteEnabled: p } =
|
|
1073
|
+
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = M(), { autocompleteEnabled: p } = Le(), E = y || p, f = me("streetName"), N = b(e, U.Label), F = b(e, U.Input), D = b(e, U.Options), g = b(e, U.Description), R = b(e, U.Error);
|
|
1074
1074
|
return E ? /* @__PURE__ */ n.createElement(u, {
|
|
1075
1075
|
fieldId: t,
|
|
1076
1076
|
renderLabel: () => v(N, {
|
|
1077
1077
|
label: f
|
|
1078
1078
|
}),
|
|
1079
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
1079
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Qn, {
|
|
1080
1080
|
value: o,
|
|
1081
1081
|
onChange: r,
|
|
1082
1082
|
disabled: s,
|
|
@@ -1092,7 +1092,7 @@ const U = ({ children: e }) => {
|
|
|
1092
1092
|
renderLabel: () => v(N, {
|
|
1093
1093
|
label: f
|
|
1094
1094
|
}),
|
|
1095
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
1095
|
+
renderInput: () => /* @__PURE__ */ n.createElement(fe, {
|
|
1096
1096
|
"aria-labelledby": I,
|
|
1097
1097
|
value: o ?? "",
|
|
1098
1098
|
onChange: r,
|
|
@@ -1105,12 +1105,12 @@ const U = ({ children: e }) => {
|
|
|
1105
1105
|
}, F),
|
|
1106
1106
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
1107
1107
|
});
|
|
1108
|
-
},
|
|
1109
|
-
const { labelId: m } = M(), { onAddressSelect: u } =
|
|
1108
|
+
}, Qn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: s, required: l, hasError: i, onBlur: a, onFocus: d }) => {
|
|
1109
|
+
const { labelId: m } = M(), { onAddressSelect: u } = Le(), y = Ne(), I = Ye({
|
|
1110
1110
|
enabled: !0
|
|
1111
|
-
}), { predictions: p, updatePredictions: E, clearPredictions: f } =
|
|
1111
|
+
}), { predictions: p, updatePredictions: E, clearPredictions: f } = Rt({
|
|
1112
1112
|
atlas: I
|
|
1113
|
-
}), N = b(e, U.Input), F = b(e, U.Options), D =
|
|
1113
|
+
}), N = b(e, U.Input), F = b(e, U.Options), D = w(() => p.reduce((O, h) => (h.searchId && h.description && O.push({
|
|
1114
1114
|
id: h.searchId,
|
|
1115
1115
|
label: h.description
|
|
1116
1116
|
}), O), []), [
|
|
@@ -1137,7 +1137,7 @@ const U = ({ children: e }) => {
|
|
|
1137
1137
|
u,
|
|
1138
1138
|
f,
|
|
1139
1139
|
I
|
|
1140
|
-
]),
|
|
1140
|
+
]), q = _(() => {
|
|
1141
1141
|
f(), a == null || a();
|
|
1142
1142
|
}, [
|
|
1143
1143
|
a,
|
|
@@ -1147,7 +1147,7 @@ const U = ({ children: e }) => {
|
|
|
1147
1147
|
}, [
|
|
1148
1148
|
d
|
|
1149
1149
|
]);
|
|
1150
|
-
return /* @__PURE__ */ n.createElement(
|
|
1150
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
1151
1151
|
"aria-labelledby": m,
|
|
1152
1152
|
inputValue: t ?? "",
|
|
1153
1153
|
onInputChange: g,
|
|
@@ -1157,7 +1157,7 @@ const U = ({ children: e }) => {
|
|
|
1157
1157
|
isReadOnly: s,
|
|
1158
1158
|
isRequired: l,
|
|
1159
1159
|
isInvalid: i,
|
|
1160
|
-
onBlur:
|
|
1160
|
+
onBlur: q,
|
|
1161
1161
|
onFocus: T,
|
|
1162
1162
|
allowsCustomValue: !0,
|
|
1163
1163
|
menuTrigger: "input",
|
|
@@ -1166,17 +1166,17 @@ const U = ({ children: e }) => {
|
|
|
1166
1166
|
onFocus: T
|
|
1167
1167
|
}), v(F, {
|
|
1168
1168
|
options: D
|
|
1169
|
-
}), /* @__PURE__ */ n.createElement(
|
|
1169
|
+
}), /* @__PURE__ */ n.createElement(He, {
|
|
1170
1170
|
optionCount: D.length
|
|
1171
1171
|
}));
|
|
1172
|
-
},
|
|
1172
|
+
}, Zn = ({ className: e, ...t }) => {
|
|
1173
1173
|
const { id: o, placeholder: r } = P(), { inputId: s, ariaDescribedBy: l } = M(), { onFocus: i } = t, a = x(null);
|
|
1174
1174
|
return ae(() => {
|
|
1175
1175
|
var d;
|
|
1176
1176
|
(d = a.current) == null || d.focus({
|
|
1177
1177
|
preventScroll: !0
|
|
1178
1178
|
});
|
|
1179
|
-
}, o), /* @__PURE__ */ n.createElement(le, {
|
|
1179
|
+
}, o), be(a), /* @__PURE__ */ n.createElement(le, {
|
|
1180
1180
|
ref: a,
|
|
1181
1181
|
id: s,
|
|
1182
1182
|
autoComplete: "address-line1",
|
|
@@ -1187,27 +1187,27 @@ const U = ({ children: e }) => {
|
|
|
1187
1187
|
});
|
|
1188
1188
|
}, Ge = ({ children: e, className: t }) => {
|
|
1189
1189
|
const o = b(e, Ge.Option);
|
|
1190
|
-
return /* @__PURE__ */ n.createElement(
|
|
1190
|
+
return /* @__PURE__ */ n.createElement(De, {
|
|
1191
1191
|
className: t,
|
|
1192
1192
|
containerPadding: 0,
|
|
1193
1193
|
offset: 0
|
|
1194
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1194
|
+
}, /* @__PURE__ */ n.createElement(Me, {
|
|
1195
1195
|
renderEmptyState: () => null
|
|
1196
1196
|
}, (r) => v(o, {
|
|
1197
1197
|
id: r.id,
|
|
1198
1198
|
label: r.label
|
|
1199
1199
|
})));
|
|
1200
|
-
},
|
|
1200
|
+
}, er = ({ className: e, ...t }) => {
|
|
1201
1201
|
const { id: o, label: r } = t;
|
|
1202
|
-
return /* @__PURE__ */ n.createElement(
|
|
1202
|
+
return /* @__PURE__ */ n.createElement(he, {
|
|
1203
1203
|
className: e,
|
|
1204
1204
|
id: o,
|
|
1205
1205
|
textValue: r
|
|
1206
1206
|
}, r);
|
|
1207
1207
|
};
|
|
1208
|
-
Ge.Option =
|
|
1208
|
+
Ge.Option = er;
|
|
1209
1209
|
U.Label = de;
|
|
1210
|
-
U.Input =
|
|
1210
|
+
U.Input = Zn;
|
|
1211
1211
|
U.Options = Ge;
|
|
1212
1212
|
U.Description = ie;
|
|
1213
1213
|
U.Error = ce;
|
|
@@ -1218,7 +1218,7 @@ const se = ({ children: e }) => {
|
|
|
1218
1218
|
renderLabel: () => v(p, {
|
|
1219
1219
|
label: I
|
|
1220
1220
|
}),
|
|
1221
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
1221
|
+
renderInput: () => /* @__PURE__ */ n.createElement(fe, {
|
|
1222
1222
|
"aria-labelledby": y,
|
|
1223
1223
|
value: o ?? "",
|
|
1224
1224
|
onChange: r,
|
|
@@ -1231,14 +1231,14 @@ const se = ({ children: e }) => {
|
|
|
1231
1231
|
}, E),
|
|
1232
1232
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
1233
1233
|
});
|
|
1234
|
-
},
|
|
1234
|
+
}, tr = ({ className: e }) => {
|
|
1235
1235
|
const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
|
|
1236
1236
|
return ae(() => {
|
|
1237
1237
|
var i;
|
|
1238
1238
|
(i = l.current) == null || i.focus({
|
|
1239
1239
|
preventScroll: !0
|
|
1240
1240
|
});
|
|
1241
|
-
}, t), /* @__PURE__ */ n.createElement(le, {
|
|
1241
|
+
}, t), be(l), /* @__PURE__ */ n.createElement(le, {
|
|
1242
1242
|
ref: l,
|
|
1243
1243
|
id: r,
|
|
1244
1244
|
"aria-describedby": s,
|
|
@@ -1247,13 +1247,13 @@ const se = ({ children: e }) => {
|
|
|
1247
1247
|
});
|
|
1248
1248
|
};
|
|
1249
1249
|
se.Label = de;
|
|
1250
|
-
se.Input =
|
|
1250
|
+
se.Input = tr;
|
|
1251
1251
|
se.Description = ie;
|
|
1252
1252
|
se.Error = ce;
|
|
1253
1253
|
const H = ({ children: e }) => {
|
|
1254
|
-
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = M(), { t: I } =
|
|
1254
|
+
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = M(), { t: I } = Te(), p = Ne(), E = p ? ge[p] : void 0, f = p && Ut.getCountryByShortKey(p), N = w(() => {
|
|
1255
1255
|
var V;
|
|
1256
|
-
return (
|
|
1256
|
+
return (Vt(((V = f == null ? void 0 : f.subdivisions) == null ? void 0 : V.list) || [], E) || []).map((A) => ({
|
|
1257
1257
|
value: A.key,
|
|
1258
1258
|
label: I(A.displayName)
|
|
1259
1259
|
})).sort((A, S) => A.label.localeCompare(S.label));
|
|
@@ -1263,19 +1263,19 @@ const H = ({ children: e }) => {
|
|
|
1263
1263
|
f
|
|
1264
1264
|
]), F = _(() => r(""), [
|
|
1265
1265
|
r
|
|
1266
|
-
]), { onInputKeyDown: D, ...g } =
|
|
1266
|
+
]), { onInputKeyDown: D, ...g } = Pt({
|
|
1267
1267
|
options: N,
|
|
1268
1268
|
value: o,
|
|
1269
1269
|
commit: r,
|
|
1270
1270
|
clear: F,
|
|
1271
1271
|
onBlur: d
|
|
1272
|
-
}), R = me("subdivision"),
|
|
1272
|
+
}), R = me("subdivision"), q = b(e, H.Label), T = b(e, H.Control), O = b(e, H.Options), h = b(e, H.Description), j = b(e, H.Error);
|
|
1273
1273
|
return /* @__PURE__ */ n.createElement(u, {
|
|
1274
1274
|
fieldId: t,
|
|
1275
|
-
renderLabel: () => v(
|
|
1275
|
+
renderLabel: () => v(q, {
|
|
1276
1276
|
label: R
|
|
1277
1277
|
}),
|
|
1278
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
1278
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Fe, {
|
|
1279
1279
|
"aria-labelledby": y,
|
|
1280
1280
|
...g,
|
|
1281
1281
|
isDisabled: s,
|
|
@@ -1291,17 +1291,17 @@ const H = ({ children: e }) => {
|
|
|
1291
1291
|
})),
|
|
1292
1292
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, j, h)
|
|
1293
1293
|
});
|
|
1294
|
-
},
|
|
1295
|
-
const { disabled: r, hasError: s } = P(), { onKeyDown: l } = o, i = b(e,
|
|
1296
|
-
return /* @__PURE__ */ n.createElement(
|
|
1294
|
+
}, Se = ({ children: e, className: t, ...o }) => {
|
|
1295
|
+
const { disabled: r, hasError: s } = P(), { onKeyDown: l } = o, i = b(e, Se.Input), a = b(e, Se.Trigger);
|
|
1296
|
+
return /* @__PURE__ */ n.createElement(gt, {
|
|
1297
1297
|
className: t,
|
|
1298
1298
|
isDisabled: r,
|
|
1299
1299
|
isInvalid: s
|
|
1300
1300
|
}, v(i, {
|
|
1301
1301
|
onKeyDown: l
|
|
1302
1302
|
}), a);
|
|
1303
|
-
},
|
|
1304
|
-
const { id: o, placeholder: r, readOnly: s, disabled: l } = P(), { inputId: i, ariaDescribedBy: a } = M(), { onKeyDown: d } = t, m = x(null), u =
|
|
1303
|
+
}, nr = ({ className: e, ...t }) => {
|
|
1304
|
+
const { id: o, placeholder: r, readOnly: s, disabled: l } = P(), { inputId: i, ariaDescribedBy: a } = M(), { onKeyDown: d } = t, m = x(null), u = At({
|
|
1305
1305
|
readOnly: s,
|
|
1306
1306
|
disabled: l
|
|
1307
1307
|
});
|
|
@@ -1320,63 +1320,63 @@ const H = ({ children: e }) => {
|
|
|
1320
1320
|
onClick: u,
|
|
1321
1321
|
onKeyDown: d
|
|
1322
1322
|
});
|
|
1323
|
-
},
|
|
1323
|
+
}, rr = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(vt, {
|
|
1324
1324
|
className: t
|
|
1325
1325
|
}, e);
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
const
|
|
1329
|
-
const { options: r } = o, s = b(e,
|
|
1330
|
-
return /* @__PURE__ */ n.createElement(
|
|
1326
|
+
Se.Input = nr;
|
|
1327
|
+
Se.Trigger = rr;
|
|
1328
|
+
const Qe = ({ children: e, className: t, ...o }) => {
|
|
1329
|
+
const { options: r } = o, s = b(e, Qe.Option);
|
|
1330
|
+
return /* @__PURE__ */ n.createElement(De, {
|
|
1331
1331
|
className: t,
|
|
1332
1332
|
containerPadding: 0,
|
|
1333
1333
|
offset: 0
|
|
1334
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1334
|
+
}, /* @__PURE__ */ n.createElement(Me, null, r.map((l) => v(s, {
|
|
1335
1335
|
key: l.value,
|
|
1336
1336
|
value: l.value,
|
|
1337
1337
|
label: l.label
|
|
1338
1338
|
}))));
|
|
1339
|
-
},
|
|
1339
|
+
}, or = ({ className: e, ...t }) => {
|
|
1340
1340
|
const { value: o, label: r } = t;
|
|
1341
|
-
return /* @__PURE__ */ n.createElement(
|
|
1341
|
+
return /* @__PURE__ */ n.createElement(he, {
|
|
1342
1342
|
className: e,
|
|
1343
1343
|
id: o,
|
|
1344
1344
|
textValue: r
|
|
1345
1345
|
}, r);
|
|
1346
1346
|
};
|
|
1347
|
-
|
|
1347
|
+
Qe.Option = or;
|
|
1348
1348
|
H.Label = de;
|
|
1349
|
-
H.Control =
|
|
1350
|
-
H.Options =
|
|
1349
|
+
H.Control = Se;
|
|
1350
|
+
H.Options = Qe;
|
|
1351
1351
|
H.Description = ie;
|
|
1352
1352
|
H.Error = ce;
|
|
1353
|
-
const
|
|
1354
|
-
[K.MLA_COUNTRY]:
|
|
1355
|
-
[K.MLA_SUBDIVISION]:
|
|
1356
|
-
[K.MLA_CITY]:
|
|
1357
|
-
[K.MLA_ADDRESS_LINE]:
|
|
1358
|
-
[K.MLA_ADDRESS_LINE_2]:
|
|
1359
|
-
[K.MLA_POSTAL_CODE]:
|
|
1360
|
-
[K.MLA_STREET_NAME]:
|
|
1361
|
-
[K.MLA_STREET_NUMBER]:
|
|
1362
|
-
[K.MLA_APARTMENT]:
|
|
1363
|
-
},
|
|
1364
|
-
const { id: o, form: r, value: s, onChange: l, onFieldBlur: i, onFieldFocus: a, errors: d, FieldLayout: m, fieldSettings: u, label: y, validation: I, target: p, autocompleteEnabled: E, required: f, fieldType: N } = P(), [F, D] = Ee(null), g =
|
|
1353
|
+
const sr = () => ue("country"), ar = () => ue("subdivision"), lr = () => ue("city"), ir = () => ue("addressLine"), cr = () => ue("addressLine2"), dr = () => ue("postalCode"), ur = () => ue("streetName"), mr = () => ue("streetNumber"), pr = () => ue("apartment"), Er = {
|
|
1354
|
+
[K.MLA_COUNTRY]: sr,
|
|
1355
|
+
[K.MLA_SUBDIVISION]: ar,
|
|
1356
|
+
[K.MLA_CITY]: lr,
|
|
1357
|
+
[K.MLA_ADDRESS_LINE]: ir,
|
|
1358
|
+
[K.MLA_ADDRESS_LINE_2]: cr,
|
|
1359
|
+
[K.MLA_POSTAL_CODE]: dr,
|
|
1360
|
+
[K.MLA_STREET_NAME]: ur,
|
|
1361
|
+
[K.MLA_STREET_NUMBER]: mr,
|
|
1362
|
+
[K.MLA_APARTMENT]: pr
|
|
1363
|
+
}, br = {}, fr = [], c = ({ children: e, className: t }) => {
|
|
1364
|
+
const { id: o, form: r, value: s, onChange: l, onFieldBlur: i, onFieldFocus: a, errors: d, FieldLayout: m, fieldSettings: u, label: y, validation: I, target: p, autocompleteEnabled: E, required: f, fieldType: N } = P(), [F, D] = Ee(null), g = $t(), R = w(() => ({
|
|
1365
1365
|
...g,
|
|
1366
|
-
...
|
|
1366
|
+
...Er
|
|
1367
1367
|
}), [
|
|
1368
1368
|
g
|
|
1369
|
-
]), { isExperimentEnabled:
|
|
1369
|
+
]), { isExperimentEnabled: q } = It(), T = q(Lt.STREETLESS_LOCALITY_FALLBACK), { validateFields: O } = Wt(), h = Kt(), j = Ot(), ye = w(() => ({
|
|
1370
1370
|
...j,
|
|
1371
1371
|
actions: {
|
|
1372
|
-
predict:
|
|
1373
|
-
getPlace:
|
|
1374
|
-
searchByPostalCode:
|
|
1372
|
+
predict: jt,
|
|
1373
|
+
getPlace: Ht,
|
|
1374
|
+
searchByPostalCode: Yt,
|
|
1375
1375
|
...j.actions
|
|
1376
1376
|
}
|
|
1377
1377
|
}), [
|
|
1378
1378
|
j
|
|
1379
|
-
]), { form: V, isMultilineAddressField: A } =
|
|
1379
|
+
]), { form: V, isMultilineAddressField: A } = gn({
|
|
1380
1380
|
id: o,
|
|
1381
1381
|
target: p,
|
|
1382
1382
|
fieldType: N,
|
|
@@ -1388,20 +1388,20 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1388
1388
|
}), S = _(($) => {
|
|
1389
1389
|
if (!s)
|
|
1390
1390
|
return;
|
|
1391
|
-
const X =
|
|
1391
|
+
const X = un($, A, T), Re = {
|
|
1392
1392
|
...X,
|
|
1393
|
-
[
|
|
1393
|
+
[Ce.COUNTRY]: X[Ce.COUNTRY] ?? s[Ce.COUNTRY]
|
|
1394
1394
|
};
|
|
1395
|
-
l == null || l(
|
|
1395
|
+
l == null || l(Re);
|
|
1396
1396
|
}, [
|
|
1397
1397
|
l,
|
|
1398
1398
|
s,
|
|
1399
1399
|
A,
|
|
1400
1400
|
T
|
|
1401
1401
|
]), J = _(($, X) => {
|
|
1402
|
-
if (A && $ ===
|
|
1402
|
+
if (A && $ === Ce.COUNTRY && (s == null ? void 0 : s[$]) !== X) {
|
|
1403
1403
|
l == null || l({
|
|
1404
|
-
[
|
|
1404
|
+
[Ce.COUNTRY]: X
|
|
1405
1405
|
});
|
|
1406
1406
|
return;
|
|
1407
1407
|
}
|
|
@@ -1416,7 +1416,7 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1416
1416
|
]), pe = _(async ($) => O(A ? [
|
|
1417
1417
|
...$,
|
|
1418
1418
|
{
|
|
1419
|
-
path: `${p}/${
|
|
1419
|
+
path: `${p}/${Ce.COUNTRY}`,
|
|
1420
1420
|
value: s == null ? void 0 : s.country
|
|
1421
1421
|
}
|
|
1422
1422
|
] : $), [
|
|
@@ -1425,25 +1425,24 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1425
1425
|
O,
|
|
1426
1426
|
A
|
|
1427
1427
|
]);
|
|
1428
|
-
|
|
1429
|
-
var
|
|
1430
|
-
const $ = d == null ? void 0 : d[0], X = (
|
|
1428
|
+
Jt(o, () => {
|
|
1429
|
+
var Re;
|
|
1430
|
+
const $ = d == null ? void 0 : d[0], X = (Re = V == null ? void 0 : V.fields) == null ? void 0 : Re.find((it) => "target" in it && it.target === ($ == null ? void 0 : $.errorPath));
|
|
1431
1431
|
return X == null ? void 0 : X.id;
|
|
1432
1432
|
});
|
|
1433
|
-
const
|
|
1434
|
-
isForcedOpen:
|
|
1435
|
-
}),
|
|
1436
|
-
country:
|
|
1437
|
-
subdivision:
|
|
1438
|
-
city:
|
|
1439
|
-
addressLine:
|
|
1440
|
-
addressLine2:
|
|
1441
|
-
postalCode:
|
|
1442
|
-
streetName:
|
|
1443
|
-
streetNumber:
|
|
1444
|
-
apartment:
|
|
1433
|
+
const _e = nn(o), Ze = v(b(e, c.Country), {
|
|
1434
|
+
isForcedOpen: _e
|
|
1435
|
+
}), et = b(e, c.Subdivision), tt = b(e, c.City), nt = b(e, c.AddressLine), rt = b(e, c.AddressLine2), ot = b(e, c.PostalCode), st = b(e, c.StreetName), at = b(e, c.StreetNumber), lt = b(e, c.Apartment), Tt = w(() => ({
|
|
1436
|
+
country: Ze,
|
|
1437
|
+
subdivision: et,
|
|
1438
|
+
city: tt,
|
|
1439
|
+
addressLine: nt,
|
|
1440
|
+
addressLine2: rt,
|
|
1441
|
+
postalCode: ot,
|
|
1442
|
+
streetName: st,
|
|
1443
|
+
streetNumber: at,
|
|
1444
|
+
apartment: lt
|
|
1445
1445
|
}), [
|
|
1446
|
-
Qe,
|
|
1447
1446
|
Ze,
|
|
1448
1447
|
et,
|
|
1449
1448
|
tt,
|
|
@@ -1451,40 +1450,41 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1451
1450
|
rt,
|
|
1452
1451
|
ot,
|
|
1453
1452
|
st,
|
|
1454
|
-
at
|
|
1453
|
+
at,
|
|
1454
|
+
lt
|
|
1455
1455
|
]);
|
|
1456
1456
|
return V ? /* @__PURE__ */ n.createElement(m, {
|
|
1457
1457
|
fieldId: o
|
|
1458
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1458
|
+
}, /* @__PURE__ */ n.createElement(pn, {
|
|
1459
1459
|
countryCode: s == null ? void 0 : s.country
|
|
1460
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1460
|
+
}, /* @__PURE__ */ n.createElement(mn, {
|
|
1461
1461
|
autocompleteEnabled: E,
|
|
1462
1462
|
onAddressSelect: S
|
|
1463
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1464
|
-
fields:
|
|
1463
|
+
}, /* @__PURE__ */ n.createElement(vn, {
|
|
1464
|
+
fields: Tt
|
|
1465
1465
|
}, /* @__PURE__ */ n.createElement("div", {
|
|
1466
1466
|
ref: D,
|
|
1467
1467
|
style: {
|
|
1468
1468
|
display: "contents"
|
|
1469
1469
|
}
|
|
1470
|
-
}), /* @__PURE__ */ n.createElement(
|
|
1470
|
+
}), /* @__PURE__ */ n.createElement(Mt, {
|
|
1471
1471
|
getContainer: () => F
|
|
1472
1472
|
}, /* @__PURE__ */ n.createElement("fieldset", {
|
|
1473
1473
|
className: t,
|
|
1474
|
-
style: Zt
|
|
1475
|
-
}, /* @__PURE__ */ n.createElement("legend", {
|
|
1476
1474
|
style: en
|
|
1477
|
-
},
|
|
1475
|
+
}, /* @__PURE__ */ n.createElement("legend", {
|
|
1476
|
+
style: tn
|
|
1477
|
+
}, y), /* @__PURE__ */ n.createElement(Xt, {
|
|
1478
1478
|
formSchema: h,
|
|
1479
1479
|
form: V,
|
|
1480
|
-
values: s ??
|
|
1480
|
+
values: s ?? br,
|
|
1481
1481
|
onFieldChange: J,
|
|
1482
1482
|
onBlur: i,
|
|
1483
1483
|
onFocus: a,
|
|
1484
|
-
errors: d ??
|
|
1484
|
+
errors: d ?? fr,
|
|
1485
1485
|
validateFields: pe,
|
|
1486
1486
|
fields: R,
|
|
1487
|
-
fieldActions:
|
|
1487
|
+
fieldActions: ye
|
|
1488
1488
|
}))))))) : null;
|
|
1489
1489
|
};
|
|
1490
1490
|
c.Country = Y;
|
|
@@ -1496,58 +1496,58 @@ c.PostalCode = k;
|
|
|
1496
1496
|
c.StreetName = U;
|
|
1497
1497
|
c.StreetNumber = se;
|
|
1498
1498
|
c.Apartment = re;
|
|
1499
|
-
const
|
|
1500
|
-
postalCodeControl:
|
|
1501
|
-
comboControl:
|
|
1502
|
-
comboTrigger:
|
|
1503
|
-
},
|
|
1504
|
-
const e =
|
|
1505
|
-
|
|
1506
|
-
]), t =
|
|
1499
|
+
const yr = "_postalCodeControl_1tire_1", Cr = "_comboControl_1tire_5", Ir = "_comboTrigger_1tire_19", Ae = {
|
|
1500
|
+
postalCodeControl: yr,
|
|
1501
|
+
comboControl: Cr,
|
|
1502
|
+
comboTrigger: Ir
|
|
1503
|
+
}, kr = () => {
|
|
1504
|
+
const e = ut(Gt, [
|
|
1505
|
+
Ae.comboControl
|
|
1506
|
+
]), t = ut(Zt, []), o = ln(Qt, qe);
|
|
1507
1507
|
return /* @__PURE__ */ n.createElement(c, {
|
|
1508
|
-
className:
|
|
1508
|
+
className: zt
|
|
1509
1509
|
}, /* @__PURE__ */ n.createElement(c.Country, null, /* @__PURE__ */ n.createElement(c.Country.Label, {
|
|
1510
|
-
className: L(
|
|
1510
|
+
className: L(G, C.label)
|
|
1511
1511
|
}, /* @__PURE__ */ n.createElement(c.Country.Label.Required, {
|
|
1512
1512
|
className: L(Q, C.requiredMark)
|
|
1513
1513
|
})), /* @__PURE__ */ n.createElement(c.Country.Control, {
|
|
1514
1514
|
className: e
|
|
1515
1515
|
}, /* @__PURE__ */ n.createElement(c.Country.Control.Input, {
|
|
1516
|
-
className: L(C.innerInput,
|
|
1516
|
+
className: L(C.innerInput, qe)
|
|
1517
1517
|
}), /* @__PURE__ */ n.createElement(c.Country.Control.Trigger, {
|
|
1518
|
-
className:
|
|
1519
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1518
|
+
className: Ae.comboTrigger
|
|
1519
|
+
}, /* @__PURE__ */ n.createElement(dt, {
|
|
1520
1520
|
className: C.dropdownIcon
|
|
1521
1521
|
}))), /* @__PURE__ */ n.createElement(c.Country.Options, {
|
|
1522
|
-
className: L(
|
|
1522
|
+
className: L(Oe, C.selectPopover, C.dropdownPopover)
|
|
1523
1523
|
}, /* @__PURE__ */ n.createElement(c.Country.Options.Option, {
|
|
1524
1524
|
className: o
|
|
1525
1525
|
})), /* @__PURE__ */ n.createElement(c.Country.Error, {
|
|
1526
1526
|
className: L(Z, C.error)
|
|
1527
1527
|
}, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.Country.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Country.Description, {
|
|
1528
1528
|
className: L(ee, C.description)
|
|
1529
|
-
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(
|
|
1529
|
+
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
|
|
1530
1530
|
content: r,
|
|
1531
1531
|
locale: s
|
|
1532
1532
|
}))), /* @__PURE__ */ n.createElement(c.AddressLine, null, /* @__PURE__ */ n.createElement(c.AddressLine.Label, {
|
|
1533
|
-
className: L(
|
|
1533
|
+
className: L(G, C.label)
|
|
1534
1534
|
}, /* @__PURE__ */ n.createElement(c.AddressLine.Label.Required, {
|
|
1535
1535
|
className: L(Q, C.requiredMark)
|
|
1536
1536
|
})), /* @__PURE__ */ n.createElement(c.AddressLine.Input, {
|
|
1537
1537
|
className: t
|
|
1538
1538
|
}), /* @__PURE__ */ n.createElement(c.AddressLine.Options, {
|
|
1539
|
-
className: L(
|
|
1539
|
+
className: L(Oe, C.selectPopover, C.dropdownPopover)
|
|
1540
1540
|
}, /* @__PURE__ */ n.createElement(c.AddressLine.Options.Option, {
|
|
1541
1541
|
className: o
|
|
1542
1542
|
})), /* @__PURE__ */ n.createElement(c.AddressLine.Error, {
|
|
1543
1543
|
className: L(Z, C.error)
|
|
1544
1544
|
}, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.AddressLine.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine.Description, {
|
|
1545
1545
|
className: L(ee, C.description)
|
|
1546
|
-
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(
|
|
1546
|
+
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
|
|
1547
1547
|
content: r,
|
|
1548
1548
|
locale: s
|
|
1549
1549
|
}))), /* @__PURE__ */ n.createElement(c.AddressLine2, null, /* @__PURE__ */ n.createElement(c.AddressLine2.Label, {
|
|
1550
|
-
className: L(
|
|
1550
|
+
className: L(G, C.label)
|
|
1551
1551
|
}, /* @__PURE__ */ n.createElement(c.AddressLine2.Label.Required, {
|
|
1552
1552
|
className: L(Q, C.requiredMark)
|
|
1553
1553
|
})), /* @__PURE__ */ n.createElement(c.AddressLine2.Input, {
|
|
@@ -1556,11 +1556,11 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
1556
1556
|
className: L(Z, C.error)
|
|
1557
1557
|
}, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.AddressLine2.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine2.Description, {
|
|
1558
1558
|
className: L(ee, C.description)
|
|
1559
|
-
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(
|
|
1559
|
+
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
|
|
1560
1560
|
content: r,
|
|
1561
1561
|
locale: s
|
|
1562
1562
|
}))), /* @__PURE__ */ n.createElement(c.City, null, /* @__PURE__ */ n.createElement(c.City.Label, {
|
|
1563
|
-
className: L(
|
|
1563
|
+
className: L(G, C.label)
|
|
1564
1564
|
}, /* @__PURE__ */ n.createElement(c.City.Label.Required, {
|
|
1565
1565
|
className: L(Q, C.requiredMark)
|
|
1566
1566
|
})), /* @__PURE__ */ n.createElement(c.City.Input, {
|
|
@@ -1569,70 +1569,70 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
1569
1569
|
className: L(Z, C.error)
|
|
1570
1570
|
}, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.City.Error.Text, null)), /* @__PURE__ */ n.createElement(c.City.Description, {
|
|
1571
1571
|
className: L(ee, C.description)
|
|
1572
|
-
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(
|
|
1572
|
+
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
|
|
1573
1573
|
content: r,
|
|
1574
1574
|
locale: s
|
|
1575
1575
|
}))), /* @__PURE__ */ n.createElement(c.PostalCode, null, /* @__PURE__ */ n.createElement(c.PostalCode.Label, {
|
|
1576
|
-
className: L(
|
|
1576
|
+
className: L(G, C.label)
|
|
1577
1577
|
}, /* @__PURE__ */ n.createElement(c.PostalCode.Label.Required, {
|
|
1578
1578
|
className: L(Q, C.requiredMark)
|
|
1579
1579
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Control, {
|
|
1580
|
-
className:
|
|
1580
|
+
className: Ae.postalCodeControl
|
|
1581
1581
|
}, /* @__PURE__ */ n.createElement(c.PostalCode.Control.Input, {
|
|
1582
1582
|
className: t
|
|
1583
1583
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Options, {
|
|
1584
|
-
className: L(
|
|
1584
|
+
className: L(Oe, C.selectPopover, C.dropdownPopover)
|
|
1585
1585
|
}, /* @__PURE__ */ n.createElement(c.PostalCode.Options.Option, {
|
|
1586
1586
|
className: o
|
|
1587
1587
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Error, {
|
|
1588
1588
|
className: L(Z, C.error)
|
|
1589
1589
|
}, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.PostalCode.Error.Text, null)), /* @__PURE__ */ n.createElement(c.PostalCode.Description, {
|
|
1590
1590
|
className: L(ee, C.description)
|
|
1591
|
-
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(
|
|
1591
|
+
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
|
|
1592
1592
|
content: r,
|
|
1593
1593
|
locale: s
|
|
1594
1594
|
}))), /* @__PURE__ */ n.createElement(c.Subdivision, null, /* @__PURE__ */ n.createElement(c.Subdivision.Label, {
|
|
1595
|
-
className: L(
|
|
1595
|
+
className: L(G, C.label)
|
|
1596
1596
|
}, /* @__PURE__ */ n.createElement(c.Subdivision.Label.Required, {
|
|
1597
1597
|
className: L(Q, C.requiredMark)
|
|
1598
1598
|
})), /* @__PURE__ */ n.createElement(c.Subdivision.Control, {
|
|
1599
1599
|
className: e
|
|
1600
1600
|
}, /* @__PURE__ */ n.createElement(c.Subdivision.Control.Input, {
|
|
1601
|
-
className: L(C.innerInput,
|
|
1601
|
+
className: L(C.innerInput, qe)
|
|
1602
1602
|
}), /* @__PURE__ */ n.createElement(c.Subdivision.Control.Trigger, {
|
|
1603
|
-
className:
|
|
1604
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1603
|
+
className: Ae.comboTrigger
|
|
1604
|
+
}, /* @__PURE__ */ n.createElement(dt, {
|
|
1605
1605
|
className: C.dropdownIcon
|
|
1606
1606
|
}))), /* @__PURE__ */ n.createElement(c.Subdivision.Options, {
|
|
1607
|
-
className: L(
|
|
1607
|
+
className: L(Oe, C.selectPopover, C.dropdownPopover)
|
|
1608
1608
|
}, /* @__PURE__ */ n.createElement(c.Subdivision.Options.Option, {
|
|
1609
1609
|
className: o
|
|
1610
1610
|
})), /* @__PURE__ */ n.createElement(c.Subdivision.Error, {
|
|
1611
1611
|
className: L(Z, C.error)
|
|
1612
1612
|
}, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.Subdivision.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Subdivision.Description, {
|
|
1613
1613
|
className: L(ee, C.description)
|
|
1614
|
-
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(
|
|
1614
|
+
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
|
|
1615
1615
|
content: r,
|
|
1616
1616
|
locale: s
|
|
1617
1617
|
}))), /* @__PURE__ */ n.createElement(c.StreetName, null, /* @__PURE__ */ n.createElement(c.StreetName.Label, {
|
|
1618
|
-
className: L(
|
|
1618
|
+
className: L(G, C.label)
|
|
1619
1619
|
}, /* @__PURE__ */ n.createElement(c.StreetName.Label.Required, {
|
|
1620
1620
|
className: L(Q, C.requiredMark)
|
|
1621
1621
|
})), /* @__PURE__ */ n.createElement(c.StreetName.Input, {
|
|
1622
1622
|
className: t
|
|
1623
1623
|
}), /* @__PURE__ */ n.createElement(c.StreetName.Options, {
|
|
1624
|
-
className: L(
|
|
1624
|
+
className: L(Oe, C.selectPopover, C.dropdownPopover)
|
|
1625
1625
|
}, /* @__PURE__ */ n.createElement(c.StreetName.Options.Option, {
|
|
1626
1626
|
className: o
|
|
1627
1627
|
})), /* @__PURE__ */ n.createElement(c.StreetName.Error, {
|
|
1628
1628
|
className: L(Z, C.error)
|
|
1629
1629
|
}, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.StreetName.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetName.Description, {
|
|
1630
1630
|
className: L(ee, C.description)
|
|
1631
|
-
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(
|
|
1631
|
+
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
|
|
1632
1632
|
content: r,
|
|
1633
1633
|
locale: s
|
|
1634
1634
|
}))), /* @__PURE__ */ n.createElement(c.StreetNumber, null, /* @__PURE__ */ n.createElement(c.StreetNumber.Label, {
|
|
1635
|
-
className: L(
|
|
1635
|
+
className: L(G, C.label)
|
|
1636
1636
|
}, /* @__PURE__ */ n.createElement(c.StreetNumber.Label.Required, {
|
|
1637
1637
|
className: L(Q, C.requiredMark)
|
|
1638
1638
|
})), /* @__PURE__ */ n.createElement(c.StreetNumber.Input, {
|
|
@@ -1641,11 +1641,11 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
1641
1641
|
className: L(Z, C.error)
|
|
1642
1642
|
}, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.StreetNumber.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetNumber.Description, {
|
|
1643
1643
|
className: L(ee, C.description)
|
|
1644
|
-
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(
|
|
1644
|
+
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
|
|
1645
1645
|
content: r,
|
|
1646
1646
|
locale: s
|
|
1647
1647
|
}))), /* @__PURE__ */ n.createElement(c.Apartment, null, /* @__PURE__ */ n.createElement(c.Apartment.Label, {
|
|
1648
|
-
className: L(
|
|
1648
|
+
className: L(G, C.label)
|
|
1649
1649
|
}, /* @__PURE__ */ n.createElement(c.Apartment.Label.Required, {
|
|
1650
1650
|
className: L(Q, C.requiredMark)
|
|
1651
1651
|
})), /* @__PURE__ */ n.createElement(c.Apartment.Input, {
|
|
@@ -1654,11 +1654,11 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
1654
1654
|
className: L(Z, C.error)
|
|
1655
1655
|
}, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.Apartment.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Apartment.Description, {
|
|
1656
1656
|
className: L(ee, C.description)
|
|
1657
|
-
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(
|
|
1657
|
+
}, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
|
|
1658
1658
|
content: r,
|
|
1659
1659
|
locale: s
|
|
1660
1660
|
}))));
|
|
1661
1661
|
};
|
|
1662
1662
|
export {
|
|
1663
|
-
|
|
1663
|
+
kr as M
|
|
1664
1664
|
};
|