@vef-framework-react/approval 2.24.1 → 2.25.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 (77) hide show
  1. package/dist/cjs/components/detail/admin.cjs +1 -1
  2. package/dist/cjs/components/detail/index.cjs +1 -1
  3. package/dist/cjs/components/form-panel/index.cjs +1 -1
  4. package/dist/cjs/pages/flow-page/designer/flow-step.cjs +1 -1
  5. package/dist/cjs/pages/flow-page/designer/form-step.cjs +1 -1
  6. package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
  7. package/dist/cjs/pages/initiate-page/start-drawer.cjs +1 -1
  8. package/dist/cjs/plugins/form-context.cjs +1 -0
  9. package/dist/es/api/admin-api.js +1 -1
  10. package/dist/es/api/category-api.js +1 -1
  11. package/dist/es/api/delegation-api.js +1 -1
  12. package/dist/es/api/flow-api.js +1 -1
  13. package/dist/es/api/index.js +1 -1
  14. package/dist/es/api/instance-api.js +1 -1
  15. package/dist/es/api/my-api.js +1 -1
  16. package/dist/es/api/query.js +1 -1
  17. package/dist/es/components/action-dialog/index.js +1 -1
  18. package/dist/es/components/detail/action-modals.js +1 -1
  19. package/dist/es/components/detail/admin.js +3 -1
  20. package/dist/es/components/detail/drawer.js +1 -1
  21. package/dist/es/components/detail/index.js +3 -1
  22. package/dist/es/components/flow-graph/index.js +1 -1
  23. package/dist/es/components/flow-graph/node.js +1 -1
  24. package/dist/es/components/flow-graph/people-overlay.js +1 -1
  25. package/dist/es/components/flow-graph/people.js +1 -1
  26. package/dist/es/components/form-panel/index.js +23 -20
  27. package/dist/es/components/format.js +1 -1
  28. package/dist/es/components/icon.js +1 -1
  29. package/dist/es/components/index.js +1 -1
  30. package/dist/es/components/principal/index.js +1 -1
  31. package/dist/es/components/status/colors.js +1 -1
  32. package/dist/es/components/status/index.js +1 -1
  33. package/dist/es/components/status/labels.js +1 -1
  34. package/dist/es/components/timeline/index.js +1 -1
  35. package/dist/es/components/user/index.js +1 -1
  36. package/dist/es/index.js +1 -1
  37. package/dist/es/pages/admin-page/index.js +1 -1
  38. package/dist/es/pages/admin-page/instances.js +1 -1
  39. package/dist/es/pages/admin-page/metrics.js +1 -1
  40. package/dist/es/pages/admin-page/projections.js +1 -1
  41. package/dist/es/pages/admin-page/tasks.js +1 -1
  42. package/dist/es/pages/category-page/columns.js +1 -1
  43. package/dist/es/pages/category-page/form.js +1 -1
  44. package/dist/es/pages/category-page/index.js +1 -1
  45. package/dist/es/pages/delegation-page/columns.js +1 -1
  46. package/dist/es/pages/delegation-page/form.js +1 -1
  47. package/dist/es/pages/delegation-page/index.js +1 -1
  48. package/dist/es/pages/flow-page/columns.js +1 -1
  49. package/dist/es/pages/flow-page/designer/basic-step.js +1 -1
  50. package/dist/es/pages/flow-page/designer/flow-step.js +16 -34
  51. package/dist/es/pages/flow-page/designer/form-step.js +54 -65
  52. package/dist/es/pages/flow-page/designer/index.js +197 -186
  53. package/dist/es/pages/flow-page/designer/review-step.js +1 -1
  54. package/dist/es/pages/flow-page/designer/types.js +1 -1
  55. package/dist/es/pages/flow-page/index.js +1 -1
  56. package/dist/es/pages/flow-page/search.js +1 -1
  57. package/dist/es/pages/flow-page/versions.js +1 -1
  58. package/dist/es/pages/index.js +1 -1
  59. package/dist/es/pages/initiate-page/index.js +1 -1
  60. package/dist/es/pages/initiate-page/start-drawer.js +3 -1
  61. package/dist/es/pages/my-instances-page/index.js +1 -1
  62. package/dist/es/pages/task-center-page/index.js +1 -1
  63. package/dist/es/pages/task-center-page/search.js +1 -1
  64. package/dist/es/permissions.js +1 -1
  65. package/dist/es/plugins/form-context.js +34 -0
  66. package/dist/es/plugins/index.js +1 -1
  67. package/dist/es/types/enums.js +1 -1
  68. package/dist/es/types/index.js +1 -1
  69. package/dist/types/components/form-panel/index.d.ts +15 -3
  70. package/dist/types/index.d.ts +1 -0
  71. package/dist/types/pages/flow-page/designer/flow-step.d.ts +6 -5
  72. package/dist/types/pages/flow-page/designer/form-step.d.ts +9 -10
  73. package/dist/types/plugins/form-context.d.ts +30 -0
  74. package/dist/types/plugins/index.d.ts +25 -5
  75. package/dist/types/types/admin.d.ts +5 -0
  76. package/dist/types/types/my.d.ts +15 -0
  77. package/package.json +7 -7
