ngxsmk-tel-input 1.6.6 → 1.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,15 +5,9 @@ Wraps [`intl-tel-input`](https://github.com/jackocnr/intl-tel-input) for the UI
5
5
 
6
6
  > Emits **E.164** by default (e.g. `+14155550123`). SSR‑safe via lazy browser‑only import.
7
7
 
8
- ---
9
-
10
- ## Screenshots
8
+ ## 🚀 Try it live on StackBlitz
11
9
 
12
- <p align="left">
13
- <img src="https://unpkg.com/ngxsmk-tel-input@latest/docs/valid.png" alt="Angular international phone input - valid" width="420" />
14
- &nbsp;&nbsp;
15
- <img src="https://unpkg.com/ngxsmk-tel-input@latest/docs/invalid.png" alt="Angular international phone input - Invalid" width="420" />
16
- </p>
10
+ [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/~/github.com/toozuuu/ngxsmk-tel-input)
17
11
 
18
12
  ---
19
13
 
@@ -23,6 +17,7 @@ Wraps [`intl-tel-input`](https://github.com/jackocnr/intl-tel-input) for the UI
23
17
  * E.164 output (display can be national with `nationalMode`)
24
18
  * Reactive & template‑driven Forms support (CVA)
25
19
  * Built‑in validation using libphonenumber‑js
20
+ * **Enhanced validation**: Detects invalid country codes (like "11", "99") and shows appropriate error states
26
21
  * SSR‑friendly (no `window` on the server)
27
22
  * Easy theming via CSS variables
28
23
  * Nice UX options: label/hint/error text, sizes, variants, clear button, autofocus, select-on-focus
@@ -160,8 +155,6 @@ export class AppComponent {
160
155
 
161
156
  You can localize the dropdown/search labels and override country names.
162
157
 
163
- <img src="https://unpkg.com/ngxsmk-tel-input@latest/docs/kr.png" alt="Angular international phone input - Korean Localization & RTL" width="420" />
164
-
165
158
  Korean example
166
159
 
167
160
  ```ts
@@ -303,10 +296,30 @@ Dark mode: wrap in a `.dark` parent — tokens adapt automatically.
303
296
 
304
297
  <div class="error" *ngIf="fg.get('phone')?.hasError('required')">Phone is required</div>
305
298
  <div class="error" *ngIf="fg.get('phone')?.hasError('phoneInvalid')">Please enter a valid phone number</div>
299
+ <div class="error" *ngIf="fg.get('phone')?.hasError('phoneInvalidCountryCode')">Invalid country code</div>
306
300
  ```
307
301
 
302
+ ### Enhanced Validation Features
303
+
304
+ The component now includes enhanced validation that detects and handles various invalid phone number scenarios:
305
+
306
+ #### **Invalid Country Code Detection**
307
+ - **Input**: `"1123456789"` or `"99123456789"`
308
+ - **Error**: `phoneInvalidCountryCode`
309
+ - **Reason**: "11" and "99" are not valid country codes
310
+
311
+ #### **Valid Country Code, Invalid Number**
312
+ - **Input**: `"+9111023533"` (India country code, Delhi area code, but incomplete subscriber number)
313
+ - **Error**: `phoneInvalid`
314
+ - **Reason**: Valid country/area codes but invalid number format
315
+
316
+ #### **Valid Numbers**
317
+ - **Input**: `"+12025551234"` (US), `"+442071234567"` (UK), `"+91112345678"` (India)
318
+ - **Status**: Valid
319
+ - **Output**: E.164 format string
320
+
308
321
  * When **valid** → control value = **E.164** string
309
- * When **invalid/empty** → value = **null**, and validator sets `{ phoneInvalid: true }`
322
+ * When **invalid/empty** → value = **null**, and validator sets appropriate error type
310
323
 
311
324
  > Need national string instead of E.164? Use `(inputChange)` and store `raw`/`national` yourself, or adapt the emitter to output national.
312
325
 
@@ -53,6 +53,78 @@ class NgxsmkTelInputService {
53
53
  this.parseCache.clear();
54
54
  this.validationCache.clear();
55
55
  }
56
+ /**
57
+ * Check if the input appears to be an international number with an invalid country code
58
+ * This helps detect cases like "1123456789" where "11" is not a valid country code
59
+ */
60
+ isInvalidInternationalNumber(input) {
61
+ if (!input || input.length < 3)
62
+ return false;
63
+ // Check if input starts with digits that could be a country code
64
+ const digits = input.replace(/\D/g, '');
65
+ if (digits.length < 3)
66
+ return false;
67
+ // Try to extract potential country code (1-3 digits)
68
+ for (let i = 1; i <= 3 && i <= digits.length; i++) {
69
+ const potentialCountryCode = digits.substring(0, i);
70
+ const remainingDigits = digits.substring(i);
71
+ // If we have a potential country code and remaining digits
72
+ if (remainingDigits.length >= 3) {
73
+ // Try to parse as international number
74
+ try {
75
+ const internationalNumber = `+${potentialCountryCode}${remainingDigits}`;
76
+ const phone = parsePhoneNumberFromString(internationalNumber);
77
+ // If parsing fails, it might be an invalid country code
78
+ if (!phone) {
79
+ // Check if this looks like an attempt at an international number
80
+ // (starts with + or has country code pattern)
81
+ if (input.startsWith('+') || (potentialCountryCode.length >= 1 && potentialCountryCode.length <= 3)) {
82
+ return true;
83
+ }
84
+ }
85
+ }
86
+ catch {
87
+ // If parsing throws an error, it's likely an invalid country code
88
+ return true;
89
+ }
90
+ }
91
+ }
92
+ return false;
93
+ }
94
+ /**
95
+ * Enhanced parse method that detects invalid international numbers
96
+ */
97
+ parseWithInvalidDetection(input, iso2) {
98
+ const cacheKey = `${input || ''}|${iso2}`;
99
+ if (this.parseCache.has(cacheKey)) {
100
+ const cached = this.parseCache.get(cacheKey);
101
+ return {
102
+ ...cached,
103
+ isInvalidInternational: this.isInvalidInternationalNumber(input)
104
+ };
105
+ }
106
+ const phone = parsePhoneNumberFromString(input || '', iso2);
107
+ const isInvalidInternational = this.isInvalidInternationalNumber(input);
108
+ if (!phone) {
109
+ const result = {
110
+ e164: null,
111
+ national: null,
112
+ isValid: false,
113
+ isInvalidInternational
114
+ };
115
+ this.setCacheValue(this.parseCache, cacheKey, { e164: null, national: null, isValid: false });
116
+ return result;
117
+ }
118
+ const isValid = phone.isValid();
119
+ const result = {
120
+ e164: isValid ? phone.number : null,
121
+ national: phone.formatNational(),
122
+ isValid,
123
+ isInvalidInternational
124
+ };
125
+ this.setCacheValue(this.parseCache, cacheKey, { e164: result.e164, national: result.national, isValid: result.isValid });
126
+ return result;
127
+ }
56
128
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxsmkTelInputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
57
129
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NgxsmkTelInputService, providedIn: 'root' }); }
58
130
  }
@@ -231,12 +303,20 @@ class NgxsmkTelInputComponent {
231
303
  const raw = this.currentRaw();
232
304
  if (!raw)
233
305
  return null;
234
- const valid = this.tel.isValid(raw, this.currentIso2());
306
+ // Use enhanced parsing to detect invalid international numbers
307
+ const parsed = this.tel.parseWithInvalidDetection(raw, this.currentIso2());
308
+ const valid = parsed.isValid && !parsed.isInvalidInternational;
235
309
  if (valid !== this.lastEmittedValid) {
236
310
  this.lastEmittedValid = valid;
237
311
  this.validityChange.emit(valid);
238
312
  }
239
- return valid ? null : { phoneInvalid: true };
313
+ if (!valid) {
314
+ if (parsed.isInvalidInternational) {
315
+ return { phoneInvalidCountryCode: true };
316
+ }
317
+ return { phoneInvalid: true };
318
+ }
319
+ return null;
240
320
  }
241
321
  registerOnValidatorChange(fn) { this.validatorChange = fn; }
242
322
  // ---------- Public helpers ----------
