@one-paragon/angular-utilities 1.2.9 → 1.2.10-beta-1
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/action-state/ngrx.d.ts +1 -1
- package/esm2022/http-request-state/HttpRequestStateStore.mjs +19 -3
- package/esm2022/http-request-state/types.mjs +1 -1
- package/esm2022/public-api.mjs +2 -1
- package/esm2022/table-builder/classes/TableBuilderDataSource.mjs +18 -12
- package/esm2022/table-builder/classes/TableState.mjs +5 -3
- package/esm2022/table-builder/classes/data-store.mjs +15 -0
- package/esm2022/table-builder/classes/table-builder-general-settings.mjs +14 -1
- package/esm2022/table-builder/classes/table-builder.mjs +3 -3
- package/esm2022/table-builder/classes/table-store.mjs +71 -46
- package/esm2022/table-builder/components/column-builder/column-builder.component.mjs +2 -2
- package/esm2022/table-builder/components/generic-table/generic-table.component.mjs +100 -55
- package/esm2022/table-builder/components/generic-table/paginator.component.mjs +6 -4
- package/esm2022/table-builder/components/sort-menu/sort-menu.component-store.mjs +4 -2
- package/esm2022/table-builder/components/table-container/table-container.mjs +90 -65
- package/esm2022/table-builder/components/table-container/tableProps.mjs +2 -1
- package/esm2022/table-builder/components/table-container/virtual-scroll-container.mjs +36 -10
- package/esm2022/table-builder/components/table-container-filter/filter-list/filter-list.component.mjs +5 -6
- package/esm2022/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.mjs +9 -11
- package/esm2022/table-builder/directives/custom-cell-directive.mjs +12 -13
- package/esm2022/table-builder/directives/table-wrapper.directive.mjs +4 -4
- package/esm2022/table-builder/interfaces/ColumnInfo.mjs +1 -1
- package/esm2022/table-builder/services/export-to-csv.service.mjs +3 -3
- package/fesm2022/one-paragon-angular-utilities.mjs +537 -374
- package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -1
- package/http-request-state/HttpRequestStateStore.d.ts +5 -0
- package/http-request-state/types.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -2
- package/table-builder/classes/TableBuilderDataSource.d.ts +2 -3
- package/table-builder/classes/TableState.d.ts +14 -4
- package/table-builder/classes/data-store.d.ts +8 -0
- package/table-builder/classes/table-builder-general-settings.d.ts +6 -0
- package/table-builder/classes/table-store.d.ts +16 -28
- package/table-builder/components/generic-table/generic-table.component.d.ts +20 -10
- package/table-builder/components/generic-table/paginator.component.d.ts +1 -0
- package/table-builder/components/sort-menu/sort-menu.component-store.d.ts +1 -0
- package/table-builder/components/table-container/table-container-imports.d.ts +1 -1
- package/table-builder/components/table-container/table-container.d.ts +15 -8
- package/table-builder/components/table-container/tableProps.d.ts +1 -0
- package/table-builder/components/table-container/virtual-scroll-container.d.ts +9 -3
- package/table-builder/components/table-container-filter/filter-list/filter-list.component.d.ts +2 -3
- package/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.d.ts +1 -3
- package/table-builder/directives/custom-cell-directive.d.ts +6 -4
- package/table-builder/directives/table-wrapper.directive.d.ts +1 -1
- package/table-builder/interfaces/ColumnInfo.d.ts +1 -1
|
@@ -2,6 +2,7 @@ import { Observable, Subscription } from 'rxjs';
|
|
|
2
2
|
import { ComponentStore } from '@ngrx/component-store';
|
|
3
3
|
import { HttpRequestFactory, HttpRequestStatus, HttpRequestState, RequestStateOptions } from './types';
|
|
4
4
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
5
|
+
import { Signal } from '@angular/core';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export interface RequestResponse<TParam extends any[], T> {
|
|
7
8
|
requestParams: [...TParam];
|
|
@@ -11,6 +12,7 @@ export declare class HttpRequestStateStore<TParam extends any[], V, R = null, T
|
|
|
11
12
|
private options?;
|
|
12
13
|
private project?;
|
|
13
14
|
private req;
|
|
15
|
+
private injector?;
|
|
14
16
|
constructor(req: HttpRequestFactory<TParam, V>, options?: RequestStateOptions<TParam>, project?: (v: V) => R);
|
|
15
17
|
reset(): void;
|
|
16
18
|
private flatteningStrategy;
|
|
@@ -42,8 +44,11 @@ export declare class HttpRequestStateStore<TParam extends any[], V, R = null, T
|
|
|
42
44
|
on: <V_1>(srcObservable: Observable<V_1>, func: (obj: V_1) => void) => Subscription;
|
|
43
45
|
request: (...value: [...TParam]) => Subscription;
|
|
44
46
|
ngOnDestroy(): void;
|
|
47
|
+
requestWith: (params: Observable<[...TParam]> | Signal<[...TParam]>) => this;
|
|
45
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpRequestStateStore<any, any, any, any>, never>;
|
|
46
49
|
static ɵdir: i0.ɵɵDirectiveDeclaration<HttpRequestStateStore<any, any, any, any>, never, never, {}, {}, never, never, false, never>;
|
|
47
50
|
}
|
|
48
51
|
export declare class CancellationToken {
|
|
49
52
|
}
|
|
53
|
+
export declare function wrapInArr<T>(sig: Signal<T>): Signal<[T]>;
|
|
54
|
+
export declare function wrapInArr<T>(obs: Observable<T>): Observable<[T]>;
|
|
@@ -34,8 +34,8 @@ export declare enum HttpRequestStrategy {
|
|
|
34
34
|
export interface RequestStateOptions<TParam extends any[] = any> {
|
|
35
35
|
strategy?: HttpRequestStrategy;
|
|
36
36
|
autoRequestWith?: [...TParam];
|
|
37
|
+
injector?: Injector;
|
|
37
38
|
}
|
|
38
39
|
export interface RequestCreatorOptions<TParam extends any[] = any> extends RequestStateOptions<TParam> {
|
|
39
|
-
injector?: Injector;
|
|
40
40
|
}
|
|
41
41
|
export type HttpRequestFactory<TParam extends any[], T> = (...params: [...TParam]) => Observable<T>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -9,8 +9,7 @@ export * from './table-builder/classes/table-builder';
|
|
|
9
9
|
export * from './table-builder/classes/table-builder-general-settings';
|
|
10
10
|
export * from './table-builder/components';
|
|
11
11
|
export * from './table-builder/directives';
|
|
12
|
-
export
|
|
13
|
-
export type { FilterTypes } from './table-builder/enums/filterTypes';
|
|
12
|
+
export * from './table-builder/enums/filterTypes';
|
|
14
13
|
export * from './rxjs';
|
|
15
14
|
export * from './utilities';
|
|
16
15
|
export * from './action-state';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { MatTableDataSource } from '@angular/material/table';
|
|
2
2
|
import { Observable, Subscription } from 'rxjs';
|
|
3
3
|
import { TableStore } from './table-store';
|
|
4
|
+
import { DataStore } from './data-store';
|
|
4
5
|
export declare class TableBuilderDataSource<T> extends MatTableDataSource<T> {
|
|
5
|
-
#private;
|
|
6
6
|
dataSrc: Observable<T[]>;
|
|
7
7
|
subscription?: Subscription;
|
|
8
|
-
|
|
9
|
-
constructor(dataSrc: Observable<T[]>, state: TableStore);
|
|
8
|
+
constructor(dataSrc: Observable<T[]>, state: TableStore, data: DataStore);
|
|
10
9
|
dataToShow$: Observable<T[]>;
|
|
11
10
|
connect(): import("rxjs").BehaviorSubject<T[]>;
|
|
12
11
|
disconnect(): void;
|
|
@@ -36,16 +36,18 @@ export interface TableState extends Required<PersistedTableState> {
|
|
|
36
36
|
notPersistedTableSettings: NotPersistedTableSettings;
|
|
37
37
|
pageSize: number;
|
|
38
38
|
currentPage: number;
|
|
39
|
+
linkMaps: Dictionary<LinkInfo>;
|
|
40
|
+
props: TableProps;
|
|
41
|
+
showAll: boolean;
|
|
42
|
+
minColumnWidth: number | undefined;
|
|
43
|
+
}
|
|
44
|
+
export interface DataState {
|
|
39
45
|
virtualScrollOffset: number;
|
|
40
46
|
virtualEnds: {
|
|
41
47
|
start: number;
|
|
42
48
|
end: number;
|
|
43
49
|
};
|
|
44
50
|
dataLen: number;
|
|
45
|
-
linkMaps: Dictionary<LinkInfo>;
|
|
46
|
-
props: TableProps;
|
|
47
|
-
showAll: boolean;
|
|
48
|
-
minColumnWidth: number | undefined;
|
|
49
51
|
}
|
|
50
52
|
export declare const keysToDelete: string[];
|
|
51
53
|
export declare enum InitializationState {
|
|
@@ -55,3 +57,11 @@ export declare enum InitializationState {
|
|
|
55
57
|
Ready = 3
|
|
56
58
|
}
|
|
57
59
|
export declare const defaultTableState: TableState;
|
|
60
|
+
export declare const defaultDataState: {
|
|
61
|
+
virtualScrollOffset: number;
|
|
62
|
+
dataLen: number;
|
|
63
|
+
virtualEnds: {
|
|
64
|
+
start: number;
|
|
65
|
+
end: number;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentStore } from "@ngrx/component-store";
|
|
2
|
+
import { DataState } from "./TableState";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DataStore extends ComponentStore<DataState> {
|
|
5
|
+
constructor();
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataStore, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DataStore>;
|
|
8
|
+
}
|
|
@@ -36,6 +36,7 @@ export declare class TableSettings {
|
|
|
36
36
|
useVirtualScroll: true | Partial<VirtualScrollOptions> | null;
|
|
37
37
|
includeAllInPaginatorOptions: boolean;
|
|
38
38
|
rowHeight: string | number | undefined;
|
|
39
|
+
groupHeaderHeight?: number;
|
|
39
40
|
}
|
|
40
41
|
export declare class PersistedTableSettings {
|
|
41
42
|
constructor(tableSettings?: GeneralTableSettings | PersistedTableSettings);
|
|
@@ -55,6 +56,7 @@ export declare class NotPersistedTableSettings {
|
|
|
55
56
|
usePaginator: boolean;
|
|
56
57
|
useVirtualScroll: true | Partial<VirtualScrollOptions> | null;
|
|
57
58
|
includeAllInPaginatorOptions: boolean;
|
|
59
|
+
groupHeaderHeight?: number;
|
|
58
60
|
rowHeight?: string | number | undefined;
|
|
59
61
|
headerHeight?: string | number;
|
|
60
62
|
}
|
|
@@ -70,3 +72,7 @@ export declare class VirtualScrollOptions {
|
|
|
70
72
|
*/
|
|
71
73
|
maxViewPortHeight: number | undefined;
|
|
72
74
|
}
|
|
75
|
+
export declare const DefaultVirtualScrollOptions: {
|
|
76
|
+
rowHeight: number;
|
|
77
|
+
headerHeight: number;
|
|
78
|
+
};
|
|
@@ -16,17 +16,15 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
16
16
|
getSavableStateSignal: import("@angular/core").Signal<PersistedTableState>;
|
|
17
17
|
private mapSaveableState;
|
|
18
18
|
on: <V>(srcObservable: Observable<V>, func: (obj: V) => void) => this;
|
|
19
|
-
onLast(callback: (state: TableState) => void): void;
|
|
20
19
|
readonly metaData$: Observable<Dictionary<MetaData>>;
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
$metaData: import("@angular/core").Signal<Dictionary<MetaData>>;
|
|
21
|
+
$userDefinedOrder: import("@angular/core").Signal<Dictionary<number>>;
|
|
22
|
+
$hiddenKeys: import("@angular/core").Signal<string[]>;
|
|
23
|
+
$metaDataArray: import("@angular/core").Signal<MetaData[]>;
|
|
23
24
|
getMetaData$: (key: string) => Observable<MetaData>;
|
|
24
|
-
getUserDefinedWidth
|
|
25
|
-
|
|
26
|
-
getUserDefinedWidths$: Observable<Dictionary<number>>;
|
|
27
|
-
getUserDefinedWidths: import("@angular/core").Signal<Dictionary<number>>;
|
|
25
|
+
$getUserDefinedWidth: (key: string) => import("@angular/core").Signal<number>;
|
|
26
|
+
$getUserDefinedWidths: import("@angular/core").Signal<Dictionary<number>>;
|
|
28
27
|
tableSettingsMinWidth: import("@angular/core").Signal<number | undefined>;
|
|
29
|
-
readonly displayedColumns$: Observable<string[]>;
|
|
30
28
|
readonly resetState: () => void;
|
|
31
29
|
readonly showColumn: (observableOrValue: string | Observable<string>) => import("rxjs").Subscription;
|
|
32
30
|
readonly hideColumn: (observableOrValue: string | Observable<string>) => import("rxjs").Subscription;
|
|
@@ -51,6 +49,7 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
51
49
|
newOrder: number;
|
|
52
50
|
oldOrder: number;
|
|
53
51
|
}>) => import("rxjs").Subscription;
|
|
52
|
+
$filters: import("@angular/core").Signal<Dictionary<FilterInfo<any, any> | CustomFilter<any>>>;
|
|
54
53
|
readonly filters$: Observable<Dictionary<FilterInfo<any, any> | CustomFilter<any>>>;
|
|
55
54
|
readonly getFilter$: (filterId: string) => Observable<FilterInfo | CustomFilter | undefined>;
|
|
56
55
|
readonly addFilter: (observableOrValue: FilterInfo<any, any> | CustomFilter<any> | Observable<FilterInfo<any, any> | CustomFilter<any>>) => import("rxjs").Subscription;
|
|
@@ -74,21 +73,6 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
74
73
|
readonly setPageSize: (observableOrValue: number | Observable<number>) => import("rxjs").Subscription;
|
|
75
74
|
getPageSize: Observable<number>;
|
|
76
75
|
readonly updateState: (observableOrValue: Partial<TableState> | Observable<Partial<TableState>>) => import("rxjs").Subscription;
|
|
77
|
-
cleanPersistedState(state: TableState, pState: PersistedTableState): {
|
|
78
|
-
filters: any;
|
|
79
|
-
sorted: Sort[];
|
|
80
|
-
hiddenKeys?: string[] | undefined;
|
|
81
|
-
userDefined: {
|
|
82
|
-
order: Dictionary<number>;
|
|
83
|
-
widths: Dictionary<number>;
|
|
84
|
-
table: {
|
|
85
|
-
width?: number | undefined;
|
|
86
|
-
};
|
|
87
|
-
pageSize?: number | undefined;
|
|
88
|
-
};
|
|
89
|
-
persistedTableSettings: PersistedTableSettings;
|
|
90
|
-
groupBy: GroupedData[];
|
|
91
|
-
};
|
|
92
76
|
readonly updateStateFromPersistedState: (observableOrValue: PersistedTableState | Observable<PersistedTableState>) => import("rxjs").Subscription;
|
|
93
77
|
getUserDefinedTableSize: import("@angular/core").Signal<number | undefined>;
|
|
94
78
|
getUserDefinedTableSize$: Observable<number | undefined>;
|
|
@@ -97,7 +81,7 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
97
81
|
readonly setInitializationState: (observableOrValue: InitializationState | Observable<InitializationState>) => import("rxjs").Subscription;
|
|
98
82
|
runOnceWhen(predicate: Predicate<TableState>, func: (state: TableState) => void): void;
|
|
99
83
|
onReady(func: (state: TableState) => void): void;
|
|
100
|
-
readonly setMetaData: (observableOrValue: MetaData
|
|
84
|
+
readonly setMetaData: (observableOrValue: MetaData[] | Observable<MetaData[]>) => import("rxjs").Subscription;
|
|
101
85
|
private initializeOrder;
|
|
102
86
|
toggleCollapseHeader: () => void;
|
|
103
87
|
toggleCollapseFooter: () => void;
|
|
@@ -137,12 +121,16 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
137
121
|
getLinkInfo: (md: MetaData) => import("@angular/core").Signal<import("../services/link-creator.service").LinkInfo>;
|
|
138
122
|
getIsExpanded: (columnKey: string, groupHeaderKey: string) => import("@angular/core").Signal<boolean>;
|
|
139
123
|
$isVirtual: import("@angular/core").Signal<boolean>;
|
|
140
|
-
$viewType: import("@angular/core").Signal<
|
|
141
|
-
viewType$: Observable<
|
|
124
|
+
$viewType: import("@angular/core").Signal<ViewType>;
|
|
125
|
+
viewType$: Observable<ViewType>;
|
|
126
|
+
$orderedVisibleColumns: import("@angular/core").Signal<string[]>;
|
|
142
127
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableStore, never>;
|
|
143
128
|
static ɵprov: i0.ɵɵInjectableDeclaration<TableStore>;
|
|
144
129
|
}
|
|
145
130
|
export declare const orderedVisibleColumns: (state: TableState) => string[];
|
|
146
|
-
export declare const
|
|
131
|
+
export declare const orderedStateVisibleMetaData: (state: TableState) => MetaData[];
|
|
132
|
+
export declare const orderedVisibleMetaData: (metaData: Dictionary<MetaData>, userDefinedOrder: Dictionary<number>, hiddenKeys: string[]) => MetaData[];
|
|
147
133
|
export declare const orderedCodeVisibleMetaData: (state: TableState) => MetaData[];
|
|
148
|
-
export declare const
|
|
134
|
+
export declare const orderStateMetaData: (state: TableState) => MetaData[];
|
|
135
|
+
export declare const orderMetaData: (metaData: Dictionary<MetaData>, userDefined: Dictionary<number>) => MetaData[];
|
|
136
|
+
export type ViewType = 'virtual paginator' | 'paginator' | 'virtual all' | 'all';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SimpleChanges, OnInit, QueryList, Injector, EventEmitter } from '@angular/core';
|
|
2
|
-
import { MatRowDef, MatTable } from '@angular/material/table';
|
|
2
|
+
import { MatFooterRowDef, MatHeaderRowDef, MatRowDef, MatTable } from '@angular/material/table';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { SelectionChange, SelectionModel } from '@angular/cdk/collections';
|
|
5
5
|
import { TableStore } from '../../classes/table-store';
|
|
@@ -10,28 +10,36 @@ import { CdkDragDrop, CdkDropList } from '@angular/cdk/drag-drop';
|
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
export declare class GenericTableComponent implements OnInit {
|
|
12
12
|
protected state: TableStore;
|
|
13
|
+
private dataStore;
|
|
13
14
|
private viewContainer;
|
|
14
15
|
private transformCreator;
|
|
16
|
+
$headerRow: import("@angular/core").Signal<MatHeaderRowDef | undefined>;
|
|
17
|
+
$footerRow: import("@angular/core").Signal<MatFooterRowDef | undefined>;
|
|
18
|
+
$table: import("@angular/core").Signal<MatTable<any> | undefined>;
|
|
15
19
|
drop(event: CdkDragDrop<string[]>): void;
|
|
16
20
|
_trackBy?: string;
|
|
17
21
|
set trackBy(trackBy: string);
|
|
18
22
|
get trackBy(): string | undefined;
|
|
19
|
-
displayData
|
|
23
|
+
$displayData: import("@angular/core").InputSignal<any[]>;
|
|
24
|
+
$displayDataLength: import("@angular/core").Signal<number>;
|
|
25
|
+
$hasFooterMeta: import("@angular/core").Signal<boolean>;
|
|
20
26
|
$data: import("@angular/core").InputSignal<any[]>;
|
|
21
27
|
data$: Observable<any[]>;
|
|
22
28
|
rows: QueryList<MatRowDef<any>>;
|
|
23
29
|
columnBuilders: ColumnBuilderComponent[];
|
|
24
|
-
columnInfos:
|
|
25
|
-
|
|
30
|
+
$columnInfos: import("@angular/core").InputSignal<ColumnInfo[]>;
|
|
31
|
+
$hasCustomFooter: import("@angular/core").Signal<boolean>;
|
|
26
32
|
dropList: CdkDropList;
|
|
33
|
+
$footerRowStyle: import("@angular/core").Signal<"regular-footer" | "no-footer" | "small-footer">;
|
|
34
|
+
$showFooterRow: import("@angular/core").Signal<boolean>;
|
|
27
35
|
currentColumns: string[];
|
|
28
|
-
keys: string[];
|
|
29
36
|
_injector: Injector;
|
|
30
37
|
injector: Injector;
|
|
31
38
|
rowDefArr: MatRowDef<any>[];
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
$hasSelectColumn: import("@angular/core").Signal<boolean>;
|
|
40
|
+
$hasIndexColumn: import("@angular/core").Signal<boolean>;
|
|
41
|
+
myColumns: import("@angular/core").WritableSignal<Dictionary<ColumnBuilderComponent>>;
|
|
42
|
+
$showHeader: import("@angular/core").Signal<boolean>;
|
|
35
43
|
offset$: Observable<number>;
|
|
36
44
|
offsetIndex: number;
|
|
37
45
|
dataView: Observable<any[]>;
|
|
@@ -39,6 +47,8 @@ export declare class GenericTableComponent implements OnInit {
|
|
|
39
47
|
defaultTrackBy: (index: number, item: any) => any;
|
|
40
48
|
trackByFunction: (index: number, item: any) => any;
|
|
41
49
|
ngOnChanges(changes: SimpleChanges): void;
|
|
50
|
+
$keys: import("@angular/core").Signal<string[]>;
|
|
51
|
+
keys$: Observable<string[]>;
|
|
42
52
|
ngOnInit(): void;
|
|
43
53
|
isGroupHeader(_: number, row: {
|
|
44
54
|
isGroupHeader: boolean;
|
|
@@ -61,11 +71,11 @@ export declare class GenericTableComponent implements OnInit {
|
|
|
61
71
|
} | {
|
|
62
72
|
width?: undefined;
|
|
63
73
|
}>;
|
|
64
|
-
showFooterRow$: Observable<'regular-footer' | 'no-footer' | 'small-footer'>;
|
|
65
74
|
getTransform: (key: string, val: string) => any;
|
|
66
75
|
$rowHeight: import("@angular/core").Signal<string | undefined>;
|
|
67
76
|
$headerHeight: import("@angular/core").Signal<string | undefined>;
|
|
77
|
+
$groupHeaderHeight: import("@angular/core").Signal<string | undefined>;
|
|
68
78
|
$stickyFooter: import("@angular/core").Signal<boolean>;
|
|
69
79
|
static ɵfac: i0.ɵɵFactoryDeclaration<GenericTableComponent, never>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GenericTableComponent, "tb-generic-table", never, { "trackBy": { "alias": "trackBy"; "required": false; }; "displayData
|
|
80
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GenericTableComponent, "tb-generic-table", never, { "trackBy": { "alias": "trackBy"; "required": false; }; "$displayData": { "alias": "displayData"; "required": true; "isSignal": true; }; "$data": { "alias": "data"; "required": true; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; }; "columnBuilders": { "alias": "columnBuilders"; "required": false; }; "$columnInfos": { "alias": "columnInfos"; "required": true; "isSignal": true; }; }, { "selection$": "selection$"; }, never, never, true, never>;
|
|
71
81
|
}
|
|
@@ -4,6 +4,7 @@ import { Observable } from 'rxjs';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class PaginatorComponent implements OnInit, AfterViewInit {
|
|
6
6
|
private state;
|
|
7
|
+
private data;
|
|
7
8
|
paginator: MatPaginator;
|
|
8
9
|
currentPageData$: Observable<CurrentPageDetails>;
|
|
9
10
|
$collapseFooter: import("@angular/core").Signal<boolean>;
|
|
@@ -10,6 +10,7 @@ export declare class SortMenuComponentStore extends ComponentStore<ComponentStor
|
|
|
10
10
|
sorted$: import("rxjs").Observable<SortWithName[]>;
|
|
11
11
|
notSorted$: import("rxjs").Observable<SortWithName[]>;
|
|
12
12
|
setDirection: (observableOrValue: SortWithName | import("rxjs").Observable<SortWithName>) => import("rxjs").Subscription;
|
|
13
|
+
metaDataArr$: import("rxjs").Observable<import("../../interfaces/report-def").MetaData[]>;
|
|
13
14
|
reset: () => void;
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<SortMenuComponentStore, never>;
|
|
15
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<SortMenuComponentStore>;
|
|
@@ -11,4 +11,4 @@ import { SortMenuComponent } from "../sort-menu/sort-menu.component";
|
|
|
11
11
|
import { StopPropagationDirective } from "../../../utilities";
|
|
12
12
|
import { PaginatorComponent } from "../generic-table/paginator.component";
|
|
13
13
|
import { VirtualScrollContainer } from "./virtual-scroll-container";
|
|
14
|
-
export declare const containerImports: (typeof MatButtonModule | typeof
|
|
14
|
+
export declare const containerImports: (typeof MatButtonModule | typeof StopPropagationDirective | typeof AsyncPipe | typeof GenFilterDisplayerComponent | typeof LetDirective | typeof FilterChipsComponent | typeof NgTemplateOutlet | typeof GenericTableComponent | typeof PaginatorComponent | typeof VirtualScrollContainer | typeof MultiSortDirective | typeof GroupByListComponent | typeof GenColDisplayerComponent | typeof SortMenuComponent)[];
|
|
@@ -7,7 +7,6 @@ import { CustomCellDirective, TableCustomFilterDirective, TableFilterDirective }
|
|
|
7
7
|
import { TableStore } from '../../classes/table-store';
|
|
8
8
|
import { ExportToCsvService } from '../../services/export-to-csv.service';
|
|
9
9
|
import { TableState } from '../../classes/TableState';
|
|
10
|
-
import { ColumnInfo } from '../../interfaces/ColumnInfo';
|
|
11
10
|
import { TableWrapperDirective } from '../../directives/table-wrapper.directive';
|
|
12
11
|
import { TableBuilderStateStore } from '../../ngrx/tableBuilderStateStore';
|
|
13
12
|
import { TableProps } from './tableProps';
|
|
@@ -18,17 +17,25 @@ export declare class TableContainerComponent<T = any> implements OnInit, OnDestr
|
|
|
18
17
|
props: TableProps;
|
|
19
18
|
dataSubject: ReplaySubject<Observable<T[]>>;
|
|
20
19
|
state: TableStore;
|
|
20
|
+
private dataStore;
|
|
21
21
|
config: import("../../classes/TableBuilderConfig").TableBuilderConfig;
|
|
22
22
|
exportToCsvService: ExportToCsvService<T>;
|
|
23
23
|
wrapper: TableWrapperDirective | null;
|
|
24
24
|
stateService: TableBuilderStateStore;
|
|
25
25
|
injector: Injector;
|
|
26
|
+
filterDirectives: import("@angular/core").Signal<readonly TableFilterDirective[]>;
|
|
27
|
+
customFilterDirectives: import("@angular/core").Signal<readonly TableCustomFilterDirective<any>[]>;
|
|
28
|
+
allFilterDirectives: import("@angular/core").Signal<(TableFilterDirective | TableCustomFilterDirective<any>)[]>;
|
|
29
|
+
tableState: import("@angular/core").Signal<TableState | undefined>;
|
|
30
|
+
allFilterDirectivesEffect: import("@angular/core").EffectRef;
|
|
26
31
|
paginatorComponent?: PaginatorComponent;
|
|
27
32
|
genericTable?: GenericTableComponent;
|
|
28
|
-
customFilterDirectives: QueryList<TableCustomFilterDirective>;
|
|
29
|
-
filterDirectives: QueryList<TableFilterDirective>;
|
|
30
33
|
customRows: QueryList<MatRowDef<any>>;
|
|
31
|
-
customCells:
|
|
34
|
+
$customCells: import("@angular/core").Signal<readonly CustomCellDirective<any>[]>;
|
|
35
|
+
$myColumns: import("@angular/core").Signal<{
|
|
36
|
+
metaData: MetaData;
|
|
37
|
+
customCell: CustomCellDirective<any> | undefined;
|
|
38
|
+
}[]>;
|
|
32
39
|
tableElRef: ElementRef;
|
|
33
40
|
tableBuilder: TableBuilder;
|
|
34
41
|
tableId: string;
|
|
@@ -38,6 +45,7 @@ export declare class TableContainerComponent<T = any> implements OnInit, OnDestr
|
|
|
38
45
|
set stickyFooter(val: boolean);
|
|
39
46
|
set pageSize(value: number);
|
|
40
47
|
set groupHeaderTemplate(template: TemplateRef<any>);
|
|
48
|
+
set groupHeaderHeight(value: number);
|
|
41
49
|
trackBy: string;
|
|
42
50
|
inputFilters?: Observable<Array<Predicate<T>>>;
|
|
43
51
|
selection$: EventEmitter<any>;
|
|
@@ -50,7 +58,6 @@ export declare class TableContainerComponent<T = any> implements OnInit, OnDestr
|
|
|
50
58
|
displayData: Observable<T[]>;
|
|
51
59
|
$displayData: import("@angular/core").Signal<T[]>;
|
|
52
60
|
collapseFooter$: Observable<boolean>;
|
|
53
|
-
myColumns$: Observable<ColumnInfo[]>;
|
|
54
61
|
ngOnDestroy(): void;
|
|
55
62
|
firstPage(): void;
|
|
56
63
|
lastPage(): void;
|
|
@@ -59,15 +66,15 @@ export declare class TableContainerComponent<T = any> implements OnInit, OnDestr
|
|
|
59
66
|
customFilters$: BehaviorSubject<Predicate<T>[]>;
|
|
60
67
|
initializeData(): void;
|
|
61
68
|
ngOnInit(): void;
|
|
69
|
+
mergeMetaData(metaData1: MetaData, metaData2?: MetaData): MetaData;
|
|
62
70
|
exportToCsv(): void;
|
|
63
71
|
expandAllGroups: () => void;
|
|
64
72
|
collapseAllGroups: () => void;
|
|
65
73
|
ngAfterContentInit(): void;
|
|
66
|
-
|
|
67
|
-
mapMetaDatas: (meta: MetaData<T>) => MetaData<T>;
|
|
74
|
+
mapArrayFieldsMetaDatas: (meta: MetaData<T>) => MetaData<T>;
|
|
68
75
|
collapseHeader$: Observable<boolean>;
|
|
69
76
|
addFilterDirectives: (state: TableState) => void;
|
|
70
77
|
$useVirtual: import("@angular/core").Signal<boolean>;
|
|
71
78
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableContainerComponent<any>, never>;
|
|
72
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableContainerComponent<any>, "tb-table-container", never, { "tableBuilder": { "alias": "tableBuilder"; "required": true; }; "tableId": { "alias": "tableId"; "required": false; }; "indexColumn": { "alias": "indexColumn"; "required": false; }; "selectionColumn": { "alias": "selectionColumn"; "required": false; }; "isSticky": { "alias": "isSticky"; "required": false; }; "stickyFooter": { "alias": "stickyFooter"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "groupHeaderTemplate": { "alias": "groupHeaderTemplate"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "inputFilters": { "alias": "inputFilters"; "required": false; }; }, { "selection$": "selection$"; "data": "data"; "onStateReset": "onStateReset"; "onSaveState": "onSaveState"; "state$": "state$"; }, ["
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableContainerComponent<any>, "tb-table-container", never, { "tableBuilder": { "alias": "tableBuilder"; "required": true; }; "tableId": { "alias": "tableId"; "required": false; }; "indexColumn": { "alias": "indexColumn"; "required": false; }; "selectionColumn": { "alias": "selectionColumn"; "required": false; }; "isSticky": { "alias": "isSticky"; "required": false; }; "stickyFooter": { "alias": "stickyFooter"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "groupHeaderTemplate": { "alias": "groupHeaderTemplate"; "required": false; }; "groupHeaderHeight": { "alias": "groupHeaderHeight"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "inputFilters": { "alias": "inputFilters"; "required": false; }; }, { "selection$": "selection$"; "data": "data"; "onStateReset": "onStateReset"; "onSaveState": "onSaveState"; "state$": "state$"; }, ["filterDirectives", "customFilterDirectives", "$customCells", "tableElRef", "customRows"], ["[before]", ".tb-header-title"], true, never>;
|
|
73
80
|
}
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy } from '@angular/core';
|
|
1
|
+
import { ElementRef, OnDestroy, AfterViewInit } from '@angular/core';
|
|
2
2
|
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
3
4
|
import { TableVirtualScrollStrategy } from '../scroll-strategy';
|
|
4
5
|
import { VirtualScrollOptions } from '../../classes/table-builder-general-settings';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class VirtualScrollContainer implements OnDestroy {
|
|
7
|
+
export declare class VirtualScrollContainer implements OnDestroy, AfterViewInit {
|
|
7
8
|
private state;
|
|
9
|
+
private dataStore;
|
|
10
|
+
private genericTable;
|
|
11
|
+
sub: Subscription | undefined;
|
|
12
|
+
footerStyle: string;
|
|
8
13
|
viewport: import("@angular/core").Signal<CdkVirtualScrollViewport | undefined>;
|
|
9
14
|
defaultOptions: VirtualScrollOptions;
|
|
10
15
|
scrollStrategy: TableVirtualScrollStrategy;
|
|
11
16
|
dataLength$: import("rxjs").Observable<number>;
|
|
12
17
|
subscriber: import("../../../rxjs").Subscriber;
|
|
13
18
|
_: import("@angular/core").EffectRef;
|
|
19
|
+
ngAfterViewInit(): void;
|
|
14
20
|
ngOnDestroy(): void;
|
|
15
21
|
setSize(el: ElementRef<HTMLElement>): void;
|
|
16
22
|
resizeHandler: () => void;
|
|
17
23
|
computedRowHeight(): number;
|
|
18
24
|
computedHeaderHeight(): number;
|
|
19
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<VirtualScrollContainer, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<VirtualScrollContainer, "tb-virtual-scroll-container", never, {}, {},
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VirtualScrollContainer, "tb-virtual-scroll-container", never, {}, {}, ["genericTable"], ["*"], true, never>;
|
|
21
27
|
}
|
package/table-builder/components/table-container-filter/filter-list/filter-list.component.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { TableStore } from '../../../classes/table-store';
|
|
2
2
|
import { FilterInfo } from '../../../classes/filter-info';
|
|
3
3
|
import { WrapperFilterStore } from '../table-wrapper-filter-store';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class FilterChipsComponent {
|
|
7
6
|
tableState: TableStore;
|
|
8
7
|
filterStore: WrapperFilterStore;
|
|
9
|
-
filters
|
|
8
|
+
$filters: import("@angular/core").Signal<FilterInfo<any, any>[]>;
|
|
10
9
|
deleteByIndex(index: number): void;
|
|
11
10
|
addFilter(filter: FilterInfo<any>): void;
|
|
12
11
|
clearAll(): void;
|
|
13
|
-
currentFilters$: Observable<import("../../../classes/filter-info").PartialFilter[]>;
|
|
12
|
+
currentFilters$: import("rxjs").Observable<import("../../../classes/filter-info").PartialFilter[]>;
|
|
14
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<FilterChipsComponent, never>;
|
|
15
14
|
static ɵcmp: i0.ɵɵComponentDeclaration<FilterChipsComponent, "lib-filter-list", never, {}, {}, never, never, true, never>;
|
|
16
15
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { MetaData } from '../../../interfaces/report-def';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
2
|
import { TableStore } from '../../../classes/table-store';
|
|
4
3
|
import { WrapperFilterStore } from '../table-wrapper-filter-store';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class GenFilterDisplayerComponent {
|
|
7
6
|
protected tableState: TableStore;
|
|
8
7
|
protected filterStore: WrapperFilterStore;
|
|
9
|
-
|
|
10
|
-
filterCols$: Observable<MetaData[]>;
|
|
8
|
+
$filterCols: import("@angular/core").Signal<MetaData[]>;
|
|
11
9
|
addFilter(metaData: MetaData): void;
|
|
12
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<GenFilterDisplayerComponent, never>;
|
|
13
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<GenFilterDisplayerComponent, "tb-filter-displayer", never, {}, {}, never, never, true, never>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { TemplateRef,
|
|
1
|
+
import { TemplateRef, OnInit } from '@angular/core';
|
|
2
2
|
import { CdkColumnDef } from '@angular/cdk/table';
|
|
3
3
|
import { SortDef, MetaData } from '../interfaces/report-def';
|
|
4
4
|
import { TableBuilder } from '../classes/table-builder';
|
|
5
|
+
import { ReplaySubject } from 'rxjs';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
interface CustomCellContext<T> {
|
|
7
8
|
$implicit: T;
|
|
8
9
|
element: T;
|
|
9
10
|
}
|
|
10
|
-
export declare class CustomCellDirective<T = any> implements
|
|
11
|
+
export declare class CustomCellDirective<T = any> implements OnInit {
|
|
11
12
|
private templateRef;
|
|
12
13
|
columnDef: CdkColumnDef | null;
|
|
13
14
|
customCell: string;
|
|
@@ -22,8 +23,9 @@ export declare class CustomCellDirective<T = any> implements AfterContentInit {
|
|
|
22
23
|
*/
|
|
23
24
|
customCellNotMapped: boolean;
|
|
24
25
|
constructor();
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
ngOnInit(): void;
|
|
27
|
+
$metaData: ReplaySubject<MetaData>;
|
|
28
|
+
getMetaData: () => MetaData;
|
|
27
29
|
static ngTemplateContextGuard<T>(dir: CustomCellDirective<T>, ctx: any): ctx is CustomCellContext<T>;
|
|
28
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomCellDirective<any>, never>;
|
|
29
31
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CustomCellDirective<any>, "[customCell]", never, { "customCell": { "alias": "customCell"; "required": false; }; "displayName": { "alias": "displayName"; "required": false; }; "preSort": { "alias": "preSort"; "required": false; }; "TemplateRef": { "alias": "TemplateRef"; "required": false; }; "customCellOrder": { "alias": "customCellOrder"; "required": false; }; "customCellWidth": { "alias": "customCellWidth"; "required": false; }; "customCellTableRef": { "alias": "customCellTableRef"; "required": false; }; "customCellNotMapped": { "alias": "customCellNotMapped"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TableCustomFilterDirective, TableFilterDirective } from "./tb-filter.directive";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class TableWrapperDirective {
|
|
4
|
-
registrations: (
|
|
4
|
+
$registrations: import("@angular/core").WritableSignal<(TableFilterDirective | TableCustomFilterDirective<any>)[]>;
|
|
5
5
|
register(filter: TableCustomFilterDirective | TableFilterDirective): void;
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableWrapperDirective, never>;
|
|
7
7
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TableWrapperDirective, "[tbWrapper]", never, {}, {}, never, never, true, never>;
|