@solcre-org/core-ui 2.12.7 → 2.12.9
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.
|
@@ -104,6 +104,12 @@
|
|
|
104
104
|
"noResults": "No se encontraron resultados",
|
|
105
105
|
"typeToSearch": "Escribe para buscar"
|
|
106
106
|
}
|
|
107
|
+
},
|
|
108
|
+
"unsavedChanges": {
|
|
109
|
+
"title": "Cambios sin guardar",
|
|
110
|
+
"message": "Tienes cambios sin guardar. ¿Estás seguro de que quieres cerrar el modal?",
|
|
111
|
+
"confirm": "Cerrar sin guardar",
|
|
112
|
+
"cancel": "Continuar editando"
|
|
107
113
|
}
|
|
108
114
|
},
|
|
109
115
|
"dashboard": {
|
|
@@ -4005,10 +4005,107 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
4005
4005
|
args: ['customTabTemplate']
|
|
4006
4006
|
}] } });
|
|
4007
4007
|
|
|
4008
|
+
var DialogActions;
|
|
4009
|
+
(function (DialogActions) {
|
|
4010
|
+
DialogActions["CONFIRM"] = "dialog.confirm";
|
|
4011
|
+
DialogActions["CANCEL"] = "dialog.cancel";
|
|
4012
|
+
})(DialogActions || (DialogActions = {}));
|
|
4013
|
+
|
|
4014
|
+
class ConfirmationDialogService {
|
|
4015
|
+
isOpen = signal(false);
|
|
4016
|
+
isOpen$ = this.isOpen.asReadonly();
|
|
4017
|
+
config = signal({ title: '' });
|
|
4018
|
+
config$ = this.config.asReadonly();
|
|
4019
|
+
responseSubject = new Subject();
|
|
4020
|
+
response$ = this.responseSubject.asObservable();
|
|
4021
|
+
openDelete(title, message, validationValue) {
|
|
4022
|
+
return this.open({
|
|
4023
|
+
title,
|
|
4024
|
+
message,
|
|
4025
|
+
type: 'delete',
|
|
4026
|
+
icon: 'icon-delete',
|
|
4027
|
+
confirmButtonText: 'dialog.delete',
|
|
4028
|
+
cancelButtonText: 'dialog.cancel',
|
|
4029
|
+
confirmButtonClass: 'c-btn context:error',
|
|
4030
|
+
inputConfig: validationValue ? {
|
|
4031
|
+
label: 'dialog.confirmName',
|
|
4032
|
+
placeholder: 'dialog.enterName',
|
|
4033
|
+
validationValue
|
|
4034
|
+
} : undefined,
|
|
4035
|
+
showCloseButton: true
|
|
4036
|
+
});
|
|
4037
|
+
}
|
|
4038
|
+
openConfirm(config) {
|
|
4039
|
+
return this.open({
|
|
4040
|
+
...config,
|
|
4041
|
+
type: 'default',
|
|
4042
|
+
size: config.size || 'default',
|
|
4043
|
+
showCloseButton: config.showCloseButton ?? true
|
|
4044
|
+
});
|
|
4045
|
+
}
|
|
4046
|
+
open(config) {
|
|
4047
|
+
this.config.set({
|
|
4048
|
+
...config,
|
|
4049
|
+
confirmButtonText: config.confirmButtonText ?? DialogActions.CONFIRM,
|
|
4050
|
+
cancelButtonText: config.cancelButtonText ?? DialogActions.CANCEL,
|
|
4051
|
+
messageParams: config.messageParams ?? {},
|
|
4052
|
+
showCloseButton: config.showCloseButton ?? true
|
|
4053
|
+
});
|
|
4054
|
+
this.isOpen.set(true);
|
|
4055
|
+
return this.response$;
|
|
4056
|
+
}
|
|
4057
|
+
confirm(value) {
|
|
4058
|
+
this.responseSubject.next(value);
|
|
4059
|
+
this.close();
|
|
4060
|
+
}
|
|
4061
|
+
cancel() {
|
|
4062
|
+
this.responseSubject.next(undefined);
|
|
4063
|
+
this.close();
|
|
4064
|
+
}
|
|
4065
|
+
close() {
|
|
4066
|
+
this.isOpen.set(false);
|
|
4067
|
+
this.config.set({ title: '' });
|
|
4068
|
+
const newSubject = new Subject();
|
|
4069
|
+
const oldSubject = this.responseSubject;
|
|
4070
|
+
this.responseSubject = newSubject;
|
|
4071
|
+
this.response$ = this.responseSubject.asObservable();
|
|
4072
|
+
oldSubject.complete();
|
|
4073
|
+
}
|
|
4074
|
+
openWithOptionalInput(title, message, inputLabel, inputPlaceholder) {
|
|
4075
|
+
return this.open({
|
|
4076
|
+
title,
|
|
4077
|
+
message,
|
|
4078
|
+
type: 'default',
|
|
4079
|
+
confirmButtonText: 'dialog.confirm',
|
|
4080
|
+
cancelButtonText: 'dialog.cancel',
|
|
4081
|
+
inputConfig: inputLabel ? {
|
|
4082
|
+
label: inputLabel,
|
|
4083
|
+
placeholder: inputPlaceholder || '',
|
|
4084
|
+
} : undefined,
|
|
4085
|
+
showCloseButton: true
|
|
4086
|
+
});
|
|
4087
|
+
}
|
|
4088
|
+
updateConfig(config) {
|
|
4089
|
+
this.config.update(currentConfig => ({
|
|
4090
|
+
...currentConfig,
|
|
4091
|
+
...config
|
|
4092
|
+
}));
|
|
4093
|
+
}
|
|
4094
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4095
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogService, providedIn: 'root' });
|
|
4096
|
+
}
|
|
4097
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogService, decorators: [{
|
|
4098
|
+
type: Injectable,
|
|
4099
|
+
args: [{
|
|
4100
|
+
providedIn: 'root',
|
|
4101
|
+
}]
|
|
4102
|
+
}] });
|
|
4103
|
+
|
|
4008
4104
|
class GenericModalComponent {
|
|
4009
4105
|
elementRef = inject(ElementRef);
|
|
4010
4106
|
formBuilder = inject(FormBuilder);
|
|
4011
4107
|
domSanitizer = inject(DomSanitizer);
|
|
4108
|
+
confirmationDialogService = inject(ConfirmationDialogService);
|
|
4012
4109
|
ModalMode = ModalMode;
|
|
4013
4110
|
FieldType = FieldType;
|
|
4014
4111
|
isClosing = signal(false);
|
|
@@ -4025,6 +4122,7 @@ class GenericModalComponent {
|
|
|
4025
4122
|
modelFactory = input(null);
|
|
4026
4123
|
errors = input([]);
|
|
4027
4124
|
validators = input([]);
|
|
4125
|
+
customHasChanges = input(false);
|
|
4028
4126
|
save = output();
|
|
4029
4127
|
close = output();
|
|
4030
4128
|
modalData = output();
|
|
@@ -4034,6 +4132,8 @@ class GenericModalComponent {
|
|
|
4034
4132
|
isInitialized = signal(false);
|
|
4035
4133
|
form = signal(this.formBuilder.group({}));
|
|
4036
4134
|
activeTabId = signal('');
|
|
4135
|
+
originalData = signal(null);
|
|
4136
|
+
hasUnsavedChanges = signal(false);
|
|
4037
4137
|
hasTabs = computed(() => this.tabs().length > 0);
|
|
4038
4138
|
allFields = computed(() => {
|
|
4039
4139
|
if (this.hasTabs()) {
|
|
@@ -4141,6 +4241,8 @@ class GenericModalComponent {
|
|
|
4141
4241
|
this.internalErrors.set([]);
|
|
4142
4242
|
this.fieldErrors.set({});
|
|
4143
4243
|
this.isInitialized.set(false);
|
|
4244
|
+
this.originalData.set(null);
|
|
4245
|
+
this.hasUnsavedChanges.set(false);
|
|
4144
4246
|
return;
|
|
4145
4247
|
}
|
|
4146
4248
|
if (!this.isInitialized()) {
|
|
@@ -4149,6 +4251,21 @@ class GenericModalComponent {
|
|
|
4149
4251
|
this.isInitialized.set(true);
|
|
4150
4252
|
}
|
|
4151
4253
|
});
|
|
4254
|
+
effect(() => {
|
|
4255
|
+
const editedData = this.editedData();
|
|
4256
|
+
const originalData = this.originalData();
|
|
4257
|
+
const customHasChanges = this.customHasChanges();
|
|
4258
|
+
if (this.mode() !== ModalMode.VIEW) {
|
|
4259
|
+
let hasChanges = false;
|
|
4260
|
+
if (this.customTemplate() && customHasChanges !== undefined) {
|
|
4261
|
+
hasChanges = customHasChanges;
|
|
4262
|
+
}
|
|
4263
|
+
else if (!this.customTemplate() && editedData && originalData) {
|
|
4264
|
+
hasChanges = this.detectFormChanges(editedData, originalData);
|
|
4265
|
+
}
|
|
4266
|
+
this.hasUnsavedChanges.set(hasChanges);
|
|
4267
|
+
}
|
|
4268
|
+
});
|
|
4152
4269
|
}
|
|
4153
4270
|
initializeData() {
|
|
4154
4271
|
const data = this.data();
|
|
@@ -4222,6 +4339,11 @@ class GenericModalComponent {
|
|
|
4222
4339
|
this.internalErrors.set([]);
|
|
4223
4340
|
}, 0);
|
|
4224
4341
|
this.editedData.set(newInstance);
|
|
4342
|
+
if (this.mode() !== ModalMode.VIEW) {
|
|
4343
|
+
const originalCopy = Object.create(Object.getPrototypeOf(newInstance));
|
|
4344
|
+
Object.assign(originalCopy, newInstance);
|
|
4345
|
+
this.originalData.set(originalCopy);
|
|
4346
|
+
}
|
|
4225
4347
|
setTimeout(() => {
|
|
4226
4348
|
this.modalData.emit(newInstance);
|
|
4227
4349
|
}, 1);
|
|
@@ -4418,8 +4540,12 @@ class GenericModalComponent {
|
|
|
4418
4540
|
if (data) {
|
|
4419
4541
|
const filteredData = this.filterPayloadData(data);
|
|
4420
4542
|
this.save.emit(filteredData);
|
|
4543
|
+
this.hasUnsavedChanges.set(false);
|
|
4421
4544
|
}
|
|
4422
4545
|
}
|
|
4546
|
+
setCustomHasChanges(hasChanges) {
|
|
4547
|
+
this.hasUnsavedChanges.set(hasChanges);
|
|
4548
|
+
}
|
|
4423
4549
|
filterPayloadData(data) {
|
|
4424
4550
|
let clonedData;
|
|
4425
4551
|
const factory = this.modelFactory();
|
|
@@ -4476,6 +4602,26 @@ class GenericModalComponent {
|
|
|
4476
4602
|
});
|
|
4477
4603
|
}
|
|
4478
4604
|
onClose() {
|
|
4605
|
+
if (this.hasUnsavedChanges() && this.mode() !== ModalMode.VIEW) {
|
|
4606
|
+
this.confirmationDialogService.openConfirm({
|
|
4607
|
+
title: 'modal.unsavedChanges.title',
|
|
4608
|
+
message: 'modal.unsavedChanges.message',
|
|
4609
|
+
confirmButtonText: 'modal.unsavedChanges.confirm',
|
|
4610
|
+
cancelButtonText: 'modal.unsavedChanges.cancel',
|
|
4611
|
+
type: 'default',
|
|
4612
|
+
icon: 'icon-warning',
|
|
4613
|
+
showCloseButton: true
|
|
4614
|
+
}).subscribe((confirmed) => {
|
|
4615
|
+
if (confirmed) {
|
|
4616
|
+
this.forceClose();
|
|
4617
|
+
}
|
|
4618
|
+
});
|
|
4619
|
+
}
|
|
4620
|
+
else {
|
|
4621
|
+
this.forceClose();
|
|
4622
|
+
}
|
|
4623
|
+
}
|
|
4624
|
+
forceClose() {
|
|
4479
4625
|
this.isClosing.set(true);
|
|
4480
4626
|
const overlay = this.elementRef.nativeElement.querySelector('.c-modal__overlay');
|
|
4481
4627
|
const onAnimationEnd = (e) => {
|
|
@@ -4485,7 +4631,15 @@ class GenericModalComponent {
|
|
|
4485
4631
|
overlay.removeEventListener('animationend', onAnimationEnd);
|
|
4486
4632
|
}
|
|
4487
4633
|
};
|
|
4488
|
-
overlay
|
|
4634
|
+
if (overlay) {
|
|
4635
|
+
overlay.addEventListener('animationend', onAnimationEnd);
|
|
4636
|
+
}
|
|
4637
|
+
else {
|
|
4638
|
+
setTimeout(() => {
|
|
4639
|
+
this.isClosing.set(false);
|
|
4640
|
+
this.close.emit();
|
|
4641
|
+
}, 300);
|
|
4642
|
+
}
|
|
4489
4643
|
}
|
|
4490
4644
|
getFieldConfig(field) {
|
|
4491
4645
|
const modeConfig = field.modes?.[this.mode()];
|
|
@@ -4566,8 +4720,26 @@ class GenericModalComponent {
|
|
|
4566
4720
|
return fieldErrors.length > 0;
|
|
4567
4721
|
});
|
|
4568
4722
|
}
|
|
4723
|
+
detectFormChanges(editedData, originalData) {
|
|
4724
|
+
const relevantFields = this.allFields().filter(field => {
|
|
4725
|
+
const modeConfig = field.modes?.[this.mode()];
|
|
4726
|
+
return modeConfig?.visible !== false;
|
|
4727
|
+
});
|
|
4728
|
+
return relevantFields.some(field => {
|
|
4729
|
+
const fieldKey = field.key;
|
|
4730
|
+
const editedValue = editedData[fieldKey];
|
|
4731
|
+
const originalValue = originalData[fieldKey];
|
|
4732
|
+
if (Array.isArray(editedValue) && Array.isArray(originalValue)) {
|
|
4733
|
+
return JSON.stringify(editedValue) !== JSON.stringify(originalValue);
|
|
4734
|
+
}
|
|
4735
|
+
if (editedValue instanceof Date && originalValue instanceof Date) {
|
|
4736
|
+
return editedValue.getTime() !== originalValue.getTime();
|
|
4737
|
+
}
|
|
4738
|
+
return editedValue !== originalValue;
|
|
4739
|
+
});
|
|
4740
|
+
}
|
|
4569
4741
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4570
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericModalComponent, isStandalone: true, selector: "core-generic-modal", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, isMultiple: { classPropertyName: "isMultiple", publicName: "isMultiple", isSignal: true, isRequired: false, transformFunction: null }, customTemplate: { classPropertyName: "customTemplate", publicName: "customTemplate", isSignal: true, isRequired: false, transformFunction: null }, customViewTemplate: { classPropertyName: "customViewTemplate", publicName: "customViewTemplate", isSignal: true, isRequired: false, transformFunction: null }, buttonConfig: { classPropertyName: "buttonConfig", publicName: "buttonConfig", isSignal: true, isRequired: false, transformFunction: null }, modelFactory: { classPropertyName: "modelFactory", publicName: "modelFactory", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, validators: { classPropertyName: "validators", publicName: "validators", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { save: "save", close: "close", modalData: "modalData" }, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<div class=\"c-modal\" [class.is-visible]=\"isOpen()\" [class.is-closing]=\"isClosing()\">\n <div class=\"c-modal__overlay\" (click)=\"onClose()\"></div>\n <div class=\"c-modal__holder\">\n <div class=\"c-modal__header\">\n <p class=\"c-modal__title\">\n {{ title() | translate }}\n </p>\n <core-generic-button\n [config]=\"closeButtonConfig()\"\n (buttonClick)=\"onClose()\">\n </core-generic-button>\n </div>\n <div class=\"c-modal__body\">\n @if (editedData()) {\n @if (hasTabs()) {\n <nav core-generic-tabs\n [config]=\"genericTabsConfig()\"\n [activeTabId]=\"activeTabId()\"\n [hasTabErrors]=\"hasTabErrorsFunction\"\n (tabChange)=\"onGenericTabChange($event)\">\n </nav>\n }\n\n @if (mode() === ModalMode.VIEW) {\n <core-data-list\n [items]=\"dataListItems()\"\n [customTemplate]=\"customViewTemplate()\"\n [emptyMessage]=\"'modal.noData'\"\n ></core-data-list>\n } @else {\n <div class=\"c-entry-group\">\n @if (customTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"customTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: editedData(),\n mode: mode(),\n updateField: onFieldValueChange.bind(this),\n save: onSave.bind(this),\n close: onClose.bind(this),\n activeTabId: activeTabId(),\n onTabChange: onTabChange.bind(this),\n getFieldErrors: getFieldErrors.bind(this),\n validateAllFields: validateAllFields.bind(this),\n hasErrors: hasErrors()\n }\"\n ></ng-container>\n } @else {\n @for (field of (hasTabs() ? activeTabFields() : fields()); track field.key) {\n @if (getFieldConfig(field).visible) {\n <div\n coreDynamicField\n [field]=\"getFieldConfig(field)\"\n [value]=\"editedData()![field.key]\"\n [mode]=\"mode()\"\n [errors]=\"getFieldErrors(field.key)\"\n [rowData]=\"editedData()\"\n [formValue]=\"editedData()\"\n (valueChange)=\"onFieldValueChange(field.key, $event)\"\n (onBlurEvent)=\"validateAllFields()\"\n (selectionChange)=\"onSelectionChange($event)\"\n ></div>\n }\n }\n }\n </div> <!-- .c-entry-group -->\n }\n } @else {\n <p>{{ 'modal.noData' | translate }}</p>\n }\n </div>\n <div class=\"c-modal__bottom\">\n @if (buttonConfig().length > 0) {\n @for (button of buttonConfig(); track $index) {\n <core-generic-button\n [config]=\"getCustomButtonConfig(button)\"\n [data]=\"data()\"\n (buttonClick)=\"onCustomButtonClick(button)\">\n </core-generic-button>\n }\n } @else {\n <core-generic-button\n [config]=\"defaultCancelButtonConfig()\"\n (buttonClick)=\"onClose()\">\n </core-generic-button>\n @if (mode() !== ModalMode.VIEW) {\n <core-generic-button\n [config]=\"defaultSaveButtonConfig()\"\n (buttonClick)=\"onSave()\">\n </core-generic-button>\n }\n }\n </div>\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "directive", type: DynamicFieldDirective, selector: "[coreDynamicField]", inputs: ["field", "value", "mode", "errors", "rowData", "formValue"], outputs: ["valueChange", "onBlurEvent", "onEnterEvent", "selectionChange"] }, { kind: "component", type: GenericTabsComponent, selector: "nav[core-generic-tabs]", inputs: ["config", "activeTabId", "hasTabErrors"], outputs: ["tabClick", "tabChange"] }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "component", type: DataListComponent, selector: "core-data-list", inputs: ["items", "fields", "data", "customTemplate", "showEmptyMessage", "emptyMessage", "cssClasses"] }] });
|
|
4742
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericModalComponent, isStandalone: true, selector: "core-generic-modal", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, tabs: { classPropertyName: "tabs", publicName: "tabs", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, isMultiple: { classPropertyName: "isMultiple", publicName: "isMultiple", isSignal: true, isRequired: false, transformFunction: null }, customTemplate: { classPropertyName: "customTemplate", publicName: "customTemplate", isSignal: true, isRequired: false, transformFunction: null }, customViewTemplate: { classPropertyName: "customViewTemplate", publicName: "customViewTemplate", isSignal: true, isRequired: false, transformFunction: null }, buttonConfig: { classPropertyName: "buttonConfig", publicName: "buttonConfig", isSignal: true, isRequired: false, transformFunction: null }, modelFactory: { classPropertyName: "modelFactory", publicName: "modelFactory", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, validators: { classPropertyName: "validators", publicName: "validators", isSignal: true, isRequired: false, transformFunction: null }, customHasChanges: { classPropertyName: "customHasChanges", publicName: "customHasChanges", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { save: "save", close: "close", modalData: "modalData" }, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<div class=\"c-modal\" [class.is-visible]=\"isOpen()\" [class.is-closing]=\"isClosing()\">\n <div class=\"c-modal__overlay\" (click)=\"onClose()\"></div>\n <div class=\"c-modal__holder\">\n <div class=\"c-modal__header\">\n <p class=\"c-modal__title\">\n {{ title() | translate }}\n </p>\n <core-generic-button\n [config]=\"closeButtonConfig()\"\n (buttonClick)=\"onClose()\">\n </core-generic-button>\n </div>\n <div class=\"c-modal__body\">\n @if (editedData()) {\n @if (hasTabs()) {\n <nav core-generic-tabs\n [config]=\"genericTabsConfig()\"\n [activeTabId]=\"activeTabId()\"\n [hasTabErrors]=\"hasTabErrorsFunction\"\n (tabChange)=\"onGenericTabChange($event)\">\n </nav>\n }\n\n @if (mode() === ModalMode.VIEW) {\n <core-data-list\n [items]=\"dataListItems()\"\n [customTemplate]=\"customViewTemplate()\"\n [emptyMessage]=\"'modal.noData'\"\n ></core-data-list>\n } @else {\n <div class=\"c-entry-group\">\n @if (customTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"customTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: editedData(),\n mode: mode(),\n updateField: onFieldValueChange.bind(this),\n save: onSave.bind(this),\n close: onClose.bind(this),\n activeTabId: activeTabId(),\n onTabChange: onTabChange.bind(this),\n getFieldErrors: getFieldErrors.bind(this),\n validateAllFields: validateAllFields.bind(this),\n hasErrors: hasErrors(),\n setCustomHasChanges: setCustomHasChanges.bind(this)\n }\"\n ></ng-container>\n } @else {\n @for (field of (hasTabs() ? activeTabFields() : fields()); track field.key) {\n @if (getFieldConfig(field).visible) {\n <div\n coreDynamicField\n [field]=\"getFieldConfig(field)\"\n [value]=\"editedData()![field.key]\"\n [mode]=\"mode()\"\n [errors]=\"getFieldErrors(field.key)\"\n [rowData]=\"editedData()\"\n [formValue]=\"editedData()\"\n (valueChange)=\"onFieldValueChange(field.key, $event)\"\n (onBlurEvent)=\"validateAllFields()\"\n (selectionChange)=\"onSelectionChange($event)\"\n ></div>\n }\n }\n }\n </div> <!-- .c-entry-group -->\n }\n } @else {\n <p>{{ 'modal.noData' | translate }}</p>\n }\n </div>\n <div class=\"c-modal__bottom\">\n @if (buttonConfig().length > 0) {\n @for (button of buttonConfig(); track $index) {\n <core-generic-button\n [config]=\"getCustomButtonConfig(button)\"\n [data]=\"data()\"\n (buttonClick)=\"onCustomButtonClick(button)\">\n </core-generic-button>\n }\n } @else {\n <core-generic-button\n [config]=\"defaultCancelButtonConfig()\"\n (buttonClick)=\"onClose()\">\n </core-generic-button>\n @if (mode() !== ModalMode.VIEW) {\n <core-generic-button\n [config]=\"defaultSaveButtonConfig()\"\n (buttonClick)=\"onSave()\">\n </core-generic-button>\n }\n }\n </div>\n </div>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "directive", type: DynamicFieldDirective, selector: "[coreDynamicField]", inputs: ["field", "value", "mode", "errors", "rowData", "formValue"], outputs: ["valueChange", "onBlurEvent", "onEnterEvent", "selectionChange"] }, { kind: "component", type: GenericTabsComponent, selector: "nav[core-generic-tabs]", inputs: ["config", "activeTabId", "hasTabErrors"], outputs: ["tabClick", "tabChange"] }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "component", type: DataListComponent, selector: "core-data-list", inputs: ["items", "fields", "data", "customTemplate", "showEmptyMessage", "emptyMessage", "cssClasses"] }] });
|
|
4571
4743
|
}
|
|
4572
4744
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericModalComponent, decorators: [{
|
|
4573
4745
|
type: Component,
|
|
@@ -4580,7 +4752,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
4580
4752
|
GenericTabsComponent,
|
|
4581
4753
|
GenericButtonComponent,
|
|
4582
4754
|
DataListComponent,
|
|
4583
|
-
], hostDirectives: [CoreHostDirective], template: "<div class=\"c-modal\" [class.is-visible]=\"isOpen()\" [class.is-closing]=\"isClosing()\">\n <div class=\"c-modal__overlay\" (click)=\"onClose()\"></div>\n <div class=\"c-modal__holder\">\n <div class=\"c-modal__header\">\n <p class=\"c-modal__title\">\n {{ title() | translate }}\n </p>\n <core-generic-button\n [config]=\"closeButtonConfig()\"\n (buttonClick)=\"onClose()\">\n </core-generic-button>\n </div>\n <div class=\"c-modal__body\">\n @if (editedData()) {\n @if (hasTabs()) {\n <nav core-generic-tabs\n [config]=\"genericTabsConfig()\"\n [activeTabId]=\"activeTabId()\"\n [hasTabErrors]=\"hasTabErrorsFunction\"\n (tabChange)=\"onGenericTabChange($event)\">\n </nav>\n }\n\n @if (mode() === ModalMode.VIEW) {\n <core-data-list\n [items]=\"dataListItems()\"\n [customTemplate]=\"customViewTemplate()\"\n [emptyMessage]=\"'modal.noData'\"\n ></core-data-list>\n } @else {\n <div class=\"c-entry-group\">\n @if (customTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"customTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: editedData(),\n mode: mode(),\n updateField: onFieldValueChange.bind(this),\n save: onSave.bind(this),\n close: onClose.bind(this),\n activeTabId: activeTabId(),\n onTabChange: onTabChange.bind(this),\n getFieldErrors: getFieldErrors.bind(this),\n validateAllFields: validateAllFields.bind(this),\n hasErrors: hasErrors()\n }\"\n ></ng-container>\n } @else {\n @for (field of (hasTabs() ? activeTabFields() : fields()); track field.key) {\n @if (getFieldConfig(field).visible) {\n <div\n coreDynamicField\n [field]=\"getFieldConfig(field)\"\n [value]=\"editedData()![field.key]\"\n [mode]=\"mode()\"\n [errors]=\"getFieldErrors(field.key)\"\n [rowData]=\"editedData()\"\n [formValue]=\"editedData()\"\n (valueChange)=\"onFieldValueChange(field.key, $event)\"\n (onBlurEvent)=\"validateAllFields()\"\n (selectionChange)=\"onSelectionChange($event)\"\n ></div>\n }\n }\n }\n </div> <!-- .c-entry-group -->\n }\n } @else {\n <p>{{ 'modal.noData' | translate }}</p>\n }\n </div>\n <div class=\"c-modal__bottom\">\n @if (buttonConfig().length > 0) {\n @for (button of buttonConfig(); track $index) {\n <core-generic-button\n [config]=\"getCustomButtonConfig(button)\"\n [data]=\"data()\"\n (buttonClick)=\"onCustomButtonClick(button)\">\n </core-generic-button>\n }\n } @else {\n <core-generic-button\n [config]=\"defaultCancelButtonConfig()\"\n (buttonClick)=\"onClose()\">\n </core-generic-button>\n @if (mode() !== ModalMode.VIEW) {\n <core-generic-button\n [config]=\"defaultSaveButtonConfig()\"\n (buttonClick)=\"onSave()\">\n </core-generic-button>\n }\n }\n </div>\n </div>\n</div>" }]
|
|
4755
|
+
], hostDirectives: [CoreHostDirective], template: "<div class=\"c-modal\" [class.is-visible]=\"isOpen()\" [class.is-closing]=\"isClosing()\">\n <div class=\"c-modal__overlay\" (click)=\"onClose()\"></div>\n <div class=\"c-modal__holder\">\n <div class=\"c-modal__header\">\n <p class=\"c-modal__title\">\n {{ title() | translate }}\n </p>\n <core-generic-button\n [config]=\"closeButtonConfig()\"\n (buttonClick)=\"onClose()\">\n </core-generic-button>\n </div>\n <div class=\"c-modal__body\">\n @if (editedData()) {\n @if (hasTabs()) {\n <nav core-generic-tabs\n [config]=\"genericTabsConfig()\"\n [activeTabId]=\"activeTabId()\"\n [hasTabErrors]=\"hasTabErrorsFunction\"\n (tabChange)=\"onGenericTabChange($event)\">\n </nav>\n }\n\n @if (mode() === ModalMode.VIEW) {\n <core-data-list\n [items]=\"dataListItems()\"\n [customTemplate]=\"customViewTemplate()\"\n [emptyMessage]=\"'modal.noData'\"\n ></core-data-list>\n } @else {\n <div class=\"c-entry-group\">\n @if (customTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"customTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: editedData(),\n mode: mode(),\n updateField: onFieldValueChange.bind(this),\n save: onSave.bind(this),\n close: onClose.bind(this),\n activeTabId: activeTabId(),\n onTabChange: onTabChange.bind(this),\n getFieldErrors: getFieldErrors.bind(this),\n validateAllFields: validateAllFields.bind(this),\n hasErrors: hasErrors(),\n setCustomHasChanges: setCustomHasChanges.bind(this)\n }\"\n ></ng-container>\n } @else {\n @for (field of (hasTabs() ? activeTabFields() : fields()); track field.key) {\n @if (getFieldConfig(field).visible) {\n <div\n coreDynamicField\n [field]=\"getFieldConfig(field)\"\n [value]=\"editedData()![field.key]\"\n [mode]=\"mode()\"\n [errors]=\"getFieldErrors(field.key)\"\n [rowData]=\"editedData()\"\n [formValue]=\"editedData()\"\n (valueChange)=\"onFieldValueChange(field.key, $event)\"\n (onBlurEvent)=\"validateAllFields()\"\n (selectionChange)=\"onSelectionChange($event)\"\n ></div>\n }\n }\n }\n </div> <!-- .c-entry-group -->\n }\n } @else {\n <p>{{ 'modal.noData' | translate }}</p>\n }\n </div>\n <div class=\"c-modal__bottom\">\n @if (buttonConfig().length > 0) {\n @for (button of buttonConfig(); track $index) {\n <core-generic-button\n [config]=\"getCustomButtonConfig(button)\"\n [data]=\"data()\"\n (buttonClick)=\"onCustomButtonClick(button)\">\n </core-generic-button>\n }\n } @else {\n <core-generic-button\n [config]=\"defaultCancelButtonConfig()\"\n (buttonClick)=\"onClose()\">\n </core-generic-button>\n @if (mode() !== ModalMode.VIEW) {\n <core-generic-button\n [config]=\"defaultSaveButtonConfig()\"\n (buttonClick)=\"onSave()\">\n </core-generic-button>\n }\n }\n </div>\n </div>\n</div>" }]
|
|
4584
4756
|
}], ctorParameters: () => [] });
|
|
4585
4757
|
|
|
4586
4758
|
class PaginationService {
|
|
@@ -6217,102 +6389,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
6217
6389
|
type: Input
|
|
6218
6390
|
}] } });
|
|
6219
6391
|
|
|
6220
|
-
var DialogActions;
|
|
6221
|
-
(function (DialogActions) {
|
|
6222
|
-
DialogActions["CONFIRM"] = "dialog.confirm";
|
|
6223
|
-
DialogActions["CANCEL"] = "dialog.cancel";
|
|
6224
|
-
})(DialogActions || (DialogActions = {}));
|
|
6225
|
-
|
|
6226
|
-
class ConfirmationDialogService {
|
|
6227
|
-
isOpen = signal(false);
|
|
6228
|
-
isOpen$ = this.isOpen.asReadonly();
|
|
6229
|
-
config = signal({ title: '' });
|
|
6230
|
-
config$ = this.config.asReadonly();
|
|
6231
|
-
responseSubject = new Subject();
|
|
6232
|
-
response$ = this.responseSubject.asObservable();
|
|
6233
|
-
openDelete(title, message, validationValue) {
|
|
6234
|
-
return this.open({
|
|
6235
|
-
title,
|
|
6236
|
-
message,
|
|
6237
|
-
type: 'delete',
|
|
6238
|
-
icon: 'icon-delete',
|
|
6239
|
-
confirmButtonText: 'dialog.delete',
|
|
6240
|
-
cancelButtonText: 'dialog.cancel',
|
|
6241
|
-
confirmButtonClass: 'c-btn context:error',
|
|
6242
|
-
inputConfig: validationValue ? {
|
|
6243
|
-
label: 'dialog.confirmName',
|
|
6244
|
-
placeholder: 'dialog.enterName',
|
|
6245
|
-
validationValue
|
|
6246
|
-
} : undefined,
|
|
6247
|
-
showCloseButton: true
|
|
6248
|
-
});
|
|
6249
|
-
}
|
|
6250
|
-
openConfirm(config) {
|
|
6251
|
-
return this.open({
|
|
6252
|
-
...config,
|
|
6253
|
-
type: 'default',
|
|
6254
|
-
size: config.size || 'default',
|
|
6255
|
-
showCloseButton: config.showCloseButton ?? true
|
|
6256
|
-
});
|
|
6257
|
-
}
|
|
6258
|
-
open(config) {
|
|
6259
|
-
this.config.set({
|
|
6260
|
-
...config,
|
|
6261
|
-
confirmButtonText: config.confirmButtonText ?? DialogActions.CONFIRM,
|
|
6262
|
-
cancelButtonText: config.cancelButtonText ?? DialogActions.CANCEL,
|
|
6263
|
-
messageParams: config.messageParams ?? {},
|
|
6264
|
-
showCloseButton: config.showCloseButton ?? true
|
|
6265
|
-
});
|
|
6266
|
-
this.isOpen.set(true);
|
|
6267
|
-
return this.response$;
|
|
6268
|
-
}
|
|
6269
|
-
confirm(value) {
|
|
6270
|
-
this.responseSubject.next(value);
|
|
6271
|
-
this.close();
|
|
6272
|
-
}
|
|
6273
|
-
cancel() {
|
|
6274
|
-
this.responseSubject.next(undefined);
|
|
6275
|
-
this.close();
|
|
6276
|
-
}
|
|
6277
|
-
close() {
|
|
6278
|
-
this.isOpen.set(false);
|
|
6279
|
-
this.config.set({ title: '' });
|
|
6280
|
-
const newSubject = new Subject();
|
|
6281
|
-
const oldSubject = this.responseSubject;
|
|
6282
|
-
this.responseSubject = newSubject;
|
|
6283
|
-
this.response$ = this.responseSubject.asObservable();
|
|
6284
|
-
oldSubject.complete();
|
|
6285
|
-
}
|
|
6286
|
-
openWithOptionalInput(title, message, inputLabel, inputPlaceholder) {
|
|
6287
|
-
return this.open({
|
|
6288
|
-
title,
|
|
6289
|
-
message,
|
|
6290
|
-
type: 'default',
|
|
6291
|
-
confirmButtonText: 'dialog.confirm',
|
|
6292
|
-
cancelButtonText: 'dialog.cancel',
|
|
6293
|
-
inputConfig: inputLabel ? {
|
|
6294
|
-
label: inputLabel,
|
|
6295
|
-
placeholder: inputPlaceholder || '',
|
|
6296
|
-
} : undefined,
|
|
6297
|
-
showCloseButton: true
|
|
6298
|
-
});
|
|
6299
|
-
}
|
|
6300
|
-
updateConfig(config) {
|
|
6301
|
-
this.config.update(currentConfig => ({
|
|
6302
|
-
...currentConfig,
|
|
6303
|
-
...config
|
|
6304
|
-
}));
|
|
6305
|
-
}
|
|
6306
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6307
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogService, providedIn: 'root' });
|
|
6308
|
-
}
|
|
6309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmationDialogService, decorators: [{
|
|
6310
|
-
type: Injectable,
|
|
6311
|
-
args: [{
|
|
6312
|
-
providedIn: 'root',
|
|
6313
|
-
}]
|
|
6314
|
-
}] });
|
|
6315
|
-
|
|
6316
6392
|
class ConfirmationDialogComponent {
|
|
6317
6393
|
popupElement;
|
|
6318
6394
|
overlayElement;
|
|
@@ -9643,7 +9719,7 @@ class GenericTableComponent {
|
|
|
9643
9719
|
this.tableDataService.updateRowData(rowId, updatedFields, updateFunction);
|
|
9644
9720
|
}
|
|
9645
9721
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9646
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericTableComponent, isStandalone: true, selector: "core-generic-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, modalFields: { classPropertyName: "modalFields", publicName: "modalFields", isSignal: true, isRequired: false, transformFunction: null }, modalTabs: { classPropertyName: "modalTabs", publicName: "modalTabs", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, customActions: { classPropertyName: "customActions", publicName: "customActions", isSignal: true, isRequired: false, transformFunction: null }, globalActions: { classPropertyName: "globalActions", publicName: "globalActions", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showFilter: { classPropertyName: "showFilter", publicName: "showFilter", isSignal: true, isRequired: false, transformFunction: null }, showSelection: { classPropertyName: "showSelection", publicName: "showSelection", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, filterButtonConfig: { classPropertyName: "filterButtonConfig", publicName: "filterButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, createButtonConfig: { classPropertyName: "createButtonConfig", publicName: "createButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, dataInput: { classPropertyName: "dataInput", publicName: "dataInput", isSignal: true, isRequired: false, transformFunction: null }, customFilters: { classPropertyName: "customFilters", publicName: "customFilters", isSignal: true, isRequired: false, transformFunction: null }, enablePagination: { classPropertyName: "enablePagination", publicName: "enablePagination", isSignal: true, isRequired: false, transformFunction: null }, modelFactory: { classPropertyName: "modelFactory", publicName: "modelFactory", isSignal: true, isRequired: false, transformFunction: null }, endpoint: { classPropertyName: "endpoint", publicName: "endpoint", isSignal: true, isRequired: false, transformFunction: null }, customParams: { classPropertyName: "customParams", publicName: "customParams", isSignal: true, isRequired: false, transformFunction: null }, customArrayKey: { classPropertyName: "customArrayKey", publicName: "customArrayKey", isSignal: true, isRequired: false, transformFunction: null }, listTitle: { classPropertyName: "listTitle", publicName: "listTitle", isSignal: true, isRequired: false, transformFunction: null }, moreData: { classPropertyName: "moreData", publicName: "moreData", isSignal: true, isRequired: false, transformFunction: null }, inModal: { classPropertyName: "inModal", publicName: "inModal", isSignal: true, isRequired: false, transformFunction: null }, expansionConfig: { classPropertyName: "expansionConfig", publicName: "expansionConfig", isSignal: true, isRequired: false, transformFunction: null }, fileUploadConfig: { classPropertyName: "fileUploadConfig", publicName: "fileUploadConfig", isSignal: true, isRequired: false, transformFunction: null }, rowStyleConfigs: { classPropertyName: "rowStyleConfigs", publicName: "rowStyleConfigs", isSignal: true, isRequired: false, transformFunction: null }, columnDisabledConfigs: { classPropertyName: "columnDisabledConfigs", publicName: "columnDisabledConfigs", isSignal: true, isRequired: false, transformFunction: null }, rowVisibilityConfigs: { classPropertyName: "rowVisibilityConfigs", publicName: "rowVisibilityConfigs", isSignal: true, isRequired: false, transformFunction: null }, headerOrder: { classPropertyName: "headerOrder", publicName: "headerOrder", isSignal: true, isRequired: false, transformFunction: null }, showActiveFilters: { classPropertyName: "showActiveFilters", publicName: "showActiveFilters", isSignal: true, isRequired: false, transformFunction: null }, activeFiltersConfig: { classPropertyName: "activeFiltersConfig", publicName: "activeFiltersConfig", isSignal: true, isRequired: false, transformFunction: null }, sortConfig: { classPropertyName: "sortConfig", publicName: "sortConfig", isSignal: true, isRequired: false, transformFunction: null }, customEdit: { classPropertyName: "customEdit", publicName: "customEdit", isSignal: true, isRequired: false, transformFunction: null }, customDelete: { classPropertyName: "customDelete", publicName: "customDelete", isSignal: true, isRequired: false, transformFunction: null }, customView: { classPropertyName: "customView", publicName: "customView", isSignal: true, isRequired: false, transformFunction: null }, customSave: { classPropertyName: "customSave", publicName: "customSave", isSignal: true, isRequired: false, transformFunction: null }, useCustomSave: { classPropertyName: "useCustomSave", publicName: "useCustomSave", isSignal: true, isRequired: false, transformFunction: null }, onApiError: { classPropertyName: "onApiError", publicName: "onApiError", isSignal: true, isRequired: false, transformFunction: null }, inlineEditConfig: { classPropertyName: "inlineEditConfig", publicName: "inlineEditConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", selectionChanged: "selectionChanged", dataCreated: "dataCreated", dataUpdated: "dataUpdated", dataDeleted: "dataDeleted", dataFetched: "dataFetched", onMoreDataLoaded: "onMoreDataLoaded", globalActionTriggered: "globalActionTriggered", modalData: "modalData", beforeSave: "beforeSave", onFilterChange: "onFilterChange", onClearFilters: "onClearFilters", activeFilterRemoved: "activeFilterRemoved", activeFiltersCleared: "activeFiltersCleared", inlineEditSave: "inlineEditSave", inlineEditModeChanged: "inlineEditModeChanged", inlineEditValidationError: "inlineEditValidationError" }, host: { listeners: { "window:beforeunload": "onBeforeUnload($event)", "document:click": "closeSubmenu()" } }, providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], viewQueries: [{ propertyName: "sentinel", first: true, predicate: ["sentinel"], descendants: true }, { propertyName: "dropdownTrigger", first: true, predicate: ["dropdownTrigger"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\">\n </core-active-filters>\n}\n\n<div class=\"c-table\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isAllSelected()\" (change)=\"masterToggle()\" />\n </th>\n }\n @for (column of columns(); track $index) {\n <th [ngClass]=\"column.align ? 'u-align-' + column.align : ''\">\n @if (isColumnSortable(column)) {\n <button class=\"c-table-order\" tabindex=\"-1\"\n [class.is-asc]=\"getColumnSortState(column) === SortDirection.ASC\"\n [class.is-desc]=\"getColumnSortState(column) === SortDirection.DESC\"\n [class.has-multiple-sorts]=\"isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null\"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\">\n {{ column.label | translate }}\n <!-- @if (isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null) {\n <span class=\"c-table-order__priority\">{{ getColumnSortPriority(column)! + 1 }}</span>\n } -->\n <span class=\"c-table-order__controls\">\n <span class=\"c-table-order__arrow--desc icon-arrow-up\"></span>\n <span class=\"c-table-order__arrow--asc icon-arrow-down\"></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (showActions() && (actions().length > 0 || customActions().length > 0)) {\n <th class=\"u-align-right\">{{ 'table.actions' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of displayedData(); track row.getId()) {\n <tr [ngClass]=\"getRowClasses(row)\" \n [class.is-editing-inline]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\">\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"toggleRow(row)\" />\n </td>\n }\n @for (column of columns(); track $index) {\n <td [attr.data-label]=\"column.label | translate\" \n [ngClass]=\"[\n column.align ? 'u-align-' + column.align : '',\n getCellDisabledClasses(row, column)\n ]\" \n [class.is-editing]=\"isColumnEditable(column, row)\"\n [class.is-column-disabled]=\"isColumnDisabledForRow(row, column)\">\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container *ngTemplateOutlet=\"column.template; context: { $implicit: row, column: column }\"></ng-container>\n } @else if (isColumnEditable(column, row)) {\n <!-- !Solcre: Modo de edici\u00F3n en l\u00EDnea usando DynamicField -->\n <div class=\"c-table__inline-edit\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong>\n <div\n coreDynamicField\n [field]=\"getInlineEditableConfigWithState(row, column)!\"\n [value]=\"getEditingValue(row, column)\"\n [mode]=\"ModalMode.EDIT\"\n [errors]=\"getCellErrors(row, column)\"\n [rowData]=\"row\"\n (valueChange)=\"onCellValueChange(row, column, $event)\"\n (onBlurEvent)=\"onCellBlur(row, column)\"\n (onEnterEvent)=\"onCellEnter(row, column)\"\n ></div>\n </div>\n } @else {\n <div class=\"c-table__content\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong> {{ getFormattedValue(row,\n column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (showActions() && (actions().length > 0 || customActions().length > 0 || expansionConfig()?.enabled)) {\n\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown [rowId]=\"row.getId()\" [extraDefaultActions]=\"extraDefaultActions()\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\" [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"triggerCustomAction($event.action, $event.row)\" #dropdown>\n </core-dropdown>\n @for (actionConfig of regularDefaultActions(); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig)\"\n (buttonClick)=\"onButtonClick($event, actionConfig.action, row)\">\n </core-generic-button>\n }\n }\n }\n @for (customAction of getVisibleCustomActions(row, false); track customAction.label || $index) {\n @if (hasPermission(customAction)) {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button [config]=\"getMoreActionsButtonConfig(row.getId())\" [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\" #dropdownTrigger>\n </core-generic-button>\n }\n\n @if (expansionConfig()?.enabled) {\n <!-- \u2705 Solcre: Celda dedicada para expansi\u00F3n en su posici\u00F3n correcta -->\n <core-generic-button [config]=\"getExpandButtonConfig(row)\" (buttonClick)=\"onExpandButtonClick($event, row)\">\n </core-generic-button>\n }\n\n </div> <!-- .c-table__actions -->\n </td> <!-- td parent of .c-table__actions -->\n } <!-- @if (showActions() -->\n\n\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"expansion-row\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"expansion-content\">\n <ng-container *ngTemplateOutlet=\"expansionConfig()!.template; context: { $implicit: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <!-- Todo: Estilo .no-data -->\n <td [attr.colspan]=\"displayedColumns().length\">\n <p class=\"c-placeholder\">{{ 'table.noData' | translate }}</p>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div> <!-- .c-table -->\n\n<!-- Todo: Todo lo que viene dsp de la tabla -->\n\n@if (!enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<div #sentinel class=\"sentinel\"></div>\n}\n\n@if (enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<core-generic-pagination [tableId]=\"tableId\"></core-generic-pagination>\n}\n\n<core-generic-modal [isOpen]=\"tableActionService.getIsModalOpen()\" [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\" [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\" [title]=\"tableActionService.getModalTitle()\" [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\" (close)=\"tableActionService.closeModal()\" (modalData)=\"onModalData($event)\">\n</core-generic-modal>\n\n<core-filter-modal [isOpen]=\"isFilterModalOpen()\" [filters]=\"customFilters()\" [currentFilterValues]=\"currentFilterValues()\" (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\" (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\">\n</core-filter-modal>", styles: [".in-modal .c-table thead th:last-child,.c-table tbody td:last-child{text-align:left}.c-table__order-btn--asc{transform:rotate(180deg)}.c-table__order-btn--desc{transform:rotate(0)}.c-table tr.is-editing-inline{background-color:#fff3cd;border-left:3px solid #ffc107}.c-table tr.is-editing-inline td{background-color:#fff3cd}.c-table tr.is-editing-inline:hover td{background-color:#ffecb5}.expansion-row .expansion-content{padding:16px;background-color:#f8f9fa;border-top:1px solid #dee2e6}.expansion-row td{border-bottom:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: GenericModalComponent, selector: "core-generic-modal", inputs: ["isOpen", "mode", "data", "fields", "tabs", "title", "isMultiple", "customTemplate", "customViewTemplate", "buttonConfig", "modelFactory", "errors", "validators"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: GenericPaginationComponent, selector: "core-generic-pagination", inputs: ["tableId", "isServerSide"] }, { kind: "component", type: DropdownComponent, selector: "core-dropdown", inputs: ["rowId", "triggerElementId", "extraDefaultActions", "extraCustomActions", "row"], outputs: ["actionTriggered", "customActionTriggered"] }, { kind: "component", type: FilterModalComponent, selector: "core-filter-modal", inputs: ["isOpen", "filters", "currentFilterValues"], outputs: ["close", "filterChange", "clearFilters", "globalFilterChange"] }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "directive", type: DynamicFieldDirective, selector: "[coreDynamicField]", inputs: ["field", "value", "mode", "errors", "rowData", "formValue"], outputs: ["valueChange", "onBlurEvent", "onEnterEvent", "selectionChange"] }, { kind: "component", type: ActiveFiltersComponent, selector: "core-active-filters", inputs: ["activeFilters", "config"], outputs: ["onFilterRemove", "onClearAll"] }] });
|
|
9722
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericTableComponent, isStandalone: true, selector: "core-generic-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, modalFields: { classPropertyName: "modalFields", publicName: "modalFields", isSignal: true, isRequired: false, transformFunction: null }, modalTabs: { classPropertyName: "modalTabs", publicName: "modalTabs", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, customActions: { classPropertyName: "customActions", publicName: "customActions", isSignal: true, isRequired: false, transformFunction: null }, globalActions: { classPropertyName: "globalActions", publicName: "globalActions", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showFilter: { classPropertyName: "showFilter", publicName: "showFilter", isSignal: true, isRequired: false, transformFunction: null }, showSelection: { classPropertyName: "showSelection", publicName: "showSelection", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, showCreateButton: { classPropertyName: "showCreateButton", publicName: "showCreateButton", isSignal: true, isRequired: false, transformFunction: null }, filterButtonConfig: { classPropertyName: "filterButtonConfig", publicName: "filterButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, createButtonConfig: { classPropertyName: "createButtonConfig", publicName: "createButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, dataInput: { classPropertyName: "dataInput", publicName: "dataInput", isSignal: true, isRequired: false, transformFunction: null }, customFilters: { classPropertyName: "customFilters", publicName: "customFilters", isSignal: true, isRequired: false, transformFunction: null }, enablePagination: { classPropertyName: "enablePagination", publicName: "enablePagination", isSignal: true, isRequired: false, transformFunction: null }, modelFactory: { classPropertyName: "modelFactory", publicName: "modelFactory", isSignal: true, isRequired: false, transformFunction: null }, endpoint: { classPropertyName: "endpoint", publicName: "endpoint", isSignal: true, isRequired: false, transformFunction: null }, customParams: { classPropertyName: "customParams", publicName: "customParams", isSignal: true, isRequired: false, transformFunction: null }, customArrayKey: { classPropertyName: "customArrayKey", publicName: "customArrayKey", isSignal: true, isRequired: false, transformFunction: null }, listTitle: { classPropertyName: "listTitle", publicName: "listTitle", isSignal: true, isRequired: false, transformFunction: null }, moreData: { classPropertyName: "moreData", publicName: "moreData", isSignal: true, isRequired: false, transformFunction: null }, inModal: { classPropertyName: "inModal", publicName: "inModal", isSignal: true, isRequired: false, transformFunction: null }, expansionConfig: { classPropertyName: "expansionConfig", publicName: "expansionConfig", isSignal: true, isRequired: false, transformFunction: null }, fileUploadConfig: { classPropertyName: "fileUploadConfig", publicName: "fileUploadConfig", isSignal: true, isRequired: false, transformFunction: null }, rowStyleConfigs: { classPropertyName: "rowStyleConfigs", publicName: "rowStyleConfigs", isSignal: true, isRequired: false, transformFunction: null }, columnDisabledConfigs: { classPropertyName: "columnDisabledConfigs", publicName: "columnDisabledConfigs", isSignal: true, isRequired: false, transformFunction: null }, rowVisibilityConfigs: { classPropertyName: "rowVisibilityConfigs", publicName: "rowVisibilityConfigs", isSignal: true, isRequired: false, transformFunction: null }, headerOrder: { classPropertyName: "headerOrder", publicName: "headerOrder", isSignal: true, isRequired: false, transformFunction: null }, showActiveFilters: { classPropertyName: "showActiveFilters", publicName: "showActiveFilters", isSignal: true, isRequired: false, transformFunction: null }, activeFiltersConfig: { classPropertyName: "activeFiltersConfig", publicName: "activeFiltersConfig", isSignal: true, isRequired: false, transformFunction: null }, sortConfig: { classPropertyName: "sortConfig", publicName: "sortConfig", isSignal: true, isRequired: false, transformFunction: null }, customEdit: { classPropertyName: "customEdit", publicName: "customEdit", isSignal: true, isRequired: false, transformFunction: null }, customDelete: { classPropertyName: "customDelete", publicName: "customDelete", isSignal: true, isRequired: false, transformFunction: null }, customView: { classPropertyName: "customView", publicName: "customView", isSignal: true, isRequired: false, transformFunction: null }, customSave: { classPropertyName: "customSave", publicName: "customSave", isSignal: true, isRequired: false, transformFunction: null }, useCustomSave: { classPropertyName: "useCustomSave", publicName: "useCustomSave", isSignal: true, isRequired: false, transformFunction: null }, onApiError: { classPropertyName: "onApiError", publicName: "onApiError", isSignal: true, isRequired: false, transformFunction: null }, inlineEditConfig: { classPropertyName: "inlineEditConfig", publicName: "inlineEditConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", selectionChanged: "selectionChanged", dataCreated: "dataCreated", dataUpdated: "dataUpdated", dataDeleted: "dataDeleted", dataFetched: "dataFetched", onMoreDataLoaded: "onMoreDataLoaded", globalActionTriggered: "globalActionTriggered", modalData: "modalData", beforeSave: "beforeSave", onFilterChange: "onFilterChange", onClearFilters: "onClearFilters", activeFilterRemoved: "activeFilterRemoved", activeFiltersCleared: "activeFiltersCleared", inlineEditSave: "inlineEditSave", inlineEditModeChanged: "inlineEditModeChanged", inlineEditValidationError: "inlineEditValidationError" }, host: { listeners: { "window:beforeunload": "onBeforeUnload($event)", "document:click": "closeSubmenu()" } }, providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], viewQueries: [{ propertyName: "sentinel", first: true, predicate: ["sentinel"], descendants: true }, { propertyName: "dropdownTrigger", first: true, predicate: ["dropdownTrigger"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\">\n </core-active-filters>\n}\n\n<div class=\"c-table\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isAllSelected()\" (change)=\"masterToggle()\" />\n </th>\n }\n @for (column of columns(); track $index) {\n <th [ngClass]=\"column.align ? 'u-align-' + column.align : ''\">\n @if (isColumnSortable(column)) {\n <button class=\"c-table-order\" tabindex=\"-1\"\n [class.is-asc]=\"getColumnSortState(column) === SortDirection.ASC\"\n [class.is-desc]=\"getColumnSortState(column) === SortDirection.DESC\"\n [class.has-multiple-sorts]=\"isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null\"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\">\n {{ column.label | translate }}\n <!-- @if (isMultiColumnSortEnabled() && getColumnSortPriority(column) !== null) {\n <span class=\"c-table-order__priority\">{{ getColumnSortPriority(column)! + 1 }}</span>\n } -->\n <span class=\"c-table-order__controls\">\n <span class=\"c-table-order__arrow--desc icon-arrow-up\"></span>\n <span class=\"c-table-order__arrow--asc icon-arrow-down\"></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (showActions() && (actions().length > 0 || customActions().length > 0)) {\n <th class=\"u-align-right\">{{ 'table.actions' | translate }}</th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of displayedData(); track row.getId()) {\n <tr [ngClass]=\"getRowClasses(row)\" \n [class.is-editing-inline]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\">\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input type=\"checkbox\" [checked]=\"isRowSelected(row)\" (change)=\"toggleRow(row)\" />\n </td>\n }\n @for (column of columns(); track $index) {\n <td [attr.data-label]=\"column.label | translate\" \n [ngClass]=\"[\n column.align ? 'u-align-' + column.align : '',\n getCellDisabledClasses(row, column)\n ]\" \n [class.is-editing]=\"isColumnEditable(column, row)\"\n [class.is-column-disabled]=\"isColumnDisabledForRow(row, column)\">\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container *ngTemplateOutlet=\"column.template; context: { $implicit: row, column: column }\"></ng-container>\n } @else if (isColumnEditable(column, row)) {\n <!-- !Solcre: Modo de edici\u00F3n en l\u00EDnea usando DynamicField -->\n <div class=\"c-table__inline-edit\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong>\n <div\n coreDynamicField\n [field]=\"getInlineEditableConfigWithState(row, column)!\"\n [value]=\"getEditingValue(row, column)\"\n [mode]=\"ModalMode.EDIT\"\n [errors]=\"getCellErrors(row, column)\"\n [rowData]=\"row\"\n (valueChange)=\"onCellValueChange(row, column, $event)\"\n (onBlurEvent)=\"onCellBlur(row, column)\"\n (onEnterEvent)=\"onCellEnter(row, column)\"\n ></div>\n </div>\n } @else {\n <div class=\"c-table__content\">\n <strong class=\"c-table__mobile-heading\">{{ column.label | translate }}:</strong> {{ getFormattedValue(row,\n column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (showActions() && (actions().length > 0 || customActions().length > 0 || expansionConfig()?.enabled)) {\n\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown [rowId]=\"row.getId()\" [extraDefaultActions]=\"extraDefaultActions()\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\" [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"triggerCustomAction($event.action, $event.row)\" #dropdown>\n </core-dropdown>\n @for (actionConfig of regularDefaultActions(); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig)\"\n (buttonClick)=\"onButtonClick($event, actionConfig.action, row)\">\n </core-generic-button>\n }\n }\n }\n @for (customAction of getVisibleCustomActions(row, false); track customAction.label || $index) {\n @if (hasPermission(customAction)) {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button [config]=\"getMoreActionsButtonConfig(row.getId())\" [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\" #dropdownTrigger>\n </core-generic-button>\n }\n\n @if (expansionConfig()?.enabled) {\n <!-- \u2705 Solcre: Celda dedicada para expansi\u00F3n en su posici\u00F3n correcta -->\n <core-generic-button [config]=\"getExpandButtonConfig(row)\" (buttonClick)=\"onExpandButtonClick($event, row)\">\n </core-generic-button>\n }\n\n </div> <!-- .c-table__actions -->\n </td> <!-- td parent of .c-table__actions -->\n } <!-- @if (showActions() -->\n\n\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"expansion-row\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"expansion-content\">\n <ng-container *ngTemplateOutlet=\"expansionConfig()!.template; context: { $implicit: row }\">\n </ng-container>\n </td>\n </tr>\n }\n } @empty {\n <tr>\n <!-- Todo: Estilo .no-data -->\n <td [attr.colspan]=\"displayedColumns().length\">\n <p class=\"c-placeholder\">{{ 'table.noData' | translate }}</p>\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div> <!-- .c-table -->\n\n<!-- Todo: Todo lo que viene dsp de la tabla -->\n\n@if (!enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<div #sentinel class=\"sentinel\"></div>\n}\n\n@if (enablePagination()) {\n<!-- Todo: Ver qu\u00E9 onda esto -->\n<core-generic-pagination [tableId]=\"tableId\"></core-generic-pagination>\n}\n\n<core-generic-modal [isOpen]=\"tableActionService.getIsModalOpen()\" [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\" [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\" [title]=\"tableActionService.getModalTitle()\" [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\" (close)=\"tableActionService.closeModal()\" (modalData)=\"onModalData($event)\">\n</core-generic-modal>\n\n<core-filter-modal [isOpen]=\"isFilterModalOpen()\" [filters]=\"customFilters()\" [currentFilterValues]=\"currentFilterValues()\" (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\" (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\">\n</core-filter-modal>", styles: [".in-modal .c-table thead th:last-child,.c-table tbody td:last-child{text-align:left}.c-table__order-btn--asc{transform:rotate(180deg)}.c-table__order-btn--desc{transform:rotate(0)}.c-table tr.is-editing-inline{background-color:#fff3cd;border-left:3px solid #ffc107}.c-table tr.is-editing-inline td{background-color:#fff3cd}.c-table tr.is-editing-inline:hover td{background-color:#ffecb5}.expansion-row .expansion-content{padding:16px;background-color:#f8f9fa;border-top:1px solid #dee2e6}.expansion-row td{border-bottom:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: GenericModalComponent, selector: "core-generic-modal", inputs: ["isOpen", "mode", "data", "fields", "tabs", "title", "isMultiple", "customTemplate", "customViewTemplate", "buttonConfig", "modelFactory", "errors", "validators", "customHasChanges"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: GenericPaginationComponent, selector: "core-generic-pagination", inputs: ["tableId", "isServerSide"] }, { kind: "component", type: DropdownComponent, selector: "core-dropdown", inputs: ["rowId", "triggerElementId", "extraDefaultActions", "extraCustomActions", "row"], outputs: ["actionTriggered", "customActionTriggered"] }, { kind: "component", type: FilterModalComponent, selector: "core-filter-modal", inputs: ["isOpen", "filters", "currentFilterValues"], outputs: ["close", "filterChange", "clearFilters", "globalFilterChange"] }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "directive", type: DynamicFieldDirective, selector: "[coreDynamicField]", inputs: ["field", "value", "mode", "errors", "rowData", "formValue"], outputs: ["valueChange", "onBlurEvent", "onEnterEvent", "selectionChange"] }, { kind: "component", type: ActiveFiltersComponent, selector: "core-active-filters", inputs: ["activeFilters", "config"], outputs: ["onFilterRemove", "onClearAll"] }] });
|
|
9647
9723
|
}
|
|
9648
9724
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericTableComponent, decorators: [{
|
|
9649
9725
|
type: Component,
|
|
@@ -11193,11 +11269,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
11193
11269
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
11194
11270
|
// No edites manualmente este archivo
|
|
11195
11271
|
const VERSION = {
|
|
11196
|
-
full: '2.12.
|
|
11272
|
+
full: '2.12.9',
|
|
11197
11273
|
major: 2,
|
|
11198
11274
|
minor: 12,
|
|
11199
|
-
patch:
|
|
11200
|
-
timestamp: '2025-09-03T18:
|
|
11275
|
+
patch: 9,
|
|
11276
|
+
timestamp: '2025-09-03T18:54:45.555Z',
|
|
11201
11277
|
buildDate: '3/9/2025'
|
|
11202
11278
|
};
|
|
11203
11279
|
|
|
@@ -11943,7 +12019,7 @@ class LayoutComponent {
|
|
|
11943
12019
|
this.onLogout.emit();
|
|
11944
12020
|
}
|
|
11945
12021
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: LayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11946
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: LayoutComponent, isStandalone: true, selector: "core-layout", inputs: { navItems: { classPropertyName: "navItems", publicName: "navItems", isSignal: true, isRequired: false, transformFunction: null }, bottomNavItems: { classPropertyName: "bottomNavItems", publicName: "bottomNavItems", isSignal: true, isRequired: false, transformFunction: null }, collapsedLogo: { classPropertyName: "collapsedLogo", publicName: "collapsedLogo", isSignal: true, isRequired: false, transformFunction: null }, expandedLogo: { classPropertyName: "expandedLogo", publicName: "expandedLogo", isSignal: true, isRequired: false, transformFunction: null }, logoImagesConfig: { classPropertyName: "logoImagesConfig", publicName: "logoImagesConfig", isSignal: true, isRequired: false, transformFunction: null }, navConfig: { classPropertyName: "navConfig", publicName: "navConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onLogout: "onLogout" }, host: { listeners: { "window:resize": "onResize($event)" } }, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<div class=\"o-layout\" \n [attr.data-layout]=\"layoutService.dataAttributes()['data-layout']\"\n [attr.data-sidebar-left]=\"getEffectiveLeftSidebarVisibility()\"\n [attr.data-sidebar-left-w]=\"getEffectiveLeftSidebarWidth()\"\n [attr.data-sidebar-left-h]=\"getEffectiveLeftSidebarHeight()\"\n [attr.data-sidebar-right]=\"getEffectiveRightSidebarVisibility()\"\n [attr.data-sidebar-right-w]=\"getEffectiveRightSidebarWidth()\"\n [attr.data-sidebar-right-h]=\"getEffectiveRightSidebarHeight()\"\n >\n\n <!-- Nav -->\n <core-main-nav class=\"o-layout__nav\" \n (toggleSidebar)=\"toggleSidebar()\"\n [navItems]=\"navItems()\"\n [navConfig]=\"navConfig()\"\n [bottomNavItems]=\"bottomNavItems()\"\n [logoImagesConfig]=\"logoImagesConfig()\"\n [collapsedLogo]=\"collapsedLogo()\"\n [expandedLogo]=\"expandedLogo()\"\n (onLogout)=\"logout()\"\n >\n </core-main-nav>\n\n <!-- Main -->\n <div class=\"o-layout__body\">\n \n @if(layoutStateService.isHeaderVisible$() | async) {\n <core-header\n class=\"o-layout__header\"\n (filterRequested)=\"onFilterRequested()\"\n (createRequested)=\"onCreateRequested()\"\n (globalActionTriggered)=\"onGlobalActionTriggered($event)\">\n </core-header>\n }\n\n @if(layoutService.sidebarLeft().visibility === SidebarVisibility.SHOW && leftSidebarConfig && shouldRenderLeftSidebar()) {\n <core-generic-sidebar \n class=\"o-layout__sidebar--left\"\n [config]=\"leftSidebarConfig\">\n </core-generic-sidebar>\n }\n\n <ng-content></ng-content>\n\n @if(layoutService.sidebarRight().visibility === SidebarVisibility.SHOW && rightSidebarConfig && shouldRenderRightSidebar()) {\n <core-generic-sidebar \n class=\"o-layout__sidebar--right\"\n [config]=\"rightSidebarConfig\">\n </core-generic-sidebar>\n }\n\n\n @if(dialogService.isOpen$()) {\n <core-confirmation-dialog\n [isOpen]=\"dialogService.isOpen$()\"\n [config]=\"dialogService.config$()\"\n (confirm)=\"dialogService.confirm($event)\"\n (cancel)=\"dialogService.cancel()\"\n ></core-confirmation-dialog>\n }\n\n @if(sidebarMobileModalService.isOpen()) {\n <core-generic-modal\n [isOpen]=\"sidebarMobileModalService.isOpen()\"\n [mode]=\"ModalMode.CREATE\"\n [title]=\"getSidebarModalTitle()\"\n [customTemplate]=\"sidebarModalContentTemplate\"\n (close)=\"sidebarMobileModalService.closeModal()\"\n [buttonConfig]=\"getSidebarModalButtons()\">\n </core-generic-modal>\n }\n\n </div> <!-- .o-layout__body -->\n</div> <!-- .o-layout -->\n\n<!-- Sidebar Custom Modal Global -->\n<core-sidebar-custom-modal></core-sidebar-custom-modal>\n\n<!-- Image Modal Global -->\n<core-image-modal></core-image-modal>\n\n<!-- ! Refactor: End -->", dependencies: [{ kind: "component", type: MainNavComponent, selector: "core-main-nav", inputs: ["navConfig", "appVersion", "navItems", "bottomNavItems", "isProduction", "logoImagesConfig", "collapsedLogo", "expandedLogo"], outputs: ["onLogout"] }, { kind: "component", type: HeaderComponent, selector: "core-header", outputs: ["filterRequested", "createRequested", "globalActionTriggered"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "component", type: ConfirmationDialogComponent, selector: "core-confirmation-dialog", inputs: ["isOpen", "config"], outputs: ["confirm", "cancel"] }, { kind: "component", type: GenericSidebarComponent, selector: "core-generic-sidebar", inputs: ["config", "position", "customTemplate"], outputs: ["itemClicked", "subItemClicked"] }, { kind: "component", type: GenericModalComponent, selector: "core-generic-modal", inputs: ["isOpen", "mode", "data", "fields", "tabs", "title", "isMultiple", "customTemplate", "customViewTemplate", "buttonConfig", "modelFactory", "errors", "validators"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: ImageModalComponent, selector: "core-image-modal", outputs: ["modalClosed"] }, { kind: "component", type: SidebarCustomModalComponent, selector: "core-sidebar-custom-modal" }] });
|
|
12022
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: LayoutComponent, isStandalone: true, selector: "core-layout", inputs: { navItems: { classPropertyName: "navItems", publicName: "navItems", isSignal: true, isRequired: false, transformFunction: null }, bottomNavItems: { classPropertyName: "bottomNavItems", publicName: "bottomNavItems", isSignal: true, isRequired: false, transformFunction: null }, collapsedLogo: { classPropertyName: "collapsedLogo", publicName: "collapsedLogo", isSignal: true, isRequired: false, transformFunction: null }, expandedLogo: { classPropertyName: "expandedLogo", publicName: "expandedLogo", isSignal: true, isRequired: false, transformFunction: null }, logoImagesConfig: { classPropertyName: "logoImagesConfig", publicName: "logoImagesConfig", isSignal: true, isRequired: false, transformFunction: null }, navConfig: { classPropertyName: "navConfig", publicName: "navConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onLogout: "onLogout" }, host: { listeners: { "window:resize": "onResize($event)" } }, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<div class=\"o-layout\" \n [attr.data-layout]=\"layoutService.dataAttributes()['data-layout']\"\n [attr.data-sidebar-left]=\"getEffectiveLeftSidebarVisibility()\"\n [attr.data-sidebar-left-w]=\"getEffectiveLeftSidebarWidth()\"\n [attr.data-sidebar-left-h]=\"getEffectiveLeftSidebarHeight()\"\n [attr.data-sidebar-right]=\"getEffectiveRightSidebarVisibility()\"\n [attr.data-sidebar-right-w]=\"getEffectiveRightSidebarWidth()\"\n [attr.data-sidebar-right-h]=\"getEffectiveRightSidebarHeight()\"\n >\n\n <!-- Nav -->\n <core-main-nav class=\"o-layout__nav\" \n (toggleSidebar)=\"toggleSidebar()\"\n [navItems]=\"navItems()\"\n [navConfig]=\"navConfig()\"\n [bottomNavItems]=\"bottomNavItems()\"\n [logoImagesConfig]=\"logoImagesConfig()\"\n [collapsedLogo]=\"collapsedLogo()\"\n [expandedLogo]=\"expandedLogo()\"\n (onLogout)=\"logout()\"\n >\n </core-main-nav>\n\n <!-- Main -->\n <div class=\"o-layout__body\">\n \n @if(layoutStateService.isHeaderVisible$() | async) {\n <core-header\n class=\"o-layout__header\"\n (filterRequested)=\"onFilterRequested()\"\n (createRequested)=\"onCreateRequested()\"\n (globalActionTriggered)=\"onGlobalActionTriggered($event)\">\n </core-header>\n }\n\n @if(layoutService.sidebarLeft().visibility === SidebarVisibility.SHOW && leftSidebarConfig && shouldRenderLeftSidebar()) {\n <core-generic-sidebar \n class=\"o-layout__sidebar--left\"\n [config]=\"leftSidebarConfig\">\n </core-generic-sidebar>\n }\n\n <ng-content></ng-content>\n\n @if(layoutService.sidebarRight().visibility === SidebarVisibility.SHOW && rightSidebarConfig && shouldRenderRightSidebar()) {\n <core-generic-sidebar \n class=\"o-layout__sidebar--right\"\n [config]=\"rightSidebarConfig\">\n </core-generic-sidebar>\n }\n\n\n @if(dialogService.isOpen$()) {\n <core-confirmation-dialog\n [isOpen]=\"dialogService.isOpen$()\"\n [config]=\"dialogService.config$()\"\n (confirm)=\"dialogService.confirm($event)\"\n (cancel)=\"dialogService.cancel()\"\n ></core-confirmation-dialog>\n }\n\n @if(sidebarMobileModalService.isOpen()) {\n <core-generic-modal\n [isOpen]=\"sidebarMobileModalService.isOpen()\"\n [mode]=\"ModalMode.CREATE\"\n [title]=\"getSidebarModalTitle()\"\n [customTemplate]=\"sidebarModalContentTemplate\"\n (close)=\"sidebarMobileModalService.closeModal()\"\n [buttonConfig]=\"getSidebarModalButtons()\">\n </core-generic-modal>\n }\n\n </div> <!-- .o-layout__body -->\n</div> <!-- .o-layout -->\n\n<!-- Sidebar Custom Modal Global -->\n<core-sidebar-custom-modal></core-sidebar-custom-modal>\n\n<!-- Image Modal Global -->\n<core-image-modal></core-image-modal>\n\n<!-- ! Refactor: End -->", dependencies: [{ kind: "component", type: MainNavComponent, selector: "core-main-nav", inputs: ["navConfig", "appVersion", "navItems", "bottomNavItems", "isProduction", "logoImagesConfig", "collapsedLogo", "expandedLogo"], outputs: ["onLogout"] }, { kind: "component", type: HeaderComponent, selector: "core-header", outputs: ["filterRequested", "createRequested", "globalActionTriggered"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "component", type: ConfirmationDialogComponent, selector: "core-confirmation-dialog", inputs: ["isOpen", "config"], outputs: ["confirm", "cancel"] }, { kind: "component", type: GenericSidebarComponent, selector: "core-generic-sidebar", inputs: ["config", "position", "customTemplate"], outputs: ["itemClicked", "subItemClicked"] }, { kind: "component", type: GenericModalComponent, selector: "core-generic-modal", inputs: ["isOpen", "mode", "data", "fields", "tabs", "title", "isMultiple", "customTemplate", "customViewTemplate", "buttonConfig", "modelFactory", "errors", "validators", "customHasChanges"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: ImageModalComponent, selector: "core-image-modal", outputs: ["modalClosed"] }, { kind: "component", type: SidebarCustomModalComponent, selector: "core-sidebar-custom-modal" }] });
|
|
11947
12023
|
}
|
|
11948
12024
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: LayoutComponent, decorators: [{
|
|
11949
12025
|
type: Component,
|