@@ -445,7 +525,7 @@ class NgxsmkTelInputComponent {
445
525
  return;
446
526
  const iso2 = this.currentIso2();
447
527
  const digits = this.stripLeadingZero(this.toNSN(this.currentRaw()));
448
- const parsed = this.tel.parse(digits, iso2);
528
+ const parsed = this.tel.parseWithInvalidDetection(digits, iso2);
449
529
  if (!parsed.e164 && !parsed.isValid)
450
530
  return;
451
531
  const nsn = parsed.e164 ? this.nsnFromE164(parsed.e164, iso2) : digits;
@@ -469,7 +549,8 @@ class NgxsmkTelInputComponent {
469
549
  const iso2 = this.currentIso2();
470
550
  // Users type national digits; remove any separators and a single trunk '0'
471
551
  let digits = this.stripLeadingZero(this.toNSN(this.currentRaw()));
472
- const parsed = this.tel.parse(digits, iso2);
552
+ // Use enhanced parsing to detect invalid international numbers
553
+ const parsed = this.tel.parseWithInvalidDetection(digits, iso2);
473
554
  // Emit E.164 to the form (or null if incomplete) - batch zone runs
474
555
  this.zone.run(() => {
475
556
  this.onChange(parsed.e164);
@@ -1 +1 @@
1
- {"version":3,"file":"ngxsmk-tel-input.mjs","sources":["../../../projects/ngxsmk-tel-input/src/lib/ngxsmk-tel-input.service.ts","../../../projects/ngxsmk-tel-input/src/lib/ngxsmk-tel-input.component.ts","../../../projects/ngxsmk-tel-input/src/lib/theme.service.ts","../../../projects/ngxsmk-tel-input/src/lib/phone-input.utils.ts","../../../projects/ngxsmk-tel-input/src/ngxsmk-tel-input.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { parsePhoneNumberFromString, type CountryCode } from 'libphonenumber-js';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class NgxsmkTelInputService {\r\n private parseCache = new Map<string, { e164: string | null; national: string | null; isValid: boolean }>();\r\n private validationCache = new Map<string, boolean>();\r\n private readonly CACHE_SIZE_LIMIT = 1000;\r\n\r\n parse(input: string, iso2: CountryCode): { e164: string | null; national: string | null; isValid: boolean } {\r\n const cacheKey = `${input || ''}|${iso2}`;\r\n \r\n if (this.parseCache.has(cacheKey)) {\r\n return this.parseCache.get(cacheKey)!;\r\n }\r\n\r\n const phone = parsePhoneNumberFromString(input || '', iso2);\r\n if (!phone) {\r\n const result = { e164: null, national: null, isValid: false };\r\n this.setCacheValue(this.parseCache, cacheKey, result);\r\n return result;\r\n }\r\n \r\n const isValid = phone.isValid();\r\n const result = { \r\n e164: isValid ? phone.number : null, \r\n national: phone.formatNational(), \r\n isValid \r\n };\r\n \r\n this.setCacheValue(this.parseCache, cacheKey, result);\r\n return result;\r\n }\r\n\r\n isValid(input: string, iso2: CountryCode): boolean {\r\n const cacheKey = `${input || ''}|${iso2}`;\r\n \r\n if (this.validationCache.has(cacheKey)) {\r\n return this.validationCache.get(cacheKey)!;\r\n }\r\n\r\n const phone = parsePhoneNumberFromString(input || '', iso2);\r\n const result = !!phone && phone.isValid();\r\n \r\n this.setCacheValue(this.validationCache, cacheKey, result);\r\n return result;\r\n }\r\n\r\n private setCacheValue<T>(cache: Map<string, T>, key: string, value: T): void {\r\n if (cache.size >= this.CACHE_SIZE_LIMIT) {\r\n const firstKey = cache.keys().next().value;\r\n if (firstKey) cache.delete(firstKey);\r\n }\r\n cache.set(key, value);\r\n }\r\n\r\n clearCache(): void {\r\n this.parseCache.clear();\r\n this.validationCache.clear();\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n forwardRef,\r\n inject,\r\n Input,\r\n NgZone,\r\n OnChanges,\r\n OnDestroy,\r\n Output,\r\n PLATFORM_ID,\r\n SimpleChanges,\r\n ViewChild,\r\n ChangeDetectionStrategy,\r\n} from '@angular/core';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport {\r\n AbstractControl,\r\n ControlValueAccessor,\r\n NG_VALIDATORS,\r\n NG_VALUE_ACCESSOR,\r\n ValidationErrors,\r\n Validator\r\n} from '@angular/forms';\r\nimport { AsYouType, CountryCode, validatePhoneNumberLength } from 'libphonenumber-js';\r\nimport { NgxsmkTelInputService } from './ngxsmk-tel-input.service';\r\nimport { CountryMap, IntlTelI18n } from './types';\r\n\r\ntype IntlTelInstance = any;\r\n\r\n@Component({\r\n selector: 'ngxsmk-tel-input',\r\n standalone: true,\r\n imports: [],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n <div class=\"ngxsmk-tel\"\r\n [class.disabled]=\"disabled\"\r\n [attr.data-size]=\"size\"\r\n [attr.data-variant]=\"variant\"\r\n [attr.dir]=\"dir\">\r\n @if (label) {\r\n <label class=\"ngxsmk-tel__label\" [for]=\"resolvedId\">{{ label }}</label>\r\n }\r\n\r\n <div class=\"ngxsmk-tel__wrap\" [class.has-error]=\"showError\">\r\n <div class=\"ngxsmk-tel-input__wrapper\">\r\n <input\r\n #telInput\r\n type=\"tel\"\r\n class=\"ngxsmk-tel-input__control\"\r\n [id]=\"resolvedId\"\r\n [attr.name]=\"name || null\"\r\n [attr.placeholder]=\"placeholder || null\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.inputmode]=\"digitsOnly ? 'numeric' : 'tel'\"\r\n [disabled]=\"disabled\"\r\n [attr.aria-invalid]=\"showError ? 'true' : 'false'\"\r\n (blur)=\"onBlur()\"\r\n (focus)=\"onFocus()\"\r\n />\r\n </div>\r\n\r\n @if (showClear && currentRaw()) {\r\n <button type=\"button\"\r\n class=\"ngxsmk-tel__clear\"\r\n (click)=\"clearInput()\"\r\n [attr.aria-label]=\"clearAriaLabel\">\r\n ×\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (hint && !showError) {\r\n <div class=\"ngxsmk-tel__hint\">{{ hint }}</div>\r\n }\r\n </div>\r\n `,\r\n styleUrls: ['./ngxsmk-tel-input.component.scss'],\r\n providers: [\r\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgxsmkTelInputComponent), multi: true },\r\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => NgxsmkTelInputComponent), multi: true }\r\n ]\r\n})\r\nexport class NgxsmkTelInputComponent implements AfterViewInit, OnChanges, OnDestroy, ControlValueAccessor, Validator {\r\n @ViewChild('telInput', { static: true }) inputRef!: ElementRef<HTMLInputElement>;\r\n\r\n /* Core config */\r\n @Input() initialCountry: CountryCode | 'auto' = 'US';\r\n @Input() preferredCountries: CountryCode[] = ['US', 'GB'];\r\n @Input() onlyCountries?: CountryCode[];\r\n /** Dropdown shows dial code; input will NEVER show dial code */\r\n @Input() separateDialCode: boolean = true;\r\n @Input() allowDropdown: boolean = true;\r\n\r\n /* Display / formatting */\r\n /** 'formatted' => national with spaces; 'digits' => digits only */\r\n @Input() nationalDisplay: 'formatted' | 'digits' = 'formatted';\r\n /** 'typing' (live), 'blur', or 'off' */\r\n @Input() formatWhenValid: 'off' | 'blur' | 'typing' = 'typing';\r\n\r\n /* UX */\r\n @Input() placeholder?: string;\r\n @Input() autocomplete = 'tel';\r\n @Input() name?: string;\r\n @Input() inputId?: string;\r\n @Input() disabled:boolean = false;\r\n\r\n @Input() label?: string;\r\n @Input() hint?: string;\r\n @Input() errorText?: string;\r\n @Input() size: 'sm' | 'md' | 'lg' = 'md';\r\n @Input() variant: 'outline' | 'filled' | 'underline' = 'outline';\r\n @Input() showClear = true;\r\n @Input() autoFocus = false;\r\n @Input() selectOnFocus = false;\r\n @Input() showErrorWhenTouched = true;\r\n\r\n /* Dropdown plumbing */\r\n @Input() dropdownAttachToBody = true;\r\n @Input() dropdownZIndex = 2000;\r\n\r\n /* Localization + RTL */\r\n @Input('i18n') i18n?: IntlTelI18n;\r\n @Input('telI18n') set telI18n(v: IntlTelI18n | undefined) { this.i18n = v; }\r\n @Input('localizedCountries') localizedCountries?: CountryMap;\r\n @Input('telLocalizedCountries') set telLocalizedCountries(v: CountryMap | undefined) { this.localizedCountries = v; }\r\n\r\n @Input() clearAriaLabel = 'Clear phone number';\r\n @Input() dir: 'ltr' | 'rtl' = 'ltr';\r\n\r\n /* Placeholders (intl-tel-input) */\r\n @Input() autoPlaceholder: 'off' | 'polite' | 'aggressive' = 'off';\r\n @Input() utilsScript?: string;\r\n @Input() customPlaceholder?: (example: string, country: any) => string;\r\n\r\n /* Input behavior */\r\n @Input() digitsOnly = true; // Still insert spaces when formatted\r\n @Input() lockWhenValid = true; // optional UX guard\r\n\r\n /* Theme */\r\n @Input() theme: 'light' | 'dark' | 'auto' = 'auto';\r\n\r\n /* Outputs */\r\n @Output() countryChange = new EventEmitter<{ iso2: CountryCode }>();\r\n @Output() validityChange = new EventEmitter<boolean>();\r\n @Output() inputChange = new EventEmitter<{ raw: string; e164: string | null; iso2: CountryCode }>();\r\n\r\n /* Internal */\r\n private iti: IntlTelInstance | null = null;\r\n private onChange: (val: string | null) => void = () => {};\r\n private onTouchedCb: () => void = () => {};\r\n private validatorChange?: () => void;\r\n private lastEmittedValid = false;\r\n private pendingWrite: string | null = null;\r\n private touched = false;\r\n private isDestroyed = false;\r\n private eventListeners: Array<{ element: HTMLElement; event: string; handler: (event: Event) => void }> = [];\r\n\r\n private allowDropdownWasTrue = false;\r\n private suppressEvents = false;\r\n\r\n readonly resolvedId: string = this.inputId || ('tel-' + Math.random().toString(36).slice(2));\r\n private readonly platformId = inject(PLATFORM_ID);\r\n private currentTheme: 'light' | 'dark' = 'light';\r\n\r\n constructor(private readonly zone: NgZone, private readonly tel: NgxsmkTelInputService) {}\r\n\r\n // ---------- Lifecycle ----------\r\n ngAfterViewInit(): void {\r\n if (!isPlatformBrowser(this.platformId) || this.isDestroyed) return;\r\n this.detectAndApplyTheme();\r\n this.setupDropdownThemeObserver();\r\n void this.initAndWire();\r\n }\r\n\r\n private async initAndWire(): Promise<void> {\r\n if (this.isDestroyed) return;\r\n \r\n await this.initIntlTelInput();\r\n this.bindDomListeners();\r\n\r\n if (this.pendingWrite !== null) {\r\n const v = this.pendingWrite;\r\n this.pendingWrite = null;\r\n this.writeValue(v);\r\n }\r\n\r\n if (this.autoFocus && !this.isDestroyed) {\r\n requestAnimationFrame(() => {\r\n if (!this.isDestroyed) this.focus();\r\n });\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (!isPlatformBrowser(this.platformId) || this.isDestroyed) return;\r\n \r\n const configChanged = [\r\n 'initialCountry', 'preferredCountries', 'onlyCountries',\r\n 'separateDialCode', 'allowDropdown',\r\n 'i18n', 'localizedCountries', 'dir',\r\n 'autoPlaceholder', 'utilsScript', 'customPlaceholder'\r\n ].some(k => k in changes && !changes[k]?.firstChange);\r\n\r\n if (configChanged && this.iti && !this.isDestroyed) {\r\n this.reinitPlugin();\r\n this.validatorChange?.();\r\n }\r\n\r\n // Handle theme changes\r\n if ('theme' in changes && !changes['theme']?.firstChange) {\r\n this.detectAndApplyTheme();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void { \r\n this.isDestroyed = true;\r\n this.destroyPlugin(); \r\n this.cleanupEventListeners();\r\n }\r\n\r\n // ---------- CVA ----------\r\n writeValue(val: string | null): void {\r\n if (!this.inputRef || this.isDestroyed) return;\r\n\r\n if (!this.iti) { // not ready yet\r\n this.pendingWrite = val ?? '';\r\n return;\r\n }\r\n\r\n this.suppressEvents = true;\r\n try {\r\n // Let the plugin infer the country from E.164 (if provided).\r\n this.iti.setNumber(val || '');\r\n\r\n const iso2 = this.currentIso2();\r\n const parsed = this.tel.parse(val ?? '', iso2);\r\n\r\n // Visible input: ALWAYS NSN (no dial code, no trunk '0')\r\n const nsn = parsed.e164\r\n ? this.nsnFromE164(parsed.e164, iso2)\r\n : this.stripLeadingZero(this.toNSN(parsed.national ?? (val ?? '')));\r\n\r\n const display = this.displayValue(nsn, iso2);\r\n this.setInputValue(display);\r\n\r\n // FormControl value: ALWAYS E.164 (or null) - batch zone runs\r\n this.zone.run(() => {\r\n this.onChange(parsed.e164);\r\n this.inputChange.emit({ raw: display, e164: parsed.e164, iso2 });\r\n });\r\n } finally {\r\n this.suppressEvents = false;\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void { this.onChange = fn; }\r\n registerOnTouched(fn: any): void { this.onTouchedCb = fn; }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n if (this.isDestroyed) return;\r\n \r\n this.disabled = isDisabled;\r\n\r\n // 1) native input\r\n if (this.inputRef) this.inputRef.nativeElement.disabled = isDisabled;\r\n\r\n // 2) toggle dropdown by re-init with allowDropdown=false when disabled\r\n if (this.iti) {\r\n if (isDisabled && this.allowDropdown) {\r\n this.allowDropdownWasTrue = true;\r\n this.allowDropdown = false;\r\n this.reinitPlugin(); // closes popup & removes handlers\r\n } else if (!isDisabled && this.allowDropdownWasTrue) {\r\n this.allowDropdown = true;\r\n this.allowDropdownWasTrue = false;\r\n this.reinitPlugin(); // restore dropdown\r\n } else {\r\n this.applyDisabledUi(isDisabled);\r\n }\r\n } else {\r\n this.applyDisabledUi(isDisabled);\r\n }\r\n }\r\n\r\n // ---------- Validator ----------\r\n validate(_: AbstractControl): ValidationErrors | null {\r\n if (this.isDestroyed) return null;\r\n \r\n const raw = this.currentRaw();\r\n if (!raw) return null;\r\n const valid = this.tel.isValid(raw, this.currentIso2());\r\n if (valid !== this.lastEmittedValid) {\r\n this.lastEmittedValid = valid;\r\n this.validityChange.emit(valid);\r\n }\r\n return valid ? null : { phoneInvalid: true };\r\n }\r\n\r\n registerOnValidatorChange(fn: () => void): void { this.validatorChange = fn; }\r\n\r\n // ---------- Public helpers ----------\r\n focus(): void {\r\n if (this.isDestroyed || !this.inputRef) return;\r\n \r\n this.inputRef.nativeElement.focus();\r\n if (this.selectOnFocus) {\r\n const el = this.inputRef.nativeElement;\r\n requestAnimationFrame(() => {\r\n if (!this.isDestroyed) el.setSelectionRange(0, el.value.length);\r\n });\r\n }\r\n }\r\n\r\n selectCountry(iso2: CountryCode): void {\r\n if (this.iti && !this.isDestroyed) {\r\n this.iti.setCountry(iso2.toLowerCase());\r\n this.handleInput();\r\n }\r\n }\r\n\r\n clearInput(): void {\r\n if (this.isDestroyed) return;\r\n \r\n this.setInputValue('');\r\n this.handleInput();\r\n this.inputRef.nativeElement.focus();\r\n }\r\n\r\n // ---------- intl-tel-input wiring ----------\r\n private async initIntlTelInput() {\r\n if (this.isDestroyed) return;\r\n \r\n const [{ default: intlTelInput }] = await Promise.all([import('intl-tel-input')]);\r\n\r\n const toLowerKeys = (m?: CountryMap) => {\r\n if (!m) return undefined;\r\n const out: Record<string, string> = {};\r\n for (const k in m) if (Object.prototype.hasOwnProperty.call(m, k)) {\r\n const v = (m as Record<string, string | undefined>)[k];\r\n if (v != null) out[k.toLowerCase()] = v;\r\n }\r\n return out;\r\n };\r\n\r\n const config: any = {\r\n initialCountry: this.initialCountry === 'auto' ? 'auto' : (this.initialCountry?.toLowerCase() || 'us'),\r\n preferredCountries: (this.preferredCountries ?? []).map(c => c.toLowerCase()),\r\n onlyCountries: (this.onlyCountries ?? []).map(c => c.toLowerCase()),\r\n nationalMode: true, // Control the visible value; prevents '+' in the input\r\n allowDropdown: this.allowDropdown,\r\n separateDialCode: this.separateDialCode,\r\n geoIpLookup: (cb: (iso2: string) => void) => cb('us'),\r\n\r\n autoPlaceholder: this.autoPlaceholder,\r\n utilsScript: this.utilsScript,\r\n customPlaceholder: this.customPlaceholder,\r\n\r\n i18n: this.i18n,\r\n localizedCountries: toLowerKeys(this.localizedCountries),\r\n dropdownContainer: this.dropdownAttachToBody && typeof document !== 'undefined' ? document.body : undefined\r\n };\r\n\r\n this.zone.runOutsideAngular(() => {\r\n if (!this.isDestroyed) {\r\n this.iti = intlTelInput(this.inputRef.nativeElement, config);\r\n }\r\n });\r\n\r\n if (!this.isDestroyed) {\r\n (this.inputRef.nativeElement as HTMLElement).style.setProperty('--tel-dd-z', String(this.dropdownZIndex));\r\n this.applyDisabledUi(this.disabled);\r\n }\r\n }\r\n\r\n private async reinitPlugin() {\r\n if (this.isDestroyed) return;\r\n \r\n const prevIso2 = (this.iti?.getSelectedCountryData?.().iso2 || this.initialCountry || 'US').toString().toLowerCase();\r\n const prevValue = this.currentRaw();\r\n\r\n this.destroyPlugin();\r\n await this.initIntlTelInput();\r\n this.bindDomListeners();\r\n\r\n if (!this.isDestroyed) {\r\n try { this.iti?.setCountry(prevIso2); } catch {}\r\n if (prevValue) {\r\n this.setInputValue(prevValue);\r\n this.handleInput();\r\n }\r\n this.applyDisabledUi(this.disabled);\r\n }\r\n }\r\n\r\n private destroyPlugin() {\r\n if (this.iti) {\r\n this.iti.destroy();\r\n this.iti = null;\r\n }\r\n \r\n // Optimize DOM manipulation - only clone if necessary\r\n if (this.inputRef?.nativeElement && this.iti) {\r\n const el = this.inputRef.nativeElement;\r\n const clone = el.cloneNode(true) as HTMLInputElement;\r\n\r\n // preserve state across clone\r\n clone.disabled = this.disabled;\r\n clone.id = this.resolvedId;\r\n clone.name = this.name ?? clone.name;\r\n clone.value = el.value;\r\n\r\n el.parentNode?.replaceChild(clone, el);\r\n (this.inputRef as any).nativeElement = clone;\r\n }\r\n }\r\n\r\n // ---------- Input listeners ----------\r\n private bindDomListeners() {\r\n if (this.isDestroyed || !this.inputRef) return;\r\n \r\n const el = this.inputRef.nativeElement;\r\n\r\n this.zone.runOutsideAngular(() => {\r\n const beforeInputHandler = (ev: Event) => {\r\n if (this.isDestroyed || !this.digitsOnly) return;\r\n const data = (ev as any).data as string | null;\r\n\r\n // If already valid, block extra digit insertions when no selection\r\n if (this.lockWhenValid && this.isCurrentlyValid()) {\r\n const selCollapsed = (el.selectionStart ?? 0) === (el.selectionEnd ?? 0);\r\n const isDigit = !!data && (ev as any).inputType === 'insertText' && data >= '0' && data <= '9';\r\n if (selCollapsed && isDigit) { ev.preventDefault(); return; }\r\n }\r\n\r\n if (!data || (ev as any).inputType !== 'insertText') return;\r\n const isDigit = data >= '0' && data <= '9';\r\n if (!isDigit) { ev.preventDefault(); return; }\r\n\r\n // NEW: block if this digit would make the NSN too long for the current country\r\n const start = el.selectionStart ?? el.value.length;\r\n const end = el.selectionEnd ?? el.value.length;\r\n const prospective = el.value.slice(0, start) + data + el.value.slice(end);\r\n const nsn = this.stripLeadingZero(this.toNSN(prospective));\r\n const iso2 = this.currentIso2();\r\n\r\n if (this.wouldExceedMax(nsn, iso2)) {\r\n ev.preventDefault();\r\n return;\r\n }\r\n };\r\n\r\n const pasteHandler = (e: Event) => {\r\n if (this.isDestroyed) return;\r\n \r\n const text = ((e as any).clipboardData || (window as any).clipboardData).getData('text') || '';\r\n e.preventDefault();\r\n\r\n const iso2 = this.currentIso2();\r\n // digits-only, strip any leading trunk '0'\r\n let digits = this.stripLeadingZero(this.toNSN(text));\r\n\r\n // NEW: trim pasted digits until not TOO_LONG for the selected country\r\n while (this.wouldExceedMax(digits, iso2)) {\r\n digits = digits.slice(0, -1);\r\n if (!digits) break;\r\n }\r\n\r\n const start = el.selectionStart ?? el.value.length;\r\n const end = el.selectionEnd ?? el.value.length;\r\n el.setRangeText(digits, start, end, 'end');\r\n requestAnimationFrame(() => {\r\n if (!this.isDestroyed) this.handleInput();\r\n });\r\n };\r\n\r\n const inputHandler = () => {\r\n if (!this.isDestroyed) this.handleInput();\r\n };\r\n\r\n const countryChangeHandler = () => {\r\n if (this.isDestroyed) return;\r\n \r\n const iso2 = this.currentIso2();\r\n this.zone.run(() => {\r\n this.countryChange.emit({ iso2 });\r\n this.validatorChange?.();\r\n });\r\n this.handleInput();\r\n };\r\n\r\n const blurHandler = () => {\r\n if (!this.isDestroyed) this.onBlur();\r\n };\r\n\r\n // Store listeners for cleanup\r\n this.eventListeners = [\r\n { element: el, event: 'beforeinput', handler: beforeInputHandler },\r\n { element: el, event: 'paste', handler: pasteHandler },\r\n { element: el, event: 'input', handler: inputHandler },\r\n { element: el, event: 'countrychange', handler: countryChangeHandler },\r\n { element: el, event: 'blur', handler: blurHandler }\r\n ];\r\n\r\n this.eventListeners.forEach(({ element, event, handler }) => {\r\n element.addEventListener(event, handler);\r\n });\r\n });\r\n }\r\n\r\n // ---------- UX handlers ----------\r\n onBlur() {\r\n if (this.isDestroyed) return;\r\n \r\n this.touched = true;\r\n this.zone.run(() => this.onTouchedCb());\r\n if (this.formatWhenValid === 'off') return;\r\n\r\n const iso2 = this.currentIso2();\r\n const digits = this.stripLeadingZero(this.toNSN(this.currentRaw()));\r\n\r\n const parsed = this.tel.parse(digits, iso2);\r\n if (!parsed.e164 && !parsed.isValid) return;\r\n\r\n const nsn = parsed.e164 ? this.nsnFromE164(parsed.e164, iso2) : digits;\r\n if (this.formatWhenValid !== 'typing') {\r\n this.setInputValue(this.displayValue(nsn, iso2));\r\n }\r\n }\r\n\r\n onFocus() {\r\n if (this.isDestroyed || !this.selectOnFocus || !this.inputRef) return;\r\n \r\n const el = this.inputRef.nativeElement;\r\n requestAnimationFrame(() => {\r\n if (!this.isDestroyed) el.setSelectionRange(0, el.value.length);\r\n });\r\n }\r\n\r\n // ---------- Core input pipeline ----------\r\n private handleInput() {\r\n if (this.suppressEvents || this.isDestroyed) return;\r\n\r\n const iso2 = this.currentIso2();\r\n // Users type national digits; remove any separators and a single trunk '0'\r\n let digits = this.stripLeadingZero(this.toNSN(this.currentRaw()));\r\n\r\n const parsed = this.tel.parse(digits, iso2);\r\n\r\n // Emit E.164 to the form (or null if incomplete) - batch zone runs\r\n this.zone.run(() => {\r\n this.onChange(parsed.e164);\r\n this.inputChange.emit({ raw: this.currentRaw(), e164: parsed.e164, iso2 });\r\n });\r\n\r\n // Keep visible value as NSN (optionally formatted)\r\n const nsn = parsed.e164 ? this.nsnFromE164(parsed.e164, iso2) : digits;\r\n const display = this.formatWhenValid === 'typing' ? this.displayValue(nsn, iso2) : nsn;\r\n\r\n if (display !== this.currentRaw()) this.setInputValue(display);\r\n }\r\n\r\n // ---------- Utilities ----------\r\n /** Convert any string to digits only (NSN basis). */\r\n private toNSN(v: string | null | undefined): string {\r\n return (v ?? '').replace(/\\D/g, '');\r\n }\r\n\r\n /** Strip exactly one leading trunk '0' from national input. */\r\n private stripLeadingZero(nsn: string): string {\r\n return nsn.replace(/^0/, '');\r\n }\r\n\r\n /** Current country calling code (e.g. \"44\", \"94\"). */\r\n private currentDialCode(): string {\r\n return (this.iti?.getSelectedCountryData?.().dialCode ?? '').toString();\r\n }\r\n\r\n /** Convert E.164 (+<cc><nsn>) to NSN (never includes trunk '0'). */\r\n private nsnFromE164(e164: string, iso2: CountryCode): string {\r\n const dial = this.currentDialCode();\r\n if (!e164 || !dial) return this.toNSN(e164);\r\n if (e164.startsWith('+' + dial)) return e164.slice(dial.length + 1);\r\n return this.toNSN(e164);\r\n }\r\n\r\n /** Format NSN for a region (adds spaces but NEVER a trunk '0'). */\r\n private formatNSN(nsn: string, iso2: CountryCode): string {\r\n try {\r\n const fmt = new AsYouType(iso2);\r\n return fmt.input(nsn);\r\n } catch {\r\n return nsn;\r\n }\r\n }\r\n\r\n /** Compose visible value based on settings. */\r\n private displayValue(nsn: string, iso2: CountryCode): string {\r\n return this.nationalDisplay === 'formatted' ? this.formatNSN(nsn, iso2) : nsn;\r\n // (spaces in formatted mode; digits only otherwise)\r\n }\r\n\r\n currentRaw(): string { \r\n return this.isDestroyed ? '' : (this.inputRef?.nativeElement.value ?? '').trim(); \r\n }\r\n\r\n private currentIso2(): CountryCode {\r\n if (this.isDestroyed) return 'US';\r\n \r\n const iso2 = (this.iti?.getSelectedCountryData?.().iso2 ?? this.initialCountry ?? 'US')\r\n .toString().toUpperCase();\r\n return iso2 as CountryCode;\r\n }\r\n\r\n private setInputValue(v: string) { \r\n if (!this.isDestroyed && this.inputRef) {\r\n this.inputRef.nativeElement.value = v ?? ''; \r\n }\r\n }\r\n\r\n get showError(): boolean {\r\n if (this.isDestroyed) return false;\r\n \r\n const invalid = !!this.validate({} as AbstractControl);\r\n return this.showErrorWhenTouched ? (this.touched && invalid) : invalid;\r\n }\r\n\r\n private isCurrentlyValid(): boolean { \r\n return this.isDestroyed ? false : this.tel.isValid(this.currentRaw(), this.currentIso2()); \r\n }\r\n\r\n /** Make flag/dropdown non-interactive when disabled */\r\n private applyDisabledUi(disabled: boolean) {\r\n if (this.isDestroyed) return;\r\n \r\n const input = this.inputRef?.nativeElement;\r\n if (!input) return;\r\n const flag = input.parentElement?.querySelector('.iti__selected-flag') as HTMLElement | null;\r\n if (flag) {\r\n flag.tabIndex = disabled ? -1 : 0;\r\n flag.setAttribute('aria-disabled', String(disabled));\r\n }\r\n }\r\n\r\n /** Returns true if nsn would be TOO_LONG for the current country. */\r\n private wouldExceedMax(nsn: string, iso2: CountryCode): boolean {\r\n if (this.isDestroyed) return false;\r\n \r\n try {\r\n const res = validatePhoneNumberLength(nsn, iso2);\r\n return res === 'TOO_LONG';\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n /** Clean up event listeners to prevent memory leaks */\r\n private cleanupEventListeners(): void {\r\n this.eventListeners.forEach(({ element, event, handler }) => {\r\n element.removeEventListener(event, handler);\r\n });\r\n this.eventListeners = [];\r\n }\r\n\r\n /** Detect and apply theme based on user preference and system settings */\r\n private detectAndApplyTheme(): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n\r\n let detectedTheme: 'light' | 'dark' = 'light';\r\n\r\n if (this.theme === 'auto') {\r\n // Check for system preference\r\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\r\n detectedTheme = 'dark';\r\n }\r\n // Check for document class\r\n else if (document.documentElement.classList.contains('dark')) {\r\n detectedTheme = 'dark';\r\n }\r\n // Check for data attribute\r\n else if (document.documentElement.getAttribute('data-theme') === 'dark') {\r\n detectedTheme = 'dark';\r\n }\r\n } else {\r\n detectedTheme = this.theme;\r\n }\r\n\r\n this.currentTheme = detectedTheme;\r\n this.applyTheme(detectedTheme);\r\n }\r\n\r\n /** Apply theme to the component */\r\n private applyTheme(theme: 'light' | 'dark'): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n\r\n const hostElement = this.inputRef?.nativeElement?.closest('ngxsmk-tel-input') as HTMLElement;\r\n if (hostElement) {\r\n hostElement.setAttribute('data-theme', theme);\r\n }\r\n\r\n // Also apply theme to any existing dropdown\r\n this.applyThemeToDropdown(theme);\r\n }\r\n\r\n /** Apply theme to the dropdown if it exists */\r\n private applyThemeToDropdown(theme: 'light' | 'dark'): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n\r\n // Find the dropdown in the document\r\n const dropdown = document.querySelector('.iti__country-list') as HTMLElement;\r\n if (dropdown) {\r\n dropdown.setAttribute('data-theme', theme);\r\n }\r\n }\r\n\r\n /** Get current theme */\r\n getCurrentTheme(): 'light' | 'dark' {\r\n return this.currentTheme;\r\n }\r\n\r\n /** Set theme programmatically */\r\n setTheme(theme: 'light' | 'dark'): void {\r\n this.theme = theme;\r\n this.detectAndApplyTheme();\r\n }\r\n\r\n /** Update dropdown theme when it's opened */\r\n private updateDropdownTheme(): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n \r\n // Use a small delay to ensure dropdown is rendered\r\n setTimeout(() => {\r\n const dropdown = document.querySelector('.iti__country-list') as HTMLElement;\r\n if (dropdown) {\r\n dropdown.setAttribute('data-theme', this.currentTheme);\r\n \r\n // Force apply dark theme classes\r\n if (this.currentTheme === 'dark') {\r\n dropdown.classList.add('dark-theme');\r\n document.documentElement.classList.add('dark');\r\n document.body.classList.add('dark');\r\n } else {\r\n dropdown.classList.remove('dark-theme');\r\n document.documentElement.classList.remove('dark');\r\n document.body.classList.remove('dark');\r\n }\r\n \r\n // Also update the search input if it exists\r\n const searchInput = dropdown.querySelector('.iti__search-input') as HTMLElement;\r\n if (searchInput) {\r\n searchInput.setAttribute('data-theme', this.currentTheme);\r\n if (this.currentTheme === 'dark') {\r\n searchInput.classList.add('dark-theme');\r\n } else {\r\n searchInput.classList.remove('dark-theme');\r\n }\r\n \r\n // Ensure search input is focusable and functional\r\n searchInput.style.pointerEvents = 'auto';\r\n searchInput.style.opacity = '1';\r\n (searchInput as HTMLInputElement).disabled = false;\r\n }\r\n }\r\n }, 10);\r\n }\r\n\r\n /** Setup observer to watch for dropdown changes and apply theme */\r\n private setupDropdownThemeObserver(): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n\r\n // Watch for dropdown appearance in the DOM\r\n const observer = new MutationObserver((mutations) => {\r\n mutations.forEach((mutation) => {\r\n if (mutation.type === 'childList') {\r\n mutation.addedNodes.forEach((node) => {\r\n if (node.nodeType === Node.ELEMENT_NODE) {\r\n const element = node as HTMLElement;\r\n if (element.classList.contains('iti__country-list')) {\r\n this.updateDropdownTheme();\r\n }\r\n }\r\n });\r\n }\r\n });\r\n });\r\n\r\n // Start observing\r\n observer.observe(document.body, {\r\n childList: true,\r\n subtree: true\r\n });\r\n\r\n // Store observer for cleanup\r\n this.eventListeners.push({\r\n element: document.body,\r\n event: 'observer',\r\n handler: () => observer.disconnect()\r\n });\r\n }\r\n}\r\n","import { Injectable, PLATFORM_ID, inject } from '@angular/core';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\n\r\nexport type Theme = 'light' | 'dark' | 'auto';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ThemeService {\r\n private readonly platformId = inject(PLATFORM_ID);\r\n private readonly themeSubject = new BehaviorSubject<Theme>('auto');\r\n private readonly currentThemeSubject = new BehaviorSubject<'light' | 'dark'>('light');\r\n \r\n public readonly theme$ = this.themeSubject.asObservable();\r\n public readonly currentTheme$ = this.currentThemeSubject.asObservable();\r\n\r\n constructor() {\r\n if (isPlatformBrowser(this.platformId)) {\r\n this.initializeTheme();\r\n this.setupSystemThemeListener();\r\n }\r\n }\r\n\r\n /** Get current theme preference */\r\n getTheme(): Theme {\r\n return this.themeSubject.value;\r\n }\r\n\r\n /** Get current resolved theme (light or dark) */\r\n getCurrentTheme(): 'light' | 'dark' {\r\n return this.currentThemeSubject.value;\r\n }\r\n\r\n /** Set theme preference */\r\n setTheme(theme: Theme): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n\r\n this.themeSubject.next(theme);\r\n this.applyTheme(theme);\r\n this.saveThemePreference(theme);\r\n }\r\n\r\n /** Toggle between light and dark themes */\r\n toggleTheme(): void {\r\n const current = this.getCurrentTheme();\r\n this.setTheme(current === 'light' ? 'dark' : 'light');\r\n }\r\n\r\n /** Initialize theme from saved preference or system */\r\n private initializeTheme(): void {\r\n const savedTheme = this.getSavedThemePreference();\r\n const theme = savedTheme || 'auto';\r\n this.setTheme(theme);\r\n }\r\n\r\n /** Apply theme to document and components */\r\n private applyTheme(theme: Theme): void {\r\n const resolvedTheme = this.resolveTheme(theme);\r\n this.currentThemeSubject.next(resolvedTheme);\r\n\r\n // Apply to document\r\n document.documentElement.setAttribute('data-theme', resolvedTheme);\r\n \r\n if (resolvedTheme === 'dark') {\r\n document.documentElement.classList.add('dark');\r\n } else {\r\n document.documentElement.classList.remove('dark');\r\n }\r\n\r\n // Update CSS custom properties\r\n this.updateCSSVariables(resolvedTheme);\r\n\r\n // Force update of all tel-input components\r\n this.updateTelInputComponents(resolvedTheme);\r\n }\r\n\r\n /** Update all tel-input components with the new theme */\r\n private updateTelInputComponents(theme: 'light' | 'dark'): void {\r\n const telInputComponents = document.querySelectorAll('ngxsmk-tel-input');\r\n telInputComponents.forEach(component => {\r\n const element = component as HTMLElement;\r\n element.setAttribute('data-theme', theme);\r\n });\r\n }\r\n\r\n /** Resolve theme to light or dark */\r\n private resolveTheme(theme: Theme): 'light' | 'dark' {\r\n if (theme === 'auto') {\r\n return this.detectSystemTheme();\r\n }\r\n return theme;\r\n }\r\n\r\n /** Detect system theme preference */\r\n private detectSystemTheme(): 'light' | 'dark' {\r\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\r\n return 'dark';\r\n }\r\n return 'light';\r\n }\r\n\r\n /** Setup listener for system theme changes */\r\n private setupSystemThemeListener(): void {\r\n if (window.matchMedia) {\r\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\r\n mediaQuery.addEventListener('change', () => {\r\n if (this.getTheme() === 'auto') {\r\n this.applyTheme('auto');\r\n }\r\n });\r\n }\r\n }\r\n\r\n /** Update CSS custom properties for theme */\r\n private updateCSSVariables(theme: 'light' | 'dark'): void {\r\n const root = document.documentElement;\r\n \r\n if (theme === 'dark') {\r\n root.style.setProperty('--tel-bg', '#0b0f17');\r\n root.style.setProperty('--tel-fg', '#e5e7eb');\r\n root.style.setProperty('--tel-border', '#334155');\r\n root.style.setProperty('--tel-border-hover', '#475569');\r\n root.style.setProperty('--tel-ring', '#60a5fa');\r\n root.style.setProperty('--tel-placeholder', '#94a3b8');\r\n root.style.setProperty('--tel-error', '#f87171');\r\n root.style.setProperty('--tel-success', '#34d399');\r\n root.style.setProperty('--tel-warning', '#fbbf24');\r\n root.style.setProperty('--tel-dd-bg', '#0f1521');\r\n root.style.setProperty('--tel-dd-border', '#324056');\r\n root.style.setProperty('--tel-dd-shadow', '0 24px 60px rgba(0, 0, 0, .4)');\r\n root.style.setProperty('--tel-dd-search-bg', 'rgba(148, 163, 184, .12)');\r\n } else {\r\n root.style.setProperty('--tel-bg', '#fff');\r\n root.style.setProperty('--tel-fg', '#0f172a');\r\n root.style.setProperty('--tel-border', '#c0c0c0');\r\n root.style.setProperty('--tel-border-hover', '#9aa0a6');\r\n root.style.setProperty('--tel-ring', '#2563eb');\r\n root.style.setProperty('--tel-placeholder', '#9ca3af');\r\n root.style.setProperty('--tel-error', '#ef4444');\r\n root.style.setProperty('--tel-success', '#10b981');\r\n root.style.setProperty('--tel-warning', '#f59e0b');\r\n root.style.setProperty('--tel-dd-bg', '#fff');\r\n root.style.setProperty('--tel-dd-border', '#c0c0c0');\r\n root.style.setProperty('--tel-dd-shadow', '0 24px 60px rgba(0, 0, 0, .18)');\r\n root.style.setProperty('--tel-dd-search-bg', 'rgba(148, 163, 184, .08)');\r\n }\r\n }\r\n\r\n /** Save theme preference to localStorage */\r\n private saveThemePreference(theme: Theme): void {\r\n try {\r\n localStorage.setItem('ngxsmk-tel-input-theme', theme);\r\n } catch (error) {\r\n console.warn('Failed to save theme preference:', error);\r\n }\r\n }\r\n\r\n /** Get saved theme preference from localStorage */\r\n private getSavedThemePreference(): Theme | null {\r\n try {\r\n const saved = localStorage.getItem('ngxsmk-tel-input-theme');\r\n return saved as Theme | null;\r\n } catch (error) {\r\n console.warn('Failed to load theme preference:', error);\r\n return null;\r\n }\r\n }\r\n\r\n /** Check if dark theme is active */\r\n isDarkTheme(): boolean {\r\n return this.getCurrentTheme() === 'dark';\r\n }\r\n\r\n /** Check if light theme is active */\r\n isLightTheme(): boolean {\r\n return this.getCurrentTheme() === 'light';\r\n }\r\n\r\n /** Check if auto theme is set */\r\n isAutoTheme(): boolean {\r\n return this.getTheme() === 'auto';\r\n }\r\n}\r\n","import { CountryCode } from 'libphonenumber-js';\r\n\r\n/**\r\n * Utility functions for phone number input optimization\r\n */\r\nexport class PhoneInputUtils {\r\n /**\r\n * Convert any string to digits only (NSN basis)\r\n */\r\n static toNSN(v: string | null | undefined): string {\r\n return (v ?? '').replace(/\\D/g, '');\r\n }\r\n\r\n /**\r\n * Strip exactly one leading trunk '0' from national input\r\n */\r\n static stripLeadingZero(nsn: string): string {\r\n return nsn.replace(/^0/, '');\r\n }\r\n\r\n /**\r\n * Create cache key for phone number operations\r\n */\r\n static createCacheKey(input: string, iso2: CountryCode): string {\r\n return `${input || ''}|${iso2}`;\r\n }\r\n\r\n /**\r\n * Debounce function for performance optimization\r\n */\r\n static debounce<T extends (...args: any[]) => any>(\r\n func: T,\r\n wait: number\r\n ): (...args: Parameters<T>) => void {\r\n let timeout: ReturnType<typeof setTimeout> | null = null;\r\n \r\n return (...args: Parameters<T>) => {\r\n if (timeout) clearTimeout(timeout);\r\n timeout = setTimeout(() => func.apply(this, args), wait);\r\n };\r\n }\r\n\r\n /**\r\n * Throttle function for performance optimization\r\n */\r\n static throttle<T extends (...args: any[]) => any>(\r\n func: T,\r\n limit: number\r\n ): (...args: Parameters<T>) => void {\r\n let inThrottle: boolean;\r\n \r\n return (...args: Parameters<T>) => {\r\n if (!inThrottle) {\r\n func.apply(this, args);\r\n inThrottle = true;\r\n setTimeout(() => inThrottle = false, limit);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Check if a string contains only digits\r\n */\r\n static isDigitsOnly(str: string): boolean {\r\n return /^\\d+$/.test(str);\r\n }\r\n\r\n /**\r\n * Safely get element value with fallback\r\n */\r\n static getElementValue(element: HTMLInputElement | null): string {\r\n return element?.value?.trim() || '';\r\n }\r\n\r\n /**\r\n * Check if element is in viewport for performance optimization\r\n */\r\n static isInViewport(element: HTMLElement): boolean {\r\n const rect = element.getBoundingClientRect();\r\n return (\r\n rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\r\n rect.right <= (window.innerWidth || document.documentElement.clientWidth)\r\n );\r\n }\r\n\r\n /**\r\n * Create optimized event listener with cleanup\r\n */\r\n static createEventListener(\r\n element: HTMLElement,\r\n event: string,\r\n handler: EventListener,\r\n options?: AddEventListenerOptions\r\n ): () => void {\r\n element.addEventListener(event, handler, options);\r\n return () => element.removeEventListener(event, handler, options);\r\n }\r\n\r\n /**\r\n * Batch DOM operations for better performance\r\n */\r\n static batchDOMOperations(operations: (() => void)[]): void {\r\n requestAnimationFrame(() => {\r\n operations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O,YAAY,CAAC,OAAoB,EAAA;AACtC,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,qBAAqB,EAAE;AAC5C,QAAA,QACE,IAAI,CAAC,GAAG,IAAI,CAAC;YACb,IAAI,CAAC,IAAI,IAAI,CAAC;AACd,YAAA,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC;AAC5E,YAAA,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC;;AAI7E;;AAEG;IACH,OAAO,mBAAmB,CACxB,OAAoB,EACpB,KAAa,EACb,OAAsB,EACtB,OAAiC,EAAA;QAEjC,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;AACjD,QAAA,OAAO,MAAM,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;;AAGnE;;AAEG;IACH,OAAO,kBAAkB,CAAC,UAA0B,EAAA;QAClD,qBAAqB,CAAC,MAAK;YACzB,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC;AAChC,SAAC,CAAC;;AAEL;;AC5GD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngxsmk-tel-input.mjs","sources":["../../../projects/ngxsmk-tel-input/src/lib/ngxsmk-tel-input.service.ts","../../../projects/ngxsmk-tel-input/src/lib/ngxsmk-tel-input.component.ts","../../../projects/ngxsmk-tel-input/src/lib/theme.service.ts","../../../projects/ngxsmk-tel-input/src/lib/phone-input.utils.ts","../../../projects/ngxsmk-tel-input/src/ngxsmk-tel-input.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { parsePhoneNumberFromString, type CountryCode, getCountryCallingCode } from 'libphonenumber-js';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class NgxsmkTelInputService {\r\n private parseCache = new Map<string, { e164: string | null; national: string | null; isValid: boolean }>();\r\n private validationCache = new Map<string, boolean>();\r\n private readonly CACHE_SIZE_LIMIT = 1000;\r\n\r\n parse(input: string, iso2: CountryCode): { e164: string | null; national: string | null; isValid: boolean } {\r\n const cacheKey = `${input || ''}|${iso2}`;\r\n \r\n if (this.parseCache.has(cacheKey)) {\r\n return this.parseCache.get(cacheKey)!;\r\n }\r\n\r\n const phone = parsePhoneNumberFromString(input || '', iso2);\r\n if (!phone) {\r\n const result = { e164: null, national: null, isValid: false };\r\n this.setCacheValue(this.parseCache, cacheKey, result);\r\n return result;\r\n }\r\n \r\n const isValid = phone.isValid();\r\n const result = { \r\n e164: isValid ? phone.number : null, \r\n national: phone.formatNational(), \r\n isValid \r\n };\r\n \r\n this.setCacheValue(this.parseCache, cacheKey, result);\r\n return result;\r\n }\r\n\r\n isValid(input: string, iso2: CountryCode): boolean {\r\n const cacheKey = `${input || ''}|${iso2}`;\r\n \r\n if (this.validationCache.has(cacheKey)) {\r\n return this.validationCache.get(cacheKey)!;\r\n }\r\n\r\n const phone = parsePhoneNumberFromString(input || '', iso2);\r\n const result = !!phone && phone.isValid();\r\n \r\n this.setCacheValue(this.validationCache, cacheKey, result);\r\n return result;\r\n }\r\n\r\n private setCacheValue<T>(cache: Map<string, T>, key: string, value: T): void {\r\n if (cache.size >= this.CACHE_SIZE_LIMIT) {\r\n const firstKey = cache.keys().next().value;\r\n if (firstKey) cache.delete(firstKey);\r\n }\r\n cache.set(key, value);\r\n }\r\n\r\n clearCache(): void {\r\n this.parseCache.clear();\r\n this.validationCache.clear();\r\n }\r\n\r\n /**\r\n * Check if the input appears to be an international number with an invalid country code\r\n * This helps detect cases like \"1123456789\" where \"11\" is not a valid country code\r\n */\r\n private isInvalidInternationalNumber(input: string): boolean {\r\n if (!input || input.length < 3) return false;\r\n \r\n // Check if input starts with digits that could be a country code\r\n const digits = input.replace(/\\D/g, '');\r\n if (digits.length < 3) return false;\r\n \r\n // Try to extract potential country code (1-3 digits)\r\n for (let i = 1; i <= 3 && i <= digits.length; i++) {\r\n const potentialCountryCode = digits.substring(0, i);\r\n const remainingDigits = digits.substring(i);\r\n \r\n // If we have a potential country code and remaining digits\r\n if (remainingDigits.length >= 3) {\r\n // Try to parse as international number\r\n try {\r\n const internationalNumber = `+${potentialCountryCode}${remainingDigits}`;\r\n const phone = parsePhoneNumberFromString(internationalNumber);\r\n \r\n // If parsing fails, it might be an invalid country code\r\n if (!phone) {\r\n // Check if this looks like an attempt at an international number\r\n // (starts with + or has country code pattern)\r\n if (input.startsWith('+') || (potentialCountryCode.length >= 1 && potentialCountryCode.length <= 3)) {\r\n return true;\r\n }\r\n }\r\n } catch {\r\n // If parsing throws an error, it's likely an invalid country code\r\n return true;\r\n }\r\n }\r\n }\r\n \r\n return false;\r\n }\r\n\r\n /**\r\n * Enhanced parse method that detects invalid international numbers\r\n */\r\n parseWithInvalidDetection(input: string, iso2: CountryCode): { e164: string | null; national: string | null; isValid: boolean; isInvalidInternational: boolean } {\r\n const cacheKey = `${input || ''}|${iso2}`;\r\n \r\n if (this.parseCache.has(cacheKey)) {\r\n const cached = this.parseCache.get(cacheKey)!;\r\n return {\r\n ...cached,\r\n isInvalidInternational: this.isInvalidInternationalNumber(input)\r\n };\r\n }\r\n\r\n const phone = parsePhoneNumberFromString(input || '', iso2);\r\n const isInvalidInternational = this.isInvalidInternationalNumber(input);\r\n \r\n if (!phone) {\r\n const result = { \r\n e164: null, \r\n national: null, \r\n isValid: false,\r\n isInvalidInternational \r\n };\r\n this.setCacheValue(this.parseCache, cacheKey, { e164: null, national: null, isValid: false });\r\n return result;\r\n }\r\n \r\n const isValid = phone.isValid();\r\n const result = { \r\n e164: isValid ? phone.number : null, \r\n national: phone.formatNational(), \r\n isValid,\r\n isInvalidInternational \r\n };\r\n \r\n this.setCacheValue(this.parseCache, cacheKey, { e164: result.e164, national: result.national, isValid: result.isValid });\r\n return result;\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n forwardRef,\r\n inject,\r\n Input,\r\n NgZone,\r\n OnChanges,\r\n OnDestroy,\r\n Output,\r\n PLATFORM_ID,\r\n SimpleChanges,\r\n ViewChild,\r\n ChangeDetectionStrategy,\r\n} from '@angular/core';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport {\r\n AbstractControl,\r\n ControlValueAccessor,\r\n NG_VALIDATORS,\r\n NG_VALUE_ACCESSOR,\r\n ValidationErrors,\r\n Validator\r\n} from '@angular/forms';\r\nimport { AsYouType, CountryCode, validatePhoneNumberLength } from 'libphonenumber-js';\r\nimport { NgxsmkTelInputService } from './ngxsmk-tel-input.service';\r\nimport { CountryMap, IntlTelI18n } from './types';\r\n\r\ntype IntlTelInstance = any;\r\n\r\n@Component({\r\n selector: 'ngxsmk-tel-input',\r\n standalone: true,\r\n imports: [],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n template: `\r\n <div class=\"ngxsmk-tel\"\r\n [class.disabled]=\"disabled\"\r\n [attr.data-size]=\"size\"\r\n [attr.data-variant]=\"variant\"\r\n [attr.dir]=\"dir\">\r\n @if (label) {\r\n <label class=\"ngxsmk-tel__label\" [for]=\"resolvedId\">{{ label }}</label>\r\n }\r\n\r\n <div class=\"ngxsmk-tel__wrap\" [class.has-error]=\"showError\">\r\n <div class=\"ngxsmk-tel-input__wrapper\">\r\n <input\r\n #telInput\r\n type=\"tel\"\r\n class=\"ngxsmk-tel-input__control\"\r\n [id]=\"resolvedId\"\r\n [attr.name]=\"name || null\"\r\n [attr.placeholder]=\"placeholder || null\"\r\n [attr.autocomplete]=\"autocomplete\"\r\n [attr.inputmode]=\"digitsOnly ? 'numeric' : 'tel'\"\r\n [disabled]=\"disabled\"\r\n [attr.aria-invalid]=\"showError ? 'true' : 'false'\"\r\n (blur)=\"onBlur()\"\r\n (focus)=\"onFocus()\"\r\n />\r\n </div>\r\n\r\n @if (showClear && currentRaw()) {\r\n <button type=\"button\"\r\n class=\"ngxsmk-tel__clear\"\r\n (click)=\"clearInput()\"\r\n [attr.aria-label]=\"clearAriaLabel\">\r\n ×\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (hint && !showError) {\r\n <div class=\"ngxsmk-tel__hint\">{{ hint }}</div>\r\n }\r\n </div>\r\n `,\r\n styleUrls: ['./ngxsmk-tel-input.component.scss'],\r\n providers: [\r\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => NgxsmkTelInputComponent), multi: true },\r\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => NgxsmkTelInputComponent), multi: true }\r\n ]\r\n})\r\nexport class NgxsmkTelInputComponent implements AfterViewInit, OnChanges, OnDestroy, ControlValueAccessor, Validator {\r\n @ViewChild('telInput', { static: true }) inputRef!: ElementRef<HTMLInputElement>;\r\n\r\n /* Core config */\r\n @Input() initialCountry: CountryCode | 'auto' = 'US';\r\n @Input() preferredCountries: CountryCode[] = ['US', 'GB'];\r\n @Input() onlyCountries?: CountryCode[];\r\n /** Dropdown shows dial code; input will NEVER show dial code */\r\n @Input() separateDialCode: boolean = true;\r\n @Input() allowDropdown: boolean = true;\r\n\r\n /* Display / formatting */\r\n /** 'formatted' => national with spaces; 'digits' => digits only */\r\n @Input() nationalDisplay: 'formatted' | 'digits' = 'formatted';\r\n /** 'typing' (live), 'blur', or 'off' */\r\n @Input() formatWhenValid: 'off' | 'blur' | 'typing' = 'typing';\r\n\r\n /* UX */\r\n @Input() placeholder?: string;\r\n @Input() autocomplete = 'tel';\r\n @Input() name?: string;\r\n @Input() inputId?: string;\r\n @Input() disabled:boolean = false;\r\n\r\n @Input() label?: string;\r\n @Input() hint?: string;\r\n @Input() errorText?: string;\r\n @Input() size: 'sm' | 'md' | 'lg' = 'md';\r\n @Input() variant: 'outline' | 'filled' | 'underline' = 'outline';\r\n @Input() showClear = true;\r\n @Input() autoFocus = false;\r\n @Input() selectOnFocus = false;\r\n @Input() showErrorWhenTouched = true;\r\n\r\n /* Dropdown plumbing */\r\n @Input() dropdownAttachToBody = true;\r\n @Input() dropdownZIndex = 2000;\r\n\r\n /* Localization + RTL */\r\n @Input('i18n') i18n?: IntlTelI18n;\r\n @Input('telI18n') set telI18n(v: IntlTelI18n | undefined) { this.i18n = v; }\r\n @Input('localizedCountries') localizedCountries?: CountryMap;\r\n @Input('telLocalizedCountries') set telLocalizedCountries(v: CountryMap | undefined) { this.localizedCountries = v; }\r\n\r\n @Input() clearAriaLabel = 'Clear phone number';\r\n @Input() dir: 'ltr' | 'rtl' = 'ltr';\r\n\r\n /* Placeholders (intl-tel-input) */\r\n @Input() autoPlaceholder: 'off' | 'polite' | 'aggressive' = 'off';\r\n @Input() utilsScript?: string;\r\n @Input() customPlaceholder?: (example: string, country: any) => string;\r\n\r\n /* Input behavior */\r\n @Input() digitsOnly = true; // Still insert spaces when formatted\r\n @Input() lockWhenValid = true; // optional UX guard\r\n\r\n /* Theme */\r\n @Input() theme: 'light' | 'dark' | 'auto' = 'auto';\r\n\r\n /* Outputs */\r\n @Output() countryChange = new EventEmitter<{ iso2: CountryCode }>();\r\n @Output() validityChange = new EventEmitter<boolean>();\r\n @Output() inputChange = new EventEmitter<{ raw: string; e164: string | null; iso2: CountryCode }>();\r\n\r\n /* Internal */\r\n private iti: IntlTelInstance | null = null;\r\n private onChange: (val: string | null) => void = () => {};\r\n private onTouchedCb: () => void = () => {};\r\n private validatorChange?: () => void;\r\n private lastEmittedValid = false;\r\n private pendingWrite: string | null = null;\r\n private touched = false;\r\n private isDestroyed = false;\r\n private eventListeners: Array<{ element: HTMLElement; event: string; handler: (event: Event) => void }> = [];\r\n\r\n private allowDropdownWasTrue = false;\r\n private suppressEvents = false;\r\n\r\n readonly resolvedId: string = this.inputId || ('tel-' + Math.random().toString(36).slice(2));\r\n private readonly platformId = inject(PLATFORM_ID);\r\n private currentTheme: 'light' | 'dark' = 'light';\r\n\r\n constructor(private readonly zone: NgZone, private readonly tel: NgxsmkTelInputService) {}\r\n\r\n // ---------- Lifecycle ----------\r\n ngAfterViewInit(): void {\r\n if (!isPlatformBrowser(this.platformId) || this.isDestroyed) return;\r\n this.detectAndApplyTheme();\r\n this.setupDropdownThemeObserver();\r\n void this.initAndWire();\r\n }\r\n\r\n private async initAndWire(): Promise<void> {\r\n if (this.isDestroyed) return;\r\n \r\n await this.initIntlTelInput();\r\n this.bindDomListeners();\r\n\r\n if (this.pendingWrite !== null) {\r\n const v = this.pendingWrite;\r\n this.pendingWrite = null;\r\n this.writeValue(v);\r\n }\r\n\r\n if (this.autoFocus && !this.isDestroyed) {\r\n requestAnimationFrame(() => {\r\n if (!this.isDestroyed) this.focus();\r\n });\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (!isPlatformBrowser(this.platformId) || this.isDestroyed) return;\r\n \r\n const configChanged = [\r\n 'initialCountry', 'preferredCountries', 'onlyCountries',\r\n 'separateDialCode', 'allowDropdown',\r\n 'i18n', 'localizedCountries', 'dir',\r\n 'autoPlaceholder', 'utilsScript', 'customPlaceholder'\r\n ].some(k => k in changes && !changes[k]?.firstChange);\r\n\r\n if (configChanged && this.iti && !this.isDestroyed) {\r\n this.reinitPlugin();\r\n this.validatorChange?.();\r\n }\r\n\r\n // Handle theme changes\r\n if ('theme' in changes && !changes['theme']?.firstChange) {\r\n this.detectAndApplyTheme();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void { \r\n this.isDestroyed = true;\r\n this.destroyPlugin(); \r\n this.cleanupEventListeners();\r\n }\r\n\r\n // ---------- CVA ----------\r\n writeValue(val: string | null): void {\r\n if (!this.inputRef || this.isDestroyed) return;\r\n\r\n if (!this.iti) { // not ready yet\r\n this.pendingWrite = val ?? '';\r\n return;\r\n }\r\n\r\n this.suppressEvents = true;\r\n try {\r\n // Let the plugin infer the country from E.164 (if provided).\r\n this.iti.setNumber(val || '');\r\n\r\n const iso2 = this.currentIso2();\r\n const parsed = this.tel.parse(val ?? '', iso2);\r\n\r\n // Visible input: ALWAYS NSN (no dial code, no trunk '0')\r\n const nsn = parsed.e164\r\n ? this.nsnFromE164(parsed.e164, iso2)\r\n : this.stripLeadingZero(this.toNSN(parsed.national ?? (val ?? '')));\r\n\r\n const display = this.displayValue(nsn, iso2);\r\n this.setInputValue(display);\r\n\r\n // FormControl value: ALWAYS E.164 (or null) - batch zone runs\r\n this.zone.run(() => {\r\n this.onChange(parsed.e164);\r\n this.inputChange.emit({ raw: display, e164: parsed.e164, iso2 });\r\n });\r\n } finally {\r\n this.suppressEvents = false;\r\n }\r\n }\r\n\r\n registerOnChange(fn: any): void { this.onChange = fn; }\r\n registerOnTouched(fn: any): void { this.onTouchedCb = fn; }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n if (this.isDestroyed) return;\r\n \r\n this.disabled = isDisabled;\r\n\r\n // 1) native input\r\n if (this.inputRef) this.inputRef.nativeElement.disabled = isDisabled;\r\n\r\n // 2) toggle dropdown by re-init with allowDropdown=false when disabled\r\n if (this.iti) {\r\n if (isDisabled && this.allowDropdown) {\r\n this.allowDropdownWasTrue = true;\r\n this.allowDropdown = false;\r\n this.reinitPlugin(); // closes popup & removes handlers\r\n } else if (!isDisabled && this.allowDropdownWasTrue) {\r\n this.allowDropdown = true;\r\n this.allowDropdownWasTrue = false;\r\n this.reinitPlugin(); // restore dropdown\r\n } else {\r\n this.applyDisabledUi(isDisabled);\r\n }\r\n } else {\r\n this.applyDisabledUi(isDisabled);\r\n }\r\n }\r\n\r\n // ---------- Validator ----------\r\n validate(_: AbstractControl): ValidationErrors | null {\r\n if (this.isDestroyed) return null;\r\n \r\n const raw = this.currentRaw();\r\n if (!raw) return null;\r\n \r\n // Use enhanced parsing to detect invalid international numbers\r\n const parsed = this.tel.parseWithInvalidDetection(raw, this.currentIso2());\r\n const valid = parsed.isValid && !parsed.isInvalidInternational;\r\n \r\n if (valid !== this.lastEmittedValid) {\r\n this.lastEmittedValid = valid;\r\n this.validityChange.emit(valid);\r\n }\r\n \r\n if (!valid) {\r\n if (parsed.isInvalidInternational) {\r\n return { phoneInvalidCountryCode: true };\r\n }\r\n return { phoneInvalid: true };\r\n }\r\n \r\n return null;\r\n }\r\n\r\n registerOnValidatorChange(fn: () => void): void { this.validatorChange = fn; }\r\n\r\n // ---------- Public helpers ----------\r\n focus(): void {\r\n if (this.isDestroyed || !this.inputRef) return;\r\n \r\n this.inputRef.nativeElement.focus();\r\n if (this.selectOnFocus) {\r\n const el = this.inputRef.nativeElement;\r\n requestAnimationFrame(() => {\r\n if (!this.isDestroyed) el.setSelectionRange(0, el.value.length);\r\n });\r\n }\r\n }\r\n\r\n selectCountry(iso2: CountryCode): void {\r\n if (this.iti && !this.isDestroyed) {\r\n this.iti.setCountry(iso2.toLowerCase());\r\n this.handleInput();\r\n }\r\n }\r\n\r\n clearInput(): void {\r\n if (this.isDestroyed) return;\r\n \r\n this.setInputValue('');\r\n this.handleInput();\r\n this.inputRef.nativeElement.focus();\r\n }\r\n\r\n // ---------- intl-tel-input wiring ----------\r\n private async initIntlTelInput() {\r\n if (this.isDestroyed) return;\r\n \r\n const [{ default: intlTelInput }] = await Promise.all([import('intl-tel-input')]);\r\n\r\n const toLowerKeys = (m?: CountryMap) => {\r\n if (!m) return undefined;\r\n const out: Record<string, string> = {};\r\n for (const k in m) if (Object.prototype.hasOwnProperty.call(m, k)) {\r\n const v = (m as Record<string, string | undefined>)[k];\r\n if (v != null) out[k.toLowerCase()] = v;\r\n }\r\n return out;\r\n };\r\n\r\n const config: any = {\r\n initialCountry: this.initialCountry === 'auto' ? 'auto' : (this.initialCountry?.toLowerCase() || 'us'),\r\n preferredCountries: (this.preferredCountries ?? []).map(c => c.toLowerCase()),\r\n onlyCountries: (this.onlyCountries ?? []).map(c => c.toLowerCase()),\r\n nationalMode: true, // Control the visible value; prevents '+' in the input\r\n allowDropdown: this.allowDropdown,\r\n separateDialCode: this.separateDialCode,\r\n geoIpLookup: (cb: (iso2: string) => void) => cb('us'),\r\n\r\n autoPlaceholder: this.autoPlaceholder,\r\n utilsScript: this.utilsScript,\r\n customPlaceholder: this.customPlaceholder,\r\n\r\n i18n: this.i18n,\r\n localizedCountries: toLowerKeys(this.localizedCountries),\r\n dropdownContainer: this.dropdownAttachToBody && typeof document !== 'undefined' ? document.body : undefined\r\n };\r\n\r\n this.zone.runOutsideAngular(() => {\r\n if (!this.isDestroyed) {\r\n this.iti = intlTelInput(this.inputRef.nativeElement, config);\r\n }\r\n });\r\n\r\n if (!this.isDestroyed) {\r\n (this.inputRef.nativeElement as HTMLElement).style.setProperty('--tel-dd-z', String(this.dropdownZIndex));\r\n this.applyDisabledUi(this.disabled);\r\n }\r\n }\r\n\r\n private async reinitPlugin() {\r\n if (this.isDestroyed) return;\r\n \r\n const prevIso2 = (this.iti?.getSelectedCountryData?.().iso2 || this.initialCountry || 'US').toString().toLowerCase();\r\n const prevValue = this.currentRaw();\r\n\r\n this.destroyPlugin();\r\n await this.initIntlTelInput();\r\n this.bindDomListeners();\r\n\r\n if (!this.isDestroyed) {\r\n try { this.iti?.setCountry(prevIso2); } catch {}\r\n if (prevValue) {\r\n this.setInputValue(prevValue);\r\n this.handleInput();\r\n }\r\n this.applyDisabledUi(this.disabled);\r\n }\r\n }\r\n\r\n private destroyPlugin() {\r\n if (this.iti) {\r\n this.iti.destroy();\r\n this.iti = null;\r\n }\r\n \r\n // Optimize DOM manipulation - only clone if necessary\r\n if (this.inputRef?.nativeElement && this.iti) {\r\n const el = this.inputRef.nativeElement;\r\n const clone = el.cloneNode(true) as HTMLInputElement;\r\n\r\n // preserve state across clone\r\n clone.disabled = this.disabled;\r\n clone.id = this.resolvedId;\r\n clone.name = this.name ?? clone.name;\r\n clone.value = el.value;\r\n\r\n el.parentNode?.replaceChild(clone, el);\r\n (this.inputRef as any).nativeElement = clone;\r\n }\r\n }\r\n\r\n // ---------- Input listeners ----------\r\n private bindDomListeners() {\r\n if (this.isDestroyed || !this.inputRef) return;\r\n \r\n const el = this.inputRef.nativeElement;\r\n\r\n this.zone.runOutsideAngular(() => {\r\n const beforeInputHandler = (ev: Event) => {\r\n if (this.isDestroyed || !this.digitsOnly) return;\r\n const data = (ev as any).data as string | null;\r\n\r\n // If already valid, block extra digit insertions when no selection\r\n if (this.lockWhenValid && this.isCurrentlyValid()) {\r\n const selCollapsed = (el.selectionStart ?? 0) === (el.selectionEnd ?? 0);\r\n const isDigit = !!data && (ev as any).inputType === 'insertText' && data >= '0' && data <= '9';\r\n if (selCollapsed && isDigit) { ev.preventDefault(); return; }\r\n }\r\n\r\n if (!data || (ev as any).inputType !== 'insertText') return;\r\n const isDigit = data >= '0' && data <= '9';\r\n if (!isDigit) { ev.preventDefault(); return; }\r\n\r\n // NEW: block if this digit would make the NSN too long for the current country\r\n const start = el.selectionStart ?? el.value.length;\r\n const end = el.selectionEnd ?? el.value.length;\r\n const prospective = el.value.slice(0, start) + data + el.value.slice(end);\r\n const nsn = this.stripLeadingZero(this.toNSN(prospective));\r\n const iso2 = this.currentIso2();\r\n\r\n if (this.wouldExceedMax(nsn, iso2)) {\r\n ev.preventDefault();\r\n return;\r\n }\r\n };\r\n\r\n const pasteHandler = (e: Event) => {\r\n if (this.isDestroyed) return;\r\n \r\n const text = ((e as any).clipboardData || (window as any).clipboardData).getData('text') || '';\r\n e.preventDefault();\r\n\r\n const iso2 = this.currentIso2();\r\n // digits-only, strip any leading trunk '0'\r\n let digits = this.stripLeadingZero(this.toNSN(text));\r\n\r\n // NEW: trim pasted digits until not TOO_LONG for the selected country\r\n while (this.wouldExceedMax(digits, iso2)) {\r\n digits = digits.slice(0, -1);\r\n if (!digits) break;\r\n }\r\n\r\n const start = el.selectionStart ?? el.value.length;\r\n const end = el.selectionEnd ?? el.value.length;\r\n el.setRangeText(digits, start, end, 'end');\r\n requestAnimationFrame(() => {\r\n if (!this.isDestroyed) this.handleInput();\r\n });\r\n };\r\n\r\n const inputHandler = () => {\r\n if (!this.isDestroyed) this.handleInput();\r\n };\r\n\r\n const countryChangeHandler = () => {\r\n if (this.isDestroyed) return;\r\n \r\n const iso2 = this.currentIso2();\r\n this.zone.run(() => {\r\n this.countryChange.emit({ iso2 });\r\n this.validatorChange?.();\r\n });\r\n this.handleInput();\r\n };\r\n\r\n const blurHandler = () => {\r\n if (!this.isDestroyed) this.onBlur();\r\n };\r\n\r\n // Store listeners for cleanup\r\n this.eventListeners = [\r\n { element: el, event: 'beforeinput', handler: beforeInputHandler },\r\n { element: el, event: 'paste', handler: pasteHandler },\r\n { element: el, event: 'input', handler: inputHandler },\r\n { element: el, event: 'countrychange', handler: countryChangeHandler },\r\n { element: el, event: 'blur', handler: blurHandler }\r\n ];\r\n\r\n this.eventListeners.forEach(({ element, event, handler }) => {\r\n element.addEventListener(event, handler);\r\n });\r\n });\r\n }\r\n\r\n // ---------- UX handlers ----------\r\n onBlur() {\r\n if (this.isDestroyed) return;\r\n \r\n this.touched = true;\r\n this.zone.run(() => this.onTouchedCb());\r\n if (this.formatWhenValid === 'off') return;\r\n\r\n const iso2 = this.currentIso2();\r\n const digits = this.stripLeadingZero(this.toNSN(this.currentRaw()));\r\n\r\n const parsed = this.tel.parseWithInvalidDetection(digits, iso2);\r\n if (!parsed.e164 && !parsed.isValid) return;\r\n\r\n const nsn = parsed.e164 ? this.nsnFromE164(parsed.e164, iso2) : digits;\r\n if (this.formatWhenValid !== 'typing') {\r\n this.setInputValue(this.displayValue(nsn, iso2));\r\n }\r\n }\r\n\r\n onFocus() {\r\n if (this.isDestroyed || !this.selectOnFocus || !this.inputRef) return;\r\n \r\n const el = this.inputRef.nativeElement;\r\n requestAnimationFrame(() => {\r\n if (!this.isDestroyed) el.setSelectionRange(0, el.value.length);\r\n });\r\n }\r\n\r\n // ---------- Core input pipeline ----------\r\n private handleInput() {\r\n if (this.suppressEvents || this.isDestroyed) return;\r\n\r\n const iso2 = this.currentIso2();\r\n // Users type national digits; remove any separators and a single trunk '0'\r\n let digits = this.stripLeadingZero(this.toNSN(this.currentRaw()));\r\n\r\n // Use enhanced parsing to detect invalid international numbers\r\n const parsed = this.tel.parseWithInvalidDetection(digits, iso2);\r\n\r\n // Emit E.164 to the form (or null if incomplete) - batch zone runs\r\n this.zone.run(() => {\r\n this.onChange(parsed.e164);\r\n this.inputChange.emit({ raw: this.currentRaw(), e164: parsed.e164, iso2 });\r\n });\r\n\r\n // Keep visible value as NSN (optionally formatted)\r\n const nsn = parsed.e164 ? this.nsnFromE164(parsed.e164, iso2) : digits;\r\n const display = this.formatWhenValid === 'typing' ? this.displayValue(nsn, iso2) : nsn;\r\n\r\n if (display !== this.currentRaw()) this.setInputValue(display);\r\n }\r\n\r\n // ---------- Utilities ----------\r\n /** Convert any string to digits only (NSN basis). */\r\n private toNSN(v: string | null | undefined): string {\r\n return (v ?? '').replace(/\\D/g, '');\r\n }\r\n\r\n /** Strip exactly one leading trunk '0' from national input. */\r\n private stripLeadingZero(nsn: string): string {\r\n return nsn.replace(/^0/, '');\r\n }\r\n\r\n /** Current country calling code (e.g. \"44\", \"94\"). */\r\n private currentDialCode(): string {\r\n return (this.iti?.getSelectedCountryData?.().dialCode ?? '').toString();\r\n }\r\n\r\n /** Convert E.164 (+<cc><nsn>) to NSN (never includes trunk '0'). */\r\n private nsnFromE164(e164: string, iso2: CountryCode): string {\r\n const dial = this.currentDialCode();\r\n if (!e164 || !dial) return this.toNSN(e164);\r\n if (e164.startsWith('+' + dial)) return e164.slice(dial.length + 1);\r\n return this.toNSN(e164);\r\n }\r\n\r\n /** Format NSN for a region (adds spaces but NEVER a trunk '0'). */\r\n private formatNSN(nsn: string, iso2: CountryCode): string {\r\n try {\r\n const fmt = new AsYouType(iso2);\r\n return fmt.input(nsn);\r\n } catch {\r\n return nsn;\r\n }\r\n }\r\n\r\n /** Compose visible value based on settings. */\r\n private displayValue(nsn: string, iso2: CountryCode): string {\r\n return this.nationalDisplay === 'formatted' ? this.formatNSN(nsn, iso2) : nsn;\r\n // (spaces in formatted mode; digits only otherwise)\r\n }\r\n\r\n currentRaw(): string { \r\n return this.isDestroyed ? '' : (this.inputRef?.nativeElement.value ?? '').trim(); \r\n }\r\n\r\n private currentIso2(): CountryCode {\r\n if (this.isDestroyed) return 'US';\r\n \r\n const iso2 = (this.iti?.getSelectedCountryData?.().iso2 ?? this.initialCountry ?? 'US')\r\n .toString().toUpperCase();\r\n return iso2 as CountryCode;\r\n }\r\n\r\n private setInputValue(v: string) { \r\n if (!this.isDestroyed && this.inputRef) {\r\n this.inputRef.nativeElement.value = v ?? ''; \r\n }\r\n }\r\n\r\n get showError(): boolean {\r\n if (this.isDestroyed) return false;\r\n \r\n const invalid = !!this.validate({} as AbstractControl);\r\n return this.showErrorWhenTouched ? (this.touched && invalid) : invalid;\r\n }\r\n\r\n private isCurrentlyValid(): boolean { \r\n return this.isDestroyed ? false : this.tel.isValid(this.currentRaw(), this.currentIso2()); \r\n }\r\n\r\n /** Make flag/dropdown non-interactive when disabled */\r\n private applyDisabledUi(disabled: boolean) {\r\n if (this.isDestroyed) return;\r\n \r\n const input = this.inputRef?.nativeElement;\r\n if (!input) return;\r\n const flag = input.parentElement?.querySelector('.iti__selected-flag') as HTMLElement | null;\r\n if (flag) {\r\n flag.tabIndex = disabled ? -1 : 0;\r\n flag.setAttribute('aria-disabled', String(disabled));\r\n }\r\n }\r\n\r\n /** Returns true if nsn would be TOO_LONG for the current country. */\r\n private wouldExceedMax(nsn: string, iso2: CountryCode): boolean {\r\n if (this.isDestroyed) return false;\r\n \r\n try {\r\n const res = validatePhoneNumberLength(nsn, iso2);\r\n return res === 'TOO_LONG';\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n /** Clean up event listeners to prevent memory leaks */\r\n private cleanupEventListeners(): void {\r\n this.eventListeners.forEach(({ element, event, handler }) => {\r\n element.removeEventListener(event, handler);\r\n });\r\n this.eventListeners = [];\r\n }\r\n\r\n /** Detect and apply theme based on user preference and system settings */\r\n private detectAndApplyTheme(): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n\r\n let detectedTheme: 'light' | 'dark' = 'light';\r\n\r\n if (this.theme === 'auto') {\r\n // Check for system preference\r\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\r\n detectedTheme = 'dark';\r\n }\r\n // Check for document class\r\n else if (document.documentElement.classList.contains('dark')) {\r\n detectedTheme = 'dark';\r\n }\r\n // Check for data attribute\r\n else if (document.documentElement.getAttribute('data-theme') === 'dark') {\r\n detectedTheme = 'dark';\r\n }\r\n } else {\r\n detectedTheme = this.theme;\r\n }\r\n\r\n this.currentTheme = detectedTheme;\r\n this.applyTheme(detectedTheme);\r\n }\r\n\r\n /** Apply theme to the component */\r\n private applyTheme(theme: 'light' | 'dark'): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n\r\n const hostElement = this.inputRef?.nativeElement?.closest('ngxsmk-tel-input') as HTMLElement;\r\n if (hostElement) {\r\n hostElement.setAttribute('data-theme', theme);\r\n }\r\n\r\n // Also apply theme to any existing dropdown\r\n this.applyThemeToDropdown(theme);\r\n }\r\n\r\n /** Apply theme to the dropdown if it exists */\r\n private applyThemeToDropdown(theme: 'light' | 'dark'): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n\r\n // Find the dropdown in the document\r\n const dropdown = document.querySelector('.iti__country-list') as HTMLElement;\r\n if (dropdown) {\r\n dropdown.setAttribute('data-theme', theme);\r\n }\r\n }\r\n\r\n /** Get current theme */\r\n getCurrentTheme(): 'light' | 'dark' {\r\n return this.currentTheme;\r\n }\r\n\r\n /** Set theme programmatically */\r\n setTheme(theme: 'light' | 'dark'): void {\r\n this.theme = theme;\r\n this.detectAndApplyTheme();\r\n }\r\n\r\n /** Update dropdown theme when it's opened */\r\n private updateDropdownTheme(): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n \r\n // Use a small delay to ensure dropdown is rendered\r\n setTimeout(() => {\r\n const dropdown = document.querySelector('.iti__country-list') as HTMLElement;\r\n if (dropdown) {\r\n dropdown.setAttribute('data-theme', this.currentTheme);\r\n \r\n // Force apply dark theme classes\r\n if (this.currentTheme === 'dark') {\r\n dropdown.classList.add('dark-theme');\r\n document.documentElement.classList.add('dark');\r\n document.body.classList.add('dark');\r\n } else {\r\n dropdown.classList.remove('dark-theme');\r\n document.documentElement.classList.remove('dark');\r\n document.body.classList.remove('dark');\r\n }\r\n \r\n // Also update the search input if it exists\r\n const searchInput = dropdown.querySelector('.iti__search-input') as HTMLElement;\r\n if (searchInput) {\r\n searchInput.setAttribute('data-theme', this.currentTheme);\r\n if (this.currentTheme === 'dark') {\r\n searchInput.classList.add('dark-theme');\r\n } else {\r\n searchInput.classList.remove('dark-theme');\r\n }\r\n \r\n // Ensure search input is focusable and functional\r\n searchInput.style.pointerEvents = 'auto';\r\n searchInput.style.opacity = '1';\r\n (searchInput as HTMLInputElement).disabled = false;\r\n }\r\n }\r\n }, 10);\r\n }\r\n\r\n /** Setup observer to watch for dropdown changes and apply theme */\r\n private setupDropdownThemeObserver(): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n\r\n // Watch for dropdown appearance in the DOM\r\n const observer = new MutationObserver((mutations) => {\r\n mutations.forEach((mutation) => {\r\n if (mutation.type === 'childList') {\r\n mutation.addedNodes.forEach((node) => {\r\n if (node.nodeType === Node.ELEMENT_NODE) {\r\n const element = node as HTMLElement;\r\n if (element.classList.contains('iti__country-list')) {\r\n this.updateDropdownTheme();\r\n }\r\n }\r\n });\r\n }\r\n });\r\n });\r\n\r\n // Start observing\r\n observer.observe(document.body, {\r\n childList: true,\r\n subtree: true\r\n });\r\n\r\n // Store observer for cleanup\r\n this.eventListeners.push({\r\n element: document.body,\r\n event: 'observer',\r\n handler: () => observer.disconnect()\r\n });\r\n }\r\n}\r\n","import { Injectable, PLATFORM_ID, inject } from '@angular/core';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\n\r\nexport type Theme = 'light' | 'dark' | 'auto';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ThemeService {\r\n private readonly platformId = inject(PLATFORM_ID);\r\n private readonly themeSubject = new BehaviorSubject<Theme>('auto');\r\n private readonly currentThemeSubject = new BehaviorSubject<'light' | 'dark'>('light');\r\n \r\n public readonly theme$ = this.themeSubject.asObservable();\r\n public readonly currentTheme$ = this.currentThemeSubject.asObservable();\r\n\r\n constructor() {\r\n if (isPlatformBrowser(this.platformId)) {\r\n this.initializeTheme();\r\n this.setupSystemThemeListener();\r\n }\r\n }\r\n\r\n /** Get current theme preference */\r\n getTheme(): Theme {\r\n return this.themeSubject.value;\r\n }\r\n\r\n /** Get current resolved theme (light or dark) */\r\n getCurrentTheme(): 'light' | 'dark' {\r\n return this.currentThemeSubject.value;\r\n }\r\n\r\n /** Set theme preference */\r\n setTheme(theme: Theme): void {\r\n if (!isPlatformBrowser(this.platformId)) return;\r\n\r\n this.themeSubject.next(theme);\r\n this.applyTheme(theme);\r\n this.saveThemePreference(theme);\r\n }\r\n\r\n /** Toggle between light and dark themes */\r\n toggleTheme(): void {\r\n const current = this.getCurrentTheme();\r\n this.setTheme(current === 'light' ? 'dark' : 'light');\r\n }\r\n\r\n /** Initialize theme from saved preference or system */\r\n private initializeTheme(): void {\r\n const savedTheme = this.getSavedThemePreference();\r\n const theme = savedTheme || 'auto';\r\n this.setTheme(theme);\r\n }\r\n\r\n /** Apply theme to document and components */\r\n private applyTheme(theme: Theme): void {\r\n const resolvedTheme = this.resolveTheme(theme);\r\n this.currentThemeSubject.next(resolvedTheme);\r\n\r\n // Apply to document\r\n document.documentElement.setAttribute('data-theme', resolvedTheme);\r\n \r\n if (resolvedTheme === 'dark') {\r\n document.documentElement.classList.add('dark');\r\n } else {\r\n document.documentElement.classList.remove('dark');\r\n }\r\n\r\n // Update CSS custom properties\r\n this.updateCSSVariables(resolvedTheme);\r\n\r\n // Force update of all tel-input components\r\n this.updateTelInputComponents(resolvedTheme);\r\n }\r\n\r\n /** Update all tel-input components with the new theme */\r\n private updateTelInputComponents(theme: 'light' | 'dark'): void {\r\n const telInputComponents = document.querySelectorAll('ngxsmk-tel-input');\r\n telInputComponents.forEach(component => {\r\n const element = component as HTMLElement;\r\n element.setAttribute('data-theme', theme);\r\n });\r\n }\r\n\r\n /** Resolve theme to light or dark */\r\n private resolveTheme(theme: Theme): 'light' | 'dark' {\r\n if (theme === 'auto') {\r\n return this.detectSystemTheme();\r\n }\r\n return theme;\r\n }\r\n\r\n /** Detect system theme preference */\r\n private detectSystemTheme(): 'light' | 'dark' {\r\n if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {\r\n return 'dark';\r\n }\r\n return 'light';\r\n }\r\n\r\n /** Setup listener for system theme changes */\r\n private setupSystemThemeListener(): void {\r\n if (window.matchMedia) {\r\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\r\n mediaQuery.addEventListener('change', () => {\r\n if (this.getTheme() === 'auto') {\r\n this.applyTheme('auto');\r\n }\r\n });\r\n }\r\n }\r\n\r\n /** Update CSS custom properties for theme */\r\n private updateCSSVariables(theme: 'light' | 'dark'): void {\r\n const root = document.documentElement;\r\n \r\n if (theme === 'dark') {\r\n root.style.setProperty('--tel-bg', '#0b0f17');\r\n root.style.setProperty('--tel-fg', '#e5e7eb');\r\n root.style.setProperty('--tel-border', '#334155');\r\n root.style.setProperty('--tel-border-hover', '#475569');\r\n root.style.setProperty('--tel-ring', '#60a5fa');\r\n root.style.setProperty('--tel-placeholder', '#94a3b8');\r\n root.style.setProperty('--tel-error', '#f87171');\r\n root.style.setProperty('--tel-success', '#34d399');\r\n root.style.setProperty('--tel-warning', '#fbbf24');\r\n root.style.setProperty('--tel-dd-bg', '#0f1521');\r\n root.style.setProperty('--tel-dd-border', '#324056');\r\n root.style.setProperty('--tel-dd-shadow', '0 24px 60px rgba(0, 0, 0, .4)');\r\n root.style.setProperty('--tel-dd-search-bg', 'rgba(148, 163, 184, .12)');\r\n } else {\r\n root.style.setProperty('--tel-bg', '#fff');\r\n root.style.setProperty('--tel-fg', '#0f172a');\r\n root.style.setProperty('--tel-border', '#c0c0c0');\r\n root.style.setProperty('--tel-border-hover', '#9aa0a6');\r\n root.style.setProperty('--tel-ring', '#2563eb');\r\n root.style.setProperty('--tel-placeholder', '#9ca3af');\r\n root.style.setProperty('--tel-error', '#ef4444');\r\n root.style.setProperty('--tel-success', '#10b981');\r\n root.style.setProperty('--tel-warning', '#f59e0b');\r\n root.style.setProperty('--tel-dd-bg', '#fff');\r\n root.style.setProperty('--tel-dd-border', '#c0c0c0');\r\n root.style.setProperty('--tel-dd-shadow', '0 24px 60px rgba(0, 0, 0, .18)');\r\n root.style.setProperty('--tel-dd-search-bg', 'rgba(148, 163, 184, .08)');\r\n }\r\n }\r\n\r\n /** Save theme preference to localStorage */\r\n private saveThemePreference(theme: Theme): void {\r\n try {\r\n localStorage.setItem('ngxsmk-tel-input-theme', theme);\r\n } catch (error) {\r\n console.warn('Failed to save theme preference:', error);\r\n }\r\n }\r\n\r\n /** Get saved theme preference from localStorage */\r\n private getSavedThemePreference(): Theme | null {\r\n try {\r\n const saved = localStorage.getItem('ngxsmk-tel-input-theme');\r\n return saved as Theme | null;\r\n } catch (error) {\r\n console.warn('Failed to load theme preference:', error);\r\n return null;\r\n }\r\n }\r\n\r\n /** Check if dark theme is active */\r\n isDarkTheme(): boolean {\r\n return this.getCurrentTheme() === 'dark';\r\n }\r\n\r\n /** Check if light theme is active */\r\n isLightTheme(): boolean {\r\n return this.getCurrentTheme() === 'light';\r\n }\r\n\r\n /** Check if auto theme is set */\r\n isAutoTheme(): boolean {\r\n return this.getTheme() === 'auto';\r\n }\r\n}\r\n","import { CountryCode } from 'libphonenumber-js';\r\n\r\n/**\r\n * Utility functions for phone number input optimization\r\n */\r\nexport class PhoneInputUtils {\r\n /**\r\n * Convert any string to digits only (NSN basis)\r\n */\r\n static toNSN(v: string | null | undefined): string {\r\n return (v ?? '').replace(/\\D/g, '');\r\n }\r\n\r\n /**\r\n * Strip exactly one leading trunk '0' from national input\r\n */\r\n static stripLeadingZero(nsn: string): string {\r\n return nsn.replace(/^0/, '');\r\n }\r\n\r\n /**\r\n * Create cache key for phone number operations\r\n */\r\n static createCacheKey(input: string, iso2: CountryCode): string {\r\n return `${input || ''}|${iso2}`;\r\n }\r\n\r\n /**\r\n * Debounce function for performance optimization\r\n */\r\n static debounce<T extends (...args: any[]) => any>(\r\n func: T,\r\n wait: number\r\n ): (...args: Parameters<T>) => void {\r\n let timeout: ReturnType<typeof setTimeout> | null = null;\r\n \r\n return (...args: Parameters<T>) => {\r\n if (timeout) clearTimeout(timeout);\r\n timeout = setTimeout(() => func.apply(this, args), wait);\r\n };\r\n }\r\n\r\n /**\r\n * Throttle function for performance optimization\r\n */\r\n static throttle<T extends (...args: any[]) => any>(\r\n func: T,\r\n limit: number\r\n ): (...args: Parameters<T>) => void {\r\n let inThrottle: boolean;\r\n \r\n return (...args: Parameters<T>) => {\r\n if (!inThrottle) {\r\n func.apply(this, args);\r\n inThrottle = true;\r\n setTimeout(() => inThrottle = false, limit);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Check if a string contains only digits\r\n */\r\n static isDigitsOnly(str: string): boolean {\r\n return /^\\d+$/.test(str);\r\n }\r\n\r\n /**\r\n * Safely get element value with fallback\r\n */\r\n static getElementValue(element: HTMLInputElement | null): string {\r\n return element?.value?.trim() || '';\r\n }\r\n\r\n /**\r\n * Check if element is in viewport for performance optimization\r\n */\r\n static isInViewport(element: HTMLElement): boolean {\r\n const rect = element.getBoundingClientRect();\r\n return (\r\n rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\r\n rect.right <= (window.innerWidth || document.documentElement.clientWidth)\r\n );\r\n }\r\n\r\n /**\r\n * Create optimized event listener with cleanup\r\n */\r\n static createEventListener(\r\n element: HTMLElement,\r\n event: string,\r\n handler: EventListener,\r\n options?: AddEventListenerOptions\r\n ): () => void {\r\n element.addEventListener(event, handler, options);\r\n return () => element.removeEventListener(event, handler, options);\r\n }\r\n\r\n /**\r\n * Batch DOM operations for better performance\r\n */\r\n static batchDOMOperations(operations: (() => void)[]): void {\r\n requestAnimationFrame(() => {\r\n operations.forEach(op => op());\r\n });\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NgxsmkTelInputService"],"mappings":";;;;;;;MAIa,qBAAqB,CAAA;AADlC,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,GAAG,EAA8E;AAClG,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,GAAG,EAAmB;QACnC,IAAgB,CAAA,gBAAA,GAAG,IAAI;AAsIzC;IApIC,KAAK,CAAC,KAAa,EAAE,IAAiB,EAAA;QACpC,MAAM,QAAQ,GAAG,CAAG,EAAA,KAAK,IAAI,EAAE,CAAA,CAAA,EAAI,IAAI,CAAA,CAAE;QAEzC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;YACjC,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAE;;QAGvC,MAAM,KAAK,GAAG,0BAA0B,CAAC,KAAK,IAAI,EAAE,EAAE,IAAI,CAAC;QAC3D,IAAI,CAAC,KAAK,EAAE;AACV,YAAA,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE;YAC7D,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC;AACrD,YAAA,OAAO,MAAM;;AAGf,QAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,EAAE;AAC/B,QAAA,MAAM,MAAM,GAAG;YACb,IAAI,EAAE,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI;AACnC,YAAA,QAAQ,EAAE,KAAK,CAAC,cAAc,EAAE;YAChC;SACD;QAED,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC;AACrD,QAAA,OAAO,MAAM;;IAGf,OA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G;IACH,OAAO,eAAe,CAAC,OAAgC,EAAA;QACrD,OAAO,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE;;AAGrC;;AAEG;IACH,OAAO,YAAY,CAAC,OAAoB,EAAA;AACtC,QAAA,MAAM,IAAI,GAAG,OAAO,CAAC,qBAAqB,EAAE;AAC5C,QAAA,QACE,IAAI,CAAC,GAAG,IAAI,CAAC;YACb,IAAI,CAAC,IAAI,IAAI,CAAC;AACd,YAAA,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC;AAC5E,YAAA,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC;;AAI7E;;AAEG;IACH,OAAO,mBAAmB,CACxB,OAAoB,EACpB,KAAa,EACb,OAAsB,EACtB,OAAiC,EAAA;QAEjC,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;AACjD,QAAA,OAAO,MAAM,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;;AAGnE;;AAEG;IACH,OAAO,kBAAkB,CAAC,UAA0B,EAAA;QAClD,qBAAqB,CAAC,MAAK;YACzB,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC;AAChC,SAAC,CAAC;;AAEL;;AC5GD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ngxsmk-tel-input.component.d.ts","sourceRoot":"","sources":["../../../projects/ngxsmk-tel-input/src/lib/ngxsmk-tel-input.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,UAAU,EACV,YAAY,EAIZ,MAAM,EACN,SAAS,EACT,SAAS,EAGT,aAAa,EAGd,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,eAAe,EACf,oBAAoB,EAGpB,gBAAgB,EAChB,SAA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,aAAa;IAuBrB,OAAO,CAAC,gBAAgB;IA6FxB,MAAM;IAmBN,OAAO;IAUP,OAAO,CAAC,WAAW;IAwBnB,qDAAqD;IACrD,OAAO,CAAC,KAAK;IAIb,+DAA+D;IAC/D,OAAO,CAAC,gBAAgB;IAIxB,sDAAsD;IACtD,OAAO,CAAC,eAAe;IAIvB,oEAAoE;IACpE,OAAO,CAAC,WAAW;IAOnB,mEAAmE;IACnE,OAAO,CAAC,SAAS;IASjB,+CAA+C;IAC/C,OAAO,CAAC,YAAY;IAKpB,UAAU,IAAI,MAAM;IAIpB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,aAAa;IAMrB,IAAI,SAAS,IAAI,OAAO,CAKvB;IAED,OAAO,CAAC,gBAAgB;IAIxB,uDAAuD;IACvD,OAAO,CAAC,eAAe;IAYvB,qEAAqE;IACrE,OAAO,CAAC,cAAc;IAWtB,uDAAuD;IACvD,OAAO,CAAC,qBAAqB;IAO7B,0EAA0E;IAC1E,OAAO,CAAC,mBAAmB;IA0B3B,mCAAmC;IACnC,OAAO,CAAC,UAAU;IAYlB,+CAA+C;IAC/C,OAAO,CAAC,oBAAoB;IAU5B,wBAAwB;IACxB,eAAe,IAAI,OAAO,GAAG,MAAM;IAInC,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI;IAKvC,6CAA6C;IAC7C,OAAO,CAAC,mBAAmB;IAuC3B,mEAAmE;IACnE,OAAO,CAAC,0BAA0B;yCAzrBvB,uBAAuB;2CAAvB,uBAAuB;CAytBnC"}
@@ -12,6 +12,20 @@ export declare class NgxsmkTelInputService {
12
12
  isValid(input: string, iso2: CountryCode): boolean;
13
13
  private setCacheValue;
14
14
  clearCache(): void;
15
+ /**
16
+ * Check if the input appears to be an international number with an invalid country code
17
+ * This helps detect cases like "1123456789" where "11" is not a valid country code
18
+ */
19
+ private isInvalidInternationalNumber;
20
+ /**
21
+ * Enhanced parse method that detects invalid international numbers
22
+ */
23
+ parseWithInvalidDetection(input: string, iso2: CountryCode): {
24
+ e164: string | null;
25
+ national: string | null;
26
+ isValid: boolean;
27
+ isInvalidInternational: boolean;
28
+ };
15
29
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxsmkTelInputService, never>;
16
30
  static ɵprov: i0.ɵɵInjectableDeclaration<NgxsmkTelInputService>;
17
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ngxsmk-tel-input.service.d.ts","sourceRoot":"","sources":["../../../projects/ngxsmk-tel-input/src/lib/ngxsmk-tel-input.service.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;;AAEjF,qBACa,qBAAqB;IAChC,OAAO,CAAC,UAAU,CAAyF;IAC3G,OAAO,CAAC,eAAe,CAA8B;IACrD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAQ;IAEzC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;IAyB3G,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO;IAclD,OAAO,CAAC,aAAa;IAQrB,UAAU,IAAI,IAAI;yCApDP,qBAAqB;6CAArB,qBAAqB;CAwDjC"}
1
+ {"version":3,"file":"ngxsmk-tel-input.service.d.ts","sourceRoot":"","sources":["../../../projects/ngxsmk-tel-input/src/lib/ngxsmk-tel-input.service.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,WAAW,EAAyB,MAAM,mBAAmB,CAAC;;AAExG,qBACa,qBAAqB;IAChC,OAAO,CAAC,UAAU,CAAyF;IAC3G,OAAO,CAAC,eAAe,CAA8B;IACrD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAQ;IAEzC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;IAyB3G,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO;IAclD,OAAO,CAAC,aAAa;IAQrB,UAAU,IAAI,IAAI;IAKlB;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAqCpC;;OAEG;IACH,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG;QAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,sBAAsB,EAAE,OAAO,CAAA;KAAE;yCArGrJ,qBAAqB;6CAArB,qBAAqB;CAyIjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngxsmk-tel-input",
3
- "version": "1.6.6",
3
+ "version": "1.6.8",
4
4
  "description": "Angular international telephone input (intl-tel-input UI + libphonenumber-js validation). ControlValueAccessor. SSR-safe.",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,