@crodriguezdominguez/ion-intl-tel-input 2.0.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.
Files changed (31) hide show
  1. package/README.md +308 -0
  2. package/crodriguezdominguez-ion-intl-tel-input-2.0.0.tgz +0 -0
  3. package/esm2020/crodriguezdominguez-ion-intl-tel-input.mjs +5 -0
  4. package/esm2020/lib/data/countries.mjs +2006 -0
  5. package/esm2020/lib/ion-intl-tel-input/ion-intl-tel-code.component.mjs +72 -0
  6. package/esm2020/lib/ion-intl-tel-input/ion-intl-tel-input.component.mjs +747 -0
  7. package/esm2020/lib/ion-intl-tel-input.directive.mjs +68 -0
  8. package/esm2020/lib/ion-intl-tel-input.module.mjs +51 -0
  9. package/esm2020/lib/ion-intl-tel-input.service.mjs +20 -0
  10. package/esm2020/lib/models/country.model.mjs +2 -0
  11. package/esm2020/lib/models/ion-intl-tel-input.model.mjs +2 -0
  12. package/esm2020/lib/pipes/country-placeholder.mjs +38 -0
  13. package/esm2020/lib/util/util.mjs +10 -0
  14. package/esm2020/public-api.mjs +10 -0
  15. package/fesm2015/crodriguezdominguez-ion-intl-tel-input.mjs +2997 -0
  16. package/fesm2015/crodriguezdominguez-ion-intl-tel-input.mjs.map +1 -0
  17. package/fesm2020/crodriguezdominguez-ion-intl-tel-input.mjs +2994 -0
  18. package/fesm2020/crodriguezdominguez-ion-intl-tel-input.mjs.map +1 -0
  19. package/index.d.ts +5 -0
  20. package/lib/data/countries.d.ts +2 -0
  21. package/lib/ion-intl-tel-input/ion-intl-tel-code.component.d.ts +28 -0
  22. package/lib/ion-intl-tel-input/ion-intl-tel-input.component.d.ts +310 -0
  23. package/lib/ion-intl-tel-input.directive.d.ts +10 -0
  24. package/lib/ion-intl-tel-input.module.d.ts +13 -0
  25. package/lib/ion-intl-tel-input.service.d.ts +9 -0
  26. package/lib/models/country.model.d.ts +10 -0
  27. package/lib/models/ion-intl-tel-input.model.d.ts +6 -0
  28. package/lib/pipes/country-placeholder.d.ts +8 -0
  29. package/lib/util/util.d.ts +1 -0
  30. package/package.json +64 -0
  31. package/public-api.d.ts +6 -0
