@rytass/bpm-core-react 0.17.1 → 0.17.3
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 +32 -0
- package/dist/chunks/compose-CKs2XmLN.cjs +2 -0
- package/dist/chunks/compose-CKs2XmLN.cjs.map +1 -0
- package/dist/chunks/{compose-_pREPtfN.js → compose-CY3PAzhP.js} +158 -152
- package/dist/chunks/compose-CY3PAzhP.js.map +1 -0
- package/dist/chunks/{designer-BiywgNXs.js → designer-DzmrgVjO.js} +1224 -1214
- package/dist/chunks/designer-DzmrgVjO.js.map +1 -0
- package/dist/chunks/designer-z8hcWEKd.cjs +65 -0
- package/dist/chunks/designer-z8hcWEKd.cjs.map +1 -0
- package/dist/chunks/{detail-DRCTnuKm.cjs → detail-BQSVgVlO.cjs} +2 -2
- package/dist/chunks/{detail-DRCTnuKm.cjs.map → detail-BQSVgVlO.cjs.map} +1 -1
- package/dist/chunks/{detail-DScLf42P.js → detail-B_bSg31B.js} +3 -1
- package/dist/chunks/{detail-DScLf42P.js.map → detail-B_bSg31B.js.map} +1 -1
- package/dist/chunks/language-provider-B3cEbLe4.js +18 -0
- package/dist/chunks/language-provider-B3cEbLe4.js.map +1 -0
- package/dist/chunks/language-provider-Bdnx3Gxl.cjs +2 -0
- package/dist/chunks/language-provider-Bdnx3Gxl.cjs.map +1 -0
- package/dist/chunks/providers-DP7b0TMN.cjs +2 -0
- package/dist/chunks/providers-DP7b0TMN.cjs.map +1 -0
- package/dist/chunks/{providers-J5eyByQj.js → providers-H_vPRsSN.js} +202 -198
- package/dist/chunks/providers-H_vPRsSN.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +22 -21
- package/dist/index.js.map +1 -1
- package/dist/lib/language-provider.d.cts +22 -0
- package/dist/lib/language-provider.d.ts +22 -0
- package/dist/lib/providers.d.cts +9 -1
- package/dist/lib/providers.d.ts +9 -1
- package/dist/next/BPMNextProviders.d.cts +7 -1
- package/dist/next/BPMNextProviders.d.ts +7 -1
- package/dist/next/index.cjs +1 -1
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.js +12 -11
- package/dist/next/index.js.map +1 -1
- package/dist/pages/instances/detail/index.cjs +1 -1
- package/dist/pages/instances/detail/index.js +1 -1
- package/dist/pages/templates/compose/index.cjs +1 -1
- package/dist/pages/templates/compose/index.js +1 -1
- package/dist/pages/templates/designer/index.cjs +1 -1
- package/dist/pages/templates/designer/index.js +1 -1
- package/dist/views/instances/detail/index.cjs +1 -1
- package/dist/views/instances/detail/index.js +1 -1
- package/dist/views/templates/compose/index.cjs +1 -1
- package/dist/views/templates/compose/index.js +1 -1
- package/dist/views/templates/designer/index.cjs +1 -1
- package/dist/views/templates/designer/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunks/compose-B7TtrpQJ.cjs +0 -2
- package/dist/chunks/compose-B7TtrpQJ.cjs.map +0 -1
- package/dist/chunks/compose-_pREPtfN.js.map +0 -1
- package/dist/chunks/designer-BiywgNXs.js.map +0 -1
- package/dist/chunks/designer-ttAqv859.cjs +0 -65
- package/dist/chunks/designer-ttAqv859.cjs.map +0 -1
- package/dist/chunks/providers-DHtDZFNA.cjs +0 -2
- package/dist/chunks/providers-DHtDZFNA.cjs.map +0 -1
- package/dist/chunks/providers-J5eyByQj.js.map +0 -1
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { r as e } from "./router-adapter-DftlFTOd.js";
|
|
3
3
|
import { n as t, t as n } from "./auth-provider-B5oPmvk2.js";
|
|
4
|
-
import { r } from "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { r, t as i } from "./language-provider-B3cEbLe4.js";
|
|
5
|
+
import { r as a } from "./routes-config-yZbESPlw.js";
|
|
6
|
+
import { t as o } from "./bpm-form-field-Cao0rMol.js";
|
|
7
|
+
import { Fragment as s, createContext as c, useCallback as l, useContext as u, useEffect as ee, useMemo as d, useState as f } from "react";
|
|
8
|
+
import { Typography as te } from "@mezzanine-ui/react";
|
|
9
|
+
import { Fragment as ne, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
|
+
import { archiveNotifications as re, decideTask as h, listNotifications as ie, markAllNotificationsRead as ae, markNotificationRead as g, readUnreadNotificationCount as _, unarchiveNotifications as oe } from "@rytass/bpm-core-client/workflow";
|
|
11
|
+
import { CalendarConfigProviderMoment as v, CalendarLocale as y } from "@mezzanine-ui/react/moment";
|
|
11
12
|
import se from "@mezzanine-ui/react/Drawer";
|
|
12
|
-
import
|
|
13
|
+
import b from "@mezzanine-ui/react/Modal";
|
|
13
14
|
import ce from "@mezzanine-ui/react/NotificationCenter";
|
|
14
|
-
import
|
|
15
|
+
import x from "@mezzanine-ui/react/Textarea";
|
|
15
16
|
//#region src/lib/notification-drawer-provider.tsx
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
let [t, n] =
|
|
17
|
+
var S = c(null);
|
|
18
|
+
function C({ children: e }) {
|
|
19
|
+
let [t, n] = f(!1), r = l(() => {
|
|
19
20
|
n(!0);
|
|
20
|
-
}, []), i =
|
|
21
|
+
}, []), i = l(() => {
|
|
21
22
|
n(!1);
|
|
22
|
-
}, []), a =
|
|
23
|
+
}, []), a = l(() => {
|
|
23
24
|
n((e) => !e);
|
|
24
|
-
}, []), o =
|
|
25
|
+
}, []), o = d(() => ({
|
|
25
26
|
close: i,
|
|
26
27
|
isOpen: t,
|
|
27
28
|
open: r,
|
|
@@ -32,13 +33,13 @@ function x({ children: e }) {
|
|
|
32
33
|
r,
|
|
33
34
|
a
|
|
34
35
|
]);
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ p(S.Provider, {
|
|
36
37
|
value: o,
|
|
37
38
|
children: e
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
41
|
+
function w() {
|
|
42
|
+
return u(S) || {
|
|
42
43
|
close: () => void 0,
|
|
43
44
|
isOpen: !1,
|
|
44
45
|
open: () => void 0,
|
|
@@ -47,14 +48,14 @@ function le() {
|
|
|
47
48
|
}
|
|
48
49
|
//#endregion
|
|
49
50
|
//#region src/lib/notification-unread-provider.tsx
|
|
50
|
-
var
|
|
51
|
-
function
|
|
52
|
-
let { member: n } = t(), r = n?.memberId ?? null, [i, a] =
|
|
51
|
+
var T = c(null);
|
|
52
|
+
function E({ children: e }) {
|
|
53
|
+
let { member: n } = t(), r = n?.memberId ?? null, [i, a] = f(0), o = l(async () => {
|
|
53
54
|
if (!r) return a(0), 0;
|
|
54
|
-
let e = await
|
|
55
|
+
let e = await _(r);
|
|
55
56
|
return a(e), e;
|
|
56
57
|
}, [r]);
|
|
57
|
-
|
|
58
|
+
ee(() => {
|
|
58
59
|
let e = !0;
|
|
59
60
|
return (async () => {
|
|
60
61
|
try {
|
|
@@ -67,36 +68,36 @@ function C({ children: e }) {
|
|
|
67
68
|
e = !1;
|
|
68
69
|
};
|
|
69
70
|
}, [o]);
|
|
70
|
-
let
|
|
71
|
+
let s = d(() => ({
|
|
71
72
|
refreshUnreadCount: o,
|
|
72
73
|
unreadCount: i
|
|
73
74
|
}), [o, i]);
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
value:
|
|
75
|
+
return /* @__PURE__ */ p(T.Provider, {
|
|
76
|
+
value: s,
|
|
76
77
|
children: e
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
-
return
|
|
80
|
+
function D() {
|
|
81
|
+
return u(T) || {
|
|
81
82
|
refreshUnreadCount: async () => 0,
|
|
82
83
|
unreadCount: 0
|
|
83
84
|
};
|
|
84
85
|
}
|
|
85
86
|
//#endregion
|
|
86
87
|
//#region src/components/notification-drawer.tsx
|
|
87
|
-
var
|
|
88
|
+
var O = [
|
|
88
89
|
"today",
|
|
89
90
|
"yesterday",
|
|
90
91
|
"past7Days",
|
|
91
92
|
"earlier"
|
|
92
|
-
],
|
|
93
|
+
], le = {
|
|
93
94
|
earlier: "更早",
|
|
94
95
|
past7Days: "過去七天",
|
|
95
96
|
today: "今天",
|
|
96
97
|
yesterday: "昨天"
|
|
97
|
-
},
|
|
98
|
-
function
|
|
99
|
-
let t =
|
|
98
|
+
}, ue = 50, de = "toggleArchived";
|
|
99
|
+
function fe(e) {
|
|
100
|
+
let t = M(e) !== !1;
|
|
100
101
|
return [
|
|
101
102
|
...e.actionable ? [{
|
|
102
103
|
id: "approve",
|
|
@@ -122,208 +123,208 @@ function me(e) {
|
|
|
122
123
|
}
|
|
123
124
|
];
|
|
124
125
|
}
|
|
125
|
-
var
|
|
126
|
+
var pe = {
|
|
126
127
|
APPROVED: "簽核任務已同意",
|
|
127
128
|
REJECTED: "簽核任務已拒絕",
|
|
128
129
|
RETURNED: "簽核任務已退回",
|
|
129
130
|
SUPERSEDED: "簽核任務已結束",
|
|
130
131
|
TRANSFERRED: "簽核任務已轉派"
|
|
131
132
|
};
|
|
132
|
-
function
|
|
133
|
-
return e.resolution ?
|
|
133
|
+
function me(e) {
|
|
134
|
+
return e.resolution ? pe[e.resolution] : e.title;
|
|
134
135
|
}
|
|
135
136
|
function he(e) {
|
|
136
|
-
return e.resolution === "APPROVED" ? "success" : e.resolution === "REJECTED" ? "error" : e.resolution ? "info" :
|
|
137
|
+
return e.resolution === "APPROVED" ? "success" : e.resolution === "REJECTED" ? "error" : e.resolution ? "info" : A(e.type);
|
|
137
138
|
}
|
|
138
|
-
function
|
|
139
|
-
let n = e(),
|
|
140
|
-
if (!
|
|
141
|
-
|
|
139
|
+
function k() {
|
|
140
|
+
let n = e(), r = a(), { member: i } = t(), { close: c, isOpen: u } = w(), { refreshUnreadCount: _ } = D(), v = i?.memberId ?? null, [y, S] = f([]), [C, T] = f(0), [E, pe] = f(1), [k, A] = f(!1), [M, N] = f(!1), [P, F] = f(null), [I, L] = f(null), [R, _e] = f("all"), [z, ve] = f(!1), [B, V] = f(null), [ye, H] = f(""), [U, W] = f(null), [be, G] = f(""), [K, q] = f(!1), xe = ye.trim(), J = be.trim(), Y = l(async (e, t) => {
|
|
141
|
+
if (!v) return !1;
|
|
142
|
+
A(!0), F(null);
|
|
142
143
|
try {
|
|
143
144
|
let n = await ie({
|
|
144
145
|
includeArchived: z,
|
|
145
146
|
includeRead: !0,
|
|
146
147
|
page: e,
|
|
147
|
-
pageSize:
|
|
148
|
-
recipientMemberId:
|
|
148
|
+
pageSize: ue,
|
|
149
|
+
recipientMemberId: v
|
|
149
150
|
});
|
|
150
|
-
return S((e) => t ? [...e, ...n.notifications] : n.notifications), T(n.totalCount),
|
|
151
|
+
return S((e) => t ? [...e, ...n.notifications] : n.notifications), T(n.totalCount), pe(e), await _(), !0;
|
|
151
152
|
} catch (e) {
|
|
152
|
-
return F(
|
|
153
|
+
return F(j(e)), !1;
|
|
153
154
|
} finally {
|
|
154
|
-
|
|
155
|
+
A(!1);
|
|
155
156
|
}
|
|
156
157
|
}, [
|
|
157
|
-
|
|
158
|
+
v,
|
|
158
159
|
z,
|
|
159
160
|
_
|
|
160
161
|
]);
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
ee(() => {
|
|
163
|
+
u && v && (F(null), L(null), Y(1, !1));
|
|
163
164
|
}, [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
u,
|
|
166
|
+
v,
|
|
167
|
+
Y
|
|
167
168
|
]);
|
|
168
|
-
let
|
|
169
|
+
let Se = l((e) => {
|
|
169
170
|
let t = e.target.value;
|
|
170
171
|
(t === "all" || t === "read" || t === "unread") && _e(t);
|
|
171
|
-
}, []),
|
|
172
|
-
if (
|
|
172
|
+
}, []), Ce = l(async () => {
|
|
173
|
+
if (v && !M) {
|
|
173
174
|
N(!0), F(null);
|
|
174
175
|
try {
|
|
175
|
-
await ae({ recipientMemberId:
|
|
176
|
+
await ae({ recipientMemberId: v }), await Y(1, !1);
|
|
176
177
|
} catch (e) {
|
|
177
|
-
F(
|
|
178
|
+
F(j(e));
|
|
178
179
|
} finally {
|
|
179
180
|
N(!1);
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
183
|
}, [
|
|
183
184
|
M,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
]),
|
|
187
|
-
|
|
185
|
+
v,
|
|
186
|
+
Y
|
|
187
|
+
]), we = l(() => {
|
|
188
|
+
k || Y(E + 1, !0);
|
|
188
189
|
}, [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
]),
|
|
193
|
-
if (
|
|
194
|
-
await
|
|
190
|
+
k,
|
|
191
|
+
Y,
|
|
192
|
+
E
|
|
193
|
+
]), Te = l(async (e) => {
|
|
194
|
+
if (v) try {
|
|
195
|
+
await g({
|
|
195
196
|
id: e,
|
|
196
|
-
readerMemberId:
|
|
197
|
-
}), await
|
|
197
|
+
readerMemberId: v
|
|
198
|
+
}), await Y(1, !1);
|
|
198
199
|
} catch (e) {
|
|
199
|
-
F(
|
|
200
|
+
F(j(e));
|
|
200
201
|
}
|
|
201
|
-
}, [
|
|
202
|
-
if (
|
|
202
|
+
}, [v, Y]), Ee = l(async (e) => {
|
|
203
|
+
if (v) {
|
|
203
204
|
F(null), L(null);
|
|
204
205
|
try {
|
|
205
|
-
let t =
|
|
206
|
-
e.archivedAt ? (await oe({ ids: [e.id] }), L(`已將「${t}」移出封存。`)) : (await
|
|
206
|
+
let t = me(e);
|
|
207
|
+
e.archivedAt ? (await oe({ ids: [e.id] }), L(`已將「${t}」移出封存。`)) : (await re({ ids: [e.id] }), L(`已封存「${t}」。`)), await Y(1, !1);
|
|
207
208
|
} catch (e) {
|
|
208
|
-
F(
|
|
209
|
+
F(j(e));
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
|
-
}, [
|
|
212
|
-
e.id ===
|
|
213
|
-
}, []),
|
|
214
|
-
if (e.instanceId &&
|
|
215
|
-
e.status !== "READ" && (await
|
|
212
|
+
}, [v, Y]), De = l((e) => {
|
|
213
|
+
e.id === de && (L(null), ve((e) => !e));
|
|
214
|
+
}, []), X = l(async (e) => {
|
|
215
|
+
if (e.instanceId && v) try {
|
|
216
|
+
e.status !== "READ" && (await g({
|
|
216
217
|
id: e.id,
|
|
217
|
-
readerMemberId:
|
|
218
|
-
}), await _()),
|
|
218
|
+
readerMemberId: v
|
|
219
|
+
}), await _()), c(), n.push(r.caseDetail(e.instanceId));
|
|
219
220
|
} catch (e) {
|
|
220
|
-
F(
|
|
221
|
+
F(j(e));
|
|
221
222
|
}
|
|
222
223
|
}, [
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
c,
|
|
225
|
+
v,
|
|
225
226
|
_,
|
|
226
227
|
n,
|
|
227
|
-
|
|
228
|
-
]),
|
|
229
|
-
F(null), V(e),
|
|
230
|
-
}, []),
|
|
231
|
-
|
|
232
|
-
}, [
|
|
228
|
+
r
|
|
229
|
+
]), Oe = l((e) => {
|
|
230
|
+
F(null), V(e), H("");
|
|
231
|
+
}, []), ke = l(() => {
|
|
232
|
+
K || (V(null), H(""));
|
|
233
|
+
}, [K]), Ae = l(async () => {
|
|
233
234
|
let e = B;
|
|
234
|
-
if (e?.taskId &&
|
|
235
|
-
|
|
235
|
+
if (e?.taskId && v && !K) {
|
|
236
|
+
q(!0), F(null), L(null);
|
|
236
237
|
try {
|
|
237
|
-
if (await
|
|
238
|
+
if (await h({
|
|
238
239
|
action: "APPROVED",
|
|
239
|
-
comment:
|
|
240
|
-
decidedByMemberId:
|
|
240
|
+
comment: xe || null,
|
|
241
|
+
decidedByMemberId: v,
|
|
241
242
|
taskId: e.taskId
|
|
242
|
-
}), !await
|
|
243
|
-
V(null),
|
|
243
|
+
}), !await Y(1, !1)) return;
|
|
244
|
+
V(null), H(""), L(`已同意「${e.title}」。`);
|
|
244
245
|
} catch (e) {
|
|
245
|
-
F(
|
|
246
|
+
F(j(e));
|
|
246
247
|
} finally {
|
|
247
|
-
|
|
248
|
+
q(!1);
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
251
|
}, [
|
|
251
252
|
B,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
]),
|
|
257
|
-
|
|
258
|
-
}, []),
|
|
259
|
-
|
|
260
|
-
}, []),
|
|
261
|
-
let e =
|
|
262
|
-
if (e?.taskId &&
|
|
263
|
-
|
|
253
|
+
v,
|
|
254
|
+
K,
|
|
255
|
+
Y,
|
|
256
|
+
xe
|
|
257
|
+
]), je = l((e) => {
|
|
258
|
+
W(e), G("");
|
|
259
|
+
}, []), Me = l(() => {
|
|
260
|
+
W(null), G("");
|
|
261
|
+
}, []), Ne = l(async () => {
|
|
262
|
+
let e = U;
|
|
263
|
+
if (e?.taskId && v && J && !K) {
|
|
264
|
+
q(!0), F(null), L(null);
|
|
264
265
|
try {
|
|
265
|
-
await
|
|
266
|
+
await h({
|
|
266
267
|
action: "REJECTED",
|
|
267
|
-
comment:
|
|
268
|
-
decidedByMemberId:
|
|
268
|
+
comment: J,
|
|
269
|
+
decidedByMemberId: v,
|
|
269
270
|
taskId: e.taskId
|
|
270
|
-
}),
|
|
271
|
+
}), W(null), G(""), L(`已拒絕「${e.title}」。`), await Y(1, !1);
|
|
271
272
|
} catch (e) {
|
|
272
|
-
F(
|
|
273
|
+
F(j(e));
|
|
273
274
|
} finally {
|
|
274
|
-
|
|
275
|
+
q(!1);
|
|
275
276
|
}
|
|
276
277
|
}
|
|
277
278
|
}, [
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
]),
|
|
279
|
+
v,
|
|
280
|
+
K,
|
|
281
|
+
Y,
|
|
282
|
+
U,
|
|
283
|
+
J
|
|
284
|
+
]), Pe = l((e, t) => {
|
|
284
285
|
let n = t.id;
|
|
285
|
-
n === "approve" ?
|
|
286
|
+
n === "approve" ? Oe(e) : n === "reject" ? je(e) : n === "view" ? X(e) : n === "read" ? Te(e.id) : (n === "archive" || n === "unarchive") && Ee(e);
|
|
286
287
|
}, [
|
|
288
|
+
Ee,
|
|
287
289
|
Te,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
let e = /* @__PURE__ */ new Date(), t = de.reduce((e, t) => (e[t] = [], e), {
|
|
290
|
+
X,
|
|
291
|
+
Oe,
|
|
292
|
+
je
|
|
293
|
+
]), Z = l((e, t) => !(e instanceof Node) || !t.contains(e) ? !1 : !(e instanceof Element && e.closest("button")), []), Fe = l((e, t) => {
|
|
294
|
+
Z(t.target, t.currentTarget) && X(e);
|
|
295
|
+
}, [X, Z]), Ie = l((e, t) => {
|
|
296
|
+
(t.key === "Enter" || t.key === " ") && Z(t.target, t.currentTarget) && (t.preventDefault(), X(e));
|
|
297
|
+
}, [X, Z]), Le = d(() => y.filter((e) => R === "all" ? !0 : R === "read" ? e.status === "READ" : e.status !== "READ"), [R, y]), Q = d(() => {
|
|
298
|
+
let e = /* @__PURE__ */ new Date(), t = O.reduce((e, t) => (e[t] = [], e), {
|
|
298
299
|
earlier: [],
|
|
299
300
|
past7Days: [],
|
|
300
301
|
today: [],
|
|
301
302
|
yesterday: []
|
|
302
303
|
});
|
|
303
|
-
return
|
|
304
|
+
return Le.forEach((n) => {
|
|
304
305
|
t[ge(n.createdAt, e)].push(n);
|
|
305
|
-
}),
|
|
306
|
-
}, [
|
|
307
|
-
return
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
bottomGhostActionDisabled: M ||
|
|
306
|
+
}), O.map((e) => [e, t[e]]).filter(([, e]) => e.length > 0);
|
|
307
|
+
}, [Le]), $ = y.length < C;
|
|
308
|
+
return v ? /* @__PURE__ */ m(ne, { children: [
|
|
309
|
+
/* @__PURE__ */ p(se, {
|
|
310
|
+
bottomGhostActionDisabled: M || k,
|
|
310
311
|
bottomGhostActionLoading: M,
|
|
311
312
|
bottomGhostActionText: "全部標為已讀",
|
|
312
313
|
bottomOnGhostActionClick: () => {
|
|
313
|
-
|
|
314
|
+
Ce();
|
|
314
315
|
},
|
|
315
316
|
bottomOnPrimaryActionClick: () => {
|
|
316
|
-
|
|
317
|
+
we();
|
|
317
318
|
},
|
|
318
|
-
bottomPrimaryActionDisabled: !$ ||
|
|
319
|
-
bottomPrimaryActionLoading:
|
|
319
|
+
bottomPrimaryActionDisabled: !$ || k,
|
|
320
|
+
bottomPrimaryActionLoading: k && $,
|
|
320
321
|
bottomPrimaryActionText: $ ? "載入更多" : "已顯示全部",
|
|
321
|
-
contentKey: `${R}:${z}:${
|
|
322
|
+
contentKey: `${R}:${z}:${y.length}`,
|
|
322
323
|
filterAreaAllRadioLabel: "全部",
|
|
323
|
-
filterAreaOnRadioChange:
|
|
324
|
-
filterAreaOnSelect:
|
|
324
|
+
filterAreaOnRadioChange: Se,
|
|
325
|
+
filterAreaOnSelect: De,
|
|
325
326
|
filterAreaOptions: [{
|
|
326
|
-
id:
|
|
327
|
+
id: de,
|
|
327
328
|
name: z ? "隱藏已封存" : "顯示已封存"
|
|
328
329
|
}],
|
|
329
330
|
filterAreaReadRadioLabel: "已讀",
|
|
@@ -333,13 +334,13 @@ function D() {
|
|
|
333
334
|
headerTitle: "通知中心",
|
|
334
335
|
isBottomDisplay: !0,
|
|
335
336
|
isHeaderDisplay: !0,
|
|
336
|
-
onClose:
|
|
337
|
-
open:
|
|
337
|
+
onClose: c,
|
|
338
|
+
open: u,
|
|
338
339
|
size: "medium",
|
|
339
|
-
children: /* @__PURE__ */
|
|
340
|
+
children: /* @__PURE__ */ m("div", {
|
|
340
341
|
role: "list",
|
|
341
342
|
children: [
|
|
342
|
-
P ? /* @__PURE__ */
|
|
343
|
+
P ? /* @__PURE__ */ p("p", {
|
|
343
344
|
role: "alert",
|
|
344
345
|
style: {
|
|
345
346
|
color: "var(--mzn-color-text-error, #d92d20)",
|
|
@@ -347,7 +348,7 @@ function D() {
|
|
|
347
348
|
},
|
|
348
349
|
children: P
|
|
349
350
|
}) : null,
|
|
350
|
-
I ? /* @__PURE__ */
|
|
351
|
+
I ? /* @__PURE__ */ p("p", {
|
|
351
352
|
role: "status",
|
|
352
353
|
style: {
|
|
353
354
|
color: "var(--mzn-color-text-success, #079455)",
|
|
@@ -355,39 +356,39 @@ function D() {
|
|
|
355
356
|
},
|
|
356
357
|
children: I
|
|
357
358
|
}) : null,
|
|
358
|
-
|
|
359
|
+
Q.length === 0 ? /* @__PURE__ */ p("p", {
|
|
359
360
|
style: {
|
|
360
361
|
color: "var(--mzn-color-text-secondary, #6b7280)",
|
|
361
362
|
padding: "24px 16px",
|
|
362
363
|
textAlign: "center"
|
|
363
364
|
},
|
|
364
|
-
children:
|
|
365
|
+
children: k ? "載入中…" : "目前沒有通知"
|
|
365
366
|
}) : null,
|
|
366
|
-
|
|
367
|
+
Q.map(([e, t]) => /* @__PURE__ */ p(s, { children: t.map((t, n) => {
|
|
367
368
|
let r = t.instanceId !== null;
|
|
368
|
-
return /* @__PURE__ */
|
|
369
|
+
return /* @__PURE__ */ p("div", {
|
|
369
370
|
onClick: r ? (e) => {
|
|
370
|
-
|
|
371
|
+
Fe(t, e);
|
|
371
372
|
} : void 0,
|
|
372
373
|
onKeyDown: r ? (e) => {
|
|
373
|
-
|
|
374
|
+
Ie(t, e);
|
|
374
375
|
} : void 0,
|
|
375
376
|
role: r ? "button" : void 0,
|
|
376
377
|
style: r ? { cursor: "pointer" } : void 0,
|
|
377
378
|
tabIndex: r ? 0 : void 0,
|
|
378
|
-
children: /* @__PURE__ */
|
|
379
|
+
children: /* @__PURE__ */ p(ce, {
|
|
379
380
|
appendTips: t.archivedAt ? "已封存" : void 0,
|
|
380
381
|
description: t.body,
|
|
381
382
|
onBadgeSelect: (e) => {
|
|
382
|
-
|
|
383
|
+
Pe(t, e);
|
|
383
384
|
},
|
|
384
|
-
options: [...
|
|
385
|
-
prependTips: n === 0 ?
|
|
385
|
+
options: [...fe(t)],
|
|
386
|
+
prependTips: n === 0 ? le[e] : void 0,
|
|
386
387
|
reference: t.id,
|
|
387
388
|
severity: he(t),
|
|
388
389
|
showBadge: t.status !== "READ",
|
|
389
390
|
timeStamp: t.createdAt,
|
|
390
|
-
title:
|
|
391
|
+
title: me(t),
|
|
391
392
|
type: "drawer"
|
|
392
393
|
})
|
|
393
394
|
}, t.id);
|
|
@@ -395,15 +396,15 @@ function D() {
|
|
|
395
396
|
]
|
|
396
397
|
})
|
|
397
398
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ m(b, {
|
|
399
400
|
cancelText: "取消",
|
|
400
401
|
confirmText: "送出同意",
|
|
401
|
-
loading:
|
|
402
|
+
loading: K,
|
|
402
403
|
modalType: "standard",
|
|
403
|
-
onCancel:
|
|
404
|
-
onClose:
|
|
404
|
+
onCancel: ke,
|
|
405
|
+
onClose: ke,
|
|
405
406
|
onConfirm: () => {
|
|
406
|
-
|
|
407
|
+
Ae();
|
|
407
408
|
},
|
|
408
409
|
open: B !== null,
|
|
409
410
|
showModalFooter: !0,
|
|
@@ -411,59 +412,59 @@ function D() {
|
|
|
411
412
|
size: "regular",
|
|
412
413
|
supportingText: "可以留下同意說明,內容會記錄在簽核歷程;不填也可以直接送出。",
|
|
413
414
|
title: "簽核意見",
|
|
414
|
-
children: [P ? /* @__PURE__ */
|
|
415
|
+
children: [P ? /* @__PURE__ */ p(te, {
|
|
415
416
|
color: "text-error",
|
|
416
417
|
role: "alert",
|
|
417
418
|
variant: "body",
|
|
418
419
|
children: P
|
|
419
|
-
}) : null, /* @__PURE__ */
|
|
420
|
+
}) : null, /* @__PURE__ */ p(o, {
|
|
420
421
|
label: "簽核意見",
|
|
421
422
|
name: "notificationApproveComment",
|
|
422
|
-
children: /* @__PURE__ */
|
|
423
|
+
children: /* @__PURE__ */ p(x, {
|
|
423
424
|
autoFocus: !0,
|
|
424
425
|
onChange: (e) => {
|
|
425
|
-
|
|
426
|
+
H(e.target.value);
|
|
426
427
|
},
|
|
427
428
|
placeholder: "選填,例如補充核准條件或提醒事項",
|
|
428
429
|
rows: 4,
|
|
429
|
-
value:
|
|
430
|
+
value: ye
|
|
430
431
|
})
|
|
431
432
|
})]
|
|
432
433
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ p(b, {
|
|
434
435
|
cancelText: "取消",
|
|
435
436
|
confirmButtonProps: {
|
|
436
|
-
disabled: !
|
|
437
|
+
disabled: !J,
|
|
437
438
|
variant: "destructive-primary"
|
|
438
439
|
},
|
|
439
440
|
confirmText: "送出拒絕",
|
|
440
|
-
loading:
|
|
441
|
+
loading: K,
|
|
441
442
|
modalStatusType: "error",
|
|
442
443
|
modalType: "standard",
|
|
443
|
-
onCancel:
|
|
444
|
-
onClose:
|
|
444
|
+
onCancel: Me,
|
|
445
|
+
onClose: Me,
|
|
445
446
|
onConfirm: () => {
|
|
446
|
-
|
|
447
|
+
Ne();
|
|
447
448
|
},
|
|
448
|
-
open:
|
|
449
|
+
open: U !== null,
|
|
449
450
|
showModalFooter: !0,
|
|
450
451
|
showModalHeader: !0,
|
|
451
452
|
size: "regular",
|
|
452
453
|
supportingText: "拒絕案件時必須留下原因,供發起人與後續追蹤查看。",
|
|
453
454
|
title: "拒絕原因",
|
|
454
|
-
children: /* @__PURE__ */
|
|
455
|
+
children: /* @__PURE__ */ p(x, {
|
|
455
456
|
autoFocus: !0,
|
|
456
457
|
onChange: (e) => {
|
|
457
|
-
|
|
458
|
+
G(e.target.value);
|
|
458
459
|
},
|
|
459
460
|
placeholder: "請輸入拒絕原因",
|
|
460
461
|
rows: 4,
|
|
461
|
-
value:
|
|
462
|
+
value: be
|
|
462
463
|
})
|
|
463
464
|
})
|
|
464
465
|
] }) : null;
|
|
465
466
|
}
|
|
466
|
-
function
|
|
467
|
+
function A(e) {
|
|
467
468
|
return e === "SLA_OVERDUE" ? "error" : e === "SLA_WARNING" ? "warning" : e === "INSTANCE_COMPLETED" ? "success" : "info";
|
|
468
469
|
}
|
|
469
470
|
function ge(e, t) {
|
|
@@ -474,33 +475,36 @@ function ge(e, t) {
|
|
|
474
475
|
let a = new Date(r);
|
|
475
476
|
return a.setDate(a.getDate() - 1), i.getTime() === a.getTime() ? "yesterday" : (t.getTime() - n.getTime()) / 864e5 <= 7 ? "past7Days" : "earlier";
|
|
476
477
|
}
|
|
477
|
-
function
|
|
478
|
+
function j(e) {
|
|
478
479
|
return e instanceof Error ? e.message : "發生未知錯誤";
|
|
479
480
|
}
|
|
480
|
-
function
|
|
481
|
+
function M(e) {
|
|
481
482
|
try {
|
|
482
483
|
let t = JSON.parse(e.payloadJson);
|
|
483
|
-
return
|
|
484
|
+
return N(t) && typeof t.allowReject == "boolean" ? t.allowReject : e.allowReject;
|
|
484
485
|
} catch {
|
|
485
486
|
return e.allowReject;
|
|
486
487
|
}
|
|
487
488
|
}
|
|
488
|
-
function
|
|
489
|
+
function N(e) {
|
|
489
490
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
490
491
|
}
|
|
491
492
|
//#endregion
|
|
492
493
|
//#region src/lib/providers.tsx
|
|
493
|
-
function
|
|
494
|
-
return /* @__PURE__ */
|
|
494
|
+
function P({ children: e, locale: t = y.ZH_TW, language: a = r, publicPaths: o, loginPath: s }) {
|
|
495
|
+
return /* @__PURE__ */ p(v, {
|
|
495
496
|
locale: t,
|
|
496
|
-
children: /* @__PURE__ */
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
497
|
+
children: /* @__PURE__ */ p(i, {
|
|
498
|
+
language: a,
|
|
499
|
+
children: /* @__PURE__ */ p(n, {
|
|
500
|
+
publicPaths: o,
|
|
501
|
+
loginPath: s,
|
|
502
|
+
children: /* @__PURE__ */ p(E, { children: /* @__PURE__ */ m(C, { children: [e, /* @__PURE__ */ p(k, {})] }) })
|
|
503
|
+
})
|
|
500
504
|
})
|
|
501
505
|
});
|
|
502
506
|
}
|
|
503
507
|
//#endregion
|
|
504
|
-
export {
|
|
508
|
+
export { C as a, D as i, k as n, w as o, E as r, P as t };
|
|
505
509
|
|
|
506
|
-
//# sourceMappingURL=providers-
|
|
510
|
+
//# sourceMappingURL=providers-H_vPRsSN.js.map
|