@vef-framework-react/approval 2.24.1 → 2.26.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/cjs/api/category-api.cjs +1 -1
- package/dist/cjs/api/delegation-api.cjs +1 -1
- package/dist/cjs/api/query.cjs +1 -1
- package/dist/cjs/components/detail/admin.cjs +1 -1
- package/dist/cjs/components/detail/index.cjs +1 -1
- package/dist/cjs/components/form-panel/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/pages/category-page/index.cjs +1 -1
- package/dist/cjs/pages/delegation-page/form.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/flow-step.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/form-step.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
- package/dist/cjs/pages/initiate-page/index.cjs +1 -1
- package/dist/cjs/pages/initiate-page/start-drawer.cjs +1 -1
- package/dist/cjs/plugins/form-context.cjs +1 -0
- package/dist/cjs/types/index.cjs +1 -1
- package/dist/cjs/types/tenancy.cjs +1 -0
- package/dist/es/api/admin-api.js +1 -1
- package/dist/es/api/category-api.js +2 -2
- package/dist/es/api/delegation-api.js +10 -14
- 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 +9 -2
- package/dist/es/components/action-dialog/index.js +1 -1
- package/dist/es/components/detail/action-modals.js +1 -1
- package/dist/es/components/detail/admin.js +3 -1
- package/dist/es/components/detail/drawer.js +1 -1
- package/dist/es/components/detail/index.js +3 -1
- package/dist/es/components/flow-graph/index.js +1 -1
- package/dist/es/components/flow-graph/node.js +1 -1
- package/dist/es/components/flow-graph/people-overlay.js +1 -1
- package/dist/es/components/flow-graph/people.js +1 -1
- package/dist/es/components/form-panel/index.js +23 -20
- 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 +1 -1
- package/dist/es/components/user/index.js +1 -1
- package/dist/es/index.js +10 -9
- 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 +14 -8
- package/dist/es/pages/delegation-page/columns.js +1 -1
- package/dist/es/pages/delegation-page/form.js +2 -2
- 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 +16 -34
- package/dist/es/pages/flow-page/designer/form-step.js +54 -65
- package/dist/es/pages/flow-page/designer/index.js +203 -185
- package/dist/es/pages/flow-page/designer/review-step.js +1 -1
- package/dist/es/pages/flow-page/designer/types.js +1 -1
- 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 +4 -4
- package/dist/es/pages/initiate-page/start-drawer.js +3 -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/pages/task-center-page/search.js +1 -1
- package/dist/es/permissions.js +1 -1
- package/dist/es/plugins/form-context.js +34 -0
- package/dist/es/plugins/index.js +1 -1
- package/dist/es/types/enums.js +1 -1
- package/dist/es/types/index.js +3 -2
- package/dist/es/types/tenancy.js +5 -0
- package/dist/types/api/delegation-api.d.ts +1 -1
- package/dist/types/api/my-api.d.ts +1 -1
- package/dist/types/api/query.d.ts +11 -0
- package/dist/types/components/form-panel/index.d.ts +15 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/pages/category-page/props.d.ts +3 -1
- package/dist/types/pages/flow-page/designer/flow-step.d.ts +6 -5
- package/dist/types/pages/flow-page/designer/form-step.d.ts +9 -10
- package/dist/types/pages/flow-page/props.d.ts +3 -1
- package/dist/types/pages/initiate-page/index.d.ts +3 -3
- package/dist/types/pages/initiate-page/start-drawer.d.ts +5 -1
- package/dist/types/plugins/form-context.d.ts +30 -0
- package/dist/types/plugins/index.d.ts +25 -5
- package/dist/types/types/admin.d.ts +5 -0
- package/dist/types/types/category.d.ts +11 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/instance.d.ts +6 -1
- package/dist/types/types/my.d.ts +15 -0
- package/dist/types/types/tenancy.d.ts +14 -0
- package/package.json +7 -7
|
@@ -1,241 +1,251 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.26.0 made by Venus | 2026-10-13T17:04:56.461Z */
|
|
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";
|
|
5
|
-
import { buildCategoryTreeOptions as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
5
|
+
import { buildCategoryTreeOptions as ee } from "../../category-page/form.js";
|
|
6
|
+
import "../../../types/tenancy.js";
|
|
7
|
+
import { BasicStep as i } from "./basic-step.js";
|
|
8
|
+
import { FlowStep as a } from "./flow-step.js";
|
|
9
|
+
import { FormStep as o } from "./form-step.js";
|
|
10
|
+
import { EMPTY_FLOW_DEFINITION as te, createEmptyDraft as ne, initiatorsForSubmit as s, isBindingValid as re } from "./types.js";
|
|
11
|
+
import { ReviewStep as ie } from "./review-step.js";
|
|
12
|
+
import { useMutation as c, useQuery as l } from "@vef-framework-react/core";
|
|
13
|
+
import { useCallback as u, useEffect as d, useMemo as f, useState as p } from "react";
|
|
14
|
+
import { Button as m, Drawer as h, Flex as g, Spin as ae, Steps as oe, Text as se, globalCssVars as ce, showSuccessMessage as le } from "@vef-framework-react/components";
|
|
15
|
+
import { projectFormSchema as ue, validateApprovalSchema as _ } from "@vef-framework-react/approval-form-bridge";
|
|
16
|
+
import { jsx as v, jsxs as y } from "@emotion/react/jsx-runtime";
|
|
17
|
+
import { validateFlowDefinition as b } from "@vef-framework-react/approval-flow-editor";
|
|
17
18
|
//#region src/pages/flow-page/designer/index.tsx
|
|
18
|
-
var
|
|
19
|
+
var x = [
|
|
19
20
|
{ title: "流程设置" },
|
|
20
21
|
{ title: "表单设计" },
|
|
21
22
|
{ title: "流程设计" },
|
|
22
23
|
{ title: "审阅提交" }
|
|
23
24
|
];
|
|
24
|
-
function
|
|
25
|
-
let
|
|
26
|
-
queryFn:
|
|
27
|
-
queryKey: [
|
|
28
|
-
}),
|
|
29
|
-
queryFn:
|
|
30
|
-
queryKey: [
|
|
31
|
-
enabled:
|
|
32
|
-
}),
|
|
33
|
-
queryFn:
|
|
34
|
-
queryKey: [
|
|
35
|
-
flowId:
|
|
36
|
-
versionId:
|
|
25
|
+
function S({ flow: h, tenantId: S, onClose: C }) {
|
|
26
|
+
let w = t(), T = e(), E = r(), D = h !== void 0, [O, k] = p(0), [A, j] = p(() => D ? null : ne(S)), [M, de] = p(""), [N, fe] = p(!0), [P, F] = p(!1), I = h?.tenantId ?? S, L = I === "0", { data: R } = l({
|
|
27
|
+
queryFn: T.findTree,
|
|
28
|
+
queryKey: [T.findTree.key, { tenantId: I }]
|
|
29
|
+
}), z = f(() => ee(R ?? []), [R]), { data: B } = l({
|
|
30
|
+
queryFn: w.findVersions,
|
|
31
|
+
queryKey: [w.findVersions.key, { flowId: h?.id ?? "" }],
|
|
32
|
+
enabled: D
|
|
33
|
+
}), V = B?.[0]?.id, { data: H } = l({
|
|
34
|
+
queryFn: w.getGraph,
|
|
35
|
+
queryKey: [w.getGraph.key, {
|
|
36
|
+
flowId: h?.id ?? "",
|
|
37
|
+
versionId: V ?? ""
|
|
37
38
|
}],
|
|
38
|
-
enabled:
|
|
39
|
-
}), { data:
|
|
40
|
-
queryFn:
|
|
41
|
-
queryKey: [
|
|
42
|
-
enabled:
|
|
43
|
-
}), { data:
|
|
44
|
-
queryFn:
|
|
45
|
-
queryKey: [
|
|
39
|
+
enabled: D && V !== void 0
|
|
40
|
+
}), { data: U } = l({
|
|
41
|
+
queryFn: w.findInitiators,
|
|
42
|
+
queryKey: [w.findInitiators.key, { flowId: h?.id ?? "" }],
|
|
43
|
+
enabled: D
|
|
44
|
+
}), { data: W } = l({
|
|
45
|
+
queryFn: w.listKindOptions,
|
|
46
|
+
queryKey: [w.listKindOptions.key, {}],
|
|
46
47
|
staleTime: Infinity
|
|
47
48
|
});
|
|
48
|
-
|
|
49
|
-
if (!
|
|
50
|
-
let e =
|
|
51
|
-
|
|
52
|
-
flowId:
|
|
49
|
+
d(() => {
|
|
50
|
+
if (!D || A !== null || B === void 0 || U === void 0 || B.length > 0 && H === void 0) return;
|
|
51
|
+
let e = H?.version ?? null;
|
|
52
|
+
j({
|
|
53
|
+
flowId: h.id,
|
|
53
54
|
basic: {
|
|
54
|
-
tenantId:
|
|
55
|
-
code:
|
|
56
|
-
name:
|
|
57
|
-
categoryId:
|
|
58
|
-
icon:
|
|
59
|
-
description:
|
|
60
|
-
labels:
|
|
61
|
-
bindingMode:
|
|
62
|
-
businessBinding:
|
|
63
|
-
adminUserIds:
|
|
64
|
-
isAllInitiationAllowed:
|
|
65
|
-
instanceTitleTemplate:
|
|
55
|
+
tenantId: h.tenantId,
|
|
56
|
+
code: h.code,
|
|
57
|
+
name: h.name,
|
|
58
|
+
categoryId: h.categoryId,
|
|
59
|
+
icon: h.icon ?? void 0,
|
|
60
|
+
description: h.description ?? void 0,
|
|
61
|
+
labels: h.labels ?? {},
|
|
62
|
+
bindingMode: h.bindingMode,
|
|
63
|
+
businessBinding: h.businessBinding ?? void 0,
|
|
64
|
+
adminUserIds: h.adminUserIds,
|
|
65
|
+
isAllInitiationAllowed: h.isAllInitiationAllowed,
|
|
66
|
+
instanceTitleTemplate: h.instanceTitleTemplate
|
|
66
67
|
},
|
|
67
|
-
initiators:
|
|
68
|
+
initiators: U.map((e) => ({
|
|
68
69
|
kind: e.kind,
|
|
69
70
|
ids: e.ids
|
|
70
71
|
})),
|
|
71
72
|
storageMode: e?.storageMode ?? "json",
|
|
72
73
|
formSchema: e?.formSchema ?? null,
|
|
73
|
-
flowDefinition: e?.flowSchema ??
|
|
74
|
+
flowDefinition: e?.flowSchema ?? te
|
|
74
75
|
});
|
|
75
76
|
}, [
|
|
77
|
+
D,
|
|
76
78
|
A,
|
|
77
|
-
|
|
79
|
+
B,
|
|
78
80
|
H,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
y
|
|
81
|
+
U,
|
|
82
|
+
h
|
|
82
83
|
]);
|
|
83
|
-
let
|
|
84
|
+
let G = {
|
|
84
85
|
shouldShowSuccessFeedback: !1,
|
|
85
|
-
invalidates: [[
|
|
86
|
-
},
|
|
87
|
-
mutationFn:
|
|
88
|
-
meta:
|
|
89
|
-
}),
|
|
90
|
-
mutationFn:
|
|
91
|
-
meta:
|
|
92
|
-
}),
|
|
93
|
-
mutationFn:
|
|
94
|
-
meta:
|
|
95
|
-
}),
|
|
96
|
-
mutationFn:
|
|
97
|
-
meta:
|
|
98
|
-
}),
|
|
99
|
-
formFields:
|
|
100
|
-
assigneeKinds:
|
|
101
|
-
ccKinds:
|
|
86
|
+
invalidates: [[w.findFlows.key], [w.findVersions.key]]
|
|
87
|
+
}, pe = c({
|
|
88
|
+
mutationFn: w.create,
|
|
89
|
+
meta: G
|
|
90
|
+
}), me = c({
|
|
91
|
+
mutationFn: w.update,
|
|
92
|
+
meta: G
|
|
93
|
+
}), he = c({
|
|
94
|
+
mutationFn: w.deploy,
|
|
95
|
+
meta: G
|
|
96
|
+
}), ge = c({
|
|
97
|
+
mutationFn: w.publishVersion,
|
|
98
|
+
meta: G
|
|
99
|
+
}), K = f(() => A?.formSchema ? ue(A.formSchema) : null, [A?.formSchema]), q = f(() => A?.formSchema ? _(A.formSchema, E.registries) : null, [A?.formSchema, E.registries]), J = f(() => A ? b(A.flowDefinition, {
|
|
100
|
+
formFields: K?.formFields ?? [],
|
|
101
|
+
assigneeKinds: W?.assignees,
|
|
102
|
+
ccKinds: W?.ccs,
|
|
103
|
+
shared: L
|
|
102
104
|
}) : [], [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
A,
|
|
106
|
+
K,
|
|
107
|
+
W,
|
|
108
|
+
L
|
|
109
|
+
]), _e = f(() => ({
|
|
110
|
+
...n(E, K?.formFields ?? [], W),
|
|
111
|
+
shared: L
|
|
112
|
+
}), [
|
|
113
|
+
E,
|
|
114
|
+
K,
|
|
115
|
+
W,
|
|
116
|
+
L
|
|
117
|
+
]), ve = u((e) => {
|
|
118
|
+
j((t) => t && {
|
|
112
119
|
...t,
|
|
113
120
|
basic: {
|
|
114
121
|
...t.basic,
|
|
115
122
|
...e
|
|
116
123
|
}
|
|
117
124
|
});
|
|
118
|
-
}, []),
|
|
119
|
-
|
|
125
|
+
}, []), ye = u((e) => {
|
|
126
|
+
j((t) => t && {
|
|
120
127
|
...t,
|
|
121
128
|
initiators: e
|
|
122
129
|
});
|
|
123
|
-
}, []),
|
|
124
|
-
|
|
130
|
+
}, []), be = u((e) => {
|
|
131
|
+
j((t) => t && {
|
|
125
132
|
...t,
|
|
126
133
|
formSchema: e
|
|
127
134
|
});
|
|
128
|
-
}, []),
|
|
129
|
-
|
|
135
|
+
}, []), Y = u((e) => {
|
|
136
|
+
j((t) => t && {
|
|
130
137
|
...t,
|
|
131
138
|
flowDefinition: e
|
|
132
139
|
});
|
|
133
140
|
}, []);
|
|
134
|
-
if (
|
|
141
|
+
if (A === null) return /* @__PURE__ */ v(g, {
|
|
135
142
|
align: "center",
|
|
136
143
|
justify: "center",
|
|
137
144
|
style: { height: "100%" },
|
|
138
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ v(ae, {})
|
|
139
146
|
});
|
|
140
|
-
let
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
147
|
+
let X = A, { basic: Z } = X, Q = [
|
|
148
|
+
Z.code.trim() !== "" && Z.name.trim() !== "" && Z.categoryId !== "" && Z.instanceTitleTemplate.trim() !== "" && (Z.bindingMode !== "business" || re(Z.businessBinding)) && (Z.isAllInitiationAllowed || s(A).length > 0),
|
|
149
|
+
q === null || q.valid,
|
|
150
|
+
J.length === 0,
|
|
144
151
|
!0
|
|
145
|
-
][
|
|
146
|
-
|
|
147
|
-
|
|
152
|
+
][O] ?? !1, xe = [
|
|
153
|
+
"请先完善流程设置中的必填项",
|
|
154
|
+
`表单存在 ${q?.issues.filter((e) => e.severity === "error").length ?? 0} 个错误,可在编辑器底部的问题提示中查看并定位`,
|
|
155
|
+
`流程存在 ${J.length} 个问题,可在画布工具栏的问题提示中查看并定位`,
|
|
156
|
+
void 0
|
|
157
|
+
], $ = Q ? void 0 : xe[O];
|
|
158
|
+
async function Se() {
|
|
159
|
+
F(!0);
|
|
148
160
|
try {
|
|
149
|
-
let e =
|
|
150
|
-
n =
|
|
151
|
-
tenantId:
|
|
152
|
-
code:
|
|
153
|
-
name:
|
|
154
|
-
categoryId:
|
|
155
|
-
icon:
|
|
156
|
-
description:
|
|
157
|
-
labels:
|
|
158
|
-
bindingMode:
|
|
161
|
+
let e = Z.bindingMode === "business" ? Z.businessBinding : void 0, t = s(X), n;
|
|
162
|
+
n = X.flowId === void 0 ? (await pe.mutateAsync({
|
|
163
|
+
tenantId: Z.tenantId,
|
|
164
|
+
code: Z.code,
|
|
165
|
+
name: Z.name,
|
|
166
|
+
categoryId: Z.categoryId,
|
|
167
|
+
icon: Z.icon,
|
|
168
|
+
description: Z.description,
|
|
169
|
+
labels: Z.labels,
|
|
170
|
+
bindingMode: Z.bindingMode,
|
|
159
171
|
businessBinding: e,
|
|
160
|
-
adminUserIds:
|
|
161
|
-
isAllInitiationAllowed:
|
|
162
|
-
instanceTitleTemplate:
|
|
172
|
+
adminUserIds: Z.adminUserIds,
|
|
173
|
+
isAllInitiationAllowed: Z.isAllInitiationAllowed,
|
|
174
|
+
instanceTitleTemplate: Z.instanceTitleTemplate,
|
|
163
175
|
initiators: t
|
|
164
|
-
})).id : (await
|
|
165
|
-
flowId:
|
|
166
|
-
name:
|
|
167
|
-
icon:
|
|
168
|
-
description:
|
|
169
|
-
labels:
|
|
170
|
-
bindingMode:
|
|
176
|
+
})).id : (await me.mutateAsync({
|
|
177
|
+
flowId: X.flowId,
|
|
178
|
+
name: Z.name,
|
|
179
|
+
icon: Z.icon,
|
|
180
|
+
description: Z.description,
|
|
181
|
+
labels: Z.labels,
|
|
182
|
+
bindingMode: Z.bindingMode,
|
|
171
183
|
businessBinding: e,
|
|
172
|
-
adminUserIds:
|
|
173
|
-
isAllInitiationAllowed:
|
|
174
|
-
instanceTitleTemplate:
|
|
184
|
+
adminUserIds: Z.adminUserIds,
|
|
185
|
+
isAllInitiationAllowed: Z.isAllInitiationAllowed,
|
|
186
|
+
instanceTitleTemplate: Z.instanceTitleTemplate,
|
|
175
187
|
initiators: t
|
|
176
188
|
})).id;
|
|
177
|
-
let r = await
|
|
189
|
+
let r = await he.mutateAsync({
|
|
178
190
|
flowId: n,
|
|
179
|
-
description:
|
|
180
|
-
storageMode:
|
|
181
|
-
flowDefinition:
|
|
182
|
-
formSchema:
|
|
191
|
+
description: M.trim() || void 0,
|
|
192
|
+
storageMode: X.storageMode,
|
|
193
|
+
flowDefinition: X.flowDefinition,
|
|
194
|
+
formSchema: X.formSchema ?? void 0
|
|
183
195
|
});
|
|
184
|
-
|
|
196
|
+
N && await ge.mutateAsync({ versionId: r.id }), le(N ? "流程已部署并发布" : "流程已部署为草稿版本"), C();
|
|
185
197
|
} catch {} finally {
|
|
186
|
-
|
|
198
|
+
F(!1);
|
|
187
199
|
}
|
|
188
200
|
}
|
|
189
|
-
let
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
basic:
|
|
192
|
-
categoryOptions:
|
|
193
|
-
initiatorKinds:
|
|
194
|
-
initiators:
|
|
195
|
-
isEditing:
|
|
196
|
-
onBasicChange:
|
|
197
|
-
onInitiatorsChange:
|
|
201
|
+
let Ce = [
|
|
202
|
+
/* @__PURE__ */ v(i, {
|
|
203
|
+
basic: Z,
|
|
204
|
+
categoryOptions: z,
|
|
205
|
+
initiatorKinds: W?.initiators,
|
|
206
|
+
initiators: A.initiators,
|
|
207
|
+
isEditing: D,
|
|
208
|
+
onBasicChange: ve,
|
|
209
|
+
onInitiatorsChange: ye
|
|
198
210
|
}, "basic"),
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
initialSchema:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
onStorageModeChange: (e) => P((t) => t && {
|
|
211
|
+
/* @__PURE__ */ v(o, {
|
|
212
|
+
initialSchema: A.formSchema ?? void 0,
|
|
213
|
+
registries: E.registries,
|
|
214
|
+
storageMode: A.storageMode,
|
|
215
|
+
onSchemaChange: be,
|
|
216
|
+
onStorageModeChange: (e) => j((t) => t && {
|
|
206
217
|
...t,
|
|
207
218
|
storageMode: e
|
|
208
219
|
})
|
|
209
220
|
}, "form"),
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
onChange: he
|
|
221
|
+
/* @__PURE__ */ v(a, {
|
|
222
|
+
plugins: _e,
|
|
223
|
+
value: A.flowDefinition,
|
|
224
|
+
onChange: Y
|
|
215
225
|
}, "flow"),
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
draft:
|
|
218
|
-
fields:
|
|
219
|
-
publishNow:
|
|
220
|
-
versionDescription:
|
|
221
|
-
onPublishNowChange:
|
|
222
|
-
onVersionDescriptionChange:
|
|
226
|
+
/* @__PURE__ */ v(ie, {
|
|
227
|
+
draft: A,
|
|
228
|
+
fields: K?.fields ?? [],
|
|
229
|
+
publishNow: N,
|
|
230
|
+
versionDescription: M,
|
|
231
|
+
onPublishNowChange: fe,
|
|
232
|
+
onVersionDescriptionChange: de
|
|
223
233
|
}, "review")
|
|
224
234
|
];
|
|
225
|
-
return /* @__PURE__ */
|
|
235
|
+
return /* @__PURE__ */ y(g, {
|
|
226
236
|
style: {
|
|
227
237
|
height: "100%",
|
|
228
238
|
flexDirection: "column"
|
|
229
239
|
},
|
|
230
240
|
children: [
|
|
231
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ v("div", {
|
|
232
242
|
style: {
|
|
233
243
|
padding: "12px 32px",
|
|
234
244
|
borderBottom: "1px solid var(--vef-color-border-secondary)"
|
|
235
245
|
},
|
|
236
|
-
children: /* @__PURE__ */
|
|
237
|
-
current:
|
|
238
|
-
items:
|
|
246
|
+
children: /* @__PURE__ */ v(oe, {
|
|
247
|
+
current: O,
|
|
248
|
+
items: x,
|
|
239
249
|
size: "small",
|
|
240
250
|
style: {
|
|
241
251
|
maxWidth: 720,
|
|
@@ -243,16 +253,16 @@ function T({ flow: y, tenantId: T, onClose: E }) {
|
|
|
243
253
|
}
|
|
244
254
|
})
|
|
245
255
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ v("div", {
|
|
247
257
|
style: {
|
|
248
258
|
flex: 1,
|
|
249
259
|
minHeight: 0,
|
|
250
260
|
display: "flex",
|
|
251
261
|
flexDirection: "column"
|
|
252
262
|
},
|
|
253
|
-
children:
|
|
254
|
-
let n = t ===
|
|
255
|
-
return /* @__PURE__ */
|
|
263
|
+
children: Ce.map((e, t) => {
|
|
264
|
+
let n = t === O, r = t === 0 || t === 3;
|
|
265
|
+
return /* @__PURE__ */ v("div", {
|
|
256
266
|
style: {
|
|
257
267
|
display: n ? "flex" : "none",
|
|
258
268
|
flexDirection: "column",
|
|
@@ -265,34 +275,42 @@ function T({ flow: y, tenantId: T, onClose: E }) {
|
|
|
265
275
|
}, t);
|
|
266
276
|
})
|
|
267
277
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ y(g, {
|
|
269
279
|
align: "center",
|
|
270
280
|
justify: "space-between",
|
|
271
281
|
style: {
|
|
272
282
|
padding: "12px 32px",
|
|
273
283
|
borderTop: "1px solid var(--vef-color-border-secondary)"
|
|
274
284
|
},
|
|
275
|
-
children: [/* @__PURE__ */
|
|
276
|
-
disabled:
|
|
277
|
-
onClick: () =>
|
|
285
|
+
children: [/* @__PURE__ */ v(m, {
|
|
286
|
+
disabled: O === 0 || P,
|
|
287
|
+
onClick: () => k((e) => e - 1),
|
|
278
288
|
children: "上一步"
|
|
279
|
-
}),
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
+
}), /* @__PURE__ */ y(g, {
|
|
290
|
+
align: "center",
|
|
291
|
+
gap: "middle",
|
|
292
|
+
children: [$ === void 0 ? null : /* @__PURE__ */ v(se, {
|
|
293
|
+
style: { fontSize: ce.fontSizeSm },
|
|
294
|
+
type: "danger",
|
|
295
|
+
children: $
|
|
296
|
+
}), O < x.length - 1 ? /* @__PURE__ */ v(m, {
|
|
297
|
+
disabled: !Q,
|
|
298
|
+
type: "primary",
|
|
299
|
+
onClick: () => k((e) => e + 1),
|
|
300
|
+
children: "下一步"
|
|
301
|
+
}) : /* @__PURE__ */ v(m, {
|
|
302
|
+
loading: P,
|
|
303
|
+
type: "primary",
|
|
304
|
+
onClick: () => void Se(),
|
|
305
|
+
children: N ? "部署并发布" : "部署为草稿"
|
|
306
|
+
})]
|
|
289
307
|
})]
|
|
290
308
|
})
|
|
291
309
|
]
|
|
292
310
|
});
|
|
293
311
|
}
|
|
294
|
-
function
|
|
295
|
-
return /* @__PURE__ */
|
|
312
|
+
function C({ open: e, flow: t, tenantId: n, onClose: r }) {
|
|
313
|
+
return /* @__PURE__ */ v(h, {
|
|
296
314
|
destroyOnHidden: !0,
|
|
297
315
|
open: e,
|
|
298
316
|
placement: "right",
|
|
@@ -300,7 +318,7 @@ function E({ open: e, flow: t, tenantId: n, onClose: r }) {
|
|
|
300
318
|
styles: { body: { padding: 0 } },
|
|
301
319
|
title: t ? `流程设计 · ${t.name}` : "新建流程",
|
|
302
320
|
onClose: r,
|
|
303
|
-
children: e && /* @__PURE__ */
|
|
321
|
+
children: e && /* @__PURE__ */ v(S, {
|
|
304
322
|
flow: t,
|
|
305
323
|
tenantId: n,
|
|
306
324
|
onClose: r
|
|
@@ -308,4 +326,4 @@ function E({ open: e, flow: t, tenantId: n, onClose: r }) {
|
|
|
308
326
|
});
|
|
309
327
|
}
|
|
310
328
|
//#endregion
|
|
311
|
-
export {
|
|
329
|
+
export { C as FlowDesignerDrawer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.26.0 made by Venus | 2026-10-13T17:04:56.461Z */
|
|
2
2
|
import { initiatorsForSubmit as e } from "./types.js";
|
|
3
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
4
|
import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.26.0 made by Venus | 2026-10-13T17:04:56.461Z */
|
|
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.
|
|
1
|
+
/*! @vef-framework-react/approval v2.26.0 made by Venus | 2026-10-13T17:04:56.461Z */
|
|
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.
|
|
1
|
+
/*! @vef-framework-react/approval v2.26.0 made by Venus | 2026-10-13T17:04:56.461Z */
|
|
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.
|
|
1
|
+
/*! @vef-framework-react/approval v2.26.0 made by Venus | 2026-10-13T17:04:56.461Z */
|
|
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";
|