@one-paragon/angular-utilities 0.0.26 → 0.0.27
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/esm2020/rxjs/rxjs-operators.mjs +5 -2
- package/esm2020/table-builder/classes/TableState.mjs +9 -1
- package/esm2020/table-builder/classes/data-filter.mjs +2 -2
- package/esm2020/table-builder/classes/filter-info.mjs +12 -2
- package/esm2020/table-builder/classes/table-store.mjs +45 -5
- package/esm2020/table-builder/components/filter/filter.component.mjs +1 -1
- package/esm2020/table-builder/components/filter/in-list/in-list-filter.component.mjs +4 -4
- package/esm2020/table-builder/components/header-menu/header-menu.component.mjs +3 -3
- package/esm2020/table-builder/components/table-container/table-container.mjs +100 -29
- package/esm2020/table-builder/components/table-container-filter/filter-list/filter-list.component.mjs +5 -2
- package/esm2020/table-builder/directives/index.mjs +2 -1
- package/esm2020/table-builder/directives/tb-filter.directive.mjs +380 -0
- package/esm2020/table-builder/enums/filterTypes.mjs +2 -1
- package/esm2020/table-builder/services/table-template-service.mjs +1 -1
- package/esm2020/table-builder/table-builder.module.mjs +32 -3
- package/fesm2015/one-paragon-angular-utilities.mjs +844 -310
- package/fesm2015/one-paragon-angular-utilities.mjs.map +1 -1
- package/fesm2020/one-paragon-angular-utilities.mjs +843 -314
- package/fesm2020/one-paragon-angular-utilities.mjs.map +1 -1
- package/package.json +1 -1
- package/rxjs/rxjs-operators.d.ts +2 -0
- package/table-builder/classes/TableState.d.ts +9 -2
- package/table-builder/classes/data-filter.d.ts +2 -2
- package/table-builder/classes/filter-info.d.ts +14 -3
- package/table-builder/classes/table-store.d.ts +26 -6
- package/table-builder/components/filter/filter.component.d.ts +13 -0
- package/table-builder/components/filter/in-list/in-list-filter.component.d.ts +1 -1
- package/table-builder/components/table-container/table-container.d.ts +11 -19
- package/table-builder/directives/index.d.ts +1 -0
- package/table-builder/directives/tb-filter.directive.d.ts +119 -0
- package/table-builder/enums/filterTypes.d.ts +2 -1
- package/table-builder/table-builder.module.d.ts +11 -10
package/package.json
CHANGED
package/rxjs/rxjs-operators.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Predicate } from '@angular/core';
|
|
1
2
|
import { Observable, MonoTypeOperatorFunction, OperatorFunction } from 'rxjs';
|
|
3
|
+
export declare const onceWhen: <T>(predicate: Predicate<T>) => (src: Observable<T>) => Observable<T>;
|
|
2
4
|
export declare const mapArray: <T, U>(mapFunc: (src: T) => U) => (source: Observable<T[]>) => Observable<U[]>;
|
|
3
5
|
export declare const filterArray: <T>(filterFunc: (src: T) => boolean) => (source: Observable<T[]>) => Observable<T[]>;
|
|
4
6
|
export declare function onWait<T, V extends T>(val: V): MonoTypeOperatorFunction<T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilterInfo } from './filter-info';
|
|
1
|
+
import { CustomFilter, FilterInfo } from './filter-info';
|
|
2
2
|
import { Dictionary } from '../interfaces/dictionary';
|
|
3
3
|
import { Sort } from '@angular/material/sort';
|
|
4
4
|
import { MetaData } from '../interfaces/report-def';
|
|
@@ -6,7 +6,7 @@ import { NotPersisitedTableSettings, PesrsistedTableSettings } from './table-bui
|
|
|
6
6
|
export interface PersistedTableState {
|
|
7
7
|
hiddenKeys?: string[];
|
|
8
8
|
pageSize?: number;
|
|
9
|
-
filters: Dictionary<FilterInfo>;
|
|
9
|
+
filters: Dictionary<FilterInfo | CustomFilter>;
|
|
10
10
|
sorted: Sort[];
|
|
11
11
|
userDefined: {
|
|
12
12
|
order: Dictionary<number>;
|
|
@@ -18,7 +18,14 @@ export interface PersistedTableState {
|
|
|
18
18
|
persistedTableSettings: PesrsistedTableSettings;
|
|
19
19
|
}
|
|
20
20
|
export interface TableState extends Required<PersistedTableState> {
|
|
21
|
+
initializationState: InitializationState;
|
|
21
22
|
metaData: Dictionary<MetaData>;
|
|
22
23
|
notPersisitedTableSettings: NotPersisitedTableSettings;
|
|
23
24
|
}
|
|
25
|
+
export declare enum InitializationState {
|
|
26
|
+
Created = 0,
|
|
27
|
+
MetaDataLoaded = 1,
|
|
28
|
+
LoadedFromStore = 2,
|
|
29
|
+
Ready = 3
|
|
30
|
+
}
|
|
24
31
|
export declare const defaultTableState: TableState;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { FilterInfo } from './filter-info';
|
|
2
|
+
import { CustomFilter, FilterInfo } from './filter-info';
|
|
3
3
|
export declare class DataFilter<T = any> {
|
|
4
4
|
private filters$;
|
|
5
5
|
constructor(filters$: Observable<Array<(val: any) => boolean>>);
|
|
6
6
|
filter(data: any[], filters: Array<(val: any) => boolean>): any[];
|
|
7
7
|
filterData(data$: Observable<T[]>): Observable<any[]>;
|
|
8
|
-
appendFilters(filters$: Observable<FilterInfo[]>): DataFilter;
|
|
8
|
+
appendFilters(filters$: Observable<(FilterInfo | CustomFilter)[]>): DataFilter;
|
|
9
9
|
}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { FilterType, FilterToFiltersMap } from '../enums/filterTypes';
|
|
2
2
|
import { FieldType } from '../interfaces/report-def';
|
|
3
|
+
import { Predicate } from '@angular/core';
|
|
3
4
|
declare type FilterTypeMapType = {
|
|
4
5
|
[key in FieldType]: FilterToFiltersMap;
|
|
5
6
|
};
|
|
6
7
|
export declare type UnmappedTypes = FieldType.Expression | FieldType.Hidden | FieldType.ImageUrl;
|
|
7
8
|
export declare type mappedFieldTypes = FieldType.Unknown | FieldType.Date | FieldType.Currency | FieldType.Array | FieldType.Number | FieldType.String | FieldType.Boolean | FieldType.PhoneNumber | FieldType.Link | FieldType.Enum;
|
|
8
9
|
export declare const filterTypeMap: Omit<FilterTypeMapType, UnmappedTypes>;
|
|
9
|
-
export interface
|
|
10
|
+
export interface FilterState {
|
|
10
11
|
filterId: string;
|
|
11
12
|
filterType: FilterType;
|
|
12
|
-
filterValue
|
|
13
|
+
filterValue?: any;
|
|
14
|
+
active?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface FilterInfo<T extends FieldType = any> extends FilterState {
|
|
13
17
|
key: string;
|
|
14
18
|
fieldType: T;
|
|
19
|
+
_isExternalyManaged?: boolean;
|
|
15
20
|
}
|
|
16
21
|
export interface PartialFilter<T extends FieldType = any> {
|
|
17
22
|
filterId?: string;
|
|
@@ -20,7 +25,13 @@ export interface PartialFilter<T extends FieldType = any> {
|
|
|
20
25
|
filterType?: FilterType;
|
|
21
26
|
filterValue?: any;
|
|
22
27
|
}
|
|
23
|
-
export
|
|
28
|
+
export interface CustomFilter<T extends FieldType = any> extends FilterState {
|
|
29
|
+
predicate: Predicate<T>;
|
|
30
|
+
filterType: FilterType.Custom;
|
|
31
|
+
}
|
|
32
|
+
export declare function isCustomFilter(filter: FilterInfo | CustomFilter): filter is CustomFilter;
|
|
33
|
+
export declare function isFilterInfo(filter: FilterInfo | CustomFilter): filter is FilterInfo;
|
|
34
|
+
export declare function createFilterFunc(filter: FilterInfo | CustomFilter): Predicate<any>;
|
|
24
35
|
export declare type FilterFunc<T, V = T> = (filterInfo: FilterInfo) => (val: V) => boolean;
|
|
25
36
|
export declare type Range<T> = {
|
|
26
37
|
Start: T;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { MetaData } from '../interfaces/report-def';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { PersistedTableState, TableState } from './TableState';
|
|
3
|
+
import { InitializationState, PersistedTableState, TableState } from './TableState';
|
|
4
|
+
import { Predicate } from '@angular/core';
|
|
4
5
|
import { TableBuilderConfig } from './TableBuilderConfig';
|
|
5
|
-
import { FilterInfo } from './filter-info';
|
|
6
|
+
import { CustomFilter, FilterInfo } from './filter-info';
|
|
6
7
|
import { Sort, SortDirection } from '@angular/material/sort';
|
|
7
8
|
import { ComponentStore } from '@ngrx/component-store';
|
|
8
9
|
import { Dictionary } from '../interfaces/dictionary';
|
|
9
10
|
import { GeneralTableSettings, NotPersisitedTableSettings, PesrsistedTableSettings } from './table-builder-general-settings';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
12
|
+
export declare function stateIs(initializationState: InitializationState): (state: TableState) => boolean;
|
|
11
13
|
export declare class TableStore extends ComponentStore<TableState> {
|
|
12
14
|
constructor(config: TableBuilderConfig);
|
|
13
15
|
getSavableState(): Observable<PersistedTableState>;
|
|
@@ -44,10 +46,10 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
44
46
|
newOrder: number;
|
|
45
47
|
oldOrder: number;
|
|
46
48
|
}>) => import("rxjs").Subscription;
|
|
47
|
-
readonly filters$: Observable<Dictionary<FilterInfo<any>>>;
|
|
48
|
-
readonly getFilter$: (filterId: string) => Observable<FilterInfo | undefined>;
|
|
49
|
-
readonly addFilter: (observableOrValue: FilterInfo<any> | Observable<FilterInfo<any>>) => import("rxjs").Subscription;
|
|
50
|
-
readonly addFilters: (observableOrValue: FilterInfo<any>[] | Observable<FilterInfo<any>[]>) => import("rxjs").Subscription;
|
|
49
|
+
readonly filters$: Observable<Dictionary<FilterInfo<any> | CustomFilter<any>>>;
|
|
50
|
+
readonly getFilter$: (filterId: string) => Observable<FilterInfo | CustomFilter | undefined>;
|
|
51
|
+
readonly addFilter: (observableOrValue: FilterInfo<any> | CustomFilter<any> | Observable<FilterInfo<any> | CustomFilter<any>>) => import("rxjs").Subscription;
|
|
52
|
+
readonly addFilters: (observableOrValue: (FilterInfo<any> | CustomFilter<any>)[] | Observable<(FilterInfo<any> | CustomFilter<any>)[]>) => import("rxjs").Subscription;
|
|
51
53
|
private addFiltersToState;
|
|
52
54
|
readonly removeFilter: (observableOrValue: string | Observable<string>) => import("rxjs").Subscription;
|
|
53
55
|
readonly removeFilters: (observableOrValue: string[] | Observable<string[]>) => import("rxjs").Subscription;
|
|
@@ -65,9 +67,27 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
65
67
|
updateStateFunc: (state: TableState, incomingTableState: Partial<TableState>) => TableState;
|
|
66
68
|
readonly setPageSize: (observableOrValue: number | Observable<number>) => import("rxjs").Subscription;
|
|
67
69
|
readonly updateState: (observableOrValue: Partial<TableState> | Observable<Partial<TableState>>) => import("rxjs").Subscription;
|
|
70
|
+
cleanPersistedState(state: TableState, pState: PersistedTableState): {
|
|
71
|
+
filters: any;
|
|
72
|
+
sorted: Sort[];
|
|
73
|
+
hiddenKeys?: string[] | undefined;
|
|
74
|
+
pageSize?: number | undefined;
|
|
75
|
+
userDefined: {
|
|
76
|
+
order: Dictionary<number>;
|
|
77
|
+
widths: Dictionary<number>;
|
|
78
|
+
table: {
|
|
79
|
+
width?: number | undefined;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
persistedTableSettings: PesrsistedTableSettings;
|
|
83
|
+
};
|
|
84
|
+
readonly updateStateFromPersistedState: (observableOrValue: PersistedTableState | Observable<PersistedTableState>) => import("rxjs").Subscription;
|
|
68
85
|
getUserDefinedTableSize$: Observable<number | undefined>;
|
|
69
86
|
setTableWidth: (observableOrValue: number | Observable<number>) => import("rxjs").Subscription;
|
|
70
87
|
mergeMeta: (orig: MetaData, merge: MetaData) => MetaData;
|
|
88
|
+
readonly setIntializationState: (observableOrValue: InitializationState | Observable<InitializationState>) => import("rxjs").Subscription;
|
|
89
|
+
runOnceWhen(predicate: Predicate<TableState>, func: (state: TableState) => void): void;
|
|
90
|
+
onReady(func: (state: TableState) => void): void;
|
|
71
91
|
readonly setMetaData: (observableOrValue: MetaData<any, []> | MetaData<any, []>[] | Observable<MetaData<any, []> | MetaData<any, []>[]>) => import("rxjs").Subscription;
|
|
72
92
|
private initializeOrder;
|
|
73
93
|
toggleCollapseHeader: () => void;
|
|
@@ -26,6 +26,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
26
26
|
Or: FilterType[];
|
|
27
27
|
And: FilterType[];
|
|
28
28
|
In: FilterType[];
|
|
29
|
+
Custom: FilterType[];
|
|
29
30
|
}>;
|
|
30
31
|
1: Partial<{
|
|
31
32
|
Equals: FilterType[];
|
|
@@ -46,6 +47,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
46
47
|
Or: FilterType[];
|
|
47
48
|
And: FilterType[];
|
|
48
49
|
In: FilterType[];
|
|
50
|
+
Custom: FilterType[];
|
|
49
51
|
}>;
|
|
50
52
|
2: Partial<{
|
|
51
53
|
Equals: FilterType[];
|
|
@@ -66,6 +68,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
66
68
|
Or: FilterType[];
|
|
67
69
|
And: FilterType[];
|
|
68
70
|
In: FilterType[];
|
|
71
|
+
Custom: FilterType[];
|
|
69
72
|
}>;
|
|
70
73
|
3: Partial<{
|
|
71
74
|
Equals: FilterType[];
|
|
@@ -86,6 +89,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
86
89
|
Or: FilterType[];
|
|
87
90
|
And: FilterType[];
|
|
88
91
|
In: FilterType[];
|
|
92
|
+
Custom: FilterType[];
|
|
89
93
|
}>;
|
|
90
94
|
4: Partial<{
|
|
91
95
|
Equals: FilterType[];
|
|
@@ -106,6 +110,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
106
110
|
Or: FilterType[];
|
|
107
111
|
And: FilterType[];
|
|
108
112
|
In: FilterType[];
|
|
113
|
+
Custom: FilterType[];
|
|
109
114
|
}>;
|
|
110
115
|
5: Partial<{
|
|
111
116
|
Equals: FilterType[];
|
|
@@ -126,6 +131,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
126
131
|
Or: FilterType[];
|
|
127
132
|
And: FilterType[];
|
|
128
133
|
In: FilterType[];
|
|
134
|
+
Custom: FilterType[];
|
|
129
135
|
}>;
|
|
130
136
|
6: Partial<{
|
|
131
137
|
Equals: FilterType[];
|
|
@@ -146,6 +152,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
146
152
|
Or: FilterType[];
|
|
147
153
|
And: FilterType[];
|
|
148
154
|
In: FilterType[];
|
|
155
|
+
Custom: FilterType[];
|
|
149
156
|
}>;
|
|
150
157
|
7: Partial<{
|
|
151
158
|
Equals: FilterType[];
|
|
@@ -166,6 +173,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
166
173
|
Or: FilterType[];
|
|
167
174
|
And: FilterType[];
|
|
168
175
|
In: FilterType[];
|
|
176
|
+
Custom: FilterType[];
|
|
169
177
|
}>;
|
|
170
178
|
8: Partial<{
|
|
171
179
|
Equals: FilterType[];
|
|
@@ -186,6 +194,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
186
194
|
Or: FilterType[];
|
|
187
195
|
And: FilterType[];
|
|
188
196
|
In: FilterType[];
|
|
197
|
+
Custom: FilterType[];
|
|
189
198
|
}>;
|
|
190
199
|
9: Partial<{
|
|
191
200
|
Equals: FilterType[];
|
|
@@ -206,6 +215,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
206
215
|
Or: FilterType[];
|
|
207
216
|
And: FilterType[];
|
|
208
217
|
In: FilterType[];
|
|
218
|
+
Custom: FilterType[];
|
|
209
219
|
}>;
|
|
210
220
|
10: Partial<{
|
|
211
221
|
Equals: FilterType[];
|
|
@@ -226,6 +236,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
226
236
|
Or: FilterType[];
|
|
227
237
|
And: FilterType[];
|
|
228
238
|
In: FilterType[];
|
|
239
|
+
Custom: FilterType[];
|
|
229
240
|
}>;
|
|
230
241
|
11: Partial<{
|
|
231
242
|
Equals: FilterType[];
|
|
@@ -246,6 +257,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
246
257
|
Or: FilterType[];
|
|
247
258
|
And: FilterType[];
|
|
248
259
|
In: FilterType[];
|
|
260
|
+
Custom: FilterType[];
|
|
249
261
|
}>;
|
|
250
262
|
12: Partial<{
|
|
251
263
|
Equals: FilterType[];
|
|
@@ -266,6 +278,7 @@ export declare class FilterComponent<T extends mappedFieldTypes = any> {
|
|
|
266
278
|
Or: FilterType[];
|
|
267
279
|
And: FilterType[];
|
|
268
280
|
In: FilterType[];
|
|
281
|
+
Custom: FilterType[];
|
|
269
282
|
}>;
|
|
270
283
|
}, UnmappedTypes>;
|
|
271
284
|
FilterType: typeof FilterType;
|
|
@@ -23,5 +23,5 @@ export declare class InListFilterComponent implements ControlValueAccessor {
|
|
|
23
23
|
ngOnInit(): void;
|
|
24
24
|
selectFilterChanged($event: any, val: any): void;
|
|
25
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<InListFilterComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InListFilterComponent, "tb-in-list-filter", never, { "key": "key"; }, {}, never, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InListFilterComponent, "tb-in-list-filter , [tb-in-list-filter]", never, { "key": "key"; }, {}, never, never>;
|
|
27
27
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EventEmitter, QueryList } from '@angular/core';
|
|
2
|
-
import { Observable, ReplaySubject } from 'rxjs';
|
|
1
|
+
import { EventEmitter, QueryList, Predicate } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';
|
|
3
3
|
import { MetaData } from '../../interfaces/report-def';
|
|
4
4
|
import { TableBuilder } from '../../classes/table-builder';
|
|
5
5
|
import { MatRowDef } from '@angular/material/table';
|
|
6
|
-
import { CustomCellDirective } from '../../directives';
|
|
6
|
+
import { CustomCellDirective, TableCustomFilterDirective, TableFilterDirective } from '../../directives';
|
|
7
7
|
import { TableStore } from '../../classes/table-store';
|
|
8
8
|
import { ExportToCsvService } from '../../services/export-to-csv.service';
|
|
9
9
|
import { TableBuilderConfig } from '../../classes/TableBuilderConfig';
|
|
@@ -16,6 +16,8 @@ export declare class TableContainerComponent<T = any> {
|
|
|
16
16
|
exportToCsvService: ExportToCsvService<T>;
|
|
17
17
|
private config;
|
|
18
18
|
private store;
|
|
19
|
+
customFilters: QueryList<TableCustomFilterDirective>;
|
|
20
|
+
filters: QueryList<TableFilterDirective>;
|
|
19
21
|
tableId: string;
|
|
20
22
|
tableBuilder: TableBuilder;
|
|
21
23
|
IndexColumn: boolean;
|
|
@@ -23,7 +25,7 @@ export declare class TableContainerComponent<T = any> {
|
|
|
23
25
|
trackBy: string;
|
|
24
26
|
isSticky: boolean;
|
|
25
27
|
set pageSize(value: number);
|
|
26
|
-
inputFilters
|
|
28
|
+
inputFilters?: Observable<Array<Predicate<T>>>;
|
|
27
29
|
selection$: EventEmitter<any>;
|
|
28
30
|
dataSubject: ReplaySubject<Observable<T[]>>;
|
|
29
31
|
data: Observable<T[]>;
|
|
@@ -37,6 +39,10 @@ export declare class TableContainerComponent<T = any> {
|
|
|
37
39
|
currentStateKey$?: Observable<string>;
|
|
38
40
|
disableSort: boolean;
|
|
39
41
|
constructor(state: TableStore, exportToCsvService: ExportToCsvService<T>, config: TableBuilderConfig, store: Store<any>);
|
|
42
|
+
resetState(): void;
|
|
43
|
+
initializeState(): void;
|
|
44
|
+
customFilters$: BehaviorSubject<Predicate<any>[]>;
|
|
45
|
+
initializeData(): void;
|
|
40
46
|
ngOnInit(): void;
|
|
41
47
|
exportToCsv(): void;
|
|
42
48
|
saveState(): void;
|
|
@@ -45,22 +51,8 @@ export declare class TableContainerComponent<T = any> {
|
|
|
45
51
|
ngAfterContentInit(): void;
|
|
46
52
|
InitializeColumns(): void;
|
|
47
53
|
mapMetaDatas: (meta: MetaData<T>) => MetaData<T, []>;
|
|
48
|
-
cleanStateOnInitialLoad: () => (obs: Observable<PersistedTableState>) => Observable<{
|
|
49
|
-
filters: any;
|
|
50
|
-
sorted: import("@angular/material/sort").Sort[];
|
|
51
|
-
hiddenKeys?: string[] | undefined;
|
|
52
|
-
pageSize?: number | undefined;
|
|
53
|
-
userDefined: {
|
|
54
|
-
order: import("../../interfaces/dictionary").Dictionary<number>;
|
|
55
|
-
widths: import("../../interfaces/dictionary").Dictionary<number>;
|
|
56
|
-
table: {
|
|
57
|
-
width?: number | undefined;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
persistedTableSettings: import("@one-paragon/angular-utilities").PesrsistedTableSettings;
|
|
61
|
-
}>;
|
|
62
54
|
collapseHeader$: Observable<boolean>;
|
|
63
55
|
getData(data: any[], metaData: MetaData[]): any[];
|
|
64
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableContainerComponent<any>, never>;
|
|
65
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableContainerComponent<any>, "tb-table-container", never, { "tableId": "tableId"; "tableBuilder": "tableBuilder"; "IndexColumn": "IndexColumn"; "SelectionColumn": "SelectionColumn"; "trackBy": "trackBy"; "isSticky": "isSticky"; "pageSize": "pageSize"; "inputFilters": "inputFilters"; }, { "selection$": "selection$"; "data": "data"; "OnStateReset": "OnStateReset"; "OnSaveState": "OnSaveState"; "state$": "state$"; }, ["customRows", "customCells"], [".tb-header-title"]>;
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableContainerComponent<any>, "tb-table-container", never, { "tableId": "tableId"; "tableBuilder": "tableBuilder"; "IndexColumn": "IndexColumn"; "SelectionColumn": "SelectionColumn"; "trackBy": "trackBy"; "isSticky": "isSticky"; "pageSize": "pageSize"; "inputFilters": "inputFilters"; }, { "selection$": "selection$"; "data": "data"; "OnStateReset": "OnStateReset"; "OnSaveState": "OnSaveState"; "state$": "state$"; }, ["customFilters", "filters", "customRows", "customCells"], ["[before]", ".tb-header-title"]>;
|
|
66
58
|
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Predicate, SimpleChanges } from "@angular/core";
|
|
2
|
+
import { Observable, ReplaySubject, Subject } from "rxjs";
|
|
3
|
+
import { CustomFilter, FilterInfo } from "../classes/filter-info";
|
|
4
|
+
import { FilterType } from "../enums/filterTypes";
|
|
5
|
+
import { MatSlideToggle } from "@angular/material/slide-toggle";
|
|
6
|
+
import { MatRadioButton } from "@angular/material/radio";
|
|
7
|
+
import { MatButtonToggle } from '@angular/material/button-toggle';
|
|
8
|
+
import { MatOption } from "@angular/material/core";
|
|
9
|
+
import { MatCheckbox } from "@angular/material/checkbox";
|
|
10
|
+
import { FieldType } from "../interfaces/report-def";
|
|
11
|
+
import { NgControl } from "@angular/forms";
|
|
12
|
+
import { ComponentStore } from "@ngrx/component-store";
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
export declare abstract class TableCustomFilterDirective<T = any> {
|
|
15
|
+
abstract filter$: Observable<CustomFilter>;
|
|
16
|
+
filterId: string;
|
|
17
|
+
savable: boolean;
|
|
18
|
+
used: boolean;
|
|
19
|
+
abstract active: boolean;
|
|
20
|
+
abstract reset(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableCustomFilterDirective<any>, never>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TableCustomFilterDirective<any>, " ", never, {}, {}, never>;
|
|
23
|
+
}
|
|
24
|
+
export declare class TableFilterDirective extends ComponentStore<FilterInfo> {
|
|
25
|
+
protected model: NgControl;
|
|
26
|
+
constructor(model: NgControl);
|
|
27
|
+
reset(): void;
|
|
28
|
+
filter$: Observable<FilterInfo<any>>;
|
|
29
|
+
filterType: FilterType;
|
|
30
|
+
key: string;
|
|
31
|
+
fieldType: FieldType;
|
|
32
|
+
filterId: string;
|
|
33
|
+
active: boolean;
|
|
34
|
+
filterValue: any;
|
|
35
|
+
setFilterValue(value: any): void;
|
|
36
|
+
used: boolean;
|
|
37
|
+
savable: boolean;
|
|
38
|
+
ready: boolean;
|
|
39
|
+
_userActive: boolean;
|
|
40
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
41
|
+
ngOnInit(): void;
|
|
42
|
+
protected setFilter(filter: FilterInfo): void;
|
|
43
|
+
update(): void;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableFilterDirective, [{ optional: true; }]>;
|
|
45
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TableFilterDirective, "[tbFilter]", never, { "filterType": "filterType"; "key": "key"; "fieldType": "fieldType"; "filterId": "filterId"; "active": "active"; "filterValue": "filterValue"; }, {}, never>;
|
|
46
|
+
}
|
|
47
|
+
export declare class TableFilterStringContainsDirective extends TableFilterDirective {
|
|
48
|
+
constructor(model: NgControl);
|
|
49
|
+
reset(): void;
|
|
50
|
+
setFilter(filter: FilterInfo): void;
|
|
51
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableFilterStringContainsDirective, [{ optional: true; }]>;
|
|
53
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TableFilterStringContainsDirective, "[tbFilterStringContains]", never, { "key": "tbFilterStringContains"; "filterValue": "filterValue"; "filterId": "filterId"; "active": "active"; }, {}, never>;
|
|
54
|
+
}
|
|
55
|
+
export declare abstract class TableCustomFilterDirectiveBase<T = any> extends TableCustomFilterDirective<T> {
|
|
56
|
+
filter$: Subject<CustomFilter>;
|
|
57
|
+
filter: CustomFilter;
|
|
58
|
+
filterId: string;
|
|
59
|
+
_predicate: Predicate<T>;
|
|
60
|
+
set predicate(val: Predicate<T>);
|
|
61
|
+
_active: boolean;
|
|
62
|
+
ready: boolean;
|
|
63
|
+
update(val: Partial<CustomFilter>): void;
|
|
64
|
+
set active(val: boolean);
|
|
65
|
+
get active(): boolean;
|
|
66
|
+
ngOnInit(): void;
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableCustomFilterDirectiveBase<any>, never>;
|
|
68
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TableCustomFilterDirectiveBase<any>, "[tbCustomFilter]", never, { "filterId": "filterId"; "predicate": "tbCustomFilter"; "active": "active"; }, {}, never>;
|
|
69
|
+
}
|
|
70
|
+
export declare abstract class TbSelectedFilterDirective<T = any> extends TableCustomFilterDirectiveBase<T> {
|
|
71
|
+
private change;
|
|
72
|
+
private isActive;
|
|
73
|
+
protected constructor(change: Observable<any>, isActive: () => boolean);
|
|
74
|
+
reset(): void;
|
|
75
|
+
destroySubject$: ReplaySubject<void>;
|
|
76
|
+
ngOnDestroy(): void;
|
|
77
|
+
ngOnInit(): void;
|
|
78
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TbSelectedFilterDirective<any>, never>;
|
|
79
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TbSelectedFilterDirective<any>, never, never, {}, {}, never>;
|
|
80
|
+
}
|
|
81
|
+
export declare class MatCheckboxTbFilterDirective extends TbSelectedFilterDirective {
|
|
82
|
+
private matCheckbox;
|
|
83
|
+
set active(val: boolean);
|
|
84
|
+
constructor(matCheckbox: MatCheckbox);
|
|
85
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatCheckboxTbFilterDirective, never>;
|
|
86
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatCheckboxTbFilterDirective, "mat-checkbox[tbCustomFilter]", never, { "predicate": "tbCustomFilter"; "filterId": "filterId"; }, {}, never>;
|
|
87
|
+
}
|
|
88
|
+
export declare class MatSlideToggleTbFilterDirective<T = any> extends TbSelectedFilterDirective<T> {
|
|
89
|
+
private matSlideToggle;
|
|
90
|
+
set active(val: boolean);
|
|
91
|
+
constructor(matSlideToggle: MatSlideToggle);
|
|
92
|
+
ngOnInit(): void;
|
|
93
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatSlideToggleTbFilterDirective<any>, never>;
|
|
94
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatSlideToggleTbFilterDirective<any>, "mat-slide-toggle[tbCustomFilter]", never, { "predicate": "tbCustomFilter"; "filterId": "filterId"; }, {}, never>;
|
|
95
|
+
}
|
|
96
|
+
export declare class MatRadioButtonTbFilterDirective extends TbSelectedFilterDirective {
|
|
97
|
+
private matRadioButton;
|
|
98
|
+
set active(val: boolean);
|
|
99
|
+
constructor(matRadioButton: MatRadioButton);
|
|
100
|
+
ngOnInit(): void;
|
|
101
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatRadioButtonTbFilterDirective, never>;
|
|
102
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatRadioButtonTbFilterDirective, "mat-radio-button[tbCustomFilter]", never, { "predicate": "tbCustomFilter"; }, {}, never>;
|
|
103
|
+
}
|
|
104
|
+
export declare class MatOptionTbFilterDirective extends TbSelectedFilterDirective {
|
|
105
|
+
private matOption;
|
|
106
|
+
set active(val: boolean);
|
|
107
|
+
constructor(matOption: MatOption);
|
|
108
|
+
ngOnInit(): void;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatOptionTbFilterDirective, never>;
|
|
110
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatOptionTbFilterDirective, "mat-option[tbCustomFilter]", never, { "predicate": "tbCustomFilter"; "filterId": "filterId"; }, {}, never>;
|
|
111
|
+
}
|
|
112
|
+
export declare class MatButtonToggleFilterDirective extends TbSelectedFilterDirective {
|
|
113
|
+
private matButtonToggle;
|
|
114
|
+
set active(val: boolean);
|
|
115
|
+
constructor(matButtonToggle: MatButtonToggle);
|
|
116
|
+
ngOnInit(): void;
|
|
117
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonToggleFilterDirective, never>;
|
|
118
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonToggleFilterDirective, "mat-button-toggle[tbCustomFilter]", never, { "predicate": "tbCustomFilter"; "filterId": "filterId"; }, {}, never>;
|
|
119
|
+
}
|
|
@@ -18,7 +18,8 @@ export declare enum FilterType {
|
|
|
18
18
|
IsNull = "Is Blank",
|
|
19
19
|
Or = "Or",
|
|
20
20
|
And = "And",
|
|
21
|
-
In = "In"
|
|
21
|
+
In = "In",
|
|
22
|
+
Custom = "Custom"
|
|
22
23
|
}
|
|
23
24
|
export declare const NumberFilterMap: FilterToFiltersMap;
|
|
24
25
|
export declare const StringFilterMap: FilterToFiltersMap;
|
|
@@ -24,18 +24,19 @@ import * as i20 from "./components/initialization-component/initialization-compo
|
|
|
24
24
|
import * as i21 from "./components/filter/in-list/in-list-filter.component";
|
|
25
25
|
import * as i22 from "./components/sort-menu/sort-menu.component";
|
|
26
26
|
import * as i23 from "./components/table-container-filter/filter-list/filter-list.component";
|
|
27
|
-
import * as i24 from "
|
|
28
|
-
import * as i25 from "
|
|
29
|
-
import * as i26 from "
|
|
30
|
-
import * as i27 from "@ngrx/
|
|
31
|
-
import * as i28 from "@
|
|
32
|
-
import * as i29 from "@angular/
|
|
33
|
-
import * as i30 from "@
|
|
34
|
-
import * as i31 from "@
|
|
35
|
-
import * as i32 from "
|
|
27
|
+
import * as i24 from "./directives/tb-filter.directive";
|
|
28
|
+
import * as i25 from "@angular/common";
|
|
29
|
+
import * as i26 from "./material.module";
|
|
30
|
+
import * as i27 from "@ngrx/store";
|
|
31
|
+
import * as i28 from "@ngrx/effects";
|
|
32
|
+
import * as i29 from "@angular/forms";
|
|
33
|
+
import * as i30 from "@angular/router";
|
|
34
|
+
import * as i31 from "@ngrx/component";
|
|
35
|
+
import * as i32 from "@angular/cdk/drag-drop";
|
|
36
|
+
import * as i33 from "../utilities/module";
|
|
36
37
|
export declare class TableBuilderModule {
|
|
37
38
|
static forRoot(config: TableBuilderConfig): ModuleWithProviders<TableBuilderModule>;
|
|
38
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableBuilderModule, never>;
|
|
39
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TableBuilderModule, [typeof i1.ColumnTotalPipe, typeof i2.TableContainerComponent, typeof i3.GenericTableComponent, typeof i4.PaginatorComponent, typeof i5.CustomCellDirective, typeof i6.GenColDisplayerComponent, typeof i7.GenFilterDisplayerComponent, typeof i8.DateFilterComponent, typeof i9.FilterComponent, typeof i10.MultiSortDirective, typeof i11.NumberFilterComponent, typeof i12.ColumnBuilderComponent, typeof i13.ArrayColumnComponent, typeof i14.HeaderMenuComponent, typeof i15.KeyDisplayPipe, typeof i16.FormatFilterValuePipe, typeof i17.FormatFilterTypePipe, typeof i18.ResizeColumnDirective, typeof i19.InFilterComponent, typeof i20.InitializationComponent, typeof i21.InListFilterComponent, typeof i22.SortMenuComponent, typeof i23.FilterChipsComponent], [typeof
|
|
40
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TableBuilderModule, [typeof i1.ColumnTotalPipe, typeof i2.TableContainerComponent, typeof i3.GenericTableComponent, typeof i4.PaginatorComponent, typeof i5.CustomCellDirective, typeof i6.GenColDisplayerComponent, typeof i7.GenFilterDisplayerComponent, typeof i8.DateFilterComponent, typeof i9.FilterComponent, typeof i10.MultiSortDirective, typeof i11.NumberFilterComponent, typeof i12.ColumnBuilderComponent, typeof i13.ArrayColumnComponent, typeof i14.HeaderMenuComponent, typeof i15.KeyDisplayPipe, typeof i16.FormatFilterValuePipe, typeof i17.FormatFilterTypePipe, typeof i18.ResizeColumnDirective, typeof i19.InFilterComponent, typeof i20.InitializationComponent, typeof i21.InListFilterComponent, typeof i22.SortMenuComponent, typeof i23.FilterChipsComponent, typeof i24.MatSlideToggleTbFilterDirective, typeof i24.MatRadioButtonTbFilterDirective, typeof i24.MatOptionTbFilterDirective, typeof i24.MatCheckboxTbFilterDirective, typeof i24.MatButtonToggleFilterDirective, typeof i24.TableFilterDirective, typeof i24.TableFilterStringContainsDirective], [typeof i25.CommonModule, typeof i26.MaterialModule, typeof i27.StoreFeatureModule, typeof i28.EffectsFeatureModule, typeof i29.FormsModule, typeof i30.RouterModule, typeof i31.ReactiveComponentModule, typeof i32.DragDropModule, typeof i33.UtilitiesModule], [typeof i3.GenericTableComponent, typeof i4.PaginatorComponent, typeof i2.TableContainerComponent, typeof i5.CustomCellDirective, typeof i6.GenColDisplayerComponent, typeof i7.GenFilterDisplayerComponent, typeof i9.FilterComponent, typeof i10.MultiSortDirective, typeof i18.ResizeColumnDirective, typeof i24.MatSlideToggleTbFilterDirective, typeof i24.MatRadioButtonTbFilterDirective, typeof i24.MatOptionTbFilterDirective, typeof i24.MatCheckboxTbFilterDirective, typeof i24.MatButtonToggleFilterDirective, typeof i24.TableFilterDirective, typeof i24.TableFilterStringContainsDirective]>;
|
|
40
41
|
static ɵinj: i0.ɵɵInjectorDeclaration<TableBuilderModule>;
|
|
41
42
|
}
|