@vef-framework-react/approval 2.12.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 (176) hide show
  1. package/LICENSE +201 -0
  2. package/dist/cjs/_internal/_rolldown/runtime.cjs +1 -0
  3. package/dist/cjs/api/admin-api.cjs +1 -0
  4. package/dist/cjs/api/category-api.cjs +1 -0
  5. package/dist/cjs/api/delegation-api.cjs +1 -0
  6. package/dist/cjs/api/flow-api.cjs +1 -0
  7. package/dist/cjs/api/index.cjs +1 -0
  8. package/dist/cjs/api/instance-api.cjs +1 -0
  9. package/dist/cjs/api/my-api.cjs +1 -0
  10. package/dist/cjs/api/query.cjs +1 -0
  11. package/dist/cjs/components/detail/action-modals.cjs +1 -0
  12. package/dist/cjs/components/detail/admin.cjs +1 -0
  13. package/dist/cjs/components/detail/drawer.cjs +1 -0
  14. package/dist/cjs/components/detail/index.cjs +1 -0
  15. package/dist/cjs/components/flow-graph/index.cjs +1 -0
  16. package/dist/cjs/components/form-panel/index.cjs +1 -0
  17. package/dist/cjs/components/format.cjs +1 -0
  18. package/dist/cjs/components/icon.cjs +1 -0
  19. package/dist/cjs/components/index.cjs +1 -0
  20. package/dist/cjs/components/principal/index.cjs +1 -0
  21. package/dist/cjs/components/status/colors.cjs +1 -0
  22. package/dist/cjs/components/status/index.cjs +1 -0
  23. package/dist/cjs/components/status/labels.cjs +1 -0
  24. package/dist/cjs/components/timeline/index.cjs +1 -0
  25. package/dist/cjs/components/user/index.cjs +1 -0
  26. package/dist/cjs/index.cjs +1 -0
  27. package/dist/cjs/pages/admin-page/index.cjs +1 -0
  28. package/dist/cjs/pages/admin-page/instances.cjs +1 -0
  29. package/dist/cjs/pages/admin-page/metrics.cjs +1 -0
  30. package/dist/cjs/pages/admin-page/projections.cjs +1 -0
  31. package/dist/cjs/pages/admin-page/tasks.cjs +1 -0
  32. package/dist/cjs/pages/category-page/columns.cjs +1 -0
  33. package/dist/cjs/pages/category-page/form.cjs +1 -0
  34. package/dist/cjs/pages/category-page/index.cjs +1 -0
  35. package/dist/cjs/pages/delegation-page/columns.cjs +1 -0
  36. package/dist/cjs/pages/delegation-page/form.cjs +1 -0
  37. package/dist/cjs/pages/delegation-page/index.cjs +1 -0
  38. package/dist/cjs/pages/flow-page/columns.cjs +1 -0
  39. package/dist/cjs/pages/flow-page/designer/basic-step.cjs +1 -0
  40. package/dist/cjs/pages/flow-page/designer/flow-step.cjs +1 -0
  41. package/dist/cjs/pages/flow-page/designer/form-step.cjs +1 -0
  42. package/dist/cjs/pages/flow-page/designer/index.cjs +1 -0
  43. package/dist/cjs/pages/flow-page/designer/review-step.cjs +1 -0
  44. package/dist/cjs/pages/flow-page/designer/types.cjs +1 -0
  45. package/dist/cjs/pages/flow-page/index.cjs +1 -0
  46. package/dist/cjs/pages/flow-page/search.cjs +1 -0
  47. package/dist/cjs/pages/flow-page/versions.cjs +1 -0
  48. package/dist/cjs/pages/index.cjs +1 -0
  49. package/dist/cjs/pages/initiate-page/index.cjs +1 -0
  50. package/dist/cjs/pages/initiate-page/start-drawer.cjs +1 -0
  51. package/dist/cjs/pages/my-instances-page/index.cjs +1 -0
  52. package/dist/cjs/pages/task-center-page/index.cjs +1 -0
  53. package/dist/cjs/permissions.cjs +1 -0
  54. package/dist/cjs/plugins/index.cjs +1 -0
  55. package/dist/cjs/types/enums.cjs +1 -0
  56. package/dist/cjs/types/index.cjs +1 -0
  57. package/dist/es/api/admin-api.js +33 -0
  58. package/dist/es/api/category-api.js +17 -0
  59. package/dist/es/api/delegation-api.js +21 -0
  60. package/dist/es/api/flow-api.js +22 -0
  61. package/dist/es/api/index.js +9 -0
  62. package/dist/es/api/instance-api.js +27 -0
  63. package/dist/es/api/my-api.js +29 -0
  64. package/dist/es/api/query.js +14 -0
  65. package/dist/es/components/detail/action-modals.js +280 -0
  66. package/dist/es/components/detail/admin.js +147 -0
  67. package/dist/es/components/detail/drawer.js +21 -0
  68. package/dist/es/components/detail/index.js +392 -0
  69. package/dist/es/components/flow-graph/index.js +218 -0
  70. package/dist/es/components/form-panel/index.js +23 -0
  71. package/dist/es/components/format.js +16 -0
  72. package/dist/es/components/icon.js +13 -0
  73. package/dist/es/components/index.js +14 -0
  74. package/dist/es/components/principal/index.js +31 -0
  75. package/dist/es/components/status/colors.js +39 -0
  76. package/dist/es/components/status/index.js +41 -0
  77. package/dist/es/components/status/labels.js +94 -0
  78. package/dist/es/components/timeline/index.js +173 -0
  79. package/dist/es/components/user/index.js +64 -0
  80. package/dist/es/index.js +34 -0
  81. package/dist/es/pages/admin-page/index.js +67 -0
  82. package/dist/es/pages/admin-page/instances.js +148 -0
  83. package/dist/es/pages/admin-page/metrics.js +153 -0
  84. package/dist/es/pages/admin-page/projections.js +122 -0
  85. package/dist/es/pages/admin-page/tasks.js +170 -0
  86. package/dist/es/pages/category-page/columns.js +56 -0
  87. package/dist/es/pages/category-page/form.js +106 -0
  88. package/dist/es/pages/category-page/index.js +136 -0
  89. package/dist/es/pages/delegation-page/columns.js +60 -0
  90. package/dist/es/pages/delegation-page/form.js +117 -0
  91. package/dist/es/pages/delegation-page/index.js +122 -0
  92. package/dist/es/pages/flow-page/columns.js +81 -0
  93. package/dist/es/pages/flow-page/designer/basic-step.js +396 -0
  94. package/dist/es/pages/flow-page/designer/flow-step.js +41 -0
  95. package/dist/es/pages/flow-page/designer/form-step.js +87 -0
  96. package/dist/es/pages/flow-page/designer/index.js +294 -0
  97. package/dist/es/pages/flow-page/designer/review-step.js +132 -0
  98. package/dist/es/pages/flow-page/designer/types.js +40 -0
  99. package/dist/es/pages/flow-page/index.js +99 -0
  100. package/dist/es/pages/flow-page/search.js +53 -0
  101. package/dist/es/pages/flow-page/versions.js +94 -0
  102. package/dist/es/pages/index.js +12 -0
  103. package/dist/es/pages/initiate-page/index.js +168 -0
  104. package/dist/es/pages/initiate-page/start-drawer.js +118 -0
  105. package/dist/es/pages/my-instances-page/index.js +223 -0
  106. package/dist/es/pages/task-center-page/index.js +182 -0
  107. package/dist/es/permissions.js +48 -0
  108. package/dist/es/plugins/index.js +34 -0
  109. package/dist/es/types/enums.js +12 -0
  110. package/dist/es/types/index.js +3 -0
  111. package/dist/types/api/admin-api.d.ts +30 -0
  112. package/dist/types/api/category-api.d.ts +17 -0
  113. package/dist/types/api/delegation-api.d.ts +18 -0
  114. package/dist/types/api/flow-api.d.ts +34 -0
  115. package/dist/types/api/index.d.ts +7 -0
  116. package/dist/types/api/instance-api.d.ts +22 -0
  117. package/dist/types/api/my-api.d.ts +29 -0
  118. package/dist/types/api/query.d.ts +15 -0
  119. package/dist/types/components/detail/action-modals.d.ts +82 -0
  120. package/dist/types/components/detail/admin.d.ts +11 -0
  121. package/dist/types/components/detail/drawer.d.ts +17 -0
  122. package/dist/types/components/detail/index.d.ts +36 -0
  123. package/dist/types/components/flow-graph/index.d.ts +17 -0
  124. package/dist/types/components/form-panel/index.d.ts +38 -0
  125. package/dist/types/components/format.d.ts +10 -0
  126. package/dist/types/components/icon.d.ts +15 -0
  127. package/dist/types/components/index.d.ts +12 -0
  128. package/dist/types/components/principal/index.d.ts +18 -0
  129. package/dist/types/components/status/colors.d.ts +13 -0
  130. package/dist/types/components/status/index.d.ts +37 -0
  131. package/dist/types/components/status/labels.d.ts +34 -0
  132. package/dist/types/components/timeline/index.d.ts +11 -0
  133. package/dist/types/components/user/index.d.ts +38 -0
  134. package/dist/types/index.d.ts +9 -0
  135. package/dist/types/pages/admin-page/index.d.ts +31 -0
  136. package/dist/types/pages/admin-page/instances.d.ts +9 -0
  137. package/dist/types/pages/admin-page/metrics.d.ts +9 -0
  138. package/dist/types/pages/admin-page/projections.d.ts +8 -0
  139. package/dist/types/pages/admin-page/tasks.d.ts +7 -0
  140. package/dist/types/pages/category-page/columns.d.ts +3 -0
  141. package/dist/types/pages/category-page/form.d.ts +25 -0
  142. package/dist/types/pages/category-page/index.d.ts +8 -0
  143. package/dist/types/pages/category-page/props.d.ts +24 -0
  144. package/dist/types/pages/delegation-page/columns.d.ts +3 -0
  145. package/dist/types/pages/delegation-page/form.d.ts +6 -0
  146. package/dist/types/pages/delegation-page/index.d.ts +7 -0
  147. package/dist/types/pages/delegation-page/props.d.ts +17 -0
  148. package/dist/types/pages/flow-page/columns.d.ts +12 -0
  149. package/dist/types/pages/flow-page/designer/basic-step.d.ts +20 -0
  150. package/dist/types/pages/flow-page/designer/flow-step.d.ts +16 -0
  151. package/dist/types/pages/flow-page/designer/form-step.d.ts +31 -0
  152. package/dist/types/pages/flow-page/designer/index.d.ts +20 -0
  153. package/dist/types/pages/flow-page/designer/review-step.d.ts +18 -0
  154. package/dist/types/pages/flow-page/designer/types.d.ts +52 -0
  155. package/dist/types/pages/flow-page/index.d.ts +11 -0
  156. package/dist/types/pages/flow-page/props.d.ts +24 -0
  157. package/dist/types/pages/flow-page/search.d.ts +8 -0
  158. package/dist/types/pages/flow-page/versions.d.ts +16 -0
  159. package/dist/types/pages/index.d.ts +8 -0
  160. package/dist/types/pages/initiate-page/index.d.ts +28 -0
  161. package/dist/types/pages/initiate-page/start-drawer.d.ts +23 -0
  162. package/dist/types/pages/my-instances-page/index.d.ts +16 -0
  163. package/dist/types/pages/task-center-page/index.d.ts +17 -0
  164. package/dist/types/permissions.d.ts +68 -0
  165. package/dist/types/plugins/index.d.ts +61 -0
  166. package/dist/types/types/admin.d.ts +185 -0
  167. package/dist/types/types/base.d.ts +36 -0
  168. package/dist/types/types/category.d.ts +37 -0
  169. package/dist/types/types/delegation.d.ts +38 -0
  170. package/dist/types/types/detail.d.ts +129 -0
  171. package/dist/types/types/enums.d.ts +81 -0
  172. package/dist/types/types/flow.d.ts +192 -0
  173. package/dist/types/types/index.d.ts +9 -0
  174. package/dist/types/types/instance.d.ts +83 -0
  175. package/dist/types/types/my.d.ts +203 -0
  176. package/package.json +71 -0
