@gravityforms/components
Version:
UI components for use in Gravity Forms development. Both React and vanilla js flavors.
18 lines (16 loc) • 108 kB
JavaScript
"use strict";
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
(self["webpackChunkgravityforms"] = self["webpackChunkgravityforms"] || []).push([["components_react_admin_modules_Phone_PhoneComponent_js"],{
/***/ "../components/react/admin/modules/Phone/PhoneComponent.js":
/*!*****************************************************************************!*\
!*** ../components/react/admin/modules/Phone/PhoneComponent.js + 2 modules ***!
\*****************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
eval("// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ Phone_PhoneComponent; },\n getCountriesList: function() { return /* binding */ getCountriesList; }\n});\n\n// EXTERNAL MODULE: ../../../node_modules/@babel/runtime/helpers/esm/extends.js\nvar esm_extends = __webpack_require__(\"../../../node_modules/@babel/runtime/helpers/esm/extends.js\");\n// EXTERNAL MODULE: ../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\nvar defineProperty = __webpack_require__(\"../../../node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n// EXTERNAL MODULE: ../../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules\nvar slicedToArray = __webpack_require__(\"../../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n// EXTERNAL MODULE: external [\"gform\",\"libraries\"]\nvar external_gform_libraries_ = __webpack_require__(\"@gravityforms/libraries\");\n// EXTERNAL MODULE: external [\"gform\",\"utils\",\"react\"]\nvar external_gform_utils_react_ = __webpack_require__(\"@gravityforms/react-utils\");\n// EXTERNAL MODULE: external [\"gform\",\"utils\"]\nvar external_gform_utils_ = __webpack_require__(\"@gravityforms/utils\");\n// EXTERNAL MODULE: ../../../node_modules/libphonenumber-js/examples.mobile.json.js\nvar examples_mobile_json = __webpack_require__(\"../../../node_modules/libphonenumber-js/examples.mobile.json.js\");\n// EXTERNAL MODULE: ../../../node_modules/libphonenumber-js/min/exports/getExampleNumber.js + 2 modules\nvar getExampleNumber = __webpack_require__(\"../../../node_modules/libphonenumber-js/min/exports/getExampleNumber.js\");\n// EXTERNAL MODULE: ../components/react/admin/modules/Dropdown/index.js + 5 modules\nvar Dropdown = __webpack_require__(\"../components/react/admin/modules/Dropdown/index.js\");\n// EXTERNAL MODULE: ../components/react/admin/modules/Dropdown/utils.js\nvar utils = __webpack_require__(\"../components/react/admin/modules/Dropdown/utils.js\");\n// EXTERNAL MODULE: ../components/react/admin/elements/HelpText/index.js\nvar HelpText = __webpack_require__(\"../components/react/admin/elements/HelpText/index.js\");\n// EXTERNAL MODULE: ../components/react/admin/elements/Input/index.js\nvar Input = __webpack_require__(\"../components/react/admin/elements/Input/index.js\");\n;// ../components/react/admin/modules/Phone/utils.js\n\n\n\n/**\n * @function getId\n * @description Get the id from the prefix and key provided.\n *\n * @since 5.5.0\n *\n * @param {string} prefix The id prefix.\n * @param {string} key The id key.\n *\n * @return {string} The id.\n */\nvar getId = function getId(prefix, key) {\n return (0,external_gform_utils_.slugify)(\"\".concat(prefix, \"-\").concat(key));\n};\n\n/**\n * @function convertGeodataToPhoneListItems\n * @description Convert the countries data to phone list items.\n *\n * @since 5.5.0\n *\n * @param {Array} countries The countries data.\n *\n * @return {Array} The augmented countries data.\n */\nvar convertGeodataToPhoneListItems = function convertGeodataToPhoneListItems(countries) {\n return countries.map(function (country) {\n var iso = country.iso,\n name = country.name,\n callingCode = country.calling_code,\n flag = country.flag;\n var fullCallingCode = \"+\".concat(callingCode);\n return {\n searchValue: \"\".concat(name, \" \").concat(fullCallingCode, \" \").concat(iso),\n label: name,\n value: iso,\n beforeLabel: /*#__PURE__*/external_gform_libraries_.React.createElement(\"span\", {\n className: \"gform-phone__flag-icon\"\n }, flag),\n afterLabel: /*#__PURE__*/external_gform_libraries_.React.createElement(\"span\", {\n className: \"gform-phone__country-code\"\n }, fullCallingCode)\n };\n });\n};\n\n/**\n * @function e164ToNumber\n * @description Convert an E.164 formatted phone number to a number.\n *\n * @since 5.5.0\n *\n * @throws {TypeError} If the input is not a string.\n *\n * @param {string} e164 The E.164 formatted phone number.\n *\n * @return {string} The phone number.\n */\nvar e164ToNumber = function e164ToNumber(e164) {\n if (typeof e164 !== 'string') {\n throw new TypeError('Input must be a string');\n }\n return e164.replace(/^\\+/, '');\n};\n\n/**\n * @function numberToE164\n * @description Convert a phone number to E.164 format.\n *\n * @since 5.5.0\n *\n * @throws {TypeError} If the input is not a string.\n *\n * @param {string} number The phone number.\n *\n * @return {string} The E.164 formatted phone number.\n */\nvar numberToE164 = function numberToE164(number) {\n if (typeof number !== 'string') {\n throw new TypeError('Input must be a string');\n }\n return number.startsWith('+') ? number : \"+\".concat(number);\n};\n// EXTERNAL MODULE: ../../../node_modules/input-format/modules/parseDigit.js\nvar parseDigit = __webpack_require__(\"../../../node_modules/input-format/modules/parseDigit.js\");\n// EXTERNAL MODULE: ../../../node_modules/input-format/modules/templateParser.js\nvar templateParser = __webpack_require__(\"../../../node_modules/input-format/modules/templateParser.js\");\n// EXTERNAL MODULE: ../../../node_modules/input-format/modules/parse.js\nvar parse = __webpack_require__(\"../../../node_modules/input-format/modules/parse.js\");\n// EXTERNAL MODULE: ../../../node_modules/input-format/modules/templateFormatter.js + 1 modules\nvar templateFormatter = __webpack_require__(\"../../../node_modules/input-format/modules/templateFormatter.js\");\n// EXTERNAL MODULE: ../../../node_modules/input-format/modules/format.js\nvar format = __webpack_require__(\"../../../node_modules/input-format/modules/format.js\");\n// EXTERNAL MODULE: ../../../node_modules/libphonenumber-js/min/exports/AsYouType.js + 16 modules\nvar AsYouType = __webpack_require__(\"../../../node_modules/libphonenumber-js/min/exports/AsYouType.js\");\n;// ../components/react/admin/modules/Phone/input-format-utils.js\n\n\nvar ANDROID_USER_AGENT_REG_EXP = /Android/i;\n\n/**\n * @function isAndroid\n * @description Checks if the user agent is Android.\n * Copied from the original function `isAndroid` from `input-format` package.\n * The original function is not exported, so it was copied here.\n *\n * @since 5.5.0\n *\n * @return {boolean} Whether the user agent is Android.\n */\nvar isAndroid = function isAndroid() {\n // `navigator` is not defined when running mocha tests.\n if (typeof navigator !== 'undefined') {\n return ANDROID_USER_AGENT_REG_EXP.test(navigator.userAgent);\n }\n};\n\n/**\n * @function getCaretPosition\n * @description Gets the caret position.\n * Copied from the original function `getCaretPosition` from `input-format` package.\n * The original function is not exported, so it was copied here.\n *\n * @since 5.5.0\n *\n * @param {HTMLElement} element The element to get the caret position from.\n *\n * @return {number} The caret position.\n */\nvar getCaretPosition = function getCaretPosition(element) {\n return element.selectionStart;\n};\n\n/**\n * @function setCaretPosition\n * @description Sets the caret position.\n * Copied from the original function `setCaretPosition` from `input-format` package.\n * The original function is not exported, so it was copied here.\n *\n * @since 5.5.0\n *\n * @param {HTMLElement} element The element to set the caret position on.\n * @param {number} caretPosition The caret position to set.\n */\nvar setCaretPosition = function setCaretPosition(element, caretPosition) {\n // Sanity check\n if (caretPosition === undefined) {\n return;\n }\n\n // Set caret position.\n // There has been an issue with caret positioning on Android devices.\n // https://github.com/catamphetamine/input-format/issues/2\n // I was revisiting this issue and looked for similar issues in other libraries.\n // For example, there's [`text-mask`](https://github.com/text-mask/text-mask) library.\n // They've had exactly the same issue when the caret seemingly refused to be repositioned programmatically.\n // The symptoms were the same: whenever the caret passed through a non-digit character of a mask (a whitespace, a bracket, a dash, etc), it looked as if it placed itself one character before its correct position.\n // https://github.com/text-mask/text-mask/issues/300\n // They seem to have found a basic fix for it: calling `input.setSelectionRange()` in a timeout rather than instantly for Android devices.\n // https://github.com/text-mask/text-mask/pull/400/files\n // I've implemented the same workaround here.\n if (isAndroid()) {\n setTimeout(function () {\n return element.setSelectionRange(caretPosition, caretPosition);\n }, 0);\n } else {\n element.setSelectionRange(caretPosition, caretPosition);\n }\n};\n\n/**\n * @function edit\n * @description Edits text based on the operation.\n * Copied from the original function `edit` from `input-format` package.\n * The original function is not exported, so it was copied here.\n *\n * @param {string} value The value to edit.\n * @param {number} caret The caret position.\n * @param {string} operation The operation to perform, one of `Backspace` or `Delete`.\n *\n * @return {object} The edited value and the caret position.\n */\nvar edit = function edit(value, caret, operation) {\n // Edits text `value` (if `operation` is passed) and repositions the `caret` if needed.\n //\n // Example:\n //\n // value - '88005553535'\n // caret - 2 // starting from 0; is positioned before the first zero\n // operation - 'Backspace'\n //\n // Returns\n // {\n // \tvalue: '8005553535'\n // \tcaret: 1\n // }\n //\n // Currently supports just 'Delete' and 'Backspace' operations\n //\n switch (operation) {\n case 'Backspace':\n // If there exists the previous character,\n // then erase it and reposition the caret.\n if (caret > 0) {\n // Remove the previous character\n value = value.slice(0, caret - 1) + value.slice(caret);\n // Position the caret where the previous (erased) character was\n caret--;\n }\n break;\n case 'Delete':\n // Remove current digit (if any)\n value = value.slice(0, caret) + value.slice(caret + 1);\n break;\n }\n return {\n value: value,\n caret: caret\n };\n};\n\n/**\n * @function parseDigitWithPlus\n * @description Parses a digit with a plus sign.\n *\n * @since 5.5.0\n *\n * @param {boolean} international Whether the phone number is in international format.\n *\n * @return {Function} The function to parse a digit with a plus sign.\n */\nvar parseDigitWithPlus = function parseDigitWithPlus(international) {\n return function (character, value) {\n // Leading plus is allowed\n if (international && character === '+' && !value) {\n return character;\n }\n // Digits are allowed\n return (0,parseDigit[\"default\"])(character);\n };\n};\n\n/**\n * @function getFormattedInputText\n * @description Gets the formatted input text.\n * Modified from the original function `formatInputText` from `input-format` package.\n *\n * @since 5.5.0\n *\n * @param {string} inputValue The input value.\n * @param {number} caretPosition The caret position.\n * @param {string} country The country code.\n * @param {boolean} international Whether the phone number is in international format.\n * @param {string|undefined} operation The operation to perform, one of `Backspace` or `Delete`.\n *\n * @return {object} The formatted input text, caret position, and the AsYouType instance.\n */\nvar getFormattedInputText = function getFormattedInputText(inputValue, caretPosition, country, international, operation) {\n var asYouType = new AsYouType.AsYouType(country);\n asYouType.input(inputValue);\n var parser = (0,templateParser[\"default\"])(asYouType.getTemplate(), parseDigitWithPlus(international));\n\n // Parse input value.\n // Get the `value` and `caret` position.\n var _parse = (0,parse[\"default\"])(inputValue, caretPosition, parser),\n value = _parse.value,\n caret = _parse.caret;\n\n // If a user performed an operation (\"Backspace\", \"Delete\")\n // then apply that operation and get the new `value` and `caret` position.\n if (operation) {\n var newValueAndCaret = edit(value, caret, operation);\n value = newValueAndCaret.value;\n caret = newValueAndCaret.caret;\n }\n asYouType.reset();\n asYouType.input(value);\n var formatter = (0,templateFormatter[\"default\"])(asYouType.getTemplate(), 'x', true);\n\n // Format the `value` and reposition the caret accordingly.\n return {\n asYouType: asYouType,\n formatted: (0,format[\"default\"])(value, caret, formatter)\n };\n};\n\n/**\n * @function getTextAfterEraseSelection\n * @description Gets the text after erasing the selection.\n * Modified from the original function `eraseSelection` from `input-format` package.\n * The original function is not exported, so it was copied here.\n *\n * @since 5.5.0\n *\n * @param {string} text The text to erase the selection from.\n * @param {object} selection The selection to erase. The selection is an object with `start` and `end` properties.\n *\n * @return {string} The text after erasing the selection.\n */\nvar getTextAfterEraseSelection = function getTextAfterEraseSelection(text, selection) {\n var start = Math.min(selection.start, selection.end);\n var end = Math.max(selection.start, selection.end);\n return text.slice(0, start) + text.slice(end);\n};\n\n/**\n * @function getSelection\n * @description Gets the selection.\n * Copied from the original function `getSelection` from `input-format` package.\n * The original function is not exported, so it was copied here.\n *\n * @since 5.5.0\n *\n * @param {HTMLElement} input The input element.\n *\n * @return {object|undefined} The selection object with `start` and `end` properties.\n */\nvar getSelection = function getSelection(input) {\n // If no selection, return nothing\n if (input.selectionStart === input.selectionEnd) {\n return;\n }\n var start = Math.min(input.selectionStart, input.selectionEnd);\n var end = Math.max(input.selectionStart, input.selectionEnd);\n return {\n start: start,\n end: end\n };\n};\n;// ../components/react/admin/modules/Phone/PhoneComponent.js\n\n\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,defineProperty[\"default\"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\nvar useEffect = external_gform_libraries_.React.useEffect,\n useRef = external_gform_libraries_.React.useRef,\n useState = external_gform_libraries_.React.useState,\n forwardRef = external_gform_libraries_.React.forwardRef;\nvar INPUT_SELECTOR = '.gform-input';\nvar DROPDOWN_TRIGGER_SELECTOR = '.gform-dropdown__trigger';\nvar BORDER_STYLE_DEFAULT = 'default';\nvar BORDER_STYLE_ERROR = 'error';\nvar BORDER_STYLE_CORRECT = 'correct';\n\n/**\n * @function getCountriesList\n * @description Get the list of countries to display in the dropdown.\n * If preferredCountries is empty, return the list as is.\n * If preferredCountries is not empty, split the list into preferred and remaining countries.\n *\n * @since 5.5.0\n *\n * @param {Array} listItems List of countries.\n * @param {Array} preferredCountries List of preferred countries.\n * @param {object} i18n i18n object.\n *\n * @return {Array} List of countries.\n */\nvar getCountriesList = function getCountriesList(listItems, preferredCountries, i18n) {\n if (preferredCountries.length === 0) {\n return listItems;\n }\n var countryMap = new Map();\n listItems.forEach(function (item) {\n countryMap.set(item.value, item);\n });\n\n // Process the preferred countries in their specified order.\n var preferred = [];\n var usedISOs = new Set();\n preferredCountries.forEach(function (country) {\n var iso = typeof country === 'string' ? country : (country === null || country === void 0 ? void 0 : country.value) || (country === null || country === void 0 ? void 0 : country.iso);\n if (iso && countryMap.has(iso) && !usedISOs.has(iso)) {\n preferred.push(countryMap.get(iso));\n usedISOs.add(iso);\n }\n });\n\n // If no preferred countries were found, return the list as is.\n if (preferred.length === 0) {\n return listItems;\n }\n var remaining = listItems.filter(function (item) {\n return !usedISOs.has(item.value);\n });\n\n // If no remaining countries were found, return the preferred list.\n if (remaining.length === 0) {\n return preferred;\n }\n return [{\n type: 'group',\n items: preferred\n }, {\n type: 'group',\n label: {\n type: 'groupLabel',\n label: i18n.allCountries\n },\n items: remaining\n }];\n};\nvar PhoneComponent = forwardRef(function (props, ref) {\n var customAttributes = props.customAttributes,\n customClasses = props.customClasses,\n disabled = props.disabled,\n dropdownAttributes = props.dropdownAttributes,\n dropdownClasses = props.dropdownClasses,\n helpTextAttributes = props.helpTextAttributes,\n helpTextClasses = props.helpTextClasses,\n i18n = props.i18n,\n inputAttributes = props.inputAttributes,\n inputClasses = props.inputClasses,\n international = props.international,\n label = props.label,\n labelAttributes = props.labelAttributes,\n labelClasses = props.labelClasses,\n onChange = props.onChange,\n preferredCountries = props.preferredCountries,\n required = props.required,\n requiredLabelAttributes = props.requiredLabelAttributes,\n requiredLabelClasses = props.requiredLabelClasses,\n size = props.size,\n spacing = props.spacing,\n usePlaceholder = props.usePlaceholder,\n useValidation = props.useValidation,\n width = props.width;\n\n // Refs\n var internalRef = useRef(null);\n var wrapperRef = ref || internalRef;\n var dropdownRef = useRef(null);\n var inputRef = useRef(null);\n var phoneInputRef = useRef(null);\n var id = (0,external_gform_utils_react_.useIdContext)();\n var _useState = useState(function () {\n var _dropdownAttributes$l2;\n if (dropdownAttributes !== null && dropdownAttributes !== void 0 && dropdownAttributes.initialValue) {\n return (0,utils.getSelectedItemFromValue)(dropdownAttributes === null || dropdownAttributes === void 0 ? void 0 : dropdownAttributes.initialValue, (dropdownAttributes === null || dropdownAttributes === void 0 ? void 0 : dropdownAttributes.listItems) || [], false);\n }\n if (preferredCountries.length) {\n var _preferred$, _dropdownAttributes$l;\n var preferred = getCountriesList(dropdownAttributes === null || dropdownAttributes === void 0 ? void 0 : dropdownAttributes.listItems, preferredCountries, i18n);\n if ((preferred === null || preferred === void 0 || (_preferred$ = preferred[0]) === null || _preferred$ === void 0 ? void 0 : _preferred$.type) === 'group') {\n var _preferred$2;\n return (preferred === null || preferred === void 0 || (_preferred$2 = preferred[0]) === null || _preferred$2 === void 0 || (_preferred$2 = _preferred$2.items) === null || _preferred$2 === void 0 ? void 0 : _preferred$2[0]) || {};\n }\n return dropdownAttributes === null || dropdownAttributes === void 0 || (_dropdownAttributes$l = dropdownAttributes.listItems) === null || _dropdownAttributes$l === void 0 ? void 0 : _dropdownAttributes$l[0];\n }\n if (dropdownAttributes !== null && dropdownAttributes !== void 0 && (_dropdownAttributes$l2 = dropdownAttributes.listItems) !== null && _dropdownAttributes$l2 !== void 0 && _dropdownAttributes$l2[0]) {\n var _dropdownAttributes$l3;\n return dropdownAttributes === null || dropdownAttributes === void 0 || (_dropdownAttributes$l3 = dropdownAttributes.listItems) === null || _dropdownAttributes$l3 === void 0 ? void 0 : _dropdownAttributes$l3[0];\n }\n return {};\n }),\n _useState2 = (0,slicedToArray[\"default\"])(_useState, 2),\n country = _useState2[0],\n setCountry = _useState2[1];\n var _useState3 = useState(function () {\n if (inputAttributes !== null && inputAttributes !== void 0 && inputAttributes.value) {\n var _getFormattedInputTex = getFormattedInputText(inputAttributes === null || inputAttributes === void 0 ? void 0 : inputAttributes.value, 0, country === null || country === void 0 ? void 0 : country.value, international),\n asYouType = _getFormattedInputTex.asYouType,\n formatted = _getFormattedInputTex.formatted;\n return {\n asYouType: asYouType,\n chars: (asYouType === null || asYouType === void 0 ? void 0 : asYouType.getChars()) || '',\n value: formatted.text,\n numberValue: (asYouType === null || asYouType === void 0 ? void 0 : asYouType.getNumberValue()) || ''\n };\n }\n return {\n asYouType: null,\n chars: '',\n value: '',\n numberValue: ''\n };\n }),\n _useState4 = (0,slicedToArray[\"default\"])(_useState3, 2),\n phoneNumber = _useState4[0],\n setPhoneNumber = _useState4[1];\n var _useState5 = useState(BORDER_STYLE_DEFAULT),\n _useState6 = (0,slicedToArray[\"default\"])(_useState5, 2),\n borderStyle = _useState6[0],\n setBorderStyle = _useState6[1];\n\n // Set phoneInputRef.\n useEffect(function () {\n if (!inputRef.current) {\n return;\n }\n if (phoneInputRef.current === inputRef.current.querySelector(INPUT_SELECTOR)) {\n return;\n }\n phoneInputRef.current = inputRef.current.querySelector(INPUT_SELECTOR);\n }, [inputRef, phoneInputRef]);\n\n /**\n * @function getPlaceholder\n * @description Get the placeholder text for the input.\n *\n * @since 5.5.0\n *\n * @return {string|undefined} Placeholder text.\n */\n var getPlaceholder = function getPlaceholder() {\n if (!usePlaceholder) {\n return undefined;\n }\n var exampleNumber = (0,getExampleNumber.getExampleNumber)(country === null || country === void 0 ? void 0 : country.value, examples_mobile_json[\"default\"]);\n if (!exampleNumber) {\n return undefined;\n }\n return international ? exampleNumber.formatInternational() : exampleNumber.formatNational();\n };\n\n /**\n * @function validatePhoneNumber\n * @description Validate the phone number.\n *\n * @since 5.5.0\n *\n */\n var validatePhoneNumber = function validatePhoneNumber() {\n // If validation is disabled, return early.\n if (!useValidation) {\n if (borderStyle !== BORDER_STYLE_DEFAULT) {\n setBorderStyle(BORDER_STYLE_DEFAULT);\n }\n return;\n }\n var asYouType = phoneNumber.asYouType,\n numberValue = phoneNumber.numberValue;\n var isPossible = asYouType === null || asYouType === void 0 ? void 0 : asYouType.isPossible();\n if (numberValue) {\n setBorderStyle(isPossible ? BORDER_STYLE_CORRECT : BORDER_STYLE_ERROR);\n } else {\n setBorderStyle(BORDER_STYLE_DEFAULT);\n }\n };\n\n /**\n * @function onCountryChange\n * @description Handle country change.\n *\n * @since 5.5.0\n *\n * @param {Event} event The event object.\n * @param {object} value The selected country object.\n */\n var onCountryChange = function onCountryChange(event, value) {\n setCountry(value);\n var _getFormattedInputTex2 = getFormattedInputText(phoneNumber.chars, 0, value === null || value === void 0 ? void 0 : value.value, international),\n asYouType = _getFormattedInputTex2.asYouType,\n formatted = _getFormattedInputTex2.formatted;\n var numberValue = (asYouType === null || asYouType === void 0 ? void 0 : asYouType.getNumberValue()) || '';\n setPhoneNumber({\n asYouType: asYouType,\n chars: (asYouType === null || asYouType === void 0 ? void 0 : asYouType.getChars()) || '',\n value: formatted.text,\n numberValue: numberValue\n });\n var changeValue = {\n country: value === null || value === void 0 ? void 0 : value.value,\n number: numberValue\n };\n onChange(changeValue, event);\n\n // Validate phone number after state updates.\n requestAnimationFrame(validatePhoneNumber);\n };\n\n /**\n * @function handleInputChange\n * @description Input change handler.\n *\n * @since 5.5.0\n *\n * @param {string} value The input value.\n * @param {string|undefined} operation The operation to perform.\n * @param {Event} event The event object.\n */\n var handleInputChange = function handleInputChange(value, operation, event) {\n var phoneInput = phoneInputRef.current;\n var caretPosition = getCaretPosition(phoneInput);\n var _getFormattedInputTex3 = getFormattedInputText(value, caretPosition, country === null || country === void 0 ? void 0 : country.value, international, operation),\n asYouType = _getFormattedInputTex3.asYouType,\n formatted = _getFormattedInputTex3.formatted;\n var numberValue = (asYouType === null || asYouType === void 0 ? void 0 : asYouType.getNumberValue()) || '';\n setPhoneNumber({\n asYouType: asYouType,\n chars: (asYouType === null || asYouType === void 0 ? void 0 : asYouType.getChars()) || '',\n value: formatted.text,\n numberValue: numberValue\n });\n var changeValue = {\n country: country === null || country === void 0 ? void 0 : country.value,\n number: numberValue\n };\n\n // requestAnimationFrame to set caret after rerender.\n requestAnimationFrame(function () {\n setCaretPosition(phoneInput, formatted.caret);\n });\n onChange(changeValue, event);\n };\n\n /**\n * @function onInputChange\n * @description Handle input change.\n *\n * @since 5.5.0\n *\n * @param {string} value The input value.\n * @param {Event} event The event object.\n */\n var onInputChange = function onInputChange(value, event) {\n handleInputChange(value, undefined, event);\n };\n\n /**\n * @function onInputKeyDown\n * @description Handle input key down.\n *\n * @since 5.5.0\n *\n * @param {Event} event The event object.\n */\n var onInputKeyDown = function onInputKeyDown(event) {\n if (inputAttributes !== null && inputAttributes !== void 0 && inputAttributes.onKeyDown) {\n var _inputAttributes$onKe;\n inputAttributes === null || inputAttributes === void 0 || (_inputAttributes$onKe = inputAttributes.onKeyDown) === null || _inputAttributes$onKe === void 0 || _inputAttributes$onKe.call(inputAttributes, event);\n }\n\n // If `onKeyDown()` handler above has called `event.preventDefault()` then ignore this `keydown` event.\n if (event.defaultPrevented) {\n return;\n }\n var phoneInput = phoneInputRef.current;\n if (phoneInput.hasAttribute('readonly')) {\n return;\n }\n var operation = event.key;\n if (!['Backspace', 'Delete'].includes(operation)) {\n return;\n }\n\n // Intercept this operation and perform it manually.\n event.preventDefault();\n var value = phoneInput.value;\n var selection = getSelection(phoneInput);\n\n // If a selection is made, get the text after erasing selection.\n // Else, perform the (character erasing) operation manually.\n var newValue = selection ? getTextAfterEraseSelection(value, selection) : value;\n var newOp = selection ? undefined : operation;\n handleInputChange(newValue, newOp, event);\n };\n\n /**\n * @function onInputBlur\n * @description Handle input blur.\n *\n * @since 5.5.0\n *\n * @param {Event} event The event object.\n */\n var onInputBlur = function onInputBlur(event) {\n if (inputAttributes !== null && inputAttributes !== void 0 && inputAttributes.onBlur) {\n var _inputAttributes$onBl;\n inputAttributes === null || inputAttributes === void 0 || (_inputAttributes$onBl = inputAttributes.onBlur) === null || _inputAttributes$onBl === void 0 || _inputAttributes$onBl.call(inputAttributes, event);\n }\n\n // If `onBlur()` handler above has called `event.preventDefault()` then ignore this `blur` event.\n if (event.defaultPrevented) {\n return;\n }\n validatePhoneNumber();\n };\n\n /**\n * @function onLabelClick\n * @description Handle label click.\n *\n * @since 5.5.0\n *\n */\n var onLabelClick = function onLabelClick() {\n var _dropdownRef$current;\n var dropdownTrigger = dropdownRef === null || dropdownRef === void 0 || (_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : _dropdownRef$current.querySelector(DROPDOWN_TRIGGER_SELECTOR);\n if (dropdownTrigger) {\n dropdownTrigger.focus();\n }\n };\n var helpTextId = getId(id, 'help-text');\n var labelId = getId(id, 'label');\n var componentProps = _objectSpread({\n className: (0,external_gform_libraries_.classnames)(_objectSpread((0,defineProperty[\"default\"])((0,defineProperty[\"default\"])({\n 'gform-phone': true\n }, \"gform-phone--size-\".concat(size), true), 'gform-phone--disabled', disabled), (0,external_gform_utils_.spacerClasses)(spacing)), customClasses),\n id: id,\n style: {\n width: width ? \"\".concat(width, \"px\") : undefined\n }\n }, customAttributes);\n var labelProps = _objectSpread(_objectSpread({\n className: (0,external_gform_libraries_.classnames)(['gform-phone__label', 'gform-text', 'gform-text--color-port', 'gform-typography--size-text-sm', 'gform-typography--weight-medium'], labelClasses)\n }, labelAttributes), {}, {\n id: labelId,\n onClick: onLabelClick\n });\n var requiredLabelProps = _objectSpread(_objectSpread({\n size: 'text-sm',\n weight: 'medium'\n }, requiredLabelAttributes), {}, {\n customClasses: (0,external_gform_libraries_.classnames)(['gform-phone__required'], requiredLabelClasses)\n });\n var dropdownProps = _objectSpread(_objectSpread({\n hasSearch: true,\n popoverMaxHeight: 300\n }, dropdownAttributes), {}, {\n customClasses: (0,external_gform_libraries_.classnames)(['gform-phone__dropdown'], dropdownClasses),\n disabled: disabled,\n id: getId(id, 'dropdown'),\n listItems: getCountriesList(dropdownAttributes === null || dropdownAttributes === void 0 ? void 0 : dropdownAttributes.listItems, preferredCountries, i18n),\n onChange: onCountryChange,\n searchAttributes: _objectSpread({\n wrapperClasses: ['gform-phone__dropdown-search-wrapper']\n }, (dropdownAttributes === null || dropdownAttributes === void 0 ? void 0 : dropdownAttributes.searchAttributes) || {}),\n searchClasses: ['gform-phone__dropdown-search'],\n size: size,\n triggerAttributes: {\n 'aria-labelledby': label ? labelId : undefined\n },\n triggerClasses: ['gform-phone__dropdown-trigger']\n });\n var inputProps = _objectSpread(_objectSpread({}, inputAttributes), {}, {\n borderStyle: borderStyle,\n customAttributes: {\n 'aria-describedby': helpTextAttributes.content && borderStyle === BORDER_STYLE_ERROR ? helpTextId : undefined,\n 'aria-labelledby': label ? labelId : undefined\n },\n customClasses: (0,external_gform_libraries_.classnames)(['gform-phone__input'], inputClasses),\n directControlled: true,\n disabled: disabled,\n id: getId(id, 'input'),\n onBlur: onInputBlur,\n onChange: onInputChange,\n onKeyDown: onInputKeyDown,\n placeholder: getPlaceholder(),\n required: required,\n size: \"size-\".concat(size),\n type: 'tel',\n value: phoneNumber.value,\n wrapperClasses: (0,external_gform_libraries_.classnames)({\n 'gform-phone__input-wrapper': true\n }, (inputAttributes === null || inputAttributes === void 0 ? void 0 : inputAttributes.wrapperClasses) || [])\n });\n var helpTextProps = _objectSpread(_objectSpread({\n size: 'text-xs',\n weight: 'regular'\n }, helpTextAttributes), {}, {\n customClasses: (0,external_gform_libraries_.classnames)(['gform-phone__help-text'], helpTextClasses),\n id: helpTextId\n });\n return /*#__PURE__*/external_gform_libraries_.React.createElement(\"div\", (0,esm_extends[\"default\"])({}, componentProps, {\n ref: wrapperRef\n }), label && /*#__PURE__*/external_gform_libraries_.React.createElement(\"div\", labelProps, label, required && /*#__PURE__*/external_gform_libraries_.React.createElement(HelpText[\"default\"], requiredLabelProps)), /*#__PURE__*/external_gform_libraries_.React.createElement(\"div\", {\n className: \"gform-phone__wrapper\"\n }, /*#__PURE__*/external_gform_libraries_.React.createElement(Dropdown[\"default\"], (0,esm_extends[\"default\"])({}, dropdownProps, {\n ref: dropdownRef\n })), /*#__PURE__*/external_gform_libraries_.React.createElement(Input[\"default\"], (0,esm_extends[\"default\"])({}, inputProps, {\n ref: inputRef\n }))), borderStyle === BORDER_STYLE_ERROR && /*#__PURE__*/external_gform_libraries_.React.createElement(HelpText[\"default\"], helpTextProps));\n});\nPhoneComponent.propTypes = {\n customAttributes: external_gform_libraries_.PropTypes.object,\n customClasses: external_gform_libraries_.PropTypes.oneOfType([external_gform_libraries_.PropTypes.string, external_gform_libraries_.PropTypes.array, external_gform_libraries_.PropTypes.object]),\n disabled: external_gform_libraries_.PropTypes.bool,\n dropdownAttributes: external_gform_libraries_.PropTypes.object,\n dropdownClasses: external_gform_libraries_.PropTypes.oneOfType([external_gform_libraries_.PropTypes.string, external_gform_libraries_.PropTypes.array, external_gform_libraries_.PropTypes.object]),\n helpTextAttributes: external_gform_libraries_.PropTypes.object,\n helpTextClasses: external_gform_libraries_.PropTypes.oneOfType([external_gform_libraries_.PropTypes.string, external_gform_libraries_.PropTypes.array, external_gform_libraries_.PropTypes.object]),\n i18n: external_gform_libraries_.PropTypes.object,\n id: external_gform_libraries_.PropTypes.string,\n inputAttributes: external_gform_libraries_.PropTypes.object,\n inputClasses: external_gform_libraries_.PropTypes.oneOfType([external_gform_libraries_.PropTypes.string, external_gform_libraries_.PropTypes.array, external_gform_libraries_.PropTypes.object]),\n international: external_gform_libraries_.PropTypes.bool,\n label: external_gform_libraries_.PropTypes.string,\n labelAttributes: external_gform_libraries_.PropTypes.object,\n labelClasses: external_gform_libraries_.PropTypes.oneOfType([external_gform_libraries_.PropTypes.string, external_gform_libraries_.PropTypes.array, external_gform_libraries_.PropTypes.object]),\n onChange: external_gform_libraries_.PropTypes.func,\n preferredCountries: external_gform_libraries_.PropTypes.array,\n required: external_gform_libraries_.PropTypes.bool,\n requiredLabelAttributes: external_gform_libraries_.PropTypes.object,\n requiredLabelClasses: external_gform_libraries_.PropTypes.oneOfType([external_gform_libraries_.PropTypes.string, external_gform_libraries_.PropTypes.array, external_gform_libraries_.PropTypes.object]),\n size: external_gform_libraries_.PropTypes.oneOf(['r', 'l', 'xl']),\n spacing: external_gform_libraries_.PropTypes.oneOfType([external_gform_libraries_.PropTypes.string, external_gform_libraries_.PropTypes.number, external_gform_libraries_.PropTypes.array, external_gform_libraries_.PropTypes.object]),\n usePlaceholder: external_gform_libraries_.PropTypes.bool,\n useValidation: external_gform_libraries_.PropTypes.bool,\n width: external_gform_libraries_.PropTypes.number\n};\nvar PhoneComponentWithId = forwardRef(function (props, ref) {\n var defaultProps = {\n customAttributes: {},\n customClasses: [],\n disabled: false,\n dropdownAttributes: {},\n dropdownClasses: [],\n helpTextAttributes: {},\n helpTextClasses: [],\n i18n: {\n allCountries: 'All countries'\n },\n id: '',\n inputAttributes: {},\n inputClasses: [],\n international: true,\n label: '',\n labelAttributes: {},\n labelClasses: [],\n onChange: function onChange() {},\n preferredCountries: [],\n required: false,\n requiredLabelAttributes: {},\n requiredLabelClasses: [],\n size: 'r',\n spacing: '',\n usePlaceholder: true,\n useValidation: false,\n width: 300\n };\n var combinedProps = _objectSpread(_objectSpread({}, defaultProps), props);\n var idProp = combinedProps.id;\n var idProviderProps = {\n id: idProp\n };\n return /*#__PURE__*/external_gform_libraries_.React.createElement(external_gform_utils_react_.IdProvider, idProviderProps, /*#__PURE__*/external_gform_libraries_.React.createElement(PhoneComponent, (0,esm_extends[\"default\"])({}, combinedProps, {\n ref: ref\n })));\n});\n/* harmony default export */ var Phone_PhoneComponent = (PhoneComponentWithId);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vY29tcG9uZW50cy9yZWFjdC9hZG1pbi9tb2R1bGVzL1Bob25lL1Bob25lQ29tcG9uZW50LmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBZ0Q7QUFDRjs7QUFFOUM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNPLElBQU1FLEtBQUssR0FBRyxTQUFSQSxLQUFLQSxDQUFLQyxNQUFNLEVBQUVDLEdBQUc7RUFBQSxPQUFNSCxpQ0FBTyxJQUFBSSxNQUFBLENBQU1GLE1BQU0sT0FBQUUsTUFBQSxDQUFNRCxHQUFHLENBQUksQ0FBQztBQUFBOztBQUV6RTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUF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