@apform-ui/core 1.14.1 → 1.15.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/apform-ui.css +1 -1
- package/dist/apform-ui.js +12024 -17922
- package/dist/apform-ui.umd.cjs +71 -71
- package/dist/bpmn.css +1 -1
- package/dist/bpmn.js +145 -268
- package/dist/bpmn.umd.cjs +1 -1
- package/dist/chat.css +1 -1
- package/dist/chat.js +7379 -11176
- package/dist/chat.umd.cjs +62 -62
- package/dist/components/NodeResultPreview/NodeResultPreview.vue.d.ts +10 -1
- package/dist/index.d.ts +2 -2
- package/dist/utils/businessResultTables.d.ts +10 -1
- package/dist/utils/resolveResultBlocks.d.ts +21 -0
- package/package.json +1 -1
package/dist/bpmn.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.apf-bpmn-node[data-v-
|
|
1
|
+
.apf-bpmn-node[data-v-06a5d706]{display:flex;flex-direction:column;align-items:center;gap:4px}.apf-bpmn-start[data-v-06a5d706]{width:32px;height:32px;border-radius:50%;background:color-mix(in srgb,var(--c-success, #52c41a) 15%,transparent);border:2px solid var(--c-success, #52c41a);display:flex;align-items:center;justify-content:center}.apf-bpmn-start__inner[data-v-06a5d706]{width:16px;height:16px;border-radius:50%;background:var(--c-success, #52c41a)}.apf-bpmn-node__label[data-v-06a5d706]{font-size:11px;color:var(--c-text-primary, #333);white-space:nowrap;max-width:100px;overflow:hidden;text-overflow:ellipsis}.apf-bpmn-node[data-v-6c6caa4e]{display:flex;flex-direction:column;align-items:center;gap:4px}.apf-bpmn-end[data-v-6c6caa4e]{width:32px;height:32px;border-radius:50%;background:color-mix(in srgb,var(--c-danger, #e50113) 8%,transparent);border:2px solid var(--c-danger, #e50113);display:flex;align-items:center;justify-content:center}.apf-bpmn-end__inner[data-v-6c6caa4e]{width:16px;height:16px;border-radius:50%;background:var(--c-danger, #e50113)}.apf-bpmn-node__label[data-v-6c6caa4e]{font-size:11px;color:var(--c-text-primary, #333);white-space:nowrap;max-width:100px;overflow:hidden;text-overflow:ellipsis}.apf-bpmn-node[data-v-5b6a4a18]{display:flex;flex-direction:column;align-items:center}.apf-bpmn-task[data-v-5b6a4a18]{min-width:100px;max-width:160px;padding:8px 12px;background:color-mix(in srgb,var(--c-info, #4581e9) 8%,transparent);border:1.5px solid var(--c-info, #4581e9);border-radius:6px;display:flex;align-items:center;gap:6px}.apf-bpmn-task__icon[data-v-5b6a4a18]{font-size:14px;flex-shrink:0}.apf-bpmn-task__label[data-v-5b6a4a18]{font-size:11px;color:var(--c-text-primary, #333);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.apf-bpmn-node[data-v-3ff1b368]{display:flex;flex-direction:column;align-items:center;gap:4px}.apf-bpmn-gateway[data-v-3ff1b368]{width:32px;height:32px;background:color-mix(in srgb,var(--c-warning, #faad14) 10%,transparent);border:1.5px solid var(--c-warning, #faad14);transform:rotate(45deg);display:flex;align-items:center;justify-content:center}.apf-bpmn-gateway__icon[data-v-3ff1b368]{transform:rotate(-45deg);font-size:14px;color:var(--c-warning, #faad14)}.apf-bpmn-node__label[data-v-3ff1b368]{font-size:11px;color:var(--c-text-primary, #333);white-space:nowrap;max-width:100px;overflow:hidden;text-overflow:ellipsis}.apf-bpmn-canvas[data-v-41401ec3]{width:100%;height:100%}
|
package/dist/bpmn.js
CHANGED
|
@@ -1,305 +1,182 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { Background as
|
|
4
|
-
import { Controls as
|
|
1
|
+
import { defineComponent as m, openBlock as v, createElementBlock as k, createElementVNode as o, toDisplayString as c, createVNode as n, unref as t, computed as T, watch as x, nextTick as $, createBlock as I, withCtx as _, normalizeProps as w, guardReactiveProps as b } from "vue";
|
|
2
|
+
import { Handle as d, Position as l, MarkerType as G, useVueFlow as V, VueFlow as C } from "@vue-flow/core";
|
|
3
|
+
import { Background as F } from "@vue-flow/background";
|
|
4
|
+
import { Controls as N } from "@vue-flow/controls";
|
|
5
5
|
import "@vue-flow/core/dist/style.css";
|
|
6
6
|
import "@vue-flow/core/dist/theme-default.css";
|
|
7
7
|
import "@vue-flow/controls/dist/style.css";
|
|
8
|
-
const
|
|
8
|
+
const z = { class: "apf-bpmn-node" }, S = { class: "apf-bpmn-node__label" }, M = /* @__PURE__ */ m({
|
|
9
9
|
__name: "PreviewStartEvent",
|
|
10
10
|
props: {
|
|
11
|
-
data: {
|
|
11
|
+
data: {}
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
setup(e) {
|
|
14
|
+
return (i, s) => (v(), k("div", z, [
|
|
15
|
+
s[0] || (s[0] = o("div", { class: "apf-bpmn-start" }, [
|
|
16
|
+
o("div", { class: "apf-bpmn-start__inner" })
|
|
17
|
+
], -1)),
|
|
18
|
+
o("div", S, c(e.data.label), 1),
|
|
19
|
+
n(t(d), {
|
|
20
|
+
type: "source",
|
|
21
|
+
position: t(l).Bottom
|
|
22
|
+
}, null, 8, ["position"])
|
|
23
|
+
]));
|
|
21
24
|
}
|
|
22
|
-
}), u = (
|
|
23
|
-
const
|
|
24
|
-
for (const [
|
|
25
|
-
|
|
26
|
-
return
|
|
27
|
-
},
|
|
28
|
-
function q(a, n, t, e, i, d) {
|
|
29
|
-
return v(), w("div", V, [
|
|
30
|
-
n[0] || (n[0] = r(
|
|
31
|
-
"div",
|
|
32
|
-
{ class: "apf-bpmn-start" },
|
|
33
|
-
[
|
|
34
|
-
r("div", { class: "apf-bpmn-start__inner" })
|
|
35
|
-
],
|
|
36
|
-
-1
|
|
37
|
-
/* CACHED */
|
|
38
|
-
)),
|
|
39
|
-
r(
|
|
40
|
-
"div",
|
|
41
|
-
j,
|
|
42
|
-
p(t.data.label),
|
|
43
|
-
1
|
|
44
|
-
/* TEXT */
|
|
45
|
-
),
|
|
46
|
-
s(e.Handle, {
|
|
47
|
-
type: "source",
|
|
48
|
-
position: e.Position.Bottom
|
|
49
|
-
}, null, 8, ["position"])
|
|
50
|
-
]);
|
|
51
|
-
}
|
|
52
|
-
const N = /* @__PURE__ */ u(O, [["render", q], ["__scopeId", "data-v-da2f5a21"], ["__file", "/Users/yangdongnan/work/schema-platform/ui/packages/core/src/components/Chat/BpmnFlowPreviewCanvas/nodes/PreviewStartEvent.vue"]]), $ = /* @__PURE__ */ _({
|
|
25
|
+
}), u = (e, i) => {
|
|
26
|
+
const s = e.__vccOpts || e;
|
|
27
|
+
for (const [p, f] of i)
|
|
28
|
+
s[p] = f;
|
|
29
|
+
return s;
|
|
30
|
+
}, O = /* @__PURE__ */ u(M, [["__scopeId", "data-v-06a5d706"]]), R = { class: "apf-bpmn-node" }, W = { class: "apf-bpmn-node__label" }, A = /* @__PURE__ */ m({
|
|
53
31
|
__name: "PreviewEndEvent",
|
|
54
32
|
props: {
|
|
55
|
-
data: {
|
|
33
|
+
data: {}
|
|
56
34
|
},
|
|
57
|
-
setup(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
35
|
+
setup(e) {
|
|
36
|
+
return (i, s) => (v(), k("div", R, [
|
|
37
|
+
n(t(d), {
|
|
38
|
+
type: "target",
|
|
39
|
+
position: t(l).Top
|
|
40
|
+
}, null, 8, ["position"]),
|
|
41
|
+
s[0] || (s[0] = o("div", { class: "apf-bpmn-end" }, [
|
|
42
|
+
o("div", { class: "apf-bpmn-end__inner" })
|
|
43
|
+
], -1)),
|
|
44
|
+
o("div", W, c(e.data.label), 1)
|
|
45
|
+
]));
|
|
65
46
|
}
|
|
66
|
-
}),
|
|
67
|
-
function A(a, n, t, e, i, d) {
|
|
68
|
-
return v(), w("div", z, [
|
|
69
|
-
s(e.Handle, {
|
|
70
|
-
type: "target",
|
|
71
|
-
position: e.Position.Top
|
|
72
|
-
}, null, 8, ["position"]),
|
|
73
|
-
n[0] || (n[0] = r(
|
|
74
|
-
"div",
|
|
75
|
-
{ class: "apf-bpmn-end" },
|
|
76
|
-
[
|
|
77
|
-
r("div", { class: "apf-bpmn-end__inner" })
|
|
78
|
-
],
|
|
79
|
-
-1
|
|
80
|
-
/* CACHED */
|
|
81
|
-
)),
|
|
82
|
-
r(
|
|
83
|
-
"div",
|
|
84
|
-
U,
|
|
85
|
-
p(t.data.label),
|
|
86
|
-
1
|
|
87
|
-
/* TEXT */
|
|
88
|
-
)
|
|
89
|
-
]);
|
|
90
|
-
}
|
|
91
|
-
const M = /* @__PURE__ */ u($, [["render", A], ["__scopeId", "data-v-fda0cd5a"], ["__file", "/Users/yangdongnan/work/schema-platform/ui/packages/core/src/components/Chat/BpmnFlowPreviewCanvas/nodes/PreviewEndEvent.vue"]]), R = /* @__PURE__ */ _({
|
|
47
|
+
}), D = /* @__PURE__ */ u(A, [["__scopeId", "data-v-6c6caa4e"]]), H = { class: "apf-bpmn-node" }, Y = { class: "apf-bpmn-task" }, j = { class: "apf-bpmn-task__icon" }, q = { class: "apf-bpmn-task__label" }, J = /* @__PURE__ */ m({
|
|
92
48
|
__name: "PreviewTask",
|
|
93
49
|
props: {
|
|
94
|
-
data: {
|
|
50
|
+
data: {}
|
|
95
51
|
},
|
|
96
|
-
setup(
|
|
97
|
-
|
|
98
|
-
const e = { taskIcons: {
|
|
52
|
+
setup(e) {
|
|
53
|
+
const i = {
|
|
99
54
|
userTask: "👤",
|
|
100
55
|
serviceTask: "⚙",
|
|
101
56
|
scriptTask: "📜",
|
|
102
57
|
sendTask: "📤",
|
|
103
58
|
receiveTask: "📥"
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
59
|
+
};
|
|
60
|
+
return (s, p) => (v(), k("div", H, [
|
|
61
|
+
n(t(d), {
|
|
62
|
+
type: "target",
|
|
63
|
+
position: t(l).Top
|
|
64
|
+
}, null, 8, ["position"]),
|
|
65
|
+
o("div", Y, [
|
|
66
|
+
o("span", j, c(i[e.data.bpmnType] || "📋"), 1),
|
|
67
|
+
o("span", q, c(e.data.label), 1)
|
|
68
|
+
]),
|
|
69
|
+
n(t(d), {
|
|
70
|
+
type: "source",
|
|
71
|
+
position: t(l).Bottom
|
|
72
|
+
}, null, 8, ["position"])
|
|
73
|
+
]));
|
|
110
74
|
}
|
|
111
|
-
}),
|
|
112
|
-
function K(a, n, t, e, i, d) {
|
|
113
|
-
return v(), w("div", W, [
|
|
114
|
-
s(e.Handle, {
|
|
115
|
-
type: "target",
|
|
116
|
-
position: e.Position.Top
|
|
117
|
-
}, null, 8, ["position"]),
|
|
118
|
-
r("div", D, [
|
|
119
|
-
r(
|
|
120
|
-
"span",
|
|
121
|
-
Y,
|
|
122
|
-
p(e.taskIcons[t.data.bpmnType] || "📋"),
|
|
123
|
-
1
|
|
124
|
-
/* TEXT */
|
|
125
|
-
),
|
|
126
|
-
r(
|
|
127
|
-
"span",
|
|
128
|
-
J,
|
|
129
|
-
p(t.data.label),
|
|
130
|
-
1
|
|
131
|
-
/* TEXT */
|
|
132
|
-
)
|
|
133
|
-
]),
|
|
134
|
-
s(e.Handle, {
|
|
135
|
-
type: "source",
|
|
136
|
-
position: e.Position.Bottom
|
|
137
|
-
}, null, 8, ["position"])
|
|
138
|
-
]);
|
|
139
|
-
}
|
|
140
|
-
const L = /* @__PURE__ */ u(R, [["render", K], ["__scopeId", "data-v-e2c4c526"], ["__file", "/Users/yangdongnan/work/schema-platform/ui/packages/core/src/components/Chat/BpmnFlowPreviewCanvas/nodes/PreviewTask.vue"]]), Q = /* @__PURE__ */ _({
|
|
75
|
+
}), K = /* @__PURE__ */ u(J, [["__scopeId", "data-v-5b6a4a18"]]), L = { class: "apf-bpmn-node" }, Q = { class: "apf-bpmn-gateway" }, U = { class: "apf-bpmn-gateway__icon" }, X = { class: "apf-bpmn-node__label" }, Z = /* @__PURE__ */ m({
|
|
141
76
|
__name: "PreviewGateway",
|
|
142
77
|
props: {
|
|
143
|
-
data: {
|
|
78
|
+
data: {}
|
|
144
79
|
},
|
|
145
|
-
setup(
|
|
146
|
-
|
|
147
|
-
const e = { gatewayIcons: {
|
|
80
|
+
setup(e) {
|
|
81
|
+
const i = {
|
|
148
82
|
exclusiveGateway: "✕",
|
|
149
83
|
parallelGateway: "+",
|
|
150
84
|
inclusiveGateway: "◎"
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
85
|
+
};
|
|
86
|
+
return (s, p) => (v(), k("div", L, [
|
|
87
|
+
n(t(d), {
|
|
88
|
+
type: "target",
|
|
89
|
+
position: t(l).Top
|
|
90
|
+
}, null, 8, ["position"]),
|
|
91
|
+
o("div", Q, [
|
|
92
|
+
o("span", U, c(i[e.data.bpmnType] || "◆"), 1)
|
|
93
|
+
]),
|
|
94
|
+
o("div", X, c(e.data.label), 1),
|
|
95
|
+
n(t(d), {
|
|
96
|
+
type: "source",
|
|
97
|
+
position: t(l).Bottom
|
|
98
|
+
}, null, 8, ["position"])
|
|
99
|
+
]));
|
|
157
100
|
}
|
|
158
|
-
}),
|
|
159
|
-
function ne(a, n, t, e, i, d) {
|
|
160
|
-
return v(), w("div", X, [
|
|
161
|
-
s(e.Handle, {
|
|
162
|
-
type: "target",
|
|
163
|
-
position: e.Position.Top
|
|
164
|
-
}, null, 8, ["position"]),
|
|
165
|
-
r("div", Z, [
|
|
166
|
-
r(
|
|
167
|
-
"span",
|
|
168
|
-
ee,
|
|
169
|
-
p(e.gatewayIcons[t.data.bpmnType] || "◆"),
|
|
170
|
-
1
|
|
171
|
-
/* TEXT */
|
|
172
|
-
)
|
|
173
|
-
]),
|
|
174
|
-
r(
|
|
175
|
-
"div",
|
|
176
|
-
te,
|
|
177
|
-
p(t.data.label),
|
|
178
|
-
1
|
|
179
|
-
/* TEXT */
|
|
180
|
-
),
|
|
181
|
-
s(e.Handle, {
|
|
182
|
-
type: "source",
|
|
183
|
-
position: e.Position.Bottom
|
|
184
|
-
}, null, 8, ["position"])
|
|
185
|
-
]);
|
|
186
|
-
}
|
|
187
|
-
const ae = /* @__PURE__ */ u(Q, [["render", ne], ["__scopeId", "data-v-f93b454a"], ["__file", "/Users/yangdongnan/work/schema-platform/ui/packages/core/src/components/Chat/BpmnFlowPreviewCanvas/nodes/PreviewGateway.vue"]]), oe = /* @__PURE__ */ _({
|
|
101
|
+
}), ee = /* @__PURE__ */ u(Z, [["__scopeId", "data-v-3ff1b368"]]), te = /* @__PURE__ */ m({
|
|
188
102
|
__name: "BpmnFlowPreviewCanvas",
|
|
189
103
|
props: {
|
|
190
|
-
nodes: {
|
|
191
|
-
edges: {
|
|
192
|
-
flowId: {
|
|
104
|
+
nodes: {},
|
|
105
|
+
edges: {},
|
|
106
|
+
flowId: {}
|
|
193
107
|
},
|
|
194
108
|
emits: ["node-click", "fit-view"],
|
|
195
|
-
setup(
|
|
196
|
-
const
|
|
197
|
-
() =>
|
|
198
|
-
id:
|
|
199
|
-
type:
|
|
200
|
-
position:
|
|
201
|
-
data:
|
|
109
|
+
setup(e, { expose: i, emit: s }) {
|
|
110
|
+
const p = e, f = s, y = p.flowId ?? `apf-bpmn-preview-${Math.random().toString(36).slice(2, 8)}`, P = T(
|
|
111
|
+
() => p.nodes.map((a) => ({
|
|
112
|
+
id: a.id,
|
|
113
|
+
type: a.type,
|
|
114
|
+
position: a.position,
|
|
115
|
+
data: a.data,
|
|
202
116
|
draggable: !0
|
|
203
117
|
}))
|
|
204
|
-
),
|
|
205
|
-
() =>
|
|
206
|
-
id:
|
|
207
|
-
source:
|
|
208
|
-
target:
|
|
209
|
-
label:
|
|
118
|
+
), h = T(
|
|
119
|
+
() => p.edges.map((a) => ({
|
|
120
|
+
id: a.id,
|
|
121
|
+
source: a.source,
|
|
122
|
+
target: a.target,
|
|
123
|
+
label: a.label,
|
|
210
124
|
type: "smoothstep",
|
|
211
125
|
animated: !0,
|
|
212
|
-
markerEnd: { type:
|
|
126
|
+
markerEnd: { type: G.ArrowClosed },
|
|
213
127
|
style: { stroke: "var(--c-info, #4581e9)", strokeWidth: 1.5 }
|
|
214
128
|
}))
|
|
215
|
-
), { onNodeClick:
|
|
216
|
-
|
|
217
|
-
|
|
129
|
+
), { onNodeClick: E, fitView: g } = V({ id: y });
|
|
130
|
+
E(({ node: a }) => {
|
|
131
|
+
f("node-click", a.id, a.data);
|
|
218
132
|
});
|
|
219
|
-
function
|
|
220
|
-
|
|
133
|
+
function B() {
|
|
134
|
+
g({ padding: 0.2 }), f("fit-view");
|
|
221
135
|
}
|
|
222
|
-
|
|
223
|
-
() => [
|
|
136
|
+
return x(
|
|
137
|
+
() => [p.nodes, p.edges],
|
|
224
138
|
async () => {
|
|
225
|
-
await
|
|
139
|
+
await $(), setTimeout(() => g({ padding: 0.2 }), 100);
|
|
226
140
|
},
|
|
227
141
|
{ deep: !0 }
|
|
228
|
-
),
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
142
|
+
), i({ fitView: B }), (a, se) => (v(), I(t(C), {
|
|
143
|
+
id: t(y),
|
|
144
|
+
nodes: P.value,
|
|
145
|
+
edges: h.value,
|
|
146
|
+
"nodes-draggable": !0,
|
|
147
|
+
"nodes-connectable": !1,
|
|
148
|
+
"edges-updatable": !1,
|
|
149
|
+
"elements-selectable": !0,
|
|
150
|
+
"default-viewport": { zoom: 0.8, x: 0, y: 0 },
|
|
151
|
+
"min-zoom": 0.2,
|
|
152
|
+
"max-zoom": 2,
|
|
153
|
+
"fit-view-on-init": "",
|
|
154
|
+
class: "apf-bpmn-canvas"
|
|
155
|
+
}, {
|
|
156
|
+
"node-start-event": _((r) => [
|
|
157
|
+
n(O, w(b(r)), null, 16)
|
|
158
|
+
]),
|
|
159
|
+
"node-end-event": _((r) => [
|
|
160
|
+
n(D, w(b(r)), null, 16)
|
|
161
|
+
]),
|
|
162
|
+
"node-task": _((r) => [
|
|
163
|
+
n(K, w(b(r)), null, 16)
|
|
164
|
+
]),
|
|
165
|
+
"node-gateway": _((r) => [
|
|
166
|
+
n(ee, w(b(r)), null, 16)
|
|
167
|
+
]),
|
|
168
|
+
default: _(() => [
|
|
169
|
+
n(t(F), {
|
|
170
|
+
gap: 16,
|
|
171
|
+
size: 0.6,
|
|
172
|
+
color: "#e0e5ec"
|
|
173
|
+
}),
|
|
174
|
+
n(t(N), { "show-interactive": !1 })
|
|
175
|
+
]),
|
|
176
|
+
_: 1
|
|
177
|
+
}, 8, ["id", "nodes", "edges"]));
|
|
237
178
|
}
|
|
238
|
-
})
|
|
239
|
-
function se(a, n, t, e, i, d) {
|
|
240
|
-
return v(), x(e.VueFlow, {
|
|
241
|
-
id: e.instanceId,
|
|
242
|
-
nodes: e.vfNodes,
|
|
243
|
-
edges: e.vfEdges,
|
|
244
|
-
"nodes-draggable": !0,
|
|
245
|
-
"nodes-connectable": !1,
|
|
246
|
-
"edges-updatable": !1,
|
|
247
|
-
"elements-selectable": !0,
|
|
248
|
-
"default-viewport": { zoom: 0.8, x: 0, y: 0 },
|
|
249
|
-
"min-zoom": 0.2,
|
|
250
|
-
"max-zoom": 2,
|
|
251
|
-
"fit-view-on-init": "",
|
|
252
|
-
class: "apf-bpmn-canvas"
|
|
253
|
-
}, {
|
|
254
|
-
"node-start-event": l((c) => [
|
|
255
|
-
s(
|
|
256
|
-
e.PreviewStartEvent,
|
|
257
|
-
m(f(c)),
|
|
258
|
-
null,
|
|
259
|
-
16
|
|
260
|
-
/* FULL_PROPS */
|
|
261
|
-
)
|
|
262
|
-
]),
|
|
263
|
-
"node-end-event": l((c) => [
|
|
264
|
-
s(
|
|
265
|
-
e.PreviewEndEvent,
|
|
266
|
-
m(f(c)),
|
|
267
|
-
null,
|
|
268
|
-
16
|
|
269
|
-
/* FULL_PROPS */
|
|
270
|
-
)
|
|
271
|
-
]),
|
|
272
|
-
"node-task": l((c) => [
|
|
273
|
-
s(
|
|
274
|
-
e.PreviewTask,
|
|
275
|
-
m(f(c)),
|
|
276
|
-
null,
|
|
277
|
-
16
|
|
278
|
-
/* FULL_PROPS */
|
|
279
|
-
)
|
|
280
|
-
]),
|
|
281
|
-
"node-gateway": l((c) => [
|
|
282
|
-
s(
|
|
283
|
-
e.PreviewGateway,
|
|
284
|
-
m(f(c)),
|
|
285
|
-
null,
|
|
286
|
-
16
|
|
287
|
-
/* FULL_PROPS */
|
|
288
|
-
)
|
|
289
|
-
]),
|
|
290
|
-
default: l(() => [
|
|
291
|
-
s(e.Background, {
|
|
292
|
-
gap: 16,
|
|
293
|
-
size: 0.6,
|
|
294
|
-
color: "#e0e5ec"
|
|
295
|
-
}),
|
|
296
|
-
s(e.Controls, { "show-interactive": !1 })
|
|
297
|
-
]),
|
|
298
|
-
_: 1
|
|
299
|
-
/* STABLE */
|
|
300
|
-
}, 8, ["id", "nodes", "edges"]);
|
|
301
|
-
}
|
|
302
|
-
const ue = /* @__PURE__ */ u(oe, [["render", se], ["__scopeId", "data-v-7888bb09"], ["__file", "/Users/yangdongnan/work/schema-platform/ui/packages/core/src/components/Chat/BpmnFlowPreviewCanvas/BpmnFlowPreviewCanvas.vue"]]), re = {
|
|
179
|
+
}), le = /* @__PURE__ */ u(te, [["__scopeId", "data-v-41401ec3"]]), ae = {
|
|
303
180
|
startEvent: "start-event",
|
|
304
181
|
endEvent: "end-event",
|
|
305
182
|
userTask: "task",
|
|
@@ -311,15 +188,15 @@ const ue = /* @__PURE__ */ u(oe, [["render", se], ["__scopeId", "data-v-7888bb09
|
|
|
311
188
|
parallelGateway: "gateway",
|
|
312
189
|
inclusiveGateway: "gateway"
|
|
313
190
|
};
|
|
314
|
-
function
|
|
315
|
-
return
|
|
191
|
+
function _e(e) {
|
|
192
|
+
return ae[e] ?? "task";
|
|
316
193
|
}
|
|
317
194
|
export {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
195
|
+
ae as BPMN_TO_PREVIEW_VF_TYPE,
|
|
196
|
+
le as BpmnFlowPreviewCanvas,
|
|
197
|
+
D as BpmnPreviewEndEvent,
|
|
198
|
+
ee as BpmnPreviewGateway,
|
|
199
|
+
O as BpmnPreviewStartEvent,
|
|
200
|
+
K as BpmnPreviewTask,
|
|
201
|
+
_e as resolveBpmnPreviewNodeType
|
|
325
202
|
};
|
package/dist/bpmn.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@vue-flow/core"),require("@vue-flow/background"),require("@vue-flow/controls"),require("@vue-flow/core/dist/style.css"),require("@vue-flow/core/dist/theme-default.css"),require("@vue-flow/controls/dist/style.css")):typeof define=="function"&&define.amd?define(["exports","vue","@vue-flow/core","@vue-flow/background","@vue-flow/controls","@vue-flow/core/dist/style.css","@vue-flow/core/dist/theme-default.css","@vue-flow/controls/dist/style.css"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.ApformUIBpmn={},t.Vue,t.VueFlowCore,t.VueFlowBackground,t.VueFlowControls))})(this,(function(t,e,a,g,u){"use strict";const b={class:"apf-bpmn-node"},P={class:"apf-bpmn-node__label"},V=e.defineComponent({__name:"PreviewStartEvent",props:{data:{}},setup(n){return(i,s)=>(e.openBlock(),e.createElementBlock("div",b,[s[0]||(s[0]=e.createElementVNode("div",{class:"apf-bpmn-start"},[e.createElementVNode("div",{class:"apf-bpmn-start__inner"})],-1)),e.createElementVNode("div",P,e.toDisplayString(n.data.label),1),e.createVNode(e.unref(a.Handle),{type:"source",position:e.unref(a.Position).Bottom},null,8,["position"])]))}}),c=(n,i)=>{const s=n.__vccOpts||n;for(const[r,l]of i)s[r]=l;return s},p=c(V,[["__scopeId","data-v-06a5d706"]]),E={class:"apf-bpmn-node"},N={class:"apf-bpmn-node__label"},f=c(e.defineComponent({__name:"PreviewEndEvent",props:{data:{}},setup(n){return(i,s)=>(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(e.unref(a.Handle),{type:"target",position:e.unref(a.Position).Top},null,8,["position"]),s[0]||(s[0]=e.createElementVNode("div",{class:"apf-bpmn-end"},[e.createElementVNode("div",{class:"apf-bpmn-end__inner"})],-1)),e.createElementVNode("div",N,e.toDisplayString(n.data.label),1)]))}}),[["__scopeId","data-v-6c6caa4e"]]),T={class:"apf-bpmn-node"},h={class:"apf-bpmn-task"},B={class:"apf-bpmn-task__icon"},C={class:"apf-bpmn-task__label"},m=c(e.defineComponent({__name:"PreviewTask",props:{data:{}},setup(n){const i={userTask:"👤",serviceTask:"⚙",scriptTask:"📜",sendTask:"📤",receiveTask:"📥"};return(s,r)=>(e.openBlock(),e.createElementBlock("div",T,[e.createVNode(e.unref(a.Handle),{type:"target",position:e.unref(a.Position).Top},null,8,["position"]),e.createElementVNode("div",h,[e.createElementVNode("span",B,e.toDisplayString(i[n.data.bpmnType]||"📋"),1),e.createElementVNode("span",C,e.toDisplayString(n.data.label),1)]),e.createVNode(e.unref(a.Handle),{type:"source",position:e.unref(a.Position).Bottom},null,8,["position"])]))}}),[["__scopeId","data-v-5b6a4a18"]]),v={class:"apf-bpmn-node"},$={class:"apf-bpmn-gateway"},x={class:"apf-bpmn-gateway__icon"},I={class:"apf-bpmn-node__label"},_=c(e.defineComponent({__name:"PreviewGateway",props:{data:{}},setup(n){const i={exclusiveGateway:"✕",parallelGateway:"+",inclusiveGateway:"◎"};return(s,r)=>(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(a.Handle),{type:"target",position:e.unref(a.Position).Top},null,8,["position"]),e.createElementVNode("div",$,[e.createElementVNode("span",x,e.toDisplayString(i[n.data.bpmnType]||"◆"),1)]),e.createElementVNode("div",I,e.toDisplayString(n.data.label),1),e.createVNode(e.unref(a.Handle),{type:"source",position:e.unref(a.Position).Bottom},null,8,["position"])]))}}),[["__scopeId","data-v-3ff1b368"]]),S=c(e.defineComponent({__name:"BpmnFlowPreviewCanvas",props:{nodes:{},edges:{},flowId:{}},emits:["node-click","fit-view"],setup(n,{expose:i,emit:s}){const r=n,l=s,y=r.flowId??`apf-bpmn-preview-${Math.random().toString(36).slice(2,8)}`,G=e.computed(()=>r.nodes.map(o=>({id:o.id,type:o.type,position:o.position,data:o.data,draggable:!0}))),z=e.computed(()=>r.edges.map(o=>({id:o.id,source:o.source,target:o.target,label:o.label,type:"smoothstep",animated:!0,markerEnd:{type:a.MarkerType.ArrowClosed},style:{stroke:"var(--c-info, #4581e9)",strokeWidth:1.5}}))),{onNodeClick:q,fitView:k}=a.useVueFlow({id:y});q(({node:o})=>{l("node-click",o.id,o.data)});function D(){k({padding:.2}),l("fit-view")}return e.watch(()=>[r.nodes,r.edges],async()=>{await e.nextTick(),setTimeout(()=>k({padding:.2}),100)},{deep:!0}),i({fitView:D}),(o,W)=>(e.openBlock(),e.createBlock(e.unref(a.VueFlow),{id:e.unref(y),nodes:G.value,edges:z.value,"nodes-draggable":!0,"nodes-connectable":!1,"edges-updatable":!1,"elements-selectable":!0,"default-viewport":{zoom:.8,x:0,y:0},"min-zoom":.2,"max-zoom":2,"fit-view-on-init":"",class:"apf-bpmn-canvas"},{"node-start-event":e.withCtx(d=>[e.createVNode(p,e.normalizeProps(e.guardReactiveProps(d)),null,16)]),"node-end-event":e.withCtx(d=>[e.createVNode(f,e.normalizeProps(e.guardReactiveProps(d)),null,16)]),"node-task":e.withCtx(d=>[e.createVNode(m,e.normalizeProps(e.guardReactiveProps(d)),null,16)]),"node-gateway":e.withCtx(d=>[e.createVNode(_,e.normalizeProps(e.guardReactiveProps(d)),null,16)]),default:e.withCtx(()=>[e.createVNode(e.unref(g.Background),{gap:16,size:.6,color:"#e0e5ec"}),e.createVNode(e.unref(u.Controls),{"show-interactive":!1})]),_:1},8,["id","nodes","edges"]))}}),[["__scopeId","data-v-41401ec3"]]),w={startEvent:"start-event",endEvent:"end-event",userTask:"task",serviceTask:"task",scriptTask:"task",sendTask:"task",receiveTask:"task",exclusiveGateway:"gateway",parallelGateway:"gateway",inclusiveGateway:"gateway"};function F(n){return w[n]??"task"}t.BPMN_TO_PREVIEW_VF_TYPE=w,t.BpmnFlowPreviewCanvas=S,t.BpmnPreviewEndEvent=f,t.BpmnPreviewGateway=_,t.BpmnPreviewStartEvent=p,t.BpmnPreviewTask=m,t.resolveBpmnPreviewNodeType=F,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}));
|