@solcre-org/core-ui 2.20.5 → 2.20.7
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.
|
@@ -5333,6 +5333,7 @@ class DynamicFieldDirective {
|
|
|
5333
5333
|
onEnterEvent = output();
|
|
5334
5334
|
selectionChange = output();
|
|
5335
5335
|
componentRef = null;
|
|
5336
|
+
templateViewRef = null;
|
|
5336
5337
|
fieldComponents = {
|
|
5337
5338
|
text: TextFieldComponent,
|
|
5338
5339
|
textarea: TextAreaFieldComponent,
|
|
@@ -5372,13 +5373,40 @@ class DynamicFieldDirective {
|
|
|
5372
5373
|
this.componentRef.setInput('formValue', this.formValue());
|
|
5373
5374
|
this.componentRef.changeDetectorRef.detectChanges();
|
|
5374
5375
|
}
|
|
5376
|
+
if (this.templateViewRef) {
|
|
5377
|
+
this.updateTemplateContext();
|
|
5378
|
+
}
|
|
5379
|
+
}
|
|
5380
|
+
getCustomViewTemplate() {
|
|
5381
|
+
const fieldConfig = this.field();
|
|
5382
|
+
const modeConfig = fieldConfig.modes?.[this.mode()];
|
|
5383
|
+
if (modeConfig?.customViewTemplate && this.isTemplateRef(modeConfig.customViewTemplate)) {
|
|
5384
|
+
return modeConfig.customViewTemplate;
|
|
5385
|
+
}
|
|
5386
|
+
if (fieldConfig?.customViewTemplate && this.isTemplateRef(fieldConfig.customViewTemplate)) {
|
|
5387
|
+
return fieldConfig.customViewTemplate;
|
|
5388
|
+
}
|
|
5389
|
+
return null;
|
|
5390
|
+
}
|
|
5391
|
+
isTemplateRef(template) {
|
|
5392
|
+
return template && typeof template === 'object' && 'createEmbeddedView' in template;
|
|
5375
5393
|
}
|
|
5376
5394
|
loadComponent() {
|
|
5377
5395
|
this.viewContainerRef.clear();
|
|
5378
5396
|
if (this.componentRef) {
|
|
5379
5397
|
this.componentRef.destroy();
|
|
5398
|
+
this.componentRef = null;
|
|
5399
|
+
}
|
|
5400
|
+
if (this.templateViewRef) {
|
|
5401
|
+
this.templateViewRef.destroy();
|
|
5402
|
+
this.templateViewRef = null;
|
|
5380
5403
|
}
|
|
5381
5404
|
const fieldConfig = this.field();
|
|
5405
|
+
const customTemplate = this.getCustomViewTemplate();
|
|
5406
|
+
if (customTemplate) {
|
|
5407
|
+
this.renderCustomTemplate(customTemplate);
|
|
5408
|
+
return;
|
|
5409
|
+
}
|
|
5382
5410
|
const hasMultiEntryConfig = fieldConfig && 'multiEntryConfig' in fieldConfig &&
|
|
5383
5411
|
fieldConfig.multiEntryConfig?.allowMultipleEntries;
|
|
5384
5412
|
let componentType;
|
|
@@ -5416,6 +5444,35 @@ class DynamicFieldDirective {
|
|
|
5416
5444
|
}
|
|
5417
5445
|
this.componentRef.changeDetectorRef.detectChanges();
|
|
5418
5446
|
}
|
|
5447
|
+
renderCustomTemplate(template) {
|
|
5448
|
+
if (!this.templateViewRef) {
|
|
5449
|
+
const context = this.createTemplateContext();
|
|
5450
|
+
this.templateViewRef = this.viewContainerRef.createEmbeddedView(template, context);
|
|
5451
|
+
}
|
|
5452
|
+
this.templateViewRef.detectChanges();
|
|
5453
|
+
}
|
|
5454
|
+
createTemplateContext() {
|
|
5455
|
+
return {
|
|
5456
|
+
$implicit: this.value(),
|
|
5457
|
+
value: this.value(),
|
|
5458
|
+
data: this.rowData(),
|
|
5459
|
+
mode: this.mode(),
|
|
5460
|
+
errors: this.errors(),
|
|
5461
|
+
formValue: this.formValue()
|
|
5462
|
+
};
|
|
5463
|
+
}
|
|
5464
|
+
updateTemplateContext() {
|
|
5465
|
+
if (this.templateViewRef) {
|
|
5466
|
+
const context = this.templateViewRef.context;
|
|
5467
|
+
context.$implicit = this.value();
|
|
5468
|
+
context.value = this.value();
|
|
5469
|
+
context.data = this.rowData();
|
|
5470
|
+
context.mode = this.mode();
|
|
5471
|
+
context.errors = this.errors();
|
|
5472
|
+
context.formValue = this.formValue();
|
|
5473
|
+
this.templateViewRef.detectChanges();
|
|
5474
|
+
}
|
|
5475
|
+
}
|
|
5419
5476
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: DynamicFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5420
5477
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: DynamicFieldDirective, isStandalone: true, selector: "[coreDynamicField]", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, rowData: { classPropertyName: "rowData", publicName: "rowData", isSignal: true, isRequired: false, transformFunction: null }, formValue: { classPropertyName: "formValue", publicName: "formValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", onBlurEvent: "onBlurEvent", onEnterEvent: "onEnterEvent", selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0 });
|
|
5421
5478
|
}
|
|
@@ -11821,10 +11878,24 @@ class HeaderService {
|
|
|
11821
11878
|
globalCustomClass = signal('');
|
|
11822
11879
|
headerOutside = signal(false);
|
|
11823
11880
|
headerActions = signal([]);
|
|
11881
|
+
headerFilterValues = signal(new Map());
|
|
11882
|
+
pendingHeaderFilters = signal(new Map());
|
|
11883
|
+
headerFilterChangeCallback = signal(undefined);
|
|
11884
|
+
applyHeaderFiltersCallback = signal(undefined);
|
|
11885
|
+
clearHeaderFiltersCallback = signal(undefined);
|
|
11824
11886
|
refreshCallback = signal(undefined);
|
|
11825
11887
|
hasFilters = computed(() => {
|
|
11826
11888
|
return this.showFilter() || this.customFilters().length > 0;
|
|
11827
11889
|
});
|
|
11890
|
+
hasFiltersInsideModal = computed(() => {
|
|
11891
|
+
const customFilters = this.customFilters();
|
|
11892
|
+
const showFilterValue = this.showFilter();
|
|
11893
|
+
if (customFilters.length > 0) {
|
|
11894
|
+
const filtersOutsideModal = customFilters.filter(filter => filter.showOutsideFilterModal === true);
|
|
11895
|
+
return filtersOutsideModal.length < customFilters.length;
|
|
11896
|
+
}
|
|
11897
|
+
return showFilterValue;
|
|
11898
|
+
});
|
|
11828
11899
|
getRefreshCallback() {
|
|
11829
11900
|
return this.refreshCallback;
|
|
11830
11901
|
}
|
|
@@ -11904,6 +11975,11 @@ class HeaderService {
|
|
|
11904
11975
|
this.headerOutside.set(false);
|
|
11905
11976
|
this.refreshCallback.set(undefined);
|
|
11906
11977
|
this.headerActions.set([]);
|
|
11978
|
+
this.headerFilterValues.set(new Map());
|
|
11979
|
+
this.pendingHeaderFilters.set(new Map());
|
|
11980
|
+
this.headerFilterChangeCallback.set(undefined);
|
|
11981
|
+
this.applyHeaderFiltersCallback.set(undefined);
|
|
11982
|
+
this.clearHeaderFiltersCallback.set(undefined);
|
|
11907
11983
|
}
|
|
11908
11984
|
setTitle(title) {
|
|
11909
11985
|
this.title.set(title);
|
|
@@ -12125,7 +12201,7 @@ class HeaderService {
|
|
|
12125
12201
|
const hasCustomActions = this.customActions().length > 0;
|
|
12126
12202
|
return hasCustomActions;
|
|
12127
12203
|
case HeaderElementType.FILTER:
|
|
12128
|
-
return this.showDefaultFilter() &&
|
|
12204
|
+
return this.showDefaultFilter() && this.hasFiltersInsideModal();
|
|
12129
12205
|
case HeaderElementType.CREATE:
|
|
12130
12206
|
return this.showDefaultCreate() && this.showCreateButton() && this.hasCreatePermission();
|
|
12131
12207
|
case HeaderElementType.CUSTOM_TEMPLATE:
|
|
@@ -12144,7 +12220,7 @@ class HeaderService {
|
|
|
12144
12220
|
case HeaderElementType.CUSTOM_ACTIONS:
|
|
12145
12221
|
return this.customActions().length > 0;
|
|
12146
12222
|
case HeaderElementType.FILTER:
|
|
12147
|
-
return this.showDefaultFilter() &&
|
|
12223
|
+
return this.showDefaultFilter() && this.hasFiltersInsideModal();
|
|
12148
12224
|
case HeaderElementType.CREATE:
|
|
12149
12225
|
return this.showDefaultCreate() && this.showCreateButton() && this.hasCreatePermission();
|
|
12150
12226
|
case HeaderElementType.CUSTOM_TEMPLATE:
|
|
@@ -12203,6 +12279,36 @@ class HeaderService {
|
|
|
12203
12279
|
return null;
|
|
12204
12280
|
}
|
|
12205
12281
|
}
|
|
12282
|
+
getHeaderFilterValues() {
|
|
12283
|
+
return this.headerFilterValues;
|
|
12284
|
+
}
|
|
12285
|
+
setHeaderFilterValues(values) {
|
|
12286
|
+
this.headerFilterValues.set(values);
|
|
12287
|
+
}
|
|
12288
|
+
getHeaderFilterChangeCallback() {
|
|
12289
|
+
return this.headerFilterChangeCallback;
|
|
12290
|
+
}
|
|
12291
|
+
setHeaderFilterChangeCallback(callback) {
|
|
12292
|
+
this.headerFilterChangeCallback.set(callback);
|
|
12293
|
+
}
|
|
12294
|
+
getPendingHeaderFilters() {
|
|
12295
|
+
return this.pendingHeaderFilters;
|
|
12296
|
+
}
|
|
12297
|
+
setPendingHeaderFilters(values) {
|
|
12298
|
+
this.pendingHeaderFilters.set(values);
|
|
12299
|
+
}
|
|
12300
|
+
getApplyHeaderFiltersCallback() {
|
|
12301
|
+
return this.applyHeaderFiltersCallback;
|
|
12302
|
+
}
|
|
12303
|
+
setApplyHeaderFiltersCallback(callback) {
|
|
12304
|
+
this.applyHeaderFiltersCallback.set(callback);
|
|
12305
|
+
}
|
|
12306
|
+
getClearHeaderFiltersCallback() {
|
|
12307
|
+
return this.clearHeaderFiltersCallback;
|
|
12308
|
+
}
|
|
12309
|
+
setClearHeaderFiltersCallback(callback) {
|
|
12310
|
+
this.clearHeaderFiltersCallback.set(callback);
|
|
12311
|
+
}
|
|
12206
12312
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: HeaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12207
12313
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: HeaderService, providedIn: 'root' });
|
|
12208
12314
|
}
|
|
@@ -13254,6 +13360,12 @@ class GenericTableComponent {
|
|
|
13254
13360
|
});
|
|
13255
13361
|
currentFilterValues = signal(new Map());
|
|
13256
13362
|
currentActiveFilters = computed(() => this.generateActiveFilters());
|
|
13363
|
+
headerFilters = computed(() => {
|
|
13364
|
+
return this.customFilters();
|
|
13365
|
+
});
|
|
13366
|
+
modalFilters = computed(() => {
|
|
13367
|
+
return this.customFilters().filter(f => f.showOutsideFilterModal !== true);
|
|
13368
|
+
});
|
|
13257
13369
|
isDeletedFilterActive = computed(() => {
|
|
13258
13370
|
const filters = this.currentFilterValues();
|
|
13259
13371
|
let filterKey = this.deletedFilterKey();
|
|
@@ -13471,6 +13583,31 @@ class GenericTableComponent {
|
|
|
13471
13583
|
this.tableDataService.updateCustomParams(params, this.MAIN_DATA_LOADER_ID);
|
|
13472
13584
|
}
|
|
13473
13585
|
});
|
|
13586
|
+
effect(() => {
|
|
13587
|
+
if (!this.inModal()) {
|
|
13588
|
+
this.headerService.setHeaderFilterValues(this.currentFilterValues());
|
|
13589
|
+
this.headerService.setPendingHeaderFilters(new Map(this.currentFilterValues()));
|
|
13590
|
+
this.headerService.setHeaderFilterChangeCallback((key, value) => {
|
|
13591
|
+
const pendingFilters = new Map(this.headerService.getPendingHeaderFilters()());
|
|
13592
|
+
if (value === '' || value === null || value === undefined ||
|
|
13593
|
+
(Array.isArray(value) && value.length === 0)) {
|
|
13594
|
+
pendingFilters.delete(key);
|
|
13595
|
+
}
|
|
13596
|
+
else {
|
|
13597
|
+
pendingFilters.set(key, value);
|
|
13598
|
+
}
|
|
13599
|
+
this.headerService.setPendingHeaderFilters(pendingFilters);
|
|
13600
|
+
});
|
|
13601
|
+
this.headerService.setApplyHeaderFiltersCallback(() => {
|
|
13602
|
+
const pendingFilters = this.headerService.getPendingHeaderFilters()();
|
|
13603
|
+
this.handleFilterChange(pendingFilters);
|
|
13604
|
+
});
|
|
13605
|
+
this.headerService.setClearHeaderFiltersCallback(() => {
|
|
13606
|
+
this.headerService.setPendingHeaderFilters(new Map());
|
|
13607
|
+
this.handleFilterChange(new Map());
|
|
13608
|
+
});
|
|
13609
|
+
}
|
|
13610
|
+
});
|
|
13474
13611
|
}
|
|
13475
13612
|
processDataInput(inputData) {
|
|
13476
13613
|
if ((!this.endpoint() || this.endpoint() === '') && Array.isArray(inputData)) {
|
|
@@ -14681,7 +14818,7 @@ class GenericTableComponent {
|
|
|
14681
14818
|
title: this.listTitle(),
|
|
14682
14819
|
globalActions: this.globalActions(),
|
|
14683
14820
|
showFilter: this.showFilter(),
|
|
14684
|
-
customFilters: this.
|
|
14821
|
+
customFilters: this.headerFilters(),
|
|
14685
14822
|
showCreateButton: this.showCreateButton(),
|
|
14686
14823
|
hasCreatePermission: this.hasActionWithPermission(TableAction.CREATE),
|
|
14687
14824
|
});
|
|
@@ -14692,7 +14829,7 @@ class GenericTableComponent {
|
|
|
14692
14829
|
globalActions: this.globalActions(),
|
|
14693
14830
|
showDefaultFilter: this.showFilter(),
|
|
14694
14831
|
showDefaultCreate: this.showCreateButton(),
|
|
14695
|
-
customFilters: this.
|
|
14832
|
+
customFilters: this.headerFilters(),
|
|
14696
14833
|
customActions: existingCustomActions,
|
|
14697
14834
|
headerOrder: this.headerOrder(),
|
|
14698
14835
|
filterButtonConfig: this.filterButtonConfig(),
|
|
@@ -15283,7 +15420,7 @@ class GenericTableComponent {
|
|
|
15283
15420
|
};
|
|
15284
15421
|
}
|
|
15285
15422
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15286
|
-
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 }, createButtonText: { classPropertyName: "createButtonText", publicName: "createButtonText", 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 }, listSubTitle: { classPropertyName: "listSubTitle", publicName: "listSubTitle", 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 }, showManualRefresh: { classPropertyName: "showManualRefresh", publicName: "showManualRefresh", isSignal: true, isRequired: false, transformFunction: null }, manualRefreshConfig: { classPropertyName: "manualRefreshConfig", publicName: "manualRefreshConfig", isSignal: true, isRequired: false, transformFunction: null }, refreshButtonConfig: { classPropertyName: "refreshButtonConfig", publicName: "refreshButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, fixedActionsConfig: { classPropertyName: "fixedActionsConfig", publicName: "fixedActionsConfig", isSignal: true, isRequired: false, transformFunction: null }, deletedFilterKey: { classPropertyName: "deletedFilterKey", publicName: "deletedFilterKey", isSignal: true, isRequired: false, transformFunction: null }, scrollTable: { classPropertyName: "scrollTable", publicName: "scrollTable", 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", dataRefreshed: "dataRefreshed", 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 }, { propertyName: "manualRefreshComponent", first: true, predicate: CoreManualRefreshComponent, 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<div class=\"c-table\" [class.c-table--scroll]=\"scrollTable()\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n @if (shouldShowManualRefresh()) {\n <core-manual-refresh \n [config]=\"getManualRefreshConfig()\"\n (onRefresh)=\"onManualRefresh()\">\n </core-manual-refresh>\n }\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-editable]=\"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]=\"getVisibleDefaultActions(row, true)\"\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 getVisibleDefaultActions(row, false); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE || actionConfig.action === TableAction.RECOVER) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig, row)\"\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 @if (customAction.isSwitch && customAction.switchOptions) {\n <core-generic-switch\n [options]=\"customAction.switchOptions\"\n [selectedValue]=\"customAction.switchValue ? customAction.switchValue(row) : null\"\n [ariaLabel]=\"customAction.switchAriaLabel || customAction.title\"\n (valueChange)=\"onCustomActionSwitchChange($event, customAction, row)\">\n </core-generic-switch>\n } @else {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n }\n\n @for (outsideAction of getOutsideFixedActionsForRow(row); track $index) {\n @if (outsideAction.type === 'table' || outsideAction.type === 'custom' ? hasPermission(outsideAction.config) : true) {\n <core-generic-button \n [config]=\"getOutsideFixedActionButtonConfig(outsideAction, row)\"\n (buttonClick)=\"onOutsideFixedActionClick($event, outsideAction, 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=\"c-table-dropdown\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"c-table-dropdown__holder\">\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<core-generic-pagination \n [tableId]=\"tableId\" \n [isServerSide]=\"!!endpoint()\"\n [showPagination]=\"shouldShowPagination()\"\n [showPageSizeSelector]=\"shouldShowPageSizeSelector()\">\n</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>\n\n<!-- @if (shouldShowFixedActions()) {\n <div class=\"c-fixed-actions\" [ngClass]=\"'c-fixed-actions--' + (fixedActionsConfig()?.position || 'right')\">\n @for (action of fixedActionsArray(); track $index) {\n @if (shouldShowFixedAction(action)) {\n <button \n type=\"button\"\n [ngClass]=\"getFixedActionClass(action)\"\n [disabled]=\"isFixedActionDisabled(action)\"\n [title]=\"getFixedActionTooltip(action) || ''\"\n [attr.aria-label]=\"getFixedActionTooltip(action) || action.label || ''\"\n (click)=\"onFixedActionClick(action)\">\n </button>\n }\n }\n </div>\n} -->\n\n<core-fixed-actions-mobile-modal />\n", styles: [".c-table-dropdown{padding:16px;background-color:var(--color-neutral-200);border-top:1px solid var(--color-alternative-100)}.c-table-dropdown td{border-bottom:none}@keyframes newItemHighlight{0%{background-color:#f8f9fa;border-left-color:var(--color-context-success)}25%{background-color:#e9ecef}50%{background-color:#f8f9fa}75%{background-color:#e9ecef}to{background-color:transparent;border-left-color:transparent}}@media (max-width: 61.1875rem){.c-table-dropdown{background-color:var(--color-neutral-200);border-radius:0 0 var(--app-br) var(--app-br);border-top:none;margin-top:calc(var(--_gap-y) * -1 - var(--app-br))}}\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", "steps", "title", "isMultiple", "customTemplate", "customViewTemplate", "finalStepTemplate", "buttonConfig", "modelFactory", "errors", "validators", "customHasChanges", "stepValidationEnabled", "allowFreeNavigation", "autoMarkCompleted"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: GenericPaginationComponent, selector: "core-generic-pagination", inputs: ["tableId", "isServerSide", "showPagination", "showPageSizeSelector"] }, { 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"] }, { kind: "component", type: CoreManualRefreshComponent, selector: "core-manual-refresh", inputs: ["config", "refreshId"], outputs: ["onRefresh", "timestampUpdated"] }, { kind: "component", type: GenericSwitchComponent, selector: "core-generic-switch", inputs: ["options", "selectedValue", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: FixedActionsMobileModalComponent, selector: "core-fixed-actions-mobile-modal" }] });
|
|
15423
|
+
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 }, createButtonText: { classPropertyName: "createButtonText", publicName: "createButtonText", 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 }, listSubTitle: { classPropertyName: "listSubTitle", publicName: "listSubTitle", 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 }, showManualRefresh: { classPropertyName: "showManualRefresh", publicName: "showManualRefresh", isSignal: true, isRequired: false, transformFunction: null }, manualRefreshConfig: { classPropertyName: "manualRefreshConfig", publicName: "manualRefreshConfig", isSignal: true, isRequired: false, transformFunction: null }, refreshButtonConfig: { classPropertyName: "refreshButtonConfig", publicName: "refreshButtonConfig", isSignal: true, isRequired: false, transformFunction: null }, fixedActionsConfig: { classPropertyName: "fixedActionsConfig", publicName: "fixedActionsConfig", isSignal: true, isRequired: false, transformFunction: null }, deletedFilterKey: { classPropertyName: "deletedFilterKey", publicName: "deletedFilterKey", isSignal: true, isRequired: false, transformFunction: null }, scrollTable: { classPropertyName: "scrollTable", publicName: "scrollTable", 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", dataRefreshed: "dataRefreshed", 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 }, { propertyName: "manualRefreshComponent", first: true, predicate: CoreManualRefreshComponent, 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 >\n </core-active-filters>\n}\n<div\n class=\"c-table\"\n [class.c-table--scroll]=\"scrollTable()\"\n [class.in-modal]=\"inModal()\"\n [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\"\n>\n @if (shouldShowManualRefresh()) {\n <core-manual-refresh\n [config]=\"getManualRefreshConfig()\"\n (onRefresh)=\"onManualRefresh()\"\n >\n </core-manual-refresh>\n }\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input\n type=\"checkbox\"\n [checked]=\"isAllSelected()\"\n (change)=\"masterToggle()\"\n />\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\n class=\"c-table-order\"\n tabindex=\"-1\"\n [class.is-asc]=\"\n getColumnSortState(column) === SortDirection.ASC\n \"\n [class.is-desc]=\"\n getColumnSortState(column) === SortDirection.DESC\n \"\n [class.has-multiple-sorts]=\"\n isMultiColumnSortEnabled() &&\n getColumnSortPriority(column) !== null\n \"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\"\n >\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\n class=\"c-table-order__arrow--asc icon-arrow-down\"\n ></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (\n showActions() && (actions().length > 0 || customActions().length > 0)\n ) {\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\n [ngClass]=\"getRowClasses(row)\"\n [class.is-editable]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\"\n >\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input\n type=\"checkbox\"\n [checked]=\"isRowSelected(row)\"\n (change)=\"toggleRow(row)\"\n />\n </td>\n }\n @for (column of columns(); track $index) {\n <td\n [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 >\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container\n *ngTemplateOutlet=\"\n column.template;\n context: { $implicit: row, column: column }\n \"\n ></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\"\n >{{ column.label | translate }}:</strong\n >\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\"\n >{{ column.label | translate }}:</strong\n >\n {{ getFormattedValue(row, column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (\n showActions() &&\n (actions().length > 0 ||\n customActions().length > 0 ||\n expansionConfig()?.enabled)\n ) {\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown\n [rowId]=\"row.getId()\"\n [extraDefaultActions]=\"getVisibleDefaultActions(row, true)\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\"\n [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"\n triggerCustomAction($event.action, $event.row)\n \"\n #dropdown\n >\n </core-dropdown>\n @for (\n actionConfig of getVisibleDefaultActions(row, false);\n track actionConfig.action\n ) {\n @if (hasPermission(actionConfig)) {\n @if (\n actionConfig.action === TableAction.VIEW ||\n actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE ||\n actionConfig.action === TableAction.RECOVER\n ) {\n <core-generic-button\n [config]=\"\n getActionButtonConfig(\n actionConfig.action,\n actionConfig,\n row\n )\n \"\n (buttonClick)=\"\n onButtonClick($event, actionConfig.action, row)\n \"\n >\n </core-generic-button>\n }\n }\n }\n @for (\n customAction of getVisibleCustomActions(row, false);\n track customAction.label || $index\n ) {\n @if (hasPermission(customAction)) {\n @if (customAction.isSwitch && customAction.switchOptions) {\n <core-generic-switch\n [options]=\"customAction.switchOptions\"\n [selectedValue]=\"\n customAction.switchValue\n ? customAction.switchValue(row)\n : null\n \"\n [ariaLabel]=\"\n customAction.switchAriaLabel || customAction.title\n \"\n (valueChange)=\"\n onCustomActionSwitchChange($event, customAction, row)\n \"\n >\n </core-generic-switch>\n } @else {\n <core-generic-button\n [config]=\"\n getCustomActionButtonConfigForRow(customAction, row)\n \"\n (buttonClick)=\"onButtonClick($event, customAction, row)\"\n >\n </core-generic-button>\n }\n }\n }\n\n @for (\n outsideAction of getOutsideFixedActionsForRow(row);\n track $index\n ) {\n @if (\n outsideAction.type === \"table\" ||\n outsideAction.type === \"custom\"\n ? hasPermission(outsideAction.config)\n : true\n ) {\n <core-generic-button\n [config]=\"\n getOutsideFixedActionButtonConfig(outsideAction, row)\n \"\n (buttonClick)=\"\n onOutsideFixedActionClick($event, outsideAction, row)\n \"\n >\n </core-generic-button>\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button\n [config]=\"getMoreActionsButtonConfig(row.getId())\"\n [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\"\n #dropdownTrigger\n >\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\n [config]=\"getExpandButtonConfig(row)\"\n (buttonClick)=\"onExpandButtonClick($event, row)\"\n >\n </core-generic-button>\n }\n </div>\n <!-- .c-table__actions -->\n </td>\n <!-- td parent of .c-table__actions -->\n }\n <!-- @if (showActions() -->\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"c-table-dropdown\" [ngClass]=\"getRowClasses(row)\">\n <td\n [attr.colspan]=\"displayedColumns().length\"\n class=\"c-table-dropdown__holder\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n expansionConfig()!.template;\n context: { $implicit: row }\n \"\n >\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>\n<!-- .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 <core-generic-pagination\n [tableId]=\"tableId\"\n [isServerSide]=\"!!endpoint()\"\n [showPagination]=\"shouldShowPagination()\"\n [showPageSizeSelector]=\"shouldShowPageSizeSelector()\"\n >\n </core-generic-pagination>\n}\n\n<core-generic-modal\n [isOpen]=\"tableActionService.getIsModalOpen()\"\n [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\"\n [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\"\n [title]=\"tableActionService.getModalTitle()\"\n [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\"\n (close)=\"tableActionService.closeModal()\"\n (modalData)=\"onModalData($event)\"\n>\n</core-generic-modal>\n\n<core-filter-modal\n [isOpen]=\"isFilterModalOpen()\"\n [filters]=\"modalFilters()\"\n [currentFilterValues]=\"currentFilterValues()\"\n (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\"\n (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\"\n>\n</core-filter-modal>\n\n<!-- @if (shouldShowFixedActions()) {\n <div class=\"c-fixed-actions\" [ngClass]=\"'c-fixed-actions--' + (fixedActionsConfig()?.position || 'right')\">\n @for (action of fixedActionsArray(); track $index) {\n @if (shouldShowFixedAction(action)) {\n <button \n type=\"button\"\n [ngClass]=\"getFixedActionClass(action)\"\n [disabled]=\"isFixedActionDisabled(action)\"\n [title]=\"getFixedActionTooltip(action) || ''\"\n [attr.aria-label]=\"getFixedActionTooltip(action) || action.label || ''\"\n (click)=\"onFixedActionClick(action)\">\n </button>\n }\n }\n </div>\n} -->\n\n<core-fixed-actions-mobile-modal />\n", styles: [".c-table-dropdown{padding:16px;background-color:var(--color-neutral-200);border-top:1px solid var(--color-alternative-100)}.c-table-dropdown td{border-bottom:none}@keyframes newItemHighlight{0%{background-color:#f8f9fa;border-left-color:var(--color-context-success)}25%{background-color:#e9ecef}50%{background-color:#f8f9fa}75%{background-color:#e9ecef}to{background-color:transparent;border-left-color:transparent}}@media (max-width: 61.1875rem){.c-table-dropdown{background-color:var(--color-neutral-200);border-radius:0 0 var(--app-br) var(--app-br);border-top:none;margin-top:calc(var(--_gap-y) * -1 - var(--app-br))}}\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", "steps", "title", "isMultiple", "customTemplate", "customViewTemplate", "finalStepTemplate", "buttonConfig", "modelFactory", "errors", "validators", "customHasChanges", "stepValidationEnabled", "allowFreeNavigation", "autoMarkCompleted"], outputs: ["save", "close", "modalData"] }, { kind: "component", type: GenericPaginationComponent, selector: "core-generic-pagination", inputs: ["tableId", "isServerSide", "showPagination", "showPageSizeSelector"] }, { 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"] }, { kind: "component", type: CoreManualRefreshComponent, selector: "core-manual-refresh", inputs: ["config", "refreshId"], outputs: ["onRefresh", "timestampUpdated"] }, { kind: "component", type: GenericSwitchComponent, selector: "core-generic-switch", inputs: ["options", "selectedValue", "ariaLabel"], outputs: ["valueChange"] }, { kind: "component", type: FixedActionsMobileModalComponent, selector: "core-fixed-actions-mobile-modal" }] });
|
|
15287
15424
|
}
|
|
15288
15425
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericTableComponent, decorators: [{
|
|
15289
15426
|
type: Component,
|
|
@@ -15300,7 +15437,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
15300
15437
|
CoreManualRefreshComponent,
|
|
15301
15438
|
GenericSwitchComponent,
|
|
15302
15439
|
FixedActionsMobileModalComponent,
|
|
15303
|
-
], hostDirectives: [CoreHostDirective], providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], 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<div class=\"c-table\" [class.c-table--scroll]=\"scrollTable()\" [class.in-modal]=\"inModal()\" [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\">\n @if (shouldShowManualRefresh()) {\n <core-manual-refresh \n [config]=\"getManualRefreshConfig()\"\n (onRefresh)=\"onManualRefresh()\">\n </core-manual-refresh>\n }\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-editable]=\"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]=\"getVisibleDefaultActions(row, true)\"\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 getVisibleDefaultActions(row, false); track actionConfig.action) {\n @if (hasPermission(actionConfig)) {\n @if (actionConfig.action === TableAction.VIEW || actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE || actionConfig.action === TableAction.RECOVER) {\n <core-generic-button [config]=\"getActionButtonConfig(actionConfig.action, actionConfig, row)\"\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 @if (customAction.isSwitch && customAction.switchOptions) {\n <core-generic-switch\n [options]=\"customAction.switchOptions\"\n [selectedValue]=\"customAction.switchValue ? customAction.switchValue(row) : null\"\n [ariaLabel]=\"customAction.switchAriaLabel || customAction.title\"\n (valueChange)=\"onCustomActionSwitchChange($event, customAction, row)\">\n </core-generic-switch>\n } @else {\n <core-generic-button [config]=\"getCustomActionButtonConfigForRow(customAction, row)\"\n (buttonClick)=\"onButtonClick($event, customAction, row)\">\n </core-generic-button>\n }\n }\n }\n\n @for (outsideAction of getOutsideFixedActionsForRow(row); track $index) {\n @if (outsideAction.type === 'table' || outsideAction.type === 'custom' ? hasPermission(outsideAction.config) : true) {\n <core-generic-button \n [config]=\"getOutsideFixedActionButtonConfig(outsideAction, row)\"\n (buttonClick)=\"onOutsideFixedActionClick($event, outsideAction, 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=\"c-table-dropdown\" [ngClass]=\"getRowClasses(row)\">\n <td [attr.colspan]=\"displayedColumns().length\" class=\"c-table-dropdown__holder\">\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<core-generic-pagination \n [tableId]=\"tableId\" \n [isServerSide]=\"!!endpoint()\"\n [showPagination]=\"shouldShowPagination()\"\n [showPageSizeSelector]=\"shouldShowPageSizeSelector()\">\n</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>\n\n<!-- @if (shouldShowFixedActions()) {\n <div class=\"c-fixed-actions\" [ngClass]=\"'c-fixed-actions--' + (fixedActionsConfig()?.position || 'right')\">\n @for (action of fixedActionsArray(); track $index) {\n @if (shouldShowFixedAction(action)) {\n <button \n type=\"button\"\n [ngClass]=\"getFixedActionClass(action)\"\n [disabled]=\"isFixedActionDisabled(action)\"\n [title]=\"getFixedActionTooltip(action) || ''\"\n [attr.aria-label]=\"getFixedActionTooltip(action) || action.label || ''\"\n (click)=\"onFixedActionClick(action)\">\n </button>\n }\n }\n </div>\n} -->\n\n<core-fixed-actions-mobile-modal />\n", styles: [".c-table-dropdown{padding:16px;background-color:var(--color-neutral-200);border-top:1px solid var(--color-alternative-100)}.c-table-dropdown td{border-bottom:none}@keyframes newItemHighlight{0%{background-color:#f8f9fa;border-left-color:var(--color-context-success)}25%{background-color:#e9ecef}50%{background-color:#f8f9fa}75%{background-color:#e9ecef}to{background-color:transparent;border-left-color:transparent}}@media (max-width: 61.1875rem){.c-table-dropdown{background-color:var(--color-neutral-200);border-radius:0 0 var(--app-br) var(--app-br);border-top:none;margin-top:calc(var(--_gap-y) * -1 - var(--app-br))}}\n"] }]
|
|
15440
|
+
], hostDirectives: [CoreHostDirective], providers: [TableDataService, FilterService, PaginationService, ModelApiService, InlineEditService], template: "@if (showActiveFilters()) {\n <core-active-filters\n [activeFilters]=\"currentActiveFilters()\"\n [config]=\"activeFiltersConfig()\"\n (onFilterRemove)=\"onActiveFilterRemove($event)\"\n (onClearAll)=\"onActiveFiltersClear()\"\n >\n </core-active-filters>\n}\n<div\n class=\"c-table\"\n [class.c-table--scroll]=\"scrollTable()\"\n [class.in-modal]=\"inModal()\"\n [class.inline-edit-mode]=\"inlineEditService.isInlineEditMode()\"\n>\n @if (shouldShowManualRefresh()) {\n <core-manual-refresh\n [config]=\"getManualRefreshConfig()\"\n (onRefresh)=\"onManualRefresh()\"\n >\n </core-manual-refresh>\n }\n <table>\n <thead>\n <tr>\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <th class=\"select-column\">\n <input\n type=\"checkbox\"\n [checked]=\"isAllSelected()\"\n (change)=\"masterToggle()\"\n />\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\n class=\"c-table-order\"\n tabindex=\"-1\"\n [class.is-asc]=\"\n getColumnSortState(column) === SortDirection.ASC\n \"\n [class.is-desc]=\"\n getColumnSortState(column) === SortDirection.DESC\n \"\n [class.has-multiple-sorts]=\"\n isMultiColumnSortEnabled() &&\n getColumnSortPriority(column) !== null\n \"\n [title]=\"getSortButtonTitle(column)\"\n (click)=\"onColumnHeaderClick(column)\"\n >\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\n class=\"c-table-order__arrow--asc icon-arrow-down\"\n ></span>\n </span>\n </button>\n } @else {\n {{ column.label | translate }}\n }\n </th>\n }\n @if (\n showActions() && (actions().length > 0 || customActions().length > 0)\n ) {\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\n [ngClass]=\"getRowClasses(row)\"\n [class.is-editable]=\"isRowInEditMode(row.getId())\"\n [class.is-disabled]=\"isRowDisabled(row)\"\n >\n @if (showSelection()) {\n <!-- Todo: Tabla con row selection -->\n <td class=\"select-column\">\n <input\n type=\"checkbox\"\n [checked]=\"isRowSelected(row)\"\n (change)=\"toggleRow(row)\"\n />\n </td>\n }\n @for (column of columns(); track $index) {\n <td\n [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 >\n @if (column.template) {\n <!-- Todo: Ver qu\u00E9 es esto -->\n <ng-container\n *ngTemplateOutlet=\"\n column.template;\n context: { $implicit: row, column: column }\n \"\n ></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\"\n >{{ column.label | translate }}:</strong\n >\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\"\n >{{ column.label | translate }}:</strong\n >\n {{ getFormattedValue(row, column) }}\n </div>\n }\n </td>\n }\n\n <!-- Actions-->\n\n @if (\n showActions() &&\n (actions().length > 0 ||\n customActions().length > 0 ||\n expansionConfig()?.enabled)\n ) {\n <td class=\"u-align-right\">\n <div class=\"c-table__actions\">\n <core-dropdown\n [rowId]=\"row.getId()\"\n [extraDefaultActions]=\"getVisibleDefaultActions(row, true)\"\n [extraCustomActions]=\"getVisibleCustomActions(row, true)\"\n [row]=\"row\"\n [triggerElementId]=\"'dropdown-trigger-' + row.getId()\"\n (actionTriggered)=\"triggerAction($event.action, $event.row)\"\n (customActionTriggered)=\"\n triggerCustomAction($event.action, $event.row)\n \"\n #dropdown\n >\n </core-dropdown>\n @for (\n actionConfig of getVisibleDefaultActions(row, false);\n track actionConfig.action\n ) {\n @if (hasPermission(actionConfig)) {\n @if (\n actionConfig.action === TableAction.VIEW ||\n actionConfig.action === TableAction.EDIT ||\n actionConfig.action === TableAction.DELETE ||\n actionConfig.action === TableAction.RECOVER\n ) {\n <core-generic-button\n [config]=\"\n getActionButtonConfig(\n actionConfig.action,\n actionConfig,\n row\n )\n \"\n (buttonClick)=\"\n onButtonClick($event, actionConfig.action, row)\n \"\n >\n </core-generic-button>\n }\n }\n }\n @for (\n customAction of getVisibleCustomActions(row, false);\n track customAction.label || $index\n ) {\n @if (hasPermission(customAction)) {\n @if (customAction.isSwitch && customAction.switchOptions) {\n <core-generic-switch\n [options]=\"customAction.switchOptions\"\n [selectedValue]=\"\n customAction.switchValue\n ? customAction.switchValue(row)\n : null\n \"\n [ariaLabel]=\"\n customAction.switchAriaLabel || customAction.title\n \"\n (valueChange)=\"\n onCustomActionSwitchChange($event, customAction, row)\n \"\n >\n </core-generic-switch>\n } @else {\n <core-generic-button\n [config]=\"\n getCustomActionButtonConfigForRow(customAction, row)\n \"\n (buttonClick)=\"onButtonClick($event, customAction, row)\"\n >\n </core-generic-button>\n }\n }\n }\n\n @for (\n outsideAction of getOutsideFixedActionsForRow(row);\n track $index\n ) {\n @if (\n outsideAction.type === \"table\" ||\n outsideAction.type === \"custom\"\n ? hasPermission(outsideAction.config)\n : true\n ) {\n <core-generic-button\n [config]=\"\n getOutsideFixedActionButtonConfig(outsideAction, row)\n \"\n (buttonClick)=\"\n onOutsideFixedActionClick($event, outsideAction, row)\n \"\n >\n </core-generic-button>\n }\n }\n\n @if (hasExtraActionsForRow(row)) {\n <core-generic-button\n [config]=\"getMoreActionsButtonConfig(row.getId())\"\n [data]=\"row\"\n (buttonClick)=\"onMoreActionsClick($event, row.getId())\"\n #dropdownTrigger\n >\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\n [config]=\"getExpandButtonConfig(row)\"\n (buttonClick)=\"onExpandButtonClick($event, row)\"\n >\n </core-generic-button>\n }\n </div>\n <!-- .c-table__actions -->\n </td>\n <!-- td parent of .c-table__actions -->\n }\n <!-- @if (showActions() -->\n </tr>\n @if (expansionConfig()?.enabled && isRowExpanded(row)) {\n <!-- Todo: Ver que es esto -->\n <tr class=\"c-table-dropdown\" [ngClass]=\"getRowClasses(row)\">\n <td\n [attr.colspan]=\"displayedColumns().length\"\n class=\"c-table-dropdown__holder\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n expansionConfig()!.template;\n context: { $implicit: row }\n \"\n >\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>\n<!-- .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 <core-generic-pagination\n [tableId]=\"tableId\"\n [isServerSide]=\"!!endpoint()\"\n [showPagination]=\"shouldShowPagination()\"\n [showPageSizeSelector]=\"shouldShowPageSizeSelector()\"\n >\n </core-generic-pagination>\n}\n\n<core-generic-modal\n [isOpen]=\"tableActionService.getIsModalOpen()\"\n [mode]=\"tableActionService.getModalMode()\"\n [data]=\"tableActionService.getModalData()\"\n [fields]=\"hasTabs() ? [] : tableActionService.getModalFieldsToShow()\"\n [tabs]=\"hasTabs() ? modalTabs() : []\"\n [title]=\"tableActionService.getModalTitle()\"\n [modelFactory]=\"modelFactory() || null\"\n (save)=\"onModalSave($event)\"\n (close)=\"tableActionService.closeModal()\"\n (modalData)=\"onModalData($event)\"\n>\n</core-generic-modal>\n\n<core-filter-modal\n [isOpen]=\"isFilterModalOpen()\"\n [filters]=\"modalFilters()\"\n [currentFilterValues]=\"currentFilterValues()\"\n (close)=\"closeFiltersPopup()\"\n (filterChange)=\"handleFilterChange($event)\"\n (globalFilterChange)=\"applyGlobalFilter($event)\"\n (clearFilters)=\"handleClearFilters()\"\n>\n</core-filter-modal>\n\n<!-- @if (shouldShowFixedActions()) {\n <div class=\"c-fixed-actions\" [ngClass]=\"'c-fixed-actions--' + (fixedActionsConfig()?.position || 'right')\">\n @for (action of fixedActionsArray(); track $index) {\n @if (shouldShowFixedAction(action)) {\n <button \n type=\"button\"\n [ngClass]=\"getFixedActionClass(action)\"\n [disabled]=\"isFixedActionDisabled(action)\"\n [title]=\"getFixedActionTooltip(action) || ''\"\n [attr.aria-label]=\"getFixedActionTooltip(action) || action.label || ''\"\n (click)=\"onFixedActionClick(action)\">\n </button>\n }\n }\n </div>\n} -->\n\n<core-fixed-actions-mobile-modal />\n", styles: [".c-table-dropdown{padding:16px;background-color:var(--color-neutral-200);border-top:1px solid var(--color-alternative-100)}.c-table-dropdown td{border-bottom:none}@keyframes newItemHighlight{0%{background-color:#f8f9fa;border-left-color:var(--color-context-success)}25%{background-color:#e9ecef}50%{background-color:#f8f9fa}75%{background-color:#e9ecef}to{background-color:transparent;border-left-color:transparent}}@media (max-width: 61.1875rem){.c-table-dropdown{background-color:var(--color-neutral-200);border-radius:0 0 var(--app-br) var(--app-br);border-top:none;margin-top:calc(var(--_gap-y) * -1 - var(--app-br))}}\n"] }]
|
|
15304
15441
|
}], ctorParameters: () => [], propDecorators: { sentinel: [{
|
|
15305
15442
|
type: ViewChild,
|
|
15306
15443
|
args: ['sentinel', { static: false }]
|
|
@@ -16544,6 +16681,7 @@ class HeaderComponent {
|
|
|
16544
16681
|
cdr = inject(ChangeDetectorRef);
|
|
16545
16682
|
mobileResolutionService = inject(MobileResolutionService);
|
|
16546
16683
|
HeaderElementType = HeaderElementType;
|
|
16684
|
+
ModalMode = ModalMode;
|
|
16547
16685
|
title = 'ASDSAS';
|
|
16548
16686
|
user;
|
|
16549
16687
|
isDarkMode = false;
|
|
@@ -16784,8 +16922,76 @@ class HeaderComponent {
|
|
|
16784
16922
|
}
|
|
16785
16923
|
return false;
|
|
16786
16924
|
}
|
|
16925
|
+
getHeaderFilters() {
|
|
16926
|
+
const allFilters = this.headerService.getCustomFilters()();
|
|
16927
|
+
return allFilters.filter(filter => filter.showOutsideFilterModal === true);
|
|
16928
|
+
}
|
|
16929
|
+
getFilterValue(key) {
|
|
16930
|
+
const pendingFilters = this.headerService.getPendingHeaderFilters()();
|
|
16931
|
+
const appliedFilters = this.headerService.getHeaderFilterValues()();
|
|
16932
|
+
if (pendingFilters.has(key)) {
|
|
16933
|
+
return pendingFilters.get(key) ?? '';
|
|
16934
|
+
}
|
|
16935
|
+
return appliedFilters.get(key) ?? '';
|
|
16936
|
+
}
|
|
16937
|
+
onFilterValueChange(key, value) {
|
|
16938
|
+
const callback = this.headerService.getHeaderFilterChangeCallback()();
|
|
16939
|
+
if (callback) {
|
|
16940
|
+
callback(key, value);
|
|
16941
|
+
}
|
|
16942
|
+
}
|
|
16943
|
+
onApplyHeaderFilters() {
|
|
16944
|
+
const applyCallback = this.headerService.getApplyHeaderFiltersCallback()();
|
|
16945
|
+
if (applyCallback) {
|
|
16946
|
+
applyCallback();
|
|
16947
|
+
}
|
|
16948
|
+
}
|
|
16949
|
+
hasPendingChanges() {
|
|
16950
|
+
const pending = this.headerService.getPendingHeaderFilters()();
|
|
16951
|
+
const applied = this.headerService.getHeaderFilterValues()();
|
|
16952
|
+
if (pending.size !== applied.size) {
|
|
16953
|
+
return true;
|
|
16954
|
+
}
|
|
16955
|
+
for (const [key, value] of pending.entries()) {
|
|
16956
|
+
if (applied.get(key) !== value) {
|
|
16957
|
+
return true;
|
|
16958
|
+
}
|
|
16959
|
+
}
|
|
16960
|
+
return false;
|
|
16961
|
+
}
|
|
16962
|
+
getFilterErrors(key) {
|
|
16963
|
+
return {};
|
|
16964
|
+
}
|
|
16965
|
+
getApplyFiltersButtonConfig() {
|
|
16966
|
+
return {
|
|
16967
|
+
type: ButtonType.PRIMARY,
|
|
16968
|
+
customClass: 'u-push-t',
|
|
16969
|
+
text: 'table.apply',
|
|
16970
|
+
ariaLabel: 'table.apply',
|
|
16971
|
+
disabled: !this.hasPendingChanges()
|
|
16972
|
+
};
|
|
16973
|
+
}
|
|
16974
|
+
getClearFiltersButtonConfig() {
|
|
16975
|
+
return {
|
|
16976
|
+
type: ButtonType.LINK,
|
|
16977
|
+
customClass: 'u-push-t',
|
|
16978
|
+
text: 'table.clearFilters',
|
|
16979
|
+
ariaLabel: 'table.clearFilters',
|
|
16980
|
+
disabled: !this.hasAnyFilterValue()
|
|
16981
|
+
};
|
|
16982
|
+
}
|
|
16983
|
+
hasAnyFilterValue() {
|
|
16984
|
+
const pending = this.headerService.getPendingHeaderFilters()();
|
|
16985
|
+
return pending.size > 0;
|
|
16986
|
+
}
|
|
16987
|
+
onClearHeaderFilters() {
|
|
16988
|
+
const clearCallback = this.headerService.getClearHeaderFiltersCallback()();
|
|
16989
|
+
if (clearCallback) {
|
|
16990
|
+
clearCallback();
|
|
16991
|
+
}
|
|
16992
|
+
}
|
|
16787
16993
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16788
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: HeaderComponent, isStandalone: true, selector: "core-header", outputs: { filterRequested: "filterRequested", createRequested: "createRequested", globalActionTriggered: "globalActionTriggered" }, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "@if (headerService.getIsVisible()()) {\n @if(!headerService.getHeaderOutside()()) {\n
|
|
16994
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: HeaderComponent, isStandalone: true, selector: "core-header", outputs: { filterRequested: "filterRequested", createRequested: "createRequested", globalActionTriggered: "globalActionTriggered" }, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "@if (headerService.getIsVisible()()) {\n @if (!headerService.getHeaderOutside()()) {\n <div class=\"c-header\">\n <div class=\"c-header__row\">\n <div class=\"c-header__group\">\n <h2 class=\"c-header__heading u-heading\">{{ getHeaderTitle() }}</h2>\n </div>\n\n <div class=\"c-header__group u-flex\">\n @for (\n element of headerService.getOrderedElements();\n track element.type + \"-\" + (element.actionId || $index)\n ) {\n @if (headerService.isElementVisible(element.type, element)) {\n @switch (element.type) {\n @case (HeaderElementType.GLOBAL_ACTIONS) {\n @for (\n globalAction of headerService.getGlobalActions()();\n track globalAction.label || $index\n ) {\n @if (hasPermission(globalAction)) {\n @if (\n globalAction.isSwitch && globalAction.switchOptions\n ) {\n <core-generic-switch\n [options]=\"globalAction.switchOptions\"\n [selectedValue]=\"globalAction.switchSelectedValue\"\n [ariaLabel]=\"\n globalAction.switchAriaLabel ||\n globalAction.label ||\n 'Switch options'\n \"\n (valueChange)=\"\n onGlobalSwitchChange($event, globalAction)\n \"\n >\n </core-generic-switch>\n } @else {\n <core-generic-button\n [config]=\"getGlobalActionButtonConfig(globalAction)\"\n (buttonClick)=\"\n onGlobalButtonClick($event, globalAction)\n \"\n >\n </core-generic-button>\n }\n }\n }\n }\n\n @case (HeaderElementType.CUSTOM_ACTIONS) {\n @for (\n customAction of headerService.getCustomActions()();\n track customAction.id\n ) {\n @if (isCustomActionVisible(customAction)) {\n <core-generic-button\n [config]=\"getCustomActionButtonConfig(customAction)\"\n (buttonClick)=\"\n onCustomButtonClick($event, customAction)\n \"\n >\n </core-generic-button>\n }\n }\n }\n\n @case (HeaderElementType.FILTER) {\n <core-generic-button\n [config]=\"getFilterButtonConfig()\"\n (buttonClick)=\"onFilterButtonClick()\"\n >\n </core-generic-button>\n }\n\n @case (HeaderElementType.CREATE) {\n <core-generic-button\n [config]=\"getCreateButtonConfig()\"\n (buttonClick)=\"onCreateButtonClick()\"\n >\n </core-generic-button>\n }\n\n @case (HeaderElementType.INDIVIDUAL_ACTION) {\n @if (getIndividualAction(element); as action) {\n @if (hasIndividualActionPermission(action)) {\n @if (isIndividualActionSwitch(action)) {\n <core-generic-switch\n [options]=\"action.switchOptions\"\n [selectedValue]=\"action.switchSelectedValue\"\n [ariaLabel]=\"\n action.switchAriaLabel ||\n action.label ||\n 'Switch options'\n \"\n (valueChange)=\"onGlobalSwitchChange($event, action)\"\n >\n </core-generic-switch>\n } @else if (element.actionType === \"global\") {\n <core-generic-button\n [config]=\"getGlobalActionButtonConfig(action)\"\n (buttonClick)=\"onGlobalButtonClick($event, action)\"\n >\n </core-generic-button>\n } @else if (element.actionType === \"custom\") {\n <core-generic-button\n [config]=\"getCustomActionButtonConfig(action)\"\n (buttonClick)=\"onCustomButtonClick($event, action)\"\n >\n </core-generic-button>\n }\n }\n }\n }\n }\n }\n }\n </div>\n </div>\n\n <p class=\"c-header__text u-text\" *ngIf=\"getHeaderText()\">\n {{ getHeaderText() }}\n </p>\n\n @if (\n headerService.isElementVisible(HeaderElementType.CUSTOM_TEMPLATE) &&\n headerService.getCustomTemplate()()\n ) {\n <ng-container\n [ngTemplateOutlet]=\"headerService.getCustomTemplate()()\"\n ></ng-container>\n }\n\n <!-- Custom filters outside modal -->\n @if (getHeaderFilters().length > 0) {\n <div class=\"c-header__bottom\">\n <div class=\"c-header__filters\">\n <!-- Filter fields row -->\n <div>\n @for (filter of getHeaderFilters(); track filter.key) {\n <div class=\"c-header__filter-item\">\n <div\n coreDynamicField\n [field]=\"filter\"\n [value]=\"getFilterValue(filter.key.toString())\"\n [mode]=\"ModalMode.FILTER\"\n [errors]=\"getFilterErrors(filter.key.toString())\"\n (valueChange)=\"\n onFilterValueChange(filter.key.toString(), $event)\n \"\n ></div>\n </div>\n }\n </div>\n\n <!-- Action buttons row -->\n <div class=\"c-header__filter-actions\">\n <core-generic-button\n [config]=\"getApplyFiltersButtonConfig()\"\n (buttonClick)=\"onApplyHeaderFilters()\"\n >\n </core-generic-button>\n <core-generic-button\n [config]=\"getClearFiltersButtonConfig()\"\n (buttonClick)=\"onClearHeaderFilters()\"\n >\n </core-generic-button>\n </div>\n </div>\n </div>\n }\n </div>\n } @else {\n @if (\n headerService.isElementVisible(HeaderElementType.CUSTOM_TEMPLATE) &&\n headerService.getCustomTemplate()()\n ) {\n <ng-container\n [ngTemplateOutlet]=\"headerService.getCustomTemplate()()\"\n ></ng-container>\n }\n }\n}\n", styles: [":root{--header-bg: #ffffff;--header-text: #333;--header-shadow: rgba(0, 0, 0, .1);--logout-btn-color: #e74c3c;--logout-btn-hover: #c0392b;--theme-btn-color: #666;--theme-btn-hover: #007bff}.dark-mode{--header-bg: #1a1a1a;--header-text: #e0e0e0;--header-shadow: rgba(255, 255, 255, .1);--logout-btn-color: #ff6b6b;--logout-btn-hover: #ff8787;--theme-btn-color: #bbb;--theme-btn-hover: #4da8ff}.header{background-color:var(--header-bg);box-shadow:0 2px 4px var(--header-shadow);padding:15px 20px;display:flex;justify-content:space-between;align-items:center}.header .user-info{font-weight:500;color:var(--header-text)}.header .header-actions{display:flex;align-items:center;gap:15px}.header .theme-toggle-btn{background:none;border:none;color:var(--theme-btn-color);font-size:16px;cursor:pointer;display:flex;align-items:center}.header .theme-toggle-btn:hover{color:var(--theme-btn-hover)}.header .logout-btn{background:none;border:none;color:var(--logout-btn-color);font-size:16px;cursor:pointer;display:flex;align-items:center}.header .logout-btn i{margin-right:5px}.header .logout-btn:hover{color:var(--logout-btn-hover)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }, { kind: "component", type: GenericSwitchComponent, selector: "core-generic-switch", inputs: ["options", "selectedValue", "ariaLabel"], outputs: ["valueChange"] }, { kind: "directive", type: DynamicFieldDirective, selector: "[coreDynamicField]", inputs: ["field", "value", "mode", "errors", "rowData", "formValue"], outputs: ["valueChange", "onBlurEvent", "onEnterEvent", "selectionChange"] }] });
|
|
16789
16995
|
}
|
|
16790
16996
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: HeaderComponent, decorators: [{
|
|
16791
16997
|
type: Component,
|
|
@@ -16793,8 +16999,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
16793
16999
|
CommonModule,
|
|
16794
17000
|
TranslateModule,
|
|
16795
17001
|
GenericButtonComponent,
|
|
16796
|
-
GenericSwitchComponent
|
|
16797
|
-
|
|
17002
|
+
GenericSwitchComponent,
|
|
17003
|
+
DynamicFieldDirective
|
|
17004
|
+
], hostDirectives: [CoreHostDirective], template: "@if (headerService.getIsVisible()()) {\n @if (!headerService.getHeaderOutside()()) {\n <div class=\"c-header\">\n <div class=\"c-header__row\">\n <div class=\"c-header__group\">\n <h2 class=\"c-header__heading u-heading\">{{ getHeaderTitle() }}</h2>\n </div>\n\n <div class=\"c-header__group u-flex\">\n @for (\n element of headerService.getOrderedElements();\n track element.type + \"-\" + (element.actionId || $index)\n ) {\n @if (headerService.isElementVisible(element.type, element)) {\n @switch (element.type) {\n @case (HeaderElementType.GLOBAL_ACTIONS) {\n @for (\n globalAction of headerService.getGlobalActions()();\n track globalAction.label || $index\n ) {\n @if (hasPermission(globalAction)) {\n @if (\n globalAction.isSwitch && globalAction.switchOptions\n ) {\n <core-generic-switch\n [options]=\"globalAction.switchOptions\"\n [selectedValue]=\"globalAction.switchSelectedValue\"\n [ariaLabel]=\"\n globalAction.switchAriaLabel ||\n globalAction.label ||\n 'Switch options'\n \"\n (valueChange)=\"\n onGlobalSwitchChange($event, globalAction)\n \"\n >\n </core-generic-switch>\n } @else {\n <core-generic-button\n [config]=\"getGlobalActionButtonConfig(globalAction)\"\n (buttonClick)=\"\n onGlobalButtonClick($event, globalAction)\n \"\n >\n </core-generic-button>\n }\n }\n }\n }\n\n @case (HeaderElementType.CUSTOM_ACTIONS) {\n @for (\n customAction of headerService.getCustomActions()();\n track customAction.id\n ) {\n @if (isCustomActionVisible(customAction)) {\n <core-generic-button\n [config]=\"getCustomActionButtonConfig(customAction)\"\n (buttonClick)=\"\n onCustomButtonClick($event, customAction)\n \"\n >\n </core-generic-button>\n }\n }\n }\n\n @case (HeaderElementType.FILTER) {\n <core-generic-button\n [config]=\"getFilterButtonConfig()\"\n (buttonClick)=\"onFilterButtonClick()\"\n >\n </core-generic-button>\n }\n\n @case (HeaderElementType.CREATE) {\n <core-generic-button\n [config]=\"getCreateButtonConfig()\"\n (buttonClick)=\"onCreateButtonClick()\"\n >\n </core-generic-button>\n }\n\n @case (HeaderElementType.INDIVIDUAL_ACTION) {\n @if (getIndividualAction(element); as action) {\n @if (hasIndividualActionPermission(action)) {\n @if (isIndividualActionSwitch(action)) {\n <core-generic-switch\n [options]=\"action.switchOptions\"\n [selectedValue]=\"action.switchSelectedValue\"\n [ariaLabel]=\"\n action.switchAriaLabel ||\n action.label ||\n 'Switch options'\n \"\n (valueChange)=\"onGlobalSwitchChange($event, action)\"\n >\n </core-generic-switch>\n } @else if (element.actionType === \"global\") {\n <core-generic-button\n [config]=\"getGlobalActionButtonConfig(action)\"\n (buttonClick)=\"onGlobalButtonClick($event, action)\"\n >\n </core-generic-button>\n } @else if (element.actionType === \"custom\") {\n <core-generic-button\n [config]=\"getCustomActionButtonConfig(action)\"\n (buttonClick)=\"onCustomButtonClick($event, action)\"\n >\n </core-generic-button>\n }\n }\n }\n }\n }\n }\n }\n </div>\n </div>\n\n <p class=\"c-header__text u-text\" *ngIf=\"getHeaderText()\">\n {{ getHeaderText() }}\n </p>\n\n @if (\n headerService.isElementVisible(HeaderElementType.CUSTOM_TEMPLATE) &&\n headerService.getCustomTemplate()()\n ) {\n <ng-container\n [ngTemplateOutlet]=\"headerService.getCustomTemplate()()\"\n ></ng-container>\n }\n\n <!-- Custom filters outside modal -->\n @if (getHeaderFilters().length > 0) {\n <div class=\"c-header__bottom\">\n <div class=\"c-header__filters\">\n <!-- Filter fields row -->\n <div>\n @for (filter of getHeaderFilters(); track filter.key) {\n <div class=\"c-header__filter-item\">\n <div\n coreDynamicField\n [field]=\"filter\"\n [value]=\"getFilterValue(filter.key.toString())\"\n [mode]=\"ModalMode.FILTER\"\n [errors]=\"getFilterErrors(filter.key.toString())\"\n (valueChange)=\"\n onFilterValueChange(filter.key.toString(), $event)\n \"\n ></div>\n </div>\n }\n </div>\n\n <!-- Action buttons row -->\n <div class=\"c-header__filter-actions\">\n <core-generic-button\n [config]=\"getApplyFiltersButtonConfig()\"\n (buttonClick)=\"onApplyHeaderFilters()\"\n >\n </core-generic-button>\n <core-generic-button\n [config]=\"getClearFiltersButtonConfig()\"\n (buttonClick)=\"onClearHeaderFilters()\"\n >\n </core-generic-button>\n </div>\n </div>\n </div>\n }\n </div>\n } @else {\n @if (\n headerService.isElementVisible(HeaderElementType.CUSTOM_TEMPLATE) &&\n headerService.getCustomTemplate()()\n ) {\n <ng-container\n [ngTemplateOutlet]=\"headerService.getCustomTemplate()()\"\n ></ng-container>\n }\n }\n}\n", styles: [":root{--header-bg: #ffffff;--header-text: #333;--header-shadow: rgba(0, 0, 0, .1);--logout-btn-color: #e74c3c;--logout-btn-hover: #c0392b;--theme-btn-color: #666;--theme-btn-hover: #007bff}.dark-mode{--header-bg: #1a1a1a;--header-text: #e0e0e0;--header-shadow: rgba(255, 255, 255, .1);--logout-btn-color: #ff6b6b;--logout-btn-hover: #ff8787;--theme-btn-color: #bbb;--theme-btn-hover: #4da8ff}.header{background-color:var(--header-bg);box-shadow:0 2px 4px var(--header-shadow);padding:15px 20px;display:flex;justify-content:space-between;align-items:center}.header .user-info{font-weight:500;color:var(--header-text)}.header .header-actions{display:flex;align-items:center;gap:15px}.header .theme-toggle-btn{background:none;border:none;color:var(--theme-btn-color);font-size:16px;cursor:pointer;display:flex;align-items:center}.header .theme-toggle-btn:hover{color:var(--theme-btn-hover)}.header .logout-btn{background:none;border:none;color:var(--logout-btn-color);font-size:16px;cursor:pointer;display:flex;align-items:center}.header .logout-btn i{margin-right:5px}.header .logout-btn:hover{color:var(--logout-btn-hover)}\n"] }]
|
|
16798
17005
|
}], ctorParameters: () => [] });
|
|
16799
17006
|
|
|
16800
17007
|
class MobileHeaderComponent {
|
|
@@ -16954,12 +17161,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
16954
17161
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
16955
17162
|
// No edites manualmente este archivo
|
|
16956
17163
|
const VERSION = {
|
|
16957
|
-
full: '2.20.
|
|
17164
|
+
full: '2.20.7',
|
|
16958
17165
|
major: 2,
|
|
16959
17166
|
minor: 20,
|
|
16960
|
-
patch:
|
|
16961
|
-
timestamp: '2026-
|
|
16962
|
-
buildDate: '
|
|
17167
|
+
patch: 7,
|
|
17168
|
+
timestamp: '2026-02-02T15:53:33.334Z',
|
|
17169
|
+
buildDate: '2/2/2026'
|
|
16963
17170
|
};
|
|
16964
17171
|
|
|
16965
17172
|
class MainNavComponent {
|