@awell-health/ui-library 0.1.33 → 0.1.35
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/index.css +4 -0
- package/dist/index.js +58 -56
- package/dist/types/atoms/phoneInputField/PhoneInputField.d.ts +1 -1
- package/dist/types/atoms/phoneInputField/helpers.d.ts +1 -1
- package/dist/types/hooks/useForm/helpers.d.ts +1 -1
- package/dist/types/hooks/useValidate/useValidate.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -7791,6 +7791,10 @@ html {
|
|
|
7791
7791
|
margin-bottom: var(--awell-spacing-8);
|
|
7792
7792
|
}
|
|
7793
7793
|
|
|
7794
|
+
.awell__form_traditional_form_question_slider {
|
|
7795
|
+
margin-bottom: var(--awell-spacing-12);
|
|
7796
|
+
}
|
|
7797
|
+
|
|
7794
7798
|
.awell__form_trademark {
|
|
7795
7799
|
font-size: var(--font-size-xs);
|
|
7796
7800
|
color: var(--awell-slate500);
|
package/dist/index.js
CHANGED
|
@@ -18755,59 +18755,6 @@ Check the top-level render call using <` + t + ">.");
|
|
|
18755
18755
|
!function (e, a) {module.exports = a(React__default["default"]) ;}(commonjsGlobal, (e) => (() => {var a = { 0: (e, a, r) => {r.r(a);}, 374: (e, a, r) => {r.r(a);}, 840: (e, a, r) => {r.r(a);}, 481: (e, a, r) => {r.r(a);}, 549: (e, a, r) => {r.r(a);}, 153: function (e, a, r) {var t = this && this.__assign || function () {return t = Object.assign || function (e) {for (var a, r = 1, t = arguments.length; r < t; r++) for (var n in a = arguments[r]) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);return e;}, t.apply(this, arguments);},n = this && this.__createBinding || (Object.create ? function (e, a, r, t) {void 0 === t && (t = r);var n = Object.getOwnPropertyDescriptor(a, r);n && !("get" in n ? !a.__esModule : n.writable || n.configurable) || (n = { enumerable: !0, get: function () {return a[r];} }), Object.defineProperty(e, t, n);} : function (e, a, r, t) {void 0 === t && (t = r), e[t] = a[r];}),o = this && this.__setModuleDefault || (Object.create ? function (e, a) {Object.defineProperty(e, "default", { enumerable: !0, value: a });} : function (e, a) {e.default = a;}),i = this && this.__importStar || function (e) {if (e && e.__esModule) return e;var a = {};if (null != e) for (var r in e) "default" !== r && Object.prototype.hasOwnProperty.call(e, r) && n(a, e, r);return o(a, e), a;},u = this && this.__rest || function (e, a) {var r = {};for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && a.indexOf(t) < 0 && (r[t] = e[t]);if (null != e && "function" == typeof Object.getOwnPropertySymbols) {var n = 0;for (t = Object.getOwnPropertySymbols(e); n < t.length; n++) a.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);}return r;};Object.defineProperty(a, "__esModule", { value: !0 }), a.CountrySelector = void 0, r(0);var l = i(r(156)),s = r(946),c = r(515),d = r(332),f = r(425),p = r(60);a.CountrySelector = function (e) {var a,r,n = e.selectedCountry,o = e.onSelect,i = e.disabled,y = e.hideDropdown,h = e.countries,v = void 0 === h ? s.defaultCountries : h,m = e.renderButtonWrapper,b = u(e, ["selectedCountry", "onSelect", "disabled", "hideDropdown", "countries", "renderButtonWrapper"]),C = (0, l.useState)(!1),g = C[0],P = C[1],_ = (0, l.useMemo)(function () {if (n) return (0, d.getCountry)({ value: n, field: "iso2", countries: v });}, [v, n]),O = (0, l.useRef)(null);return l.default.createElement("div", { className: (0, c.buildClassNames)({ addPrefix: ["country-selector"], rawClassNames: [b.className] }), style: b.style, ref: O }, (a = { title: null == _ ? void 0 : _.name, onClick: function () {return P(function (e) {return !e;});}, onMouseDown: function (e) {return e.preventDefault();}, onKeyDown: function (e) {e.key && ["ArrowUp", "ArrowDown"].includes(e.key) && (e.preventDefault(), P(!0));}, disabled: y || i, role: "combobox", "aria-label": "Country selector", "aria-haspopup": "listbox", "aria-expanded": g }, r = l.default.createElement("div", { className: (0, c.buildClassNames)({ addPrefix: ["country-selector-button__button-content"], rawClassNames: [b.buttonContentWrapperClassName] }), style: b.buttonContentWrapperStyle }, l.default.createElement(f.FlagEmoji, { iso2: n, className: (0, c.buildClassNames)({ addPrefix: ["country-selector-button__flag-emoji", i && "country-selector-button__flag-emoji--disabled"], rawClassNames: [b.flagClassName] }), style: t({ visibility: n ? "visible" : "hidden" }, b.flagStyle) }), !y && l.default.createElement("div", { className: (0, c.buildClassNames)({ addPrefix: ["country-selector-button__dropdown-arrow", i && "country-selector-button__dropdown-arrow--disabled", g && "country-selector-button__dropdown-arrow--active"], rawClassNames: [b.dropdownArrowClassName] }), style: b.dropdownArrowStyle })), m ? m({ children: r, rootProps: a }) : l.default.createElement("button", t({}, a, { type: "button", className: (0, c.buildClassNames)({ addPrefix: ["country-selector-button", g && "country-selector-button--active", i && "country-selector-button--disabled", y && "country-selector-button--hide-dropdown"], rawClassNames: [b.buttonClassName] }), "data-country": n, style: b.buttonStyle }), r)), l.default.createElement(p.CountrySelectorDropdown, t({ show: g, countries: v, onSelect: function (e) {P(!1), null == o || o(e);}, selectedCountry: n, onClose: function () {P(!1);} }, b.dropdownStyleProps)));};}, 60: function (e, a, r) {var t = this && this.__assign || function () {return t = Object.assign || function (e) {for (var a, r = 1, t = arguments.length; r < t; r++) for (var n in a = arguments[r]) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);return e;}, t.apply(this, arguments);},n = this && this.__createBinding || (Object.create ? function (e, a, r, t) {void 0 === t && (t = r);var n = Object.getOwnPropertyDescriptor(a, r);n && !("get" in n ? !a.__esModule : n.writable || n.configurable) || (n = { enumerable: !0, get: function () {return a[r];} }), Object.defineProperty(e, t, n);} : function (e, a, r, t) {void 0 === t && (t = r), e[t] = a[r];}),o = this && this.__setModuleDefault || (Object.create ? function (e, a) {Object.defineProperty(e, "default", { enumerable: !0, value: a });} : function (e, a) {e.default = a;}),i = this && this.__importStar || function (e) {if (e && e.__esModule) return e;var a = {};if (null != e) for (var r in e) "default" !== r && Object.prototype.hasOwnProperty.call(e, r) && n(a, e, r);return o(a, e), a;},u = this && this.__rest || function (e, a) {var r = {};for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && a.indexOf(t) < 0 && (r[t] = e[t]);if (null != e && "function" == typeof Object.getOwnPropertySymbols) {var n = 0;for (t = Object.getOwnPropertySymbols(e); n < t.length; n++) a.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);}return r;};Object.defineProperty(a, "__esModule", { value: !0 }), a.CountrySelectorDropdown = void 0, r(374);var l = i(r(156)),s = r(946),c = r(515),d = r(332),f = r(425);a.CountrySelectorDropdown = function (e) {var a = e.show,r = e.dialCodePrefix,n = void 0 === r ? "+" : r,o = e.selectedCountry,i = e.countries,p = void 0 === i ? s.defaultCountries : i,y = e.onSelect,h = e.onClose,v = u(e, ["show", "dialCodePrefix", "selectedCountry", "countries", "onSelect", "onClose"]),m = (0, l.useRef)(null),b = (0, l.useRef)(),C = (0, l.useCallback)(function (e) {return p.findIndex(function (a) {return (0, d.parseCountry)(a).iso2 === e;});}, [p]),g = (0, l.useState)(C(o)),P = g[0],_ = g[1],O = function () {b.current !== o && _(C(o));},w = (0, l.useCallback)(function (e) {_(C(e.iso2)), null == y || y(e);}, [y, C]),j = function (e) {var a = p.length - 1;_(function (r) {var t,n = (t = r, "prev" === e ? t - 1 : "next" === e ? t + 1 : "last" === e ? a : 0);return n < 0 ? 0 : n > a ? a : n;});},D = (0, l.useCallback)(function () {if (m.current && void 0 !== P) {var e = (0, d.parseCountry)(p[P]).iso2;if (e !== b.current) {var a = m.current.querySelector('[data-country="'.concat(e, '"]'));a && ((0, d.scrollToChild)(m.current, a), b.current = e);}}}, [P, p]);return (0, l.useEffect)(function () {D();}, [P, D]), (0, l.useEffect)(function () {m.current && (a ? m.current.focus() : O());}, [a]), (0, l.useEffect)(function () {O();}, [o]), l.default.createElement("ul", { ref: m, role: "listbox", className: (0, c.buildClassNames)({ addPrefix: ["country-selector-dropdown"], rawClassNames: [v.className] }), style: t({ display: a ? "block" : "none" }, v.style), onKeyDown: function (e) {if ("Enter" !== e.key) {if ("Escape" !== e.key) return "ArrowUp" === e.key ? (e.preventDefault(), void j("prev")) : "ArrowDown" === e.key ? (e.preventDefault(), void j("next")) : "PageUp" === e.key ? (e.preventDefault(), void j("first")) : "PageDown" === e.key ? (e.preventDefault(), void j("last")) : void 0;null == h || h();} else {var a = (0, d.parseCountry)(p[P]);w(a);}}, onBlur: h, tabIndex: -1, "aria-activedescendant": "".concat((0, d.parseCountry)(p[P]).iso2, "-option") }, p.map(function (e, a) {var r = (0, d.parseCountry)(e),t = r.iso2 === o,i = a === P;return l.default.createElement("li", { key: r.iso2, "data-country": r.iso2, role: "option", "aria-selected": t, "aria-label": "".concat(r.name, " ").concat(n).concat(r.dialCode), id: "".concat(r.iso2, "-option"), className: (0, c.buildClassNames)({ addPrefix: ["country-selector-dropdown__list-item", t && "country-selector-dropdown__list-item--selected", i && "country-selector-dropdown__list-item--focused"], rawClassNames: [v.listItemClassName] }), onClick: function () {return w(r);}, style: v.listItemStyle }, l.default.createElement(f.FlagEmoji, { iso2: r.iso2, className: (0, c.buildClassNames)({ addPrefix: ["country-selector-dropdown__list-item-flag-emoji"], rawClassNames: [v.listItemFlagClassName] }), style: v.listItemFlagStyle }), l.default.createElement("span", { className: (0, c.buildClassNames)({ addPrefix: ["country-selector-dropdown__list-item-country-name"], rawClassNames: [v.listItemCountryNameClassName] }), style: v.listItemCountryNameStyle }, r.name), l.default.createElement("span", { className: (0, c.buildClassNames)({ addPrefix: ["country-selector-dropdown__list-item-dial-code"], rawClassNames: [v.listItemDialCodeClassName] }), style: v.listItemDialCodeStyle }, n, r.dialCode));}));};}, 7: function (e, a, r) {var t = this && this.__importDefault || function (e) {return e && e.__esModule ? e : { default: e };};Object.defineProperty(a, "__esModule", { value: !0 }), a.DialCodePreview = void 0, r(840);var n = t(r(156)),o = r(515);a.DialCodePreview = function (e) {var a = e.dialCode,r = e.prefix,t = e.disabled,i = e.style,u = e.className;return n.default.createElement("div", { className: (0, o.buildClassNames)({ addPrefix: ["dial-code-preview", t && "dial-code-preview--disabled"], rawClassNames: [u] }), style: i }, "".concat(r).concat(a));};}, 425: function (e, a, r) {var t = this && this.__assign || function () {return t = Object.assign || function (e) {for (var a, r = 1, t = arguments.length; r < t; r++) for (var n in a = arguments[r]) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);return e;}, t.apply(this, arguments);},n = this && this.__rest || function (e, a) {var r = {};for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && a.indexOf(t) < 0 && (r[t] = e[t]);if (null != e && "function" == typeof Object.getOwnPropertySymbols) {var n = 0;for (t = Object.getOwnPropertySymbols(e); n < t.length; n++) a.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);}return r;},o = this && this.__importDefault || function (e) {return e && e.__esModule ? e : { default: e };};Object.defineProperty(a, "__esModule", { value: !0 }), a.FlagEmoji = void 0, r(481);var i = o(r(156)),u = r(515),l = "abcdefghijklmnopqrstuvwxyz".split("").reduce(function (e, a, r) {var n, o, i;return t(t({}, e), ((n = {})[a] = (o = r, i = parseInt("1f1e6", 16), Number(i + o).toString(16)), n));}, {});a.FlagEmoji = function (e) {var a = e.iso2,r = e.size,o = void 0 === r ? "24px" : r,s = e.protocol,c = void 0 === s ? "https" : s,d = e.disableLazyLoading,f = e.className,p = n(e, ["iso2", "size", "protocol", "disableLazyLoading", "className"]);if (!a) return i.default.createElement("img", t({ width: o, height: o }, p));var y = function (e) {return [l[e[0]], l[e[1]]].join("-");}(a),h = "".concat(c, "://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/").concat(y, ".svg");return i.default.createElement("img", t({ className: (0, u.buildClassNames)({ addPrefix: ["flag-emoji"], rawClassNames: [f] }), src: h, width: o, height: o, draggable: !1, "data-country": a, loading: d ? void 0 : "lazy" }, p));};}, 28: function (e, a, r) {var t = this && this.__assign || function () {return t = Object.assign || function (e) {for (var a, r = 1, t = arguments.length; r < t; r++) for (var n in a = arguments[r]) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);return e;}, t.apply(this, arguments);},n = this && this.__createBinding || (Object.create ? function (e, a, r, t) {void 0 === t && (t = r);var n = Object.getOwnPropertyDescriptor(a, r);n && !("get" in n ? !a.__esModule : n.writable || n.configurable) || (n = { enumerable: !0, get: function () {return a[r];} }), Object.defineProperty(e, t, n);} : function (e, a, r, t) {void 0 === t && (t = r), e[t] = a[r];}),o = this && this.__setModuleDefault || (Object.create ? function (e, a) {Object.defineProperty(e, "default", { enumerable: !0, value: a });} : function (e, a) {e.default = a;}),i = this && this.__importStar || function (e) {if (e && e.__esModule) return e;var a = {};if (null != e) for (var r in e) "default" !== r && Object.prototype.hasOwnProperty.call(e, r) && n(a, e, r);return o(a, e), a;},u = this && this.__rest || function (e, a) {var r = {};for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && a.indexOf(t) < 0 && (r[t] = e[t]);if (null != e && "function" == typeof Object.getOwnPropertySymbols) {var n = 0;for (t = Object.getOwnPropertySymbols(e); n < t.length; n++) a.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);}return r;};Object.defineProperty(a, "__esModule", { value: !0 }), a.PhoneInput = void 0, r(549);var l = i(r(156)),s = r(946),c = r(882),d = r(515),f = r(332),p = r(153),y = r(7);a.PhoneInput = function (e) {var a,r = e.hideDropdown,n = e.placeholder,o = e.disabled,i = e.showDisabledDialCodeAndPrefix,h = e.inputProps,v = e.onChange,m = e.style,b = e.className,C = e.inputStyle,g = e.inputClassName,P = e.countrySelectorStyleProps,_ = e.dialCodePreviewStyleProps,O = e.countries,w = void 0 === O ? s.defaultCountries : O,j = u(e, ["hideDropdown", "placeholder", "disabled", "showDisabledDialCodeAndPrefix", "inputProps", "onChange", "style", "className", "inputStyle", "inputClassName", "countrySelectorStyleProps", "dialCodePreviewStyleProps", "countries"]),D = (0, c.usePhoneInput)(t(t({}, j), { countries: w, onCountryChange: function (e) {null == v || v(e);} })),S = D.phone,x = D.inputRef,M = D.country,N = D.setCountry,k = D.handlePhoneValueChange,A = (0, l.useMemo)(function () {if (M) return (0, f.getCountry)({ value: M, field: "iso2", countries: w });}, [w, M]),E = j.disableDialCodeAndPrefix && i && (null == A ? void 0 : A.dialCode);return l.default.createElement("div", { className: (0, d.buildClassNames)({ addPrefix: ["input-container"], rawClassNames: [b] }), style: m }, l.default.createElement(p.CountrySelector, t({ onSelect: function (e) {return N(e.iso2);}, selectedCountry: M, countries: w, disabled: o, hideDropdown: r }, P)), E && l.default.createElement(y.DialCodePreview, t({ dialCode: A.dialCode, prefix: null !== (a = j.prefix) && void 0 !== a ? a : "+", disabled: o }, _)), l.default.createElement("input", t({ onChange: function (e) {var a = k(e);null == v || v(a);}, value: S, type: "tel", ref: x, className: (0, d.buildClassNames)({ addPrefix: ["input", o && "input--disabled"], rawClassNames: [g] }), placeholder: n, disabled: o, style: C }, h)));};}, 946: (e, a) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.defaultCountries = void 0, a.defaultCountries = [["Afghanistan", ["asia"], "af", "93"], ["Albania", ["europe"], "al", "355"], ["Algeria", ["africa", "north-africa"], "dz", "213"], ["Andorra", ["europe"], "ad", "376"], ["Angola", ["africa"], "ao", "244"], ["Antigua and Barbuda", ["america", "carribean"], "ag", "1268"], ["Argentina", ["america", "south-america"], "ar", "54", "(..) ........", 0, ["11", "221", "223", "261", "264", "2652", "280", "2905", "291", "2920", "2966", "299", "341", "342", "343", "351", "376", "379", "381", "3833", "385", "387", "388"]], ["Armenia", ["asia", "ex-ussr"], "am", "374", ".. ......"], ["Aruba", ["america", "carribean"], "aw", "297"], ["Australia", ["oceania"], "au", "61", "(..) .... ....", 0, ["2", "3", "4", "7", "8", "02", "03", "04", "07", "08"]], ["Austria", ["europe", "eu-union"], "at", "43"], ["Azerbaijan", ["asia", "ex-ussr"], "az", "994", "(..) ... .. .."], ["Bahamas", ["america", "carribean"], "bs", "1242"], ["Bahrain", ["middle-east"], "bh", "973"], ["Bangladesh", ["asia"], "bd", "880"], ["Barbados", ["america", "carribean"], "bb", "1246"], ["Belarus", ["europe", "ex-ussr"], "by", "375", "(..) ... .. .."], ["Belgium", ["europe", "eu-union"], "be", "32", "... .. .. .."], ["Belize", ["america", "central-america"], "bz", "501"], ["Benin", ["africa"], "bj", "229"], ["Bhutan", ["asia"], "bt", "975"], ["Bolivia", ["america", "south-america"], "bo", "591"], ["Bosnia and Herzegovina", ["europe", "ex-yugos"], "ba", "387"], ["Botswana", ["africa"], "bw", "267"], ["Brazil", ["america", "south-america"], "br", "55", "(..) ........."], ["British Indian Ocean Territory", ["asia"], "io", "246"], ["Brunei", ["asia"], "bn", "673"], ["Bulgaria", ["europe", "eu-union"], "bg", "359"], ["Burkina Faso", ["africa"], "bf", "226"], ["Burundi", ["africa"], "bi", "257"], ["Cambodia", ["asia"], "kh", "855"], ["Cameroon", ["africa"], "cm", "237"], ["Canada", ["america", "north-america"], "ca", "1", "(...) ...-....", 1, ["204", "226", "236", "249", "250", "289", "306", "343", "365", "387", "403", "416", "418", "431", "437", "438", "450", "506", "514", "519", "548", "579", "581", "587", "604", "613", "639", "647", "672", "705", "709", "742", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905"]], ["Cape Verde", ["africa"], "cv", "238"], ["Caribbean Netherlands", ["america", "carribean"], "bq", "599", "", 1], ["Central African Republic", ["africa"], "cf", "236"], ["Chad", ["africa"], "td", "235"], ["Chile", ["america", "south-america"], "cl", "56"], ["China", ["asia"], "cn", "86", "... .... ...."], ["Colombia", ["america", "south-america"], "co", "57", "... ... ...."], ["Comoros", ["africa"], "km", "269"], ["Congo", ["africa"], "cd", "243"], ["Congo", ["africa"], "cg", "242"], ["Costa Rica", ["america", "central-america"], "cr", "506", "....-...."], ["Côte d'Ivoire", ["africa"], "ci", "225", ".. .. .. .."], ["Croatia", ["europe", "eu-union", "ex-yugos"], "hr", "385"], ["Cuba", ["america", "carribean"], "cu", "53"], ["Curaçao", ["america", "carribean"], "cw", "599", "", 0], ["Cyprus", ["europe", "eu-union"], "cy", "357", ".. ......"], ["Czech Republic", ["europe", "eu-union"], "cz", "420", "... ... ..."], ["Denmark", ["europe", "eu-union", "baltic"], "dk", "45", ".. .. .. .."], ["Djibouti", ["africa"], "dj", "253"], ["Dominica", ["america", "carribean"], "dm", "1767"], ["Dominican Republic", ["america", "carribean"], "do", "1", "", 2], ["Ecuador", ["america", "south-america"], "ec", "593"], ["Egypt", ["africa", "north-africa"], "eg", "20"], ["El Salvador", ["america", "central-america"], "sv", "503", "....-...."], ["Equatorial Guinea", ["africa"], "gq", "240"], ["Eritrea", ["africa"], "er", "291"], ["Estonia", ["europe", "eu-union", "ex-ussr", "baltic"], "ee", "372", ".... ......"], ["Ethiopia", ["africa"], "et", "251"], ["Fiji", ["oceania"], "fj", "679"], ["Finland", ["europe", "eu-union", "baltic"], "fi", "358", ".. ... .. .."], ["France", ["europe", "eu-union"], "fr", "33", ". .. .. .. .."], ["French Guiana", ["america", "south-america"], "gf", "594"], ["French Polynesia", ["oceania"], "pf", "689"], ["Gabon", ["africa"], "ga", "241"], ["Gambia", ["africa"], "gm", "220"], ["Georgia", ["asia", "ex-ussr"], "ge", "995"], ["Germany", ["europe", "eu-union", "baltic"], "de", "49", ".... ........"], ["Ghana", ["africa"], "gh", "233"], ["Greece", ["europe", "eu-union"], "gr", "30"], ["Grenada", ["america", "carribean"], "gd", "1473"], ["Guadeloupe", ["america", "carribean"], "gp", "590", "", 0], ["Guam", ["oceania"], "gu", "1671"], ["Guatemala", ["america", "central-america"], "gt", "502", "....-...."], ["Guinea", ["africa"], "gn", "224"], ["Guinea-Bissau", ["africa"], "gw", "245"], ["Guyana", ["america", "south-america"], "gy", "592"], ["Haiti", ["america", "carribean"], "ht", "509", "....-...."], ["Honduras", ["america", "central-america"], "hn", "504"], ["Hong Kong", ["asia"], "hk", "852", ".... ...."], ["Hungary", ["europe", "eu-union"], "hu", "36"], ["Iceland", ["europe"], "is", "354", "... ...."], ["India", ["asia"], "in", "91", ".....-....."], ["Indonesia", ["asia"], "id", "62"], ["Iran", ["middle-east"], "ir", "98", "... ... ...."], ["Iraq", ["middle-east"], "iq", "964"], ["Ireland", ["europe", "eu-union"], "ie", "353", ".. ......."], ["Israel", ["middle-east"], "il", "972", "... ... ...."], ["Italy", ["europe", "eu-union"], "it", "39", "... .......", 0], ["Jamaica", ["america", "carribean"], "jm", "1876"], ["Japan", ["asia"], "jp", "81", ".. .... ...."], ["Jordan", ["middle-east"], "jo", "962"], ["Kazakhstan", ["asia", "ex-ussr"], "kz", "7", "... ...-..-..", 0, ["310", "311", "312", "313", "315", "318", "321", "324", "325", "326", "327", "336", "7172", "73622"]], ["Kenya", ["africa"], "ke", "254"], ["Kiribati", ["oceania"], "ki", "686"], ["Kosovo", ["europe", "ex-yugos"], "xk", "383"], ["Kuwait", ["middle-east"], "kw", "965"], ["Kyrgyzstan", ["asia", "ex-ussr"], "kg", "996", "... ... ..."], ["Laos", ["asia"], "la", "856"], ["Latvia", ["europe", "eu-union", "ex-ussr", "baltic"], "lv", "371", ".. ... ..."], ["Lebanon", ["middle-east"], "lb", "961"], ["Lesotho", ["africa"], "ls", "266"], ["Liberia", ["africa"], "lr", "231"], ["Libya", ["africa", "north-africa"], "ly", "218"], ["Liechtenstein", ["europe"], "li", "423"], ["Lithuania", ["europe", "eu-union", "ex-ussr", "baltic"], "lt", "370"], ["Luxembourg", ["europe", "eu-union"], "lu", "352"], ["Macau", ["asia"], "mo", "853"], ["Macedonia", ["europe", "ex-yugos"], "mk", "389"], ["Madagascar", ["africa"], "mg", "261"], ["Malawi", ["africa"], "mw", "265"], ["Malaysia", ["asia"], "my", "60", "..-....-...."], ["Maldives", ["asia"], "mv", "960"], ["Mali", ["africa"], "ml", "223"], ["Malta", ["europe", "eu-union"], "mt", "356"], ["Marshall Islands", ["oceania"], "mh", "692"], ["Martinique", ["america", "carribean"], "mq", "596"], ["Mauritania", ["africa"], "mr", "222"], ["Mauritius", ["africa"], "mu", "230"], ["Mexico", ["america", "central-america"], "mx", "52", "... ... ....", 0, ["33", "55", "81", "229", "656", "664", "774", "998"]], ["Micronesia", ["oceania"], "fm", "691"], ["Moldova", ["europe"], "md", "373", "(..) ..-..-.."], ["Monaco", ["europe"], "mc", "377"], ["Mongolia", ["asia"], "mn", "976"], ["Montenegro", ["europe", "ex-yugos"], "me", "382"], ["Morocco", ["africa", "north-africa"], "ma", "212"], ["Mozambique", ["africa"], "mz", "258"], ["Myanmar", ["asia"], "mm", "95"], ["Namibia", ["africa"], "na", "264"], ["Nauru", ["africa"], "nr", "674"], ["Nepal", ["asia"], "np", "977"], ["Netherlands", ["europe", "eu-union"], "nl", "31", ".. ........"], ["New Caledonia", ["oceania"], "nc", "687"], ["New Zealand", ["oceania"], "nz", "64", "...-...-...."], ["Nicaragua", ["america", "central-america"], "ni", "505"], ["Niger", ["africa"], "ne", "227"], ["Nigeria", ["africa"], "ng", "234"], ["North Korea", ["asia"], "kp", "850"], ["Norway", ["europe", "baltic"], "no", "47", "... .. ..."], ["Oman", ["middle-east"], "om", "968"], ["Pakistan", ["asia"], "pk", "92", "...-......."], ["Palau", ["oceania"], "pw", "680"], ["Palestine", ["middle-east"], "ps", "970"], ["Panama", ["america", "central-america"], "pa", "507"], ["Papua New Guinea", ["oceania"], "pg", "675"], ["Paraguay", ["america", "south-america"], "py", "595"], ["Peru", ["america", "south-america"], "pe", "51"], ["Philippines", ["asia"], "ph", "63", ".... ......."], ["Poland", ["europe", "eu-union", "baltic"], "pl", "48", "...-...-..."], ["Portugal", ["europe", "eu-union"], "pt", "351"], ["Puerto Rico", ["america", "carribean"], "pr", "1", "", 3], ["Qatar", ["middle-east"], "qa", "974"], ["Réunion", ["africa"], "re", "262"], ["Romania", ["europe", "eu-union"], "ro", "40"], ["Russia", ["europe", "asia", "ex-ussr", "baltic"], "ru", "7", "(...) ...-..-..", 1], ["Rwanda", ["africa"], "rw", "250"], ["Saint Kitts and Nevis", ["america", "carribean"], "kn", "1869"], ["Saint Lucia", ["america", "carribean"], "lc", "1758"], ["Saint Vincent and the Grenadines", ["america", "carribean"], "vc", "1784"], ["Samoa", ["oceania"], "ws", "685"], ["San Marino", ["europe"], "sm", "378"], ["São Tomé and Príncipe", ["africa"], "st", "239"], ["Saudi Arabia", ["middle-east"], "sa", "966"], ["Senegal", ["africa"], "sn", "221"], ["Serbia", ["europe", "ex-yugos"], "rs", "381"], ["Seychelles", ["africa"], "sc", "248"], ["Sierra Leone", ["africa"], "sl", "232"], ["Singapore", ["asia"], "sg", "65", "....-...."], ["Slovakia", ["europe", "eu-union"], "sk", "421"], ["Slovenia", ["europe", "eu-union", "ex-yugos"], "si", "386"], ["Solomon Islands", ["oceania"], "sb", "677"], ["Somalia", ["africa"], "so", "252"], ["South Africa", ["africa"], "za", "27"], ["South Korea", ["asia"], "kr", "82", "... .... ...."], ["South Sudan", ["africa", "north-africa"], "ss", "211"], ["Spain", ["europe", "eu-union"], "es", "34", "... ... ..."], ["Sri Lanka", ["asia"], "lk", "94"], ["Sudan", ["africa"], "sd", "249"], ["Suriname", ["america", "south-america"], "sr", "597"], ["Swaziland", ["africa"], "sz", "268"], ["Sweden", ["europe", "eu-union", "baltic"], "se", "46", "(...) ...-..."], ["Switzerland", ["europe"], "ch", "41", ".. ... .. .."], ["Syria", ["middle-east"], "sy", "963"], ["Taiwan", ["asia"], "tw", "886"], ["Tajikistan", ["asia", "ex-ussr"], "tj", "992"], ["Tanzania", ["africa"], "tz", "255"], ["Thailand", ["asia"], "th", "66"], ["Timor-Leste", ["asia"], "tl", "670"], ["Togo", ["africa"], "tg", "228"], ["Tonga", ["oceania"], "to", "676"], ["Trinidad and Tobago", ["america", "carribean"], "tt", "1868"], ["Tunisia", ["africa", "north-africa"], "tn", "216"], ["Turkey", ["europe"], "tr", "90", "... ... .. .."], ["Turkmenistan", ["asia", "ex-ussr"], "tm", "993"], ["Tuvalu", ["asia"], "tv", "688"], ["Uganda", ["africa"], "ug", "256"], ["Ukraine", ["europe", "ex-ussr"], "ua", "380", "(..) ... .. .."], ["United Arab Emirates", ["middle-east"], "ae", "971"], ["United Kingdom", ["europe", "eu-union"], "gb", "44", ".... ......"], ["United States", ["america", "north-america"], "us", "1", "(...) ...-....", 0, ["201", "202", "203", "205", "206", "207", "208", "209", "210", "212", "213", "214", "215", "216", "217", "218", "219", "225", "228", "229", "231", "239", "248", "251", "252", "253", "254", "256", "260", "262", "269", "270", "276", "281", "301", "302", "303", "304", "305", "307", "308", "309", "310", "312", "313", "314", "315", "316", "317", "318", "319", "320", "321", "323", "325", "330", "334", "336", "337", "352", "360", "361", "386", "401", "402", "404", "405", "406", "407", "408", "409", "410", "412", "413", "414", "415", "417", "419", "423", "425", "432", "434", "435", "440", "478", "479", "480", "501", "502", "503", "504", "505", "507", "508", "509", "510", "512", "513", "515", "516", "517", "518", "520", "530", "540", "541", "559", "561", "562", "563", "570", "573", "574", "575", "580", "585", "586", "601", "602", "603", "605", "606", "607", "608", "609", "610", "612", "614", "615", "616", "617", "618", "619", "620", "623", "626", "630", "631", "636", "641", "650", "651", "660", "661", "662", "701", "702", "703", "704", "706", "707", "708", "712", "713", "714", "715", "716", "717", "718", "719", "724", "727", "731", "732", "734", "740", "757", "760", "763", "765", "770", "772", "773", "775", "781", "785", "801", "802", "803", "804", "805", "806", "808", "810", "812", "813", "814", "815", "816", "817", "818", "828", "830", "831", "843", "845", "847", "850", "856", "858", "859", "860", "863", "864", "865", "870", "901", "903", "904", "906", "907", "908", "909", "910", "912", "913", "914", "915", "916", "918", "919", "920", "925", "928", "931", "936", "937", "940", "941", "949", "951", "952", "954", "956", "970", "972", "973", "978", "979", "985", "989"]], ["Uruguay", ["america", "south-america"], "uy", "598"], ["Uzbekistan", ["asia", "ex-ussr"], "uz", "998", ".. ... .. .."], ["Vanuatu", ["oceania"], "vu", "678"], ["Vatican City", ["europe"], "va", "39", ".. .... ....", 1], ["Venezuela", ["america", "south-america"], "ve", "58"], ["Vietnam", ["asia"], "vn", "84"], ["Yemen", ["middle-east"], "ye", "967"], ["Zambia", ["africa"], "zm", "260"], ["Zimbabwe", ["africa"], "zw", "263"]];}, 11: function (e, a, r) {var t = this && this.__assign || function () {return t = Object.assign || function (e) {for (var a, r = 1, t = arguments.length; r < t; r++) for (var n in a = arguments[r]) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);return e;}, t.apply(this, arguments);},n = this && this.__spreadArray || function (e, a, r) {if (r || 2 === arguments.length) for (var t, n = 0, o = a.length; n < o; n++) !t && n in a || (t || (t = Array.prototype.slice.call(a, 0, n)), t[n] = a[n]);return e.concat(t || Array.prototype.slice.call(a));};Object.defineProperty(a, "__esModule", { value: !0 }), a.useHistoryState = void 0;var o = r(156),i = { size: 20 };a.useHistoryState = function (e, a) {var r = t(t({}, i), a).size,u = (0, o.useState)(e),l = u[0],s = u[1],c = (0, o.useState)([e]),d = c[0],f = c[1],p = (0, o.useState)(0),y = p[0],h = p[1],v = (0, o.useCallback)(function (e, a) {if (e !== l) {if (null == a ? void 0 : a.overrideLastHistoryItem) f(function (a) {return n(n([], a.slice(0, y), !0), [e], !1);});else {var t = d.length >= r;f(function (a) {return n(n([], a.slice(t ? 1 : 0, y + 1), !0), [e], !1);}), t || h(function (e) {return e + 1;});}s(e);}}, [l, y, d.length, r]),m = (0, o.useCallback)(function () {return !(y <= 0 || (s(d[y - 1]), h(function (e) {return e - 1;}), 0));}, [d, y]),b = (0, o.useCallback)(function () {return !(y + 1 >= d.length || (s(d[y + 1]), h(function (e) {return e + 1;}), 0));}, [d, y]);return [l, v, m, b];};}, 452: function (e, a, r) {var t = this && this.__assign || function () {return t = Object.assign || function (e) {for (var a, r = 1, t = arguments.length; r < t; r++) for (var n in a = arguments[r]) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);return e;}, t.apply(this, arguments);};Object.defineProperty(a, "__esModule", { value: !0 }), a.usePhone = a.defaultPhoneConfig = a.MASK_CHAR = void 0;var n = r(156),o = r(946),i = r(332),u = r(11),l = r(795);a.MASK_CHAR = ".", a.defaultPhoneConfig = { prefix: "+", defaultMask: "............", charAfterDialCode: " ", historySaveDebounceMS: 200, disableCountryGuess: !1, disableDialCodePrefill: !1, forceDialCode: !1, disableDialCodeAndPrefix: !1, countries: o.defaultCountries }, a.usePhone = function (e, r) {var o = t(t({}, a.defaultPhoneConfig), r),s = o.country,c = o.countries,d = o.prefix,f = o.defaultMask,p = o.charAfterDialCode,y = o.historySaveDebounceMS,h = o.disableCountryGuess,v = o.disableDialCodePrefill,m = o.forceDialCode,b = o.disableDialCodeAndPrefix,C = o.onCountryGuess,g = o.onPhoneUpdate,P = !b && !h,_ = (0, l.useTimer)(),O = (0, n.useMemo)(function () {if (s) return (0, i.getCountry)({ value: s, field: "iso2", countries: c });}, [s, c]),w = function (e, r) {var t,n = void 0 === r ? {} : r,o = n.trimNonDigitsEnd,u = n.insertDialCodeOnEmpty,l = n.forceDisableCountryGuess,s = n.forcedCountry,y = l || !P || s ? void 0 : (0, i.guessCountryByPartialNumber)({ phone: e, countries: c, currentCountryIso2: null == O ? void 0 : O.iso2 }),h = null !== (t = null != s ? s : null == y ? void 0 : y.country) && void 0 !== t ? t : O;return { phone: h ? (0, i.formatPhone)(e, { prefix: d, mask: h.format || f, maskChar: a.MASK_CHAR, dialCode: h.dialCode, trimNonDigitsEnd: o, charAfterDialCode: p, forceDialCode: m, insertDialCodeOnEmpty: u, disableDialCodeAndPrefix: b }) : e, countryGuessResult: y, formatCountry: h };},j = (0, u.useHistoryState)(w(e, { insertDialCodeOnEmpty: !v }).phone),D = j[0],S = j[1],x = j[2],M = j[3],N = (0, n.useState)(!1),k = N[0],A = N[1],E = function (e, a) {var r,t = void 0 === a ? {} : a,n = t.deletion,o = t.cursorPosition,u = t.insertDialCodeOnEmpty,l = t.inserted,c = t.forcedCountry,f = e,p = o;m && !b && O && !(0, i.removeNonDigits)(e).startsWith(O.dialCode) && e && (l && e.startsWith(d) && e.length - (null != o ? o : 0) == 0 ? f = e : (f = D, p = 0));var h = w(f, { trimNonDigitsEnd: "backward" === n, insertDialCodeOnEmpty: u || !k && !v, forceDisableCountryGuess: m && !!n && (0, i.removeNonDigits)(f).length < (null !== (r = null == O ? void 0 : O.dialCode.length) && void 0 !== r ? r : 0), forcedCountry: c }),j = h.phone,x = h.countryGuessResult,M = h.formatCountry,N = _.check();return S(j, { overrideLastHistoryItem: !(!N || N > y) }), null == g || g(j, { formatCountry: M, unformattedValue: f, cursorPosition: null != p ? p : 0, deletion: n }), P && (null == x ? void 0 : x.country) && x.country.name !== s && (null == C || C(x)), k || A(!0), j;};return (0, n.useEffect)(function () {k && e === D || E(e);}, [e]), { phone: D, initialized: k, undo: x, redo: M, handleValueChange: E };};}, 882: function (e, a, r) {var t = this && this.__assign || function () {return t = Object.assign || function (e) {for (var a, r = 1, t = arguments.length; r < t; r++) for (var n in a = arguments[r]) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);return e;}, t.apply(this, arguments);},n = this && this.__rest || function (e, a) {var r = {};for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && a.indexOf(t) < 0 && (r[t] = e[t]);if (null != e && "function" == typeof Object.getOwnPropertySymbols) {var n = 0;for (t = Object.getOwnPropertySymbols(e); n < t.length; n++) a.indexOf(t[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[n]) && (r[t[n]] = e[t[n]]);}return r;};Object.defineProperty(a, "__esModule", { value: !0 }), a.usePhoneInput = void 0;var o = r(156),i = r(946),u = r(332),l = r(452);a.usePhoneInput = function (e) {var a,r,s,c = e.initialCountry,d = e.value,f = void 0 === d ? "" : d,p = e.prefix,y = void 0 === p ? "+" : p,h = e.countries,v = void 0 === h ? i.defaultCountries : h,m = e.disableDialCodeAndPrefix,b = e.hideSpaceAfterDialCode,C = e.onCountryChange,g = n(e, ["initialCountry", "value", "prefix", "countries", "disableDialCodeAndPrefix", "hideSpaceAfterDialCode", "onCountryChange"]),P = (0, o.useRef)(null),_ = (0, o.useRef)({ shouldFocus: !1, shouldSetCursorToEnd: !1 }),O = (0, o.useState)(null !== (r = null === (a = (0, u.guessCountryByPartialNumber)({ phone: f, countries: v, currentCountryIso2: c }).country) || void 0 === a ? void 0 : a.iso2) && void 0 !== r ? r : c),w = O[0],j = O[1],D = (0, o.useMemo)(function () {if (w) return (0, u.getCountry)({ value: w, field: "iso2", countries: v });}, [v, w]),S = b ? "" : " ",x = null !== (s = null == D ? void 0 : D.dialCode) && void 0 !== s ? s : "",M = m ? (0, u.removeDialCode)({ phone: f, dialCode: x, charAfterDialCode: S, prefix: y }) : f,N = (0, l.usePhone)(M, t({ country: w, countries: v, prefix: y, disableDialCodeAndPrefix: m, charAfterDialCode: S, onCountryGuess: function (e) {var a = e.country;e.fullDialCodeMatch && j(a.iso2);}, onPhoneUpdate: function (e, a) {var r,t,n = a.formatCountry,o = a.unformattedValue,i = a.cursorPosition,l = a.deletion,s = A && !_.current.shouldSetCursorToEnd ? (0, u.getCursorPosition)({ cursorPositionAfterInput: i, phoneBeforeInput: k, phoneAfterInput: o, phoneAfterFormatted: e, leftOffset: g.forceDialCode ? y.length + (null !== (t = null === (r = null == n ? void 0 : n.dialCode) || void 0 === r ? void 0 : r.length) && void 0 !== t ? t : 0) + S.length : 0, deletion: l }) : e.length;Promise.resolve().then(function () {var e, a;null === (e = P.current) || void 0 === e || e.setSelectionRange(s, s), _.current.shouldFocus && (null === (a = P.current) || void 0 === a || a.focus()), _.current = { shouldFocus: !1, shouldSetCursorToEnd: !1 };});} }, g)),k = N.phone,A = N.initialized,E = N.undo,I = N.redo,B = N.handleValueChange;return (0, o.useEffect)(function () {var e = P.current;if (e) {var a = function (e) {if (e.key) {var a = e.ctrlKey,r = e.shiftKey,t = "z" === e.key.toLowerCase();if (a && t) return r ? I() : E();}};return e.addEventListener("keydown", a), function () {e.removeEventListener("keydown", a);};}}, [P, E, I]), { phone: k, handlePhoneValueChange: function (e) {var a;e.preventDefault();var r = e.nativeEvent.inputType,t = null == r ? void 0 : r.startsWith("insertFrom"),n = B(e.target.value, { deletion: function () {var e;if (null !== (e = null == r ? void 0 : r.toLocaleLowerCase().includes("delete")) && void 0 !== e && e) return (null == r ? void 0 : r.toLocaleLowerCase().includes("forward")) ? "forward" : "backward";}(), inserted: t, cursorPosition: null !== (a = e.target.selectionStart) && void 0 !== a ? a : 0 });return m ? (0, u.addDialCode)({ phone: n, dialCode: x, charAfterDialCode: S, prefix: y }) : n;}, inputRef: P, country: w, setCountry: function (e) {var a = (0, u.getCountry)({ value: e, field: "iso2", countries: v });if (a) {_.current = { shouldFocus: !0, shouldSetCursorToEnd: !0 };var r = B(m ? "" : "".concat(y).concat(S).concat(a.dialCode), { forcedCountry: a });j(a.iso2), null == C || C(r);}} };};}, 393: (e, a, r) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.usePhoneValidation = void 0;var t = r(332);a.usePhoneValidation = function (e, a) {return (0, t.validatePhone)(e, a);};}, 795: (e, a, r) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.useTimer = void 0;var t = r(156);a.useTimer = function () {var e = (0, t.useState)(),a = e[0],r = e[1],n = (0, t.useState)(Date.now()),o = n[0],i = n[1];return { check: function () {var e = Date.now(),t = a ? e - o : void 0;return r(o), i(e), t;} };};}, 515: function (e, a) {var r = this && this.__spreadArray || function (e, a, r) {if (r || 2 === arguments.length) for (var t, n = 0, o = a.length; n < o; n++) !t && n in a || (t || (t = Array.prototype.slice.call(a, 0, n)), t[n] = a[n]);return e.concat(t || Array.prototype.slice.call(a));};Object.defineProperty(a, "__esModule", { value: !0 }), a.buildClassNames = a.classNamesWithPrefix = a.joinClasses = a.classPrefix = void 0, a.classPrefix = "react-international-phone-", a.joinClasses = function () {for (var e = [], a = 0; a < arguments.length; a++) e[a] = arguments[a];return e.filter(function (e) {return !!e;}).join(" ").trim();}, a.classNamesWithPrefix = function () {for (var e = [], r = 0; r < arguments.length; r++) e[r] = arguments[r];return a.joinClasses.apply(void 0, e).split(" ").map(function (e) {return "".concat(a.classPrefix).concat(e);}).join(" ");}, a.buildClassNames = function (e) {var t = e.addPrefix,n = e.rawClassNames;return a.joinClasses.apply(void 0, r([a.classNamesWithPrefix.apply(void 0, t)], n, !1));};}, 62: (e, a) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.applyMask = void 0, a.applyMask = function (e) {var a = e.value,r = e.mask,t = e.maskSymbol,n = e.offset,o = void 0 === n ? 0 : n,i = e.trimNonMaskCharsLeftover,u = void 0 !== i && i;if (a.length < o) return a;for (var l = a.slice(0, o), s = a.slice(o), c = l, d = 0, f = 0, p = r.split(""); f < p.length; f++) {var y = p[f];if (d >= s.length) {if (!u && y !== t) {c += y;continue;}break;}y === t ? (c += s[d], d += 1) : c += y;}return c;};}, 239: function (e, a, r) {var t = this && this.__createBinding || (Object.create ? function (e, a, r, t) {void 0 === t && (t = r);var n = Object.getOwnPropertyDescriptor(a, r);n && !("get" in n ? !a.__esModule : n.writable || n.configurable) || (n = { enumerable: !0, get: function () {return a[r];} }), Object.defineProperty(e, t, n);} : function (e, a, r, t) {void 0 === t && (t = r), e[t] = a[r];}),n = this && this.__exportStar || function (e, a) {for (var r in e) "default" === r || Object.prototype.hasOwnProperty.call(a, r) || t(a, e, r);};Object.defineProperty(a, "__esModule", { value: !0 }), n(r(62), a), n(r(939), a), n(r(222), a);}, 939: (e, a) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.removeNonDigits = void 0, a.removeNonDigits = function (e) {return e.replace(/\D/g, "");};}, 222: (e, a) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.scrollToChild = void 0, a.scrollToChild = function (e, a) {var r = e.style.display;"block" !== r && (e.style.display = "block");var t = e.getBoundingClientRect(),n = a.getBoundingClientRect(),o = n.top - t.top,i = t.bottom - n.bottom;o >= 0 && i >= 0 || (Math.abs(o) < Math.abs(i) ? e.scrollTop += o : e.scrollTop -= i), e.style.display = r;};}, 298: (e, a) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.buildCountryData = void 0, a.buildCountryData = function (e) {return [e.name, e.regions, e.iso2, e.dialCode, e.format, e.priority, e.areaCodes].filter(Boolean);};}, 891: (e, a, r) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.getCountry = void 0;var t = r(300);a.getCountry = function (e) {var a = e.value,r = e.field,n = e.countries;if (["regions", "priority"].includes(r)) throw new Error(function (e) {return 'Field "'.concat(e, '" is not supported');}(r));var o = n.find(function (e) {var n = (0, t.parseCountry)(e);return a === n[r];});if (o) return (0, t.parseCountry)(o);};}, 4: (e, a, r) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.guessCountryByPartialNumber = void 0;var t = r(239),n = r(891),o = r(300);a.guessCountryByPartialNumber = function (e) {var a,r = e.phone,i = e.countries,u = e.currentCountryIso2,l = { country: void 0, fullDialCodeMatch: !1, areaCodeMatch: void 0 };if (!r) return l;var s = (0, t.removeNonDigits)(r);if (!s) return l;for (var c = l, d = function (e) {var a,r,t,n,o = e.country,i = e.fullDialCodeMatch,u = e.areaCodeMatch,l = o.dialCode === (null === (a = c.country) || void 0 === a ? void 0 : a.dialCode),s = (null !== (r = o.priority) && void 0 !== r ? r : 0) < (null !== (n = null === (t = c.country) || void 0 === t ? void 0 : t.priority) && void 0 !== n ? n : 0);l && !s || (c = { country: o, fullDialCodeMatch: i, areaCodeMatch: u });}, f = 0, p = i; f < p.length; f++) {var y = p[f],h = (0, o.parseCountry)(y),v = h.dialCode,m = h.areaCodes;if (s.startsWith(v)) {var b = !c.country || Number(v) >= Number(c.country.dialCode);if (m) for (var C = s.substring(v.length), g = 0, P = m; g < P.length; g++) {var _ = P[g];if (C.startsWith(_)) return { country: h, fullDialCodeMatch: !0, areaCodeMatch: !0 };}!b && v !== s && c.fullDialCodeMatch || d({ country: h, fullDialCodeMatch: !0, areaCodeMatch: m ? !m : void 0 });}c.fullDialCodeMatch || s.length < v.length && v.startsWith(s) && (!c.country || Number(v) <= Number(c.country.dialCode)) && d({ country: h, fullDialCodeMatch: !1 });}if (u) {var O = (0, n.getCountry)({ value: u, field: "iso2", countries: i });c && O && (null === (a = c.country) || void 0 === a ? void 0 : a.dialCode) === O.dialCode && c.country !== O && c.fullDialCodeMatch && !c.areaCodeMatch && (c.country = O);}return c;};}, 88: function (e, a, r) {var t = this && this.__createBinding || (Object.create ? function (e, a, r, t) {void 0 === t && (t = r);var n = Object.getOwnPropertyDescriptor(a, r);n && !("get" in n ? !a.__esModule : n.writable || n.configurable) || (n = { enumerable: !0, get: function () {return a[r];} }), Object.defineProperty(e, t, n);} : function (e, a, r, t) {void 0 === t && (t = r), e[t] = a[r];}),n = this && this.__exportStar || function (e, a) {for (var r in e) "default" === r || Object.prototype.hasOwnProperty.call(a, r) || t(a, e, r);};Object.defineProperty(a, "__esModule", { value: !0 }), n(r(298), a), n(r(891), a), n(r(4), a), n(r(300), a);}, 300: (e, a) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.parseCountry = void 0, a.parseCountry = function (e) {return { name: e[0], regions: e[1], iso2: e[2], dialCode: e[3], format: e[4], priority: e[5], areaCodes: e[6] };};}, 332: function (e, a, r) {var t = this && this.__createBinding || (Object.create ? function (e, a, r, t) {void 0 === t && (t = r);var n = Object.getOwnPropertyDescriptor(a, r);n && !("get" in n ? !a.__esModule : n.writable || n.configurable) || (n = { enumerable: !0, get: function () {return a[r];} }), Object.defineProperty(e, t, n);} : function (e, a, r, t) {void 0 === t && (t = r), e[t] = a[r];}),n = this && this.__exportStar || function (e, a) {for (var r in e) "default" === r || Object.prototype.hasOwnProperty.call(a, r) || t(a, e, r);};Object.defineProperty(a, "__esModule", { value: !0 }), n(r(239), a), n(r(88), a), n(r(165), a);}, 820: (e, a, r) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.addDialCode = void 0;var t = r(214);a.addDialCode = function (e) {var a = e.phone,r = e.dialCode,n = e.prefix,o = void 0 === n ? "+" : n,i = e.charAfterDialCode,u = void 0 === i ? " " : i;return "".concat(o).concat(r).concat(u).concat((0, t.removeDialCode)({ phone: a, dialCode: r, charAfterDialCode: u, prefix: o }));};}, 380: (e, a, r) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.formatPhone = void 0;var t = r(239);a.formatPhone = function (e, a) {var r = !a.disableDialCodeAndPrefix && a.forceDialCode,n = !a.disableDialCodeAndPrefix && a.insertDialCodeOnEmpty,o = e,i = function (e) {return a.trimNonDigitsEnd ? e.trim() : e;};if (!o) return n && !o.length || r ? i("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode)) : i(o);if ((o = (0, t.removeNonDigits)(o)) === a.dialCode && !a.disableDialCodeAndPrefix) return i("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode));if (a.dialCode.startsWith(o) && !a.disableDialCodeAndPrefix) return i(r ? "".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode) : "".concat(a.prefix).concat(o));if (!o.startsWith(a.dialCode) && !a.disableDialCodeAndPrefix) {if (r) return i("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode));if (o.length < a.dialCode.length) return i("".concat(a.prefix).concat(o));}var u,l = (u = a.dialCode.length, a.disableDialCodeAndPrefix && (u = 0), { phoneLeftSide: o.slice(0, u), phoneRightSide: o.slice(u) }),s = l.phoneLeftSide,c = l.phoneRightSide;return s = "".concat(a.prefix).concat(s).concat(a.charAfterDialCode), c = (0, t.applyMask)({ value: c, mask: a.mask, maskSymbol: a.maskChar, trimNonMaskCharsLeftover: a.trimNonDigitsEnd }), a.disableDialCodeAndPrefix && (s = ""), i("".concat(s).concat(c));};}, 775: (e, a) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.getCursorPosition = void 0;var r = function (e) {return /\d/.test(e);};a.getCursorPosition = function (e) {var a = e.phoneBeforeInput,t = e.phoneAfterInput,n = e.phoneAfterFormatted,o = e.cursorPositionAfterInput,i = e.leftOffset,u = void 0 === i ? 0 : i,l = e.deletion;if (o < u) return u;if (!a) return n.length;var s = "backward" === l;if (0 === o && t.length > 0 && n.length > 0) {if (s) return 0;for (var c = 0; c < n.length; c += 1) if (r(n[c])) return c;return n.length;}if (t.length < a.length && 1 === t.length) return n.length;var d = null;for (c = o - 1; c >= 0; c -= 1) if (r(t[c])) {d = c;break;}if (null === d) return 0 !== o ? o : n.length;var f = 0;for (c = 0; c < d; c += 1) r(t[c]) && (f += 1);s && (f -= 1);var p = 0,y = 0;for (c = 0; c < n.length && (p += 1, r(n[c]) && (y += 1), y !== f + 1); c += 1);for (; !r(n[p]) && p < n.length;) p += 1;return s && (p += 1), p;};}, 165: function (e, a, r) {var t = this && this.__createBinding || (Object.create ? function (e, a, r, t) {void 0 === t && (t = r);var n = Object.getOwnPropertyDescriptor(a, r);n && !("get" in n ? !a.__esModule : n.writable || n.configurable) || (n = { enumerable: !0, get: function () {return a[r];} }), Object.defineProperty(e, t, n);} : function (e, a, r, t) {void 0 === t && (t = r), e[t] = a[r];}),n = this && this.__exportStar || function (e, a) {for (var r in e) "default" === r || Object.prototype.hasOwnProperty.call(a, r) || t(a, e, r);};Object.defineProperty(a, "__esModule", { value: !0 }), n(r(820), a), n(r(380), a), n(r(775), a), n(r(214), a), n(r(684), a);}, 214: (e, a) => {Object.defineProperty(a, "__esModule", { value: !0 }), a.removeDialCode = void 0, a.removeDialCode = function (e) {var a = e.phone,r = e.dialCode,t = e.prefix,n = void 0 === t ? "+" : t,o = e.charAfterDialCode,i = void 0 === o ? " " : o;if (!a || !r) return a;var u = a;return u.startsWith(n) && (u = u.replace(n, "")), u.startsWith(r) ? ((u = u.replace(r, "")).startsWith(i) && (u = u.replace(i, "")), u) : a;};}, 684: function (e, a, r) {var t = this && this.__assign || function () {return t = Object.assign || function (e) {for (var a, r = 1, t = arguments.length; r < t; r++) for (var n in a = arguments[r]) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);return e;}, t.apply(this, arguments);};Object.defineProperty(a, "__esModule", { value: !0 }), a.validatePhone = void 0;var n = r(452),o = r(239),i = r(88);a.validatePhone = function (e, a) {var r = t(t({}, n.defaultPhoneConfig), a),u = r.countries,l = r.defaultMask,s = r.defaultMaskMinPhoneLength,c = void 0 === s ? 10 : s,d = r.prefix,f = r.charAfterDialCode,p = (0, i.guessCountryByPartialNumber)({ phone: e, countries: u }),y = p.country,h = p.fullDialCodeMatch,v = p.areaCodeMatch;if (!y || !h) return { country: void 0, lengthMatch: !1, areaCodeMatch: v, isValid: !1 };var m = "".concat(d).concat(y.dialCode).concat(f);if (!e.startsWith(m)) return { country: y, lengthMatch: !1, areaCodeMatch: v, isValid: !1 };var b = e.substring(m.length),C = !y.format,g = C ? l : y.format;if (C && (0, o.removeNonDigits)(e).length < c) return { country: y, lengthMatch: !1, areaCodeMatch: v, isValid: !1 };if (!C && b.length !== g.length) return { country: y, lengthMatch: !1, areaCodeMatch: v, isValid: !1 };for (var P = 0; P < b.length; P += 1) if (b[P] !== g[P] && g[P] !== n.MASK_CHAR) return { country: y, lengthMatch: !1, areaCodeMatch: v, isValid: !1 };return { country: y, lengthMatch: !0, areaCodeMatch: v, isValid: null == v || v };};}, 156: (a) => {a.exports = e;} },r = {};function t(e) {var n = r[e];if (void 0 !== n) return n.exports;var o = r[e] = { exports: {} };return a[e].call(o.exports, o, o.exports, t), o.exports;}t.r = (e) => {"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 });};var n = {};return (() => {var e = n;Object.defineProperty(e, "__esModule", { value: !0 }), e.validatePhone = e.parseCountry = e.buildCountryData = e.usePhoneValidation = e.usePhoneInput = e.usePhone = e.defaultCountries = e.PhoneInput = e.FlagEmoji = e.DialCodePreview = e.CountrySelectorDropdown = e.CountrySelector = void 0;var a = t(153);Object.defineProperty(e, "CountrySelector", { enumerable: !0, get: function () {return a.CountrySelector;} });var r = t(60);Object.defineProperty(e, "CountrySelectorDropdown", { enumerable: !0, get: function () {return r.CountrySelectorDropdown;} });var o = t(7);Object.defineProperty(e, "DialCodePreview", { enumerable: !0, get: function () {return o.DialCodePreview;} });var i = t(425);Object.defineProperty(e, "FlagEmoji", { enumerable: !0, get: function () {return i.FlagEmoji;} });var u = t(28);Object.defineProperty(e, "PhoneInput", { enumerable: !0, get: function () {return u.PhoneInput;} });var l = t(946);Object.defineProperty(e, "defaultCountries", { enumerable: !0, get: function () {return l.defaultCountries;} });var s = t(452);Object.defineProperty(e, "usePhone", { enumerable: !0, get: function () {return s.usePhone;} });var c = t(882);Object.defineProperty(e, "usePhoneInput", { enumerable: !0, get: function () {return c.usePhoneInput;} });var d = t(393);Object.defineProperty(e, "usePhoneValidation", { enumerable: !0, get: function () {return d.usePhoneValidation;} });var f = t(332);Object.defineProperty(e, "buildCountryData", { enumerable: !0, get: function () {return f.buildCountryData;} }), Object.defineProperty(e, "parseCountry", { enumerable: !0, get: function () {return f.parseCountry;} }), Object.defineProperty(e, "validatePhone", { enumerable: !0, get: function () {return f.validatePhone;} });})(), n;})());
|
|
18756
18756
|
})(build);
|
|
18757
18757
|
|
|
18758
|
-
var getDefaultCountries = function (availableCountries) {
|
|
18759
|
-
var filteredCountries = build.exports.defaultCountries.filter(function (country) {
|
|
18760
|
-
if (availableCountries === undefined)
|
|
18761
|
-
return true;
|
|
18762
|
-
if (Array.isArray(availableCountries)) {
|
|
18763
|
-
return availableCountries.includes(country[2]);
|
|
18764
|
-
}
|
|
18765
|
-
return country[2] === availableCountries;
|
|
18766
|
-
});
|
|
18767
|
-
var filtered = filteredCountries.map(function (country) {
|
|
18768
|
-
var parsedCountry = build.exports.parseCountry(country);
|
|
18769
|
-
if (parsedCountry.format == null)
|
|
18770
|
-
return country;
|
|
18771
|
-
var newFormatMask = parsedCountry.format.replace(/[^\\.]*/g, '');
|
|
18772
|
-
var fallbackFormatMask = '.'.repeat(15);
|
|
18773
|
-
return build.exports.buildCountryData(__assign(__assign({}, parsedCountry), { format: newFormatMask === '' ? fallbackFormatMask : newFormatMask }));
|
|
18774
|
-
});
|
|
18775
|
-
var usIndex = filtered.findIndex(function (country) {return country[2] === 'us';});
|
|
18776
|
-
var ukIndex = filtered.findIndex(function (country) {return country[2] === 'gb';});
|
|
18777
|
-
var beIndex = filtered.findIndex(function (country) {return country[2] === 'be';});
|
|
18778
|
-
var us = filtered.splice(usIndex, 1);
|
|
18779
|
-
var uk = filtered.splice(ukIndex, 1);
|
|
18780
|
-
var be = filtered.splice(beIndex, 1);
|
|
18781
|
-
filtered.unshift.apply(filtered, __spreadArray(__spreadArray(__spreadArray([], us, false), uk, false), be, false));
|
|
18782
|
-
return filtered;
|
|
18783
|
-
};
|
|
18784
|
-
|
|
18785
|
-
var PhoneInputField = function (_a) {
|
|
18786
|
-
var onChange = _a.onChange,id = _a.id,label = _a.label,mandatory = _a.mandatory,value = _a.value,placeholder = _a.placeholder,_b = _a.initialCountry,initialCountry = _b === void 0 ? 'us' : _b,availableCountries = _a.availableCountries,props = __rest(_a, ["onChange", "id", "label", "mandatory", "value", "placeholder", "initialCountry", "availableCountries"]);
|
|
18787
|
-
var countries = getDefaultCountries(availableCountries);
|
|
18788
|
-
var _c = build.exports.usePhoneInput({
|
|
18789
|
-
initialCountry: initialCountry,
|
|
18790
|
-
value: value,
|
|
18791
|
-
hideSpaceAfterDialCode: true,
|
|
18792
|
-
countries: countries }),
|
|
18793
|
-
phone = _c.phone,handlePhoneValueChange = _c.handlePhoneValueChange,inputRef = _c.inputRef,country = _c.country,setCountry = _c.setCountry;
|
|
18794
|
-
var handleInputChange = function (e) {
|
|
18795
|
-
handlePhoneValueChange(e);
|
|
18796
|
-
onChange(e);
|
|
18797
|
-
};
|
|
18798
|
-
var handleCountrySelect = function (_a) {
|
|
18799
|
-
var iso2 = _a.iso2;
|
|
18800
|
-
setCountry(iso2);
|
|
18801
|
-
};
|
|
18802
|
-
return jsxRuntime.exports.jsxs("div", __assign({ className: classes$8.awell_input_field_wrapper }, { children: [jsxRuntime.exports.jsx(QuestionLabel, { htmlFor: id, label: label, mandatory: mandatory }), jsxRuntime.exports.jsxs("div", __assign({ className: classes$8.awell_phone_input_field_container }, { children: [jsxRuntime.exports.jsx(build.exports.CountrySelector, { countries: countries, selectedCountry: country, onSelect: handleCountrySelect, buttonStyle: {
|
|
18803
|
-
border: 0,
|
|
18804
|
-
height: 42,
|
|
18805
|
-
marginRight: 2,
|
|
18806
|
-
backgroundColor: 'transparent' } }),
|
|
18807
|
-
jsxRuntime.exports.jsx("input", __assign({}, props, { type: "tel", id: id, ref: inputRef, className: classes$8.awell_input_field, placeholder: placeholder, onChange: handleInputChange, "data-1p-ignore": true, value: phone, "data-testid": "input-".concat(id), dir: "ltr" }))] }))] }));
|
|
18808
|
-
};
|
|
18809
|
-
PhoneInputField.displayName = 'PhoneInputField';
|
|
18810
|
-
|
|
18811
18758
|
var lodash = {exports: {}};
|
|
18812
18759
|
|
|
18813
18760
|
/**
|
|
@@ -36009,6 +35956,58 @@ Check the top-level render call using <` + t + ">.");
|
|
|
36009
35956
|
}).call(commonjsGlobal);
|
|
36010
35957
|
})(lodash,lodash.exports);
|
|
36011
35958
|
|
|
35959
|
+
var getDefaultCountries = function (availableCountries) {
|
|
35960
|
+
var countries = build.exports.defaultCountries.map(function (country) {
|
|
35961
|
+
var parsedCountry = build.exports.parseCountry(country);
|
|
35962
|
+
if (lodash.exports.isNil(parsedCountry.format))
|
|
35963
|
+
return country;
|
|
35964
|
+
var newFormatMask = parsedCountry.format.replace(/[^\\.]*/g, '');
|
|
35965
|
+
var fallbackFormatMask = '...............';
|
|
35966
|
+
return build.exports.buildCountryData(__assign(__assign({}, parsedCountry), { format: newFormatMask === '' ? fallbackFormatMask : newFormatMask }));
|
|
35967
|
+
});
|
|
35968
|
+
if (!lodash.exports.isNil(availableCountries) &&
|
|
35969
|
+
lodash.exports.isArray(availableCountries) &&
|
|
35970
|
+
availableCountries.length > 0) {
|
|
35971
|
+
countries = countries.filter(function (c) {
|
|
35972
|
+
return availableCountries.map(function (c) {return c.toLowerCase();}).includes(c[2]);
|
|
35973
|
+
});
|
|
35974
|
+
}
|
|
35975
|
+
var usIndex = countries.findIndex(function (c) {return c[2] === 'us';});
|
|
35976
|
+
var ukIndex = countries.findIndex(function (c) {return c[2] === 'gb';});
|
|
35977
|
+
var beIndex = countries.findIndex(function (c) {return c[2] === 'be';});
|
|
35978
|
+
var us = countries.splice(usIndex, 1);
|
|
35979
|
+
var uk = countries.splice(ukIndex, 1);
|
|
35980
|
+
var be = countries.splice(beIndex, 1);
|
|
35981
|
+
countries.unshift.apply(countries, __spreadArray(__spreadArray(__spreadArray([], us, false), uk, false), be, false));
|
|
35982
|
+
return countries;
|
|
35983
|
+
};
|
|
35984
|
+
|
|
35985
|
+
var PhoneInputField = function (_a) {
|
|
35986
|
+
var onChange = _a.onChange,id = _a.id,label = _a.label,mandatory = _a.mandatory,value = _a.value,placeholder = _a.placeholder,_b = _a.initialCountry,initialCountry = _b === void 0 ? 'us' : _b,availableCountries = _a.availableCountries,props = __rest(_a, ["onChange", "id", "label", "mandatory", "value", "placeholder", "initialCountry", "availableCountries"]);
|
|
35987
|
+
var countries = getDefaultCountries(availableCountries);
|
|
35988
|
+
var _c = build.exports.usePhoneInput({
|
|
35989
|
+
initialCountry: initialCountry,
|
|
35990
|
+
value: value,
|
|
35991
|
+
hideSpaceAfterDialCode: true,
|
|
35992
|
+
countries: countries }),
|
|
35993
|
+
phone = _c.phone,handlePhoneValueChange = _c.handlePhoneValueChange,inputRef = _c.inputRef,country = _c.country,setCountry = _c.setCountry;
|
|
35994
|
+
var handleInputChange = function (e) {
|
|
35995
|
+
handlePhoneValueChange(e);
|
|
35996
|
+
onChange(e);
|
|
35997
|
+
};
|
|
35998
|
+
var handleCountrySelect = function (_a) {
|
|
35999
|
+
var iso2 = _a.iso2;
|
|
36000
|
+
setCountry(iso2);
|
|
36001
|
+
};
|
|
36002
|
+
return jsxRuntime.exports.jsxs("div", __assign({ className: classes$8.awell_input_field_wrapper }, { children: [jsxRuntime.exports.jsx(QuestionLabel, { htmlFor: id, label: label, mandatory: mandatory }), jsxRuntime.exports.jsxs("div", __assign({ className: classes$8.awell_phone_input_field_container }, { children: [jsxRuntime.exports.jsx(build.exports.CountrySelector, { countries: countries, selectedCountry: country, onSelect: handleCountrySelect, buttonStyle: {
|
|
36003
|
+
border: 0,
|
|
36004
|
+
height: 42,
|
|
36005
|
+
marginRight: 2,
|
|
36006
|
+
backgroundColor: 'transparent' } }),
|
|
36007
|
+
jsxRuntime.exports.jsx("input", __assign({}, props, { type: "tel", id: id, ref: inputRef, className: classes$8.awell_input_field, placeholder: placeholder, onChange: handleInputChange, "data-1p-ignore": true, value: phone, "data-testid": "input-".concat(id), dir: "ltr" }))] }))] }));
|
|
36008
|
+
};
|
|
36009
|
+
PhoneInputField.displayName = 'PhoneInputField';
|
|
36010
|
+
|
|
36012
36011
|
var AUTO_PROGRESS_DELAY = 850;
|
|
36013
36012
|
var QuestionData = function (_a) {
|
|
36014
36013
|
var _b, _c, _d, _e, _f, _g;
|
|
@@ -36254,7 +36253,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
36254
36253
|
return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [jsxRuntime.exports.jsx("main", __assign({ id: "ahp_main_content_with_scroll_hint", className: classes$4.main_content }, { children: jsxRuntime.exports.jsxs("article", __assign({ className: "".concat(classes$3.awell_message, " ").concat(classes$3.container) }, { children: [jsxRuntime.exports.jsx("div", __assign({ className: classes$3.message_title }, { children: subject })), jsxRuntime.exports.jsx("div", __assign({ className: classes$3.content }, { children: jsxRuntime.exports.jsx(RichTextViewer, { content: cleanContent }) })), jsxRuntime.exports.jsxs("div", __assign({ className: classes$3.attachmentList }, { children: [jsxRuntime.exports.jsx(AttachmentList, { attachments: attachments, icon: attachmentIcon, labels: attachmentLabels }), children] }))] })) })), jsxRuntime.exports.jsx(HostedPageFooter, __assign({ showScrollHint: showScrollHint }, { children: jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes$3.button_wrapper, " ").concat(classes$3.container) }, { children: jsxRuntime.exports.jsx(Button, __assign({ "data-cy": "markMessageAsReadButton", variant: "secondary", onClick: onMessageRead }, { children: buttonLabels.readMessage })) })) }))] });
|
|
36255
36254
|
};
|
|
36256
36255
|
|
|
36257
|
-
var classes$2 = {"container":"awell__form_container","awell_wizard_form":"awell__form_awell_wizard_form","form_progress":"awell__form_form_progress","loadingContainer":"awell__form_loadingContainer","title":"awell__form_title","wizard_form":"awell__form_wizard_form","button_wrapper":"awell__form_button_wrapper","traditional_form":"awell__form_traditional_form","traditional_form_question":"awell__form_traditional_form_question","trademark":"awell__form_trademark","traditional":"awell__form_traditional","conversational":"awell__form_conversational"};
|
|
36256
|
+
var classes$2 = {"container":"awell__form_container","awell_wizard_form":"awell__form_awell_wizard_form","form_progress":"awell__form_form_progress","loadingContainer":"awell__form_loadingContainer","title":"awell__form_title","wizard_form":"awell__form_wizard_form","button_wrapper":"awell__form_button_wrapper","traditional_form":"awell__form_traditional_form","traditional_form_question":"awell__form_traditional_form_question","traditional_form_question_slider":"awell__form_traditional_form_question_slider","trademark":"awell__form_trademark","traditional":"awell__form_traditional","conversational":"awell__form_conversational"};
|
|
36258
36257
|
|
|
36259
36258
|
var useClickOutsideNotifier = function (_a) {
|
|
36260
36259
|
var ref = _a.ref,clickOutsideHandler = _a.clickOutsideHandler;
|
|
@@ -36279,7 +36278,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
36279
36278
|
return originalValidation;
|
|
36280
36279
|
}
|
|
36281
36280
|
var USValidation = build.exports.validatePhone(number, {
|
|
36282
|
-
countries: getDefaultCountries('us'),
|
|
36281
|
+
countries: getDefaultCountries(['us']),
|
|
36283
36282
|
charAfterDialCode: '',
|
|
36284
36283
|
prefix: '+' });
|
|
36285
36284
|
|
|
@@ -36766,7 +36765,10 @@ Check the top-level render call using <` + t + ">.");
|
|
|
36766
36765
|
updateQuestionVisibility = _c.updateQuestionVisibility,submitForm = _c.submitForm,isSubmittingForm = _c.isSubmittingForm,_d = _c.formMethods,control = _d.control,getValues = _d.getValues,errors = _c.errors,questionWithVisiblity = _c.questionWithVisiblity,formHasErrors = _c.formHasErrors;
|
|
36767
36766
|
return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment, { children: jsxRuntime.exports.jsx("main", __assign({ id: "ahp_main_content_with_scroll_hint", className: "".concat(classes$4.main_content, " ").concat(classes$2.traditional_form) }, { children: jsxRuntime.exports.jsxs("div", __assign({ className: "".concat(classes$2.container) }, { children: [!questionWithVisiblity ? jsxRuntime.exports.jsx("div", __assign({ className: classes$2.loadingContainer }, { children: jsxRuntime.exports.jsx(CircularSpinner, { size: "sm" }) })) : jsxRuntime.exports.jsx("div", { children: jsxRuntime.exports.jsx("div", { children: questionWithVisiblity.
|
|
36768
36767
|
filter(function (vb) {return vb.visible;}).
|
|
36769
|
-
map(function (visibleQuestion) {return jsxRuntime.exports.jsx("div", __assign({ className:
|
|
36768
|
+
map(function (visibleQuestion) {return jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes$2.traditional_form_question, " ").concat(visibleQuestion.userQuestionType ===
|
|
36769
|
+
exports.UserQuestionType.Slider ?
|
|
36770
|
+
classes$2.traditional_form_question_slider :
|
|
36771
|
+
'') }, { children: jsxRuntime.exports.jsx(Question, { question: visibleQuestion, control: control, getValues: getValues, errors: errors, inputAutoFocus: false, onAnswerChange: updateQuestionVisibility }, visibleQuestion.id) }), visibleQuestion.id);}) }) }), (form === null || form === void 0 ? void 0 : form.trademark) && jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes$2.trademark, " ").concat(classes$2.conversational) }, { children: form.trademark })), jsxRuntime.exports.jsxs("div", __assign({ className: "".concat(classes$2.button_wrapper) }, { children: [formHasErrors && jsxRuntime.exports.jsx("div", __assign({ className: classes$2.error }, { children: jsxRuntime.exports.jsx(Text, __assign({ variant: "textSmall", color: "var(--awell-signalError100)" }, { children: errorLabels.formHasErrors })) })), jsxRuntime.exports.jsx("div", {}), jsxRuntime.exports.jsx(Button, __assign({ onClick: submitForm, type: "submit", "data-cy": "submitFormButton", disabled: isSubmittingForm }, { children: buttonLabels.submit }))] }))] })) })) });
|
|
36770
36772
|
};
|
|
36771
36773
|
|
|
36772
36774
|
var WizardForm = ConversationalForm;
|
|
@@ -13,7 +13,7 @@ export interface PhoneInputFieldProps extends InputHTMLAttributes<HTMLInputEleme
|
|
|
13
13
|
mandatory?: boolean;
|
|
14
14
|
value: string;
|
|
15
15
|
initialCountry?: CountryIso2;
|
|
16
|
-
availableCountries?:
|
|
16
|
+
availableCountries?: Array<CountryIso2>;
|
|
17
17
|
placeholder?: string;
|
|
18
18
|
}
|
|
19
19
|
export declare const PhoneInputField: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CountryIso2 } from 'react-international-phone';
|
|
2
2
|
import { CountryData } from '../../hooks/useValidate';
|
|
3
|
-
export declare const getDefaultCountries: (availableCountries:
|
|
3
|
+
export declare const getDefaultCountries: (availableCountries: Array<CountryIso2> | undefined) => Array<CountryData>;
|
|
@@ -16,5 +16,5 @@ interface CalculatePercentageCompletedProps {
|
|
|
16
16
|
allQuestions: Question[];
|
|
17
17
|
}
|
|
18
18
|
export declare const calculatePercentageCompleted: ({ currentQuestionId, allQuestions, }: CalculatePercentageCompletedProps) => number;
|
|
19
|
-
export declare const getErrorsForQuestion: (currentQuestion: QuestionWithVisibility, formMethods: UseFormReturn<Record<string, AnswerValue>, any>, errorLabels: ErrorLabels, isValidE164Number: (number: string, availableCountries?:
|
|
19
|
+
export declare const getErrorsForQuestion: (currentQuestion: QuestionWithVisibility, formMethods: UseFormReturn<Record<string, AnswerValue>, any>, errorLabels: ErrorLabels, isValidE164Number: (number: string, availableCountries?: Array<CountryIso2>) => boolean) => Array<FormError>;
|
|
20
20
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ValidatePhoneReturn, CountryIso2 } from './types';
|
|
2
2
|
export interface UseValidateHook {
|
|
3
|
-
validatePhoneNumber: (number: string, availableCountries?:
|
|
4
|
-
isValidE164Number: (number: string, availableCountries?:
|
|
3
|
+
validatePhoneNumber: (number: string, availableCountries?: Array<CountryIso2>) => ValidatePhoneReturn;
|
|
4
|
+
isValidE164Number: (number: string, availableCountries?: Array<CountryIso2>) => boolean;
|
|
5
5
|
isPossibleE164Number: (number: string) => boolean;
|
|
6
|
-
numberMatchesAvailableCountries: (number: string, availableCountries:
|
|
6
|
+
numberMatchesAvailableCountries: (number: string, availableCountries: Array<CountryIso2>) => boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const handleUSException: (number: string, originalValidation: ValidatePhoneReturn) => ValidatePhoneReturn;
|
|
9
9
|
export declare const useValidate: () => UseValidateHook;
|