@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.
Files changed (77) hide show
  1. package/dist/cjs/components/detail/admin.cjs +1 -1
  2. package/dist/cjs/components/detail/index.cjs +1 -1
  3. package/dist/cjs/components/form-panel/index.cjs +1 -1
  4. package/dist/cjs/pages/flow-page/designer/flow-step.cjs +1 -1
  5. package/dist/cjs/pages/flow-page/designer/form-step.cjs +1 -1
  6. package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
  7. package/dist/cjs/pages/initiate-page/start-drawer.cjs +1 -1
  8. package/dist/cjs/plugins/form-context.cjs +1 -0
  9. package/dist/es/api/admin-api.js +1 -1
  10. package/dist/es/api/category-api.js +1 -1
  11. package/dist/es/api/delegation-api.js +1 -1
  12. package/dist/es/api/flow-api.js +1 -1
  13. package/dist/es/api/index.js +1 -1
  14. package/dist/es/api/instance-api.js +1 -1
  15. package/dist/es/api/my-api.js +1 -1
  16. package/dist/es/api/query.js +1 -1
  17. package/dist/es/components/action-dialog/index.js +1 -1
  18. package/dist/es/components/detail/action-modals.js +1 -1
  19. package/dist/es/components/detail/admin.js +3 -1
  20. package/dist/es/components/detail/drawer.js +1 -1
  21. package/dist/es/components/detail/index.js +3 -1
  22. package/dist/es/components/flow-graph/index.js +1 -1
  23. package/dist/es/components/flow-graph/node.js +1 -1
  24. package/dist/es/components/flow-graph/people-overlay.js +1 -1
  25. package/dist/es/components/flow-graph/people.js +1 -1
  26. package/dist/es/components/form-panel/index.js +23 -20
  27. package/dist/es/components/format.js +1 -1
  28. package/dist/es/components/icon.js +1 -1
  29. package/dist/es/components/index.js +1 -1
  30. package/dist/es/components/principal/index.js +1 -1
  31. package/dist/es/components/status/colors.js +1 -1
  32. package/dist/es/components/status/index.js +1 -1
  33. package/dist/es/components/status/labels.js +1 -1
  34. package/dist/es/components/timeline/index.js +1 -1
  35. package/dist/es/components/user/index.js +1 -1
  36. package/dist/es/index.js +1 -1
  37. package/dist/es/pages/admin-page/index.js +1 -1
  38. package/dist/es/pages/admin-page/instances.js +1 -1
  39. package/dist/es/pages/admin-page/metrics.js +1 -1
  40. package/dist/es/pages/admin-page/projections.js +1 -1
  41. package/dist/es/pages/admin-page/tasks.js +1 -1
  42. package/dist/es/pages/category-page/columns.js +1 -1
  43. package/dist/es/pages/category-page/form.js +1 -1
  44. package/dist/es/pages/category-page/index.js +1 -1
  45. package/dist/es/pages/delegation-page/columns.js +1 -1
  46. package/dist/es/pages/delegation-page/form.js +1 -1
  47. package/dist/es/pages/delegation-page/index.js +1 -1
  48. package/dist/es/pages/flow-page/columns.js +1 -1
  49. package/dist/es/pages/flow-page/designer/basic-step.js +1 -1
  50. package/dist/es/pages/flow-page/designer/flow-step.js +16 -34
  51. package/dist/es/pages/flow-page/designer/form-step.js +54 -65
  52. package/dist/es/pages/flow-page/designer/index.js +197 -186
  53. package/dist/es/pages/flow-page/designer/review-step.js +1 -1
  54. package/dist/es/pages/flow-page/designer/types.js +1 -1
  55. package/dist/es/pages/flow-page/index.js +1 -1
  56. package/dist/es/pages/flow-page/search.js +1 -1
  57. package/dist/es/pages/flow-page/versions.js +1 -1
  58. package/dist/es/pages/index.js +1 -1
  59. package/dist/es/pages/initiate-page/index.js +1 -1
  60. package/dist/es/pages/initiate-page/start-drawer.js +3 -1
  61. package/dist/es/pages/my-instances-page/index.js +1 -1
  62. package/dist/es/pages/task-center-page/index.js +1 -1
  63. package/dist/es/pages/task-center-page/search.js +1 -1
  64. package/dist/es/permissions.js +1 -1
  65. package/dist/es/plugins/form-context.js +34 -0
  66. package/dist/es/plugins/index.js +1 -1
  67. package/dist/es/types/enums.js +1 -1
  68. package/dist/es/types/index.js +1 -1
  69. package/dist/types/components/form-panel/index.d.ts +15 -3
  70. package/dist/types/index.d.ts +1 -0
  71. package/dist/types/pages/flow-page/designer/flow-step.d.ts +6 -5
  72. package/dist/types/pages/flow-page/designer/form-step.d.ts +9 -10
  73. package/dist/types/plugins/form-context.d.ts +30 -0
  74. package/dist/types/plugins/index.d.ts +25 -5
  75. package/dist/types/types/admin.d.ts +5 -0
  76. package/dist/types/types/my.d.ts +15 -0
  77. package/package.json +7 -7
