@apform-ui/core 1.10.38 → 1.11.1
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/README.md +42 -6
- package/dist/apform-ui.css +1 -1
- package/dist/apform-ui.js +5040 -5234
- package/dist/apform-ui.umd.cjs +55 -55
- package/dist/bpmn.css +1 -0
- package/dist/bpmn.d.ts +7 -0
- package/dist/bpmn.js +202 -0
- package/dist/bpmn.umd.cjs +1 -0
- package/dist/chat.d.ts +1 -1
- package/dist/components/Chat/BpmnFlowPreviewCanvas/BpmnFlowPreviewCanvas.vue.d.ts +2 -2
- package/dist/components/Chat/BpmnFlowPreviewCanvas/doc.d.ts +3 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/index.d.ts +1 -4
- package/package.json +9 -2
- package/src/docs/index.ts +3 -0
package/dist/bpmn.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
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.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @apform-ui/core/bpmn — BPMN 流程预览入口(依赖 @vue-flow peer)
|
|
3
|
+
*
|
|
4
|
+
* 对话轻量场景请用 `@apform-ui/core/chat`;通用组件请用 `@apform-ui/core`。
|
|
5
|
+
*/
|
|
6
|
+
export { BpmnFlowPreviewCanvas, BpmnPreviewStartEvent, BpmnPreviewEndEvent, BpmnPreviewTask, BpmnPreviewGateway, BPMN_TO_PREVIEW_VF_TYPE, resolveBpmnPreviewNodeType, } from './components/Chat/BpmnFlowPreviewCanvas';
|
|
7
|
+
export type { BpmnPreviewNode, BpmnPreviewEdge, BpmnPreviewNodeData, } from './components/Chat/BpmnFlowPreviewCanvas';
|
package/dist/bpmn.js
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
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
|
+
import "@vue-flow/core/dist/style.css";
|
|
6
|
+
import "@vue-flow/core/dist/theme-default.css";
|
|
7
|
+
import "@vue-flow/controls/dist/style.css";
|
|
8
|
+
const z = { class: "apf-bpmn-node" }, S = { class: "apf-bpmn-node__label" }, M = /* @__PURE__ */ m({
|
|
9
|
+
__name: "PreviewStartEvent",
|
|
10
|
+
props: {
|
|
11
|
+
data: {}
|
|
12
|
+
},
|
|
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
|
+
]));
|
|
24
|
+
}
|
|
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({
|
|
31
|
+
__name: "PreviewEndEvent",
|
|
32
|
+
props: {
|
|
33
|
+
data: {}
|
|
34
|
+
},
|
|
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
|
+
]));
|
|
46
|
+
}
|
|
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({
|
|
48
|
+
__name: "PreviewTask",
|
|
49
|
+
props: {
|
|
50
|
+
data: {}
|
|
51
|
+
},
|
|
52
|
+
setup(e) {
|
|
53
|
+
const i = {
|
|
54
|
+
userTask: "👤",
|
|
55
|
+
serviceTask: "⚙",
|
|
56
|
+
scriptTask: "📜",
|
|
57
|
+
sendTask: "📤",
|
|
58
|
+
receiveTask: "📥"
|
|
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
|
+
]));
|
|
74
|
+
}
|
|
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({
|
|
76
|
+
__name: "PreviewGateway",
|
|
77
|
+
props: {
|
|
78
|
+
data: {}
|
|
79
|
+
},
|
|
80
|
+
setup(e) {
|
|
81
|
+
const i = {
|
|
82
|
+
exclusiveGateway: "✕",
|
|
83
|
+
parallelGateway: "+",
|
|
84
|
+
inclusiveGateway: "◎"
|
|
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
|
+
]));
|
|
100
|
+
}
|
|
101
|
+
}), ee = /* @__PURE__ */ u(Z, [["__scopeId", "data-v-3ff1b368"]]), te = /* @__PURE__ */ m({
|
|
102
|
+
__name: "BpmnFlowPreviewCanvas",
|
|
103
|
+
props: {
|
|
104
|
+
nodes: {},
|
|
105
|
+
edges: {},
|
|
106
|
+
flowId: {}
|
|
107
|
+
},
|
|
108
|
+
emits: ["node-click", "fit-view"],
|
|
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,
|
|
116
|
+
draggable: !0
|
|
117
|
+
}))
|
|
118
|
+
), h = T(
|
|
119
|
+
() => p.edges.map((a) => ({
|
|
120
|
+
id: a.id,
|
|
121
|
+
source: a.source,
|
|
122
|
+
target: a.target,
|
|
123
|
+
label: a.label,
|
|
124
|
+
type: "smoothstep",
|
|
125
|
+
animated: !0,
|
|
126
|
+
markerEnd: { type: G.ArrowClosed },
|
|
127
|
+
style: { stroke: "var(--c-info, #4581e9)", strokeWidth: 1.5 }
|
|
128
|
+
}))
|
|
129
|
+
), { onNodeClick: E, fitView: g } = V({ id: y });
|
|
130
|
+
E(({ node: a }) => {
|
|
131
|
+
f("node-click", a.id, a.data);
|
|
132
|
+
});
|
|
133
|
+
function B() {
|
|
134
|
+
g({ padding: 0.2 }), f("fit-view");
|
|
135
|
+
}
|
|
136
|
+
return x(
|
|
137
|
+
() => [p.nodes, p.edges],
|
|
138
|
+
async () => {
|
|
139
|
+
await $(), setTimeout(() => g({ padding: 0.2 }), 100);
|
|
140
|
+
},
|
|
141
|
+
{ deep: !0 }
|
|
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"]));
|
|
178
|
+
}
|
|
179
|
+
}), le = /* @__PURE__ */ u(te, [["__scopeId", "data-v-41401ec3"]]), ae = {
|
|
180
|
+
startEvent: "start-event",
|
|
181
|
+
endEvent: "end-event",
|
|
182
|
+
userTask: "task",
|
|
183
|
+
serviceTask: "task",
|
|
184
|
+
scriptTask: "task",
|
|
185
|
+
sendTask: "task",
|
|
186
|
+
receiveTask: "task",
|
|
187
|
+
exclusiveGateway: "gateway",
|
|
188
|
+
parallelGateway: "gateway",
|
|
189
|
+
inclusiveGateway: "gateway"
|
|
190
|
+
};
|
|
191
|
+
function _e(e) {
|
|
192
|
+
return ae[e] ?? "task";
|
|
193
|
+
}
|
|
194
|
+
export {
|
|
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
|
|
202
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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"})}));
|
package/dist/chat.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @apform-ui/core/chat — 对话轻量入口
|
|
3
3
|
*
|
|
4
4
|
* 不含 BpmnFlowPreviewCanvas(及 @vue-flow peer)。
|
|
5
|
-
* 需要 BPMN
|
|
5
|
+
* 需要 BPMN 预览请从 `@apform-ui/core/bpmn` 引入。
|
|
6
6
|
*/
|
|
7
7
|
export type * from './types/chat';
|
|
8
8
|
export { MessageBubble } from './components/Chat/MessageBubble';
|
|
@@ -12,10 +12,10 @@ declare function handleFitView(): void;
|
|
|
12
12
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
13
13
|
fitView: typeof handleFitView;
|
|
14
14
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
-
"fit-view": () => any;
|
|
16
15
|
"node-click": (nodeId: string, data: import('./types').BpmnPreviewNodeData) => any;
|
|
16
|
+
"fit-view": () => any;
|
|
17
17
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
-
"onFit-view"?: (() => any) | undefined;
|
|
19
18
|
"onNode-click"?: ((nodeId: string, data: import('./types').BpmnPreviewNodeData) => any) | undefined;
|
|
19
|
+
"onFit-view"?: (() => any) | undefined;
|
|
20
20
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
export default _default;
|
package/dist/docs/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export { SchemaFormPreviewDoc } from '../components/Chat/SchemaFormPreview/doc';
|
|
|
46
46
|
export { WorkflowRunTimelineDoc } from '../components/Chat/WorkflowRunTimeline/doc';
|
|
47
47
|
export { SuggestionCardDoc } from '../components/Chat/SuggestionCard/doc';
|
|
48
48
|
export { ConversationSearchBarDoc } from '../components/Chat/ConversationSearchBar/doc';
|
|
49
|
+
export { BpmnFlowPreviewCanvasDoc } from '../components/Chat/BpmnFlowPreviewCanvas/doc';
|
|
49
50
|
export { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc';
|
|
50
51
|
export { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc';
|
|
51
52
|
export { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc';
|
package/dist/index.d.ts
CHANGED
|
@@ -83,9 +83,6 @@ export { HitlArtifactPanel } from './components/HitlArtifactPanel';
|
|
|
83
83
|
export { ExecutionArtifactPanel } from './components/ExecutionArtifactPanel';
|
|
84
84
|
export { MessageBubble, TipBanner, StarterPromptGrid, MessageList, Composer, RunStatusBar, StreamStatusBanner, ApprovalCard, MessageParts, MessageAttachmentList, DocumentSummaryList, AttachmentPreviewModal, SessionSidebar, SessionHistoryDrawer, VirtualMessageScroller, ProcessingDrawer, ConversationHeader, PendingAttachmentChip, MentionInput, ThinkingBlock, EditableArtifactCard, MessageActionBar, CollapsibleStepCard, AgentTransferCard, FieldListCard, FlowNodeStripCard, TokenUsageCard, QuestionnaireCard, ChecklistProposalCard, RequirementAnalysisCard, DocumentDetailSummaryCard, ErrorRecoveryCard, VariableDiffCard, SubWorkflowStatusCard, PptPreviewCard, FlowPreviewShell, Model3dPreviewCard, ImageGenerateCard, SchemaFormPreview, WorkflowRunTimeline, SuggestionCard, ConversationSearchBar, TaskChainBar, RagContextPanel, AssistantPicker, ModelPicker, useChatScroll, renderMarkdown, splitTextAndCodeBlocks, isImage, isPdf, isOffice, isPreviewable, fileKind, formatSize, } from './chat';
|
|
85
85
|
export type { StarterPromptItem, MentionTab, MentionResultItem, MentionChip, MentionSearchFn, StepCardTone, FieldListItem, FlowStripNode, QuestionnaireQuestion, ChecklistProposal, ChecklistProposalItem, ChecklistItemPriority, ChecklistItemKind, RequirementAnalysis, RequirementConfirmQuestion, DocumentDetailSummaryItem, DocumentDetailSummaryBody, ErrorRecoveryStrategy, VariableDiffChange, PptSlide, PptMetadata, FlowPreviewShellProps, Model3dPreviewCardProps, ImageGenerateCardProps, SchemaFormPreviewField, WorkflowRunStep, SuggestionItem, ConversationSearchResult, ConversationSearchSourceOption, TaskChainStepItem, TaskChainStepStatus, RagContextItem, AssistantPickerItem, ModelPickerItem, UseChatScrollOptions, UseChatScrollReturn, TextPart, } from './chat';
|
|
86
|
-
export { BpmnFlowPreviewCanvas } from './components/Chat/BpmnFlowPreviewCanvas';
|
|
87
|
-
export { BpmnPreviewStartEvent, BpmnPreviewEndEvent, BpmnPreviewTask, BpmnPreviewGateway, BPMN_TO_PREVIEW_VF_TYPE, resolveBpmnPreviewNodeType, } from './components/Chat/BpmnFlowPreviewCanvas';
|
|
88
|
-
export type { BpmnPreviewNode, BpmnPreviewEdge, BpmnPreviewNodeData, } from './components/Chat/BpmnFlowPreviewCanvas';
|
|
89
86
|
export { useToast, provideToast } from './composables';
|
|
90
87
|
export { useConfirm } from './composables';
|
|
91
88
|
export type { ConfirmOptions } from './composables';
|
|
@@ -111,6 +108,6 @@ export type { StructuredJsonKind } from './utils/structuredJson';
|
|
|
111
108
|
export { extractBusinessResultTables, extractChartOption, } from './utils/businessResultTables';
|
|
112
109
|
export type { BusinessResultTable, ChartOptionExtract, } from './utils/businessResultTables';
|
|
113
110
|
export { COLORS, CHART_COLORS, TEXT_COLORS, SPACING, BORDER_RADIUS, SHADOWS, DURATION, Z_INDEX, FONT_SIZE, CONTROL_HEIGHT, LAYOUT_HEIGHT, ICON_SIZE, PAGE, FORM, AVATAR_SIZE, } from './tokens';
|
|
114
|
-
export declare const SCHEMA_UI_VERSION = "1.
|
|
111
|
+
export declare const SCHEMA_UI_VERSION = "1.11.1";
|
|
115
112
|
export declare const EP_FORK_BASE = "2.14.2";
|
|
116
113
|
export declare const EP_FORK_DATE = "2026-08-27";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apform-ui/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "yangdongnan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,9 +38,16 @@
|
|
|
38
38
|
"import": "./dist/chat.js",
|
|
39
39
|
"require": "./dist/chat.umd.cjs"
|
|
40
40
|
},
|
|
41
|
+
"./bpmn": {
|
|
42
|
+
"types": "./dist/bpmn.d.ts",
|
|
43
|
+
"import": "./dist/bpmn.js",
|
|
44
|
+
"require": "./dist/bpmn.umd.cjs"
|
|
45
|
+
},
|
|
41
46
|
"./tokens.css": "./src/tokens/tokens.css",
|
|
42
47
|
"./design-tokens.css": "./src/tokens/design-tokens.css",
|
|
43
48
|
"./style.css": "./dist/apform-ui.css",
|
|
49
|
+
"./chat.css": "./dist/chat.css",
|
|
50
|
+
"./bpmn.css": "./dist/bpmn.css",
|
|
44
51
|
"./styles/element-override.css": "./styles/element-override.css",
|
|
45
52
|
"./styles/fg-theme.css": "./styles/fg-theme.css",
|
|
46
53
|
"./theme/*": "./src/theme/*",
|
|
@@ -57,7 +64,7 @@
|
|
|
57
64
|
],
|
|
58
65
|
"scripts": {
|
|
59
66
|
"dev": "vite",
|
|
60
|
-
"build": "vite build && vite build -c vite.chat.config.ts",
|
|
67
|
+
"build": "vite build && vite build -c vite.chat.config.ts && vite build -c vite.bpmn.config.ts",
|
|
61
68
|
"build:check": "vue-tsc --noEmit && pnpm run build",
|
|
62
69
|
"preview": "vite preview",
|
|
63
70
|
"test": "vitest run",
|
package/src/docs/index.ts
CHANGED
|
@@ -46,6 +46,7 @@ export { SchemaFormPreviewDoc } from '../components/Chat/SchemaFormPreview/doc'
|
|
|
46
46
|
export { WorkflowRunTimelineDoc } from '../components/Chat/WorkflowRunTimeline/doc'
|
|
47
47
|
export { SuggestionCardDoc } from '../components/Chat/SuggestionCard/doc'
|
|
48
48
|
export { ConversationSearchBarDoc } from '../components/Chat/ConversationSearchBar/doc'
|
|
49
|
+
export { BpmnFlowPreviewCanvasDoc } from '../components/Chat/BpmnFlowPreviewCanvas/doc'
|
|
49
50
|
export { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc'
|
|
50
51
|
export { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc'
|
|
51
52
|
export { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc'
|
|
@@ -141,6 +142,7 @@ import { SchemaFormPreviewDoc } from '../components/Chat/SchemaFormPreview/doc'
|
|
|
141
142
|
import { WorkflowRunTimelineDoc } from '../components/Chat/WorkflowRunTimeline/doc'
|
|
142
143
|
import { SuggestionCardDoc } from '../components/Chat/SuggestionCard/doc'
|
|
143
144
|
import { ConversationSearchBarDoc } from '../components/Chat/ConversationSearchBar/doc'
|
|
145
|
+
import { BpmnFlowPreviewCanvasDoc } from '../components/Chat/BpmnFlowPreviewCanvas/doc'
|
|
144
146
|
import { AttachmentPreviewModalDoc } from '../components/Chat/message/AttachmentPreviewModal.doc'
|
|
145
147
|
import { DocumentSummaryListDoc } from '../components/Chat/message/DocumentSummaryList.doc'
|
|
146
148
|
import { MessageAttachmentListDoc } from '../components/Chat/message/MessageAttachmentList.doc'
|
|
@@ -237,6 +239,7 @@ export const componentDocs: Record<string, ComponentDoc> = {
|
|
|
237
239
|
WorkflowRunTimeline: WorkflowRunTimelineDoc,
|
|
238
240
|
SuggestionCard: SuggestionCardDoc,
|
|
239
241
|
ConversationSearchBar: ConversationSearchBarDoc,
|
|
242
|
+
BpmnFlowPreviewCanvas: BpmnFlowPreviewCanvasDoc,
|
|
240
243
|
AttachmentPreviewModal: AttachmentPreviewModalDoc,
|
|
241
244
|
DocumentSummaryList: DocumentSummaryListDoc,
|
|
242
245
|
MessageAttachmentList: MessageAttachmentListDoc,
|