@one-paragon/angular-utilities 1.1.0-beta.1 → 1.1.2
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/table-builder/classes/TableBuilderDataSource.mjs +6 -2
- package/esm2022/table-builder/classes/TableState.mjs +1 -1
- package/esm2022/table-builder/classes/table-store.mjs +21 -3
- package/esm2022/table-builder/components/generic-table/generic-table.component.mjs +7 -1
- package/esm2022/table-builder/components/table-container/table-container.helpers/groupBy.helpers.mjs +18 -3
- package/esm2022/table-builder/components/table-container/table-container.mjs +9 -2
- package/fesm2022/one-paragon-angular-utilities.mjs +57 -7
- package/fesm2022/one-paragon-angular-utilities.mjs.map +1 -1
- package/package.json +5 -5
- package/table-builder/classes/TableBuilderDataSource.d.ts +2 -0
- package/table-builder/classes/TableState.d.ts +4 -3
- package/table-builder/classes/table-store.d.ts +18 -3
- package/table-builder/components/table-container/table-container.d.ts +3 -0
- package/table-builder/components/table-container/table-container.helpers/groupBy.helpers.d.ts +3 -1
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@one-paragon/angular-utilities",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "18.0.0",
|
|
6
6
|
"@angular/core": "18.0.0",
|
|
7
7
|
"@angular/material": "18.0.0",
|
|
8
|
-
"@ngrx/component": "
|
|
9
|
-
"@ngrx/component-store": "
|
|
10
|
-
"@ngrx/effects": "
|
|
11
|
-
"@ngrx/store": "
|
|
8
|
+
"@ngrx/component": "18.0.1",
|
|
9
|
+
"@ngrx/component-store": "18.0.1",
|
|
10
|
+
"@ngrx/effects": "18.0.1",
|
|
11
|
+
"@ngrx/store": "18.0.1"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"tslib": "^2.6.2"
|
|
@@ -2,9 +2,11 @@ import { MatTableDataSource } from '@angular/material/table';
|
|
|
2
2
|
import { Observable, Subscription } from 'rxjs';
|
|
3
3
|
import { TableStore } from './table-store';
|
|
4
4
|
export declare class TableBuilderDataSource<T> extends MatTableDataSource<T> {
|
|
5
|
+
#private;
|
|
5
6
|
dataSrc: Observable<T[]>;
|
|
6
7
|
private state;
|
|
7
8
|
subscription?: Subscription;
|
|
9
|
+
viewableData$: Observable<T[]>;
|
|
8
10
|
constructor(dataSrc: Observable<T[]>, state: TableStore);
|
|
9
11
|
connect(): import("rxjs").BehaviorSubject<T[]>;
|
|
10
12
|
disconnect(): void;
|
|
@@ -6,9 +6,10 @@ import { NotPersistedTableSettings, PersistedTableSettings } from './table-build
|
|
|
6
6
|
import { LinkInfo } from '../services/link-creator.service';
|
|
7
7
|
import { TableProps } from '../components/table-container/tableProps';
|
|
8
8
|
export interface Group {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
key: string;
|
|
10
|
+
groupName: string;
|
|
11
|
+
children: any[];
|
|
12
|
+
isGroupHeader: true;
|
|
12
13
|
}
|
|
13
14
|
export interface GroupedData {
|
|
14
15
|
key: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MetaData } from '../interfaces/report-def';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { InitializationState, PersistedTableState, TableState } from './TableState';
|
|
3
|
+
import { GroupedData, InitializationState, PersistedTableState, TableState } from './TableState';
|
|
4
4
|
import { Predicate } from '@angular/core';
|
|
5
5
|
import { TableBuilderConfig } from './TableBuilderConfig';
|
|
6
6
|
import { CustomFilter, FilterInfo } from './filter-info';
|
|
@@ -85,7 +85,7 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
85
85
|
pageSize?: number | undefined;
|
|
86
86
|
};
|
|
87
87
|
persistedTableSettings: PersistedTableSettings;
|
|
88
|
-
groupBy:
|
|
88
|
+
groupBy: GroupedData[];
|
|
89
89
|
};
|
|
90
90
|
readonly updateStateFromPersistedState: (observableOrValue: PersistedTableState | Observable<PersistedTableState>) => import("rxjs").Subscription;
|
|
91
91
|
getUserDefinedTableSize: import("@angular/core").Signal<number | undefined>;
|
|
@@ -110,8 +110,23 @@ export declare class TableStore extends ComponentStore<TableState> {
|
|
|
110
110
|
groupKey: string;
|
|
111
111
|
isExpanded: boolean;
|
|
112
112
|
}>) => import("rxjs").Subscription;
|
|
113
|
+
expandAllOfGroup: (observableOrValue: {
|
|
114
|
+
groupHeadersByKey: Dictionary<{
|
|
115
|
+
groupName: string;
|
|
116
|
+
}[]>;
|
|
117
|
+
} | Observable<{
|
|
118
|
+
groupHeadersByKey: Dictionary<{
|
|
119
|
+
groupName: string;
|
|
120
|
+
}[]>;
|
|
121
|
+
}>) => import("rxjs").Subscription;
|
|
122
|
+
collapseAll: () => void;
|
|
123
|
+
collapseAllOfKey: (observableOrValue: {
|
|
124
|
+
keys: string[];
|
|
125
|
+
} | Observable<{
|
|
126
|
+
keys: string[];
|
|
127
|
+
}>) => import("rxjs").Subscription;
|
|
113
128
|
groupByKeys$: Observable<string[]>;
|
|
114
|
-
expandedGroups$: Observable<
|
|
129
|
+
expandedGroups$: Observable<GroupedData[]>;
|
|
115
130
|
setTableSettings: (observableOrValue: GeneralTableSettings | Observable<GeneralTableSettings>) => import("rxjs").Subscription;
|
|
116
131
|
tableSettings: import("@angular/core").Signal<PersistedTableSettings & NotPersistedTableSettings>;
|
|
117
132
|
tableSettings$: Observable<PersistedTableSettings & NotPersistedTableSettings>;
|
|
@@ -37,6 +37,7 @@ export declare class TableContainerComponent<T = any> {
|
|
|
37
37
|
selection$: EventEmitter<any>;
|
|
38
38
|
displayDataSubject: ReplaySubject<Observable<T[]>>;
|
|
39
39
|
displayData: Observable<T[]>;
|
|
40
|
+
$displayData: import("@angular/core").Signal<T[]>;
|
|
40
41
|
dataSubject: ReplaySubject<Observable<T[]>>;
|
|
41
42
|
data: Observable<T[]>;
|
|
42
43
|
onStateReset: EventEmitter<any>;
|
|
@@ -63,6 +64,8 @@ export declare class TableContainerComponent<T = any> {
|
|
|
63
64
|
saveState(): void;
|
|
64
65
|
setProfileState(val: string): void;
|
|
65
66
|
deleteProfileState(stateKey: string): void;
|
|
67
|
+
expandAllGroups: () => void;
|
|
68
|
+
collapseAllGroups: () => void;
|
|
66
69
|
ngAfterContentInit(): void;
|
|
67
70
|
initializeColumns(): void;
|
|
68
71
|
mapMetaDatas: (meta: MetaData<T>) => MetaData<T>;
|
package/table-builder/components/table-container/table-container.helpers/groupBy.helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Timestamp } from "rxjs";
|
|
2
|
-
import { GroupedData } from "../../../classes/TableState";
|
|
2
|
+
import { Group, GroupedData } from "../../../classes/TableState";
|
|
3
3
|
export declare function updateGroupByState({ groupedData }: GroupByState, [data, groups, expandedGroups]: [Timestamp<any[]>, Timestamp<string[]>, Timestamp<GroupedData[]>], index: number): {
|
|
4
4
|
displayData: any[];
|
|
5
5
|
groupedData: any[];
|
|
@@ -12,4 +12,6 @@ export declare const initialGroupByState: {
|
|
|
12
12
|
displayData: never[];
|
|
13
13
|
groupedData: never[];
|
|
14
14
|
};
|
|
15
|
+
export declare const getAllGroupHeaderNames: (data: any[]) => import("lodash").Dictionary<Group[]>;
|
|
16
|
+
export declare const getAllGroupHeaderNamesByKeys: (data: any[], keys: string[]) => import("lodash").Dictionary<Group[]>;
|
|
15
17
|
export {};
|