@@ -1,241 +1,244 @@
1
- /*! @vef-framework-react/approval v2.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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 i } from "../../category-page/form.js";
6
- import { BasicStep as a } from "./basic-step.js";
7
- import { FlowStep as o } from "./flow-step.js";
8
- import { FormStep as s } from "./form-step.js";
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
- import { projectFormSchema as ie, validateApprovalSchema as ae } from "@vef-framework-react/approval-form-bridge";
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";
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 w = [
18
+ var C = [
19
19
  { title: "流程设置" },
20
20
  { title: "表单设计" },
21
21
  { title: "流程设计" },
22
22
  { title: "审阅提交" }
23
23
  ];
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, oe] = _(""), [I, L] = _(!0), [R, z] = _(!1), { data: B } = p({
26
- queryFn: O.findTree,
27
- queryKey: [O.findTree.key, {}]
28
- }), V = g(() => i(B ?? []), [B]), { data: H } = p({
29
- queryFn: D.findVersions,
30
- queryKey: [D.findVersions.key, { flowId: y?.id ?? "" }],
31
- enabled: A
32
- }), U = H?.[0]?.id, { data: W } = p({
33
- queryFn: D.getGraph,
34
- queryKey: [D.getGraph.key, {
35
- flowId: y?.id ?? "",
36
- versionId: U ?? ""
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: A && U !== void 0
39
- }), { data: G } = p({
40
- queryFn: D.findInitiators,
41
- queryKey: [D.findInitiators.key, { flowId: y?.id ?? "" }],
42
- enabled: A
43
- }), { data: K } = p({
44
- queryFn: D.listKindOptions,
45
- queryKey: [D.listKindOptions.key, {}],
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
- h(() => {
49
- if (!A || N !== null || H === void 0 || G === void 0 || H.length > 0 && W === void 0) return;
50
- let e = W?.version ?? null;
51
- P({
52
- flowId: y.id,
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: y.tenantId,
55
- code: y.code,
56
- name: y.name,
57
- categoryId: y.categoryId,
58
- icon: y.icon ?? void 0,
59
- description: y.description ?? void 0,
60
- labels: y.labels ?? {},
61
- bindingMode: y.bindingMode,
62
- businessBinding: y.businessBinding ?? void 0,
63
- adminUserIds: y.adminUserIds,
64
- isAllInitiationAllowed: y.isAllInitiationAllowed,
65
- instanceTitleTemplate: y.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: G.map((e) => ({
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 ?? c
73
+ flowDefinition: e?.flowSchema ?? a
74
74
  });
75
75
  }, [
76
- A,
77
- N,
78
- H,
76
+ k,
77
+ M,
78
+ V,
79
+ U,
79
80
  W,
80
- G,
81
- y
81
+ g
82
82
  ]);
83
- let q = {
83
+ let K = {
84
84
  shouldShowSuccessFeedback: !1,
85
- invalidates: [[D.findFlows.key], [D.findVersions.key]]
86
- }, se = f({
87
- mutationFn: D.create,
88
- meta: q
89
- }), ce = f({
90
- mutationFn: D.update,
91
- meta: q
92
- }), le = f({
93
- mutationFn: D.deploy,
94
- meta: q
95
- }), ue = f({
96
- mutationFn: D.publishVersion,
97
- meta: q
98
- }), 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, {
99
- formFields: J?.formFields ?? [],
100
- assigneeKinds: K?.assignees,
101
- ccKinds: K?.ccs
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
- N,
104
- J,
105
- K
106
- ]), de = g(() => n(k, J?.formFields ?? [], K), [
107
- k,
108
- J,
109
- K
110
- ]), fe = m((e) => {
111
- P((t) => t && {
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
- }, []), pe = m((e) => {
119
- P((t) => t && {
118
+ }, []), ge = d((e) => {
119
+ N((t) => t && {
120
120
  ...t,
121
121
  initiators: e
122
122
  });
123
- }, []), me = m((e) => {
124
- P((t) => t && {
123
+ }, []), _e = d((e) => {
124
+ N((t) => t && {
125
125
  ...t,
126
126
  formSchema: e
127
127
  });
128
- }, []), he = m((e) => {
129
- P((t) => t && {
128
+ }, []), ve = d((e) => {
129
+ N((t) => t && {
130
130
  ...t,
131
131
  flowDefinition: e
132
132
  });
133
133
  }, []);
134
- if (N === null) return /* @__PURE__ */ x(b, {
134
+ if (M === null) return /* @__PURE__ */ b(_, {
135
135
  align: "center",
136
136
  justify: "center",
137
137
  style: { height: "100%" },
138
- children: /* @__PURE__ */ x(te, {})
138
+ children: /* @__PURE__ */ b(v, {})
139
139
  });
140
- let Z = N, { basic: Q } = Z, ge = [
141
- Q.code.trim() !== "" && Q.name.trim() !== "" && Q.categoryId !== "" && Q.instanceTitleTemplate.trim() !== "" && (Q.bindingMode !== "business" || d(Q.businessBinding)) && (Q.isAllInitiationAllowed || u(N).length > 0),
142
- Y === null || Y.valid,
143
- X.length === 0,
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
- ][j] ?? !1;
146
- async function $() {
147
- z(!0);
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 = Q.bindingMode === "business" ? Q.businessBinding : void 0, t = u(Z), n;
150
- n = Z.flowId === void 0 ? (await se.mutateAsync({
151
- tenantId: Q.tenantId,
152
- code: Q.code,
153
- name: Q.name,
154
- categoryId: Q.categoryId,
155
- icon: Q.icon,
156
- description: Q.description,
157
- labels: Q.labels,
158
- bindingMode: Q.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: Q.adminUserIds,
161
- isAllInitiationAllowed: Q.isAllInitiationAllowed,
162
- instanceTitleTemplate: Q.instanceTitleTemplate,
165
+ adminUserIds: Z.adminUserIds,
166
+ isAllInitiationAllowed: Z.isAllInitiationAllowed,
167
+ instanceTitleTemplate: Z.instanceTitleTemplate,
163
168
  initiators: t
164
- })).id : (await ce.mutateAsync({
165
- flowId: Z.flowId,
166
- name: Q.name,
167
- icon: Q.icon,
168
- description: Q.description,
169
- labels: Q.labels,
170
- bindingMode: Q.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: Q.adminUserIds,
173
- isAllInitiationAllowed: Q.isAllInitiationAllowed,
174
- instanceTitleTemplate: Q.instanceTitleTemplate,
177
+ adminUserIds: Z.adminUserIds,
178
+ isAllInitiationAllowed: Z.isAllInitiationAllowed,
179
+ instanceTitleTemplate: Z.instanceTitleTemplate,
175
180
  initiators: t
176
181
  })).id;
177
- let r = await le.mutateAsync({
182
+ let r = await fe.mutateAsync({
178
183
  flowId: n,
179
- description: F.trim() || void 0,
180
- storageMode: Z.storageMode,
181
- flowDefinition: Z.flowDefinition,
182
- formSchema: Z.formSchema ?? void 0
184
+ description: P.trim() || void 0,
185
+ storageMode: X.storageMode,
186
+ flowDefinition: X.flowDefinition,
187
+ formSchema: X.formSchema ?? void 0
183
188
  });
184
- I && await ue.mutateAsync({ versionId: r.id }), re(I ? "流程已部署并发布" : "流程已部署为草稿版本"), E();
189
+ F && await pe.mutateAsync({ versionId: r.id }), oe(F ? "流程已部署并发布" : "流程已部署为草稿版本"), T();
185
190
  } catch {} finally {
186
- z(!1);
191
+ R(!1);
187
192
  }
188
193
  }
189
- let _e = [
190
- /* @__PURE__ */ x(a, {
191
- basic: Q,
192
- categoryOptions: V,
193
- initiatorKinds: K?.initiators,
194
- initiators: N.initiators,
195
- isEditing: A,
196
- onBasicChange: fe,
197
- onInitiatorsChange: pe
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__ */ x(s, {
200
- initialSchema: N.formSchema ?? void 0,
201
- issues: Y?.issues ?? [],
202
- registries: k.registries,
203
- storageMode: N.storageMode,
204
- onSchemaChange: me,
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__ */ x(o, {
211
- errors: X,
212
- plugins: de,
213
- value: N.flowDefinition,
214
- onChange: he
214
+ /* @__PURE__ */ b(ne, {
215
+ plugins: me,
216
+ value: M.flowDefinition,
217
+ onChange: ve
215
218
  }, "flow"),
216
- /* @__PURE__ */ x(ee, {
217
- draft: N,
218
- fields: J?.fields ?? [],
219
- publishNow: I,
220
- versionDescription: F,
221
- onPublishNowChange: L,
222
- onVersionDescriptionChange: oe
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__ */ S(b, {
228
+ return /* @__PURE__ */ x(_, {
226
229
  style: {
227
230
  height: "100%",
228
231
  flexDirection: "column"
229
232
  },
230
233
  children: [
231
- /* @__PURE__ */ x("div", {
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__ */ x(ne, {
237
- current: j,
238
- items: w,
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__ */ x("div", {
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: _e.map((e, t) => {
254
- let n = t === j, r = t === 0 || t === 3;
255
- return /* @__PURE__ */ x("div", {
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__ */ S(b, {
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__ */ x(v, {
276
- disabled: j === 0 || R,
277
- onClick: () => M((e) => e - 1),
278
+ children: [/* @__PURE__ */ b(h, {
279
+ disabled: A === 0 || L,
280
+ onClick: () => j((e) => e - 1),
278
281
  children: "上一步"
279
- }), j < w.length - 1 ? /* @__PURE__ */ x(v, {
280
- disabled: !ge,
281
- type: "primary",
282
- onClick: () => M((e) => e + 1),
283
- children: "下一步"
284
- }) : /* @__PURE__ */ x(v, {
285
- loading: R,
286
- type: "primary",
287
- onClick: () => void $(),
288
- children: I ? "部署并发布" : "部署为草稿"
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 E({ open: e, flow: t, tenantId: n, onClose: r }) {
295
- return /* @__PURE__ */ x(y, {
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__ */ x(T, {
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 { E as FlowDesignerDrawer };
322
+ export { T as FlowDesignerDrawer };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
1
+ /*! @vef-framework-react/approval v2.25.0 made by Venus | 2026-10-13T08:59:38.583Z */
2
2
  //#region src/pages/flow-page/designer/types.ts
3
3
  var e = {
4
4
  nodes: [],
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
1
+ /*! @vef-framework-react/approval v2.25.0 made by Venus | 2026-10-13T08:59:38.583Z */
2
2
  //#region src/permissions.ts
3
3
  var e = {
4
4
  category: {
@@ -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 };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
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";