@wix/form-elements 1.159.0 → 1.160.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-CpiyUOXo.js → appointment-rac-BmHu56e5.js} +63 -63
- package/dist/component/{bookings-address-rac-BBEUV1t7.js → bookings-address-rac-DY9l2g0h.js} +1 -1
- package/dist/component/{bookings-email-rac-DdfoeLFV.js → bookings-email-rac-B5vNSOsS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DH39yvQ-.js → bookings-first-name-rac-CJiefCNz.js} +1 -1
- package/dist/component/{bookings-header-rac-StLm7b4I.js → bookings-header-rac-BFu7Ko5w.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DHZMPMOO.js → bookings-last-name-rac-DegMM13h.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrHp1ojM.js → bookings-login-bar-rac-DrA-5tBH.js} +7 -7
- package/dist/component/{bookings-phone-rac-6aGjbavK.js → bookings-phone-rac-DsaeqxCI.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DBlGZUM5.js → bookings-rich-text-rac-jRHiwqi8.js} +1 -1
- package/dist/component/{checkbox-field-rac-Cna1Va1X.js → checkbox-field-rac-CyoBb6Yf.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-m_-10Mdx.js → checkbox-group-field-headless-Bv1gU3oL.js} +54 -54
- package/dist/component/{checkbox-group-field-rac-BSCi5hmx.js → checkbox-group-field-rac-DasArcdV.js} +6 -6
- package/dist/component/{checkbox-group-rac-BWYQZmAI.js → checkbox-group-rac-CzmufV1U.js} +1 -1
- package/dist/component/{checkbox-rac-BsUTfSUf.js → checkbox-rac-6C7XoUoZ.js} +1 -1
- package/dist/component/{contacts-address-rac-DwCLW8rV.js → contacts-address-rac-BZobbFtz.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DnNgxbKb.js → contacts-birthdate-rac-DIzf41DS.js} +1 -1
- package/dist/component/{contacts-company-rac-BQqXzpNl.js → contacts-company-rac-BiBDO28r.js} +1 -1
- package/dist/component/{contacts-email-rac-BINnZzxp.js → contacts-email-rac-5mqokCSD.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DBWKFkIU.js → contacts-first-name-rac-BXe3_Nz5.js} +1 -1
- package/dist/component/{contacts-last-name-rac-D_-qrF7I.js → contacts-last-name-rac-Cfqgh7u1.js} +1 -1
- package/dist/component/{contacts-phone-rac-7n7JkSDr.js → contacts-phone-rac-cmLUWnAc.js} +1 -1
- package/dist/component/{contacts-position-rac-DvXP8nvT.js → contacts-position-rac-DTyvklfN.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DnLnV5Gm.js → contacts-subscribe-rac-D-ZEX1A3.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BJVWhvYW.js → contacts-tax-id-rac-B4NYJwWt.js} +1 -1
- package/dist/component/{date-availability-Df807-eN.js → date-availability-Dach9aRC.js} +1 -1
- package/dist/component/date-input-field-rac-B72mHcya.js +309 -0
- package/dist/component/{date-input-rac-CSB3MWHW.js → date-input-rac-CYix11gT.js} +1 -1
- package/dist/component/{date-picker-field-rac-CySThPfz.js → date-picker-field-rac-B8pvtPir.js} +86 -86
- package/dist/component/{date-picker-rac-Fp8_pxtf.js → date-picker-rac-D6cR0zH9.js} +1 -1
- package/dist/component/date-time-input-field-rac-B7Y3Yf5l.js +441 -0
- package/dist/component/{date-time-input-rac-wctMR4uM.js → date-time-input-rac-DMN-noQX.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-erMPfwFL.js → dext-checkbox-group-rac-Kq0GnteP.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DQSq9Lqd.js → dext-checkbox-rac-BY9GZ4n1.js} +1 -1
- package/dist/component/{dext-date-picker-rac-RCLcd1VV.js → dext-date-picker-rac-CXArIddp.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DMolWzvy.js → dext-date-time-input-rac-B39TtxGq.js} +1 -1
- package/dist/component/{dext-dropdown-rac-wQ2GJL4V.js → dext-dropdown-rac-C3y0G8cS.js} +1 -1
- package/dist/component/{dext-email-rac-BtymBVTW.js → dext-email-rac-BIg3cq7Q.js} +1 -1
- package/dist/component/{dext-number-input-rac-DHPiK0Z3.js → dext-number-input-rac-27sHJ7yN.js} +1 -1
- package/dist/component/{dext-phone-rac-C58vHEEe.js → dext-phone-rac-CcohoFQp.js} +1 -1
- package/dist/component/dext-radio-group-rac-eead3Gve.js +18 -0
- package/dist/component/{dext-rating-input-rac-DI0k3tVa.js → dext-rating-input-rac-B_E6OcBr.js} +1 -1
- package/dist/component/{dext-tags-rac-DmF6ctvQ.js → dext-tags-rac-Yd9aAtnF.js} +2 -2
- package/dist/component/{dext-text-area-rac-Bv6ridbR.js → dext-text-area-rac-CMACri2C.js} +1 -1
- package/dist/component/{dext-text-input-rac-DoTAdUgU.js → dext-text-input-rac-sNjSCfQ-.js} +1 -1
- package/dist/component/{dext-url-input-rac-BuoMS6g2.js → dext-url-input-rac-DwhbzJty.js} +1 -1
- package/dist/component/{donation-rac-CjZalSgn.js → donation-rac-BVAN3kMk.js} +77 -77
- package/dist/component/{dropdown-field-rac-By_fpqhx.js → dropdown-field-rac-DdoGigWx.js} +14 -14
- package/dist/component/{dropdown-rac-BnIEC4RX.js → dropdown-rac-CRkt5w47.js} +1 -1
- package/dist/component/{ecom-address-rac-B6Usk1Ty.js → ecom-address-rac-C36hFHW0.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B4B0wzlC.js → ecom-subscription-checkbox-rac-BKfQ348w.js} +2 -2
- package/dist/component/{email-input-field-rac-Df3KI3_v.js → email-input-field-rac-MOaISYxa.js} +59 -59
- package/dist/component/{events-repeater-rac-B2iBk8lV.js → events-repeater-rac-D6p-NgE8.js} +20 -20
- package/dist/component/{events-rsvp-rac-xl_qCIh3.js → events-rsvp-rac-DVpgN8gm.js} +18 -18
- package/dist/component/{field-error-headless-DWc76YmY.js → field-error-headless-XNWmDH3E.js} +4 -4
- package/dist/component/{field-label-headless-DKBKqI2X.js → field-label-headless-CORRAJGt.js} +4 -4
- package/dist/component/{file-upload-rac-BVj4cRqe.js → file-upload-rac-DRMr7E4b.js} +89 -89
- package/dist/component/{fixed-payment-rac-BS1Hb4hg.js → fixed-payment-rac-BUXzNex9.js} +18 -18
- package/dist/component/{form-BTUoOcqB.js → form-DSpx-AO8.js} +785 -728
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DTJ_Us6u.js → header-field-rac-CiDXlNsa.js} +6 -6
- package/dist/component/{header-rac-CvYp0Jjo.js → header-rac-B5Rg-h8u.js} +1 -1
- package/dist/component/{image-choice-rac--qrYqKJl.js → image-choice-rac-CtoA_KDp.js} +22 -22
- package/dist/component/{index-DIl9BH2M.js → index-Bz7ZhQsF.js} +53 -53
- package/dist/component/{index-CoEV4QEy.js → index-CwruESwc.js} +5 -5
- package/dist/component/{isObjectLike-CLN09X5V.js → isObjectLike-C5dHxHP0.js} +11 -11
- package/dist/component/multiline-address-field-rac-Z-qF366L.js +1664 -0
- package/dist/component/{multiline-address-rac-DtaAJjbR.js → multiline-address-rac-CJIHTMw5.js} +1 -1
- package/dist/component/{number-input-field-rac-2gqDUlw9.js → number-input-field-rac-D4vf6I6N.js} +29 -29
- package/dist/component/{number-input-rac-BlciEPLN.js → number-input-rac-B2jW6JUQ.js} +1 -1
- package/dist/component/{password-rac-BvvQgafk.js → password-rac-DGRZ17Jl.js} +29 -29
- package/dist/component/{payment-input-rac-CSRyOPPr.js → payment-input-rac-BtD-tAKv.js} +27 -27
- package/dist/component/phone-input-field-rac-KD4-APhr.js +512 -0
- package/dist/component/{phone-rac-DMP1MoRs.js → phone-rac-Cw2yccgg.js} +1 -1
- package/dist/component/{product-list-rac-WQ9Qhzum.js → product-list-rac-XbzTDdbp.js} +33 -33
- package/dist/component/{quiz-radio-group-rac-DzrL3-gZ.js → quiz-radio-group-rac-BDw_mAw5.js} +1 -1
- package/dist/component/{radio-button-module-classes-CJk18LzO.js → radio-button-module-classes-CFGf0Hzh.js} +23 -23
- package/dist/component/{radio-group-field-rac-DGoMoSgo.js → radio-group-field-rac-CXN7tyVu.js} +6 -6
- package/dist/component/{radio-group-rac-DhAELVNV.js → radio-group-rac-COHzqjBh.js} +1 -1
- package/dist/component/{rating-input-field-rac-CFoesqmC.js → rating-input-field-rac-DCXNZgf1.js} +37 -37
- package/dist/component/{rating-input-rac-CFMIxche.js → rating-input-rac-DwQt9ML7.js} +1 -1
- package/dist/component/{rich-content-rac.module-xJ03MegT.js → rich-content-rac.module-B7rPwNns.js} +8 -8
- package/dist/component/{rich-text-field-rac-CBMY4JOB.js → rich-text-field-rac-DlER7NRD.js} +4 -4
- package/dist/component/{rich-text-rac-CvZ7s1Ct.js → rich-text-rac-CjicsHA7.js} +1 -1
- package/dist/component/service-dropdown-rac-B81LC_6_.js +145 -0
- package/dist/component/{services-multi-choice-rac-fXOov4K7.js → services-multi-choice-rac-BR6gZeHk.js} +16 -16
- package/dist/component/{signature-rac-CG_Q9Oxr.js → signature-rac-XFj7Ddtp.js} +69 -69
- package/dist/component/{submit-button-rac-DAsovEp2.js → submit-button-rac-Bz7zs_3W.js} +12 -12
- package/dist/component/{tags-field-rac-9mpOMPLm.js → tags-field-rac-DWWkNKqc.js} +22 -22
- package/dist/component/{tags-rac-CNBJ08wS.js → tags-rac-BXyiQ9i1.js} +1 -1
- package/dist/component/{text-area-field-rac-D4aTm7CM.js → text-area-field-rac-DsIRYi0d.js} +21 -21
- package/dist/component/{text-area-rac-DoKiH_Kv.js → text-area-rac-CF9pDP9d.js} +1 -1
- package/dist/component/{text-input-field-rac-BbvPB26b.js → text-input-field-rac-BwIDZACz.js} +5 -5
- package/dist/component/{text-input-headless-BGaBRrP1.js → text-input-headless-5kQs2_Xu.js} +14 -14
- package/dist/component/{text-input-rac-1ac1EKad.js → text-input-rac-CRmSuw1k.js} +1 -1
- package/dist/component/{time-input-rac-BS0rR-89.js → time-input-rac-BRMNpe51.js} +20 -20
- package/dist/component/{url-input-field-rac-DbO6ATng.js → url-input-field-rac-CKLS3QDk.js} +17 -17
- package/dist/component/{url-input-rac-DHuny3d-.js → url-input-rac-Dv-kp50D.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-BQi_qE_-.js +116 -0
- package/dist/component/use-dropdown-trigger-class-name-bAK8aHiG.js +96 -0
- package/dist/component/{use-element-state-class-name-BUsFQfoW.js → use-element-state-class-name-rXM_lHug.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C2l3G8gb.js → use-hoverable-input-class-name-BnV_uerV.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +53 -0
- package/dist/component/{use-service-options-base-D_enm38a.js → use-service-options-base-CLeE9-Tx.js} +10 -10
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +6 -0
- package/dist/form.d.ts +8 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-CEuPElMH.js +0 -303
- package/dist/component/date-time-input-field-rac-DG5KSBHe.js +0 -433
- package/dist/component/dext-radio-group-rac-Cp-I94HW.js +0 -18
- package/dist/component/dropdown-field-headless-BYEjiIUf.js +0 -93
- package/dist/component/multiline-address-field-rac-BjWzx-LH.js +0 -1659
- package/dist/component/phone-input-field-rac-BVWzH_TY.js +0 -508
- package/dist/component/service-dropdown-rac-B627AgPG.js +0 -145
- package/dist/component/use-dropdown-trigger-class-name-rcGBzxI1.js +0 -117
- package/dist/component/use-is-forced-open-dropdown-CoOk4W4i.js +0 -48
- package/dist/component/use-text-input-class-name-BLtPQoYE.js +0 -6
|
@@ -1,1659 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as G } from "@wix/ricos/viewer";
|
|
2
|
-
import L from "classnames";
|
|
3
|
-
import r, { useMemo as q, createContext as Ve, useContext as Ce, useState as be, useRef as x, useCallback as R, useEffect as _e } from "react";
|
|
4
|
-
import { UNSAFE_PortalProvider as _t } from "react-aria";
|
|
5
|
-
import { bj as ft, d as yt, be as Pt, bg as Ct, aT as Tt, aU as wt, aM as Mt, aS as W, F as K, by as Pe, b7 as lt, bo as P, bl as T, bq as ae, bk as It, aY as qt, C as Oe, b5 as xt, b9 as Bt, bv as kt, bp as $t, bu as Ut, bc as Vt, b1 as Wt, bb as Kt, br as Yt, as as Ht, R as z, a0 as Q, y as ge, H as Z, v as ee } from "./form-BTUoOcqB.js";
|
|
6
|
-
import { f as E, a as F } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { F as jt, V as Jt } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
-
import { a as Xt } from "./use-is-forced-open-dropdown-CoOk4W4i.js";
|
|
9
|
-
import { TextField as fe, Input as le, ComboBoxStateContext as We, ComboBox as he, Popover as Se, ListBox as Te, ListBoxItem as De, Group as Lt, Button as Nt } from "react-aria-components";
|
|
10
|
-
import { D as ie, E as ce } from "./field-error-headless-DWc76YmY.js";
|
|
11
|
-
import { L as de } from "./field-label-headless-DKBKqI2X.js";
|
|
12
|
-
import { e as Gt, c as zt, a as Qt, r as gt } from "./isObjectLike-CLN09X5V.js";
|
|
13
|
-
import { V as Zt, a as en, u as tn } from "./use-dropdown-trigger-class-name-rcGBzxI1.js";
|
|
14
|
-
import { u as nn } from "./use-invoke-callback-UH73A_J3.js";
|
|
15
|
-
import { C as it } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
-
import { E as te } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
-
import { H as we } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as I } from "./field-rac.module-DP0lkkEv.js";
|
|
19
|
-
import { u as rn } from "./use-text-input-class-name-BLtPQoYE.js";
|
|
20
|
-
const on = (e, t, o) => {
|
|
21
|
-
var a, l, i, s;
|
|
22
|
-
const n = (a = e.steps) == null ? void 0 : a.map((d) => {
|
|
23
|
-
var m, u, y, C, b, p;
|
|
24
|
-
return {
|
|
25
|
-
...d,
|
|
26
|
-
layout: {
|
|
27
|
-
...d.layout,
|
|
28
|
-
large: {
|
|
29
|
-
...(m = d.layout) == null ? void 0 : m.large,
|
|
30
|
-
items: ((C = (y = (u = d.layout) == null ? void 0 : u.large) == null ? void 0 : y.items) == null ? void 0 : C.map((f) => ({
|
|
31
|
-
...f,
|
|
32
|
-
row: o.row <= f.row ? (f.row || 0) + 1 : f.row
|
|
33
|
-
}))) || ((p = (b = d.layout) == null ? void 0 : b.large) == null ? void 0 : p.items)
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
return (s = (i = (l = n == null ? void 0 : n[0].layout) == null ? void 0 : l.large) == null ? void 0 : i.items) == null || s.unshift(o), {
|
|
39
|
-
...e,
|
|
40
|
-
fields: [
|
|
41
|
-
t,
|
|
42
|
-
...e.fields || []
|
|
43
|
-
],
|
|
44
|
-
steps: n || e.steps
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
var ye = /* @__PURE__ */ (function(e) {
|
|
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
|
-
})({});
|
|
50
|
-
function sn(e, t, o = !1) {
|
|
51
|
-
const { country: n, subdivision: a, city: l, addressLine: i, streetAddress: s, addressLine2: d, postalCode: m } = e, u = {};
|
|
52
|
-
return t ? (n && (u.country = n), a && (u.subdivision = a), l && (u.city = l), i ? u.addressLine = i : s != null && s.formattedAddressLine && (u.addressLine = s == null ? void 0 : s.formattedAddressLine), d && (u.addressLine = d), m && (u.postalCode = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.streetName = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.streetName = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.streetNumber = s.number)) : (n && (u.country = n), a && (u.subdivision = a), l && (u.city = l), i ? u.address_line = i : s != null && s.formattedAddressLine && (u.address_line = s == null ? void 0 : s.formattedAddressLine), d && (u.address_line = d), m && (u.postal_code = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.street_name = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.street_name = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.street_number = s.number)), u;
|
|
53
|
-
}
|
|
54
|
-
const Ot = /* @__PURE__ */ Ve({
|
|
55
|
-
onAddressSelect: () => {
|
|
56
|
-
}
|
|
57
|
-
}), an = ({ children: e, onAddressSelect: t, autocompleteEnabled: o }) => {
|
|
58
|
-
const n = q(() => ({
|
|
59
|
-
onAddressSelect: t,
|
|
60
|
-
autocompleteEnabled: o
|
|
61
|
-
}), [
|
|
62
|
-
t,
|
|
63
|
-
o
|
|
64
|
-
]);
|
|
65
|
-
return /* @__PURE__ */ r.createElement(Ot.Provider, {
|
|
66
|
-
value: n
|
|
67
|
-
}, e);
|
|
68
|
-
};
|
|
69
|
-
function Ie() {
|
|
70
|
-
return Ce(Ot);
|
|
71
|
-
}
|
|
72
|
-
const vt = /* @__PURE__ */ Ve(void 0), ln = ({ children: e, countryCode: t }) => {
|
|
73
|
-
const o = q(() => ({
|
|
74
|
-
countryCode: t
|
|
75
|
-
}), [
|
|
76
|
-
t
|
|
77
|
-
]);
|
|
78
|
-
return /* @__PURE__ */ r.createElement(vt.Provider, {
|
|
79
|
-
value: o
|
|
80
|
-
}, e);
|
|
81
|
-
};
|
|
82
|
-
function Le() {
|
|
83
|
-
const e = Ce(vt);
|
|
84
|
-
return e == null ? void 0 : e.countryCode;
|
|
85
|
-
}
|
|
86
|
-
function Me(e) {
|
|
87
|
-
return e != null;
|
|
88
|
-
}
|
|
89
|
-
function cn(e, t, o) {
|
|
90
|
-
return !t || !o ? e : {
|
|
91
|
-
...e,
|
|
92
|
-
fields: (e.fields ?? []).map((n) => {
|
|
93
|
-
const { show: a, ...l } = t[n.target] || {}, { required: i } = o[n.target] || {};
|
|
94
|
-
return {
|
|
95
|
-
...n,
|
|
96
|
-
view: {
|
|
97
|
-
...n.view,
|
|
98
|
-
...l
|
|
99
|
-
},
|
|
100
|
-
...Me(a) && {
|
|
101
|
-
hidden: !a
|
|
102
|
-
},
|
|
103
|
-
...Me(i) && Me(n.validation) && {
|
|
104
|
-
validation: {
|
|
105
|
-
...n.validation,
|
|
106
|
-
required: i
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
})
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
const dn = (e, t) => e.map((o) => ({
|
|
114
|
-
...o,
|
|
115
|
-
id: ("target" in o ? t[o.target] : void 0) ?? o.id
|
|
116
|
-
})), Ft = 12, un = (e) => {
|
|
117
|
-
const t = e.filter((n) => !n.properties.hidden), o = e.filter((n) => n.properties.hidden);
|
|
118
|
-
return {
|
|
119
|
-
visibleFields: t,
|
|
120
|
-
hiddenFields: o
|
|
121
|
-
};
|
|
122
|
-
}, mn = (e) => {
|
|
123
|
-
const t = {};
|
|
124
|
-
return e.forEach((o) => {
|
|
125
|
-
const n = o.layout.row;
|
|
126
|
-
t[n] || (t[n] = []), t[n].push(o);
|
|
127
|
-
}), t;
|
|
128
|
-
}, pn = (e) => {
|
|
129
|
-
const t = {};
|
|
130
|
-
return Object.keys(e).forEach((o) => {
|
|
131
|
-
const n = parseInt(o, 10), a = e[n];
|
|
132
|
-
a.reduce((i, s) => i + s.layout.width, 0) !== Ft && (t[n] = a);
|
|
133
|
-
}), t;
|
|
134
|
-
}, En = (e, t) => e.map((o) => {
|
|
135
|
-
const n = o.layout.row;
|
|
136
|
-
if (t[n] && !o.properties.hidden) {
|
|
137
|
-
const a = t[n], l = a.length, i = Ft / l, s = a.findIndex((m) => m.id === o.id), d = i * s;
|
|
138
|
-
return {
|
|
139
|
-
...o,
|
|
140
|
-
layout: {
|
|
141
|
-
...o.layout,
|
|
142
|
-
width: i,
|
|
143
|
-
column: d
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
return o;
|
|
148
|
-
}), bn = (e, t, o) => {
|
|
149
|
-
const n = Math.max(...t.map((a) => a.layout.row), -1);
|
|
150
|
-
return e.map((a) => {
|
|
151
|
-
if (a.properties.hidden) {
|
|
152
|
-
const l = o.findIndex((i) => i.id === a.id);
|
|
153
|
-
return {
|
|
154
|
-
...a,
|
|
155
|
-
layout: {
|
|
156
|
-
...a.layout,
|
|
157
|
-
row: n + 1 + l
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
return a;
|
|
162
|
-
});
|
|
163
|
-
}, fn = (e) => {
|
|
164
|
-
const { visibleFields: t, hiddenFields: o } = un(e.fields), n = mn(t), a = pn(n), l = En(e.fields, a), i = bn(l, t, o);
|
|
165
|
-
return {
|
|
166
|
-
...e,
|
|
167
|
-
fields: i
|
|
168
|
-
};
|
|
169
|
-
}, yn = () => ({
|
|
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
|
-
}), Cn = ({ id: e, target: t, fieldType: o, form: n, country: a, fieldSettings: l, validation: i, required: s }) => {
|
|
180
|
-
const [d] = be(yn), { isExperimentEnabled: m } = ft(), u = m(yt.USE_FIELDS_V2), { getCountryAddressForm: y } = Pt(), { isMobile: C, breakpoint: b } = Ct(), p = y(a), f = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N = q(() => {
|
|
181
|
-
var O;
|
|
182
|
-
return Tt(s, (O = i == null ? void 0 : i.predefined) == null ? void 0 : O.multilineAddressOptions);
|
|
183
|
-
}, [
|
|
184
|
-
i,
|
|
185
|
-
s
|
|
186
|
-
]), D = q(() => wt(), []);
|
|
187
|
-
return {
|
|
188
|
-
form: q(() => {
|
|
189
|
-
var _, g;
|
|
190
|
-
if (!f || !p)
|
|
191
|
-
return n && {
|
|
192
|
-
...n,
|
|
193
|
-
fields: dn(n.fields, d)
|
|
194
|
-
};
|
|
195
|
-
const O = Mt({
|
|
196
|
-
useFieldsV2: u,
|
|
197
|
-
path: t,
|
|
198
|
-
parentId: e,
|
|
199
|
-
includeHiddenFields: !0,
|
|
200
|
-
isMobile: C,
|
|
201
|
-
breakpoint: b,
|
|
202
|
-
form: cn(on(p, N, D), l, (g = (_ = i == null ? void 0 : i.predefined) == null ? void 0 : _.multilineAddressOptions) == null ? void 0 : g.fields)
|
|
203
|
-
});
|
|
204
|
-
if (!O.fields.some((v) => v.properties.hidden))
|
|
205
|
-
return O;
|
|
206
|
-
const w = fn(O);
|
|
207
|
-
return {
|
|
208
|
-
...w,
|
|
209
|
-
fields: w.fields.filter((v) => !v.properties.hidden)
|
|
210
|
-
};
|
|
211
|
-
}, [
|
|
212
|
-
p,
|
|
213
|
-
n,
|
|
214
|
-
d,
|
|
215
|
-
l,
|
|
216
|
-
i,
|
|
217
|
-
t,
|
|
218
|
-
N,
|
|
219
|
-
D,
|
|
220
|
-
f,
|
|
221
|
-
u,
|
|
222
|
-
e,
|
|
223
|
-
C,
|
|
224
|
-
b
|
|
225
|
-
]),
|
|
226
|
-
isMultilineAddressField: f
|
|
227
|
-
};
|
|
228
|
-
}, ht = /* @__PURE__ */ Ve(void 0), In = ({ children: e, fields: t }) => {
|
|
229
|
-
const o = q(() => ({
|
|
230
|
-
fields: t
|
|
231
|
-
}), [
|
|
232
|
-
t
|
|
233
|
-
]);
|
|
234
|
-
return /* @__PURE__ */ r.createElement(ht.Provider, {
|
|
235
|
-
value: o
|
|
236
|
-
}, e);
|
|
237
|
-
};
|
|
238
|
-
function ue(e) {
|
|
239
|
-
const t = Ce(ht);
|
|
240
|
-
if (!t)
|
|
241
|
-
throw new Error("useAddressFields must be used within AddressFieldsProvider");
|
|
242
|
-
return t.fields[e];
|
|
243
|
-
}
|
|
244
|
-
function pe(e) {
|
|
245
|
-
const { t } = Pe(), o = Le(), n = o && lt.getCountryByShortKey(o), l = (n ? n.addressPartDisplayNames : lt.getDefaultAddressDisplayNames())[e];
|
|
246
|
-
return l ? t(l) : "";
|
|
247
|
-
}
|
|
248
|
-
const ne = ({ children: e }) => {
|
|
249
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), C = pe("addressLine2"), b = E(e, ne.Label), p = E(e, ne.Input), f = E(e, ne.Description), N = E(e, ne.Error);
|
|
250
|
-
return /* @__PURE__ */ r.createElement(u, {
|
|
251
|
-
fieldId: t,
|
|
252
|
-
renderLabel: () => F(b, {
|
|
253
|
-
label: C
|
|
254
|
-
}),
|
|
255
|
-
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
256
|
-
"aria-labelledby": y,
|
|
257
|
-
value: o ?? "",
|
|
258
|
-
onChange: n,
|
|
259
|
-
isDisabled: a,
|
|
260
|
-
isReadOnly: l,
|
|
261
|
-
isRequired: i,
|
|
262
|
-
isInvalid: s,
|
|
263
|
-
onBlur: d,
|
|
264
|
-
onFocus: m
|
|
265
|
-
}, p),
|
|
266
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, N, f)
|
|
267
|
-
});
|
|
268
|
-
}, Ln = ({ className: e }) => {
|
|
269
|
-
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: a } = T(), l = x(null);
|
|
270
|
-
return ae(() => {
|
|
271
|
-
var i;
|
|
272
|
-
(i = l.current) == null || i.focus({
|
|
273
|
-
preventScroll: !0
|
|
274
|
-
});
|
|
275
|
-
}, t), /* @__PURE__ */ r.createElement(le, {
|
|
276
|
-
ref: l,
|
|
277
|
-
id: n,
|
|
278
|
-
autoComplete: "address-line2",
|
|
279
|
-
"aria-describedby": a,
|
|
280
|
-
className: e,
|
|
281
|
-
placeholder: o
|
|
282
|
-
});
|
|
283
|
-
};
|
|
284
|
-
ne.Label = de;
|
|
285
|
-
ne.Input = Ln;
|
|
286
|
-
ne.Description = ie;
|
|
287
|
-
ne.Error = ce;
|
|
288
|
-
const Ke = ({ enabled: e }) => {
|
|
289
|
-
const { actions: t } = It(), [o, n] = be(W()), a = R(() => n(W()), []);
|
|
290
|
-
return q(() => {
|
|
291
|
-
const { predict: l, getPlace: i, searchByPostalCode: s } = t ?? {};
|
|
292
|
-
if (!(!e || !l || !i || !s))
|
|
293
|
-
return {
|
|
294
|
-
predict: (d) => l({
|
|
295
|
-
...d,
|
|
296
|
-
sessionToken: o
|
|
297
|
-
}),
|
|
298
|
-
getPlace: (d) => i({
|
|
299
|
-
...d,
|
|
300
|
-
sessionToken: o,
|
|
301
|
-
refreshSessionToken: a
|
|
302
|
-
}),
|
|
303
|
-
searchByPostalCode: (d) => s({
|
|
304
|
-
...d,
|
|
305
|
-
sessionToken: o
|
|
306
|
-
})
|
|
307
|
-
};
|
|
308
|
-
}, [
|
|
309
|
-
e,
|
|
310
|
-
t,
|
|
311
|
-
o,
|
|
312
|
-
a
|
|
313
|
-
]);
|
|
314
|
-
};
|
|
315
|
-
var qe, ct;
|
|
316
|
-
function Nn() {
|
|
317
|
-
if (ct) return qe;
|
|
318
|
-
ct = 1;
|
|
319
|
-
var e = Gt(), t = function() {
|
|
320
|
-
return e.Date.now();
|
|
321
|
-
};
|
|
322
|
-
return qe = t, qe;
|
|
323
|
-
}
|
|
324
|
-
var xe, dt;
|
|
325
|
-
function gn() {
|
|
326
|
-
if (dt) return xe;
|
|
327
|
-
dt = 1;
|
|
328
|
-
var e = /\s/;
|
|
329
|
-
function t(o) {
|
|
330
|
-
for (var n = o.length; n-- && e.test(o.charAt(n)); )
|
|
331
|
-
;
|
|
332
|
-
return n;
|
|
333
|
-
}
|
|
334
|
-
return xe = t, xe;
|
|
335
|
-
}
|
|
336
|
-
var Be, ut;
|
|
337
|
-
function On() {
|
|
338
|
-
if (ut) return Be;
|
|
339
|
-
ut = 1;
|
|
340
|
-
var e = gn(), t = /^\s+/;
|
|
341
|
-
function o(n) {
|
|
342
|
-
return n && n.slice(0, e(n) + 1).replace(t, "");
|
|
343
|
-
}
|
|
344
|
-
return Be = o, Be;
|
|
345
|
-
}
|
|
346
|
-
var ke, mt;
|
|
347
|
-
function vn() {
|
|
348
|
-
if (mt) return ke;
|
|
349
|
-
mt = 1;
|
|
350
|
-
var e = zt(), t = Qt(), o = "[object Symbol]";
|
|
351
|
-
function n(a) {
|
|
352
|
-
return typeof a == "symbol" || t(a) && e(a) == o;
|
|
353
|
-
}
|
|
354
|
-
return ke = n, ke;
|
|
355
|
-
}
|
|
356
|
-
var $e, pt;
|
|
357
|
-
function Fn() {
|
|
358
|
-
if (pt) return $e;
|
|
359
|
-
pt = 1;
|
|
360
|
-
var e = On(), t = gt(), o = vn(), n = NaN, a = /^[-+]0x[0-9a-f]+$/i, l = /^0b[01]+$/i, i = /^0o[0-7]+$/i, s = parseInt;
|
|
361
|
-
function d(m) {
|
|
362
|
-
if (typeof m == "number")
|
|
363
|
-
return m;
|
|
364
|
-
if (o(m))
|
|
365
|
-
return n;
|
|
366
|
-
if (t(m)) {
|
|
367
|
-
var u = typeof m.valueOf == "function" ? m.valueOf() : m;
|
|
368
|
-
m = t(u) ? u + "" : u;
|
|
369
|
-
}
|
|
370
|
-
if (typeof m != "string")
|
|
371
|
-
return m === 0 ? m : +m;
|
|
372
|
-
m = e(m);
|
|
373
|
-
var y = l.test(m);
|
|
374
|
-
return y || i.test(m) ? s(m.slice(2), y ? 2 : 8) : a.test(m) ? n : +m;
|
|
375
|
-
}
|
|
376
|
-
return $e = d, $e;
|
|
377
|
-
}
|
|
378
|
-
var Ue, Et;
|
|
379
|
-
function hn() {
|
|
380
|
-
if (Et) return Ue;
|
|
381
|
-
Et = 1;
|
|
382
|
-
var e = gt(), t = Nn(), o = Fn(), n = "Expected a function", a = Math.max, l = Math.min;
|
|
383
|
-
function i(s, d, m) {
|
|
384
|
-
var u, y, C, b, p, f, N = 0, D = !1, h = !1, O = !0;
|
|
385
|
-
if (typeof s != "function")
|
|
386
|
-
throw new TypeError(n);
|
|
387
|
-
d = o(d) || 0, e(m) && (D = !!m.leading, h = "maxWait" in m, C = h ? a(o(m.maxWait) || 0, d) : C, O = "trailing" in m ? !!m.trailing : O);
|
|
388
|
-
function A(S) {
|
|
389
|
-
var J = u, Ee = y;
|
|
390
|
-
return u = y = void 0, N = S, b = s.apply(Ee, J), b;
|
|
391
|
-
}
|
|
392
|
-
function w(S) {
|
|
393
|
-
return N = S, p = setTimeout(v, d), D ? A(S) : b;
|
|
394
|
-
}
|
|
395
|
-
function _(S) {
|
|
396
|
-
var J = S - f, Ee = S - N, Ne = d - J;
|
|
397
|
-
return h ? l(Ne, C - Ee) : Ne;
|
|
398
|
-
}
|
|
399
|
-
function g(S) {
|
|
400
|
-
var J = S - f, Ee = S - N;
|
|
401
|
-
return f === void 0 || J >= d || J < 0 || h && Ee >= C;
|
|
402
|
-
}
|
|
403
|
-
function v() {
|
|
404
|
-
var S = t();
|
|
405
|
-
if (g(S))
|
|
406
|
-
return me(S);
|
|
407
|
-
p = setTimeout(v, _(S));
|
|
408
|
-
}
|
|
409
|
-
function me(S) {
|
|
410
|
-
return p = void 0, O && u ? A(S) : (u = y = void 0, b);
|
|
411
|
-
}
|
|
412
|
-
function j() {
|
|
413
|
-
p !== void 0 && clearTimeout(p), N = 0, u = f = y = p = void 0;
|
|
414
|
-
}
|
|
415
|
-
function B() {
|
|
416
|
-
return p === void 0 ? b : me(t());
|
|
417
|
-
}
|
|
418
|
-
function M() {
|
|
419
|
-
var S = t(), J = g(S);
|
|
420
|
-
if (u = arguments, y = this, f = S, J) {
|
|
421
|
-
if (p === void 0)
|
|
422
|
-
return w(f);
|
|
423
|
-
if (h)
|
|
424
|
-
return clearTimeout(p), p = setTimeout(v, d), A(f);
|
|
425
|
-
}
|
|
426
|
-
return p === void 0 && (p = setTimeout(v, d)), b;
|
|
427
|
-
}
|
|
428
|
-
return M.cancel = j, M.flush = B, M;
|
|
429
|
-
}
|
|
430
|
-
return Ue = i, Ue;
|
|
431
|
-
}
|
|
432
|
-
var Sn = hn();
|
|
433
|
-
const Dn = /* @__PURE__ */ qt(Sn), Rn = (e, t, o = 200) => {
|
|
434
|
-
const n = x(e), a = R(Dn((...l) => {
|
|
435
|
-
n.current(...l);
|
|
436
|
-
}, o), [
|
|
437
|
-
o
|
|
438
|
-
]);
|
|
439
|
-
return _e(() => {
|
|
440
|
-
n.current = e;
|
|
441
|
-
}, [
|
|
442
|
-
e,
|
|
443
|
-
t
|
|
444
|
-
]), a;
|
|
445
|
-
}, An = () => {
|
|
446
|
-
const e = x(!0);
|
|
447
|
-
return _e(() => () => {
|
|
448
|
-
e.current = !1;
|
|
449
|
-
}, []), () => e.current;
|
|
450
|
-
}, bt = {
|
|
451
|
-
loading: !1,
|
|
452
|
-
predictions: []
|
|
453
|
-
}, St = ({ atlas: e, onError: t }) => {
|
|
454
|
-
const [{ loading: n, predictions: a }, l] = be(bt), i = x(0), s = An(), d = R(() => {
|
|
455
|
-
i.current++, l(bt);
|
|
456
|
-
}, []), m = Rn(async ({ input: u, countryCodes: y }) => {
|
|
457
|
-
if (!e || !s())
|
|
458
|
-
return;
|
|
459
|
-
if (!u) {
|
|
460
|
-
d();
|
|
461
|
-
return;
|
|
462
|
-
}
|
|
463
|
-
const C = ++i.current;
|
|
464
|
-
l((p) => ({
|
|
465
|
-
...p,
|
|
466
|
-
loading: !0
|
|
467
|
-
}));
|
|
468
|
-
let b;
|
|
469
|
-
try {
|
|
470
|
-
b = await e.predict({
|
|
471
|
-
input: u,
|
|
472
|
-
countryCodes: y
|
|
473
|
-
});
|
|
474
|
-
} catch (p) {
|
|
475
|
-
t ? t(p) : console.error(p);
|
|
476
|
-
} finally {
|
|
477
|
-
const p = C === i.current;
|
|
478
|
-
s() && p && l((f) => ({
|
|
479
|
-
loading: !1,
|
|
480
|
-
// set new predictions if fetched properly, else keep current predictions
|
|
481
|
-
predictions: b || f.predictions
|
|
482
|
-
}));
|
|
483
|
-
}
|
|
484
|
-
}, [
|
|
485
|
-
e,
|
|
486
|
-
t
|
|
487
|
-
], 200);
|
|
488
|
-
return {
|
|
489
|
-
predictions: a,
|
|
490
|
-
loading: n,
|
|
491
|
-
updatePredictions: m,
|
|
492
|
-
clearPredictions: d
|
|
493
|
-
};
|
|
494
|
-
}, Ye = ({ optionCount: e }) => {
|
|
495
|
-
const t = Ce(We), o = x(t);
|
|
496
|
-
o.current = t;
|
|
497
|
-
const n = x(e);
|
|
498
|
-
return _e(() => {
|
|
499
|
-
const a = e > 0 && n.current === 0;
|
|
500
|
-
n.current = e;
|
|
501
|
-
const l = o.current;
|
|
502
|
-
a && (l != null && l.isFocused) && !l.isOpen && l.open(null, "manual");
|
|
503
|
-
}, [
|
|
504
|
-
e
|
|
505
|
-
]), null;
|
|
506
|
-
}, k = ({ children: e }) => {
|
|
507
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: C } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("addressLine1"), N = E(e, k.Label), D = E(e, k.Input), h = E(e, k.Options), O = E(e, k.Description), A = E(e, k.Error);
|
|
508
|
-
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
509
|
-
fieldId: t,
|
|
510
|
-
renderLabel: () => F(N, {
|
|
511
|
-
label: f
|
|
512
|
-
}),
|
|
513
|
-
renderInput: () => /* @__PURE__ */ r.createElement(_n, {
|
|
514
|
-
value: o,
|
|
515
|
-
onChange: n,
|
|
516
|
-
disabled: a,
|
|
517
|
-
readOnly: l,
|
|
518
|
-
required: i,
|
|
519
|
-
hasError: s,
|
|
520
|
-
onBlur: d,
|
|
521
|
-
onFocus: m
|
|
522
|
-
}, D, h),
|
|
523
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
524
|
-
}) : /* @__PURE__ */ r.createElement(u, {
|
|
525
|
-
fieldId: t,
|
|
526
|
-
renderLabel: () => F(N, {
|
|
527
|
-
label: f
|
|
528
|
-
}),
|
|
529
|
-
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
530
|
-
"aria-labelledby": C,
|
|
531
|
-
value: o ?? "",
|
|
532
|
-
onChange: n,
|
|
533
|
-
isDisabled: a,
|
|
534
|
-
isReadOnly: l,
|
|
535
|
-
isRequired: i,
|
|
536
|
-
isInvalid: s,
|
|
537
|
-
onBlur: d,
|
|
538
|
-
onFocus: m
|
|
539
|
-
}, D),
|
|
540
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
541
|
-
});
|
|
542
|
-
}, _n = ({ children: e, value: t, onChange: o, disabled: n, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
543
|
-
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), y = Le(), C = Ke({
|
|
544
|
-
enabled: !0
|
|
545
|
-
}), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
|
|
546
|
-
atlas: C
|
|
547
|
-
}), N = q(() => b.map((g) => ({
|
|
548
|
-
id: g.searchId || "",
|
|
549
|
-
label: g.description || ""
|
|
550
|
-
})), [
|
|
551
|
-
b
|
|
552
|
-
]), D = R((g) => {
|
|
553
|
-
p({
|
|
554
|
-
input: g,
|
|
555
|
-
countryCodes: y ? [
|
|
556
|
-
y
|
|
557
|
-
] : void 0
|
|
558
|
-
}), o(g);
|
|
559
|
-
}, [
|
|
560
|
-
o,
|
|
561
|
-
p,
|
|
562
|
-
y
|
|
563
|
-
]), h = R(async (g) => {
|
|
564
|
-
if (!g)
|
|
565
|
-
return;
|
|
566
|
-
f();
|
|
567
|
-
const v = await (C == null ? void 0 : C.getPlace({
|
|
568
|
-
searchId: String(g)
|
|
569
|
-
}));
|
|
570
|
-
v && u && u(v);
|
|
571
|
-
}, [
|
|
572
|
-
u,
|
|
573
|
-
f,
|
|
574
|
-
C
|
|
575
|
-
]), O = R(() => {
|
|
576
|
-
f(), s == null || s();
|
|
577
|
-
}, [
|
|
578
|
-
s,
|
|
579
|
-
f
|
|
580
|
-
]), A = R(() => {
|
|
581
|
-
d == null || d();
|
|
582
|
-
}, [
|
|
583
|
-
d
|
|
584
|
-
]), w = E(e, k.Input), _ = E(e, k.Options);
|
|
585
|
-
return /* @__PURE__ */ r.createElement(he, {
|
|
586
|
-
"aria-labelledby": m,
|
|
587
|
-
inputValue: t ?? "",
|
|
588
|
-
onInputChange: D,
|
|
589
|
-
value: null,
|
|
590
|
-
onChange: h,
|
|
591
|
-
isDisabled: n,
|
|
592
|
-
isReadOnly: a,
|
|
593
|
-
isRequired: l,
|
|
594
|
-
isInvalid: i,
|
|
595
|
-
onBlur: O,
|
|
596
|
-
onFocus: A,
|
|
597
|
-
allowsCustomValue: !0,
|
|
598
|
-
menuTrigger: "input",
|
|
599
|
-
items: N
|
|
600
|
-
}, F(w, {
|
|
601
|
-
onFocus: A
|
|
602
|
-
}), F(_, {
|
|
603
|
-
options: N
|
|
604
|
-
}), /* @__PURE__ */ r.createElement(Ye, {
|
|
605
|
-
optionCount: N.length
|
|
606
|
-
}));
|
|
607
|
-
}, Pn = ({ className: e, ...t }) => {
|
|
608
|
-
const { id: o, placeholder: n } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = x(null);
|
|
609
|
-
return ae(() => {
|
|
610
|
-
var d;
|
|
611
|
-
(d = s.current) == null || d.focus({
|
|
612
|
-
preventScroll: !0
|
|
613
|
-
});
|
|
614
|
-
}, o), /* @__PURE__ */ r.createElement(le, {
|
|
615
|
-
ref: s,
|
|
616
|
-
id: a,
|
|
617
|
-
autoComplete: "address-line1",
|
|
618
|
-
"aria-describedby": l,
|
|
619
|
-
className: e,
|
|
620
|
-
placeholder: n,
|
|
621
|
-
onFocus: i
|
|
622
|
-
});
|
|
623
|
-
}, He = ({ children: e, className: t }) => {
|
|
624
|
-
const o = E(e, He.Option);
|
|
625
|
-
return /* @__PURE__ */ r.createElement(Se, {
|
|
626
|
-
className: t,
|
|
627
|
-
containerPadding: 0,
|
|
628
|
-
offset: 0
|
|
629
|
-
}, /* @__PURE__ */ r.createElement(Te, {
|
|
630
|
-
renderEmptyState: () => null
|
|
631
|
-
}, (n) => F(o, {
|
|
632
|
-
id: n.id,
|
|
633
|
-
label: n.label
|
|
634
|
-
})));
|
|
635
|
-
}, Tn = ({ className: e, ...t }) => {
|
|
636
|
-
const { id: o, label: n } = t;
|
|
637
|
-
return /* @__PURE__ */ r.createElement(De, {
|
|
638
|
-
className: e,
|
|
639
|
-
id: o,
|
|
640
|
-
textValue: n
|
|
641
|
-
}, n);
|
|
642
|
-
};
|
|
643
|
-
He.Option = Tn;
|
|
644
|
-
k.Label = de;
|
|
645
|
-
k.Input = Pn;
|
|
646
|
-
k.Options = He;
|
|
647
|
-
k.Description = ie;
|
|
648
|
-
k.Error = ce;
|
|
649
|
-
const re = ({ children: e }) => {
|
|
650
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), { t: C } = Pe(), b = C("field.mla-apartment.label"), p = E(e, re.Label), f = E(e, re.Input), N = E(e, re.Description), D = E(e, re.Error);
|
|
651
|
-
return /* @__PURE__ */ r.createElement(u, {
|
|
652
|
-
fieldId: t,
|
|
653
|
-
renderLabel: () => F(p, {
|
|
654
|
-
label: b
|
|
655
|
-
}),
|
|
656
|
-
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
657
|
-
"aria-labelledby": y,
|
|
658
|
-
value: o ?? "",
|
|
659
|
-
onChange: n,
|
|
660
|
-
isDisabled: a,
|
|
661
|
-
isReadOnly: l,
|
|
662
|
-
isRequired: i,
|
|
663
|
-
isInvalid: s,
|
|
664
|
-
onBlur: d,
|
|
665
|
-
onFocus: m
|
|
666
|
-
}, f),
|
|
667
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, D, N)
|
|
668
|
-
});
|
|
669
|
-
}, wn = ({ className: e }) => {
|
|
670
|
-
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: a } = T(), l = x(null);
|
|
671
|
-
return ae(() => {
|
|
672
|
-
var i;
|
|
673
|
-
(i = l.current) == null || i.focus({
|
|
674
|
-
preventScroll: !0
|
|
675
|
-
});
|
|
676
|
-
}, t), /* @__PURE__ */ r.createElement(le, {
|
|
677
|
-
ref: l,
|
|
678
|
-
id: n,
|
|
679
|
-
autoComplete: "address-line2",
|
|
680
|
-
"aria-describedby": a,
|
|
681
|
-
className: e,
|
|
682
|
-
placeholder: o
|
|
683
|
-
});
|
|
684
|
-
};
|
|
685
|
-
re.Label = de;
|
|
686
|
-
re.Input = wn;
|
|
687
|
-
re.Description = ie;
|
|
688
|
-
re.Error = ce;
|
|
689
|
-
const oe = ({ children: e }) => {
|
|
690
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), C = pe("city"), b = E(e, oe.Label), p = E(e, oe.Input), f = E(e, oe.Description), N = E(e, oe.Error);
|
|
691
|
-
return /* @__PURE__ */ r.createElement(u, {
|
|
692
|
-
fieldId: t,
|
|
693
|
-
renderLabel: () => F(b, {
|
|
694
|
-
label: C
|
|
695
|
-
}),
|
|
696
|
-
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
697
|
-
"aria-labelledby": y,
|
|
698
|
-
value: o ?? "",
|
|
699
|
-
onChange: n,
|
|
700
|
-
isDisabled: a,
|
|
701
|
-
isReadOnly: l,
|
|
702
|
-
isRequired: i,
|
|
703
|
-
isInvalid: s,
|
|
704
|
-
onBlur: d,
|
|
705
|
-
onFocus: m
|
|
706
|
-
}, p),
|
|
707
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, N, f)
|
|
708
|
-
});
|
|
709
|
-
}, Mn = ({ className: e }) => {
|
|
710
|
-
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: a } = T(), l = x(null);
|
|
711
|
-
return ae(() => {
|
|
712
|
-
var i;
|
|
713
|
-
(i = l.current) == null || i.focus({
|
|
714
|
-
preventScroll: !0
|
|
715
|
-
});
|
|
716
|
-
}, t), /* @__PURE__ */ r.createElement(le, {
|
|
717
|
-
ref: l,
|
|
718
|
-
id: n,
|
|
719
|
-
autoComplete: "address-level2",
|
|
720
|
-
"aria-describedby": a,
|
|
721
|
-
className: e,
|
|
722
|
-
placeholder: o
|
|
723
|
-
});
|
|
724
|
-
};
|
|
725
|
-
oe.Label = de;
|
|
726
|
-
oe.Input = Mn;
|
|
727
|
-
oe.Description = ie;
|
|
728
|
-
oe.Error = ce;
|
|
729
|
-
const qn = ({ isOpen: e }) => {
|
|
730
|
-
const t = Ce(We), o = x(!1);
|
|
731
|
-
return _e(() => {
|
|
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
|
-
}, [
|
|
734
|
-
e,
|
|
735
|
-
t
|
|
736
|
-
]), null;
|
|
737
|
-
}, Dt = ({ readOnly: e, disabled: t } = {}) => {
|
|
738
|
-
const o = Ce(We);
|
|
739
|
-
return R(() => {
|
|
740
|
-
!o || o.isOpen || e || t || o.open(null, "manual");
|
|
741
|
-
}, [
|
|
742
|
-
o,
|
|
743
|
-
e,
|
|
744
|
-
t
|
|
745
|
-
]);
|
|
746
|
-
}, xn = (e, t) => e.find((o) => o.label.toLocaleLowerCase() === t.toLocaleLowerCase().trim()), Rt = ({ options: e, value: t, commit: o, clear: n, onBlur: a }) => {
|
|
747
|
-
const [l, i] = be(null), s = nn(a), d = q(() => {
|
|
748
|
-
var b;
|
|
749
|
-
return t ? ((b = e.find((p) => p.value === t)) == null ? void 0 : b.label) ?? "" : "";
|
|
750
|
-
}, [
|
|
751
|
-
t,
|
|
752
|
-
e
|
|
753
|
-
]), m = R((b) => {
|
|
754
|
-
typeof b != "string" || b === "" || b === t || (i(null), o(b));
|
|
755
|
-
}, [
|
|
756
|
-
o,
|
|
757
|
-
t
|
|
758
|
-
]), u = R((b) => {
|
|
759
|
-
if (i(b), b === "")
|
|
760
|
-
return;
|
|
761
|
-
const p = xn(e, b);
|
|
762
|
-
p && p.value !== t && o(p.value);
|
|
763
|
-
}, [
|
|
764
|
-
o,
|
|
765
|
-
e,
|
|
766
|
-
t
|
|
767
|
-
]), y = R((b) => {
|
|
768
|
-
b.key !== "Enter" && b.key !== "Escape" || (i(null), b.key === "Enter" && l === "" && t && n());
|
|
769
|
-
}, [
|
|
770
|
-
l,
|
|
771
|
-
t,
|
|
772
|
-
n
|
|
773
|
-
]), C = R(() => {
|
|
774
|
-
l === "" && t && n(), i(null), s();
|
|
775
|
-
}, [
|
|
776
|
-
l,
|
|
777
|
-
t,
|
|
778
|
-
n,
|
|
779
|
-
s
|
|
780
|
-
]);
|
|
781
|
-
return {
|
|
782
|
-
value: t ?? null,
|
|
783
|
-
inputValue: l ?? d,
|
|
784
|
-
onChange: m,
|
|
785
|
-
onInputChange: u,
|
|
786
|
-
onBlur: C,
|
|
787
|
-
onInputKeyDown: y
|
|
788
|
-
};
|
|
789
|
-
}, Y = ({ children: e, ...t }) => {
|
|
790
|
-
const { isForcedOpen: o = !1 } = t, { id: n, value: a, onChange: l, disabled: i, readOnly: s, required: d, hasError: m, onBlur: u, onFocus: y, FieldLayout: C, options: b } = P(), { labelId: p } = T(), { t: f } = Pe(), { language: N } = Ct(), D = q(() => (b || []).reduce((M, S) => (S.value && Oe.hasOwnProperty(S.value) && M.push({
|
|
791
|
-
value: S.value,
|
|
792
|
-
label: f(`locale-dataset.countries.${Oe[S.value].toUpperCase()}`)
|
|
793
|
-
}), M), []).sort((M, S) => M.label.localeCompare(S.label, N)), [
|
|
794
|
-
b,
|
|
795
|
-
f,
|
|
796
|
-
N
|
|
797
|
-
]), h = R((M) => l(M), [
|
|
798
|
-
l
|
|
799
|
-
]), O = R(() => h(""), [
|
|
800
|
-
h
|
|
801
|
-
]), { onInputKeyDown: A, ...w } = Rt({
|
|
802
|
-
options: D,
|
|
803
|
-
value: a,
|
|
804
|
-
commit: h,
|
|
805
|
-
clear: O,
|
|
806
|
-
onBlur: u
|
|
807
|
-
}), _ = pe("country"), g = E(e, Y.Label), v = E(e, Y.Control), me = E(e, Y.Options), j = E(e, Y.Description), B = E(e, Y.Error);
|
|
808
|
-
return /* @__PURE__ */ r.createElement(C, {
|
|
809
|
-
fieldId: n,
|
|
810
|
-
renderLabel: () => F(g, {
|
|
811
|
-
label: _
|
|
812
|
-
}),
|
|
813
|
-
renderInput: () => /* @__PURE__ */ r.createElement(he, {
|
|
814
|
-
"aria-labelledby": p,
|
|
815
|
-
...w,
|
|
816
|
-
isDisabled: i,
|
|
817
|
-
isReadOnly: s,
|
|
818
|
-
isRequired: d,
|
|
819
|
-
isInvalid: m,
|
|
820
|
-
onFocus: y,
|
|
821
|
-
menuTrigger: "input"
|
|
822
|
-
}, F(v, {
|
|
823
|
-
onKeyDown: A
|
|
824
|
-
}), F(me, {
|
|
825
|
-
options: D,
|
|
826
|
-
isForcedOpen: o
|
|
827
|
-
}), /* @__PURE__ */ r.createElement(qn, {
|
|
828
|
-
isOpen: o
|
|
829
|
-
})),
|
|
830
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, B, j)
|
|
831
|
-
});
|
|
832
|
-
}, ve = ({ children: e, className: t, ...o }) => {
|
|
833
|
-
const { disabled: n, hasError: a } = P(), { onKeyDown: l } = o, i = E(e, ve.Input), s = E(e, ve.Trigger);
|
|
834
|
-
return /* @__PURE__ */ r.createElement(Lt, {
|
|
835
|
-
className: t,
|
|
836
|
-
isDisabled: n,
|
|
837
|
-
isInvalid: a
|
|
838
|
-
}, F(i, {
|
|
839
|
-
onKeyDown: l
|
|
840
|
-
}), s);
|
|
841
|
-
}, Bn = ({ className: e, ...t }) => {
|
|
842
|
-
const { id: o, placeholder: n, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = t, m = x(null), u = Dt({
|
|
843
|
-
readOnly: a,
|
|
844
|
-
disabled: l
|
|
845
|
-
});
|
|
846
|
-
return ae(() => {
|
|
847
|
-
var y;
|
|
848
|
-
(y = m.current) == null || y.focus({
|
|
849
|
-
preventScroll: !0
|
|
850
|
-
});
|
|
851
|
-
}, o), /* @__PURE__ */ r.createElement(le, {
|
|
852
|
-
ref: m,
|
|
853
|
-
id: i,
|
|
854
|
-
autoComplete: "country-name",
|
|
855
|
-
"aria-describedby": s,
|
|
856
|
-
className: e,
|
|
857
|
-
placeholder: n,
|
|
858
|
-
onClick: u,
|
|
859
|
-
onKeyDown: d
|
|
860
|
-
});
|
|
861
|
-
}, kn = ({ children: e, className: t }) => /* @__PURE__ */ r.createElement(Nt, {
|
|
862
|
-
className: t
|
|
863
|
-
}, e);
|
|
864
|
-
ve.Input = Bn;
|
|
865
|
-
ve.Trigger = kn;
|
|
866
|
-
const je = ({ children: e, className: t, ...o }) => {
|
|
867
|
-
const { options: n, isForcedOpen: a } = o, l = E(e, je.Option);
|
|
868
|
-
return /* @__PURE__ */ r.createElement(Se, {
|
|
869
|
-
className: t,
|
|
870
|
-
containerPadding: 0,
|
|
871
|
-
offset: 0
|
|
872
|
-
}, /* @__PURE__ */ r.createElement(Zt, {
|
|
873
|
-
isForcedOpen: a
|
|
874
|
-
}, n.map((i) => F(l, {
|
|
875
|
-
key: i.value,
|
|
876
|
-
value: i.value,
|
|
877
|
-
label: i.label
|
|
878
|
-
}))));
|
|
879
|
-
}, $n = ({ className: e, ...t }) => {
|
|
880
|
-
const { value: o, label: n } = t;
|
|
881
|
-
return /* @__PURE__ */ r.createElement(De, {
|
|
882
|
-
className: e,
|
|
883
|
-
id: o,
|
|
884
|
-
textValue: n
|
|
885
|
-
}, n);
|
|
886
|
-
};
|
|
887
|
-
je.Option = $n;
|
|
888
|
-
Y.Label = de;
|
|
889
|
-
Y.Control = ve;
|
|
890
|
-
Y.Options = je;
|
|
891
|
-
Y.Description = ie;
|
|
892
|
-
Y.Error = ce;
|
|
893
|
-
const Un = /(\d{7})|(\d{3}-\d{4})/;
|
|
894
|
-
function Vn(e) {
|
|
895
|
-
var t;
|
|
896
|
-
return (t = e.match(Un)) == null ? void 0 : t[0];
|
|
897
|
-
}
|
|
898
|
-
function Wn({ isAutocompleteEnabled: e }) {
|
|
899
|
-
const t = x({
|
|
900
|
-
hasAddress: !1
|
|
901
|
-
}), o = Ke({
|
|
902
|
-
enabled: e
|
|
903
|
-
});
|
|
904
|
-
return {
|
|
905
|
-
searchByPostalCode: R(async (a) => {
|
|
906
|
-
const l = Vn(a);
|
|
907
|
-
if (l) {
|
|
908
|
-
if (t.current.postalCode === l && t.current.hasAddress)
|
|
909
|
-
return t.current.address;
|
|
910
|
-
t.current = {
|
|
911
|
-
postalCode: l,
|
|
912
|
-
address: void 0,
|
|
913
|
-
hasAddress: !1
|
|
914
|
-
};
|
|
915
|
-
try {
|
|
916
|
-
const i = await (o == null ? void 0 : o.searchByPostalCode({
|
|
917
|
-
countryCode: "JP",
|
|
918
|
-
postalCode: l
|
|
919
|
-
}));
|
|
920
|
-
return t.current.hasAddress = !0, t.current.address = void 0, i != null && i.formattedAddress ? (t.current.address = i, i) : void 0;
|
|
921
|
-
} catch (i) {
|
|
922
|
-
console.error(i);
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
}, [
|
|
926
|
-
o
|
|
927
|
-
])
|
|
928
|
-
};
|
|
929
|
-
}
|
|
930
|
-
const $ = ({ children: e }) => {
|
|
931
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: C } = T(), b = Le(), { autocompleteEnabled: p } = Ie(), f = !!(b && Oe[b] === Oe.JP), N = (y || p) && f, D = pe("zipCode"), h = E(e, $.Label), O = E(e, $.Control), A = E(e, $.Options), w = E(e, $.Description), _ = E(e, $.Error);
|
|
932
|
-
return N ? /* @__PURE__ */ r.createElement(u, {
|
|
933
|
-
fieldId: t,
|
|
934
|
-
renderLabel: () => F(h, {
|
|
935
|
-
label: D
|
|
936
|
-
}),
|
|
937
|
-
renderInput: () => /* @__PURE__ */ r.createElement(Kn, {
|
|
938
|
-
value: o,
|
|
939
|
-
onChange: n,
|
|
940
|
-
disabled: a,
|
|
941
|
-
readOnly: l,
|
|
942
|
-
required: i,
|
|
943
|
-
hasError: s,
|
|
944
|
-
onBlur: d,
|
|
945
|
-
onFocus: m
|
|
946
|
-
}, O, A),
|
|
947
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, w)
|
|
948
|
-
}) : /* @__PURE__ */ r.createElement(u, {
|
|
949
|
-
fieldId: t,
|
|
950
|
-
renderLabel: () => F(h, {
|
|
951
|
-
label: D
|
|
952
|
-
}),
|
|
953
|
-
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
954
|
-
"aria-labelledby": C,
|
|
955
|
-
value: o ?? "",
|
|
956
|
-
onChange: n,
|
|
957
|
-
isDisabled: a,
|
|
958
|
-
isReadOnly: l,
|
|
959
|
-
isRequired: i,
|
|
960
|
-
isInvalid: s,
|
|
961
|
-
onBlur: d,
|
|
962
|
-
onFocus: m
|
|
963
|
-
}, O),
|
|
964
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, _, w)
|
|
965
|
-
});
|
|
966
|
-
}, Kn = ({ children: e, value: t, onChange: o, disabled: n, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
967
|
-
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), [y, C] = be(!1), { searchByPostalCode: b } = Wn({
|
|
968
|
-
isAutocompleteEnabled: y
|
|
969
|
-
}), [p, f] = be(), N = q(() => p ? [
|
|
970
|
-
{
|
|
971
|
-
id: W(),
|
|
972
|
-
label: p.formattedAddress || ""
|
|
973
|
-
}
|
|
974
|
-
] : [], [
|
|
975
|
-
p
|
|
976
|
-
]), D = R(async (g) => {
|
|
977
|
-
o(g);
|
|
978
|
-
const v = await b(g ?? "");
|
|
979
|
-
f(v);
|
|
980
|
-
}, [
|
|
981
|
-
o,
|
|
982
|
-
b
|
|
983
|
-
]), h = R(async (g) => {
|
|
984
|
-
g && (f(void 0), p && u && u(p));
|
|
985
|
-
}, [
|
|
986
|
-
u,
|
|
987
|
-
p
|
|
988
|
-
]), O = R(() => {
|
|
989
|
-
f(void 0), s == null || s();
|
|
990
|
-
}, [
|
|
991
|
-
s
|
|
992
|
-
]), A = R(() => {
|
|
993
|
-
C(!0), d == null || d();
|
|
994
|
-
}, [
|
|
995
|
-
d
|
|
996
|
-
]), w = E(e, $.Control), _ = E(e, $.Options);
|
|
997
|
-
return /* @__PURE__ */ r.createElement(he, {
|
|
998
|
-
"aria-labelledby": m,
|
|
999
|
-
inputValue: t ?? "",
|
|
1000
|
-
onInputChange: D,
|
|
1001
|
-
value: null,
|
|
1002
|
-
onChange: h,
|
|
1003
|
-
isDisabled: n,
|
|
1004
|
-
isReadOnly: a,
|
|
1005
|
-
isRequired: l,
|
|
1006
|
-
isInvalid: i,
|
|
1007
|
-
onBlur: O,
|
|
1008
|
-
onFocus: A,
|
|
1009
|
-
allowsCustomValue: !0,
|
|
1010
|
-
menuTrigger: "input",
|
|
1011
|
-
items: N
|
|
1012
|
-
}, F(w, {
|
|
1013
|
-
onFocus: A
|
|
1014
|
-
}), F(_, {
|
|
1015
|
-
options: N
|
|
1016
|
-
}), /* @__PURE__ */ r.createElement(Ye, {
|
|
1017
|
-
optionCount: N.length
|
|
1018
|
-
}));
|
|
1019
|
-
}, Je = ({ children: e, className: t, ...o }) => {
|
|
1020
|
-
const { disabled: n, hasError: a } = P(), { onFocus: l } = o, i = Le(), s = E(e, Je.Input);
|
|
1021
|
-
return /* @__PURE__ */ r.createElement("div", {
|
|
1022
|
-
className: t,
|
|
1023
|
-
"data-country": i || void 0,
|
|
1024
|
-
"data-disabled": n || void 0,
|
|
1025
|
-
"data-invalid": a || void 0
|
|
1026
|
-
}, F(s, {
|
|
1027
|
-
onFocus: l
|
|
1028
|
-
}));
|
|
1029
|
-
}, Yn = ({ className: e, ...t }) => {
|
|
1030
|
-
const { id: o, placeholder: n } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = x(null);
|
|
1031
|
-
return ae(() => {
|
|
1032
|
-
var d;
|
|
1033
|
-
(d = s.current) == null || d.focus({
|
|
1034
|
-
preventScroll: !0
|
|
1035
|
-
});
|
|
1036
|
-
}, o), /* @__PURE__ */ r.createElement(le, {
|
|
1037
|
-
ref: s,
|
|
1038
|
-
id: a,
|
|
1039
|
-
autoComplete: "postal-code",
|
|
1040
|
-
"aria-describedby": l,
|
|
1041
|
-
className: e,
|
|
1042
|
-
placeholder: n,
|
|
1043
|
-
onFocus: i
|
|
1044
|
-
});
|
|
1045
|
-
}, Xe = ({ children: e, className: t }) => {
|
|
1046
|
-
const o = E(e, Xe.Option);
|
|
1047
|
-
return /* @__PURE__ */ r.createElement(Se, {
|
|
1048
|
-
className: t,
|
|
1049
|
-
containerPadding: 0,
|
|
1050
|
-
offset: 0
|
|
1051
|
-
}, /* @__PURE__ */ r.createElement(Te, {
|
|
1052
|
-
renderEmptyState: () => null
|
|
1053
|
-
}, (n) => F(o, {
|
|
1054
|
-
id: n.id,
|
|
1055
|
-
label: n.label
|
|
1056
|
-
})));
|
|
1057
|
-
}, Hn = ({ className: e, ...t }) => {
|
|
1058
|
-
const { id: o, label: n } = t;
|
|
1059
|
-
return /* @__PURE__ */ r.createElement(De, {
|
|
1060
|
-
className: e,
|
|
1061
|
-
id: o,
|
|
1062
|
-
textValue: n
|
|
1063
|
-
}, n);
|
|
1064
|
-
};
|
|
1065
|
-
Xe.Option = Hn;
|
|
1066
|
-
Je.Input = Yn;
|
|
1067
|
-
$.Label = de;
|
|
1068
|
-
$.Control = Je;
|
|
1069
|
-
$.Options = Xe;
|
|
1070
|
-
$.Description = ie;
|
|
1071
|
-
$.Error = ce;
|
|
1072
|
-
const U = ({ children: e }) => {
|
|
1073
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: C } = T(), { autocompleteEnabled: b } = Ie(), p = y || b, f = pe("streetName"), N = E(e, U.Label), D = E(e, U.Input), h = E(e, U.Options), O = E(e, U.Description), A = E(e, U.Error);
|
|
1074
|
-
return p ? /* @__PURE__ */ r.createElement(u, {
|
|
1075
|
-
fieldId: t,
|
|
1076
|
-
renderLabel: () => F(N, {
|
|
1077
|
-
label: f
|
|
1078
|
-
}),
|
|
1079
|
-
renderInput: () => /* @__PURE__ */ r.createElement(jn, {
|
|
1080
|
-
value: o,
|
|
1081
|
-
onChange: n,
|
|
1082
|
-
disabled: a,
|
|
1083
|
-
readOnly: l,
|
|
1084
|
-
required: i,
|
|
1085
|
-
hasError: s,
|
|
1086
|
-
onBlur: d,
|
|
1087
|
-
onFocus: m
|
|
1088
|
-
}, D, h),
|
|
1089
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
1090
|
-
}) : /* @__PURE__ */ r.createElement(u, {
|
|
1091
|
-
fieldId: t,
|
|
1092
|
-
renderLabel: () => F(N, {
|
|
1093
|
-
label: f
|
|
1094
|
-
}),
|
|
1095
|
-
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
1096
|
-
"aria-labelledby": C,
|
|
1097
|
-
value: o ?? "",
|
|
1098
|
-
onChange: n,
|
|
1099
|
-
isDisabled: a,
|
|
1100
|
-
isReadOnly: l,
|
|
1101
|
-
isRequired: i,
|
|
1102
|
-
isInvalid: s,
|
|
1103
|
-
onBlur: d,
|
|
1104
|
-
onFocus: m
|
|
1105
|
-
}, D),
|
|
1106
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, A, O)
|
|
1107
|
-
});
|
|
1108
|
-
}, jn = ({ children: e, value: t, onChange: o, disabled: n, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
|
|
1109
|
-
const { labelId: m } = T(), { onAddressSelect: u } = Ie(), y = Le(), C = Ke({
|
|
1110
|
-
enabled: !0
|
|
1111
|
-
}), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
|
|
1112
|
-
atlas: C
|
|
1113
|
-
}), N = E(e, U.Input), D = E(e, U.Options), h = q(() => b.reduce((g, v) => (v.searchId && v.description && g.push({
|
|
1114
|
-
id: v.searchId,
|
|
1115
|
-
label: v.description
|
|
1116
|
-
}), g), []), [
|
|
1117
|
-
b
|
|
1118
|
-
]), O = R((g) => {
|
|
1119
|
-
p({
|
|
1120
|
-
input: g,
|
|
1121
|
-
countryCodes: y ? [
|
|
1122
|
-
y
|
|
1123
|
-
] : void 0
|
|
1124
|
-
}), o(g);
|
|
1125
|
-
}, [
|
|
1126
|
-
o,
|
|
1127
|
-
p,
|
|
1128
|
-
y
|
|
1129
|
-
]), A = R(async (g) => {
|
|
1130
|
-
if (f(), !g)
|
|
1131
|
-
return;
|
|
1132
|
-
const v = await (C == null ? void 0 : C.getPlace({
|
|
1133
|
-
searchId: String(g)
|
|
1134
|
-
}));
|
|
1135
|
-
v && u && u(v);
|
|
1136
|
-
}, [
|
|
1137
|
-
u,
|
|
1138
|
-
f,
|
|
1139
|
-
C
|
|
1140
|
-
]), w = R(() => {
|
|
1141
|
-
f(), s == null || s();
|
|
1142
|
-
}, [
|
|
1143
|
-
s,
|
|
1144
|
-
f
|
|
1145
|
-
]), _ = R(() => {
|
|
1146
|
-
d == null || d();
|
|
1147
|
-
}, [
|
|
1148
|
-
d
|
|
1149
|
-
]);
|
|
1150
|
-
return /* @__PURE__ */ r.createElement(he, {
|
|
1151
|
-
"aria-labelledby": m,
|
|
1152
|
-
inputValue: t ?? "",
|
|
1153
|
-
onInputChange: O,
|
|
1154
|
-
value: null,
|
|
1155
|
-
onChange: A,
|
|
1156
|
-
isDisabled: n,
|
|
1157
|
-
isReadOnly: a,
|
|
1158
|
-
isRequired: l,
|
|
1159
|
-
isInvalid: i,
|
|
1160
|
-
onBlur: w,
|
|
1161
|
-
onFocus: _,
|
|
1162
|
-
allowsCustomValue: !0,
|
|
1163
|
-
menuTrigger: "input",
|
|
1164
|
-
items: h
|
|
1165
|
-
}, F(N, {
|
|
1166
|
-
onFocus: _
|
|
1167
|
-
}), F(D, {
|
|
1168
|
-
options: h
|
|
1169
|
-
}), /* @__PURE__ */ r.createElement(Ye, {
|
|
1170
|
-
optionCount: h.length
|
|
1171
|
-
}));
|
|
1172
|
-
}, Jn = ({ className: e, ...t }) => {
|
|
1173
|
-
const { id: o, placeholder: n } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = x(null);
|
|
1174
|
-
return ae(() => {
|
|
1175
|
-
var d;
|
|
1176
|
-
(d = s.current) == null || d.focus({
|
|
1177
|
-
preventScroll: !0
|
|
1178
|
-
});
|
|
1179
|
-
}, o), /* @__PURE__ */ r.createElement(le, {
|
|
1180
|
-
ref: s,
|
|
1181
|
-
id: a,
|
|
1182
|
-
autoComplete: "address-line1",
|
|
1183
|
-
"aria-describedby": l,
|
|
1184
|
-
className: e,
|
|
1185
|
-
placeholder: n,
|
|
1186
|
-
onFocus: i
|
|
1187
|
-
});
|
|
1188
|
-
}, Ge = ({ children: e, className: t }) => {
|
|
1189
|
-
const o = E(e, Ge.Option);
|
|
1190
|
-
return /* @__PURE__ */ r.createElement(Se, {
|
|
1191
|
-
className: t,
|
|
1192
|
-
containerPadding: 0,
|
|
1193
|
-
offset: 0
|
|
1194
|
-
}, /* @__PURE__ */ r.createElement(Te, {
|
|
1195
|
-
renderEmptyState: () => null
|
|
1196
|
-
}, (n) => F(o, {
|
|
1197
|
-
id: n.id,
|
|
1198
|
-
label: n.label
|
|
1199
|
-
})));
|
|
1200
|
-
}, Xn = ({ className: e, ...t }) => {
|
|
1201
|
-
const { id: o, label: n } = t;
|
|
1202
|
-
return /* @__PURE__ */ r.createElement(De, {
|
|
1203
|
-
className: e,
|
|
1204
|
-
id: o,
|
|
1205
|
-
textValue: n
|
|
1206
|
-
}, n);
|
|
1207
|
-
};
|
|
1208
|
-
Ge.Option = Xn;
|
|
1209
|
-
U.Label = de;
|
|
1210
|
-
U.Input = Jn;
|
|
1211
|
-
U.Options = Ge;
|
|
1212
|
-
U.Description = ie;
|
|
1213
|
-
U.Error = ce;
|
|
1214
|
-
const se = ({ children: e }) => {
|
|
1215
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), C = pe("streetNumber"), b = E(e, se.Label), p = E(e, se.Input), f = E(e, se.Description), N = E(e, se.Error);
|
|
1216
|
-
return /* @__PURE__ */ r.createElement(u, {
|
|
1217
|
-
fieldId: t,
|
|
1218
|
-
renderLabel: () => F(b, {
|
|
1219
|
-
label: C
|
|
1220
|
-
}),
|
|
1221
|
-
renderInput: () => /* @__PURE__ */ r.createElement(fe, {
|
|
1222
|
-
"aria-labelledby": y,
|
|
1223
|
-
value: o ?? "",
|
|
1224
|
-
onChange: n,
|
|
1225
|
-
isDisabled: a,
|
|
1226
|
-
isReadOnly: l,
|
|
1227
|
-
isRequired: i,
|
|
1228
|
-
isInvalid: s,
|
|
1229
|
-
onBlur: d,
|
|
1230
|
-
onFocus: m
|
|
1231
|
-
}, p),
|
|
1232
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, N, f)
|
|
1233
|
-
});
|
|
1234
|
-
}, Gn = ({ className: e }) => {
|
|
1235
|
-
const { id: t, placeholder: o } = P(), { inputId: n, ariaDescribedBy: a } = T(), l = x(null);
|
|
1236
|
-
return ae(() => {
|
|
1237
|
-
var i;
|
|
1238
|
-
(i = l.current) == null || i.focus({
|
|
1239
|
-
preventScroll: !0
|
|
1240
|
-
});
|
|
1241
|
-
}, t), /* @__PURE__ */ r.createElement(le, {
|
|
1242
|
-
ref: l,
|
|
1243
|
-
id: n,
|
|
1244
|
-
"aria-describedby": a,
|
|
1245
|
-
className: e,
|
|
1246
|
-
placeholder: o
|
|
1247
|
-
});
|
|
1248
|
-
};
|
|
1249
|
-
se.Label = de;
|
|
1250
|
-
se.Input = Gn;
|
|
1251
|
-
se.Description = ie;
|
|
1252
|
-
se.Error = ce;
|
|
1253
|
-
const H = ({ children: e }) => {
|
|
1254
|
-
const { id: t, value: o, onChange: n, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), { t: C } = Pe(), b = Le(), p = b ? Oe[b] : void 0, f = b && xt.getCountryByShortKey(b), N = q(() => {
|
|
1255
|
-
var B;
|
|
1256
|
-
return (Bt(((B = f == null ? void 0 : f.subdivisions) == null ? void 0 : B.list) || [], p) || []).map((M) => ({
|
|
1257
|
-
value: M.key,
|
|
1258
|
-
label: C(M.displayName)
|
|
1259
|
-
})).sort((M, S) => M.label.localeCompare(S.label));
|
|
1260
|
-
}, [
|
|
1261
|
-
p,
|
|
1262
|
-
C,
|
|
1263
|
-
f
|
|
1264
|
-
]), D = R(() => n(""), [
|
|
1265
|
-
n
|
|
1266
|
-
]), { onInputKeyDown: h, ...O } = Rt({
|
|
1267
|
-
options: N,
|
|
1268
|
-
value: o,
|
|
1269
|
-
commit: n,
|
|
1270
|
-
clear: D,
|
|
1271
|
-
onBlur: d
|
|
1272
|
-
}), A = pe("subdivision"), w = E(e, H.Label), _ = E(e, H.Control), g = E(e, H.Options), v = E(e, H.Description), me = E(e, H.Error);
|
|
1273
|
-
return /* @__PURE__ */ r.createElement(u, {
|
|
1274
|
-
fieldId: t,
|
|
1275
|
-
renderLabel: () => F(w, {
|
|
1276
|
-
label: A
|
|
1277
|
-
}),
|
|
1278
|
-
renderInput: () => /* @__PURE__ */ r.createElement(he, {
|
|
1279
|
-
"aria-labelledby": y,
|
|
1280
|
-
...O,
|
|
1281
|
-
isDisabled: a,
|
|
1282
|
-
isReadOnly: l,
|
|
1283
|
-
isRequired: i,
|
|
1284
|
-
isInvalid: s,
|
|
1285
|
-
onFocus: m,
|
|
1286
|
-
menuTrigger: "input"
|
|
1287
|
-
}, F(_, {
|
|
1288
|
-
onKeyDown: h
|
|
1289
|
-
}), F(g, {
|
|
1290
|
-
options: N
|
|
1291
|
-
})),
|
|
1292
|
-
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, me, v)
|
|
1293
|
-
});
|
|
1294
|
-
}, Fe = ({ children: e, className: t, ...o }) => {
|
|
1295
|
-
const { disabled: n, hasError: a } = P(), { onKeyDown: l } = o, i = E(e, Fe.Input), s = E(e, Fe.Trigger);
|
|
1296
|
-
return /* @__PURE__ */ r.createElement(Lt, {
|
|
1297
|
-
className: t,
|
|
1298
|
-
isDisabled: n,
|
|
1299
|
-
isInvalid: a
|
|
1300
|
-
}, F(i, {
|
|
1301
|
-
onKeyDown: l
|
|
1302
|
-
}), s);
|
|
1303
|
-
}, zn = ({ className: e, ...t }) => {
|
|
1304
|
-
const { id: o, placeholder: n, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = t, m = x(null), u = Dt({
|
|
1305
|
-
readOnly: a,
|
|
1306
|
-
disabled: l
|
|
1307
|
-
});
|
|
1308
|
-
return ae(() => {
|
|
1309
|
-
var y;
|
|
1310
|
-
(y = m.current) == null || y.focus({
|
|
1311
|
-
preventScroll: !0
|
|
1312
|
-
});
|
|
1313
|
-
}, o), /* @__PURE__ */ r.createElement(le, {
|
|
1314
|
-
ref: m,
|
|
1315
|
-
id: i,
|
|
1316
|
-
autoComplete: "address-level1",
|
|
1317
|
-
"aria-describedby": s,
|
|
1318
|
-
className: e,
|
|
1319
|
-
placeholder: n,
|
|
1320
|
-
onClick: u,
|
|
1321
|
-
onKeyDown: d
|
|
1322
|
-
});
|
|
1323
|
-
}, Qn = ({ children: e, className: t }) => /* @__PURE__ */ r.createElement(Nt, {
|
|
1324
|
-
className: t
|
|
1325
|
-
}, e);
|
|
1326
|
-
Fe.Input = zn;
|
|
1327
|
-
Fe.Trigger = Qn;
|
|
1328
|
-
const ze = ({ children: e, className: t, ...o }) => {
|
|
1329
|
-
const { options: n } = o, a = E(e, ze.Option);
|
|
1330
|
-
return /* @__PURE__ */ r.createElement(Se, {
|
|
1331
|
-
className: t,
|
|
1332
|
-
containerPadding: 0,
|
|
1333
|
-
offset: 0
|
|
1334
|
-
}, /* @__PURE__ */ r.createElement(Te, null, n.map((l) => F(a, {
|
|
1335
|
-
key: l.value,
|
|
1336
|
-
value: l.value,
|
|
1337
|
-
label: l.label
|
|
1338
|
-
}))));
|
|
1339
|
-
}, Zn = ({ className: e, ...t }) => {
|
|
1340
|
-
const { value: o, label: n } = t;
|
|
1341
|
-
return /* @__PURE__ */ r.createElement(De, {
|
|
1342
|
-
className: e,
|
|
1343
|
-
id: o,
|
|
1344
|
-
textValue: n
|
|
1345
|
-
}, n);
|
|
1346
|
-
};
|
|
1347
|
-
ze.Option = Zn;
|
|
1348
|
-
H.Label = de;
|
|
1349
|
-
H.Control = Fe;
|
|
1350
|
-
H.Options = ze;
|
|
1351
|
-
H.Description = ie;
|
|
1352
|
-
H.Error = ce;
|
|
1353
|
-
const er = () => ue("country"), tr = () => ue("subdivision"), nr = () => ue("city"), rr = () => ue("addressLine"), or = () => ue("addressLine2"), sr = () => ue("postalCode"), ar = () => ue("streetName"), lr = () => ue("streetNumber"), ir = () => ue("apartment"), cr = {
|
|
1354
|
-
[K.MLA_COUNTRY]: er,
|
|
1355
|
-
[K.MLA_SUBDIVISION]: tr,
|
|
1356
|
-
[K.MLA_CITY]: nr,
|
|
1357
|
-
[K.MLA_ADDRESS_LINE]: rr,
|
|
1358
|
-
[K.MLA_ADDRESS_LINE_2]: or,
|
|
1359
|
-
[K.MLA_POSTAL_CODE]: sr,
|
|
1360
|
-
[K.MLA_STREET_NAME]: ar,
|
|
1361
|
-
[K.MLA_STREET_NUMBER]: lr,
|
|
1362
|
-
[K.MLA_APARTMENT]: ir
|
|
1363
|
-
}, dr = {}, ur = [], c = ({ children: e }) => {
|
|
1364
|
-
const { id: t, form: o, value: n, onChange: a, onFieldBlur: l, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: y, target: C, autocompleteEnabled: b, required: p, fieldType: f } = P(), [N, D] = be(null), h = kt(), O = q(() => ({
|
|
1365
|
-
...h,
|
|
1366
|
-
...cr
|
|
1367
|
-
}), [
|
|
1368
|
-
h
|
|
1369
|
-
]), { isExperimentEnabled: A } = ft(), w = A(yt.STREETLESS_LOCALITY_FALLBACK), { validateFields: _ } = $t(), g = Ut(), v = It(), me = q(() => ({
|
|
1370
|
-
...v,
|
|
1371
|
-
actions: {
|
|
1372
|
-
predict: Kt,
|
|
1373
|
-
getPlace: Wt,
|
|
1374
|
-
searchByPostalCode: Vt,
|
|
1375
|
-
...v.actions
|
|
1376
|
-
}
|
|
1377
|
-
}), [
|
|
1378
|
-
v
|
|
1379
|
-
]), { form: j, isMultilineAddressField: B } = Cn({
|
|
1380
|
-
id: t,
|
|
1381
|
-
target: C,
|
|
1382
|
-
fieldType: f,
|
|
1383
|
-
form: o,
|
|
1384
|
-
country: n == null ? void 0 : n.country,
|
|
1385
|
-
fieldSettings: m,
|
|
1386
|
-
validation: y,
|
|
1387
|
-
required: p
|
|
1388
|
-
}), M = R((V) => {
|
|
1389
|
-
if (!n)
|
|
1390
|
-
return;
|
|
1391
|
-
const X = sn(V, B, w), Re = {
|
|
1392
|
-
...X,
|
|
1393
|
-
[ye.COUNTRY]: X[ye.COUNTRY] ?? n[ye.COUNTRY]
|
|
1394
|
-
};
|
|
1395
|
-
a == null || a(Re);
|
|
1396
|
-
}, [
|
|
1397
|
-
a,
|
|
1398
|
-
n,
|
|
1399
|
-
B,
|
|
1400
|
-
w
|
|
1401
|
-
]), S = R((V, X) => {
|
|
1402
|
-
if (B && V === ye.COUNTRY && (n == null ? void 0 : n[V]) !== X) {
|
|
1403
|
-
a == null || a({
|
|
1404
|
-
[ye.COUNTRY]: X
|
|
1405
|
-
});
|
|
1406
|
-
return;
|
|
1407
|
-
}
|
|
1408
|
-
a == null || a({
|
|
1409
|
-
...n,
|
|
1410
|
-
[V]: X
|
|
1411
|
-
});
|
|
1412
|
-
}, [
|
|
1413
|
-
a,
|
|
1414
|
-
n,
|
|
1415
|
-
B
|
|
1416
|
-
]), J = R(async (V) => _(B ? [
|
|
1417
|
-
...V,
|
|
1418
|
-
{
|
|
1419
|
-
path: `${C}/${ye.COUNTRY}`,
|
|
1420
|
-
value: n == null ? void 0 : n.country
|
|
1421
|
-
}
|
|
1422
|
-
] : V), [
|
|
1423
|
-
n,
|
|
1424
|
-
C,
|
|
1425
|
-
_,
|
|
1426
|
-
B
|
|
1427
|
-
]);
|
|
1428
|
-
Yt(t, () => {
|
|
1429
|
-
var Re;
|
|
1430
|
-
const V = s == null ? void 0 : s[0], X = (Re = j == null ? void 0 : j.fields) == null ? void 0 : Re.find((at) => "target" in at && at.target === (V == null ? void 0 : V.errorPath));
|
|
1431
|
-
return X == null ? void 0 : X.id;
|
|
1432
|
-
});
|
|
1433
|
-
const Ee = Xt(t), Ne = F(E(e, c.Country), {
|
|
1434
|
-
isForcedOpen: Ee
|
|
1435
|
-
}), Qe = E(e, c.Subdivision), Ze = E(e, c.City), et = E(e, c.AddressLine), tt = E(e, c.AddressLine2), nt = E(e, c.PostalCode), rt = E(e, c.StreetName), ot = E(e, c.StreetNumber), st = E(e, c.Apartment), At = q(() => ({
|
|
1436
|
-
country: Ne,
|
|
1437
|
-
subdivision: Qe,
|
|
1438
|
-
city: Ze,
|
|
1439
|
-
addressLine: et,
|
|
1440
|
-
addressLine2: tt,
|
|
1441
|
-
postalCode: nt,
|
|
1442
|
-
streetName: rt,
|
|
1443
|
-
streetNumber: ot,
|
|
1444
|
-
apartment: st
|
|
1445
|
-
}), [
|
|
1446
|
-
Ne,
|
|
1447
|
-
Qe,
|
|
1448
|
-
Ze,
|
|
1449
|
-
et,
|
|
1450
|
-
tt,
|
|
1451
|
-
nt,
|
|
1452
|
-
rt,
|
|
1453
|
-
ot,
|
|
1454
|
-
st
|
|
1455
|
-
]);
|
|
1456
|
-
return j ? /* @__PURE__ */ r.createElement(d, {
|
|
1457
|
-
fieldId: t
|
|
1458
|
-
}, /* @__PURE__ */ r.createElement(ln, {
|
|
1459
|
-
countryCode: n == null ? void 0 : n.country
|
|
1460
|
-
}, /* @__PURE__ */ r.createElement(an, {
|
|
1461
|
-
autocompleteEnabled: b,
|
|
1462
|
-
onAddressSelect: M
|
|
1463
|
-
}, /* @__PURE__ */ r.createElement(In, {
|
|
1464
|
-
fields: At
|
|
1465
|
-
}, /* @__PURE__ */ r.createElement("div", {
|
|
1466
|
-
ref: D,
|
|
1467
|
-
style: {
|
|
1468
|
-
display: "contents"
|
|
1469
|
-
}
|
|
1470
|
-
}), /* @__PURE__ */ r.createElement(_t, {
|
|
1471
|
-
getContainer: () => N
|
|
1472
|
-
}, /* @__PURE__ */ r.createElement("fieldset", {
|
|
1473
|
-
style: jt
|
|
1474
|
-
}, /* @__PURE__ */ r.createElement("legend", {
|
|
1475
|
-
style: Jt
|
|
1476
|
-
}, u), /* @__PURE__ */ r.createElement(Ht, {
|
|
1477
|
-
formSchema: g,
|
|
1478
|
-
form: j,
|
|
1479
|
-
values: n ?? dr,
|
|
1480
|
-
onFieldChange: S,
|
|
1481
|
-
onBlur: l,
|
|
1482
|
-
onFocus: i,
|
|
1483
|
-
errors: s ?? ur,
|
|
1484
|
-
validateFields: J,
|
|
1485
|
-
fields: O,
|
|
1486
|
-
fieldActions: me
|
|
1487
|
-
}))))))) : null;
|
|
1488
|
-
};
|
|
1489
|
-
c.Country = Y;
|
|
1490
|
-
c.Subdivision = H;
|
|
1491
|
-
c.City = oe;
|
|
1492
|
-
c.AddressLine = k;
|
|
1493
|
-
c.AddressLine2 = ne;
|
|
1494
|
-
c.PostalCode = $;
|
|
1495
|
-
c.StreetName = U;
|
|
1496
|
-
c.StreetNumber = se;
|
|
1497
|
-
c.Apartment = re;
|
|
1498
|
-
const mr = "_postalCodeControl_1tire_1", pr = "_comboControl_1tire_5", Er = "_comboTrigger_1tire_19", Ae = {
|
|
1499
|
-
postalCodeControl: mr,
|
|
1500
|
-
comboControl: pr,
|
|
1501
|
-
comboTrigger: Er
|
|
1502
|
-
}, wr = () => {
|
|
1503
|
-
const e = en(Ae.comboControl), t = rn(), o = tn(we);
|
|
1504
|
-
return /* @__PURE__ */ r.createElement(c, null, /* @__PURE__ */ r.createElement(c.Country, null, /* @__PURE__ */ r.createElement(c.Country.Label, {
|
|
1505
|
-
className: L(z, I.label)
|
|
1506
|
-
}, /* @__PURE__ */ r.createElement(c.Country.Label.Required, {
|
|
1507
|
-
className: L(Q, I.requiredMark)
|
|
1508
|
-
})), /* @__PURE__ */ r.createElement(c.Country.Control, {
|
|
1509
|
-
className: e
|
|
1510
|
-
}, /* @__PURE__ */ r.createElement(c.Country.Control.Input, {
|
|
1511
|
-
className: L(I.innerInput, we)
|
|
1512
|
-
}), /* @__PURE__ */ r.createElement(c.Country.Control.Trigger, {
|
|
1513
|
-
className: Ae.comboTrigger
|
|
1514
|
-
}, /* @__PURE__ */ r.createElement(it, {
|
|
1515
|
-
className: I.dropdownIcon
|
|
1516
|
-
}))), /* @__PURE__ */ r.createElement(c.Country.Options, {
|
|
1517
|
-
className: L(ge, I.selectPopover, I.dropdownPopover)
|
|
1518
|
-
}, /* @__PURE__ */ r.createElement(c.Country.Options.Option, {
|
|
1519
|
-
className: o
|
|
1520
|
-
})), /* @__PURE__ */ r.createElement(c.Country.Error, {
|
|
1521
|
-
className: L(Z, I.error)
|
|
1522
|
-
}, /* @__PURE__ */ r.createElement(te, null), /* @__PURE__ */ r.createElement(c.Country.Error.Text, null)), /* @__PURE__ */ r.createElement(c.Country.Description, {
|
|
1523
|
-
className: L(ee, I.description)
|
|
1524
|
-
}, ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(G, {
|
|
1525
|
-
content: n,
|
|
1526
|
-
locale: a
|
|
1527
|
-
}))), /* @__PURE__ */ r.createElement(c.AddressLine, null, /* @__PURE__ */ r.createElement(c.AddressLine.Label, {
|
|
1528
|
-
className: L(z, I.label)
|
|
1529
|
-
}, /* @__PURE__ */ r.createElement(c.AddressLine.Label.Required, {
|
|
1530
|
-
className: L(Q, I.requiredMark)
|
|
1531
|
-
})), /* @__PURE__ */ r.createElement(c.AddressLine.Input, {
|
|
1532
|
-
className: t
|
|
1533
|
-
}), /* @__PURE__ */ r.createElement(c.AddressLine.Options, {
|
|
1534
|
-
className: L(ge, I.selectPopover, I.dropdownPopover)
|
|
1535
|
-
}, /* @__PURE__ */ r.createElement(c.AddressLine.Options.Option, {
|
|
1536
|
-
className: o
|
|
1537
|
-
})), /* @__PURE__ */ r.createElement(c.AddressLine.Error, {
|
|
1538
|
-
className: L(Z, I.error)
|
|
1539
|
-
}, /* @__PURE__ */ r.createElement(te, null), /* @__PURE__ */ r.createElement(c.AddressLine.Error.Text, null)), /* @__PURE__ */ r.createElement(c.AddressLine.Description, {
|
|
1540
|
-
className: L(ee, I.description)
|
|
1541
|
-
}, ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(G, {
|
|
1542
|
-
content: n,
|
|
1543
|
-
locale: a
|
|
1544
|
-
}))), /* @__PURE__ */ r.createElement(c.AddressLine2, null, /* @__PURE__ */ r.createElement(c.AddressLine2.Label, {
|
|
1545
|
-
className: L(z, I.label)
|
|
1546
|
-
}, /* @__PURE__ */ r.createElement(c.AddressLine2.Label.Required, {
|
|
1547
|
-
className: L(Q, I.requiredMark)
|
|
1548
|
-
})), /* @__PURE__ */ r.createElement(c.AddressLine2.Input, {
|
|
1549
|
-
className: t
|
|
1550
|
-
}), /* @__PURE__ */ r.createElement(c.AddressLine2.Error, {
|
|
1551
|
-
className: L(Z, I.error)
|
|
1552
|
-
}, /* @__PURE__ */ r.createElement(te, null), /* @__PURE__ */ r.createElement(c.AddressLine2.Error.Text, null)), /* @__PURE__ */ r.createElement(c.AddressLine2.Description, {
|
|
1553
|
-
className: L(ee, I.description)
|
|
1554
|
-
}, ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(G, {
|
|
1555
|
-
content: n,
|
|
1556
|
-
locale: a
|
|
1557
|
-
}))), /* @__PURE__ */ r.createElement(c.City, null, /* @__PURE__ */ r.createElement(c.City.Label, {
|
|
1558
|
-
className: L(z, I.label)
|
|
1559
|
-
}, /* @__PURE__ */ r.createElement(c.City.Label.Required, {
|
|
1560
|
-
className: L(Q, I.requiredMark)
|
|
1561
|
-
})), /* @__PURE__ */ r.createElement(c.City.Input, {
|
|
1562
|
-
className: t
|
|
1563
|
-
}), /* @__PURE__ */ r.createElement(c.City.Error, {
|
|
1564
|
-
className: L(Z, I.error)
|
|
1565
|
-
}, /* @__PURE__ */ r.createElement(te, null), /* @__PURE__ */ r.createElement(c.City.Error.Text, null)), /* @__PURE__ */ r.createElement(c.City.Description, {
|
|
1566
|
-
className: L(ee, I.description)
|
|
1567
|
-
}, ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(G, {
|
|
1568
|
-
content: n,
|
|
1569
|
-
locale: a
|
|
1570
|
-
}))), /* @__PURE__ */ r.createElement(c.PostalCode, null, /* @__PURE__ */ r.createElement(c.PostalCode.Label, {
|
|
1571
|
-
className: L(z, I.label)
|
|
1572
|
-
}, /* @__PURE__ */ r.createElement(c.PostalCode.Label.Required, {
|
|
1573
|
-
className: L(Q, I.requiredMark)
|
|
1574
|
-
})), /* @__PURE__ */ r.createElement(c.PostalCode.Control, {
|
|
1575
|
-
className: Ae.postalCodeControl
|
|
1576
|
-
}, /* @__PURE__ */ r.createElement(c.PostalCode.Control.Input, {
|
|
1577
|
-
className: t
|
|
1578
|
-
})), /* @__PURE__ */ r.createElement(c.PostalCode.Options, {
|
|
1579
|
-
className: L(ge, I.selectPopover, I.dropdownPopover)
|
|
1580
|
-
}, /* @__PURE__ */ r.createElement(c.PostalCode.Options.Option, {
|
|
1581
|
-
className: o
|
|
1582
|
-
})), /* @__PURE__ */ r.createElement(c.PostalCode.Error, {
|
|
1583
|
-
className: L(Z, I.error)
|
|
1584
|
-
}, /* @__PURE__ */ r.createElement(te, null), /* @__PURE__ */ r.createElement(c.PostalCode.Error.Text, null)), /* @__PURE__ */ r.createElement(c.PostalCode.Description, {
|
|
1585
|
-
className: L(ee, I.description)
|
|
1586
|
-
}, ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(G, {
|
|
1587
|
-
content: n,
|
|
1588
|
-
locale: a
|
|
1589
|
-
}))), /* @__PURE__ */ r.createElement(c.Subdivision, null, /* @__PURE__ */ r.createElement(c.Subdivision.Label, {
|
|
1590
|
-
className: L(z, I.label)
|
|
1591
|
-
}, /* @__PURE__ */ r.createElement(c.Subdivision.Label.Required, {
|
|
1592
|
-
className: L(Q, I.requiredMark)
|
|
1593
|
-
})), /* @__PURE__ */ r.createElement(c.Subdivision.Control, {
|
|
1594
|
-
className: e
|
|
1595
|
-
}, /* @__PURE__ */ r.createElement(c.Subdivision.Control.Input, {
|
|
1596
|
-
className: L(I.innerInput, we)
|
|
1597
|
-
}), /* @__PURE__ */ r.createElement(c.Subdivision.Control.Trigger, {
|
|
1598
|
-
className: Ae.comboTrigger
|
|
1599
|
-
}, /* @__PURE__ */ r.createElement(it, {
|
|
1600
|
-
className: I.dropdownIcon
|
|
1601
|
-
}))), /* @__PURE__ */ r.createElement(c.Subdivision.Options, {
|
|
1602
|
-
className: L(ge, I.selectPopover, I.dropdownPopover)
|
|
1603
|
-
}, /* @__PURE__ */ r.createElement(c.Subdivision.Options.Option, {
|
|
1604
|
-
className: o
|
|
1605
|
-
})), /* @__PURE__ */ r.createElement(c.Subdivision.Error, {
|
|
1606
|
-
className: L(Z, I.error)
|
|
1607
|
-
}, /* @__PURE__ */ r.createElement(te, null), /* @__PURE__ */ r.createElement(c.Subdivision.Error.Text, null)), /* @__PURE__ */ r.createElement(c.Subdivision.Description, {
|
|
1608
|
-
className: L(ee, I.description)
|
|
1609
|
-
}, ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(G, {
|
|
1610
|
-
content: n,
|
|
1611
|
-
locale: a
|
|
1612
|
-
}))), /* @__PURE__ */ r.createElement(c.StreetName, null, /* @__PURE__ */ r.createElement(c.StreetName.Label, {
|
|
1613
|
-
className: L(z, I.label)
|
|
1614
|
-
}, /* @__PURE__ */ r.createElement(c.StreetName.Label.Required, {
|
|
1615
|
-
className: L(Q, I.requiredMark)
|
|
1616
|
-
})), /* @__PURE__ */ r.createElement(c.StreetName.Input, {
|
|
1617
|
-
className: t
|
|
1618
|
-
}), /* @__PURE__ */ r.createElement(c.StreetName.Options, {
|
|
1619
|
-
className: L(ge, I.selectPopover, I.dropdownPopover)
|
|
1620
|
-
}, /* @__PURE__ */ r.createElement(c.StreetName.Options.Option, {
|
|
1621
|
-
className: o
|
|
1622
|
-
})), /* @__PURE__ */ r.createElement(c.StreetName.Error, {
|
|
1623
|
-
className: L(Z, I.error)
|
|
1624
|
-
}, /* @__PURE__ */ r.createElement(te, null), /* @__PURE__ */ r.createElement(c.StreetName.Error.Text, null)), /* @__PURE__ */ r.createElement(c.StreetName.Description, {
|
|
1625
|
-
className: L(ee, I.description)
|
|
1626
|
-
}, ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(G, {
|
|
1627
|
-
content: n,
|
|
1628
|
-
locale: a
|
|
1629
|
-
}))), /* @__PURE__ */ r.createElement(c.StreetNumber, null, /* @__PURE__ */ r.createElement(c.StreetNumber.Label, {
|
|
1630
|
-
className: L(z, I.label)
|
|
1631
|
-
}, /* @__PURE__ */ r.createElement(c.StreetNumber.Label.Required, {
|
|
1632
|
-
className: L(Q, I.requiredMark)
|
|
1633
|
-
})), /* @__PURE__ */ r.createElement(c.StreetNumber.Input, {
|
|
1634
|
-
className: t
|
|
1635
|
-
}), /* @__PURE__ */ r.createElement(c.StreetNumber.Error, {
|
|
1636
|
-
className: L(Z, I.error)
|
|
1637
|
-
}, /* @__PURE__ */ r.createElement(te, null), /* @__PURE__ */ r.createElement(c.StreetNumber.Error.Text, null)), /* @__PURE__ */ r.createElement(c.StreetNumber.Description, {
|
|
1638
|
-
className: L(ee, I.description)
|
|
1639
|
-
}, ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(G, {
|
|
1640
|
-
content: n,
|
|
1641
|
-
locale: a
|
|
1642
|
-
}))), /* @__PURE__ */ r.createElement(c.Apartment, null, /* @__PURE__ */ r.createElement(c.Apartment.Label, {
|
|
1643
|
-
className: L(z, I.label)
|
|
1644
|
-
}, /* @__PURE__ */ r.createElement(c.Apartment.Label.Required, {
|
|
1645
|
-
className: L(Q, I.requiredMark)
|
|
1646
|
-
})), /* @__PURE__ */ r.createElement(c.Apartment.Input, {
|
|
1647
|
-
className: t
|
|
1648
|
-
}), /* @__PURE__ */ r.createElement(c.Apartment.Error, {
|
|
1649
|
-
className: L(Z, I.error)
|
|
1650
|
-
}, /* @__PURE__ */ r.createElement(te, null), /* @__PURE__ */ r.createElement(c.Apartment.Error.Text, null)), /* @__PURE__ */ r.createElement(c.Apartment.Description, {
|
|
1651
|
-
className: L(ee, I.description)
|
|
1652
|
-
}, ({ content: n, locale: a }) => /* @__PURE__ */ r.createElement(G, {
|
|
1653
|
-
content: n,
|
|
1654
|
-
locale: a
|
|
1655
|
-
}))));
|
|
1656
|
-
};
|
|
1657
|
-
export {
|
|
1658
|
-
wr as M
|
|
1659
|
-
};
|