@memberjunction/ng-core-entity-forms 2.74.0 → 2.76.0
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 +124 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-diagram.component.d.ts +109 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-diagram.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-diagram.component.js +2020 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-diagram.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.d.ts +32 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.js +413 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/step-info-control.component.d.ts +9 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/step-info-control.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/step-info-control.component.js +84 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/step-info-control.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +34 -6
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js +656 -520
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts +11 -6
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +459 -448
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -1
- package/dist/lib/custom/Actions/action-execution-log-form.component.js +51 -49
- package/dist/lib/custom/Actions/action-execution-log-form.component.js.map +1 -1
- package/dist/lib/custom/Actions/action-test-harness.component.d.ts.map +1 -1
- package/dist/lib/custom/Actions/action-test-harness.component.js +5 -3
- package/dist/lib/custom/Actions/action-test-harness.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts +35 -7
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js +235 -219
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.d.ts +37 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.js +117 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.d.ts +49 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.js +211 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts +33 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js +265 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js +0 -8
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts +4 -8
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js +47 -189
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-visualization.component.d.ts +71 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-visualization.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-visualization.component.js +931 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-visualization.component.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts +10 -4
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +257 -295
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
- package/dist/lib/custom/custom-forms.module.d.ts +30 -25
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +31 -4
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/generated/Entities/AIAgent/aiagent.form.component.js +34 -14
- package/dist/lib/generated/Entities/AIAgent/aiagent.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIAgentStep/aiagentstep.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/AIAgentStep/aiagentstep.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/AIAgentStep/aiagentstep.form.component.js +80 -0
- package/dist/lib/generated/Entities/AIAgentStep/aiagentstep.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/AIAgentStep/sections/details.component.d.ts +11 -0
- package/dist/lib/generated/Entities/AIAgentStep/sections/details.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/AIAgentStep/sections/details.component.js +277 -0
- package/dist/lib/generated/Entities/AIAgentStep/sections/details.component.js.map +1 -0
- package/dist/lib/generated/Entities/AIAgentStepPath/aiagentsteppath.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/AIAgentStepPath/aiagentsteppath.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/AIAgentStepPath/aiagentsteppath.form.component.js +59 -0
- package/dist/lib/generated/Entities/AIAgentStepPath/aiagentsteppath.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/AIAgentStepPath/sections/details.component.d.ts +11 -0
- package/dist/lib/generated/Entities/AIAgentStepPath/sections/details.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/AIAgentStepPath/sections/details.component.js +147 -0
- package/dist/lib/generated/Entities/AIAgentStepPath/sections/details.component.js.map +1 -0
- package/dist/lib/generated/Entities/AIAgentType/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/AIAgentType/sections/details.component.js +31 -4
- package/dist/lib/generated/Entities/AIAgentType/sections/details.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIPrompt/aiprompt.form.component.js +16 -6
- package/dist/lib/generated/Entities/AIPrompt/aiprompt.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIPromptRun/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/AIPromptRun/sections/details.component.js +15 -4
- package/dist/lib/generated/Entities/AIPromptRun/sections/details.component.js.map +1 -1
- package/dist/lib/generated/Entities/Action/action.form.component.js +19 -9
- package/dist/lib/generated/Entities/Action/action.form.component.js.map +1 -1
- package/dist/lib/generated/generated-forms.module.d.ts +294 -285
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +183 -110
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +21 -17
|
@@ -0,0 +1,2020 @@
|
|
|
1
|
+
import { Component, ViewChild, Input, Output, EventEmitter, HostListener } from '@angular/core';
|
|
2
|
+
import { Subject, debounceTime, takeUntil } from 'rxjs';
|
|
3
|
+
import { Metadata } from '@memberjunction/core';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@progress/kendo-angular-dialog";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
7
|
+
import * as i3 from "@progress/kendo-angular-layout";
|
|
8
|
+
import * as i4 from "@progress/kendo-angular-dropdowns";
|
|
9
|
+
const _c0 = ["reteContainer"];
|
|
10
|
+
function FlowAgentDiagramComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
12
|
+
i0.ɵɵelement(1, "i", 6);
|
|
13
|
+
i0.ɵɵelementStart(2, "span");
|
|
14
|
+
i0.ɵɵtext(3, "Loading flow diagram...");
|
|
15
|
+
i0.ɵɵelementEnd()();
|
|
16
|
+
} }
|
|
17
|
+
function FlowAgentDiagramComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
19
|
+
i0.ɵɵelement(1, "i", 7);
|
|
20
|
+
i0.ɵɵelementStart(2, "span");
|
|
21
|
+
i0.ɵɵtext(3);
|
|
22
|
+
i0.ɵɵelementEnd()();
|
|
23
|
+
} if (rf & 2) {
|
|
24
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
25
|
+
i0.ɵɵadvance(3);
|
|
26
|
+
i0.ɵɵtextInterpolate(ctx_r0.error);
|
|
27
|
+
} }
|
|
28
|
+
function FlowAgentDiagramComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
+
i0.ɵɵelementStart(0, "div", 4);
|
|
30
|
+
i0.ɵɵelement(1, "i", 8);
|
|
31
|
+
i0.ɵɵelementStart(2, "span");
|
|
32
|
+
i0.ɵɵtext(3, "No workflow steps to display");
|
|
33
|
+
i0.ɵɵelementEnd()();
|
|
34
|
+
} }
|
|
35
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
37
|
+
i0.ɵɵelementStart(0, "button", 29);
|
|
38
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_5_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.autoArrange()); });
|
|
39
|
+
i0.ɵɵelement(1, "i", 30);
|
|
40
|
+
i0.ɵɵtext(2, " Auto Arrange ");
|
|
41
|
+
i0.ɵɵelementEnd();
|
|
42
|
+
} }
|
|
43
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_5_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
44
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
45
|
+
i0.ɵɵelementStart(0, "button", 31);
|
|
46
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_5_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.cancelConnectionMode()); });
|
|
47
|
+
i0.ɵɵelement(1, "i", 32);
|
|
48
|
+
i0.ɵɵtext(2, " Cancel Connection ");
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
} }
|
|
51
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
53
|
+
i0.ɵɵelementStart(0, "button", 25);
|
|
54
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.addNewStep()); });
|
|
55
|
+
i0.ɵɵelement(1, "i", 26);
|
|
56
|
+
i0.ɵɵtext(2, " Add Step ");
|
|
57
|
+
i0.ɵɵelementEnd();
|
|
58
|
+
i0.ɵɵtemplate(3, FlowAgentDiagramComponent_Conditional_4_Conditional_5_Conditional_3_Template, 3, 0, "button", 27)(4, FlowAgentDiagramComponent_Conditional_4_Conditional_5_Conditional_4_Template, 3, 0, "button", 28);
|
|
59
|
+
} if (rf & 2) {
|
|
60
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
61
|
+
i0.ɵɵadvance(3);
|
|
62
|
+
i0.ɵɵconditional(false ? 3 : -1);
|
|
63
|
+
i0.ɵɵadvance();
|
|
64
|
+
i0.ɵɵconditional(ctx_r0.connectionMode ? 4 : -1);
|
|
65
|
+
} }
|
|
66
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
67
|
+
i0.ɵɵnamespaceSVG();
|
|
68
|
+
i0.ɵɵelement(0, "path", 21);
|
|
69
|
+
} if (rf & 2) {
|
|
70
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
71
|
+
i0.ɵɵattribute("d", ctx_r0.tempConnection.path);
|
|
72
|
+
} }
|
|
73
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
74
|
+
i0.ɵɵelementStart(0, "div", 22);
|
|
75
|
+
i0.ɵɵtext(1, " Click on a target step to create connection ");
|
|
76
|
+
i0.ɵɵelementEnd();
|
|
77
|
+
} }
|
|
78
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_18_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
79
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
80
|
+
i0.ɵɵelementStart(0, "button", 35);
|
|
81
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_18_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.connectFromContextMenu()); });
|
|
82
|
+
i0.ɵɵelement(1, "i", 36);
|
|
83
|
+
i0.ɵɵtext(2, " Connect To... ");
|
|
84
|
+
i0.ɵɵelementEnd();
|
|
85
|
+
i0.ɵɵelementStart(3, "button", 37);
|
|
86
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_18_Conditional_1_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.deleteFromContextMenu()); });
|
|
87
|
+
i0.ɵɵelement(4, "i", 38);
|
|
88
|
+
i0.ɵɵtext(5, " Delete Step ");
|
|
89
|
+
i0.ɵɵelementEnd();
|
|
90
|
+
} }
|
|
91
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_18_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
92
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
93
|
+
i0.ɵɵelementStart(0, "button", 37);
|
|
94
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_18_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.deletePathFromContextMenu()); });
|
|
95
|
+
i0.ɵɵelement(1, "i", 38);
|
|
96
|
+
i0.ɵɵtext(2, " Delete Path ");
|
|
97
|
+
i0.ɵɵelementEnd();
|
|
98
|
+
} }
|
|
99
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
100
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
101
|
+
i0.ɵɵelementStart(0, "div", 33);
|
|
102
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_18_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r6); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
103
|
+
i0.ɵɵtemplate(1, FlowAgentDiagramComponent_Conditional_4_Conditional_18_Conditional_1_Template, 6, 0)(2, FlowAgentDiagramComponent_Conditional_4_Conditional_18_Conditional_2_Template, 3, 0, "button", 34);
|
|
104
|
+
i0.ɵɵelementEnd();
|
|
105
|
+
} if (rf & 2) {
|
|
106
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
107
|
+
i0.ɵɵstyleProp("left", ctx_r0.contextMenu.x, "px")("top", ctx_r0.contextMenu.y, "px");
|
|
108
|
+
i0.ɵɵadvance();
|
|
109
|
+
i0.ɵɵconditional(ctx_r0.contextMenu.type === "step" ? 1 : ctx_r0.contextMenu.type === "path" ? 2 : -1);
|
|
110
|
+
} }
|
|
111
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
112
|
+
i0.ɵɵelement(0, "i", 43);
|
|
113
|
+
i0.ɵɵtext(1, " Step Properties ");
|
|
114
|
+
} }
|
|
115
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
116
|
+
i0.ɵɵelement(0, "i", 44);
|
|
117
|
+
i0.ɵɵtext(1, " Path Properties ");
|
|
118
|
+
} }
|
|
119
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
120
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
121
|
+
i0.ɵɵelementStart(0, "input", 53);
|
|
122
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_6_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r0.selectedStep.Name, $event) || (ctx_r0.selectedStep.Name = $event); return i0.ɵɵresetView($event); });
|
|
123
|
+
i0.ɵɵlistener("blur", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_6_Template_input_blur_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.saveStepProperties()); });
|
|
124
|
+
i0.ɵɵelementEnd();
|
|
125
|
+
} if (rf & 2) {
|
|
126
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
127
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.selectedStep.Name);
|
|
128
|
+
} }
|
|
129
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
130
|
+
i0.ɵɵelementStart(0, "div", 49);
|
|
131
|
+
i0.ɵɵtext(1);
|
|
132
|
+
i0.ɵɵelementEnd();
|
|
133
|
+
} if (rf & 2) {
|
|
134
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
135
|
+
i0.ɵɵadvance();
|
|
136
|
+
i0.ɵɵtextInterpolate(ctx_r0.selectedStep.Name);
|
|
137
|
+
} }
|
|
138
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
139
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
140
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 54);
|
|
141
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_11_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r0 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r0.selectedStep.StepType, $event) || (ctx_r0.selectedStep.StepType = $event); return i0.ɵɵresetView($event); });
|
|
142
|
+
i0.ɵɵlistener("valueChange", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_11_Template_kendo_dropdownlist_valueChange_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.saveStepProperties()); });
|
|
143
|
+
i0.ɵɵelementEnd();
|
|
144
|
+
} if (rf & 2) {
|
|
145
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
146
|
+
i0.ɵɵproperty("data", ctx_r0.stepTypes);
|
|
147
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.selectedStep.StepType);
|
|
148
|
+
} }
|
|
149
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
150
|
+
i0.ɵɵelementStart(0, "div", 49);
|
|
151
|
+
i0.ɵɵtext(1);
|
|
152
|
+
i0.ɵɵelementEnd();
|
|
153
|
+
} if (rf & 2) {
|
|
154
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
155
|
+
i0.ɵɵadvance();
|
|
156
|
+
i0.ɵɵtextInterpolate(ctx_r0.selectedStep.StepType);
|
|
157
|
+
} }
|
|
158
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
159
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
160
|
+
i0.ɵɵelementStart(0, "textarea", 55);
|
|
161
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_16_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r0 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r0.selectedStep.Description, $event) || (ctx_r0.selectedStep.Description = $event); return i0.ɵɵresetView($event); });
|
|
162
|
+
i0.ɵɵlistener("blur", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_16_Template_textarea_blur_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.saveStepProperties()); });
|
|
163
|
+
i0.ɵɵelementEnd();
|
|
164
|
+
} if (rf & 2) {
|
|
165
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
166
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.selectedStep.Description);
|
|
167
|
+
} }
|
|
168
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
169
|
+
i0.ɵɵelementStart(0, "div", 49);
|
|
170
|
+
i0.ɵɵtext(1);
|
|
171
|
+
i0.ɵɵelementEnd();
|
|
172
|
+
} if (rf & 2) {
|
|
173
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
174
|
+
i0.ɵɵadvance();
|
|
175
|
+
i0.ɵɵtextInterpolate(ctx_r0.selectedStep.Description || "No description");
|
|
176
|
+
} }
|
|
177
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
178
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
179
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 54);
|
|
180
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_21_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r0 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r0.selectedStep.Status, $event) || (ctx_r0.selectedStep.Status = $event); return i0.ɵɵresetView($event); });
|
|
181
|
+
i0.ɵɵlistener("valueChange", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_21_Template_kendo_dropdownlist_valueChange_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.saveStepProperties()); });
|
|
182
|
+
i0.ɵɵelementEnd();
|
|
183
|
+
} if (rf & 2) {
|
|
184
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
185
|
+
i0.ɵɵproperty("data", ctx_r0.stepStatuses);
|
|
186
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.selectedStep.Status);
|
|
187
|
+
} }
|
|
188
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_22_Template(rf, ctx) { if (rf & 1) {
|
|
189
|
+
i0.ɵɵelementStart(0, "div", 49);
|
|
190
|
+
i0.ɵɵtext(1);
|
|
191
|
+
i0.ɵɵelementEnd();
|
|
192
|
+
} if (rf & 2) {
|
|
193
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
194
|
+
i0.ɵɵadvance();
|
|
195
|
+
i0.ɵɵtextInterpolate(ctx_r0.selectedStep.Status);
|
|
196
|
+
} }
|
|
197
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
198
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
199
|
+
i0.ɵɵelementStart(0, "textarea", 57);
|
|
200
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_6_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r0 = i0.ɵɵnextContext(5); i0.ɵɵtwoWayBindingSet(ctx_r0.selectedStep.ActionInputMapping, $event) || (ctx_r0.selectedStep.ActionInputMapping = $event); return i0.ɵɵresetView($event); });
|
|
201
|
+
i0.ɵɵlistener("blur", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_6_Template_textarea_blur_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r0 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r0.saveStepProperties()); });
|
|
202
|
+
i0.ɵɵelementEnd();
|
|
203
|
+
} if (rf & 2) {
|
|
204
|
+
const ctx_r0 = i0.ɵɵnextContext(5);
|
|
205
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.selectedStep.ActionInputMapping);
|
|
206
|
+
} }
|
|
207
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
208
|
+
i0.ɵɵelementStart(0, "div", 49);
|
|
209
|
+
i0.ɵɵtext(1);
|
|
210
|
+
i0.ɵɵelementEnd();
|
|
211
|
+
} if (rf & 2) {
|
|
212
|
+
const ctx_r0 = i0.ɵɵnextContext(5);
|
|
213
|
+
i0.ɵɵadvance();
|
|
214
|
+
i0.ɵɵtextInterpolate(ctx_r0.selectedStep.ActionInputMapping || "None");
|
|
215
|
+
} }
|
|
216
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
217
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
218
|
+
i0.ɵɵelementStart(0, "textarea", 57);
|
|
219
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_11_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r0 = i0.ɵɵnextContext(5); i0.ɵɵtwoWayBindingSet(ctx_r0.selectedStep.ActionOutputMapping, $event) || (ctx_r0.selectedStep.ActionOutputMapping = $event); return i0.ɵɵresetView($event); });
|
|
220
|
+
i0.ɵɵlistener("blur", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_11_Template_textarea_blur_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r0 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r0.saveStepProperties()); });
|
|
221
|
+
i0.ɵɵelementEnd();
|
|
222
|
+
} if (rf & 2) {
|
|
223
|
+
const ctx_r0 = i0.ɵɵnextContext(5);
|
|
224
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.selectedStep.ActionOutputMapping);
|
|
225
|
+
} }
|
|
226
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
227
|
+
i0.ɵɵelementStart(0, "div", 49);
|
|
228
|
+
i0.ɵɵtext(1);
|
|
229
|
+
i0.ɵɵelementEnd();
|
|
230
|
+
} if (rf & 2) {
|
|
231
|
+
const ctx_r0 = i0.ɵɵnextContext(5);
|
|
232
|
+
i0.ɵɵadvance();
|
|
233
|
+
i0.ɵɵtextInterpolate(ctx_r0.selectedStep.ActionOutputMapping || "None");
|
|
234
|
+
} }
|
|
235
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Template(rf, ctx) { if (rf & 1) {
|
|
236
|
+
i0.ɵɵelementStart(0, "div", 45)(1, "h5");
|
|
237
|
+
i0.ɵɵtext(2, "Action Configuration");
|
|
238
|
+
i0.ɵɵelementEnd();
|
|
239
|
+
i0.ɵɵelementStart(3, "div", 46)(4, "div", 47);
|
|
240
|
+
i0.ɵɵtext(5, "Input Mapping");
|
|
241
|
+
i0.ɵɵelementEnd();
|
|
242
|
+
i0.ɵɵtemplate(6, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_6_Template, 1, 1, "textarea", 56)(7, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_7_Template, 2, 1, "div", 49);
|
|
243
|
+
i0.ɵɵelementEnd();
|
|
244
|
+
i0.ɵɵelementStart(8, "div", 46)(9, "div", 47);
|
|
245
|
+
i0.ɵɵtext(10, "Output Mapping");
|
|
246
|
+
i0.ɵɵelementEnd();
|
|
247
|
+
i0.ɵɵtemplate(11, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_11_Template, 1, 1, "textarea", 56)(12, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Conditional_12_Template, 2, 1, "div", 49);
|
|
248
|
+
i0.ɵɵelementEnd()();
|
|
249
|
+
} if (rf & 2) {
|
|
250
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
251
|
+
i0.ɵɵadvance(6);
|
|
252
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 6 : 7);
|
|
253
|
+
i0.ɵɵadvance(5);
|
|
254
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 11 : 12);
|
|
255
|
+
} }
|
|
256
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_24_Template(rf, ctx) { if (rf & 1) {
|
|
257
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
258
|
+
i0.ɵɵelementStart(0, "div", 52)(1, "button", 58);
|
|
259
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_24_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.deleteSelectedStep()); });
|
|
260
|
+
i0.ɵɵelement(2, "i", 38);
|
|
261
|
+
i0.ɵɵtext(3, " Delete Step ");
|
|
262
|
+
i0.ɵɵelementEnd();
|
|
263
|
+
i0.ɵɵelementStart(4, "button", 59);
|
|
264
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_24_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r16); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.connectFromStep()); });
|
|
265
|
+
i0.ɵɵelement(5, "i", 36);
|
|
266
|
+
i0.ɵɵtext(6, " Connect To... ");
|
|
267
|
+
i0.ɵɵelementEnd()();
|
|
268
|
+
} if (rf & 2) {
|
|
269
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
270
|
+
i0.ɵɵadvance(4);
|
|
271
|
+
i0.ɵɵproperty("disabled", ctx_r0.connectionMode);
|
|
272
|
+
} }
|
|
273
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
274
|
+
i0.ɵɵelementStart(0, "div", 45)(1, "h5");
|
|
275
|
+
i0.ɵɵtext(2, "Basic Information");
|
|
276
|
+
i0.ɵɵelementEnd();
|
|
277
|
+
i0.ɵɵelementStart(3, "div", 46)(4, "div", 47);
|
|
278
|
+
i0.ɵɵtext(5, "Name");
|
|
279
|
+
i0.ɵɵelementEnd();
|
|
280
|
+
i0.ɵɵtemplate(6, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_6_Template, 1, 1, "input", 48)(7, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_7_Template, 2, 1, "div", 49);
|
|
281
|
+
i0.ɵɵelementEnd();
|
|
282
|
+
i0.ɵɵelementStart(8, "div", 46)(9, "div", 47);
|
|
283
|
+
i0.ɵɵtext(10, "Type");
|
|
284
|
+
i0.ɵɵelementEnd();
|
|
285
|
+
i0.ɵɵtemplate(11, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_11_Template, 1, 2, "kendo-dropdownlist", 50)(12, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_12_Template, 2, 1, "div", 49);
|
|
286
|
+
i0.ɵɵelementEnd();
|
|
287
|
+
i0.ɵɵelementStart(13, "div", 46)(14, "div", 47);
|
|
288
|
+
i0.ɵɵtext(15, "Description");
|
|
289
|
+
i0.ɵɵelementEnd();
|
|
290
|
+
i0.ɵɵtemplate(16, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_16_Template, 1, 1, "textarea", 51)(17, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_17_Template, 2, 1, "div", 49);
|
|
291
|
+
i0.ɵɵelementEnd();
|
|
292
|
+
i0.ɵɵelementStart(18, "div", 46)(19, "div", 47);
|
|
293
|
+
i0.ɵɵtext(20, "Status");
|
|
294
|
+
i0.ɵɵelementEnd();
|
|
295
|
+
i0.ɵɵtemplate(21, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_21_Template, 1, 2, "kendo-dropdownlist", 50)(22, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_22_Template, 2, 1, "div", 49);
|
|
296
|
+
i0.ɵɵelementEnd()();
|
|
297
|
+
i0.ɵɵtemplate(23, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_23_Template, 13, 2, "div", 45)(24, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Conditional_24_Template, 7, 1, "div", 52);
|
|
298
|
+
} if (rf & 2) {
|
|
299
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
300
|
+
i0.ɵɵadvance(6);
|
|
301
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 6 : 7);
|
|
302
|
+
i0.ɵɵadvance(5);
|
|
303
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 11 : 12);
|
|
304
|
+
i0.ɵɵadvance(5);
|
|
305
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 16 : 17);
|
|
306
|
+
i0.ɵɵadvance(5);
|
|
307
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 21 : 22);
|
|
308
|
+
i0.ɵɵadvance(2);
|
|
309
|
+
i0.ɵɵconditional(ctx_r0.selectedStep.StepType === "Action" ? 23 : -1);
|
|
310
|
+
i0.ɵɵadvance();
|
|
311
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 24 : -1);
|
|
312
|
+
} }
|
|
313
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
314
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
315
|
+
i0.ɵɵelementStart(0, "textarea", 55);
|
|
316
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_16_Template_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r0.selectedPath.Condition, $event) || (ctx_r0.selectedPath.Condition = $event); return i0.ɵɵresetView($event); });
|
|
317
|
+
i0.ɵɵlistener("blur", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_16_Template_textarea_blur_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.savePathProperties()); });
|
|
318
|
+
i0.ɵɵelementEnd();
|
|
319
|
+
} if (rf & 2) {
|
|
320
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
321
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.selectedPath.Condition);
|
|
322
|
+
} }
|
|
323
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
324
|
+
i0.ɵɵelementStart(0, "div", 49);
|
|
325
|
+
i0.ɵɵtext(1);
|
|
326
|
+
i0.ɵɵelementEnd();
|
|
327
|
+
} if (rf & 2) {
|
|
328
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
329
|
+
i0.ɵɵadvance();
|
|
330
|
+
i0.ɵɵtextInterpolate(ctx_r0.selectedPath.Condition || "No condition");
|
|
331
|
+
} }
|
|
332
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
333
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
334
|
+
i0.ɵɵelementStart(0, "input", 61);
|
|
335
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_21_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r0 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r0.selectedPath.Priority, $event) || (ctx_r0.selectedPath.Priority = $event); return i0.ɵɵresetView($event); });
|
|
336
|
+
i0.ɵɵlistener("blur", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_21_Template_input_blur_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.savePathProperties()); });
|
|
337
|
+
i0.ɵɵelementEnd();
|
|
338
|
+
} if (rf & 2) {
|
|
339
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
340
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r0.selectedPath.Priority);
|
|
341
|
+
} }
|
|
342
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_22_Template(rf, ctx) { if (rf & 1) {
|
|
343
|
+
i0.ɵɵelementStart(0, "div", 49);
|
|
344
|
+
i0.ɵɵtext(1);
|
|
345
|
+
i0.ɵɵelementEnd();
|
|
346
|
+
} if (rf & 2) {
|
|
347
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
348
|
+
i0.ɵɵadvance();
|
|
349
|
+
i0.ɵɵtextInterpolate(ctx_r0.selectedPath.Priority);
|
|
350
|
+
} }
|
|
351
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_23_Template(rf, ctx) { if (rf & 1) {
|
|
352
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
353
|
+
i0.ɵɵelementStart(0, "div", 52)(1, "button", 58);
|
|
354
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_23_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r19); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.deleteSelectedPath()); });
|
|
355
|
+
i0.ɵɵelement(2, "i", 38);
|
|
356
|
+
i0.ɵɵtext(3, " Delete Path ");
|
|
357
|
+
i0.ɵɵelementEnd()();
|
|
358
|
+
} }
|
|
359
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
360
|
+
i0.ɵɵelementStart(0, "div", 45)(1, "h5");
|
|
361
|
+
i0.ɵɵtext(2, "Path Information");
|
|
362
|
+
i0.ɵɵelementEnd();
|
|
363
|
+
i0.ɵɵelementStart(3, "div", 46)(4, "div", 47);
|
|
364
|
+
i0.ɵɵtext(5, "From Step");
|
|
365
|
+
i0.ɵɵelementEnd();
|
|
366
|
+
i0.ɵɵelementStart(6, "div", 49);
|
|
367
|
+
i0.ɵɵtext(7);
|
|
368
|
+
i0.ɵɵelementEnd()();
|
|
369
|
+
i0.ɵɵelementStart(8, "div", 46)(9, "div", 47);
|
|
370
|
+
i0.ɵɵtext(10, "To Step");
|
|
371
|
+
i0.ɵɵelementEnd();
|
|
372
|
+
i0.ɵɵelementStart(11, "div", 49);
|
|
373
|
+
i0.ɵɵtext(12);
|
|
374
|
+
i0.ɵɵelementEnd()();
|
|
375
|
+
i0.ɵɵelementStart(13, "div", 46)(14, "div", 47);
|
|
376
|
+
i0.ɵɵtext(15, "Condition");
|
|
377
|
+
i0.ɵɵelementEnd();
|
|
378
|
+
i0.ɵɵtemplate(16, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_16_Template, 1, 1, "textarea", 51)(17, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_17_Template, 2, 1, "div", 49);
|
|
379
|
+
i0.ɵɵelementEnd();
|
|
380
|
+
i0.ɵɵelementStart(18, "div", 46)(19, "div", 47);
|
|
381
|
+
i0.ɵɵtext(20, "Priority");
|
|
382
|
+
i0.ɵɵelementEnd();
|
|
383
|
+
i0.ɵɵtemplate(21, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_21_Template, 1, 1, "input", 60)(22, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_22_Template, 2, 1, "div", 49);
|
|
384
|
+
i0.ɵɵelementEnd()();
|
|
385
|
+
i0.ɵɵtemplate(23, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Conditional_23_Template, 4, 0, "div", 52);
|
|
386
|
+
} if (rf & 2) {
|
|
387
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
388
|
+
i0.ɵɵadvance(7);
|
|
389
|
+
i0.ɵɵtextInterpolate(ctx_r0.getStepName(ctx_r0.selectedPath.OriginStepID));
|
|
390
|
+
i0.ɵɵadvance(5);
|
|
391
|
+
i0.ɵɵtextInterpolate(ctx_r0.getStepName(ctx_r0.selectedPath.DestinationStepID));
|
|
392
|
+
i0.ɵɵadvance(4);
|
|
393
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 16 : 17);
|
|
394
|
+
i0.ɵɵadvance(5);
|
|
395
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 21 : 22);
|
|
396
|
+
i0.ɵɵadvance(2);
|
|
397
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 23 : -1);
|
|
398
|
+
} }
|
|
399
|
+
function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
400
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
401
|
+
i0.ɵɵelementStart(0, "kendo-splitter-pane", 24)(1, "div", 39)(2, "div", 40)(3, "h4");
|
|
402
|
+
i0.ɵɵtemplate(4, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_4_Template, 2, 0)(5, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_5_Template, 2, 0);
|
|
403
|
+
i0.ɵɵelementEnd();
|
|
404
|
+
i0.ɵɵelementStart(6, "button", 41);
|
|
405
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Conditional_19_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.closeProperties()); });
|
|
406
|
+
i0.ɵɵelement(7, "i", 32);
|
|
407
|
+
i0.ɵɵelementEnd()();
|
|
408
|
+
i0.ɵɵelementStart(8, "div", 42);
|
|
409
|
+
i0.ɵɵtemplate(9, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_9_Template, 25, 6)(10, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Conditional_10_Template, 24, 5);
|
|
410
|
+
i0.ɵɵelementEnd()()();
|
|
411
|
+
} if (rf & 2) {
|
|
412
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
413
|
+
i0.ɵɵproperty("size", "300px")("min", "250px")("max", "400px")("collapsible", true);
|
|
414
|
+
i0.ɵɵadvance(4);
|
|
415
|
+
i0.ɵɵconditional(ctx_r0.selectedItem.type === "step" ? 4 : 5);
|
|
416
|
+
i0.ɵɵadvance(5);
|
|
417
|
+
i0.ɵɵconditional(ctx_r0.selectedItem.type === "step" ? 9 : 10);
|
|
418
|
+
} }
|
|
419
|
+
function FlowAgentDiagramComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
420
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
421
|
+
i0.ɵɵelementStart(0, "kendo-splitter", 5)(1, "kendo-splitter-pane", 9)(2, "div", 10, 0)(4, "div", 11);
|
|
422
|
+
i0.ɵɵtemplate(5, FlowAgentDiagramComponent_Conditional_4_Conditional_5_Template, 5, 2);
|
|
423
|
+
i0.ɵɵelementStart(6, "div", 12)(7, "button", 13);
|
|
424
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.zoomIn()); });
|
|
425
|
+
i0.ɵɵelement(8, "i", 14);
|
|
426
|
+
i0.ɵɵelementEnd();
|
|
427
|
+
i0.ɵɵelementStart(9, "button", 15);
|
|
428
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.zoomOut()); });
|
|
429
|
+
i0.ɵɵelement(10, "i", 16);
|
|
430
|
+
i0.ɵɵelementEnd();
|
|
431
|
+
i0.ɵɵelementStart(11, "button", 17);
|
|
432
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.resetZoom()); });
|
|
433
|
+
i0.ɵɵelement(12, "i", 18);
|
|
434
|
+
i0.ɵɵelementEnd();
|
|
435
|
+
i0.ɵɵelementStart(13, "span", 19);
|
|
436
|
+
i0.ɵɵtext(14);
|
|
437
|
+
i0.ɵɵelementEnd()()();
|
|
438
|
+
i0.ɵɵnamespaceSVG();
|
|
439
|
+
i0.ɵɵelementStart(15, "svg", 20);
|
|
440
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_Conditional_4_Template_svg_click_15_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onSvgClick($event)); })("contextmenu", function FlowAgentDiagramComponent_Conditional_4_Template_svg_contextmenu_15_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onSvgContextMenu($event)); })("wheel", function FlowAgentDiagramComponent_Conditional_4_Template_svg_wheel_15_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onWheel($event)); })("mousedown", function FlowAgentDiagramComponent_Conditional_4_Template_svg_mousedown_15_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onSvgMouseDown($event)); })("mousemove", function FlowAgentDiagramComponent_Conditional_4_Template_svg_mousemove_15_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onSvgMouseMove($event)); })("mouseup", function FlowAgentDiagramComponent_Conditional_4_Template_svg_mouseup_15_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onSvgMouseUp($event)); });
|
|
441
|
+
i0.ɵɵtemplate(16, FlowAgentDiagramComponent_Conditional_4_Conditional_16_Template, 1, 1, ":svg:path", 21);
|
|
442
|
+
i0.ɵɵelementEnd();
|
|
443
|
+
i0.ɵɵtemplate(17, FlowAgentDiagramComponent_Conditional_4_Conditional_17_Template, 2, 0, "div", 22)(18, FlowAgentDiagramComponent_Conditional_4_Conditional_18_Template, 3, 5, "div", 23);
|
|
444
|
+
i0.ɵɵelementEnd()();
|
|
445
|
+
i0.ɵɵtemplate(19, FlowAgentDiagramComponent_Conditional_4_Conditional_19_Template, 11, 6, "kendo-splitter-pane", 24);
|
|
446
|
+
i0.ɵɵelementEnd();
|
|
447
|
+
} if (rf & 2) {
|
|
448
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
449
|
+
i0.ɵɵadvance();
|
|
450
|
+
i0.ɵɵproperty("collapsible", false);
|
|
451
|
+
i0.ɵɵadvance(4);
|
|
452
|
+
i0.ɵɵconditional(ctx_r0.EditMode ? 5 : -1);
|
|
453
|
+
i0.ɵɵadvance(9);
|
|
454
|
+
i0.ɵɵtextInterpolate1("", (ctx_r0.panZoom.scale * 100).toFixed(0), "%");
|
|
455
|
+
i0.ɵɵadvance();
|
|
456
|
+
i0.ɵɵclassProp("connection-mode", ctx_r0.connectionMode);
|
|
457
|
+
i0.ɵɵadvance();
|
|
458
|
+
i0.ɵɵconditional(ctx_r0.tempConnection ? 16 : -1);
|
|
459
|
+
i0.ɵɵadvance();
|
|
460
|
+
i0.ɵɵconditional(ctx_r0.connectionMode ? 17 : -1);
|
|
461
|
+
i0.ɵɵadvance();
|
|
462
|
+
i0.ɵɵconditional(ctx_r0.contextMenu.visible ? 18 : -1);
|
|
463
|
+
i0.ɵɵadvance();
|
|
464
|
+
i0.ɵɵconditional(ctx_r0.selectedItem ? 19 : -1);
|
|
465
|
+
} }
|
|
466
|
+
export class FlowAgentDiagramComponent {
|
|
467
|
+
constructor(dialogService) {
|
|
468
|
+
this.dialogService = dialogService;
|
|
469
|
+
this.agentId = null;
|
|
470
|
+
this.steps = [];
|
|
471
|
+
this.paths = [];
|
|
472
|
+
this.EditMode = false;
|
|
473
|
+
this.stepsChanged = new EventEmitter();
|
|
474
|
+
this.pathsChanged = new EventEmitter();
|
|
475
|
+
this.loading = true;
|
|
476
|
+
this.error = null;
|
|
477
|
+
// Selection state
|
|
478
|
+
this.selectedItem = null;
|
|
479
|
+
this.selectedStep = null;
|
|
480
|
+
this.selectedPath = null;
|
|
481
|
+
// Connection mode state
|
|
482
|
+
this.connectionMode = false;
|
|
483
|
+
this.connectionSourceStepId = null;
|
|
484
|
+
this.tempConnection = null;
|
|
485
|
+
// Context menu state
|
|
486
|
+
this.contextMenu = {
|
|
487
|
+
visible: false,
|
|
488
|
+
x: 0,
|
|
489
|
+
y: 0,
|
|
490
|
+
type: null,
|
|
491
|
+
targetId: null
|
|
492
|
+
};
|
|
493
|
+
// Dropdown data
|
|
494
|
+
this.stepTypes = ['Action', 'Sub-Agent', 'Prompt'];
|
|
495
|
+
this.stepStatuses = ['Active', 'Disabled', 'Testing'];
|
|
496
|
+
// Pan and zoom state
|
|
497
|
+
this.panZoom = {
|
|
498
|
+
scale: 1,
|
|
499
|
+
translateX: 0,
|
|
500
|
+
translateY: 0,
|
|
501
|
+
isPanning: false,
|
|
502
|
+
startX: 0,
|
|
503
|
+
startY: 0
|
|
504
|
+
};
|
|
505
|
+
this.destroy$ = new Subject();
|
|
506
|
+
this.nodeElements = new Map();
|
|
507
|
+
this.connectionElements = new Map();
|
|
508
|
+
this.positionChanges$ = new Subject();
|
|
509
|
+
this.dragState = {
|
|
510
|
+
isDragging: false,
|
|
511
|
+
element: null,
|
|
512
|
+
stepId: null,
|
|
513
|
+
startX: 0,
|
|
514
|
+
startY: 0,
|
|
515
|
+
startTransform: { x: 0, y: 0 }
|
|
516
|
+
};
|
|
517
|
+
this.onMouseMove = (event) => {
|
|
518
|
+
if (!this.dragState.isDragging || !this.dragState.element)
|
|
519
|
+
return;
|
|
520
|
+
// Get SVG element and calculate mouse position in SVG coordinates
|
|
521
|
+
const svg = this.dragState.element.ownerSVGElement;
|
|
522
|
+
if (!svg)
|
|
523
|
+
return;
|
|
524
|
+
const pt = svg.createSVGPoint();
|
|
525
|
+
pt.x = event.clientX;
|
|
526
|
+
pt.y = event.clientY;
|
|
527
|
+
const svgP = pt.matrixTransform(svg.getScreenCTM()?.inverse());
|
|
528
|
+
const dx = svgP.x - this.dragState.startX;
|
|
529
|
+
const dy = svgP.y - this.dragState.startY;
|
|
530
|
+
const newX = this.dragState.startTransform.x + dx;
|
|
531
|
+
const newY = this.dragState.startTransform.y + dy;
|
|
532
|
+
// Update element position
|
|
533
|
+
this.dragState.element.setAttribute('transform', `translate(${newX}, ${newY})`);
|
|
534
|
+
// Update connections
|
|
535
|
+
this.updateConnections();
|
|
536
|
+
};
|
|
537
|
+
this.onMouseUp = (event) => {
|
|
538
|
+
if (!this.dragState.isDragging || !this.dragState.element || !this.dragState.stepId)
|
|
539
|
+
return;
|
|
540
|
+
this.dragState.element.classList.remove('dragging');
|
|
541
|
+
// Get final position
|
|
542
|
+
const transform = this.dragState.element.getAttribute('transform');
|
|
543
|
+
const match = transform?.match(/translate\(([-\d.]+),\s*([-\d.]+)\)/);
|
|
544
|
+
if (match) {
|
|
545
|
+
const x = Math.round(parseFloat(match[1]));
|
|
546
|
+
const y = Math.round(parseFloat(match[2]));
|
|
547
|
+
// Emit position change for saving
|
|
548
|
+
this.positionChanges$.next({ stepId: this.dragState.stepId, x, y });
|
|
549
|
+
}
|
|
550
|
+
// Clean up
|
|
551
|
+
this.dragState = {
|
|
552
|
+
isDragging: false,
|
|
553
|
+
element: null,
|
|
554
|
+
stepId: null,
|
|
555
|
+
startX: 0,
|
|
556
|
+
startY: 0,
|
|
557
|
+
startTransform: { x: 0, y: 0 }
|
|
558
|
+
};
|
|
559
|
+
document.removeEventListener('mousemove', this.onMouseMove);
|
|
560
|
+
document.removeEventListener('mouseup', this.onMouseUp);
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
ngOnInit() {
|
|
564
|
+
// Initial setup will happen in ngAfterViewInit when container is ready
|
|
565
|
+
// Subscribe to position changes with debounce
|
|
566
|
+
this.positionChanges$.pipe(debounceTime(500), // Save after 500ms of no movement
|
|
567
|
+
takeUntil(this.destroy$)).subscribe(change => {
|
|
568
|
+
this.saveStepPosition(change.stepId, change.x, change.y);
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
ngAfterViewInit() {
|
|
572
|
+
// Defer initialization to ensure container is ready
|
|
573
|
+
setTimeout(() => {
|
|
574
|
+
this.initializeDiagram();
|
|
575
|
+
}, 0);
|
|
576
|
+
}
|
|
577
|
+
ngOnChanges(changes) {
|
|
578
|
+
if (changes['steps'] || changes['paths']) {
|
|
579
|
+
// Initialize diagram when data is provided or changes
|
|
580
|
+
if (this.reteContainer) {
|
|
581
|
+
this.initializeDiagram();
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
// If container not ready yet, just update loading state
|
|
585
|
+
this.loading = false;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
ngOnDestroy() {
|
|
590
|
+
this.destroy$.next();
|
|
591
|
+
this.destroy$.complete();
|
|
592
|
+
this.cleanup();
|
|
593
|
+
// Clean up any active drag state
|
|
594
|
+
if (this.dragState.isDragging) {
|
|
595
|
+
document.removeEventListener('mousemove', this.onMouseMove);
|
|
596
|
+
document.removeEventListener('mouseup', this.onMouseUp);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
async initializeDiagram() {
|
|
600
|
+
if (!this.reteContainer) {
|
|
601
|
+
this.loading = false;
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
// If no steps, just show empty state
|
|
605
|
+
if (!this.steps || this.steps.length === 0) {
|
|
606
|
+
this.loading = false;
|
|
607
|
+
this.error = null;
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
this.loading = true;
|
|
611
|
+
this.error = null;
|
|
612
|
+
try {
|
|
613
|
+
// Clean up previous instance if exists
|
|
614
|
+
this.cleanup();
|
|
615
|
+
// Get the SVG element
|
|
616
|
+
const container = this.reteContainer.nativeElement;
|
|
617
|
+
const svg = container.querySelector('svg');
|
|
618
|
+
if (!svg) {
|
|
619
|
+
throw new Error('SVG element not found');
|
|
620
|
+
}
|
|
621
|
+
// Clear the SVG
|
|
622
|
+
while (svg.firstChild) {
|
|
623
|
+
svg.removeChild(svg.firstChild);
|
|
624
|
+
}
|
|
625
|
+
// Create defs for arrow markers
|
|
626
|
+
const defs = document.createElementNS('http://www.w3.org/2000/svg', 'defs');
|
|
627
|
+
const marker = document.createElementNS('http://www.w3.org/2000/svg', 'marker');
|
|
628
|
+
marker.setAttribute('id', 'arrowhead');
|
|
629
|
+
marker.setAttribute('markerWidth', '10');
|
|
630
|
+
marker.setAttribute('markerHeight', '7');
|
|
631
|
+
marker.setAttribute('refX', '9');
|
|
632
|
+
marker.setAttribute('refY', '3.5');
|
|
633
|
+
marker.setAttribute('orient', 'auto');
|
|
634
|
+
const polygon = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');
|
|
635
|
+
polygon.setAttribute('points', '0 0, 10 3.5, 0 7');
|
|
636
|
+
polygon.setAttribute('fill', '#4a90e2');
|
|
637
|
+
marker.appendChild(polygon);
|
|
638
|
+
defs.appendChild(marker);
|
|
639
|
+
svg.appendChild(defs);
|
|
640
|
+
// Create main group for zoom/pan
|
|
641
|
+
const mainGroup = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
642
|
+
svg.appendChild(mainGroup);
|
|
643
|
+
// Create nodes and connections
|
|
644
|
+
await this.createNodesAndConnections(mainGroup);
|
|
645
|
+
// Auto-arrange nodes
|
|
646
|
+
await this.arrangeNodes();
|
|
647
|
+
// Fit to view
|
|
648
|
+
this.fitToView(svg, mainGroup);
|
|
649
|
+
this.loading = false;
|
|
650
|
+
}
|
|
651
|
+
catch (error) {
|
|
652
|
+
this.error = 'Failed to initialize flow diagram';
|
|
653
|
+
this.loading = false;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
createNodeElement(step) {
|
|
657
|
+
const g = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
658
|
+
g.setAttribute('class', 'step-node');
|
|
659
|
+
g.setAttribute('data-step-id', step.ID);
|
|
660
|
+
// Add event handlers
|
|
661
|
+
g.addEventListener('mousedown', (e) => this.onNodeMouseDown(e, step.ID));
|
|
662
|
+
g.addEventListener('click', (e) => this.onNodeClick(e, step.ID));
|
|
663
|
+
g.addEventListener('contextmenu', (e) => this.onNodeContextMenu(e, step.ID));
|
|
664
|
+
g.style.cursor = this.EditMode ? 'move' : 'pointer';
|
|
665
|
+
const nodeWidth = 140;
|
|
666
|
+
const nodeHeight = 80;
|
|
667
|
+
const headerHeight = 35; // Increased from 30 for better text margin
|
|
668
|
+
// Create rectangle background
|
|
669
|
+
const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
670
|
+
rect.setAttribute('width', nodeWidth.toString());
|
|
671
|
+
rect.setAttribute('height', nodeHeight.toString());
|
|
672
|
+
rect.setAttribute('rx', '6');
|
|
673
|
+
rect.setAttribute('fill', step.StartingStep ? '#f0fff4' : 'white');
|
|
674
|
+
rect.setAttribute('stroke', step.StartingStep ? '#28a745' : '#4a90e2');
|
|
675
|
+
rect.setAttribute('stroke-width', '2');
|
|
676
|
+
g.appendChild(rect);
|
|
677
|
+
// Create title background
|
|
678
|
+
const titleBg = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
679
|
+
titleBg.setAttribute('width', nodeWidth.toString());
|
|
680
|
+
titleBg.setAttribute('height', headerHeight.toString());
|
|
681
|
+
titleBg.setAttribute('rx', '6');
|
|
682
|
+
titleBg.setAttribute('fill', step.StartingStep ? '#28a745' : '#4a90e2');
|
|
683
|
+
g.appendChild(titleBg);
|
|
684
|
+
// Fix bottom corners of title background
|
|
685
|
+
const titleFix = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
686
|
+
titleFix.setAttribute('y', (headerHeight - 6).toString());
|
|
687
|
+
titleFix.setAttribute('width', nodeWidth.toString());
|
|
688
|
+
titleFix.setAttribute('height', '6');
|
|
689
|
+
titleFix.setAttribute('fill', step.StartingStep ? '#28a745' : '#4a90e2');
|
|
690
|
+
g.appendChild(titleFix);
|
|
691
|
+
// Create title text with text wrapping
|
|
692
|
+
const titleWords = (step.Name || 'Unnamed Step').split(' ');
|
|
693
|
+
const lines = [];
|
|
694
|
+
let currentLine = '';
|
|
695
|
+
const maxCharsPerLine = 18;
|
|
696
|
+
for (const word of titleWords) {
|
|
697
|
+
if ((currentLine + word).length > maxCharsPerLine && currentLine) {
|
|
698
|
+
lines.push(currentLine.trim());
|
|
699
|
+
currentLine = word + ' ';
|
|
700
|
+
}
|
|
701
|
+
else {
|
|
702
|
+
currentLine += word + ' ';
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
if (currentLine)
|
|
706
|
+
lines.push(currentLine.trim());
|
|
707
|
+
// Add icon for step type or starting step using simple text symbols
|
|
708
|
+
const iconText = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
709
|
+
iconText.setAttribute('x', '15');
|
|
710
|
+
iconText.setAttribute('y', (headerHeight / 2 + 5).toString());
|
|
711
|
+
iconText.setAttribute('fill', 'white');
|
|
712
|
+
iconText.setAttribute('font-size', '16');
|
|
713
|
+
iconText.setAttribute('font-weight', 'bold');
|
|
714
|
+
if (step.StartingStep) {
|
|
715
|
+
iconText.textContent = '▶'; // Play symbol for start
|
|
716
|
+
}
|
|
717
|
+
else if (step.StepType === 'Action') {
|
|
718
|
+
iconText.textContent = '⚙'; // Gear symbol for action
|
|
719
|
+
}
|
|
720
|
+
else if (step.StepType === 'Sub-Agent') {
|
|
721
|
+
iconText.textContent = '🤖'; // Robot emoji for sub-agent
|
|
722
|
+
}
|
|
723
|
+
else if (step.StepType === 'Prompt') {
|
|
724
|
+
iconText.textContent = '💬'; // Speech bubble for prompt
|
|
725
|
+
}
|
|
726
|
+
else {
|
|
727
|
+
iconText.textContent = '●'; // Circle (default)
|
|
728
|
+
}
|
|
729
|
+
g.appendChild(iconText);
|
|
730
|
+
// Render title lines (shifted right to accommodate icon)
|
|
731
|
+
const lineHeight = 12;
|
|
732
|
+
const startY = headerHeight / 2 - (lines.length - 1) * lineHeight / 2 + 2; // Added 2px margin
|
|
733
|
+
lines.forEach((line, index) => {
|
|
734
|
+
const text = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
735
|
+
text.setAttribute('x', ((nodeWidth / 2) + 10).toString()); // Shifted right for icon
|
|
736
|
+
text.setAttribute('y', (startY + index * lineHeight).toString());
|
|
737
|
+
text.setAttribute('fill', 'white');
|
|
738
|
+
text.setAttribute('font-weight', '600');
|
|
739
|
+
text.setAttribute('font-size', '11');
|
|
740
|
+
text.setAttribute('text-anchor', 'middle');
|
|
741
|
+
text.setAttribute('class', 'step-node-title');
|
|
742
|
+
text.textContent = line;
|
|
743
|
+
g.appendChild(text);
|
|
744
|
+
});
|
|
745
|
+
// Add step type if available
|
|
746
|
+
if (step.StepType) {
|
|
747
|
+
const typeText = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
748
|
+
typeText.setAttribute('x', (nodeWidth / 2).toString());
|
|
749
|
+
typeText.setAttribute('y', (headerHeight + 20).toString());
|
|
750
|
+
typeText.setAttribute('fill', '#666');
|
|
751
|
+
typeText.setAttribute('font-size', '10');
|
|
752
|
+
typeText.setAttribute('text-anchor', 'middle');
|
|
753
|
+
typeText.textContent = step.StepType;
|
|
754
|
+
g.appendChild(typeText);
|
|
755
|
+
}
|
|
756
|
+
// Add status if not active
|
|
757
|
+
if (step.Status && step.Status !== 'Active') {
|
|
758
|
+
const statusText = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
759
|
+
statusText.setAttribute('x', (nodeWidth / 2).toString());
|
|
760
|
+
statusText.setAttribute('y', (headerHeight + 35).toString());
|
|
761
|
+
statusText.setAttribute('fill', step.Status === 'Disabled' ? '#c00' : '#f57c00');
|
|
762
|
+
statusText.setAttribute('font-size', '10');
|
|
763
|
+
statusText.setAttribute('text-anchor', 'middle');
|
|
764
|
+
statusText.textContent = `[${step.Status}]`;
|
|
765
|
+
g.appendChild(statusText);
|
|
766
|
+
}
|
|
767
|
+
// Add sockets
|
|
768
|
+
const socketY = nodeHeight / 2;
|
|
769
|
+
if (!step.StartingStep) {
|
|
770
|
+
// Input socket
|
|
771
|
+
const inputSocket = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
|
|
772
|
+
inputSocket.setAttribute('cx', '0');
|
|
773
|
+
inputSocket.setAttribute('cy', socketY.toString());
|
|
774
|
+
inputSocket.setAttribute('r', '5');
|
|
775
|
+
inputSocket.setAttribute('fill', 'white');
|
|
776
|
+
inputSocket.setAttribute('stroke', '#4a90e2');
|
|
777
|
+
inputSocket.setAttribute('stroke-width', '2');
|
|
778
|
+
inputSocket.setAttribute('class', 'input-socket');
|
|
779
|
+
// Add drop zone handler for input socket
|
|
780
|
+
if (this.EditMode) {
|
|
781
|
+
inputSocket.addEventListener('mouseenter', (e) => this.onSocketMouseEnter(e, step.ID, 'input'));
|
|
782
|
+
inputSocket.addEventListener('mouseleave', (e) => this.onSocketMouseLeave(e));
|
|
783
|
+
inputSocket.addEventListener('mouseup', (e) => this.onSocketMouseUp(e, step.ID, 'input'));
|
|
784
|
+
}
|
|
785
|
+
g.appendChild(inputSocket);
|
|
786
|
+
}
|
|
787
|
+
// Add multiple output sockets for different conditions
|
|
788
|
+
const paths = this.paths.filter(p => p.OriginStepID === step.ID);
|
|
789
|
+
if (paths.length > 1) {
|
|
790
|
+
// Multiple outputs - distribute them vertically
|
|
791
|
+
const spacing = Math.min(20, (nodeHeight - 20) / (paths.length - 1));
|
|
792
|
+
const startY = socketY - (paths.length - 1) * spacing / 2;
|
|
793
|
+
paths.forEach((path, index) => {
|
|
794
|
+
const outputSocket = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
|
|
795
|
+
outputSocket.setAttribute('cx', nodeWidth.toString());
|
|
796
|
+
outputSocket.setAttribute('cy', (startY + index * spacing).toString());
|
|
797
|
+
outputSocket.setAttribute('r', '5');
|
|
798
|
+
outputSocket.setAttribute('fill', 'white');
|
|
799
|
+
outputSocket.setAttribute('stroke', '#4a90e2');
|
|
800
|
+
outputSocket.setAttribute('stroke-width', '2');
|
|
801
|
+
outputSocket.setAttribute('data-path-id', path.ID);
|
|
802
|
+
outputSocket.setAttribute('class', 'output-socket');
|
|
803
|
+
// Add drag handlers for socket
|
|
804
|
+
if (this.EditMode) {
|
|
805
|
+
outputSocket.addEventListener('mousedown', (e) => this.onSocketMouseDown(e, step.ID, 'output'));
|
|
806
|
+
outputSocket.style.cursor = 'crosshair';
|
|
807
|
+
}
|
|
808
|
+
g.appendChild(outputSocket);
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
else {
|
|
812
|
+
// Single output socket
|
|
813
|
+
const outputSocket = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
|
|
814
|
+
outputSocket.setAttribute('cx', nodeWidth.toString());
|
|
815
|
+
outputSocket.setAttribute('cy', socketY.toString());
|
|
816
|
+
outputSocket.setAttribute('r', '5');
|
|
817
|
+
outputSocket.setAttribute('fill', 'white');
|
|
818
|
+
outputSocket.setAttribute('stroke', '#4a90e2');
|
|
819
|
+
outputSocket.setAttribute('stroke-width', '2');
|
|
820
|
+
outputSocket.setAttribute('class', 'output-socket');
|
|
821
|
+
// Add drag handlers for socket
|
|
822
|
+
if (this.EditMode) {
|
|
823
|
+
outputSocket.addEventListener('mousedown', (e) => this.onSocketMouseDown(e, step.ID, 'output'));
|
|
824
|
+
outputSocket.style.cursor = 'crosshair';
|
|
825
|
+
}
|
|
826
|
+
g.appendChild(outputSocket);
|
|
827
|
+
}
|
|
828
|
+
return g;
|
|
829
|
+
}
|
|
830
|
+
createConnectionElement(fromPos, toPos, pathData) {
|
|
831
|
+
const g = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
832
|
+
g.setAttribute('class', 'connection-group');
|
|
833
|
+
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
834
|
+
// Calculate control points for a nice curve
|
|
835
|
+
const dx = toPos.x - fromPos.x;
|
|
836
|
+
const dy = toPos.y - fromPos.y;
|
|
837
|
+
const cx1 = fromPos.x + dx * 0.5;
|
|
838
|
+
const cy1 = fromPos.y;
|
|
839
|
+
const cx2 = toPos.x - dx * 0.5;
|
|
840
|
+
const cy2 = toPos.y;
|
|
841
|
+
const d = `M ${fromPos.x} ${fromPos.y} C ${cx1} ${cy1}, ${cx2} ${cy2}, ${toPos.x} ${toPos.y}`;
|
|
842
|
+
path.setAttribute('d', d);
|
|
843
|
+
path.setAttribute('fill', 'none');
|
|
844
|
+
path.setAttribute('stroke', '#4a90e2');
|
|
845
|
+
path.setAttribute('stroke-width', '2');
|
|
846
|
+
path.setAttribute('marker-end', 'url(#arrowhead)');
|
|
847
|
+
path.setAttribute('class', 'connection-path');
|
|
848
|
+
path.setAttribute('data-path-id', pathData?.ID || '');
|
|
849
|
+
// Add click handler
|
|
850
|
+
g.addEventListener('click', (e) => {
|
|
851
|
+
if (pathData) {
|
|
852
|
+
this.onPathClick(e, pathData.ID);
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
// Add context menu handler
|
|
856
|
+
g.addEventListener('contextmenu', (e) => {
|
|
857
|
+
if (pathData) {
|
|
858
|
+
this.onPathContextMenu(e, pathData.ID);
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
g.style.cursor = 'pointer';
|
|
862
|
+
g.appendChild(path);
|
|
863
|
+
// Add condition label if present
|
|
864
|
+
if (pathData?.Condition) {
|
|
865
|
+
const midX = (fromPos.x + toPos.x) / 2;
|
|
866
|
+
const midY = (fromPos.y + toPos.y) / 2;
|
|
867
|
+
// Truncate condition text if too long
|
|
868
|
+
const maxConditionLength = 100;
|
|
869
|
+
const conditionText = pathData.Condition.length > maxConditionLength
|
|
870
|
+
? pathData.Condition.substring(0, maxConditionLength - 3) + '...'
|
|
871
|
+
: pathData.Condition;
|
|
872
|
+
// Measure text width (approximate)
|
|
873
|
+
const charWidth = 6;
|
|
874
|
+
const padding = 10;
|
|
875
|
+
const textWidth = conditionText.length * charWidth + padding * 2;
|
|
876
|
+
const rectWidth = Math.min(textWidth, 200); // Max width 200px
|
|
877
|
+
// Background rect for better readability
|
|
878
|
+
const bgRect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
879
|
+
bgRect.setAttribute('x', (midX - rectWidth / 2).toString());
|
|
880
|
+
bgRect.setAttribute('y', (midY - 10).toString());
|
|
881
|
+
bgRect.setAttribute('width', rectWidth.toString());
|
|
882
|
+
bgRect.setAttribute('height', '20');
|
|
883
|
+
bgRect.setAttribute('fill', 'white');
|
|
884
|
+
bgRect.setAttribute('stroke', '#4a90e2');
|
|
885
|
+
bgRect.setAttribute('stroke-width', '1');
|
|
886
|
+
bgRect.setAttribute('rx', '3');
|
|
887
|
+
bgRect.setAttribute('opacity', '0.95');
|
|
888
|
+
g.appendChild(bgRect);
|
|
889
|
+
// Condition text
|
|
890
|
+
const text = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
891
|
+
text.setAttribute('x', midX.toString());
|
|
892
|
+
text.setAttribute('y', (midY + 4).toString());
|
|
893
|
+
text.setAttribute('fill', '#4a90e2');
|
|
894
|
+
text.setAttribute('font-size', '10');
|
|
895
|
+
text.setAttribute('text-anchor', 'middle');
|
|
896
|
+
text.setAttribute('class', 'condition-label');
|
|
897
|
+
// Wrap text if needed
|
|
898
|
+
if (conditionText.length > 30) {
|
|
899
|
+
const words = conditionText.split(' ');
|
|
900
|
+
let line1 = '';
|
|
901
|
+
let line2 = '';
|
|
902
|
+
let currentLine = 1;
|
|
903
|
+
for (const word of words) {
|
|
904
|
+
if (currentLine === 1 && line1.length + word.length < 30) {
|
|
905
|
+
line1 += (line1 ? ' ' : '') + word;
|
|
906
|
+
}
|
|
907
|
+
else {
|
|
908
|
+
currentLine = 2;
|
|
909
|
+
line2 += (line2 ? ' ' : '') + word;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
if (line2) {
|
|
913
|
+
// Adjust rect height for two lines
|
|
914
|
+
bgRect.setAttribute('height', '30');
|
|
915
|
+
bgRect.setAttribute('y', (midY - 15).toString());
|
|
916
|
+
// First line
|
|
917
|
+
const tspan1 = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');
|
|
918
|
+
tspan1.setAttribute('x', midX.toString());
|
|
919
|
+
tspan1.setAttribute('dy', '-5');
|
|
920
|
+
tspan1.textContent = line1;
|
|
921
|
+
text.appendChild(tspan1);
|
|
922
|
+
// Second line
|
|
923
|
+
const tspan2 = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');
|
|
924
|
+
tspan2.setAttribute('x', midX.toString());
|
|
925
|
+
tspan2.setAttribute('dy', '12');
|
|
926
|
+
tspan2.textContent = line2;
|
|
927
|
+
text.appendChild(tspan2);
|
|
928
|
+
}
|
|
929
|
+
else {
|
|
930
|
+
text.textContent = conditionText;
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
else {
|
|
934
|
+
text.textContent = conditionText;
|
|
935
|
+
}
|
|
936
|
+
g.appendChild(text);
|
|
937
|
+
}
|
|
938
|
+
return g;
|
|
939
|
+
}
|
|
940
|
+
async createNodesAndConnections(container) {
|
|
941
|
+
const nodeMap = new Map();
|
|
942
|
+
// Create nodes for each step
|
|
943
|
+
for (const step of this.steps) {
|
|
944
|
+
const nodeElement = this.createNodeElement(step);
|
|
945
|
+
container.appendChild(nodeElement);
|
|
946
|
+
nodeMap.set(step.ID, { element: nodeElement, step });
|
|
947
|
+
this.nodeElements.set(step.ID, nodeElement);
|
|
948
|
+
}
|
|
949
|
+
// Create connections based on paths
|
|
950
|
+
for (const path of this.paths) {
|
|
951
|
+
const fromNode = nodeMap.get(path.OriginStepID);
|
|
952
|
+
const toNode = nodeMap.get(path.DestinationStepID);
|
|
953
|
+
if (fromNode && toNode) {
|
|
954
|
+
// Get positions (will be set properly after arrangement)
|
|
955
|
+
const nodeWidth = 140;
|
|
956
|
+
const nodeHeight = 80;
|
|
957
|
+
const fromPos = { x: nodeWidth, y: nodeHeight / 2 }; // Default output socket position
|
|
958
|
+
const toPos = { x: 0, y: nodeHeight / 2 }; // Input socket position
|
|
959
|
+
const connectionElement = this.createConnectionElement(fromPos, toPos, path);
|
|
960
|
+
connectionElement.setAttribute('data-from', path.OriginStepID);
|
|
961
|
+
connectionElement.setAttribute('data-to', path.DestinationStepID);
|
|
962
|
+
connectionElement.setAttribute('data-path-id', path.ID);
|
|
963
|
+
// Insert connections before nodes so they appear behind
|
|
964
|
+
container.insertBefore(connectionElement, container.firstChild);
|
|
965
|
+
this.connectionElements.set(`${path.OriginStepID}-${path.DestinationStepID}`, connectionElement);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
async arrangeNodes() {
|
|
970
|
+
const startingNodes = this.steps.filter(s => s.StartingStep);
|
|
971
|
+
const otherNodes = this.steps.filter(s => !s.StartingStep);
|
|
972
|
+
const xSpacing = 280; // Increased from 200 for better visibility of conditions
|
|
973
|
+
const ySpacing = 150; // Increased from 120 for better vertical spacing
|
|
974
|
+
const startX = 50;
|
|
975
|
+
const startY = 50;
|
|
976
|
+
// Check if any steps have saved positions
|
|
977
|
+
const hasPositions = this.steps.some(s => s.PositionX !== 0 || s.PositionY !== 0);
|
|
978
|
+
if (hasPositions) {
|
|
979
|
+
// Use saved positions
|
|
980
|
+
for (const step of this.steps) {
|
|
981
|
+
const element = this.nodeElements.get(step.ID);
|
|
982
|
+
if (element) {
|
|
983
|
+
const x = step.PositionX || startX;
|
|
984
|
+
const y = step.PositionY || startY;
|
|
985
|
+
element.setAttribute('transform', `translate(${x}, ${y})`);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
else {
|
|
990
|
+
// Auto-layout when no positions are saved
|
|
991
|
+
// Position starting nodes on the left
|
|
992
|
+
let y = startY;
|
|
993
|
+
for (const step of startingNodes) {
|
|
994
|
+
const element = this.nodeElements.get(step.ID);
|
|
995
|
+
if (element) {
|
|
996
|
+
element.setAttribute('transform', `translate(${startX}, ${y})`);
|
|
997
|
+
}
|
|
998
|
+
y += ySpacing;
|
|
999
|
+
}
|
|
1000
|
+
// Create a simple tree layout for other nodes
|
|
1001
|
+
// Group nodes by their distance from start
|
|
1002
|
+
const nodeDepths = new Map();
|
|
1003
|
+
const visited = new Set();
|
|
1004
|
+
// BFS to calculate depths
|
|
1005
|
+
const queue = [];
|
|
1006
|
+
startingNodes.forEach(node => {
|
|
1007
|
+
queue.push({ id: node.ID, depth: 0 });
|
|
1008
|
+
nodeDepths.set(node.ID, 0);
|
|
1009
|
+
});
|
|
1010
|
+
while (queue.length > 0) {
|
|
1011
|
+
const { id, depth } = queue.shift();
|
|
1012
|
+
if (visited.has(id))
|
|
1013
|
+
continue;
|
|
1014
|
+
visited.add(id);
|
|
1015
|
+
// Find all nodes connected from this one
|
|
1016
|
+
const outgoingPaths = this.paths.filter(p => p.OriginStepID === id);
|
|
1017
|
+
for (const path of outgoingPaths) {
|
|
1018
|
+
const targetStep = this.steps.find(s => s.ID === path.DestinationStepID);
|
|
1019
|
+
if (targetStep && !visited.has(targetStep.ID)) {
|
|
1020
|
+
nodeDepths.set(targetStep.ID, depth + 1);
|
|
1021
|
+
queue.push({ id: targetStep.ID, depth: depth + 1 });
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
// Group nodes by depth
|
|
1026
|
+
const nodesByDepth = new Map();
|
|
1027
|
+
for (const step of this.steps) {
|
|
1028
|
+
const depth = nodeDepths.get(step.ID) || 0;
|
|
1029
|
+
if (!nodesByDepth.has(depth)) {
|
|
1030
|
+
nodesByDepth.set(depth, []);
|
|
1031
|
+
}
|
|
1032
|
+
nodesByDepth.get(depth).push(step);
|
|
1033
|
+
}
|
|
1034
|
+
// Position nodes by depth
|
|
1035
|
+
for (const [depth, nodes] of nodesByDepth) {
|
|
1036
|
+
const x = startX + depth * xSpacing;
|
|
1037
|
+
const totalHeight = (nodes.length - 1) * ySpacing;
|
|
1038
|
+
const startYForDepth = startY + (y - startY - totalHeight) / 2;
|
|
1039
|
+
nodes.forEach((node, index) => {
|
|
1040
|
+
const element = this.nodeElements.get(node.ID);
|
|
1041
|
+
if (element) {
|
|
1042
|
+
element.setAttribute('transform', `translate(${x}, ${startYForDepth + index * ySpacing})`);
|
|
1043
|
+
}
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
// Update connection paths based on node positions
|
|
1048
|
+
this.updateConnections();
|
|
1049
|
+
}
|
|
1050
|
+
updateConnections() {
|
|
1051
|
+
for (const [key, connectionGroup] of this.connectionElements) {
|
|
1052
|
+
const fromId = connectionGroup.getAttribute('data-from');
|
|
1053
|
+
const toId = connectionGroup.getAttribute('data-to');
|
|
1054
|
+
const pathId = connectionGroup.getAttribute('data-path-id');
|
|
1055
|
+
if (fromId && toId) {
|
|
1056
|
+
const fromElement = this.nodeElements.get(fromId);
|
|
1057
|
+
const toElement = this.nodeElements.get(toId);
|
|
1058
|
+
if (fromElement && toElement) {
|
|
1059
|
+
const fromTransform = fromElement.getAttribute('transform');
|
|
1060
|
+
const toTransform = toElement.getAttribute('transform');
|
|
1061
|
+
const fromMatch = fromTransform?.match(/translate\(([-\d.]+),\s*([-\d.]+)\)/);
|
|
1062
|
+
const toMatch = toTransform?.match(/translate\(([-\d.]+),\s*([-\d.]+)\)/);
|
|
1063
|
+
if (fromMatch && toMatch) {
|
|
1064
|
+
const nodeWidth = 140;
|
|
1065
|
+
const nodeHeight = 80;
|
|
1066
|
+
const socketY = nodeHeight / 2;
|
|
1067
|
+
// Get the proper output socket Y position for this path
|
|
1068
|
+
const fromPaths = this.paths.filter(p => p.OriginStepID === fromId);
|
|
1069
|
+
let fromY = parseInt(fromMatch[2]) + socketY;
|
|
1070
|
+
if (fromPaths.length > 1) {
|
|
1071
|
+
// Find this path's index to determine socket position
|
|
1072
|
+
const pathIndex = fromPaths.findIndex(p => p.ID === pathId);
|
|
1073
|
+
if (pathIndex !== -1) {
|
|
1074
|
+
const spacing = Math.min(20, (nodeHeight - 20) / (fromPaths.length - 1));
|
|
1075
|
+
const startY = socketY - (fromPaths.length - 1) * spacing / 2;
|
|
1076
|
+
fromY = parseInt(fromMatch[2]) + startY + pathIndex * spacing;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
const fromX = parseInt(fromMatch[1]) + nodeWidth; // Output socket
|
|
1080
|
+
const toX = parseInt(toMatch[1]); // Input socket
|
|
1081
|
+
const toY = parseInt(toMatch[2]) + socketY;
|
|
1082
|
+
// Update path element
|
|
1083
|
+
const pathElement = connectionGroup.querySelector('path');
|
|
1084
|
+
if (pathElement) {
|
|
1085
|
+
const dx = toX - fromX;
|
|
1086
|
+
const cx1 = fromX + dx * 0.5;
|
|
1087
|
+
const cy1 = fromY;
|
|
1088
|
+
const cx2 = toX - dx * 0.5;
|
|
1089
|
+
const cy2 = toY;
|
|
1090
|
+
const d = `M ${fromX} ${fromY} C ${cx1} ${cy1}, ${cx2} ${cy2}, ${toX} ${toY}`;
|
|
1091
|
+
pathElement.setAttribute('d', d);
|
|
1092
|
+
}
|
|
1093
|
+
// Update condition label position if present
|
|
1094
|
+
const conditionRect = connectionGroup.querySelector('rect');
|
|
1095
|
+
const conditionText = connectionGroup.querySelector('.condition-label');
|
|
1096
|
+
if (conditionRect && conditionText) {
|
|
1097
|
+
const midX = (fromX + toX) / 2;
|
|
1098
|
+
const midY = (fromY + toY) / 2;
|
|
1099
|
+
// Get rect width to center it properly
|
|
1100
|
+
const rectWidth = parseFloat(conditionRect.getAttribute('width') || '80');
|
|
1101
|
+
const rectHeight = parseFloat(conditionRect.getAttribute('height') || '20');
|
|
1102
|
+
conditionRect.setAttribute('x', (midX - rectWidth / 2).toString());
|
|
1103
|
+
conditionRect.setAttribute('y', (midY - rectHeight / 2).toString());
|
|
1104
|
+
// Update text position
|
|
1105
|
+
conditionText.setAttribute('x', midX.toString());
|
|
1106
|
+
if (rectHeight > 20) {
|
|
1107
|
+
// Multi-line text
|
|
1108
|
+
const tspans = conditionText.querySelectorAll('tspan');
|
|
1109
|
+
tspans.forEach((tspan, index) => {
|
|
1110
|
+
tspan.setAttribute('x', midX.toString());
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
else {
|
|
1114
|
+
conditionText.setAttribute('y', (midY + 4).toString());
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
fitToView(svg, container) {
|
|
1123
|
+
const bbox = container.getBBox();
|
|
1124
|
+
const padding = 40;
|
|
1125
|
+
// Add extra zoom out by increasing the viewBox
|
|
1126
|
+
const zoomFactor = 1.2; // 20% zoom out
|
|
1127
|
+
const width = bbox.width * zoomFactor;
|
|
1128
|
+
const height = bbox.height * zoomFactor;
|
|
1129
|
+
const x = bbox.x - padding - (width - bbox.width) / 2;
|
|
1130
|
+
const y = bbox.y - padding - (height - bbox.height) / 2;
|
|
1131
|
+
const viewBox = `${x} ${y} ${width + 2 * padding} ${height + 2 * padding}`;
|
|
1132
|
+
svg.setAttribute('viewBox', viewBox);
|
|
1133
|
+
}
|
|
1134
|
+
truncateText(text, maxLength) {
|
|
1135
|
+
if (text.length <= maxLength)
|
|
1136
|
+
return text;
|
|
1137
|
+
return text.substring(0, maxLength - 3) + '...';
|
|
1138
|
+
}
|
|
1139
|
+
cleanup() {
|
|
1140
|
+
this.nodeElements.clear();
|
|
1141
|
+
this.connectionElements.clear();
|
|
1142
|
+
}
|
|
1143
|
+
onNodeMouseDown(event, stepId) {
|
|
1144
|
+
event.preventDefault();
|
|
1145
|
+
event.stopPropagation();
|
|
1146
|
+
// Only allow dragging in edit mode
|
|
1147
|
+
if (!this.EditMode)
|
|
1148
|
+
return;
|
|
1149
|
+
const element = this.nodeElements.get(stepId);
|
|
1150
|
+
if (!element)
|
|
1151
|
+
return;
|
|
1152
|
+
// Get current transform
|
|
1153
|
+
const transform = element.getAttribute('transform');
|
|
1154
|
+
const match = transform?.match(/translate\(([-\d.]+),\s*([-\d.]+)\)/);
|
|
1155
|
+
if (!match)
|
|
1156
|
+
return;
|
|
1157
|
+
// Get SVG element and calculate mouse position in SVG coordinates
|
|
1158
|
+
const svg = element.ownerSVGElement;
|
|
1159
|
+
if (!svg)
|
|
1160
|
+
return;
|
|
1161
|
+
const pt = svg.createSVGPoint();
|
|
1162
|
+
pt.x = event.clientX;
|
|
1163
|
+
pt.y = event.clientY;
|
|
1164
|
+
const svgP = pt.matrixTransform(svg.getScreenCTM()?.inverse());
|
|
1165
|
+
this.dragState = {
|
|
1166
|
+
isDragging: true,
|
|
1167
|
+
element: element,
|
|
1168
|
+
stepId: stepId,
|
|
1169
|
+
startX: svgP.x,
|
|
1170
|
+
startY: svgP.y,
|
|
1171
|
+
startTransform: {
|
|
1172
|
+
x: parseFloat(match[1]),
|
|
1173
|
+
y: parseFloat(match[2])
|
|
1174
|
+
}
|
|
1175
|
+
};
|
|
1176
|
+
element.classList.add('dragging');
|
|
1177
|
+
// Add document-level event listeners
|
|
1178
|
+
document.addEventListener('mousemove', this.onMouseMove);
|
|
1179
|
+
document.addEventListener('mouseup', this.onMouseUp);
|
|
1180
|
+
}
|
|
1181
|
+
async saveStepPosition(stepId, x, y) {
|
|
1182
|
+
const step = this.steps.find(s => s.ID === stepId);
|
|
1183
|
+
if (!step)
|
|
1184
|
+
return;
|
|
1185
|
+
try {
|
|
1186
|
+
step.PositionX = Math.round(x);
|
|
1187
|
+
step.PositionY = Math.round(y);
|
|
1188
|
+
// Save the step
|
|
1189
|
+
const result = await step.Save();
|
|
1190
|
+
if (!result) {
|
|
1191
|
+
// Failed to save step position
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
catch (error) {
|
|
1195
|
+
// Error saving step position
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
async addNewStep() {
|
|
1199
|
+
try {
|
|
1200
|
+
const md = new Metadata();
|
|
1201
|
+
const newStep = await md.GetEntityObject('MJ: AI Agent Steps');
|
|
1202
|
+
// Set default values
|
|
1203
|
+
newStep.AgentID = this.agentId;
|
|
1204
|
+
newStep.Name = 'New Step';
|
|
1205
|
+
newStep.StepType = 'Action';
|
|
1206
|
+
newStep.Status = 'Active';
|
|
1207
|
+
newStep.StartingStep = this.steps.length === 0; // First step is starting step
|
|
1208
|
+
// Find a good position for the new step
|
|
1209
|
+
let x = 350;
|
|
1210
|
+
let y = 50;
|
|
1211
|
+
if (this.steps.length > 0) {
|
|
1212
|
+
// Place it to the right of existing steps
|
|
1213
|
+
const maxX = Math.max(...this.steps.map(s => s.PositionX || 0));
|
|
1214
|
+
x = maxX + 280;
|
|
1215
|
+
// Center vertically
|
|
1216
|
+
const avgY = this.steps.reduce((sum, s) => sum + (s.PositionY || 0), 0) / this.steps.length;
|
|
1217
|
+
y = avgY;
|
|
1218
|
+
}
|
|
1219
|
+
newStep.PositionX = Math.round(x);
|
|
1220
|
+
newStep.PositionY = Math.round(y);
|
|
1221
|
+
const result = await newStep.Save();
|
|
1222
|
+
if (result) {
|
|
1223
|
+
// Add to steps array
|
|
1224
|
+
this.steps.push(newStep);
|
|
1225
|
+
// Recreate diagram
|
|
1226
|
+
await this.initializeDiagram();
|
|
1227
|
+
// Select the new step
|
|
1228
|
+
this.selectStep(newStep.ID);
|
|
1229
|
+
// Emit change
|
|
1230
|
+
this.stepsChanged.emit();
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
catch (error) {
|
|
1234
|
+
alert('Failed to create new step');
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
async autoArrange() {
|
|
1238
|
+
// Reset all positions to 0,0 to trigger auto-layout
|
|
1239
|
+
for (const step of this.steps) {
|
|
1240
|
+
step.PositionX = 0;
|
|
1241
|
+
step.PositionY = 0;
|
|
1242
|
+
}
|
|
1243
|
+
// Re-arrange nodes
|
|
1244
|
+
await this.arrangeNodes();
|
|
1245
|
+
// Save all positions
|
|
1246
|
+
for (const step of this.steps) {
|
|
1247
|
+
const element = this.nodeElements.get(step.ID);
|
|
1248
|
+
if (element) {
|
|
1249
|
+
const transform = element.getAttribute('transform');
|
|
1250
|
+
const match = transform?.match(/translate\(([-\d.]+),\s*([-\d.]+)\)/);
|
|
1251
|
+
if (match) {
|
|
1252
|
+
const x = Math.round(parseFloat(match[1]));
|
|
1253
|
+
const y = Math.round(parseFloat(match[2]));
|
|
1254
|
+
await this.saveStepPosition(step.ID, x, y);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
// Selection handling
|
|
1260
|
+
onNodeClick(event, stepId) {
|
|
1261
|
+
event.stopPropagation();
|
|
1262
|
+
if (this.connectionMode) {
|
|
1263
|
+
// Handle connection creation
|
|
1264
|
+
this.handleConnectionCreation(stepId);
|
|
1265
|
+
}
|
|
1266
|
+
else {
|
|
1267
|
+
// Handle selection
|
|
1268
|
+
this.selectStep(stepId);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
onPathClick(event, pathId) {
|
|
1272
|
+
event.stopPropagation();
|
|
1273
|
+
this.selectPath(pathId);
|
|
1274
|
+
}
|
|
1275
|
+
selectStep(stepId) {
|
|
1276
|
+
// Clear previous selection
|
|
1277
|
+
this.clearSelection();
|
|
1278
|
+
// Set new selection
|
|
1279
|
+
this.selectedItem = { type: 'step', id: stepId };
|
|
1280
|
+
this.selectedStep = this.steps.find(s => s.ID === stepId) || null;
|
|
1281
|
+
this.selectedPath = null;
|
|
1282
|
+
// Update visual selection
|
|
1283
|
+
const element = this.nodeElements.get(stepId);
|
|
1284
|
+
if (element) {
|
|
1285
|
+
element.classList.add('selected');
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
selectPath(pathId) {
|
|
1289
|
+
// Clear previous selection
|
|
1290
|
+
this.clearSelection();
|
|
1291
|
+
// Set new selection
|
|
1292
|
+
this.selectedItem = { type: 'path', id: pathId };
|
|
1293
|
+
this.selectedPath = this.paths.find(p => p.ID === pathId) || null;
|
|
1294
|
+
this.selectedStep = null;
|
|
1295
|
+
// Update visual selection
|
|
1296
|
+
const element = this.connectionElements.get(pathId);
|
|
1297
|
+
if (element) {
|
|
1298
|
+
const path = element.querySelector('path');
|
|
1299
|
+
if (path) {
|
|
1300
|
+
path.classList.add('selected');
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
clearSelection() {
|
|
1305
|
+
// Clear visual selection
|
|
1306
|
+
this.nodeElements.forEach(element => {
|
|
1307
|
+
element.classList.remove('selected');
|
|
1308
|
+
});
|
|
1309
|
+
this.connectionElements.forEach(element => {
|
|
1310
|
+
const path = element.querySelector('path');
|
|
1311
|
+
if (path) {
|
|
1312
|
+
path.classList.remove('selected');
|
|
1313
|
+
}
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1316
|
+
closeProperties() {
|
|
1317
|
+
this.selectedItem = null;
|
|
1318
|
+
this.selectedStep = null;
|
|
1319
|
+
this.selectedPath = null;
|
|
1320
|
+
this.clearSelection();
|
|
1321
|
+
}
|
|
1322
|
+
// Connection mode handling
|
|
1323
|
+
connectFromStep() {
|
|
1324
|
+
if (!this.selectedStep)
|
|
1325
|
+
return;
|
|
1326
|
+
this.connectionMode = true;
|
|
1327
|
+
this.connectionSourceStepId = this.selectedStep.ID;
|
|
1328
|
+
this.closeProperties();
|
|
1329
|
+
}
|
|
1330
|
+
cancelConnectionMode() {
|
|
1331
|
+
this.connectionMode = false;
|
|
1332
|
+
this.connectionSourceStepId = null;
|
|
1333
|
+
this.tempConnection = null;
|
|
1334
|
+
}
|
|
1335
|
+
async handleConnectionCreation(targetStepId) {
|
|
1336
|
+
if (!this.connectionSourceStepId || this.connectionSourceStepId === targetStepId) {
|
|
1337
|
+
this.cancelConnectionMode();
|
|
1338
|
+
return;
|
|
1339
|
+
}
|
|
1340
|
+
try {
|
|
1341
|
+
// Create new path entity
|
|
1342
|
+
const md = new Metadata();
|
|
1343
|
+
const newPath = await md.GetEntityObject('MJ: AI Agent Step Paths');
|
|
1344
|
+
newPath.OriginStepID = this.connectionSourceStepId;
|
|
1345
|
+
newPath.DestinationStepID = targetStepId;
|
|
1346
|
+
newPath.Priority = 0;
|
|
1347
|
+
newPath.Condition = '';
|
|
1348
|
+
const result = await newPath.Save();
|
|
1349
|
+
if (result) {
|
|
1350
|
+
// Add to paths array
|
|
1351
|
+
this.paths.push(newPath);
|
|
1352
|
+
// Recreate the diagram to show new path
|
|
1353
|
+
await this.initializeDiagram();
|
|
1354
|
+
// Emit change
|
|
1355
|
+
this.pathsChanged.emit();
|
|
1356
|
+
// Select the new path
|
|
1357
|
+
this.selectPath(newPath.ID);
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
catch (error) {
|
|
1361
|
+
alert('Failed to create connection');
|
|
1362
|
+
}
|
|
1363
|
+
finally {
|
|
1364
|
+
this.cancelConnectionMode();
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
onSvgClick(event) {
|
|
1368
|
+
// Clear selection if clicking on empty space
|
|
1369
|
+
if (event.target === event.currentTarget) {
|
|
1370
|
+
this.closeProperties();
|
|
1371
|
+
}
|
|
1372
|
+
// Hide context menu
|
|
1373
|
+
this.contextMenu.visible = false;
|
|
1374
|
+
}
|
|
1375
|
+
onSvgContextMenu(event) {
|
|
1376
|
+
event.preventDefault();
|
|
1377
|
+
// Hide context menu if right-clicking on empty space
|
|
1378
|
+
this.contextMenu.visible = false;
|
|
1379
|
+
}
|
|
1380
|
+
// Document click handler to hide context menu
|
|
1381
|
+
onDocumentClick(event) {
|
|
1382
|
+
// Hide context menu when clicking outside
|
|
1383
|
+
if (this.contextMenu.visible) {
|
|
1384
|
+
this.contextMenu.visible = false;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
// Mouse move handler for magnetic connection
|
|
1388
|
+
onDocumentMouseMove(event) {
|
|
1389
|
+
if (this.connectionMode && this.connectionSourceStepId) {
|
|
1390
|
+
this.updateTempConnection(event);
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
updateTempConnection(event) {
|
|
1394
|
+
if (!this.reteContainer)
|
|
1395
|
+
return;
|
|
1396
|
+
const svg = this.reteContainer.nativeElement.querySelector('svg');
|
|
1397
|
+
if (!svg)
|
|
1398
|
+
return;
|
|
1399
|
+
const sourceElement = this.nodeElements.get(this.connectionSourceStepId);
|
|
1400
|
+
if (!sourceElement)
|
|
1401
|
+
return;
|
|
1402
|
+
// Get source position
|
|
1403
|
+
const sourceTransform = sourceElement.getAttribute('transform');
|
|
1404
|
+
const sourceMatch = sourceTransform?.match(/translate\(([-\d.]+),\s*([-\d.]+)\)/);
|
|
1405
|
+
if (!sourceMatch)
|
|
1406
|
+
return;
|
|
1407
|
+
const sourceX = parseFloat(sourceMatch[1]) + 140; // node width
|
|
1408
|
+
const sourceY = parseFloat(sourceMatch[2]) + 40; // half height
|
|
1409
|
+
// Get mouse position in SVG coordinates
|
|
1410
|
+
const pt = svg.createSVGPoint();
|
|
1411
|
+
pt.x = event.clientX;
|
|
1412
|
+
pt.y = event.clientY;
|
|
1413
|
+
const svgP = pt.matrixTransform(svg.getScreenCTM()?.inverse());
|
|
1414
|
+
// Create bezier path
|
|
1415
|
+
const dx = svgP.x - sourceX;
|
|
1416
|
+
const cx1 = sourceX + dx * 0.5;
|
|
1417
|
+
const cy1 = sourceY;
|
|
1418
|
+
const cx2 = svgP.x - dx * 0.5;
|
|
1419
|
+
const cy2 = svgP.y;
|
|
1420
|
+
this.tempConnection = {
|
|
1421
|
+
path: `M ${sourceX} ${sourceY} C ${cx1} ${cy1}, ${cx2} ${cy2}, ${svgP.x} ${svgP.y}`
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
// Property editing methods
|
|
1425
|
+
async saveStepProperties() {
|
|
1426
|
+
if (!this.selectedStep)
|
|
1427
|
+
return;
|
|
1428
|
+
try {
|
|
1429
|
+
const result = await this.selectedStep.Save();
|
|
1430
|
+
if (result) {
|
|
1431
|
+
// Don't reinitialize the diagram - just emit change event
|
|
1432
|
+
this.stepsChanged.emit();
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
catch (error) {
|
|
1436
|
+
alert('Failed to save step properties');
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
async savePathProperties() {
|
|
1440
|
+
if (!this.selectedPath)
|
|
1441
|
+
return;
|
|
1442
|
+
try {
|
|
1443
|
+
const result = await this.selectedPath.Save();
|
|
1444
|
+
if (result) {
|
|
1445
|
+
// Don't reinitialize the diagram - just emit change event
|
|
1446
|
+
this.pathsChanged.emit();
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
catch (error) {
|
|
1450
|
+
alert('Failed to save path properties');
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
async showConfirmDialog(title, content) {
|
|
1454
|
+
const dialog = this.dialogService.open({
|
|
1455
|
+
title: title,
|
|
1456
|
+
content: content,
|
|
1457
|
+
actions: [
|
|
1458
|
+
{ text: 'No', primary: false },
|
|
1459
|
+
{ text: 'Yes', primary: true, themeColor: 'primary' }
|
|
1460
|
+
],
|
|
1461
|
+
width: 450,
|
|
1462
|
+
height: 200
|
|
1463
|
+
});
|
|
1464
|
+
try {
|
|
1465
|
+
const result = await dialog.result;
|
|
1466
|
+
return !!(result && result.text === 'Yes');
|
|
1467
|
+
}
|
|
1468
|
+
catch {
|
|
1469
|
+
// Dialog was closed with X button or ESC
|
|
1470
|
+
return false;
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
async deleteSelectedStep() {
|
|
1474
|
+
if (!this.selectedStep)
|
|
1475
|
+
return;
|
|
1476
|
+
const confirmed = await this.showConfirmDialog('Delete Step', `Are you sure you want to delete the step "${this.selectedStep.Name}"? This will also delete all connected paths.`);
|
|
1477
|
+
if (!confirmed)
|
|
1478
|
+
return;
|
|
1479
|
+
try {
|
|
1480
|
+
// Delete all paths connected to this step
|
|
1481
|
+
const connectedPaths = this.paths.filter(p => p.OriginStepID === this.selectedStep.ID ||
|
|
1482
|
+
p.DestinationStepID === this.selectedStep.ID);
|
|
1483
|
+
for (const path of connectedPaths) {
|
|
1484
|
+
const pathResult = await path.Delete();
|
|
1485
|
+
if (!pathResult) {
|
|
1486
|
+
// Log the error details
|
|
1487
|
+
if (path.LatestResult) {
|
|
1488
|
+
console.error('Failed to delete path:', {
|
|
1489
|
+
pathId: path.ID,
|
|
1490
|
+
error: path.LatestResult.Error,
|
|
1491
|
+
errors: path.LatestResult.Errors,
|
|
1492
|
+
message: path.LatestResult.Message
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
alert('Failed to delete connected paths. Cannot delete step.');
|
|
1496
|
+
return;
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
// Delete the step
|
|
1500
|
+
const result = await this.selectedStep.Delete();
|
|
1501
|
+
if (result) {
|
|
1502
|
+
// Remove from arrays
|
|
1503
|
+
this.steps = this.steps.filter(s => s.ID !== this.selectedStep.ID);
|
|
1504
|
+
this.paths = this.paths.filter(p => p.OriginStepID !== this.selectedStep.ID &&
|
|
1505
|
+
p.DestinationStepID !== this.selectedStep.ID);
|
|
1506
|
+
// Close properties
|
|
1507
|
+
this.closeProperties();
|
|
1508
|
+
// Recreate diagram
|
|
1509
|
+
await this.initializeDiagram();
|
|
1510
|
+
// Emit changes
|
|
1511
|
+
this.stepsChanged.emit();
|
|
1512
|
+
this.pathsChanged.emit();
|
|
1513
|
+
}
|
|
1514
|
+
else {
|
|
1515
|
+
// Log the error details
|
|
1516
|
+
if (this.selectedStep.LatestResult) {
|
|
1517
|
+
console.error('Failed to delete step:', {
|
|
1518
|
+
stepId: this.selectedStep.ID,
|
|
1519
|
+
stepName: this.selectedStep.Name,
|
|
1520
|
+
error: this.selectedStep.LatestResult.Error,
|
|
1521
|
+
errors: this.selectedStep.LatestResult.Errors,
|
|
1522
|
+
message: this.selectedStep.LatestResult.Message
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
alert('Failed to delete step. Please check the console for details.');
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
catch (error) {
|
|
1529
|
+
console.error('Exception while deleting step:', error);
|
|
1530
|
+
alert('Failed to delete step. Please ensure all related connections are removed first.');
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
async deleteSelectedPath() {
|
|
1534
|
+
if (!this.selectedPath)
|
|
1535
|
+
return;
|
|
1536
|
+
const confirmed = await this.showConfirmDialog('Delete Connection', 'Are you sure you want to delete this connection?');
|
|
1537
|
+
if (!confirmed)
|
|
1538
|
+
return;
|
|
1539
|
+
try {
|
|
1540
|
+
const result = await this.selectedPath.Delete();
|
|
1541
|
+
if (result) {
|
|
1542
|
+
// Remove from array
|
|
1543
|
+
this.paths = this.paths.filter(p => p.ID !== this.selectedPath.ID);
|
|
1544
|
+
// Close properties
|
|
1545
|
+
this.closeProperties();
|
|
1546
|
+
// Recreate diagram
|
|
1547
|
+
await this.initializeDiagram();
|
|
1548
|
+
// Emit change
|
|
1549
|
+
this.pathsChanged.emit();
|
|
1550
|
+
}
|
|
1551
|
+
else {
|
|
1552
|
+
// Log the error details
|
|
1553
|
+
if (this.selectedPath.LatestResult) {
|
|
1554
|
+
console.error('Failed to delete path:', {
|
|
1555
|
+
pathId: this.selectedPath.ID,
|
|
1556
|
+
originStepId: this.selectedPath.OriginStepID,
|
|
1557
|
+
destinationStepId: this.selectedPath.DestinationStepID,
|
|
1558
|
+
error: this.selectedPath.LatestResult.Error,
|
|
1559
|
+
errors: this.selectedPath.LatestResult.Errors,
|
|
1560
|
+
message: this.selectedPath.LatestResult.Message
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1563
|
+
alert('Failed to delete connection. Please check the console for details.');
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
catch (error) {
|
|
1567
|
+
console.error('Exception while deleting path:', error);
|
|
1568
|
+
alert('Failed to delete connection');
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
getStepName(stepId) {
|
|
1572
|
+
const step = this.steps.find(s => s.ID === stepId);
|
|
1573
|
+
return step?.Name || 'Unknown Step';
|
|
1574
|
+
}
|
|
1575
|
+
// Pan and zoom methods
|
|
1576
|
+
zoomIn() {
|
|
1577
|
+
this.panZoom.scale = Math.min(this.panZoom.scale * 1.2, 3);
|
|
1578
|
+
this.updateTransform();
|
|
1579
|
+
}
|
|
1580
|
+
zoomOut() {
|
|
1581
|
+
this.panZoom.scale = Math.max(this.panZoom.scale / 1.2, 0.3);
|
|
1582
|
+
this.updateTransform();
|
|
1583
|
+
}
|
|
1584
|
+
resetZoom() {
|
|
1585
|
+
this.panZoom.scale = 1;
|
|
1586
|
+
this.panZoom.translateX = 0;
|
|
1587
|
+
this.panZoom.translateY = 0;
|
|
1588
|
+
this.updateTransform();
|
|
1589
|
+
}
|
|
1590
|
+
onWheel(event) {
|
|
1591
|
+
event.preventDefault();
|
|
1592
|
+
const delta = event.deltaY > 0 ? 0.9 : 1.1;
|
|
1593
|
+
this.panZoom.scale = Math.max(0.3, Math.min(3, this.panZoom.scale * delta));
|
|
1594
|
+
this.updateTransform();
|
|
1595
|
+
}
|
|
1596
|
+
onSvgMouseDown(event) {
|
|
1597
|
+
if (event.button === 0 && !this.connectionMode && event.target === event.currentTarget) {
|
|
1598
|
+
this.panZoom.isPanning = true;
|
|
1599
|
+
this.panZoom.startX = event.clientX - this.panZoom.translateX;
|
|
1600
|
+
this.panZoom.startY = event.clientY - this.panZoom.translateY;
|
|
1601
|
+
event.preventDefault();
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
onSvgMouseMove(event) {
|
|
1605
|
+
if (this.panZoom.isPanning) {
|
|
1606
|
+
this.panZoom.translateX = event.clientX - this.panZoom.startX;
|
|
1607
|
+
this.panZoom.translateY = event.clientY - this.panZoom.startY;
|
|
1608
|
+
this.updateTransform();
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
onSvgMouseUp(event) {
|
|
1612
|
+
this.panZoom.isPanning = false;
|
|
1613
|
+
}
|
|
1614
|
+
updateTransform() {
|
|
1615
|
+
const svg = this.reteContainer?.nativeElement?.querySelector('svg');
|
|
1616
|
+
if (svg) {
|
|
1617
|
+
const mainGroup = svg.querySelector('g');
|
|
1618
|
+
if (mainGroup) {
|
|
1619
|
+
mainGroup.setAttribute('transform', `translate(${this.panZoom.translateX}, ${this.panZoom.translateY}) scale(${this.panZoom.scale})`);
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
// Context menu methods
|
|
1624
|
+
onNodeContextMenu(event, stepId) {
|
|
1625
|
+
event.preventDefault();
|
|
1626
|
+
event.stopPropagation();
|
|
1627
|
+
if (!this.EditMode)
|
|
1628
|
+
return;
|
|
1629
|
+
// Show context menu
|
|
1630
|
+
const rect = this.reteContainer.nativeElement.getBoundingClientRect();
|
|
1631
|
+
this.contextMenu = {
|
|
1632
|
+
visible: true,
|
|
1633
|
+
x: event.clientX - rect.left,
|
|
1634
|
+
y: event.clientY - rect.top,
|
|
1635
|
+
type: 'step',
|
|
1636
|
+
targetId: stepId
|
|
1637
|
+
};
|
|
1638
|
+
// Select the step
|
|
1639
|
+
this.selectStep(stepId);
|
|
1640
|
+
}
|
|
1641
|
+
onPathContextMenu(event, pathId) {
|
|
1642
|
+
event.preventDefault();
|
|
1643
|
+
event.stopPropagation();
|
|
1644
|
+
if (!this.EditMode)
|
|
1645
|
+
return;
|
|
1646
|
+
// Show context menu
|
|
1647
|
+
const rect = this.reteContainer.nativeElement.getBoundingClientRect();
|
|
1648
|
+
this.contextMenu = {
|
|
1649
|
+
visible: true,
|
|
1650
|
+
x: event.clientX - rect.left,
|
|
1651
|
+
y: event.clientY - rect.top,
|
|
1652
|
+
type: 'path',
|
|
1653
|
+
targetId: pathId
|
|
1654
|
+
};
|
|
1655
|
+
// Select the path
|
|
1656
|
+
this.selectPath(pathId);
|
|
1657
|
+
}
|
|
1658
|
+
connectFromContextMenu() {
|
|
1659
|
+
if (this.contextMenu.targetId) {
|
|
1660
|
+
this.contextMenu.visible = false;
|
|
1661
|
+
this.connectFromStep();
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
deleteFromContextMenu() {
|
|
1665
|
+
if (this.contextMenu.targetId) {
|
|
1666
|
+
this.contextMenu.visible = false;
|
|
1667
|
+
this.deleteSelectedStep();
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
deletePathFromContextMenu() {
|
|
1671
|
+
if (this.contextMenu.targetId) {
|
|
1672
|
+
this.contextMenu.visible = false;
|
|
1673
|
+
this.deleteSelectedPath();
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
// Socket drag-and-drop handlers
|
|
1677
|
+
onSocketMouseDown(event, stepId, socketType) {
|
|
1678
|
+
event.stopPropagation();
|
|
1679
|
+
event.preventDefault();
|
|
1680
|
+
if (socketType === 'output') {
|
|
1681
|
+
// Start connection from output socket
|
|
1682
|
+
this.connectionMode = true;
|
|
1683
|
+
this.connectionSourceStepId = stepId;
|
|
1684
|
+
// Create temp connection that follows mouse
|
|
1685
|
+
const sourceNode = this.nodeElements.get(stepId);
|
|
1686
|
+
if (sourceNode) {
|
|
1687
|
+
const transform = sourceNode.getAttribute('transform');
|
|
1688
|
+
const match = transform?.match(/translate\(([-\d.]+),\s*([-\d.]+)\)/);
|
|
1689
|
+
if (match) {
|
|
1690
|
+
const nodeX = parseFloat(match[1]);
|
|
1691
|
+
const nodeY = parseFloat(match[2]);
|
|
1692
|
+
const outputX = nodeX + 140; // Node width
|
|
1693
|
+
const outputY = nodeY + 40; // Node height / 2
|
|
1694
|
+
// Start tracking mouse for temp connection
|
|
1695
|
+
this.updateTempConnection(event);
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
onSocketMouseEnter(event, stepId, socketType) {
|
|
1701
|
+
if (this.connectionMode && socketType === 'input' && stepId !== this.connectionSourceStepId) {
|
|
1702
|
+
// Highlight socket when hovering during connection mode
|
|
1703
|
+
const socket = event.target;
|
|
1704
|
+
socket.setAttribute('r', '7');
|
|
1705
|
+
socket.setAttribute('fill', '#4a90e2');
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
onSocketMouseLeave(event) {
|
|
1709
|
+
if (this.connectionMode) {
|
|
1710
|
+
// Remove highlight
|
|
1711
|
+
const socket = event.target;
|
|
1712
|
+
socket.setAttribute('r', '5');
|
|
1713
|
+
socket.setAttribute('fill', 'white');
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
onSocketMouseUp(event, stepId, socketType) {
|
|
1717
|
+
if (this.connectionMode && socketType === 'input' && this.connectionSourceStepId && stepId !== this.connectionSourceStepId) {
|
|
1718
|
+
// Complete the connection
|
|
1719
|
+
event.stopPropagation();
|
|
1720
|
+
this.handleConnectionCreation(stepId);
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
static { this.ɵfac = function FlowAgentDiagramComponent_Factory(t) { return new (t || FlowAgentDiagramComponent)(i0.ɵɵdirectiveInject(i1.DialogService)); }; }
|
|
1724
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FlowAgentDiagramComponent, selectors: [["mj-flow-agent-diagram"]], viewQuery: function FlowAgentDiagramComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1725
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
1726
|
+
} if (rf & 2) {
|
|
1727
|
+
let _t;
|
|
1728
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.reteContainer = _t.first);
|
|
1729
|
+
} }, hostBindings: function FlowAgentDiagramComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1730
|
+
i0.ɵɵlistener("click", function FlowAgentDiagramComponent_click_HostBindingHandler($event) { return ctx.onDocumentClick($event); }, false, i0.ɵɵresolveDocument)("mousemove", function FlowAgentDiagramComponent_mousemove_HostBindingHandler($event) { return ctx.onDocumentMouseMove($event); }, false, i0.ɵɵresolveDocument);
|
|
1731
|
+
} }, inputs: { agentId: "agentId", steps: "steps", paths: "paths", EditMode: "EditMode" }, outputs: { stepsChanged: "stepsChanged", pathsChanged: "pathsChanged" }, features: [i0.ɵɵNgOnChangesFeature], decls: 5, vars: 1, consts: [["reteContainer", ""], [1, "flow-diagram-container"], [1, "loading-state"], [1, "error-state"], [1, "empty-state"], ["orientation", "horizontal", 2, "height", "100%"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-exclamation-triangle"], [1, "fa-solid", "fa-info-circle"], [3, "collapsible"], [1, "rete-container"], [1, "diagram-toolbar"], [1, "zoom-controls"], ["title", "Zoom in", 3, "click"], [1, "fa-solid", "fa-search-plus"], ["title", "Zoom out", 3, "click"], [1, "fa-solid", "fa-search-minus"], ["title", "Reset zoom", 3, "click"], [1, "fa-solid", "fa-compress"], [1, "zoom-level"], ["width", "100%", "height", "100%", 1, "rete-svg", 3, "click", "contextmenu", "wheel", "mousedown", "mousemove", "mouseup"], ["fill", "none", "stroke", "#4a90e2", "stroke-width", "2", "stroke-dasharray", "5,5", "opacity", "0.6"], [1, "connection-hint"], [1, "context-menu", 3, "left", "top"], [3, "size", "min", "max", "collapsible"], ["title", "Add new step", 3, "click"], [1, "fa-solid", "fa-plus"], ["title", "Auto-arrange nodes"], [1, "connection-mode-active"], ["title", "Auto-arrange nodes", 3, "click"], [1, "fa-solid", "fa-magic"], [1, "connection-mode-active", 3, "click"], [1, "fa-solid", "fa-times"], [1, "context-menu", 3, "click"], [1, "danger"], [3, "click"], [1, "fa-solid", "fa-link"], [1, "danger", 3, "click"], [1, "fa-solid", "fa-trash"], [1, "properties-pane"], [1, "properties-header"], ["title", "Close", 3, "click"], [1, "properties-content"], [1, "fa-solid", "fa-circle-nodes"], [1, "fa-solid", "fa-route"], [1, "property-group"], [1, "property-item"], [1, "property-label"], ["type", "text", 1, "property-input", 3, "ngModel"], [1, "property-value"], [3, "data", "ngModel"], ["rows", "3", 1, "property-textarea", 3, "ngModel"], [1, "property-actions"], ["type", "text", 1, "property-input", 3, "ngModelChange", "blur", "ngModel"], [3, "ngModelChange", "valueChange", "data", "ngModel"], ["rows", "3", 1, "property-textarea", 3, "ngModelChange", "blur", "ngModel"], ["rows", "2", 1, "property-textarea", 3, "ngModel"], ["rows", "2", 1, "property-textarea", 3, "ngModelChange", "blur", "ngModel"], [1, "danger-button", 3, "click"], [3, "click", "disabled"], ["type", "number", 1, "property-input", 3, "ngModel"], ["type", "number", 1, "property-input", 3, "ngModelChange", "blur", "ngModel"]], template: function FlowAgentDiagramComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1732
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
1733
|
+
i0.ɵɵtemplate(1, FlowAgentDiagramComponent_Conditional_1_Template, 4, 0, "div", 2)(2, FlowAgentDiagramComponent_Conditional_2_Template, 4, 1, "div", 3)(3, FlowAgentDiagramComponent_Conditional_3_Template, 4, 0, "div", 4)(4, FlowAgentDiagramComponent_Conditional_4_Template, 20, 9, "kendo-splitter", 5);
|
|
1734
|
+
i0.ɵɵelementEnd();
|
|
1735
|
+
} if (rf & 2) {
|
|
1736
|
+
i0.ɵɵadvance();
|
|
1737
|
+
i0.ɵɵconditional(ctx.loading ? 1 : ctx.error ? 2 : !ctx.steps || ctx.steps.length === 0 ? 3 : 4);
|
|
1738
|
+
} }, dependencies: [i2.DefaultValueAccessor, i2.NumberValueAccessor, i2.NgControlStatus, i2.NgModel, i3.SplitterComponent, i3.SplitterPaneComponent, i4.DropDownListComponent], styles: [".flow-diagram-container[_ngcontent-%COMP%] {\n width: 100%;\n height: 600px;\n min-height: 400px;\n max-height: 1200px;\n position: relative;\n background: #f5f5f5;\n border: 1px solid #ddd;\n border-radius: 4px;\n overflow: auto;\n resize: vertical;\n }\n \n .flow-diagram-container[_ngcontent-%COMP%]::after {\n content: '';\n position: absolute;\n bottom: 0;\n right: 0;\n width: 20px;\n height: 20px;\n cursor: ns-resize;\n background: linear-gradient(135deg, transparent 50%, #999 50%);\n border-bottom-right-radius: 4px;\n pointer-events: none;\n }\n \n .diagram-toolbar[_ngcontent-%COMP%] {\n position: absolute;\n top: 10px;\n right: 10px;\n left: 10px;\n display: flex;\n gap: 5px;\n z-index: 10;\n background: white;\n padding: 5px;\n border-radius: 4px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n justify-content: space-between;\n }\n \n .zoom-controls[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n align-items: center;\n }\n \n .zoom-level[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #666;\n margin-left: 8px;\n }\n \n .diagram-toolbar[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n padding: 5px 10px;\n border: 1px solid #ddd;\n background: white;\n border-radius: 3px;\n cursor: pointer;\n font-size: 12px;\n display: flex;\n align-items: center;\n gap: 5px;\n }\n \n .diagram-toolbar[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover {\n background: #f0f0f0;\n border-color: #4a90e2;\n }\n \n .diagram-toolbar[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n }\n \n .rete-container[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n position: relative;\n overflow: auto;\n }\n \n .rete-svg[_ngcontent-%COMP%] {\n min-width: 100%;\n min-height: 100%;\n }\n \n .loading-state[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n gap: 0.5rem;\n color: #666;\n }\n \n .error-state[_ngcontent-%COMP%] {\n color: #c00;\n }\n \n .empty-state[_ngcontent-%COMP%] {\n flex-direction: column;\n }\n \n .empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 2rem;\n opacity: 0.5;\n }\n \n [_nghost-%COMP%] .step-node {\n cursor: move;\n }\n \n [_nghost-%COMP%] .step-node.dragging {\n opacity: 0.8;\n }\n \n [_nghost-%COMP%] .step-node-title {\n font-family: Arial, sans-serif;\n }\n \n [_nghost-%COMP%] .connection-path {\n cursor: pointer;\n }\n \n [_nghost-%COMP%] .connection-path:hover {\n stroke-width: 3;\n }\n \n .context-menu[_ngcontent-%COMP%] {\n position: absolute;\n background: white;\n border: 1px solid #ddd;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.2);\n padding: 5px 0;\n min-width: 150px;\n z-index: 1000;\n display: none;\n }\n \n .context-menu.show[_ngcontent-%COMP%] {\n display: block;\n }\n \n .context-menu-item[_ngcontent-%COMP%] {\n padding: 8px 15px;\n cursor: pointer;\n font-size: 13px;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n \n .context-menu-item[_ngcontent-%COMP%]:hover {\n background: #f0f0f0;\n }\n \n .context-menu-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n width: 16px;\n text-align: center;\n }\n \n .context-menu-divider[_ngcontent-%COMP%] {\n height: 1px;\n background: #e0e0e0;\n margin: 5px 0;\n }\n \n .properties-pane[_ngcontent-%COMP%] {\n height: 100%;\n background: white;\n display: flex;\n flex-direction: column;\n }\n \n .connection-mode-active[_ngcontent-%COMP%] {\n background: #ff4444 !important;\n color: white !important;\n border-color: #ff4444 !important;\n }\n \n .rete-svg.connection-mode[_ngcontent-%COMP%] {\n cursor: crosshair;\n }\n \n .connection-hint[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n background: rgba(0, 0, 0, 0.8);\n color: white;\n padding: 8px 16px;\n border-radius: 4px;\n font-size: 12px;\n }\n \n .context-menu[_ngcontent-%COMP%] {\n position: absolute;\n background: white;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.15);\n z-index: 1000;\n padding: 4px 0;\n min-width: 150px;\n }\n \n .context-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n display: block;\n width: 100%;\n padding: 8px 16px;\n border: none;\n background: none;\n text-align: left;\n cursor: pointer;\n font-size: 13px;\n transition: background-color 0.2s;\n }\n \n .context-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover {\n background-color: #f0f0f0;\n }\n \n .context-menu[_ngcontent-%COMP%] button.danger[_ngcontent-%COMP%] {\n color: #c00;\n }\n \n .context-menu[_ngcontent-%COMP%] button.danger[_ngcontent-%COMP%]:hover {\n background-color: #fee;\n }\n \n .context-menu[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 8px;\n width: 16px;\n text-align: center;\n }\n \n .properties-header[_ngcontent-%COMP%] {\n padding: 10px 15px;\n border-bottom: 1px solid #e0e0e0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n \n .properties-header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n }\n \n .properties-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n background: none;\n border: none;\n cursor: pointer;\n padding: 4px;\n color: #666;\n }\n \n .properties-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 15px;\n }\n \n .property-group[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n }\n \n .property-group[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\n margin: 0 0 10px 0;\n font-size: 12px;\n font-weight: 600;\n color: #666;\n text-transform: uppercase;\n }\n \n .property-item[_ngcontent-%COMP%] {\n margin-bottom: 10px;\n }\n \n .property-label[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #666;\n margin-bottom: 3px;\n }\n \n .property-value[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #333;\n padding: 5px 8px;\n background: #f5f5f5;\n border-radius: 3px;\n word-break: break-word;\n }\n \n .property-actions[_ngcontent-%COMP%] {\n margin-top: 10px;\n display: flex;\n gap: 5px;\n }\n \n .property-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n padding: 5px 10px;\n font-size: 12px;\n border: 1px solid #ddd;\n background: white;\n border-radius: 3px;\n cursor: pointer;\n }\n \n .property-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover {\n background: #f0f0f0;\n border-color: #4a90e2;\n }\n \n .property-input[_ngcontent-%COMP%] {\n width: 100%;\n padding: 6px 10px;\n border: 1px solid #ddd;\n border-radius: 3px;\n font-size: 13px;\n }\n \n .property-textarea[_ngcontent-%COMP%] {\n width: 100%;\n padding: 6px 10px;\n border: 1px solid #ddd;\n border-radius: 3px;\n font-size: 13px;\n resize: vertical;\n }\n \n .property-value[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #333;\n padding: 6px 10px;\n background: #f5f5f5;\n border-radius: 3px;\n min-height: 32px;\n display: flex;\n align-items: center;\n }\n \n .danger-button[_ngcontent-%COMP%] {\n background: #ff4444 !important;\n color: white !important;\n border-color: #ff4444 !important;\n }\n \n .danger-button[_ngcontent-%COMP%]:hover {\n background: #cc0000 !important;\n border-color: #cc0000 !important;\n }\n \n [_nghost-%COMP%] .step-node.selected {\n filter: drop-shadow(0 0 8px #4a90e2);\n }\n \n [_nghost-%COMP%] .connection-path.selected {\n stroke: #ff9800;\n stroke-width: 3;\n }\n \n [_nghost-%COMP%] .output-socket:hover {\n r: 7;\n fill: #e3f2fd;\n }\n \n [_nghost-%COMP%] .input-socket:hover {\n r: 7;\n fill: #e3f2fd;\n }"] }); }
|
|
1739
|
+
}
|
|
1740
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlowAgentDiagramComponent, [{
|
|
1741
|
+
type: Component,
|
|
1742
|
+
args: [{ selector: 'mj-flow-agent-diagram', template: `
|
|
1743
|
+
<div class="flow-diagram-container">
|
|
1744
|
+
@if (loading) {
|
|
1745
|
+
<div class="loading-state">
|
|
1746
|
+
<i class="fa-solid fa-spinner fa-spin"></i>
|
|
1747
|
+
<span>Loading flow diagram...</span>
|
|
1748
|
+
</div>
|
|
1749
|
+
} @else if (error) {
|
|
1750
|
+
<div class="error-state">
|
|
1751
|
+
<i class="fa-solid fa-exclamation-triangle"></i>
|
|
1752
|
+
<span>{{ error }}</span>
|
|
1753
|
+
</div>
|
|
1754
|
+
} @else if (!steps || steps.length === 0) {
|
|
1755
|
+
<div class="empty-state">
|
|
1756
|
+
<i class="fa-solid fa-info-circle"></i>
|
|
1757
|
+
<span>No workflow steps to display</span>
|
|
1758
|
+
</div>
|
|
1759
|
+
} @else {
|
|
1760
|
+
<kendo-splitter orientation="horizontal" style="height: 100%;">
|
|
1761
|
+
<kendo-splitter-pane [collapsible]="false">
|
|
1762
|
+
<div class="rete-container" #reteContainer>
|
|
1763
|
+
<div class="diagram-toolbar">
|
|
1764
|
+
@if (EditMode) {
|
|
1765
|
+
<button (click)="addNewStep()" title="Add new step">
|
|
1766
|
+
<i class="fa-solid fa-plus"></i>
|
|
1767
|
+
Add Step
|
|
1768
|
+
</button>
|
|
1769
|
+
@if (false) {
|
|
1770
|
+
<button (click)="autoArrange()" title="Auto-arrange nodes">
|
|
1771
|
+
<i class="fa-solid fa-magic"></i>
|
|
1772
|
+
Auto Arrange
|
|
1773
|
+
</button>
|
|
1774
|
+
}
|
|
1775
|
+
@if (connectionMode) {
|
|
1776
|
+
<button (click)="cancelConnectionMode()" class="connection-mode-active">
|
|
1777
|
+
<i class="fa-solid fa-times"></i>
|
|
1778
|
+
Cancel Connection
|
|
1779
|
+
</button>
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
<div class="zoom-controls">
|
|
1783
|
+
<button (click)="zoomIn()" title="Zoom in">
|
|
1784
|
+
<i class="fa-solid fa-search-plus"></i>
|
|
1785
|
+
</button>
|
|
1786
|
+
<button (click)="zoomOut()" title="Zoom out">
|
|
1787
|
+
<i class="fa-solid fa-search-minus"></i>
|
|
1788
|
+
</button>
|
|
1789
|
+
<button (click)="resetZoom()" title="Reset zoom">
|
|
1790
|
+
<i class="fa-solid fa-compress"></i>
|
|
1791
|
+
</button>
|
|
1792
|
+
<span class="zoom-level">{{ (panZoom.scale * 100).toFixed(0) }}%</span>
|
|
1793
|
+
</div>
|
|
1794
|
+
</div>
|
|
1795
|
+
<svg class="rete-svg" width="100%" height="100%"
|
|
1796
|
+
(click)="onSvgClick($event)"
|
|
1797
|
+
(contextmenu)="onSvgContextMenu($event)"
|
|
1798
|
+
(wheel)="onWheel($event)"
|
|
1799
|
+
(mousedown)="onSvgMouseDown($event)"
|
|
1800
|
+
(mousemove)="onSvgMouseMove($event)"
|
|
1801
|
+
(mouseup)="onSvgMouseUp($event)"
|
|
1802
|
+
[class.connection-mode]="connectionMode">
|
|
1803
|
+
@if (tempConnection) {
|
|
1804
|
+
<path [attr.d]="tempConnection.path"
|
|
1805
|
+
fill="none"
|
|
1806
|
+
stroke="#4a90e2"
|
|
1807
|
+
stroke-width="2"
|
|
1808
|
+
stroke-dasharray="5,5"
|
|
1809
|
+
opacity="0.6"/>
|
|
1810
|
+
}
|
|
1811
|
+
</svg>
|
|
1812
|
+
@if (connectionMode) {
|
|
1813
|
+
<div class="connection-hint">
|
|
1814
|
+
Click on a target step to create connection
|
|
1815
|
+
</div>
|
|
1816
|
+
}
|
|
1817
|
+
@if (contextMenu.visible) {
|
|
1818
|
+
<div class="context-menu"
|
|
1819
|
+
[style.left.px]="contextMenu.x"
|
|
1820
|
+
[style.top.px]="contextMenu.y"
|
|
1821
|
+
(click)="$event.stopPropagation()">
|
|
1822
|
+
@if (contextMenu.type === 'step') {
|
|
1823
|
+
<button (click)="connectFromContextMenu()">
|
|
1824
|
+
<i class="fa-solid fa-link"></i>
|
|
1825
|
+
Connect To...
|
|
1826
|
+
</button>
|
|
1827
|
+
<button (click)="deleteFromContextMenu()" class="danger">
|
|
1828
|
+
<i class="fa-solid fa-trash"></i>
|
|
1829
|
+
Delete Step
|
|
1830
|
+
</button>
|
|
1831
|
+
} @else if (contextMenu.type === 'path') {
|
|
1832
|
+
<button (click)="deletePathFromContextMenu()" class="danger">
|
|
1833
|
+
<i class="fa-solid fa-trash"></i>
|
|
1834
|
+
Delete Path
|
|
1835
|
+
</button>
|
|
1836
|
+
}
|
|
1837
|
+
</div>
|
|
1838
|
+
}
|
|
1839
|
+
</div>
|
|
1840
|
+
</kendo-splitter-pane>
|
|
1841
|
+
@if (selectedItem) {
|
|
1842
|
+
<kendo-splitter-pane [size]="'300px'" [min]="'250px'" [max]="'400px'" [collapsible]="true">
|
|
1843
|
+
<div class="properties-pane">
|
|
1844
|
+
<div class="properties-header">
|
|
1845
|
+
<h4>
|
|
1846
|
+
@if (selectedItem.type === 'step') {
|
|
1847
|
+
<i class="fa-solid fa-circle-nodes"></i> Step Properties
|
|
1848
|
+
} @else {
|
|
1849
|
+
<i class="fa-solid fa-route"></i> Path Properties
|
|
1850
|
+
}
|
|
1851
|
+
</h4>
|
|
1852
|
+
<button (click)="closeProperties()" title="Close">
|
|
1853
|
+
<i class="fa-solid fa-times"></i>
|
|
1854
|
+
</button>
|
|
1855
|
+
</div>
|
|
1856
|
+
<div class="properties-content">
|
|
1857
|
+
@if (selectedItem.type === 'step') {
|
|
1858
|
+
<div class="property-group">
|
|
1859
|
+
<h5>Basic Information</h5>
|
|
1860
|
+
<div class="property-item">
|
|
1861
|
+
<div class="property-label">Name</div>
|
|
1862
|
+
@if (EditMode) {
|
|
1863
|
+
<input type="text"
|
|
1864
|
+
class="property-input"
|
|
1865
|
+
[(ngModel)]="selectedStep!.Name"
|
|
1866
|
+
(blur)="saveStepProperties()">
|
|
1867
|
+
} @else {
|
|
1868
|
+
<div class="property-value">{{ selectedStep!.Name }}</div>
|
|
1869
|
+
}
|
|
1870
|
+
</div>
|
|
1871
|
+
<div class="property-item">
|
|
1872
|
+
<div class="property-label">Type</div>
|
|
1873
|
+
@if (EditMode) {
|
|
1874
|
+
<kendo-dropdownlist
|
|
1875
|
+
[data]="stepTypes"
|
|
1876
|
+
[(ngModel)]="selectedStep!.StepType"
|
|
1877
|
+
(valueChange)="saveStepProperties()">
|
|
1878
|
+
</kendo-dropdownlist>
|
|
1879
|
+
} @else {
|
|
1880
|
+
<div class="property-value">{{ selectedStep!.StepType }}</div>
|
|
1881
|
+
}
|
|
1882
|
+
</div>
|
|
1883
|
+
<div class="property-item">
|
|
1884
|
+
<div class="property-label">Description</div>
|
|
1885
|
+
@if (EditMode) {
|
|
1886
|
+
<textarea class="property-textarea"
|
|
1887
|
+
[(ngModel)]="selectedStep!.Description"
|
|
1888
|
+
(blur)="saveStepProperties()"
|
|
1889
|
+
rows="3"></textarea>
|
|
1890
|
+
} @else {
|
|
1891
|
+
<div class="property-value">{{ selectedStep!.Description || 'No description' }}</div>
|
|
1892
|
+
}
|
|
1893
|
+
</div>
|
|
1894
|
+
<div class="property-item">
|
|
1895
|
+
<div class="property-label">Status</div>
|
|
1896
|
+
@if (EditMode) {
|
|
1897
|
+
<kendo-dropdownlist
|
|
1898
|
+
[data]="stepStatuses"
|
|
1899
|
+
[(ngModel)]="selectedStep!.Status"
|
|
1900
|
+
(valueChange)="saveStepProperties()">
|
|
1901
|
+
</kendo-dropdownlist>
|
|
1902
|
+
} @else {
|
|
1903
|
+
<div class="property-value">{{ selectedStep!.Status }}</div>
|
|
1904
|
+
}
|
|
1905
|
+
</div>
|
|
1906
|
+
</div>
|
|
1907
|
+
@if (selectedStep!.StepType === 'Action') {
|
|
1908
|
+
<div class="property-group">
|
|
1909
|
+
<h5>Action Configuration</h5>
|
|
1910
|
+
<div class="property-item">
|
|
1911
|
+
<div class="property-label">Input Mapping</div>
|
|
1912
|
+
@if (EditMode) {
|
|
1913
|
+
<textarea class="property-textarea"
|
|
1914
|
+
[(ngModel)]="selectedStep!.ActionInputMapping"
|
|
1915
|
+
(blur)="saveStepProperties()"
|
|
1916
|
+
rows="2"></textarea>
|
|
1917
|
+
} @else {
|
|
1918
|
+
<div class="property-value">{{ selectedStep!.ActionInputMapping || 'None' }}</div>
|
|
1919
|
+
}
|
|
1920
|
+
</div>
|
|
1921
|
+
<div class="property-item">
|
|
1922
|
+
<div class="property-label">Output Mapping</div>
|
|
1923
|
+
@if (EditMode) {
|
|
1924
|
+
<textarea class="property-textarea"
|
|
1925
|
+
[(ngModel)]="selectedStep!.ActionOutputMapping"
|
|
1926
|
+
(blur)="saveStepProperties()"
|
|
1927
|
+
rows="2"></textarea>
|
|
1928
|
+
} @else {
|
|
1929
|
+
<div class="property-value">{{ selectedStep!.ActionOutputMapping || 'None' }}</div>
|
|
1930
|
+
}
|
|
1931
|
+
</div>
|
|
1932
|
+
</div>
|
|
1933
|
+
}
|
|
1934
|
+
@if (EditMode) {
|
|
1935
|
+
<div class="property-actions">
|
|
1936
|
+
<button (click)="deleteSelectedStep()" class="danger-button">
|
|
1937
|
+
<i class="fa-solid fa-trash"></i>
|
|
1938
|
+
Delete Step
|
|
1939
|
+
</button>
|
|
1940
|
+
<button (click)="connectFromStep()" [disabled]="connectionMode">
|
|
1941
|
+
<i class="fa-solid fa-link"></i>
|
|
1942
|
+
Connect To...
|
|
1943
|
+
</button>
|
|
1944
|
+
</div>
|
|
1945
|
+
}
|
|
1946
|
+
} @else {
|
|
1947
|
+
<div class="property-group">
|
|
1948
|
+
<h5>Path Information</h5>
|
|
1949
|
+
<div class="property-item">
|
|
1950
|
+
<div class="property-label">From Step</div>
|
|
1951
|
+
<div class="property-value">{{ getStepName(selectedPath!.OriginStepID) }}</div>
|
|
1952
|
+
</div>
|
|
1953
|
+
<div class="property-item">
|
|
1954
|
+
<div class="property-label">To Step</div>
|
|
1955
|
+
<div class="property-value">{{ getStepName(selectedPath!.DestinationStepID) }}</div>
|
|
1956
|
+
</div>
|
|
1957
|
+
<div class="property-item">
|
|
1958
|
+
<div class="property-label">Condition</div>
|
|
1959
|
+
@if (EditMode) {
|
|
1960
|
+
<textarea class="property-textarea"
|
|
1961
|
+
[(ngModel)]="selectedPath!.Condition"
|
|
1962
|
+
(blur)="savePathProperties()"
|
|
1963
|
+
rows="3"></textarea>
|
|
1964
|
+
} @else {
|
|
1965
|
+
<div class="property-value">{{ selectedPath!.Condition || 'No condition' }}</div>
|
|
1966
|
+
}
|
|
1967
|
+
</div>
|
|
1968
|
+
<div class="property-item">
|
|
1969
|
+
<div class="property-label">Priority</div>
|
|
1970
|
+
@if (EditMode) {
|
|
1971
|
+
<input type="number"
|
|
1972
|
+
class="property-input"
|
|
1973
|
+
[(ngModel)]="selectedPath!.Priority"
|
|
1974
|
+
(blur)="savePathProperties()">
|
|
1975
|
+
} @else {
|
|
1976
|
+
<div class="property-value">{{ selectedPath!.Priority }}</div>
|
|
1977
|
+
}
|
|
1978
|
+
</div>
|
|
1979
|
+
</div>
|
|
1980
|
+
@if (EditMode) {
|
|
1981
|
+
<div class="property-actions">
|
|
1982
|
+
<button (click)="deleteSelectedPath()" class="danger-button">
|
|
1983
|
+
<i class="fa-solid fa-trash"></i>
|
|
1984
|
+
Delete Path
|
|
1985
|
+
</button>
|
|
1986
|
+
</div>
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
</div>
|
|
1990
|
+
</div>
|
|
1991
|
+
</kendo-splitter-pane>
|
|
1992
|
+
}
|
|
1993
|
+
</kendo-splitter>
|
|
1994
|
+
}
|
|
1995
|
+
</div>
|
|
1996
|
+
`, styles: ["\n .flow-diagram-container {\n width: 100%;\n height: 600px;\n min-height: 400px;\n max-height: 1200px;\n position: relative;\n background: #f5f5f5;\n border: 1px solid #ddd;\n border-radius: 4px;\n overflow: auto;\n resize: vertical;\n }\n \n .flow-diagram-container::after {\n content: '';\n position: absolute;\n bottom: 0;\n right: 0;\n width: 20px;\n height: 20px;\n cursor: ns-resize;\n background: linear-gradient(135deg, transparent 50%, #999 50%);\n border-bottom-right-radius: 4px;\n pointer-events: none;\n }\n \n .diagram-toolbar {\n position: absolute;\n top: 10px;\n right: 10px;\n left: 10px;\n display: flex;\n gap: 5px;\n z-index: 10;\n background: white;\n padding: 5px;\n border-radius: 4px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n justify-content: space-between;\n }\n \n .zoom-controls {\n display: flex;\n gap: 4px;\n align-items: center;\n }\n \n .zoom-level {\n font-size: 12px;\n color: #666;\n margin-left: 8px;\n }\n \n .diagram-toolbar button {\n padding: 5px 10px;\n border: 1px solid #ddd;\n background: white;\n border-radius: 3px;\n cursor: pointer;\n font-size: 12px;\n display: flex;\n align-items: center;\n gap: 5px;\n }\n \n .diagram-toolbar button:hover {\n background: #f0f0f0;\n border-color: #4a90e2;\n }\n \n .diagram-toolbar button i {\n font-size: 14px;\n }\n \n .rete-container {\n width: 100%;\n height: 100%;\n position: relative;\n overflow: auto;\n }\n \n .rete-svg {\n min-width: 100%;\n min-height: 100%;\n }\n \n .loading-state, .error-state, .empty-state {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n gap: 0.5rem;\n color: #666;\n }\n \n .error-state {\n color: #c00;\n }\n \n .empty-state {\n flex-direction: column;\n }\n \n .empty-state i {\n font-size: 2rem;\n opacity: 0.5;\n }\n \n :host ::ng-deep .step-node {\n cursor: move;\n }\n \n :host ::ng-deep .step-node.dragging {\n opacity: 0.8;\n }\n \n :host ::ng-deep .step-node-title {\n font-family: Arial, sans-serif;\n }\n \n :host ::ng-deep .connection-path {\n cursor: pointer;\n }\n \n :host ::ng-deep .connection-path:hover {\n stroke-width: 3;\n }\n \n .context-menu {\n position: absolute;\n background: white;\n border: 1px solid #ddd;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.2);\n padding: 5px 0;\n min-width: 150px;\n z-index: 1000;\n display: none;\n }\n \n .context-menu.show {\n display: block;\n }\n \n .context-menu-item {\n padding: 8px 15px;\n cursor: pointer;\n font-size: 13px;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n \n .context-menu-item:hover {\n background: #f0f0f0;\n }\n \n .context-menu-item i {\n width: 16px;\n text-align: center;\n }\n \n .context-menu-divider {\n height: 1px;\n background: #e0e0e0;\n margin: 5px 0;\n }\n \n .properties-pane {\n height: 100%;\n background: white;\n display: flex;\n flex-direction: column;\n }\n \n .connection-mode-active {\n background: #ff4444 !important;\n color: white !important;\n border-color: #ff4444 !important;\n }\n \n .rete-svg.connection-mode {\n cursor: crosshair;\n }\n \n .connection-hint {\n position: absolute;\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n background: rgba(0, 0, 0, 0.8);\n color: white;\n padding: 8px 16px;\n border-radius: 4px;\n font-size: 12px;\n }\n \n .context-menu {\n position: absolute;\n background: white;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.15);\n z-index: 1000;\n padding: 4px 0;\n min-width: 150px;\n }\n \n .context-menu button {\n display: block;\n width: 100%;\n padding: 8px 16px;\n border: none;\n background: none;\n text-align: left;\n cursor: pointer;\n font-size: 13px;\n transition: background-color 0.2s;\n }\n \n .context-menu button:hover {\n background-color: #f0f0f0;\n }\n \n .context-menu button.danger {\n color: #c00;\n }\n \n .context-menu button.danger:hover {\n background-color: #fee;\n }\n \n .context-menu i {\n margin-right: 8px;\n width: 16px;\n text-align: center;\n }\n \n .properties-header {\n padding: 10px 15px;\n border-bottom: 1px solid #e0e0e0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n \n .properties-header h4 {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n }\n \n .properties-header button {\n background: none;\n border: none;\n cursor: pointer;\n padding: 4px;\n color: #666;\n }\n \n .properties-content {\n flex: 1;\n overflow-y: auto;\n padding: 15px;\n }\n \n .property-group {\n margin-bottom: 20px;\n }\n \n .property-group h5 {\n margin: 0 0 10px 0;\n font-size: 12px;\n font-weight: 600;\n color: #666;\n text-transform: uppercase;\n }\n \n .property-item {\n margin-bottom: 10px;\n }\n \n .property-label {\n font-size: 12px;\n color: #666;\n margin-bottom: 3px;\n }\n \n .property-value {\n font-size: 13px;\n color: #333;\n padding: 5px 8px;\n background: #f5f5f5;\n border-radius: 3px;\n word-break: break-word;\n }\n \n .property-actions {\n margin-top: 10px;\n display: flex;\n gap: 5px;\n }\n \n .property-actions button {\n padding: 5px 10px;\n font-size: 12px;\n border: 1px solid #ddd;\n background: white;\n border-radius: 3px;\n cursor: pointer;\n }\n \n .property-actions button:hover {\n background: #f0f0f0;\n border-color: #4a90e2;\n }\n \n .property-input {\n width: 100%;\n padding: 6px 10px;\n border: 1px solid #ddd;\n border-radius: 3px;\n font-size: 13px;\n }\n \n .property-textarea {\n width: 100%;\n padding: 6px 10px;\n border: 1px solid #ddd;\n border-radius: 3px;\n font-size: 13px;\n resize: vertical;\n }\n \n .property-value {\n font-size: 13px;\n color: #333;\n padding: 6px 10px;\n background: #f5f5f5;\n border-radius: 3px;\n min-height: 32px;\n display: flex;\n align-items: center;\n }\n \n .danger-button {\n background: #ff4444 !important;\n color: white !important;\n border-color: #ff4444 !important;\n }\n \n .danger-button:hover {\n background: #cc0000 !important;\n border-color: #cc0000 !important;\n }\n \n :host ::ng-deep .step-node.selected {\n filter: drop-shadow(0 0 8px #4a90e2);\n }\n \n :host ::ng-deep .connection-path.selected {\n stroke: #ff9800;\n stroke-width: 3;\n }\n \n :host ::ng-deep .output-socket:hover {\n r: 7;\n fill: #e3f2fd;\n }\n \n :host ::ng-deep .input-socket:hover {\n r: 7;\n fill: #e3f2fd;\n }\n "] }]
|
|
1997
|
+
}], () => [{ type: i1.DialogService }], { reteContainer: [{
|
|
1998
|
+
type: ViewChild,
|
|
1999
|
+
args: ['reteContainer', { static: false }]
|
|
2000
|
+
}], agentId: [{
|
|
2001
|
+
type: Input
|
|
2002
|
+
}], steps: [{
|
|
2003
|
+
type: Input
|
|
2004
|
+
}], paths: [{
|
|
2005
|
+
type: Input
|
|
2006
|
+
}], EditMode: [{
|
|
2007
|
+
type: Input
|
|
2008
|
+
}], stepsChanged: [{
|
|
2009
|
+
type: Output
|
|
2010
|
+
}], pathsChanged: [{
|
|
2011
|
+
type: Output
|
|
2012
|
+
}], onDocumentClick: [{
|
|
2013
|
+
type: HostListener,
|
|
2014
|
+
args: ['document:click', ['$event']]
|
|
2015
|
+
}], onDocumentMouseMove: [{
|
|
2016
|
+
type: HostListener,
|
|
2017
|
+
args: ['document:mousemove', ['$event']]
|
|
2018
|
+
}] }); })();
|
|
2019
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FlowAgentDiagramComponent, { className: "FlowAgentDiagramComponent", filePath: "src/lib/custom/AIAgents/FlowAgentType/flow-agent-diagram.component.ts", lineNumber: 641 }); })();
|
|
2020
|
+
//# sourceMappingURL=flow-agent-diagram.component.js.map
|