@memberjunction/ng-flow-editor 6.3.0-edge.0 → 6.3.0-edge.2
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/dist/lib/agent-editor/agent-flow-transformer.service.d.ts.map +1 -1
- package/dist/lib/agent-editor/agent-flow-transformer.service.js +38 -0
- package/dist/lib/agent-editor/agent-flow-transformer.service.js.map +1 -1
- package/dist/lib/agent-editor/agent-properties-panel.component.d.ts +49 -0
- package/dist/lib/agent-editor/agent-properties-panel.component.d.ts.map +1 -1
- package/dist/lib/agent-editor/agent-properties-panel.component.js +1065 -347
- package/dist/lib/agent-editor/agent-properties-panel.component.js.map +1 -1
- package/dist/lib/agent-editor/agent-step-list.component.d.ts +10 -2
- package/dist/lib/agent-editor/agent-step-list.component.d.ts.map +1 -1
- package/dist/lib/agent-editor/agent-step-list.component.js +257 -199
- package/dist/lib/agent-editor/agent-step-list.component.js.map +1 -1
- package/dist/lib/agent-editor/flow-agent-editor.component.d.ts +16 -8
- package/dist/lib/agent-editor/flow-agent-editor.component.d.ts.map +1 -1
- package/dist/lib/agent-editor/flow-agent-editor.component.js +209 -117
- package/dist/lib/agent-editor/flow-agent-editor.component.js.map +1 -1
- package/dist/lib/agent-editor/waiting-step-config.d.ts +45 -0
- package/dist/lib/agent-editor/waiting-step-config.d.ts.map +1 -0
- package/dist/lib/agent-editor/waiting-step-config.js +117 -0
- package/dist/lib/agent-editor/waiting-step-config.js.map +1 -0
- package/dist/lib/components/flow-editor.component.d.ts +42 -5
- package/dist/lib/components/flow-editor.component.d.ts.map +1 -1
- package/dist/lib/components/flow-editor.component.js +299 -113
- package/dist/lib/components/flow-editor.component.js.map +1 -1
- package/dist/lib/components/flow-node.component.d.ts +25 -3
- package/dist/lib/components/flow-node.component.d.ts.map +1 -1
- package/dist/lib/components/flow-node.component.js +412 -125
- package/dist/lib/components/flow-node.component.js.map +1 -1
- package/dist/lib/components/flow-status-bar.component.d.ts +2 -1
- package/dist/lib/components/flow-status-bar.component.d.ts.map +1 -1
- package/dist/lib/components/flow-status-bar.component.js +12 -11
- package/dist/lib/components/flow-status-bar.component.js.map +1 -1
- package/dist/lib/components/flow-toolbar.component.d.ts +5 -2
- package/dist/lib/components/flow-toolbar.component.d.ts.map +1 -1
- package/dist/lib/components/flow-toolbar.component.js +42 -23
- package/dist/lib/components/flow-toolbar.component.js.map +1 -1
- package/dist/lib/interfaces/flow-types.d.ts +40 -0
- package/dist/lib/interfaces/flow-types.d.ts.map +1 -1
- package/dist/lib/interfaces/flow-types.js.map +1 -1
- package/dist/lib/services/flow-layout.service.d.ts +0 -1
- package/dist/lib/services/flow-layout.service.d.ts.map +1 -1
- package/dist/lib/services/flow-layout.service.js +5 -23
- package/dist/lib/services/flow-layout.service.js.map +1 -1
- package/dist/lib/services/flow-viewport.util.d.ts +58 -0
- package/dist/lib/services/flow-viewport.util.d.ts.map +1 -0
- package/dist/lib/services/flow-viewport.util.js +134 -0
- package/dist/lib/services/flow-viewport.util.js.map +1 -0
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +10 -10
|
@@ -3,6 +3,7 @@ import { RunView, CompositeKey } from '@memberjunction/core';
|
|
|
3
3
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
4
4
|
import { UserInfoEngine } from '@memberjunction/core-entities';
|
|
5
5
|
import { AgentFlowTransformerService, AGENT_STEP_TYPE_CONFIGS } from './agent-flow-transformer.service';
|
|
6
|
+
import { DefaultWaitingStepConfiguration, IsWaitingStepType } from './waiting-step-config';
|
|
6
7
|
import { UUIDsEqual } from '@memberjunction/global';
|
|
7
8
|
import { ReadDecisionStepKey } from './decision-step-config';
|
|
8
9
|
import { CheckFlowRun } from './flow-run-check';
|
|
@@ -17,9 +18,9 @@ import * as i7 from "./agent-step-list.component";
|
|
|
17
18
|
const _c0 = ["flowEditor"];
|
|
18
19
|
function FlowAgentEditorComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
19
20
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
20
|
-
i0.ɵɵelementStart(0, "button",
|
|
21
|
+
i0.ɵɵelementStart(0, "button", 27);
|
|
21
22
|
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.flowEditor == null ? null : ctx_r1.flowEditor.Undo()); });
|
|
22
|
-
i0.ɵɵelement(1, "i",
|
|
23
|
+
i0.ɵɵelement(1, "i", 28);
|
|
23
24
|
i0.ɵɵelementEnd();
|
|
24
25
|
} if (rf & 2) {
|
|
25
26
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -27,9 +28,9 @@ function FlowAgentEditorComponent_Conditional_3_Template(rf, ctx) { if (rf & 1)
|
|
|
27
28
|
} }
|
|
28
29
|
function FlowAgentEditorComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
29
30
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
30
|
-
i0.ɵɵelementStart(0, "button",
|
|
31
|
+
i0.ɵɵelementStart(0, "button", 29);
|
|
31
32
|
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.flowEditor == null ? null : ctx_r1.flowEditor.Redo()); });
|
|
32
|
-
i0.ɵɵelement(1, "i",
|
|
33
|
+
i0.ɵɵelement(1, "i", 30);
|
|
33
34
|
i0.ɵɵelementEnd();
|
|
34
35
|
} if (rf & 2) {
|
|
35
36
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -45,26 +46,26 @@ function FlowAgentEditorComponent_Conditional_6_Template(rf, ctx) { if (rf & 1)
|
|
|
45
46
|
i0.ɵɵadvance(2);
|
|
46
47
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.CanvasTitle, " ");
|
|
47
48
|
} }
|
|
48
|
-
function
|
|
49
|
-
i0.ɵɵelementStart(0, "span",
|
|
50
|
-
i0.ɵɵelement(1, "i",
|
|
49
|
+
function FlowAgentEditorComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
50
|
+
i0.ɵɵelementStart(0, "span", 13);
|
|
51
|
+
i0.ɵɵelement(1, "i", 31);
|
|
51
52
|
i0.ɵɵtext(2, " Editing ");
|
|
52
53
|
i0.ɵɵelementEnd();
|
|
53
54
|
} }
|
|
54
|
-
function
|
|
55
|
-
i0.ɵɵelementStart(0, "span",
|
|
56
|
-
i0.ɵɵelement(1, "i",
|
|
55
|
+
function FlowAgentEditorComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
56
|
+
i0.ɵɵelementStart(0, "span", 14);
|
|
57
|
+
i0.ɵɵelement(1, "i", 32);
|
|
57
58
|
i0.ɵɵtext(2, " Read Only ");
|
|
58
59
|
i0.ɵɵelementEnd();
|
|
59
60
|
} }
|
|
60
|
-
function
|
|
61
|
-
i0.ɵɵelementStart(0, "span",
|
|
62
|
-
i0.ɵɵelement(1, "i",
|
|
61
|
+
function FlowAgentEditorComponent_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
62
|
+
i0.ɵɵelementStart(0, "span", 16);
|
|
63
|
+
i0.ɵɵelement(1, "i", 33);
|
|
63
64
|
i0.ɵɵtext(2, " Unsaved ");
|
|
64
65
|
i0.ɵɵelementEnd();
|
|
65
66
|
} }
|
|
66
|
-
function
|
|
67
|
-
i0.ɵɵelementStart(0, "span",
|
|
67
|
+
function FlowAgentEditorComponent_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
68
|
+
i0.ɵɵelementStart(0, "span", 17);
|
|
68
69
|
i0.ɵɵtext(1);
|
|
69
70
|
i0.ɵɵpipe(2, "date");
|
|
70
71
|
i0.ɵɵelementEnd();
|
|
@@ -73,11 +74,11 @@ function FlowAgentEditorComponent_Conditional_18_Template(rf, ctx) { if (rf & 1)
|
|
|
73
74
|
i0.ɵɵadvance();
|
|
74
75
|
i0.ɵɵtextInterpolate1(" Saved ", i0.ɵɵpipeBind2(2, 1, ctx_r1.lastSaved, "shortTime"), " ");
|
|
75
76
|
} }
|
|
76
|
-
function
|
|
77
|
+
function FlowAgentEditorComponent_Conditional_22_Template(rf, ctx) { if (rf & 1) {
|
|
77
78
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
78
|
-
i0.ɵɵelementStart(0, "button",
|
|
79
|
-
i0.ɵɵlistener("click", function
|
|
80
|
-
i0.ɵɵelement(1, "i",
|
|
79
|
+
i0.ɵɵelementStart(0, "button", 34);
|
|
80
|
+
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Conditional_22_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Save()); });
|
|
81
|
+
i0.ɵɵelement(1, "i", 35);
|
|
81
82
|
i0.ɵɵtext(2);
|
|
82
83
|
i0.ɵɵelementEnd();
|
|
83
84
|
} if (rf & 2) {
|
|
@@ -88,47 +89,47 @@ function FlowAgentEditorComponent_Conditional_19_Template(rf, ctx) { if (rf & 1)
|
|
|
88
89
|
i0.ɵɵadvance();
|
|
89
90
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.isSaving ? "Saving..." : "Save", " ");
|
|
90
91
|
} }
|
|
91
|
-
function
|
|
92
|
+
function FlowAgentEditorComponent_Conditional_23_Template(rf, ctx) { if (rf & 1) {
|
|
92
93
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
93
|
-
i0.ɵɵelementStart(0, "button",
|
|
94
|
-
i0.ɵɵlistener("click", function
|
|
95
|
-
i0.ɵɵelement(1, "i",
|
|
94
|
+
i0.ɵɵelementStart(0, "button", 36);
|
|
95
|
+
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Conditional_23_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.cancelFullscreenEdit()); });
|
|
96
|
+
i0.ɵɵelement(1, "i", 37);
|
|
96
97
|
i0.ɵɵtext(2, " Cancel ");
|
|
97
98
|
i0.ɵɵelementEnd();
|
|
98
99
|
} }
|
|
99
|
-
function
|
|
100
|
-
i0.ɵɵelement(0, "div",
|
|
100
|
+
function FlowAgentEditorComponent_Conditional_24_Template(rf, ctx) { if (rf & 1) {
|
|
101
|
+
i0.ɵɵelement(0, "div", 20);
|
|
101
102
|
} }
|
|
102
|
-
function
|
|
103
|
+
function FlowAgentEditorComponent_Conditional_25_Template(rf, ctx) { if (rf & 1) {
|
|
103
104
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
104
|
-
i0.ɵɵelementStart(0, "button",
|
|
105
|
-
i0.ɵɵlistener("click", function
|
|
106
|
-
i0.ɵɵelement(1, "i",
|
|
105
|
+
i0.ɵɵelementStart(0, "button", 38);
|
|
106
|
+
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Conditional_25_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleFullscreenEditMode()); });
|
|
107
|
+
i0.ɵɵelement(1, "i", 39);
|
|
107
108
|
i0.ɵɵtext(2, " Edit ");
|
|
108
109
|
i0.ɵɵelementEnd();
|
|
109
110
|
} }
|
|
110
|
-
function
|
|
111
|
+
function FlowAgentEditorComponent_Conditional_26_Template(rf, ctx) { if (rf & 1) {
|
|
111
112
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
112
|
-
i0.ɵɵelementStart(0, "button",
|
|
113
|
-
i0.ɵɵlistener("click", function
|
|
114
|
-
i0.ɵɵelement(1, "i",
|
|
113
|
+
i0.ɵɵelementStart(0, "button", 40);
|
|
114
|
+
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Conditional_26_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleFullScreen()); });
|
|
115
|
+
i0.ɵɵelement(1, "i", 41);
|
|
115
116
|
i0.ɵɵtext(2, " Expand ");
|
|
116
117
|
i0.ɵɵelementEnd();
|
|
117
118
|
} }
|
|
118
|
-
function
|
|
119
|
+
function FlowAgentEditorComponent_Conditional_27_Template(rf, ctx) { if (rf & 1) {
|
|
119
120
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
120
|
-
i0.ɵɵelementStart(0, "button",
|
|
121
|
-
i0.ɵɵlistener("click", function
|
|
122
|
-
i0.ɵɵelement(1, "i",
|
|
121
|
+
i0.ɵɵelementStart(0, "button", 42);
|
|
122
|
+
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Conditional_27_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.toggleFullScreen()); });
|
|
123
|
+
i0.ɵɵelement(1, "i", 37);
|
|
123
124
|
i0.ɵɵtext(2, " Close ");
|
|
124
125
|
i0.ɵɵelementEnd();
|
|
125
126
|
} }
|
|
126
|
-
function
|
|
127
|
-
i0.ɵɵelementStart(0, "div",
|
|
128
|
-
i0.ɵɵelement(1, "mj-loading",
|
|
127
|
+
function FlowAgentEditorComponent_Conditional_28_Template(rf, ctx) { if (rf & 1) {
|
|
128
|
+
i0.ɵɵelementStart(0, "div", 24);
|
|
129
|
+
i0.ɵɵelement(1, "mj-loading", 43);
|
|
129
130
|
i0.ɵɵelementEnd();
|
|
130
131
|
} }
|
|
131
|
-
function
|
|
132
|
+
function FlowAgentEditorComponent_Conditional_29_Conditional_1_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
132
133
|
i0.ɵɵelementStart(0, "li");
|
|
133
134
|
i0.ɵɵtext(1);
|
|
134
135
|
i0.ɵɵelementEnd();
|
|
@@ -137,9 +138,9 @@ function FlowAgentEditorComponent_Conditional_26_Conditional_1_For_3_Template(rf
|
|
|
137
138
|
i0.ɵɵadvance();
|
|
138
139
|
i0.ɵɵtextInterpolate(problem_r9.Message);
|
|
139
140
|
} }
|
|
140
|
-
function
|
|
141
|
-
i0.ɵɵelementStart(0, "mj-alert",
|
|
142
|
-
i0.ɵɵrepeaterCreate(2,
|
|
141
|
+
function FlowAgentEditorComponent_Conditional_29_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
142
|
+
i0.ɵɵelementStart(0, "mj-alert", 44)(1, "ul", 47);
|
|
143
|
+
i0.ɵɵrepeaterCreate(2, FlowAgentEditorComponent_Conditional_29_Conditional_1_For_3_Template, 2, 1, "li", null, i0.ɵɵrepeaterTrackByIndex);
|
|
143
144
|
i0.ɵɵelementEnd()();
|
|
144
145
|
} if (rf & 2) {
|
|
145
146
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -147,30 +148,44 @@ function FlowAgentEditorComponent_Conditional_26_Conditional_1_Template(rf, ctx)
|
|
|
147
148
|
i0.ɵɵadvance(2);
|
|
148
149
|
i0.ɵɵrepeater(ctx_r1.RunProblems);
|
|
149
150
|
} }
|
|
150
|
-
function
|
|
151
|
+
function FlowAgentEditorComponent_Conditional_29_Conditional_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
152
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
153
|
+
i0.ɵɵelementStart(0, "div", 48)(1, "mj-agent-step-list", 52);
|
|
154
|
+
i0.ɵɵlistener("StepClicked", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Conditional_1_Template_mj_agent_step_list_StepClicked_1_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onStepClickedInList($event)); });
|
|
155
|
+
i0.ɵɵelementEnd()();
|
|
156
|
+
} if (rf & 2) {
|
|
157
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
158
|
+
i0.ɵɵadvance();
|
|
159
|
+
i0.ɵɵproperty("Steps", ctx_r1.steps)("Paths", ctx_r1.paths)("SelectedStepID", (ctx_r1.selectedStep == null ? null : ctx_r1.selectedStep.ID) || null);
|
|
160
|
+
} }
|
|
161
|
+
function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
151
162
|
const _r10 = i0.ɵɵgetCurrentView();
|
|
152
|
-
i0.ɵɵelementStart(0, "div",
|
|
153
|
-
i0.ɵɵ
|
|
163
|
+
i0.ɵɵelementStart(0, "div", 45);
|
|
164
|
+
i0.ɵɵconditionalCreate(1, FlowAgentEditorComponent_Conditional_29_Conditional_2_Conditional_1_Template, 2, 3, "div", 48);
|
|
165
|
+
i0.ɵɵelementStart(2, "mj-flow-editor", 49, 0);
|
|
166
|
+
i0.ɵɵlistener("NodeSelected", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_NodeSelected_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onNodeSelected($event)); })("NodeAdded", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_NodeAdded_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onNodeAdded($event)); })("NodeRemoved", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_NodeRemoved_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onNodeRemoved($event)); })("NodeQuickAddClicked", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_NodeQuickAddClicked_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onNodeQuickAddClicked($event)); })("ConnectionCreated", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_ConnectionCreated_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConnectionCreated($event)); })("ConnectionRemoved", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_ConnectionRemoved_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConnectionRemoved($event)); })("ConnectionReassigned", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_ConnectionReassigned_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConnectionReassigned($event)); })("ConnectionSelected", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_ConnectionSelected_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConnectionSelected($event)); })("NodesChanged", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_NodesChanged_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onNodesChanged($event)); })("ConnectionsChanged", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_ConnectionsChanged_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConnectionsChanged($event)); })("GridToggled", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_GridToggled_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onGridPrefChanged($event)); })("MinimapToggled", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_MinimapToggled_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onMinimapPrefChanged($event)); })("LegendToggled", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_LegendToggled_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onLegendPrefChanged($event)); })("LayoutDirectionChanged", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_flow_editor_LayoutDirectionChanged_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onLayoutDirectionPrefChanged($event)); });
|
|
154
167
|
i0.ɵɵelementEnd();
|
|
155
|
-
i0.ɵɵelementStart(
|
|
156
|
-
i0.ɵɵlistener("StepChanged", function
|
|
168
|
+
i0.ɵɵelementStart(4, "div", 50)(5, "mj-agent-properties-panel", 51);
|
|
169
|
+
i0.ɵɵlistener("StepChanged", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_agent_properties_panel_StepChanged_5_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onStepChanged($event)); })("PathChanged", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_agent_properties_panel_PathChanged_5_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onPathChanged($event)); })("DeleteStepRequested", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_agent_properties_panel_DeleteStepRequested_5_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onDeleteStepRequested($event)); })("DeletePathRequested", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_agent_properties_panel_DeletePathRequested_5_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onDeletePathRequested($event)); })("CloseRequested", function FlowAgentEditorComponent_Conditional_29_Conditional_2_Template_mj_agent_properties_panel_CloseRequested_5_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onCloseProperties()); });
|
|
157
170
|
i0.ɵɵelementEnd()()();
|
|
158
171
|
} if (rf & 2) {
|
|
159
172
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
160
173
|
i0.ɵɵadvance();
|
|
161
|
-
i0.ɵɵ
|
|
174
|
+
i0.ɵɵconditional(ctx_r1.viewMode === "split" ? 1 : -1);
|
|
175
|
+
i0.ɵɵadvance();
|
|
176
|
+
i0.ɵɵproperty("Nodes", ctx_r1.nodes)("Connections", ctx_r1.connections)("NodeTypes", ctx_r1.nodeTypes)("ViewportKey", ctx_r1.AgentID ? "agent:" + ctx_r1.AgentID : null)("ReadOnly", !ctx_r1.isEditingActive)("ShowMinimap", ctx_r1.prefShowMinimap)("ShowPalette", ctx_r1.isEditingActive)("ShowGrid", ctx_r1.prefShowGrid)("ShowLegend", ctx_r1.prefShowLegend)("ShowStatusBar", true)("ShowToolbar", true)("AutoLayoutDirection", ctx_r1.prefLayoutDirection);
|
|
162
177
|
i0.ɵɵadvance(2);
|
|
163
178
|
i0.ɵɵclassProp("mj-agent-editor-properties--visible", ctx_r1.showPropertiesPanel);
|
|
164
179
|
i0.ɵɵadvance();
|
|
165
180
|
i0.ɵɵproperty("Step", ctx_r1.selectedStep)("SelectedConnection", ctx_r1.selectedConnection)("PathEntity", ctx_r1.selectedPathEntity)("ReadOnly", !ctx_r1.isEditingActive)("Actions", ctx_r1.availableActions)("Prompts", ctx_r1.availablePrompts)("Agents", ctx_r1.availableAgents)("AllSteps", ctx_r1.steps)("AllPaths", ctx_r1.paths)("DecisionModelTypeID", ctx_r1.decisionModelTypeID)("RunProblems", ctx_r1.RunProblems);
|
|
166
181
|
} }
|
|
167
|
-
function
|
|
168
|
-
const
|
|
169
|
-
i0.ɵɵelementStart(0, "div",
|
|
170
|
-
i0.ɵɵlistener("StepClicked", function
|
|
182
|
+
function FlowAgentEditorComponent_Conditional_29_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
183
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
184
|
+
i0.ɵɵelementStart(0, "div", 46)(1, "mj-agent-step-list", 52);
|
|
185
|
+
i0.ɵɵlistener("StepClicked", function FlowAgentEditorComponent_Conditional_29_Conditional_3_Template_mj_agent_step_list_StepClicked_1_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onStepClickedInList($event)); });
|
|
171
186
|
i0.ɵɵelementEnd();
|
|
172
|
-
i0.ɵɵelementStart(2, "div",
|
|
173
|
-
i0.ɵɵlistener("StepChanged", function
|
|
187
|
+
i0.ɵɵelementStart(2, "div", 50)(3, "mj-agent-properties-panel", 51);
|
|
188
|
+
i0.ɵɵlistener("StepChanged", function FlowAgentEditorComponent_Conditional_29_Conditional_3_Template_mj_agent_properties_panel_StepChanged_3_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onStepChanged($event)); })("PathChanged", function FlowAgentEditorComponent_Conditional_29_Conditional_3_Template_mj_agent_properties_panel_PathChanged_3_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onPathChanged($event)); })("DeleteStepRequested", function FlowAgentEditorComponent_Conditional_29_Conditional_3_Template_mj_agent_properties_panel_DeleteStepRequested_3_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onDeleteStepRequested($event)); })("DeletePathRequested", function FlowAgentEditorComponent_Conditional_29_Conditional_3_Template_mj_agent_properties_panel_DeletePathRequested_3_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onDeletePathRequested($event)); })("CloseRequested", function FlowAgentEditorComponent_Conditional_29_Conditional_3_Template_mj_agent_properties_panel_CloseRequested_3_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onCloseProperties()); });
|
|
174
189
|
i0.ɵɵelementEnd()()();
|
|
175
190
|
} if (rf & 2) {
|
|
176
191
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -181,43 +196,43 @@ function FlowAgentEditorComponent_Conditional_26_Conditional_3_Template(rf, ctx)
|
|
|
181
196
|
i0.ɵɵadvance();
|
|
182
197
|
i0.ɵɵproperty("Step", ctx_r1.selectedStep)("SelectedConnection", ctx_r1.selectedConnection)("PathEntity", ctx_r1.selectedPathEntity)("ReadOnly", !ctx_r1.isEditingActive)("Actions", ctx_r1.availableActions)("Prompts", ctx_r1.availablePrompts)("Agents", ctx_r1.availableAgents)("AllSteps", ctx_r1.steps)("AllPaths", ctx_r1.paths)("DecisionModelTypeID", ctx_r1.decisionModelTypeID)("RunProblems", ctx_r1.RunProblems);
|
|
183
198
|
} }
|
|
184
|
-
function
|
|
185
|
-
i0.ɵɵelementStart(0, "div",
|
|
186
|
-
i0.ɵɵconditionalCreate(1,
|
|
187
|
-
i0.ɵɵconditionalCreate(2,
|
|
188
|
-
i0.ɵɵconditionalCreate(3,
|
|
199
|
+
function FlowAgentEditorComponent_Conditional_29_Template(rf, ctx) { if (rf & 1) {
|
|
200
|
+
i0.ɵɵelementStart(0, "div", 25);
|
|
201
|
+
i0.ɵɵconditionalCreate(1, FlowAgentEditorComponent_Conditional_29_Conditional_1_Template, 4, 1, "mj-alert", 44);
|
|
202
|
+
i0.ɵɵconditionalCreate(2, FlowAgentEditorComponent_Conditional_29_Conditional_2_Template, 6, 26, "div", 45);
|
|
203
|
+
i0.ɵɵconditionalCreate(3, FlowAgentEditorComponent_Conditional_29_Conditional_3_Template, 4, 16, "div", 46);
|
|
189
204
|
i0.ɵɵelementEnd();
|
|
190
205
|
} if (rf & 2) {
|
|
191
206
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
192
207
|
i0.ɵɵadvance();
|
|
193
208
|
i0.ɵɵconditional(ctx_r1.RunProblems.length > 0 ? 1 : -1);
|
|
194
209
|
i0.ɵɵadvance();
|
|
195
|
-
i0.ɵɵconditional(ctx_r1.viewMode === "diagram" ? 2 : -1);
|
|
210
|
+
i0.ɵɵconditional(ctx_r1.viewMode === "diagram" || ctx_r1.viewMode === "split" ? 2 : -1);
|
|
196
211
|
i0.ɵɵadvance();
|
|
197
212
|
i0.ɵɵconditional(ctx_r1.viewMode === "list" ? 3 : -1);
|
|
198
213
|
} }
|
|
199
|
-
function
|
|
200
|
-
const
|
|
201
|
-
i0.ɵɵelementStart(0, "div",
|
|
202
|
-
i0.ɵɵelement(3, "i",
|
|
214
|
+
function FlowAgentEditorComponent_Conditional_30_Template(rf, ctx) { if (rf & 1) {
|
|
215
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
216
|
+
i0.ɵɵelementStart(0, "div", 26)(1, "div", 53)(2, "div", 54);
|
|
217
|
+
i0.ɵɵelement(3, "i", 55);
|
|
203
218
|
i0.ɵɵelementEnd();
|
|
204
|
-
i0.ɵɵelementStart(4, "h3",
|
|
219
|
+
i0.ɵɵelementStart(4, "h3", 56);
|
|
205
220
|
i0.ɵɵtext(5, "Unsaved Changes");
|
|
206
221
|
i0.ɵɵelementEnd();
|
|
207
|
-
i0.ɵɵelementStart(6, "p",
|
|
222
|
+
i0.ɵɵelementStart(6, "p", 57);
|
|
208
223
|
i0.ɵɵtext(7, " You have unsaved changes to this flow. What would you like to do? ");
|
|
209
224
|
i0.ɵɵelementEnd();
|
|
210
|
-
i0.ɵɵelementStart(8, "div",
|
|
211
|
-
i0.ɵɵlistener("click", function
|
|
212
|
-
i0.ɵɵelement(10, "i",
|
|
225
|
+
i0.ɵɵelementStart(8, "div", 58)(9, "button", 59);
|
|
226
|
+
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Conditional_30_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onUnsavedDialogSave()); });
|
|
227
|
+
i0.ɵɵelement(10, "i", 60);
|
|
213
228
|
i0.ɵɵtext(11, " Save & Close ");
|
|
214
229
|
i0.ɵɵelementEnd();
|
|
215
|
-
i0.ɵɵelementStart(12, "button",
|
|
216
|
-
i0.ɵɵlistener("click", function
|
|
230
|
+
i0.ɵɵelementStart(12, "button", 61);
|
|
231
|
+
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Conditional_30_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onUnsavedDialogDiscard()); });
|
|
217
232
|
i0.ɵɵtext(13, " Discard Changes ");
|
|
218
233
|
i0.ɵɵelementEnd();
|
|
219
|
-
i0.ɵɵelementStart(14, "button",
|
|
220
|
-
i0.ɵɵlistener("click", function
|
|
234
|
+
i0.ɵɵelementStart(14, "button", 62);
|
|
235
|
+
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Conditional_30_Template_button_click_14_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onUnsavedDialogCancel()); });
|
|
221
236
|
i0.ɵɵtext(15, " Cancel ");
|
|
222
237
|
i0.ɵɵelementEnd()()()();
|
|
223
238
|
} }
|
|
@@ -254,9 +269,27 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
254
269
|
// ── Host Bindings ─────────────────────────────────────────────
|
|
255
270
|
get HostFullScreen() { return this.FullScreen; }
|
|
256
271
|
// ── Inputs ──────────────────────────────────────────────────
|
|
257
|
-
|
|
272
|
+
_agentID = null;
|
|
273
|
+
isInitialized = false;
|
|
274
|
+
set AgentID(value) {
|
|
275
|
+
if (value !== this._agentID) {
|
|
276
|
+
this._agentID = value;
|
|
277
|
+
if (this.isInitialized && value) {
|
|
278
|
+
void this.loadAll();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
get AgentID() {
|
|
283
|
+
return this._agentID;
|
|
284
|
+
}
|
|
258
285
|
EditMode = true;
|
|
259
286
|
FullScreen = false;
|
|
287
|
+
/** Optional initial view lens ('diagram' | 'split' | 'list'). */
|
|
288
|
+
set DefaultViewMode(value) {
|
|
289
|
+
if (!this.isInitialized) {
|
|
290
|
+
this.viewMode = value;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
260
293
|
/**
|
|
261
294
|
* Whether this editor shows its own Save / Edit / Cancel controls.
|
|
262
295
|
*
|
|
@@ -318,6 +351,7 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
318
351
|
prefShowGrid = true;
|
|
319
352
|
prefShowMinimap = true;
|
|
320
353
|
prefShowLegend = true;
|
|
354
|
+
prefLayoutDirection = 'horizontal';
|
|
321
355
|
static PREF_KEY = 'flow-editor/view-prefs';
|
|
322
356
|
// Initial zoom state
|
|
323
357
|
needsInitialZoom = false;
|
|
@@ -335,17 +369,13 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
335
369
|
}
|
|
336
370
|
// ── Lifecycle ───────────────────────────────────────────────
|
|
337
371
|
ngOnInit() {
|
|
372
|
+
this.isInitialized = true;
|
|
338
373
|
this.loadViewPreferences();
|
|
339
374
|
this.checkUpdatePermission();
|
|
340
375
|
if (this.AgentID) {
|
|
341
376
|
this.loadAll();
|
|
342
377
|
}
|
|
343
378
|
}
|
|
344
|
-
ngOnChanges(changes) {
|
|
345
|
-
if (changes['AgentID'] && !changes['AgentID'].firstChange && this.AgentID) {
|
|
346
|
-
this.loadAll();
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
379
|
ngOnDestroy() {
|
|
350
380
|
this.teardownResizeObserver();
|
|
351
381
|
// Restore element to original parent if still in fullscreen
|
|
@@ -670,6 +700,10 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
670
700
|
const key = GenerateUniqueDecisionKey(this.steps);
|
|
671
701
|
step.Configuration = JSON.stringify({ key, state: 'payload', questions: {} }, null, 2);
|
|
672
702
|
}
|
|
703
|
+
if (IsWaitingStepType(step.StepType)) {
|
|
704
|
+
// Each starts with a shape the runtime accepts, so a just-dropped step is not already red.
|
|
705
|
+
step.Configuration = DefaultWaitingStepConfiguration(step.StepType);
|
|
706
|
+
}
|
|
673
707
|
// Add the unsaved step to the array - it already has a UUID from NewRecord()
|
|
674
708
|
// This allows connections to be drawn immediately without waiting for a database save
|
|
675
709
|
this.steps.push(step);
|
|
@@ -1013,12 +1047,53 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
1013
1047
|
this.originalNextSibling = null;
|
|
1014
1048
|
}
|
|
1015
1049
|
onStepClickedInList(step) {
|
|
1050
|
+
this.selectedStep = step;
|
|
1051
|
+
this.selectedConnection = null;
|
|
1052
|
+
this.selectedPathEntity = null;
|
|
1053
|
+
this.showPropertiesPanel = true;
|
|
1054
|
+
if (this.viewMode === 'split') {
|
|
1055
|
+
this.flowEditor?.SelectNode(step.ID);
|
|
1056
|
+
this.flowEditor?.CenterOnNode(step.ID);
|
|
1057
|
+
}
|
|
1058
|
+
this.StepSelected.emit(step);
|
|
1059
|
+
this.cdr.detectChanges();
|
|
1060
|
+
}
|
|
1061
|
+
/** Clicking `+` on a node's output port adds a connected Action step immediately downstream. */
|
|
1062
|
+
async onNodeQuickAddClicked(sourceNode) {
|
|
1063
|
+
if (!this.AgentID || !this.IsEditingActive)
|
|
1064
|
+
return;
|
|
1065
|
+
const offsetX = this.prefLayoutDirection === 'horizontal' ? 280 : 0;
|
|
1066
|
+
const offsetY = this.prefLayoutDirection === 'horizontal' ? 0 : 160;
|
|
1067
|
+
const pos = { X: Math.round(sourceNode.Position.X + offsetX), Y: Math.round(sourceNode.Position.Y + offsetY) };
|
|
1068
|
+
const step = await this.CreateStepEntity();
|
|
1069
|
+
step.NewRecord();
|
|
1070
|
+
step.AgentID = this.AgentID;
|
|
1071
|
+
step.Name = `Step ${this.steps.length + 1}`;
|
|
1072
|
+
step.StepType = 'Action';
|
|
1073
|
+
step.Status = 'Active';
|
|
1074
|
+
step.StartingStep = this.steps.length === 0;
|
|
1075
|
+
step.PositionX = pos.X;
|
|
1076
|
+
step.PositionY = pos.Y;
|
|
1077
|
+
step.OnErrorBehavior = 'fail';
|
|
1078
|
+
step.RetryCount = 0;
|
|
1079
|
+
step.TimeoutSeconds = 600;
|
|
1080
|
+
this.steps.push(step);
|
|
1081
|
+
const p = this.ProviderToUse;
|
|
1082
|
+
const path = await p.GetEntityObject('MJ: AI Agent Step Paths', p.CurrentUser);
|
|
1083
|
+
path.NewRecord();
|
|
1084
|
+
path.OriginStepID = sourceNode.ID;
|
|
1085
|
+
path.DestinationStepID = step.ID;
|
|
1086
|
+
path.Priority = 0;
|
|
1087
|
+
this.paths.push(path);
|
|
1088
|
+
this.rebuildFlowModel();
|
|
1089
|
+
this.markDirty();
|
|
1016
1090
|
this.selectedStep = step;
|
|
1017
1091
|
this.selectedConnection = null;
|
|
1018
1092
|
this.selectedPathEntity = null;
|
|
1019
1093
|
this.showPropertiesPanel = true;
|
|
1020
1094
|
this.StepSelected.emit(step);
|
|
1021
1095
|
this.cdr.detectChanges();
|
|
1096
|
+
setTimeout(() => this.flowEditor?.SelectNode(step.ID), 80);
|
|
1022
1097
|
}
|
|
1023
1098
|
// ── Keyboard Shortcuts ─────────────────────────────────────
|
|
1024
1099
|
onEscapeKey() {
|
|
@@ -1050,6 +1125,9 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
1050
1125
|
this.prefShowMinimap = prefs.minimap;
|
|
1051
1126
|
if (prefs.legend != null)
|
|
1052
1127
|
this.prefShowLegend = prefs.legend;
|
|
1128
|
+
if (prefs.layoutDirection === 'horizontal' || prefs.layoutDirection === 'vertical') {
|
|
1129
|
+
this.prefLayoutDirection = prefs.layoutDirection;
|
|
1130
|
+
}
|
|
1053
1131
|
}
|
|
1054
1132
|
catch {
|
|
1055
1133
|
// Ignore malformed preference data
|
|
@@ -1060,10 +1138,15 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
1060
1138
|
const prefs = JSON.stringify({
|
|
1061
1139
|
grid: this.prefShowGrid,
|
|
1062
1140
|
minimap: this.prefShowMinimap,
|
|
1063
|
-
legend: this.prefShowLegend
|
|
1141
|
+
legend: this.prefShowLegend,
|
|
1142
|
+
layoutDirection: this.prefLayoutDirection
|
|
1064
1143
|
});
|
|
1065
1144
|
// Fire-and-forget — preference save errors are non-critical
|
|
1066
|
-
UserInfoEngine.Instance.
|
|
1145
|
+
UserInfoEngine.Instance.SetSettingDebounced(FlowAgentEditorComponent.PREF_KEY, prefs);
|
|
1146
|
+
}
|
|
1147
|
+
onLayoutDirectionPrefChanged(direction) {
|
|
1148
|
+
this.prefLayoutDirection = direction;
|
|
1149
|
+
this.saveViewPreferences();
|
|
1067
1150
|
}
|
|
1068
1151
|
onGridPrefChanged(show) {
|
|
1069
1152
|
this.prefShowGrid = show;
|
|
@@ -1094,7 +1177,7 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
1094
1177
|
i0.ɵɵlistener("keydown.escape", function FlowAgentEditorComponent_keydown_escape_HostBindingHandler() { return ctx.onEscapeKey(); }, i0.ɵɵresolveDocument);
|
|
1095
1178
|
} if (rf & 2) {
|
|
1096
1179
|
i0.ɵɵclassProp("mj-flow-agent-editor--fullscreen", ctx.HostFullScreen);
|
|
1097
|
-
} }, inputs: { AgentID: "AgentID", EditMode: "EditMode", FullScreen: "FullScreen", ShowSaveControls: "ShowSaveControls", CanvasTitle: "CanvasTitle" }, outputs: { FlowSaved: "FlowSaved", FlowChanged: "FlowChanged", FullScreenToggled: "FullScreenToggled", StepSelected: "StepSelected" }, standalone: false, features: [i0.ɵɵProvidersFeature([AgentFlowTransformerService]), i0.ɵɵInheritDefinitionFeature
|
|
1180
|
+
} }, inputs: { AgentID: "AgentID", EditMode: "EditMode", FullScreen: "FullScreen", DefaultViewMode: "DefaultViewMode", ShowSaveControls: "ShowSaveControls", CanvasTitle: "CanvasTitle" }, outputs: { FlowSaved: "FlowSaved", FlowChanged: "FlowChanged", FullScreenToggled: "FullScreenToggled", StepSelected: "StepSelected" }, standalone: false, features: [i0.ɵɵProvidersFeature([AgentFlowTransformerService]), i0.ɵɵInheritDefinitionFeature], decls: 31, vars: 24, consts: [["flowEditor", ""], [1, "mj-agent-editor"], [1, "mj-agent-editor-toolbar"], [1, "mj-agent-editor-toolbar-left"], ["title", "Undo (Ctrl+Z)", 1, "mj-agent-editor-btn", 3, "disabled"], ["title", "Redo (Ctrl+Y)", 1, "mj-agent-editor-btn", 3, "disabled"], [1, "mj-agent-editor-toolbar-center"], [1, "mj-agent-editor-title"], [1, "mj-agent-editor-view-toggle"], [1, "mj-agent-editor-view-btn", 3, "click"], [1, "fa-solid", "fa-diagram-project"], [1, "fa-solid", "fa-table-columns"], [1, "fa-solid", "fa-list-ol"], [1, "mj-agent-editor-mode-badge", "mj-agent-editor-mode-badge--editing"], [1, "mj-agent-editor-mode-badge", "mj-agent-editor-mode-badge--readonly"], [1, "mj-agent-editor-toolbar-right"], [1, "mj-agent-editor-status", "mj-agent-editor-status--unsaved"], [1, "mj-agent-editor-status"], [1, "mj-agent-editor-btn", "mj-agent-editor-btn--primary", 3, "disabled"], ["title", "Cancel editing", 1, "mj-agent-editor-btn"], [1, "mj-agent-editor-btn-divider"], ["title", "Edit flow", 1, "mj-agent-editor-btn", "mj-agent-editor-btn--edit"], ["title", "Expand to full screen", 1, "mj-agent-editor-btn", "mj-agent-editor-btn--expand"], ["title", "Close full screen (Esc)", 1, "mj-agent-editor-btn", "mj-agent-editor-btn--close"], [1, "mj-agent-editor-loading"], [1, "mj-agent-editor-body"], [1, "mj-agent-editor-dialog-overlay"], ["title", "Undo (Ctrl+Z)", 1, "mj-agent-editor-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-rotate-left"], ["title", "Redo (Ctrl+Y)", 1, "mj-agent-editor-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-rotate-right"], [1, "fa-solid", "fa-pen"], [1, "fa-solid", "fa-lock"], [1, "fa-solid", "fa-circle"], [1, "mj-agent-editor-btn", "mj-agent-editor-btn--primary", 3, "click", "disabled"], [1, "fa-solid", 3, "ngClass"], ["title", "Cancel editing", 1, "mj-agent-editor-btn", 3, "click"], [1, "fa-solid", "fa-xmark"], ["title", "Edit flow", 1, "mj-agent-editor-btn", "mj-agent-editor-btn--edit", 3, "click"], [1, "fa-solid", "fa-pen-to-square"], ["title", "Expand to full screen", 1, "mj-agent-editor-btn", "mj-agent-editor-btn--expand", 3, "click"], [1, "fa-solid", "fa-up-right-and-down-left-from-center"], ["title", "Close full screen (Esc)", 1, "mj-agent-editor-btn", "mj-agent-editor-btn--close", 3, "click"], ["text", "Loading flow...", "size", "medium"], ["Variant", "warning", "Size", "sm", 1, "mj-agent-editor-run-problems", 3, "Title"], [1, "mj-agent-editor-diagram"], [1, "mj-agent-editor-list"], [1, "mj-agent-editor-run-problems-list"], [1, "mj-agent-editor-split-playbook"], [3, "NodeSelected", "NodeAdded", "NodeRemoved", "NodeQuickAddClicked", "ConnectionCreated", "ConnectionRemoved", "ConnectionReassigned", "ConnectionSelected", "NodesChanged", "ConnectionsChanged", "GridToggled", "MinimapToggled", "LegendToggled", "LayoutDirectionChanged", "Nodes", "Connections", "NodeTypes", "ViewportKey", "ReadOnly", "ShowMinimap", "ShowPalette", "ShowGrid", "ShowLegend", "ShowStatusBar", "ShowToolbar", "AutoLayoutDirection"], [1, "mj-agent-editor-properties"], [3, "StepChanged", "PathChanged", "DeleteStepRequested", "DeletePathRequested", "CloseRequested", "Step", "SelectedConnection", "PathEntity", "ReadOnly", "Actions", "Prompts", "Agents", "AllSteps", "AllPaths", "DecisionModelTypeID", "RunProblems"], [3, "StepClicked", "Steps", "Paths", "SelectedStepID"], [1, "mj-agent-editor-dialog"], [1, "mj-agent-editor-dialog-icon"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "mj-agent-editor-dialog-title"], [1, "mj-agent-editor-dialog-message"], [1, "mj-agent-editor-dialog-actions"], [1, "mj-agent-editor-btn", "mj-agent-editor-btn--primary", 3, "click"], [1, "fa-solid", "fa-floppy-disk"], [1, "mj-agent-editor-btn", "mj-agent-editor-btn--danger-outline", 3, "click"], [1, "mj-agent-editor-btn", 3, "click"]], template: function FlowAgentEditorComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1098
1181
|
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "div", 3);
|
|
1099
1182
|
i0.ɵɵconditionalCreate(3, FlowAgentEditorComponent_Conditional_3_Template, 2, 1, "button", 4);
|
|
1100
1183
|
i0.ɵɵconditionalCreate(4, FlowAgentEditorComponent_Conditional_4_Template, 2, 1, "button", 5);
|
|
@@ -1104,29 +1187,34 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
1104
1187
|
i0.ɵɵelementStart(7, "div", 8)(8, "button", 9);
|
|
1105
1188
|
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Template_button_click_8_listener() { return ctx.viewMode = "diagram"; });
|
|
1106
1189
|
i0.ɵɵelement(9, "i", 10);
|
|
1107
|
-
i0.ɵɵtext(10, "
|
|
1190
|
+
i0.ɵɵtext(10, " Canvas ");
|
|
1108
1191
|
i0.ɵɵelementEnd();
|
|
1109
1192
|
i0.ɵɵelementStart(11, "button", 9);
|
|
1110
|
-
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Template_button_click_11_listener() { return ctx.viewMode = "
|
|
1193
|
+
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Template_button_click_11_listener() { return ctx.viewMode = "split"; });
|
|
1111
1194
|
i0.ɵɵelement(12, "i", 11);
|
|
1112
|
-
i0.ɵɵtext(13, "
|
|
1195
|
+
i0.ɵɵtext(13, " Split Playbook ");
|
|
1196
|
+
i0.ɵɵelementEnd();
|
|
1197
|
+
i0.ɵɵelementStart(14, "button", 9);
|
|
1198
|
+
i0.ɵɵlistener("click", function FlowAgentEditorComponent_Template_button_click_14_listener() { return ctx.viewMode = "list"; });
|
|
1199
|
+
i0.ɵɵelement(15, "i", 12);
|
|
1200
|
+
i0.ɵɵtext(16, " Playbook ");
|
|
1113
1201
|
i0.ɵɵelementEnd()();
|
|
1114
|
-
i0.ɵɵconditionalCreate(
|
|
1115
|
-
i0.ɵɵconditionalCreate(
|
|
1202
|
+
i0.ɵɵconditionalCreate(17, FlowAgentEditorComponent_Conditional_17_Template, 3, 0, "span", 13);
|
|
1203
|
+
i0.ɵɵconditionalCreate(18, FlowAgentEditorComponent_Conditional_18_Template, 3, 0, "span", 14);
|
|
1116
1204
|
i0.ɵɵelementEnd();
|
|
1117
|
-
i0.ɵɵelementStart(
|
|
1118
|
-
i0.ɵɵconditionalCreate(
|
|
1119
|
-
i0.ɵɵconditionalCreate(
|
|
1120
|
-
i0.ɵɵconditionalCreate(
|
|
1121
|
-
i0.ɵɵconditionalCreate(
|
|
1122
|
-
i0.ɵɵconditionalCreate(
|
|
1123
|
-
i0.ɵɵconditionalCreate(
|
|
1124
|
-
i0.ɵɵconditionalCreate(
|
|
1125
|
-
i0.ɵɵconditionalCreate(
|
|
1205
|
+
i0.ɵɵelementStart(19, "div", 15);
|
|
1206
|
+
i0.ɵɵconditionalCreate(20, FlowAgentEditorComponent_Conditional_20_Template, 3, 0, "span", 16);
|
|
1207
|
+
i0.ɵɵconditionalCreate(21, FlowAgentEditorComponent_Conditional_21_Template, 3, 4, "span", 17);
|
|
1208
|
+
i0.ɵɵconditionalCreate(22, FlowAgentEditorComponent_Conditional_22_Template, 3, 3, "button", 18);
|
|
1209
|
+
i0.ɵɵconditionalCreate(23, FlowAgentEditorComponent_Conditional_23_Template, 3, 0, "button", 19);
|
|
1210
|
+
i0.ɵɵconditionalCreate(24, FlowAgentEditorComponent_Conditional_24_Template, 1, 0, "div", 20);
|
|
1211
|
+
i0.ɵɵconditionalCreate(25, FlowAgentEditorComponent_Conditional_25_Template, 3, 0, "button", 21);
|
|
1212
|
+
i0.ɵɵconditionalCreate(26, FlowAgentEditorComponent_Conditional_26_Template, 3, 0, "button", 22);
|
|
1213
|
+
i0.ɵɵconditionalCreate(27, FlowAgentEditorComponent_Conditional_27_Template, 3, 0, "button", 23);
|
|
1126
1214
|
i0.ɵɵelementEnd()();
|
|
1127
|
-
i0.ɵɵconditionalCreate(
|
|
1128
|
-
i0.ɵɵconditionalCreate(
|
|
1129
|
-
i0.ɵɵconditionalCreate(
|
|
1215
|
+
i0.ɵɵconditionalCreate(28, FlowAgentEditorComponent_Conditional_28_Template, 2, 0, "div", 24);
|
|
1216
|
+
i0.ɵɵconditionalCreate(29, FlowAgentEditorComponent_Conditional_29_Template, 4, 3, "div", 25);
|
|
1217
|
+
i0.ɵɵconditionalCreate(30, FlowAgentEditorComponent_Conditional_30_Template, 16, 0, "div", 26);
|
|
1130
1218
|
i0.ɵɵelementEnd();
|
|
1131
1219
|
} if (rf & 2) {
|
|
1132
1220
|
i0.ɵɵadvance();
|
|
@@ -1140,38 +1228,40 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
1140
1228
|
i0.ɵɵadvance(2);
|
|
1141
1229
|
i0.ɵɵclassProp("mj-agent-editor-view-btn--active", ctx.viewMode === "diagram");
|
|
1142
1230
|
i0.ɵɵadvance(3);
|
|
1231
|
+
i0.ɵɵclassProp("mj-agent-editor-view-btn--active", ctx.viewMode === "split");
|
|
1232
|
+
i0.ɵɵadvance(3);
|
|
1143
1233
|
i0.ɵɵclassProp("mj-agent-editor-view-btn--active", ctx.viewMode === "list");
|
|
1144
1234
|
i0.ɵɵadvance(3);
|
|
1145
|
-
i0.ɵɵconditional(ctx.isEditingActive ?
|
|
1235
|
+
i0.ɵɵconditional(ctx.isEditingActive ? 17 : -1);
|
|
1146
1236
|
i0.ɵɵadvance();
|
|
1147
|
-
i0.ɵɵconditional(!ctx.isEditingActive ?
|
|
1237
|
+
i0.ɵɵconditional(!ctx.isEditingActive ? 18 : -1);
|
|
1148
1238
|
i0.ɵɵadvance(2);
|
|
1149
|
-
i0.ɵɵconditional(ctx.ShowSaveControls && ctx.hasUnsavedChanges ?
|
|
1239
|
+
i0.ɵɵconditional(ctx.ShowSaveControls && ctx.hasUnsavedChanges ? 20 : -1);
|
|
1150
1240
|
i0.ɵɵadvance();
|
|
1151
|
-
i0.ɵɵconditional(ctx.ShowSaveControls && ctx.lastSaved ?
|
|
1241
|
+
i0.ɵɵconditional(ctx.ShowSaveControls && ctx.lastSaved ? 21 : -1);
|
|
1152
1242
|
i0.ɵɵadvance();
|
|
1153
|
-
i0.ɵɵconditional(ctx.ShowSaveControls && ctx.isEditingActive ?
|
|
1243
|
+
i0.ɵɵconditional(ctx.ShowSaveControls && ctx.isEditingActive ? 22 : -1);
|
|
1154
1244
|
i0.ɵɵadvance();
|
|
1155
|
-
i0.ɵɵconditional(ctx.ShowSaveControls && ctx.fullscreenEditMode && !ctx.EditMode ?
|
|
1245
|
+
i0.ɵɵconditional(ctx.ShowSaveControls && ctx.fullscreenEditMode && !ctx.EditMode ? 23 : -1);
|
|
1156
1246
|
i0.ɵɵadvance();
|
|
1157
|
-
i0.ɵɵconditional(ctx.ShowSaveControls && ctx.isEditingActive ?
|
|
1247
|
+
i0.ɵɵconditional(ctx.ShowSaveControls && ctx.isEditingActive ? 24 : -1);
|
|
1158
1248
|
i0.ɵɵadvance();
|
|
1159
|
-
i0.ɵɵconditional(ctx.ShowSaveControls && !ctx.EditMode && !ctx.fullscreenEditMode && ctx.userCanUpdate ?
|
|
1249
|
+
i0.ɵɵconditional(ctx.ShowSaveControls && !ctx.EditMode && !ctx.fullscreenEditMode && ctx.userCanUpdate ? 25 : -1);
|
|
1160
1250
|
i0.ɵɵadvance();
|
|
1161
|
-
i0.ɵɵconditional(!ctx.FullScreen ?
|
|
1251
|
+
i0.ɵɵconditional(!ctx.FullScreen ? 26 : -1);
|
|
1162
1252
|
i0.ɵɵadvance();
|
|
1163
|
-
i0.ɵɵconditional(ctx.FullScreen ?
|
|
1253
|
+
i0.ɵɵconditional(ctx.FullScreen ? 27 : -1);
|
|
1164
1254
|
i0.ɵɵadvance();
|
|
1165
|
-
i0.ɵɵconditional(ctx.isLoading ?
|
|
1255
|
+
i0.ɵɵconditional(ctx.isLoading ? 28 : -1);
|
|
1166
1256
|
i0.ɵɵadvance();
|
|
1167
|
-
i0.ɵɵconditional(!ctx.isLoading ?
|
|
1257
|
+
i0.ɵɵconditional(!ctx.isLoading ? 29 : -1);
|
|
1168
1258
|
i0.ɵɵadvance();
|
|
1169
|
-
i0.ɵɵconditional(ctx.showUnsavedDialog ?
|
|
1170
|
-
} }, dependencies: [i2.LoadingComponent, i3.NgClass, i4.MJAlertComponent, i5.FlowEditorComponent, i6.AgentPropertiesPanelComponent, i7.AgentStepListComponent, i3.DatePipe], styles: ["/* ============================================================\n Flow Agent Editor \u2014 MJ-specific flow editor wrapper\n ============================================================ */\n\n/* \u2500\u2500 Host element fullscreen positioning \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nmj-flow-agent-editor.mj-flow-agent-editor--fullscreen {\n position: fixed;\n top: 12px;\n left: 12px;\n right: 12px;\n padding-right: 25px;\n bottom: 12px;\n z-index: 10000;\n border-radius: var(--mj-radius-lg);\n height: auto !important;\n min-height: unset !important;\n box-shadow: var(--mj-shadow-2xl);\n}\n\nmj-flow-agent-editor.mj-flow-agent-editor--fullscreen .mj-agent-editor {\n height: 100%;\n min-height: unset;\n border-radius: var(--mj-radius-lg);\n}\n\n.mj-agent-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 500px;\n background: var(--mj-bg-page);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n position: relative;\n}\n\n/* \u2500\u2500 Backdrop overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n z-index: 9999;\n}\n\n/* \u2500\u2500 Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 12px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n gap: 12px;\n flex-shrink: 0;\n transition: background 0.2s ease, border-color 0.2s ease;\n}\n\n.mj-agent-editor-toolbar--editing {\n background: var(--mj-status-success-bg);\n border-bottom-color: var(--mj-status-success-border);\n}\n\n.mj-flow-agent-editor--fullscreen .mj-agent-editor-toolbar {\n padding: 10px 16px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n border-radius: var(--mj-radius-lg) var(--mj-radius-lg) 0 0;\n}\n\n.mj-flow-agent-editor--fullscreen .mj-agent-editor-toolbar--editing {\n background: var(--mj-status-success-bg);\n border-bottom-color: var(--mj-status-success-border);\n}\n\n.mj-agent-editor-toolbar-left,\n.mj-agent-editor-toolbar-center,\n.mj-agent-editor-toolbar-right {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mj-agent-editor-toolbar-right {\n gap: 10px;\n}\n\n.mj-agent-editor-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 10px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n\n.mj-agent-editor-btn i { font-size: var(--mj-text-xs); }\n\n.mj-agent-editor-btn:hover:not(:disabled) { background: var(--mj-bg-surface-sunken); border-color: var(--mj-border-strong); }\n.mj-agent-editor-btn:disabled { opacity: 0.4; cursor: not-allowed; }\n\n.mj-agent-editor-btn--primary {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.mj-agent-editor-btn--primary:hover:not(:disabled) { background: var(--mj-brand-primary-hover); border-color: var(--mj-brand-primary-hover); }\n\n.mj-agent-editor-btn--expand {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n border-color: color-mix(in srgb, var(--mj-brand-primary) 30%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.mj-agent-editor-btn--expand:hover:not(:disabled) { background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface)); border-color: color-mix(in srgb, var(--mj-brand-primary) 40%, var(--mj-bg-surface)); color: var(--mj-brand-primary-hover); }\n\n.mj-agent-editor-btn--close {\n background: var(--mj-status-error-bg);\n border-color: var(--mj-status-error-border);\n color: var(--mj-status-error);\n}\n\n.mj-agent-editor-btn--close:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border-color: var(--mj-status-error);\n color: var(--mj-status-error-text);\n}\n\n.mj-agent-editor-btn-divider {\n width: 1px;\n height: 22px;\n background: var(--mj-border-default);\n margin: 0 2px;\n}\n\n/* \u2500\u2500 View Toggle \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-view-toggle {\n display: flex;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n}\n\n.mj-agent-editor-view-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 12px;\n border: none;\n background: var(--mj-bg-surface);\n color: var(--mj-text-muted);\n font-size: var(--mj-text-xs);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mj-agent-editor-view-btn i { font-size: 11px; }\n\n.mj-agent-editor-view-btn:not(:last-child) { border-right: 1px solid var(--mj-border-default); }\n\n.mj-agent-editor-view-btn--active {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.mj-agent-editor-view-btn:hover:not(.mj-agent-editor-view-btn--active) { background: var(--mj-bg-page); }\n\n/* \u2500\u2500 Fullscreen Title \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-title {\n font-size: var(--mj-text-sm);\n font-weight: 600;\n color: var(--mj-text-primary);\n display: inline-flex;\n align-items: center;\n gap: 8px;\n margin-right: 12px;\n}\n\n.mj-agent-editor-title i {\n color: var(--mj-brand-primary);\n font-size: var(--mj-text-sm);\n}\n\n/* \u2500\u2500 Status Indicators \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-status {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-agent-editor-status--unsaved {\n color: var(--mj-status-warning);\n}\n\n.mj-agent-editor-status--unsaved i { font-size: 6px; }\n\n/* \u2500\u2500 Inline Floating Controls (non-fullscreen) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-inline-controls {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 100;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mj-agent-editor-inline-expand {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: 1px solid color-mix(in srgb, var(--mj-text-primary) 12%, transparent);\n border-radius: var(--mj-radius-md);\n background: color-mix(in srgb, var(--mj-bg-surface) 85%, transparent);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-xs);\n cursor: pointer;\n transition: all 0.15s ease;\n box-shadow: var(--mj-shadow-sm);\n backdrop-filter: blur(4px);\n}\n\n.mj-agent-editor-inline-expand:hover {\n background: var(--mj-bg-surface);\n border-color: var(--mj-text-disabled);\n color: var(--mj-text-primary);\n box-shadow: var(--mj-shadow-md);\n transform: scale(1.05);\n}\n\n.mj-agent-editor-inline-dot {\n width: 8px;\n height: 8px;\n border-radius: var(--mj-radius-full);\n background: var(--mj-status-warning);\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--mj-bg-surface) 90%, transparent),\n 0 0 6px color-mix(in srgb, var(--mj-status-warning) 40%, transparent);\n animation: mj-inline-dot-pulse 2s ease-in-out infinite;\n}\n\n@keyframes mj-inline-dot-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n}\n\n/* \u2500\u2500 Loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n flex: 1;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n}\n\n.mj-agent-editor-loading i { font-size: var(--mj-text-base); }\n\n/* \u2500\u2500 Body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-body {\n flex: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n/* Run-check banner: a bounded strip above the canvas, so a long list scrolls instead of pushing the flow away. */\n.mj-agent-editor-run-problems {\n flex: 0 0 auto;\n margin: 8px 8px 0;\n max-height: 140px;\n overflow-y: auto;\n}\n\n.mj-agent-editor-run-problems-list {\n margin: 4px 0 0;\n padding-inline-start: 1.25rem;\n}\n\n.mj-agent-editor-diagram {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n.mj-agent-editor-diagram mj-flow-editor {\n flex: 1;\n display: flex;\n}\n\n.mj-agent-editor-list {\n display: flex;\n flex: 1;\n overflow: hidden;\n}\n\n.mj-agent-editor-list mj-agent-step-list {\n flex: 1;\n overflow-y: auto;\n}\n\n/* \u2500\u2500 Properties Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-properties {\n width: 320px;\n flex-shrink: 0;\n overflow: hidden;\n transform: translateX(320px);\n margin-right: -320px;\n transition: transform 0.2s ease, margin-right 0.2s ease;\n border-left: 1px solid var(--mj-border-default);\n}\n\n.mj-agent-editor-properties--visible {\n transform: translateX(0);\n margin-right: 0;\n}\n\n.mj-agent-editor-properties mj-agent-properties-panel {\n display: block;\n width: 320px;\n height: 100%;\n}\n\n/* \u2500\u2500 Mode Indicator Badge \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-mode-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 11px;\n font-weight: 600;\n padding: 3px 10px;\n border-radius: var(--mj-radius-lg);\n letter-spacing: 0.2px;\n}\n\n.mj-agent-editor-mode-badge i { font-size: 10px; }\n\n.mj-agent-editor-mode-badge--editing {\n background: var(--mj-status-success-bg);\n color: var(--mj-status-success-text);\n}\n\n.mj-agent-editor-mode-badge--readonly {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n}\n\n/* \u2500\u2500 Edit Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-btn--edit {\n background: var(--mj-status-success-bg);\n border-color: var(--mj-status-success-border);\n color: var(--mj-status-success-text);\n}\n\n.mj-agent-editor-btn--edit:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-success) 18%, var(--mj-bg-surface));\n border-color: var(--mj-status-success);\n color: var(--mj-status-success-text);\n}\n\n/* \u2500\u2500 Danger Outline Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-btn--danger-outline {\n border-color: var(--mj-status-error-border);\n color: var(--mj-status-error);\n background: var(--mj-bg-surface);\n}\n\n.mj-agent-editor-btn--danger-outline:hover:not(:disabled) {\n background: var(--mj-status-error-bg);\n border-color: var(--mj-status-error);\n}\n\n/* \u2500\u2500 Unsaved Changes Dialog \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-dialog-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10001;\n animation: mj-dialog-fade-in 0.15s ease-out;\n}\n\n@keyframes mj-dialog-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.mj-agent-editor-dialog {\n background: var(--mj-bg-surface);\n border-radius: var(--mj-radius-lg);\n padding: 28px 32px;\n max-width: 400px;\n width: 90%;\n box-shadow: var(--mj-shadow-xl);\n text-align: center;\n animation: mj-dialog-scale-in 0.15s ease-out;\n}\n\n@keyframes mj-dialog-scale-in {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n.mj-agent-editor-dialog-icon {\n font-size: 28px;\n color: var(--mj-status-warning);\n margin-bottom: 12px;\n}\n\n.mj-agent-editor-dialog-title {\n font-size: var(--mj-text-base);\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 8px;\n}\n\n.mj-agent-editor-dialog-message {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n margin: 0 0 20px;\n line-height: 1.5;\n}\n\n.mj-agent-editor-dialog-actions {\n display: flex;\n gap: 8px;\n justify-content: center;\n flex-wrap: wrap;\n}\n"], encapsulation: 2 });
|
|
1259
|
+
i0.ɵɵconditional(ctx.showUnsavedDialog ? 30 : -1);
|
|
1260
|
+
} }, dependencies: [i2.LoadingComponent, i3.NgClass, i4.MJAlertComponent, i5.FlowEditorComponent, i6.AgentPropertiesPanelComponent, i7.AgentStepListComponent, i3.DatePipe], styles: ["/* ============================================================\n Flow Agent Editor \u2014 MJ-specific flow editor wrapper\n ============================================================ */\n\n/* \u2500\u2500 Host element fullscreen positioning \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nmj-flow-agent-editor.mj-flow-agent-editor--fullscreen {\n position: fixed;\n top: 12px;\n left: 12px;\n right: 12px;\n padding-right: 25px;\n bottom: 12px;\n z-index: 10000;\n border-radius: var(--mj-radius-lg);\n height: auto !important;\n min-height: unset !important;\n box-shadow: var(--mj-shadow-2xl);\n}\n\nmj-flow-agent-editor.mj-flow-agent-editor--fullscreen .mj-agent-editor {\n height: 100%;\n min-height: unset;\n border-radius: var(--mj-radius-lg);\n}\n\n.mj-agent-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 500px;\n background: var(--mj-bg-page);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n position: relative;\n}\n\n/* \u2500\u2500 Backdrop overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n z-index: 9999;\n}\n\n/* \u2500\u2500 Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 12px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n gap: 12px;\n flex-shrink: 0;\n transition: background 0.2s ease, border-color 0.2s ease;\n}\n\n.mj-agent-editor-toolbar--editing {\n background: var(--mj-status-success-bg);\n border-bottom-color: var(--mj-status-success-border);\n}\n\n.mj-flow-agent-editor--fullscreen .mj-agent-editor-toolbar {\n padding: 10px 16px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n border-radius: var(--mj-radius-lg) var(--mj-radius-lg) 0 0;\n}\n\n.mj-flow-agent-editor--fullscreen .mj-agent-editor-toolbar--editing {\n background: var(--mj-status-success-bg);\n border-bottom-color: var(--mj-status-success-border);\n}\n\n.mj-agent-editor-toolbar-left,\n.mj-agent-editor-toolbar-center,\n.mj-agent-editor-toolbar-right {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mj-agent-editor-toolbar-right {\n gap: 10px;\n}\n\n.mj-agent-editor-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 10px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n\n.mj-agent-editor-btn i { font-size: var(--mj-text-xs); }\n\n.mj-agent-editor-btn:hover:not(:disabled) { background: var(--mj-bg-surface-sunken); border-color: var(--mj-border-strong); }\n.mj-agent-editor-btn:disabled { opacity: 0.4; cursor: not-allowed; }\n\n.mj-agent-editor-btn--primary {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.mj-agent-editor-btn--primary:hover:not(:disabled) { background: var(--mj-brand-primary-hover); border-color: var(--mj-brand-primary-hover); }\n\n.mj-agent-editor-btn--expand {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n border-color: color-mix(in srgb, var(--mj-brand-primary) 30%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.mj-agent-editor-btn--expand:hover:not(:disabled) { background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface)); border-color: color-mix(in srgb, var(--mj-brand-primary) 40%, var(--mj-bg-surface)); color: var(--mj-brand-primary-hover); }\n\n.mj-agent-editor-btn--close {\n background: var(--mj-status-error-bg);\n border-color: var(--mj-status-error-border);\n color: var(--mj-status-error);\n}\n\n.mj-agent-editor-btn--close:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border-color: var(--mj-status-error);\n color: var(--mj-status-error-text);\n}\n\n.mj-agent-editor-btn-divider {\n width: 1px;\n height: 22px;\n background: var(--mj-border-default);\n margin: 0 2px;\n}\n\n/* \u2500\u2500 View Toggle \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-view-toggle {\n display: flex;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n}\n\n.mj-agent-editor-view-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 12px;\n border: none;\n background: var(--mj-bg-surface);\n color: var(--mj-text-muted);\n font-size: var(--mj-text-xs);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mj-agent-editor-view-btn i { font-size: 11px; }\n\n.mj-agent-editor-view-btn:not(:last-child) { border-right: 1px solid var(--mj-border-default); }\n\n.mj-agent-editor-view-btn--active {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.mj-agent-editor-view-btn:hover:not(.mj-agent-editor-view-btn--active) { background: var(--mj-bg-page); }\n\n/* \u2500\u2500 Fullscreen Title \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-title {\n font-size: var(--mj-text-sm);\n font-weight: 600;\n color: var(--mj-text-primary);\n display: inline-flex;\n align-items: center;\n gap: 8px;\n margin-right: 12px;\n}\n\n.mj-agent-editor-title i {\n color: var(--mj-brand-primary);\n font-size: var(--mj-text-sm);\n}\n\n/* \u2500\u2500 Status Indicators \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-status {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-agent-editor-status--unsaved {\n color: var(--mj-status-warning);\n}\n\n.mj-agent-editor-status--unsaved i { font-size: 6px; }\n\n/* \u2500\u2500 Inline Floating Controls (non-fullscreen) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-inline-controls {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 100;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mj-agent-editor-inline-expand {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: 1px solid color-mix(in srgb, var(--mj-text-primary) 12%, transparent);\n border-radius: var(--mj-radius-md);\n background: color-mix(in srgb, var(--mj-bg-surface) 85%, transparent);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-xs);\n cursor: pointer;\n transition: all 0.15s ease;\n box-shadow: var(--mj-shadow-sm);\n backdrop-filter: blur(4px);\n}\n\n.mj-agent-editor-inline-expand:hover {\n background: var(--mj-bg-surface);\n border-color: var(--mj-text-disabled);\n color: var(--mj-text-primary);\n box-shadow: var(--mj-shadow-md);\n transform: scale(1.05);\n}\n\n.mj-agent-editor-inline-dot {\n width: 8px;\n height: 8px;\n border-radius: var(--mj-radius-full);\n background: var(--mj-status-warning);\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--mj-bg-surface) 90%, transparent),\n 0 0 6px color-mix(in srgb, var(--mj-status-warning) 40%, transparent);\n animation: mj-inline-dot-pulse 2s ease-in-out infinite;\n}\n\n@keyframes mj-inline-dot-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n}\n\n/* \u2500\u2500 Loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n flex: 1;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n}\n\n.mj-agent-editor-loading i { font-size: var(--mj-text-base); }\n\n/* \u2500\u2500 Body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-body {\n flex: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n/* Run-check banner: a bounded strip above the canvas, so a long list scrolls instead of pushing the flow away. */\n.mj-agent-editor-run-problems {\n flex: 0 0 auto;\n margin: 8px 8px 0;\n max-height: 140px;\n overflow-y: auto;\n}\n\n.mj-agent-editor-run-problems-list {\n margin: 4px 0 0;\n padding-inline-start: 1.25rem;\n}\n\n.mj-agent-editor-diagram {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n.mj-agent-editor-diagram mj-flow-editor {\n flex: 1;\n min-width: 0;\n display: flex;\n}\n\n.mj-agent-editor-split-playbook {\n width: 340px;\n flex-shrink: 0;\n border-right: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n.mj-agent-editor-split-playbook mj-agent-step-list {\n flex: 1;\n min-height: 0;\n}\n\n.mj-agent-editor-list {\n display: flex;\n flex: 1;\n overflow: hidden;\n}\n\n.mj-agent-editor-list mj-agent-step-list {\n flex: 1;\n overflow-y: auto;\n}\n\n/* \u2500\u2500 Properties Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-properties {\n width: 320px;\n flex-shrink: 0;\n overflow: hidden;\n transform: translateX(320px);\n margin-right: -320px;\n transition: transform 0.2s ease, margin-right 0.2s ease;\n border-left: 1px solid var(--mj-border-default);\n}\n\n.mj-agent-editor-properties--visible {\n transform: translateX(0);\n margin-right: 0;\n}\n\n.mj-agent-editor-properties mj-agent-properties-panel {\n display: block;\n width: 320px;\n height: 100%;\n}\n\n/* \u2500\u2500 Mode Indicator Badge \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-mode-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 11px;\n font-weight: 600;\n padding: 3px 10px;\n border-radius: var(--mj-radius-lg);\n letter-spacing: 0.2px;\n}\n\n.mj-agent-editor-mode-badge i { font-size: 10px; }\n\n.mj-agent-editor-mode-badge--editing {\n background: var(--mj-status-success-bg);\n color: var(--mj-status-success-text);\n}\n\n.mj-agent-editor-mode-badge--readonly {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n}\n\n/* \u2500\u2500 Edit Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-btn--edit {\n background: var(--mj-status-success-bg);\n border-color: var(--mj-status-success-border);\n color: var(--mj-status-success-text);\n}\n\n.mj-agent-editor-btn--edit:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-success) 18%, var(--mj-bg-surface));\n border-color: var(--mj-status-success);\n color: var(--mj-status-success-text);\n}\n\n/* \u2500\u2500 Danger Outline Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-btn--danger-outline {\n border-color: var(--mj-status-error-border);\n color: var(--mj-status-error);\n background: var(--mj-bg-surface);\n}\n\n.mj-agent-editor-btn--danger-outline:hover:not(:disabled) {\n background: var(--mj-status-error-bg);\n border-color: var(--mj-status-error);\n}\n\n/* \u2500\u2500 Unsaved Changes Dialog \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-dialog-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10001;\n animation: mj-dialog-fade-in 0.15s ease-out;\n}\n\n@keyframes mj-dialog-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.mj-agent-editor-dialog {\n background: var(--mj-bg-surface);\n border-radius: var(--mj-radius-lg);\n padding: 28px 32px;\n max-width: 400px;\n width: 90%;\n box-shadow: var(--mj-shadow-xl);\n text-align: center;\n animation: mj-dialog-scale-in 0.15s ease-out;\n}\n\n@keyframes mj-dialog-scale-in {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n.mj-agent-editor-dialog-icon {\n font-size: 28px;\n color: var(--mj-status-warning);\n margin-bottom: 12px;\n}\n\n.mj-agent-editor-dialog-title {\n font-size: var(--mj-text-base);\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 8px;\n}\n\n.mj-agent-editor-dialog-message {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n margin: 0 0 20px;\n line-height: 1.5;\n}\n\n.mj-agent-editor-dialog-actions {\n display: flex;\n gap: 8px;\n justify-content: center;\n flex-wrap: wrap;\n}\n"], encapsulation: 2 });
|
|
1171
1261
|
}
|
|
1172
1262
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlowAgentEditorComponent, [{
|
|
1173
1263
|
type: Component,
|
|
1174
|
-
args: [{ standalone: false, selector: 'mj-flow-agent-editor', encapsulation: ViewEncapsulation.None, providers: [AgentFlowTransformerService], template: "<div class=\"mj-agent-editor\">\n\n <!-- \u2500\u2500 Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <div class=\"mj-agent-editor-toolbar\" [class.mj-agent-editor-toolbar--editing]=\"isEditingActive\">\n <div class=\"mj-agent-editor-toolbar-left\">\n <!-- Undo / Redo (edit mode only) -->\n @if (isEditingActive) {\n <button class=\"mj-agent-editor-btn\"\n [disabled]=\"!flowEditor?.CanUndo\" (click)=\"flowEditor?.Undo()\" title=\"Undo (Ctrl+Z)\">\n <i class=\"fa-solid fa-rotate-left\"></i>\n </button>\n }\n @if (isEditingActive) {\n <button class=\"mj-agent-editor-btn\"\n [disabled]=\"!flowEditor?.CanRedo\" (click)=\"flowEditor?.Redo()\" title=\"Redo (Ctrl+Y)\">\n <i class=\"fa-solid fa-rotate-right\"></i>\n </button>\n }\n </div>\n\n <div class=\"mj-agent-editor-toolbar-center\">\n <!-- Fullscreen title -->\n @if (CanvasTitle) {\n <span class=\"mj-agent-editor-title\">\n <i class=\"fa-solid fa-diagram-project\"></i> {{ CanvasTitle }}\n </span>\n }\n\n <!-- View Mode Toggle -->\n <div class=\"mj-agent-editor-view-toggle\">\n <button class=\"mj-agent-editor-view-btn\"\n [class.mj-agent-editor-view-btn--active]=\"viewMode === 'diagram'\"\n (click)=\"viewMode = 'diagram'\">\n <i class=\"fa-solid fa-diagram-project\"></i> Diagram\n </button>\n <button class=\"mj-agent-editor-view-btn\"\n [class.mj-agent-editor-view-btn--active]=\"viewMode === 'list'\"\n (click)=\"viewMode = 'list'\">\n <i class=\"fa-solid fa-list\"></i> List\n </button>\n </div>\n\n <!-- Mode indicator badge -->\n @if (isEditingActive) {\n <span class=\"mj-agent-editor-mode-badge mj-agent-editor-mode-badge--editing\">\n <i class=\"fa-solid fa-pen\"></i> Editing\n </span>\n }\n @if (!isEditingActive) {\n <span class=\"mj-agent-editor-mode-badge mj-agent-editor-mode-badge--readonly\">\n <i class=\"fa-solid fa-lock\"></i> Read Only\n </span>\n }\n </div>\n\n <div class=\"mj-agent-editor-toolbar-right\">\n <!-- Status indicators -->\n @if (ShowSaveControls && hasUnsavedChanges) {\n <span class=\"mj-agent-editor-status mj-agent-editor-status--unsaved\">\n <i class=\"fa-solid fa-circle\"></i> Unsaved\n </span>\n }\n @if (ShowSaveControls && lastSaved) {\n <span class=\"mj-agent-editor-status\">\n Saved {{ lastSaved | date:'shortTime' }}\n </span>\n }\n\n <!-- Save + Cancel \u2014 only when this editor owns persistence. When a host form owns the\n record's save, a Save button here is a SECOND save button for the same record. -->\n @if (ShowSaveControls && isEditingActive) {\n <button class=\"mj-agent-editor-btn mj-agent-editor-btn--primary\"\n [disabled]=\"isSaving || !hasUnsavedChanges\" (click)=\"Save()\">\n <i class=\"fa-solid\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-floppy-disk'\"></i>\n {{ isSaving ? 'Saving...' : 'Save' }}\n </button>\n }\n @if (ShowSaveControls && fullscreenEditMode && !EditMode) {\n <button\n class=\"mj-agent-editor-btn\"\n (click)=\"cancelFullscreenEdit()\" title=\"Cancel editing\">\n <i class=\"fa-solid fa-xmark\"></i> Cancel\n </button>\n }\n\n @if (ShowSaveControls && isEditingActive) {\n <div class=\"mj-agent-editor-btn-divider\"></div>\n }\n\n <!-- Fullscreen edit toggle (only when parent is NOT in edit mode) -->\n @if (ShowSaveControls && !EditMode && !fullscreenEditMode && userCanUpdate) {\n <button\n class=\"mj-agent-editor-btn mj-agent-editor-btn--edit\"\n (click)=\"toggleFullscreenEditMode()\" title=\"Edit flow\">\n <i class=\"fa-solid fa-pen-to-square\"></i> Edit\n </button>\n }\n\n <!-- Expand / Close fullscreen -->\n @if (!FullScreen) {\n <button class=\"mj-agent-editor-btn mj-agent-editor-btn--expand\"\n (click)=\"toggleFullScreen()\" title=\"Expand to full screen\">\n <i class=\"fa-solid fa-up-right-and-down-left-from-center\"></i> Expand\n </button>\n }\n @if (FullScreen) {\n <button class=\"mj-agent-editor-btn mj-agent-editor-btn--close\"\n (click)=\"toggleFullScreen()\" title=\"Close full screen (Esc)\">\n <i class=\"fa-solid fa-xmark\"></i> Close\n </button>\n }\n </div>\n </div>\n\n <!-- \u2500\u2500 Loading State \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (isLoading) {\n <div class=\"mj-agent-editor-loading\">\n <!-- MJ's shared indicator, not a hand-rolled fa-spinner: one loading affordance across the\n product means a slow canvas looks like every other slow thing, not like a different bug. -->\n <mj-loading text=\"Loading flow...\" size=\"medium\"></mj-loading>\n </div>\n }\n\n <!-- \u2500\u2500 Main Content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (!isLoading) {\n <div class=\"mj-agent-editor-body\">\n <!-- What the runtime's own compiler and validator would refuse, rechecked on every change. The\n same problems are flagged on the steps and paths they are about. -->\n @if (RunProblems.length > 0) {\n <mj-alert class=\"mj-agent-editor-run-problems\" Variant=\"warning\" Size=\"sm\" [Title]=\"RunProblemsTitle\">\n <ul class=\"mj-agent-editor-run-problems-list\">\n @for (problem of RunProblems; track $index) {\n <li>{{ problem.Message }}</li>\n }\n </ul>\n </mj-alert>\n }\n <!-- Diagram View -->\n @if (viewMode === 'diagram') {\n <div class=\"mj-agent-editor-diagram\">\n <mj-flow-editor #flowEditor\n [Nodes]=\"nodes\"\n [Connections]=\"connections\"\n [NodeTypes]=\"nodeTypes\"\n [ReadOnly]=\"!isEditingActive\"\n [ShowMinimap]=\"prefShowMinimap\"\n [ShowPalette]=\"isEditingActive\"\n [ShowGrid]=\"prefShowGrid\"\n [ShowLegend]=\"prefShowLegend\"\n [ShowStatusBar]=\"true\"\n [ShowToolbar]=\"true\"\n [AutoLayoutDirection]=\"'vertical'\"\n (NodeSelected)=\"onNodeSelected($event)\"\n (NodeAdded)=\"onNodeAdded($event)\"\n (NodeRemoved)=\"onNodeRemoved($event)\"\n (ConnectionCreated)=\"onConnectionCreated($event)\"\n (ConnectionRemoved)=\"onConnectionRemoved($event)\"\n (ConnectionReassigned)=\"onConnectionReassigned($event)\"\n (ConnectionSelected)=\"onConnectionSelected($event)\"\n (NodesChanged)=\"onNodesChanged($event)\"\n (ConnectionsChanged)=\"onConnectionsChanged($event)\"\n (GridToggled)=\"onGridPrefChanged($event)\"\n (MinimapToggled)=\"onMinimapPrefChanged($event)\"\n (LegendToggled)=\"onLegendPrefChanged($event)\">\n </mj-flow-editor>\n <!-- Properties Panel -->\n <div class=\"mj-agent-editor-properties\"\n [class.mj-agent-editor-properties--visible]=\"showPropertiesPanel\">\n <mj-agent-properties-panel\n [Step]=\"selectedStep\"\n [SelectedConnection]=\"selectedConnection\"\n [PathEntity]=\"selectedPathEntity\"\n [ReadOnly]=\"!isEditingActive\"\n [Actions]=\"availableActions\"\n [Prompts]=\"availablePrompts\"\n [Agents]=\"availableAgents\"\n [AllSteps]=\"steps\"\n [AllPaths]=\"paths\"\n [DecisionModelTypeID]=\"decisionModelTypeID\"\n [RunProblems]=\"RunProblems\"\n (StepChanged)=\"onStepChanged($event)\"\n (PathChanged)=\"onPathChanged($event)\"\n (DeleteStepRequested)=\"onDeleteStepRequested($event)\"\n (DeletePathRequested)=\"onDeletePathRequested($event)\"\n (CloseRequested)=\"onCloseProperties()\">\n </mj-agent-properties-panel>\n </div>\n </div>\n }\n <!-- List View -->\n @if (viewMode === 'list') {\n <div class=\"mj-agent-editor-list\">\n <mj-agent-step-list\n [Steps]=\"steps\"\n [Paths]=\"paths\"\n [SelectedStepID]=\"selectedStep?.ID || null\"\n (StepClicked)=\"onStepClickedInList($event)\">\n </mj-agent-step-list>\n <!-- Properties Panel in list mode too -->\n <div class=\"mj-agent-editor-properties\"\n [class.mj-agent-editor-properties--visible]=\"showPropertiesPanel\">\n <mj-agent-properties-panel\n [Step]=\"selectedStep\"\n [SelectedConnection]=\"selectedConnection\"\n [PathEntity]=\"selectedPathEntity\"\n [ReadOnly]=\"!isEditingActive\"\n [Actions]=\"availableActions\"\n [Prompts]=\"availablePrompts\"\n [Agents]=\"availableAgents\"\n [AllSteps]=\"steps\"\n [AllPaths]=\"paths\"\n [DecisionModelTypeID]=\"decisionModelTypeID\"\n [RunProblems]=\"RunProblems\"\n (StepChanged)=\"onStepChanged($event)\"\n (PathChanged)=\"onPathChanged($event)\"\n (DeleteStepRequested)=\"onDeleteStepRequested($event)\"\n (DeletePathRequested)=\"onDeletePathRequested($event)\"\n (CloseRequested)=\"onCloseProperties()\">\n </mj-agent-properties-panel>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- \u2500\u2500 Unsaved Changes Dialog \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (showUnsavedDialog) {\n <div class=\"mj-agent-editor-dialog-overlay\">\n <div class=\"mj-agent-editor-dialog\">\n <div class=\"mj-agent-editor-dialog-icon\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n </div>\n <h3 class=\"mj-agent-editor-dialog-title\">Unsaved Changes</h3>\n <p class=\"mj-agent-editor-dialog-message\">\n You have unsaved changes to this flow. What would you like to do?\n </p>\n <div class=\"mj-agent-editor-dialog-actions\">\n <button class=\"mj-agent-editor-btn mj-agent-editor-btn--primary\" (click)=\"onUnsavedDialogSave()\">\n <i class=\"fa-solid fa-floppy-disk\"></i> Save & Close\n </button>\n <button class=\"mj-agent-editor-btn mj-agent-editor-btn--danger-outline\" (click)=\"onUnsavedDialogDiscard()\">\n Discard Changes\n </button>\n <button class=\"mj-agent-editor-btn\" (click)=\"onUnsavedDialogCancel()\">\n Cancel\n </button>\n </div>\n </div>\n </div>\n }\n</div>\n", styles: ["/* ============================================================\n Flow Agent Editor \u2014 MJ-specific flow editor wrapper\n ============================================================ */\n\n/* \u2500\u2500 Host element fullscreen positioning \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nmj-flow-agent-editor.mj-flow-agent-editor--fullscreen {\n position: fixed;\n top: 12px;\n left: 12px;\n right: 12px;\n padding-right: 25px;\n bottom: 12px;\n z-index: 10000;\n border-radius: var(--mj-radius-lg);\n height: auto !important;\n min-height: unset !important;\n box-shadow: var(--mj-shadow-2xl);\n}\n\nmj-flow-agent-editor.mj-flow-agent-editor--fullscreen .mj-agent-editor {\n height: 100%;\n min-height: unset;\n border-radius: var(--mj-radius-lg);\n}\n\n.mj-agent-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 500px;\n background: var(--mj-bg-page);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n position: relative;\n}\n\n/* \u2500\u2500 Backdrop overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n z-index: 9999;\n}\n\n/* \u2500\u2500 Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 12px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n gap: 12px;\n flex-shrink: 0;\n transition: background 0.2s ease, border-color 0.2s ease;\n}\n\n.mj-agent-editor-toolbar--editing {\n background: var(--mj-status-success-bg);\n border-bottom-color: var(--mj-status-success-border);\n}\n\n.mj-flow-agent-editor--fullscreen .mj-agent-editor-toolbar {\n padding: 10px 16px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n border-radius: var(--mj-radius-lg) var(--mj-radius-lg) 0 0;\n}\n\n.mj-flow-agent-editor--fullscreen .mj-agent-editor-toolbar--editing {\n background: var(--mj-status-success-bg);\n border-bottom-color: var(--mj-status-success-border);\n}\n\n.mj-agent-editor-toolbar-left,\n.mj-agent-editor-toolbar-center,\n.mj-agent-editor-toolbar-right {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mj-agent-editor-toolbar-right {\n gap: 10px;\n}\n\n.mj-agent-editor-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 10px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n\n.mj-agent-editor-btn i { font-size: var(--mj-text-xs); }\n\n.mj-agent-editor-btn:hover:not(:disabled) { background: var(--mj-bg-surface-sunken); border-color: var(--mj-border-strong); }\n.mj-agent-editor-btn:disabled { opacity: 0.4; cursor: not-allowed; }\n\n.mj-agent-editor-btn--primary {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.mj-agent-editor-btn--primary:hover:not(:disabled) { background: var(--mj-brand-primary-hover); border-color: var(--mj-brand-primary-hover); }\n\n.mj-agent-editor-btn--expand {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n border-color: color-mix(in srgb, var(--mj-brand-primary) 30%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.mj-agent-editor-btn--expand:hover:not(:disabled) { background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface)); border-color: color-mix(in srgb, var(--mj-brand-primary) 40%, var(--mj-bg-surface)); color: var(--mj-brand-primary-hover); }\n\n.mj-agent-editor-btn--close {\n background: var(--mj-status-error-bg);\n border-color: var(--mj-status-error-border);\n color: var(--mj-status-error);\n}\n\n.mj-agent-editor-btn--close:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border-color: var(--mj-status-error);\n color: var(--mj-status-error-text);\n}\n\n.mj-agent-editor-btn-divider {\n width: 1px;\n height: 22px;\n background: var(--mj-border-default);\n margin: 0 2px;\n}\n\n/* \u2500\u2500 View Toggle \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-view-toggle {\n display: flex;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n}\n\n.mj-agent-editor-view-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 12px;\n border: none;\n background: var(--mj-bg-surface);\n color: var(--mj-text-muted);\n font-size: var(--mj-text-xs);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mj-agent-editor-view-btn i { font-size: 11px; }\n\n.mj-agent-editor-view-btn:not(:last-child) { border-right: 1px solid var(--mj-border-default); }\n\n.mj-agent-editor-view-btn--active {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.mj-agent-editor-view-btn:hover:not(.mj-agent-editor-view-btn--active) { background: var(--mj-bg-page); }\n\n/* \u2500\u2500 Fullscreen Title \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-title {\n font-size: var(--mj-text-sm);\n font-weight: 600;\n color: var(--mj-text-primary);\n display: inline-flex;\n align-items: center;\n gap: 8px;\n margin-right: 12px;\n}\n\n.mj-agent-editor-title i {\n color: var(--mj-brand-primary);\n font-size: var(--mj-text-sm);\n}\n\n/* \u2500\u2500 Status Indicators \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-status {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-agent-editor-status--unsaved {\n color: var(--mj-status-warning);\n}\n\n.mj-agent-editor-status--unsaved i { font-size: 6px; }\n\n/* \u2500\u2500 Inline Floating Controls (non-fullscreen) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-inline-controls {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 100;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mj-agent-editor-inline-expand {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: 1px solid color-mix(in srgb, var(--mj-text-primary) 12%, transparent);\n border-radius: var(--mj-radius-md);\n background: color-mix(in srgb, var(--mj-bg-surface) 85%, transparent);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-xs);\n cursor: pointer;\n transition: all 0.15s ease;\n box-shadow: var(--mj-shadow-sm);\n backdrop-filter: blur(4px);\n}\n\n.mj-agent-editor-inline-expand:hover {\n background: var(--mj-bg-surface);\n border-color: var(--mj-text-disabled);\n color: var(--mj-text-primary);\n box-shadow: var(--mj-shadow-md);\n transform: scale(1.05);\n}\n\n.mj-agent-editor-inline-dot {\n width: 8px;\n height: 8px;\n border-radius: var(--mj-radius-full);\n background: var(--mj-status-warning);\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--mj-bg-surface) 90%, transparent),\n 0 0 6px color-mix(in srgb, var(--mj-status-warning) 40%, transparent);\n animation: mj-inline-dot-pulse 2s ease-in-out infinite;\n}\n\n@keyframes mj-inline-dot-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n}\n\n/* \u2500\u2500 Loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n flex: 1;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n}\n\n.mj-agent-editor-loading i { font-size: var(--mj-text-base); }\n\n/* \u2500\u2500 Body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-body {\n flex: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n/* Run-check banner: a bounded strip above the canvas, so a long list scrolls instead of pushing the flow away. */\n.mj-agent-editor-run-problems {\n flex: 0 0 auto;\n margin: 8px 8px 0;\n max-height: 140px;\n overflow-y: auto;\n}\n\n.mj-agent-editor-run-problems-list {\n margin: 4px 0 0;\n padding-inline-start: 1.25rem;\n}\n\n.mj-agent-editor-diagram {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n.mj-agent-editor-diagram mj-flow-editor {\n flex: 1;\n display: flex;\n}\n\n.mj-agent-editor-list {\n display: flex;\n flex: 1;\n overflow: hidden;\n}\n\n.mj-agent-editor-list mj-agent-step-list {\n flex: 1;\n overflow-y: auto;\n}\n\n/* \u2500\u2500 Properties Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-properties {\n width: 320px;\n flex-shrink: 0;\n overflow: hidden;\n transform: translateX(320px);\n margin-right: -320px;\n transition: transform 0.2s ease, margin-right 0.2s ease;\n border-left: 1px solid var(--mj-border-default);\n}\n\n.mj-agent-editor-properties--visible {\n transform: translateX(0);\n margin-right: 0;\n}\n\n.mj-agent-editor-properties mj-agent-properties-panel {\n display: block;\n width: 320px;\n height: 100%;\n}\n\n/* \u2500\u2500 Mode Indicator Badge \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-mode-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 11px;\n font-weight: 600;\n padding: 3px 10px;\n border-radius: var(--mj-radius-lg);\n letter-spacing: 0.2px;\n}\n\n.mj-agent-editor-mode-badge i { font-size: 10px; }\n\n.mj-agent-editor-mode-badge--editing {\n background: var(--mj-status-success-bg);\n color: var(--mj-status-success-text);\n}\n\n.mj-agent-editor-mode-badge--readonly {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n}\n\n/* \u2500\u2500 Edit Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-btn--edit {\n background: var(--mj-status-success-bg);\n border-color: var(--mj-status-success-border);\n color: var(--mj-status-success-text);\n}\n\n.mj-agent-editor-btn--edit:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-success) 18%, var(--mj-bg-surface));\n border-color: var(--mj-status-success);\n color: var(--mj-status-success-text);\n}\n\n/* \u2500\u2500 Danger Outline Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-btn--danger-outline {\n border-color: var(--mj-status-error-border);\n color: var(--mj-status-error);\n background: var(--mj-bg-surface);\n}\n\n.mj-agent-editor-btn--danger-outline:hover:not(:disabled) {\n background: var(--mj-status-error-bg);\n border-color: var(--mj-status-error);\n}\n\n/* \u2500\u2500 Unsaved Changes Dialog \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-dialog-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10001;\n animation: mj-dialog-fade-in 0.15s ease-out;\n}\n\n@keyframes mj-dialog-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.mj-agent-editor-dialog {\n background: var(--mj-bg-surface);\n border-radius: var(--mj-radius-lg);\n padding: 28px 32px;\n max-width: 400px;\n width: 90%;\n box-shadow: var(--mj-shadow-xl);\n text-align: center;\n animation: mj-dialog-scale-in 0.15s ease-out;\n}\n\n@keyframes mj-dialog-scale-in {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n.mj-agent-editor-dialog-icon {\n font-size: 28px;\n color: var(--mj-status-warning);\n margin-bottom: 12px;\n}\n\n.mj-agent-editor-dialog-title {\n font-size: var(--mj-text-base);\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 8px;\n}\n\n.mj-agent-editor-dialog-message {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n margin: 0 0 20px;\n line-height: 1.5;\n}\n\n.mj-agent-editor-dialog-actions {\n display: flex;\n gap: 8px;\n justify-content: center;\n flex-wrap: wrap;\n}\n"] }]
|
|
1264
|
+
args: [{ standalone: false, selector: 'mj-flow-agent-editor', encapsulation: ViewEncapsulation.None, providers: [AgentFlowTransformerService], template: "<div class=\"mj-agent-editor\">\n\n <!-- \u2500\u2500 Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n <div class=\"mj-agent-editor-toolbar\" [class.mj-agent-editor-toolbar--editing]=\"isEditingActive\">\n <div class=\"mj-agent-editor-toolbar-left\">\n <!-- Undo / Redo (edit mode only) -->\n @if (isEditingActive) {\n <button class=\"mj-agent-editor-btn\"\n [disabled]=\"!flowEditor?.CanUndo\" (click)=\"flowEditor?.Undo()\" title=\"Undo (Ctrl+Z)\">\n <i class=\"fa-solid fa-rotate-left\"></i>\n </button>\n }\n @if (isEditingActive) {\n <button class=\"mj-agent-editor-btn\"\n [disabled]=\"!flowEditor?.CanRedo\" (click)=\"flowEditor?.Redo()\" title=\"Redo (Ctrl+Y)\">\n <i class=\"fa-solid fa-rotate-right\"></i>\n </button>\n }\n </div>\n\n <div class=\"mj-agent-editor-toolbar-center\">\n <!-- Fullscreen title -->\n @if (CanvasTitle) {\n <span class=\"mj-agent-editor-title\">\n <i class=\"fa-solid fa-diagram-project\"></i> {{ CanvasTitle }}\n </span>\n }\n\n <!-- Synchronized Dual-Lens View Mode Toggle -->\n <div class=\"mj-agent-editor-view-toggle\">\n <button class=\"mj-agent-editor-view-btn\"\n [class.mj-agent-editor-view-btn--active]=\"viewMode === 'diagram'\"\n (click)=\"viewMode = 'diagram'\">\n <i class=\"fa-solid fa-diagram-project\"></i> Canvas\n </button>\n <button class=\"mj-agent-editor-view-btn\"\n [class.mj-agent-editor-view-btn--active]=\"viewMode === 'split'\"\n (click)=\"viewMode = 'split'\">\n <i class=\"fa-solid fa-table-columns\"></i> Split Playbook\n </button>\n <button class=\"mj-agent-editor-view-btn\"\n [class.mj-agent-editor-view-btn--active]=\"viewMode === 'list'\"\n (click)=\"viewMode = 'list'\">\n <i class=\"fa-solid fa-list-ol\"></i> Playbook\n </button>\n </div>\n\n <!-- Mode indicator badge -->\n @if (isEditingActive) {\n <span class=\"mj-agent-editor-mode-badge mj-agent-editor-mode-badge--editing\">\n <i class=\"fa-solid fa-pen\"></i> Editing\n </span>\n }\n @if (!isEditingActive) {\n <span class=\"mj-agent-editor-mode-badge mj-agent-editor-mode-badge--readonly\">\n <i class=\"fa-solid fa-lock\"></i> Read Only\n </span>\n }\n </div>\n\n <div class=\"mj-agent-editor-toolbar-right\">\n <!-- Status indicators -->\n @if (ShowSaveControls && hasUnsavedChanges) {\n <span class=\"mj-agent-editor-status mj-agent-editor-status--unsaved\">\n <i class=\"fa-solid fa-circle\"></i> Unsaved\n </span>\n }\n @if (ShowSaveControls && lastSaved) {\n <span class=\"mj-agent-editor-status\">\n Saved {{ lastSaved | date:'shortTime' }}\n </span>\n }\n\n <!-- Save + Cancel \u2014 only when this editor owns persistence. When a host form owns the\n record's save, a Save button here is a SECOND save button for the same record. -->\n @if (ShowSaveControls && isEditingActive) {\n <button class=\"mj-agent-editor-btn mj-agent-editor-btn--primary\"\n [disabled]=\"isSaving || !hasUnsavedChanges\" (click)=\"Save()\">\n <i class=\"fa-solid\" [ngClass]=\"isSaving ? 'fa-spinner fa-spin' : 'fa-floppy-disk'\"></i>\n {{ isSaving ? 'Saving...' : 'Save' }}\n </button>\n }\n @if (ShowSaveControls && fullscreenEditMode && !EditMode) {\n <button\n class=\"mj-agent-editor-btn\"\n (click)=\"cancelFullscreenEdit()\" title=\"Cancel editing\">\n <i class=\"fa-solid fa-xmark\"></i> Cancel\n </button>\n }\n\n @if (ShowSaveControls && isEditingActive) {\n <div class=\"mj-agent-editor-btn-divider\"></div>\n }\n\n <!-- Fullscreen edit toggle (only when parent is NOT in edit mode) -->\n @if (ShowSaveControls && !EditMode && !fullscreenEditMode && userCanUpdate) {\n <button\n class=\"mj-agent-editor-btn mj-agent-editor-btn--edit\"\n (click)=\"toggleFullscreenEditMode()\" title=\"Edit flow\">\n <i class=\"fa-solid fa-pen-to-square\"></i> Edit\n </button>\n }\n\n <!-- Expand / Close fullscreen -->\n @if (!FullScreen) {\n <button class=\"mj-agent-editor-btn mj-agent-editor-btn--expand\"\n (click)=\"toggleFullScreen()\" title=\"Expand to full screen\">\n <i class=\"fa-solid fa-up-right-and-down-left-from-center\"></i> Expand\n </button>\n }\n @if (FullScreen) {\n <button class=\"mj-agent-editor-btn mj-agent-editor-btn--close\"\n (click)=\"toggleFullScreen()\" title=\"Close full screen (Esc)\">\n <i class=\"fa-solid fa-xmark\"></i> Close\n </button>\n }\n </div>\n </div>\n\n <!-- \u2500\u2500 Loading State \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (isLoading) {\n <div class=\"mj-agent-editor-loading\">\n <!-- MJ's shared indicator, not a hand-rolled fa-spinner: one loading affordance across the\n product means a slow canvas looks like every other slow thing, not like a different bug. -->\n <mj-loading text=\"Loading flow...\" size=\"medium\"></mj-loading>\n </div>\n }\n\n <!-- \u2500\u2500 Main Content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (!isLoading) {\n <div class=\"mj-agent-editor-body\">\n <!-- What the runtime's own compiler and validator would refuse, rechecked on every change. The\n same problems are flagged on the steps and paths they are about. -->\n @if (RunProblems.length > 0) {\n <mj-alert class=\"mj-agent-editor-run-problems\" Variant=\"warning\" Size=\"sm\" [Title]=\"RunProblemsTitle\">\n <ul class=\"mj-agent-editor-run-problems-list\">\n @for (problem of RunProblems; track $index) {\n <li>{{ problem.Message }}</li>\n }\n </ul>\n </mj-alert>\n }\n <!-- Canvas / Split Playbook View -->\n @if (viewMode === 'diagram' || viewMode === 'split') {\n <div class=\"mj-agent-editor-diagram\">\n @if (viewMode === 'split') {\n <div class=\"mj-agent-editor-split-playbook\">\n <mj-agent-step-list\n [Steps]=\"steps\"\n [Paths]=\"paths\"\n [SelectedStepID]=\"selectedStep?.ID || null\"\n (StepClicked)=\"onStepClickedInList($event)\">\n </mj-agent-step-list>\n </div>\n }\n <mj-flow-editor #flowEditor\n [Nodes]=\"nodes\"\n [Connections]=\"connections\"\n [NodeTypes]=\"nodeTypes\"\n [ViewportKey]=\"AgentID ? 'agent:' + AgentID : null\"\n [ReadOnly]=\"!isEditingActive\"\n [ShowMinimap]=\"prefShowMinimap\"\n [ShowPalette]=\"isEditingActive\"\n [ShowGrid]=\"prefShowGrid\"\n [ShowLegend]=\"prefShowLegend\"\n [ShowStatusBar]=\"true\"\n [ShowToolbar]=\"true\"\n [AutoLayoutDirection]=\"prefLayoutDirection\"\n (NodeSelected)=\"onNodeSelected($event)\"\n (NodeAdded)=\"onNodeAdded($event)\"\n (NodeRemoved)=\"onNodeRemoved($event)\"\n (NodeQuickAddClicked)=\"onNodeQuickAddClicked($event)\"\n (ConnectionCreated)=\"onConnectionCreated($event)\"\n (ConnectionRemoved)=\"onConnectionRemoved($event)\"\n (ConnectionReassigned)=\"onConnectionReassigned($event)\"\n (ConnectionSelected)=\"onConnectionSelected($event)\"\n (NodesChanged)=\"onNodesChanged($event)\"\n (ConnectionsChanged)=\"onConnectionsChanged($event)\"\n (GridToggled)=\"onGridPrefChanged($event)\"\n (MinimapToggled)=\"onMinimapPrefChanged($event)\"\n (LegendToggled)=\"onLegendPrefChanged($event)\"\n (LayoutDirectionChanged)=\"onLayoutDirectionPrefChanged($event)\">\n </mj-flow-editor>\n <!-- Properties Panel -->\n <div class=\"mj-agent-editor-properties\"\n [class.mj-agent-editor-properties--visible]=\"showPropertiesPanel\">\n <mj-agent-properties-panel\n [Step]=\"selectedStep\"\n [SelectedConnection]=\"selectedConnection\"\n [PathEntity]=\"selectedPathEntity\"\n [ReadOnly]=\"!isEditingActive\"\n [Actions]=\"availableActions\"\n [Prompts]=\"availablePrompts\"\n [Agents]=\"availableAgents\"\n [AllSteps]=\"steps\"\n [AllPaths]=\"paths\"\n [DecisionModelTypeID]=\"decisionModelTypeID\"\n [RunProblems]=\"RunProblems\"\n (StepChanged)=\"onStepChanged($event)\"\n (PathChanged)=\"onPathChanged($event)\"\n (DeleteStepRequested)=\"onDeleteStepRequested($event)\"\n (DeletePathRequested)=\"onDeletePathRequested($event)\"\n (CloseRequested)=\"onCloseProperties()\">\n </mj-agent-properties-panel>\n </div>\n </div>\n }\n <!-- List View -->\n @if (viewMode === 'list') {\n <div class=\"mj-agent-editor-list\">\n <mj-agent-step-list\n [Steps]=\"steps\"\n [Paths]=\"paths\"\n [SelectedStepID]=\"selectedStep?.ID || null\"\n (StepClicked)=\"onStepClickedInList($event)\">\n </mj-agent-step-list>\n <!-- Properties Panel in list mode too -->\n <div class=\"mj-agent-editor-properties\"\n [class.mj-agent-editor-properties--visible]=\"showPropertiesPanel\">\n <mj-agent-properties-panel\n [Step]=\"selectedStep\"\n [SelectedConnection]=\"selectedConnection\"\n [PathEntity]=\"selectedPathEntity\"\n [ReadOnly]=\"!isEditingActive\"\n [Actions]=\"availableActions\"\n [Prompts]=\"availablePrompts\"\n [Agents]=\"availableAgents\"\n [AllSteps]=\"steps\"\n [AllPaths]=\"paths\"\n [DecisionModelTypeID]=\"decisionModelTypeID\"\n [RunProblems]=\"RunProblems\"\n (StepChanged)=\"onStepChanged($event)\"\n (PathChanged)=\"onPathChanged($event)\"\n (DeleteStepRequested)=\"onDeleteStepRequested($event)\"\n (DeletePathRequested)=\"onDeletePathRequested($event)\"\n (CloseRequested)=\"onCloseProperties()\">\n </mj-agent-properties-panel>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- \u2500\u2500 Unsaved Changes Dialog \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n @if (showUnsavedDialog) {\n <div class=\"mj-agent-editor-dialog-overlay\">\n <div class=\"mj-agent-editor-dialog\">\n <div class=\"mj-agent-editor-dialog-icon\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n </div>\n <h3 class=\"mj-agent-editor-dialog-title\">Unsaved Changes</h3>\n <p class=\"mj-agent-editor-dialog-message\">\n You have unsaved changes to this flow. What would you like to do?\n </p>\n <div class=\"mj-agent-editor-dialog-actions\">\n <button class=\"mj-agent-editor-btn mj-agent-editor-btn--primary\" (click)=\"onUnsavedDialogSave()\">\n <i class=\"fa-solid fa-floppy-disk\"></i> Save & Close\n </button>\n <button class=\"mj-agent-editor-btn mj-agent-editor-btn--danger-outline\" (click)=\"onUnsavedDialogDiscard()\">\n Discard Changes\n </button>\n <button class=\"mj-agent-editor-btn\" (click)=\"onUnsavedDialogCancel()\">\n Cancel\n </button>\n </div>\n </div>\n </div>\n }\n</div>\n", styles: ["/* ============================================================\n Flow Agent Editor \u2014 MJ-specific flow editor wrapper\n ============================================================ */\n\n/* \u2500\u2500 Host element fullscreen positioning \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\nmj-flow-agent-editor.mj-flow-agent-editor--fullscreen {\n position: fixed;\n top: 12px;\n left: 12px;\n right: 12px;\n padding-right: 25px;\n bottom: 12px;\n z-index: 10000;\n border-radius: var(--mj-radius-lg);\n height: auto !important;\n min-height: unset !important;\n box-shadow: var(--mj-shadow-2xl);\n}\n\nmj-flow-agent-editor.mj-flow-agent-editor--fullscreen .mj-agent-editor {\n height: 100%;\n min-height: unset;\n border-radius: var(--mj-radius-lg);\n}\n\n.mj-agent-editor {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 500px;\n background: var(--mj-bg-page);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n position: relative;\n}\n\n/* \u2500\u2500 Backdrop overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n z-index: 9999;\n}\n\n/* \u2500\u2500 Toolbar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8px 12px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n gap: 12px;\n flex-shrink: 0;\n transition: background 0.2s ease, border-color 0.2s ease;\n}\n\n.mj-agent-editor-toolbar--editing {\n background: var(--mj-status-success-bg);\n border-bottom-color: var(--mj-status-success-border);\n}\n\n.mj-flow-agent-editor--fullscreen .mj-agent-editor-toolbar {\n padding: 10px 16px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n border-radius: var(--mj-radius-lg) var(--mj-radius-lg) 0 0;\n}\n\n.mj-flow-agent-editor--fullscreen .mj-agent-editor-toolbar--editing {\n background: var(--mj-status-success-bg);\n border-bottom-color: var(--mj-status-success-border);\n}\n\n.mj-agent-editor-toolbar-left,\n.mj-agent-editor-toolbar-center,\n.mj-agent-editor-toolbar-right {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mj-agent-editor-toolbar-right {\n gap: 10px;\n}\n\n.mj-agent-editor-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 10px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n\n.mj-agent-editor-btn i { font-size: var(--mj-text-xs); }\n\n.mj-agent-editor-btn:hover:not(:disabled) { background: var(--mj-bg-surface-sunken); border-color: var(--mj-border-strong); }\n.mj-agent-editor-btn:disabled { opacity: 0.4; cursor: not-allowed; }\n\n.mj-agent-editor-btn--primary {\n background: var(--mj-brand-primary);\n border-color: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.mj-agent-editor-btn--primary:hover:not(:disabled) { background: var(--mj-brand-primary-hover); border-color: var(--mj-brand-primary-hover); }\n\n.mj-agent-editor-btn--expand {\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n border-color: color-mix(in srgb, var(--mj-brand-primary) 30%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.mj-agent-editor-btn--expand:hover:not(:disabled) { background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface)); border-color: color-mix(in srgb, var(--mj-brand-primary) 40%, var(--mj-bg-surface)); color: var(--mj-brand-primary-hover); }\n\n.mj-agent-editor-btn--close {\n background: var(--mj-status-error-bg);\n border-color: var(--mj-status-error-border);\n color: var(--mj-status-error);\n}\n\n.mj-agent-editor-btn--close:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n border-color: var(--mj-status-error);\n color: var(--mj-status-error-text);\n}\n\n.mj-agent-editor-btn-divider {\n width: 1px;\n height: 22px;\n background: var(--mj-border-default);\n margin: 0 2px;\n}\n\n/* \u2500\u2500 View Toggle \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-view-toggle {\n display: flex;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n}\n\n.mj-agent-editor-view-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 12px;\n border: none;\n background: var(--mj-bg-surface);\n color: var(--mj-text-muted);\n font-size: var(--mj-text-xs);\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.mj-agent-editor-view-btn i { font-size: 11px; }\n\n.mj-agent-editor-view-btn:not(:last-child) { border-right: 1px solid var(--mj-border-default); }\n\n.mj-agent-editor-view-btn--active {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.mj-agent-editor-view-btn:hover:not(.mj-agent-editor-view-btn--active) { background: var(--mj-bg-page); }\n\n/* \u2500\u2500 Fullscreen Title \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-title {\n font-size: var(--mj-text-sm);\n font-weight: 600;\n color: var(--mj-text-primary);\n display: inline-flex;\n align-items: center;\n gap: 8px;\n margin-right: 12px;\n}\n\n.mj-agent-editor-title i {\n color: var(--mj-brand-primary);\n font-size: var(--mj-text-sm);\n}\n\n/* \u2500\u2500 Status Indicators \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-status {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-disabled);\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n.mj-agent-editor-status--unsaved {\n color: var(--mj-status-warning);\n}\n\n.mj-agent-editor-status--unsaved i { font-size: 6px; }\n\n/* \u2500\u2500 Inline Floating Controls (non-fullscreen) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-inline-controls {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 100;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.mj-agent-editor-inline-expand {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 30px;\n border: 1px solid color-mix(in srgb, var(--mj-text-primary) 12%, transparent);\n border-radius: var(--mj-radius-md);\n background: color-mix(in srgb, var(--mj-bg-surface) 85%, transparent);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-xs);\n cursor: pointer;\n transition: all 0.15s ease;\n box-shadow: var(--mj-shadow-sm);\n backdrop-filter: blur(4px);\n}\n\n.mj-agent-editor-inline-expand:hover {\n background: var(--mj-bg-surface);\n border-color: var(--mj-text-disabled);\n color: var(--mj-text-primary);\n box-shadow: var(--mj-shadow-md);\n transform: scale(1.05);\n}\n\n.mj-agent-editor-inline-dot {\n width: 8px;\n height: 8px;\n border-radius: var(--mj-radius-full);\n background: var(--mj-status-warning);\n box-shadow: 0 0 0 2px color-mix(in srgb, var(--mj-bg-surface) 90%, transparent),\n 0 0 6px color-mix(in srgb, var(--mj-status-warning) 40%, transparent);\n animation: mj-inline-dot-pulse 2s ease-in-out infinite;\n}\n\n@keyframes mj-inline-dot-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n}\n\n/* \u2500\u2500 Loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n flex: 1;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n}\n\n.mj-agent-editor-loading i { font-size: var(--mj-text-base); }\n\n/* \u2500\u2500 Body \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-body {\n flex: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n/* Run-check banner: a bounded strip above the canvas, so a long list scrolls instead of pushing the flow away. */\n.mj-agent-editor-run-problems {\n flex: 0 0 auto;\n margin: 8px 8px 0;\n max-height: 140px;\n overflow-y: auto;\n}\n\n.mj-agent-editor-run-problems-list {\n margin: 4px 0 0;\n padding-inline-start: 1.25rem;\n}\n\n.mj-agent-editor-diagram {\n display: flex;\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n.mj-agent-editor-diagram mj-flow-editor {\n flex: 1;\n min-width: 0;\n display: flex;\n}\n\n.mj-agent-editor-split-playbook {\n width: 340px;\n flex-shrink: 0;\n border-right: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n.mj-agent-editor-split-playbook mj-agent-step-list {\n flex: 1;\n min-height: 0;\n}\n\n.mj-agent-editor-list {\n display: flex;\n flex: 1;\n overflow: hidden;\n}\n\n.mj-agent-editor-list mj-agent-step-list {\n flex: 1;\n overflow-y: auto;\n}\n\n/* \u2500\u2500 Properties Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-properties {\n width: 320px;\n flex-shrink: 0;\n overflow: hidden;\n transform: translateX(320px);\n margin-right: -320px;\n transition: transform 0.2s ease, margin-right 0.2s ease;\n border-left: 1px solid var(--mj-border-default);\n}\n\n.mj-agent-editor-properties--visible {\n transform: translateX(0);\n margin-right: 0;\n}\n\n.mj-agent-editor-properties mj-agent-properties-panel {\n display: block;\n width: 320px;\n height: 100%;\n}\n\n/* \u2500\u2500 Mode Indicator Badge \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-mode-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 11px;\n font-weight: 600;\n padding: 3px 10px;\n border-radius: var(--mj-radius-lg);\n letter-spacing: 0.2px;\n}\n\n.mj-agent-editor-mode-badge i { font-size: 10px; }\n\n.mj-agent-editor-mode-badge--editing {\n background: var(--mj-status-success-bg);\n color: var(--mj-status-success-text);\n}\n\n.mj-agent-editor-mode-badge--readonly {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n}\n\n/* \u2500\u2500 Edit Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-btn--edit {\n background: var(--mj-status-success-bg);\n border-color: var(--mj-status-success-border);\n color: var(--mj-status-success-text);\n}\n\n.mj-agent-editor-btn--edit:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-success) 18%, var(--mj-bg-surface));\n border-color: var(--mj-status-success);\n color: var(--mj-status-success-text);\n}\n\n/* \u2500\u2500 Danger Outline Button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-btn--danger-outline {\n border-color: var(--mj-status-error-border);\n color: var(--mj-status-error);\n background: var(--mj-bg-surface);\n}\n\n.mj-agent-editor-btn--danger-outline:hover:not(:disabled) {\n background: var(--mj-status-error-bg);\n border-color: var(--mj-status-error);\n}\n\n/* \u2500\u2500 Unsaved Changes Dialog \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mj-agent-editor-dialog-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: var(--mj-bg-overlay);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10001;\n animation: mj-dialog-fade-in 0.15s ease-out;\n}\n\n@keyframes mj-dialog-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.mj-agent-editor-dialog {\n background: var(--mj-bg-surface);\n border-radius: var(--mj-radius-lg);\n padding: 28px 32px;\n max-width: 400px;\n width: 90%;\n box-shadow: var(--mj-shadow-xl);\n text-align: center;\n animation: mj-dialog-scale-in 0.15s ease-out;\n}\n\n@keyframes mj-dialog-scale-in {\n from { transform: scale(0.95); opacity: 0; }\n to { transform: scale(1); opacity: 1; }\n}\n\n.mj-agent-editor-dialog-icon {\n font-size: 28px;\n color: var(--mj-status-warning);\n margin-bottom: 12px;\n}\n\n.mj-agent-editor-dialog-title {\n font-size: var(--mj-text-base);\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 8px;\n}\n\n.mj-agent-editor-dialog-message {\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n margin: 0 0 20px;\n line-height: 1.5;\n}\n\n.mj-agent-editor-dialog-actions {\n display: flex;\n gap: 8px;\n justify-content: center;\n flex-wrap: wrap;\n}\n"] }]
|
|
1175
1265
|
}], () => [{ type: i0.ChangeDetectorRef }, { type: i1.AgentFlowTransformerService }, { type: i0.ElementRef }, { type: i0.Renderer2 }], { HostFullScreen: [{
|
|
1176
1266
|
type: HostBinding,
|
|
1177
1267
|
args: ['class.mj-flow-agent-editor--fullscreen']
|
|
@@ -1181,6 +1271,8 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
1181
1271
|
type: Input
|
|
1182
1272
|
}], FullScreen: [{
|
|
1183
1273
|
type: Input
|
|
1274
|
+
}], DefaultViewMode: [{
|
|
1275
|
+
type: Input
|
|
1184
1276
|
}], ShowSaveControls: [{
|
|
1185
1277
|
type: Input
|
|
1186
1278
|
}], CanvasTitle: [{
|
|
@@ -1200,5 +1292,5 @@ export class FlowAgentEditorComponent extends BaseAngularComponent {
|
|
|
1200
1292
|
type: HostListener,
|
|
1201
1293
|
args: ['document:keydown.escape']
|
|
1202
1294
|
}] }); })();
|
|
1203
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FlowAgentEditorComponent, { className: "FlowAgentEditorComponent", filePath: "src/lib/agent-editor/flow-agent-editor.component.ts", lineNumber:
|
|
1295
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FlowAgentEditorComponent, { className: "FlowAgentEditorComponent", filePath: "src/lib/agent-editor/flow-agent-editor.component.ts", lineNumber: 55 }); })();
|
|
1204
1296
|
//# sourceMappingURL=flow-agent-editor.component.js.map
|