@vef-framework-react/approval 2.13.0 → 2.13.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/dist/cjs/components/timeline/index.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/review-step.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/types.cjs +1 -1
- package/dist/es/api/admin-api.js +1 -1
- package/dist/es/api/category-api.js +1 -1
- package/dist/es/api/delegation-api.js +1 -1
- package/dist/es/api/flow-api.js +1 -1
- package/dist/es/api/index.js +1 -1
- package/dist/es/api/instance-api.js +1 -1
- package/dist/es/api/my-api.js +1 -1
- package/dist/es/api/query.js +1 -1
- package/dist/es/components/detail/action-modals.js +1 -1
- package/dist/es/components/detail/admin.js +1 -1
- package/dist/es/components/detail/drawer.js +1 -1
- package/dist/es/components/detail/index.js +1 -1
- package/dist/es/components/flow-graph/index.js +1 -1
- package/dist/es/components/form-panel/index.js +1 -1
- package/dist/es/components/format.js +1 -1
- package/dist/es/components/icon.js +1 -1
- package/dist/es/components/index.js +1 -1
- package/dist/es/components/principal/index.js +1 -1
- package/dist/es/components/status/colors.js +1 -1
- package/dist/es/components/status/index.js +1 -1
- package/dist/es/components/status/labels.js +1 -1
- package/dist/es/components/timeline/index.js +15 -9
- package/dist/es/components/user/index.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/pages/admin-page/index.js +1 -1
- package/dist/es/pages/admin-page/instances.js +1 -1
- package/dist/es/pages/admin-page/metrics.js +1 -1
- package/dist/es/pages/admin-page/projections.js +1 -1
- package/dist/es/pages/admin-page/tasks.js +1 -1
- package/dist/es/pages/category-page/columns.js +1 -1
- package/dist/es/pages/category-page/form.js +1 -1
- package/dist/es/pages/category-page/index.js +1 -1
- package/dist/es/pages/delegation-page/columns.js +1 -1
- package/dist/es/pages/delegation-page/form.js +1 -1
- package/dist/es/pages/delegation-page/index.js +1 -1
- package/dist/es/pages/flow-page/columns.js +1 -1
- package/dist/es/pages/flow-page/designer/basic-step.js +1 -1
- package/dist/es/pages/flow-page/designer/flow-step.js +1 -1
- package/dist/es/pages/flow-page/designer/form-step.js +1 -1
- package/dist/es/pages/flow-page/designer/index.js +134 -134
- package/dist/es/pages/flow-page/designer/review-step.js +40 -39
- package/dist/es/pages/flow-page/designer/types.js +5 -2
- package/dist/es/pages/flow-page/index.js +1 -1
- package/dist/es/pages/flow-page/search.js +1 -1
- package/dist/es/pages/flow-page/versions.js +1 -1
- package/dist/es/pages/index.js +1 -1
- package/dist/es/pages/initiate-page/index.js +1 -1
- package/dist/es/pages/initiate-page/start-drawer.js +1 -1
- package/dist/es/pages/my-instances-page/index.js +1 -1
- package/dist/es/pages/task-center-page/index.js +1 -1
- package/dist/es/permissions.js +1 -1
- package/dist/es/plugins/index.js +1 -1
- package/dist/es/types/enums.js +1 -1
- package/dist/es/types/index.js +1 -1
- package/dist/types/pages/flow-page/designer/types.d.ts +14 -0
- package/dist/types/types/detail.d.ts +6 -2
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.13.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useCategoryApi as e } from "../../../api/category-api.js";
|
|
3
3
|
import { useFlowApi as t } from "../../../api/flow-api.js";
|
|
4
4
|
import { toEditorPlugins as n, useApprovalPlugins as r } from "../../../plugins/index.js";
|
|
@@ -6,132 +6,132 @@ import { buildCategoryTreeOptions as i } from "../../category-page/form.js";
|
|
|
6
6
|
import { BasicStep as a } from "./basic-step.js";
|
|
7
7
|
import { FlowStep as o } from "./flow-step.js";
|
|
8
8
|
import { FormStep as s } from "./form-step.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { useMutation as
|
|
12
|
-
import { useCallback as
|
|
13
|
-
import { Button as
|
|
9
|
+
import { EMPTY_FLOW_DEFINITION as c, createEmptyDraft as l, initiatorsForSubmit as u, isBindingValid as d } from "./types.js";
|
|
10
|
+
import { ReviewStep as ee } from "./review-step.js";
|
|
11
|
+
import { useMutation as f, useQuery as p } from "@vef-framework-react/core";
|
|
12
|
+
import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
|
|
13
|
+
import { Button as v, Drawer as y, Flex as b, Spin as te, Steps as ne, showSuccessMessage as re } from "@vef-framework-react/components";
|
|
14
14
|
import { projectFormSchema as ie, validateApprovalSchema as ae } from "@vef-framework-react/approval-form-bridge";
|
|
15
|
-
import { jsx as
|
|
16
|
-
import { validateFlowDefinition as
|
|
15
|
+
import { jsx as x, jsxs as S } from "@emotion/react/jsx-runtime";
|
|
16
|
+
import { validateFlowDefinition as C } from "@vef-framework-react/approval-flow-editor";
|
|
17
17
|
//#region src/pages/flow-page/designer/index.tsx
|
|
18
|
-
var
|
|
18
|
+
var w = [
|
|
19
19
|
{ title: "流程设置" },
|
|
20
20
|
{ title: "表单设计" },
|
|
21
21
|
{ title: "流程设计" },
|
|
22
22
|
{ title: "审阅提交" }
|
|
23
23
|
];
|
|
24
|
-
function
|
|
25
|
-
let
|
|
26
|
-
queryFn:
|
|
27
|
-
queryKey: [
|
|
28
|
-
}),
|
|
29
|
-
queryFn:
|
|
30
|
-
queryKey: [
|
|
31
|
-
enabled:
|
|
32
|
-
}),
|
|
33
|
-
queryFn:
|
|
34
|
-
queryKey: [
|
|
35
|
-
flowId:
|
|
36
|
-
versionId:
|
|
24
|
+
function T({ flow: y, tenantId: T, onClose: E }) {
|
|
25
|
+
let D = t(), O = e(), k = r(), A = y !== void 0, [j, M] = _(0), [N, P] = _(() => A ? null : l(T)), [F, I] = _(""), [L, R] = _(!0), [z, B] = _(!1), { data: V } = p({
|
|
26
|
+
queryFn: O.findTree,
|
|
27
|
+
queryKey: [O.findTree.key, {}]
|
|
28
|
+
}), H = g(() => i(V ?? []), [V]), { data: U } = p({
|
|
29
|
+
queryFn: D.findVersions,
|
|
30
|
+
queryKey: [D.findVersions.key, { flowId: y?.id ?? "" }],
|
|
31
|
+
enabled: A
|
|
32
|
+
}), W = U?.[0]?.id, { data: G } = p({
|
|
33
|
+
queryFn: D.getGraph,
|
|
34
|
+
queryKey: [D.getGraph.key, {
|
|
35
|
+
flowId: y?.id ?? "",
|
|
36
|
+
versionId: W ?? ""
|
|
37
37
|
}],
|
|
38
|
-
enabled:
|
|
39
|
-
}), { data:
|
|
40
|
-
queryFn:
|
|
41
|
-
queryKey: [
|
|
42
|
-
enabled:
|
|
38
|
+
enabled: A && W !== void 0
|
|
39
|
+
}), { data: K } = p({
|
|
40
|
+
queryFn: D.findInitiators,
|
|
41
|
+
queryKey: [D.findInitiators.key, { flowId: y?.id ?? "" }],
|
|
42
|
+
enabled: A
|
|
43
43
|
});
|
|
44
|
-
|
|
45
|
-
if (!
|
|
46
|
-
let e =
|
|
47
|
-
|
|
48
|
-
flowId:
|
|
44
|
+
h(() => {
|
|
45
|
+
if (!A || N !== null || U === void 0 || K === void 0 || U.length > 0 && G === void 0) return;
|
|
46
|
+
let e = G?.version ?? null;
|
|
47
|
+
P({
|
|
48
|
+
flowId: y.id,
|
|
49
49
|
basic: {
|
|
50
|
-
tenantId:
|
|
51
|
-
code:
|
|
52
|
-
name:
|
|
53
|
-
categoryId:
|
|
54
|
-
icon:
|
|
55
|
-
description:
|
|
56
|
-
labels:
|
|
57
|
-
bindingMode:
|
|
58
|
-
businessBinding:
|
|
59
|
-
adminUserIds:
|
|
60
|
-
isAllInitiationAllowed:
|
|
61
|
-
instanceTitleTemplate:
|
|
50
|
+
tenantId: y.tenantId,
|
|
51
|
+
code: y.code,
|
|
52
|
+
name: y.name,
|
|
53
|
+
categoryId: y.categoryId,
|
|
54
|
+
icon: y.icon ?? void 0,
|
|
55
|
+
description: y.description ?? void 0,
|
|
56
|
+
labels: y.labels ?? {},
|
|
57
|
+
bindingMode: y.bindingMode,
|
|
58
|
+
businessBinding: y.businessBinding ?? void 0,
|
|
59
|
+
adminUserIds: y.adminUserIds,
|
|
60
|
+
isAllInitiationAllowed: y.isAllInitiationAllowed,
|
|
61
|
+
instanceTitleTemplate: y.instanceTitleTemplate
|
|
62
62
|
},
|
|
63
|
-
initiators:
|
|
63
|
+
initiators: K.map((e) => ({
|
|
64
64
|
kind: e.kind,
|
|
65
65
|
ids: e.ids
|
|
66
66
|
})),
|
|
67
67
|
storageMode: e?.storageMode ?? "json",
|
|
68
68
|
formSchema: e?.formSchema ?? null,
|
|
69
|
-
flowDefinition: e?.flowSchema ??
|
|
69
|
+
flowDefinition: e?.flowSchema ?? c
|
|
70
70
|
});
|
|
71
71
|
}, [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
W,
|
|
72
|
+
A,
|
|
73
|
+
N,
|
|
74
|
+
U,
|
|
76
75
|
G,
|
|
77
|
-
|
|
76
|
+
K,
|
|
77
|
+
y
|
|
78
78
|
]);
|
|
79
|
-
let
|
|
79
|
+
let q = {
|
|
80
80
|
shouldShowSuccessFeedback: !1,
|
|
81
|
-
invalidates: [[
|
|
82
|
-
},
|
|
83
|
-
mutationFn:
|
|
84
|
-
meta:
|
|
85
|
-
}),
|
|
86
|
-
mutationFn:
|
|
87
|
-
meta:
|
|
88
|
-
}),
|
|
89
|
-
mutationFn:
|
|
90
|
-
meta:
|
|
91
|
-
}),
|
|
92
|
-
mutationFn:
|
|
93
|
-
meta:
|
|
94
|
-
}), J =
|
|
95
|
-
|
|
81
|
+
invalidates: [[D.findFlows.key], [D.findVersions.key]]
|
|
82
|
+
}, oe = f({
|
|
83
|
+
mutationFn: D.create,
|
|
84
|
+
meta: q
|
|
85
|
+
}), se = f({
|
|
86
|
+
mutationFn: D.update,
|
|
87
|
+
meta: q
|
|
88
|
+
}), ce = f({
|
|
89
|
+
mutationFn: D.deploy,
|
|
90
|
+
meta: q
|
|
91
|
+
}), le = f({
|
|
92
|
+
mutationFn: D.publishVersion,
|
|
93
|
+
meta: q
|
|
94
|
+
}), J = g(() => N?.formSchema ? ie(N.formSchema) : null, [N?.formSchema]), Y = g(() => N?.formSchema ? ae(N.formSchema, k.registries) : null, [N?.formSchema, k.registries]), X = g(() => N ? C(N.flowDefinition, J?.formFields ?? []) : [], [N, J]), ue = g(() => n(k, J?.formFields ?? []), [k, J]), de = m((e) => {
|
|
95
|
+
P((t) => t && {
|
|
96
96
|
...t,
|
|
97
97
|
basic: {
|
|
98
98
|
...t.basic,
|
|
99
99
|
...e
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
}, []),
|
|
103
|
-
|
|
102
|
+
}, []), Z = m((e) => {
|
|
103
|
+
P((t) => t && {
|
|
104
104
|
...t,
|
|
105
105
|
initiators: e
|
|
106
106
|
});
|
|
107
|
-
}, []),
|
|
108
|
-
|
|
107
|
+
}, []), fe = m((e) => {
|
|
108
|
+
P((t) => t && {
|
|
109
109
|
...t,
|
|
110
110
|
formSchema: e
|
|
111
111
|
});
|
|
112
|
-
}, []),
|
|
113
|
-
|
|
112
|
+
}, []), pe = m((e) => {
|
|
113
|
+
P((t) => t && {
|
|
114
114
|
...t,
|
|
115
115
|
flowDefinition: e
|
|
116
116
|
});
|
|
117
117
|
}, []);
|
|
118
|
-
if (
|
|
118
|
+
if (N === null) return /* @__PURE__ */ x(b, {
|
|
119
119
|
align: "center",
|
|
120
120
|
justify: "center",
|
|
121
121
|
style: { height: "100%" },
|
|
122
|
-
children: /* @__PURE__ */
|
|
122
|
+
children: /* @__PURE__ */ x(te, {})
|
|
123
123
|
});
|
|
124
|
-
let Q =
|
|
125
|
-
$.code.trim() !== "" && $.name.trim() !== "" && $.categoryId !== "" && $.instanceTitleTemplate.trim() !== "" && ($.bindingMode !== "business" ||
|
|
124
|
+
let Q = N, { basic: $ } = Q, me = [
|
|
125
|
+
$.code.trim() !== "" && $.name.trim() !== "" && $.categoryId !== "" && $.instanceTitleTemplate.trim() !== "" && ($.bindingMode !== "business" || d($.businessBinding)) && ($.isAllInitiationAllowed || u(N).length > 0),
|
|
126
126
|
Y === null || Y.valid,
|
|
127
127
|
X.length === 0,
|
|
128
128
|
!0
|
|
129
|
-
][
|
|
130
|
-
async function
|
|
131
|
-
|
|
129
|
+
][j] ?? !1;
|
|
130
|
+
async function he() {
|
|
131
|
+
B(!0);
|
|
132
132
|
try {
|
|
133
|
-
let e = $.bindingMode === "business" ? $.businessBinding : void 0, t = Q
|
|
134
|
-
n = Q.flowId === void 0 ? (await
|
|
133
|
+
let e = $.bindingMode === "business" ? $.businessBinding : void 0, t = u(Q), n;
|
|
134
|
+
n = Q.flowId === void 0 ? (await oe.mutateAsync({
|
|
135
135
|
tenantId: $.tenantId,
|
|
136
136
|
code: $.code,
|
|
137
137
|
name: $.name,
|
|
@@ -145,7 +145,7 @@ function w({ flow: v, tenantId: w, onClose: T }) {
|
|
|
145
145
|
isAllInitiationAllowed: $.isAllInitiationAllowed,
|
|
146
146
|
instanceTitleTemplate: $.instanceTitleTemplate,
|
|
147
147
|
initiators: t
|
|
148
|
-
})).id : (await
|
|
148
|
+
})).id : (await se.mutateAsync({
|
|
149
149
|
flowId: Q.flowId,
|
|
150
150
|
name: $.name,
|
|
151
151
|
icon: $.icon,
|
|
@@ -158,67 +158,67 @@ function w({ flow: v, tenantId: w, onClose: T }) {
|
|
|
158
158
|
instanceTitleTemplate: $.instanceTitleTemplate,
|
|
159
159
|
initiators: t
|
|
160
160
|
})).id;
|
|
161
|
-
let r = await
|
|
161
|
+
let r = await ce.mutateAsync({
|
|
162
162
|
flowId: n,
|
|
163
|
-
description:
|
|
163
|
+
description: F.trim() || void 0,
|
|
164
164
|
storageMode: Q.storageMode,
|
|
165
165
|
flowDefinition: Q.flowDefinition,
|
|
166
166
|
formSchema: Q.formSchema ?? void 0
|
|
167
167
|
});
|
|
168
|
-
|
|
168
|
+
L && await le.mutateAsync({ versionId: r.id }), re(L ? "流程已部署并发布" : "流程已部署为草稿版本"), E();
|
|
169
169
|
} catch {} finally {
|
|
170
|
-
|
|
170
|
+
B(!1);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
let
|
|
174
|
-
/* @__PURE__ */
|
|
173
|
+
let ge = [
|
|
174
|
+
/* @__PURE__ */ x(a, {
|
|
175
175
|
basic: $,
|
|
176
|
-
categoryOptions:
|
|
177
|
-
initiators:
|
|
178
|
-
isEditing:
|
|
179
|
-
onBasicChange:
|
|
180
|
-
onInitiatorsChange:
|
|
176
|
+
categoryOptions: H,
|
|
177
|
+
initiators: N.initiators,
|
|
178
|
+
isEditing: A,
|
|
179
|
+
onBasicChange: de,
|
|
180
|
+
onInitiatorsChange: Z
|
|
181
181
|
}, "basic"),
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
initialSchema:
|
|
182
|
+
/* @__PURE__ */ x(s, {
|
|
183
|
+
initialSchema: N.formSchema ?? void 0,
|
|
184
184
|
issues: Y?.issues ?? [],
|
|
185
|
-
registries:
|
|
186
|
-
storageMode:
|
|
187
|
-
onSchemaChange:
|
|
188
|
-
onStorageModeChange: (e) =>
|
|
185
|
+
registries: k.registries,
|
|
186
|
+
storageMode: N.storageMode,
|
|
187
|
+
onSchemaChange: fe,
|
|
188
|
+
onStorageModeChange: (e) => P((t) => t && {
|
|
189
189
|
...t,
|
|
190
190
|
storageMode: e
|
|
191
191
|
})
|
|
192
192
|
}, "form"),
|
|
193
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ x(o, {
|
|
194
194
|
errors: X,
|
|
195
|
-
plugins:
|
|
196
|
-
value:
|
|
197
|
-
onChange:
|
|
195
|
+
plugins: ue,
|
|
196
|
+
value: N.flowDefinition,
|
|
197
|
+
onChange: pe
|
|
198
198
|
}, "flow"),
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
draft:
|
|
199
|
+
/* @__PURE__ */ x(ee, {
|
|
200
|
+
draft: N,
|
|
201
201
|
fields: J?.fields ?? [],
|
|
202
|
-
publishNow:
|
|
203
|
-
versionDescription:
|
|
204
|
-
onPublishNowChange:
|
|
205
|
-
onVersionDescriptionChange:
|
|
202
|
+
publishNow: L,
|
|
203
|
+
versionDescription: F,
|
|
204
|
+
onPublishNowChange: R,
|
|
205
|
+
onVersionDescriptionChange: I
|
|
206
206
|
}, "review")
|
|
207
207
|
];
|
|
208
|
-
return /* @__PURE__ */
|
|
208
|
+
return /* @__PURE__ */ S(b, {
|
|
209
209
|
style: {
|
|
210
210
|
height: "100%",
|
|
211
211
|
flexDirection: "column"
|
|
212
212
|
},
|
|
213
213
|
children: [
|
|
214
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ x("div", {
|
|
215
215
|
style: {
|
|
216
216
|
padding: "12px 32px",
|
|
217
217
|
borderBottom: "1px solid var(--vef-color-border-secondary)"
|
|
218
218
|
},
|
|
219
|
-
children: /* @__PURE__ */
|
|
220
|
-
current:
|
|
221
|
-
items:
|
|
219
|
+
children: /* @__PURE__ */ x(ne, {
|
|
220
|
+
current: j,
|
|
221
|
+
items: w,
|
|
222
222
|
size: "small",
|
|
223
223
|
style: {
|
|
224
224
|
maxWidth: 720,
|
|
@@ -226,16 +226,16 @@ function w({ flow: v, tenantId: w, onClose: T }) {
|
|
|
226
226
|
}
|
|
227
227
|
})
|
|
228
228
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ x("div", {
|
|
230
230
|
style: {
|
|
231
231
|
flex: 1,
|
|
232
232
|
minHeight: 0,
|
|
233
233
|
display: "flex",
|
|
234
234
|
flexDirection: "column"
|
|
235
235
|
},
|
|
236
|
-
children:
|
|
237
|
-
let n = t ===
|
|
238
|
-
return /* @__PURE__ */
|
|
236
|
+
children: ge.map((e, t) => {
|
|
237
|
+
let n = t === j, r = t === 0 || t === 3;
|
|
238
|
+
return /* @__PURE__ */ x("div", {
|
|
239
239
|
style: {
|
|
240
240
|
display: n ? "flex" : "none",
|
|
241
241
|
flexDirection: "column",
|
|
@@ -248,34 +248,34 @@ function w({ flow: v, tenantId: w, onClose: T }) {
|
|
|
248
248
|
}, t);
|
|
249
249
|
})
|
|
250
250
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ S(b, {
|
|
252
252
|
align: "center",
|
|
253
253
|
justify: "space-between",
|
|
254
254
|
style: {
|
|
255
255
|
padding: "12px 32px",
|
|
256
256
|
borderTop: "1px solid var(--vef-color-border-secondary)"
|
|
257
257
|
},
|
|
258
|
-
children: [/* @__PURE__ */
|
|
259
|
-
disabled:
|
|
260
|
-
onClick: () =>
|
|
258
|
+
children: [/* @__PURE__ */ x(v, {
|
|
259
|
+
disabled: j === 0 || z,
|
|
260
|
+
onClick: () => M((e) => e - 1),
|
|
261
261
|
children: "上一步"
|
|
262
|
-
}),
|
|
263
|
-
disabled: !
|
|
262
|
+
}), j < w.length - 1 ? /* @__PURE__ */ x(v, {
|
|
263
|
+
disabled: !me,
|
|
264
264
|
type: "primary",
|
|
265
|
-
onClick: () =>
|
|
265
|
+
onClick: () => M((e) => e + 1),
|
|
266
266
|
children: "下一步"
|
|
267
|
-
}) : /* @__PURE__ */
|
|
268
|
-
loading:
|
|
267
|
+
}) : /* @__PURE__ */ x(v, {
|
|
268
|
+
loading: z,
|
|
269
269
|
type: "primary",
|
|
270
|
-
onClick: () => void
|
|
271
|
-
children:
|
|
270
|
+
onClick: () => void he(),
|
|
271
|
+
children: L ? "部署并发布" : "部署为草稿"
|
|
272
272
|
})]
|
|
273
273
|
})
|
|
274
274
|
]
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
return /* @__PURE__ */
|
|
277
|
+
function E({ open: e, flow: t, tenantId: n, onClose: r }) {
|
|
278
|
+
return /* @__PURE__ */ x(y, {
|
|
279
279
|
destroyOnHidden: !0,
|
|
280
280
|
open: e,
|
|
281
281
|
placement: "right",
|
|
@@ -283,7 +283,7 @@ function T({ open: e, flow: t, tenantId: n, onClose: r }) {
|
|
|
283
283
|
styles: { body: { padding: 0 } },
|
|
284
284
|
title: t ? `流程设计 · ${t.name}` : "新建流程",
|
|
285
285
|
onClose: r,
|
|
286
|
-
children: e && /* @__PURE__ */
|
|
286
|
+
children: e && /* @__PURE__ */ x(T, {
|
|
287
287
|
flow: t,
|
|
288
288
|
tenantId: n,
|
|
289
289
|
onClose: r
|
|
@@ -291,4 +291,4 @@ function T({ open: e, flow: t, tenantId: n, onClose: r }) {
|
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
293
|
//#endregion
|
|
294
|
-
export {
|
|
294
|
+
export { E as FlowDesignerDrawer };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.13.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
|
+
import { initiatorsForSubmit as e } from "./types.js";
|
|
3
|
+
import { Card as t, Descriptions as n, Flex as r, Input as i, Labeled as a, LabelsDisplay as o, Stack as s, Switch as c, Table as l, Tag as u, Text as d, globalCssVars as f } from "@vef-framework-react/components";
|
|
4
|
+
import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
|
|
4
5
|
//#region src/pages/flow-page/designer/review-step.tsx
|
|
5
|
-
function
|
|
6
|
-
let { basic:
|
|
7
|
-
return /* @__PURE__ */
|
|
6
|
+
function h({ draft: h, fields: g, versionDescription: _, publishNow: v, onVersionDescriptionChange: y, onPublishNowChange: b }) {
|
|
7
|
+
let { basic: x } = h, S = h.flowDefinition.nodes.length;
|
|
8
|
+
return /* @__PURE__ */ m(s, {
|
|
8
9
|
gap: 16,
|
|
9
10
|
style: {
|
|
10
11
|
maxWidth: 920,
|
|
@@ -12,9 +13,9 @@ function m({ draft: m, fields: h, versionDescription: g, publishNow: _, onVersio
|
|
|
12
13
|
width: "100%"
|
|
13
14
|
},
|
|
14
15
|
children: [
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ p(t, {
|
|
16
17
|
title: "流程设置",
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
+
children: /* @__PURE__ */ p(n, {
|
|
18
19
|
colon: !0,
|
|
19
20
|
column: {
|
|
20
21
|
xs: 1,
|
|
@@ -25,49 +26,49 @@ function m({ draft: m, fields: h, versionDescription: g, publishNow: _, onVersio
|
|
|
25
26
|
{
|
|
26
27
|
key: "code",
|
|
27
28
|
label: "流程编码",
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
+
children: /* @__PURE__ */ p(d, {
|
|
29
30
|
code: !0,
|
|
30
|
-
children:
|
|
31
|
+
children: x.code
|
|
31
32
|
})
|
|
32
33
|
},
|
|
33
34
|
{
|
|
34
35
|
key: "name",
|
|
35
36
|
label: "流程名称",
|
|
36
|
-
children:
|
|
37
|
+
children: x.name
|
|
37
38
|
},
|
|
38
39
|
{
|
|
39
40
|
key: "binding",
|
|
40
41
|
label: "业务绑定",
|
|
41
|
-
children:
|
|
42
|
+
children: x.bindingMode === "business" ? /* @__PURE__ */ p(u, {
|
|
42
43
|
color: "blue",
|
|
43
|
-
children: `业务表 ${
|
|
44
|
-
}) : /* @__PURE__ */
|
|
44
|
+
children: `业务表 ${x.businessBinding?.tableName ?? ""}`
|
|
45
|
+
}) : /* @__PURE__ */ p(u, { children: "独立存储" })
|
|
45
46
|
},
|
|
46
47
|
{
|
|
47
48
|
key: "initiation",
|
|
48
49
|
label: "发起权限",
|
|
49
|
-
children:
|
|
50
|
+
children: x.isAllInitiationAllowed ? "所有人可发起" : `${e(h).length} 条发起规则`
|
|
50
51
|
},
|
|
51
52
|
{
|
|
52
53
|
key: "labels",
|
|
53
54
|
label: "标签",
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ p(o, { labels: x.labels })
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
key: "storage",
|
|
58
59
|
label: "存储模式",
|
|
59
|
-
children:
|
|
60
|
+
children: h.storageMode === "table" ? "独立表存储" : "JSON 存储"
|
|
60
61
|
}
|
|
61
62
|
]
|
|
62
63
|
})
|
|
63
64
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
title: `表单字段(${
|
|
66
|
-
children:
|
|
65
|
+
/* @__PURE__ */ p(t, {
|
|
66
|
+
title: `表单字段(${g.length})`,
|
|
67
|
+
children: g.length === 0 ? /* @__PURE__ */ p(d, {
|
|
67
68
|
type: "secondary",
|
|
68
69
|
children: "该流程未设计表单。"
|
|
69
|
-
}) : /* @__PURE__ */
|
|
70
|
-
dataSource:
|
|
70
|
+
}) : /* @__PURE__ */ p(l, {
|
|
71
|
+
dataSource: g,
|
|
71
72
|
pagination: !1,
|
|
72
73
|
rowKey: "key",
|
|
73
74
|
size: "small",
|
|
@@ -76,7 +77,7 @@ function m({ draft: m, fields: h, versionDescription: g, publishNow: _, onVersio
|
|
|
76
77
|
title: "字段键",
|
|
77
78
|
dataIndex: "key",
|
|
78
79
|
width: 220,
|
|
79
|
-
render: (e) => /* @__PURE__ */
|
|
80
|
+
render: (e) => /* @__PURE__ */ p(d, {
|
|
80
81
|
code: !0,
|
|
81
82
|
children: e
|
|
82
83
|
})
|
|
@@ -89,38 +90,38 @@ function m({ draft: m, fields: h, versionDescription: g, publishNow: _, onVersio
|
|
|
89
90
|
title: "类型",
|
|
90
91
|
dataIndex: "kind",
|
|
91
92
|
width: 120,
|
|
92
|
-
render: (e) => /* @__PURE__ */
|
|
93
|
+
render: (e) => /* @__PURE__ */ p(u, { children: e })
|
|
93
94
|
}
|
|
94
95
|
]
|
|
95
96
|
})
|
|
96
97
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ p(t, {
|
|
98
99
|
title: "发布选项",
|
|
99
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ m(s, {
|
|
100
101
|
gap: 12,
|
|
101
102
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
style: { fontSize:
|
|
103
|
+
/* @__PURE__ */ p(d, {
|
|
104
|
+
style: { fontSize: f.fontSizeSm },
|
|
104
105
|
type: "secondary",
|
|
105
|
-
children: `流程图共 ${
|
|
106
|
+
children: `流程图共 ${S} 个节点。提交将保存流程设置并部署为新版本;发布后新发起的审批立即走新版本,进行中的实例仍沿用其原版本。`
|
|
106
107
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ p(a, {
|
|
108
109
|
label: "版本说明",
|
|
109
|
-
children: /* @__PURE__ */
|
|
110
|
+
children: /* @__PURE__ */ p(i.TextArea, {
|
|
110
111
|
maxLength: 500,
|
|
111
112
|
placeholder: "本次变更说明(可选)",
|
|
112
113
|
rows: 2,
|
|
113
|
-
value:
|
|
114
|
-
onChange: (e) =>
|
|
114
|
+
value: _,
|
|
115
|
+
onChange: (e) => y(e.target.value)
|
|
115
116
|
})
|
|
116
117
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ m(r, {
|
|
118
119
|
align: "center",
|
|
119
120
|
gap: "small",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
121
|
-
checked:
|
|
122
|
-
onChange:
|
|
123
|
-
}), /* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ p(c, {
|
|
122
|
+
checked: v,
|
|
123
|
+
onChange: b
|
|
124
|
+
}), /* @__PURE__ */ p(d, { children: "部署后立即发布" })]
|
|
124
125
|
})
|
|
125
126
|
]
|
|
126
127
|
})
|
|
@@ -129,4 +130,4 @@ function m({ draft: m, fields: h, versionDescription: g, publishNow: _, onVersio
|
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
132
|
//#endregion
|
|
132
|
-
export {
|
|
133
|
+
export { h as ReviewStep };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.13.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
//#region src/pages/flow-page/designer/types.ts
|
|
3
3
|
var e = {
|
|
4
4
|
nodes: [],
|
|
@@ -25,6 +25,9 @@ function t(t) {
|
|
|
25
25
|
}
|
|
26
26
|
var n = /^[A-Z_]\w{0,62}$/i;
|
|
27
27
|
function r(e) {
|
|
28
|
+
return e.basic.isAllInitiationAllowed ? [] : e.initiators.filter((e) => e.ids.length > 0);
|
|
29
|
+
}
|
|
30
|
+
function i(e) {
|
|
28
31
|
if (!e) return !1;
|
|
29
32
|
let t = [
|
|
30
33
|
e.tableName,
|
|
@@ -37,4 +40,4 @@ function r(e) {
|
|
|
37
40
|
return e.keyColumns.length > 0 && e.instanceIdColumn !== void 0 && e.instanceIdColumn !== "" && t.every((e) => n.test(e)) && Object.values(e.statusMapping ?? {}).every((e) => e === void 0 || e.trim() !== "");
|
|
38
41
|
}
|
|
39
42
|
//#endregion
|
|
40
|
-
export { n as BUSINESS_IDENTIFIER_PATTERN, e as EMPTY_FLOW_DEFINITION, t as createEmptyDraft, r as isBindingValid };
|
|
43
|
+
export { n as BUSINESS_IDENTIFIER_PATTERN, e as EMPTY_FLOW_DEFINITION, t as createEmptyDraft, r as initiatorsForSubmit, i as isBindingValid };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.13.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useCategoryApi as e } from "../../api/category-api.js";
|
|
3
3
|
import { useFlowApi as t } from "../../api/flow-api.js";
|
|
4
4
|
import { APPROVAL_PERMISSIONS as n } from "../../permissions.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.13.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { LabelFilterSelect as e, Select as t, useFormContext as n } from "@vef-framework-react/components";
|
|
3
3
|
import { Fragment as r, jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
|
|
4
4
|
//#region src/pages/flow-page/search.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.13.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useFlowApi as e } from "../../api/flow-api.js";
|
|
3
3
|
import { formatTimestamp as t } from "../../components/format.js";
|
|
4
4
|
import { VersionStatusTag as n } from "../../components/status/index.js";
|
package/dist/es/pages/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.13.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { ApprovalAdminPage as e } from "./admin-page/index.js";
|
|
3
3
|
import { ApprovalCategoryPage as t } from "./category-page/index.js";
|
|
4
4
|
import { ApprovalDelegationPage as n } from "./delegation-page/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.13.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useMyApprovalApi as e } from "../../api/my-api.js";
|
|
3
3
|
import { FlowIcon as t } from "../../components/icon.js";
|
|
4
4
|
import { StartInstanceDrawer as n } from "./start-drawer.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.13.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useInstanceApi as e } from "../../api/instance-api.js";
|
|
3
3
|
import { useMyApprovalApi as t } from "../../api/my-api.js";
|
|
4
4
|
import { InstanceFormPanel as n } from "../../components/form-panel/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.13.
|
|
1
|
+
/*! @vef-framework-react/approval v2.13.1 made by Venus | 2026-07-28T11:22:46.566Z */
|
|
2
2
|
import { useInstanceApi as e } from "../../api/instance-api.js";
|
|
3
3
|
import { useMyApprovalApi as t } from "../../api/my-api.js";
|
|
4
4
|
import { INSTANCE_STATUS_OPTIONS as n } from "../../components/status/labels.js";
|