@one-paragon/angular-utilities 1.2.15-beta.6 → 1.2.16
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/http-request-state/HttpRequestStateStore.mjs +5 -19
- package/esm2022/ngrx/actionable-selector.mjs +16 -53
- package/esm2022/table-builder/classes/table-builder-general-settings.mjs +2 -2
- package/esm2022/table-builder/classes/table-store.mjs +1 -1
- package/esm2022/table-builder/components/column-builder/column-builder.component.mjs +1 -12
- package/esm2022/table-builder/components/generic-table/generic-table.component.mjs +41 -37
- package/esm2022/table-builder/components/profiles-menu/profiles-menu.component.mjs +3 -3
- package/esm2022/table-builder/components/table-container/table-container.mjs +25 -14
- package/fesm2022/one-paragon-angular-utilities.mjs +84 -133
- package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -1
- package/http-request-state/HttpRequestStateStore.d.ts +0 -4
- package/ngrx/actionable-selector.d.ts +2 -10
- package/package.json +1 -1
- package/table-builder/components/column-builder/column-builder.component.d.ts +0 -3
- package/table-builder/components/generic-table/generic-table.component.d.ts +10 -5
- package/table-builder/components/table-container/table-container-imports.d.ts +2 -2
- package/table-builder/components/table-container/table-container.d.ts +6 -6
- package/table-builder/directives/table-wrapper.directive.d.ts +1 -1
|
@@ -19,14 +19,10 @@ export declare class HttpRequestStateStore<TParam extends any[], V, R = null, T
|
|
|
19
19
|
private requestEffect;
|
|
20
20
|
private flattenedRequest;
|
|
21
21
|
private singleUseRequest;
|
|
22
|
-
$selectHttpState: Signal<HttpRequestState<T>>;
|
|
23
22
|
selectHttpState$: Observable<HttpRequestState<T>>;
|
|
24
|
-
$selectStatus: Signal<HttpRequestStatus>;
|
|
25
23
|
selectStatus$: Observable<HttpRequestStatus>;
|
|
26
24
|
selectError$: Observable<any>;
|
|
27
|
-
$selectError: Signal<any>;
|
|
28
25
|
selectResponse$: Observable<T>;
|
|
29
|
-
$selectResponse: Signal<T | undefined>;
|
|
30
26
|
selectSuccessOrError$: Observable<null>;
|
|
31
27
|
errorHandled: boolean;
|
|
32
28
|
onError(cb: (error: HttpErrorResponse) => void): this;
|
|
@@ -9,17 +9,9 @@ export declare function setUpStoreFactory(store: Store): () => Promise<unknown>;
|
|
|
9
9
|
* @param [dispatchIf = defaultFilter] Optional. A method that takes the result of the selector and returns a boolean. The actions gets dispatched
|
|
10
10
|
* if true is returned. If no method is passed in than the action will be dispatched if the selector returns undefined or null.
|
|
11
11
|
*/
|
|
12
|
-
export declare const createActionableSelector: <State, Result, Props
|
|
12
|
+
export declare const createActionableSelector: <State, Result, Props = any>(selectorFactory: (props?: Props) => MemoizedSelector<State, Result>, action: ActionReturner<Props | undefined>, dispatchIf?: (data: Result) => boolean) => (props?: Props) => ActionableMemoizedSelector<State, Result>;
|
|
13
13
|
type ActionableMemoizedSelector<State, Result> = MemoizedSelector<State, Result>;
|
|
14
|
-
export type ActionReturner<Props
|
|
14
|
+
export type ActionReturner<Props> = (props: Props) => Action;
|
|
15
15
|
export declare function defaultFilter(data: any): boolean;
|
|
16
16
|
export declare function provideActionableSelector(): import("@angular/core").EnvironmentProviders;
|
|
17
|
-
export declare function provideActionSelector(): import("@angular/core").EnvironmentProviders;
|
|
18
|
-
export declare const createActionSelector: <State, Result, Props extends any[] = any[]>(selectorFactory: (...props: Props) => MemoizedSelector<State, Result>, action: (...props: Props) => () => void, dispatchIf?: (data: Result) => boolean) => (...props: Props) => MemoizedSelector<State, Result | undefined, (s1: LoadingState<Result>) => Result | undefined>;
|
|
19
|
-
export declare const createActionableResultSelector: <State, Result, Props extends any[]>(selectorFactory: ((...props: Props) => MemoizedSelector<State, Result>), action: ActionReturner<Props>, dispatchIf?: (data: Result) => boolean) => (...props: Props) => ActionableMemoizedSelector<State, LoadingState<Result>>;
|
|
20
|
-
export declare const createActionResultSelector: <State, Result, Props extends any[] = any[]>(selectorFactory: (...props: Props) => MemoizedSelector<State, Result>, action: (...props: Props) => () => void, dispatchIf?: (data: Result) => boolean) => (...props: Props) => ActionableMemoizedSelector<State, LoadingState<Result>>;
|
|
21
|
-
interface LoadingState<T> {
|
|
22
|
-
loading: boolean;
|
|
23
|
-
result?: T;
|
|
24
|
-
}
|
|
25
17
|
export {};
|
package/package.json
CHANGED
|
@@ -36,10 +36,7 @@ export declare class ColumnBuilderComponent implements OnInit {
|
|
|
36
36
|
footer: Dictionary<string>;
|
|
37
37
|
}>;
|
|
38
38
|
ngOnInit(): void;
|
|
39
|
-
private viewInited;
|
|
40
39
|
ngAfterViewInit(): void;
|
|
41
|
-
private onViewInit;
|
|
42
|
-
whenViewInited: (callback: () => void) => void;
|
|
43
40
|
initialSetUp(): void;
|
|
44
41
|
furtherSetUp(): void;
|
|
45
42
|
cellClicked(element: any, key: string): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit, Injector, EventEmitter } from '@angular/core';
|
|
1
|
+
import { SimpleChanges, OnInit, QueryList, Injector, EventEmitter } from '@angular/core';
|
|
2
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';
|
|
@@ -26,22 +26,26 @@ export declare class GenericTableComponent implements OnInit {
|
|
|
26
26
|
$hasFooterMeta: import("@angular/core").Signal<boolean>;
|
|
27
27
|
$data: import("@angular/core").InputSignal<any[]>;
|
|
28
28
|
data$: Observable<any[]>;
|
|
29
|
-
|
|
29
|
+
rows: QueryList<MatRowDef<any>>;
|
|
30
30
|
$columnInfos: import("@angular/core").InputSignal<ColumnInfo[]>;
|
|
31
31
|
$hasCustomFooter: import("@angular/core").Signal<boolean>;
|
|
32
32
|
dropList: CdkDropList;
|
|
33
33
|
$footerRowStyle: import("@angular/core").Signal<"regular-footer" | "no-footer" | "small-footer">;
|
|
34
34
|
$showFooterRow: import("@angular/core").Signal<boolean>;
|
|
35
|
+
currentColumns: string[];
|
|
35
36
|
_injector: Injector;
|
|
36
37
|
injector: Injector;
|
|
38
|
+
rowDefArr: MatRowDef<any>[];
|
|
37
39
|
$hasSelectColumn: import("@angular/core").Signal<boolean>;
|
|
38
40
|
$hasIndexColumn: import("@angular/core").Signal<boolean>;
|
|
39
|
-
|
|
41
|
+
myColumns: import("@angular/core").WritableSignal<Dictionary<ColumnBuilderComponent>>;
|
|
40
42
|
$showHeader: import("@angular/core").Signal<boolean>;
|
|
41
43
|
offset$: Observable<number>;
|
|
44
|
+
dataView: Observable<any[]>;
|
|
42
45
|
constructor();
|
|
43
46
|
defaultTrackBy: (index: number, item: any) => any;
|
|
44
47
|
trackByFunction: (index: number, item: any) => any;
|
|
48
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
45
49
|
$keys: import("@angular/core").Signal<string[]>;
|
|
46
50
|
keys$: Observable<string[]>;
|
|
47
51
|
ngOnInit(): void;
|
|
@@ -52,7 +56,8 @@ export declare class GenericTableComponent implements OnInit {
|
|
|
52
56
|
isGroupHeader: boolean;
|
|
53
57
|
}): boolean;
|
|
54
58
|
setExpanded(key: string, groupKey: string, isExpanded: boolean): void;
|
|
55
|
-
|
|
59
|
+
addMetaData(column: ColumnInfo): void;
|
|
60
|
+
initializeRowDefs: (defs: MatRowDef<any>[]) => void;
|
|
56
61
|
selection: SelectionModel<any>;
|
|
57
62
|
selection$: EventEmitter<SelectionChange<any>>;
|
|
58
63
|
masterToggleChecked$: Observable<boolean>;
|
|
@@ -80,5 +85,5 @@ export declare class GenericTableComponent implements OnInit {
|
|
|
80
85
|
$footerHeight: import("@angular/core").Signal<string | undefined>;
|
|
81
86
|
$stickyFooter: import("@angular/core").Signal<boolean>;
|
|
82
87
|
static ɵfac: i0.ɵɵFactoryDeclaration<GenericTableComponent, never>;
|
|
83
|
-
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; }; "
|
|
88
|
+
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; }; "$columnInfos": { "alias": "columnInfos"; "required": true; "isSignal": true; }; }, { "selection$": "selection$"; }, never, never, true, never>;
|
|
84
89
|
}
|
|
@@ -3,7 +3,7 @@ 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 { MatTooltipModule } from "@angular/material/tooltip";
|
|
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";
|
|
@@ -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
|
|
14
|
+
export declare const containerImports: (typeof NgTemplateOutlet | typeof AsyncPipe | typeof MatTooltipModule | typeof LetDirective | typeof GenericTableComponent | typeof PaginatorComponent | typeof MultiSortDirective | typeof GroupByListComponent | typeof FilterChipsComponent | typeof GenFilterDisplayerComponent | typeof GenColDisplayerComponent | typeof SortMenuComponent | typeof StopPropagationDirective | typeof VirtualScrollContainer)[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, Predicate, TemplateRef, ElementRef, OnInit, OnDestroy, Injector } 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';
|
|
@@ -25,13 +25,12 @@ export declare class TableContainerComponent<T = any> implements OnInit, OnDestr
|
|
|
25
25
|
injector: Injector;
|
|
26
26
|
filterDirectives: import("@angular/core").Signal<readonly TableFilterDirective[]>;
|
|
27
27
|
customFilterDirectives: import("@angular/core").Signal<readonly TableCustomFilterDirective<any>[]>;
|
|
28
|
-
$allFilterDirectives: import("@angular/core").Signal<(TableCustomFilterDirective<any>
|
|
28
|
+
$allFilterDirectives: import("@angular/core").Signal<(TableFilterDirective | TableCustomFilterDirective<any>)[]>;
|
|
29
29
|
$isInitializationState: (state: InitializationState) => import("@angular/core").Signal<boolean>;
|
|
30
30
|
allFilterDirectivesEffect: import("@angular/core").EffectRef;
|
|
31
31
|
paginatorComponent?: PaginatorComponent;
|
|
32
32
|
genericTable?: GenericTableComponent;
|
|
33
|
-
|
|
34
|
-
$customRows: import("@angular/core").Signal<MatRowDef<any>[]>;
|
|
33
|
+
customRows: QueryList<MatRowDef<any>>;
|
|
35
34
|
$customCells: import("@angular/core").Signal<readonly CustomCellDirective<any>[]>;
|
|
36
35
|
$myColumns: import("@angular/core").Signal<{
|
|
37
36
|
metaData: MetaData;
|
|
@@ -39,7 +38,7 @@ export declare class TableContainerComponent<T = any> implements OnInit, OnDestr
|
|
|
39
38
|
}[]>;
|
|
40
39
|
tableElRef: ElementRef;
|
|
41
40
|
tableBuilder: TableBuilder;
|
|
42
|
-
tableId: string
|
|
41
|
+
$tableId: import("@angular/core").InputSignal<string | undefined>;
|
|
43
42
|
set indexColumn(val: boolean);
|
|
44
43
|
set selectionColumn(val: boolean);
|
|
45
44
|
set isSticky(val: boolean);
|
|
@@ -63,6 +62,7 @@ export declare class TableContainerComponent<T = any> implements OnInit, OnDestr
|
|
|
63
62
|
firstPage(): void;
|
|
64
63
|
lastPage(): void;
|
|
65
64
|
resetState(): void;
|
|
65
|
+
$persistedState: import("@angular/core").Signal<import("../../classes/TableState").PersistedTableState | null | undefined>;
|
|
66
66
|
private initializeStateEffect;
|
|
67
67
|
customFilters$: BehaviorSubject<Predicate<T>[]>;
|
|
68
68
|
initializeData(): void;
|
|
@@ -76,5 +76,5 @@ export declare class TableContainerComponent<T = any> implements OnInit, OnDestr
|
|
|
76
76
|
addFilterDirectives: (state: TableState) => void;
|
|
77
77
|
$useVirtual: import("@angular/core").Signal<boolean>;
|
|
78
78
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableContainerComponent<any>, never>;
|
|
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; }; }, { "data": "data"; "selection$": "selection$"; "onStateReset": "onStateReset"; "onSaveState": "onSaveState"; "state$": "state$"; }, ["filterDirectives", "customFilterDirectives", "
|
|
79
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableContainerComponent<any>, "tb-table-container", never, { "tableBuilder": { "alias": "tableBuilder"; "required": true; }; "$tableId": { "alias": "tableId"; "required": false; "isSignal": true; }; "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; }; }, { "data": "data"; "selection$": "selection$"; "onStateReset": "onStateReset"; "onSaveState": "onSaveState"; "state$": "state$"; }, ["filterDirectives", "customFilterDirectives", "$customCells", "tableElRef", "customRows"], ["[before]", ".tb-header-title"], true, never>;
|
|
80
80
|
}
|
|
@@ -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: import("@angular/core").WritableSignal<(TableCustomFilterDirective<any>
|
|
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>;
|