@masterteam/work-center 0.0.8 → 0.0.10
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.
|
@@ -86,7 +86,7 @@ class WorkCenterClientFormModal {
|
|
|
86
86
|
return undefined;
|
|
87
87
|
}
|
|
88
88
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterClientFormModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
89
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterClientFormModal, isStandalone: true, selector: "mt-work-center-client-form-modal", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, operationKey: { classPropertyName: "operationKey", publicName: "operationKey", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "processForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"modal.contentClass + ' p-5 flex flex-col gap-4'\">\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [operationKey]=\"operationKey()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [formMode]=\"formMode()\"\r\n [autoLoad]=\"true\"\r\n [lookups]=\"lookups()\"\r\n (submitted)=\"onSubmitted($event)\"\r\n (errored)=\"onErrored($event)\"\r\n />\r\n\r\n @if (isSubmitting()) {\r\n <div class=\"text-sm text-muted-color\">Submitting...</div>\r\n }\r\n\r\n @if (validationMessage()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-700\"\r\n role=\"alert\"\r\n >\r\n {{ validationMessage() }}\r\n </div>\r\n }\r\n\r\n @if (submitError()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ submitError() }}\r\n </div>\r\n }\r\n\r\n @if (submitStatus(); as status) {\r\n <div\r\n class=\"mt-2 rounded-lg border p-3 text-sm\"\r\n [class]=\"\r\n status === 'pending'\r\n ? 'border-amber-200 bg-amber-50 text-amber-700'\r\n : 'border-emerald-200 bg-emerald-50 text-emerald-700'\r\n \"\r\n >\r\n @if (status === \"pending\") {\r\n Request submitted for approval.\r\n } @else {\r\n Operation executed successfully.\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div [class]=\"modal.footerClass\">\r\n <mt-button\r\n label=\"Submit\"\r\n icon=\"general.check\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"onSubmit()\"\r\n />\r\n</div>\r\n", dependencies: [{ 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"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "lookups", "ignoredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected"] }] });
|
|
89
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterClientFormModal, isStandalone: true, selector: "mt-work-center-client-form-modal", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, operationKey: { classPropertyName: "operationKey", publicName: "operationKey", isSignal: true, isRequired: false, transformFunction: null }, lookups: { classPropertyName: "lookups", publicName: "lookups", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "processForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"modal.contentClass + ' p-5 flex flex-col gap-4'\">\r\n <mt-client-form\r\n [moduleKey]=\"moduleKey()\"\r\n [moduleId]=\"moduleId()\"\r\n [operationKey]=\"operationKey()\"\r\n [levelId]=\"levelId()\"\r\n [levelDataId]=\"levelDataId()\"\r\n [moduleDataId]=\"moduleDataId()\"\r\n [formMode]=\"formMode()\"\r\n [autoLoad]=\"true\"\r\n [lookups]=\"lookups()\"\r\n (submitted)=\"onSubmitted($event)\"\r\n (errored)=\"onErrored($event)\"\r\n />\r\n\r\n @if (isSubmitting()) {\r\n <div class=\"text-sm text-muted-color\">Submitting...</div>\r\n }\r\n\r\n @if (validationMessage()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-700\"\r\n role=\"alert\"\r\n >\r\n {{ validationMessage() }}\r\n </div>\r\n }\r\n\r\n @if (submitError()) {\r\n <div\r\n class=\"mt-2 rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n {{ submitError() }}\r\n </div>\r\n }\r\n\r\n @if (submitStatus(); as status) {\r\n <div\r\n class=\"mt-2 rounded-lg border p-3 text-sm\"\r\n [class]=\"\r\n status === 'pending'\r\n ? 'border-amber-200 bg-amber-50 text-amber-700'\r\n : 'border-emerald-200 bg-emerald-50 text-emerald-700'\r\n \"\r\n >\r\n @if (status === \"pending\") {\r\n Request submitted for approval.\r\n } @else {\r\n Operation executed successfully.\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<div [class]=\"modal.footerClass\">\r\n <mt-button\r\n label=\"Submit\"\r\n icon=\"general.check\"\r\n [disabled]=\"isSubmitting()\"\r\n (onClick)=\"onSubmit()\"\r\n />\r\n</div>\r\n", dependencies: [{ 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"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "lookups", "ignoredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }] });
|
|
90
90
|
}
|
|
91
91
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterClientFormModal, decorators: [{
|
|
92
92
|
type: Component,
|
|
@@ -118,6 +118,13 @@ class SetParams {
|
|
|
118
118
|
this.inputs = inputs;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
+
class SetLookups {
|
|
122
|
+
lookups;
|
|
123
|
+
static type = '[WorkCenter] Set Lookups';
|
|
124
|
+
constructor(lookups) {
|
|
125
|
+
this.lookups = lookups;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
121
128
|
class LoadRuntime {
|
|
122
129
|
area;
|
|
123
130
|
reason;
|
|
@@ -355,6 +362,7 @@ const WORK_CENTER_DEFAULT_STATE = {
|
|
|
355
362
|
MyInbox: createDefaultAreaState('MyInbox'),
|
|
356
363
|
TasksCenter: createDefaultAreaState('TasksCenter'),
|
|
357
364
|
},
|
|
365
|
+
lookups: [],
|
|
358
366
|
loadingActive: [],
|
|
359
367
|
errors: {},
|
|
360
368
|
};
|
|
@@ -478,6 +486,9 @@ let WorkCenterState = class WorkCenterState {
|
|
|
478
486
|
static warnings(snapshot) {
|
|
479
487
|
return snapshot.warnings;
|
|
480
488
|
}
|
|
489
|
+
static lookups(state) {
|
|
490
|
+
return state.lookups;
|
|
491
|
+
}
|
|
481
492
|
static getLoadingActive(state) {
|
|
482
493
|
return state.loadingActive;
|
|
483
494
|
}
|
|
@@ -532,6 +543,14 @@ let WorkCenterState = class WorkCenterState {
|
|
|
532
543
|
return;
|
|
533
544
|
return ctx.dispatch(new LoadRuntime(action.area, 'route-enter'));
|
|
534
545
|
}
|
|
546
|
+
setLookups(ctx, action) {
|
|
547
|
+
if (ctx.getState().lookups === action.lookups) {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
ctx.patchState({
|
|
551
|
+
lookups: Array.isArray(action.lookups) ? action.lookups : [],
|
|
552
|
+
});
|
|
553
|
+
}
|
|
535
554
|
loadRuntime(ctx, action) {
|
|
536
555
|
const state = ctx.getState();
|
|
537
556
|
const areaState = state.byArea[action.area];
|
|
@@ -590,6 +609,9 @@ __decorate([
|
|
|
590
609
|
__decorate([
|
|
591
610
|
Action(SetParams)
|
|
592
611
|
], WorkCenterState.prototype, "setParams", null);
|
|
612
|
+
__decorate([
|
|
613
|
+
Action(SetLookups)
|
|
614
|
+
], WorkCenterState.prototype, "setLookups", null);
|
|
593
615
|
__decorate([
|
|
594
616
|
Action(LoadRuntime)
|
|
595
617
|
], WorkCenterState.prototype, "loadRuntime", null);
|
|
@@ -626,6 +648,9 @@ __decorate([
|
|
|
626
648
|
__decorate([
|
|
627
649
|
Selector([WorkCenterState.activeSnapshot])
|
|
628
650
|
], WorkCenterState, "warnings", null);
|
|
651
|
+
__decorate([
|
|
652
|
+
Selector()
|
|
653
|
+
], WorkCenterState, "lookups", null);
|
|
629
654
|
__decorate([
|
|
630
655
|
Selector()
|
|
631
656
|
], WorkCenterState, "getLoadingActive", null);
|
|
@@ -640,7 +665,7 @@ WorkCenterState = __decorate([
|
|
|
640
665
|
], WorkCenterState);
|
|
641
666
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterState, decorators: [{
|
|
642
667
|
type: Injectable
|
|
643
|
-
}], propDecorators: { enterArea: [], hydrateFromContext: [], setParams: [], loadRuntime: [] } });
|
|
668
|
+
}], propDecorators: { enterArea: [], hydrateFromContext: [], setParams: [], setLookups: [], loadRuntime: [] } });
|
|
644
669
|
|
|
645
670
|
class WorkCenterFacade {
|
|
646
671
|
store = inject(Store);
|
|
@@ -650,6 +675,7 @@ class WorkCenterFacade {
|
|
|
650
675
|
rows = select(WorkCenterState.rows);
|
|
651
676
|
columns = select(WorkCenterState.columns);
|
|
652
677
|
kpis = select(WorkCenterState.kpis);
|
|
678
|
+
lookups = select(WorkCenterState.lookups);
|
|
653
679
|
runtimeFilterSchema = select(WorkCenterState.runtimeFilterSchema);
|
|
654
680
|
totalCount = select(WorkCenterState.totalCount);
|
|
655
681
|
warnings = select(WorkCenterState.warnings);
|
|
@@ -666,6 +692,9 @@ class WorkCenterFacade {
|
|
|
666
692
|
setParams(area, inputs) {
|
|
667
693
|
return this.store.dispatch(new SetParams(area, inputs));
|
|
668
694
|
}
|
|
695
|
+
setLookups(lookups) {
|
|
696
|
+
return this.store.dispatch(new SetLookups(lookups));
|
|
697
|
+
}
|
|
669
698
|
selectCardAndLoad(area, selectedCardKey) {
|
|
670
699
|
return this.store.dispatch([
|
|
671
700
|
new HydrateFromContext(area, { selectedCardKey, page: 1 }),
|
|
@@ -769,7 +798,11 @@ const OPERATOR_VALUE_MODE = {
|
|
|
769
798
|
IsNull: 'none',
|
|
770
799
|
IsNotNull: 'none',
|
|
771
800
|
};
|
|
772
|
-
const GENERAL_TASK_CARD_KEYS = new Set([
|
|
801
|
+
const GENERAL_TASK_CARD_KEYS = new Set([
|
|
802
|
+
'mygeneraltasks',
|
|
803
|
+
'generaltask',
|
|
804
|
+
'generaltasks',
|
|
805
|
+
]);
|
|
773
806
|
function toLabel(value) {
|
|
774
807
|
const normalized = value.split('.').pop() ?? value;
|
|
775
808
|
return normalized
|
|
@@ -895,6 +928,11 @@ class WorkCenterPage {
|
|
|
895
928
|
generalTaskButtonIcon = computed(() => this.generalTaskModal()?.buttonIcon?.trim() || 'general.plus', ...(ngDevMode ? [{ debugName: "generalTaskButtonIcon" }] : []));
|
|
896
929
|
defaultModalStyleClass = '!w-[96vw] xl:!w-[calc(100%-8rem)] 2xl:!w-[calc(100%-12rem)] !shadow-none';
|
|
897
930
|
defaultGeneralTaskModalStyleClass = '!w-[70vw] !h-[90vh]';
|
|
931
|
+
constructor() {
|
|
932
|
+
effect(() => {
|
|
933
|
+
this.facade.setLookups(this.lookups());
|
|
934
|
+
});
|
|
935
|
+
}
|
|
898
936
|
onMenuItemClick(item) {
|
|
899
937
|
if (item.key === this.context().selectedCardKey) {
|
|
900
938
|
return;
|
|
@@ -999,7 +1037,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
999
1037
|
Table,
|
|
1000
1038
|
SkeletonModule,
|
|
1001
1039
|
], template: "<mt-client-page\r\n [menuIcon]=\"menuIcon()\"\r\n [menuTitle]=\"pageTitle()\"\r\n [menuItems]=\"menuItems()\"\r\n [menuItemsLoading]=\"loading() && !menuItems().length\"\r\n [activeItem]=\"context().selectedCardKey ?? undefined\"\r\n (menuItemClick)=\"onMenuItemClick($event)\"\r\n>\r\n <ng-template #headerClientPageEnd>\r\n <div class=\"flex flex-wrap items-center justify-end gap-2\">\r\n <mt-property-filter-builder\r\n [schema]=\"propertyFilterSchema()\"\r\n [filters]=\"context().runtimeFilters\"\r\n (applied)=\"onRuntimeFiltersApplied($event)\"\r\n (cleared)=\"onRuntimeFiltersCleared()\"\r\n />\r\n\r\n @if (showGeneralTaskCreateButton()) {\r\n <mt-button\r\n [label]=\"generalTaskButtonLabel()\"\r\n [icon]=\"generalTaskButtonIcon()\"\r\n size=\"small\"\r\n (onClick)=\"onGeneralTaskCreateClick()\"\r\n />\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"flex flex-col gap-4\">\r\n @if (loading()) {\r\n <div\r\n class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 gap-3\"\r\n >\r\n @for (_ of [1, 2, 3, 4, 5]; track $index) {\r\n <p-skeleton height=\"6.5rem\" borderRadius=\"1rem\" />\r\n }\r\n </div>\r\n } @else if (kpis().length) {\r\n <div\r\n class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 gap-3\"\r\n >\r\n @for (kpi of kpis(); track $index) {\r\n <mt-statistic-card [data]=\"kpi\" />\r\n }\r\n </div>\r\n }\r\n\r\n <mt-table\r\n [data]=\"rows()\"\r\n [columns]=\"columns()\"\r\n [lazy]=\"true\"\r\n [clickableRows]=\"rowsClickable()\"\r\n [loading]=\"loading()\"\r\n [lazyTotalRecords]=\"totalCount()\"\r\n [showFilters]=\"false\"\r\n [generalSearch]=\"false\"\r\n [pageSize]=\"context().pageSize\"\r\n [currentPage]=\"tableCurrentPage()\"\r\n [first]=\"tableFirst()\"\r\n (lazyLoad)=\"onLazyLoad($event)\"\r\n (rowClick)=\"onRowClick($event)\"\r\n />\r\n </div>\r\n</mt-client-page>\r\n" }]
|
|
1002
|
-
}], propDecorators: { area: [{ type: i0.Input, args: [{ isSignal: true, alias: "area", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], menuIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuIcon", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], openItemsInModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "openItemsInModal", required: false }] }], itemModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemModal", required: false }] }], generalTaskModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "generalTaskModal", required: false }] }], runtimeFiltersChanged: [{ type: i0.Output, args: ["runtimeFiltersChanged"] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }] } });
|
|
1040
|
+
}], ctorParameters: () => [], propDecorators: { area: [{ type: i0.Input, args: [{ isSignal: true, alias: "area", required: false }] }], pageTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageTitle", required: false }] }], menuIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuIcon", required: false }] }], lookups: [{ type: i0.Input, args: [{ isSignal: true, alias: "lookups", required: false }] }], openItemsInModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "openItemsInModal", required: false }] }], itemModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemModal", required: false }] }], generalTaskModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "generalTaskModal", required: false }] }], runtimeFiltersChanged: [{ type: i0.Output, args: ["runtimeFiltersChanged"] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }] } });
|
|
1003
1041
|
|
|
1004
1042
|
function readItemContext(details) {
|
|
1005
1043
|
const item = details.item;
|
|
@@ -1421,11 +1459,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1421
1459
|
}] });
|
|
1422
1460
|
|
|
1423
1461
|
class WorkCenterProcessStepType {
|
|
1462
|
+
facade = inject(WorkCenterFacade);
|
|
1424
1463
|
actionContext = inject(WorkCenterItemActionContextStore, {
|
|
1425
1464
|
optional: true,
|
|
1426
1465
|
});
|
|
1427
1466
|
details = input.required(...(ngDevMode ? [{ debugName: "details" }] : []));
|
|
1428
1467
|
clientForm = viewChild(ClientForm, ...(ngDevMode ? [{ debugName: "clientForm" }] : []));
|
|
1468
|
+
lookups = this.facade.lookups;
|
|
1429
1469
|
activeTab = signal('form', ...(ngDevMode ? [{ debugName: "activeTab" }] : []));
|
|
1430
1470
|
tabOptions = [
|
|
1431
1471
|
{
|
|
@@ -1470,7 +1510,7 @@ class WorkCenterProcessStepType {
|
|
|
1470
1510
|
this.actionContext?.setClientForm(null);
|
|
1471
1511
|
}
|
|
1472
1512
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterProcessStepType, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1473
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterProcessStepType, isStandalone: true, selector: "mt-work-center-process-step-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"mt-modal-content flex h-full flex-col gap-4 p-4\">\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n\r\n <div class=\"flex-1 p-4\" [hidden]=\"activeTab() !== 'form'\">\r\n <div class=\"flex-1\">\r\n @if (canRenderForm()) {\r\n <mt-client-form\
|
|
1513
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: WorkCenterProcessStepType, isStandalone: true, selector: "mt-work-center-process-step-type", inputs: { details: { classPropertyName: "details", publicName: "details", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "clientForm", first: true, predicate: ClientForm, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"mt-modal-content flex h-full flex-col gap-4 p-4\">\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n\r\n <div class=\"flex-1 p-4\" [hidden]=\"activeTab() !== 'form'\">\r\n <div class=\"flex-1\">\r\n @if (canRenderForm()) {\r\n <mt-client-form\n [moduleKey]=\"moduleKey()\"\n [operationKey]=\"operationKey()\"\n [moduleId]=\"moduleId()\"\n [levelId]=\"levelId()\"\n [levelDataId]=\"levelDataId()\"\n [moduleDataId]=\"moduleDataId()\"\n [requestSchemaId]=\"requestSchemaId()\"\n [draftProcessId]=\"draftProcessId()\"\n [lookups]=\"lookups()\"\n />\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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 Process form context is not available for this item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex-1\" [hidden]=\"activeTab() !== 'approvals'\">\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-2xl 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 Process preview is not available for this process item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"flex-1\" [hidden]=\"activeTab() !== 'schema'\">\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-2xl 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 Process preview is not available for this process item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"flex-1\" [hidden]=\"activeTab() !== 'discussion'\">\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[70vh] min-h-[32rem]\">\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-2xl 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 Discussion context is not available for this process item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ClientForm, selector: "mt-client-form", inputs: ["moduleKey", "operationKey", "moduleId", "levelId", "levelDataId", "moduleDataId", "requestSchemaId", "draftProcessId", "preview", "returnUrl", "submitRequestMapper", "readonly", "autoLoad", "formMode", "renderMode", "showInternalStepActions", "lookups", "ignoredFieldKeys"], outputs: ["loaded", "submitted", "errored", "modeDetected", "formSourceDetected", "footerStateChanged"] }, { kind: "component", type: DiscussionThread, selector: "mt-discussion-thread", inputs: ["moduleType", "recordId", "title", "subtitle", "placeholder", "pageSize", "currentUserId", "requestContext", "mentionableUsers", "mentionSearchEndpoint", "mentionSearchParam", "mentionSearchDataPath", "allowAttachments", "uploadEndpoint", "attachmentDownloadEndpoint", "showParticipants", "autoMarkRead", "refreshIntervalMs", "styleClass", "disabled"], outputs: ["loaded", "errored", "commentCreated", "commentUpdated", "commentDeleted", "readStateChanged"] }, { kind: "component", type: WorkCenterProcessPreview, selector: "mt-work-center-process-preview", inputs: ["requestId", "view"] }] });
|
|
1474
1514
|
}
|
|
1475
1515
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: WorkCenterProcessStepType, decorators: [{
|
|
1476
1516
|
type: Component,
|
|
@@ -1480,7 +1520,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1480
1520
|
ClientForm,
|
|
1481
1521
|
DiscussionThread,
|
|
1482
1522
|
WorkCenterProcessPreview,
|
|
1483
|
-
], template: "<div class=\"mt-modal-content flex h-full flex-col gap-4 p-4\">\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n\r\n <div class=\"flex-1 p-4\" [hidden]=\"activeTab() !== 'form'\">\r\n <div class=\"flex-1\">\r\n @if (canRenderForm()) {\r\n <mt-client-form\
|
|
1523
|
+
], template: "<div class=\"mt-modal-content flex h-full flex-col gap-4 p-4\">\r\n <mt-tabs [(active)]=\"activeTab\" [options]=\"tabOptions\" />\r\n\r\n <div class=\"flex-1 p-4\" [hidden]=\"activeTab() !== 'form'\">\r\n <div class=\"flex-1\">\r\n @if (canRenderForm()) {\r\n <mt-client-form\n [moduleKey]=\"moduleKey()\"\n [operationKey]=\"operationKey()\"\n [moduleId]=\"moduleId()\"\n [levelId]=\"levelId()\"\n [levelDataId]=\"levelDataId()\"\n [moduleDataId]=\"moduleDataId()\"\n [requestSchemaId]=\"requestSchemaId()\"\n [draftProcessId]=\"draftProcessId()\"\n [lookups]=\"lookups()\"\n />\n } @else {\r\n <div\r\n class=\"flex min-h-[22rem] items-center justify-center rounded-2xl 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 Process form context is not available for this item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"flex-1\" [hidden]=\"activeTab() !== 'approvals'\">\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-2xl 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 Process preview is not available for this process item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"flex-1\" [hidden]=\"activeTab() !== 'schema'\">\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-2xl 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 Process preview is not available for this process item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"flex-1\" [hidden]=\"activeTab() !== 'discussion'\">\r\n @if (canRenderDiscussion()) {\r\n <div class=\"h-[70vh] min-h-[32rem]\">\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-2xl 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 Discussion context is not available for this process item yet.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
1484
1524
|
}], ctorParameters: () => [], propDecorators: { details: [{ type: i0.Input, args: [{ isSignal: true, alias: "details", required: true }] }], clientForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => ClientForm), { isSignal: true }] }] } });
|
|
1485
1525
|
|
|
1486
1526
|
class WorkCenterItemModal {
|
|
@@ -2045,5 +2085,5 @@ const APP_STATES = [WorkCenterState];
|
|
|
2045
2085
|
* Generated bundle index. Do not edit.
|
|
2046
2086
|
*/
|
|
2047
2087
|
|
|
2048
|
-
export { APP_STATES, EnterArea, HydrateFromContext, LoadRuntime, SetParams, WORK_CENTER_MAX_FILTERS, WORK_CENTER_MAX_PAGE_SIZE, WORK_CENTER_MAX_SORT, WORK_CENTER_QUERY_VERSION, WorkCenterActionKey, WorkCenterClientFormModal, WorkCenterFacade, WorkCenterItemModal, WorkCenterItemModalRoute, WorkCenterPage, WorkCenterState };
|
|
2088
|
+
export { APP_STATES, EnterArea, HydrateFromContext, LoadRuntime, SetLookups, SetParams, WORK_CENTER_MAX_FILTERS, WORK_CENTER_MAX_PAGE_SIZE, WORK_CENTER_MAX_SORT, WORK_CENTER_QUERY_VERSION, WorkCenterActionKey, WorkCenterClientFormModal, WorkCenterFacade, WorkCenterItemModal, WorkCenterItemModalRoute, WorkCenterPage, WorkCenterState };
|
|
2049
2089
|
//# sourceMappingURL=masterteam-work-center.mjs.map
|