@vef-framework-react/approval 2.27.0 → 2.29.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.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/pages/delegation-page/form.cjs +1 -1
- package/dist/cjs/pages/flow-page/columns.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/basic-step.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/form-step.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/index.cjs +1 -1
- package/dist/cjs/pages/flow-page/designer/types.cjs +1 -1
- package/dist/cjs/pages/initiate-page/index.cjs +1 -1
- package/dist/cjs/types/index.cjs +1 -1
- package/dist/es/api/admin-api.js +1 -1
- package/dist/es/api/category-api.js +1 -1
- package/dist/es/api/delegation-api.js +1 -1
- package/dist/es/api/flow-api.js +1 -1
- package/dist/es/api/index.js +1 -1
- package/dist/es/api/instance-api.js +1 -1
- package/dist/es/api/my-api.js +1 -1
- package/dist/es/api/query.js +1 -1
- package/dist/es/components/action-dialog/index.js +1 -1
- package/dist/es/components/detail/action-modals.js +1 -1
- package/dist/es/components/detail/admin.js +1 -1
- package/dist/es/components/detail/drawer.js +1 -1
- package/dist/es/components/detail/index.js +1 -1
- package/dist/es/components/flow-graph/index.js +1 -1
- package/dist/es/components/flow-graph/node.js +1 -1
- package/dist/es/components/flow-graph/people-overlay.js +1 -1
- package/dist/es/components/flow-graph/people.js +1 -1
- package/dist/es/components/form-panel/index.js +1 -1
- package/dist/es/components/format.js +1 -1
- package/dist/es/components/icon.js +1 -1
- package/dist/es/components/index.js +1 -1
- package/dist/es/components/principal/index.js +1 -1
- package/dist/es/components/status/colors.js +1 -1
- package/dist/es/components/status/index.js +1 -1
- package/dist/es/components/status/labels.js +1 -1
- package/dist/es/components/timeline/index.js +1 -1
- package/dist/es/components/user/index.js +1 -1
- package/dist/es/index.js +9 -10
- package/dist/es/pages/admin-page/index.js +1 -1
- package/dist/es/pages/admin-page/instances.js +1 -1
- package/dist/es/pages/admin-page/metrics.js +1 -1
- package/dist/es/pages/admin-page/projections.js +1 -1
- package/dist/es/pages/admin-page/tasks.js +1 -1
- package/dist/es/pages/category-page/columns.js +1 -1
- package/dist/es/pages/category-page/form.js +1 -1
- package/dist/es/pages/category-page/index.js +1 -1
- package/dist/es/pages/delegation-page/columns.js +1 -1
- package/dist/es/pages/delegation-page/form.js +2 -5
- package/dist/es/pages/delegation-page/index.js +1 -1
- package/dist/es/pages/flow-page/columns.js +9 -2
- package/dist/es/pages/flow-page/designer/basic-step.js +13 -1
- package/dist/es/pages/flow-page/designer/flow-step.js +1 -1
- package/dist/es/pages/flow-page/designer/form-step.js +7 -6
- package/dist/es/pages/flow-page/designer/index.js +106 -105
- package/dist/es/pages/flow-page/designer/review-step.js +1 -1
- package/dist/es/pages/flow-page/designer/types.js +2 -1
- package/dist/es/pages/flow-page/index.js +1 -1
- package/dist/es/pages/flow-page/search.js +1 -1
- package/dist/es/pages/flow-page/versions.js +1 -1
- package/dist/es/pages/index.js +1 -1
- package/dist/es/pages/initiate-page/index.js +3 -3
- package/dist/es/pages/initiate-page/start-drawer.js +1 -1
- package/dist/es/pages/my-instances-page/index.js +1 -1
- package/dist/es/pages/task-center-page/index.js +1 -1
- package/dist/es/pages/task-center-page/search.js +1 -1
- package/dist/es/permissions.js +1 -1
- package/dist/es/plugins/form-context.js +1 -1
- package/dist/es/plugins/index.js +1 -1
- package/dist/es/types/enums.js +1 -1
- package/dist/es/types/index.js +2 -3
- package/dist/types/pages/category-page/props.d.ts +2 -3
- package/dist/types/pages/delegation-page/form.d.ts +2 -2
- package/dist/types/pages/delegation-page/props.d.ts +2 -2
- package/dist/types/pages/flow-page/designer/basic-step.d.ts +1 -1
- package/dist/types/pages/flow-page/designer/types.d.ts +4 -0
- package/dist/types/pages/flow-page/props.d.ts +5 -5
- package/dist/types/pages/initiate-page/index.d.ts +3 -3
- package/dist/types/plugins/index.d.ts +9 -1
- package/dist/types/types/category.d.ts +2 -8
- package/dist/types/types/flow.d.ts +24 -3
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types/types/instance.d.ts +2 -1
- package/package.json +7 -7
- package/dist/cjs/types/tenancy.cjs +0 -1
- package/dist/es/types/tenancy.js +0 -5
- package/dist/types/types/tenancy.d.ts +0 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
2
2
|
import { useCategoryApi as e } from "../../api/category-api.js";
|
|
3
3
|
import { PrincipalSelect as t } from "../../components/principal/index.js";
|
|
4
4
|
import { buildCategoryTreeOptions as n } from "../category-page/form.js";
|
|
@@ -22,10 +22,7 @@ function u({ label: e, required: n, value: r, onChange: a }) {
|
|
|
22
22
|
function d({ tenantId: t }) {
|
|
23
23
|
let { AppField: o } = s(), d = e(), { data: f } = r({
|
|
24
24
|
queryFn: d.findTree,
|
|
25
|
-
queryKey: [d.findTree.key, {
|
|
26
|
-
tenantId: t,
|
|
27
|
-
includeShared: !0
|
|
28
|
-
}]
|
|
25
|
+
queryKey: [d.findTree.key, { tenantId: t }]
|
|
29
26
|
}), p = i(() => n(f ?? []), [f]);
|
|
30
27
|
return /* @__PURE__ */ l(a, {
|
|
31
28
|
columnGap: "small",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
2
2
|
import { useDelegationApi as e } from "../../api/delegation-api.js";
|
|
3
3
|
import { APPROVAL_PERMISSIONS as t } from "../../permissions.js";
|
|
4
4
|
import { delegationColumns as n } from "./columns.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
2
2
|
import { formatTimestamp as e } from "../../components/format.js";
|
|
3
3
|
import { FlowIcon as t } from "../../components/icon.js";
|
|
4
4
|
import { Flex as n, LabelsDisplay as r, Tag as i, Text as a } from "@vef-framework-react/components";
|
|
@@ -16,7 +16,14 @@ function l(c) {
|
|
|
16
16
|
render: (e, r) => /* @__PURE__ */ s(n, {
|
|
17
17
|
align: "center",
|
|
18
18
|
gap: "small",
|
|
19
|
-
children: [
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ o(t, { name: r.icon }),
|
|
21
|
+
/* @__PURE__ */ o(a, { children: e }),
|
|
22
|
+
r.isShared && /* @__PURE__ */ o(i, {
|
|
23
|
+
color: "purple",
|
|
24
|
+
children: "全局"
|
|
25
|
+
})
|
|
26
|
+
]
|
|
20
27
|
})
|
|
21
28
|
},
|
|
22
29
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
2
2
|
import { INSTANCE_STATUS_LABELS as e } from "../../../components/status/labels.js";
|
|
3
3
|
import { PrincipalSelect as t } from "../../../components/principal/index.js";
|
|
4
4
|
import { BUILTIN_INITIATOR_KINDS as n } from "../../../types/enums.js";
|
|
@@ -286,6 +286,18 @@ function O({ basic: e, initiators: r, initiatorKinds: a, categoryOptions: c, isE
|
|
|
286
286
|
})
|
|
287
287
|
})
|
|
288
288
|
}),
|
|
289
|
+
/* @__PURE__ */ S(s.Item, {
|
|
290
|
+
span: 24,
|
|
291
|
+
children: /* @__PURE__ */ S(d, {
|
|
292
|
+
label: "全局流程",
|
|
293
|
+
hint: m ? "创建后不可修改" : "开启后所有租户都可发起;审批人与抄送人不能指定具体的用户、角色或部门。创建后不可修改",
|
|
294
|
+
children: /* @__PURE__ */ S(g, {
|
|
295
|
+
checked: e.isShared,
|
|
296
|
+
disabled: m,
|
|
297
|
+
onChange: (e) => b({ isShared: e })
|
|
298
|
+
})
|
|
299
|
+
})
|
|
300
|
+
}),
|
|
289
301
|
/* @__PURE__ */ S(s.Item, {
|
|
290
302
|
span: 24,
|
|
291
303
|
children: /* @__PURE__ */ S(d, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
2
2
|
import { useApprovalPlugins as e } from "../../../plugins/index.js";
|
|
3
3
|
import { toFormContextSources as t } from "../../../plugins/form-context.js";
|
|
4
4
|
import { useMemo as n } from "react";
|
|
@@ -22,7 +22,7 @@ var m = {
|
|
|
22
22
|
table: "表单数据投影到按版本生成的独立表(明细表各自成表),适合复杂查询与数据分析。"
|
|
23
23
|
};
|
|
24
24
|
function h({ storageMode: h, initialSchema: g, registries: _, onStorageModeChange: v, onSchemaChange: y }) {
|
|
25
|
-
let {
|
|
25
|
+
let { codeSets: b, dataSourceApis: x, dataSourceResolver: S, evaluators: C, formGlobals: w } = e(), T = n(() => t(w), [w]);
|
|
26
26
|
return /* @__PURE__ */ u(a, {
|
|
27
27
|
gap: 8,
|
|
28
28
|
style: {
|
|
@@ -60,10 +60,11 @@ function h({ storageMode: h, initialSchema: g, registries: _, onStorageModeChang
|
|
|
60
60
|
overflow: "hidden"
|
|
61
61
|
},
|
|
62
62
|
children: /* @__PURE__ */ l(d, {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
codeSets: b,
|
|
64
|
+
contextSources: T,
|
|
65
|
+
dataSourceApis: x,
|
|
66
|
+
dataSourceResolver: S,
|
|
67
|
+
evaluators: C,
|
|
67
68
|
initialSchema: g,
|
|
68
69
|
registries: _,
|
|
69
70
|
validate: c,
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
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 { toEditorPlugins as n, useApprovalPlugins as r } from "../../../plugins/index.js";
|
|
5
5
|
import { buildCategoryTreeOptions as ee } from "../../category-page/form.js";
|
|
6
|
-
import "../../../types/tenancy.js";
|
|
7
6
|
import { BasicStep as i } from "./basic-step.js";
|
|
8
7
|
import { FlowStep as a } from "./flow-step.js";
|
|
9
8
|
import { FormStep as o } from "./form-step.js";
|
|
10
9
|
import { EMPTY_FLOW_DEFINITION as te, createEmptyDraft as ne, initiatorsForSubmit as s, isBindingValid as re } from "./types.js";
|
|
11
10
|
import { ReviewStep as ie } from "./review-step.js";
|
|
12
11
|
import { useMutation as c, useQuery as l } from "@vef-framework-react/core";
|
|
13
|
-
import { useCallback as u, useEffect as
|
|
14
|
-
import { Button as
|
|
15
|
-
import { projectFormSchema as
|
|
16
|
-
import { jsx as
|
|
17
|
-
import { validateFlowDefinition as
|
|
12
|
+
import { useCallback as u, useEffect as ae, useMemo as d, useState as f } from "react";
|
|
13
|
+
import { Button as p, Drawer as m, Flex as h, Spin as oe, Steps as se, Text as ce, globalCssVars as le, showSuccessMessage as ue } from "@vef-framework-react/components";
|
|
14
|
+
import { projectFormSchema as de, validateApprovalSchema as g } from "@vef-framework-react/approval-form-bridge";
|
|
15
|
+
import { jsx as _, jsxs as v } from "@emotion/react/jsx-runtime";
|
|
16
|
+
import { validateFlowDefinition as y } from "@vef-framework-react/approval-flow-editor";
|
|
18
17
|
//#region src/pages/flow-page/designer/index.tsx
|
|
19
|
-
var
|
|
18
|
+
var b = [
|
|
20
19
|
{ title: "流程设置" },
|
|
21
20
|
{ title: "表单设计" },
|
|
22
21
|
{ title: "流程设计" },
|
|
23
22
|
{ title: "审阅提交" }
|
|
24
23
|
];
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
queryFn:
|
|
28
|
-
queryKey: [
|
|
29
|
-
}), z =
|
|
30
|
-
queryFn:
|
|
31
|
-
queryKey: [
|
|
32
|
-
enabled:
|
|
24
|
+
function x({ flow: m, tenantId: x, onClose: S }) {
|
|
25
|
+
let C = t(), w = e(), T = r(), E = m !== void 0, [D, O] = f(0), [k, A] = f(() => E ? null : ne(x)), [j, fe] = f(""), [M, N] = f(!0), [P, F] = f(!1), I = m?.tenantId ?? x, L = m?.isShared ?? k?.basic.isShared ?? !1, { data: R } = l({
|
|
26
|
+
queryFn: w.findTree,
|
|
27
|
+
queryKey: [w.findTree.key, { tenantId: I }]
|
|
28
|
+
}), z = d(() => ee(R ?? []), [R]), { data: B } = l({
|
|
29
|
+
queryFn: C.findVersions,
|
|
30
|
+
queryKey: [C.findVersions.key, { flowId: m?.id ?? "" }],
|
|
31
|
+
enabled: E
|
|
33
32
|
}), V = B?.[0]?.id, { data: H } = l({
|
|
34
|
-
queryFn:
|
|
35
|
-
queryKey: [
|
|
36
|
-
flowId:
|
|
33
|
+
queryFn: C.getGraph,
|
|
34
|
+
queryKey: [C.getGraph.key, {
|
|
35
|
+
flowId: m?.id ?? "",
|
|
37
36
|
versionId: V ?? ""
|
|
38
37
|
}],
|
|
39
|
-
enabled:
|
|
38
|
+
enabled: E && V !== void 0
|
|
40
39
|
}), { data: U } = l({
|
|
41
|
-
queryFn:
|
|
42
|
-
queryKey: [
|
|
43
|
-
enabled:
|
|
40
|
+
queryFn: C.findInitiators,
|
|
41
|
+
queryKey: [C.findInitiators.key, { flowId: m?.id ?? "" }],
|
|
42
|
+
enabled: E
|
|
44
43
|
}), { data: W } = l({
|
|
45
|
-
queryFn:
|
|
46
|
-
queryKey: [
|
|
44
|
+
queryFn: C.listKindOptions,
|
|
45
|
+
queryKey: [C.listKindOptions.key, {}],
|
|
47
46
|
staleTime: Infinity
|
|
48
47
|
});
|
|
49
|
-
|
|
50
|
-
if (!
|
|
48
|
+
ae(() => {
|
|
49
|
+
if (!E || k !== null || B === void 0 || U === void 0 || B.length > 0 && H === void 0) return;
|
|
51
50
|
let e = H?.version ?? null;
|
|
52
|
-
|
|
53
|
-
flowId:
|
|
51
|
+
A({
|
|
52
|
+
flowId: m.id,
|
|
54
53
|
basic: {
|
|
55
|
-
tenantId:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
54
|
+
tenantId: m.tenantId,
|
|
55
|
+
isShared: m.isShared,
|
|
56
|
+
code: m.code,
|
|
57
|
+
name: m.name,
|
|
58
|
+
categoryId: m.categoryId,
|
|
59
|
+
icon: m.icon ?? void 0,
|
|
60
|
+
description: m.description ?? void 0,
|
|
61
|
+
labels: m.labels ?? {},
|
|
62
|
+
bindingMode: m.bindingMode,
|
|
63
|
+
businessBinding: m.businessBinding ?? void 0,
|
|
64
|
+
adminUserIds: m.adminUserIds,
|
|
65
|
+
isAllInitiationAllowed: m.isAllInitiationAllowed,
|
|
66
|
+
instanceTitleTemplate: m.instanceTitleTemplate
|
|
67
67
|
},
|
|
68
68
|
initiators: U.map((e) => ({
|
|
69
69
|
kind: e.kind,
|
|
@@ -74,48 +74,48 @@ function S({ flow: h, tenantId: S, onClose: C }) {
|
|
|
74
74
|
flowDefinition: e?.flowSchema ?? te
|
|
75
75
|
});
|
|
76
76
|
}, [
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
E,
|
|
78
|
+
k,
|
|
79
79
|
B,
|
|
80
80
|
H,
|
|
81
81
|
U,
|
|
82
|
-
|
|
82
|
+
m
|
|
83
83
|
]);
|
|
84
84
|
let G = {
|
|
85
85
|
shouldShowSuccessFeedback: !1,
|
|
86
|
-
invalidates: [[
|
|
86
|
+
invalidates: [[C.findFlows.key], [C.findVersions.key]]
|
|
87
87
|
}, pe = c({
|
|
88
|
-
mutationFn:
|
|
88
|
+
mutationFn: C.create,
|
|
89
89
|
meta: G
|
|
90
90
|
}), me = c({
|
|
91
|
-
mutationFn:
|
|
91
|
+
mutationFn: C.update,
|
|
92
92
|
meta: G
|
|
93
93
|
}), he = c({
|
|
94
|
-
mutationFn:
|
|
94
|
+
mutationFn: C.deploy,
|
|
95
95
|
meta: G
|
|
96
96
|
}), ge = c({
|
|
97
|
-
mutationFn:
|
|
97
|
+
mutationFn: C.publishVersion,
|
|
98
98
|
meta: G
|
|
99
|
-
}), K =
|
|
99
|
+
}), K = d(() => k?.formSchema ? de(k.formSchema) : null, [k?.formSchema]), q = d(() => k?.formSchema ? g(k.formSchema, T.registries) : null, [k?.formSchema, T.registries]), J = d(() => k ? y(k.flowDefinition, {
|
|
100
100
|
formFields: K?.formFields ?? [],
|
|
101
101
|
assigneeKinds: W?.assignees,
|
|
102
102
|
ccKinds: W?.ccs,
|
|
103
103
|
shared: L
|
|
104
104
|
}) : [], [
|
|
105
|
-
|
|
105
|
+
k,
|
|
106
106
|
K,
|
|
107
107
|
W,
|
|
108
108
|
L
|
|
109
|
-
]), _e =
|
|
110
|
-
...n(
|
|
109
|
+
]), _e = d(() => ({
|
|
110
|
+
...n(T, K?.formFields ?? [], W),
|
|
111
111
|
shared: L
|
|
112
112
|
}), [
|
|
113
|
-
|
|
113
|
+
T,
|
|
114
114
|
K,
|
|
115
115
|
W,
|
|
116
116
|
L
|
|
117
117
|
]), ve = u((e) => {
|
|
118
|
-
|
|
118
|
+
A((t) => t && {
|
|
119
119
|
...t,
|
|
120
120
|
basic: {
|
|
121
121
|
...t.basic,
|
|
@@ -123,44 +123,45 @@ function S({ flow: h, tenantId: S, onClose: C }) {
|
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
125
|
}, []), ye = u((e) => {
|
|
126
|
-
|
|
126
|
+
A((t) => t && {
|
|
127
127
|
...t,
|
|
128
128
|
initiators: e
|
|
129
129
|
});
|
|
130
130
|
}, []), be = u((e) => {
|
|
131
|
-
|
|
131
|
+
A((t) => t && {
|
|
132
132
|
...t,
|
|
133
133
|
formSchema: e
|
|
134
134
|
});
|
|
135
135
|
}, []), Y = u((e) => {
|
|
136
|
-
|
|
136
|
+
A((t) => t && {
|
|
137
137
|
...t,
|
|
138
138
|
flowDefinition: e
|
|
139
139
|
});
|
|
140
140
|
}, []);
|
|
141
|
-
if (
|
|
141
|
+
if (k === null) return /* @__PURE__ */ _(h, {
|
|
142
142
|
align: "center",
|
|
143
143
|
justify: "center",
|
|
144
144
|
style: { height: "100%" },
|
|
145
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ _(oe, {})
|
|
146
146
|
});
|
|
147
|
-
let X =
|
|
148
|
-
Z.code.trim() !== "" && Z.name.trim() !== "" && Z.categoryId !== "" && Z.instanceTitleTemplate.trim() !== "" && (Z.bindingMode !== "business" || re(Z.businessBinding)) && (Z.isAllInitiationAllowed || s(
|
|
147
|
+
let X = k, { basic: Z } = X, Q = [
|
|
148
|
+
Z.code.trim() !== "" && Z.name.trim() !== "" && Z.categoryId !== "" && Z.instanceTitleTemplate.trim() !== "" && (Z.bindingMode !== "business" || re(Z.businessBinding)) && (Z.isAllInitiationAllowed || s(k).length > 0),
|
|
149
149
|
q === null || q.valid,
|
|
150
150
|
J.length === 0,
|
|
151
151
|
!0
|
|
152
|
-
][
|
|
152
|
+
][D] ?? !1, xe = [
|
|
153
153
|
"请先完善流程设置中的必填项",
|
|
154
154
|
`表单存在 ${q?.issues.filter((e) => e.severity === "error").length ?? 0} 个错误,可在编辑器底部的问题提示中查看并定位`,
|
|
155
155
|
`流程存在 ${J.length} 个问题,可在画布工具栏的问题提示中查看并定位`,
|
|
156
156
|
void 0
|
|
157
|
-
], $ = Q ? void 0 : xe[
|
|
157
|
+
], $ = Q ? void 0 : xe[D];
|
|
158
158
|
async function Se() {
|
|
159
159
|
F(!0);
|
|
160
160
|
try {
|
|
161
161
|
let e = Z.bindingMode === "business" ? Z.businessBinding : void 0, t = s(X), n;
|
|
162
162
|
n = X.flowId === void 0 ? (await pe.mutateAsync({
|
|
163
163
|
tenantId: Z.tenantId,
|
|
164
|
+
isShared: Z.isShared,
|
|
164
165
|
code: Z.code,
|
|
165
166
|
name: Z.name,
|
|
166
167
|
categoryId: Z.categoryId,
|
|
@@ -188,64 +189,64 @@ function S({ flow: h, tenantId: S, onClose: C }) {
|
|
|
188
189
|
})).id;
|
|
189
190
|
let r = await he.mutateAsync({
|
|
190
191
|
flowId: n,
|
|
191
|
-
description:
|
|
192
|
+
description: j.trim() || void 0,
|
|
192
193
|
storageMode: X.storageMode,
|
|
193
194
|
flowDefinition: X.flowDefinition,
|
|
194
195
|
formSchema: X.formSchema ?? void 0
|
|
195
196
|
});
|
|
196
|
-
|
|
197
|
+
M && await ge.mutateAsync({ versionId: r.id }), ue(M ? "流程已部署并发布" : "流程已部署为草稿版本"), S();
|
|
197
198
|
} catch {} finally {
|
|
198
199
|
F(!1);
|
|
199
200
|
}
|
|
200
201
|
}
|
|
201
202
|
let Ce = [
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ _(i, {
|
|
203
204
|
basic: Z,
|
|
204
205
|
categoryOptions: z,
|
|
205
206
|
initiatorKinds: W?.initiators,
|
|
206
|
-
initiators:
|
|
207
|
-
isEditing:
|
|
207
|
+
initiators: k.initiators,
|
|
208
|
+
isEditing: E,
|
|
208
209
|
onBasicChange: ve,
|
|
209
210
|
onInitiatorsChange: ye
|
|
210
211
|
}, "basic"),
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
initialSchema:
|
|
213
|
-
registries:
|
|
214
|
-
storageMode:
|
|
212
|
+
/* @__PURE__ */ _(o, {
|
|
213
|
+
initialSchema: k.formSchema ?? void 0,
|
|
214
|
+
registries: T.registries,
|
|
215
|
+
storageMode: k.storageMode,
|
|
215
216
|
onSchemaChange: be,
|
|
216
|
-
onStorageModeChange: (e) =>
|
|
217
|
+
onStorageModeChange: (e) => A((t) => t && {
|
|
217
218
|
...t,
|
|
218
219
|
storageMode: e
|
|
219
220
|
})
|
|
220
221
|
}, "form"),
|
|
221
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ _(a, {
|
|
222
223
|
plugins: _e,
|
|
223
|
-
value:
|
|
224
|
+
value: k.flowDefinition,
|
|
224
225
|
onChange: Y
|
|
225
226
|
}, "flow"),
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
draft:
|
|
227
|
+
/* @__PURE__ */ _(ie, {
|
|
228
|
+
draft: k,
|
|
228
229
|
fields: K?.fields ?? [],
|
|
229
|
-
publishNow:
|
|
230
|
-
versionDescription:
|
|
231
|
-
onPublishNowChange:
|
|
232
|
-
onVersionDescriptionChange:
|
|
230
|
+
publishNow: M,
|
|
231
|
+
versionDescription: j,
|
|
232
|
+
onPublishNowChange: N,
|
|
233
|
+
onVersionDescriptionChange: fe
|
|
233
234
|
}, "review")
|
|
234
235
|
];
|
|
235
|
-
return /* @__PURE__ */
|
|
236
|
+
return /* @__PURE__ */ v(h, {
|
|
236
237
|
style: {
|
|
237
238
|
height: "100%",
|
|
238
239
|
flexDirection: "column"
|
|
239
240
|
},
|
|
240
241
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ _("div", {
|
|
242
243
|
style: {
|
|
243
244
|
padding: "12px 32px",
|
|
244
245
|
borderBottom: "1px solid var(--vef-color-border-secondary)"
|
|
245
246
|
},
|
|
246
|
-
children: /* @__PURE__ */
|
|
247
|
-
current:
|
|
248
|
-
items:
|
|
247
|
+
children: /* @__PURE__ */ _(se, {
|
|
248
|
+
current: D,
|
|
249
|
+
items: b,
|
|
249
250
|
size: "small",
|
|
250
251
|
style: {
|
|
251
252
|
maxWidth: 720,
|
|
@@ -253,7 +254,7 @@ function S({ flow: h, tenantId: S, onClose: C }) {
|
|
|
253
254
|
}
|
|
254
255
|
})
|
|
255
256
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ _("div", {
|
|
257
258
|
style: {
|
|
258
259
|
flex: 1,
|
|
259
260
|
minHeight: 0,
|
|
@@ -261,8 +262,8 @@ function S({ flow: h, tenantId: S, onClose: C }) {
|
|
|
261
262
|
flexDirection: "column"
|
|
262
263
|
},
|
|
263
264
|
children: Ce.map((e, t) => {
|
|
264
|
-
let n = t ===
|
|
265
|
-
return /* @__PURE__ */
|
|
265
|
+
let n = t === D, r = t === 0 || t === 3;
|
|
266
|
+
return /* @__PURE__ */ _("div", {
|
|
266
267
|
style: {
|
|
267
268
|
display: n ? "flex" : "none",
|
|
268
269
|
flexDirection: "column",
|
|
@@ -275,42 +276,42 @@ function S({ flow: h, tenantId: S, onClose: C }) {
|
|
|
275
276
|
}, t);
|
|
276
277
|
})
|
|
277
278
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ v(h, {
|
|
279
280
|
align: "center",
|
|
280
281
|
justify: "space-between",
|
|
281
282
|
style: {
|
|
282
283
|
padding: "12px 32px",
|
|
283
284
|
borderTop: "1px solid var(--vef-color-border-secondary)"
|
|
284
285
|
},
|
|
285
|
-
children: [/* @__PURE__ */
|
|
286
|
-
disabled:
|
|
287
|
-
onClick: () =>
|
|
286
|
+
children: [/* @__PURE__ */ _(p, {
|
|
287
|
+
disabled: D === 0 || P,
|
|
288
|
+
onClick: () => O((e) => e - 1),
|
|
288
289
|
children: "上一步"
|
|
289
|
-
}), /* @__PURE__ */
|
|
290
|
+
}), /* @__PURE__ */ v(h, {
|
|
290
291
|
align: "center",
|
|
291
292
|
gap: "middle",
|
|
292
|
-
children: [$ === void 0 ? null : /* @__PURE__ */
|
|
293
|
-
style: { fontSize:
|
|
293
|
+
children: [$ === void 0 ? null : /* @__PURE__ */ _(ce, {
|
|
294
|
+
style: { fontSize: le.fontSizeSm },
|
|
294
295
|
type: "danger",
|
|
295
296
|
children: $
|
|
296
|
-
}),
|
|
297
|
+
}), D < b.length - 1 ? /* @__PURE__ */ _(p, {
|
|
297
298
|
disabled: !Q,
|
|
298
299
|
type: "primary",
|
|
299
|
-
onClick: () =>
|
|
300
|
+
onClick: () => O((e) => e + 1),
|
|
300
301
|
children: "下一步"
|
|
301
|
-
}) : /* @__PURE__ */
|
|
302
|
+
}) : /* @__PURE__ */ _(p, {
|
|
302
303
|
loading: P,
|
|
303
304
|
type: "primary",
|
|
304
305
|
onClick: () => void Se(),
|
|
305
|
-
children:
|
|
306
|
+
children: M ? "部署并发布" : "部署为草稿"
|
|
306
307
|
})]
|
|
307
308
|
})]
|
|
308
309
|
})
|
|
309
310
|
]
|
|
310
311
|
});
|
|
311
312
|
}
|
|
312
|
-
function
|
|
313
|
-
return /* @__PURE__ */
|
|
313
|
+
function S({ open: e, flow: t, tenantId: n, onClose: r }) {
|
|
314
|
+
return /* @__PURE__ */ _(m, {
|
|
314
315
|
destroyOnHidden: !0,
|
|
315
316
|
open: e,
|
|
316
317
|
placement: "right",
|
|
@@ -318,7 +319,7 @@ function C({ open: e, flow: t, tenantId: n, onClose: r }) {
|
|
|
318
319
|
styles: { body: { padding: 0 } },
|
|
319
320
|
title: t ? `流程设计 · ${t.name}` : "新建流程",
|
|
320
321
|
onClose: r,
|
|
321
|
-
children: e && /* @__PURE__ */
|
|
322
|
+
children: e && /* @__PURE__ */ _(x, {
|
|
322
323
|
flow: t,
|
|
323
324
|
tenantId: n,
|
|
324
325
|
onClose: r
|
|
@@ -326,4 +327,4 @@ function C({ open: e, flow: t, tenantId: n, onClose: r }) {
|
|
|
326
327
|
});
|
|
327
328
|
}
|
|
328
329
|
//#endregion
|
|
329
|
-
export {
|
|
330
|
+
export { S as FlowDesignerDrawer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
2
2
|
import { initiatorsForSubmit as e } from "./types.js";
|
|
3
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";
|
|
4
4
|
import { jsx as p, jsxs as m } from "@emotion/react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
2
2
|
//#region src/pages/flow-page/designer/types.ts
|
|
3
3
|
var e = {
|
|
4
4
|
nodes: [],
|
|
@@ -8,6 +8,7 @@ function t(t) {
|
|
|
8
8
|
return {
|
|
9
9
|
basic: {
|
|
10
10
|
tenantId: t,
|
|
11
|
+
isShared: !1,
|
|
11
12
|
code: "",
|
|
12
13
|
name: "",
|
|
13
14
|
categoryId: "",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
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.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
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";
|
package/dist/es/pages/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/approval v2.
|
|
1
|
+
/*! @vef-framework-react/approval v2.29.0 made by Venus | 2026-10-15T10:13:02.725Z */
|
|
2
2
|
import { ApprovalAdminPage as e } from "./admin-page/index.js";
|
|
3
3
|
import { ApprovalCategoryPage as t } from "./category-page/index.js";
|
|
4
4
|
import { ApprovalDelegationPage as n } from "./delegation-page/index.js";
|