Skip to content

Commit

Permalink
Fix: separateDialCode, select KZ, type 1, change to russia, delete, t…
Browse files Browse the repository at this point in the history
…ype 7, doesnt change to KZ
  • Loading branch information
jackocnr committed Dec 8, 2024
1 parent 5447636 commit e620c78
Show file tree
Hide file tree
Showing 17 changed files with 4 additions and 61 deletions.
1 change: 0 additions & 1 deletion build/js/intlTelInput.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ declare module "intl-tel-input" {
private defaultCountry;
private originalPaddingRight;
private originalPaddingLeft;
private prevDialCodeMatch;
private _handleHiddenInputSubmit;
private _handleLabelClick;
private _handleClickSelectedCountry;
Expand Down
4 changes: 0 additions & 4 deletions build/js/intlTelInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -2596,10 +2596,6 @@ var factoryOutput = (() => {
const selectedDialCode = this.selectedCountryData.dialCode;
number = this._ensureHasDialCode(number);
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
return null;
}
this.prevDialCodeMatch = dialCodeMatch;
const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
2 changes: 1 addition & 1 deletion build/js/intlTelInput.min.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions build/js/intlTelInputWithUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2595,10 +2595,6 @@ var factoryOutput = (() => {
const selectedDialCode = this.selectedCountryData.dialCode;
number = this._ensureHasDialCode(number);
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
return null;
}
this.prevDialCodeMatch = dialCodeMatch;
const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
2 changes: 1 addition & 1 deletion build/js/intlTelInputWithUtils.min.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions react/build/IntlTelInput.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2591,10 +2591,6 @@ var Iti = class {
const selectedDialCode = this.selectedCountryData.dialCode;
number = this._ensureHasDialCode(number);
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
return null;
}
this.prevDialCodeMatch = dialCodeMatch;
const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
1 change: 0 additions & 1 deletion react/build/IntlTelInput.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ declare module "intl-tel-input" {
private defaultCountry;
private originalPaddingRight;
private originalPaddingLeft;
private prevDialCodeMatch;
private _handleHiddenInputSubmit;
private _handleLabelClick;
private _handleClickSelectedCountry;
Expand Down
4 changes: 0 additions & 4 deletions react/build/IntlTelInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -2555,10 +2555,6 @@ var Iti = class {
const selectedDialCode = this.selectedCountryData.dialCode;
number = this._ensureHasDialCode(number);
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
return null;
}
this.prevDialCodeMatch = dialCodeMatch;
const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
4 changes: 0 additions & 4 deletions react/build/IntlTelInputWithUtils.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2591,10 +2591,6 @@ var Iti = class {
const selectedDialCode = this.selectedCountryData.dialCode;
number = this._ensureHasDialCode(number);
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
return null;
}
this.prevDialCodeMatch = dialCodeMatch;
const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
4 changes: 0 additions & 4 deletions react/build/IntlTelInputWithUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2555,10 +2555,6 @@ var Iti = class {
const selectedDialCode = this.selectedCountryData.dialCode;
number = this._ensureHasDialCode(number);
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
return null;
}
this.prevDialCodeMatch = dialCodeMatch;
const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
4 changes: 0 additions & 4 deletions react/demo/set-number/set-number-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26142,10 +26142,6 @@
const selectedDialCode = this.selectedCountryData.dialCode;
number = this._ensureHasDialCode(number);
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
return null;
}
this.prevDialCodeMatch = dialCodeMatch;
const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
4 changes: 0 additions & 4 deletions react/demo/simple/simple-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26142,10 +26142,6 @@
const selectedDialCode = this.selectedCountryData.dialCode;
number = this._ensureHasDialCode(number);
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
return null;
}
this.prevDialCodeMatch = dialCodeMatch;
const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
4 changes: 0 additions & 4 deletions react/demo/toggle-disabled/toggle-disabled-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26142,10 +26142,6 @@
const selectedDialCode = this.selectedCountryData.dialCode;
number = this._ensureHasDialCode(number);
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
return null;
}
this.prevDialCodeMatch = dialCodeMatch;
const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
4 changes: 0 additions & 4 deletions react/demo/validation/validation-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -26142,10 +26142,6 @@
const selectedDialCode = this.selectedCountryData.dialCode;
number = this._ensureHasDialCode(number);
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
return null;
}
this.prevDialCodeMatch = dialCodeMatch;
const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
7 changes: 0 additions & 7 deletions src/js/intl-tel-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ export class Iti {
private defaultCountry: string;
private originalPaddingRight: string;
private originalPaddingLeft: string;
private prevDialCodeMatch: string;

private _handleHiddenInputSubmit: () => void;
private _handleLabelClick: (e: Event) => void;
Expand Down Expand Up @@ -1441,12 +1440,6 @@ export class Iti {

//* Try and extract valid dial code (plus area code digits) from input.
const dialCodeMatch = this._getDialCode(number, true);
if (dialCodeMatch && dialCodeMatch === this.prevDialCodeMatch) {
//* Optimisation: if there is a dial code match and it's the same as last time, no need to do anything.
return null;
}
this.prevDialCodeMatch = dialCodeMatch;

const numeric = getNumeric(number);
if (dialCodeMatch) {
const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
Expand Down
6 changes: 1 addition & 5 deletions vue/build/IntlTelInput.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2161,11 +2161,7 @@ class G {
let i = e ? t.substring(e) : t;
const s = this.selectedCountryData.iso2, n = this.selectedCountryData.dialCode;
i = this._ensureHasDialCode(i);
const o = this._getDialCode(i, !0);
if (o && o === this.prevDialCodeMatch)
return null;
this.prevDialCodeMatch = o;
const r = v(i);
const o = this._getDialCode(i, !0), r = v(i);
if (o) {
const a = v(o), c = this.dialCodeToIso2Map[a];
if (!s && this.defaultCountry && c.includes(this.defaultCountry))
Expand Down
6 changes: 1 addition & 5 deletions vue/build/IntlTelInputWithUtils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2161,11 +2161,7 @@ class K2 {
let r = n ? e.substring(n) : e;
const o = this.selectedCountryData.iso2, a = this.selectedCountryData.dialCode;
r = this._ensureHasDialCode(r);
const c = this._getDialCode(r, !0);
if (c && c === this.prevDialCodeMatch)
return null;
this.prevDialCodeMatch = c;
const g = c1(r);
const c = this._getDialCode(r, !0), g = c1(r);
if (c) {
const f = c1(c), S = this.dialCodeToIso2Map[f];
if (!o && this.defaultCountry && S.includes(this.defaultCountry))
Expand Down

0 comments on commit e620c78

Please sign in to comment.