@vef-framework-react/approval 2.30.0 → 2.31.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 (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 +8 -7
@@ -1,11 +1,13 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
- import { initiatorsForSubmit as e } from "./types.js";
3
- import { Card as t, Descriptions as n, Flex as r, Input as i, Labeled as a, LabelsDisplay as o, Stack as s, Switch as c, Table as l, Tag as u, Text as d, globalCssVars as f } from "@vef-framework-react/components";
1
+ /*! @vef-framework-react/approval v2.31.0 made by Venus | 2026-11-19T01:43:39.549Z */
2
+ import { FieldCatalog as e } from "./field-catalog.js";
3
+ import { initiatorsForSubmit as t } from "./types.js";
4
+ import { Card as n, Descriptions as r, Flex as i, Input as a, Labeled as o, LabelsDisplay as s, Stack as c, Switch as l, Tag as u, Text as d, globalCssVars as f } from "@vef-framework-react/components";
4
5
  import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
6
+ import { WindowRuleSummary as h } from "@vef-framework-react/calendar";
5
7
  //#region src/pages/flow-page/designer/review-step.tsx
6
- function h({ draft: h, fields: g, versionDescription: _, publishNow: v, onVersionDescriptionChange: y, onPublishNowChange: b }) {
7
- let { basic: x } = h, S = h.flowDefinition.nodes.length;
8
- return /* @__PURE__ */ m(s, {
8
+ function g({ draft: g, businessKindLabel: _, fields: v, versionDescription: y, publishNow: b, onVersionDescriptionChange: x, onPublishNowChange: S }) {
9
+ let { basic: C } = g, w = g.flowDefinition.nodes.length;
10
+ return /* @__PURE__ */ m(c, {
9
11
  gap: 16,
10
12
  style: {
11
13
  maxWidth: 920,
@@ -13,9 +15,9 @@ function h({ draft: h, fields: g, versionDescription: _, publishNow: v, onVersio
13
15
  width: "100%"
14
16
  },
15
17
  children: [
16
- /* @__PURE__ */ p(t, {
18
+ /* @__PURE__ */ p(n, {
17
19
  title: "流程设置",
18
- children: /* @__PURE__ */ p(n, {
20
+ children: /* @__PURE__ */ p(r, {
19
21
  colon: !0,
20
22
  column: {
21
23
  xs: 1,
@@ -28,99 +30,75 @@ function h({ draft: h, fields: g, versionDescription: _, publishNow: v, onVersio
28
30
  label: "流程编码",
29
31
  children: /* @__PURE__ */ p(d, {
30
32
  code: !0,
31
- children: x.code
33
+ children: C.code
32
34
  })
33
35
  },
34
36
  {
35
37
  key: "name",
36
38
  label: "流程名称",
37
- children: x.name
39
+ children: C.name
38
40
  },
39
41
  {
40
42
  key: "binding",
41
43
  label: "业务绑定",
42
- children: x.bindingMode === "business" ? /* @__PURE__ */ p(u, {
44
+ children: C.businessBinding ? /* @__PURE__ */ p(u, {
43
45
  color: "blue",
44
- children: `业务表 ${x.businessBinding?.tableName ?? ""}`
45
- }) : /* @__PURE__ */ p(u, { children: "独立存储" })
46
+ children: `业务表 ${C.businessBinding?.tableName ?? ""}`
47
+ }) : _ ?? "流程表单"
46
48
  },
47
49
  {
48
50
  key: "initiation",
49
51
  label: "发起权限",
50
- children: x.isAllInitiationAllowed ? "所有人可发起" : `${e(h).length} 条发起规则`
52
+ children: C.isAllInitiationAllowed ? "所有人可发起" : `${t(g).length} 条发起规则`
53
+ },
54
+ {
55
+ key: "window",
56
+ label: "发起时段",
57
+ children: /* @__PURE__ */ p(h, { rule: C.initiationWindow })
51
58
  },
52
59
  {
53
60
  key: "labels",
54
61
  label: "标签",
55
- children: /* @__PURE__ */ p(o, { labels: x.labels })
62
+ children: /* @__PURE__ */ p(s, { labels: C.labels })
56
63
  },
57
64
  {
58
65
  key: "storage",
59
66
  label: "存储模式",
60
- children: h.storageMode === "table" ? "独立表存储" : "JSON 存储"
67
+ children: !C.businessKind && g.storageMode === "table" ? "独立表存储" : "JSON 存储"
61
68
  }
62
69
  ]
63
70
  })
64
71
  }),
65
- /* @__PURE__ */ p(t, {
66
- title: `表单字段(${g.length})`,
67
- children: g.length === 0 ? /* @__PURE__ */ p(d, {
68
- type: "secondary",
69
- children: "该流程未设计表单。"
70
- }) : /* @__PURE__ */ p(l, {
71
- dataSource: g,
72
- pagination: !1,
73
- rowKey: "key",
74
- size: "small",
75
- columns: [
76
- {
77
- title: "字段键",
78
- dataIndex: "key",
79
- width: 220,
80
- render: (e) => /* @__PURE__ */ p(d, {
81
- code: !0,
82
- children: e
83
- })
84
- },
85
- {
86
- title: "名称",
87
- dataIndex: "label"
88
- },
89
- {
90
- title: "类型",
91
- dataIndex: "kind",
92
- width: 120,
93
- render: (e) => /* @__PURE__ */ p(u, { children: e })
94
- }
95
- ]
96
- })
72
+ /* @__PURE__ */ p(e, {
73
+ fields: v,
74
+ title: `字段目录(${v.length})`
97
75
  }),
98
- /* @__PURE__ */ p(t, {
76
+ /* @__PURE__ */ p(n, {
99
77
  title: "发布选项",
100
- children: /* @__PURE__ */ m(s, {
78
+ children: /* @__PURE__ */ m(c, {
101
79
  gap: 12,
102
80
  children: [
103
81
  /* @__PURE__ */ p(d, {
104
82
  style: { fontSize: f.fontSizeSm },
105
83
  type: "secondary",
106
- children: `流程图共 ${S} 个节点。提交将保存流程设置并部署为新版本;发布后新发起的审批立即走新版本,进行中的实例仍沿用其原版本。`
84
+ children: `流程图共 ${w} 个节点。提交将保存流程设置并部署为新版本;发布后新发起的审批立即走新版本,进行中的实例仍沿用其原版本。`
107
85
  }),
108
- /* @__PURE__ */ p(a, {
86
+ /* @__PURE__ */ p(o, {
109
87
  label: "版本说明",
110
- children: /* @__PURE__ */ p(i.TextArea, {
88
+ children: /* @__PURE__ */ p(a.TextArea, {
111
89
  maxLength: 500,
112
90
  placeholder: "本次变更说明(可选)",
113
91
  rows: 2,
114
- value: _,
115
- onChange: (e) => y(e.target.value)
92
+ value: y,
93
+ onChange: (e) => x(e.target.value)
116
94
  })
117
95
  }),
118
- /* @__PURE__ */ m(r, {
96
+ /* @__PURE__ */ m(i, {
119
97
  align: "center",
120
98
  gap: "small",
121
- children: [/* @__PURE__ */ p(c, {
122
- checked: v,
123
- onChange: b
99
+ children: [/* @__PURE__ */ p(l, {
100
+ checked: b,
101
+ onChange: S
124
102
  }), /* @__PURE__ */ p(d, { children: "部署后立即发布" })]
125
103
  })
126
104
  ]
@@ -130,4 +108,4 @@ function h({ draft: h, fields: g, versionDescription: _, publishNow: v, onVersio
130
108
  });
131
109
  }
132
110
  //#endregion
133
- export { h as ReviewStep };
111
+ export { g as ReviewStep };
@@ -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.0 made by Venus | 2026-11-19T01:43:39.549Z */
2
2
  //#region src/pages/flow-page/designer/types.ts
3
3
  var e = {
4
4
  nodes: [],
@@ -13,7 +13,6 @@ function t(t) {
13
13
  name: "",
14
14
  categoryId: "",
15
15
  labels: {},
16
- bindingMode: "standalone",
17
16
  adminUserIds: [],
18
17
  isAllInitiationAllowed: !1,
19
18
  instanceTitleTemplate: ""
@@ -25,10 +24,19 @@ function t(t) {
25
24
  };
26
25
  }
27
26
  var n = /^[A-Z_]\w{0,62}$/i;
28
- function r(e) {
29
- return e.basic.isAllInitiationAllowed ? [] : e.initiators.filter((e) => e.ids.length > 0);
27
+ function r(e, t) {
28
+ let n = e.matchAll(/\{\{(?<action>[\s\S]*?)\}\}/g).map((e) => e.groups?.action?.trim() ?? "").toArray();
29
+ if (n.some((e) => !/^\$?\.[\p{L}\p{N}_.]+$/u.test(e))) return;
30
+ let r = new Set(t.map((e) => e.key));
31
+ for (let e of n) {
32
+ let t = /^\$?\.formData\.(?<key>[^.]+)/u.exec(e)?.groups?.key;
33
+ if (t && !r.has(t)) return t;
34
+ }
30
35
  }
31
36
  function i(e) {
37
+ return e.basic.isAllInitiationAllowed ? [] : e.initiators.filter((e) => e.ids.length > 0);
38
+ }
39
+ function a(e) {
32
40
  if (!e) return !1;
33
41
  let t = [
34
42
  e.tableName,
@@ -41,4 +49,4 @@ function i(e) {
41
49
  return e.keyColumns.length > 0 && e.instanceIdColumn !== void 0 && e.instanceIdColumn !== "" && t.every((e) => n.test(e)) && Object.values(e.statusMapping ?? {}).every((e) => e === void 0 || e.trim() !== "");
42
50
  }
43
51
  //#endregion
44
- export { n as BUSINESS_IDENTIFIER_PATTERN, e as EMPTY_FLOW_DEFINITION, t as createEmptyDraft, r as initiatorsForSubmit, i as isBindingValid };
52
+ export { n as BUSINESS_IDENTIFIER_PATTERN, e as EMPTY_FLOW_DEFINITION, t as createEmptyDraft, i as initiatorsForSubmit, a as isBindingValid, r as missingTitleField };
@@ -0,0 +1,135 @@
1
+ /*! @vef-framework-react/approval v2.31.0 made by Venus | 2026-11-19T01:43:39.549Z */
2
+ import { fetchFlows as e } from "../../../api/flow-api.js";
3
+ import { VOID_REQUEST_KIND as t } from "../../../types/void.js";
4
+ import { useApiClient as n, useInfiniteQuery as r, useQuery as i } from "@vef-framework-react/core";
5
+ import { useMemo as a, useState as o, useSyncExternalStore as s } from "react";
6
+ import { Card as c, Labeled as l, Radio as u, SYMBOL_PAGINATION as d, Select as f, Stack as p, Text as m } from "@vef-framework-react/components";
7
+ import { jsx as h, jsxs as g } from "@emotion/react/jsx-runtime";
8
+ //#region src/pages/flow-page/designer/void-policy.tsx
9
+ var _ = 30, v = 256, y = [
10
+ {
11
+ label: "不允许作废",
12
+ value: "disabled"
13
+ },
14
+ {
15
+ label: "直接作废",
16
+ value: "direct"
17
+ },
18
+ {
19
+ label: "审批后作废",
20
+ value: "approval"
21
+ }
22
+ ];
23
+ function b(e, n, r) {
24
+ return {
25
+ tenantId: e,
26
+ includeShared: !0,
27
+ businessKind: t,
28
+ keyword: r,
29
+ [d]: {
30
+ page: n,
31
+ size: _
32
+ }
33
+ };
34
+ }
35
+ function x(t, r) {
36
+ let o = n(), s = a(() => o.createQueryFn("approval_selected_void_flow", ({ post: t }) => async (n) => {
37
+ for (let r = 1;; r++) {
38
+ let i = await e(t, b(n.tenantId, r)), a = i.items.find((e) => e.code === n.code && e.businessKind === "approval.void_request");
39
+ if (a) return a;
40
+ if (i.items.length === 0 || r * _ >= i.total) return null;
41
+ }
42
+ }), [o]);
43
+ return i({
44
+ queryFn: s,
45
+ queryKey: [s.key, {
46
+ tenantId: t,
47
+ code: r ?? ""
48
+ }],
49
+ enabled: !!r
50
+ });
51
+ }
52
+ function S(e) {
53
+ return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
54
+ }
55
+ function C({ tenantId: t, targetCode: i, value: c, selected: l, onChange: u }) {
56
+ let d = n(), p = s(S, () => Math.min(v, Math.floor(window.innerHeight * .45)), () => v), m = a(() => d.createQueryFn("approval_void_flow_options", ({ post: t }) => (n, r) => e(t, b(n.tenantId, r, n.keyword))), [d]), [g, y] = o(""), x = r({
57
+ queryKey: [m.key, {
58
+ tenantId: t,
59
+ keyword: g
60
+ }],
61
+ initialPageParam: 1,
62
+ queryFn: m,
63
+ getNextPageParam: (e, t) => e.items.length > 0 && t.length * _ < e.total ? t.length + 1 : void 0
64
+ }), C = /* @__PURE__ */ new Map(), w = x.data?.pages.flatMap((e) => e.items) ?? [];
65
+ l && w.unshift(l);
66
+ for (let e of w) e.businessKind === "approval.void_request" && e.code !== i && C.set(e.code, e.name);
67
+ return /* @__PURE__ */ h(f, {
68
+ "aria-label": "作废申请流程",
69
+ listHeight: p,
70
+ loading: x.isFetching,
71
+ options: [...C].map(([e, t]) => ({
72
+ value: e,
73
+ label: t
74
+ })),
75
+ placeholder: "搜索作废申请流程",
76
+ showSearch: {
77
+ filterOption: !1,
78
+ onSearch: y
79
+ },
80
+ value: c && C.has(c) ? c : void 0,
81
+ onChange: u,
82
+ onPopupScroll: (e) => {
83
+ let t = e.currentTarget;
84
+ x.hasNextPage && !x.isFetching && t.scrollTop + t.clientHeight >= t.scrollHeight - 12 && x.fetchNextPage();
85
+ }
86
+ });
87
+ }
88
+ function w(e, t, n) {
89
+ let r = e.voidPolicy ?? "disabled";
90
+ if (y.every((e) => e.value !== r)) return "请选择有效的作废方式";
91
+ if (r !== "disabled" && t === !1) return "该业务类型不支持作废";
92
+ if (r !== "approval" && e.voidFlowCode) return "只有审批后作废可以指定作废申请流程";
93
+ if (r === "approval" && e.voidFlowCode && e.voidFlowCode === e.code.trim()) return "作废申请流程不能选择当前流程自身";
94
+ if (r === "approval" && (!e.voidFlowCode || n?.code !== e.voidFlowCode || n.businessKind !== "approval.void_request")) return "请选择本机构可用的作废申请流程";
95
+ }
96
+ function T({ basic: e, isVoidable: t, selected: n, onChange: r }) {
97
+ let i = e.voidPolicy ?? "disabled";
98
+ return /* @__PURE__ */ h(c, {
99
+ title: "作废",
100
+ children: /* @__PURE__ */ g(p, {
101
+ gap: 12,
102
+ children: [
103
+ /* @__PURE__ */ h(u.Group, {
104
+ "aria-label": "作废方式",
105
+ options: y.map((e) => ({
106
+ ...e,
107
+ disabled: e.value !== "disabled" && !t
108
+ })),
109
+ value: i,
110
+ onChange: (e) => r({
111
+ voidPolicy: e.target.value,
112
+ voidFlowCode: void 0
113
+ })
114
+ }),
115
+ t === !1 && /* @__PURE__ */ h(m, {
116
+ type: "secondary",
117
+ children: e.businessKind === "approval.void_request" ? "作废申请流程本身不能作废。" : "该业务类型不支持作废。"
118
+ }),
119
+ i === "approval" && /* @__PURE__ */ h(l, {
120
+ required: !0,
121
+ label: "作废申请流程",
122
+ children: /* @__PURE__ */ h(C, {
123
+ selected: n,
124
+ targetCode: e.code.trim(),
125
+ tenantId: e.tenantId,
126
+ value: e.voidFlowCode,
127
+ onChange: (e) => r({ voidFlowCode: e })
128
+ })
129
+ })
130
+ ]
131
+ })
132
+ });
133
+ }
134
+ //#endregion
135
+ export { T as VoidPolicySection, x as useSelectedVoidFlow, w as voidPolicyIssue };
@@ -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.0 made by Venus | 2026-11-19T01:43:39.549Z */
2
2
  import { useCategoryApi as e } from "../../api/category-api.js";
3
3
  import { useFlowApi as t } from "../../api/flow-api.js";
4
4
  import { APPROVAL_PERMISSIONS as n } from "../../permissions.js";
@@ -10,8 +10,8 @@ import { FlowVersionsDrawer as c } from "./versions.js";
10
10
  import { useMutation as l, useQuery as u } from "@vef-framework-react/core";
11
11
  import { useMemo as d, useState as f } from "react";
12
12
  import { ActionButton as p, CrudPage as m, Icon as h, OperationButton as g, PermissionGate as _, showSuccessMessage as v } from "@vef-framework-react/components";
13
- import { HistoryIcon as y, PenToolIcon as b, PlusIcon as x, PowerIcon as S, PowerOffIcon as C } from "lucide-react";
14
- import { Fragment as w, jsx as T, jsxs as E } from "@emotion/react/jsx-runtime";
13
+ import { Fragment as y, jsx as b, jsxs as x } from "@emotion/react/jsx-runtime";
14
+ import { HistoryIcon as S, PenToolIcon as C, PlusIcon as w, PowerIcon as T, PowerOffIcon as E } from "lucide-react";
15
15
  //#region src/pages/flow-page/index.tsx
16
16
  function D({ permissions: D, tenantId: O = "default", columnStorageKey: k = "approval.flow", title: A }) {
17
17
  let j = t(), M = e(), N = {
@@ -27,9 +27,9 @@ function D({ permissions: D, tenantId: O = "default", columnStorageKey: k = "app
27
27
  invalidates: [[j.findFlows.key]]
28
28
  }
29
29
  });
30
- return /* @__PURE__ */ E(w, { children: [
31
- /* @__PURE__ */ T(m, {
32
- basicSearch: /* @__PURE__ */ T(s, { categoryOptions: z }),
30
+ return /* @__PURE__ */ x(y, { children: [
31
+ /* @__PURE__ */ b(m, {
32
+ basicSearch: /* @__PURE__ */ b(s, { categoryOptions: z }),
33
33
  columnSettings: { storageKey: k },
34
34
  defaultSearchValues: { tenantId: O },
35
35
  queryFn: j.findFlows,
@@ -39,24 +39,24 @@ function D({ permissions: D, tenantId: O = "default", columnStorageKey: k = "app
39
39
  operationColumn: {
40
40
  width: 240,
41
41
  render(e) {
42
- return /* @__PURE__ */ E(w, { children: [
43
- /* @__PURE__ */ T(g, {
42
+ return /* @__PURE__ */ x(y, { children: [
43
+ /* @__PURE__ */ b(g, {
44
44
  color: "primary",
45
- icon: /* @__PURE__ */ T(h, { component: b }),
45
+ icon: /* @__PURE__ */ b(h, { component: C }),
46
46
  requiredPermissions: N.update,
47
47
  onClick: () => F(e),
48
48
  children: "设计"
49
49
  }),
50
- /* @__PURE__ */ T(g, {
51
- icon: /* @__PURE__ */ T(h, { component: y }),
50
+ /* @__PURE__ */ b(g, {
51
+ icon: /* @__PURE__ */ b(h, { component: S }),
52
52
  requiredPermissions: N.query,
53
53
  onClick: () => L(e),
54
54
  children: "版本"
55
55
  }),
56
- /* @__PURE__ */ T(g, {
56
+ /* @__PURE__ */ b(g, {
57
57
  confirmable: !0,
58
58
  color: e.isActive ? "danger" : "primary",
59
- icon: /* @__PURE__ */ T(h, { component: e.isActive ? C : S }),
59
+ icon: /* @__PURE__ */ b(h, { component: e.isActive ? E : T }),
60
60
  requiredPermissions: N.update,
61
61
  confirmDescription: e.isActive ? "停用后该流程不可再发起,进行中的实例不受影响。" : "确定启用该流程?",
62
62
  onClick: async () => {
@@ -72,23 +72,23 @@ function D({ permissions: D, tenantId: O = "default", columnStorageKey: k = "app
72
72
  ] });
73
73
  }
74
74
  },
75
- toolbarActions: /* @__PURE__ */ T(_, {
75
+ toolbarActions: /* @__PURE__ */ b(_, {
76
76
  requiredPermissions: N.create,
77
- children: /* @__PURE__ */ T(p, {
78
- icon: /* @__PURE__ */ T(h, { component: x }),
77
+ children: /* @__PURE__ */ b(p, {
78
+ icon: /* @__PURE__ */ b(h, { component: w }),
79
79
  type: "primary",
80
80
  onClick: () => F(null),
81
81
  children: "新建流程"
82
82
  })
83
83
  })
84
84
  }),
85
- /* @__PURE__ */ T(o, {
85
+ /* @__PURE__ */ b(o, {
86
86
  flow: P ?? void 0,
87
87
  open: P !== void 0,
88
88
  tenantId: O,
89
89
  onClose: () => F(void 0)
90
90
  }),
91
- /* @__PURE__ */ T(c, {
91
+ /* @__PURE__ */ b(c, {
92
92
  flow: I,
93
93
  open: I !== null,
94
94
  publishPermission: N.publish,
@@ -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.0 made by Venus | 2026-11-19T01:43:39.549Z */
2
2
  import { LabelFilterSelect as e, Select as t, useFormContext as n } from "@vef-framework-react/components";
3
3
  import { Fragment as r, jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
4
4
  //#region src/pages/flow-page/search.tsx
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
1
+ /*! @vef-framework-react/approval v2.31.0 made by Venus | 2026-11-19T01:43:39.549Z */
2
2
  import { useFlowApi as e } from "../../api/flow-api.js";
3
3
  import { formatTimestamp as t } from "../../components/format.js";
4
4
  import { VersionStatusTag as n } from "../../components/status/index.js";
@@ -1,12 +1,12 @@
1
- /*! @vef-framework-react/approval v2.30.0 made by Venus | 2026-10-16T04:17:33.743Z */
2
- import { ApprovalAdminPage as e } from "./admin-page/index.js";
3
- import { ApprovalCategoryPage as t } from "./category-page/index.js";
4
- import { ApprovalDelegationPage as n } from "./delegation-page/index.js";
5
- import { FlowDesignerDrawer as r } from "./flow-page/designer/index.js";
6
- import { FlowVersionsDrawer as i } from "./flow-page/versions.js";
7
- import { ApprovalFlowPage as a } from "./flow-page/index.js";
8
- import { StartInstanceDrawer as o } from "./initiate-page/start-drawer.js";
1
+ /*! @vef-framework-react/approval v2.31.0 made by Venus | 2026-11-19T01:43:39.549Z */
2
+ import { StartInstanceDrawer as e } from "./initiate-page/start-drawer.js";
3
+ import { ApprovalAdminPage as t } from "./admin-page/index.js";
4
+ import { ApprovalCategoryPage as n } from "./category-page/index.js";
5
+ import { ApprovalDelegationPage as r } from "./delegation-page/index.js";
6
+ import { FlowDesignerDrawer as i } from "./flow-page/designer/index.js";
7
+ import { FlowVersionsDrawer as a } from "./flow-page/versions.js";
8
+ import { ApprovalFlowPage as o } from "./flow-page/index.js";
9
9
  import { ApprovalInitiatePage as s } from "./initiate-page/index.js";
10
10
  import { ApprovalMyInstancesPage as c } from "./my-instances-page/index.js";
11
11
  import { ApprovalTaskCenterPage as l } from "./task-center-page/index.js";
12
- export { e as ApprovalAdminPage, t as ApprovalCategoryPage, n as ApprovalDelegationPage, a as ApprovalFlowPage, s as ApprovalInitiatePage, c as ApprovalMyInstancesPage, l as ApprovalTaskCenterPage, r as FlowDesignerDrawer, i as FlowVersionsDrawer, o as StartInstanceDrawer };
12
+ export { t as ApprovalAdminPage, n as ApprovalCategoryPage, r as ApprovalDelegationPage, o as ApprovalFlowPage, s as ApprovalInitiatePage, c as ApprovalMyInstancesPage, l as ApprovalTaskCenterPage, i as FlowDesignerDrawer, a as FlowVersionsDrawer, e as StartInstanceDrawer };