@masterteam/client-components 0.0.89 → 0.0.91
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/client-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.91",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/client-components",
|
|
6
6
|
"linkDirectory": true,
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"rxjs": "^7.8.2",
|
|
17
17
|
"tailwindcss": "^4.2.2",
|
|
18
18
|
"tailwindcss-primeui": "^0.6.1",
|
|
19
|
-
"@masterteam/components": "^0.0.
|
|
20
|
-
"@masterteam/
|
|
21
|
-
"@masterteam/dashboard-builder": "^0.0.
|
|
22
|
-
"@masterteam/
|
|
19
|
+
"@masterteam/components": "^0.0.284",
|
|
20
|
+
"@masterteam/forms": "^0.0.147",
|
|
21
|
+
"@masterteam/dashboard-builder": "^0.0.88",
|
|
22
|
+
"@masterteam/icons": "^0.0.17"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"tslib": "^2.8.1"
|
|
@@ -24,6 +24,13 @@ interface Response<T> {
|
|
|
24
24
|
type ClientListRuntimeContext = string;
|
|
25
25
|
type ClientListFetchStateKey = 'escalation';
|
|
26
26
|
declare const CLIENT_LIST_RECORD_STATE_KEY = "__clientListRecordState";
|
|
27
|
+
/**
|
|
28
|
+
* Row key carrying the owning record of a hierarchy row. Sits beside the row's
|
|
29
|
+
* cells rather than in a column so it travels with the row through
|
|
30
|
+
* `transformResult`, row actions and click handlers without ever rendering.
|
|
31
|
+
* Read it with {@link readClientListRowSource}.
|
|
32
|
+
*/
|
|
33
|
+
declare const CLIENT_LIST_RECORD_SOURCE_KEY = "__clientListRecordSource";
|
|
27
34
|
/** Record state every list request asks for. */
|
|
28
35
|
declare const CLIENT_LIST_DEFAULT_INCLUDE_STATE: readonly ClientListFetchStateKey[];
|
|
29
36
|
/**
|
|
@@ -67,7 +74,23 @@ interface ClientListBaseConfiguration {
|
|
|
67
74
|
}
|
|
68
75
|
interface ClientListRuntimeRecordActionsContext {
|
|
69
76
|
listKey: string;
|
|
77
|
+
/**
|
|
78
|
+
* The context this row's actions belong to: the owning record's context for
|
|
79
|
+
* a hierarchy row, the list's own context otherwise. In a hierarchy table
|
|
80
|
+
* the list context is only the aggregation scope and addressing a row
|
|
81
|
+
* action to it would target the wrong record.
|
|
82
|
+
*/
|
|
70
83
|
contextKey: string | null;
|
|
84
|
+
/**
|
|
85
|
+
* The list's own configured context, unchanged. Only differs from
|
|
86
|
+
* `contextKey` on a hierarchy row.
|
|
87
|
+
*/
|
|
88
|
+
listContextKey: string | null;
|
|
89
|
+
/**
|
|
90
|
+
* The record that owns this row, or null outside a hierarchy table. Its
|
|
91
|
+
* `levelDataId` is the instance a row action applies to.
|
|
92
|
+
*/
|
|
93
|
+
source: ClientListFetchRecordSource | null;
|
|
71
94
|
instanceId: number | null;
|
|
72
95
|
moduleId: number;
|
|
73
96
|
row: RuntimeTableDisplayRow;
|
|
@@ -135,12 +158,27 @@ interface ClientListTableDisplayConfig {
|
|
|
135
158
|
* host explicitly opts in with `[]`.
|
|
136
159
|
*/
|
|
137
160
|
persistStateExclude?: ClientListTablePersistStateKey[];
|
|
161
|
+
/**
|
|
162
|
+
* Column key the table starts grouped by — rows of the same value collapse
|
|
163
|
+
* under one header, and the column itself stops repeating in every row.
|
|
164
|
+
*
|
|
165
|
+
* A starting point, not a lock: the user can regroup or clear it from the
|
|
166
|
+
* table's own menu, and their choice then survives for the life of the list.
|
|
167
|
+
* Applied only when the list first appears, so a re-render never yanks the
|
|
168
|
+
* grouping back from under them.
|
|
169
|
+
*
|
|
170
|
+
* The key must name a column that is actually rendered, and grouping only
|
|
171
|
+
* makes sense once every row of a group is loaded — with backend paging a
|
|
172
|
+
* group is split across pages and each page grows its own header.
|
|
173
|
+
*/
|
|
174
|
+
groupBy?: string;
|
|
138
175
|
}
|
|
139
176
|
interface NormalizedClientListTableDisplayConfig {
|
|
140
177
|
pageSize: number;
|
|
141
178
|
searchable: boolean;
|
|
142
179
|
exportable: boolean;
|
|
143
180
|
persistStateExclude: ClientListTablePersistStateKey[];
|
|
181
|
+
groupBy: string | null;
|
|
144
182
|
}
|
|
145
183
|
interface ClientListFormConfiguration extends ClientListBaseConfiguration {
|
|
146
184
|
type?: 'form';
|
|
@@ -153,6 +191,18 @@ interface ClientListFormConfiguration extends ClientListBaseConfiguration {
|
|
|
153
191
|
instanceId?: number;
|
|
154
192
|
/** Complete filter array forwarded unchanged to `fetch/query`. */
|
|
155
193
|
filters?: ClientListFetchRequestFilter[];
|
|
194
|
+
/**
|
|
195
|
+
* `areaType: 'table'` only — fetch the rows owned by this root's
|
|
196
|
+
* descendants instead of the rows owned by the context's own records. See
|
|
197
|
+
* {@link ClientListFetchHierarchyScope}. Ignored for cards and informative
|
|
198
|
+
* lists, which the backend rejects outright.
|
|
199
|
+
*
|
|
200
|
+
* Rows then arrive from several owners at once: each carries its owning
|
|
201
|
+
* record under {@link CLIENT_LIST_RECORD_SOURCE_KEY}, row actions are
|
|
202
|
+
* addressed to that owner's context, and `state.totals` / `state.sourceGroups`
|
|
203
|
+
* carry the pre-pagination aggregates.
|
|
204
|
+
*/
|
|
205
|
+
hierarchy?: ClientListFetchHierarchyScope;
|
|
156
206
|
mode?: ClientListMode;
|
|
157
207
|
columnKeys?: string[];
|
|
158
208
|
/**
|
|
@@ -231,6 +281,31 @@ interface ClientListFetchRequestFilter {
|
|
|
231
281
|
interface ClientListFetchRequestDisplay {
|
|
232
282
|
areas: string[];
|
|
233
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Descendant scope for a `Table` request: instead of the rows owned by the
|
|
286
|
+
* context's own records, fetch the rows owned by a root record's descendants,
|
|
287
|
+
* combined across every child level the user may read.
|
|
288
|
+
*
|
|
289
|
+
* Backend constraints, all of them hard errors rather than silent fallbacks:
|
|
290
|
+
* `Table` projection only, in a `level:<id>/module:<id>` context backed by
|
|
291
|
+
* ModuleData, and never combined with tree/selector/process-context requests.
|
|
292
|
+
* The root is only reachable when `rootId` belongs to the level in
|
|
293
|
+
* `contextKey`.
|
|
294
|
+
*
|
|
295
|
+
* Do not also send a `levelDataId` filter naming the root — that filter still
|
|
296
|
+
* means "owned by this record" and would strip the descendants back out.
|
|
297
|
+
*/
|
|
298
|
+
interface ClientListFetchHierarchyScope {
|
|
299
|
+
/** Level-data record id of the root, not a module record id. */
|
|
300
|
+
rootId: number;
|
|
301
|
+
/**
|
|
302
|
+
* `-1` (default) every descendant, `1` direct children only, `0` none.
|
|
303
|
+
* Other negative values are rejected by the backend.
|
|
304
|
+
*/
|
|
305
|
+
depth?: number;
|
|
306
|
+
/** Also include rows owned by the root itself. Defaults to `false`. */
|
|
307
|
+
includeRoot?: boolean;
|
|
308
|
+
}
|
|
234
309
|
interface ClientListFetchQueryRequest {
|
|
235
310
|
contextKey: string;
|
|
236
311
|
projection: ClientListFetchProjection;
|
|
@@ -241,6 +316,7 @@ interface ClientListFetchQueryRequest {
|
|
|
241
316
|
pageSize?: number;
|
|
242
317
|
surfaceKey?: string;
|
|
243
318
|
display?: ClientListFetchRequestDisplay;
|
|
319
|
+
hierarchy?: ClientListFetchHierarchyScope;
|
|
244
320
|
}
|
|
245
321
|
/**
|
|
246
322
|
* The query settings a list renders with, in the shape `process-submit` takes
|
|
@@ -322,9 +398,15 @@ interface ClientListFetchRecordState {
|
|
|
322
398
|
interface ClientListFetchRecord {
|
|
323
399
|
id: number;
|
|
324
400
|
name?: string;
|
|
401
|
+
/**
|
|
402
|
+
* In a hierarchy response this is the *module* schema for every row, not the
|
|
403
|
+
* owning level — read `source.levelId` for that.
|
|
404
|
+
*/
|
|
325
405
|
schemaId?: number;
|
|
326
406
|
values: Record<string, ClientListFetchValueCell>;
|
|
327
407
|
state?: ClientListFetchRecordState | null;
|
|
408
|
+
/** Hierarchy responses only: the record that owns this row. */
|
|
409
|
+
source?: ClientListFetchRecordSource | null;
|
|
328
410
|
}
|
|
329
411
|
interface ClientListFetchSchema {
|
|
330
412
|
id: number;
|
|
@@ -340,6 +422,64 @@ interface ClientListFetchCatalog {
|
|
|
340
422
|
* keyed by the owning property key (e.g. a `LookupModuleCheckList`).
|
|
341
423
|
*/
|
|
342
424
|
nestedProperties?: Record<string, ClientListFetchPropertyMeta[]>;
|
|
425
|
+
/**
|
|
426
|
+
* Hierarchy responses only: one catalog per owning child context, keyed by
|
|
427
|
+
* `record.source.contextKey`. Each carries that level's own property ids,
|
|
428
|
+
* configurations and overrides — which is what an edit of that row has to
|
|
429
|
+
* be built from. The top-level `properties` describe the shared columns and
|
|
430
|
+
* are normalized across levels, so they cannot stand in for these.
|
|
431
|
+
*
|
|
432
|
+
* Note every entry's `schemaId` is the *module* schema, the same for all of
|
|
433
|
+
* them; the owning level is `record.source.levelId`, never this.
|
|
434
|
+
*/
|
|
435
|
+
byContext?: Record<string, ClientListFetchCatalog>;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* The record that actually owns a row in a hierarchy response. The list's own
|
|
439
|
+
* context is only the aggregation scope, so this — not the list config — is
|
|
440
|
+
* what a row action, an edit, or a navigation has to be addressed to.
|
|
441
|
+
*/
|
|
442
|
+
interface ClientListFetchRecordSource {
|
|
443
|
+
levelDataId: number;
|
|
444
|
+
levelId: number;
|
|
445
|
+
name: string;
|
|
446
|
+
levelName: string;
|
|
447
|
+
contextKey: string;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* One aggregate over every matching row before pagination — not just the
|
|
451
|
+
* current page.
|
|
452
|
+
*/
|
|
453
|
+
interface ClientListFetchSum {
|
|
454
|
+
propertyKey: string;
|
|
455
|
+
/** Backend decimal sum of the numeric raw values. */
|
|
456
|
+
value: number;
|
|
457
|
+
/** How many rows contributed, valid zeroes included. */
|
|
458
|
+
valueCount: number;
|
|
459
|
+
/**
|
|
460
|
+
* Rows whose value was missing or non-numeric. Greater than zero means the
|
|
461
|
+
* total is incomplete and must be presented as such — see
|
|
462
|
+
* {@link isClientListTotalIncomplete}.
|
|
463
|
+
*/
|
|
464
|
+
missingValueCount: number;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Rows grouped by their owning record. Groups are per *actual* owner at any
|
|
468
|
+
* depth: a grandchild's rows appear once under the grandchild, never repeated
|
|
469
|
+
* under the levels in between.
|
|
470
|
+
*/
|
|
471
|
+
interface ClientListFetchSourceGroup {
|
|
472
|
+
source: ClientListFetchRecordSource;
|
|
473
|
+
/**
|
|
474
|
+
* Only this group's row ids **on the current page** — may be empty while
|
|
475
|
+
* `totalCount` and `totals` are non-zero, because an owner's rows can span
|
|
476
|
+
* pages.
|
|
477
|
+
*/
|
|
478
|
+
recordIds: number[];
|
|
479
|
+
/** Every matching row for this owner, across all pages. */
|
|
480
|
+
totalCount: number;
|
|
481
|
+
/** Subtotals over all of this owner's matching rows, across all pages. */
|
|
482
|
+
totals: ClientListFetchSum[];
|
|
343
483
|
}
|
|
344
484
|
interface ClientListFetchTableColumn {
|
|
345
485
|
key: string;
|
|
@@ -365,6 +505,17 @@ interface ClientListFetchProjectionMeta {
|
|
|
365
505
|
columns?: ClientListFetchTableColumn[];
|
|
366
506
|
displayOrder?: ClientListFetchCardDisplayOrderItem[];
|
|
367
507
|
groups?: ClientListFetchCardGroup[];
|
|
508
|
+
/** Hierarchy responses only: per-owner groups, subtotals and page row ids. */
|
|
509
|
+
sourceGroups?: ClientListFetchSourceGroup[];
|
|
510
|
+
/**
|
|
511
|
+
* Hierarchy responses only: totals over every matching row before
|
|
512
|
+
* pagination. The backend fills this from the module's configured summary
|
|
513
|
+
* keys, which today means a single `amount` entry on the financial module
|
|
514
|
+
* and an **empty array everywhere else** — so this being present says
|
|
515
|
+
* nothing about which keys are in it. Always look an entry up by key with
|
|
516
|
+
* {@link findClientListTotal}; never read `totals[0]`.
|
|
517
|
+
*/
|
|
518
|
+
totals?: ClientListFetchSum[];
|
|
368
519
|
}
|
|
369
520
|
interface ClientListFetchQueryResponse {
|
|
370
521
|
contextKey: string;
|
|
@@ -460,6 +611,17 @@ interface ClientListBaseState {
|
|
|
460
611
|
expanded: boolean;
|
|
461
612
|
dashboardData: DashboardBuilderData | null;
|
|
462
613
|
rawData: unknown | null;
|
|
614
|
+
/**
|
|
615
|
+
* Hierarchy tables only: totals over every matching row before pagination,
|
|
616
|
+
* so they stay put as the user pages. Undefined for an ordinary list — the
|
|
617
|
+
* backend sends none, and a page sum would not be the same number.
|
|
618
|
+
*/
|
|
619
|
+
totals?: ClientListFetchSum[];
|
|
620
|
+
/**
|
|
621
|
+
* Hierarchy tables only: one entry per owning record, with its full matching
|
|
622
|
+
* count and subtotals plus the ids of its rows on the current page.
|
|
623
|
+
*/
|
|
624
|
+
sourceGroups?: ClientListFetchSourceGroup[];
|
|
463
625
|
}
|
|
464
626
|
interface ClientListTableState extends ClientListBaseState {
|
|
465
627
|
type: 'form';
|
|
@@ -485,6 +647,8 @@ interface NormalizedClientListConfiguration {
|
|
|
485
647
|
contextKey: ClientListRuntimeContext | null;
|
|
486
648
|
instanceId: number | null;
|
|
487
649
|
filters: ClientListFetchRequestFilter[];
|
|
650
|
+
/** Null unless the host asked for descendant scope on a table. */
|
|
651
|
+
hierarchy: ClientListFetchHierarchyScope | null;
|
|
488
652
|
levelId: number | null;
|
|
489
653
|
moduleId: number;
|
|
490
654
|
type: ClientListType;
|
|
@@ -556,8 +720,9 @@ declare class ClientListStateService {
|
|
|
556
720
|
upsertRecord(key: string, record: ClientListFetchRecord, config: NormalizedClientListConfiguration): boolean;
|
|
557
721
|
/**
|
|
558
722
|
* Drops a record the backend has deleted, without re-fetching. Returns
|
|
559
|
-
* `false` when the record is not in the loaded set
|
|
560
|
-
*
|
|
723
|
+
* `false` when the record is not in the loaded set — or when the list is a
|
|
724
|
+
* hierarchy table, whose server-summed totals a local removal would
|
|
725
|
+
* invalidate — so the caller can decide whether a reload is warranted.
|
|
561
726
|
*/
|
|
562
727
|
removeRecord(key: string, recordId: number, config: NormalizedClientListConfiguration): boolean;
|
|
563
728
|
private upsertRowRecord;
|
|
@@ -756,6 +921,14 @@ declare class ClientList implements OnDestroy {
|
|
|
756
921
|
private resolveAreaType;
|
|
757
922
|
private resolveType;
|
|
758
923
|
private resolveMode;
|
|
924
|
+
/**
|
|
925
|
+
* Descendant scope only survives where the backend accepts it: a table, with
|
|
926
|
+
* a usable root id. Anywhere else it is dropped rather than sent, because
|
|
927
|
+
* the backend answers an unsupported combination with a 400 that takes the
|
|
928
|
+
* whole list down — a cards area that happens to share a config object would
|
|
929
|
+
* otherwise render nothing at all.
|
|
930
|
+
*/
|
|
931
|
+
private resolveHierarchyScope;
|
|
759
932
|
private toNormalizedConfig;
|
|
760
933
|
private createItemKey;
|
|
761
934
|
private resolveLayout;
|
|
@@ -777,11 +950,43 @@ declare class ClientList implements OnDestroy {
|
|
|
777
950
|
private asInformativeConfig;
|
|
778
951
|
private asFormConfig;
|
|
779
952
|
private serializeFilters;
|
|
953
|
+
private serializeHierarchy;
|
|
780
954
|
private resolveFetchFilters;
|
|
781
955
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClientList, never>;
|
|
782
956
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClientList, "mt-client-list", never, { "configurations": { "alias": "configurations"; "required": true; "isSignal": true; }; "defaultTake": { "alias": "defaultTake"; "required": false; "isSignal": true; }; }, { "loaded": "loaded"; "errored": "errored"; "itemClicked": "itemClicked"; }, never, never, true, never>;
|
|
783
957
|
}
|
|
784
958
|
|
|
959
|
+
/**
|
|
960
|
+
* Reads the owning record off a hierarchy row. Returns null for a row from an
|
|
961
|
+
* ordinary list, which has no owner other than the list's own context.
|
|
962
|
+
*
|
|
963
|
+
* Use this before addressing anything at a row — an edit, a navigation, a
|
|
964
|
+
* permission check. The list's configured `contextKey` is the aggregation
|
|
965
|
+
* scope in a hierarchy table, not the row's home.
|
|
966
|
+
*/
|
|
967
|
+
declare function readClientListRowSource(row: RuntimeTableDisplayRow | null | undefined): ClientListFetchRecordSource | null;
|
|
968
|
+
/**
|
|
969
|
+
* Looks a total up by property key.
|
|
970
|
+
*
|
|
971
|
+
* Always go through this rather than indexing `totals`. The backend fills the
|
|
972
|
+
* array from the module's configured summary keys — one `amount` entry on the
|
|
973
|
+
* financial module, nothing at all on every other module — so the array being
|
|
974
|
+
* present does not mean the key you want is in it, and position means nothing.
|
|
975
|
+
*/
|
|
976
|
+
declare function findClientListTotal(totals: readonly ClientListFetchSum[] | null | undefined, propertyKey: string): ClientListFetchSum | null;
|
|
977
|
+
/**
|
|
978
|
+
* Whether a total left rows out — some row's value was missing or not a
|
|
979
|
+
* number, so the sum is over fewer rows than the table reports.
|
|
980
|
+
*
|
|
981
|
+
* A total in this state must be presented as incomplete. Rendering it as a
|
|
982
|
+
* plain figure states a portfolio total the data does not support.
|
|
983
|
+
*/
|
|
984
|
+
declare function isClientListTotalIncomplete(total: ClientListFetchSum | null | undefined): boolean;
|
|
985
|
+
/**
|
|
986
|
+
* The subtotal group for one owning record, by its level-data id.
|
|
987
|
+
*/
|
|
988
|
+
declare function findClientListSourceGroup(groups: readonly ClientListFetchSourceGroup[] | null | undefined, levelDataId: number): ClientListFetchSourceGroup | null;
|
|
989
|
+
|
|
785
990
|
declare class ClientListApiService {
|
|
786
991
|
private readonly http;
|
|
787
992
|
private readonly runtimeFetchBaseUrl;
|
|
@@ -791,12 +996,18 @@ declare class ClientListApiService {
|
|
|
791
996
|
* the request carried, because a write that wants its record projected the
|
|
792
997
|
* same way has to repeat them and cannot recover them from the response.
|
|
793
998
|
*/
|
|
794
|
-
getRows(contextKey: ClientListRuntimeContext, query: ClientListTableQuery, filters?: ClientListFetchRequestFilter[]): Observable<ClientListRowsFetchResult>;
|
|
999
|
+
getRows(contextKey: ClientListRuntimeContext, query: ClientListTableQuery, filters?: ClientListFetchRequestFilter[], hierarchy?: ClientListFetchHierarchyScope | null): Observable<ClientListRowsFetchResult>;
|
|
795
1000
|
/**
|
|
796
1001
|
* Reads a single record back with the list's own query settings — the path
|
|
797
1002
|
* taken when a write reports `recordProjectionStatus: 'Unavailable'`. The
|
|
798
1003
|
* write itself already succeeded; this only reads, and must never be served
|
|
799
1004
|
* by re-submitting.
|
|
1005
|
+
*
|
|
1006
|
+
* `contextKey` is the context that *owns* the record, which in a hierarchy
|
|
1007
|
+
* table is the row's `source.contextKey` rather than the list's own. The
|
|
1008
|
+
* read deliberately carries no `hierarchy` scope: the row is filtered by its
|
|
1009
|
+
* own id in its own context, which is both cheaper and immune to the record
|
|
1010
|
+
* having moved out of the root's subtree since it was written.
|
|
800
1011
|
*/
|
|
801
1012
|
getRecord(contextKey: ClientListRuntimeContext, request: ClientListReturnRecordRequest, filters: ClientListFetchRequestFilter[]): Observable<Response<ClientListFetchQueryResponse>>;
|
|
802
1013
|
getCards(contextKey: ClientListRuntimeContext, filters?: ClientListFetchRequestFilter[], skip?: number, take?: number): Observable<Response<ClientListCardsPayload>>;
|
|
@@ -804,6 +1015,14 @@ declare class ClientListApiService {
|
|
|
804
1015
|
private queryRuntime;
|
|
805
1016
|
private resolveTablePropertyKeys;
|
|
806
1017
|
private toPage;
|
|
1018
|
+
/**
|
|
1019
|
+
* Sends the scope with both optional fields resolved rather than omitted.
|
|
1020
|
+
* The backend's defaults match these, but `depth` is range-checked against
|
|
1021
|
+
* `>= -1` and anything else fails the whole request — so a host that means
|
|
1022
|
+
* "everything" gets `-1` written down instead of relying on an absent field
|
|
1023
|
+
* surviving serialization.
|
|
1024
|
+
*/
|
|
1025
|
+
private toHierarchyScope;
|
|
807
1026
|
private toEffectiveColumnKeys;
|
|
808
1027
|
private readTableSettingsContext;
|
|
809
1028
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClientListApiService, never>;
|
|
@@ -856,8 +1075,19 @@ interface ClientListToolbarBucket {
|
|
|
856
1075
|
filters: WritableSignal<TableFilters>;
|
|
857
1076
|
filterTerm: WritableSignal<string>;
|
|
858
1077
|
groupBy: WritableSignal<string | null>;
|
|
1078
|
+
/**
|
|
1079
|
+
* Sort mirrored into `mt-table`. PrimeNG only renders group headers while
|
|
1080
|
+
* the sort field *is* the grouped column, so a grouped list has to carry the
|
|
1081
|
+
* matching sort or it silently renders as an ordinary flat table.
|
|
1082
|
+
*/
|
|
1083
|
+
sortField: WritableSignal<string | null>;
|
|
1084
|
+
sortDirection: WritableSignal<'asc' | 'desc' | null>;
|
|
859
1085
|
activeTab: WritableSignal<any>;
|
|
860
1086
|
}
|
|
1087
|
+
/** Initial toolbar state, applied only when a bucket is first created. */
|
|
1088
|
+
interface ClientListToolbarDefaults {
|
|
1089
|
+
groupBy?: string | null;
|
|
1090
|
+
}
|
|
861
1091
|
/**
|
|
862
1092
|
* Per-list toolbar state holder. Buckets are keyed by list `key` (see
|
|
863
1093
|
* `ClientListBaseState.key`) so switching between table and cards for the same
|
|
@@ -867,11 +1097,24 @@ interface ClientListToolbarBucket {
|
|
|
867
1097
|
*/
|
|
868
1098
|
declare class ClientListToolbarService {
|
|
869
1099
|
private readonly buckets;
|
|
870
|
-
|
|
1100
|
+
/**
|
|
1101
|
+
* Lists whose defaults have been applied. Tracked apart from the bucket
|
|
1102
|
+
* itself because the bucket can be created by whichever view renders first —
|
|
1103
|
+
* the cards view asks for one without defaults — and seeding on creation
|
|
1104
|
+
* alone would then lose them for good.
|
|
1105
|
+
*/
|
|
1106
|
+
private readonly seeded;
|
|
1107
|
+
/**
|
|
1108
|
+
* `defaults` are applied once per list and ignored on every later call.
|
|
1109
|
+
* Re-applying them would fight the user: a host that asks for an initial
|
|
1110
|
+
* grouping would otherwise re-impose it on each render, so regrouping or
|
|
1111
|
+
* clearing it from the table menu would never stick.
|
|
1112
|
+
*/
|
|
1113
|
+
forList(key: string, defaults?: ClientListToolbarDefaults): ClientListToolbarBucket;
|
|
871
1114
|
clear(key: string): void;
|
|
872
1115
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClientListToolbarService, never>;
|
|
873
1116
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ClientListToolbarService>;
|
|
874
1117
|
}
|
|
875
1118
|
|
|
876
|
-
export { CLIENT_LIST_DEFAULT_INCLUDE_STATE, CLIENT_LIST_RECORD_ID_FILTER_KEY, CLIENT_LIST_RECORD_STATE_KEY, ClientList, ClientListApiService, ClientListRuntimeActionsService, ClientListStateService, ClientListToolbarService, defaultResolveRecordId };
|
|
877
|
-
export type { ClientListAreaType, ClientListBaseConfiguration, ClientListBaseState, ClientListCard, ClientListCardModule, ClientListCardProperty, ClientListCardsPayload, ClientListCardsState, ClientListClickableItem, ClientListCollapseConfig, ClientListConfiguration, ClientListContentTemplateContext, ClientListDataLoadedHandler, ClientListFetchCardDisplayOrderItem, ClientListFetchCardGroup, ClientListFetchCatalog, ClientListFetchProjection, ClientListFetchProjectionMeta, ClientListFetchPropertyMeta, ClientListFetchQueryRequest, ClientListFetchQueryResponse, ClientListFetchRecord, ClientListFetchRecordState, ClientListFetchRequestDisplay, ClientListFetchRequestFilter, ClientListFetchSchema, ClientListFetchStateKey, ClientListFetchTableColumn, ClientListFetchValueCell, ClientListFormConfiguration, ClientListInformativeChartLink, ClientListInformativeConfiguration, ClientListInformativeDashboardPayload, ClientListInformativeState, ClientListItemClickedEvent, ClientListLayoutConfig, ClientListLazyLoadEvent, ClientListMode, ClientListRecordEscalationState, ClientListRecordProjectionStatus, ClientListRecordWriteResult, ClientListReturnRecordRequest, ClientListRowsFetchResult, ClientListRuntimeContext, ClientListRuntimeRecordActionsConfig, ClientListRuntimeRecordActionsContext, ClientListState, ClientListTableDisplayConfig, ClientListTablePersistStateKey, ClientListTableQuery, ClientListTableSettingsCatalogResponse, ClientListTableSettingsColumn, ClientListTableState, ClientListTableTransform, ClientListTableTransformResult, ClientListToolbarBucket, ClientListType, NormalizedClientListConfiguration, NormalizedClientListTableDisplayConfig, Response, RuntimeEntityColumnDef, RuntimeTableDisplayRow, RuntimeTableRowsResponse };
|
|
1119
|
+
export { CLIENT_LIST_DEFAULT_INCLUDE_STATE, CLIENT_LIST_RECORD_ID_FILTER_KEY, CLIENT_LIST_RECORD_SOURCE_KEY, CLIENT_LIST_RECORD_STATE_KEY, ClientList, ClientListApiService, ClientListRuntimeActionsService, ClientListStateService, ClientListToolbarService, defaultResolveRecordId, findClientListSourceGroup, findClientListTotal, isClientListTotalIncomplete, readClientListRowSource };
|
|
1120
|
+
export type { ClientListAreaType, ClientListBaseConfiguration, ClientListBaseState, ClientListCard, ClientListCardModule, ClientListCardProperty, ClientListCardsPayload, ClientListCardsState, ClientListClickableItem, ClientListCollapseConfig, ClientListConfiguration, ClientListContentTemplateContext, ClientListDataLoadedHandler, ClientListFetchCardDisplayOrderItem, ClientListFetchCardGroup, ClientListFetchCatalog, ClientListFetchHierarchyScope, ClientListFetchProjection, ClientListFetchProjectionMeta, ClientListFetchPropertyMeta, ClientListFetchQueryRequest, ClientListFetchQueryResponse, ClientListFetchRecord, ClientListFetchRecordSource, ClientListFetchRecordState, ClientListFetchRequestDisplay, ClientListFetchRequestFilter, ClientListFetchSchema, ClientListFetchSourceGroup, ClientListFetchStateKey, ClientListFetchSum, ClientListFetchTableColumn, ClientListFetchValueCell, ClientListFormConfiguration, ClientListInformativeChartLink, ClientListInformativeConfiguration, ClientListInformativeDashboardPayload, ClientListInformativeState, ClientListItemClickedEvent, ClientListLayoutConfig, ClientListLazyLoadEvent, ClientListMode, ClientListRecordEscalationState, ClientListRecordProjectionStatus, ClientListRecordWriteResult, ClientListReturnRecordRequest, ClientListRowsFetchResult, ClientListRuntimeContext, ClientListRuntimeRecordActionsConfig, ClientListRuntimeRecordActionsContext, ClientListState, ClientListTableDisplayConfig, ClientListTablePersistStateKey, ClientListTableQuery, ClientListTableSettingsCatalogResponse, ClientListTableSettingsColumn, ClientListTableState, ClientListTableTransform, ClientListTableTransformResult, ClientListToolbarBucket, ClientListToolbarDefaults, ClientListType, NormalizedClientListConfiguration, NormalizedClientListTableDisplayConfig, Response, RuntimeEntityColumnDef, RuntimeTableDisplayRow, RuntimeTableRowsResponse };
|