@solcre-org/core-ui 2.20.14 → 2.20.15

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.
@@ -11104,10 +11104,28 @@ class FilterModalComponent {
11104
11104
  }
11105
11105
  initializeForm() {
11106
11106
  const formGroup = {};
11107
+ const initialFilterValues = new Map();
11107
11108
  this.filters().forEach(filter => {
11108
- formGroup[filter.key.toString()] = [''];
11109
+ const modeConfig = filter.modes?.[ModalMode.FILTER];
11110
+ const defaultValue = modeConfig?.defaultValue ?? filter.defaultValue;
11111
+ let initialValue = '';
11112
+ if (defaultValue !== undefined) {
11113
+ if (typeof defaultValue === 'function') {
11114
+ initialValue = defaultValue();
11115
+ }
11116
+ else {
11117
+ initialValue = defaultValue;
11118
+ }
11119
+ if (initialValue !== '' && initialValue !== null && initialValue !== undefined) {
11120
+ initialFilterValues.set(filter.key.toString(), initialValue);
11121
+ }
11122
+ }
11123
+ formGroup[filter.key.toString()] = [initialValue];
11109
11124
  });
11110
11125
  this.form.set(this.formBuilder.group(formGroup));
11126
+ if (initialFilterValues.size > 0 && this.filterValues().size === 0) {
11127
+ this.filterValues.set(initialFilterValues);
11128
+ }
11111
11129
  }
11112
11130
  resetValues() {
11113
11131
  this.filterValues.set(new Map());
@@ -13671,6 +13689,7 @@ class GenericTableComponent {
13671
13689
  this.subscriptions.push(this.tableSortService.sortConfigs$.subscribe(() => {
13672
13690
  this.handleSortChange();
13673
13691
  }));
13692
+ this.initializeDefaultFilterValues();
13674
13693
  this.currentFilterValues.set(new Map(this.filterService.getCustomFilters()));
13675
13694
  this.loaderService.showLoader(this.MAIN_DATA_LOADER_ID);
13676
13695
  this.startLoaderTimeout(this.MAIN_DATA_LOADER_ID);
@@ -14991,6 +15010,32 @@ class GenericTableComponent {
14991
15010
  }
14992
15011
  }
14993
15012
  }
15013
+ initializeDefaultFilterValues() {
15014
+ const existingFilters = this.filterService.getCustomFilters();
15015
+ if (existingFilters.size > 0) {
15016
+ return;
15017
+ }
15018
+ const initialFilterValues = new Map();
15019
+ this.customFilters().forEach(filter => {
15020
+ const modeConfig = filter.modes?.[ModalMode.FILTER];
15021
+ const defaultValue = modeConfig?.defaultValue ?? filter.defaultValue;
15022
+ if (defaultValue !== undefined) {
15023
+ let value;
15024
+ if (typeof defaultValue === 'function') {
15025
+ value = defaultValue();
15026
+ }
15027
+ else {
15028
+ value = defaultValue;
15029
+ }
15030
+ if (value !== '' && value !== null && value !== undefined) {
15031
+ initialFilterValues.set(filter.key.toString(), value);
15032
+ }
15033
+ }
15034
+ });
15035
+ if (initialFilterValues.size > 0) {
15036
+ this.filterService.setCustomFiltersSilent(initialFilterValues);
15037
+ }
15038
+ }
14994
15039
  reloadDataWithCurrentParams() {
14995
15040
  if (!this.endpoint() || !this.modelFactory()) {
14996
15041
  return;
@@ -17206,11 +17251,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
17206
17251
  // Este archivo es generado automáticamente por scripts/update-version.js
17207
17252
  // No edites manualmente este archivo
17208
17253
  const VERSION = {
17209
- full: '2.20.14',
17254
+ full: '2.20.15',
17210
17255
  major: 2,
17211
17256
  minor: 20,
17212
- patch: 14,
17213
- timestamp: '2026-02-06T14:40:17.534Z',
17257
+ patch: 15,
17258
+ timestamp: '2026-02-06T18:27:14.219Z',
17214
17259
  buildDate: '6/2/2026'
17215
17260
  };
17216
17261