@moddi3/ngx-intl-tel-input 3.3.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.
Files changed (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +202 -0
  3. package/esm2020/lib/data/country-code.mjs +1333 -0
  4. package/esm2020/lib/directives/native-element-injector.directive.mjs +33 -0
  5. package/esm2020/lib/enums/country-iso.enum.mjs +247 -0
  6. package/esm2020/lib/enums/phone-number-format.enum.mjs +6 -0
  7. package/esm2020/lib/enums/search-country-field.enum.mjs +8 -0
  8. package/esm2020/lib/interfaces/change-data.mjs +2 -0
  9. package/esm2020/lib/model/country.model.mjs +2 -0
  10. package/esm2020/lib/ngx-intl-tel-input.component.mjs +518 -0
  11. package/esm2020/lib/ngx-intl-tel-input.module.mjs +33 -0
  12. package/esm2020/lib/ngx-intl-tel-input.validator.mjs +61 -0
  13. package/esm2020/moddi3-ngx-intl-tel-input.mjs +5 -0
  14. package/esm2020/public_api.mjs +11 -0
  15. package/fesm2015/moddi3-ngx-intl-tel-input.mjs +2231 -0
  16. package/fesm2015/moddi3-ngx-intl-tel-input.mjs.map +1 -0
  17. package/fesm2020/moddi3-ngx-intl-tel-input.mjs +2231 -0
  18. package/fesm2020/moddi3-ngx-intl-tel-input.mjs.map +1 -0
  19. package/index.d.ts +6 -0
  20. package/lib/data/country-code.d.ts +7 -0
  21. package/lib/data/country-code.d.ts.map +1 -0
  22. package/lib/directives/native-element-injector.directive.d.ts +12 -0
  23. package/lib/directives/native-element-injector.directive.d.ts.map +1 -0
  24. package/lib/enums/country-iso.enum.d.ts +246 -0
  25. package/lib/enums/country-iso.enum.d.ts.map +1 -0
  26. package/lib/enums/phone-number-format.enum.d.ts +5 -0
  27. package/lib/enums/phone-number-format.enum.d.ts.map +1 -0
  28. package/lib/enums/search-country-field.enum.d.ts +7 -0
  29. package/lib/enums/search-country-field.enum.d.ts.map +1 -0
  30. package/lib/interfaces/change-data.d.ts +9 -0
  31. package/lib/interfaces/change-data.d.ts.map +1 -0
  32. package/lib/model/country.model.d.ts +11 -0
  33. package/lib/model/country.model.d.ts.map +1 -0
  34. package/lib/ngx-intl-tel-input.component.d.ts +102 -0
  35. package/lib/ngx-intl-tel-input.component.d.ts.map +1 -0
  36. package/lib/ngx-intl-tel-input.module.d.ts +15 -0
  37. package/lib/ngx-intl-tel-input.module.d.ts.map +1 -0
  38. package/lib/ngx-intl-tel-input.validator.d.ts +6 -0
  39. package/lib/ngx-intl-tel-input.validator.d.ts.map +1 -0
  40. package/moddi3-ngx-intl-tel-input-3.3.1.tgz +0 -0
  41. package/moddi3-ngx-intl-tel-input.d.ts.map +1 -0
  42. package/package.json +63 -0
  43. package/public_api.d.ts +8 -0
  44. package/public_api.d.ts.map +1 -0
@@ -0,0 +1,102 @@
1
+ import { ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { CountryCode } from './data/country-code';
3
+ import { CountryISO } from './enums/country-iso.enum';
4
+ import { SearchCountryField } from './enums/search-country-field.enum';
5
+ import { ChangeData } from './interfaces/change-data';
6
+ import { Country } from './model/country.model';
7
+ import { PhoneNumberFormat } from './enums/phone-number-format.enum';
8
+ import * as i0 from "@angular/core";
9
+ export declare class NgxIntlTelInputComponent implements OnInit, OnChanges {
10
+ private countryCodeData;
11
+ value: string | undefined;
12
+ preferredCountries: Array<string>;
13
+ enablePlaceholder: boolean;
14
+ customPlaceholder: string;
15
+ numberFormat: PhoneNumberFormat;
16
+ cssClass: string;
17
+ onlyCountries: Array<string>;
18
+ enableAutoCountrySelect: boolean;
19
+ searchCountryFlag: boolean;
20
+ searchCountryField: SearchCountryField[];
21
+ searchCountryPlaceholder: string;
22
+ maxLength: number;
23
+ selectFirstCountry: boolean;
24
+ selectedCountryISO: CountryISO;
25
+ phoneValidation: boolean;
26
+ inputId: string;
27
+ separateDialCode: boolean;
28
+ separateDialCodeClass: string;
29
+ readonly countryChange: EventEmitter<Country>;
30
+ selectedCountry: Country;
31
+ phoneNumber: string | undefined;
32
+ allCountries: Array<Country>;
33
+ preferredCountriesInDropDown: Array<Country>;
34
+ phoneUtil: any;
35
+ disabled: boolean;
36
+ errors: Array<any>;
37
+ countrySearchText: string;
38
+ countryList: ElementRef;
39
+ onTouched: () => void;
40
+ propagateChange: (_: ChangeData) => void;
41
+ constructor(countryCodeData: CountryCode);
42
+ ngOnInit(): void;
43
+ ngOnChanges(changes: SimpleChanges): void;
44
+ init(): void;
45
+ setSelectedCountry(country: Country): void;
46
+ /**
47
+ * Search country based on country name, iso2, dialCode or all of them.
48
+ */
49
+ searchCountry(): void;
50
+ onPhoneNumberChange(): void;
51
+ onCountrySelect(country: Country, el: {
52
+ focus: () => void;
53
+ }): void;
54
+ onInputKeyPress(event: KeyboardEvent): void;
55
+ registerOnChange(fn: any): void;
56
+ registerOnTouched(fn: any): void;
57
+ setDisabledState(isDisabled: boolean): void;
58
+ writeValue(obj: any): void;
59
+ resolvePlaceholder(): string;
60
+ /**
61
+ * Returns parse PhoneNumber object.
62
+ * @param phoneNumber string
63
+ * @param countryCode string
64
+ */
65
+ private getParsedNumber;
66
+ /**
67
+ * Adjusts input alignment based on the dial code presentation style.
68
+ */
69
+ private checkSeparateDialCodeStyle;
70
+ /**
71
+ * Cleans dialcode from phone number string.
72
+ * @param phoneNumber string
73
+ */
74
+ private removeDialCode;
75
+ /**
76
+ * Sifts through all countries and returns iso code of the primary country
77
+ * based on the number provided.
78
+ * @param countryCode country code in number format
79
+ * @param number PhoneNumber object
80
+ */
81
+ private getCountryIsoCode;
82
+ /**
83
+ * Gets formatted example phone number from phoneUtil.
84
+ * @param countryCode string
85
+ */
86
+ protected getPhoneNumberPlaceHolder(countryCode: string): string;
87
+ /**
88
+ * Clearing the list to avoid duplicates (https://github.com/webcat12345/ngx-intl-tel-input/issues/248)
89
+ */
90
+ protected fetchCountryData(): void;
91
+ /**
92
+ * Populates preferredCountriesInDropDown with prefferred countries.
93
+ */
94
+ private updatePreferredCountries;
95
+ /**
96
+ * Updates selectedCountry.
97
+ */
98
+ private updateSelectedCountry;
99
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxIntlTelInputComponent, never>;
100
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxIntlTelInputComponent, "ngx-intl-tel-input", never, { "value": "value"; "preferredCountries": "preferredCountries"; "enablePlaceholder": "enablePlaceholder"; "customPlaceholder": "customPlaceholder"; "numberFormat": "numberFormat"; "cssClass": "cssClass"; "onlyCountries": "onlyCountries"; "enableAutoCountrySelect": "enableAutoCountrySelect"; "searchCountryFlag": "searchCountryFlag"; "searchCountryField": "searchCountryField"; "searchCountryPlaceholder": "searchCountryPlaceholder"; "maxLength": "maxLength"; "selectFirstCountry": "selectFirstCountry"; "selectedCountryISO": "selectedCountryISO"; "phoneValidation": "phoneValidation"; "inputId": "inputId"; "separateDialCode": "separateDialCode"; }, { "countryChange": "countryChange"; }, never, never, false, never>;
101
+ }
102
+ //# sourceMappingURL=ngx-intl-tel-input.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-intl-tel-input.component.d.ts","sourceRoot":"","sources":["../../../projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAEN,UAAU,EACV,YAAY,EAGZ,SAAS,EACT,MAAM,EAEN,aAAa,EAEb,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;;AAErE,qBAoBa,wBAAyB,YAAW,MAAM,EAAE,SAAS;IA+CrD,OAAO,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CAAC;KAAE,GAAG,IAAI;IAyCnE,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAwBlD,gBAAgB,CAAC,EAAE,EAAE,GAAG,GAAG,IAAI;IAI/B,iBAAiB,CAAC,EAAE,EAAE,GAAG;IAIzB,gBAAgB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;IAI3C,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAU1B,kBAAkB,IAAI,MAAM;IAc5B;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAYvB;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;;OAGG;IACH,OAAO,CAAC,cAAc;IAYtB;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAmCzB;;;OAGG;IACH,SAAS,CAAC,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAYhE;;OAEG;IACH,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAyBlC;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAahC;;OAEG;IACH,OAAO,CAAC,qBAAqB;yCAnejB,wBAAwB;2CAAxB,wBAAwB;CAqfpC"}
@@ -0,0 +1,15 @@
1
+ import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
2
+ import { ModuleWithProviders } from '@angular/core';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./ngx-intl-tel-input.component";
5
+ import * as i2 from "./directives/native-element-injector.directive";
6
+ import * as i3 from "@angular/common";
7
+ import * as i4 from "@angular/forms";
8
+ import * as i5 from "ngx-bootstrap/dropdown";
9
+ export declare const dropdownModuleForRoot: ModuleWithProviders<BsDropdownModule>;
10
+ export declare class NgxIntlTelInputModule {
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxIntlTelInputModule, never>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxIntlTelInputModule, [typeof i1.NgxIntlTelInputComponent, typeof i2.NativeElementInjectorDirective], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.BsDropdownModule], [typeof i1.NgxIntlTelInputComponent, typeof i2.NativeElementInjectorDirective]>;
13
+ static ɵinj: i0.ɵɵInjectorDeclaration<NgxIntlTelInputModule>;
14
+ }
15
+ //# sourceMappingURL=ngx-intl-tel-input.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-intl-tel-input.module.d.ts","sourceRoot":"","sources":["../../../projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAY,mBAAmB,EAAE,MAAM,eAAe,CAAC;;;;;;;AAM9D,eAAO,MAAM,qBAAqB,EAAE,mBAAmB,CAAC,gBAAgB,CAA8B,CAAC;AAEvG,qBAUa,qBAAqB;yCAArB,qBAAqB;0CAArB,qBAAqB;0CAArB,qBAAqB;CAEjC"}
@@ -0,0 +1,6 @@
1
+ export declare const phoneNumberValidator: (control: any) => {
2
+ validatePhoneNumber: {
3
+ valid: boolean;
4
+ };
5
+ } | undefined;
6
+ //# sourceMappingURL=ngx-intl-tel-input.validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-intl-tel-input.validator.d.ts","sourceRoot":"","sources":["../../../projects/ngx-intl-tel-input/src/lib/ngx-intl-tel-input.validator.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB,YAAa,GAAG;;;;aAyDhD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moddi3-ngx-intl-tel-input.d.ts","sourceRoot":"","sources":["../../projects/ngx-intl-tel-input/src/moddi3-ngx-intl-tel-input.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@moddi3/ngx-intl-tel-input",
3
+ "version": "3.3.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "8.x - 15.x",
6
+ "@angular/core": "8.x - 15.x",
7
+ "@angular/forms": "8.x - 15.x",
8
+ "google-libphonenumber": "^3.2.33",
9
+ "intl-tel-input": "^17.0.3",
10
+ "ngx-bootstrap": "^6.2.0"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/webcat12345/ngx-intl-tel-input"
15
+ },
16
+ "author": {
17
+ "name": "webcat12345",
18
+ "email": "webcat91@gmail.com"
19
+ },
20
+ "keywords": [
21
+ "angular",
22
+ "ng8",
23
+ "ng9",
24
+ "ng10",
25
+ "angular 8",
26
+ "angular 9",
27
+ "angular 10",
28
+ "angular 11",
29
+ "angular 12",
30
+ "angular 13",
31
+ "angular 14",
32
+ "intl-tel-input",
33
+ "phone number",
34
+ "validation"
35
+ ],
36
+ "license": "MIT",
37
+ "bugs": {
38
+ "url": "https://github.com/webcat12345/ngx-intl-tel-input/issues"
39
+ },
40
+ "dependencies": {
41
+ "tslib": "^2.3.0"
42
+ },
43
+ "module": "fesm2015/moddi3-ngx-intl-tel-input.mjs",
44
+ "es2020": "fesm2020/moddi3-ngx-intl-tel-input.mjs",
45
+ "esm2020": "esm2020/moddi3-ngx-intl-tel-input.mjs",
46
+ "fesm2020": "fesm2020/moddi3-ngx-intl-tel-input.mjs",
47
+ "fesm2015": "fesm2015/moddi3-ngx-intl-tel-input.mjs",
48
+ "typings": "index.d.ts",
49
+ "exports": {
50
+ "./package.json": {
51
+ "default": "./package.json"
52
+ },
53
+ ".": {
54
+ "types": "./index.d.ts",
55
+ "esm2020": "./esm2020/moddi3-ngx-intl-tel-input.mjs",
56
+ "es2020": "./fesm2020/moddi3-ngx-intl-tel-input.mjs",
57
+ "es2015": "./fesm2015/moddi3-ngx-intl-tel-input.mjs",
58
+ "node": "./fesm2015/moddi3-ngx-intl-tel-input.mjs",
59
+ "default": "./fesm2020/moddi3-ngx-intl-tel-input.mjs"
60
+ }
61
+ },
62
+ "sideEffects": false
63
+ }
@@ -0,0 +1,8 @@
1
+ export * from './lib/ngx-intl-tel-input.component';
2
+ export * from './lib/directives/native-element-injector.directive';
3
+ export * from './lib/ngx-intl-tel-input.module';
4
+ export * from './lib/enums/country-iso.enum';
5
+ export * from './lib/enums/search-country-field.enum';
6
+ export * from './lib/enums/phone-number-format.enum';
7
+ export * from './lib/interfaces/change-data';
8
+ //# sourceMappingURL=public_api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../projects/ngx-intl-tel-input/src/public_api.ts"],"names":[],"mappings":"AAIA,cAAc,oCAAoC,CAAC;AACnD,cAAc,oDAAoD,CAAC;AACnE,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC"}