@caspeco/casper-ui-library 10.5.0 → 10.5.1
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/components/phone-input/country-data.d.ts +1 -1
- package/dist/components/phone-input/country-data.d.ts.map +1 -1
- package/dist/components/phone-input/country-data.js +2 -2
- package/dist/components/phone-input/country-list.d.ts +1 -1
- package/dist/components/phone-input/country-list.d.ts.map +1 -1
- package/dist/components/phone-input/country-list.js +1 -0
- package/dist/components/phone-input/country-selector.d.ts +1 -1
- package/dist/components/phone-input/country-selector.d.ts.map +1 -1
- package/dist/components/phone-input/phone-input-helpers.d.ts +1 -1
- package/dist/components/phone-input/phone-input-helpers.d.ts.map +1 -1
- package/dist/components/phone-input/phone-input-helpers.js +5 -5
- package/dist/components/phone-input/types.d.ts +1 -1
- package/dist/components/phone-input/types.d.ts.map +1 -1
- package/dist/components/phone-input/use-phone-input.d.ts +1 -1
- package/dist/components/phone-input/use-phone-input.d.ts.map +1 -1
- package/dist/components/phone-input/use-phone-input.js +1 -1
- package/dist/node_modules/libphonenumber-js/es6-modern/ParseError.js +8 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/PhoneNumber.js +73 -0
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/constants.js +1 -1
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/format.js +22 -22
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/getCountries.js +1 -1
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/RFC3966.js +8 -0
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/applyInternationalSeparatorStyle.js +1 -1
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/checkNumberLength.js +6 -6
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/extension/createExtensionPattern.js +2 -4
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/extension/extractExtension.js +4 -3
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/extractCountryCallingCode.js +15 -14
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +21 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +21 -0
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/extractNationalNumber.js +7 -7
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +27 -0
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/extractPhoneContext.js +4 -3
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/formatNationalNumberUsingFormat.js +9 -0
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/getCountryAndCallingCodeFromOneOfThem.js +2 -1
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/getCountryByCallingCode.js +8 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/getCountryByNationalNumber.js +14 -0
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/getIddPrefix.js +2 -2
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/getNumberType.js +30 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/getPossibleCountriesForNumber.js +12 -0
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/isCallingCode.js +1 -1
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/isCountryCode.js +1 -1
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/isObject.js +1 -1
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/isViablePhoneNumber.js +1 -1
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/matchesEntirely.js +1 -1
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/mergeArrays.js +8 -0
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/parseDigits.js +1 -1
- package/dist/node_modules/libphonenumber-js/es6-modern/helpers/stripIddPrefix.js +16 -0
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/isPossible.js +2 -2
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/isValid.js +3 -3
- package/dist/node_modules/libphonenumber-js/es6-modern/isValidPhoneNumber.js +20 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/metadata.js +254 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/normalizeArguments.js +26 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/parse.js +100 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/parseIncompletePhoneNumber.js +19 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/parsePhoneNumber.js +9 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/parsePhoneNumberWithError_.js +16 -0
- package/dist/node_modules/libphonenumber-js/es6-modern/parsePhoneNumber_.js +24 -0
- package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/tools/semver-compare.js +1 -1
- package/dist/node_modules/libphonenumber-js/max/es6/exports/PhoneNumber.js +10 -0
- package/dist/node_modules/libphonenumber-js/max/es6/exports/getCountries.js +8 -0
- package/dist/node_modules/libphonenumber-js/max/es6/exports/getCountryCallingCode.js +8 -0
- package/dist/node_modules/libphonenumber-js/max/es6/exports/isSupportedCountry.js +8 -0
- package/dist/node_modules/libphonenumber-js/max/es6/exports/isValidPhoneNumber.js +8 -0
- package/dist/node_modules/libphonenumber-js/max/es6/exports/parsePhoneNumber.js +9 -0
- package/dist/node_modules/libphonenumber-js/max/es6/exports/withMetadataArgument.js +10 -0
- package/dist/node_modules/libphonenumber-js/{metadata.min.json.js → metadata.max.json.js} +3313 -254
- package/package.json +1 -1
- package/dist/node_modules/libphonenumber-js/es6/ParseError.js +0 -116
- package/dist/node_modules/libphonenumber-js/es6/PhoneNumber.js +0 -164
- package/dist/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +0 -9
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -21
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +0 -18
- package/dist/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -27
- package/dist/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +0 -11
- package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +0 -7
- package/dist/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +0 -43
- package/dist/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +0 -61
- package/dist/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -14
- package/dist/node_modules/libphonenumber-js/es6/helpers/mergeArrays.js +0 -39
- package/dist/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +0 -18
- package/dist/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +0 -62
- package/dist/node_modules/libphonenumber-js/es6/metadata.js +0 -474
- package/dist/node_modules/libphonenumber-js/es6/normalizeArguments.js +0 -110
- package/dist/node_modules/libphonenumber-js/es6/parse.js +0 -103
- package/dist/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +0 -48
- package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +0 -9
- package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +0 -58
- package/dist/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +0 -66
- package/dist/node_modules/libphonenumber-js/min/exports/getCountries.js +0 -8
- package/dist/node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js +0 -8
- package/dist/node_modules/libphonenumber-js/min/exports/isSupportedCountry.js +0 -8
- package/dist/node_modules/libphonenumber-js/min/exports/isValidPhoneNumber.js +0 -8
- package/dist/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +0 -8
- package/dist/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CountryCode } from 'libphonenumber-js';
|
|
1
|
+
import { CountryCode } from 'libphonenumber-js/max/es6';
|
|
2
2
|
import { Locales } from './translations.js';
|
|
3
3
|
/** Lowercases and strips diacritics for accent-insensitive search (e.g. "espana" matches "España"). */
|
|
4
4
|
export declare function normalizeForSearch(value: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country-data.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/country-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"country-data.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/country-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,uGAAuG;AACvG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxD;AAQD,+DAA+D;AAC/D,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;CACnB;AAgBD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,WAAW,EAAE,CAmBpE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getCountries as e } from "../../node_modules/libphonenumber-js/
|
|
2
|
-
import { getCountryCallingCode as t } from "../../node_modules/libphonenumber-js/
|
|
1
|
+
import { getCountries as e } from "../../node_modules/libphonenumber-js/max/es6/exports/getCountries.js";
|
|
2
|
+
import { getCountryCallingCode as t } from "../../node_modules/libphonenumber-js/max/es6/exports/getCountryCallingCode.js";
|
|
3
3
|
//#region lib/components/phone-input/country-data.ts
|
|
4
4
|
function n(e) {
|
|
5
5
|
return e.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country-list.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/country-list.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"country-list.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/country-list.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMlD,UAAU,gBAAgB;IACzB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,uEAAuE;IACvE,UAAU,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,SAAS,CAAC;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wEAAwE;IACxE,YAAY,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,UAAkB,EAAE,YAAY,EAAE,EAAE,gBAAgB,+BA4CpG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Placement } from '../combobox/index.js';
|
|
2
|
-
import { CountryCode } from 'libphonenumber-js';
|
|
2
|
+
import { CountryCode } from 'libphonenumber-js/max/es6';
|
|
3
3
|
import { default as React } from 'react';
|
|
4
4
|
import { Locales } from './translations.js';
|
|
5
5
|
export interface CountrySelectorProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"country-selector.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/country-selector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAWvD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"country-selector.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/country-selector.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAWvD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAA0B,MAAM,OAAO,CAAC;AAG/C,OAAO,EAAgB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AA2B5D,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAEzC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEjC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,iDAAiD;IACjD,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B,8BAA8B;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,WAAW,EACX,UAAkB,EAClB,IAAW,EACX,aAAa,EACb,MAAgB,EAChB,UAAkB,GAClB,EAAE,oBAAoB,qBAiHtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone-input-helpers.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/phone-input-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAMN,KAAK,WAAW,EAChB,MAAM,
|
|
1
|
+
{"version":3,"file":"phone-input-helpers.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/phone-input-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAMN,KAAK,WAAW,EAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAgB,KAAK,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,MAAM,0BAA0B,GAAG;IACxC,kFAAkF;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,yFAAyF;IACzF,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,iCAAiC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE,0BAA+B,GACtC,qBAAqB,CAmBvB;AAED,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAE7E;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAalE;AAED,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAQjF;AASD,gHAAgH;AAChH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAE/E;AAED,4FAA4F;AAC5F,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAEpF;AA+BD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CA6B7E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,GAAG,WAAW,GAAG,SAAS,CAUvG;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAgB3D;AA+BD,8FAA8F;AAC9F,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,EAAE,MAAM,EAAE,OAAO,GAAG,WAAW,CAKpG"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { parsePhoneNumber as e } from "../../node_modules/libphonenumber-js/
|
|
2
|
-
import { isValidPhoneNumber as t } from "../../node_modules/libphonenumber-js/
|
|
3
|
-
import { isSupportedCountry as n } from "../../node_modules/libphonenumber-js/
|
|
4
|
-
import { getCountries as r } from "../../node_modules/libphonenumber-js/
|
|
5
|
-
import { getCountryCallingCode as i } from "../../node_modules/libphonenumber-js/
|
|
1
|
+
import { parsePhoneNumber as e } from "../../node_modules/libphonenumber-js/max/es6/exports/parsePhoneNumber.js";
|
|
2
|
+
import { isValidPhoneNumber as t } from "../../node_modules/libphonenumber-js/max/es6/exports/isValidPhoneNumber.js";
|
|
3
|
+
import { isSupportedCountry as n } from "../../node_modules/libphonenumber-js/max/es6/exports/isSupportedCountry.js";
|
|
4
|
+
import { getCountries as r } from "../../node_modules/libphonenumber-js/max/es6/exports/getCountries.js";
|
|
5
|
+
import { getCountryCallingCode as i } from "../../node_modules/libphonenumber-js/max/es6/exports/getCountryCallingCode.js";
|
|
6
6
|
import { translations as a } from "./translations.js";
|
|
7
7
|
//#region lib/components/phone-input/phone-input-helpers.ts
|
|
8
8
|
function o(e, n, r = {}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputProps } from '../input/index.js';
|
|
2
|
-
import { CountryCode } from 'libphonenumber-js';
|
|
2
|
+
import { CountryCode } from 'libphonenumber-js/max/es6';
|
|
3
3
|
import { ChangeEvent, FocusEvent, Ref } from 'react';
|
|
4
4
|
import { Locales } from './translations.js';
|
|
5
5
|
export type { CountryCode };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACrD,MAAM,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAClD,kCAAkC;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,eAAe,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAChD,0FAA0F;IAC1F,aAAa,EAAE,OAAO,CAAC;IACvB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,sBAAsB,GACnD,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,GAAG,cAAc,GAAG,WAAW,CAAC,GAAG;IACrF,gEAAgE;IAChE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,uFAAuF;IACvF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-phone-input.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/use-phone-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"use-phone-input.d.ts","sourceRoot":"","sources":["../../../lib/components/phone-input/use-phone-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAapF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAK7E,MAAM,MAAM,oBAAoB,GAAG;IAClC,+EAA+E;IAC/E,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,6HAA6H;IAC7H,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAEvD,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,kCAAkC;IAClC,UAAU,EAAE,sBAAsB,CAAC;IAEnC,mDAAmD;IACnD,gBAAgB,EAAE;QAAE,UAAU,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IAE9D,4FAA4F;IAC5F,KAAK,EAAE,MAAM,CAAC;IAEd,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IAEb,uBAAuB;IACvB,OAAO,EAAE,WAAW,CAAC;IAErB,6FAA6F;IAC7F,OAAO,EAAE,OAAO,CAAC;IAEjB,oGAAoG;IACpG,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAE3C,kKAAkK;IAClK,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAElC,4FAA4F;IAC5F,QAAQ,EAAE,MAAM,qBAAqB,CAAC;IAEtC,kCAAkC;IAClC,KAAK,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,mBAAmB,CA2HrF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { require_compiler_runtime as e } from "../../node_modules/react/compiler-runtime.js";
|
|
2
|
-
import { getCountryCallingCode as t } from "../../node_modules/libphonenumber-js/
|
|
2
|
+
import { getCountryCallingCode as t } from "../../node_modules/libphonenumber-js/max/es6/exports/getCountryCallingCode.js";
|
|
3
3
|
import { detectCountryChange as n, detectCountryFromInput as r, extractNationalNumber as i, formatPhoneNumber as ee, isIncompletePhoneNumber as te, isUnknownCallingCode as ne, resolveInitialCountry as re, toE164 as ie, validatePhoneNumber as ae } from "./phone-input-helpers.js";
|
|
4
4
|
import { useState as a } from "react";
|
|
5
5
|
//#region lib/components/phone-input/use-phone-input.ts
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import e from "./helpers/isObject.js";
|
|
2
|
+
import t, { validateMetadata as n } from "./metadata.js";
|
|
3
|
+
import r from "./isPossible.js";
|
|
4
|
+
import i from "./helpers/getNumberType.js";
|
|
5
|
+
import a from "./isValid.js";
|
|
6
|
+
import o from "./helpers/getCountryAndCallingCodeFromOneOfThem.js";
|
|
7
|
+
import s from "./helpers/getPossibleCountriesForNumber.js";
|
|
8
|
+
import c from "./helpers/extractCountryCallingCode.js";
|
|
9
|
+
import l from "./format.js";
|
|
10
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/PhoneNumber.js
|
|
11
|
+
function u() {
|
|
12
|
+
return u = Object.assign ? Object.assign.bind() : function(e) {
|
|
13
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
14
|
+
var n = arguments[t];
|
|
15
|
+
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
16
|
+
}
|
|
17
|
+
return e;
|
|
18
|
+
}, u.apply(null, arguments);
|
|
19
|
+
}
|
|
20
|
+
var d = class {
|
|
21
|
+
constructor(t, r, i) {
|
|
22
|
+
if (!t) throw TypeError("First argument is required");
|
|
23
|
+
if (typeof t != "string") throw TypeError("First argument must be a string");
|
|
24
|
+
if (t[0] === "+" && !r) throw TypeError("`metadata` argument not passed");
|
|
25
|
+
if (e(r) && e(r.countries)) {
|
|
26
|
+
i = r;
|
|
27
|
+
let e = t;
|
|
28
|
+
if (!f.test(e)) throw Error("Invalid `number` argument passed: must consist of a \"+\" followed by digits");
|
|
29
|
+
let { countryCallingCode: n, number: a } = c(e, void 0, void 0, void 0, i);
|
|
30
|
+
if (r = a, t = n, !r) throw Error("Invalid `number` argument passed: too short");
|
|
31
|
+
}
|
|
32
|
+
if (!r) throw TypeError("`nationalNumber` argument is required");
|
|
33
|
+
if (typeof r != "string") throw TypeError("`nationalNumber` argument must be a string");
|
|
34
|
+
n(i);
|
|
35
|
+
let { country: a, callingCode: s } = o(t, i);
|
|
36
|
+
this.country = a, this.countryCallingCode = s, this.nationalNumber = r, this.number = "+" + this.countryCallingCode + this.nationalNumber, this.getMetadata = () => i;
|
|
37
|
+
}
|
|
38
|
+
setExt(e) {
|
|
39
|
+
this.ext = e;
|
|
40
|
+
}
|
|
41
|
+
getPossibleCountries() {
|
|
42
|
+
return this.country ? [this.country] : s(this.countryCallingCode, this.nationalNumber, this.getMetadata());
|
|
43
|
+
}
|
|
44
|
+
isPossible() {
|
|
45
|
+
return r(this, { v2: !0 }, this.getMetadata());
|
|
46
|
+
}
|
|
47
|
+
isValid() {
|
|
48
|
+
return a(this, { v2: !0 }, this.getMetadata());
|
|
49
|
+
}
|
|
50
|
+
isNonGeographic() {
|
|
51
|
+
return new t(this.getMetadata()).isNonGeographicCallingCode(this.countryCallingCode);
|
|
52
|
+
}
|
|
53
|
+
isEqual(e) {
|
|
54
|
+
return this.number === e.number && this.ext === e.ext;
|
|
55
|
+
}
|
|
56
|
+
getType() {
|
|
57
|
+
return i(this, { v2: !0 }, this.getMetadata());
|
|
58
|
+
}
|
|
59
|
+
format(e, t) {
|
|
60
|
+
return l(this, e, t ? u({}, t, { v2: !0 }) : { v2: !0 }, this.getMetadata());
|
|
61
|
+
}
|
|
62
|
+
formatNational(e) {
|
|
63
|
+
return this.format("NATIONAL", e);
|
|
64
|
+
}
|
|
65
|
+
formatInternational(e) {
|
|
66
|
+
return this.format("INTERNATIONAL", e);
|
|
67
|
+
}
|
|
68
|
+
getURI(e) {
|
|
69
|
+
return this.format("RFC3966", e);
|
|
70
|
+
}
|
|
71
|
+
}, f = /^\+\d+$/;
|
|
72
|
+
//#endregion
|
|
73
|
+
export { d as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/libphonenumber-js/es6/constants.js
|
|
1
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/constants.js
|
|
2
2
|
var e = "0-90-9٠-٩۰-۹", t = "-‐-―−ー-", n = "//", r = "..", i = " \xA0 ", a = `${t}${n}${r}${i}()()[]\\[\\]~⁓∼~`, o = "++";
|
|
3
3
|
//#endregion
|
|
4
4
|
export { o as PLUS_CHARS, e as VALID_DIGITS, a as VALID_PUNCTUATION, i as WHITESPACE };
|
|
@@ -3,19 +3,17 @@ import n from "./helpers/matchesEntirely.js";
|
|
|
3
3
|
import r from "./helpers/formatNationalNumberUsingFormat.js";
|
|
4
4
|
import i from "./helpers/getIddPrefix.js";
|
|
5
5
|
import { formatRFC3966 as a } from "./helpers/RFC3966.js";
|
|
6
|
-
//#region ../../node_modules/libphonenumber-js/es6/format.js
|
|
7
|
-
var o = { formatExtension:
|
|
8
|
-
return `${e}${n.ext()}${t}`;
|
|
9
|
-
} };
|
|
6
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/format.js
|
|
7
|
+
var o = { formatExtension: (e, t, n) => `${e}${n.ext()}${t}` };
|
|
10
8
|
function s(t, n, r, i) {
|
|
11
9
|
r = r ? f({}, o, r) : o;
|
|
12
|
-
|
|
10
|
+
let s = new e(i);
|
|
13
11
|
if (t.country && t.country !== "001") {
|
|
14
12
|
if (!s.hasCountry(t.country)) throw Error(`Unknown country: ${t.country}`);
|
|
15
13
|
s.selectNumberingPlan(t.country);
|
|
16
14
|
} else if (t.countryCallingCode) s.selectNumberingPlan(t.countryCallingCode);
|
|
17
15
|
else return t.phone || "";
|
|
18
|
-
|
|
16
|
+
let l = s.countryCallingCode(), p = r.v2 ? t.nationalNumber : t.phone, m;
|
|
19
17
|
switch (n) {
|
|
20
18
|
case "NATIONAL": return p ? (m = c(p, t.carrierCode, "NATIONAL", s, r), u(m, t.ext, s, r.formatExtension)) : "";
|
|
21
19
|
case "INTERNATIONAL": return p ? (m = c(p, null, "INTERNATIONAL", s, r), m = `+${l} ${m}`, u(m, t.ext, s, r.formatExtension)) : `+${l}`;
|
|
@@ -26,13 +24,13 @@ function s(t, n, r, i) {
|
|
|
26
24
|
});
|
|
27
25
|
case "IDD":
|
|
28
26
|
if (!r.fromCountry) return;
|
|
29
|
-
|
|
30
|
-
return
|
|
27
|
+
let e = d(p, t.carrierCode, l, r.fromCountry, s);
|
|
28
|
+
return e ? u(e, t.ext, s, r.formatExtension) : void 0;
|
|
31
29
|
default: throw Error(`Unknown "format" argument passed to "formatNumber()": "${n}"`);
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
32
|
function c(e, t, n, i, a) {
|
|
35
|
-
|
|
33
|
+
let o = l(i.formats(), e);
|
|
36
34
|
return o ? r(e, o, {
|
|
37
35
|
useInternationalFormat: n === "INTERNATIONAL",
|
|
38
36
|
withNationalPrefix: !(o.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && a && a.nationalPrefix === !1),
|
|
@@ -41,10 +39,10 @@ function c(e, t, n, i, a) {
|
|
|
41
39
|
}) : e;
|
|
42
40
|
}
|
|
43
41
|
function l(e, t) {
|
|
44
|
-
return p(e,
|
|
42
|
+
return p(e, (e) => {
|
|
45
43
|
if (e.leadingDigitsPatterns().length > 0) {
|
|
46
|
-
|
|
47
|
-
if (t.search(
|
|
44
|
+
let n = e.leadingDigitsPatterns()[e.leadingDigitsPatterns().length - 1];
|
|
45
|
+
if (t.search(n) !== 0) return !1;
|
|
48
46
|
}
|
|
49
47
|
return n(t, e.pattern());
|
|
50
48
|
});
|
|
@@ -54,21 +52,23 @@ function u(e, t, n, r) {
|
|
|
54
52
|
}
|
|
55
53
|
function d(e, n, r, a, o) {
|
|
56
54
|
if (t(a, o.metadata) === r) {
|
|
57
|
-
|
|
58
|
-
return r === "1" ? r + " " +
|
|
55
|
+
let t = c(e, n, "NATIONAL", o);
|
|
56
|
+
return r === "1" ? r + " " + t : t;
|
|
59
57
|
}
|
|
60
|
-
|
|
61
|
-
if (
|
|
58
|
+
let s = i(a, void 0, o.metadata);
|
|
59
|
+
if (s) return `${s} ${r} ${c(e, null, "INTERNATIONAL", o)}`;
|
|
62
60
|
}
|
|
63
|
-
function f() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
e
|
|
61
|
+
function f(...e) {
|
|
62
|
+
let t = 1;
|
|
63
|
+
for (; t < e.length;) {
|
|
64
|
+
if (e[t]) for (let n in e[t]) e[0][n] = e[t][n];
|
|
65
|
+
t++;
|
|
67
66
|
}
|
|
68
|
-
return
|
|
67
|
+
return e[0];
|
|
69
68
|
}
|
|
70
69
|
function p(e, t) {
|
|
71
|
-
|
|
70
|
+
let n = 0;
|
|
71
|
+
for (; n < e.length;) {
|
|
72
72
|
if (t(e[n])) return e[n];
|
|
73
73
|
n++;
|
|
74
74
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/RFC3966.js
|
|
2
|
+
function e({ number: e, ext: t }) {
|
|
3
|
+
if (!e) return "";
|
|
4
|
+
if (e[0] !== "+") throw Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
|
|
5
|
+
return `tel:${e}${t ? ";ext=" + t : ""}`;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { e as formatRFC3966 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VALID_PUNCTUATION as e } from "../constants.js";
|
|
2
|
-
//#region ../../node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js
|
|
2
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/applyInternationalSeparatorStyle.js
|
|
3
3
|
function t(t) {
|
|
4
4
|
return t.replace(RegExp(`[${e}]+`, "g"), " ").trim();
|
|
5
5
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import e from "../metadata.js";
|
|
2
2
|
import t from "./mergeArrays.js";
|
|
3
|
-
//#region ../../node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/checkNumberLength.js
|
|
4
4
|
function n(e, t, n) {
|
|
5
5
|
return r(e, void 0, t, n);
|
|
6
6
|
}
|
|
7
7
|
function r(n, i, a, o) {
|
|
8
8
|
a && (o = new e(o.metadata), o.selectNumberingPlan(a));
|
|
9
|
-
|
|
9
|
+
let s = o.type(i), c = s && s.possibleLengths() || o.possibleLengths();
|
|
10
10
|
if (!c) return "IS_POSSIBLE";
|
|
11
11
|
if (i === "FIXED_LINE_OR_MOBILE") {
|
|
12
12
|
/* istanbul ignore next */
|
|
13
13
|
if (!o.type("FIXED_LINE")) return r(n, "MOBILE", a, o);
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
let e = o.type("MOBILE");
|
|
15
|
+
e && (c = t(c, e.possibleLengths()));
|
|
16
16
|
} else if (i && !s) return "INVALID_LENGTH";
|
|
17
|
-
|
|
18
|
-
return
|
|
17
|
+
let l = n.length, u = c[0];
|
|
18
|
+
return u === l ? "IS_POSSIBLE" : u > l ? "TOO_SHORT" : c[c.length - 1] < l ? "TOO_LONG" : c.indexOf(l, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
export { r as checkNumberLengthForType, n as default };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { VALID_DIGITS as e } from "../../constants.js";
|
|
2
|
-
//#region ../../node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js
|
|
3
|
-
var t = ";ext=", n =
|
|
4
|
-
return `([${e}]{1,${t}})`;
|
|
5
|
-
};
|
|
2
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/extension/createExtensionPattern.js
|
|
3
|
+
var t = ";ext=", n = (t) => `([${e}]{1,${t}})`;
|
|
6
4
|
function r(e) {
|
|
7
5
|
var r = "20", i = "15", a = "9", o = "6", s = "[ \xA0\\t,]*", c = "[:\\..]?[ \xA0\\t,-]*", l = "#?", u = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", d = "(?:[xx##~~]|int|int)", f = "[- ]+", p = "[ \xA0\\t]*", m = "(?:,{2}|;)", h = t + n(r), g = s + u + c + n(r) + l, _ = s + d + c + n(a) + l, v = f + n(o) + "#", y = p + m + c + n(i) + l, b = p + "(?:,)+" + c + n(a) + l;
|
|
8
6
|
return h + "|" + g + "|" + _ + "|" + v + "|" + y + "|" + b;
|
package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/extension/extractExtension.js
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import e from "./createExtensionPattern.js";
|
|
2
|
-
//#region ../../node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js
|
|
2
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/extension/extractExtension.js
|
|
3
3
|
var t = RegExp("(?:" + e() + ")$", "i");
|
|
4
4
|
function n(e) {
|
|
5
|
-
|
|
5
|
+
let n = e.search(t);
|
|
6
6
|
if (n < 0) return {};
|
|
7
|
-
|
|
7
|
+
let r = e.slice(0, n), i = e.match(t), a = 1;
|
|
8
|
+
for (; a < i.length;) {
|
|
8
9
|
if (i[a]) return {
|
|
9
10
|
number: r,
|
|
10
11
|
ext: i[a]
|
package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/extractCountryCallingCode.js
RENAMED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import e from "../metadata.js";
|
|
2
2
|
import t from "./stripIddPrefix.js";
|
|
3
3
|
import n from "./extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js";
|
|
4
|
-
//#region ../../node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js
|
|
4
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/extractCountryCallingCode.js
|
|
5
5
|
function r(r, i, a, o, s) {
|
|
6
6
|
if (!r) return {};
|
|
7
|
-
|
|
7
|
+
let c;
|
|
8
8
|
if (r[0] !== "+") {
|
|
9
|
-
|
|
10
|
-
if (
|
|
9
|
+
let e = t(r, i || a, o, s);
|
|
10
|
+
if (e && e !== r) c = !0, r = "+" + e;
|
|
11
11
|
else {
|
|
12
12
|
if (i || a || o) {
|
|
13
|
-
|
|
14
|
-
if (
|
|
13
|
+
let { countryCallingCode: e, number: t } = n(r, i, a, o, s);
|
|
14
|
+
if (e) return {
|
|
15
15
|
countryCallingCodeSource: "FROM_NUMBER_WITHOUT_PLUS_SIGN",
|
|
16
|
-
countryCallingCode:
|
|
17
|
-
number:
|
|
16
|
+
countryCallingCode: e,
|
|
17
|
+
number: t
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
return { number: r };
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
if (r[1] === "0") return {};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
let l = new e(s), u = 2;
|
|
25
|
+
for (; u - 1 <= 3 && u <= r.length;) {
|
|
26
|
+
let e = r.slice(1, u);
|
|
27
|
+
if (l.hasCallingCode(e)) return l.selectNumberingPlan(e), {
|
|
27
28
|
countryCallingCodeSource: c ? "FROM_NUMBER_WITH_IDD" : "FROM_NUMBER_WITH_PLUS_SIGN",
|
|
28
|
-
countryCallingCode:
|
|
29
|
-
number: r.slice(
|
|
29
|
+
countryCallingCode: e,
|
|
30
|
+
number: r.slice(u)
|
|
30
31
|
};
|
|
31
|
-
|
|
32
|
+
u++;
|
|
32
33
|
}
|
|
33
34
|
return {};
|
|
34
35
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import e, { getCountryCallingCode as t } from "../metadata.js";
|
|
2
|
+
import n from "./checkNumberLength.js";
|
|
3
|
+
import r from "./matchesEntirely.js";
|
|
4
|
+
import i from "./extractNationalNumber.js";
|
|
5
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js
|
|
6
|
+
function a(a, o, s, c, l) {
|
|
7
|
+
if (!(o || s || c)) return { number: a };
|
|
8
|
+
let u = o || s ? t(o || s, l) : c;
|
|
9
|
+
if (a.indexOf(u) === 0) {
|
|
10
|
+
let t = new e(l);
|
|
11
|
+
t.selectNumberingPlan(o || s || c);
|
|
12
|
+
let d = a.slice(u.length), { nationalNumber: f } = i(d, void 0, t), { nationalNumber: p } = i(a, void 0, t);
|
|
13
|
+
if (!r(p, t.nationalNumberPattern()) && r(f, t.nationalNumberPattern()) || n(p, void 0, t) === "TOO_LONG") return {
|
|
14
|
+
countryCallingCode: u,
|
|
15
|
+
number: d
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return { number: a };
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { a as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import e from "../ParseError.js";
|
|
2
|
+
import t, { RFC3966_ISDN_SUBADDRESS_ as n, RFC3966_PHONE_CONTEXT_ as r, RFC3966_PREFIX_ as i, isPhoneContextValid as a } from "./extractPhoneContext.js";
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js
|
|
4
|
+
function o(o, { extractFormattedPhoneNumber: s }) {
|
|
5
|
+
let c = t(o);
|
|
6
|
+
if (!a(c)) throw new e("NOT_A_NUMBER");
|
|
7
|
+
let l;
|
|
8
|
+
if (c === null) l = s(o) || "";
|
|
9
|
+
else {
|
|
10
|
+
l = "", c.charAt(0) === "+" && (l += c);
|
|
11
|
+
let e = o.indexOf(i), t;
|
|
12
|
+
/* istanbul ignore else */
|
|
13
|
+
t = e >= 0 ? e + i.length : 0;
|
|
14
|
+
let n = o.indexOf(r);
|
|
15
|
+
l += o.substring(t, n);
|
|
16
|
+
}
|
|
17
|
+
let u = l.indexOf(n);
|
|
18
|
+
if (u > 0 && (l = l.substring(0, u)), l !== "") return l;
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { o as default };
|
package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/extractNationalNumber.js
RENAMED
|
@@ -2,15 +2,15 @@ import e from "./checkNumberLength.js";
|
|
|
2
2
|
import t from "./matchesEntirely.js";
|
|
3
3
|
import n from "./extractNationalNumberFromPossiblyIncompleteNumber.js";
|
|
4
4
|
import r from "./getCountryByCallingCode.js";
|
|
5
|
-
//#region ../../node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js
|
|
5
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/extractNationalNumber.js
|
|
6
6
|
function i(e, t, i) {
|
|
7
|
-
|
|
8
|
-
return
|
|
9
|
-
nationalNumber:
|
|
7
|
+
let { carrierCode: s, nationalNumber: c } = n(e, i);
|
|
8
|
+
return c !== e && (!a(e, c, i) || i.numberingPlan.possibleLengths() && (t ||= r(i.numberingPlan.callingCode(), {
|
|
9
|
+
nationalNumber: c,
|
|
10
10
|
metadata: i
|
|
11
|
-
}), !o(
|
|
12
|
-
nationalNumber:
|
|
13
|
-
carrierCode:
|
|
11
|
+
}), !o(c, t, i))) ? { nationalNumber: e } : {
|
|
12
|
+
nationalNumber: c,
|
|
13
|
+
carrierCode: s
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
function a(e, n, r) {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
if (e && t.numberingPlan.nationalPrefixForParsing()) {
|
|
4
|
+
let n = RegExp("^(?:" + t.numberingPlan.nationalPrefixForParsing() + ")"), r = n.exec(e);
|
|
5
|
+
if (r) {
|
|
6
|
+
let i, a, o = r.length - 1, s = o > 0 && r[o];
|
|
7
|
+
if (t.nationalPrefixTransformRule() && s) i = e.replace(n, t.nationalPrefixTransformRule()), o > 1 && (a = r[1]);
|
|
8
|
+
else {
|
|
9
|
+
let t = r[0];
|
|
10
|
+
i = e.slice(t.length), s && (a = r[1]);
|
|
11
|
+
}
|
|
12
|
+
let c;
|
|
13
|
+
if (s) {
|
|
14
|
+
let n = e.indexOf(r[1]);
|
|
15
|
+
e.slice(0, n) === t.numberingPlan.nationalPrefix() && (c = t.numberingPlan.nationalPrefix());
|
|
16
|
+
} else c = r[0];
|
|
17
|
+
return {
|
|
18
|
+
nationalNumber: i,
|
|
19
|
+
nationalPrefix: c,
|
|
20
|
+
carrierCode: a
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return { nationalNumber: e };
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { e as default };
|
package/dist/node_modules/libphonenumber-js/{es6 → es6-modern}/helpers/extractPhoneContext.js
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { VALID_DIGITS as e } from "../constants.js";
|
|
2
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/extractPhoneContext.js
|
|
2
3
|
var t = "([" + e + "]|[\\-\\.\\(\\)]?)", n = "^\\+" + t + "*[" + e + "]" + t + "*$", r = new RegExp(n, "g"), i = e, a = "[" + i + "]+((\\-)*[" + i + "])*", o = "[a-zA-Z]+((\\-)*[" + i + "])*", s = "^(" + a + "\\.)*" + o + "\\.?$", c = new RegExp(s, "g"), l = "tel:", u = ";phone-context=", d = ";isub=";
|
|
3
4
|
function f(e) {
|
|
4
|
-
|
|
5
|
+
let t = e.indexOf(u);
|
|
5
6
|
if (t < 0) return null;
|
|
6
|
-
|
|
7
|
+
let n = t + 15;
|
|
7
8
|
if (n >= e.length) return "";
|
|
8
|
-
|
|
9
|
+
let r = e.indexOf(";", n);
|
|
9
10
|
return r >= 0 ? e.substring(n, r) : e.substring(n);
|
|
10
11
|
}
|
|
11
12
|
function p(e) {
|
package/dist/node_modules/libphonenumber-js/es6-modern/helpers/formatNationalNumberUsingFormat.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import e from "./applyInternationalSeparatorStyle.js";
|
|
2
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/formatNationalNumberUsingFormat.js
|
|
3
|
+
var t = /(\$\d)/;
|
|
4
|
+
function n(n, r, { useInternationalFormat: i, withNationalPrefix: a, carrierCode: o, metadata: s }) {
|
|
5
|
+
let c = n.replace(new RegExp(r.pattern()), i ? r.internationalFormat() : a && r.nationalPrefixFormattingRule() ? r.format().replace(t, r.nationalPrefixFormattingRule()) : r.format());
|
|
6
|
+
return i ? e(c) : c;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { t as FIRST_GROUP_PATTERN, n as default };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import e from "../metadata.js";
|
|
2
2
|
import t from "./isCountryCode.js";
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/getCountryAndCallingCodeFromOneOfThem.js
|
|
3
4
|
function n(n, r) {
|
|
4
|
-
|
|
5
|
+
let i, a, o = new e(r);
|
|
5
6
|
return t(n) ? (i = n, o.selectNumberingPlan(i), a = o.countryCallingCode()) : a = n, {
|
|
6
7
|
country: i,
|
|
7
8
|
callingCode: a
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import e from "./getCountryByNationalNumber.js";
|
|
2
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/getCountryByCallingCode.js
|
|
3
|
+
function t(t, { nationalNumber: n, metadata: r }) {
|
|
4
|
+
let i = r.getCountryCodesForCallingCode(t);
|
|
5
|
+
if (i) return i.length === 1 ? i[0] : e(n, i, r.metadata);
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import e from "../metadata.js";
|
|
2
|
+
import t from "./getNumberType.js";
|
|
3
|
+
//#region ../../node_modules/libphonenumber-js/es6-modern/helpers/getCountryByNationalNumber.js
|
|
4
|
+
function n(n, r, i) {
|
|
5
|
+
let a = new e(i);
|
|
6
|
+
for (let e of r) if (a.selectNumberingPlan(e), a.leadingDigits()) {
|
|
7
|
+
if (n && n.search(a.leadingDigits()) === 0) return e;
|
|
8
|
+
} else if (t({
|
|
9
|
+
phone: n,
|
|
10
|
+
country: e
|
|
11
|
+
}, void 0, a.metadata)) return e;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { n as default };
|