@@ -1,41 +1,23 @@
1
- /*! @vef-framework-react/approval v2.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
2
- import { Alert as e, Stack as t, globalCssVars as n } from "@vef-framework-react/components";
3
- import { jsx as r, jsxs as i } from "@emotion/react/jsx-runtime";
4
- import { ApprovalFlowEditor as a } from "@vef-framework-react/approval-flow-editor";
1
+ /*! @vef-framework-react/approval v2.25.0 made by Venus | 2026-10-13T08:59:38.583Z */
2
+ import { globalCssVars as e } from "@vef-framework-react/components";
3
+ import { jsx as t } from "@emotion/react/jsx-runtime";
4
+ import { ApprovalFlowEditor as n } from "@vef-framework-react/approval-flow-editor";
5
5
  //#region src/pages/flow-page/designer/flow-step.tsx
6
- function o({ value: o, plugins: s, errors: c, onChange: l }) {
7
- return /* @__PURE__ */ i(t, {
8
- gap: 8,
6
+ function r({ value: r, plugins: i, onChange: a }) {
7
+ return /* @__PURE__ */ t("div", {
9
8
  style: {
10
9
  height: "100%",
11
- minHeight: 0
10
+ minHeight: 0,
11
+ border: `1px solid ${e.colorBorderSecondary}`,
12
+ borderRadius: 8,
13
+ overflow: "hidden"
12
14
  },
13
- children: [c.length > 0 && /* @__PURE__ */ r(e, {
14
- showIcon: !0,
15
- title: `流程校验未通过(${c.length} 项)`,
16
- type: "error",
17
- description: /* @__PURE__ */ r("ul", {
18
- style: {
19
- margin: 0,
20
- paddingInlineStart: 18
21
- },
22
- children: c.map((e, t) => /* @__PURE__ */ r("li", { children: e.message }, t))
23
- })
24
- }), /* @__PURE__ */ r("div", {
25
- style: {
26
- flex: 1,
27
- minHeight: 0,
28
- border: `1px solid ${n.colorBorderSecondary}`,
29
- borderRadius: 8,
30
- overflow: "hidden"
31
- },
32
- children: /* @__PURE__ */ r(a, {
33
- plugins: s,
34
- value: o,
35
- onChange: l
36
- })
37
- })]
15
+ children: /* @__PURE__ */ t(n, {
16
+ plugins: i,
17
+ value: r,
18
+ onChange: a
19
+ })
38
20
  });
39
21
  }
40
22
  //#endregion
41
- export { o as FlowStep };
23
+ export { r as FlowStep };
@@ -1,87 +1,76 @@
1
- /*! @vef-framework-react/approval v2.24.1 made by Venus | 2026-09-28T10:44:14.388Z */
2
- import { Alert as e, Flex as t, Segmented as n, Stack as r, Text as i, globalCssVars as a } from "@vef-framework-react/components";
3
- import { jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
4
- import { FormEditor as c } from "@vef-framework-react/form-editor";
1
+ /*! @vef-framework-react/approval v2.25.0 made by Venus | 2026-10-13T08:59:38.583Z */
2
+ import { useApprovalPlugins as e } from "../../../plugins/index.js";
3
+ import { toFormContextSources as t } from "../../../plugins/form-context.js";
4
+ import { useMemo as n } from "react";
5
+ import { Flex as r, Segmented as i, Stack as a, Text as o, globalCssVars as s } from "@vef-framework-react/components";
6
+ import { validateApprovalProjection as c } from "@vef-framework-react/approval-form-bridge";
7
+ import { jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
8
+ import { FormEditor as d } from "@vef-framework-react/form-editor";
5
9
  //#region src/pages/flow-page/designer/form-step.tsx
6
- var l = [{
10
+ var f = [{
7
11
  label: "JSON 存储",
8
12
  value: "json"
9
13
  }, {
10
14
  label: "独立表存储",
11
15
  value: "table"
12
16
  }];
13
- function u(e) {
17
+ function p(e) {
14
18
  return e === "json" || e === "table";
15
19
  }
16
- var d = {
20
+ var m = {
17
21
  json: "表单数据以 JSONB 存入实例表,字段可灵活增减,查询能力有限。",
18
22
  table: "表单数据投影到按版本生成的独立表(明细表各自成表),适合复杂查询与数据分析。"
19
23
  };
20
- function f({ storageMode: f, initialSchema: p, issues: m, registries: h, onStorageModeChange: g, onSchemaChange: _ }) {
21
- let v = m.filter((e) => e.severity === "error"), y = m.filter((e) => e.severity !== "error");
22
- return /* @__PURE__ */ s(r, {
24
+ function h({ storageMode: h, initialSchema: g, registries: _, onStorageModeChange: v, onSchemaChange: y }) {
25
+ let { dataSourceApis: b, dataSourceResolver: x, evaluators: S, formGlobals: C } = e(), w = n(() => t(C), [C]);
26
+ return /* @__PURE__ */ u(a, {
23
27
  gap: 8,
24
28
  style: {
25
29
  height: "100%",
26
30
  minHeight: 0
27
31
  },
28
- children: [
29
- /* @__PURE__ */ s(t, {
30
- align: "center",
31
- gap: "middle",
32
- wrap: "wrap",
33
- children: [
34
- /* @__PURE__ */ o(i, {
35
- type: "secondary",
36
- children: "存储模式"
37
- }),
38
- /* @__PURE__ */ o(n, {
39
- options: l,
40
- value: f,
41
- onChange: (e) => {
42
- u(e) && g(e);
43
- }
44
- }),
45
- /* @__PURE__ */ o(i, {
46
- style: { fontSize: a.fontSizeSm },
47
- type: "secondary",
48
- children: d[f]
49
- })
50
- ]
51
- }),
52
- v.length > 0 && /* @__PURE__ */ o(e, {
53
- showIcon: !0,
54
- title: `表单校验未通过(${v.length} 项)`,
55
- type: "error",
56
- description: /* @__PURE__ */ o("ul", {
57
- style: {
58
- margin: 0,
59
- paddingInlineStart: 18
60
- },
61
- children: v.map((e, t) => /* @__PURE__ */ o("li", { children: e.message }, t))
62
- })
63
- }),
64
- v.length === 0 && y.length > 0 && /* @__PURE__ */ o(e, {
65
- showIcon: !0,
66
- title: y.map((e) => e.message).join(";"),
67
- type: "warning"
68
- }),
69
- /* @__PURE__ */ o("div", {
70
- style: {
71
- flex: 1,
72
- minHeight: 0,
73
- border: `1px solid ${a.colorBorderSecondary}`,
74
- borderRadius: 8,
75
- overflow: "hidden"
76
- },
77
- children: /* @__PURE__ */ o(c, {
78
- initialSchema: p,
79
- registries: h,
80
- onSchemaChange: _
32
+ children: [/* @__PURE__ */ u(r, {
33
+ align: "center",
34
+ gap: "middle",
35
+ wrap: "wrap",
36
+ children: [
37
+ /* @__PURE__ */ l(o, {
38
+ type: "secondary",
39
+ children: "存储模式"
40
+ }),
41
+ /* @__PURE__ */ l(i, {
42
+ options: f,
43
+ value: h,
44
+ onChange: (e) => {
45
+ p(e) && v(e);
46
+ }
47
+ }),
48
+ /* @__PURE__ */ l(o, {
49
+ style: { fontSize: s.fontSizeSm },
50
+ type: "secondary",
51
+ children: m[h]
81
52
  })
53
+ ]
54
+ }), /* @__PURE__ */ l("div", {
55
+ style: {
56
+ flex: 1,
57
+ minHeight: 0,
58
+ border: `1px solid ${s.colorBorderSecondary}`,
59
+ borderRadius: 8,
60
+ overflow: "hidden"
61
+ },
62
+ children: /* @__PURE__ */ l(d, {
63
+ contextSources: w,
64
+ dataSourceApis: b,
65
+ dataSourceResolver: x,
66
+ evaluators: S,
67
+ initialSchema: g,
68
+ registries: _,
69
+ validate: c,
70
+ onSchemaChange: y
82
71
  })
83
- ]
72
+ })]
84
73
  });
85
74
  }
86
75
  //#endregion
87
- export { f as FormStep };
76
+ export { h as FormStep };