@masterteam/work-center 0.0.102 → 0.0.104
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 +82 -22
- package/fesm2022/masterteam-work-center-state.mjs.map +1 -1
- package/fesm2022/{masterteam-work-center-work-center-process-preview-i6-jwMEG.mjs → masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs} +3 -3
- package/fesm2022/{masterteam-work-center-work-center-process-preview-i6-jwMEG.mjs.map → masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs.map} +1 -1
- package/fesm2022/masterteam-work-center.mjs +259 -38
- package/fesm2022/masterteam-work-center.mjs.map +1 -1
- package/package.json +9 -9
- package/types/masterteam-work-center-state.d.ts +30 -1
- package/types/masterteam-work-center.d.ts +12 -0
|
@@ -11,10 +11,10 @@ import { PropertyFilterBuilder } from '@masterteam/components/property-filter-bu
|
|
|
11
11
|
import { StatisticCard } from '@masterteam/components/statistic-card';
|
|
12
12
|
import * as i1$1 from 'primeng/skeleton';
|
|
13
13
|
import { SkeletonModule } from 'primeng/skeleton';
|
|
14
|
-
import { take, firstValueFrom, catchError, of, isObservable, map } from 'rxjs';
|
|
14
|
+
import { share, ReplaySubject, Observable, take, firstValueFrom, catchError, of, isObservable, map } from 'rxjs';
|
|
15
15
|
import { ModalRef } from '@masterteam/components/dialog';
|
|
16
16
|
import { DrawerController } from '@masterteam/components/dynamic-drawer';
|
|
17
|
-
import { ClientForm, ClientFormWarningsDialog } from '@masterteam/forms/client-form';
|
|
17
|
+
import { ClientForm, ClientFormApiService, ClientFormWarningsDialog } from '@masterteam/forms/client-form';
|
|
18
18
|
import { EntityPreview, EntitiesPreview, EntityPreviewBody } from '@masterteam/components/entities';
|
|
19
19
|
import { TableValueResolver } from '@masterteam/components/table';
|
|
20
20
|
import { MT_GRID_EMPTY_OVERLAY, captureGridViewState } from '@masterteam/data-grid';
|
|
@@ -274,18 +274,18 @@ class WorkCenterGroupValue {
|
|
|
274
274
|
return (counts?.get(label) ?? this.params().node.allLeafChildren?.length ?? 0);
|
|
275
275
|
}, ...(ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []));
|
|
276
276
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterGroupValue, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
277
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterGroupValue, isStandalone: true, selector: "ng-component", inputs: { params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: true, transformFunction: null } }, host: { styleAttribute: "display:inline-flex;align-items:center;gap:6px" }, ngImport: i0, template: `@if (entity(); as value) {
|
|
278
|
-
<mt-entity-preview [data]="value" />
|
|
279
|
-
}
|
|
277
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterGroupValue, isStandalone: true, selector: "ng-component", inputs: { params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: true, transformFunction: null } }, host: { styleAttribute: "display:inline-flex;align-items:center;gap:6px" }, ngImport: i0, template: `@if (entity(); as value) {
|
|
278
|
+
<mt-entity-preview [data]="value" />
|
|
279
|
+
}
|
|
280
280
|
<span>({{ count() }})</span>`, isInline: true, dependencies: [{ kind: "component", type: EntityPreview, selector: "mt-entity-preview", inputs: ["data", "attachmentShape"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
281
281
|
}
|
|
282
282
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterGroupValue, decorators: [{
|
|
283
283
|
type: Component,
|
|
284
284
|
args: [{
|
|
285
285
|
imports: [EntityPreview],
|
|
286
|
-
template: `@if (entity(); as value) {
|
|
287
|
-
<mt-entity-preview [data]="value" />
|
|
288
|
-
}
|
|
286
|
+
template: `@if (entity(); as value) {
|
|
287
|
+
<mt-entity-preview [data]="value" />
|
|
288
|
+
}
|
|
289
289
|
<span>({{ count() }})</span>`,
|
|
290
290
|
host: { style: 'display:inline-flex;align-items:center;gap:6px' },
|
|
291
291
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
@@ -307,24 +307,24 @@ class WorkCenterEmptyState {
|
|
|
307
307
|
};
|
|
308
308
|
}, ...(ngDevMode ? [{ debugName: "wrapped" }] : /* istanbul ignore next */ []));
|
|
309
309
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterEmptyState, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
310
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterEmptyState, isStandalone: true, selector: "ng-component", inputs: { params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `@if (grid.hostEmptyState; as component) {
|
|
311
|
-
<ng-container
|
|
312
|
-
*ngComponentOutlet="component; inputs: { params: wrapped() }"
|
|
313
|
-
/>
|
|
314
|
-
} @else {
|
|
315
|
-
{{ params().message }}
|
|
310
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterEmptyState, isStandalone: true, selector: "ng-component", inputs: { params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `@if (grid.hostEmptyState; as component) {
|
|
311
|
+
<ng-container
|
|
312
|
+
*ngComponentOutlet="component; inputs: { params: wrapped() }"
|
|
313
|
+
/>
|
|
314
|
+
} @else {
|
|
315
|
+
{{ params().message }}
|
|
316
316
|
}`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
317
317
|
}
|
|
318
318
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterEmptyState, decorators: [{
|
|
319
319
|
type: Component,
|
|
320
320
|
args: [{
|
|
321
321
|
imports: [NgComponentOutlet],
|
|
322
|
-
template: `@if (grid.hostEmptyState; as component) {
|
|
323
|
-
<ng-container
|
|
324
|
-
*ngComponentOutlet="component; inputs: { params: wrapped() }"
|
|
325
|
-
/>
|
|
326
|
-
} @else {
|
|
327
|
-
{{ params().message }}
|
|
322
|
+
template: `@if (grid.hostEmptyState; as component) {
|
|
323
|
+
<ng-container
|
|
324
|
+
*ngComponentOutlet="component; inputs: { params: wrapped() }"
|
|
325
|
+
/>
|
|
326
|
+
} @else {
|
|
327
|
+
{{ params().message }}
|
|
328
328
|
}`,
|
|
329
329
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
330
330
|
}]
|
|
@@ -372,6 +372,10 @@ class WorkCenterGrid {
|
|
|
372
372
|
level: this.viewKey(),
|
|
373
373
|
role: 'work-center',
|
|
374
374
|
}), ...(ngDevMode ? [{ debugName: "identity" }] : /* istanbul ignore next */ []));
|
|
375
|
+
/** Charts persist with the preferences view; on a server page they cover that page. */
|
|
376
|
+
chartPersistence = computed(() => ({
|
|
377
|
+
view: this.identity(),
|
|
378
|
+
}), ...(ngDevMode ? [{ debugName: "chartPersistence" }] : /* istanbul ignore next */ []));
|
|
375
379
|
rowId = (row) => String(row['contextKey'] ?? row['id']);
|
|
376
380
|
/** mt-table's caption offered Export (Excel) and Print (PDF). */
|
|
377
381
|
exportFormats = [
|
|
@@ -592,8 +596,8 @@ class WorkCenterGrid {
|
|
|
592
596
|
this.queryChange.emit(this.query(event.currentPage + 1, event.pageSize));
|
|
593
597
|
}
|
|
594
598
|
/**
|
|
595
|
-
*
|
|
596
|
-
*
|
|
599
|
+
* A change made while a load runs waits for it to end (the grid reflects the query it shows);
|
|
600
|
+
* a later change of the same kind replaces the waiting one.
|
|
597
601
|
*/
|
|
598
602
|
send(kind, change) {
|
|
599
603
|
if (!this.loading()) {
|
|
@@ -640,13 +644,13 @@ class WorkCenterGrid {
|
|
|
640
644
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterGrid, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
641
645
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: WorkCenterGrid, isStandalone: true, selector: "mt-work-center-grid", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null }, schema: { classPropertyName: "schema", publicName: "schema", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, filterRules: { classPropertyName: "filterRules", publicName: "filterRules", isSignal: true, isRequired: false, transformFunction: null }, groupCounts: { classPropertyName: "groupCounts", publicName: "groupCounts", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, viewKey: { classPropertyName: "viewKey", publicName: "viewKey", isSignal: true, isRequired: true, transformFunction: null }, clickableRows: { classPropertyName: "clickableRows", publicName: "clickableRows", isSignal: true, isRequired: false, transformFunction: null }, externalFiltersActive: { classPropertyName: "externalFiltersActive", publicName: "externalFiltersActive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rowClick: "rowClick", filtersChange: "filtersChange", groupChange: "groupChange", queryChange: "queryChange", filtersCleared: "filtersCleared" }, providers: [
|
|
642
646
|
{ provide: MT_GRID_EMPTY_OVERLAY, useValue: WorkCenterEmptyState },
|
|
643
|
-
], ngImport: i0, template: "<mt-standard-grid\n [rows]=\"visibleRows()\"\n [columns]=\"definitions()\"\n [rowId]=\"rowId\"\n [label]=\"label()\"\n [loading]=\"loading()\"\n height=\"auto\"\n [search]=\"search()\"\n [server]=\"serverPage()\"\n [exportName]=\"label()\"\n [exportFormats]=\"exportFormats\"\n [exportButtons]=\"true\"\n [cellClickFilter]=\"true\"\n [clickableRows]=\"clickableRows()\"\n (gridReady)=\"onReady($event.api)\"\n (filterChanged)=\"filters($event)\"\n (sortChanged)=\"sorted($event)\"\n (paginationChanged)=\"paged($event)\"\n (viewChanged)=\"viewChanged()\"\n (rowClicked)=\"rowClick.emit($event)\"\n/>\n", dependencies: [{ kind: "component", type: MtStandardGridComponent, selector: "mt-standard-grid", inputs: ["rows", "columns", "rowId", "label", "loading", "height", "rowHeight", "selection", "exportable", "exportButtons", "exportName", "exportFormats", "exporter", "rowMenuItems", "server", "paged", "pageSize", "clickableRows", "cellClickFilter", "rowClass", "detail", "chartContext", "search", "emptyTitle", "emptyDescription", "view"], outputs: ["gridReady", "rowClicked", "selectionChanged", "sortChanged", "filterChanged", "paginationChanged", "rowGroupOpened", "viewChanged", "chartsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
647
|
+
], ngImport: i0, template: "<mt-standard-grid\r\n [rows]=\"visibleRows()\"\r\n [columns]=\"definitions()\"\r\n [rowId]=\"rowId\"\r\n [label]=\"label()\"\r\n [loading]=\"loading()\"\r\n height=\"auto\"\r\n [search]=\"search()\"\r\n [server]=\"serverPage()\"\r\n [exportName]=\"label()\"\r\n [exportFormats]=\"exportFormats\"\r\n [exportButtons]=\"true\"\r\n [cellClickFilter]=\"true\"\r\n [clickableRows]=\"clickableRows()\"\r\n [chartPersistence]=\"chartPersistence()\"\r\n (gridReady)=\"onReady($event.api)\"\r\n (filterChanged)=\"filters($event)\"\r\n (sortChanged)=\"sorted($event)\"\r\n (paginationChanged)=\"paged($event)\"\r\n (viewChanged)=\"viewChanged()\"\r\n (rowClicked)=\"rowClick.emit($event)\"\r\n/>\r\n", dependencies: [{ kind: "component", type: MtStandardGridComponent, selector: "mt-standard-grid", inputs: ["rows", "columns", "rowId", "label", "loading", "height", "rowHeight", "selection", "exportable", "exportButtons", "exportName", "exportFormats", "exporter", "rowMenuItems", "rowMenuLeadItems", "server", "paged", "pageSize", "clickableRows", "cellClickFilter", "rowClass", "detail", "chartContext", "search", "emptyTitle", "emptyDescription", "view", "chartPersistence"], outputs: ["gridReady", "rowClicked", "selectionChanged", "sortChanged", "filterChanged", "paginationChanged", "rowGroupOpened", "viewChanged", "chartsChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
644
648
|
}
|
|
645
649
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterGrid, decorators: [{
|
|
646
650
|
type: Component,
|
|
647
651
|
args: [{ selector: 'mt-work-center-grid', imports: [MtStandardGridComponent], providers: [
|
|
648
652
|
{ provide: MT_GRID_EMPTY_OVERLAY, useValue: WorkCenterEmptyState },
|
|
649
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mt-standard-grid\n [rows]=\"visibleRows()\"\n [columns]=\"definitions()\"\n [rowId]=\"rowId\"\n [label]=\"label()\"\n [loading]=\"loading()\"\n height=\"auto\"\n [search]=\"search()\"\n [server]=\"serverPage()\"\n [exportName]=\"label()\"\n [exportFormats]=\"exportFormats\"\n [exportButtons]=\"true\"\n [cellClickFilter]=\"true\"\n [clickableRows]=\"clickableRows()\"\n (gridReady)=\"onReady($event.api)\"\n (filterChanged)=\"filters($event)\"\n (sortChanged)=\"sorted($event)\"\n (paginationChanged)=\"paged($event)\"\n (viewChanged)=\"viewChanged()\"\n (rowClicked)=\"rowClick.emit($event)\"\n/>\n" }]
|
|
653
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mt-standard-grid\r\n [rows]=\"visibleRows()\"\r\n [columns]=\"definitions()\"\r\n [rowId]=\"rowId\"\r\n [label]=\"label()\"\r\n [loading]=\"loading()\"\r\n height=\"auto\"\r\n [search]=\"search()\"\r\n [server]=\"serverPage()\"\r\n [exportName]=\"label()\"\r\n [exportFormats]=\"exportFormats\"\r\n [exportButtons]=\"true\"\r\n [cellClickFilter]=\"true\"\r\n [clickableRows]=\"clickableRows()\"\r\n [chartPersistence]=\"chartPersistence()\"\r\n (gridReady)=\"onReady($event.api)\"\r\n (filterChanged)=\"filters($event)\"\r\n (sortChanged)=\"sorted($event)\"\r\n (paginationChanged)=\"paged($event)\"\r\n (viewChanged)=\"viewChanged()\"\r\n (rowClicked)=\"rowClick.emit($event)\"\r\n/>\r\n" }]
|
|
650
654
|
}], ctorParameters: () => [], propDecorators: { rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "context", required: true }] }], schema: [{ type: i0.Input, args: [{ isSignal: true, alias: "schema", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], filterRules: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterRules", required: false }] }], groupCounts: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupCounts", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], viewKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewKey", required: true }] }], clickableRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickableRows", required: false }] }], externalFiltersActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "externalFiltersActive", required: false }] }], rowClick: [{ type: i0.Output, args: ["rowClick"] }], filtersChange: [{ type: i0.Output, args: ["filtersChange"] }], groupChange: [{ type: i0.Output, args: ["groupChange"] }], queryChange: [{ type: i0.Output, args: ["queryChange"] }], filtersCleared: [{ type: i0.Output, args: ["filtersCleared"] }] } });
|
|
651
655
|
|
|
652
656
|
/**
|
|
@@ -1348,9 +1352,9 @@ class WorkCenterProcessRequestType {
|
|
|
1348
1352
|
this.formStore?.setIncomplete(false);
|
|
1349
1353
|
}
|
|
1350
1354
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterProcessRequestType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1351
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterProcessRequestType, isStandalone: true, selector: "mt-work-center-process-request-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'requestDetails'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <!-- Host sub-tabs of the form (WORK_CENTER_EXTRA_TABS, placement\r\n 'form'). The form stays mounted on them: it's the footer\r\n actions' form source. -->\r\n @if (formTabOptions().length) {\r\n <div class=\"mb-4\">\r\n <mt-tabs\r\n [(active)]=\"formTab\"\r\n [options]=\"formTabOptions()\"\r\n size=\"large\"\r\n fluid\r\n />\r\n </div>\r\n }\r\n\r\n <div [hidden]=\"formTab() !== 'form'\">\r\n @if (canRenderForm()) {\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [operationKey]=\"operationKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [requestSchemaId]=\"requestSchemaId()\"\r\n [draftProcessId]=\"draftProcessId()\"\r\n [requestCommitted]=\"requestCommitted()\"\r\n [readonly]=\"isReadonly()\"\r\n [renderMode]=\"'sections'\"\r\n [lookups]=\"formLookups()\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestFormUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n @for (tab of formTabs(); track tab.key) {\r\n @defer (when formTab() === tab.key) {\r\n <div [hidden]=\"formTab() !== tab.key\">\r\n <ng-container\r\n *ngComponentOutlet=\"tab.component; inputs: extraTabInputs()\"\r\n ></ng-container>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Host tabs (WORK_CENTER_EXTRA_TABS): mounted on first open, then kept\r\n like the built-in tabs. -->\r\n @for (tab of extraTabs(); track tab.key) {\r\n @defer (when activeTab() === tab.key) {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== tab.key\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <ng-container\r\n *ngComponentOutlet=\"tab.component; inputs: extraTabInputs()\"\r\n ></ng-container>\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n @defer (when activeTab() === \"approvals\") {\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'approvals'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'approvals'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @defer (when activeTab() === \"schema\") {\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'schema'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'schema'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (!readOnly()) {\r\n @defer (when activeTab() === \"discussion\") {\r\n <div\r\n class=\"h-full min-h-0 overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"'ProcessRequest'\"\r\n [recordId]=\"discussionRecordId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "recordId", "requestSchemaId", "draftProcessId", "requestCommitted", "templateId", "returnRecord", "preview", "forceOriginalForm", "returnUrl", "defaultValues", "submitRequestMapper", "submitTransport", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "silentMessages", "hostMessages", "readonlyFieldDisplayMode", "lookups", "statuses", "ignoredFieldKeys", "disabledFieldKeys", "allowedFieldKeys", "requiredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }], deferBlockDependencies: [() => [i1.NgComponentOutlet], () => [i1.NgComponentOutlet], () => [import('./masterteam-work-center-work-center-process-preview-
|
|
1355
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterProcessRequestType, isStandalone: true, selector: "mt-work-center-process-request-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'requestDetails'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <!-- Host sub-tabs of the form (WORK_CENTER_EXTRA_TABS, placement\r\n 'form'). The form stays mounted on them: it's the footer\r\n actions' form source. -->\r\n @if (formTabOptions().length) {\r\n <div class=\"mb-4\">\r\n <mt-tabs\r\n [(active)]=\"formTab\"\r\n [options]=\"formTabOptions()\"\r\n size=\"large\"\r\n fluid\r\n />\r\n </div>\r\n }\r\n\r\n <div [hidden]=\"formTab() !== 'form'\">\r\n @if (canRenderForm()) {\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [operationKey]=\"operationKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [requestSchemaId]=\"requestSchemaId()\"\r\n [draftProcessId]=\"draftProcessId()\"\r\n [requestCommitted]=\"requestCommitted()\"\r\n [readonly]=\"isReadonly()\"\r\n [renderMode]=\"'sections'\"\r\n [lookups]=\"formLookups()\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestFormUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n @for (tab of formTabs(); track tab.key) {\r\n @defer (when formTab() === tab.key) {\r\n <div [hidden]=\"formTab() !== tab.key\">\r\n <ng-container\r\n *ngComponentOutlet=\"tab.component; inputs: extraTabInputs()\"\r\n ></ng-container>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Host tabs (WORK_CENTER_EXTRA_TABS): mounted on first open, then kept\r\n like the built-in tabs. -->\r\n @for (tab of extraTabs(); track tab.key) {\r\n @defer (when activeTab() === tab.key) {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== tab.key\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <ng-container\r\n *ngComponentOutlet=\"tab.component; inputs: extraTabInputs()\"\r\n ></ng-container>\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n @defer (when activeTab() === \"approvals\") {\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'approvals'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'approvals'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @defer (when activeTab() === \"schema\") {\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'schema'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'schema'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (!readOnly()) {\r\n @defer (when activeTab() === \"discussion\") {\r\n <div\r\n class=\"h-full min-h-0 overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"'ProcessRequest'\"\r\n [recordId]=\"discussionRecordId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.requestDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "recordId", "requestSchemaId", "draftProcessId", "requestCommitted", "templateId", "returnRecord", "preview", "forceOriginalForm", "returnUrl", "defaultValues", "submitRequestMapper", "submitTransport", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "silentMessages", "hostMessages", "readonlyFieldDisplayMode", "lookups", "statuses", "ignoredFieldKeys", "disabledFieldKeys", "allowedFieldKeys", "requiredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }], deferBlockDependencies: [() => [i1.NgComponentOutlet], () => [i1.NgComponentOutlet], () => [import('./masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs').then(m => m.WorkCenterProcessPreview)], () => [import('./masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs').then(m => m.WorkCenterProcessPreview)], () => [import('@masterteam/discussion').then(m => m.DiscussionThread)]] });
|
|
1352
1356
|
}
|
|
1353
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterProcessRequestType, resolveDeferredDeps: () => [import('./masterteam-work-center-work-center-process-preview-
|
|
1357
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterProcessRequestType, resolveDeferredDeps: () => [import('./masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs').then(m => m.WorkCenterProcessPreview), import('@masterteam/discussion').then(m => m.DiscussionThread)], resolveMetadata: (WorkCenterProcessPreview, DiscussionThread) => ({ decorators: [{
|
|
1354
1358
|
type: Component,
|
|
1355
1359
|
args: [{ selector: 'mt-work-center-process-request-type', standalone: true, imports: [
|
|
1356
1360
|
CommonModule,
|
|
@@ -1535,9 +1539,9 @@ class WorkCenterProcessStepType {
|
|
|
1535
1539
|
this.formStore?.setIncomplete(false);
|
|
1536
1540
|
}
|
|
1537
1541
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterProcessStepType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1538
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterProcessStepType, isStandalone: true, selector: "mt-work-center-process-step-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }, { propertyName: "levelPreview", first: true, predicate: ClientInstancePreview, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'form'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <!-- Host sub-tabs of the form (WORK_CENTER_EXTRA_TABS, placement\r\n 'form'). The form stays mounted on them: it's the footer\r\n actions' form source. -->\r\n @if (formTabOptions().length) {\r\n <div class=\"mb-4\">\r\n <mt-tabs\r\n [(active)]=\"formTab\"\r\n [options]=\"formTabOptions()\"\r\n size=\"large\"\r\n fluid\r\n />\r\n </div>\r\n }\r\n\r\n <div [hidden]=\"formTab() !== 'form'\">\r\n @if (canRenderForm()) {\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [operationKey]=\"operationKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [requestSchemaId]=\"requestSchemaId()\"\r\n [draftProcessId]=\"draftProcessId()\"\r\n [readonly]=\"readOnly()\"\r\n [renderMode]=\"'sections'\"\r\n [lookups]=\"formLookups()\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processFormUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n @for (tab of formTabs(); track tab.key) {\r\n @defer (when formTab() === tab.key) {\r\n <div [hidden]=\"formTab() !== tab.key\">\r\n <ng-container\r\n *ngComponentOutlet=\"tab.component; inputs: extraTabInputs()\"\r\n ></ng-container>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'levelDetails'\"\r\n >\r\n @if (levelDetailsConfig(); as levelDetailsConfig) {\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <mt-client-instance-preview [config]=\"levelDetailsConfig\" />\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Host tabs (WORK_CENTER_EXTRA_TABS): mounted on first open, then kept\r\n like the built-in tabs. -->\r\n @for (tab of extraTabs(); track tab.key) {\r\n @defer (when activeTab() === tab.key) {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== tab.key\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <ng-container\r\n *ngComponentOutlet=\"tab.component; inputs: extraTabInputs()\"\r\n ></ng-container>\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n @defer (when activeTab() === \"approvals\") {\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'approvals'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'approvals'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @defer (when activeTab() === \"schema\") {\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'schema'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'schema'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (!readOnly()) {\r\n @defer (when activeTab() === \"discussion\") {\r\n <div\r\n class=\"h-full min-h-0 overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"'ProcessRequest'\"\r\n [recordId]=\"discussionRecordId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "recordId", "requestSchemaId", "draftProcessId", "requestCommitted", "templateId", "returnRecord", "preview", "forceOriginalForm", "returnUrl", "defaultValues", "submitRequestMapper", "submitTransport", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "silentMessages", "hostMessages", "readonlyFieldDisplayMode", "lookups", "statuses", "ignoredFieldKeys", "disabledFieldKeys", "allowedFieldKeys", "requiredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }, { kind: "component", type: ClientInstancePreview, selector: "mt-client-instance-preview", inputs: ["config", "hideEmptyState", "stackOnNarrow"] }], deferBlockDependencies: [() => [i1.NgComponentOutlet], () => [i1.NgComponentOutlet], () => [import('./masterteam-work-center-work-center-process-preview-i6-jwMEG.mjs').then(m => m.WorkCenterProcessPreview)], () => [import('./masterteam-work-center-work-center-process-preview-i6-jwMEG.mjs').then(m => m.WorkCenterProcessPreview)], () => [import('@masterteam/discussion').then(m => m.DiscussionThread)]] });
|
|
1542
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterProcessStepType, isStandalone: true, selector: "mt-work-center-process-step-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }, { propertyName: "levelPreview", first: true, predicate: ClientInstancePreview, descendants: true, isSignal: true }], ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'form'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <!-- Host sub-tabs of the form (WORK_CENTER_EXTRA_TABS, placement\r\n 'form'). The form stays mounted on them: it's the footer\r\n actions' form source. -->\r\n @if (formTabOptions().length) {\r\n <div class=\"mb-4\">\r\n <mt-tabs\r\n [(active)]=\"formTab\"\r\n [options]=\"formTabOptions()\"\r\n size=\"large\"\r\n fluid\r\n />\r\n </div>\r\n }\r\n\r\n <div [hidden]=\"formTab() !== 'form'\">\r\n @if (canRenderForm()) {\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [operationKey]=\"operationKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [requestSchemaId]=\"requestSchemaId()\"\r\n [draftProcessId]=\"draftProcessId()\"\r\n [readonly]=\"readOnly()\"\r\n [renderMode]=\"'sections'\"\r\n [lookups]=\"formLookups()\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processFormUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n @for (tab of formTabs(); track tab.key) {\r\n @defer (when formTab() === tab.key) {\r\n <div [hidden]=\"formTab() !== tab.key\">\r\n <ng-container\r\n *ngComponentOutlet=\"tab.component; inputs: extraTabInputs()\"\r\n ></ng-container>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'levelDetails'\"\r\n >\r\n @if (levelDetailsConfig(); as levelDetailsConfig) {\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <mt-client-instance-preview [config]=\"levelDetailsConfig\" />\r\n </div>\r\n }\r\n </div>\r\n\r\n <!-- Host tabs (WORK_CENTER_EXTRA_TABS): mounted on first open, then kept\r\n like the built-in tabs. -->\r\n @for (tab of extraTabs(); track tab.key) {\r\n @defer (when activeTab() === tab.key) {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== tab.key\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <ng-container\r\n *ngComponentOutlet=\"tab.component; inputs: extraTabInputs()\"\r\n ></ng-container>\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n @defer (when activeTab() === \"approvals\") {\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'approvals'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'approvals'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @defer (when activeTab() === \"schema\") {\r\n <div\r\n class=\"flex-1 min-h-0 overflow-auto\"\r\n [hidden]=\"activeTab() !== 'schema'\"\r\n >\r\n @if (canRenderPreview()) {\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'schema'\"\r\n />\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processPreviewUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n @if (!readOnly()) {\r\n @defer (when activeTab() === \"discussion\") {\r\n <div\r\n class=\"h-full min-h-0 overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n @if (canRenderDiscussion()) {\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"'ProcessRequest'\"\r\n [recordId]=\"discussionRecordId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"context.processDiscussionUnavailable\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "recordId", "requestSchemaId", "draftProcessId", "requestCommitted", "templateId", "returnRecord", "preview", "forceOriginalForm", "returnUrl", "defaultValues", "submitRequestMapper", "submitTransport", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "confirmWarningsOnSubmit", "confirmWarningsOnStepChange", "silentMessages", "hostMessages", "readonlyFieldDisplayMode", "lookups", "statuses", "ignoredFieldKeys", "disabledFieldKeys", "allowedFieldKeys", "requiredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }, { kind: "component", type: ClientInstancePreview, selector: "mt-client-instance-preview", inputs: ["config", "hideEmptyState", "stackOnNarrow", "calculation"] }], deferBlockDependencies: [() => [i1.NgComponentOutlet], () => [i1.NgComponentOutlet], () => [import('./masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs').then(m => m.WorkCenterProcessPreview)], () => [import('./masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs').then(m => m.WorkCenterProcessPreview)], () => [import('@masterteam/discussion').then(m => m.DiscussionThread)]] });
|
|
1539
1543
|
}
|
|
1540
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterProcessStepType, resolveDeferredDeps: () => [import('./masterteam-work-center-work-center-process-preview-
|
|
1544
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterProcessStepType, resolveDeferredDeps: () => [import('./masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs').then(m => m.WorkCenterProcessPreview), import('@masterteam/discussion').then(m => m.DiscussionThread)], resolveMetadata: (WorkCenterProcessPreview, DiscussionThread) => ({ decorators: [{
|
|
1541
1545
|
type: Component,
|
|
1542
1546
|
args: [{ selector: 'mt-work-center-process-step-type', standalone: true, imports: [
|
|
1543
1547
|
CommonModule,
|
|
@@ -2002,9 +2006,9 @@ class WorkCenterSchedulePublishType {
|
|
|
2002
2006
|
});
|
|
2003
2007
|
}
|
|
2004
2008
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterSchedulePublishType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2005
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterSchedulePublishType, isStandalone: true, selector: "mt-work-center-schedule-publish-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\n *transloco=\"let t; prefix: 'workCenter'\"\n>\n <div\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\n >\n @if (tabOptions().length > 1) {\n <mt-tabs\n [(active)]=\"activeTab\"\n [options]=\"tabOptions()\"\n mode=\"vertical\"\n size=\"small\"\n />\n }\n\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\n <!-- Comparison -->\n <div\n class=\"h-full min-h-0 lg:overflow-hidden\"\n [hidden]=\"activeTab() !== 'comparison'\"\n >\n <div\n class=\"flex h-full min-h-0 min-w-0 flex-col gap-3 lg:overflow-hidden\"\n >\n @if (loading()) {\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n {{ t(\"loading.schedulePublish\") }}\n </p>\n </div>\n } @else if (error(); as loadError) {\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-red-300 bg-red-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-red-600\">\n {{ loadError }}\n </p>\n </div>\n } @else if (!summary().hasSnapshot) {\n <!-- Never published: nothing has been announced, so nothing can\n differ from it. That is a different statement from \"no changes\". -->\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n {{ t(\"publish.neverPublished\") }}\n </p>\n </div>\n } @else if (!summary().needsAttention) {\n <!-- Not `isEmpty`: a request whose only rows are zero-diff conflict\n convergences is publish-empty but must still show its conflicts\n section rather than claim there is nothing here. -->\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n {{ t(\"publish.nothingToPublish\") }}\n </p>\n </div>\n } @else {\n <!-- Counts stay visible while searching, so a filtered view never\n reads as the whole request. -->\n <div class=\"flex flex-wrap items-center gap-2\">\n @if (summary().conflictCount > 0) {\n <span\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\n [class]=\"groupBadgeClass('conflict')\"\n >{{\n t(\"publish.conflictCount\", {\n count: summary().conflictCount,\n })\n }}</span\n >\n }\n <span\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\n [class]=\"groupBadgeClass('added')\"\n >{{\n t(\"publish.addedCount\", { count: summary().addedCount })\n }}</span\n >\n <span\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\n [class]=\"groupBadgeClass('changed')\"\n >{{\n t(\"publish.changedCount\", { count: summary().changedCount })\n }}</span\n >\n <span\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\n [class]=\"groupBadgeClass('removed')\"\n >{{\n t(\"publish.removedCount\", { count: summary().removedCount })\n }}</span\n >\n </div>\n\n <input\n type=\"search\"\n class=\"w-full rounded-md border border-surface-300 bg-surface-0 px-3 py-2 text-sm outline-none focus:border-primary-400\"\n [placeholder]=\"t('publish.searchPlaceholder')\"\n [value]=\"searchText()\"\n (input)=\"onSearch($any($event.target).value)\"\n />\n\n <div\n class=\"min-h-0 flex-1 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\n >\n @if (searchFoundNothing()) {\n <div\n class=\"flex min-h-[12rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"text-sm text-surface-500\">\n {{ t(\"publish.noSearchResults\") }}\n </p>\n </div>\n }\n\n @for (group of groups(); track group.state) {\n <section class=\"mb-4\">\n <header class=\"mb-2 flex items-center gap-2\">\n <h4 class=\"text-sm font-semibold text-surface-700\">\n {{ groupLabel(group.state) }}\n </h4>\n <span\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\n [class]=\"groupBadgeClass(group.state)\"\n >{{ group.totalCount }}</span\n >\n </header>\n\n @if (group.state === \"conflict\") {\n <!-- Informational only: unlike the planner's drawer there is\n no keep-mine / use-published control here. The frozen\n plan under approval was captured while the live plan had\n moved on these rows. -->\n <p class=\"mb-2 text-xs text-surface-500\">\n {{ t(\"publish.conflictHint\") }}\n </p>\n }\n\n <ul class=\"flex flex-col gap-1\">\n @for (row of visibleRows(group); track rowKey(row)) {\n <li\n class=\"rounded-md border border-surface-200 bg-surface-0\"\n >\n <button\n type=\"button\"\n class=\"flex w-full items-center gap-2 px-3 py-2 text-start\"\n [class.cursor-default]=\"!isExpandable(row)\"\n [attr.aria-expanded]=\"\n isExpandable(row) ? isExpanded(row) : null\n \"\n [disabled]=\"!isExpandable(row)\"\n (click)=\"toggleRow(row)\"\n >\n @if (isExpandable(row)) {\n <span\n class=\"shrink-0 text-xs text-surface-500\"\n aria-hidden=\"true\"\n >{{ isExpanded(row) ? \"\u25BE\" : \"\u25B8\" }}</span\n >\n } @else {\n <span\n class=\"w-3 shrink-0\"\n aria-hidden=\"true\"\n ></span>\n }\n <span\n class=\"min-w-0 flex-1 truncate text-sm text-surface-800\"\n >{{ row.name }}</span\n >\n @if (row.type) {\n <span class=\"shrink-0 text-xs text-surface-500\">{{\n row.type\n }}</span>\n }\n </button>\n\n @if (\n group.state === \"conflict\" &&\n publishedMovedFields(row).length > 0\n ) {\n <p\n class=\"border-t border-surface-200 px-3 py-1.5 text-xs text-orange-700\"\n >\n {{ t(\"publish.publishedSideMoved\") }}:\n {{ publishedMovedFields(row).join(\", \") }}\n </p>\n }\n\n @if (isExpandable(row) && isExpanded(row)) {\n <div\n class=\"flex flex-col gap-3 border-t border-surface-200 px-3 py-3\"\n >\n @for (\n change of changesFor(row);\n track change.field\n ) {\n <div class=\"flex min-w-0 flex-col gap-1\">\n <span\n class=\"text-xs font-medium text-surface-600\"\n >{{ fieldLabel(change.field) }}</span\n >\n <!-- Before -> After rendered locally rather than\n via mt-comparison-value, whose Before/After\n labels are hardcoded English. Each side still\n goes through mt-entity-preview-body, so a date\n renders as a date and a user as an avatar. -->\n <div\n class=\"flex w-full min-w-0 items-stretch gap-3\"\n >\n <div\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-surface-200 bg-surface-50 px-3 py-2\"\n >\n <span\n class=\"text-xs font-medium uppercase tracking-wide text-muted-color\"\n >{{ t(\"publish.before\") }}</span\n >\n <mt-entity-preview-body\n [data]=\"sideEntity(change, 'published')\"\n />\n </div>\n <div\n class=\"flex shrink-0 items-center text-muted-color\"\n aria-hidden=\"true\"\n >\n →\n </div>\n <div\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-primary-200 bg-primary-50 px-3 py-2\"\n >\n <span\n class=\"text-xs font-medium uppercase tracking-wide text-primary-600\"\n >{{ t(\"publish.after\") }}</span\n >\n <mt-entity-preview-body\n [data]=\"sideEntity(change, 'current')\"\n />\n </div>\n </div>\n </div>\n }\n </div>\n }\n </li>\n }\n </ul>\n\n @if (hiddenCount(group) > 0) {\n <!-- Said out loud: a silently truncated comparison reads as a\n complete one to whoever is approving it. -->\n <p class=\"mt-2 text-xs text-surface-500\">\n {{\n t(\"publish.hiddenRows\", { count: hiddenCount(group) })\n }}\n </p>\n }\n </section>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Project record preview. Loaded only when opened; it is a current\n record view, while Comparison is the frozen submitted schedule. -->\n @if (projectDetailsConfig(); as projectDetailsConfig) {\n @defer (when activeTab() === \"projectDetails\") {\n <div\n class=\"h-full min-h-0 lg:overflow-hidden\"\n [hidden]=\"activeTab() !== 'projectDetails'\"\n >\n <div\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\n >\n <p class=\"mb-3 text-xs text-surface-500\">\n {{ t(\"publish.projectDetailsLiveNote\") }}\n </p>\n <mt-client-instance-preview [config]=\"projectDetailsConfig\" />\n </div>\n </div>\n }\n }\n\n <!-- Approval history -->\n @if (canRenderPreview()) {\n @defer (when activeTab() === \"approvals\") {\n <div\n class=\"h-full min-h-0 lg:overflow-hidden\"\n [hidden]=\"activeTab() !== 'approvals'\"\n >\n <div\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\n >\n <mt-work-center-process-preview\n [requestId]=\"requestId()\"\n [view]=\"'approvals'\"\n />\n </div>\n </div>\n }\n }\n\n <!-- Workflow -->\n @if (canRenderPreview()) {\n @defer (when activeTab() === \"workflow\") {\n <div\n class=\"h-full min-h-0 lg:overflow-hidden\"\n [hidden]=\"activeTab() !== 'workflow'\"\n >\n <div\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\n >\n <mt-work-center-process-preview\n [requestId]=\"requestId()\"\n [view]=\"'schema'\"\n />\n </div>\n </div>\n }\n }\n\n <!-- Discussion -->\n @if (!readOnly() && canRenderDiscussion()) {\n @defer (when activeTab() === \"discussion\") {\n <div\n class=\"h-full min-h-0 lg:overflow-hidden\"\n [hidden]=\"activeTab() !== 'discussion'\"\n >\n <div\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\n >\n <mt-discussion-thread\n [moduleType]=\"'ProcessRequest'\"\n [recordId]=\"resolvedRequestId()\"\n [mentionSearchEndpoint]=\"'Identity/users'\"\n [mentionSearchParam]=\"'query'\"\n [mentionSearchDataPath]=\"'data'\"\n [uploadEndpoint]=\"'uploader'\"\n [attachmentDownloadEndpoint]=\"'uploader'\"\n [showParticipants]=\"true\"\n [autoMarkRead]=\"true\"\n [refreshIntervalMs]=\"0\"\n [styleClass]=\"'h-full'\"\n />\n </div>\n </div>\n }\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: EntityPreviewBody, selector: "mt-entity-preview-body", inputs: ["data", "attachmentShape"] }], deferBlockDependencies: [() => [ClientInstancePreview], () => [import('./masterteam-work-center-work-center-process-preview-i6-jwMEG.mjs').then(m => m.WorkCenterProcessPreview)], () => [import('./masterteam-work-center-work-center-process-preview-i6-jwMEG.mjs').then(m => m.WorkCenterProcessPreview)], () => [import('@masterteam/discussion').then(m => m.DiscussionThread)]] });
|
|
2009
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterSchedulePublishType, isStandalone: true, selector: "mt-work-center-schedule-publish-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <!-- Comparison -->\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'comparison'\"\r\n >\r\n <div\r\n class=\"flex h-full min-h-0 min-w-0 flex-col gap-3 lg:overflow-hidden\"\r\n >\r\n @if (loading()) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"loading.schedulePublish\") }}\r\n </p>\r\n </div>\r\n } @else if (error(); as loadError) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-red-300 bg-red-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-red-600\">\r\n {{ loadError }}\r\n </p>\r\n </div>\r\n } @else if (!summary().hasSnapshot) {\r\n <!-- Never published: nothing has been announced, so nothing can\r\n differ from it. That is a different statement from \"no changes\". -->\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"publish.neverPublished\") }}\r\n </p>\r\n </div>\r\n } @else if (!summary().needsAttention) {\r\n <!-- Not `isEmpty`: a request whose only rows are zero-diff conflict\r\n convergences is publish-empty but must still show its conflicts\r\n section rather than claim there is nothing here. -->\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"publish.nothingToPublish\") }}\r\n </p>\r\n </div>\r\n } @else {\r\n <!-- Counts stay visible while searching, so a filtered view never\r\n reads as the whole request. -->\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @if (summary().conflictCount > 0) {\r\n <span\r\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"groupBadgeClass('conflict')\"\r\n >{{\r\n t(\"publish.conflictCount\", {\r\n count: summary().conflictCount,\r\n })\r\n }}</span\r\n >\r\n }\r\n <span\r\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"groupBadgeClass('added')\"\r\n >{{\r\n t(\"publish.addedCount\", { count: summary().addedCount })\r\n }}</span\r\n >\r\n <span\r\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"groupBadgeClass('changed')\"\r\n >{{\r\n t(\"publish.changedCount\", { count: summary().changedCount })\r\n }}</span\r\n >\r\n <span\r\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"groupBadgeClass('removed')\"\r\n >{{\r\n t(\"publish.removedCount\", { count: summary().removedCount })\r\n }}</span\r\n >\r\n </div>\r\n\r\n <input\r\n type=\"search\"\r\n class=\"w-full rounded-md border border-surface-300 bg-surface-0 px-3 py-2 text-sm outline-none focus:border-primary-400\"\r\n [placeholder]=\"t('publish.searchPlaceholder')\"\r\n [value]=\"searchText()\"\r\n (input)=\"onSearch($any($event.target).value)\"\r\n />\r\n\r\n <div\r\n class=\"min-h-0 flex-1 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (searchFoundNothing()) {\r\n <div\r\n class=\"flex min-h-[12rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"text-sm text-surface-500\">\r\n {{ t(\"publish.noSearchResults\") }}\r\n </p>\r\n </div>\r\n }\r\n\r\n @for (group of groups(); track group.state) {\r\n <section class=\"mb-4\">\r\n <header class=\"mb-2 flex items-center gap-2\">\r\n <h4 class=\"text-sm font-semibold text-surface-700\">\r\n {{ groupLabel(group.state) }}\r\n </h4>\r\n <span\r\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"groupBadgeClass(group.state)\"\r\n >{{ group.totalCount }}</span\r\n >\r\n </header>\r\n\r\n @if (group.state === \"conflict\") {\r\n <!-- Informational only: unlike the planner's drawer there is\r\n no keep-mine / use-published control here. The frozen\r\n plan under approval was captured while the live plan had\r\n moved on these rows. -->\r\n <p class=\"mb-2 text-xs text-surface-500\">\r\n {{ t(\"publish.conflictHint\") }}\r\n </p>\r\n }\r\n\r\n <ul class=\"flex flex-col gap-1\">\r\n @for (row of visibleRows(group); track rowKey(row)) {\r\n <li\r\n class=\"rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full items-center gap-2 px-3 py-2 text-start\"\r\n [class.cursor-default]=\"!isExpandable(row)\"\r\n [attr.aria-expanded]=\"\r\n isExpandable(row) ? isExpanded(row) : null\r\n \"\r\n [disabled]=\"!isExpandable(row)\"\r\n (click)=\"toggleRow(row)\"\r\n >\r\n @if (isExpandable(row)) {\r\n <span\r\n class=\"shrink-0 text-xs text-surface-500\"\r\n aria-hidden=\"true\"\r\n >{{ isExpanded(row) ? \"\u25BE\" : \"\u25B8\" }}</span\r\n >\r\n } @else {\r\n <span\r\n class=\"w-3 shrink-0\"\r\n aria-hidden=\"true\"\r\n ></span>\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate text-sm text-surface-800\"\r\n >{{ row.name }}</span\r\n >\r\n @if (row.type) {\r\n <span class=\"shrink-0 text-xs text-surface-500\">{{\r\n row.type\r\n }}</span>\r\n }\r\n </button>\r\n\r\n @if (\r\n group.state === \"conflict\" &&\r\n publishedMovedFields(row).length > 0\r\n ) {\r\n <p\r\n class=\"border-t border-surface-200 px-3 py-1.5 text-xs text-orange-700\"\r\n >\r\n {{ t(\"publish.publishedSideMoved\") }}:\r\n {{ publishedMovedFields(row).join(\", \") }}\r\n </p>\r\n }\r\n\r\n @if (isExpandable(row) && isExpanded(row)) {\r\n <div\r\n class=\"flex flex-col gap-3 border-t border-surface-200 px-3 py-3\"\r\n >\r\n @for (\r\n change of changesFor(row);\r\n track change.field\r\n ) {\r\n <div class=\"flex min-w-0 flex-col gap-1\">\r\n <span\r\n class=\"text-xs font-medium text-surface-600\"\r\n >{{ fieldLabel(change.field) }}</span\r\n >\r\n <!-- Before -> After rendered locally rather than\r\n via mt-comparison-value, whose Before/After\r\n labels are hardcoded English. Each side still\r\n goes through mt-entity-preview-body, so a date\r\n renders as a date and a user as an avatar. -->\r\n <div\r\n class=\"flex w-full min-w-0 items-stretch gap-3\"\r\n >\r\n <div\r\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span\r\n class=\"text-xs font-medium uppercase tracking-wide text-muted-color\"\r\n >{{ t(\"publish.before\") }}</span\r\n >\r\n <mt-entity-preview-body\r\n [data]=\"sideEntity(change, 'published')\"\r\n />\r\n </div>\r\n <div\r\n class=\"flex shrink-0 items-center text-muted-color\"\r\n aria-hidden=\"true\"\r\n >\r\n →\r\n </div>\r\n <div\r\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-primary-200 bg-primary-50 px-3 py-2\"\r\n >\r\n <span\r\n class=\"text-xs font-medium uppercase tracking-wide text-primary-600\"\r\n >{{ t(\"publish.after\") }}</span\r\n >\r\n <mt-entity-preview-body\r\n [data]=\"sideEntity(change, 'current')\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n\r\n @if (hiddenCount(group) > 0) {\r\n <!-- Said out loud: a silently truncated comparison reads as a\r\n complete one to whoever is approving it. -->\r\n <p class=\"mt-2 text-xs text-surface-500\">\r\n {{\r\n t(\"publish.hiddenRows\", { count: hiddenCount(group) })\r\n }}\r\n </p>\r\n }\r\n </section>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Project record preview. Loaded only when opened; it is a current\r\n record view, while Comparison is the frozen submitted schedule. -->\r\n @if (projectDetailsConfig(); as projectDetailsConfig) {\r\n @defer (when activeTab() === \"projectDetails\") {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'projectDetails'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <p class=\"mb-3 text-xs text-surface-500\">\r\n {{ t(\"publish.projectDetailsLiveNote\") }}\r\n </p>\r\n <mt-client-instance-preview [config]=\"projectDetailsConfig\" />\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Approval history -->\r\n @if (canRenderPreview()) {\r\n @defer (when activeTab() === \"approvals\") {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'approvals'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'approvals'\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Workflow -->\r\n @if (canRenderPreview()) {\r\n @defer (when activeTab() === \"workflow\") {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'workflow'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'schema'\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Discussion -->\r\n @if (!readOnly() && canRenderDiscussion()) {\r\n @defer (when activeTab() === \"discussion\") {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"'ProcessRequest'\"\r\n [recordId]=\"resolvedRequestId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: EntityPreviewBody, selector: "mt-entity-preview-body", inputs: ["data", "attachmentShape"] }], deferBlockDependencies: [() => [ClientInstancePreview], () => [import('./masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs').then(m => m.WorkCenterProcessPreview)], () => [import('./masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs').then(m => m.WorkCenterProcessPreview)], () => [import('@masterteam/discussion').then(m => m.DiscussionThread)]] });
|
|
2006
2010
|
}
|
|
2007
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterSchedulePublishType, resolveDeferredDeps: () => [import('./masterteam-work-center-work-center-process-preview-
|
|
2011
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterSchedulePublishType, resolveDeferredDeps: () => [import('./masterteam-work-center-work-center-process-preview-CxhhWPvk.mjs').then(m => m.WorkCenterProcessPreview), import('@masterteam/discussion').then(m => m.DiscussionThread)], resolveMetadata: (WorkCenterProcessPreview, DiscussionThread) => ({ decorators: [{
|
|
2008
2012
|
type: Component,
|
|
2009
2013
|
args: [{ selector: 'mt-work-center-schedule-publish-type', standalone: true, imports: [
|
|
2010
2014
|
CommonModule,
|
|
@@ -2014,7 +2018,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ng
|
|
|
2014
2018
|
DiscussionThread,
|
|
2015
2019
|
EntityPreviewBody,
|
|
2016
2020
|
WorkCenterProcessPreview,
|
|
2017
|
-
], template: "<div\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\n *transloco=\"let t; prefix: 'workCenter'\"\n>\n <div\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\n >\n @if (tabOptions().length > 1) {\n <mt-tabs\n [(active)]=\"activeTab\"\n [options]=\"tabOptions()\"\n mode=\"vertical\"\n size=\"small\"\n />\n }\n\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\n <!-- Comparison -->\n <div\n class=\"h-full min-h-0 lg:overflow-hidden\"\n [hidden]=\"activeTab() !== 'comparison'\"\n >\n <div\n class=\"flex h-full min-h-0 min-w-0 flex-col gap-3 lg:overflow-hidden\"\n >\n @if (loading()) {\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n {{ t(\"loading.schedulePublish\") }}\n </p>\n </div>\n } @else if (error(); as loadError) {\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-red-300 bg-red-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-red-600\">\n {{ loadError }}\n </p>\n </div>\n } @else if (!summary().hasSnapshot) {\n <!-- Never published: nothing has been announced, so nothing can\n differ from it. That is a different statement from \"no changes\". -->\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n {{ t(\"publish.neverPublished\") }}\n </p>\n </div>\n } @else if (!summary().needsAttention) {\n <!-- Not `isEmpty`: a request whose only rows are zero-diff conflict\n convergences is publish-empty but must still show its conflicts\n section rather than claim there is nothing here. -->\n <div\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"max-w-md text-center text-sm text-surface-500\">\n {{ t(\"publish.nothingToPublish\") }}\n </p>\n </div>\n } @else {\n <!-- Counts stay visible while searching, so a filtered view never\n reads as the whole request. -->\n <div class=\"flex flex-wrap items-center gap-2\">\n @if (summary().conflictCount > 0) {\n <span\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\n [class]=\"groupBadgeClass('conflict')\"\n >{{\n t(\"publish.conflictCount\", {\n count: summary().conflictCount,\n })\n }}</span\n >\n }\n <span\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\n [class]=\"groupBadgeClass('added')\"\n >{{\n t(\"publish.addedCount\", { count: summary().addedCount })\n }}</span\n >\n <span\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\n [class]=\"groupBadgeClass('changed')\"\n >{{\n t(\"publish.changedCount\", { count: summary().changedCount })\n }}</span\n >\n <span\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\n [class]=\"groupBadgeClass('removed')\"\n >{{\n t(\"publish.removedCount\", { count: summary().removedCount })\n }}</span\n >\n </div>\n\n <input\n type=\"search\"\n class=\"w-full rounded-md border border-surface-300 bg-surface-0 px-3 py-2 text-sm outline-none focus:border-primary-400\"\n [placeholder]=\"t('publish.searchPlaceholder')\"\n [value]=\"searchText()\"\n (input)=\"onSearch($any($event.target).value)\"\n />\n\n <div\n class=\"min-h-0 flex-1 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\n >\n @if (searchFoundNothing()) {\n <div\n class=\"flex min-h-[12rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\n >\n <p class=\"text-sm text-surface-500\">\n {{ t(\"publish.noSearchResults\") }}\n </p>\n </div>\n }\n\n @for (group of groups(); track group.state) {\n <section class=\"mb-4\">\n <header class=\"mb-2 flex items-center gap-2\">\n <h4 class=\"text-sm font-semibold text-surface-700\">\n {{ groupLabel(group.state) }}\n </h4>\n <span\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\n [class]=\"groupBadgeClass(group.state)\"\n >{{ group.totalCount }}</span\n >\n </header>\n\n @if (group.state === \"conflict\") {\n <!-- Informational only: unlike the planner's drawer there is\n no keep-mine / use-published control here. The frozen\n plan under approval was captured while the live plan had\n moved on these rows. -->\n <p class=\"mb-2 text-xs text-surface-500\">\n {{ t(\"publish.conflictHint\") }}\n </p>\n }\n\n <ul class=\"flex flex-col gap-1\">\n @for (row of visibleRows(group); track rowKey(row)) {\n <li\n class=\"rounded-md border border-surface-200 bg-surface-0\"\n >\n <button\n type=\"button\"\n class=\"flex w-full items-center gap-2 px-3 py-2 text-start\"\n [class.cursor-default]=\"!isExpandable(row)\"\n [attr.aria-expanded]=\"\n isExpandable(row) ? isExpanded(row) : null\n \"\n [disabled]=\"!isExpandable(row)\"\n (click)=\"toggleRow(row)\"\n >\n @if (isExpandable(row)) {\n <span\n class=\"shrink-0 text-xs text-surface-500\"\n aria-hidden=\"true\"\n >{{ isExpanded(row) ? \"\u25BE\" : \"\u25B8\" }}</span\n >\n } @else {\n <span\n class=\"w-3 shrink-0\"\n aria-hidden=\"true\"\n ></span>\n }\n <span\n class=\"min-w-0 flex-1 truncate text-sm text-surface-800\"\n >{{ row.name }}</span\n >\n @if (row.type) {\n <span class=\"shrink-0 text-xs text-surface-500\">{{\n row.type\n }}</span>\n }\n </button>\n\n @if (\n group.state === \"conflict\" &&\n publishedMovedFields(row).length > 0\n ) {\n <p\n class=\"border-t border-surface-200 px-3 py-1.5 text-xs text-orange-700\"\n >\n {{ t(\"publish.publishedSideMoved\") }}:\n {{ publishedMovedFields(row).join(\", \") }}\n </p>\n }\n\n @if (isExpandable(row) && isExpanded(row)) {\n <div\n class=\"flex flex-col gap-3 border-t border-surface-200 px-3 py-3\"\n >\n @for (\n change of changesFor(row);\n track change.field\n ) {\n <div class=\"flex min-w-0 flex-col gap-1\">\n <span\n class=\"text-xs font-medium text-surface-600\"\n >{{ fieldLabel(change.field) }}</span\n >\n <!-- Before -> After rendered locally rather than\n via mt-comparison-value, whose Before/After\n labels are hardcoded English. Each side still\n goes through mt-entity-preview-body, so a date\n renders as a date and a user as an avatar. -->\n <div\n class=\"flex w-full min-w-0 items-stretch gap-3\"\n >\n <div\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-surface-200 bg-surface-50 px-3 py-2\"\n >\n <span\n class=\"text-xs font-medium uppercase tracking-wide text-muted-color\"\n >{{ t(\"publish.before\") }}</span\n >\n <mt-entity-preview-body\n [data]=\"sideEntity(change, 'published')\"\n />\n </div>\n <div\n class=\"flex shrink-0 items-center text-muted-color\"\n aria-hidden=\"true\"\n >\n →\n </div>\n <div\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-primary-200 bg-primary-50 px-3 py-2\"\n >\n <span\n class=\"text-xs font-medium uppercase tracking-wide text-primary-600\"\n >{{ t(\"publish.after\") }}</span\n >\n <mt-entity-preview-body\n [data]=\"sideEntity(change, 'current')\"\n />\n </div>\n </div>\n </div>\n }\n </div>\n }\n </li>\n }\n </ul>\n\n @if (hiddenCount(group) > 0) {\n <!-- Said out loud: a silently truncated comparison reads as a\n complete one to whoever is approving it. -->\n <p class=\"mt-2 text-xs text-surface-500\">\n {{\n t(\"publish.hiddenRows\", { count: hiddenCount(group) })\n }}\n </p>\n }\n </section>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Project record preview. Loaded only when opened; it is a current\n record view, while Comparison is the frozen submitted schedule. -->\n @if (projectDetailsConfig(); as projectDetailsConfig) {\n @defer (when activeTab() === \"projectDetails\") {\n <div\n class=\"h-full min-h-0 lg:overflow-hidden\"\n [hidden]=\"activeTab() !== 'projectDetails'\"\n >\n <div\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\n >\n <p class=\"mb-3 text-xs text-surface-500\">\n {{ t(\"publish.projectDetailsLiveNote\") }}\n </p>\n <mt-client-instance-preview [config]=\"projectDetailsConfig\" />\n </div>\n </div>\n }\n }\n\n <!-- Approval history -->\n @if (canRenderPreview()) {\n @defer (when activeTab() === \"approvals\") {\n <div\n class=\"h-full min-h-0 lg:overflow-hidden\"\n [hidden]=\"activeTab() !== 'approvals'\"\n >\n <div\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\n >\n <mt-work-center-process-preview\n [requestId]=\"requestId()\"\n [view]=\"'approvals'\"\n />\n </div>\n </div>\n }\n }\n\n <!-- Workflow -->\n @if (canRenderPreview()) {\n @defer (when activeTab() === \"workflow\") {\n <div\n class=\"h-full min-h-0 lg:overflow-hidden\"\n [hidden]=\"activeTab() !== 'workflow'\"\n >\n <div\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\n >\n <mt-work-center-process-preview\n [requestId]=\"requestId()\"\n [view]=\"'schema'\"\n />\n </div>\n </div>\n }\n }\n\n <!-- Discussion -->\n @if (!readOnly() && canRenderDiscussion()) {\n @defer (when activeTab() === \"discussion\") {\n <div\n class=\"h-full min-h-0 lg:overflow-hidden\"\n [hidden]=\"activeTab() !== 'discussion'\"\n >\n <div\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\n >\n <mt-discussion-thread\n [moduleType]=\"'ProcessRequest'\"\n [recordId]=\"resolvedRequestId()\"\n [mentionSearchEndpoint]=\"'Identity/users'\"\n [mentionSearchParam]=\"'query'\"\n [mentionSearchDataPath]=\"'data'\"\n [uploadEndpoint]=\"'uploader'\"\n [attachmentDownloadEndpoint]=\"'uploader'\"\n [showParticipants]=\"true\"\n [autoMarkRead]=\"true\"\n [refreshIntervalMs]=\"0\"\n [styleClass]=\"'h-full'\"\n />\n </div>\n </div>\n }\n }\n </div>\n </div>\n</div>\n" }]
|
|
2021
|
+
], template: "<div\r\n class=\"mt-modal-content flex h-full min-h-0 flex-col gap-4 p-4 lg:overflow-hidden\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <div\r\n class=\"flex flex-1 min-h-0 flex-col gap-4 lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-6\"\r\n >\r\n @if (tabOptions().length > 1) {\r\n <mt-tabs\r\n [(active)]=\"activeTab\"\r\n [options]=\"tabOptions()\"\r\n mode=\"vertical\"\r\n size=\"small\"\r\n />\r\n }\r\n\r\n <div class=\"min-w-0 flex-1 min-h-0 lg:overflow-hidden\">\r\n <!-- Comparison -->\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'comparison'\"\r\n >\r\n <div\r\n class=\"flex h-full min-h-0 min-w-0 flex-col gap-3 lg:overflow-hidden\"\r\n >\r\n @if (loading()) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"loading.schedulePublish\") }}\r\n </p>\r\n </div>\r\n } @else if (error(); as loadError) {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-red-300 bg-red-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-red-600\">\r\n {{ loadError }}\r\n </p>\r\n </div>\r\n } @else if (!summary().hasSnapshot) {\r\n <!-- Never published: nothing has been announced, so nothing can\r\n differ from it. That is a different statement from \"no changes\". -->\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"publish.neverPublished\") }}\r\n </p>\r\n </div>\r\n } @else if (!summary().needsAttention) {\r\n <!-- Not `isEmpty`: a request whose only rows are zero-diff conflict\r\n convergences is publish-empty but must still show its conflicts\r\n section rather than claim there is nothing here. -->\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"max-w-md text-center text-sm text-surface-500\">\r\n {{ t(\"publish.nothingToPublish\") }}\r\n </p>\r\n </div>\r\n } @else {\r\n <!-- Counts stay visible while searching, so a filtered view never\r\n reads as the whole request. -->\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @if (summary().conflictCount > 0) {\r\n <span\r\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"groupBadgeClass('conflict')\"\r\n >{{\r\n t(\"publish.conflictCount\", {\r\n count: summary().conflictCount,\r\n })\r\n }}</span\r\n >\r\n }\r\n <span\r\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"groupBadgeClass('added')\"\r\n >{{\r\n t(\"publish.addedCount\", { count: summary().addedCount })\r\n }}</span\r\n >\r\n <span\r\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"groupBadgeClass('changed')\"\r\n >{{\r\n t(\"publish.changedCount\", { count: summary().changedCount })\r\n }}</span\r\n >\r\n <span\r\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"groupBadgeClass('removed')\"\r\n >{{\r\n t(\"publish.removedCount\", { count: summary().removedCount })\r\n }}</span\r\n >\r\n </div>\r\n\r\n <input\r\n type=\"search\"\r\n class=\"w-full rounded-md border border-surface-300 bg-surface-0 px-3 py-2 text-sm outline-none focus:border-primary-400\"\r\n [placeholder]=\"t('publish.searchPlaceholder')\"\r\n [value]=\"searchText()\"\r\n (input)=\"onSearch($any($event.target).value)\"\r\n />\r\n\r\n <div\r\n class=\"min-h-0 flex-1 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n @if (searchFoundNothing()) {\r\n <div\r\n class=\"flex min-h-[12rem] items-center justify-center rounded-lg border border-dashed border-surface-300 bg-surface-50 p-6\"\r\n >\r\n <p class=\"text-sm text-surface-500\">\r\n {{ t(\"publish.noSearchResults\") }}\r\n </p>\r\n </div>\r\n }\r\n\r\n @for (group of groups(); track group.state) {\r\n <section class=\"mb-4\">\r\n <header class=\"mb-2 flex items-center gap-2\">\r\n <h4 class=\"text-sm font-semibold text-surface-700\">\r\n {{ groupLabel(group.state) }}\r\n </h4>\r\n <span\r\n class=\"rounded-full px-2 py-0.5 text-xs font-medium\"\r\n [class]=\"groupBadgeClass(group.state)\"\r\n >{{ group.totalCount }}</span\r\n >\r\n </header>\r\n\r\n @if (group.state === \"conflict\") {\r\n <!-- Informational only: unlike the planner's drawer there is\r\n no keep-mine / use-published control here. The frozen\r\n plan under approval was captured while the live plan had\r\n moved on these rows. -->\r\n <p class=\"mb-2 text-xs text-surface-500\">\r\n {{ t(\"publish.conflictHint\") }}\r\n </p>\r\n }\r\n\r\n <ul class=\"flex flex-col gap-1\">\r\n @for (row of visibleRows(group); track rowKey(row)) {\r\n <li\r\n class=\"rounded-md border border-surface-200 bg-surface-0\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"flex w-full items-center gap-2 px-3 py-2 text-start\"\r\n [class.cursor-default]=\"!isExpandable(row)\"\r\n [attr.aria-expanded]=\"\r\n isExpandable(row) ? isExpanded(row) : null\r\n \"\r\n [disabled]=\"!isExpandable(row)\"\r\n (click)=\"toggleRow(row)\"\r\n >\r\n @if (isExpandable(row)) {\r\n <span\r\n class=\"shrink-0 text-xs text-surface-500\"\r\n aria-hidden=\"true\"\r\n >{{ isExpanded(row) ? \"\u25BE\" : \"\u25B8\" }}</span\r\n >\r\n } @else {\r\n <span\r\n class=\"w-3 shrink-0\"\r\n aria-hidden=\"true\"\r\n ></span>\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate text-sm text-surface-800\"\r\n >{{ row.name }}</span\r\n >\r\n @if (row.type) {\r\n <span class=\"shrink-0 text-xs text-surface-500\">{{\r\n row.type\r\n }}</span>\r\n }\r\n </button>\r\n\r\n @if (\r\n group.state === \"conflict\" &&\r\n publishedMovedFields(row).length > 0\r\n ) {\r\n <p\r\n class=\"border-t border-surface-200 px-3 py-1.5 text-xs text-orange-700\"\r\n >\r\n {{ t(\"publish.publishedSideMoved\") }}:\r\n {{ publishedMovedFields(row).join(\", \") }}\r\n </p>\r\n }\r\n\r\n @if (isExpandable(row) && isExpanded(row)) {\r\n <div\r\n class=\"flex flex-col gap-3 border-t border-surface-200 px-3 py-3\"\r\n >\r\n @for (\r\n change of changesFor(row);\r\n track change.field\r\n ) {\r\n <div class=\"flex min-w-0 flex-col gap-1\">\r\n <span\r\n class=\"text-xs font-medium text-surface-600\"\r\n >{{ fieldLabel(change.field) }}</span\r\n >\r\n <!-- Before -> After rendered locally rather than\r\n via mt-comparison-value, whose Before/After\r\n labels are hardcoded English. Each side still\r\n goes through mt-entity-preview-body, so a date\r\n renders as a date and a user as an avatar. -->\r\n <div\r\n class=\"flex w-full min-w-0 items-stretch gap-3\"\r\n >\r\n <div\r\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-surface-200 bg-surface-50 px-3 py-2\"\r\n >\r\n <span\r\n class=\"text-xs font-medium uppercase tracking-wide text-muted-color\"\r\n >{{ t(\"publish.before\") }}</span\r\n >\r\n <mt-entity-preview-body\r\n [data]=\"sideEntity(change, 'published')\"\r\n />\r\n </div>\r\n <div\r\n class=\"flex shrink-0 items-center text-muted-color\"\r\n aria-hidden=\"true\"\r\n >\r\n →\r\n </div>\r\n <div\r\n class=\"flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-primary-200 bg-primary-50 px-3 py-2\"\r\n >\r\n <span\r\n class=\"text-xs font-medium uppercase tracking-wide text-primary-600\"\r\n >{{ t(\"publish.after\") }}</span\r\n >\r\n <mt-entity-preview-body\r\n [data]=\"sideEntity(change, 'current')\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n\r\n @if (hiddenCount(group) > 0) {\r\n <!-- Said out loud: a silently truncated comparison reads as a\r\n complete one to whoever is approving it. -->\r\n <p class=\"mt-2 text-xs text-surface-500\">\r\n {{\r\n t(\"publish.hiddenRows\", { count: hiddenCount(group) })\r\n }}\r\n </p>\r\n }\r\n </section>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Project record preview. Loaded only when opened; it is a current\r\n record view, while Comparison is the frozen submitted schedule. -->\r\n @if (projectDetailsConfig(); as projectDetailsConfig) {\r\n @defer (when activeTab() === \"projectDetails\") {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'projectDetails'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <p class=\"mb-3 text-xs text-surface-500\">\r\n {{ t(\"publish.projectDetailsLiveNote\") }}\r\n </p>\r\n <mt-client-instance-preview [config]=\"projectDetailsConfig\" />\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Approval history -->\r\n @if (canRenderPreview()) {\r\n @defer (when activeTab() === \"approvals\") {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'approvals'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'approvals'\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Workflow -->\r\n @if (canRenderPreview()) {\r\n @defer (when activeTab() === \"workflow\") {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'workflow'\"\r\n >\r\n <div\r\n class=\"min-w-0 h-full min-h-0 lg:overflow-y-auto lg:overscroll-contain lg:pr-2\"\r\n >\r\n <mt-work-center-process-preview\r\n [requestId]=\"requestId()\"\r\n [view]=\"'schema'\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n }\r\n\r\n <!-- Discussion -->\r\n @if (!readOnly() && canRenderDiscussion()) {\r\n @defer (when activeTab() === \"discussion\") {\r\n <div\r\n class=\"h-full min-h-0 lg:overflow-hidden\"\r\n [hidden]=\"activeTab() !== 'discussion'\"\r\n >\r\n <div\r\n class=\"h-[32rem] min-h-[22rem] overflow-hidden rounded-lg border border-surface-200 bg-surface-50 lg:h-full lg:min-h-0\"\r\n >\r\n <mt-discussion-thread\r\n [moduleType]=\"'ProcessRequest'\"\r\n [recordId]=\"resolvedRequestId()\"\r\n [mentionSearchEndpoint]=\"'Identity/users'\"\r\n [mentionSearchParam]=\"'query'\"\r\n [mentionSearchDataPath]=\"'data'\"\r\n [uploadEndpoint]=\"'uploader'\"\r\n [attachmentDownloadEndpoint]=\"'uploader'\"\r\n [showParticipants]=\"true\"\r\n [autoMarkRead]=\"true\"\r\n [refreshIntervalMs]=\"0\"\r\n [styleClass]=\"'h-full'\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
|
|
2018
2022
|
}], ctorParameters: () => [], propDecorators: { details: [{ type: i0.Input, args: [{ isSignal: true, alias: "details", required: true }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }] } }) });
|
|
2019
2023
|
/**
|
|
2020
2024
|
* The comparison arrives on the response root, but several runtime endpoints
|
|
@@ -2105,6 +2109,166 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
2105
2109
|
}, template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n @if (registeredComponent(); as registered) {\r\n <!-- Host registration wins, so a new request type no longer needs a package\r\n release. Nothing is registered by default, so the chain below is what\r\n every existing host still gets. -->\r\n <ng-container\r\n *ngComponentOutlet=\"registered; inputs: registeredInputs()\"\r\n ></ng-container>\r\n } @else if (isSchedulePublish()) {\r\n <!-- Dispatched on the OPERATION KEY, not on a new `type`: a publish request\r\n arrives as ProcessStep or ProcessRequest like any other, so the published\r\n Work Center type contract is unchanged. -->\r\n <mt-work-center-schedule-publish-type\r\n [details]=\"details()\"\r\n [readOnly]=\"readOnly()\"\r\n />\r\n } @else if (details().type === \"ProcessStep\") {\r\n <mt-work-center-process-step-type\r\n [details]=\"details()\"\r\n [lookups]=\"lookups()\"\r\n [readOnly]=\"readOnly()\"\r\n />\r\n } @else if (details().type === \"ProcessRequest\") {\r\n <mt-work-center-process-request-type\r\n [details]=\"details()\"\r\n [lookups]=\"lookups()\"\r\n [readOnly]=\"readOnly()\"\r\n />\r\n } @else if (details().type === \"EscalationInstance\") {\r\n <mt-work-center-escalation-instance-type\r\n [details]=\"details()\"\r\n [readOnly]=\"readOnly()\"\r\n />\r\n } @else if (details().type === \"Module\" || details().type === \"GeneralTask\") {\r\n <mt-work-center-module-type\r\n [details]=\"details()\"\r\n [lookups]=\"lookups()\"\r\n [readOnly]=\"readOnly()\"\r\n />\r\n } @else {\r\n <div class=\"mt-modal-content flex h-full items-center justify-center p-4\">\r\n <p class=\"text-sm text-surface-500\">{{ t(\"modal.unsupportedType\") }}</p>\r\n </div>\r\n }\r\n</ng-container>\r\n" }]
|
|
2106
2110
|
}], propDecorators: { details: [{ type: i0.Input, args: [{ isSignal: true, alias: "details", required: true }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }] } });
|
|
2107
2111
|
|
|
2112
|
+
/**
|
|
2113
|
+
* Item `type` per runtime row id prefix (`process-step:1234`).
|
|
2114
|
+
*
|
|
2115
|
+
* The list row carries `id` and `context` but no `type` — only
|
|
2116
|
+
* `item-basic-info` answers with it. The id prefix names the same adapter
|
|
2117
|
+
* (checked on Dev on 2026-11-25 against every row of 8 cards: 43 of 43 agreed).
|
|
2118
|
+
* A prefix missing here simply skips the early form load.
|
|
2119
|
+
*/
|
|
2120
|
+
const ITEM_TYPE_BY_ROW_ID_PREFIX = {
|
|
2121
|
+
'process-step': 'ProcessStep',
|
|
2122
|
+
'process-request': 'ProcessRequest',
|
|
2123
|
+
'general-task': 'GeneralTask',
|
|
2124
|
+
'module-data': 'Module',
|
|
2125
|
+
'schedule-task': 'Module',
|
|
2126
|
+
};
|
|
2127
|
+
/**
|
|
2128
|
+
* The `type` and `context` of the list row a drawer was opened from, or `null`
|
|
2129
|
+
* when the row is not on the loaded page (a deep link, a refreshed drawer).
|
|
2130
|
+
*
|
|
2131
|
+
* Rows in the store are display rows: a field that is also a column holds the
|
|
2132
|
+
* column's display cell (`{ ...column, value }`), so cells are unwrapped.
|
|
2133
|
+
*/
|
|
2134
|
+
function findWorkCenterRowSource(rows, contextKey) {
|
|
2135
|
+
const row = rows.find((candidate) => {
|
|
2136
|
+
const key = rowValue(candidate, 'contextKey');
|
|
2137
|
+
return typeof key === 'string' && key === contextKey;
|
|
2138
|
+
});
|
|
2139
|
+
if (!row) {
|
|
2140
|
+
return null;
|
|
2141
|
+
}
|
|
2142
|
+
const id = rowValue(row, 'id');
|
|
2143
|
+
const prefix = typeof id === 'string' ? id.split(':')[0] : '';
|
|
2144
|
+
const type = ITEM_TYPE_BY_ROW_ID_PREFIX[prefix];
|
|
2145
|
+
const context = rowValue(row, 'context');
|
|
2146
|
+
if (!type || !context || typeof context !== 'object') {
|
|
2147
|
+
return null;
|
|
2148
|
+
}
|
|
2149
|
+
return { type, context: context };
|
|
2150
|
+
}
|
|
2151
|
+
/**
|
|
2152
|
+
* The `process-form-load` request the drawer body of `type` sends for this
|
|
2153
|
+
* item context — the same inputs `WorkCenterProcessStepType`,
|
|
2154
|
+
* `WorkCenterProcessRequestType` and `WorkCenterModuleType` bind on their
|
|
2155
|
+
* `mt-client-form`. `null` for an item whose body loads no form.
|
|
2156
|
+
*
|
|
2157
|
+
* Keep it in step with those templates: a drift costs a second form load, and
|
|
2158
|
+
* `work-center-form-load-prefetch.spec.ts` renders each of them to catch it.
|
|
2159
|
+
*/
|
|
2160
|
+
function buildWorkCenterFormLoadRequest(type, context) {
|
|
2161
|
+
const operationKey = readString$1(context, 'operationKey');
|
|
2162
|
+
if (operationKey === SCHEDULE_PUBLISH_OPERATION_KEY) {
|
|
2163
|
+
return null;
|
|
2164
|
+
}
|
|
2165
|
+
if (type === 'ProcessStep' || type === 'ProcessRequest') {
|
|
2166
|
+
const moduleKey = readString$1(context, 'moduleKey');
|
|
2167
|
+
if (!moduleKey || !operationKey) {
|
|
2168
|
+
return null;
|
|
2169
|
+
}
|
|
2170
|
+
return withoutEmpty({
|
|
2171
|
+
moduleKey,
|
|
2172
|
+
operationKey,
|
|
2173
|
+
moduleId: readNumber(context, 'moduleId'),
|
|
2174
|
+
levelId: readNumber(context, 'levelId'),
|
|
2175
|
+
levelDataId: readNumber(context, 'levelDataId'),
|
|
2176
|
+
moduleDataId: readNumber(context, 'moduleDataId'),
|
|
2177
|
+
requestSchemaId: readNumber(context, 'requestSchemaId'),
|
|
2178
|
+
draftProcessId: readNumber(context, 'draftProcessId') ??
|
|
2179
|
+
readNumber(context, 'requestId'),
|
|
2180
|
+
});
|
|
2181
|
+
}
|
|
2182
|
+
if (type === 'Module' || type === 'GeneralTask') {
|
|
2183
|
+
const generalTask = type === 'GeneralTask';
|
|
2184
|
+
return withoutEmpty({
|
|
2185
|
+
moduleKey: generalTask ? 'GeneralTask' : 'ModuleData',
|
|
2186
|
+
operationKey: 'Update',
|
|
2187
|
+
moduleId: generalTask ? undefined : readNumber(context, 'moduleId'),
|
|
2188
|
+
levelId: generalTask ? undefined : readNumber(context, 'levelId'),
|
|
2189
|
+
levelDataId: generalTask ? undefined : readNumber(context, 'levelDataId'),
|
|
2190
|
+
moduleDataId: readNumber(context, 'moduleDataId'),
|
|
2191
|
+
});
|
|
2192
|
+
}
|
|
2193
|
+
return null;
|
|
2194
|
+
}
|
|
2195
|
+
/**
|
|
2196
|
+
* Starts the drawer's `process-form-load` together with `item-basic-info`
|
|
2197
|
+
* instead of after it.
|
|
2198
|
+
*
|
|
2199
|
+
* Provided by `WorkCenterItemModalRoute` as its `ClientFormApiService`, so the
|
|
2200
|
+
* `mt-client-form` of the drawer body asks this instance for its form. A load
|
|
2201
|
+
* whose request equals one already started here takes that request (once)
|
|
2202
|
+
* instead of sending another; every other call goes to the network as before.
|
|
2203
|
+
* Nothing is served across items: the drawer clears it on every item change
|
|
2204
|
+
* and reload, and a started load nobody took is cancelled then.
|
|
2205
|
+
*/
|
|
2206
|
+
class WorkCenterFormLoadPrefetch extends ClientFormApiService {
|
|
2207
|
+
started = new Map();
|
|
2208
|
+
prefetch(request) {
|
|
2209
|
+
const key = formLoadKey(request);
|
|
2210
|
+
if (this.started.has(key)) {
|
|
2211
|
+
return;
|
|
2212
|
+
}
|
|
2213
|
+
const response$ = super.load(request).pipe(share({
|
|
2214
|
+
connector: () => new ReplaySubject(1),
|
|
2215
|
+
resetOnError: false,
|
|
2216
|
+
resetOnComplete: false,
|
|
2217
|
+
resetOnRefCountZero: true,
|
|
2218
|
+
}));
|
|
2219
|
+
// Errors reach the form that takes the load; this hold only keeps it running.
|
|
2220
|
+
const hold = response$.subscribe({ error: () => undefined });
|
|
2221
|
+
this.started.set(key, { response$, hold });
|
|
2222
|
+
}
|
|
2223
|
+
load(request, silentMessages = false) {
|
|
2224
|
+
const key = formLoadKey(request);
|
|
2225
|
+
const entry = silentMessages ? undefined : this.started.get(key);
|
|
2226
|
+
if (!entry) {
|
|
2227
|
+
return super.load(request, silentMessages);
|
|
2228
|
+
}
|
|
2229
|
+
this.started.delete(key);
|
|
2230
|
+
return new Observable((subscriber) => {
|
|
2231
|
+
const subscription = entry.response$.subscribe(subscriber);
|
|
2232
|
+
entry.hold.unsubscribe();
|
|
2233
|
+
return subscription;
|
|
2234
|
+
});
|
|
2235
|
+
}
|
|
2236
|
+
/** Drops (and cancels, when still running) every load nobody took. */
|
|
2237
|
+
clear() {
|
|
2238
|
+
for (const { hold } of this.started.values()) {
|
|
2239
|
+
hold.unsubscribe();
|
|
2240
|
+
}
|
|
2241
|
+
this.started.clear();
|
|
2242
|
+
}
|
|
2243
|
+
ngOnDestroy() {
|
|
2244
|
+
this.clear();
|
|
2245
|
+
}
|
|
2246
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterFormLoadPrefetch, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
2247
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterFormLoadPrefetch });
|
|
2248
|
+
}
|
|
2249
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterFormLoadPrefetch, decorators: [{
|
|
2250
|
+
type: Injectable
|
|
2251
|
+
}] });
|
|
2252
|
+
function rowValue(row, key) {
|
|
2253
|
+
const value = row[key];
|
|
2254
|
+
if (value &&
|
|
2255
|
+
typeof value === 'object' &&
|
|
2256
|
+
value.key === key &&
|
|
2257
|
+
'value' in value) {
|
|
2258
|
+
return value.value;
|
|
2259
|
+
}
|
|
2260
|
+
return value;
|
|
2261
|
+
}
|
|
2262
|
+
function withoutEmpty(request) {
|
|
2263
|
+
return Object.fromEntries(Object.entries(request).filter(([, value]) => value != null));
|
|
2264
|
+
}
|
|
2265
|
+
/** Field order differs between callers; the request is the same. */
|
|
2266
|
+
function formLoadKey(request) {
|
|
2267
|
+
return JSON.stringify(Object.entries(request)
|
|
2268
|
+
.filter(([, value]) => value != null && value !== false)
|
|
2269
|
+
.sort(([left], [right]) => left.localeCompare(right)));
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2108
2272
|
/**
|
|
2109
2273
|
* HTTP statuses that mean "this Work Center item can no longer be acted on":
|
|
2110
2274
|
* the request was terminated, completed, or otherwise moved out of the current
|
|
@@ -3014,13 +3178,13 @@ class WorkCenterItemModalFooterActions {
|
|
|
3014
3178
|
};
|
|
3015
3179
|
}
|
|
3016
3180
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterItemModalFooterActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3017
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterItemModalFooterActions, isStandalone: true, selector: "mt-work-center-item-modal-footer-actions", inputs: { contextKey: { classPropertyName: "contextKey", publicName: "contextKey", isSignal: true, isRequired: false, transformFunction: null }, previewLevelTarget: { classPropertyName: "previewLevelTarget", publicName: "previewLevelTarget", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionExecuted: "actionExecuted", itemUnavailable: "itemUnavailable", previewLevelSelected: "previewLevelSelected", visibilityChange: "visibilityChange" }, host: { classAttribute: "flex w-full flex-1 flex-wrap items-center justify-end gap-2" }, providers: [WorkCenterActionFormValidator, WorkCenterRuntimeActionExecutor], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\n @if (shouldRender()) {\n @if (loading() && !displayActions().length) {\n <span class=\"me-auto text-sm text-surface-500\">{{\n t(\"modal.loadingActions\")\n }}</span>\n }\n\n @if (previewLevelTarget(); as previewLevelTarget) {\n <mt-button\n [label]=\"previewLevelLabel(previewLevelTarget, t)\"\n severity=\"secondary\"\n variant=\"outlined\"\n [disabled]=\"loading() || !!pendingActionKey()\"\n (onClick)=\"previewLevelSelected.emit(previewLevelTarget)\"\n />\n }\n\n @for (action of displayActions(); track action.actionKey + action.url) {\n <mt-button\n [label]=\"action.label\"\n [severity]=\"action.severity\"\n [variant]=\"action.variant\"\n [disabled]=\"\n loading() || !!pendingActionKey() || action.blockedByContent\n \"\n [tooltip]=\"\n action.blockedByContent\n ? (incompleteReason() ?? t('actions.completeRequiredFields'))\n : ''\n \"\n [loading]=\"pendingActionKey() === action.actionKey\"\n (onClick)=\"executeAction(action)\"\n />\n }\n }\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
3181
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterItemModalFooterActions, isStandalone: true, selector: "mt-work-center-item-modal-footer-actions", inputs: { contextKey: { classPropertyName: "contextKey", publicName: "contextKey", isSignal: true, isRequired: false, transformFunction: null }, previewLevelTarget: { classPropertyName: "previewLevelTarget", publicName: "previewLevelTarget", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionExecuted: "actionExecuted", itemUnavailable: "itemUnavailable", previewLevelSelected: "previewLevelSelected", visibilityChange: "visibilityChange" }, host: { classAttribute: "flex w-full flex-1 flex-wrap items-center justify-end gap-2" }, providers: [WorkCenterActionFormValidator, WorkCenterRuntimeActionExecutor], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n @if (shouldRender()) {\r\n @if (loading() && !displayActions().length) {\r\n <span class=\"me-auto text-sm text-surface-500\">{{\r\n t(\"modal.loadingActions\")\r\n }}</span>\r\n }\r\n\r\n @if (previewLevelTarget(); as previewLevelTarget) {\r\n <mt-button\r\n [label]=\"previewLevelLabel(previewLevelTarget, t)\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n [disabled]=\"loading() || !!pendingActionKey()\"\r\n (onClick)=\"previewLevelSelected.emit(previewLevelTarget)\"\r\n />\r\n }\r\n\r\n @for (action of displayActions(); track action.actionKey + action.url) {\r\n <mt-button\r\n [label]=\"action.label\"\r\n [severity]=\"action.severity\"\r\n [variant]=\"action.variant\"\r\n [disabled]=\"\r\n loading() || !!pendingActionKey() || action.blockedByContent\r\n \"\r\n [tooltip]=\"\r\n action.blockedByContent\r\n ? (incompleteReason() ?? t('actions.completeRequiredFields'))\r\n : ''\r\n \"\r\n [loading]=\"pendingActionKey() === action.actionKey\"\r\n (onClick)=\"executeAction(action)\"\r\n />\r\n }\r\n }\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
3018
3182
|
}
|
|
3019
3183
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterItemModalFooterActions, decorators: [{
|
|
3020
3184
|
type: Component,
|
|
3021
3185
|
args: [{ selector: 'mt-work-center-item-modal-footer-actions', standalone: true, imports: [CommonModule, TranslocoDirective, Button], host: {
|
|
3022
3186
|
class: 'flex w-full flex-1 flex-wrap items-center justify-end gap-2',
|
|
3023
|
-
}, providers: [WorkCenterActionFormValidator, WorkCenterRuntimeActionExecutor], template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\n @if (shouldRender()) {\n @if (loading() && !displayActions().length) {\n <span class=\"me-auto text-sm text-surface-500\">{{\n t(\"modal.loadingActions\")\n }}</span>\n }\n\n @if (previewLevelTarget(); as previewLevelTarget) {\n <mt-button\n [label]=\"previewLevelLabel(previewLevelTarget, t)\"\n severity=\"secondary\"\n variant=\"outlined\"\n [disabled]=\"loading() || !!pendingActionKey()\"\n (onClick)=\"previewLevelSelected.emit(previewLevelTarget)\"\n />\n }\n\n @for (action of displayActions(); track action.actionKey + action.url) {\n <mt-button\n [label]=\"action.label\"\n [severity]=\"action.severity\"\n [variant]=\"action.variant\"\n [disabled]=\"\n loading() || !!pendingActionKey() || action.blockedByContent\n \"\n [tooltip]=\"\n action.blockedByContent\n ? (incompleteReason() ?? t('actions.completeRequiredFields'))\n : ''\n \"\n [loading]=\"pendingActionKey() === action.actionKey\"\n (onClick)=\"executeAction(action)\"\n />\n }\n }\n</ng-container>\n" }]
|
|
3187
|
+
}, providers: [WorkCenterActionFormValidator, WorkCenterRuntimeActionExecutor], template: "<ng-container *transloco=\"let t; prefix: 'workCenter'\">\r\n @if (shouldRender()) {\r\n @if (loading() && !displayActions().length) {\r\n <span class=\"me-auto text-sm text-surface-500\">{{\r\n t(\"modal.loadingActions\")\r\n }}</span>\r\n }\r\n\r\n @if (previewLevelTarget(); as previewLevelTarget) {\r\n <mt-button\r\n [label]=\"previewLevelLabel(previewLevelTarget, t)\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n [disabled]=\"loading() || !!pendingActionKey()\"\r\n (onClick)=\"previewLevelSelected.emit(previewLevelTarget)\"\r\n />\r\n }\r\n\r\n @for (action of displayActions(); track action.actionKey + action.url) {\r\n <mt-button\r\n [label]=\"action.label\"\r\n [severity]=\"action.severity\"\r\n [variant]=\"action.variant\"\r\n [disabled]=\"\r\n loading() || !!pendingActionKey() || action.blockedByContent\r\n \"\r\n [tooltip]=\"\r\n action.blockedByContent\r\n ? (incompleteReason() ?? t('actions.completeRequiredFields'))\r\n : ''\r\n \"\r\n [loading]=\"pendingActionKey() === action.actionKey\"\r\n (onClick)=\"executeAction(action)\"\r\n />\r\n }\r\n }\r\n</ng-container>\r\n" }]
|
|
3024
3188
|
}], ctorParameters: () => [], propDecorators: { contextKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextKey", required: false }] }], previewLevelTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewLevelTarget", required: false }] }], actionExecuted: [{ type: i0.Output, args: ["actionExecuted"] }], itemUnavailable: [{ type: i0.Output, args: ["itemUnavailable"] }], previewLevelSelected: [{ type: i0.Output, args: ["previewLevelSelected"] }], visibilityChange: [{ type: i0.Output, args: ["visibilityChange"] }] } });
|
|
3025
3189
|
// Only the actions that commit the edited values wait on the form being
|
|
3026
3190
|
// locally valid. A negative outcome — reject, return, terminate — has to stay
|
|
@@ -3194,6 +3358,14 @@ class WorkCenterItemModalRoute {
|
|
|
3194
3358
|
route = inject(ActivatedRoute);
|
|
3195
3359
|
transloco = inject(TranslocoService);
|
|
3196
3360
|
facade = inject(WorkCenterFacade);
|
|
3361
|
+
// `self`: a subclass declared without these providers sends no early load.
|
|
3362
|
+
formPrefetch = inject(WorkCenterFormLoadPrefetch, {
|
|
3363
|
+
self: true,
|
|
3364
|
+
optional: true,
|
|
3365
|
+
});
|
|
3366
|
+
typeRegistry = inject(WORK_CENTER_TYPE_COMPONENTS, {
|
|
3367
|
+
optional: true,
|
|
3368
|
+
});
|
|
3197
3369
|
modal = inject(ModalService);
|
|
3198
3370
|
lookups = this.facade.lookups;
|
|
3199
3371
|
contextKey = input(null, { ...(ngDevMode ? { debugName: "contextKey" } : /* istanbul ignore next */ {}), transform: withDefault$1(null) });
|
|
@@ -3232,11 +3404,15 @@ class WorkCenterItemModalRoute {
|
|
|
3232
3404
|
this.error.set(null);
|
|
3233
3405
|
this.itemUnavailable.set(false);
|
|
3234
3406
|
this.details.set(null);
|
|
3407
|
+
this.formPrefetch?.clear();
|
|
3235
3408
|
if (!contextKey) {
|
|
3236
3409
|
this.loading.set(false);
|
|
3237
3410
|
return;
|
|
3238
3411
|
}
|
|
3239
3412
|
this.loading.set(true);
|
|
3413
|
+
// Rows are read once per item, not tracked: a list refresh must not
|
|
3414
|
+
// reload the open item.
|
|
3415
|
+
untracked(() => this.prefetchForm(contextKey));
|
|
3240
3416
|
const subscription = this.http
|
|
3241
3417
|
.get('workcenter/runtime/item-basic-info', {
|
|
3242
3418
|
params: { contextKey },
|
|
@@ -3253,6 +3429,8 @@ class WorkCenterItemModalRoute {
|
|
|
3253
3429
|
this.loading.set(false);
|
|
3254
3430
|
},
|
|
3255
3431
|
error: (error) => {
|
|
3432
|
+
// No body will mount to take the form; stop it if still running.
|
|
3433
|
+
this.formPrefetch?.clear();
|
|
3256
3434
|
const unavailable = isItemUnavailableError(error);
|
|
3257
3435
|
this.itemUnavailable.set(unavailable);
|
|
3258
3436
|
this.error.set(unavailable
|
|
@@ -3303,6 +3481,33 @@ class WorkCenterItemModalRoute {
|
|
|
3303
3481
|
}
|
|
3304
3482
|
await this.close();
|
|
3305
3483
|
}
|
|
3484
|
+
/**
|
|
3485
|
+
* Starts the body's `process-form-load` from the list row, in parallel with
|
|
3486
|
+
* `item-basic-info`, instead of after it (one network round less, about
|
|
3487
|
+
* 0.3 s on Dev). Skipped when the row is not on the loaded page or a host
|
|
3488
|
+
* renderer may replace the built-in body, and while the list reloads: the
|
|
3489
|
+
* rows on screen then belong to the previous answer (an action that just
|
|
3490
|
+
* moved this item reloads both), so their context may already be stale.
|
|
3491
|
+
*/
|
|
3492
|
+
prefetchForm(contextKey) {
|
|
3493
|
+
if (!this.formPrefetch || this.facade.loading()) {
|
|
3494
|
+
return;
|
|
3495
|
+
}
|
|
3496
|
+
const source = findWorkCenterRowSource(this.facade.rows(), contextKey);
|
|
3497
|
+
if (!source) {
|
|
3498
|
+
return;
|
|
3499
|
+
}
|
|
3500
|
+
const request = buildWorkCenterFormLoadRequest(source.type, source.context);
|
|
3501
|
+
if (!request || this.hasHostRenderer(source.type, request.operationKey)) {
|
|
3502
|
+
return;
|
|
3503
|
+
}
|
|
3504
|
+
this.formPrefetch.prefetch(request);
|
|
3505
|
+
}
|
|
3506
|
+
hasHostRenderer(type, operationKey) {
|
|
3507
|
+
const registry = this.typeRegistry;
|
|
3508
|
+
return (!!registry &&
|
|
3509
|
+
!!(registry[`operationKey:${operationKey}`] ?? registry[type]));
|
|
3510
|
+
}
|
|
3306
3511
|
close() {
|
|
3307
3512
|
if (!this.manageRouteOutlet()) {
|
|
3308
3513
|
this.closed.emit();
|
|
@@ -3358,7 +3563,14 @@ class WorkCenterItemModalRoute {
|
|
|
3358
3563
|
};
|
|
3359
3564
|
}
|
|
3360
3565
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterItemModalRoute, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3361
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterItemModalRoute, isStandalone: true, selector: "mt-work-center-item-modal-route", inputs: { contextKey: { classPropertyName: "contextKey", publicName: "contextKey", isSignal: true, isRequired: false, transformFunction: null }, manageRouteOutlet: { classPropertyName: "manageRouteOutlet", publicName: "manageRouteOutlet", isSignal: true, isRequired: false, transformFunction: null }, showPreviewLevelAction: { classPropertyName: "showPreviewLevelAction", publicName: "showPreviewLevelAction", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, drawerStyleClass: { classPropertyName: "drawerStyleClass", publicName: "drawerStyleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { previewLevel: "previewLevel", closed: "closed" }, providers: [
|
|
3566
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: WorkCenterItemModalRoute, isStandalone: true, selector: "mt-work-center-item-modal-route", inputs: { contextKey: { classPropertyName: "contextKey", publicName: "contextKey", isSignal: true, isRequired: false, transformFunction: null }, manageRouteOutlet: { classPropertyName: "manageRouteOutlet", publicName: "manageRouteOutlet", isSignal: true, isRequired: false, transformFunction: null }, showPreviewLevelAction: { classPropertyName: "showPreviewLevelAction", publicName: "showPreviewLevelAction", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, drawerStyleClass: { classPropertyName: "drawerStyleClass", publicName: "drawerStyleClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { previewLevel: "previewLevel", closed: "closed" }, providers: [
|
|
3567
|
+
RuntimeActionContextStore,
|
|
3568
|
+
WorkCenterActionFormStore,
|
|
3569
|
+
// The drawer body's `mt-client-form` resolves its API here, so the form
|
|
3570
|
+
// load started next to `item-basic-info` is the one it takes.
|
|
3571
|
+
WorkCenterFormLoadPrefetch,
|
|
3572
|
+
{ provide: ClientFormApiService, useExisting: WorkCenterFormLoadPrefetch },
|
|
3573
|
+
], ngImport: i0, template: "<mt-drawer\r\n [visible]=\"drawerVisible()\"\r\n [loadingHeader]=\"loading()\"\r\n [title]=\"drawerTitle()\"\r\n [styleClass]=\"drawerStyleClass()\"\r\n [appendTo]=\"appendTo()\"\r\n position=\"right\"\r\n [modal]=\"true\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <ng-container content>\r\n @if (loading()) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] flex-col gap-5\">\r\n <div class=\"flex items-center gap-3\">\r\n <p-skeleton shape=\"circle\" size=\"3rem\" />\r\n <div class=\"flex flex-1 flex-col gap-2\">\r\n <p-skeleton width=\"12rem\" height=\"1rem\" />\r\n <p-skeleton width=\"8rem\" height=\"0.875rem\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid gap-3 md:grid-cols-2\">\r\n @for (_ of [1, 2, 3, 4]; track $index) {\r\n <p-skeleton height=\"5rem\" class=\"rounded-lg\" />\r\n }\r\n </div>\r\n\r\n <p-skeleton height=\"16rem\" class=\"rounded-lg\" />\r\n </div>\r\n </div>\r\n } @else if (error(); as errorMessage) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"max-w-xl text-sm font-medium text-red-600\">\r\n {{ errorMessage }}\r\n </p>\r\n </div>\r\n </div>\r\n } @else if (details(); as details) {\r\n <div [class]=\"modal.contentClass + ' h-full min-h-0'\">\r\n <mt-work-center-item-modal\r\n [details]=\"details\"\r\n [lookups]=\"lookups()\"\r\n [readOnly]=\"readOnly()\"\r\n />\r\n </div>\r\n } @else {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"text-sm font-medium text-surface-500\">\r\n {{ t(\"modal.noItemSelected\") }}\r\n </p>\r\n </div>\r\n </div>\r\n }\r\n </ng-container>\r\n\r\n @if (!readOnly() && footerActionsMounted() && !itemUnavailable()) {\r\n <div footer [class]=\"modal.footerClass\">\r\n <mt-work-center-item-modal-footer-actions\r\n [contextKey]=\"resolvedContextKey()\"\r\n [previewLevelTarget]=\"displayedPreviewLevelTarget()\"\r\n (actionExecuted)=\"onActionExecuted($event)\"\r\n (itemUnavailable)=\"onItemActionUnavailable()\"\r\n (previewLevelSelected)=\"onPreviewLevelSelected($event)\"\r\n (visibilityChange)=\"onFooterVisibilityChange($event)\"\r\n />\r\n </div>\r\n }\r\n</mt-drawer>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Drawer, selector: "mt-drawer", inputs: ["visible", "position", "fullScreen", "closeOnEscape", "blockScroll", "dismissible", "title", "subtitle", "loadingHeader", "styleClass", "transitionOptions", "appendTo", "modal", "showMaximizeToggle", "maximizeTooltip", "restoreTooltip", "maximized"], outputs: ["visibleChange", "onShow", "onHide", "maximizedChange"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: WorkCenterItemModal, selector: "mt-work-center-item-modal", inputs: ["details", "lookups", "readOnly"] }, { kind: "component", type: WorkCenterItemModalFooterActions, selector: "mt-work-center-item-modal-footer-actions", inputs: ["contextKey", "previewLevelTarget"], outputs: ["actionExecuted", "itemUnavailable", "previewLevelSelected", "visibilityChange"] }] });
|
|
3362
3574
|
}
|
|
3363
3575
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: WorkCenterItemModalRoute, decorators: [{
|
|
3364
3576
|
type: Component,
|
|
@@ -3369,7 +3581,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
3369
3581
|
SkeletonModule,
|
|
3370
3582
|
WorkCenterItemModal,
|
|
3371
3583
|
WorkCenterItemModalFooterActions,
|
|
3372
|
-
], providers: [
|
|
3584
|
+
], providers: [
|
|
3585
|
+
RuntimeActionContextStore,
|
|
3586
|
+
WorkCenterActionFormStore,
|
|
3587
|
+
// The drawer body's `mt-client-form` resolves its API here, so the form
|
|
3588
|
+
// load started next to `item-basic-info` is the one it takes.
|
|
3589
|
+
WorkCenterFormLoadPrefetch,
|
|
3590
|
+
{ provide: ClientFormApiService, useExisting: WorkCenterFormLoadPrefetch },
|
|
3591
|
+
], template: "<mt-drawer\r\n [visible]=\"drawerVisible()\"\r\n [loadingHeader]=\"loading()\"\r\n [title]=\"drawerTitle()\"\r\n [styleClass]=\"drawerStyleClass()\"\r\n [appendTo]=\"appendTo()\"\r\n position=\"right\"\r\n [modal]=\"true\"\r\n (visibleChange)=\"onVisibleChange($event)\"\r\n *transloco=\"let t; prefix: 'workCenter'\"\r\n>\r\n <ng-container content>\r\n @if (loading()) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] flex-col gap-5\">\r\n <div class=\"flex items-center gap-3\">\r\n <p-skeleton shape=\"circle\" size=\"3rem\" />\r\n <div class=\"flex flex-1 flex-col gap-2\">\r\n <p-skeleton width=\"12rem\" height=\"1rem\" />\r\n <p-skeleton width=\"8rem\" height=\"0.875rem\" />\r\n </div>\r\n </div>\r\n\r\n <div class=\"grid gap-3 md:grid-cols-2\">\r\n @for (_ of [1, 2, 3, 4]; track $index) {\r\n <p-skeleton height=\"5rem\" class=\"rounded-lg\" />\r\n }\r\n </div>\r\n\r\n <p-skeleton height=\"16rem\" class=\"rounded-lg\" />\r\n </div>\r\n </div>\r\n } @else if (error(); as errorMessage) {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"max-w-xl text-sm font-medium text-red-600\">\r\n {{ errorMessage }}\r\n </p>\r\n </div>\r\n </div>\r\n } @else if (details(); as details) {\r\n <div [class]=\"modal.contentClass + ' h-full min-h-0'\">\r\n <mt-work-center-item-modal\r\n [details]=\"details\"\r\n [lookups]=\"lookups()\"\r\n [readOnly]=\"readOnly()\"\r\n />\r\n </div>\r\n } @else {\r\n <div class=\"p-4\" [class]=\"modal.contentClass\">\r\n <div class=\"flex min-h-[22rem] items-center justify-center\">\r\n <p class=\"text-sm font-medium text-surface-500\">\r\n {{ t(\"modal.noItemSelected\") }}\r\n </p>\r\n </div>\r\n </div>\r\n }\r\n </ng-container>\r\n\r\n @if (!readOnly() && footerActionsMounted() && !itemUnavailable()) {\r\n <div footer [class]=\"modal.footerClass\">\r\n <mt-work-center-item-modal-footer-actions\r\n [contextKey]=\"resolvedContextKey()\"\r\n [previewLevelTarget]=\"displayedPreviewLevelTarget()\"\r\n (actionExecuted)=\"onActionExecuted($event)\"\r\n (itemUnavailable)=\"onItemActionUnavailable()\"\r\n (previewLevelSelected)=\"onPreviewLevelSelected($event)\"\r\n (visibilityChange)=\"onFooterVisibilityChange($event)\"\r\n />\r\n </div>\r\n }\r\n</mt-drawer>\r\n" }]
|
|
3373
3592
|
}], ctorParameters: () => [], propDecorators: { contextKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextKey", required: false }] }], manageRouteOutlet: [{ type: i0.Input, args: [{ isSignal: true, alias: "manageRouteOutlet", required: false }] }], showPreviewLevelAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPreviewLevelAction", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], drawerStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "drawerStyleClass", required: false }] }], previewLevel: [{ type: i0.Output, args: ["previewLevel"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
3374
3593
|
// Accepts either a plain string (e.g. `moduleKey`) or a localized
|
|
3375
3594
|
// `{ display, en, ar }` translatable, returning the display string.
|
|
@@ -3557,9 +3776,8 @@ class WorkCenterPage {
|
|
|
3557
3776
|
// The badge on the active card should reflect what the user is actually
|
|
3558
3777
|
// looking at: under an active filter the list is narrowed server-side, so
|
|
3559
3778
|
// show that filtered total (`totalCount`) on the selected card instead of
|
|
3560
|
-
// its overall count. While a load is in flight we keep the overall count
|
|
3561
|
-
//
|
|
3562
|
-
// response lands.
|
|
3779
|
+
// its overall count. While a load is in flight we keep the overall count:
|
|
3780
|
+
// `totalCount` still belongs to the previous query until the response lands.
|
|
3563
3781
|
const filterActive = !this.loading() &&
|
|
3564
3782
|
(this.headerFilters().length > 0 || this.columnFilters().length > 0);
|
|
3565
3783
|
const filteredCount = this.totalCount();
|
|
@@ -3656,6 +3874,9 @@ class WorkCenterPage {
|
|
|
3656
3874
|
this.transloco.langChanges$
|
|
3657
3875
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
3658
3876
|
.subscribe((lang) => this.activeLang.set(lang));
|
|
3877
|
+
// Runtime pages refresh on every page visit; within one visit the store
|
|
3878
|
+
// reloads only when the query changes.
|
|
3879
|
+
this.destroyRef.onDestroy(() => this.facade.leavePage(this.area()));
|
|
3659
3880
|
effect(() => {
|
|
3660
3881
|
this.facade.setLookups(this.lookups());
|
|
3661
3882
|
});
|