@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,99 +1,104 @@
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 { INSTANCE_STATUS_LABELS as e } from "../../../components/status/labels.js";
3
- import { PrincipalSelect as t } from "../../../components/principal/index.js";
4
- import { BUILTIN_INITIATOR_KINDS as n } from "../../../types/enums.js";
5
- import { Button as r, Card as i, Collapse as a, Flex as o, Grid as s, Icon as c, IconPicker as l, Input as u, Labeled as d, LabelsEditor as f, Radio as p, Select as m, Stack as h, Switch as g, Text as _, TreeSelect as v, globalCssVars as y } from "@vef-framework-react/components";
6
- import { PlusIcon as b, Trash2Icon as x } from "lucide-react";
7
- import { jsx as S, jsxs as C } from "@emotion/react/jsx-runtime";
3
+ import { BUILTIN_INITIATOR_KINDS as t } from "../../../types/enums.js";
4
+ import "../../../types/void.js";
5
+ import { PrincipalSelect as n } from "../../../components/principal/index.js";
6
+ import { VoidPolicySection as r } from "./void-policy.js";
7
+ import { useRef as i } from "react";
8
+ import { Button as a, Card as o, Collapse as s, Flex as c, Grid as l, Icon as u, IconPicker as d, Input as f, Labeled as p, LabelsEditor as m, Radio as h, Select as g, Stack as _, Switch as v, Text as y, TreeSelect as b, globalCssVars as x } from "@vef-framework-react/components";
9
+ import { Fragment as S, jsx as C, jsxs as w } from "@emotion/react/jsx-runtime";
10
+ import { PlusIcon as T, Trash2Icon as E } from "lucide-react";
11
+ import { WindowPreview as D, WindowRuleEditor as O } from "@vef-framework-react/calendar";
8
12
  //#region src/pages/flow-page/designer/basic-step.tsx
