@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,249 +0,0 @@
|
|
|
1
|
-
import '../src/ox-flow-editor.js';
|
|
2
|
-
import '@material/web/icon/icon.js';
|
|
3
|
-
import { html } from 'lit';
|
|
4
|
-
import availableNodeTypes from '../src/nodes/index.js';
|
|
5
|
-
export default {
|
|
6
|
-
title: 'ox-flow-editor',
|
|
7
|
-
component: 'ox-flow-editor',
|
|
8
|
-
argTypes: {
|
|
9
|
-
model: { control: 'object' }
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
const Template = ({ model }) => html `
|
|
13
|
-
<link
|
|
14
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
15
|
-
rel="stylesheet"
|
|
16
|
-
/>
|
|
17
|
-
<link
|
|
18
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
19
|
-
rel="stylesheet"
|
|
20
|
-
/>
|
|
21
|
-
<link
|
|
22
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
23
|
-
rel="stylesheet"
|
|
24
|
-
/>
|
|
25
|
-
|
|
26
|
-
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
27
|
-
<link href="/themes/light.css" rel="stylesheet" />
|
|
28
|
-
<link href="/themes/dark.css" rel="stylesheet" />
|
|
29
|
-
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
30
|
-
<link href="/themes/grist-theme.css" rel="stylesheet" />
|
|
31
|
-
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
32
|
-
|
|
33
|
-
<style>
|
|
34
|
-
ox-flow-editor {
|
|
35
|
-
width: 100%;
|
|
36
|
-
height: 1200px;
|
|
37
|
-
display: flex;
|
|
38
|
-
}
|
|
39
|
-
</style>
|
|
40
|
-
|
|
41
|
-
<ox-flow-editor .availableNodeTypes=${availableNodeTypes} .model=${model}></ox-flow-editor>
|
|
42
|
-
`;
|
|
43
|
-
export const Regular = Template.bind({});
|
|
44
|
-
Regular.args = {
|
|
45
|
-
model: {
|
|
46
|
-
nodes: [],
|
|
47
|
-
edges: []
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
export const Standard = Template.bind({});
|
|
51
|
-
Standard.args = {
|
|
52
|
-
model: {
|
|
53
|
-
nodes: [
|
|
54
|
-
{
|
|
55
|
-
id: 'start-1',
|
|
56
|
-
type: 'start',
|
|
57
|
-
label: 'Start',
|
|
58
|
-
pos: { x: 200, y: 100 }
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: 'task-1',
|
|
62
|
-
type: 'task',
|
|
63
|
-
label: 'Task',
|
|
64
|
-
pos: { x: 200, y: 250 }
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id: 'decision-1',
|
|
68
|
-
type: 'decision',
|
|
69
|
-
label: 'Decision',
|
|
70
|
-
pos: { x: 200, y: 400 }
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
id: 'task-2',
|
|
74
|
-
type: 'task',
|
|
75
|
-
label: 'Yes Task',
|
|
76
|
-
pos: { x: 200, y: 550 }
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: 'task-3',
|
|
80
|
-
type: 'task',
|
|
81
|
-
label: 'No Task',
|
|
82
|
-
pos: { x: 360, y: 550 }
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: 'end-1',
|
|
86
|
-
type: 'end',
|
|
87
|
-
label: 'End',
|
|
88
|
-
pos: { x: 200, y: 700 }
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
edges: [
|
|
92
|
-
{
|
|
93
|
-
id: 'edge1',
|
|
94
|
-
from: { nodeId: 'start-1', anchorId: 'out' },
|
|
95
|
-
to: { nodeId: 'task-1', anchorId: 'in' }
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: 'edge2',
|
|
99
|
-
from: { nodeId: 'task-1', anchorId: 'out' },
|
|
100
|
-
to: { nodeId: 'decision-1', anchorId: 'in' }
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
id: 'edge3',
|
|
104
|
-
from: { nodeId: 'decision-1', anchorId: 'yes' },
|
|
105
|
-
to: { nodeId: 'task-2', anchorId: 'in' },
|
|
106
|
-
label: 'Yes',
|
|
107
|
-
weight: 2
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
id: 'edge4',
|
|
111
|
-
from: { nodeId: 'decision-1', anchorId: 'no' },
|
|
112
|
-
to: { nodeId: 'task-3', anchorId: 'in' },
|
|
113
|
-
label: 'No',
|
|
114
|
-
weight: 1
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
id: 'edge5',
|
|
118
|
-
from: { nodeId: 'task-2', anchorId: 'out' },
|
|
119
|
-
to: { nodeId: 'end-1', anchorId: 'in' }
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
id: 'edge6',
|
|
123
|
-
from: { nodeId: 'task-3', anchorId: 'out' },
|
|
124
|
-
to: { nodeId: 'end-1', anchorId: 'in' }
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
export const Select = Template.bind({});
|
|
130
|
-
Select.args = {
|
|
131
|
-
model: {
|
|
132
|
-
nodes: [
|
|
133
|
-
{
|
|
134
|
-
id: 'start-1',
|
|
135
|
-
type: 'start',
|
|
136
|
-
label: 'Start',
|
|
137
|
-
pos: { x: 450, y: 100 }
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
id: 'task-0',
|
|
141
|
-
type: 'task',
|
|
142
|
-
label: 'Task',
|
|
143
|
-
pos: { x: 450, y: 250 }
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
id: 'select-1',
|
|
147
|
-
type: 'select',
|
|
148
|
-
label: 'Select',
|
|
149
|
-
options: {
|
|
150
|
-
outputCount: 4
|
|
151
|
-
},
|
|
152
|
-
pos: { x: 450, y: 400 }
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
id: 'task-1',
|
|
156
|
-
type: 'task',
|
|
157
|
-
label: 'Task 1',
|
|
158
|
-
pos: { x: 220, y: 550 }
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
id: 'task-2',
|
|
162
|
-
type: 'task',
|
|
163
|
-
label: 'Task 2',
|
|
164
|
-
pos: { x: 370, y: 550 }
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
id: 'task-3',
|
|
168
|
-
type: 'task',
|
|
169
|
-
label: 'Task 3',
|
|
170
|
-
pos: { x: 520, y: 550 }
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
id: 'task-4',
|
|
174
|
-
type: 'task',
|
|
175
|
-
label: 'Task 4',
|
|
176
|
-
pos: { x: 670, y: 550 }
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
id: 'end-1',
|
|
180
|
-
type: 'end',
|
|
181
|
-
label: 'End',
|
|
182
|
-
pos: { x: 450, y: 700 }
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
edges: [
|
|
186
|
-
{
|
|
187
|
-
id: 'edge1',
|
|
188
|
-
from: { nodeId: 'start-1', anchorId: 'out' },
|
|
189
|
-
to: { nodeId: 'task-0', anchorId: 'in' }
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
id: 'edge2',
|
|
193
|
-
from: { nodeId: 'task-0', anchorId: 'out' },
|
|
194
|
-
to: { nodeId: 'select-1', anchorId: 'in' },
|
|
195
|
-
label: 'case 1',
|
|
196
|
-
weight: 3
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
id: 'edge3',
|
|
200
|
-
from: { nodeId: 'select-1', anchorId: 'out-1' },
|
|
201
|
-
to: { nodeId: 'task-1', anchorId: 'in' },
|
|
202
|
-
label: 'case 1',
|
|
203
|
-
weight: 4
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
id: 'edge4',
|
|
207
|
-
from: { nodeId: 'select-1', anchorId: 'out-2' },
|
|
208
|
-
to: { nodeId: 'task-2', anchorId: 'in' },
|
|
209
|
-
label: 'case 2',
|
|
210
|
-
weight: 3
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
id: 'edge5',
|
|
214
|
-
from: { nodeId: 'select-1', anchorId: 'out-3' },
|
|
215
|
-
to: { nodeId: 'task-3', anchorId: 'in' },
|
|
216
|
-
label: 'case 3',
|
|
217
|
-
weight: 2
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
id: 'edge6',
|
|
221
|
-
from: { nodeId: 'select-1', anchorId: 'out-4' },
|
|
222
|
-
to: { nodeId: 'task-4', anchorId: 'in' },
|
|
223
|
-
label: 'case 4',
|
|
224
|
-
weight: 1
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
id: 'edge7',
|
|
228
|
-
from: { nodeId: 'task-1', anchorId: 'out' },
|
|
229
|
-
to: { nodeId: 'end-1', anchorId: 'in' }
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
id: 'edge8',
|
|
233
|
-
from: { nodeId: 'task-2', anchorId: 'out' },
|
|
234
|
-
to: { nodeId: 'end-1', anchorId: 'in' }
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
id: 'edge9',
|
|
238
|
-
from: { nodeId: 'task-3', anchorId: 'out' },
|
|
239
|
-
to: { nodeId: 'end-1', anchorId: 'in' }
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
id: 'edge10',
|
|
243
|
-
from: { nodeId: 'task-4', anchorId: 'out' },
|
|
244
|
-
to: { nodeId: 'end-1', anchorId: 'in' }
|
|
245
|
-
}
|
|
246
|
-
]
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
//# sourceMappingURL=ox-flow-editor.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ox-flow-editor.stories.js","sourceRoot":"","sources":["../../stories/ox-flow-editor.stories.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAA;AACjC,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAG1C,OAAO,kBAAkB,MAAM,uBAAuB,CAAA;AAEtD,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAC7B;CACF,CAAA;AAYD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA6BvB,kBAAkB,WAAW,KAAkB;CACtF,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE;QACL,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;KACV;CACF,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACzC,QAAQ,CAAC,IAAI,GAAG;IACd,KAAK,EAAE;QACL,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,SAAS;gBACb,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,OAAO;gBACd,G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;gBACf,MAAM,EAAE,CAAC;aACV;YACD;gBACE,EAAE,EAAE,OAAO;gBACX,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAC3C,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;aACxC;YACD;gBACE,EAAE,EAAE,OAAO;gBACX,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAC3C,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;aACxC;YACD;gBACE,EAAE,EAAE,OAAO;gBACX,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAC3C,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;aACxC;YACD;gBACE,EAAE,EAAE,QAAQ;gBACZ,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAC3C,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;aACxC;SACF;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-flow-editor.js'\nimport '@material/web/icon/icon.js'\n\nimport { html, TemplateResult } from 'lit'\n\nimport { FlowModel } from '../src/types.js'\nimport availableNodeTypes from '../src/nodes/index.js'\n\nexport default {\n title: 'ox-flow-editor',\n component: 'ox-flow-editor',\n argTypes: {\n model: { control: 'object' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n model: object\n}\n\nconst Template: Story<ArgTypes> = ({ model }: ArgTypes) => html`\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n <link href=\"/themes/grist-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/form-theme.css\" rel=\"stylesheet\" />\n\n <style>\n ox-flow-editor {\n width: 100%;\n height: 1200px;\n display: flex;\n }\n </style>\n\n <ox-flow-editor .availableNodeTypes=${availableNodeTypes} .model=${model as FlowModel}></ox-flow-editor>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n model: {\n nodes: [],\n edges: []\n }\n}\n\nexport const Standard = Template.bind({})\nStandard.args = {\n model: {\n nodes: [\n {\n id: 'start-1',\n type: 'start',\n label: 'Start',\n pos: { x: 200, y: 100 }\n },\n {\n id: 'task-1',\n type: 'task',\n label: 'Task',\n pos: { x: 200, y: 250 }\n },\n {\n id: 'decision-1',\n type: 'decision',\n label: 'Decision',\n pos: { x: 200, y: 400 }\n },\n {\n id: 'task-2',\n type: 'task',\n label: 'Yes Task',\n pos: { x: 200, y: 550 }\n },\n {\n id: 'task-3',\n type: 'task',\n label: 'No Task',\n pos: { x: 360, y: 550 }\n },\n {\n id: 'end-1',\n type: 'end',\n label: 'End',\n pos: { x: 200, y: 700 }\n }\n ],\n edges: [\n {\n id: 'edge1',\n from: { nodeId: 'start-1', anchorId: 'out' },\n to: { nodeId: 'task-1', anchorId: 'in' }\n },\n {\n id: 'edge2',\n from: { nodeId: 'task-1', anchorId: 'out' },\n to: { nodeId: 'decision-1', anchorId: 'in' }\n },\n {\n id: 'edge3',\n from: { nodeId: 'decision-1', anchorId: 'yes' },\n to: { nodeId: 'task-2', anchorId: 'in' },\n label: 'Yes',\n weight: 2\n },\n {\n id: 'edge4',\n from: { nodeId: 'decision-1', anchorId: 'no' },\n to: { nodeId: 'task-3', anchorId: 'in' },\n label: 'No',\n weight: 1\n },\n {\n id: 'edge5',\n from: { nodeId: 'task-2', anchorId: 'out' },\n to: { nodeId: 'end-1', anchorId: 'in' }\n },\n {\n id: 'edge6',\n from: { nodeId: 'task-3', anchorId: 'out' },\n to: { nodeId: 'end-1', anchorId: 'in' }\n }\n ]\n }\n}\n\nexport const Select = Template.bind({})\nSelect.args = {\n model: {\n nodes: [\n {\n id: 'start-1',\n type: 'start',\n label: 'Start',\n pos: { x: 450, y: 100 }\n },\n {\n id: 'task-0',\n type: 'task',\n label: 'Task',\n pos: { x: 450, y: 250 }\n },\n {\n id: 'select-1',\n type: 'select',\n label: 'Select',\n options: {\n outputCount: 4\n },\n pos: { x: 450, y: 400 }\n },\n {\n id: 'task-1',\n type: 'task',\n label: 'Task 1',\n pos: { x: 220, y: 550 }\n },\n {\n id: 'task-2',\n type: 'task',\n label: 'Task 2',\n pos: { x: 370, y: 550 }\n },\n {\n id: 'task-3',\n type: 'task',\n label: 'Task 3',\n pos: { x: 520, y: 550 }\n },\n {\n id: 'task-4',\n type: 'task',\n label: 'Task 4',\n pos: { x: 670, y: 550 }\n },\n {\n id: 'end-1',\n type: 'end',\n label: 'End',\n pos: { x: 450, y: 700 }\n }\n ],\n edges: [\n {\n id: 'edge1',\n from: { nodeId: 'start-1', anchorId: 'out' },\n to: { nodeId: 'task-0', anchorId: 'in' }\n },\n {\n id: 'edge2',\n from: { nodeId: 'task-0', anchorId: 'out' },\n to: { nodeId: 'select-1', anchorId: 'in' },\n label: 'case 1',\n weight: 3\n },\n {\n id: 'edge3',\n from: { nodeId: 'select-1', anchorId: 'out-1' },\n to: { nodeId: 'task-1', anchorId: 'in' },\n label: 'case 1',\n weight: 4\n },\n {\n id: 'edge4',\n from: { nodeId: 'select-1', anchorId: 'out-2' },\n to: { nodeId: 'task-2', anchorId: 'in' },\n label: 'case 2',\n weight: 3\n },\n {\n id: 'edge5',\n from: { nodeId: 'select-1', anchorId: 'out-3' },\n to: { nodeId: 'task-3', anchorId: 'in' },\n label: 'case 3',\n weight: 2\n },\n {\n id: 'edge6',\n from: { nodeId: 'select-1', anchorId: 'out-4' },\n to: { nodeId: 'task-4', anchorId: 'in' },\n label: 'case 4',\n weight: 1\n },\n {\n id: 'edge7',\n from: { nodeId: 'task-1', anchorId: 'out' },\n to: { nodeId: 'end-1', anchorId: 'in' }\n },\n {\n id: 'edge8',\n from: { nodeId: 'task-2', anchorId: 'out' },\n to: { nodeId: 'end-1', anchorId: 'in' }\n },\n {\n id: 'edge9',\n from: { nodeId: 'task-3', anchorId: 'out' },\n to: { nodeId: 'end-1', anchorId: 'in' }\n },\n {\n id: 'edge10',\n from: { nodeId: 'task-4', anchorId: 'out' },\n to: { nodeId: 'end-1', anchorId: 'in' }\n }\n ]\n }\n}\n"]}
|