@solcre-org/core-ui 2.20.18 → 2.20.20

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.
@@ -205,4 +205,8 @@ app-server-select-field .ng-select:not(.ng-select-filtered):not(.ng-select-opene
205
205
 
206
206
  .ng-select.disabled .ng-select-container .ng-value-container .ng-input input {
207
207
  cursor: not-allowed;
208
+ }
209
+
210
+ .ng-select.ng-select-opened .ng-select-container {
211
+ z-index: 1;
208
212
  }
@@ -7089,11 +7089,11 @@ class ConfirmationDialogService {
7089
7089
  return this.response$;
7090
7090
  }
7091
7091
  confirm(value) {
7092
- this.responseSubject.next(value);
7092
+ this.responseSubject.next(value ?? { value: true, fieldsData: null });
7093
7093
  this.close();
7094
7094
  }
7095
7095
  cancel() {
7096
- this.responseSubject.next(undefined);
7096
+ this.responseSubject.next({ value: undefined, fieldsData: null });
7097
7097
  this.close();
7098
7098
  }
7099
7099
  close() {
@@ -7125,6 +7125,17 @@ class ConfirmationDialogService {
7125
7125
  ...config
7126
7126
  }));
7127
7127
  }
7128
+ openWithFields(config) {
7129
+ return this.open({
7130
+ ...config,
7131
+ type: config.type || 'default',
7132
+ size: config.size || 'xl',
7133
+ showCloseButton: config.showCloseButton ?? true,
7134
+ fieldsConfig: config.fieldsConfig,
7135
+ fieldsMode: config.fieldsMode ?? ModalMode.CREATE,
7136
+ fieldsData: config.fieldsData ?? {}
7137
+ });
7138
+ }
7128
7139
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7129
7140
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogService, providedIn: 'root' });
7130
7141
  }
@@ -8015,8 +8026,8 @@ class GenericModalComponent {
8015
8026
  type: 'default',
8016
8027
  icon: 'icon-warning',
8017
8028
  showCloseButton: true
8018
- }).subscribe((confirmed) => {
8019
- if (confirmed) {
8029
+ }).subscribe((response) => {
8030
+ if (response?.value) {
8020
8031
  this.forceClose();
8021
8032
  }
8022
8033
  });
@@ -10449,15 +10460,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
10449
10460
  }], ctorParameters: () => [{ type: PaginationService }, { type: TableDataService }] });
10450
10461
 
