@memberjunction/ng-core-entity-forms 2.87.0 → 2.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.js +7 -7
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/condition-editor/condition-editor.component.d.ts +29 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/condition-editor/condition-editor.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/condition-editor/condition-editor.component.js +198 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/condition-editor/condition-editor.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/confirmation-dialog/confirmation-dialog.component.d.ts +14 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/confirmation-dialog/confirmation-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/confirmation-dialog/confirmation-dialog.component.js +98 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/custom-node/custom-node.component.d.ts +44 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/custom-node/custom-node.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/custom-node/custom-node.component.js +282 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/custom-node/custom-node.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/execution-panel/execution-panel.component.d.ts +35 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/execution-panel/execution-panel.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/execution-panel/execution-panel.component.js +287 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/execution-panel/execution-panel.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/flow-editor/flow-editor.component.d.ts +106 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/flow-editor/flow-editor.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/flow-editor/flow-editor.component.js +951 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/flow-editor/flow-editor.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/prompt-editor/prompt-editor.component.d.ts +30 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/prompt-editor/prompt-editor.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/prompt-editor/prompt-editor.component.js +450 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/prompt-editor/prompt-editor.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/properties-panel/properties-panel.component.d.ts +25 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/properties-panel/properties-panel.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/properties-panel/properties-panel.component.js +423 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/properties-panel/properties-panel.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/simple-condition-editor/simple-condition-editor.component.d.ts +21 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/simple-condition-editor/simple-condition-editor.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/simple-condition-editor/simple-condition-editor.component.js +182 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/simple-condition-editor/simple-condition-editor.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/step/step.component.d.ts +34 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/step/step.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/step/step.component.js +171 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/step/step.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/toolbar/toolbar.component.d.ts +17 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/toolbar/toolbar.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/toolbar/toolbar.component.js +78 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/toolbar/toolbar.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/connection.model.d.ts +17 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/connection.model.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/connection.model.js +11 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/connection.model.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/mj-extended.model.d.ts +21 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/mj-extended.model.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/mj-extended.model.js +2 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/mj-extended.model.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/module.model.d.ts +33 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/module.model.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/module.model.js +2 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/module.model.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/step.model.d.ts +44 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/step.model.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/step.model.js +166 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/step.model.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/flow-editor.service.d.ts +14 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/flow-editor.service.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/flow-editor.service.js +31 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/flow-editor.service.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/flow-executor.service.d.ts +63 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/flow-executor.service.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/flow-executor.service.js +294 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/flow-executor.service.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/mj-flow-transformer.service.d.ts +77 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/mj-flow-transformer.service.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/mj-flow-transformer.service.js +408 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/mj-flow-transformer.service.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/module-manager.service.d.ts +19 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/module-manager.service.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/module-manager.service.js +116 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/module-manager.service.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/prompt-manager.service.d.ts +25 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/prompt-manager.service.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/prompt-manager.service.js +90 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/services/prompt-manager.service.js.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/mj-integrated-flow-editor.component.d.ts +52 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/mj-integrated-flow-editor.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/mj-integrated-flow-editor.component.js +500 -0
- package/dist/lib/custom/AIAgents/FlowAgentType/mj-integrated-flow-editor.component.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +2 -1
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +10 -4
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/generated/Entities/Component/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/Component/sections/details.component.js +40 -4
- package/dist/lib/generated/Entities/Component/sections/details.component.js.map +1 -1
- package/package.json +16 -16
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
5
|
+
import { InputsModule } from '@progress/kendo-angular-inputs';
|
|
6
|
+
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
7
|
+
import { COMMON_CONDITIONS } from '../../models/connection.model';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@progress/kendo-angular-dropdowns";
|
|
10
|
+
import * as i2 from "@progress/kendo-angular-inputs";
|
|
11
|
+
import * as i3 from "@progress/kendo-angular-buttons";
|
|
12
|
+
export class SimpleConditionEditorComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.save = new EventEmitter();
|
|
15
|
+
this.cancel = new EventEmitter();
|
|
16
|
+
this.commonConditions = COMMON_CONDITIONS;
|
|
17
|
+
this.selectedCondition = null;
|
|
18
|
+
this.customExpression = '';
|
|
19
|
+
}
|
|
20
|
+
ngOnInit() {
|
|
21
|
+
if (this.connection.condition) {
|
|
22
|
+
// Try to find in common conditions
|
|
23
|
+
const found = this.commonConditions.find(c => c.expression === this.connection.condition.expression);
|
|
24
|
+
if (found) {
|
|
25
|
+
this.selectedCondition = found;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
// It's a custom expression
|
|
29
|
+
this.customExpression = this.connection.condition.expression;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
getPreview() {
|
|
34
|
+
if (this.customExpression) {
|
|
35
|
+
return `if (${this.customExpression})`;
|
|
36
|
+
}
|
|
37
|
+
else if (this.selectedCondition) {
|
|
38
|
+
return `if (${this.selectedCondition.expression})`;
|
|
39
|
+
}
|
|
40
|
+
return 'Always';
|
|
41
|
+
}
|
|
42
|
+
onSave() {
|
|
43
|
+
let condition;
|
|
44
|
+
if (this.customExpression) {
|
|
45
|
+
condition = {
|
|
46
|
+
expression: this.customExpression,
|
|
47
|
+
label: this.customExpression
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
else if (this.selectedCondition) {
|
|
51
|
+
condition = {
|
|
52
|
+
expression: this.selectedCondition.expression,
|
|
53
|
+
label: this.selectedCondition.label
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const updatedConnection = {
|
|
57
|
+
...this.connection,
|
|
58
|
+
condition
|
|
59
|
+
};
|
|
60
|
+
this.save.emit(updatedConnection);
|
|
61
|
+
}
|
|
62
|
+
onCancel() {
|
|
63
|
+
this.cancel.emit();
|
|
64
|
+
}
|
|
65
|
+
static { this.ɵfac = function SimpleConditionEditorComponent_Factory(t) { return new (t || SimpleConditionEditorComponent)(); }; }
|
|
66
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SimpleConditionEditorComponent, selectors: [["app-simple-condition-editor"]], inputs: { connection: "connection" }, outputs: { save: "save", cancel: "cancel" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 26, vars: 11, consts: [[1, "condition-editor"], [1, "editor-header"], [1, "close-button", 3, "click"], [1, "fas", "fa-times"], [1, "editor-content"], [1, "condition-section"], ["textField", "label", "valueField", "expression", 3, "valueChange", "data", "value", "valuePrimitive"], [1, "custom-section"], ["placeholder", "e.g., isValid, hasData, response.ok", 3, "valueChange", "value"], [1, "preview-section"], [1, "preview-box"], [1, "preview-text"], [1, "editor-footer"], ["kendoButton", "", 3, "click", "themeColor"], ["kendoButton", "", 3, "click", "look"]], template: function SimpleConditionEditorComponent_Template(rf, ctx) { if (rf & 1) {
|
|
67
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h3");
|
|
68
|
+
i0.ɵɵtext(3, "Edit Condition");
|
|
69
|
+
i0.ɵɵelementEnd();
|
|
70
|
+
i0.ɵɵelementStart(4, "button", 2);
|
|
71
|
+
i0.ɵɵlistener("click", function SimpleConditionEditorComponent_Template_button_click_4_listener() { return ctx.onCancel(); });
|
|
72
|
+
i0.ɵɵelement(5, "i", 3);
|
|
73
|
+
i0.ɵɵelementEnd()();
|
|
74
|
+
i0.ɵɵelementStart(6, "div", 4)(7, "div", 5)(8, "label");
|
|
75
|
+
i0.ɵɵtext(9, "When:");
|
|
76
|
+
i0.ɵɵelementEnd();
|
|
77
|
+
i0.ɵɵelementStart(10, "kendo-dropdownlist", 6);
|
|
78
|
+
i0.ɵɵtwoWayListener("valueChange", function SimpleConditionEditorComponent_Template_kendo_dropdownlist_valueChange_10_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.selectedCondition, $event) || (ctx.selectedCondition = $event); return $event; });
|
|
79
|
+
i0.ɵɵelementEnd()();
|
|
80
|
+
i0.ɵɵelementStart(11, "div", 7)(12, "label");
|
|
81
|
+
i0.ɵɵtext(13, "Or enter custom expression:");
|
|
82
|
+
i0.ɵɵelementEnd();
|
|
83
|
+
i0.ɵɵelementStart(14, "kendo-textbox", 8);
|
|
84
|
+
i0.ɵɵtwoWayListener("valueChange", function SimpleConditionEditorComponent_Template_kendo_textbox_valueChange_14_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.customExpression, $event) || (ctx.customExpression = $event); return $event; });
|
|
85
|
+
i0.ɵɵelementEnd()();
|
|
86
|
+
i0.ɵɵelementStart(15, "div", 9)(16, "label");
|
|
87
|
+
i0.ɵɵtext(17, "Preview:");
|
|
88
|
+
i0.ɵɵelementEnd();
|
|
89
|
+
i0.ɵɵelementStart(18, "div", 10)(19, "span", 11);
|
|
90
|
+
i0.ɵɵtext(20);
|
|
91
|
+
i0.ɵɵelementEnd()()()();
|
|
92
|
+
i0.ɵɵelementStart(21, "div", 12)(22, "button", 13);
|
|
93
|
+
i0.ɵɵlistener("click", function SimpleConditionEditorComponent_Template_button_click_22_listener() { return ctx.onSave(); });
|
|
94
|
+
i0.ɵɵtext(23, " Save ");
|
|
95
|
+
i0.ɵɵelementEnd();
|
|
96
|
+
i0.ɵɵelementStart(24, "button", 14);
|
|
97
|
+
i0.ɵɵlistener("click", function SimpleConditionEditorComponent_Template_button_click_24_listener() { return ctx.onCancel(); });
|
|
98
|
+
i0.ɵɵtext(25, " Cancel ");
|
|
99
|
+
i0.ɵɵelementEnd()()();
|
|
100
|
+
} if (rf & 2) {
|
|
101
|
+
i0.ɵɵadvance(10);
|
|
102
|
+
i0.ɵɵstyleProp("width", 100, "percent");
|
|
103
|
+
i0.ɵɵproperty("data", ctx.commonConditions);
|
|
104
|
+
i0.ɵɵtwoWayProperty("value", ctx.selectedCondition);
|
|
105
|
+
i0.ɵɵproperty("valuePrimitive", false);
|
|
106
|
+
i0.ɵɵadvance(4);
|
|
107
|
+
i0.ɵɵstyleProp("width", 100, "percent");
|
|
108
|
+
i0.ɵɵtwoWayProperty("value", ctx.customExpression);
|
|
109
|
+
i0.ɵɵadvance(6);
|
|
110
|
+
i0.ɵɵtextInterpolate(ctx.getPreview());
|
|
111
|
+
i0.ɵɵadvance(2);
|
|
112
|
+
i0.ɵɵproperty("themeColor", "primary");
|
|
113
|
+
i0.ɵɵadvance(2);
|
|
114
|
+
i0.ɵɵproperty("look", "outline");
|
|
115
|
+
} }, dependencies: [CommonModule, FormsModule, DropDownsModule, i1.DropDownListComponent, InputsModule, i2.TextBoxComponent, ButtonsModule, i3.ButtonComponent], styles: [".condition-editor[_ngcontent-%COMP%] {\n background: var(--white-color);\n border-radius: var(--border-radius);\n box-shadow: var(--shadow);\n width: 400px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n \n .editor-header[_ngcontent-%COMP%] {\n padding: 1.5rem;\n border-bottom: 1px solid var(--gray-700);\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: var(--gray-600);\n \n h3 {\n margin: 0;\n font-size: 1.25rem;\n color: var(--gray-900);\n }\n }\n \n .close-button[_ngcontent-%COMP%] {\n background: none;\n border: none;\n color: var(--gray-800);\n cursor: pointer;\n font-size: 1.25rem;\n padding: 0.5rem;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all var(--transition-time);\n \n &:hover {\n background: var(--gray-700);\n color: var(--gray-900);\n }\n }\n \n .editor-content[_ngcontent-%COMP%] {\n flex: 1;\n padding: 1.5rem;\n }\n \n .condition-section[_ngcontent-%COMP%], \n .custom-section[_ngcontent-%COMP%], \n .preview-section[_ngcontent-%COMP%] {\n margin-bottom: 1.5rem;\n \n label {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 600;\n color: var(--gray-900);\n }\n }\n \n .preview-section[_ngcontent-%COMP%] {\n margin-bottom: 0;\n }\n \n .preview-box[_ngcontent-%COMP%] {\n background: var(--gray-600);\n padding: 1rem;\n border-radius: 0.5rem;\n border: 1px solid var(--gray-700);\n }\n \n .preview-text[_ngcontent-%COMP%] {\n font-family: monospace;\n font-size: 0.875rem;\n color: var(--mj-blue);\n }\n \n .editor-footer[_ngcontent-%COMP%] {\n padding: 1rem 1.5rem;\n border-top: 1px solid var(--gray-700);\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n background: var(--gray-600);\n }"] }); }
|
|
116
|
+
}
|
|
117
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SimpleConditionEditorComponent, [{
|
|
118
|
+
type: Component,
|
|
119
|
+
args: [{ selector: 'app-simple-condition-editor', standalone: true, imports: [CommonModule, FormsModule, DropDownsModule, InputsModule, ButtonsModule], template: `
|
|
120
|
+
<div class="condition-editor">
|
|
121
|
+
<div class="editor-header">
|
|
122
|
+
<h3>Edit Condition</h3>
|
|
123
|
+
<button class="close-button" (click)="onCancel()">
|
|
124
|
+
<i class="fas fa-times"></i>
|
|
125
|
+
</button>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<div class="editor-content">
|
|
129
|
+
<div class="condition-section">
|
|
130
|
+
<label>When:</label>
|
|
131
|
+
<kendo-dropdownlist
|
|
132
|
+
[data]="commonConditions"
|
|
133
|
+
[(value)]="selectedCondition"
|
|
134
|
+
textField="label"
|
|
135
|
+
valueField="expression"
|
|
136
|
+
[valuePrimitive]="false"
|
|
137
|
+
[style.width.percent]="100">
|
|
138
|
+
</kendo-dropdownlist>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<div class="custom-section">
|
|
142
|
+
<label>Or enter custom expression:</label>
|
|
143
|
+
<kendo-textbox
|
|
144
|
+
[(value)]="customExpression"
|
|
145
|
+
placeholder="e.g., isValid, hasData, response.ok"
|
|
146
|
+
[style.width.percent]="100">
|
|
147
|
+
</kendo-textbox>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<div class="preview-section">
|
|
151
|
+
<label>Preview:</label>
|
|
152
|
+
<div class="preview-box">
|
|
153
|
+
<span class="preview-text">{{ getPreview() }}</span>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
<div class="editor-footer">
|
|
159
|
+
<button
|
|
160
|
+
kendoButton
|
|
161
|
+
[themeColor]="'primary'"
|
|
162
|
+
(click)="onSave()">
|
|
163
|
+
Save
|
|
164
|
+
</button>
|
|
165
|
+
<button
|
|
166
|
+
kendoButton
|
|
167
|
+
[look]="'outline'"
|
|
168
|
+
(click)="onCancel()">
|
|
169
|
+
Cancel
|
|
170
|
+
</button>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
`, styles: ["\n .condition-editor {\n background: var(--white-color);\n border-radius: var(--border-radius);\n box-shadow: var(--shadow);\n width: 400px;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n \n .editor-header {\n padding: 1.5rem;\n border-bottom: 1px solid var(--gray-700);\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: var(--gray-600);\n \n h3 {\n margin: 0;\n font-size: 1.25rem;\n color: var(--gray-900);\n }\n }\n \n .close-button {\n background: none;\n border: none;\n color: var(--gray-800);\n cursor: pointer;\n font-size: 1.25rem;\n padding: 0.5rem;\n border-radius: 50%;\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all var(--transition-time);\n \n &:hover {\n background: var(--gray-700);\n color: var(--gray-900);\n }\n }\n \n .editor-content {\n flex: 1;\n padding: 1.5rem;\n }\n \n .condition-section,\n .custom-section,\n .preview-section {\n margin-bottom: 1.5rem;\n \n label {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 600;\n color: var(--gray-900);\n }\n }\n \n .preview-section {\n margin-bottom: 0;\n }\n \n .preview-box {\n background: var(--gray-600);\n padding: 1rem;\n border-radius: 0.5rem;\n border: 1px solid var(--gray-700);\n }\n \n .preview-text {\n font-family: monospace;\n font-size: 0.875rem;\n color: var(--mj-blue);\n }\n \n .editor-footer {\n padding: 1rem 1.5rem;\n border-top: 1px solid var(--gray-700);\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n background: var(--gray-600);\n }\n "] }]
|
|
174
|
+
}], null, { connection: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}], save: [{
|
|
177
|
+
type: Output
|
|
178
|
+
}], cancel: [{
|
|
179
|
+
type: Output
|
|
180
|
+
}] }); })();
|
|
181
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SimpleConditionEditorComponent, { className: "SimpleConditionEditorComponent", filePath: "src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/simple-condition-editor/simple-condition-editor.component.ts", lineNumber: 160 }); })();
|
|
182
|
+
//# sourceMappingURL=simple-condition-editor.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-condition-editor.component.js","sourceRoot":"","sources":["../../../../../../../../src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/simple-condition-editor/simple-condition-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAU,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA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;YAArB,4GAAS,cAAU,IAAC;YACpB,yBACF;YAEJ,AADE,AADE,iBAAS,EACL,EACF;;YAnCE,gBAA2B;YAA3B,uCAA2B;YAL3B,2CAAyB;YACzB,mDAA6B;YAG7B,sCAAwB;YAUxB,eAA2B;YAA3B,uCAA2B;YAF3B,kDAA4B;YASD,eAAkB;YAAlB,sCAAkB;YAQ/C,eAAwB;YAAxB,sCAAwB;YAMxB,eAAkB;YAAlB,gCAAkB;4BAjDhB,YAAY,EAAE,WAAW,EAAE,eAAe,4BAAE,YAAY,uBAAE,aAAa;;iFAoJtE,8BAA8B;cAvJ1C,SAAS;2BACE,6BAA6B,cAC3B,IAAI,WACP,CAAC,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,CAAC,YACxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDT;gBA8FQ,UAAU;kBAAlB,KAAK;YACI,IAAI;kBAAb,MAAM;YACG,MAAM;kBAAf,MAAM;;kFAHI,8BAA8B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Step } from '../../models/step.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class StepComponent {
|
|
5
|
+
step: Step;
|
|
6
|
+
selected: boolean;
|
|
7
|
+
executing: boolean;
|
|
8
|
+
stepSelected: EventEmitter<Step>;
|
|
9
|
+
stepDeleted: EventEmitter<Step>;
|
|
10
|
+
stepUpdated: EventEmitter<Step>;
|
|
11
|
+
socketMouseDown: EventEmitter<{
|
|
12
|
+
event: MouseEvent;
|
|
13
|
+
step: Step;
|
|
14
|
+
type: string;
|
|
15
|
+
}>;
|
|
16
|
+
socketMouseEnter: EventEmitter<{
|
|
17
|
+
event: MouseEvent;
|
|
18
|
+
step: Step;
|
|
19
|
+
type: string;
|
|
20
|
+
}>;
|
|
21
|
+
socketMouseLeave: EventEmitter<MouseEvent>;
|
|
22
|
+
get selectedOption(): import("../../models/step.model").StepOption | null;
|
|
23
|
+
onDelete(event: Event): void;
|
|
24
|
+
onOptionChange(option: any): void;
|
|
25
|
+
onSocketMouseDown(event: MouseEvent, type: string): void;
|
|
26
|
+
onSocketMouseEnter(event: MouseEvent, type: string): void;
|
|
27
|
+
onSocketMouseLeave(event: MouseEvent): void;
|
|
28
|
+
onStepClick(event: MouseEvent): void;
|
|
29
|
+
getStepIcon(): string;
|
|
30
|
+
getStepIconColor(): string;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StepComponent, never>;
|
|
32
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StepComponent, "app-step", never, { "step": { "alias": "step"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "executing": { "alias": "executing"; "required": false; }; }, { "stepSelected": "stepSelected"; "stepDeleted": "stepDeleted"; "stepUpdated": "stepUpdated"; "socketMouseDown": "socketMouseDown"; "socketMouseEnter": "socketMouseEnter"; "socketMouseLeave": "socketMouseLeave"; }, never, never, true, never>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=step.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step.component.d.ts","sourceRoot":"","sources":["../../../../../../../../src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/step/step.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,eAAe,CAAC;AAIvE,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;;AAE/C,qBAsNa,aAAa;IACf,IAAI,EAAG,IAAI,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAS;IAC1B,SAAS,EAAE,OAAO,CAAS;IAC1B,YAAY,qBAA4B;IACxC,WAAW,qBAA4B;IACvC,WAAW,qBAA4B;IACvC,eAAe;eAA4B,UAAU;cAAQ,IAAI;cAAQ,MAAM;OAAK;IACpF,gBAAgB;eAA4B,UAAU;cAAQ,IAAI;cAAQ,MAAM;OAAK;IACrF,gBAAgB,2BAAkC;IAE5D,IAAI,cAAc,wDAGjB;IAED,QAAQ,CAAC,KAAK,EAAE,KAAK;IAKrB,cAAc,CAAC,MAAM,EAAE,GAAG;IAO1B,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM;IAMjD,kBAAkB,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM;IAIlD,kBAAkB,CAAC,KAAK,EAAE,UAAU;IAIpC,WAAW,CAAC,KAAK,EAAE,UAAU;IAK7B,WAAW,IAAI,MAAM;IAcrB,gBAAgB,IAAI,MAAM;yCA7Df,aAAa;2CAAb,aAAa;CA0EzB"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@progress/kendo-angular-dropdowns";
|
|
7
|
+
export class StepComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.selected = false;
|
|
10
|
+
this.executing = false;
|
|
11
|
+
this.stepSelected = new EventEmitter();
|
|
12
|
+
this.stepDeleted = new EventEmitter();
|
|
13
|
+
this.stepUpdated = new EventEmitter();
|
|
14
|
+
this.socketMouseDown = new EventEmitter();
|
|
15
|
+
this.socketMouseEnter = new EventEmitter();
|
|
16
|
+
this.socketMouseLeave = new EventEmitter();
|
|
17
|
+
}
|
|
18
|
+
get selectedOption() {
|
|
19
|
+
if (!this.step.selectedOption)
|
|
20
|
+
return null;
|
|
21
|
+
return this.step.config.options.find(opt => opt.value === this.step.selectedOption) || null;
|
|
22
|
+
}
|
|
23
|
+
onDelete(event) {
|
|
24
|
+
event.stopPropagation();
|
|
25
|
+
this.stepDeleted.emit(this.step);
|
|
26
|
+
}
|
|
27
|
+
onOptionChange(option) {
|
|
28
|
+
if (option) {
|
|
29
|
+
this.step.selectedOption = option.value;
|
|
30
|
+
this.stepUpdated.emit(this.step);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
onSocketMouseDown(event, type) {
|
|
34
|
+
event.stopPropagation();
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
this.socketMouseDown.emit({ event, step: this.step, type });
|
|
37
|
+
}
|
|
38
|
+
onSocketMouseEnter(event, type) {
|
|
39
|
+
this.socketMouseEnter.emit({ event, step: this.step, type });
|
|
40
|
+
}
|
|
41
|
+
onSocketMouseLeave(event) {
|
|
42
|
+
this.socketMouseLeave.emit(event);
|
|
43
|
+
}
|
|
44
|
+
onStepClick(event) {
|
|
45
|
+
event.stopPropagation();
|
|
46
|
+
this.stepSelected.emit(this.step);
|
|
47
|
+
}
|
|
48
|
+
getStepIcon() {
|
|
49
|
+
// Return icon class based on step type
|
|
50
|
+
switch (this.step.type) {
|
|
51
|
+
case 'prompt':
|
|
52
|
+
return 'fas fa-comment-dots'; // Chat bubble for prompts
|
|
53
|
+
case 'action':
|
|
54
|
+
return 'fas fa-bolt'; // Lightning bolt for actions
|
|
55
|
+
case 'agent':
|
|
56
|
+
return 'fas fa-robot'; // Robot for sub-agents
|
|
57
|
+
default:
|
|
58
|
+
return 'fas fa-cog'; // Default gear icon
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
getStepIconColor() {
|
|
62
|
+
// Return color based on step type
|
|
63
|
+
switch (this.step.type) {
|
|
64
|
+
case 'prompt':
|
|
65
|
+
return '#3B82F6'; // Blue for prompts
|
|
66
|
+
case 'action':
|
|
67
|
+
return '#F59E0B'; // Amber for actions
|
|
68
|
+
case 'agent':
|
|
69
|
+
return '#8B5CF6'; // Purple for sub-agents
|
|
70
|
+
default:
|
|
71
|
+
return '#6B7280'; // Gray default
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
static { this.ɵfac = function StepComponent_Factory(t) { return new (t || StepComponent)(); }; }
|
|
75
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: StepComponent, selectors: [["app-step"]], inputs: { step: "step", selected: "selected", executing: "executing" }, outputs: { stepSelected: "stepSelected", stepDeleted: "stepDeleted", stepUpdated: "stepUpdated", socketMouseDown: "socketMouseDown", socketMouseEnter: "socketMouseEnter", socketMouseLeave: "socketMouseLeave" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 13, vars: 13, consts: [[1, "step", 3, "click"], [1, "step-header"], [1, "step-title"], [1, "step-actions"], ["title", "Delete Step", 1, "icon-button", "small", 3, "click"], [1, "fas", "fa-times"], [1, "step-content"], ["textField", "name", "valueField", "value", 1, "step-dropdown", 3, "valueChange", "data", "value", "placeholder", "valuePrimitive"], [1, "socket", "input", 3, "mousedown", "mouseenter", "mouseleave"], [1, "socket", "output", 3, "mousedown", "mouseenter", "mouseleave"]], template: function StepComponent_Template(rf, ctx) { if (rf & 1) {
|
|
76
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
77
|
+
i0.ɵɵlistener("click", function StepComponent_Template_div_click_0_listener($event) { return ctx.onStepClick($event); });
|
|
78
|
+
i0.ɵɵelementStart(1, "div", 1)(2, "div", 2);
|
|
79
|
+
i0.ɵɵelement(3, "i");
|
|
80
|
+
i0.ɵɵelementStart(4, "span");
|
|
81
|
+
i0.ɵɵtext(5);
|
|
82
|
+
i0.ɵɵelementEnd()();
|
|
83
|
+
i0.ɵɵelementStart(6, "div", 3)(7, "button", 4);
|
|
84
|
+
i0.ɵɵlistener("click", function StepComponent_Template_button_click_7_listener($event) { return ctx.onDelete($event); });
|
|
85
|
+
i0.ɵɵelement(8, "i", 5);
|
|
86
|
+
i0.ɵɵelementEnd()()();
|
|
87
|
+
i0.ɵɵelementStart(9, "div", 6)(10, "kendo-combobox", 7);
|
|
88
|
+
i0.ɵɵlistener("valueChange", function StepComponent_Template_kendo_combobox_valueChange_10_listener($event) { return ctx.onOptionChange($event); });
|
|
89
|
+
i0.ɵɵelementEnd()();
|
|
90
|
+
i0.ɵɵelementStart(11, "div", 8);
|
|
91
|
+
i0.ɵɵlistener("mousedown", function StepComponent_Template_div_mousedown_11_listener($event) { return ctx.onSocketMouseDown($event, "input"); })("mouseenter", function StepComponent_Template_div_mouseenter_11_listener($event) { return ctx.onSocketMouseEnter($event, "input"); })("mouseleave", function StepComponent_Template_div_mouseleave_11_listener($event) { return ctx.onSocketMouseLeave($event); });
|
|
92
|
+
i0.ɵɵelementEnd();
|
|
93
|
+
i0.ɵɵelementStart(12, "div", 9);
|
|
94
|
+
i0.ɵɵlistener("mousedown", function StepComponent_Template_div_mousedown_12_listener($event) { return ctx.onSocketMouseDown($event, "output"); })("mouseenter", function StepComponent_Template_div_mouseenter_12_listener($event) { return ctx.onSocketMouseEnter($event, "output"); })("mouseleave", function StepComponent_Template_div_mouseleave_12_listener($event) { return ctx.onSocketMouseLeave($event); });
|
|
95
|
+
i0.ɵɵelementEnd()();
|
|
96
|
+
} if (rf & 2) {
|
|
97
|
+
i0.ɵɵclassProp("selected", ctx.selected)("executing", ctx.executing);
|
|
98
|
+
i0.ɵɵadvance(3);
|
|
99
|
+
i0.ɵɵclassMap(ctx.getStepIcon());
|
|
100
|
+
i0.ɵɵstyleProp("color", ctx.getStepIconColor());
|
|
101
|
+
i0.ɵɵadvance(2);
|
|
102
|
+
i0.ɵɵtextInterpolate(ctx.step.name);
|
|
103
|
+
i0.ɵɵadvance(5);
|
|
104
|
+
i0.ɵɵproperty("data", ctx.step.config.options)("value", ctx.selectedOption)("placeholder", "Select " + ctx.step.config.name + "...")("valuePrimitive", false);
|
|
105
|
+
} }, dependencies: [CommonModule, FormsModule, DropDownsModule, i1.ComboBoxComponent], styles: [".step[_ngcontent-%COMP%] {\n width: 320px;\n height: 140px;\n position: relative;\n background: var(--white-color);\n border: 1px solid var(--gray-700);\n border-radius: var(--border-radius);\n transition: all var(--transition-time);\n box-shadow: var(--shadow);\n overflow: visible; \n\n }\n\n .step[_ngcontent-%COMP%]:hover {\n box-shadow: 0 6px 16px rgba(0,0,0,0.2);\n transform: translateY(-2px);\n }\n\n .step.selected[_ngcontent-%COMP%] {\n border-color: var(--mj-blue);\n box-shadow: 0 0 0 3px rgba(0, 118, 182, 0.25);\n }\n\n .step.executing[_ngcontent-%COMP%] {\n animation: _ngcontent-%COMP%_pulse-border 1.5s infinite;\n border-color: #28a745;\n box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);\n }\n\n @keyframes _ngcontent-%COMP%_pulse-border {\n 0% {\n box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);\n }\n 50% {\n box-shadow: 0 0 0 6px rgba(40, 167, 69, 0.1);\n }\n 100% {\n box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);\n }\n }\n\n .step-header[_ngcontent-%COMP%] {\n padding: 0.75rem 1rem;\n border-bottom: 1px solid var(--gray-700);\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: var(--gray-600);\n border-radius: calc(var(--border-radius) - 2px) calc(var(--border-radius) - 2px) 0 0;\n overflow: hidden; \n\n }\n\n .step-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n font-weight: 600;\n font-size: 0.875rem;\n flex: 1;\n overflow: hidden;\n }\n \n .step-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .step-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 0.25rem;\n }\n\n .step-content[_ngcontent-%COMP%] {\n padding: 1rem;\n height: calc(100% - 41px); \n\n display: flex;\n align-items: center;\n }\n\n .step-dropdown[_ngcontent-%COMP%] {\n width: 100%;\n margin: 0.5rem 0;\n }\n \n [_nghost-%COMP%] .k-combobox {\n width: 100%;\n border-radius: 0.5rem;\n border-color: var(--gray-700);\n transition: all var(--transition-time);\n }\n \n [_nghost-%COMP%] .k-combobox:hover {\n border-color: var(--mj-blue);\n }\n \n [_nghost-%COMP%] .k-combobox.k-focus {\n border-color: var(--mj-blue);\n box-shadow: 0 0 0 3px rgba(0, 118, 182, 0.25);\n }\n\n .socket[_ngcontent-%COMP%] {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n height: 16px;\n border: 2px solid var(--white-color);\n border-radius: 50%;\n background: var(--gray-800);\n z-index: 10;\n box-shadow: var(--shadow);\n cursor: crosshair;\n transition: all var(--transition-time);\n }\n\n .socket.input[_ngcontent-%COMP%] {\n left: -8px;\n }\n\n .socket.output[_ngcontent-%COMP%] {\n right: -8px;\n }\n\n .socket[_ngcontent-%COMP%]:hover {\n background: var(--mj-blue);\n transform: translateY(-50%) scale(1.2);\n box-shadow: 0 3px 6px rgba(0,0,0,0.3);\n }\n \n .socket.connecting[_ngcontent-%COMP%] {\n background: #28a745;\n animation: _ngcontent-%COMP%_pulse 1s infinite;\n }\n \n @keyframes _ngcontent-%COMP%_pulse {\n 0% { transform: translateY(-50%) scale(1); }\n 50% { transform: translateY(-50%) scale(1.3); }\n 100% { transform: translateY(-50%) scale(1); }\n }\n\n .icon-button[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: var(--gray-800);\n cursor: pointer;\n transition: all var(--transition-time);\n font-size: 0.75rem;\n }\n\n .icon-button[_ngcontent-%COMP%]:hover {\n background: var(--gray-700);\n color: var(--gray-900);\n }\n\n .icon-button.small[_ngcontent-%COMP%] {\n width: 20px;\n height: 20px;\n font-size: 0.625rem;\n }"] }); }
|
|
106
|
+
}
|
|
107
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(StepComponent, [{
|
|
108
|
+
type: Component,
|
|
109
|
+
args: [{ selector: 'app-step', standalone: true, imports: [CommonModule, FormsModule, DropDownsModule], template: `
|
|
110
|
+
<div class="step" [class.selected]="selected" [class.executing]="executing" (click)="onStepClick($event)">
|
|
111
|
+
<div class="step-header">
|
|
112
|
+
<div class="step-title">
|
|
113
|
+
<i [class]="getStepIcon()" [style.color]="getStepIconColor()"></i>
|
|
114
|
+
<span>{{ step.name }}</span>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="step-actions">
|
|
117
|
+
<button
|
|
118
|
+
class="icon-button small"
|
|
119
|
+
(click)="onDelete($event)"
|
|
120
|
+
title="Delete Step">
|
|
121
|
+
<i class="fas fa-times"></i>
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<div class="step-content">
|
|
127
|
+
<kendo-combobox
|
|
128
|
+
[data]="step.config.options"
|
|
129
|
+
[value]="selectedOption"
|
|
130
|
+
[placeholder]="'Select ' + step.config.name + '...'"
|
|
131
|
+
textField="name"
|
|
132
|
+
valueField="value"
|
|
133
|
+
[valuePrimitive]="false"
|
|
134
|
+
(valueChange)="onOptionChange($event)"
|
|
135
|
+
class="step-dropdown">
|
|
136
|
+
</kendo-combobox>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="socket input"
|
|
140
|
+
(mousedown)="onSocketMouseDown($event, 'input')"
|
|
141
|
+
(mouseenter)="onSocketMouseEnter($event, 'input')"
|
|
142
|
+
(mouseleave)="onSocketMouseLeave($event)">
|
|
143
|
+
</div>
|
|
144
|
+
<div class="socket output"
|
|
145
|
+
(mousedown)="onSocketMouseDown($event, 'output')"
|
|
146
|
+
(mouseenter)="onSocketMouseEnter($event, 'output')"
|
|
147
|
+
(mouseleave)="onSocketMouseLeave($event)">
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
`, styles: ["\n .step {\n width: 320px;\n height: 140px;\n position: relative;\n background: var(--white-color);\n border: 1px solid var(--gray-700);\n border-radius: var(--border-radius);\n transition: all var(--transition-time);\n box-shadow: var(--shadow);\n overflow: visible; /* Changed to visible so sockets can extend outside */\n }\n\n .step:hover {\n box-shadow: 0 6px 16px rgba(0,0,0,0.2);\n transform: translateY(-2px);\n }\n\n .step.selected {\n border-color: var(--mj-blue);\n box-shadow: 0 0 0 3px rgba(0, 118, 182, 0.25);\n }\n\n .step.executing {\n animation: pulse-border 1.5s infinite;\n border-color: #28a745;\n box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);\n }\n\n @keyframes pulse-border {\n 0% {\n box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);\n }\n 50% {\n box-shadow: 0 0 0 6px rgba(40, 167, 69, 0.1);\n }\n 100% {\n box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);\n }\n }\n\n .step-header {\n padding: 0.75rem 1rem;\n border-bottom: 1px solid var(--gray-700);\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: var(--gray-600);\n border-radius: calc(var(--border-radius) - 2px) calc(var(--border-radius) - 2px) 0 0;\n overflow: hidden; /* Keep text from overflowing */\n }\n\n .step-title {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n font-weight: 600;\n font-size: 0.875rem;\n flex: 1;\n overflow: hidden;\n }\n \n .step-title span {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .step-actions {\n display: flex;\n gap: 0.25rem;\n }\n\n .step-content {\n padding: 1rem;\n height: calc(100% - 41px); /* Subtract header height */\n display: flex;\n align-items: center;\n }\n\n .step-dropdown {\n width: 100%;\n margin: 0.5rem 0;\n }\n \n :host ::ng-deep .k-combobox {\n width: 100%;\n border-radius: 0.5rem;\n border-color: var(--gray-700);\n transition: all var(--transition-time);\n }\n \n :host ::ng-deep .k-combobox:hover {\n border-color: var(--mj-blue);\n }\n \n :host ::ng-deep .k-combobox.k-focus {\n border-color: var(--mj-blue);\n box-shadow: 0 0 0 3px rgba(0, 118, 182, 0.25);\n }\n\n .socket {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n height: 16px;\n border: 2px solid var(--white-color);\n border-radius: 50%;\n background: var(--gray-800);\n z-index: 10;\n box-shadow: var(--shadow);\n cursor: crosshair;\n transition: all var(--transition-time);\n }\n\n .socket.input {\n left: -8px;\n }\n\n .socket.output {\n right: -8px;\n }\n\n .socket:hover {\n background: var(--mj-blue);\n transform: translateY(-50%) scale(1.2);\n box-shadow: 0 3px 6px rgba(0,0,0,0.3);\n }\n \n .socket.connecting {\n background: #28a745;\n animation: pulse 1s infinite;\n }\n \n @keyframes pulse {\n 0% { transform: translateY(-50%) scale(1); }\n 50% { transform: translateY(-50%) scale(1.3); }\n 100% { transform: translateY(-50%) scale(1); }\n }\n\n .icon-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: var(--gray-800);\n cursor: pointer;\n transition: all var(--transition-time);\n font-size: 0.75rem;\n }\n\n .icon-button:hover {\n background: var(--gray-700);\n color: var(--gray-900);\n }\n\n .icon-button.small {\n width: 20px;\n height: 20px;\n font-size: 0.625rem;\n }\n "] }]
|
|
151
|
+
}], null, { step: [{
|
|
152
|
+
type: Input
|
|
153
|
+
}], selected: [{
|
|
154
|
+
type: Input
|
|
155
|
+
}], executing: [{
|
|
156
|
+
type: Input
|
|
157
|
+
}], stepSelected: [{
|
|
158
|
+
type: Output
|
|
159
|
+
}], stepDeleted: [{
|
|
160
|
+
type: Output
|
|
161
|
+
}], stepUpdated: [{
|
|
162
|
+
type: Output
|
|
163
|
+
}], socketMouseDown: [{
|
|
164
|
+
type: Output
|
|
165
|
+
}], socketMouseEnter: [{
|
|
166
|
+
type: Output
|
|
167
|
+
}], socketMouseLeave: [{
|
|
168
|
+
type: Output
|
|
169
|
+
}] }); })();
|
|
170
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(StepComponent, { className: "StepComponent", filePath: "src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/step/step.component.ts", lineNumber: 221 }); })();
|
|
171
|
+
//# sourceMappingURL=step.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step.component.js","sourceRoot":"","sources":["../../../../../../../../src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/step/step.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;;;AAyNpE,MAAM,OAAO,aAAa;IAtN1B;QAwNW,aAAQ,GAAY,KAAK,CAAC;QAC1B,cAAS,GAAY,KAAK,CAAC;QAC1B,iBAAY,GAAG,IAAI,YAAY,EAAQ,CAAC;QACxC,gBAAW,GAAG,IAAI,YAAY,EAAQ,CAAC;QACvC,gBAAW,GAAG,IAAI,YAAY,EAAQ,CAAC;QACvC,oBAAe,GAAG,IAAI,YAAY,EAAiD,CAAC;QACpF,qBAAgB,GAAG,IAAI,YAAY,EAAiD,CAAC;QACrF,qBAAgB,GAAG,IAAI,YAAY,EAAc,CAAC;KAiE7D;IA/DC,IAAI,cAAc;QAChB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc;YAAE,OAAO,IAAI,CAAC;QAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC;IAC9F,CAAC;IAED,QAAQ,CAAC,KAAY;QACnB,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,cAAc,CAAC,MAAW;QACxB,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,I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,IAAI;kBAAZ,KAAK;YACG,QAAQ;kBAAhB,KAAK;YACG,SAAS;kBAAjB,KAAK;YACI,YAAY;kBAArB,MAAM;YACG,WAAW;kBAApB,MAAM;YACG,WAAW;kBAApB,MAAM;YACG,eAAe;kBAAxB,MAAM;YACG,gBAAgB;kBAAzB,MAAM;YACG,gBAAgB;kBAAzB,MAAM;;kFATI,aAAa"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { StepType } from '../../models/step.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ToolbarComponent {
|
|
5
|
+
runFlow: EventEmitter<void>;
|
|
6
|
+
stepTypes: {
|
|
7
|
+
key: StepType;
|
|
8
|
+
config: import("../../models/step.model").StepTypeConfig;
|
|
9
|
+
}[];
|
|
10
|
+
constructor();
|
|
11
|
+
onDragStart(event: DragEvent, type: StepType): void;
|
|
12
|
+
onDragEnd(event: DragEvent): void;
|
|
13
|
+
onRunFlow(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarComponent, "app-toolbar", never, {}, { "runFlow": "runFlow"; }, never, never, true, never>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=toolbar.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.component.d.ts","sourceRoot":"","sources":["../../../../../../../../src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/toolbar/toolbar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAU,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAgB,QAAQ,EAAE,MAAM,yBAAyB,CAAC;;AAEjE,qBAOa,gBAAgB;IACjB,OAAO,qBAA4B;IAE7C,SAAS;;;QAGL;;IAIJ,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ;IAS5C,SAAS,CAAC,KAAK,EAAE,SAAS;IAK1B,SAAS;yCAxBE,gBAAgB;2CAAhB,gBAAgB;CA2B5B"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Component, EventEmitter, Output } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { STEP_CONFIGS } from '../../models/step.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
function ToolbarComponent_button_9_Template(rf, ctx) { if (rf & 1) {
|
|
7
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
8
|
+
i0.ɵɵelementStart(0, "button", 11);
|
|
9
|
+
i0.ɵɵlistener("dragstart", function ToolbarComponent_button_9_Template_button_dragstart_0_listener($event) { const stepType_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragStart($event, stepType_r2.key)); })("dragend", function ToolbarComponent_button_9_Template_button_dragend_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onDragEnd($event)); });
|
|
10
|
+
i0.ɵɵelement(1, "i", 12);
|
|
11
|
+
i0.ɵɵelementStart(2, "span");
|
|
12
|
+
i0.ɵɵtext(3);
|
|
13
|
+
i0.ɵɵelementEnd()();
|
|
14
|
+
} if (rf & 2) {
|
|
15
|
+
const stepType_r2 = ctx.$implicit;
|
|
16
|
+
i0.ɵɵstyleProp("border-color", stepType_r2.config.color)("background-color", stepType_r2.config.color + "10");
|
|
17
|
+
i0.ɵɵadvance();
|
|
18
|
+
i0.ɵɵstyleProp("color", stepType_r2.config.color);
|
|
19
|
+
i0.ɵɵproperty("ngClass", stepType_r2.config.icon);
|
|
20
|
+
i0.ɵɵadvance(2);
|
|
21
|
+
i0.ɵɵtextInterpolate(stepType_r2.config.name);
|
|
22
|
+
} }
|
|
23
|
+
export class ToolbarComponent {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.runFlow = new EventEmitter();
|
|
26
|
+
this.stepTypes = Object.entries(STEP_CONFIGS).map(([key, config]) => ({
|
|
27
|
+
key: key,
|
|
28
|
+
config
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
onDragStart(event, type) {
|
|
32
|
+
const element = event.target;
|
|
33
|
+
element.classList.add('dragging');
|
|
34
|
+
event.dataTransfer.effectAllowed = 'copy';
|
|
35
|
+
event.dataTransfer.setData('text/plain', `step:${type}`);
|
|
36
|
+
event.dataTransfer.setData('stepType', type);
|
|
37
|
+
}
|
|
38
|
+
onDragEnd(event) {
|
|
39
|
+
const element = event.target;
|
|
40
|
+
element.classList.remove('dragging');
|
|
41
|
+
}
|
|
42
|
+
onRunFlow() {
|
|
43
|
+
this.runFlow.emit();
|
|
44
|
+
}
|
|
45
|
+
static { this.ɵfac = function ToolbarComponent_Factory(t) { return new (t || ToolbarComponent)(); }; }
|
|
46
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ToolbarComponent, selectors: [["app-toolbar"]], outputs: { runFlow: "runFlow" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 18, vars: 1, consts: [[1, "toolbar"], [1, "toolbar-header"], [1, "toolbar-title"], [1, "fas", "fa-toolbox"], [1, "toolbar-section"], [1, "section-title"], [1, "steps-grid"], ["class", "toolbar-item step-item", "draggable", "true", 3, "border-color", "background-color", "dragstart", "dragend", 4, "ngFor", "ngForOf"], [1, "action-buttons"], ["title", "Run the current flow", 1, "action-button", "run-button", 3, "click"], [1, "fas", "fa-play"], ["draggable", "true", 1, "toolbar-item", "step-item", 3, "dragstart", "dragend"], [1, "fas", 3, "ngClass"]], template: function ToolbarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h3", 2);
|
|
48
|
+
i0.ɵɵelement(3, "i", 3);
|
|
49
|
+
i0.ɵɵtext(4, " Steps ");
|
|
50
|
+
i0.ɵɵelementEnd()();
|
|
51
|
+
i0.ɵɵelementStart(5, "div", 4)(6, "h4", 5);
|
|
52
|
+
i0.ɵɵtext(7, "Drag to add steps");
|
|
53
|
+
i0.ɵɵelementEnd();
|
|
54
|
+
i0.ɵɵelementStart(8, "div", 6);
|
|
55
|
+
i0.ɵɵtemplate(9, ToolbarComponent_button_9_Template, 4, 8, "button", 7);
|
|
56
|
+
i0.ɵɵelementEnd()();
|
|
57
|
+
i0.ɵɵelementStart(10, "div", 4)(11, "h4", 5);
|
|
58
|
+
i0.ɵɵtext(12, "Flow Actions");
|
|
59
|
+
i0.ɵɵelementEnd();
|
|
60
|
+
i0.ɵɵelementStart(13, "div", 8)(14, "button", 9);
|
|
61
|
+
i0.ɵɵlistener("click", function ToolbarComponent_Template_button_click_14_listener() { return ctx.onRunFlow(); });
|
|
62
|
+
i0.ɵɵelement(15, "i", 10);
|
|
63
|
+
i0.ɵɵelementStart(16, "span");
|
|
64
|
+
i0.ɵɵtext(17, "Run Flow");
|
|
65
|
+
i0.ɵɵelementEnd()()()()();
|
|
66
|
+
} if (rf & 2) {
|
|
67
|
+
i0.ɵɵadvance(9);
|
|
68
|
+
i0.ɵɵproperty("ngForOf", ctx.stepTypes);
|
|
69
|
+
} }, dependencies: [CommonModule, i1.NgClass, i1.NgForOf], styles: [".toolbar[_ngcontent-%COMP%] {\n height: 100%;\n background: var(--white-color);\n border-right: 1px solid var(--gray-700);\n overflow-y: auto;\n box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);\n}\n\n.toolbar-header[_ngcontent-%COMP%] {\n padding: 1.5rem;\n border-bottom: 1px solid var(--gray-700);\n background: var(--gray-600);\n}\n\n.toolbar-title[_ngcontent-%COMP%] {\n font-size: 1.25rem;\n font-weight: 600;\n margin: 0;\n color: var(--gray-900);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n \n i {\n color: var(--mj-blue);\n }\n}\n\n.toolbar-section[_ngcontent-%COMP%] {\n padding: 1rem;\n}\n\n.section-title[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n font-weight: 600;\n color: var(--gray-800);\n text-transform: uppercase;\n margin: 0 0 1rem 0;\n}\n\n.steps-grid[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n}\n\n.toolbar-item[_ngcontent-%COMP%] {\n width: 100%;\n display: flex;\n align-items: center;\n gap: 0.75rem;\n padding: 0.75rem 1rem;\n border: 2px solid var(--gray-700);\n background: var(--white-color);\n border-radius: 0.5rem;\n cursor: move;\n transition: all var(--transition-time);\n font-size: 0.875rem;\n text-align: left;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n \n &:hover {\n transform: translateX(4px);\n box-shadow: var(--shadow);\n }\n \n &.dragging {\n opacity: 0.5;\n }\n \n &.step-item {\n border-width: 2px;\n font-weight: 500;\n }\n \n i {\n font-size: 1rem;\n }\n}\n\n.divider[_ngcontent-%COMP%] {\n height: 1px;\n background: #e9ecef;\n margin: 0 1rem;\n}\n\n.action-buttons[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n margin-top: 0.5rem;\n}\n\n.action-button[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 0.75rem 1rem;\n border: 1px solid var(--gray-700);\n background: var(--white-color);\n border-radius: var(--border-radius);\n cursor: pointer;\n font-size: 0.875rem;\n font-weight: 500;\n transition: all var(--transition-time);\n \n &:hover {\n background: var(--gray-600);\n border-color: var(--gray-800);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n }\n \n &.run-button {\n background: var(--mj-blue);\n color: white;\n border-color: var(--mj-blue);\n \n &:hover {\n background: #005a8b;\n border-color: #005a8b;\n }\n \n i {\n font-size: 1rem;\n }\n }\n}"] }); }
|
|
70
|
+
}
|
|
71
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ToolbarComponent, [{
|
|
72
|
+
type: Component,
|
|
73
|
+
args: [{ selector: 'app-toolbar', standalone: true, imports: [CommonModule], template: "<div class=\"toolbar\">\n <div class=\"toolbar-header\">\n <h3 class=\"toolbar-title\">\n <i class=\"fas fa-toolbox\"></i> Steps\n </h3>\n </div>\n \n <div class=\"toolbar-section\">\n <h4 class=\"section-title\">Drag to add steps</h4>\n <div class=\"steps-grid\">\n <button \n *ngFor=\"let stepType of stepTypes\"\n class=\"toolbar-item step-item\"\n [style.border-color]=\"stepType.config.color\"\n [style.background-color]=\"stepType.config.color + '10'\"\n draggable=\"true\"\n (dragstart)=\"onDragStart($event, stepType.key)\"\n (dragend)=\"onDragEnd($event)\">\n <i class=\"fas\" [ngClass]=\"stepType.config.icon\" [style.color]=\"stepType.config.color\"></i>\n <span>{{ stepType.config.name }}</span>\n </button>\n </div>\n </div>\n \n <div class=\"toolbar-section\">\n <h4 class=\"section-title\">Flow Actions</h4>\n <div class=\"action-buttons\">\n <button \n class=\"action-button run-button\"\n (click)=\"onRunFlow()\"\n title=\"Run the current flow\">\n <i class=\"fas fa-play\"></i>\n <span>Run Flow</span>\n </button>\n </div>\n </div>\n</div>", styles: [".toolbar {\n height: 100%;\n background: var(--white-color);\n border-right: 1px solid var(--gray-700);\n overflow-y: auto;\n box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);\n}\n\n.toolbar-header {\n padding: 1.5rem;\n border-bottom: 1px solid var(--gray-700);\n background: var(--gray-600);\n}\n\n.toolbar-title {\n font-size: 1.25rem;\n font-weight: 600;\n margin: 0;\n color: var(--gray-900);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n \n i {\n color: var(--mj-blue);\n }\n}\n\n.toolbar-section {\n padding: 1rem;\n}\n\n.section-title {\n font-size: 0.875rem;\n font-weight: 600;\n color: var(--gray-800);\n text-transform: uppercase;\n margin: 0 0 1rem 0;\n}\n\n.steps-grid {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n}\n\n.toolbar-item {\n width: 100%;\n display: flex;\n align-items: center;\n gap: 0.75rem;\n padding: 0.75rem 1rem;\n border: 2px solid var(--gray-700);\n background: var(--white-color);\n border-radius: 0.5rem;\n cursor: move;\n transition: all var(--transition-time);\n font-size: 0.875rem;\n text-align: left;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n \n &:hover {\n transform: translateX(4px);\n box-shadow: var(--shadow);\n }\n \n &.dragging {\n opacity: 0.5;\n }\n \n &.step-item {\n border-width: 2px;\n font-weight: 500;\n }\n \n i {\n font-size: 1rem;\n }\n}\n\n.divider {\n height: 1px;\n background: #e9ecef;\n margin: 0 1rem;\n}\n\n.action-buttons {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n margin-top: 0.5rem;\n}\n\n.action-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n padding: 0.75rem 1rem;\n border: 1px solid var(--gray-700);\n background: var(--white-color);\n border-radius: var(--border-radius);\n cursor: pointer;\n font-size: 0.875rem;\n font-weight: 500;\n transition: all var(--transition-time);\n \n &:hover {\n background: var(--gray-600);\n border-color: var(--gray-800);\n transform: translateY(-1px);\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n }\n \n &.run-button {\n background: var(--mj-blue);\n color: white;\n border-color: var(--mj-blue);\n \n &:hover {\n background: #005a8b;\n border-color: #005a8b;\n }\n \n i {\n font-size: 1rem;\n }\n }\n}\n\n"] }]
|
|
74
|
+
}], () => [], { runFlow: [{
|
|
75
|
+
type: Output
|
|
76
|
+
}] }); })();
|
|
77
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ToolbarComponent, { className: "ToolbarComponent", filePath: "src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/toolbar/toolbar.component.ts", lineNumber: 12 }); })();
|
|
78
|
+
//# sourceMappingURL=toolbar.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.component.js","sourceRoot":"","sources":["../../../../../../../../src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/toolbar/toolbar.component.ts","../../../../../../../../src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/components/toolbar/toolbar.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAY,MAAM,yBAAyB,CAAC;;;;;ICQ3D,kCAOgC;IAA9B,AADA,2NAAa,2CAAiC,KAAC,4KACpC,wBAAiB,KAAC;IAC7B,wBAA0F;IAC1F,4BAAM;IAAA,YAA0B;IAClC,AADkC,iBAAO,EAChC;;;IANP,AADA,wDAA4C,qDACW;IAIP,cAAqC;IAArC,iDAAqC;IAAtE,iDAAgC;IACzC,eAA0B;IAA1B,6CAA0B;;ADRxC,MAAM,OAAO,gBAAgB;IAQ3B;QAPU,YAAO,GAAG,IAAI,YAAY,EAAQ,CAAC;QAE7C,cAAS,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;YAC/D,GAAG,EAAE,GAAe;YACpB,MAAM;SACP,CAAC,CAAC,CAAC;IAEY,CAAC;IAEjB,WAAW,CAAC,KAAgB,EAAE,IAAc;QAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,MAAqB,CAAC;QAC5C,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAElC,KAAK,CAAC,YAAa,CAAC,aAAa,GAAG,MAAM,CAAC;QAC3C,KAAK,CAAC,YAAa,CAAC,OAAO,CAAC,YAAY,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;QAC1D,KAAK,CAAC,YAAa,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,SAAS,CAAC,KAAgB;QACxB,MAAM,OAAO,GAAG,KAAK,CAAC,MAAqB,CAAC;QAC5C,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAED,SAAS;QACP,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;iFA1BU,gBAAgB;oEAAhB,gBAAgB;YCTzB,AADF,AADF,8BAAqB,aACS,YACA;YACxB,uBAA8B;YAAC,uBACjC;YACF,AADE,iBAAK,EACD;YAGJ,AADF,8BAA6B,YACD;YAAA,iCAAiB;YAAA,iBAAK;YAChD,8BAAwB;YACtB,uEAOgC;YAKpC,AADE,iBAAM,EACF;YAGJ,AADF,+BAA6B,aACD;YAAA,6BAAY;YAAA,iBAAK;YAEzC,AADF,+BAA4B,iBAIK;YAD7B,8FAAS,eAAW,IAAC;YAErB,yBAA2B;YAC3B,6BAAM;YAAA,yBAAQ;YAItB,AADE,AADE,AADE,AADgB,iBAAO,EACd,EACL,EACF,EACF;;YAzBuB,eAAY;YAAZ,uCAAY;4BDJ7B,YAAY;;iFAIX,gBAAgB;cAP5B,SAAS;2BACE,aAAa,cACX,IAAI,WACP,CAAC,YAAY,CAAC;oBAKb,OAAO;kBAAhB,MAAM;;kFADI,gBAAgB"}
|
package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/connection.model.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface BooleanCondition {
|
|
2
|
+
expression: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Connection {
|
|
6
|
+
id: string;
|
|
7
|
+
source: number;
|
|
8
|
+
target: number;
|
|
9
|
+
sourceOutput: string;
|
|
10
|
+
targetInput: string;
|
|
11
|
+
condition?: BooleanCondition;
|
|
12
|
+
}
|
|
13
|
+
export declare const COMMON_CONDITIONS: {
|
|
14
|
+
expression: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}[];
|
|
17
|
+
//# sourceMappingURL=connection.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/connection.model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;AAGD,eAAO,MAAM,iBAAiB;;;GAQ7B,CAAC"}
|
package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/connection.model.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Common boolean conditions
|
|
2
|
+
export const COMMON_CONDITIONS = [
|
|
3
|
+
{ expression: 'success', label: 'Success' },
|
|
4
|
+
{ expression: 'error', label: 'Error' },
|
|
5
|
+
{ expression: 'completed', label: 'Completed' },
|
|
6
|
+
{ expression: 'failed', label: 'Failed' },
|
|
7
|
+
{ expression: 'timeout', label: 'Timeout' },
|
|
8
|
+
{ expression: 'true', label: 'True' },
|
|
9
|
+
{ expression: 'false', label: 'False' }
|
|
10
|
+
];
|
|
11
|
+
//# sourceMappingURL=connection.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.model.js","sourceRoot":"","sources":["../../../../../../../src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/connection.model.ts"],"names":[],"mappings":"AAcA,4BAA4B;AAC5B,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IAC3C,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IACvC,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;IAC/C,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACzC,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IAC3C,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IACrC,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;CACxC,CAAC"}
|
package/dist/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/mj-extended.model.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Step } from './step.model';
|
|
2
|
+
import { Connection } from './connection.model';
|
|
3
|
+
export interface MJStep extends Step {
|
|
4
|
+
mjEntityId?: string;
|
|
5
|
+
mjData?: {
|
|
6
|
+
startingStep?: boolean;
|
|
7
|
+
status?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface MJConnection extends Connection {
|
|
12
|
+
mjEntityId?: string;
|
|
13
|
+
mjPriority?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface MJAIAgentStepExtended {
|
|
16
|
+
PromptText?: string;
|
|
17
|
+
PromptType?: string;
|
|
18
|
+
PositionX?: number;
|
|
19
|
+
PositionY?: number;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=mj-extended.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mj-extended.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/custom/AIAgents/FlowAgentType/flow-editor-integration/models/mj-extended.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,MAAM,WAAW,MAAO,SAAQ,IAAI;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE;QACP,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAGD,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|