@one-paragon/angular-utilities 1.2.9-beta.1 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -24
- package/action-state/ngrx.d.ts +1 -1
- package/esm2022/action-state/action-state-spinner/action-state-spinner.component.mjs +3 -3
- package/esm2022/action-state/action-state-ui/action-state-ui.module.mjs +1 -1
- package/esm2022/action-state/index.mjs +1 -1
- package/esm2022/action-state/ngrx-ext/ngrx-ext.module.mjs +1 -1
- package/esm2022/action-state/ngrx.mjs +1 -1
- package/esm2022/http-request-state/directives/index.mjs +1 -1
- package/esm2022/http-request-state/index.mjs +1 -1
- package/esm2022/http-request-state/rxjs/getRequestorBody.mjs +1 -1
- package/esm2022/http-request-state/rxjs/getRequestorState.mjs +1 -1
- package/esm2022/http-request-state/rxjs/index.mjs +1 -1
- package/esm2022/ngrx/actionable-selector.mjs +1 -1
- package/esm2022/public-api.mjs +1 -1
- package/esm2022/rxjs/defaultShareReplay.mjs +1 -1
- package/esm2022/rxjs/index.mjs +1 -1
- package/esm2022/rxjs/mapError.mjs +1 -1
- package/esm2022/rxjs/rxjs-operators.mjs +1 -1
- package/esm2022/rxjs/subjectifier.mjs +1 -1
- package/esm2022/rxjs/subscriber.directive.mjs +1 -1
- package/esm2022/table-builder/classes/DefaultSettings.mjs +1 -1
- package/esm2022/table-builder/classes/MatTableObservableDataSource.mjs +1 -1
- package/esm2022/table-builder/classes/TableBuilderConfig.mjs +1 -1
- package/esm2022/table-builder/classes/TableBuilderDataSource.mjs +12 -18
- package/esm2022/table-builder/classes/TableState.mjs +3 -5
- package/esm2022/table-builder/classes/display-col.mjs +1 -1
- package/esm2022/table-builder/classes/filter-info.mjs +1 -1
- package/esm2022/table-builder/classes/table-builder-general-settings.mjs +4 -11
- package/esm2022/table-builder/classes/table-builder.mjs +3 -3
- package/esm2022/table-builder/classes/table-store.mjs +46 -71
- package/esm2022/table-builder/components/column-builder/column-builder.component.mjs +4 -4
- package/esm2022/table-builder/components/column-builder/column-helpers.mjs +1 -1
- package/esm2022/table-builder/components/date-filter/date-filter.component.mjs +3 -3
- package/esm2022/table-builder/components/date-time-filter/date-time-filter.component.mjs +3 -3
- package/esm2022/table-builder/components/filter/filter.component.mjs +3 -3
- package/esm2022/table-builder/components/filter/in-list/in-list-filter.component.mjs +19 -19
- package/esm2022/table-builder/components/gen-col-displayer/gen-col-displayer.component.mjs +3 -3
- package/esm2022/table-builder/components/generic-table/generic-table.component.mjs +61 -94
- package/esm2022/table-builder/components/generic-table/paginator.component.mjs +28 -30
- package/esm2022/table-builder/components/group-by-list/group-by-list.component.mjs +3 -3
- package/esm2022/table-builder/components/in-filter/in-filter.component.mjs +3 -3
- package/esm2022/table-builder/components/index.mjs +1 -1
- package/esm2022/table-builder/components/initialization-component/initialization-component.mjs +3 -3
- package/esm2022/table-builder/components/link-column.component.mjs +31 -31
- package/esm2022/table-builder/components/number-filter/number-filter.component.mjs +3 -3
- package/esm2022/table-builder/components/profiles-menu/profiles-menu.component.mjs +3 -3
- package/esm2022/table-builder/components/scroll-strategy.mjs +1 -1
- package/esm2022/table-builder/components/sort-menu/sort-menu.component-store.mjs +2 -4
- package/esm2022/table-builder/components/sort-menu/sort-menu.component.mjs +3 -3
- package/esm2022/table-builder/components/table-container/table-container-imports.mjs +1 -1
- package/esm2022/table-builder/components/table-container/table-container.helpers/data-state.helpers.mjs +1 -1
- package/esm2022/table-builder/components/table-container/table-container.helpers/filter-state.helpers.mjs +1 -1
- package/esm2022/table-builder/components/table-container/table-container.helpers/groupBy.helpers.mjs +1 -1
- package/esm2022/table-builder/components/table-container/table-container.helpers/sort-state.helpers.mjs +1 -1
- package/esm2022/table-builder/components/table-container/table-container.mjs +31 -42
- package/esm2022/table-builder/components/table-container/tableProps.mjs +2 -1
- package/esm2022/table-builder/components/table-container/virtual-scroll-container.mjs +15 -17
- package/esm2022/table-builder/components/table-container-filter/filter-list/filter-list.component.mjs +6 -5
- package/esm2022/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.mjs +11 -9
- package/esm2022/table-builder/components/table-container-filter/table-wrapper-filter-store.mjs +1 -1
- package/esm2022/table-builder/directives/custom-cell-directive.mjs +13 -12
- package/esm2022/table-builder/directives/index.mjs +1 -1
- package/esm2022/table-builder/directives/multi-sort.directive.mjs +1 -1
- package/esm2022/table-builder/directives/resize-column.directive.mjs +1 -1
- package/esm2022/table-builder/directives/table-wrapper.directive.mjs +1 -1
- package/esm2022/table-builder/directives/tb-filter.directive.mjs +1 -1
- package/esm2022/table-builder/enums/filterTypes.mjs +1 -1
- package/esm2022/table-builder/functions/boolean-filter-function.mjs +1 -1
- package/esm2022/table-builder/functions/date-filter-function.mjs +1 -1
- package/esm2022/table-builder/functions/download-data.mjs +1 -1
- package/esm2022/table-builder/functions/null-filter-function.mjs +1 -1
- package/esm2022/table-builder/functions/number-filter-function.mjs +1 -1
- package/esm2022/table-builder/functions/sort-data-function.mjs +1 -1
- package/esm2022/table-builder/functions/string-filter-function.mjs +1 -1
- package/esm2022/table-builder/interfaces/ColumnInfo.mjs +1 -1
- package/esm2022/table-builder/interfaces/report-def.mjs +1 -1
- package/esm2022/table-builder/ngrx/tableBuilderStateStore.mjs +1 -1
- package/esm2022/table-builder/pipes/column-total.pipe.mjs +1 -1
- package/esm2022/table-builder/pipes/format-filter-type.pipe.mjs +1 -1
- package/esm2022/table-builder/pipes/format-filter-value.pipe.mjs +1 -1
- package/esm2022/table-builder/services/export-to-csv.service.mjs +3 -3
- package/esm2022/table-builder/services/link-creator.service.mjs +1 -1
- package/esm2022/table-builder/services/table-template-service.mjs +1 -1
- package/esm2022/table-builder/services/transform-creator.mjs +1 -1
- package/esm2022/table-builder/table-builder.module.mjs +1 -1
- package/esm2022/utilities/array-helpers.mjs +1 -1
- package/esm2022/utilities/directives/auto-focus.directive.mjs +1 -1
- package/esm2022/utilities/directives/clickEmitterDirective.mjs +1 -1
- package/esm2022/utilities/directives/clickSubject.mjs +1 -1
- package/esm2022/utilities/directives/conditional-classes.directive.mjs +1 -1
- package/esm2022/utilities/directives/dialog-service.mjs +1 -1
- package/esm2022/utilities/directives/dialog.mjs +1 -1
- package/esm2022/utilities/directives/mat-toggle-group-directive.mjs +1 -1
- package/esm2022/utilities/directives/prevent-enter.directive.mjs +1 -1
- package/esm2022/utilities/directives/stop-propagation.directive.mjs +1 -1
- package/esm2022/utilities/directives/trim-whitespace.directive.mjs +1 -1
- package/esm2022/utilities/index.mjs +1 -1
- package/esm2022/utilities/module.mjs +1 -1
- package/esm2022/utilities/pipes/function.pipe.mjs +1 -1
- package/esm2022/utilities/pipes/phone.pipe.mjs +1 -1
- package/esm2022/utilities/pipes/space-case.pipes.mjs +1 -1
- package/fesm2022/one-paragon-angular-utilities.mjs +289 -381
- package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -1
- package/package.json +1 -1
- package/table-builder/classes/TableBuilderDataSource.d.ts +3 -2
- package/table-builder/classes/TableState.d.ts +4 -14
- package/table-builder/classes/table-builder-general-settings.d.ts +2 -4
- package/table-builder/classes/table-store.d.ts +28 -16
- package/table-builder/components/generic-table/generic-table.component.d.ts +11 -19
- package/table-builder/components/generic-table/paginator.component.d.ts +0 -1
- package/table-builder/components/sort-menu/sort-menu.component-store.d.ts +0 -1
- package/table-builder/components/table-container/table-container-imports.d.ts +1 -1
- package/table-builder/components/table-container/table-container.d.ts +8 -10
- package/table-builder/components/table-container/tableProps.d.ts +1 -0
- package/table-builder/components/table-container/virtual-scroll-container.d.ts +0 -1
- package/table-builder/components/table-container-filter/filter-list/filter-list.component.d.ts +3 -2
- package/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.d.ts +3 -1
- package/table-builder/directives/custom-cell-directive.d.ts +4 -6
- package/table-builder/directives/table-wrapper.directive.d.ts +1 -1
- package/table-builder/interfaces/ColumnInfo.d.ts +1 -1
- package/esm2022/table-builder/classes/data-store.mjs +0 -15
- package/table-builder/classes/data-store.d.ts +0 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Directive, Input, inject, Injector, TemplateRef, ViewContainerRef, NgModule, assertInInjectionContext, DestroyRef, isSignal, computed, Injectable, Pipe, Renderer2, ElementRef, booleanAttribute, signal, InjectionToken, makeEnvironmentProviders, HostListener, Component, ChangeDetectionStrategy, EventEmitter, untracked, Output, ContentChildren, ChangeDetectorRef, input, output, ViewChild, EnvironmentInjector, createComponent, viewChild, effect, forwardRef, contentChildren, ContentChild, APP_INITIALIZER } from '@angular/core';
|
|
3
|
-
import { shareReplay, switchAll, map, filter, tap, catchError, startWith, switchMap, mergeMap, concatMap as concatMap$1, takeUntil, distinctUntilChanged, first as first$1, distinctUntilKeyChanged, delay as delay$1, observeOn, scan as scan$1, timestamp as timestamp$1, withLatestFrom, mergeAll } from 'rxjs/operators';
|
|
3
|
+
import { shareReplay, switchAll, map, filter, tap, catchError, startWith, switchMap, mergeMap, concatMap as concatMap$1, takeUntil, last, distinctUntilChanged, first as first$1, distinctUntilKeyChanged, delay as delay$1, observeOn, scan as scan$1, timestamp as timestamp$1, withLatestFrom, mergeAll as mergeAll$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, tap as tap$1, BehaviorSubject, takeUntil as takeUntil$1, switchMap as switchMap$1, scan, asyncScheduler, animationFrameScheduler, distinctUntilChanged as distinctUntilChanged$1, timestamp,
|
|
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, tap as tap$1, BehaviorSubject, takeUntil as takeUntil$1, switchMap as switchMap$1, scan, asyncScheduler, animationFrameScheduler, distinctUntilChanged as distinctUntilChanged$1, timestamp, mergeAll } from 'rxjs';
|
|
6
6
|
import { ComponentStore } from '@ngrx/component-store';
|
|
7
7
|
import { toObservable, toSignal } from '@angular/core/rxjs-interop';
|
|
8
8
|
import * as i1$8 from '@angular/common';
|
|
@@ -49,7 +49,7 @@ import { LetDirective } from '@ngrx/component';
|
|
|
49
49
|
import * as i4$3 from '@angular/material/chips';
|
|
50
50
|
import { MatChipsModule } from '@angular/material/chips';
|
|
51
51
|
import * as i1$5 from '@angular/material/table';
|
|
52
|
-
import { MatTable, MatColumnDef, MatTableModule,
|
|
52
|
+
import { MatTable, MatColumnDef, MatTableModule, MatTableDataSource, MatRowDef } from '@angular/material/table';
|
|
53
53
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
54
54
|
import * as i1$6 from '@angular/material/paginator';
|
|
55
55
|
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
@@ -757,12 +757,6 @@ class GeneralTableSettings {
|
|
|
757
757
|
merge$1(this.tableSettings, settings.tableSettings);
|
|
758
758
|
if (settings.tableSettings?.useVirtualScroll) {
|
|
759
759
|
const currVirt = settings.tableSettings.useVirtualScroll === true ? new VirtualScrollOptions() : settings.tableSettings.useVirtualScroll;
|
|
760
|
-
if (!currVirt.headerHeight || settings.tableSettings.useVirtualScroll === true) {
|
|
761
|
-
currVirt.headerHeight = (typeof settings.headerSettings?.headerHeight === 'number' ? settings.headerSettings?.headerHeight : DefaultVirtualScrollOptions.headerHeight);
|
|
762
|
-
}
|
|
763
|
-
if (!currVirt.rowHeight || settings.tableSettings.useVirtualScroll === true) {
|
|
764
|
-
currVirt.rowHeight = (typeof settings.tableSettings?.rowHeight === 'number' ? settings.tableSettings?.rowHeight : DefaultVirtualScrollOptions.rowHeight);
|
|
765
|
-
}
|
|
766
760
|
this.tableSettings.useVirtualScroll = { ...new VirtualScrollOptions(), ...currVirt };
|
|
767
761
|
}
|
|
768
762
|
}
|
|
@@ -796,6 +790,7 @@ class TableSettings {
|
|
|
796
790
|
useVirtualScroll = null;
|
|
797
791
|
includeAllInPaginatorOptions = false;
|
|
798
792
|
rowHeight = undefined;
|
|
793
|
+
groupHeaderHeight = undefined;
|
|
799
794
|
}
|
|
800
795
|
class PersistedTableSettings {
|
|
801
796
|
constructor(tableSettings) {
|
|
@@ -823,6 +818,7 @@ class NotPersistedTableSettings {
|
|
|
823
818
|
this.includeAllInPaginatorOptions = tableSettings.tableSettings.includeAllInPaginatorOptions;
|
|
824
819
|
this.rowHeight = tableSettings.tableSettings.rowHeight;
|
|
825
820
|
this.headerHeight = tableSettings.headerSettings.headerHeight;
|
|
821
|
+
this.groupHeaderHeight = tableSettings.tableSettings.groupHeaderHeight;
|
|
826
822
|
}
|
|
827
823
|
}
|
|
828
824
|
hideExport = true;
|
|
@@ -836,6 +832,7 @@ class NotPersistedTableSettings {
|
|
|
836
832
|
usePaginator = true;
|
|
837
833
|
useVirtualScroll = null;
|
|
838
834
|
includeAllInPaginatorOptions = false;
|
|
835
|
+
groupHeaderHeight = undefined;
|
|
839
836
|
rowHeight;
|
|
840
837
|
headerHeight = undefined;
|
|
841
838
|
}
|
|
@@ -851,10 +848,6 @@ class VirtualScrollOptions {
|
|
|
851
848
|
*/
|
|
852
849
|
maxViewPortHeight = undefined;
|
|
853
850
|
}
|
|
854
|
-
const DefaultVirtualScrollOptions = {
|
|
855
|
-
rowHeight: 48,
|
|
856
|
-
headerHeight: 56,
|
|
857
|
-
};
|
|
858
851
|
|
|
859
852
|
class KeysToDelete {
|
|
860
853
|
initializationState = null;
|
|
@@ -893,15 +886,13 @@ const defaultTableState = {
|
|
|
893
886
|
groupBy: [],
|
|
894
887
|
minColumnWidth: undefined,
|
|
895
888
|
currentPage: 0,
|
|
896
|
-
props: {},
|
|
897
|
-
showAll: false,
|
|
898
|
-
};
|
|
899
|
-
const defaultDataState = {
|
|
900
889
|
virtualScrollOffset: 0,
|
|
901
890
|
dataLen: 0,
|
|
902
891
|
virtualEnds: {
|
|
903
892
|
start: 0, end: 20
|
|
904
893
|
},
|
|
894
|
+
props: {},
|
|
895
|
+
showAll: false,
|
|
905
896
|
};
|
|
906
897
|
|
|
907
898
|
// here is how to use it
|
|
@@ -927,21 +918,23 @@ class CustomCellDirective {
|
|
|
927
918
|
if (this.templateRef !== null)
|
|
928
919
|
this.TemplateRef = this.templateRef;
|
|
929
920
|
}
|
|
930
|
-
|
|
931
|
-
this
|
|
921
|
+
ngAfterContentInit() {
|
|
922
|
+
if (this.TemplateRef === null && this.templateRef !== null) {
|
|
923
|
+
this.TemplateRef = this.templateRef;
|
|
924
|
+
}
|
|
932
925
|
}
|
|
933
|
-
|
|
934
|
-
getMetaData = () => {
|
|
926
|
+
getMetaData(metaData) {
|
|
935
927
|
return {
|
|
936
928
|
key: this.customCell,
|
|
937
|
-
displayName: this.displayName,
|
|
938
|
-
preSort: this.preSort,
|
|
939
|
-
fieldType: this.customCellNotMapped ? FieldType.NotMapped : FieldType.Unknown,
|
|
940
|
-
order: this.customCellOrder,
|
|
941
|
-
width: this.customCellWidth,
|
|
929
|
+
displayName: this.displayName ?? metaData?.displayName,
|
|
930
|
+
preSort: this.preSort ?? metaData?.preSort,
|
|
931
|
+
fieldType: metaData?.fieldType ?? (this.customCellNotMapped ? FieldType.NotMapped : FieldType.Unknown),
|
|
932
|
+
order: this.customCellOrder ?? metaData?.order,
|
|
933
|
+
width: this.customCellWidth ?? metaData?.width,
|
|
942
934
|
customCell: true,
|
|
935
|
+
noExport: !metaData,
|
|
943
936
|
};
|
|
944
|
-
}
|
|
937
|
+
}
|
|
945
938
|
static ngTemplateContextGuard(dir, ctx) {
|
|
946
939
|
return true;
|
|
947
940
|
}
|
|
@@ -1753,18 +1746,22 @@ class TableStore extends ComponentStore {
|
|
|
1753
1746
|
this.effect(() => srcObservable.pipe(tap(func)));
|
|
1754
1747
|
return this;
|
|
1755
1748
|
};
|
|
1749
|
+
onLast(callback) {
|
|
1750
|
+
this.on(this.state$.pipe(last()), callback);
|
|
1751
|
+
}
|
|
1756
1752
|
metaData$ = this.select(state => state.metaData);
|
|
1757
|
-
|
|
1758
|
-
$
|
|
1759
|
-
$hiddenKeys = this.selectSignal(state => state.hiddenKeys);
|
|
1760
|
-
$metaDataArray = this.selectSignal(this.$metaData, this.$userDefinedOrder, orderMetaData);
|
|
1753
|
+
metaDataArray = this.selectSignal(this.state, orderMetaData);
|
|
1754
|
+
metaDataArray$ = this.select(this.state$, orderMetaData);
|
|
1761
1755
|
getMetaData$ = (key) => {
|
|
1762
1756
|
return this.select(state => state.metaData[key]).pipe(tap(meta => { if (!meta)
|
|
1763
1757
|
console.warn(`Meta data with key ${key} not found`); }), notNull());
|
|
1764
1758
|
};
|
|
1765
|
-
$
|
|
1766
|
-
|
|
1759
|
+
getUserDefinedWidth$ = (key) => this.select(state => state.userDefined.widths[key]);
|
|
1760
|
+
getUserDefinedWidth = (key) => this.selectSignal(state => state.userDefined.widths[key]);
|
|
1761
|
+
getUserDefinedWidths$ = this.select(state => state.userDefined.widths);
|
|
1762
|
+
getUserDefinedWidths = this.selectSignal(state => state.userDefined.widths);
|
|
1767
1763
|
tableSettingsMinWidth = this.selectSignal(state => state.minColumnWidth);
|
|
1764
|
+
displayedColumns$ = this.select(orderedVisibleColumns);
|
|
1768
1765
|
resetState = this.updater((state) => {
|
|
1769
1766
|
const sorted = this.createPreSort(state.metaData);
|
|
1770
1767
|
return ({ ...state, hiddenKeys: [], sorted, filters: {}, groupBy: [], userDefined: { widths: {}, order: {}, table: {} } });
|
|
@@ -1789,7 +1786,7 @@ class TableStore extends ComponentStore {
|
|
|
1789
1786
|
});
|
|
1790
1787
|
setUserDefinedOrder = this.updater((state, moved) => {
|
|
1791
1788
|
const { newOrder, oldOrder } = moved;
|
|
1792
|
-
const mdsArr =
|
|
1789
|
+
const mdsArr = orderedVisibleMetaData(state);
|
|
1793
1790
|
moveItemInArray(mdsArr, oldOrder, newOrder);
|
|
1794
1791
|
const userDefinedOrder = mdsArr.reduce((aggregate, current, index) => {
|
|
1795
1792
|
aggregate[current.key] = index;
|
|
@@ -1797,7 +1794,6 @@ class TableStore extends ComponentStore {
|
|
|
1797
1794
|
}, {});
|
|
1798
1795
|
return ({ ...state, userDefined: { ...state.userDefined, order: userDefinedOrder } });
|
|
1799
1796
|
});
|
|
1800
|
-
$filters = this.selectSignal(state => state.filters);
|
|
1801
1797
|
filters$ = this.select(state => state.filters);
|
|
1802
1798
|
getFilter$ = (filterId) => {
|
|
1803
1799
|
return this.select(state => state.filters[filterId]);
|
|
@@ -1847,7 +1843,7 @@ class TableStore extends ComponentStore {
|
|
|
1847
1843
|
createPreSort = (metaDatas) => {
|
|
1848
1844
|
return Object.values(metaDatas).filter((metaData) => !!metaData.preSort)
|
|
1849
1845
|
.sort(({ preSort: ps1 }, { preSort: ps2 }) => (ps1.precedence || Number.MAX_VALUE) - (ps2.precedence || Number.MAX_VALUE))
|
|
1850
|
-
.map(({ key, preSort
|
|
1846
|
+
.map(({ key, preSort }) => ({ active: key, direction: preSort.direction }));
|
|
1851
1847
|
};
|
|
1852
1848
|
setSort = this.updater((state, { key, direction }) => {
|
|
1853
1849
|
const sortArray = state.sorted.filter(s => s.active !== key);
|
|
@@ -1874,8 +1870,17 @@ class TableStore extends ComponentStore {
|
|
|
1874
1870
|
setPageSize = this.updater((state, pageSize) => ({ ...state, pageSize, userDefined: { ...state.userDefined, pageSize } }));
|
|
1875
1871
|
getPageSize = this.select(state => state.userDefined.pageSize || state.pageSize);
|
|
1876
1872
|
updateState = this.updater(this.updateStateFunc);
|
|
1873
|
+
cleanPersistedState(state, pState) {
|
|
1874
|
+
const metas = Object.values(state.metaData);
|
|
1875
|
+
const filters = Object.values(pState.filters).filter(fltr => isCustomFilter(fltr) || metas.some(m => m.key === fltr.key)).reduce((obj, filter) => {
|
|
1876
|
+
obj[filter.filterId] = pState.filters[filter.filterId];
|
|
1877
|
+
return obj;
|
|
1878
|
+
}, {});
|
|
1879
|
+
const sorted = pState.sorted.filter(s => metas.some(m => m.key === s.active));
|
|
1880
|
+
return ({ ...pState, filters, sorted });
|
|
1881
|
+
}
|
|
1877
1882
|
updateStateFromPersistedState = this.updater((state, persistedState) => {
|
|
1878
|
-
const incomingTableState = cleanPersistedState(state, persistedState);
|
|
1883
|
+
const incomingTableState = this.cleanPersistedState(state, persistedState);
|
|
1879
1884
|
const newState = this.updateStateFunc(state, incomingTableState);
|
|
1880
1885
|
newState.initializationState = state.initializationState === InitializationState.MetaDataLoaded ? InitializationState.LoadedFromStore : state.initializationState;
|
|
1881
1886
|
return newState;
|
|
@@ -1918,7 +1923,7 @@ class TableStore extends ComponentStore {
|
|
|
1918
1923
|
this.runOnceWhen(stateIs(InitializationState.Ready), func);
|
|
1919
1924
|
}
|
|
1920
1925
|
setMetaData = this.updater((state, md) => {
|
|
1921
|
-
const metaData = md
|
|
1926
|
+
const metaData = (Array.isArray(md) ? [...md] : [md])
|
|
1922
1927
|
.reduce((prev, curr) => {
|
|
1923
1928
|
if (prev[curr.key]) {
|
|
1924
1929
|
prev[curr.key] = this.mergeMeta(prev[curr.key], curr);
|
|
@@ -2023,80 +2028,43 @@ class TableStore extends ComponentStore {
|
|
|
2023
2028
|
$isVirtual = this.selectSignal(state => state.notPersistedTableSettings.useVirtualScroll === true || state.notPersistedTableSettings.useVirtualScroll?.virtualAsDefault || state.showAll);
|
|
2024
2029
|
$viewType = this.selectSignal(state => {
|
|
2025
2030
|
const usePaginator = state.notPersistedTableSettings.usePaginator;
|
|
2026
|
-
|
|
2027
|
-
return 'virtual all';
|
|
2028
|
-
}
|
|
2029
|
-
else if (this.$isVirtual() && usePaginator) {
|
|
2030
|
-
return 'virtual paginator';
|
|
2031
|
-
}
|
|
2032
|
-
else if (usePaginator) {
|
|
2033
|
-
return 'paginator';
|
|
2034
|
-
}
|
|
2035
|
-
else {
|
|
2036
|
-
return 'all';
|
|
2037
|
-
}
|
|
2031
|
+
return (state.showAll || (this.$isVirtual() && !usePaginator)) ? 'all' : this.$isVirtual() ? 'virtual paginator' : 'paginator';
|
|
2038
2032
|
});
|
|
2039
2033
|
viewType$ = toObservable(this.$viewType);
|
|
2040
|
-
$orderedVisibleColumns = this.selectSignal(this.$metaData, this.$userDefinedOrder, this.$hiddenKeys, (m, u, h) => orderedVisibleMetaData(m, u, h).map(md => md.key), { equal: (a, b) => b.length === a.length && b.every((s, i) => a[i] === s) });
|
|
2041
2034
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: TableStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2042
2035
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: TableStore });
|
|
2043
2036
|
}
|
|
2044
2037
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: TableStore, decorators: [{
|
|
2045
2038
|
type: Injectable
|
|
2046
2039
|
}], ctorParameters: () => [] });
|
|
2047
|
-
const orderedVisibleColumns = (state) =>
|
|
2048
|
-
const
|
|
2049
|
-
const ordered =
|
|
2040
|
+
const orderedVisibleColumns = (state) => orderedVisibleMetaData(state).map(md => md.key);
|
|
2041
|
+
const orderedVisibleMetaData = (state) => {
|
|
2042
|
+
const ordered = orderMetaData(state);
|
|
2050
2043
|
const orderedVisible = ordered
|
|
2051
2044
|
.filter(metaData => !state.hiddenKeys.includes(metaData.key) && state.metaData[metaData.key].fieldType !== FieldType.Hidden);
|
|
2052
2045
|
return orderedVisible;
|
|
2053
2046
|
};
|
|
2054
|
-
const
|
|
2055
|
-
|
|
2056
|
-
const
|
|
2057
|
-
.filter(m => !hiddenKeys.includes(m.key) && metaData[m.key].fieldType !== FieldType.Hidden);
|
|
2058
|
-
return orderedVisible;
|
|
2059
|
-
};
|
|
2060
|
-
const orderedCodeVisibleMetaData = (state) => orderStateMetaData(state).filter(md => md.fieldType !== FieldType.Hidden);
|
|
2061
|
-
const orderStateMetaData = (state) => {
|
|
2062
|
-
return orderMetaData(state.metaData, state.userDefined.order);
|
|
2063
|
-
};
|
|
2064
|
-
const orderMetaData = (metaData, userDefined) => {
|
|
2065
|
-
const userOrderArr = Object.entries(userDefined);
|
|
2047
|
+
const orderedCodeVisibleMetaData = (state) => orderMetaData(state).filter(md => md.fieldType !== FieldType.Hidden);
|
|
2048
|
+
const orderMetaData = (state) => {
|
|
2049
|
+
const userOrderArr = Object.entries(state.userDefined.order);
|
|
2066
2050
|
return userOrderArr.length ?
|
|
2067
|
-
Object.values(metaData).sort((a, b) => {
|
|
2068
|
-
const orderA = userDefined[a.key];
|
|
2069
|
-
const orderB = userDefined[b.key];
|
|
2070
|
-
|
|
2051
|
+
Object.values(state.metaData).sort((a, b) => {
|
|
2052
|
+
const orderA = state.userDefined.order[a.key];
|
|
2053
|
+
const orderB = state.userDefined.order[b.key];
|
|
2054
|
+
if (orderA == null && orderB == null) {
|
|
2055
|
+
return 0;
|
|
2056
|
+
}
|
|
2057
|
+
if (orderA == null) {
|
|
2058
|
+
return 1;
|
|
2059
|
+
}
|
|
2060
|
+
if (orderB == null) {
|
|
2061
|
+
return -1;
|
|
2062
|
+
}
|
|
2063
|
+
return state.userDefined.order[a.key] - state.userDefined.order[b.key];
|
|
2071
2064
|
})
|
|
2072
2065
|
:
|
|
2073
|
-
Object.values(metaData).sort((a, b) =>
|
|
2074
|
-
const orderA = a.order;
|
|
2075
|
-
const orderB = b.order;
|
|
2076
|
-
return order(orderA, orderB);
|
|
2077
|
-
});
|
|
2066
|
+
Object.values(state.metaData).sort((a, b) => a.order - b.order);
|
|
2078
2067
|
};
|
|
2079
|
-
function order(orderA, orderB) {
|
|
2080
|
-
if (orderA == null && orderB == null) {
|
|
2081
|
-
return 0;
|
|
2082
|
-
}
|
|
2083
|
-
if (orderA == null) {
|
|
2084
|
-
return 1;
|
|
2085
|
-
}
|
|
2086
|
-
if (orderB == null) {
|
|
2087
|
-
return -1;
|
|
2088
|
-
}
|
|
2089
|
-
return orderA - orderB;
|
|
2090
|
-
}
|
|
2091
|
-
function cleanPersistedState(state, pState) {
|
|
2092
|
-
const metas = Object.values(state.metaData);
|
|
2093
|
-
const filters = Object.values(pState.filters).filter(fltr => isCustomFilter(fltr) || metas.some(m => m.key === fltr.key)).reduce((obj, filter) => {
|
|
2094
|
-
obj[filter.filterId] = pState.filters[filter.filterId];
|
|
2095
|
-
return obj;
|
|
2096
|
-
}, {});
|
|
2097
|
-
const sorted = pState.sorted.filter(s => metas.some(m => m.key === s.active));
|
|
2098
|
-
return ({ ...pState, filters, sorted });
|
|
2099
|
-
}
|
|
2100
2068
|
|
|
2101
2069
|
class MultiSortDirective extends MatSort {
|
|
2102
2070
|
state = inject(TableStore);
|
|
@@ -2663,13 +2631,13 @@ class DateFilterComponent {
|
|
|
2663
2631
|
info;
|
|
2664
2632
|
CurrentFilterType;
|
|
2665
2633
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DateFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2666
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: DateFilterComponent, isStandalone: true, selector: "tb-date-filter", inputs: { info: "info", CurrentFilterType: "CurrentFilterType" }, ngImport: i0, template: "@if (CurrentFilterType !== FilterType.DateBetween && CurrentFilterType !== FilterType.IsNull) {\
|
|
2634
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: DateFilterComponent, isStandalone: true, selector: "tb-date-filter", inputs: { info: "info", CurrentFilterType: "CurrentFilterType" }, ngImport: i0, template: "@if (CurrentFilterType !== FilterType.DateBetween && CurrentFilterType !== FilterType.IsNull) {\n <mat-form-field>\n <input matInput name=\"filterValue\" [ngModel]=\"info.filterValue\" [matDatepicker]=\"cal\"/>\n <mat-datepicker-toggle class=\"small-button date-toggle\" matSuffix [for]=\"cal\" preventEnter />\n <mat-datepicker #cal />\n </mat-form-field>\n}\n@if(CurrentFilterType === FilterType.DateBetween){\n <ng-container ngModelGroup=\"filterValue\">\n <mat-form-field class=\"my-filter\" >\n <input matInput name=\"Start\" [ngModel]=\"info.filterValue?.Start\" placeholder=\"From\" [matDatepicker]=\"fromVal\"\n (click)=\"fromVal.open()\"/>\n <mat-datepicker-toggle matSuffix class=\"small-button date-toggle\" [for]=\"fromVal\" preventEnter />\n <mat-datepicker #fromVal></mat-datepicker>\n </mat-form-field>\n <mat-form-field>\n <input matInput name=\"End\" [ngModel]=\"info.filterValue?.End\" placeholder=\"To\" [matDatepicker]=\"toVal\" (click)=\"toVal.open()\"/>\n <mat-datepicker-toggle matSuffix class=\"small-button date-toggle\" [for]=\"toVal\" preventEnter />\n <mat-datepicker #toVal />\n </mat-form-field>\n </ng-container>\n}\n\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ 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"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgModelGroup, selector: "[ngModelGroup]", inputs: ["ngModelGroup"], exportAs: ["ngModelGroup"] }, { 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"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2667
2635
|
}
|
|
2668
2636
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DateFilterComponent, decorators: [{
|
|
2669
2637
|
type: Component,
|
|
2670
2638
|
args: [{ selector: 'tb-date-filter', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], standalone: true, imports: [
|
|
2671
2639
|
MatInputModule, FormsModule, MatDatepickerModule, PreventEnterDirective
|
|
2672
|
-
], template: "@if (CurrentFilterType !== FilterType.DateBetween && CurrentFilterType !== FilterType.IsNull) {\
|
|
2640
|
+
], template: "@if (CurrentFilterType !== FilterType.DateBetween && CurrentFilterType !== FilterType.IsNull) {\n <mat-form-field>\n <input matInput name=\"filterValue\" [ngModel]=\"info.filterValue\" [matDatepicker]=\"cal\"/>\n <mat-datepicker-toggle class=\"small-button date-toggle\" matSuffix [for]=\"cal\" preventEnter />\n <mat-datepicker #cal />\n </mat-form-field>\n}\n@if(CurrentFilterType === FilterType.DateBetween){\n <ng-container ngModelGroup=\"filterValue\">\n <mat-form-field class=\"my-filter\" >\n <input matInput name=\"Start\" [ngModel]=\"info.filterValue?.Start\" placeholder=\"From\" [matDatepicker]=\"fromVal\"\n (click)=\"fromVal.open()\"/>\n <mat-datepicker-toggle matSuffix class=\"small-button date-toggle\" [for]=\"fromVal\" preventEnter />\n <mat-datepicker #fromVal></mat-datepicker>\n </mat-form-field>\n <mat-form-field>\n <input matInput name=\"End\" [ngModel]=\"info.filterValue?.End\" placeholder=\"To\" [matDatepicker]=\"toVal\" (click)=\"toVal.open()\"/>\n <mat-datepicker-toggle matSuffix class=\"small-button date-toggle\" [for]=\"toVal\" preventEnter />\n <mat-datepicker #toVal />\n </mat-form-field>\n </ng-container>\n}\n\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"] }]
|
|
2673
2641
|
}], propDecorators: { info: [{
|
|
2674
2642
|
type: Input
|
|
2675
2643
|
}], CurrentFilterType: [{
|
|
@@ -2720,7 +2688,7 @@ class InFilterComponent {
|
|
|
2720
2688
|
provide: NG_VALUE_ACCESSOR,
|
|
2721
2689
|
useExisting: InFilterComponent,
|
|
2722
2690
|
multi: true
|
|
2723
|
-
}], ngImport: i0, template: "<div class=inline>\
|
|
2691
|
+
}], ngImport: i0, template: "<div class=inline>\n @for (val of value; track $index) {\n <div>\n @if(type === FieldType.Number || type === FieldType.Currency){\n <input [ngModel]=\"val\" (ngModelChange)=\"onValueChange($index, $event)\"\n [readonly]=\"$index + 1 < value.length\" type=\"number\" [ngModelOptions]=\"{standalone:true}\" [autoFocus]=\"$index === value.length - 1\"/>\n }\n @else {\n <input [ngModel]=\"val\" (ngModelChange)=\"onValueChange($index ,$event)\"\n [readonly]=\"$index + 1 < value.length\" type=\"string\" [ngModelOptions]=\"{standalone:true}\"\n #input [autoFocus]=\"$index === value.length - 1\" />\n }\n </div>\n <button [disabled]=\"value.length <= 1\" (click)=\"removeInput($index)\">-</button>\n @if ($index === value.length - 1) {\n <button [disabled]=\"val == undefined || val === ''\" (click)=\"addInput()\">+</button>\n }\n \n }\n</div>\n", styles: [".inline{display:inline-block}\n"], dependencies: [{ 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: AutoFocusDirective, selector: "[autoFocus]", inputs: ["autoFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2724
2692
|
}
|
|
2725
2693
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: InFilterComponent, decorators: [{
|
|
2726
2694
|
type: Component,
|
|
@@ -2730,7 +2698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
2730
2698
|
multi: true
|
|
2731
2699
|
}], standalone: true, imports: [
|
|
2732
2700
|
FormsModule, AutoFocusDirective
|
|
2733
|
-
], template: "<div class=inline>\
|
|
2701
|
+
], template: "<div class=inline>\n @for (val of value; track $index) {\n <div>\n @if(type === FieldType.Number || type === FieldType.Currency){\n <input [ngModel]=\"val\" (ngModelChange)=\"onValueChange($index, $event)\"\n [readonly]=\"$index + 1 < value.length\" type=\"number\" [ngModelOptions]=\"{standalone:true}\" [autoFocus]=\"$index === value.length - 1\"/>\n }\n @else {\n <input [ngModel]=\"val\" (ngModelChange)=\"onValueChange($index ,$event)\"\n [readonly]=\"$index + 1 < value.length\" type=\"string\" [ngModelOptions]=\"{standalone:true}\"\n #input [autoFocus]=\"$index === value.length - 1\" />\n }\n </div>\n <button [disabled]=\"value.length <= 1\" (click)=\"removeInput($index)\">-</button>\n @if ($index === value.length - 1) {\n <button [disabled]=\"val == undefined || val === ''\" (click)=\"addInput()\">+</button>\n }\n \n }\n</div>\n", styles: [".inline{display:inline-block}\n"] }]
|
|
2734
2702
|
}], ctorParameters: () => [], propDecorators: { type: [{
|
|
2735
2703
|
type: Input
|
|
2736
2704
|
}] } });
|
|
@@ -2741,13 +2709,13 @@ class NumberFilterComponent {
|
|
|
2741
2709
|
CurrentFilterType;
|
|
2742
2710
|
info;
|
|
2743
2711
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: NumberFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2744
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: NumberFilterComponent, isStandalone: true, selector: "tb-number-filter", inputs: { CurrentFilterType: "CurrentFilterType", info: "info" }, ngImport: i0, template: "@if(CurrentFilterType !== FilterType.NumberBetween && CurrentFilterType !== FilterType.IsNull && CurrentFilterType !== FilterType.In){\
|
|
2712
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: NumberFilterComponent, isStandalone: true, selector: "tb-number-filter", inputs: { CurrentFilterType: "CurrentFilterType", info: "info" }, ngImport: i0, template: "@if(CurrentFilterType !== FilterType.NumberBetween && CurrentFilterType !== FilterType.IsNull && CurrentFilterType !== FilterType.In){\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"filterValue\" [ngModel]=\"info.filterValue\" type=\"number\"/>\n </mat-form-field>\n}\n@if(CurrentFilterType === FilterType.NumberBetween){\n <ng-container ngModelGroup=\"filterValue\" >\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"Start\" [ngModel]=\"info.filterValue?.Start\" placeholder=\"Start\" type=\"number\"/>\n </mat-form-field>\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"End\" [ngModel]=\"info.filterValue?.End\" placeholder=\"End\" type=\"number\"/>\n </mat-form-field>\n </ng-container>\n}\n\n@if (CurrentFilterType === FilterType.In) {\n <lib-in-filter name='filterValue' [type]=\"FieldType.Number\" [(ngModel)]='info.filterValue' />\n}\n", styles: [".switch{display:inline-block}.my-filter{margin-right:15px}.inline{display:inline-block}\n"], dependencies: [{ 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"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgModelGroup, selector: "[ngModelGroup]", inputs: ["ngModelGroup"], exportAs: ["ngModelGroup"] }, { kind: "component", type: InFilterComponent, selector: "lib-in-filter", inputs: ["type"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2745
2713
|
}
|
|
2746
2714
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: NumberFilterComponent, decorators: [{
|
|
2747
2715
|
type: Component,
|
|
2748
2716
|
args: [{ selector: 'tb-number-filter', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], standalone: true, imports: [
|
|
2749
2717
|
MatInputModule, FormsModule, InFilterComponent
|
|
2750
|
-
], template: "@if(CurrentFilterType !== FilterType.NumberBetween && CurrentFilterType !== FilterType.IsNull && CurrentFilterType !== FilterType.In){\
|
|
2718
|
+
], template: "@if(CurrentFilterType !== FilterType.NumberBetween && CurrentFilterType !== FilterType.IsNull && CurrentFilterType !== FilterType.In){\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"filterValue\" [ngModel]=\"info.filterValue\" type=\"number\"/>\n </mat-form-field>\n}\n@if(CurrentFilterType === FilterType.NumberBetween){\n <ng-container ngModelGroup=\"filterValue\" >\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"Start\" [ngModel]=\"info.filterValue?.Start\" placeholder=\"Start\" type=\"number\"/>\n </mat-form-field>\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"End\" [ngModel]=\"info.filterValue?.End\" placeholder=\"End\" type=\"number\"/>\n </mat-form-field>\n </ng-container>\n}\n\n@if (CurrentFilterType === FilterType.In) {\n <lib-in-filter name='filterValue' [type]=\"FieldType.Number\" [(ngModel)]='info.filterValue' />\n}\n", styles: [".switch{display:inline-block}.my-filter{margin-right:15px}.inline{display:inline-block}\n"] }]
|
|
2751
2719
|
}], propDecorators: { CurrentFilterType: [{
|
|
2752
2720
|
type: Input
|
|
2753
2721
|
}], info: [{
|
|
@@ -2759,13 +2727,13 @@ class DateTimeFilterComponent {
|
|
|
2759
2727
|
info;
|
|
2760
2728
|
CurrentFilterType;
|
|
2761
2729
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DateTimeFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2762
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: DateTimeFilterComponent, isStandalone: true, selector: "tb-date-time-filter", inputs: { info: "info", CurrentFilterType: "CurrentFilterType" }, ngImport: i0, template: "@if(CurrentFilterType !== FilterType.DateTimeBetween && CurrentFilterType !== FilterType.IsNull){\
|
|
2730
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: DateTimeFilterComponent, isStandalone: true, selector: "tb-date-time-filter", inputs: { info: "info", CurrentFilterType: "CurrentFilterType" }, ngImport: i0, template: "@if(CurrentFilterType !== FilterType.DateTimeBetween && CurrentFilterType !== FilterType.IsNull){\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue\" preventEnter name=\"filterValue\" class=\"op-date-time-input\"/>\n}\n@if(CurrentFilterType === FilterType.DateTimeBetween){\n <ng-container ngModelGroup=\"filterValue\">\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.Start\" preventEnter name=\"Start\" class=\"op-date-time-input\"/>\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.End\" preventEnter name=\"End\" class=\"op-date-time-input\"/>\n </ng-container>\n}", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgModelGroup, selector: "[ngModelGroup]", inputs: ["ngModelGroup"], exportAs: ["ngModelGroup"] }], viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2763
2731
|
}
|
|
2764
2732
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DateTimeFilterComponent, decorators: [{
|
|
2765
2733
|
type: Component,
|
|
2766
2734
|
args: [{ selector: 'tb-date-time-filter', changeDetection: ChangeDetectionStrategy.OnPush, viewProviders: [{ provide: ControlContainer, useExisting: NgForm }], standalone: true, imports: [
|
|
2767
2735
|
FormsModule, PreventEnterDirective
|
|
2768
|
-
], template: "@if(CurrentFilterType !== FilterType.DateTimeBetween && CurrentFilterType !== FilterType.IsNull){\
|
|
2736
|
+
], template: "@if(CurrentFilterType !== FilterType.DateTimeBetween && CurrentFilterType !== FilterType.IsNull){\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue\" preventEnter name=\"filterValue\" class=\"op-date-time-input\"/>\n}\n@if(CurrentFilterType === FilterType.DateTimeBetween){\n <ng-container ngModelGroup=\"filterValue\">\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.Start\" preventEnter name=\"Start\" class=\"op-date-time-input\"/>\n <input type=\"datetime-local\" [ngModel]=\"info.filterValue?.End\" preventEnter name=\"End\" class=\"op-date-time-input\"/>\n </ng-container>\n}", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"] }]
|
|
2769
2737
|
}], propDecorators: { info: [{
|
|
2770
2738
|
type: Input
|
|
2771
2739
|
}], CurrentFilterType: [{
|
|
@@ -2824,30 +2792,30 @@ class InListFilterComponent {
|
|
|
2824
2792
|
provide: NG_VALUE_ACCESSOR,
|
|
2825
2793
|
useExisting: InListFilterComponent,
|
|
2826
2794
|
multi: true
|
|
2827
|
-
}], ngImport: i0, template: `
|
|
2828
|
-
@for (item of keyValues$ | async| keyvalue; track item.key) {
|
|
2829
|
-
<div>
|
|
2830
|
-
<mat-checkbox [checked]='selectedKeys.includes(item.key)' stop-propagation (change)='selectFilterChanged($event, item.key)' >
|
|
2831
|
-
{{metaData.fieldType === FieldType.Enum ? (item.value | spaceCase) : item.value}}
|
|
2832
|
-
</mat-checkbox>
|
|
2833
|
-
</div>
|
|
2834
|
-
}
|
|
2835
|
-
|
|
2795
|
+
}], ngImport: i0, template: `
|
|
2796
|
+
@for (item of keyValues$ | async| keyvalue; track item.key) {
|
|
2797
|
+
<div>
|
|
2798
|
+
<mat-checkbox [checked]='selectedKeys.includes(item.key)' stop-propagation (change)='selectFilterChanged($event, item.key)' >
|
|
2799
|
+
{{metaData.fieldType === FieldType.Enum ? (item.value | spaceCase) : item.value}}
|
|
2800
|
+
</mat-checkbox>
|
|
2801
|
+
</div>
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2836
2804
|
`, isInline: true, dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i1$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2837
2805
|
}
|
|
2838
2806
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: InListFilterComponent, decorators: [{
|
|
2839
2807
|
type: Component,
|
|
2840
2808
|
args: [{
|
|
2841
2809
|
selector: 'tb-in-list-filter , [tb-in-list-filter]',
|
|
2842
|
-
template: `
|
|
2843
|
-
@for (item of keyValues$ | async| keyvalue; track item.key) {
|
|
2844
|
-
<div>
|
|
2845
|
-
<mat-checkbox [checked]='selectedKeys.includes(item.key)' stop-propagation (change)='selectFilterChanged($event, item.key)' >
|
|
2846
|
-
{{metaData.fieldType === FieldType.Enum ? (item.value | spaceCase) : item.value}}
|
|
2847
|
-
</mat-checkbox>
|
|
2848
|
-
</div>
|
|
2849
|
-
}
|
|
2850
|
-
|
|
2810
|
+
template: `
|
|
2811
|
+
@for (item of keyValues$ | async| keyvalue; track item.key) {
|
|
2812
|
+
<div>
|
|
2813
|
+
<mat-checkbox [checked]='selectedKeys.includes(item.key)' stop-propagation (change)='selectFilterChanged($event, item.key)' >
|
|
2814
|
+
{{metaData.fieldType === FieldType.Enum ? (item.value | spaceCase) : item.value}}
|
|
2815
|
+
</mat-checkbox>
|
|
2816
|
+
</div>
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2851
2819
|
`,
|
|
2852
2820
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2853
2821
|
providers: [{
|
|
@@ -2885,7 +2853,7 @@ class FilterComponent {
|
|
|
2885
2853
|
}
|
|
2886
2854
|
}
|
|
2887
2855
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2888
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: FilterComponent, isStandalone: true, selector: "tb-filter", inputs: { $filter: { classPropertyName: "$filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { close: "close" }, ngImport: i0, template: "@let filter = $filter();\r\n@let currentFilterType = $currentFilterType();\r\n\r\n@if (filter) {\r\n<mat-card appearance=\"outlined\" class=\"filter-card\">\r\n <mat-card-content>\r\n <form #form=\"ngForm\" (keydown.enter)=\"onEnter(form.value,$event)\" (keydown.escape)=\"close.emit()\">\r\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"filter.filterId\" />\r\n <input type=\"hidden\" name=\"key\" [ngModel]=\"filter.key\" />\r\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"filter.fieldType\" />\r\n <div class=\"head-row\" >\r\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\r\n <button class=\"cancel-button small-button\" color=\"primary\" mat-icon-button (click)=\"close.emit();\" type=\"button\"\r\n matTooltip=\"Close\">\r\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"filter-row\">\r\n <div class=\"inline\">\r\n <mat-form-field class=\"my-filter\" >\r\n <mat-select placeholder=\"Select Filter Type\" name=\"filterType\" [ngModel]=\"$currentFilterType()\" (ngModelChange)=\"$enteredFilterType.set($event)\" [panelWidth]=\"null\">\r\n @for (kvp of filterTypes[filter.fieldType]; track kvp) {\r\n <mat-option [value]=\"kvp\">\r\n {{ kvp }}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n @if(filter.fieldType === FieldType.String || filter.fieldType === FieldType.Array || filter.fieldType === FieldType.Link ||\r\n filter.fieldType === FieldType.Unknown || filter.fieldType === FieldType.PhoneNumber) {\r\n <ng-container *ngTemplateOutlet=\"String\" />\r\n }\r\n @else if(filter.fieldType === FieldType.Number || filter.fieldType === FieldType.Currency){\r\n <tb-number-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" />\r\n }\r\n @else if(filter.fieldType === FieldType.Boolean){\r\n <ng-container *ngTemplateOutlet=\"Boolean\" />\r\n }\r\n @else if(filter.fieldType === FieldType.Date){\r\n <tb-date-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" />\r\n }\r\n @else if(filter.fieldType === FieldType.DateTime){\r\n <tb-date-time-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" />\r\n }\r\n @else if(filter.fieldType === FieldType.Enum){\r\n <ng-container *ngTemplateOutlet=\"Enum\" />\r\n }\r\n\r\n @if(currentFilterType === FilterType.IsNull){\r\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\">\r\n <mat-radio-button [value]=\"true\">True</mat-radio-button>\r\n <mat-radio-button [value]=\"false\">False</mat-radio-button>\r\n </mat-radio-group>\r\n }\r\n </div>\r\n <button mat-button (click)=\"state.addFilter(form.value)\" disableRipple [disabled]=\"form.value.filterValue==undefined || !form.value.filterType\">\r\n Apply\r\n </button>\r\n \r\n \r\n <ng-template #String>\r\n @if(currentFilterType !== FilterType.IsNull && currentFilterType !== FilterType.In){\r\n <mat-form-field class=\"my-filter\">\r\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\r\n </mat-form-field>\r\n } @else if(currentFilterType === FilterType.In) {\r\n <lib-in-filter [type]=\"FieldType.String\" name='filterValue' [(ngModel)]=\"filter.filterValue\" />\r\n }\r\n </ng-template>\r\n \r\n <ng-template #Boolean >\r\n @if(currentFilterType === FilterType.BooleanEquals){\r\n <div class=\"switch\">\r\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" >\r\n <mat-radio-button [value]=\"true\" preventEnter>True</mat-radio-button>\r\n <mat-radio-button [value]=\"false\" preventEnter>False</mat-radio-button>\r\n </mat-radio-group>\r\n </div>\r\n }\r\n </ng-template>\r\n <ng-template #Enum>\r\n @if(currentFilterType === FilterType.In){\r\n <tb-in-list-filter [key]='filter.key' name='filterValue' [(ngModel)]='filter.filterValue' ></tb-in-list-filter>\r\n\r\n }\r\n </ng-template>\r\n </form>\r\n </mat-card-content>\r\n</mat-card>\r\n}\r\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: "pipe", type: SpaceCasePipe, name: "spaceCase" }, { 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: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: NumberFilterComponent, selector: "tb-number-filter", inputs: ["CurrentFilterType", "info"] }, { kind: "component", type: DateFilterComponent, selector: "tb-date-filter", inputs: ["info", "CurrentFilterType"] }, { kind: "component", type: DateTimeFilterComponent, selector: "tb-date-time-filter", inputs: ["info", "CurrentFilterType"] }, { 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: "component", type: InFilterComponent, selector: "lib-in-filter", inputs: ["type"] }, { kind: "component", type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: ["key"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2856
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: FilterComponent, isStandalone: true, selector: "tb-filter", inputs: { $filter: { classPropertyName: "$filter", publicName: "filter", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { close: "close" }, ngImport: i0, template: "@let filter = $filter();\n@let currentFilterType = $currentFilterType();\n\n@if (filter) {\n<mat-card appearance=\"outlined\" class=\"filter-card\">\n <mat-card-content>\n <form #form=\"ngForm\" (keydown.enter)=\"onEnter(form.value,$event)\" (keydown.escape)=\"close.emit()\">\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"filter.filterId\" />\n <input type=\"hidden\" name=\"key\" [ngModel]=\"filter.key\" />\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"filter.fieldType\" />\n <div class=\"head-row\" >\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\n <button class=\"cancel-button small-button\" color=\"primary\" mat-icon-button (click)=\"close.emit();\" type=\"button\"\n matTooltip=\"Close\">\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\n </button>\n </div>\n <div class=\"filter-row\">\n <div class=\"inline\">\n <mat-form-field class=\"my-filter\" >\n <mat-select placeholder=\"Select Filter Type\" name=\"filterType\" [ngModel]=\"$currentFilterType()\" (ngModelChange)=\"$enteredFilterType.set($event)\" [panelWidth]=\"null\">\n @for (kvp of filterTypes[filter.fieldType]; track kvp) {\n <mat-option [value]=\"kvp\">\n {{ kvp }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n @if(filter.fieldType === FieldType.String || filter.fieldType === FieldType.Array || filter.fieldType === FieldType.Link ||\n filter.fieldType === FieldType.Unknown || filter.fieldType === FieldType.PhoneNumber) {\n <ng-container *ngTemplateOutlet=\"String\" />\n }\n @else if(filter.fieldType === FieldType.Number || filter.fieldType === FieldType.Currency){\n <tb-number-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" />\n }\n @else if(filter.fieldType === FieldType.Boolean){\n <ng-container *ngTemplateOutlet=\"Boolean\" />\n }\n @else if(filter.fieldType === FieldType.Date){\n <tb-date-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" />\n }\n @else if(filter.fieldType === FieldType.DateTime){\n <tb-date-time-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" />\n }\n @else if(filter.fieldType === FieldType.Enum){\n <ng-container *ngTemplateOutlet=\"Enum\" />\n }\n\n @if(currentFilterType === FilterType.IsNull){\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\">\n <mat-radio-button [value]=\"true\">True</mat-radio-button>\n <mat-radio-button [value]=\"false\">False</mat-radio-button>\n </mat-radio-group>\n }\n </div>\n <button mat-button (click)=\"state.addFilter(form.value)\" disableRipple [disabled]=\"form.value.filterValue==undefined || !form.value.filterType\">\n Apply\n </button>\n \n \n <ng-template #String>\n @if(currentFilterType !== FilterType.IsNull && currentFilterType !== FilterType.In){\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\n </mat-form-field>\n } @else if(currentFilterType === FilterType.In) {\n <lib-in-filter [type]=\"FieldType.String\" name='filterValue' [(ngModel)]=\"filter.filterValue\" />\n }\n </ng-template>\n \n <ng-template #Boolean >\n @if(currentFilterType === FilterType.BooleanEquals){\n <div class=\"switch\">\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" >\n <mat-radio-button [value]=\"true\" preventEnter>True</mat-radio-button>\n <mat-radio-button [value]=\"false\" preventEnter>False</mat-radio-button>\n </mat-radio-group>\n </div>\n }\n </ng-template>\n <ng-template #Enum>\n @if(currentFilterType === FilterType.In){\n <tb-in-list-filter [key]='filter.key' name='filterValue' [(ngModel)]='filter.filterValue' ></tb-in-list-filter>\n\n }\n </ng-template>\n </form>\n </mat-card-content>\n</mat-card>\n}\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$3.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: "pipe", type: SpaceCasePipe, name: "spaceCase" }, { 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: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i8.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: NumberFilterComponent, selector: "tb-number-filter", inputs: ["CurrentFilterType", "info"] }, { kind: "component", type: DateFilterComponent, selector: "tb-date-filter", inputs: ["info", "CurrentFilterType"] }, { kind: "component", type: DateTimeFilterComponent, selector: "tb-date-time-filter", inputs: ["info", "CurrentFilterType"] }, { 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: "component", type: InFilterComponent, selector: "lib-in-filter", inputs: ["type"] }, { kind: "component", type: InListFilterComponent, selector: "tb-in-list-filter , [tb-in-list-filter]", inputs: ["key"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2889
2857
|
}
|
|
2890
2858
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FilterComponent, decorators: [{
|
|
2891
2859
|
type: Component,
|
|
@@ -2894,7 +2862,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
2894
2862
|
MatInputModule, MatSelectModule, KeyValuePipe, NumberFilterComponent,
|
|
2895
2863
|
DateFilterComponent, DateTimeFilterComponent, MatRadioModule, InFilterComponent, InListFilterComponent,
|
|
2896
2864
|
PreventEnterDirective, NgTemplateOutlet
|
|
2897
|
-
], template: "@let filter = $filter();\
|
|
2865
|
+
], template: "@let filter = $filter();\n@let currentFilterType = $currentFilterType();\n\n@if (filter) {\n<mat-card appearance=\"outlined\" class=\"filter-card\">\n <mat-card-content>\n <form #form=\"ngForm\" (keydown.enter)=\"onEnter(form.value,$event)\" (keydown.escape)=\"close.emit()\">\n <input type=\"hidden\" name=\"filterId\" [ngModel]=\"filter.filterId\" />\n <input type=\"hidden\" name=\"key\" [ngModel]=\"filter.key\" />\n <input type=\"hidden\" name=\"fieldType\" [ngModel]=\"filter.fieldType\" />\n <div class=\"head-row\" >\n <h4 class=\"filter-name\">{{(filter.key | spaceCase)}} Filter</h4>\n <button class=\"cancel-button small-button\" color=\"primary\" mat-icon-button (click)=\"close.emit();\" type=\"button\"\n matTooltip=\"Close\">\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\n </button>\n </div>\n <div class=\"filter-row\">\n <div class=\"inline\">\n <mat-form-field class=\"my-filter\" >\n <mat-select placeholder=\"Select Filter Type\" name=\"filterType\" [ngModel]=\"$currentFilterType()\" (ngModelChange)=\"$enteredFilterType.set($event)\" [panelWidth]=\"null\">\n @for (kvp of filterTypes[filter.fieldType]; track kvp) {\n <mat-option [value]=\"kvp\">\n {{ kvp }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n @if(filter.fieldType === FieldType.String || filter.fieldType === FieldType.Array || filter.fieldType === FieldType.Link ||\n filter.fieldType === FieldType.Unknown || filter.fieldType === FieldType.PhoneNumber) {\n <ng-container *ngTemplateOutlet=\"String\" />\n }\n @else if(filter.fieldType === FieldType.Number || filter.fieldType === FieldType.Currency){\n <tb-number-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" />\n }\n @else if(filter.fieldType === FieldType.Boolean){\n <ng-container *ngTemplateOutlet=\"Boolean\" />\n }\n @else if(filter.fieldType === FieldType.Date){\n <tb-date-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" />\n }\n @else if(filter.fieldType === FieldType.DateTime){\n <tb-date-time-filter [info]=\"filter\" [CurrentFilterType]=\"currentFilterType!\" />\n }\n @else if(filter.fieldType === FieldType.Enum){\n <ng-container *ngTemplateOutlet=\"Enum\" />\n }\n\n @if(currentFilterType === FilterType.IsNull){\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\">\n <mat-radio-button [value]=\"true\">True</mat-radio-button>\n <mat-radio-button [value]=\"false\">False</mat-radio-button>\n </mat-radio-group>\n }\n </div>\n <button mat-button (click)=\"state.addFilter(form.value)\" disableRipple [disabled]=\"form.value.filterValue==undefined || !form.value.filterType\">\n Apply\n </button>\n \n \n <ng-template #String>\n @if(currentFilterType !== FilterType.IsNull && currentFilterType !== FilterType.In){\n <mat-form-field class=\"my-filter\">\n <input matInput name=\"filterValue\" [ngModel]=\"filter.filterValue\" />\n </mat-form-field>\n } @else if(currentFilterType === FilterType.In) {\n <lib-in-filter [type]=\"FieldType.String\" name='filterValue' [(ngModel)]=\"filter.filterValue\" />\n }\n </ng-template>\n \n <ng-template #Boolean >\n @if(currentFilterType === FilterType.BooleanEquals){\n <div class=\"switch\">\n <mat-radio-group name=\"filterValue\" [ngModel]=\"filter.filterValue\" >\n <mat-radio-button [value]=\"true\" preventEnter>True</mat-radio-button>\n <mat-radio-button [value]=\"false\" preventEnter>False</mat-radio-button>\n </mat-radio-group>\n </div>\n }\n </ng-template>\n <ng-template #Enum>\n @if(currentFilterType === FilterType.In){\n <tb-in-list-filter [key]='filter.key' name='filterValue' [(ngModel)]='filter.filterValue' ></tb-in-list-filter>\n\n }\n </ng-template>\n </form>\n </mat-card-content>\n</mat-card>\n}\n", styles: [".filter-name{color:#6495ed;margin:10px 0;font-weight:600;display:inline-block}.switch{display:inline-block}.my-filter{margin-right:15px}.cancel-button{float:right}.head-row{width:100%}.filter-row{width:fit-content}mat-card.filter-card::ng-deep mat-form-field{width:150px}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper{line-height:0}mat-card.filter-card::ng-deep .mat-mdc-form-field-subscript-wrapper:before{height:0}.inline{display:inline-block}.small-button{height:18px;width:18px;font-size:18px;padding:0;margin:0}.small-button ::ng-deep *{line-height:initial;font-size:initial;height:18px;width:18px;font-size:18px;bottom:initial}.cancel-button{float:right;font-weight:700}.date-toggle ::ng-deep svg{position:absolute;left:0;top:0}\n"] }]
|
|
2898
2866
|
}] });
|
|
2899
2867
|
|
|
2900
2868
|
class GenColDisplayerComponent {
|
|
@@ -2923,14 +2891,14 @@ class GenColDisplayerComponent {
|
|
|
2923
2891
|
this.tableState.setHiddenColumns(displayCols.map(c => ({ key: c.key, visible: c.isVisible })));
|
|
2924
2892
|
}
|
|
2925
2893
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: GenColDisplayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2926
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: GenColDisplayerComponent, isStandalone: true, selector: "tb-col-displayer", ngImport: i0, template: "@if(columns$ | async; as displayCols){\
|
|
2894
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: GenColDisplayerComponent, isStandalone: true, selector: "tb-col-displayer", ngImport: i0, template: "@if(columns$ | async; as displayCols){\n <span matTooltip=\"Show/hide columns\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">visibility_off</mat-icon>\n </button>\n </span>\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\">\n\n <button mat-menu-item>\n <span matTooltip=\"Close\">\n <button class=\"filter-button\" mat-icon-button>\n <mat-icon>close</mat-icon>\n </button>\n </span>\n </button>\n\n <button mat-menu-item stop-propagation>\n <span matTooltip=\"Show all columns\">\n <button mat-icon-button (click)=\"reset(displayCols)\">\n <mat-icon color=\"primary\">done_all</mat-icon>\n </button>\n </span>\n\n <span matTooltip=\"Hide all columns\">\n <button mat-icon-button (click)=\"unset(displayCols)\">\n <mat-icon color=\"primary\">cancel</mat-icon>\n </button>\n </span>\n </button>\n\n <div cdkDropList (cdkDropListDropped)=\"drop($event)\" stop-propagation [cdkDropListLockAxis]=\"'y'\">\n @for (col of displayCols; track col.key) {\n <button [class.isHidden]=\"!col.isVisible\" stop-propagation mat-menu-item cdkDrag [cdkDragData]=\"col\">\n <div (click)=\"col.isVisible = !col.isVisible; emit(displayCols)\" style=\"display: flex; align-items: center;\">\n @if(col.isVisible){\n <button mat-icon-button matTooltip=\"Hide Column\" class=\"show-hide\">\n <mat-icon color=\"primary\">check_box</mat-icon>\n </button>\n } @else {\n <button mat-icon-button matTooltip=\"Show Column\" class=\"show-hide\">\n <mat-icon>indeterminate_check_box</mat-icon>\n </button>\n }\n \n <p class=\"label\">\n {{col.displayName || (col.key | spaceCase) }}\n </p>\n\n </div>\n </button>\n }\n\n </div>\n </mat-menu>\n}", styles: [".show-hide{margin-right:15px;height:24px;width:24px;padding:4px}.label{color:#6495ed;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-align:left;margin:0;font-size:17px;font-weight:700;display:inline-block;width:66%}.row{margin:0;padding:0}.isHidden{background-color:#d3d3d3;color:#a9a9a9;font-weight:700;font-size:17px;white-space:nowrap}.filter-button{margin-top:10px}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mdc-list-item__primary-text{display:inline-block;width:100%}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { 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.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i4$2.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: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { 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: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2927
2895
|
}
|
|
2928
2896
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: GenColDisplayerComponent, decorators: [{
|
|
2929
2897
|
type: Component,
|
|
2930
2898
|
args: [{ selector: 'tb-col-displayer', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
2931
2899
|
AsyncPipe, MatTooltipModule, MatIconModule, MatButtonModule, MatMenuModule, StopPropagationDirective,
|
|
2932
2900
|
DragDropModule, SpaceCasePipe
|
|
2933
|
-
], template: "@if(columns$ | async; as displayCols){\
|
|
2901
|
+
], template: "@if(columns$ | async; as displayCols){\n <span matTooltip=\"Show/hide columns\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">visibility_off</mat-icon>\n </button>\n </span>\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\">\n\n <button mat-menu-item>\n <span matTooltip=\"Close\">\n <button class=\"filter-button\" mat-icon-button>\n <mat-icon>close</mat-icon>\n </button>\n </span>\n </button>\n\n <button mat-menu-item stop-propagation>\n <span matTooltip=\"Show all columns\">\n <button mat-icon-button (click)=\"reset(displayCols)\">\n <mat-icon color=\"primary\">done_all</mat-icon>\n </button>\n </span>\n\n <span matTooltip=\"Hide all columns\">\n <button mat-icon-button (click)=\"unset(displayCols)\">\n <mat-icon color=\"primary\">cancel</mat-icon>\n </button>\n </span>\n </button>\n\n <div cdkDropList (cdkDropListDropped)=\"drop($event)\" stop-propagation [cdkDropListLockAxis]=\"'y'\">\n @for (col of displayCols; track col.key) {\n <button [class.isHidden]=\"!col.isVisible\" stop-propagation mat-menu-item cdkDrag [cdkDragData]=\"col\">\n <div (click)=\"col.isVisible = !col.isVisible; emit(displayCols)\" style=\"display: flex; align-items: center;\">\n @if(col.isVisible){\n <button mat-icon-button matTooltip=\"Hide Column\" class=\"show-hide\">\n <mat-icon color=\"primary\">check_box</mat-icon>\n </button>\n } @else {\n <button mat-icon-button matTooltip=\"Show Column\" class=\"show-hide\">\n <mat-icon>indeterminate_check_box</mat-icon>\n </button>\n }\n \n <p class=\"label\">\n {{col.displayName || (col.key | spaceCase) }}\n </p>\n\n </div>\n </button>\n }\n\n </div>\n </mat-menu>\n}", styles: [".show-hide{margin-right:15px;height:24px;width:24px;padding:4px}.label{color:#6495ed;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;text-align:left;margin:0;font-size:17px;font-weight:700;display:inline-block;width:66%}.row{margin:0;padding:0}.isHidden{background-color:#d3d3d3;color:#a9a9a9;font-weight:700;font-size:17px;white-space:nowrap}.filter-button{margin-top:10px}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.mdc-list-item__primary-text{display:inline-block;width:100%}\n"] }]
|
|
2934
2902
|
}], ctorParameters: () => [] });
|
|
2935
2903
|
|
|
2936
2904
|
class WrapperFilterStore extends ComponentStore {
|
|
@@ -2957,23 +2925,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
2957
2925
|
class GenFilterDisplayerComponent {
|
|
2958
2926
|
tableState = inject(TableStore);
|
|
2959
2927
|
filterStore = inject(WrapperFilterStore);
|
|
2960
|
-
|
|
2961
|
-
const
|
|
2962
|
-
|
|
2963
|
-
}
|
|
2928
|
+
constructor() {
|
|
2929
|
+
const tableState = this.tableState;
|
|
2930
|
+
this.filterCols$ = tableState.metaDataArray$.pipe(map(md => Object.values(md).filter(m => m.fieldType !== FieldType.Hidden && m.fieldType !== FieldType.NotMapped && !m.noFilter)));
|
|
2931
|
+
}
|
|
2932
|
+
filterCols$;
|
|
2964
2933
|
addFilter(metaData) {
|
|
2965
2934
|
this.filterStore.addFilter({ key: metaData.key, fieldType: metaData.fieldType });
|
|
2966
2935
|
}
|
|
2967
2936
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: GenFilterDisplayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2968
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: GenFilterDisplayerComponent, isStandalone: true, selector: "tb-filter-displayer", ngImport: i0, template: "<button stop-propagation class=\"filter-button\" mat-icon-button [matMenuTriggerFor]=\"menu\" matTooltip=\"Add Filter\">\
|
|
2937
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: GenFilterDisplayerComponent, isStandalone: true, selector: "tb-filter-displayer", ngImport: i0, template: "<button stop-propagation class=\"filter-button\" mat-icon-button [matMenuTriggerFor]=\"menu\" matTooltip=\"Add Filter\">\n <mat-icon class=\"filter-icon\" color=\"primary\">filter_list</mat-icon>\n</button>\n<mat-menu #menu=\"matMenu\">\n @for (md of filterCols$ | async; track md.key) {\n <button (click)=\"addFilter(md)\" mat-menu-item>\n <span class=\"filter-labels\">{{md.displayName || (md.key | spaceCase)}}</span>\n </button>\n }\n</mat-menu>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{margin-right:30px;font-weight:700}.filter-wrapper{margin-top:1em;margin-bottom:1em;float:right}.menu{margin-bottom:10px;width:109.1%}.filter-labels{color:#6495ed;font-size:17px;font-weight:600}.float{position:absolute;width:fit-content;z-index:101;top:10px;right:180px;max-width:90vw}.d-w{display:flex;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i4$2.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: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.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: 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: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2969
2938
|
}
|
|
2970
2939
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: GenFilterDisplayerComponent, decorators: [{
|
|
2971
2940
|
type: Component,
|
|
2972
2941
|
args: [{ selector: 'tb-filter-displayer', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
2973
2942
|
MatButtonModule, MatMenuModule, MatTooltipModule, StopPropagationDirective, MatIconModule,
|
|
2974
2943
|
AsyncPipe, SpaceCasePipe
|
|
2975
|
-
], template: "<button stop-propagation class=\"filter-button\" mat-icon-button [matMenuTriggerFor]=\"menu\" matTooltip=\"Add Filter\">\
|
|
2976
|
-
}] });
|
|
2944
|
+
], template: "<button stop-propagation class=\"filter-button\" mat-icon-button [matMenuTriggerFor]=\"menu\" matTooltip=\"Add Filter\">\n <mat-icon class=\"filter-icon\" color=\"primary\">filter_list</mat-icon>\n</button>\n<mat-menu #menu=\"matMenu\">\n @for (md of filterCols$ | async; track md.key) {\n <button (click)=\"addFilter(md)\" mat-menu-item>\n <span class=\"filter-labels\">{{md.displayName || (md.key | spaceCase)}}</span>\n </button>\n }\n</mat-menu>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{margin-right:30px;font-weight:700}.filter-wrapper{margin-top:1em;margin-bottom:1em;float:right}.menu{margin-bottom:10px;width:109.1%}.filter-labels{color:#6495ed;font-size:17px;font-weight:600}.float{position:absolute;width:fit-content;z-index:101;top:10px;right:180px;max-width:90vw}.d-w{display:flex;flex-direction:row;justify-content:flex-end}\n"] }]
|
|
2945
|
+
}], ctorParameters: () => [] });
|
|
2977
2946
|
|
|
2978
2947
|
class KeyDisplayPipe {
|
|
2979
2948
|
tableState = inject(TableStore);
|
|
@@ -3040,7 +3009,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
3040
3009
|
class FilterChipsComponent {
|
|
3041
3010
|
tableState = inject(TableStore);
|
|
3042
3011
|
filterStore = inject(WrapperFilterStore);
|
|
3043
|
-
$
|
|
3012
|
+
filters$ = this.tableState.filters$.pipe(map(filters => Object.values(filters).filter(f => isFilterInfo(f) && !f._isExternallyManaged)));
|
|
3044
3013
|
deleteByIndex(index) {
|
|
3045
3014
|
this.filterStore.deleteByIndex(index);
|
|
3046
3015
|
}
|
|
@@ -3052,14 +3021,14 @@ class FilterChipsComponent {
|
|
|
3052
3021
|
}
|
|
3053
3022
|
currentFilters$ = this.filterStore.currentFilters$;
|
|
3054
3023
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FilterChipsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3055
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: FilterChipsComponent, isStandalone: true, selector: "lib-filter-list", ngImport: i0, template: "<div class=\"d-w\" *ngrxLet=\"currentFilters$ as currentFilters\" >\
|
|
3024
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: FilterChipsComponent, isStandalone: true, selector: "lib-filter-list", ngImport: i0, template: "<div class=\"d-w\" *ngrxLet=\"currentFilters$ as currentFilters\" >\n\n @if (currentFilters.length) {\n <button class=\"cancel-button\" mat-icon-button (click)=\"clearAll()\" matTooltip=\"Close all Filters Cards\">\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\n </button>\n <div class=\"float\">\n @for (filter of currentFilters; track filter.key) {\n <div class=\"filter\">\n <tb-filter [filter]=\"filter\" (close)=\"deleteByIndex($index)\" />\n </div>\n }\n </div>\n }\n\n <mat-chip-set *ngrxLet=\"filters$ as filters\">\n @for (filter of filters; track filter.key) {\n <mat-chip (dblclick)=\"addFilter(filter)\" (removed)=\"tableState.removeFilter(filter.filterId!)\">\n {{ filter.key | keyDisplay | async }} {{filter.filterType | formatFilterType : filter.filterValue}} {{ filter.filterValue | formatFilterValue: filter.key : filter.filterType | async }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n }\n @if (filters.length > 1) {\n <mat-chip (removed)=\"tableState.clearFilters()\">\n Clear All\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n }\n </mat-chip-set>\n\n</div>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{margin-right:30px;font-weight:700}.filter-wrapper{margin-top:1em;margin-bottom:1em;float:right}.menu{margin-bottom:10px;width:109.1%}.filter-labels{color:#6495ed;font-size:17px;font-weight:600}.float{position:absolute;width:fit-content;z-index:101;top:10px;right:180px;max-width:90vw}.d-w{display:flex;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: FilterComponent, selector: "tb-filter", inputs: ["filter"], outputs: ["close"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4$3.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$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i4$3.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyDisplayPipe, name: "keyDisplay" }, { kind: "pipe", type: FormatFilterTypePipe, name: "formatFilterType" }, { kind: "pipe", type: FormatFilterValuePipe, name: "formatFilterValue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3056
3025
|
}
|
|
3057
3026
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: FilterChipsComponent, decorators: [{
|
|
3058
3027
|
type: Component,
|
|
3059
3028
|
args: [{ selector: 'lib-filter-list', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
3060
3029
|
LetDirective, MatButtonModule, MatTooltipModule, MatIconModule, FilterComponent,
|
|
3061
3030
|
MatChipsModule, AsyncPipe, KeyDisplayPipe, FormatFilterTypePipe, FormatFilterValuePipe
|
|
3062
|
-
], template: "<div class=\"d-w\" *ngrxLet=\"currentFilters$ as currentFilters\" >\
|
|
3031
|
+
], template: "<div class=\"d-w\" *ngrxLet=\"currentFilters$ as currentFilters\" >\n\n @if (currentFilters.length) {\n <button class=\"cancel-button\" mat-icon-button (click)=\"clearAll()\" matTooltip=\"Close all Filters Cards\">\n <mat-icon class=\"cancel-button\" color=\"primary\">close</mat-icon>\n </button>\n <div class=\"float\">\n @for (filter of currentFilters; track filter.key) {\n <div class=\"filter\">\n <tb-filter [filter]=\"filter\" (close)=\"deleteByIndex($index)\" />\n </div>\n }\n </div>\n }\n\n <mat-chip-set *ngrxLet=\"filters$ as filters\">\n @for (filter of filters; track filter.key) {\n <mat-chip (dblclick)=\"addFilter(filter)\" (removed)=\"tableState.removeFilter(filter.filterId!)\">\n {{ filter.key | keyDisplay | async }} {{filter.filterType | formatFilterType : filter.filterValue}} {{ filter.filterValue | formatFilterValue: filter.key : filter.filterType | async }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n }\n @if (filters.length > 1) {\n <mat-chip (removed)=\"tableState.clearFilters()\">\n Clear All\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n }\n </mat-chip-set>\n\n</div>\n", styles: [".filter{margin:15px;display:inline-block}.filter-button{color:#6495ed;font-size:22px;font-weight:700}.cancel-button{margin-right:30px;font-weight:700}.filter-wrapper{margin-top:1em;margin-bottom:1em;float:right}.menu{margin-bottom:10px;width:109.1%}.filter-labels{color:#6495ed;font-size:17px;font-weight:600}.float{position:absolute;width:fit-content;z-index:101;top:10px;right:180px;max-width:90vw}.d-w{display:flex;flex-direction:row;justify-content:flex-end}\n"] }]
|
|
3063
3032
|
}] });
|
|
3064
3033
|
|
|
3065
3034
|
function isPipe(o) {
|
|
@@ -3162,16 +3131,16 @@ class RouterLinkColumnComponent {
|
|
|
3162
3131
|
queryParams = computed(() => this.additional().routerLinkOptions.queryParams(this.element()));
|
|
3163
3132
|
routerLinkOptions = computed(() => this.additional().routerLinkOptions);
|
|
3164
3133
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: RouterLinkColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3165
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.2", type: RouterLinkColumnComponent, isStandalone: true, selector: "tb-router-link-column", inputs: { additional: { classPropertyName: "additional", publicName: "additional", isSignal: true, isRequired: true, transformFunction: null }, element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
3166
|
-
<a target="{{additional().target}}"
|
|
3167
|
-
[routerLink]=" [link()]"
|
|
3168
|
-
[queryParams]="queryParams()"
|
|
3169
|
-
[fragment]="routerLinkOptions().fragment"
|
|
3170
|
-
[preserveFragment]="routerLinkOptions().preserveFragment"
|
|
3171
|
-
[queryParamsHandling]="routerLinkOptions().queryParamsHandling"
|
|
3172
|
-
>
|
|
3173
|
-
{{value()}}
|
|
3174
|
-
</a>
|
|
3134
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.2", type: RouterLinkColumnComponent, isStandalone: true, selector: "tb-router-link-column", inputs: { additional: { classPropertyName: "additional", publicName: "additional", isSignal: true, isRequired: true, transformFunction: null }, element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
3135
|
+
<a target="{{additional().target}}"
|
|
3136
|
+
[routerLink]=" [link()]"
|
|
3137
|
+
[queryParams]="queryParams()"
|
|
3138
|
+
[fragment]="routerLinkOptions().fragment"
|
|
3139
|
+
[preserveFragment]="routerLinkOptions().preserveFragment"
|
|
3140
|
+
[queryParamsHandling]="routerLinkOptions().queryParamsHandling"
|
|
3141
|
+
>
|
|
3142
|
+
{{value()}}
|
|
3143
|
+
</a>
|
|
3175
3144
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3176
3145
|
}
|
|
3177
3146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: RouterLinkColumnComponent, decorators: [{
|
|
@@ -3183,16 +3152,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
3183
3152
|
imports: [
|
|
3184
3153
|
RouterModule
|
|
3185
3154
|
],
|
|
3186
|
-
template: `
|
|
3187
|
-
<a target="{{additional().target}}"
|
|
3188
|
-
[routerLink]=" [link()]"
|
|
3189
|
-
[queryParams]="queryParams()"
|
|
3190
|
-
[fragment]="routerLinkOptions().fragment"
|
|
3191
|
-
[preserveFragment]="routerLinkOptions().preserveFragment"
|
|
3192
|
-
[queryParamsHandling]="routerLinkOptions().queryParamsHandling"
|
|
3193
|
-
>
|
|
3194
|
-
{{value()}}
|
|
3195
|
-
</a>
|
|
3155
|
+
template: `
|
|
3156
|
+
<a target="{{additional().target}}"
|
|
3157
|
+
[routerLink]=" [link()]"
|
|
3158
|
+
[queryParams]="queryParams()"
|
|
3159
|
+
[fragment]="routerLinkOptions().fragment"
|
|
3160
|
+
[preserveFragment]="routerLinkOptions().preserveFragment"
|
|
3161
|
+
[queryParamsHandling]="routerLinkOptions().queryParamsHandling"
|
|
3162
|
+
>
|
|
3163
|
+
{{value()}}
|
|
3164
|
+
</a>
|
|
3196
3165
|
`
|
|
3197
3166
|
}]
|
|
3198
3167
|
}] });
|
|
@@ -3202,11 +3171,11 @@ class LinkColumnComponent {
|
|
|
3202
3171
|
additional = input.required();
|
|
3203
3172
|
link = computed(() => this.additional().link(this.element()));
|
|
3204
3173
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: LinkColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3205
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.2", type: LinkColumnComponent, isStandalone: true, selector: "tb-link-column", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: true, transformFunction: null }, additional: { classPropertyName: "additional", publicName: "additional", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
3206
|
-
<a target="{{additional().target}}"
|
|
3207
|
-
href="{{link()}}">
|
|
3208
|
-
{{value()}}
|
|
3209
|
-
</a>
|
|
3174
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.2", type: LinkColumnComponent, isStandalone: true, selector: "tb-link-column", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, element: { classPropertyName: "element", publicName: "element", isSignal: true, isRequired: true, transformFunction: null }, additional: { classPropertyName: "additional", publicName: "additional", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
3175
|
+
<a target="{{additional().target}}"
|
|
3176
|
+
href="{{link()}}">
|
|
3177
|
+
{{value()}}
|
|
3178
|
+
</a>
|
|
3210
3179
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3211
3180
|
}
|
|
3212
3181
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: LinkColumnComponent, decorators: [{
|
|
@@ -3215,11 +3184,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
3215
3184
|
selector: "tb-link-column",
|
|
3216
3185
|
standalone: true,
|
|
3217
3186
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3218
|
-
template: `
|
|
3219
|
-
<a target="{{additional().target}}"
|
|
3220
|
-
href="{{link()}}">
|
|
3221
|
-
{{value()}}
|
|
3222
|
-
</a>
|
|
3187
|
+
template: `
|
|
3188
|
+
<a target="{{additional().target}}"
|
|
3189
|
+
href="{{link()}}">
|
|
3190
|
+
{{value()}}
|
|
3191
|
+
</a>
|
|
3223
3192
|
`
|
|
3224
3193
|
}]
|
|
3225
3194
|
}] });
|
|
@@ -3284,14 +3253,14 @@ class InitializationComponent {
|
|
|
3284
3253
|
defaultTemplate;
|
|
3285
3254
|
defaultWithIcon;
|
|
3286
3255
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: InitializationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3287
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: InitializationComponent, isStandalone: true, selector: "initialization", viewQueries: [{ propertyName: "linkTemplate", first: true, predicate: ["link"], descendants: true, static: true }, { propertyName: "routerLinkTemplate", first: true, predicate: ["routerLink"], descendants: true, static: true }, { propertyName: "imageUrlTemplate", first: true, predicate: ["imageUrl"], descendants: true, static: true }, { propertyName: "arrayNewLineTemplate", first: true, predicate: ["arrayNewLine"], descendants: true, static: true }, { propertyName: "arrayCommaTemplate", first: true, predicate: ["arrayComma"], descendants: true, static: true }, { propertyName: "defaultTemplate", first: true, predicate: ["default"], descendants: true, static: true }, { propertyName: "defaultWithIcon", first: true, predicate: ["defaultWithIcon"], descendants: true, static: true }], ngImport: i0, template: "<ng-template #link let-value='value' let-element='element' let-additional=\"additional\">\
|
|
3256
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.2", type: InitializationComponent, isStandalone: true, selector: "initialization", viewQueries: [{ propertyName: "linkTemplate", first: true, predicate: ["link"], descendants: true, static: true }, { propertyName: "routerLinkTemplate", first: true, predicate: ["routerLink"], descendants: true, static: true }, { propertyName: "imageUrlTemplate", first: true, predicate: ["imageUrl"], descendants: true, static: true }, { propertyName: "arrayNewLineTemplate", first: true, predicate: ["arrayNewLine"], descendants: true, static: true }, { propertyName: "arrayCommaTemplate", first: true, predicate: ["arrayComma"], descendants: true, static: true }, { propertyName: "defaultTemplate", first: true, predicate: ["default"], descendants: true, static: true }, { propertyName: "defaultWithIcon", first: true, predicate: ["defaultWithIcon"], descendants: true, static: true }], ngImport: i0, template: "<ng-template #link let-value='value' let-element='element' let-additional=\"additional\">\n <tb-link-column [element]=\"element\" [value]=\"value\" [additional]=\"additional\" />\n</ng-template>\n\n<ng-template #routerLink let-value='value' let-element='element' let-additional=\"additional\">\n <tb-router-link-column [element]=\"element\" [value]=\"value\" [additional]=\"additional\"/>\n</ng-template>\n\n<ng-template #imageUrl let-value='value'>\n <span>\n <img src=\"{{value}}\" height=\"75px\" width=\"75px\" />\n </span>\n</ng-template>\n\n<ng-template #arrayNewLine let-value='value' let-element='element' let-additional=\"additional\">\n <tb-new-line-array-column [value]='value' [additional]='additional'/>\n</ng-template>\n\n<ng-template #arrayComma let-value='value' let-element='element' let-additional=\"additional\">\n <tb-comma-array-column [value]='value' [additional]='additional'/>\n</ng-template>\n\n<ng-template #default let-value='value'>\n <span>{{ value }}</span>\n</ng-template>\n\n<ng-template #defaultWithIcon let-value='value'>\n <mat-icon>{{ value}}</mat-icon>\n</ng-template>\n", dependencies: [{ kind: "component", type: LinkColumnComponent, selector: "tb-link-column", inputs: ["value", "element", "additional"] }, { kind: "component", type: ArrayCommaColumnComponent, selector: "tb-comma-array-column", inputs: ["value", "additional"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: RouterLinkColumnComponent, selector: "tb-router-link-column", inputs: ["additional", "element", "value"] }, { kind: "component", type: ArrayNewLineColumnComponent, selector: "tb-new-line-array-column", inputs: ["value", "additional"] }] });
|
|
3288
3257
|
}
|
|
3289
3258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: InitializationComponent, decorators: [{
|
|
3290
3259
|
type: Component,
|
|
3291
3260
|
args: [{ selector: 'initialization', standalone: true, imports: [
|
|
3292
3261
|
LinkColumnComponent, ArrayCommaColumnComponent, MatIconModule, FunctionPipe,
|
|
3293
3262
|
RouterLinkColumnComponent, ArrayNewLineColumnComponent
|
|
3294
|
-
], template: "<ng-template #link let-value='value' let-element='element' let-additional=\"additional\">\
|
|
3263
|
+
], template: "<ng-template #link let-value='value' let-element='element' let-additional=\"additional\">\n <tb-link-column [element]=\"element\" [value]=\"value\" [additional]=\"additional\" />\n</ng-template>\n\n<ng-template #routerLink let-value='value' let-element='element' let-additional=\"additional\">\n <tb-router-link-column [element]=\"element\" [value]=\"value\" [additional]=\"additional\"/>\n</ng-template>\n\n<ng-template #imageUrl let-value='value'>\n <span>\n <img src=\"{{value}}\" height=\"75px\" width=\"75px\" />\n </span>\n</ng-template>\n\n<ng-template #arrayNewLine let-value='value' let-element='element' let-additional=\"additional\">\n <tb-new-line-array-column [value]='value' [additional]='additional'/>\n</ng-template>\n\n<ng-template #arrayComma let-value='value' let-element='element' let-additional=\"additional\">\n <tb-comma-array-column [value]='value' [additional]='additional'/>\n</ng-template>\n\n<ng-template #default let-value='value'>\n <span>{{ value }}</span>\n</ng-template>\n\n<ng-template #defaultWithIcon let-value='value'>\n <mat-icon>{{ value}}</mat-icon>\n</ng-template>\n" }]
|
|
3295
3264
|
}], propDecorators: { linkTemplate: [{
|
|
3296
3265
|
type: ViewChild,
|
|
3297
3266
|
args: ['link', { static: true }]
|
|
@@ -3555,7 +3524,7 @@ class ColumnBuilderComponent {
|
|
|
3555
3524
|
}
|
|
3556
3525
|
classes;
|
|
3557
3526
|
styles = computed(() => {
|
|
3558
|
-
return columnStyles(this.metaData, this.state
|
|
3527
|
+
return columnStyles(this.metaData, this.state.getUserDefinedWidth(this.metaData.key)(), this.state.tableSettingsMinWidth());
|
|
3559
3528
|
});
|
|
3560
3529
|
ngOnInit() {
|
|
3561
3530
|
this.initialSetUp();
|
|
@@ -3601,7 +3570,7 @@ class ColumnBuilderComponent {
|
|
|
3601
3570
|
};
|
|
3602
3571
|
additional;
|
|
3603
3572
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: ColumnBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3604
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: ColumnBuilderComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "columnDef", first: true, predicate: MatColumnDef, descendants: true }, { propertyName: "bodyTemplate", first: true, predicate: ["body"], descendants: true }], ngImport: i0, template: "<ng-container [matColumnDef]=\"metaData.key\" *ngrxLet=\"styles() as styles\" >\
|
|
3573
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: ColumnBuilderComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "columnDef", first: true, predicate: MatColumnDef, descendants: true }, { propertyName: "bodyTemplate", first: true, predicate: ["body"], descendants: true }], ngImport: i0, template: "<ng-container [matColumnDef]=\"metaData.key\" *ngrxLet=\"styles() as styles\" >\n\n <!-- header -->\n <ng-template matHeaderCellDef #myHeader>\n <mat-header-cell cdkDrag [style]='styles.header' resizeColumn [key]=\"metaData.key\" class=\"column-head\"\n [class]='metaData.additional?.columnPartClasses?.header'>\n <div class=\"header-container\" cdkDragHandle>\n @if(!customCell?.columnDef?.headerCell)\n {\n @if(metaData.fieldType !== FieldType.NotMapped){\n <div mat-sort-header [disabled]=\"metaData.noSort\" style=\"width: 100%\">\n {{ metaData.displayName ? metaData.displayName : ( metaData.key | spaceCase ) }}\n </div>\n } @else if(metaData.fieldType === FieldType.NotMapped){\n <div style=\"width: 100%\">\n {{ metaData.displayName ? metaData.displayName : ( metaData.key | spaceCase ) }}\n </div>\n }\n @if((showFilters$ | async)){\n <tb-header-menu #menu [metaData]='metaData' />\n }\n }\n @else\n {\n <ng-container *ngTemplateOutlet=\"customCell!.columnDef!.headerCell.template; context: {metaData: metaData, styles: styles.header} \">\n </ng-container>\n }\n </div>\n </mat-header-cell>\n </ng-template>\n\n <!-- body -->\n <ng-container *matCellDef=\"let element;\">\n <ng-container *ngTemplateOutlet=\"outerTemplate; context: { metaData: metaData, element: element , styles: styles.body, $implicit: element }\"/>\n </ng-container>\n <ng-template #body let-element='element' >\n <mat-cell [matTooltip]=\"metaData.toolTip ? (getTooltip | func : element) : ''\" [conditionalClasses]='metaData.classes' [element]='element' [styler]='styles.body' (click)='cellClicked(element, metaData.key)' >\n <ng-container *ngTemplateOutlet=\"innerTemplate; context: { value: (transform | func : element), element: element, additional: additional, $implicit: element }; Injector: injector\" />\n </mat-cell>\n </ng-template>\n\n <!-- footer -->\n <ng-template matFooterCellDef>\n @if(customCell?.columnDef?.footerCell){\n <ng-container\n *ngTemplateOutlet=\"customCell!.columnDef!.footerCell.template; context: {metaData: metaData, data: data$, styles : styles.footer }\"/>\n } @else {\n <mat-footer-cell [style]='styles.footer' *ngrxLet=\"data$ as data\" [class]='metaData.additional?.columnPartClasses?.footer'>\n @if(!!data?.length && metaData.additional?.footer){\n <span class=\"bold\">\n @switch (metaData.fieldType) {\n @case (FieldType.Currency) { {{ data | columnTotal: metaData | currency }} }\n @case (FieldType.Number) { {{ data | columnTotal: metaData | number }} }\n }\n </span>\n }\n\n </mat-footer-cell>\n }\n </ng-template>\n</ng-container>\n", styles: [".header-container{display:flex;flex-direction:row;width:100%;align-items:center}.negative-currency{color:red}.column-head{position:relative}.bold,.group-footer{font-weight:900}.cdk-drag-preview{background:#fff;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:33%;border-right-width:0px}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.drag-handle{color:#add8e6;cursor:move;margin-right:9px}\n"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "directive", type: i1$5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$5.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$5.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i1$5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i1$5.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ResizeColumnDirective, selector: "[resizeColumn]", inputs: ["resizeColumn", "key"] }, { kind: "pipe", type: FunctionPipe, name: "func" }, { kind: "directive", type: StylerDirective, selector: "[styler]", inputs: ["element", "styler"] }, { kind: "directive", type: ConditionalClassesDirective, selector: "[conditionalClasses]", inputs: ["element", "conditionalClasses"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i5.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "component", type: i3$2.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }, { kind: "component", type: HeaderMenuComponent, selector: "tb-header-menu", inputs: ["metaData"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { 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: LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "pipe", type: ColumnTotalPipe, name: "columnTotal" }, { kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "pipe", type: DecimalPipe, name: "number" }], viewProviders: [
|
|
3605
3574
|
{ provide: CDK_DROP_LIST, useExisting: CdkDropList },
|
|
3606
3575
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3607
3576
|
}
|
|
@@ -3613,7 +3582,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
3613
3582
|
MatTableModule, NgTemplateOutlet, ResizeColumnDirective, FunctionPipe, StylerDirective,
|
|
3614
3583
|
ConditionalClassesDirective, DragDropModule, MatSortModule, SpaceCasePipe, HeaderMenuComponent,
|
|
3615
3584
|
AsyncPipe, MatTooltipModule, LetDirective, ColumnTotalPipe, CurrencyPipe, DecimalPipe
|
|
3616
|
-
], template: "<ng-container [matColumnDef]=\"metaData.key\" *ngrxLet=\"styles() as styles\" >\
|
|
3585
|
+
], template: "<ng-container [matColumnDef]=\"metaData.key\" *ngrxLet=\"styles() as styles\" >\n\n <!-- header -->\n <ng-template matHeaderCellDef #myHeader>\n <mat-header-cell cdkDrag [style]='styles.header' resizeColumn [key]=\"metaData.key\" class=\"column-head\"\n [class]='metaData.additional?.columnPartClasses?.header'>\n <div class=\"header-container\" cdkDragHandle>\n @if(!customCell?.columnDef?.headerCell)\n {\n @if(metaData.fieldType !== FieldType.NotMapped){\n <div mat-sort-header [disabled]=\"metaData.noSort\" style=\"width: 100%\">\n {{ metaData.displayName ? metaData.displayName : ( metaData.key | spaceCase ) }}\n </div>\n } @else if(metaData.fieldType === FieldType.NotMapped){\n <div style=\"width: 100%\">\n {{ metaData.displayName ? metaData.displayName : ( metaData.key | spaceCase ) }}\n </div>\n }\n @if((showFilters$ | async)){\n <tb-header-menu #menu [metaData]='metaData' />\n }\n }\n @else\n {\n <ng-container *ngTemplateOutlet=\"customCell!.columnDef!.headerCell.template; context: {metaData: metaData, styles: styles.header} \">\n </ng-container>\n }\n </div>\n </mat-header-cell>\n </ng-template>\n\n <!-- body -->\n <ng-container *matCellDef=\"let element;\">\n <ng-container *ngTemplateOutlet=\"outerTemplate; context: { metaData: metaData, element: element , styles: styles.body, $implicit: element }\"/>\n </ng-container>\n <ng-template #body let-element='element' >\n <mat-cell [matTooltip]=\"metaData.toolTip ? (getTooltip | func : element) : ''\" [conditionalClasses]='metaData.classes' [element]='element' [styler]='styles.body' (click)='cellClicked(element, metaData.key)' >\n <ng-container *ngTemplateOutlet=\"innerTemplate; context: { value: (transform | func : element), element: element, additional: additional, $implicit: element }; Injector: injector\" />\n </mat-cell>\n </ng-template>\n\n <!-- footer -->\n <ng-template matFooterCellDef>\n @if(customCell?.columnDef?.footerCell){\n <ng-container\n *ngTemplateOutlet=\"customCell!.columnDef!.footerCell.template; context: {metaData: metaData, data: data$, styles : styles.footer }\"/>\n } @else {\n <mat-footer-cell [style]='styles.footer' *ngrxLet=\"data$ as data\" [class]='metaData.additional?.columnPartClasses?.footer'>\n @if(!!data?.length && metaData.additional?.footer){\n <span class=\"bold\">\n @switch (metaData.fieldType) {\n @case (FieldType.Currency) { {{ data | columnTotal: metaData | currency }} }\n @case (FieldType.Number) { {{ data | columnTotal: metaData | number }} }\n }\n </span>\n }\n\n </mat-footer-cell>\n }\n </ng-template>\n</ng-container>\n", styles: [".header-container{display:flex;flex-direction:row;width:100%;align-items:center}.negative-currency{color:red}.column-head{position:relative}.bold,.group-footer{font-weight:900}.cdk-drag-preview{background:#fff;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:33%;border-right-width:0px}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.drag-handle{color:#add8e6;cursor:move;margin-right:9px}\n"] }]
|
|
3617
3586
|
}], propDecorators: { columnDef: [{
|
|
3618
3587
|
type: ViewChild,
|
|
3619
3588
|
args: [MatColumnDef]
|
|
@@ -3657,25 +3626,10 @@ function getSameTailLength(previousSorts, currentSorts) {
|
|
|
3657
3626
|
const initIndexSymbol = Symbol('tb_init_index');
|
|
3658
3627
|
const initialSortState = { sortsToRun: [], allSorts: [] };
|
|
3659
3628
|
|
|
3660
|
-
class DataStore extends ComponentStore {
|
|
3661
|
-
constructor() {
|
|
3662
|
-
super({ ...defaultDataState });
|
|
3663
|
-
}
|
|
3664
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DataStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3665
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DataStore });
|
|
3666
|
-
}
|
|
3667
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: DataStore, decorators: [{
|
|
3668
|
-
type: Injectable
|
|
3669
|
-
}], ctorParameters: () => [] });
|
|
3670
|
-
|
|
3671
3629
|
class GenericTableComponent {
|
|
3672
3630
|
state = inject(TableStore);
|
|
3673
|
-
dataStore = inject(DataStore);
|
|
3674
3631
|
viewContainer = inject(ViewContainerRef);
|
|
3675
3632
|
transformCreator = inject(TransformCreator);
|
|
3676
|
-
$headerRow = viewChild(MatHeaderRowDef);
|
|
3677
|
-
$footerRow = viewChild(MatFooterRowDef);
|
|
3678
|
-
$table = viewChild(MatTable);
|
|
3679
3633
|
drop(event) {
|
|
3680
3634
|
this.state.setUserDefinedOrder({ newOrder: event.currentIndex, oldOrder: event.previousIndex });
|
|
3681
3635
|
}
|
|
@@ -3688,103 +3642,55 @@ class GenericTableComponent {
|
|
|
3688
3642
|
this.setUpSelections(trackBy);
|
|
3689
3643
|
}
|
|
3690
3644
|
get trackBy() { return this._trackBy; }
|
|
3691
|
-
|
|
3692
|
-
$displayDataLength = computed(() => this.$displayData()?.length || 0);
|
|
3693
|
-
$hasFooterMeta = computed(() => this.state.$metaDataArray().some(md => !!md.additional?.footer));
|
|
3645
|
+
displayData$;
|
|
3694
3646
|
$data = input.required({ alias: 'data' });
|
|
3695
3647
|
data$ = toObservable(this.$data);
|
|
3696
3648
|
rows;
|
|
3697
3649
|
columnBuilders;
|
|
3698
|
-
|
|
3699
|
-
|
|
3650
|
+
columnInfos;
|
|
3651
|
+
table;
|
|
3700
3652
|
dropList;
|
|
3701
|
-
$footerRowStyle = computed(() => {
|
|
3702
|
-
const hasData = !!this.$displayDataLength();
|
|
3703
|
-
const metaFooter = this.$hasFooterMeta();
|
|
3704
|
-
const customFooter = this.$hasCustomFooter();
|
|
3705
|
-
const hasSelectionColumn = this.state.props().selectionColumn;
|
|
3706
|
-
return customFooter || (hasData && (metaFooter || hasSelectionColumn)) ? 'regular-footer' : hasData ? 'no-footer' : 'small-footer';
|
|
3707
|
-
});
|
|
3708
|
-
$showFooterRow = computed(() => this.$footerRowStyle() !== 'no-footer');
|
|
3709
3653
|
currentColumns;
|
|
3654
|
+
keys = [];
|
|
3710
3655
|
_injector = inject(Injector);
|
|
3711
3656
|
injector = Injector.create({
|
|
3712
3657
|
providers: [
|
|
3713
|
-
{ provide: MatTable, useFactory: () => this
|
|
3658
|
+
{ provide: MatTable, useFactory: () => this.table },
|
|
3714
3659
|
{ provide: CdkDropList, useFactory: () => this.dropList },
|
|
3715
3660
|
],
|
|
3716
3661
|
parent: this._injector
|
|
3717
3662
|
});
|
|
3718
3663
|
rowDefArr = [];
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
$
|
|
3723
|
-
offset$ = this.dataStore.select(s => s.virtualScrollOffset);
|
|
3664
|
+
columns = [];
|
|
3665
|
+
myColumns = {};
|
|
3666
|
+
showHeader$;
|
|
3667
|
+
offset$ = this.state.select(s => s.virtualScrollOffset);
|
|
3724
3668
|
offsetIndex = 0;
|
|
3725
3669
|
dataView;
|
|
3726
3670
|
constructor() {
|
|
3727
3671
|
this.setUpSelections();
|
|
3728
|
-
effect(() => {
|
|
3729
|
-
const columnInfos = this.$columnInfos() || [];
|
|
3730
|
-
untracked(() => {
|
|
3731
|
-
Object.entries(this.myColumns()).forEach(([key, value]) => {
|
|
3732
|
-
const columnInfo = columnInfos.find(ci => ci.metaData.key === key);
|
|
3733
|
-
if (!columnInfo || columnInfo.customCell !== value.customCell) {
|
|
3734
|
-
delete this.myColumns()[key];
|
|
3735
|
-
this.$table()?.removeColumnDef(value.columnDef);
|
|
3736
|
-
}
|
|
3737
|
-
});
|
|
3738
|
-
columnInfos.forEach(ci => this.addMetaData(ci));
|
|
3739
|
-
});
|
|
3740
|
-
});
|
|
3741
|
-
effect(() => {
|
|
3742
|
-
const headerRow = this.$headerRow();
|
|
3743
|
-
const showHeader = this.$showHeader();
|
|
3744
|
-
const table = this.$table();
|
|
3745
|
-
untracked(() => {
|
|
3746
|
-
if (headerRow && showHeader && table)
|
|
3747
|
-
table.addHeaderRowDef(headerRow);
|
|
3748
|
-
else if (headerRow && table)
|
|
3749
|
-
table.removeHeaderRowDef(headerRow);
|
|
3750
|
-
});
|
|
3751
|
-
});
|
|
3752
|
-
effect(() => {
|
|
3753
|
-
const footerRow = this.$footerRow();
|
|
3754
|
-
const showFooter = this.$showFooterRow();
|
|
3755
|
-
const table = this.$table();
|
|
3756
|
-
untracked(() => {
|
|
3757
|
-
if (footerRow && showFooter && table)
|
|
3758
|
-
table.addFooterRowDef(footerRow);
|
|
3759
|
-
else if (footerRow && table)
|
|
3760
|
-
table.removeFooterRowDef(footerRow);
|
|
3761
|
-
});
|
|
3762
|
-
});
|
|
3763
3672
|
}
|
|
3764
3673
|
defaultTrackBy = (index, item) => item[initIndexSymbol];
|
|
3765
3674
|
trackByFunction = this.defaultTrackBy;
|
|
3766
3675
|
ngOnChanges(changes) {
|
|
3767
|
-
if (changes.rows && this.rows && this.myColumns
|
|
3676
|
+
if (changes.rows && this.rows && this.myColumns.length) {
|
|
3768
3677
|
this.initializeRowDefs([...this.rows]);
|
|
3769
3678
|
}
|
|
3770
3679
|
}
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
const keys = displayed.filter(d => !!built[d]);
|
|
3775
|
-
if (this.$hasSelectColumn()) {
|
|
3776
|
-
keys.unshift('select');
|
|
3680
|
+
ngOnInit() {
|
|
3681
|
+
if (this.state.props().selectionColumn) {
|
|
3682
|
+
this.columns.push('select');
|
|
3777
3683
|
}
|
|
3778
|
-
if (this
|
|
3779
|
-
|
|
3684
|
+
if (this.state.props().indexColumn) {
|
|
3685
|
+
this.columns.push('index');
|
|
3780
3686
|
}
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
ngOnInit() {
|
|
3687
|
+
this.state.on(this.columnInfos, columns => {
|
|
3688
|
+
columns.forEach(ci => this.addMetaData(ci));
|
|
3689
|
+
});
|
|
3785
3690
|
this.initializeRowDefs([...this.rows]);
|
|
3786
|
-
this.state.on(this.
|
|
3787
|
-
this.
|
|
3691
|
+
this.state.on(this.state.displayedColumns$, keys => {
|
|
3692
|
+
this.keys = [...this.columns, ...keys];
|
|
3693
|
+
this.rowDefArr?.forEach(row => row.columns = this.keys);
|
|
3788
3694
|
});
|
|
3789
3695
|
this.state.on(this.selectableData$, (data) => {
|
|
3790
3696
|
if (this.selection.selected.length) {
|
|
@@ -3793,9 +3699,18 @@ class GenericTableComponent {
|
|
|
3793
3699
|
this.selection.deselect(...removed);
|
|
3794
3700
|
}
|
|
3795
3701
|
});
|
|
3702
|
+
this.showHeader$ = this.state.tableSettings$.pipe(map(settings => !(settings.hideColumnHeader)));
|
|
3703
|
+
this.showFooterRow$ = combineLatest([
|
|
3704
|
+
this.displayData$.pipe(map(d => !!d.length), distinctUntilChanged()),
|
|
3705
|
+
this.state.metaDataArray$.pipe(map(metaData => metaData.some(md => !!md.additional?.footer)), distinctUntilChanged()),
|
|
3706
|
+
this.columnInfos.pipe(map(columnInfos => columnInfos.some(ci => !!ci.customCell?.columnDef?.footerCell)), distinctUntilChanged()),
|
|
3707
|
+
]).pipe(map(([hasData, hasFooterDef, hasCustomFooter]) => {
|
|
3708
|
+
const hasSelectionColumn = this.state.props().selectionColumn;
|
|
3709
|
+
return hasCustomFooter || (hasData && (hasFooterDef || hasSelectionColumn)) ? 'regular-footer' : hasData ? 'no-footer' : 'small-footer';
|
|
3710
|
+
}));
|
|
3796
3711
|
if (this.state.tableSettings().usePaginator || this.state.tableSettings().useVirtualScroll) {
|
|
3797
|
-
this.state.on(
|
|
3798
|
-
this.offsetIndex =
|
|
3712
|
+
this.state.on(this.state.state$, (state) => {
|
|
3713
|
+
this.offsetIndex = state.virtualEnds.start;
|
|
3799
3714
|
if (this.state.tableSettings().usePaginator) {
|
|
3800
3715
|
this.offsetIndex += (state.pageSize * state.currentPage);
|
|
3801
3716
|
}
|
|
@@ -3809,7 +3724,7 @@ class GenericTableComponent {
|
|
|
3809
3724
|
this.state.updateExpandedGroups({ key, isExpanded, groupKey });
|
|
3810
3725
|
}
|
|
3811
3726
|
addMetaData(column) {
|
|
3812
|
-
const columnBuilder = this.myColumns
|
|
3727
|
+
const columnBuilder = this.myColumns[column.metaData.key];
|
|
3813
3728
|
if (columnBuilder) {
|
|
3814
3729
|
columnBuilder.metaData = column.metaData;
|
|
3815
3730
|
}
|
|
@@ -3821,18 +3736,17 @@ class GenericTableComponent {
|
|
|
3821
3736
|
component.instance.customCell = column.customCell;
|
|
3822
3737
|
component.instance.metaData = column.metaData;
|
|
3823
3738
|
component.instance.data$ = this.data$;
|
|
3824
|
-
this.myColumns
|
|
3739
|
+
this.myColumns[column.metaData.key] = component.instance;
|
|
3825
3740
|
}
|
|
3826
3741
|
}
|
|
3827
3742
|
initializeRowDefs = (defs) => {
|
|
3828
|
-
|
|
3829
|
-
if (!table)
|
|
3830
|
-
return;
|
|
3831
|
-
this.rowDefArr.forEach(r => table.removeRowDef(r));
|
|
3743
|
+
this.rowDefArr.forEach(r => this.table.removeRowDef(r));
|
|
3832
3744
|
this.rowDefArr = defs;
|
|
3833
3745
|
defs.forEach(r => {
|
|
3834
|
-
r.columns = this
|
|
3835
|
-
table
|
|
3746
|
+
r.columns = this.columns.concat(Object.values(this.myColumns).filter(c => c.metaData.fieldType !== FieldType.Hidden).map(c => c.metaData.key));
|
|
3747
|
+
if (this.table) {
|
|
3748
|
+
this.table.addRowDef(r);
|
|
3749
|
+
}
|
|
3836
3750
|
});
|
|
3837
3751
|
};
|
|
3838
3752
|
selection;
|
|
@@ -3883,6 +3797,7 @@ class GenericTableComponent {
|
|
|
3883
3797
|
return (previousUserDefinedWidth ?? 0) >= 0 && currentUserDefinedWidth == null;
|
|
3884
3798
|
}
|
|
3885
3799
|
}));
|
|
3800
|
+
showFooterRow$;
|
|
3886
3801
|
getTransform = (key, val) => {
|
|
3887
3802
|
if (val == undefined || val === 'null')
|
|
3888
3803
|
return '';
|
|
@@ -3895,8 +3810,7 @@ class GenericTableComponent {
|
|
|
3895
3810
|
};
|
|
3896
3811
|
$rowHeight = this.state.selectSignal(s => {
|
|
3897
3812
|
if (this.state.$isVirtual() && s.notPersistedTableSettings.useVirtualScroll?.enforceRowHeight) {
|
|
3898
|
-
|
|
3899
|
-
return height + 'px';
|
|
3813
|
+
return s.notPersistedTableSettings.useVirtualScroll.rowHeight + 'px';
|
|
3900
3814
|
}
|
|
3901
3815
|
if (typeof s.notPersistedTableSettings.rowHeight === 'number') {
|
|
3902
3816
|
return s.notPersistedTableSettings.rowHeight + 'px';
|
|
@@ -3905,30 +3819,42 @@ class GenericTableComponent {
|
|
|
3905
3819
|
});
|
|
3906
3820
|
$headerHeight = this.state.selectSignal(s => {
|
|
3907
3821
|
if (this.state.$isVirtual() && s.notPersistedTableSettings.useVirtualScroll?.enforceHeaderHeight) {
|
|
3908
|
-
|
|
3909
|
-
return height + 'px';
|
|
3822
|
+
return s.notPersistedTableSettings.useVirtualScroll.headerHeight + 'px';
|
|
3910
3823
|
}
|
|
3911
3824
|
if (typeof s.notPersistedTableSettings.headerHeight === 'number') {
|
|
3912
3825
|
return s.notPersistedTableSettings.headerHeight + 'px';
|
|
3913
3826
|
}
|
|
3914
3827
|
return s.notPersistedTableSettings.headerHeight;
|
|
3915
3828
|
});
|
|
3829
|
+
$groupHeaderHeight = this.state.selectSignal(s => {
|
|
3830
|
+
if (s.notPersistedTableSettings.groupHeaderHeight) {
|
|
3831
|
+
return s.notPersistedTableSettings.groupHeaderHeight + 'px';
|
|
3832
|
+
}
|
|
3833
|
+
return this.$rowHeight();
|
|
3834
|
+
});
|
|
3916
3835
|
$stickyFooter = computed(() => this.state.props().stickyFooter || this.state.$isVirtual());
|
|
3917
3836
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: GenericTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3918
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: GenericTableComponent, isStandalone: true, selector: "tb-generic-table", inputs: { trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: false, isRequired: false, transformFunction: null },
|
|
3837
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: GenericTableComponent, isStandalone: true, selector: "tb-generic-table", inputs: { trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: false, isRequired: false, transformFunction: null }, displayData$: { classPropertyName: "displayData$", publicName: "displayData$", isSignal: false, isRequired: false, transformFunction: null }, $data: { classPropertyName: "$data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: false, isRequired: false, transformFunction: null }, columnBuilders: { classPropertyName: "columnBuilders", publicName: "columnBuilders", isSignal: false, isRequired: false, transformFunction: null }, columnInfos: { classPropertyName: "columnInfos", publicName: "columnInfos", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selection$: "selection$" }, viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, static: true }, { propertyName: "dropList", first: true, predicate: CdkDropList, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<mat-table\n cdkDropList\n cdkDropListLockAxis='x'\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n class=\"table-drag-list\"\n [class]=\"(showFooterRow$ | async)\"\n #table\n [dataSource]=\"state.props().dataSource!\"\n [trackBy]=\"trackByFunction\"\n [style]=\"tableWidth | async \"\n>\n\n <!-- select column -->\n <ng-container matColumnDef=\"select\">\n\n <mat-header-cell *matHeaderCellDef class=\"select-column\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"!!(masterToggleChecked$ | async)\"\n [indeterminate]=\"masterToggleIndeterminate$ | async\">\n </mat-checkbox>\n </mat-header-cell>\n\n <mat-cell *matCellDef=\"let row\" class=\"select-column\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"/>\n </mat-cell>\n\n <mat-footer-cell *matFooterCellDef class=\"select-column\">\n {{ selection.selected.length }}\n </mat-footer-cell>\n </ng-container>\n\n\n <!-- index column -->\n <ng-container matColumnDef=\"index\">\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\" class=\"index-column\">#\n </mat-header-cell>\n <mat-cell *matCellDef=\"let i = index;\" class=\"index-column\">\n {{ 1 + i + offsetIndex }}\n </mat-cell>\n <mat-footer-cell *matFooterCellDef class=\"index-column\"></mat-footer-cell>\n </ng-container>\n\n <!-- Grouping -->\n <ng-container matColumnDef=\"groupHeader\">\n <mat-cell *matCellDef=\"let row\">\n @let expanded = (state.getIsExpanded | func : row.key : row.groupName );\n <div [style.paddingLeft]=\"row.padding + 'px !important'\">\n <button mat-icon-button (click)=\"setExpanded(row.key, row.groupName, !expanded());\">\n @if (!expanded()) {\n <mat-icon>chevron_right</mat-icon>\n } @else {\n <mat-icon>expand_more</mat-icon>\n }\n </button>\n {{ getTransform | func : row.key : row.groupHeaderDisplay }} ({{ row.length }})\n </div>\n <div style=\"flex-grow: 1\">\n <ng-container *ngTemplateOutlet=\"state.props().groupHeaderTemplate!; context: { element: row }\"></ng-container>\n </div>\n </mat-cell>\n </ng-container>\n\n @if (showHeader$ | async) {\n <mat-header-row [style.height]=\"$headerHeight()\" [style.min-height]=\"$headerHeight()\"\n *matHeaderRowDef=\"keys; sticky: state.props().isSticky\" [style.top.px]=\"((offset$ | async)! * -1)\"/>\n }\n <mat-row [style.height]=\"$rowHeight()\" [style.min-height]=\"$rowHeight()\"\n *matRowDef=\"let row; columns: keys; let i = index\"/>\n <mat-row [style.height]=\"state.props().groupHeaderHeight ? state.props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\n [style.min-height]=\"state.props().groupHeaderHeight ? state.props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\n *matRowDef=\"let row; columns: ['groupHeader']; when: isGroupHeader\" style=\"background-color: white;\"/>\n <mat-footer-row [style.height]=\"$rowHeight()\" [style.min-height]=\"$rowHeight()\"\n *matFooterRowDef=\"(showFooterRow$ | async) === 'regular-footer' ? keys : []; sticky: $stickyFooter() \"\n [style.bottom.px]=\"$stickyFooter() ? (offset$ | async) : undefined\"/>\n\n</mat-table>\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}.small-footer mat-footer-row{min-height:1rem;height:1rem}.no-footer mat-footer-row{display:none}\n"], dependencies: [{ kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i1$5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i1$5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i1$5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i1$5.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i1$5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i1$5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i1$5.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i1$5.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i1$5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i1$5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i1$5.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i1$5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i1$5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i1$5.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", "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: AsyncPipe, name: "async" }, { kind: "pipe", type: FunctionPipe, name: "func" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3919
3838
|
}
|
|
3920
3839
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: GenericTableComponent, decorators: [{
|
|
3921
3840
|
type: Component,
|
|
3922
3841
|
args: [{ selector: 'tb-generic-table', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
3923
3842
|
MatTableModule, DragDropModule, MatCheckboxModule, MatButtonModule, MatIconModule, NgTemplateOutlet,
|
|
3924
3843
|
MatTooltipModule, AsyncPipe, FunctionPipe,
|
|
3925
|
-
], template: "<mat-table\
|
|
3844
|
+
], template: "<mat-table\n cdkDropList\n cdkDropListLockAxis='x'\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"drop($event)\"\n class=\"table-drag-list\"\n [class]=\"(showFooterRow$ | async)\"\n #table\n [dataSource]=\"state.props().dataSource!\"\n [trackBy]=\"trackByFunction\"\n [style]=\"tableWidth | async \"\n>\n\n <!-- select column -->\n <ng-container matColumnDef=\"select\">\n\n <mat-header-cell *matHeaderCellDef class=\"select-column\">\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\n [checked]=\"!!(masterToggleChecked$ | async)\"\n [indeterminate]=\"masterToggleIndeterminate$ | async\">\n </mat-checkbox>\n </mat-header-cell>\n\n <mat-cell *matCellDef=\"let row\" class=\"select-column\">\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? selection.toggle(row) : null\"\n [checked]=\"selection.isSelected(row)\"/>\n </mat-cell>\n\n <mat-footer-cell *matFooterCellDef class=\"select-column\">\n {{ selection.selected.length }}\n </mat-footer-cell>\n </ng-container>\n\n\n <!-- index column -->\n <ng-container matColumnDef=\"index\">\n <mat-header-cell *matHeaderCellDef class=\"f-mat-header-cell\" class=\"index-column\">#\n </mat-header-cell>\n <mat-cell *matCellDef=\"let i = index;\" class=\"index-column\">\n {{ 1 + i + offsetIndex }}\n </mat-cell>\n <mat-footer-cell *matFooterCellDef class=\"index-column\"></mat-footer-cell>\n </ng-container>\n\n <!-- Grouping -->\n <ng-container matColumnDef=\"groupHeader\">\n <mat-cell *matCellDef=\"let row\">\n @let expanded = (state.getIsExpanded | func : row.key : row.groupName );\n <div [style.paddingLeft]=\"row.padding + 'px !important'\">\n <button mat-icon-button (click)=\"setExpanded(row.key, row.groupName, !expanded());\">\n @if (!expanded()) {\n <mat-icon>chevron_right</mat-icon>\n } @else {\n <mat-icon>expand_more</mat-icon>\n }\n </button>\n {{ getTransform | func : row.key : row.groupHeaderDisplay }} ({{ row.length }})\n </div>\n <div style=\"flex-grow: 1\">\n <ng-container *ngTemplateOutlet=\"state.props().groupHeaderTemplate!; context: { element: row }\"></ng-container>\n </div>\n </mat-cell>\n </ng-container>\n\n @if (showHeader$ | async) {\n <mat-header-row [style.height]=\"$headerHeight()\" [style.min-height]=\"$headerHeight()\"\n *matHeaderRowDef=\"keys; sticky: state.props().isSticky\" [style.top.px]=\"((offset$ | async)! * -1)\"/>\n }\n <mat-row [style.height]=\"$rowHeight()\" [style.min-height]=\"$rowHeight()\"\n *matRowDef=\"let row; columns: keys; let i = index\"/>\n <mat-row [style.height]=\"state.props().groupHeaderHeight ? state.props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\n [style.min-height]=\"state.props().groupHeaderHeight ? state.props().groupHeaderHeight + 'px' : $groupHeaderHeight()\"\n *matRowDef=\"let row; columns: ['groupHeader']; when: isGroupHeader\" style=\"background-color: white;\"/>\n <mat-footer-row [style.height]=\"$rowHeight()\" [style.min-height]=\"$rowHeight()\"\n *matFooterRowDef=\"(showFooterRow$ | async) === 'regular-footer' ? keys : []; sticky: $stickyFooter() \"\n [style.bottom.px]=\"$stickyFooter() ? (offset$ | async) : undefined\"/>\n\n</mat-table>\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}.small-footer mat-footer-row{min-height:1rem;height:1rem}.no-footer mat-footer-row{display:none}\n"] }]
|
|
3926
3845
|
}], ctorParameters: () => [], propDecorators: { trackBy: [{
|
|
3927
3846
|
type: Input
|
|
3847
|
+
}], displayData$: [{
|
|
3848
|
+
type: Input
|
|
3928
3849
|
}], rows: [{
|
|
3929
3850
|
type: Input
|
|
3930
3851
|
}], columnBuilders: [{
|
|
3931
3852
|
type: Input
|
|
3853
|
+
}], columnInfos: [{
|
|
3854
|
+
type: Input
|
|
3855
|
+
}], table: [{
|
|
3856
|
+
type: ViewChild,
|
|
3857
|
+
args: [MatTable, { static: true }]
|
|
3932
3858
|
}], dropList: [{
|
|
3933
3859
|
type: ViewChild,
|
|
3934
3860
|
args: [CdkDropList, { static: true }]
|
|
@@ -4011,7 +3937,7 @@ class ExportToCsvService {
|
|
|
4011
3937
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: ExportToCsvService, decorators: [{
|
|
4012
3938
|
type: Injectable
|
|
4013
3939
|
}] });
|
|
4014
|
-
const removeFromMetaData = (state, keysToRemove) =>
|
|
3940
|
+
const removeFromMetaData = (state, keysToRemove) => orderMetaData(state)
|
|
4015
3941
|
.filter(meta => !keysToRemove.includes(meta.key));
|
|
4016
3942
|
const nonExportableFields = (state) => Object.values(state.metaData)
|
|
4017
3943
|
.filter(md => md.noExport)
|
|
@@ -4245,13 +4171,13 @@ const defaultStorageState = {
|
|
|
4245
4171
|
class GroupByListComponent {
|
|
4246
4172
|
tableStore = inject(TableStore);
|
|
4247
4173
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: GroupByListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4248
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: GroupByListComponent, isStandalone: true, selector: "group-by-list", ngImport: i0, template: "<mat-chip-set *ngrxLet=\"tableStore.groupByKeys$ as groupByKeys\">\
|
|
4174
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: GroupByListComponent, isStandalone: true, selector: "group-by-list", ngImport: i0, template: "<mat-chip-set *ngrxLet=\"tableStore.groupByKeys$ as groupByKeys\">\n <span class=\"tb-group-label\">Group By:</span>\n @for (groupByKey of groupByKeys; track groupByKey) {\n @if($index > 0){\n <mat-icon class=\"nested-arrow\">arrow_right</mat-icon>\n }\n <mat-chip (removed)=\"tableStore.removeGroupByKey(groupByKey)\">\n {{groupByKey | spaceCase}}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n }\n</mat-chip-set>\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$3.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$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i4$3.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role", "tabIndex"] }, { kind: "directive", type: LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { 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 });
|
|
4249
4175
|
}
|
|
4250
4176
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: GroupByListComponent, decorators: [{
|
|
4251
4177
|
type: Component,
|
|
4252
4178
|
args: [{ selector: 'group-by-list', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
4253
4179
|
MatChipsModule, LetDirective, MatIconModule, SpaceCasePipe
|
|
4254
|
-
], template: "<mat-chip-set *ngrxLet=\"tableStore.groupByKeys$ as groupByKeys\">\
|
|
4180
|
+
], template: "<mat-chip-set *ngrxLet=\"tableStore.groupByKeys$ as groupByKeys\">\n <span class=\"tb-group-label\">Group By:</span>\n @for (groupByKey of groupByKeys; track groupByKey) {\n @if($index > 0){\n <mat-icon class=\"nested-arrow\">arrow_right</mat-icon>\n }\n <mat-chip (removed)=\"tableStore.removeGroupByKey(groupByKey)\">\n {{groupByKey | spaceCase}}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n }\n</mat-chip-set>\n", styles: [".tb-group-label{padding-right:5px}.nested-arrow{margin-right:-8px;margin-left:-8px}\n"] }]
|
|
4255
4181
|
}] });
|
|
4256
4182
|
|
|
4257
4183
|
class SortMenuComponentStore extends ComponentStore {
|
|
@@ -4270,12 +4196,11 @@ class SortMenuComponentStore extends ComponentStore {
|
|
|
4270
4196
|
sorted.splice(index, 1, sort);
|
|
4271
4197
|
return ({ ...state, sorted });
|
|
4272
4198
|
});
|
|
4273
|
-
metaDataArr$ = toObservable(this.tableState.$metaDataArray);
|
|
4274
4199
|
reset = () => {
|
|
4275
4200
|
const sorted = this.tableState.sort$.pipe(mergeMap(sort => this.tableState.metaData$.pipe(notNull(), map(meta => sort.map(s => {
|
|
4276
4201
|
return { ...s, displayName: meta[s.active]?.displayName };
|
|
4277
4202
|
})))));
|
|
4278
|
-
const notSorted = this.
|
|
4203
|
+
const notSorted = this.tableState.metaDataArray$.pipe(mergeMap(metas => this.tableState.sort$.pipe(map(s => metas
|
|
4279
4204
|
.filter(meta => !s.some(s => s.active === meta.key) && meta.fieldType !== FieldType.NotMapped && !meta.noSort)
|
|
4280
4205
|
.map(meta => ({ active: meta.key, displayName: meta.displayName }))))));
|
|
4281
4206
|
this.set(combineLatest([
|
|
@@ -4343,19 +4268,18 @@ class SortMenuComponent {
|
|
|
4343
4268
|
this.store.setDirection(sort);
|
|
4344
4269
|
}
|
|
4345
4270
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: SortMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4346
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: SortMenuComponent, isStandalone: true, selector: "tb-sort-menu", providers: [SortMenuComponentStore], ngImport: i0, template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\
|
|
4271
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: SortMenuComponent, isStandalone: true, selector: "tb-sort-menu", providers: [SortMenuComponentStore], ngImport: i0, template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\n @if(sorted$ | async; as sorted){\n @if (notSorted$ | async; as notSorted) {\n <!-- Menu Trigger -->\n <span matTooltip=\"Sort\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">swap_vert</mat-icon>\n </button>\n </span>\n\n <!-- Menu -->\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\" (closed)=\"reset()\">\n <div mat-menu-item class=\"menu-button\">\n <div class=\"close-button-wrapper\">\n <span matTooltip=\"Close\">\n <mat-icon>close</mat-icon>\n </span>\n @if(dirty){\n <span matTooltip=\"Undo\" stop-propagation (click)=\"reset()\">\n <mat-icon>undo</mat-icon>\n </span>\n }\n \n </div>\n </div>\n\n <!-- Apply Button -->\n <div class=\"apply-button-wrapper\">\n <button mat-button color=\"primary\" (click)=\"apply(null)\"\n stop-propagation [class.apply-border]=\"dirty\"\n [disabled]=\"!dirty\">\n Apply @if (dirty) { Unsaved Changes }\n </button>\n </div>\n\n <!-- Default Sorting Text -->\n @if (!sorted.length) {\n <div class=\"tip\" >\n Sorting List\n </div>\n }\n\n <!-- Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #sortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[notSortedGroup]\"\n [cdkDropListData]=\"sorted\"\n (cdkDropListDropped)=\"dropIntoSorted($event)\">\n\n <!-- Menu Item Wrapper -->\n @for (sort of sorted; track sort.active) {\n <!-- Menu Item Headers -->\n @if (sorted.length > 1) {\n <span class=\"description sort-header\">{{$index === 0 ? 'First By' : 'Then By'}}</span>\n }\n \n <!-- Menu Item -->\n <div mat-menu-item cdkDrag class=\"menu-item\">\n <div class=\"sort-item\">\n <span class=\"sorted-name\">\n {{sort.displayName || (sort.active | spaceCase)}}\n <span class=\"direction-text\">{{sort.direction}}</span>\n </span>\n \n <!-- Sort Direction Buttons -->\n <div class=\"up-down-buttons-wrapper\">\n <button class=\"up-down-button up-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.asc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction !== SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_upward\n </mat-icon>\n </button>\n \n <button class=\"up-down-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.desc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction === SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_downward\n </mat-icon>\n </button>\n </div>\n </div>\n </div>\n }\n\n </div>\n\n <!-- Default Not Sorted Text -->\n @if(!notSorted.length){\n <div class=\"tip\" >\n Not Sorted List\n </div>\n }\n\n <!-- Not Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #notSortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[sortedGroup]\"\n [cdkDropListData]=\"notSorted\"\n (cdkDropListDropped)=\"dropIntoNotSorted($event)\">\n @for (sort of notSorted; track sort.active) {\n <div mat-menu-item class=\"menu-item\" cdkDrag>\n <span class=\"not-sorted-name\">{{sort.displayName || (sort.active | spaceCase)}}</span>\n </div>\n }\n </div>\n </mat-menu>\n }\n }\n</ng-container>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list{padding:5px 2px;border-bottom:solid 1px #ccc;color:#000000de;background:#fff}.light-arrow{color:#93b1ea78}.dark-arrow{color:#224e9c}.up-down-button{background-color:#fff;border-radius:30%;border-color:#0ff;padding:1px 1px 0;border-width:.5px;cursor:pointer;height:27px}.mat-icon.up-down-icon{margin-right:0;font-size:20px;font-weight:lighter}.sort-item{display:flex;align-items:center;justify-content:space-between}.up-down-buttons-wrapper{margin-left:2rem}.up-button{margin-right:.3rem}.mat-mdc-menu-item.menu-item,.mat-mdc-menu-item.menu-button{min-height:initial;padding:0 3px;line-height:25px;height:30px}.mat-mdc-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c;font-size:17px;font-weight:700}.not-sorted-name{color:#93b1ea;font-size:17px;font-weight:700}.apply-border{border:#224e9c solid .5px}.apply-border:hover{background-color:#faebd7}.apply-button-wrapper{display:grid;justify-content:center}.sort-header{font-size:10px;font-style:italic}.tip{padding:0 3px;color:#d3d3d3}.direction-text{font-size:small;font-weight:400}.close-button-wrapper{display:flex;flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { 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: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i4$2.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: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { 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: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "pipe", type: SpaceCasePipe, name: "spaceCase" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4347
4272
|
}
|
|
4348
4273
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: SortMenuComponent, decorators: [{
|
|
4349
4274
|
type: Component,
|
|
4350
4275
|
args: [{ selector: 'tb-sort-menu', providers: [SortMenuComponentStore], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
4351
4276
|
LetDirective, MatTooltipModule, MatButtonModule, MatIconModule, MatMenuModule, StopPropagationDirective, DragDropModule,
|
|
4352
4277
|
SpaceCasePipe, NgClass, AsyncPipe
|
|
4353
|
-
], template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\
|
|
4278
|
+
], template: "<ng-container *ngrxLet=\"dirty$ as dirty\">\n @if(sorted$ | async; as sorted){\n @if (notSorted$ | async; as notSorted) {\n <!-- Menu Trigger -->\n <span matTooltip=\"Sort\">\n <button mat-icon-button [matMenuTriggerFor]=\"menu\">\n <mat-icon color=\"primary\">swap_vert</mat-icon>\n </button>\n </span>\n\n <!-- Menu -->\n <mat-menu #menu=\"matMenu\" class=\"my-mat-menu\" (closed)=\"reset()\">\n <div mat-menu-item class=\"menu-button\">\n <div class=\"close-button-wrapper\">\n <span matTooltip=\"Close\">\n <mat-icon>close</mat-icon>\n </span>\n @if(dirty){\n <span matTooltip=\"Undo\" stop-propagation (click)=\"reset()\">\n <mat-icon>undo</mat-icon>\n </span>\n }\n \n </div>\n </div>\n\n <!-- Apply Button -->\n <div class=\"apply-button-wrapper\">\n <button mat-button color=\"primary\" (click)=\"apply(null)\"\n stop-propagation [class.apply-border]=\"dirty\"\n [disabled]=\"!dirty\">\n Apply @if (dirty) { Unsaved Changes }\n </button>\n </div>\n\n <!-- Default Sorting Text -->\n @if (!sorted.length) {\n <div class=\"tip\" >\n Sorting List\n </div>\n }\n\n <!-- Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #sortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[notSortedGroup]\"\n [cdkDropListData]=\"sorted\"\n (cdkDropListDropped)=\"dropIntoSorted($event)\">\n\n <!-- Menu Item Wrapper -->\n @for (sort of sorted; track sort.active) {\n <!-- Menu Item Headers -->\n @if (sorted.length > 1) {\n <span class=\"description sort-header\">{{$index === 0 ? 'First By' : 'Then By'}}</span>\n }\n \n <!-- Menu Item -->\n <div mat-menu-item cdkDrag class=\"menu-item\">\n <div class=\"sort-item\">\n <span class=\"sorted-name\">\n {{sort.displayName || (sort.active | spaceCase)}}\n <span class=\"direction-text\">{{sort.direction}}</span>\n </span>\n \n <!-- Sort Direction Buttons -->\n <div class=\"up-down-buttons-wrapper\">\n <button class=\"up-down-button up-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.asc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction !== SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_upward\n </mat-icon>\n </button>\n \n <button class=\"up-down-button\" stop-propagation\n (click)=\"setDirection({active:sort.active,direction:SortDirection.desc,displayName:sort.displayName})\">\n <mat-icon [ngClass]=\"sort.direction === SortDirection.asc ? 'light-arrow' : 'dark-arrow'\" class=\"up-down-icon\">\n arrow_downward\n </mat-icon>\n </button>\n </div>\n </div>\n </div>\n }\n\n </div>\n\n <!-- Default Not Sorted Text -->\n @if(!notSorted.length){\n <div class=\"tip\" >\n Not Sorted List\n </div>\n }\n\n <!-- Not Sorted Menu List -->\n <div class=\"list\"\n cdkDropList\n #notSortedGroup=\"cdkDropList\"\n [cdkDropListConnectedTo]=\"[sortedGroup]\"\n [cdkDropListData]=\"notSorted\"\n (cdkDropListDropped)=\"dropIntoNotSorted($event)\">\n @for (sort of notSorted; track sort.active) {\n <div mat-menu-item class=\"menu-item\" cdkDrag>\n <span class=\"not-sorted-name\">{{sort.displayName || (sort.active | spaceCase)}}</span>\n </div>\n }\n </div>\n </mat-menu>\n }\n }\n</ng-container>\n", styles: [".cdk-drag-preview{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list{padding:5px 2px;border-bottom:solid 1px #ccc;color:#000000de;background:#fff}.light-arrow{color:#93b1ea78}.dark-arrow{color:#224e9c}.up-down-button{background-color:#fff;border-radius:30%;border-color:#0ff;padding:1px 1px 0;border-width:.5px;cursor:pointer;height:27px}.mat-icon.up-down-icon{margin-right:0;font-size:20px;font-weight:lighter}.sort-item{display:flex;align-items:center;justify-content:space-between}.up-down-buttons-wrapper{margin-left:2rem}.up-button{margin-right:.3rem}.mat-mdc-menu-item.menu-item,.mat-mdc-menu-item.menu-button{min-height:initial;padding:0 3px;line-height:25px;height:30px}.mat-mdc-menu-item.menu-item{cursor:move}.sorted-name{color:#224e9c;font-size:17px;font-weight:700}.not-sorted-name{color:#93b1ea;font-size:17px;font-weight:700}.apply-border{border:#224e9c solid .5px}.apply-border:hover{background-color:#faebd7}.apply-button-wrapper{display:grid;justify-content:center}.sort-header{font-size:10px;font-style:italic}.tip{padding:0 3px;color:#d3d3d3}.direction-text{font-size:small;font-weight:400}.close-button-wrapper{display:flex;flex-direction:row-reverse}\n"] }]
|
|
4354
4279
|
}], ctorParameters: () => [] });
|
|
4355
4280
|
|
|
4356
4281
|
class PaginatorComponent {
|
|
4357
4282
|
state = inject(TableStore);
|
|
4358
|
-
data = inject(DataStore);
|
|
4359
4283
|
paginator;
|
|
4360
4284
|
currentPageData$;
|
|
4361
4285
|
$collapseFooter = computed(() => this.state.selectSignal(state => state.persistedTableSettings.collapseFooter)() || this.$showAll());
|
|
@@ -4368,7 +4292,7 @@ class PaginatorComponent {
|
|
|
4368
4292
|
this.state.updateState({ currentPage: pageEvent.pageIndex });
|
|
4369
4293
|
});
|
|
4370
4294
|
this.state.setPageSize(onPaginatorPageSizeChange(this.paginator));
|
|
4371
|
-
this.state.on(this.
|
|
4295
|
+
this.state.on(this.state.select(s => s.dataLen), (len) => this.paginator.length = len);
|
|
4372
4296
|
}
|
|
4373
4297
|
ngAfterViewInit() {
|
|
4374
4298
|
this.currentPageData$ = merge(this.paginator.page.pipe(map(mapPaginationEventToCurrentPageDetails)), this.data$.pipe(distinctUntilKeyChanged("length"), delayToAllowForProperUpdate, map(updateCurrentPageDetailsOnDataLengthChange(this.paginator))));
|
|
@@ -4389,35 +4313,35 @@ class PaginatorComponent {
|
|
|
4389
4313
|
this.updatePaginator();
|
|
4390
4314
|
}
|
|
4391
4315
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4392
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: PaginatorComponent, isStandalone: true, selector: "tb-paginator", inputs: { data$: "data$", tableElRef: "tableElRef" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }], ngImport: i0, template: `
|
|
4393
|
-
<div class="paginator-row">
|
|
4394
|
-
@if(currentPageData$ | async; as pageData){
|
|
4395
|
-
<div [class]="{ 'hide' : ! $collapseFooter(), 'page-amounts':true}">
|
|
4396
|
-
@if(!$showAll()){{{pageData.currentStart}} - {{pageData.currentEnd}} of }{{pageData.total}}
|
|
4397
|
-
</div>
|
|
4398
|
-
}
|
|
4399
|
-
<mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons (page)="paginatorChange()"
|
|
4400
|
-
[class]="{ 'hide' : $collapseFooter() }">
|
|
4401
|
-
</mat-paginator>
|
|
4402
|
-
@if ($showAllOption()) {<button mat-button (click)="updatePaginator()"><span [style.text-decoration]="$showAll() ? 'line-through' : ''" >All</span></button>}
|
|
4403
|
-
</div>
|
|
4404
|
-
`, isInline: true, styles: [":host{--mat-paginator-container-size: initial}.select-column{min-width:var(--tb-min-select-column-width, 42px)}.index-column{min-width:var(--tb-min-index-column-width, 42px)}.mat-mdc-row:nth-child(odd){background-color:var(--tb-odd-row-background-color, #cdeefe)}.page-amounts{color:#0000008a;font-family:Roboto,Helvetica Neue,sans-serif;font-size:12px;margin-right:.2rem}:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell{padding:var(--tb-cell-padding, 0 0 0 .2rem);line-height:var(--tb-cell-line-height, normal)}::ng-deep .op-date-time-input{line-height:3rem;font-size:.9rem;font-family:Roboto,Helvetica Neue,sans-serif;padding-left:.2rem;width:12rem}.small-footer mat-footer-row{min-height:1rem;height:1rem}\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: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1$6.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4316
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: PaginatorComponent, isStandalone: true, selector: "tb-paginator", inputs: { data$: "data$", tableElRef: "tableElRef" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }], ngImport: i0, template: `
|
|
4317
|
+
<div class="paginator-row">
|
|
4318
|
+
@if(currentPageData$ | async; as pageData){
|
|
4319
|
+
<div [class]="{ 'hide' : ! $collapseFooter(), 'page-amounts':true}">
|
|
4320
|
+
@if(!$showAll()){{{pageData.currentStart}} - {{pageData.currentEnd}} of }{{pageData.total}}
|
|
4321
|
+
</div>
|
|
4322
|
+
}
|
|
4323
|
+
<mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons (page)="paginatorChange()"
|
|
4324
|
+
[class]="{ 'hide' : $collapseFooter() }">
|
|
4325
|
+
</mat-paginator>
|
|
4326
|
+
@if ($showAllOption()) {<button mat-button (click)="updatePaginator()"><span [style.text-decoration]="$showAll() ? 'line-through' : ''" >All</span></button>}
|
|
4327
|
+
</div>
|
|
4328
|
+
`, isInline: true, styles: [":host{--mat-paginator-container-size: initial}.select-column{min-width:var(--tb-min-select-column-width, 42px)}.index-column{min-width:var(--tb-min-index-column-width, 42px)}.mat-mdc-row:nth-child(odd){background-color:var(--tb-odd-row-background-color, #cdeefe)}.page-amounts{color:#0000008a;font-family:Roboto,Helvetica Neue,sans-serif;font-size:12px;margin-right:.2rem}:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell{padding:var(--tb-cell-padding, 0 0 0 .2rem);line-height:var(--tb-cell-line-height, normal)}::ng-deep .op-date-time-input{line-height:3rem;font-size:.9rem;font-family:Roboto,Helvetica Neue,sans-serif;padding-left:.2rem;width:12rem}.small-footer mat-footer-row{min-height:1rem;height:1rem}.no-footer mat-footer-row{display:none}\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: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i1$6.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4405
4329
|
}
|
|
4406
4330
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: PaginatorComponent, decorators: [{
|
|
4407
4331
|
type: Component,
|
|
4408
|
-
args: [{ selector: 'tb-paginator', standalone: true, imports: [AsyncPipe, MatPaginatorModule, NgClass, MatButtonModule], template: `
|
|
4409
|
-
<div class="paginator-row">
|
|
4410
|
-
@if(currentPageData$ | async; as pageData){
|
|
4411
|
-
<div [class]="{ 'hide' : ! $collapseFooter(), 'page-amounts':true}">
|
|
4412
|
-
@if(!$showAll()){{{pageData.currentStart}} - {{pageData.currentEnd}} of }{{pageData.total}}
|
|
4413
|
-
</div>
|
|
4414
|
-
}
|
|
4415
|
-
<mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons (page)="paginatorChange()"
|
|
4416
|
-
[class]="{ 'hide' : $collapseFooter() }">
|
|
4417
|
-
</mat-paginator>
|
|
4418
|
-
@if ($showAllOption()) {<button mat-button (click)="updatePaginator()"><span [style.text-decoration]="$showAll() ? 'line-through' : ''" >All</span></button>}
|
|
4419
|
-
</div>
|
|
4420
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--mat-paginator-container-size: initial}.select-column{min-width:var(--tb-min-select-column-width, 42px)}.index-column{min-width:var(--tb-min-index-column-width, 42px)}.mat-mdc-row:nth-child(odd){background-color:var(--tb-odd-row-background-color, #cdeefe)}.page-amounts{color:#0000008a;font-family:Roboto,Helvetica Neue,sans-serif;font-size:12px;margin-right:.2rem}:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell{padding:var(--tb-cell-padding, 0 0 0 .2rem);line-height:var(--tb-cell-line-height, normal)}::ng-deep .op-date-time-input{line-height:3rem;font-size:.9rem;font-family:Roboto,Helvetica Neue,sans-serif;padding-left:.2rem;width:12rem}.small-footer mat-footer-row{min-height:1rem;height:1rem}\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"] }]
|
|
4332
|
+
args: [{ selector: 'tb-paginator', standalone: true, imports: [AsyncPipe, MatPaginatorModule, NgClass, MatButtonModule], template: `
|
|
4333
|
+
<div class="paginator-row">
|
|
4334
|
+
@if(currentPageData$ | async; as pageData){
|
|
4335
|
+
<div [class]="{ 'hide' : ! $collapseFooter(), 'page-amounts':true}">
|
|
4336
|
+
@if(!$showAll()){{{pageData.currentStart}} - {{pageData.currentEnd}} of }{{pageData.total}}
|
|
4337
|
+
</div>
|
|
4338
|
+
}
|
|
4339
|
+
<mat-paginator [pageSizeOptions]="[5, 10, 20, 50, 100, 500]" showFirstLastButtons (page)="paginatorChange()"
|
|
4340
|
+
[class]="{ 'hide' : $collapseFooter() }">
|
|
4341
|
+
</mat-paginator>
|
|
4342
|
+
@if ($showAllOption()) {<button mat-button (click)="updatePaginator()"><span [style.text-decoration]="$showAll() ? 'line-through' : ''" >All</span></button>}
|
|
4343
|
+
</div>
|
|
4344
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{--mat-paginator-container-size: initial}.select-column{min-width:var(--tb-min-select-column-width, 42px)}.index-column{min-width:var(--tb-min-index-column-width, 42px)}.mat-mdc-row:nth-child(odd){background-color:var(--tb-odd-row-background-color, #cdeefe)}.page-amounts{color:#0000008a;font-family:Roboto,Helvetica Neue,sans-serif;font-size:12px;margin-right:.2rem}:host::ng-deep .table-drag-list.cdk-drop-list-dragging .drag-header:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host::ng-deep .mdc-data-table__cell,:host::ng-deep .mdc-data-table__header-cell{padding:var(--tb-cell-padding, 0 0 0 .2rem);line-height:var(--tb-cell-line-height, normal)}::ng-deep .op-date-time-input{line-height:3rem;font-size:.9rem;font-family:Roboto,Helvetica Neue,sans-serif;padding-left:.2rem;width:12rem}.small-footer mat-footer-row{min-height:1rem;height:1rem}.no-footer mat-footer-row{display:none}\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"] }]
|
|
4421
4345
|
}], propDecorators: { paginator: [{
|
|
4422
4346
|
type: ViewChild,
|
|
4423
4347
|
args: [MatPaginator, { static: true }]
|
|
@@ -4499,15 +4423,14 @@ class TableVirtualScrollStrategy {
|
|
|
4499
4423
|
|
|
4500
4424
|
class VirtualScrollContainer {
|
|
4501
4425
|
state = inject(TableStore);
|
|
4502
|
-
dataStore = inject(DataStore);
|
|
4503
4426
|
viewport = viewChild(CdkVirtualScrollViewport);
|
|
4504
4427
|
defaultOptions = new VirtualScrollOptions();
|
|
4505
4428
|
scrollStrategy = new TableVirtualScrollStrategy(this.computedRowHeight(), this.computedHeaderHeight());
|
|
4506
|
-
dataLength$ =
|
|
4429
|
+
dataLength$ = this.state.state$.pipe(map$1(s => ({
|
|
4507
4430
|
paginated: s.notPersistedTableSettings.usePaginator && !s.showAll,
|
|
4508
4431
|
pageSize: s.userDefined?.pageSize || s.pageSize,
|
|
4509
4432
|
pageNumber: s.currentPage,
|
|
4510
|
-
dataLen:
|
|
4433
|
+
dataLen: s.dataLen
|
|
4511
4434
|
})), distinctUntilChanged$1((a, b) => a.dataLen === b.dataLen &&
|
|
4512
4435
|
a.pageSize === b.pageSize &&
|
|
4513
4436
|
a.pageNumber === b.pageNumber &&
|
|
@@ -4528,7 +4451,7 @@ class VirtualScrollContainer {
|
|
|
4528
4451
|
if (!!viewport) {
|
|
4529
4452
|
addEventListener('resize', this.resizeHandler);
|
|
4530
4453
|
this.subscriber.on(viewport.renderedRangeStream, (range) => {
|
|
4531
|
-
this.
|
|
4454
|
+
this.state.updateState({
|
|
4532
4455
|
virtualEnds: {
|
|
4533
4456
|
start: range.start,
|
|
4534
4457
|
end: range.end + 25,
|
|
@@ -4537,7 +4460,7 @@ class VirtualScrollContainer {
|
|
|
4537
4460
|
});
|
|
4538
4461
|
var offset$ = viewport.scrolledIndexChange.pipe(map$1(() => viewport.getOffsetToRenderedContentStart() ?? 0), distinctUntilChanged$1(), defaultShareReplay());
|
|
4539
4462
|
this.subscriber.on(offset$, (offset) => {
|
|
4540
|
-
this.
|
|
4463
|
+
this.state.updateState({ virtualScrollOffset: offset });
|
|
4541
4464
|
});
|
|
4542
4465
|
this.setSize(this.viewport().elementRef);
|
|
4543
4466
|
}
|
|
@@ -4563,7 +4486,7 @@ class VirtualScrollContainer {
|
|
|
4563
4486
|
vsViewport.setAttribute('style', `height: ${height}px !important;`);
|
|
4564
4487
|
this.viewport()?.checkViewportSize();
|
|
4565
4488
|
const virtualScrollOffset = this.viewport()?.getOffsetToRenderedContentStart() ?? 0;
|
|
4566
|
-
this.
|
|
4489
|
+
this.state.updateState({ virtualScrollOffset });
|
|
4567
4490
|
}
|
|
4568
4491
|
resizeHandler = () => {
|
|
4569
4492
|
if (this.viewport()) {
|
|
@@ -4581,10 +4504,10 @@ class VirtualScrollContainer {
|
|
|
4581
4504
|
return headerHeight;
|
|
4582
4505
|
}
|
|
4583
4506
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: VirtualScrollContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4584
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.2", type: VirtualScrollContainer, isStandalone: true, selector: "tb-virtual-scroll-container", viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
4585
|
-
<cdk-virtual-scroll-viewport>
|
|
4586
|
-
<ng-content/>
|
|
4587
|
-
</cdk-virtual-scroll-viewport>
|
|
4507
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.2", type: VirtualScrollContainer, isStandalone: true, selector: "tb-virtual-scroll-container", viewQueries: [{ propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
4508
|
+
<cdk-virtual-scroll-viewport>
|
|
4509
|
+
<ng-content/>
|
|
4510
|
+
</cdk-virtual-scroll-viewport>
|
|
4588
4511
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ScrollingModule }, { kind: "component", type: i1$7.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }], viewProviders: [
|
|
4589
4512
|
{
|
|
4590
4513
|
provide: VIRTUAL_SCROLL_STRATEGY,
|
|
@@ -4597,10 +4520,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
4597
4520
|
type: Component,
|
|
4598
4521
|
args: [{
|
|
4599
4522
|
selector: 'tb-virtual-scroll-container',
|
|
4600
|
-
template: `
|
|
4601
|
-
<cdk-virtual-scroll-viewport>
|
|
4602
|
-
<ng-content/>
|
|
4603
|
-
</cdk-virtual-scroll-viewport>
|
|
4523
|
+
template: `
|
|
4524
|
+
<cdk-virtual-scroll-viewport>
|
|
4525
|
+
<ng-content/>
|
|
4526
|
+
</cdk-virtual-scroll-viewport>
|
|
4604
4527
|
`,
|
|
4605
4528
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4606
4529
|
standalone: true,
|
|
@@ -4654,13 +4577,13 @@ class ProfilesMenuComponent {
|
|
|
4654
4577
|
return a;
|
|
4655
4578
|
};
|
|
4656
4579
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: ProfilesMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4657
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: ProfilesMenuComponent, isStandalone: true, selector: "tb-profiles-menu", inputs: { $tableId: { classPropertyName: "$tableId", publicName: "$tableId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onSaveState: "onSaveState" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<button mat-icon-button [matMenuTriggerFor]=\"menu\" #trigger=\"matMenuTrigger\" [matTooltip]=\"'Profiles'\">\
|
|
4580
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: ProfilesMenuComponent, isStandalone: true, selector: "tb-profiles-menu", inputs: { $tableId: { classPropertyName: "$tableId", publicName: "$tableId", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onSaveState: "onSaveState" }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<button mat-icon-button [matMenuTriggerFor]=\"menu\" #trigger=\"matMenuTrigger\" [matTooltip]=\"'Profiles'\">\n <mat-icon color=\"primary\">people</mat-icon>\n</button>\n<mat-menu #menu=\"matMenu\" (closed)=\"addedKey.value = null; allProfilesPanelOpened.set(false); newProfilePanelOpened.set(false)\">\n @if(!!$currentProfile())\n {\n <div mat-menu-item [matTooltip]=\"'Save Profile'\" mat-stroked-button (click)=\"saveState($currentProfile()!)\">\n <mat-icon color=\"primary\">save</mat-icon>\n <span>{{$currentProfile()}}</span>\n </div>\n }\n @else\n {\n <div class=\"profile-line\">\n <button class=\"first-in-line first-button\" mat-stroked-button (click)=\"addState(defaultName, m.checked);\">\n <mat-icon class=\"save-for-default-icon button-save-icon\" color=\"primary\">save</mat-icon>\n <span>Save as <span class=\"current-name\">{{defaultName}}</span> </span>\n </button>\n <button [matTooltip]=\"'Toggle Profile Being Created As Default'\" stop-propagation mat-icon-button (click)=\"m.toggle()\" >\n <mat-icon style=\"color: green;\">{{m.checked ? 'star' : 'star_border'}}</mat-icon>\n </button>\n <mat-checkbox class=\"display-none\" [checked]=\"true\" #m />\n </div>\n }\n @if (allProfilesPanelOpened()) {<hr class=\"divider\"/>}\n <div [class]=\"{ hide: !$keys().length }\" mat-menu-item stop-propagation (click)=\"allProfilesPanelOpened.set(!allProfilesPanelOpened())\">All Profiles</div>\n <div [class]=\"{ hide: !allProfilesPanelOpened(), panel: true }\">\n @for (key of $keys() ; track key) {\n <div class=\"profile-line\" [class.current-in-list]=\"key === $currentProfile()\">\n <button [matTooltip]=\"'Select Profile'\" class=\"menu-item first-in-line\" mat-stroked-button (click)='stateService.setLocalCurrentState({ tableId: $tableId(), currentStateKey: key})'>\n <span>{{key}}</span>\n </button>\n @if(key !== $defaultProfile())\n {\n <button [matTooltip]=\"'Toggle Profile Being Default'\" stop-propagation mat-icon-button (click)=\"setDefault(key)\">\n <mat-icon style=\"color: green;\">star_border</mat-icon>\n </button>\n }\n @else\n {\n <button [matTooltip]=\"'Toggle Profile Being Default'\" stop-propagation mat-icon-button (click)=\"unsetDefault()\">\n <mat-icon style=\"color: green;\">star</mat-icon>\n </button>\n }\n <button [matTooltip]=\"'Delete Profile'\" class=\"last-in-line\" stop-propagation mat-icon-button (click)='stateService.deleteProfileFromLocalAndStorage($tableId(), key)'>\n <mat-icon color='warn'>delete_forever</mat-icon>\n </button>\n </div>\n }\n <hr class=\"divider\"/>\n </div>\n @if (newProfilePanelOpened() && !allProfilesPanelOpened()){<hr class=\"divider\"/>}\n <div mat-menu-item stop-propagation (click)=\"newProfilePanelOpened.set(!newProfilePanelOpened()); addedKey.focus()\">Add New Profile</div>\n <div [class]=\"{ hide: !newProfilePanelOpened(), panel: true }\" >\n <div class=\"profile-line\" stop-propagation>\n <div class=\"new-name-input\">\n <i class=\"input-hint\">Enter New Name</i>\n <input matInput #addedKey=\"matInput\" [name]=\"'key'\" />\n </div>\n <button [matTooltip]=\"'Toggle Profile Being Created As Default'\" stop-propagation mat-icon-button (click)=\"m2.toggle()\" >\n <mat-icon style=\"color: green;\">{{m2.checked ? 'star' : 'star_border'}}</mat-icon>\n </button>\n <mat-checkbox class=\"display-none\" [ngModel]=\"!$defaultProfile()\" #m2 />\n </div>\n <button class=\"add-button\" color=\"primary\" [matTooltip]=\"'Create New Profile'\" mat-raised-button (click)=\"addState(addedKey.value, m2.checked); addedKey.value = null\" [disabled]=\"!addedKey.value\">\n Add\n </button>\n </div>\n</mat-menu>\n\n<ng-template #line let-key>\n\n\n</ng-template>\n", styles: [":host ::ng-deep .mat-expansion-panel-header{padding:0}.current-name{color:#00f}.menu-item{display:inline-flex;width:initial;flex-grow:1}.profile-line{display:flex;justify-content:space-between;align-items:center}.first-in-line{--f-b: 2rem;margin-left:var(--mat-menu-item-with-icon-leading-spacing)}.first-in-line.first-button{height:var(--f-b);margin:.2rem}.first-in-line .button-save-icon{height:var(--f-b);width:var(--f-b);font-size:var(--f-b)}.main-save-button{height:4rem;width:4rem;padding:.5rem}.main-save-button mat-icon{height:3rem;width:3rem;font-size:3rem}.save-for-default-icon{margin:0}.display-none{display:none}.last-in-line{padding-right:var(--mat-menu-item-with-icon-trailing-spacing)}.default-cursor{cursor:default}.as-def{padding-left:var(--mat-menu-item-with-icon-leading-spacing)}.divider{margin:.2px 0}.add-key{max-width:8.5rem;margin-left:2px}.add-key ::ng-deep .mdc-text-field{padding:0}.panel{transition:height .1s}.hide{height:0;min-height:0;overflow:hidden}.open-panel-button{width:100%;height:2.5rem}.current-in-list{border-left:3px solid blue;background-color:#0000ff0d}.new-name-input{margin-left:3px;display:flex;flex-direction:column}.new-name-input .input-hint{font-size:smaller;font-weight:200;color:gray}.add-button{height:20px;line-height:20px;margin:3px 0 0 3px}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i4$2.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: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: FormsModule }, { 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"] }] });
|
|
4658
4581
|
}
|
|
4659
4582
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: ProfilesMenuComponent, decorators: [{
|
|
4660
4583
|
type: Component,
|
|
4661
4584
|
args: [{ selector: 'tb-profiles-menu', standalone: true, imports: [MatIcon, MatTooltip, MatIconButton, MatMenuModule, MatButton, MatInput, DialogDirective, ClickEmitterDirective, NgTemplateOutlet,
|
|
4662
4585
|
MatCheckbox, StopPropagationDirective, FunctionPipe, MatInputModule, AsyncPipe, FormsModule
|
|
4663
|
-
], template: "<button mat-icon-button [matMenuTriggerFor]=\"menu\" #trigger=\"matMenuTrigger\" [matTooltip]=\"'Profiles'\">\
|
|
4586
|
+
], template: "<button mat-icon-button [matMenuTriggerFor]=\"menu\" #trigger=\"matMenuTrigger\" [matTooltip]=\"'Profiles'\">\n <mat-icon color=\"primary\">people</mat-icon>\n</button>\n<mat-menu #menu=\"matMenu\" (closed)=\"addedKey.value = null; allProfilesPanelOpened.set(false); newProfilePanelOpened.set(false)\">\n @if(!!$currentProfile())\n {\n <div mat-menu-item [matTooltip]=\"'Save Profile'\" mat-stroked-button (click)=\"saveState($currentProfile()!)\">\n <mat-icon color=\"primary\">save</mat-icon>\n <span>{{$currentProfile()}}</span>\n </div>\n }\n @else\n {\n <div class=\"profile-line\">\n <button class=\"first-in-line first-button\" mat-stroked-button (click)=\"addState(defaultName, m.checked);\">\n <mat-icon class=\"save-for-default-icon button-save-icon\" color=\"primary\">save</mat-icon>\n <span>Save as <span class=\"current-name\">{{defaultName}}</span> </span>\n </button>\n <button [matTooltip]=\"'Toggle Profile Being Created As Default'\" stop-propagation mat-icon-button (click)=\"m.toggle()\" >\n <mat-icon style=\"color: green;\">{{m.checked ? 'star' : 'star_border'}}</mat-icon>\n </button>\n <mat-checkbox class=\"display-none\" [checked]=\"true\" #m />\n </div>\n }\n @if (allProfilesPanelOpened()) {<hr class=\"divider\"/>}\n <div [class]=\"{ hide: !$keys().length }\" mat-menu-item stop-propagation (click)=\"allProfilesPanelOpened.set(!allProfilesPanelOpened())\">All Profiles</div>\n <div [class]=\"{ hide: !allProfilesPanelOpened(), panel: true }\">\n @for (key of $keys() ; track key) {\n <div class=\"profile-line\" [class.current-in-list]=\"key === $currentProfile()\">\n <button [matTooltip]=\"'Select Profile'\" class=\"menu-item first-in-line\" mat-stroked-button (click)='stateService.setLocalCurrentState({ tableId: $tableId(), currentStateKey: key})'>\n <span>{{key}}</span>\n </button>\n @if(key !== $defaultProfile())\n {\n <button [matTooltip]=\"'Toggle Profile Being Default'\" stop-propagation mat-icon-button (click)=\"setDefault(key)\">\n <mat-icon style=\"color: green;\">star_border</mat-icon>\n </button>\n }\n @else\n {\n <button [matTooltip]=\"'Toggle Profile Being Default'\" stop-propagation mat-icon-button (click)=\"unsetDefault()\">\n <mat-icon style=\"color: green;\">star</mat-icon>\n </button>\n }\n <button [matTooltip]=\"'Delete Profile'\" class=\"last-in-line\" stop-propagation mat-icon-button (click)='stateService.deleteProfileFromLocalAndStorage($tableId(), key)'>\n <mat-icon color='warn'>delete_forever</mat-icon>\n </button>\n </div>\n }\n <hr class=\"divider\"/>\n </div>\n @if (newProfilePanelOpened() && !allProfilesPanelOpened()){<hr class=\"divider\"/>}\n <div mat-menu-item stop-propagation (click)=\"newProfilePanelOpened.set(!newProfilePanelOpened()); addedKey.focus()\">Add New Profile</div>\n <div [class]=\"{ hide: !newProfilePanelOpened(), panel: true }\" >\n <div class=\"profile-line\" stop-propagation>\n <div class=\"new-name-input\">\n <i class=\"input-hint\">Enter New Name</i>\n <input matInput #addedKey=\"matInput\" [name]=\"'key'\" />\n </div>\n <button [matTooltip]=\"'Toggle Profile Being Created As Default'\" stop-propagation mat-icon-button (click)=\"m2.toggle()\" >\n <mat-icon style=\"color: green;\">{{m2.checked ? 'star' : 'star_border'}}</mat-icon>\n </button>\n <mat-checkbox class=\"display-none\" [ngModel]=\"!$defaultProfile()\" #m2 />\n </div>\n <button class=\"add-button\" color=\"primary\" [matTooltip]=\"'Create New Profile'\" mat-raised-button (click)=\"addState(addedKey.value, m2.checked); addedKey.value = null\" [disabled]=\"!addedKey.value\">\n Add\n </button>\n </div>\n</mat-menu>\n\n<ng-template #line let-key>\n\n\n</ng-template>\n", styles: [":host ::ng-deep .mat-expansion-panel-header{padding:0}.current-name{color:#00f}.menu-item{display:inline-flex;width:initial;flex-grow:1}.profile-line{display:flex;justify-content:space-between;align-items:center}.first-in-line{--f-b: 2rem;margin-left:var(--mat-menu-item-with-icon-leading-spacing)}.first-in-line.first-button{height:var(--f-b);margin:.2rem}.first-in-line .button-save-icon{height:var(--f-b);width:var(--f-b);font-size:var(--f-b)}.main-save-button{height:4rem;width:4rem;padding:.5rem}.main-save-button mat-icon{height:3rem;width:3rem;font-size:3rem}.save-for-default-icon{margin:0}.display-none{display:none}.last-in-line{padding-right:var(--mat-menu-item-with-icon-trailing-spacing)}.default-cursor{cursor:default}.as-def{padding-left:var(--mat-menu-item-with-icon-leading-spacing)}.divider{margin:.2px 0}.add-key{max-width:8.5rem;margin-left:2px}.add-key ::ng-deep .mdc-text-field{padding:0}.panel{transition:height .1s}.hide{height:0;min-height:0;overflow:hidden}.open-panel-button{width:100%;height:2.5rem}.current-in-list{border-left:3px solid blue;background-color:#0000ff0d}.new-name-input{margin-left:3px;display:flex;flex-direction:column}.new-name-input .input-hint{font-size:smaller;font-weight:200;color:gray}.add-button{height:20px;line-height:20px;margin:3px 0 0 3px}\n"] }]
|
|
4664
4587
|
}] });
|
|
4665
4588
|
|
|
4666
4589
|
const containerImports = [
|
|
@@ -4957,24 +4880,19 @@ const defaultProps = {
|
|
|
4957
4880
|
selectionColumn: false,
|
|
4958
4881
|
isSticky: true,
|
|
4959
4882
|
stickyFooter: false,
|
|
4883
|
+
groupHeaderHeight: undefined,
|
|
4960
4884
|
};
|
|
4961
4885
|
|
|
4962
4886
|
class TableBuilderDataSource extends MatTableDataSource {
|
|
4963
4887
|
dataSrc;
|
|
4964
4888
|
subscription;
|
|
4965
|
-
|
|
4889
|
+
#viewableData$ = new Subject();
|
|
4890
|
+
viewableData$ = this.#viewableData$.pipe(mergeAll());
|
|
4891
|
+
constructor(dataSrc, state) {
|
|
4966
4892
|
super([]);
|
|
4967
4893
|
this.dataSrc = dataSrc;
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
&& d1.pageSize === d2.pageSize
|
|
4971
|
-
&& d1.virtualEnd === d2.virtualEnd
|
|
4972
|
-
&& d1.virtualStart === d2.virtualStart));
|
|
4973
|
-
const _dataLength = this.dataSrc.pipe(map$1((data) => data.length), distinctUntilChanged$1());
|
|
4974
|
-
const firstDataLength = _dataLength.pipe(first());
|
|
4975
|
-
const subsequentDataLength = _dataLength.pipe(skip(1), delay(0));
|
|
4976
|
-
const dataLength = merge(firstDataLength, subsequentDataLength);
|
|
4977
|
-
const dataSize$ = combineLatest([viewType$, distinctSizingData, dataLength]).pipe(map$1(([viewType, { currentPage, pageSize, virtualEnd, virtualStart }, length]) => {
|
|
4894
|
+
this.#viewType$ = state.viewType$.pipe(distinctUntilChanged$1(), defaultShareReplay());
|
|
4895
|
+
this.#dataSize$ = this.#viewType$.pipe(switchMap$1(viewType => state.state$.pipe(map$1(({ currentPage, pageSize, virtualEnds }) => ({ currentPage, pageSize, virtualEnd: virtualEnds?.end, virtualStart: virtualEnds?.start })), distinctUntilChanged$1((d1, d2) => d1.currentPage === d2.currentPage && d1.pageSize === d2.pageSize && d1.virtualEnd === d2.virtualEnd && d1.virtualStart === d2.virtualStart), map$1(({ currentPage, pageSize, virtualEnd, virtualStart }) => {
|
|
4978
4896
|
const previousPageRecords = currentPage * pageSize;
|
|
4979
4897
|
if (viewType === 'virtual paginator') {
|
|
4980
4898
|
return ({ start: virtualStart + previousPageRecords, end: Math.min(virtualEnd, pageSize) + previousPageRecords });
|
|
@@ -4982,16 +4900,15 @@ class TableBuilderDataSource extends MatTableDataSource {
|
|
|
4982
4900
|
if (viewType === 'paginator') {
|
|
4983
4901
|
return ({ start: previousPageRecords, end: previousPageRecords + pageSize });
|
|
4984
4902
|
}
|
|
4985
|
-
if (viewType === 'all') {
|
|
4986
|
-
return ({ start: 0, end: length });
|
|
4987
|
-
}
|
|
4988
4903
|
return ({ start: virtualStart, end: virtualEnd });
|
|
4989
|
-
}))
|
|
4904
|
+
}))))
|
|
4990
4905
|
.pipe(distinctUntilChanged$1((a, b) => a.start === b.start && a.end === b.end), defaultShareReplay());
|
|
4991
|
-
this.dataToShow$ = combineLatest([this.dataSrc, dataSize$])
|
|
4906
|
+
this.dataToShow$ = combineLatest([this.dataSrc, this.#dataSize$])
|
|
4992
4907
|
.pipe(map$1(([data, size]) => data.slice(size.start, size.end)))
|
|
4993
4908
|
.pipe(defaultShareReplay());
|
|
4994
4909
|
}
|
|
4910
|
+
#viewType$;
|
|
4911
|
+
#dataSize$;
|
|
4995
4912
|
dataToShow$;
|
|
4996
4913
|
connect() {
|
|
4997
4914
|
if (!this.subscription) {
|
|
@@ -4999,6 +4916,7 @@ class TableBuilderDataSource extends MatTableDataSource {
|
|
|
4999
4916
|
this.data = data;
|
|
5000
4917
|
});
|
|
5001
4918
|
}
|
|
4919
|
+
this.#viewableData$.next(this.dataToShow$);
|
|
5002
4920
|
return super.connect();
|
|
5003
4921
|
}
|
|
5004
4922
|
disconnect() {
|
|
@@ -5014,7 +4932,6 @@ class TableContainerComponent {
|
|
|
5014
4932
|
props = { ...defaultProps };
|
|
5015
4933
|
dataSubject = new ReplaySubject(1);
|
|
5016
4934
|
state = inject(TableStore);
|
|
5017
|
-
dataStore = inject(DataStore);
|
|
5018
4935
|
config = inject(TableBuilderConfigToken);
|
|
5019
4936
|
exportToCsvService = inject((ExportToCsvService));
|
|
5020
4937
|
wrapper = inject(TableWrapperDirective, { optional: true });
|
|
@@ -5057,10 +4974,7 @@ class TableContainerComponent {
|
|
|
5057
4974
|
paginatorComponent;
|
|
5058
4975
|
genericTable;
|
|
5059
4976
|
customRows;
|
|
5060
|
-
|
|
5061
|
-
$myColumns = computed(() => {
|
|
5062
|
-
return this.state.$metaDataArray().map(metaData => ({ metaData, customCell: this.$customCells().find(cc => cc.customCell === metaData.key) }));
|
|
5063
|
-
});
|
|
4977
|
+
customCells;
|
|
5064
4978
|
tableElRef;
|
|
5065
4979
|
tableBuilder;
|
|
5066
4980
|
tableId;
|
|
@@ -5082,6 +4996,9 @@ class TableContainerComponent {
|
|
|
5082
4996
|
set groupHeaderTemplate(template) {
|
|
5083
4997
|
this.props.groupHeaderTemplate = template;
|
|
5084
4998
|
}
|
|
4999
|
+
set groupHeaderHeight(value) {
|
|
5000
|
+
this.props.groupHeaderHeight = value;
|
|
5001
|
+
}
|
|
5085
5002
|
trackBy;
|
|
5086
5003
|
inputFilters;
|
|
5087
5004
|
selection$ = new EventEmitter();
|
|
@@ -5096,6 +5013,7 @@ class TableContainerComponent {
|
|
|
5096
5013
|
displayData = this.displayDataSubject.pipe(switchAll(), defaultShareReplay());
|
|
5097
5014
|
$displayData = toSignal(this.displayData, { initialValue: [] });
|
|
5098
5015
|
collapseFooter$ = this.state.state$.pipe(map(state => state.persistedTableSettings.collapseFooter));
|
|
5016
|
+
myColumns$;
|
|
5099
5017
|
ngOnDestroy() {
|
|
5100
5018
|
if (this.tableId) {
|
|
5101
5019
|
this.stateService.saveTableStateToLocal({ tableId: this.tableId, tableState: this.state.getSavableStateSignal() });
|
|
@@ -5144,21 +5062,11 @@ class TableContainerComponent {
|
|
|
5144
5062
|
this.displayDataSubject.next(flatGrouped$);
|
|
5145
5063
|
this.dataSubject.next(sortedAndFilteredData$);
|
|
5146
5064
|
this.state.on(this.displayData, (data) => {
|
|
5147
|
-
this.
|
|
5065
|
+
this.state.updateState({ dataLen: data.length });
|
|
5148
5066
|
});
|
|
5149
5067
|
}
|
|
5150
5068
|
ngOnInit() {
|
|
5151
|
-
const
|
|
5152
|
-
this.state.setLinkMaps(this.tableBuilder.metaData$.pipe(map(createLinkCreatorDict)));
|
|
5153
|
-
const c = customCells$.pipe(switchMap(c => c.length ? combineLatest(c.map(c => c.$metaData)) : of([])));
|
|
5154
|
-
this.state.setMetaData(combineLatest([this.tableBuilder.metaData$, c]).pipe(map(([mds, customCells]) => {
|
|
5155
|
-
mds = mds.map(this.mapArrayFieldsMetaDatas);
|
|
5156
|
-
return [
|
|
5157
|
-
...mds,
|
|
5158
|
-
...customCells.map(md => this.mergeMetaData(md, mds.find(item => item.key === md.key)))
|
|
5159
|
-
];
|
|
5160
|
-
})));
|
|
5161
|
-
const ds = new TableBuilderDataSource(this.displayData, this.state, this.dataStore);
|
|
5069
|
+
const ds = new TableBuilderDataSource(this.displayData, this.state);
|
|
5162
5070
|
this.state.updateState({ props: {
|
|
5163
5071
|
dataSource: ds,
|
|
5164
5072
|
...this.props
|
|
@@ -5166,24 +5074,6 @@ class TableContainerComponent {
|
|
|
5166
5074
|
this.initializeState();
|
|
5167
5075
|
this.initializeData();
|
|
5168
5076
|
}
|
|
5169
|
-
mergeMetaData(metaData1, metaData2) {
|
|
5170
|
-
if (!metaData2) {
|
|
5171
|
-
metaData1.noExport = true;
|
|
5172
|
-
return metaData1;
|
|
5173
|
-
}
|
|
5174
|
-
if (!metaData1.displayName)
|
|
5175
|
-
metaData1.displayName = metaData2.displayName;
|
|
5176
|
-
if (!metaData1.preSort)
|
|
5177
|
-
metaData1.preSort = metaData2.preSort;
|
|
5178
|
-
if (!metaData1.order)
|
|
5179
|
-
metaData1.order = metaData2.order;
|
|
5180
|
-
if (!metaData1.width)
|
|
5181
|
-
metaData1.width = metaData2.width;
|
|
5182
|
-
if (metaData2.fieldType)
|
|
5183
|
-
metaData1.fieldType = metaData2.fieldType;
|
|
5184
|
-
metaData1.noExport = !metaData2;
|
|
5185
|
-
return metaData1;
|
|
5186
|
-
}
|
|
5187
5077
|
exportToCsv() {
|
|
5188
5078
|
const sorted = this.data.pipe(withLatestFrom(this.state.sort$), map(([data, sorted]) => sortData(data, sorted)));
|
|
5189
5079
|
this.exportToCsvService.exportToCsv(sorted);
|
|
@@ -5194,12 +5084,25 @@ class TableContainerComponent {
|
|
|
5194
5084
|
};
|
|
5195
5085
|
collapseAllGroups = () => this.state.collapseAll();
|
|
5196
5086
|
ngAfterContentInit() {
|
|
5087
|
+
this.initializeColumns();
|
|
5197
5088
|
this.state.runOnceWhen(stateIs(InitializationState.LoadedFromStore), state => {
|
|
5198
5089
|
this.addFilterDirectives(state);
|
|
5199
5090
|
this.state.updateState({ initializationState: InitializationState.Ready });
|
|
5200
5091
|
});
|
|
5201
5092
|
}
|
|
5202
|
-
|
|
5093
|
+
initializeColumns() {
|
|
5094
|
+
const customCellMap = new Map(this.customCells.map(cc => [cc.customCell, cc]));
|
|
5095
|
+
this.state.setMetaData(this.tableBuilder.metaData$.pipe(map((mds) => {
|
|
5096
|
+
mds = mds.map(this.mapMetaDatas);
|
|
5097
|
+
return [
|
|
5098
|
+
...mds,
|
|
5099
|
+
...this.customCells.map(cc => cc.getMetaData(mds.find(item => item.key === cc.customCell)))
|
|
5100
|
+
];
|
|
5101
|
+
})));
|
|
5102
|
+
this.state.setLinkMaps(this.tableBuilder.metaData$.pipe(map(createLinkCreatorDict)));
|
|
5103
|
+
this.myColumns$ = this.state.metaDataArray$.pipe(mapArray(metaData => ({ metaData, customCell: customCellMap.get(metaData.key) })), defaultShareReplay());
|
|
5104
|
+
}
|
|
5105
|
+
mapMetaDatas = (meta) => {
|
|
5203
5106
|
if (meta.fieldType === FieldType.Array) {
|
|
5204
5107
|
const additional = { ...meta.additional };
|
|
5205
5108
|
additional.arrayStyle = additional?.arrayStyle ?? ArrayDefaults.arrayStyle;
|
|
@@ -5212,7 +5115,7 @@ class TableContainerComponent {
|
|
|
5212
5115
|
addFilterDirectives = (state) => {
|
|
5213
5116
|
const customFilters$ = toObservable(this.allFilterDirectives, { injector: this.injector }).pipe(mergeMap(customerFilters => customerFilters
|
|
5214
5117
|
.filter(filter => !filter.savable)
|
|
5215
|
-
.map(filter => filter.filter$)), mergeAll(), scan$1((a, b) => {
|
|
5118
|
+
.map(filter => filter.filter$)), mergeAll$1(), scan$1((a, b) => {
|
|
5216
5119
|
if (b.active) {
|
|
5217
5120
|
a[b.filterId] = isCustomFilter(b) ? b.predicate : createFilterFunc(b);
|
|
5218
5121
|
}
|
|
@@ -5227,11 +5130,11 @@ class TableContainerComponent {
|
|
|
5227
5130
|
};
|
|
5228
5131
|
$useVirtual = this.state.$isVirtual;
|
|
5229
5132
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: TableContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5230
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: TableContainerComponent, isStandalone: true, selector: "tb-table-container", inputs: { tableBuilder: "tableBuilder", tableId: "tableId", indexColumn: "indexColumn", selectionColumn: "selectionColumn", isSticky: "isSticky", stickyFooter: "stickyFooter", pageSize: "pageSize", groupHeaderTemplate: "groupHeaderTemplate", trackBy: "trackBy", inputFilters: "inputFilters" }, outputs: { selection$: "selection$", data: "data", onStateReset: "onStateReset", onSaveState: "onSaveState", state$: "state$" }, providers: [TableStore, ExportToCsvService, WrapperFilterStore
|
|
5133
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: TableContainerComponent, isStandalone: true, selector: "tb-table-container", inputs: { tableBuilder: "tableBuilder", tableId: "tableId", indexColumn: "indexColumn", selectionColumn: "selectionColumn", isSticky: "isSticky", stickyFooter: "stickyFooter", pageSize: "pageSize", groupHeaderTemplate: "groupHeaderTemplate", groupHeaderHeight: "groupHeaderHeight", trackBy: "trackBy", inputFilters: "inputFilters" }, outputs: { selection$: "selection$", data: "data", onStateReset: "onStateReset", onSaveState: "onSaveState", state$: "state$" }, providers: [TableStore, ExportToCsvService, WrapperFilterStore], queries: [{ propertyName: "filterDirectives", predicate: TableFilterDirective, descendants: true, isSignal: true }, { propertyName: "customFilterDirectives", predicate: TableCustomFilterDirective, descendants: true, isSignal: true }, { propertyName: "tableElRef", first: true, predicate: ["table"], descendants: true, read: ElementRef }, { propertyName: "customRows", predicate: MatRowDef }, { propertyName: "customCells", predicate: CustomCellDirective }], viewQueries: [{ propertyName: "paginatorComponent", first: true, predicate: PaginatorComponent, descendants: true }, { propertyName: "genericTable", first: true, predicate: GenericTableComponent, descendants: true }], ngImport: i0, template: "<ng-content select=\"[before]\" />\n\n<ng-container multiSort *ngrxLet=\"state.tableSettings$ as tableSettings\">\n <div class=\"header-wrapper\">\n <div class=\"title\">\n @if ((!(collapseHeader$ | async)) || tableSettings.showTitleWhenHeaderCollapsed) {\n <ng-content select=\".tb-header-title\"/>\n }\n @if((state.groupByKeys$ | async)?.length){\n <group-by-list />\n }\n </div>\n <div class=\"flx-row-end\">\n <lib-filter-list />\n @if (!tableSettings.hideHeader) {\n @if (!(collapseHeader$ | async)) {\n <ng-container *ngTemplateOutlet=\"headerMenu\"/>\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"mainMenu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #mainMenu='matMenu'>\n <ng-container *ngTemplateOutlet=\"headerMenuExtra\"/>\n </mat-menu>\n }\n @else {\n <mat-icon color=\"primary\" [matMenuTriggerFor]=\"mainMenu\" class=\"flat-menu-button pointer\">more_horiz</mat-icon>\n <mat-menu #mainMenu='matMenu'>\n <div class=\"flex-column\">\n <ng-container *ngTemplateOutlet=\"headerMenu\"/>\n </div>\n <ng-container *ngTemplateOutlet=\"headerMenuExtra\"/>\n </mat-menu>\n }\n <mat-icon [matTooltip]=\"(collapseHeader$ | async) ? 'expand' : 'collapse'\" class=\"collapse-icon header\"\n (click)=\"state.toggleCollapseHeader()\">\n {{(collapseHeader$ | async) ? 'expand_less' : 'expand_more'}}\n </mat-icon>\n }\n\n </div>\n </div>\n <div class=\"table-wrapper\">\n @if($useVirtual())\n {\n <tb-virtual-scroll-container>\n <tb-generic-table [rows]='customRows' [data]=\"(data | async)!\" [displayData$]=\"displayData\"\n (selection$)='selection$.emit($event)' [columnInfos]='myColumns$' [trackBy]=\"trackBy\" />\n </tb-virtual-scroll-container>\n }\n @else\n {\n <tb-generic-table [rows]='customRows' [data]=\"(data | async)!\" [displayData$]=\"displayData\"\n (selection$)='selection$.emit($event)' [columnInfos]='myColumns$' [trackBy]=\"trackBy\" />\n }\n\n </div>\n @if(tableSettings.usePaginator)\n {\n <div class=\"paginator\">\n <tb-paginator #tbPaginator [data$]=\"data\" [tableElRef]=\"tableElRef\" />\n\n <mat-icon [matTooltip]=\"(collapseFooter$ | async) ? 'expand' : 'collapse'\" class=\"collapse-icon footer\"\n (click)=\"state.toggleCollapseFooter()\">\n {{(collapseFooter$ | async) ? 'expand_more' : 'expand_less'}}\n </mat-icon>\n </div>\n }\n\n <ng-template #headerMenu>\n @if (!tableSettings.hideFilter) {<tb-filter-displayer/>}\n @if (!tableSettings.hideColumnSettings) {<tb-col-displayer/>}\n @if (!tableSettings.hideSort) {<tb-sort-menu/>}\n @if (!!tableId) {<tb-profiles-menu [$tableId]=\"tableId\" (onSaveState)=\"onSaveState.emit($event)\"/>}\n </ng-template>\n\n <ng-template #headerMenuExtra>\n <button mat-menu-item (click)=\"resetState()\">\n <mat-icon color=\"primary\">autorenew</mat-icon>\n <span>Reset table</span>\n </button>\n @if (!tableSettings.hideExport) {\n <button mat-menu-item (click)=\"exportToCsv()\">\n <mat-icon color=\"primary\">file_download</mat-icon>\n <span>Export Table</span>\n </button>\n }\n @if (tableId) {\n <button stop-propagation mat-menu-item (click)=\"pm.trigger()?.toggleMenu()\">\n <mat-icon color=\"primary\">people</mat-icon>\n <span>Profiles</span>\n </button>\n <tb-profiles-menu class=\"profiles-menu\" #pm [$tableId]=\"tableId\" (onSaveState)=\"onSaveState.emit($event)\"/>\n }\n </ng-template>\n</ng-container>\n", styles: [".header-wrapper{display:flex;flex-direction:row;justify-content:space-between;width:100%}.table-wrapper{overflow-x:auto}.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: "pipe", type: i1$8.AsyncPipe, name: "async" }, { kind: "directive", type: i1$8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PaginatorComponent, selector: "tb-paginator", inputs: ["data$", "tableElRef"] }, { kind: "directive", type: i3$3.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { 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: ["trackBy", "displayData$", "data", "rows", "columnBuilders", "columnInfos"], outputs: ["selection$"] }, { kind: "directive", type: StopPropagationDirective, selector: "[stop-propagation]" }, { kind: "component", type: ProfilesMenuComponent, selector: "tb-profiles-menu", inputs: ["$tableId"], outputs: ["onSaveState"] }, { kind: "ngmodule", type: i3$1.MatButtonModule }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: i4$2.MatMenuModule }, { kind: "component", type: i4$2.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: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.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: i2.MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: i4$1.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 });
|
|
5231
5134
|
}
|
|
5232
5135
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: TableContainerComponent, decorators: [{
|
|
5233
5136
|
type: Component,
|
|
5234
|
-
args: [{ selector: 'tb-table-container', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableStore, ExportToCsvService, WrapperFilterStore
|
|
5137
|
+
args: [{ selector: 'tb-table-container', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableStore, ExportToCsvService, WrapperFilterStore], standalone: true, imports: containerImports, template: "<ng-content select=\"[before]\" />\n\n<ng-container multiSort *ngrxLet=\"state.tableSettings$ as tableSettings\">\n <div class=\"header-wrapper\">\n <div class=\"title\">\n @if ((!(collapseHeader$ | async)) || tableSettings.showTitleWhenHeaderCollapsed) {\n <ng-content select=\".tb-header-title\"/>\n }\n @if((state.groupByKeys$ | async)?.length){\n <group-by-list />\n }\n </div>\n <div class=\"flx-row-end\">\n <lib-filter-list />\n @if (!tableSettings.hideHeader) {\n @if (!(collapseHeader$ | async)) {\n <ng-container *ngTemplateOutlet=\"headerMenu\"/>\n <button mat-icon-button color='primary' [matMenuTriggerFor]=\"mainMenu\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <mat-menu #mainMenu='matMenu'>\n <ng-container *ngTemplateOutlet=\"headerMenuExtra\"/>\n </mat-menu>\n }\n @else {\n <mat-icon color=\"primary\" [matMenuTriggerFor]=\"mainMenu\" class=\"flat-menu-button pointer\">more_horiz</mat-icon>\n <mat-menu #mainMenu='matMenu'>\n <div class=\"flex-column\">\n <ng-container *ngTemplateOutlet=\"headerMenu\"/>\n </div>\n <ng-container *ngTemplateOutlet=\"headerMenuExtra\"/>\n </mat-menu>\n }\n <mat-icon [matTooltip]=\"(collapseHeader$ | async) ? 'expand' : 'collapse'\" class=\"collapse-icon header\"\n (click)=\"state.toggleCollapseHeader()\">\n {{(collapseHeader$ | async) ? 'expand_less' : 'expand_more'}}\n </mat-icon>\n }\n\n </div>\n </div>\n <div class=\"table-wrapper\">\n @if($useVirtual())\n {\n <tb-virtual-scroll-container>\n <tb-generic-table [rows]='customRows' [data]=\"(data | async)!\" [displayData$]=\"displayData\"\n (selection$)='selection$.emit($event)' [columnInfos]='myColumns$' [trackBy]=\"trackBy\" />\n </tb-virtual-scroll-container>\n }\n @else\n {\n <tb-generic-table [rows]='customRows' [data]=\"(data | async)!\" [displayData$]=\"displayData\"\n (selection$)='selection$.emit($event)' [columnInfos]='myColumns$' [trackBy]=\"trackBy\" />\n }\n\n </div>\n @if(tableSettings.usePaginator)\n {\n <div class=\"paginator\">\n <tb-paginator #tbPaginator [data$]=\"data\" [tableElRef]=\"tableElRef\" />\n\n <mat-icon [matTooltip]=\"(collapseFooter$ | async) ? 'expand' : 'collapse'\" class=\"collapse-icon footer\"\n (click)=\"state.toggleCollapseFooter()\">\n {{(collapseFooter$ | async) ? 'expand_more' : 'expand_less'}}\n </mat-icon>\n </div>\n }\n\n <ng-template #headerMenu>\n @if (!tableSettings.hideFilter) {<tb-filter-displayer/>}\n @if (!tableSettings.hideColumnSettings) {<tb-col-displayer/>}\n @if (!tableSettings.hideSort) {<tb-sort-menu/>}\n @if (!!tableId) {<tb-profiles-menu [$tableId]=\"tableId\" (onSaveState)=\"onSaveState.emit($event)\"/>}\n </ng-template>\n\n <ng-template #headerMenuExtra>\n <button mat-menu-item (click)=\"resetState()\">\n <mat-icon color=\"primary\">autorenew</mat-icon>\n <span>Reset table</span>\n </button>\n @if (!tableSettings.hideExport) {\n <button mat-menu-item (click)=\"exportToCsv()\">\n <mat-icon color=\"primary\">file_download</mat-icon>\n <span>Export Table</span>\n </button>\n }\n @if (tableId) {\n <button stop-propagation mat-menu-item (click)=\"pm.trigger()?.toggleMenu()\">\n <mat-icon color=\"primary\">people</mat-icon>\n <span>Profiles</span>\n </button>\n <tb-profiles-menu class=\"profiles-menu\" #pm [$tableId]=\"tableId\" (onSaveState)=\"onSaveState.emit($event)\"/>\n }\n </ng-template>\n</ng-container>\n", styles: [".header-wrapper{display:flex;flex-direction:row;justify-content:space-between;width:100%}.table-wrapper{overflow-x:auto}.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"] }]
|
|
5235
5138
|
}], propDecorators: { paginatorComponent: [{
|
|
5236
5139
|
type: ViewChild,
|
|
5237
5140
|
args: [PaginatorComponent]
|
|
@@ -5241,6 +5144,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
5241
5144
|
}], customRows: [{
|
|
5242
5145
|
type: ContentChildren,
|
|
5243
5146
|
args: [MatRowDef]
|
|
5147
|
+
}], customCells: [{
|
|
5148
|
+
type: ContentChildren,
|
|
5149
|
+
args: [CustomCellDirective]
|
|
5244
5150
|
}], tableElRef: [{
|
|
5245
5151
|
type: ContentChild,
|
|
5246
5152
|
args: ['table', { read: ElementRef }]
|
|
@@ -5261,6 +5167,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
5261
5167
|
type: Input
|
|
5262
5168
|
}], groupHeaderTemplate: [{
|
|
5263
5169
|
type: Input
|
|
5170
|
+
}], groupHeaderHeight: [{
|
|
5171
|
+
type: Input
|
|
5264
5172
|
}], trackBy: [{
|
|
5265
5173
|
type: Input
|
|
5266
5174
|
}], inputFilters: [{
|
|
@@ -5417,7 +5325,7 @@ class TableBuilder {
|
|
|
5417
5325
|
this.settings = this.coerceSettingsToObservable(settings)
|
|
5418
5326
|
.pipe(map(sett => new GeneralTableSettings(sett)), defaultShareReplay());
|
|
5419
5327
|
this.data$ = this.coerceToObservable(data, this.settings)
|
|
5420
|
-
.pipe(
|
|
5328
|
+
.pipe(defaultShareReplay());
|
|
5421
5329
|
this.metaData$ = metaData ?
|
|
5422
5330
|
this.coerceToObservable(metaData, this.settings).pipe(defaultShareReplay())
|
|
5423
5331
|
:
|
|
@@ -5546,11 +5454,11 @@ class ActionStateSpinnerComponent {
|
|
|
5546
5454
|
this.serverActionStatus$ = this.status$.pipe(delayOn(a => a.status === serverStatusTypes.inProgress, 500));
|
|
5547
5455
|
}
|
|
5548
5456
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: ActionStateSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5549
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: ActionStateSpinnerComponent, isStandalone: true, selector: "lib-action-state-spinner", inputs: { status$: "status$" }, ngImport: i0, template: "@if((serverActionStatus$ | async)?.status === serverStatusTypes.inProgress){\
|
|
5457
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: ActionStateSpinnerComponent, isStandalone: true, selector: "lib-action-state-spinner", inputs: { status$: "status$" }, ngImport: i0, template: "@if((serverActionStatus$ | async)?.status === serverStatusTypes.inProgress){\n <div id=\"blocker\">\n <mat-spinner class=\"spinner\" [diameter]=\"200\" />\n </div>\n}\n\n", styles: ["#blocker{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0e0d0d69;z-index:999999}.spinner{position:absolute;top:50%;left:40%;transform:translate(-50%,-50%)}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i1$a.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
5550
5458
|
}
|
|
5551
5459
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: ActionStateSpinnerComponent, decorators: [{
|
|
5552
5460
|
type: Component,
|
|
5553
|
-
args: [{ selector: 'lib-action-state-spinner', standalone: true, imports: [AsyncPipe, MatProgressSpinnerModule], template: "@if((serverActionStatus$ | async)?.status === serverStatusTypes.inProgress){\
|
|
5461
|
+
args: [{ selector: 'lib-action-state-spinner', standalone: true, imports: [AsyncPipe, MatProgressSpinnerModule], template: "@if((serverActionStatus$ | async)?.status === serverStatusTypes.inProgress){\n <div id=\"blocker\">\n <mat-spinner class=\"spinner\" [diameter]=\"200\" />\n </div>\n}\n\n", styles: ["#blocker{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0e0d0d69;z-index:999999}.spinner{position:absolute;top:50%;left:40%;transform:translate(-50%,-50%)}\n"] }]
|
|
5554
5462
|
}], propDecorators: { status$: [{
|
|
5555
5463
|
type: Input
|
|
5556
5464
|
}] } });
|
|
@@ -5652,5 +5560,5 @@ function provideActionableSelector() {
|
|
|
5652
5560
|
* Generated bundle index. Do not edit.
|
|
5653
5561
|
*/
|
|
5654
5562
|
|
|
5655
|
-
export { ActionStateSpinnerComponent, ActionStateUiModule, ActionStatus, AppStatusState, ArrayStyle, AutoFocusDirective, CancellationToken, ClickEmitterDirective, ClickSubjectDirective, ConditionalClassesDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent,
|
|
5563
|
+
export { ActionStateSpinnerComponent, ActionStateUiModule, ActionStatus, AppStatusState, ArrayStyle, AutoFocusDirective, CancellationToken, ClickEmitterDirective, ClickSubjectDirective, ConditionalClassesDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent, DialogDirective, DialogService, DialogWrapper, FieldType, FilterChipsComponent, FilterComponent, FilterTypes, FunctionPipe, GenColDisplayerComponent, GenFilterDisplayerComponent, GeneralTableSettings, GenericTableComponent, GroupByListComponent, HttpErrorStateDirective, HttpInProgressStateDirective, HttpNotStartedStateDirective, HttpRequestModule, HttpRequestStateDirective, HttpRequestStateFactory, HttpRequestStateStore, HttpRequestStatus, HttpRequestStrategy, HttpSuccessStateDirective, MatButtonToggleFilterDirective, MatCheckboxTbFilterDirective, MatOptionTbFilterDirective, MatRadioButtonTbFilterDirective, MatSlideToggleGroupDirective, MatSlideToggleTbFilterDirective, MatTableObservableDataSource, MultiSortDirective, NgrxExtModule, NotPersistedTableSettings, PaginatorComponent, PersistedTableSettings, PhoneNumberPipe, PreventEnterDirective, ResizeColumnDirective, SortDirection, SpaceCasePipe, StopPropagationDirective, StylerDirective, Subjectifier, Subscriber, TableBuilder, TableBuilderConfigToken, TableBuilderModule, TableColumnHeaderSettings, TableContainerComponent, TableCustomFilterDirective, TableCustomFilterDirectiveBase, TableFilterDirective, TableFilterStringContainsDirective, TableSettings, TableWrapperDirective, TableWrapperFooterSettings, TableWrapperHeaderSettings, Target, TbSelectedFilterDirective, TrimWhitespaceDirective, UtilitiesModule, VirtualScrollOptions, actionStatusReducer, chainRequest, clearActionableSelectorRequestCache, combineArrays, createActionableSelector, createFailure, createRequestor, createSuccess, defaultFilter, defaultShareReplay, delayOn, filterArray, getRequestorBody, getRequestorStatus, getStatusState, httpRequest, httpRequestor, inProgress, initialState, isDifferent, isErrorState, isSuccessOrErrorState, isSuccessState, mapArray, mapError, metaDataArrToDict, notNull, notStarted, onWait, onceWhen, previousAndCurrent, provideActionableSelector, provideTableBuilder, selectAll, selectEntities, selectEntity, selectIds, selectTotal, serverStatusTypes, setUpStoreFactory, skipOneWhen, spaceCase, startWithIfEmpty, statusAdapter, statusIsSuccessOrInProgress, subscriber, switchOff, tapError, tapSuccess, wrapInArr };
|
|
5656
5564
|
//# sourceMappingURL=one-paragon-angular-utilities.mjs.map
|