svelte-tel-input 3.3.4 → 3.3.5
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/utils/helpers.d.ts +1 -1
- package/dist/utils/helpers.js +2 -2
- package/package.json +1 -1
package/dist/utils/helpers.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const capitalize: (str: string) => string;
|
|
|
3
3
|
export declare const getCurrentCountry: () => Promise<string | undefined>;
|
|
4
4
|
export declare const isNumber: (value: number) => boolean;
|
|
5
5
|
export declare const normalizeTelInput: (input?: PhoneNumber) => {
|
|
6
|
-
[k: string]: string | boolean |
|
|
6
|
+
[k: string]: string | boolean | import("libphonenumber-js/types").NationalNumber | E164Number | import("libphonenumber-js/types").CountryCallingCode | null | undefined;
|
|
7
7
|
};
|
|
8
8
|
export declare const generatePlaceholder: (country: CountryCode, { format, spaces }?: {
|
|
9
9
|
format: 'international' | 'national';
|
package/dist/utils/helpers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsYouType, Metadata, getCountryCallingCode, getExampleNumber } from 'libphonenumber-js/max';
|
|
2
|
-
import
|
|
2
|
+
import { examplePhoneNumbers } from '../assets/index.js';
|
|
3
3
|
export const capitalize = (str) => {
|
|
4
4
|
if (!str)
|
|
5
5
|
return '';
|
|
@@ -50,7 +50,7 @@ export const generatePlaceholder = (country, { format, spaces } = {
|
|
|
50
50
|
format: 'national',
|
|
51
51
|
spaces: true
|
|
52
52
|
}) => {
|
|
53
|
-
const examplePhoneNumber = getExampleNumber(country,
|
|
53
|
+
const examplePhoneNumber = getExampleNumber(country, examplePhoneNumbers);
|
|
54
54
|
if (examplePhoneNumber) {
|
|
55
55
|
switch (format) {
|
|
56
56
|
case 'international':
|