@vef-framework-react/approval 2.14.0 → 2.16.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 (78) 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/flow-graph/index.cjs +1 -1
  4. package/dist/cjs/components/flow-graph/node.cjs +1 -0
  5. package/dist/cjs/components/flow-graph/people-overlay.cjs +1 -0
  6. package/dist/cjs/components/flow-graph/people.cjs +1 -0
  7. package/dist/cjs/components/index.cjs +1 -1
  8. package/dist/cjs/components/timeline/index.cjs +1 -1
  9. package/dist/cjs/components/user/index.cjs +1 -1
  10. package/dist/cjs/index.cjs +1 -1
  11. package/dist/cjs/pages/admin-page/instances.cjs +1 -1
  12. package/dist/cjs/pages/admin-page/metrics.cjs +1 -1
  13. package/dist/cjs/pages/admin-page/projections.cjs +1 -1
  14. package/dist/cjs/pages/admin-page/tasks.cjs +1 -1
  15. package/dist/cjs/pages/my-instances-page/index.cjs +1 -1
  16. package/dist/es/api/admin-api.js +1 -1
  17. package/dist/es/api/category-api.js +1 -1
  18. package/dist/es/api/delegation-api.js +1 -1
  19. package/dist/es/api/flow-api.js +1 -1
  20. package/dist/es/api/index.js +1 -1
  21. package/dist/es/api/instance-api.js +1 -1
  22. package/dist/es/api/my-api.js +1 -1
  23. package/dist/es/api/query.js +1 -1
  24. package/dist/es/components/detail/action-modals.js +1 -1
  25. package/dist/es/components/detail/admin.js +20 -20
  26. package/dist/es/components/detail/drawer.js +1 -1
  27. package/dist/es/components/detail/index.js +65 -65
  28. package/dist/es/components/flow-graph/index.js +42 -170
  29. package/dist/es/components/flow-graph/node.js +148 -0
  30. package/dist/es/components/flow-graph/people-overlay.js +212 -0
  31. package/dist/es/components/flow-graph/people.js +47 -0
  32. package/dist/es/components/form-panel/index.js +1 -1
  33. package/dist/es/components/format.js +1 -1
  34. package/dist/es/components/icon.js +1 -1
  35. package/dist/es/components/index.js +9 -9
  36. package/dist/es/components/principal/index.js +1 -1
  37. package/dist/es/components/status/colors.js +1 -1
  38. package/dist/es/components/status/index.js +1 -1
  39. package/dist/es/components/status/labels.js +1 -1
  40. package/dist/es/components/timeline/index.js +37 -37
  41. package/dist/es/components/user/index.js +2 -2
  42. package/dist/es/index.js +9 -9
  43. package/dist/es/pages/admin-page/index.js +1 -1
  44. package/dist/es/pages/admin-page/instances.js +5 -5
  45. package/dist/es/pages/admin-page/metrics.js +11 -11
  46. package/dist/es/pages/admin-page/projections.js +6 -6
  47. package/dist/es/pages/admin-page/tasks.js +6 -6
  48. package/dist/es/pages/category-page/columns.js +1 -1
  49. package/dist/es/pages/category-page/form.js +1 -1
  50. package/dist/es/pages/category-page/index.js +1 -1
  51. package/dist/es/pages/delegation-page/columns.js +1 -1
  52. package/dist/es/pages/delegation-page/form.js +1 -1
  53. package/dist/es/pages/delegation-page/index.js +1 -1
  54. package/dist/es/pages/flow-page/columns.js +1 -1
  55. package/dist/es/pages/flow-page/designer/basic-step.js +1 -1
  56. package/dist/es/pages/flow-page/designer/flow-step.js +1 -1
  57. package/dist/es/pages/flow-page/designer/form-step.js +1 -1
  58. package/dist/es/pages/flow-page/designer/index.js +1 -1
  59. package/dist/es/pages/flow-page/designer/review-step.js +1 -1
  60. package/dist/es/pages/flow-page/designer/types.js +1 -1
  61. package/dist/es/pages/flow-page/index.js +1 -1
  62. package/dist/es/pages/flow-page/search.js +1 -1
  63. package/dist/es/pages/flow-page/versions.js +1 -1
  64. package/dist/es/pages/index.js +1 -1
  65. package/dist/es/pages/initiate-page/index.js +1 -1
  66. package/dist/es/pages/initiate-page/start-drawer.js +1 -1
  67. package/dist/es/pages/my-instances-page/index.js +7 -7
  68. package/dist/es/pages/task-center-page/index.js +1 -1
  69. package/dist/es/permissions.js +1 -1
  70. package/dist/es/plugins/index.js +1 -1
  71. package/dist/es/types/enums.js +1 -1
  72. package/dist/es/types/index.js +1 -1
  73. package/dist/types/components/flow-graph/index.d.ts +3 -2
  74. package/dist/types/components/flow-graph/node.d.ts +10 -0
  75. package/dist/types/components/flow-graph/people-overlay.d.ts +19 -0
  76. package/dist/types/components/flow-graph/people.d.ts +53 -0
  77. package/dist/types/components/user/index.d.ts +6 -0
  78. package/package.json +7 -7
