@esfaenza/forms-and-validations 15.2.9 → 15.2.11
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/esm2020/lib/forms/base-form-control.mjs +2 -2
- package/esm2020/lib/forms/form-adaptive/form-adaptive.component.mjs +4 -3
- package/esm2020/lib/forms/form-checkbox/form-checkbox.component.mjs +3 -3
- package/fesm2015/esfaenza-forms-and-validations.mjs +6 -5
- package/fesm2015/esfaenza-forms-and-validations.mjs.map +1 -1
- package/fesm2020/esfaenza-forms-and-validations.mjs +6 -5
- package/fesm2020/esfaenza-forms-and-validations.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1902,7 +1902,7 @@ class BaseFormControl {
|
|
|
1902
1902
|
v._createValidator();
|
|
1903
1903
|
});
|
|
1904
1904
|
}
|
|
1905
|
-
this.ngControl.control.addValidators(this._validators);
|
|
1905
|
+
this.ngControl.control.addValidators(this._validators.filter(v => !v.ngOnInit));
|
|
1906
1906
|
this.ngControl.control.updateValueAndValidity();
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
@@ -2561,7 +2561,8 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2561
2561
|
this.Pattern = this.nvl(this.Options?.Pattern, this.Pattern);
|
|
2562
2562
|
}
|
|
2563
2563
|
if (this.ngControl) {
|
|
2564
|
-
|
|
2564
|
+
// Esclusi i validatori a componenti
|
|
2565
|
+
let validators = [...(this._validators || [])].filter(v => !v.ngOnInit);
|
|
2565
2566
|
var pv = new PatternValidator();
|
|
2566
2567
|
switch (this.Type) {
|
|
2567
2568
|
case 'int':
|
|
@@ -2625,7 +2626,7 @@ class FormAdaptiveComponent extends BaseFormControl {
|
|
|
2625
2626
|
else if (this.Type == "boolean") {
|
|
2626
2627
|
obj = obj ? (obj === true || obj.toLowerCase() == "true") : false;
|
|
2627
2628
|
this.alignValues = true;
|
|
2628
|
-
this.EvaluatedModel = this.lc.loc(obj ? '
|
|
2629
|
+
this.EvaluatedModel = this.lc.loc(obj ? 'Sì' : 'No');
|
|
2629
2630
|
}
|
|
2630
2631
|
else if (this.Type == "time") {
|
|
2631
2632
|
const [hours, minutes, seconds] = (obj || "00:00:00").split(":");
|
|
@@ -3054,11 +3055,11 @@ class FormCheckboxComponent extends BaseFormControl {
|
|
|
3054
3055
|
/** @ignore */
|
|
3055
3056
|
writeValue(obj) {
|
|
3056
3057
|
obj = obj ? (obj === true || obj.toLowerCase() == "true") : false;
|
|
3057
|
-
this.EvaluatedModel = this.lc.loc(obj ? '
|
|
3058
|
+
this.EvaluatedModel = this.lc.loc(obj ? 'Sì' : 'No');
|
|
3058
3059
|
super.writeValue(obj);
|
|
3059
3060
|
}
|
|
3060
3061
|
changed() {
|
|
3061
|
-
this.EvaluatedModel = this.lc.loc(this.Model ? '
|
|
3062
|
+
this.EvaluatedModel = this.lc.loc(this.Model ? 'Sì' : 'No');
|
|
3062
3063
|
super.changed(null, false, true);
|
|
3063
3064
|
}
|
|
3064
3065
|
/** @ignore */
|