@vef-framework-react/approval 2.30.0 → 2.31.1

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 (186) hide show
  1. package/dist/cjs/api/admin-api.cjs +1 -1
  2. package/dist/cjs/api/flow-api.cjs +1 -1
  3. package/dist/cjs/api/instance-api.cjs +1 -1
  4. package/dist/cjs/api/my-api.cjs +1 -1
  5. package/dist/cjs/components/action-dialog/index.cjs +1 -1
  6. package/dist/cjs/components/action-dialog/user-selection.cjs +1 -0
  7. package/dist/cjs/components/annotations/composers.cjs +1 -0
  8. package/dist/cjs/components/annotations/field-anchor.cjs +1 -0
  9. package/dist/cjs/components/annotations/index.cjs +1 -0
  10. package/dist/cjs/components/annotations/use-annotations.cjs +1 -0
  11. package/dist/cjs/components/business-form.cjs +1 -0
  12. package/dist/cjs/components/capped-modal.cjs +1 -0
  13. package/dist/cjs/components/detail/action-modals.cjs +1 -1
  14. package/dist/cjs/components/detail/admin.cjs +1 -1
  15. package/dist/cjs/components/detail/index.cjs +1 -1
  16. package/dist/cjs/components/flow-graph/node.cjs +1 -1
  17. package/dist/cjs/components/flow-graph/people-overlay.cjs +1 -1
  18. package/dist/cjs/components/form-panel/index.cjs +1 -1
  19. package/dist/cjs/components/format.cjs +1 -1
  20. package/dist/cjs/components/index.cjs +1 -1
  21. package/dist/cjs/components/instance-list-title.cjs +1 -0
  22. package/dist/cjs/components/principal/index.cjs +1 -1
  23. package/dist/cjs/components/status/colors.cjs +1 -1
  24. package/dist/cjs/components/status/index.cjs +1 -1
  25. package/dist/cjs/components/status/labels.cjs +1 -1
  26. package/dist/cjs/components/timeline/index.cjs +1 -1
  27. package/dist/cjs/components/user/index.cjs +1 -1
  28. package/dist/cjs/components/void/direct-dialog.cjs +1 -0
  29. package/dist/cjs/components/void/form.cjs +1 -0
  30. package/dist/cjs/components/void/request-renderer.cjs +1 -0
  31. package/dist/cjs/components/void/summary.cjs +1 -0
  32. package/dist/cjs/components/void/use-refresh.cjs +1 -0
  33. package/dist/cjs/index.cjs +1 -1
  34. package/dist/cjs/pages/admin-page/apply-handovers.cjs +1 -0
  35. package/dist/cjs/pages/admin-page/index.cjs +1 -1
  36. package/dist/cjs/pages/admin-page/instances.cjs +1 -1
  37. package/dist/cjs/pages/admin-page/metrics.cjs +1 -1
  38. package/dist/cjs/pages/admin-page/tasks.cjs +1 -1
  39. package/dist/cjs/pages/category-page/index.cjs +1 -1
  40. package/dist/cjs/pages/delegation-page/index.cjs +1 -1
  41. package/dist/cjs/pages/flow-page/columns.cjs +1 -1
  42. package/dist/cjs/pages/flow-page/designer/basic-step.cjs +1 -1
  43. package/dist/cjs/pages/flow-page/designer/field-catalog.cjs +1 -0
  44. package/dist/cjs/pages/flow-page/designer/form-step.cjs +1 -1
  45. package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
  46. package/dist/cjs/pages/flow-page/designer/review-step.cjs +1 -1
  47. package/dist/cjs/pages/flow-page/designer/types.cjs +1 -1
  48. package/dist/cjs/pages/flow-page/designer/void-policy.cjs +1 -0
  49. package/dist/cjs/pages/flow-page/index.cjs +1 -1
  50. package/dist/cjs/pages/index.cjs +1 -1
  51. package/dist/cjs/pages/initiate-page/index.cjs +1 -1
  52. package/dist/cjs/pages/initiate-page/start-drawer.cjs +1 -1
  53. package/dist/cjs/pages/my-instances-page/index.cjs +1 -1
  54. package/dist/cjs/pages/task-center-page/index.cjs +1 -1
  55. package/dist/cjs/permissions.cjs +1 -1
  56. package/dist/cjs/plugins/index.cjs +1 -1
  57. package/dist/cjs/types/annotation.cjs +1 -0
  58. package/dist/cjs/types/detail.cjs +1 -0
  59. package/dist/cjs/types/enums.cjs +1 -1
  60. package/dist/cjs/types/index.cjs +1 -1
  61. package/dist/cjs/types/void.cjs +1 -0
  62. package/dist/es/api/admin-api.js +5 -2
  63. package/dist/es/api/category-api.js +1 -1
  64. package/dist/es/api/delegation-api.js +1 -1
  65. package/dist/es/api/flow-api.js +19 -15
  66. package/dist/es/api/index.js +1 -1
  67. package/dist/es/api/instance-api.js +3 -1
  68. package/dist/es/api/my-api.js +2 -1
  69. package/dist/es/api/query.js +1 -1
  70. package/dist/es/components/action-dialog/index.js +64 -41
  71. package/dist/es/components/action-dialog/user-selection.js +48 -0
  72. package/dist/es/components/annotations/composers.js +231 -0
  73. package/dist/es/components/annotations/field-anchor.js +18 -0
  74. package/dist/es/components/annotations/index.js +271 -0
  75. package/dist/es/components/annotations/use-annotations.js +77 -0
  76. package/dist/es/components/business-form.js +36 -0
  77. package/dist/es/components/capped-modal.js +27 -0
  78. package/dist/es/components/detail/action-modals.js +120 -132
  79. package/dist/es/components/detail/admin.js +109 -74
  80. package/dist/es/components/detail/drawer.js +1 -1
  81. package/dist/es/components/detail/index.js +298 -233
  82. package/dist/es/components/flow-graph/index.js +1 -1
  83. package/dist/es/components/flow-graph/node.js +26 -26
  84. package/dist/es/components/flow-graph/people-overlay.js +104 -100
  85. package/dist/es/components/flow-graph/people.js +1 -1
  86. package/dist/es/components/form-panel/index.js +10 -9
  87. package/dist/es/components/format.js +7 -4
  88. package/dist/es/components/icon.js +1 -1
  89. package/dist/es/components/index.js +11 -8
  90. package/dist/es/components/instance-list-title.js +31 -0
  91. package/dist/es/components/principal/index.js +4 -2
  92. package/dist/es/components/status/colors.js +3 -2
  93. package/dist/es/components/status/index.js +14 -14
  94. package/dist/es/components/status/labels.js +7 -3
  95. package/dist/es/components/timeline/index.js +79 -69
  96. package/dist/es/components/user/index.js +32 -25
  97. package/dist/es/components/void/direct-dialog.js +62 -0
  98. package/dist/es/components/void/form.js +100 -0
  99. package/dist/es/components/void/request-renderer.js +91 -0
  100. package/dist/es/components/void/summary.js +142 -0
  101. package/dist/es/components/void/use-refresh.js +22 -0
  102. package/dist/es/index.js +33 -27
  103. package/dist/es/pages/admin-page/apply-handovers.js +185 -0
  104. package/dist/es/pages/admin-page/index.js +50 -43
  105. package/dist/es/pages/admin-page/instances.js +50 -52
  106. package/dist/es/pages/admin-page/metrics.js +34 -33
  107. package/dist/es/pages/admin-page/projections.js +1 -1
  108. package/dist/es/pages/admin-page/tasks.js +59 -57
  109. package/dist/es/pages/category-page/columns.js +1 -1
  110. package/dist/es/pages/category-page/form.js +1 -1
  111. package/dist/es/pages/category-page/index.js +21 -21
  112. package/dist/es/pages/delegation-page/columns.js +1 -1
  113. package/dist/es/pages/delegation-page/form.js +1 -1
  114. package/dist/es/pages/delegation-page/index.js +19 -19
  115. package/dist/es/pages/flow-page/columns.js +6 -6
  116. package/dist/es/pages/flow-page/designer/basic-step.js +202 -146
  117. package/dist/es/pages/flow-page/designer/field-catalog.js +47 -0
  118. package/dist/es/pages/flow-page/designer/flow-step.js +1 -1
  119. package/dist/es/pages/flow-page/designer/form-step.js +14 -14
  120. package/dist/es/pages/flow-page/designer/index.js +248 -202
  121. package/dist/es/pages/flow-page/designer/review-step.js +38 -60
  122. package/dist/es/pages/flow-page/designer/types.js +13 -5
  123. package/dist/es/pages/flow-page/designer/void-policy.js +135 -0
  124. package/dist/es/pages/flow-page/index.js +18 -18
  125. package/dist/es/pages/flow-page/search.js +1 -1
  126. package/dist/es/pages/flow-page/versions.js +1 -1
  127. package/dist/es/pages/index.js +9 -9
  128. package/dist/es/pages/initiate-page/index.js +133 -86
  129. package/dist/es/pages/initiate-page/start-drawer.js +153 -64
  130. package/dist/es/pages/my-instances-page/index.js +57 -77
  131. package/dist/es/pages/task-center-page/index.js +73 -68
  132. package/dist/es/pages/task-center-page/search.js +1 -1
  133. package/dist/es/permissions.js +6 -3
  134. package/dist/es/plugins/form-context.js +1 -1
  135. package/dist/es/plugins/index.js +32 -21
  136. package/dist/es/types/annotation.js +18 -0
  137. package/dist/es/types/detail.js +7 -0
  138. package/dist/es/types/enums.js +3 -2
  139. package/dist/es/types/index.js +6 -3
  140. package/dist/es/types/void.js +5 -0
  141. package/dist/types/api/admin-api.d.ts +4 -1
  142. package/dist/types/api/flow-api.d.ts +4 -2
  143. package/dist/types/api/instance-api.d.ts +5 -1
  144. package/dist/types/api/my-api.d.ts +2 -1
  145. package/dist/types/components/action-dialog/index.d.ts +8 -2
  146. package/dist/types/components/action-dialog/user-selection.d.ts +18 -0
  147. package/dist/types/components/annotations/composers.d.ts +14 -0
  148. package/dist/types/components/annotations/field-anchor.d.ts +3 -0
  149. package/dist/types/components/annotations/index.d.ts +22 -0
  150. package/dist/types/components/annotations/use-annotations.d.ts +24 -0
  151. package/dist/types/components/business-form.d.ts +14 -0
  152. package/dist/types/components/capped-modal.d.ts +2 -0
  153. package/dist/types/components/detail/admin.d.ts +2 -1
  154. package/dist/types/components/form-panel/index.d.ts +3 -2
  155. package/dist/types/components/format.d.ts +1 -0
  156. package/dist/types/components/index.d.ts +1 -0
  157. package/dist/types/components/instance-list-title.d.ts +5 -0
  158. package/dist/types/components/timeline/index.d.ts +3 -1
  159. package/dist/types/components/user/index.d.ts +4 -0
  160. package/dist/types/components/void/direct-dialog.d.ts +8 -0
  161. package/dist/types/components/void/form.d.ts +27 -0
  162. package/dist/types/components/void/request-renderer.d.ts +3 -0
  163. package/dist/types/components/void/summary.d.ts +16 -0
  164. package/dist/types/components/void/use-refresh.d.ts +4 -0
  165. package/dist/types/index.d.ts +2 -2
  166. package/dist/types/pages/admin-page/apply-handovers.d.ts +3 -0
  167. package/dist/types/pages/admin-page/index.d.ts +2 -0
  168. package/dist/types/pages/admin-page/instances.d.ts +2 -1
  169. package/dist/types/pages/flow-page/designer/basic-step.d.ts +7 -2
  170. package/dist/types/pages/flow-page/designer/field-catalog.d.ts +5 -0
  171. package/dist/types/pages/flow-page/designer/review-step.d.ts +2 -1
  172. package/dist/types/pages/flow-page/designer/types.d.ts +13 -2
  173. package/dist/types/pages/flow-page/designer/void-policy.d.ts +14 -0
  174. package/dist/types/pages/initiate-page/start-drawer.d.ts +7 -1
  175. package/dist/types/permissions.d.ts +8 -0
  176. package/dist/types/plugins/index.d.ts +28 -3
  177. package/dist/types/types/admin.d.ts +27 -0
  178. package/dist/types/types/annotation.d.ts +60 -0
  179. package/dist/types/types/detail.d.ts +8 -1
  180. package/dist/types/types/enums.d.ts +5 -10
  181. package/dist/types/types/flow.d.ts +25 -5
  182. package/dist/types/types/index.d.ts +3 -1
  183. package/dist/types/types/instance.d.ts +1 -2
  184. package/dist/types/types/my.d.ts +16 -0
  185. package/dist/types/types/void.d.ts +58 -0
  186. package/package.json +13 -7