@@ -1,34 +1,34 @@
1
- /*! @vef-framework-react/approval v2.14.0 made by Venus | 2026-08-05T04:06:52.283Z */
1
+ /*! @vef-framework-react/approval v2.16.0 made by Venus | 2026-08-18T09:27:00.950Z */
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 { useApprovalPlugins as n } from "../../plugins/index.js";
5
- import { InstanceFlowGraphViewer as r } from "../flow-graph/index.js";
6
- import { InstanceFormPanel as i } from "../form-panel/index.js";
7
- import { formatTimestamp as a } from "../format.js";
8
- import { InstanceStatusTag as o } from "../status/index.js";
9
- import { UserLabel as s } from "../user/index.js";
5
+ import { formatTimestamp as r } from "../format.js";
6
+ import { InstanceStatusTag as i } from "../status/index.js";
7
+ import { UserLabel as a } from "../user/index.js";
8
+ import { InstanceFlowGraphViewer as o } from "../flow-graph/index.js";
9
+ import { InstanceFormPanel as s } from "../form-panel/index.js";
10
10
  import { InstanceTimeline as c } from "../timeline/index.js";
11
11
  import { AddAssigneeModal as l, CCModal as u, ReasonModal as d, RemoveAssigneeModal as f, RollbackModal as p, TransferModal as m, UrgeModal as h } from "./action-modals.js";
12
- import { useMutation as g, useQuery as ee } from "@vef-framework-react/core";
13
- import { useMemo as _, useRef as v, useState as y } from "react";
14
- import { Button as b, Descriptions as x, Empty as te, Flex as S, Icon as C, Input as ne, Labeled as w, LabelsDisplay as T, Space as re, Spin as ie, Stack as E, Tabs as ae, Text as D, Title as O, globalCssVars as oe, showSuccessMessage as se, showWarningMessage as ce } from "@vef-framework-react/components";
12
+ import { useMutation as g, useQuery as _ } from "@vef-framework-react/core";
13
+ import { useMemo as v, useRef as y, useState as b } from "react";
14
+ import { Button as x, Descriptions as S, Empty as ee, Flex as C, Icon as w, Input as te, Labeled as ne, LabelsDisplay as T, Space as re, Spin as ie, Stack as E, Tabs as ae, Text as D, Title as O, globalCssVars as oe, showSuccessMessage as se, showWarningMessage as ce } from "@vef-framework-react/components";
15
15
  import { CheckIcon as le, CornerUpLeftIcon as ue, MailPlusIcon as de, MegaphoneIcon as fe, RotateCcwIcon as pe, SendIcon as me, Undo2Icon as he, UserMinusIcon as ge, UserPlusIcon as _e, XIcon as ve } from "lucide-react";
16
16
  import { Fragment as ye, jsx as k, jsxs as A } from "@emotion/react/jsx-runtime";
17
17
  //#region src/components/detail/index.tsx