9
- function w({ initiators: e, kinds: n, onChange: i }) {
10
- let a = new Map(n.map((e) => [e.kind, e])), s = n.map((e) => ({
13
+ function k({ initiators: e, kinds: t, onChange: r }) {
14
+ let i = new Map(t.map((e) => [e.kind, e])), o = t.map((e) => ({
11
15
  label: e.label,
12
16
  value: e.kind
13
17
  }));
14
- function l(t, n) {
15
- i(e.map((e, r) => r === t ? {
18
+ function s(t, n) {
19
+ r(e.map((e, r) => r === t ? {
16
20
  ...e,
17
21
  ...n
18
22
  } : e));
19
23
  }
20
- return /* @__PURE__ */ C(h, {
24
+ return /* @__PURE__ */ w(_, {
21
25
  gap: 8,
22
- children: [e.map((n, u) => {
23
- let d = a.get(n.kind);
24
- return /* @__PURE__ */ C(o, {
26
+ children: [e.map((t, l) => {
27
+ let d = i.get(t.kind);
28
+ return /* @__PURE__ */ w(c, {
25
29
  align: "center",
26
30
  gap: "small",
27
31
  children: [
28
- /* @__PURE__ */ S(m, {
29
- options: s,
32
+ /* @__PURE__ */ C(g, {
33
+ options: o,
30
34
  style: {
31
35
  width: 120,
32
36
  flexShrink: 0
33
37
  },
34
- value: n.kind,
35
- onChange: (e) => l(u, {
38
+ value: t.kind,
39
+ onChange: (e) => s(l, {
36
40
  kind: e,
37
41
  ids: []
38
42
  })
39
43
  }),
40
- /* @__PURE__ */ S("div", {
44
+ /* @__PURE__ */ C("div", {
41
45
  style: {
42
46
  flex: 1,
43
47
  minWidth: 0
44
48
  },
45
- children: d === void 0 ? /* @__PURE__ */ S("span", {
46
- style: { color: y.colorErrorText },
47
- children: `当前应用未注册该类型:${n.kind}`
48
- }) : d.selection === "none" ? /* @__PURE__ */ S("span", {
49
- style: { color: y.colorTextTertiary },
49
+ children: d === void 0 ? /* @__PURE__ */ C("span", {
50
+ style: { color: x.colorErrorText },
51
+ children: `当前应用未注册该类型:${t.kind}`
52
+ }) : d.selection === "none" ? /* @__PURE__ */ C("span", {
53
+ style: { color: x.colorTextTertiary },
50
54
  children: "该类型按发起人自动解析,无需选择"
51
- }) : /* @__PURE__ */ S(t, {
52
- kind: n.kind,
55
+ }) : /* @__PURE__ */ C(n, {
56
+ kind: t.kind,
53
57
  selection: d.selection,
54
- value: n.ids,
55
- onChange: (e) => l(u, { ids: e })
58
+ value: t.ids,
59
+ onChange: (e) => s(l, { ids: e })
56
60
  })
57
61
  }),
58
- /* @__PURE__ */ S(r, {
59
- icon: /* @__PURE__ */ S(c, { component: x }),
60
- onClick: () => i(e.filter((e, t) => t !== u))
62
+ /* @__PURE__ */ C(a, {
63
+ icon: /* @__PURE__ */ C(u, { component: E }),
64
+ onClick: () => r(e.filter((e, t) => t !== l))
61
65
  })
62
66
  ]
63
- }, u);
64
- }), /* @__PURE__ */ S(r, {
67
+ }, l);
68
+ }), /* @__PURE__ */ C(a, {
65
69
  block: !0,
66
- icon: /* @__PURE__ */ S(c, { component: b }),
70
+ icon: /* @__PURE__ */ C(u, { component: T }),
67
71
  type: "dashed",
68
- onClick: () => i([...e, {
69
- kind: n[0]?.kind ?? "user",
72
+ onClick: () => r([...e, {
73
+ kind: t[0]?.kind ?? "user",
70
74
  ids: []
71
75
  }]),
72
76
  children: "添加发起规则"
73
77
  })]
74
78
  });
75
79
  }
76
- var T = [
80
+ var A = [
77
81
  "running",
78
82
  "approved",
79
83
  "rejected",
80
84
  "withdrawn",
81
85
  "returned",
82
- "terminated"
86
+ "terminated",
87
+ "voided"
83
88
  ];
84
- function E({ binding: t, onChange: n }) {
85
- return /* @__PURE__ */ C(h, {
89
+ function j({ binding: t, onChange: n }) {
90
+ return /* @__PURE__ */ w(_, {
86
91
  gap: 12,
87
- children: [/* @__PURE__ */ C(s, {
92
+ children: [/* @__PURE__ */ w(l, {
88
93
  columnGap: "small",
89
94
  rowGap: 12,
90
95
  children: [
91
- /* @__PURE__ */ S(s.Item, {
96
+ /* @__PURE__ */ C(l.Item, {
92
97
  span: 12,
93
- children: /* @__PURE__ */ S(d, {
98
+ children: /* @__PURE__ */ C(p, {
94
99
  required: !0,
95
100
  label: "业务表名",
96
- children: /* @__PURE__ */ S(u, {
101
+ children: /* @__PURE__ */ C(f, {
97
102
  placeholder: "如 biz_purchase_order",
98
103
  value: t.tableName,
99
104
  onChange: (e) => n({
@@ -103,13 +108,13 @@ function E({ binding: t, onChange: n }) {
103
108
  })
104
109
  })
105
110
  }),
106
- /* @__PURE__ */ S(s.Item, {
111
+ /* @__PURE__ */ C(l.Item, {
107
112
  span: 12,
108
- children: /* @__PURE__ */ S(d, {
113
+ children: /* @__PURE__ */ C(p, {
109
114
  required: !0,
110
115
  hint: "必须与业务表上的主键或唯一键完全一致",
111
116
  label: "记录键列",
112
- children: /* @__PURE__ */ S(m, {
117
+ children: /* @__PURE__ */ C(g, {
113
118
  mode: "tags",
114
119
  open: !1,
115
120
  placeholder: "输入列名,回车添加",
@@ -122,12 +127,12 @@ function E({ binding: t, onChange: n }) {
122
127
  })
123
128
  })
124
129
  }),
125
- /* @__PURE__ */ S(s.Item, {
130
+ /* @__PURE__ */ C(l.Item, {
126
131
  span: 12,
127
- children: /* @__PURE__ */ S(d, {
132
+ children: /* @__PURE__ */ C(p, {
128
133
  required: !0,
129
134
  label: "状态列",
130
- children: /* @__PURE__ */ S(u, {
135
+ children: /* @__PURE__ */ C(f, {
131
136
  placeholder: "如 approval_status",
132
137
  value: t.statusColumn,
133
138
  onChange: (e) => n({
@@ -137,13 +142,13 @@ function E({ binding: t, onChange: n }) {
137
142
  })
138
143
  })
139
144
  }),
140
- /* @__PURE__ */ S(s.Item, {
145
+ /* @__PURE__ */ C(l.Item, {
141
146
  span: 12,
142
- children: /* @__PURE__ */ S(d, {
147
+ children: /* @__PURE__ */ C(p, {
143
148
  required: !0,
144
149
  hint: "防止过期实例覆盖新一轮审批的写入",
145
150
  label: "实例 ID 列",
146
- children: /* @__PURE__ */ S(u, {
151
+ children: /* @__PURE__ */ C(f, {
147
152
  placeholder: "如 approval_instance_id",
148
153
  value: t.instanceIdColumn ?? "",
149
154
  onChange: (e) => n({
@@ -153,11 +158,11 @@ function E({ binding: t, onChange: n }) {
153
158
  })
154
159
  })
155
160
  }),
156
- /* @__PURE__ */ S(s.Item, {
161
+ /* @__PURE__ */ C(l.Item, {
157
162
  span: 12,
158
- children: /* @__PURE__ */ S(d, {
163
+ children: /* @__PURE__ */ C(p, {
159
164
  label: "开始时间列",
160
- children: /* @__PURE__ */ S(u, {
165
+ children: /* @__PURE__ */ C(f, {
161
166
  placeholder: "可选",
162
167
  value: t.startedAtColumn ?? "",
163
168
  onChange: (e) => n({
@@ -167,11 +172,11 @@ function E({ binding: t, onChange: n }) {
167
172
  })
168
173
  })
169
174
  }),
170
- /* @__PURE__ */ S(s.Item, {
175
+ /* @__PURE__ */ C(l.Item, {
171
176
  span: 12,
172
- children: /* @__PURE__ */ S(d, {
177
+ children: /* @__PURE__ */ C(p, {
173
178
  label: "完成时间列",
174
- children: /* @__PURE__ */ S(u, {
179
+ children: /* @__PURE__ */ C(f, {
175
180
  placeholder: "可选",
176
181
  value: t.finishedAtColumn ?? "",
177
182
  onChange: (e) => n({
@@ -182,19 +187,19 @@ function E({ binding: t, onChange: n }) {
182
187
  })
183
188
  })
184
189
  ]
185
- }), /* @__PURE__ */ S(a, {
190
+ }), /* @__PURE__ */ C(s, {
186
191
  ghost: !0,
187
192
  items: [{
188
193
  key: "statusMapping",
189
194
  label: "状态映射(可选,缺省写入状态原文)",
190
- children: /* @__PURE__ */ S(s, {
195
+ children: /* @__PURE__ */ C(l, {
191
196
  columnGap: "small",
192
197
  rowGap: 12,
193
- children: T.map((r) => /* @__PURE__ */ S(s.Item, {
198
+ children: A.map((r) => /* @__PURE__ */ C(l.Item, {
194
199
  span: 8,
195
- children: /* @__PURE__ */ S(d, {
200
+ children: /* @__PURE__ */ C(p, {
196
201
  label: e[r],
197
- children: /* @__PURE__ */ S(u, {
202
+ children: /* @__PURE__ */ C(f, {
198
203
  placeholder: r,
199
204
  value: t.statusMapping?.[r] ?? "",
200
205
  onChange: (e) => {
@@ -212,14 +217,15 @@ function E({ binding: t, onChange: n }) {
212
217
  })]
213
218
  });
214
219
  }
215
- var D = {
220
+ var M = {
216
221
  tableName: "",
217
222
  keyColumns: [],
218
223
  statusColumn: "",
219
224
  instanceIdColumn: void 0
220
225
  };
221
- function O({ basic: e, initiators: r, initiatorKinds: a, categoryOptions: c, isEditing: m, onBasicChange: b, onInitiatorsChange: x }) {
222
- return /* @__PURE__ */ C(h, {
226
+ function N({ basic: e, businessKinds: a, loadingBusinessKinds: s, businessKindsError: u, isVoidable: T, selectedVoidFlow: E, initiators: A, initiatorKinds: N, categoryOptions: P, isEditing: F, onBasicChange: I, onInitiatorsChange: L }) {
227
+ let R = i(e.initiationWindow);
228
+ return /* @__PURE__ */ w(_, {
223
229
  gap: 16,
224
230
  style: {
225
231
  maxWidth: 920,
@@ -227,179 +233,229 @@ function O({ basic: e, initiators: r, initiatorKinds: a, categoryOptions: c, isE
227
233
  width: "100%"
228
234
  },
229
235
  children: [
230
- /* @__PURE__ */ S(i, {
236
+ /* @__PURE__ */ C(o, {
231
237
  title: "基本信息",
232
- children: /* @__PURE__ */ C(s, {
238
+ children: /* @__PURE__ */ w(l, {
233
239
  columnGap: "small",
234
240
  rowGap: 12,
235
241
  children: [
236
- /* @__PURE__ */ S(s.Item, {
242
+ /* @__PURE__ */ C(l.Item, {
237
243
  span: 12,
238
- children: /* @__PURE__ */ S(d, {
244
+ children: /* @__PURE__ */ C(p, {
239
245
  required: !0,
240
- hint: m ? "流程编码创建后不可修改" : "唯一标识,创建后不可修改",
246
+ hint: F ? "流程编码创建后不可修改" : "唯一标识,创建后不可修改",
241
247
  label: "流程编码",
242
- children: /* @__PURE__ */ S(u, {
243
- disabled: m,
248
+ children: /* @__PURE__ */ C(f, {
249
+ disabled: F,
244
250
  placeholder: "如 leave-request",
245
251
  value: e.code,
246
- onChange: (e) => b({ code: e.target.value })
252
+ onChange: (e) => I({ code: e.target.value })
247
253
  })
248
254
  })
249
255
  }),
250
- /* @__PURE__ */ S(s.Item, {
256
+ /* @__PURE__ */ C(l.Item, {
251
257
  span: 12,
252
- children: /* @__PURE__ */ S(d, {
258
+ children: /* @__PURE__ */ C(p, {
253
259
  required: !0,
254
260
  label: "流程名称",
255
- children: /* @__PURE__ */ S(u, {
261
+ children: /* @__PURE__ */ C(f, {
256
262
  placeholder: "如 请假审批",
257
263
  value: e.name,
258
- onChange: (e) => b({ name: e.target.value })
264
+ onChange: (e) => I({ name: e.target.value })
259
265
  })
260
266
  })
261
267
  }),
262
- /* @__PURE__ */ S(s.Item, {
268
+ /* @__PURE__ */ C(l.Item, {
263
269
  span: 12,
264
- children: /* @__PURE__ */ S(d, {
270
+ children: /* @__PURE__ */ C(p, {
265
271
  required: !0,
266
272
  label: "所属分类",
267
- children: /* @__PURE__ */ S(v, {
273
+ children: /* @__PURE__ */ C(b, {
268
274
  placeholder: "选择流程分类",
269
275
  style: { width: "100%" },
270
- treeData: c,
276
+ treeData: P,
271
277
  value: e.categoryId || void 0,
272
- onChange: (e) => b({ categoryId: e })
278
+ onChange: (e) => I({ categoryId: e })
273
279
  })
274
280
  })
275
281
  }),
276
- /* @__PURE__ */ S(s.Item, {
282
+ /* @__PURE__ */ C(l.Item, {
277
283
  span: 12,
278
- children: /* @__PURE__ */ S(d, {
284
+ children: /* @__PURE__ */ C(p, {
279
285
  label: "图标",
280
- children: /* @__PURE__ */ S(l, {
286
+ children: /* @__PURE__ */ C(d, {
281
287
  allowClear: !0,
282
288
  placeholder: "选择图标(可选)",
283
289
  style: { width: "100%" },
284
290
  value: e.icon,
285
- onChange: (e) => b({ icon: e ?? void 0 })
291
+ onChange: (e) => I({ icon: e ?? void 0 })
286
292
  })
287
293
  })
288
294
  }),
289
- /* @__PURE__ */ S(s.Item, {
295
+ /* @__PURE__ */ C(l.Item, {
290
296
  span: 24,
291
- children: /* @__PURE__ */ S(d, {
297
+ children: /* @__PURE__ */ C(p, {
292
298
  label: "全局流程",
293
- hint: m ? "创建后不可修改" : "开启后所有机构都可发起,审批人与抄送人可以指定其他机构的用户或部门。创建后不可修改",
294
- children: /* @__PURE__ */ S(g, {
299
+ hint: F ? "创建后不可修改" : "开启后所有机构都可发起,审批人与抄送人可以指定其他机构的用户或部门。创建后不可修改",
300
+ children: /* @__PURE__ */ C(v, {
295
301
  checked: e.isShared,
296
- disabled: m,
297
- onChange: (e) => b({ isShared: e })
302
+ disabled: F,
303
+ onChange: (e) => I({ isShared: e })
298
304
  })
299
305
  })
300
306
  }),
301
- /* @__PURE__ */ S(s.Item, {
307
+ /* @__PURE__ */ C(l.Item, {
302
308
  span: 24,
303
- children: /* @__PURE__ */ S(d, {
309
+ children: /* @__PURE__ */ C(p, {
304
310
  required: !0,
305
311
  hint: "支持 {{.flowName}} / {{.instanceNo}} / {{.applicantName}} / {{.formData.字段}} 模板变量",
306
312
  label: "单据标题模板",
307
- children: /* @__PURE__ */ S(u, {
313
+ children: /* @__PURE__ */ C(f, {
308
314
  placeholder: "如 {{.applicantName}}的请假申请({{.instanceNo}})",
309
315
  value: e.instanceTitleTemplate,
310
- onChange: (e) => b({ instanceTitleTemplate: e.target.value })
316
+ onChange: (e) => I({ instanceTitleTemplate: e.target.value })
311
317
  })
312
318
  })
313
319
  }),
314
- /* @__PURE__ */ S(s.Item, {
320
+ /* @__PURE__ */ C(l.Item, {
315
321
  span: 24,
316
- children: /* @__PURE__ */ S(d, {
322
+ children: /* @__PURE__ */ C(p, {
317
323
  label: "流程描述",
318
- children: /* @__PURE__ */ S(u.TextArea, {
324
+ children: /* @__PURE__ */ C(f.TextArea, {
319
325
  maxLength: 500,
320
326
  placeholder: "描述该流程的用途(可选)",
321
327
  rows: 2,
322
328
  value: e.description ?? "",
323
- onChange: (e) => b({ description: e.target.value || void 0 })
329
+ onChange: (e) => I({ description: e.target.value || void 0 })
324
330
  })
325
331
  })
326
332
  }),
327
- /* @__PURE__ */ S(s.Item, {
333
+ /* @__PURE__ */ C(l.Item, {
328
334
  span: 24,
329
- children: /* @__PURE__ */ S(d, {
335
+ children: /* @__PURE__ */ C(p, {
330
336
  hint: "管理员可作为空审批人/超时的兜底处理人",
331
337
  label: "流程管理员",
332
- children: /* @__PURE__ */ S(t, {
338
+ children: /* @__PURE__ */ C(n, {
333
339
  kind: "user",
334
340
  value: e.adminUserIds,
335
- onChange: (e) => b({ adminUserIds: e })
341
+ onChange: (e) => I({ adminUserIds: e })
336
342
  })
337
343
  })
338
344
  })
339
345
  ]
340
346
  })
341
347
  }),
342
- /* @__PURE__ */ S(i, {
348
+ /* @__PURE__ */ C(o, {
343
349
  title: "流程标签",
344
- children: /* @__PURE__ */ C(h, {
350
+ children: /* @__PURE__ */ w(_, {
345
351
  gap: 8,
346
- children: [/* @__PURE__ */ S(_, {
347
- style: { fontSize: y.fontSizeSm },
352
+ children: [/* @__PURE__ */ C(y, {
353
+ style: { fontSize: x.fontSizeSm },
348
354
  type: "secondary",
349
355
  children: "标签用于业务方自定义筛选,例如所属应用(app: crm)或移动端可发起(mobile)。列表与发起接口均支持按标签过滤。"
350
- }), /* @__PURE__ */ S(f, {
356
+ }), /* @__PURE__ */ C(m, {
351
357
  value: e.labels,
352
- onChange: (e) => b({ labels: e })
358
+ onChange: (e) => I({ labels: e })
353
359
  })]
354
360
  })
355
361
  }),
356
- /* @__PURE__ */ S(i, {
362
+ /* @__PURE__ */ C(o, {
357
363
  title: "发起权限",
358
- children: /* @__PURE__ */ C(h, {
364
+ children: /* @__PURE__ */ w(_, {
359
365
  gap: 12,
360
- children: [/* @__PURE__ */ C(o, {
366
+ children: [/* @__PURE__ */ w(c, {
361
367
  align: "center",
362
368
  gap: "small",
363
- children: [/* @__PURE__ */ S(g, {
369
+ children: [/* @__PURE__ */ C(v, {
364
370
  checked: e.isAllInitiationAllowed,
365
- onChange: (e) => b({ isAllInitiationAllowed: e })
366
- }), /* @__PURE__ */ S(_, { children: "所有人可发起" })]
367
- }), !e.isAllInitiationAllowed && /* @__PURE__ */ S(w, {
368
- initiators: r,
369
- kinds: a ?? n,
370
- onChange: x
371
+ onChange: (e) => I({ isAllInitiationAllowed: e })
372
+ }), /* @__PURE__ */ C(y, { children: "所有人可发起" })]
373
+ }), !e.isAllInitiationAllowed && /* @__PURE__ */ C(k, {
374
+ initiators: A,
375
+ kinds: N ?? t,
376
+ onChange: L
371
377
  })]
372
378
  })
373
379
  }),
374
- /* @__PURE__ */ S(i, {
375
- title: "业务绑定",
376
- children: /* @__PURE__ */ C(h, {
380
+ /* @__PURE__ */ C(r, {
381
+ basic: e,
382
+ isVoidable: T,
383
+ selected: E,
384
+ onChange: I
385
+ }),
386
+ /* @__PURE__ */ C(o, {
387
+ title: "发起时段",
388
+ children: /* @__PURE__ */ w(_, {
389
+ gap: 12,
390
+ children: [/* @__PURE__ */ C(h.Group, {
391
+ "aria-label": "发起时段",
392
+ options: [{
393
+ label: "不限",
394
+ value: "any"
395
+ }, {
396
+ label: "限定时段",
397
+ value: "limited"
398
+ }],
399
+ optionType: "button",
400
+ value: e.initiationWindow ? "limited" : "any",
401
+ onChange: (t) => {
402
+ R.current = e.initiationWindow ?? R.current, I({ initiationWindow: t.target.value === "limited" ? R.current ?? { windows: [{}] } : void 0 });
403
+ }
404
+ }), e.initiationWindow && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(O, {
405
+ value: e.initiationWindow,
406
+ onChange: (e) => I({ initiationWindow: e })
407
+ }), /* @__PURE__ */ C(D, { rule: e.initiationWindow })] })]
408
+ })
409
+ }),
410
+ /* @__PURE__ */ C(o, {
411
+ title: "业务类型",
412
+ children: /* @__PURE__ */ w(_, {
377
413
  gap: 12,
378
414
  children: [
379
- /* @__PURE__ */ S(p.Group, {
380
- optionType: "button",
381
- value: e.bindingMode,
382
- options: [{
383
- label: "独立存储",
384
- value: "standalone"
385
- }, {
386
- label: "绑定业务表",
387
- value: "business"
388
- }],
415
+ /* @__PURE__ */ C(g, {
416
+ allowClear: !0,
417
+ "aria-busy": s,
418
+ "aria-label": "业务类型",
419
+ loading: s,
420
+ options: a?.map((e) => ({
421
+ value: e.kind,
422
+ label: e.label
423
+ })),
424
+ placeholder: "使用流程表单",
425
+ showSearch: { optionFilterProp: "label" },
426
+ value: e.businessKind,
389
427
  onChange: (e) => {
390
- let t = e.target.value;
391
- (t === "standalone" || t === "business") && b({ bindingMode: t });
428
+ I({
429
+ businessKind: e,
430
+ businessBinding: void 0,
431
+ ...!(!e || e !== "approval.void_request" && a?.some((t) => t.kind === e && t.isVoidable)) && {
432
+ voidPolicy: "disabled",
433
+ voidFlowCode: void 0
434
+ }
435
+ });
392
436
  }
393
437
  }),
394
- /* @__PURE__ */ S(_, {
395
- style: { fontSize: y.fontSizeSm },
396
- type: "secondary",
397
- children: e.bindingMode === "standalone" ? "表单数据存储在审批系统内,适合独立审批单。" : "审批状态回写到既有业务表,业务记录是事实源,审批引擎按版本快照投影状态。"
438
+ u && /* @__PURE__ */ C(y, {
439
+ role: "alert",
440
+ type: "danger",
441
+ children: `业务类型加载失败:${u}`
398
442
  }),
399
- e.bindingMode === "business" && /* @__PURE__ */ S(E, {
400
- binding: e.businessBinding ?? D,
401
- onChange: (e) => b({ businessBinding: e })
402
- })
443
+ e.businessKind && !a?.some((t) => t.kind === e.businessKind) && a && /* @__PURE__ */ C(y, {
444
+ type: "danger",
445
+ children: "该业务类型已不可用,请重新选择。"
446
+ }),
447
+ e.businessKind && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w(c, {
448
+ align: "center",
449
+ gap: "small",
450
+ children: [/* @__PURE__ */ C(v, {
451
+ "aria-label": "回写审批状态到业务表",
452
+ checked: !!e.businessBinding,
453
+ onChange: (e) => I({ businessBinding: e ? M : void 0 })
454
+ }), /* @__PURE__ */ C(y, { children: "回写审批状态到业务表" })]
455
+ }), e.businessBinding && /* @__PURE__ */ C(j, {
456
+ binding: e.businessBinding,
457
+ onChange: (e) => I({ businessBinding: e })
458
+ })] })
403
459
  ]
404
460
  })
405
461
  })
@@ -407,4 +463,4 @@ function O({ basic: e, initiators: r, initiatorKinds: a, categoryOptions: c, isE
407
463
  });
408
464
  }
409
465
  //#endregion
410
- export { O as BasicStep };
466
+ export { N as BasicStep };
@@ -0,0 +1,47 @@
1
+ /*! @vef-framework-react/approval v2.31.0 made by Venus | 2026-11-19T01:43:39.549Z */
2
+ import { Card as e, Table as t, Text as n } from "@vef-framework-react/components";
3
+ import { jsx as r } from "@emotion/react/jsx-runtime";
4
+ //#region src/pages/flow-page/designer/field-catalog.tsx
5
+ var i = {
6
+ input: "单行文本",
7
+ textarea: "多行文本",
8
+ number: "数字",
9
+ date: "日期",
10
+ select: "选项",
11
+ upload: "附件",
12
+ table: "明细表"
13
+ };
14
+ function a({ fields: a, title: o }) {
15
+ return /* @__PURE__ */ r(e, {
16
+ title: o,
17
+ children: /* @__PURE__ */ r(t, {
18
+ dataSource: a,
19
+ expandable: { childrenColumnName: "columns" },
20
+ locale: { emptyText: "暂无字段" },
21
+ pagination: !1,
22
+ rowKey: "key",
23
+ size: "small",
24
+ columns: [
25
+ {
26
+ title: "名称",
27
+ dataIndex: "label"
28
+ },
29
+ {
30
+ title: "字段键",
31
+ dataIndex: "key",
32
+ render: (e) => /* @__PURE__ */ r(n, {
33
+ code: !0,
34
+ children: e
35
+ })
36
+ },
37
+ {
38
+ title: "类型",
39
+ dataIndex: "kind",
40
+ render: (e) => i[e]
41
+ }
42
+ ]
43
+ })
44
+ });
45
+ }
46
+ //#endregion
47
+ export { a as FieldCatalog };
@@ -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 { globalCssVars as e } from "@vef-framework-react/components";
3
3
  import { jsx as t } from "@emotion/react/jsx-runtime";
4
4
  import { ApprovalFlowEditor as n } from "@vef-framework-react/approval-flow-editor";