verben-workflow-ui 0.5.95 → 0.5.96
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/esm2022/src/lib/components/designer/models/types.mjs +1 -1
- package/esm2022/src/lib/components/designer/services/connection.service.mjs +2 -1
- package/esm2022/src/lib/components/designer/services/wf-mapper.service.mjs +4 -1
- package/esm2022/src/lib/components/my-queue/my-queue.module.mjs +4 -3
- package/esm2022/src/lib/components/my-queue/tasks.form.component.mjs +34 -10
- package/esm2022/src/lib/components/operation-popup/operation-popup.component.mjs +5 -5
- package/esm2022/src/lib/components/operation-popup/operation-popup.facade.mjs +13 -6
- package/esm2022/src/lib/components/operation-popup/operation-popup.service.mjs +17 -6
- package/esm2022/src/lib/components/operation-popup/public-api.mjs +2 -1
- package/esm2022/src/lib/components/tasks/tasks.component.mjs +2 -1
- package/esm2022/src/lib/components/workflow-designer/action-dialog/action-dialog.component.mjs +12 -10
- package/esm2022/src/lib/components/workflow-designer/designer-canvas/designer-canvas.component.mjs +12 -7
- package/esm2022/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.mjs +33 -15
- package/esm2022/src/lib/components/workflow-designer/services/connection.service.mjs +2 -1
- package/esm2022/src/lib/components/workflow-designer/services/transformer.service.mjs +3 -1
- package/esm2022/src/lib/components/workflow-designer/swimlane-dialog/swimlane-dialog.component.mjs +3 -4
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.component.mjs +4 -4
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.module.mjs +7 -4
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.state.mjs +12 -6
- package/esm2022/src/lib/components/workflow-designer/workflow-designer.types.mjs +1 -1
- package/esm2022/src/lib/components/workflow-stage/workflow-stage.component.mjs +5 -2
- package/esm2022/src/lib/models/WorkflowAction.mjs +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs +4 -0
- package/fesm2022/verben-workflow-ui-src-lib-components-designer.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs +36 -15
- package/fesm2022/verben-workflow-ui-src-lib-components-my-queue.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-operation-popup.mjs +32 -14
- package/fesm2022/verben-workflow-ui-src-lib-components-operation-popup.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs +1 -0
- package/fesm2022/verben-workflow-ui-src-lib-components-tasks.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs +75 -39
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow-designer.mjs.map +1 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow-stage.mjs +4 -1
- package/fesm2022/verben-workflow-ui-src-lib-components-workflow-stage.mjs.map +1 -1
- package/package.json +67 -67
- package/src/lib/components/designer/models/types.d.ts +1 -0
- package/src/lib/components/my-queue/tasks.form.component.d.ts +6 -1
- package/src/lib/components/operation-popup/operation-popup.facade.d.ts +2 -2
- package/src/lib/components/operation-popup/operation-popup.service.d.ts +2 -2
- package/src/lib/components/operation-popup/public-api.d.ts +1 -0
- package/src/lib/components/workflow-designer/escalation-dialog/escalation-dialog.component.d.ts +1 -0
- package/src/lib/components/workflow-designer/workflow-designer.module.d.ts +1 -1
- package/src/lib/components/workflow-designer/workflow-designer.types.d.ts +1 -0
- package/src/lib/models/WorkflowAction.d.ts +1 -0
|
@@ -5,7 +5,7 @@ import * as i1 from 'verben-workflow-ui/src/lib/services';
|
|
|
5
5
|
import * as i3 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import * as i5 from 'verben-ng-ui';
|
|
8
|
-
import { VerbenDialogueModule, VerbenPopUpModule, VerbenaButtonModule, DropDownModule, VerbenaInputModule, VerbenaSwitchModule, VerbenaTextareaModule } from 'verben-ng-ui';
|
|
8
|
+
import { VerbenDialogueModule, VerbenPopUpModule, VerbenaButtonModule, DropDownModule, VerbenaInputModule, VerbenaSwitchModule, VerbenaTextareaModule, NumberInputModule } from 'verben-ng-ui';
|
|
9
9
|
import * as i5$1 from 'verben-workflow-ui/src/lib/components/designer';
|
|
10
10
|
import { LabelEditorComponent } from 'verben-workflow-ui/src/lib/components/designer';
|
|
11
11
|
import * as i1$1 from '@angular/forms';
|
|
@@ -433,6 +433,7 @@ class WorkflowDesignerState {
|
|
|
433
433
|
targetSwimlaneIndex: targetSwimlaneIndex,
|
|
434
434
|
label: '',
|
|
435
435
|
action: null,
|
|
436
|
+
position: 1,
|
|
436
437
|
};
|
|
437
438
|
this.connections.push(connection);
|
|
438
439
|
return connection;
|
|
@@ -774,6 +775,7 @@ class WorkflowDesignerState {
|
|
|
774
775
|
conn.label ??
|
|
775
776
|
`Action from ${sourceNode?.stageData?.Name || 'Unknown'} to ${targetNode?.stageData?.Name || 'Unknown'}`;
|
|
776
777
|
updatedAction.OperationAction = conn.action;
|
|
778
|
+
updatedAction.Position = conn.position;
|
|
777
779
|
updatedAction.IsParallel = targetNode?.stageData?.IsParallel || false;
|
|
778
780
|
updatedAction.PassOnRule = conn.condition || '';
|
|
779
781
|
updatedAction.TargetStatus = conn.targetStatus || undefined;
|
|
@@ -797,6 +799,7 @@ class WorkflowDesignerState {
|
|
|
797
799
|
Name: conn.label ??
|
|
798
800
|
`Action from ${sourceNode?.stageData?.Name || 'Unknown'} to ${targetNode?.stageData?.Name || 'Unknown'}`,
|
|
799
801
|
OperationAction: conn.action,
|
|
802
|
+
Position: conn.position,
|
|
800
803
|
TargetStatus: conn.targetStatus,
|
|
801
804
|
FromStage: conn.sourceNodeId,
|
|
802
805
|
ToStage: conn.targetNodeId,
|
|
@@ -880,8 +883,7 @@ class WorkflowDesignerState {
|
|
|
880
883
|
* - Connection swimlane indices for this node
|
|
881
884
|
* - Node's stageData.Tags and SwimLane to match the destination swimlane
|
|
882
885
|
*/
|
|
883
|
-
moveNodeToSwimlane(nodeId, fromSwimlaneIndex, toSwimlaneIndex, newX, absoluteY
|
|
884
|
-
) {
|
|
886
|
+
moveNodeToSwimlane(nodeId, fromSwimlaneIndex, toSwimlaneIndex, newX, absoluteY) {
|
|
885
887
|
const fromSwimlane = this.swimlanes[fromSwimlaneIndex];
|
|
886
888
|
if (!fromSwimlane?.nodes)
|
|
887
889
|
return null;
|
|
@@ -909,8 +911,12 @@ class WorkflowDesignerState {
|
|
|
909
911
|
return conn;
|
|
910
912
|
return {
|
|
911
913
|
...conn,
|
|
912
|
-
...(conn.sourceNodeId === nodeId
|
|
913
|
-
|
|
914
|
+
...(conn.sourceNodeId === nodeId
|
|
915
|
+
? { sourceSwimlaneIndex: toSwimlaneIndex }
|
|
916
|
+
: {}),
|
|
917
|
+
...(conn.targetNodeId === nodeId
|
|
918
|
+
? { targetSwimlaneIndex: toSwimlaneIndex }
|
|
919
|
+
: {}),
|
|
914
920
|
};
|
|
915
921
|
});
|
|
916
922
|
// ── Sync node metadata to the destination swimlane ────────────────────
|
|
@@ -2488,9 +2494,17 @@ class EscalationDialogComponent {
|
|
|
2488
2494
|
const escalation = this.escalation();
|
|
2489
2495
|
const reportSchedules = this.reportSchedules();
|
|
2490
2496
|
if (escalation && reportSchedules) {
|
|
2491
|
-
this.selectedMessages = escalation.FullMessages.map(({ Message, IsTaskDataSource, IsMessageId }) => {
|
|
2497
|
+
this.selectedMessages = escalation.FullMessages.map(({ Code, Message, IsTaskDataSource, IsMessageId }) => {
|
|
2492
2498
|
const found = reportSchedules.find((rs) => rs.Code === Message);
|
|
2493
|
-
return found
|
|
2499
|
+
return found
|
|
2500
|
+
? {
|
|
2501
|
+
...found,
|
|
2502
|
+
Code: Code,
|
|
2503
|
+
Message: Message,
|
|
2504
|
+
IsTaskDataSource,
|
|
2505
|
+
IsMessageId,
|
|
2506
|
+
}
|
|
2507
|
+
: null;
|
|
2494
2508
|
});
|
|
2495
2509
|
// this.selectedOperationAction.next(escalation.OperationAction ?? null);
|
|
2496
2510
|
// console.log("SETTING OP", this.selectedOperationAction);
|
|
@@ -2520,7 +2534,14 @@ class EscalationDialogComponent {
|
|
|
2520
2534
|
onMessageSelected(reportSchedule, index) {
|
|
2521
2535
|
this.selectedMessages = this.selectedMessages.map((msg, i) => {
|
|
2522
2536
|
if (i === index) {
|
|
2523
|
-
return {
|
|
2537
|
+
return {
|
|
2538
|
+
...reportSchedule,
|
|
2539
|
+
Code: msg ? msg.Code : '',
|
|
2540
|
+
DataState: msg ? ObjectState.Unchanged : ObjectState.New,
|
|
2541
|
+
Message: reportSchedule.Code,
|
|
2542
|
+
IsTaskDataSource: false,
|
|
2543
|
+
IsMessageId: true,
|
|
2544
|
+
};
|
|
2524
2545
|
}
|
|
2525
2546
|
return msg;
|
|
2526
2547
|
});
|
|
@@ -2533,9 +2554,9 @@ class EscalationDialogComponent {
|
|
|
2533
2554
|
.filter((msg) => !!msg)
|
|
2534
2555
|
.map((msg) => ({
|
|
2535
2556
|
Id: '',
|
|
2536
|
-
Code: '',
|
|
2537
|
-
TenantId:
|
|
2538
|
-
Message: msg.
|
|
2557
|
+
Code: msg.DataState == ObjectState.New ? '' : msg.Code,
|
|
2558
|
+
TenantId: msg.TenantId,
|
|
2559
|
+
Message: msg.Message,
|
|
2539
2560
|
Name: msg.Name,
|
|
2540
2561
|
Subject: msg.Subject,
|
|
2541
2562
|
SenderConfig: msg.MessageConfig,
|
|
@@ -2544,15 +2565,17 @@ class EscalationDialogComponent {
|
|
|
2544
2565
|
IsMessageId: msg.IsMessageId,
|
|
2545
2566
|
IsTaskDataSource: msg.IsTaskDataSource,
|
|
2546
2567
|
MessageDataSource: !msg.IsTaskDataSource ? msg.ReportDataSource : '',
|
|
2547
|
-
DataState: ObjectState.New
|
|
2568
|
+
DataState: msg.DataState == ObjectState.New
|
|
2569
|
+
? ObjectState.New
|
|
2570
|
+
: ObjectState.Changed,
|
|
2548
2571
|
id: '',
|
|
2549
|
-
ServiceName:
|
|
2572
|
+
ServiceName: msg.ServiceName,
|
|
2550
2573
|
CreatedAt: new Date(),
|
|
2551
2574
|
UpdatedAt: new Date(),
|
|
2552
2575
|
}));
|
|
2553
2576
|
// if (taskNotifications.length) {
|
|
2554
2577
|
// this.created.emit(taskNotifications);
|
|
2555
|
-
this.
|
|
2578
|
+
console.log({ CurrentEscalation: this.escalation() });
|
|
2556
2579
|
const data = {
|
|
2557
2580
|
...(this.escalation() ?? {
|
|
2558
2581
|
Id: '',
|
|
@@ -2576,9 +2599,11 @@ class EscalationDialogComponent {
|
|
|
2576
2599
|
this.utilService.showSuccess('Escalation saved successfully');
|
|
2577
2600
|
this.onDialogClose(null);
|
|
2578
2601
|
});
|
|
2602
|
+
this.onDialogClose(null);
|
|
2579
2603
|
// }
|
|
2580
2604
|
}
|
|
2581
2605
|
deleteEscalation() {
|
|
2606
|
+
console.log({ CurrentEscalation: this.escalation() });
|
|
2582
2607
|
const escalation = this.escalation();
|
|
2583
2608
|
if (escalation) {
|
|
2584
2609
|
this.dataService.deleteEscalations([escalation.Code]).then((data) => {
|
|
@@ -2619,18 +2644,17 @@ class EscalationDialogComponent {
|
|
|
2619
2644
|
this.selectedMessages = [];
|
|
2620
2645
|
this.closed.emit();
|
|
2621
2646
|
}
|
|
2622
|
-
onDialogOpen(eventData) {
|
|
2623
|
-
}
|
|
2647
|
+
onDialogOpen(eventData) { }
|
|
2624
2648
|
isNotNew() {
|
|
2625
2649
|
const escalation = this.escalation();
|
|
2626
2650
|
return escalation !== null && escalation.DataState !== 'New';
|
|
2627
2651
|
}
|
|
2628
2652
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EscalationDialogComponent, deps: [{ token: i1$1.FormBuilder }, { token: WorkflowDataService }, { token: i1.UtilService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2629
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: EscalationDialogComponent, selector: "lib-escalation-dialog", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: false, isRequired: false, transformFunction: null }, workflowCode: { classPropertyName: "workflowCode", publicName: "workflowCode", isSignal: true, isRequired: true, transformFunction: null }, stageCode: { classPropertyName: "stageCode", publicName: "stageCode", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", created: "created" }, ngImport: i0, template: "<verben-dialogue [showCloseIcon]=\"true\" [dismissOutsideClick]=\"true\" [closeOnEscape]=\"true\" [size]=\"'medium'\"\n [mode]=\"'drawer'\" [disableFooter]=\"false\" [isVisible]=\"visible\" [headerTemplate]=\"headerTemplate\"\n [bodyTemplate]=\"bodyTemplate\" [footerTemplate]=\"footerTemplate\" (openModal)=\"onDialogOpen($event)\"\n (closeModal)=\"onDialogClose($event)\">\n</verben-dialogue>\n\n<ng-template #headerTemplate>\n <div class=\"flex items-center justify-between p-3 text-xs border-b-4 border-[var(--vbn-color-primary)]\">\n <button class=\"mr-4\" type=\"button\" (click)=\"onDialogClose($event)\">\n <span class=\"block w-2.5 h-2.5 border-t border-l border-[var(--vbn-color-text)]/70 transform -rotate-45\"></span>\n </button>\n </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n <div>\n <div class=\"mb-4 space-y-4\">\n <!-- <div class=\"space-y-1\">\n <label for=\"operation-action\" class=\"text-sm font-semibold text-[var(--vbn-color-text)]\">\n Escalation\n </label>\n <verben-drop-down\n id=\"operation-action\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select Operation Action\"\n [options]=\"operationActions()\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n [ngModel]=\"selectedOperationAction | async\"\n (ngModelChange)=\"selectedOperationAction.next($event)\"\n class=\"form-control\"\n ></verben-drop-down>\n </div> -->\n\n <div class=\"space-y-4\" *ngFor=\"let message of selectedMessages; let i = index\">\n <div class=\"space-y-1\">\n <label [for]=\"message + '-' + i\" class=\"text-sm font-semibold text-[var(--vbn-color-text)]\">\n Message {{ i + 1 }}\n </label>\n <verben-drop-down [id]=\"message + '-' + i\" selectKey=\"Code\" styleClass=\"w-full\" width=\"100%\"\n [multiselect]=\"false\" placeholder=\"Select Message\" [options]=\"reportSchedules()\" optionLabel=\"Name\"\n [ngModel]=\"message\" (ngModelChange)=\"onMessageSelected($event, i)\" class=\"form-control\"></verben-drop-down>\n </div>\n\n @if (message) {\n <div class=\"flex items-center gap-4\">\n <label [for]=\"'is-' + message + '-' + i + 'task-data-source'\" class=\"text-sm font-semibold text-[var(--vbn-color-text)]\">\n Is Task Data Source?\n </label>\n <verbena-switch [id]=\"'is-' + message + '-' + i + 'task-data-source'\" onText=\"Yes\" offText=\"No\"\n [onColor]=\"'var(--vbn-color-text)'\" [(ngModel)]=\"message.IsTaskDataSource\"></verbena-switch>\n </div>\n\n <div class=\"flex items-center gap-4\">\n <label [for]=\"'is-' + message + '-' + i + 'is-message-id'\" class=\"text-sm font-semibold text-[var(--vbn-color-text)]\">\n Is Message ID?\n </label>\n <verbena-switch [id]=\"'is-' + message + '-' + i + 'is-message-id'\" onText=\"Yes\" offText=\"No\"\n [onColor]=\"'var(--vbn-color-text)'\" [(ngModel)]=\"message.IsMessageId\"></verbena-switch>\n </div>\n }\n\n <div class=\"border border-primary -m-2 rounded-lg flex flex-col gap-3\" *ngIf=\"message\">\n <div class=\"space-y-3 border-b border-primary px-2 py-3\">\n <verbena-input name=\"Subject\" [(ngModel)]=\"message.Subject\" [readOnly]=\"true\" />\n <verbena-input name=\"Recipients\" [(ngModel)]=\"message.Recipients\" [readOnly]=\"true\" />\n </div>\n <lib-editor [editorConfig]=\"editorConfig\" [editorMode]=\"editorMode\"\n [(ngModel)]=\"message.PlainMessage\"></lib-editor>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #footerTemplate>\n <div class=\"flex justify-between items-center gap-8 w-full\">\n <verbena-button style=\"cursor: pointer\" type=\"button\" text=\"Add Message\" bgColor=\"var(--vbn-color-primary)\" textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"8px\" pd=\"10px 20px\" height=\"39px\" fontWeight=\"600\" fontSize=\"12px\" svg=\"add\" [svgHeight]=\"14\"\n [svgWidth]=\"14\" [svgSize]=\"'sm'\" (click)=\"addMessage()\"></verbena-button>\n\n <div class=\"flex gap-2 items-center\">\n <verbena-button style=\"cursor: pointer\" type=\"button\" text=\"Delete\" bgColor=\"var(--vbn-color-primary)\" textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"8px\" pd=\"10px 20px\" width=\"110px\" height=\"39px\" fontWeight=\"600\" fontSize=\"12px\" svg=\"delete\"\n [svgHeight]=\"14\" [svgWidth]=\"14\" [svgSize]=\"'sm'\" (click)=\"deleteEscalation()\"></verbena-button>\n\n <verbena-button style=\"cursor: pointer\" type=\"button\" text=\"Save\" bgColor=\"var(--vbn-color-primary)\" textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"8px\" pd=\"10px 20px\" width=\"160px\" height=\"39px\" fontWeight=\"600\" fontSize=\"12px\" svg=\"send\"\n [svgHeight]=\"14\" [svgWidth]=\"14\" [svgSize]=\"'sm'\" (click)=\"saveMessages()\"></verbena-button>\n </div>\n </div>\n</ng-template>\n", styles: ["::ng-deep .modal-footer{display:flex;justify-content:space-between!important}::ng-deep button,button{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.VerbenDialogueComponent, selector: "verben-dialogue", inputs: ["dialogueWidth", "headerTemplate", "bodyTemplate", "footerTemplate", "showCloseIcon", "dismissOutsideClick", "closeOnEscape", "isVisible", "size", "backdropColor", "customClass", "disableFooter", "margin", "padding", "borderRadius", "dialogueBgColor", "width", "closeIconClass", "boxShadow", "enableTransition", "modalData", "mode", "position", "drawerWidth"], outputs: ["openModal", "closeModal"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.VerbenaButtonComponent, selector: "verbena-button", inputs: ["type", "text", "icon", "useIcon", "svgPosition", "iconPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "svgSize", "weight", "variant", "styleType", "svg", "svgWidth", "svgHeight", "iconColor", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i5.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "overlayWidth", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "refPageSize", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i6.EditorComponent, selector: "lib-editor", inputs: ["themeColor", "editorMode", "editorConfig", "content"], outputs: ["onImageEdit", "onSortEdit"] }, { kind: "component", type: i5.VerbenaInputComponent, selector: "verbena-input", inputs: ["disabled", "label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "fontSize", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "passLength", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i5.VerbenaSwitchComponent, selector: "verbena-switch", inputs: ["label", "checked", "disabled", "offColor", "onColor", "onText", "offText", "width", "height", "customStyles"], outputs: ["change"] }] });
|
|
2653
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: EscalationDialogComponent, selector: "lib-escalation-dialog", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: false, isRequired: false, transformFunction: null }, workflowCode: { classPropertyName: "workflowCode", publicName: "workflowCode", isSignal: true, isRequired: true, transformFunction: null }, stageCode: { classPropertyName: "stageCode", publicName: "stageCode", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", created: "created" }, ngImport: i0, template: "<verben-dialogue\n [showCloseIcon]=\"true\"\n [dismissOutsideClick]=\"true\"\n [closeOnEscape]=\"true\"\n [size]=\"'medium'\"\n [mode]=\"'drawer'\"\n [disableFooter]=\"false\"\n [isVisible]=\"visible\"\n [headerTemplate]=\"headerTemplate\"\n [bodyTemplate]=\"bodyTemplate\"\n [footerTemplate]=\"footerTemplate\"\n (openModal)=\"onDialogOpen($event)\"\n (closeModal)=\"onDialogClose($event)\"\n>\n</verben-dialogue>\n\n<ng-template #headerTemplate>\n <div\n class=\"flex items-center justify-between p-3 text-xs border-b-4 border-[var(--vbn-color-primary)]\"\n >\n <button class=\"mr-4\" type=\"button\" (click)=\"onDialogClose($event)\">\n <span\n class=\"block w-2.5 h-2.5 border-t border-l border-[var(--vbn-color-text)]/70 transform -rotate-45\"\n ></span>\n </button>\n </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n <div>\n <div class=\"mb-4 space-y-4 overflow-y-auto flex flex-col gap-3\">\n <!-- <div class=\"space-y-1\">\n <label for=\"operation-action\" class=\"text-sm font-semibold text-[var(--vbn-color-text)]\">\n Escalation\n </label>\n <verben-drop-down\n id=\"operation-action\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select Operation Action\"\n [options]=\"operationActions()\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n [ngModel]=\"selectedOperationAction | async\"\n (ngModelChange)=\"selectedOperationAction.next($event)\"\n class=\"form-control\"\n ></verben-drop-down>\n </div> -->\n\n <div\n class=\"space-y-4\"\n *ngFor=\"let message of selectedMessages; let i = index\"\n >\n <div class=\"space-y-1\">\n <label\n [for]=\"message + '-' + i\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Message {{ i + 1 }}\n </label>\n <verben-drop-down\n [id]=\"message + '-' + i\"\n selectKey=\"Code\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select Message\"\n [options]=\"reportSchedules()\"\n optionLabel=\"Name\"\n [ngModel]=\"message\"\n (ngModelChange)=\"onMessageSelected($event, i)\"\n class=\"form-control\"\n ></verben-drop-down>\n </div>\n\n @if (message) {\n <div class=\"flex items-center gap-4\">\n <label\n [for]=\"'is-' + message + '-' + i + 'task-data-source'\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Is Task Data Source?\n </label>\n <verbena-switch\n [id]=\"'is-' + message + '-' + i + 'task-data-source'\"\n onText=\"Yes\"\n offText=\"No\"\n [onColor]=\"'var(--vbn-color-text)'\"\n [(ngModel)]=\"message.IsTaskDataSource\"\n ></verbena-switch>\n </div>\n\n <div class=\"flex items-center gap-4\">\n <label\n [for]=\"'is-' + message + '-' + i + 'is-message-id'\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Is Message ID?\n </label>\n <verbena-switch\n [id]=\"'is-' + message + '-' + i + 'is-message-id'\"\n onText=\"Yes\"\n offText=\"No\"\n [onColor]=\"'var(--vbn-color-text)'\"\n [(ngModel)]=\"message.IsMessageId\"\n ></verbena-switch>\n </div>\n }\n\n <div\n class=\"border border-primary -m-2 rounded-lg flex flex-col gap-3\"\n *ngIf=\"message\"\n >\n <div class=\"space-y-3 border-b border-primary px-2 py-3\">\n <div class=\"flex flex-col gap-1\">\n <div>Subject</div>\n <verbena-input\n name=\"Subject\"\n [(ngModel)]=\"message.Subject\"\n [readOnly]=\"true\"\n />\n </div>\n <div class=\"flex flex-col gap-1\">\n <div>Recipients</div>\n <verbena-input\n name=\"Recipients\"\n [(ngModel)]=\"message.Recipients\"\n [readOnly]=\"true\"\n />\n </div>\n </div>\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"message.PlainMessage\"\n ></lib-editor>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #footerTemplate>\n <div class=\"flex justify-between items-center gap-8 w-full\">\n <verbena-button\n style=\"cursor: pointer\"\n type=\"button\"\n text=\"Add Message\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"8px\"\n pd=\"10px 20px\"\n height=\"39px\"\n fontWeight=\"600\"\n fontSize=\"12px\"\n svg=\"add\"\n [svgHeight]=\"14\"\n [svgWidth]=\"14\"\n [svgSize]=\"'sm'\"\n (click)=\"addMessage()\"\n ></verbena-button>\n\n <div class=\"flex gap-2 items-center\">\n <verbena-button\n style=\"cursor: pointer\"\n type=\"button\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"8px\"\n pd=\"10px 20px\"\n width=\"110px\"\n height=\"39px\"\n fontWeight=\"600\"\n fontSize=\"12px\"\n svg=\"delete\"\n [svgHeight]=\"14\"\n [svgWidth]=\"14\"\n [svgSize]=\"'sm'\"\n (click)=\"deleteEscalation()\"\n ></verbena-button>\n\n <verbena-button\n style=\"cursor: pointer\"\n type=\"button\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"8px\"\n pd=\"10px 20px\"\n width=\"160px\"\n height=\"39px\"\n fontWeight=\"600\"\n fontSize=\"12px\"\n svg=\"send\"\n [svgHeight]=\"14\"\n [svgWidth]=\"14\"\n [svgSize]=\"'sm'\"\n (click)=\"saveMessages()\"\n ></verbena-button>\n </div>\n </div>\n</ng-template>\n", styles: ["::ng-deep .modal-footer{display:flex;justify-content:space-between!important}::ng-deep button,button{cursor:pointer}::ng-deep .modal-body{overflow-y:auto}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.VerbenDialogueComponent, selector: "verben-dialogue", inputs: ["dialogueWidth", "headerTemplate", "bodyTemplate", "footerTemplate", "showCloseIcon", "dismissOutsideClick", "closeOnEscape", "isVisible", "size", "backdropColor", "customClass", "disableFooter", "margin", "padding", "borderRadius", "dialogueBgColor", "width", "closeIconClass", "boxShadow", "enableTransition", "modalData", "mode", "position", "drawerWidth"], outputs: ["openModal", "closeModal"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.VerbenaButtonComponent, selector: "verbena-button", inputs: ["type", "text", "icon", "useIcon", "svgPosition", "iconPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "svgSize", "weight", "variant", "styleType", "svg", "svgWidth", "svgHeight", "iconColor", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i5.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "overlayWidth", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "refPageSize", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i6.EditorComponent, selector: "lib-editor", inputs: ["themeColor", "editorMode", "editorConfig", "content"], outputs: ["onImageEdit", "onSortEdit"] }, { kind: "component", type: i5.VerbenaInputComponent, selector: "verbena-input", inputs: ["disabled", "label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "fontSize", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "passLength", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i5.VerbenaSwitchComponent, selector: "verbena-switch", inputs: ["label", "checked", "disabled", "offColor", "onColor", "onText", "offText", "width", "height", "customStyles"], outputs: ["change"] }] });
|
|
2630
2654
|
}
|
|
2631
2655
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EscalationDialogComponent, decorators: [{
|
|
2632
2656
|
type: Component,
|
|
2633
|
-
args: [{ selector: 'lib-escalation-dialog', template: "<verben-dialogue
|
|
2657
|
+
args: [{ selector: 'lib-escalation-dialog', template: "<verben-dialogue\n [showCloseIcon]=\"true\"\n [dismissOutsideClick]=\"true\"\n [closeOnEscape]=\"true\"\n [size]=\"'medium'\"\n [mode]=\"'drawer'\"\n [disableFooter]=\"false\"\n [isVisible]=\"visible\"\n [headerTemplate]=\"headerTemplate\"\n [bodyTemplate]=\"bodyTemplate\"\n [footerTemplate]=\"footerTemplate\"\n (openModal)=\"onDialogOpen($event)\"\n (closeModal)=\"onDialogClose($event)\"\n>\n</verben-dialogue>\n\n<ng-template #headerTemplate>\n <div\n class=\"flex items-center justify-between p-3 text-xs border-b-4 border-[var(--vbn-color-primary)]\"\n >\n <button class=\"mr-4\" type=\"button\" (click)=\"onDialogClose($event)\">\n <span\n class=\"block w-2.5 h-2.5 border-t border-l border-[var(--vbn-color-text)]/70 transform -rotate-45\"\n ></span>\n </button>\n </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n <div>\n <div class=\"mb-4 space-y-4 overflow-y-auto flex flex-col gap-3\">\n <!-- <div class=\"space-y-1\">\n <label for=\"operation-action\" class=\"text-sm font-semibold text-[var(--vbn-color-text)]\">\n Escalation\n </label>\n <verben-drop-down\n id=\"operation-action\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select Operation Action\"\n [options]=\"operationActions()\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n [ngModel]=\"selectedOperationAction | async\"\n (ngModelChange)=\"selectedOperationAction.next($event)\"\n class=\"form-control\"\n ></verben-drop-down>\n </div> -->\n\n <div\n class=\"space-y-4\"\n *ngFor=\"let message of selectedMessages; let i = index\"\n >\n <div class=\"space-y-1\">\n <label\n [for]=\"message + '-' + i\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Message {{ i + 1 }}\n </label>\n <verben-drop-down\n [id]=\"message + '-' + i\"\n selectKey=\"Code\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n placeholder=\"Select Message\"\n [options]=\"reportSchedules()\"\n optionLabel=\"Name\"\n [ngModel]=\"message\"\n (ngModelChange)=\"onMessageSelected($event, i)\"\n class=\"form-control\"\n ></verben-drop-down>\n </div>\n\n @if (message) {\n <div class=\"flex items-center gap-4\">\n <label\n [for]=\"'is-' + message + '-' + i + 'task-data-source'\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Is Task Data Source?\n </label>\n <verbena-switch\n [id]=\"'is-' + message + '-' + i + 'task-data-source'\"\n onText=\"Yes\"\n offText=\"No\"\n [onColor]=\"'var(--vbn-color-text)'\"\n [(ngModel)]=\"message.IsTaskDataSource\"\n ></verbena-switch>\n </div>\n\n <div class=\"flex items-center gap-4\">\n <label\n [for]=\"'is-' + message + '-' + i + 'is-message-id'\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Is Message ID?\n </label>\n <verbena-switch\n [id]=\"'is-' + message + '-' + i + 'is-message-id'\"\n onText=\"Yes\"\n offText=\"No\"\n [onColor]=\"'var(--vbn-color-text)'\"\n [(ngModel)]=\"message.IsMessageId\"\n ></verbena-switch>\n </div>\n }\n\n <div\n class=\"border border-primary -m-2 rounded-lg flex flex-col gap-3\"\n *ngIf=\"message\"\n >\n <div class=\"space-y-3 border-b border-primary px-2 py-3\">\n <div class=\"flex flex-col gap-1\">\n <div>Subject</div>\n <verbena-input\n name=\"Subject\"\n [(ngModel)]=\"message.Subject\"\n [readOnly]=\"true\"\n />\n </div>\n <div class=\"flex flex-col gap-1\">\n <div>Recipients</div>\n <verbena-input\n name=\"Recipients\"\n [(ngModel)]=\"message.Recipients\"\n [readOnly]=\"true\"\n />\n </div>\n </div>\n <lib-editor\n [editorConfig]=\"editorConfig\"\n [editorMode]=\"editorMode\"\n [(ngModel)]=\"message.PlainMessage\"\n ></lib-editor>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #footerTemplate>\n <div class=\"flex justify-between items-center gap-8 w-full\">\n <verbena-button\n style=\"cursor: pointer\"\n type=\"button\"\n text=\"Add Message\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"8px\"\n pd=\"10px 20px\"\n height=\"39px\"\n fontWeight=\"600\"\n fontSize=\"12px\"\n svg=\"add\"\n [svgHeight]=\"14\"\n [svgWidth]=\"14\"\n [svgSize]=\"'sm'\"\n (click)=\"addMessage()\"\n ></verbena-button>\n\n <div class=\"flex gap-2 items-center\">\n <verbena-button\n style=\"cursor: pointer\"\n type=\"button\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"8px\"\n pd=\"10px 20px\"\n width=\"110px\"\n height=\"39px\"\n fontWeight=\"600\"\n fontSize=\"12px\"\n svg=\"delete\"\n [svgHeight]=\"14\"\n [svgWidth]=\"14\"\n [svgSize]=\"'sm'\"\n (click)=\"deleteEscalation()\"\n ></verbena-button>\n\n <verbena-button\n style=\"cursor: pointer\"\n type=\"button\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"8px\"\n pd=\"10px 20px\"\n width=\"160px\"\n height=\"39px\"\n fontWeight=\"600\"\n fontSize=\"12px\"\n svg=\"send\"\n [svgHeight]=\"14\"\n [svgWidth]=\"14\"\n [svgSize]=\"'sm'\"\n (click)=\"saveMessages()\"\n ></verbena-button>\n </div>\n </div>\n</ng-template>\n", styles: ["::ng-deep .modal-footer{display:flex;justify-content:space-between!important}::ng-deep button,button{cursor:pointer}::ng-deep .modal-body{overflow-y:auto}\n"] }]
|
|
2634
2658
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: WorkflowDataService }, { type: i1.UtilService }], propDecorators: { visible: [{
|
|
2635
2659
|
type: Input
|
|
2636
2660
|
}], closed: [{
|
|
@@ -2672,6 +2696,7 @@ class ActionDialogComponent {
|
|
|
2672
2696
|
Name: ['', Validators.required],
|
|
2673
2697
|
OperationAction: [null],
|
|
2674
2698
|
TargetStatus: [null],
|
|
2699
|
+
Position: 1,
|
|
2675
2700
|
});
|
|
2676
2701
|
effect(() => {
|
|
2677
2702
|
// If actionData changes, update the form
|
|
@@ -2681,6 +2706,7 @@ class ActionDialogComponent {
|
|
|
2681
2706
|
Name: actionData.label || '',
|
|
2682
2707
|
OperationAction: actionData.action || null,
|
|
2683
2708
|
TargetStatus: actionData.targetStatus || null,
|
|
2709
|
+
Position: actionData.position,
|
|
2684
2710
|
});
|
|
2685
2711
|
}
|
|
2686
2712
|
});
|
|
@@ -2701,7 +2727,8 @@ class ActionDialogComponent {
|
|
|
2701
2727
|
...prevData,
|
|
2702
2728
|
label: formData.Name,
|
|
2703
2729
|
action: formData.OperationAction,
|
|
2704
|
-
targetStatus: formData.TargetStatus
|
|
2730
|
+
targetStatus: formData.TargetStatus,
|
|
2731
|
+
position: formData.Position,
|
|
2705
2732
|
});
|
|
2706
2733
|
}
|
|
2707
2734
|
}
|
|
@@ -2714,13 +2741,13 @@ class ActionDialogComponent {
|
|
|
2714
2741
|
const backendRecord = this.state.actionRecord[connectionId];
|
|
2715
2742
|
if (backendRecord?.Code) {
|
|
2716
2743
|
// Path A: backend-persisted action — call API first
|
|
2717
|
-
this.dataService
|
|
2744
|
+
this.dataService
|
|
2745
|
+
.deleteWorkflowActions([backendRecord.Code])
|
|
2718
2746
|
.then(() => {
|
|
2719
2747
|
this.deleted.emit(connectionId);
|
|
2720
2748
|
this.closed.emit();
|
|
2721
2749
|
})
|
|
2722
|
-
.catch((error) => {
|
|
2723
|
-
});
|
|
2750
|
+
.catch((error) => { });
|
|
2724
2751
|
}
|
|
2725
2752
|
else {
|
|
2726
2753
|
// Path B: local-only action — remove from state directly, no API call
|
|
@@ -2741,14 +2768,13 @@ class ActionDialogComponent {
|
|
|
2741
2768
|
onDialogClose(eventData) {
|
|
2742
2769
|
this.closed.emit();
|
|
2743
2770
|
}
|
|
2744
|
-
onDialogOpen(eventData) {
|
|
2745
|
-
}
|
|
2771
|
+
onDialogOpen(eventData) { }
|
|
2746
2772
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ActionDialogComponent, deps: [{ token: i1$1.FormBuilder }, { token: WorkflowDataService }, { token: WorkflowDesignerState }], target: i0.ɵɵFactoryTarget.Component });
|
|
2747
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: ActionDialogComponent, selector: "lib-action-dialog", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, actionData: { classPropertyName: "actionData", publicName: "actionData", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { closed: "closed", saved: "saved", deleted: "deleted" }, ngImport: i0, template: "<verben-dialogue
|
|
2773
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: ActionDialogComponent, selector: "lib-action-dialog", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, actionData: { classPropertyName: "actionData", publicName: "actionData", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { closed: "closed", saved: "saved", deleted: "deleted" }, ngImport: i0, template: "<verben-dialogue\n [showCloseIcon]=\"true\"\n [dismissOutsideClick]=\"true\"\n [closeOnEscape]=\"true\"\n [size]=\"'medium'\"\n [mode]=\"'drawer'\"\n [disableFooter]=\"false\"\n [isVisible]=\"visible()\"\n [headerTemplate]=\"headerTemplate\"\n [bodyTemplate]=\"bodyTemplate\"\n [footerTemplate]=\"footerTemplate\"\n (openModal)=\"onDialogOpen($event)\"\n (closeModal)=\"onDialogClose($event)\"\n>\n</verben-dialogue>\n\n<ng-template #headerTemplate>\n <div\n class=\"flex items-center justify-between p-3 text-xs border-b-4 border-[var(--vbn-color-primary)]\"\n >\n <button class=\"mr-4\" type=\"button\" (click)=\"onDialogClose($event)\">\n <span\n class=\"block w-2.5 h-2.5 border-t border-l border-[var(--vbn-color-text)]/70 transform -rotate-45\"\n ></span>\n </button>\n </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n <form [formGroup]=\"actionForm\" class=\"mb-4 space-y-4\">\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n formControlName=\"Name\"\n placeHolder=\"Enter Name\"\n />\n\n <div class=\"space-y-1\">\n <label\n for=\"operation-action\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Operation Action\n </label>\n <verben-drop-down\n id=\"operation-action\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n filterBy=\"Name\"\n placeholder=\"Select Operation Action\"\n [options]=\"operationActions()\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n formControlName=\"OperationAction\"\n class=\"form-control\"\n [showClear]=\"true\"\n [filter]=\"true\"\n ></verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label\n for=\"target-status\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Target Status\n </label>\n <verben-drop-down\n id=\"target-status\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n filterBy=\"Description\"\n placeholder=\"Select Target Status\"\n [options]=\"flowableStatuses()\"\n optionLabel=\"Description\"\n optionValue=\"Name\"\n formControlName=\"TargetStatus\"\n class=\"form-control\"\n [showClear]=\"true\"\n [filter]=\"true\"\n ></verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label\n for=\"position\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Position\n </label>\n <verben-number-input\n id=\"position\"\n name=\"Position\"\n class=\"form-control\"\n formControlName=\"Position\"\n placeholder=\"Enter Position\"\n ></verben-number-input>\n </div>\n </form>\n</ng-template>\n\n<ng-template #footerTemplate>\n <div class=\"flex gap-2 items-center justify-end\">\n <verbena-button\n (click)=\"onDialogClose($event)\"\n text=\"Cancel\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n <verbena-button\n type=\"submit\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n (click)=\"saveAction()\"\n [disable]=\"actionForm.invalid\"\n ></verbena-button>\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-text-muted)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n (click)=\"deleteAction()\"\n ></verbena-button>\n </div>\n</ng-template>\n", styles: ["::ng-deep .modal-footer{display:flex;justify-content:space-between!important}::ng-deep button,button{cursor:pointer}\n"], dependencies: [{ kind: "component", type: i5.VerbenDialogueComponent, selector: "verben-dialogue", inputs: ["dialogueWidth", "headerTemplate", "bodyTemplate", "footerTemplate", "showCloseIcon", "dismissOutsideClick", "closeOnEscape", "isVisible", "size", "backdropColor", "customClass", "disableFooter", "margin", "padding", "borderRadius", "dialogueBgColor", "width", "closeIconClass", "boxShadow", "enableTransition", "modalData", "mode", "position", "drawerWidth"], outputs: ["openModal", "closeModal"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.VerbenaButtonComponent, selector: "verbena-button", inputs: ["type", "text", "icon", "useIcon", "svgPosition", "iconPosition", "bgColor", "textColor", "border", "borderRadius", "pd", "width", "height", "fontSize", "fontWeight", "disable", "svgSize", "weight", "variant", "styleType", "svg", "svgWidth", "svgHeight", "iconColor", "svgColor", "buttonClass", "buttonTextClass", "isLoading", "spinnerSize", "spinnerColor"] }, { kind: "component", type: i5.DropDownComponent, selector: "verben-drop-down", inputs: ["options", "width", "overlayWidth", "showHorizontalLine", "horizontalLineColor", "optionLabel", "optionSubLabel", "optionValue", "placeholder", "invalidMessage", "errorPosition", "loadMoreCaption", "display", "showClear", "lazyLoad", "selectKey", "styleClass", "group", "multiselect", "filter", "avoidDuplication", "filterBy", "debounceTime", "minChar", "refPageSize", "disabled", "required", "load", "asyncLabel", "search"], outputs: ["optionsChange", "onChange", "onClick", "onClear"] }, { kind: "component", type: i5.VerbenaInputComponent, selector: "verbena-input", inputs: ["disabled", "label", "placeHolder", "required", "svgPosition", "minLength", "maxLength", "type", "bgColor", "border", "borderRadius", "textColor", "value", "labelPosition", "labelColor", "disable", "readOnly", "min", "max", "showBorder", "showErrorMessage", "errorMessageColor", "errorBorderColor", "errorPosition", "svg", "fontSize", "svgWidth", "svgHeight", "svgColor", "capitalization", "inputContainerClass", "inputFieldClass", "passLength", "inputWrapperClass", "passwordToggle", "customErrorMessages", "icon", "textPass"], outputs: ["valueChange"] }, { kind: "component", type: i5.NumberInputComponent, selector: "verben-number-input", inputs: ["min", "max", "step", "value", "label", "controlButton", "disabled"], outputs: ["valueChange", "keyUp"] }] });
|
|
2748
2774
|
}
|
|
2749
2775
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ActionDialogComponent, decorators: [{
|
|
2750
2776
|
type: Component,
|
|
2751
|
-
args: [{ selector: 'lib-action-dialog', template: "<verben-dialogue
|
|
2777
|
+
args: [{ selector: 'lib-action-dialog', template: "<verben-dialogue\n [showCloseIcon]=\"true\"\n [dismissOutsideClick]=\"true\"\n [closeOnEscape]=\"true\"\n [size]=\"'medium'\"\n [mode]=\"'drawer'\"\n [disableFooter]=\"false\"\n [isVisible]=\"visible()\"\n [headerTemplate]=\"headerTemplate\"\n [bodyTemplate]=\"bodyTemplate\"\n [footerTemplate]=\"footerTemplate\"\n (openModal)=\"onDialogOpen($event)\"\n (closeModal)=\"onDialogClose($event)\"\n>\n</verben-dialogue>\n\n<ng-template #headerTemplate>\n <div\n class=\"flex items-center justify-between p-3 text-xs border-b-4 border-[var(--vbn-color-primary)]\"\n >\n <button class=\"mr-4\" type=\"button\" (click)=\"onDialogClose($event)\">\n <span\n class=\"block w-2.5 h-2.5 border-t border-l border-[var(--vbn-color-text)]/70 transform -rotate-45\"\n ></span>\n </button>\n </div>\n</ng-template>\n\n<ng-template #bodyTemplate>\n <form [formGroup]=\"actionForm\" class=\"mb-4 space-y-4\">\n <verbena-input\n name=\"Name\"\n label=\"Name\"\n formControlName=\"Name\"\n placeHolder=\"Enter Name\"\n />\n\n <div class=\"space-y-1\">\n <label\n for=\"operation-action\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Operation Action\n </label>\n <verben-drop-down\n id=\"operation-action\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n filterBy=\"Name\"\n placeholder=\"Select Operation Action\"\n [options]=\"operationActions()\"\n optionLabel=\"Name\"\n optionValue=\"Code\"\n formControlName=\"OperationAction\"\n class=\"form-control\"\n [showClear]=\"true\"\n [filter]=\"true\"\n ></verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label\n for=\"target-status\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Target Status\n </label>\n <verben-drop-down\n id=\"target-status\"\n styleClass=\"w-full\"\n width=\"100%\"\n [multiselect]=\"false\"\n filterBy=\"Description\"\n placeholder=\"Select Target Status\"\n [options]=\"flowableStatuses()\"\n optionLabel=\"Description\"\n optionValue=\"Name\"\n formControlName=\"TargetStatus\"\n class=\"form-control\"\n [showClear]=\"true\"\n [filter]=\"true\"\n ></verben-drop-down>\n </div>\n\n <div class=\"space-y-1\">\n <label\n for=\"position\"\n class=\"text-sm font-semibold text-[var(--vbn-color-text)]\"\n >\n Position\n </label>\n <verben-number-input\n id=\"position\"\n name=\"Position\"\n class=\"form-control\"\n formControlName=\"Position\"\n placeholder=\"Enter Position\"\n ></verben-number-input>\n </div>\n </form>\n</ng-template>\n\n<ng-template #footerTemplate>\n <div class=\"flex gap-2 items-center justify-end\">\n <verbena-button\n (click)=\"onDialogClose($event)\"\n text=\"Cancel\"\n styleType=\"ylw-outline\"\n class=\"ml-auto\"\n ></verbena-button>\n <verbena-button\n type=\"submit\"\n text=\"Save\"\n bgColor=\"var(--vbn-color-primary)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n pd=\"10px 20px\"\n width=\"114px\"\n height=\"39px\"\n (click)=\"saveAction()\"\n [disable]=\"actionForm.invalid\"\n ></verbena-button>\n <verbena-button\n width=\"114px\"\n height=\"39px\"\n text=\"Delete\"\n bgColor=\"var(--vbn-color-text-muted)\"\n textColor=\"var(--vbn-color-on-primary)\"\n borderRadius=\"10px\"\n (click)=\"deleteAction()\"\n ></verbena-button>\n </div>\n</ng-template>\n", styles: ["::ng-deep .modal-footer{display:flex;justify-content:space-between!important}::ng-deep button,button{cursor:pointer}\n"] }]
|
|
2752
2778
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: WorkflowDataService }, { type: WorkflowDesignerState }], propDecorators: { closed: [{
|
|
2753
2779
|
type: Output
|
|
2754
2780
|
}], saved: [{
|
|
@@ -3003,6 +3029,7 @@ class DesignerCanvasComponent {
|
|
|
3003
3029
|
connection.label = actionData.label;
|
|
3004
3030
|
connection.action = actionData.action;
|
|
3005
3031
|
connection.targetStatus = actionData.targetStatus;
|
|
3032
|
+
connection.position = actionData.position;
|
|
3006
3033
|
}
|
|
3007
3034
|
return connection;
|
|
3008
3035
|
});
|
|
@@ -3194,7 +3221,8 @@ class DesignerCanvasComponent {
|
|
|
3194
3221
|
// The node is STILL in the source swimlane's array during preview,
|
|
3195
3222
|
// so swimlane.order = draggingNodeSwimlaneIndex.
|
|
3196
3223
|
node.x = newAbsoluteX;
|
|
3197
|
-
node.y =
|
|
3224
|
+
node.y =
|
|
3225
|
+
newAbsoluteY - this.draggingNodeSwimlaneIndex * this.swimlaneHeight;
|
|
3198
3226
|
// Store computed values for onNodeDragEnd
|
|
3199
3227
|
this._pendingTargetSwimlaneIndex = targetSwimlaneIndex;
|
|
3200
3228
|
this._pendingAbsoluteY = newAbsoluteY;
|
|
@@ -3243,7 +3271,9 @@ class DesignerCanvasComponent {
|
|
|
3243
3271
|
* Shows 'grabbing' while the node is being dragged, 'grab' otherwise.
|
|
3244
3272
|
*/
|
|
3245
3273
|
getCursorForNode(nodeId) {
|
|
3246
|
-
return this.isDraggingNode && this.draggingNode?.id === nodeId
|
|
3274
|
+
return this.isDraggingNode && this.draggingNode?.id === nodeId
|
|
3275
|
+
? 'grabbing'
|
|
3276
|
+
: 'grab';
|
|
3247
3277
|
}
|
|
3248
3278
|
// ─────────────────────────────────────────────────────────────────────────
|
|
3249
3279
|
// Connection drag logic (existing)
|
|
@@ -3316,6 +3346,7 @@ class DesignerCanvasComponent {
|
|
|
3316
3346
|
targetSwimlaneIndex: targetPointInfo.swimlaneIndex,
|
|
3317
3347
|
label: '',
|
|
3318
3348
|
action: null,
|
|
3349
|
+
position: 1,
|
|
3319
3350
|
};
|
|
3320
3351
|
// Add to connections array
|
|
3321
3352
|
this.state.connections.push(connection);
|
|
@@ -3495,8 +3526,7 @@ class DesignerCanvasComponent {
|
|
|
3495
3526
|
if (nodeType === 'stage') {
|
|
3496
3527
|
// Create the stage in the target swimlane. `addNode` converts the
|
|
3497
3528
|
// absolute endY to a swimlane-relative position internally.
|
|
3498
|
-
const newNode = this.state.addNode(targetSwimlaneIndex, 'stage', endX, endY, { Name: 'New Stage' }
|
|
3499
|
-
);
|
|
3529
|
+
const newNode = this.state.addNode(targetSwimlaneIndex, 'stage', endX, endY, { Name: 'New Stage' });
|
|
3500
3530
|
if (newNode &&
|
|
3501
3531
|
newNode.connectionPoints &&
|
|
3502
3532
|
newNode.connectionPoints.length > 0 &&
|
|
@@ -3567,8 +3597,7 @@ class DesignerCanvasComponent {
|
|
|
3567
3597
|
}
|
|
3568
3598
|
const { decisionNodeId, swimlaneIndex, x, y } = this.pendingDecisionConnection;
|
|
3569
3599
|
// Create the stage directly with default properties
|
|
3570
|
-
const node = this.state.addNode(swimlaneIndex, 'stage', x, y, { Name: 'New Stage' }
|
|
3571
|
-
);
|
|
3600
|
+
const node = this.state.addNode(swimlaneIndex, 'stage', x, y, { Name: 'New Stage' });
|
|
3572
3601
|
if (node) {
|
|
3573
3602
|
const decisionNodeInfo = this.state.findNodeById(decisionNodeId);
|
|
3574
3603
|
if (decisionNodeInfo &&
|
|
@@ -3600,6 +3629,7 @@ class DesignerCanvasComponent {
|
|
|
3600
3629
|
condition: event.condition,
|
|
3601
3630
|
label: '',
|
|
3602
3631
|
action: null,
|
|
3632
|
+
position: 1,
|
|
3603
3633
|
};
|
|
3604
3634
|
// Add connection to the state
|
|
3605
3635
|
this.state.connections.push(connection);
|
|
@@ -3862,6 +3892,7 @@ class DesignerCanvasComponent {
|
|
|
3862
3892
|
targetSwimlaneIndex: swimlaneIndex,
|
|
3863
3893
|
label: '',
|
|
3864
3894
|
action: null,
|
|
3895
|
+
position: 1,
|
|
3865
3896
|
};
|
|
3866
3897
|
// Add connection directly to the state's connections array
|
|
3867
3898
|
this.state.connections.push(connection);
|
|
@@ -4051,7 +4082,7 @@ class SwimlaneDialogComponent {
|
|
|
4051
4082
|
if (sData) {
|
|
4052
4083
|
this.workflowName = sData.name || '';
|
|
4053
4084
|
// Set selected tags
|
|
4054
|
-
this.selectedTags = sData.tags;
|
|
4085
|
+
this.selectedTags = sData.tags || [];
|
|
4055
4086
|
}
|
|
4056
4087
|
});
|
|
4057
4088
|
}
|
|
@@ -4109,8 +4140,7 @@ class SwimlaneDialogComponent {
|
|
|
4109
4140
|
this.selectedTagNames = [];
|
|
4110
4141
|
this.closed.emit();
|
|
4111
4142
|
}
|
|
4112
|
-
onDialogOpen(eventData) {
|
|
4113
|
-
}
|
|
4143
|
+
onDialogOpen(eventData) { }
|
|
4114
4144
|
applySelection() {
|
|
4115
4145
|
const selectedTags = this.tags.filter((tag) => this.selectedTagNames.includes(tag.Name));
|
|
4116
4146
|
this.created.emit({
|
|
@@ -4487,6 +4517,7 @@ class WorkflowDesignerComponent {
|
|
|
4487
4517
|
label: action.Name || '',
|
|
4488
4518
|
action: action.OperationAction || null,
|
|
4489
4519
|
targetStatus: action.TargetStatus || undefined,
|
|
4520
|
+
position: action.Position || 1,
|
|
4490
4521
|
};
|
|
4491
4522
|
this.state.connections.push(connection);
|
|
4492
4523
|
// Register loaded action
|
|
@@ -4561,8 +4592,7 @@ class WorkflowDesignerComponent {
|
|
|
4561
4592
|
case 'stage':
|
|
4562
4593
|
if (swimlaneIndex >= 0 && swimlaneIndex < this.state.swimlanes.length) {
|
|
4563
4594
|
// Create the stage directly with default properties
|
|
4564
|
-
const node = this.state.addNode(swimlaneIndex, 'stage', event.x, event.y, { Name: 'New Stage' }
|
|
4565
|
-
);
|
|
4595
|
+
const node = this.state.addNode(swimlaneIndex, 'stage', event.x, event.y, { Name: 'New Stage' });
|
|
4566
4596
|
if (node) {
|
|
4567
4597
|
// Reset the selected tool after placing a node
|
|
4568
4598
|
this.selectedTool = null;
|
|
@@ -4846,6 +4876,7 @@ class ConnectionService {
|
|
|
4846
4876
|
targetSwimlaneIndex: targetSwimlaneIndex,
|
|
4847
4877
|
label: '', // Default label, can be set later
|
|
4848
4878
|
action: null,
|
|
4879
|
+
position: 1,
|
|
4849
4880
|
};
|
|
4850
4881
|
// Add the connection to the state
|
|
4851
4882
|
this.state.connections.push(connection);
|
|
@@ -5130,6 +5161,7 @@ class TransformerService {
|
|
|
5130
5161
|
ToStage: conn.targetNodeId,
|
|
5131
5162
|
IsParallel: sourceNode?.stageData?.IsParallel || false,
|
|
5132
5163
|
PassOnRule: '', // Optional property
|
|
5164
|
+
Position: conn.position,
|
|
5133
5165
|
};
|
|
5134
5166
|
});
|
|
5135
5167
|
workflow.Stages = stages;
|
|
@@ -5205,6 +5237,7 @@ class TransformerService {
|
|
|
5205
5237
|
targetSwimlaneIndex: targetNodeInfo.swimlaneIndex,
|
|
5206
5238
|
label: action.Name,
|
|
5207
5239
|
action: action.OperationAction,
|
|
5240
|
+
position: action.Position,
|
|
5208
5241
|
};
|
|
5209
5242
|
this.state.connections.push(connection);
|
|
5210
5243
|
// Register loaded action
|
|
@@ -5284,7 +5317,8 @@ class WorkflowDesignerModule {
|
|
|
5284
5317
|
EditorModule,
|
|
5285
5318
|
VerbenaInputModule,
|
|
5286
5319
|
VerbenaSwitchModule,
|
|
5287
|
-
VerbenaTextareaModule
|
|
5320
|
+
VerbenaTextareaModule,
|
|
5321
|
+
NumberInputModule], exports: [WorkflowDesignerComponent] });
|
|
5288
5322
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowDesignerModule, providers: [
|
|
5289
5323
|
NodeManagementService,
|
|
5290
5324
|
ConnectionService,
|
|
@@ -5302,7 +5336,8 @@ class WorkflowDesignerModule {
|
|
|
5302
5336
|
EditorModule,
|
|
5303
5337
|
VerbenaInputModule,
|
|
5304
5338
|
VerbenaSwitchModule,
|
|
5305
|
-
VerbenaTextareaModule
|
|
5339
|
+
VerbenaTextareaModule,
|
|
5340
|
+
NumberInputModule] });
|
|
5306
5341
|
}
|
|
5307
5342
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WorkflowDesignerModule, decorators: [{
|
|
5308
5343
|
type: NgModule,
|
|
@@ -5333,6 +5368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5333
5368
|
VerbenaInputModule,
|
|
5334
5369
|
VerbenaSwitchModule,
|
|
5335
5370
|
VerbenaTextareaModule,
|
|
5371
|
+
NumberInputModule,
|
|
5336
5372
|
],
|
|
5337
5373
|
providers: [
|
|
5338
5374
|
NodeManagementService,
|