18
- function j({ title: e, status: t, instanceNo: r, flowName: i, flowCode: c, applicant: l, createdAt: u, finishedAt: d, currentNodeName: f, businessRef: p, labels: m }) {
18
+ function j({ title: e, status: t, instanceNo: o, flowName: s, flowCode: c, applicant: l, createdAt: u, finishedAt: d, currentNodeName: f, businessRef: p, labels: m }) {
19
19
  let { renderBusinessRef: h } = n(), g = [
20
20
  {
21
21
  key: "no",
22
22
  label: "审批单号",
23
23
  children: /* @__PURE__ */ k(D, {
24
24
  copyable: !0,
25
- children: r
25
+ children: o
26
26
  })
27
27
  },
28
28
  {
29
29
  key: "flow",
30
30
  label: "所属流程",
31
- children: i
31
+ children: s
32
32
  },
33
33
  ...c ? [{
34
34
  key: "flowCode",
@@ -41,12 +41,12 @@ function j({ title: e, status: t, instanceNo: r, flowName: i, flowCode: c, appli
41
41
  {
42
42
  key: "applicant",
43
43
  label: "申请人",
44
- children: /* @__PURE__ */ k(s, { user: l })
44
+ children: /* @__PURE__ */ k(a, { user: l })
45
45
  },
46
46
  {
47
47
  key: "created",
48
48
  label: "提交时间",
49
- children: a(u)
49
+ children: r(u)
50
50
  }
51
51
  ];
52
52
  return f !== void 0 && g.push({
@@ -56,7 +56,7 @@ function j({ title: e, status: t, instanceNo: r, flowName: i, flowCode: c, appli
56
56
  }), d !== void 0 && g.push({
57
57
  key: "finished",
58
58
  label: "完成时间",
59
- children: a(d)
59
+ children: r(d)
60
60
  }), p !== void 0 && p !== "" && g.push({
61
61
  key: "businessRef",
62
62
  label: "业务单据",
@@ -70,7 +70,7 @@ function j({ title: e, status: t, instanceNo: r, flowName: i, flowCode: c, appli
70
70
  children: /* @__PURE__ */ k(T, { labels: m })
71
71
  }), /* @__PURE__ */ A(E, {
72
72
  gap: 12,
73
- children: [/* @__PURE__ */ A(S, {
73
+ children: [/* @__PURE__ */ A(C, {
74
74
  align: "center",
75
75
  gap: "middle",
76
76
  wrap: "wrap",
@@ -78,8 +78,8 @@ function j({ title: e, status: t, instanceNo: r, flowName: i, flowCode: c, appli
78
78
  level: 4,
79
79
  style: { margin: 0 },
80
80
  children: e
81
- }), /* @__PURE__ */ k(o, { status: t })]
82
- }), /* @__PURE__ */ k(x, {
81
+ }), /* @__PURE__ */ k(i, { status: t })]
82
+ }), /* @__PURE__ */ k(S, {
83
83
  colon: !0,
84
84
  items: g,
85
85
  size: "small",
@@ -91,33 +91,33 @@ function j({ title: e, status: t, instanceNo: r, flowName: i, flowCode: c, appli
91
91
  })]
92
92
  });
93
93
  }
94
- function M({ instanceId: n, onActionCompleted: a }) {
95
- let o = t(), s = e(), { data: x, isLoading: T, refetch: D } = ee({
96
- queryFn: o.getInstanceDetail,
97
- queryKey: [o.getInstanceDetail.key, { instanceId: n }]
94
+ function M({ instanceId: n, onActionCompleted: r }) {
95
+ let i = t(), a = e(), { data: S, isLoading: T, refetch: D } = _({
96
+ queryFn: i.getInstanceDetail,
97
+ queryKey: [i.getInstanceDetail.key, { instanceId: n }]
98
98
  }), O = { meta: { shouldShowSuccessFeedback: !1 } }, M = g({
99
- mutationFn: s.processTask,
99
+ mutationFn: a.processTask,
100
100
  ...O
101
101
  }), be = g({
102
- mutationFn: s.resubmit,
102
+ mutationFn: a.resubmit,
103
103
  ...O
104
104
  }), xe = g({
105
- mutationFn: s.withdraw,
105
+ mutationFn: a.withdraw,
106
106
  ...O
107
107
  }), Se = g({
108
- mutationFn: s.addAssignee,
108
+ mutationFn: a.addAssignee,
109
109
  ...O
110
110
  }), Ce = g({
111
- mutationFn: s.removeAssignee,
111
+ mutationFn: a.removeAssignee,
112
112
  ...O
113
113
  }), we = g({
114
- mutationFn: s.addCC,
114
+ mutationFn: a.addCC,
115
115
  ...O
116
116
  }), Te = g({
117
- mutationFn: s.urgeTask,
117
+ mutationFn: a.urgeTask,
118
118
  ...O
119
- }), [N, P] = y(null), [F, I] = y(""), [L, R] = y(!1), z = v(null), B = v(null), V = _(() => new Set(x?.availableActions), [x]), H = x?.myTask, U = _(() => {
120
- let e = [], t = x?.timeline ?? [];
119
+ }), [N, P] = b(null), [F, I] = b(""), [L, R] = b(!1), z = y(null), B = y(null), V = v(() => new Set(S?.availableActions), [S]), H = S?.myTask, U = v(() => {
120
+ let e = [], t = S?.timeline ?? [];
121
121
  for (let n of t) {
122
122
  if (n.kind !== "approval" && n.kind !== "handle") continue;
123
123
  let t = n.participants ?? [];
@@ -128,17 +128,17 @@ function M({ instanceId: n, onActionCompleted: a }) {
128
128
  });
129
129
  }
130
130
  return e;
131
- }, [x]);
132
- if (T) return /* @__PURE__ */ k(S, {
131
+ }, [S]);
132
+ if (T) return /* @__PURE__ */ k(C, {
133
133
  align: "center",
134
134
  justify: "center",
135
135
  style: { minHeight: 240 },
136
136
  children: /* @__PURE__ */ k(ie, {})
137
137
  });
138
- if (!x) return /* @__PURE__ */ k(te, { description: "未找到审批单" });
139
- let { instance: W } = x, G = V.has("handle") ? "handle" : V.has("approve") ? "approve" : null, K = G !== null && H !== void 0, q = V.has("resubmit"), Ee = K || q;
138
+ if (!S) return /* @__PURE__ */ k(ee, { description: "未找到审批单" });
139
+ let { instance: W } = S, G = V.has("handle") ? "handle" : V.has("approve") ? "approve" : null, K = G !== null && H !== void 0, q = V.has("resubmit"), Ee = K || q;
140
140
  async function J(e) {
141
- se(e), I(""), await D(), a?.();
141
+ se(e), I(""), await D(), r?.();
142
142
  }
143
143
  async function Y(e, t) {
144
144
  R(!0);
@@ -153,7 +153,7 @@ function M({ instanceId: n, onActionCompleted: a }) {
153
153
  }
154
154
  async function Z(e) {
155
155
  if (!(e !== "resubmit" && !X())) {
156
- if (!x?.formSchema) {
156
+ if (!S?.formSchema) {
157
157
  await Q(e, void 0);
158
158
  return;
159
159
  }
@@ -195,43 +195,43 @@ function M({ instanceId: n, onActionCompleted: a }) {
195
195
  }), "已拒绝");
196
196
  }
197
197
  let $ = [];
198
- V.has("transfer") && H !== void 0 && $.push(/* @__PURE__ */ k(b, {
199
- icon: /* @__PURE__ */ k(C, { component: ue }),
198
+ V.has("transfer") && H !== void 0 && $.push(/* @__PURE__ */ k(x, {
199
+ icon: /* @__PURE__ */ k(w, { component: ue }),
200
200
  onClick: () => P("transfer"),
201
201
  children: "转办"
202
- }, "transfer")), V.has("rollback") && (H?.rollbackTargets?.length ?? 0) > 0 && $.push(/* @__PURE__ */ k(b, {
203
- icon: /* @__PURE__ */ k(C, { component: he }),
202
+ }, "transfer")), V.has("rollback") && (H?.rollbackTargets?.length ?? 0) > 0 && $.push(/* @__PURE__ */ k(x, {
203
+ icon: /* @__PURE__ */ k(w, { component: he }),
204
204
  onClick: () => P("rollback"),
205
205
  children: "回退"
206
- }, "rollback")), V.has("add_assignee") && (H?.addAssigneeTypes?.length ?? 0) > 0 && $.push(/* @__PURE__ */ k(b, {
207
- icon: /* @__PURE__ */ k(C, { component: _e }),
206
+ }, "rollback")), V.has("add_assignee") && (H?.addAssigneeTypes?.length ?? 0) > 0 && $.push(/* @__PURE__ */ k(x, {
207
+ icon: /* @__PURE__ */ k(w, { component: _e }),
208
208
  onClick: () => P("addAssignee"),
209
209
  children: "加签"
210
- }, "addAssignee")), V.has("remove_assignee") && (H?.removableAssignees?.length ?? 0) > 0 && $.push(/* @__PURE__ */ k(b, {
211
- icon: /* @__PURE__ */ k(C, { component: ge }),
210
+ }, "addAssignee")), V.has("remove_assignee") && (H?.removableAssignees?.length ?? 0) > 0 && $.push(/* @__PURE__ */ k(x, {
211
+ icon: /* @__PURE__ */ k(w, { component: ge }),
212
212
  onClick: () => P("removeAssignee"),
213
213
  children: "减签"
214
- }, "removeAssignee")), V.has("add_cc") && $.push(/* @__PURE__ */ k(b, {
215
- icon: /* @__PURE__ */ k(C, { component: de }),
214
+ }, "removeAssignee")), V.has("add_cc") && $.push(/* @__PURE__ */ k(x, {
215
+ icon: /* @__PURE__ */ k(w, { component: de }),
216
216
  onClick: () => P("cc"),
217
217
  children: "抄送"
218
- }, "cc")), V.has("urge") && U.length > 0 && $.push(/* @__PURE__ */ k(b, {
219
- icon: /* @__PURE__ */ k(C, { component: fe }),
218
+ }, "cc")), V.has("urge") && U.length > 0 && $.push(/* @__PURE__ */ k(x, {
219
+ icon: /* @__PURE__ */ k(w, { component: fe }),
220
220
  onClick: () => P("urge"),
221
221
  children: "催办"
222
- }, "urge")), V.has("withdraw") && $.push(/* @__PURE__ */ k(b, {
223
- icon: /* @__PURE__ */ k(C, { component: pe }),
222
+ }, "urge")), V.has("withdraw") && $.push(/* @__PURE__ */ k(x, {
223
+ icon: /* @__PURE__ */ k(w, { component: pe }),
224
224
  onClick: () => P("withdraw"),
225
225
  children: "撤回"
226
226
  }, "withdraw"));
227
227
  let ke = K || q || $.length > 0, Ae = /* @__PURE__ */ A(E, {
228
228
  gap: 16,
229
- children: [/* @__PURE__ */ k(i, {
229
+ children: [/* @__PURE__ */ k(s, {
230
230
  apiRef: z,
231
231
  disabled: !Ee,
232
- fieldPermissions: x.fieldPermissions,
232
+ fieldPermissions: S.fieldPermissions,
233
233
  formData: W.formData,
234
- schema: x.formSchema,
234
+ schema: S.formSchema,
235
235
  onSubmit: De
236
236
  }), ke && /* @__PURE__ */ A(E, {
237
237
  gap: 12,
@@ -239,36 +239,36 @@ function M({ instanceId: n, onActionCompleted: a }) {
239
239
  borderTop: `1px solid ${oe.colorBorderSecondary}`,
240
240
  paddingTop: 16
241
241
  },
242
- children: [K && /* @__PURE__ */ k(w, {
242
+ children: [K && /* @__PURE__ */ k(ne, {
243
243
  label: "审批意见",
244
244
  required: H?.isOpinionRequired === !0,
245
- children: /* @__PURE__ */ k(ne.TextArea, {
245
+ children: /* @__PURE__ */ k(te.TextArea, {
246
246
  maxLength: 2e3,
247
247
  placeholder: "请输入审批意见",
248
248
  rows: 3,
249
249
  value: F,
250
250
  onChange: (e) => I(e.target.value)
251
251
  })
252
- }), /* @__PURE__ */ A(S, {
252
+ }), /* @__PURE__ */ A(C, {
253
253
  align: "center",
254
254
  gap: "small",
255
255
  wrap: "wrap",
256
256
  children: [
257
- K && /* @__PURE__ */ A(ye, { children: [/* @__PURE__ */ k(b, {
258
- icon: /* @__PURE__ */ k(C, { component: le }),
257
+ K && /* @__PURE__ */ A(ye, { children: [/* @__PURE__ */ k(x, {
258
+ icon: /* @__PURE__ */ k(w, { component: le }),
259
259
  loading: L,
260
260
  type: "primary",
261
261
  onClick: () => void Z(G),
262
262
  children: G === "handle" ? "办理" : "通过"
263
- }), /* @__PURE__ */ k(b, {
263
+ }), /* @__PURE__ */ k(x, {
264
264
  danger: !0,
265
- icon: /* @__PURE__ */ k(C, { component: ve }),
265
+ icon: /* @__PURE__ */ k(w, { component: ve }),
266
266
  loading: L,
267
267
  onClick: () => void Oe(),
268
268
  children: "拒绝"
269
269
  })] }),
270
- q && /* @__PURE__ */ k(b, {
271
- icon: /* @__PURE__ */ k(C, { component: me }),
270
+ q && /* @__PURE__ */ k(x, {
271
+ icon: /* @__PURE__ */ k(w, { component: me }),
272
272
  loading: L,
273
273
  type: "primary",
274
274
  onClick: () => void Z("resubmit"),
@@ -307,12 +307,12 @@ function M({ instanceId: n, onActionCompleted: a }) {
307
307
  {
308
308
  key: "timeline",
309
309
  label: "流转记录",
310
- children: /* @__PURE__ */ k(c, { timeline: x.timeline })
310
+ children: /* @__PURE__ */ k(c, { timeline: S.timeline })
311
311
  },
312
312
  {
313
313
  key: "graph",
314
314
  label: "流程图",
315
- children: /* @__PURE__ */ k(r, { flowGraph: x.flowGraph })
315
+ children: /* @__PURE__ */ k(o, { flowGraph: S.flowGraph })
316
316
  }
317
317
  ] }),
318
318
  /* @__PURE__ */ k(m, {