ca-components 1.1.9995 → 1.1.9996
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/esm2022/lib/components/ca-input-address-dropdown/ca-input-address-dropdown.component.mjs +13 -1
- package/esm2022/lib/components/ca-input-address-dropdown/validators/ca-input-address-value.validations.mjs +8 -0
- package/esm2022/lib/components/ca-input-dropdown/ca-input-dropdown.component.mjs +1 -2
- package/fesm2022/ca-components.mjs +19 -1
- package/fesm2022/ca-components.mjs.map +1 -1
- package/lib/components/ca-input-address-dropdown/ca-input-address-dropdown.component.d.ts +1 -0
- package/lib/components/ca-input-address-dropdown/validators/ca-input-address-value.validations.d.ts +2 -0
- package/package.json +1 -1
|
@@ -12467,7 +12467,6 @@ class CaInputDropdownComponent {
|
|
|
12467
12467
|
}
|
|
12468
12468
|
}
|
|
12469
12469
|
setControlValue(value, dropdownInputValue) {
|
|
12470
|
-
console.log('SET CONTROLL VALUE', value);
|
|
12471
12470
|
this.onChange(value); // Notify Angular form about the change
|
|
12472
12471
|
if (value)
|
|
12473
12472
|
this.onTouched(); // Mark as touched
|
|
@@ -12649,6 +12648,14 @@ var eInputBasicString;
|
|
|
12649
12648
|
eInputBasicString["WHITE"] = "white";
|
|
12650
12649
|
})(eInputBasicString || (eInputBasicString = {}));
|
|
12651
12650
|
|
|
12651
|
+
function addressNameWithDotValidator() {
|
|
12652
|
+
return (control) => {
|
|
12653
|
+
const controlValue = control.value?.address || control.value;
|
|
12654
|
+
const forbidden = /\d.*\d/.test(controlValue);
|
|
12655
|
+
return !forbidden ? { error: true } : null;
|
|
12656
|
+
};
|
|
12657
|
+
}
|
|
12658
|
+
|
|
12652
12659
|
class CaInputAddressDropdownComponent {
|
|
12653
12660
|
set placeholderType(value) {
|
|
12654
12661
|
this.checkSearchLayers(value);
|
|
@@ -12727,6 +12734,17 @@ class CaInputAddressDropdownComponent {
|
|
|
12727
12734
|
registerOnTouched(_) { }
|
|
12728
12735
|
ngOnInit() {
|
|
12729
12736
|
this.initChangesListener();
|
|
12737
|
+
this.attachAddressStreetValidation();
|
|
12738
|
+
}
|
|
12739
|
+
attachAddressStreetValidation() {
|
|
12740
|
+
const currentValidators = this.superControl.validator
|
|
12741
|
+
? [this.superControl.validator]
|
|
12742
|
+
: [];
|
|
12743
|
+
this.superControl?.control?.setValidators([
|
|
12744
|
+
...currentValidators,
|
|
12745
|
+
addressNameWithDotValidator(),
|
|
12746
|
+
]);
|
|
12747
|
+
this.superControl?.control?.updateValueAndValidity();
|
|
12730
12748
|
}
|
|
12731
12749
|
handleSearchInput(text) {
|
|
12732
12750
|
this.observableInputSearch.next(text);
|