@operato/flow 9.0.0-beta.56 → 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 +8 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- 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-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/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,29 +0,0 @@
|
|
|
1
|
-
import { svg } from 'lit';
|
|
2
|
-
import { FlowNodeAbstract } from '../base/flow-node-abstract.js';
|
|
3
|
-
export class Iterator extends FlowNodeAbstract {
|
|
4
|
-
get type() {
|
|
5
|
-
return 'iterator';
|
|
6
|
-
}
|
|
7
|
-
get size() {
|
|
8
|
-
return this.model.size || { w: 200, h: 500 };
|
|
9
|
-
}
|
|
10
|
-
renderNode() {
|
|
11
|
-
const { w, h } = this.size;
|
|
12
|
-
return svg `
|
|
13
|
-
<rect class="node-outline" x="${-w / 2}" y="${-h / 2}" width="${w}" height="${h}"
|
|
14
|
-
fill="#f3f3f3" stroke="#000" stroke-dasharray="5,5" stroke-width="1.5" />
|
|
15
|
-
|
|
16
|
-
<text x="${-w / 2 + 10}" y="${-h / 2 + 15}" font-size="12" fill="#333">🔁</text>
|
|
17
|
-
|
|
18
|
-
<text class="node-label" x="0" y="5" text-anchor="middle" font-weight="bold">${this.label}</text>
|
|
19
|
-
`;
|
|
20
|
-
}
|
|
21
|
-
get anchorModels() {
|
|
22
|
-
const { h } = this.size;
|
|
23
|
-
return [
|
|
24
|
-
{ id: 'in', type: 'in', pos: { x: 0, y: -(h !== null && h !== void 0 ? h : 500) / 2 }, angle: 270 },
|
|
25
|
-
{ id: 'out', type: 'out', pos: { x: 0, y: (h !== null && h !== void 0 ? h : 500) / 2 }, angle: 90 }
|
|
26
|
-
].map(anchorModel => this.applyAnchorsOption(anchorModel));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=iterator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"iterator.js","sourceRoot":"","sources":["../../../src/nodes/iterator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAq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AAkB,CAAC,WAA0B,CAAC,CAAC,CAAA;IAC3E,CAAC;CACF","sourcesContent":["import { svg, SVGTemplateResult } from 'lit'\nimport { AnchorModel } from '../types.js'\nimport { FlowNodeAbstract } from '../base/flow-node-abstract.js'\n\nexport class Iterator extends FlowNodeAbstract {\n get type() {\n return 'iterator'\n }\n\n get size(): { w: number; h: number } {\n return this.model!.size || { w: 200, h: 500 }\n }\n\n renderNode(): SVGTemplateResult {\n const { w, h } = this.size\n\n return svg`\n <rect class=\"node-outline\" x=\"${-w / 2}\" y=\"${-h / 2}\" width=\"${w}\" height=\"${h}\" \n fill=\"#f3f3f3\" stroke=\"#000\" stroke-dasharray=\"5,5\" stroke-width=\"1.5\" />\n\n <text x=\"${-w / 2 + 10}\" y=\"${-h / 2 + 15}\" font-size=\"12\" fill=\"#333\">🔁</text>\n\n <text class=\"node-label\" x=\"0\" y=\"5\" text-anchor=\"middle\" font-weight=\"bold\">${this.label}</text>\n `\n }\n\n get anchorModels(): AnchorModel[] {\n const { h } = this.size\n\n return [\n { id: 'in', type: 'in', pos: { x: 0, y: -(h ?? 500) / 2 }, angle: 270 },\n { id: 'out', type: 'out', pos: { x: 0, y: (h ?? 500) / 2 }, angle: 90 }\n ].map(anchorModel => this.applyAnchorsOption(anchorModel as AnchorModel))\n }\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SVGTemplateResult } from 'lit';
|
|
2
|
-
import { AnchorModel, FlowDataSchema } from '../types.js';
|
|
3
|
-
import { FlowNodeAbstract } from '../base/flow-node-abstract.js';
|
|
4
|
-
import { PropertySpec } from '@operato/property-editor';
|
|
5
|
-
export declare class Select extends FlowNodeAbstract {
|
|
6
|
-
get type(): string;
|
|
7
|
-
get optionsSpec(): PropertySpec[];
|
|
8
|
-
get inputSchema(): FlowDataSchema;
|
|
9
|
-
get outputSchema(): FlowDataSchema;
|
|
10
|
-
get size(): {
|
|
11
|
-
w: number;
|
|
12
|
-
h: number;
|
|
13
|
-
};
|
|
14
|
-
renderNode(): SVGTemplateResult;
|
|
15
|
-
/** 기본 앵커 포인트 (input 1개, output 3개) */
|
|
16
|
-
get anchorModels(): AnchorModel[];
|
|
17
|
-
}
|
package/dist/src/nodes/select.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { svg } from 'lit';
|
|
2
|
-
import { FlowNodeAbstract } from '../base/flow-node-abstract.js';
|
|
3
|
-
const MINWIDTH = 160;
|
|
4
|
-
const ANCHOR_SPACING = 80;
|
|
5
|
-
const HEIGHT = 40;
|
|
6
|
-
export class Select extends FlowNodeAbstract {
|
|
7
|
-
get type() {
|
|
8
|
-
return 'select';
|
|
9
|
-
}
|
|
10
|
-
get optionsSpec() {
|
|
11
|
-
return [
|
|
12
|
-
{
|
|
13
|
-
type: 'number',
|
|
14
|
-
name: 'outputCount',
|
|
15
|
-
label: 'output-count'
|
|
16
|
-
}
|
|
17
|
-
];
|
|
18
|
-
}
|
|
19
|
-
get inputSchema() {
|
|
20
|
-
return {
|
|
21
|
-
type: 'object',
|
|
22
|
-
properties: {
|
|
23
|
-
selectionKey: { type: 'string' }
|
|
24
|
-
},
|
|
25
|
-
required: ['selectionKey']
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
get outputSchema() {
|
|
29
|
-
return {
|
|
30
|
-
type: 'object',
|
|
31
|
-
properties: {
|
|
32
|
-
selectionKey: { type: 'string' }
|
|
33
|
-
},
|
|
34
|
-
required: ['selectionKey']
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
get size() {
|
|
38
|
-
const { outputCount } = this.options || { outputCount: 3 };
|
|
39
|
-
return { w: Math.max(MINWIDTH, outputCount * ANCHOR_SPACING), h: HEIGHT };
|
|
40
|
-
}
|
|
41
|
-
renderNode() {
|
|
42
|
-
const { w, h } = this.size;
|
|
43
|
-
return svg `
|
|
44
|
-
<rect class="node-outline" x="${-w / 2}" y="${-h / 2}" width="${w}" height="${h}" fill="#e2e3e5" stroke="#000" stroke-width="1" />
|
|
45
|
-
|
|
46
|
-
<text class="node-label" x="0" y="5" text-anchor="middle">${this.label}</text>
|
|
47
|
-
`;
|
|
48
|
-
}
|
|
49
|
-
/** 기본 앵커 포인트 (input 1개, output 3개) */
|
|
50
|
-
get anchorModels() {
|
|
51
|
-
const { outputCount } = this.options || { outputCount: 3 };
|
|
52
|
-
const { w, h } = this.size;
|
|
53
|
-
const anchors = [{ id: 'in', type: 'in', pos: { x: 0, y: -h / 2 } }];
|
|
54
|
-
const anchorSpacing = w / outputCount;
|
|
55
|
-
const startOffsetX = (-(outputCount - 1) * anchorSpacing) / 2;
|
|
56
|
-
for (let i = 0; i < outputCount; i++) {
|
|
57
|
-
anchors.push({
|
|
58
|
-
id: `out-${i + 1}`,
|
|
59
|
-
type: 'out',
|
|
60
|
-
pos: {
|
|
61
|
-
x: startOffsetX + i * anchorSpacing,
|
|
62
|
-
y: h / 2
|
|
63
|
-
},
|
|
64
|
-
label: `case ${i + 1}`,
|
|
65
|
-
weight: outputCount - i
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
return anchors;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=select.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/nodes/select.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,KAAK,CAAA;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAGhE,MAAM,QAAQ,GAAG,GAAG,CAAA;AACpB,MAAM,cAAc,GAAG,EAAE,CAAA;AACzB,MAAM,MAAM,GAAG,EAAE,CAAA;AACjB,MAAM,OAAO,MAAO,SAAQ,gBAAgB;IAC1C,IAAI,IAAI;QACN,OAAO,QAAQ,CAAA;IACjB,CAAC;IAED,IAAI,WAAW;QACb,OAAO;YACL;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,aAAa;gBACnB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AC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAA;QAEnF,MAAM,aAAa,GAAG,CAAC,GAAG,WAAW,CAAA;QACrC,MAAM,YAAY,GAAG,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;QAE7D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC;YACrC,OAAO,CAAC,IAAI,CAAC;gBACX,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;gBAClB,IAAI,EAAE,KAAK;gBACX,GAAG,EAAE;oBACH,CAAC,EAAE,YAAY,GAAG,CAAC,GAAG,aAAa;oBACnC,CAAC,EAAE,CAAC,GAAG,CAAC;iBACT;gBACD,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE;gBACtB,MAAM,EAAE,WAAW,GAAG,CAAC;aACxB,CAAC,CAAA;QACJ,CAAC;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;CACF","sourcesContent":["import { svg, SVGTemplateResult } from 'lit'\nimport { AnchorModel, FlowDataSchema } from '../types.js'\nimport { FlowNodeAbstract } from '../base/flow-node-abstract.js'\nimport { PropertySpec } from '@operato/property-editor'\n\nconst MINWIDTH = 160\nconst ANCHOR_SPACING = 80\nconst HEIGHT = 40\nexport class Select extends FlowNodeAbstract {\n get type() {\n return 'select'\n }\n\n get optionsSpec(): PropertySpec[] {\n return [\n {\n type: 'number',\n name: 'outputCount',\n label: 'output-count'\n }\n ]\n }\n\n get inputSchema(): FlowDataSchema {\n return {\n type: 'object',\n properties: {\n selectionKey: { type: 'string' }\n },\n required: ['selectionKey']\n }\n }\n\n get outputSchema(): FlowDataSchema {\n return {\n type: 'object',\n properties: {\n selectionKey: { type: 'string' }\n },\n required: ['selectionKey']\n }\n }\n\n get size(): { w: number; h: number } {\n const { outputCount } = this.options || { outputCount: 3 }\n return { w: Math.max(MINWIDTH, outputCount * ANCHOR_SPACING), h: HEIGHT }\n }\n\n renderNode(): SVGTemplateResult {\n const { w, h } = this.size\n\n return svg`\n <rect class=\"node-outline\" x=\"${-w / 2}\" y=\"${-h / 2}\" width=\"${w}\" height=\"${h}\" fill=\"#e2e3e5\" stroke=\"#000\" stroke-width=\"1\" />\n\n <text class=\"node-label\" x=\"0\" y=\"5\" text-anchor=\"middle\">${this.label}</text>\n `\n }\n\n /** 기본 앵커 포인트 (input 1개, output 3개) */\n get anchorModels(): AnchorModel[] {\n const { outputCount } = this.options || { outputCount: 3 }\n const { w, h } = this.size\n\n const anchors: AnchorModel[] = [{ id: 'in', type: 'in', pos: { x: 0, y: -h / 2 } }]\n\n const anchorSpacing = w / outputCount\n const startOffsetX = (-(outputCount - 1) * anchorSpacing) / 2\n\n for (let i = 0; i < outputCount; i++) {\n anchors.push({\n id: `out-${i + 1}`,\n type: 'out',\n pos: {\n x: startOffsetX + i * anchorSpacing,\n y: h / 2\n },\n label: `case ${i + 1}`,\n weight: outputCount - i\n })\n }\n\n return anchors\n }\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SVGTemplateResult } from 'lit';
|
|
2
|
-
import { AnchorModel, FlowDataSchema } from '../types.js';
|
|
3
|
-
import { FlowNodeAbstract } from '../base/flow-node-abstract.js';
|
|
4
|
-
export declare class StartEvent extends FlowNodeAbstract {
|
|
5
|
-
get type(): string;
|
|
6
|
-
get inputSchema(): FlowDataSchema;
|
|
7
|
-
get dataSourceSchema(): FlowDataSchema;
|
|
8
|
-
get outputSchema(): FlowDataSchema;
|
|
9
|
-
get size(): {
|
|
10
|
-
w: number;
|
|
11
|
-
h: number;
|
|
12
|
-
};
|
|
13
|
-
renderNode(): SVGTemplateResult;
|
|
14
|
-
get anchorModels(): AnchorModel[];
|
|
15
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { svg } from 'lit';
|
|
2
|
-
import { FlowNodeAbstract } from '../base/flow-node-abstract.js';
|
|
3
|
-
export class StartEvent extends FlowNodeAbstract {
|
|
4
|
-
get type() {
|
|
5
|
-
return 'start';
|
|
6
|
-
}
|
|
7
|
-
get inputSchema() {
|
|
8
|
-
return {
|
|
9
|
-
type: 'object',
|
|
10
|
-
properties: {}
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
get dataSourceSchema() {
|
|
14
|
-
return {
|
|
15
|
-
type: 'object',
|
|
16
|
-
properties: {
|
|
17
|
-
payload: { type: 'object', properties: {} }
|
|
18
|
-
},
|
|
19
|
-
required: ['payload']
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
get outputSchema() {
|
|
23
|
-
return {
|
|
24
|
-
type: 'object',
|
|
25
|
-
properties: {
|
|
26
|
-
payload: { type: 'object', properties: {} }
|
|
27
|
-
},
|
|
28
|
-
required: ['payload']
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
get size() {
|
|
32
|
-
return this.model.size || { w: 48, h: 48 };
|
|
33
|
-
}
|
|
34
|
-
renderNode() {
|
|
35
|
-
const { w, h } = this.size;
|
|
36
|
-
const r = Math.min(w, h) / 2 - 1;
|
|
37
|
-
return svg `
|
|
38
|
-
<circle class="node-outline" cx="0" cy="0" r="${r}" fill="#d4edda" stroke="#000" stroke-width="1" />
|
|
39
|
-
<text class="node-label" x="0" y="5" text-anchor="middle">${this.label}</text>
|
|
40
|
-
`;
|
|
41
|
-
}
|
|
42
|
-
get anchorModels() {
|
|
43
|
-
return [{ id: 'out', type: 'out', pos: { x: 0, y: 24 }, angle: 90 }].map(anchorModel => this.applyAnchorsOption(anchorModel));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=start-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start-event.js","sourceRoot":"","sources":["../../../src/nodes/start-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,KAAK,CAA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AE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CACrF,IAAI,CAAC,kBAAkB,CAAC,WAA0B,CAAC,CACpD,CAAA;IACH,CAAC;CACF","sourcesContent":["import { svg, SVGTemplateResult } from 'lit'\nimport { AnchorModel, FlowDataSchema } from '../types.js'\nimport { FlowNodeAbstract } from '../base/flow-node-abstract.js'\n\nexport class StartEvent extends FlowNodeAbstract {\n get type() {\n return 'start'\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 payload: { type: 'object', properties: {} }\n },\n required: ['payload']\n }\n }\n\n get outputSchema(): FlowDataSchema {\n return {\n type: 'object',\n properties: {\n payload: { type: 'object', properties: {} }\n },\n required: ['payload']\n }\n }\n\n get size(): { w: number; h: number } {\n return this.model!.size || { w: 48, h: 48 }\n }\n\n renderNode(): SVGTemplateResult {\n const { w, h } = this.size\n const r = Math.min(w, h) / 2 - 1\n\n return svg`\n <circle class=\"node-outline\" cx=\"0\" cy=\"0\" r=\"${r}\" fill=\"#d4edda\" stroke=\"#000\" stroke-width=\"1\" />\n <text class=\"node-label\" x=\"0\" y=\"5\" text-anchor=\"middle\">${this.label}</text>\n `\n }\n\n get anchorModels(): AnchorModel[] {\n return [{ id: 'out', type: 'out', pos: { x: 0, y: 24 }, angle: 90 }].map(anchorModel =>\n this.applyAnchorsOption(anchorModel as AnchorModel)\n )\n }\n}\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SVGTemplateResult } from 'lit';
|
|
2
|
-
import { AnchorModel } from '../types.js';
|
|
3
|
-
import { FlowNodeAbstract } from '../base/flow-node-abstract.js';
|
|
4
|
-
export declare class Subflow extends FlowNodeAbstract {
|
|
5
|
-
get type(): string;
|
|
6
|
-
get size(): {
|
|
7
|
-
w: number;
|
|
8
|
-
h: number;
|
|
9
|
-
};
|
|
10
|
-
renderNode(): SVGTemplateResult;
|
|
11
|
-
get anchorModels(): AnchorModel[];
|
|
12
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { svg } from 'lit';
|
|
2
|
-
import { FlowNodeAbstract } from '../base/flow-node-abstract.js';
|
|
3
|
-
export class Subflow extends FlowNodeAbstract {
|
|
4
|
-
get type() {
|
|
5
|
-
return 'subflow';
|
|
6
|
-
}
|
|
7
|
-
get size() {
|
|
8
|
-
return this.model.size || { w: 120, h: 60 };
|
|
9
|
-
}
|
|
10
|
-
renderNode() {
|
|
11
|
-
const { w, h } = this.size;
|
|
12
|
-
const x = -w / 2;
|
|
13
|
-
const y = -h / 2;
|
|
14
|
-
const gap = h * 0.2;
|
|
15
|
-
return svg `
|
|
16
|
-
<rect class="node-outline" x="${x}" y="${y}" width="${w}" height="${h}" fill="#e2e3f3" stroke-width="1" stroke="#666"/>
|
|
17
|
-
<rect class="node-inner" x="${x + gap / 2}" y="${y + gap / 2}" width="${w - gap}" height="${h - gap}" fill="#d6e0f5" stroke-width="1" stroke="#000"/>
|
|
18
|
-
|
|
19
|
-
<text class="node-label" x="0" y="-5" text-anchor="middle">${this.label}</text>
|
|
20
|
-
`;
|
|
21
|
-
}
|
|
22
|
-
get anchorModels() {
|
|
23
|
-
const { w, h } = this.size;
|
|
24
|
-
return [
|
|
25
|
-
{ id: 'in', type: 'in', pos: { x: 0, y: -h / 2 }, angle: 270 },
|
|
26
|
-
{ id: 'out', type: 'out', pos: { x: 0, y: h / 2 }, angle: 90 }
|
|
27
|
-
].map(anchorModel => this.applyAnchorsOption(anchorModel));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=subflow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subflow.js","sourceRoot":"","sources":["../../../src/nodes/subflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,KAAK,CAAA;AAE5C,OAAO,EAA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W,CAAC,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAA0B,CAAC,CAAC,CAAA;IAC3E,CAAC;CACF","sourcesContent":["import { svg, SVGTemplateResult } from 'lit'\nimport { AnchorModel } from '../types.js'\nimport { FlowNodeAbstract } from '../base/flow-node-abstract.js'\n\nexport class Subflow extends FlowNodeAbstract {\n get type() {\n return 'subflow'\n }\n\n get size(): { w: number; h: number } {\n return this.model!.size || { w: 120, h: 60 }\n }\n\n renderNode(): SVGTemplateResult {\n const { w, h } = this.size\n const x = -w / 2\n const y = -h / 2\n const gap = h * 0.2\n\n return svg`\n <rect class=\"node-outline\" x=\"${x}\" y=\"${y}\" width=\"${w}\" height=\"${h}\" fill=\"#e2e3f3\" stroke-width=\"1\" stroke=\"#666\"/>\n <rect class=\"node-inner\" x=\"${x + gap / 2}\" y=\"${y + gap / 2}\" width=\"${w - gap}\" height=\"${h - gap}\" fill=\"#d6e0f5\" stroke-width=\"1\" stroke=\"#000\"/>\n\n <text class=\"node-label\" x=\"0\" y=\"-5\" text-anchor=\"middle\">${this.label}</text>\n `\n }\n\n get anchorModels(): AnchorModel[] {\n const { w, h } = this.size\n\n return [\n { id: 'in', type: 'in', pos: { x: 0, y: -h / 2 }, angle: 270 },\n { id: 'out', type: 'out', pos: { x: 0, y: h / 2 }, angle: 90 }\n ].map(anchorModel => this.applyAnchorsOption(anchorModel as AnchorModel))\n }\n}\n"]}
|
package/dist/src/nodes/task.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SVGTemplateResult } from 'lit';
|
|
2
|
-
import { PropertySpec } from '@operato/property-editor';
|
|
3
|
-
import { AnchorModel } from '../types.js';
|
|
4
|
-
import { FlowNodeAbstract } from '../base/flow-node-abstract.js';
|
|
5
|
-
export declare class Task extends FlowNodeAbstract {
|
|
6
|
-
private _propertySpecs;
|
|
7
|
-
get propertySpecs(): PropertySpec[] | null;
|
|
8
|
-
set propertySpecs(propertySpecs: PropertySpec[] | null);
|
|
9
|
-
get type(): string;
|
|
10
|
-
get inputSchema(): import("../types.js").FlowDataSchema;
|
|
11
|
-
get size(): {
|
|
12
|
-
w: number;
|
|
13
|
-
h: number;
|
|
14
|
-
};
|
|
15
|
-
renderNode(): SVGTemplateResult;
|
|
16
|
-
get anchorModels(): AnchorModel[];
|
|
17
|
-
}
|
package/dist/src/nodes/task.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { svg } from 'lit';
|
|
2
|
-
import { FlowNodeAbstract } from '../base/flow-node-abstract.js';
|
|
3
|
-
import { convertPropertySpecsToSchema } from '../utils/generate-mapping-scheme.js';
|
|
4
|
-
export class Task extends FlowNodeAbstract {
|
|
5
|
-
constructor() {
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this._propertySpecs = [
|
|
8
|
-
{
|
|
9
|
-
type: 'string',
|
|
10
|
-
name: 'message',
|
|
11
|
-
label: 'message'
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
type: 'scenario-step-input',
|
|
15
|
-
name: 'accessor',
|
|
16
|
-
label: 'accessor'
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
type: 'select',
|
|
20
|
-
name: 'level',
|
|
21
|
-
label: 'level',
|
|
22
|
-
property: {
|
|
23
|
-
options: ['info', 'warn', 'error']
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
get propertySpecs() {
|
|
29
|
-
return this._propertySpecs;
|
|
30
|
-
}
|
|
31
|
-
set propertySpecs(propertySpecs) {
|
|
32
|
-
this._propertySpecs = propertySpecs;
|
|
33
|
-
}
|
|
34
|
-
get type() {
|
|
35
|
-
return 'task';
|
|
36
|
-
}
|
|
37
|
-
get inputSchema() {
|
|
38
|
-
return convertPropertySpecsToSchema(this.propertySpecs || []);
|
|
39
|
-
}
|
|
40
|
-
get size() {
|
|
41
|
-
return this.model.size || { w: 120, h: 60 };
|
|
42
|
-
}
|
|
43
|
-
renderNode() {
|
|
44
|
-
const { w, h } = this.size;
|
|
45
|
-
const x = -w / 2;
|
|
46
|
-
const y = -h / 2;
|
|
47
|
-
return svg `
|
|
48
|
-
<rect class="node-outline" x="${x}" y="${y}" width="${w}" height="${h}" fill="#d1ecf1" stroke-width="1"/>
|
|
49
|
-
<text class="node-label" x="0" y="5" text-anchor="middle">${this.label}</text>
|
|
50
|
-
`;
|
|
51
|
-
}
|
|
52
|
-
get anchorModels() {
|
|
53
|
-
const { w, h } = this.size;
|
|
54
|
-
return [
|
|
55
|
-
{ id: 'in', type: 'in', pos: { x: 0, y: -h / 2 }, angle: 270 },
|
|
56
|
-
{ id: 'out', type: 'out', pos: { x: 0, y: h / 2 }, angle: 90 }
|
|
57
|
-
].map(anchorModel => this.applyAnchorsOption(anchorModel));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=task.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../../src/nodes/task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,KAAK,CAAA;AAK5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAA;AAElF,MAAM,OAAO,IAAK,SAAQ,gBAAgB;IAA1C;;QACU,mBAAc,GAA0B;YAC9C;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;aACjB;YACD;gBACE,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,UAAU;aAClB;YACD;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;gBACd,QAAQ,EAAE;oBACR,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;iBACnC;aACF;SACF,CAAA;IAyCH,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CAAC,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,WAA0B,CAAC,CAAC,CAAA;IAC3E,CAAC;CACF","sourcesContent":["import { svg, SVGTemplateResult } from 'lit'\n\nimport { PropertySpec } from '@operato/property-editor'\n\nimport { AnchorModel } from '../types.js'\nimport { FlowNodeAbstract } from '../base/flow-node-abstract.js'\nimport { convertPropertySpecsToSchema } from '../utils/generate-mapping-scheme.js'\n\nexport class Task extends FlowNodeAbstract {\n private _propertySpecs: PropertySpec[] | null = [\n {\n type: 'string',\n name: 'message',\n label: 'message'\n },\n {\n type: 'scenario-step-input',\n name: 'accessor',\n label: 'accessor'\n },\n {\n type: 'select',\n name: 'level',\n label: 'level',\n property: {\n options: ['info', 'warn', 'error']\n }\n }\n ]\n\n get propertySpecs(): PropertySpec[] | null {\n return this._propertySpecs\n }\n\n set propertySpecs(propertySpecs: PropertySpec[] | null) {\n this._propertySpecs = propertySpecs\n }\n\n get type() {\n return 'task'\n }\n\n get inputSchema() {\n return convertPropertySpecsToSchema(this.propertySpecs || [])\n }\n\n get size(): { w: number; h: number } {\n return this.model!.size || { w: 120, h: 60 }\n }\n\n renderNode(): SVGTemplateResult {\n const { w, h } = this.size\n const x = -w / 2\n const y = -h / 2\n\n return svg`\n <rect class=\"node-outline\" x=\"${x}\" y=\"${y}\" width=\"${w}\" height=\"${h}\" fill=\"#d1ecf1\" stroke-width=\"1\"/>\n <text class=\"node-label\" x=\"0\" y=\"5\" text-anchor=\"middle\">${this.label}</text>\n `\n }\n\n get anchorModels(): AnchorModel[] {\n const { w, h } = this.size\n\n return [\n { id: 'in', type: 'in', pos: { x: 0, y: -h / 2 }, angle: 270 },\n { id: 'out', type: 'out', pos: { x: 0, y: h / 2 }, angle: 90 }\n ].map(anchorModel => this.applyAnchorsOption(anchorModel as AnchorModel))\n }\n}\n"]}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js';
|
|
2
|
-
import './components/flow-sidebar.js';
|
|
3
|
-
import './components/flow-toolbar.js';
|
|
4
|
-
import './components/flow-side-panel.js';
|
|
5
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
6
|
-
import { FlowNodeImplementation, FlowNode, FlowEdge, FlowNodeModel, FlowEdgeModel, FlowEntity } from './types.js';
|
|
7
|
-
import { FlowContextType } from './context/flow-context.js';
|
|
8
|
-
export declare class OxFlowEditor extends LitElement {
|
|
9
|
-
static styles: import("lit").CSSResult[];
|
|
10
|
-
static getUniqueId(): string;
|
|
11
|
-
availableNodeTypes: {
|
|
12
|
-
[type: string]: FlowNodeImplementation;
|
|
13
|
-
};
|
|
14
|
-
model: {
|
|
15
|
-
nodes: FlowNodeModel[];
|
|
16
|
-
edges: FlowEdgeModel[];
|
|
17
|
-
};
|
|
18
|
-
private mode;
|
|
19
|
-
private logs;
|
|
20
|
-
private edgeGuide;
|
|
21
|
-
private flowExecutor?;
|
|
22
|
-
private _nodes;
|
|
23
|
-
private _edges;
|
|
24
|
-
private _selected;
|
|
25
|
-
private pointerEventHandler;
|
|
26
|
-
private keydownEventHandler;
|
|
27
|
-
private dndEventHandler;
|
|
28
|
-
private flowContext;
|
|
29
|
-
private flowEditContext;
|
|
30
|
-
private flowDebugContext;
|
|
31
|
-
/** 렌더링 */
|
|
32
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
33
|
-
connectedCallback(): void;
|
|
34
|
-
disconnectedCallback(): void;
|
|
35
|
-
updated(changes: PropertyValues<this>): void;
|
|
36
|
-
setAvailableNodeTypes(availableNodeTypes: {
|
|
37
|
-
[type: string]: FlowNodeImplementation;
|
|
38
|
-
}): void;
|
|
39
|
-
get context(): FlowContextType;
|
|
40
|
-
getModel(): {
|
|
41
|
-
nodes: {
|
|
42
|
-
id: string;
|
|
43
|
-
label: string | undefined;
|
|
44
|
-
type: string;
|
|
45
|
-
pos: {
|
|
46
|
-
x: number;
|
|
47
|
-
y: number;
|
|
48
|
-
};
|
|
49
|
-
size: {
|
|
50
|
-
w: number;
|
|
51
|
-
h: number;
|
|
52
|
-
};
|
|
53
|
-
options: {
|
|
54
|
-
[key: string]: any;
|
|
55
|
-
} | undefined;
|
|
56
|
-
}[];
|
|
57
|
-
edges: {
|
|
58
|
-
id: string;
|
|
59
|
-
label: string | undefined;
|
|
60
|
-
from: import("./types.js").AnchorPointer;
|
|
61
|
-
to: import("./types.js").AnchorPointer;
|
|
62
|
-
weight: number | undefined;
|
|
63
|
-
}[];
|
|
64
|
-
};
|
|
65
|
-
get nodes(): FlowNode[];
|
|
66
|
-
set nodes(nodes: FlowNode[]);
|
|
67
|
-
get edges(): FlowEdge[];
|
|
68
|
-
set edges(edges: FlowEdge[]);
|
|
69
|
-
get selected(): FlowEntity | null;
|
|
70
|
-
updateFlowContext(partial: Partial<FlowContextType>): void;
|
|
71
|
-
set selected(selected: FlowEntity | null);
|
|
72
|
-
addFlowNode(node: FlowNode, withSelect?: boolean): void;
|
|
73
|
-
addFlowEdge(edge: FlowEdge, withSelect?: boolean): void;
|
|
74
|
-
drawEdgeGuide(edgeGuide: any): void;
|
|
75
|
-
/** 노드 삭제 */
|
|
76
|
-
deleteEntity(target: FlowEntity): void;
|
|
77
|
-
private setMode;
|
|
78
|
-
/** 플로우 실행 */
|
|
79
|
-
private executeFlow;
|
|
80
|
-
/** 플로우 일시정지 */
|
|
81
|
-
private pauseFlow;
|
|
82
|
-
/** 플로우 정지 */
|
|
83
|
-
private stopFlow;
|
|
84
|
-
private stepOver;
|
|
85
|
-
private stepInto;
|
|
86
|
-
private stepOut;
|
|
87
|
-
private continueExecution;
|
|
88
|
-
onNodeUpdated(updatedNode: FlowNode): void;
|
|
89
|
-
addLog(log: string): void;
|
|
90
|
-
private toggleBreakpoint;
|
|
91
|
-
private setCurrentExecutionNode;
|
|
92
|
-
private runLayout;
|
|
93
|
-
private onDblClick;
|
|
94
|
-
}
|