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