@masterteam/work-center 0.0.99 → 0.0.101
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/assets/i18n/ar.json +217 -217
- package/assets/i18n/en.json +217 -217
- package/assets/work-center.css +2 -2
- package/fesm2022/masterteam-work-center-state.mjs +1287 -0
- package/fesm2022/masterteam-work-center-state.mjs.map +1 -0
- package/fesm2022/{masterteam-work-center-work-center-process-preview-jbm4vnuM.mjs → masterteam-work-center-work-center-process-preview-BOWFfPh5.mjs} +27 -19
- package/fesm2022/masterteam-work-center-work-center-process-preview-BOWFfPh5.mjs.map +1 -0
- package/fesm2022/masterteam-work-center.mjs +324 -1395
- package/fesm2022/masterteam-work-center.mjs.map +1 -1
- package/package.json +13 -7
- package/types/masterteam-work-center-state.d.ts +510 -0
- package/types/masterteam-work-center.d.ts +13 -533
- package/fesm2022/masterteam-work-center-work-center-process-preview-jbm4vnuM.mjs.map +0 -1
|
@@ -1,316 +1,21 @@
|
|
|
1
|
-
import * as _masterteam_components_table from '@masterteam/components/table';
|
|
2
|
-
import { ColumnDef, TableFilters, TablePersistStateKey } from '@masterteam/components/table';
|
|
3
1
|
import * as _masterteam_components_statistic_card from '@masterteam/components/statistic-card';
|
|
4
|
-
import
|
|
2
|
+
import * as _masterteam_components_types_masterteam_components_table from '@masterteam/components/types/masterteam-components-table';
|
|
5
3
|
import * as _masterteam_work_center from '@masterteam/work-center';
|
|
6
4
|
import * as _angular_core from '@angular/core';
|
|
7
5
|
import { Type, InjectionToken, OnDestroy } from '@angular/core';
|
|
8
6
|
import { ClientPageMenuItem } from '@masterteam/components/client-page-menu';
|
|
9
7
|
import { PropertyFilterBuilderSchema, PropertyFilterBuilderRule } from '@masterteam/components/property-filter-builder';
|
|
10
8
|
import { ClientLookup, ClientForm, ClientFormSubmitRequestMapper, ProcessFormSubmitResponse } from '@masterteam/forms/client-form';
|
|
11
|
-
import {
|
|
9
|
+
import { WorkCenterArea, WorkCenterBootstrapInputs, WorkCenterItemModalOptions, WorkCenterClientFormModalOptions, WorkCenterFilterRule, WorkCenterSortRule, WorkCenterRuntimeFilterSchema, WorkCenterClientFormModalData, WorkCenterItemBasicInfoData, WorkCenterLookups, WorkCenterPreviewLevelTarget, WorkCenterItemActionExecutionResult, WorkCenterRuntimeItemAction } from '@masterteam/work-center/state';
|
|
10
|
+
export * from '@masterteam/work-center/state';
|
|
12
11
|
import { ModalRef } from '@masterteam/components/dialog';
|
|
13
12
|
import { DrawerController } from '@masterteam/components/dynamic-drawer';
|
|
14
13
|
import { ModalService } from '@masterteam/components/modal';
|
|
15
14
|
import { OptionItem } from '@masterteam/components/tabs';
|
|
16
15
|
import { MTIcon } from '@masterteam/icons';
|
|
17
|
-
import * as rxjs from 'rxjs';
|
|
18
16
|
import { Observable } from 'rxjs';
|
|
19
17
|
import { ClientInstancePreviewConfig } from '@masterteam/client-components/client-instance-preview';
|
|
20
18
|
import { EntityData } from '@masterteam/components/entities';
|
|
21
|
-
import * as _masterteam_components_types_masterteam_components_statistic_card from '@masterteam/components/types/masterteam-components-statistic-card';
|
|
22
|
-
import * as _masterteam_components_types_masterteam_components_table from '@masterteam/components/types/masterteam-components-table';
|
|
23
|
-
import * as _masterteam_components_types_masterteam_components_client_page_menu from '@masterteam/components/types/masterteam-components-client-page-menu';
|
|
24
|
-
import { StateContext } from '@ngxs/store';
|
|
25
|
-
|
|
26
|
-
type WorkCenterArea = 'MyInbox' | 'TasksCenter' | 'Workspace';
|
|
27
|
-
type WorkCenterItemContextKey = string;
|
|
28
|
-
type WorkCenterLookups = ClientLookup[];
|
|
29
|
-
declare enum WorkCenterActionKey {
|
|
30
|
-
LoadRuntime = "loadRuntime"
|
|
31
|
-
}
|
|
32
|
-
declare const WORK_CENTER_QUERY_VERSION = 1;
|
|
33
|
-
declare const WORK_CENTER_MAX_PAGE_SIZE = 100;
|
|
34
|
-
declare const WORK_CENTER_MAX_FILTERS = 20;
|
|
35
|
-
declare const WORK_CENTER_MAX_SORT = 5;
|
|
36
|
-
/**
|
|
37
|
-
* Backend column key carrying the row's LevelData display label
|
|
38
|
-
* (`extra.levelDataName`). Grouping by it maps to a single backend sort on the
|
|
39
|
-
* same key — see `WORK_CENTER_LEVEL_GROUP_FIELD` for the grouping identity.
|
|
40
|
-
*/
|
|
41
|
-
declare const WORK_CENTER_LEVEL_NAME_KEY = "levelDataName";
|
|
42
|
-
/**
|
|
43
|
-
* Synthetic per-row field holding the *identity* behind the Level Name column.
|
|
44
|
-
* The visible label is ambiguous (two LevelData records may share a name), so
|
|
45
|
-
* rows are bucketed by `context.levelDataId` instead — except rows with no
|
|
46
|
-
* visible label, which get an empty identity so they all collapse into the one
|
|
47
|
-
* shared "—" group the backend contract requires.
|
|
48
|
-
*/
|
|
49
|
-
declare const WORK_CENTER_LEVEL_GROUP_FIELD = "__mtLevelGroup";
|
|
50
|
-
/** Rendered in place of a missing / restricted LevelData label. */
|
|
51
|
-
declare const WORK_CENTER_EMPTY_LABEL = "\u2014";
|
|
52
|
-
/**
|
|
53
|
-
* Bootstrap `group` value meaning "the user turned grouping off". Needed
|
|
54
|
-
* because an absent `group` means "not chosen yet" and falls back to the
|
|
55
|
-
* default grouping — without a distinct value, clearing the group would be
|
|
56
|
-
* undone by the next navigation.
|
|
57
|
-
*/
|
|
58
|
-
declare const WORK_CENTER_GROUP_NONE = "none";
|
|
59
|
-
interface ApiEnvelope<T> {
|
|
60
|
-
endpoint: string | null;
|
|
61
|
-
status: number;
|
|
62
|
-
code: 1 | 2;
|
|
63
|
-
locale: string | null;
|
|
64
|
-
message: string | null;
|
|
65
|
-
errors: unknown;
|
|
66
|
-
data: T;
|
|
67
|
-
cacheSession: string | null;
|
|
68
|
-
}
|
|
69
|
-
interface TranslatableDto {
|
|
70
|
-
display: string;
|
|
71
|
-
en: string;
|
|
72
|
-
ar: string;
|
|
73
|
-
}
|
|
74
|
-
interface WorkCenterSortRule {
|
|
75
|
-
field: string;
|
|
76
|
-
dir: 'asc' | 'desc';
|
|
77
|
-
}
|
|
78
|
-
type WorkCenterFilterOperator = 'Eq' | 'Neq' | 'In' | 'Contains' | 'StartsWith' | 'Gt' | 'Gte' | 'Lt' | 'Lte' | 'Between' | 'IsNull' | 'IsNotNull';
|
|
79
|
-
interface WorkCenterFilterRule {
|
|
80
|
-
field: string;
|
|
81
|
-
op: WorkCenterFilterOperator;
|
|
82
|
-
value?: unknown;
|
|
83
|
-
values?: unknown[];
|
|
84
|
-
from?: unknown;
|
|
85
|
-
to?: unknown;
|
|
86
|
-
}
|
|
87
|
-
interface WorkCenterRuntimeProperty {
|
|
88
|
-
id?: number;
|
|
89
|
-
key: string;
|
|
90
|
-
normalizedKey?: string;
|
|
91
|
-
name?: TranslatableDto;
|
|
92
|
-
description?: TranslatableDto;
|
|
93
|
-
viewType?: string;
|
|
94
|
-
}
|
|
95
|
-
interface WorkCenterRuntimeOperatorOption {
|
|
96
|
-
value: WorkCenterFilterOperator;
|
|
97
|
-
display?: TranslatableDto;
|
|
98
|
-
}
|
|
99
|
-
interface WorkCenterRuntimeFilterSchema {
|
|
100
|
-
properties?: WorkCenterRuntimeProperty[];
|
|
101
|
-
allowedFields?: string[];
|
|
102
|
-
allowedOperators: Array<WorkCenterFilterOperator | WorkCenterRuntimeOperatorOption>;
|
|
103
|
-
}
|
|
104
|
-
interface WorkCenterColumnsConfig {
|
|
105
|
-
columns?: string[];
|
|
106
|
-
properties?: WorkCenterRuntimeProperty[];
|
|
107
|
-
}
|
|
108
|
-
interface WorkCenterRuntimeRequest {
|
|
109
|
-
area: WorkCenterArea;
|
|
110
|
-
templateId?: number | null;
|
|
111
|
-
levelDataId?: number | null;
|
|
112
|
-
selectedCardKey?: string | null;
|
|
113
|
-
page: number;
|
|
114
|
-
pageSize: number;
|
|
115
|
-
sort: WorkCenterSortRule[];
|
|
116
|
-
runtimeFilters: WorkCenterFilterRule[];
|
|
117
|
-
includeStats: boolean;
|
|
118
|
-
}
|
|
119
|
-
interface WorkCenterRuntimeCard {
|
|
120
|
-
key: string;
|
|
121
|
-
name: TranslatableDto;
|
|
122
|
-
icon: string | null;
|
|
123
|
-
urlTemplate?: string | null;
|
|
124
|
-
runtimeFilterSchema?: WorkCenterRuntimeFilterSchema | null;
|
|
125
|
-
columnsConfig?: WorkCenterColumnsConfig | null;
|
|
126
|
-
count: number;
|
|
127
|
-
isAvailable: boolean;
|
|
128
|
-
}
|
|
129
|
-
interface WorkCenterRuntimeStatsItem {
|
|
130
|
-
key: string;
|
|
131
|
-
label: TranslatableDto;
|
|
132
|
-
count: number;
|
|
133
|
-
/**
|
|
134
|
-
* Backend-owned accent color for the KPI card (typically a `#hex` status
|
|
135
|
-
* color). `null` means "no color configured" — the card falls back to the
|
|
136
|
-
* neutral theme accent. Never derive a color from `key`/`label`.
|
|
137
|
-
*/
|
|
138
|
-
color?: string | null;
|
|
139
|
-
}
|
|
140
|
-
interface WorkCenterRuntimePagination {
|
|
141
|
-
page: number;
|
|
142
|
-
pageSize: number;
|
|
143
|
-
totalCount: number;
|
|
144
|
-
}
|
|
145
|
-
interface WorkCenterRuntimeSelectedCard {
|
|
146
|
-
key: string;
|
|
147
|
-
pagination: WorkCenterRuntimePagination;
|
|
148
|
-
stats: WorkCenterRuntimeStatsItem[];
|
|
149
|
-
items: Record<string, unknown>[];
|
|
150
|
-
runtimeFilterSchema?: WorkCenterRuntimeFilterSchema | null;
|
|
151
|
-
columnsConfig?: WorkCenterColumnsConfig | null;
|
|
152
|
-
}
|
|
153
|
-
interface WorkCenterRuntimeWarningDto {
|
|
154
|
-
code: string;
|
|
155
|
-
message: string;
|
|
156
|
-
cardKey: string | null;
|
|
157
|
-
source: string | null;
|
|
158
|
-
}
|
|
159
|
-
interface WorkCenterRuntimeResponseData {
|
|
160
|
-
area: WorkCenterArea;
|
|
161
|
-
cards: WorkCenterRuntimeCard[];
|
|
162
|
-
selectedCard: WorkCenterRuntimeSelectedCard | null;
|
|
163
|
-
warnings: WorkCenterRuntimeWarningDto[];
|
|
164
|
-
}
|
|
165
|
-
interface WorkCenterItemBasicInfoData {
|
|
166
|
-
cardKey: string | null;
|
|
167
|
-
sourceType: string | null;
|
|
168
|
-
type: string | null;
|
|
169
|
-
item: Record<string, unknown> | null;
|
|
170
|
-
warnings: WorkCenterRuntimeWarningDto[];
|
|
171
|
-
}
|
|
172
|
-
interface WorkCenterRuntimeItemAction {
|
|
173
|
-
actionKey: string;
|
|
174
|
-
actionName?: TranslatableDto | null;
|
|
175
|
-
httpMethod?: string | null;
|
|
176
|
-
url?: string | null;
|
|
177
|
-
isAvailable?: boolean;
|
|
178
|
-
afterSuccess?: WorkCenterItemActionAfterSuccess | null;
|
|
179
|
-
stepIds?: Array<number | string>;
|
|
180
|
-
needConfirmation?: boolean;
|
|
181
|
-
payloadKeys?: string[];
|
|
182
|
-
requiredPayloadKeys?: string[];
|
|
183
|
-
payloadTemplate?: Record<string, unknown> | null;
|
|
184
|
-
formId?: string | number | null;
|
|
185
|
-
}
|
|
186
|
-
type WorkCenterItemActionAfterSuccess = 'refresh' | 'close';
|
|
187
|
-
interface WorkCenterItemActionExecutionResult {
|
|
188
|
-
actionKey: string;
|
|
189
|
-
afterSuccess: WorkCenterItemActionAfterSuccess;
|
|
190
|
-
}
|
|
191
|
-
interface WorkCenterPreviewLevelTarget {
|
|
192
|
-
levelId: number | string;
|
|
193
|
-
levelDataId: number | string;
|
|
194
|
-
/**
|
|
195
|
-
* Module the previewed item belongs to, when the item resolves to one. The
|
|
196
|
-
* host uses it to land on that module's workspace tab instead of the
|
|
197
|
-
* workspace default tab.
|
|
198
|
-
*/
|
|
199
|
-
moduleId?: number | string | null;
|
|
200
|
-
/**
|
|
201
|
-
* Display name of that module, when the item resolves to one. Used to label
|
|
202
|
-
* the preview button as "Preview {module name}" instead of the generic
|
|
203
|
-
* "Preview Level".
|
|
204
|
-
*/
|
|
205
|
-
moduleName?: string | null;
|
|
206
|
-
}
|
|
207
|
-
interface WorkCenterItemActionsData {
|
|
208
|
-
cardKey: string | null;
|
|
209
|
-
sourceType: string | null;
|
|
210
|
-
type: string | null;
|
|
211
|
-
context: Record<string, unknown> | null;
|
|
212
|
-
actions: WorkCenterRuntimeItemAction[];
|
|
213
|
-
warnings: WorkCenterRuntimeWarningDto[];
|
|
214
|
-
}
|
|
215
|
-
interface WorkCenterContext {
|
|
216
|
-
area: WorkCenterArea;
|
|
217
|
-
templateId: number | null;
|
|
218
|
-
levelDataId: number | null;
|
|
219
|
-
selectedCardKey: string | null;
|
|
220
|
-
page: number;
|
|
221
|
-
pageSize: number;
|
|
222
|
-
sort: WorkCenterSortRule[];
|
|
223
|
-
runtimeFilters: WorkCenterFilterRule[];
|
|
224
|
-
includeStats: boolean;
|
|
225
|
-
}
|
|
226
|
-
interface WorkCenterAreaState {
|
|
227
|
-
context: WorkCenterContext;
|
|
228
|
-
/**
|
|
229
|
-
* Rules from the page-header property-filter-builder. Combined with
|
|
230
|
-
* `columnFilters` to produce `context.runtimeFilters` sent to the BE.
|
|
231
|
-
*/
|
|
232
|
-
headerFilters: WorkCenterFilterRule[];
|
|
233
|
-
/**
|
|
234
|
-
* Rules translated from the in-table column filters. Combined with
|
|
235
|
-
* `headerFilters` to produce `context.runtimeFilters` sent to the BE.
|
|
236
|
-
* Same `(field, op)` pair from this slice overrides a header rule.
|
|
237
|
-
*/
|
|
238
|
-
columnFilters: WorkCenterFilterRule[];
|
|
239
|
-
/**
|
|
240
|
-
* Column key the table groups rows by. UI-only — never part of the runtime
|
|
241
|
-
* request; grouping is expressed to the backend as `context.sort`.
|
|
242
|
-
*/
|
|
243
|
-
groupBy: string | null;
|
|
244
|
-
menuItems: ClientPageMenuItem[];
|
|
245
|
-
rows: Record<string, unknown>[];
|
|
246
|
-
columns: ColumnDef[];
|
|
247
|
-
kpis: StatisticCardData[];
|
|
248
|
-
runtimeFilterSchema: WorkCenterRuntimeFilterSchema | null;
|
|
249
|
-
totalCount: number;
|
|
250
|
-
warnings: WorkCenterRuntimeWarningDto[];
|
|
251
|
-
lastLoadedAt: string | null;
|
|
252
|
-
}
|
|
253
|
-
interface WorkCenterStateModel extends LoadingStateShape<WorkCenterActionKey> {
|
|
254
|
-
activeArea: WorkCenterArea;
|
|
255
|
-
byArea: Record<WorkCenterArea, WorkCenterAreaState>;
|
|
256
|
-
lookups: WorkCenterLookups;
|
|
257
|
-
}
|
|
258
|
-
interface WorkCenterHydratePatch {
|
|
259
|
-
selectedCardKey?: string | null;
|
|
260
|
-
page?: number;
|
|
261
|
-
pageSize?: number;
|
|
262
|
-
templateId?: number | null;
|
|
263
|
-
levelDataId?: number | null;
|
|
264
|
-
sort?: WorkCenterSortRule[];
|
|
265
|
-
runtimeFilters?: WorkCenterFilterRule[];
|
|
266
|
-
}
|
|
267
|
-
interface WorkCenterBootstrapInputs {
|
|
268
|
-
card?: unknown;
|
|
269
|
-
page?: unknown;
|
|
270
|
-
pageSize?: unknown;
|
|
271
|
-
templateId?: unknown;
|
|
272
|
-
levelDataId?: unknown;
|
|
273
|
-
sort?: unknown;
|
|
274
|
-
filters?: unknown;
|
|
275
|
-
/** Grouped column key, so a grouped view survives reload / deep-link. */
|
|
276
|
-
group?: unknown;
|
|
277
|
-
}
|
|
278
|
-
interface WorkCenterItemModalComponentInput {
|
|
279
|
-
contextKey: WorkCenterItemContextKey;
|
|
280
|
-
}
|
|
281
|
-
interface WorkCenterItemModalOptions {
|
|
282
|
-
component?: Type<unknown> | null;
|
|
283
|
-
header?: string;
|
|
284
|
-
styleClass?: string;
|
|
285
|
-
appendTo?: string | HTMLElement | null;
|
|
286
|
-
position?: 'start' | 'end' | 'left' | 'right';
|
|
287
|
-
}
|
|
288
|
-
interface WorkCenterClientFormModalData {
|
|
289
|
-
moduleKey: string;
|
|
290
|
-
moduleId?: number | string;
|
|
291
|
-
levelId?: number | string;
|
|
292
|
-
levelDataId?: number | string;
|
|
293
|
-
moduleDataId?: number | string;
|
|
294
|
-
/**
|
|
295
|
-
* The record an action operation targets. Not a synonym for `moduleDataId`:
|
|
296
|
-
* a schedule item (Task / Milestone / Deliverable) is not stored in the
|
|
297
|
-
* module data store, so an operation on one carries `recordId` alone — and
|
|
298
|
-
* without it `process-form-load` resolves the operation's fields with none of
|
|
299
|
-
* the record's current values.
|
|
300
|
-
*/
|
|
301
|
-
recordId?: number | string;
|
|
302
|
-
}
|
|
303
|
-
interface WorkCenterClientFormModalOptions {
|
|
304
|
-
data?: Partial<WorkCenterClientFormModalData>;
|
|
305
|
-
operationKey?: string;
|
|
306
|
-
header?: string;
|
|
307
|
-
styleClass?: string;
|
|
308
|
-
closeOnPendingApproval?: boolean;
|
|
309
|
-
buttonLabel?: string;
|
|
310
|
-
buttonIcon?: string;
|
|
311
|
-
lookups?: ClientLookup[];
|
|
312
|
-
}
|
|
313
|
-
type WorkCenterLoadReason = 'route-enter' | 'menu-change' | 'filters-change' | 'group-change' | 'table-lazy' | 'refresh' | 'manual';
|
|
314
19
|
|
|
315
20
|
declare class WorkCenterPage {
|
|
316
21
|
private readonly facade;
|
|
@@ -350,7 +55,6 @@ declare class WorkCenterPage {
|
|
|
350
55
|
readonly groupChanged: _angular_core.OutputEmitterRef<string | null>;
|
|
351
56
|
protected readonly context: _angular_core.Signal<_masterteam_work_center.WorkCenterContext>;
|
|
352
57
|
protected readonly headerFilters: _angular_core.Signal<WorkCenterFilterRule[]>;
|
|
353
|
-
protected readonly tableFilters: _angular_core.WritableSignal<TableFilters>;
|
|
354
58
|
protected readonly selectedItemContextKey: _angular_core.WritableSignal<string | null>;
|
|
355
59
|
private readonly _menuItems;
|
|
356
60
|
protected readonly menuItems: _angular_core.Signal<{
|
|
@@ -367,40 +71,13 @@ declare class WorkCenterPage {
|
|
|
367
71
|
childrenLoading?: boolean;
|
|
368
72
|
}[]>;
|
|
369
73
|
protected readonly rows: _angular_core.Signal<Record<string, unknown>[]>;
|
|
370
|
-
protected readonly columns: _angular_core.Signal<ColumnDef[]>;
|
|
74
|
+
protected readonly columns: _angular_core.Signal<_masterteam_components_types_masterteam_components_table.ColumnDef[]>;
|
|
371
75
|
protected readonly kpis: _angular_core.Signal<_masterteam_components_statistic_card.StatisticCardData[]>;
|
|
372
76
|
protected readonly runtimeFilterSchema: _angular_core.Signal<WorkCenterRuntimeFilterSchema | null>;
|
|
373
77
|
protected readonly totalCount: _angular_core.Signal<number>;
|
|
374
78
|
protected readonly columnFilters: _angular_core.Signal<WorkCenterFilterRule[]>;
|
|
375
79
|
protected readonly loading: _angular_core.Signal<boolean>;
|
|
376
80
|
protected readonly groupBy: _angular_core.Signal<string | null>;
|
|
377
|
-
/**
|
|
378
|
-
* Sort and grouping live in the runtime query (and the host's URL), not in
|
|
379
|
-
* table storage — persisting them locally would let a restored table claim a
|
|
380
|
-
* grouping the backend query no longer has. Stable reference: a fresh array
|
|
381
|
-
* per change detection would re-run the table's persistence effect.
|
|
382
|
-
*/
|
|
383
|
-
protected readonly persistStateExclude: TablePersistStateKey[];
|
|
384
|
-
protected readonly tableColumns: _angular_core.Signal<{
|
|
385
|
-
sortable: boolean;
|
|
386
|
-
key: string;
|
|
387
|
-
label: string;
|
|
388
|
-
type?: _masterteam_components_table.ColumnType;
|
|
389
|
-
customCellTpl?: _angular_core.TemplateRef<any>;
|
|
390
|
-
filterConfig?: _masterteam_components_table.FilterConfig;
|
|
391
|
-
statusMap?: Record<string, _masterteam_components_table.TableStatusMapValue>;
|
|
392
|
-
groupable?: boolean;
|
|
393
|
-
groupKey?: string;
|
|
394
|
-
showGroupColumnLabel?: boolean;
|
|
395
|
-
readonly?: boolean;
|
|
396
|
-
width?: string;
|
|
397
|
-
align?: "start" | "center" | "end";
|
|
398
|
-
shrink?: boolean;
|
|
399
|
-
filterOnly?: boolean;
|
|
400
|
-
filterable?: boolean;
|
|
401
|
-
exportable?: boolean;
|
|
402
|
-
exportValue?: (row: any) => string | number | boolean | null;
|
|
403
|
-
}[]>;
|
|
404
81
|
/**
|
|
405
82
|
* Grouping is executed by the backend as a single sort, so the table's own
|
|
406
83
|
* sort state is driven from the query we actually sent instead of the
|
|
@@ -446,7 +123,13 @@ declare class WorkCenterPage {
|
|
|
446
123
|
* fires straight after carries the same sort and lands as a no-op.
|
|
447
124
|
*/
|
|
448
125
|
onTableGroupByChange(key: string | null): void;
|
|
449
|
-
|
|
126
|
+
onGridFiltersChange(filters: WorkCenterFilterRule[]): void;
|
|
127
|
+
onGridQueryChange(event: {
|
|
128
|
+
currentPage: number;
|
|
129
|
+
pageSize: number;
|
|
130
|
+
sortField: string | null;
|
|
131
|
+
sortOrder: number;
|
|
132
|
+
}): void;
|
|
450
133
|
/**
|
|
451
134
|
* Announces the backend sort to the host only when it actually moved, so a
|
|
452
135
|
* host that mirrors it into the URL doesn't churn history on every page hit.
|
|
@@ -579,9 +262,6 @@ declare class WorkCenterItemModalRoute {
|
|
|
579
262
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WorkCenterItemModalRoute, "mt-work-center-item-modal-route", never, { "contextKey": { "alias": "contextKey"; "required": false; "isSignal": true; }; "manageRouteOutlet": { "alias": "manageRouteOutlet"; "required": false; "isSignal": true; }; "showPreviewLevelAction": { "alias": "showPreviewLevelAction"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "drawerStyleClass": { "alias": "drawerStyleClass"; "required": false; "isSignal": true; }; }, { "previewLevel": "previewLevel"; "closed": "closed"; }, never, never, true, never>;
|
|
580
263
|
}
|
|
581
264
|
|
|
582
|
-
declare function encodeWorkCenterRouteContextKey(contextKey: WorkCenterItemContextKey): string;
|
|
583
|
-
declare function decodeWorkCenterRouteContextKey(value: WorkCenterItemContextKey | null): WorkCenterItemContextKey | null;
|
|
584
|
-
|
|
585
265
|
/**
|
|
586
266
|
* A detail component a host can register for a Work Center item, keyed by the
|
|
587
267
|
* item's `type` or - for operations that reuse an existing type - by
|
|
@@ -1052,205 +732,5 @@ declare class WorkCenterSchedulePublishType implements OnDestroy {
|
|
|
1052
732
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WorkCenterSchedulePublishType, "mt-work-center-schedule-publish-type", never, { "details": { "alias": "details"; "required": true; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1053
733
|
}
|
|
1054
734
|
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
static readonly type = "[WorkCenter] Enter Area";
|
|
1058
|
-
constructor(area: WorkCenterArea);
|
|
1059
|
-
}
|
|
1060
|
-
declare class HydrateFromContext {
|
|
1061
|
-
area: WorkCenterArea;
|
|
1062
|
-
patch: WorkCenterHydratePatch;
|
|
1063
|
-
static readonly type = "[WorkCenter] Hydrate From Context";
|
|
1064
|
-
constructor(area: WorkCenterArea, patch: WorkCenterHydratePatch);
|
|
1065
|
-
}
|
|
1066
|
-
declare class SetParams {
|
|
1067
|
-
area: WorkCenterArea;
|
|
1068
|
-
inputs: WorkCenterBootstrapInputs;
|
|
1069
|
-
static readonly type = "[WorkCenter] Set Params";
|
|
1070
|
-
constructor(area: WorkCenterArea, inputs: WorkCenterBootstrapInputs);
|
|
1071
|
-
}
|
|
1072
|
-
declare class SetLookups {
|
|
1073
|
-
lookups: WorkCenterLookups;
|
|
1074
|
-
static readonly type = "[WorkCenter] Set Lookups";
|
|
1075
|
-
constructor(lookups: WorkCenterLookups);
|
|
1076
|
-
}
|
|
1077
|
-
declare class LoadRuntime {
|
|
1078
|
-
area: WorkCenterArea;
|
|
1079
|
-
reason: WorkCenterLoadReason;
|
|
1080
|
-
static readonly type = "[WorkCenter] Load Runtime";
|
|
1081
|
-
constructor(area: WorkCenterArea, reason?: WorkCenterLoadReason);
|
|
1082
|
-
}
|
|
1083
|
-
/**
|
|
1084
|
-
* Replaces the header filter slice (rules from
|
|
1085
|
-
* `mt-property-filter-builder`). Resets `page` to 1 and triggers a
|
|
1086
|
-
* BE reload with the merged `headerFilters` + `columnFilters` payload.
|
|
1087
|
-
*/
|
|
1088
|
-
declare class ApplyHeaderFilters {
|
|
1089
|
-
area: WorkCenterArea;
|
|
1090
|
-
filters: WorkCenterFilterRule[];
|
|
1091
|
-
static readonly type = "[WorkCenter] Apply Header Filters";
|
|
1092
|
-
constructor(area: WorkCenterArea, filters: WorkCenterFilterRule[]);
|
|
1093
|
-
}
|
|
1094
|
-
/**
|
|
1095
|
-
* Replaces the in-table column filter slice (rules translated from the
|
|
1096
|
-
* `mt-table` filters map). Resets `page` to 1 and triggers a BE reload
|
|
1097
|
-
* with the merged `headerFilters` + `columnFilters` payload.
|
|
1098
|
-
*/
|
|
1099
|
-
declare class ApplyColumnFilters {
|
|
1100
|
-
area: WorkCenterArea;
|
|
1101
|
-
filters: WorkCenterFilterRule[];
|
|
1102
|
-
static readonly type = "[WorkCenter] Apply Column Filters";
|
|
1103
|
-
constructor(area: WorkCenterArea, filters: WorkCenterFilterRule[]);
|
|
1104
|
-
}
|
|
1105
|
-
/**
|
|
1106
|
-
* Switches the selected card and drops everything that was scoped to the
|
|
1107
|
-
* previous one: advanced filters, in-table column filters, grouping and the
|
|
1108
|
-
* sort that grouping implied. Each card brings its own columns and filter
|
|
1109
|
-
* schema, so carrying those over would filter on fields the new card doesn't
|
|
1110
|
-
* have and group by a column it doesn't show.
|
|
1111
|
-
*/
|
|
1112
|
-
declare class SelectCard {
|
|
1113
|
-
area: WorkCenterArea;
|
|
1114
|
-
selectedCardKey: string;
|
|
1115
|
-
static readonly type = "[WorkCenter] Select Card";
|
|
1116
|
-
constructor(area: WorkCenterArea, selectedCardKey: string);
|
|
1117
|
-
}
|
|
1118
|
-
/**
|
|
1119
|
-
* Sets the grouped column. Grouping is expressed to the backend as a single
|
|
1120
|
-
* sort on the same field, so this also rewrites `context.sort` and resets
|
|
1121
|
-
* `page` to 1 before reloading. `groupBy: null` clears both.
|
|
1122
|
-
*/
|
|
1123
|
-
declare class SetGroupBy {
|
|
1124
|
-
area: WorkCenterArea;
|
|
1125
|
-
groupBy: string | null;
|
|
1126
|
-
dir: 'asc' | 'desc';
|
|
1127
|
-
static readonly type = "[WorkCenter] Set Group By";
|
|
1128
|
-
constructor(area: WorkCenterArea, groupBy: string | null, dir?: 'asc' | 'desc');
|
|
1129
|
-
}
|
|
1130
|
-
/**
|
|
1131
|
-
* Clears both the header filter slice and the column filter slice in one
|
|
1132
|
-
* state update, triggering a single BE reload.
|
|
1133
|
-
*/
|
|
1134
|
-
declare class ClearAllFilters {
|
|
1135
|
-
area: WorkCenterArea;
|
|
1136
|
-
static readonly type = "[WorkCenter] Clear All Filters";
|
|
1137
|
-
constructor(area: WorkCenterArea);
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
declare class WorkCenterFacade {
|
|
1141
|
-
private readonly store;
|
|
1142
|
-
readonly activeArea: _angular_core.Signal<WorkCenterArea>;
|
|
1143
|
-
readonly context: _angular_core.Signal<WorkCenterContext>;
|
|
1144
|
-
readonly menuItems: _angular_core.Signal<_masterteam_components_types_masterteam_components_client_page_menu.ClientPageMenuItem[]>;
|
|
1145
|
-
readonly rows: _angular_core.Signal<Record<string, unknown>[]>;
|
|
1146
|
-
readonly columns: _angular_core.Signal<_masterteam_components_types_masterteam_components_table.ColumnDef[]>;
|
|
1147
|
-
readonly kpis: _angular_core.Signal<_masterteam_components_types_masterteam_components_statistic_card.StatisticCardData[]>;
|
|
1148
|
-
readonly lookups: _angular_core.Signal<WorkCenterLookups>;
|
|
1149
|
-
readonly runtimeFilterSchema: _angular_core.Signal<_masterteam_work_center.WorkCenterRuntimeFilterSchema | null>;
|
|
1150
|
-
readonly headerFilters: _angular_core.Signal<WorkCenterFilterRule[]>;
|
|
1151
|
-
readonly columnFilters: _angular_core.Signal<WorkCenterFilterRule[]>;
|
|
1152
|
-
readonly groupBy: _angular_core.Signal<string | null>;
|
|
1153
|
-
readonly totalCount: _angular_core.Signal<number>;
|
|
1154
|
-
readonly warnings: _angular_core.Signal<_masterteam_work_center.WorkCenterRuntimeWarningDto[]>;
|
|
1155
|
-
private readonly loadingActive;
|
|
1156
|
-
private readonly errors;
|
|
1157
|
-
readonly loading: _angular_core.Signal<boolean>;
|
|
1158
|
-
readonly error: _angular_core.Signal<string | null>;
|
|
1159
|
-
/**
|
|
1160
|
-
* Snapshot reads for callers that must observe state *immediately* after a
|
|
1161
|
-
* dispatch — e.g. an output handler mirroring the runtime query into the URL.
|
|
1162
|
-
* The `select()` signals above are the right choice everywhere else.
|
|
1163
|
-
*/
|
|
1164
|
-
snapshotContext(): WorkCenterContext;
|
|
1165
|
-
snapshotGroupBy(): string | null;
|
|
1166
|
-
enterArea(area: WorkCenterArea): rxjs.Observable<void>;
|
|
1167
|
-
hydrateContext(area: WorkCenterArea, patch: WorkCenterHydratePatch): rxjs.Observable<void>;
|
|
1168
|
-
setParams(area: WorkCenterArea, inputs: WorkCenterBootstrapInputs): rxjs.Observable<void>;
|
|
1169
|
-
setLookups(lookups: WorkCenterLookups): rxjs.Observable<void>;
|
|
1170
|
-
/**
|
|
1171
|
-
* Switches card and drops the previous card's filters, grouping and sort —
|
|
1172
|
-
* each card has its own columns and filter schema.
|
|
1173
|
-
*/
|
|
1174
|
-
selectCardAndLoad(area: WorkCenterArea, selectedCardKey: string): rxjs.Observable<void>;
|
|
1175
|
-
applyTableLazyLoadAndLoad(area: WorkCenterArea, event: any): rxjs.Observable<void> | undefined;
|
|
1176
|
-
applyRuntimeFiltersAndLoad(area: WorkCenterArea, runtimeFilters: WorkCenterFilterRule[]): rxjs.Observable<void>;
|
|
1177
|
-
/**
|
|
1178
|
-
* Replaces the property-filter-builder slice. Resets pagination to page 1
|
|
1179
|
-
* and reloads with merged `headerFilters` + `columnFilters`.
|
|
1180
|
-
*/
|
|
1181
|
-
applyHeaderFiltersAndLoad(area: WorkCenterArea, runtimeFilters: WorkCenterFilterRule[]): rxjs.Observable<void>;
|
|
1182
|
-
/**
|
|
1183
|
-
* Replaces the in-table column filter slice. Resets pagination to page 1
|
|
1184
|
-
* and reloads with merged `headerFilters` + `columnFilters`.
|
|
1185
|
-
*/
|
|
1186
|
-
applyColumnFiltersAndLoad(area: WorkCenterArea, runtimeFilters: WorkCenterFilterRule[]): rxjs.Observable<void>;
|
|
1187
|
-
/**
|
|
1188
|
-
* Groups the table by `groupBy` (or clears grouping with `null`). Pushes the
|
|
1189
|
-
* grouped column down as the single backend sort, resets to page 1 and
|
|
1190
|
-
* reloads. Safe to call from the table's `groupByChange` — the lazy event
|
|
1191
|
-
* that follows carries the same sort and is absorbed as a no-op.
|
|
1192
|
-
*/
|
|
1193
|
-
setGroupByAndLoad(area: WorkCenterArea, groupBy: string | null, dir?: 'asc' | 'desc'): rxjs.Observable<void>;
|
|
1194
|
-
/**
|
|
1195
|
-
* Clears both header and column filter slices in one state update,
|
|
1196
|
-
* triggering a single BE reload.
|
|
1197
|
-
*/
|
|
1198
|
-
clearAllFiltersAndLoad(area: WorkCenterArea): rxjs.Observable<void>;
|
|
1199
|
-
loadRuntime(area: WorkCenterArea, reason?: WorkCenterLoadReason): rxjs.Observable<void>;
|
|
1200
|
-
private toPositiveInt;
|
|
1201
|
-
/**
|
|
1202
|
-
* `mt-table` always reports its sort on a lazy event, so a `null` field is an
|
|
1203
|
-
* explicit "no sort" and must clear `context.sort` (the BE contract asks for
|
|
1204
|
-
* `sort: []`). Only an event with no `sortField` key at all — nothing the
|
|
1205
|
-
* current table emits — leaves the existing sort alone.
|
|
1206
|
-
*/
|
|
1207
|
-
private toSortFromLazyEvent;
|
|
1208
|
-
private isSameSort;
|
|
1209
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WorkCenterFacade, never>;
|
|
1210
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<WorkCenterFacade>;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
declare class WorkCenterState {
|
|
1214
|
-
private readonly http;
|
|
1215
|
-
static getState(state: WorkCenterStateModel): WorkCenterStateModel;
|
|
1216
|
-
static activeArea(state: WorkCenterStateModel): WorkCenterArea;
|
|
1217
|
-
static activeSnapshot(activeArea: WorkCenterArea, state: WorkCenterStateModel): WorkCenterAreaState;
|
|
1218
|
-
static context(snapshot: WorkCenterAreaState): _masterteam_work_center.WorkCenterContext;
|
|
1219
|
-
static menuItems(snapshot: WorkCenterAreaState): _masterteam_components_types_masterteam_components_client_page_menu.ClientPageMenuItem[];
|
|
1220
|
-
static rows(snapshot: WorkCenterAreaState): Record<string, unknown>[];
|
|
1221
|
-
static columns(snapshot: WorkCenterAreaState): _masterteam_components_types_masterteam_components_table.ColumnDef[];
|
|
1222
|
-
static kpis(snapshot: WorkCenterAreaState): _masterteam_components_types_masterteam_components_statistic_card.StatisticCardData[];
|
|
1223
|
-
static runtimeFilterSchema(snapshot: WorkCenterAreaState): WorkCenterRuntimeFilterSchema | null;
|
|
1224
|
-
static headerFilters(snapshot: WorkCenterAreaState): WorkCenterFilterRule[];
|
|
1225
|
-
static columnFilters(snapshot: WorkCenterAreaState): WorkCenterFilterRule[];
|
|
1226
|
-
static groupBy(snapshot: WorkCenterAreaState): string | null;
|
|
1227
|
-
static totalCount(snapshot: WorkCenterAreaState): number;
|
|
1228
|
-
static warnings(snapshot: WorkCenterAreaState): _masterteam_work_center.WorkCenterRuntimeWarningDto[];
|
|
1229
|
-
static lookups(state: WorkCenterStateModel): _masterteam_work_center.WorkCenterLookups;
|
|
1230
|
-
static getLoadingActive(state: WorkCenterStateModel): string[];
|
|
1231
|
-
static getErrors(state: WorkCenterStateModel): Record<string, string | null>;
|
|
1232
|
-
enterArea(ctx: StateContext<WorkCenterStateModel>, action: EnterArea): void;
|
|
1233
|
-
hydrateFromContext(ctx: StateContext<WorkCenterStateModel>, action: HydrateFromContext): void;
|
|
1234
|
-
setParams(ctx: StateContext<WorkCenterStateModel>, action: SetParams): rxjs.Observable<void> | undefined;
|
|
1235
|
-
setLookups(ctx: StateContext<WorkCenterStateModel>, action: SetLookups): void;
|
|
1236
|
-
applyHeaderFilters(ctx: StateContext<WorkCenterStateModel>, action: ApplyHeaderFilters): rxjs.Observable<void> | undefined;
|
|
1237
|
-
applyColumnFilters(ctx: StateContext<WorkCenterStateModel>, action: ApplyColumnFilters): rxjs.Observable<void> | undefined;
|
|
1238
|
-
selectCard(ctx: StateContext<WorkCenterStateModel>, action: SelectCard): rxjs.Observable<void> | undefined;
|
|
1239
|
-
/**
|
|
1240
|
-
* Grouping is a backend concern: the table only renders contiguous rows, so
|
|
1241
|
-
* the grouped column is pushed down as the single `context.sort` entry and
|
|
1242
|
-
* pagination restarts at page 1. Clearing the group sends `sort: []`.
|
|
1243
|
-
*/
|
|
1244
|
-
setGroupBy(ctx: StateContext<WorkCenterStateModel>, action: SetGroupBy): rxjs.Observable<void> | undefined;
|
|
1245
|
-
clearAllFilters(ctx: StateContext<WorkCenterStateModel>, action: ClearAllFilters): rxjs.Observable<void> | undefined;
|
|
1246
|
-
private applyFilterSlice;
|
|
1247
|
-
loadRuntime(ctx: StateContext<WorkCenterStateModel>, action: LoadRuntime): rxjs.Observable<WorkCenterRuntimeResponseData>;
|
|
1248
|
-
private getRuntime;
|
|
1249
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WorkCenterState, never>;
|
|
1250
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<WorkCenterState>;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
declare const APP_STATES: (typeof WorkCenterState)[];
|
|
1254
|
-
|
|
1255
|
-
export { APP_STATES, ApplyColumnFilters, ApplyHeaderFilters, ClearAllFilters, EnterArea, HydrateFromContext, LoadRuntime, SCHEDULE_PUBLISH_GROUP_ORDER, SCHEDULE_PUBLISH_OPERATION_KEY, SelectCard, SetGroupBy, SetLookups, SetParams, WORK_CENTER_ACTION_HANDLERS, WORK_CENTER_EMPTY_LABEL, WORK_CENTER_EXTRA_TABS, WORK_CENTER_GROUP_NONE, WORK_CENTER_HIDDEN_TABS, WORK_CENTER_LEVEL_GROUP_FIELD, WORK_CENTER_LEVEL_NAME_KEY, WORK_CENTER_MAX_FILTERS, WORK_CENTER_MAX_PAGE_SIZE, WORK_CENTER_MAX_SORT, WORK_CENTER_QUERY_VERSION, WORK_CENTER_TYPE_COMPONENTS, WorkCenterActionKey, WorkCenterClientFormModal, WorkCenterFacade, WorkCenterItemModal, WorkCenterItemModalRoute, WorkCenterPage, WorkCenterSchedulePublishType, WorkCenterState, decodeWorkCenterRouteContextKey, encodeWorkCenterRouteContextKey, groupSchedulePublishRows, insertWorkCenterExtraTabs, isSchedulePublishConflictRow, matchesSchedulePublishSearch, parseSchedulePublishChangedFields, readSchedulePublishChanges, removeWorkCenterHiddenTabs, resolveWorkCenterActionHandler, resolveWorkCenterExtraTabs, schedulePublishRowKey, sortSchedulePublishRows, summarizeSchedulePublish, windowSchedulePublishRows, workCenterFormTabOptions, workCenterInitialFormTab };
|
|
1256
|
-
export type { ApiEnvelope, SchedulePublishDiff, SchedulePublishDiffRow, SchedulePublishFieldChange, SchedulePublishFormLoadResponse, SchedulePublishGroup, SchedulePublishGroupKey, SchedulePublishState, SchedulePublishSummary, TranslatableDto, WorkCenterActionHandler, WorkCenterActionHandlerContext, WorkCenterArea, WorkCenterAreaState, WorkCenterBootstrapInputs, WorkCenterClientFormModalData, WorkCenterClientFormModalOptions, WorkCenterColumnsConfig, WorkCenterContext, WorkCenterExtraTab, WorkCenterExtraTabItem, WorkCenterFilterOperator, WorkCenterFilterRule, WorkCenterHydratePatch, WorkCenterItemActionAfterSuccess, WorkCenterItemActionExecutionResult, WorkCenterItemActionsData, WorkCenterItemBasicInfoData, WorkCenterItemContextKey, WorkCenterItemModalComponentInput, WorkCenterItemModalOptions, WorkCenterLoadReason, WorkCenterLookups, WorkCenterPreviewLevelTarget, WorkCenterRuntimeCard, WorkCenterRuntimeFilterSchema, WorkCenterRuntimeItemAction, WorkCenterRuntimeOperatorOption, WorkCenterRuntimePagination, WorkCenterRuntimeProperty, WorkCenterRuntimeRequest, WorkCenterRuntimeResponseData, WorkCenterRuntimeSelectedCard, WorkCenterRuntimeStatsItem, WorkCenterRuntimeWarningDto, WorkCenterSortRule, WorkCenterStateModel, WorkCenterTypeComponentInputs };
|
|
735
|
+
export { SCHEDULE_PUBLISH_GROUP_ORDER, SCHEDULE_PUBLISH_OPERATION_KEY, WORK_CENTER_ACTION_HANDLERS, WORK_CENTER_EXTRA_TABS, WORK_CENTER_HIDDEN_TABS, WORK_CENTER_TYPE_COMPONENTS, WorkCenterClientFormModal, WorkCenterItemModal, WorkCenterItemModalRoute, WorkCenterPage, WorkCenterSchedulePublishType, groupSchedulePublishRows, insertWorkCenterExtraTabs, isSchedulePublishConflictRow, matchesSchedulePublishSearch, parseSchedulePublishChangedFields, readSchedulePublishChanges, removeWorkCenterHiddenTabs, resolveWorkCenterActionHandler, resolveWorkCenterExtraTabs, schedulePublishRowKey, sortSchedulePublishRows, summarizeSchedulePublish, windowSchedulePublishRows, workCenterFormTabOptions, workCenterInitialFormTab };
|
|
736
|
+
export type { SchedulePublishDiff, SchedulePublishDiffRow, SchedulePublishFieldChange, SchedulePublishFormLoadResponse, SchedulePublishGroup, SchedulePublishGroupKey, SchedulePublishState, SchedulePublishSummary, WorkCenterActionHandler, WorkCenterActionHandlerContext, WorkCenterExtraTab, WorkCenterExtraTabItem, WorkCenterTypeComponentInputs };
|