@one-paragon/angular-utilities 2.0.7-beta.1 → 2.0.8

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.
@@ -1,10 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, inject, Injector, TemplateRef, ViewContainerRef, NgModule, assertInInjectionContext, DestroyRef, computed, isSignal, Injectable, input, signal, Renderer2, ElementRef, booleanAttribute, Pipe, InjectionToken, makeEnvironmentProviders, Component, ChangeDetectionStrategy, HostListener, EventEmitter, untracked, Output, ContentChildren, ChangeDetectorRef, output, ViewChild, EnvironmentInjector, createComponent, viewChild, linkedSignal, effect, contentChild, forwardRef, contentChildren, runInInjectionContext, provideAppInitializer } from '@angular/core';
3
- import { shareReplay, switchAll, map, filter, tap, catchError, startWith, switchMap, mergeMap, concatMap as concatMap$1, takeUntil, distinctUntilChanged, debounceTime } from 'rxjs/operators';
2
+ import { Directive, Input, inject, Injector, TemplateRef, ViewContainerRef, NgModule, assertInInjectionContext, DestroyRef, computed, isSignal, Injectable, Pipe, input, signal, Renderer2, ElementRef, booleanAttribute, InjectionToken, makeEnvironmentProviders, Component, ChangeDetectionStrategy, HostListener, EventEmitter, untracked, Output, ContentChildren, ChangeDetectorRef, output, ViewChild, EnvironmentInjector, createComponent, viewChild, linkedSignal, effect, contentChild, forwardRef, contentChildren, model, runInInjectionContext, provideAppInitializer } from '@angular/core';
3
+ import { shareReplay, switchAll, map, filter, tap, catchError, startWith, switchMap, mergeMap, concatMap as concatMap$1, takeUntil, distinctUntilChanged, observeOn, debounceTime, scan as scan$1, timestamp as timestamp$1, first as first$1 } from 'rxjs/operators';
4
4
  import * as i1 from 'rxjs';
5
- import { Subject, isObservable, of, ReplaySubject, filter as filter$1, first, map as map$1, Observable, combineLatest, Subscription, startWith as startWith$1, pairwise, concatMap, merge, delay, fromEvent, takeUntil as takeUntil$1, tap as tap$1, switchMap as switchMap$1, scan, timestamp } from 'rxjs';
5
+ import { Subject, isObservable, of, ReplaySubject, filter as filter$1, first, map as map$1, Observable, combineLatest, Subscription, startWith as startWith$1, pairwise, concatMap, merge, delay, fromEvent, takeUntil as takeUntil$1, tap as tap$1, switchMap as switchMap$1, scan, timestamp, animationFrameScheduler, debounceTime as debounceTime$1, BehaviorSubject } from 'rxjs';
6
6
  import { ComponentStore } from '@ngrx/component-store';
7
7
  import { toObservable, toSignal, outputFromObservable } from '@angular/core/rxjs-interop';
8
+ import { DatePipe, CurrencyPipe, KeyValuePipe, NgTemplateOutlet, DecimalPipe, CommonModule, AsyncPipe } from '@angular/common';
8
9
  import * as i3$2 from '@angular/material/sort';
9
10
  import { MatSort, MatSortModule } from '@angular/material/sort';
10
11
  import { merge as merge$1, get, sumBy, difference, intersection, groupBy, orderBy, set, isFunction as isFunction$1 } from 'lodash';
@@ -19,10 +20,11 @@ import { MatCheckbox, MatCheckboxModule } from '@angular/material/checkbox';
19
20
  import * as i3 from '@angular/forms';
20
21
  import { NgControl, FormsModule, ControlContainer, NgForm, NG_VALUE_ACCESSOR } from '@angular/forms';
21
22
  import * as i9 from '@angular/material/core';
22
- import { MatOption } from '@angular/material/core';
23
- import { DatePipe, CurrencyPipe, KeyValuePipe, NgTemplateOutlet, formatDate, formatCurrency, DecimalPipe, CommonModule, AsyncPipe } from '@angular/common';
23
+ import { MatOption, MatNativeDateModule } from '@angular/material/core';
24
24
  import * as i5 from '@angular/cdk/drag-drop';
25
25
  import { moveItemInArray, DragDropModule, CDK_DROP_LIST, CdkDropList, transferArrayItem } from '@angular/cdk/drag-drop';
26
+ import * as i1$5 from '@angular/router';
27
+ import { RouterModule } from '@angular/router';
26
28
  import * as i1$1 from '@angular/material/input';
27
29
  import { MatInputModule, MatInput } from '@angular/material/input';
28
30
  import * as i4 from '@angular/material/datepicker';
@@ -30,7 +32,7 @@ import { MatDatepickerModule } from '@angular/material/datepicker';
30
32
  import * as i6 from '@angular/material/form-field';
31
33
  import * as i1$3 from '@angular/material/card';
32
34
  import { MatCardModule } from '@angular/material/card';
33
- import { MatDialog } from '@angular/material/dialog';
35
+ import { MatDialog, MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule } from '@angular/material/dialog';
34
36
  import * as i3$1 from '@angular/material/button';
35
37
  import { MatButtonModule, MatIconButton, MatButton } from '@angular/material/button';
36
38
  import * as i4$1 from '@angular/material/tooltip';
@@ -46,8 +48,6 @@ import { MatChipsModule } from '@angular/material/chips';
46
48
  import * as i1$6 from '@angular/material/table';
47
49
  import { MatTable, MatColumnDef, MatTableModule, MatHeaderRowDef, MatFooterRowDef, MatTableDataSource, MatRowDef } from '@angular/material/table';
48
50
  import { SelectionModel } from '@angular/cdk/collections';
49
- import * as i1$5 from '@angular/router';
50
- import { RouterModule } from '@angular/router';
51
51
  import * as i1$7 from '@angular/material/paginator';
52
52
  import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
53
53
  import * as i1$8 from '@angular/cdk/scrolling';
@@ -683,6 +683,34 @@ function getDestroyRef(options) {
683
683
  return destroyRef;
684
684
  }
685
685
 
686
+ class SpaceCasePipe {
687
+ transform(value) {
688
+ return spaceCase(value);
689
+ }
690
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SpaceCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
691
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: SpaceCasePipe, isStandalone: true, name: "spaceCase" });
692
+ }
693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SpaceCasePipe, decorators: [{
694
+ type: Pipe,
695
+ args: [{ name: 'spaceCase' }]
696
+ }] });
697
+ /**
698
+ * Adds a space before uppercase letters that either
699
+ * 1. follows a lowercase letter or digit
700
+ * 2. or precedes a lowercase letter and follows an alpha-numeric character
701
+ *
702
+ * Uppercases the first digit
703
+ *
704
+ * Turns underscores into spaces
705
+ */
706
+ function spaceCase(value) {
707
+ const phrase = value?.replace(regex1, '$1$3 $2$4');
708
+ // uppercase the first character of every word
709
+ return phrase?.replace(regex2, x => x.toUpperCase());
710
+ }
711
+ const regex1 = /([a-z0-9])([A-Z])|([a-zA-Z0-9])([A-Z])(?=[a-z])|_/g;
712
+ const regex2 = /(^| )(\w)/g;
713
+
686
714
  var FieldType;
687
715
  (function (FieldType) {
688
716
  FieldType[FieldType["Unknown"] = 0] = "Unknown";
@@ -737,8 +765,8 @@ class GeneralTableSettings {
737
765
  headerSettings = new TableWrapperHeaderSettings();
738
766
  footerSettings = new TableWrapperFooterSettings();
739
767
  columnHeaderSettings = new TableColumnHeaderSettings();
740
- columnFooterSettings = new TableColumnFooterSettings();
741
768
  tableSettings = new TableSettings();
769
+ injector;
742
770
  }
743
771
  class TableWrapperHeaderSettings {
744
772
  hideExport = false;
@@ -754,18 +782,10 @@ class TableWrapperFooterSettings {
754
782
  collapse = false;
755
783
  }
756
784
  class TableColumnHeaderSettings {
757
- stickyHeaderRow = true;
758
785
  noFilters = false;
759
786
  noHeader = false;
760
787
  }
761
- class TableColumnFooterSettings {
762
- stickyFooterRow = false;
763
- }
764
788
  class TableSettings {
765
- tableId = undefined;
766
- trackBy = undefined;
767
- includeIndexColumn = false;
768
- includeSelectionColumn = false;
769
789
  usePaginator = undefined;
770
790
  useVirtualScroll = undefined;
771
791
  paginatorSettings = undefined;
@@ -1166,7 +1186,6 @@ class TableFilterDirective {
1166
1186
  this.filterValue = undefined;
1167
1187
  }
1168
1188
  filter$ = new ReplaySubject(1);
1169
- $filter = toSignal(this.filter$);
1170
1189
  filterType;
1171
1190
  key;
1172
1191
  fieldType;
@@ -1276,7 +1295,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
1276
1295
  }], ctorParameters: () => [] });
1277
1296
  class TableCustomFilterDirectiveBase extends TableCustomFilterDirective {
1278
1297
  filter$ = new ReplaySubject(1);
1279
- $filter = toSignal(this.filter$);
1280
1298
  filter;
1281
1299
  _predicate;
1282
1300
  set predicate(val) {
@@ -1508,7 +1526,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
1508
1526
 
1509
1527
  class PhoneNumberPipe {
1510
1528
  transform(phoneNum) {
1511
- return phoneFormatter(phoneNum);
1529
+ if (phoneNum) {
1530
+ phoneNum = phoneNum.replace(/\D/g, '');
1531
+ if (phoneNum[0] === '1') {
1532
+ phoneNum = phoneNum.substring(1);
1533
+ }
1534
+ return '(' + phoneNum.slice(0, 3) + ') ' + phoneNum.slice(3, 6) + '-' + phoneNum.slice(6, 10) + ' ' + phoneNum.slice(10);
1535
+ }
1512
1536
  }
1513
1537
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: PhoneNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1514
1538
  static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: PhoneNumberPipe, isStandalone: true, name: "phone" });
@@ -1517,44 +1541,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
1517
1541
  type: Pipe,
1518
1542
  args: [{ name: 'phone' }]
1519
1543
  }] });
1520
- function phoneFormatter(phoneNum) {
1521
- if (phoneNum) {
1522
- phoneNum = phoneNum.replace(/\D/g, '');
1523
- if (phoneNum[0] === '1') {
1524
- phoneNum = phoneNum.substring(1);
1525
- }
1526
- return '(' + phoneNum.slice(0, 3) + ') ' + phoneNum.slice(3, 6) + '-' + phoneNum.slice(6, 10) + ' ' + phoneNum.slice(10);
1527
- }
1528
- return '';
1529
- }
1530
-
1531
- class SpaceCasePipe {
1532
- transform(value) {
1533
- return spaceCase(value);
1534
- }
1535
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SpaceCasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1536
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: SpaceCasePipe, isStandalone: true, name: "spaceCase" });
1537
- }
1538
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: SpaceCasePipe, decorators: [{
1539
- type: Pipe,
1540
- args: [{ name: 'spaceCase' }]
1541
- }] });
1542
- /**
1543
- * Adds a space before uppercase letters that either
1544
- * 1. follows a lowercase letter or digit
1545
- * 2. or precedes a lowercase letter and follows an alpha-numeric character
1546
- *
1547
- * Uppercases the first digit
1548
- *
1549
- * Turns underscores into spaces
1550
- */
1551
- function spaceCase(value) {
1552
- const phrase = value?.replace(regex1, '$1$3 $2$4');
1553
- // uppercase the first character of every word
1554
- return phrase?.replace(regex2, x => x.toUpperCase());
1555
- }
1556
- const regex1 = /([a-z0-9])([A-Z])|([a-zA-Z0-9])([A-Z])(?=[a-z])|_/g;
1557
- const regex2 = /(^| )(\w)/g;
1558
1544
 
1559
1545
  const defaultConfig = {
1560
1546
  defaultTableSettings: {
@@ -1928,8 +1914,8 @@ class TableStore extends ComponentStore {
1928
1914
  equal: sortsAreSame
1929
1915
  });
1930
1916
  selectSorted$ = this.select(state => state.sorted).pipe(distinctUntilChanged(sortsAreSame));
1931
- $getSorts = this.selectSignal(() => this.$initializationState() !== InitializationState.Ready ? [] : this.$selectSorted());
1932
- sort$ = toObservable(this.$getSorts);
1917
+ sort$ = this.select(state => state.initializationState).pipe(filter(i => i === InitializationState.Ready))
1918
+ .pipe(switchMap(() => this.selectSorted$));
1933
1919
  $getUserDefinedTableWidth = this.selectSignal(state => state.userDefined.table.width);
1934
1920
  getUserDefinedTableWidth$ = this.select(state => state.userDefined.table.width);
1935
1921
  $userDefinedRowHeight = this.selectSignal(state => (state.userDefined.rowHeight));
@@ -1948,11 +1934,6 @@ class TableStore extends ComponentStore {
1948
1934
  const bb = b.flatMap(g => g.expandedHeaders);
1949
1935
  return aa.length === bb.length && aa.every((k) => bb.includes(k));
1950
1936
  }));
1951
- $expandGroups = this.selectSignal(state => state.groupBy, { equal: (a, b) => {
1952
- const aa = a.flatMap(g => g.expandedHeaders);
1953
- const bb = b.flatMap(g => g.expandedHeaders);
1954
- return aa.length === bb.length && aa.every((k) => bb.includes(k));
1955
- } });
1956
1937
  $getIsExpanded = (columnKey, groupHeaderKey) => {
1957
1938
  return this.selectSignal(state => !!state.groupBy.filter(g => g.key === columnKey && g.expandedHeaders.includes(groupHeaderKey)).length);
1958
1939
  };
