@one-paragon/angular-utilities 2.0.21 → 2.0.23
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/fesm2022/one-paragon-angular-utilities.mjs +427 -341
- package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -1
- package/package.json +8 -8
- package/rxjs/subjectifier.d.ts +3 -1
- package/table-builder/classes/TableState.d.ts +19 -2
- package/table-builder/classes/table-builder.d.ts +2 -4
- package/table-builder/components/generic-table/generic-table.component.d.ts +10 -1
- package/table-builder/components/table-container/table-container.d.ts +2 -1
- package/table-builder/components/table-container/table-container.helpers/groupBy.helpers.d.ts +8 -13
- package/table-builder/directives/table-wrapper.directive.d.ts +1 -1
- package/table-builder/ngrx/tableBuilderStateStore.d.ts +4 -5
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@one-paragon/angular-utilities",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.23",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "19.
|
|
6
|
-
"@angular/core": "19.
|
|
7
|
-
"@angular/material": "19.
|
|
8
|
-
"@ngrx/component-store": "
|
|
9
|
-
"@ngrx/effects": "
|
|
10
|
-
"@ngrx/store": "
|
|
5
|
+
"@angular/common": "19.2.1",
|
|
6
|
+
"@angular/core": "19.2.1",
|
|
7
|
+
"@angular/material": "19.2.1",
|
|
8
|
+
"@ngrx/component-store": "19.0.1",
|
|
9
|
+
"@ngrx/effects": "19.0.1",
|
|
10
|
+
"@ngrx/store": "19.0.1"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"tslib": "
|
|
13
|
+
"tslib": "2.8.1"
|
|
14
14
|
},
|
|
15
15
|
"module": "fesm2022/one-paragon-angular-utilities.mjs",
|
|
16
16
|
"typings": "index.d.ts",
|
package/rxjs/subjectifier.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Observable, Subject } from 'rxjs';
|
|
2
|
+
type PipeLike<T> = Observable<T>['pipe'];
|
|
2
3
|
export declare class Subjectifier<T> extends Observable<T> {
|
|
3
4
|
private _subj;
|
|
4
5
|
private merged;
|
|
5
6
|
constructor(_source: Observable<T>);
|
|
6
7
|
next: Subject<T>['next'];
|
|
7
|
-
newSubj: (
|
|
8
|
+
newSubj: (...operations: Parameters<PipeLike<T>>) => Subjectifier<unknown>;
|
|
8
9
|
}
|
|
10
|
+
export {};
|
|
@@ -5,16 +5,33 @@ import { MetaData } from '../interfaces/report-def';
|
|
|
5
5
|
import { NotPersistedTableSettings, PersistedTableSettings } from './table-builder-general-settings';
|
|
6
6
|
import { LinkInfo } from '../services/link-creator.service';
|
|
7
7
|
import { TableProps } from '../components/table-container/tableProps';
|
|
8
|
-
export
|
|
8
|
+
export type NoneGroupHeader = {
|
|
9
|
+
isGroupHeader: never;
|
|
10
|
+
};
|
|
11
|
+
export interface BaseGroup {
|
|
9
12
|
key: string;
|
|
10
13
|
groupName: string;
|
|
11
|
-
|
|
14
|
+
uniqueName: string;
|
|
12
15
|
isGroupHeader: true;
|
|
16
|
+
padding: number;
|
|
17
|
+
length: number;
|
|
18
|
+
hasTheData: boolean;
|
|
19
|
+
level: number;
|
|
13
20
|
}
|
|
21
|
+
export interface DataGroup<T extends NoneGroupHeader = any> extends BaseGroup {
|
|
22
|
+
children: T[];
|
|
23
|
+
hasTheData: true;
|
|
24
|
+
}
|
|
25
|
+
export interface GroupGroup<T extends NoneGroupHeader = any> extends BaseGroup {
|
|
26
|
+
groups: (DataGroup<T> | GroupGroup<T>)[];
|
|
27
|
+
hasTheData: false;
|
|
28
|
+
}
|
|
29
|
+
export type Group<T extends NoneGroupHeader = any> = GroupGroup<T> | DataGroup<T>;
|
|
14
30
|
export interface GroupedData {
|
|
15
31
|
key: string;
|
|
16
32
|
expandedHeaders: string[];
|
|
17
33
|
}
|
|
34
|
+
export declare function isGroupHeader(data: any): data is Group;
|
|
18
35
|
export interface PersistedTableState {
|
|
19
36
|
hiddenKeys?: string[];
|
|
20
37
|
filters: Dictionary<FilterInfo | CustomFilter>;
|
|
@@ -2,17 +2,15 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { MetaData, ReportDef } from '../interfaces/report-def';
|
|
3
3
|
import { TableBuilderSettings } from './table-builder-general-settings';
|
|
4
4
|
import { Injector, Signal } from '@angular/core';
|
|
5
|
+
import { TableContainerComponent } from '../components/table-container/table-container';
|
|
5
6
|
export declare class TableBuilder<T = any> {
|
|
6
7
|
#private;
|
|
7
8
|
private data;
|
|
8
9
|
private metaData?;
|
|
9
10
|
private settings;
|
|
11
|
+
container: import("@angular/core").WritableSignal<TableContainerComponent<any> | undefined>;
|
|
10
12
|
$metaData: Signal<MetaData<T>[] | undefined>;
|
|
11
13
|
$settings: Signal<TableBuilderSettings<any> | undefined>;
|
|
12
|
-
$metaNeedsPrep: import("@angular/core").WritableSignal<boolean>;
|
|
13
|
-
$dataIsObservable: import("@angular/core").WritableSignal<boolean>;
|
|
14
|
-
$settingsIsObservable: import("@angular/core").WritableSignal<boolean>;
|
|
15
|
-
$needsPrep: Signal<boolean>;
|
|
16
14
|
$initialized: import("@angular/core").WritableSignal<boolean>;
|
|
17
15
|
constructor(data: TableBuilderArgs<T[]>, metaData?: TableBuilderArgs<MetaData<T, any>[]> | undefined, settings?: TableBuilderArgs<TableBuilderSettings<T>>);
|
|
18
16
|
prep(injector: Injector): void;
|
|
@@ -56,13 +56,15 @@ export declare class GenericTableComponent {
|
|
|
56
56
|
$isAllSelected: import("@angular/core").Signal<boolean>;
|
|
57
57
|
$masterToggleChecked: import("@angular/core").Signal<boolean>;
|
|
58
58
|
$masterToggleIndeterminate: import("@angular/core").Signal<boolean>;
|
|
59
|
+
$paginated: import("@angular/core").Signal<boolean>;
|
|
59
60
|
$selectableData: import("@angular/core").Signal<any[]>;
|
|
61
|
+
$selectAllMessage: import("@angular/core").Signal<string>;
|
|
60
62
|
/** Selects all rows if they are not all selected; otherwise clear selection. */
|
|
61
63
|
masterToggle(): void;
|
|
62
64
|
$tableWidth: import("@angular/core").WritableSignal<{
|
|
63
65
|
width: string;
|
|
64
66
|
}>;
|
|
65
|
-
getTransform: (key: string, val: string) => any
|
|
67
|
+
getTransform: (key: string, val: string) => import("@angular/core").Signal<any>;
|
|
66
68
|
$rowHeight: import("@angular/core").Signal<string | undefined>;
|
|
67
69
|
$headerHeight: import("@angular/core").Signal<string | undefined>;
|
|
68
70
|
$groupHeaderHeight: import("@angular/core").Signal<string | undefined>;
|
|
@@ -70,6 +72,13 @@ export declare class GenericTableComponent {
|
|
|
70
72
|
$stickyFooter: import("@angular/core").Signal<boolean | undefined>;
|
|
71
73
|
$rowStyles: import("@angular/core").Signal<import("../../../utilities").StylerStyle>;
|
|
72
74
|
$rowClasses: import("@angular/core").Signal<Dictionary<true | import("@angular/core").Predicate<any>>>;
|
|
75
|
+
allOfGroupSelected: (uniqueName: string) => import("@angular/core").Signal<{
|
|
76
|
+
containsAll: boolean;
|
|
77
|
+
containsSome: boolean;
|
|
78
|
+
length: number;
|
|
79
|
+
}>;
|
|
80
|
+
toggleGroup: (uniqueName: string, allSelected: boolean) => void;
|
|
81
|
+
toggleGroupMessage: (amountOfItems: number, allSelected: boolean) => string;
|
|
73
82
|
static ɵfac: i0.ɵɵFactoryDeclaration<GenericTableComponent, never>;
|
|
74
83
|
static ɵcmp: i0.ɵɵComponentDeclaration<GenericTableComponent, "tb-generic-table", never, { "$displayDataLength": { "alias": "displayDataLength"; "required": true; "isSignal": true; }; "$data": { "alias": "data"; "required": true; "isSignal": true; }; "$rows": { "alias": "rows"; "required": false; "isSignal": true; }; "$columnInfos": { "alias": "columnInfos"; "required": true; "isSignal": true; }; "$dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "$trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; }, { "selection$": "selection"; }, never, never, true, never>;
|
|
75
84
|
}
|
|
@@ -7,6 +7,7 @@ import { GroupedData } from '../../classes/TableState';
|
|
|
7
7
|
import { CustomFilter, FilterInfo } from '../../classes/filter-info';
|
|
8
8
|
import { TableWrapperDirective } from '../../directives/table-wrapper.directive';
|
|
9
9
|
import { TableBuilderStateStore } from '../../ngrx/tableBuilderStateStore';
|
|
10
|
+
import { GroupByState } from './table-container.helpers/groupBy.helpers';
|
|
10
11
|
import { TableProps } from './tableProps';
|
|
11
12
|
import { PaginatorComponent } from '../generic-table/paginator.component';
|
|
12
13
|
import { TableBuilderDataSource } from '../../classes/TableBuilderDataSource';
|
|
@@ -94,7 +95,7 @@ export declare class TableContainerComponent<T = any> {
|
|
|
94
95
|
timestamp: number;
|
|
95
96
|
}>;
|
|
96
97
|
private $dataAndGroupsTimestamped;
|
|
97
|
-
|
|
98
|
+
protected $filteredSortedAndGrouped: import("@angular/core").WritableSignal<GroupByState | undefined>;
|
|
98
99
|
private $isInitializationState;
|
|
99
100
|
static headerId: string;
|
|
100
101
|
headerId: string;
|
package/table-builder/components/table-container/table-container.helpers/groupBy.helpers.d.ts
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
import { Timestamp } from "rxjs";
|
|
2
|
-
import { Group, GroupedData } from "../../../classes/TableState";
|
|
3
|
-
|
|
2
|
+
import { DataGroup, Group, GroupedData, GroupGroup, NoneGroupHeader } from "../../../classes/TableState";
|
|
3
|
+
import { Dictionary } from "@ngrx/entity";
|
|
4
|
+
export declare function updateGroupByState<T extends NoneGroupHeader = any>(groupedData: any[], { data, groups, expanded }: {
|
|
4
5
|
data: Timestamp<T[]>;
|
|
5
6
|
groups: Timestamp<string[]>;
|
|
6
7
|
expanded: Timestamp<GroupedData[]>;
|
|
7
|
-
}, firstRun: boolean):
|
|
8
|
-
|
|
9
|
-
groupedData: any[];
|
|
10
|
-
};
|
|
11
|
-
export declare function _updateGroupByState({ groupedData }: GroupByState, [data, groups, expanded]: [Timestamp<any[]>, Timestamp<string[]>, Timestamp<GroupedData[]>], index: number): {
|
|
12
|
-
displayData: any[];
|
|
13
|
-
groupedData: any[];
|
|
14
|
-
};
|
|
8
|
+
}, firstRun: boolean): GroupByState;
|
|
9
|
+
export declare function mapGroupHeader(obj: DataGroup | GroupGroup, expandedHeaders: string[] | true): any[];
|
|
15
10
|
export interface GroupByState {
|
|
16
11
|
displayData: any[];
|
|
17
|
-
groupedData:
|
|
12
|
+
groupedData: DataGroup[];
|
|
18
13
|
}
|
|
19
14
|
export declare const initialGroupByState: {
|
|
20
15
|
displayData: never[];
|
|
21
16
|
groupedData: never[];
|
|
22
17
|
};
|
|
23
|
-
export declare const getAllGroupHeaderNames: (data: any[]) =>
|
|
24
|
-
export declare const getAllGroupHeaderNamesByKeys: (data: any[], keys: string[]) =>
|
|
18
|
+
export declare const getAllGroupHeaderNames: (data: any[]) => {};
|
|
19
|
+
export declare const getAllGroupHeaderNamesByKeys: (data: any[], keys: string[]) => Dictionary<Group[]>;
|
|
@@ -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<(
|
|
4
|
+
$registrations: import("@angular/core").WritableSignal<(TableFilterDirective | TableCustomFilterDirective)[]>;
|
|
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>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentStore } from "@ngrx/component-store";
|
|
2
2
|
import { Signal } from "@angular/core";
|
|
3
|
-
import { Observable } from "rxjs";
|
|
4
3
|
import { Dictionary } from "../interfaces/dictionary";
|
|
5
4
|
import { PersistedTableState } from "../classes/TableState";
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
@@ -17,7 +16,7 @@ export declare class TableBuilderStateStore extends ComponentStore<GlobalStorage
|
|
|
17
16
|
tableState: PersistedTableState;
|
|
18
17
|
stateName?: string;
|
|
19
18
|
asDefault?: boolean;
|
|
20
|
-
} | Observable<{
|
|
19
|
+
} | import("rxjs").Observable<{
|
|
21
20
|
tableId: string;
|
|
22
21
|
tableState: PersistedTableState;
|
|
23
22
|
stateName?: string;
|
|
@@ -28,7 +27,7 @@ export declare class TableBuilderStateStore extends ComponentStore<GlobalStorage
|
|
|
28
27
|
setLocalCurrentState: (observableOrValue: {
|
|
29
28
|
tableId: string;
|
|
30
29
|
currentStateKey: string;
|
|
31
|
-
} | Observable<{
|
|
30
|
+
} | import("rxjs").Observable<{
|
|
32
31
|
tableId: string;
|
|
33
32
|
currentStateKey: string;
|
|
34
33
|
}>) => import("rxjs").Subscription;
|
|
@@ -36,7 +35,7 @@ export declare class TableBuilderStateStore extends ComponentStore<GlobalStorage
|
|
|
36
35
|
setDefaultInLocal: (observableOrValue: {
|
|
37
36
|
key: string;
|
|
38
37
|
default: string;
|
|
39
|
-
} | Observable<{
|
|
38
|
+
} | import("rxjs").Observable<{
|
|
40
39
|
key: string;
|
|
41
40
|
default: string;
|
|
42
41
|
}>) => import("rxjs").Subscription;
|
|
@@ -47,7 +46,7 @@ export declare class TableBuilderStateStore extends ComponentStore<GlobalStorage
|
|
|
47
46
|
deleteLocalProfilesState: (observableOrValue: {
|
|
48
47
|
key: string;
|
|
49
48
|
stateKey: string;
|
|
50
|
-
} | Observable<{
|
|
49
|
+
} | import("rxjs").Observable<{
|
|
51
50
|
key: string;
|
|
52
51
|
stateKey: string;
|
|
53
52
|
}>) => import("rxjs").Subscription;
|