@intl-tel-input/angular 29.2.3 → 29.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Angular component for intl-tel-input
2
2
 
3
- For entering, formatting, and validating international telephone numbers.
3
+ For entering, formatting, and validating international telephone numbers. Requires Angular 17 or later.
4
4
 
5
5
  [Explore docs »](https://intl-tel-input.com/docs/angular-component)
6
6
 
@@ -14,6 +14,8 @@ For entering, formatting, and validating international telephone numbers.
14
14
 
15
15
  Check out the [website](https://intl-tel-input.com), where you can find [a full set of docs](https://intl-tel-input.com/docs/angular-component), a [live playground](https://intl-tel-input.com/playground/) where you can try out all of the options, as well as plenty of [examples](https://intl-tel-input.com/examples/angular-component/validation) of different setups.
16
16
 
17
+ Browser support: same as the core library — see the [FAQ](https://intl-tel-input.com/docs/faq#which-browsers-are-supported) for minimum versions.
18
+
17
19
  ## Running the demos locally
18
20
 
19
21
  1. Initialise the submodules: `git submodule update --init --recursive`
@@ -33,6 +33,7 @@ declare class IntlTelInput implements AfterViewInit, OnDestroy, OnChanges, Contr
33
33
  excludeCountries?: AllOptions["excludeCountries"];
34
34
  matchDropdownWidth?: AllOptions["matchDropdownWidth"];
35
35
  formatAsYouType?: AllOptions["formatAsYouType"];
36
+ fullscreenParent?: AllOptions["fullscreenParent"];
36
37
  hiddenInputs?: AllOptions["hiddenInputs"];
37
38
  uiTranslations?: AllOptions["uiTranslations"];
38
39
  initialCountry?: AllOptions["initialCountry"];
@@ -107,6 +108,6 @@ declare class IntlTelInput implements AfterViewInit, OnDestroy, OnChanges, Contr
107
108
  validate(_control: AbstractControl): ValidationErrors | null;
108
109
  registerOnValidatorChange(fn: () => void): void;
109
110
  static ɵfac: i0.ɵɵFactoryDeclaration<IntlTelInput, never>;
110
- static ɵcmp: i0.ɵɵComponentDeclaration<IntlTelInput, "intl-tel-input", never, { "initialValue": { "alias": "initialValue"; "required": false; }; "usePreciseValidation": { "alias": "usePreciseValidation"; "required": false; }; "inputAttributes": { "alias": "inputAttributes"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "countrySelectorMode": { "alias": "countrySelectorMode"; "required": false; }; "allowedNumberTypes": { "alias": "allowedNumberTypes"; "required": false; }; "allowNumberExtensions": { "alias": "allowNumberExtensions"; "required": false; }; "allowPhonewords": { "alias": "allowPhonewords"; "required": false; }; "classNames": { "alias": "classNames"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "countryNameLocale": { "alias": "countryNameLocale"; "required": false; }; "countryNameOverrides": { "alias": "countryNameOverrides"; "required": false; }; "countryOrder": { "alias": "countryOrder"; "required": false; }; "countrySearch": { "alias": "countrySearch"; "required": false; }; "customPlaceholder": { "alias": "customPlaceholder"; "required": false; }; "dropdownAlwaysOpen": { "alias": "dropdownAlwaysOpen"; "required": false; }; "dropdownParent": { "alias": "dropdownParent"; "required": false; }; "excludeCountries": { "alias": "excludeCountries"; "required": false; }; "matchDropdownWidth": { "alias": "matchDropdownWidth"; "required": false; }; "formatAsYouType": { "alias": "formatAsYouType"; "required": false; }; "hiddenInputs": { "alias": "hiddenInputs"; "required": false; }; "uiTranslations": { "alias": "uiTranslations"; "required": false; }; "initialCountry": { "alias": "initialCountry"; "required": false; }; "initialCountryLookup": { "alias": "initialCountryLookup"; "required": false; }; "loadUtils": { "alias": "loadUtils"; "required": false; }; "numberDisplayFormat": { "alias": "numberDisplayFormat"; "required": false; }; "onlyCountries": { "alias": "onlyCountries"; "required": false; }; "placeholderNumberPolicy": { "alias": "placeholderNumberPolicy"; "required": false; }; "placeholderNumberType": { "alias": "placeholderNumberType"; "required": false; }; "searchInputClass": { "alias": "searchInputClass"; "required": false; }; "separateDialCode": { "alias": "separateDialCode"; "required": false; }; "showFlags": { "alias": "showFlags"; "required": false; }; "strictMode": { "alias": "strictMode"; "required": false; }; "strictRejectAnimation": { "alias": "strictRejectAnimation"; "required": false; }; }, { "numberChange": "numberChange"; "countryChange": "countryChange"; "validityChange": "validityChange"; "errorCodeChange": "errorCodeChange"; "openCountrySelector": "openCountrySelector"; "closeCountrySelector": "closeCountrySelector"; "strictReject": "strictReject"; "blur": "blur"; "focus": "focus"; "keydown": "keydown"; "keyup": "keyup"; "paste": "paste"; "click": "click"; }, never, never, true, never>;
111
+ static ɵcmp: i0.ɵɵComponentDeclaration<IntlTelInput, "intl-tel-input", never, { "initialValue": { "alias": "initialValue"; "required": false; }; "usePreciseValidation": { "alias": "usePreciseValidation"; "required": false; }; "inputAttributes": { "alias": "inputAttributes"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "countrySelectorMode": { "alias": "countrySelectorMode"; "required": false; }; "allowedNumberTypes": { "alias": "allowedNumberTypes"; "required": false; }; "allowNumberExtensions": { "alias": "allowNumberExtensions"; "required": false; }; "allowPhonewords": { "alias": "allowPhonewords"; "required": false; }; "classNames": { "alias": "classNames"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "countryNameLocale": { "alias": "countryNameLocale"; "required": false; }; "countryNameOverrides": { "alias": "countryNameOverrides"; "required": false; }; "countryOrder": { "alias": "countryOrder"; "required": false; }; "countrySearch": { "alias": "countrySearch"; "required": false; }; "customPlaceholder": { "alias": "customPlaceholder"; "required": false; }; "dropdownAlwaysOpen": { "alias": "dropdownAlwaysOpen"; "required": false; }; "dropdownParent": { "alias": "dropdownParent"; "required": false; }; "excludeCountries": { "alias": "excludeCountries"; "required": false; }; "matchDropdownWidth": { "alias": "matchDropdownWidth"; "required": false; }; "formatAsYouType": { "alias": "formatAsYouType"; "required": false; }; "fullscreenParent": { "alias": "fullscreenParent"; "required": false; }; "hiddenInputs": { "alias": "hiddenInputs"; "required": false; }; "uiTranslations": { "alias": "uiTranslations"; "required": false; }; "initialCountry": { "alias": "initialCountry"; "required": false; }; "initialCountryLookup": { "alias": "initialCountryLookup"; "required": false; }; "loadUtils": { "alias": "loadUtils"; "required": false; }; "numberDisplayFormat": { "alias": "numberDisplayFormat"; "required": false; }; "onlyCountries": { "alias": "onlyCountries"; "required": false; }; "placeholderNumberPolicy": { "alias": "placeholderNumberPolicy"; "required": false; }; "placeholderNumberType": { "alias": "placeholderNumberType"; "required": false; }; "searchInputClass": { "alias": "searchInputClass"; "required": false; }; "separateDialCode": { "alias": "separateDialCode"; "required": false; }; "showFlags": { "alias": "showFlags"; "required": false; }; "strictMode": { "alias": "strictMode"; "required": false; }; "strictRejectAnimation": { "alias": "strictRejectAnimation"; "required": false; }; }, { "numberChange": "numberChange"; "countryChange": "countryChange"; "validityChange": "validityChange"; "errorCodeChange": "errorCodeChange"; "openCountrySelector": "openCountrySelector"; "closeCountrySelector": "closeCountrySelector"; "strictReject": "strictReject"; "blur": "blur"; "focus": "focus"; "keydown": "keydown"; "keyup": "keyup"; "paste": "paste"; "click": "click"; }, never, never, true, never>;
111
112
  }
112
113
  export default IntlTelInput;
@@ -1977,7 +1977,7 @@ var defaults = {
1977
1977
  customPlaceholder: null,
1978
1978
  //* Always show the dropdown
1979
1979
  dropdownAlwaysOpen: false,
1980
- //* Optional DOM element to append the dropdown to (used to escape ancestors with overflow:hidden, or to mount in a custom container). Only consulted in dropdown rendering; ignored when the country selector renders as a fullscreen popup.
1980
+ //* Optional DOM element to append the dropdown to (used to escape ancestors with overflow:hidden, or to mount in a custom container). Only consulted in dropdown rendering; ignored when the country selector renders as a fullscreen popup (see fullscreenParent).
1981
1981
  dropdownParent: null,
1982
1982
  //* Don't display these countries.
1983
1983
  excludeCountries: null,
@@ -1985,6 +1985,8 @@ var defaults = {
1985
1985
  matchDropdownWidth: true,
1986
1986
  //* Format the number as the user types
1987
1987
  formatAsYouType: true,
1988
+ //* Optional DOM element to append the fullscreen popup to, instead of document.body (e.g. a modal <dialog>, where a body-mounted popup would be unreachable). Only consulted in fullscreen rendering (see dropdownParent for the dropdown). Null means document.body, which is resolved on open rather than here, as document may not exist yet (e.g. SSR).
1989
+ fullscreenParent: null,
1988
1990
  //* Inject hidden inputs with the names returned from this function, and on submit, populate them with the full number and selected country iso2.
1989
1991
  hiddenInputs: null,
1990
1992
  //* Translations for the core library UI strings e.g. search input placeholder, country names.
@@ -2168,8 +2170,9 @@ var validateOptions = (customOptions) => {
2168
2170
  validatedOptions[key] = value;
2169
2171
  break;
2170
2172
  case "dropdownParent":
2173
+ case "fullscreenParent":
2171
2174
  if (value !== null && !isElLike(value)) {
2172
- warnOption("dropdownParent", "an HTMLElement or null", value);
2175
+ warnOption(key, "an HTMLElement or null", value);
2173
2176
  break;
2174
2177
  }
2175
2178
  validatedOptions[key] = value;
@@ -2733,6 +2736,9 @@ var UI = class {
2733
2736
  },
2734
2737
  this.#countrySelectorEl
2735
2738
  );
2739
+ if (!countrySearch) {
2740
+ this.#countryListEl.setAttribute("tabindex", "0");
2741
+ }
2736
2742
  this.#appendListItems();
2737
2743
  if (countrySearch) {
2738
2744
  this.#updateSearchResultsA11yText();
@@ -2753,11 +2759,12 @@ var UI = class {
2753
2759
  this.#countryContainerEl.appendChild(this.#countrySelectorEl);
2754
2760
  }
2755
2761
  }
2756
- //* Resolve the DOM element to attach the country selector to. Fullscreen always uses document.body; dropdown uses the consumer-supplied dropdownParent (if any); otherwise the country selector renders inline within the input wrapper (no detached element).
2762
+ //* Resolve the DOM element to attach the country selector to. Fullscreen is always detached: it uses the consumer-supplied fullscreenParent, falling back to document.body; dropdown uses the consumer-supplied dropdownParent (if any); otherwise the country selector renders inline within the input wrapper (no detached element).
2763
+ //* NOTE: these are deliberately two separate options. For the dropdown, setting a parent switches it from inline to detached rendering (pos:fixed, positioned against the input), whereas the fullscreen popup is detached regardless, so its parent only relocates it. Sharing one option would force a detached dropdown on anyone who only needs to move the fullscreen popup e.g. into a modal <dialog> (issue #2199).
2757
2764
  #getDetachedParent() {
2758
- const { countrySelectorMode, dropdownParent } = this.#options;
2765
+ const { countrySelectorMode, dropdownParent, fullscreenParent } = this.#options;
2759
2766
  if (countrySelectorMode === COUNTRY_SELECTOR_MODE.FULLSCREEN) {
2760
- return document.body;
2767
+ return fullscreenParent ?? document.body;
2761
2768
  }
2762
2769
  if (countrySelectorMode === COUNTRY_SELECTOR_MODE.DROPDOWN) {
2763
2770
  return dropdownParent;
@@ -2883,7 +2890,6 @@ var UI = class {
2883
2890
  const listItem = createEl("li", {
2884
2891
  id: `iti-${this.#id}__item-${c.iso2}`,
2885
2892
  class: liClass,
2886
- tabindex: "-1",
2887
2893
  role: "option",
2888
2894
  [ARIA.SELECTED]: "false"
2889
2895
  });
@@ -3075,18 +3081,20 @@ var UI = class {
3075
3081
  container.scrollTop = offsetTop - containerRect.height + elementRect.height;
3076
3082
  }
3077
3083
  }
3084
+ //* The element that holds focus while the country selector is open: the search input, or (when countrySearch is disabled) the country list itself.
3085
+ #getOpenFocusEl() {
3086
+ return this.#options.countrySearch ? this.#searchInputEl : this.#countryListEl;
3087
+ }
3078
3088
  //* Remove highlighting from the previous list item and highlight the new one.
3079
3089
  #highlightListItem(listItem, doScroll = true) {
3080
3090
  this.#highlightedListItemEl?.classList.remove(CLASSES.HIGHLIGHT);
3081
3091
  if (listItem) {
3082
3092
  listItem.classList.add(CLASSES.HIGHLIGHT);
3083
- if (this.#options.countrySearch) {
3084
- const activeDescendant = listItem.getAttribute("id") || "";
3085
- this.#searchInputEl.setAttribute(
3086
- ARIA.ACTIVE_DESCENDANT,
3087
- activeDescendant
3088
- );
3089
- }
3093
+ const activeDescendant = listItem.getAttribute("id") || "";
3094
+ this.#getOpenFocusEl().setAttribute(
3095
+ ARIA.ACTIVE_DESCENDANT,
3096
+ activeDescendant
3097
+ );
3090
3098
  if (doScroll) {
3091
3099
  this.#scrollCountryListToItem(listItem);
3092
3100
  }
@@ -3165,7 +3173,7 @@ var UI = class {
3165
3173
  //* Open the country selector: create a fresh AbortController, do the DOM work, and wire up all
3166
3174
  //* open-state listeners (which invoke the caller's onSelect / onClose callbacks).
3167
3175
  openCountrySelector(onSelect, onClose) {
3168
- const { countrySearch, dropdownAlwaysOpen } = this.#options;
3176
+ const { dropdownAlwaysOpen } = this.#options;
3169
3177
  this.#countrySelectorAbortController = new AbortController();
3170
3178
  if (this.#options.countrySelectorMode !== COUNTRY_SELECTOR_MODE.FULLSCREEN) {
3171
3179
  this.#ensureInlineDropdownSizeMeasured();
@@ -3188,10 +3196,11 @@ var UI = class {
3188
3196
  if (itemToHighlight) {
3189
3197
  this.#highlightListItem(itemToHighlight);
3190
3198
  }
3191
- if (countrySearch && !dropdownAlwaysOpen) {
3192
- this.#searchInputEl.focus();
3199
+ if (!dropdownAlwaysOpen) {
3200
+ this.#getOpenFocusEl().focus();
3193
3201
  }
3194
3202
  if (this.#options.countrySelectorMode === COUNTRY_SELECTOR_MODE.FULLSCREEN && this.#detachedCountrySelectorEl && window.visualViewport) {
3203
+ this.#adjustFullscreenPopupToViewport();
3195
3204
  window.visualViewport.addEventListener(
3196
3205
  "resize",
3197
3206
  () => {
@@ -3308,6 +3317,20 @@ var UI = class {
3308
3317
  };
3309
3318
  this.#selectedCountryEl?.addEventListener("keydown", handleKeydown, { signal });
3310
3319
  this.#countrySelectorEl?.addEventListener("keydown", handleKeydown, { signal });
3320
+ if (this.#detachedCountrySelectorEl) {
3321
+ this.#countrySelectorEl?.addEventListener(
3322
+ "keydown",
3323
+ (e) => {
3324
+ if (e.key === KEYS.TAB) {
3325
+ e.preventDefault();
3326
+ onEscape();
3327
+ const focusEl = e.shiftKey ? this.#selectedCountryEl : this.telInputEl;
3328
+ focusEl.focus();
3329
+ }
3330
+ },
3331
+ { signal }
3332
+ );
3333
+ }
3311
3334
  }
3312
3335
  //* Wire up country search input listener: typing filters the list, the clear button resets it.
3313
3336
  #bindSearchInputListener(signal) {
@@ -3405,8 +3428,8 @@ var UI = class {
3405
3428
  this.#countrySelectorAbortController = null;
3406
3429
  this.#countrySelectorEl.classList.add(CLASSES.HIDE);
3407
3430
  this.#selectedCountryEl.setAttribute(ARIA.EXPANDED, "false");
3431
+ this.#getOpenFocusEl().removeAttribute(ARIA.ACTIVE_DESCENDANT);
3408
3432
  if (countrySearch) {
3409
- this.#searchInputEl.removeAttribute(ARIA.ACTIVE_DESCENDANT);
3410
3433
  this.#searchInputEl.value = "";
3411
3434
  this.#applySearchFilter();
3412
3435
  if (this.#highlightedListItemEl) {
@@ -3419,6 +3442,7 @@ var UI = class {
3419
3442
  this.#detachedCountrySelectorEl.remove();
3420
3443
  this.#detachedCountrySelectorEl.style.top = "";
3421
3444
  this.#detachedCountrySelectorEl.style.bottom = "";
3445
+ this.#detachedCountrySelectorEl.style.height = "";
3422
3446
  this.#detachedCountrySelectorEl.style.paddingLeft = "";
3423
3447
  this.#detachedCountrySelectorEl.style.paddingRight = "";
3424
3448
  } else {
@@ -3484,8 +3508,7 @@ var UI = class {
3484
3508
  if (!vv || !this.#detachedCountrySelectorEl) {
3485
3509
  return;
3486
3510
  }
3487
- const virtualKeyboardHeight = window.innerHeight - vv.height;
3488
- this.#detachedCountrySelectorEl.style.bottom = `${virtualKeyboardHeight}px`;
3511
+ this.#detachedCountrySelectorEl.style.height = `${vv.height}px`;
3489
3512
  }
3490
3513
  // UI: Whether the country selector is currently open (visible).
3491
3514
  isCountrySelectorOpen() {
@@ -4955,7 +4978,7 @@ var intlTelInput = Object.assign(
4955
4978
  attachUtils,
4956
4979
  startedLoadingUtils: false,
4957
4980
  startedLoadingAutoCountry: false,
4958
- version: "29.2.3",
4981
+ version: "29.4.0",
4959
4982
  NUMBER_FORMAT,
4960
4983
  NUMBER_TYPE,
4961
4984
  VALIDATION_ERROR,
@@ -4969,7 +4992,6 @@ var intlTelInput_default = intlTelInput;
4969
4992
  import { Component, Input, ViewChild, ElementRef, Output, EventEmitter, forwardRef } from "@angular/core";
4970
4993
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from "@angular/forms";
4971
4994
  import * as i0 from "@angular/core";
4972
- var _c0 = ["inputRef"];
4973
4995
  var warnInputAttr = (prop) => {
4974
4996
  console.warn(`intl-tel-input: ignoring inputAttributes.${prop} - see docs for more info.`);
4975
4997
  };
@@ -4998,6 +5020,7 @@ var IntlTelInput = class _IntlTelInput {
4998
5020
  excludeCountries;
4999
5021
  matchDropdownWidth;
5000
5022
  formatAsYouType;
5023
+ fullscreenParent;
5001
5024
  hiddenInputs;
5002
5025
  uiTranslations;
5003
5026
  initialCountry;
@@ -5070,6 +5093,7 @@ var IntlTelInput = class _IntlTelInput {
5070
5093
  if (this.readonly) {
5071
5094
  this.iti.setReadonly(this.readonly);
5072
5095
  }
5096
+ this.lastEmittedCountry = this.iti.getSelectedCountry()?.iso2 ?? "";
5073
5097
  this.iti.promise.then(() => {
5074
5098
  if (!this.iti?.isActive()) {
5075
5099
  return;
@@ -5106,6 +5130,7 @@ var IntlTelInput = class _IntlTelInput {
5106
5130
  excludeCountries: this.excludeCountries,
5107
5131
  matchDropdownWidth: this.matchDropdownWidth,
5108
5132
  formatAsYouType: this.formatAsYouType,
5133
+ fullscreenParent: this.fullscreenParent,
5109
5134
  hiddenInputs: this.hiddenInputs,
5110
5135
  uiTranslations: this.uiTranslations,
5111
5136
  initialCountry: this.initialCountry,
@@ -5288,18 +5313,8 @@ var IntlTelInput = class _IntlTelInput {
5288
5313
  registerOnValidatorChange(fn) {
5289
5314
  this.onValidatorChange = fn;
5290
5315
  }
5291
- static \u0275fac = function IntlTelInput_Factory(__ngFactoryType__) {
5292
- return new (__ngFactoryType__ || _IntlTelInput)();
5293
- };
5294
- static \u0275cmp = /* @__PURE__ */ i0.\u0275\u0275defineComponent({ type: _IntlTelInput, selectors: [["intl-tel-input"]], viewQuery: function IntlTelInput_Query(rf, ctx) {
5295
- if (rf & 1) {
5296
- i0.\u0275\u0275viewQuery(_c0, 7);
5297
- }
5298
- if (rf & 2) {
5299
- let _t;
5300
- i0.\u0275\u0275queryRefresh(_t = i0.\u0275\u0275loadQuery()) && (ctx.inputRef = _t.first);
5301
- }
5302
- }, inputs: { initialValue: "initialValue", usePreciseValidation: "usePreciseValidation", inputAttributes: "inputAttributes", disabled: "disabled", readonly: "readonly", countrySelectorMode: "countrySelectorMode", allowedNumberTypes: "allowedNumberTypes", allowNumberExtensions: "allowNumberExtensions", allowPhonewords: "allowPhonewords", classNames: "classNames", containerClass: "containerClass", countryNameLocale: "countryNameLocale", countryNameOverrides: "countryNameOverrides", countryOrder: "countryOrder", countrySearch: "countrySearch", customPlaceholder: "customPlaceholder", dropdownAlwaysOpen: "dropdownAlwaysOpen", dropdownParent: "dropdownParent", excludeCountries: "excludeCountries", matchDropdownWidth: "matchDropdownWidth", formatAsYouType: "formatAsYouType", hiddenInputs: "hiddenInputs", uiTranslations: "uiTranslations", initialCountry: "initialCountry", initialCountryLookup: "initialCountryLookup", loadUtils: "loadUtils", numberDisplayFormat: "numberDisplayFormat", onlyCountries: "onlyCountries", placeholderNumberPolicy: "placeholderNumberPolicy", placeholderNumberType: "placeholderNumberType", searchInputClass: "searchInputClass", separateDialCode: "separateDialCode", showFlags: "showFlags", strictMode: "strictMode", strictRejectAnimation: "strictRejectAnimation" }, outputs: { numberChange: "numberChange", countryChange: "countryChange", validityChange: "validityChange", errorCodeChange: "errorCodeChange", openCountrySelector: "openCountrySelector", closeCountrySelector: "closeCountrySelector", strictReject: "strictReject", blur: "blur", focus: "focus", keydown: "keydown", keyup: "keyup", paste: "paste", click: "click" }, features: [i0.\u0275\u0275ProvidersFeature([
5316
+ static \u0275fac = i0.\u0275\u0275ngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: _IntlTelInput, deps: [], target: i0.\u0275\u0275FactoryTarget.Component });
5317
+ static \u0275cmp = i0.\u0275\u0275ngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: _IntlTelInput, isStandalone: true, selector: "intl-tel-input", inputs: { initialValue: "initialValue", usePreciseValidation: "usePreciseValidation", inputAttributes: "inputAttributes", disabled: "disabled", readonly: "readonly", countrySelectorMode: "countrySelectorMode", allowedNumberTypes: "allowedNumberTypes", allowNumberExtensions: "allowNumberExtensions", allowPhonewords: "allowPhonewords", classNames: "classNames", containerClass: "containerClass", countryNameLocale: "countryNameLocale", countryNameOverrides: "countryNameOverrides", countryOrder: "countryOrder", countrySearch: "countrySearch", customPlaceholder: "customPlaceholder", dropdownAlwaysOpen: "dropdownAlwaysOpen", dropdownParent: "dropdownParent", excludeCountries: "excludeCountries", matchDropdownWidth: "matchDropdownWidth", formatAsYouType: "formatAsYouType", fullscreenParent: "fullscreenParent", hiddenInputs: "hiddenInputs", uiTranslations: "uiTranslations", initialCountry: "initialCountry", initialCountryLookup: "initialCountryLookup", loadUtils: "loadUtils", numberDisplayFormat: "numberDisplayFormat", onlyCountries: "onlyCountries", placeholderNumberPolicy: "placeholderNumberPolicy", placeholderNumberType: "placeholderNumberType", searchInputClass: "searchInputClass", separateDialCode: "separateDialCode", showFlags: "showFlags", strictMode: "strictMode", strictRejectAnimation: "strictRejectAnimation" }, outputs: { numberChange: "numberChange", countryChange: "countryChange", validityChange: "validityChange", errorCodeChange: "errorCodeChange", openCountrySelector: "openCountrySelector", closeCountrySelector: "closeCountrySelector", strictReject: "strictReject", blur: "blur", focus: "focus", keydown: "keydown", keyup: "keyup", paste: "paste", click: "click" }, providers: [
5303
5318
  {
5304
5319
  provide: NG_VALUE_ACCESSOR,
5305
5320
  useExisting: forwardRef(() => _IntlTelInput),
@@ -5310,33 +5325,25 @@ var IntlTelInput = class _IntlTelInput {
5310
5325
  useExisting: forwardRef(() => _IntlTelInput),
5311
5326
  multi: true
5312
5327
  }
5313
- ]), i0.\u0275\u0275NgOnChangesFeature], decls: 2, vars: 0, consts: [["inputRef", ""], ["type", "tel", 3, "blur", "focus", "keydown", "keyup", "paste", "click"]], template: function IntlTelInput_Template(rf, ctx) {
5314
- if (rf & 1) {
5315
- i0.\u0275\u0275domElementStart(0, "input", 1, 0);
5316
- i0.\u0275\u0275domListener("blur", function IntlTelInput_Template_input_blur_0_listener($event) {
5317
- return ctx.handleBlur($event);
5318
- })("focus", function IntlTelInput_Template_input_focus_0_listener($event) {
5319
- return ctx.handleFocus($event);
5320
- })("keydown", function IntlTelInput_Template_input_keydown_0_listener($event) {
5321
- return ctx.handleKeyDown($event);
5322
- })("keyup", function IntlTelInput_Template_input_keyup_0_listener($event) {
5323
- return ctx.handleKeyUp($event);
5324
- })("paste", function IntlTelInput_Template_input_paste_0_listener($event) {
5325
- return ctx.handlePaste($event);
5326
- })("click", function IntlTelInput_Template_input_click_0_listener($event) {
5327
- return ctx.handleClick($event);
5328
- });
5329
- i0.\u0275\u0275domElementEnd();
5330
- }
5331
- }, encapsulation: 2 });
5328
+ ], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["inputRef"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
5329
+ <input
5330
+ type="tel"
5331
+ #inputRef
5332
+ (blur)="handleBlur($event)"
5333
+ (focus)="handleFocus($event)"
5334
+ (keydown)="handleKeyDown($event)"
5335
+ (keyup)="handleKeyUp($event)"
5336
+ (paste)="handlePaste($event)"
5337
+ (click)="handleClick($event)"
5338
+ />
5339
+ `, isInline: true });
5332
5340
  };
5333
- (() => {
5334
- (typeof ngDevMode === "undefined" || ngDevMode) && i0.\u0275setClassMetadata(IntlTelInput, [{
5335
- type: Component,
5336
- args: [{
5337
- selector: "intl-tel-input",
5338
- standalone: true,
5339
- template: `
5341
+ i0.\u0275\u0275ngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: IntlTelInput, decorators: [{
5342
+ type: Component,
5343
+ args: [{
5344
+ selector: "intl-tel-input",
5345
+ standalone: true,
5346
+ template: `
5340
5347
  <input
5341
5348
  type="tel"
5342
5349
  #inputRef
@@ -5348,123 +5355,121 @@ var IntlTelInput = class _IntlTelInput {
5348
5355
  (click)="handleClick($event)"
5349
5356
  />
5350
5357
  `,
5351
- providers: [
5352
- {
5353
- provide: NG_VALUE_ACCESSOR,
5354
- useExisting: forwardRef(() => IntlTelInput),
5355
- multi: true
5356
- },
5357
- {
5358
- provide: NG_VALIDATORS,
5359
- useExisting: forwardRef(() => IntlTelInput),
5360
- multi: true
5361
- }
5362
- ]
5363
- }]
5364
- }], null, { inputRef: [{
5365
- type: ViewChild,
5366
- args: ["inputRef", { static: true }]
5367
- }], initialValue: [{
5368
- type: Input
5369
- }], usePreciseValidation: [{
5370
- type: Input
5371
- }], inputAttributes: [{
5372
- type: Input
5373
- }], disabled: [{
5374
- type: Input
5375
- }], readonly: [{
5376
- type: Input
5377
- }], countrySelectorMode: [{
5378
- type: Input
5379
- }], allowedNumberTypes: [{
5380
- type: Input
5381
- }], allowNumberExtensions: [{
5382
- type: Input
5383
- }], allowPhonewords: [{
5384
- type: Input
5385
- }], classNames: [{
5386
- type: Input
5387
- }], containerClass: [{
5388
- type: Input
5389
- }], countryNameLocale: [{
5390
- type: Input
5391
- }], countryNameOverrides: [{
5392
- type: Input
5393
- }], countryOrder: [{
5394
- type: Input
5395
- }], countrySearch: [{
5396
- type: Input
5397
- }], customPlaceholder: [{
5398
- type: Input
5399
- }], dropdownAlwaysOpen: [{
5400
- type: Input
5401
- }], dropdownParent: [{
5402
- type: Input
5403
- }], excludeCountries: [{
5404
- type: Input
5405
- }], matchDropdownWidth: [{
5406
- type: Input
5407
- }], formatAsYouType: [{
5408
- type: Input
5409
- }], hiddenInputs: [{
5410
- type: Input
5411
- }], uiTranslations: [{
5412
- type: Input
5413
- }], initialCountry: [{
5414
- type: Input
5415
- }], initialCountryLookup: [{
5416
- type: Input
5417
- }], loadUtils: [{
5418
- type: Input
5419
- }], numberDisplayFormat: [{
5420
- type: Input
5421
- }], onlyCountries: [{
5422
- type: Input
5423
- }], placeholderNumberPolicy: [{
5424
- type: Input
5425
- }], placeholderNumberType: [{
5426
- type: Input
5427
- }], searchInputClass: [{
5428
- type: Input
5429
- }], separateDialCode: [{
5430
- type: Input
5431
- }], showFlags: [{
5432
- type: Input
5433
- }], strictMode: [{
5434
- type: Input
5435
- }], strictRejectAnimation: [{
5436
- type: Input
5437
- }], numberChange: [{
5438
- type: Output
5439
- }], countryChange: [{
5440
- type: Output
5441
- }], validityChange: [{
5442
- type: Output
5443
- }], errorCodeChange: [{
5444
- type: Output
5445
- }], openCountrySelector: [{
5446
- type: Output
5447
- }], closeCountrySelector: [{
5448
- type: Output
5449
- }], strictReject: [{
5450
- type: Output
5451
- }], blur: [{
5452
- type: Output
5453
- }], focus: [{
5454
- type: Output
5455
- }], keydown: [{
5456
- type: Output
5457
- }], keyup: [{
5458
- type: Output
5459
- }], paste: [{
5460
- type: Output
5461
- }], click: [{
5462
- type: Output
5463
- }] });
5464
- })();
5465
- (() => {
5466
- (typeof ngDevMode === "undefined" || ngDevMode) && i0.\u0275setClassDebugInfo(IntlTelInput, { className: "IntlTelInput", filePath: "IntlTelInput.ts", lineNumber: 71 });
5467
- })();
5358
+ providers: [
5359
+ {
5360
+ provide: NG_VALUE_ACCESSOR,
5361
+ useExisting: forwardRef(() => IntlTelInput),
5362
+ multi: true
5363
+ },
5364
+ {
5365
+ provide: NG_VALIDATORS,
5366
+ useExisting: forwardRef(() => IntlTelInput),
5367
+ multi: true
5368
+ }
5369
+ ]
5370
+ }]
5371
+ }], propDecorators: { inputRef: [{
5372
+ type: ViewChild,
5373
+ args: ["inputRef", { static: true }]
5374
+ }], initialValue: [{
5375
+ type: Input
5376
+ }], usePreciseValidation: [{
5377
+ type: Input
5378
+ }], inputAttributes: [{
5379
+ type: Input
5380
+ }], disabled: [{
5381
+ type: Input
5382
+ }], readonly: [{
5383
+ type: Input
5384
+ }], countrySelectorMode: [{
5385
+ type: Input
5386
+ }], allowedNumberTypes: [{
5387
+ type: Input
5388
+ }], allowNumberExtensions: [{
5389
+ type: Input
5390
+ }], allowPhonewords: [{
5391
+ type: Input
5392
+ }], classNames: [{
5393
+ type: Input
5394
+ }], containerClass: [{
5395
+ type: Input
5396
+ }], countryNameLocale: [{
5397
+ type: Input
5398
+ }], countryNameOverrides: [{
5399
+ type: Input
5400
+ }], countryOrder: [{
5401
+ type: Input
5402
+ }], countrySearch: [{
5403
+ type: Input
5404
+ }], customPlaceholder: [{
5405
+ type: Input
5406
+ }], dropdownAlwaysOpen: [{
5407
+ type: Input
5408
+ }], dropdownParent: [{
5409
+ type: Input
5410
+ }], excludeCountries: [{
5411
+ type: Input
5412
+ }], matchDropdownWidth: [{
5413
+ type: Input
5414
+ }], formatAsYouType: [{
5415
+ type: Input
5416
+ }], fullscreenParent: [{
5417
+ type: Input
5418
+ }], hiddenInputs: [{
5419
+ type: Input
5420
+ }], uiTranslations: [{
5421
+ type: Input
5422
+ }], initialCountry: [{
5423
+ type: Input
5424
+ }], initialCountryLookup: [{
5425
+ type: Input
5426
+ }], loadUtils: [{
5427
+ type: Input
5428
+ }], numberDisplayFormat: [{
5429
+ type: Input
5430
+ }], onlyCountries: [{
5431
+ type: Input
5432
+ }], placeholderNumberPolicy: [{
5433
+ type: Input
5434
+ }], placeholderNumberType: [{
5435
+ type: Input
5436
+ }], searchInputClass: [{
5437
+ type: Input
5438
+ }], separateDialCode: [{
5439
+ type: Input
5440
+ }], showFlags: [{
5441
+ type: Input
5442
+ }], strictMode: [{
5443
+ type: Input
5444
+ }], strictRejectAnimation: [{
5445
+ type: Input
5446
+ }], numberChange: [{
5447
+ type: Output
5448
+ }], countryChange: [{
5449
+ type: Output
5450
+ }], validityChange: [{
5451
+ type: Output
5452
+ }], errorCodeChange: [{
5453
+ type: Output
5454
+ }], openCountrySelector: [{
5455
+ type: Output
5456
+ }], closeCountrySelector: [{
5457
+ type: Output
5458
+ }], strictReject: [{
5459
+ type: Output
5460
+ }], blur: [{
5461
+ type: Output
5462
+ }], focus: [{
5463
+ type: Output
5464
+ }], keydown: [{
5465
+ type: Output
5466
+ }], keyup: [{
5467
+ type: Output
5468
+ }], paste: [{
5469
+ type: Output
5470
+ }], click: [{
5471
+ type: Output
5472
+ }] } });
5468
5473
  var IntlTelInput_default = IntlTelInput;
5469
5474
  export {
5470
5475
  IntlTelInput_default as default,