@solcre-org/core-ui 2.15.41 → 2.15.42
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.
|
@@ -199,9 +199,14 @@ class BaseFieldComponent {
|
|
|
199
199
|
const formValue = this.formValue();
|
|
200
200
|
const control = this.formControl();
|
|
201
201
|
if (control) {
|
|
202
|
+
const wasTouched = control.touched;
|
|
202
203
|
const currentValidators = this.getCurrentValidators();
|
|
204
|
+
control.clearValidators();
|
|
203
205
|
control.setValidators(currentValidators);
|
|
204
206
|
control.updateValueAndValidity({ emitEvent: false });
|
|
207
|
+
if (wasTouched) {
|
|
208
|
+
control.markAsTouched();
|
|
209
|
+
}
|
|
205
210
|
}
|
|
206
211
|
});
|
|
207
212
|
effect(() => {
|
|
@@ -6982,8 +6987,18 @@ class GenericModalComponent {
|
|
|
6982
6987
|
effect(() => {
|
|
6983
6988
|
const editedData = this.editedData();
|
|
6984
6989
|
const activeStepId = this.activeStepId();
|
|
6985
|
-
if (editedData
|
|
6986
|
-
|
|
6990
|
+
if (editedData) {
|
|
6991
|
+
const allErrors = {};
|
|
6992
|
+
this.allFields().forEach(field => {
|
|
6993
|
+
const control = this.form().get(field.key);
|
|
6994
|
+
if (control && control.touched) {
|
|
6995
|
+
const validationResult = this.validateField(field.key, control.value);
|
|
6996
|
+
if (validationResult.fieldErrors.length > 0) {
|
|
6997
|
+
allErrors[field.key] = validationResult.fieldErrors;
|
|
6998
|
+
}
|
|
6999
|
+
}
|
|
7000
|
+
});
|
|
7001
|
+
this.fieldErrors.set(allErrors);
|
|
6987
7002
|
}
|
|
6988
7003
|
});
|
|
6989
7004
|
}
|
|
@@ -7119,10 +7134,17 @@ class GenericModalComponent {
|
|
|
7119
7134
|
return result;
|
|
7120
7135
|
if (control.touched) {
|
|
7121
7136
|
const modeConfig = field.modes?.[this.mode()];
|
|
7137
|
+
const validatorConfig = modeConfig?.validators ?? field.validators ?? [];
|
|
7138
|
+
const currentValidators = typeof validatorConfig === 'function'
|
|
7139
|
+
? validatorConfig(this.editedData())
|
|
7140
|
+
: validatorConfig;
|
|
7141
|
+
control.clearValidators();
|
|
7142
|
+
control.setValidators(currentValidators);
|
|
7143
|
+
control.updateValueAndValidity({ emitEvent: false });
|
|
7122
7144
|
const errorMessages = modeConfig?.errorMessages ?? field.errorMessages ?? {};
|
|
7123
7145
|
if (control.errors) {
|
|
7124
7146
|
const fieldConfig = this.getFieldConfig(field);
|
|
7125
|
-
const isDynamicValidators = typeof
|
|
7147
|
+
const isDynamicValidators = typeof validatorConfig === 'function';
|
|
7126
7148
|
if (isDynamicValidators) {
|
|
7127
7149
|
result.fieldErrors = this.mapDynamicValidatorErrors(control.errors, errorMessages);
|
|
7128
7150
|
}
|
|
@@ -16364,12 +16386,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
16364
16386
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
16365
16387
|
// No edites manualmente este archivo
|
|
16366
16388
|
const VERSION = {
|
|
16367
|
-
full: '2.15.
|
|
16389
|
+
full: '2.15.42',
|
|
16368
16390
|
major: 2,
|
|
16369
16391
|
minor: 15,
|
|
16370
|
-
patch:
|
|
16371
|
-
timestamp: '2025-11-
|
|
16372
|
-
buildDate: '
|
|
16392
|
+
patch: 42,
|
|
16393
|
+
timestamp: '2025-11-26T14:36:49.398Z',
|
|
16394
|
+
buildDate: '26/11/2025'
|
|
16373
16395
|
};
|
|
16374
16396
|
|
|
16375
16397
|
class MainNavComponent {
|