10451
10462
  class ConfirmationDialogComponent {
10463
+ formBuilder = inject(FormBuilder);
10452
10464
  popupElement;
10453
10465
  overlayElement;
10454
10466
  customContentTemplate;
10467
+ ModalMode = ModalMode;
10468
+ FieldType = FieldType;
10455
10469
  isOpen = input.required();
10456
10470
  config = input.required();
10457
10471
  confirm = output();
10458
10472
  cancel = output();
10459
10473
  inputValue = signal('');
10460
10474
  isClosing = signal(false);
10475
+ fieldsEditedData = signal(null);
10476
+ fieldErrors = signal({});
10477
+ form = signal(this.formBuilder.group({}));
10478
+ isFieldsInitialized = signal(false);
10479
+ hasFields = computed(() => {
10480
+ const fields = this.config().fieldsConfig;
10481
+ return !!fields && fields.length > 0;
10482
+ });
10483
+ fieldsMode = computed(() => {
10484
+ return this.config().fieldsMode ?? ModalMode.CREATE;
10485
+ });
10486
+ currentFields = computed(() => {
10487
+ return this.config().fieldsConfig ?? [];
10488
+ });
10489
+ hasFieldErrors = computed(() => {
10490
+ return Object.values(this.fieldErrors()).some(errors => errors.length > 0);
10491
+ });
10461
10492
  closeButtonConfig = computed(() => ({
10462
10493
  type: ButtonType.ICON,
10463
10494
  icon: 'icon-cross',
@@ -10484,11 +10515,237 @@ class ConfirmationDialogComponent {
10484
10515
  get hasCustomContent() {
10485
10516
  return !!this.customContentTemplate;
10486
10517
  }
10518
+ constructor() {
10519
+ effect(() => {
10520
+ const isOpen = this.isOpen();
10521
+ const config = this.config();
10522
+ if (!isOpen) {
10523
+ this.fieldsEditedData.set(null);
10524
+ this.fieldErrors.set({});
10525
+ this.form.set(this.formBuilder.group({}));
10526
+ this.isFieldsInitialized.set(false);
10527
+ return;
10528
+ }
10529
+ if (config.fieldsConfig && config.fieldsConfig.length > 0 && !this.isFieldsInitialized()) {
10530
+ this.initializeFields();
10531
+ this.isFieldsInitialized.set(true);
10532
+ }
10533
+ });
10534
+ }
10535
+ initializeFields() {
10536
+ const config = this.config();
10537
+ const fields = config.fieldsConfig;
10538
+ if (!fields || fields.length === 0)
10539
+ return;
10540
+ const mode = this.fieldsMode();
10541
+ const initialData = config.fieldsData ?? {};
10542
+ const formGroup = {};
10543
+ const editedData = { ...initialData };
10544
+ fields.forEach(field => {
10545
+ const fieldKey = field.key;
10546
+ const modeConfig = field.modes?.[mode];
10547
+ const defaultValue = modeConfig?.defaultValue ?? field.defaultValue;
10548
+ let initialValue = editedData[fieldKey] ?? null;
10549
+ if (mode === ModalMode.CREATE && defaultValue !== undefined) {
10550
+ if (typeof defaultValue === 'function') {
10551
+ initialValue = defaultValue(editedData);
10552
+ }
10553
+ else {
10554
+ initialValue = defaultValue;
10555
+ }
10556
+ editedData[fieldKey] = initialValue;
10557
+ }
10558
+ const validators = modeConfig?.validators ?? field.validators ?? [];
10559
+ formGroup[fieldKey] = [initialValue, validators];
10560
+ });
10561
+ this.form.set(this.formBuilder.group(formGroup));
10562
+ // Evaluate dynamic values
10563
+ fields.forEach(field => {
10564
+ const fieldKey = field.key;
10565
+ const modeConfig = field.modes?.[mode];
10566
+ const dynamicValueFn = (modeConfig?.dynamicValue ?? field.dynamicValue);
10567
+ if (typeof dynamicValueFn === 'function') {
10568
+ const dynamicVal = dynamicValueFn(editedData);
10569
+ if (dynamicVal !== undefined && dynamicVal !== null) {
10570
+ editedData[fieldKey] = dynamicVal;
10571
+ const control = this.form().get(fieldKey);
10572
+ if (control) {
10573
+ control.setValue(dynamicVal, { emitEvent: true });
10574
+ }
10575
+ }
10576
+ }
10577
+ });
10578
+ // Mark all controls as untouched
10579
+ Object.values(this.form().controls).forEach(control => {
10580
+ control.markAsUntouched();
10581
+ });
10582
+ this.fieldErrors.set({});
10583
+ this.fieldsEditedData.set(editedData);
10584
+ }
10585
+ getFieldConfig(field) {
10586
+ const mode = this.fieldsMode();
10587
+ const modeConfig = field.modes?.[mode];
10588
+ if (!modeConfig)
10589
+ return {
10590
+ ...field,
10591
+ visible: this.evaluateVisibility(field.visible),
10592
+ readonly: this.evaluateReadonly(field.readonly)
10593
+ };
10594
+ return {
10595
+ ...field,
10596
+ defaultValue: modeConfig.defaultValue ?? field.defaultValue,
10597
+ readonly: this.evaluateReadonly(modeConfig.readonly ?? field.readonly),
10598
+ options: modeConfig.options ?? field.options,
10599
+ validators: modeConfig.validators ?? field.validators,
10600
+ errorMessages: modeConfig.errorMessages ?? field.errorMessages,
10601
+ multiple: modeConfig.multiple ?? field.multiple,
10602
+ visible: this.evaluateVisibility(modeConfig.visible ?? field.visible),
10603
+ includeInPayload: modeConfig.includeInPayload ?? field.includeInPayload,
10604
+ customViewTemplate: modeConfig.customViewTemplate ?? field.customViewTemplate
10605
+ };
10606
+ }
10607
+ evaluateVisibility(visible) {
10608
+ if (visible === undefined)
10609
+ return true;
10610
+ if (typeof visible === 'function') {
10611
+ try {
10612
+ return visible(this.fieldsEditedData());
10613
+ }
10614
+ catch {
10615
+ try {
10616
+ return visible();
10617
+ }
10618
+ catch {
10619
+ return true;
10620
+ }
10621
+ }
10622
+ }
10623
+ return visible;
10624
+ }
10625
+ evaluateReadonly(readonly) {
10626
+ if (readonly === undefined)
10627
+ return false;
10628
+ if (typeof readonly === 'function') {
10629
+ try {
10630
+ return readonly(this.fieldsEditedData());
10631
+ }
10632
+ catch {
10633
+ return false;
10634
+ }
10635
+ }
10636
+ return readonly;
10637
+ }
10638
+ onFieldValueChange(fieldKey, newValue) {
10639
+ const fields = this.currentFields();
10640
+ const field = fields.find(f => f.key === fieldKey);
10641
+ if (!field)
10642
+ return;
10643
+ const payloadKey = (field.keyToPayload ?? field.key);
10644
+ this.fieldsEditedData.update(data => {
10645
+ if (!data)
10646
+ return data;
10647
+ return { ...data, [payloadKey]: newValue };
10648
+ });
10649
+ const control = this.form().get(fieldKey);
10650
+ if (control) {
10651
+ control.setValue(newValue, { emitEvent: false });
10652
+ control.markAsTouched();
10653
+ const validationResult = this.validateField(field, newValue);
10654
+ this.fieldErrors.update(current => ({
10655
+ ...current,
10656
+ [fieldKey]: validationResult.fieldErrors
10657
+ }));
10658
+ }
10659
+ }
10660
+ validateField(field, value) {
10661
+ const control = this.form().get(field.key);
10662
+ const result = {
10663
+ fieldErrors: [],
10664
+ internalErrors: []
10665
+ };
10666
+ if (!control)
10667
+ return result;
10668
+ if (control.touched) {
10669
+ const mode = this.fieldsMode();
10670
+ const modeConfig = field.modes?.[mode];
10671
+ const validatorConfig = modeConfig?.validators ?? field.validators ?? [];
10672
+ const currentValidators = typeof validatorConfig === 'function'
10673
+ ? validatorConfig(this.fieldsEditedData())
10674
+ : validatorConfig;
10675
+ control.clearValidators();
10676
+ control.setValidators(currentValidators);
10677
+ control.updateValueAndValidity({ emitEvent: false });
10678
+ const errorMessages = modeConfig?.errorMessages ?? field.errorMessages ?? {};
10679
+ if (control.errors) {
10680
+ const isDynamicValidators = typeof validatorConfig === 'function';
10681
+ if (isDynamicValidators) {
10682
+ result.fieldErrors = this.mapDynamicValidatorErrors(control.errors, errorMessages);
10683
+ }
10684
+ else {
10685
+ result.fieldErrors = Object.keys(control.errors).map(errorKey => errorMessages[errorKey] || errorKey);
10686
+ }
10687
+ }
10688
+ }
10689
+ return result;
10690
+ }
10691
+ mapDynamicValidatorErrors(controlErrors, errorMessages) {
10692
+ const errorKeys = Object.keys(controlErrors);
10693
+ const mappedErrors = [];
10694
+ const validatorKeyMap = {
10695
+ '0': 'required',
10696
+ '1': 'minlength',
10697
+ '2': 'pattern',
10698
+ '3': 'email',
10699
+ '4': 'min',
10700
+ '5': 'max'
10701
+ };
10702
+ errorKeys.forEach(errorKey => {
10703
+ let messageKey = errorKey;
10704
+ if (/^\d+$/.test(errorKey)) {
10705
+ messageKey = validatorKeyMap[errorKey] || errorKey;
10706
+ }
10707
+ const message = errorMessages[messageKey] || errorMessages[errorKey] || messageKey;
10708
+ mappedErrors.push(message);
10709
+ });
10710
+ return mappedErrors;
10711
+ }
10712
+ validateAllFields() {
10713
+ const fields = this.currentFields();
10714
+ const allErrors = {};
10715
+ fields.forEach(field => {
10716
+ const modeConfig = field.modes?.[this.fieldsMode()];
10717
+ if (modeConfig?.visible === false)
10718
+ return;
10719
+ const control = this.form().get(field.key);
10720
+ if (control) {
10721
+ control.markAsTouched();
10722
+ const value = control.value;
10723
+ const validationResult = this.validateField(field, value);
10724
+ if (validationResult.fieldErrors.length > 0) {
10725
+ allErrors[field.key] = validationResult.fieldErrors;
10726
+ }
10727
+ }
10728
+ });
10729
+ this.fieldErrors.set(allErrors);
10730
+ }
10731
+ getFieldErrors(fieldKey) {
10732
+ return this.fieldErrors()[fieldKey] || [];
10733
+ }
10487
10734
  onConfirm() {
10735
+ // If has fields, validate first
10736
+ if (this.hasFields()) {
10737
+ this.validateAllFields();
10738
+ if (this.hasFieldErrors()) {
10739
+ return;
10740
+ }
10741
+ }
10488
10742
  const inputConfig = this.config().inputConfig;
10489
10743
  const valueToEmit = inputConfig?.validationValue ? this.inputValue() : true;
10490
10744
  this.closeWithAnimation(() => {
10491
- this.confirm.emit(valueToEmit);
10745
+ this.confirm.emit({
10746
+ value: valueToEmit,
10747
+ fieldsData: this.fieldsEditedData()
10748
+ });
10492
10749
  });
10493
10750
  }
10494
10751
  onCancel() {
@@ -10536,12 +10793,12 @@ class ConfirmationDialogComponent {
10536
10793
  }
10537
10794
  }
10538
10795
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10539
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: ConfirmationDialogComponent, isStandalone: true, selector: "core-confirmation-dialog", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { confirm: "confirm", cancel: "cancel" }, queries: [{ propertyName: "customContentTemplate", first: true, predicate: ["customContent"], descendants: true }], viewQueries: [{ propertyName: "popupElement", first: true, predicate: ["popup"], descendants: true }, { propertyName: "overlayElement", first: true, predicate: ["overlay"], descendants: true }], hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<div class=\"c-popup\" \n [class.c-popup--xl]=\"config().size === 'xl'\" \n [class.is-visible]=\"isOpen()\" \n [ngClass]=\"config().customClass\"\n #popup \n *ngIf=\"isOpen()\">\n <div class=\"c-popup__overlay\" (click)=\"onCancel()\" #overlay></div>\n <div class=\"c-popup__holder\">\n @if(config().showCloseButton) {\n <core-generic-button\n [config]=\"closeButtonConfig()\"\n (buttonClick)=\"onCancel()\">\n </core-generic-button>\n }\n @if (config().icon) {\n <span class=\"c-popup__icon\" [ngClass]=\"config().icon | coreIconCompat\"></span>\n }\n\n <p class=\"c-popup__title u-heading u-fz--600\">\n {{ config().title | translate: config().messageParams }}\n </p>\n\n @if (config().customTemplate) {\n <ng-container *ngTemplateOutlet=\"config().customTemplate!; context: config().customTemplateContext\"></ng-container>\n } @else {\n \n @if (config().message) {\n <p class=\"c-popup__text u-text\">\n {{ config().message ?? '' | translate: config().messageParams }}\n </p>\n }\n\n @if (config().inputConfig) {\n <label class=\"c-popup__form c-entry-item\">\n <span class=\"c-entry-text\">\n {{ config().inputConfig?.label ?? '' | translate }}\n @if (!config().inputConfig?.validationValue) {\n <!-- Todo: D\u00F3nde est\u00E1 el .u-text--muted ? -->\n <span class=\"u-text--muted\"> ({{ 'common.optional' | translate }})</span>\n }\n </span>\n <input \n class=\"c-entry-input\"\n type=\"text\"\n [placeholder]=\"config().inputConfig?.placeholder ?? '' | translate\"\n [(ngModel)]=\"inputValue\"\n (ngModelChange)=\"onInputChange($event)\"\n [required]=\"!!config().inputConfig?.validationValue\"\n >\n </label>\n }\n\n }\n\n <div class=\"c-popup__btns u-flex u-push-t--xl\">\n @if (config().showCancelButton !== false) {\n <core-generic-button\n [config]=\"cancelButtonConfig()\"\n (buttonClick)=\"onCancel()\">\n </core-generic-button>\n }\n @if (config().showConfirmButton !== false) {\n <core-generic-button\n [config]=\"confirmButtonConfig()\"\n (buttonClick)=\"onConfirm()\">\n </core-generic-button>\n }\n </div>\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "pipe", type: IconCompatPipe, name: "coreIconCompat" }] });
10796
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: ConfirmationDialogComponent, isStandalone: true, selector: "core-confirmation-dialog", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { confirm: "confirm", cancel: "cancel" }, queries: [{ propertyName: "customContentTemplate", first: true, predicate: ["customContent"], descendants: true }], viewQueries: [{ propertyName: "popupElement", first: true, predicate: ["popup"], descendants: true }, { propertyName: "overlayElement", first: true, predicate: ["overlay"], descendants: true }], hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<div class=\"c-popup\" \n [class.c-popup--xl]=\"config().size === 'xl'\" \n [class.is-visible]=\"isOpen()\" \n [ngClass]=\"config().customClass\"\n #popup \n *ngIf=\"isOpen()\">\n <div class=\"c-popup__overlay\" (click)=\"onCancel()\" #overlay></div>\n <div class=\"c-popup__holder\">\n @if(config().showCloseButton) {\n <core-generic-button\n [config]=\"closeButtonConfig()\"\n (buttonClick)=\"onCancel()\">\n </core-generic-button>\n }\n @if (config().icon) {\n <span class=\"c-popup__icon\" [ngClass]=\"config().icon | coreIconCompat\"></span>\n }\n\n <p class=\"c-popup__title u-heading u-fz--600\">\n {{ config().title | translate: config().messageParams }}\n </p>\n\n @if (config().customTemplate) {\n <ng-container *ngTemplateOutlet=\"config().customTemplate!; context: config().customTemplateContext\"></ng-container>\n } @else {\n \n @if (config().message) {\n <p class=\"c-popup__text u-text\">\n {{ config().message ?? '' | translate: config().messageParams }}\n </p>\n }\n\n @if (config().inputConfig) {\n <label class=\"c-popup__form c-entry-item\">\n <span class=\"c-entry-text\">\n {{ config().inputConfig?.label ?? '' | translate }}\n @if (!config().inputConfig?.validationValue) {\n <span class=\"u-text--muted\"> ({{ 'common.optional' | translate }})</span>\n }\n </span>\n <input \n class=\"c-entry-input\"\n type=\"text\"\n [placeholder]=\"config().inputConfig?.placeholder ?? '' | translate\"\n [(ngModel)]=\"inputValue\"\n (ngModelChange)=\"onInputChange($event)\"\n [required]=\"!!config().inputConfig?.validationValue\"\n >\n </label>\n }\n\n @if (hasFields() && fieldsEditedData()) {\n <div class=\"c-entry-group\">\n @for (field of currentFields(); track field.key) {\n @if (getFieldConfig(field).visible) {\n <div\n coreDynamicField\n [field]=\"getFieldConfig(field)\"\n [value]=\"fieldsEditedData()![$any(field.key)]\"\n [mode]=\"fieldsMode()\"\n [errors]=\"getFieldErrors(field.key.toString())\"\n [rowData]=\"fieldsEditedData()\"\n [formValue]=\"fieldsEditedData()\"\n (valueChange)=\"onFieldValueChange(field.key.toString(), $event)\"\n (onBlurEvent)=\"validateAllFields()\"\n ></div>\n }\n }\n </div>\n }\n\n }\n\n <div class=\"c-popup__btns u-flex u-push-t--xl\">\n @if (config().showCancelButton !== false) {\n <core-generic-button\n [config]=\"cancelButtonConfig()\"\n (buttonClick)=\"onCancel()\">\n </core-generic-button>\n }\n @if (config().showConfirmButton !== false) {\n <core-generic-button\n [config]=\"confirmButtonConfig()\"\n (buttonClick)=\"onConfirm()\">\n </core-generic-button>\n }\n </div>\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "pipe", type: IconCompatPipe, name: "coreIconCompat" }, { kind: "directive", type: DynamicFieldDirective, selector: "[coreDynamicField]", inputs: ["field", "value", "mode", "errors", "rowData", "formValue"], outputs: ["valueChange", "onBlurEvent", "onEnterEvent", "selectionChange"] }] });
10540
10797
  }
10541
10798
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
10542
10799
  type: Component,
10543
- args: [{ selector: 'core-confirmation-dialog', standalone: true, imports: [CommonModule, TranslateModule, FormsModule, GenericButtonComponent, IconCompatPipe], hostDirectives: [CoreHostDirective], template: "<div class=\"c-popup\" \n [class.c-popup--xl]=\"config().size === 'xl'\" \n [class.is-visible]=\"isOpen()\" \n [ngClass]=\"config().customClass\"\n #popup \n *ngIf=\"isOpen()\">\n <div class=\"c-popup__overlay\" (click)=\"onCancel()\" #overlay></div>\n <div class=\"c-popup__holder\">\n @if(config().showCloseButton) {\n <core-generic-button\n [config]=\"closeButtonConfig()\"\n (buttonClick)=\"onCancel()\">\n </core-generic-button>\n }\n @if (config().icon) {\n <span class=\"c-popup__icon\" [ngClass]=\"config().icon | coreIconCompat\"></span>\n }\n\n <p class=\"c-popup__title u-heading u-fz--600\">\n {{ config().title | translate: config().messageParams }}\n </p>\n\n @if (config().customTemplate) {\n <ng-container *ngTemplateOutlet=\"config().customTemplate!; context: config().customTemplateContext\"></ng-container>\n } @else {\n \n @if (config().message) {\n <p class=\"c-popup__text u-text\">\n {{ config().message ?? '' | translate: config().messageParams }}\n </p>\n }\n\n @if (config().inputConfig) {\n <label class=\"c-popup__form c-entry-item\">\n <span class=\"c-entry-text\">\n {{ config().inputConfig?.label ?? '' | translate }}\n @if (!config().inputConfig?.validationValue) {\n <!-- Todo: D\u00F3nde est\u00E1 el .u-text--muted ? -->\n <span class=\"u-text--muted\"> ({{ 'common.optional' | translate }})</span>\n }\n </span>\n <input \n class=\"c-entry-input\"\n type=\"text\"\n [placeholder]=\"config().inputConfig?.placeholder ?? '' | translate\"\n [(ngModel)]=\"inputValue\"\n (ngModelChange)=\"onInputChange($event)\"\n [required]=\"!!config().inputConfig?.validationValue\"\n >\n </label>\n }\n\n }\n\n <div class=\"c-popup__btns u-flex u-push-t--xl\">\n @if (config().showCancelButton !== false) {\n <core-generic-button\n [config]=\"cancelButtonConfig()\"\n (buttonClick)=\"onCancel()\">\n </core-generic-button>\n }\n @if (config().showConfirmButton !== false) {\n <core-generic-button\n [config]=\"confirmButtonConfig()\"\n (buttonClick)=\"onConfirm()\">\n </core-generic-button>\n }\n </div>\n </div>\n</div>" }]
10544
- }], propDecorators: { popupElement: [{
10800
+ args: [{ selector: 'core-confirmation-dialog', standalone: true, imports: [CommonModule, TranslateModule, FormsModule, ReactiveFormsModule, GenericButtonComponent, IconCompatPipe, DynamicFieldDirective], hostDirectives: [CoreHostDirective], template: "<div class=\"c-popup\" \n [class.c-popup--xl]=\"config().size === 'xl'\" \n [class.is-visible]=\"isOpen()\" \n [ngClass]=\"config().customClass\"\n #popup \n *ngIf=\"isOpen()\">\n <div class=\"c-popup__overlay\" (click)=\"onCancel()\" #overlay></div>\n <div class=\"c-popup__holder\">\n @if(config().showCloseButton) {\n <core-generic-button\n [config]=\"closeButtonConfig()\"\n (buttonClick)=\"onCancel()\">\n </core-generic-button>\n }\n @if (config().icon) {\n <span class=\"c-popup__icon\" [ngClass]=\"config().icon | coreIconCompat\"></span>\n }\n\n <p class=\"c-popup__title u-heading u-fz--600\">\n {{ config().title | translate: config().messageParams }}\n </p>\n\n @if (config().customTemplate) {\n <ng-container *ngTemplateOutlet=\"config().customTemplate!; context: config().customTemplateContext\"></ng-container>\n } @else {\n \n @if (config().message) {\n <p class=\"c-popup__text u-text\">\n {{ config().message ?? '' | translate: config().messageParams }}\n </p>\n }\n\n @if (config().inputConfig) {\n <label class=\"c-popup__form c-entry-item\">\n <span class=\"c-entry-text\">\n {{ config().inputConfig?.label ?? '' | translate }}\n @if (!config().inputConfig?.validationValue) {\n <span class=\"u-text--muted\"> ({{ 'common.optional' | translate }})</span>\n }\n </span>\n <input \n class=\"c-entry-input\"\n type=\"text\"\n [placeholder]=\"config().inputConfig?.placeholder ?? '' | translate\"\n [(ngModel)]=\"inputValue\"\n (ngModelChange)=\"onInputChange($event)\"\n [required]=\"!!config().inputConfig?.validationValue\"\n >\n </label>\n }\n\n @if (hasFields() && fieldsEditedData()) {\n <div class=\"c-entry-group\">\n @for (field of currentFields(); track field.key) {\n @if (getFieldConfig(field).visible) {\n <div\n coreDynamicField\n [field]=\"getFieldConfig(field)\"\n [value]=\"fieldsEditedData()![$any(field.key)]\"\n [mode]=\"fieldsMode()\"\n [errors]=\"getFieldErrors(field.key.toString())\"\n [rowData]=\"fieldsEditedData()\"\n [formValue]=\"fieldsEditedData()\"\n (valueChange)=\"onFieldValueChange(field.key.toString(), $event)\"\n (onBlurEvent)=\"validateAllFields()\"\n ></div>\n }\n }\n </div>\n }\n\n }\n\n <div class=\"c-popup__btns u-flex u-push-t--xl\">\n @if (config().showCancelButton !== false) {\n <core-generic-button\n [config]=\"cancelButtonConfig()\"\n (buttonClick)=\"onCancel()\">\n </core-generic-button>\n }\n @if (config().showConfirmButton !== false) {\n <core-generic-button\n [config]=\"confirmButtonConfig()\"\n (buttonClick)=\"onConfirm()\">\n </core-generic-button>\n }\n </div>\n </div>\n</div>" }]
10801
+ }], ctorParameters: () => [], propDecorators: { popupElement: [{
10545
10802
  type: ViewChild,
10546
10803
  args: ['popup']
10547
10804
  }], overlayElement: [{
@@ -14053,8 +14310,8 @@ class GenericTableComponent {
14053
14310
  if (action === TableAction.DELETE && row) {
14054
14311
  this.confirmationDialogService
14055
14312
  .openDelete('dialog.confirmDeletionTitle', 'dialog.confirmDeletionSingle')
14056
- .subscribe(confirmed => {
14057
- if (confirmed) {
14313
+ .subscribe(response => {
14314
+ if (response?.value) {
14058
14315
  this.tableDataService.deleteItem(this.endpoint(), row).subscribe({
14059
14316
  next: (success) => {
14060
14317
  if (success) {
@@ -14076,8 +14333,8 @@ class GenericTableComponent {
14076
14333
  confirmButtonText: this.translationService.instant('table.recover'),
14077
14334
  cancelButtonText: this.translationService.instant('dialog.cancel')
14078
14335
  })
14079
- .subscribe(confirmed => {
14080
- if (confirmed) {
14336
+ .subscribe(response => {
14337
+ if (response?.value) {
14081
14338
  this.tableDataService.recoverItem(this.endpoint(), row).subscribe({
14082
14339
  next: (success) => {
14083
14340
  if (success) {
@@ -17259,11 +17516,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
17259
17516
  // Este archivo es generado automáticamente por scripts/update-version.js
17260
17517
  // No edites manualmente este archivo
17261
17518
  const VERSION = {
17262
- full: '2.20.18',
17519
+ full: '2.20.20',
17263
17520
  major: 2,
17264
17521
  minor: 20,
17265
- patch: 18,
17266
- timestamp: '2026-02-11T13:48:01.302Z',
17522
+ patch: 20,
17523
+ timestamp: '2026-02-11T17:09:57.217Z',
17267
17524
  buildDate: '11/2/2026'
17268
17525
  };
17269
17526