@solcre-org/core-ui 2.20.17 → 2.20.19

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.
@@ -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
  });
@@ -8578,6 +8589,8 @@ class DateUtility {
8578
8589
  return `${dd}/${mm}/${yyyy} ${HH}:${MM}`;
8579
8590
  case 'YYYY-MM-DD HH:mm':
8580
8591
  return `${yyyy}-${mm}-${dd} ${HH}:${MM}`;
8592
+ case 'DD/MM/YYYY':
8593
+ return `${dd}/${mm}/${yyyy}`;
8581
8594
  case 'YYYY-MM-DD':
8582
8595
  return `${yyyy}-${mm}-${dd}`;
8583
8596
  default:
@@ -10447,15 +10460,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
10447
10460
  }], ctorParameters: () => [{ type: PaginationService }, { type: TableDataService }] });
10448
10461
 
10449
10462
  class ConfirmationDialogComponent {
10463
+ formBuilder = inject(FormBuilder);
10450
10464
  popupElement;
10451
10465
  overlayElement;
10452
10466
  customContentTemplate;
10467
+ ModalMode = ModalMode;
10468
+ FieldType = FieldType;
10453
10469
  isOpen = input.required();
10454
10470
  config = input.required();
10455
10471
  confirm = output();
10456
10472
  cancel = output();
10457
10473
  inputValue = signal('');
10458
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
+ });
10459
10492
  closeButtonConfig = computed(() => ({
10460
10493
  type: ButtonType.ICON,
10461
10494
  icon: 'icon-cross',
@@ -10482,11 +10515,237 @@ class ConfirmationDialogComponent {
10482
10515
  get hasCustomContent() {
10483
10516
  return !!this.customContentTemplate;
10484
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
+ }
10485
10734
  onConfirm() {
10735
+ // If has fields, validate first
10736
+ if (this.hasFields()) {
10737
+ this.validateAllFields();
10738
+ if (this.hasFieldErrors()) {
10739
+ return;
10740
+ }
10741
+ }
10486
10742
  const inputConfig = this.config().inputConfig;
10487
10743
  const valueToEmit = inputConfig?.validationValue ? this.inputValue() : true;
10488
10744
  this.closeWithAnimation(() => {
10489
- this.confirm.emit(valueToEmit);
10745
+ this.confirm.emit({
10746
+ value: valueToEmit,
10747
+ fieldsData: this.fieldsEditedData()
10748
+ });
10490
10749
  });
10491
10750
  }
10492
10751
  onCancel() {
@@ -10534,12 +10793,12 @@ class ConfirmationDialogComponent {
10534
10793
  }
10535
10794
  }
10536
10795
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10537
- 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"] }] });
10538
10797
  }
10539
10798
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogComponent, decorators: [{
10540
10799
  type: Component,
10541
- 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>" }]
10542
- }], 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: [{
10543
10802
  type: ViewChild,
10544
10803
  args: ['popup']
10545
10804
  }], overlayElement: [{
@@ -14051,8 +14310,8 @@ class GenericTableComponent {
14051
14310
  if (action === TableAction.DELETE && row) {
14052
14311
  this.confirmationDialogService
14053
14312
  .openDelete('dialog.confirmDeletionTitle', 'dialog.confirmDeletionSingle')
14054
- .subscribe(confirmed => {
14055
- if (confirmed) {
14313
+ .subscribe(response => {
14314
+ if (response?.value) {
14056
14315
  this.tableDataService.deleteItem(this.endpoint(), row).subscribe({
14057
14316
  next: (success) => {
14058
14317
  if (success) {
@@ -14074,8 +14333,8 @@ class GenericTableComponent {
14074
14333
  confirmButtonText: this.translationService.instant('table.recover'),
14075
14334
  cancelButtonText: this.translationService.instant('dialog.cancel')
14076
14335
  })
14077
- .subscribe(confirmed => {
14078
- if (confirmed) {
14336
+ .subscribe(response => {
14337
+ if (response?.value) {
14079
14338
  this.tableDataService.recoverItem(this.endpoint(), row).subscribe({
14080
14339
  next: (success) => {
14081
14340
  if (success) {
@@ -17257,12 +17516,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
17257
17516
  // Este archivo es generado automáticamente por scripts/update-version.js
17258
17517
  // No edites manualmente este archivo
17259
17518
  const VERSION = {
17260
- full: '2.20.17',
17519
+ full: '2.20.19',
17261
17520
  major: 2,
17262
17521
  minor: 20,
17263
- patch: 17,
17264
- timestamp: '2026-02-09T15:27:02.438Z',
17265
- buildDate: '9/2/2026'
17522
+ patch: 19,
17523
+ timestamp: '2026-02-11T16:03:55.613Z',
17524
+ buildDate: '11/2/2026'
17266
17525
  };
17267
17526
 
17268
17527
  class MainNavComponent {