@masterteam/escalation 0.0.11 → 0.0.13
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/README.md +15 -15
- package/assets/escalation.css +1 -1
- package/assets/i18n/ar.json +18 -18
- package/assets/i18n/en.json +18 -18
- package/fesm2022/masterteam-escalation.mjs +13 -12
- package/fesm2022/masterteam-escalation.mjs.map +1 -1
- package/package.json +4 -4
- package/types/masterteam-escalation.d.ts +104 -102
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# @masterteam/escalation
|
|
2
|
-
|
|
3
|
-
Escalation builder component library for managing escalation flows.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pnpm add @masterteam/escalation
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
import { EscalationBuilder } from '@masterteam/escalation';
|
|
15
|
-
```
|
|
1
|
+
# @masterteam/escalation
|
|
2
|
+
|
|
3
|
+
Escalation builder component library for managing escalation flows.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @masterteam/escalation
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { EscalationBuilder } from '@masterteam/escalation';
|
|
15
|
+
```
|
package/assets/escalation.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-900:oklch(20.8% .042 265.755);--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-semibold:600;--radius-xl:.75rem;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\!absolute{position:absolute!important}.relative{position:relative}.static{position:static}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.flex{display:flex}.h-full{height:100%}.\!w-\[25rem\]{width:25rem!important}.w-full{width:100%}.flex-1{flex:1}.items-center{align-items:center}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-slate-200{border-color:var(--color-slate-200)}.bg-slate-50{background-color:var(--color-slate-50)}.p-4{padding:calc(var(--spacing)*4)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-3{padding-top:calc(var(--spacing)*3)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-slate-700{color:var(--color-slate-700)}.text-slate-900{color:var(--color-slate-900)}.\!shadow-none{--tw-shadow:0 0 #0000!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
package/assets/i18n/ar.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"escalation": {
|
|
3
|
-
"builder": {
|
|
4
|
-
"addStep": "إضافة خطوة",
|
|
5
|
-
"editStep": "تعديل الخطوة",
|
|
6
|
-
"newStep": "خطوة جديدة",
|
|
7
|
-
"nameEnglish": "الاسم (بالإنجليزية)",
|
|
8
|
-
"enterNameEnglish": "أدخل الاسم بالإنجليزية",
|
|
9
|
-
"nameArabic": "الاسم (بالعربية)",
|
|
10
|
-
"enterNameArabic": "أدخل الاسم بالعربية",
|
|
11
|
-
"approver": "المعتمد",
|
|
12
|
-
"group": "المجموعة",
|
|
13
|
-
"role": "الدور",
|
|
14
|
-
"selectGroup": "اختر المجموعة",
|
|
15
|
-
"selectRole": "اختر الدور"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"escalation": {
|
|
3
|
+
"builder": {
|
|
4
|
+
"addStep": "إضافة خطوة",
|
|
5
|
+
"editStep": "تعديل الخطوة",
|
|
6
|
+
"newStep": "خطوة جديدة",
|
|
7
|
+
"nameEnglish": "الاسم (بالإنجليزية)",
|
|
8
|
+
"enterNameEnglish": "أدخل الاسم بالإنجليزية",
|
|
9
|
+
"nameArabic": "الاسم (بالعربية)",
|
|
10
|
+
"enterNameArabic": "أدخل الاسم بالعربية",
|
|
11
|
+
"approver": "المعتمد",
|
|
12
|
+
"group": "المجموعة",
|
|
13
|
+
"role": "الدور",
|
|
14
|
+
"selectGroup": "اختر المجموعة",
|
|
15
|
+
"selectRole": "اختر الدور"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
package/assets/i18n/en.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"escalation": {
|
|
3
|
-
"builder": {
|
|
4
|
-
"addStep": "Add Step",
|
|
5
|
-
"editStep": "Edit Step",
|
|
6
|
-
"newStep": "New Step",
|
|
7
|
-
"nameEnglish": "Name (English)",
|
|
8
|
-
"enterNameEnglish": "Enter name in English",
|
|
9
|
-
"nameArabic": "Name (Arabic)",
|
|
10
|
-
"enterNameArabic": "Enter name in Arabic",
|
|
11
|
-
"approver": "Approver",
|
|
12
|
-
"group": "Group",
|
|
13
|
-
"role": "Role",
|
|
14
|
-
"selectGroup": "Select Group",
|
|
15
|
-
"selectRole": "Select Role"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"escalation": {
|
|
3
|
+
"builder": {
|
|
4
|
+
"addStep": "Add Step",
|
|
5
|
+
"editStep": "Edit Step",
|
|
6
|
+
"newStep": "New Step",
|
|
7
|
+
"nameEnglish": "Name (English)",
|
|
8
|
+
"enterNameEnglish": "Enter name in English",
|
|
9
|
+
"nameArabic": "Name (Arabic)",
|
|
10
|
+
"enterNameArabic": "Enter name in Arabic",
|
|
11
|
+
"approver": "Approver",
|
|
12
|
+
"group": "Group",
|
|
13
|
+
"role": "Role",
|
|
14
|
+
"selectGroup": "Select Group",
|
|
15
|
+
"selectRole": "Select Role"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -331,8 +331,8 @@ let EscalationState = class EscalationState {
|
|
|
331
331
|
}
|
|
332
332
|
createStep(ctx, action) {
|
|
333
333
|
const state = ctx.getState();
|
|
334
|
-
const
|
|
335
|
-
if (!
|
|
334
|
+
const escalationId = state.escalation?.id;
|
|
335
|
+
if (!escalationId) {
|
|
336
336
|
const message = 'Escalation ID is not set';
|
|
337
337
|
setLoadingError(ctx, 'createStep', message);
|
|
338
338
|
return of(null);
|
|
@@ -353,7 +353,7 @@ let EscalationState = class EscalationState {
|
|
|
353
353
|
}
|
|
354
354
|
startLoading(ctx, 'createStep');
|
|
355
355
|
return this.http
|
|
356
|
-
.post(`${this.baseUrl}
|
|
356
|
+
.post(`${this.baseUrl}/${escalationId}/steps`, action.payload)
|
|
357
357
|
.pipe(tap((response) => {
|
|
358
358
|
const createdStep = response?.data;
|
|
359
359
|
const currentState = ctx.getState();
|
|
@@ -433,8 +433,8 @@ let EscalationState = class EscalationState {
|
|
|
433
433
|
}
|
|
434
434
|
createConnection(ctx, action) {
|
|
435
435
|
const state = ctx.getState();
|
|
436
|
-
const
|
|
437
|
-
if (!
|
|
436
|
+
const escalationId = state.escalation?.id;
|
|
437
|
+
if (!escalationId) {
|
|
438
438
|
const message = 'Escalation ID is not set';
|
|
439
439
|
setLoadingError(ctx, 'createConnection', message);
|
|
440
440
|
return of(null);
|
|
@@ -457,7 +457,7 @@ let EscalationState = class EscalationState {
|
|
|
457
457
|
}
|
|
458
458
|
startLoading(ctx, 'createConnection');
|
|
459
459
|
return this.http
|
|
460
|
-
.post(`${this.baseUrl}
|
|
460
|
+
.post(`${this.baseUrl}/${escalationId}/connections`, action.payload)
|
|
461
461
|
.pipe(tap((response) => {
|
|
462
462
|
const createdConnection = response?.data;
|
|
463
463
|
const currentState = ctx.getState();
|
|
@@ -546,15 +546,15 @@ let EscalationState = class EscalationState {
|
|
|
546
546
|
publishEscalation(ctx, action) {
|
|
547
547
|
startLoading(ctx, 'publishEscalation');
|
|
548
548
|
const state = ctx.getState();
|
|
549
|
-
const
|
|
550
|
-
if (!
|
|
549
|
+
const escalationId = state.escalation?.id;
|
|
550
|
+
if (!escalationId) {
|
|
551
551
|
const message = 'Escalation ID is not set';
|
|
552
552
|
setLoadingError(ctx, 'publishEscalation', message);
|
|
553
553
|
endLoading(ctx, 'publishEscalation');
|
|
554
554
|
return of(null);
|
|
555
555
|
}
|
|
556
556
|
return this.http
|
|
557
|
-
.put(`${this.baseUrl}
|
|
557
|
+
.put(`${this.baseUrl}/${escalationId}/publish`, { IsPublished: action.isPublished })
|
|
558
558
|
.pipe(tap((response) => {
|
|
559
559
|
const publishedData = response?.data;
|
|
560
560
|
if (publishedData && state.escalation) {
|
|
@@ -875,7 +875,7 @@ class EscalationBuilder {
|
|
|
875
875
|
};
|
|
876
876
|
// Approver section with dynamic options
|
|
877
877
|
approverSection = computed(() => ({
|
|
878
|
-
key: '
|
|
878
|
+
key: 'approver',
|
|
879
879
|
type: 'header',
|
|
880
880
|
label: this.transloco.translate('escalation.builder.approver'),
|
|
881
881
|
headerClass: 'rounded-t-xl bg-slate-50 px-4 py-3 text-sm font-semibold text-slate-900 border border-slate-200 border-b-0',
|
|
@@ -1007,6 +1007,7 @@ class EscalationBuilder {
|
|
|
1007
1007
|
size: 'small',
|
|
1008
1008
|
severity: 'danger',
|
|
1009
1009
|
tooltip: 'Delete',
|
|
1010
|
+
condition: (node) => !node.isInitial,
|
|
1010
1011
|
},
|
|
1011
1012
|
], ...(ngDevMode ? [{ debugName: "nodeActions" }] : []));
|
|
1012
1013
|
constructor() {
|
|
@@ -1186,7 +1187,7 @@ class EscalationBuilder {
|
|
|
1186
1187
|
}
|
|
1187
1188
|
}
|
|
1188
1189
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EscalationBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1189
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: EscalationBuilder, isStandalone: true, selector: "mt-escalation-builder", ngImport: i0, template: "<div class=\"h-full relative\" id=\"escalationCard\">\n @if (!loading()) {\n <mt-structure-builder\n class=\"flex-1\"\n [availableNodes]=\"availableNodes\"\n [connectionForm]=\"connectionForm()\"\n [nodeActions]=\"nodeActions()\"\n (nodeActionsEvent)=\"onNodeActionsEvent($event)\"\n [nodes]=\"steps()\"\n [connections]=\"connections()\"\n (action)=\"onStructureAction($event)\"\n [addModalType]=\"'drawer'\"\n [addModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\n [updateModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\n [addModalHeader]=\"'escalation.builder.addStep' | transloco\"\n [updateModalHeader]=\"'escalation.builder.editStep' | transloco\"\n [appendTo]=\"'escalationCard'\"\n [nodeFields]=\"nodeFields()\"\n >\n <ng-template\n #nodeDialog\n let-close=\"close\"\n let-save=\"save\"\n let-node=\"node\"\n >\n <div class=\"p-4\">\n @if (loadingStep()) {\n <!-- Loading skeleton -->\n <div class=\"space-y-4\">\n <!-- Form fields skeleton -->\n <div class=\"space-y-4\">\n <div>\n <p-skeleton\n width=\"8rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"8rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"10rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"3rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"6rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"4rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n </div>\n </div>\n } @else {\n <!-- Actual content - just the form, no tabs -->\n <mt-dynamic-form\n [formConfig]=\"nodeForm()\"\n [formControl]=\"nodeFormControl\"\n ></mt-dynamic-form>\n }\n </div>\n </ng-template>\n </mt-structure-builder>\n }\n</div>\n", dependencies: [{ kind: "component", type: StructureBuilder, selector: "mt-structure-builder", inputs: ["availableNodes", "nodeForm", "connectionForm", "nodeActions", "nodeFields", "isAutoLayout", "addModalType", "updateModalType", "addModalStyleClass", "updateModalStyleClass", "addModalHeader", "updateModalHeader", "appendTo", "nodes", "connections"], outputs: ["nodeActionsEvent", "action", "nodesChange", "connectionsChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i2.TranslocoPipe, name: "transloco" }] });
|
|
1190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: EscalationBuilder, isStandalone: true, selector: "mt-escalation-builder", ngImport: i0, template: "<div class=\"h-full relative\" id=\"escalationCard\">\r\n @if (!loading()) {\r\n <mt-structure-builder\r\n class=\"flex-1\"\r\n [availableNodes]=\"availableNodes\"\r\n [connectionForm]=\"connectionForm()\"\r\n [nodeActions]=\"nodeActions()\"\r\n (nodeActionsEvent)=\"onNodeActionsEvent($event)\"\r\n [nodes]=\"steps()\"\r\n [connections]=\"connections()\"\r\n (action)=\"onStructureAction($event)\"\r\n [addModalType]=\"'drawer'\"\r\n [addModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\r\n [updateModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\r\n [addModalHeader]=\"'escalation.builder.addStep' | transloco\"\r\n [updateModalHeader]=\"'escalation.builder.editStep' | transloco\"\r\n [appendTo]=\"'escalationCard'\"\r\n [nodeFields]=\"nodeFields()\"\r\n >\r\n <ng-template\r\n #nodeDialog\r\n let-close=\"close\"\r\n let-save=\"save\"\r\n let-node=\"node\"\r\n >\r\n <div class=\"p-4\">\r\n @if (loadingStep()) {\r\n <!-- Loading skeleton -->\r\n <div class=\"space-y-4\">\r\n <!-- Form fields skeleton -->\r\n <div class=\"space-y-4\">\r\n <div>\r\n <p-skeleton\r\n width=\"8rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"8rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"10rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"3rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"6rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"4rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Actual content - just the form, no tabs -->\r\n <mt-dynamic-form\r\n [formConfig]=\"nodeForm()\"\r\n [formControl]=\"nodeFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n </div>\r\n </ng-template>\r\n </mt-structure-builder>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "component", type: StructureBuilder, selector: "mt-structure-builder", inputs: ["availableNodes", "nodeForm", "connectionForm", "nodeActions", "nodeFields", "isAutoLayout", "addModalType", "updateModalType", "addModalStyleClass", "updateModalStyleClass", "addModalHeader", "updateModalHeader", "appendTo", "nodes", "connections"], outputs: ["nodeActionsEvent", "action", "nodesChange", "connectionsChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i2.TranslocoPipe, name: "transloco" }] });
|
|
1190
1191
|
}
|
|
1191
1192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: EscalationBuilder, decorators: [{
|
|
1192
1193
|
type: Component,
|
|
@@ -1196,7 +1197,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1196
1197
|
DynamicForm,
|
|
1197
1198
|
Skeleton,
|
|
1198
1199
|
TranslocoModule,
|
|
1199
|
-
], host: {}, template: "<div class=\"h-full relative\" id=\"escalationCard\">\n @if (!loading()) {\n <mt-structure-builder\n class=\"flex-1\"\n [availableNodes]=\"availableNodes\"\n [connectionForm]=\"connectionForm()\"\n [nodeActions]=\"nodeActions()\"\n (nodeActionsEvent)=\"onNodeActionsEvent($event)\"\n [nodes]=\"steps()\"\n [connections]=\"connections()\"\n (action)=\"onStructureAction($event)\"\n [addModalType]=\"'drawer'\"\n [addModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\n [updateModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\n [addModalHeader]=\"'escalation.builder.addStep' | transloco\"\n [updateModalHeader]=\"'escalation.builder.editStep' | transloco\"\n [appendTo]=\"'escalationCard'\"\n [nodeFields]=\"nodeFields()\"\n >\n <ng-template\n #nodeDialog\n let-close=\"close\"\n let-save=\"save\"\n let-node=\"node\"\n >\n <div class=\"p-4\">\n @if (loadingStep()) {\n <!-- Loading skeleton -->\n <div class=\"space-y-4\">\n <!-- Form fields skeleton -->\n <div class=\"space-y-4\">\n <div>\n <p-skeleton\n width=\"8rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"8rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"10rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"3rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"6rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"4rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n </div>\n </div>\n } @else {\n <!-- Actual content - just the form, no tabs -->\n <mt-dynamic-form\n [formConfig]=\"nodeForm()\"\n [formControl]=\"nodeFormControl\"\n ></mt-dynamic-form>\n }\n </div>\n </ng-template>\n </mt-structure-builder>\n }\n</div>\n" }]
|
|
1200
|
+
], host: {}, template: "<div class=\"h-full relative\" id=\"escalationCard\">\r\n @if (!loading()) {\r\n <mt-structure-builder\r\n class=\"flex-1\"\r\n [availableNodes]=\"availableNodes\"\r\n [connectionForm]=\"connectionForm()\"\r\n [nodeActions]=\"nodeActions()\"\r\n (nodeActionsEvent)=\"onNodeActionsEvent($event)\"\r\n [nodes]=\"steps()\"\r\n [connections]=\"connections()\"\r\n (action)=\"onStructureAction($event)\"\r\n [addModalType]=\"'drawer'\"\r\n [addModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\r\n [updateModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\r\n [addModalHeader]=\"'escalation.builder.addStep' | transloco\"\r\n [updateModalHeader]=\"'escalation.builder.editStep' | transloco\"\r\n [appendTo]=\"'escalationCard'\"\r\n [nodeFields]=\"nodeFields()\"\r\n >\r\n <ng-template\r\n #nodeDialog\r\n let-close=\"close\"\r\n let-save=\"save\"\r\n let-node=\"node\"\r\n >\r\n <div class=\"p-4\">\r\n @if (loadingStep()) {\r\n <!-- Loading skeleton -->\r\n <div class=\"space-y-4\">\r\n <!-- Form fields skeleton -->\r\n <div class=\"space-y-4\">\r\n <div>\r\n <p-skeleton\r\n width=\"8rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"8rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"10rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"3rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"6rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"4rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Actual content - just the form, no tabs -->\r\n <mt-dynamic-form\r\n [formConfig]=\"nodeForm()\"\r\n [formControl]=\"nodeFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n </div>\r\n </ng-template>\r\n </mt-structure-builder>\r\n }\r\n</div>\r\n" }]
|
|
1200
1201
|
}], ctorParameters: () => [] });
|
|
1201
1202
|
|
|
1202
1203
|
const ESCALATION_STATES = [EscalationState];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-escalation.mjs","sources":["../../../../packages/masterteam/escalation/src/store/escalation/escalation.actions.ts","../../../../packages/masterteam/escalation/src/store/utils/state-helpers.ts","../../../../packages/masterteam/escalation/src/store/escalation/escalation.state.ts","../../../../packages/masterteam/escalation/src/store/escalation/escalation.facade.ts","../../../../packages/masterteam/escalation/src/store/escalation/api.model.ts","../../../../packages/masterteam/escalation/src/lib/escalation-builder/escalation-builder.ts","../../../../packages/masterteam/escalation/src/lib/escalation-builder/escalation-builder.html","../../../../packages/masterteam/escalation/src/store/app.state.ts","../../../../packages/masterteam/escalation/src/store/index.ts","../../../../packages/masterteam/escalation/src/masterteam-escalation.ts"],"sourcesContent":["import type { ConnectionPayload, StepPayload } from './escalation.model';\n\nexport class SetModuleInfo {\n static readonly type = '[Escalation] Set Module Info';\n\n constructor(\n public readonly moduleType: string,\n public readonly moduleId: string | number,\n public readonly parentModuleType?: string,\n public readonly parentModuleId?: string | number,\n public readonly parentPath?: string,\n ) {}\n}\nexport class GetEscalation {\n static readonly type = '[Escalation] Get Escalation';\n}\n\nexport class GetFormulaProperties {\n static readonly type = '[Escalation] Get Formula Properties';\n}\n\nexport class GetGroups {\n static readonly type = '[Escalation] Get Groups';\n}\n\nexport class GetRolesForModule {\n static readonly type = '[Escalation] Get Roles For Module';\n}\n\nexport class GetStep {\n static readonly type = '[Escalation] Get Step';\n\n constructor(public readonly stepId: string | number) {}\n}\n\nexport class ValidateFlow {\n static readonly type = '[Escalation] Validate Flow';\n}\n\nexport class CreateStep {\n static readonly type = '[Escalation] Create Step';\n\n constructor(public readonly payload: StepPayload) {}\n}\n\nexport class UpdateStep {\n static readonly type = '[Escalation] Update Step';\n\n constructor(\n public readonly stepId: string | number,\n public readonly payload: StepPayload,\n ) {}\n}\n\nexport class CreateConnection {\n static readonly type = '[Escalation] Create Connection';\n\n constructor(public readonly payload: ConnectionPayload) {}\n}\n\nexport class UpdateConnection {\n static readonly type = '[Escalation] Update Connection';\n\n constructor(\n public readonly connectionId: string | number,\n public readonly payload: ConnectionPayload,\n ) {}\n}\n\nexport class PublishEscalation {\n static readonly type = '[Escalation] Publish Escalation';\n\n constructor(public readonly isPublished: boolean) {}\n}\n\nexport class DeleteStep {\n static readonly type = '[Escalation] Delete Step';\n\n constructor(public readonly stepId: string | number) {}\n}\n\nexport class DeleteConnection {\n static readonly type = '[Escalation] Delete Connection';\n\n constructor(public readonly connectionId: string | number) {}\n}\n","import type { StateContext } from '@ngxs/store';\n\nexport interface LoadingStateShape<L extends string = string> {\n loadingActive: L[];\n errors: Partial<Record<L, string>>;\n}\n\ntype LoadingName<T extends LoadingStateShape<string>> =\n T['loadingActive'][number];\n\nexport function startLoading<T extends LoadingStateShape<string>>(\n ctx: StateContext<T>,\n loadingName: LoadingName<T>,\n): void {\n const { loadingActive, errors } = ctx.getState();\n\n if (!loadingActive.includes(loadingName)) {\n ctx.patchState({\n loadingActive: [...loadingActive, loadingName],\n } as Partial<T>);\n }\n\n if (errors && errors[loadingName]) {\n const { [loadingName]: _removed, ...rest } = errors;\n ctx.patchState({ errors: rest } as Partial<T>);\n }\n}\n\nexport function endLoading<T extends LoadingStateShape<string>>(\n ctx: StateContext<T>,\n loadingName: LoadingName<T>,\n): void {\n const { loadingActive } = ctx.getState();\n\n ctx.patchState({\n loadingActive: loadingActive.filter((name) => name !== loadingName),\n } as Partial<T>);\n}\n\nexport function setLoadingError<T extends LoadingStateShape<string>>(\n ctx: StateContext<T>,\n loadingName: LoadingName<T>,\n message: string,\n): void {\n const { errors } = ctx.getState();\n ctx.patchState({\n errors: { ...errors, [loadingName]: message },\n } as Partial<T>);\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Action, Selector, State, StateContext } from '@ngxs/store';\nimport { of } from 'rxjs';\nimport { catchError, finalize, tap } from 'rxjs/operators';\n\nimport {\n endLoading,\n setLoadingError,\n startLoading,\n} from '../utils/state-helpers';\n\nimport type {\n ConnectionResponse,\n FormulaProperty,\n GroupDefinition,\n PublishResponse,\n RoleDefinition,\n StepResponse,\n StepSchema,\n EscalationConnection,\n EscalationLoadingName,\n EscalationSchema,\n EscalationStateModel,\n EscalationStepSchema,\n} from './escalation.model';\nimport {\n CreateConnection,\n CreateStep,\n DeleteConnection,\n DeleteStep,\n GetFormulaProperties,\n GetGroups,\n GetRolesForModule,\n GetStep,\n GetEscalation,\n PublishEscalation,\n UpdateConnection,\n UpdateStep,\n ValidateFlow,\n SetModuleInfo,\n} from './escalation.actions';\nimport { Response } from './api.model';\n\nconst DEFAULT_STATE: EscalationStateModel = {\n moduleType: null,\n moduleId: null,\n escalation: null,\n formulaProperties: [],\n groups: [],\n roles: [],\n selectedStep: null,\n isFlowValid: null,\n loadingActive: [],\n errors: {},\n};\n\n@State<EscalationStateModel>({\n name: 'escalation',\n defaults: DEFAULT_STATE,\n})\n@Injectable()\nexport class EscalationState {\n private readonly http = inject(HttpClient);\n private readonly baseUrl = 'EscalationSchemas';\n private readonly groupsUrl = 'identity/Groups';\n private readonly rolesUrl = 'identity/roles/scopes';\n\n @Selector()\n static moduleId(state: EscalationStateModel): string | number | null {\n return state.moduleId;\n }\n\n @Selector()\n static moduleType(state: EscalationStateModel): string | null {\n return state.moduleType;\n }\n\n @Selector()\n static escalation(state: EscalationStateModel): EscalationSchema | null {\n return state.escalation;\n }\n\n @Selector()\n static formulaProperties(state: EscalationStateModel): FormulaProperty[] {\n return state.formulaProperties;\n }\n\n @Selector()\n static groups(state: EscalationStateModel): GroupDefinition[] {\n return state.groups;\n }\n\n @Selector()\n static roles(state: EscalationStateModel): RoleDefinition[] {\n return state.roles;\n }\n\n @Selector()\n static selectedStep(state: EscalationStateModel): StepSchema | null {\n return state.selectedStep;\n }\n\n @Selector()\n static isFlowValid(state: EscalationStateModel): boolean | null {\n return state.isFlowValid;\n }\n\n @Selector()\n static stepsSchema(state: EscalationStateModel): EscalationStepSchema[] {\n return state.escalation?.stepsSchema ?? [];\n }\n\n @Selector()\n static connections(state: EscalationStateModel): EscalationConnection[] {\n return state.escalation?.connections ?? [];\n }\n\n @Selector()\n static isLoadingFactory(state: EscalationStateModel) {\n return (loadingName: EscalationLoadingName) =>\n state.loadingActive.includes(loadingName);\n }\n\n @Selector()\n static errorFactory(state: EscalationStateModel) {\n return (loadingName: EscalationLoadingName) =>\n state.errors?.[loadingName] ?? null;\n }\n\n @Action(SetModuleInfo)\n setModuleInfo(\n ctx: StateContext<EscalationStateModel>,\n action: SetModuleInfo,\n ) {\n let parentPath = '';\n if (action.parentModuleType && action.parentModuleId) {\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\n } else if (action.parentPath) {\n parentPath = action.parentPath;\n }\n ctx.patchState({\n moduleType: action.moduleType,\n moduleId: action.moduleId,\n parentModuleType: action.parentModuleType ?? null,\n parentModuleId: action.parentModuleId ?? null,\n parentPath: parentPath ?? '',\n });\n }\n @Action(GetEscalation)\n getEscalation(\n ctx: StateContext<EscalationStateModel>,\n _action: GetEscalation,\n ) {\n startLoading(ctx, 'getEscalation');\n\n const state = ctx.getState();\n const { moduleId, parentPath, moduleType } = state;\n\n if (!moduleId) {\n const message = 'Module ID is not set';\n setLoadingError(ctx, 'getEscalation', message);\n endLoading(ctx, 'getEscalation');\n return of(null);\n }\n\n return this.http\n .get<Response<EscalationSchema>>(\n `${this.baseUrl}${parentPath}/${moduleType}/${moduleId}`,\n {\n params: { Mode: 'edit' },\n },\n )\n .pipe(\n tap((response) => {\n const escalation = response?.data ?? null;\n ctx.patchState({ escalation });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to load escalation';\n setLoadingError(ctx, 'getEscalation', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'getEscalation')),\n );\n }\n\n @Action(GetFormulaProperties)\n getFormulaProperties(\n ctx: StateContext<EscalationStateModel>,\n _action: GetFormulaProperties,\n ) {\n startLoading(ctx, 'getFormulaProperties');\n\n const state = ctx.getState();\n const moduleId = state.moduleId;\n\n if (!moduleId) {\n const message = 'Module ID is not set';\n setLoadingError(ctx, 'getFormulaProperties', message);\n endLoading(ctx, 'getFormulaProperties');\n return of(null);\n }\n\n return this.http\n .get<\n Response<FormulaProperty[]>\n >(`${this.baseUrl}/processFormulaProperties/${moduleId}`)\n .pipe(\n tap((response) => {\n const formulaProperties = Array.isArray(response?.data)\n ? response.data\n : [];\n ctx.patchState({ formulaProperties });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to load formula properties';\n setLoadingError(ctx, 'getFormulaProperties', message);\n return of([]);\n }),\n finalize(() => endLoading(ctx, 'getFormulaProperties')),\n );\n }\n\n @Action(GetGroups)\n getGroups(ctx: StateContext<EscalationStateModel>, _action: GetGroups) {\n const state = ctx.getState();\n if (state.groups.length) {\n return of(state.groups);\n }\n\n startLoading(ctx, 'getGroups');\n\n return this.http.get<Response<GroupDefinition[]>>(this.groupsUrl).pipe(\n tap((response) => {\n const groups = Array.isArray(response?.data) ? response.data : [];\n ctx.patchState({ groups });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to load groups';\n setLoadingError(ctx, 'getGroups', message);\n return of([]);\n }),\n finalize(() => endLoading(ctx, 'getGroups')),\n );\n }\n\n @Action(GetRolesForModule)\n getRolesForModule(\n ctx: StateContext<EscalationStateModel>,\n _action: GetRolesForModule,\n ) {\n const state = ctx.getState();\n const { moduleType, moduleId } = state;\n\n if (!moduleType || !moduleId) {\n const message = 'Module type and module ID must be set';\n setLoadingError(ctx, 'getRolesForModule', message);\n return of([]);\n }\n\n startLoading(ctx, 'getRolesForModule');\n\n return this.http\n .get<Response<RoleDefinition[]>>(\n `${this.rolesUrl}/${moduleType}/${moduleId}`,\n {\n params: { inherited: 'true' },\n },\n )\n .pipe(\n tap((response) => {\n const roles = Array.isArray(response?.data) ? response.data : [];\n ctx.patchState({ roles });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to load roles';\n setLoadingError(ctx, 'getRolesForModule', message);\n return of([]);\n }),\n finalize(() => endLoading(ctx, 'getRolesForModule')),\n );\n }\n\n @Action(GetStep)\n getStep(ctx: StateContext<EscalationStateModel>, action: GetStep) {\n startLoading(ctx, 'getStep');\n\n return this.http\n .get<Response<StepSchema>>(`${this.baseUrl}/step/${action.stepId}`, {\n params: { Mode: 'edit' },\n })\n .pipe(\n tap((response) => {\n const selectedStep = response?.data ?? null;\n ctx.patchState({ selectedStep });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to load step';\n setLoadingError(ctx, 'getStep', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'getStep')),\n );\n }\n\n @Action(ValidateFlow)\n validateFlow(ctx: StateContext<EscalationStateModel>, _action: ValidateFlow) {\n startLoading(ctx, 'validateFlow');\n\n const state = ctx.getState();\n const { moduleId, parentPath, moduleType } = state;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'validateFlow', message);\n endLoading(ctx, 'validateFlow');\n return of(null);\n }\n\n return this.http\n .get<\n Response<boolean>\n >(`${this.baseUrl}/requestSchema${parentPath}/${moduleType}/${moduleId}/validity`)\n .pipe(\n tap((response) => {\n const isFlowValid = response?.data ?? null;\n ctx.patchState({ isFlowValid });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to validate flow';\n setLoadingError(ctx, 'validateFlow', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'validateFlow')),\n );\n }\n\n @Action(CreateStep)\n createStep(ctx: StateContext<EscalationStateModel>, action: CreateStep) {\n const state = ctx.getState();\n const { moduleId, parentPath, moduleType } = state;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'createStep', message);\n return of(null);\n }\n\n const tempId = -Date.now();\n const tempStep: any = {\n ...action.payload,\n id: tempId,\n loading: true,\n };\n\n if (state.escalation) {\n ctx.patchState({\n escalation: {\n ...state.escalation,\n stepsSchema: [...state.escalation.stepsSchema, tempStep],\n },\n });\n }\n\n startLoading(ctx, 'createStep');\n\n return this.http\n .post<\n Response<StepResponse>\n >(`${this.baseUrl}${parentPath}/${moduleType}/${moduleId}/steps`, action.payload)\n .pipe(\n tap((response) => {\n const createdStep = response?.data;\n const currentState = ctx.getState();\n if (createdStep && currentState.escalation) {\n const updatedSteps = currentState.escalation.stepsSchema.map(\n (step) =>\n step.id === tempId ? { ...createdStep, loading: false } : step,\n );\n\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: updatedSteps,\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const filteredSteps = currentState.escalation.stepsSchema.filter(\n (step) => step.id !== tempId,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: filteredSteps,\n },\n });\n }\n\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to create step';\n setLoadingError(ctx, 'createStep', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'createStep')),\n );\n }\n\n @Action(UpdateStep)\n updateStep(ctx: StateContext<EscalationStateModel>, action: UpdateStep) {\n const state = ctx.getState();\n const moduleId = state.moduleId;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'updateStep', message);\n return of(null);\n }\n\n if (state.escalation) {\n const updatedSteps = state.escalation.stepsSchema.map((step) =>\n step.id === action.stepId ? { ...step, loading: true } : step,\n );\n ctx.patchState({\n escalation: {\n ...state.escalation,\n stepsSchema: updatedSteps,\n },\n });\n }\n\n startLoading(ctx, 'updateStep');\n\n return this.http\n .put<\n Response<StepResponse>\n >(`${this.baseUrl}/steps/${action.stepId}`, action.payload)\n .pipe(\n tap((response) => {\n const updatedStep = response?.data;\n const currentState = ctx.getState();\n if (updatedStep && currentState.escalation) {\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: currentState.escalation.stepsSchema.map((step) =>\n step.id === updatedStep.id\n ? { ...updatedStep, loading: false }\n : step,\n ),\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const errorSteps = currentState.escalation.stepsSchema.map(\n (step) =>\n step.id === action.stepId ? { ...step, loading: false } : step,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: errorSteps,\n },\n });\n }\n\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to update step';\n setLoadingError(ctx, 'updateStep', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'updateStep')),\n );\n }\n\n @Action(CreateConnection)\n createConnection(\n ctx: StateContext<EscalationStateModel>,\n action: CreateConnection,\n ) {\n const state = ctx.getState();\n const { moduleId, parentPath, moduleType } = state;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'createConnection', message);\n return of(null);\n }\n\n const tempId = -Date.now();\n const tempConnection: any = {\n ...action.payload,\n id: tempId,\n loading: true,\n source: action.payload.sourceStepId,\n target: action.payload.targetStepId,\n };\n\n if (state.escalation) {\n ctx.patchState({\n escalation: {\n ...state.escalation,\n connections: [...state.escalation.connections, tempConnection],\n },\n });\n }\n\n startLoading(ctx, 'createConnection');\n\n return this.http\n .post<\n Response<ConnectionResponse>\n >(`${this.baseUrl}${parentPath}/${moduleType}/${moduleId}/connections`, action.payload)\n .pipe(\n tap((response) => {\n const createdConnection = response?.data;\n const currentState = ctx.getState();\n if (createdConnection && currentState.escalation) {\n const updatedConnections = currentState.escalation.connections.map(\n (conn) =>\n conn.id === tempId\n ? { ...createdConnection, loading: false }\n : conn,\n );\n\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: updatedConnections,\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const filteredConnections =\n currentState.escalation.connections.filter(\n (conn) => conn.id !== tempId,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: filteredConnections,\n },\n });\n }\n\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to create connection';\n setLoadingError(ctx, 'createConnection', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'createConnection')),\n );\n }\n\n @Action(UpdateConnection)\n updateConnection(\n ctx: StateContext<EscalationStateModel>,\n action: UpdateConnection,\n ) {\n const state = ctx.getState();\n const moduleId = state.moduleId;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'updateConnection', message);\n return of(null);\n }\n\n if (state.escalation) {\n const updatedConnections = state.escalation.connections.map((conn) =>\n conn.id === action.connectionId ? { ...conn, loading: true } : conn,\n );\n ctx.patchState({\n escalation: {\n ...state.escalation,\n connections: updatedConnections,\n },\n });\n }\n\n startLoading(ctx, 'updateConnection');\n\n return this.http\n .put<\n Response<ConnectionResponse>\n >(`${this.baseUrl}/connections/${action.connectionId}`, action.payload)\n .pipe(\n tap((response) => {\n const updatedConnection = response?.data;\n const currentState = ctx.getState();\n if (updatedConnection && currentState.escalation) {\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: currentState.escalation.connections.map((conn) =>\n conn.id === updatedConnection.id\n ? { ...updatedConnection, loading: false }\n : conn,\n ),\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const errorConnections = currentState.escalation.connections.map(\n (conn) =>\n conn.id === action.connectionId\n ? { ...conn, loading: false }\n : conn,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: errorConnections,\n },\n });\n }\n\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to update connection';\n setLoadingError(ctx, 'updateConnection', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'updateConnection')),\n );\n }\n\n @Action(PublishEscalation)\n publishEscalation(\n ctx: StateContext<EscalationStateModel>,\n action: PublishEscalation,\n ) {\n startLoading(ctx, 'publishEscalation');\n\n const state = ctx.getState();\n const { moduleId, parentPath, moduleType } = state;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'publishEscalation', message);\n endLoading(ctx, 'publishEscalation');\n return of(null);\n }\n\n return this.http\n .put<\n Response<PublishResponse>\n >(`${this.baseUrl}${parentPath}/${moduleType}/${moduleId}/publish`, { IsPublished: action.isPublished })\n .pipe(\n tap((response) => {\n const publishedData = response?.data;\n if (publishedData && state.escalation) {\n ctx.patchState({\n escalation: {\n ...state.escalation,\n isPublished: publishedData.isPublished,\n isValid: publishedData.isValid,\n },\n });\n }\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to publish escalation';\n setLoadingError(ctx, 'publishEscalation', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'publishEscalation')),\n );\n }\n\n @Action(DeleteStep)\n deleteStep(ctx: StateContext<EscalationStateModel>, action: DeleteStep) {\n const state = ctx.getState();\n\n if (state.escalation) {\n const updatedSteps = state.escalation.stepsSchema.map((step) =>\n step.id == action.stepId ? { ...step, loading: true } : step,\n );\n ctx.patchState({\n escalation: {\n ...state.escalation,\n stepsSchema: updatedSteps,\n },\n });\n }\n\n startLoading(ctx, 'deleteStep');\n\n return this.http\n .delete<Response<boolean>>(`${this.baseUrl}/steps/${action.stepId}`)\n .pipe(\n tap(() => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: currentState.escalation.stepsSchema.filter(\n (step) => step.id != action.stepId,\n ),\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const errorSteps = currentState.escalation.stepsSchema.map(\n (step) =>\n step.id == action.stepId ? { ...step, loading: false } : step,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: errorSteps,\n },\n });\n }\n\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to delete step';\n setLoadingError(ctx, 'deleteStep', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'deleteStep')),\n );\n }\n\n @Action(DeleteConnection)\n deleteConnection(\n ctx: StateContext<EscalationStateModel>,\n action: DeleteConnection,\n ) {\n const state = ctx.getState();\n\n if (state.escalation) {\n const updatedConnections = state.escalation.connections.map((conn) =>\n conn.id == action.connectionId ? { ...conn, loading: true } : conn,\n );\n ctx.patchState({\n escalation: {\n ...state.escalation,\n connections: updatedConnections,\n },\n });\n }\n\n startLoading(ctx, 'deleteConnection');\n\n return this.http\n .delete<\n Response<boolean>\n >(`${this.baseUrl}/connections/${action.connectionId}`)\n .pipe(\n tap(() => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: currentState.escalation.connections.filter(\n (conn) => conn.id != action.connectionId,\n ),\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const errorConnections = currentState.escalation.connections.map(\n (conn) =>\n conn.id == action.connectionId\n ? { ...conn, loading: false }\n : conn,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: errorConnections,\n },\n });\n }\n\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to delete connection';\n setLoadingError(ctx, 'deleteConnection', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'deleteConnection')),\n );\n }\n}\n","import { Injectable, computed, inject } from '@angular/core';\nimport { select, Store } from '@ngxs/store';\nimport type { Observable } from 'rxjs';\n\nimport type {\n ConnectionPayload,\n FormulaProperty,\n GroupDefinition,\n RoleDefinition,\n StepPayload,\n StepSchema,\n EscalationConnection,\n EscalationLoadingName,\n EscalationSchema,\n EscalationStepSchema,\n} from './escalation.model';\nimport {\n CreateConnection,\n CreateStep,\n DeleteConnection,\n DeleteStep,\n GetFormulaProperties,\n GetGroups,\n GetRolesForModule,\n GetStep,\n GetEscalation,\n PublishEscalation,\n UpdateConnection,\n UpdateStep,\n ValidateFlow,\n SetModuleInfo,\n} from './escalation.actions';\nimport { EscalationState } from './escalation.state';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class EscalationFacade {\n private readonly store = inject(Store);\n\n readonly moduleType = select<string | null>(EscalationState.moduleType);\n readonly moduleId = select<string | number | null>(EscalationState.moduleId);\n readonly escalation = select<EscalationSchema | null>(\n EscalationState.escalation,\n );\n readonly formulaProperties = select<FormulaProperty[]>(\n EscalationState.formulaProperties,\n );\n readonly groups = select<GroupDefinition[]>(EscalationState.groups);\n readonly roles = select<RoleDefinition[]>(EscalationState.roles);\n readonly selectedStep = select<StepSchema | null>(\n EscalationState.selectedStep,\n );\n readonly isFlowValid = select<boolean | null>(EscalationState.isFlowValid);\n readonly steps = select<EscalationStepSchema[]>(EscalationState.stepsSchema);\n readonly connections = select<EscalationConnection[]>(\n EscalationState.connections,\n );\n\n isLoading(loadingName: EscalationLoadingName) {\n const loadingFactory = select<(name: EscalationLoadingName) => boolean>(\n EscalationState.isLoadingFactory,\n );\n return computed(() => loadingFactory()(loadingName));\n }\n\n error(loadingName: EscalationLoadingName) {\n const errorFactory = select<(name: EscalationLoadingName) => string | null>(\n EscalationState.errorFactory,\n );\n return computed(() => errorFactory()(loadingName));\n }\n\n setModuleInfo(\n moduleType: string,\n moduleId: string | number,\n parentModuleType?: string,\n parentModuleId?: string | number,\n parentPath?: string,\n ): Observable<unknown> {\n return this.store.dispatch(\n new SetModuleInfo(\n moduleType,\n moduleId,\n parentModuleType,\n parentModuleId,\n parentPath,\n ),\n );\n }\n\n loadEscalation(): Observable<unknown> {\n return this.store.dispatch(new GetEscalation());\n }\n\n loadFormulaProperties(): Observable<unknown> {\n return this.store.dispatch(new GetFormulaProperties());\n }\n\n loadGroups(): Observable<unknown> {\n return this.store.dispatch(new GetGroups());\n }\n\n loadRolesForModule(): Observable<unknown> {\n return this.store.dispatch(new GetRolesForModule());\n }\n\n loadStep(stepId: string | number): Observable<unknown> {\n return this.store.dispatch(new GetStep(stepId));\n }\n\n validateFlow(): Observable<unknown> {\n return this.store.dispatch(new ValidateFlow());\n }\n\n createStep(payload: StepPayload): Observable<unknown> {\n return this.store.dispatch(new CreateStep(payload));\n }\n\n updateStep(\n stepId: string | number,\n payload: StepPayload,\n ): Observable<unknown> {\n return this.store.dispatch(new UpdateStep(stepId, payload));\n }\n\n createConnection(payload: ConnectionPayload): Observable<unknown> {\n return this.store.dispatch(new CreateConnection(payload));\n }\n\n updateConnection(\n connectionId: string | number,\n payload: ConnectionPayload,\n ): Observable<unknown> {\n return this.store.dispatch(new UpdateConnection(connectionId, payload));\n }\n\n publishEscalation(isPublished: boolean): Observable<unknown> {\n return this.store.dispatch(new PublishEscalation(isPublished));\n }\n\n deleteStep(stepId: string | number): Observable<unknown> {\n return this.store.dispatch(new DeleteStep(stepId));\n }\n\n deleteConnection(connectionId: string | number): Observable<unknown> {\n return this.store.dispatch(new DeleteConnection(connectionId));\n }\n}\n","// shared/models/api.model.ts\n\nexport interface Response<T> {\n endpoint: string;\n status: number;\n code: number;\n locale: string;\n message?: string | null;\n errors?: any | null;\n data: T;\n cacheSession?: string;\n}\n","import {\n Component,\n inject,\n linkedSignal,\n signal,\n computed,\n effect,\n} from '@angular/core';\nimport { DynamicFormConfig } from '@masterteam/components';\nimport {\n NodeActionEvent,\n SBAction,\n StructureBuilder,\n} from '@masterteam/structure-builder';\nimport { EscalationFacade } from '../../store/escalation';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\nimport { Skeleton } from 'primeng/skeleton';\nimport { TranslocoModule, TranslocoService } from '@jsverse/transloco';\nimport { ConfirmationService } from '@masterteam/components/confirmation';\n\n@Component({\n selector: 'mt-escalation-builder',\n imports: [\n StructureBuilder,\n ReactiveFormsModule,\n DynamicForm,\n Skeleton,\n TranslocoModule,\n ],\n templateUrl: './escalation-builder.html',\n styles: [],\n host: {},\n})\nexport class EscalationBuilder {\n private escalationFacade = inject(EscalationFacade);\n private transloco = inject(TranslocoService);\n groups = this.escalationFacade.groups;\n roles = this.escalationFacade.roles;\n escalation = this.escalationFacade.escalation;\n loading = this.escalationFacade.isLoading('getEscalation');\n loadingStep = this.escalationFacade.isLoading('getStep');\n private readonly confirmationService = inject(ConfirmationService);\n\n selectedStep = this.escalationFacade.selectedStep;\n\n nodeFields = signal<any>({\n name: 'name',\n });\n nodeFormControl = new FormControl();\n\n private isEditingInitialNode = signal<boolean>(false);\n\n availableNodes = [\n {\n id: 'FormStep',\n label: this.transloco.translate('escalation.builder.newStep'),\n name: {\n en: 'New Step',\n ar: ' خطوة جديدة',\n },\n targetType: '1',\n icon: 'general.plus-circle',\n color: '#000000',\n },\n ];\n\n // Base form sections - defined once for reusability\n private readonly baseNameFields = {\n key: 'settings',\n type: 'none',\n bodyClass: 'space-y-2',\n fields: [\n {\n key: 'name.en',\n label: this.transloco.translate('escalation.builder.nameEnglish'),\n placeholder: this.transloco.translate(\n 'escalation.builder.enterNameEnglish',\n ),\n cssClass: 'w-full',\n required: true,\n },\n {\n key: 'name.ar',\n label: this.transloco.translate('escalation.builder.nameArabic'),\n placeholder: this.transloco.translate(\n 'escalation.builder.enterNameArabic',\n ),\n cssClass: 'w-full',\n required: true,\n },\n ],\n };\n\n // Approver section with dynamic options\n private readonly approverSection = computed(() => ({\n key: 'settings',\n type: 'header',\n label: this.transloco.translate('escalation.builder.approver'),\n headerClass:\n 'rounded-t-xl bg-slate-50 px-4 py-3 text-sm font-semibold text-slate-900 border border-slate-200 border-b-0',\n bodyClass: 'rounded-b-xl border border-slate-200 p-4 space-y-3',\n cssClass: ' ',\n fields: [\n {\n key: 'targetType',\n type: 'radio-button',\n orientation: 'horizontal',\n defaultValue: '1',\n options: [\n {\n label: this.transloco.translate('escalation.builder.group'),\n value: '1',\n },\n {\n label: this.transloco.translate('escalation.builder.role'),\n value: '2',\n },\n ],\n optionLabel: 'name',\n optionValue: 'value',\n placeholder: 'Enter Role',\n cssClass: 'flex items-center gap-6 text-sm text-slate-700',\n required: true,\n },\n {\n key: 'group',\n label: 'Select',\n placeholder: this.transloco.translate('escalation.builder.selectGroup'),\n cssClass: 'mt-2 pt-3 border-t border-slate-200 w-full',\n required: true,\n type: 'select',\n options: this.groups(),\n optionLabel: 'name',\n optionValue: 'id',\n relations: [{ key: 'targetType', value: '1', action: 'show' }],\n },\n {\n key: 'role',\n label: 'Select',\n placeholder: 'Enter target value',\n cssClass: 'mt-2 pt-3 border-t border-slate-200 w-full',\n required: true,\n type: 'select',\n options: this.roles(),\n optionLabel: 'name',\n optionValue: 'id',\n relations: [{ key: 'targetType', value: '2', action: 'show' }],\n },\n ],\n }));\n\n private readonly slaSection = {\n key: 'slaSection',\n type: 'none',\n bodyClass: 'space-y-1',\n fields: [\n {\n key: 'sla',\n label: 'SLA',\n placeholder: 'Enter SLA',\n cssClass: 'w-full',\n required: true,\n },\n ],\n } as const;\n\n // Dynamic form configuration using linkedSignal\n // Automatically rebuilds when isEditingInitialNode changes\n nodeForm = linkedSignal<DynamicFormConfig>(() => {\n const sections: any[] = [this.baseNameFields];\n\n // Conditionally include approver and SLA sections based on isEditingInitialNode\n // Initial nodes only show name fields\n if (!this.isEditingInitialNode()) {\n sections.push(this.approverSection());\n sections.push(this.slaSection);\n }\n\n return {\n sections,\n layout: {},\n };\n });\n\n // Sample connection form configuration\n connectionForm = signal<DynamicFormConfig>({\n sections: [\n {\n key: 'basic',\n label: 'Basic Information',\n type: 'none',\n cssClass: 'p-4',\n order: 1,\n fields: [\n {\n key: 'priority',\n label: 'Priority',\n },\n ],\n },\n ],\n });\n\n // Nodes currently in the flow\n steps = computed(() => {\n return this.escalationFacade.steps().map((step) => ({\n ...step,\n color: '#000000',\n }));\n });\n\n // Connections between nodes\n connections = computed(() => {\n return this.escalationFacade.connections().map((connection) => ({\n ...connection,\n from: connection.source,\n to: connection.target,\n }));\n });\n\n // Node Actions\n nodeActions = signal([\n {\n key: 'edit',\n icon: 'general.edit-05',\n variant: 'outlined',\n size: 'small',\n tooltip: 'Edit',\n },\n {\n key: 'delete',\n icon: 'general.trash-01',\n variant: 'outlined',\n size: 'small',\n severity: 'danger',\n tooltip: 'Delete',\n },\n ]);\n\n constructor() {\n // Effect to watch selectedStep and patch form when it changes\n effect(() => {\n const step = this.selectedStep();\n\n if (step) {\n // Patch form with complete step data\n this.nodeFormControl.patchValue({\n name: step.name,\n targetType: step.targetType || '1',\n group: step.targetType === '1' ? parseInt(step.targetValue!) : null,\n role: step.targetType === '2' ? step.targetValue : null,\n sla: step.sla,\n });\n\n console.log('Form patched with step data:', step);\n }\n });\n }\n\n onNodeActionsEvent(event: NodeActionEvent) {\n console.log('Node action event:', event);\n }\n\n clearForm(): void {\n // Reset isEditingInitialNode flag\n this.isEditingInitialNode.set(false);\n\n // Reset form to default values\n this.nodeFormControl.reset({\n name: { en: '', ar: '' },\n targetType: '1',\n group: null,\n role: null,\n sla: 0,\n });\n\n console.log('Form cleared for new step');\n }\n\n onStructureAction(event: SBAction) {\n console.log('Structure action received:', event);\n\n switch (event.action) {\n case 'createNode':\n if (event.data) {\n // Get form values\n const formValue = this.nodeFormControl.value;\n\n // Prepare step payload without properties\n const stepPayload = {\n name: formValue.name || { en: 'New Step', ar: 'خطوة جديدة' },\n targetType: formValue.targetType,\n targetValue:\n formValue.targetType === '1' ? formValue.group : formValue.role,\n sla: formValue.sla || 0,\n };\n\n // Create step via facade\n this.escalationFacade.createStep(stepPayload).subscribe({\n next: () => {\n console.log('Step created successfully:', stepPayload);\n },\n error: (error) => {\n console.error('Failed to create step:', error);\n },\n });\n }\n break;\n\n case 'startUpdating':\n if (event.data) {\n this.clearForm();\n\n const stepId = event.data.id;\n\n // Set the flag based on whether node is initial\n // This will trigger nodeForm to rebuild automatically via linkedSignal\n this.isEditingInitialNode.set(!!event.data.isInitial);\n\n // Load step data\n this.escalationFacade.loadStep(stepId);\n }\n break;\n\n case 'startCreating':\n // Reset form for new step\n this.clearForm();\n break;\n\n case 'updateNode':\n if (event.data) {\n // Get form values\n const formValue = this.nodeFormControl.value;\n const stepId = event.data.id;\n\n // Prepare step payload\n const stepPayload = {\n name: formValue.name || event.data.name,\n targetType: formValue.targetType,\n targetValue:\n formValue.targetType === '1' ? formValue.group : formValue.role,\n sla: formValue.sla || event.data.sla,\n };\n\n // Update step via facade\n this.escalationFacade.updateStep(stepId, stepPayload).subscribe({\n next: () => {\n console.log('Step updated successfully:', stepPayload);\n },\n error: (error) => {\n console.error('Failed to update step:', error);\n },\n });\n }\n break;\n\n case 'deleteNode':\n if (event.data) {\n const nodeIdToDelete = event.data.id;\n this.confirmationService.confirmDelete({\n type: 'dialog',\n\n accept: () => {\n this.escalationFacade.deleteStep(nodeIdToDelete).subscribe({\n next: () => {\n console.log('Node deleted:', nodeIdToDelete);\n },\n error: (error) => {\n console.error('Failed to delete node:', error);\n },\n });\n },\n reject: () => {},\n });\n }\n break;\n\n case 'createConnection':\n if (event.data) {\n // Create connection in store\n const connectionPayload = {\n sourceStepId: event.data.from,\n targetStepId: event.data.to,\n priority: event.data.priority ?? 1,\n formula: event.data.formula ?? [],\n };\n this.escalationFacade.createConnection(connectionPayload).subscribe({\n next: () => {\n console.log('Connection created:', event.data);\n },\n error: (error) => {\n console.error('Failed to create connection:', error);\n },\n });\n }\n break;\n\n case 'updateConnection':\n if (event.data) {\n // Update connection in store\n const connectionId = event.data.id;\n const updatePayload = {\n sourceStepId: event.data.from,\n targetStepId: event.data.to,\n priority: event.data.priority ?? 1,\n formula: event.data.formula ?? [],\n };\n this.escalationFacade\n .updateConnection(connectionId, updatePayload)\n .subscribe({\n next: () => {\n console.log('Connection updated:', event.data);\n },\n error: (error) => {\n console.error('Failed to update connection:', error);\n },\n });\n }\n break;\n\n case 'deleteConnection':\n if (event.data) {\n const connectionIdToDelete = event.data.id;\n // Delete connection from store\n this.escalationFacade\n .deleteConnection(connectionIdToDelete)\n .subscribe({\n next: () => {\n console.log('Connection deleted:', connectionIdToDelete);\n },\n error: (error) => {\n console.error('Failed to delete connection:', error);\n },\n });\n }\n break;\n\n default:\n console.warn('Unknown structure action:', event.action);\n }\n }\n}\n","<div class=\"h-full relative\" id=\"escalationCard\">\n @if (!loading()) {\n <mt-structure-builder\n class=\"flex-1\"\n [availableNodes]=\"availableNodes\"\n [connectionForm]=\"connectionForm()\"\n [nodeActions]=\"nodeActions()\"\n (nodeActionsEvent)=\"onNodeActionsEvent($event)\"\n [nodes]=\"steps()\"\n [connections]=\"connections()\"\n (action)=\"onStructureAction($event)\"\n [addModalType]=\"'drawer'\"\n [addModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\n [updateModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\n [addModalHeader]=\"'escalation.builder.addStep' | transloco\"\n [updateModalHeader]=\"'escalation.builder.editStep' | transloco\"\n [appendTo]=\"'escalationCard'\"\n [nodeFields]=\"nodeFields()\"\n >\n <ng-template\n #nodeDialog\n let-close=\"close\"\n let-save=\"save\"\n let-node=\"node\"\n >\n <div class=\"p-4\">\n @if (loadingStep()) {\n <!-- Loading skeleton -->\n <div class=\"space-y-4\">\n <!-- Form fields skeleton -->\n <div class=\"space-y-4\">\n <div>\n <p-skeleton\n width=\"8rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"8rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"10rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"3rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"6rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"4rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n </div>\n </div>\n } @else {\n <!-- Actual content - just the form, no tabs -->\n <mt-dynamic-form\n [formConfig]=\"nodeForm()\"\n [formControl]=\"nodeFormControl\"\n ></mt-dynamic-form>\n }\n </div>\n </ng-template>\n </mt-structure-builder>\n }\n</div>\n","import { EscalationState } from './escalation/escalation.state';\n\nexport const ESCALATION_STATES = [EscalationState];\n\nexport * from './escalation';\n","// Re-export app state\nexport * from './app.state';\n\n// Re-export workflow state\nexport * from './escalation';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAEa,aAAa,CAAA;AAIN,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,gBAAA;AACA,IAAA,cAAA;AACA,IAAA,UAAA;AAPlB,IAAA,OAAgB,IAAI,GAAG,8BAA8B;IAErD,WAAA,CACkB,UA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,YAAA,EAAA,OAAA,EAAA,WAAA,EAAA,cAAA,EAAA,MAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACR,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAMN,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAb7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,EAAA,OAAA,EACxB;wBACP,gBAAgB;wBAChB,mBAAmB;wBACnB,WAAW;wBACX,QAAQ;wBACR,eAAe;AAChB,qBAAA,EAAA,IAAA,EAGK,EAAE,EAAA,QAAA,EAAA,2hHAAA,EAAA;;;AE9BH,MAAM,iBAAiB,GAAG,CAAC,eAAe;;ACFjD;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"masterteam-escalation.mjs","sources":["../../../../packages/masterteam/escalation/src/store/escalation/escalation.actions.ts","../../../../packages/masterteam/escalation/src/store/utils/state-helpers.ts","../../../../packages/masterteam/escalation/src/store/escalation/escalation.state.ts","../../../../packages/masterteam/escalation/src/store/escalation/escalation.facade.ts","../../../../packages/masterteam/escalation/src/store/escalation/api.model.ts","../../../../packages/masterteam/escalation/src/lib/escalation-builder/escalation-builder.ts","../../../../packages/masterteam/escalation/src/lib/escalation-builder/escalation-builder.html","../../../../packages/masterteam/escalation/src/store/app.state.ts","../../../../packages/masterteam/escalation/src/store/index.ts","../../../../packages/masterteam/escalation/src/masterteam-escalation.ts"],"sourcesContent":["import type { ConnectionPayload, StepPayload } from './escalation.model';\r\n\r\nexport class SetModuleInfo {\r\n static readonly type = '[Escalation] Set Module Info';\r\n\r\n constructor(\r\n public readonly moduleType: string,\r\n public readonly moduleId: string | number,\r\n public readonly parentModuleType?: string,\r\n public readonly parentModuleId?: string | number,\r\n public readonly parentPath?: string,\r\n ) {}\r\n}\r\nexport class GetEscalation {\r\n static readonly type = '[Escalation] Get Escalation';\r\n}\r\n\r\nexport class GetFormulaProperties {\r\n static readonly type = '[Escalation] Get Formula Properties';\r\n}\r\n\r\nexport class GetGroups {\r\n static readonly type = '[Escalation] Get Groups';\r\n}\r\n\r\nexport class GetRolesForModule {\r\n static readonly type = '[Escalation] Get Roles For Module';\r\n}\r\n\r\nexport class GetStep {\r\n static readonly type = '[Escalation] Get Step';\r\n\r\n constructor(public readonly stepId: string | number) {}\r\n}\r\n\r\nexport class ValidateFlow {\r\n static readonly type = '[Escalation] Validate Flow';\r\n}\r\n\r\nexport class CreateStep {\r\n static readonly type = '[Escalation] Create Step';\r\n\r\n constructor(public readonly payload: StepPayload) {}\r\n}\r\n\r\nexport class UpdateStep {\r\n static readonly type = '[Escalation] Update Step';\r\n\r\n constructor(\r\n public readonly stepId: string | number,\r\n public readonly payload: StepPayload,\r\n ) {}\r\n}\r\n\r\nexport class CreateConnection {\r\n static readonly type = '[Escalation] Create Connection';\r\n\r\n constructor(public readonly payload: ConnectionPayload) {}\r\n}\r\n\r\nexport class UpdateConnection {\r\n static readonly type = '[Escalation] Update Connection';\r\n\r\n constructor(\r\n public readonly connectionId: string | number,\r\n public readonly payload: ConnectionPayload,\r\n ) {}\r\n}\r\n\r\nexport class PublishEscalation {\r\n static readonly type = '[Escalation] Publish Escalation';\r\n\r\n constructor(public readonly isPublished: boolean) {}\r\n}\r\n\r\nexport class DeleteStep {\r\n static readonly type = '[Escalation] Delete Step';\r\n\r\n constructor(public readonly stepId: string | number) {}\r\n}\r\n\r\nexport class DeleteConnection {\r\n static readonly type = '[Escalation] Delete Connection';\r\n\r\n constructor(public readonly connectionId: string | number) {}\r\n}\r\n","import type { StateContext } from '@ngxs/store';\r\n\r\nexport interface LoadingStateShape<L extends string = string> {\r\n loadingActive: L[];\r\n errors: Partial<Record<L, string>>;\r\n}\r\n\r\ntype LoadingName<T extends LoadingStateShape<string>> =\r\n T['loadingActive'][number];\r\n\r\nexport function startLoading<T extends LoadingStateShape<string>>(\r\n ctx: StateContext<T>,\r\n loadingName: LoadingName<T>,\r\n): void {\r\n const { loadingActive, errors } = ctx.getState();\r\n\r\n if (!loadingActive.includes(loadingName)) {\r\n ctx.patchState({\r\n loadingActive: [...loadingActive, loadingName],\r\n } as Partial<T>);\r\n }\r\n\r\n if (errors && errors[loadingName]) {\r\n const { [loadingName]: _removed, ...rest } = errors;\r\n ctx.patchState({ errors: rest } as Partial<T>);\r\n }\r\n}\r\n\r\nexport function endLoading<T extends LoadingStateShape<string>>(\r\n ctx: StateContext<T>,\r\n loadingName: LoadingName<T>,\r\n): void {\r\n const { loadingActive } = ctx.getState();\r\n\r\n ctx.patchState({\r\n loadingActive: loadingActive.filter((name) => name !== loadingName),\r\n } as Partial<T>);\r\n}\r\n\r\nexport function setLoadingError<T extends LoadingStateShape<string>>(\r\n ctx: StateContext<T>,\r\n loadingName: LoadingName<T>,\r\n message: string,\r\n): void {\r\n const { errors } = ctx.getState();\r\n ctx.patchState({\r\n errors: { ...errors, [loadingName]: message },\r\n } as Partial<T>);\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { Action, Selector, State, StateContext } from '@ngxs/store';\r\nimport { of } from 'rxjs';\r\nimport { catchError, finalize, tap } from 'rxjs/operators';\r\n\r\nimport {\r\n endLoading,\r\n setLoadingError,\r\n startLoading,\r\n} from '../utils/state-helpers';\r\n\r\nimport type {\r\n ConnectionResponse,\r\n FormulaProperty,\r\n GroupDefinition,\r\n PublishResponse,\r\n RoleDefinition,\r\n StepResponse,\r\n StepSchema,\r\n EscalationConnection,\r\n EscalationLoadingName,\r\n EscalationSchema,\r\n EscalationStateModel,\r\n EscalationStepSchema,\r\n} from './escalation.model';\r\nimport {\r\n CreateConnection,\r\n CreateStep,\r\n DeleteConnection,\r\n DeleteStep,\r\n GetFormulaProperties,\r\n GetGroups,\r\n GetRolesForModule,\r\n GetStep,\r\n GetEscalation,\r\n PublishEscalation,\r\n UpdateConnection,\r\n UpdateStep,\r\n ValidateFlow,\r\n SetModuleInfo,\r\n} from './escalation.actions';\r\nimport { Response } from './api.model';\r\n\r\nconst DEFAULT_STATE: EscalationStateModel = {\r\n moduleType: null,\r\n moduleId: null,\r\n escalation: null,\r\n formulaProperties: [],\r\n groups: [],\r\n roles: [],\r\n selectedStep: null,\r\n isFlowValid: null,\r\n loadingActive: [],\r\n errors: {},\r\n};\r\n\r\n@State<EscalationStateModel>({\r\n name: 'escalation',\r\n defaults: DEFAULT_STATE,\r\n})\r\n@Injectable()\r\nexport class EscalationState {\r\n private readonly http = inject(HttpClient);\r\n private readonly baseUrl = 'EscalationSchemas';\r\n private readonly groupsUrl = 'identity/Groups';\r\n private readonly rolesUrl = 'identity/roles/scopes';\r\n\r\n @Selector()\r\n static moduleId(state: EscalationStateModel): string | number | null {\r\n return state.moduleId;\r\n }\r\n\r\n @Selector()\r\n static moduleType(state: EscalationStateModel): string | null {\r\n return state.moduleType;\r\n }\r\n\r\n @Selector()\r\n static escalation(state: EscalationStateModel): EscalationSchema | null {\r\n return state.escalation;\r\n }\r\n\r\n @Selector()\r\n static formulaProperties(state: EscalationStateModel): FormulaProperty[] {\r\n return state.formulaProperties;\r\n }\r\n\r\n @Selector()\r\n static groups(state: EscalationStateModel): GroupDefinition[] {\r\n return state.groups;\r\n }\r\n\r\n @Selector()\r\n static roles(state: EscalationStateModel): RoleDefinition[] {\r\n return state.roles;\r\n }\r\n\r\n @Selector()\r\n static selectedStep(state: EscalationStateModel): StepSchema | null {\r\n return state.selectedStep;\r\n }\r\n\r\n @Selector()\r\n static isFlowValid(state: EscalationStateModel): boolean | null {\r\n return state.isFlowValid;\r\n }\r\n\r\n @Selector()\r\n static stepsSchema(state: EscalationStateModel): EscalationStepSchema[] {\r\n return state.escalation?.stepsSchema ?? [];\r\n }\r\n\r\n @Selector()\r\n static connections(state: EscalationStateModel): EscalationConnection[] {\r\n return state.escalation?.connections ?? [];\r\n }\r\n\r\n @Selector()\r\n static isLoadingFactory(state: EscalationStateModel) {\r\n return (loadingName: EscalationLoadingName) =>\r\n state.loadingActive.includes(loadingName);\r\n }\r\n\r\n @Selector()\r\n static errorFactory(state: EscalationStateModel) {\r\n return (loadingName: EscalationLoadingName) =>\r\n state.errors?.[loadingName] ?? null;\r\n }\r\n\r\n @Action(SetModuleInfo)\r\n setModuleInfo(\r\n ctx: StateContext<EscalationStateModel>,\r\n action: SetModuleInfo,\r\n ) {\r\n let parentPath = '';\r\n if (action.parentModuleType && action.parentModuleId) {\r\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\r\n } else if (action.parentPath) {\r\n parentPath = action.parentPath;\r\n }\r\n ctx.patchState({\r\n moduleType: action.moduleType,\r\n moduleId: action.moduleId,\r\n parentModuleType: action.parentModuleType ?? null,\r\n parentModuleId: action.parentModuleId ?? null,\r\n parentPath: parentPath ?? '',\r\n });\r\n }\r\n @Action(GetEscalation)\r\n getEscalation(\r\n ctx: StateContext<EscalationStateModel>,\r\n _action: GetEscalation,\r\n ) {\r\n startLoading(ctx, 'getEscalation');\r\n\r\n const state = ctx.getState();\r\n const { moduleId, parentPath, moduleType } = state;\r\n\r\n if (!moduleId) {\r\n const message = 'Module ID is not set';\r\n setLoadingError(ctx, 'getEscalation', message);\r\n endLoading(ctx, 'getEscalation');\r\n return of(null);\r\n }\r\n\r\n return this.http\r\n .get<Response<EscalationSchema>>(\r\n `${this.baseUrl}${parentPath}/${moduleType}/${moduleId}`,\r\n {\r\n params: { Mode: 'edit' },\r\n },\r\n )\r\n .pipe(\r\n tap((response) => {\r\n const escalation = response?.data ?? null;\r\n ctx.patchState({ escalation });\r\n }),\r\n catchError((error) => {\r\n const message =\r\n error?.error?.message ??\r\n error?.message ??\r\n 'Failed to load escalation';\r\n setLoadingError(ctx, 'getEscalation', message);\r\n return of(null);\r\n }),\r\n finalize(() => endLoading(ctx, 'getEscalation')),\r\n );\r\n }\r\n\r\n @Action(GetFormulaProperties)\r\n getFormulaProperties(\r\n ctx: StateContext<EscalationStateModel>,\r\n _action: GetFormulaProperties,\r\n ) {\r\n startLoading(ctx, 'getFormulaProperties');\r\n\r\n const state = ctx.getState();\r\n const moduleId = state.moduleId;\r\n\r\n if (!moduleId) {\r\n const message = 'Module ID is not set';\r\n setLoadingError(ctx, 'getFormulaProperties', message);\r\n endLoading(ctx, 'getFormulaProperties');\r\n return of(null);\r\n }\r\n\r\n return this.http\r\n .get<\r\n Response<FormulaProperty[]>\r\n >(`${this.baseUrl}/processFormulaProperties/${moduleId}`)\r\n .pipe(\r\n tap((response) => {\r\n const formulaProperties = Array.isArray(response?.data)\r\n ? response.data\r\n : [];\r\n ctx.patchState({ formulaProperties });\r\n }),\r\n catchError((error) => {\r\n const message =\r\n error?.error?.message ??\r\n error?.message ??\r\n 'Failed to load formula properties';\r\n setLoadingError(ctx, 'getFormulaProperties', message);\r\n return of([]);\r\n }),\r\n finalize(() => endLoading(ctx, 'getFormulaProperties')),\r\n );\r\n }\r\n\r\n @Action(GetGroups)\r\n getGroups(ctx: StateContext<EscalationStateModel>, _action: GetGroups) {\r\n const state = ctx.getState();\r\n if (state.groups.length) {\r\n return of(state.groups);\r\n }\r\n\r\n startLoading(ctx, 'getGroups');\r\n\r\n return this.http.get<Response<GroupDefinition[]>>(this.groupsUrl).pipe(\r\n tap((response) => {\r\n const groups = Array.isArray(response?.data) ? response.data : [];\r\n ctx.patchState({ groups });\r\n }),\r\n catchError((error) => {\r\n const message =\r\n error?.error?.message ?? error?.message ?? 'Failed to load groups';\r\n setLoadingError(ctx, 'getGroups', message);\r\n return of([]);\r\n }),\r\n finalize(() => endLoading(ctx, 'getGroups')),\r\n );\r\n }\r\n\r\n @Action(GetRolesForModule)\r\n getRolesForModule(\r\n ctx: StateContext<EscalationStateModel>,\r\n _action: GetRolesForModule,\r\n ) {\r\n const state = ctx.getState();\r\n const { moduleType, moduleId } = state;\r\n\r\n if (!moduleType || !moduleId) {\r\n const message = 'Module type and module ID must be set';\r\n setLoadingError(ctx, 'getRolesForModule', message);\r\n return of([]);\r\n }\r\n\r\n startLoading(ctx, 'getRolesForModule');\r\n\r\n return this.http\r\n .get<Response<RoleDefinition[]>>(\r\n `${this.rolesUrl}/${moduleType}/${moduleId}`,\r\n {\r\n params: { inherited: 'true' },\r\n },\r\n )\r\n .pipe(\r\n tap((response) => {\r\n const roles = Array.isArray(response?.data) ? response.data : [];\r\n ctx.patchState({ roles });\r\n }),\r\n catchError((error) => {\r\n const message =\r\n error?.error?.message ?? error?.message ?? 'Failed to load roles';\r\n setLoadingError(ctx, 'getRolesForModule', message);\r\n return of([]);\r\n }),\r\n finalize(() => endLoading(ctx, 'getRolesForModule')),\r\n );\r\n }\r\n\r\n @Action(GetStep)\r\n getStep(ctx: StateContext<EscalationStateModel>, action: GetStep) {\r\n startLoading(ctx, 'getStep');\r\n\r\n return this.http\r\n .get<Response<StepSchema>>(`${this.baseUrl}/step/${action.stepId}`, {\r\n params: { Mode: 'edit' },\r\n })\r\n .pipe(\r\n tap((response) => {\r\n const selectedStep = response?.data ?? null;\r\n ctx.patchState({ selectedStep });\r\n }),\r\n catchError((error) => {\r\n const message =\r\n error?.error?.message ?? error?.message ?? 'Failed to load step';\r\n setLoadingError(ctx, 'getStep', message);\r\n return of(null);\r\n }),\r\n finalize(() => endLoading(ctx, 'getStep')),\r\n );\r\n }\r\n\r\n @Action(ValidateFlow)\r\n validateFlow(ctx: StateContext<EscalationStateModel>, _action: ValidateFlow) {\r\n startLoading(ctx, 'validateFlow');\r\n\r\n const state = ctx.getState();\r\n const { moduleId, parentPath, moduleType } = state;\r\n\r\n if (!moduleId) {\r\n const message = 'Escalation ID is not set';\r\n setLoadingError(ctx, 'validateFlow', message);\r\n endLoading(ctx, 'validateFlow');\r\n return of(null);\r\n }\r\n\r\n return this.http\r\n .get<\r\n Response<boolean>\r\n >(`${this.baseUrl}/requestSchema${parentPath}/${moduleType}/${moduleId}/validity`)\r\n .pipe(\r\n tap((response) => {\r\n const isFlowValid = response?.data ?? null;\r\n ctx.patchState({ isFlowValid });\r\n }),\r\n catchError((error) => {\r\n const message =\r\n error?.error?.message ??\r\n error?.message ??\r\n 'Failed to validate flow';\r\n setLoadingError(ctx, 'validateFlow', message);\r\n return of(null);\r\n }),\r\n finalize(() => endLoading(ctx, 'validateFlow')),\r\n );\r\n }\r\n\r\n @Action(CreateStep)\r\n createStep(ctx: StateContext<EscalationStateModel>, action: CreateStep) {\r\n const state = ctx.getState();\r\n const escalationId = state.escalation?.id;\r\n\r\n if (!escalationId) {\r\n const message = 'Escalation ID is not set';\r\n setLoadingError(ctx, 'createStep', message);\r\n return of(null);\r\n }\r\n\r\n const tempId = -Date.now();\r\n const tempStep: any = {\r\n ...action.payload,\r\n id: tempId,\r\n loading: true,\r\n };\r\n\r\n if (state.escalation) {\r\n ctx.patchState({\r\n escalation: {\r\n ...state.escalation,\r\n stepsSchema: [...state.escalation.stepsSchema, tempStep],\r\n },\r\n });\r\n }\r\n\r\n startLoading(ctx, 'createStep');\r\n\r\n return this.http\r\n .post<\r\n Response<StepResponse>\r\n >(`${this.baseUrl}/${escalationId}/steps`, action.payload)\r\n .pipe(\r\n tap((response) => {\r\n const createdStep = response?.data;\r\n const currentState = ctx.getState();\r\n if (createdStep && currentState.escalation) {\r\n const updatedSteps = currentState.escalation.stepsSchema.map(\r\n (step) =>\r\n step.id === tempId ? { ...createdStep, loading: false } : step,\r\n );\r\n\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n stepsSchema: updatedSteps,\r\n },\r\n });\r\n }\r\n }),\r\n catchError((error) => {\r\n const currentState = ctx.getState();\r\n if (currentState.escalation) {\r\n const filteredSteps = currentState.escalation.stepsSchema.filter(\r\n (step) => step.id !== tempId,\r\n );\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n stepsSchema: filteredSteps,\r\n },\r\n });\r\n }\r\n\r\n const message =\r\n error?.error?.message ?? error?.message ?? 'Failed to create step';\r\n setLoadingError(ctx, 'createStep', message);\r\n return of(null);\r\n }),\r\n finalize(() => endLoading(ctx, 'createStep')),\r\n );\r\n }\r\n\r\n @Action(UpdateStep)\r\n updateStep(ctx: StateContext<EscalationStateModel>, action: UpdateStep) {\r\n const state = ctx.getState();\r\n const moduleId = state.moduleId;\r\n\r\n if (!moduleId) {\r\n const message = 'Escalation ID is not set';\r\n setLoadingError(ctx, 'updateStep', message);\r\n return of(null);\r\n }\r\n\r\n if (state.escalation) {\r\n const updatedSteps = state.escalation.stepsSchema.map((step) =>\r\n step.id === action.stepId ? { ...step, loading: true } : step,\r\n );\r\n ctx.patchState({\r\n escalation: {\r\n ...state.escalation,\r\n stepsSchema: updatedSteps,\r\n },\r\n });\r\n }\r\n\r\n startLoading(ctx, 'updateStep');\r\n\r\n return this.http\r\n .put<\r\n Response<StepResponse>\r\n >(`${this.baseUrl}/steps/${action.stepId}`, action.payload)\r\n .pipe(\r\n tap((response) => {\r\n const updatedStep = response?.data;\r\n const currentState = ctx.getState();\r\n if (updatedStep && currentState.escalation) {\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n stepsSchema: currentState.escalation.stepsSchema.map((step) =>\r\n step.id === updatedStep.id\r\n ? { ...updatedStep, loading: false }\r\n : step,\r\n ),\r\n },\r\n });\r\n }\r\n }),\r\n catchError((error) => {\r\n const currentState = ctx.getState();\r\n if (currentState.escalation) {\r\n const errorSteps = currentState.escalation.stepsSchema.map(\r\n (step) =>\r\n step.id === action.stepId ? { ...step, loading: false } : step,\r\n );\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n stepsSchema: errorSteps,\r\n },\r\n });\r\n }\r\n\r\n const message =\r\n error?.error?.message ?? error?.message ?? 'Failed to update step';\r\n setLoadingError(ctx, 'updateStep', message);\r\n return of(null);\r\n }),\r\n finalize(() => endLoading(ctx, 'updateStep')),\r\n );\r\n }\r\n\r\n @Action(CreateConnection)\r\n createConnection(\r\n ctx: StateContext<EscalationStateModel>,\r\n action: CreateConnection,\r\n ) {\r\n const state = ctx.getState();\r\n const escalationId = state.escalation?.id;\r\n\r\n if (!escalationId) {\r\n const message = 'Escalation ID is not set';\r\n setLoadingError(ctx, 'createConnection', message);\r\n return of(null);\r\n }\r\n\r\n const tempId = -Date.now();\r\n const tempConnection: any = {\r\n ...action.payload,\r\n id: tempId,\r\n loading: true,\r\n source: action.payload.sourceStepId,\r\n target: action.payload.targetStepId,\r\n };\r\n\r\n if (state.escalation) {\r\n ctx.patchState({\r\n escalation: {\r\n ...state.escalation,\r\n connections: [...state.escalation.connections, tempConnection],\r\n },\r\n });\r\n }\r\n\r\n startLoading(ctx, 'createConnection');\r\n\r\n return this.http\r\n .post<\r\n Response<ConnectionResponse>\r\n >(`${this.baseUrl}/${escalationId}/connections`, action.payload)\r\n .pipe(\r\n tap((response) => {\r\n const createdConnection = response?.data;\r\n const currentState = ctx.getState();\r\n if (createdConnection && currentState.escalation) {\r\n const updatedConnections = currentState.escalation.connections.map(\r\n (conn) =>\r\n conn.id === tempId\r\n ? { ...createdConnection, loading: false }\r\n : conn,\r\n );\r\n\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n connections: updatedConnections,\r\n },\r\n });\r\n }\r\n }),\r\n catchError((error) => {\r\n const currentState = ctx.getState();\r\n if (currentState.escalation) {\r\n const filteredConnections =\r\n currentState.escalation.connections.filter(\r\n (conn) => conn.id !== tempId,\r\n );\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n connections: filteredConnections,\r\n },\r\n });\r\n }\r\n\r\n const message =\r\n error?.error?.message ??\r\n error?.message ??\r\n 'Failed to create connection';\r\n setLoadingError(ctx, 'createConnection', message);\r\n return of(null);\r\n }),\r\n finalize(() => endLoading(ctx, 'createConnection')),\r\n );\r\n }\r\n\r\n @Action(UpdateConnection)\r\n updateConnection(\r\n ctx: StateContext<EscalationStateModel>,\r\n action: UpdateConnection,\r\n ) {\r\n const state = ctx.getState();\r\n const moduleId = state.moduleId;\r\n\r\n if (!moduleId) {\r\n const message = 'Escalation ID is not set';\r\n setLoadingError(ctx, 'updateConnection', message);\r\n return of(null);\r\n }\r\n\r\n if (state.escalation) {\r\n const updatedConnections = state.escalation.connections.map((conn) =>\r\n conn.id === action.connectionId ? { ...conn, loading: true } : conn,\r\n );\r\n ctx.patchState({\r\n escalation: {\r\n ...state.escalation,\r\n connections: updatedConnections,\r\n },\r\n });\r\n }\r\n\r\n startLoading(ctx, 'updateConnection');\r\n\r\n return this.http\r\n .put<\r\n Response<ConnectionResponse>\r\n >(`${this.baseUrl}/connections/${action.connectionId}`, action.payload)\r\n .pipe(\r\n tap((response) => {\r\n const updatedConnection = response?.data;\r\n const currentState = ctx.getState();\r\n if (updatedConnection && currentState.escalation) {\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n connections: currentState.escalation.connections.map((conn) =>\r\n conn.id === updatedConnection.id\r\n ? { ...updatedConnection, loading: false }\r\n : conn,\r\n ),\r\n },\r\n });\r\n }\r\n }),\r\n catchError((error) => {\r\n const currentState = ctx.getState();\r\n if (currentState.escalation) {\r\n const errorConnections = currentState.escalation.connections.map(\r\n (conn) =>\r\n conn.id === action.connectionId\r\n ? { ...conn, loading: false }\r\n : conn,\r\n );\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n connections: errorConnections,\r\n },\r\n });\r\n }\r\n\r\n const message =\r\n error?.error?.message ??\r\n error?.message ??\r\n 'Failed to update connection';\r\n setLoadingError(ctx, 'updateConnection', message);\r\n return of(null);\r\n }),\r\n finalize(() => endLoading(ctx, 'updateConnection')),\r\n );\r\n }\r\n\r\n @Action(PublishEscalation)\r\n publishEscalation(\r\n ctx: StateContext<EscalationStateModel>,\r\n action: PublishEscalation,\r\n ) {\r\n startLoading(ctx, 'publishEscalation');\r\n\r\n const state = ctx.getState();\r\n const escalationId = state.escalation?.id;\r\n\r\n if (!escalationId) {\r\n const message = 'Escalation ID is not set';\r\n setLoadingError(ctx, 'publishEscalation', message);\r\n endLoading(ctx, 'publishEscalation');\r\n return of(null);\r\n }\r\n\r\n return this.http\r\n .put<\r\n Response<PublishResponse>\r\n >(`${this.baseUrl}/${escalationId}/publish`, { IsPublished: action.isPublished })\r\n .pipe(\r\n tap((response) => {\r\n const publishedData = response?.data;\r\n if (publishedData && state.escalation) {\r\n ctx.patchState({\r\n escalation: {\r\n ...state.escalation,\r\n isPublished: publishedData.isPublished,\r\n isValid: publishedData.isValid,\r\n },\r\n });\r\n }\r\n }),\r\n catchError((error) => {\r\n const message =\r\n error?.error?.message ??\r\n error?.message ??\r\n 'Failed to publish escalation';\r\n setLoadingError(ctx, 'publishEscalation', message);\r\n return of(null);\r\n }),\r\n finalize(() => endLoading(ctx, 'publishEscalation')),\r\n );\r\n }\r\n\r\n @Action(DeleteStep)\r\n deleteStep(ctx: StateContext<EscalationStateModel>, action: DeleteStep) {\r\n const state = ctx.getState();\r\n\r\n if (state.escalation) {\r\n const updatedSteps = state.escalation.stepsSchema.map((step) =>\r\n step.id == action.stepId ? { ...step, loading: true } : step,\r\n );\r\n ctx.patchState({\r\n escalation: {\r\n ...state.escalation,\r\n stepsSchema: updatedSteps,\r\n },\r\n });\r\n }\r\n\r\n startLoading(ctx, 'deleteStep');\r\n\r\n return this.http\r\n .delete<Response<boolean>>(`${this.baseUrl}/steps/${action.stepId}`)\r\n .pipe(\r\n tap(() => {\r\n const currentState = ctx.getState();\r\n if (currentState.escalation) {\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n stepsSchema: currentState.escalation.stepsSchema.filter(\r\n (step) => step.id != action.stepId,\r\n ),\r\n },\r\n });\r\n }\r\n }),\r\n catchError((error) => {\r\n const currentState = ctx.getState();\r\n if (currentState.escalation) {\r\n const errorSteps = currentState.escalation.stepsSchema.map(\r\n (step) =>\r\n step.id == action.stepId ? { ...step, loading: false } : step,\r\n );\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n stepsSchema: errorSteps,\r\n },\r\n });\r\n }\r\n\r\n const message =\r\n error?.error?.message ?? error?.message ?? 'Failed to delete step';\r\n setLoadingError(ctx, 'deleteStep', message);\r\n return of(null);\r\n }),\r\n finalize(() => endLoading(ctx, 'deleteStep')),\r\n );\r\n }\r\n\r\n @Action(DeleteConnection)\r\n deleteConnection(\r\n ctx: StateContext<EscalationStateModel>,\r\n action: DeleteConnection,\r\n ) {\r\n const state = ctx.getState();\r\n\r\n if (state.escalation) {\r\n const updatedConnections = state.escalation.connections.map((conn) =>\r\n conn.id == action.connectionId ? { ...conn, loading: true } : conn,\r\n );\r\n ctx.patchState({\r\n escalation: {\r\n ...state.escalation,\r\n connections: updatedConnections,\r\n },\r\n });\r\n }\r\n\r\n startLoading(ctx, 'deleteConnection');\r\n\r\n return this.http\r\n .delete<\r\n Response<boolean>\r\n >(`${this.baseUrl}/connections/${action.connectionId}`)\r\n .pipe(\r\n tap(() => {\r\n const currentState = ctx.getState();\r\n if (currentState.escalation) {\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n connections: currentState.escalation.connections.filter(\r\n (conn) => conn.id != action.connectionId,\r\n ),\r\n },\r\n });\r\n }\r\n }),\r\n catchError((error) => {\r\n const currentState = ctx.getState();\r\n if (currentState.escalation) {\r\n const errorConnections = currentState.escalation.connections.map(\r\n (conn) =>\r\n conn.id == action.connectionId\r\n ? { ...conn, loading: false }\r\n : conn,\r\n );\r\n ctx.patchState({\r\n escalation: {\r\n ...currentState.escalation,\r\n connections: errorConnections,\r\n },\r\n });\r\n }\r\n\r\n const message =\r\n error?.error?.message ??\r\n error?.message ??\r\n 'Failed to delete connection';\r\n setLoadingError(ctx, 'deleteConnection', message);\r\n return of(null);\r\n }),\r\n finalize(() => endLoading(ctx, 'deleteConnection')),\r\n );\r\n }\r\n}\r\n","import { Injectable, computed, inject } from '@angular/core';\r\nimport { select, Store } from '@ngxs/store';\r\nimport type { Observable } from 'rxjs';\r\n\r\nimport type {\r\n ConnectionPayload,\r\n FormulaProperty,\r\n GroupDefinition,\r\n RoleDefinition,\r\n StepPayload,\r\n StepSchema,\r\n EscalationConnection,\r\n EscalationLoadingName,\r\n EscalationSchema,\r\n EscalationStepSchema,\r\n} from './escalation.model';\r\nimport {\r\n CreateConnection,\r\n CreateStep,\r\n DeleteConnection,\r\n DeleteStep,\r\n GetFormulaProperties,\r\n GetGroups,\r\n GetRolesForModule,\r\n GetStep,\r\n GetEscalation,\r\n PublishEscalation,\r\n UpdateConnection,\r\n UpdateStep,\r\n ValidateFlow,\r\n SetModuleInfo,\r\n} from './escalation.actions';\r\nimport { EscalationState } from './escalation.state';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class EscalationFacade {\r\n private readonly store = inject(Store);\r\n\r\n readonly moduleType = select<string | null>(EscalationState.moduleType);\r\n readonly moduleId = select<string | number | null>(EscalationState.moduleId);\r\n readonly escalation = select<EscalationSchema | null>(\r\n EscalationState.escalation,\r\n );\r\n readonly formulaProperties = select<FormulaProperty[]>(\r\n EscalationState.formulaProperties,\r\n );\r\n readonly groups = select<GroupDefinition[]>(EscalationState.groups);\r\n readonly roles = select<RoleDefinition[]>(EscalationState.roles);\r\n readonly selectedStep = select<StepSchema | null>(\r\n EscalationState.selectedStep,\r\n );\r\n readonly isFlowValid = select<boolean | null>(EscalationState.isFlowValid);\r\n readonly steps = select<EscalationStepSchema[]>(EscalationState.stepsSchema);\r\n readonly connections = select<EscalationConnection[]>(\r\n EscalationState.connections,\r\n );\r\n\r\n isLoading(loadingName: EscalationLoadingName) {\r\n const loadingFactory = select<(name: EscalationLoadingName) => boolean>(\r\n EscalationState.isLoadingFactory,\r\n );\r\n return computed(() => loadingFactory()(loadingName));\r\n }\r\n\r\n error(loadingName: EscalationLoadingName) {\r\n const errorFactory = select<(name: EscalationLoadingName) => string | null>(\r\n EscalationState.errorFactory,\r\n );\r\n return computed(() => errorFactory()(loadingName));\r\n }\r\n\r\n setModuleInfo(\r\n moduleType: string,\r\n moduleId: string | number,\r\n parentModuleType?: string,\r\n parentModuleId?: string | number,\r\n parentPath?: string,\r\n ): Observable<unknown> {\r\n return this.store.dispatch(\r\n new SetModuleInfo(\r\n moduleType,\r\n moduleId,\r\n parentModuleType,\r\n parentModuleId,\r\n parentPath,\r\n ),\r\n );\r\n }\r\n\r\n loadEscalation(): Observable<unknown> {\r\n return this.store.dispatch(new GetEscalation());\r\n }\r\n\r\n loadFormulaProperties(): Observable<unknown> {\r\n return this.store.dispatch(new GetFormulaProperties());\r\n }\r\n\r\n loadGroups(): Observable<unknown> {\r\n return this.store.dispatch(new GetGroups());\r\n }\r\n\r\n loadRolesForModule(): Observable<unknown> {\r\n return this.store.dispatch(new GetRolesForModule());\r\n }\r\n\r\n loadStep(stepId: string | number): Observable<unknown> {\r\n return this.store.dispatch(new GetStep(stepId));\r\n }\r\n\r\n validateFlow(): Observable<unknown> {\r\n return this.store.dispatch(new ValidateFlow());\r\n }\r\n\r\n createStep(payload: StepPayload): Observable<unknown> {\r\n return this.store.dispatch(new CreateStep(payload));\r\n }\r\n\r\n updateStep(\r\n stepId: string | number,\r\n payload: StepPayload,\r\n ): Observable<unknown> {\r\n return this.store.dispatch(new UpdateStep(stepId, payload));\r\n }\r\n\r\n createConnection(payload: ConnectionPayload): Observable<unknown> {\r\n return this.store.dispatch(new CreateConnection(payload));\r\n }\r\n\r\n updateConnection(\r\n connectionId: string | number,\r\n payload: ConnectionPayload,\r\n ): Observable<unknown> {\r\n return this.store.dispatch(new UpdateConnection(connectionId, payload));\r\n }\r\n\r\n publishEscalation(isPublished: boolean): Observable<unknown> {\r\n return this.store.dispatch(new PublishEscalation(isPublished));\r\n }\r\n\r\n deleteStep(stepId: string | number): Observable<unknown> {\r\n return this.store.dispatch(new DeleteStep(stepId));\r\n }\r\n\r\n deleteConnection(connectionId: string | number): Observable<unknown> {\r\n return this.store.dispatch(new DeleteConnection(connectionId));\r\n }\r\n}\r\n","// shared/models/api.model.ts\r\n\r\nexport interface Response<T> {\r\n endpoint: string;\r\n status: number;\r\n code: number;\r\n locale: string;\r\n message?: string | null;\r\n errors?: any | null;\r\n data: T;\r\n cacheSession?: string;\r\n}\r\n","import {\r\n Component,\r\n inject,\r\n linkedSignal,\r\n signal,\r\n computed,\r\n effect,\r\n} from '@angular/core';\r\nimport { DynamicFormConfig } from '@masterteam/components';\r\nimport {\r\n NodeActionEvent,\r\n SBAction,\r\n StructureBuilder,\r\n} from '@masterteam/structure-builder';\r\nimport { EscalationFacade } from '../../store/escalation';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\r\nimport { Skeleton } from 'primeng/skeleton';\r\nimport { TranslocoModule, TranslocoService } from '@jsverse/transloco';\r\nimport { ConfirmationService } from '@masterteam/components/confirmation';\r\nimport { EscalationStepSchema } from '../../store/escalation';\r\n\r\n@Component({\r\n selector: 'mt-escalation-builder',\r\n imports: [\r\n StructureBuilder,\r\n ReactiveFormsModule,\r\n DynamicForm,\r\n Skeleton,\r\n TranslocoModule,\r\n ],\r\n templateUrl: './escalation-builder.html',\r\n styles: [],\r\n host: {},\r\n})\r\nexport class EscalationBuilder {\r\n private escalationFacade = inject(EscalationFacade);\r\n private transloco = inject(TranslocoService);\r\n groups = this.escalationFacade.groups;\r\n roles = this.escalationFacade.roles;\r\n escalation = this.escalationFacade.escalation;\r\n loading = this.escalationFacade.isLoading('getEscalation');\r\n loadingStep = this.escalationFacade.isLoading('getStep');\r\n private readonly confirmationService = inject(ConfirmationService);\r\n\r\n selectedStep = this.escalationFacade.selectedStep;\r\n\r\n nodeFields = signal<any>({\r\n name: 'name',\r\n });\r\n nodeFormControl = new FormControl();\r\n\r\n private isEditingInitialNode = signal<boolean>(false);\r\n\r\n availableNodes = [\r\n {\r\n id: 'FormStep',\r\n label: this.transloco.translate('escalation.builder.newStep'),\r\n name: {\r\n en: 'New Step',\r\n ar: ' خطوة جديدة',\r\n },\r\n targetType: '1',\r\n icon: 'general.plus-circle',\r\n color: '#000000',\r\n },\r\n ];\r\n\r\n // Base form sections - defined once for reusability\r\n private readonly baseNameFields = {\r\n key: 'settings',\r\n type: 'none',\r\n bodyClass: 'space-y-2',\r\n fields: [\r\n {\r\n key: 'name.en',\r\n label: this.transloco.translate('escalation.builder.nameEnglish'),\r\n placeholder: this.transloco.translate(\r\n 'escalation.builder.enterNameEnglish',\r\n ),\r\n cssClass: 'w-full',\r\n required: true,\r\n },\r\n {\r\n key: 'name.ar',\r\n label: this.transloco.translate('escalation.builder.nameArabic'),\r\n placeholder: this.transloco.translate(\r\n 'escalation.builder.enterNameArabic',\r\n ),\r\n cssClass: 'w-full',\r\n required: true,\r\n },\r\n ],\r\n };\r\n\r\n // Approver section with dynamic options\r\n private readonly approverSection = computed(() => ({\r\n key: 'approver',\r\n type: 'header',\r\n label: this.transloco.translate('escalation.builder.approver'),\r\n headerClass:\r\n 'rounded-t-xl bg-slate-50 px-4 py-3 text-sm font-semibold text-slate-900 border border-slate-200 border-b-0',\r\n bodyClass: 'rounded-b-xl border border-slate-200 p-4 space-y-3',\r\n cssClass: ' ',\r\n fields: [\r\n {\r\n key: 'targetType',\r\n type: 'radio-button',\r\n orientation: 'horizontal',\r\n defaultValue: '1',\r\n options: [\r\n {\r\n label: this.transloco.translate('escalation.builder.group'),\r\n value: '1',\r\n },\r\n {\r\n label: this.transloco.translate('escalation.builder.role'),\r\n value: '2',\r\n },\r\n ],\r\n optionLabel: 'name',\r\n optionValue: 'value',\r\n placeholder: 'Enter Role',\r\n cssClass: 'flex items-center gap-6 text-sm text-slate-700',\r\n required: true,\r\n },\r\n {\r\n key: 'group',\r\n label: 'Select',\r\n placeholder: this.transloco.translate('escalation.builder.selectGroup'),\r\n cssClass: 'mt-2 pt-3 border-t border-slate-200 w-full',\r\n required: true,\r\n type: 'select',\r\n options: this.groups(),\r\n optionLabel: 'name',\r\n optionValue: 'id',\r\n relations: [{ key: 'targetType', value: '1', action: 'show' }],\r\n },\r\n {\r\n key: 'role',\r\n label: 'Select',\r\n placeholder: 'Enter target value',\r\n cssClass: 'mt-2 pt-3 border-t border-slate-200 w-full',\r\n required: true,\r\n type: 'select',\r\n options: this.roles(),\r\n optionLabel: 'name',\r\n optionValue: 'id',\r\n relations: [{ key: 'targetType', value: '2', action: 'show' }],\r\n },\r\n ],\r\n }));\r\n\r\n private readonly slaSection = {\r\n key: 'slaSection',\r\n type: 'none',\r\n bodyClass: 'space-y-1',\r\n fields: [\r\n {\r\n key: 'sla',\r\n label: 'SLA',\r\n placeholder: 'Enter SLA',\r\n cssClass: 'w-full',\r\n required: true,\r\n },\r\n ],\r\n } as const;\r\n\r\n // Dynamic form configuration using linkedSignal\r\n // Automatically rebuilds when isEditingInitialNode changes\r\n nodeForm = linkedSignal<DynamicFormConfig>(() => {\r\n const sections: any[] = [this.baseNameFields];\r\n\r\n // Conditionally include approver and SLA sections based on isEditingInitialNode\r\n // Initial nodes only show name fields\r\n if (!this.isEditingInitialNode()) {\r\n sections.push(this.approverSection());\r\n sections.push(this.slaSection);\r\n }\r\n\r\n return {\r\n sections,\r\n layout: {},\r\n };\r\n });\r\n\r\n // Sample connection form configuration\r\n connectionForm = signal<DynamicFormConfig>({\r\n sections: [\r\n {\r\n key: 'basic',\r\n label: 'Basic Information',\r\n type: 'none',\r\n cssClass: 'p-4',\r\n order: 1,\r\n fields: [\r\n {\r\n key: 'priority',\r\n label: 'Priority',\r\n },\r\n ],\r\n },\r\n ],\r\n });\r\n\r\n // Nodes currently in the flow\r\n steps = computed(() => {\r\n return this.escalationFacade.steps().map((step) => ({\r\n ...step,\r\n color: '#000000',\r\n }));\r\n });\r\n\r\n // Connections between nodes\r\n connections = computed(() => {\r\n return this.escalationFacade.connections().map((connection) => ({\r\n ...connection,\r\n from: connection.source,\r\n to: connection.target,\r\n }));\r\n });\r\n\r\n // Node Actions\r\n nodeActions = signal([\r\n {\r\n key: 'edit',\r\n icon: 'general.edit-05',\r\n variant: 'outlined',\r\n size: 'small',\r\n tooltip: 'Edit',\r\n },\r\n {\r\n key: 'delete',\r\n icon: 'general.trash-01',\r\n variant: 'outlined',\r\n size: 'small',\r\n severity: 'danger',\r\n tooltip: 'Delete',\r\n condition: (node: EscalationStepSchema) => !node.isInitial,\r\n },\r\n ]);\r\n\r\n constructor() {\r\n // Effect to watch selectedStep and patch form when it changes\r\n effect(() => {\r\n const step = this.selectedStep();\r\n\r\n if (step) {\r\n // Patch form with complete step data\r\n this.nodeFormControl.patchValue({\r\n name: step.name,\r\n targetType: step.targetType || '1',\r\n group: step.targetType === '1' ? parseInt(step.targetValue!) : null,\r\n role: step.targetType === '2' ? step.targetValue : null,\r\n sla: step.sla,\r\n });\r\n\r\n console.log('Form patched with step data:', step);\r\n }\r\n });\r\n }\r\n\r\n onNodeActionsEvent(event: NodeActionEvent) {\r\n console.log('Node action event:', event);\r\n }\r\n\r\n clearForm(): void {\r\n // Reset isEditingInitialNode flag\r\n this.isEditingInitialNode.set(false);\r\n\r\n // Reset form to default values\r\n this.nodeFormControl.reset({\r\n name: { en: '', ar: '' },\r\n targetType: '1',\r\n group: null,\r\n role: null,\r\n sla: 0,\r\n });\r\n\r\n console.log('Form cleared for new step');\r\n }\r\n\r\n onStructureAction(event: SBAction) {\r\n console.log('Structure action received:', event);\r\n\r\n switch (event.action) {\r\n case 'createNode':\r\n if (event.data) {\r\n // Get form values\r\n const formValue = this.nodeFormControl.value;\r\n\r\n // Prepare step payload without properties\r\n const stepPayload = {\r\n name: formValue.name || { en: 'New Step', ar: 'خطوة جديدة' },\r\n targetType: formValue.targetType,\r\n targetValue:\r\n formValue.targetType === '1' ? formValue.group : formValue.role,\r\n sla: formValue.sla || 0,\r\n };\r\n\r\n // Create step via facade\r\n this.escalationFacade.createStep(stepPayload).subscribe({\r\n next: () => {\r\n console.log('Step created successfully:', stepPayload);\r\n },\r\n error: (error) => {\r\n console.error('Failed to create step:', error);\r\n },\r\n });\r\n }\r\n break;\r\n\r\n case 'startUpdating':\r\n if (event.data) {\r\n this.clearForm();\r\n\r\n const stepId = event.data.id;\r\n\r\n // Set the flag based on whether node is initial\r\n // This will trigger nodeForm to rebuild automatically via linkedSignal\r\n this.isEditingInitialNode.set(!!event.data.isInitial);\r\n\r\n // Load step data\r\n this.escalationFacade.loadStep(stepId);\r\n }\r\n break;\r\n\r\n case 'startCreating':\r\n // Reset form for new step\r\n this.clearForm();\r\n break;\r\n\r\n case 'updateNode':\r\n if (event.data) {\r\n // Get form values\r\n const formValue = this.nodeFormControl.value;\r\n const stepId = event.data.id;\r\n\r\n // Prepare step payload\r\n const stepPayload = {\r\n name: formValue.name || event.data.name,\r\n targetType: formValue.targetType,\r\n targetValue:\r\n formValue.targetType === '1' ? formValue.group : formValue.role,\r\n sla: formValue.sla || event.data.sla,\r\n };\r\n\r\n // Update step via facade\r\n this.escalationFacade.updateStep(stepId, stepPayload).subscribe({\r\n next: () => {\r\n console.log('Step updated successfully:', stepPayload);\r\n },\r\n error: (error) => {\r\n console.error('Failed to update step:', error);\r\n },\r\n });\r\n }\r\n break;\r\n\r\n case 'deleteNode':\r\n if (event.data) {\r\n const nodeIdToDelete = event.data.id;\r\n this.confirmationService.confirmDelete({\r\n type: 'dialog',\r\n\r\n accept: () => {\r\n this.escalationFacade.deleteStep(nodeIdToDelete).subscribe({\r\n next: () => {\r\n console.log('Node deleted:', nodeIdToDelete);\r\n },\r\n error: (error) => {\r\n console.error('Failed to delete node:', error);\r\n },\r\n });\r\n },\r\n reject: () => {},\r\n });\r\n }\r\n break;\r\n\r\n case 'createConnection':\r\n if (event.data) {\r\n // Create connection in store\r\n const connectionPayload = {\r\n sourceStepId: event.data.from,\r\n targetStepId: event.data.to,\r\n priority: event.data.priority ?? 1,\r\n formula: event.data.formula ?? [],\r\n };\r\n this.escalationFacade.createConnection(connectionPayload).subscribe({\r\n next: () => {\r\n console.log('Connection created:', event.data);\r\n },\r\n error: (error) => {\r\n console.error('Failed to create connection:', error);\r\n },\r\n });\r\n }\r\n break;\r\n\r\n case 'updateConnection':\r\n if (event.data) {\r\n // Update connection in store\r\n const connectionId = event.data.id;\r\n const updatePayload = {\r\n sourceStepId: event.data.from,\r\n targetStepId: event.data.to,\r\n priority: event.data.priority ?? 1,\r\n formula: event.data.formula ?? [],\r\n };\r\n this.escalationFacade\r\n .updateConnection(connectionId, updatePayload)\r\n .subscribe({\r\n next: () => {\r\n console.log('Connection updated:', event.data);\r\n },\r\n error: (error) => {\r\n console.error('Failed to update connection:', error);\r\n },\r\n });\r\n }\r\n break;\r\n\r\n case 'deleteConnection':\r\n if (event.data) {\r\n const connectionIdToDelete = event.data.id;\r\n // Delete connection from store\r\n this.escalationFacade\r\n .deleteConnection(connectionIdToDelete)\r\n .subscribe({\r\n next: () => {\r\n console.log('Connection deleted:', connectionIdToDelete);\r\n },\r\n error: (error) => {\r\n console.error('Failed to delete connection:', error);\r\n },\r\n });\r\n }\r\n break;\r\n\r\n default:\r\n console.warn('Unknown structure action:', event.action);\r\n }\r\n }\r\n}\r\n","<div class=\"h-full relative\" id=\"escalationCard\">\r\n @if (!loading()) {\r\n <mt-structure-builder\r\n class=\"flex-1\"\r\n [availableNodes]=\"availableNodes\"\r\n [connectionForm]=\"connectionForm()\"\r\n [nodeActions]=\"nodeActions()\"\r\n (nodeActionsEvent)=\"onNodeActionsEvent($event)\"\r\n [nodes]=\"steps()\"\r\n [connections]=\"connections()\"\r\n (action)=\"onStructureAction($event)\"\r\n [addModalType]=\"'drawer'\"\r\n [addModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\r\n [updateModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\r\n [addModalHeader]=\"'escalation.builder.addStep' | transloco\"\r\n [updateModalHeader]=\"'escalation.builder.editStep' | transloco\"\r\n [appendTo]=\"'escalationCard'\"\r\n [nodeFields]=\"nodeFields()\"\r\n >\r\n <ng-template\r\n #nodeDialog\r\n let-close=\"close\"\r\n let-save=\"save\"\r\n let-node=\"node\"\r\n >\r\n <div class=\"p-4\">\r\n @if (loadingStep()) {\r\n <!-- Loading skeleton -->\r\n <div class=\"space-y-4\">\r\n <!-- Form fields skeleton -->\r\n <div class=\"space-y-4\">\r\n <div>\r\n <p-skeleton\r\n width=\"8rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"8rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"10rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"3rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"6rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n <div>\r\n <p-skeleton\r\n width=\"4rem\"\r\n height=\"1rem\"\r\n styleClass=\"mb-2\"\r\n ></p-skeleton>\r\n <p-skeleton\r\n width=\"100%\"\r\n height=\"2.5rem\"\r\n borderRadius=\"0.5rem\"\r\n ></p-skeleton>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Actual content - just the form, no tabs -->\r\n <mt-dynamic-form\r\n [formConfig]=\"nodeForm()\"\r\n [formControl]=\"nodeFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n </div>\r\n </ng-template>\r\n </mt-structure-builder>\r\n }\r\n</div>\r\n","import { EscalationState } from './escalation/escalation.state';\r\n\r\nexport const ESCALATION_STATES = [EscalationState];\r\n\r\nexport * from './escalation';\r\n","// Re-export app state\r\nexport * from './app.state';\r\n\r\n// Re-export workflow state\r\nexport * from './escalation';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAEa,aAAa,CAAA;AAIN,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,gBAAA;AACA,IAAA,cAAA;AACA,IAAA,UAAA;AAPlB,IAAA,OAAgB,IAAI,GAAG,8BAA8B;IAErD,WAAA,CACkB,UAAkB,EAClB,QAAyB,EACzB,gBAAyB,EACzB,cAAgC,EAChC,UAAmB,EAAA;QAJnB,IAAA,CAAA,UAAU,GAAV,UAAU;QACV,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;QAChB,IAAA,CAAA,cAAc,GAAd,cAAc;QACd,IAAA,CAAA,UAAU,GAAV,UAAU;IACzB;;MAEQ,aAAa,CAAA;AACxB,IAAA,OAAgB,IAAI,GAAG,6BAA6B;;MAGzC,oBAAoB,CAAA;AAC/B,IAAA,OAAgB,IAAI,GAAG,qCAAqC;;MAGjD,SAAS,CAAA;AACpB,IAAA,OAAgB,IAAI,GAAG,yBAAyB;;MAGrC,iBAAiB,CAAA;AAC5B,IAAA,OAAgB,IAAI,GAAG,mCAAmC;;MAG/C,OAAO,CAAA;AAGU,IAAA,MAAA;AAF5B,IAAA,OAAgB,IAAI,GAAG,uBAAuB;AAE9C,IAAA,WAAA,CAA4B,MAAuB,EAAA;QAAvB,IAAA,CAAA,MAAM,GAAN,MAAM;IAAoB;;MAG3C,YAAY,CAAA;AACvB,IAAA,OAAgB,IAAI,GAAG,4BAA4B;;MAGxC,UAAU,CAAA;AAGO,IAAA,OAAA;AAF5B,IAAA,OAAgB,IAAI,GAAG,0BAA0B;AAEjD,IAAA,WAAA,CAA4B,OAAoB,EAAA;QAApB,IAAA,CAA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A,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACnB,WAAW,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACX,QAAQ,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,OAAA,EAAA,WAAA,EAAA,cAAA,EAAA,MAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACR,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAMN,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAb7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,EAAA,OAAA,EACxB;wBACP,gBAAgB;wBAChB,mBAAmB;wBACnB,WAAW;wBACX,QAAQ;wBACR,eAAe;AAChB,qBAAA,EAAA,IAAA,EAGK,EAAE,EAAA,QAAA,EAAA,6uHAAA,EAAA;;;AE/BH,MAAM,iBAAiB,GAAG,CAAC,eAAe;;ACFjD;;ACAA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/escalation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/escalation",
|
|
6
6
|
"linkDirectory": true,
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"tailwindcss": "^4.1.17",
|
|
20
20
|
"tailwindcss-primeui": "^0.6.1",
|
|
21
21
|
"@ngxs/store": "^20.1.0",
|
|
22
|
-
"@masterteam/forms": "^0.0.
|
|
23
|
-
"@masterteam/
|
|
22
|
+
"@masterteam/forms": "^0.0.33",
|
|
23
|
+
"@masterteam/components": "^0.0.76",
|
|
24
24
|
"@masterteam/icons": "^0.0.12",
|
|
25
|
-
"@masterteam/
|
|
25
|
+
"@masterteam/structure-builder": "^0.0.31"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"exports": {
|
|
@@ -7,78 +7,6 @@ import * as rxjs from 'rxjs';
|
|
|
7
7
|
import { Observable } from 'rxjs';
|
|
8
8
|
import { StateContext } from '@ngxs/store';
|
|
9
9
|
|
|
10
|
-
declare class EscalationBuilder {
|
|
11
|
-
private escalationFacade;
|
|
12
|
-
private transloco;
|
|
13
|
-
groups: _angular_core.Signal<_masterteam_escalation.GroupDefinition[]>;
|
|
14
|
-
roles: _angular_core.Signal<_masterteam_escalation.RoleDefinition[]>;
|
|
15
|
-
escalation: _angular_core.Signal<_masterteam_escalation.EscalationSchema | null>;
|
|
16
|
-
loading: _angular_core.Signal<boolean>;
|
|
17
|
-
loadingStep: _angular_core.Signal<boolean>;
|
|
18
|
-
private readonly confirmationService;
|
|
19
|
-
selectedStep: _angular_core.Signal<_masterteam_escalation.StepSchema | null>;
|
|
20
|
-
nodeFields: _angular_core.WritableSignal<any>;
|
|
21
|
-
nodeFormControl: FormControl<any>;
|
|
22
|
-
private isEditingInitialNode;
|
|
23
|
-
availableNodes: {
|
|
24
|
-
id: string;
|
|
25
|
-
label: string;
|
|
26
|
-
name: {
|
|
27
|
-
en: string;
|
|
28
|
-
ar: string;
|
|
29
|
-
};
|
|
30
|
-
targetType: string;
|
|
31
|
-
icon: string;
|
|
32
|
-
color: string;
|
|
33
|
-
}[];
|
|
34
|
-
private readonly baseNameFields;
|
|
35
|
-
private readonly approverSection;
|
|
36
|
-
private readonly slaSection;
|
|
37
|
-
nodeForm: _angular_core.WritableSignal<DynamicFormConfig>;
|
|
38
|
-
connectionForm: _angular_core.WritableSignal<DynamicFormConfig>;
|
|
39
|
-
steps: _angular_core.Signal<{
|
|
40
|
-
color: string;
|
|
41
|
-
id: number;
|
|
42
|
-
name: string | Record<string, string>;
|
|
43
|
-
sla: number;
|
|
44
|
-
isInitial: boolean;
|
|
45
|
-
targetType?: string;
|
|
46
|
-
targetValue?: string;
|
|
47
|
-
loading?: boolean;
|
|
48
|
-
}[]>;
|
|
49
|
-
connections: _angular_core.Signal<{
|
|
50
|
-
from: number;
|
|
51
|
-
to: number;
|
|
52
|
-
id: number;
|
|
53
|
-
source: number;
|
|
54
|
-
target: number;
|
|
55
|
-
formula: any[];
|
|
56
|
-
priority: number;
|
|
57
|
-
loading?: boolean;
|
|
58
|
-
}[]>;
|
|
59
|
-
nodeActions: _angular_core.WritableSignal<({
|
|
60
|
-
key: string;
|
|
61
|
-
icon: string;
|
|
62
|
-
variant: string;
|
|
63
|
-
size: string;
|
|
64
|
-
tooltip: string;
|
|
65
|
-
severity?: undefined;
|
|
66
|
-
} | {
|
|
67
|
-
key: string;
|
|
68
|
-
icon: string;
|
|
69
|
-
variant: string;
|
|
70
|
-
size: string;
|
|
71
|
-
severity: string;
|
|
72
|
-
tooltip: string;
|
|
73
|
-
})[]>;
|
|
74
|
-
constructor();
|
|
75
|
-
onNodeActionsEvent(event: NodeActionEvent): void;
|
|
76
|
-
clearForm(): void;
|
|
77
|
-
onStructureAction(event: SBAction): void;
|
|
78
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EscalationBuilder, never>;
|
|
79
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EscalationBuilder, "mt-escalation-builder", never, {}, {}, never, never, true, never>;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
10
|
interface LoadingStateShape<L extends string = string> {
|
|
83
11
|
loadingActive: L[];
|
|
84
12
|
errors: Partial<Record<L, string>>;
|
|
@@ -253,6 +181,38 @@ declare class DeleteConnection {
|
|
|
253
181
|
constructor(connectionId: string | number);
|
|
254
182
|
}
|
|
255
183
|
|
|
184
|
+
declare class EscalationFacade {
|
|
185
|
+
private readonly store;
|
|
186
|
+
readonly moduleType: _angular_core.Signal<string | null>;
|
|
187
|
+
readonly moduleId: _angular_core.Signal<string | number | null>;
|
|
188
|
+
readonly escalation: _angular_core.Signal<EscalationSchema | null>;
|
|
189
|
+
readonly formulaProperties: _angular_core.Signal<FormulaProperty[]>;
|
|
190
|
+
readonly groups: _angular_core.Signal<GroupDefinition[]>;
|
|
191
|
+
readonly roles: _angular_core.Signal<RoleDefinition[]>;
|
|
192
|
+
readonly selectedStep: _angular_core.Signal<StepSchema | null>;
|
|
193
|
+
readonly isFlowValid: _angular_core.Signal<boolean | null>;
|
|
194
|
+
readonly steps: _angular_core.Signal<EscalationStepSchema[]>;
|
|
195
|
+
readonly connections: _angular_core.Signal<EscalationConnection[]>;
|
|
196
|
+
isLoading(loadingName: EscalationLoadingName): _angular_core.Signal<boolean>;
|
|
197
|
+
error(loadingName: EscalationLoadingName): _angular_core.Signal<string | null>;
|
|
198
|
+
setModuleInfo(moduleType: string, moduleId: string | number, parentModuleType?: string, parentModuleId?: string | number, parentPath?: string): Observable<unknown>;
|
|
199
|
+
loadEscalation(): Observable<unknown>;
|
|
200
|
+
loadFormulaProperties(): Observable<unknown>;
|
|
201
|
+
loadGroups(): Observable<unknown>;
|
|
202
|
+
loadRolesForModule(): Observable<unknown>;
|
|
203
|
+
loadStep(stepId: string | number): Observable<unknown>;
|
|
204
|
+
validateFlow(): Observable<unknown>;
|
|
205
|
+
createStep(payload: StepPayload): Observable<unknown>;
|
|
206
|
+
updateStep(stepId: string | number, payload: StepPayload): Observable<unknown>;
|
|
207
|
+
createConnection(payload: ConnectionPayload): Observable<unknown>;
|
|
208
|
+
updateConnection(connectionId: string | number, payload: ConnectionPayload): Observable<unknown>;
|
|
209
|
+
publishEscalation(isPublished: boolean): Observable<unknown>;
|
|
210
|
+
deleteStep(stepId: string | number): Observable<unknown>;
|
|
211
|
+
deleteConnection(connectionId: string | number): Observable<unknown>;
|
|
212
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EscalationFacade, never>;
|
|
213
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<EscalationFacade>;
|
|
214
|
+
}
|
|
215
|
+
|
|
256
216
|
interface Response<T> {
|
|
257
217
|
endpoint: string;
|
|
258
218
|
status: number;
|
|
@@ -299,36 +259,78 @@ declare class EscalationState {
|
|
|
299
259
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<EscalationState>;
|
|
300
260
|
}
|
|
301
261
|
|
|
302
|
-
declare class
|
|
303
|
-
private
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
readonly
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
262
|
+
declare class EscalationBuilder {
|
|
263
|
+
private escalationFacade;
|
|
264
|
+
private transloco;
|
|
265
|
+
groups: _angular_core.Signal<_masterteam_escalation.GroupDefinition[]>;
|
|
266
|
+
roles: _angular_core.Signal<_masterteam_escalation.RoleDefinition[]>;
|
|
267
|
+
escalation: _angular_core.Signal<_masterteam_escalation.EscalationSchema | null>;
|
|
268
|
+
loading: _angular_core.Signal<boolean>;
|
|
269
|
+
loadingStep: _angular_core.Signal<boolean>;
|
|
270
|
+
private readonly confirmationService;
|
|
271
|
+
selectedStep: _angular_core.Signal<_masterteam_escalation.StepSchema | null>;
|
|
272
|
+
nodeFields: _angular_core.WritableSignal<any>;
|
|
273
|
+
nodeFormControl: FormControl<any>;
|
|
274
|
+
private isEditingInitialNode;
|
|
275
|
+
availableNodes: {
|
|
276
|
+
id: string;
|
|
277
|
+
label: string;
|
|
278
|
+
name: {
|
|
279
|
+
en: string;
|
|
280
|
+
ar: string;
|
|
281
|
+
};
|
|
282
|
+
targetType: string;
|
|
283
|
+
icon: string;
|
|
284
|
+
color: string;
|
|
285
|
+
}[];
|
|
286
|
+
private readonly baseNameFields;
|
|
287
|
+
private readonly approverSection;
|
|
288
|
+
private readonly slaSection;
|
|
289
|
+
nodeForm: _angular_core.WritableSignal<DynamicFormConfig>;
|
|
290
|
+
connectionForm: _angular_core.WritableSignal<DynamicFormConfig>;
|
|
291
|
+
steps: _angular_core.Signal<{
|
|
292
|
+
color: string;
|
|
293
|
+
id: number;
|
|
294
|
+
name: string | Record<string, string>;
|
|
295
|
+
sla: number;
|
|
296
|
+
isInitial: boolean;
|
|
297
|
+
targetType?: string;
|
|
298
|
+
targetValue?: string;
|
|
299
|
+
loading?: boolean;
|
|
300
|
+
}[]>;
|
|
301
|
+
connections: _angular_core.Signal<{
|
|
302
|
+
from: number;
|
|
303
|
+
to: number;
|
|
304
|
+
id: number;
|
|
305
|
+
source: number;
|
|
306
|
+
target: number;
|
|
307
|
+
formula: any[];
|
|
308
|
+
priority: number;
|
|
309
|
+
loading?: boolean;
|
|
310
|
+
}[]>;
|
|
311
|
+
nodeActions: _angular_core.WritableSignal<({
|
|
312
|
+
key: string;
|
|
313
|
+
icon: string;
|
|
314
|
+
variant: string;
|
|
315
|
+
size: string;
|
|
316
|
+
tooltip: string;
|
|
317
|
+
severity?: undefined;
|
|
318
|
+
condition?: undefined;
|
|
319
|
+
} | {
|
|
320
|
+
key: string;
|
|
321
|
+
icon: string;
|
|
322
|
+
variant: string;
|
|
323
|
+
size: string;
|
|
324
|
+
severity: string;
|
|
325
|
+
tooltip: string;
|
|
326
|
+
condition: (node: EscalationStepSchema) => boolean;
|
|
327
|
+
})[]>;
|
|
328
|
+
constructor();
|
|
329
|
+
onNodeActionsEvent(event: NodeActionEvent): void;
|
|
330
|
+
clearForm(): void;
|
|
331
|
+
onStructureAction(event: SBAction): void;
|
|
332
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EscalationBuilder, never>;
|
|
333
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EscalationBuilder, "mt-escalation-builder", never, {}, {}, never, never, true, never>;
|
|
332
334
|
}
|
|
333
335
|
|
|
334
336
|
declare const ESCALATION_STATES: (typeof EscalationState)[];
|