@qfei-design/make-app-approval 0.2.16 → 0.2.17
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/PUBLIC_API.md +47 -0
- package/README.md +2 -0
- package/dist/detail/instance-types.d.ts +4 -1
- package/dist/detail/types.d.ts +4 -1
- package/dist/detail.cjs +1 -1
- package/dist/detail.mjs +308 -298
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +37 -14
- package/dist/list/approval-canvas-theme.d.ts +7 -0
- package/dist/list/approval-columns.d.ts +1 -1
- package/dist/list/approval-header-icons.d.ts +2 -0
- package/dist/list/types.d.ts +2 -0
- package/dist/list.cjs +1 -1
- package/dist/list.mjs +364 -335
- package/dist/react/index.d.ts +6 -1
- package/dist/react/theme.d.ts +59 -0
- package/dist/react.cjs +1 -1
- package/dist/react.mjs +12 -6
- package/dist/styles.css +142 -0
- package/dist/theme-pzn9q1zq.cjs +1 -0
- package/dist/theme-qxOS-jIA.js +15 -0
- package/dist/theme.d.ts +52 -0
- package/package.json +1 -1
package/dist/detail.mjs
CHANGED
|
@@ -1,278 +1,281 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as l, jsxs as p, Fragment as De } from "react/jsx-runtime";
|
|
2
|
+
import { u as ge } from "./theme-qxOS-jIA.js";
|
|
3
|
+
import { useState as b, useRef as J, useEffect as M, useId as we } from "react";
|
|
4
|
+
import { ApprovalStatus as Ee } from "./react.mjs";
|
|
5
|
+
import { isApprovalSystemField as je } from "./index.mjs";
|
|
6
|
+
const I = (e) => !!e && typeof e == "object" && !Array.isArray(e), N = (e) => typeof e == "string" && e.trim().length > 0, qe = ["APPROVE", "REJECT", "RETURN", "SUBMIT"], K = (e) => {
|
|
6
7
|
if (e === void 0) return [];
|
|
7
|
-
if (!
|
|
8
|
+
if (!I(e)) throw new Error("审批字段权限格式无效");
|
|
8
9
|
if (e.scope === "NONE" && e.fields === void 0) return [];
|
|
9
|
-
if (e.scope !== "FIELDS" || !Array.isArray(e.fields) || !e.fields.every(
|
|
10
|
+
if (e.scope !== "FIELDS" || !Array.isArray(e.fields) || !e.fields.every(N) || new Set(e.fields).size !== e.fields.length)
|
|
10
11
|
throw new Error("审批字段权限范围无效");
|
|
11
12
|
return e.fields;
|
|
12
|
-
},
|
|
13
|
-
if (!
|
|
13
|
+
}, Ie = (e) => I(e) && N(e.key) && N(e.label) && (e.required === void 0 || typeof e.required == "boolean") && (e.fullWidth === void 0 || typeof e.fullWidth == "boolean") && (e.schema === void 0 || I(e.schema)), Fe = (e) => {
|
|
14
|
+
if (!I(e) || !qe.some((a) => a === e.actionType) || e.commentPolicy !== "REQUIRED" && e.commentPolicy !== "OPTIONAL")
|
|
14
15
|
return !1;
|
|
15
16
|
const t = e.returnTargets;
|
|
16
|
-
return t === void 0 || Array.isArray(t) && t.every((
|
|
17
|
-
},
|
|
18
|
-
if (!
|
|
17
|
+
return t === void 0 || Array.isArray(t) && t.every((a) => I(a) && N(a.nodeKey) && N(a.nodeName)) && new Set(t.map((a) => a.nodeKey)).size === t.length;
|
|
18
|
+
}, Ne = (e) => {
|
|
19
|
+
if (!I(e) || !N(e.taskId) || !N(e.processInstanceId) || !N(e.taskName) || !N(e.processStatus) || !Array.isArray(e.fields) || !e.fields.every(Ie) || !I(e.formData))
|
|
19
20
|
throw new Error("审批详情数据不完整");
|
|
20
|
-
const t = e.fields.map((
|
|
21
|
+
const t = e.fields.map((s) => s.key);
|
|
21
22
|
if (new Set(t).size !== t.length) throw new Error("审批字段标识重复");
|
|
22
|
-
if (e.fieldPermission !== void 0 && !
|
|
23
|
+
if (e.fieldPermission !== void 0 && !I(e.fieldPermission))
|
|
23
24
|
throw new Error("审批字段权限格式无效");
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
25
|
+
const a = e.fieldPermission, o = K(a?.viewPermission), i = K(a?.editPermission);
|
|
26
|
+
if (o.some((s) => !t.includes(s)) || i.some((s) => !o.includes(s)))
|
|
26
27
|
throw new Error("审批字段元数据或权限不一致");
|
|
27
|
-
const
|
|
28
|
-
if (!Array.isArray(
|
|
28
|
+
const n = e.actions ?? [];
|
|
29
|
+
if (!Array.isArray(n) || !n.every(Fe) || new Set(n.map((s) => s.actionType)).size !== n.length)
|
|
29
30
|
throw new Error("审批操作配置无效");
|
|
30
|
-
const
|
|
31
|
+
const c = e.summary;
|
|
31
32
|
return {
|
|
32
33
|
taskId: e.taskId,
|
|
33
34
|
processInstanceId: e.processInstanceId,
|
|
34
35
|
taskName: e.taskName,
|
|
35
|
-
...
|
|
36
|
+
...I(c) && ["title", "applicantName", "applicationTime"].every((s) => typeof c[s] == "string") ? { summary: { title: String(c.title), applicantName: String(c.applicantName), applicationTime: String(c.applicationTime) } } : {},
|
|
36
37
|
processStatus: e.processStatus,
|
|
37
38
|
fields: e.fields,
|
|
38
39
|
formData: e.formData,
|
|
39
|
-
actions:
|
|
40
|
+
actions: n,
|
|
40
41
|
fieldPermission: {
|
|
41
|
-
viewPermission: { scope: "FIELDS", fields:
|
|
42
|
-
editPermission: { scope: "FIELDS", fields:
|
|
42
|
+
viewPermission: { scope: "FIELDS", fields: o },
|
|
43
|
+
editPermission: { scope: "FIELDS", fields: i }
|
|
43
44
|
}
|
|
44
45
|
};
|
|
45
|
-
},
|
|
46
|
+
}, x = (e) => {
|
|
46
47
|
const t = new Set(
|
|
47
|
-
|
|
48
|
-
),
|
|
49
|
-
|
|
48
|
+
K(e.fieldPermission?.viewPermission)
|
|
49
|
+
), a = new Set(
|
|
50
|
+
K(e.fieldPermission?.editPermission)
|
|
50
51
|
);
|
|
51
|
-
return e.fields.filter((
|
|
52
|
-
...
|
|
53
|
-
editable:
|
|
52
|
+
return e.fields.filter((o) => t.has(o.key)).map((o) => ({
|
|
53
|
+
...o,
|
|
54
|
+
editable: a.has(o.key) && !je(o.key)
|
|
54
55
|
}));
|
|
55
56
|
};
|
|
56
|
-
class
|
|
57
|
-
constructor(t,
|
|
58
|
-
super(t), this.fieldErrors =
|
|
57
|
+
class E extends Error {
|
|
58
|
+
constructor(t, a = {}, o) {
|
|
59
|
+
super(t), this.fieldErrors = a, this.control = o, this.name = "ApprovalTaskValidationError";
|
|
59
60
|
}
|
|
60
61
|
fieldErrors;
|
|
61
62
|
control;
|
|
62
63
|
}
|
|
63
|
-
const
|
|
64
|
-
e.filter((
|
|
65
|
-
const
|
|
66
|
-
return
|
|
67
|
-
}).map((
|
|
68
|
-
),
|
|
69
|
-
const
|
|
70
|
-
if (!
|
|
71
|
-
throw new
|
|
72
|
-
const
|
|
73
|
-
|
|
64
|
+
const Y = (e) => e.actionType === "RETURN" || e.actionType === "REJECT" || e.actionType === "SUBMIT" && e.commentPolicy === "REQUIRED", Ce = (e, t) => Object.fromEntries(
|
|
65
|
+
e.filter((a) => {
|
|
66
|
+
const o = t[a.key];
|
|
67
|
+
return o == null || typeof o == "string" && !o.trim() || Array.isArray(o) && o.length === 0;
|
|
68
|
+
}).map((a) => [a.key, `请填写${a.label}`])
|
|
69
|
+
), ke = (e, t, a, o, i = "") => {
|
|
70
|
+
const n = e.actions.find((h) => h.actionType === t);
|
|
71
|
+
if (!n)
|
|
72
|
+
throw new E("当前节点不允许此操作,请刷新详情");
|
|
73
|
+
const c = t === "RETURN" ? {} : a, s = new Set(
|
|
74
|
+
x(e).filter((h) => h.editable).map((h) => h.key)
|
|
74
75
|
);
|
|
75
|
-
if (Object.keys(
|
|
76
|
-
throw new
|
|
77
|
-
if (
|
|
78
|
-
throw new
|
|
79
|
-
if (
|
|
80
|
-
throw new
|
|
81
|
-
const
|
|
82
|
-
if (t === "RETURN" && !
|
|
83
|
-
throw new
|
|
84
|
-
|
|
76
|
+
if (Object.keys(c).some((h) => !s.has(h)))
|
|
77
|
+
throw new E("字段权限已变化,请重新加载详情");
|
|
78
|
+
if (Y(n) && !o.trim())
|
|
79
|
+
throw new E("请填写审批意见", {}, "comment");
|
|
80
|
+
if (o.length > 1024)
|
|
81
|
+
throw new E("审批意见不能超过 1024 个字符", {}, "comment");
|
|
82
|
+
const y = t === "RETURN" && n.returnTargets?.length === 1 ? n.returnTargets[0] : void 0;
|
|
83
|
+
if (t === "RETURN" && !y)
|
|
84
|
+
throw new E(
|
|
85
|
+
n.returnTargets?.length ? "退回目标配置不唯一,请联系管理员检查流程配置" : "退回目标配置缺失,请联系管理员检查流程配置"
|
|
85
86
|
);
|
|
86
|
-
if (
|
|
87
|
-
throw new
|
|
87
|
+
if (y && i && i !== y.nodeKey)
|
|
88
|
+
throw new E("退回目标与当前节点配置不一致,请重新加载详情");
|
|
88
89
|
return {
|
|
89
90
|
taskId: e.taskId,
|
|
90
91
|
processInstanceId: e.processInstanceId,
|
|
91
92
|
actionType: t,
|
|
92
|
-
comment:
|
|
93
|
-
recordPatch: { ...
|
|
94
|
-
...
|
|
93
|
+
comment: o.trim(),
|
|
94
|
+
recordPatch: { ...c },
|
|
95
|
+
...y ? { targetNodeKey: y.nodeKey } : {}
|
|
95
96
|
};
|
|
96
|
-
},
|
|
97
|
+
}, u = (e, t) => {
|
|
97
98
|
try {
|
|
98
99
|
e ? e(t) : t.phase === "error" ? console.warn("[make-app-approval]", t) : console.info("[make-app-approval]", t);
|
|
99
100
|
} catch {
|
|
100
101
|
console.warn("[make-app-approval] diagnostic sink failed");
|
|
101
102
|
}
|
|
102
|
-
},
|
|
103
|
+
}, Z = (e, t) => {
|
|
103
104
|
if (Object.is(e, t)) return !0;
|
|
104
105
|
if (e instanceof Date && t instanceof Date)
|
|
105
106
|
return Object.is(e.getTime(), t.getTime());
|
|
106
107
|
if (Array.isArray(e) || Array.isArray(t))
|
|
107
|
-
return Array.isArray(e) && Array.isArray(t) && e.length === t.length && e.every((
|
|
108
|
+
return Array.isArray(e) && Array.isArray(t) && e.length === t.length && e.every((i, n) => Z(i, t[n]));
|
|
108
109
|
if (!e || !t || typeof e != "object" || typeof t != "object" || ![Object.prototype, null].includes(Object.getPrototypeOf(e)) || ![Object.prototype, null].includes(Object.getPrototypeOf(t))) return !1;
|
|
109
|
-
const
|
|
110
|
-
return Object.keys(
|
|
111
|
-
},
|
|
110
|
+
const a = e, o = t;
|
|
111
|
+
return Object.keys(a).length === Object.keys(o).length && Object.keys(a).every((i) => Object.hasOwn(o, i) && Z(a[i], o[i]));
|
|
112
|
+
}, X = {
|
|
112
113
|
APPROVE: "同意",
|
|
113
114
|
REJECT: "拒绝",
|
|
114
115
|
RETURN: "退回修改",
|
|
115
116
|
SUBMIT: "继续提交"
|
|
116
|
-
},
|
|
117
|
+
}, _ = (e, t) => e.taskId === t.reference.taskId && e.processInstanceId === t.reference.processInstanceId, $e = ({
|
|
117
118
|
title: e,
|
|
118
119
|
actions: t,
|
|
119
|
-
content:
|
|
120
|
-
footer:
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
content: a,
|
|
121
|
+
footer: o,
|
|
122
|
+
themeStyle: i,
|
|
123
|
+
presentation: n
|
|
124
|
+
}) => /* @__PURE__ */ p("section", { className: "make-app-approval-detail", "aria-label": "审批详情", style: i, "data-make-approval-theme": i ? n : void 0, "data-make-approval-presentation": n === "mobile" ? "mobile" : void 0, children: [
|
|
125
|
+
/* @__PURE__ */ p("header", { className: "make-app-approval-detail-header", children: [
|
|
123
126
|
e,
|
|
124
127
|
t
|
|
125
128
|
] }),
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
|
|
128
|
-
] }),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
e && /* @__PURE__ */
|
|
131
|
-
] }),
|
|
132
|
-
const [t,
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
return
|
|
129
|
+
/* @__PURE__ */ l("div", { className: "make-app-approval-detail-content", children: a }),
|
|
130
|
+
o && /* @__PURE__ */ l("footer", { className: "make-app-approval-detail-footer", children: o })
|
|
131
|
+
] }), be = (e, t, a) => /* @__PURE__ */ p("div", { className: "make-app-approval-detail-title", style: a, "data-make-approval-theme": a ? t : void 0, "data-make-approval-presentation": t === "mobile" ? "mobile" : void 0, children: [
|
|
132
|
+
/* @__PURE__ */ l("h2", { children: "审批详情" }),
|
|
133
|
+
e && /* @__PURE__ */ l(Ee, { value: e, presentation: t })
|
|
134
|
+
] }), Be = (e) => {
|
|
135
|
+
const [t, a] = b(0), [o, i] = b(), n = J(e);
|
|
136
|
+
n.current = e, M(() => {
|
|
137
|
+
const s = new AbortController(), y = n.current;
|
|
138
|
+
return u(y.logger, { operation: "detail", phase: "start" }), (async () => {
|
|
136
139
|
try {
|
|
137
|
-
if (await Promise.resolve(),
|
|
138
|
-
const
|
|
139
|
-
await
|
|
140
|
-
signal:
|
|
140
|
+
if (await Promise.resolve(), s.signal.aborted) return;
|
|
141
|
+
const h = Ne(
|
|
142
|
+
await y.provider.loadDetail(y.reference, {
|
|
143
|
+
signal: s.signal
|
|
141
144
|
})
|
|
142
145
|
);
|
|
143
|
-
if (
|
|
144
|
-
if (!
|
|
146
|
+
if (s.signal.aborted) return;
|
|
147
|
+
if (!_(h, y))
|
|
145
148
|
throw new Error("Task identity mismatch");
|
|
146
|
-
|
|
147
|
-
} catch (
|
|
148
|
-
if (
|
|
149
|
-
|
|
149
|
+
i({ revision: t, detail: h }), u(y.logger, { operation: "detail", phase: "success" });
|
|
150
|
+
} catch (h) {
|
|
151
|
+
if (s.signal.aborted) return;
|
|
152
|
+
i({ revision: t, error: !0 }), u(y.logger, { operation: "detail", phase: "error" }), y.onRequestError?.(h, {
|
|
150
153
|
operation: "detail",
|
|
151
154
|
resultUnknown: !1,
|
|
152
155
|
message: "审批详情加载失败,请重新加载详情"
|
|
153
156
|
});
|
|
154
157
|
}
|
|
155
158
|
})(), () => {
|
|
156
|
-
|
|
159
|
+
s.abort(), u(y.logger, { operation: "detail", phase: "cancel" });
|
|
157
160
|
};
|
|
158
161
|
}, [t]);
|
|
159
|
-
const
|
|
160
|
-
return /* @__PURE__ */
|
|
161
|
-
|
|
162
|
+
const c = o?.revision === t ? o : void 0;
|
|
163
|
+
return /* @__PURE__ */ l(
|
|
164
|
+
Ue,
|
|
162
165
|
{
|
|
163
166
|
...e,
|
|
164
|
-
data:
|
|
165
|
-
loadError:
|
|
166
|
-
reload: () =>
|
|
167
|
+
data: c?.detail,
|
|
168
|
+
loadError: c?.error === !0,
|
|
169
|
+
reload: () => a((s) => s + 1)
|
|
167
170
|
},
|
|
168
171
|
t
|
|
169
172
|
);
|
|
170
|
-
},
|
|
173
|
+
}, Ue = (e) => {
|
|
171
174
|
const {
|
|
172
|
-
components: { Button: t, TextArea:
|
|
173
|
-
renderField:
|
|
174
|
-
reload:
|
|
175
|
-
} = e,
|
|
176
|
-
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}, [
|
|
181
|
-
const
|
|
182
|
-
if (!
|
|
183
|
-
|
|
184
|
-
const g =
|
|
185
|
-
let
|
|
186
|
-
|
|
175
|
+
components: { Button: t, TextArea: a },
|
|
176
|
+
renderField: o,
|
|
177
|
+
reload: i
|
|
178
|
+
} = e, n = we(), c = ge(e.presentation ?? "desktop"), s = { style: c.style, "data-make-approval-theme": c.style ? c.presentation : void 0, "data-make-approval-presentation": c.presentation === "mobile" ? "mobile" : void 0 }, [y, h] = b(), d = y ?? e.data, [w, F] = b({}), [C, A] = b(), [$, f] = b(""), [v, O] = b({}), [B, R] = b(""), [ee, V] = b(""), [z, Ae] = b(), [P, te] = b(!1), [D, Te] = b(!1), W = J(!1), Q = J(new AbortController());
|
|
179
|
+
M(() => (Q.current = new AbortController(), () => Q.current.abort()), []);
|
|
180
|
+
const re = d ? x(d) : [], ae = d?.actions.find((r) => r.actionType === C), oe = ae ? Y(ae) : !1, ne = d?.actions.filter(Y) ?? [], se = P || D, ie = e.renderLayout ?? $e;
|
|
181
|
+
M(() => {
|
|
182
|
+
z && document.getElementById(`${n}-${z.key}`)?.focus();
|
|
183
|
+
}, [z, n]);
|
|
184
|
+
const le = async (r) => {
|
|
185
|
+
if (!d || W.current || D) return;
|
|
186
|
+
A(r), V(""), W.current = !0, te(!0), R(""), O({});
|
|
187
|
+
const g = Q.current.signal;
|
|
188
|
+
let T = !1;
|
|
189
|
+
u(e.logger, {
|
|
187
190
|
operation: "action",
|
|
188
191
|
phase: "start",
|
|
189
192
|
actionType: r
|
|
190
193
|
});
|
|
191
194
|
try {
|
|
192
|
-
|
|
193
|
-
const m =
|
|
195
|
+
ke(d, r, w, $);
|
|
196
|
+
const m = Ne(
|
|
194
197
|
await e.provider.loadDetail(e.reference, { signal: g })
|
|
195
198
|
);
|
|
196
199
|
if (g.aborted) return;
|
|
197
|
-
if (!
|
|
198
|
-
const
|
|
199
|
-
if (JSON.stringify(
|
|
200
|
-
|
|
200
|
+
if (!_(m, e)) throw new Error("Task identity mismatch");
|
|
201
|
+
const j = x(d), G = x(m);
|
|
202
|
+
if (JSON.stringify(j) !== JSON.stringify(G) || JSON.stringify(d.actions) !== JSON.stringify(m.actions)) {
|
|
203
|
+
h(m), F({}), A(void 0), f(""), R("当前节点的字段或操作权限已变化,请核对后重新操作"), u(e.logger, {
|
|
201
204
|
operation: "action",
|
|
202
205
|
phase: "skip",
|
|
203
206
|
actionType: r
|
|
204
207
|
});
|
|
205
208
|
return;
|
|
206
209
|
}
|
|
207
|
-
const
|
|
208
|
-
(
|
|
210
|
+
const ye = G.filter(
|
|
211
|
+
(k) => !Z(d.formData[k.key], m.formData[k.key])
|
|
209
212
|
);
|
|
210
|
-
if (
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
+
if (ye.length) {
|
|
214
|
+
const k = new Set(ye.map((q) => q.key)), H = Object.keys(w).some((q) => k.has(q));
|
|
215
|
+
h(m), F(Object.fromEntries(Object.entries(w).filter(([q]) => !k.has(q)))), A(void 0), R(H ? "申请内容已更新,冲突字段的本地修改已清除,其他修改已保留,请核对后重新操作" : "申请内容已更新,您的修改已保留,请核对后重新操作"), u(e.logger, { operation: "action", phase: "skip", actionType: r });
|
|
213
216
|
return;
|
|
214
217
|
}
|
|
215
|
-
const
|
|
216
|
-
(
|
|
217
|
-
),
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
Object.hasOwn(
|
|
218
|
+
const U = r === "RETURN" ? [] : G.filter(
|
|
219
|
+
(k) => k.editable && k.required === !0
|
|
220
|
+
), he = Object.fromEntries(
|
|
221
|
+
U.map((k) => [
|
|
222
|
+
k.key,
|
|
223
|
+
Object.hasOwn(w, k.key) ? w[k.key] : m.formData[k.key]
|
|
221
224
|
])
|
|
222
|
-
),
|
|
223
|
-
|
|
224
|
-
|
|
225
|
+
), fe = Ce(
|
|
226
|
+
U,
|
|
227
|
+
he
|
|
225
228
|
);
|
|
226
|
-
if (Object.keys(
|
|
227
|
-
throw new
|
|
229
|
+
if (Object.keys(fe).length)
|
|
230
|
+
throw new E(
|
|
228
231
|
"请检查表单中标红的字段",
|
|
229
|
-
|
|
232
|
+
fe
|
|
230
233
|
);
|
|
231
|
-
const
|
|
232
|
-
fields:
|
|
233
|
-
values:
|
|
234
|
+
const Re = U.length ? await e.validateFields({
|
|
235
|
+
fields: U,
|
|
236
|
+
values: he,
|
|
234
237
|
actionType: r,
|
|
235
238
|
signal: g
|
|
236
239
|
}) : {};
|
|
237
240
|
if (g.aborted) return;
|
|
238
|
-
const
|
|
239
|
-
Object.entries(
|
|
240
|
-
([
|
|
241
|
+
const ue = Object.fromEntries(
|
|
242
|
+
Object.entries(Re).filter(
|
|
243
|
+
([k, H]) => U.some((q) => q.key === k) && !!H
|
|
241
244
|
)
|
|
242
245
|
);
|
|
243
|
-
if (Object.keys(
|
|
244
|
-
throw new
|
|
246
|
+
if (Object.keys(ue).length)
|
|
247
|
+
throw new E(
|
|
245
248
|
"请检查表单中标红的字段",
|
|
246
|
-
|
|
249
|
+
ue
|
|
247
250
|
);
|
|
248
|
-
const
|
|
251
|
+
const Pe = ke(
|
|
249
252
|
m,
|
|
250
253
|
r,
|
|
251
|
-
|
|
252
|
-
|
|
254
|
+
w,
|
|
255
|
+
$
|
|
253
256
|
);
|
|
254
|
-
|
|
255
|
-
const
|
|
257
|
+
T = !0;
|
|
258
|
+
const S = await e.provider.submitAction(Pe, { signal: g });
|
|
256
259
|
if (g.aborted) return;
|
|
257
|
-
if (!
|
|
260
|
+
if (!S || !_(S, e) || S.actionType !== r || typeof S.processEnded != "boolean" || typeof S.processStatus != "string" || !S.processStatus.trim())
|
|
258
261
|
throw new Error("Action result mismatch");
|
|
259
|
-
|
|
262
|
+
Te(!0), A(void 0), h({ ...m, processStatus: S.processStatus }), R("处理成功"), u(e.logger, {
|
|
260
263
|
operation: "action",
|
|
261
264
|
phase: "success",
|
|
262
265
|
actionType: r
|
|
263
|
-
}),
|
|
266
|
+
}), u(e.logger, {
|
|
264
267
|
operation: "notify",
|
|
265
268
|
phase: "start",
|
|
266
269
|
actionType: r
|
|
267
270
|
});
|
|
268
271
|
try {
|
|
269
|
-
await e.onActionSuccess(
|
|
272
|
+
await e.onActionSuccess(S), u(e.logger, {
|
|
270
273
|
operation: "notify",
|
|
271
274
|
phase: "success",
|
|
272
275
|
actionType: r
|
|
273
276
|
});
|
|
274
277
|
} catch {
|
|
275
|
-
g.aborted ||
|
|
278
|
+
g.aborted || R("处理已成功,但页面刷新未完成,请刷新列表确认"), u(e.logger, {
|
|
276
279
|
operation: "notify",
|
|
277
280
|
phase: "error",
|
|
278
281
|
actionType: r
|
|
@@ -280,80 +283,83 @@ const H = (e) => e.actionType === "RETURN" || e.actionType === "REJECT" || e.act
|
|
|
280
283
|
}
|
|
281
284
|
} catch (m) {
|
|
282
285
|
if (g.aborted) return;
|
|
283
|
-
if (!
|
|
284
|
-
|
|
285
|
-
const
|
|
286
|
-
|
|
286
|
+
if (!T && m instanceof E) {
|
|
287
|
+
O(m.fieldErrors);
|
|
288
|
+
const j = m.control === "comment" ? "comment" : Object.keys(m.fieldErrors)[0];
|
|
289
|
+
j && Ae({ key: j }), m.control === "comment" ? V(m.message) : Object.keys(m.fieldErrors).length || R(m.message);
|
|
287
290
|
} else {
|
|
288
|
-
|
|
289
|
-
const
|
|
291
|
+
A(void 0);
|
|
292
|
+
const j = T ? "操作结果尚未确认,再次操作前将重新核查任务状态" : "审批信息或字段校验暂不可用,请稍后再次操作";
|
|
290
293
|
e.onRequestError ? e.onRequestError(m, {
|
|
291
294
|
operation: "action",
|
|
292
|
-
resultUnknown:
|
|
293
|
-
message:
|
|
294
|
-
}) :
|
|
295
|
+
resultUnknown: T,
|
|
296
|
+
message: j
|
|
297
|
+
}) : R(j);
|
|
295
298
|
}
|
|
296
|
-
|
|
299
|
+
u(e.logger, {
|
|
297
300
|
operation: "action",
|
|
298
301
|
phase: "error",
|
|
299
302
|
actionType: r
|
|
300
303
|
});
|
|
301
304
|
} finally {
|
|
302
|
-
|
|
305
|
+
W.current = !1, g.aborted ? u(e.logger, {
|
|
303
306
|
operation: "action",
|
|
304
307
|
phase: "cancel",
|
|
305
308
|
actionType: r
|
|
306
|
-
}) :
|
|
309
|
+
}) : te(!1);
|
|
307
310
|
}
|
|
308
311
|
};
|
|
309
|
-
if (!
|
|
310
|
-
return
|
|
311
|
-
title:
|
|
312
|
+
if (!d)
|
|
313
|
+
return ie({
|
|
314
|
+
title: be(void 0, c.presentation, c.style),
|
|
315
|
+
themeStyle: c.style,
|
|
316
|
+
presentation: c.presentation,
|
|
312
317
|
actions: null,
|
|
313
318
|
footer: null,
|
|
314
|
-
content: e.loadError ? /* @__PURE__ */
|
|
319
|
+
content: e.loadError ? /* @__PURE__ */ p("div", { ...s, className: "make-app-approval-detail-section", role: e.onRequestError ? void 0 : "alert", children: [
|
|
315
320
|
!e.onRequestError && "审批详情加载失败,请重试",
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
] }) : /* @__PURE__ */
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ l(t, { htmlType: "button", variant: "default", onClick: i, children: "重新加载详情" })
|
|
322
|
+
] }) : /* @__PURE__ */ p("div", { ...s, className: "make-app-approval-detail-loading", role: "status", children: [
|
|
323
|
+
/* @__PURE__ */ l("span", { className: "make-app-approval-loading-spinner", "aria-hidden": "true" }),
|
|
324
|
+
/* @__PURE__ */ l("span", { children: "正在加载审批详情…" })
|
|
320
325
|
] })
|
|
321
326
|
});
|
|
322
|
-
const
|
|
327
|
+
const Se = !D && d.actions.length > 0 ? /* @__PURE__ */ l("div", { ...s, className: "make-app-approval-detail-actions", "aria-label": "审批操作", children: d.actions.map((r) => /* @__PURE__ */ l(
|
|
323
328
|
t,
|
|
324
329
|
{
|
|
325
330
|
actionType: r.actionType,
|
|
326
331
|
htmlType: "button",
|
|
327
332
|
variant: r.actionType === "APPROVE" || r.actionType === "SUBMIT" ? "primary" : "default",
|
|
328
|
-
disabled:
|
|
329
|
-
loading:
|
|
333
|
+
disabled: P,
|
|
334
|
+
loading: P && C === r.actionType,
|
|
330
335
|
onClick: () => {
|
|
331
|
-
|
|
336
|
+
le(r.actionType);
|
|
332
337
|
},
|
|
333
|
-
children:
|
|
338
|
+
children: X[r.actionType]
|
|
334
339
|
},
|
|
335
340
|
r.actionType
|
|
336
|
-
)) }) : null,
|
|
341
|
+
)) }) : null, ce = /* @__PURE__ */ p(
|
|
337
342
|
"section",
|
|
338
343
|
{
|
|
344
|
+
...s,
|
|
339
345
|
className: "make-app-approval-detail-section",
|
|
340
346
|
"aria-label": "申请信息",
|
|
341
347
|
"data-presentation": e.presentation === "mobile" ? "mobile" : void 0,
|
|
342
348
|
children: [
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
|
|
346
|
-
|
|
349
|
+
/* @__PURE__ */ l("h3", { children: "申请信息" }),
|
|
350
|
+
/* @__PURE__ */ p("div", { className: "make-app-approval-detail-fields", children: [
|
|
351
|
+
re.length === 0 && /* @__PURE__ */ l("p", { children: "当前节点未配置可见字段" }),
|
|
352
|
+
re.map((r) => /* @__PURE__ */ p(
|
|
347
353
|
"div",
|
|
348
354
|
{
|
|
349
355
|
className: "make-app-approval-detail-field",
|
|
350
|
-
"data-invalid": !!
|
|
356
|
+
"data-invalid": !!v[r.key],
|
|
351
357
|
"data-readonly": !r.editable,
|
|
352
358
|
"data-full-width": !!r.fullWidth,
|
|
353
359
|
children: [
|
|
354
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ p("label", { htmlFor: `${n}-${r.key}`, children: [
|
|
355
361
|
e.renderFieldLabel?.(r) ?? r.label,
|
|
356
|
-
r.required && r.editable ? /* @__PURE__ */
|
|
362
|
+
r.required && r.editable ? /* @__PURE__ */ p(
|
|
357
363
|
"span",
|
|
358
364
|
{
|
|
359
365
|
className: "make-app-approval-required",
|
|
@@ -365,27 +371,27 @@ const H = (e) => e.actionType === "RETURN" || e.actionType === "REJECT" || e.act
|
|
|
365
371
|
}
|
|
366
372
|
) : null
|
|
367
373
|
] }),
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
-
|
|
374
|
+
/* @__PURE__ */ p("div", { className: "make-app-approval-detail-value", children: [
|
|
375
|
+
o({
|
|
370
376
|
field: r,
|
|
371
|
-
id: `${
|
|
372
|
-
value: Object.hasOwn(
|
|
377
|
+
id: `${n}-${r.key}`,
|
|
378
|
+
value: Object.hasOwn(w, r.key) ? w[r.key] : d.formData[r.key],
|
|
373
379
|
readOnly: !r.editable,
|
|
374
|
-
disabled:
|
|
375
|
-
error:
|
|
376
|
-
...r.editable && !
|
|
380
|
+
disabled: se,
|
|
381
|
+
error: v[r.key],
|
|
382
|
+
...r.editable && !se ? {
|
|
377
383
|
onChange: (g) => {
|
|
378
|
-
|
|
379
|
-
...
|
|
384
|
+
F((T) => ({
|
|
385
|
+
...T,
|
|
380
386
|
[r.key]: g
|
|
381
|
-
})),
|
|
382
|
-
const m = { ...
|
|
387
|
+
})), O((T) => {
|
|
388
|
+
const m = { ...T };
|
|
383
389
|
return delete m[r.key], m;
|
|
384
390
|
});
|
|
385
391
|
}
|
|
386
392
|
} : {}
|
|
387
393
|
}),
|
|
388
|
-
|
|
394
|
+
v[r.key] && /* @__PURE__ */ l("p", { role: "alert", className: "make-app-approval-detail-error", children: v[r.key] })
|
|
389
395
|
] })
|
|
390
396
|
]
|
|
391
397
|
},
|
|
@@ -394,80 +400,84 @@ const H = (e) => e.actionType === "RETURN" || e.actionType === "REJECT" || e.act
|
|
|
394
400
|
] })
|
|
395
401
|
]
|
|
396
402
|
}
|
|
397
|
-
),
|
|
403
|
+
), de = B && /* @__PURE__ */ l(
|
|
398
404
|
"p",
|
|
399
405
|
{
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
406
|
+
...s,
|
|
407
|
+
role: D ? "status" : "alert",
|
|
408
|
+
className: `make-app-approval-detail-message${D ? "" : " make-app-approval-detail-error"}`,
|
|
409
|
+
children: B
|
|
403
410
|
}
|
|
404
|
-
),
|
|
411
|
+
), pe = e.history != null && /* @__PURE__ */ p(
|
|
405
412
|
"section",
|
|
406
413
|
{
|
|
414
|
+
...s,
|
|
407
415
|
className: "make-app-approval-detail-section make-app-approval-detail-history",
|
|
408
416
|
"aria-label": "审批流程",
|
|
409
417
|
children: [
|
|
410
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ l("h3", { children: "审批流程" }),
|
|
411
419
|
e.history
|
|
412
420
|
]
|
|
413
421
|
}
|
|
414
|
-
),
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
] }),
|
|
419
|
-
/* @__PURE__ */
|
|
422
|
+
), Oe = /* @__PURE__ */ p("div", { ...s, className: "make-app-approval-detail-content", "aria-busy": P, children: [
|
|
423
|
+
ce,
|
|
424
|
+
de,
|
|
425
|
+
pe
|
|
426
|
+
] }), me = !D && d.actions.length > 0 ? /* @__PURE__ */ p("div", { ...s, className: "make-app-approval-detail-section make-app-approval-detail-opinion", children: [
|
|
427
|
+
/* @__PURE__ */ p("label", { htmlFor: `${n}-comment`, children: [
|
|
420
428
|
"审批意见",
|
|
421
|
-
|
|
429
|
+
oe && /* @__PURE__ */ p("span", { className: "make-app-approval-required", "aria-label": "必填", children: [
|
|
422
430
|
" ",
|
|
423
431
|
"*"
|
|
424
432
|
] })
|
|
425
433
|
] }),
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
|
|
434
|
+
/* @__PURE__ */ l(
|
|
435
|
+
a,
|
|
428
436
|
{
|
|
429
|
-
id: `${
|
|
437
|
+
id: `${n}-comment`,
|
|
430
438
|
ariaLabel: "审批意见",
|
|
431
|
-
value:
|
|
439
|
+
value: $,
|
|
432
440
|
onChange: (r) => {
|
|
433
|
-
|
|
441
|
+
f(r), V("");
|
|
434
442
|
},
|
|
435
|
-
placeholder:
|
|
436
|
-
disabled:
|
|
437
|
-
required:
|
|
443
|
+
placeholder: ne.length ? `请输入审批意见,${ne.map((r) => X[r.actionType]).join("、")}时必填` : "请输入审批意见",
|
|
444
|
+
disabled: P,
|
|
445
|
+
required: oe,
|
|
438
446
|
maxLength: 1024
|
|
439
447
|
}
|
|
440
448
|
),
|
|
441
|
-
|
|
449
|
+
ee && /* @__PURE__ */ l("p", { role: "alert", className: "make-app-approval-detail-error", children: ee })
|
|
442
450
|
] }) : null;
|
|
443
|
-
return
|
|
444
|
-
title:
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
451
|
+
return ie({
|
|
452
|
+
title: be(d.processStatus, c.presentation, c.style),
|
|
453
|
+
themeStyle: c.style,
|
|
454
|
+
presentation: c.presentation,
|
|
455
|
+
detail: d,
|
|
456
|
+
sections: { application: ce, history: pe, opinion: me, feedback: de },
|
|
457
|
+
actionItems: D ? [] : d.actions.map((r) => ({
|
|
448
458
|
actionType: r.actionType,
|
|
449
|
-
label:
|
|
450
|
-
disabled:
|
|
451
|
-
loading:
|
|
459
|
+
label: X[r.actionType],
|
|
460
|
+
disabled: P,
|
|
461
|
+
loading: P && C === r.actionType,
|
|
452
462
|
onClick: () => {
|
|
453
|
-
|
|
463
|
+
le(r.actionType);
|
|
454
464
|
}
|
|
455
465
|
})),
|
|
456
|
-
actions:
|
|
457
|
-
content: /* @__PURE__ */
|
|
458
|
-
|
|
459
|
-
|
|
466
|
+
actions: Se,
|
|
467
|
+
content: /* @__PURE__ */ p(De, { children: [
|
|
468
|
+
Oe,
|
|
469
|
+
me
|
|
460
470
|
] }),
|
|
461
471
|
footer: null
|
|
462
472
|
});
|
|
463
|
-
},
|
|
473
|
+
}, Qe = (e) => {
|
|
464
474
|
if (!e.scopeKey.trim() || !e.reference.taskId.trim() || !e.reference.processInstanceId.trim())
|
|
465
475
|
throw new Error("ApprovalTaskDetail requires scopeKey and task reference");
|
|
466
476
|
for (const t of ["Button", "TextArea"])
|
|
467
477
|
if (!e.components?.[t])
|
|
468
478
|
throw new Error(`ApprovalTaskDetail requires components.${t}`);
|
|
469
|
-
return /* @__PURE__ */
|
|
470
|
-
|
|
479
|
+
return /* @__PURE__ */ l(
|
|
480
|
+
Be,
|
|
471
481
|
{
|
|
472
482
|
...e
|
|
473
483
|
},
|
|
@@ -477,81 +487,81 @@ const H = (e) => e.actionType === "RETURN" || e.actionType === "REJECT" || e.act
|
|
|
477
487
|
e.reference.taskId
|
|
478
488
|
])
|
|
479
489
|
);
|
|
480
|
-
},
|
|
481
|
-
if (!
|
|
482
|
-
const t = e.fields,
|
|
483
|
-
if (new Set(t.map((
|
|
484
|
-
if (e.fieldPermission !== void 0 && !
|
|
485
|
-
const
|
|
486
|
-
if (
|
|
487
|
-
const
|
|
490
|
+
}, L = (e) => !!e && typeof e == "object" && !Array.isArray(e), ve = (e) => typeof e == "string" && !!e.trim(), Ke = (e) => {
|
|
491
|
+
if (!L(e) || !ve(e.processInstanceId) || !ve(e.processStatus) || !Array.isArray(e.fields) || !e.fields.every(Ie) || !L(e.formData)) throw new Error("流程实例详情数据不完整");
|
|
492
|
+
const t = e.fields, a = e.formData;
|
|
493
|
+
if (new Set(t.map((n) => n.key)).size !== t.length) throw new Error("审批字段标识重复");
|
|
494
|
+
if (e.fieldPermission !== void 0 && !L(e.fieldPermission)) throw new Error("审批字段权限格式无效");
|
|
495
|
+
const o = K(e.fieldPermission?.viewPermission);
|
|
496
|
+
if (o.some((n) => !t.some((c) => c.key === n))) throw new Error("审批字段元数据缺失");
|
|
497
|
+
const i = e.summary;
|
|
488
498
|
return {
|
|
489
499
|
processInstanceId: e.processInstanceId,
|
|
490
500
|
processStatus: e.processStatus,
|
|
491
|
-
fields: t.filter((
|
|
492
|
-
formData: Object.fromEntries(
|
|
493
|
-
fieldPermission: { viewPermission: { scope: "FIELDS", fields:
|
|
494
|
-
...
|
|
501
|
+
fields: t.filter((n) => o.includes(n.key)),
|
|
502
|
+
formData: Object.fromEntries(o.map((n) => [n, a[n]])),
|
|
503
|
+
fieldPermission: { viewPermission: { scope: "FIELDS", fields: o } },
|
|
504
|
+
...L(i) && ["title", "applicantName", "applicationTime"].every((n) => typeof i[n] == "string") ? { summary: { title: String(i.title), applicantName: String(i.applicantName), applicationTime: String(i.applicationTime) } } : {}
|
|
495
505
|
};
|
|
496
|
-
},
|
|
497
|
-
/* @__PURE__ */
|
|
506
|
+
}, Le = ({ title: e, content: t, themeStyle: a, presentation: o }) => /* @__PURE__ */ p("section", { className: "make-app-approval-detail", "aria-label": "流程详情", style: a, "data-make-approval-theme": a ? o : void 0, "data-make-approval-presentation": o === "mobile" ? "mobile" : void 0, children: [
|
|
507
|
+
/* @__PURE__ */ l("header", { className: "make-app-approval-detail-header", children: e }),
|
|
498
508
|
t
|
|
499
|
-
] }),
|
|
500
|
-
const t =
|
|
501
|
-
|
|
502
|
-
const
|
|
503
|
-
return
|
|
509
|
+
] }), xe = (e) => {
|
|
510
|
+
const t = we(), a = ge(e.presentation ?? "desktop"), o = { style: a.style, "data-make-approval-theme": a.style ? a.presentation : void 0, "data-make-approval-presentation": a.presentation === "mobile" ? "mobile" : void 0 }, [i, n] = b(0), [c, s] = b(), y = J(e);
|
|
511
|
+
y.current = e, M(() => {
|
|
512
|
+
const f = new AbortController(), v = y.current;
|
|
513
|
+
return u(v.logger, { operation: "detail", phase: "start" }), (async () => {
|
|
504
514
|
try {
|
|
505
|
-
if (await Promise.resolve(),
|
|
506
|
-
const
|
|
507
|
-
if (
|
|
508
|
-
const
|
|
509
|
-
if (
|
|
510
|
-
s({ revision:
|
|
511
|
-
} catch (
|
|
512
|
-
if (
|
|
513
|
-
s({ revision:
|
|
515
|
+
if (await Promise.resolve(), f.signal.aborted) return;
|
|
516
|
+
const O = await v.provider.loadDetail(v.reference, { signal: f.signal });
|
|
517
|
+
if (f.signal.aborted) return;
|
|
518
|
+
const B = Ke(O);
|
|
519
|
+
if (B.processInstanceId !== v.reference.processInstanceId) throw new Error("流程实例标识不一致");
|
|
520
|
+
s({ revision: i, detail: B }), u(v.logger, { operation: "detail", phase: "success" });
|
|
521
|
+
} catch (O) {
|
|
522
|
+
if (f.signal.aborted) return;
|
|
523
|
+
s({ revision: i, error: !0 }), u(v.logger, { operation: "detail", phase: "error" }), v.onRequestError?.(O);
|
|
514
524
|
}
|
|
515
525
|
})(), () => {
|
|
516
|
-
|
|
526
|
+
f.abort(), u(v.logger, { operation: "detail", phase: "cancel" });
|
|
517
527
|
};
|
|
518
|
-
}, [
|
|
519
|
-
const
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
|
|
522
|
-
] }),
|
|
523
|
-
if (!
|
|
524
|
-
!e.onRequestError && /* @__PURE__ */
|
|
525
|
-
/* @__PURE__ */
|
|
526
|
-
] }) : /* @__PURE__ */
|
|
527
|
-
const
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
!
|
|
531
|
-
|
|
532
|
-
/* @__PURE__ */
|
|
533
|
-
/* @__PURE__ */
|
|
534
|
-
] },
|
|
528
|
+
}, [i]);
|
|
529
|
+
const h = c?.revision === i ? c : void 0, d = h?.detail, { Button: w } = e.components, F = /* @__PURE__ */ p("div", { ...o, className: "make-app-approval-detail-title", children: [
|
|
530
|
+
/* @__PURE__ */ l("h2", { children: "流程详情" }),
|
|
531
|
+
d && /* @__PURE__ */ l(Ee, { value: d.processStatus, presentation: a.presentation })
|
|
532
|
+
] }), C = e.renderLayout ?? Le;
|
|
533
|
+
if (!d) return C({ themeStyle: a.style, presentation: a.presentation, title: F, content: h?.error ? /* @__PURE__ */ p("div", { ...o, className: "make-app-approval-detail-request-state", children: [
|
|
534
|
+
!e.onRequestError && /* @__PURE__ */ l("p", { role: "alert", children: "流程详情加载失败" }),
|
|
535
|
+
/* @__PURE__ */ l(w, { htmlType: "button", variant: "default", onClick: () => n((f) => f + 1), children: "重新加载详情" })
|
|
536
|
+
] }) : /* @__PURE__ */ l("div", { ...o, className: "make-app-approval-detail-request-state", role: "status", children: "正在加载审批详情…" }) });
|
|
537
|
+
const A = /* @__PURE__ */ p("section", { ...o, className: "make-app-approval-detail-section", "aria-label": "申请信息", "data-presentation": e.presentation === "mobile" ? "mobile" : void 0, children: [
|
|
538
|
+
/* @__PURE__ */ l("h3", { children: "申请信息" }),
|
|
539
|
+
/* @__PURE__ */ p("div", { className: "make-app-approval-detail-fields", children: [
|
|
540
|
+
!d.fields.length && /* @__PURE__ */ l("p", { children: "当前节点未配置可见字段" }),
|
|
541
|
+
d.fields.map((f) => /* @__PURE__ */ p("div", { className: "make-app-approval-detail-field", "data-readonly": !0, "data-full-width": !!f.fullWidth, children: [
|
|
542
|
+
/* @__PURE__ */ l("label", { htmlFor: `${t}-${f.key}`, children: f.label }),
|
|
543
|
+
/* @__PURE__ */ l("div", { className: "make-app-approval-detail-value", children: e.renderField({ field: f, id: `${t}-${f.key}`, value: d.formData[f.key], readOnly: !0, disabled: !0 }) })
|
|
544
|
+
] }, f.key))
|
|
535
545
|
] })
|
|
536
|
-
] }),
|
|
537
|
-
/* @__PURE__ */
|
|
546
|
+
] }), $ = e.history != null ? /* @__PURE__ */ p("section", { ...o, className: "make-app-approval-detail-section make-app-approval-detail-history", "aria-label": "审批流程", children: [
|
|
547
|
+
/* @__PURE__ */ l("h3", { children: "审批流程" }),
|
|
538
548
|
e.history
|
|
539
549
|
] }) : null;
|
|
540
|
-
return
|
|
541
|
-
|
|
542
|
-
|
|
550
|
+
return C({ themeStyle: a.style, presentation: a.presentation, title: F, detail: d, sections: { application: A, history: $, feedback: null }, content: /* @__PURE__ */ p("div", { ...o, className: "make-app-approval-detail-content", children: [
|
|
551
|
+
A,
|
|
552
|
+
$
|
|
543
553
|
] }) });
|
|
544
|
-
},
|
|
554
|
+
}, Ge = (e) => {
|
|
545
555
|
if (!e.scopeKey.trim() || !e.reference.processInstanceId.trim()) throw new Error("ApprovalInstanceDetail requires scopeKey and instance reference");
|
|
546
556
|
if (!e.components?.Button) throw new Error("ApprovalInstanceDetail requires Button");
|
|
547
|
-
return /* @__PURE__ */
|
|
557
|
+
return /* @__PURE__ */ l(xe, { ...e }, JSON.stringify([e.scopeKey, e.reference.processInstanceId]));
|
|
548
558
|
};
|
|
549
559
|
export {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
560
|
+
Ge as ApprovalInstanceDetail,
|
|
561
|
+
Qe as ApprovalTaskDetail,
|
|
562
|
+
E as ApprovalTaskValidationError,
|
|
563
|
+
ke as buildApprovalTaskAction,
|
|
564
|
+
x as getApprovalTaskFields,
|
|
565
|
+
Ke as readApprovalInstanceDetail,
|
|
566
|
+
Ne as readApprovalTaskDetail
|
|
557
567
|
};
|