@wix/form-elements 1.172.0 → 1.174.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-DZ0SFXmL.js → appointment-rac-DIV9zgmZ.js} +80 -80
- package/dist/component/{bookings-address-rac-BW9grc77.js → bookings-address-rac-C5cT4gkX.js} +1 -1
- package/dist/component/{bookings-email-rac-D8gMaAfB.js → bookings-email-rac-CQEhRS7N.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CAjcs7b6.js → bookings-first-name-rac-BwdasJXd.js} +1 -1
- package/dist/component/{bookings-header-rac-BhKZ1kku.js → bookings-header-rac-CWzKq3yr.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DpsMDuU0.js → bookings-last-name-rac-CoVWqEy5.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BVdWmKS8.js → bookings-login-bar-rac-DwoI-iRQ.js} +4 -4
- package/dist/component/{bookings-phone-rac-DsqNi2mI.js → bookings-phone-rac-WAZU-1kD.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-elM4Ne3f.js → bookings-rich-text-rac-I5Uo-q87.js} +1 -1
- package/dist/component/{checkbox-field-rac-BU4E73fD.js → checkbox-field-rac-CKbKBNcQ.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-6yJdIbP2.js → checkbox-group-field-headless-7PMj-zW6.js} +47 -47
- package/dist/component/{checkbox-group-field-rac-CojbCWSF.js → checkbox-group-field-rac-BZ-YgEYR.js} +4 -4
- package/dist/component/{checkbox-group-rac-3qUVUc-C.js → checkbox-group-rac-CED8h4qI.js} +1 -1
- package/dist/component/{checkbox-rac-DwbTapd_.js → checkbox-rac-CbpEXMBz.js} +1 -1
- package/dist/component/{contacts-address-rac-BL7XDZuP.js → contacts-address-rac-F3Ui7iJu.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DeJYIHAg.js → contacts-birthdate-rac-CcxRV3RQ.js} +1 -1
- package/dist/component/{contacts-company-rac-BeImf5uc.js → contacts-company-rac-mDY20HzW.js} +1 -1
- package/dist/component/{contacts-email-rac-CtacwrZ0.js → contacts-email-rac-CoBPNuCj.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CAdOqOOA.js → contacts-first-name-rac-DzbpBmNm.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Db9mHzCW.js → contacts-last-name-rac-DEmV-MNE.js} +1 -1
- package/dist/component/{contacts-phone-rac-W0OLEbzL.js → contacts-phone-rac-BlEpatWP.js} +1 -1
- package/dist/component/{contacts-position-rac-CV4Ibt4Z.js → contacts-position-rac-DlZahRQc.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CQ3Q1pjZ.js → contacts-subscribe-rac-LXCEPvXl.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-Dux-pk6r.js → contacts-tax-id-rac-DS0SDAtC.js} +1 -1
- package/dist/component/{date-availability-RkX-Qw7G.js → date-availability-DTFyrU8J.js} +1 -1
- package/dist/component/{date-input-field-rac-CYCT6qoa.js → date-input-field-rac-D7Pv-hqW.js} +62 -62
- package/dist/component/{date-input-rac-BkYZ7q_o.js → date-input-rac-BEsh54Gz.js} +1 -1
- package/dist/component/{date-picker-field-rac-eMidYtsl.js → date-picker-field-rac-DJirD93a.js} +15 -15
- package/dist/component/{date-picker-rac-D23rxZcF.js → date-picker-rac-B1fUqj_w.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BjIj4dXQ.js → date-time-input-field-rac-CPFaQUXF.js} +38 -38
- package/dist/component/{date-time-input-rac-BSGAdk9L.js → date-time-input-rac-CAozBO0e.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Xmb5IKrb.js → dext-checkbox-group-rac-B0yqJoj8.js} +2 -2
- package/dist/component/{dext-checkbox-rac-2eA7y0ld.js → dext-checkbox-rac-yZaUdHz1.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CmLxVGGT.js → dext-date-picker-rac-AJ7XIW-h.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Cd9nwSjb.js → dext-date-time-input-rac-CPs79sUY.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BKdQ0nGS.js → dext-dropdown-rac-W2QzqPG4.js} +1 -1
- package/dist/component/{dext-email-rac-07zDPxyf.js → dext-email-rac-CCW1Dk1m.js} +1 -1
- package/dist/component/{dext-number-input-rac-DRvGuppY.js → dext-number-input-rac-BAInaxoF.js} +1 -1
- package/dist/component/{dext-phone-rac-CKtTVjFg.js → dext-phone-rac-CYYgZiFW.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BsBmMufq.js → dext-radio-group-rac-Dqvmxoai.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CcFSTAIh.js → dext-rating-input-rac-CWl7X0zW.js} +1 -1
- package/dist/component/{dext-tags-rac-CCTDlCvX.js → dext-tags-rac-BpAfPh55.js} +2 -2
- package/dist/component/{dext-text-area-rac-Cif8po9h.js → dext-text-area-rac-CLTg8XXH.js} +1 -1
- package/dist/component/{dext-text-input-rac-2118X4iF.js → dext-text-input-rac-BV-F-ZsP.js} +1 -1
- package/dist/component/{dext-url-input-rac-DDImGkQe.js → dext-url-input-rac-B9wHRaZr.js} +1 -1
- package/dist/component/{donation-rac-Dnylss1d.js → donation-rac-Be4swKWD.js} +50 -50
- package/dist/component/{dropdown-field-rac-DDI4ZgZH.js → dropdown-field-rac-BFEB_WuX.js} +3 -3
- package/dist/component/{dropdown-rac-DX0Z3R_8.js → dropdown-rac-Dz7QtFVB.js} +1 -1
- package/dist/component/{ecom-address-rac-D9MeEQsk.js → ecom-address-rac-Bu6msDgo.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DKJ9j5dj.js → ecom-subscription-checkbox-rac-BRovQqrM.js} +2 -2
- package/dist/component/{email-input-field-rac-DaKrmlwe.js → email-input-field-rac-EERVxm6G.js} +42 -42
- package/dist/component/{events-repeater-rac-DWrOLT0Y.js → events-repeater-rac-xs0pooBs.js} +49 -49
- package/dist/component/{events-rsvp-rac-YBTR1tR0.js → events-rsvp-rac-CMi-8EqK.js} +3 -3
- package/dist/component/{field-error-headless-jksFrezt.js → field-error-headless-DbFXeaud.js} +8 -8
- package/dist/component/{field-label-headless-BBvJAVxI.js → field-label-headless-CWOYHPsb.js} +11 -11
- package/dist/component/{file-upload-rac-CgdmfUZG.js → file-upload-rac-vbMTIdDc.js} +61 -61
- package/dist/component/{fixed-payment-rac-v6rKwzFs.js → fixed-payment-rac-BRk7ams_.js} +7 -7
- package/dist/component/{form-BsiK682r.js → form-BjeODFzx.js} +238 -237
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BuXybl7K.js → header-field-rac-CQexwZn7.js} +2 -2
- package/dist/component/{header-rac-CDyaLosW.js → header-rac-CYbPDl4_.js} +1 -1
- package/dist/component/{image-choice-rac-BRlMroBw.js → image-choice-rac-DDvlaK6K.js} +15 -15
- package/dist/component/{index-BanOeCAF.js → index-B6wFpWpe.js} +4 -4
- package/dist/component/{index-y9URYGEE.js → index-Bs9ypEe2.js} +6 -6
- package/dist/component/{isObjectLike-BG9nJ-rx.js → isObjectLike-Xcw2hQQ6.js} +1 -1
- package/dist/component/{multiline-address-field-rac-DRAkxI1l.js → multiline-address-field-rac-CYJR-MUz.js} +209 -209
- package/dist/component/{multiline-address-rac-JjTzWsEb.js → multiline-address-rac-DO1j_w6S.js} +1 -1
- package/dist/component/{number-input-field-rac-QrouG7Hv.js → number-input-field-rac-C-qvd8v9.js} +18 -18
- package/dist/component/{number-input-rac-DGmE7cLv.js → number-input-rac-CQSaifZE.js} +1 -1
- package/dist/component/{password-rac-DeyY228m.js → password-rac-CqnbZtR_.js} +28 -28
- package/dist/component/{payment-input-rac-DmIennLi.js → payment-input-rac-CbOcztkp.js} +28 -28
- package/dist/component/{phone-input-field-rac-F7e74TGA.js → phone-input-field-rac-BQ187I2C.js} +55 -55
- package/dist/component/{phone-rac-CQfB2CQD.js → phone-rac-CbA2xqF3.js} +1 -1
- package/dist/component/{product-list-rac--GGG8vvO.js → product-list-rac-MxB9tRiE.js} +103 -103
- package/dist/component/{quiz-radio-group-rac-DF2C2vNq.js → quiz-radio-group-rac-IViaDVRW.js} +1 -1
- package/dist/component/{radio-button-module-classes-DmpNo6F2.js → radio-button-module-classes-jtnooKMO.js} +33 -33
- package/dist/component/{radio-group-field-rac-BGcPYfKO.js → radio-group-field-rac-g3SQGJPp.js} +4 -4
- package/dist/component/{radio-group-rac-CqysUMCE.js → radio-group-rac-D8wmzlbu.js} +1 -1
- package/dist/component/{rating-input-field-rac-D-ei917Y.js → rating-input-field-rac-BqPXKKdi.js} +15 -15
- package/dist/component/{rating-input-rac-a9zJ74fw.js → rating-input-rac-CeZIpOmm.js} +1 -1
- package/dist/component/{rich-content-rac.module-CvyLVlXL.js → rich-content-rac.module-BLgdpRh_.js} +5 -5
- package/dist/component/{rich-text-field-rac-vf19nvyw.js → rich-text-field-rac-BpSVobCQ.js} +6 -6
- package/dist/component/{rich-text-rac-Cx_wpoxC.js → rich-text-rac-DqpaqbFH.js} +1 -1
- package/dist/component/{service-dropdown-rac-DITzKQxd.js → service-dropdown-rac-DKgtga1t.js} +30 -30
- package/dist/component/{services-multi-choice-rac-BtisN0Aq.js → services-multi-choice-rac-CAyB0b4q.js} +9 -9
- package/dist/component/{signature-rac-DUeIoS5O.js → signature-rac-DC20YN4f.js} +97 -97
- package/dist/component/{submit-button-rac-C8h6zeTw.js → submit-button-rac-ClWtqIkR.js} +30 -30
- package/dist/component/{tags-field-rac-CjFuiB0n.js → tags-field-rac-DHM9k8uf.js} +18 -18
- package/dist/component/{tags-rac-BO7rwyLl.js → tags-rac-Clg50jwY.js} +1 -1
- package/dist/component/{text-area-field-rac-CgUx3nQ0.js → text-area-field-rac-B2qJZ6wR.js} +16 -16
- package/dist/component/{text-area-rac-WgXYXIaf.js → text-area-rac-BwsVk7u7.js} +1 -1
- package/dist/component/{text-input-field-rac-DaxWFha-.js → text-input-field-rac-BQbo-3Ly.js} +6 -6
- package/dist/component/{text-input-headless-hjuRJTZN.js → text-input-headless-WICGIHcN.js} +3 -3
- package/dist/component/{text-input-rac-BzumrJBj.js → text-input-rac-D7BRYDZr.js} +1 -1
- package/dist/component/{time-input-rac-2FEkpQ7M.js → time-input-rac-Dnp-0_Js.js} +22 -22
- package/dist/component/{url-input-field-rac-BZ9f8D8I.js → url-input-field-rac-MC13zKST.js} +19 -19
- package/dist/component/{url-input-rac-D-AVlxkD.js → url-input-rac-DfAtTmKv.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DwAAtzgX.js → use-dropdown-option-class-name-CVUEosg4.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-D-6n9YVG.js → use-dropdown-trigger-class-name-BHLG7EB-.js} +25 -25
- package/dist/component/{use-element-state-class-name-C5auxwhj.js → use-element-state-class-name-BVJylHPn.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-Nd2jqfz4.js → use-hoverable-input-class-name-DO9ctJ81.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-CKaHhCqp.js → use-is-forced-open-dropdown-Czuo32Nq.js} +8 -8
- package/dist/component/{use-service-options-base-CvluFheT.js → use-service-options-base-DUuGIm38.js} +1 -1
- package/dist/component/use-text-input-class-name-LEnNGX0a.js +6 -0
- package/package.json +2 -2
- package/dist/component/use-text-input-class-name-DGTlYJxC.js +0 -6
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { RicosViewer as G } 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 q, createContext as $e, useContext as Ce, useState as Ee, useRef as x, useCallback as _, useEffect as Ae } from "react";
|
|
4
|
+
import { UNSAFE_PortalProvider as Tt } from "react-aria";
|
|
5
|
+
import { bG as Ct, d as It, bB as Mt, bD as Lt, be as wt, bf as qt, b7 as xt, bd as W, F as K, bV as Pe, bu as it, bL as P, bI as M, bN as ae, bH as Nt, bj as Bt, C as Oe, bs as kt, bw as Ut, bS as Vt, bM as $t, bR as Wt, bz as Kt, bo as Yt, by as Ht, bO as jt, aP as Jt, Y as Xt, _ as z, am as Q, $ as Ne, M as Z, I as ee, Z as Gt, a0 as zt, a1 as Qt } from "./form-BjeODFzx.js";
|
|
6
6
|
import { f as b, a as v } from "./find-child-C60k4CxG.js";
|
|
7
7
|
import { F as Zt, V as en } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
-
import { c as tn } from "./use-is-forced-open-dropdown-
|
|
9
|
-
import { TextField as be, Input as le, ComboBoxStateContext as We, ComboBox 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 nn, c as rn, a as on, r as vt } from "./isObjectLike-
|
|
13
|
-
import { V as sn, a as an } from "./use-dropdown-option-class-name-
|
|
8
|
+
import { c as tn } from "./use-is-forced-open-dropdown-Czuo32Nq.js";
|
|
9
|
+
import { TextField as be, Input as le, ComboBoxStateContext as We, ComboBox as Se, Popover as Fe, ListBox as Te, ListBoxItem as De, Group as Ot, Button as gt } from "react-aria-components";
|
|
10
|
+
import { D as ie, E as ce } from "./field-error-headless-DbFXeaud.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-CWOYHPsb.js";
|
|
12
|
+
import { e as nn, c as rn, a as on, r as vt } from "./isObjectLike-Xcw2hQQ6.js";
|
|
13
|
+
import { V as sn, a as an } from "./use-dropdown-option-class-name-CVUEosg4.js";
|
|
14
14
|
import { u as ln } from "./use-invoke-callback-UH73A_J3.js";
|
|
15
15
|
import { C as ct } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Me } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as C } from "./field-rac.module-ts2t4WUO.js";
|
|
19
|
-
import { u as dt } from "./use-hoverable-input-class-name-
|
|
19
|
+
import { u as dt } from "./use-hoverable-input-class-name-DO9ctJ81.js";
|
|
20
20
|
const cn = (e, t, o) => {
|
|
21
21
|
var s, l, i, a;
|
|
22
22
|
const r = (s = e.steps) == null ? void 0 : s.map((d) => {
|
|
@@ -51,39 +51,39 @@ function dn(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 St = /* @__PURE__ */ $e({
|
|
55
55
|
onAddressSelect: () => {
|
|
56
56
|
}
|
|
57
57
|
}), un = ({ children: e, onAddressSelect: t, autocompleteEnabled: o }) => {
|
|
58
|
-
const r =
|
|
58
|
+
const r = q(() => ({
|
|
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(St.Provider, {
|
|
66
66
|
value: r
|
|
67
67
|
}, e);
|
|
68
68
|
};
|
|
69
69
|
function Ie() {
|
|
70
|
-
return Ce(
|
|
70
|
+
return Ce(St);
|
|
71
71
|
}
|
|
72
|
-
const
|
|
73
|
-
const o =
|
|
72
|
+
const Ft = /* @__PURE__ */ $e(void 0), mn = ({ children: e, countryCode: t }) => {
|
|
73
|
+
const o = q(() => ({
|
|
74
74
|
countryCode: t
|
|
75
75
|
}), [
|
|
76
76
|
t
|
|
77
77
|
]);
|
|
78
|
-
return /* @__PURE__ */ n.createElement(
|
|
78
|
+
return /* @__PURE__ */ n.createElement(Ft.Provider, {
|
|
79
79
|
value: o
|
|
80
80
|
}, e);
|
|
81
81
|
};
|
|
82
82
|
function Le() {
|
|
83
|
-
const e = Ce(
|
|
83
|
+
const e = Ce(Ft);
|
|
84
84
|
return e == null ? void 0 : e.countryCode;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function we(e) {
|
|
87
87
|
return e != null;
|
|
88
88
|
}
|
|
89
89
|
function pn(e, t, o) {
|
|
@@ -97,10 +97,10 @@ function pn(e, t, o) {
|
|
|
97
97
|
...r.view,
|
|
98
98
|
...l
|
|
99
99
|
},
|
|
100
|
-
...
|
|
100
|
+
...we(s) && {
|
|
101
101
|
hidden: !s
|
|
102
102
|
},
|
|
103
|
-
...
|
|
103
|
+
...we(i) && we(r.validation) && {
|
|
104
104
|
validation: {
|
|
105
105
|
...r.validation,
|
|
106
106
|
required: i
|
|
@@ -177,16 +177,16 @@ const En = (e, t) => e.map((o) => ({
|
|
|
177
177
|
street_number: W(),
|
|
178
178
|
apartment: W()
|
|
179
179
|
}), On = ({ id: e, target: t, fieldType: o, form: r, country: s, fieldSettings: l, validation: i, required: a }) => {
|
|
180
|
-
const [d] = Ee(Nn), { isExperimentEnabled: m } = Ct(), u = m(It.USE_FIELDS_V2), { getCountryAddressForm: y } = Mt(), { isMobile: I, breakpoint: p } = Lt(), E = y(s), f = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N =
|
|
180
|
+
const [d] = Ee(Nn), { isExperimentEnabled: m } = Ct(), u = m(It.USE_FIELDS_V2), { getCountryAddressForm: y } = Mt(), { isMobile: I, breakpoint: p } = Lt(), E = y(s), f = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N = q(() => {
|
|
181
181
|
var g;
|
|
182
|
-
return
|
|
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
|
-
]),
|
|
186
|
+
]), F = q(() => qt(), []);
|
|
187
187
|
return {
|
|
188
|
-
form:
|
|
189
|
-
var
|
|
188
|
+
form: q(() => {
|
|
189
|
+
var T, O;
|
|
190
190
|
if (!f || !E)
|
|
191
191
|
return r && {
|
|
192
192
|
...r,
|
|
@@ -199,14 +199,14 @@ const En = (e, t) => e.map((o) => ({
|
|
|
199
199
|
includeHiddenFields: !0,
|
|
200
200
|
isMobile: I,
|
|
201
201
|
breakpoint: p,
|
|
202
|
-
form: pn(cn(E, N,
|
|
202
|
+
form: pn(cn(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 w = Ln(g);
|
|
207
207
|
return {
|
|
208
|
-
...
|
|
209
|
-
fields:
|
|
208
|
+
...w,
|
|
209
|
+
fields: w.fields.filter((h) => !h.properties.hidden)
|
|
210
210
|
};
|
|
211
211
|
}, [
|
|
212
212
|
E,
|
|
@@ -216,7 +216,7 @@ const En = (e, t) => e.map((o) => ({
|
|
|
216
216
|
i,
|
|
217
217
|
t,
|
|
218
218
|
N,
|
|
219
|
-
|
|
219
|
+
F,
|
|
220
220
|
f,
|
|
221
221
|
u,
|
|
222
222
|
e,
|
|
@@ -225,8 +225,8 @@ const En = (e, t) => e.map((o) => ({
|
|
|
225
225
|
]),
|
|
226
226
|
isMultilineAddressField: f
|
|
227
227
|
};
|
|
228
|
-
}, ht = /* @__PURE__ */
|
|
229
|
-
const o =
|
|
228
|
+
}, ht = /* @__PURE__ */ $e(void 0), gn = ({ children: e, fields: t }) => {
|
|
229
|
+
const o = q(() => ({
|
|
230
230
|
fields: t
|
|
231
231
|
}), [
|
|
232
232
|
t
|
|
@@ -242,11 +242,11 @@ function ue(e) {
|
|
|
242
242
|
return t.fields[e];
|
|
243
243
|
}
|
|
244
244
|
function me(e) {
|
|
245
|
-
const { t } =
|
|
245
|
+
const { t } = Pe(), o = Le(), r = o && it.getCountryByShortKey(o), l = (r ? r.addressPartDisplayNames : it.getDefaultAddressDisplayNames())[e];
|
|
246
246
|
return l ? t(l) : "";
|
|
247
247
|
}
|
|
248
248
|
const ne = ({ children: e }) => {
|
|
249
|
-
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } =
|
|
249
|
+
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(), I = me("addressLine2"), p = b(e, ne.Label), E = b(e, ne.Input), f = b(e, ne.Description), N = b(e, ne.Error);
|
|
250
250
|
return /* @__PURE__ */ n.createElement(u, {
|
|
251
251
|
fieldId: t,
|
|
252
252
|
renderLabel: () => v(p, {
|
|
@@ -266,7 +266,7 @@ const ne = ({ children: e }) => {
|
|
|
266
266
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
267
267
|
});
|
|
268
268
|
}, vn = ({ className: e }) => {
|
|
269
|
-
const { id: t, placeholder: o } =
|
|
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({
|
|
@@ -287,7 +287,7 @@ ne.Description = ie;
|
|
|
287
287
|
ne.Error = ce;
|
|
288
288
|
const Ke = ({ enabled: e }) => {
|
|
289
289
|
const { actions: t } = Nt(), [o, r] = Ee(W()), s = _(() => r(W()), []);
|
|
290
|
-
return
|
|
290
|
+
return q(() => {
|
|
291
291
|
const { predict: l, getPlace: i, searchByPostalCode: a } = t ?? {};
|
|
292
292
|
if (!(!e || !l || !i || !a))
|
|
293
293
|
return {
|
|
@@ -312,17 +312,17 @@ const Ke = ({ enabled: e }) => {
|
|
|
312
312
|
s
|
|
313
313
|
]);
|
|
314
314
|
};
|
|
315
|
-
var
|
|
316
|
-
function
|
|
317
|
-
if (ut) return
|
|
315
|
+
var qe, ut;
|
|
316
|
+
function Sn() {
|
|
317
|
+
if (ut) return qe;
|
|
318
318
|
ut = 1;
|
|
319
319
|
var e = nn(), t = function() {
|
|
320
320
|
return e.Date.now();
|
|
321
321
|
};
|
|
322
|
-
return
|
|
322
|
+
return qe = t, qe;
|
|
323
323
|
}
|
|
324
324
|
var xe, mt;
|
|
325
|
-
function
|
|
325
|
+
function Fn() {
|
|
326
326
|
if (mt) return xe;
|
|
327
327
|
mt = 1;
|
|
328
328
|
var e = /\s/;
|
|
@@ -337,7 +337,7 @@ var Be, pt;
|
|
|
337
337
|
function Dn() {
|
|
338
338
|
if (pt) return Be;
|
|
339
339
|
pt = 1;
|
|
340
|
-
var e =
|
|
340
|
+
var e = Fn(), t = /^\s+/;
|
|
341
341
|
function o(r) {
|
|
342
342
|
return r && r.slice(0, e(r) + 1).replace(t, "");
|
|
343
343
|
}
|
|
@@ -375,63 +375,63 @@ function _n() {
|
|
|
375
375
|
}
|
|
376
376
|
return Ue = d, Ue;
|
|
377
377
|
}
|
|
378
|
-
var
|
|
378
|
+
var Ve, ft;
|
|
379
379
|
function Rn() {
|
|
380
|
-
if (ft) return
|
|
380
|
+
if (ft) return Ve;
|
|
381
381
|
ft = 1;
|
|
382
|
-
var e = vt(), t =
|
|
382
|
+
var e = vt(), t = Sn(), o = _n(), r = "Expected a function", s = Math.max, l = Math.min;
|
|
383
383
|
function i(a, d, m) {
|
|
384
|
-
var u, y, I, p, E, f, N = 0,
|
|
384
|
+
var u, y, I, p, E, f, N = 0, F = !1, D = !1, g = !0;
|
|
385
385
|
if (typeof a != "function")
|
|
386
386
|
throw new TypeError(r);
|
|
387
|
-
d = o(d) || 0, e(m) && (
|
|
388
|
-
function R(
|
|
387
|
+
d = o(d) || 0, e(m) && (F = !!m.leading, D = "maxWait" in m, I = D ? s(o(m.maxWait) || 0, d) : I, g = "trailing" in m ? !!m.trailing : g);
|
|
388
|
+
function R(S) {
|
|
389
389
|
var J = u, pe = y;
|
|
390
|
-
return u = y = void 0, N =
|
|
390
|
+
return u = y = void 0, N = S, p = a.apply(pe, J), p;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
return N =
|
|
392
|
+
function w(S) {
|
|
393
|
+
return N = S, E = setTimeout(h, d), F ? R(S) : p;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
var J =
|
|
395
|
+
function T(S) {
|
|
396
|
+
var J = S - f, pe = S - N, he = d - J;
|
|
397
397
|
return D ? l(he, I - pe) : he;
|
|
398
398
|
}
|
|
399
|
-
function O(
|
|
400
|
-
var J =
|
|
399
|
+
function O(S) {
|
|
400
|
+
var J = S - f, pe = S - N;
|
|
401
401
|
return f === void 0 || J >= d || J < 0 || D && pe >= I;
|
|
402
402
|
}
|
|
403
403
|
function h() {
|
|
404
|
-
var
|
|
405
|
-
if (O(
|
|
406
|
-
return j(
|
|
407
|
-
E = setTimeout(h,
|
|
404
|
+
var S = t();
|
|
405
|
+
if (O(S))
|
|
406
|
+
return j(S);
|
|
407
|
+
E = setTimeout(h, T(S));
|
|
408
408
|
}
|
|
409
|
-
function j(
|
|
410
|
-
return E = void 0, g && u ? R(
|
|
409
|
+
function j(S) {
|
|
410
|
+
return E = void 0, g && u ? R(S) : (u = y = void 0, p);
|
|
411
411
|
}
|
|
412
412
|
function fe() {
|
|
413
413
|
E !== void 0 && clearTimeout(E), N = 0, u = f = y = E = void 0;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function V() {
|
|
416
416
|
return E === void 0 ? p : j(t());
|
|
417
417
|
}
|
|
418
418
|
function A() {
|
|
419
|
-
var
|
|
420
|
-
if (u = arguments, y = this, f =
|
|
419
|
+
var S = t(), J = O(S);
|
|
420
|
+
if (u = arguments, y = this, f = S, J) {
|
|
421
421
|
if (E === void 0)
|
|
422
|
-
return
|
|
422
|
+
return w(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 = fe, A.flush =
|
|
428
|
+
return A.cancel = fe, A.flush = V, A;
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return Ve = i, Ve;
|
|
431
431
|
}
|
|
432
432
|
var An = Rn();
|
|
433
|
-
const
|
|
434
|
-
const r = x(e), s = _(
|
|
433
|
+
const Pn = /* @__PURE__ */ Bt(An), Tn = (e, t, o = 200) => {
|
|
434
|
+
const r = x(e), s = _(Pn((...l) => {
|
|
435
435
|
r.current(...l);
|
|
436
436
|
}, o), [
|
|
437
437
|
o
|
|
@@ -453,7 +453,7 @@ const Tn = /* @__PURE__ */ Bt(An), Pn = (e, t, o = 200) => {
|
|
|
453
453
|
}, _t = ({ atlas: e, onError: t }) => {
|
|
454
454
|
const [{ loading: r, predictions: s }, l] = Ee(yt), i = x(0), a = Mn(), d = _(() => {
|
|
455
455
|
i.current++, l(yt);
|
|
456
|
-
}, []), m =
|
|
456
|
+
}, []), m = Tn(async ({ input: u, countryCodes: y }) => {
|
|
457
457
|
if (!e || !a())
|
|
458
458
|
return;
|
|
459
459
|
if (!u) {
|
|
@@ -504,13 +504,13 @@ const Tn = /* @__PURE__ */ Bt(An), Pn = (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 } =
|
|
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 } = Ie(), 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, {
|
|
511
511
|
label: f
|
|
512
512
|
}),
|
|
513
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
513
|
+
renderInput: () => /* @__PURE__ */ n.createElement(wn, {
|
|
514
514
|
value: o,
|
|
515
515
|
onChange: r,
|
|
516
516
|
disabled: s,
|
|
@@ -519,7 +519,7 @@ const Tn = /* @__PURE__ */ Bt(An), Pn = (e, t, o = 200) => {
|
|
|
519
519
|
hasError: a,
|
|
520
520
|
onBlur: d,
|
|
521
521
|
onFocus: m
|
|
522
|
-
},
|
|
522
|
+
}, F, D),
|
|
523
523
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
524
524
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
525
525
|
fieldId: t,
|
|
@@ -536,20 +536,20 @@ const Tn = /* @__PURE__ */ Bt(An), Pn = (e, t, o = 200) => {
|
|
|
536
536
|
isInvalid: a,
|
|
537
537
|
onBlur: d,
|
|
538
538
|
onFocus: m
|
|
539
|
-
},
|
|
539
|
+
}, F),
|
|
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
543
|
const { labelId: m } = M(), { onAddressSelect: u } = Ie(), y = Le(), I = Ke({
|
|
544
544
|
enabled: !0
|
|
545
545
|
}), { predictions: p, updatePredictions: E, clearPredictions: f } = _t({
|
|
546
546
|
atlas: I
|
|
547
|
-
}), N =
|
|
547
|
+
}), N = q(() => p.map((O) => ({
|
|
548
548
|
id: O.searchId || "",
|
|
549
549
|
label: O.description || ""
|
|
550
550
|
})), [
|
|
551
551
|
p
|
|
552
|
-
]),
|
|
552
|
+
]), F = _((O) => {
|
|
553
553
|
E({
|
|
554
554
|
input: O,
|
|
555
555
|
countryCodes: y ? [
|
|
@@ -581,11 +581,11 @@ const Tn = /* @__PURE__ */ Bt(An), Pn = (e, t, o = 200) => {
|
|
|
581
581
|
d == null || d();
|
|
582
582
|
}, [
|
|
583
583
|
d
|
|
584
|
-
]),
|
|
585
|
-
return /* @__PURE__ */ n.createElement(
|
|
584
|
+
]), w = b(e, B.Input), T = b(e, B.Options);
|
|
585
|
+
return /* @__PURE__ */ n.createElement(Se, {
|
|
586
586
|
"aria-labelledby": m,
|
|
587
587
|
inputValue: t ?? "",
|
|
588
|
-
onInputChange:
|
|
588
|
+
onInputChange: F,
|
|
589
589
|
value: null,
|
|
590
590
|
onChange: D,
|
|
591
591
|
isDisabled: r,
|
|
@@ -597,15 +597,15 @@ const Tn = /* @__PURE__ */ Bt(An), Pn = (e, t, o = 200) => {
|
|
|
597
597
|
allowsCustomValue: !0,
|
|
598
598
|
menuTrigger: "input",
|
|
599
599
|
items: N
|
|
600
|
-
}, v(
|
|
600
|
+
}, v(w, {
|
|
601
601
|
onFocus: R
|
|
602
|
-
}), v(
|
|
602
|
+
}), v(T, {
|
|
603
603
|
options: N
|
|
604
604
|
}), /* @__PURE__ */ n.createElement(Ye, {
|
|
605
605
|
optionCount: N.length
|
|
606
606
|
}));
|
|
607
|
-
},
|
|
608
|
-
const { id: o, placeholder: r } =
|
|
607
|
+
}, qn = ({ className: e, ...t }) => {
|
|
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({
|
|
@@ -622,11 +622,11 @@ const Tn = /* @__PURE__ */ Bt(An), Pn = (e, t, o = 200) => {
|
|
|
622
622
|
});
|
|
623
623
|
}, He = ({ children: e, className: t }) => {
|
|
624
624
|
const o = b(e, He.Option);
|
|
625
|
-
return /* @__PURE__ */ n.createElement(
|
|
625
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
626
626
|
className: t,
|
|
627
627
|
containerPadding: 0,
|
|
628
628
|
offset: 0
|
|
629
|
-
}, /* @__PURE__ */ n.createElement(
|
|
629
|
+
}, /* @__PURE__ */ n.createElement(Te, {
|
|
630
630
|
renderEmptyState: () => null
|
|
631
631
|
}, (r) => v(o, {
|
|
632
632
|
id: r.id,
|
|
@@ -642,12 +642,12 @@ const Tn = /* @__PURE__ */ Bt(An), Pn = (e, t, o = 200) => {
|
|
|
642
642
|
};
|
|
643
643
|
He.Option = xn;
|
|
644
644
|
B.Label = de;
|
|
645
|
-
B.Input =
|
|
645
|
+
B.Input = qn;
|
|
646
646
|
B.Options = He;
|
|
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 } =
|
|
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 } = Pe(), 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, {
|
|
@@ -664,10 +664,10 @@ const re = ({ children: e }) => {
|
|
|
664
664
|
onBlur: d,
|
|
665
665
|
onFocus: m
|
|
666
666
|
}, f),
|
|
667
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
667
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, F, N)
|
|
668
668
|
});
|
|
669
669
|
}, Bn = ({ className: e }) => {
|
|
670
|
-
const { id: t, placeholder: o } =
|
|
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({
|
|
@@ -687,7 +687,7 @@ re.Input = Bn;
|
|
|
687
687
|
re.Description = ie;
|
|
688
688
|
re.Error = ce;
|
|
689
689
|
const oe = ({ children: e }) => {
|
|
690
|
-
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } =
|
|
690
|
+
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(), I = me("city"), p = b(e, oe.Label), E = b(e, oe.Input), f = b(e, oe.Description), N = b(e, oe.Error);
|
|
691
691
|
return /* @__PURE__ */ n.createElement(u, {
|
|
692
692
|
fieldId: t,
|
|
693
693
|
renderLabel: () => v(p, {
|
|
@@ -707,7 +707,7 @@ const oe = ({ children: e }) => {
|
|
|
707
707
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
708
708
|
});
|
|
709
709
|
}, kn = ({ className: e }) => {
|
|
710
|
-
const { id: t, placeholder: o } =
|
|
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({
|
|
@@ -743,8 +743,8 @@ const Un = ({ isOpen: e }) => {
|
|
|
743
743
|
e,
|
|
744
744
|
t
|
|
745
745
|
]);
|
|
746
|
-
},
|
|
747
|
-
const [l, i] = Ee(null), a = ln(s), d =
|
|
746
|
+
}, Vn = (e, t) => e.find((o) => o.label.toLocaleLowerCase() === t.toLocaleLowerCase().trim()), At = ({ options: e, value: t, commit: o, clear: r, onBlur: s }) => {
|
|
747
|
+
const [l, i] = Ee(null), a = ln(s), d = q(() => {
|
|
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 = Vn(e, p);
|
|
762
762
|
E && E.value !== t && o(E.value);
|
|
763
763
|
}, [
|
|
764
764
|
o,
|
|
@@ -787,10 +787,10 @@ 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 } =
|
|
791
|
-
value:
|
|
792
|
-
label: f(`locale-dataset.countries.${Oe[
|
|
793
|
-
}), A), []).sort((A,
|
|
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 } = Pe(), { language: N } = Lt(), F = q(() => (p || []).reduce((A, S) => (S.value && Oe.hasOwnProperty(S.value) && A.push({
|
|
791
|
+
value: S.value,
|
|
792
|
+
label: f(`locale-dataset.countries.${Oe[S.value].toUpperCase()}`)
|
|
793
|
+
}), A), []).sort((A, S) => A.label.localeCompare(S.label, N)), [
|
|
794
794
|
p,
|
|
795
795
|
f,
|
|
796
796
|
N
|
|
@@ -798,21 +798,21 @@ const Un = ({ isOpen: e }) => {
|
|
|
798
798
|
l
|
|
799
799
|
]), g = _(() => D(""), [
|
|
800
800
|
D
|
|
801
|
-
]), { onInputKeyDown: R, ...
|
|
802
|
-
options:
|
|
801
|
+
]), { onInputKeyDown: R, ...w } = At({
|
|
802
|
+
options: F,
|
|
803
803
|
value: s,
|
|
804
804
|
commit: D,
|
|
805
805
|
clear: g,
|
|
806
806
|
onBlur: u
|
|
807
|
-
}),
|
|
807
|
+
}), T = me("country"), O = b(e, Y.Label), h = b(e, Y.Control), j = b(e, Y.Options), fe = 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
|
-
label:
|
|
811
|
+
label: T
|
|
812
812
|
}),
|
|
813
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
813
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Se, {
|
|
814
814
|
"aria-labelledby": E,
|
|
815
|
-
...
|
|
815
|
+
...w,
|
|
816
816
|
isDisabled: i,
|
|
817
817
|
isReadOnly: a,
|
|
818
818
|
isRequired: d,
|
|
@@ -822,15 +822,15 @@ const Un = ({ isOpen: e }) => {
|
|
|
822
822
|
}, v(h, {
|
|
823
823
|
onKeyDown: R
|
|
824
824
|
}), v(j, {
|
|
825
|
-
options:
|
|
825
|
+
options: F,
|
|
826
826
|
isForcedOpen: o
|
|
827
827
|
}), /* @__PURE__ */ n.createElement(Un, {
|
|
828
828
|
isOpen: o
|
|
829
829
|
})),
|
|
830
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
830
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, V, fe)
|
|
831
831
|
});
|
|
832
832
|
}, ge = ({ children: e, className: t, ...o }) => {
|
|
833
|
-
const { disabled: r, hasError: s } =
|
|
833
|
+
const { disabled: r, hasError: s } = P(), { onKeyDown: l } = o, i = b(e, ge.Input), a = b(e, ge.Trigger);
|
|
834
834
|
return /* @__PURE__ */ n.createElement(Ot, {
|
|
835
835
|
className: t,
|
|
836
836
|
isDisabled: r,
|
|
@@ -838,8 +838,8 @@ const Un = ({ isOpen: e }) => {
|
|
|
838
838
|
}, v(i, {
|
|
839
839
|
onKeyDown: l
|
|
840
840
|
}), a);
|
|
841
|
-
},
|
|
842
|
-
const { id: o, placeholder: r, readOnly: s, disabled: l } =
|
|
841
|
+
}, $n = ({ 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 = Rt({
|
|
843
843
|
readOnly: s,
|
|
844
844
|
disabled: l
|
|
845
845
|
});
|
|
@@ -861,11 +861,11 @@ const Un = ({ isOpen: e }) => {
|
|
|
861
861
|
}, Wn = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(gt, {
|
|
862
862
|
className: t
|
|
863
863
|
}, e);
|
|
864
|
-
ge.Input =
|
|
864
|
+
ge.Input = $n;
|
|
865
865
|
ge.Trigger = Wn;
|
|
866
866
|
const je = ({ children: e, className: t, ...o }) => {
|
|
867
867
|
const { options: r, isForcedOpen: s } = o, l = b(e, je.Option);
|
|
868
|
-
return /* @__PURE__ */ n.createElement(
|
|
868
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
869
869
|
className: t,
|
|
870
870
|
containerPadding: 0,
|
|
871
871
|
offset: 0
|
|
@@ -928,11 +928,11 @@ 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 } =
|
|
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 = Le(), { autocompleteEnabled: E } = Ie(), f = !!(p && Oe[p] === Oe.JP), N = (y || E) && f, F = me("zipCode"), D = b(e, k.Label), g = b(e, k.Control), R = b(e, k.Options), w = 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
|
-
label:
|
|
935
|
+
label: F
|
|
936
936
|
}),
|
|
937
937
|
renderInput: () => /* @__PURE__ */ n.createElement(Jn, {
|
|
938
938
|
value: o,
|
|
@@ -944,11 +944,11 @@ const k = ({ children: e }) => {
|
|
|
944
944
|
onBlur: d,
|
|
945
945
|
onFocus: m
|
|
946
946
|
}, g, R),
|
|
947
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
947
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, T, w)
|
|
948
948
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
949
949
|
fieldId: t,
|
|
950
950
|
renderLabel: () => v(D, {
|
|
951
|
-
label:
|
|
951
|
+
label: F
|
|
952
952
|
}),
|
|
953
953
|
renderInput: () => /* @__PURE__ */ n.createElement(be, {
|
|
954
954
|
"aria-labelledby": I,
|
|
@@ -961,19 +961,19 @@ const k = ({ children: e }) => {
|
|
|
961
961
|
onBlur: d,
|
|
962
962
|
onFocus: m
|
|
963
963
|
}, g),
|
|
964
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
964
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, T, w)
|
|
965
965
|
});
|
|
966
966
|
}, Jn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: s, required: l, hasError: i, onBlur: a, onFocus: d }) => {
|
|
967
967
|
const { labelId: m } = M(), { onAddressSelect: u } = Ie(), [y, I] = Ee(!1), { searchByPostalCode: p } = jn({
|
|
968
968
|
isAutocompleteEnabled: y
|
|
969
|
-
}), [E, f] = Ee(), N =
|
|
969
|
+
}), [E, f] = Ee(), N = q(() => E ? [
|
|
970
970
|
{
|
|
971
971
|
id: W(),
|
|
972
972
|
label: E.formattedAddress || ""
|
|
973
973
|
}
|
|
974
974
|
] : [], [
|
|
975
975
|
E
|
|
976
|
-
]),
|
|
976
|
+
]), F = _(async (O) => {
|
|
977
977
|
o(O);
|
|
978
978
|
const h = await p(O ?? "");
|
|
979
979
|
f(h);
|
|
@@ -993,11 +993,11 @@ const k = ({ children: e }) => {
|
|
|
993
993
|
I(!0), d == null || d();
|
|
994
994
|
}, [
|
|
995
995
|
d
|
|
996
|
-
]),
|
|
997
|
-
return /* @__PURE__ */ n.createElement(
|
|
996
|
+
]), w = b(e, k.Control), T = b(e, k.Options);
|
|
997
|
+
return /* @__PURE__ */ n.createElement(Se, {
|
|
998
998
|
"aria-labelledby": m,
|
|
999
999
|
inputValue: t ?? "",
|
|
1000
|
-
onInputChange:
|
|
1000
|
+
onInputChange: F,
|
|
1001
1001
|
value: null,
|
|
1002
1002
|
onChange: D,
|
|
1003
1003
|
isDisabled: r,
|
|
@@ -1009,15 +1009,15 @@ const k = ({ children: e }) => {
|
|
|
1009
1009
|
allowsCustomValue: !0,
|
|
1010
1010
|
menuTrigger: "input",
|
|
1011
1011
|
items: N
|
|
1012
|
-
}, v(
|
|
1012
|
+
}, v(w, {
|
|
1013
1013
|
onFocus: R
|
|
1014
|
-
}), v(
|
|
1014
|
+
}), v(T, {
|
|
1015
1015
|
options: N
|
|
1016
1016
|
}), /* @__PURE__ */ n.createElement(Ye, {
|
|
1017
1017
|
optionCount: N.length
|
|
1018
1018
|
}));
|
|
1019
1019
|
}, Je = ({ children: e, className: t, ...o }) => {
|
|
1020
|
-
const { disabled: r, hasError: s } =
|
|
1020
|
+
const { disabled: r, hasError: s } = P(), { onFocus: l } = o, i = Le(), a = b(e, Je.Input);
|
|
1021
1021
|
return /* @__PURE__ */ n.createElement("div", {
|
|
1022
1022
|
className: t,
|
|
1023
1023
|
"data-country": i || void 0,
|
|
@@ -1027,7 +1027,7 @@ const k = ({ children: e }) => {
|
|
|
1027
1027
|
onFocus: l
|
|
1028
1028
|
}));
|
|
1029
1029
|
}, Xn = ({ className: e, ...t }) => {
|
|
1030
|
-
const { id: o, placeholder: r } =
|
|
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({
|
|
@@ -1044,11 +1044,11 @@ const k = ({ children: e }) => {
|
|
|
1044
1044
|
});
|
|
1045
1045
|
}, Xe = ({ children: e, className: t }) => {
|
|
1046
1046
|
const o = b(e, Xe.Option);
|
|
1047
|
-
return /* @__PURE__ */ n.createElement(
|
|
1047
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
1048
1048
|
className: t,
|
|
1049
1049
|
containerPadding: 0,
|
|
1050
1050
|
offset: 0
|
|
1051
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1051
|
+
}, /* @__PURE__ */ n.createElement(Te, {
|
|
1052
1052
|
renderEmptyState: () => null
|
|
1053
1053
|
}, (r) => v(o, {
|
|
1054
1054
|
id: r.id,
|
|
@@ -1070,13 +1070,13 @@ k.Options = Xe;
|
|
|
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 } =
|
|
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 } = Ie(), 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(zn, {
|
|
1080
1080
|
value: o,
|
|
1081
1081
|
onChange: r,
|
|
1082
1082
|
disabled: s,
|
|
@@ -1085,7 +1085,7 @@ const U = ({ children: e }) => {
|
|
|
1085
1085
|
hasError: a,
|
|
1086
1086
|
onBlur: d,
|
|
1087
1087
|
onFocus: m
|
|
1088
|
-
},
|
|
1088
|
+
}, F, D),
|
|
1089
1089
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
1090
1090
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
1091
1091
|
fieldId: t,
|
|
@@ -1102,15 +1102,15 @@ const U = ({ children: e }) => {
|
|
|
1102
1102
|
isInvalid: a,
|
|
1103
1103
|
onBlur: d,
|
|
1104
1104
|
onFocus: m
|
|
1105
|
-
},
|
|
1105
|
+
}, F),
|
|
1106
1106
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
1107
1107
|
});
|
|
1108
|
-
},
|
|
1108
|
+
}, zn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: s, required: l, hasError: i, onBlur: a, onFocus: d }) => {
|
|
1109
1109
|
const { labelId: m } = M(), { onAddressSelect: u } = Ie(), y = Le(), I = Ke({
|
|
1110
1110
|
enabled: !0
|
|
1111
1111
|
}), { predictions: p, updatePredictions: E, clearPredictions: f } = _t({
|
|
1112
1112
|
atlas: I
|
|
1113
|
-
}), N = b(e, U.Input),
|
|
1113
|
+
}), N = b(e, U.Input), F = b(e, U.Options), D = q(() => p.reduce((O, h) => (h.searchId && h.description && O.push({
|
|
1114
1114
|
id: h.searchId,
|
|
1115
1115
|
label: h.description
|
|
1116
1116
|
}), O), []), [
|
|
@@ -1137,17 +1137,17 @@ const U = ({ children: e }) => {
|
|
|
1137
1137
|
u,
|
|
1138
1138
|
f,
|
|
1139
1139
|
I
|
|
1140
|
-
]),
|
|
1140
|
+
]), w = _(() => {
|
|
1141
1141
|
f(), a == null || a();
|
|
1142
1142
|
}, [
|
|
1143
1143
|
a,
|
|
1144
1144
|
f
|
|
1145
|
-
]),
|
|
1145
|
+
]), T = _(() => {
|
|
1146
1146
|
d == null || d();
|
|
1147
1147
|
}, [
|
|
1148
1148
|
d
|
|
1149
1149
|
]);
|
|
1150
|
-
return /* @__PURE__ */ n.createElement(
|
|
1150
|
+
return /* @__PURE__ */ n.createElement(Se, {
|
|
1151
1151
|
"aria-labelledby": m,
|
|
1152
1152
|
inputValue: t ?? "",
|
|
1153
1153
|
onInputChange: g,
|
|
@@ -1157,20 +1157,20 @@ const U = ({ children: e }) => {
|
|
|
1157
1157
|
isReadOnly: s,
|
|
1158
1158
|
isRequired: l,
|
|
1159
1159
|
isInvalid: i,
|
|
1160
|
-
onBlur:
|
|
1161
|
-
onFocus:
|
|
1160
|
+
onBlur: w,
|
|
1161
|
+
onFocus: T,
|
|
1162
1162
|
allowsCustomValue: !0,
|
|
1163
1163
|
menuTrigger: "input",
|
|
1164
1164
|
items: D
|
|
1165
1165
|
}, v(N, {
|
|
1166
|
-
onFocus:
|
|
1167
|
-
}), v(
|
|
1166
|
+
onFocus: T
|
|
1167
|
+
}), v(F, {
|
|
1168
1168
|
options: D
|
|
1169
1169
|
}), /* @__PURE__ */ n.createElement(Ye, {
|
|
1170
1170
|
optionCount: D.length
|
|
1171
1171
|
}));
|
|
1172
|
-
},
|
|
1173
|
-
const { id: o, placeholder: r } =
|
|
1172
|
+
}, Qn = ({ className: e, ...t }) => {
|
|
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({
|
|
@@ -1187,11 +1187,11 @@ 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(Fe, {
|
|
1191
1191
|
className: t,
|
|
1192
1192
|
containerPadding: 0,
|
|
1193
1193
|
offset: 0
|
|
1194
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1194
|
+
}, /* @__PURE__ */ n.createElement(Te, {
|
|
1195
1195
|
renderEmptyState: () => null
|
|
1196
1196
|
}, (r) => v(o, {
|
|
1197
1197
|
id: r.id,
|
|
@@ -1207,12 +1207,12 @@ const U = ({ children: e }) => {
|
|
|
1207
1207
|
};
|
|
1208
1208
|
Ge.Option = Zn;
|
|
1209
1209
|
U.Label = de;
|
|
1210
|
-
U.Input =
|
|
1210
|
+
U.Input = Qn;
|
|
1211
1211
|
U.Options = Ge;
|
|
1212
1212
|
U.Description = ie;
|
|
1213
1213
|
U.Error = ce;
|
|
1214
1214
|
const se = ({ children: e }) => {
|
|
1215
|
-
const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } =
|
|
1215
|
+
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(), I = me("streetNumber"), p = b(e, se.Label), E = b(e, se.Input), f = b(e, se.Description), N = b(e, se.Error);
|
|
1216
1216
|
return /* @__PURE__ */ n.createElement(u, {
|
|
1217
1217
|
fieldId: t,
|
|
1218
1218
|
renderLabel: () => v(p, {
|
|
@@ -1232,7 +1232,7 @@ const se = ({ children: e }) => {
|
|
|
1232
1232
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
1233
1233
|
});
|
|
1234
1234
|
}, er = ({ className: e }) => {
|
|
1235
|
-
const { id: t, placeholder: o } =
|
|
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({
|
|
@@ -1251,31 +1251,31 @@ se.Input = er;
|
|
|
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 } =
|
|
1255
|
-
var
|
|
1256
|
-
return (Ut(((
|
|
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 } = Pe(), p = Le(), E = p ? Oe[p] : void 0, f = p && kt.getCountryByShortKey(p), N = q(() => {
|
|
1255
|
+
var V;
|
|
1256
|
+
return (Ut(((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
|
-
})).sort((A,
|
|
1259
|
+
})).sort((A, S) => A.label.localeCompare(S.label));
|
|
1260
1260
|
}, [
|
|
1261
1261
|
E,
|
|
1262
1262
|
I,
|
|
1263
1263
|
f
|
|
1264
|
-
]),
|
|
1264
|
+
]), F = _(() => r(""), [
|
|
1265
1265
|
r
|
|
1266
1266
|
]), { onInputKeyDown: D, ...g } = At({
|
|
1267
1267
|
options: N,
|
|
1268
1268
|
value: o,
|
|
1269
1269
|
commit: r,
|
|
1270
|
-
clear:
|
|
1270
|
+
clear: F,
|
|
1271
1271
|
onBlur: d
|
|
1272
|
-
}), R = me("subdivision"),
|
|
1272
|
+
}), R = me("subdivision"), w = 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(w, {
|
|
1276
1276
|
label: R
|
|
1277
1277
|
}),
|
|
1278
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
1278
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Se, {
|
|
1279
1279
|
"aria-labelledby": y,
|
|
1280
1280
|
...g,
|
|
1281
1281
|
isDisabled: s,
|
|
@@ -1284,7 +1284,7 @@ const H = ({ children: e }) => {
|
|
|
1284
1284
|
isInvalid: a,
|
|
1285
1285
|
onFocus: m,
|
|
1286
1286
|
menuTrigger: "input"
|
|
1287
|
-
}, v(
|
|
1287
|
+
}, v(T, {
|
|
1288
1288
|
onKeyDown: D
|
|
1289
1289
|
}), v(O, {
|
|
1290
1290
|
options: N
|
|
@@ -1292,7 +1292,7 @@ const H = ({ children: e }) => {
|
|
|
1292
1292
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, j, h)
|
|
1293
1293
|
});
|
|
1294
1294
|
}, ve = ({ children: e, className: t, ...o }) => {
|
|
1295
|
-
const { disabled: r, hasError: s } =
|
|
1295
|
+
const { disabled: r, hasError: s } = P(), { onKeyDown: l } = o, i = b(e, ve.Input), a = b(e, ve.Trigger);
|
|
1296
1296
|
return /* @__PURE__ */ n.createElement(Ot, {
|
|
1297
1297
|
className: t,
|
|
1298
1298
|
isDisabled: r,
|
|
@@ -1301,7 +1301,7 @@ const H = ({ children: e }) => {
|
|
|
1301
1301
|
onKeyDown: l
|
|
1302
1302
|
}), a);
|
|
1303
1303
|
}, tr = ({ className: e, ...t }) => {
|
|
1304
|
-
const { id: o, placeholder: r, readOnly: s, disabled: l } =
|
|
1304
|
+
const { id: o, placeholder: r, readOnly: s, disabled: l } = P(), { inputId: i, ariaDescribedBy: a } = M(), { onKeyDown: d } = t, m = x(null), u = Rt({
|
|
1305
1305
|
readOnly: s,
|
|
1306
1306
|
disabled: l
|
|
1307
1307
|
});
|
|
@@ -1325,13 +1325,13 @@ const H = ({ children: e }) => {
|
|
|
1325
1325
|
}, e);
|
|
1326
1326
|
ve.Input = tr;
|
|
1327
1327
|
ve.Trigger = nr;
|
|
1328
|
-
const
|
|
1329
|
-
const { options: r } = o, s = b(e,
|
|
1330
|
-
return /* @__PURE__ */ n.createElement(
|
|
1328
|
+
const ze = ({ children: e, className: t, ...o }) => {
|
|
1329
|
+
const { options: r } = o, s = b(e, ze.Option);
|
|
1330
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
1331
1331
|
className: t,
|
|
1332
1332
|
containerPadding: 0,
|
|
1333
1333
|
offset: 0
|
|
1334
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1334
|
+
}, /* @__PURE__ */ n.createElement(Te, null, r.map((l) => v(s, {
|
|
1335
1335
|
key: l.value,
|
|
1336
1336
|
value: l.value,
|
|
1337
1337
|
label: l.label
|
|
@@ -1344,10 +1344,10 @@ const Qe = ({ children: e, className: t, ...o }) => {
|
|
|
1344
1344
|
textValue: r
|
|
1345
1345
|
}, r);
|
|
1346
1346
|
};
|
|
1347
|
-
|
|
1347
|
+
ze.Option = rr;
|
|
1348
1348
|
H.Label = de;
|
|
1349
1349
|
H.Control = ve;
|
|
1350
|
-
H.Options =
|
|
1350
|
+
H.Options = ze;
|
|
1351
1351
|
H.Description = ie;
|
|
1352
1352
|
H.Error = ce;
|
|
1353
1353
|
const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("city"), lr = () => ue("addressLine"), ir = () => ue("addressLine2"), cr = () => ue("postalCode"), dr = () => ue("streetName"), ur = () => ue("streetNumber"), mr = () => ue("apartment"), pr = {
|
|
@@ -1361,12 +1361,12 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1361
1361
|
[K.MLA_STREET_NUMBER]: ur,
|
|
1362
1362
|
[K.MLA_APARTMENT]: mr
|
|
1363
1363
|
}, Er = {}, br = [], 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 } =
|
|
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 = Vt(), R = q(() => ({
|
|
1365
1365
|
...g,
|
|
1366
1366
|
...pr
|
|
1367
1367
|
}), [
|
|
1368
1368
|
g
|
|
1369
|
-
]), { isExperimentEnabled:
|
|
1369
|
+
]), { isExperimentEnabled: w } = Ct(), T = w(It.STREETLESS_LOCALITY_FALLBACK), { validateFields: O } = $t(), h = Wt(), j = Nt(), fe = q(() => ({
|
|
1370
1370
|
...j,
|
|
1371
1371
|
actions: {
|
|
1372
1372
|
predict: Ht,
|
|
@@ -1376,7 +1376,7 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1376
1376
|
}
|
|
1377
1377
|
}), [
|
|
1378
1378
|
j
|
|
1379
|
-
]), { form:
|
|
1379
|
+
]), { form: V, isMultilineAddressField: A } = On({
|
|
1380
1380
|
id: o,
|
|
1381
1381
|
target: p,
|
|
1382
1382
|
fieldType: N,
|
|
@@ -1385,10 +1385,10 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1385
1385
|
fieldSettings: u,
|
|
1386
1386
|
validation: I,
|
|
1387
1387
|
required: f
|
|
1388
|
-
}),
|
|
1388
|
+
}), S = _(($) => {
|
|
1389
1389
|
if (!s)
|
|
1390
1390
|
return;
|
|
1391
|
-
const X = dn(
|
|
1391
|
+
const X = dn($, A, T), _e = {
|
|
1392
1392
|
...X,
|
|
1393
1393
|
[ye.COUNTRY]: X[ye.COUNTRY] ?? s[ye.COUNTRY]
|
|
1394
1394
|
};
|
|
@@ -1397,9 +1397,9 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1397
1397
|
l,
|
|
1398
1398
|
s,
|
|
1399
1399
|
A,
|
|
1400
|
-
|
|
1401
|
-
]), J = _((
|
|
1402
|
-
if (A &&
|
|
1400
|
+
T
|
|
1401
|
+
]), J = _(($, X) => {
|
|
1402
|
+
if (A && $ === ye.COUNTRY && (s == null ? void 0 : s[$]) !== X) {
|
|
1403
1403
|
l == null || l({
|
|
1404
1404
|
[ye.COUNTRY]: X
|
|
1405
1405
|
});
|
|
@@ -1407,19 +1407,19 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1407
1407
|
}
|
|
1408
1408
|
l == null || l({
|
|
1409
1409
|
...s,
|
|
1410
|
-
[
|
|
1410
|
+
[$]: X
|
|
1411
1411
|
});
|
|
1412
1412
|
}, [
|
|
1413
1413
|
l,
|
|
1414
1414
|
s,
|
|
1415
1415
|
A
|
|
1416
|
-
]), pe = _(async (
|
|
1417
|
-
|
|
1416
|
+
]), pe = _(async ($) => O(A ? [
|
|
1417
|
+
...$,
|
|
1418
1418
|
{
|
|
1419
1419
|
path: `${p}/${ye.COUNTRY}`,
|
|
1420
1420
|
value: s == null ? void 0 : s.country
|
|
1421
1421
|
}
|
|
1422
|
-
] :
|
|
1422
|
+
] : $), [
|
|
1423
1423
|
s,
|
|
1424
1424
|
p,
|
|
1425
1425
|
O,
|
|
@@ -1427,13 +1427,13 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1427
1427
|
]);
|
|
1428
1428
|
jt(o, () => {
|
|
1429
1429
|
var _e;
|
|
1430
|
-
const
|
|
1430
|
+
const $ = d == null ? void 0 : d[0], X = (_e = V == null ? void 0 : V.fields) == null ? void 0 : _e.find((lt) => "target" in lt && lt.target === ($ == null ? void 0 : $.errorPath));
|
|
1431
1431
|
return X == null ? void 0 : X.id;
|
|
1432
1432
|
});
|
|
1433
|
-
const he = tn(o),
|
|
1433
|
+
const he = tn(o), Qe = v(b(e, c.Country), {
|
|
1434
1434
|
isForcedOpen: he
|
|
1435
|
-
}), Ze = b(e, c.Subdivision), et = b(e, c.City), tt = b(e, c.AddressLine), nt = b(e, c.AddressLine2), rt = b(e, c.PostalCode), ot = b(e, c.StreetName), st = b(e, c.StreetNumber), at = b(e, c.Apartment),
|
|
1436
|
-
country:
|
|
1435
|
+
}), Ze = b(e, c.Subdivision), et = b(e, c.City), tt = b(e, c.AddressLine), nt = b(e, c.AddressLine2), rt = b(e, c.PostalCode), ot = b(e, c.StreetName), st = b(e, c.StreetNumber), at = b(e, c.Apartment), Pt = q(() => ({
|
|
1436
|
+
country: Qe,
|
|
1437
1437
|
subdivision: Ze,
|
|
1438
1438
|
city: et,
|
|
1439
1439
|
addressLine: tt,
|
|
@@ -1443,7 +1443,7 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1443
1443
|
streetNumber: st,
|
|
1444
1444
|
apartment: at
|
|
1445
1445
|
}), [
|
|
1446
|
-
|
|
1446
|
+
Qe,
|
|
1447
1447
|
Ze,
|
|
1448
1448
|
et,
|
|
1449
1449
|
tt,
|
|
@@ -1453,22 +1453,22 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1453
1453
|
st,
|
|
1454
1454
|
at
|
|
1455
1455
|
]);
|
|
1456
|
-
return
|
|
1456
|
+
return V ? /* @__PURE__ */ n.createElement(m, {
|
|
1457
1457
|
fieldId: o
|
|
1458
1458
|
}, /* @__PURE__ */ n.createElement(mn, {
|
|
1459
1459
|
countryCode: s == null ? void 0 : s.country
|
|
1460
1460
|
}, /* @__PURE__ */ n.createElement(un, {
|
|
1461
1461
|
autocompleteEnabled: E,
|
|
1462
|
-
onAddressSelect:
|
|
1462
|
+
onAddressSelect: S
|
|
1463
1463
|
}, /* @__PURE__ */ n.createElement(gn, {
|
|
1464
|
-
fields:
|
|
1464
|
+
fields: Pt
|
|
1465
1465
|
}, /* @__PURE__ */ n.createElement("div", {
|
|
1466
1466
|
ref: D,
|
|
1467
1467
|
style: {
|
|
1468
1468
|
display: "contents"
|
|
1469
1469
|
}
|
|
1470
|
-
}), /* @__PURE__ */ n.createElement(
|
|
1471
|
-
getContainer: () =>
|
|
1470
|
+
}), /* @__PURE__ */ n.createElement(Tt, {
|
|
1471
|
+
getContainer: () => F
|
|
1472
1472
|
}, /* @__PURE__ */ n.createElement("fieldset", {
|
|
1473
1473
|
className: t,
|
|
1474
1474
|
style: Zt
|
|
@@ -1476,7 +1476,7 @@ const or = () => ue("country"), sr = () => ue("subdivision"), ar = () => ue("cit
|
|
|
1476
1476
|
style: en
|
|
1477
1477
|
}, y), /* @__PURE__ */ n.createElement(Jt, {
|
|
1478
1478
|
formSchema: h,
|
|
1479
|
-
form:
|
|
1479
|
+
form: V,
|
|
1480
1480
|
values: s ?? Er,
|
|
1481
1481
|
onFieldChange: J,
|
|
1482
1482
|
onBlur: i,
|
|
@@ -1503,13 +1503,13 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
1503
1503
|
}, Br = () => {
|
|
1504
1504
|
const e = dt(Gt, [
|
|
1505
1505
|
Re.comboControl
|
|
1506
|
-
]), t = dt(
|
|
1506
|
+
]), t = dt(Qt, []), o = an(zt, Me);
|
|
1507
1507
|
return /* @__PURE__ */ n.createElement(c, {
|
|
1508
1508
|
className: Xt
|
|
1509
1509
|
}, /* @__PURE__ */ n.createElement(c.Country, null, /* @__PURE__ */ n.createElement(c.Country.Label, {
|
|
1510
|
-
className: L(
|
|
1510
|
+
className: L(z, C.label)
|
|
1511
1511
|
}, /* @__PURE__ */ n.createElement(c.Country.Label.Required, {
|
|
1512
|
-
className: L(
|
|
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, {
|
|
@@ -1530,9 +1530,9 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
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(z, C.label)
|
|
1534
1534
|
}, /* @__PURE__ */ n.createElement(c.AddressLine.Label.Required, {
|
|
1535
|
-
className: L(
|
|
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, {
|
|
@@ -1547,9 +1547,9 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
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(z, C.label)
|
|
1551
1551
|
}, /* @__PURE__ */ n.createElement(c.AddressLine2.Label.Required, {
|
|
1552
|
-
className: L(
|
|
1552
|
+
className: L(Q, C.requiredMark)
|
|
1553
1553
|
})), /* @__PURE__ */ n.createElement(c.AddressLine2.Input, {
|
|
1554
1554
|
className: t
|
|
1555
1555
|
}), /* @__PURE__ */ n.createElement(c.AddressLine2.Error, {
|
|
@@ -1560,9 +1560,9 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
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(z, C.label)
|
|
1564
1564
|
}, /* @__PURE__ */ n.createElement(c.City.Label.Required, {
|
|
1565
|
-
className: L(
|
|
1565
|
+
className: L(Q, C.requiredMark)
|
|
1566
1566
|
})), /* @__PURE__ */ n.createElement(c.City.Input, {
|
|
1567
1567
|
className: t
|
|
1568
1568
|
}), /* @__PURE__ */ n.createElement(c.City.Error, {
|
|
@@ -1573,9 +1573,9 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
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(z, C.label)
|
|
1577
1577
|
}, /* @__PURE__ */ n.createElement(c.PostalCode.Label.Required, {
|
|
1578
|
-
className: L(
|
|
1578
|
+
className: L(Q, C.requiredMark)
|
|
1579
1579
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Control, {
|
|
1580
1580
|
className: Re.postalCodeControl
|
|
1581
1581
|
}, /* @__PURE__ */ n.createElement(c.PostalCode.Control.Input, {
|
|
@@ -1592,9 +1592,9 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
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(z, C.label)
|
|
1596
1596
|
}, /* @__PURE__ */ n.createElement(c.Subdivision.Label.Required, {
|
|
1597
|
-
className: L(
|
|
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, {
|
|
@@ -1615,9 +1615,9 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
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(z, C.label)
|
|
1619
1619
|
}, /* @__PURE__ */ n.createElement(c.StreetName.Label.Required, {
|
|
1620
|
-
className: L(
|
|
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, {
|
|
@@ -1632,9 +1632,9 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
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(z, C.label)
|
|
1636
1636
|
}, /* @__PURE__ */ n.createElement(c.StreetNumber.Label.Required, {
|
|
1637
|
-
className: L(
|
|
1637
|
+
className: L(Q, C.requiredMark)
|
|
1638
1638
|
})), /* @__PURE__ */ n.createElement(c.StreetNumber.Input, {
|
|
1639
1639
|
className: t
|
|
1640
1640
|
}), /* @__PURE__ */ n.createElement(c.StreetNumber.Error, {
|
|
@@ -1645,9 +1645,9 @@ const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_co
|
|
|
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(z, C.label)
|
|
1649
1649
|
}, /* @__PURE__ */ n.createElement(c.Apartment.Label.Required, {
|
|
1650
|
-
className: L(
|
|
1650
|
+
className: L(Q, C.requiredMark)
|
|
1651
1651
|
})), /* @__PURE__ */ n.createElement(c.Apartment.Input, {
|
|
1652
1652
|
className: t
|
|
1653
1653
|
}), /* @__PURE__ */ n.createElement(c.Apartment.Error, {
|