@@ -1,10 +1,13 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
2
  import e from "dayjs";
3
3
  //#region src/components/format.ts
4
- function t(t) {
4
+ function t(e, t) {
5
+ return e?.trim() || t || "";
6
+ }
7
+ function n(t) {
5
8
  return t ? e(t).format("YYYY-MM-DD HH:mm") : "-";
6
9
  }
7
- function n(e) {
10
+ function r(e) {
8
11
  if (e < 0) return "-";
9
12
  if (e < 60) return "<1分钟";
10
13
  let t = Math.floor(e / 86400), n = Math.floor(e % 86400 / 3600);
@@ -13,4 +16,4 @@ function n(e) {
13
16
  return n > 0 ? r > 0 ? `${n}小时${r}分钟` : `${n}小时` : `${r}分钟`;
14
17
  }
15
18
  //#endregion
16
- export { n as formatDurationSeconds, t as formatTimestamp };
19
+ export { t as displayInstanceTitle, r as formatDurationSeconds, n as formatTimestamp };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
2
  import { DynamicIcon as e } from "@vef-framework-react/components";
3
3
  import { jsx as t } from "@emotion/react/jsx-runtime";
4
4
  //#region src/components/icon.tsx
@@ -1,14 +1,17 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
2
  import { formatDurationSeconds as e, formatTimestamp as t } from "./format.js";
3
- import { ACTIVITY_ACTION_LABELS as n, BINDING_PROJECTION_STATUS_LABELS as r, BINDING_PROJECTION_STATUS_OPTIONS as i, INSTANCE_STATUS_LABELS as a, INSTANCE_STATUS_OPTIONS as o, NODE_PROGRESS_LABELS as s, PROCESS_TASK_ACTION_LABELS as c, TASK_STATUS_LABELS as l, TASK_STATUS_OPTIONS as u, VERSION_STATUS_LABELS as d } from "./status/labels.js";
4
- import { BINDING_PROJECTION_STATUS_COLORS as f, INSTANCE_STATUS_COLORS as p, NODE_PROGRESS_COLORS as m, TASK_STATUS_COLORS as h, VERSION_STATUS_COLORS as g } from "./status/colors.js";
3
+ import { BINDING_PROJECTION_STATUS_COLORS as n, INSTANCE_STATUS_COLORS as r, NODE_PROGRESS_COLORS as i, TASK_STATUS_COLORS as a, VERSION_STATUS_COLORS as o } from "./status/colors.js";
4
+ import { ACTIVITY_ACTION_LABELS as s, BINDING_PROJECTION_STATUS_LABELS as c, BINDING_PROJECTION_STATUS_OPTIONS as l, INSTANCE_STATUS_LABELS as u, INSTANCE_STATUS_OPTIONS as d, NODE_PROGRESS_LABELS as f, PROCESS_TASK_ACTION_LABELS as p, TASK_STATUS_LABELS as m, TASK_STATUS_OPTIONS as h, VERSION_STATUS_LABELS as g } from "./status/labels.js";
5
5
  import { InstanceStatusTag as _, NodeProgressTag as v, ProjectionStatusTag as y, TaskStatusTag as b, VersionStatusTag as x } from "./status/index.js";
6
6
  import { UserGroup as S, UserLabel as C } from "./user/index.js";
7
- import { InstanceFlowGraphViewer as w } from "./flow-graph/index.js";
8
- import { InstanceFormPanel as T } from "./form-panel/index.js";
9
- import { InstanceTimeline as E } from "./timeline/index.js";
7
+ import { InstanceTimeline as w } from "./timeline/index.js";
8
+ import { InstanceFlowGraphViewer as T } from "./flow-graph/index.js";
9
+ import { InstanceFormPanel as E } from "./form-panel/index.js";
10
10
  import { PrincipalSelect as D } from "./principal/index.js";
11
11
  import { InstanceDetailPanel as O, InstanceHeader as k } from "./detail/index.js";
12
12
  import { AdminInstanceDetailPanel as A } from "./detail/admin.js";
13
- import { InstanceDetailDrawer as j } from "./detail/drawer.js";
14
- export { n as ACTIVITY_ACTION_LABELS, A as AdminInstanceDetailPanel, f as BINDING_PROJECTION_STATUS_COLORS, r as BINDING_PROJECTION_STATUS_LABELS, i as BINDING_PROJECTION_STATUS_OPTIONS, p as INSTANCE_STATUS_COLORS, a as INSTANCE_STATUS_LABELS, o as INSTANCE_STATUS_OPTIONS, j as InstanceDetailDrawer, O as InstanceDetailPanel, w as InstanceFlowGraphViewer, T as InstanceFormPanel, k as InstanceHeader, _ as InstanceStatusTag, E as InstanceTimeline, m as NODE_PROGRESS_COLORS, s as NODE_PROGRESS_LABELS, v as NodeProgressTag, c as PROCESS_TASK_ACTION_LABELS, D as PrincipalSelect, y as ProjectionStatusTag, h as TASK_STATUS_COLORS, l as TASK_STATUS_LABELS, u as TASK_STATUS_OPTIONS, b as TaskStatusTag, S as UserGroup, C as UserLabel, g as VERSION_STATUS_COLORS, d as VERSION_STATUS_LABELS, x as VersionStatusTag, e as formatDurationSeconds, t as formatTimestamp };
13
+ import { useAnnotations as j } from "./annotations/use-annotations.js";
14
+ import { AnnotationComposer as M, AnnotationResponseComposer as N } from "./annotations/composers.js";
15
+ import { AnnotationList as P } from "./annotations/index.js";
16
+ import { InstanceDetailDrawer as F } from "./detail/drawer.js";
17
+ export { s as ACTIVITY_ACTION_LABELS, A as AdminInstanceDetailPanel, M as AnnotationComposer, P as AnnotationList, N as AnnotationResponseComposer, n as BINDING_PROJECTION_STATUS_COLORS, c as BINDING_PROJECTION_STATUS_LABELS, l as BINDING_PROJECTION_STATUS_OPTIONS, r as INSTANCE_STATUS_COLORS, u as INSTANCE_STATUS_LABELS, d as INSTANCE_STATUS_OPTIONS, F as InstanceDetailDrawer, O as InstanceDetailPanel, T as InstanceFlowGraphViewer, E as InstanceFormPanel, k as InstanceHeader, _ as InstanceStatusTag, w as InstanceTimeline, i as NODE_PROGRESS_COLORS, f as NODE_PROGRESS_LABELS, v as NodeProgressTag, p as PROCESS_TASK_ACTION_LABELS, D as PrincipalSelect, y as ProjectionStatusTag, a as TASK_STATUS_COLORS, m as TASK_STATUS_LABELS, h as TASK_STATUS_OPTIONS, b as TaskStatusTag, S as UserGroup, C as UserLabel, o as VERSION_STATUS_COLORS, g as VERSION_STATUS_LABELS, x as VersionStatusTag, e as formatDurationSeconds, t as formatTimestamp, j as useAnnotations };
@@ -0,0 +1,31 @@
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
+ import { displayInstanceTitle as e } from "./format.js";
3
+ import { Flex as t, Tag as n, Text as r } from "@vef-framework-react/components";
4
+ import { jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
5
+ //#region src/components/instance-list-title.tsx
6
+ function o({ title: o, instanceNo: s, unread: c }) {
7
+ let l = e(o, s), u = l !== s;
8
+ return /* @__PURE__ */ a(t, {
9
+ vertical: !0,
10
+ gap: 2,
11
+ children: [/* @__PURE__ */ a(t, {
12
+ align: "center",
13
+ gap: "small",
14
+ children: [/* @__PURE__ */ i(r, {
15
+ copyable: !u,
16
+ strong: c,
17
+ children: l
18
+ }), c && /* @__PURE__ */ i(n, {
19
+ color: "processing",
20
+ children: "未读"
21
+ })]
22
+ }), u && /* @__PURE__ */ i(r, {
23
+ copyable: !0,
24
+ style: { fontSize: 12 },
25
+ type: "secondary",
26
+ children: s
27
+ })]
28
+ });
29
+ }
30
+ //#endregion
31
+ export { o as InstanceListTitle };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
2
  import { useApprovalPlugins as e } from "../../plugins/index.js";
3
3
  import { Select as t } from "@vef-framework-react/components";
4
4
  import { jsx as n } from "@emotion/react/jsx-runtime";
@@ -10,7 +10,8 @@ var r = {
10
10
  };
11
11
  function i({ kind: i, selection: a, value: o, onChange: s, disabled: c, maxCount: l }) {
12
12
  let { pickers: u } = e(), d = u?.[i] ?? (a ? u?.[a] : void 0), f = (e) => {
13
- s(l === void 0 ? e : e.slice(0, l));
13
+ let t = l === 1 && e.length > 1 ? e.find((e) => !o.includes(e)) : void 0, n = t === void 0 ? e.slice(0, l) : [t];
14
+ (n.length !== o.length || n.some((e, t) => e !== o[t])) && s(n);
14
15
  };
15
16
  return d ? /* @__PURE__ */ n(d, {
16
17
  disabled: c,
@@ -19,6 +20,7 @@ function i({ kind: i, selection: a, value: o, onChange: s, disabled: c, maxCount
19
20
  }) : /* @__PURE__ */ n(t, {
20
21
  allowClear: !0,
21
22
  disabled: c,
23
+ maxTagCount: 2,
22
24
  mode: "tags",
23
25
  open: !1,
24
26
  placeholder: r[i] ?? (a ? r[a] : void 0) ?? "输入 ID,回车添加",
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
2
  //#region src/components/status/colors.ts
3
3
  var e = {
4
4
  running: "processing",
@@ -6,7 +6,8 @@ var e = {
6
6
  rejected: "error",
7
7
  withdrawn: "default",
8
8
  returned: "warning",
9
- terminated: "error"
9
+ terminated: "error",
10
+ voided: "default"
10
11
  }, t = {
11
12
  waiting: "default",
12
13
  pending: "processing",
@@ -1,40 +1,40 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
- import { BINDING_PROJECTION_STATUS_LABELS as e, INSTANCE_STATUS_LABELS as t, NODE_PROGRESS_LABELS as n, TASK_STATUS_LABELS as r, VERSION_STATUS_LABELS as i } from "./labels.js";
3
- import { BINDING_PROJECTION_STATUS_COLORS as a, INSTANCE_STATUS_COLORS as o, NODE_PROGRESS_COLORS as s, TASK_STATUS_COLORS as c, VERSION_STATUS_COLORS as l } from "./colors.js";
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
+ import { BINDING_PROJECTION_STATUS_COLORS as e, INSTANCE_STATUS_COLORS as t, NODE_PROGRESS_COLORS as n, TASK_STATUS_COLORS as r, VERSION_STATUS_COLORS as i } from "./colors.js";
3
+ import { BINDING_PROJECTION_STATUS_LABELS as a, INSTANCE_STATUS_LABELS as o, NODE_PROGRESS_LABELS as s, TASK_STATUS_LABELS as c, VERSION_STATUS_LABELS as l } from "./labels.js";
4
4
  import { Tag as u } from "@vef-framework-react/components";
5
5
  import { jsx as d } from "@emotion/react/jsx-runtime";
6
6
  //#region src/components/status/index.tsx
7
7
  function f({ status: e }) {
8
8
  return /* @__PURE__ */ d(u, {
9
- color: o[e],
10
- children: t[e]
9
+ color: t[e],
10
+ children: o[e]
11
11
  });
12
12
  }
13
13
  function p(e) {
14
- return Object.hasOwn(r, e);
14
+ return Object.hasOwn(c, e);
15
15
  }
16
16
  function m({ status: e }) {
17
17
  return p(e) ? /* @__PURE__ */ d(u, {
18
- color: c[e],
19
- children: r[e]
18
+ color: r[e],
19
+ children: c[e]
20
20
  }) : /* @__PURE__ */ d(u, { children: e });
21
21
  }
22
22
  function h({ status: e }) {
23
23
  return /* @__PURE__ */ d(u, {
24
- color: s[e],
25
- children: n[e]
24
+ color: n[e],
25
+ children: s[e]
26
26
  });
27
27
  }
28
28
  function g({ status: e }) {
29
29
  return /* @__PURE__ */ d(u, {
30
- color: l[e],
31
- children: i[e]
30
+ color: i[e],
31
+ children: l[e]
32
32
  });
33
33
  }
34
34
  function _({ status: t }) {
35
35
  return /* @__PURE__ */ d(u, {
36
- color: a[t],
37
- children: e[t]
36
+ color: e[t],
37
+ children: a[t]
38
38
  });
39
39
  }
40
40
  //#endregion
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
2
  //#region src/components/status/labels.ts
3
3
  var e = {
4
4
  running: "审批中",
@@ -6,7 +6,8 @@ var e = {
6
6
  rejected: "已拒绝",
7
7
  withdrawn: "已撤回",
8
8
  returned: "已退回",
9
- terminated: "已终止"
9
+ terminated: "已终止",
10
+ voided: "已作废"
10
11
  }, t = {
11
12
  waiting: "等待中",
12
13
  pending: "待处理",
@@ -49,7 +50,9 @@ var e = {
49
50
  resubmit: "重新提交",
50
51
  reassign: "改派",
51
52
  terminate: "终止",
53
+ void: "作废",
52
54
  add_cc: "抄送",
55
+ handover: "工作交接",
53
56
  urge: "催办"
54
57
  }, o = {
55
58
  approve: "通过",
@@ -63,7 +66,8 @@ var e = {
63
66
  "rejected",
64
67
  "returned",
65
68
  "withdrawn",
66
- "terminated"
69
+ "terminated",
70
+ "voided"
67
71
  ], c = [
68
72
  "pending",
69
73
  "waiting",
@@ -1,69 +1,73 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
2
  import { formatTimestamp as e } from "../format.js";
3
3
  import { ACTIVITY_ACTION_LABELS as t } from "../status/labels.js";
4
4
  import { TaskStatusTag as n } from "../status/index.js";
5
- import { UserLabel as r } from "../user/index.js";
6
- import { Empty as i, Flex as a, Stack as o, Tag as s, Text as c, Timeline as l, Tooltip as u, globalCssVars as d } from "@vef-framework-react/components";
7
- import { jsx as f, jsxs as p } from "@emotion/react/jsx-runtime";
5
+ import { PredecessorLabel as r, UserLabel as i } from "../user/index.js";
6
+ import { Empty as a, Flex as o, Stack as s, Tag as c, Text as l, Timeline as u, Tooltip as d, globalCssVars as f } from "@vef-framework-react/components";
7
+ import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
8
8
  //#region src/components/timeline/index.tsx
9
- var m = {
9
+ var h = {
10
10
  active: "blue",
11
11
  passed: "green",
12
12
  rejected: "red",
13
13
  returned: "orange",
14
14
  canceled: "gray"
15
15
  };
16
- function h({ opinion: e }) {
17
- return /* @__PURE__ */ f("div", {
16
+ function g({ opinion: e }) {
17
+ return /* @__PURE__ */ p("div", {
18
18
  style: {
19
19
  padding: "4px 10px",
20
- borderInlineStart: `3px solid ${d.colorBorder}`,
21
- background: d.colorFillQuaternary,
20
+ borderInlineStart: `3px solid ${f.colorBorder}`,
21
+ background: f.colorFillQuaternary,
22
22
  borderRadius: 4
23
23
  },
24
- children: /* @__PURE__ */ f(c, {
24
+ children: /* @__PURE__ */ p(l, {
25
25
  style: {
26
- fontSize: d.fontSizeSm,
26
+ fontSize: f.fontSizeSm,
27
27
  whiteSpace: "pre-wrap"
28
28
  },
29
29
  children: e
30
30
  })
31
31
  });
32
32
  }
33
- function g({ participant: t }) {
34
- return /* @__PURE__ */ p(o, {
33
+ function _({ participant: t }) {
34
+ return /* @__PURE__ */ m(s, {
35
35
  gap: 4,
36
- children: [/* @__PURE__ */ p(a, {
36
+ children: [/* @__PURE__ */ m(o, {
37
37
  align: "center",
38
38
  gap: "small",
39
39
  wrap: "wrap",
40
40
  children: [
41
- /* @__PURE__ */ f(r, { user: t.user }),
42
- t.delegator && /* @__PURE__ */ f(c, {
43
- style: { fontSize: d.fontSizeSm },
41
+ /* @__PURE__ */ p(i, { user: t.user }),
42
+ t.predecessor && /* @__PURE__ */ p(r, {
43
+ reason: t.handoverReason,
44
+ user: t.predecessor
45
+ }),
46
+ t.delegator && /* @__PURE__ */ p(l, {
47
+ style: { fontSize: f.fontSizeSm },
44
48
  type: "secondary",
45
49
  children: `(受 ${t.delegator.name || t.delegator.id} 委托)`
46
50
  }),
47
- /* @__PURE__ */ f(n, { status: t.status }),
48
- t.isTimeout && /* @__PURE__ */ f(s, {
51
+ /* @__PURE__ */ p(n, { status: t.status }),
52
+ t.isTimeout && /* @__PURE__ */ p(c, {
49
53
  color: "error",
50
54
  children: "已超时"
51
55
  }),
52
- t.transferTo && /* @__PURE__ */ f(c, {
53
- style: { fontSize: d.fontSizeSm },
56
+ t.transferTo && /* @__PURE__ */ p(l, {
57
+ style: { fontSize: f.fontSizeSm },
54
58
  type: "secondary",
55
59
  children: `转办给 ${t.transferTo.name || t.transferTo.id}`
56
60
  }),
57
- t.actionTime && /* @__PURE__ */ f(c, {
58
- style: { fontSize: d.fontSizeSm },
61
+ t.actionTime && /* @__PURE__ */ p(l, {
62
+ style: { fontSize: f.fontSizeSm },
59
63
  type: "secondary",
60
64
  children: e(t.actionTime)
61
65
  })
62
66
  ]
63
- }), t.opinion && /* @__PURE__ */ f(h, { opinion: t.opinion })]
67
+ }), t.opinion && /* @__PURE__ */ p(g, { opinion: t.opinion })]
64
68
  });
65
69
  }
66
- function _(e) {
70
+ function v(e) {
67
71
  let n = [t[e.action]];
68
72
  e.transferTo && n.push(`给 ${e.transferTo.name || e.transferTo.id}`), e.target && n.push(`(${e.target.name || e.target.id})`), e.rollbackToNodeName && n.push(`至「${e.rollbackToNodeName}」`);
69
73
  let r = [
@@ -73,107 +77,113 @@ function _(e) {
73
77
  ];
74
78
  return r.length > 0 && n.push(r.map((e) => e.name || e.id).join("、")), n.join(" ");
75
79
  }
76
- function v({ activity: t }) {
77
- return /* @__PURE__ */ p(o, {
80
+ function y({ activity: t }) {
81
+ return /* @__PURE__ */ m(s, {
78
82
  gap: 4,
79
- children: [/* @__PURE__ */ p(a, {
83
+ children: [/* @__PURE__ */ m(o, {
80
84
  align: "center",
81
85
  gap: "small",
82
86
  wrap: "wrap",
83
87
  children: [
84
- /* @__PURE__ */ f(r, {
88
+ /* @__PURE__ */ p(i, {
85
89
  avatarSize: 18,
86
90
  user: t.operator
87
91
  }),
88
- /* @__PURE__ */ f(c, {
89
- style: { fontSize: d.fontSizeSm },
90
- children: _(t)
92
+ /* @__PURE__ */ p(l, {
93
+ style: { fontSize: f.fontSizeSm },
94
+ children: v(t)
91
95
  }),
92
- /* @__PURE__ */ f(c, {
93
- style: { fontSize: d.fontSizeSm },
96
+ /* @__PURE__ */ p(l, {
97
+ style: { fontSize: f.fontSizeSm },
94
98
  type: "secondary",
95
99
  children: e(t.createdAt)
96
100
  })
97
101
  ]
98
- }), t.opinion && /* @__PURE__ */ f(h, { opinion: t.opinion })]
102
+ }), t.opinion && /* @__PURE__ */ p(g, { opinion: t.opinion })]
99
103
  });
100
104
  }
101
- function y({ recipients: t }) {
105
+ function b({ recipients: t }) {
102
106
  let n = t.filter((e) => e.readAt).length;
103
- return /* @__PURE__ */ p(a, {
107
+ return /* @__PURE__ */ m(o, {
104
108
  align: "center",
105
109
  gap: "small",
106
110
  wrap: "wrap",
107
111
  children: [
108
- /* @__PURE__ */ f(c, {
109
- style: { fontSize: d.fontSizeSm },
112
+ /* @__PURE__ */ p(l, {
113
+ style: { fontSize: f.fontSizeSm },
110
114
  type: "secondary",
111
115
  children: "抄送"
112
116
  }),
113
- t.map((t) => /* @__PURE__ */ f(u, {
117
+ t.map((t) => /* @__PURE__ */ p(d, {
114
118
  title: t.readAt ? `已读 ${e(t.readAt)}` : "未读",
115
- children: /* @__PURE__ */ f(s, {
119
+ children: /* @__PURE__ */ p(c, {
116
120
  color: t.readAt ? "success" : "default",
117
121
  style: { marginInlineEnd: 0 },
118
122
  children: t.user.name || t.user.id
119
123
  })
120
124
  }, t.user.id)),
121
- /* @__PURE__ */ f(c, {
122
- style: { fontSize: d.fontSizeSm },
125
+ /* @__PURE__ */ p(l, {
126
+ style: { fontSize: f.fontSizeSm },
123
127
  type: "secondary",
124
128
  children: `已读 ${n}/${t.length}`
125
129
  })
126
130
  ]
127
131
  });
128
132
  }
129
- function b(e) {
130
- return e.kind === "withdraw" ? "gray" : e.kind === "terminate" ? "red" : e.status ? m[e.status] : "gray";
131
- }
132
133
  function x(e) {
133
- return e.kind === "withdraw" ? "撤回" : e.kind === "terminate" ? "终止" : e.name ?? "";
134
+ return e.kind === "withdraw" || e.kind === "void" ? "gray" : e.kind === "terminate" ? "red" : e.status ? h[e.status] : "gray";
134
135
  }
135
- function S(t) {
136
+ function S(e) {
137
+ return e.kind === "withdraw" ? "撤回" : e.kind === "terminate" ? "终止" : e.kind === "void" ? "作废" : e.name ?? "";
138
+ }
139
+ function C(t) {
136
140
  let n = e(t.startedAt);
137
141
  if (!t.finishedAt) return n;
138
142
  let r = e(t.finishedAt);
139
143
  return r === n ? n : `${n} → ${r}`;
140
144
  }
141
- function C({ entry: e }) {
142
- return /* @__PURE__ */ p(a, {
145
+ function w({ entry: e }) {
146
+ return /* @__PURE__ */ m(o, {
143
147
  align: "center",
144
148
  gap: "small",
145
149
  wrap: "wrap",
146
- children: [/* @__PURE__ */ f(c, {
150
+ children: [/* @__PURE__ */ p(l, {
147
151
  strong: !0,
148
- children: x(e)
149
- }), /* @__PURE__ */ f(c, {
150
- style: { fontSize: d.fontSizeSm },
151
- type: "secondary",
152
152
  children: S(e)
153
+ }), /* @__PURE__ */ p(l, {
154
+ style: { fontSize: f.fontSizeSm },
155
+ type: "secondary",
156
+ children: C(e)
153
157
  })]
154
158
  });
155
159
  }
156
- function w({ entry: e }) {
160
+ function T({ entry: e }) {
157
161
  let t = e.participants ?? [], n = e.activities ?? [], r = e.ccRecipients ?? [];
158
- return t.length === 0 && n.length === 0 && r.length === 0 ? null : /* @__PURE__ */ p(o, {
162
+ return t.length === 0 && n.length === 0 && r.length === 0 ? null : /* @__PURE__ */ m(s, {
159
163
  gap: 8,
160
164
  children: [
161
- t.map((e) => /* @__PURE__ */ f(g, { participant: e }, e.taskId)),
162
- r.length > 0 && /* @__PURE__ */ f(y, { recipients: r }),
163
- n.map((e, t) => /* @__PURE__ */ f(v, { activity: e }, t))
165
+ t.map((e) => /* @__PURE__ */ p(_, { participant: e }, e.taskId)),
166
+ r.length > 0 && /* @__PURE__ */ p(b, { recipients: r }),
167
+ n.map((e, t) => /* @__PURE__ */ p(y, { activity: e }, t))
164
168
  ]
165
169
  });
166
170
  }
167
- function T({ timeline: e }) {
168
- return e.length === 0 ? /* @__PURE__ */ f(i, { description: "暂无流转记录" }) : /* @__PURE__ */ f(l, {
169
- items: e.map((e, t) => ({
170
- key: String(t),
171
- color: b(e),
172
- title: /* @__PURE__ */ f(C, { entry: e }),
173
- content: /* @__PURE__ */ f(w, { entry: e })
171
+ function E({ timeline: e, renderEntryExtra: t }) {
172
+ return e.length === 0 ? /* @__PURE__ */ p(a, { description: "暂无流转记录" }) : /* @__PURE__ */ p(u, {
173
+ items: e.map((e, n) => ({
174
+ key: String(n),
175
+ color: x(e),
176
+ content: /* @__PURE__ */ m(s, {
177
+ gap: 8,
178
+ children: [
179
+ /* @__PURE__ */ p(w, { entry: e }),
180
+ /* @__PURE__ */ p(T, { entry: e }),
181
+ t?.(e)
182
+ ]
183
+ })
174
184
  })),
175
- mode: "left"
185
+ mode: "start"
176
186
  });
177
187
  }
178
188
  //#endregion
179
- export { T as InstanceTimeline };
189
+ export { E as InstanceTimeline };
@@ -1,8 +1,8 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
- import { Avatar as e, Space as t, Text as n, Tooltip as r } from "@vef-framework-react/components";
3
- import { jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
+ import { Avatar as e, Space as t, Text as n, Tooltip as r, globalCssVars as i } from "@vef-framework-react/components";
3
+ import { jsx as a, jsxs as o } from "@emotion/react/jsx-runtime";
4
4
  //#region src/components/user/index.tsx
5
- var o = [
5
+ var s = [
6
6
  "var(--vef-color-primary)",
7
7
  "#f56a00",
8
8
  "#7265e6",
@@ -12,53 +12,60 @@ var o = [
12
12
  "#389e0d",
13
13
  "#d46b08"
14
14
  ];
15
- function s(e) {
15
+ function c(e) {
16
16
  let t = 0;
17
17
  for (let n of e) t = (t * 31 + (n.codePointAt(0) ?? 0)) % 1000000007;
18
- return o[Math.abs(t) % o.length] ?? o[0];
18
+ return s[Math.abs(t) % s.length] ?? s[0];
19
19
  }
20
- function c({ user: o, showAvatar: c = !0, avatarSize: l = 22 }) {
21
- let u = o.name || o.id;
22
- return /* @__PURE__ */ i(r, {
23
- title: o.departmentName ? `${u} · ${o.departmentName}` : u,
24
- children: /* @__PURE__ */ a(t, {
20
+ function l({ user: i, showAvatar: s = !0, avatarSize: l = 22 }) {
21
+ let u = i.name || i.id;
22
+ return /* @__PURE__ */ a(r, {
23
+ title: i.departmentName ? `${u} · ${i.departmentName}` : u,
24
+ children: /* @__PURE__ */ o(t, {
25
25
  size: 6,
26
26
  style: {
27
27
  display: "inline-flex",
28
28
  alignItems: "center"
29
29
  },
30
- children: [c && /* @__PURE__ */ i(e, {
30
+ children: [s && /* @__PURE__ */ a(e, {
31
31
  size: l,
32
32
  style: {
33
- backgroundColor: s(o.id),
33
+ backgroundColor: c(i.id),
34
34
  fontSize: Math.round(l / 2)
35
35
  },
36
36
  children: u.slice(0, 1).toUpperCase()
37
- }), /* @__PURE__ */ i(n, { children: u })]
37
+ }), /* @__PURE__ */ a(n, { children: u })]
38
38
  })
39
39
  });
40
40
  }
41
- function l({ users: o, maxCount: s = 5, avatarSize: l = 22 }) {
42
- if (o.length === 0) return /* @__PURE__ */ i(n, {
41
+ function u({ user: e, reason: t }) {
42
+ return /* @__PURE__ */ a(n, {
43
+ style: { fontSize: i.fontSizeSm },
44
+ type: "secondary",
45
+ children: `接替 ${e.name || e.id}${t ? `(${t})` : ""}`
46
+ });
47
+ }
48
+ function d({ users: i, maxCount: s = 5, avatarSize: c = 22 }) {
49
+ if (i.length === 0) return /* @__PURE__ */ a(n, {
43
50
  type: "secondary",
44
51
  children: "-"
45
52
  });
46
- let u = o.slice(0, s), d = o.slice(s);
47
- return /* @__PURE__ */ a(t, {
53
+ let u = i.slice(0, s), d = i.slice(s);
54
+ return /* @__PURE__ */ o(t, {
48
55
  wrap: !0,
49
56
  size: 8,
50
- children: [u.map((e) => /* @__PURE__ */ i(c, {
51
- avatarSize: l,
57
+ children: [u.map((e) => /* @__PURE__ */ a(l, {
58
+ avatarSize: c,
52
59
  user: e
53
- }, e.id)), d.length > 0 && /* @__PURE__ */ i(r, {
60
+ }, e.id)), d.length > 0 && /* @__PURE__ */ a(r, {
54
61
  title: d.map((e) => e.name || e.id).join("、"),
55
- children: /* @__PURE__ */ i(e, {
56
- size: l,
57
- style: { fontSize: Math.round(l / 2) },
62
+ children: /* @__PURE__ */ a(e, {
63
+ size: c,
64
+ style: { fontSize: Math.round(c / 2) },
58
65
  children: `+${d.length}`
59
66
  })
60
67
  })]
61
68
  });
62
69
  }
63
70
  //#endregion
64
- export { l as UserGroup, c as UserLabel, s as avatarColor };
71
+ export { u as PredecessorLabel, d as UserGroup, l as UserLabel, c as avatarColor };
@@ -0,0 +1,62 @@
1
+ /*! @vef-framework-react/approval v2.31.1 made by Venus | 2026-11-19T04:58:06.116Z */
2
+ import { useAdminApprovalApi as e } from "../../api/admin-api.js";
3
+ import { TargetSummary as t } from "./summary.js";
4
+ import { useRefreshVoidTarget as n } from "./use-refresh.js";
5
+ import { ActionBody as r, ActionDialog as i, ActionFooter as a, useConfirm as o } from "../action-dialog/index.js";
6
+ import { VoidFormFields as s, useVoidDraft as c } from "./form.js";
7
+ import { useMutation as l } from "@vef-framework-react/core";
8
+ import { useState as u } from "react";
9
+ import { Alert as d, showSuccessMessage as f } from "@vef-framework-react/components";
10
+ import { Fragment as p, jsx as m, jsxs as h } from "@emotion/react/jsx-runtime";
11
+ //#region src/components/void/direct-dialog.tsx
12
+ function g({ target: i, onClose: g }) {
13
+ let _ = c(i, "admin"), v = e(), y = n(), [b, x] = u(""), S = l({
14
+ mutationFn: v.voidInstance,
15
+ meta: { shouldShowSuccessFeedback: !1 }
16
+ }), C = o(g, (e) => {
17
+ x(e instanceof Error ? e.message : "作废失败,请重试"), _.preview.refetch();
18
+ });
19
+ return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ h(r, {
20
+ gap: 16,
21
+ children: [
22
+ /* @__PURE__ */ m(t, { target: i }),
23
+ /* @__PURE__ */ m(s, {
24
+ draft: _,
25
+ target: i
26
+ }),
27
+ b && /* @__PURE__ */ m(d, {
28
+ showIcon: !0,
29
+ title: b,
30
+ type: "error"
31
+ })
32
+ ]
33
+ }), /* @__PURE__ */ m(a, {
34
+ danger: !0,
35
+ disabled: !!_.issue,
36
+ disabledReason: _.issue,
37
+ okText: "确认作废",
38
+ submitting: C.submitting,
39
+ onCancel: g,
40
+ onOk: () => void C.run(async () => {
41
+ await S.mutateAsync({
42
+ instanceId: i.instanceId,
43
+ reason: _.reason.trim(),
44
+ attachments: _.attachments,
45
+ options: _.options
46
+ }), await y(i.instanceId), f("审批单已作废");
47
+ })
48
+ })] });
49
+ }
50
+ function _({ open: e, target: t, onClose: n }) {
51
+ return /* @__PURE__ */ m(i, {
52
+ open: e,
53
+ title: "作废审批单",
54
+ onClose: n,
55
+ children: /* @__PURE__ */ m(g, {
56
+ target: t,
57
+ onClose: n
58
+ })
59
+ });
60
+ }
61
+ //#endregion
62
+ export { _ as DirectVoidDialog };