@alfalab/core-components-intl-phone-input 7.0.17 → 8.0.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/{component-493e5f4b.d.ts → component-e5dc042a.d.ts} +5 -1
- package/{component-493e5f4b.js → component-e5dc042a.js} +9 -3
- package/component.d.ts +11 -3
- package/component.js +122 -49
- package/components/flag-icon/component.js +1 -1
- package/components/flag-icon/index.css +261 -261
- package/components/index.js +3 -1
- package/components/select/component.d.ts +1 -1
- package/components/select/component.js +4 -3
- package/components/select/index.css +6 -6
- package/components/select/index.js +2 -1
- package/components/select-field/component.js +3 -1
- package/components/select-field/index.css +12 -8
- package/components/select-field/index.d.ts +1 -1
- package/components/select-field/index.js +3 -1
- package/{esm/component-707d05d1.d.ts → cssm/component-e122d96a.d.ts} +5 -1
- package/cssm/{component-343123ac.js → component-e122d96a.js} +8 -2
- package/cssm/component.d.ts +10 -2
- package/cssm/component.js +120 -47
- package/cssm/components/index.js +3 -1
- package/cssm/components/select/component.d.ts +1 -1
- package/cssm/components/select/component.js +3 -2
- package/cssm/components/select/index.js +2 -1
- package/cssm/components/select-field/component.js +3 -1
- package/cssm/components/select-field/index.d.ts +1 -1
- package/cssm/components/select-field/index.js +3 -1
- package/cssm/components/select-field/index.module.css +4 -0
- package/cssm/index.js +3 -1
- package/cssm/index.module.css +25 -1
- package/cssm/utils/preparePasteData.d.ts +8 -0
- package/cssm/utils/preparePasteData.js +58 -0
- package/{cssm/component-343123ac.d.ts → esm/component-1805d321.d.ts} +5 -1
- package/esm/{component-707d05d1.js → component-1805d321.js} +8 -4
- package/esm/component.d.ts +10 -2
- package/esm/component.js +121 -49
- package/esm/components/flag-icon/component.js +1 -1
- package/esm/components/flag-icon/index.css +261 -261
- package/esm/components/index.js +2 -1
- package/esm/components/select/component.d.ts +1 -1
- package/esm/components/select/component.js +4 -3
- package/esm/components/select/index.css +6 -6
- package/esm/components/select/index.js +2 -1
- package/esm/components/select-field/component.js +2 -1
- package/esm/components/select-field/index.css +12 -8
- package/esm/components/select-field/index.d.ts +1 -1
- package/esm/components/select-field/index.js +2 -1
- package/esm/index.css +28 -4
- package/esm/index.js +3 -1
- package/esm/{libphonenumber-js.min-793726a8.d.ts → libphonenumber-js.min-6becf821.d.ts} +0 -0
- package/esm/{libphonenumber-js.min-793726a8.js → libphonenumber-js.min-6becf821.js} +0 -0
- package/esm/utils/preparePasteData.d.ts +8 -0
- package/esm/utils/preparePasteData.js +54 -0
- package/index.css +28 -4
- package/index.js +3 -1
- package/{libphonenumber-js.min-05992324.d.ts → libphonenumber-js.min-ebc21c40.d.ts} +0 -0
- package/{libphonenumber-js.min-05992324.js → libphonenumber-js.min-ebc21c40.js} +0 -0
- package/modern/component.d.ts +10 -2
- package/modern/component.js +114 -40
- package/modern/components/flag-icon/component.js +1 -1
- package/modern/components/flag-icon/index.css +261 -261
- package/modern/components/index.js +2 -1
- package/modern/components/select/component.d.ts +1 -1
- package/modern/components/select/component.js +4 -3
- package/modern/components/select/index.css +6 -6
- package/modern/components/select/index.js +1 -0
- package/modern/components/select-field/component.d.ts +5 -1
- package/modern/components/select-field/component.js +8 -4
- package/modern/components/select-field/index.css +12 -8
- package/modern/components/select-field/index.js +2 -1
- package/modern/index.css +28 -4
- package/modern/index.js +2 -0
- package/modern/{libphonenumber-js.min-793726a8.d.ts → libphonenumber-js.min-6becf821.d.ts} +0 -0
- package/modern/{libphonenumber-js.min-793726a8.js → libphonenumber-js.min-6becf821.js} +0 -0
- package/modern/utils/preparePasteData.d.ts +8 -0
- package/modern/utils/preparePasteData.js +54 -0
- package/package.json +1 -1
- package/utils/preparePasteData.d.ts +8 -0
- package/utils/preparePasteData.js +58 -0
|
@@ -31,5 +31,9 @@ declare function __classPrivateFieldGet(receiver: any, privateMap: any): any;
|
|
|
31
31
|
declare function __classPrivateFieldSet(receiver: any, privateMap: any, value: any): any;
|
|
32
32
|
declare function __assign(...args: any[]): any;
|
|
33
33
|
declare function __createBinding(o: any, m: any, k: any, k2: any): void;
|
|
34
|
+
declare const EMPTY_COUNTRY_SELECT_FIELD: {
|
|
35
|
+
value: string;
|
|
36
|
+
key: string;
|
|
37
|
+
};
|
|
34
38
|
declare const SelectField: FC<FieldProps>;
|
|
35
|
-
export { __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __assign, __createBinding, SelectField };
|
|
39
|
+
export { __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __assign, __createBinding, EMPTY_COUNTRY_SELECT_FIELD, SelectField };
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var cn = require('classnames');
|
|
5
|
+
var WorldMagnifierMIcon = require('@alfalab/icons-glyph/WorldMagnifierMIcon');
|
|
5
6
|
var mergeRefs = require('react-merge-refs');
|
|
6
7
|
var hooks = require('@alfalab/hooks');
|
|
7
8
|
var components_flagIcon_component = require('./components/flag-icon/component.js');
|
|
@@ -10,6 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
11
|
|
|
11
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
13
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
14
|
+
var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultLegacy(WorldMagnifierMIcon);
|
|
13
15
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultLegacy(mergeRefs);
|
|
14
16
|
|
|
15
17
|
/*! *****************************************************************************
|
|
@@ -51,9 +53,13 @@ function __rest(s, e) {
|
|
|
51
53
|
return t;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
var styles = {"component":"intl-phone-
|
|
56
|
+
var styles = {"component":"intl-phone-input__component_1t5ac","flagIconContainer":"intl-phone-input__flagIconContainer_1t5ac","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1t5ac","disabled":"intl-phone-input__disabled_1t5ac","inner":"intl-phone-input__inner_1t5ac","l":"intl-phone-input__l_1t5ac","xl":"intl-phone-input__xl_1t5ac","focusVisible":"intl-phone-input__focusVisible_1t5ac"};
|
|
55
57
|
require('./components/select-field/index.css')
|
|
56
58
|
|
|
59
|
+
var EMPTY_COUNTRY_SELECT_FIELD = {
|
|
60
|
+
value: 'EMPTY_COUNTRY_SELECT_VALUE',
|
|
61
|
+
key: 'EMPTY_COUNTRY_SELECT_KEY',
|
|
62
|
+
};
|
|
57
63
|
var SelectField = function (_a) {
|
|
58
64
|
var _b;
|
|
59
65
|
var selected = _a.selected, Arrow = _a.Arrow, size = _a.size, disabled = _a.disabled, _c = _a.innerProps, innerProps = _c === void 0 ? {} : _c;
|
|
@@ -65,10 +71,10 @@ var SelectField = function (_a) {
|
|
|
65
71
|
_b[styles.disabled] = disabled,
|
|
66
72
|
_b)) },
|
|
67
73
|
React__default['default'].createElement("div", exports.__assign({}, innerProps, { className: styles.inner }),
|
|
68
|
-
|
|
69
|
-
React__default['default'].createElement(components_flagIcon_component.FlagIcon, { country: selected.value }))),
|
|
74
|
+
React__default['default'].createElement("span", { className: styles.flagIconContainer }, !selected || selected === EMPTY_COUNTRY_SELECT_FIELD ? (React__default['default'].createElement(WorldMagnifierMIcon__default['default'], { className: styles.emptyCountryIcon })) : (React__default['default'].createElement(components_flagIcon_component.FlagIcon, { country: selected.value }))),
|
|
70
75
|
Arrow)));
|
|
71
76
|
};
|
|
72
77
|
|
|
78
|
+
exports.EMPTY_COUNTRY_SELECT_FIELD = EMPTY_COUNTRY_SELECT_FIELD;
|
|
73
79
|
exports.SelectField = SelectField;
|
|
74
80
|
exports.__rest = __rest;
|
package/component.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ type IntlPhoneInputProps = Partial<Omit<InputAutocompleteProps, 'onChange'>> & P
|
|
|
25
25
|
/**
|
|
26
26
|
* Обработчик события изменения страны
|
|
27
27
|
*/
|
|
28
|
-
onCountryChange?: (countryCode
|
|
28
|
+
onCountryChange?: (countryCode?: CountryCode) => void;
|
|
29
29
|
/**
|
|
30
30
|
* Список стран
|
|
31
31
|
*/
|
|
@@ -38,8 +38,12 @@ type IntlPhoneInputProps = Partial<Omit<InputAutocompleteProps, 'onChange'>> & P
|
|
|
38
38
|
* Ограничение длин вводимых номеров по странам.
|
|
39
39
|
*/
|
|
40
40
|
maxPhoneLen?: MaxPhoneLenByCountry;
|
|
41
|
+
hideCountrySelect?: boolean;
|
|
42
|
+
canBeEmptyCountry?: boolean;
|
|
43
|
+
ruNumberPriority?: boolean;
|
|
44
|
+
clear?: boolean;
|
|
41
45
|
};
|
|
42
|
-
declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Pick<InputAutocompleteProps, "
|
|
46
|
+
declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Pick<InputAutocompleteProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "labelView" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onInput" | "onScroll" | "value" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "multiple" | "readOnly" | "success" | "selected" | "valueRenderer" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "inputProps" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList" | "Input">> & Pick<SelectProps, "preventFlip"> & {
|
|
43
47
|
/**
|
|
44
48
|
* Значение
|
|
45
49
|
*/
|
|
@@ -59,7 +63,7 @@ declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Pick<Input
|
|
|
59
63
|
/**
|
|
60
64
|
* Обработчик события изменения страны
|
|
61
65
|
*/
|
|
62
|
-
onCountryChange?: ((countryCode
|
|
66
|
+
onCountryChange?: ((countryCode?: "AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TA" | "TC" | "TD" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | undefined) => void) | undefined;
|
|
63
67
|
/**
|
|
64
68
|
* Список стран
|
|
65
69
|
*/
|
|
@@ -72,5 +76,9 @@ declare const IntlPhoneInput: React.ForwardRefExoticComponent<Partial<Pick<Input
|
|
|
72
76
|
* Ограничение длин вводимых номеров по странам.
|
|
73
77
|
*/
|
|
74
78
|
maxPhoneLen?: Record<string, number> | undefined;
|
|
79
|
+
hideCountrySelect?: boolean | undefined;
|
|
80
|
+
canBeEmptyCountry?: boolean | undefined;
|
|
81
|
+
ruNumberPriority?: boolean | undefined;
|
|
82
|
+
clear?: boolean | undefined;
|
|
75
83
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
76
84
|
export { IntlPhoneInputProps, IntlPhoneInput };
|
package/component.js
CHANGED
|
@@ -2,26 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var components_selectField_component = require('./component-
|
|
5
|
+
var components_selectField_component = require('./component-e5dc042a.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var utils = require('@alfalab/utils');
|
|
9
9
|
var coreComponentsInputAutocomplete = require('@alfalab/core-components-input-autocomplete');
|
|
10
|
+
var WorldMagnifierMIcon = require('@alfalab/icons-glyph/WorldMagnifierMIcon');
|
|
10
11
|
require('react-merge-refs');
|
|
11
12
|
require('@alfalab/hooks');
|
|
12
|
-
require('./components/flag-icon/component.js');
|
|
13
|
+
var components_flagIcon_component = require('./components/flag-icon/component.js');
|
|
13
14
|
require('@alfalab/core-components-select');
|
|
14
15
|
var components_select_component = require('./components/select/component.js');
|
|
15
16
|
var utils_formatPhoneWithUnclearableCountryCode = require('./utils/format-phone-with-unclearable-country-code.js');
|
|
16
17
|
var utils_calculateCaretPos = require('./utils/calculateCaretPos.js');
|
|
17
18
|
var useCaretAvoidCountryCode = require('./useCaretAvoidCountryCode.js');
|
|
19
|
+
var utils_preparePasteData = require('./utils/preparePasteData.js');
|
|
18
20
|
|
|
19
21
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
22
|
|
|
21
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
24
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
25
|
+
var WorldMagnifierMIcon__default = /*#__PURE__*/_interopDefaultLegacy(WorldMagnifierMIcon);
|
|
23
26
|
|
|
24
|
-
var styles = {"addons":"intl-phone-
|
|
27
|
+
var styles = {"addons":"intl-phone-input__addons_1ukqy","l":"intl-phone-input__l_1ukqy","xl":"intl-phone-input__xl_1ukqy","flagIconWrapper":"intl-phone-input__flagIconWrapper_1ukqy","emptyCountryIcon":"intl-phone-input__emptyCountryIcon_1ukqy"};
|
|
25
28
|
require('./index.css')
|
|
26
29
|
|
|
27
30
|
var countriesHash = utils.getCountriesHash();
|
|
@@ -30,20 +33,31 @@ var MASK_SYMBOLS = [' ', '-', '(', ')'];
|
|
|
30
33
|
var MAX_PHONE_LEN = 15;
|
|
31
34
|
var DEFAULT_MAX_PHONE_LEN_BY_COUNTRY = { RU: 11 };
|
|
32
35
|
var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
33
|
-
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.readOnly, readOnly = _c === void 0 ? false : _c, _d = _a.size, size =
|
|
34
|
-
var
|
|
35
|
-
var _m = React.useState(0), fieldWidth = _m[0], setFieldWidth = _m[1];
|
|
36
|
+
var _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.readOnly, readOnly = _c === void 0 ? false : _c, _d = _a.hideCountrySelect, hideCountrySelect = _d === void 0 ? false : _d, _e = _a.canBeEmptyCountry, canBeEmptyCountry = _e === void 0 ? false : _e, _f = _a.ruNumberPriority, ruNumberPriority = _f === void 0 ? false : _f, _g = _a.clear, clear = _g === void 0 ? false : _g, _h = _a.size, size = _h === void 0 ? 'm' : _h, _j = _a.colors, colors = _j === void 0 ? 'default' : _j, _k = _a.options, options = _k === void 0 ? [] : _k, _l = _a.countries, countries = _l === void 0 ? utils.getCountries() : _l, _m = _a.clearableCountryCode, clearableCountryCode = _m === void 0 ? true : _m, className = _a.className, value = _a.value, onChange = _a.onChange, onCountryChange = _a.onCountryChange, _o = _a.defaultCountryIso2, defaultCountryIso2 = _o === void 0 ? 'ru' : _o, preventFlip = _a.preventFlip, inputProps = _a.inputProps, _p = _a.maxPhoneLen, maxPhoneLen = _p === void 0 ? DEFAULT_MAX_PHONE_LEN_BY_COUNTRY : _p, restProps = components_selectField_component.__rest(_a, ["disabled", "readOnly", "hideCountrySelect", "canBeEmptyCountry", "ruNumberPriority", "clear", "size", "colors", "options", "countries", "clearableCountryCode", "className", "value", "onChange", "onCountryChange", "defaultCountryIso2", "preventFlip", "inputProps", "maxPhoneLen"]);
|
|
37
|
+
var _q = React.useState(defaultCountryIso2.toLowerCase()), countryIso2 = _q[0], setCountryIso2 = _q[1];
|
|
36
38
|
var inputRef = React.useRef(null);
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
+
var _r = React.useState(null), inputWrapperRef = _r[0], setInputWrapperRef = _r[1];
|
|
40
|
+
var _s = React.useState(), caretPos = _s[0], setCaretPos = _s[1];
|
|
39
41
|
var phoneLibUtils = React.useRef();
|
|
40
42
|
var formatPhone = function (inputValue) {
|
|
41
43
|
var newValue = inputValue;
|
|
42
44
|
if (phoneLibUtils.current) {
|
|
43
45
|
var Utils = phoneLibUtils.current;
|
|
44
|
-
var utils = new Utils(countryIso2.toUpperCase());
|
|
46
|
+
var utils = new Utils(countryIso2 ? countryIso2.toUpperCase() : undefined);
|
|
45
47
|
newValue = utils.input(inputValue);
|
|
46
48
|
}
|
|
49
|
+
if (countryIso2 === 'ru') {
|
|
50
|
+
var parts = newValue.split(' ');
|
|
51
|
+
newValue = parts.reduce(function (acc, part, index) {
|
|
52
|
+
if (index === 0) {
|
|
53
|
+
return part;
|
|
54
|
+
}
|
|
55
|
+
if (index > 2) {
|
|
56
|
+
return acc + "-" + part;
|
|
57
|
+
}
|
|
58
|
+
return acc + " " + part;
|
|
59
|
+
}, '');
|
|
60
|
+
}
|
|
47
61
|
return newValue;
|
|
48
62
|
};
|
|
49
63
|
var setCountryByIso2 = function (iso2) {
|
|
@@ -55,49 +69,64 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
55
69
|
};
|
|
56
70
|
var handleCountryChange = function (countryCode) {
|
|
57
71
|
if (onCountryChange) {
|
|
58
|
-
onCountryChange(countryCode.toUpperCase());
|
|
72
|
+
onCountryChange(countryCode ? countryCode.toUpperCase() : undefined);
|
|
59
73
|
}
|
|
60
74
|
};
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
75
|
+
var getCountryByNumber = function (inputValue) {
|
|
76
|
+
// dialcode казахстанских номеров совпадает с российскими, поэтому проверяем отдельно
|
|
77
|
+
if (new RegExp('^\\+7(\\s)?7').test(inputValue)) {
|
|
78
|
+
var kzCoutry = countries.find(function (item) { return item.iso2 === 'kz'; });
|
|
79
|
+
if (kzCoutry) {
|
|
80
|
+
return kzCoutry;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
var targetCountry = countries.find(function (country) {
|
|
84
|
+
if (new RegExp("^\\+" + country.dialCode).test(inputValue)) {
|
|
65
85
|
// Сначала проверяем, если приоритет не указан
|
|
66
|
-
if (
|
|
67
|
-
|
|
68
|
-
setCountryIso2(country_1.iso2);
|
|
69
|
-
handleCountryChange(country_1.iso2);
|
|
70
|
-
break;
|
|
86
|
+
if (country.priority === undefined) {
|
|
87
|
+
return true;
|
|
71
88
|
}
|
|
72
89
|
// Если страна уже была выставлена через селект, и коды совпадают
|
|
73
|
-
if (countryIso2 ===
|
|
74
|
-
|
|
75
|
-
setCountryIso2(country_1.iso2);
|
|
76
|
-
handleCountryChange(country_1.iso2);
|
|
77
|
-
break;
|
|
78
|
-
// Если не совпадают - выбираем по приоритету
|
|
90
|
+
if (countryIso2 === country.iso2 && countryIso2 !== 'kz') {
|
|
91
|
+
return true;
|
|
79
92
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
handleCountryChange(country_1.iso2);
|
|
84
|
-
break;
|
|
93
|
+
// Если не совпадают - выбираем по приоритету
|
|
94
|
+
if (country.priority === 0) {
|
|
95
|
+
return true;
|
|
85
96
|
}
|
|
97
|
+
return false;
|
|
86
98
|
}
|
|
99
|
+
return false;
|
|
100
|
+
});
|
|
101
|
+
return targetCountry;
|
|
102
|
+
};
|
|
103
|
+
var setCountryByDialCode = function (inputValue) {
|
|
104
|
+
var country = getCountryByNumber(inputValue);
|
|
105
|
+
onChange(formatPhone(inputValue));
|
|
106
|
+
if (country) {
|
|
107
|
+
setCountryIso2(country.iso2);
|
|
108
|
+
handleCountryChange(country.iso2);
|
|
109
|
+
}
|
|
110
|
+
else if (canBeEmptyCountry) {
|
|
111
|
+
setCountryIso2(undefined);
|
|
112
|
+
handleCountryChange(undefined);
|
|
87
113
|
}
|
|
88
114
|
};
|
|
89
115
|
var setCountryByDialCodeWithLengthCheck = function (inputValue) {
|
|
90
|
-
if (
|
|
91
|
-
|
|
116
|
+
if (inputRef.current) {
|
|
117
|
+
var selectionStart = inputRef.current.selectionStart;
|
|
118
|
+
if ((selectionStart || 0) <= MAX_DIAL_CODE_LENGTH) {
|
|
119
|
+
setCountryByDialCode(inputValue);
|
|
120
|
+
}
|
|
92
121
|
}
|
|
93
122
|
};
|
|
94
123
|
var addCountryCode = function (inputValue) {
|
|
95
|
-
|
|
96
|
-
if (clearableCountryCode) {
|
|
124
|
+
if (clearableCountryCode || !countryIso2) {
|
|
97
125
|
return inputValue.length === 1 && inputValue !== '+'
|
|
98
126
|
? "+" + inputValue
|
|
99
127
|
: inputValue;
|
|
100
128
|
}
|
|
129
|
+
var country = countriesHash[countryIso2];
|
|
101
130
|
return utils_formatPhoneWithUnclearableCountryCode.formatPhoneWithUnclearableCountryCode(inputValue, country);
|
|
102
131
|
};
|
|
103
132
|
var handleInputChange = function (event) {
|
|
@@ -107,13 +136,13 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
107
136
|
var handleSelectChange = function (_a) {
|
|
108
137
|
var selected = _a.selected;
|
|
109
138
|
if (selected) {
|
|
110
|
-
var
|
|
111
|
-
var inputValue = "+" +
|
|
139
|
+
var country_1 = setCountryByIso2(selected.value);
|
|
140
|
+
var inputValue = "+" + country_1.dialCode;
|
|
112
141
|
if (inputRef.current) {
|
|
113
142
|
inputRef.current.focus();
|
|
114
143
|
inputRef.current.setSelectionRange(inputValue.length, inputValue.length);
|
|
115
144
|
}
|
|
116
|
-
handleCountryChange(
|
|
145
|
+
handleCountryChange(country_1.iso2);
|
|
117
146
|
}
|
|
118
147
|
};
|
|
119
148
|
var handleChange = function (payload) {
|
|
@@ -123,12 +152,15 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
123
152
|
setCountryByDialCodeWithLengthCheck(selected.key);
|
|
124
153
|
onChange(formatPhone(selected.key));
|
|
125
154
|
};
|
|
126
|
-
var country = countriesHash[countryIso2];
|
|
127
|
-
var countryCodeLength = ("+" + country.dialCode).length;
|
|
155
|
+
var country = countryIso2 && countriesHash[countryIso2];
|
|
156
|
+
var countryCodeLength = country ? ("+" + country.dialCode).length : 0;
|
|
157
|
+
var isEmptyValue = clearableCountryCode
|
|
158
|
+
? value === '' || value === '+'
|
|
159
|
+
: value.length <= countryCodeLength;
|
|
128
160
|
var handleInputNewChar = function (event, caretPosition) {
|
|
129
161
|
var input = event.target;
|
|
130
162
|
var currentValue = input.value;
|
|
131
|
-
var maxPhoneLength = (maxPhoneLen === null || maxPhoneLen === void 0 ? void 0 : maxPhoneLen[countryIso2.toUpperCase()]) || MAX_PHONE_LEN;
|
|
163
|
+
var maxPhoneLength = (countryIso2 && (maxPhoneLen === null || maxPhoneLen === void 0 ? void 0 : maxPhoneLen[countryIso2.toUpperCase()])) || MAX_PHONE_LEN;
|
|
132
164
|
// Если номер полностью заполнен, то перезатираем цифры, если каретка не в самом конце.
|
|
133
165
|
var shouldReplace = maxPhoneLength === currentValue.replace(/\D/g, '').length;
|
|
134
166
|
var endPhonePart = currentValue.slice(caretPosition);
|
|
@@ -140,15 +172,27 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
140
172
|
endPhonePart = endPhonePart.slice(cursor + 1);
|
|
141
173
|
}
|
|
142
174
|
var newValue = currentValue.slice(0, caretPosition) + event.key + endPhonePart;
|
|
175
|
+
var newValueDecimal = newValue.replace(/\D/g, '');
|
|
143
176
|
// Запрещаем ввод, если номер уже заполнен.
|
|
144
|
-
if (
|
|
177
|
+
if (newValueDecimal.length > maxPhoneLength) {
|
|
145
178
|
newValue = newValue.slice(0, -1);
|
|
146
179
|
}
|
|
180
|
+
if (ruNumberPriority && !value && countryIso2 === 'ru') {
|
|
181
|
+
if (newValue === '7' || newValue === '8') {
|
|
182
|
+
newValue = '+7';
|
|
183
|
+
}
|
|
184
|
+
else if (newValueDecimal.length === 1) {
|
|
185
|
+
newValue = "+7" + newValueDecimal;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
147
188
|
newValue = formatPhone(addCountryCode(newValue));
|
|
148
189
|
var phonePartWithoutMask = currentValue.slice(0, caretPosition).replace(/\D/g, '') + event.key;
|
|
149
190
|
if (shouldReplace && phonePartWithoutMask.length > maxPhoneLength) {
|
|
150
191
|
phonePartWithoutMask = phonePartWithoutMask.slice(0, -1);
|
|
151
192
|
}
|
|
193
|
+
if (newValue && newValue[0] !== '+') {
|
|
194
|
+
newValue = "+" + newValue;
|
|
195
|
+
}
|
|
152
196
|
setCaretPos(utils_calculateCaretPos.calculateCaretPos(phonePartWithoutMask, newValue));
|
|
153
197
|
setCountryByDialCodeWithLengthCheck(newValue);
|
|
154
198
|
onChange(newValue);
|
|
@@ -192,6 +236,35 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
192
236
|
handleInputNewChar(event, caretPosition);
|
|
193
237
|
}
|
|
194
238
|
};
|
|
239
|
+
var handleClear = function () {
|
|
240
|
+
if (clearableCountryCode) {
|
|
241
|
+
onChange('+');
|
|
242
|
+
if (canBeEmptyCountry) {
|
|
243
|
+
setCountryIso2(undefined);
|
|
244
|
+
handleCountryChange(undefined);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
onChange(value.substring(0, countryCodeLength));
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
var handlePaste = function (event) {
|
|
252
|
+
var _a;
|
|
253
|
+
event.preventDefault();
|
|
254
|
+
var text = (_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('Text');
|
|
255
|
+
if (!text || !inputRef.current) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
var _b = inputRef.current, selectionStart = _b.selectionStart, selectionEnd = _b.selectionEnd;
|
|
259
|
+
var preparedNumber = utils_preparePasteData.preparePasteData(value, text, selectionStart || 0, selectionEnd || 0);
|
|
260
|
+
var targetCountry = getCountryByNumber(preparedNumber);
|
|
261
|
+
var maxPhoneLength = (targetCountry && (maxPhoneLen === null || maxPhoneLen === void 0 ? void 0 : maxPhoneLen[targetCountry.iso2.toUpperCase()])) || MAX_PHONE_LEN;
|
|
262
|
+
var resultNumber = preparedNumber.substring(0, maxPhoneLength + 1);
|
|
263
|
+
if (resultNumber) {
|
|
264
|
+
setCountryIso2(targetCountry ? targetCountry.iso2 : undefined);
|
|
265
|
+
onChange(formatPhone(addCountryCode(resultNumber)));
|
|
266
|
+
}
|
|
267
|
+
};
|
|
195
268
|
React.useEffect(function () {
|
|
196
269
|
if (inputRef.current && caretPos !== undefined) {
|
|
197
270
|
inputRef.current.setSelectionRange(caretPos, caretPos);
|
|
@@ -202,21 +275,21 @@ var IntlPhoneInput = React.forwardRef(function (_a, ref) {
|
|
|
202
275
|
if (phoneLibUtils.current)
|
|
203
276
|
return;
|
|
204
277
|
Promise.resolve().then(function () { return require(
|
|
205
|
-
/* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-
|
|
278
|
+
/* webpackChunkName: "libphonenumber" */ './libphonenumber-js.min-ebc21c40.js'); })
|
|
206
279
|
.then(function (utils) {
|
|
207
280
|
phoneLibUtils.current = utils.AsYouType;
|
|
208
|
-
|
|
281
|
+
if (canBeEmptyCountry) {
|
|
282
|
+
onChange(formatPhone(value));
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
setCountryByDialCode(value);
|
|
286
|
+
}
|
|
209
287
|
})
|
|
210
288
|
.catch(function (error) { return "An error occurred while loading libphonenumber-js:\n" + error; });
|
|
211
289
|
/* eslint-disable-next-line react-hooks/exhaustive-deps */
|
|
212
290
|
}, [value]);
|
|
213
291
|
useCaretAvoidCountryCode.useCaretAvoidCountryCode({ inputRef: inputRef, countryCodeLength: countryCodeLength, clearableCountryCode: clearableCountryCode });
|
|
214
|
-
|
|
215
|
-
if (inputWrapperRef) {
|
|
216
|
-
setFieldWidth(inputWrapperRef.getBoundingClientRect().width);
|
|
217
|
-
}
|
|
218
|
-
}, [inputWrapperRef]);
|
|
219
|
-
return (React__default['default'].createElement(coreComponentsInputAutocomplete.InputAutocomplete, components_selectField_component.__assign({}, restProps, { ref: ref, inputProps: components_selectField_component.__assign(components_selectField_component.__assign({}, inputProps), { ref: inputRef, wrapperRef: setInputWrapperRef, type: 'tel', colors: colors, className: cn__default['default'](className, styles[size]), addonsClassName: styles.addons, onKeyDown: handleKeyDown, leftAddons: countries.length > 1 && (React__default['default'].createElement(components_select_component.CountriesSelect, { dataTestId: 'countries-select', disabled: disabled || readOnly, size: size, selected: countryIso2, countries: countries, onChange: handleSelectChange, fieldWidth: fieldWidth, preventFlip: preventFlip })) }), optionsListWidth: 'field', closeOnSelect: true, onInput: handleInputChange, onChange: handleChange, options: options, disabled: disabled, readOnly: readOnly, size: size, className: className, value: value })));
|
|
292
|
+
return (React__default['default'].createElement(coreComponentsInputAutocomplete.InputAutocomplete, components_selectField_component.__assign({}, restProps, { ref: ref, inputProps: components_selectField_component.__assign(components_selectField_component.__assign({ clear: clear && !isEmptyValue, onClear: handleClear }, inputProps), { ref: inputRef, wrapperRef: setInputWrapperRef, type: 'tel', colors: colors, className: cn__default['default'](className, styles[size]), addonsClassName: styles.addons, onKeyDown: handleKeyDown, onPaste: handlePaste, leftAddons: hideCountrySelect ? (React__default['default'].createElement("span", { className: styles.flagIconWrapper }, countryIso2 ? (React__default['default'].createElement(components_flagIcon_component.FlagIcon, { country: countryIso2 })) : (React__default['default'].createElement(WorldMagnifierMIcon__default['default'], { className: styles.emptyCountryIcon })))) : (countries.length > 1 && (React__default['default'].createElement(components_select_component.CountriesSelect, { dataTestId: 'countries-select', disabled: disabled || readOnly, size: size, selected: countryIso2, countries: countries, onChange: handleSelectChange, fieldWidth: inputWrapperRef && inputWrapperRef.getBoundingClientRect().width, preventFlip: preventFlip }))) }), optionsListWidth: 'field', closeOnSelect: true, onInput: handleInputChange, onChange: handleChange, options: options, disabled: disabled, readOnly: readOnly, size: size, className: className, value: value })));
|
|
220
293
|
});
|
|
221
294
|
IntlPhoneInput.defaultProps = {
|
|
222
295
|
size: 'm',
|
|
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
11
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
12
12
|
|
|
13
|
-
var styles = {"flagIcon":"intl-phone-
|
|
13
|
+
var styles = {"flagIcon":"intl-phone-input__flagIcon_19pfu","ac":"intl-phone-input__ac_19pfu","ad":"intl-phone-input__ad_19pfu","ae":"intl-phone-input__ae_19pfu","af":"intl-phone-input__af_19pfu","ag":"intl-phone-input__ag_19pfu","ai":"intl-phone-input__ai_19pfu","al":"intl-phone-input__al_19pfu","am":"intl-phone-input__am_19pfu","ao":"intl-phone-input__ao_19pfu","aq":"intl-phone-input__aq_19pfu","ar":"intl-phone-input__ar_19pfu","as":"intl-phone-input__as_19pfu","at":"intl-phone-input__at_19pfu","au":"intl-phone-input__au_19pfu","aw":"intl-phone-input__aw_19pfu","ax":"intl-phone-input__ax_19pfu","az":"intl-phone-input__az_19pfu","ba":"intl-phone-input__ba_19pfu","bb":"intl-phone-input__bb_19pfu","bd":"intl-phone-input__bd_19pfu","be":"intl-phone-input__be_19pfu","bf":"intl-phone-input__bf_19pfu","bg":"intl-phone-input__bg_19pfu","bh":"intl-phone-input__bh_19pfu","bi":"intl-phone-input__bi_19pfu","bj":"intl-phone-input__bj_19pfu","bl":"intl-phone-input__bl_19pfu","bm":"intl-phone-input__bm_19pfu","bn":"intl-phone-input__bn_19pfu","bo":"intl-phone-input__bo_19pfu","bq":"intl-phone-input__bq_19pfu","br":"intl-phone-input__br_19pfu","bs":"intl-phone-input__bs_19pfu","bt":"intl-phone-input__bt_19pfu","bv":"intl-phone-input__bv_19pfu","bw":"intl-phone-input__bw_19pfu","by":"intl-phone-input__by_19pfu","bz":"intl-phone-input__bz_19pfu","ca":"intl-phone-input__ca_19pfu","cc":"intl-phone-input__cc_19pfu","cd":"intl-phone-input__cd_19pfu","cf":"intl-phone-input__cf_19pfu","cg":"intl-phone-input__cg_19pfu","ch":"intl-phone-input__ch_19pfu","ci":"intl-phone-input__ci_19pfu","ck":"intl-phone-input__ck_19pfu","cl":"intl-phone-input__cl_19pfu","cm":"intl-phone-input__cm_19pfu","cn":"intl-phone-input__cn_19pfu","co":"intl-phone-input__co_19pfu","cp":"intl-phone-input__cp_19pfu","cr":"intl-phone-input__cr_19pfu","cu":"intl-phone-input__cu_19pfu","cv":"intl-phone-input__cv_19pfu","cw":"intl-phone-input__cw_19pfu","cx":"intl-phone-input__cx_19pfu","cy":"intl-phone-input__cy_19pfu","cz":"intl-phone-input__cz_19pfu","de":"intl-phone-input__de_19pfu","dg":"intl-phone-input__dg_19pfu","dj":"intl-phone-input__dj_19pfu","dk":"intl-phone-input__dk_19pfu","dm":"intl-phone-input__dm_19pfu","do":"intl-phone-input__do_19pfu","dz":"intl-phone-input__dz_19pfu","ea":"intl-phone-input__ea_19pfu","ec":"intl-phone-input__ec_19pfu","ee":"intl-phone-input__ee_19pfu","eg":"intl-phone-input__eg_19pfu","eh":"intl-phone-input__eh_19pfu","er":"intl-phone-input__er_19pfu","es":"intl-phone-input__es_19pfu","et":"intl-phone-input__et_19pfu","eu":"intl-phone-input__eu_19pfu","fi":"intl-phone-input__fi_19pfu","fj":"intl-phone-input__fj_19pfu","fk":"intl-phone-input__fk_19pfu","fm":"intl-phone-input__fm_19pfu","fo":"intl-phone-input__fo_19pfu","fr":"intl-phone-input__fr_19pfu","ga":"intl-phone-input__ga_19pfu","gb":"intl-phone-input__gb_19pfu","gd":"intl-phone-input__gd_19pfu","ge":"intl-phone-input__ge_19pfu","gf":"intl-phone-input__gf_19pfu","gg":"intl-phone-input__gg_19pfu","gh":"intl-phone-input__gh_19pfu","gi":"intl-phone-input__gi_19pfu","gl":"intl-phone-input__gl_19pfu","gm":"intl-phone-input__gm_19pfu","gn":"intl-phone-input__gn_19pfu","gp":"intl-phone-input__gp_19pfu","gq":"intl-phone-input__gq_19pfu","gr":"intl-phone-input__gr_19pfu","gs":"intl-phone-input__gs_19pfu","gt":"intl-phone-input__gt_19pfu","gu":"intl-phone-input__gu_19pfu","gw":"intl-phone-input__gw_19pfu","gy":"intl-phone-input__gy_19pfu","hk":"intl-phone-input__hk_19pfu","hm":"intl-phone-input__hm_19pfu","hn":"intl-phone-input__hn_19pfu","hr":"intl-phone-input__hr_19pfu","ht":"intl-phone-input__ht_19pfu","hu":"intl-phone-input__hu_19pfu","ic":"intl-phone-input__ic_19pfu","id":"intl-phone-input__id_19pfu","ie":"intl-phone-input__ie_19pfu","il":"intl-phone-input__il_19pfu","im":"intl-phone-input__im_19pfu","in":"intl-phone-input__in_19pfu","io":"intl-phone-input__io_19pfu","iq":"intl-phone-input__iq_19pfu","ir":"intl-phone-input__ir_19pfu","is":"intl-phone-input__is_19pfu","it":"intl-phone-input__it_19pfu","je":"intl-phone-input__je_19pfu","jm":"intl-phone-input__jm_19pfu","jo":"intl-phone-input__jo_19pfu","jp":"intl-phone-input__jp_19pfu","ke":"intl-phone-input__ke_19pfu","kg":"intl-phone-input__kg_19pfu","kh":"intl-phone-input__kh_19pfu","ki":"intl-phone-input__ki_19pfu","km":"intl-phone-input__km_19pfu","kn":"intl-phone-input__kn_19pfu","kp":"intl-phone-input__kp_19pfu","kr":"intl-phone-input__kr_19pfu","kw":"intl-phone-input__kw_19pfu","ky":"intl-phone-input__ky_19pfu","kz":"intl-phone-input__kz_19pfu","la":"intl-phone-input__la_19pfu","lb":"intl-phone-input__lb_19pfu","lc":"intl-phone-input__lc_19pfu","li":"intl-phone-input__li_19pfu","lk":"intl-phone-input__lk_19pfu","lr":"intl-phone-input__lr_19pfu","ls":"intl-phone-input__ls_19pfu","lt":"intl-phone-input__lt_19pfu","lu":"intl-phone-input__lu_19pfu","lv":"intl-phone-input__lv_19pfu","ly":"intl-phone-input__ly_19pfu","ma":"intl-phone-input__ma_19pfu","mc":"intl-phone-input__mc_19pfu","md":"intl-phone-input__md_19pfu","me":"intl-phone-input__me_19pfu","mf":"intl-phone-input__mf_19pfu","mg":"intl-phone-input__mg_19pfu","mh":"intl-phone-input__mh_19pfu","mk":"intl-phone-input__mk_19pfu","ml":"intl-phone-input__ml_19pfu","mm":"intl-phone-input__mm_19pfu","mn":"intl-phone-input__mn_19pfu","mo":"intl-phone-input__mo_19pfu","mp":"intl-phone-input__mp_19pfu","mq":"intl-phone-input__mq_19pfu","mr":"intl-phone-input__mr_19pfu","ms":"intl-phone-input__ms_19pfu","mt":"intl-phone-input__mt_19pfu","mu":"intl-phone-input__mu_19pfu","mv":"intl-phone-input__mv_19pfu","mw":"intl-phone-input__mw_19pfu","mx":"intl-phone-input__mx_19pfu","my":"intl-phone-input__my_19pfu","mz":"intl-phone-input__mz_19pfu","na":"intl-phone-input__na_19pfu","nc":"intl-phone-input__nc_19pfu","ne":"intl-phone-input__ne_19pfu","nf":"intl-phone-input__nf_19pfu","ng":"intl-phone-input__ng_19pfu","ni":"intl-phone-input__ni_19pfu","nl":"intl-phone-input__nl_19pfu","no":"intl-phone-input__no_19pfu","np":"intl-phone-input__np_19pfu","nr":"intl-phone-input__nr_19pfu","nu":"intl-phone-input__nu_19pfu","nz":"intl-phone-input__nz_19pfu","om":"intl-phone-input__om_19pfu","pa":"intl-phone-input__pa_19pfu","pe":"intl-phone-input__pe_19pfu","pf":"intl-phone-input__pf_19pfu","pg":"intl-phone-input__pg_19pfu","ph":"intl-phone-input__ph_19pfu","pk":"intl-phone-input__pk_19pfu","pl":"intl-phone-input__pl_19pfu","pm":"intl-phone-input__pm_19pfu","pn":"intl-phone-input__pn_19pfu","pr":"intl-phone-input__pr_19pfu","ps":"intl-phone-input__ps_19pfu","pt":"intl-phone-input__pt_19pfu","pw":"intl-phone-input__pw_19pfu","py":"intl-phone-input__py_19pfu","qa":"intl-phone-input__qa_19pfu","re":"intl-phone-input__re_19pfu","ro":"intl-phone-input__ro_19pfu","rs":"intl-phone-input__rs_19pfu","ru":"intl-phone-input__ru_19pfu","rw":"intl-phone-input__rw_19pfu","sa":"intl-phone-input__sa_19pfu","sb":"intl-phone-input__sb_19pfu","sc":"intl-phone-input__sc_19pfu","sd":"intl-phone-input__sd_19pfu","se":"intl-phone-input__se_19pfu","sg":"intl-phone-input__sg_19pfu","sh":"intl-phone-input__sh_19pfu","si":"intl-phone-input__si_19pfu","sj":"intl-phone-input__sj_19pfu","sk":"intl-phone-input__sk_19pfu","sl":"intl-phone-input__sl_19pfu","sm":"intl-phone-input__sm_19pfu","sn":"intl-phone-input__sn_19pfu","so":"intl-phone-input__so_19pfu","sr":"intl-phone-input__sr_19pfu","ss":"intl-phone-input__ss_19pfu","st":"intl-phone-input__st_19pfu","sv":"intl-phone-input__sv_19pfu","sx":"intl-phone-input__sx_19pfu","sy":"intl-phone-input__sy_19pfu","sz":"intl-phone-input__sz_19pfu","ta":"intl-phone-input__ta_19pfu","tc":"intl-phone-input__tc_19pfu","td":"intl-phone-input__td_19pfu","tf":"intl-phone-input__tf_19pfu","tg":"intl-phone-input__tg_19pfu","th":"intl-phone-input__th_19pfu","tj":"intl-phone-input__tj_19pfu","tk":"intl-phone-input__tk_19pfu","tl":"intl-phone-input__tl_19pfu","tm":"intl-phone-input__tm_19pfu","tn":"intl-phone-input__tn_19pfu","to":"intl-phone-input__to_19pfu","tr":"intl-phone-input__tr_19pfu","tt":"intl-phone-input__tt_19pfu","tv":"intl-phone-input__tv_19pfu","tw":"intl-phone-input__tw_19pfu","tz":"intl-phone-input__tz_19pfu","ua":"intl-phone-input__ua_19pfu","ug":"intl-phone-input__ug_19pfu","um":"intl-phone-input__um_19pfu","un":"intl-phone-input__un_19pfu","us":"intl-phone-input__us_19pfu","uy":"intl-phone-input__uy_19pfu","uz":"intl-phone-input__uz_19pfu","va":"intl-phone-input__va_19pfu","vc":"intl-phone-input__vc_19pfu","ve":"intl-phone-input__ve_19pfu","vg":"intl-phone-input__vg_19pfu","vi":"intl-phone-input__vi_19pfu","vn":"intl-phone-input__vn_19pfu","vu":"intl-phone-input__vu_19pfu","wf":"intl-phone-input__wf_19pfu","ws":"intl-phone-input__ws_19pfu","xk":"intl-phone-input__xk_19pfu","ye":"intl-phone-input__ye_19pfu","yt":"intl-phone-input__yt_19pfu","za":"intl-phone-input__za_19pfu","zm":"intl-phone-input__zm_19pfu","zw":"intl-phone-input__zw_19pfu"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
/**
|