@one-paragon/angular-utilities 2.0.0-beta.5 → 2.0.0-beta.6

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.
@@ -786,9 +786,10 @@ class TableColumnHeaderSettings {
786
786
  noHeader = false;
787
787
  }
788
788
  class TableSettings {
789
- usePaginator = true;
789
+ usePaginator = undefined;
790
790
  useVirtualScroll = undefined;
791
- includeAllInPaginatorOptions = false;
791
+ paginatorSettings = undefined;
792
+ virtualScrollSettings = undefined;
792
793
  rowHeight = undefined;
793
794
  groupHeaderHeight = undefined;
794
795
  minColumnWidth;
@@ -824,22 +825,32 @@ class NotPersistedTableSettings {
824
825
  newNpts.hideColumnHeaderFilters = tableSettings.columnHeaderSettings?.noFilters ?? newNpts.hideColumnHeaderFilters;
825
826
  newNpts.hideColumnHeader = tableSettings.columnHeaderSettings?.noHeader ?? newNpts.hideColumnHeader;
826
827
  newNpts.usePaginator = tableSettings.tableSettings?.usePaginator ?? newNpts.usePaginator;
827
- newNpts.useVirtualScroll = tableSettings.tableSettings?.useVirtualScroll ?? newNpts.useVirtualScroll;
828
- newNpts.includeAllInPaginatorOptions = tableSettings.tableSettings?.includeAllInPaginatorOptions ?? newNpts.includeAllInPaginatorOptions;
828
+ newNpts.useVirtualScroll = tableSettings.tableSettings?.useVirtualScroll != undefined ? tableSettings.tableSettings?.useVirtualScroll :
829
+ tableSettings.tableSettings?.virtualScrollSettings ? true
830
+ : newNpts.useVirtualScroll;
829
831
  newNpts.rowHeight = tableSettings.tableSettings?.rowHeight ?? newNpts.rowHeight;
830
832
  newNpts.headerHeight = tableSettings.headerSettings?.headerHeight ?? newNpts.headerHeight;
831
833
  newNpts.groupHeaderHeight = tableSettings.tableSettings?.groupHeaderHeight ?? newNpts.groupHeaderHeight;
832
834
  newNpts.minColumnWidth = tableSettings.tableSettings?.minColumnWidth ?? newNpts.minColumnWidth;
833
- if (tableSettings.tableSettings?.useVirtualScroll) {
834
- const currVirt = tableSettings.tableSettings.useVirtualScroll === true ? new VirtualScrollOptions() : tableSettings.tableSettings.useVirtualScroll;
835
- if (!currVirt.headerHeight || tableSettings.tableSettings.useVirtualScroll === true) {
835
+ if (tableSettings.tableSettings?.virtualScrollSettings) {
836
+ const currVirt = tableSettings.tableSettings?.virtualScrollSettings || newNpts.virtualSettings;
837
+ if (!currVirt.headerHeight) {
836
838
  currVirt.headerHeight = (typeof tableSettings.headerSettings?.headerHeight === 'number' ? tableSettings.headerSettings?.headerHeight : DefaultVirtualScrollOptions.headerHeight);
837
839
  }
838
- if (!currVirt.rowHeight || tableSettings.tableSettings.useVirtualScroll === true) {
840
+ if (!currVirt.rowHeight) {
839
841
  currVirt.rowHeight = (typeof tableSettings.tableSettings?.rowHeight === 'number' ? tableSettings.tableSettings?.rowHeight : DefaultVirtualScrollOptions.rowHeight);
840
842
  }
841
- this.useVirtualScroll = { ...new VirtualScrollOptions(), ...currVirt };
843
+ newNpts.virtualSettings = { ...new VirtualScrollOptions(), ...currVirt };
844
+ }
845
+ else
846
+ newNpts.virtualSettings ??= new VirtualScrollOptions();
847
+ if (tableSettings.tableSettings?.paginatorSettings) {
848
+ const currPag = tableSettings.tableSettings?.paginatorSettings ?? newNpts.paginatorSettings;
849
+ currPag.includeAllInOptions = (currPag.defaultAll && currPag.includeAllInOptions !== false) || currPag.includeAllInOptions;
850
+ newNpts.paginatorSettings = { ...new PaginatorOptions(), ...currPag };
842
851
  }
852
+ else
853
+ newNpts.paginatorSettings ??= new PaginatorOptions();
843
854
  }
844
855
  return newNpts;
845
856
  }
@@ -852,15 +863,15 @@ class NotPersistedTableSettings {
852
863
  hideColumnHeaderFilters = false;
853
864
  hideColumnHeader = false;
854
865
  usePaginator = true;
855
- useVirtualScroll = undefined;
856
- includeAllInPaginatorOptions = false;
866
+ useVirtualScroll = false;
867
+ paginatorSettings = undefined;
868
+ virtualSettings = undefined;
857
869
  groupHeaderHeight = undefined;
858
870
  rowHeight;
859
871
  headerHeight = undefined;
860
872
  minColumnWidth;
861
873
  }
862
874
  class VirtualScrollOptions {
863
- virtualAsDefault = true;
864
875
  rowHeight = 48;
865
876
  enforceRowHeight = true;
866
877
  headerHeight = 56;
@@ -871,6 +882,11 @@ class VirtualScrollOptions {
871
882
  */
872
883
  maxViewPortHeight = undefined;
873
884
  }
885
+ class PaginatorOptions {
886
+ pageSize = undefined;
887
+ defaultAll = false;
888
+ includeAllInOptions = false;
889
+ }
874
890
  const DefaultVirtualScrollOptions = {
875
891
  rowHeight: 48,
876
892
  headerHeight: 56,
@@ -1834,11 +1850,14 @@ class TableStore extends ComponentStore {
1834
1850
  notPersistedTableSettings: new NotPersistedTableSettings().merge(config.defaultTableSettings),
1835
1851
  };
1836
1852
  if (config.defaultTableSettings?.pageSize) {
1837
- settingsFromConfig['pageSize'] = config.defaultTableSettings?.pageSize;
1853
+ settingsFromConfig.notPersistedTableSettings.paginatorSettings.pageSize = config.defaultTableSettings?.pageSize;
1838
1854
  }
1839
- super({ ...defaultTableState, ...settingsFromConfig });
1855
+ const pageSize = settingsFromConfig.notPersistedTableSettings.paginatorSettings.pageSize || defaultTableState.pageSize;
1856
+ const showAll = settingsFromConfig.notPersistedTableSettings.paginatorSettings.defaultAll || defaultTableState.showAll;
1857
+ super({ ...defaultTableState, ...settingsFromConfig, pageSize, showAll });
1840
1858
  }
1841
- getSavableStateSignal = computed(() => {
1859
+ $initializationState = this.selectSignal(state => state.initializationState);
1860
+ $savableState = computed(() => {
1842
1861
  const state = this.state();
1843
1862
  return mapSaveableState(state);
1844
1863
  });
@@ -1871,7 +1890,6 @@ class TableStore extends ComponentStore {
1871
1890
  .pipe(switchMap(() => this.selectSorted$));
1872
1891
  $getUserDefinedTableWidth = this.selectSignal(state => state.userDefined.table.width);
1873
1892
  getUserDefinedTableWidth$ = this.select(state => state.userDefined.table.width);
1874
- $getPageSize = this.selectSignal(state => state.userDefined.pageSize || state.pageSize);
1875
1893
  $footerCollapsed = this.selectSignal(state => state.persistedTableSettings.collapseFooter);
1876
1894
  $headerCollapsed = this.selectSignal(state => state.persistedTableSettings.collapseHeader);
1877
1895
  $groupBy = this.selectSignal(state => state.groupBy);
@@ -1890,6 +1908,7 @@ class TableStore extends ComponentStore {
1890
1908
  };
1891
1909
  $currentPage = this.selectSignal(state => state.currentPage);
1892
1910
  $pageSize = this.selectSignal(s => s.userDefined?.pageSize || s.pageSize);
1911
+ $showAll = this.selectSignal(s => s.userDefined?.showAll ?? s.showAll);
1893
1912
  $tableSettings = this.selectSignal(state => {
1894
1913
  const ts = { ...state.persistedTableSettings, ...state.notPersistedTableSettings };
1895
1914
  return ts;
@@ -1897,13 +1916,16 @@ class TableStore extends ComponentStore {
1897
1916
  tableSettings$ = toObservable(this.$tableSettings);
1898
1917
  $props = this.selectSignal(s => s.props);
1899
1918
  $getLinkInfo = (md) => this.selectSignal(state => state.linkMaps[md.key]);
1900
- $isVirtual = this.selectSignal(state => state.notPersistedTableSettings.useVirtualScroll === true || state.notPersistedTableSettings.useVirtualScroll?.virtualAsDefault || state.showAll);
1919
+ $isVirtual = this.selectSignal(state => state.notPersistedTableSettings.useVirtualScroll
1920
+ || state.showAll);
1901
1921
  $viewType = this.selectSignal(state => {
1902
1922
  const usePaginator = state.notPersistedTableSettings.usePaginator;
1903
- if (state.showAll || (this.$isVirtual() && !usePaginator)) {
1923
+ const showAll = state.showAll;
1924
+ const useVirtualScroll = state.notPersistedTableSettings.useVirtualScroll;
1925
+ if (showAll || (useVirtualScroll && !usePaginator)) {
1904
1926
  return 'virtual all';
1905
1927
  }
1906
- else if (this.$isVirtual() && usePaginator) {
1928
+ else if (useVirtualScroll && usePaginator) {
1907
1929
  return 'virtual paginator';
1908
1930
  }
1909
1931
  else if (usePaginator) {
@@ -1933,8 +1955,11 @@ class TableStore extends ComponentStore {
1933
1955
  const s = {
1934
1956
  ...state,
1935
1957
  persistedTableSettings: state.persistedTableSettings.merge(settings),
1936
- notPersistedTableSettings: state.notPersistedTableSettings.merge(settings)
1958
+ notPersistedTableSettings: state.notPersistedTableSettings.merge(settings),
1959
+ initializationState: InitializationState.Ready
1937
1960
  };
1961
+ s.pageSize = settings.tableSettings?.paginatorSettings?.pageSize ?? s.pageSize;
1962
+ s.showAll = settings.tableSettings?.paginatorSettings?.defaultAll ?? s.showAll;
1938
1963
  return s;
1939
1964
  });
1940
1965
  setMetaData = this.updater((state, md) => {
@@ -1985,12 +2010,6 @@ class TableStore extends ComponentStore {
1985
2010
  addFilter = this.updater((state, filter) => {
1986
2011
  return this.addFiltersToState(state, [filter]);
1987
2012
  });
1988
- // readonly patchPredicate = this.updater((state, {filterId, predicate}: {filterId: string, predicate: (data: any) => boolean}) => {
1989
- // const filtersCopy = { ...state.filters };
1990
- // const filter = filtersCopy[filterId] as CustomFilter;
1991
- // filter.predicate = predicate;
1992
- // return ({...state, filters: filtersCopy });
1993
- // });
1994
2013
  addFilters = this.updater((state, filters) => {
1995
2014
  return this.addFiltersToState(state, filters);
1996
2015
  });
@@ -2045,7 +2064,9 @@ class TableStore extends ComponentStore {
2045
2064
  };
2046
2065
  });
2047
2066
  setCurrentPage = this.updater((state, currentPage) => ({ ...state, currentPage }));
2048
- setPageSize = this.updater((state, pageSize) => ({ ...state, pageSize, userDefined: { ...state.userDefined, pageSize } }));
2067
+ setPageSize = this.updater((state, pageSize) => ({ ...state, pageSize }));
2068
+ setUserDefinedPageSize = this.updater((state, pageSize) => ({ ...state, userDefined: { ...state.userDefined, pageSize } }));
2069
+ setUserDefinedShowAll = this.updater((state, showAll) => ({ ...state, showAll, userDefined: { ...state.userDefined, showAll } }));
2049
2070
  setProps = this.updater((state, props) => {
2050
2071
  return ({ ...state, props });
2051
2072
  });
@@ -3056,14 +3077,19 @@ class TransformCreator {
3056
3077
  currencyPipe = inject(CurrencyPipe);
3057
3078
  phonePipe = inject(PhoneNumberPipe);
3058
3079
  config = inject(TableBuilderConfigToken);
3059
- createTransformer(metaData, noIcons = false) {
3080
+ createTransformer(metaData, noIcons = false, forItem = false) {
3060
3081
  const nested = metaData.key.includes('.');
3061
3082
  const defaultFunc = nested ? (value) => get(value, metaData.key) : (value) => value[metaData.key];
3062
- if (metaData.map) {
3083
+ if (metaData.map && !forItem) {
3063
3084
  return (value) => {
3064
3085
  return metaData.map(value);
3065
3086
  };
3066
3087
  }
3088
+ if (metaData.mapItem) {
3089
+ return (value) => {
3090
+ return metaData.mapItem(defaultFunc(value));
3091
+ };
3092
+ }
3067
3093
  if (metaData.transform) {
3068
3094
  if (isPipe(metaData.transform)) {
3069
3095
  return (value) => metaData.transform.transform(defaultFunc(value));
@@ -3874,15 +3900,15 @@ class GenericTableComponent {
3874
3900
  if (val == undefined || val === 'null')
3875
3901
  return '';
3876
3902
  try {
3877
- return this.transformCreator.createTransformer(this.$columns[key].metaData, true)({ [key]: val });
3903
+ return this.transformCreator.createTransformer(this.state.$getMetaData(key)(), true, true)(val);
3878
3904
  }
3879
3905
  catch (error) {
3880
3906
  return val;
3881
3907
  }
3882
3908
  };
3883
3909
  $rowHeight = this.state.selectSignal(s => {
3884
- if (this.state.$isVirtual() && s.notPersistedTableSettings.useVirtualScroll?.enforceRowHeight) {
3885
- const height = s.notPersistedTableSettings.useVirtualScroll.rowHeight;
3910
+ if (this.state.$isVirtual() && s.notPersistedTableSettings.virtualSettings?.enforceRowHeight) {
3911
+ const height = s.notPersistedTableSettings.virtualSettings.rowHeight;
3886
3912
  return height + 'px';
3887
3913
  }
3888
3914
  if (typeof s.notPersistedTableSettings.rowHeight === 'number') {
@@ -3891,8 +3917,8 @@ class GenericTableComponent {
3891
3917
  return s.notPersistedTableSettings.rowHeight;
3892
3918
  });
3893
3919
  $headerHeight = this.state.selectSignal(s => {
3894
- if (this.state.$isVirtual() && s.notPersistedTableSettings.useVirtualScroll?.enforceHeaderHeight) {
3895
- const height = s.notPersistedTableSettings.useVirtualScroll.headerHeight;
3920
+ if (this.state.$isVirtual() && s.notPersistedTableSettings.virtualSettings?.enforceHeaderHeight) {
3921
+ const height = s.notPersistedTableSettings.virtualSettings.headerHeight;
3896
3922
  return height + 'px';
3897
3923
  }
3898
3924
  if (typeof s.notPersistedTableSettings.headerHeight === 'number') {
@@ -4351,9 +4377,10 @@ class PaginatorComponent {
4351
4377
  });
4352
4378
  onPageSizeEffect = effect(() => {
4353
4379
  const size = this.$pageSizeChangeEvent();
4354
- if (!size)
4380
+ const initialized = this.state.$initializationState() >= InitializationState.Ready;
4381
+ if (!size || !initialized)
4355
4382
  return;
4356
- untracked(() => this.state.setPageSize(size));
4383
+ untracked(() => this.state.setUserDefinedPageSize(size));
4357
4384
  });
4358
4385
  onMetaPageSizeEffect = effect(() => {
4359
4386
  const paginator = this.$paginator();
@@ -4372,11 +4399,10 @@ class PaginatorComponent {
4372
4399
  });
4373
4400
  });
4374
4401
  $collapseFooter = computed(() => this.state.selectSignal(state => state.persistedTableSettings.collapseFooter)() || this.$showAll());
4375
- $showAllOption = this.state.selectSignal(s => s.notPersistedTableSettings?.includeAllInPaginatorOptions);
4376
- $showAll = this.state.selectSignal(s => s.showAll);
4377
- updatePaginator = this.state.updater(state => ({ ...state, showAll: !state.showAll }));
4402
+ $showAllOption = this.state.selectSignal(s => s.notPersistedTableSettings?.paginatorSettings?.includeAllInOptions);
4403
+ $showAll = this.state.$showAll;
4378
4404
  showAll() {
4379
- this.updatePaginator();
4405
+ this.state.setUserDefinedShowAll(!this.$showAll());
4380
4406
  }
4381
4407
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4382
4408
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: PaginatorComponent, isStandalone: true, selector: "tb-paginator", viewQueries: [{ propertyName: "$paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], ngImport: i0, template: `
@@ -4389,7 +4415,7 @@ class PaginatorComponent {
4389
4415
  <mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons
4390
4416
  [class]="{ 'hide' : $collapseFooter() }">
4391
4417
  </mat-paginator>
4392
- @if ($showAllOption()) {<button mat-button (click)="updatePaginator()"><span [style.text-decoration]="$showAll() ? 'line-through' : ''" >All</span></button>}
4418
+ @if ($showAllOption()) {<button mat-button (click)="showAll()"><span [style.text-decoration]="$showAll() ? 'line-through' : ''" >All</span></button>}
4393
4419
  </div>
4394
4420
  `, isInline: true, styles: [":host{--mat-paginator-container-size: initial}.select-column{min-width:var(--tb-min-select-column-width, 42px)}.index-column{min-width:var(--tb-min-index-column-width, 42px)}.mat-mdc-row:nth-child(odd){background-color:var(--tb-odd-row-background-color, #cdeefe)}.page-amounts{color:#0000008a;font-family:Roboto,Helvetica Neue,sans-serif;font-size:12px;margin-right:.2rem}:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell{padding:var(--tb-cell-padding, 0 0 0 .2rem);line-height:var(--tb-cell-line-height, normal)}::ng-deep .op-date-time-input{line-height:3rem;font-size:.9rem;font-family:Roboto,Helvetica Neue,sans-serif;padding-left:.2rem;width:12rem}\n", ".collapse-icon{font-size:16px;height:16px;color:#3f51b5;align-self:flex-start}.collapse-icon:hover{cursor:pointer}.hide{display:none}.paginator-row{display:flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1$6.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4395
4421
  }
@@ -4405,7 +4431,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
4405
4431
  <mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons
4406
4432
  [class]="{ 'hide' : $collapseFooter() }">
4407
4433
  </mat-paginator>
4408
- @if ($showAllOption()) {<button mat-button (click)="updatePaginator()"><span [style.text-decoration]="$showAll() ? 'line-through' : ''" >All</span></button>}
4434
+ @if ($showAllOption()) {<button mat-button (click)="showAll()"><span [style.text-decoration]="$showAll() ? 'line-through' : ''" >All</span></button>}
4409
4435
  </div>
4410
4436
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--mat-paginator-container-size: initial}.select-column{min-width:var(--tb-min-select-column-width, 42px)}.index-column{min-width:var(--tb-min-index-column-width, 42px)}.mat-mdc-row:nth-child(odd){background-color:var(--tb-odd-row-background-color, #cdeefe)}.page-amounts{color:#0000008a;font-family:Roboto,Helvetica Neue,sans-serif;font-size:12px;margin-right:.2rem}:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell{padding:var(--tb-cell-padding, 0 0 0 .2rem);line-height:var(--tb-cell-line-height, normal)}::ng-deep .op-date-time-input{line-height:3rem;font-size:.9rem;font-family:Roboto,Helvetica Neue,sans-serif;padding-left:.2rem;width:12rem}\n", ".collapse-icon{font-size:16px;height:16px;color:#3f51b5;align-self:flex-start}.collapse-icon:hover{cursor:pointer}.hide{display:none}.paginator-row{display:flex;align-items:center}\n"] }]
4411
4437
  }] });
@@ -4547,7 +4573,7 @@ class VirtualScrollContainer {
4547
4573
  }
4548
4574
  setSize(el) {
4549
4575
  const vsViewport = el.nativeElement;
4550
- const virtualScrollOptions = this.state.$tableSettings().useVirtualScroll;
4576
+ const virtualScrollOptions = this.state.$tableSettings().virtualSettings;
4551
4577
  const rowHeight = this.computedRowHeight();
4552
4578
  let amountOfVisibleItems = virtualScrollOptions?.amountOfVisibleItems || this.defaultOptions.amountOfVisibleItems;
4553
4579
  virtualScrollOptions?.amountOfVisibleItems || this.defaultOptions.amountOfVisibleItems;
@@ -4571,12 +4597,12 @@ class VirtualScrollContainer {
4571
4597
  }
4572
4598
  };
4573
4599
  computedRowHeight() {
4574
- const virtualScrollOptions = this.state.$tableSettings().useVirtualScroll;
4600
+ const virtualScrollOptions = this.state.$tableSettings().virtualSettings;
4575
4601
  const rowHeight = virtualScrollOptions?.rowHeight || (typeof this.state.$tableSettings().rowHeight === 'number' && this.state.$tableSettings().rowHeight) || this.defaultOptions.rowHeight;
4576
4602
  return rowHeight;
4577
4603
  }
4578
4604
  computedHeaderHeight() {
4579
- const virtualScrollOptions = this.state.$tableSettings().useVirtualScroll;
4605
+ const virtualScrollOptions = this.state.$tableSettings().virtualSettings;
4580
4606
  const headerHeight = virtualScrollOptions?.headerHeight || (typeof this.state.$tableSettings().headerHeight === 'number' && this.state.$tableSettings().headerHeight) || this.defaultOptions.headerHeight;
4581
4607
  return headerHeight;
4582
4608
  }
@@ -4626,12 +4652,12 @@ class ProfilesMenuComponent {
4626
4652
  $defaultProfile = computed(() => this.stateService.$selectLocalProfileDefaultKey(this.$tableId())());
4627
4653
  $keys = computed(() => this.stateService.$selectLocalProfileKeys(this.$tableId())());
4628
4654
  saveState(key) {
4629
- const tableState = this.tableStore.getSavableStateSignal();
4655
+ const tableState = this.tableStore.$savableState();
4630
4656
  this.onSaveState.emit(null);
4631
4657
  this.stateService.saveTableSettingsToLocalAndStorage(this.$tableId(), key, tableState);
4632
4658
  }
4633
4659
  addState(key, asDefault) {
4634
- const tableState = this.tableStore.getSavableStateSignal();
4660
+ const tableState = this.tableStore.$savableState();
4635
4661
  this.stateService.addNewStateToLocalAndStorage(this.$tableId(), key, tableState, asDefault);
4636
4662
  }
4637
4663
  setDefault(key) {
@@ -4880,6 +4906,7 @@ const createDataCleaners = (metadatas, mutate = false) => {
4880
4906
  };
4881
4907
  const createCleaners = (metadatas) => {
4882
4908
  return metadatas.reduce((transforms, metaData) => {
4909
+ const notNestedKey = metaData.key;
4883
4910
  switch (metaData.fieldType) {
4884
4911
  case FieldType.Currency:
4885
4912
  case FieldType.Number: {
@@ -4889,14 +4916,13 @@ const createCleaners = (metadatas) => {
4889
4916
  const val = get(t, metaData.key);
4890
4917
  const num = Number(val);
4891
4918
  set(t, metaData.key, isNaN(num) || val == null ? null : num);
4892
- t[metaData.key] = (isNaN(num) || val == null ? null : num);
4893
4919
  });
4894
4920
  }
4895
4921
  else {
4896
4922
  transforms.push((t) => {
4897
- const val = t[metaData.key];
4923
+ const val = t[notNestedKey];
4898
4924
  const num = Number(val);
4899
- t[metaData.key] = (isNaN(num) || val == null ? null : num);
4925
+ t[notNestedKey] = (isNaN(num) || val == null ? null : num);
4900
4926
  });
4901
4927
  }
4902
4928
  break;
@@ -4918,15 +4944,15 @@ const createCleaners = (metadatas) => {
4918
4944
  }
4919
4945
  else {
4920
4946
  transforms.push((t) => {
4921
- const val = t[metaData.key];
4947
+ const val = t[notNestedKey];
4922
4948
  const date = Date.parse(val);
4923
4949
  if (isNaN(date)) {
4924
- t[metaData.key] = null;
4950
+ t[notNestedKey] = null;
4925
4951
  return;
4926
4952
  }
4927
4953
  const d = new Date(date);
4928
4954
  d.setHours(0, 0, 0, 0);
4929
- t[metaData.key] = d;
4955
+ t[notNestedKey] = d;
4930
4956
  });
4931
4957
  }
4932
4958
  break;
@@ -4957,24 +4983,24 @@ const createCleaners = (metadatas) => {
4957
4983
  }
4958
4984
  else {
4959
4985
  transforms.push((t) => {
4960
- const val = t[metaData.key];
4986
+ const val = t[notNestedKey];
4961
4987
  const dateTime = Date.parse(val);
4962
4988
  if (isNaN(dateTime)) {
4963
- t[metaData.key] = null;
4989
+ t[notNestedKey] = null;
4964
4990
  return;
4965
4991
  }
4966
4992
  const dt = new Date(dateTime);
4967
4993
  if (metaData.additional?.dateTimeOptions?.includeMilliseconds) {
4968
- t[metaData.key] = dt;
4994
+ t[notNestedKey] = dt;
4969
4995
  return;
4970
4996
  }
4971
4997
  if (metaData.additional?.dateTimeOptions?.includeSeconds) {
4972
4998
  dt.setMilliseconds(0);
4973
- t[metaData.key] = dt;
4999
+ t[notNestedKey] = dt;
4974
5000
  return;
4975
5001
  }
4976
5002
  dt.setSeconds(0, 0);
4977
- t[metaData.key] = dt;
5003
+ t[notNestedKey] = dt;
4978
5004
  });
4979
5005
  }
4980
5006
  }
@@ -5057,7 +5083,6 @@ function mergeCustomCellMetaData(metaData1, metaData2) {
5057
5083
  class TableContainerComponent {
5058
5084
  state = inject(TableStore);
5059
5085
  dataStore = inject(DataStore);
5060
- config = inject(TableBuilderConfigToken);
5061
5086
  exportToCsvService = inject((ExportToCsvService));
5062
5087
  wrapper = inject(TableWrapperDirective, { optional: true });
5063
5088
  stateService = inject(TableBuilderStateStore);
@@ -5095,7 +5120,7 @@ class TableContainerComponent {
5095
5120
  selection$ = output({ alias: 'selection' });
5096
5121
  onStateReset$ = output({ alias: 'onStateReset' });
5097
5122
  onSaveState$ = output({ alias: 'onSaveState' });
5098
- _state$ = toObservable(this.state.getSavableStateSignal);
5123
+ _state$ = toObservable(this.state.$savableState);
5099
5124
  state$ = outputFromObservable(this._state$, { alias: 'state' });
5100
5125
  _data$ = new BehaviorSubject([]);
5101
5126
  data$ = outputFromObservable(this._data$, { alias: 'data' });
@@ -5144,7 +5169,7 @@ class TableContainerComponent {
5144
5169
  persistedState.persistedTableSettings = new PersistedTableSettings(persistedState.persistedTableSettings);
5145
5170
  this.state.updateStateFromPersistedState(persistedState);
5146
5171
  }
5147
- this.state.setInitializationState(InitializationState.Ready);
5172
+ this.state.setInitializationState(InitializationState.LoadedFromStore);
5148
5173
  });
5149
5174
  });
5150
5175
  #setPageSizeFromInputEffect = effect(() => {
@@ -5242,7 +5267,7 @@ class TableContainerComponent {
5242
5267
  ngOnDestroy() {
5243
5268
  const tableId = this.$tableId();
5244
5269
  if (tableId) {
5245
- this.stateService.saveTableStateToLocal({ tableId, tableState: this.state.getSavableStateSignal() });
5270
+ this.stateService.saveTableStateToLocal({ tableId, tableState: this.state.$savableState() });
5246
5271
  }
5247
5272
  }
5248
5273
  initializeData() {
@@ -5684,5 +5709,5 @@ const setUpStoreFactory = () => {
5684
5709
  * Generated bundle index. Do not edit.
5685
5710
  */
5686
5711
 
5687
- export { ActionStateSpinnerComponent, ActionStateUiModule, ActionStatus, AppStatusState, ArrayStyle, AutoFocusDirective, CancellationToken, ClickEmitterDirective, ClickSubjectDirective, ConditionalClassesDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent, DefaultVirtualScrollOptions, DialogDirective, DialogService, DialogWrapper, FieldType, FilterChipsComponent, FilterComponent, FilterTypes, FunctionPipe, GenColDisplayerComponent, GenFilterDisplayerComponent, GeneralTableSettings, GenericTableComponent, GroupByListComponent, HttpErrorStateDirective, HttpInProgressStateDirective, HttpNotStartedStateDirective, HttpRequestModule, HttpRequestStateDirective, HttpRequestStateFactory, HttpRequestStateStore, HttpRequestStatus, HttpRequestStrategy, HttpSuccessStateDirective, MatButtonToggleFilterDirective, MatCheckboxTbFilterDirective, MatOptionTbFilterDirective, MatRadioButtonTbFilterDirective, MatSlideToggleGroupDirective, MatSlideToggleTbFilterDirective, MatTableObservableDataSource, MultiSortDirective, NgrxExtModule, NotPersistedTableSettings, PaginatorComponent, PersistedTableSettings, PhoneNumberPipe, PreventEnterDirective, ResizeColumnDirective, SortDirection, SpaceCasePipe, StopPropagationDirective, StylerDirective, Subjectifier, Subscriber, TableBuilder, TableBuilderConfigToken, TableBuilderModule, TableColumnHeaderSettings, TableContainerComponent, TableCustomFilterDirective, TableCustomFilterDirectiveBase, TableFilterDirective, TableFilterStringContainsDirective, TableSettings, TableWrapperDirective, TableWrapperFooterSettings, TableWrapperHeaderSettings, Target, TbSelectedFilterDirective, TrimWhitespaceDirective, UtilitiesModule, VirtualScrollOptions, actionStatusReducer, chainRequest, clearActionableSelectorRequestCache, combineArrays, createActionResultSelector, createActionSelector, createActionableResultSelector, createActionableSelector, createFailure, createRequestor, createSuccess, defaultFilter, defaultShareReplay, delayOn, filterArray, getRequestorBody, getRequestorStatus, getStatusState, httpRequest, httpRequestor, inProgress, initialState, isErrorState, isSuccessOrErrorState, isSuccessState, mapArray, mapError, metaDataArrToDict, notNull, notStarted, onWait, onceWhen, previousAndCurrent, provideActionableSelector, provideTableBuilder, selectAll, selectEntities, selectEntity, selectIds, selectTotal, serverStatusTypes, setUpStoreFactory, skipOneWhen, sortsAreSame, spaceCase, startWithIfEmpty, statusAdapter, statusIsSuccessOrInProgress, subscriber, switchOff, tapError, tapSuccess, wrapInArr };
5712
+ export { ActionStateSpinnerComponent, ActionStateUiModule, ActionStatus, AppStatusState, ArrayStyle, AutoFocusDirective, CancellationToken, ClickEmitterDirective, ClickSubjectDirective, ConditionalClassesDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent, DefaultVirtualScrollOptions, DialogDirective, DialogService, DialogWrapper, FieldType, FilterChipsComponent, FilterComponent, FilterTypes, FunctionPipe, GenColDisplayerComponent, GenFilterDisplayerComponent, GeneralTableSettings, GenericTableComponent, GroupByListComponent, HttpErrorStateDirective, HttpInProgressStateDirective, HttpNotStartedStateDirective, HttpRequestModule, HttpRequestStateDirective, HttpRequestStateFactory, HttpRequestStateStore, HttpRequestStatus, HttpRequestStrategy, HttpSuccessStateDirective, MatButtonToggleFilterDirective, MatCheckboxTbFilterDirective, MatOptionTbFilterDirective, MatRadioButtonTbFilterDirective, MatSlideToggleGroupDirective, MatSlideToggleTbFilterDirective, MatTableObservableDataSource, MultiSortDirective, NgrxExtModule, NotPersistedTableSettings, PaginatorComponent, PaginatorOptions, PersistedTableSettings, PhoneNumberPipe, PreventEnterDirective, ResizeColumnDirective, SortDirection, SpaceCasePipe, StopPropagationDirective, StylerDirective, Subjectifier, Subscriber, TableBuilder, TableBuilderConfigToken, TableBuilderModule, TableColumnHeaderSettings, TableContainerComponent, TableCustomFilterDirective, TableCustomFilterDirectiveBase, TableFilterDirective, TableFilterStringContainsDirective, TableSettings, TableWrapperDirective, TableWrapperFooterSettings, TableWrapperHeaderSettings, Target, TbSelectedFilterDirective, TrimWhitespaceDirective, UtilitiesModule, VirtualScrollOptions, actionStatusReducer, chainRequest, clearActionableSelectorRequestCache, combineArrays, createActionResultSelector, createActionSelector, createActionableResultSelector, createActionableSelector, createFailure, createRequestor, createSuccess, defaultFilter, defaultShareReplay, delayOn, filterArray, getRequestorBody, getRequestorStatus, getStatusState, httpRequest, httpRequestor, inProgress, initialState, isErrorState, isSuccessOrErrorState, isSuccessState, mapArray, mapError, metaDataArrToDict, notNull, notStarted, onWait, onceWhen, previousAndCurrent, provideActionableSelector, provideTableBuilder, selectAll, selectEntities, selectEntity, selectIds, selectTotal, serverStatusTypes, setUpStoreFactory, skipOneWhen, sortsAreSame, spaceCase, startWithIfEmpty, statusAdapter, statusIsSuccessOrInProgress, subscriber, switchOff, tapError, tapSuccess, wrapInArr };
5688
5713
  //# sourceMappingURL=one-paragon-angular-utilities.mjs.map