@operato/flow 9.0.0-beta.55 → 9.0.0-beta.61
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/CHANGELOG.md +17 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -5
- package/dist/src/api/tasks.d.ts +0 -7
- package/dist/src/api/tasks.js +0 -2517
- package/dist/src/api/tasks.js.map +0 -1
- package/dist/src/base/anchor-instance.d.ts +0 -30
- package/dist/src/base/anchor-instance.js +0 -82
- package/dist/src/base/anchor-instance.js.map +0 -1
- package/dist/src/base/flow-edge-instance.d.ts +0 -31
- package/dist/src/base/flow-edge-instance.js +0 -170
- package/dist/src/base/flow-edge-instance.js.map +0 -1
- package/dist/src/base/flow-node-abstract.d.ts +0 -49
- package/dist/src/base/flow-node-abstract.js +0 -199
- package/dist/src/base/flow-node-abstract.js.map +0 -1
- package/dist/src/components/flow-debug-panel.d.ts +0 -22
- package/dist/src/components/flow-debug-panel.js +0 -156
- package/dist/src/components/flow-debug-panel.js.map +0 -1
- package/dist/src/components/flow-executor.d.ts +0 -29
- package/dist/src/components/flow-executor.js +0 -88
- package/dist/src/components/flow-executor.js.map +0 -1
- package/dist/src/components/flow-options-builder.d.ts +0 -18
- package/dist/src/components/flow-options-builder.js +0 -145
- package/dist/src/components/flow-options-builder.js.map +0 -1
- package/dist/src/components/flow-properties-panel.d.ts +0 -22
- package/dist/src/components/flow-properties-panel.js +0 -232
- package/dist/src/components/flow-properties-panel.js.map +0 -1
- package/dist/src/components/flow-side-panel.d.ts +0 -9
- package/dist/src/components/flow-side-panel.js +0 -83
- package/dist/src/components/flow-side-panel.js.map +0 -1
- package/dist/src/components/flow-sidebar.d.ts +0 -7
- package/dist/src/components/flow-sidebar.js +0 -84
- package/dist/src/components/flow-sidebar.js.map +0 -1
- package/dist/src/components/flow-toolbar.d.ts +0 -15
- package/dist/src/components/flow-toolbar.js +0 -161
- package/dist/src/components/flow-toolbar.js.map +0 -1
- package/dist/src/components/property-editor.d.ts +0 -34
- package/dist/src/components/property-editor.js +0 -76
- package/dist/src/components/property-editor.js.map +0 -1
- package/dist/src/components/property-panel/data-mapper-popup.d.ts +0 -11
- package/dist/src/components/property-panel/data-mapper-popup.js +0 -86
- package/dist/src/components/property-panel/data-mapper-popup.js.map +0 -1
- package/dist/src/components/property-panel/task-selection-popup.d.ts +0 -10
- package/dist/src/components/property-panel/task-selection-popup.js +0 -106
- package/dist/src/components/property-panel/task-selection-popup.js.map +0 -1
- package/dist/src/context/flow-context.d.ts +0 -21
- package/dist/src/context/flow-context.js +0 -3
- package/dist/src/context/flow-context.js.map +0 -1
- package/dist/src/context/flow-debug-context.d.ts +0 -16
- package/dist/src/context/flow-debug-context.js +0 -3
- package/dist/src/context/flow-debug-context.js.map +0 -1
- package/dist/src/context/flow-edit-context.d.ts +0 -11
- package/dist/src/context/flow-edit-context.js +0 -3
- package/dist/src/context/flow-edit-context.js.map +0 -1
- package/dist/src/handlers/dnd-event-handler.d.ts +0 -9
- package/dist/src/handlers/dnd-event-handler.js +0 -41
- package/dist/src/handlers/dnd-event-handler.js.map +0 -1
- package/dist/src/handlers/flow-event-handler.d.ts +0 -20
- package/dist/src/handlers/flow-event-handler.js +0 -75
- package/dist/src/handlers/flow-event-handler.js.map +0 -1
- package/dist/src/handlers/keydown-event-handler.d.ts +0 -6
- package/dist/src/handlers/keydown-event-handler.js +0 -24
- package/dist/src/handlers/keydown-event-handler.js.map +0 -1
- package/dist/src/handlers/pointer-event-handler.d.ts +0 -9
- package/dist/src/handlers/pointer-event-handler.js +0 -118
- package/dist/src/handlers/pointer-event-handler.js.map +0 -1
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.js +0 -3
- package/dist/src/index.js.map +0 -1
- package/dist/src/nodes/decision.d.ts +0 -16
- package/dist/src/nodes/decision.js +0 -43
- package/dist/src/nodes/decision.js.map +0 -1
- package/dist/src/nodes/end-event.d.ts +0 -14
- package/dist/src/nodes/end-event.js +0 -47
- package/dist/src/nodes/end-event.js.map +0 -1
- package/dist/src/nodes/index.d.ts +0 -5
- package/dist/src/nodes/index.js +0 -19
- package/dist/src/nodes/index.js.map +0 -1
- package/dist/src/nodes/intermediate-event.d.ts +0 -14
- package/dist/src/nodes/intermediate-event.js +0 -52
- package/dist/src/nodes/intermediate-event.js.map +0 -1
- package/dist/src/nodes/iterator.d.ts +0 -12
- package/dist/src/nodes/iterator.js +0 -29
- package/dist/src/nodes/iterator.js.map +0 -1
- package/dist/src/nodes/select.d.ts +0 -17
- package/dist/src/nodes/select.js +0 -71
- package/dist/src/nodes/select.js.map +0 -1
- package/dist/src/nodes/start-event.d.ts +0 -15
- package/dist/src/nodes/start-event.js +0 -46
- package/dist/src/nodes/start-event.js.map +0 -1
- package/dist/src/nodes/subflow.d.ts +0 -12
- package/dist/src/nodes/subflow.js +0 -30
- package/dist/src/nodes/subflow.js.map +0 -1
- package/dist/src/nodes/task.d.ts +0 -17
- package/dist/src/nodes/task.js +0 -60
- package/dist/src/nodes/task.js.map +0 -1
- package/dist/src/ox-flow-editor.d.ts +0 -94
- package/dist/src/ox-flow-editor.js +0 -426
- package/dist/src/ox-flow-editor.js.map +0 -1
- package/dist/src/ox-flow-monitor.d.ts +0 -24
- package/dist/src/ox-flow-monitor.js +0 -117
- package/dist/src/ox-flow-monitor.js.map +0 -1
- package/dist/src/property-editors/ox-input-anchors.d.ts +0 -12
- package/dist/src/property-editors/ox-input-anchors.js +0 -163
- package/dist/src/property-editors/ox-input-anchors.js.map +0 -1
- package/dist/src/property-editors/ox-input-nodes.d.ts +0 -0
- package/dist/src/property-editors/ox-input-nodes.js +0 -2
- package/dist/src/property-editors/ox-input-nodes.js.map +0 -1
- package/dist/src/property-editors/ox-property-editor-anchors.d.ts +0 -6
- package/dist/src/property-editors/ox-property-editor-anchors.js +0 -25
- package/dist/src/property-editors/ox-property-editor-anchors.js.map +0 -1
- package/dist/src/property-editors/ox-property-editor-nodes.d.ts +0 -6
- package/dist/src/property-editors/ox-property-editor-nodes.js +0 -25
- package/dist/src/property-editors/ox-property-editor-nodes.js.map +0 -1
- package/dist/src/types.d.ts +0 -97
- package/dist/src/types.js +0 -2
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils/generate-mapping-scheme.d.ts +0 -6
- package/dist/src/utils/generate-mapping-scheme.js +0 -50
- package/dist/src/utils/generate-mapping-scheme.js.map +0 -1
- package/dist/stories/ox-flow-editor.stories.d.ts +0 -24
- package/dist/stories/ox-flow-editor.stories.js +0 -249
- package/dist/stories/ox-flow-editor.stories.js.map +0 -1
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { CSSResult, SVGTemplateResult } from 'lit';
|
|
2
|
-
import { FlowNode, Anchor, AnchorModel, FlowNodeModel, FlowDataSchema } from '../types';
|
|
3
|
-
import { PropertySpec } from '@operato/property-editor';
|
|
4
|
-
export declare abstract class FlowNodeAbstract implements FlowNode {
|
|
5
|
-
static get styles(): CSSResult;
|
|
6
|
-
static get commonOptionsSpec(): PropertySpec[];
|
|
7
|
-
abstract get type(): string;
|
|
8
|
-
abstract renderNode(): SVGTemplateResult;
|
|
9
|
-
abstract get anchorModels(): AnchorModel[];
|
|
10
|
-
private _selected;
|
|
11
|
-
protected model?: FlowNodeModel;
|
|
12
|
-
render(): SVGTemplateResult;
|
|
13
|
-
constructor(model: FlowNodeModel);
|
|
14
|
-
update(model: Partial<FlowNodeModel>): void;
|
|
15
|
-
updateOptions(options: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}): void;
|
|
18
|
-
get inputSchema(): FlowDataSchema;
|
|
19
|
-
get dataSourceSchema(): FlowDataSchema;
|
|
20
|
-
get outputSchema(): FlowDataSchema;
|
|
21
|
-
get optionsSpec(): PropertySpec[];
|
|
22
|
-
get id(): string;
|
|
23
|
-
get subtype(): string | undefined;
|
|
24
|
-
get label(): string;
|
|
25
|
-
get pos(): {
|
|
26
|
-
x: number;
|
|
27
|
-
y: number;
|
|
28
|
-
};
|
|
29
|
-
set pos(pos: {
|
|
30
|
-
x: number;
|
|
31
|
-
y: number;
|
|
32
|
-
});
|
|
33
|
-
get size(): {
|
|
34
|
-
w: number;
|
|
35
|
-
h: number;
|
|
36
|
-
};
|
|
37
|
-
get options(): {
|
|
38
|
-
[key: string]: any;
|
|
39
|
-
} | undefined;
|
|
40
|
-
get anchorsOption(): {
|
|
41
|
-
id: string;
|
|
42
|
-
[key: string]: any;
|
|
43
|
-
}[];
|
|
44
|
-
get anchors(): Anchor[];
|
|
45
|
-
get selected(): boolean;
|
|
46
|
-
set selected(selected: boolean);
|
|
47
|
-
findAnchor(id: string): Anchor | undefined;
|
|
48
|
-
applyAnchorsOption(defaultAnchorModel: AnchorModel): AnchorModel;
|
|
49
|
-
}
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { css, svg } from 'lit';
|
|
2
|
-
import { AnchorInstance } from './anchor-instance';
|
|
3
|
-
// Note!! Since this class is not a LitElement, I have kept the implementation minimal.
|
|
4
|
-
export class FlowNodeAbstract {
|
|
5
|
-
static get styles() {
|
|
6
|
-
return css `
|
|
7
|
-
g.node {
|
|
8
|
-
fill: #fff;
|
|
9
|
-
stroke: #000;
|
|
10
|
-
stroke-width: 1;
|
|
11
|
-
cursor: move;
|
|
12
|
-
|
|
13
|
-
--anchor-opacity: 0;
|
|
14
|
-
--node-stroke: #000;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
g.node:hover,
|
|
18
|
-
g.node.selected {
|
|
19
|
-
--anchor-opacity: 1;
|
|
20
|
-
--node-stroke: #007bff;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
g.node .node-outline {
|
|
24
|
-
stroke: var(--node-stroke);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
g.node .node-label {
|
|
28
|
-
font-size: 12px;
|
|
29
|
-
user-select: none;
|
|
30
|
-
fill: #000;
|
|
31
|
-
stroke: #000;
|
|
32
|
-
stroke-width: 1;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.anchor,
|
|
36
|
-
.anchor-label {
|
|
37
|
-
fill: var(--node-stroke);
|
|
38
|
-
stroke: none;
|
|
39
|
-
stroke-width: 1;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
transition:
|
|
42
|
-
fill 0.2s ease,
|
|
43
|
-
opacity 0.2s ease;
|
|
44
|
-
opacity: var(--anchor-opacity, 0);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.anchor:hover {
|
|
48
|
-
stroke: var(--node-stroke);
|
|
49
|
-
fill: #fff;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.anchor-label {
|
|
53
|
-
font-size: 10px;
|
|
54
|
-
pointer-events: none;
|
|
55
|
-
user-select: none;
|
|
56
|
-
}
|
|
57
|
-
`;
|
|
58
|
-
}
|
|
59
|
-
static get commonOptionsSpec() {
|
|
60
|
-
return [];
|
|
61
|
-
}
|
|
62
|
-
render() {
|
|
63
|
-
const { id, pos, label, anchors } = this;
|
|
64
|
-
const { x, y } = pos || { x: 0, y: 0 };
|
|
65
|
-
return svg `
|
|
66
|
-
<g class="node ${this.selected ? 'selected' : ''}" data-id="${id}" transform="translate(${x}, ${y})">
|
|
67
|
-
${this.renderNode()}
|
|
68
|
-
|
|
69
|
-
${anchors.map(anchor => anchor.render())}
|
|
70
|
-
</g>
|
|
71
|
-
`;
|
|
72
|
-
}
|
|
73
|
-
constructor(model) {
|
|
74
|
-
this._selected = false;
|
|
75
|
-
this.model = model;
|
|
76
|
-
}
|
|
77
|
-
update(model) {
|
|
78
|
-
this.model = {
|
|
79
|
-
...this.model,
|
|
80
|
-
...model
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
updateOptions(options) {
|
|
84
|
-
this.model.options = {
|
|
85
|
-
...this.model.options,
|
|
86
|
-
...options
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
get inputSchema() {
|
|
90
|
-
return {
|
|
91
|
-
type: 'object',
|
|
92
|
-
properties: {}
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
get dataSourceSchema() {
|
|
96
|
-
return {
|
|
97
|
-
type: 'object',
|
|
98
|
-
properties: {}
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
get outputSchema() {
|
|
102
|
-
return {
|
|
103
|
-
type: 'object',
|
|
104
|
-
properties: {}
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
get optionsSpec() {
|
|
108
|
-
return FlowNodeAbstract.commonOptionsSpec;
|
|
109
|
-
}
|
|
110
|
-
get id() {
|
|
111
|
-
return this.model.id;
|
|
112
|
-
}
|
|
113
|
-
get subtype() {
|
|
114
|
-
return this.model.subtype;
|
|
115
|
-
}
|
|
116
|
-
get label() {
|
|
117
|
-
return this.model.label || '';
|
|
118
|
-
}
|
|
119
|
-
get pos() {
|
|
120
|
-
return this.model.pos;
|
|
121
|
-
}
|
|
122
|
-
set pos(pos) {
|
|
123
|
-
this.model.pos = pos;
|
|
124
|
-
}
|
|
125
|
-
get size() {
|
|
126
|
-
return this.model.size;
|
|
127
|
-
}
|
|
128
|
-
get options() {
|
|
129
|
-
return this.model.options;
|
|
130
|
-
}
|
|
131
|
-
get anchorsOption() {
|
|
132
|
-
return this.model.anchorsOption || [];
|
|
133
|
-
}
|
|
134
|
-
get anchors() {
|
|
135
|
-
return (this.anchorModels || []).map(model => new AnchorInstance(model, this));
|
|
136
|
-
}
|
|
137
|
-
get selected() {
|
|
138
|
-
return this._selected;
|
|
139
|
-
}
|
|
140
|
-
set selected(selected) {
|
|
141
|
-
this._selected = selected;
|
|
142
|
-
}
|
|
143
|
-
findAnchor(id) {
|
|
144
|
-
return this.anchors.find(anchor => anchor.id == id);
|
|
145
|
-
}
|
|
146
|
-
applyAnchorsOption(defaultAnchorModel) {
|
|
147
|
-
const { id, type } = defaultAnchorModel;
|
|
148
|
-
const anchorOption = this.anchorsOption.find(anchorOption => anchorOption.id == id);
|
|
149
|
-
if (!anchorOption || !('angle' in anchorOption)) {
|
|
150
|
-
return {
|
|
151
|
-
...defaultAnchorModel,
|
|
152
|
-
...anchorOption
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
let { angle } = anchorOption;
|
|
156
|
-
const { w, h } = this.size;
|
|
157
|
-
let override;
|
|
158
|
-
if (type == 'in') {
|
|
159
|
-
angle = (angle + 360) % 360;
|
|
160
|
-
switch (angle) {
|
|
161
|
-
case 0:
|
|
162
|
-
override = { pos: { x: w / 2, y: 0 }, angle, weight: 3 };
|
|
163
|
-
break;
|
|
164
|
-
case 90:
|
|
165
|
-
override = { pos: { x: 0, y: h / 2 }, angle, weight: 2 };
|
|
166
|
-
break;
|
|
167
|
-
case 180:
|
|
168
|
-
override = { pos: { x: -w / 2, y: 0 }, angle, weight: 1 };
|
|
169
|
-
break;
|
|
170
|
-
case 270:
|
|
171
|
-
default:
|
|
172
|
-
override = { pos: { x: 0, y: -h / 2 }, angle, weight: 2 };
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
angle = (angle + 360) % 360;
|
|
177
|
-
switch (angle) {
|
|
178
|
-
case 0:
|
|
179
|
-
override = { pos: { x: w / 2, y: 0 }, angle, weight: 3 };
|
|
180
|
-
break;
|
|
181
|
-
case 90:
|
|
182
|
-
override = { pos: { x: 0, y: h / 2 }, angle, weight: 2 };
|
|
183
|
-
break;
|
|
184
|
-
case 180:
|
|
185
|
-
override = { pos: { x: -w / 2, y: 0 }, angle, weight: 1 };
|
|
186
|
-
break;
|
|
187
|
-
case 270:
|
|
188
|
-
default:
|
|
189
|
-
override = { pos: { x: 0, y: -h / 2 }, angle, weight: 2 };
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return {
|
|
193
|
-
...defaultAnchorModel,
|
|
194
|
-
...anchorOption,
|
|
195
|
-
...override
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
//# sourceMappingURL=flow-node-abstract.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"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,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,CAAA;YAC7D,CAAC;QACH,CAAC;QAED,OAAO;YACL,GAAG,kBAAkB;YACrB,GAAG,YAAY;YACf,GAAG,QAAQ;SACZ,CAAA;IACH,CAAC;CACF","sourcesContent":["import { css, svg, CSSResult, SVGTemplateResult, LitElement } from 'lit'\n\nimport { FlowNode, Anchor, AnchorModel, FlowNodeModel, FlowDataSchema } from '../types'\nimport { AnchorInstance } from './anchor-instance'\nimport { PropertySpec } from '@operato/property-editor'\n\n// Note!! Since this class is not a LitElement, I have kept the implementation minimal.\nexport abstract class FlowNodeAbstract implements FlowNode {\n public static get styles(): CSSResult {\n return css`\n g.node {\n fill: #fff;\n stroke: #000;\n stroke-width: 1;\n cursor: move;\n\n --anchor-opacity: 0;\n --node-stroke: #000;\n }\n\n g.node:hover,\n g.node.selected {\n --anchor-opacity: 1;\n --node-stroke: #007bff;\n }\n\n g.node .node-outline {\n stroke: var(--node-stroke);\n }\n\n g.node .node-label {\n font-size: 12px;\n user-select: none;\n fill: #000;\n stroke: #000;\n stroke-width: 1;\n }\n\n .anchor,\n .anchor-label {\n fill: var(--node-stroke);\n stroke: none;\n stroke-width: 1;\n cursor: pointer;\n transition:\n fill 0.2s ease,\n opacity 0.2s ease;\n opacity: var(--anchor-opacity, 0);\n }\n\n .anchor:hover {\n stroke: var(--node-stroke);\n fill: #fff;\n }\n\n .anchor-label {\n font-size: 10px;\n pointer-events: none;\n user-select: none;\n }\n `\n }\n\n public static get commonOptionsSpec(): PropertySpec[] {\n return []\n }\n\n abstract get type(): string\n abstract renderNode(): SVGTemplateResult\n abstract get anchorModels(): AnchorModel[]\n\n private _selected: boolean = false\n\n protected model?: FlowNodeModel\n\n render(): SVGTemplateResult {\n const { id, pos, label, anchors } = this\n const { x, y } = pos || { x: 0, y: 0 }\n\n return svg`\n <g class=\"node ${this.selected ? 'selected' : ''}\" data-id=\"${id}\" transform=\"translate(${x}, ${y})\">\n ${this.renderNode()}\n\n ${anchors!.map(anchor => anchor.render())}\n </g>\n `\n }\n\n constructor(model: FlowNodeModel) {\n this.model = model\n }\n\n update(model: Partial<FlowNodeModel>) {\n this.model = {\n ...this.model,\n ...model\n } as any\n }\n\n updateOptions(options: { [key: string]: any }) {\n this.model!.options = {\n ...this.model!.options,\n ...options\n }\n }\n\n get inputSchema(): FlowDataSchema {\n return {\n type: 'object',\n properties: {}\n }\n }\n\n get dataSourceSchema(): FlowDataSchema {\n return {\n type: 'object',\n properties: {}\n }\n }\n\n get outputSchema(): FlowDataSchema {\n return {\n type: 'object',\n properties: {}\n }\n }\n\n get optionsSpec(): PropertySpec[] {\n return FlowNodeAbstract.commonOptionsSpec\n }\n\n get id(): string {\n return this.model!.id\n }\n\n get subtype(): string | undefined {\n return this.model!.subtype\n }\n\n get label(): string {\n return this.model!.label || ''\n }\n\n get pos(): { x: number; y: number } {\n return this.model!.pos\n }\n\n set pos(pos: { x: number; y: number }) {\n this.model!.pos = pos\n }\n\n get size(): { w: number; h: number } {\n return this.model!.size\n }\n\n get options(): { [key: string]: any } | undefined {\n return this.model!.options\n }\n\n get anchorsOption(): { id: string; [key: string]: any }[] {\n return this.model!.anchorsOption || []\n }\n\n get anchors(): Anchor[] {\n return (this.anchorModels || []).map(model => new AnchorInstance(model, this))\n }\n\n get selected(): boolean {\n return this._selected!\n }\n\n set selected(selected: boolean) {\n this._selected = selected\n }\n\n findAnchor(id: string): Anchor | undefined {\n return this.anchors.find(anchor => anchor.id == id)\n }\n\n applyAnchorsOption(defaultAnchorModel: AnchorModel): AnchorModel {\n const { id, type } = defaultAnchorModel\n const anchorOption = this.anchorsOption.find(anchorOption => anchorOption.id == id)\n\n if (!anchorOption || !('angle' in anchorOption)) {\n return {\n ...defaultAnchorModel,\n ...anchorOption\n }\n }\n\n let { angle } = anchorOption\n\n const { w, h } = this.size\n let override: Partial<AnchorModel>\n\n if (type == 'in') {\n angle = (angle + 360) % 360\n\n switch (angle) {\n case 0:\n override = { pos: { x: w / 2, y: 0 }, angle, weight: 3 }\n break\n case 90:\n override = { pos: { x: 0, y: h / 2 }, angle, weight: 2 }\n break\n case 180:\n override = { pos: { x: -w / 2, y: 0 }, angle, weight: 1 }\n break\n case 270:\n default:\n override = { pos: { x: 0, y: -h / 2 }, angle, weight: 2 }\n }\n } else {\n angle = (angle + 360) % 360\n\n switch (angle) {\n case 0:\n override = { pos: { x: w / 2, y: 0 }, angle, weight: 3 }\n break\n case 90:\n override = { pos: { x: 0, y: h / 2 }, angle, weight: 2 }\n break\n case 180:\n override = { pos: { x: -w / 2, y: 0 }, angle, weight: 1 }\n break\n case 270:\n default:\n override = { pos: { x: 0, y: -h / 2 }, angle, weight: 2 }\n }\n }\n\n return {\n ...defaultAnchorModel,\n ...anchorOption,\n ...override\n }\n }\n}\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
export declare class FlowDebugPanel extends LitElement {
|
|
3
|
-
static styles: import("lit").CSSResult;
|
|
4
|
-
private flowContext?;
|
|
5
|
-
private flowDebugContext?;
|
|
6
|
-
logs: string[];
|
|
7
|
-
variables: {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
executionTimes: {
|
|
11
|
-
[nodeId: string]: number;
|
|
12
|
-
};
|
|
13
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
14
|
-
/** 한 단계 실행 */
|
|
15
|
-
private stepExecution;
|
|
16
|
-
/** 실행 초기화 */
|
|
17
|
-
private resetExecution;
|
|
18
|
-
/** 중단점 제거 */
|
|
19
|
-
private removeBreakpoint;
|
|
20
|
-
/** 실행 시간 기록 */
|
|
21
|
-
updateExecutionTime(nodeId: string, executionTime: number): void;
|
|
22
|
-
}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { LitElement, html, css } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { consume } from '@lit/context';
|
|
5
|
-
import { flowContext } from '../context/flow-context.js';
|
|
6
|
-
import { flowDebugContext } from '../context/flow-debug-context.js';
|
|
7
|
-
let FlowDebugPanel = class FlowDebugPanel extends LitElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.logs = [];
|
|
11
|
-
this.variables = {};
|
|
12
|
-
this.executionTimes = {};
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
var _a, _b, _c;
|
|
16
|
-
return html `
|
|
17
|
-
<div class="log-view">
|
|
18
|
-
<b>Execution Log:</b>
|
|
19
|
-
${(_a = this.flowContext) === null || _a === void 0 ? void 0 : _a.logs.map(log => html `<div>${log}</div>`)}
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<div class="breakpoints">
|
|
23
|
-
<b>Breakpoints:</b>
|
|
24
|
-
${Array.from(((_b = this.flowDebugContext) === null || _b === void 0 ? void 0 : _b.breakpoints) || []).map(nodeId => html `<span @click=${() => this.removeBreakpoint(nodeId)}>${nodeId} ✖</span>`)}
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<div class="variable-watch">
|
|
28
|
-
<b>Variable Watch:</b>
|
|
29
|
-
${Object.entries(this.variables).map(([key, value]) => html `<div><b>${key}:</b> ${JSON.stringify(value)}</div>`)}
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div class="profiling">
|
|
33
|
-
<b>Execution Profiling:</b>
|
|
34
|
-
${Object.entries(this.executionTimes).map(([nodeId, time]) => html `<div><b>${nodeId}:</b> ${time.toFixed(2)} ms</div>`)}
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<div class="current-execution">
|
|
38
|
-
<b>Current Execution Node:</b>
|
|
39
|
-
${((_c = this.flowDebugContext) === null || _c === void 0 ? void 0 : _c.currentExecutionNode) || 'None'}
|
|
40
|
-
</div>
|
|
41
|
-
`;
|
|
42
|
-
}
|
|
43
|
-
/** 한 단계 실행 */
|
|
44
|
-
stepExecution() {
|
|
45
|
-
var _a, _b;
|
|
46
|
-
(_a = this.flowDebugContext) === null || _a === void 0 ? void 0 : _a.executeFlow();
|
|
47
|
-
(_b = this.flowContext) === null || _b === void 0 ? void 0 : _b.addLog('Step execution triggered.');
|
|
48
|
-
}
|
|
49
|
-
/** 실행 초기화 */
|
|
50
|
-
resetExecution() {
|
|
51
|
-
var _a, _b;
|
|
52
|
-
(_a = this.flowDebugContext) === null || _a === void 0 ? void 0 : _a.stopFlow();
|
|
53
|
-
(_b = this.flowContext) === null || _b === void 0 ? void 0 : _b.addLog('Execution reset.');
|
|
54
|
-
}
|
|
55
|
-
/** 중단점 제거 */
|
|
56
|
-
removeBreakpoint(nodeId) {
|
|
57
|
-
var _a, _b;
|
|
58
|
-
(_a = this.flowDebugContext) === null || _a === void 0 ? void 0 : _a.setBreakpoint(nodeId);
|
|
59
|
-
(_b = this.flowContext) === null || _b === void 0 ? void 0 : _b.addLog(`Breakpoint removed: ${nodeId}`);
|
|
60
|
-
}
|
|
61
|
-
/** 실행 시간 기록 */
|
|
62
|
-
updateExecutionTime(nodeId, executionTime) {
|
|
63
|
-
this.executionTimes = { ...this.executionTimes, [nodeId]: executionTime };
|
|
64
|
-
this.requestUpdate();
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
FlowDebugPanel.styles = css `
|
|
68
|
-
:host {
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: column;
|
|
71
|
-
width: 380px;
|
|
72
|
-
height: 100%;
|
|
73
|
-
border-left: 1px solid #ccc;
|
|
74
|
-
background-color: #fafafa;
|
|
75
|
-
padding: 10px;
|
|
76
|
-
box-sizing: border-box;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.log-view {
|
|
80
|
-
flex: 1;
|
|
81
|
-
padding: 10px;
|
|
82
|
-
overflow-y: auto;
|
|
83
|
-
background-color: #f5f5f5;
|
|
84
|
-
font-family: monospace;
|
|
85
|
-
font-size: 12px;
|
|
86
|
-
white-space: pre-wrap;
|
|
87
|
-
border-radius: 4px;
|
|
88
|
-
border: 1px solid #ddd;
|
|
89
|
-
max-height: 250px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.breakpoints {
|
|
93
|
-
margin-top: 10px;
|
|
94
|
-
padding: 6px;
|
|
95
|
-
background: #f8f9fa;
|
|
96
|
-
border-radius: 4px;
|
|
97
|
-
border: 1px solid #ddd;
|
|
98
|
-
font-size: 12px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.breakpoints span {
|
|
102
|
-
display: inline-block;
|
|
103
|
-
padding: 4px 8px;
|
|
104
|
-
background: #dc3545;
|
|
105
|
-
color: white;
|
|
106
|
-
border-radius: 4px;
|
|
107
|
-
margin-right: 4px;
|
|
108
|
-
cursor: pointer;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.breakpoints span:hover {
|
|
112
|
-
background: #b02a37;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.variable-watch {
|
|
116
|
-
margin-top: 10px;
|
|
117
|
-
padding: 6px;
|
|
118
|
-
background: #f8f9fa;
|
|
119
|
-
border-radius: 4px;
|
|
120
|
-
border: 1px solid #ddd;
|
|
121
|
-
font-size: 12px;
|
|
122
|
-
max-height: 120px;
|
|
123
|
-
overflow-y: auto;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.profiling {
|
|
127
|
-
margin-top: 10px;
|
|
128
|
-
padding: 6px;
|
|
129
|
-
background: #fef3c7;
|
|
130
|
-
border-radius: 4px;
|
|
131
|
-
border: 1px solid #fbbf24;
|
|
132
|
-
font-size: 12px;
|
|
133
|
-
max-height: 150px;
|
|
134
|
-
overflow-y: auto;
|
|
135
|
-
}
|
|
136
|
-
`;
|
|
137
|
-
__decorate([
|
|
138
|
-
consume({ context: flowContext })
|
|
139
|
-
], FlowDebugPanel.prototype, "flowContext", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
consume({ context: flowDebugContext })
|
|
142
|
-
], FlowDebugPanel.prototype, "flowDebugContext", void 0);
|
|
143
|
-
__decorate([
|
|
144
|
-
property({ type: Array })
|
|
145
|
-
], FlowDebugPanel.prototype, "logs", void 0);
|
|
146
|
-
__decorate([
|
|
147
|
-
property({ type: Object })
|
|
148
|
-
], FlowDebugPanel.prototype, "variables", void 0);
|
|
149
|
-
__decorate([
|
|
150
|
-
property({ type: Object })
|
|
151
|
-
], FlowDebugPanel.prototype, "executionTimes", void 0);
|
|
152
|
-
FlowDebugPanel = __decorate([
|
|
153
|
-
customElement('flow-debug-panel')
|
|
154
|
-
], FlowDebugPanel);
|
|
155
|
-
export { FlowDebugPanel };
|
|
156
|
-
//# sourceMappingURL=flow-debug-panel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flow-debug-panel.js","sourceRoot":"","sources":["../../../src/components/flow-debug-panel.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,WAAW,EAAmB,MAAM,4BAA4B,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAwB,MAAM,kCAAkC,CAAA;AAGlF,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAAvC;;QA2EsB,SAAI,GAAa,EAAE,CAAA;QAClB,cAAS,GAA2B,EAAE,CAAA;QACtC,mBAAc,GAAiC,EAAE,CAAA;IA4D/E,CAAC;IA1DC,MAAM;;QACJ,OAAO,IAAI,CAAA;;;UAGL,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IA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QAC5C,MAAA,IAAI,CAAC,WAAW,0CAAE,MAAM,CAAC,uBAAuB,MAAM,EAAE,CAAC,CAAA;IAC3D,CAAC;IAED,eAAe;IACR,mBAAmB,CAAC,MAAc,EAAE,aAAqB;QAC9D,IAAI,CAAC,cAAc,GAAG,EAAE,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,CAAA;QACzE,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC;;AAvIM,qBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqElB,AArEY,CAqEZ;AAE0C;IAA1C,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;mDAAsC;AACxB;IAA/C,OAAO,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;wDAAgD;AAE5D;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAoB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAuC;AACtC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAAkD;AA7ElE,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAyI1B","sourcesContent":["import { LitElement, html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { consume } from '@lit/context'\nimport { flowContext, FlowContextType } from '../context/flow-context.js'\nimport { flowDebugContext, FlowDebugContextType } from '../context/flow-debug-context.js'\n\n@customElement('flow-debug-panel')\nexport class FlowDebugPanel extends LitElement {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n width: 380px;\n height: 100%;\n border-left: 1px solid #ccc;\n background-color: #fafafa;\n padding: 10px;\n box-sizing: border-box;\n }\n\n .log-view {\n flex: 1;\n padding: 10px;\n overflow-y: auto;\n background-color: #f5f5f5;\n font-family: monospace;\n font-size: 12px;\n white-space: pre-wrap;\n border-radius: 4px;\n border: 1px solid #ddd;\n max-height: 250px;\n }\n\n .breakpoints {\n margin-top: 10px;\n padding: 6px;\n background: #f8f9fa;\n border-radius: 4px;\n border: 1px solid #ddd;\n font-size: 12px;\n }\n\n .breakpoints span {\n display: inline-block;\n padding: 4px 8px;\n background: #dc3545;\n color: white;\n border-radius: 4px;\n margin-right: 4px;\n cursor: pointer;\n }\n\n .breakpoints span:hover {\n background: #b02a37;\n }\n\n .variable-watch {\n margin-top: 10px;\n padding: 6px;\n background: #f8f9fa;\n border-radius: 4px;\n border: 1px solid #ddd;\n font-size: 12px;\n max-height: 120px;\n overflow-y: auto;\n }\n\n .profiling {\n margin-top: 10px;\n padding: 6px;\n background: #fef3c7;\n border-radius: 4px;\n border: 1px solid #fbbf24;\n font-size: 12px;\n max-height: 150px;\n overflow-y: auto;\n }\n `\n\n @consume({ context: flowContext }) private flowContext?: FlowContextType\n @consume({ context: flowDebugContext }) private flowDebugContext?: FlowDebugContextType\n\n @property({ type: Array }) logs: string[] = []\n @property({ type: Object }) variables: { [key: string]: any } = {}\n @property({ type: Object }) executionTimes: { [nodeId: string]: number } = {}\n\n render() {\n return html`\n <div class=\"log-view\">\n <b>Execution Log:</b>\n ${this.flowContext?.logs.map(log => html`<div>${log}</div>`)}\n </div>\n\n <div class=\"breakpoints\">\n <b>Breakpoints:</b>\n ${Array.from(this.flowDebugContext?.breakpoints || []).map(\n nodeId => html`<span @click=${() => this.removeBreakpoint(nodeId)}>${nodeId} ✖</span>`\n )}\n </div>\n\n <div class=\"variable-watch\">\n <b>Variable Watch:</b>\n ${Object.entries(this.variables).map(\n ([key, value]) => html`<div><b>${key}:</b> ${JSON.stringify(value)}</div>`\n )}\n </div>\n\n <div class=\"profiling\">\n <b>Execution Profiling:</b>\n ${Object.entries(this.executionTimes).map(\n ([nodeId, time]) => html`<div><b>${nodeId}:</b> ${time.toFixed(2)} ms</div>`\n )}\n </div>\n\n <div class=\"current-execution\">\n <b>Current Execution Node:</b>\n ${this.flowDebugContext?.currentExecutionNode || 'None'}\n </div>\n `\n }\n\n /** 한 단계 실행 */\n private stepExecution() {\n this.flowDebugContext?.executeFlow()\n this.flowContext?.addLog('Step execution triggered.')\n }\n\n /** 실행 초기화 */\n private resetExecution() {\n this.flowDebugContext?.stopFlow()\n this.flowContext?.addLog('Execution reset.')\n }\n\n /** 중단점 제거 */\n private removeBreakpoint(nodeId: string) {\n this.flowDebugContext?.setBreakpoint(nodeId)\n this.flowContext?.addLog(`Breakpoint removed: ${nodeId}`)\n }\n\n /** 실행 시간 기록 */\n public updateExecutionTime(nodeId: string, executionTime: number) {\n this.executionTimes = { ...this.executionTimes, [nodeId]: executionTime }\n this.requestUpdate()\n }\n}\n"]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { FlowNode, FlowEdge } from '../types';
|
|
2
|
-
export declare class FlowExecutor {
|
|
3
|
-
private nodes;
|
|
4
|
-
private edges;
|
|
5
|
-
private breakpoints;
|
|
6
|
-
private isPaused;
|
|
7
|
-
private isRunning;
|
|
8
|
-
constructor(nodes: FlowNode[], edges: FlowEdge[]);
|
|
9
|
-
/** 플로우 실행 */
|
|
10
|
-
run(): Promise<void>;
|
|
11
|
-
/** 노드 실행 */
|
|
12
|
-
private executeNode;
|
|
13
|
-
/** 일시정지 후 재개 대기 */
|
|
14
|
-
private waitUntilResume;
|
|
15
|
-
/** 실행 일시정지 */
|
|
16
|
-
pause(): void;
|
|
17
|
-
/** 실행 재개 */
|
|
18
|
-
resume(): void;
|
|
19
|
-
/** 플로우 정지 */
|
|
20
|
-
stop(): void;
|
|
21
|
-
/** 중단점 추가/제거 */
|
|
22
|
-
toggleBreakpoint(nodeId: string): void;
|
|
23
|
-
stepOver(): void;
|
|
24
|
-
stepInto(): void;
|
|
25
|
-
stepOut(): void;
|
|
26
|
-
continueExecution(): void;
|
|
27
|
-
/** 로그 출력 (플로우 모니터와 연동 가능) */
|
|
28
|
-
private log;
|
|
29
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
export class FlowExecutor {
|
|
2
|
-
constructor(nodes, edges) {
|
|
3
|
-
this.isPaused = false;
|
|
4
|
-
this.isRunning = false;
|
|
5
|
-
this.nodes = new Map(nodes.map(node => [node.id, node]));
|
|
6
|
-
this.edges = edges;
|
|
7
|
-
this.breakpoints = new Set();
|
|
8
|
-
}
|
|
9
|
-
/** 플로우 실행 */
|
|
10
|
-
async run() {
|
|
11
|
-
this.isRunning = true;
|
|
12
|
-
this.isPaused = false;
|
|
13
|
-
for (const node of this.nodes.values()) {
|
|
14
|
-
if (this.breakpoints.has(node.id)) {
|
|
15
|
-
this.isPaused = true;
|
|
16
|
-
this.log(`Paused at breakpoint: ${node.label}`);
|
|
17
|
-
await this.waitUntilResume();
|
|
18
|
-
}
|
|
19
|
-
this.log(`Executing node: ${node.label}`);
|
|
20
|
-
await this.executeNode(node);
|
|
21
|
-
if (this.isPaused) {
|
|
22
|
-
await this.waitUntilResume();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
this.log('Flow execution completed.');
|
|
26
|
-
}
|
|
27
|
-
/** 노드 실행 */
|
|
28
|
-
async executeNode(node) {
|
|
29
|
-
// 가상의 실행 로직 (API 호출, 데이터 변환 등)
|
|
30
|
-
return new Promise(resolve => setTimeout(resolve, 1000));
|
|
31
|
-
}
|
|
32
|
-
/** 일시정지 후 재개 대기 */
|
|
33
|
-
waitUntilResume() {
|
|
34
|
-
return new Promise(resolve => {
|
|
35
|
-
const interval = setInterval(() => {
|
|
36
|
-
if (!this.isPaused) {
|
|
37
|
-
clearInterval(interval);
|
|
38
|
-
resolve();
|
|
39
|
-
}
|
|
40
|
-
}, 100);
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
/** 실행 일시정지 */
|
|
44
|
-
pause() {
|
|
45
|
-
this.isPaused = true;
|
|
46
|
-
this.log('Execution paused.');
|
|
47
|
-
}
|
|
48
|
-
/** 실행 재개 */
|
|
49
|
-
resume() {
|
|
50
|
-
this.isPaused = false;
|
|
51
|
-
this.log('Execution resumed.');
|
|
52
|
-
}
|
|
53
|
-
/** 플로우 정지 */
|
|
54
|
-
stop() {
|
|
55
|
-
this.isRunning = false;
|
|
56
|
-
this.isPaused = false;
|
|
57
|
-
console.log('Flow execution stopped.');
|
|
58
|
-
}
|
|
59
|
-
/** 중단점 추가/제거 */
|
|
60
|
-
toggleBreakpoint(nodeId) {
|
|
61
|
-
if (this.breakpoints.has(nodeId)) {
|
|
62
|
-
this.breakpoints.delete(nodeId);
|
|
63
|
-
this.log(`Breakpoint removed from node: ${nodeId}`);
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
this.breakpoints.add(nodeId);
|
|
67
|
-
this.log(`Breakpoint added to node: ${nodeId}`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
stepOver() {
|
|
71
|
-
console.log('stepOver');
|
|
72
|
-
}
|
|
73
|
-
stepInto() {
|
|
74
|
-
console.log('stepInto');
|
|
75
|
-
}
|
|
76
|
-
stepOut() {
|
|
77
|
-
console.log('stepOut');
|
|
78
|
-
}
|
|
79
|
-
continueExecution() {
|
|
80
|
-
console.log('continueExecution');
|
|
81
|
-
}
|
|
82
|
-
/** 로그 출력 (플로우 모니터와 연동 가능) */
|
|
83
|
-
log(message) {
|
|
84
|
-
console.log(`[FlowExecutor] ${message}`);
|
|
85
|
-
// TODO: 모니터 컴포넌트와 연결하여 로그 출력
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
//# sourceMappingURL=flow-executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flow-executor.js","sourceRoot":"","sources":["../../../src/components/flow-executor.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,YAAY;IAOvB,YAAY,KAAiB,EAAE,KAAiB;QAHxC,aAAQ,GAAY,KAAK,CAAA;QACzB,cAAS,GAAY,KAAK,CA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C,UAAU,CAAC,CAAA;IACzB,CAAC;IAEM,OAAO;QACZ,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACxB,CAAC;IAEM,iBAAiB;QACtB,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;IAClC,CAAC;IAED,6BAA6B;IACrB,GAAG,CAAC,OAAe;QACzB,OAAO,CAAC,GAAG,CAAC,kBAAkB,OAAO,EAAE,CAAC,CAAA;QACxC,6BAA6B;IAC/B,CAAC;CACF","sourcesContent":["import { FlowNode, FlowEdge } from '../types'\n\nexport class FlowExecutor {\n private nodes: Map<string, FlowNode>\n private edges: FlowEdge[]\n private breakpoints: Set<string>\n private isPaused: boolean = false\n private isRunning: boolean = false\n\n constructor(nodes: FlowNode[], edges: FlowEdge[]) {\n this.nodes = new Map(nodes.map(node => [node.id, node]))\n this.edges = edges\n this.breakpoints = new Set()\n }\n\n /** 플로우 실행 */\n public async run() {\n this.isRunning = true\n this.isPaused = false\n\n for (const node of this.nodes.values()) {\n if (this.breakpoints.has(node.id)) {\n this.isPaused = true\n this.log(`Paused at breakpoint: ${node.label}`)\n await this.waitUntilResume()\n }\n\n this.log(`Executing node: ${node.label}`)\n await this.executeNode(node)\n\n if (this.isPaused) {\n await this.waitUntilResume()\n }\n }\n\n this.log('Flow execution completed.')\n }\n\n /** 노드 실행 */\n private async executeNode(node: FlowNode) {\n // 가상의 실행 로직 (API 호출, 데이터 변환 등)\n return new Promise<void>(resolve => setTimeout(resolve, 1000))\n }\n\n /** 일시정지 후 재개 대기 */\n private waitUntilResume(): Promise<void> {\n return new Promise(resolve => {\n const interval = setInterval(() => {\n if (!this.isPaused) {\n clearInterval(interval)\n resolve()\n }\n }, 100)\n })\n }\n\n /** 실행 일시정지 */\n public pause() {\n this.isPaused = true\n this.log('Execution paused.')\n }\n\n /** 실행 재개 */\n public resume() {\n this.isPaused = false\n this.log('Execution resumed.')\n }\n\n /** 플로우 정지 */\n public stop() {\n this.isRunning = false\n this.isPaused = false\n console.log('Flow execution stopped.')\n }\n\n /** 중단점 추가/제거 */\n public toggleBreakpoint(nodeId: string) {\n if (this.breakpoints.has(nodeId)) {\n this.breakpoints.delete(nodeId)\n this.log(`Breakpoint removed from node: ${nodeId}`)\n } else {\n this.breakpoints.add(nodeId)\n this.log(`Breakpoint added to node: ${nodeId}`)\n }\n }\n\n public stepOver() {\n console.log('stepOver')\n }\n\n public stepInto() {\n console.log('stepInto')\n }\n\n public stepOut() {\n console.log('stepOut')\n }\n\n public continueExecution() {\n console.log('continueExecution')\n }\n\n /** 로그 출력 (플로우 모니터와 연동 가능) */\n private log(message: string) {\n console.log(`[FlowExecutor] ${message}`)\n // TODO: 모니터 컴포넌트와 연결하여 로그 출력\n }\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import './property-editor.js';
|
|
5
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
6
|
-
import { PropertySpec } from '@operato/property-editor';
|
|
7
|
-
export declare class FlowOptionsBuilder extends LitElement {
|
|
8
|
-
value: {
|
|
9
|
-
[name: string]: any;
|
|
10
|
-
};
|
|
11
|
-
props?: PropertySpec[];
|
|
12
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
13
|
-
firstUpdated(): void;
|
|
14
|
-
updated(changes: PropertyValues<this>): void;
|
|
15
|
-
private onPropsChanged;
|
|
16
|
-
private setValues;
|
|
17
|
-
private onValueChanged;
|
|
18
|
-
}
|