@one-paragon/angular-utilities 1.1.4 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +4 -4
- package/esm2022/action-state/ngrx-ext/ngrx-ext.module.mjs +4 -4
- package/esm2022/http-request-state/HttpRequestStateFactory.mjs +3 -3
- package/esm2022/http-request-state/HttpRequestStateStore.mjs +3 -3
- package/esm2022/http-request-state/directives/HttpStateDirectiveBase.mjs +3 -3
- package/esm2022/http-request-state/directives/http-error-state-directive.mjs +3 -3
- package/esm2022/http-request-state/directives/http-inProgress-state-directive.mjs +3 -3
- package/esm2022/http-request-state/directives/http-notStarted-state-directive.mjs +3 -3
- package/esm2022/http-request-state/directives/http-success-state-directive.mjs +3 -3
- package/esm2022/http-request-state/directives/request-state-directive.mjs +3 -3
- package/esm2022/http-request-state/http-state-module.mjs +4 -4
- package/esm2022/rxjs/subscriber.directive.mjs +14 -12
- package/esm2022/table-builder/classes/TableBuilderDataSource.mjs +19 -28
- package/esm2022/table-builder/classes/TableState.mjs +8 -5
- package/esm2022/table-builder/classes/table-builder-general-settings.mjs +24 -3
- package/esm2022/table-builder/classes/table-builder.mjs +42 -9
- package/esm2022/table-builder/classes/table-store.mjs +18 -17
- package/esm2022/table-builder/components/array-column.component.mjs +6 -6
- package/esm2022/table-builder/components/column-builder/column-builder.component.mjs +3 -3
- 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 +3 -3
- package/esm2022/table-builder/components/gen-col-displayer/gen-col-displayer.component.mjs +4 -4
- package/esm2022/table-builder/components/generic-table/generic-table.component.mjs +26 -6
- package/esm2022/table-builder/components/generic-table/paginator.component.mjs +39 -25
- package/esm2022/table-builder/components/group-by-list/group-by-list.component.mjs +3 -3
- package/esm2022/table-builder/components/header-menu/header-menu.component.mjs +4 -4
- package/esm2022/table-builder/components/in-filter/in-filter.component.mjs +3 -3
- package/esm2022/table-builder/components/initialization-component/initialization-component.mjs +3 -3
- package/esm2022/table-builder/components/link-column.component.mjs +6 -6
- package/esm2022/table-builder/components/number-filter/number-filter.component.mjs +3 -3
- package/esm2022/table-builder/components/profiles-menu/profiles-menu.component.mjs +66 -0
- package/esm2022/table-builder/components/scroll-strategy.mjs +8 -3
- package/esm2022/table-builder/components/sort-menu/sort-menu.component-store.mjs +6 -5
- package/esm2022/table-builder/components/sort-menu/sort-menu.component.mjs +4 -4
- package/esm2022/table-builder/components/table-container/table-container-imports.mjs +5 -5
- package/esm2022/table-builder/components/table-container/table-container.mjs +24 -42
- package/esm2022/table-builder/components/table-container/virtual-scroll-container.mjs +68 -52
- package/esm2022/table-builder/components/table-container-filter/filter-list/filter-list.component.mjs +3 -3
- package/esm2022/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.mjs +3 -3
- package/esm2022/table-builder/components/table-container-filter/table-wrapper-filter-store.mjs +3 -3
- package/esm2022/table-builder/directives/custom-cell-directive.mjs +3 -3
- package/esm2022/table-builder/directives/multi-sort.directive.mjs +3 -3
- package/esm2022/table-builder/directives/resize-column.directive.mjs +3 -3
- package/esm2022/table-builder/directives/table-wrapper.directive.mjs +3 -3
- package/esm2022/table-builder/directives/tb-filter.directive.mjs +30 -30
- package/esm2022/table-builder/ngrx/tableBuilderStateStore.mjs +105 -66
- package/esm2022/table-builder/pipes/column-total.pipe.mjs +3 -3
- package/esm2022/table-builder/pipes/format-filter-type.pipe.mjs +3 -3
- package/esm2022/table-builder/pipes/format-filter-value.pipe.mjs +3 -3
- package/esm2022/table-builder/pipes/key-display.mjs +3 -3
- package/esm2022/table-builder/services/export-to-csv.service.mjs +3 -3
- package/esm2022/table-builder/services/table-template-service.mjs +3 -3
- package/esm2022/table-builder/services/transform-creator.mjs +3 -3
- package/esm2022/table-builder/table-builder.module.mjs +4 -4
- package/esm2022/utilities/directives/auto-focus.directive.mjs +3 -3
- package/esm2022/utilities/directives/clickEmitterDirective.mjs +3 -3
- package/esm2022/utilities/directives/clickSubject.mjs +3 -3
- package/esm2022/utilities/directives/conditional-classes.directive.mjs +3 -3
- package/esm2022/utilities/directives/dialog-service.mjs +3 -3
- package/esm2022/utilities/directives/dialog.mjs +28 -21
- package/esm2022/utilities/directives/mat-toggle-group-directive.mjs +3 -3
- package/esm2022/utilities/directives/prevent-enter.directive.mjs +3 -3
- package/esm2022/utilities/directives/stop-propagation.directive.mjs +3 -3
- package/esm2022/utilities/directives/styler.mjs +3 -3
- package/esm2022/utilities/directives/trim-whitespace.directive.mjs +3 -3
- package/esm2022/utilities/module.mjs +4 -4
- package/esm2022/utilities/pipes/function.pipe.mjs +4 -4
- package/esm2022/utilities/pipes/phone.pipe.mjs +3 -3
- package/esm2022/utilities/pipes/space-case.pipes.mjs +3 -3
- package/fesm2022/one-paragon-angular-utilities.mjs +660 -479
- package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -1
- package/package.json +4 -4
- package/rxjs/subscriber.directive.d.ts +1 -0
- package/table-builder/classes/TableBuilderDataSource.d.ts +1 -0
- package/table-builder/classes/TableState.d.ts +5 -2
- package/table-builder/classes/table-builder-general-settings.d.ts +21 -4
- package/table-builder/classes/table-builder.d.ts +8 -2
- package/table-builder/classes/table-store.d.ts +3 -0
- package/table-builder/components/generic-table/generic-table.component.d.ts +4 -0
- package/table-builder/components/generic-table/paginator.component.d.ts +5 -1
- package/table-builder/components/profiles-menu/profiles-menu.component.d.ts +32 -0
- package/table-builder/components/scroll-strategy.d.ts +3 -1
- package/table-builder/components/table-container/table-container-imports.d.ts +3 -3
- package/table-builder/components/table-container/table-container.d.ts +6 -9
- package/table-builder/components/table-container/virtual-scroll-container.d.ts +8 -4
- package/table-builder/ngrx/tableBuilderStateStore.d.ts +42 -34
- package/utilities/directives/dialog.d.ts +8 -7
- package/utilities/pipes/function.pipe.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@one-paragon/angular-utilities",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "18.
|
|
6
|
-
"@angular/core": "18.
|
|
7
|
-
"@angular/material": "18.
|
|
5
|
+
"@angular/common": "18.1.2",
|
|
6
|
+
"@angular/core": "18.1.2",
|
|
7
|
+
"@angular/material": "18.1.2",
|
|
8
8
|
"@ngrx/component": "18.0.1",
|
|
9
9
|
"@ngrx/component-store": "18.0.1",
|
|
10
10
|
"@ngrx/effects": "18.0.1",
|
|
@@ -9,5 +9,6 @@ export declare class Subscriber implements OnDestroy {
|
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<Subscriber, never>;
|
|
10
10
|
static ɵdir: i0.ɵɵDirectiveDeclaration<Subscriber, never, never, {}, {}, never, never, false, never>;
|
|
11
11
|
}
|
|
12
|
+
export declare function subscriber(injector: Injector): Subscriber;
|
|
12
13
|
export declare function subscriber(subscription?: Subscription, injector?: Injector): Subscriber;
|
|
13
14
|
export declare function subscriber<T = any>(obs: Observable<T>, action: (t: T) => any, injector?: Injector): Subscriber;
|
|
@@ -8,6 +8,7 @@ export declare class TableBuilderDataSource<T> extends MatTableDataSource<T> {
|
|
|
8
8
|
subscription?: Subscription;
|
|
9
9
|
viewableData$: Observable<T[]>;
|
|
10
10
|
constructor(dataSrc: Observable<T[]>, state: TableStore);
|
|
11
|
+
dataToShow$: Observable<T[]>;
|
|
11
12
|
connect(): import("rxjs").BehaviorSubject<T[]>;
|
|
12
13
|
disconnect(): void;
|
|
13
14
|
}
|
|
@@ -37,11 +37,14 @@ export interface TableState extends Required<PersistedTableState> {
|
|
|
37
37
|
pageSize: number;
|
|
38
38
|
currentPage: number;
|
|
39
39
|
virtualScrollOffset: number;
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
virtualEnds: {
|
|
41
|
+
start: number;
|
|
42
|
+
end: number;
|
|
43
|
+
};
|
|
42
44
|
dataLen: number;
|
|
43
45
|
linkMaps: Dictionary<LinkInfo>;
|
|
44
46
|
props: TableProps;
|
|
47
|
+
showAll: boolean;
|
|
45
48
|
}
|
|
46
49
|
export declare const keysToDelete: string[];
|
|
47
50
|
export declare enum InitializationState {
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { Injector } from "@angular/core";
|
|
1
2
|
export declare class GeneralTableSettings {
|
|
2
3
|
constructor(settings?: TableBuilderSettings);
|
|
3
4
|
headerSettings: TableWrapperHeaderSettings;
|
|
4
5
|
footerSettings: TableWrapperFooterSettings;
|
|
5
6
|
columnHeaderSettings: TableColumnHeaderSettings;
|
|
6
7
|
tableSettings: TableSettings;
|
|
8
|
+
injector?: Injector;
|
|
7
9
|
}
|
|
8
10
|
export interface TableBuilderSettings {
|
|
9
11
|
headerSettings?: Partial<TableWrapperHeaderSettings>;
|
|
10
12
|
footerSettings?: Partial<TableWrapperFooterSettings>;
|
|
11
13
|
columnHeaderSettings?: Partial<TableColumnHeaderSettings>;
|
|
12
14
|
tableSettings?: Partial<TableSettings>;
|
|
15
|
+
injector?: Injector;
|
|
13
16
|
}
|
|
14
17
|
export declare class TableWrapperHeaderSettings {
|
|
15
18
|
hideExport: boolean;
|
|
@@ -19,6 +22,7 @@ export declare class TableWrapperHeaderSettings {
|
|
|
19
22
|
hideSort: boolean;
|
|
20
23
|
collapse: boolean;
|
|
21
24
|
showTitleWhenCollapsed: boolean;
|
|
25
|
+
headerHeight: string | number | undefined;
|
|
22
26
|
}
|
|
23
27
|
export declare class TableWrapperFooterSettings {
|
|
24
28
|
collapse: boolean;
|
|
@@ -29,7 +33,9 @@ export declare class TableColumnHeaderSettings {
|
|
|
29
33
|
}
|
|
30
34
|
export declare class TableSettings {
|
|
31
35
|
usePaginator: boolean;
|
|
32
|
-
useVirtualScroll: true | VirtualScrollOptions | null;
|
|
36
|
+
useVirtualScroll: true | Partial<VirtualScrollOptions> | null;
|
|
37
|
+
includeAllInPaginatorOptions: boolean;
|
|
38
|
+
rowHeight: string | number | undefined;
|
|
33
39
|
}
|
|
34
40
|
export declare class PersistedTableSettings {
|
|
35
41
|
constructor(tableSettings?: GeneralTableSettings | PersistedTableSettings);
|
|
@@ -47,9 +53,20 @@ export declare class NotPersistedTableSettings {
|
|
|
47
53
|
hideColumnHeaderFilters: boolean;
|
|
48
54
|
hideColumnHeader: boolean;
|
|
49
55
|
usePaginator: boolean;
|
|
50
|
-
useVirtualScroll: true | VirtualScrollOptions | null;
|
|
56
|
+
useVirtualScroll: true | Partial<VirtualScrollOptions> | null;
|
|
57
|
+
includeAllInPaginatorOptions: boolean;
|
|
58
|
+
rowHeight?: string | number | undefined;
|
|
59
|
+
headerHeight?: string | number;
|
|
51
60
|
}
|
|
52
61
|
export declare class VirtualScrollOptions {
|
|
53
|
-
|
|
54
|
-
|
|
62
|
+
virtualAsDefault: boolean;
|
|
63
|
+
rowHeight: number;
|
|
64
|
+
enforceRowHeight: boolean;
|
|
65
|
+
headerHeight: number;
|
|
66
|
+
enforceHeaderHeight: boolean;
|
|
67
|
+
amountOfVisibleItems: number;
|
|
68
|
+
/**
|
|
69
|
+
* This will win over `amountOfVisibleItems`
|
|
70
|
+
*/
|
|
71
|
+
maxViewPortHeight: number | undefined;
|
|
55
72
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { MetaData, ReportDef } from '../interfaces/report-def';
|
|
3
3
|
import { GeneralTableSettings, TableBuilderSettings } from './table-builder-general-settings';
|
|
4
|
+
import { Signal } from '@angular/core';
|
|
4
5
|
export declare class TableBuilder<T = any> {
|
|
5
|
-
private data$;
|
|
6
6
|
metaData$: Observable<MetaData<T>[]>;
|
|
7
|
-
|
|
7
|
+
data$: Observable<T[]>;
|
|
8
8
|
settings: Observable<GeneralTableSettings>;
|
|
9
|
+
constructor(data: TableBuilderArgs<T[]>, metaData?: TableBuilderArgs<MetaData<T, any>[]>, settings?: TableBuilderArgs<TableBuilderSettings>);
|
|
9
10
|
getData$(): Observable<any[]>;
|
|
10
11
|
createMetaData(obj: any): MetaData[];
|
|
12
|
+
coerceToObservable<T>(arg: TableBuilderArgs<T>, settings: Observable<TableBuilderSettings>): Observable<T>;
|
|
13
|
+
coerceSettingsToObservable(settings: TableBuilderArgs<TableBuilderSettings>): Observable<TableBuilderSettings>;
|
|
14
|
+
assertInjector(s: TableBuilderSettings): void;
|
|
11
15
|
}
|
|
12
16
|
export declare const CreateTableBuilder: (reportDef$: Observable<ReportDef>) => TableBuilder;
|
|
17
|
+
type TableBuilderArgs<T> = T | Observable<T> | Signal<T>;
|
|
18
|
+
export {};
|
|
@@ -14,6 +14,8 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
14
14
|
constructor(config: TableBuilderConfig);
|
|
15
15
|
selectStateReady: Observable<InitializationState>;
|
|
16
16
|
getSavableState(): Observable<PersistedTableState>;
|
|
17
|
+
getSavableStateSignal: import("@angular/core").Signal<PersistedTableState>;
|
|
18
|
+
private mapSaveableState;
|
|
17
19
|
on: <V>(srcObservable: Observable<V>, func: (obj: V) => void) => this;
|
|
18
20
|
onLast(callback: (state: TableState) => void): void;
|
|
19
21
|
readonly metaData$: Observable<Dictionary<MetaData>>;
|
|
@@ -134,6 +136,7 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
134
136
|
setLinkMaps: (() => void) | ((observableOrValue: any) => import("rxjs").Subscription);
|
|
135
137
|
getLinkInfo: (md: MetaData) => import("@angular/core").Signal<import("../services/link-creator.service").LinkInfo>;
|
|
136
138
|
getIsExpanded: (columnKey: string, groupHeaderKey: string) => Observable<boolean>;
|
|
139
|
+
$isVirtual: import("@angular/core").Signal<boolean>;
|
|
137
140
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableStore, never>;
|
|
138
141
|
static ɵprov: i0.ɵɵInjectableDeclaration<TableStore>;
|
|
139
142
|
}
|
|
@@ -14,7 +14,9 @@ export declare class GenericTableComponent implements OnInit {
|
|
|
14
14
|
private viewContainer;
|
|
15
15
|
private transformCreator;
|
|
16
16
|
drop(event: CdkDragDrop<string[]>): void;
|
|
17
|
+
_trackBy?: string;
|
|
17
18
|
set trackBy(trackBy: string);
|
|
19
|
+
get trackBy(): string | undefined;
|
|
18
20
|
displayData$: Observable<any[]>;
|
|
19
21
|
data$: Observable<any[]>;
|
|
20
22
|
rows: QueryList<MatRowDef<any>>;
|
|
@@ -58,6 +60,8 @@ export declare class GenericTableComponent implements OnInit {
|
|
|
58
60
|
}>;
|
|
59
61
|
showFooterRow$: Observable<'regular-footer' | 'no-footer' | 'small-footer'>;
|
|
60
62
|
getTransform: (key: string, val: string) => any;
|
|
63
|
+
$rowHeight: import("@angular/core").Signal<string | undefined>;
|
|
64
|
+
$headerHeight: import("@angular/core").Signal<string | undefined>;
|
|
61
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<GenericTableComponent, never>;
|
|
62
66
|
static ɵcmp: i0.ɵɵComponentDeclaration<GenericTableComponent, "tb-generic-table", never, { "trackBy": { "alias": "trackBy"; "required": false; }; "displayData$": { "alias": "displayData$"; "required": false; }; "data$": { "alias": "data$"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "columnBuilders": { "alias": "columnBuilders"; "required": false; }; "columnInfos": { "alias": "columnInfos"; "required": false; }; }, { "selection$": "selection$"; }, never, never, true, never>;
|
|
63
67
|
}
|
|
@@ -7,7 +7,7 @@ export declare class PaginatorComponent implements OnInit, AfterViewInit {
|
|
|
7
7
|
private state;
|
|
8
8
|
paginator: MatPaginator;
|
|
9
9
|
currentPageData$: Observable<CurrentPageDetails>;
|
|
10
|
-
collapseFooter
|
|
10
|
+
$collapseFooter: import("@angular/core").Signal<boolean>;
|
|
11
11
|
data$: Observable<any[]>;
|
|
12
12
|
tableElRef: ElementRef;
|
|
13
13
|
constructor(state: TableStore);
|
|
@@ -15,6 +15,10 @@ export declare class PaginatorComponent implements OnInit, AfterViewInit {
|
|
|
15
15
|
ngAfterViewInit(): void;
|
|
16
16
|
paginatorChange(): void;
|
|
17
17
|
ourPageEvent: boolean;
|
|
18
|
+
$showAllOption: import("@angular/core").Signal<boolean>;
|
|
19
|
+
$showAll: import("@angular/core").Signal<boolean>;
|
|
20
|
+
updatePaginator: () => void;
|
|
21
|
+
showAll(): void;
|
|
18
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaginatorComponent, never>;
|
|
19
23
|
static ɵcmp: i0.ɵɵComponentDeclaration<PaginatorComponent, "tb-paginator", never, { "data$": { "alias": "data$"; "required": false; }; "tableElRef": { "alias": "tableElRef"; "required": true; }; }, {}, never, never, true, never>;
|
|
20
24
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TableBuilderStateStore } from '../../ngrx/tableBuilderStateStore';
|
|
2
|
+
import { MatMenuTrigger } from '@angular/material/menu';
|
|
3
|
+
import { TableStore } from '../../classes/table-store';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ProfilesMenuComponent {
|
|
7
|
+
stateService: TableBuilderStateStore;
|
|
8
|
+
tableStore: TableStore;
|
|
9
|
+
$tableId: import("@angular/core").InputSignal<string>;
|
|
10
|
+
onSaveState: import("@angular/core").OutputEmitterRef<null>;
|
|
11
|
+
trigger: import("@angular/core").Signal<MatMenuTrigger | undefined>;
|
|
12
|
+
allProfilesPanelOpened: import("@angular/core").WritableSignal<boolean>;
|
|
13
|
+
newProfilePanelOpened: import("@angular/core").WritableSignal<boolean>;
|
|
14
|
+
$currentProfile: import("@angular/core").Signal<string | undefined>;
|
|
15
|
+
$defaultProfile: import("@angular/core").Signal<string | undefined>;
|
|
16
|
+
$keys: import("@angular/core").Signal<string[]>;
|
|
17
|
+
saveState(key: string): void;
|
|
18
|
+
addState(key: string, asDefault: boolean): void;
|
|
19
|
+
setDefault(key: string): void;
|
|
20
|
+
unsetDefault(): void;
|
|
21
|
+
defaultName: string;
|
|
22
|
+
position$: Subject<{
|
|
23
|
+
top: string;
|
|
24
|
+
right: string;
|
|
25
|
+
} | undefined>;
|
|
26
|
+
setPosition: (e: HTMLElement) => {
|
|
27
|
+
right: string;
|
|
28
|
+
top: string;
|
|
29
|
+
} | undefined;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProfilesMenuComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ProfilesMenuComponent, "tb-profiles-menu", never, { "$tableId": { "alias": "$tableId"; "required": true; "isSignal": true; }; }, { "onSaveState": "onSaveState"; }, never, never, true, never>;
|
|
32
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CdkVirtualScrollViewport, VirtualScrollStrategy } from '@angular/cdk/scrolling';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
3
|
export declare class TableVirtualScrollStrategy implements VirtualScrollStrategy {
|
|
4
4
|
private itemHeight;
|
|
5
5
|
private headerOffset;
|
|
@@ -9,6 +9,8 @@ export declare class TableVirtualScrollStrategy implements VirtualScrollStrategy
|
|
|
9
9
|
private viewport?;
|
|
10
10
|
constructor(itemHeight: number, headerOffset: number);
|
|
11
11
|
attach(viewport: CdkVirtualScrollViewport): void;
|
|
12
|
+
contentScrolled$: Subject<void>;
|
|
13
|
+
sub: import("../../rxjs").Subscriber;
|
|
12
14
|
onContentScrolled(): void;
|
|
13
15
|
onDataLengthChanged(): void;
|
|
14
16
|
setDataLength(length: number): void;
|
|
@@ -3,12 +3,12 @@ import { LetDirective } from "@ngrx/component";
|
|
|
3
3
|
import { MultiSortDirective } from "../../directives";
|
|
4
4
|
import { GroupByListComponent } from "../group-by-list/group-by-list.component";
|
|
5
5
|
import { FilterChipsComponent } from "../table-container-filter/filter-list/filter-list.component";
|
|
6
|
-
import {
|
|
6
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
7
7
|
import { GenericTableComponent } from "../generic-table/generic-table.component";
|
|
8
8
|
import { GenFilterDisplayerComponent } from "../table-container-filter/gen-filter-displayer/gen-filter-displayer.component";
|
|
9
9
|
import { GenColDisplayerComponent } from "../gen-col-displayer/gen-col-displayer.component";
|
|
10
10
|
import { SortMenuComponent } from "../sort-menu/sort-menu.component";
|
|
11
|
-
import {
|
|
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
|
|
14
|
+
export declare const containerImports: (typeof AsyncPipe | typeof NgTemplateOutlet | typeof MatButtonModule | typeof MultiSortDirective | typeof StopPropagationDirective | typeof GenColDisplayerComponent | typeof GenFilterDisplayerComponent | typeof LetDirective | typeof FilterChipsComponent | typeof GenericTableComponent | typeof GroupByListComponent | typeof SortMenuComponent | typeof PaginatorComponent | typeof VirtualScrollContainer)[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, QueryList, Predicate, TemplateRef, ElementRef } from '@angular/core';
|
|
1
|
+
import { EventEmitter, QueryList, Predicate, TemplateRef, ElementRef, OnInit, OnDestroy, Injector } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject, Observable, ReplaySubject } from 'rxjs';
|
|
3
3
|
import { MetaData } from '../../interfaces/report-def';
|
|
4
4
|
import { TableBuilder } from '../../classes/table-builder';
|
|
@@ -14,7 +14,7 @@ import { TableProps } from './tableProps';
|
|
|
14
14
|
import { PaginatorComponent } from '../generic-table/paginator.component';
|
|
15
15
|
import { GenericTableComponent } from '../generic-table/generic-table.component';
|
|
16
16
|
import * as i0 from "@angular/core";
|
|
17
|
-
export declare class TableContainerComponent<T = any> {
|
|
17
|
+
export declare class TableContainerComponent<T = any> implements OnInit, OnDestroy {
|
|
18
18
|
paginatorComponent?: PaginatorComponent;
|
|
19
19
|
genericTable?: GenericTableComponent;
|
|
20
20
|
props: TableProps;
|
|
@@ -46,13 +46,12 @@ export declare class TableContainerComponent<T = any> {
|
|
|
46
46
|
state$: Observable<import("../../classes/TableState").PersistedTableState>;
|
|
47
47
|
collapseFooter$: Observable<boolean>;
|
|
48
48
|
myColumns$: Observable<ColumnInfo[]>;
|
|
49
|
-
stateKeys$?: Observable<string[] | null>;
|
|
50
|
-
currentStateKey$?: Observable<string>;
|
|
51
49
|
config: import("../../classes/TableBuilderConfig").TableBuilderConfig;
|
|
52
50
|
exportToCsvService: ExportToCsvService<T>;
|
|
53
51
|
wrapper: TableWrapperDirective | null;
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
stateService: TableBuilderStateStore;
|
|
53
|
+
injector: Injector;
|
|
54
|
+
ngOnDestroy(): void;
|
|
56
55
|
firstPage(): void;
|
|
57
56
|
lastPage(): void;
|
|
58
57
|
resetState(): void;
|
|
@@ -61,9 +60,6 @@ export declare class TableContainerComponent<T = any> {
|
|
|
61
60
|
initializeData(): void;
|
|
62
61
|
ngOnInit(): void;
|
|
63
62
|
exportToCsv(): void;
|
|
64
|
-
saveState(): void;
|
|
65
|
-
setProfileState(val: string): void;
|
|
66
|
-
deleteProfileState(stateKey: string): void;
|
|
67
63
|
expandAllGroups: () => void;
|
|
68
64
|
collapseAllGroups: () => void;
|
|
69
65
|
ngAfterContentInit(): void;
|
|
@@ -71,6 +67,7 @@ export declare class TableContainerComponent<T = any> {
|
|
|
71
67
|
mapMetaDatas: (meta: MetaData<T>) => MetaData<T>;
|
|
72
68
|
collapseHeader$: Observable<boolean>;
|
|
73
69
|
addFilterDirectives: (state: TableState) => void;
|
|
70
|
+
$useVirtual: import("@angular/core").Signal<boolean>;
|
|
74
71
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableContainerComponent<any>, never>;
|
|
75
72
|
static ɵcmp: i0.ɵɵComponentDeclaration<TableContainerComponent<any>, "tb-table-container", never, { "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; }; "tableId": { "alias": "tableId"; "required": false; }; "tableBuilder": { "alias": "tableBuilder"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "inputFilters": { "alias": "inputFilters"; "required": false; }; }, { "selection$": "selection$"; "data": "data"; "onStateReset": "onStateReset"; "onSaveState": "onSaveState"; "state$": "state$"; }, ["tableElRef", "customFilterDirectives", "filterDirectives", "customRows", "customCells"], ["[before]", ".tb-header-title"], true, never>;
|
|
76
73
|
}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy
|
|
1
|
+
import { ElementRef, OnDestroy } from '@angular/core';
|
|
2
2
|
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
3
3
|
import { TableStore } from '../../classes/table-store';
|
|
4
4
|
import { TableVirtualScrollStrategy } from '../scroll-strategy';
|
|
5
5
|
import { VirtualScrollOptions } from '../../classes/table-builder-general-settings';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class VirtualScrollContainer implements
|
|
7
|
+
export declare class VirtualScrollContainer implements OnDestroy {
|
|
8
8
|
private state;
|
|
9
|
+
viewport: import("@angular/core").Signal<CdkVirtualScrollViewport | undefined>;
|
|
9
10
|
constructor(state: TableStore);
|
|
10
|
-
viewport: CdkVirtualScrollViewport;
|
|
11
11
|
defaultOptions: VirtualScrollOptions;
|
|
12
12
|
scrollStrategy: TableVirtualScrollStrategy;
|
|
13
|
-
|
|
13
|
+
dataLength$: import("rxjs").Observable<number>;
|
|
14
|
+
subscriber: import("../../../rxjs").Subscriber;
|
|
15
|
+
_: import("@angular/core").EffectRef;
|
|
14
16
|
ngOnDestroy(): void;
|
|
15
17
|
setSize(el: ElementRef<HTMLElement>): void;
|
|
16
18
|
resizeHandler: () => void;
|
|
19
|
+
computedRowHeight(): number;
|
|
20
|
+
computedHeaderHeight(): number;
|
|
17
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<VirtualScrollContainer, never>;
|
|
18
22
|
static ɵcmp: i0.ɵɵComponentDeclaration<VirtualScrollContainer, "tb-virtual-scroll-container", never, {}, {}, never, ["*"], true, never>;
|
|
19
23
|
}
|
|
@@ -1,62 +1,70 @@
|
|
|
1
1
|
import { ComponentStore } from "@ngrx/component-store";
|
|
2
|
+
import { Signal } from "@angular/core";
|
|
2
3
|
import { Observable } from "rxjs";
|
|
3
4
|
import { Dictionary } from "../interfaces/dictionary";
|
|
5
|
+
import { PersistedTableState } from "../classes/TableState";
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
export declare class TableBuilderStateStore extends ComponentStore<GlobalStorageState> {
|
|
6
8
|
constructor();
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
selectLocalProfileCurrentKey: (key: string) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
$selectLocalTableProfile: (profileKey: string) => Signal<Profile | undefined>;
|
|
10
|
+
$selectLocalTableStateForView: (tableId: string) => Signal<PersistedTableState | null>;
|
|
11
|
+
$selectLocalProfileCurrentKey: (key: string) => Signal<string | undefined>;
|
|
12
|
+
$selectLocalProfileDefaultKey: (key: string) => Signal<string | undefined>;
|
|
13
|
+
$selectLocalProfileKeys: (tableId: string) => Signal<string[]>;
|
|
14
|
+
saveTableSettingsToLocalAndStorage: (tableId: string, stateName: string, tableState: PersistedTableState, asDefault?: boolean) => void;
|
|
15
|
+
saveTableStateToLocal: (observableOrValue: {
|
|
16
|
+
tableId: string;
|
|
17
|
+
tableState: PersistedTableState;
|
|
18
|
+
stateName?: string | undefined;
|
|
19
|
+
asDefault?: boolean | undefined;
|
|
14
20
|
} | Observable<{
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
tableId: string;
|
|
22
|
+
tableState: PersistedTableState;
|
|
23
|
+
stateName?: string | undefined;
|
|
24
|
+
asDefault?: boolean | undefined;
|
|
17
25
|
}>) => import("rxjs").Subscription;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
saveTableStateToStorage: (tableId: string, stateName: string, tableState: PersistedTableState, asDefault?: boolean) => void;
|
|
27
|
+
addNewStateToLocalAndStorage: (tableId: string, newStateName: string, tableState: PersistedTableState, asDefault?: boolean) => void;
|
|
28
|
+
setLocalCurrentState: (observableOrValue: {
|
|
29
|
+
tableId: string;
|
|
30
|
+
currentStateKey: string;
|
|
21
31
|
} | Observable<{
|
|
22
|
-
|
|
23
|
-
|
|
32
|
+
tableId: string;
|
|
33
|
+
currentStateKey: string;
|
|
24
34
|
}>) => import("rxjs").Subscription;
|
|
25
|
-
|
|
35
|
+
setDefaultInLocalAndStorage: (tableId: string, newDefault: string) => void;
|
|
36
|
+
setDefaultInLocal: (observableOrValue: {
|
|
26
37
|
key: string;
|
|
27
|
-
|
|
38
|
+
default: string;
|
|
28
39
|
} | Observable<{
|
|
29
40
|
key: string;
|
|
30
|
-
|
|
41
|
+
default: string;
|
|
31
42
|
}>) => import("rxjs").Subscription;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
key: string;
|
|
38
|
-
value: any;
|
|
39
|
-
persist?: boolean | undefined;
|
|
40
|
-
}>) => import("rxjs").Subscription;
|
|
41
|
-
deleteLocalProfile: (observableOrValue: {
|
|
43
|
+
unsetDefaultFromLocalAndStorage: (tableId: string) => void;
|
|
44
|
+
unsetDefaultFromLocal: (tableId: string) => void;
|
|
45
|
+
unsetDefaultFromStorage: (tableId: string) => void;
|
|
46
|
+
setDefaultInStorage: (tableId: string, stateName: string) => void;
|
|
47
|
+
deleteLocalProfilesState: (observableOrValue: {
|
|
42
48
|
key: string;
|
|
43
49
|
stateKey: string;
|
|
44
50
|
} | Observable<{
|
|
45
51
|
key: string;
|
|
46
52
|
stateKey: string;
|
|
47
53
|
}>) => import("rxjs").Subscription;
|
|
54
|
+
deleteProfileFromLocalAndStorage: (key: string, stateKey: string) => void;
|
|
48
55
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableBuilderStateStore, never>;
|
|
49
56
|
static ɵprov: i0.ɵɵInjectableDeclaration<TableBuilderStateStore>;
|
|
50
57
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
interface PersistedProfile {
|
|
59
|
+
states: Dictionary<PersistedTableState>;
|
|
60
|
+
default?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface Profile extends PersistedProfile {
|
|
63
|
+
current?: string;
|
|
64
|
+
localSavedState?: PersistedTableState;
|
|
55
65
|
}
|
|
56
66
|
export interface GlobalStorageState {
|
|
57
|
-
globalProfileKeys: string[];
|
|
58
|
-
currentGlobalProfile: string;
|
|
59
|
-
globalProfiles: Dictionary<Profile>;
|
|
60
67
|
localProfiles: Dictionary<Profile>;
|
|
61
68
|
}
|
|
62
69
|
export declare const defaultStorageState: GlobalStorageState;
|
|
70
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TemplateRef,
|
|
1
|
+
import { TemplateRef, EventEmitter, ViewContainerRef, Injector, Signal } from '@angular/core';
|
|
2
2
|
import { MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material/dialog';
|
|
3
|
-
import { Observable,
|
|
3
|
+
import { Observable, Subject } from 'rxjs';
|
|
4
4
|
import { DialogService } from './dialog-service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
interface DialogViewContext<T> {
|
|
@@ -19,7 +19,7 @@ export declare class DialogWrapper<T = any> {
|
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<DialogWrapper<any>, never>;
|
|
20
20
|
static ɵcmp: i0.ɵɵComponentDeclaration<DialogWrapper<any>, "dialog-wrapper", never, {}, {}, never, never, true, never>;
|
|
21
21
|
}
|
|
22
|
-
export declare class DialogDirective<T>
|
|
22
|
+
export declare class DialogDirective<T> {
|
|
23
23
|
private templateRef;
|
|
24
24
|
private dialog;
|
|
25
25
|
private service;
|
|
@@ -28,19 +28,20 @@ export declare class DialogDirective<T> implements OnDestroy {
|
|
|
28
28
|
opDialogAddDialogClass: boolean;
|
|
29
29
|
set opDialogConfig(config: MatDialogConfig<T>);
|
|
30
30
|
get opDialogConfig(): MatDialogConfig<T>;
|
|
31
|
-
|
|
31
|
+
injector: Injector;
|
|
32
|
+
subscriber: import("../../rxjs").Subscriber;
|
|
33
|
+
set setControl(i: Observable<T> | Signal<T>);
|
|
32
34
|
nativeElement?: HTMLElement;
|
|
33
35
|
dialogRef?: MatDialogRef<any, boolean>;
|
|
34
|
-
subscription: Subscription;
|
|
35
36
|
componentWrapper?: DialogWrapper<T>;
|
|
36
37
|
constructor(templateRef: TemplateRef<DialogViewContext<T>>, dialog: MatDialog, service: DialogService);
|
|
37
38
|
_data: Subject<Observable<T>>;
|
|
38
39
|
close(): void;
|
|
39
40
|
initDialog(): void;
|
|
41
|
+
setDataAndState: (data: T) => void;
|
|
40
42
|
setDialogState(open: boolean): void;
|
|
41
|
-
ngOnDestroy(): void;
|
|
42
43
|
static ngTemplateContextGuard<T>(dir: DialogDirective<T>, ctx: any): ctx is DialogViewContext<Exclude<T, false | 0 | '' | null | undefined>>;
|
|
43
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<DialogDirective<any>, never>;
|
|
44
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogDirective<any>, "[opDialog]", never, { "opDialogAddDialogClass": { "alias": "opDialogAddDialogClass"; "required": false; }; "opDialogConfig": { "alias": "opDialogConfig"; "required": false; }; "
|
|
45
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogDirective<any>, "[opDialog]", never, { "opDialogAddDialogClass": { "alias": "opDialogAddDialogClass"; "required": false; }; "opDialogConfig": { "alias": "opDialogConfig"; "required": false; }; "setControl": { "alias": "opDialog"; "required": false; }; "nativeElement": { "alias": "opDialogOrigin"; "required": false; }; }, { "opDialogClosed": "opDialogClosed"; }, never, never, true, never>;
|
|
45
46
|
}
|
|
46
47
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class FunctionPipe implements PipeTransform {
|
|
4
|
-
transform<T>(func: ((...args:
|
|
4
|
+
transform<T, TParam extends any[]>(func: ((...args: [...TParam]) => T) | string, ...args: [...TParam]): T;
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<FunctionPipe, never>;
|
|
6
6
|
static ɵpipe: i0.ɵɵPipeDeclaration<FunctionPipe, "func", true>;
|
|
7
7
|
}
|