@masterteam/work-center 0.0.2 → 0.0.4
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/work-center",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/work-center",
|
|
6
6
|
"linkDirectory": false,
|
|
@@ -20,7 +20,11 @@
|
|
|
20
20
|
"rxjs": "^7.8.2",
|
|
21
21
|
"tailwindcss": "^4.1.17",
|
|
22
22
|
"tailwindcss-primeui": "^0.6.1",
|
|
23
|
-
"@masterteam/
|
|
23
|
+
"@masterteam/forms": "^0.0.46",
|
|
24
|
+
"@masterteam/components": "^0.0.99",
|
|
25
|
+
"@masterteam/client-components": "^0.0.7",
|
|
26
|
+
"@masterteam/discussion": "^0.0.1",
|
|
27
|
+
"@masterteam/structure-builder": "^0.0.34",
|
|
24
28
|
"@masterteam/icons": "^0.0.13"
|
|
25
29
|
},
|
|
26
30
|
"sideEffects": false,
|
|
@@ -4,9 +4,11 @@ import * as _masterteam_components_table from '@masterteam/components/table';
|
|
|
4
4
|
import { ColumnDef } from '@masterteam/components/table';
|
|
5
5
|
import * as _masterteam_work_center from '@masterteam/work-center';
|
|
6
6
|
import * as _angular_core from '@angular/core';
|
|
7
|
+
import { Type } from '@angular/core';
|
|
7
8
|
import { ClientPageMenuItem } from '@masterteam/components/client-page-menu';
|
|
8
9
|
import { PropertyFilterBuilderSchema, PropertyFilterBuilderRule } from '@masterteam/components/property-filter-builder';
|
|
9
10
|
import { LoadingStateShape } from '@masterteam/components';
|
|
11
|
+
import { ModalService } from '@masterteam/components/modal';
|
|
10
12
|
import * as rxjs from 'rxjs';
|
|
11
13
|
import * as _masterteam_components_types_masterteam_components_statistic_card from '@masterteam/components/types/masterteam-components-statistic-card';
|
|
12
14
|
import * as _masterteam_components_types_masterteam_components_table from '@masterteam/components/types/masterteam-components-table';
|
|
@@ -14,6 +16,7 @@ import * as _masterteam_components_types_masterteam_components_client_page_menu
|
|
|
14
16
|
import { StateContext } from '@ngxs/store';
|
|
15
17
|
|
|
16
18
|
type WorkCenterArea = 'MyInbox' | 'TasksCenter';
|
|
19
|
+
type WorkCenterItemContextKey = string;
|
|
17
20
|
declare enum WorkCenterActionKey {
|
|
18
21
|
LoadRuntime = "loadRuntime"
|
|
19
22
|
}
|
|
@@ -120,6 +123,34 @@ interface WorkCenterRuntimeResponseData {
|
|
|
120
123
|
selectedCard: WorkCenterRuntimeSelectedCard | null;
|
|
121
124
|
warnings: WorkCenterRuntimeWarningDto[];
|
|
122
125
|
}
|
|
126
|
+
interface WorkCenterItemBasicInfoData {
|
|
127
|
+
cardKey: string | null;
|
|
128
|
+
sourceType: string | null;
|
|
129
|
+
type: string | null;
|
|
130
|
+
item: Record<string, unknown> | null;
|
|
131
|
+
warnings: WorkCenterRuntimeWarningDto[];
|
|
132
|
+
}
|
|
133
|
+
interface WorkCenterRuntimeItemAction {
|
|
134
|
+
actionKey: string;
|
|
135
|
+
actionName?: TranslatableDto | null;
|
|
136
|
+
httpMethod?: string | null;
|
|
137
|
+
url?: string | null;
|
|
138
|
+
isAvailable?: boolean;
|
|
139
|
+
stepIds?: Array<number | string>;
|
|
140
|
+
needConfirmation?: boolean;
|
|
141
|
+
payloadKeys?: string[];
|
|
142
|
+
requiredPayloadKeys?: string[];
|
|
143
|
+
payloadTemplate?: Record<string, unknown> | null;
|
|
144
|
+
formId?: string | number | null;
|
|
145
|
+
}
|
|
146
|
+
interface WorkCenterItemActionsData {
|
|
147
|
+
cardKey: string | null;
|
|
148
|
+
sourceType: string | null;
|
|
149
|
+
type: string | null;
|
|
150
|
+
context: Record<string, unknown> | null;
|
|
151
|
+
actions: WorkCenterRuntimeItemAction[];
|
|
152
|
+
warnings: WorkCenterRuntimeWarningDto[];
|
|
153
|
+
}
|
|
123
154
|
interface WorkCenterContext {
|
|
124
155
|
area: WorkCenterArea;
|
|
125
156
|
templateId: number | null;
|
|
@@ -161,14 +192,28 @@ interface WorkCenterBootstrapInputs {
|
|
|
161
192
|
sort?: unknown;
|
|
162
193
|
filters?: unknown;
|
|
163
194
|
}
|
|
195
|
+
interface WorkCenterItemModalComponentInput {
|
|
196
|
+
contextKey: WorkCenterItemContextKey;
|
|
197
|
+
}
|
|
198
|
+
interface WorkCenterItemModalOptions {
|
|
199
|
+
component?: Type<unknown> | null;
|
|
200
|
+
header?: string;
|
|
201
|
+
styleClass?: string;
|
|
202
|
+
appendTo?: string | HTMLElement | null;
|
|
203
|
+
position?: 'start' | 'end' | 'left' | 'right';
|
|
204
|
+
}
|
|
164
205
|
type WorkCenterLoadReason = 'route-enter' | 'menu-change' | 'filters-change' | 'table-lazy' | 'refresh' | 'manual';
|
|
165
206
|
|
|
166
207
|
declare class WorkCenterPage {
|
|
167
208
|
private readonly facade;
|
|
209
|
+
private readonly modal;
|
|
168
210
|
readonly area: _angular_core.InputSignal<WorkCenterArea>;
|
|
169
211
|
readonly pageTitle: _angular_core.InputSignal<string>;
|
|
170
212
|
readonly menuIcon: _angular_core.InputSignal<string>;
|
|
213
|
+
readonly openItemsInModal: _angular_core.InputSignal<boolean>;
|
|
214
|
+
readonly itemModal: _angular_core.InputSignal<WorkCenterItemModalOptions | null>;
|
|
171
215
|
readonly runtimeFiltersChanged: _angular_core.OutputEmitterRef<WorkCenterFilterRule[]>;
|
|
216
|
+
readonly itemClicked: _angular_core.OutputEmitterRef<string>;
|
|
172
217
|
protected readonly context: _angular_core.Signal<_masterteam_work_center.WorkCenterContext>;
|
|
173
218
|
protected readonly menuItems: _angular_core.Signal<ClientPageMenuItem[]>;
|
|
174
219
|
protected readonly rows: _angular_core.Signal<Record<string, unknown>[]>;
|
|
@@ -180,12 +225,49 @@ declare class WorkCenterPage {
|
|
|
180
225
|
protected readonly tableCurrentPage: _angular_core.Signal<number>;
|
|
181
226
|
protected readonly tableFirst: _angular_core.Signal<number>;
|
|
182
227
|
protected readonly propertyFilterSchema: _angular_core.Signal<PropertyFilterBuilderSchema | null>;
|
|
228
|
+
private readonly defaultModalStyleClass;
|
|
183
229
|
onMenuItemClick(item: ClientPageMenuItem): void;
|
|
184
230
|
onLazyLoad(event: any): void;
|
|
185
231
|
onRuntimeFiltersApplied(filters: PropertyFilterBuilderRule[]): void;
|
|
186
232
|
onRuntimeFiltersCleared(): void;
|
|
233
|
+
onRowClick(row: Record<string, unknown>): void;
|
|
234
|
+
protected readonly rowsClickable: _angular_core.Signal<boolean>;
|
|
235
|
+
private resolveRowContextKey;
|
|
187
236
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WorkCenterPage, never>;
|
|
188
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WorkCenterPage, "mt-work-center-page", never, { "area": { "alias": "area"; "required": false; "isSignal": true; }; "pageTitle": { "alias": "pageTitle"; "required": false; "isSignal": true; }; "menuIcon": { "alias": "menuIcon"; "required": false; "isSignal": true; }; }, { "runtimeFiltersChanged": "runtimeFiltersChanged"; }, never, never, true, never>;
|
|
237
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WorkCenterPage, "mt-work-center-page", never, { "area": { "alias": "area"; "required": false; "isSignal": true; }; "pageTitle": { "alias": "pageTitle"; "required": false; "isSignal": true; }; "menuIcon": { "alias": "menuIcon"; "required": false; "isSignal": true; }; "openItemsInModal": { "alias": "openItemsInModal"; "required": false; "isSignal": true; }; "itemModal": { "alias": "itemModal"; "required": false; "isSignal": true; }; }, { "runtimeFiltersChanged": "runtimeFiltersChanged"; "itemClicked": "itemClicked"; }, never, never, true, never>;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
declare class WorkCenterItemModal {
|
|
241
|
+
readonly details: _angular_core.InputSignal<WorkCenterItemBasicInfoData>;
|
|
242
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WorkCenterItemModal, never>;
|
|
243
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WorkCenterItemModal, "mt-work-center-item-modal", never, { "details": { "alias": "details"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
declare class WorkCenterItemModalRoute {
|
|
247
|
+
private readonly http;
|
|
248
|
+
private readonly router;
|
|
249
|
+
private readonly route;
|
|
250
|
+
readonly modal: ModalService;
|
|
251
|
+
readonly contextKey: _angular_core.InputSignal<string | null>;
|
|
252
|
+
protected readonly drawerVisible: _angular_core.WritableSignal<boolean>;
|
|
253
|
+
protected readonly loading: _angular_core.WritableSignal<boolean>;
|
|
254
|
+
protected readonly error: _angular_core.WritableSignal<string | null>;
|
|
255
|
+
protected readonly details: _angular_core.WritableSignal<WorkCenterItemBasicInfoData | null>;
|
|
256
|
+
protected readonly detailsReloadTick: _angular_core.WritableSignal<number>;
|
|
257
|
+
protected readonly footerActionsMounted: _angular_core.WritableSignal<boolean>;
|
|
258
|
+
protected readonly resolvedContextKey: _angular_core.Signal<string | null>;
|
|
259
|
+
protected readonly drawerTitle: _angular_core.Signal<string>;
|
|
260
|
+
protected readonly drawerSubtitle: _angular_core.Signal<string>;
|
|
261
|
+
constructor();
|
|
262
|
+
protected onActionExecuted(): void;
|
|
263
|
+
protected onFooterVisibilityChange(visible: boolean): void;
|
|
264
|
+
onVisibleChange(visible: boolean): Promise<void>;
|
|
265
|
+
private closeRouteOutlet;
|
|
266
|
+
private decodeContextKey;
|
|
267
|
+
private resolveErrorMessage;
|
|
268
|
+
private readDisplayField;
|
|
269
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WorkCenterItemModalRoute, never>;
|
|
270
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WorkCenterItemModalRoute, "mt-work-center-item-modal-route", never, { "contextKey": { "alias": "contextKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
189
271
|
}
|
|
190
272
|
|
|
191
273
|
declare class EnterArea {
|
|
@@ -267,5 +349,5 @@ declare class WorkCenterState {
|
|
|
267
349
|
|
|
268
350
|
declare const APP_STATES: (typeof WorkCenterState)[];
|
|
269
351
|
|
|
270
|
-
export { APP_STATES, EnterArea, HydrateFromContext, LoadRuntime, SetParams, WORK_CENTER_MAX_FILTERS, WORK_CENTER_MAX_PAGE_SIZE, WORK_CENTER_MAX_SORT, WORK_CENTER_QUERY_VERSION, WorkCenterActionKey, WorkCenterFacade, WorkCenterPage, WorkCenterState };
|
|
271
|
-
export type { ApiEnvelope, TranslatableDto, WorkCenterArea, WorkCenterAreaState, WorkCenterBootstrapInputs, WorkCenterColumnsConfig, WorkCenterContext, WorkCenterFilterOperator, WorkCenterFilterRule, WorkCenterHydratePatch, WorkCenterLoadReason, WorkCenterRuntimeCard, WorkCenterRuntimeFilterSchema, WorkCenterRuntimeOperatorOption, WorkCenterRuntimePagination, WorkCenterRuntimeProperty, WorkCenterRuntimeRequest, WorkCenterRuntimeResponseData, WorkCenterRuntimeSelectedCard, WorkCenterRuntimeStatsItem, WorkCenterRuntimeWarningDto, WorkCenterSortRule, WorkCenterStateModel };
|
|
352
|
+
export { APP_STATES, EnterArea, HydrateFromContext, LoadRuntime, SetParams, WORK_CENTER_MAX_FILTERS, WORK_CENTER_MAX_PAGE_SIZE, WORK_CENTER_MAX_SORT, WORK_CENTER_QUERY_VERSION, WorkCenterActionKey, WorkCenterFacade, WorkCenterItemModal, WorkCenterItemModalRoute, WorkCenterPage, WorkCenterState };
|
|
353
|
+
export type { ApiEnvelope, TranslatableDto, WorkCenterArea, WorkCenterAreaState, WorkCenterBootstrapInputs, WorkCenterColumnsConfig, WorkCenterContext, WorkCenterFilterOperator, WorkCenterFilterRule, WorkCenterHydratePatch, WorkCenterItemActionsData, WorkCenterItemBasicInfoData, WorkCenterItemContextKey, WorkCenterItemModalComponentInput, WorkCenterItemModalOptions, WorkCenterLoadReason, WorkCenterRuntimeCard, WorkCenterRuntimeFilterSchema, WorkCenterRuntimeItemAction, WorkCenterRuntimeOperatorOption, WorkCenterRuntimePagination, WorkCenterRuntimeProperty, WorkCenterRuntimeRequest, WorkCenterRuntimeResponseData, WorkCenterRuntimeSelectedCard, WorkCenterRuntimeStatsItem, WorkCenterRuntimeWarningDto, WorkCenterSortRule, WorkCenterStateModel };
|