@kingteza/crud-component 1.22.2 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjsHelpers.cjs.js +1 -0
- package/dist/_virtual/_commonjsHelpers.es.js +6 -0
- package/dist/_virtual/index.cjs.js +1 -0
- package/dist/_virtual/index.cjs2.js +1 -0
- package/dist/_virtual/index.cjs3.js +1 -0
- package/dist/_virtual/index.cjs4.js +1 -0
- package/dist/_virtual/index.cjs5.js +1 -0
- package/dist/_virtual/index.es.js +7 -0
- package/dist/_virtual/index.es2.js +7 -0
- package/dist/_virtual/index.es3.js +4 -0
- package/dist/_virtual/index.es4.js +4 -0
- package/dist/_virtual/index.es5.js +4 -0
- package/dist/_virtual/react-is.development.cjs.js +1 -0
- package/dist/_virtual/react-is.development.es.js +4 -0
- package/dist/_virtual/react-is.production.min.cjs.js +1 -0
- package/dist/_virtual/react-is.production.min.es.js +4 -0
- package/dist/common/text-field/PhoneNumberField.cjs.js +1 -1
- package/dist/common/text-field/PhoneNumberField.d.ts +9 -1
- package/dist/common/text-field/PhoneNumberField.es.js +70 -15
- package/dist/common/text-field/index.d.ts +1 -0
- package/dist/crud/CrudComponent.d.ts +5 -0
- package/dist/crud/CrudField.cjs.js +1 -1
- package/dist/crud/CrudField.es.js +238 -213
- package/dist/crud/import/CrudImportComponent.cjs.js +2 -2
- package/dist/crud/import/CrudImportComponent.es.js +14 -15
- package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js +5 -0
- package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +42 -0
- package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/react/3x2/index.cjs.js +1 -0
- package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/react/3x2/index.es.js +6214 -0
- package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/unicode.cjs.js +1 -0
- package/dist/node_modules/.pnpm/country-flag-icons@1.6.12/node_modules/country-flag-icons/modules/unicode.es.js +9 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/closeBraces.cjs.js +1 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/closeBraces.es.js +9 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/dom.cjs.js +1 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/dom.es.js +43 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/edit.cjs.js +1 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/edit.es.js +17 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/format.cjs.js +1 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/format.es.js +28 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/helpers.cjs.js +2 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/helpers.es.js +37 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/inputControl.cjs.js +1 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/inputControl.es.js +36 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/parse.cjs.js +1 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/parse.es.js +15 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/Input.cjs.js +1 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/Input.es.js +86 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/useInput.cjs.js +1 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/useInput.es.js +69 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/templateFormatter.cjs.js +2 -0
- package/dist/node_modules/.pnpm/input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/templateFormatter.es.js +62 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouType.cjs.js +2 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouType.es.js +366 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.cjs.js +4 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.es.js +172 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.es.js +157 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.cjs.js +2 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.es.js +49 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.es.js +264 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.cjs.js +2 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.es.js +63 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeParser.cjs.js +2 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeParser.es.js +265 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeState.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouTypeState.es.js +110 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/ParseError.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/ParseError.es.js +89 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/PhoneNumber.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/PhoneNumber.es.js +188 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/constants.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/constants.es.js +10 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/format.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/format.es.js +98 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.es.js +7 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/getCountries.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/getCountries.es.js +7 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/RFC3966.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/RFC3966.es.js +11 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.es.js +7 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.es.js +16 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.es.js +11 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.es.js +18 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.es.js +47 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.es.js +22 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.es.js +23 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.es.js +39 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.es.js +31 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.es.js +23 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.es.js +27 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.es.js +12 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.cjs.js +2 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.es.js +45 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.es.js +12 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs.js +2 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getNumberType.es.js +50 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.es.js +14 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isObject.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isObject.es.js +7 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.es.js +20 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.es.js +6 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/parseDigits.cjs.js +2 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/parseDigits.es.js +112 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.es.js +19 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isPossible.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isPossible.es.js +42 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValid.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValid.es.js +12 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValidPhoneNumber.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/isValidPhoneNumber.es.js +59 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/metadata.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/metadata.es.js +473 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/normalizeArguments.cjs.js +2 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/normalizeArguments.es.js +108 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parse.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parse.es.js +119 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.cjs.js +2 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.es.js +47 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber.es.js +9 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.es.js +55 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber_.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parsePhoneNumber_.es.js +62 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/tools/semver-compare.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/tools/semver-compare.es.js +14 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/metadata.min.json.cjs.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.36/node_modules/libphonenumber-js/metadata.min.json.es.js +4 -0
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.cjs.js +5 -0
- package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.es.js +54 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.cjs.js +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.es.js +54 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.cjs.js +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.es.js +52 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.cjs.js +2 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.es.js +329 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.cjs.js +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.es.js +17 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.cjs.js +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.es.js +10 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.cjs.js +1 -0
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.es.js +7 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.cjs.js +8 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.es.js +95 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.cjs.js +8 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.es.js +78 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.es.js +10 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/locale/en.json.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/locale/en.json.es.js +263 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/min/index.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/min/index.es.js +20 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountryIcon.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountryIcon.es.js +69 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountrySelect.cjs.js +2 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/CountrySelect.es.js +158 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/Flag.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/Flag.es.js +62 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputBasic.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputBasic.es.js +113 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputSmart.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InputSmart.es.js +106 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InternationalIcon.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/InternationalIcon.es.js +122 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountry.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountry.es.js +830 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountryDefault.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PhoneInputWithCountryDefault.es.js +50 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PropTypes.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/PropTypes.es.js +9 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/countries.cjs.js +2 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/countries.es.js +78 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getInternationalPhoneNumberPrefix.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getInternationalPhoneNumberPrefix.es.js +8 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getPhoneInputWithCountryStateUpdateFromNewProps.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/getPhoneInputWithCountryStateUpdateFromNewProps.es.js +141 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/inputValuePrefix.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/inputValuePrefix.es.js +12 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/isE164Number.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/isE164Number.es.js +17 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/parsePhoneNumberCharacter.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/parsePhoneNumberCharacter.es.js +17 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/phoneInputHelpers.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/helpers/phoneInputHelpers.es.js +203 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useExternalRef.cjs.js +2 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useExternalRef.es.js +39 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useInputKeyDownHandler.cjs.js +1 -0
- package/dist/node_modules/.pnpm/react-phone-number-input@3.4.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-phone-number-input/modules/useInputKeyDownHandler.es.js +18 -0
- package/dist/style.css +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import g, { useCallback as w } from "react";
|
|
2
|
+
import i from "../../../../../../_virtual/index.es.js";
|
|
3
|
+
import { getPrefixForFormattingValueAsPhoneNumber as A, removePrefixFromFormattedPhoneNumber as P } from "./helpers/inputValuePrefix.es.js";
|
|
4
|
+
import T from "./useInputKeyDownHandler.es.js";
|
|
5
|
+
import F from "../../../../libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.es.js";
|
|
6
|
+
import j from "../../../../libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.es.js";
|
|
7
|
+
var R = ["value", "onChange", "onKeyDown", "country", "inputFormat", "metadata", "inputComponent", "international", "withCountryCallingCode"];
|
|
8
|
+
function f() {
|
|
9
|
+
return f = Object.assign ? Object.assign.bind() : function(n) {
|
|
10
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
11
|
+
var t = arguments[o];
|
|
12
|
+
for (var e in t)
|
|
13
|
+
Object.prototype.hasOwnProperty.call(t, e) && (n[e] = t[e]);
|
|
14
|
+
}
|
|
15
|
+
return n;
|
|
16
|
+
}, f.apply(this, arguments);
|
|
17
|
+
}
|
|
18
|
+
function D(n, o) {
|
|
19
|
+
if (n == null) return {};
|
|
20
|
+
var t = K(n, o), e, r;
|
|
21
|
+
if (Object.getOwnPropertySymbols) {
|
|
22
|
+
var a = Object.getOwnPropertySymbols(n);
|
|
23
|
+
for (r = 0; r < a.length; r++)
|
|
24
|
+
e = a[r], !(o.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(n, e) && (t[e] = n[e]);
|
|
25
|
+
}
|
|
26
|
+
return t;
|
|
27
|
+
}
|
|
28
|
+
function K(n, o) {
|
|
29
|
+
if (n == null) return {};
|
|
30
|
+
var t = {}, e = Object.keys(n), r, a;
|
|
31
|
+
for (a = 0; a < e.length; a++)
|
|
32
|
+
r = e[a], !(o.indexOf(r) >= 0) && (t[r] = n[r]);
|
|
33
|
+
return t;
|
|
34
|
+
}
|
|
35
|
+
function x(n) {
|
|
36
|
+
function o(t, e) {
|
|
37
|
+
var r = t.value, a = t.onChange, O = t.onKeyDown, p = t.country, c = t.inputFormat, y = t.metadata, m = y === void 0 ? n : y, s = t.inputComponent, h = s === void 0 ? "input" : s;
|
|
38
|
+
t.international, t.withCountryCallingCode;
|
|
39
|
+
var N = D(t, R), l = A({
|
|
40
|
+
inputFormat: c,
|
|
41
|
+
country: p,
|
|
42
|
+
metadata: m
|
|
43
|
+
}), b = w(function(v) {
|
|
44
|
+
var u = F(v.target.value);
|
|
45
|
+
if (u === r) {
|
|
46
|
+
var I = d(l, u, p, m);
|
|
47
|
+
I.indexOf(v.target.value) === 0 && (u = u.slice(0, -1));
|
|
48
|
+
}
|
|
49
|
+
a(u);
|
|
50
|
+
}, [l, r, a, p, m]), C = T({
|
|
51
|
+
onKeyDown: O,
|
|
52
|
+
inputFormat: c
|
|
53
|
+
});
|
|
54
|
+
return /* @__PURE__ */ g.createElement(h, f({}, N, {
|
|
55
|
+
ref: e,
|
|
56
|
+
value: d(l, r, p, m),
|
|
57
|
+
onChange: b,
|
|
58
|
+
onKeyDown: C
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
return o = /* @__PURE__ */ g.forwardRef(o), o.propTypes = {
|
|
62
|
+
/**
|
|
63
|
+
* The parsed phone number.
|
|
64
|
+
* "Parsed" not in a sense of "E.164"
|
|
65
|
+
* but rather in a sense of "having only
|
|
66
|
+
* digits and possibly a leading plus character".
|
|
67
|
+
* Examples: `""`, `"+"`, `"+123"`, `"123"`.
|
|
68
|
+
*/
|
|
69
|
+
value: i.string.isRequired,
|
|
70
|
+
/**
|
|
71
|
+
* A function of `value: string`.
|
|
72
|
+
* Updates the `value` property.
|
|
73
|
+
*/
|
|
74
|
+
onChange: i.func.isRequired,
|
|
75
|
+
/**
|
|
76
|
+
* A function of `event: Event`.
|
|
77
|
+
* Handles `keydown` events.
|
|
78
|
+
*/
|
|
79
|
+
onKeyDown: i.func,
|
|
80
|
+
/**
|
|
81
|
+
* A two-letter country code for formatting `value`
|
|
82
|
+
* as a national phone number (e.g. `(800) 555 35 35`).
|
|
83
|
+
* E.g. "US", "RU", etc.
|
|
84
|
+
* If no `country` is passed then `value`
|
|
85
|
+
* is formatted as an international phone number.
|
|
86
|
+
* (e.g. `+7 800 555 35 35`)
|
|
87
|
+
* This property should've been called `defaultCountry`
|
|
88
|
+
* because it only applies when the user inputs a phone number in a national format
|
|
89
|
+
* and is completely ignored when the user inputs a phone number in an international format.
|
|
90
|
+
*/
|
|
91
|
+
country: i.string,
|
|
92
|
+
/**
|
|
93
|
+
* The format that the input field value is being input/output in.
|
|
94
|
+
*/
|
|
95
|
+
inputFormat: i.oneOf(["INTERNATIONAL", "NATIONAL_PART_OF_INTERNATIONAL", "NATIONAL", "INTERNATIONAL_OR_NATIONAL"]).isRequired,
|
|
96
|
+
/**
|
|
97
|
+
* `libphonenumber-js` metadata.
|
|
98
|
+
*/
|
|
99
|
+
metadata: i.object,
|
|
100
|
+
/**
|
|
101
|
+
* The `<input/>` component.
|
|
102
|
+
*/
|
|
103
|
+
inputComponent: i.elementType
|
|
104
|
+
}, o;
|
|
105
|
+
}
|
|
106
|
+
const V = x();
|
|
107
|
+
function d(n, o, t, e) {
|
|
108
|
+
return P(j(n + o, t, e), n);
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
x as createInput,
|
|
112
|
+
V as default
|
|
113
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react"),i=require("../../../../../../_virtual/index.cjs.js"),s=require("./helpers/inputValuePrefix.cjs.js"),h=require("./helpers/parsePhoneNumberCharacter.cjs.js"),w=require("./useInputKeyDownHandler.cjs.js"),A=require("../../../../libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouType.cjs.js"),P=require("../../../../input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/Input.cjs.js");var T=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f.apply(this,arguments)}function F(e,n){if(e==null)return{};var t=j(e,n),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function j(e,n){if(e==null)return{};var t={},r=Object.keys(e),a,o;for(o=0;o<r.length;o++)a=r[o],!(n.indexOf(a)>=0)&&(t[a]=e[a]);return t}function O(e){function n(t,r){var a=t.onKeyDown,o=t.country,y=t.inputFormat,d=t.metadata,p=d===void 0?e:d;t.international,t.withCountryCallingCode;var g=F(t,T),b=l.useCallback(function(I){var v=new A(o,p),u=s.getPrefixForFormattingValueAsPhoneNumber({inputFormat:y,country:o,metadata:p}),c=v.input(u+I),m=v.getTemplate();return u&&(c=s.removePrefixFromFormattedPhoneNumber(c,u),m&&(m=s.removePrefixFromFormattedPhoneNumber(m,u))),{text:c,template:m}},[o,p]),N=w({onKeyDown:a,inputFormat:y});return l.createElement(P,f({},g,{ref:r,parse:h,format:b,onKeyDown:N}))}return n=l.forwardRef(n),n.propTypes={value:i.string.isRequired,onChange:i.func.isRequired,onKeyDown:i.func,country:i.string,inputFormat:i.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:i.object},n}const x=O();exports.createInput=O;exports.default=x;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import v, { useCallback as w } from "react";
|
|
2
|
+
import i from "../../../../../../_virtual/index.es.js";
|
|
3
|
+
import { getPrefixForFormattingValueAsPhoneNumber as A, removePrefixFromFormattedPhoneNumber as O } from "./helpers/inputValuePrefix.es.js";
|
|
4
|
+
import I from "./helpers/parsePhoneNumberCharacter.es.js";
|
|
5
|
+
import h from "./useInputKeyDownHandler.es.js";
|
|
6
|
+
import T from "../../../../libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/AsYouType.es.js";
|
|
7
|
+
import P from "../../../../input-format@0.3.14_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-format/modules/react/Input.es.js";
|
|
8
|
+
var F = ["onKeyDown", "country", "inputFormat", "metadata", "international", "withCountryCallingCode"];
|
|
9
|
+
function l() {
|
|
10
|
+
return l = Object.assign ? Object.assign.bind() : function(r) {
|
|
11
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
12
|
+
var t = arguments[n];
|
|
13
|
+
for (var e in t)
|
|
14
|
+
Object.prototype.hasOwnProperty.call(t, e) && (r[e] = t[e]);
|
|
15
|
+
}
|
|
16
|
+
return r;
|
|
17
|
+
}, l.apply(this, arguments);
|
|
18
|
+
}
|
|
19
|
+
function j(r, n) {
|
|
20
|
+
if (r == null) return {};
|
|
21
|
+
var t = R(r, n), e, o;
|
|
22
|
+
if (Object.getOwnPropertySymbols) {
|
|
23
|
+
var a = Object.getOwnPropertySymbols(r);
|
|
24
|
+
for (o = 0; o < a.length; o++)
|
|
25
|
+
e = a[o], !(n.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(r, e) && (t[e] = r[e]);
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
}
|
|
29
|
+
function R(r, n) {
|
|
30
|
+
if (r == null) return {};
|
|
31
|
+
var t = {}, e = Object.keys(r), o, a;
|
|
32
|
+
for (a = 0; a < e.length; a++)
|
|
33
|
+
o = e[a], !(n.indexOf(o) >= 0) && (t[o] = r[o]);
|
|
34
|
+
return t;
|
|
35
|
+
}
|
|
36
|
+
function x(r) {
|
|
37
|
+
function n(t, e) {
|
|
38
|
+
var o = t.onKeyDown, a = t.country, c = t.inputFormat, y = t.metadata, p = y === void 0 ? r : y;
|
|
39
|
+
t.international, t.withCountryCallingCode;
|
|
40
|
+
var d = j(t, F), g = w(function(b) {
|
|
41
|
+
var s = new T(a, p), u = A({
|
|
42
|
+
inputFormat: c,
|
|
43
|
+
country: a,
|
|
44
|
+
metadata: p
|
|
45
|
+
}), f = s.input(u + b), m = s.getTemplate();
|
|
46
|
+
return u && (f = O(f, u), m && (m = O(m, u))), {
|
|
47
|
+
text: f,
|
|
48
|
+
template: m
|
|
49
|
+
};
|
|
50
|
+
}, [a, p]), N = h({
|
|
51
|
+
onKeyDown: o,
|
|
52
|
+
inputFormat: c
|
|
53
|
+
});
|
|
54
|
+
return /* @__PURE__ */ v.createElement(P, l({}, d, {
|
|
55
|
+
ref: e,
|
|
56
|
+
parse: I,
|
|
57
|
+
format: g,
|
|
58
|
+
onKeyDown: N
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
return n = /* @__PURE__ */ v.forwardRef(n), n.propTypes = {
|
|
62
|
+
/**
|
|
63
|
+
* The parsed phone number.
|
|
64
|
+
* "Parsed" not in a sense of "E.164"
|
|
65
|
+
* but rather in a sense of "having only
|
|
66
|
+
* digits and possibly a leading plus character".
|
|
67
|
+
* Examples: `""`, `"+"`, `"+123"`, `"123"`.
|
|
68
|
+
*/
|
|
69
|
+
value: i.string.isRequired,
|
|
70
|
+
/**
|
|
71
|
+
* A function of `value: string`.
|
|
72
|
+
* Updates the `value` property.
|
|
73
|
+
*/
|
|
74
|
+
onChange: i.func.isRequired,
|
|
75
|
+
/**
|
|
76
|
+
* A function of `event: Event`.
|
|
77
|
+
* Handles `keydown` events.
|
|
78
|
+
*/
|
|
79
|
+
onKeyDown: i.func,
|
|
80
|
+
/**
|
|
81
|
+
* A two-letter country code for formatting `value`
|
|
82
|
+
* as a national phone number (e.g. `(800) 555 35 35`).
|
|
83
|
+
* E.g. "US", "RU", etc.
|
|
84
|
+
* If no `country` is passed then `value`
|
|
85
|
+
* is formatted as an international phone number.
|
|
86
|
+
* (e.g. `+7 800 555 35 35`)
|
|
87
|
+
* This property should've been called `defaultCountry`
|
|
88
|
+
* because it only applies when the user inputs a phone number in a national format
|
|
89
|
+
* and is completely ignored when the user inputs a phone number in an international format.
|
|
90
|
+
*/
|
|
91
|
+
country: i.string,
|
|
92
|
+
/**
|
|
93
|
+
* The format that the input field value is being input/output in.
|
|
94
|
+
*/
|
|
95
|
+
inputFormat: i.oneOf(["INTERNATIONAL", "NATIONAL_PART_OF_INTERNATIONAL", "NATIONAL", "INTERNATIONAL_OR_NATIONAL"]).isRequired,
|
|
96
|
+
/**
|
|
97
|
+
* `libphonenumber-js` metadata.
|
|
98
|
+
*/
|
|
99
|
+
metadata: i.object
|
|
100
|
+
}, n;
|
|
101
|
+
}
|
|
102
|
+
const S = x();
|
|
103
|
+
export {
|
|
104
|
+
x as createInput,
|
|
105
|
+
S as default
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("react"),c=require("../../../../../../_virtual/index.cjs.js");var d=["aspectRatio"],h=["title"],E=["title"];function i(){return i=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},i.apply(this,arguments)}function s(t,r){if(t==null)return{};var n=f(t,r),a,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(l=0;l<o.length;l++)a=o[l],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function f(t,r){if(t==null)return{};var n={},a=Object.keys(t),l,o;for(o=0;o<a.length;o++)l=a[o],!(r.indexOf(l)>=0)&&(n[l]=t[l]);return n}function p(t){var r=t.aspectRatio,n=s(t,d);return r===1?e.createElement(m,n):e.createElement(u,n)}p.propTypes={title:c.string.isRequired,aspectRatio:c.number};function u(t){var r=t.title,n=s(t,h);return e.createElement("svg",i({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),e.createElement("title",null,r),e.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},e.createElement("path",{strokeLinecap:"round",d:"M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"}),e.createElement("path",{d:"M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"}),e.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),e.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),e.createElement("path",{strokeLinecap:"round",d:"M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"}),e.createElement("path",{strokeLinecap:"round",d:"M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"})),e.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"none",fill:"currentColor",d:"M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"}))}u.propTypes={title:c.string.isRequired};function m(t){var r=t.title,n=s(t,E);return e.createElement("svg",i({},n,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),e.createElement("title",null,r),e.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},e.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),e.createElement("path",{d:"M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"}),e.createElement("path",{d:"M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"}),e.createElement("path",{d:"M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"}),e.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),e.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),e.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"transparent",fill:"currentColor",d:"M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"}))}m.propTypes={title:c.string.isRequired};module.exports=p;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import i from "../../../../../../_virtual/index.es.js";
|
|
3
|
+
var m = ["aspectRatio"], d = ["title"], h = ["title"];
|
|
4
|
+
function c() {
|
|
5
|
+
return c = Object.assign ? Object.assign.bind() : function(t) {
|
|
6
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
7
|
+
var n = arguments[r];
|
|
8
|
+
for (var a in n)
|
|
9
|
+
Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
}, c.apply(this, arguments);
|
|
13
|
+
}
|
|
14
|
+
function s(t, r) {
|
|
15
|
+
if (t == null) return {};
|
|
16
|
+
var n = f(t, r), a, o;
|
|
17
|
+
if (Object.getOwnPropertySymbols) {
|
|
18
|
+
var l = Object.getOwnPropertySymbols(t);
|
|
19
|
+
for (o = 0; o < l.length; o++)
|
|
20
|
+
a = l[o], !(r.indexOf(a) >= 0) && Object.prototype.propertyIsEnumerable.call(t, a) && (n[a] = t[a]);
|
|
21
|
+
}
|
|
22
|
+
return n;
|
|
23
|
+
}
|
|
24
|
+
function f(t, r) {
|
|
25
|
+
if (t == null) return {};
|
|
26
|
+
var n = {}, a = Object.keys(t), o, l;
|
|
27
|
+
for (l = 0; l < a.length; l++)
|
|
28
|
+
o = a[l], !(r.indexOf(o) >= 0) && (n[o] = t[o]);
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
function E(t) {
|
|
32
|
+
var r = t.aspectRatio, n = s(t, m);
|
|
33
|
+
return r === 1 ? /* @__PURE__ */ e.createElement(u, n) : /* @__PURE__ */ e.createElement(p, n);
|
|
34
|
+
}
|
|
35
|
+
E.propTypes = {
|
|
36
|
+
title: i.string.isRequired,
|
|
37
|
+
aspectRatio: i.number
|
|
38
|
+
};
|
|
39
|
+
function p(t) {
|
|
40
|
+
var r = t.title, n = s(t, d);
|
|
41
|
+
return /* @__PURE__ */ e.createElement("svg", c({}, n, {
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
viewBox: "0 0 75 50"
|
|
44
|
+
}), /* @__PURE__ */ e.createElement("title", null, r), /* @__PURE__ */ e.createElement("g", {
|
|
45
|
+
className: "PhoneInputInternationalIconGlobe",
|
|
46
|
+
stroke: "currentColor",
|
|
47
|
+
fill: "none",
|
|
48
|
+
strokeWidth: "2",
|
|
49
|
+
strokeMiterlimit: "10"
|
|
50
|
+
}, /* @__PURE__ */ e.createElement("path", {
|
|
51
|
+
strokeLinecap: "round",
|
|
52
|
+
d: "M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"
|
|
53
|
+
}), /* @__PURE__ */ e.createElement("path", {
|
|
54
|
+
d: "M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"
|
|
55
|
+
}), /* @__PURE__ */ e.createElement("line", {
|
|
56
|
+
x1: "26",
|
|
57
|
+
y1: "25",
|
|
58
|
+
x2: "74",
|
|
59
|
+
y2: "25"
|
|
60
|
+
}), /* @__PURE__ */ e.createElement("line", {
|
|
61
|
+
x1: "50",
|
|
62
|
+
y1: "1",
|
|
63
|
+
x2: "50",
|
|
64
|
+
y2: "49"
|
|
65
|
+
}), /* @__PURE__ */ e.createElement("path", {
|
|
66
|
+
strokeLinecap: "round",
|
|
67
|
+
d: "M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"
|
|
68
|
+
}), /* @__PURE__ */ e.createElement("path", {
|
|
69
|
+
strokeLinecap: "round",
|
|
70
|
+
d: "M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"
|
|
71
|
+
})), /* @__PURE__ */ e.createElement("path", {
|
|
72
|
+
className: "PhoneInputInternationalIconPhone",
|
|
73
|
+
stroke: "none",
|
|
74
|
+
fill: "currentColor",
|
|
75
|
+
d: "M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
p.propTypes = {
|
|
79
|
+
title: i.string.isRequired
|
|
80
|
+
};
|
|
81
|
+
function u(t) {
|
|
82
|
+
var r = t.title, n = s(t, h);
|
|
83
|
+
return /* @__PURE__ */ e.createElement("svg", c({}, n, {
|
|
84
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
+
viewBox: "0 0 50 50"
|
|
86
|
+
}), /* @__PURE__ */ e.createElement("title", null, r), /* @__PURE__ */ e.createElement("g", {
|
|
87
|
+
className: "PhoneInputInternationalIconGlobe",
|
|
88
|
+
stroke: "currentColor",
|
|
89
|
+
fill: "none",
|
|
90
|
+
strokeWidth: "2",
|
|
91
|
+
strokeLinecap: "round"
|
|
92
|
+
}, /* @__PURE__ */ e.createElement("path", {
|
|
93
|
+
d: "M8.45,13A21.44,21.44,0,1,1,37.08,41.56"
|
|
94
|
+
}), /* @__PURE__ */ e.createElement("path", {
|
|
95
|
+
d: "M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"
|
|
96
|
+
}), /* @__PURE__ */ e.createElement("path", {
|
|
97
|
+
d: "M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"
|
|
98
|
+
}), /* @__PURE__ */ e.createElement("path", {
|
|
99
|
+
d: "M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"
|
|
100
|
+
}), /* @__PURE__ */ e.createElement("line", {
|
|
101
|
+
x1: "27.8",
|
|
102
|
+
y1: "0.85",
|
|
103
|
+
x2: "27.8",
|
|
104
|
+
y2: "34.61"
|
|
105
|
+
}), /* @__PURE__ */ e.createElement("line", {
|
|
106
|
+
x1: "15.2",
|
|
107
|
+
y1: "22.23",
|
|
108
|
+
x2: "49.15",
|
|
109
|
+
y2: "22.23"
|
|
110
|
+
})), /* @__PURE__ */ e.createElement("path", {
|
|
111
|
+
className: "PhoneInputInternationalIconPhone",
|
|
112
|
+
stroke: "transparent",
|
|
113
|
+
fill: "currentColor",
|
|
114
|
+
d: "M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
u.propTypes = {
|
|
118
|
+
title: i.string.isRequired
|
|
119
|
+
};
|
|
120
|
+
export {
|
|
121
|
+
E as default
|
|
122
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const P=require("react"),i=require("../../../../../../_virtual/index.cjs.js"),$=require("../../../../../../_virtual/index.cjs2.js"),tt=require("./InputSmart.cjs.js"),et=require("./InputBasic.cjs.js"),nt=require("./CountrySelect.cjs.js"),ot=require("./Flag.cjs.js"),rt=require("./InternationalIcon.cjs.js"),it=require("./helpers/isE164Number.cjs.js"),B=require("./helpers/countries.cjs.js"),at=require("./CountryIcon.cjs.js"),ut=require("./useExternalRef.cjs.js"),W=require("./PropTypes.cjs.js"),b=require("./helpers/phoneInputHelpers.cjs.js"),lt=require("./helpers/getPhoneInputWithCountryStateUpdateFromNewProps.cjs.js"),k=require("../../../../libphonenumber-js@1.12.36/node_modules/libphonenumber-js/es6/getCountries.cjs.js");var st=["name","disabled","readOnly","autoComplete","style","className","inputRef","inputComponent","numberInputProps","smartCaret","countrySelectComponent","countrySelectProps","containerComponent","containerComponentProps","defaultCountry","countries","countryOptionsOrder","labels","flags","flagComponent","flagUrl","addInternationalOption","internationalIcon","displayInitialValueAsLocalNumber","initialValueFormat","onCountryChange","limitMaxLength","countryCallingCodeEditable","focusInputOnCountrySelection","reset","metadata","international","locales"];function w(n){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(n)}function K(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),o.push.apply(o,t)}return o}function H(n){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?K(Object(o),!0).forEach(function(t){p(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(o,t))})}return n}function F(){return F=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(n[t]=o[t])}return n},F.apply(this,arguments)}function ct(n,e){if(n==null)return{};var o=pt(n,e),t,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);for(r=0;r<a.length;r++)t=a[r],!(e.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function pt(n,e){if(n==null)return{};var o={},t=Object.keys(n),r,a;for(a=0;a<t.length;a++)r=t[a],!(e.indexOf(r)>=0)&&(o[r]=n[r]);return o}function yt(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function X(n,e){for(var o=0;o<e.length;o++){var t=e[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,J(t.key),t)}}function ft(n,e,o){return e&&X(n.prototype,e),o&&X(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n}function dt(n,e,o){return e=T(e),mt(n,G()?Reflect.construct(e,o||[],T(n).constructor):e.apply(n,o))}function mt(n,e){if(e&&(w(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ct(n)}function Ct(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function G(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(G=function(){return!!n})()}function T(n){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},T(n)}function gt(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),e&&U(n,e)}function U(n,e){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},U(n,e)}function p(n,e,o){return e=J(e),e in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n}function J(n){var e=ht(n,"string");return w(e)=="symbol"?e:e+""}function ht(n,e){if(w(n)!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var t=o.call(n,e);if(w(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var bt=(function(n){function e(o){var t;yt(this,e),t=dt(this,e,[o]),p(t,"setInputRef",function(l){ut.setRefsValue([t.props.inputRef,t.inputRef],l)}),p(t,"isCountrySupportedWithError",function(l){var u=t.props.metadata;return B.isCountrySupportedWithError(l,u)}),p(t,"onCountryChange",function(l){var u=t.props,c=u.international,d=u.metadata,N=u.onChange,h=u.focusInputOnCountrySelection,v=t.state,j=v.phoneDigits,D=v.country,m=b.getPhoneDigitsForNewCountry(j,{prevCountry:D,newCountry:l,metadata:d,useNationalFormat:!c}),S=b.e164(m,l,d);h&&t.inputRef.current.focus(),t.setState({country:l,latestCountrySelectedByUser:l,hasUserSelectedACountry:!0,phoneDigits:m,value:S},function(){N(S)})}),p(t,"onChange",function(l){var u=t.props,c=u.defaultCountry,d=u.onChange,N=u.addInternationalOption,h=u.international,v=u.limitMaxLength,j=u.countryCallingCodeEditable,D=u.metadata,m=t.state,S=m.countries,A=m.phoneDigits,Y=m.country,L=m.latestCountrySelectedByUser,M=b.onPhoneDigitsChange(l,{prevPhoneDigits:A,country:Y,countryRequired:!N,defaultCountry:c,latestCountrySelectedByUser:L,getAnyCountry:function(){return t.getFirstSupportedCountry({countries:S})},countries:S,international:h,limitMaxLength:v,countryCallingCodeEditable:j,metadata:D}),V=M.phoneDigits,Z=M.country,R=M.value,x={phoneDigits:V,value:R,country:Z};L&&R&&!b.couldNumberBelongToCountry(R,L,D)&&(x.latestCountrySelectedByUser=void 0),j===!1&&!R&&V===t.state.phoneDigits&&(x.forceRerender={}),t.setState(x,function(){return d(R)})}),p(t,"_onFocus",function(){return t.setState({isFocused:!0})}),p(t,"_onBlur",function(){return t.setState({isFocused:!1})}),p(t,"onFocus",function(l){t._onFocus();var u=t.props.onFocus;u&&u(l)}),p(t,"onBlur",function(l){var u=t.props.onBlur;t._onBlur(),u&&u(l)}),p(t,"onCountryFocus",function(l){t._onFocus();var u=t.props.countrySelectProps;if(u){var c=u.onFocus;c&&c(l)}}),p(t,"onCountryBlur",function(l){t._onBlur();var u=t.props.countrySelectProps;if(u){var c=u.onBlur;c&&c(l)}}),t.inputRef=P.createRef();var r=t.props,a=r.value;r.labels;var y=r.international,E=r.addInternationalOption,I=r.displayInitialValueAsLocalNumber,_=r.initialValueFormat,f=r.metadata,C=t.props,s=C.defaultCountry,O=C.countries;s&&(t.isCountrySupportedWithError(s)||(s=void 0)),a&&it.validateE164Number(a),O=B.getSupportedCountries(O,f);var g=b.parsePhoneNumber(a,f);t.CountryIcon=at.createCountryIconComponent(t.props);var q=b.getPreSelectedCountry({value:a,phoneNumber:g,defaultCountry:s,required:!E,countries:O||k(f),getAnyCountry:function(){return t.getFirstSupportedCountry({countries:O})},metadata:f});return t.state={props:t.props,country:q,countries:O,phoneDigits:b.getInitialPhoneDigits({value:a,phoneNumber:g,defaultCountry:s,international:y,useNationalFormat:I||_==="national",metadata:f}),value:a},t}return gt(e,n),ft(e,[{key:"componentDidMount",value:function(){var t=this.props.onCountryChange,r=this.props.defaultCountry,a=this.state.country;t&&(r&&(this.isCountrySupportedWithError(r)||(r=void 0)),a!==r&&t(a))}},{key:"componentDidUpdate",value:function(t,r){var a=this.props.onCountryChange,y=this.state.country;a&&y!==r.country&&a(y)}},{key:"getCountrySelectOptions",value:function(t){var r=t.countries,a=this.props,y=a.international,E=a.countryCallingCodeEditable,I=a.countryOptionsOrder,_=a.addInternationalOption,f=a.labels,C=a.locales,s=a.metadata;return this.useMemoCountrySelectOptions(function(){return B.sortCountryOptions(b.getCountrySelectOptions({countries:r||k(s),countryNames:f,addInternationalOption:y&&E===!1?!1:_,compareStringsLocales:C}),B.getSupportedCountryOptions(I,s))},[r,I,_,f,s])}},{key:"useMemoCountrySelectOptions",value:function(t,r){return(!this.countrySelectOptionsMemoDependencies||!vt(r,this.countrySelectOptionsMemoDependencies))&&(this.countrySelectOptionsMemo=t(),this.countrySelectOptionsMemoDependencies=r),this.countrySelectOptionsMemo}},{key:"getFirstSupportedCountry",value:function(t){var r=t.countries,a=this.getCountrySelectOptions({countries:r});return a[0].value}},{key:"render",value:function(){var t=this.props,r=t.name,a=t.disabled,y=t.readOnly,E=t.autoComplete,I=t.style,_=t.className;t.inputRef;var f=t.inputComponent,C=t.numberInputProps,s=t.smartCaret,O=t.countrySelectComponent,g=t.countrySelectProps,q=t.containerComponent,l=t.containerComponentProps;t.defaultCountry,t.countries,t.countryOptionsOrder;var u=t.labels;t.flags,t.flagComponent,t.flagUrl,t.addInternationalOption,t.internationalIcon,t.displayInitialValueAsLocalNumber,t.initialValueFormat,t.onCountryChange,t.limitMaxLength,t.countryCallingCodeEditable,t.focusInputOnCountrySelection,t.reset;var c=t.metadata,d=t.international;t.locales;var N=ct(t,st),h=this.state,v=h.country,j=h.countries,D=h.phoneDigits,m=h.isFocused,S=s?tt.default:et.default,A=this.getCountrySelectOptions({countries:j});return P.createElement(q,F({style:I,className:$(_,"PhoneInput",{"PhoneInput--focus":m,"PhoneInput--disabled":a,"PhoneInput--readOnly":y})},l),P.createElement(O,F({name:r?"".concat(r,"Country"):void 0,"aria-label":u.country},g,{value:v,options:A,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:a||g&&g.disabled,readOnly:y||g&&g.readOnly,iconComponent:this.CountryIcon})),P.createElement(S,F({ref:this.setInputRef,type:"tel",autoComplete:E},C,N,{inputFormat:d===!0?"INTERNATIONAL":d===!1?"NATIONAL":"INTERNATIONAL_OR_NATIONAL",international:d?!0:void 0,withCountryCallingCode:d?!0:void 0,name:r,metadata:c,country:v,value:D||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:a,readOnly:y,inputComponent:f,className:$("PhoneInputInput",C&&C.className,N.className)})))}}],[{key:"getDerivedStateFromProps",value:function(t,r){return H({props:t},lt.default(t,r.props,r))}}])})(P.PureComponent),Q=P.forwardRef(function(n,e){return P.createElement(bt,F({},Ot(n),{inputRef:e}))});Q.propTypes={value:i.string,onChange:i.func.isRequired,onFocus:i.func,onBlur:i.func,disabled:i.bool,readOnly:i.bool,autoComplete:i.string,initialValueFormat:i.oneOf(["national"]),displayInitialValueAsLocalNumber:i.bool,defaultCountry:i.string,countries:i.arrayOf(i.string),labels:W.labels,locales:i.oneOfType([i.string,i.arrayOf(i.string)]),flagUrl:i.string,flags:i.objectOf(i.elementType),flagComponent:i.elementType,addInternationalOption:i.bool,internationalIcon:i.elementType,countryOptionsOrder:i.arrayOf(i.string),style:i.object,className:i.string,countrySelectComponent:i.elementType,countrySelectProps:i.object,inputComponent:i.elementType,numberInputProps:i.object,containerComponent:i.elementType,containerComponentProps:i.object,smartCaret:i.bool,international:i.bool,limitMaxLength:i.bool,countryCallingCodeEditable:i.bool,metadata:W.metadata,onCountryChange:i.func,focusInputOnCountrySelection:i.bool};var z={autoComplete:"tel",countrySelectComponent:nt.CountrySelectWithIcon,flagComponent:ot,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:rt,inputComponent:"input",containerComponent:"div",reset:i.any,smartCaret:!0,addInternationalOption:!0,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};function Ot(n){n=H({},n);for(var e in z)n[e]===void 0&&(n[e]=z[e]);return n}function vt(n,e){if(n.length!==e.length)return!1;for(var o=0;o<n.length;){if(n[o]!==e[o])return!1;o++}return!0}module.exports=Q;
|