@rytass/bpm-core-react 0.3.1 → 0.3.2
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/CHANGELOG.md +131 -0
- package/dist/chunks/app-navigation-BSkMsEhy.js +268 -0
- package/dist/chunks/app-navigation-BSkMsEhy.js.map +1 -0
- package/dist/chunks/app-navigation-KnlJCUp1.cjs +2 -0
- package/dist/chunks/app-navigation-KnlJCUp1.cjs.map +1 -0
- package/dist/chunks/approval-instance-list-page-CVXgE2K3.cjs +2 -0
- package/dist/chunks/approval-instance-list-page-CVXgE2K3.cjs.map +1 -0
- package/dist/chunks/{approval-instance-list-page-nmzMrj0b.js → approval-instance-list-page-CqNdoZqx.js} +73 -72
- package/dist/chunks/approval-instance-list-page-CqNdoZqx.js.map +1 -0
- package/dist/chunks/builder-CMlJfQHE.cjs +3 -0
- package/dist/chunks/builder-CMlJfQHE.cjs.map +1 -0
- package/dist/chunks/{builder-DqZskyXC.js → builder-D950gct_.js} +492 -491
- package/dist/chunks/builder-D950gct_.js.map +1 -0
- package/dist/chunks/categories-5yEM3p3N.cjs +2 -0
- package/dist/chunks/categories-5yEM3p3N.cjs.map +1 -0
- package/dist/chunks/{categories-DTEl182t.js → categories-BIpOG451.js} +115 -114
- package/dist/chunks/categories-BIpOG451.js.map +1 -0
- package/dist/chunks/dashboard-page-1K_jQXQk.cjs +2 -0
- package/dist/chunks/dashboard-page-1K_jQXQk.cjs.map +1 -0
- package/dist/chunks/dashboard-page-R_T2OEiE.js +122 -0
- package/dist/chunks/dashboard-page-R_T2OEiE.js.map +1 -0
- package/dist/chunks/{delegations-C5PzZ5Kn.js → delegations-B2j-wNEO.js} +193 -192
- package/dist/chunks/delegations-B2j-wNEO.js.map +1 -0
- package/dist/chunks/delegations-CsB9ozLu.cjs +2 -0
- package/dist/chunks/delegations-CsB9ozLu.cjs.map +1 -0
- package/dist/chunks/delegations-CvtwTXNP.cjs +2 -0
- package/dist/chunks/delegations-CvtwTXNP.cjs.map +1 -0
- package/dist/chunks/{delegations-C-ZrwzvU.js → delegations-dKodb0WW.js} +175 -174
- package/dist/chunks/delegations-dKodb0WW.js.map +1 -0
- package/dist/chunks/{detail-CfFyU5zC.js → detail-BcGAqJ_R.js} +465 -464
- package/dist/chunks/detail-BcGAqJ_R.js.map +1 -0
- package/dist/chunks/detail-CqjqLd65.cjs +2 -0
- package/dist/chunks/detail-CqjqLd65.cjs.map +1 -0
- package/dist/chunks/{format-date-time-isOa3e9q.cjs → format-date-time-26_pFvv4.cjs} +2 -2
- package/dist/chunks/{format-date-time-isOa3e9q.cjs.map → format-date-time-26_pFvv4.cjs.map} +1 -1
- package/dist/chunks/notifications-2swRqDPF.js +198 -0
- package/dist/chunks/notifications-2swRqDPF.js.map +1 -0
- package/dist/chunks/notifications-BaYDebFt.cjs +2 -0
- package/dist/chunks/notifications-BaYDebFt.cjs.map +1 -0
- package/dist/chunks/{orgs-xrdhb3hS.js → orgs-CuHxxd_n.js} +608 -607
- package/dist/chunks/orgs-CuHxxd_n.js.map +1 -0
- package/dist/chunks/orgs-YMiVLNvL.cjs +2 -0
- package/dist/chunks/orgs-YMiVLNvL.cjs.map +1 -0
- package/dist/chunks/routes-config-2aKbWq2H.cjs +2 -0
- package/dist/chunks/routes-config-2aKbWq2H.cjs.map +1 -0
- package/dist/chunks/routes-config-dxahImVe.js +43 -0
- package/dist/chunks/routes-config-dxahImVe.js.map +1 -0
- package/dist/chunks/templates-DTkbSgFY.cjs +2 -0
- package/dist/chunks/templates-DTkbSgFY.cjs.map +1 -0
- package/dist/chunks/templates-DoDWM68t.js +384 -0
- package/dist/chunks/templates-DoDWM68t.js.map +1 -0
- package/dist/chunks/users-3ySyUW4u.cjs +2 -0
- package/dist/chunks/users-3ySyUW4u.cjs.map +1 -0
- package/dist/chunks/{users-CY4-NK3j.js → users-sMfrSjRQ.js} +75 -74
- package/dist/chunks/users-sMfrSjRQ.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +101 -99
- package/dist/index.js.map +1 -1
- package/dist/lib/routes-config.d.ts +96 -0
- package/dist/next/index.cjs +1 -1
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.ts +1 -0
- package/dist/next/index.js +22 -21
- package/dist/next/index.js.map +1 -1
- package/dist/pages/admin/delegations/index.cjs +1 -1
- package/dist/pages/admin/delegations/index.js +1 -1
- package/dist/pages/admin/orgs/index.cjs +1 -1
- package/dist/pages/admin/orgs/index.js +1 -1
- package/dist/pages/admin/users/index.cjs +1 -1
- package/dist/pages/admin/users/index.js +1 -1
- package/dist/pages/delegations/index.cjs +1 -1
- package/dist/pages/delegations/index.js +1 -1
- package/dist/pages/forms/builder/index.cjs +1 -1
- package/dist/pages/forms/builder/index.js +1 -1
- package/dist/pages/instances/detail/index.cjs +1 -1
- package/dist/pages/instances/detail/index.js +1 -1
- package/dist/pages/settings/notifications/index.cjs +1 -1
- package/dist/pages/settings/notifications/index.js +1 -1
- package/dist/pages/templates/categories/index.cjs +1 -1
- package/dist/pages/templates/categories/index.js +1 -1
- package/dist/pages/templates/index.cjs +1 -1
- package/dist/pages/templates/index.js +1 -1
- package/dist/views/admin/delegations/index.cjs +1 -1
- package/dist/views/admin/delegations/index.js +1 -1
- package/dist/views/admin/index.cjs +1 -1
- package/dist/views/admin/index.js +3 -3
- package/dist/views/admin/orgs/index.cjs +1 -1
- package/dist/views/admin/orgs/index.js +1 -1
- package/dist/views/admin/users/index.cjs +1 -1
- package/dist/views/admin/users/index.js +1 -1
- package/dist/views/cc/index.cjs +1 -1
- package/dist/views/cc/index.js +1 -1
- package/dist/views/dashboard/index.cjs +1 -1
- package/dist/views/dashboard/index.js +1 -1
- package/dist/views/delegations/index.cjs +1 -1
- package/dist/views/delegations/index.js +1 -1
- package/dist/views/forms/builder/index.cjs +1 -1
- package/dist/views/forms/builder/index.js +1 -1
- package/dist/views/forms/index.cjs +1 -1
- package/dist/views/forms/index.cjs.map +1 -1
- package/dist/views/forms/index.js +78 -77
- package/dist/views/forms/index.js.map +1 -1
- package/dist/views/inbox/index.cjs +1 -1
- package/dist/views/inbox/index.cjs.map +1 -1
- package/dist/views/inbox/index.js +106 -105
- package/dist/views/inbox/index.js.map +1 -1
- package/dist/views/instances/detail/index.cjs +1 -1
- package/dist/views/instances/detail/index.js +1 -1
- package/dist/views/instances/new/index.cjs +1 -1
- package/dist/views/instances/new/index.cjs.map +1 -1
- package/dist/views/instances/new/index.js +90 -89
- package/dist/views/instances/new/index.js.map +1 -1
- package/dist/views/search/index.cjs +1 -1
- package/dist/views/search/index.js +1 -1
- package/dist/views/sent/index.cjs +1 -1
- package/dist/views/sent/index.js +1 -1
- package/dist/views/settings/index.cjs +1 -1
- package/dist/views/settings/index.js +1 -1
- package/dist/views/settings/notifications/index.cjs +1 -1
- package/dist/views/settings/notifications/index.js +1 -1
- package/dist/views/templates/categories/index.cjs +1 -1
- package/dist/views/templates/categories/index.js +1 -1
- package/dist/views/templates/designer/index.cjs +6 -6
- package/dist/views/templates/designer/index.cjs.map +1 -1
- package/dist/views/templates/designer/index.js +589 -588
- package/dist/views/templates/designer/index.js.map +1 -1
- package/dist/views/templates/index.cjs +1 -1
- package/dist/views/templates/index.js +2 -2
- package/dist/views/templates/versions/index.cjs +1 -1
- package/dist/views/templates/versions/index.cjs.map +1 -1
- package/dist/views/templates/versions/index.js +44 -43
- package/dist/views/templates/versions/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunks/app-navigation-C_mbz7jx.cjs +0 -2
- package/dist/chunks/app-navigation-C_mbz7jx.cjs.map +0 -1
- package/dist/chunks/app-navigation-uwbNEw9P.js +0 -262
- package/dist/chunks/app-navigation-uwbNEw9P.js.map +0 -1
- package/dist/chunks/approval-instance-list-page-Mo6wpDPb.cjs +0 -2
- package/dist/chunks/approval-instance-list-page-Mo6wpDPb.cjs.map +0 -1
- package/dist/chunks/approval-instance-list-page-nmzMrj0b.js.map +0 -1
- package/dist/chunks/builder-DPhAH381.cjs +0 -3
- package/dist/chunks/builder-DPhAH381.cjs.map +0 -1
- package/dist/chunks/builder-DqZskyXC.js.map +0 -1
- package/dist/chunks/categories-DEijUOnw.cjs +0 -2
- package/dist/chunks/categories-DEijUOnw.cjs.map +0 -1
- package/dist/chunks/categories-DTEl182t.js.map +0 -1
- package/dist/chunks/dashboard-page-DCmuB0Rw.cjs +0 -2
- package/dist/chunks/dashboard-page-DCmuB0Rw.cjs.map +0 -1
- package/dist/chunks/dashboard-page-Dx5PeEeN.js +0 -117
- package/dist/chunks/dashboard-page-Dx5PeEeN.js.map +0 -1
- package/dist/chunks/delegations-C-ZrwzvU.js.map +0 -1
- package/dist/chunks/delegations-C5PzZ5Kn.js.map +0 -1
- package/dist/chunks/delegations-DOGDvybX.cjs +0 -2
- package/dist/chunks/delegations-DOGDvybX.cjs.map +0 -1
- package/dist/chunks/delegations-DkDBWOQ7.cjs +0 -2
- package/dist/chunks/delegations-DkDBWOQ7.cjs.map +0 -1
- package/dist/chunks/detail-B2gcOPkd.cjs +0 -2
- package/dist/chunks/detail-B2gcOPkd.cjs.map +0 -1
- package/dist/chunks/detail-CfFyU5zC.js.map +0 -1
- package/dist/chunks/notifications-CPQ-nVar.cjs +0 -2
- package/dist/chunks/notifications-CPQ-nVar.cjs.map +0 -1
- package/dist/chunks/notifications-DweexUVy.js +0 -197
- package/dist/chunks/notifications-DweexUVy.js.map +0 -1
- package/dist/chunks/orgs-DgZ0DQ3-.cjs +0 -2
- package/dist/chunks/orgs-DgZ0DQ3-.cjs.map +0 -1
- package/dist/chunks/orgs-xrdhb3hS.js.map +0 -1
- package/dist/chunks/templates-PK_VYvcy.js +0 -383
- package/dist/chunks/templates-PK_VYvcy.js.map +0 -1
- package/dist/chunks/templates-x1OJZmsG.cjs +0 -2
- package/dist/chunks/templates-x1OJZmsG.cjs.map +0 -1
- package/dist/chunks/users-CY4-NK3j.js.map +0 -1
- package/dist/chunks/users-DHnu_056.cjs +0 -2
- package/dist/chunks/users-DHnu_056.cjs.map +0 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { n as e } from "./auth-provider-Bnox5gsx.js";
|
|
3
3
|
import { t } from "./format-date-time-CB-LxzqT.js";
|
|
4
|
-
import { t as n } from "./app-navigation-
|
|
5
|
-
import {
|
|
6
|
-
import { t as i } from "./
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { t as n } from "./app-navigation-BSkMsEhy.js";
|
|
5
|
+
import { r } from "./routes-config-dxahImVe.js";
|
|
6
|
+
import { t as i } from "./bpm-form-field-Cao0rMol.js";
|
|
7
|
+
import { t as a } from "./FormRendererView-DrHsuSVo.js";
|
|
8
|
+
import { Fragment as o, forwardRef as s, useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
9
|
+
import { AutoComplete as p, Button as m, Modal as h, PageHeader as ee, Section as g, SectionGroup as te, Select as ne, Stepper as re, Table as ie, Textarea as _, Tooltip as ae, Typography as v } from "@mezzanine-ui/react";
|
|
10
|
+
import { Fragment as oe, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
11
|
+
import { cancelApprovalInstance as se, decideTask as ce, listAttachments as le, listTaskDecisions as ue, readApprovalInstance as de, readAttachmentDownloadUrl as fe, readAttachmentPreviewUrl as pe, readInstanceSignatures as me, resolveMemberProfiles as x, resubmitApprovalInstance as he, searchMembers as ge, uploadAttachment as _e } from "@rytass/bpm-core-client/workflow";
|
|
11
12
|
import { CheckedIcon as ve, ChevronLeftIcon as ye, ChevronRightIcon as be, DangerousOutlineIcon as xe, DownloadIcon as Se, FileSearchIcon as Ce, RefreshCcwIcon as we, ShareIcon as Te, UserIcon as Ee, ZoomInIcon as De, ZoomOutIcon as Oe } from "@mezzanine-ui/icons";
|
|
12
13
|
import ke from "@mezzanine-ui/react/ContentHeader";
|
|
13
14
|
import { focusFormRendererField as Ae, validateFormRendererValues as je } from "@rytass/bpm-core-client/form";
|
|
14
|
-
import { Background as Me, Controls as Ne, Handle as
|
|
15
|
-
import * as
|
|
16
|
-
import { stepClasses as
|
|
17
|
-
import { Document as
|
|
18
|
-
import '../detail.css';var
|
|
15
|
+
import { Background as Me, Controls as Ne, Handle as Pe, Position as S, ReactFlow as Fe } from "@xyflow/react";
|
|
16
|
+
import * as Ie from "dagre";
|
|
17
|
+
import { stepClasses as C } from "@mezzanine-ui/core/stepper";
|
|
18
|
+
import { Document as Le, Page as w } from "react-pdf";
|
|
19
|
+
import '../detail.css';var T = {
|
|
19
20
|
root: "bpm_root_ehm7w",
|
|
20
21
|
toolbar: "bpm_toolbar_R-tis",
|
|
21
22
|
pageControls: "bpm_pageControls_jM-rC",
|
|
@@ -24,97 +25,97 @@ import '../detail.css';var E = {
|
|
|
24
25
|
viewport: "bpm_viewport_DQXms",
|
|
25
26
|
page: "bpm_page_Cv5Rg",
|
|
26
27
|
state: "bpm_state_bpgp3"
|
|
27
|
-
},
|
|
28
|
-
function
|
|
29
|
-
let r =
|
|
30
|
-
|
|
28
|
+
}, E = 760, Re = 920, ze = 320, Be = 32, Ve = .75, D = 1.75, He = .25;
|
|
29
|
+
function Ue({ filename: e, fileUrl: t, onDownload: n }) {
|
|
30
|
+
let r = d(null), [i, a] = f(null), [o, s] = f(1), [p, h] = f(1), [ee, g] = f(E);
|
|
31
|
+
l(() => {
|
|
31
32
|
let e = r.current;
|
|
32
33
|
if (!e || typeof ResizeObserver > "u") return;
|
|
33
34
|
let t = new ResizeObserver((e) => {
|
|
34
35
|
let t = e[0]?.contentRect.width;
|
|
35
|
-
t &&
|
|
36
|
+
t && g(t);
|
|
36
37
|
});
|
|
37
38
|
return t.observe(e), () => t.disconnect();
|
|
38
|
-
}, []),
|
|
39
|
-
a(null),
|
|
39
|
+
}, []), l(() => {
|
|
40
|
+
a(null), s(1), h(1);
|
|
40
41
|
}, [t]);
|
|
41
|
-
let
|
|
42
|
-
let e = Math.max(
|
|
43
|
-
return Math.round(Math.min(
|
|
44
|
-
}, [
|
|
45
|
-
a(e.numPages),
|
|
46
|
-
}, []),
|
|
47
|
-
return /* @__PURE__ */
|
|
42
|
+
let te = u(() => {
|
|
43
|
+
let e = Math.max(ze, ee - Be);
|
|
44
|
+
return Math.round(Math.min(Re, e) * p);
|
|
45
|
+
}, [p, ee]), ne = c((e) => {
|
|
46
|
+
a(e.numPages), s(1);
|
|
47
|
+
}, []), re = o > 1, ie = i !== null && o < i, _ = p > Ve, ae = p < D, oe = i === null ? `第 ${o} 頁` : `第 ${o} / ${i} 頁`, se = `${Math.round(p * 100)}%`;
|
|
48
|
+
return /* @__PURE__ */ b("section", {
|
|
48
49
|
"aria-label": `${e} PDF 預覽`,
|
|
49
|
-
className:
|
|
50
|
-
children: [/* @__PURE__ */
|
|
51
|
-
className:
|
|
50
|
+
className: T.root,
|
|
51
|
+
children: [/* @__PURE__ */ b("div", {
|
|
52
|
+
className: T.toolbar,
|
|
52
53
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
className:
|
|
54
|
+
/* @__PURE__ */ b("div", {
|
|
55
|
+
className: T.pageControls,
|
|
55
56
|
"aria-label": "頁面切換",
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ y(m, {
|
|
58
59
|
"aria-label": "上一頁",
|
|
59
|
-
disabled: !
|
|
60
|
+
disabled: !re,
|
|
60
61
|
icon: ye,
|
|
61
62
|
onClick: () => {
|
|
62
|
-
|
|
63
|
+
s((e) => Math.max(1, e - 1));
|
|
63
64
|
},
|
|
64
65
|
size: "minor",
|
|
65
66
|
variant: "base-secondary"
|
|
66
67
|
}),
|
|
67
|
-
/* @__PURE__ */ v
|
|
68
|
-
className:
|
|
68
|
+
/* @__PURE__ */ y(v, {
|
|
69
|
+
className: T.counter,
|
|
69
70
|
component: "span",
|
|
70
71
|
variant: "body",
|
|
71
|
-
children:
|
|
72
|
+
children: oe
|
|
72
73
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ y(m, {
|
|
74
75
|
"aria-label": "下一頁",
|
|
75
|
-
disabled: !
|
|
76
|
+
disabled: !ie,
|
|
76
77
|
icon: be,
|
|
77
78
|
onClick: () => {
|
|
78
|
-
|
|
79
|
+
s((e) => i === null ? e : Math.min(i, e + 1));
|
|
79
80
|
},
|
|
80
81
|
size: "minor",
|
|
81
82
|
variant: "base-secondary"
|
|
82
83
|
})
|
|
83
84
|
]
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
className:
|
|
86
|
+
/* @__PURE__ */ b("div", {
|
|
87
|
+
className: T.zoomControls,
|
|
87
88
|
"aria-label": "縮放",
|
|
88
89
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ y(m, {
|
|
90
91
|
"aria-label": "縮小",
|
|
91
|
-
disabled: !
|
|
92
|
+
disabled: !_,
|
|
92
93
|
icon: Oe,
|
|
93
94
|
onClick: () => {
|
|
94
|
-
|
|
95
|
+
h((e) => Math.max(Ve, e - He));
|
|
95
96
|
},
|
|
96
97
|
size: "minor",
|
|
97
98
|
variant: "base-secondary"
|
|
98
99
|
}),
|
|
99
|
-
/* @__PURE__ */ v
|
|
100
|
-
className:
|
|
100
|
+
/* @__PURE__ */ y(v, {
|
|
101
|
+
className: T.counter,
|
|
101
102
|
component: "span",
|
|
102
103
|
variant: "body",
|
|
103
|
-
children:
|
|
104
|
+
children: se
|
|
104
105
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ y(m, {
|
|
106
107
|
"aria-label": "放大",
|
|
107
|
-
disabled: !
|
|
108
|
+
disabled: !ae,
|
|
108
109
|
icon: De,
|
|
109
110
|
onClick: () => {
|
|
110
|
-
|
|
111
|
+
h((e) => Math.min(D, e + He));
|
|
111
112
|
},
|
|
112
113
|
size: "minor",
|
|
113
114
|
variant: "base-secondary"
|
|
114
115
|
})
|
|
115
116
|
]
|
|
116
117
|
}),
|
|
117
|
-
n ? /* @__PURE__ */
|
|
118
|
+
n ? /* @__PURE__ */ y(m, {
|
|
118
119
|
icon: Se,
|
|
119
120
|
iconType: "leading",
|
|
120
121
|
onClick: n,
|
|
@@ -123,31 +124,31 @@ function He({ filename: e, fileUrl: t, onDownload: n }) {
|
|
|
123
124
|
children: "下載"
|
|
124
125
|
}) : null
|
|
125
126
|
]
|
|
126
|
-
}), /* @__PURE__ */
|
|
127
|
-
className:
|
|
127
|
+
}), /* @__PURE__ */ y("div", {
|
|
128
|
+
className: T.viewport,
|
|
128
129
|
ref: r,
|
|
129
|
-
children: /* @__PURE__ */
|
|
130
|
-
error: /* @__PURE__ */
|
|
130
|
+
children: /* @__PURE__ */ y(Le, {
|
|
131
|
+
error: /* @__PURE__ */ y(O, { message: "PDF 無法載入。" }),
|
|
131
132
|
file: t,
|
|
132
|
-
loading: /* @__PURE__ */
|
|
133
|
-
noData: /* @__PURE__ */
|
|
134
|
-
onLoadSuccess:
|
|
135
|
-
children: /* @__PURE__ */
|
|
136
|
-
className:
|
|
137
|
-
loading: /* @__PURE__ */
|
|
133
|
+
loading: /* @__PURE__ */ y(O, { message: "正在載入 PDF..." }),
|
|
134
|
+
noData: /* @__PURE__ */ y(O, { message: "沒有可預覽的 PDF。" }),
|
|
135
|
+
onLoadSuccess: ne,
|
|
136
|
+
children: /* @__PURE__ */ y(w, {
|
|
137
|
+
className: T.page,
|
|
138
|
+
loading: /* @__PURE__ */ y(O, { message: "正在載入頁面..." }),
|
|
138
139
|
pageNumber: o,
|
|
139
140
|
renderAnnotationLayer: !0,
|
|
140
141
|
renderTextLayer: !0,
|
|
141
|
-
width:
|
|
142
|
+
width: te
|
|
142
143
|
})
|
|
143
144
|
})
|
|
144
145
|
})]
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
148
|
function O({ message: e }) {
|
|
148
|
-
return /* @__PURE__ */
|
|
149
|
-
className:
|
|
150
|
-
children: /* @__PURE__ */ v
|
|
149
|
+
return /* @__PURE__ */ y("div", {
|
|
150
|
+
className: T.state,
|
|
151
|
+
children: /* @__PURE__ */ y(v, {
|
|
151
152
|
color: "text-neutral",
|
|
152
153
|
variant: "body",
|
|
153
154
|
children: e
|
|
@@ -159,11 +160,11 @@ function O({ message: e }) {
|
|
|
159
160
|
var k = {
|
|
160
161
|
display: "grid",
|
|
161
162
|
gap: 16
|
|
162
|
-
},
|
|
163
|
+
}, We = {
|
|
163
164
|
display: "flex",
|
|
164
165
|
flexWrap: "wrap",
|
|
165
166
|
gap: 8
|
|
166
|
-
}, A = 184,
|
|
167
|
+
}, A = 184, j = 96, Ge = {
|
|
167
168
|
display: "grid",
|
|
168
169
|
gap: 16
|
|
169
170
|
}, Ke = {
|
|
@@ -185,7 +186,7 @@ var k = {
|
|
|
185
186
|
minHeight: 440,
|
|
186
187
|
overflow: "hidden",
|
|
187
188
|
width: "min(80vw, 1040px)"
|
|
188
|
-
},
|
|
189
|
+
}, M = {
|
|
189
190
|
background: "#ffffff",
|
|
190
191
|
border: "1px solid #cbd5e1",
|
|
191
192
|
borderRadius: 8,
|
|
@@ -224,47 +225,47 @@ var k = {
|
|
|
224
225
|
gap: 6,
|
|
225
226
|
lineHeight: "20px",
|
|
226
227
|
padding: "4px 8px"
|
|
227
|
-
},
|
|
228
|
+
}, tt = {
|
|
228
229
|
cursor: "help",
|
|
229
230
|
textDecoration: "underline dotted",
|
|
230
231
|
textUnderlineOffset: 3
|
|
231
|
-
},
|
|
232
|
+
}, N = { color: "var(--mzn-color-text-error)" };
|
|
232
233
|
function nt(e) {
|
|
233
234
|
e && (e.style.width = "100%");
|
|
234
235
|
}
|
|
235
|
-
var rt = { workflowRuntime:
|
|
236
|
-
function
|
|
237
|
-
let { member:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}, [
|
|
241
|
-
|
|
242
|
-
}, [
|
|
243
|
-
let
|
|
236
|
+
var rt = { workflowRuntime: X };
|
|
237
|
+
function it({ instanceId: o }) {
|
|
238
|
+
let s = r(), { member: c } = e(), d = c?.memberId ?? null, [ae, ue] = f([]), [x, ye] = f(null), [be, De] = f([]), [Oe, Pe] = f([]), [S, Ie] = f([]), [C, Le] = f(null), [w, T] = f([]), [E, Re] = f([]), [ze, Be] = f([]), [Ve, D] = f(null), [He, O] = f(!0), [A, j] = f(!1), [M, Xe] = f(!1), [Ze, Qe] = f(""), [tt, N] = f(!1), [it, F] = f(""), [ct, I] = f(null), [pt, L] = f(!1), [R, z] = f(""), [ht, gt] = f(!1), [_t, B] = f(null), [vt, V] = f(""), [H, U] = f(null), [yt, bt] = f(!1), [xt, St] = f([]), [Ct, wt] = f(!1), [Tt, G] = f({}), [jt, Mt] = f({}), [K, Nt] = f(null), [q, Lt] = f(null), J = it.trim(), Y = Ze.trim(), Rt = R.trim(), zt = vt.trim();
|
|
239
|
+
l(() => {
|
|
240
|
+
un();
|
|
241
|
+
}, [d, o]), l(() => {
|
|
242
|
+
Mt(x?.formData ?? {});
|
|
243
|
+
}, [x]);
|
|
244
|
+
let X = u(() => w.find((e) => kt(e, d) && (e.status === "PENDING" || e.status === "IN_PROGRESS")) ?? null, [d, w]), Z = u(() => X && x ? x.workflowSnapshot.nodes.find((e) => e.id === X.nodeId) ?? null : null, [X, x]), Q = u(() => Z && x ? Et(x.workflowSnapshot, Z) : [], [Z, x]), Ut = Z?.type === "userTask" && Z.data.returnBehavior.allowReturn, Wt = Q.find((e) => e.id === _t) ?? Q[0] ?? null, Gt = !!(x && x.initiatorMemberId === d && (x.state === "RUNNING" || x.state === "RETURNED")), qt = !!(x && x.initiatorMemberId === d && x.state === "RETURNED"), Jt = u(() => new Map(ze.map((e) => [e.memberId, e])), [ze]), Yt = u(() => w.map((e) => ({
|
|
244
245
|
...e,
|
|
245
|
-
assigneeLabel: Ot(e,
|
|
246
|
+
assigneeLabel: Ot(e, Jt),
|
|
246
247
|
key: e.id,
|
|
247
|
-
nodeLabel:
|
|
248
|
+
nodeLabel: W(e.nodeId, x?.workflowSnapshot ?? null),
|
|
248
249
|
statusLabel: Dt(e.status)
|
|
249
250
|
})), [
|
|
250
|
-
|
|
251
|
-
Kt,
|
|
252
|
-
T
|
|
253
|
-
]), Jt = l(() => lt(ye), [ye]), Yt = l(() => new Map(x.map((e) => [e.id, e])), [x]), Xt = l(() => ut(u, T, E, b?.workflowSnapshot ?? null, b?.state ?? "RUNNING", Kt, Jt, Yt, C), [
|
|
254
|
-
u,
|
|
255
|
-
b,
|
|
256
|
-
Kt,
|
|
257
|
-
C,
|
|
258
|
-
Yt,
|
|
251
|
+
x,
|
|
259
252
|
Jt,
|
|
260
|
-
|
|
253
|
+
w
|
|
254
|
+
]), Xt = u(() => dt(be), [be]), Zt = u(() => new Map(S.map((e) => [e.id, e])), [S]), Qt = u(() => ft(ae, w, E, x?.workflowSnapshot ?? null, x?.state ?? "RUNNING", Jt, Xt, Zt, C), [
|
|
255
|
+
ae,
|
|
256
|
+
x,
|
|
257
|
+
Jt,
|
|
258
|
+
C,
|
|
259
|
+
Zt,
|
|
260
|
+
Xt,
|
|
261
|
+
w,
|
|
261
262
|
E
|
|
262
|
-
]),
|
|
263
|
-
|
|
263
|
+
]), $t = u(() => mt(Qt), [Qt]), $ = u(() => x ? Vt(x.workflowSnapshot) : null, [x]), en = u(() => x && $ ? Bt($, w, E, x.state) : [], [
|
|
264
|
+
x,
|
|
264
265
|
$,
|
|
265
|
-
|
|
266
|
+
w,
|
|
266
267
|
E
|
|
267
|
-
]),
|
|
268
|
+
]), tn = u(() => $ ? Ht($) : [], [$]), nn = u(() => x ? Kt(x.workflowSnapshot) : [], [x]), rn = u(() => [
|
|
268
269
|
{
|
|
269
270
|
dataIndex: "nodeLabel",
|
|
270
271
|
key: "nodeLabel",
|
|
@@ -274,7 +275,7 @@ function N({ instanceId: a }) {
|
|
|
274
275
|
{
|
|
275
276
|
key: "assigneeMemberId",
|
|
276
277
|
title: "處理者",
|
|
277
|
-
render: (e) => /* @__PURE__ */ v
|
|
278
|
+
render: (e) => /* @__PURE__ */ y(v, {
|
|
278
279
|
component: "span",
|
|
279
280
|
variant: "body",
|
|
280
281
|
children: e.assigneeLabel
|
|
@@ -289,7 +290,7 @@ function N({ instanceId: a }) {
|
|
|
289
290
|
},
|
|
290
291
|
{
|
|
291
292
|
key: "createdAt",
|
|
292
|
-
render: (e) => /* @__PURE__ */ v
|
|
293
|
+
render: (e) => /* @__PURE__ */ y(v, {
|
|
293
294
|
component: "span",
|
|
294
295
|
variant: "body",
|
|
295
296
|
children: t(e.createdAt)
|
|
@@ -297,15 +298,15 @@ function N({ instanceId: a }) {
|
|
|
297
298
|
title: "建立時間",
|
|
298
299
|
width: 220
|
|
299
300
|
}
|
|
300
|
-
], []),
|
|
301
|
+
], []), an = u(() => Oe.map((e) => ({
|
|
301
302
|
attachment: e,
|
|
302
303
|
createdAt: e.createdAt,
|
|
303
304
|
filename: e.filename,
|
|
304
305
|
id: e.id,
|
|
305
306
|
key: e.id,
|
|
306
307
|
mimeType: e.mimeType,
|
|
307
|
-
sizeLabel:
|
|
308
|
-
})), [
|
|
308
|
+
sizeLabel: at(Number(e.sizeBytes))
|
|
309
|
+
})), [Oe]), on = u(() => [
|
|
309
310
|
{
|
|
310
311
|
dataIndex: "filename",
|
|
311
312
|
key: "filename",
|
|
@@ -326,7 +327,7 @@ function N({ instanceId: a }) {
|
|
|
326
327
|
},
|
|
327
328
|
{
|
|
328
329
|
key: "createdAt",
|
|
329
|
-
render: (e) => /* @__PURE__ */ v
|
|
330
|
+
render: (e) => /* @__PURE__ */ y(v, {
|
|
330
331
|
component: "span",
|
|
331
332
|
variant: "body",
|
|
332
333
|
children: t(e.createdAt)
|
|
@@ -334,32 +335,32 @@ function N({ instanceId: a }) {
|
|
|
334
335
|
title: "上傳時間",
|
|
335
336
|
width: 220
|
|
336
337
|
}
|
|
337
|
-
], []),
|
|
338
|
+
], []), sn = u(() => ({
|
|
338
339
|
render: (e) => [...e.mimeType === "application/pdf" ? [{
|
|
339
340
|
icon: Ce,
|
|
340
341
|
iconType: "leading",
|
|
341
342
|
name: "預覽",
|
|
342
343
|
onClick: () => {
|
|
343
|
-
|
|
344
|
+
pn(e.attachment);
|
|
344
345
|
}
|
|
345
346
|
}] : [], {
|
|
346
347
|
icon: Se,
|
|
347
348
|
iconType: "leading",
|
|
348
349
|
name: "下載",
|
|
349
350
|
onClick: () => {
|
|
350
|
-
|
|
351
|
+
fn(e.attachment);
|
|
351
352
|
}
|
|
352
353
|
}],
|
|
353
354
|
variant: "base-secondary",
|
|
354
355
|
width: 160
|
|
355
|
-
}), []),
|
|
356
|
+
}), []), cn = u(() => S.map((e) => ({
|
|
356
357
|
algorithm: e.algorithm,
|
|
357
|
-
hashLabel:
|
|
358
|
+
hashLabel: ot(e.signedPayloadHash),
|
|
358
359
|
key: e.id,
|
|
359
360
|
keyVersion: e.keyVersion,
|
|
360
361
|
signedAtLabel: t(e.signedAt),
|
|
361
362
|
signerMemberId: e.signerMemberId
|
|
362
|
-
})), [
|
|
363
|
+
})), [S]), ln = u(() => [
|
|
363
364
|
{
|
|
364
365
|
dataIndex: "signerMemberId",
|
|
365
366
|
key: "signerMemberId",
|
|
@@ -391,213 +392,213 @@ function N({ instanceId: a }) {
|
|
|
391
392
|
width: 220
|
|
392
393
|
}
|
|
393
394
|
], []);
|
|
394
|
-
async function
|
|
395
|
-
|
|
395
|
+
async function un() {
|
|
396
|
+
O(!0), D(null);
|
|
396
397
|
try {
|
|
397
|
-
let e = await
|
|
398
|
-
|
|
398
|
+
let e = await de(o);
|
|
399
|
+
ue(e.activityLogs), ye(e.instance), T(e.tasks), Re(e.workflowTokens);
|
|
399
400
|
let [t, n, r, i] = await Promise.all([
|
|
400
|
-
|
|
401
|
-
|
|
401
|
+
ut(e.tasks),
|
|
402
|
+
lt(e),
|
|
402
403
|
le(e.instance.id),
|
|
403
|
-
|
|
404
|
+
me(e.instance.id)
|
|
404
405
|
]);
|
|
405
|
-
|
|
406
|
+
De(t), Be(n), Pe(r), Ie(i.signatures), Le(i.verification);
|
|
406
407
|
} catch (e) {
|
|
407
408
|
D(P(e));
|
|
408
409
|
} finally {
|
|
409
|
-
|
|
410
|
+
O(!1);
|
|
410
411
|
}
|
|
411
412
|
}
|
|
412
|
-
async function
|
|
413
|
-
if (!
|
|
413
|
+
async function dn(e, t) {
|
|
414
|
+
if (!d) throw Error("尚未登入,無法上傳附件");
|
|
414
415
|
return { id: (await _e({
|
|
415
416
|
file: t,
|
|
416
417
|
formFieldPath: `form.${e.fieldKey}`
|
|
417
418
|
})).id };
|
|
418
419
|
}
|
|
419
|
-
async function
|
|
420
|
-
if (!
|
|
421
|
-
let t = await
|
|
420
|
+
async function fn(e) {
|
|
421
|
+
if (!d) return;
|
|
422
|
+
let t = await fe({ id: e.id });
|
|
422
423
|
window.open(t, "_blank", "noopener,noreferrer");
|
|
423
424
|
}
|
|
424
|
-
async function
|
|
425
|
-
if (!
|
|
426
|
-
let t = await
|
|
427
|
-
|
|
425
|
+
async function pn(e) {
|
|
426
|
+
if (!d) return;
|
|
427
|
+
let t = await pe({ id: e.id });
|
|
428
|
+
Nt(e), Lt(t);
|
|
428
429
|
}
|
|
429
|
-
async function
|
|
430
|
-
if (!(!
|
|
431
|
-
|
|
430
|
+
async function mn({ action: e, comment: t, returnToNodeId: n = null, transferToMemberId: r = null }) {
|
|
431
|
+
if (!(!d || !X)) {
|
|
432
|
+
j(!0), D(null);
|
|
432
433
|
try {
|
|
433
434
|
await ce({
|
|
434
435
|
action: e,
|
|
435
436
|
comment: t,
|
|
436
|
-
decidedByMemberId:
|
|
437
|
+
decidedByMemberId: d,
|
|
437
438
|
returnToNodeId: n,
|
|
438
|
-
taskId:
|
|
439
|
+
taskId: X.id,
|
|
439
440
|
transferToMemberId: r
|
|
440
|
-
}),
|
|
441
|
+
}), L(!1), gt(!1), wt(!1), F(""), z(""), V(""), U(null), B(null), I(null), await un();
|
|
441
442
|
} catch (e) {
|
|
442
443
|
D(P(e));
|
|
443
444
|
} finally {
|
|
444
|
-
|
|
445
|
+
j(!1);
|
|
445
446
|
}
|
|
446
447
|
}
|
|
447
448
|
}
|
|
448
|
-
function pn() {
|
|
449
|
-
N(""), I(null), dt(!0);
|
|
450
|
-
}
|
|
451
|
-
function mn() {
|
|
452
|
-
O || (dt(!1), N(""), I(null));
|
|
453
|
-
}
|
|
454
449
|
function hn() {
|
|
455
|
-
|
|
450
|
+
F(""), I(null), L(!0);
|
|
456
451
|
}
|
|
457
452
|
function gn() {
|
|
458
|
-
|
|
453
|
+
A || (L(!1), F(""), I(null));
|
|
459
454
|
}
|
|
460
455
|
function _n() {
|
|
461
|
-
|
|
456
|
+
z(""), B(Q[0]?.id ?? null), gt(!0);
|
|
462
457
|
}
|
|
463
458
|
function vn() {
|
|
464
|
-
|
|
459
|
+
A || (gt(!1), z(""), B(null));
|
|
465
460
|
}
|
|
466
|
-
|
|
467
|
-
|
|
461
|
+
function yn() {
|
|
462
|
+
V(""), U(null), wt(!0), xn("");
|
|
463
|
+
}
|
|
464
|
+
function bn() {
|
|
465
|
+
A || (wt(!1), V(""), U(null));
|
|
466
|
+
}
|
|
467
|
+
async function xn(e) {
|
|
468
|
+
bt(!0);
|
|
468
469
|
try {
|
|
469
|
-
|
|
470
|
+
St((await ge(e)).filter((e) => e.memberId !== d).map(Pt));
|
|
470
471
|
} catch (e) {
|
|
471
472
|
D(P(e));
|
|
472
473
|
} finally {
|
|
473
|
-
|
|
474
|
+
bt(!1);
|
|
474
475
|
}
|
|
475
476
|
}
|
|
476
|
-
async function
|
|
477
|
-
if (!
|
|
477
|
+
async function Sn() {
|
|
478
|
+
if (!J) {
|
|
478
479
|
I("請輸入拒絕原因");
|
|
479
480
|
return;
|
|
480
481
|
}
|
|
481
|
-
await
|
|
482
|
+
await mn({
|
|
482
483
|
action: "REJECTED",
|
|
483
|
-
comment:
|
|
484
|
+
comment: J
|
|
484
485
|
});
|
|
485
486
|
}
|
|
486
|
-
async function
|
|
487
|
-
if (!
|
|
487
|
+
async function Cn() {
|
|
488
|
+
if (!H) {
|
|
488
489
|
D("請選擇轉派對象");
|
|
489
490
|
return;
|
|
490
491
|
}
|
|
491
|
-
await
|
|
492
|
+
await mn({
|
|
492
493
|
action: "TRANSFERRED",
|
|
493
494
|
comment: zt || null,
|
|
494
|
-
transferToMemberId:
|
|
495
|
+
transferToMemberId: H.id
|
|
495
496
|
});
|
|
496
497
|
}
|
|
497
|
-
async function
|
|
498
|
-
await
|
|
498
|
+
async function wn() {
|
|
499
|
+
await mn({
|
|
499
500
|
action: "RETURNED",
|
|
500
|
-
comment:
|
|
501
|
-
returnToNodeId:
|
|
501
|
+
comment: Rt || null,
|
|
502
|
+
returnToNodeId: Wt?.id ?? null
|
|
502
503
|
});
|
|
503
504
|
}
|
|
504
|
-
async function
|
|
505
|
-
if (!(!
|
|
506
|
-
if (
|
|
505
|
+
async function Tn() {
|
|
506
|
+
if (!(!d || !x || !Gt)) {
|
|
507
|
+
if (j(!0), D(null), G({}), x.formDefinitionSnapshot.schema && x.formDefinitionSnapshot.uiSchema) {
|
|
507
508
|
let e = je({
|
|
508
|
-
schema:
|
|
509
|
-
uiSchema:
|
|
510
|
-
values:
|
|
509
|
+
schema: x.formDefinitionSnapshot.schema,
|
|
510
|
+
uiSchema: x.formDefinitionSnapshot.uiSchema,
|
|
511
|
+
values: jt
|
|
511
512
|
});
|
|
512
513
|
if (!e.valid) {
|
|
513
|
-
|
|
514
|
+
G(e.errors), D("請先補齊必填欄位。"), e.firstInvalidFieldKey && Ae(e.firstInvalidFieldKey), j(!1);
|
|
514
515
|
return;
|
|
515
516
|
}
|
|
516
517
|
}
|
|
517
518
|
try {
|
|
518
519
|
await se({
|
|
519
|
-
cancelledByMemberId:
|
|
520
|
-
comment:
|
|
521
|
-
instanceId:
|
|
522
|
-
}),
|
|
520
|
+
cancelledByMemberId: d,
|
|
521
|
+
comment: Y || null,
|
|
522
|
+
instanceId: x.id
|
|
523
|
+
}), Qe(""), N(!1), await un();
|
|
523
524
|
} catch (e) {
|
|
524
525
|
D(P(e));
|
|
525
526
|
} finally {
|
|
526
|
-
|
|
527
|
+
j(!1);
|
|
527
528
|
}
|
|
528
529
|
}
|
|
529
530
|
}
|
|
530
|
-
async function
|
|
531
|
-
if (!(!
|
|
532
|
-
|
|
531
|
+
async function En() {
|
|
532
|
+
if (!(!d || !x || !qt)) {
|
|
533
|
+
j(!0), D(null);
|
|
533
534
|
try {
|
|
534
535
|
await he({
|
|
535
|
-
formData:
|
|
536
|
-
initiatorMemberId:
|
|
537
|
-
instanceId:
|
|
538
|
-
title:
|
|
539
|
-
}), await
|
|
536
|
+
formData: jt,
|
|
537
|
+
initiatorMemberId: d,
|
|
538
|
+
instanceId: x.id,
|
|
539
|
+
title: x.title
|
|
540
|
+
}), await un();
|
|
540
541
|
} catch (e) {
|
|
541
542
|
D(P(e));
|
|
542
543
|
} finally {
|
|
543
|
-
|
|
544
|
+
j(!1);
|
|
544
545
|
}
|
|
545
546
|
}
|
|
546
547
|
}
|
|
547
|
-
return /* @__PURE__ */
|
|
548
|
-
activeHref:
|
|
548
|
+
return /* @__PURE__ */ b(n, {
|
|
549
|
+
activeHref: s.inbox(),
|
|
549
550
|
children: [
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
-
description:
|
|
552
|
-
title:
|
|
551
|
+
/* @__PURE__ */ y(ee, { children: /* @__PURE__ */ b(ke, {
|
|
552
|
+
description: x ? `${At(x.state)} · ${t(x.startedAt)}` : "載入案件內容。",
|
|
553
|
+
title: x?.title ?? "簽核案件",
|
|
553
554
|
children: [
|
|
554
|
-
|
|
555
|
+
x ? /* @__PURE__ */ y(m, {
|
|
555
556
|
"aria-label": "查看流程圖",
|
|
556
557
|
icon: Te,
|
|
557
558
|
iconType: "icon-only",
|
|
558
|
-
onClick: () =>
|
|
559
|
+
onClick: () => Xe(!0),
|
|
559
560
|
title: "查看流程圖",
|
|
560
561
|
variant: "base-secondary",
|
|
561
562
|
children: "流程圖"
|
|
562
563
|
}) : null,
|
|
563
|
-
|
|
564
|
-
disabled:
|
|
564
|
+
Gt ? /* @__PURE__ */ y(m, {
|
|
565
|
+
disabled: A,
|
|
565
566
|
icon: xe,
|
|
566
567
|
iconType: "leading",
|
|
567
|
-
onClick: () =>
|
|
568
|
+
onClick: () => N(!0),
|
|
568
569
|
variant: "destructive-secondary",
|
|
569
570
|
children: "取消案件"
|
|
570
571
|
}) : null,
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
disabled:
|
|
572
|
+
X ? /* @__PURE__ */ b(oe, { children: [
|
|
573
|
+
Ut ? /* @__PURE__ */ y(m, {
|
|
574
|
+
disabled: A,
|
|
574
575
|
icon: we,
|
|
575
576
|
iconType: "leading",
|
|
576
|
-
onClick:
|
|
577
|
+
onClick: _n,
|
|
577
578
|
variant: "base-secondary",
|
|
578
579
|
children: "退回"
|
|
579
580
|
}) : null,
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
-
disabled:
|
|
581
|
+
/* @__PURE__ */ y(m, {
|
|
582
|
+
disabled: A,
|
|
582
583
|
icon: Ee,
|
|
583
584
|
iconType: "leading",
|
|
584
|
-
onClick:
|
|
585
|
+
onClick: yn,
|
|
585
586
|
variant: "base-secondary",
|
|
586
587
|
children: "轉派"
|
|
587
588
|
}),
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
-
disabled:
|
|
589
|
+
/* @__PURE__ */ y(m, {
|
|
590
|
+
disabled: A,
|
|
590
591
|
icon: xe,
|
|
591
592
|
iconType: "leading",
|
|
592
|
-
onClick:
|
|
593
|
+
onClick: hn,
|
|
593
594
|
variant: "destructive-secondary",
|
|
594
595
|
children: "拒絕"
|
|
595
596
|
}),
|
|
596
|
-
/* @__PURE__ */
|
|
597
|
-
disabled:
|
|
597
|
+
/* @__PURE__ */ y(m, {
|
|
598
|
+
disabled: A,
|
|
598
599
|
icon: ve,
|
|
599
600
|
iconType: "leading",
|
|
600
|
-
onClick: () => void
|
|
601
|
+
onClick: () => void mn({
|
|
601
602
|
action: "APPROVED",
|
|
602
603
|
comment: null
|
|
603
604
|
}),
|
|
@@ -607,271 +608,271 @@ function N({ instanceId: a }) {
|
|
|
607
608
|
] }) : null
|
|
608
609
|
]
|
|
609
610
|
}) }),
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ b(te, { children: [
|
|
612
|
+
/* @__PURE__ */ y(g, { children: /* @__PURE__ */ b("div", {
|
|
612
613
|
style: k,
|
|
613
614
|
children: [
|
|
614
|
-
|
|
615
|
+
Ve ? /* @__PURE__ */ y(v, {
|
|
615
616
|
color: "text-error",
|
|
616
617
|
variant: "body",
|
|
617
|
-
children:
|
|
618
|
+
children: Ve
|
|
618
619
|
}) : null,
|
|
619
|
-
|
|
620
|
+
He ? /* @__PURE__ */ y(v, {
|
|
620
621
|
color: "text-neutral",
|
|
621
622
|
variant: "body",
|
|
622
623
|
children: "載入中..."
|
|
623
624
|
}) : null,
|
|
624
|
-
|
|
625
|
-
errors:
|
|
625
|
+
x?.formDefinitionSnapshot.schema && x.formDefinitionSnapshot.uiSchema ? /* @__PURE__ */ b(oe, { children: [/* @__PURE__ */ y(a, {
|
|
626
|
+
errors: Tt,
|
|
626
627
|
onChange: (e) => {
|
|
627
|
-
|
|
628
|
+
Mt(e), G({});
|
|
628
629
|
},
|
|
629
|
-
onUploadAttachment:
|
|
630
|
-
readonly: !
|
|
631
|
-
schema:
|
|
632
|
-
uiSchema:
|
|
633
|
-
value:
|
|
634
|
-
}),
|
|
635
|
-
style:
|
|
636
|
-
children: /* @__PURE__ */
|
|
637
|
-
disabled:
|
|
630
|
+
onUploadAttachment: qt ? dn : void 0,
|
|
631
|
+
readonly: !qt,
|
|
632
|
+
schema: x.formDefinitionSnapshot.schema,
|
|
633
|
+
uiSchema: x.formDefinitionSnapshot.uiSchema,
|
|
634
|
+
value: qt ? jt : x.formData
|
|
635
|
+
}), qt ? /* @__PURE__ */ y("div", {
|
|
636
|
+
style: We,
|
|
637
|
+
children: /* @__PURE__ */ y(m, {
|
|
638
|
+
disabled: A,
|
|
638
639
|
icon: we,
|
|
639
640
|
iconType: "leading",
|
|
640
|
-
onClick: () => void
|
|
641
|
+
onClick: () => void En(),
|
|
641
642
|
variant: "base-primary",
|
|
642
643
|
children: "重新送出"
|
|
643
644
|
})
|
|
644
|
-
}) : null] }) : /* @__PURE__ */ v
|
|
645
|
+
}) : null] }) : /* @__PURE__ */ y(v, {
|
|
645
646
|
color: "text-neutral",
|
|
646
647
|
variant: "body",
|
|
647
648
|
children: "此案件沒有可顯示的表單快照。"
|
|
648
649
|
})
|
|
649
650
|
]
|
|
650
651
|
}) }),
|
|
651
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ y(g, { children: /* @__PURE__ */ b("div", {
|
|
652
653
|
style: k,
|
|
653
|
-
children: [/* @__PURE__ */ v
|
|
654
|
+
children: [/* @__PURE__ */ y(v, {
|
|
654
655
|
component: "h2",
|
|
655
656
|
variant: "h3",
|
|
656
657
|
children: "附件"
|
|
657
|
-
}),
|
|
658
|
-
actions:
|
|
659
|
-
columns:
|
|
660
|
-
dataSource:
|
|
658
|
+
}), an.length > 0 ? /* @__PURE__ */ y(ie, {
|
|
659
|
+
actions: sn,
|
|
660
|
+
columns: on,
|
|
661
|
+
dataSource: an,
|
|
661
662
|
fullWidth: !0
|
|
662
|
-
}) : /* @__PURE__ */ v
|
|
663
|
+
}) : /* @__PURE__ */ y(v, {
|
|
663
664
|
color: "text-neutral",
|
|
664
665
|
variant: "body",
|
|
665
666
|
children: "此案件沒有附件。"
|
|
666
667
|
})]
|
|
667
668
|
}) }),
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ b(g, { children: [/* @__PURE__ */ y(v, {
|
|
669
670
|
component: "h2",
|
|
670
671
|
variant: "h3",
|
|
671
672
|
children: "任務"
|
|
672
|
-
}), /* @__PURE__ */
|
|
673
|
-
columns:
|
|
674
|
-
dataSource:
|
|
673
|
+
}), /* @__PURE__ */ y(ie, {
|
|
674
|
+
columns: rn,
|
|
675
|
+
dataSource: Yt,
|
|
675
676
|
fullWidth: !0
|
|
676
677
|
})] }),
|
|
677
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ y(g, { children: /* @__PURE__ */ b("div", {
|
|
678
679
|
style: k,
|
|
679
680
|
children: [
|
|
680
|
-
/* @__PURE__ */ v
|
|
681
|
+
/* @__PURE__ */ y(v, {
|
|
681
682
|
component: "h2",
|
|
682
683
|
variant: "h3",
|
|
683
684
|
children: "簽章"
|
|
684
685
|
}),
|
|
685
|
-
/* @__PURE__ */ v
|
|
686
|
+
/* @__PURE__ */ y(v, {
|
|
686
687
|
color: C?.valid ? "text-success" : "text-error",
|
|
687
688
|
variant: "body",
|
|
688
689
|
children: C ? C.valid ? `簽章鏈已驗證,共 ${C.checkedCount} 筆。` : `簽章鏈驗證失敗:${C.errors.join("、")}` : "尚無簽章紀錄。"
|
|
689
690
|
}),
|
|
690
|
-
|
|
691
|
-
columns:
|
|
692
|
-
dataSource:
|
|
691
|
+
cn.length > 0 ? /* @__PURE__ */ y(ie, {
|
|
692
|
+
columns: ln,
|
|
693
|
+
dataSource: cn,
|
|
693
694
|
fullWidth: !0
|
|
694
695
|
}) : null
|
|
695
696
|
]
|
|
696
697
|
}) }),
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ y(g, { children: /* @__PURE__ */ b("div", {
|
|
698
699
|
style: k,
|
|
699
|
-
children: [/* @__PURE__ */ v
|
|
700
|
+
children: [/* @__PURE__ */ y(v, {
|
|
700
701
|
component: "h2",
|
|
701
702
|
variant: "h3",
|
|
702
703
|
children: "歷程"
|
|
703
|
-
}),
|
|
704
|
-
currentStep:
|
|
704
|
+
}), Qt.length > 0 ? /* @__PURE__ */ y(re, {
|
|
705
|
+
currentStep: $t,
|
|
705
706
|
orientation: "vertical",
|
|
706
707
|
type: "dot",
|
|
707
|
-
children:
|
|
708
|
+
children: Qt.map((e) => /* @__PURE__ */ y(st, {
|
|
708
709
|
descriptionParts: e.descriptionParts,
|
|
709
710
|
error: e.error,
|
|
710
711
|
forcePending: e.forcePending,
|
|
711
712
|
title: e.title
|
|
712
713
|
}, e.id))
|
|
713
|
-
}) : /* @__PURE__ */ v
|
|
714
|
+
}) : /* @__PURE__ */ y(v, {
|
|
714
715
|
color: "text-neutral",
|
|
715
716
|
variant: "body",
|
|
716
717
|
children: "尚無歷程紀錄。"
|
|
717
718
|
})]
|
|
718
719
|
}) })
|
|
719
720
|
] }),
|
|
720
|
-
|
|
721
|
+
x ? /* @__PURE__ */ y(h, {
|
|
721
722
|
modalType: "standard",
|
|
722
|
-
onClose: () =>
|
|
723
|
-
open:
|
|
723
|
+
onClose: () => Xe(!1),
|
|
724
|
+
open: M,
|
|
724
725
|
showModalHeader: !0,
|
|
725
726
|
size: "wide",
|
|
726
|
-
supportingText: `${At(
|
|
727
|
+
supportingText: `${At(x.state)} · ${t(x.startedAt)}`,
|
|
727
728
|
title: "流程圖",
|
|
728
|
-
children: /* @__PURE__ */
|
|
729
|
+
children: /* @__PURE__ */ b("div", {
|
|
729
730
|
style: Ge,
|
|
730
|
-
children: [/* @__PURE__ */
|
|
731
|
+
children: [/* @__PURE__ */ y("div", {
|
|
731
732
|
style: Ye,
|
|
732
|
-
children: /* @__PURE__ */
|
|
733
|
-
edges:
|
|
733
|
+
children: /* @__PURE__ */ b(Fe, {
|
|
734
|
+
edges: tn,
|
|
734
735
|
fitView: !0,
|
|
735
736
|
fitViewOptions: { padding: .18 },
|
|
736
737
|
maxZoom: 1.2,
|
|
737
738
|
minZoom: .2,
|
|
738
|
-
nodes:
|
|
739
|
+
nodes: en,
|
|
739
740
|
nodesDraggable: !1,
|
|
740
741
|
nodesFocusable: !1,
|
|
741
742
|
nodeTypes: rt,
|
|
742
743
|
panOnDrag: !0,
|
|
743
744
|
proOptions: { hideAttribution: !0 },
|
|
744
|
-
children: [/* @__PURE__ */
|
|
745
|
+
children: [/* @__PURE__ */ y(Me, {}), /* @__PURE__ */ y(Ne, { showInteractive: !1 })]
|
|
745
746
|
})
|
|
746
|
-
}),
|
|
747
|
+
}), nn.length > 0 ? /* @__PURE__ */ y("div", {
|
|
747
748
|
style: $e,
|
|
748
|
-
children:
|
|
749
|
+
children: nn.map((e) => /* @__PURE__ */ y("span", {
|
|
749
750
|
style: et,
|
|
750
751
|
children: e
|
|
751
752
|
}, e))
|
|
752
753
|
}) : null]
|
|
753
754
|
})
|
|
754
755
|
}) : null,
|
|
755
|
-
/* @__PURE__ */
|
|
756
|
+
/* @__PURE__ */ y(h, {
|
|
756
757
|
modalType: "standard",
|
|
757
758
|
onClose: () => {
|
|
758
|
-
|
|
759
|
+
Nt(null), Lt(null);
|
|
759
760
|
},
|
|
760
|
-
open: !!(
|
|
761
|
+
open: !!(K && q),
|
|
761
762
|
showModalHeader: !0,
|
|
762
763
|
size: "wide",
|
|
763
|
-
supportingText:
|
|
764
|
+
supportingText: K?.filename ?? void 0,
|
|
764
765
|
title: "PDF 預覽",
|
|
765
|
-
children:
|
|
766
|
-
filename:
|
|
767
|
-
fileUrl:
|
|
768
|
-
onDownload:
|
|
766
|
+
children: q ? /* @__PURE__ */ y(Ue, {
|
|
767
|
+
filename: K?.filename ?? "PDF 預覽",
|
|
768
|
+
fileUrl: q,
|
|
769
|
+
onDownload: K ? () => void fn(K) : void 0
|
|
769
770
|
}) : null
|
|
770
771
|
}),
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
+
/* @__PURE__ */ y(h, {
|
|
772
773
|
cancelText: "保留案件",
|
|
773
774
|
confirmButtonProps: { variant: "destructive-primary" },
|
|
774
775
|
confirmText: "確認取消",
|
|
775
|
-
loading:
|
|
776
|
+
loading: A,
|
|
776
777
|
modalStatusType: "error",
|
|
777
778
|
modalType: "standard",
|
|
778
|
-
onCancel: () =>
|
|
779
|
-
onClose: () =>
|
|
780
|
-
onConfirm: () => void
|
|
781
|
-
open:
|
|
779
|
+
onCancel: () => N(!1),
|
|
780
|
+
onClose: () => N(!1),
|
|
781
|
+
onConfirm: () => void Tn(),
|
|
782
|
+
open: tt,
|
|
782
783
|
showModalFooter: !0,
|
|
783
784
|
showModalHeader: !0,
|
|
784
785
|
supportingText: "取消後會關閉目前待簽任務與候選簽核人。",
|
|
785
786
|
title: "取消案件",
|
|
786
|
-
children: /* @__PURE__ */
|
|
787
|
+
children: /* @__PURE__ */ b("div", {
|
|
787
788
|
style: k,
|
|
788
|
-
children: [/* @__PURE__ */
|
|
789
|
+
children: [/* @__PURE__ */ b(v, {
|
|
789
790
|
variant: "body",
|
|
790
791
|
children: [
|
|
791
792
|
"確定要取消「",
|
|
792
|
-
|
|
793
|
+
x?.title ?? "",
|
|
793
794
|
"」嗎?"
|
|
794
795
|
]
|
|
795
|
-
}), /* @__PURE__ */
|
|
796
|
+
}), /* @__PURE__ */ y(i, {
|
|
796
797
|
label: "取消原因",
|
|
797
798
|
name: "cancelComment",
|
|
798
|
-
children: /* @__PURE__ */
|
|
799
|
-
onChange: (e) =>
|
|
799
|
+
children: /* @__PURE__ */ y(_, {
|
|
800
|
+
onChange: (e) => Qe(e.target.value),
|
|
800
801
|
placeholder: "可填寫取消原因",
|
|
801
802
|
resize: "vertical",
|
|
802
803
|
rows: 3,
|
|
803
|
-
value:
|
|
804
|
+
value: Ze
|
|
804
805
|
})
|
|
805
806
|
})]
|
|
806
807
|
})
|
|
807
808
|
}),
|
|
808
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ y(h, {
|
|
809
810
|
cancelText: "取消",
|
|
810
811
|
confirmButtonProps: {
|
|
811
|
-
disabled: !
|
|
812
|
+
disabled: !J,
|
|
812
813
|
variant: "destructive-primary"
|
|
813
814
|
},
|
|
814
815
|
confirmText: "送出拒絕",
|
|
815
|
-
loading:
|
|
816
|
+
loading: A,
|
|
816
817
|
modalStatusType: "error",
|
|
817
818
|
modalType: "standard",
|
|
818
|
-
onCancel:
|
|
819
|
-
onClose:
|
|
820
|
-
onConfirm: () => void
|
|
821
|
-
open:
|
|
819
|
+
onCancel: gn,
|
|
820
|
+
onClose: gn,
|
|
821
|
+
onConfirm: () => void Sn(),
|
|
822
|
+
open: pt,
|
|
822
823
|
showModalFooter: !0,
|
|
823
824
|
showModalHeader: !0,
|
|
824
825
|
size: "regular",
|
|
825
826
|
supportingText: "拒絕案件時必須留下原因,供發起人與後續追蹤查看。",
|
|
826
827
|
title: "拒絕原因",
|
|
827
|
-
children: /* @__PURE__ */
|
|
828
|
+
children: /* @__PURE__ */ b("div", {
|
|
828
829
|
style: Ke,
|
|
829
|
-
children: [/* @__PURE__ */
|
|
830
|
+
children: [/* @__PURE__ */ y(i, {
|
|
830
831
|
label: "拒絕原因",
|
|
831
832
|
name: "rejectReason",
|
|
832
833
|
required: !0,
|
|
833
|
-
children: /* @__PURE__ */
|
|
834
|
+
children: /* @__PURE__ */ y(_, {
|
|
834
835
|
autoFocus: !0,
|
|
835
836
|
onChange: (e) => {
|
|
836
|
-
|
|
837
|
+
F(e.target.value), I(null);
|
|
837
838
|
},
|
|
838
839
|
placeholder: "請說明拒絕原因",
|
|
839
840
|
ref: nt,
|
|
840
841
|
resize: "vertical",
|
|
841
842
|
rows: 4,
|
|
842
843
|
style: qe,
|
|
843
|
-
type:
|
|
844
|
-
value:
|
|
844
|
+
type: ct ? "error" : "default",
|
|
845
|
+
value: it
|
|
845
846
|
})
|
|
846
|
-
}),
|
|
847
|
+
}), ct ? /* @__PURE__ */ y(v, {
|
|
847
848
|
color: "text-error",
|
|
848
849
|
variant: "body",
|
|
849
|
-
children:
|
|
850
|
+
children: ct
|
|
850
851
|
}) : null]
|
|
851
852
|
})
|
|
852
853
|
}),
|
|
853
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ y(h, {
|
|
854
855
|
cancelText: "取消",
|
|
855
|
-
confirmButtonProps: { disabled: !
|
|
856
|
+
confirmButtonProps: { disabled: !H },
|
|
856
857
|
confirmText: "送出轉派",
|
|
857
|
-
loading:
|
|
858
|
+
loading: A,
|
|
858
859
|
modalType: "standard",
|
|
859
|
-
onCancel:
|
|
860
|
-
onClose:
|
|
861
|
-
onConfirm: () => void
|
|
862
|
-
open:
|
|
860
|
+
onCancel: bn,
|
|
861
|
+
onClose: bn,
|
|
862
|
+
onConfirm: () => void Cn(),
|
|
863
|
+
open: Ct,
|
|
863
864
|
showModalFooter: !0,
|
|
864
865
|
showModalHeader: !0,
|
|
865
866
|
size: "regular",
|
|
866
867
|
supportingText: "轉派後,原任務會保留轉派紀錄,新的待簽任務會指派給指定成員。",
|
|
867
868
|
title: "轉派簽核",
|
|
868
|
-
children: /* @__PURE__ */
|
|
869
|
+
children: /* @__PURE__ */ b("div", {
|
|
869
870
|
style: Je,
|
|
870
|
-
children: [/* @__PURE__ */
|
|
871
|
+
children: [/* @__PURE__ */ y(i, {
|
|
871
872
|
label: "轉派對象",
|
|
872
873
|
name: "transferToMemberId",
|
|
873
874
|
required: !0,
|
|
874
|
-
children: /* @__PURE__ */
|
|
875
|
+
children: /* @__PURE__ */ y(p, {
|
|
875
876
|
asyncData: !0,
|
|
876
877
|
disabledOptionsFilter: !0,
|
|
877
878
|
emptyText: "沒有符合的成員",
|
|
@@ -881,75 +882,75 @@ function N({ instanceId: a }) {
|
|
|
881
882
|
name: "transfer-member-search",
|
|
882
883
|
spellCheck: !1
|
|
883
884
|
},
|
|
884
|
-
loading:
|
|
885
|
+
loading: yt,
|
|
885
886
|
loadingText: "搜尋成員中...",
|
|
886
887
|
mode: "single",
|
|
887
|
-
onChange: (e) => U(
|
|
888
|
-
onSearch:
|
|
889
|
-
onSearchTextChange: (e) => U(
|
|
888
|
+
onChange: (e) => U(Ft(e)),
|
|
889
|
+
onSearch: xn,
|
|
890
|
+
onSearchTextChange: (e) => U(It(e, xt)),
|
|
890
891
|
onVisibilityChange: (e) => {
|
|
891
|
-
e &&
|
|
892
|
+
e && xn("");
|
|
892
893
|
},
|
|
893
|
-
options: [...
|
|
894
|
+
options: [...xt],
|
|
894
895
|
placeholder: "搜尋姓名或信箱",
|
|
895
896
|
searchDebounceTime: 300,
|
|
896
|
-
value:
|
|
897
|
+
value: H
|
|
897
898
|
})
|
|
898
|
-
}), /* @__PURE__ */
|
|
899
|
+
}), /* @__PURE__ */ y(i, {
|
|
899
900
|
label: "轉派說明",
|
|
900
901
|
name: "transferComment",
|
|
901
|
-
children: /* @__PURE__ */
|
|
902
|
-
onChange: (e) =>
|
|
902
|
+
children: /* @__PURE__ */ y(_, {
|
|
903
|
+
onChange: (e) => V(e.target.value),
|
|
903
904
|
placeholder: "可補充轉派原因",
|
|
904
905
|
ref: nt,
|
|
905
906
|
resize: "vertical",
|
|
906
907
|
rows: 4,
|
|
907
908
|
style: qe,
|
|
908
|
-
value:
|
|
909
|
+
value: vt
|
|
909
910
|
})
|
|
910
911
|
})]
|
|
911
912
|
})
|
|
912
913
|
}),
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ y(h, {
|
|
914
915
|
cancelText: "取消",
|
|
915
|
-
confirmButtonProps: { disabled: !
|
|
916
|
+
confirmButtonProps: { disabled: !Wt },
|
|
916
917
|
confirmText: "送出退回",
|
|
917
|
-
loading:
|
|
918
|
+
loading: A,
|
|
918
919
|
modalType: "standard",
|
|
919
|
-
onCancel:
|
|
920
|
-
onClose:
|
|
921
|
-
onConfirm: () => void
|
|
922
|
-
open:
|
|
920
|
+
onCancel: vn,
|
|
921
|
+
onClose: vn,
|
|
922
|
+
onConfirm: () => void wn(),
|
|
923
|
+
open: ht,
|
|
923
924
|
showModalFooter: !0,
|
|
924
925
|
showModalHeader: !0,
|
|
925
926
|
size: "regular",
|
|
926
927
|
supportingText: "退回後,流程會回到指定節點並等待重新處理。",
|
|
927
928
|
title: "退回簽核",
|
|
928
|
-
children: /* @__PURE__ */
|
|
929
|
+
children: /* @__PURE__ */ b("div", {
|
|
929
930
|
style: Je,
|
|
930
|
-
children: [/* @__PURE__ */
|
|
931
|
+
children: [/* @__PURE__ */ y(i, {
|
|
931
932
|
label: "退回節點",
|
|
932
933
|
name: "returnTargetNodeId",
|
|
933
934
|
required: !0,
|
|
934
|
-
children: /* @__PURE__ */
|
|
935
|
+
children: /* @__PURE__ */ y(ne, {
|
|
935
936
|
clearable: !1,
|
|
936
937
|
fullWidth: !0,
|
|
937
|
-
onChange: (e) =>
|
|
938
|
-
options: [...
|
|
938
|
+
onChange: (e) => B(e?.id ?? null),
|
|
939
|
+
options: [...Q],
|
|
939
940
|
placeholder: "選擇退回節點",
|
|
940
|
-
value:
|
|
941
|
+
value: Wt
|
|
941
942
|
})
|
|
942
|
-
}), /* @__PURE__ */
|
|
943
|
+
}), /* @__PURE__ */ y(i, {
|
|
943
944
|
label: "退回說明",
|
|
944
945
|
name: "returnComment",
|
|
945
|
-
children: /* @__PURE__ */
|
|
946
|
-
onChange: (e) =>
|
|
946
|
+
children: /* @__PURE__ */ y(_, {
|
|
947
|
+
onChange: (e) => z(e.target.value),
|
|
947
948
|
placeholder: "可補充需要修改的內容",
|
|
948
949
|
ref: nt,
|
|
949
950
|
resize: "vertical",
|
|
950
951
|
rows: 4,
|
|
951
952
|
style: qe,
|
|
952
|
-
value:
|
|
953
|
+
value: R
|
|
953
954
|
})
|
|
954
955
|
})]
|
|
955
956
|
})
|
|
@@ -960,110 +961,110 @@ function N({ instanceId: a }) {
|
|
|
960
961
|
function P(e) {
|
|
961
962
|
return e instanceof Error ? e.message : "發生未知錯誤";
|
|
962
963
|
}
|
|
963
|
-
function
|
|
964
|
+
function at(e) {
|
|
964
965
|
return !Number.isFinite(e) || e <= 0 ? "-" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1024 / 1024).toFixed(1)} MB`;
|
|
965
966
|
}
|
|
966
|
-
function
|
|
967
|
+
function ot(e) {
|
|
967
968
|
return e.length > 16 ? `${e.slice(0, 12)}...` : e;
|
|
968
969
|
}
|
|
969
970
|
function F(...e) {
|
|
970
|
-
return e.filter((e) =>
|
|
971
|
+
return e.filter((e) => Y(e ?? null)).join(" ");
|
|
971
972
|
}
|
|
972
|
-
var
|
|
973
|
+
var st = s(function({ className: e, descriptionParts: t, error: n, forcePending: r = !1, index: i = 0, orientation: a, status: s = "pending", title: c, type: l = "number", ...u }, d) {
|
|
973
974
|
let f = r ? "pending" : s;
|
|
974
|
-
return /* @__PURE__ */
|
|
975
|
+
return /* @__PURE__ */ b("div", {
|
|
975
976
|
...u,
|
|
976
|
-
className: F(
|
|
977
|
+
className: F(C.host, l === "dot" ? C.dot : null, n && f !== "processing" ? C.error : null, a === "horizontal" ? C.horizontal : null, l === "number" ? C.number : null, f === "pending" ? C.pending : null, f === "processing" ? C.processing : null, n && f === "processing" ? C.processingError : null, !n && f === "succeeded" ? C.succeeded : null, a === "vertical" ? C.vertical : null, e),
|
|
977
978
|
ref: d,
|
|
978
|
-
children: [l === "dot" ? /* @__PURE__ */
|
|
979
|
-
className:
|
|
979
|
+
children: [l === "dot" ? /* @__PURE__ */ y("span", { className: F(C.statusIndicator, C.statusIndicatorDot) }) : /* @__PURE__ */ y("span", {
|
|
980
|
+
className: C.statusIndicator,
|
|
980
981
|
children: i + 1
|
|
981
|
-
}), /* @__PURE__ */
|
|
982
|
-
className:
|
|
983
|
-
children: [/* @__PURE__ */
|
|
984
|
-
className:
|
|
982
|
+
}), /* @__PURE__ */ b("div", {
|
|
983
|
+
className: C.textContainer,
|
|
984
|
+
children: [/* @__PURE__ */ b(v, {
|
|
985
|
+
className: C.title,
|
|
985
986
|
variant: "label-primary-highlight",
|
|
986
|
-
children: [c, /* @__PURE__ */
|
|
987
|
-
}), t.length > 0 ? /* @__PURE__ */ v
|
|
988
|
-
className:
|
|
987
|
+
children: [c, /* @__PURE__ */ y("span", { className: C.titleConnectLine })]
|
|
988
|
+
}), t.length > 0 ? /* @__PURE__ */ y(v, {
|
|
989
|
+
className: C.description,
|
|
989
990
|
variant: "caption",
|
|
990
|
-
children: t.map((e, t) => /* @__PURE__ */
|
|
991
|
+
children: t.map((e, t) => /* @__PURE__ */ b(o, { children: [t > 0 ? " · " : null, ct(e)] }, `${e.type}-${t}`))
|
|
991
992
|
}) : null]
|
|
992
993
|
})]
|
|
993
994
|
});
|
|
994
995
|
});
|
|
995
|
-
function
|
|
996
|
-
return e.type === "text" ? e.text : e.type === "dangerText" ? /* @__PURE__ */
|
|
997
|
-
style:
|
|
996
|
+
function ct(e) {
|
|
997
|
+
return e.type === "text" ? e.text : e.type === "dangerText" ? /* @__PURE__ */ y("span", {
|
|
998
|
+
style: N,
|
|
998
999
|
children: e.text
|
|
999
|
-
}) : e.email ? /* @__PURE__ */
|
|
1000
|
+
}) : e.email ? /* @__PURE__ */ b(oe, { children: [
|
|
1000
1001
|
e.prefix,
|
|
1001
1002
|
":",
|
|
1002
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ y(ae, {
|
|
1003
1004
|
title: e.email,
|
|
1004
|
-
children: ({ onMouseEnter: t, onMouseLeave: n, ref: r }) => /* @__PURE__ */
|
|
1005
|
+
children: ({ onMouseEnter: t, onMouseLeave: n, ref: r }) => /* @__PURE__ */ y("span", {
|
|
1005
1006
|
"data-testid": e.memberId ? `member-tooltip-${e.memberId}` : void 0,
|
|
1006
1007
|
onMouseEnter: t,
|
|
1007
1008
|
onMouseLeave: n,
|
|
1008
1009
|
ref: r,
|
|
1009
|
-
style:
|
|
1010
|
+
style: tt,
|
|
1010
1011
|
children: e.label
|
|
1011
1012
|
})
|
|
1012
1013
|
})
|
|
1013
1014
|
] }) : `${e.prefix}:${e.label}`;
|
|
1014
1015
|
}
|
|
1015
|
-
async function
|
|
1016
|
+
async function lt({ activityLogs: e, tasks: t }) {
|
|
1016
1017
|
let n = [...new Set([
|
|
1017
1018
|
...e.map((e) => e.actorMemberId),
|
|
1018
1019
|
...t.map((e) => e.assigneeMemberId),
|
|
1019
1020
|
...t.map((e) => e.originalAssigneeMemberId),
|
|
1020
1021
|
...t.flatMap((e) => e.candidateMemberIds),
|
|
1021
|
-
...t.flatMap((e) =>
|
|
1022
|
-
].filter(
|
|
1022
|
+
...t.flatMap((e) => q(e.delegationChainJson).flatMap((e) => [e.from, e.to]))
|
|
1023
|
+
].filter(Y))];
|
|
1023
1024
|
try {
|
|
1024
|
-
return await
|
|
1025
|
+
return await x(n);
|
|
1025
1026
|
} catch {
|
|
1026
1027
|
return [];
|
|
1027
1028
|
}
|
|
1028
1029
|
}
|
|
1029
|
-
async function
|
|
1030
|
-
return (await Promise.all(e.map((e) =>
|
|
1030
|
+
async function ut(e) {
|
|
1031
|
+
return (await Promise.all(e.map((e) => ue(e.id)))).flat();
|
|
1031
1032
|
}
|
|
1032
|
-
function
|
|
1033
|
+
function dt(e) {
|
|
1033
1034
|
return e.reduce((e, t) => {
|
|
1034
1035
|
let n = e.get(t.taskId), r = !n || new Date(t.decidedAt).getTime() > new Date(n.decidedAt).getTime() ? t : n;
|
|
1035
1036
|
return new Map(e).set(t.taskId, r);
|
|
1036
1037
|
}, /* @__PURE__ */ new Map());
|
|
1037
1038
|
}
|
|
1038
|
-
function
|
|
1039
|
-
let l = e.filter(
|
|
1040
|
-
let t =
|
|
1039
|
+
function ft(e, t, n, r, i, a, o, s, c) {
|
|
1040
|
+
let l = e.filter(ht).map((e) => {
|
|
1041
|
+
let t = bt(e), n = Tt(e.nodeId, r);
|
|
1041
1042
|
return {
|
|
1042
1043
|
descriptionParts: [
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
...
|
|
1044
|
+
I(n ? `節點:${n}` : "節點:全流程"),
|
|
1045
|
+
L("操作者", e.actorMemberId, a, "系統"),
|
|
1046
|
+
I(`時間:${Mt(e.createdAt)}`),
|
|
1047
|
+
...wt(e, t, r, o, s, c, a)
|
|
1047
1048
|
].filter(z),
|
|
1048
1049
|
error: jt(e, t),
|
|
1049
1050
|
id: e.id,
|
|
1050
|
-
title:
|
|
1051
|
+
title: xt(e.eventType, t)
|
|
1051
1052
|
};
|
|
1052
|
-
}), u = t.filter(
|
|
1053
|
+
}), u = t.filter(zt).map((e) => ({
|
|
1053
1054
|
descriptionParts: [
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1055
|
+
I(`節點:${W(e.nodeId, r)}`),
|
|
1056
|
+
L("處理者", e.assigneeMemberId, a, "未指定"),
|
|
1057
|
+
I(`建立時間:${Mt(e.createdAt)}`)
|
|
1057
1058
|
].filter(z),
|
|
1058
1059
|
error: !1,
|
|
1059
1060
|
id: `pending-task-${e.id}`,
|
|
1060
1061
|
title: e.status === "IN_PROGRESS" ? "簽核處理中" : "等待簽核處理"
|
|
1061
|
-
})), d = new Set([...e.filter(
|
|
1062
|
-
descriptionParts: [
|
|
1062
|
+
})), d = new Set([...e.filter(ht).map((e) => e.nodeId), ...t.map((e) => e.nodeId)].filter(Y)), f = r ? _t(r, t, n, i, d).map((e) => ({
|
|
1063
|
+
descriptionParts: [I(`${Q(e.type)} · 尚未抵達`)].filter(z),
|
|
1063
1064
|
error: !1,
|
|
1064
1065
|
forcePending: !0,
|
|
1065
1066
|
id: `future-node-${e.id}`,
|
|
1066
|
-
title:
|
|
1067
|
+
title: yt(e)
|
|
1067
1068
|
})) : [];
|
|
1068
1069
|
return [
|
|
1069
1070
|
...l,
|
|
@@ -1071,19 +1072,19 @@ function ut(e, t, n, r, i, a, o, s, c) {
|
|
|
1071
1072
|
...f
|
|
1072
1073
|
];
|
|
1073
1074
|
}
|
|
1074
|
-
function
|
|
1075
|
-
return
|
|
1075
|
+
function I(e) {
|
|
1076
|
+
return Y(e) ? {
|
|
1076
1077
|
text: e,
|
|
1077
1078
|
type: "text"
|
|
1078
1079
|
} : null;
|
|
1079
1080
|
}
|
|
1080
|
-
function
|
|
1081
|
-
return
|
|
1081
|
+
function pt(e) {
|
|
1082
|
+
return Y(e) ? {
|
|
1082
1083
|
text: e,
|
|
1083
1084
|
type: "dangerText"
|
|
1084
1085
|
} : null;
|
|
1085
1086
|
}
|
|
1086
|
-
function
|
|
1087
|
+
function L(e, t, n, r) {
|
|
1087
1088
|
let i = t ? n.get(t) : null;
|
|
1088
1089
|
return {
|
|
1089
1090
|
email: i?.email ?? null,
|
|
@@ -1101,99 +1102,99 @@ function R(e, t) {
|
|
|
1101
1102
|
function z(e) {
|
|
1102
1103
|
return !!e;
|
|
1103
1104
|
}
|
|
1104
|
-
function
|
|
1105
|
+
function mt(e) {
|
|
1105
1106
|
let t = e.findIndex((e) => e.id.startsWith("pending-task-") || e.id.startsWith("future-node-"));
|
|
1106
1107
|
return t === -1 ? e.length : t;
|
|
1107
1108
|
}
|
|
1108
|
-
function
|
|
1109
|
+
function ht(e) {
|
|
1109
1110
|
return e.eventType === "INSTANCE_STARTED" || e.eventType === "TASK_DECIDED" || e.eventType === "SLA_TRIGGERED";
|
|
1110
1111
|
}
|
|
1111
|
-
function
|
|
1112
|
+
function gt(e, t, n, r, i) {
|
|
1112
1113
|
if (e.type === "startEvent" || i.has(e.id)) return !1;
|
|
1113
1114
|
if (r === "REJECTED") return !0;
|
|
1114
|
-
let a =
|
|
1115
|
+
let a = Z(e, t, n, r);
|
|
1115
1116
|
return a.tone === "neutral" || a.tone === "waiting";
|
|
1116
1117
|
}
|
|
1117
|
-
function
|
|
1118
|
+
function _t(e, t, n, r, i) {
|
|
1118
1119
|
if (r !== "RUNNING" && r !== "REJECTED") return [];
|
|
1119
|
-
let a = e.nodes.filter((e) =>
|
|
1120
|
+
let a = e.nodes.filter((e) => gt(e, t, n, r, i)), o = B(e, a, t, n, i), s = new Map(e.nodes.map((e, t) => [e.id, t]));
|
|
1120
1121
|
return a.filter((e) => o.has(e.id)).sort((e, t) => {
|
|
1121
1122
|
let n = o.get(e.id) ?? 0, r = o.get(t.id) ?? 0;
|
|
1122
1123
|
return n === r ? e.position.x === t.position.x ? e.position.y === t.position.y ? (s.get(e.id) ?? 0) - (s.get(t.id) ?? 0) : e.position.y - t.position.y : e.position.x - t.position.x : n - r;
|
|
1123
1124
|
});
|
|
1124
1125
|
}
|
|
1125
|
-
function
|
|
1126
|
+
function B(e, t, n, r, i) {
|
|
1126
1127
|
let a = new Set(t.map((e) => e.id)), o = e.edges.reduce((e, t) => {
|
|
1127
1128
|
let n = [...e.get(t.source) ?? [], t.target];
|
|
1128
1129
|
return new Map(e).set(t.source, n);
|
|
1129
1130
|
}, /* @__PURE__ */ new Map());
|
|
1130
|
-
return
|
|
1131
|
+
return vt(e, n, r, i).reduce((e, t) => U(e, V(t, o, a)), /* @__PURE__ */ new Map());
|
|
1131
1132
|
}
|
|
1132
|
-
function
|
|
1133
|
-
let i = n.filter((e) => e.status === "ACTIVE" || e.status === "WAITING").map((e) => e.currentNodeId), a = t.filter(
|
|
1133
|
+
function vt(e, t, n, r) {
|
|
1134
|
+
let i = n.filter((e) => e.status === "ACTIVE" || e.status === "WAITING").map((e) => e.currentNodeId), a = t.filter(zt).map((e) => e.nodeId), o = e.nodes.filter((e) => r.has(e.id)).map((e) => e.id), s = [...new Set([
|
|
1134
1135
|
...i,
|
|
1135
1136
|
...a,
|
|
1136
1137
|
...o
|
|
1137
1138
|
])], c = e.nodes.filter((e) => e.type === "startEvent").map((e) => e.id);
|
|
1138
1139
|
return s.length > 0 ? s : c;
|
|
1139
1140
|
}
|
|
1140
|
-
function
|
|
1141
|
-
return
|
|
1141
|
+
function V(e, t, n) {
|
|
1142
|
+
return H([{
|
|
1142
1143
|
distance: 0,
|
|
1143
1144
|
nodeId: e
|
|
1144
1145
|
}], t, n);
|
|
1145
1146
|
}
|
|
1146
|
-
function
|
|
1147
|
+
function H(e, t, n, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map()) {
|
|
1147
1148
|
let [a, ...o] = e;
|
|
1148
1149
|
if (!a) return i;
|
|
1149
|
-
if (r.has(a.nodeId)) return
|
|
1150
|
+
if (r.has(a.nodeId)) return H(o, t, n, r, i);
|
|
1150
1151
|
let s = new Set(r).add(a.nodeId), c = n.has(a.nodeId) ? new Map(i).set(a.nodeId, Math.min(i.get(a.nodeId) ?? a.distance, a.distance)) : i;
|
|
1151
|
-
return
|
|
1152
|
+
return H([...o, ...(t.get(a.nodeId) ?? []).map((e) => ({
|
|
1152
1153
|
distance: a.distance + 1,
|
|
1153
1154
|
nodeId: e
|
|
1154
1155
|
}))], t, n, s, c);
|
|
1155
1156
|
}
|
|
1156
|
-
function
|
|
1157
|
+
function U(e, t) {
|
|
1157
1158
|
return [...t.entries()].reduce((e, [t, n]) => new Map(e).set(t, Math.min(e.get(t) ?? n, n)), e);
|
|
1158
1159
|
}
|
|
1159
|
-
function
|
|
1160
|
+
function yt(e) {
|
|
1160
1161
|
return e.type === "userTask" ? `未來簽核:${e.data.label}` : e.type === "serviceTask" ? `未來知會:${e.data.label}` : e.type === "exclusiveGateway" ? `未來分流:${e.data.label}` : e.type === "parallelGateway" ? `未來匯合:${e.data.label}` : e.type === "endEvent" ? `流程完成:${e.data.label}` : `未來節點:${e.data.label}`;
|
|
1161
1162
|
}
|
|
1162
|
-
function
|
|
1163
|
+
function bt(e) {
|
|
1163
1164
|
try {
|
|
1164
1165
|
let t = JSON.parse(e.payloadJson);
|
|
1165
|
-
return
|
|
1166
|
+
return Rt(t) ? t : {};
|
|
1166
1167
|
} catch {
|
|
1167
1168
|
return {};
|
|
1168
1169
|
}
|
|
1169
1170
|
}
|
|
1170
|
-
function
|
|
1171
|
-
return e === "INSTANCE_STARTED" ? "案件已發起" : e === "TOKEN_CREATED" ? "流程路徑已建立" : e === "ENGINE_PROCESS_REQUESTED" ? "流程引擎已處理" : e === "TOKEN_ADVANCED" ? "流程已前進" : e === "TASK_CREATED" ? "待簽任務已建立" : e === "TASK_DECIDED" ?
|
|
1171
|
+
function xt(e, t) {
|
|
1172
|
+
return e === "INSTANCE_STARTED" ? "案件已發起" : e === "TOKEN_CREATED" ? "流程路徑已建立" : e === "ENGINE_PROCESS_REQUESTED" ? "流程引擎已處理" : e === "TOKEN_ADVANCED" ? "流程已前進" : e === "TASK_CREATED" ? "待簽任務已建立" : e === "TASK_DECIDED" ? St(K(t, "action")) : e === "SLA_TRIGGERED" ? "時限提醒已觸發" : e;
|
|
1172
1173
|
}
|
|
1173
|
-
function
|
|
1174
|
+
function St(e) {
|
|
1174
1175
|
return e === "APPROVED" ? "已同意" : e === "REJECTED" ? "已拒絕" : e === "RETURNED" ? "已退回" : e === "TRANSFERRED" ? "已轉派" : "簽核已決議";
|
|
1175
1176
|
}
|
|
1176
|
-
function
|
|
1177
|
+
function Ct(e, t, n, r) {
|
|
1177
1178
|
if (e.eventType === "TASK_CREATED") {
|
|
1178
1179
|
let e = K(t, "assigneeMemberId"), n = K(t, "originalAssigneeMemberId");
|
|
1179
1180
|
if (!e) {
|
|
1180
|
-
let e =
|
|
1181
|
+
let e = Nt(t, "candidateMemberIds");
|
|
1181
1182
|
return e.length ? `候選簽核人:${e.map((e) => R(e, r)).join("、")}` : null;
|
|
1182
1183
|
}
|
|
1183
1184
|
let i = R(e, r), a = R(n, r);
|
|
1184
1185
|
return n && n !== e ? `待簽人:${i}(原簽核人:${a})` : `待簽人:${i}`;
|
|
1185
1186
|
}
|
|
1186
1187
|
if (e.eventType === "TASK_DECIDED") {
|
|
1187
|
-
let e = K(t, "action"), n = K(t, "comment"), i = e ? `決議:${
|
|
1188
|
-
return e === "REJECTED" && n ? [i, `拒絕原因:${n}`].filter(
|
|
1188
|
+
let e = K(t, "action"), n = K(t, "comment"), i = e ? `決議:${G(e)}` : null, a = K(t, "transferToMemberId");
|
|
1189
|
+
return e === "REJECTED" && n ? [i, `拒絕原因:${n}`].filter(Y).join(" · ") : e === "TRANSFERRED" ? [i, `轉派給:${R(a, r)}`].filter(Y).join(" · ") : i;
|
|
1189
1190
|
}
|
|
1190
1191
|
if (e.eventType === "TOKEN_ADVANCED") {
|
|
1191
1192
|
let e = K(t, "action");
|
|
1192
|
-
if (e) return `流程結果:${
|
|
1193
|
-
let r =
|
|
1193
|
+
if (e) return `流程結果:${G(e)}`;
|
|
1194
|
+
let r = J(t, "arrivedCount"), i = J(t, "requiredCount");
|
|
1194
1195
|
if (r !== null && i !== null) return `等待匯合:${r}/${i}`;
|
|
1195
1196
|
let a = K(t, "fromNodeId"), o = K(t, "toNodeId");
|
|
1196
|
-
if (a && o) return `由 ${
|
|
1197
|
+
if (a && o) return `由 ${W(a, n)} 前進至 ${W(o, n)}`;
|
|
1197
1198
|
}
|
|
1198
1199
|
if (e.eventType === "ENGINE_PROCESS_REQUESTED") {
|
|
1199
1200
|
let e = K(t, "state");
|
|
@@ -1201,44 +1202,44 @@ function St(e, t, n, r) {
|
|
|
1201
1202
|
}
|
|
1202
1203
|
return null;
|
|
1203
1204
|
}
|
|
1204
|
-
function
|
|
1205
|
-
if (e.eventType !== "TASK_DECIDED") return [
|
|
1205
|
+
function wt(e, t, n, r, i, a, o) {
|
|
1206
|
+
if (e.eventType !== "TASK_DECIDED") return [I(Ct(e, t, n, o))].filter(z);
|
|
1206
1207
|
let s = e.taskId ? r.get(e.taskId) : null, c = K(t, "action") ?? s?.action ?? null, l = K(t, "comment") ?? s?.comment ?? null, u = K(t, "transferToMemberId") ?? s?.transferToMemberId ?? null, d = K(t, "signatureId") ?? s?.signatureId ?? null, f = d ? i.get(d) : null;
|
|
1207
1208
|
return [
|
|
1208
|
-
|
|
1209
|
-
c === "REJECTED" ?
|
|
1210
|
-
c === "RETURNED" ?
|
|
1211
|
-
c === "TRANSFERRED" ?
|
|
1212
|
-
c === "TRANSFERRED" ?
|
|
1213
|
-
f ?
|
|
1209
|
+
I(c ? `決議:${G(c)}` : null),
|
|
1210
|
+
c === "REJECTED" ? pt(`拒絕原因:${l ?? "-"}`) : null,
|
|
1211
|
+
c === "RETURNED" ? I(`退回說明:${l ?? "-"}`) : null,
|
|
1212
|
+
c === "TRANSFERRED" ? I(`轉派給:${R(u, o)}`) : null,
|
|
1213
|
+
c === "TRANSFERRED" ? I(`轉派說明:${l ?? "-"}`) : null,
|
|
1214
|
+
f ? I(a?.valid ? `簽章:已驗證(${ot(f.signedPayloadHash)})` : `簽章:待檢查(${ot(f.signedPayloadHash)})`) : null
|
|
1214
1215
|
].filter(z);
|
|
1215
1216
|
}
|
|
1216
|
-
function wt(e, t) {
|
|
1217
|
-
return e ? Tt(e, t) : null;
|
|
1218
|
-
}
|
|
1219
1217
|
function Tt(e, t) {
|
|
1218
|
+
return e ? W(e, t) : null;
|
|
1219
|
+
}
|
|
1220
|
+
function W(e, t) {
|
|
1220
1221
|
return t?.nodes.find((t) => t.id === e)?.data.label ?? e;
|
|
1221
1222
|
}
|
|
1222
1223
|
function Et(e, t) {
|
|
1223
1224
|
if (t.type !== "userTask" || !t.data.returnBehavior.allowReturn) return [];
|
|
1224
1225
|
if (t.data.returnBehavior.allowedTargets === "ANY") return e.nodes.filter((e) => e.id !== t.id).map((e) => ({
|
|
1225
1226
|
id: e.id,
|
|
1226
|
-
name: `${e.data.label}(${
|
|
1227
|
+
name: `${e.data.label}(${Q(e.type)})`
|
|
1227
1228
|
}));
|
|
1228
1229
|
let n = t.data.returnBehavior.allowedTargets === "INITIATOR" ? e.nodes.find((e) => e.type === "startEvent")?.id : e.edges.find((e) => e.target === t.id)?.source, r = e.nodes.find((e) => e.id === n);
|
|
1229
1230
|
return r ? [{
|
|
1230
1231
|
id: r.id,
|
|
1231
|
-
name: `${r.data.label}(${
|
|
1232
|
+
name: `${r.data.label}(${Q(r.type)})`
|
|
1232
1233
|
}] : [];
|
|
1233
1234
|
}
|
|
1234
|
-
function
|
|
1235
|
+
function G(e) {
|
|
1235
1236
|
return e === "APPROVED" ? "同意" : e === "REJECTED" ? "拒絕" : e === "RETURNED" ? "退回" : e === "TRANSFERRED" ? "轉派" : e;
|
|
1236
1237
|
}
|
|
1237
1238
|
function Dt(e) {
|
|
1238
1239
|
return e === "PENDING" ? "待處理" : e === "IN_PROGRESS" ? "處理中" : e === "COMPLETED" ? "已完成" : e === "CANCELLED" ? "已取消" : e === "TRANSFERRED" ? "已轉派" : e;
|
|
1239
1240
|
}
|
|
1240
1241
|
function Ot(e, t = /* @__PURE__ */ new Map()) {
|
|
1241
|
-
let n =
|
|
1242
|
+
let n = q(e.delegationChainJson);
|
|
1242
1243
|
if (!e.assigneeMemberId) return e.candidateMemberIds.length ? `候選 ${e.candidateMemberIds.map((e) => R(e, t)).join("、")}` : "未指定";
|
|
1243
1244
|
let r = R(e.assigneeMemberId, t), i = R(e.originalAssigneeMemberId, t);
|
|
1244
1245
|
return n.length === 0 || e.originalAssigneeMemberId === e.assigneeMemberId ? r : `${r}(原:${i})`;
|
|
@@ -1252,26 +1253,26 @@ function At(e) {
|
|
|
1252
1253
|
function jt(e, t) {
|
|
1253
1254
|
return e.eventType === "SLA_TRIGGERED" || K(t, "action") === "REJECTED" || K(t, "instanceState") === "REJECTED";
|
|
1254
1255
|
}
|
|
1255
|
-
function
|
|
1256
|
+
function Mt(e) {
|
|
1256
1257
|
return t(e);
|
|
1257
1258
|
}
|
|
1258
1259
|
function K(e, t) {
|
|
1259
1260
|
let n = e[t];
|
|
1260
1261
|
return typeof n == "string" ? n : null;
|
|
1261
1262
|
}
|
|
1262
|
-
function
|
|
1263
|
+
function Nt(e, t) {
|
|
1263
1264
|
let n = e[t];
|
|
1264
1265
|
return Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
|
|
1265
1266
|
}
|
|
1266
|
-
function
|
|
1267
|
+
function Pt(e) {
|
|
1267
1268
|
return {
|
|
1268
1269
|
email: e.email,
|
|
1269
1270
|
id: e.memberId,
|
|
1270
1271
|
name: `${e.name} · ${e.email}`
|
|
1271
1272
|
};
|
|
1272
1273
|
}
|
|
1273
|
-
function
|
|
1274
|
-
if (!
|
|
1274
|
+
function Ft(e) {
|
|
1275
|
+
if (!Rt(e)) return null;
|
|
1275
1276
|
let t = e.email, n = e.id, r = e.name;
|
|
1276
1277
|
return typeof n == "string" && typeof r == "string" ? {
|
|
1277
1278
|
email: typeof t == "string" ? t : null,
|
|
@@ -1279,7 +1280,7 @@ function Pt(e) {
|
|
|
1279
1280
|
name: r
|
|
1280
1281
|
} : null;
|
|
1281
1282
|
}
|
|
1282
|
-
function
|
|
1283
|
+
function It(e, t) {
|
|
1283
1284
|
let n = e.trim().toLocaleLowerCase();
|
|
1284
1285
|
if (!n) return null;
|
|
1285
1286
|
let r = t.filter((e) => [
|
|
@@ -1289,10 +1290,10 @@ function Ft(e, t) {
|
|
|
1289
1290
|
].some((e) => e.toLocaleLowerCase().includes(n)));
|
|
1290
1291
|
return r.length === 1 ? r[0] ?? null : null;
|
|
1291
1292
|
}
|
|
1292
|
-
function
|
|
1293
|
+
function q(e) {
|
|
1293
1294
|
try {
|
|
1294
1295
|
let t = JSON.parse(e);
|
|
1295
|
-
return Array.isArray(t) ? t.map((e) =>
|
|
1296
|
+
return Array.isArray(t) ? t.map((e) => Rt(e) ? Lt(e) : null).filter((e) => e !== null) : [];
|
|
1296
1297
|
} catch {
|
|
1297
1298
|
return [];
|
|
1298
1299
|
}
|
|
@@ -1306,46 +1307,46 @@ function Lt(e) {
|
|
|
1306
1307
|
to: n
|
|
1307
1308
|
};
|
|
1308
1309
|
}
|
|
1309
|
-
function
|
|
1310
|
+
function J(e, t) {
|
|
1310
1311
|
let n = e[t];
|
|
1311
1312
|
return typeof n == "number" ? n : null;
|
|
1312
1313
|
}
|
|
1313
|
-
function
|
|
1314
|
+
function Y(e) {
|
|
1314
1315
|
return typeof e == "string" && e.trim().length > 0;
|
|
1315
1316
|
}
|
|
1316
|
-
function
|
|
1317
|
+
function Rt(e) {
|
|
1317
1318
|
return typeof e == "object" && !!e;
|
|
1318
1319
|
}
|
|
1319
|
-
function
|
|
1320
|
+
function zt(e) {
|
|
1320
1321
|
return e.status === "PENDING" || e.status === "IN_PROGRESS";
|
|
1321
1322
|
}
|
|
1322
|
-
function
|
|
1323
|
-
return /* @__PURE__ */
|
|
1323
|
+
function X({ data: e }) {
|
|
1324
|
+
return /* @__PURE__ */ b("div", {
|
|
1324
1325
|
style: Ut(e.tone),
|
|
1325
1326
|
children: [
|
|
1326
|
-
/* @__PURE__ */
|
|
1327
|
+
/* @__PURE__ */ y(Pe, {
|
|
1327
1328
|
isConnectable: !1,
|
|
1328
1329
|
position: S.Left,
|
|
1329
1330
|
style: Qe,
|
|
1330
1331
|
type: "target"
|
|
1331
1332
|
}),
|
|
1332
|
-
/* @__PURE__ */ v
|
|
1333
|
+
/* @__PURE__ */ y(v, {
|
|
1333
1334
|
component: "span",
|
|
1334
1335
|
ellipsis: !0,
|
|
1335
1336
|
title: e.label,
|
|
1336
1337
|
variant: "label-primary",
|
|
1337
1338
|
children: e.label
|
|
1338
1339
|
}),
|
|
1339
|
-
/* @__PURE__ */
|
|
1340
|
+
/* @__PURE__ */ y("span", {
|
|
1340
1341
|
style: Wt(e.tone),
|
|
1341
1342
|
children: e.statusLabel
|
|
1342
1343
|
}),
|
|
1343
|
-
/* @__PURE__ */
|
|
1344
|
+
/* @__PURE__ */ y("span", {
|
|
1344
1345
|
title: e.secondaryLabel,
|
|
1345
1346
|
style: Ze,
|
|
1346
1347
|
children: e.secondaryLabel || e.kindLabel
|
|
1347
1348
|
}),
|
|
1348
|
-
/* @__PURE__ */
|
|
1349
|
+
/* @__PURE__ */ y(Pe, {
|
|
1349
1350
|
isConnectable: !1,
|
|
1350
1351
|
position: S.Right,
|
|
1351
1352
|
style: Qe,
|
|
@@ -1356,10 +1357,10 @@ function Y({ data: e }) {
|
|
|
1356
1357
|
}
|
|
1357
1358
|
function Bt(e, t, n, r) {
|
|
1358
1359
|
return e.nodes.map((e) => {
|
|
1359
|
-
let i =
|
|
1360
|
+
let i = Z(e, t, n, r);
|
|
1360
1361
|
return {
|
|
1361
1362
|
data: {
|
|
1362
|
-
kindLabel:
|
|
1363
|
+
kindLabel: Q(e.type),
|
|
1363
1364
|
label: e.data.label,
|
|
1364
1365
|
secondaryLabel: i.secondaryLabel,
|
|
1365
1366
|
statusLabel: i.statusLabel,
|
|
@@ -1374,19 +1375,19 @@ function Bt(e, t, n, r) {
|
|
|
1374
1375
|
});
|
|
1375
1376
|
}
|
|
1376
1377
|
function Vt(e) {
|
|
1377
|
-
let t = new
|
|
1378
|
+
let t = new Ie.graphlib.Graph();
|
|
1378
1379
|
return t.setDefaultEdgeLabel(() => ({})), t.setGraph({
|
|
1379
1380
|
nodesep: 56,
|
|
1380
1381
|
rankdir: "LR",
|
|
1381
1382
|
ranksep: 120
|
|
1382
1383
|
}), e.nodes.forEach((e) => {
|
|
1383
1384
|
t.setNode(e.id, {
|
|
1384
|
-
height:
|
|
1385
|
+
height: j,
|
|
1385
1386
|
width: A
|
|
1386
1387
|
});
|
|
1387
1388
|
}), e.edges.forEach((e) => {
|
|
1388
1389
|
t.setEdge(e.source, e.target);
|
|
1389
|
-
}),
|
|
1390
|
+
}), Ie.layout(t), {
|
|
1390
1391
|
...e,
|
|
1391
1392
|
nodes: e.nodes.map((e) => {
|
|
1392
1393
|
let n = t.node(e.id);
|
|
@@ -1394,7 +1395,7 @@ function Vt(e) {
|
|
|
1394
1395
|
...e,
|
|
1395
1396
|
position: {
|
|
1396
1397
|
x: n.x - A / 2,
|
|
1397
|
-
y: n.y -
|
|
1398
|
+
y: n.y - j / 2
|
|
1398
1399
|
}
|
|
1399
1400
|
} : e;
|
|
1400
1401
|
})
|
|
@@ -1402,7 +1403,7 @@ function Vt(e) {
|
|
|
1402
1403
|
}
|
|
1403
1404
|
function Ht(e) {
|
|
1404
1405
|
return e.edges.map((e) => {
|
|
1405
|
-
let t =
|
|
1406
|
+
let t = Gt(e);
|
|
1406
1407
|
return {
|
|
1407
1408
|
animated: !1,
|
|
1408
1409
|
id: e.id,
|
|
@@ -1430,7 +1431,7 @@ function Ht(e) {
|
|
|
1430
1431
|
};
|
|
1431
1432
|
});
|
|
1432
1433
|
}
|
|
1433
|
-
function
|
|
1434
|
+
function Z(e, t, n, r) {
|
|
1434
1435
|
let i = t.filter((t) => t.nodeId === e.id), a = i.find((e) => e.status === "PENDING" || e.status === "IN_PROGRESS"), o = i.find((e) => e.status === "CANCELLED"), s = i.find((e) => e.status === "COMPLETED"), c = n.filter((t) => t.currentNodeId === e.id), l = c.find((e) => e.status === "ACTIVE"), u = c.find((e) => e.status === "WAITING");
|
|
1435
1436
|
return a ? {
|
|
1436
1437
|
secondaryLabel: `處理者 ${Ot(a)}`,
|
|
@@ -1461,30 +1462,30 @@ function X(e, t, n, r) {
|
|
|
1461
1462
|
statusLabel: r === "REJECTED" ? "已拒絕" : "已完成",
|
|
1462
1463
|
tone: r === "REJECTED" ? "cancelled" : "completed"
|
|
1463
1464
|
} : {
|
|
1464
|
-
secondaryLabel:
|
|
1465
|
+
secondaryLabel: Q(e.type),
|
|
1465
1466
|
statusLabel: "未抵達",
|
|
1466
1467
|
tone: "neutral"
|
|
1467
1468
|
};
|
|
1468
1469
|
}
|
|
1469
|
-
function
|
|
1470
|
+
function Q(e) {
|
|
1470
1471
|
return e === "startEvent" ? "開始" : e === "endEvent" ? "完成" : e === "userTask" ? "簽核節點" : e === "serviceTask" ? "知會節點" : e === "exclusiveGateway" ? "條件分流" : "平行處理";
|
|
1471
1472
|
}
|
|
1472
1473
|
function Ut(e) {
|
|
1473
1474
|
return e === "current" ? {
|
|
1474
|
-
...
|
|
1475
|
+
...M,
|
|
1475
1476
|
border: "1px solid var(--mzn-color-primary, #0057ff)",
|
|
1476
1477
|
boxShadow: "0 0 0 3px rgba(0, 87, 255, 0.14)"
|
|
1477
1478
|
} : e === "completed" ? {
|
|
1478
|
-
...
|
|
1479
|
+
...M,
|
|
1479
1480
|
border: "1px solid #16a34a"
|
|
1480
1481
|
} : e === "cancelled" ? {
|
|
1481
|
-
...
|
|
1482
|
+
...M,
|
|
1482
1483
|
border: "1px solid #dc2626",
|
|
1483
1484
|
opacity: .72
|
|
1484
1485
|
} : e === "waiting" ? {
|
|
1485
|
-
...
|
|
1486
|
+
...M,
|
|
1486
1487
|
border: "1px dashed #64748b"
|
|
1487
|
-
} :
|
|
1488
|
+
} : M;
|
|
1488
1489
|
}
|
|
1489
1490
|
function Wt(e) {
|
|
1490
1491
|
let t = Xe;
|
|
@@ -1510,13 +1511,13 @@ function Wt(e) {
|
|
|
1510
1511
|
color: "#64748b"
|
|
1511
1512
|
};
|
|
1512
1513
|
}
|
|
1513
|
-
function
|
|
1514
|
+
function Gt(e) {
|
|
1514
1515
|
return e.data.label ? e.data.label : e.data.isDefault ? "其他情況" : e.data.condition ?? "";
|
|
1515
1516
|
}
|
|
1516
|
-
function
|
|
1517
|
-
return e.edges.map(
|
|
1517
|
+
function Kt(e) {
|
|
1518
|
+
return e.edges.map(Gt).filter((e) => e.trim().length > 0);
|
|
1518
1519
|
}
|
|
1519
1520
|
//#endregion
|
|
1520
|
-
export {
|
|
1521
|
+
export { it as t };
|
|
1521
1522
|
|
|
1522
|
-
//# sourceMappingURL=detail-
|
|
1523
|
+
//# sourceMappingURL=detail-BcGAqJ_R.js.map
|