@@ -2037,7 +2018,7 @@ class TableStore extends ComponentStore {
2037
2018
  updateStateFunc = (state, incomingTableState) => {
2038
2019
  const metaData = state.metaData;
2039
2020
  const sorted = incomingTableState.sorted?.length ? incomingTableState.sorted
2040
- : state.initializationState <= InitializationState.Created ? this.$preSort() : state.sorted;
2021
+ : state.initializationState <= InitializationState.Created ? createPreSort(metaData) : state.sorted;
2041
2022
  return { ...state, ...incomingTableState, metaData, sorted };
2042
2023
  };
2043
2024
  setTableSettings = this.updater((state, settings) => {
@@ -2063,7 +2044,7 @@ class TableStore extends ComponentStore {
2063
2044
  return prev;
2064
2045
  }, {});
2065
2046
  const sortedInitialized = state.sorted.length > 0;
2066
- const sorted = sortedInitialized ? state.sorted : this.$preSort();
2047
+ const sorted = sortedInitialized ? state.sorted : createPreSort(metaData);
2067
2048
  const order = initializeOrder(state, metaData);
2068
2049
  const initializationState = state.initializationState == InitializationState.Created ? InitializationState.MetaDataLoaded : state.initializationState;
2069
2050
  return { ...state, initializationState, metaData, sorted, userDefined: { ...state.userDefined, order: order } };
@@ -2463,12 +2444,13 @@ const defaultDialogConfig = {
2463
2444
  class DialogDirective {
2464
2445
  templateRef = inject(TemplateRef);
2465
2446
  dialog = inject(MatDialog);
2447
+ dialogConfig = inject(MAT_DIALOG_DEFAULT_OPTIONS, { optional: true }) || {};
2466
2448
  service = inject(DialogService);
2467
2449
  opDialogClosed = new EventEmitter();
2468
- _dialogConfig = defaultDialogConfig;
2450
+ _dialogConfig = { ...this.dialogConfig, ...defaultDialogConfig };
2469
2451
  opDialogAddDialogClass = true;
2470
2452
  set opDialogConfig(config) {
2471
- this._dialogConfig = { ...defaultDialogConfig, ...config };
2453
+ this._dialogConfig = { ...this.dialogConfig, ...defaultDialogConfig, ...config };
2472
2454
  }
2473
2455
  get opDialogConfig() {
2474
2456
  return this._dialogConfig;
@@ -3179,92 +3161,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
3179
3161
  function isPipe(o) {
3180
3162
  return typeof (o.transform) === 'function';
3181
3163
  }
3182
- function createTransformer(metaData, config, noIcons = false, forItem = false) {
3183
- const nested = metaData.key.includes('.');
3184
- const defaultFunc = nested ? (value) => get(value, metaData.key) : (value) => value[metaData.key];
3185
- if (metaData.map && !forItem) {
3186
- return (value) => {
3187
- return metaData.map(value);
3188
- };
3189
- }
3190
- if (metaData.mapItem) {
3191
- return (value) => {
3192
- return metaData.mapItem(defaultFunc(value));
3193
- };
3194
- }
3195
- if (metaData.transform) {
3196
- if (isPipe(metaData.transform)) {
3197
- return (value) => metaData.transform.transform(defaultFunc(value));
3198
- }
3199
- return metaData.fieldType === FieldType.Expression ? metaData.transform : (value) => metaData.transform(defaultFunc(value), value);
3200
- }
3201
- if (config.transformers && config.transformers[metaData.fieldType]) {
3202
- var transformer = config.transformers[metaData.fieldType];
3203
- return (value) => transformer(defaultFunc(value));
3204
- }
3205
- const defaultDateFormat = config.dateFormats?.dateFormat ?? 'shortDate';
3206
- const defaultDateTimeFormat = config.dateFormats?.dateTimeFormat ?? 'short';
3207
- switch (metaData.fieldType) {
3208
- case FieldType.Date:
3209
- const dateFormat = metaData.additional?.dateFormat ?? defaultDateFormat;
3210
- return (value) => dateFormatter(defaultFunc(value), dateFormat);
3211
- case FieldType.DateTime:
3212
- const dateTimeFormat = metaData.additional?.dateTimeOptions?.format ?? defaultDateTimeFormat;
3213
- return (value) => dateFormatter(defaultFunc(value), dateTimeFormat);
3214
- case FieldType.Currency:
3215
- return (value) => currencyFormatter(defaultFunc(value));
3216
- case FieldType.PhoneNumber:
3217
- return (value) => phoneFormatter(defaultFunc(value));
3218
- case FieldType.Enum:
3219
- return (value) => spaceCase(metaData.additional?.enumMap[defaultFunc(value)]);
3220
- case FieldType.Boolean:
3221
- if (noIcons) {
3222
- return defaultFunc;
3223
- }
3224
- let forTrue = 'check';
3225
- let forFalse = '';
3226
- if (metaData.additional?.boolean?.forTrue) {
3227
- forTrue = metaData?.additional.boolean.forTrue.icon;
3228
- }
3229
- if (metaData.additional?.boolean?.showForFalse === true) {
3230
- forFalse = 'clear';
3231
- }
3232
- else if (metaData.additional?.boolean?.showForFalse?.icon) {
3233
- forFalse = metaData.additional?.boolean?.showForFalse?.icon;
3164
+ class TransformCreator {
3165
+ datePipe = inject(DatePipe);
3166
+ currencyPipe = inject(CurrencyPipe);
3167
+ phonePipe = inject(PhoneNumberPipe);
3168
+ config = inject(TableBuilderConfigToken);
3169
+ createTransformer(metaData, noIcons = false, forItem = false) {
3170
+ const nested = metaData.key.includes('.');
3171
+ const defaultFunc = nested ? (value) => get(value, metaData.key) : (value) => value[metaData.key];
3172
+ if (metaData.map && !forItem) {
3173
+ return (value) => {
3174
+ return metaData.map(value);
3175
+ };
3176
+ }
3177
+ if (metaData.mapItem) {
3178
+ return (value) => {
3179
+ return metaData.mapItem(defaultFunc(value));
3180
+ };
3181
+ }
3182
+ if (metaData.transform) {
3183
+ if (isPipe(metaData.transform)) {
3184
+ return (value) => metaData.transform.transform(defaultFunc(value));
3234
3185
  }
3235
- return (value) => defaultFunc(value) ? forTrue : forFalse;
3236
- }
3237
- return defaultFunc;
3238
- }
3239
- function createItemTransformer(metaData, config, noIcons = false, mutate = false) {
3240
- const transform = createTransformer(metaData, config, noIcons);
3241
- return (t) => {
3242
- if (!mutate) {
3243
- t = { ...t };
3186
+ return metaData.fieldType === FieldType.Expression ? metaData.transform : (value) => metaData.transform(defaultFunc(value), value);
3187
+ }
3188
+ if (this.config.transformers && this.config.transformers[metaData.fieldType]) {
3189
+ var transformer = this.config.transformers[metaData.fieldType];
3190
+ return (value) => transformer(defaultFunc(value));
3191
+ }
3192
+ const defaultDateFormat = this.config.dateFormats?.dateFormat ?? 'shortDate';
3193
+ const defaultDateTimeFormat = this.config.dateFormats?.dateTimeFormat ?? 'short';
3194
+ switch (metaData.fieldType) {
3195
+ case FieldType.Date:
3196
+ const dateFormat = metaData.additional?.dateFormat ?? defaultDateFormat;
3197
+ return (value) => this.datePipe.transform(defaultFunc(value), dateFormat);
3198
+ case FieldType.DateTime:
3199
+ const dateTimeFormat = metaData.additional?.dateTimeOptions?.format ?? defaultDateTimeFormat;
3200
+ return (value) => this.datePipe.transform(defaultFunc(value), dateTimeFormat);
3201
+ case FieldType.Currency:
3202
+ return (value) => this.currencyPipe.transform(defaultFunc(value));
3203
+ case FieldType.PhoneNumber:
3204
+ return (value) => this.phonePipe.transform(defaultFunc(value));
3205
+ case FieldType.Enum:
3206
+ return (value) => spaceCase(metaData.additional?.enumMap[defaultFunc(value)]);
3207
+ case FieldType.Boolean:
3208
+ if (noIcons) {
3209
+ return defaultFunc;
3210
+ }
3211
+ let forTrue = 'check';
3212
+ let forFalse = '';
3213
+ if (metaData.additional?.boolean?.forTrue) {
3214
+ forTrue = metaData?.additional.boolean.forTrue.icon;
3215
+ }
3216
+ if (metaData.additional?.boolean?.showForFalse === true) {
3217
+ forFalse = 'clear';
3218
+ }
3219
+ else if (metaData.additional?.boolean?.showForFalse?.icon) {
3220
+ forFalse = metaData.additional?.boolean?.showForFalse?.icon;
3221
+ }
3222
+ return (value) => defaultFunc(value) ? forTrue : forFalse;
3244
3223
  }
3245
- t[metaData.key] = transform(t);
3224
+ return defaultFunc;
3225
+ }
3226
+ createItemTransformer = (metaData, noIcons = false, mutate = false) => {
3227
+ const transform = this.createTransformer(metaData, noIcons);
3228
+ return (t) => {
3229
+ if (!mutate) {
3230
+ t = { ...t };
3231
+ }
3232
+ t[metaData.key] = transform(t);
3233
+ };
3246
3234
  };
3247
- }
3248
- function createItemTransformers(metaDatas, config, noIcons = false, mutate = false) {
3249
- const transformers = metaDatas.map(meta => createItemTransformer(meta, config, noIcons, true));
3250
- return (t) => {
3251
- if (!t)
3235
+ createItemTransformers = (metaDatas, noIcons = false, mutate = false) => {
3236
+ const transformers = metaDatas.map(meta => this.createItemTransformer(meta, noIcons, true));
3237
+ return (t) => {
3238
+ if (!t)
3239
+ return t;
3240
+ if (!mutate) {
3241
+ t = { ...t };
3242
+ }
3243
+ transformers.forEach(m => m(t));
3252
3244
  return t;
3253
- if (!mutate) {
3254
- t = { ...t };
3255
- }
3256
- transformers.forEach(m => m(t));
3257
- return t;
3245
+ };
3258
3246
  };
3247
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TransformCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3248
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TransformCreator, providedIn: 'root' });
3259
3249
  }
3260
- function dateFormatter(date, format) {
3261
- if (!date)
3262
- return;
3263
- return formatDate(date, format, 'en-US');
3264
- }
3265
- function currencyFormatter(amt) {
3266
- return formatCurrency(amt, 'en-US', '$');
3267
- }
3250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TransformCreator, decorators: [{
3251
+ type: Injectable,
3252
+ args: [{
3253
+ providedIn: 'root',
3254
+ }]
3255
+ }] });
3268
3256
 
3269
3257
  class RouterLinkColumnComponent {
3270
3258
  additional = input.required();
@@ -3528,14 +3516,14 @@ class ColumnHeaderMenuComponent {
3528
3516
  }
3529
3517
  }
3530
3518
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ColumnHeaderMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3531
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: ColumnHeaderMenuComponent, isStandalone: true, selector: "tb-header-menu", inputs: { $metaData: { classPropertyName: "$metaData", publicName: "metaData", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "$trigger", first: true, predicate: MatMenuTrigger, descendants: true, isSignal: true }], ngImport: i0, template: "@let metaData = $metaData();\r\n@let currentFilterType = $currentFilterType();\r\n\r\n<button mat-icon-button class=\"open-menu-icon-button\" disableRipple [matMenuTriggerFor]=\"menu\" [matMenuTriggerRestoreFocus]=\"false\">\r\n <mat-icon class=\"menu-icon\">more_vert</mat-icon>\r\n</button>\r\n<mat-menu #menu=\"matMenu\" >\r\n @if (!(metaData.fieldType === FieldType.NotMapped))\r\n {\r\n <button mat-menu-item (click)=\"tableState.addGroupByKey(metaData.key)\">\r\n <mat-icon color=\"primary\">group</mat-icon>\r\n <span>Group By</span>\r\n </button>\r\n }\r\n <button mat-menu-item (click)=hideField(metaData.key)>\r\n <mat-icon color=\"primary\">visibility_off</mat-icon>\r\n <span>Hide Column</span>\r\n </button>\r\n @if (!(metaData.fieldType === FieldType.NotMapped))\r\n {\r\n <ng-form #myForm=\"ngForm\" (keydown.enter)=\"onEnter(myForm.value)\" class=\"tb-header-filter\">\r\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"'header-column-' + metaData.key\" />\r\n <input type=\"hidden\" name=\"filterType\" [ngModel]=\"currentFilterType\" />\r\n <input type=\"hidden\" name=\"key\" [ngModel]=\"metaData.key\" />\r\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"metaData.fieldType\" />\r\n \r\n @if(currentFilterType === FilterType.Or || currentFilterType === FilterType.In){\r\n <tb-in-list-filter name='filterValue' [key]='metaData.key' [ngModel]=\"undefined\"/>\r\n }\r\n @else if(metaData.fieldType === FieldType.Link || metaData.fieldType === FieldType.String || metaData.fieldType === FieldType.Array || metaData.fieldType === FieldType.Unknown || metaData.fieldType === FieldType.PhoneNumber) {\r\n <mat-form-field stop-propagation class=\"font auto-width\">\r\n <mat-icon matPrefix class=\"search-icon\">search</mat-icon>\r\n <mat-label>{{currentFilterType === FilterType.StringDoesNotContain ? 'Does Not Contain...' : 'Contains...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"undefined\"/>\r\n <span matSuffix [matTooltip]=\"currentFilterType === FilterType.StringDoesNotContain ? 'Contains' : 'Does Not Contain'\">\r\n <button mat-icon-button color=\"primary\" (click)=\"setStringFilterType()\" class=\"header-filter-icon-button\">\r\n <mat-icon [class]=\"{'chosen-icon': currentFilterType === FilterType.StringDoesNotContain }\">\r\n block\r\n </mat-icon>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n }\r\n @else if (metaData.fieldType === FieldType.Number || metaData.fieldType === FieldType.Currency) {\r\n <mat-form-field class=\"auto-width\" stop-propagation>\r\n <mat-label>{{currentFilterType === FilterType.NumberEquals ? 'Equals...' : currentFilterType === FilterType.NumberLessThan ? 'Less Than...' : 'More Than...'}}</mat-label>\r\n <input matInput type='number' name=\"filterValue\" [ngModel]=\"undefined\" />\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberLessThan)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberLessThan }\">\r\n <mat-icon class=\"suffix-icons\"\r\n >\r\n arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberGreaterThan)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberGreaterThan }\" >\r\n <mat-icon class=\"suffix-icons\">arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberEquals)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberEquals }\">\r\n <span class=\"suffix-icons\">=</span>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n }\r\n @else if (metaData.fieldType === FieldType.Boolean) {\r\n <div>\r\n <label>\r\n <mat-icon class=\"search-icon\">filter_list</mat-icon>\r\n </label>\r\n <mat-radio-group stop-propagation #ctrl=\"matRadioGroup\" #boolField='ngModel' class=\"font\" name=\"filterValue\" [ngModel]=\"undefined\" >\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"boolField.control.setValue(true);\" [value]=\"true\">True</mat-radio-button><br/>\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"boolField.control.setValue(false)\" [value]=\"false\">False</mat-radio-button><br/>\r\n </mat-radio-group>\r\n </div>\r\n }\r\n @else if (metaData.fieldType === FieldType.Date || metaData.fieldType === FieldType.DateTime) {\r\n <mat-form-field class=\"font auto-width\" stop-propagation >\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrAfter)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateOnOrAfter }\">\r\n <mat-icon class=\"suffix-icons underline\">arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrBefore)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateOnOrBefore }\">\r\n <mat-icon class=\"suffix-icons underline\">arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateIsOn)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateIsOn }\">\r\n <span class=\"suffix-icons underline\"> =</span>\r\n </button>\r\n </span>\r\n <mat-label>{{currentFilterType === FilterType.DateIsOn ? 'On...' :\r\n currentFilterType === FilterType.DateOnOrBefore ? 'On or Before...' : 'On or After...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"undefined\" [matDatepicker]=\"calendar\"\r\n (click)=\"calendar.open()\"/>\r\n <mat-datepicker-toggle class=\"date-toggle header-filter-icon-button\" matSuffix [for]=\"calendar\" preventEnter></mat-datepicker-toggle>\r\n <mat-datepicker #calendar></mat-datepicker>\r\n </mat-form-field>\r\n }\r\n <button mat-button (click)=\"onEnter(myForm.value)\" [disabled]=\"myForm.value.filterValue == undefined\" disableRipple>\r\n Apply\r\n </button>\r\n </ng-form>\r\n }\r\n</mat-menu>\r\n", styles: [":host{--mdc-text-button-container-height: 24px}:host{--mdc-filled-button-container-height: 24px}:host{--mdc-protected-button-container-height: 24px}:host{--mdc-outlined-button-container-height: 24px}:host{--mat-text-button-touch-target-display: none}:host{--mat-filled-button-touch-target-display: none}:host{--mat-protected-button-touch-target-display: none}:host{--mat-outlined-button-touch-target-display: none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.menu-icon{font-size:16px;line-height:16px;vertical-align:top;height:16px;width:16px}.search-icon{margin-right:16px;vertical-align:middle;height:24px;width:24px;color:#0000008a;font-size:21px;line-height:1.125}.font{font-size:14px}.filter-radio-button:first-of-type{padding-left:0}.filter-radio-button{padding:10px 40px;min-width:110px}.auto-width{width:260px;margin:5px;display:block;height:55px}.open-menu-icon-button{height:28px;width:28px;padding:6px}.header-filter-icon-button{height:18px;width:18px;font-size:18px;padding:0;margin:0 2px}.header-filter-icon-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.header-filter-icon-button.chosen-icon,.header-filter-icon-button.chosen-icon ::ng-deep *{height:22px;width:22px;font-size:22px;color:green}mat-icon.mat-icon.suffix-icons.underline{height:20px;text-decoration:underline .1px solid}.chosen-icon mat-icon.mat-icon.suffix-icons.underline{height:24px}::ng-deep .mat-mdc-form-field-icon-prefix:has(.tb-header-prefix),.tb-header-prefix{padding:0;flex-basis:36%}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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"] }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: ["key"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i10.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i10.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3519
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: ColumnHeaderMenuComponent, isStandalone: true, selector: "tb-header-menu", inputs: { $metaData: { classPropertyName: "$metaData", publicName: "metaData", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "$trigger", first: true, predicate: MatMenuTrigger, descendants: true, isSignal: true }], ngImport: i0, template: "@let metaData = $metaData();\r\n@let currentFilterType = $currentFilterType();\r\n\r\n<button mat-icon-button class=\"open-menu-icon-button\" disableRipple [matMenuTriggerFor]=\"menu\" [matMenuTriggerRestoreFocus]=\"false\">\r\n <mat-icon class=\"menu-icon\">more_vert</mat-icon>\r\n</button>\r\n<mat-menu #menu=\"matMenu\" >\r\n @if (!(metaData.fieldType === FieldType.NotMapped))\r\n {\r\n <button mat-menu-item (click)=\"tableState.addGroupByKey(metaData.key)\">\r\n <mat-icon color=\"primary\">group</mat-icon>\r\n <span>Group By</span>\r\n </button>\r\n }\r\n <button mat-menu-item (click)=hideField(metaData.key)>\r\n <mat-icon color=\"primary\">visibility_off</mat-icon>\r\n <span>Hide Column</span>\r\n </button>\r\n @if (!(metaData.fieldType === FieldType.NotMapped))\r\n {\r\n <ng-form #myForm=\"ngForm\" (keydown.enter)=\"onEnter(myForm.value)\" class=\"tb-header-filter\">\r\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"'header-column-' + metaData.key\" />\r\n <input type=\"hidden\" name=\"filterType\" [ngModel]=\"currentFilterType\" />\r\n <input type=\"hidden\" name=\"key\" [ngModel]=\"metaData.key\" />\r\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"metaData.fieldType\" />\r\n \r\n @if(currentFilterType === FilterType.Or || currentFilterType === FilterType.In){\r\n <tb-in-list-filter name='filterValue' [key]='metaData.key' [ngModel]=\"undefined\"/>\r\n }\r\n @else if(metaData.fieldType === FieldType.Link || metaData.fieldType === FieldType.String || metaData.fieldType === FieldType.Array || metaData.fieldType === FieldType.Unknown || metaData.fieldType === FieldType.PhoneNumber) {\r\n <mat-form-field stop-propagation class=\"font auto-width\">\r\n <mat-icon matPrefix class=\"search-icon\">search</mat-icon>\r\n <mat-label>{{currentFilterType === FilterType.StringDoesNotContain ? 'Does Not Contain...' : 'Contains...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"undefined\"/>\r\n <span matSuffix [matTooltip]=\"currentFilterType === FilterType.StringDoesNotContain ? 'Contains' : 'Does Not Contain'\">\r\n <button mat-icon-button color=\"primary\" (click)=\"setStringFilterType()\" class=\"header-filter-icon-button\">\r\n <mat-icon [class]=\"{'chosen-icon': currentFilterType === FilterType.StringDoesNotContain }\">\r\n block\r\n </mat-icon>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n }\r\n @else if (metaData.fieldType === FieldType.Number || metaData.fieldType === FieldType.Currency) {\r\n <mat-form-field class=\"auto-width\" stop-propagation>\r\n <mat-label>{{currentFilterType === FilterType.NumberEquals ? 'Equals...' : currentFilterType === FilterType.NumberLessThan ? 'Less Than...' : 'More Than...'}}</mat-label>\r\n <input matInput type='number' name=\"filterValue\" [ngModel]=\"undefined\" />\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberLessThan)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberLessThan }\">\r\n <mat-icon class=\"suffix-icons\"\r\n >\r\n arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberGreaterThan)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberGreaterThan }\" >\r\n <mat-icon class=\"suffix-icons\">arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberEquals)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberEquals }\">\r\n <span class=\"suffix-icons\">=</span>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n }\r\n @else if (metaData.fieldType === FieldType.Boolean) {\r\n <div>\r\n <label>\r\n <mat-icon class=\"search-icon\">filter_list</mat-icon>\r\n </label>\r\n <mat-radio-group stop-propagation #ctrl=\"matRadioGroup\" #boolField='ngModel' class=\"font\" name=\"filterValue\" [ngModel]=\"undefined\" >\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"boolField.control.setValue(true);\" [value]=\"true\">True</mat-radio-button><br/>\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"boolField.control.setValue(false)\" [value]=\"false\">False</mat-radio-button><br/>\r\n </mat-radio-group>\r\n </div>\r\n }\r\n @else if (metaData.fieldType === FieldType.Date || metaData.fieldType === FieldType.DateTime) {\r\n <mat-form-field class=\"font auto-width\" stop-propagation >\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrAfter)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateOnOrAfter }\">\r\n <mat-icon class=\"suffix-icons underline\">arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrBefore)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateOnOrBefore }\">\r\n <mat-icon class=\"suffix-icons underline\">arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateIsOn)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateIsOn }\">\r\n <span class=\"suffix-icons underline\"> =</span>\r\n </button>\r\n </span>\r\n <mat-label>{{currentFilterType === FilterType.DateIsOn ? 'On...' :\r\n currentFilterType === FilterType.DateOnOrBefore ? 'On or Before...' : 'On or After...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"undefined\" [matDatepicker]=\"calendar\"\r\n (click)=\"calendar.open()\"/>\r\n <mat-datepicker-toggle class=\"date-toggle header-filter-icon-button\" matSuffix [for]=\"calendar\" preventEnter></mat-datepicker-toggle>\r\n <mat-datepicker #calendar></mat-datepicker>\r\n </mat-form-field>\r\n }\r\n <button mat-button (click)=\"onEnter(myForm.value)\" [disabled]=\"myForm.value.filterValue == undefined\" disableRipple>\r\n Apply\r\n </button>\r\n </ng-form>\r\n }\r\n</mat-menu>\r\n", styles: [":host{--mdc-text-button-container-height: 24px}:host{--mdc-filled-button-container-height: 24px}:host{--mdc-protected-button-container-height: 24px}:host{--mdc-outlined-button-container-height: 24px}:host{--mat-text-button-touch-target-display: none}:host{--mat-filled-button-touch-target-display: none}:host{--mat-protected-button-touch-target-display: none}:host{--mat-outlined-button-touch-target-display: none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.menu-icon{font-size:16px;line-height:16px;vertical-align:top;height:16px;width:16px}.search-icon{margin-right:16px;vertical-align:middle;height:24px;color:#0000008a;font-size:21px;line-height:1.125}.font{font-size:14px}.filter-radio-button:first-of-type{padding-left:0}.filter-radio-button{padding:10px 40px;min-width:110px}.auto-width{width:260px;margin:5px;display:block;height:55px}.open-menu-icon-button{height:28px;width:28px;padding:6px}.header-filter-icon-button{height:18px;width:18px;font-size:18px;padding:0;margin:0 2px}.header-filter-icon-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.header-filter-icon-button.chosen-icon,.header-filter-icon-button.chosen-icon ::ng-deep *{height:22px;width:22px;font-size:22px;color:green}mat-icon.mat-icon.suffix-icons.underline{height:20px;text-decoration:underline .1px solid}.chosen-icon mat-icon.mat-icon.suffix-icons.underline{height:24px}::ng-deep .mat-mdc-form-field-icon-prefix:has(.tb-header-prefix),.tb-header-prefix{padding:0;flex-basis:36%}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$4.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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"] }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: ["key"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i10.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i10.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i4.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i4.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i4.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3532
3520
  }
3533
3521
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ColumnHeaderMenuComponent, decorators: [{
3534
3522
  type: Component,
3535
3523
  args: [{ selector: 'tb-header-menu', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
3536
3524
  MatMenuModule, MatIconModule, MatButtonModule, FormsModule, InListFilterComponent,
3537
3525
  MatInputModule, MatTooltipModule, StopPropagationDirective, MatRadioModule, MatDatepickerModule
3538
- ], template: "@let metaData = $metaData();\r\n@let currentFilterType = $currentFilterType();\r\n\r\n<button mat-icon-button class=\"open-menu-icon-button\" disableRipple [matMenuTriggerFor]=\"menu\" [matMenuTriggerRestoreFocus]=\"false\">\r\n <mat-icon class=\"menu-icon\">more_vert</mat-icon>\r\n</button>\r\n<mat-menu #menu=\"matMenu\" >\r\n @if (!(metaData.fieldType === FieldType.NotMapped))\r\n {\r\n <button mat-menu-item (click)=\"tableState.addGroupByKey(metaData.key)\">\r\n <mat-icon color=\"primary\">group</mat-icon>\r\n <span>Group By</span>\r\n </button>\r\n }\r\n <button mat-menu-item (click)=hideField(metaData.key)>\r\n <mat-icon color=\"primary\">visibility_off</mat-icon>\r\n <span>Hide Column</span>\r\n </button>\r\n @if (!(metaData.fieldType === FieldType.NotMapped))\r\n {\r\n <ng-form #myForm=\"ngForm\" (keydown.enter)=\"onEnter(myForm.value)\" class=\"tb-header-filter\">\r\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"'header-column-' + metaData.key\" />\r\n <input type=\"hidden\" name=\"filterType\" [ngModel]=\"currentFilterType\" />\r\n <input type=\"hidden\" name=\"key\" [ngModel]=\"metaData.key\" />\r\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"metaData.fieldType\" />\r\n \r\n @if(currentFilterType === FilterType.Or || currentFilterType === FilterType.In){\r\n <tb-in-list-filter name='filterValue' [key]='metaData.key' [ngModel]=\"undefined\"/>\r\n }\r\n @else if(metaData.fieldType === FieldType.Link || metaData.fieldType === FieldType.String || metaData.fieldType === FieldType.Array || metaData.fieldType === FieldType.Unknown || metaData.fieldType === FieldType.PhoneNumber) {\r\n <mat-form-field stop-propagation class=\"font auto-width\">\r\n <mat-icon matPrefix class=\"search-icon\">search</mat-icon>\r\n <mat-label>{{currentFilterType === FilterType.StringDoesNotContain ? 'Does Not Contain...' : 'Contains...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"undefined\"/>\r\n <span matSuffix [matTooltip]=\"currentFilterType === FilterType.StringDoesNotContain ? 'Contains' : 'Does Not Contain'\">\r\n <button mat-icon-button color=\"primary\" (click)=\"setStringFilterType()\" class=\"header-filter-icon-button\">\r\n <mat-icon [class]=\"{'chosen-icon': currentFilterType === FilterType.StringDoesNotContain }\">\r\n block\r\n </mat-icon>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n }\r\n @else if (metaData.fieldType === FieldType.Number || metaData.fieldType === FieldType.Currency) {\r\n <mat-form-field class=\"auto-width\" stop-propagation>\r\n <mat-label>{{currentFilterType === FilterType.NumberEquals ? 'Equals...' : currentFilterType === FilterType.NumberLessThan ? 'Less Than...' : 'More Than...'}}</mat-label>\r\n <input matInput type='number' name=\"filterValue\" [ngModel]=\"undefined\" />\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberLessThan)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberLessThan }\">\r\n <mat-icon class=\"suffix-icons\"\r\n >\r\n arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberGreaterThan)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberGreaterThan }\" >\r\n <mat-icon class=\"suffix-icons\">arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberEquals)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberEquals }\">\r\n <span class=\"suffix-icons\">=</span>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n }\r\n @else if (metaData.fieldType === FieldType.Boolean) {\r\n <div>\r\n <label>\r\n <mat-icon class=\"search-icon\">filter_list</mat-icon>\r\n </label>\r\n <mat-radio-group stop-propagation #ctrl=\"matRadioGroup\" #boolField='ngModel' class=\"font\" name=\"filterValue\" [ngModel]=\"undefined\" >\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"boolField.control.setValue(true);\" [value]=\"true\">True</mat-radio-button><br/>\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"boolField.control.setValue(false)\" [value]=\"false\">False</mat-radio-button><br/>\r\n </mat-radio-group>\r\n </div>\r\n }\r\n @else if (metaData.fieldType === FieldType.Date || metaData.fieldType === FieldType.DateTime) {\r\n <mat-form-field class=\"font auto-width\" stop-propagation >\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrAfter)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateOnOrAfter }\">\r\n <mat-icon class=\"suffix-icons underline\">arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrBefore)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateOnOrBefore }\">\r\n <mat-icon class=\"suffix-icons underline\">arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateIsOn)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateIsOn }\">\r\n <span class=\"suffix-icons underline\"> =</span>\r\n </button>\r\n </span>\r\n <mat-label>{{currentFilterType === FilterType.DateIsOn ? 'On...' :\r\n currentFilterType === FilterType.DateOnOrBefore ? 'On or Before...' : 'On or After...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"undefined\" [matDatepicker]=\"calendar\"\r\n (click)=\"calendar.open()\"/>\r\n <mat-datepicker-toggle class=\"date-toggle header-filter-icon-button\" matSuffix [for]=\"calendar\" preventEnter></mat-datepicker-toggle>\r\n <mat-datepicker #calendar></mat-datepicker>\r\n </mat-form-field>\r\n }\r\n <button mat-button (click)=\"onEnter(myForm.value)\" [disabled]=\"myForm.value.filterValue == undefined\" disableRipple>\r\n Apply\r\n </button>\r\n </ng-form>\r\n }\r\n</mat-menu>\r\n", styles: [":host{--mdc-text-button-container-height: 24px}:host{--mdc-filled-button-container-height: 24px}:host{--mdc-protected-button-container-height: 24px}:host{--mdc-outlined-button-container-height: 24px}:host{--mat-text-button-touch-target-display: none}:host{--mat-filled-button-touch-target-display: none}:host{--mat-protected-button-touch-target-display: none}:host{--mat-outlined-button-touch-target-display: none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.menu-icon{font-size:16px;line-height:16px;vertical-align:top;height:16px;width:16px}.search-icon{margin-right:16px;vertical-align:middle;height:24px;width:24px;color:#0000008a;font-size:21px;line-height:1.125}.font{font-size:14px}.filter-radio-button:first-of-type{padding-left:0}.filter-radio-button{padding:10px 40px;min-width:110px}.auto-width{width:260px;margin:5px;display:block;height:55px}.open-menu-icon-button{height:28px;width:28px;padding:6px}.header-filter-icon-button{height:18px;width:18px;font-size:18px;padding:0;margin:0 2px}.header-filter-icon-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.header-filter-icon-button.chosen-icon,.header-filter-icon-button.chosen-icon ::ng-deep *{height:22px;width:22px;font-size:22px;color:green}mat-icon.mat-icon.suffix-icons.underline{height:20px;text-decoration:underline .1px solid}.chosen-icon mat-icon.mat-icon.suffix-icons.underline{height:24px}::ng-deep .mat-mdc-form-field-icon-prefix:has(.tb-header-prefix),.tb-header-prefix{padding:0;flex-basis:36%}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"] }]
3526
+ ], template: "@let metaData = $metaData();\r\n@let currentFilterType = $currentFilterType();\r\n\r\n<button mat-icon-button class=\"open-menu-icon-button\" disableRipple [matMenuTriggerFor]=\"menu\" [matMenuTriggerRestoreFocus]=\"false\">\r\n <mat-icon class=\"menu-icon\">more_vert</mat-icon>\r\n</button>\r\n<mat-menu #menu=\"matMenu\" >\r\n @if (!(metaData.fieldType === FieldType.NotMapped))\r\n {\r\n <button mat-menu-item (click)=\"tableState.addGroupByKey(metaData.key)\">\r\n <mat-icon color=\"primary\">group</mat-icon>\r\n <span>Group By</span>\r\n </button>\r\n }\r\n <button mat-menu-item (click)=hideField(metaData.key)>\r\n <mat-icon color=\"primary\">visibility_off</mat-icon>\r\n <span>Hide Column</span>\r\n </button>\r\n @if (!(metaData.fieldType === FieldType.NotMapped))\r\n {\r\n <ng-form #myForm=\"ngForm\" (keydown.enter)=\"onEnter(myForm.value)\" class=\"tb-header-filter\">\r\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"'header-column-' + metaData.key\" />\r\n <input type=\"hidden\" name=\"filterType\" [ngModel]=\"currentFilterType\" />\r\n <input type=\"hidden\" name=\"key\" [ngModel]=\"metaData.key\" />\r\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"metaData.fieldType\" />\r\n \r\n @if(currentFilterType === FilterType.Or || currentFilterType === FilterType.In){\r\n <tb-in-list-filter name='filterValue' [key]='metaData.key' [ngModel]=\"undefined\"/>\r\n }\r\n @else if(metaData.fieldType === FieldType.Link || metaData.fieldType === FieldType.String || metaData.fieldType === FieldType.Array || metaData.fieldType === FieldType.Unknown || metaData.fieldType === FieldType.PhoneNumber) {\r\n <mat-form-field stop-propagation class=\"font auto-width\">\r\n <mat-icon matPrefix class=\"search-icon\">search</mat-icon>\r\n <mat-label>{{currentFilterType === FilterType.StringDoesNotContain ? 'Does Not Contain...' : 'Contains...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"undefined\"/>\r\n <span matSuffix [matTooltip]=\"currentFilterType === FilterType.StringDoesNotContain ? 'Contains' : 'Does Not Contain'\">\r\n <button mat-icon-button color=\"primary\" (click)=\"setStringFilterType()\" class=\"header-filter-icon-button\">\r\n <mat-icon [class]=\"{'chosen-icon': currentFilterType === FilterType.StringDoesNotContain }\">\r\n block\r\n </mat-icon>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n }\r\n @else if (metaData.fieldType === FieldType.Number || metaData.fieldType === FieldType.Currency) {\r\n <mat-form-field class=\"auto-width\" stop-propagation>\r\n <mat-label>{{currentFilterType === FilterType.NumberEquals ? 'Equals...' : currentFilterType === FilterType.NumberLessThan ? 'Less Than...' : 'More Than...'}}</mat-label>\r\n <input matInput type='number' name=\"filterValue\" [ngModel]=\"undefined\" />\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberLessThan)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberLessThan }\">\r\n <mat-icon class=\"suffix-icons\"\r\n >\r\n arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberGreaterThan)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberGreaterThan }\" >\r\n <mat-icon class=\"suffix-icons\">arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.NumberEquals)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.NumberEquals }\">\r\n <span class=\"suffix-icons\">=</span>\r\n </button>\r\n </span>\r\n </mat-form-field>\r\n }\r\n @else if (metaData.fieldType === FieldType.Boolean) {\r\n <div>\r\n <label>\r\n <mat-icon class=\"search-icon\">filter_list</mat-icon>\r\n </label>\r\n <mat-radio-group stop-propagation #ctrl=\"matRadioGroup\" #boolField='ngModel' class=\"font\" name=\"filterValue\" [ngModel]=\"undefined\" >\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"boolField.control.setValue(true);\" [value]=\"true\">True</mat-radio-button><br/>\r\n <mat-radio-button class=\"filter-radio-button\" (click)=\"boolField.control.setValue(false)\" [value]=\"false\">False</mat-radio-button><br/>\r\n </mat-radio-group>\r\n </div>\r\n }\r\n @else if (metaData.fieldType === FieldType.Date || metaData.fieldType === FieldType.DateTime) {\r\n <mat-form-field class=\"font auto-width\" stop-propagation >\r\n <span matPrefix class=\"tb-header-prefix\">\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrAfter)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateOnOrAfter }\">\r\n <mat-icon class=\"suffix-icons underline\">arrow_forward_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateOnOrBefore)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateOnOrBefore }\">\r\n <mat-icon class=\"suffix-icons underline\">arrow_back_ios</mat-icon>\r\n </button>\r\n <button mat-icon-button disableRipple class=\"header-filter-icon-button\" (click)=\"setFilterType(FilterType.DateIsOn)\"\r\n [class]=\"{'chosen-icon': currentFilterType === FilterType.DateIsOn }\">\r\n <span class=\"suffix-icons underline\"> =</span>\r\n </button>\r\n </span>\r\n <mat-label>{{currentFilterType === FilterType.DateIsOn ? 'On...' :\r\n currentFilterType === FilterType.DateOnOrBefore ? 'On or Before...' : 'On or After...'}}</mat-label>\r\n <input matInput name=\"filterValue\" [ngModel]=\"undefined\" [matDatepicker]=\"calendar\"\r\n (click)=\"calendar.open()\"/>\r\n <mat-datepicker-toggle class=\"date-toggle header-filter-icon-button\" matSuffix [for]=\"calendar\" preventEnter></mat-datepicker-toggle>\r\n <mat-datepicker #calendar></mat-datepicker>\r\n </mat-form-field>\r\n }\r\n <button mat-button (click)=\"onEnter(myForm.value)\" [disabled]=\"myForm.value.filterValue == undefined\" disableRipple>\r\n Apply\r\n </button>\r\n </ng-form>\r\n }\r\n</mat-menu>\r\n", styles: [":host{--mdc-text-button-container-height: 24px}:host{--mdc-filled-button-container-height: 24px}:host{--mdc-protected-button-container-height: 24px}:host{--mdc-outlined-button-container-height: 24px}:host{--mat-text-button-touch-target-display: none}:host{--mat-filled-button-touch-target-display: none}:host{--mat-protected-button-touch-target-display: none}:host{--mat-outlined-button-touch-target-display: none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.menu-icon{font-size:16px;line-height:16px;vertical-align:top;height:16px;width:16px}.search-icon{margin-right:16px;vertical-align:middle;height:24px;color:#0000008a;font-size:21px;line-height:1.125}.font{font-size:14px}.filter-radio-button:first-of-type{padding-left:0}.filter-radio-button{padding:10px 40px;min-width:110px}.auto-width{width:260px;margin:5px;display:block;height:55px}.open-menu-icon-button{height:28px;width:28px;padding:6px}.header-filter-icon-button{height:18px;width:18px;font-size:18px;padding:0;margin:0 2px}.header-filter-icon-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.header-filter-icon-button.chosen-icon,.header-filter-icon-button.chosen-icon ::ng-deep *{height:22px;width:22px;font-size:22px;color:green}mat-icon.mat-icon.suffix-icons.underline{height:20px;text-decoration:underline .1px solid}.chosen-icon mat-icon.mat-icon.suffix-icons.underline{height:24px}::ng-deep .mat-mdc-form-field-icon-prefix:has(.tb-header-prefix),.tb-header-prefix{padding:0;flex-basis:36%}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}.tb-header-filter ::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"] }]
3539
3527
  }] });
