@wix/form-elements 1.169.0 → 1.171.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-BbXyKTd7.js → appointment-rac-DZ0SFXmL.js} +83 -83
- package/dist/component/{bookings-address-rac-VJkR_U9L.js → bookings-address-rac-BW9grc77.js} +1 -1
- package/dist/component/{bookings-email-rac-_EupwXpQ.js → bookings-email-rac-D8gMaAfB.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DTZixHYj.js → bookings-first-name-rac-CAjcs7b6.js} +1 -1
- package/dist/component/{bookings-header-rac-BKbKTv5g.js → bookings-header-rac-BhKZ1kku.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BDy860-C.js → bookings-last-name-rac-DpsMDuU0.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DgNP-YNZ.js → bookings-login-bar-rac-BVdWmKS8.js} +3 -3
- package/dist/component/{bookings-phone-rac-B_I6n96b.js → bookings-phone-rac-DsqNi2mI.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-prYPbIiz.js → bookings-rich-text-rac-elM4Ne3f.js} +1 -1
- package/dist/component/{checkbox-field-rac-C-4PXuxG.js → checkbox-field-rac-BU4E73fD.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-D16bAcaq.js → checkbox-group-field-headless-6yJdIbP2.js} +41 -41
- package/dist/component/{checkbox-group-field-rac-GUQ5dO_s.js → checkbox-group-field-rac-CojbCWSF.js} +4 -4
- package/dist/component/{checkbox-group-rac-Bl6xL5-H.js → checkbox-group-rac-3qUVUc-C.js} +1 -1
- package/dist/component/{checkbox-rac-Blg0KVyP.js → checkbox-rac-DwbTapd_.js} +1 -1
- package/dist/component/{contacts-address-rac-BfOhCAj8.js → contacts-address-rac-BL7XDZuP.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DYBvDh62.js → contacts-birthdate-rac-DeJYIHAg.js} +1 -1
- package/dist/component/{contacts-company-rac-DIJr7zjA.js → contacts-company-rac-BeImf5uc.js} +1 -1
- package/dist/component/{contacts-email-rac-DjmqELhC.js → contacts-email-rac-CtacwrZ0.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DGNll7gw.js → contacts-first-name-rac-CAdOqOOA.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BJ8AZYQN.js → contacts-last-name-rac-Db9mHzCW.js} +1 -1
- package/dist/component/{contacts-phone-rac-BC-QtpEN.js → contacts-phone-rac-W0OLEbzL.js} +1 -1
- package/dist/component/{contacts-position-rac-BQia__74.js → contacts-position-rac-CV4Ibt4Z.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CTFptz01.js → contacts-subscribe-rac-CQ3Q1pjZ.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-Cy72Jouc.js → contacts-tax-id-rac-Dux-pk6r.js} +1 -1
- package/dist/component/{date-availability-BC6updcS.js → date-availability-RkX-Qw7G.js} +1 -1
- package/dist/component/date-input-field-rac-CYCT6qoa.js +309 -0
- package/dist/component/{date-input-rac-KkRyWRP_.js → date-input-rac-BkYZ7q_o.js} +1 -1
- package/dist/component/{date-picker-field-rac-BLWVJbTJ.js → date-picker-field-rac-eMidYtsl.js} +31 -31
- package/dist/component/{date-picker-rac-DKCQza7v.js → date-picker-rac-D23rxZcF.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CZxZW6fz.js → date-time-input-field-rac-BjIj4dXQ.js} +111 -111
- package/dist/component/{date-time-input-rac-DQ-iBwmr.js → date-time-input-rac-BSGAdk9L.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-kp1Jbwt-.js → dext-checkbox-group-rac-Xmb5IKrb.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CBm9cRUz.js → dext-checkbox-rac-2eA7y0ld.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DsVKWsRy.js → dext-date-picker-rac-CmLxVGGT.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CO26-8Qo.js → dext-date-time-input-rac-Cd9nwSjb.js} +1 -1
- package/dist/component/{dext-dropdown-rac-eRzu2C-y.js → dext-dropdown-rac-BKdQ0nGS.js} +1 -1
- package/dist/component/{dext-email-rac-DDrZzE_G.js → dext-email-rac-07zDPxyf.js} +1 -1
- package/dist/component/{dext-number-input-rac-Dj7sInLk.js → dext-number-input-rac-DRvGuppY.js} +1 -1
- package/dist/component/{dext-phone-rac-g8M77F7m.js → dext-phone-rac-CKtTVjFg.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BjhygC0R.js → dext-radio-group-rac-BsBmMufq.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BraNjvyA.js → dext-rating-input-rac-CcFSTAIh.js} +1 -1
- package/dist/component/{dext-tags-rac-B5mAIuDi.js → dext-tags-rac-CCTDlCvX.js} +2 -2
- package/dist/component/{dext-text-area-rac-D_YBnaWi.js → dext-text-area-rac-Cif8po9h.js} +1 -1
- package/dist/component/{dext-text-input-rac-BzeWH1jv.js → dext-text-input-rac-2118X4iF.js} +1 -1
- package/dist/component/{dext-url-input-rac-Cn0h_vx3.js → dext-url-input-rac-DDImGkQe.js} +1 -1
- package/dist/component/{donation-rac-CQRdHxWh.js → donation-rac-Dnylss1d.js} +103 -103
- package/dist/component/{dropdown-field-rac-C7LL0W5Z.js → dropdown-field-rac-DDI4ZgZH.js} +3 -3
- package/dist/component/{dropdown-rac-Nb2VyJ0x.js → dropdown-rac-DX0Z3R_8.js} +1 -1
- package/dist/component/{ecom-address-rac-_c2YIIwg.js → ecom-address-rac-D9MeEQsk.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Bma7TAVj.js → ecom-subscription-checkbox-rac-DKJ9j5dj.js} +2 -2
- package/dist/component/{email-input-field-rac-2E2tEaS5.js → email-input-field-rac-DaKrmlwe.js} +55 -55
- package/dist/component/{events-repeater-rac-COWHYBFD.js → events-repeater-rac-DWrOLT0Y.js} +45 -45
- package/dist/component/{events-rsvp-rac-CXp8j19Y.js → events-rsvp-rac-YBTR1tR0.js} +6 -6
- package/dist/component/{field-error-headless-S-ugOQQX.js → field-error-headless-jksFrezt.js} +10 -10
- package/dist/component/{field-label-headless-_n4I0_tX.js → field-label-headless-BBvJAVxI.js} +10 -10
- package/dist/component/{file-upload-rac-DCH_iwDg.js → file-upload-rac-CgdmfUZG.js} +168 -168
- package/dist/component/{fixed-payment-rac-CYkKJUfM.js → fixed-payment-rac-v6rKwzFs.js} +13 -13
- package/dist/component/{form-jK8ezTss.js → form-BsiK682r.js} +530 -502
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DnbjI6W5.js → header-field-rac-BuXybl7K.js} +6 -6
- package/dist/component/{header-rac-DKUICrni.js → header-rac-CDyaLosW.js} +1 -1
- package/dist/component/{image-choice-rac-B_9ponST.js → image-choice-rac-BRlMroBw.js} +41 -41
- package/dist/component/{index-BxdMzOvN.js → index-BanOeCAF.js} +242 -236
- package/dist/component/{index-ZYnsxY-a.js → index-y9URYGEE.js} +6 -6
- package/dist/component/{isObjectLike-BW-9QEQl.js → isObjectLike-BG9nJ-rx.js} +7 -7
- package/dist/component/{multiline-address-field-rac-k-P0ijWG.js → multiline-address-field-rac-DRAkxI1l.js} +342 -342
- package/dist/component/{multiline-address-rac-Bbn9mNDa.js → multiline-address-rac-JjTzWsEb.js} +1 -1
- package/dist/component/{number-input-field-rac--lom-B_X.js → number-input-field-rac-QrouG7Hv.js} +22 -22
- package/dist/component/{number-input-rac-Bhbd6T9S.js → number-input-rac-DGmE7cLv.js} +1 -1
- package/dist/component/{password-rac-BV_uTHb3.js → password-rac-DeyY228m.js} +28 -28
- package/dist/component/{payment-input-rac-cawyGN_t.js → payment-input-rac-DmIennLi.js} +45 -45
- package/dist/component/{phone-input-field-rac-CsElHRto.js → phone-input-field-rac-F7e74TGA.js} +76 -76
- package/dist/component/{phone-rac-XrHN5Nko.js → phone-rac-CQfB2CQD.js} +1 -1
- package/dist/component/{product-list-rac-cxv_xz7K.js → product-list-rac--GGG8vvO.js} +62 -62
- package/dist/component/{quiz-radio-group-rac-DGaxOPE1.js → quiz-radio-group-rac-DF2C2vNq.js} +1 -1
- package/dist/component/{radio-button-module-classes-Xv2Jn01x.js → radio-button-module-classes-DmpNo6F2.js} +17 -17
- package/dist/component/{radio-group-field-rac-DgGqgTql.js → radio-group-field-rac-BGcPYfKO.js} +6 -6
- package/dist/component/{radio-group-rac-Bh0E-oe1.js → radio-group-rac-CqysUMCE.js} +1 -1
- package/dist/component/{rating-input-field-rac-C3YLV971.js → rating-input-field-rac-D-ei917Y.js} +24 -24
- package/dist/component/{rating-input-rac-CfcC5EUh.js → rating-input-rac-a9zJ74fw.js} +1 -1
- package/dist/component/{rich-content-rac.module-DUjzLGtX.js → rich-content-rac.module-CvyLVlXL.js} +5 -5
- package/dist/component/{rich-text-field-rac-BmguoJhk.js → rich-text-field-rac-vf19nvyw.js} +7 -7
- package/dist/component/{rich-text-rac-BWhHcq25.js → rich-text-rac-Cx_wpoxC.js} +1 -1
- package/dist/component/{service-dropdown-rac-C5oX-ql7.js → service-dropdown-rac-DITzKQxd.js} +26 -26
- package/dist/component/{services-multi-choice-rac-C1fem9NB.js → services-multi-choice-rac-BtisN0Aq.js} +11 -11
- package/dist/component/{signature-rac-BtHqiWj1.js → signature-rac-DUeIoS5O.js} +226 -226
- package/dist/component/{submit-button-rac-OYeKJFF8.js → submit-button-rac-C8h6zeTw.js} +36 -36
- package/dist/component/{tags-field-rac-kA2RSijL.js → tags-field-rac-CjFuiB0n.js} +51 -51
- package/dist/component/{tags-rac-B_2qCZGu.js → tags-rac-BO7rwyLl.js} +1 -1
- package/dist/component/{text-area-field-rac-DeO609Mv.js → text-area-field-rac-CgUx3nQ0.js} +23 -23
- package/dist/component/{text-area-rac-BAQFBOZd.js → text-area-rac-WgXYXIaf.js} +1 -1
- package/dist/component/{text-input-field-rac-CCcKwuLZ.js → text-input-field-rac-DaxWFha-.js} +6 -6
- package/dist/component/{text-input-headless-D8-jkaYm.js → text-input-headless-hjuRJTZN.js} +6 -6
- package/dist/component/{text-input-rac-BVcgjj8g.js → text-input-rac-BzumrJBj.js} +1 -1
- package/dist/component/{time-input-rac-BYctyHgU.js → time-input-rac-2FEkpQ7M.js} +18 -18
- package/dist/component/{url-input-field-rac-COC9qgcs.js → url-input-field-rac-BZ9f8D8I.js} +26 -26
- package/dist/component/{url-input-rac-BZXLh0Ej.js → url-input-rac-D-AVlxkD.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BTltqRl1.js → use-dropdown-option-class-name-DwAAtzgX.js} +11 -11
- package/dist/component/{use-dropdown-trigger-class-name-BjJZfl3i.js → use-dropdown-trigger-class-name-D-6n9YVG.js} +18 -18
- package/dist/component/{use-element-state-class-name-CkT6Ga8t.js → use-element-state-class-name-C5auxwhj.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BkoSr6tr.js → use-hoverable-input-class-name-Nd2jqfz4.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-CKaHhCqp.js +64 -0
- package/dist/component/{use-service-options-base-Wp8RZ4Z8.js → use-service-options-base-CvluFheT.js} +3 -3
- package/dist/component/use-text-input-class-name-DGTlYJxC.js +6 -0
- package/dist/form.d.ts +19 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-b_T1yf8D.js +0 -309
- package/dist/component/use-is-forced-open-dropdown-fo_NCnSk.js +0 -53
- package/dist/component/use-text-input-class-name-DS7i03Gk.js +0 -6
|
@@ -1,23 +1,23 @@
|
|
|
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 w, createContext as Ve, useContext as Ce, useState as Ee, useRef as x, useCallback as _, useEffect as Ae } from "react";
|
|
4
|
+
import { UNSAFE_PortalProvider as Pt } from "react-aria";
|
|
5
|
+
import { bF as Ct, d as It, bA as Mt, bC as Lt, bd as qt, be as wt, b6 as xt, bc as W, F as K, bU as Te, bt as it, bK as T, bH as M, bM as ae, bG as Nt, bi as Bt, C as Oe, br as kt, bv as Ut, bR as $t, bL as Vt, bQ as Wt, by as Kt, bn as Yt, bx as Ht, bN as jt, aO as Jt, Y as Xt, _ as Q, al as z, $ as Ne, M as Z, I as ee, Z as Gt, a0 as Qt, a1 as zt } from "./form-BsiK682r.js";
|
|
6
6
|
import { f as b, a as v } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { F as
|
|
8
|
-
import {
|
|
9
|
-
import { TextField as be, Input as le, ComboBoxStateContext 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
|
|
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-CKaHhCqp.js";
|
|
9
|
+
import { TextField as be, Input as le, ComboBoxStateContext as We, ComboBox as Fe, Popover as Se, ListBox as Pe, 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-jksFrezt.js";
|
|
11
|
+
import { L as de } from "./field-label-headless-BBvJAVxI.js";
|
|
12
|
+
import { e as nn, c as rn, a as on, r as vt } from "./isObjectLike-BG9nJ-rx.js";
|
|
13
|
+
import { V as sn, a as an } from "./use-dropdown-option-class-name-DwAAtzgX.js";
|
|
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-
|
|
20
|
-
const
|
|
19
|
+
import { u as dt } from "./use-hoverable-input-class-name-Nd2jqfz4.js";
|
|
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) => {
|
|
23
23
|
var m, u, y, I, p, E;
|
|
@@ -47,15 +47,15 @@ const ln = (e, t, o) => {
|
|
|
47
47
|
var ye = /* @__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 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 Ft = /* @__PURE__ */
|
|
54
|
+
const Ft = /* @__PURE__ */ Ve({
|
|
55
55
|
onAddressSelect: () => {
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
58
|
-
const r =
|
|
57
|
+
}), un = ({ children: e, onAddressSelect: t, autocompleteEnabled: o }) => {
|
|
58
|
+
const r = w(() => ({
|
|
59
59
|
onAddressSelect: t,
|
|
60
60
|
autocompleteEnabled: o
|
|
61
61
|
}), [
|
|
@@ -69,8 +69,8 @@ const Ft = /* @__PURE__ */ $e({
|
|
|
69
69
|
function Ie() {
|
|
70
70
|
return Ce(Ft);
|
|
71
71
|
}
|
|
72
|
-
const St = /* @__PURE__ */
|
|
73
|
-
const o =
|
|
72
|
+
const St = /* @__PURE__ */ Ve(void 0), mn = ({ children: e, countryCode: t }) => {
|
|
73
|
+
const o = w(() => ({
|
|
74
74
|
countryCode: t
|
|
75
75
|
}), [
|
|
76
76
|
t
|
|
@@ -83,10 +83,10 @@ function Le() {
|
|
|
83
83
|
const e = Ce(St);
|
|
84
84
|
return e == null ? void 0 : e.countryCode;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function qe(e) {
|
|
87
87
|
return e != null;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function pn(e, t, o) {
|
|
90
90
|
return !t || !o ? e : {
|
|
91
91
|
...e,
|
|
92
92
|
fields: (e.fields ?? []).map((r) => {
|
|
@@ -97,10 +97,10 @@ function mn(e, t, o) {
|
|
|
97
97
|
...r.view,
|
|
98
98
|
...l
|
|
99
99
|
},
|
|
100
|
-
...
|
|
100
|
+
...qe(s) && {
|
|
101
101
|
hidden: !s
|
|
102
102
|
},
|
|
103
|
-
...
|
|
103
|
+
...qe(i) && qe(r.validation) && {
|
|
104
104
|
validation: {
|
|
105
105
|
...r.validation,
|
|
106
106
|
required: i
|
|
@@ -110,31 +110,31 @@ function mn(e, t, o) {
|
|
|
110
110
|
})
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
const
|
|
113
|
+
const En = (e, t) => e.map((o) => ({
|
|
114
114
|
...o,
|
|
115
115
|
id: ("target" in o ? t[o.target] : void 0) ?? o.id
|
|
116
|
-
})),
|
|
116
|
+
})), Dt = 12, bn = (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
|
+
}, fn = (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
|
+
}, yn = (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) !== Dt && (t[r] = s);
|
|
133
133
|
}), t;
|
|
134
|
-
},
|
|
134
|
+
}, Cn = (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 = Dt / 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 pn = (e, t) => e.map((o) => ({
|
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
return o;
|
|
148
|
-
}),
|
|
148
|
+
}), In = (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,37 +160,37 @@ const pn = (e, t) => e.map((o) => ({
|
|
|
160
160
|
}
|
|
161
161
|
return s;
|
|
162
162
|
});
|
|
163
|
-
},
|
|
164
|
-
const { visibleFields: t, hiddenFields: o } =
|
|
163
|
+
}, Ln = (e) => {
|
|
164
|
+
const { visibleFields: t, hiddenFields: o } = bn(e.fields), r = fn(t), s = yn(r), l = Cn(e.fields, s), i = In(l, t, o);
|
|
165
165
|
return {
|
|
166
166
|
...e,
|
|
167
167
|
fields: i
|
|
168
168
|
};
|
|
169
|
-
},
|
|
170
|
-
country:
|
|
171
|
-
subdivision:
|
|
172
|
-
city:
|
|
173
|
-
address_line:
|
|
174
|
-
address_line_2:
|
|
175
|
-
postal_code:
|
|
176
|
-
street_name:
|
|
177
|
-
street_number:
|
|
178
|
-
apartment:
|
|
179
|
-
}),
|
|
180
|
-
const [d] = Ee(
|
|
169
|
+
}, Nn = () => ({
|
|
170
|
+
country: W(),
|
|
171
|
+
subdivision: W(),
|
|
172
|
+
city: W(),
|
|
173
|
+
address_line: W(),
|
|
174
|
+
address_line_2: W(),
|
|
175
|
+
postal_code: W(),
|
|
176
|
+
street_name: W(),
|
|
177
|
+
street_number: W(),
|
|
178
|
+
apartment: W()
|
|
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 = w(() => {
|
|
181
181
|
var g;
|
|
182
|
-
return
|
|
182
|
+
return qt(a, (g = i == null ? void 0 : i.predefined) == null ? void 0 : g.multilineAddressOptions);
|
|
183
183
|
}, [
|
|
184
184
|
i,
|
|
185
185
|
a
|
|
186
|
-
]), S =
|
|
186
|
+
]), S = w(() => wt(), []);
|
|
187
187
|
return {
|
|
188
|
-
form:
|
|
189
|
-
var
|
|
188
|
+
form: w(() => {
|
|
189
|
+
var P, O;
|
|
190
190
|
if (!f || !E)
|
|
191
191
|
return r && {
|
|
192
192
|
...r,
|
|
193
|
-
fields:
|
|
193
|
+
fields: En(r.fields, d)
|
|
194
194
|
};
|
|
195
195
|
const g = xt({
|
|
196
196
|
useFieldsV2: u,
|
|
@@ -199,14 +199,14 @@ const pn = (e, t) => e.map((o) => ({
|
|
|
199
199
|
includeHiddenFields: !0,
|
|
200
200
|
isMobile: I,
|
|
201
201
|
breakpoint: p,
|
|
202
|
-
form:
|
|
202
|
+
form: pn(cn(E, N, S), l, (O = (P = i == null ? void 0 : i.predefined) == null ? void 0 : P.multilineAddressOptions) == null ? void 0 : O.fields)
|
|
203
203
|
});
|
|
204
|
-
if (!g.fields.some((
|
|
204
|
+
if (!g.fields.some((h) => h.properties.hidden))
|
|
205
205
|
return g;
|
|
206
|
-
const
|
|
206
|
+
const q = Ln(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,28 +225,28 @@ const pn = (e, t) => e.map((o) => ({
|
|
|
225
225
|
]),
|
|
226
226
|
isMultilineAddressField: f
|
|
227
227
|
};
|
|
228
|
-
},
|
|
229
|
-
const o =
|
|
228
|
+
}, ht = /* @__PURE__ */ Ve(void 0), gn = ({ 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(ht.Provider, {
|
|
235
235
|
value: o
|
|
236
236
|
}, e);
|
|
237
237
|
};
|
|
238
238
|
function ue(e) {
|
|
239
|
-
const t = Ce(
|
|
239
|
+
const t = Ce(ht);
|
|
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 = 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 } = T(), { 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, {
|
|
@@ -265,8 +265,8 @@ const ne = ({ children: e }) => {
|
|
|
265
265
|
}, E),
|
|
266
266
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
267
267
|
});
|
|
268
|
-
},
|
|
269
|
-
const { id: t, placeholder: o } =
|
|
268
|
+
}, vn = ({ className: e }) => {
|
|
269
|
+
const { id: t, placeholder: o } = T(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
|
|
270
270
|
return ae(() => {
|
|
271
271
|
var i;
|
|
272
272
|
(i = l.current) == null || i.focus({
|
|
@@ -282,12 +282,12 @@ const ne = ({ children: e }) => {
|
|
|
282
282
|
});
|
|
283
283
|
};
|
|
284
284
|
ne.Label = de;
|
|
285
|
-
ne.Input =
|
|
285
|
+
ne.Input = vn;
|
|
286
286
|
ne.Description = ie;
|
|
287
287
|
ne.Error = ce;
|
|
288
288
|
const Ke = ({ enabled: e }) => {
|
|
289
|
-
const { actions: t } = Nt(), [o, r] = Ee(
|
|
290
|
-
return
|
|
289
|
+
const { actions: t } = Nt(), [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,17 +312,17 @@ const Ke = ({ enabled: e }) => {
|
|
|
312
312
|
s
|
|
313
313
|
]);
|
|
314
314
|
};
|
|
315
|
-
var
|
|
316
|
-
function
|
|
317
|
-
if (ut) return
|
|
315
|
+
var we, ut;
|
|
316
|
+
function Fn() {
|
|
317
|
+
if (ut) return we;
|
|
318
318
|
ut = 1;
|
|
319
|
-
var e =
|
|
319
|
+
var e = nn(), t = function() {
|
|
320
320
|
return e.Date.now();
|
|
321
321
|
};
|
|
322
|
-
return
|
|
322
|
+
return we = t, we;
|
|
323
323
|
}
|
|
324
324
|
var xe, mt;
|
|
325
|
-
function
|
|
325
|
+
function Sn() {
|
|
326
326
|
if (mt) return xe;
|
|
327
327
|
mt = 1;
|
|
328
328
|
var e = /\s/;
|
|
@@ -334,10 +334,10 @@ function Fn() {
|
|
|
334
334
|
return xe = t, xe;
|
|
335
335
|
}
|
|
336
336
|
var Be, pt;
|
|
337
|
-
function
|
|
337
|
+
function Dn() {
|
|
338
338
|
if (pt) return Be;
|
|
339
339
|
pt = 1;
|
|
340
|
-
var e =
|
|
340
|
+
var e = Sn(), t = /^\s+/;
|
|
341
341
|
function o(r) {
|
|
342
342
|
return r && r.slice(0, e(r) + 1).replace(t, "");
|
|
343
343
|
}
|
|
@@ -347,17 +347,17 @@ var ke, Et;
|
|
|
347
347
|
function hn() {
|
|
348
348
|
if (Et) return ke;
|
|
349
349
|
Et = 1;
|
|
350
|
-
var e =
|
|
350
|
+
var e = rn(), t = on(), o = "[object Symbol]";
|
|
351
351
|
function r(s) {
|
|
352
352
|
return typeof s == "symbol" || t(s) && e(s) == o;
|
|
353
353
|
}
|
|
354
354
|
return ke = r, ke;
|
|
355
355
|
}
|
|
356
356
|
var Ue, bt;
|
|
357
|
-
function
|
|
357
|
+
function _n() {
|
|
358
358
|
if (bt) return Ue;
|
|
359
359
|
bt = 1;
|
|
360
|
-
var e =
|
|
360
|
+
var e = Dn(), t = vt(), o = hn(), 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;
|
|
@@ -375,63 +375,63 @@ function Dn() {
|
|
|
375
375
|
}
|
|
376
376
|
return Ue = d, Ue;
|
|
377
377
|
}
|
|
378
|
-
var
|
|
378
|
+
var $e, ft;
|
|
379
379
|
function Rn() {
|
|
380
|
-
if (ft) return
|
|
380
|
+
if (ft) return $e;
|
|
381
381
|
ft = 1;
|
|
382
|
-
var e = vt(), t =
|
|
382
|
+
var e = vt(), t = Fn(), 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, S = !1,
|
|
384
|
+
var u, y, I, p, E, f, N = 0, S = !1, D = !1, g = !0;
|
|
385
385
|
if (typeof a != "function")
|
|
386
386
|
throw new TypeError(r);
|
|
387
|
-
d = o(d) || 0, e(m) && (S = !!m.leading,
|
|
388
|
-
function
|
|
387
|
+
d = o(d) || 0, e(m) && (S = !!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(F) {
|
|
389
389
|
var J = u, pe = y;
|
|
390
390
|
return u = y = void 0, N = F, p = a.apply(pe, J), p;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
return N = F, E = setTimeout(
|
|
392
|
+
function q(F) {
|
|
393
|
+
return N = F, E = setTimeout(h, d), S ? R(F) : p;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
var J = F - f, pe = F - N,
|
|
397
|
-
return
|
|
395
|
+
function P(F) {
|
|
396
|
+
var J = F - f, pe = F - N, he = d - J;
|
|
397
|
+
return D ? l(he, I - pe) : he;
|
|
398
398
|
}
|
|
399
399
|
function O(F) {
|
|
400
400
|
var J = F - f, pe = F - N;
|
|
401
|
-
return f === void 0 || J >= d || J < 0 ||
|
|
401
|
+
return f === void 0 || J >= d || J < 0 || D && pe >= I;
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function h() {
|
|
404
404
|
var F = t();
|
|
405
405
|
if (O(F))
|
|
406
406
|
return j(F);
|
|
407
|
-
E = setTimeout(
|
|
407
|
+
E = setTimeout(h, P(F));
|
|
408
408
|
}
|
|
409
409
|
function j(F) {
|
|
410
|
-
return E = void 0, g && u ?
|
|
410
|
+
return E = void 0, g && u ? R(F) : (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 $() {
|
|
416
416
|
return E === void 0 ? p : j(t());
|
|
417
417
|
}
|
|
418
418
|
function A() {
|
|
419
419
|
var F = t(), J = O(F);
|
|
420
420
|
if (u = arguments, y = this, f = F, J) {
|
|
421
421
|
if (E === void 0)
|
|
422
|
-
return
|
|
423
|
-
if (
|
|
424
|
-
return clearTimeout(E), E = setTimeout(
|
|
422
|
+
return q(f);
|
|
423
|
+
if (D)
|
|
424
|
+
return clearTimeout(E), E = setTimeout(h, d), R(f);
|
|
425
425
|
}
|
|
426
|
-
return E === void 0 && (E = setTimeout(
|
|
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 = $, A;
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return $e = i, $e;
|
|
431
431
|
}
|
|
432
|
-
var
|
|
433
|
-
const
|
|
434
|
-
const r = x(e), s =
|
|
432
|
+
var An = Rn();
|
|
433
|
+
const Tn = /* @__PURE__ */ Bt(An), Pn = (e, t, o = 200) => {
|
|
434
|
+
const r = x(e), s = _(Tn((...l) => {
|
|
435
435
|
r.current(...l);
|
|
436
436
|
}, o), [
|
|
437
437
|
o
|
|
@@ -442,7 +442,7 @@ const An = /* @__PURE__ */ Bt(_n), Pn = (e, t, o = 200) => {
|
|
|
442
442
|
e,
|
|
443
443
|
t
|
|
444
444
|
]), s;
|
|
445
|
-
},
|
|
445
|
+
}, Mn = () => {
|
|
446
446
|
const e = x(!0);
|
|
447
447
|
return Ae(() => () => {
|
|
448
448
|
e.current = !1;
|
|
@@ -450,8 +450,8 @@ const An = /* @__PURE__ */ Bt(_n), Pn = (e, t, o = 200) => {
|
|
|
450
450
|
}, yt = {
|
|
451
451
|
loading: !1,
|
|
452
452
|
predictions: []
|
|
453
|
-
},
|
|
454
|
-
const [{ loading: r, predictions: s }, l] = Ee(yt), i = x(0), a =
|
|
453
|
+
}, _t = ({ atlas: e, onError: t }) => {
|
|
454
|
+
const [{ loading: r, predictions: s }, l] = Ee(yt), i = x(0), a = Mn(), d = _(() => {
|
|
455
455
|
i.current++, l(yt);
|
|
456
456
|
}, []), m = Pn(async ({ input: u, countryCodes: y }) => {
|
|
457
457
|
if (!e || !a())
|
|
@@ -492,7 +492,7 @@ const An = /* @__PURE__ */ Bt(_n), Pn = (e, t, o = 200) => {
|
|
|
492
492
|
clearPredictions: d
|
|
493
493
|
};
|
|
494
494
|
}, Ye = ({ optionCount: e }) => {
|
|
495
|
-
const t = Ce(
|
|
495
|
+
const t = Ce(We), o = x(t);
|
|
496
496
|
o.current = t;
|
|
497
497
|
const r = x(e);
|
|
498
498
|
return Ae(() => {
|
|
@@ -504,13 +504,13 @@ const An = /* @__PURE__ */ Bt(_n), 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 } = T(), { labelId: I } = M(), { autocompleteEnabled: p } = Ie(), E = y || p, f = me("addressLine1"), N = b(e, B.Label), S = 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(qn, {
|
|
514
514
|
value: o,
|
|
515
515
|
onChange: r,
|
|
516
516
|
disabled: s,
|
|
@@ -519,8 +519,8 @@ const An = /* @__PURE__ */ Bt(_n), Pn = (e, t, o = 200) => {
|
|
|
519
519
|
hasError: a,
|
|
520
520
|
onBlur: d,
|
|
521
521
|
onFocus: m
|
|
522
|
-
}, S,
|
|
523
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
522
|
+
}, S, D),
|
|
523
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
524
524
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
525
525
|
fieldId: t,
|
|
526
526
|
renderLabel: () => v(N, {
|
|
@@ -537,19 +537,19 @@ const An = /* @__PURE__ */ Bt(_n), Pn = (e, t, o = 200) => {
|
|
|
537
537
|
onBlur: d,
|
|
538
538
|
onFocus: m
|
|
539
539
|
}, S),
|
|
540
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
540
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
541
541
|
});
|
|
542
|
-
},
|
|
542
|
+
}, qn = ({ 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
|
-
}), { predictions: p, updatePredictions: E, clearPredictions: f } =
|
|
545
|
+
}), { predictions: p, updatePredictions: E, clearPredictions: f } = _t({
|
|
546
546
|
atlas: I
|
|
547
|
-
}), N =
|
|
547
|
+
}), N = w(() => p.map((O) => ({
|
|
548
548
|
id: O.searchId || "",
|
|
549
549
|
label: O.description || ""
|
|
550
550
|
})), [
|
|
551
551
|
p
|
|
552
|
-
]), S =
|
|
552
|
+
]), S = _((O) => {
|
|
553
553
|
E({
|
|
554
554
|
input: O,
|
|
555
555
|
countryCodes: y ? [
|
|
@@ -560,52 +560,52 @@ const An = /* @__PURE__ */ Bt(_n), Pn = (e, t, o = 200) => {
|
|
|
560
560
|
o,
|
|
561
561
|
E,
|
|
562
562
|
y
|
|
563
|
-
]),
|
|
563
|
+
]), D = _(async (O) => {
|
|
564
564
|
if (!O)
|
|
565
565
|
return;
|
|
566
566
|
f();
|
|
567
|
-
const
|
|
567
|
+
const h = await (I == null ? void 0 : I.getPlace({
|
|
568
568
|
searchId: String(O)
|
|
569
569
|
}));
|
|
570
|
-
|
|
570
|
+
h && u && u(h);
|
|
571
571
|
}, [
|
|
572
572
|
u,
|
|
573
573
|
f,
|
|
574
574
|
I
|
|
575
|
-
]), g =
|
|
575
|
+
]), g = _(() => {
|
|
576
576
|
f(), a == null || a();
|
|
577
577
|
}, [
|
|
578
578
|
a,
|
|
579
579
|
f
|
|
580
|
-
]),
|
|
580
|
+
]), R = _(() => {
|
|
581
581
|
d == null || d();
|
|
582
582
|
}, [
|
|
583
583
|
d
|
|
584
|
-
]),
|
|
584
|
+
]), q = b(e, B.Input), P = b(e, B.Options);
|
|
585
585
|
return /* @__PURE__ */ n.createElement(Fe, {
|
|
586
586
|
"aria-labelledby": m,
|
|
587
587
|
inputValue: t ?? "",
|
|
588
588
|
onInputChange: S,
|
|
589
589
|
value: null,
|
|
590
|
-
onChange:
|
|
590
|
+
onChange: D,
|
|
591
591
|
isDisabled: r,
|
|
592
592
|
isReadOnly: s,
|
|
593
593
|
isRequired: l,
|
|
594
594
|
isInvalid: i,
|
|
595
595
|
onBlur: g,
|
|
596
|
-
onFocus:
|
|
596
|
+
onFocus: R,
|
|
597
597
|
allowsCustomValue: !0,
|
|
598
598
|
menuTrigger: "input",
|
|
599
599
|
items: N
|
|
600
|
-
}, v(
|
|
601
|
-
onFocus:
|
|
602
|
-
}), v(
|
|
600
|
+
}, v(q, {
|
|
601
|
+
onFocus: R
|
|
602
|
+
}), v(P, {
|
|
603
603
|
options: N
|
|
604
604
|
}), /* @__PURE__ */ n.createElement(Ye, {
|
|
605
605
|
optionCount: N.length
|
|
606
606
|
}));
|
|
607
607
|
}, wn = ({ className: e, ...t }) => {
|
|
608
|
-
const { id: o, placeholder: r } =
|
|
608
|
+
const { id: o, placeholder: r } = T(), { 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({
|
|
@@ -626,28 +626,28 @@ const An = /* @__PURE__ */ Bt(_n), Pn = (e, t, o = 200) => {
|
|
|
626
626
|
className: t,
|
|
627
627
|
containerPadding: 0,
|
|
628
628
|
offset: 0
|
|
629
|
-
}, /* @__PURE__ */ n.createElement(
|
|
629
|
+
}, /* @__PURE__ */ n.createElement(Pe, {
|
|
630
630
|
renderEmptyState: () => null
|
|
631
631
|
}, (r) => v(o, {
|
|
632
632
|
id: r.id,
|
|
633
633
|
label: r.label
|
|
634
634
|
})));
|
|
635
|
-
},
|
|
635
|
+
}, xn = ({ className: e, ...t }) => {
|
|
636
636
|
const { id: o, label: r } = t;
|
|
637
|
-
return /* @__PURE__ */ n.createElement(
|
|
637
|
+
return /* @__PURE__ */ n.createElement(De, {
|
|
638
638
|
className: e,
|
|
639
639
|
id: o,
|
|
640
640
|
textValue: r
|
|
641
641
|
}, r);
|
|
642
642
|
};
|
|
643
|
-
He.Option =
|
|
643
|
+
He.Option = xn;
|
|
644
644
|
B.Label = de;
|
|
645
645
|
B.Input = wn;
|
|
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 } = T(), { 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), S = b(e, re.Error);
|
|
651
651
|
return /* @__PURE__ */ n.createElement(u, {
|
|
652
652
|
fieldId: t,
|
|
653
653
|
renderLabel: () => v(E, {
|
|
@@ -666,8 +666,8 @@ const re = ({ children: e }) => {
|
|
|
666
666
|
}, f),
|
|
667
667
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, S, N)
|
|
668
668
|
});
|
|
669
|
-
},
|
|
670
|
-
const { id: t, placeholder: o } =
|
|
669
|
+
}, Bn = ({ className: e }) => {
|
|
670
|
+
const { id: t, placeholder: o } = T(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
|
|
671
671
|
return ae(() => {
|
|
672
672
|
var i;
|
|
673
673
|
(i = l.current) == null || i.focus({
|
|
@@ -683,11 +683,11 @@ const re = ({ children: e }) => {
|
|
|
683
683
|
});
|
|
684
684
|
};
|
|
685
685
|
re.Label = de;
|
|
686
|
-
re.Input =
|
|
686
|
+
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 } = T(), { 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, {
|
|
@@ -706,8 +706,8 @@ const oe = ({ children: e }) => {
|
|
|
706
706
|
}, E),
|
|
707
707
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
708
708
|
});
|
|
709
|
-
},
|
|
710
|
-
const { id: t, placeholder: o } =
|
|
709
|
+
}, kn = ({ className: e }) => {
|
|
710
|
+
const { id: t, placeholder: o } = T(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
|
|
711
711
|
return ae(() => {
|
|
712
712
|
var i;
|
|
713
713
|
(i = l.current) == null || i.focus({
|
|
@@ -723,54 +723,54 @@ const oe = ({ children: e }) => {
|
|
|
723
723
|
});
|
|
724
724
|
};
|
|
725
725
|
oe.Label = de;
|
|
726
|
-
oe.Input =
|
|
726
|
+
oe.Input = kn;
|
|
727
727
|
oe.Description = ie;
|
|
728
728
|
oe.Error = ce;
|
|
729
|
-
const
|
|
730
|
-
const t = Ce(
|
|
729
|
+
const Un = ({ isOpen: e }) => {
|
|
730
|
+
const t = Ce(We), o = x(!1);
|
|
731
731
|
return Ae(() => {
|
|
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 = Ce(
|
|
739
|
-
return
|
|
737
|
+
}, Rt = ({ readOnly: e, disabled: t } = {}) => {
|
|
738
|
+
const o = Ce(We);
|
|
739
|
+
return _(() => {
|
|
740
740
|
!o || o.isOpen || e || t || o.open(null, "manual");
|
|
741
741
|
}, [
|
|
742
742
|
o,
|
|
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()), At = ({ options: e, value: t, commit: o, clear: r, onBlur: s }) => {
|
|
747
|
+
const [l, i] = Ee(null), a = ln(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
|
}, [
|
|
751
751
|
t,
|
|
752
752
|
e
|
|
753
|
-
]), m =
|
|
753
|
+
]), m = _((p) => {
|
|
754
754
|
typeof p != "string" || p === "" || p === t || (i(null), o(p));
|
|
755
755
|
}, [
|
|
756
756
|
o,
|
|
757
757
|
t
|
|
758
|
-
]), u =
|
|
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,
|
|
765
765
|
e,
|
|
766
766
|
t
|
|
767
|
-
]), y =
|
|
767
|
+
]), y = _((p) => {
|
|
768
768
|
p.key !== "Enter" && p.key !== "Escape" || (i(null), p.key === "Enter" && l === "" && t && r());
|
|
769
769
|
}, [
|
|
770
770
|
l,
|
|
771
771
|
t,
|
|
772
772
|
r
|
|
773
|
-
]), I =
|
|
773
|
+
]), I = _(() => {
|
|
774
774
|
l === "" && t && r(), i(null), a();
|
|
775
775
|
}, [
|
|
776
776
|
l,
|
|
@@ -787,50 +787,50 @@ const kn = ({ 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 } =
|
|
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 } = T(), { labelId: E } = M(), { t: f } = Te(), { language: N } = Lt(), S = w(() => (p || []).reduce((A, F) => (F.value && Oe.hasOwnProperty(F.value) && A.push({
|
|
791
791
|
value: F.value,
|
|
792
792
|
label: f(`locale-dataset.countries.${Oe[F.value].toUpperCase()}`)
|
|
793
793
|
}), A), []).sort((A, F) => A.label.localeCompare(F.label, N)), [
|
|
794
794
|
p,
|
|
795
795
|
f,
|
|
796
796
|
N
|
|
797
|
-
]),
|
|
797
|
+
]), D = _((A) => l(A), [
|
|
798
798
|
l
|
|
799
|
-
]), g =
|
|
800
|
-
|
|
801
|
-
]), { onInputKeyDown:
|
|
799
|
+
]), g = _(() => D(""), [
|
|
800
|
+
D
|
|
801
|
+
]), { onInputKeyDown: R, ...q } = At({
|
|
802
802
|
options: S,
|
|
803
803
|
value: s,
|
|
804
|
-
commit:
|
|
804
|
+
commit: D,
|
|
805
805
|
clear: g,
|
|
806
806
|
onBlur: u
|
|
807
|
-
}),
|
|
807
|
+
}), P = me("country"), O = b(e, Y.Label), h = b(e, Y.Control), j = b(e, Y.Options), fe = b(e, Y.Description), $ = b(e, Y.Error);
|
|
808
808
|
return /* @__PURE__ */ n.createElement(I, {
|
|
809
809
|
fieldId: r,
|
|
810
810
|
renderLabel: () => v(O, {
|
|
811
|
-
label:
|
|
811
|
+
label: P
|
|
812
812
|
}),
|
|
813
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,
|
|
819
819
|
isInvalid: m,
|
|
820
820
|
onFocus: y,
|
|
821
821
|
menuTrigger: "input"
|
|
822
|
-
}, v(
|
|
823
|
-
onKeyDown:
|
|
822
|
+
}, v(h, {
|
|
823
|
+
onKeyDown: R
|
|
824
824
|
}), v(j, {
|
|
825
825
|
options: S,
|
|
826
826
|
isForcedOpen: o
|
|
827
|
-
}), /* @__PURE__ */ n.createElement(
|
|
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, $, fe)
|
|
831
831
|
});
|
|
832
832
|
}, ge = ({ children: e, className: t, ...o }) => {
|
|
833
|
-
const { disabled: r, hasError: s } =
|
|
833
|
+
const { disabled: r, hasError: s } = T(), { 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 kn = ({ 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
|
+
}, Vn = ({ className: e, ...t }) => {
|
|
842
|
+
const { id: o, placeholder: r, readOnly: s, disabled: l } = T(), { inputId: i, ariaDescribedBy: a } = M(), { onKeyDown: d } = t, m = x(null), u = Rt({
|
|
843
843
|
readOnly: s,
|
|
844
844
|
disabled: l
|
|
845
845
|
});
|
|
@@ -858,52 +858,52 @@ const kn = ({ isOpen: e }) => {
|
|
|
858
858
|
onClick: u,
|
|
859
859
|
onKeyDown: d
|
|
860
860
|
});
|
|
861
|
-
},
|
|
861
|
+
}, Wn = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(gt, {
|
|
862
862
|
className: t
|
|
863
863
|
}, e);
|
|
864
|
-
ge.Input =
|
|
865
|
-
ge.Trigger =
|
|
864
|
+
ge.Input = Vn;
|
|
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
868
|
return /* @__PURE__ */ n.createElement(Se, {
|
|
869
869
|
className: t,
|
|
870
870
|
containerPadding: 0,
|
|
871
871
|
offset: 0
|
|
872
|
-
}, /* @__PURE__ */ n.createElement(
|
|
872
|
+
}, /* @__PURE__ */ n.createElement(sn, {
|
|
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
|
+
}, Kn = ({ className: e, ...t }) => {
|
|
880
880
|
const { value: o, label: r } = t;
|
|
881
|
-
return /* @__PURE__ */ n.createElement(
|
|
881
|
+
return /* @__PURE__ */ n.createElement(De, {
|
|
882
882
|
className: e,
|
|
883
883
|
id: o,
|
|
884
884
|
textValue: r
|
|
885
885
|
}, r);
|
|
886
886
|
};
|
|
887
|
-
je.Option =
|
|
887
|
+
je.Option = Kn;
|
|
888
888
|
Y.Label = de;
|
|
889
889
|
Y.Control = ge;
|
|
890
890
|
Y.Options = je;
|
|
891
891
|
Y.Description = ie;
|
|
892
892
|
Y.Error = ce;
|
|
893
|
-
const
|
|
894
|
-
function
|
|
893
|
+
const Yn = /(\d{7})|(\d{3}-\d{4})/;
|
|
894
|
+
function Hn(e) {
|
|
895
895
|
var t;
|
|
896
|
-
return (t = e.match(
|
|
896
|
+
return (t = e.match(Yn)) == null ? void 0 : t[0];
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function jn({ isAutocompleteEnabled: e }) {
|
|
899
899
|
const t = x({
|
|
900
900
|
hasAddress: !1
|
|
901
901
|
}), o = Ke({
|
|
902
902
|
enabled: e
|
|
903
903
|
});
|
|
904
904
|
return {
|
|
905
|
-
searchByPostalCode:
|
|
906
|
-
const l =
|
|
905
|
+
searchByPostalCode: _(async (s) => {
|
|
906
|
+
const l = Hn(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 Hn({ 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 } = T(), { labelId: I } = M(), p = Le(), { autocompleteEnabled: E } = Ie(), f = !!(p && Oe[p] === Oe.JP), N = (y || E) && f, S = me("zipCode"), D = b(e, k.Label), g = b(e, k.Control), R = b(e, k.Options), q = b(e, k.Description), P = b(e, k.Error);
|
|
932
932
|
return N ? /* @__PURE__ */ n.createElement(u, {
|
|
933
933
|
fieldId: t,
|
|
934
|
-
renderLabel: () => v(
|
|
934
|
+
renderLabel: () => v(D, {
|
|
935
935
|
label: S
|
|
936
936
|
}),
|
|
937
|
-
renderInput: () => /* @__PURE__ */ n.createElement(
|
|
937
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Jn, {
|
|
938
938
|
value: o,
|
|
939
939
|
onChange: r,
|
|
940
940
|
disabled: s,
|
|
@@ -943,11 +943,11 @@ const k = ({ children: e }) => {
|
|
|
943
943
|
hasError: a,
|
|
944
944
|
onBlur: d,
|
|
945
945
|
onFocus: m
|
|
946
|
-
}, g,
|
|
947
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
946
|
+
}, g, R),
|
|
947
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, P, q)
|
|
948
948
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
949
949
|
fieldId: t,
|
|
950
|
-
renderLabel: () => v(
|
|
950
|
+
renderLabel: () => v(D, {
|
|
951
951
|
label: S
|
|
952
952
|
}),
|
|
953
953
|
renderInput: () => /* @__PURE__ */ n.createElement(be, {
|
|
@@ -961,63 +961,63 @@ 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, P, q)
|
|
965
965
|
});
|
|
966
|
-
},
|
|
967
|
-
const { labelId: m } = M(), { onAddressSelect: u } = Ie(), [y, I] = Ee(!1), { searchByPostalCode: p } =
|
|
966
|
+
}, Jn = ({ 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 } = Ie(), [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
|
-
id:
|
|
971
|
+
id: W(),
|
|
972
972
|
label: E.formattedAddress || ""
|
|
973
973
|
}
|
|
974
974
|
] : [], [
|
|
975
975
|
E
|
|
976
|
-
]), S =
|
|
976
|
+
]), S = _(async (O) => {
|
|
977
977
|
o(O);
|
|
978
|
-
const
|
|
979
|
-
f(
|
|
978
|
+
const h = await p(O ?? "");
|
|
979
|
+
f(h);
|
|
980
980
|
}, [
|
|
981
981
|
o,
|
|
982
982
|
p
|
|
983
|
-
]),
|
|
983
|
+
]), D = _(async (O) => {
|
|
984
984
|
O && (f(void 0), E && u && u(E));
|
|
985
985
|
}, [
|
|
986
986
|
u,
|
|
987
987
|
E
|
|
988
|
-
]), g =
|
|
988
|
+
]), g = _(() => {
|
|
989
989
|
f(void 0), a == null || a();
|
|
990
990
|
}, [
|
|
991
991
|
a
|
|
992
|
-
]),
|
|
992
|
+
]), R = _(() => {
|
|
993
993
|
I(!0), d == null || d();
|
|
994
994
|
}, [
|
|
995
995
|
d
|
|
996
|
-
]),
|
|
996
|
+
]), q = b(e, k.Control), P = b(e, k.Options);
|
|
997
997
|
return /* @__PURE__ */ n.createElement(Fe, {
|
|
998
998
|
"aria-labelledby": m,
|
|
999
999
|
inputValue: t ?? "",
|
|
1000
1000
|
onInputChange: S,
|
|
1001
1001
|
value: null,
|
|
1002
|
-
onChange:
|
|
1002
|
+
onChange: D,
|
|
1003
1003
|
isDisabled: r,
|
|
1004
1004
|
isReadOnly: s,
|
|
1005
1005
|
isRequired: l,
|
|
1006
1006
|
isInvalid: i,
|
|
1007
1007
|
onBlur: g,
|
|
1008
|
-
onFocus:
|
|
1008
|
+
onFocus: R,
|
|
1009
1009
|
allowsCustomValue: !0,
|
|
1010
1010
|
menuTrigger: "input",
|
|
1011
1011
|
items: N
|
|
1012
|
-
}, v(
|
|
1013
|
-
onFocus:
|
|
1014
|
-
}), v(
|
|
1012
|
+
}, v(q, {
|
|
1013
|
+
onFocus: R
|
|
1014
|
+
}), v(P, {
|
|
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 } = T(), { 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,
|
|
@@ -1026,8 +1026,8 @@ const k = ({ children: e }) => {
|
|
|
1026
1026
|
}, v(a, {
|
|
1027
1027
|
onFocus: l
|
|
1028
1028
|
}));
|
|
1029
|
-
},
|
|
1030
|
-
const { id: o, placeholder: r } =
|
|
1029
|
+
}, Xn = ({ className: e, ...t }) => {
|
|
1030
|
+
const { id: o, placeholder: r } = T(), { 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({
|
|
@@ -1048,35 +1048,35 @@ const k = ({ children: e }) => {
|
|
|
1048
1048
|
className: t,
|
|
1049
1049
|
containerPadding: 0,
|
|
1050
1050
|
offset: 0
|
|
1051
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1051
|
+
}, /* @__PURE__ */ n.createElement(Pe, {
|
|
1052
1052
|
renderEmptyState: () => null
|
|
1053
1053
|
}, (r) => v(o, {
|
|
1054
1054
|
id: r.id,
|
|
1055
1055
|
label: r.label
|
|
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(De, {
|
|
1060
1060
|
className: e,
|
|
1061
1061
|
id: o,
|
|
1062
1062
|
textValue: r
|
|
1063
1063
|
}, r);
|
|
1064
1064
|
};
|
|
1065
|
-
Xe.Option =
|
|
1066
|
-
Je.Input =
|
|
1065
|
+
Xe.Option = Gn;
|
|
1066
|
+
Je.Input = Xn;
|
|
1067
1067
|
k.Label = de;
|
|
1068
1068
|
k.Control = Je;
|
|
1069
1069
|
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 } = T(), { labelId: I } = M(), { autocompleteEnabled: p } = Ie(), E = y || p, f = me("streetName"), N = b(e, U.Label), S = 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,
|
|
@@ -1085,8 +1085,8 @@ const U = ({ children: e }) => {
|
|
|
1085
1085
|
hasError: a,
|
|
1086
1086
|
onBlur: d,
|
|
1087
1087
|
onFocus: m
|
|
1088
|
-
}, S,
|
|
1089
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
1088
|
+
}, S, D),
|
|
1089
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
1090
1090
|
}) : /* @__PURE__ */ n.createElement(u, {
|
|
1091
1091
|
fieldId: t,
|
|
1092
1092
|
renderLabel: () => v(N, {
|
|
@@ -1103,19 +1103,19 @@ const U = ({ children: e }) => {
|
|
|
1103
1103
|
onBlur: d,
|
|
1104
1104
|
onFocus: m
|
|
1105
1105
|
}, S),
|
|
1106
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null,
|
|
1106
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
|
|
1107
1107
|
});
|
|
1108
|
-
},
|
|
1108
|
+
}, Qn = ({ 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
|
-
}), { predictions: p, updatePredictions: E, clearPredictions: f } =
|
|
1111
|
+
}), { predictions: p, updatePredictions: E, clearPredictions: f } = _t({
|
|
1112
1112
|
atlas: I
|
|
1113
|
-
}), N = b(e, U.Input), S = b(e, U.Options),
|
|
1114
|
-
id:
|
|
1115
|
-
label:
|
|
1113
|
+
}), N = b(e, U.Input), S = b(e, U.Options), D = w(() => p.reduce((O, h) => (h.searchId && h.description && O.push({
|
|
1114
|
+
id: h.searchId,
|
|
1115
|
+
label: h.description
|
|
1116
1116
|
}), O), []), [
|
|
1117
1117
|
p
|
|
1118
|
-
]), g =
|
|
1118
|
+
]), g = _((O) => {
|
|
1119
1119
|
E({
|
|
1120
1120
|
input: O,
|
|
1121
1121
|
countryCodes: y ? [
|
|
@@ -1126,23 +1126,23 @@ const U = ({ children: e }) => {
|
|
|
1126
1126
|
o,
|
|
1127
1127
|
E,
|
|
1128
1128
|
y
|
|
1129
|
-
]),
|
|
1129
|
+
]), R = _(async (O) => {
|
|
1130
1130
|
if (f(), !O)
|
|
1131
1131
|
return;
|
|
1132
|
-
const
|
|
1132
|
+
const h = await (I == null ? void 0 : I.getPlace({
|
|
1133
1133
|
searchId: String(O)
|
|
1134
1134
|
}));
|
|
1135
|
-
|
|
1135
|
+
h && u && u(h);
|
|
1136
1136
|
}, [
|
|
1137
1137
|
u,
|
|
1138
1138
|
f,
|
|
1139
1139
|
I
|
|
1140
|
-
]),
|
|
1140
|
+
]), q = _(() => {
|
|
1141
1141
|
f(), a == null || a();
|
|
1142
1142
|
}, [
|
|
1143
1143
|
a,
|
|
1144
1144
|
f
|
|
1145
|
-
]),
|
|
1145
|
+
]), P = _(() => {
|
|
1146
1146
|
d == null || d();
|
|
1147
1147
|
}, [
|
|
1148
1148
|
d
|
|
@@ -1152,25 +1152,25 @@ const U = ({ children: e }) => {
|
|
|
1152
1152
|
inputValue: t ?? "",
|
|
1153
1153
|
onInputChange: g,
|
|
1154
1154
|
value: null,
|
|
1155
|
-
onChange:
|
|
1155
|
+
onChange: R,
|
|
1156
1156
|
isDisabled: r,
|
|
1157
1157
|
isReadOnly: s,
|
|
1158
1158
|
isRequired: l,
|
|
1159
1159
|
isInvalid: i,
|
|
1160
|
-
onBlur:
|
|
1161
|
-
onFocus:
|
|
1160
|
+
onBlur: q,
|
|
1161
|
+
onFocus: P,
|
|
1162
1162
|
allowsCustomValue: !0,
|
|
1163
1163
|
menuTrigger: "input",
|
|
1164
|
-
items:
|
|
1164
|
+
items: D
|
|
1165
1165
|
}, v(N, {
|
|
1166
|
-
onFocus:
|
|
1166
|
+
onFocus: P
|
|
1167
1167
|
}), v(S, {
|
|
1168
|
-
options:
|
|
1168
|
+
options: D
|
|
1169
1169
|
}), /* @__PURE__ */ n.createElement(Ye, {
|
|
1170
|
-
optionCount:
|
|
1170
|
+
optionCount: D.length
|
|
1171
1171
|
}));
|
|
1172
1172
|
}, zn = ({ className: e, ...t }) => {
|
|
1173
|
-
const { id: o, placeholder: r } =
|
|
1173
|
+
const { id: o, placeholder: r } = T(), { 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({
|
|
@@ -1191,28 +1191,28 @@ const U = ({ children: e }) => {
|
|
|
1191
1191
|
className: t,
|
|
1192
1192
|
containerPadding: 0,
|
|
1193
1193
|
offset: 0
|
|
1194
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1194
|
+
}, /* @__PURE__ */ n.createElement(Pe, {
|
|
1195
1195
|
renderEmptyState: () => null
|
|
1196
1196
|
}, (r) => v(o, {
|
|
1197
1197
|
id: r.id,
|
|
1198
1198
|
label: r.label
|
|
1199
1199
|
})));
|
|
1200
|
-
},
|
|
1200
|
+
}, Zn = ({ className: e, ...t }) => {
|
|
1201
1201
|
const { id: o, label: r } = t;
|
|
1202
|
-
return /* @__PURE__ */ n.createElement(
|
|
1202
|
+
return /* @__PURE__ */ n.createElement(De, {
|
|
1203
1203
|
className: e,
|
|
1204
1204
|
id: o,
|
|
1205
1205
|
textValue: r
|
|
1206
1206
|
}, r);
|
|
1207
1207
|
};
|
|
1208
|
-
Ge.Option =
|
|
1208
|
+
Ge.Option = Zn;
|
|
1209
1209
|
U.Label = de;
|
|
1210
1210
|
U.Input = zn;
|
|
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 } = T(), { 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, {
|
|
@@ -1231,8 +1231,8 @@ const se = ({ children: e }) => {
|
|
|
1231
1231
|
}, E),
|
|
1232
1232
|
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
1233
1233
|
});
|
|
1234
|
-
},
|
|
1235
|
-
const { id: t, placeholder: o } =
|
|
1234
|
+
}, er = ({ className: e }) => {
|
|
1235
|
+
const { id: t, placeholder: o } = T(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
|
|
1236
1236
|
return ae(() => {
|
|
1237
1237
|
var i;
|
|
1238
1238
|
(i = l.current) == null || i.focus({
|
|
@@ -1247,13 +1247,13 @@ const se = ({ children: e }) => {
|
|
|
1247
1247
|
});
|
|
1248
1248
|
};
|
|
1249
1249
|
se.Label = de;
|
|
1250
|
-
se.Input =
|
|
1250
|
+
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 } = T(), { labelId: y } = M(), { t: I } = Te(), p = Le(), E = p ? Oe[p] : void 0, f = p && kt.getCountryByShortKey(p), N = w(() => {
|
|
1255
|
+
var $;
|
|
1256
|
+
return (Ut((($ = f == null ? void 0 : f.subdivisions) == null ? void 0 : $.list) || [], E) || []).map((A) => ({
|
|
1257
1257
|
value: A.key,
|
|
1258
1258
|
label: I(A.displayName)
|
|
1259
1259
|
})).sort((A, F) => A.label.localeCompare(F.label));
|
|
@@ -1261,19 +1261,19 @@ const H = ({ children: e }) => {
|
|
|
1261
1261
|
E,
|
|
1262
1262
|
I,
|
|
1263
1263
|
f
|
|
1264
|
-
]), S =
|
|
1264
|
+
]), S = _(() => r(""), [
|
|
1265
1265
|
r
|
|
1266
|
-
]), { onInputKeyDown:
|
|
1266
|
+
]), { onInputKeyDown: D, ...g } = At({
|
|
1267
1267
|
options: N,
|
|
1268
1268
|
value: o,
|
|
1269
1269
|
commit: r,
|
|
1270
1270
|
clear: S,
|
|
1271
1271
|
onBlur: d
|
|
1272
|
-
}),
|
|
1272
|
+
}), R = me("subdivision"), q = b(e, H.Label), P = 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(
|
|
1276
|
-
label:
|
|
1275
|
+
renderLabel: () => v(q, {
|
|
1276
|
+
label: R
|
|
1277
1277
|
}),
|
|
1278
1278
|
renderInput: () => /* @__PURE__ */ n.createElement(Fe, {
|
|
1279
1279
|
"aria-labelledby": y,
|
|
@@ -1284,15 +1284,15 @@ const H = ({ children: e }) => {
|
|
|
1284
1284
|
isInvalid: a,
|
|
1285
1285
|
onFocus: m,
|
|
1286
1286
|
menuTrigger: "input"
|
|
1287
|
-
}, v(
|
|
1288
|
-
onKeyDown:
|
|
1287
|
+
}, v(P, {
|
|
1288
|
+
onKeyDown: D
|
|
1289
1289
|
}), v(O, {
|
|
1290
1290
|
options: N
|
|
1291
1291
|
})),
|
|
1292
|
-
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, j,
|
|
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 } = T(), { 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,
|
|
@@ -1300,8 +1300,8 @@ const H = ({ children: e }) => {
|
|
|
1300
1300
|
}, v(i, {
|
|
1301
1301
|
onKeyDown: l
|
|
1302
1302
|
}), a);
|
|
1303
|
-
},
|
|
1304
|
-
const { id: o, placeholder: r, readOnly: s, disabled: l } =
|
|
1303
|
+
}, tr = ({ className: e, ...t }) => {
|
|
1304
|
+
const { id: o, placeholder: r, readOnly: s, disabled: l } = T(), { inputId: i, ariaDescribedBy: a } = M(), { onKeyDown: d } = t, m = x(null), u = Rt({
|
|
1305
1305
|
readOnly: s,
|
|
1306
1306
|
disabled: l
|
|
1307
1307
|
});
|
|
@@ -1320,53 +1320,53 @@ const H = ({ children: e }) => {
|
|
|
1320
1320
|
onClick: u,
|
|
1321
1321
|
onKeyDown: d
|
|
1322
1322
|
});
|
|
1323
|
-
},
|
|
1323
|
+
}, nr = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(gt, {
|
|
1324
1324
|
className: t
|
|
1325
1325
|
}, e);
|
|
1326
|
-
ve.Input =
|
|
1327
|
-
ve.Trigger =
|
|
1328
|
-
const
|
|
1329
|
-
const { options: r } = o, s = b(e,
|
|
1326
|
+
ve.Input = tr;
|
|
1327
|
+
ve.Trigger = nr;
|
|
1328
|
+
const Qe = ({ children: e, className: t, ...o }) => {
|
|
1329
|
+
const { options: r } = o, s = b(e, Qe.Option);
|
|
1330
1330
|
return /* @__PURE__ */ n.createElement(Se, {
|
|
1331
1331
|
className: t,
|
|
1332
1332
|
containerPadding: 0,
|
|
1333
1333
|
offset: 0
|
|
1334
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1334
|
+
}, /* @__PURE__ */ n.createElement(Pe, 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
|
+
}, rr = ({ className: e, ...t }) => {
|
|
1340
1340
|
const { value: o, label: r } = t;
|
|
1341
|
-
return /* @__PURE__ */ n.createElement(
|
|
1341
|
+
return /* @__PURE__ */ n.createElement(De, {
|
|
1342
1342
|
className: e,
|
|
1343
1343
|
id: o,
|
|
1344
1344
|
textValue: r
|
|
1345
1345
|
}, r);
|
|
1346
1346
|
};
|
|
1347
|
-
|
|
1347
|
+
Qe.Option = rr;
|
|
1348
1348
|
H.Label = de;
|
|
1349
1349
|
H.Control = ve;
|
|
1350
|
-
H.Options =
|
|
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 } =
|
|
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 = {
|
|
1354
|
+
[K.MLA_COUNTRY]: or,
|
|
1355
|
+
[K.MLA_SUBDIVISION]: sr,
|
|
1356
|
+
[K.MLA_CITY]: ar,
|
|
1357
|
+
[K.MLA_ADDRESS_LINE]: lr,
|
|
1358
|
+
[K.MLA_ADDRESS_LINE_2]: ir,
|
|
1359
|
+
[K.MLA_POSTAL_CODE]: cr,
|
|
1360
|
+
[K.MLA_STREET_NAME]: dr,
|
|
1361
|
+
[K.MLA_STREET_NUMBER]: ur,
|
|
1362
|
+
[K.MLA_APARTMENT]: mr
|
|
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 } = T(), [S, D] = Ee(null), g = $t(), R = w(() => ({
|
|
1365
1365
|
...g,
|
|
1366
|
-
...
|
|
1366
|
+
...pr
|
|
1367
1367
|
}), [
|
|
1368
1368
|
g
|
|
1369
|
-
]), { isExperimentEnabled:
|
|
1369
|
+
]), { isExperimentEnabled: q } = Ct(), P = q(It.STREETLESS_LOCALITY_FALLBACK), { validateFields: O } = Vt(), h = Wt(), j = Nt(), fe = w(() => ({
|
|
1370
1370
|
...j,
|
|
1371
1371
|
actions: {
|
|
1372
1372
|
predict: Ht,
|
|
@@ -1376,7 +1376,7 @@ const rr = () => ue("country"), or = () => ue("subdivision"), sr = () => ue("cit
|
|
|
1376
1376
|
}
|
|
1377
1377
|
}), [
|
|
1378
1378
|
j
|
|
1379
|
-
]), { form:
|
|
1379
|
+
]), { form: $, isMultilineAddressField: A } = On({
|
|
1380
1380
|
id: o,
|
|
1381
1381
|
target: p,
|
|
1382
1382
|
fieldType: N,
|
|
@@ -1385,21 +1385,21 @@ const rr = () => ue("country"), or = () => ue("subdivision"), sr = () => ue("cit
|
|
|
1385
1385
|
fieldSettings: u,
|
|
1386
1386
|
validation: I,
|
|
1387
1387
|
required: f
|
|
1388
|
-
}), F =
|
|
1388
|
+
}), F = _((V) => {
|
|
1389
1389
|
if (!s)
|
|
1390
1390
|
return;
|
|
1391
|
-
const X =
|
|
1391
|
+
const X = dn(V, A, P), _e = {
|
|
1392
1392
|
...X,
|
|
1393
1393
|
[ye.COUNTRY]: X[ye.COUNTRY] ?? s[ye.COUNTRY]
|
|
1394
1394
|
};
|
|
1395
|
-
l == null || l(
|
|
1395
|
+
l == null || l(_e);
|
|
1396
1396
|
}, [
|
|
1397
1397
|
l,
|
|
1398
1398
|
s,
|
|
1399
1399
|
A,
|
|
1400
|
-
|
|
1401
|
-
]), J =
|
|
1402
|
-
if (A &&
|
|
1400
|
+
P
|
|
1401
|
+
]), J = _((V, X) => {
|
|
1402
|
+
if (A && V === ye.COUNTRY && (s == null ? void 0 : s[V]) !== X) {
|
|
1403
1403
|
l == null || l({
|
|
1404
1404
|
[ye.COUNTRY]: X
|
|
1405
1405
|
});
|
|
@@ -1407,33 +1407,33 @@ const rr = () => ue("country"), or = () => ue("subdivision"), sr = () => ue("cit
|
|
|
1407
1407
|
}
|
|
1408
1408
|
l == null || l({
|
|
1409
1409
|
...s,
|
|
1410
|
-
[
|
|
1410
|
+
[V]: X
|
|
1411
1411
|
});
|
|
1412
1412
|
}, [
|
|
1413
1413
|
l,
|
|
1414
1414
|
s,
|
|
1415
1415
|
A
|
|
1416
|
-
]), pe =
|
|
1417
|
-
|
|
1416
|
+
]), pe = _(async (V) => O(A ? [
|
|
1417
|
+
...V,
|
|
1418
1418
|
{
|
|
1419
1419
|
path: `${p}/${ye.COUNTRY}`,
|
|
1420
1420
|
value: s == null ? void 0 : s.country
|
|
1421
1421
|
}
|
|
1422
|
-
] :
|
|
1422
|
+
] : V), [
|
|
1423
1423
|
s,
|
|
1424
1424
|
p,
|
|
1425
1425
|
O,
|
|
1426
1426
|
A
|
|
1427
1427
|
]);
|
|
1428
1428
|
jt(o, () => {
|
|
1429
|
-
var
|
|
1430
|
-
const
|
|
1429
|
+
var _e;
|
|
1430
|
+
const V = d == null ? void 0 : d[0], X = (_e = $ == null ? void 0 : $.fields) == null ? void 0 : _e.find((lt) => "target" in lt && lt.target === (V == null ? void 0 : V.errorPath));
|
|
1431
1431
|
return X == null ? void 0 : X.id;
|
|
1432
1432
|
});
|
|
1433
|
-
const
|
|
1434
|
-
isForcedOpen:
|
|
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:
|
|
1433
|
+
const he = tn(o), ze = v(b(e, c.Country), {
|
|
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), Tt = w(() => ({
|
|
1436
|
+
country: ze,
|
|
1437
1437
|
subdivision: Ze,
|
|
1438
1438
|
city: et,
|
|
1439
1439
|
addressLine: tt,
|
|
@@ -1443,7 +1443,7 @@ const rr = () => ue("country"), or = () => ue("subdivision"), sr = () => ue("cit
|
|
|
1443
1443
|
streetNumber: st,
|
|
1444
1444
|
apartment: at
|
|
1445
1445
|
}), [
|
|
1446
|
-
|
|
1446
|
+
ze,
|
|
1447
1447
|
Ze,
|
|
1448
1448
|
et,
|
|
1449
1449
|
tt,
|
|
@@ -1453,37 +1453,37 @@ const rr = () => ue("country"), or = () => ue("subdivision"), sr = () => ue("cit
|
|
|
1453
1453
|
st,
|
|
1454
1454
|
at
|
|
1455
1455
|
]);
|
|
1456
|
-
return
|
|
1456
|
+
return $ ? /* @__PURE__ */ n.createElement(m, {
|
|
1457
1457
|
fieldId: o
|
|
1458
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1458
|
+
}, /* @__PURE__ */ n.createElement(mn, {
|
|
1459
1459
|
countryCode: s == null ? void 0 : s.country
|
|
1460
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1460
|
+
}, /* @__PURE__ */ n.createElement(un, {
|
|
1461
1461
|
autocompleteEnabled: E,
|
|
1462
1462
|
onAddressSelect: F
|
|
1463
|
-
}, /* @__PURE__ */ n.createElement(
|
|
1464
|
-
fields:
|
|
1463
|
+
}, /* @__PURE__ */ n.createElement(gn, {
|
|
1464
|
+
fields: Tt
|
|
1465
1465
|
}, /* @__PURE__ */ n.createElement("div", {
|
|
1466
|
-
ref:
|
|
1466
|
+
ref: D,
|
|
1467
1467
|
style: {
|
|
1468
1468
|
display: "contents"
|
|
1469
1469
|
}
|
|
1470
|
-
}), /* @__PURE__ */ n.createElement(
|
|
1470
|
+
}), /* @__PURE__ */ n.createElement(Pt, {
|
|
1471
1471
|
getContainer: () => S
|
|
1472
1472
|
}, /* @__PURE__ */ n.createElement("fieldset", {
|
|
1473
1473
|
className: t,
|
|
1474
|
-
style: Qt
|
|
1475
|
-
}, /* @__PURE__ */ n.createElement("legend", {
|
|
1476
1474
|
style: Zt
|
|
1475
|
+
}, /* @__PURE__ */ n.createElement("legend", {
|
|
1476
|
+
style: en
|
|
1477
1477
|
}, y), /* @__PURE__ */ n.createElement(Jt, {
|
|
1478
|
-
formSchema:
|
|
1479
|
-
form:
|
|
1480
|
-
values: s ??
|
|
1478
|
+
formSchema: h,
|
|
1479
|
+
form: $,
|
|
1480
|
+
values: s ?? Er,
|
|
1481
1481
|
onFieldChange: J,
|
|
1482
1482
|
onBlur: i,
|
|
1483
1483
|
onFocus: a,
|
|
1484
|
-
errors: d ??
|
|
1484
|
+
errors: d ?? br,
|
|
1485
1485
|
validateFields: pe,
|
|
1486
|
-
fields:
|
|
1486
|
+
fields: R,
|
|
1487
1487
|
fieldActions: fe
|
|
1488
1488
|
}))))))) : null;
|
|
1489
1489
|
};
|
|
@@ -1496,26 +1496,26 @@ 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
|
-
},
|
|
1499
|
+
const fr = "_postalCodeControl_1tire_1", yr = "_comboControl_1tire_5", Cr = "_comboTrigger_1tire_19", Re = {
|
|
1500
|
+
postalCodeControl: fr,
|
|
1501
|
+
comboControl: yr,
|
|
1502
|
+
comboTrigger: Cr
|
|
1503
|
+
}, Br = () => {
|
|
1504
1504
|
const e = dt(Gt, [
|
|
1505
|
-
|
|
1506
|
-
]), t = dt(zt, []), o =
|
|
1505
|
+
Re.comboControl
|
|
1506
|
+
]), t = dt(zt, []), o = an(Qt, 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(Q, C.label)
|
|
1511
1511
|
}, /* @__PURE__ */ n.createElement(c.Country.Label.Required, {
|
|
1512
|
-
className: L(
|
|
1512
|
+
className: L(z, C.requiredMark)
|
|
1513
1513
|
})), /* @__PURE__ */ n.createElement(c.Country.Control, {
|
|
1514
1514
|
className: e
|
|
1515
1515
|
}, /* @__PURE__ */ n.createElement(c.Country.Control.Input, {
|
|
1516
1516
|
className: L(C.innerInput, Me)
|
|
1517
1517
|
}), /* @__PURE__ */ n.createElement(c.Country.Control.Trigger, {
|
|
1518
|
-
className:
|
|
1518
|
+
className: Re.comboTrigger
|
|
1519
1519
|
}, /* @__PURE__ */ n.createElement(ct, {
|
|
1520
1520
|
className: C.dropdownIcon
|
|
1521
1521
|
}))), /* @__PURE__ */ n.createElement(c.Country.Options, {
|
|
@@ -1530,9 +1530,9 @@ const br = "_postalCodeControl_1tire_1", fr = "_comboControl_1tire_5", yr = "_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(Q, C.label)
|
|
1534
1534
|
}, /* @__PURE__ */ n.createElement(c.AddressLine.Label.Required, {
|
|
1535
|
-
className: L(
|
|
1535
|
+
className: L(z, 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 br = "_postalCodeControl_1tire_1", fr = "_comboControl_1tire_5", yr = "_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(Q, C.label)
|
|
1551
1551
|
}, /* @__PURE__ */ n.createElement(c.AddressLine2.Label.Required, {
|
|
1552
|
-
className: L(
|
|
1552
|
+
className: L(z, 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 br = "_postalCodeControl_1tire_1", fr = "_comboControl_1tire_5", yr = "_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(Q, C.label)
|
|
1564
1564
|
}, /* @__PURE__ */ n.createElement(c.City.Label.Required, {
|
|
1565
|
-
className: L(
|
|
1565
|
+
className: L(z, C.requiredMark)
|
|
1566
1566
|
})), /* @__PURE__ */ n.createElement(c.City.Input, {
|
|
1567
1567
|
className: t
|
|
1568
1568
|
}), /* @__PURE__ */ n.createElement(c.City.Error, {
|
|
@@ -1573,11 +1573,11 @@ const br = "_postalCodeControl_1tire_1", fr = "_comboControl_1tire_5", yr = "_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(Q, C.label)
|
|
1577
1577
|
}, /* @__PURE__ */ n.createElement(c.PostalCode.Label.Required, {
|
|
1578
|
-
className: L(
|
|
1578
|
+
className: L(z, C.requiredMark)
|
|
1579
1579
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Control, {
|
|
1580
|
-
className:
|
|
1580
|
+
className: Re.postalCodeControl
|
|
1581
1581
|
}, /* @__PURE__ */ n.createElement(c.PostalCode.Control.Input, {
|
|
1582
1582
|
className: t
|
|
1583
1583
|
})), /* @__PURE__ */ n.createElement(c.PostalCode.Options, {
|
|
@@ -1592,15 +1592,15 @@ const br = "_postalCodeControl_1tire_1", fr = "_comboControl_1tire_5", yr = "_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(Q, C.label)
|
|
1596
1596
|
}, /* @__PURE__ */ n.createElement(c.Subdivision.Label.Required, {
|
|
1597
|
-
className: L(
|
|
1597
|
+
className: L(z, C.requiredMark)
|
|
1598
1598
|
})), /* @__PURE__ */ n.createElement(c.Subdivision.Control, {
|
|
1599
1599
|
className: e
|
|
1600
1600
|
}, /* @__PURE__ */ n.createElement(c.Subdivision.Control.Input, {
|
|
1601
1601
|
className: L(C.innerInput, Me)
|
|
1602
1602
|
}), /* @__PURE__ */ n.createElement(c.Subdivision.Control.Trigger, {
|
|
1603
|
-
className:
|
|
1603
|
+
className: Re.comboTrigger
|
|
1604
1604
|
}, /* @__PURE__ */ n.createElement(ct, {
|
|
1605
1605
|
className: C.dropdownIcon
|
|
1606
1606
|
}))), /* @__PURE__ */ n.createElement(c.Subdivision.Options, {
|
|
@@ -1615,9 +1615,9 @@ const br = "_postalCodeControl_1tire_1", fr = "_comboControl_1tire_5", yr = "_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(Q, C.label)
|
|
1619
1619
|
}, /* @__PURE__ */ n.createElement(c.StreetName.Label.Required, {
|
|
1620
|
-
className: L(
|
|
1620
|
+
className: L(z, 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 br = "_postalCodeControl_1tire_1", fr = "_comboControl_1tire_5", yr = "_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(Q, C.label)
|
|
1636
1636
|
}, /* @__PURE__ */ n.createElement(c.StreetNumber.Label.Required, {
|
|
1637
|
-
className: L(
|
|
1637
|
+
className: L(z, 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 br = "_postalCodeControl_1tire_1", fr = "_comboControl_1tire_5", yr = "_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(Q, C.label)
|
|
1649
1649
|
}, /* @__PURE__ */ n.createElement(c.Apartment.Label.Required, {
|
|
1650
|
-
className: L(
|
|
1650
|
+
className: L(z, C.requiredMark)
|
|
1651
1651
|
})), /* @__PURE__ */ n.createElement(c.Apartment.Input, {
|
|
1652
1652
|
className: t
|
|
1653
1653
|
}), /* @__PURE__ */ n.createElement(c.Apartment.Error, {
|
|
@@ -1660,5 +1660,5 @@ const br = "_postalCodeControl_1tire_1", fr = "_comboControl_1tire_5", yr = "_co
|
|
|
1660
1660
|
}))));
|
|
1661
1661
|
};
|
|
1662
1662
|
export {
|
|
1663
|
-
|
|
1663
|
+
Br as M
|
|
1664
1664
|
};
|