@intl-tel-input/angular 28.0.1 → 28.0.3

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,9 +1,19 @@
1
- # IntlTelInput Angular Component
1
+ # Angular component for intl-tel-input
2
2
 
3
- An Angular component for the [intl-tel-input](https://github.com/jackocnr/intl-tel-input) JavaScript plugin. View the [source code](https://github.com/jackocnr/intl-tel-input/blob/master/packages/angular/src/IntlTelInput.ts).
3
+ For entering, formatting, and validating international telephone numbers.
4
4
 
5
5
  [Explore docs »](https://intl-tel-input.com/docs/angular-component)
6
6
 
7
+ <picture>
8
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.github.com/jackocnr/intl-tel-input/master/screenshots/iti-github-dark.png">
9
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.github.com/jackocnr/intl-tel-input/master/screenshots/iti-github-light.png">
10
+ <img width="271" height="279" alt="intl-tel-input screenshot showing country dropdown open" src="https://raw.github.com/jackocnr/intl-tel-input/master/screenshots/iti-github-light.png">
11
+ </picture>
12
+
13
+ ## Resources
14
+
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
+
7
17
  ## Running the demos locally
8
18
 
9
19
  1. Initialise the submodules: `git submodule update --init --recursive`
@@ -11,3 +21,11 @@ An Angular component for the [intl-tel-input](https://github.com/jackocnr/intl-t
11
21
  3. Build: `npm run build`
12
22
 
13
23
  You can then open `packages/angular/demo/validation/index.html` in your browser to try the validation demo. View the full list of [available demos](https://github.com/jackocnr/intl-tel-input/tree/master/packages/angular/demo).
24
+
25
+ ## Issues and contributing
26
+
27
+ Please report issues and open pull requests on the [main repository](https://github.com/jackocnr/intl-tel-input).
28
+
29
+ ## License
30
+
31
+ MIT
@@ -63,7 +63,7 @@ declare class IntlTelInput implements AfterViewInit, OnDestroy, OnChanges, Contr
63
63
  click: EventEmitter<MouseEvent>;
64
64
  private iti?;
65
65
  private appliedInputAttrKeys;
66
- private pluginInputClasses;
66
+ private libraryInputClasses;
67
67
  private lastEmittedNumber?;
68
68
  private lastEmittedCountry?;
69
69
  private lastEmittedValidity?;
@@ -1738,7 +1738,7 @@ var allCountries = [];
1738
1738
  for (const c of rawCountryData) {
1739
1739
  allCountries.push({
1740
1740
  name: "",
1741
- // populated in the plugin
1741
+ // populated in the core library
1742
1742
  iso2: c[0],
1743
1743
  dialCode: c[1],
1744
1744
  priority: c[2] || 0,
@@ -1958,14 +1958,14 @@ var defaults = {
1958
1958
  geoIpLookup: null,
1959
1959
  //* Inject a hidden input with the name returned from this function, and on submit, populate it with the result of getNumber.
1960
1960
  hiddenInput: null,
1961
- //* Internationalise the plugin text e.g. search input placeholder, country names.
1961
+ //* Internationalise the core library text e.g. search input placeholder, country names.
1962
1962
  i18n: {},
1963
1963
  //* Initial country.
1964
1964
  initialCountry: "",
1965
1965
  //* A function to load the utils script.
1966
1966
  loadUtils: null,
1967
1967
  //* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.
1968
- nationalMode: true,
1968
+ nationalMode: false,
1969
1969
  //* Display only these countries.
1970
1970
  onlyCountries: null,
1971
1971
  //* Number type to use for placeholders.
@@ -2447,7 +2447,7 @@ var UI = class _UI {
2447
2447
  );
2448
2448
  }
2449
2449
  }
2450
- //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
2450
+ //* Generate all of the markup for the core library: the selected country overlay, and the dropdown.
2451
2451
  buildMarkup(countries, searchTokens) {
2452
2452
  this.#countries = countries;
2453
2453
  this.#searchTokens = searchTokens;
@@ -4374,7 +4374,7 @@ var Iti = class _Iti {
4374
4374
  //********************
4375
4375
  //* PUBLIC METHODS
4376
4376
  //********************
4377
- //* Remove plugin.
4377
+ //* Remove core library.
4378
4378
  destroy() {
4379
4379
  if (!this.#isActive) {
4380
4380
  return;
@@ -4623,7 +4623,7 @@ var intlTelInput = Object.assign(
4623
4623
  documentReady: () => document.readyState === "complete",
4624
4624
  //* Get the country data object.
4625
4625
  getCountryData: () => data_default,
4626
- //* A getter for the plugin instance.
4626
+ //* A getter for the core library instance.
4627
4627
  getInstance: (input) => {
4628
4628
  const id = input.dataset[DATA_KEYS.INSTANCE_ID];
4629
4629
  return id ? intlTelInput.instances.get(id) ?? null : null;
@@ -4633,7 +4633,7 @@ var intlTelInput = Object.assign(
4633
4633
  attachUtils,
4634
4634
  startedLoadingUtils: false,
4635
4635
  startedLoadingAutoCountry: false,
4636
- version: "28.0.1",
4636
+ version: "28.0.3",
4637
4637
  NUMBER_FORMAT,
4638
4638
  NUMBER_TYPE,
4639
4639
  VALIDATION_ERROR
@@ -4657,7 +4657,7 @@ var IntlTelInput = class _IntlTelInput {
4657
4657
  inputAttributes = {};
4658
4658
  disabled = false;
4659
4659
  readonly = false;
4660
- // Plugin initialisation options (one @Input per option)
4660
+ // Library initialisation options (one @Input per option)
4661
4661
  allowDropdown;
4662
4662
  allowedNumberTypes;
4663
4663
  allowNumberExtensions;
@@ -4704,8 +4704,8 @@ var IntlTelInput = class _IntlTelInput {
4704
4704
  click = new EventEmitter();
4705
4705
  iti;
4706
4706
  appliedInputAttrKeys = /* @__PURE__ */ new Set();
4707
- // Classes the plugin adds directly to the input (e.g. iti__tel-input)
4708
- pluginInputClasses = "";
4707
+ // Classes the library adds directly to the input (e.g. iti__tel-input)
4708
+ libraryInputClasses = "";
4709
4709
  lastEmittedNumber;
4710
4710
  lastEmittedCountry;
4711
4711
  lastEmittedValidity;
@@ -4730,7 +4730,7 @@ var IntlTelInput = class _IntlTelInput {
4730
4730
  };
4731
4731
  ngAfterViewInit() {
4732
4732
  this.iti = intlTelInput_default(this.inputRef.nativeElement, this.buildInitOptions());
4733
- this.pluginInputClasses = this.inputRef.nativeElement.className;
4733
+ this.libraryInputClasses = this.inputRef.nativeElement.className;
4734
4734
  this.inputRef.nativeElement.addEventListener("open:countrydropdown", this.handleOpenDropdown);
4735
4735
  this.inputRef.nativeElement.addEventListener("close:countrydropdown", this.handleCloseDropdown);
4736
4736
  this.inputRef.nativeElement.addEventListener("strict:reject", this.handleStrictReject);
@@ -4896,7 +4896,7 @@ var IntlTelInput = class _IntlTelInput {
4896
4896
  warnInputAttr(key);
4897
4897
  } else {
4898
4898
  currentKeys.add(key);
4899
- const next = key === "class" && this.pluginInputClasses ? `${this.pluginInputClasses} ${value}` : value;
4899
+ const next = key === "class" && this.libraryInputClasses ? `${this.libraryInputClasses} ${value}` : value;
4900
4900
  this.inputRef.nativeElement.setAttribute(key, next);
4901
4901
  }
4902
4902
  });
@@ -1738,7 +1738,7 @@ var allCountries = [];
1738
1738
  for (const c of rawCountryData) {
1739
1739
  allCountries.push({
1740
1740
  name: "",
1741
- // populated in the plugin
1741
+ // populated in the core library
1742
1742
  iso2: c[0],
1743
1743
  dialCode: c[1],
1744
1744
  priority: c[2] || 0,
@@ -1958,14 +1958,14 @@ var defaults = {
1958
1958
  geoIpLookup: null,
1959
1959
  //* Inject a hidden input with the name returned from this function, and on submit, populate it with the result of getNumber.
1960
1960
  hiddenInput: null,
1961
- //* Internationalise the plugin text e.g. search input placeholder, country names.
1961
+ //* Internationalise the core library text e.g. search input placeholder, country names.
1962
1962
  i18n: {},
1963
1963
  //* Initial country.
1964
1964
  initialCountry: "",
1965
1965
  //* A function to load the utils script.
1966
1966
  loadUtils: null,
1967
1967
  //* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.
1968
- nationalMode: true,
1968
+ nationalMode: false,
1969
1969
  //* Display only these countries.
1970
1970
  onlyCountries: null,
1971
1971
  //* Number type to use for placeholders.
@@ -2447,7 +2447,7 @@ var UI = class _UI {
2447
2447
  );
2448
2448
  }
2449
2449
  }
2450
- //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
2450
+ //* Generate all of the markup for the core library: the selected country overlay, and the dropdown.
2451
2451
  buildMarkup(countries, searchTokens) {
2452
2452
  this.#countries = countries;
2453
2453
  this.#searchTokens = searchTokens;
@@ -4374,7 +4374,7 @@ var Iti = class _Iti {
4374
4374
  //********************
4375
4375
  //* PUBLIC METHODS
4376
4376
  //********************
4377
- //* Remove plugin.
4377
+ //* Remove core library.
4378
4378
  destroy() {
4379
4379
  if (!this.#isActive) {
4380
4380
  return;
@@ -4623,7 +4623,7 @@ var intlTelInput = Object.assign(
4623
4623
  documentReady: () => document.readyState === "complete",
4624
4624
  //* Get the country data object.
4625
4625
  getCountryData: () => data_default,
4626
- //* A getter for the plugin instance.
4626
+ //* A getter for the core library instance.
4627
4627
  getInstance: (input) => {
4628
4628
  const id = input.dataset[DATA_KEYS.INSTANCE_ID];
4629
4629
  return id ? intlTelInput.instances.get(id) ?? null : null;
@@ -4633,7 +4633,7 @@ var intlTelInput = Object.assign(
4633
4633
  attachUtils,
4634
4634
  startedLoadingUtils: false,
4635
4635
  startedLoadingAutoCountry: false,
4636
- version: "28.0.1",
4636
+ version: "28.0.3",
4637
4637
  NUMBER_FORMAT,
4638
4638
  NUMBER_TYPE,
4639
4639
  VALIDATION_ERROR
@@ -11011,7 +11011,7 @@ var IntlTelInput = class _IntlTelInput {
11011
11011
  inputAttributes = {};
11012
11012
  disabled = false;
11013
11013
  readonly = false;
11014
- // Plugin initialisation options (one @Input per option)
11014
+ // Library initialisation options (one @Input per option)
11015
11015
  allowDropdown;
11016
11016
  allowedNumberTypes;
11017
11017
  allowNumberExtensions;
@@ -11058,8 +11058,8 @@ var IntlTelInput = class _IntlTelInput {
11058
11058
  click = new EventEmitter();
11059
11059
  iti;
11060
11060
  appliedInputAttrKeys = /* @__PURE__ */ new Set();
11061
- // Classes the plugin adds directly to the input (e.g. iti__tel-input)
11062
- pluginInputClasses = "";
11061
+ // Classes the library adds directly to the input (e.g. iti__tel-input)
11062
+ libraryInputClasses = "";
11063
11063
  lastEmittedNumber;
11064
11064
  lastEmittedCountry;
11065
11065
  lastEmittedValidity;
@@ -11084,7 +11084,7 @@ var IntlTelInput = class _IntlTelInput {
11084
11084
  };
11085
11085
  ngAfterViewInit() {
11086
11086
  this.iti = intlTelInput_default(this.inputRef.nativeElement, this.buildInitOptions());
11087
- this.pluginInputClasses = this.inputRef.nativeElement.className;
11087
+ this.libraryInputClasses = this.inputRef.nativeElement.className;
11088
11088
  this.inputRef.nativeElement.addEventListener("open:countrydropdown", this.handleOpenDropdown);
11089
11089
  this.inputRef.nativeElement.addEventListener("close:countrydropdown", this.handleCloseDropdown);
11090
11090
  this.inputRef.nativeElement.addEventListener("strict:reject", this.handleStrictReject);
@@ -11250,7 +11250,7 @@ var IntlTelInput = class _IntlTelInput {
11250
11250
  warnInputAttr(key);
11251
11251
  } else {
11252
11252
  currentKeys.add(key);
11253
- const next = key === "class" && this.pluginInputClasses ? `${this.pluginInputClasses} ${value}` : value;
11253
+ const next = key === "class" && this.libraryInputClasses ? `${this.libraryInputClasses} ${value}` : value;
11254
11254
  this.inputRef.nativeElement.setAttribute(key, next);
11255
11255
  }
11256
11256
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@intl-tel-input/angular",
3
- "version": "28.0.1",
4
- "description": "An Angular component for the intl-tel-input JavaScript plugin",
3
+ "version": "28.0.3",
4
+ "description": "An Angular component for intl-tel-input, for entering, formatting, and validating international telephone numbers",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": "Jack O'Connor (http://jackocnr.com)",
@@ -34,7 +34,7 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "intl-tel-input": "^28.0.1"
37
+ "intl-tel-input": "^28.0.3"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@angular/common": ">=17",