3540
3528
 
3541
3529
  class ColumnTotalPipe {
@@ -3602,7 +3590,7 @@ const columnsStyles = (metaDatas, userDefinedWidths) => {
3602
3590
 
3603
3591
  class ColumnBuilderComponent {
3604
3592
  FieldType = FieldType;
3605
- config = inject(TableBuilderConfigToken);
3593
+ transformCreator = inject(TransformCreator);
3606
3594
  table = inject(MatTable);
3607
3595
  state = inject(TableStore);
3608
3596
  templateService = inject(TableTemplateService);
@@ -3632,7 +3620,7 @@ class ColumnBuilderComponent {
3632
3620
  const metaData = this.$metaData();
3633
3621
  if (!metaData)
3634
3622
  return;
3635
- return createTransformer(metaData, this.config);
3623
+ return this.transformCreator.createTransformer(metaData);
3636
3624
  });
3637
3625
  $innerTemplate = computed(() => {
3638
3626
  const metaData = this.$metaData();
@@ -3763,7 +3751,7 @@ class GenericTableComponent {
3763
3751
  state = inject(TableStore);
3764
3752
  dataStore = inject(DataStore);
3765
3753
  viewContainer = inject(ViewContainerRef);
3766
- config = inject(TableBuilderConfigToken);
3754
+ transformCreator = inject(TransformCreator);
3767
3755
  _injector = inject(Injector);
3768
3756
  smallFooter = 10;
3769
3757
  $headerRow = viewChild(MatHeaderRowDef);
@@ -3874,9 +3862,8 @@ class GenericTableComponent {
3874
3862
  });
3875
3863
  $usePaginator = computed(() => this.state.$tableSettings().usePaginator);
3876
3864
  $useVirtualScroll = computed(() => this.state.$viewType().includes('virtual'));
3877
- $virtualStart = this.dataStore.selectSignal(d => d.virtualEnds.start);
3878
3865
  $offsetIndex = computed(() => {
3879
- const virtualStart = this.$virtualStart();
3866
+ const virtualStart = this.dataStore.selectSignal(d => d.virtualEnds.start)();
3880
3867
  const pageSize = this.state.$pageSize();
3881
3868
  const currentPage = this.state.$currentPage();
3882
3869
  if (this.$useVirtualScroll()) {
@@ -3992,7 +3979,7 @@ class GenericTableComponent {
3992
3979
  if (val == undefined || val === 'null')
3993
3980
  return '';
3994
3981
  try {
3995
- return createTransformer(this.state.$getMetaData(key)(), this.config, true, true)({ [`${key}`]: val });
3982
+ return this.transformCreator.createTransformer(this.state.$getMetaData(key)(), true, true)({ [`${key}`]: val });
3996
3983
  }
3997
3984
  catch (error) {
3998
3985
  return val;
@@ -4046,14 +4033,14 @@ class GenericTableComponent {
4046
4033
  });
4047
4034
  $stickyFooter = computed(() => this.state.$props().stickyFooter || this.state.$isVirtual());
4048
4035
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: GenericTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4049
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: GenericTableComponent, isStandalone: true, selector: "tb-generic-table", inputs: { $displayDataLength: { classPropertyName: "$displayDataLength", publicName: "displayDataLength", isSignal: true, isRequired: true, transformFunction: null }, $data: { classPropertyName: "$data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, $rows: { classPropertyName: "$rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, $columnInfos: { classPropertyName: "$columnInfos", publicName: "columnInfos", isSignal: true, isRequired: true, transformFunction: null }, $dataSource: { classPropertyName: "$dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, $trackBy: { classPropertyName: "$trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection$: "selection" }, viewQueries: [{ propertyName: "$headerRow", first: true, predicate: MatHeaderRowDef, descendants: true, isSignal: true }, { propertyName: "$footerRow", first: true, predicate: MatFooterRowDef, descendants: true, isSignal: true }, { propertyName: "$table", first: true, predicate: MatTable, descendants: true, isSignal: true }, { propertyName: "$dropList", first: true, predicate: CdkDropList, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-table\r\n cdkDropList\r\n cdkDropListLockAxis='x'\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n class=\"table-drag-list\"\r\n #table\r\n [dataSource]=\"$dataSource()\"\r\n [trackBy]=\"$trackByFunction()\"\r\n [style]=\"$tableWidth()\"\r\n>\r\n\r\n <!-- select column -->\r\n <ng-container matColumnDef=\"select\">\r\n @let selection = $selection();\r\n <mat-header-cell *matHeaderCellDef class=\"select-column\">\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [checked]=\"!!($masterToggleChecked())\"\r\n [indeterminate]=\"$masterToggleIndeterminate()\">\r\n </mat-checkbox>\r\n </mat-header-cell>\r\n\r\n <mat-cell *matCellDef=\"let row\" class=\"select-column\">\r\n <mat-checkbox\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\"/>\r\n </mat-cell>\r\n\r\n <mat-footer-cell *matFooterCellDef class=\"select-column\">\r\n {{ selection.selected.length }}\r\n </mat-footer-cell>\r\n </ng-container>\r\n\r\n\r\n <!-- index column -->\r\n <ng-container matColumnDef=\"index\">\r\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\" class=\"index-column\">#\r\n </mat-header-cell>\r\n <mat-cell *matCellDef=\"let i = index; let t\" class=\"index-column\">\r\n {{ 1 + i + $offsetIndex() }}\r\n </mat-cell>\r\n <mat-footer-cell *matFooterCellDef class=\"index-column\"></mat-footer-cell>\r\n </ng-container>\r\n\r\n <!-- Grouping -->\r\n <ng-container matColumnDef=\"groupHeader\">\r\n <mat-cell *matCellDef=\"let row\">\r\n @let expanded = (state.$getIsExpanded | func : row.key : row.groupName );\r\n <div [style.paddingLeft]=\"row.padding + 'px !important'\">\r\n <button mat-icon-button (click)=\"setExpanded(row.key, row.groupName, !expanded());\">\r\n @if (!expanded()) {\r\n <mat-icon>chevron_right</mat-icon>\r\n } @else {\r\n <mat-icon>expand_more</mat-icon>\r\n }\r\n </button>\r\n {{ getTransform | func : row.key : row.groupHeaderDisplay }} ({{ row.length }})\r\n </div>\r\n <div style=\"flex-grow: 1\">\r\n <ng-container *ngTemplateOutlet=\"state.$props().groupHeaderTemplate!; context: { element: row }\"></ng-container>\r\n </div>\r\n </mat-cell>\r\n </ng-container>\r\n\r\n <mat-row [style.height]=\"$rowHeight()\" [style.min-height]=\"$rowHeight()\"\r\n *matRowDef=\"let row; columns: $keys(); let i = index\"/>\r\n <mat-row [style.height]=\"state.$props().groupHeaderHeight ? state.$props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\r\n [style.min-height]=\"state.$props().groupHeaderHeight ? state.$props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\r\n *matRowDef=\"let row; columns: ['groupHeader']; when: isGroupHeader\" style=\"background-color: white;\"/>\r\n</mat-table>\r\n\r\n<mat-header-row [style.height]=\"$headerHeight()\" [style.min-height]=\"$headerHeight()\"\r\n *matHeaderRowDef=\"$keys(); sticky: state.$props().isSticky\" [style.top.px]=\"($offset()! * -1)\"/>\r\n<mat-footer-row [style.height]=\"$footerHeight()\" [style.min-height]=\"$footerHeight()\"\r\n *matFooterRowDef=\"$keys(); sticky: $stickyFooter() \"\r\n [style.bottom.px]=\"$stickyFooter() ? ($offset()) : undefined\"/>\r\n", 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"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1$6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1$6.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1$6.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i1$6.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i1$6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i1$6.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i1$6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i1$6.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i5.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "pipe", type: FunctionPipe, name: "func" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4036
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: GenericTableComponent, isStandalone: true, selector: "tb-generic-table", inputs: { $displayDataLength: { classPropertyName: "$displayDataLength", publicName: "displayDataLength", isSignal: true, isRequired: true, transformFunction: null }, $data: { classPropertyName: "$data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, $rows: { classPropertyName: "$rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, $columnInfos: { classPropertyName: "$columnInfos", publicName: "columnInfos", isSignal: true, isRequired: true, transformFunction: null }, $dataSource: { classPropertyName: "$dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, $trackBy: { classPropertyName: "$trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection$: "selection" }, viewQueries: [{ propertyName: "$headerRow", first: true, predicate: MatHeaderRowDef, descendants: true, isSignal: true }, { propertyName: "$footerRow", first: true, predicate: MatFooterRowDef, descendants: true, isSignal: true }, { propertyName: "$table", first: true, predicate: MatTable, descendants: true, isSignal: true }, { propertyName: "$dropList", first: true, predicate: CdkDropList, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-table\r\n cdkDropList\r\n cdkDropListLockAxis='x'\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n class=\"table-drag-list\"\r\n #table\r\n [dataSource]=\"$dataSource()\"\r\n [trackBy]=\"$trackByFunction()\"\r\n [style]=\"$tableWidth()\"\r\n>\r\n\r\n <!-- select column -->\r\n <ng-container matColumnDef=\"select\">\r\n @let selection = $selection();\r\n <mat-header-cell *matHeaderCellDef class=\"select-column\">\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [checked]=\"!!($masterToggleChecked())\"\r\n [indeterminate]=\"$masterToggleIndeterminate()\">\r\n </mat-checkbox>\r\n </mat-header-cell>\r\n\r\n <mat-cell *matCellDef=\"let row\" class=\"select-column\">\r\n <mat-checkbox\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\"/>\r\n </mat-cell>\r\n\r\n <mat-footer-cell *matFooterCellDef class=\"select-column\">\r\n {{ selection.selected.length }}\r\n </mat-footer-cell>\r\n </ng-container>\r\n\r\n\r\n <!-- index column -->\r\n <ng-container matColumnDef=\"index\">\r\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\" class=\"index-column\">#\r\n </mat-header-cell>\r\n <mat-cell *matCellDef=\"let i = index;\" class=\"index-column\">\r\n {{ 1 + i + $offsetIndex() }}\r\n </mat-cell>\r\n <mat-footer-cell *matFooterCellDef class=\"index-column\"></mat-footer-cell>\r\n </ng-container>\r\n\r\n <!-- Grouping -->\r\n <ng-container matColumnDef=\"groupHeader\">\r\n <mat-cell *matCellDef=\"let row\">\r\n @let expanded = (state.$getIsExpanded | func : row.key : row.groupName );\r\n <div [style.paddingLeft]=\"row.padding + 'px !important'\">\r\n <button mat-icon-button (click)=\"setExpanded(row.key, row.groupName, !expanded());\">\r\n @if (!expanded()) {\r\n <mat-icon>chevron_right</mat-icon>\r\n } @else {\r\n <mat-icon>expand_more</mat-icon>\r\n }\r\n </button>\r\n {{ getTransform | func : row.key : row.groupHeaderDisplay }} ({{ row.length }})\r\n </div>\r\n <div style=\"flex-grow: 1\">\r\n <ng-container *ngTemplateOutlet=\"state.$props().groupHeaderTemplate!; context: { element: row }\"></ng-container>\r\n </div>\r\n </mat-cell>\r\n </ng-container>\r\n\r\n <mat-row [style.height]=\"$rowHeight()\" [style.min-height]=\"$rowHeight()\"\r\n *matRowDef=\"let row; columns: $keys(); let i = index\"/>\r\n <mat-row [style.height]=\"state.$props().groupHeaderHeight ? state.$props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\r\n [style.min-height]=\"state.$props().groupHeaderHeight ? state.$props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\r\n *matRowDef=\"let row; columns: ['groupHeader']; when: isGroupHeader\" style=\"background-color: white;\"/>\r\n</mat-table>\r\n\r\n<mat-header-row [style.height]=\"$headerHeight()\" [style.min-height]=\"$headerHeight()\"\r\n *matHeaderRowDef=\"$keys(); sticky: state.$props().isSticky\" [style.top.px]=\"($offset()! * -1)\"/>\r\n<mat-footer-row [style.height]=\"$footerHeight()\" [style.min-height]=\"$footerHeight()\"\r\n *matFooterRowDef=\"$keys(); sticky: $stickyFooter() \"\r\n [style.bottom.px]=\"$stickyFooter() ? ($offset()) : undefined\"/>\r\n", 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"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1$6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1$6.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1$6.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i1$6.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i1$6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i1$6.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i1$6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i1$6.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i5.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "pipe", type: FunctionPipe, name: "func" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4050
4037
  }
4051
4038
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: GenericTableComponent, decorators: [{
4052
4039
  type: Component,
4053
4040
  args: [{ selector: 'tb-generic-table', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
4054
4041
  MatTableModule, DragDropModule, MatCheckboxModule, MatButtonModule, MatIconModule, NgTemplateOutlet,
4055
4042
  MatTooltipModule, FunctionPipe,
4056
- ], template: "<mat-table\r\n cdkDropList\r\n cdkDropListLockAxis='x'\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n class=\"table-drag-list\"\r\n #table\r\n [dataSource]=\"$dataSource()\"\r\n [trackBy]=\"$trackByFunction()\"\r\n [style]=\"$tableWidth()\"\r\n>\r\n\r\n <!-- select column -->\r\n <ng-container matColumnDef=\"select\">\r\n @let selection = $selection();\r\n <mat-header-cell *matHeaderCellDef class=\"select-column\">\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [checked]=\"!!($masterToggleChecked())\"\r\n [indeterminate]=\"$masterToggleIndeterminate()\">\r\n </mat-checkbox>\r\n </mat-header-cell>\r\n\r\n <mat-cell *matCellDef=\"let row\" class=\"select-column\">\r\n <mat-checkbox\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\"/>\r\n </mat-cell>\r\n\r\n <mat-footer-cell *matFooterCellDef class=\"select-column\">\r\n {{ selection.selected.length }}\r\n </mat-footer-cell>\r\n </ng-container>\r\n\r\n\r\n <!-- index column -->\r\n <ng-container matColumnDef=\"index\">\r\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\" class=\"index-column\">#\r\n </mat-header-cell>\r\n <mat-cell *matCellDef=\"let i = index; let t\" class=\"index-column\">\r\n {{ 1 + i + $offsetIndex() }}\r\n </mat-cell>\r\n <mat-footer-cell *matFooterCellDef class=\"index-column\"></mat-footer-cell>\r\n </ng-container>\r\n\r\n <!-- Grouping -->\r\n <ng-container matColumnDef=\"groupHeader\">\r\n <mat-cell *matCellDef=\"let row\">\r\n @let expanded = (state.$getIsExpanded | func : row.key : row.groupName );\r\n <div [style.paddingLeft]=\"row.padding + 'px !important'\">\r\n <button mat-icon-button (click)=\"setExpanded(row.key, row.groupName, !expanded());\">\r\n @if (!expanded()) {\r\n <mat-icon>chevron_right</mat-icon>\r\n } @else {\r\n <mat-icon>expand_more</mat-icon>\r\n }\r\n </button>\r\n {{ getTransform | func : row.key : row.groupHeaderDisplay }} ({{ row.length }})\r\n </div>\r\n <div style=\"flex-grow: 1\">\r\n <ng-container *ngTemplateOutlet=\"state.$props().groupHeaderTemplate!; context: { element: row }\"></ng-container>\r\n </div>\r\n </mat-cell>\r\n </ng-container>\r\n\r\n <mat-row [style.height]=\"$rowHeight()\" [style.min-height]=\"$rowHeight()\"\r\n *matRowDef=\"let row; columns: $keys(); let i = index\"/>\r\n <mat-row [style.height]=\"state.$props().groupHeaderHeight ? state.$props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\r\n [style.min-height]=\"state.$props().groupHeaderHeight ? state.$props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\r\n *matRowDef=\"let row; columns: ['groupHeader']; when: isGroupHeader\" style=\"background-color: white;\"/>\r\n</mat-table>\r\n\r\n<mat-header-row [style.height]=\"$headerHeight()\" [style.min-height]=\"$headerHeight()\"\r\n *matHeaderRowDef=\"$keys(); sticky: state.$props().isSticky\" [style.top.px]=\"($offset()! * -1)\"/>\r\n<mat-footer-row [style.height]=\"$footerHeight()\" [style.min-height]=\"$footerHeight()\"\r\n *matFooterRowDef=\"$keys(); sticky: $stickyFooter() \"\r\n [style.bottom.px]=\"$stickyFooter() ? ($offset()) : undefined\"/>\r\n", 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"] }]
4043
+ ], template: "<mat-table\r\n cdkDropList\r\n cdkDropListLockAxis='x'\r\n cdkDropListOrientation=\"horizontal\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n class=\"table-drag-list\"\r\n #table\r\n [dataSource]=\"$dataSource()\"\r\n [trackBy]=\"$trackByFunction()\"\r\n [style]=\"$tableWidth()\"\r\n>\r\n\r\n <!-- select column -->\r\n <ng-container matColumnDef=\"select\">\r\n @let selection = $selection();\r\n <mat-header-cell *matHeaderCellDef class=\"select-column\">\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [checked]=\"!!($masterToggleChecked())\"\r\n [indeterminate]=\"$masterToggleIndeterminate()\">\r\n </mat-checkbox>\r\n </mat-header-cell>\r\n\r\n <mat-cell *matCellDef=\"let row\" class=\"select-column\">\r\n <mat-checkbox\r\n (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\"/>\r\n </mat-cell>\r\n\r\n <mat-footer-cell *matFooterCellDef class=\"select-column\">\r\n {{ selection.selected.length }}\r\n </mat-footer-cell>\r\n </ng-container>\r\n\r\n\r\n <!-- index column -->\r\n <ng-container matColumnDef=\"index\">\r\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\" class=\"index-column\">#\r\n </mat-header-cell>\r\n <mat-cell *matCellDef=\"let i = index;\" class=\"index-column\">\r\n {{ 1 + i + $offsetIndex() }}\r\n </mat-cell>\r\n <mat-footer-cell *matFooterCellDef class=\"index-column\"></mat-footer-cell>\r\n </ng-container>\r\n\r\n <!-- Grouping -->\r\n <ng-container matColumnDef=\"groupHeader\">\r\n <mat-cell *matCellDef=\"let row\">\r\n @let expanded = (state.$getIsExpanded | func : row.key : row.groupName );\r\n <div [style.paddingLeft]=\"row.padding + 'px !important'\">\r\n <button mat-icon-button (click)=\"setExpanded(row.key, row.groupName, !expanded());\">\r\n @if (!expanded()) {\r\n <mat-icon>chevron_right</mat-icon>\r\n } @else {\r\n <mat-icon>expand_more</mat-icon>\r\n }\r\n </button>\r\n {{ getTransform | func : row.key : row.groupHeaderDisplay }} ({{ row.length }})\r\n </div>\r\n <div style=\"flex-grow: 1\">\r\n <ng-container *ngTemplateOutlet=\"state.$props().groupHeaderTemplate!; context: { element: row }\"></ng-container>\r\n </div>\r\n </mat-cell>\r\n </ng-container>\r\n\r\n <mat-row [style.height]=\"$rowHeight()\" [style.min-height]=\"$rowHeight()\"\r\n *matRowDef=\"let row; columns: $keys(); let i = index\"/>\r\n <mat-row [style.height]=\"state.$props().groupHeaderHeight ? state.$props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\r\n [style.min-height]=\"state.$props().groupHeaderHeight ? state.$props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\r\n *matRowDef=\"let row; columns: ['groupHeader']; when: isGroupHeader\" style=\"background-color: white;\"/>\r\n</mat-table>\r\n\r\n<mat-header-row [style.height]=\"$headerHeight()\" [style.min-height]=\"$headerHeight()\"\r\n *matHeaderRowDef=\"$keys(); sticky: state.$props().isSticky\" [style.top.px]=\"($offset()! * -1)\"/>\r\n<mat-footer-row [style.height]=\"$footerHeight()\" [style.min-height]=\"$footerHeight()\"\r\n *matFooterRowDef=\"$keys(); sticky: $stickyFooter() \"\r\n [style.bottom.px]=\"$stickyFooter() ? ($offset()) : undefined\"/>\r\n", 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"] }]
4057
4044
  }] });
4058
4045
 
4059
4046
  function downloadData(data, filename, mimeType) {
@@ -4459,20 +4446,17 @@ const tbGroupBy = (data, groupByKeys, parentGroupName) => {
4459
4446
  };
4460
4447
  });
4461
4448
  };
4462
- function updateGroupByState(groupedData, { data, groups, expanded }, firstRun) {
4463
- if (firstRun
4464
- || dataUpdated(data, groups, expanded)
4465
- || groupsUpdated(groups, expanded)) {
4449
+ function updateGroupByState({ groupedData }, [data, groups, expandedGroups], index) {
4450
+ if (index === 0
4451
+ || dataUpdated(data, groups, expandedGroups)
4452
+ || groupsUpdated(groups, expandedGroups)) {
4466
4453
  groupedData = groups.value.length ? getGroupedData(data.value, groups.value) : data.value;
4467
4454
  }
4468
- const newDisplayData = expanded.value.length === 0
4455
+ const newDisplayData = expandedGroups.value.length === 0
4469
4456
  ? groupedData
4470
- : groupedData.map(group => mapGroupHeader(group, expanded.value)).flat();
4457
+ : groupedData.map(group => mapGroupHeader(group, expandedGroups.value)).flat();
4471
4458
  return ({ displayData: newDisplayData, groupedData });
4472
4459
  }
4473
- function _updateGroupByState({ groupedData }, [data, groups, expanded], index) {
4474
- return updateGroupByState(groupedData, { data, groups, expanded }, index === 0);
4475
- }
4476
4460
  function mapGroupHeader(obj, data) {
4477
4461
  const showChildren = data.find(a => a.expandedHeaders.includes(obj.groupName));
4478
4462
  const children = !showChildren ? [] :
@@ -4509,15 +4493,6 @@ function sortData(data, sorted) {
4509
4493
  return ordered;
4510
4494
  }
4511
4495
  function filterData(data, filters, resetAll = false) {
4512
- if (filters.length === 0) {
4513
- if (resetAll) {
4514
- for (let index = 0; index < data.length; index++) {
4515
- const element = data[index];
4516
- element[tbNoShowSymbol] = false;
4517
- }
4518
- }
4519
- return data;
4520
- }
4521
4496
  for (let index = 0; index < data.length; index++) {
4522
4497
  const element = data[index];
4523
4498
  const hide = !filters.every(filter => filter(element));
@@ -4529,33 +4504,19 @@ function filterData(data, filters, resetAll = false) {
4529
4504
  }
4530
4505
  const tbNoShowSymbol = Symbol('tb_no_show');
4531
4506
 
4532
- const _sortAndFilterData = (data, sortState, filterState) => combineLatest([
4507
+ const sortAndFilterData = (data, sortState, filterState) => combineLatest([
4533
4508
  data.pipe(timestamp()),
4534
4509
  sortState.pipe(timestamp()),
4535
4510
  filterState.pipe(timestamp())
4536
- ]).pipe(scan((mappedData, [data, sort, f], index) => {
4537
- return mapDataSortsAndFilters(data, f, sort, index === 0, mappedData);
4538
- }, [])).pipe(map$1((resultData) => resultData.filter(item => !item[tbNoShowSymbol])), defaultShareReplay());
4539
- const mapDataSortsAndFilters = (allData, filters, sort, firstRun, filteredData) => {
4540
- const fresh = firstRun || (allData.timestamp > sort.timestamp && allData.timestamp > filters.timestamp);
4541
- const sortChanged = !fresh && sort.timestamp > filters.timestamp;
4542
- const filterRemoved = !fresh && !sortChanged && !filters.value.onlyAddedFilters;
4543
- const runAllOnAllData = fresh || filterRemoved;
4544
- const resetFilters = !fresh && filterRemoved;
4545
- if (runAllOnAllData) {
4546
- const filteredData = filterData(sortData(allData.value, sort.value.sortsToRun), filters.value.allFilters, resetFilters);
4547
- return filteredData;
4548
- }
4549
- if (sortChanged) {
4550
- return (sortData(filteredData, sort.value.sortsToRun));
4551
- }
4552
- return (filterData(filteredData, filters.value.onlyAddedFilters || filters.value.allFilters, resetFilters));
4553
- };
4554
- const sortAndFilterData = (data, filters, sort, firstRun, resultData) => {
4555
- const markedAndSortedData = mapDataSortsAndFilters(data, filters, sort, firstRun, resultData);
4556
- const filteredData = markedAndSortedData.filter(item => !item[tbNoShowSymbol]);
4557
- return filteredData;
4558
- };
4511
+ ]).pipe(scan(({ mappedData: resultData }, [data, sort, f], index) => {
4512
+ if (index === 0 || (data.timestamp > sort.timestamp && data.timestamp > f.timestamp)) {
4513
+ return ({ mappedData: filterData(sortData(data.value, sort.value.sortsToRun), f.value.allFilters) });
4514
+ }
4515
+ if (sort.timestamp > f.timestamp) {
4516
+ return ({ mappedData: sortData(resultData, sort.value.sortsToRun) });
4517
+ }
4518
+ return ({ mappedData: filterData(resultData, f.value.onlyAddedFilters || f.value.allFilters, !f.value.onlyAddedFilters) });
4519
+ }, { mappedData: [] })).pipe(map$1(({ mappedData: resultData }) => resultData.filter(item => !item[tbNoShowSymbol])), defaultShareReplay());
4559
4520
  const createDataCleaners = (metadatas, mutate = false) => {
4560
4521
  const transforms = createCleaners(metadatas);
4561
4522
  return (data) => {
@@ -4788,7 +4749,7 @@ class TableBuilderDataSource extends MatTableDataSource {
4788
4749
  const $pageSize = state.$pageSize;
4789
4750
  const $virtualEnds = data.selectSignal(d => d.virtualEnds);
4790
4751
  const $dataLength = computed(() => this.#$dataSrc().length);
4791
- this.$dataSize = computed(() => {
4752
+ const $dataSize = computed(() => {
4792
4753
  const viewType = state.$viewType();
4793
4754
  const dataLength = $dataLength();
4794
4755
  const currentPage = $currentPage();
@@ -4806,6 +4767,7 @@ class TableBuilderDataSource extends MatTableDataSource {
4806
4767
  }
4807
4768
  return ({ start: virtualEnds.start, end: virtualEnds.end });
4808
4769
  });
4770
+ this.$dataSize = $dataSize;
4809
4771
  }
4810
4772
  connect() {
4811
4773
  return super.connect();
@@ -4841,13 +4803,13 @@ function mergeCustomCellMetaData(metaData1, metaData2) {
4841
4803
  class GroupByListComponent {
4842
4804
  tableStore = inject(TableStore);
4843
4805
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: GroupByListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4844
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: GroupByListComponent, isStandalone: true, selector: "group-by-list", ngImport: i0, template: "<span class=\"tb-group-label\">Group By:</span>\r\n<mat-chip-set>\r\n @for (groupByKey of tableStore.$groupByKeys(); track groupByKey)\r\n {\r\n @if($index > 0)\r\n {\r\n <mat-icon class=\"nested-arrow\">arrow_right</mat-icon>\r\n }\r\n <mat-chip (removed)=\"tableStore.removeGroupByKey(groupByKey)\">\r\n {{groupByKey | spaceCase}}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip>\r\n }\r\n</mat-chip-set>\r\n", styles: [".tb-group-label{font-weight:bolder;padding-right:15px}:host{display:flex;padding-left:8px;align-items:center}:host mat-chip-set mat-chip{margin:0}:host mat-chip-set .nested-arrow{display:flex;width:15px;justify-content:center}\n"], dependencies: [{ kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: i4$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i4$2.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4806
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: GroupByListComponent, isStandalone: true, selector: "group-by-list", ngImport: i0, template: "<mat-chip-set>\r\n <span class=\"tb-group-label\">Group By:</span>\r\n @for (groupByKey of tableStore.$groupByKeys(); track groupByKey) {\r\n @if($index > 0){\r\n <mat-icon class=\"nested-arrow\">arrow_right</mat-icon>\r\n }\r\n <mat-chip (removed)=\"tableStore.removeGroupByKey(groupByKey)\">\r\n {{groupByKey | spaceCase}}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip>\r\n }\r\n</mat-chip-set>\r\n", styles: [".tb-group-label{padding-right:5px}.nested-arrow{margin-right:-8px;margin-left:-8px}\n"], dependencies: [{ kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4$2.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "directive", type: i4$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i4$2.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4845
4807
  }
4846
4808
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: GroupByListComponent, decorators: [{
4847
4809
  type: Component,
4848
4810
  args: [{ selector: 'group-by-list', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
4849
4811
  MatChipsModule, MatIconModule, SpaceCasePipe
4850
- ], template: "<span class=\"tb-group-label\">Group By:</span>\r\n<mat-chip-set>\r\n @for (groupByKey of tableStore.$groupByKeys(); track groupByKey)\r\n {\r\n @if($index > 0)\r\n {\r\n <mat-icon class=\"nested-arrow\">arrow_right</mat-icon>\r\n }\r\n <mat-chip (removed)=\"tableStore.removeGroupByKey(groupByKey)\">\r\n {{groupByKey | spaceCase}}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip>\r\n }\r\n</mat-chip-set>\r\n", styles: [".tb-group-label{font-weight:bolder;padding-right:15px}:host{display:flex;padding-left:8px;align-items:center}:host mat-chip-set mat-chip{margin:0}:host mat-chip-set .nested-arrow{display:flex;width:15px;justify-content:center}\n"] }]
4812
+ ], template: "<mat-chip-set>\r\n <span class=\"tb-group-label\">Group By:</span>\r\n @for (groupByKey of tableStore.$groupByKeys(); track groupByKey) {\r\n @if($index > 0){\r\n <mat-icon class=\"nested-arrow\">arrow_right</mat-icon>\r\n }\r\n <mat-chip (removed)=\"tableStore.removeGroupByKey(groupByKey)\">\r\n {{groupByKey | spaceCase}}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </mat-chip>\r\n }\r\n</mat-chip-set>\r\n", styles: [".tb-group-label{padding-right:5px}.nested-arrow{margin-right:-8px;margin-left:-8px}\n"] }]
4851
4813
  }] });
4852
4814
 
4853
4815
  class ProfilesMenuComponent {
@@ -5031,7 +4993,7 @@ class ResetMenuComponent {
5031
4993
  $widthsSet = computed(() => Object.keys(this.state.$getUserDefinedWidths()).length);
5032
4994
  $rowHeightSet = this.state.$userDefinedRowHeight;
5033
4995
  headerHeightSet = this.state.$userDefinedHeaderHeight;
5034
- pageSizeSet = computed(() => this.state.$userDefinedPageSize() && this.state.$userDefinedPageSize() !== this.state.selectSignal(s => s.pageSize)());
4996
+ pageSizeSet = this.state.$userDefinedPageSize;
5035
4997
  showAllSet = this.state.selectSignal(s => s.userDefined.showAll);
5036
4998
  $set = computed(() => {
5037
4999
  const arr = [];
@@ -5108,120 +5070,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
5108
5070
  }] });
5109
5071
 
5110
5072
  class TableVirtualScrollStrategy {
5111
- constructor(scrollContainer, dataStore) {
5112
- this.$rowHeight = scrollContainer.computedRowHeight;
5113
- this.$headerHeight = scrollContainer.computedHeaderHeight;
5114
- this.viewport = scrollContainer.viewport;
5115
- this.dataStore = dataStore;
5116
- this.$dataLength = scrollContainer.$dataLength;
5117
- }
5118
- dataStore;
5073
+ scrolledIndexChange;
5074
+ dataLength = 0;
5119
5075
  indexChange = new Subject();
5120
- scrolledIndexChange = this.indexChange.pipe(distinctUntilChanged());
5121
5076
  viewport;
5122
- $dataLength;
5123
- $dataLengthChange = linkedSignal({
5124
- source: () => this.$dataLength(),
5125
- computation: (curr, previous) => ({ curr, previous: previous == undefined ? curr : previous.source })
5126
- });
5127
5077
  $rowHeight;
5128
5078
  $rowHeightChange = linkedSignal({
5129
5079
  source: () => this.$rowHeight(),
5130
- computation: (curr, previous) => {
5131
- return ({ curr, previous: previous == undefined ? curr : previous.source });
5132
- }
5080
+ computation: (curr, previous) => ({ curr, previous: previous?.source || curr })
5133
5081
  });
5134
5082
  $headerHeight;
5135
- $headerHeightChange = linkedSignal({
5136
- source: () => this.$headerHeight(),
5137
- computation: (curr, previous) => ({ curr, previous: previous == undefined ? curr : previous.source })
5138
- });
5083
+ constructor(scrollContainer) {
5084
+ this.scrolledIndexChange = this.indexChange.pipe(distinctUntilChanged());
5085
+ this.$rowHeight = scrollContainer.computedRowHeight;
5086
+ this.$headerHeight = scrollContainer.computedHeaderHeight;
5087
+ }
5088
+ attach(viewport) {
5089
+ this.viewport = viewport;
5090
+ this.onDataLengthChanged();
5091
+ }
5139
5092
  contentScrolled$ = new Subject();
5140
- sub = subscriber(this.contentScrolled$.pipe(debounceTime(20), distinctUntilChanged()), offset => {
5093
+ sub = subscriber(this.contentScrolled$.pipe(observeOn(animationFrameScheduler), debounceTime(20)), () => {
5141
5094
  this.updateContent('scroll');
5142
5095
  });
5143
5096
  onContentScrolled() {
5144
- this.contentScrolled$.next(this.viewport().measureScrollOffset());
5097
+ this.contentScrolled$.next();
5098
+ }
5099
+ onDataLengthChanged() {
5100
+ }
5101
+ setDataLength(length) {
5102
+ this.dataLength = length;
5103
+ if (this.viewport && this.$rowHeight) {
5104
+ this.viewport.setTotalContentSize(this.dataLength * this.$rowHeight());
5105
+ // this.updateContent('data ' + dataTrigger);
5106
+ }
5107
+ this.updateContent('data ');
5108
+ }
5109
+ detach() { }
5110
+ onContentRendered() { }
5111
+ onRenderedOffsetChanged() {
5112
+ }
5113
+ scrollToIndex(index, behavior) {
5145
5114
  }
5146
- #onDataLengthChange = effect(() => {
5147
- const dataLengthChange = this.$dataLengthChange();
5148
- untracked(() => {
5149
- if (dataLengthChange.curr === dataLengthChange.previous)
5150
- return;
5151
- this.updateContent('data length');
5152
- });
5153
- });
5154
5115
  #onHeaderChange = effect(() => {
5155
- const headerHeightChange = this.$headerHeightChange();
5156
- untracked(() => {
5157
- if (headerHeightChange.curr === headerHeightChange.previous)
5158
- return;
5159
- this.updateContent('header height');
5160
- });
5116
+ this.$headerHeight && this.$headerHeight();
5117
+ this.updateContent('header height');
5161
5118
  });
5162
5119
  #onRowChange = effect(() => {
5163
- const rowHeightChange = this.$rowHeightChange();
5164
- untracked(() => {
5165
- if (rowHeightChange.curr === rowHeightChange.previous)
5166
- return;
5167
- this.updateContent('row height');
5168
- });
5120
+ this.$rowHeight && this.$rowHeight();
5121
+ this.updateContent('row height');
5169
5122
  });
5170
- $currentRange = signal({ start: 0, end: 0 });
5171
5123
  updateContent(trigger) {
5172
- const viewport = this.viewport && this.viewport();
5173
- if (!viewport || !this.$rowHeight) {
5124
+ if (!this.viewport || !this.$rowHeight) {
5174
5125
  return;
5175
5126
  }
5176
- const currentContentHeight = +viewport._totalContentHeight.replace('px', '');
5177
- const newContentHeight = this.$dataLength() * this.$rowHeight();
5127
+ const currentContentHeight = +this.viewport._totalContentHeight.replace('px', '');
5128
+ const newContentHeight = this.dataLength * this.$rowHeight();
5178
5129
  if (currentContentHeight !== newContentHeight) {
5179
- viewport.setTotalContentSize(newContentHeight);
5180
- this.update(trigger, viewport, true);
5130
+ this.viewport.setTotalContentSize(newContentHeight);
5131
+ setTimeout(() => {
5132
+ this.update(trigger);
5133
+ }, 0);
5181
5134
  return;
5182
5135
  }
5183
- this.update(trigger, viewport);
5136
+ this.update(trigger);
5184
5137
  }
5185
- update(trigger, viewport, needsScroll = false) {
5186
- if (!viewport.getViewportSize())
5138
+ update(trigger) {
5139
+ if (!this.viewport || !this.$rowHeight) {
5187
5140
  return;
5141
+ }
5188
5142
  const rowHeightChangeEvent = this.$rowHeightChange();
5189
5143
  const rowHeight = rowHeightChangeEvent.curr;
5190
5144
  const rowHeightAdjustment = trigger === 'row height' ? rowHeightChangeEvent.curr / rowHeightChangeEvent.previous : 1;
5191
- const amountOfRows = Math.ceil((viewport.getViewportSize() - this.$headerHeight()) / rowHeight);
5192
- const f = viewport.measureScrollOffset();
5193
- const offset = viewport.measureScrollOffset() * rowHeightAdjustment;
5194
- const buffer = 35 + Math.round((40 - rowHeight) / 10);
5145
+ const amountOfRows = Math.ceil((this.viewport.getViewportSize() - this.$headerHeight()) / rowHeight);
5146
+ const f = this.viewport.measureScrollOffset();
5147
+ const offset = this.viewport.measureScrollOffset() * rowHeightAdjustment;
5148
+ if (offset !== f) {
5149
+ this.viewport.scrollToOffset(offset);
5150
+ }
5151
+ const buffer = 35;
5195
5152
  const skip = Math.round(offset / rowHeight);
5196
5153
  const index = skip % 2 === 0 ? skip : skip - 1;
5197
5154
  const start = Math.max(0, index - buffer);
5198
- const end = Math.min(this.$dataLength(), index + amountOfRows + buffer);
5199
- if (start > this.$dataLength()) {
5200
- this.viewport().scrollToOffset(0);
5201
- }
5202
- else if (f !== offset) {
5203
- if (offset < f)
5204
- viewport.scrollToOffset(offset);
5205
- else
5206
- setTimeout(() => {
5207
- viewport.scrollToOffset(offset);
5208
- }, 0);
5209
- }
5210
- if (this.$currentRange().start === start && this.$currentRange().end === end) {
5211
- return;
5212
- }
5213
- this.$currentRange.set({ start, end });
5214
- viewport.setRenderedContentOffset(rowHeight * start);
5215
- this.dataStore.patchState({ virtualScrollOffset: offset });
5216
- viewport.setRenderedRange({ start, end });
5155
+ const end = Math.min(this.dataLength, index + amountOfRows + buffer);
5156
+ this.viewport.setRenderedContentOffset(rowHeight * start);
5157
+ this.viewport.setRenderedRange({ start, end });
5217
5158
  this.indexChange.next(index);
5218
5159
  }
5219
- attach(viewport) { }
5220
- onDataLengthChanged() { }
5221
- detach() { }
5222
- onContentRendered() { }
5223
- onRenderedOffsetChanged() { }
5224
- scrollToIndex(index, behavior) { }
5225
5160
  }
5226
5161
 
5227
5162
  class VirtualScrollContainer {
@@ -5239,13 +5174,7 @@ class VirtualScrollContainer {
5239
5174
  viewPort$ = toObservable(this.viewport).pipe(notNull());
5240
5175
  $scrolledIndexChange = toSignal(this.viewPort$.pipe(switchMap$1(v => v.scrolledIndexChange)));
5241
5176
  $renderedRange = toSignal(this.viewPort$.pipe(switchMap$1(v => v.renderedRangeStream)));
5242
- $virtualScrollOptions = computed(() => {
5243
- if (this.state.$initializationState() >= InitializationState.Ready)
5244
- return this.state.$tableSettings().virtualSettings;
5245
- else
5246
- return undefined;
5247
- });
5248
- $optionsSet = computed(() => !!this.$virtualScrollOptions());
5177
+ $virtualScrollOptions = computed(() => this.state.$tableSettings().virtualSettings);
5249
5178
  $dataLength = computed(() => {
5250
5179
  const paginated = this.$usePaginator() && !this.$showAll();
5251
5180
  const pageSize = this.$pageSize();
@@ -5258,41 +5187,58 @@ class VirtualScrollContainer {
5258
5187
  constructor() {
5259
5188
  addEventListener('resize', this.resizeHandler);
5260
5189
  }
5261
- #setViewportEffect = effect(() => {
5190
+ setViewportEffect = effect(() => {
5262
5191
  const viewport = this.viewport();
5263
- const options = this.$optionsSet();
5264
5192
  untracked(() => {
5265
- if (!!viewport && !!options) {
5266
- this.setSize(this.viewport().elementRef, 'initial');
5193
+ if (!!viewport) {
5194
+ this.setSize(this.viewport().elementRef);
5267
5195
  }
5268
5196
  ;
5269
5197
  });
5270
5198
  });
5199
+ subscriber = subscriber();
5271
5200
  #onRenderedRangeEffect = effect(() => {
5272
5201
  const renderedRange = this.$renderedRange();
5273
- const viewport = this.viewport();
5274
5202
  if (!renderedRange)
5275
5203
  return;
5276
5204
  untracked(() => {
5277
5205
  this.dataStore.patchState({
5278
5206
  virtualEnds: {
5279
5207
  start: renderedRange.start,
5280
- end: renderedRange.end,
5208
+ end: renderedRange.end + 25,
5281
5209
  }
5282
5210
  });
5283
- if (!viewport)
5284
- return;
5285
- this.setSize(viewport.elementRef, 'rendered range');
5211
+ this.setSize(this.viewport().elementRef);
5286
5212
  });
5287
5213
  });
5214
+ #onDataLengthEffect = effect(() => {
5215
+ const dataLength = this.$dataLength();
5216
+ untracked(() => {
5217
+ const renderedRange = this.$renderedRange();
5218
+ this.scrollStrategy.setDataLength(dataLength);
5219
+ if ((renderedRange?.start || 0) > dataLength) {
5220
+ this.viewport().scrollToOffset(0);
5221
+ }
5222
+ });
5223
+ });
5224
+ #onOffsetEffect = effect(() => {
5225
+ const offset = this.$offset();
5226
+ untracked(() => {
5227
+ this.dataStore.patchState({ virtualScrollOffset: offset });
5228
+ });
5229
+ });
5230
+ $offset = computed(() => {
5231
+ const viewport = this.viewport();
5232
+ const scrolledIndexChange = this.$scrolledIndexChange();
5233
+ if (!scrolledIndexChange || !viewport)
5234
+ return 0;
5235
+ return viewport.getOffsetToRenderedContentStart() ?? 0;
5236
+ });
5288
5237
  ngOnDestroy() {
5289
5238
  removeEventListener('resize', this.resizeHandler);
5290
5239
  }
5291
- setSize(el, trigger) {
5292
- console.log(trigger);
5240
+ setSize(el) {
5293
5241
  const virtualScrollOptions = this.$virtualScrollOptions();
5294
- if (!virtualScrollOptions)
5295
- return;
5296
5242
  if (virtualScrollOptions.dynamicHeight) {
5297
5243
  this.calcDynamic(el);
5298
5244
  return;
@@ -5309,10 +5255,18 @@ class VirtualScrollContainer {
5309
5255
  height = maxViewPortHeightPx;
5310
5256
  this.setHeight(height, el);
5311
5257
  }
5258
+ calcDynamic$ = new Subject();
5259
+ $calcDynamic = toSignal(this.calcDynamic$.pipe(debounceTime$1(300)));
5260
+ #onCalcDynamicEffect = effect(() => {
5261
+ const el = this.$calcDynamic();
5262
+ if (!el)
5263
+ return;
5264
+ untracked(() => {
5265
+ this.calcDynamic(el);
5266
+ });
5267
+ });
5312
5268
  calcDynamic(el) {
5313
5269
  const virtualScrollOptions = this.$virtualScrollOptions();
5314
- if (!virtualScrollOptions)
5315
- return;
5316
5270
  const t = this.tableContainer.elementRef.nativeElement.querySelector(`#${TableContainerComponent.headerId}`);
5317
5271
  const rect = t?.getBoundingClientRect();
5318
5272
  const windowHeight = window.innerHeight;
@@ -5347,8 +5301,8 @@ class VirtualScrollContainer {
5347
5301
  this.dataStore.patchState({ virtualScrollOffset });
5348
5302
  }
5349
5303
  resizeHandler = () => {
5350
- if (this.viewport() && this.$virtualScrollOptions()?.dynamicHeight) {
5351
- this.setSize(this.viewport().elementRef, 'resize');
5304
+ if (this.viewport() && this.$virtualScrollOptions().dynamicHeight) {
5305
+ this.setSize(this.viewport().elementRef);
5352
5306
  }
5353
5307
  };
5354
5308
  computedRowHeight = computed(() => {
@@ -5372,7 +5326,7 @@ class VirtualScrollContainer {
5372
5326
  return 0;
5373
5327
  return parseTbSizeToPixels(virtualScrollOptions.dynamicalHeightBuffer) || 0;
5374
5328
  });
5375
- scrollStrategy = new TableVirtualScrollStrategy(this, this.dataStore);
5329
+ scrollStrategy = new TableVirtualScrollStrategy(this);
5376
5330
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: VirtualScrollContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
5377
5331
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.0.0", type: VirtualScrollContainer, isStandalone: true, selector: "tb-virtual-scroll-container", queries: [{ propertyName: "genericTable", first: true, predicate: GenericTableComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: `
5378
5332
  <cdk-virtual-scroll-viewport>
@@ -5428,27 +5382,35 @@ class TableContainerComponent {
5428
5382
  parent: this.injector
5429
5383
  });
5430
5384
  $tableBuilder = input.required({ alias: 'tableBuilder' });
5431
- $tableIdInput = input(undefined, { alias: 'tableId' });
5432
- $trackByInput = input(undefined, { alias: 'trackBy' });
5433
- $inputFilters = input([], { alias: 'inputFilters' });
5385
+ $tableId = input(undefined, { alias: 'tableId' });
5386
+ $trackBy = input(undefined, { alias: 'trackBy' });
5387
+ $inputFilters = model([], { alias: 'inputFilters' });
5434
5388
  predicateInputFilters$ = toObservable(computed(() => this.$inputFilters().filter(isFunction$1)));
5435
5389
  $filterInfoInputs = computed(() => this.$inputFilters().filter(i => !isFunction$1(i)));
5436
- $indexColumnInput = input(false, { alias: 'indexColumn' });
5437
- $selectionColumnInput = input(false, { alias: 'selectionColumn' });
5438
- $stickyHeaderInput = input(true, { alias: 'stickyHeader' });
5439
- $stickyFooterInput = input(false, { alias: 'stickyFooter' });
5390
+ $indexColumn = input(false, { alias: 'indexColumn' });
5391
+ $selectionColumn = input(false, { alias: 'selectionColumn' });
5392
+ $isSticky = input(true, { alias: 'isSticky' });
5393
+ $stickyFooter = input(false, { alias: 'stickyFooter' });
5440
5394
  $groupHeaderTemplate = input(undefined, { alias: 'groupHeaderTemplate' });
5441
5395
  $groupHeaderHeight = input(undefined, { alias: 'groupHeaderHeight' });
5442
5396
  $pageSize = input(undefined, { alias: 'pageSize' });
5397
+ $props = computed(() => {
5398
+ const indexColumn = this.$indexColumn();
5399
+ const selectionColumn = this.$selectionColumn();
5400
+ const isSticky = this.$isSticky();
5401
+ const stickyFooter = this.$stickyFooter();
5402
+ const groupHeaderTemplate = this.$groupHeaderTemplate();
5403
+ const groupHeaderHeight = this.$groupHeaderHeight();
5404
+ return ({ indexColumn, selectionColumn, isSticky, stickyFooter, groupHeaderTemplate, groupHeaderHeight });
5405
+ });
5443
5406
  selection$ = output({ alias: 'selection' });
5444
5407
  onStateReset$ = output({ alias: 'onStateReset' });
5445
5408
  onSaveState$ = output({ alias: 'onSaveState' });
5446
5409
  _state$ = toObservable(this.state.$savableState);
5447
5410
  state$ = outputFromObservable(this._state$, { alias: 'state' });
5448
- $data = computed(() => this.$sortedAndFilteredData()?.value || []);
5449
- _data$ = toObservable(this.$data);
5411
+ _data$ = new BehaviorSubject([]);
5450
5412
  data$ = outputFromObservable(this._data$, { alias: 'data' });
5451
- $displayData = computed(() => this.$tableBuilder() && this.$filteredSortedAndGrouped()?.displayData);
5413
+ $data = toSignal(this._data$, { initialValue: [] });
5452
5414
  clearSelections() {
5453
5415
  this.$genericTable()?.$selection().clear(true);
5454
5416
  }
@@ -5472,37 +5434,14 @@ class TableContainerComponent {
5472
5434
  $useVirtual = this.state.$isVirtual;
5473
5435
  $collapsedFooter = this.state.$footerCollapsed;
5474
5436
  $collapsedHeader = this.state.$headerCollapsed;
5475
- $displayDataLength = computed(() => this.$displayData()?.length || 0);
5476
- $tableBuilderSettings = computed(() => this.$tableBuilder().$settings());
5477
- $trackBy = computed(() => this.$trackByInput() || this.$tableBuilderSettings()?.tableSettings?.trackBy);
5478
- $tableId = computed(() => this.$tableIdInput() || this.$tableBuilderSettings()?.tableSettings?.tableId);
5479
- $includeSelectionColumn = computed(() => this.$selectionColumnInput() || !!this.$tableBuilderSettings()?.tableSettings?.includeSelectionColumn);
5480
- $includeIndexColumn = computed(() => this.$indexColumnInput() || !!this.$tableBuilderSettings()?.tableSettings?.includeIndexColumn);
5481
- $stickyHeader = computed(() => {
5482
- const settings = this.$tableBuilderSettings()?.columnHeaderSettings?.stickyHeaderRow;
5483
- if (settings != null) {
5484
- return settings;
5485
- }
5486
- return this.$stickyHeaderInput();
5487
- });
5488
- $stickyFooter = computed(() => this.$stickyFooterInput() || !!this.$tableBuilderSettings()?.columnFooterSettings?.stickyFooterRow);
5489
- $props = computed(() => {
5490
- const indexColumn = this.$includeIndexColumn();
5491
- const selectionColumn = this.$includeSelectionColumn();
5492
- const stickHeader = this.$stickyHeader();
5493
- const stickyFooter = this.$stickyFooter();
5494
- const groupHeaderTemplate = this.$groupHeaderTemplate();
5495
- const groupHeaderHeight = this.$groupHeaderHeight();
5496
- return ({ indexColumn, selectionColumn, isSticky: stickHeader, stickyFooter, groupHeaderTemplate, groupHeaderHeight });
5497
- });
5437
+ $displayDataLength = computed(() => this.$displayData().length);
5498
5438
  #initializeTableSettingsFromTableBuilderAndPersistedStateEffect = effect(() => {
5499
5439
  const metaLoaded = this.$isInitializationState(InitializationState.MetaDataLoaded)();
5500
5440
  if (!metaLoaded)
5501
5441
  return;
5502
5442
  const persistedState = this.$persistedState();
5503
- const tbSettings = this.$tableBuilderSettings();
5504
5443
  untracked(() => {
5505
- this.state.setTableSettings(tbSettings);
5444
+ this.state.setTableSettings(this.$tableBuilder().settings$);
5506
5445
  if (persistedState) {
5507
5446
  persistedState.persistedTableSettings = new PersistedTableSettings(persistedState.persistedTableSettings);
5508
5447
  this.state.updateStateFromPersistedState(persistedState);
@@ -5569,22 +5508,10 @@ class TableContainerComponent {
5569
5508
  });
5570
5509
  #initializeDataEffect = effect(() => {
5571
5510
  const tableBuilder = this.$tableBuilder();
5572
- const data = this.$sortedAndFilteredData();
5573
- if (!tableBuilder || !data)
5574
- return;
5575
- untracked(() => {
5576
- this.dataStore.patchState({ sortedFilteredDataLength: data.value.length });
5577
- });
5578
- });
5579
- #initializeDataEffect2 = effect(() => {
5580
- const tableBuilder = this.$tableBuilder();
5581
- const flat = this.$filteredSortedAndGrouped();
5582
- if (!tableBuilder || !flat)
5511
+ if (!tableBuilder)
5583
5512
  return;
5584
5513
  untracked(() => {
5585
- const data = flat.displayData;
5586
- this.dataSource.setData(data);
5587
- this.dataStore.patchState({ sortedFilteredGroupedDataLength: data.length });
5514
+ this.initializeData();
5588
5515
  });
5589
5516
  });
5590
5517
  $persistedState = computed(() => {
@@ -5600,7 +5527,12 @@ class TableContainerComponent {
5600
5527
  }
5601
5528
  return [...this.$filterDirectives(), ...this.$customFilterDirectives()];
5602
5529
  });
5603
- $tableBuilderMetaData = computed(() => this.$tableBuilder()?.$metaData());
5530
+ allNotSavableFilterDirectivesFilters$ = toObservable(this.$allFilterDirectives).pipe(filterArray(d => !d.savable), switchMap(d => {
5531
+ const a = d.map(d => d.filter$);
5532
+ return combineLatest(a).pipe(startWith([]));
5533
+ }), map(createFilterFuncs));
5534
+ tableBuilderMetaData$ = toObservable(this.$tableBuilder).pipe(notNull(), switchMap(tb => tb.metaData$));
5535
+ $tableBuilderMetaData = toSignal(this.tableBuilderMetaData$);
5604
5536
  $allMetaDatas = computed(() => {
5605
5537
  const tableBuilderMetaData = this.$tableBuilderMetaData();
5606
5538
  if (!tableBuilderMetaData)
@@ -5609,117 +5541,39 @@ class TableContainerComponent {
5609
5541
  const mappedCustomCellMetaDatas = customCellMetaDatas.map(md => mergeCustomCellMetaData(md, tableBuilderMetaData.find(item => item.key === md.key)));
5610
5542
  return [...tableBuilderMetaData, ...mappedCustomCellMetaDatas];
5611
5543
  });
5612
- ngOnInit() {
5613
- this.$tableBuilder().prep(this.injector);
5614
- }
5544
+ $displayData = signal([]);
5615
5545
  ngOnDestroy() {
5616
5546
  const tableId = this.$tableId();
5617
5547
  if (tableId) {
5618
5548
  this.stateService.saveTableStateToLocal({ tableId, tableState: this.state.$savableState() });
5619
5549
  }
5620
5550
  }
5621
- $preds = computed(() => {
5622
- const predicateInputFilters = this.$inputFilters().filter(isFunction$1);
5623
- const notSavableFilterDirectives = this.$allFilterDirectives()
5624
- .filter(d => !d.savable)
5625
- .map(d => d.$filter())
5626
- .filter(d => !!d && needsFilterCreation(d))
5627
- .map(d => createFilterFunc(d));
5628
- return [...predicateInputFilters, ...notSavableFilterDirectives];
5629
- });
5630
- $predicateFiltersState = linkedSignal({
5631
- source: this.$preds,
5632
- computation: (curr, previous) => {
5633
- if (!previous?.value)
5634
- return ({ value: updateFilterPredicateState({ allFilters: [] }, curr), timestamp: new Date().getTime() });
5635
- return ({ value: updateFilterPredicateState(previous.value.value, curr), timestamp: new Date().getTime() });
5636
- }
5637
- });
5638
- $savableFiltersState = linkedSignal({
5639
- source: this.state.$filters,
5640
- computation: (curr, previous) => {
5641
- if (!previous?.value)
5642
- return ({ value: updateFilterInfoState({ allFilters: {} }, curr), timestamp: new Date().getTime() });
5643
- return ({ value: updateFilterInfoState(previous.value.value, curr), timestamp: new Date().getTime() });
5644
- }
5645
- });
5646
- $allFilterStatesTimeStamped = computed(() => {
5647
- if (!this.$isInitializationState(InitializationState.Ready)())
5648
- return undefined;
5649
- return ({ value: updateFilterState(this.$savableFiltersState(), this.$predicateFiltersState()), timestamp: new Date().getTime() });
5650
- });
5651
- $sortStateTimeStamped = linkedSignal({
5652
- source: computed(() => this.$isInitializationState(InitializationState.Ready)() && this.state.$getSorts()),
5653
- computation: (curr, prev) => {
5654
- if (!curr)
5655
- return undefined;
5656
- if (!prev?.value)
5657
- return ({ value: updateSortState(initialSortState, curr), timestamp: new Date().getTime() });
5658
- return ({ value: updateSortState(prev.value.value, curr), timestamp: new Date().getTime() });
5659
- }
5660
- });
5661
- $allData = computed(() => this.$tableBuilder()?.$data() || []);
5662
- $allDataTimeStamped = computed(() => {
5663
- const data = this.$allData();
5664
- if (!data)
5665
- return undefined;
5666
- return ({
5667
- value: data,
5668
- timestamp: new Date().getTime()
5669
- });
5670
- });
5671
- $allTimeStamped = computed(() => {
5672
- const data = this.$allDataTimeStamped();
5673
- const sort = this.$sortStateTimeStamped();
5674
- const filter = this.$allFilterStatesTimeStamped();
5675
- if (!data?.value || !sort?.value || !filter?.value)
5676
- return undefined;
5677
- return ({
5678
- data,
5679
- sort,
5680
- filter
5551
+ initializeData() {
5552
+ const predicateFilters$ = combineLatest([this.predicateInputFilters$.pipe(), this.allNotSavableFilterDirectivesFilters$])
5553
+ .pipe(map(([a, b]) => [...a, ...b]));
5554
+ const filters$ = combineLatest([
5555
+ this.state.filters$.pipe(scan$1(updateFilterInfoState, { allFilters: {} }), timestamp$1()),
5556
+ predicateFilters$.pipe(scan$1(updateFilterPredicateState, { allFilters: [] }), timestamp$1())
5557
+ ])
5558
+ .pipe(map(([filterInfo, pred]) => updateFilterState(filterInfo, pred)));
5559
+ const sortsState$ = this.state.sort$.pipe(scan$1(updateSortState, initialSortState));
5560
+ const sortedAndFilteredData$ = sortAndFilterData(this.$tableBuilder().getData$(), sortsState$, filters$);
5561
+ const flatGrouped$ = combineLatest([sortedAndFilteredData$.pipe(timestamp$1()), this.state.groupByKeys$.pipe(timestamp$1()), this.state.expandedGroups$.pipe(timestamp$1())]).pipe(scan$1(updateGroupByState, initialGroupByState), map(({ displayData }) => displayData), defaultShareReplay());
5562
+ this.state.on(sortedAndFilteredData$, (data) => {
5563
+ this._data$.next(data);
5564
+ this.dataStore.patchState({ sortedFilteredDataLength: data.length });
5681
5565
  });
5682
- });
5683
- $sortedAndFilteredData = linkedSignal({
5684
- source: this.$allTimeStamped,
5685
- computation: (values, prev) => {
5686
- const init = this.$isInitializationState(InitializationState.Ready);
5687
- if (!values || !init)
5688
- return undefined;
5689
- const { data, filter, sort } = values;
5690
- const val = prev?.value?.value || data.value;
5691
- const filteredData = sortAndFilterData(data, filter, sort, !prev?.value, val);
5692
- return ({ value: filteredData, timestamp: new Date().getTime() });
5693
- }
5694
- });
5695
- $timestampedGroups = computed(() => ({ value: this.state.$groupByKeys(), timestamp: new Date().getTime() }));
5696
- $timestampedExpanded = computed(() => ({ value: this.state.$expandGroups(), timestamp: new Date().getTime() }));
5697
- $dataAndGroupsTimestamped = computed(() => {
5698
- const data = this.$sortedAndFilteredData();
5699
- const groups = this.$timestampedGroups();
5700
- const expanded = this.$timestampedExpanded();
5701
- if (!data)
5702
- return undefined;
5703
- return ({
5704
- data,
5705
- groups,
5706
- expanded
5566
+ this.state.on(flatGrouped$, (data) => {
5567
+ this.dataSource.setData(data);
5568
+ this.$displayData.set(data);
5569
+ this.dataStore.patchState({ sortedFilteredGroupedDataLength: data.length });
5707
5570
  });
5708
- });
5709
- $filteredSortedAndGrouped = linkedSignal({
5710
- source: this.$dataAndGroupsTimestamped,
5711
- computation: (curr, prev) => {
5712
- if (!curr)
5713
- return undefined;
5714
- const val = prev?.value?.groupedData || [];
5715
- return updateGroupByState(val, curr, !prev?.value);
5716
- }
5717
- });
5571
+ }
5718
5572
  $isInitializationState = (state) => computed(() => this.state.selectSignal(s => s.initializationState >= state)());
5719
5573
  static headerId = 'tb-header-wrapper';
5720
5574
  headerId = TableContainerComponent.headerId;
5721
5575
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TableContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5722
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: TableContainerComponent, isStandalone: true, selector: "tb-table-container", inputs: { $tableBuilder: { classPropertyName: "$tableBuilder", publicName: "tableBuilder", isSignal: true, isRequired: true, transformFunction: null }, $tableIdInput: { classPropertyName: "$tableIdInput", publicName: "tableId", isSignal: true, isRequired: false, transformFunction: null }, $trackByInput: { classPropertyName: "$trackByInput", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, $inputFilters: { classPropertyName: "$inputFilters", publicName: "inputFilters", isSignal: true, isRequired: false, transformFunction: null }, $indexColumnInput: { classPropertyName: "$indexColumnInput", publicName: "indexColumn", isSignal: true, isRequired: false, transformFunction: null }, $selectionColumnInput: { classPropertyName: "$selectionColumnInput", publicName: "selectionColumn", isSignal: true, isRequired: false, transformFunction: null }, $stickyHeaderInput: { classPropertyName: "$stickyHeaderInput", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, $stickyFooterInput: { classPropertyName: "$stickyFooterInput", publicName: "stickyFooter", isSignal: true, isRequired: false, transformFunction: null }, $groupHeaderTemplate: { classPropertyName: "$groupHeaderTemplate", publicName: "groupHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, $groupHeaderHeight: { classPropertyName: "$groupHeaderHeight", publicName: "groupHeaderHeight", isSignal: true, isRequired: false, transformFunction: null }, $pageSize: { classPropertyName: "$pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection$: "selection", onStateReset$: "onStateReset", onSaveState$: "onSaveState", state$: "state", data$: "data" }, providers: [TableStore, ExportToCsvService, WrapperFilterStore, DataStore], queries: [{ propertyName: "$filterDirectives", predicate: TableFilterDirective, descendants: true, isSignal: true }, { propertyName: "$customFilterDirectives", predicate: TableCustomFilterDirective, descendants: true, isSignal: true }, { propertyName: "_$customRows", predicate: (MatRowDef), isSignal: true }, { propertyName: "$customCells", predicate: CustomCellDirective, isSignal: true }], viewQueries: [{ propertyName: "$paginatorComponent", first: true, predicate: PaginatorComponent, descendants: true, isSignal: true }, { propertyName: "$genericTable", first: true, predicate: GenericTableComponent, descendants: true, isSignal: true }, { propertyName: "$menu", first: true, predicate: MatMenu, descendants: true, isSignal: true }], ngImport: i0, template: "@let tableId = $tableId();\r\n@let tableSettings = state.$tableSettings();\r\n\r\n<ng-content select=\"[before]\" />\r\n<ng-container multiSort>\r\n <div class=\"tb-header-wrapper\" [id]=\"headerId\">\r\n <div class=\"title\">\r\n @if ((!$collapsedHeader()) || tableSettings.showTitleWhenHeaderCollapsed)\r\n {\r\n <ng-content select=\".tb-header-title\"/>\r\n }\r\n </div>\r\n @if(state.$groupByKeys().length){\r\n <group-by-list />\r\n }\r\n <div class=\"flx-row-end\">\r\n <lib-filter-list />\r\n @if (!tableSettings.hideHeader) {\r\n @if (!$collapsedHeader()) {\r\n <ng-container *ngTemplateOutlet=\"headerMenu\"/>\r\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"l.menu()\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n\r\n <lib-table-header-menu #l/>\r\n\r\n }\r\n @else {\r\n <mat-icon color=\"primary\" [matMenuTriggerFor]=\"mainMenu\" class=\"flat-menu-button pointer\">more_horiz</mat-icon>\r\n <mat-menu #mainMenu='matMenu'>\r\n <div class=\"flex-column\">\r\n <ng-container *ngTemplateOutlet=\"headerMenu; injector menuInjector\"/>\r\n </div>\r\n <lib-table-header-menu />\r\n </mat-menu>\r\n }\r\n <mat-icon [matTooltip]=\"$collapsedHeader() ? 'expand' : 'collapse'\" class=\"collapse-icon header\"\r\n (click)=\"state.toggleCollapseHeader()\">\r\n {{$collapsedHeader() ? 'expand_less' : 'expand_more'}}\r\n </mat-icon>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n @if($useVirtual())\r\n {\r\n <tb-virtual-scroll-container class=\"scrollable\">\r\n <tb-generic-table [rows]=\"$customRows()\" [data]=\"$data()!\" [displayDataLength]=\"$displayDataLength()\"\r\n (selection)='selection$.emit($event)' [columnInfos]='$myColumns()' [trackBy]=\"$trackBy()\" [dataSource]=\"dataSource\" />\r\n </tb-virtual-scroll-container>\r\n }\r\n @else\r\n {\r\n <tb-generic-table [rows]=\"$customRows()\" [data]=\"$data()!\" [displayDataLength]=\"$displayDataLength()\"\r\n (selection)='selection$.emit($event)' [columnInfos]='$myColumns()' [trackBy]=\"$trackBy()\" [dataSource]=\"dataSource\" />\r\n }\r\n @if(tableSettings.usePaginator)\r\n {\r\n <div class=\"paginator\">\r\n <tb-paginator #tbPaginator />\r\n\r\n <mat-icon [matTooltip]=\"$collapsedFooter() ? 'expand' : 'collapse'\" class=\"collapse-icon footer\"\r\n (click)=\"state.toggleCollapseFooter()\">\r\n {{$collapsedFooter() ? 'expand_more' : 'expand_less'}}\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <ng-template #headerMenu>\r\n @if (!tableSettings.hideFilter) {<tb-filter-displayer/>}\r\n @if (!tableSettings.hideColumnSettings) {<tb-col-displayer/>}\r\n @if (!tableSettings.hideSort) {<tb-sort-menu/>}\r\n @if (!!tableId) {<tb-profiles-menu [tableId]=\"tableId\"/>}\r\n </ng-template>\r\n\r\n</ng-container>\r\n", styles: [".tb-header-wrapper{display:flex;flex-direction:row;width:100%}.flx-row-end{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;margin-left:auto}.flat-menu{line-height:initial;height:initial}.pointer{cursor:pointer}.add-key{width:90%}.paginator{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;background-color:#fff;bottom:0;position:sticky;border-top:.5px solid rgba(0,0,0,.12)}.profiles-menu{visibility:hidden;width:0px;height:0px;display:block;overflow:hidden;position:absolute;top:50px}\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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PaginatorComponent, selector: "tb-paginator" }, { kind: "directive", type: MultiSortDirective, selector: "[multiSort]", inputs: ["matSortDisabled"], exportAs: ["multiSort"] }, { kind: "component", type: GroupByListComponent, selector: "group-by-list" }, { kind: "component", type: FilterChipsComponent, selector: "lib-filter-list" }, { kind: "component", type: GenFilterDisplayerComponent, selector: "tb-filter-displayer" }, { kind: "component", type: GenColDisplayerComponent, selector: "tb-col-displayer" }, { kind: "component", type: SortMenuComponent, selector: "tb-sort-menu" }, { kind: "component", type: GenericTableComponent, selector: "tb-generic-table", inputs: ["displayDataLength", "data", "rows", "columnInfos", "dataSource", "trackBy"], outputs: ["selection"] }, { kind: "component", type: ProfilesMenuComponent, selector: "tb-profiles-menu", inputs: ["tableId", "isMatMenuChild"] }, { kind: "component", type: TableHeaderMenuComponent, selector: "lib-table-header-menu" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i1$4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: VirtualScrollContainer, selector: "tb-virtual-scroll-container" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5576
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: TableContainerComponent, isStandalone: true, selector: "tb-table-container", inputs: { $tableBuilder: { classPropertyName: "$tableBuilder", publicName: "tableBuilder", isSignal: true, isRequired: true, transformFunction: null }, $tableId: { classPropertyName: "$tableId", publicName: "tableId", isSignal: true, isRequired: false, transformFunction: null }, $trackBy: { classPropertyName: "$trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, $inputFilters: { classPropertyName: "$inputFilters", publicName: "inputFilters", isSignal: true, isRequired: false, transformFunction: null }, $indexColumn: { classPropertyName: "$indexColumn", publicName: "indexColumn", isSignal: true, isRequired: false, transformFunction: null }, $selectionColumn: { classPropertyName: "$selectionColumn", publicName: "selectionColumn", isSignal: true, isRequired: false, transformFunction: null }, $isSticky: { classPropertyName: "$isSticky", publicName: "isSticky", isSignal: true, isRequired: false, transformFunction: null }, $stickyFooter: { classPropertyName: "$stickyFooter", publicName: "stickyFooter", isSignal: true, isRequired: false, transformFunction: null }, $groupHeaderTemplate: { classPropertyName: "$groupHeaderTemplate", publicName: "groupHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, $groupHeaderHeight: { classPropertyName: "$groupHeaderHeight", publicName: "groupHeaderHeight", isSignal: true, isRequired: false, transformFunction: null }, $pageSize: { classPropertyName: "$pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { $inputFilters: "inputFiltersChange", selection$: "selection", onStateReset$: "onStateReset", onSaveState$: "onSaveState", state$: "state", data$: "data" }, providers: [TableStore, ExportToCsvService, WrapperFilterStore, DataStore], queries: [{ propertyName: "$filterDirectives", predicate: TableFilterDirective, descendants: true, isSignal: true }, { propertyName: "$customFilterDirectives", predicate: TableCustomFilterDirective, descendants: true, isSignal: true }, { propertyName: "_$customRows", predicate: (MatRowDef), isSignal: true }, { propertyName: "$customCells", predicate: CustomCellDirective, isSignal: true }], viewQueries: [{ propertyName: "$paginatorComponent", first: true, predicate: PaginatorComponent, descendants: true, isSignal: true }, { propertyName: "$genericTable", first: true, predicate: GenericTableComponent, descendants: true, isSignal: true }, { propertyName: "$menu", first: true, predicate: MatMenu, descendants: true, isSignal: true }], ngImport: i0, template: "@let tableId = $tableId();\r\n@let tableSettings = state.$tableSettings();\r\n\r\n<ng-content select=\"[before]\" />\r\n<ng-container multiSort>\r\n <div class=\"tb-header-wrapper\" [id]=\"headerId\">\r\n <div class=\"title\">\r\n @if ((!$collapsedHeader()) || tableSettings.showTitleWhenHeaderCollapsed) {\r\n <ng-content select=\".tb-header-title\"/>\r\n }\r\n @if(state.$groupByKeys().length){\r\n <group-by-list />\r\n }\r\n </div>\r\n <div class=\"flx-row-end\">\r\n <lib-filter-list />\r\n @if (!tableSettings.hideHeader) {\r\n @if (!$collapsedHeader()) {\r\n <ng-container *ngTemplateOutlet=\"headerMenu\"/>\r\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"l.menu()\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n\r\n <lib-table-header-menu #l/>\r\n\r\n }\r\n @else {\r\n <mat-icon color=\"primary\" [matMenuTriggerFor]=\"mainMenu\" class=\"flat-menu-button pointer\">more_horiz</mat-icon>\r\n <mat-menu #mainMenu='matMenu'>\r\n <div class=\"flex-column\">\r\n <ng-container *ngTemplateOutlet=\"headerMenu; injector menuInjector\"/>\r\n </div>\r\n <lib-table-header-menu />\r\n </mat-menu>\r\n }\r\n <mat-icon [matTooltip]=\"$collapsedHeader() ? 'expand' : 'collapse'\" class=\"collapse-icon header\"\r\n (click)=\"state.toggleCollapseHeader()\">\r\n {{$collapsedHeader() ? 'expand_less' : 'expand_more'}}\r\n </mat-icon>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n @if($useVirtual())\r\n {\r\n <tb-virtual-scroll-container class=\"scrollable\">\r\n <tb-generic-table [rows]=\"$customRows()\" [data]=\"$data()!\" [displayDataLength]=\"$displayDataLength()\"\r\n (selection)='selection$.emit($event)' [columnInfos]='$myColumns()' [trackBy]=\"$trackBy()\" [dataSource]=\"dataSource\" />\r\n </tb-virtual-scroll-container>\r\n }\r\n @else\r\n {\r\n <tb-generic-table [rows]=\"$customRows()\" [data]=\"$data()!\" [displayDataLength]=\"$displayDataLength()\"\r\n (selection)='selection$.emit($event)' [columnInfos]='$myColumns()' [trackBy]=\"$trackBy()\" [dataSource]=\"dataSource\" />\r\n }\r\n @if(tableSettings.usePaginator)\r\n {\r\n <div class=\"paginator\">\r\n <tb-paginator #tbPaginator />\r\n\r\n <mat-icon [matTooltip]=\"$collapsedFooter() ? 'expand' : 'collapse'\" class=\"collapse-icon footer\"\r\n (click)=\"state.toggleCollapseFooter()\">\r\n {{$collapsedFooter() ? 'expand_more' : 'expand_less'}}\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <ng-template #headerMenu>\r\n @if (!tableSettings.hideFilter) {<tb-filter-displayer/>}\r\n @if (!tableSettings.hideColumnSettings) {<tb-col-displayer/>}\r\n @if (!tableSettings.hideSort) {<tb-sort-menu/>}\r\n @if (!!tableId) {<tb-profiles-menu [tableId]=\"tableId\"/>}\r\n </ng-template>\r\n\r\n</ng-container>\r\n", styles: [".tb-header-wrapper{display:flex;flex-direction:row;justify-content:space-between;width:100%}.flx-row-end{display:flex;flex-direction:row;justify-content:flex-end;align-items:center}.flat-menu{line-height:initial;height:initial}.pointer{cursor:pointer}.add-key{width:90%}.paginator{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;background-color:#fff;bottom:0;position:sticky;border-top:.5px solid rgba(0,0,0,.12)}.profiles-menu{visibility:hidden;width:0px;height:0px;display:block;overflow:hidden;position:absolute;top:50px}\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: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PaginatorComponent, selector: "tb-paginator" }, { kind: "directive", type: MultiSortDirective, selector: "[multiSort]", inputs: ["matSortDisabled"], exportAs: ["multiSort"] }, { kind: "component", type: GroupByListComponent, selector: "group-by-list" }, { kind: "component", type: FilterChipsComponent, selector: "lib-filter-list" }, { kind: "component", type: GenFilterDisplayerComponent, selector: "tb-filter-displayer" }, { kind: "component", type: GenColDisplayerComponent, selector: "tb-col-displayer" }, { kind: "component", type: SortMenuComponent, selector: "tb-sort-menu" }, { kind: "component", type: GenericTableComponent, selector: "tb-generic-table", inputs: ["displayDataLength", "data", "rows", "columnInfos", "dataSource", "trackBy"], outputs: ["selection"] }, { kind: "component", type: ProfilesMenuComponent, selector: "tb-profiles-menu", inputs: ["tableId", "isMatMenuChild"] }, { kind: "component", type: TableHeaderMenuComponent, selector: "lib-table-header-menu" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$4.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i1$4.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: VirtualScrollContainer, selector: "tb-virtual-scroll-container" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5723
5577
  }
5724
5578
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TableContainerComponent, decorators: [{
5725
5579
  type: Component,
@@ -5727,7 +5581,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
5727
5581
  PaginatorComponent,
5728
5582
  MultiSortDirective, GroupByListComponent, FilterChipsComponent, GenFilterDisplayerComponent, GenColDisplayerComponent,
5729
5583
  SortMenuComponent, GenericTableComponent, ProfilesMenuComponent, TableHeaderMenuComponent,
5730
- MatButtonModule, MatMenuModule, MatIconModule, MatTooltipModule, VirtualScrollContainer], template: "@let tableId = $tableId();\r\n@let tableSettings = state.$tableSettings();\r\n\r\n<ng-content select=\"[before]\" />\r\n<ng-container multiSort>\r\n <div class=\"tb-header-wrapper\" [id]=\"headerId\">\r\n <div class=\"title\">\r\n @if ((!$collapsedHeader()) || tableSettings.showTitleWhenHeaderCollapsed)\r\n {\r\n <ng-content select=\".tb-header-title\"/>\r\n }\r\n </div>\r\n @if(state.$groupByKeys().length){\r\n <group-by-list />\r\n }\r\n <div class=\"flx-row-end\">\r\n <lib-filter-list />\r\n @if (!tableSettings.hideHeader) {\r\n @if (!$collapsedHeader()) {\r\n <ng-container *ngTemplateOutlet=\"headerMenu\"/>\r\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"l.menu()\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n\r\n <lib-table-header-menu #l/>\r\n\r\n }\r\n @else {\r\n <mat-icon color=\"primary\" [matMenuTriggerFor]=\"mainMenu\" class=\"flat-menu-button pointer\">more_horiz</mat-icon>\r\n <mat-menu #mainMenu='matMenu'>\r\n <div class=\"flex-column\">\r\n <ng-container *ngTemplateOutlet=\"headerMenu; injector menuInjector\"/>\r\n </div>\r\n <lib-table-header-menu />\r\n </mat-menu>\r\n }\r\n <mat-icon [matTooltip]=\"$collapsedHeader() ? 'expand' : 'collapse'\" class=\"collapse-icon header\"\r\n (click)=\"state.toggleCollapseHeader()\">\r\n {{$collapsedHeader() ? 'expand_less' : 'expand_more'}}\r\n </mat-icon>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n @if($useVirtual())\r\n {\r\n <tb-virtual-scroll-container class=\"scrollable\">\r\n <tb-generic-table [rows]=\"$customRows()\" [data]=\"$data()!\" [displayDataLength]=\"$displayDataLength()\"\r\n (selection)='selection$.emit($event)' [columnInfos]='$myColumns()' [trackBy]=\"$trackBy()\" [dataSource]=\"dataSource\" />\r\n </tb-virtual-scroll-container>\r\n }\r\n @else\r\n {\r\n <tb-generic-table [rows]=\"$customRows()\" [data]=\"$data()!\" [displayDataLength]=\"$displayDataLength()\"\r\n (selection)='selection$.emit($event)' [columnInfos]='$myColumns()' [trackBy]=\"$trackBy()\" [dataSource]=\"dataSource\" />\r\n }\r\n @if(tableSettings.usePaginator)\r\n {\r\n <div class=\"paginator\">\r\n <tb-paginator #tbPaginator />\r\n\r\n <mat-icon [matTooltip]=\"$collapsedFooter() ? 'expand' : 'collapse'\" class=\"collapse-icon footer\"\r\n (click)=\"state.toggleCollapseFooter()\">\r\n {{$collapsedFooter() ? 'expand_more' : 'expand_less'}}\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <ng-template #headerMenu>\r\n @if (!tableSettings.hideFilter) {<tb-filter-displayer/>}\r\n @if (!tableSettings.hideColumnSettings) {<tb-col-displayer/>}\r\n @if (!tableSettings.hideSort) {<tb-sort-menu/>}\r\n @if (!!tableId) {<tb-profiles-menu [tableId]=\"tableId\"/>}\r\n </ng-template>\r\n\r\n</ng-container>\r\n", styles: [".tb-header-wrapper{display:flex;flex-direction:row;width:100%}.flx-row-end{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;margin-left:auto}.flat-menu{line-height:initial;height:initial}.pointer{cursor:pointer}.add-key{width:90%}.paginator{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;background-color:#fff;bottom:0;position:sticky;border-top:.5px solid rgba(0,0,0,.12)}.profiles-menu{visibility:hidden;width:0px;height:0px;display:block;overflow:hidden;position:absolute;top:50px}\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"] }]
5584
+ MatButtonModule, MatMenuModule, MatIconModule, MatTooltipModule, VirtualScrollContainer], template: "@let tableId = $tableId();\r\n@let tableSettings = state.$tableSettings();\r\n\r\n<ng-content select=\"[before]\" />\r\n<ng-container multiSort>\r\n <div class=\"tb-header-wrapper\" [id]=\"headerId\">\r\n <div class=\"title\">\r\n @if ((!$collapsedHeader()) || tableSettings.showTitleWhenHeaderCollapsed) {\r\n <ng-content select=\".tb-header-title\"/>\r\n }\r\n @if(state.$groupByKeys().length){\r\n <group-by-list />\r\n }\r\n </div>\r\n <div class=\"flx-row-end\">\r\n <lib-filter-list />\r\n @if (!tableSettings.hideHeader) {\r\n @if (!$collapsedHeader()) {\r\n <ng-container *ngTemplateOutlet=\"headerMenu\"/>\r\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"l.menu()\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n\r\n <lib-table-header-menu #l/>\r\n\r\n }\r\n @else {\r\n <mat-icon color=\"primary\" [matMenuTriggerFor]=\"mainMenu\" class=\"flat-menu-button pointer\">more_horiz</mat-icon>\r\n <mat-menu #mainMenu='matMenu'>\r\n <div class=\"flex-column\">\r\n <ng-container *ngTemplateOutlet=\"headerMenu; injector menuInjector\"/>\r\n </div>\r\n <lib-table-header-menu />\r\n </mat-menu>\r\n }\r\n <mat-icon [matTooltip]=\"$collapsedHeader() ? 'expand' : 'collapse'\" class=\"collapse-icon header\"\r\n (click)=\"state.toggleCollapseHeader()\">\r\n {{$collapsedHeader() ? 'expand_less' : 'expand_more'}}\r\n </mat-icon>\r\n }\r\n\r\n </div>\r\n </div>\r\n\r\n @if($useVirtual())\r\n {\r\n <tb-virtual-scroll-container class=\"scrollable\">\r\n <tb-generic-table [rows]=\"$customRows()\" [data]=\"$data()!\" [displayDataLength]=\"$displayDataLength()\"\r\n (selection)='selection$.emit($event)' [columnInfos]='$myColumns()' [trackBy]=\"$trackBy()\" [dataSource]=\"dataSource\" />\r\n </tb-virtual-scroll-container>\r\n }\r\n @else\r\n {\r\n <tb-generic-table [rows]=\"$customRows()\" [data]=\"$data()!\" [displayDataLength]=\"$displayDataLength()\"\r\n (selection)='selection$.emit($event)' [columnInfos]='$myColumns()' [trackBy]=\"$trackBy()\" [dataSource]=\"dataSource\" />\r\n }\r\n @if(tableSettings.usePaginator)\r\n {\r\n <div class=\"paginator\">\r\n <tb-paginator #tbPaginator />\r\n\r\n <mat-icon [matTooltip]=\"$collapsedFooter() ? 'expand' : 'collapse'\" class=\"collapse-icon footer\"\r\n (click)=\"state.toggleCollapseFooter()\">\r\n {{$collapsedFooter() ? 'expand_more' : 'expand_less'}}\r\n </mat-icon>\r\n </div>\r\n }\r\n\r\n <ng-template #headerMenu>\r\n @if (!tableSettings.hideFilter) {<tb-filter-displayer/>}\r\n @if (!tableSettings.hideColumnSettings) {<tb-col-displayer/>}\r\n @if (!tableSettings.hideSort) {<tb-sort-menu/>}\r\n @if (!!tableId) {<tb-profiles-menu [tableId]=\"tableId\"/>}\r\n </ng-template>\r\n\r\n</ng-container>\r\n", styles: [".tb-header-wrapper{display:flex;flex-direction:row;justify-content:space-between;width:100%}.flx-row-end{display:flex;flex-direction:row;justify-content:flex-end;align-items:center}.flat-menu{line-height:initial;height:initial}.pointer{cursor:pointer}.add-key{width:90%}.paginator{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;background-color:#fff;bottom:0;position:sticky;border-top:.5px solid rgba(0,0,0,.12)}.profiles-menu{visibility:hidden;width:0px;height:0px;display:block;overflow:hidden;position:absolute;top:50px}\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"] }]
5731
5585
  }] });
5732
5586
 
5733
5587
  class TableBuilderModule {
@@ -5740,38 +5594,102 @@ class TableBuilderModule {
5740
5594
  };
5741
5595
  }
5742
5596
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TableBuilderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5743
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: TableBuilderModule, imports: [TableContainerComponent,
5597
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: TableBuilderModule, imports: [CommonModule,
5598
+ MatDialogModule,
5599
+ MatNativeDateModule,
5600
+ RouterModule,
5601
+ TableContainerComponent,
5602
+ GenericTableComponent,
5603
+ TableContainerComponent,
5744
5604
  CustomCellDirective,
5605
+ FilterComponent,
5606
+ MatSlideToggleTbFilterDirective,
5607
+ MatRadioButtonTbFilterDirective,
5608
+ MatOptionTbFilterDirective,
5609
+ MatCheckboxTbFilterDirective,
5610
+ MatButtonToggleFilterDirective,
5745
5611
  TableFilterDirective,
5746
5612
  TableFilterStringContainsDirective,
5747
- TableWrapperDirective], exports: [TableContainerComponent,
5613
+ TableWrapperDirective,
5614
+ ResizeColumnDirective,
5615
+ UtilitiesModule], exports: [GenericTableComponent,
5616
+ TableContainerComponent,
5748
5617
  CustomCellDirective,
5618
+ FilterComponent,
5619
+ MatSlideToggleTbFilterDirective,
5620
+ MatRadioButtonTbFilterDirective,
5621
+ MatOptionTbFilterDirective,
5622
+ MatCheckboxTbFilterDirective,
5623
+ MatButtonToggleFilterDirective,
5624
+ TableFilterDirective,
5749
5625
  TableFilterStringContainsDirective,
5750
5626
  TableWrapperDirective,
5627
+ ResizeColumnDirective,
5751
5628
  UtilitiesModule] });
5752
5629
  static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TableBuilderModule, providers: [
5630
+ SpaceCasePipe,
5631
+ DatePipe,
5632
+ CurrencyPipe,
5633
+ PhoneNumberPipe,
5753
5634
  MultiSortDirective,
5754
- ], imports: [TableContainerComponent, UtilitiesModule] });
5635
+ TableBuilderStateStore,
5636
+ ], imports: [CommonModule,
5637
+ MatDialogModule,
5638
+ MatNativeDateModule,
5639
+ RouterModule,
5640
+ TableContainerComponent,
5641
+ GenericTableComponent,
5642
+ TableContainerComponent,
5643
+ FilterComponent,
5644
+ UtilitiesModule, UtilitiesModule] });
5755
5645
  }
5756
5646
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: TableBuilderModule, decorators: [{
5757
5647
  type: NgModule,
5758
5648
  args: [{
5759
5649
  imports: [
5650
+ CommonModule,
5651
+ MatDialogModule,
5652
+ MatNativeDateModule,
5653
+ RouterModule,
5654
+ TableContainerComponent,
5655
+ GenericTableComponent,
5760
5656
  TableContainerComponent,
5761
5657
  CustomCellDirective,
5658
+ FilterComponent,
5659
+ MatSlideToggleTbFilterDirective,
5660
+ MatRadioButtonTbFilterDirective,
5661
+ MatOptionTbFilterDirective,
5662
+ MatCheckboxTbFilterDirective,
5663
+ MatButtonToggleFilterDirective,
5762
5664
  TableFilterDirective,
5763
5665
  TableFilterStringContainsDirective,
5764
5666
  TableWrapperDirective,
5667
+ ResizeColumnDirective,
5668
+ UtilitiesModule,
5765
5669
  ],
5766
5670
  exports: [
5671
+ GenericTableComponent,
5767
5672
  TableContainerComponent,
5768
5673
  CustomCellDirective,
5674
+ FilterComponent,
5675
+ MatSlideToggleTbFilterDirective,
5676
+ MatRadioButtonTbFilterDirective,
5677
+ MatOptionTbFilterDirective,
5678
+ MatCheckboxTbFilterDirective,
5679
+ MatButtonToggleFilterDirective,
5680
+ TableFilterDirective,
5769
5681
  TableFilterStringContainsDirective,
5770
5682
  TableWrapperDirective,
5683
+ ResizeColumnDirective,
5771
5684
  UtilitiesModule,
5772
5685
  ],
5773
5686
  providers: [
5687
+ SpaceCasePipe,
5688
+ DatePipe,
5689
+ CurrencyPipe,
5690
+ PhoneNumberPipe,
5774
5691
  MultiSortDirective,
5692
+ TableBuilderStateStore,
5775
5693
  ]
5776
5694
  }]
5777
5695
  }] });
@@ -5799,86 +5717,66 @@ class MatTableObservableDataSource extends MatTableDataSource {
5799
5717
  }
5800
5718
 
5801
5719
  class TableBuilder {
5802
- data;
5803
- metaData;
5804
- settings;
5805
- #$metaData;
5806
- #$data;
5807
- #$settings;
5808
- $metaData = computed(() => this.$inited() && this.#$metaData());
5809
- $settings = computed(() => this.$inited() ? this.#$settings() : undefined);
5810
- metaNeeds = false;
5811
- dataObs = false;
5812
- settingsObs = false;
5813
- $inited = signal(false);
5720
+ metaData$;
5721
+ data$;
5722
+ settings$;
5814
5723
  constructor(data, metaData, settings = new GeneralTableSettings()) {
5815
- this.data = data;
5816
- this.metaData = metaData;
5817
- this.settings = settings;
5818
- if (isObservable(data)) {
5819
- this.dataObs = true;
5820
- }
5821
- else {
5822
- this.#$data = isSignal(data) ? data : signal(data);
5724
+ this.settings$ = this.coerceSettingsToObservable(settings)
5725
+ .pipe(defaultShareReplay());
5726
+ this.data$ = this.coerceToObservable(data, this.settings$)
5727
+ .pipe(notNull(), defaultShareReplay());
5728
+ this.metaData$ = metaData ?
5729
+ this.coerceToObservable(metaData, this.settings$).pipe(defaultShareReplay())
5730
+ :
5731
+ this.data$.pipe(first$1(), map(d => this.createMetaData(d[0])), defaultShareReplay());
5732
+ }
5733
+ getData$() {
5734
+ return this.metaData$.pipe(map(md => createDataCleaners(md)), switchMap(cleaner => this.data$.pipe(map((datas, ii) => {
5735
+ return datas.map((data, i) => {
5736
+ const cleaned = cleaner(data);
5737
+ cleaned[initIndexSymbol] = i * ((ii % 2) + 1);
5738
+ return cleaned;
5739
+ });
5740
+ }))), defaultShareReplay());
5741
+ }
5742
+ createMetaData(obj) {
5743
+ return Object.keys(obj ?? {})
5744
+ .map(key => ({
5745
+ key,
5746
+ fieldType: FieldType.Unknown,
5747
+ order: -1
5748
+ }));
5749
+ }
5750
+ coerceToObservable(arg, settings) {
5751
+ if (isObservable(arg)) {
5752
+ return arg;
5823
5753
  }
5824
- if (isObservable(metaData) || !metaData) {
5825
- this.metaNeeds = true;
5754
+ else if (isSignal(arg)) {
5755
+ return settings.pipe(switchMap(s => {
5756
+ this.assertInjector(s);
5757
+ return toObservable(arg, { injector: s.injector });
5758
+ }));
5826
5759
  }
5827
5760
  else {
5828
- this.#$metaData = isSignal(metaData) ? metaData : signal(metaData);
5761
+ return of(arg);
5829
5762
  }
5763
+ }
5764
+ coerceSettingsToObservable(settings) {
5830
5765
  if (isObservable(settings)) {
5831
- this.settingsObs = true;
5766
+ return settings;
5832
5767
  }
5833
- else {
5834
- this.#$settings = isSignal(settings) ? settings : signal(settings);
5768
+ else if (isSignal(settings)) {
5769
+ this.assertInjector(settings());
5770
+ return toObservable(settings, { injector: settings().injector });
5835
5771
  }
5836
- if (!this.dataObs && !this.settingsObs && !this.metaNeeds) {
5837
- this.$inited.set(true);
5772
+ else {
5773
+ return of(settings);
5838
5774
  }
5839
5775
  }
5840
- prep(injector) {
5841
- if (this.settingsObs) {
5842
- this.#$settings = toSignal(this.settings, { injector, requireSync: true });
5843
- }
5844
- if (this.dataObs) {
5845
- this.#$data = toSignal(this.data, { injector, initialValue: [] });
5776
+ assertInjector(s) {
5777
+ if (!s.injector) {
5778
+ throw new Error('Injector must be provided when passing a signal to table builder');
5846
5779
  }
5847
- if (this.metaNeeds) {
5848
- if (this.metaData) {
5849
- this.#$metaData = toSignal(this.metaData, { injector, initialValue: [] });
5850
- }
5851
- else {
5852
- this.#$metaData = computed(() => this.createMetaData(this.#$data()[0]));
5853
- }
5854
- }
5855
- this.$inited.set(true);
5856
- }
5857
- #dataCleaners = computed(() => {
5858
- const metaData = this.$metaData();
5859
- if (!metaData)
5860
- return undefined;
5861
- return createDataCleaners(metaData);
5862
- });
5863
- $data = computed(() => {
5864
- const data = this.#$data();
5865
- const cleaners = this.#dataCleaners();
5866
- if (!data || !cleaners)
5867
- return [];
5868
- const cleanedData = data.map((data, i) => {
5869
- const cleaned = cleaners(data);
5870
- cleaned[initIndexSymbol] = i;
5871
- return cleaned;
5872
- });
5873
- return cleanedData;
5874
- });
5875
- createMetaData(obj) {
5876
- return Object.keys(obj ?? {})
5877
- .map(key => ({
5878
- key,
5879
- fieldType: FieldType.Unknown,
5880
- order: -1
5881
- }));
5882
5780
  }
5883
5781
  }
5884
5782
  const CreateTableBuilder = (reportDef$) => {
@@ -6104,5 +6002,5 @@ function setUpStoreFactoryOld(store, env) {
6104
6002
  * Generated bundle index. Do not edit.
6105
6003
  */
6106
6004
 
6107
- export { ActionStateSpinnerComponent, ActionStateUiModule, ActionStatus, AppStatusState, ArrayStyle, AutoFocusDirective, CancellationToken, ClickEmitterDirective, ClickSubjectDirective, ConditionalClassesDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent, DefaultVirtualScrollOptions, DialogDirective, DialogService, DialogWrapper, FieldType, FilterChipsComponent, FilterComponent, FilterType, 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, TableColumnFooterSettings, 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, parseTbSizeToPixels, phoneFormatter, previousAndCurrent, provideActionableSelector, provideTableBuilder, selectAll, selectEntities, selectEntity, selectIds, selectTotal, serverStatusTypes, setUpStoreFactory, setUpStoreFactoryOld, skipOneWhen, sortsAreSame, spaceCase, startWithIfEmpty, statusAdapter, statusIsSuccessOrInProgress, subscriber, switchOff, tapError, tapSuccess, wrapInArr };
6005
+ export { ActionStateSpinnerComponent, ActionStateUiModule, ActionStatus, AppStatusState, ArrayStyle, AutoFocusDirective, CancellationToken, ClickEmitterDirective, ClickSubjectDirective, ConditionalClassesDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent, DefaultVirtualScrollOptions, DialogDirective, DialogService, DialogWrapper, FieldType, FilterChipsComponent, FilterComponent, FilterType, 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, parseTbSizeToPixels, previousAndCurrent, provideActionableSelector, provideTableBuilder, selectAll, selectEntities, selectEntity, selectIds, selectTotal, serverStatusTypes, setUpStoreFactory, setUpStoreFactoryOld, skipOneWhen, sortsAreSame, spaceCase, startWithIfEmpty, statusAdapter, statusIsSuccessOrInProgress, subscriber, switchOff, tapError, tapSuccess, wrapInArr };
6108
6006
  //# sourceMappingURL=one-paragon-angular-utilities.mjs.map