@@ -0,0 +1,2994 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Injectable, Component, Input, ViewChild, Pipe, EventEmitter, forwardRef, HostBinding, Output, NgModule } from '@angular/core';
3
+ import * as i4 from '@angular/forms';
4
+ import { NG_VALIDATORS, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
5
+ import { PhoneNumberUtil, PhoneNumberFormat } from 'google-libphonenumber';
6
+ import * as i1 from '@ionic/angular';
7
+ import { IonicModule } from '@ionic/angular';
8
+ import * as i2 from '@angular/common';
9
+ import { CommonModule } from '@angular/common';
10
+
11
+ class IonIntlTelInputValidators {
12
+ static phone(control) {
13
+ const error = { phone: true };
14
+ let phoneNumber;
15
+ if (typeof control.value === 'string') {
16
+ try {
17
+ phoneNumber = PhoneNumberUtil.getInstance().parse(control.value, null);
18
+ if (PhoneNumberUtil.getInstance().isValidNumber(phoneNumber)) {
19
+ return null;
20
+ }
21
+ }
22
+ catch (e) {
23
+ phoneNumber = null;
24
+ }
25
+ if (!phoneNumber) {
26
+ try {
27
+ // If failed to parse, try adding a +1 and see if valid
28
+ if (control.value.length >= 10 && control.value.indexOf('+') === -1) {
29
+ const v = '+1' + control.value;
30
+ phoneNumber = PhoneNumberUtil.getInstance().parse(v, null);
31
+ if (PhoneNumberUtil.getInstance().isValidNumber(phoneNumber)) {
32
+ return null;
33
+ }
34
+ }
35
+ }
36
+ catch (e) {
37
+ return error;
38
+ }
39
+ }
40
+ }
41
+ if (!control.value) {
42
+ return null; // allow empty to be valid as the required validator can be added if needed
43
+ }
44
+ return error;
45
+ }
46
+ }
47
+ class IonIntlTelInputValidatorDirective {
48
+ validate(control) {
49
+ return IonIntlTelInputValidators.phone(control);
50
+ }
51
+ }
52
+ /** @nocollapse */ IonIntlTelInputValidatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
53
+ /** @nocollapse */ IonIntlTelInputValidatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: IonIntlTelInputValidatorDirective, selector: "[ionIntlTelInputValid]", providers: [
54
+ {
55
+ provide: NG_VALIDATORS,
56
+ useExisting: IonIntlTelInputValidatorDirective,
57
+ multi: true,
58
+ },
59
+ ], ngImport: i0 });
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputValidatorDirective, decorators: [{
61
+ type: Directive,
62
+ args: [{
63
+ // tslint:disable-next-line: directive-selector
64
+ selector: '[ionIntlTelInputValid]',
65
+ providers: [
66
+ {
67
+ provide: NG_VALIDATORS,
68
+ useExisting: IonIntlTelInputValidatorDirective,
69
+ multi: true,
70
+ },
71
+ ],
72
+ }]
73
+ }] });
74
+
75
+ const countries = [
76
+ {
77
+ name: 'Afghanistan',
78
+ isoCode: 'af',
79
+ dialCode: '93',
80
+ flagClass: 'af',
81
+ priority: 0,
82
+ placeholder: ''
83
+ },
84
+ {
85
+ name: 'Albania',
86
+ isoCode: 'al',
87
+ dialCode: '355',
88
+ flagClass: 'al',
89
+ priority: 0,
90
+ placeholder: ''
91
+ },
92
+ {
93
+ name: 'Algeria',
94
+ isoCode: 'dz',
95
+ dialCode: '213',
96
+ flagClass: 'dz',
97
+ priority: 0,
98
+ placeholder: ''
99
+ },
100
+ {
101
+ name: 'AmericanSamoa',
102
+ isoCode: 'as',
103
+ dialCode: '1 684',
104
+ flagClass: 'as',
105
+ priority: 0,
106
+ areaCodes: [
107
+ '684'
108
+ ],
109
+ placeholder: ''
110
+ },
111
+ {
112
+ name: 'Andorra',
113
+ isoCode: 'ad',
114
+ dialCode: '376',
115
+ flagClass: 'ad',
116
+ priority: 0,
117
+ placeholder: ''
118
+ },
119
+ {
120
+ name: 'Angola',
121
+ isoCode: 'ao',
122
+ dialCode: '244',
123
+ flagClass: 'ao',
124
+ priority: 0,
125
+ placeholder: ''
126
+ },
127
+ {
128
+ name: 'Anguilla',
129
+ isoCode: 'ai',
130
+ dialCode: '1 264',
131
+ flagClass: 'ai',
132
+ priority: 0,
133
+ areaCodes: [
134
+ '264'
135
+ ],
136
+ placeholder: ''
137
+ },
138
+ {
139
+ name: 'Antigua and Barbuda',
140
+ isoCode: 'ag',
141
+ dialCode: '1 268',
142
+ flagClass: 'ag',
143
+ priority: 0,
144
+ areaCodes: [
145
+ '268'
146
+ ],
147
+ placeholder: ''
148
+ },
149
+ {
150
+ name: 'Argentina',
151
+ isoCode: 'ar',
152
+ dialCode: '54',
153
+ flagClass: 'ar',
154
+ priority: 0,
155
+ placeholder: ''
156
+ },
157
+ {
158
+ name: 'Armenia',
159
+ isoCode: 'am',
160
+ dialCode: '374',
161
+ flagClass: 'am',
162
+ priority: 0,
163
+ placeholder: ''
164
+ },
165
+ {
166
+ name: 'Aruba',
167
+ isoCode: 'aw',
168
+ dialCode: '297',
169
+ flagClass: 'aw',
170
+ priority: 0,
171
+ placeholder: ''
172
+ },
173
+ {
174
+ name: 'Australia',
175
+ isoCode: 'au',
176
+ dialCode: '61',
177
+ flagClass: 'au',
178
+ priority: 0,
179
+ placeholder: ''
180
+ },
181
+ {
182
+ name: 'Austria',
183
+ isoCode: 'at',
184
+ dialCode: '43',
185
+ flagClass: 'at',
186
+ priority: 0,
187
+ placeholder: ''
188
+ },
189
+ {
190
+ name: 'Azerbaijan',
191
+ isoCode: 'az',
192
+ dialCode: '994',
193
+ flagClass: 'az',
194
+ priority: 0,
195
+ placeholder: ''
196
+ },
197
+ {
198
+ name: 'Bahamas',
199
+ isoCode: 'bs',
200
+ dialCode: '1 242',
201
+ flagClass: 'bs',
202
+ priority: 0,
203
+ areaCodes: [
204
+ '242'
205
+ ],
206
+ placeholder: ''
207
+ },
208
+ {
209
+ name: 'Bahrain',
210
+ isoCode: 'bh',
211
+ dialCode: '973',
212
+ flagClass: 'bh',
213
+ priority: 0,
214
+ placeholder: ''
215
+ },
216
+ {
217
+ name: 'Bangladesh',
218
+ isoCode: 'bd',
219
+ dialCode: '880',
220
+ flagClass: 'bd',
221
+ priority: 0,
222
+ placeholder: ''
223
+ },
224
+ {
225
+ name: 'Barbados',
226
+ isoCode: 'bb',
227
+ dialCode: '1 246',
228
+ flagClass: 'bb',
229
+ priority: 0,
230
+ areaCodes: [
231
+ '246'
232
+ ],
233
+ placeholder: ''
234
+ },
235
+ {
236
+ name: 'Belarus',
237
+ isoCode: 'by',
238
+ dialCode: '375',
239
+ flagClass: 'by',
240
+ priority: 0,
241
+ placeholder: ''
242
+ },
243
+ {
244
+ name: 'Belgium',
245
+ isoCode: 'be',
246
+ dialCode: '32',
247
+ flagClass: 'be',
248
+ priority: 0,
249
+ placeholder: ''
250
+ },
251
+ {
252
+ name: 'Belize',
253
+ isoCode: 'bz',
254
+ dialCode: '501',
255
+ flagClass: 'bz',
256
+ priority: 0,
257
+ placeholder: ''
258
+ },
259
+ {
260
+ name: 'Benin',
261
+ isoCode: 'bj',
262
+ dialCode: '229',
263
+ flagClass: 'bj',
264
+ priority: 0,
265
+ placeholder: ''
266
+ },
267
+ {
268
+ name: 'Bermuda',
269
+ isoCode: 'bm',
270
+ dialCode: '1 441',
271
+ flagClass: 'bm',
272
+ priority: 0,
273
+ areaCodes: [
274
+ '441'
275
+ ],
276
+ placeholder: ''
277
+ },
278
+ {
279
+ name: 'Bhutan',
280
+ isoCode: 'bt',
281
+ dialCode: '975',
282
+ flagClass: 'bt',
283
+ priority: 0,
284
+ placeholder: ''
285
+ },
286
+ {
287
+ name: 'Bolivia, Plurinational State of',
288
+ isoCode: 'bo',
289
+ dialCode: '591',
290
+ flagClass: 'bo',
291
+ priority: 0,
292
+ placeholder: ''
293
+ },
294
+ {
295
+ name: 'Bosnia and Herzegovina',
296
+ isoCode: 'ba',
297
+ dialCode: '387',
298
+ flagClass: 'ba',
299
+ priority: 0,
300
+ placeholder: ''
301
+ },
302
+ {
303
+ name: 'Botswana',
304
+ isoCode: 'bw',
305
+ dialCode: '267',
306
+ flagClass: 'bw',
307
+ priority: 0,
308
+ placeholder: ''
309
+ },
310
+ {
311
+ name: 'Brazil',
312
+ isoCode: 'br',
313
+ dialCode: '55',
314
+ flagClass: 'br',
315
+ priority: 0,
316
+ placeholder: ''
317
+ },
318
+ {
319
+ name: 'British Indian Ocean Territory',
320
+ isoCode: 'io',
321
+ dialCode: '246',
322
+ flagClass: 'io',
323
+ priority: 0,
324
+ placeholder: ''
325
+ },
326
+ {
327
+ name: 'Virgin Islands, British',
328
+ isoCode: 'vg',
329
+ dialCode: '1 284',
330
+ flagClass: 'vg',
331
+ priority: 0,
332
+ areaCodes: [
333
+ '284'
334
+ ],
335
+ placeholder: ''
336
+ },
337
+ {
338
+ name: 'Brunei Darussalam',
339
+ isoCode: 'bn',
340
+ dialCode: '673',
341
+ flagClass: 'bn',
342
+ priority: 0,
343
+ placeholder: ''
344
+ },
345
+ {
346
+ name: 'Bulgaria',
347
+ isoCode: 'bg',
348
+ dialCode: '359',
349
+ flagClass: 'bg',
350
+ priority: 0,
351
+ placeholder: ''
352
+ },
353
+ {
354
+ name: 'Burkina Faso',
355
+ isoCode: 'bf',
356
+ dialCode: '226',
357
+ flagClass: 'bf',
358
+ priority: 0,
359
+ placeholder: ''
360
+ },
361
+ {
362
+ name: 'Burundi',
363
+ isoCode: 'bi',
364
+ dialCode: '257',
365
+ flagClass: 'bi',
366
+ priority: 0,
367
+ placeholder: ''
368
+ },
369
+ {
370
+ name: 'Cambodia',
371
+ isoCode: 'kh',
372
+ dialCode: '855',
373
+ flagClass: 'kh',
374
+ priority: 0,
375
+ placeholder: ''
376
+ },
377
+ {
378
+ name: 'Cameroon',
379
+ isoCode: 'cm',
380
+ dialCode: '237',
381
+ flagClass: 'cm',
382
+ priority: 0,
383
+ placeholder: ''
384
+ },
385
+ {
386
+ name: 'Canada',
387
+ isoCode: 'ca',
388
+ dialCode: '1',
389
+ flagClass: 'ca',
390
+ priority: 0,
391
+ areaCodes: [
392
+ '204',
393
+ '226',
394
+ '236',
395
+ '249',
396
+ '250',
397
+ '289',
398
+ '306',
399
+ '343',
400
+ '365',
401
+ '387',
402
+ '403',
403
+ '416',
404
+ '418',
405
+ '431',
406
+ '437',
407
+ '438',
408
+ '450',
409
+ '506',
410
+ '514',
411
+ '519',
412
+ '548',
413
+ '579',
414
+ '581',
415
+ '587',
416
+ '604',
417
+ '613',
418
+ '639',
419
+ '647',
420
+ '672',
421
+ '705',
422
+ '709',
423
+ '742',
424
+ '778',
425
+ '780',
426
+ '782',
427
+ '807',
428
+ '819',
429
+ '825',
430
+ '867',
431
+ '873',
432
+ '902',
433
+ '905'
434
+ ],
435
+ placeholder: ''
436
+ },
437
+ {
438
+ name: 'Cape Verde',
439
+ isoCode: 'cv',
440
+ dialCode: '238',
441
+ flagClass: 'cv',
442
+ priority: 0,
443
+ placeholder: ''
444
+ },
445
+ {
446
+ name: 'Cayman Islands',
447
+ isoCode: 'ky',
448
+ dialCode: ' 345',
449
+ flagClass: 'ky',
450
+ priority: 0,
451
+ areaCodes: [
452
+ '345'
453
+ ],
454
+ placeholder: ''
455
+ },
456
+ {
457
+ name: 'Central African Republic',
458
+ isoCode: 'cf',
459
+ dialCode: '236',
460
+ flagClass: 'cf',
461
+ priority: 0,
462
+ placeholder: ''
463
+ },
464
+ {
465
+ name: 'Chad',
466
+ isoCode: 'td',
467
+ dialCode: '235',
468
+ flagClass: 'td',
469
+ priority: 0,
470
+ placeholder: ''
471
+ },
472
+ {
473
+ name: 'Chile',
474
+ isoCode: 'cl',
475
+ dialCode: '56',
476
+ flagClass: 'cl',
477
+ priority: 0,
478
+ placeholder: ''
479
+ },
480
+ {
481
+ name: 'China',
482
+ isoCode: 'cn',
483
+ dialCode: '86',
484
+ flagClass: 'cn',
485
+ priority: 0,
486
+ placeholder: ''
487
+ },
488
+ {
489
+ name: 'Christmas Island',
490
+ isoCode: 'cx',
491
+ dialCode: '61',
492
+ flagClass: 'cx',
493
+ priority: 0,
494
+ placeholder: ''
495
+ },
496
+ {
497
+ name: 'Cocos (Keeling) Islands',
498
+ isoCode: 'cc',
499
+ dialCode: '61',
500
+ flagClass: 'cc',
501
+ priority: 0,
502
+ placeholder: ''
503
+ },
504
+ {
505
+ name: 'Colombia',
506
+ isoCode: 'co',
507
+ dialCode: '57',
508
+ flagClass: 'co',
509
+ priority: 0,
510
+ placeholder: ''
511
+ },
512
+ {
513
+ name: 'Comoros',
514
+ isoCode: 'km',
515
+ dialCode: '269',
516
+ flagClass: 'km',
517
+ priority: 0,
518
+ placeholder: ''
519
+ },
520
+ {
521
+ name: 'Congo, The Democratic Republic of the Congo',
522
+ isoCode: 'cd',
523
+ dialCode: '243',
524
+ flagClass: 'cd',
525
+ priority: 0,
526
+ placeholder: ''
527
+ },
528
+ {
529
+ name: 'Congo',
530
+ isoCode: 'cg',
531
+ dialCode: '242',
532
+ flagClass: 'cg',
533
+ priority: 0,
534
+ placeholder: ''
535
+ },
536
+ {
537
+ name: 'Cook Islands',
538
+ isoCode: 'ck',
539
+ dialCode: '682',
540
+ flagClass: 'ck',
541
+ priority: 0,
542
+ placeholder: ''
543
+ },
544
+ {
545
+ name: 'Costa Rica',
546
+ isoCode: 'cr',
547
+ dialCode: '506',
548
+ flagClass: 'cr',
549
+ priority: 0,
550
+ placeholder: ''
551
+ },
552
+ {
553
+ name: 'Cote d\'Ivoire',
554
+ isoCode: 'ci',
555
+ dialCode: '225',
556
+ flagClass: 'ci',
557
+ priority: 0,
558
+ placeholder: ''
559
+ },
560
+ {
561
+ name: 'Croatia',
562
+ isoCode: 'hr',
563
+ dialCode: '385',
564
+ flagClass: 'hr',
565
+ priority: 0,
566
+ placeholder: ''
567
+ },
568
+ {
569
+ name: 'Cuba',
570
+ isoCode: 'cu',
571
+ dialCode: '53',
572
+ flagClass: 'cu',
573
+ priority: 0,
574
+ placeholder: ''
575
+ },
576
+ {
577
+ name: 'Cyprus',
578
+ isoCode: 'cy',
579
+ dialCode: '357',
580
+ flagClass: 'cy',
581
+ priority: 0,
582
+ placeholder: ''
583
+ },
584
+ {
585
+ name: 'Czech Republic',
586
+ isoCode: 'cz',
587
+ dialCode: '420',
588
+ flagClass: 'cz',
589
+ priority: 0,
590
+ placeholder: ''
591
+ },
592
+ {
593
+ name: 'Denmark',
594
+ isoCode: 'dk',
595
+ dialCode: '45',
596
+ flagClass: 'dk',
597
+ priority: 0,
598
+ placeholder: ''
599
+ },
600
+ {
601
+ name: 'Djibouti',
602
+ isoCode: 'dj',
603
+ dialCode: '253',
604
+ flagClass: 'dj',
605
+ priority: 0,
606
+ placeholder: ''
607
+ },
608
+ {
609
+ name: 'Dominica',
610
+ isoCode: 'dm',
611
+ dialCode: '1 767',
612
+ flagClass: 'dm',
613
+ priority: 0,
614
+ placeholder: ''
615
+ },
616
+ {
617
+ name: 'Dominican Republic',
618
+ isoCode: 'do',
619
+ dialCode: '1 849',
620
+ flagClass: 'do',
621
+ priority: 0,
622
+ areaCodes: [
623
+ '809',
624
+ '829',
625
+ '849'
626
+ ],
627
+ placeholder: ''
628
+ },
629
+ {
630
+ name: 'Ecuador',
631
+ isoCode: 'ec',
632
+ dialCode: '593',
633
+ flagClass: 'ec',
634
+ priority: 0,
635
+ placeholder: ''
636
+ },
637
+ {
638
+ name: 'Egypt',
639
+ isoCode: 'eg',
640
+ dialCode: '20',
641
+ flagClass: 'eg',
642
+ priority: 0,
643
+ placeholder: ''
644
+ },
645
+ {
646
+ name: 'El Salvador',
647
+ isoCode: 'sv',
648
+ dialCode: '503',
649
+ flagClass: 'sv',
650
+ priority: 0,
651
+ placeholder: ''
652
+ },
653
+ {
654
+ name: 'Equatorial Guinea',
655
+ isoCode: 'gq',
656
+ dialCode: '240',
657
+ flagClass: 'gq',
658
+ priority: 0,
659
+ placeholder: ''
660
+ },
661
+ {
662
+ name: 'Eritrea',
663
+ isoCode: 'er',
664
+ dialCode: '291',
665
+ flagClass: 'er',
666
+ priority: 0,
667
+ placeholder: ''
668
+ },
669
+ {
670
+ name: 'Estonia',
671
+ isoCode: 'ee',
672
+ dialCode: '372',
673
+ flagClass: 'ee',
674
+ priority: 0,
675
+ placeholder: ''
676
+ },
677
+ {
678
+ name: 'Ethiopia',
679
+ isoCode: 'et',
680
+ dialCode: '251',
681
+ flagClass: 'et',
682
+ priority: 0,
683
+ placeholder: ''
684
+ },
685
+ {
686
+ name: 'Falkland Islands (Malvinas)',
687
+ isoCode: 'fk',
688
+ dialCode: '500',
689
+ flagClass: 'fk',
690
+ priority: 0,
691
+ placeholder: ''
692
+ },
693
+ {
694
+ name: 'Faroe Islands',
695
+ isoCode: 'fo',
696
+ dialCode: '298',
697
+ flagClass: 'fo',
698
+ priority: 0,
699
+ placeholder: ''
700
+ },
701
+ {
702
+ name: 'Fiji',
703
+ isoCode: 'fj',
704
+ dialCode: '679',
705
+ flagClass: 'fj',
706
+ priority: 0,
707
+ placeholder: ''
708
+ },
709
+ {
710
+ name: 'Finland',
711
+ isoCode: 'fi',
712
+ dialCode: '358',
713
+ flagClass: 'fi',
714
+ priority: 0,
715
+ placeholder: ''
716
+ },
717
+ {
718
+ name: 'France',
719
+ isoCode: 'fr',
720
+ dialCode: '33',
721
+ flagClass: 'fr',
722
+ priority: 0,
723
+ placeholder: ''
724
+ },
725
+ {
726
+ name: 'French Guiana',
727
+ isoCode: 'gf',
728
+ dialCode: '594',
729
+ flagClass: 'gf',
730
+ priority: 0,
731
+ placeholder: ''
732
+ },
733
+ {
734
+ name: 'French Polynesia',
735
+ isoCode: 'pf',
736
+ dialCode: '689',
737
+ flagClass: 'pf',
738
+ priority: 0,
739
+ placeholder: ''
740
+ },
741
+ {
742
+ name: 'Gabon',
743
+ isoCode: 'ga',
744
+ dialCode: '241',
745
+ flagClass: 'ga',
746
+ priority: 0,
747
+ placeholder: ''
748
+ },
749
+ {
750
+ name: 'Gambia',
751
+ isoCode: 'gm',
752
+ dialCode: '220',
753
+ flagClass: 'gm',
754
+ priority: 0,
755
+ placeholder: ''
756
+ },
757
+ {
758
+ name: 'Georgia',
759
+ isoCode: 'ge',
760
+ dialCode: '995',
761
+ flagClass: 'ge',
762
+ priority: 0,
763
+ placeholder: ''
764
+ },
765
+ {
766
+ name: 'Germany',
767
+ isoCode: 'de',
768
+ dialCode: '49',
769
+ flagClass: 'de',
770
+ priority: 0,
771
+ placeholder: ''
772
+ },
773
+ {
774
+ name: 'Ghana',
775
+ isoCode: 'gh',
776
+ dialCode: '233',
777
+ flagClass: 'gh',
778
+ priority: 0,
779
+ placeholder: ''
780
+ },
781
+ {
782
+ name: 'Gibraltar',
783
+ isoCode: 'gi',
784
+ dialCode: '350',
785
+ flagClass: 'gi',
786
+ priority: 0,
787
+ placeholder: ''
788
+ },
789
+ {
790
+ name: 'Greece',
791
+ isoCode: 'gr',
792
+ dialCode: '30',
793
+ flagClass: 'gr',
794
+ priority: 0,
795
+ placeholder: ''
796
+ },
797
+ {
798
+ name: 'Greenland',
799
+ isoCode: 'gl',
800
+ dialCode: '299',
801
+ flagClass: 'gl',
802
+ priority: 0,
803
+ placeholder: ''
804
+ },
805
+ {
806
+ name: 'Grenada',
807
+ isoCode: 'gd',
808
+ dialCode: '1 473',
809
+ flagClass: 'gd',
810
+ priority: 0,
811
+ placeholder: ''
812
+ },
813
+ {
814
+ name: 'Guadeloupe',
815
+ isoCode: 'gp',
816
+ dialCode: '590',
817
+ flagClass: 'gp',
818
+ priority: 0,
819
+ placeholder: ''
820
+ },
821
+ {
822
+ name: 'Guam',
823
+ isoCode: 'gu',
824
+ dialCode: '1 671',
825
+ flagClass: 'gu',
826
+ priority: 0,
827
+ areaCodes: [
828
+ '671'
829
+ ],
830
+ placeholder: ''
831
+ },
832
+ {
833
+ name: 'Guatemala',
834
+ isoCode: 'gt',
835
+ dialCode: '502',
836
+ flagClass: 'gt',
837
+ priority: 0,
838
+ placeholder: ''
839
+ },
840
+ {
841
+ name: 'Guernsey',
842
+ isoCode: 'gg',
843
+ dialCode: '44',
844
+ flagClass: 'gg',
845
+ priority: 0,
846
+ areaCodes: [
847
+ '1481'
848
+ ],
849
+ placeholder: ''
850
+ },
851
+ {
852
+ name: 'Guinea',
853
+ isoCode: 'gn',
854
+ dialCode: '224',
855
+ flagClass: 'gn',
856
+ priority: 0,
857
+ placeholder: ''
858
+ },
859
+ {
860
+ name: 'Guinea-Bissau',
861
+ isoCode: 'gw',
862
+ dialCode: '245',
863
+ flagClass: 'gw',
864
+ priority: 0,
865
+ placeholder: ''
866
+ },
867
+ {
868
+ name: 'Guyana',
869
+ isoCode: 'gy',
870
+ dialCode: '595',
871
+ flagClass: 'gy',
872
+ priority: 0,
873
+ placeholder: ''
874
+ },
875
+ {
876
+ name: 'Haiti',
877
+ isoCode: 'ht',
878
+ dialCode: '509',
879
+ flagClass: 'ht',
880
+ priority: 0,
881
+ placeholder: ''
882
+ },
883
+ {
884
+ name: 'Honduras',
885
+ isoCode: 'hn',
886
+ dialCode: '504',
887
+ flagClass: 'hn',
888
+ priority: 0,
889
+ placeholder: ''
890
+ },
891
+ {
892
+ name: 'Hong Kong',
893
+ isoCode: 'hk',
894
+ dialCode: '852',
895
+ flagClass: 'hk',
896
+ priority: 0,
897
+ placeholder: ''
898
+ },
899
+ {
900
+ name: 'Hungary',
901
+ isoCode: 'hu',
902
+ dialCode: '36',
903
+ flagClass: 'hu',
904
+ priority: 0,
905
+ placeholder: ''
906
+ },
907
+ {
908
+ name: 'Iceland',
909
+ isoCode: 'is',
910
+ dialCode: '354',
911
+ flagClass: 'is',
912
+ priority: 0,
913
+ placeholder: ''
914
+ },
915
+ {
916
+ name: 'India',
917
+ isoCode: 'in',
918
+ dialCode: '91',
919
+ flagClass: 'in',
920
+ priority: 0,
921
+ placeholder: ''
922
+ },
923
+ {
924
+ name: 'Indonesia',
925
+ isoCode: 'id',
926
+ dialCode: '62',
927
+ flagClass: 'id',
928
+ priority: 0,
929
+ placeholder: ''
930
+ },
931
+ {
932
+ name: 'Iran, Islamic Republic of Persian Gulf',
933
+ isoCode: 'ir',
934
+ dialCode: '98',
935
+ flagClass: 'ir',
936
+ priority: 0,
937
+ placeholder: ''
938
+ },
939
+ {
940
+ name: 'Iraq',
941
+ isoCode: 'iq',
942
+ dialCode: '964',
943
+ flagClass: 'iq',
944
+ priority: 0,
945
+ placeholder: ''
946
+ },
947
+ {
948
+ name: 'Ireland',
949
+ isoCode: 'ie',
950
+ dialCode: '353',
951
+ flagClass: 'ie',
952
+ priority: 0,
953
+ placeholder: ''
954
+ },
955
+ {
956
+ name: 'Isle of Man',
957
+ isoCode: 'im',
958
+ dialCode: '44',
959
+ flagClass: 'im',
960
+ priority: 0,
961
+ areaCodes: [
962
+ '1624'
963
+ ],
964
+ placeholder: ''
965
+ },
966
+ {
967
+ name: 'Israel',
968
+ isoCode: 'il',
969
+ dialCode: '972',
970
+ flagClass: 'il',
971
+ priority: 0,
972
+ placeholder: ''
973
+ },
974
+ {
975
+ name: 'Italy',
976
+ isoCode: 'it',
977
+ dialCode: '39',
978
+ flagClass: 'it',
979
+ priority: 0,
980
+ placeholder: ''
981
+ },
982
+ {
983
+ name: 'Jamaica',
984
+ isoCode: 'jm',
985
+ dialCode: '1 876',
986
+ flagClass: 'jm',
987
+ priority: 0,
988
+ areaCodes: [
989
+ '876'
990
+ ],
991
+ placeholder: ''
992
+ },
993
+ {
994
+ name: 'Japan',
995
+ isoCode: 'jp',
996
+ dialCode: '81',
997
+ flagClass: 'jp',
998
+ priority: 0,
999
+ placeholder: ''
1000
+ },
1001
+ {
1002
+ name: 'Jersey',
1003
+ isoCode: 'je',
1004
+ dialCode: '44',
1005
+ flagClass: 'je',
1006
+ priority: 0,
1007
+ areaCodes: [
1008
+ '1534'
1009
+ ],
1010
+ placeholder: ''
1011
+ },
1012
+ {
1013
+ name: 'Jordan',
1014
+ isoCode: 'jo',
1015
+ dialCode: '962',
1016
+ flagClass: 'jo',
1017
+ priority: 0,
1018
+ placeholder: ''
1019
+ },
1020
+ {
1021
+ name: 'Kazakhstan',
1022
+ isoCode: 'kz',
1023
+ dialCode: '7 7',
1024
+ flagClass: 'kz',
1025
+ priority: 0,
1026
+ placeholder: ''
1027
+ },
1028
+ {
1029
+ name: 'Kenya',
1030
+ isoCode: 'ke',
1031
+ dialCode: '254',
1032
+ flagClass: 'ke',
1033
+ priority: 0,
1034
+ placeholder: ''
1035
+ },
1036
+ {
1037
+ name: 'Kiribati',
1038
+ isoCode: 'ki',
1039
+ dialCode: '686',
1040
+ flagClass: 'ki',
1041
+ priority: 0,
1042
+ placeholder: ''
1043
+ },
1044
+ {
1045
+ name: 'Kuwait',
1046
+ isoCode: 'kw',
1047
+ dialCode: '965',
1048
+ flagClass: 'kw',
1049
+ priority: 0,
1050
+ placeholder: ''
1051
+ },
1052
+ {
1053
+ name: 'Kyrgyzstan',
1054
+ isoCode: 'kg',
1055
+ dialCode: '996',
1056
+ flagClass: 'kg',
1057
+ priority: 0,
1058
+ placeholder: ''
1059
+ },
1060
+ {
1061
+ name: 'Laos',
1062
+ isoCode: 'la',
1063
+ dialCode: '856',
1064
+ flagClass: 'la',
1065
+ priority: 0,
1066
+ placeholder: ''
1067
+ },
1068
+ {
1069
+ name: 'Latvia',
1070
+ isoCode: 'lv',
1071
+ dialCode: '371',
1072
+ flagClass: 'lv',
1073
+ priority: 0,
1074
+ placeholder: ''
1075
+ },
1076
+ {
1077
+ name: 'Lebanon',
1078
+ isoCode: 'lb',
1079
+ dialCode: '961',
1080
+ flagClass: 'lb',
1081
+ priority: 0,
1082
+ placeholder: ''
1083
+ },
1084
+ {
1085
+ name: 'Lesotho',
1086
+ isoCode: 'ls',
1087
+ dialCode: '266',
1088
+ flagClass: 'ls',
1089
+ priority: 0,
1090
+ placeholder: ''
1091
+ },
1092
+ {
1093
+ name: 'Liberia',
1094
+ isoCode: 'lr',
1095
+ dialCode: '231',
1096
+ flagClass: 'lr',
1097
+ priority: 0,
1098
+ placeholder: ''
1099
+ },
1100
+ {
1101
+ name: 'Libyan Arab Jamahiriya',
1102
+ isoCode: 'ly',
1103
+ dialCode: '218',
1104
+ flagClass: 'ly',
1105
+ priority: 0,
1106
+ placeholder: ''
1107
+ },
1108
+ {
1109
+ name: 'Liechtenstein',
1110
+ isoCode: 'li',
1111
+ dialCode: '423',
1112
+ flagClass: 'li',
1113
+ priority: 0,
1114
+ placeholder: ''
1115
+ },
1116
+ {
1117
+ name: 'Lithuania',
1118
+ isoCode: 'lt',
1119
+ dialCode: '370',
1120
+ flagClass: 'lt',
1121
+ priority: 0,
1122
+ placeholder: ''
1123
+ },
1124
+ {
1125
+ name: 'Luxembourg',
1126
+ isoCode: 'lu',
1127
+ dialCode: '352',
1128
+ flagClass: 'lu',
1129
+ priority: 0,
1130
+ placeholder: ''
1131
+ },
1132
+ {
1133
+ name: 'Macao',
1134
+ isoCode: 'mo',
1135
+ dialCode: '853',
1136
+ flagClass: 'mo',
1137
+ priority: 0,
1138
+ placeholder: ''
1139
+ },
1140
+ {
1141
+ name: 'Macedonia',
1142
+ isoCode: 'mk',
1143
+ dialCode: '389',
1144
+ flagClass: 'mk',
1145
+ priority: 0,
1146
+ placeholder: ''
1147
+ },
1148
+ {
1149
+ name: 'Madagascar',
1150
+ isoCode: 'mg',
1151
+ dialCode: '261',
1152
+ flagClass: 'mg',
1153
+ priority: 0,
1154
+ placeholder: ''
1155
+ },
1156
+ {
1157
+ name: 'Malawi',
1158
+ isoCode: 'mw',
1159
+ dialCode: '265',
1160
+ flagClass: 'mw',
1161
+ priority: 0,
1162
+ placeholder: ''
1163
+ },
1164
+ {
1165
+ name: 'Malaysia',
1166
+ isoCode: 'my',
1167
+ dialCode: '60',
1168
+ flagClass: 'my',
1169
+ priority: 0,
1170
+ placeholder: ''
1171
+ },
1172
+ {
1173
+ name: 'Maldives',
1174
+ isoCode: 'mv',
1175
+ dialCode: '960',
1176
+ flagClass: 'mv',
1177
+ priority: 0,
1178
+ placeholder: ''
1179
+ },
1180
+ {
1181
+ name: 'Mali',
1182
+ isoCode: 'ml',
1183
+ dialCode: '223',
1184
+ flagClass: 'ml',
1185
+ priority: 0,
1186
+ placeholder: ''
1187
+ },
1188
+ {
1189
+ name: 'Malta',
1190
+ isoCode: 'mt',
1191
+ dialCode: '356',
1192
+ flagClass: 'mt',
1193
+ priority: 0,
1194
+ placeholder: ''
1195
+ },
1196
+ {
1197
+ name: 'Marshall Islands',
1198
+ isoCode: 'mh',
1199
+ dialCode: '692',
1200
+ flagClass: 'mh',
1201
+ priority: 0,
1202
+ placeholder: ''
1203
+ },
1204
+ {
1205
+ name: 'Martinique',
1206
+ isoCode: 'mq',
1207
+ dialCode: '596',
1208
+ flagClass: 'mq',
1209
+ priority: 0,
1210
+ placeholder: ''
1211
+ },
1212
+ {
1213
+ name: 'Mauritania',
1214
+ isoCode: 'mr',
1215
+ dialCode: '222',
1216
+ flagClass: 'mr',
1217
+ priority: 0,
1218
+ placeholder: ''
1219
+ },
1220
+ {
1221
+ name: 'Mauritius',
1222
+ isoCode: 'mu',
1223
+ dialCode: '230',
1224
+ flagClass: 'mu',
1225
+ priority: 0,
1226
+ placeholder: ''
1227
+ },
1228
+ {
1229
+ name: 'Mayotte',
1230
+ isoCode: 'yt',
1231
+ dialCode: '262',
1232
+ flagClass: 'yt',
1233
+ priority: 0,
1234
+ placeholder: ''
1235
+ },
1236
+ {
1237
+ name: 'Mexico',
1238
+ isoCode: 'mx',
1239
+ dialCode: '52',
1240
+ flagClass: 'mx',
1241
+ priority: 0,
1242
+ placeholder: ''
1243
+ },
1244
+ {
1245
+ name: 'Micronesia, Federated States of Micronesia',
1246
+ isoCode: 'fm',
1247
+ dialCode: '691',
1248
+ flagClass: 'fm',
1249
+ priority: 0,
1250
+ placeholder: ''
1251
+ },
1252
+ {
1253
+ name: 'Moldova',
1254
+ isoCode: 'md',
1255
+ dialCode: '373',
1256
+ flagClass: 'md',
1257
+ priority: 0,
1258
+ placeholder: ''
1259
+ },
1260
+ {
1261
+ name: 'Monaco',
1262
+ isoCode: 'mc',
1263
+ dialCode: '377',
1264
+ flagClass: 'mc',
1265
+ priority: 0,
1266
+ placeholder: ''
1267
+ },
1268
+ {
1269
+ name: 'Mongolia',
1270
+ isoCode: 'mn',
1271
+ dialCode: '976',
1272
+ flagClass: 'mn',
1273
+ priority: 0,
1274
+ placeholder: ''
1275
+ },
1276
+ {
1277
+ name: 'Montenegro',
1278
+ isoCode: 'me',
1279
+ dialCode: '382',
1280
+ flagClass: 'me',
1281
+ priority: 0,
1282
+ placeholder: ''
1283
+ },
1284
+ {
1285
+ name: 'Montserrat',
1286
+ isoCode: 'ms',
1287
+ dialCode: '1664',
1288
+ flagClass: 'ms',
1289
+ priority: 0,
1290
+ areaCodes: [
1291
+ '664'
1292
+ ],
1293
+ placeholder: ''
1294
+ },
1295
+ {
1296
+ name: 'Morocco',
1297
+ isoCode: 'ma',
1298
+ dialCode: '212',
1299
+ flagClass: 'ma',
1300
+ priority: 0,
1301
+ placeholder: ''
1302
+ },
1303
+ {
1304
+ name: 'Mozambique',
1305
+ isoCode: 'mz',
1306
+ dialCode: '258',
1307
+ flagClass: 'mz',
1308
+ priority: 0,
1309
+ placeholder: ''
1310
+ },
1311
+ {
1312
+ name: 'Myanmar',
1313
+ isoCode: 'mm',
1314
+ dialCode: '95',
1315
+ flagClass: 'mm',
1316
+ priority: 0,
1317
+ placeholder: ''
1318
+ },
1319
+ {
1320
+ name: 'Namibia',
1321
+ isoCode: 'na',
1322
+ dialCode: '264',
1323
+ flagClass: 'na',
1324
+ priority: 0,
1325
+ placeholder: ''
1326
+ },
1327
+ {
1328
+ name: 'Nauru',
1329
+ isoCode: 'nr',
1330
+ dialCode: '674',
1331
+ flagClass: 'nr',
1332
+ priority: 0,
1333
+ placeholder: ''
1334
+ },
1335
+ {
1336
+ name: 'Nepal',
1337
+ isoCode: 'np',
1338
+ dialCode: '977',
1339
+ flagClass: 'np',
1340
+ priority: 0,
1341
+ placeholder: ''
1342
+ },
1343
+ {
1344
+ name: 'Netherlands',
1345
+ isoCode: 'nl',
1346
+ dialCode: '31',
1347
+ flagClass: 'nl',
1348
+ priority: 0,
1349
+ placeholder: ''
1350
+ },
1351
+ {
1352
+ name: 'New Caledonia',
1353
+ isoCode: 'nc',
1354
+ dialCode: '687',
1355
+ flagClass: 'nc',
1356
+ priority: 0,
1357
+ placeholder: ''
1358
+ },
1359
+ {
1360
+ name: 'New Zealand',
1361
+ isoCode: 'nz',
1362
+ dialCode: '64',
1363
+ flagClass: 'nz',
1364
+ priority: 0,
1365
+ placeholder: ''
1366
+ },
1367
+ {
1368
+ name: 'Nicaragua',
1369
+ isoCode: 'ni',
1370
+ dialCode: '505',
1371
+ flagClass: 'ni',
1372
+ priority: 0,
1373
+ placeholder: ''
1374
+ },
1375
+ {
1376
+ name: 'Niger',
1377
+ isoCode: 'ne',
1378
+ dialCode: '227',
1379
+ flagClass: 'ne',
1380
+ priority: 0,
1381
+ placeholder: ''
1382
+ },
1383
+ {
1384
+ name: 'Nigeria',
1385
+ isoCode: 'ng',
1386
+ dialCode: '234',
1387
+ flagClass: 'ng',
1388
+ priority: 0,
1389
+ placeholder: ''
1390
+ },
1391
+ {
1392
+ name: 'Niue',
1393
+ isoCode: 'nu',
1394
+ dialCode: '683',
1395
+ flagClass: 'nu',
1396
+ priority: 0,
1397
+ placeholder: ''
1398
+ },
1399
+ {
1400
+ name: 'Norfolk Island',
1401
+ isoCode: 'nf',
1402
+ dialCode: '672',
1403
+ flagClass: 'nf',
1404
+ priority: 0,
1405
+ placeholder: ''
1406
+ },
1407
+ {
1408
+ name: 'Korea, Democratic People\'s Republic of Korea',
1409
+ isoCode: 'kp',
1410
+ dialCode: '850',
1411
+ flagClass: 'kp',
1412
+ priority: 0,
1413
+ placeholder: ''
1414
+ },
1415
+ {
1416
+ name: 'Northern Mariana Islands',
1417
+ isoCode: 'mp',
1418
+ dialCode: '1 670',
1419
+ flagClass: 'mp',
1420
+ priority: 0,
1421
+ placeholder: ''
1422
+ },
1423
+ {
1424
+ name: 'Norway',
1425
+ isoCode: 'no',
1426
+ dialCode: '47',
1427
+ flagClass: 'no',
1428
+ priority: 0,
1429
+ placeholder: ''
1430
+ },
1431
+ {
1432
+ name: 'Oman',
1433
+ isoCode: 'om',
1434
+ dialCode: '968',
1435
+ flagClass: 'om',
1436
+ priority: 0,
1437
+ placeholder: ''
1438
+ },
1439
+ {
1440
+ name: 'Pakistan',
1441
+ isoCode: 'pk',
1442
+ dialCode: '92',
1443
+ flagClass: 'pk',
1444
+ priority: 0,
1445
+ placeholder: ''
1446
+ },
1447
+ {
1448
+ name: 'Palau',
1449
+ isoCode: 'pw',
1450
+ dialCode: '680',
1451
+ flagClass: 'pw',
1452
+ priority: 0,
1453
+ placeholder: ''
1454
+ },
1455
+ {
1456
+ name: 'Palestinian Territory, Occupied',
1457
+ isoCode: 'ps',
1458
+ dialCode: '970',
1459
+ flagClass: 'ps',
1460
+ priority: 0,
1461
+ placeholder: ''
1462
+ },
1463
+ {
1464
+ name: 'Panama',
1465
+ isoCode: 'pa',
1466
+ dialCode: '507',
1467
+ flagClass: 'pa',
1468
+ priority: 0,
1469
+ placeholder: ''
1470
+ },
1471
+ {
1472
+ name: 'Papua New Guinea',
1473
+ isoCode: 'pg',
1474
+ dialCode: '675',
1475
+ flagClass: 'pg',
1476
+ priority: 0,
1477
+ placeholder: ''
1478
+ },
1479
+ {
1480
+ name: 'Paraguay',
1481
+ isoCode: 'py',
1482
+ dialCode: '595',
1483
+ flagClass: 'py',
1484
+ priority: 0,
1485
+ placeholder: ''
1486
+ },
1487
+ {
1488
+ name: 'Peru',
1489
+ isoCode: 'pe',
1490
+ dialCode: '51',
1491
+ flagClass: 'pe',
1492
+ priority: 0,
1493
+ placeholder: ''
1494
+ },
1495
+ {
1496
+ name: 'Philippines',
1497
+ isoCode: 'ph',
1498
+ dialCode: '63',
1499
+ flagClass: 'ph',
1500
+ priority: 0,
1501
+ placeholder: ''
1502
+ },
1503
+ {
1504
+ name: 'Poland',
1505
+ isoCode: 'pl',
1506
+ dialCode: '48',
1507
+ flagClass: 'pl',
1508
+ priority: 0,
1509
+ placeholder: ''
1510
+ },
1511
+ {
1512
+ name: 'Portugal',
1513
+ isoCode: 'pt',
1514
+ dialCode: '351',
1515
+ flagClass: 'pt',
1516
+ priority: 0,
1517
+ placeholder: ''
1518
+ },
1519
+ {
1520
+ name: 'Puerto Rico',
1521
+ isoCode: 'pr',
1522
+ dialCode: '1 939',
1523
+ flagClass: 'pr',
1524
+ priority: 0,
1525
+ areaCodes: [
1526
+ '787',
1527
+ '939'
1528
+ ],
1529
+ placeholder: ''
1530
+ },
1531
+ {
1532
+ name: 'Qatar',
1533
+ isoCode: 'qa',
1534
+ dialCode: '974',
1535
+ flagClass: 'qa',
1536
+ priority: 0,
1537
+ placeholder: ''
1538
+ },
1539
+ {
1540
+ name: 'Reunion',
1541
+ isoCode: 're',
1542
+ dialCode: '262',
1543
+ flagClass: 're',
1544
+ priority: 0,
1545
+ placeholder: ''
1546
+ },
1547
+ {
1548
+ name: 'Romania',
1549
+ isoCode: 'ro',
1550
+ dialCode: '40',
1551
+ flagClass: 'ro',
1552
+ priority: 0,
1553
+ placeholder: ''
1554
+ },
1555
+ {
1556
+ name: 'Russia',
1557
+ isoCode: 'ru',
1558
+ dialCode: '7',
1559
+ flagClass: 'ru',
1560
+ priority: 0,
1561
+ placeholder: ''
1562
+ },
1563
+ {
1564
+ name: 'Rwanda',
1565
+ isoCode: 'rw',
1566
+ dialCode: '250',
1567
+ flagClass: 'rw',
1568
+ priority: 0,
1569
+ placeholder: ''
1570
+ },
1571
+ {
1572
+ name: 'Saint Barthelemy',
1573
+ isoCode: 'bl',
1574
+ dialCode: '590',
1575
+ flagClass: 'bl',
1576
+ priority: 0,
1577
+ placeholder: ''
1578
+ },
1579
+ {
1580
+ name: 'Saint Helena, Ascension and Tristan Da Cunha',
1581
+ isoCode: 'sh',
1582
+ dialCode: '290',
1583
+ flagClass: 'sh',
1584
+ priority: 0,
1585
+ placeholder: ''
1586
+ },
1587
+ {
1588
+ name: 'Saint Kitts and Nevis',
1589
+ isoCode: 'kn',
1590
+ dialCode: '1 869',
1591
+ flagClass: 'kn',
1592
+ priority: 0,
1593
+ placeholder: ''
1594
+ },
1595
+ {
1596
+ name: 'Saint Lucia',
1597
+ isoCode: 'lc',
1598
+ dialCode: '1 758',
1599
+ flagClass: 'lc',
1600
+ priority: 0,
1601
+ areaCodes: [
1602
+ '758'
1603
+ ],
1604
+ placeholder: ''
1605
+ },
1606
+ {
1607
+ name: 'Saint Martin',
1608
+ isoCode: 'mf',
1609
+ dialCode: '590',
1610
+ flagClass: 'mf',
1611
+ priority: 0,
1612
+ placeholder: ''
1613
+ },
1614
+ {
1615
+ name: 'Saint Pierre and Miquelon',
1616
+ isoCode: 'pm',
1617
+ dialCode: '508',
1618
+ flagClass: 'pm',
1619
+ priority: 0,
1620
+ placeholder: ''
1621
+ },
1622
+ {
1623
+ name: 'Saint Vincent and the Grenadines',
1624
+ isoCode: 'vc',
1625
+ dialCode: '1 784',
1626
+ flagClass: 'vc',
1627
+ priority: 0,
1628
+ areaCodes: [
1629
+ '784'
1630
+ ],
1631
+ placeholder: ''
1632
+ },
1633
+ {
1634
+ name: 'Samoa',
1635
+ isoCode: 'ws',
1636
+ dialCode: '685',
1637
+ flagClass: 'ws',
1638
+ priority: 0,
1639
+ placeholder: ''
1640
+ },
1641
+ {
1642
+ name: 'San Marino',
1643
+ isoCode: 'sm',
1644
+ dialCode: '378',
1645
+ flagClass: 'sm',
1646
+ priority: 0,
1647
+ placeholder: ''
1648
+ },
1649
+ {
1650
+ name: 'Sao Tome and Principe',
1651
+ isoCode: 'st',
1652
+ dialCode: '239',
1653
+ flagClass: 'st',
1654
+ priority: 0,
1655
+ placeholder: ''
1656
+ },
1657
+ {
1658
+ name: 'Saudi Arabia',
1659
+ isoCode: 'sa',
1660
+ dialCode: '966',
1661
+ flagClass: 'sa',
1662
+ priority: 0,
1663
+ placeholder: ''
1664
+ },
1665
+ {
1666
+ name: 'Senegal',
1667
+ isoCode: 'sn',
1668
+ dialCode: '221',
1669
+ flagClass: 'sn',
1670
+ priority: 0,
1671
+ placeholder: ''
1672
+ },
1673
+ {
1674
+ name: 'Serbia',
1675
+ isoCode: 'rs',
1676
+ dialCode: '381',
1677
+ flagClass: 'rs',
1678
+ priority: 0,
1679
+ placeholder: ''
1680
+ },
1681
+ {
1682
+ name: 'Seychelles',
1683
+ isoCode: 'sc',
1684
+ dialCode: '248',
1685
+ flagClass: 'sc',
1686
+ priority: 0,
1687
+ placeholder: ''
1688
+ },
1689
+ {
1690
+ name: 'Sierra Leone',
1691
+ isoCode: 'sl',
1692
+ dialCode: '232',
1693
+ flagClass: 'sl',
1694
+ priority: 0,
1695
+ placeholder: ''
1696
+ },
1697
+ {
1698
+ name: 'Singapore',
1699
+ isoCode: 'sg',
1700
+ dialCode: '65',
1701
+ flagClass: 'sg',
1702
+ priority: 0,
1703
+ placeholder: ''
1704
+ },
1705
+ {
1706
+ name: 'Slovakia',
1707
+ isoCode: 'sk',
1708
+ dialCode: '421',
1709
+ flagClass: 'sk',
1710
+ priority: 0,
1711
+ placeholder: ''
1712
+ },
1713
+ {
1714
+ name: 'Slovenia',
1715
+ isoCode: 'si',
1716
+ dialCode: '386',
1717
+ flagClass: 'si',
1718
+ priority: 0,
1719
+ placeholder: ''
1720
+ },
1721
+ {
1722
+ name: 'Solomon Islands',
1723
+ isoCode: 'sb',
1724
+ dialCode: '677',
1725
+ flagClass: 'sb',
1726
+ priority: 0,
1727
+ placeholder: ''
1728
+ },
1729
+ {
1730
+ name: 'Somalia',
1731
+ isoCode: 'so',
1732
+ dialCode: '252',
1733
+ flagClass: 'so',
1734
+ priority: 0,
1735
+ placeholder: ''
1736
+ },
1737
+ {
1738
+ name: 'South Africa',
1739
+ isoCode: 'za',
1740
+ dialCode: '27',
1741
+ flagClass: 'za',
1742
+ priority: 0,
1743
+ placeholder: ''
1744
+ },
1745
+ {
1746
+ name: 'Korea, Republic of South Korea',
1747
+ isoCode: 'kr',
1748
+ dialCode: '82',
1749
+ flagClass: 'kr',
1750
+ priority: 0,
1751
+ placeholder: ''
1752
+ },
1753
+ {
1754
+ name: 'Spain',
1755
+ isoCode: 'es',
1756
+ dialCode: '34',
1757
+ flagClass: 'es',
1758
+ priority: 0,
1759
+ placeholder: ''
1760
+ },
1761
+ {
1762
+ name: 'Sri Lanka',
1763
+ isoCode: 'lk',
1764
+ dialCode: '94',
1765
+ flagClass: 'lk',
1766
+ priority: 0,
1767
+ placeholder: ''
1768
+ },
1769
+ {
1770
+ name: 'Sudan',
1771
+ isoCode: 'sd',
1772
+ dialCode: '249',
1773
+ flagClass: 'sd',
1774
+ priority: 0,
1775
+ placeholder: ''
1776
+ },
1777
+ {
1778
+ name: 'Suriname',
1779
+ isoCode: 'sr',
1780
+ dialCode: '597',
1781
+ flagClass: 'sr',
1782
+ priority: 0,
1783
+ placeholder: ''
1784
+ },
1785
+ {
1786
+ name: 'Svalbard and Jan Mayen',
1787
+ isoCode: 'sj',
1788
+ dialCode: '47',
1789
+ flagClass: 'sj',
1790
+ priority: 0,
1791
+ placeholder: ''
1792
+ },
1793
+ {
1794
+ name: 'Swaziland',
1795
+ isoCode: 'sz',
1796
+ dialCode: '268',
1797
+ flagClass: 'sz',
1798
+ priority: 0,
1799
+ placeholder: ''
1800
+ },
1801
+ {
1802
+ name: 'Sweden',
1803
+ isoCode: 'se',
1804
+ dialCode: '46',
1805
+ flagClass: 'se',
1806
+ priority: 0,
1807
+ placeholder: ''
1808
+ },
1809
+ {
1810
+ name: 'Switzerland',
1811
+ isoCode: 'ch',
1812
+ dialCode: '41',
1813
+ flagClass: 'ch',
1814
+ priority: 0,
1815
+ placeholder: ''
1816
+ },
1817
+ {
1818
+ name: 'Syrian Arab Republic',
1819
+ isoCode: 'sy',
1820
+ dialCode: '963',
1821
+ flagClass: 'sy',
1822
+ priority: 0,
1823
+ placeholder: ''
1824
+ },
1825
+ {
1826
+ name: 'Taiwan',
1827
+ isoCode: 'tw',
1828
+ dialCode: '886',
1829
+ flagClass: 'tw',
1830
+ priority: 0,
1831
+ placeholder: ''
1832
+ },
1833
+ {
1834
+ name: 'Tajikistan',
1835
+ isoCode: 'tj',
1836
+ dialCode: '992',
1837
+ flagClass: 'tj',
1838
+ priority: 0,
1839
+ placeholder: ''
1840
+ },
1841
+ {
1842
+ name: 'Tanzania, United Republic of Tanzania',
1843
+ isoCode: 'tz',
1844
+ dialCode: '255',
1845
+ flagClass: 'tz',
1846
+ priority: 0,
1847
+ placeholder: ''
1848
+ },
1849
+ {
1850
+ name: 'Thailand',
1851
+ isoCode: 'th',
1852
+ dialCode: '66',
1853
+ flagClass: 'th',
1854
+ priority: 0,
1855
+ placeholder: ''
1856
+ },
1857
+ {
1858
+ name: 'Timor-Leste',
1859
+ isoCode: 'tl',
1860
+ dialCode: '670',
1861
+ flagClass: 'tl',
1862
+ priority: 0,
1863
+ placeholder: ''
1864
+ },
1865
+ {
1866
+ name: 'Togo',
1867
+ isoCode: 'tg',
1868
+ dialCode: '228',
1869
+ flagClass: 'tg',
1870
+ priority: 0,
1871
+ placeholder: ''
1872
+ },
1873
+ {
1874
+ name: 'Tokelau',
1875
+ isoCode: 'tk',
1876
+ dialCode: '690',
1877
+ flagClass: 'tk',
1878
+ priority: 0,
1879
+ placeholder: ''
1880
+ },
1881
+ {
1882
+ name: 'Tonga',
1883
+ isoCode: 'to',
1884
+ dialCode: '676',
1885
+ flagClass: 'to',
1886
+ priority: 0,
1887
+ placeholder: ''
1888
+ },
1889
+ {
1890
+ name: 'Trinidad and Tobago',
1891
+ isoCode: 'tt',
1892
+ dialCode: '1 868',
1893
+ flagClass: 'tt',
1894
+ priority: 0,
1895
+ areaCodes: [
1896
+ '868'
1897
+ ],
1898
+ placeholder: ''
1899
+ },
1900
+ {
1901
+ name: 'Tunisia',
1902
+ isoCode: 'tn',
1903
+ dialCode: '216',
1904
+ flagClass: 'tn',
1905
+ priority: 0,
1906
+ placeholder: ''
1907
+ },
1908
+ {
1909
+ name: 'Turkey',
1910
+ isoCode: 'tr',
1911
+ dialCode: '90',
1912
+ flagClass: 'tr',
1913
+ priority: 0,
1914
+ placeholder: ''
1915
+ },
1916
+ {
1917
+ name: 'Turkmenistan',
1918
+ isoCode: 'tm',
1919
+ dialCode: '993',
1920
+ flagClass: 'tm',
1921
+ priority: 0,
1922
+ placeholder: ''
1923
+ },
1924
+ {
1925
+ name: 'Turks and Caicos Islands',
1926
+ isoCode: 'tc',
1927
+ dialCode: '1 649',
1928
+ flagClass: 'tc',
1929
+ priority: 0,
1930
+ placeholder: ''
1931
+ },
1932
+ {
1933
+ name: 'Tuvalu',
1934
+ isoCode: 'tv',
1935
+ dialCode: '688',
1936
+ flagClass: 'tv',
1937
+ priority: 0,
1938
+ placeholder: ''
1939
+ },
1940
+ {
1941
+ name: 'Virgin Islands, U.S.',
1942
+ isoCode: 'vi',
1943
+ dialCode: '1 340',
1944
+ flagClass: 'vi',
1945
+ priority: 0,
1946
+ areaCodes: [
1947
+ '340'
1948
+ ],
1949
+ placeholder: ''
1950
+ },
1951
+ {
1952
+ name: 'Uganda',
1953
+ isoCode: 'ug',
1954
+ dialCode: '256',
1955
+ flagClass: 'ug',
1956
+ priority: 0,
1957
+ placeholder: ''
1958
+ },
1959
+ {
1960
+ name: 'Ukraine',
1961
+ isoCode: 'ua',
1962
+ dialCode: '380',
1963
+ flagClass: 'ua',
1964
+ priority: 0,
1965
+ placeholder: ''
1966
+ },
1967
+ {
1968
+ name: 'United Arab Emirates',
1969
+ isoCode: 'ae',
1970
+ dialCode: '971',
1971
+ flagClass: 'ae',
1972
+ priority: 0,
1973
+ placeholder: ''
1974
+ },
1975
+ {
1976
+ name: 'United Kingdom',
1977
+ isoCode: 'gb',
1978
+ dialCode: '44',
1979
+ flagClass: 'gb',
1980
+ priority: 0,
1981
+ placeholder: ''
1982
+ },
1983
+ {
1984
+ name: 'United States',
1985
+ isoCode: 'us',
1986
+ dialCode: '1',
1987
+ flagClass: 'us',
1988
+ priority: 0,
1989
+ placeholder: ''
1990
+ },
1991
+ {
1992
+ name: 'Uruguay',
1993
+ isoCode: 'uy',
1994
+ dialCode: '598',
1995
+ flagClass: 'uy',
1996
+ priority: 0,
1997
+ placeholder: ''
1998
+ },
1999
+ {
2000
+ name: 'Uzbekistan',
2001
+ isoCode: 'uz',
2002
+ dialCode: '998',
2003
+ flagClass: 'uz',
2004
+ priority: 0,
2005
+ placeholder: ''
2006
+ },
2007
+ {
2008
+ name: 'Vanuatu',
2009
+ isoCode: 'vu',
2010
+ dialCode: '678',
2011
+ flagClass: 'vu',
2012
+ priority: 0,
2013
+ placeholder: ''
2014
+ },
2015
+ {
2016
+ name: 'Holy See (Vatican City State)',
2017
+ isoCode: 'va',
2018
+ dialCode: '379',
2019
+ flagClass: 'va',
2020
+ priority: 0,
2021
+ placeholder: ''
2022
+ },
2023
+ {
2024
+ name: 'Venezuela, Bolivarian Republic of Venezuela',
2025
+ isoCode: 've',
2026
+ dialCode: '58',
2027
+ flagClass: 've',
2028
+ priority: 0,
2029
+ placeholder: ''
2030
+ },
2031
+ {
2032
+ name: 'Vietnam',
2033
+ isoCode: 'vn',
2034
+ dialCode: '84',
2035
+ flagClass: 'vn',
2036
+ priority: 0,
2037
+ placeholder: ''
2038
+ },
2039
+ {
2040
+ name: 'Wallis and Futuna',
2041
+ isoCode: 'wf',
2042
+ dialCode: '681',
2043
+ flagClass: 'wf',
2044
+ priority: 0,
2045
+ placeholder: ''
2046
+ },
2047
+ {
2048
+ name: 'Yemen',
2049
+ isoCode: 'ye',
2050
+ dialCode: '967',
2051
+ flagClass: 'ye',
2052
+ priority: 0,
2053
+ placeholder: ''
2054
+ },
2055
+ {
2056
+ name: 'Zambia',
2057
+ isoCode: 'zm',
2058
+ dialCode: '260',
2059
+ flagClass: 'zm',
2060
+ priority: 0,
2061
+ placeholder: ''
2062
+ },
2063
+ {
2064
+ name: 'Zimbabwe',
2065
+ isoCode: 'zw',
2066
+ dialCode: '263',
2067
+ flagClass: 'zw',
2068
+ priority: 0,
2069
+ placeholder: ''
2070
+ },
2071
+ {
2072
+ name: 'Aland Islands',
2073
+ isoCode: 'ax',
2074
+ dialCode: '358',
2075
+ flagClass: 'ax',
2076
+ priority: 0,
2077
+ placeholder: ''
2078
+ }
2079
+ ];
2080
+
2081
+ class IonIntlTelInputService {
2082
+ constructor() {
2083
+ this.countryList = countries;
2084
+ }
2085
+ getListOfCountries() {
2086
+ return this.countryList;
2087
+ }
2088
+ }
2089
+ /** @nocollapse */ IonIntlTelInputService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2090
+ /** @nocollapse */ IonIntlTelInputService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputService, providedIn: 'root' });
2091
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputService, decorators: [{
2092
+ type: Injectable,
2093
+ args: [{
2094
+ providedIn: 'root'
2095
+ }]
2096
+ }], ctorParameters: function () { return []; } });
2097
+
2098
+ const raf = (h) => {
2099
+ if (typeof __zone_symbol__requestAnimationFrame === 'function') {
2100
+ return __zone_symbol__requestAnimationFrame(h);
2101
+ }
2102
+ if (typeof requestAnimationFrame === 'function') {
2103
+ return requestAnimationFrame(h);
2104
+ }
2105
+ return setTimeout(h);
2106
+ };
2107
+
2108
+ class IonIntTelCodeComponent {
2109
+ constructor(modalCtrl) {
2110
+ this.modalCtrl = modalCtrl;
2111
+ this.closeButtonText = 'Close';
2112
+ this.closeButtonSlot = 'end';
2113
+ }
2114
+ ngOnInit() {
2115
+ this.allCountries = this.countries;
2116
+ }
2117
+ ionViewDidEnter() {
2118
+ if (this.sbar && this.shouldFocusSearchbar) {
2119
+ setTimeout(() => { this.sbar.setFocus(); }, 400);
2120
+ }
2121
+ }
2122
+ search(ev) {
2123
+ let search = ev.detail.value;
2124
+ this.notFound = false;
2125
+ if (search === '' || search === null) {
2126
+ this.countries = this.allCountries;
2127
+ }
2128
+ else {
2129
+ search = search.toLocaleLowerCase();
2130
+ this.countries = this.allCountries.filter(r => {
2131
+ return (r.name && r.name.toLocaleLowerCase().indexOf(search) !== -1);
2132
+ });
2133
+ if (this.countries.length === 0) {
2134
+ this.notFound = true;
2135
+ }
2136
+ }
2137
+ }
2138
+ itemTapped(c) {
2139
+ this.modalCtrl.dismiss(c);
2140
+ }
2141
+ closeModal() {
2142
+ this.modalCtrl.dismiss(null);
2143
+ }
2144
+ }
2145
+ /** @nocollapse */ IonIntTelCodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntTelCodeComponent, deps: [{ token: i1.ModalController }], target: i0.ɵɵFactoryTarget.Component });
2146
+ /** @nocollapse */ IonIntTelCodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: IonIntTelCodeComponent, selector: "ion-intl-tel-code", inputs: { country: "country", canSearch: "canSearch", closeButtonText: "closeButtonText", closeButtonSlot: "closeButtonSlot", countries: "countries", searchFailText: "searchFailText", searchPlaceholder: "searchPlaceholder", shouldFocusSearchbar: "shouldFocusSearchbar", title: "title", dialCode: "dialCode" }, viewQueries: [{ propertyName: "sbar", first: true, predicate: ["searchBar"], descendants: true }], ngImport: i0, template: "<ion-header>\n <ion-toolbar>\n <ion-title class=\"ion-text-center\">\n {{title}}\n </ion-title>\n\n <ion-buttons [slot]=\"closeButtonSlot\">\n <ion-button ion-button (click)=\"closeModal()\">{{closeButtonText}}</ion-button>\n </ion-buttons>\n\n </ion-toolbar>\n <ion-searchbar #searchBar *ngIf=\"canSearch\" placeholder=\"{{searchPlaceholder}}\" [debounce]=\"400\"\n (keyup.enter)=\"$event.target.blur()\" (ionChange)=\"search($event)\"></ion-searchbar>\n</ion-header>\n\n<ion-content>\n <ion-list>\n <ion-radio-group [value]=\"country.isoCode\">\n <ion-item style=\"white-space:normal\" *ngFor=\"let c of countries\">\n <ion-radio [value]=\"c.isoCode\" slot=\"start\" color=\"primary\" (click)=\"itemTapped(c)\"></ion-radio>\n <ion-label>{{c.name}} <span *ngIf=\"dialCode\">{{dialCode}}{{c.displayDialCode}}</span></ion-label>\n <span slot=\"end\" class=\"fi fi-{{c.flagClass}}\"></span>\n </ion-item>\n </ion-radio-group>\n <ion-item lines=\"none\" *ngIf=\"notFound\">\n <ion-text>{{searchFailText}}</ion-text>\n </ion-item>\n </ion-list>\n</ion-content>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1.IonContent, selector: "ion-content", inputs: ["color", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { kind: "component", type: i1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }, { kind: "component", type: i1.IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: i1.IonRadio, selector: "ion-radio", inputs: ["color", "disabled", "justify", "labelPlacement", "legacy", "mode", "name", "value"] }, { kind: "component", type: i1.IonRadioGroup, selector: "ion-radio-group", inputs: ["allowEmptySelection", "name", "value"] }, { kind: "component", type: i1.IonSearchbar, selector: "ion-searchbar", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }, { kind: "component", type: i1.IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: i1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "directive", type: i1.RadioValueAccessor, selector: "ion-radio" }, { kind: "directive", type: i1.SelectValueAccessor, selector: "ion-range, ion-select, ion-radio-group, ion-segment, ion-datetime" }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }] });
2147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntTelCodeComponent, decorators: [{
2148
+ type: Component,
2149
+ args: [{ selector: 'ion-intl-tel-code', template: "<ion-header>\n <ion-toolbar>\n <ion-title class=\"ion-text-center\">\n {{title}}\n </ion-title>\n\n <ion-buttons [slot]=\"closeButtonSlot\">\n <ion-button ion-button (click)=\"closeModal()\">{{closeButtonText}}</ion-button>\n </ion-buttons>\n\n </ion-toolbar>\n <ion-searchbar #searchBar *ngIf=\"canSearch\" placeholder=\"{{searchPlaceholder}}\" [debounce]=\"400\"\n (keyup.enter)=\"$event.target.blur()\" (ionChange)=\"search($event)\"></ion-searchbar>\n</ion-header>\n\n<ion-content>\n <ion-list>\n <ion-radio-group [value]=\"country.isoCode\">\n <ion-item style=\"white-space:normal\" *ngFor=\"let c of countries\">\n <ion-radio [value]=\"c.isoCode\" slot=\"start\" color=\"primary\" (click)=\"itemTapped(c)\"></ion-radio>\n <ion-label>{{c.name}} <span *ngIf=\"dialCode\">{{dialCode}}{{c.displayDialCode}}</span></ion-label>\n <span slot=\"end\" class=\"fi fi-{{c.flagClass}}\"></span>\n </ion-item>\n </ion-radio-group>\n <ion-item lines=\"none\" *ngIf=\"notFound\">\n <ion-text>{{searchFailText}}</ion-text>\n </ion-item>\n </ion-list>\n</ion-content>\n" }]
2150
+ }], ctorParameters: function () { return [{ type: i1.ModalController }]; }, propDecorators: { country: [{
2151
+ type: Input
2152
+ }], canSearch: [{
2153
+ type: Input
2154
+ }], closeButtonText: [{
2155
+ type: Input
2156
+ }], closeButtonSlot: [{
2157
+ type: Input
2158
+ }], countries: [{
2159
+ type: Input
2160
+ }], searchFailText: [{
2161
+ type: Input
2162
+ }], searchPlaceholder: [{
2163
+ type: Input
2164
+ }], shouldFocusSearchbar: [{
2165
+ type: Input
2166
+ }], title: [{
2167
+ type: Input
2168
+ }], dialCode: [{
2169
+ type: Input
2170
+ }], sbar: [{
2171
+ type: ViewChild,
2172
+ args: ['searchBar']
2173
+ }] } });
2174
+
2175
+ class CountryPlaceholder {
2176
+ transform(country, inputPlaceholder, separateDialCode, fallbackPlaceholder, usePatternPlaceholder) {
2177
+ if (inputPlaceholder && inputPlaceholder.length > 0) {
2178
+ return inputPlaceholder;
2179
+ }
2180
+ const phoneUtil = PhoneNumberUtil.getInstance();
2181
+ try {
2182
+ const example = phoneUtil.getExampleNumber(country.isoCode);
2183
+ let placeholder = phoneUtil.format(example, PhoneNumberFormat.INTERNATIONAL);
2184
+ if (usePatternPlaceholder) {
2185
+ const dc = placeholder.substring(0, placeholder.indexOf(' '));
2186
+ placeholder = placeholder.substring(placeholder.indexOf(' ') + 1);
2187
+ placeholder = dc + ' ' + placeholder.replace(/\d/g, 'x');
2188
+ }
2189
+ if (placeholder) {
2190
+ if (separateDialCode) {
2191
+ return placeholder.substr(placeholder.indexOf(' ') + 1);
2192
+ }
2193
+ else {
2194
+ return placeholder;
2195
+ }
2196
+ }
2197
+ }
2198
+ catch (e) {
2199
+ return fallbackPlaceholder;
2200
+ }
2201
+ }
2202
+ }
2203
+ /** @nocollapse */ CountryPlaceholder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CountryPlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2204
+ /** @nocollapse */ CountryPlaceholder.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: CountryPlaceholder, name: "countryPlaceholder" });
2205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CountryPlaceholder, decorators: [{
2206
+ type: Pipe,
2207
+ args: [{ name: 'countryPlaceholder' }]
2208
+ }] });
2209
+
2210
+ /**
2211
+ * @ignore
2212
+ */
2213
+ /**
2214
+ * @author Azzam Asghar <azzam.asghar@interstellus.com>
2215
+ * @author Steve Drew <sdrew@waitwell.ca>
2216
+ */
2217
+ class IonIntlTelInputComponent {
2218
+ get hasValueCssClass() {
2219
+ return this.hasValue();
2220
+ }
2221
+ get isEnabled() {
2222
+ return !this.disabled;
2223
+ }
2224
+ constructor(el, platform, ionIntlTelInputService, modalCtrl) {
2225
+ this.el = el;
2226
+ this.platform = platform;
2227
+ this.ionIntlTelInputService = ionIntlTelInputService;
2228
+ this.modalCtrl = modalCtrl;
2229
+ this.cssClass = true;
2230
+ /**
2231
+ * autocomplete, set to 'tel' if needed
2232
+ *
2233
+ * @default 'off'
2234
+ * @memberof IonIntlTelInputComponent
2235
+ */
2236
+ this.autocomplete = 'off';
2237
+ /**
2238
+ * required, passed onto ion-input so we can be accessiblity compliant
2239
+ *
2240
+ * @default false
2241
+ * @memberof IonIntlTelInputComponent
2242
+ */
2243
+ this.required = false;
2244
+ /**
2245
+ * Iso Code of default selected Country.
2246
+ * See more on.
2247
+ *
2248
+ * @default ''
2249
+ * @memberof IonIntlTelInputComponent
2250
+ */
2251
+ this.defaultCountryiso = '';
2252
+ /**
2253
+ * Determines whether to use `00` or `+` as dial code prefix.
2254
+ * Available attributes are '+' | '00'.
2255
+ * See more on.
2256
+ *
2257
+ * @default +
2258
+ * @memberof IonIntlTelInputComponent
2259
+ */
2260
+ this.dialCodePrefix = '+';
2261
+ /**
2262
+ * Determines whether to select automatic country based on user input.
2263
+ * See more on.
2264
+ *
2265
+ * @default true
2266
+ * @memberof IonIntlTelInputComponent
2267
+ */
2268
+ this.enableAutoCountrySelect = true;
2269
+ /**
2270
+ * Determines whether an example number will be shown as a placeholder in input.
2271
+ * See more on.
2272
+ *
2273
+ * @default true
2274
+ * @memberof IonIntlTelInputComponent
2275
+ */
2276
+ this.enablePlaceholder = true;
2277
+ /**
2278
+ * A fallaback placeholder to be used if no example number is found for a country.
2279
+ * See more on.
2280
+ *
2281
+ * @default ''
2282
+ * @memberof IonIntlTelInputComponent
2283
+ */
2284
+ this.fallbackPlaceholder = '';
2285
+ /**
2286
+ * If a custom placeholder is needed for input.
2287
+ * If this property is set it will override `enablePlaceholder` and only this placeholder will be shown.
2288
+ * See more on.
2289
+ *
2290
+ * @default ''
2291
+ * @memberof IonIntlTelInputComponent
2292
+ */
2293
+ this.inputPlaceholder = '';
2294
+ /**
2295
+ * Instead of an example phone number, use a x pattern. Such as xxx-xxx-xxxx, this will be obtained
2296
+ * based on the example number from the google phone lib.
2297
+ *
2298
+ * @default true
2299
+ * @memberof IonIntlTelInputComponent
2300
+ */
2301
+ this.usePatternPlaceholder = true;
2302
+ /**
2303
+ * Maximum Length for input.
2304
+ * See more on.
2305
+ *
2306
+ * @default '15'
2307
+ * @memberof IonIntlTelInputComponent
2308
+ */
2309
+ this.maxLength = '15';
2310
+ /**
2311
+ * Title of modal opened to select country dial code.
2312
+ * See more on.
2313
+ *
2314
+ * @default 'Select Country'
2315
+ * @memberof IonIntlTelInputComponent
2316
+ */
2317
+ this.modalTitle = 'Select Country';
2318
+ /**
2319
+ * CSS class to attach to dial code selectionmodal.
2320
+ * See more on.
2321
+ *
2322
+ * @default 'ion-intl-tel-modal'
2323
+ * @memberof IonIntlTelInputComponent
2324
+ */
2325
+ this.modalCssClass = 'ion-intl-tel-modal';
2326
+ /**
2327
+ * Placeholder for input in dial code selection modal.
2328
+ * See more on.
2329
+ *
2330
+ * @default 'Enter country name'
2331
+ * @memberof IonIntlTelInputComponent
2332
+ */
2333
+ this.modalSearchPlaceholder = 'Enter country name';
2334
+ /**
2335
+ * Text for close button in dial code selection modal.
2336
+ * See more on.
2337
+ *
2338
+ * @default 'Close'
2339
+ * @memberof IonIntlTelInputComponent
2340
+ */
2341
+ this.modalCloseText = 'Close';
2342
+ /**
2343
+ * Slot for close button in dial code selection modal. [Ionic slots](https://ionicframework.com/docs/api/item) are supported
2344
+ * See more on.
2345
+ *
2346
+ * @default 'end'
2347
+ * @memberof IonIntlTelInputComponent
2348
+ */
2349
+ this.modalCloseButtonSlot = 'end';
2350
+ /**
2351
+ * Determines whether dial code selection modal should be searchable or not.
2352
+ * See more on.
2353
+ *
2354
+ * @default 'true'
2355
+ * @memberof IonIntlTelInputComponent
2356
+ */
2357
+ this.modalCanSearch = true;
2358
+ /**
2359
+ * Determines whether dial code selection modal is closed on backdrop click.
2360
+ * See more on.
2361
+ *
2362
+ * @default 'true'
2363
+ * @memberof IonIntlTelInputComponent
2364
+ */
2365
+ this.modalShouldBackdropClose = true;
2366
+ /**
2367
+ * Determines whether input should be focused when dial code selection modal is opened.
2368
+ * See more on.
2369
+ *
2370
+ * @default 'true'
2371
+ * @memberof IonIntlTelInputComponent
2372
+ */
2373
+ this.modalShouldFocusSearchbar = true;
2374
+ /**
2375
+ * Message to show when no countries are found for search in dial code selection modal.
2376
+ * See more on.
2377
+ *
2378
+ * @default 'true'
2379
+ * @memberof IonIntlTelInputComponent
2380
+ */
2381
+ this.modalSearchFailText = 'No countries found';
2382
+ /**
2383
+ * List of iso codes of manually selected countries as string, which will appear in the dropdown.
2384
+ * **Note**: `onlyCountries` should be a string array of country iso codes.
2385
+ * See more on.
2386
+ *
2387
+ * @default null
2388
+ * @memberof IonIntlTelInputComponent
2389
+ */
2390
+ this.onlyCountries = [];
2391
+ /**
2392
+ * List of iso codesn as string of countries, which will appear at the top in dial code selection modal.
2393
+ * **Note**: `preferredCountries` should be a string array of country iso codes.
2394
+ * See more on.
2395
+ *
2396
+ * @default null
2397
+ * @memberof IonIntlTelInputComponent
2398
+ */
2399
+ this.preferredCountries = [];
2400
+ /**
2401
+ * Determines whether first country should be selected in dial code select or not.
2402
+ * See more on.
2403
+ *
2404
+ * @default true
2405
+ * @memberof IonIntlTelInputComponent
2406
+ */
2407
+ this.selectFirstCountry = true;
2408
+ /**
2409
+ * Determines whether to visually separate dialcode into the drop down element.
2410
+ * See more on.
2411
+ *
2412
+ * @default true
2413
+ * @memberof IonIntlTelInputComponent
2414
+ */
2415
+ this.separateDialCode = true;
2416
+ /**
2417
+ * Fires when the Phone number Input is changed.
2418
+ * See more on.
2419
+ *
2420
+ * @memberof IonIntlTelInputComponent
2421
+ */
2422
+ this.numberChange = new EventEmitter();
2423
+ /**
2424
+ * Fires when the Phone number Input is blurred.
2425
+ * See more on.
2426
+ *
2427
+ * @memberof IonIntlTelInputComponent
2428
+ */
2429
+ this.numberBlur = new EventEmitter();
2430
+ /**
2431
+ * Fires when the Phone number Input is focused.
2432
+ * See more on.
2433
+ *
2434
+ * @memberof IonIntlTelInputComponent
2435
+ */
2436
+ this.numberFocus = new EventEmitter();
2437
+ /**
2438
+ * Fires when the user is typing in Phone number Input.
2439
+ * See more on.
2440
+ *
2441
+ * @memberof IonIntlTelInputComponent
2442
+ */
2443
+ this.numberInput = new EventEmitter();
2444
+ /**
2445
+ * Fires when the dial code selection is changed.
2446
+ * See more on.
2447
+ *
2448
+ * @memberof IonIntlTelInputComponent
2449
+ */
2450
+ this.codeChange = new EventEmitter();
2451
+ /**
2452
+ * Fires when the dial code selection modal is opened.
2453
+ * See more on.
2454
+ *
2455
+ * @memberof IonIntlTelInputComponent
2456
+ */
2457
+ this.codeOpen = new EventEmitter();
2458
+ /**
2459
+ * Fires when the dial code selection modal is closed.
2460
+ * See more on.
2461
+ *
2462
+ * @memberof IonIntlTelInputComponent
2463
+ */
2464
+ this.codeClose = new EventEmitter();
2465
+ /**
2466
+ * Fires when a dial code is selected in dial code selection modal.
2467
+ * See more on.
2468
+ *
2469
+ * @memberof IonIntlTelInputComponent
2470
+ */
2471
+ this.codeSelect = new EventEmitter();
2472
+ // tslint:disable-next-line: variable-name
2473
+ this._value = null;
2474
+ this.phoneNumber = '';
2475
+ this.countries = [];
2476
+ this.disabled = false;
2477
+ this.phoneUtil = PhoneNumberUtil.getInstance();
2478
+ this.onTouched = () => { };
2479
+ this.propagateChange = (_) => { };
2480
+ this.startsWith = (input, search) => {
2481
+ return input.substr(0, search.length) === search;
2482
+ };
2483
+ this.getClasses = (element) => {
2484
+ const classList = element.classList;
2485
+ const classes = [];
2486
+ for (let i = 0; i < classList.length; i++) {
2487
+ const item = classList.item(i);
2488
+ if (item !== null && this.startsWith(item, 'ng-')) {
2489
+ classes.push(`ion-${item.substr(3)}`);
2490
+ }
2491
+ }
2492
+ return classes;
2493
+ };
2494
+ this.setClasses = (element, classes) => {
2495
+ const classList = element.classList;
2496
+ [
2497
+ 'ion-valid',
2498
+ 'ion-invalid',
2499
+ 'ion-touched',
2500
+ 'ion-untouched',
2501
+ 'ion-dirty',
2502
+ 'ion-pristine',
2503
+ ].forEach((c) => classList.remove(c));
2504
+ classes.forEach((c) => classList.add(c));
2505
+ };
2506
+ this.setIonicClasses = (element) => {
2507
+ raf(() => {
2508
+ const input = element.nativeElement;
2509
+ const classes = this.getClasses(input);
2510
+ this.setClasses(input, classes);
2511
+ const item = input.closest('ion-item');
2512
+ if (item) {
2513
+ this.setClasses(item, classes);
2514
+ }
2515
+ });
2516
+ };
2517
+ this.setItemClass = (element, className, addClass) => {
2518
+ const input = element.nativeElement;
2519
+ const item = input.closest('ion-item');
2520
+ if (item) {
2521
+ const classList = item.classList;
2522
+ if (addClass) {
2523
+ classList.add(className);
2524
+ }
2525
+ else {
2526
+ classList.remove(className);
2527
+ }
2528
+ }
2529
+ };
2530
+ }
2531
+ get value() {
2532
+ return this._value;
2533
+ }
2534
+ set value(value) {
2535
+ this._value = value;
2536
+ this.setIonicClasses(this.el);
2537
+ }
2538
+ emitValueChange(change) {
2539
+ this.propagateChange(change);
2540
+ }
2541
+ ngOnInit() {
2542
+ this.isIos = this.platform.is('ios');
2543
+ this.isMD = !this.isIos;
2544
+ this.setItemClass(this.el, 'item-interactive', true);
2545
+ this.fetchAllCountries();
2546
+ this.setPreferredCountries();
2547
+ if (this.onlyCountries.length) {
2548
+ this.countries = this.countries.filter((country) => this.onlyCountries.includes(country.isoCode));
2549
+ }
2550
+ if (this.selectFirstCountry) {
2551
+ if (this.defaultCountryiso) {
2552
+ this.setCountry(this.getCountryByIsoCode(this.defaultCountryiso));
2553
+ }
2554
+ else {
2555
+ if (this.preferredCountries.length &&
2556
+ this.preferredCountries.includes(this.defaultCountryiso)) {
2557
+ this.setCountry(this.getCountryByIsoCode(this.preferredCountries[0]));
2558
+ }
2559
+ else {
2560
+ this.setCountry(this.countries[0]);
2561
+ }
2562
+ }
2563
+ }
2564
+ }
2565
+ ngOnChanges(changes) {
2566
+ if (this.countries &&
2567
+ changes.defaulyCountryisoCode &&
2568
+ changes.defaulyCountryisoCode.currentValue !==
2569
+ changes.defaulyCountryisoCode.previousValue) {
2570
+ this.setCountry(changes.defaulyCountryisoCode.currentValue);
2571
+ }
2572
+ }
2573
+ registerOnChange(fn) {
2574
+ this.propagateChange = fn;
2575
+ }
2576
+ registerOnTouched(fn) {
2577
+ this.onTouched = fn;
2578
+ }
2579
+ writeValue(obj) {
2580
+ this.fillValues(obj);
2581
+ }
2582
+ setDisabledState(isDisabled) {
2583
+ this.disabled = isDisabled;
2584
+ }
2585
+ fillValues(value) {
2586
+ if (value && typeof value === 'string') {
2587
+ let googleNumber;
2588
+ try {
2589
+ googleNumber = this.phoneUtil.parse(value, null);
2590
+ }
2591
+ catch (e) {
2592
+ }
2593
+ if (!googleNumber) {
2594
+ // If failed to parse, try adding a +1 and see if valid
2595
+ if (value.length >= 10 && value.indexOf('+') === -1) {
2596
+ const v = '+1' + value;
2597
+ googleNumber = this.phoneUtil.parse(v, null);
2598
+ }
2599
+ }
2600
+ if (!googleNumber) {
2601
+ console.log('Warning: failed to parse number: ', value);
2602
+ }
2603
+ if (googleNumber) {
2604
+ let isoCode = googleNumber && googleNumber.getCountryCode()
2605
+ ? this.getCountryIsoCode(googleNumber.getCountryCode(), googleNumber)
2606
+ : this.country.isoCode;
2607
+ if (isoCode && isoCode !== this.country.isoCode) {
2608
+ const newCountry = this.countries.find((country) => country.isoCode === isoCode);
2609
+ if (newCountry) {
2610
+ this.country = newCountry;
2611
+ }
2612
+ }
2613
+ isoCode = isoCode ? isoCode : this.country ? this.country.isoCode : null;
2614
+ const internationallNo = this.phoneUtil.format(googleNumber, PhoneNumberFormat.INTERNATIONAL);
2615
+ this.phoneNumber = this.removeDialCode(internationallNo);
2616
+ this.value = internationallNo;
2617
+ }
2618
+ return;
2619
+ }
2620
+ }
2621
+ hasValue() {
2622
+ return !this.isNullOrWhiteSpace(this.value);
2623
+ }
2624
+ onCodeOpen() {
2625
+ this.codeOpen.emit();
2626
+ }
2627
+ async openModal() {
2628
+ const modal = await this.modalCtrl.create({
2629
+ component: IonIntTelCodeComponent,
2630
+ cssClass: this.modalCssClass,
2631
+ backdropDismiss: this.modalShouldBackdropClose,
2632
+ componentProps: {
2633
+ country: this.country,
2634
+ canSearch: this.modalCanSearch,
2635
+ closeButtonText: this.modalCloseText,
2636
+ closeButtonSlot: this.modalCloseButtonSlot,
2637
+ countries: this.countries,
2638
+ title: this.modalTitle,
2639
+ searchFailText: this.modalSearchFailText,
2640
+ searchPlaceholder: this.modalSearchPlaceholder,
2641
+ shouldFocusSearchbar: this.modalShouldFocusSearchbar,
2642
+ dialCode: this.separateDialCode ? this.dialCodePrefix : null
2643
+ }
2644
+ });
2645
+ await modal.present();
2646
+ modal.onDidDismiss().then(data => {
2647
+ if (data.data) {
2648
+ this.country = data.data;
2649
+ this.onCodeChange();
2650
+ }
2651
+ });
2652
+ }
2653
+ onCodeChange() {
2654
+ if (this.isNullOrWhiteSpace(this.phoneNumber)) {
2655
+ this.emitValueChange(null);
2656
+ }
2657
+ else {
2658
+ let googleNumber;
2659
+ try {
2660
+ googleNumber = this.phoneUtil.parse(this.phoneNumber, this.country.isoCode.toUpperCase());
2661
+ }
2662
+ catch (e) { }
2663
+ const internationallNo = googleNumber
2664
+ ? this.phoneUtil.format(googleNumber, PhoneNumberFormat.INTERNATIONAL)
2665
+ : '';
2666
+ const nationalNo = googleNumber
2667
+ ? this.phoneUtil.format(googleNumber, PhoneNumberFormat.NATIONAL)
2668
+ : '';
2669
+ if (this.separateDialCode && internationallNo) {
2670
+ this.phoneNumber = this.removeDialCode(internationallNo);
2671
+ }
2672
+ this.emitValueChange(internationallNo);
2673
+ this.codeChange.emit();
2674
+ }
2675
+ setTimeout(() => {
2676
+ this.numberInputEl.setFocus();
2677
+ }, 400);
2678
+ }
2679
+ onCodeClose() {
2680
+ this.onTouched();
2681
+ this.setIonicClasses(this.el);
2682
+ this.hasFocus = false;
2683
+ this.setItemClass(this.el, 'item-has-focus', false);
2684
+ this.codeClose.emit();
2685
+ }
2686
+ onCodeSelect() {
2687
+ this.codeSelect.emit();
2688
+ }
2689
+ onIonNumberChange(event) {
2690
+ this.setIonicClasses(this.el);
2691
+ this.numberChange.emit(event);
2692
+ }
2693
+ onIonNumberBlur() {
2694
+ this.onTouched();
2695
+ this.setIonicClasses(this.el);
2696
+ this.hasFocus = false;
2697
+ this.setItemClass(this.el, 'item-has-focus', false);
2698
+ this.numberBlur.emit();
2699
+ }
2700
+ onIonNumberFocus() {
2701
+ this.hasFocus = true;
2702
+ this.setItemClass(this.el, 'item-has-focus', true);
2703
+ this.numberFocus.emit();
2704
+ }
2705
+ onIonNumberInput(event) {
2706
+ this.numberInput.emit(event);
2707
+ }
2708
+ // called via (ngModelChange)
2709
+ onNumberChange() {
2710
+ if (!this.phoneNumber) {
2711
+ this.value = null;
2712
+ this.emitValueChange(null);
2713
+ return;
2714
+ }
2715
+ if (this.country) {
2716
+ this.emitValueChange(this.dialCodePrefix + this.country.dialCode + ' ' + this.phoneNumber);
2717
+ }
2718
+ let googleNumber;
2719
+ try {
2720
+ googleNumber = this.phoneUtil.parse(this.phoneNumber, this.country.isoCode.toUpperCase());
2721
+ }
2722
+ catch (e) {
2723
+ return;
2724
+ }
2725
+ let isoCode = this.country ? this.country.isoCode : null;
2726
+ // auto select country based on the extension (and areaCode if needed) (e.g select Canada if number starts with +1 416)
2727
+ if (this.enableAutoCountrySelect) {
2728
+ isoCode =
2729
+ googleNumber && googleNumber.getCountryCode()
2730
+ ? this.getCountryIsoCode(googleNumber.getCountryCode(), googleNumber)
2731
+ : this.country.isoCode;
2732
+ if (isoCode && isoCode !== this.country.isoCode) {
2733
+ const newCountry = this.countries.find((country) => country.isoCode === isoCode);
2734
+ if (newCountry) {
2735
+ this.country = newCountry;
2736
+ }
2737
+ }
2738
+ }
2739
+ isoCode = isoCode ? isoCode : this.country ? this.country.isoCode : null;
2740
+ if (!this.phoneNumber || !isoCode) {
2741
+ this.emitValueChange(null);
2742
+ }
2743
+ else {
2744
+ const internationallNo = googleNumber
2745
+ ? this.phoneUtil.format(googleNumber, PhoneNumberFormat.INTERNATIONAL)
2746
+ : '';
2747
+ const nationalNo = googleNumber
2748
+ ? this.phoneUtil.format(googleNumber, PhoneNumberFormat.NATIONAL)
2749
+ : '';
2750
+ if (this.separateDialCode && internationallNo) {
2751
+ this.phoneNumber = this.removeDialCode(internationallNo);
2752
+ }
2753
+ this.emitValueChange(internationallNo);
2754
+ }
2755
+ }
2756
+ onNumberKeyDown(event) {
2757
+ const allowedChars = /^[0-9\+\-\ ]/;
2758
+ const allowedCtrlChars = /[axcv]/;
2759
+ const allowedOtherKeys = [
2760
+ 'ArrowLeft',
2761
+ 'ArrowUp',
2762
+ 'ArrowRight',
2763
+ 'ArrowDown',
2764
+ 'Home',
2765
+ 'End',
2766
+ 'Insert',
2767
+ 'Delete',
2768
+ 'Backspace',
2769
+ 'Tab',
2770
+ ];
2771
+ const isCtrlKey = event.ctrlKey || event.metaKey;
2772
+ if (!allowedChars.test(event.key) &&
2773
+ !(isCtrlKey && allowedCtrlChars.test(event.key)) &&
2774
+ !allowedOtherKeys.includes(event.key)) {
2775
+ event.preventDefault();
2776
+ }
2777
+ }
2778
+ filterCountries(text) {
2779
+ return this.countries.filter((country) => {
2780
+ return (country.name.toLowerCase().indexOf(text) !== -1 ||
2781
+ country.name.toLowerCase().indexOf(text) !== -1 ||
2782
+ country.dialCode.toString().toLowerCase().indexOf(text) !== -1);
2783
+ });
2784
+ }
2785
+ getCountryIsoCode(countryCode, googleNumber) {
2786
+ const rawNumber = googleNumber.values_[2].toString();
2787
+ const countries = this.countries.filter((country) => country.dialCode === countryCode.toString());
2788
+ const mainCountry = countries.find((country) => country.areaCodes === undefined);
2789
+ const secondaryCountries = countries.filter((country) => country.areaCodes !== undefined);
2790
+ let matchedCountry = mainCountry ? mainCountry.isoCode : undefined;
2791
+ secondaryCountries.forEach((country) => {
2792
+ country.areaCodes.forEach((areaCode) => {
2793
+ if (rawNumber.startsWith(areaCode)) {
2794
+ matchedCountry = country.isoCode;
2795
+ }
2796
+ });
2797
+ });
2798
+ return matchedCountry;
2799
+ }
2800
+ fetchAllCountries() {
2801
+ this.countries = this.ionIntlTelInputService.getListOfCountries();
2802
+ }
2803
+ getCountryByIsoCode(isoCode) {
2804
+ for (const country of this.countries) {
2805
+ if (country.isoCode === isoCode) {
2806
+ return country;
2807
+ }
2808
+ }
2809
+ console.error('tel: unknown country iso code: ', isoCode);
2810
+ return;
2811
+ }
2812
+ isNullOrWhiteSpace(value) {
2813
+ if (value === null || value === undefined) {
2814
+ return true;
2815
+ }
2816
+ if (typeof value === 'string' && value === '') {
2817
+ return true;
2818
+ }
2819
+ return typeof value === 'object' && Object.keys(value).length === 0;
2820
+ }
2821
+ removeDialCode(phoneNumber) {
2822
+ if (this.separateDialCode && phoneNumber) {
2823
+ phoneNumber = phoneNumber.substr(phoneNumber.indexOf(' ') + 1);
2824
+ }
2825
+ return phoneNumber;
2826
+ }
2827
+ setCountry(country) {
2828
+ this.country = country;
2829
+ this.codeChange.emit(this.country);
2830
+ }
2831
+ setPreferredCountries() {
2832
+ for (const preferedCountryIsoCode of this.preferredCountries) {
2833
+ const country = this.getCountryByIsoCode(preferedCountryIsoCode);
2834
+ country.priority = country ? 1 : country.priority;
2835
+ }
2836
+ this.countries.sort((a, b) => a.priority > b.priority ? -1 : a.priority < b.priority ? 1 : 0);
2837
+ }
2838
+ }
2839
+ /** @nocollapse */ IonIntlTelInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputComponent, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: IonIntlTelInputService }, { token: i1.ModalController }], target: i0.ɵɵFactoryTarget.Component });
2840
+ /** @nocollapse */ IonIntlTelInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: IonIntlTelInputComponent, selector: "ion-intl-tel-input", inputs: { isEnabled: "isEnabled", autocomplete: "autocomplete", required: "required", defaultCountryiso: "defaultCountryiso", dialCodePrefix: "dialCodePrefix", enableAutoCountrySelect: "enableAutoCountrySelect", enablePlaceholder: "enablePlaceholder", fallbackPlaceholder: "fallbackPlaceholder", inputPlaceholder: "inputPlaceholder", usePatternPlaceholder: "usePatternPlaceholder", maxLength: "maxLength", modalTitle: "modalTitle", modalCssClass: "modalCssClass", modalSearchPlaceholder: "modalSearchPlaceholder", modalCloseText: "modalCloseText", modalCloseButtonSlot: "modalCloseButtonSlot", modalCanSearch: "modalCanSearch", modalShouldBackdropClose: "modalShouldBackdropClose", modalShouldFocusSearchbar: "modalShouldFocusSearchbar", modalSearchFailText: "modalSearchFailText", onlyCountries: "onlyCountries", preferredCountries: "preferredCountries", selectFirstCountry: "selectFirstCountry", separateDialCode: "separateDialCode" }, outputs: { numberChange: "numberChange", numberBlur: "numberBlur", numberFocus: "numberFocus", numberInput: "numberInput", codeChange: "codeChange", codeOpen: "codeOpen", codeClose: "codeClose", codeSelect: "codeSelect" }, host: { properties: { "class.ion-intl-tel-input": "this.cssClass", "class.ion-intl-tel-input-ios": "this.isIos", "class.ion-intl-tel-input-md": "this.isMD", "class.has-focus": "this.hasFocus", "class.ion-intl-tel-input-has-value": "this.hasValueCssClass", "class.ion-intl-tel-input-is-enabled": "this.isEnabled" } }, providers: [
2841
+ {
2842
+ provide: NG_VALUE_ACCESSOR,
2843
+ useExisting: forwardRef((() => IonIntlTelInputComponent)),
2844
+ multi: true,
2845
+ },
2846
+ ], viewQueries: [{ propertyName: "numberInputEl", first: true, predicate: ["numberInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ion-button\n fill=\"clear\"\n class=\"ion-intl-tel-input-btn\"\n [disabled] = \"disabled\"\n aria-label=\"country\"\n (click)=\"openModal()\"\n>\n <span class=\"ion-intl-tel-input-flag fi fi-{{country.flagClass}}\"></span><span class=\"ion-intl-tel-input-code\" *ngIf=\"separateDialCode\">{{dialCodePrefix}}{{country.dialCode}}</span>\n <ion-icon style=\"font-size:14px;opacity:.5;\" name=\"caret-down\"></ion-icon>\n</ion-button>\n<div class=\"ion-intl-tel-input-number\">\n <ion-input\n #numberInput\n [(ngModel)]=\"phoneNumber\"\n [autocomplete]=\"autocomplete\"\n [required]=\"required\"\n [disabled] = \"disabled\"\n [attr.maxLength]=\"maxLength\"\n type=\"tel\"\n (ionBlur)=\"onIonNumberBlur()\"\n (ionChange)=\"onIonNumberChange($event)\"\n (ionFocus)=\"onIonNumberFocus()\"\n (ionInput)=\"onIonNumberInput($event)\"\n (keydown)=\"onNumberKeyDown($event)\"\n (ngModelChange)=\"onNumberChange()\"\n placeholder=\"{{country | countryPlaceholder: inputPlaceholder:separateDialCode:fallbackPlaceholder:usePatternPlaceholder}}\" >\n </ion-input>\n</div>\n", styles: [":host{width:100%;display:flex;align-items:center}:host ion-button{color:var(--ion-color);height:100%;margin:0}:host ion-button::part(native){padding-inline-start:0;padding-inline-end:2px;margin:0;font-size:16px;font-weight:400}:host .fi{margin-right:5px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i1.IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "component", type: i1.IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "legacy", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }, { kind: "directive", type: i1.TextValueAccessor, selector: "ion-input:not([type=number]),ion-textarea,ion-searchbar" }, { kind: "pipe", type: CountryPlaceholder, name: "countryPlaceholder" }] });
2847
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputComponent, decorators: [{
2848
+ type: Component,
2849
+ args: [{ selector: 'ion-intl-tel-input', providers: [
2850
+ {
2851
+ provide: NG_VALUE_ACCESSOR,
2852
+ useExisting: forwardRef((() => IonIntlTelInputComponent)),
2853
+ multi: true,
2854
+ },
2855
+ ], template: "<ion-button\n fill=\"clear\"\n class=\"ion-intl-tel-input-btn\"\n [disabled] = \"disabled\"\n aria-label=\"country\"\n (click)=\"openModal()\"\n>\n <span class=\"ion-intl-tel-input-flag fi fi-{{country.flagClass}}\"></span><span class=\"ion-intl-tel-input-code\" *ngIf=\"separateDialCode\">{{dialCodePrefix}}{{country.dialCode}}</span>\n <ion-icon style=\"font-size:14px;opacity:.5;\" name=\"caret-down\"></ion-icon>\n</ion-button>\n<div class=\"ion-intl-tel-input-number\">\n <ion-input\n #numberInput\n [(ngModel)]=\"phoneNumber\"\n [autocomplete]=\"autocomplete\"\n [required]=\"required\"\n [disabled] = \"disabled\"\n [attr.maxLength]=\"maxLength\"\n type=\"tel\"\n (ionBlur)=\"onIonNumberBlur()\"\n (ionChange)=\"onIonNumberChange($event)\"\n (ionFocus)=\"onIonNumberFocus()\"\n (ionInput)=\"onIonNumberInput($event)\"\n (keydown)=\"onNumberKeyDown($event)\"\n (ngModelChange)=\"onNumberChange()\"\n placeholder=\"{{country | countryPlaceholder: inputPlaceholder:separateDialCode:fallbackPlaceholder:usePatternPlaceholder}}\" >\n </ion-input>\n</div>\n", styles: [":host{width:100%;display:flex;align-items:center}:host ion-button{color:var(--ion-color);height:100%;margin:0}:host ion-button::part(native){padding-inline-start:0;padding-inline-end:2px;margin:0;font-size:16px;font-weight:400}:host .fi{margin-right:5px}\n"] }]
2856
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Platform }, { type: IonIntlTelInputService }, { type: i1.ModalController }]; }, propDecorators: { cssClass: [{
2857
+ type: HostBinding,
2858
+ args: ['class.ion-intl-tel-input']
2859
+ }], isIos: [{
2860
+ type: HostBinding,
2861
+ args: ['class.ion-intl-tel-input-ios']
2862
+ }], isMD: [{
2863
+ type: HostBinding,
2864
+ args: ['class.ion-intl-tel-input-md']
2865
+ }], hasFocus: [{
2866
+ type: HostBinding,
2867
+ args: ['class.has-focus']
2868
+ }], hasValueCssClass: [{
2869
+ type: HostBinding,
2870
+ args: ['class.ion-intl-tel-input-has-value']
2871
+ }], isEnabled: [{
2872
+ type: HostBinding,
2873
+ args: ['class.ion-intl-tel-input-is-enabled']
2874
+ }, {
2875
+ type: Input,
2876
+ args: ['isEnabled']
2877
+ }], autocomplete: [{
2878
+ type: Input
2879
+ }], required: [{
2880
+ type: Input
2881
+ }], defaultCountryiso: [{
2882
+ type: Input
2883
+ }], dialCodePrefix: [{
2884
+ type: Input
2885
+ }], enableAutoCountrySelect: [{
2886
+ type: Input
2887
+ }], enablePlaceholder: [{
2888
+ type: Input
2889
+ }], fallbackPlaceholder: [{
2890
+ type: Input
2891
+ }], inputPlaceholder: [{
2892
+ type: Input
2893
+ }], usePatternPlaceholder: [{
2894
+ type: Input
2895
+ }], maxLength: [{
2896
+ type: Input
2897
+ }], modalTitle: [{
2898
+ type: Input
2899
+ }], modalCssClass: [{
2900
+ type: Input
2901
+ }], modalSearchPlaceholder: [{
2902
+ type: Input
2903
+ }], modalCloseText: [{
2904
+ type: Input
2905
+ }], modalCloseButtonSlot: [{
2906
+ type: Input
2907
+ }], modalCanSearch: [{
2908
+ type: Input
2909
+ }], modalShouldBackdropClose: [{
2910
+ type: Input
2911
+ }], modalShouldFocusSearchbar: [{
2912
+ type: Input
2913
+ }], modalSearchFailText: [{
2914
+ type: Input
2915
+ }], onlyCountries: [{
2916
+ type: Input
2917
+ }], preferredCountries: [{
2918
+ type: Input
2919
+ }], selectFirstCountry: [{
2920
+ type: Input
2921
+ }], separateDialCode: [{
2922
+ type: Input
2923
+ }], numberChange: [{
2924
+ type: Output
2925
+ }], numberBlur: [{
2926
+ type: Output
2927
+ }], numberFocus: [{
2928
+ type: Output
2929
+ }], numberInput: [{
2930
+ type: Output
2931
+ }], codeChange: [{
2932
+ type: Output
2933
+ }], codeOpen: [{
2934
+ type: Output
2935
+ }], codeClose: [{
2936
+ type: Output
2937
+ }], codeSelect: [{
2938
+ type: Output
2939
+ }], numberInputEl: [{
2940
+ type: ViewChild,
2941
+ args: ['numberInput', { static: false }]
2942
+ }] } });
2943
+
2944
+ class IonIntlTelInputModule {
2945
+ }
2946
+ /** @nocollapse */ IonIntlTelInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2947
+ /** @nocollapse */ IonIntlTelInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputModule, declarations: [CountryPlaceholder,
2948
+ IonIntlTelInputValidatorDirective,
2949
+ IonIntlTelInputComponent,
2950
+ IonIntTelCodeComponent], imports: [CommonModule,
2951
+ FormsModule,
2952
+ IonicModule], exports: [IonIntlTelInputComponent,
2953
+ IonIntlTelInputValidatorDirective,
2954
+ IonIntTelCodeComponent] });
2955
+ /** @nocollapse */ IonIntlTelInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputModule, providers: [
2956
+ IonIntlTelInputService
2957
+ ], imports: [CommonModule,
2958
+ FormsModule,
2959
+ IonicModule] });
2960
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: IonIntlTelInputModule, decorators: [{
2961
+ type: NgModule,
2962
+ args: [{
2963
+ declarations: [
2964
+ CountryPlaceholder,
2965
+ IonIntlTelInputValidatorDirective,
2966
+ IonIntlTelInputComponent,
2967
+ IonIntTelCodeComponent
2968
+ ],
2969
+ imports: [
2970
+ CommonModule,
2971
+ FormsModule,
2972
+ IonicModule,
2973
+ ],
2974
+ exports: [
2975
+ IonIntlTelInputComponent,
2976
+ IonIntlTelInputValidatorDirective,
2977
+ IonIntTelCodeComponent
2978
+ ],
2979
+ providers: [
2980
+ IonIntlTelInputService
2981
+ ],
2982
+ }]
2983
+ }] });
2984
+
2985
+ /*
2986
+ * Public API Surface of ion-intl-tel-input
2987
+ */
2988
+
2989
+ /**
2990
+ * Generated bundle index. Do not edit.
2991
+ */
2992
+
2993
+ export { IonIntTelCodeComponent, IonIntlTelInputComponent, IonIntlTelInputModule, IonIntlTelInputService, IonIntlTelInputValidatorDirective, IonIntlTelInputValidators };
2994
+ //# sourceMappingURL=crodriguezdominguez-ion-intl-tel-input.mjs.map