@ascentgl/ads-ui 20.0.20 → 20.0.21
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.
|
@@ -7588,6 +7588,8 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
7588
7588
|
this.dropdownControl = new FormControl(this.countryOptions[0]);
|
|
7589
7589
|
/** @ignore */
|
|
7590
7590
|
this.inputControl = new FormControl();
|
|
7591
|
+
/** @ignore */
|
|
7592
|
+
this.isInternalChange = false;
|
|
7591
7593
|
this.validateMask = (control) => {
|
|
7592
7594
|
const value = (control.value || '').trim();
|
|
7593
7595
|
/**
|
|
@@ -7663,11 +7665,17 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
7663
7665
|
}
|
|
7664
7666
|
/** @ignore */
|
|
7665
7667
|
handleSetValue(value) {
|
|
7668
|
+
if (this.isInternalChange)
|
|
7669
|
+
return;
|
|
7666
7670
|
if (value) {
|
|
7671
|
+
this.isInternalChange = true;
|
|
7667
7672
|
this.parsePhoneNumber(value, false);
|
|
7673
|
+
this.isInternalChange = false;
|
|
7668
7674
|
}
|
|
7669
7675
|
else {
|
|
7676
|
+
this.isInternalChange = true;
|
|
7670
7677
|
this.inputControl.setValue(null, { emitEvent: false });
|
|
7678
|
+
this.isInternalChange = false;
|
|
7671
7679
|
}
|
|
7672
7680
|
}
|
|
7673
7681
|
/** @ignore */
|
|
@@ -7710,10 +7718,14 @@ class AdsInternationalPhoneFieldComponent extends AbstractInputComponent {
|
|
|
7710
7718
|
}
|
|
7711
7719
|
/** @ignore */
|
|
7712
7720
|
provideValueToTheValueControl() {
|
|
7721
|
+
if (this.isInternalChange)
|
|
7722
|
+
return;
|
|
7713
7723
|
const code = this.dropdownControl.value.code;
|
|
7714
7724
|
const phone = this.inputControl.value;
|
|
7725
|
+
this.isInternalChange = true;
|
|
7715
7726
|
this.valueControl.setValue(phone ? code + phone : null);
|
|
7716
7727
|
this.inputControl.markAsTouched({ emitEvent: false });
|
|
7728
|
+
this.isInternalChange = false;
|
|
7717
7729
|
}
|
|
7718
7730
|
/** @ignore */
|
|
7719
7731
|
canShowError() {
|