@solcre-org/core-ui 2.20.8 → 2.20.10
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.
- package/README.md +1 -0
- package/fesm2022/solcre-org-core-ui.mjs +40 -11
- package/fesm2022/solcre-org-core-ui.mjs.map +1 -1
- package/index.d.ts +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1377,6 +1377,9 @@ class SelectFieldComponent extends BaseFieldComponent {
|
|
|
1377
1377
|
const hasValidValue = !Array.isArray(signalValue) || signalValue.length > 0;
|
|
1378
1378
|
this.hasValue.set(hasValidValue);
|
|
1379
1379
|
}
|
|
1380
|
+
else {
|
|
1381
|
+
this.hasValue.set(false);
|
|
1382
|
+
}
|
|
1380
1383
|
});
|
|
1381
1384
|
effect(() => {
|
|
1382
1385
|
const shouldDisable = this.mode() === ModalMode.VIEW || this.evaluateReadonly() || this.evaluateDisabled();
|
|
@@ -10079,6 +10082,7 @@ class TableDataService {
|
|
|
10079
10082
|
currentFilterParams = undefined;
|
|
10080
10083
|
currentPaginationParams = undefined;
|
|
10081
10084
|
currentCustomParams = undefined;
|
|
10085
|
+
currentSortParams = undefined;
|
|
10082
10086
|
isPaginationEnabled = true;
|
|
10083
10087
|
currentCustomArrayKey = undefined;
|
|
10084
10088
|
isLoading = false;
|
|
@@ -10127,6 +10131,7 @@ class TableDataService {
|
|
|
10127
10131
|
}
|
|
10128
10132
|
let params = {
|
|
10129
10133
|
...this.currentCustomParams,
|
|
10134
|
+
...this.currentSortParams,
|
|
10130
10135
|
...this.currentFilterParams
|
|
10131
10136
|
};
|
|
10132
10137
|
if (this.isPaginationEnabled && this.currentPaginationParams) {
|
|
@@ -10147,16 +10152,25 @@ class TableDataService {
|
|
|
10147
10152
|
this.loadData(this.currentFilterParams, this.currentPaginationParams, loaderId);
|
|
10148
10153
|
}
|
|
10149
10154
|
}
|
|
10150
|
-
refreshWithFilters(filterParams, loaderId) {
|
|
10155
|
+
refreshWithFilters(filterParams, loaderId, sortParams) {
|
|
10151
10156
|
if (this.isPaginationEnabled) {
|
|
10152
10157
|
this.currentPaginationParams = {
|
|
10153
10158
|
page: this.currentPaginationParams?.page || 1,
|
|
10154
10159
|
size: this.currentPaginationParams?.size || TableDataService.DEFAULT_PAGE_SIZE
|
|
10155
10160
|
};
|
|
10156
10161
|
}
|
|
10162
|
+
if (sortParams) {
|
|
10163
|
+
this.currentSortParams = sortParams;
|
|
10164
|
+
}
|
|
10157
10165
|
const paginationParams = this.isPaginationEnabled ? this.currentPaginationParams : undefined;
|
|
10158
10166
|
this.loadData(filterParams, paginationParams, loaderId);
|
|
10159
10167
|
}
|
|
10168
|
+
updateSortParams(sortParams) {
|
|
10169
|
+
this.currentSortParams = sortParams;
|
|
10170
|
+
}
|
|
10171
|
+
updatePaginationParams(paginationParams) {
|
|
10172
|
+
this.currentPaginationParams = paginationParams;
|
|
10173
|
+
}
|
|
10160
10174
|
updateDisplayedData(filteredData, enablePagination, paginationService, tableId, itemsLoaded) {
|
|
10161
10175
|
if (!this.currentEndpoint) {
|
|
10162
10176
|
let displayed;
|
|
@@ -13935,7 +13949,7 @@ class GenericTableComponent {
|
|
|
13935
13949
|
this.displayedData.set(orderedData);
|
|
13936
13950
|
}
|
|
13937
13951
|
else if (this.endpoint() && originalData.length === 0) {
|
|
13938
|
-
this.tableDataService.refreshWithFilters();
|
|
13952
|
+
this.tableDataService.refreshWithFilters(undefined, undefined, {});
|
|
13939
13953
|
}
|
|
13940
13954
|
}
|
|
13941
13955
|
sortCurrentData(data, columnKey) {
|
|
@@ -14035,7 +14049,8 @@ class GenericTableComponent {
|
|
|
14035
14049
|
next: (success) => {
|
|
14036
14050
|
if (success) {
|
|
14037
14051
|
this.dataUpdated.emit(row);
|
|
14038
|
-
this.
|
|
14052
|
+
const sortParams = this.tableSortService.generateServerSortParams();
|
|
14053
|
+
this.tableDataService.refreshWithFilters(undefined, undefined, sortParams);
|
|
14039
14054
|
}
|
|
14040
14055
|
},
|
|
14041
14056
|
error: (error) => {
|
|
@@ -14788,8 +14803,9 @@ class GenericTableComponent {
|
|
|
14788
14803
|
transformedFilters.forEach((value, key) => {
|
|
14789
14804
|
filterParams[key] = value;
|
|
14790
14805
|
});
|
|
14806
|
+
const sortParams = this.tableSortService.generateServerSortParams();
|
|
14791
14807
|
this.startLoaderTimeout(this.FILTER_LOADER_ID);
|
|
14792
|
-
this.tableDataService.refreshWithFilters(filterParams, this.FILTER_LOADER_ID);
|
|
14808
|
+
this.tableDataService.refreshWithFilters(filterParams, this.FILTER_LOADER_ID, sortParams);
|
|
14793
14809
|
this.filterService.setCustomFiltersSilent(currentFilters);
|
|
14794
14810
|
}
|
|
14795
14811
|
else {
|
|
@@ -14809,8 +14825,9 @@ class GenericTableComponent {
|
|
|
14809
14825
|
handleFiltersCleared() {
|
|
14810
14826
|
this.currentFilterValues.set(new Map());
|
|
14811
14827
|
if (this.endpoint()) {
|
|
14828
|
+
const sortParams = this.tableSortService.generateServerSortParams();
|
|
14812
14829
|
this.startLoaderTimeout(this.FILTER_LOADER_ID);
|
|
14813
|
-
this.tableDataService.refreshWithFilters({}, this.FILTER_LOADER_ID);
|
|
14830
|
+
this.tableDataService.refreshWithFilters({}, this.FILTER_LOADER_ID, sortParams);
|
|
14814
14831
|
this.filterService.setCustomFiltersSilent(new Map());
|
|
14815
14832
|
this.filterService.setGlobalFilterSilent('');
|
|
14816
14833
|
}
|
|
@@ -14976,6 +14993,10 @@ class GenericTableComponent {
|
|
|
14976
14993
|
const paginationParams = this.enablePagination()
|
|
14977
14994
|
? this.paginationService.getCurrentPaginationParams(this.tableId)
|
|
14978
14995
|
: {};
|
|
14996
|
+
this.tableDataService.updateSortParams(sortParams);
|
|
14997
|
+
if (this.enablePagination() && 'page' in paginationParams && 'size' in paginationParams) {
|
|
14998
|
+
this.tableDataService.updatePaginationParams(paginationParams);
|
|
14999
|
+
}
|
|
14979
15000
|
const cleanedCustomParams = this.getCleanedCustomParams(sortParams);
|
|
14980
15001
|
const allParams = {
|
|
14981
15002
|
...cleanedCustomParams,
|
|
@@ -16697,6 +16718,7 @@ class HeaderComponent {
|
|
|
16697
16718
|
filterRequested = output();
|
|
16698
16719
|
createRequested = output();
|
|
16699
16720
|
globalActionTriggered = output();
|
|
16721
|
+
clearTrigger = signal(0);
|
|
16700
16722
|
constructor() {
|
|
16701
16723
|
this.user = this.authService.getLoggedUser();
|
|
16702
16724
|
}
|
|
@@ -16936,12 +16958,13 @@ class HeaderComponent {
|
|
|
16936
16958
|
return allFilters.filter(filter => filter.showOutsideFilterModal === true);
|
|
16937
16959
|
}
|
|
16938
16960
|
getFilterValue(key) {
|
|
16961
|
+
const trigger = this.clearTrigger();
|
|
16939
16962
|
const pendingFilters = this.headerService.getPendingHeaderFilters()();
|
|
16940
16963
|
const appliedFilters = this.headerService.getHeaderFilterValues()();
|
|
16941
16964
|
if (pendingFilters.has(key)) {
|
|
16942
|
-
return pendingFilters.get(key) ??
|
|
16965
|
+
return pendingFilters.get(key) ?? null;
|
|
16943
16966
|
}
|
|
16944
|
-
return appliedFilters.get(key) ??
|
|
16967
|
+
return appliedFilters.get(key) ?? null;
|
|
16945
16968
|
}
|
|
16946
16969
|
onFilterValueChange(key, value) {
|
|
16947
16970
|
const callback = this.headerService.getHeaderFilterChangeCallback()();
|
|
@@ -16998,6 +17021,12 @@ class HeaderComponent {
|
|
|
16998
17021
|
if (clearCallback) {
|
|
16999
17022
|
clearCallback();
|
|
17000
17023
|
}
|
|
17024
|
+
const emptyFilters = new Map();
|
|
17025
|
+
this.getHeaderFilters().forEach(filter => {
|
|
17026
|
+
emptyFilters.set(filter.key.toString(), null);
|
|
17027
|
+
});
|
|
17028
|
+
this.headerService.setPendingHeaderFilters(emptyFilters);
|
|
17029
|
+
this.clearTrigger.update(v => v + 1);
|
|
17001
17030
|
}
|
|
17002
17031
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17003
17032
|
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"] }] });
|
|
@@ -17170,12 +17199,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
17170
17199
|
// Este archivo es generado automáticamente por scripts/update-version.js
|
|
17171
17200
|
// No edites manualmente este archivo
|
|
17172
17201
|
const VERSION = {
|
|
17173
|
-
full: '2.20.
|
|
17202
|
+
full: '2.20.10',
|
|
17174
17203
|
major: 2,
|
|
17175
17204
|
minor: 20,
|
|
17176
|
-
patch:
|
|
17177
|
-
timestamp: '2026-02-
|
|
17178
|
-
buildDate: '
|
|
17205
|
+
patch: 10,
|
|
17206
|
+
timestamp: '2026-02-03T16:21:27.114Z',
|
|
17207
|
+
buildDate: '3/2/2026'
|
|
17179
17208
|
};
|
|
17180
17209
|
|
|
17181
17210
|
class MainNavComponent {
|