@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,366 @@
|
|
|
1
|
+
import g from "./metadata.es.js";
|
|
2
|
+
import c from "./PhoneNumber.es.js";
|
|
3
|
+
import y from "./AsYouTypeState.es.js";
|
|
4
|
+
import C from "./AsYouTypeFormatter.es.js";
|
|
5
|
+
import b from "./AsYouTypeParser.es.js";
|
|
6
|
+
import v from "./helpers/getCountryByCallingCode.es.js";
|
|
7
|
+
import p from "./helpers/getCountryByNationalNumber.es.js";
|
|
8
|
+
import N from "./helpers/isObject.es.js";
|
|
9
|
+
import { DIGIT_PLACEHOLDER as P } from "./AsYouTypeFormatter.util.es.js";
|
|
10
|
+
function f(n) {
|
|
11
|
+
"@babel/helpers - typeof";
|
|
12
|
+
return f = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
13
|
+
return typeof e;
|
|
14
|
+
} : function(e) {
|
|
15
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
16
|
+
}, f(n);
|
|
17
|
+
}
|
|
18
|
+
function S(n, e) {
|
|
19
|
+
return A(n) || _(n, e) || k(n, e) || T();
|
|
20
|
+
}
|
|
21
|
+
function T() {
|
|
22
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
23
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
24
|
+
}
|
|
25
|
+
function k(n, e) {
|
|
26
|
+
if (n) {
|
|
27
|
+
if (typeof n == "string") return h(n, e);
|
|
28
|
+
var t = {}.toString.call(n).slice(8, -1);
|
|
29
|
+
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? h(n, e) : void 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function h(n, e) {
|
|
33
|
+
(e == null || e > n.length) && (e = n.length);
|
|
34
|
+
for (var t = 0, i = Array(e); t < e; t++) i[t] = n[t];
|
|
35
|
+
return i;
|
|
36
|
+
}
|
|
37
|
+
function _(n, e) {
|
|
38
|
+
var t = n == null ? null : typeof Symbol < "u" && n[Symbol.iterator] || n["@@iterator"];
|
|
39
|
+
if (t != null) {
|
|
40
|
+
var i, a, o, r, u = [], l = !0, s = !1;
|
|
41
|
+
try {
|
|
42
|
+
if (o = (t = t.call(n)).next, e !== 0) for (; !(l = (i = o.call(t)).done) && (u.push(i.value), u.length !== e); l = !0) ;
|
|
43
|
+
} catch (d) {
|
|
44
|
+
s = !0, a = d;
|
|
45
|
+
} finally {
|
|
46
|
+
try {
|
|
47
|
+
if (!l && t.return != null && (r = t.return(), Object(r) !== r)) return;
|
|
48
|
+
} finally {
|
|
49
|
+
if (s) throw a;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return u;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function A(n) {
|
|
56
|
+
if (Array.isArray(n)) return n;
|
|
57
|
+
}
|
|
58
|
+
function I(n, e) {
|
|
59
|
+
if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
60
|
+
}
|
|
61
|
+
function F(n, e) {
|
|
62
|
+
for (var t = 0; t < e.length; t++) {
|
|
63
|
+
var i = e[t];
|
|
64
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, x(i.key), i);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function w(n, e, t) {
|
|
68
|
+
return e && F(n.prototype, e), Object.defineProperty(n, "prototype", { writable: !1 }), n;
|
|
69
|
+
}
|
|
70
|
+
function x(n) {
|
|
71
|
+
var e = j(n, "string");
|
|
72
|
+
return f(e) == "symbol" ? e : e + "";
|
|
73
|
+
}
|
|
74
|
+
function j(n, e) {
|
|
75
|
+
if (f(n) != "object" || !n) return n;
|
|
76
|
+
var t = n[Symbol.toPrimitive];
|
|
77
|
+
if (t !== void 0) {
|
|
78
|
+
var i = t.call(n, e);
|
|
79
|
+
if (f(i) != "object") return i;
|
|
80
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
81
|
+
}
|
|
82
|
+
return String(n);
|
|
83
|
+
}
|
|
84
|
+
var H = /* @__PURE__ */ (function() {
|
|
85
|
+
function n(e, t) {
|
|
86
|
+
I(this, n), this.metadata = new g(t);
|
|
87
|
+
var i = this.getCountryAndCallingCode(e), a = S(i, 2), o = a[0], r = a[1];
|
|
88
|
+
this.defaultCountry = o, this.defaultCallingCode = r, this.reset();
|
|
89
|
+
}
|
|
90
|
+
return w(n, [{
|
|
91
|
+
key: "getCountryAndCallingCode",
|
|
92
|
+
value: function(t) {
|
|
93
|
+
var i, a;
|
|
94
|
+
return t && (N(t) ? (i = t.defaultCountry, a = t.defaultCallingCode) : i = t), i && !this.metadata.hasCountry(i) && (i = void 0), [i, a];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Inputs "next" phone number characters.
|
|
98
|
+
* @param {string} text
|
|
99
|
+
* @return {string} Formatted phone number characters that have been input so far.
|
|
100
|
+
*/
|
|
101
|
+
}, {
|
|
102
|
+
key: "input",
|
|
103
|
+
value: function(t) {
|
|
104
|
+
var i = this.parser.input(t, this.state), a = i.digits, o = i.justLeadingPlus;
|
|
105
|
+
if (o)
|
|
106
|
+
this.formattedOutput = "+";
|
|
107
|
+
else if (a) {
|
|
108
|
+
this.determineTheCountryIfNeeded(), this.state.nationalSignificantNumber && this.formatter.narrowDownMatchingFormats(this.state);
|
|
109
|
+
var r;
|
|
110
|
+
if (this.metadata.hasSelectedNumberingPlan() && (r = this.formatter.format(a, this.state)), r === void 0 && this.parser.reExtractNationalSignificantNumber(this.state)) {
|
|
111
|
+
this.determineTheCountryIfNeeded();
|
|
112
|
+
var u = this.state.getNationalDigits();
|
|
113
|
+
u && (r = this.formatter.format(u, this.state));
|
|
114
|
+
}
|
|
115
|
+
this.formattedOutput = r ? this.getFullNumber(r) : this.getNonFormattedNumber();
|
|
116
|
+
}
|
|
117
|
+
return this.formattedOutput;
|
|
118
|
+
}
|
|
119
|
+
}, {
|
|
120
|
+
key: "reset",
|
|
121
|
+
value: function() {
|
|
122
|
+
var t = this;
|
|
123
|
+
return this.state = new y({
|
|
124
|
+
onCountryChange: function(a) {
|
|
125
|
+
t.country = a;
|
|
126
|
+
},
|
|
127
|
+
onCallingCodeChange: function(a, o) {
|
|
128
|
+
t.metadata.selectNumberingPlan(o, a), t.formatter.reset(t.metadata.numberingPlan, t.state), t.parser.reset(t.metadata.numberingPlan);
|
|
129
|
+
}
|
|
130
|
+
}), this.formatter = new C({
|
|
131
|
+
state: this.state,
|
|
132
|
+
metadata: this.metadata
|
|
133
|
+
}), this.parser = new b({
|
|
134
|
+
defaultCountry: this.defaultCountry,
|
|
135
|
+
defaultCallingCode: this.defaultCallingCode,
|
|
136
|
+
metadata: this.metadata,
|
|
137
|
+
state: this.state,
|
|
138
|
+
onNationalSignificantNumberChange: function() {
|
|
139
|
+
t.determineTheCountryIfNeeded(), t.formatter.reset(t.metadata.numberingPlan, t.state);
|
|
140
|
+
}
|
|
141
|
+
}), this.state.reset({
|
|
142
|
+
country: this.defaultCountry,
|
|
143
|
+
callingCode: this.defaultCallingCode
|
|
144
|
+
}), this.formattedOutput = "", this;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Returns `true` if the phone number is being input in international format.
|
|
148
|
+
* In other words, returns `true` if and only if the parsed phone number starts with a `"+"`.
|
|
149
|
+
* @return {boolean}
|
|
150
|
+
*/
|
|
151
|
+
}, {
|
|
152
|
+
key: "isInternational",
|
|
153
|
+
value: function() {
|
|
154
|
+
return this.state.international;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Returns the "calling code" part of the phone number when it's being input
|
|
158
|
+
* in an international format.
|
|
159
|
+
* If no valid calling code has been entered so far, returns `undefined`.
|
|
160
|
+
* @return {string} [callingCode]
|
|
161
|
+
*/
|
|
162
|
+
}, {
|
|
163
|
+
key: "getCallingCode",
|
|
164
|
+
value: function() {
|
|
165
|
+
if (this.isInternational())
|
|
166
|
+
return this.state.callingCode;
|
|
167
|
+
}
|
|
168
|
+
// A legacy alias.
|
|
169
|
+
}, {
|
|
170
|
+
key: "getCountryCallingCode",
|
|
171
|
+
value: function() {
|
|
172
|
+
return this.getCallingCode();
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Returns a two-letter country code of the phone number.
|
|
176
|
+
* Returns `undefined` for "non-geographic" phone numbering plans.
|
|
177
|
+
* Returns `undefined` if no phone number has been input yet.
|
|
178
|
+
* @return {string} [country]
|
|
179
|
+
*/
|
|
180
|
+
}, {
|
|
181
|
+
key: "getCountry",
|
|
182
|
+
value: function() {
|
|
183
|
+
var t = this.state.digits;
|
|
184
|
+
if (t)
|
|
185
|
+
return this._getCountry();
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Returns a two-letter country code of the phone number.
|
|
189
|
+
* Returns `undefined` for "non-geographic" phone numbering plans.
|
|
190
|
+
* @return {string} [country]
|
|
191
|
+
*/
|
|
192
|
+
}, {
|
|
193
|
+
key: "_getCountry",
|
|
194
|
+
value: function() {
|
|
195
|
+
var t = this.state.country;
|
|
196
|
+
return t;
|
|
197
|
+
}
|
|
198
|
+
}, {
|
|
199
|
+
key: "determineTheCountryIfNeeded",
|
|
200
|
+
value: function() {
|
|
201
|
+
(!this.state.country || this.isCountryCallingCodeAmbiguous()) && this.determineTheCountry();
|
|
202
|
+
}
|
|
203
|
+
// Prepends `+CountryCode ` in case of an international phone number
|
|
204
|
+
}, {
|
|
205
|
+
key: "getFullNumber",
|
|
206
|
+
value: function(t) {
|
|
207
|
+
var i = this;
|
|
208
|
+
if (this.isInternational()) {
|
|
209
|
+
var a = function(u) {
|
|
210
|
+
return i.formatter.getInternationalPrefixBeforeCountryCallingCode(i.state, {
|
|
211
|
+
spacing: !!u
|
|
212
|
+
}) + u;
|
|
213
|
+
}, o = this.state.callingCode;
|
|
214
|
+
return a(o ? t ? "".concat(o, " ").concat(t) : o : "".concat(this.state.getDigitsWithoutInternationalPrefix()));
|
|
215
|
+
}
|
|
216
|
+
return t;
|
|
217
|
+
}
|
|
218
|
+
}, {
|
|
219
|
+
key: "getNonFormattedNationalNumberWithPrefix",
|
|
220
|
+
value: function() {
|
|
221
|
+
var t = this.state, i = t.nationalSignificantNumber, a = t.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix, o = t.nationalPrefix, r = i, u = a || o;
|
|
222
|
+
return u && (r = u + r), r;
|
|
223
|
+
}
|
|
224
|
+
}, {
|
|
225
|
+
key: "getNonFormattedNumber",
|
|
226
|
+
value: function() {
|
|
227
|
+
var t = this.state.nationalSignificantNumberIsModified;
|
|
228
|
+
return this.getFullNumber(t ? this.state.getNationalDigits() : this.getNonFormattedNationalNumberWithPrefix());
|
|
229
|
+
}
|
|
230
|
+
}, {
|
|
231
|
+
key: "getNonFormattedTemplate",
|
|
232
|
+
value: function() {
|
|
233
|
+
var t = this.getNonFormattedNumber();
|
|
234
|
+
if (t)
|
|
235
|
+
return t.replace(/[\+\d]/g, P);
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
key: "isCountryCallingCodeAmbiguous",
|
|
239
|
+
value: function() {
|
|
240
|
+
var t = this.state.callingCode, i = this.metadata.getCountryCodesForCallingCode(t);
|
|
241
|
+
return i && i.length > 1;
|
|
242
|
+
}
|
|
243
|
+
// Determines the exact country of the phone number
|
|
244
|
+
// entered so far based on the country phone code
|
|
245
|
+
// and the national phone number.
|
|
246
|
+
}, {
|
|
247
|
+
key: "determineTheCountry",
|
|
248
|
+
value: function() {
|
|
249
|
+
this.state.setCountry(v(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {
|
|
250
|
+
nationalNumber: this.state.nationalSignificantNumber,
|
|
251
|
+
metadata: this.metadata
|
|
252
|
+
}));
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Returns a E.164 phone number value for the user's input.
|
|
256
|
+
*
|
|
257
|
+
* For example, for country `"US"` and input `"(222) 333-4444"`
|
|
258
|
+
* it will return `"+12223334444"`.
|
|
259
|
+
*
|
|
260
|
+
* For international phone number input, it will also auto-correct
|
|
261
|
+
* some minor errors such as using a national prefix when writing
|
|
262
|
+
* an international phone number. For example, if the user inputs
|
|
263
|
+
* `"+44 0 7400 000000"` then it will return an auto-corrected
|
|
264
|
+
* `"+447400000000"` phone number value.
|
|
265
|
+
*
|
|
266
|
+
* Will return `undefined` if no digits have been input,
|
|
267
|
+
* or when inputting a phone number in national format and no
|
|
268
|
+
* default country or default "country calling code" have been set.
|
|
269
|
+
*
|
|
270
|
+
* @return {string} [value]
|
|
271
|
+
*/
|
|
272
|
+
}, {
|
|
273
|
+
key: "getNumberValue",
|
|
274
|
+
value: function() {
|
|
275
|
+
var t = this.state, i = t.digits, a = t.callingCode, o = t.country, r = t.nationalSignificantNumber;
|
|
276
|
+
if (i) {
|
|
277
|
+
if (this.isInternational())
|
|
278
|
+
return a ? "+" + a + r : "+" + i;
|
|
279
|
+
if (o || a) {
|
|
280
|
+
var u = o ? this.metadata.countryCallingCode() : a;
|
|
281
|
+
return "+" + u + r;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Returns an instance of `PhoneNumber` class.
|
|
287
|
+
* Will return `undefined` if no national (significant) number
|
|
288
|
+
* digits have been entered so far, or if no `defaultCountry` has been
|
|
289
|
+
* set and the user enters a phone number not in international format.
|
|
290
|
+
*/
|
|
291
|
+
}, {
|
|
292
|
+
key: "getNumber",
|
|
293
|
+
value: function() {
|
|
294
|
+
var t = this.state, i = t.nationalSignificantNumber, a = t.carrierCode, o = t.callingCode, r = this._getCountry();
|
|
295
|
+
if (i && !(!r && !o)) {
|
|
296
|
+
if (r && r === this.defaultCountry) {
|
|
297
|
+
var u = new g(this.metadata.metadata);
|
|
298
|
+
u.selectNumberingPlan(r);
|
|
299
|
+
var l = u.numberingPlan.callingCode(), s = this.metadata.getCountryCodesForCallingCode(l);
|
|
300
|
+
if (s.length > 1) {
|
|
301
|
+
var d = p(i, {
|
|
302
|
+
countries: s,
|
|
303
|
+
metadata: this.metadata.metadata
|
|
304
|
+
});
|
|
305
|
+
d && (r = d);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
var m = new c(r || o, i, this.metadata.metadata);
|
|
309
|
+
return a && (m.carrierCode = a), m;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Returns `true` if the phone number is "possible".
|
|
314
|
+
* Is just a shortcut for `PhoneNumber.isPossible()`.
|
|
315
|
+
* @return {boolean}
|
|
316
|
+
*/
|
|
317
|
+
}, {
|
|
318
|
+
key: "isPossible",
|
|
319
|
+
value: function() {
|
|
320
|
+
var t = this.getNumber();
|
|
321
|
+
return t ? t.isPossible() : !1;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Returns `true` if the phone number is "valid".
|
|
325
|
+
* Is just a shortcut for `PhoneNumber.isValid()`.
|
|
326
|
+
* @return {boolean}
|
|
327
|
+
*/
|
|
328
|
+
}, {
|
|
329
|
+
key: "isValid",
|
|
330
|
+
value: function() {
|
|
331
|
+
var t = this.getNumber();
|
|
332
|
+
return t ? t.isValid() : !1;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* @deprecated
|
|
336
|
+
* This method is used in `react-phone-number-input/source/input-control.js`
|
|
337
|
+
* in versions before `3.0.16`.
|
|
338
|
+
*/
|
|
339
|
+
}, {
|
|
340
|
+
key: "getNationalNumber",
|
|
341
|
+
value: function() {
|
|
342
|
+
return this.state.nationalSignificantNumber;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Returns the phone number characters entered by the user.
|
|
346
|
+
* @return {string}
|
|
347
|
+
*/
|
|
348
|
+
}, {
|
|
349
|
+
key: "getChars",
|
|
350
|
+
value: function() {
|
|
351
|
+
return (this.state.international ? "+" : "") + this.state.digits;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Returns the template for the formatted phone number.
|
|
355
|
+
* @return {string}
|
|
356
|
+
*/
|
|
357
|
+
}, {
|
|
358
|
+
key: "getTemplate",
|
|
359
|
+
value: function() {
|
|
360
|
+
return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || "";
|
|
361
|
+
}
|
|
362
|
+
}]);
|
|
363
|
+
})();
|
|
364
|
+
export {
|
|
365
|
+
H as default
|
|
366
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const w=require("./AsYouTypeFormatter.PatternParser.cjs.js");function p(e,r){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=S(e))||r){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S(e,r){if(e){if(typeof e=="string")return s(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(e,r):void 0}}function s(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function f(e){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(e)}function A(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function C(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O(n.key),n)}}function P(e,r,t){return r&&C(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e){var r=M(e,"string");return f(r)=="symbol"?r:r+""}function M(e,r){if(f(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r);if(f(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var T=(function(){function e(r){A(this,e),this.matchTree=new w().parse(r)}return P(e,[{key:"match",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.allowOverflow;if(!t)throw new Error("String is required");var o=l(t.split(""),this.matchTree,!0);if(o&&o.match&&delete o.matchedChars,!(o&&o.overflow&&!i))return o}}])})();function l(e,r,t){if(typeof r=="string"){var n=e.join("");return r.indexOf(n)===0?e.length===r.length?{match:!0,matchedChars:e}:{partialMatch:!0}:n.indexOf(r)===0?t&&e.length>r.length?{overflow:!0}:{match:!0,matchedChars:e.slice(0,r.length)}:void 0}if(Array.isArray(r)){for(var i=e.slice(),o=0;o<r.length;){var v=r[o],a=l(i,v,t&&o===r.length-1);if(a){if(a.overflow)return a;if(a.match){if(i=i.slice(a.matchedChars.length),i.length===0)return o===r.length-1?{match:!0,matchedChars:e}:{partialMatch:!0}}else{if(a.partialMatch)return{partialMatch:!0};throw new Error(`Unsupported match result:
|
|
3
|
+
`.concat(JSON.stringify(a,null,2)))}}else return;o++}return t?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-i.length)}}switch(r.op){case"|":for(var c,d=p(r.args),h;!(h=d()).done;){var g=h.value,u=l(e,g,t);if(u){if(u.overflow)return u;if(u.match)return{match:!0,matchedChars:u.matchedChars};if(u.partialMatch)c=!0;else throw new Error(`Unsupported match result:
|
|
4
|
+
`.concat(JSON.stringify(u,null,2)))}}return c?{partialMatch:!0}:void 0;case"[]":for(var b=p(r.args),m;!(m=b()).done;){var y=m.value;if(e[0]===y)return e.length===1?{match:!0,matchedChars:e}:t?{overflow:!0}:{match:!0,matchedChars:[y]}}return;default:throw new Error("Unsupported instruction tree: ".concat(r))}}module.exports=T;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import w from "./AsYouTypeFormatter.PatternParser.es.js";
|
|
2
|
+
function p(r, e) {
|
|
3
|
+
var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
|
|
4
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
5
|
+
if (Array.isArray(r) || (t = S(r)) || e) {
|
|
6
|
+
t && (r = t);
|
|
7
|
+
var n = 0;
|
|
8
|
+
return function() {
|
|
9
|
+
return n >= r.length ? { done: !0 } : { done: !1, value: r[n++] };
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
13
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
14
|
+
}
|
|
15
|
+
function S(r, e) {
|
|
16
|
+
if (r) {
|
|
17
|
+
if (typeof r == "string") return v(r, e);
|
|
18
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
19
|
+
return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? v(r, e) : void 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function v(r, e) {
|
|
23
|
+
(e == null || e > r.length) && (e = r.length);
|
|
24
|
+
for (var t = 0, n = Array(e); t < e; t++) n[t] = r[t];
|
|
25
|
+
return n;
|
|
26
|
+
}
|
|
27
|
+
function f(r) {
|
|
28
|
+
"@babel/helpers - typeof";
|
|
29
|
+
return f = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
30
|
+
return typeof e;
|
|
31
|
+
} : function(e) {
|
|
32
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
33
|
+
}, f(r);
|
|
34
|
+
}
|
|
35
|
+
function C(r, e) {
|
|
36
|
+
if (!(r instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
37
|
+
}
|
|
38
|
+
function P(r, e) {
|
|
39
|
+
for (var t = 0; t < e.length; t++) {
|
|
40
|
+
var n = e[t];
|
|
41
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, O(n.key), n);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function A(r, e, t) {
|
|
45
|
+
return e && P(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r;
|
|
46
|
+
}
|
|
47
|
+
function O(r) {
|
|
48
|
+
var e = M(r, "string");
|
|
49
|
+
return f(e) == "symbol" ? e : e + "";
|
|
50
|
+
}
|
|
51
|
+
function M(r, e) {
|
|
52
|
+
if (f(r) != "object" || !r) return r;
|
|
53
|
+
var t = r[Symbol.toPrimitive];
|
|
54
|
+
if (t !== void 0) {
|
|
55
|
+
var n = t.call(r, e);
|
|
56
|
+
if (f(n) != "object") return n;
|
|
57
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
58
|
+
}
|
|
59
|
+
return String(r);
|
|
60
|
+
}
|
|
61
|
+
var E = /* @__PURE__ */ (function() {
|
|
62
|
+
function r(e) {
|
|
63
|
+
C(this, r), this.matchTree = new w().parse(e);
|
|
64
|
+
}
|
|
65
|
+
return A(r, [{
|
|
66
|
+
key: "match",
|
|
67
|
+
value: function(t) {
|
|
68
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = n.allowOverflow;
|
|
69
|
+
if (!t)
|
|
70
|
+
throw new Error("String is required");
|
|
71
|
+
var o = l(t.split(""), this.matchTree, !0);
|
|
72
|
+
if (o && o.match && delete o.matchedChars, !(o && o.overflow && !i))
|
|
73
|
+
return o;
|
|
74
|
+
}
|
|
75
|
+
}]);
|
|
76
|
+
})();
|
|
77
|
+
function l(r, e, t) {
|
|
78
|
+
if (typeof e == "string") {
|
|
79
|
+
var n = r.join("");
|
|
80
|
+
return e.indexOf(n) === 0 ? r.length === e.length ? {
|
|
81
|
+
match: !0,
|
|
82
|
+
matchedChars: r
|
|
83
|
+
} : {
|
|
84
|
+
partialMatch: !0
|
|
85
|
+
// matchedChars: characters
|
|
86
|
+
} : n.indexOf(e) === 0 ? t && r.length > e.length ? {
|
|
87
|
+
overflow: !0
|
|
88
|
+
} : {
|
|
89
|
+
match: !0,
|
|
90
|
+
matchedChars: r.slice(0, e.length)
|
|
91
|
+
} : void 0;
|
|
92
|
+
}
|
|
93
|
+
if (Array.isArray(e)) {
|
|
94
|
+
for (var i = r.slice(), o = 0; o < e.length; ) {
|
|
95
|
+
var s = e[o], a = l(i, s, t && o === e.length - 1);
|
|
96
|
+
if (a) {
|
|
97
|
+
if (a.overflow)
|
|
98
|
+
return a;
|
|
99
|
+
if (a.match) {
|
|
100
|
+
if (i = i.slice(a.matchedChars.length), i.length === 0)
|
|
101
|
+
return o === e.length - 1 ? {
|
|
102
|
+
match: !0,
|
|
103
|
+
matchedChars: r
|
|
104
|
+
} : {
|
|
105
|
+
partialMatch: !0
|
|
106
|
+
// matchedChars: characters
|
|
107
|
+
};
|
|
108
|
+
} else {
|
|
109
|
+
if (a.partialMatch)
|
|
110
|
+
return {
|
|
111
|
+
partialMatch: !0
|
|
112
|
+
// matchedChars: characters
|
|
113
|
+
};
|
|
114
|
+
throw new Error(`Unsupported match result:
|
|
115
|
+
`.concat(JSON.stringify(a, null, 2)));
|
|
116
|
+
}
|
|
117
|
+
} else return;
|
|
118
|
+
o++;
|
|
119
|
+
}
|
|
120
|
+
return t ? {
|
|
121
|
+
overflow: !0
|
|
122
|
+
} : {
|
|
123
|
+
match: !0,
|
|
124
|
+
matchedChars: r.slice(0, r.length - i.length)
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
switch (e.op) {
|
|
128
|
+
case "|":
|
|
129
|
+
for (var c, d = p(e.args), h; !(h = d()).done; ) {
|
|
130
|
+
var g = h.value, u = l(r, g, t);
|
|
131
|
+
if (u) {
|
|
132
|
+
if (u.overflow)
|
|
133
|
+
return u;
|
|
134
|
+
if (u.match)
|
|
135
|
+
return {
|
|
136
|
+
match: !0,
|
|
137
|
+
matchedChars: u.matchedChars
|
|
138
|
+
};
|
|
139
|
+
if (u.partialMatch)
|
|
140
|
+
c = !0;
|
|
141
|
+
else
|
|
142
|
+
throw new Error(`Unsupported match result:
|
|
143
|
+
`.concat(JSON.stringify(u, null, 2)));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return c ? {
|
|
147
|
+
partialMatch: !0
|
|
148
|
+
// matchedChars: ...
|
|
149
|
+
} : void 0;
|
|
150
|
+
case "[]":
|
|
151
|
+
for (var b = p(e.args), m; !(m = b()).done; ) {
|
|
152
|
+
var y = m.value;
|
|
153
|
+
if (r[0] === y)
|
|
154
|
+
return r.length === 1 ? {
|
|
155
|
+
match: !0,
|
|
156
|
+
matchedChars: r
|
|
157
|
+
} : t ? {
|
|
158
|
+
overflow: !0
|
|
159
|
+
} : {
|
|
160
|
+
match: !0,
|
|
161
|
+
matchedChars: [y]
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
return;
|
|
165
|
+
/* istanbul ignore next */
|
|
166
|
+
default:
|
|
167
|
+
throw new Error("Unsupported instruction tree: ".concat(e));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
export {
|
|
171
|
+
E as default
|
|
172
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function s(t){"@babel/helpers - typeof";return s=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},s(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,g(n.key),n)}}function p(t,e,r){return e&&l(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t){var e=x(t,"string");return s(e)=="symbol"?e:e+""}function x(t,e){if(s(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(s(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var b=(function(){function t(){f(this,t)}return p(t,[{key:"parse",value:function(r){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(r),this.context.length!==1)throw new Error("Non-finalized contexts left when pattern parse ended");var n=this.context[0],i=n.branches,o=n.instructions;if(i)return{op:"|",args:i.concat([a(o)])};if(o.length===0)throw new Error("Pattern is required");return o.length===1?o[0]:o}},{key:"startContext",value:function(r){this.context.push(r)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(r){if(!r)throw new Error("Pattern is required");var n=r.match(y);if(!n){if(w.test(r))throw new Error("Illegal characters found in a pattern: ".concat(r));this.getContext().instructions=this.getContext().instructions.concat(r.split(""));return}var i=n[1],o=r.slice(0,n.index),c=r.slice(n.index+i.length);switch(i){case"(?:":o&&this.parsePattern(o),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(o&&this.parsePattern(o),this.getContext().instructions.length===0)throw new Error('No instructions found after "|" operator in an "or" group');var h=this.getContext(),u=h.branches;u.push(a(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:u});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(o&&this.parsePattern(o),!this.getContext().branches)if(this.context.length===1)this.getContext().branches=[];else throw new Error('"branches" not found in an "or" group context');this.getContext().branches.push(a(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":o&&this.parsePattern(o),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:C(o)});break;default:throw new Error("Unknown operator: ".concat(i))}c&&this.parsePattern(c)}}])})();function C(t){for(var e=[],r=0;r<t.length;){if(t[r]==="-"){if(r===0||r===t.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(t));for(var n=t[r-1].charCodeAt(0)+1,i=t[r+1].charCodeAt(0)-1,o=n;o<=i;)e.push(String.fromCharCode(o)),o++}else e.push(t[r]);r++}return e}var w=/[\(\)\[\]\?\:\|]/,y=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function a(t){return t.length===1?t[0]:t}module.exports=b;
|