@@ -0,0 +1,182 @@
1
+ /*! @vef-framework-react/approval v2.12.0 made by Venus | 2026-07-17T09:23:57.723Z */
2
+ import { useMyApprovalApi as e } from "../../api/my-api.js";
3
+ import { formatTimestamp as t } from "../../components/format.js";
4
+ import { TaskStatusTag as n } from "../../components/status/index.js";
5
+ import { UserLabel as r } from "../../components/user/index.js";
6
+ import { InstanceDetailDrawer as i } from "../../components/detail/drawer.js";
7
+ import { FlowIcon as a } from "../../components/icon.js";
8
+ import { useQuery as o } from "@vef-framework-react/core";
9
+ import { useState as s } from "react";
10
+ import { Badge as c, Crud as l, Flex as u, FlexTabs as d, OperationButton as f, Page as p, Tag as m, Text as h, Title as g, globalCssVars as _ } from "@vef-framework-react/components";
11
+ import { Fragment as v, jsx as y, jsxs as b } from "@emotion/react/jsx-runtime";
12
+ import { css as x } from "@emotion/react";
13
+ //#region src/pages/task-center-page/index.tsx
14
+ var S = /*#__PURE__*/ x({
15
+ height: "100%",
16
+ display: "flex",
17
+ flexDirection: "column",
18
+ gap: _.spacingMd
19
+ }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQmdCIiwiZmlsZSI6ImluZGV4LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgQ3J1ZEJhc2ljU2NlbmVGb3JtVmFsdWVzLCBUYWJsZUNvbHVtbiB9IGZyb20gXCJAdmVmLWZyYW1ld29yay1yZWFjdC9jb21wb25lbnRzXCI7XG5pbXBvcnQgdHlwZSB7IEVtcHR5T2JqZWN0IH0gZnJvbSBcIkB2ZWYtZnJhbWV3b3JrLXJlYWN0L3NoYXJlZFwiO1xuaW1wb3J0IHR5cGUgeyBSZWFjdE5vZGUgfSBmcm9tIFwicmVhY3RcIjtcblxuaW1wb3J0IHR5cGUgeyBDb21wbGV0ZWRUYXNrLCBNeVRhc2tTZWFyY2gsIFBlbmRpbmdUYXNrIH0gZnJvbSBcIi4uLy4uL3R5cGVzXCI7XG5cbmltcG9ydCB7IGNzcyB9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W5TZXR0aW5ncz17ZmFsc2V9XG4gICAgICBkZWZhdWx0U2VhcmNoVmFsdWVzPXt7IHRlbmFudElkIH19XG4gICAgICBxdWVyeUZuPXthcGkuZmluZFBlbmRpbmdUYXNrc31cbiAgICAgIHJvd0tleT1cInRhc2tJZFwiXG4gICAgICB0YWJsZUNvbHVtbnM9e1BFTkRJTkdfQ09MVU1OU31cbiAgICAgIG9wZXJhdGlvbkNvbHVtbj17e1xuICAgICAgICB3aWR0aDogOTAsXG4gICAgICAgIHJlbmRlcihyb3cpIHtcbiAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPE9wZXJhdGlvbkJ1dHRvbiBjb2xvcj1cInByaW1hcnlcIiBvbkNsaWNrPXsoKSA9PiBzZXREZXRhaWxUYXJnZXQocm93Lmluc3RhbmNlSWQpfT5cbiAgICAgICAgICAgICAg5aSE55CGXG4gICAgICAgICAgICA8L09wZXJhdGlvbkJ1dHRvbj5cbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICB9fVxuICAgICAgb25Sb3dDbGljaz17cm93ID0+IHNldERldGFpbFRhcmdldChyb3cuaW5zdGFuY2VJZCl9XG4gICAgLz5cbiAgKTtcblxuICBjb25zdCBjb21wbGV0ZWRMaXN0ID0gKFxuICAgIDxDcnVkPENvbXBsZXRlZFRhc2ssIE15VGFza1NlYXJjaCwgVGFza1NjZW5lVmFsdWVzPlxuICAgICAga2V5PXtgY29tcGxldGVkLSR7cmVmcmVzaFRva2VufWB9XG4gICAgICBjb2x1bW5TZXR0aW5ncz17ZmFsc2V9XG4gICAgICBkZWZhdWx0U2VhcmNoVmFsdWVzPXt7IHRlbmFudElkIH19XG4gICAgICBxdWVyeUZuPXthcGkuZmluZENvbXBsZXRlZFRhc2tzfVxuICAgICAgcm93S2V5PVwidGFza0lkXCJcbiAgICAgIHRhYmxlQ29sdW1ucz17Q09NUExFVEVEX0NPTFVNTlN9XG4gICAgICBvcGVyYXRpb25Db2x1bW49e3tcbiAgICAgICAgd2lkdGg6IDkwLFxuICAgICAgICByZW5kZXIocm93KSB7XG4gICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxPcGVyYXRpb25CdXR0b24gb25DbGljaz17KCkgPT4gc2V0RGV0YWlsVGFyZ2V0KHJvdy5pbnN0YW5jZUlkKX0+XG4gICAgICAgICAgICAgIOafpeeci1xuICAgICAgICAgICAgPC9PcGVyYXRpb25CdXR0b24+XG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgfX1cbiAgICAgIG9uUm93Q2xpY2s9e3JvdyA9PiBzZXREZXRhaWxUYXJnZXQocm93Lmluc3RhbmNlSWQpfVxuICAgIC8+XG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8PlxuICAgICAgPFBhZ2UgbWFyZ2luPlxuICAgICAgICA8ZGl2IGNzcz17cm9vdENzc30+XG4gICAgICAgICAge3RpdGxlID8gPFRpdGxlIGxldmVsPXs0fT57dGl0bGV9PC9UaXRsZT4gOiBudWxsfVxuXG4gICAgICAgICAgPEZsZXhUYWJzXG4gICAgICAgICAgICBpdGVtcz17W1xuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAga2V5OiBcInBlbmRpbmdcIixcbiAgICAgICAgICAgICAgICBsYWJlbDogKFxuICAgICAgICAgICAgICAgICAgPEJhZGdlIGNvdW50PXtjb3VudHM/LnBlbmRpbmdUYXNrQ291bnQgPz8gMH0gb2Zmc2V0PXtbMTAsIDBdfSBzaXplPVwic21hbGxcIj5cbiAgICAgICAgICAgICAgICAgICAg5b6F5YqeXG4gICAgICAgICAgICAgICAgICA8L0JhZGdlPlxuICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgY2hpbGRyZW46IHBlbmRpbmdMaXN0XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBrZXk6IFwiY29tcGxldGVkXCIsXG4gICAgICAgICAgICAgICAgbGFiZWw6IFwi5bey5YqeXCIsXG4gICAgICAgICAgICAgICAgY2hpbGRyZW46IGNvbXBsZXRlZExpc3RcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgXX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvUGFnZT5cblxuICAgICAgPEluc3RhbmNlRGV0YWlsRHJhd2VyXG4gICAgICAgIGluc3RhbmNlSWQ9e2RldGFpbFRhcmdldH1cbiAgICAgICAgb25BY3Rpb25Db21wbGV0ZWQ9e2hhbmRsZUFjdGlvbkNvbXBsZXRlZH1cbiAgICAgICAgb25DbG9zZT17KCkgPT4gc2V0RGV0YWlsVGFyZ2V0KG51bGwpfVxuICAgICAgLz5cbiAgICA8Lz5cbiAgKTtcbn1cbiJdfQ== */");
20
+ function C() {
21
+ return {
22
+ title: "审批单",
23
+ dataIndex: "instanceTitle",
24
+ render: (e, t) => /* @__PURE__ */ b(u, {
25
+ align: "center",
26
+ gap: "small",
27
+ children: [/* @__PURE__ */ y(a, { name: t.flowIcon }), /* @__PURE__ */ b(u, {
28
+ vertical: !0,
29
+ gap: 2,
30
+ children: [/* @__PURE__ */ y(h, { children: e }), /* @__PURE__ */ y(h, {
31
+ copyable: !0,
32
+ style: { fontSize: 12 },
33
+ type: "secondary",
34
+ children: t.instanceNo
35
+ })]
36
+ })]
37
+ })
38
+ };
39
+ }
40
+ var w = [
41
+ C(),
42
+ {
43
+ title: "所属流程",
44
+ dataIndex: "flowName",
45
+ width: 160
46
+ },
47
+ {
48
+ title: "申请人",
49
+ dataIndex: "applicant",
50
+ width: 160,
51
+ render: (e) => /* @__PURE__ */ y(r, { user: e })
52
+ },
53
+ {
54
+ title: "当前节点",
55
+ dataIndex: "nodeName",
56
+ width: 140
57
+ },
58
+ {
59
+ title: "到达时间",
60
+ dataIndex: "createdAt",
61
+ width: 160,
62
+ render: (e) => t(e)
63
+ },
64
+ {
65
+ title: "处理期限",
66
+ dataIndex: "deadline",
67
+ width: 170,
68
+ render: (e, n) => /* @__PURE__ */ b(u, {
69
+ align: "center",
70
+ gap: "small",
71
+ children: [/* @__PURE__ */ y(h, {
72
+ type: n.isTimeout ? "danger" : void 0,
73
+ children: t(e)
74
+ }), n.isTimeout && /* @__PURE__ */ y(m, {
75
+ color: "error",
76
+ children: "超时"
77
+ })]
78
+ })
79
+ }
80
+ ], T = [
81
+ C(),
82
+ {
83
+ title: "所属流程",
84
+ dataIndex: "flowName",
85
+ width: 160
86
+ },
87
+ {
88
+ title: "申请人",
89
+ dataIndex: "applicant",
90
+ width: 160,
91
+ render: (e) => /* @__PURE__ */ y(r, { user: e })
92
+ },
93
+ {
94
+ title: "处理节点",
95
+ dataIndex: "nodeName",
96
+ width: 140
97
+ },
98
+ {
99
+ title: "处理结果",
100
+ dataIndex: "status",
101
+ width: 110,
102
+ render: (e) => /* @__PURE__ */ y(n, { status: e })
103
+ },
104
+ {
105
+ title: "处理时间",
106
+ dataIndex: "finishedAt",
107
+ width: 160,
108
+ render: (e) => t(e)
109
+ }
110
+ ];
111
+ function E({ tenantId: t, title: n }) {
112
+ let r = e(), [a, u] = s(null), { data: m, refetch: h } = o({
113
+ queryFn: r.getPendingCounts,
114
+ queryKey: [r.getPendingCounts.key, { tenantId: t }]
115
+ }), [_, x] = s(0);
116
+ function C() {
117
+ x((e) => e + 1), h();
118
+ }
119
+ let E = /* @__PURE__ */ y(l, {
120
+ columnSettings: !1,
121
+ defaultSearchValues: { tenantId: t },
122
+ queryFn: r.findPendingTasks,
123
+ rowKey: "taskId",
124
+ tableColumns: w,
125
+ operationColumn: {
126
+ width: 90,
127
+ render(e) {
128
+ return /* @__PURE__ */ y(f, {
129
+ color: "primary",
130
+ onClick: () => u(e.instanceId),
131
+ children: "处理"
132
+ });
133
+ }
134
+ },
135
+ onRowClick: (e) => u(e.instanceId)
136
+ }, `pending-${_}`), D = /* @__PURE__ */ y(l, {
137
+ columnSettings: !1,
138
+ defaultSearchValues: { tenantId: t },
139
+ queryFn: r.findCompletedTasks,
140
+ rowKey: "taskId",
141
+ tableColumns: T,
142
+ operationColumn: {
143
+ width: 90,
144
+ render(e) {
145
+ return /* @__PURE__ */ y(f, {
146
+ onClick: () => u(e.instanceId),
147
+ children: "查看"
148
+ });
149
+ }
150
+ },
151
+ onRowClick: (e) => u(e.instanceId)
152
+ }, `completed-${_}`);
153
+ return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(p, {
154
+ margin: !0,
155
+ children: /* @__PURE__ */ b("div", {
156
+ css: S,
157
+ children: [n ? /* @__PURE__ */ y(g, {
158
+ level: 4,
159
+ children: n
160
+ }) : null, /* @__PURE__ */ y(d, { items: [{
161
+ key: "pending",
162
+ label: /* @__PURE__ */ y(c, {
163
+ count: m?.pendingTaskCount ?? 0,
164
+ offset: [10, 0],
165
+ size: "small",
166
+ children: "待办"
167
+ }),
168
+ children: E
169
+ }, {
170
+ key: "completed",
171
+ label: "已办",
172
+ children: D
173
+ }] })]
174
+ })
175
+ }), /* @__PURE__ */ y(i, {
176
+ instanceId: a,
177
+ onActionCompleted: C,
178
+ onClose: () => u(null)
179
+ })] });
180
+ }
181
+ //#endregion
182
+ export { E as ApprovalTaskCenterPage };
@@ -0,0 +1,48 @@
1
+ /*! @vef-framework-react/approval v2.12.0 made by Venus | 2026-07-17T09:23:57.723Z */
2
+ //#region src/permissions.ts
3
+ var e = {
4
+ category: {
5
+ query: "approval.category.query",
6
+ create: "approval.category.create",
7
+ update: "approval.category.update",
8
+ delete: "approval.category.delete"
9
+ },
10
+ flow: {
11
+ query: "approval.flow.query",
12
+ create: "approval.flow.create",
13
+ update: "approval.flow.update",
14
+ deploy: "approval.flow.deploy",
15
+ publish: "approval.flow.publish"
16
+ },
17
+ instance: {
18
+ query: "approval.instance.query",
19
+ detail: "approval.instance.detail",
20
+ start: "approval.instance.start",
21
+ withdraw: "approval.instance.withdraw",
22
+ resubmit: "approval.instance.resubmit",
23
+ cc: "approval.instance.cc",
24
+ terminate: "approval.instance.terminate"
25
+ },
26
+ task: {
27
+ query: "approval.task.query",
28
+ process: "approval.task.process",
29
+ addAssignee: "approval.task.add_assignee",
30
+ removeAssignee: "approval.task.remove_assignee",
31
+ urge: "approval.task.urge",
32
+ reassign: "approval.task.reassign"
33
+ },
34
+ actionLog: { query: "approval.action_log.query" },
35
+ metrics: { query: "approval.metrics.query" },
36
+ binding: {
37
+ query: "approval.binding.query",
38
+ retry: "approval.binding.retry"
39
+ },
40
+ delegation: {
41
+ query: "approval.delegation.query",
42
+ create: "approval.delegation.create",
43
+ update: "approval.delegation.update",
44
+ delete: "approval.delegation.delete"
45
+ }
46
+ };
47
+ //#endregion
48
+ export { e as APPROVAL_PERMISSIONS };
@@ -0,0 +1,34 @@
1
+ /*! @vef-framework-react/approval v2.12.0 made by Venus | 2026-07-17T09:23:57.723Z */
2
+ import { createContext as e, use as t, useMemo as n, useState as r } from "react";
3
+ import { createApprovalRegistries as i } from "@vef-framework-react/approval-form-bridge";
4
+ import { jsx as a } from "@emotion/react/jsx-runtime";
5
+ //#region src/plugins/index.tsx
6
+ var o = e(null);
7
+ o.displayName = "ApprovalPluginsContext";
8
+ function s({ plugins: e, children: t }) {
9
+ let [s] = r(i);
10
+ return /* @__PURE__ */ a(o, {
11
+ value: n(() => ({
12
+ ...e,
13
+ registries: e?.registries ?? s
14
+ }), [e, s]),
15
+ children: t
16
+ });
17
+ }
18
+ var c = {};
19
+ function l() {
20
+ let e = t(o), [a] = r(i);
21
+ return n(() => e ?? {
22
+ ...c,
23
+ registries: a
24
+ }, [e, a]);
25
+ }
26
+ function u(e, t) {
27
+ return {
28
+ pickers: e.pickers,
29
+ globalSubjects: e.globalSubjects,
30
+ formFields: t
31
+ };
32
+ }
33
+ //#endregion
34
+ export { s as ApprovalProvider, u as toEditorPlugins, l as useApprovalPlugins };
@@ -0,0 +1,12 @@
1
+ /*! @vef-framework-react/approval v2.12.0 made by Venus | 2026-07-17T09:23:57.723Z */
2
+ //#region src/types/enums.ts
3
+ var e = [
4
+ "approved",
5
+ "rejected",
6
+ "terminated"
7
+ ];
8
+ function t(t) {
9
+ return e.includes(t);
10
+ }
11
+ //#endregion
12
+ export { e as FINAL_INSTANCE_STATUSES, t as isFinalInstanceStatus };
@@ -0,0 +1,3 @@
1
+ /*! @vef-framework-react/approval v2.12.0 made by Venus | 2026-07-17T09:23:57.723Z */
2
+ import { FINAL_INSTANCE_STATUSES as e, isFinalInstanceStatus as t } from "./enums.js";
3
+ export { e as FINAL_INSTANCE_STATUSES, t as isFinalInstanceStatus };
@@ -0,0 +1,30 @@
1
+ import { PaginatedQueryParams } from '@vef-framework-react/components';
2
+ import { MutationFunction, PaginationResult, QueryFunction } from '@vef-framework-react/core';
3
+ import { AdminActionLog, AdminBusinessProjection, AdminBusinessProjectionSearch, AdminInstance, AdminInstanceDetail, AdminInstanceSearch, AdminTask, AdminTaskSearch, ApprovalMetrics, ReassignTaskParams, RetryBusinessProjectionParams, TerminateInstanceParams } from '../types';
4
+ /**
5
+ * The supervision API of the approval engine: cross-user instance/task
6
+ * queries, the audit trail, engine metrics, business-projection convergence,
7
+ * and the admin write actions.
8
+ */
9
+ export interface AdminApprovalApi {
10
+ findInstances: QueryFunction<PaginationResult<AdminInstance>, PaginatedQueryParams<AdminInstanceSearch>>;
11
+ findTasks: QueryFunction<PaginationResult<AdminTask>, PaginatedQueryParams<AdminTaskSearch>>;
12
+ getInstanceDetail: QueryFunction<AdminInstanceDetail, {
13
+ instanceId: string;
14
+ }>;
15
+ findActionLogs: QueryFunction<PaginationResult<AdminActionLog>, PaginatedQueryParams<{
16
+ instanceId: string;
17
+ tenantId?: string;
18
+ }>>;
19
+ getMetrics: QueryFunction<ApprovalMetrics, {
20
+ tenantId?: string;
21
+ }>;
22
+ findBusinessProjections: QueryFunction<PaginationResult<AdminBusinessProjection>, PaginatedQueryParams<AdminBusinessProjectionSearch>>;
23
+ terminateInstance: MutationFunction<unknown, TerminateInstanceParams>;
24
+ reassignTask: MutationFunction<unknown, ReassignTaskParams>;
25
+ retryBusinessProjection: MutationFunction<unknown, RetryBusinessProjectionParams>;
26
+ }
27
+ /**
28
+ * Supervision API for approval administrators.
29
+ */
30
+ export declare function useAdminApprovalApi(): AdminApprovalApi;
@@ -0,0 +1,17 @@
1
+ import { QueryParams } from '@vef-framework-react/components';
2
+ import { ApiResult, MutationFunction, QueryFunction } from '@vef-framework-react/core';
3
+ import { CategoryParams, CategorySearch, FlowCategory } from '../types';
4
+ /**
5
+ * The query and mutation functions for the flow-category tree, shaped to plug
6
+ * straight into a non-paginated `CrudPage`.
7
+ */
8
+ export interface CategoryApi {
9
+ findTree: QueryFunction<FlowCategory[], QueryParams<CategorySearch>>;
10
+ create: MutationFunction<ApiResult<unknown>, CategoryParams>;
11
+ update: MutationFunction<ApiResult<unknown>, CategoryParams>;
12
+ remove: MutationFunction<ApiResult<unknown>, FlowCategory>;
13
+ }
14
+ /**
15
+ * CRUD API for the flow-category tree.
16
+ */
17
+ export declare function useCategoryApi(): CategoryApi;
@@ -0,0 +1,18 @@
1
+ import { PaginatedQueryParams } from '@vef-framework-react/components';
2
+ import { ApiResult, MutationFunction, PaginationResult, QueryFunction } from '@vef-framework-react/core';
3
+ import { Delegation, DelegationParams, DelegationSearch } from '../types';
4
+ /**
5
+ * The CRUD API of approval delegations, shaped to plug straight into
6
+ * `CrudPage`. The list is served by the framework's standard `find_page`,
7
+ * which reads pagination from the request meta.
8
+ */
9
+ export interface DelegationApi {
10
+ findPage: QueryFunction<PaginationResult<Delegation>, PaginatedQueryParams<DelegationSearch>>;
11
+ create: MutationFunction<ApiResult<unknown>, DelegationParams>;
12
+ update: MutationFunction<ApiResult<unknown>, DelegationParams>;
13
+ remove: MutationFunction<ApiResult<unknown>, Delegation>;
14
+ }
15
+ /**
16
+ * CRUD API for approval delegations.
17
+ */
18
+ export declare function useDelegationApi(): DelegationApi;
@@ -0,0 +1,34 @@
1
+ import { PaginatedQueryParams } from '@vef-framework-react/components';
2
+ import { MutationFunction, PaginationResult, QueryFunction } from '@vef-framework-react/core';
3
+ import { CreateFlowParams, DeployFlowParams, Flow, FlowGraphBundle, FlowInitiator, FlowSearch, FlowVersion, FlowVersionSummary, PublishVersionParams, ToggleFlowActiveParams, UpdateFlowParams } from '../types';
4
+ /**
5
+ * The management API of flow definitions: the paginated list plus the
6
+ * definition lifecycle (create → deploy → publish) and its auxiliary queries.
7
+ * Mutations return the created/updated records so callers can chain the
8
+ * lifecycle (e.g. create → deploy with the returned flow id).
9
+ */
10
+ export interface FlowApi {
11
+ findFlows: QueryFunction<PaginationResult<Flow>, PaginatedQueryParams<FlowSearch>>;
12
+ create: MutationFunction<Flow, CreateFlowParams>;
13
+ update: MutationFunction<Flow, UpdateFlowParams>;
14
+ deploy: MutationFunction<FlowVersion, DeployFlowParams>;
15
+ publishVersion: MutationFunction<unknown, PublishVersionParams>;
16
+ toggleActive: MutationFunction<unknown, ToggleFlowActiveParams>;
17
+ getGraph: QueryFunction<FlowGraphBundle, {
18
+ flowId: string;
19
+ tenantId?: string;
20
+ versionId?: string;
21
+ }>;
22
+ findVersions: QueryFunction<FlowVersionSummary[], {
23
+ flowId: string;
24
+ tenantId?: string;
25
+ }>;
26
+ findInitiators: QueryFunction<FlowInitiator[], {
27
+ flowId: string;
28
+ tenantId?: string;
29
+ }>;
30
+ }
31
+ /**
32
+ * Management API for flow definitions.
33
+ */
34
+ export declare function useFlowApi(): FlowApi;
@@ -0,0 +1,7 @@
1
+ export { useAdminApprovalApi, type AdminApprovalApi } from './admin-api';
2
+ export { useCategoryApi, type CategoryApi } from './category-api';
3
+ export { useDelegationApi, type DelegationApi } from './delegation-api';
4
+ export { useFlowApi, type FlowApi } from './flow-api';
5
+ export { useInstanceApi, type InstanceApi } from './instance-api';
6
+ export { useMyApprovalApi, type MyApprovalApi } from './my-api';
7
+ export { API_PATH, toPagedParams } from './query';
@@ -0,0 +1,22 @@
1
+ import { MutationFunction } from '@vef-framework-react/core';
2
+ import { AddAssigneeParams, AddCCParams, MarkCCReadParams, ProcessTaskParams, RemoveAssigneeParams, ResubmitInstanceParams, StartInstanceParams, UrgeTaskParams, WithdrawInstanceParams } from '../types';
3
+ /**
4
+ * The runtime actions of the approval engine: submission, the per-task
5
+ * decision, and the participant side actions. Each is a mutation triggered
6
+ * imperatively from the detail views.
7
+ */
8
+ export interface InstanceApi {
9
+ start: MutationFunction<unknown, StartInstanceParams>;
10
+ processTask: MutationFunction<unknown, ProcessTaskParams>;
11
+ withdraw: MutationFunction<unknown, WithdrawInstanceParams>;
12
+ resubmit: MutationFunction<unknown, ResubmitInstanceParams>;
13
+ addCC: MutationFunction<unknown, AddCCParams>;
14
+ markCCRead: MutationFunction<unknown, MarkCCReadParams>;
15
+ addAssignee: MutationFunction<unknown, AddAssigneeParams>;
16
+ removeAssignee: MutationFunction<unknown, RemoveAssigneeParams>;
17
+ urgeTask: MutationFunction<unknown, UrgeTaskParams>;
18
+ }
19
+ /**
20
+ * Runtime action API for approval instances and tasks.
21
+ */
22
+ export declare function useInstanceApi(): InstanceApi;
@@ -0,0 +1,29 @@
1
+ import { PaginatedQueryParams } from '@vef-framework-react/components';
2
+ import { PaginationResult, QueryFunction } from '@vef-framework-react/core';
3
+ import { AvailableFlow, AvailableFlowSearch, CompletedTask, InitiatedInstance, InitiatedInstanceSearch, MyCCRecord, MyCCRecordSearch, MyInstanceDetail, MyTaskSearch, PendingCounts, PendingTask, StartForm } from '../types';
4
+ /**
5
+ * The self-service queries of the current user: what I can initiate, what I
6
+ * submitted, what awaits me, and the per-instance detail. All operations are
7
+ * user-scoped server-side and carry no permission codes.
8
+ */
9
+ export interface MyApprovalApi {
10
+ findAvailableFlows: QueryFunction<PaginationResult<AvailableFlow>, PaginatedQueryParams<AvailableFlowSearch>>;
11
+ getStartForm: QueryFunction<StartForm, {
12
+ tenantId: string;
13
+ flowCode: string;
14
+ }>;
15
+ findInitiated: QueryFunction<PaginationResult<InitiatedInstance>, PaginatedQueryParams<InitiatedInstanceSearch>>;
16
+ findPendingTasks: QueryFunction<PaginationResult<PendingTask>, PaginatedQueryParams<MyTaskSearch>>;
17
+ findCompletedTasks: QueryFunction<PaginationResult<CompletedTask>, PaginatedQueryParams<MyTaskSearch>>;
18
+ findCCRecords: QueryFunction<PaginationResult<MyCCRecord>, PaginatedQueryParams<MyCCRecordSearch>>;
19
+ getPendingCounts: QueryFunction<PendingCounts, {
20
+ tenantId?: string;
21
+ }>;
22
+ getInstanceDetail: QueryFunction<MyInstanceDetail, {
23
+ instanceId: string;
24
+ }>;
25
+ }
26
+ /**
27
+ * Self-service API for the current user's approval work.
28
+ */
29
+ export declare function useMyApprovalApi(): MyApprovalApi;
@@ -0,0 +1,15 @@
1
+ import { PaginatedQueryParams, SYMBOL_PAGINATION } from '@vef-framework-react/components';
2
+ import { AnyObject } from '@vef-framework-react/shared';
3
+ /**
4
+ * The framework RPC endpoint every approval call posts to.
5
+ */
6
+ export declare const API_PATH = "/api";
7
+ /**
8
+ * Fold ProTable's symbol-keyed pagination into the flat `page` / `pageSize`
9
+ * request shape the approval RPC queries expect. The sort symbol is left on
10
+ * the spread copy; JSON serialization drops it, so it never reaches the wire.
11
+ */
12
+ export declare function toPagedParams<TSearch extends AnyObject>(queryParams: PaginatedQueryParams<TSearch>): Omit<PaginatedQueryParams<TSearch>, typeof SYMBOL_PAGINATION> & {
13
+ page?: number;
14
+ pageSize?: number;
15
+ };
@@ -0,0 +1,82 @@
1
+ import { AddAssigneeType, RemovableAssignee, RollbackTarget } from '../../types';
2
+ interface ActionModalProps {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ }
6
+ export interface TransferModalProps extends ActionModalProps {
7
+ onConfirm: (transferToId: string, opinion: string) => Promise<void>;
8
+ }
9
+ /**
10
+ * Transfer the pending task to another user.
11
+ */
12
+ export declare function TransferModal({ open, onClose, onConfirm }: TransferModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
13
+ export interface RollbackModalProps extends ActionModalProps {
14
+ targets: RollbackTarget[];
15
+ onConfirm: (targetNodeId: string, opinion: string) => Promise<void>;
16
+ }
17
+ /**
18
+ * Send the instance back to a previously traversed node. Targets are resolved
19
+ * server-side — exactly the set the engine will accept.
20
+ */
21
+ export declare function RollbackModal({ open, onClose, targets, onConfirm }: RollbackModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
22
+ export interface AddAssigneeModalProps extends ActionModalProps {
23
+ /**
24
+ * The positions the node allows, from the server-resolved viewer task.
25
+ */
26
+ allowedTypes: AddAssigneeType[];
27
+ onConfirm: (userIds: string[], addType: AddAssigneeType) => Promise<void>;
28
+ }
29
+ /**
30
+ * Dynamically add assignees around the pending task.
31
+ */
32
+ export declare function AddAssigneeModal({ open, onClose, allowedTypes, onConfirm }: AddAssigneeModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
33
+ export interface RemoveAssigneeModalProps extends ActionModalProps {
34
+ /**
35
+ * The removable peers, resolved server-side — exactly the set the
36
+ * remove-assignee command authorizes.
37
+ */
38
+ targets: RemovableAssignee[];
39
+ onConfirm: (taskId: string) => Promise<void>;
40
+ }
41
+ /**
42
+ * Remove a peer assignee from the current node by canceling their task.
43
+ */
44
+ export declare function RemoveAssigneeModal({ open, onClose, targets, onConfirm }: RemoveAssigneeModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
45
+ export interface CCModalProps extends ActionModalProps {
46
+ onConfirm: (ccUserIds: string[]) => Promise<void>;
47
+ }
48
+ /**
49
+ * Manually carbon-copy the instance to more recipients.
50
+ */
51
+ export declare function CCModal({ open, onClose, onConfirm }: CCModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
52
+ /**
53
+ * One pending task that can be urged.
54
+ */
55
+ export interface UrgeTarget {
56
+ taskId: string;
57
+ assigneeName: string;
58
+ nodeName: string;
59
+ }
60
+ export interface UrgeModalProps extends ActionModalProps {
61
+ targets: UrgeTarget[];
62
+ onConfirm: (taskId: string, message: string) => Promise<void>;
63
+ }
64
+ /**
65
+ * Send an urge notification to a pending assignee.
66
+ */
67
+ export declare function UrgeModal({ open, onClose, targets, onConfirm }: UrgeModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
68
+ export interface ReasonModalProps extends ActionModalProps {
69
+ title: string;
70
+ okText: string;
71
+ /**
72
+ * Renders the ok button in danger style (terminate).
73
+ */
74
+ danger?: boolean;
75
+ placeholder?: string;
76
+ onConfirm: (reason: string) => Promise<void>;
77
+ }
78
+ /**
79
+ * A single reason input, shared by withdraw / terminate style actions.
80
+ */
81
+ export declare function ReasonModal({ open, onClose, title, okText, danger, placeholder, onConfirm }: ReasonModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
82
+ export {};
@@ -0,0 +1,11 @@
1
+ export interface AdminInstanceDetailPanelProps {
2
+ instanceId: string;
3
+ }
4
+ /**
5
+ * The supervision detail of an instance: the same header / form / timeline /
6
+ * graph projections as the self-service view — but fully read-only, with no
7
+ * field-permission clamp (admins see every field) — plus the paginated raw
8
+ * audit trail. Admin write actions (terminate, reassign) live on the admin
9
+ * page rows, not in this panel.
10
+ */
11
+ export declare function AdminInstanceDetailPanel({ instanceId }: AdminInstanceDetailPanelProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ export interface InstanceDetailDrawerProps {
2
+ /**
3
+ * The instance to show; `null` keeps the drawer closed.
4
+ */
5
+ instanceId: string | null;
6
+ onClose: () => void;
7
+ /**
8
+ * Fired after any successful action inside the detail, so the surrounding
9
+ * list can refetch.
10
+ */
11
+ onActionCompleted?: () => void;
12
+ }
13
+ /**
14
+ * The self-service instance detail in a wide drawer — the standard container
15
+ * every runtime list page opens on row click.
16
+ */
17
+ export declare function InstanceDetailDrawer({ instanceId, onClose, onActionCompleted }: InstanceDetailDrawerProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { MyInstanceDetail, UserInfo } from '../../types';
2
+ export type { UrgeTarget } from './action-modals';
3
+ /**
4
+ * The shared instance header: title + status, then the identity fields as
5
+ * one descriptions block. `labels` renders the flow's host-owned selection
6
+ * metadata — pass it on operator-facing views (the admin detail) and omit it
7
+ * on applicant-facing ones, where the tags would read as noise.
8
+ */
9
+ export declare function InstanceHeader({ title, status, instanceNo, flowName, applicant, createdAt, finishedAt, currentNodeName, businessRef, labels }: {
10
+ title: string;
11
+ status: MyInstanceDetail["instance"]["status"];
12
+ instanceNo: string;
13
+ flowName: string;
14
+ applicant: UserInfo;
15
+ createdAt: string;
16
+ finishedAt?: string;
17
+ currentNodeName?: string;
18
+ businessRef?: string;
19
+ labels?: Record<string, string>;
20
+ }): import("@emotion/react/jsx-runtime").JSX.Element;
21
+ export interface InstanceDetailPanelProps {
22
+ instanceId: string;
23
+ /**
24
+ * Fired after any successful action so the surrounding list can refetch;
25
+ * the panel refetches its own detail automatically.
26
+ */
27
+ onActionCompleted?: () => void;
28
+ }
29
+ /**
30
+ * The self-service instance detail: header, the version-pinned form clamped
31
+ * by the viewer's field permissions, the transit timeline, and the progress
32
+ * flow graph — with the action bar derived entirely from the server-resolved
33
+ * `availableActions` / `myTask` context, so the offered set can never drift
34
+ * from what the engine accepts.
35
+ */
36
+ export declare function InstanceDetailPanel({ instanceId, onActionCompleted }: InstanceDetailPanelProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { InstanceFlowGraph } from '../../types';
2
+ export interface InstanceFlowGraphViewerProps {
3
+ flowGraph: InstanceFlowGraph;
4
+ /**
5
+ * Container height. The viewer always fills its width.
6
+ *
7
+ * @default 420
8
+ */
9
+ height?: number | string;
10
+ }
11
+ /**
12
+ * The read-only, progress-annotated map of an instance's flow: node positions
13
+ * come from the designer verbatim, progress colors the borders (blue = in
14
+ * motion, green = passed, red = rejected, orange = returned; unreached nodes
15
+ * fade back). Pan and zoom only — nothing is editable.
16
+ */
17
+ export declare function InstanceFlowGraphViewer({ flowGraph, height }: InstanceFlowGraphViewerProps): import("@emotion/react/jsx-runtime").JSX.Element;