@ukpc-lib/react 0.2.20 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Notification/models/NotiticationDto.d.ts +6 -6
- package/dist/components/index.cjs +19 -19
- package/dist/components/index.js +28 -26
- package/dist/{index.module-c4038cae.js → index.module-1315f6d2.js} +4697 -4700
- package/dist/{index.module-3865819a.cjs → index.module-d1158281.cjs} +75 -75
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +2 -2
- package/package.json +1 -1
- package/web-components-bundle/global-topbar/index.cjs +1 -1
- package/web-components-bundle/global-topbar/index.js +1 -1
- package/web-components-bundle/has-permission/index.cjs +1 -1
- package/web-components-bundle/has-permission/index.js +1 -1
- package/web-components-bundle/{index-e993192a.cjs → index-014314bd.cjs} +71 -71
- package/web-components-bundle/{index-c0b26f3f.js → index-0b4cb1fd.js} +6238 -6239
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as an, p as Zn, a as Uc, L as co, u as Yc, i as Gc, g as qc, Q as ga, R as Kc, l as Xc, c as kn, s as On, t as Vr, _ as W, b as st, P as R, d as Fe, e as Zc, o as Jc, f as Qc, h as eu, j as uo, I as tu, k as nu, m as fo, D as ru, n as ut, r as iu, q as ou, B as su, v as Mn } from "../index.module-
|
|
2
|
-
import { w as Z3, x as J3 } from "../index.module-
|
|
1
|
+
import { C as an, p as Zn, a as Uc, L as co, u as Yc, i as Gc, g as qc, Q as ga, R as Kc, l as Xc, c as kn, s as On, t as Vr, _ as W, b as st, P as R, d as Fe, e as Zc, o as Jc, f as Qc, h as eu, j as uo, I as tu, k as nu, m as fo, D as ru, n as ut, r as iu, q as ou, B as su, v as Mn } from "../index.module-1315f6d2.js";
|
|
2
|
+
import { w as Z3, x as J3 } from "../index.module-1315f6d2.js";
|
|
3
3
|
import { jsxs as k, Fragment as yn, jsx as g } from "react/jsx-runtime";
|
|
4
4
|
import * as N from "react";
|
|
5
5
|
import ya, { useContext as ie, useState as K, useEffect as be, useRef as ze, createContext as jt, useLayoutEffect as wi, useInsertionEffect as au, useCallback as Qt, useMemo as hr, forwardRef as va, createElement as en, useId as lu, PureComponent as cu } from "react";
|
|
@@ -141,7 +141,7 @@ const Cu = (e) => {
|
|
|
141
141
|
/* @__PURE__ */ g("div", { className: "notification-item__image-container", children: /* @__PURE__ */ g(
|
|
142
142
|
"img",
|
|
143
143
|
{
|
|
144
|
-
src: e.userAvatarUrl === void 0 ? "https://ukpcsaprod.blob.core.windows.net/account/logo.png" : e.userAvatarUrl,
|
|
144
|
+
src: (e == null ? void 0 : e.userAvatarUrl) === void 0 ? "https://ukpcsaprod.blob.core.windows.net/account/logo.png" : e == null ? void 0 : e.userAvatarUrl,
|
|
145
145
|
alt: e.userName
|
|
146
146
|
}
|
|
147
147
|
) }),
|
|
@@ -149,7 +149,7 @@ const Cu = (e) => {
|
|
|
149
149
|
/* @__PURE__ */ g("p", { className: "notification-item__user-name", children: e.userName }),
|
|
150
150
|
/* @__PURE__ */ k("p", { children: [
|
|
151
151
|
`${e.message} `,
|
|
152
|
-
/* @__PURE__ */ g("span", { children: e.context })
|
|
152
|
+
/* @__PURE__ */ g("span", { children: e == null ? void 0 : e.context })
|
|
153
153
|
] })
|
|
154
154
|
] }),
|
|
155
155
|
/* @__PURE__ */ g("div", { className: "notification-item__time", children: /* @__PURE__ */ g("p", { children: n(e.createdAt) }) }),
|
|
@@ -215,46 +215,47 @@ const Cu = (e) => {
|
|
|
215
215
|
});
|
|
216
216
|
});
|
|
217
217
|
}, _u = ({ baseUrl: e, notiPath: t }) => {
|
|
218
|
+
var u, h, p, y;
|
|
218
219
|
const { setShowModalFalse: n } = ie(an), { notidata: r, setNotiData: i } = ie(an);
|
|
219
220
|
console.log(r);
|
|
220
221
|
const [s, o] = K("all"), a = wa({ baseUrl: e, notiPath: t, setNotiData: i }), l = async () => {
|
|
221
|
-
var
|
|
222
|
+
var f, m;
|
|
222
223
|
try {
|
|
223
|
-
const
|
|
224
|
-
await ln.put(
|
|
224
|
+
const w = e + (t || "/notification-management/api/v1/notifications");
|
|
225
|
+
await ln.put(w, {
|
|
225
226
|
withCredentials: !0
|
|
226
227
|
});
|
|
227
|
-
} catch (
|
|
228
|
-
console.log(
|
|
229
|
-
((
|
|
228
|
+
} catch (b) {
|
|
229
|
+
console.log(b), Zn(
|
|
230
|
+
((m = (f = b.response) == null ? void 0 : f.data) == null ? void 0 : m.errorMessage) || "Have error when get notification list"
|
|
230
231
|
);
|
|
231
232
|
}
|
|
232
233
|
await a();
|
|
233
|
-
}, c = async (
|
|
234
|
-
var
|
|
234
|
+
}, c = async (f, m) => {
|
|
235
|
+
var b, w;
|
|
235
236
|
try {
|
|
236
|
-
const
|
|
237
|
+
const x = t || `/notification-management/api/v1/notifications/${f}`, S = e + x;
|
|
237
238
|
await ln.put(
|
|
238
|
-
|
|
239
|
-
{ isRead:
|
|
239
|
+
S,
|
|
240
|
+
{ isRead: m },
|
|
240
241
|
{
|
|
241
242
|
withCredentials: !0
|
|
242
243
|
}
|
|
243
244
|
);
|
|
244
|
-
} catch (
|
|
245
|
+
} catch (x) {
|
|
245
246
|
Zn(
|
|
246
|
-
((
|
|
247
|
+
((w = (b = x.response) == null ? void 0 : b.data) == null ? void 0 : w.errorMessage) || "Have error when get notification list"
|
|
247
248
|
);
|
|
248
249
|
}
|
|
249
250
|
await a();
|
|
250
251
|
}, d = [
|
|
251
252
|
{
|
|
252
253
|
id: "all",
|
|
253
|
-
tabTitle: `All (${r.all.total || 0})`,
|
|
254
|
+
tabTitle: `All (${((u = r == null ? void 0 : r.all) == null ? void 0 : u.total) || 0})`,
|
|
254
255
|
children: /* @__PURE__ */ g(
|
|
255
256
|
po,
|
|
256
257
|
{
|
|
257
|
-
notidata: r.all.rows,
|
|
258
|
+
notidata: ((h = r == null ? void 0 : r.all) == null ? void 0 : h.rows) || [],
|
|
258
259
|
handleUpdateRead: c,
|
|
259
260
|
handleUpdateReadAll: l
|
|
260
261
|
}
|
|
@@ -262,11 +263,11 @@ const Cu = (e) => {
|
|
|
262
263
|
},
|
|
263
264
|
{
|
|
264
265
|
id: "unread",
|
|
265
|
-
tabTitle: `Unread (${r.unread.total || 0})`,
|
|
266
|
+
tabTitle: `Unread (${((p = r == null ? void 0 : r.unread) == null ? void 0 : p.total) || 0})`,
|
|
266
267
|
children: /* @__PURE__ */ g(
|
|
267
268
|
po,
|
|
268
269
|
{
|
|
269
|
-
notidata: r.unread.rows,
|
|
270
|
+
notidata: ((y = r == null ? void 0 : r.unread) == null ? void 0 : y.rows) || [],
|
|
270
271
|
handleUpdateRead: c,
|
|
271
272
|
handleUpdateReadAll: l
|
|
272
273
|
}
|
|
@@ -343,13 +344,14 @@ function Pu({
|
|
|
343
344
|
baseUrl: t,
|
|
344
345
|
notiPath: n
|
|
345
346
|
}) {
|
|
347
|
+
var c;
|
|
346
348
|
const { isOpen: r, toggleOpen: i } = ie(an), { notidata: s, setNotiData: o } = ie(an), a = wa({ baseUrl: t, notiPath: n, setNotiData: o }), l = async () => {
|
|
347
|
-
var
|
|
349
|
+
var d, u;
|
|
348
350
|
try {
|
|
349
351
|
await a();
|
|
350
|
-
} catch (
|
|
352
|
+
} catch (h) {
|
|
351
353
|
Zn(
|
|
352
|
-
((
|
|
354
|
+
((u = (d = h.response) == null ? void 0 : d.data) == null ? void 0 : u.errorMessage) || "Have error when get notification list"
|
|
353
355
|
);
|
|
354
356
|
}
|
|
355
357
|
};
|
|
@@ -392,7 +394,7 @@ function Pu({
|
|
|
392
394
|
]
|
|
393
395
|
}
|
|
394
396
|
),
|
|
395
|
-
s.unread.total != 0 && /* @__PURE__ */ g(
|
|
397
|
+
(s == null ? void 0 : s.unread) && (s == null ? void 0 : s.unread.total) != 0 && /* @__PURE__ */ g(
|
|
396
398
|
"span",
|
|
397
399
|
{
|
|
398
400
|
style: {
|
|
@@ -407,7 +409,7 @@ function Pu({
|
|
|
407
409
|
fontSize: "8px"
|
|
408
410
|
},
|
|
409
411
|
className: "notification-badge",
|
|
410
|
-
children: s.unread.total
|
|
412
|
+
children: (c = s == null ? void 0 : s.unread) == null ? void 0 : c.total
|
|
411
413
|
}
|
|
412
414
|
),
|
|
413
415
|
!r && /* @__PURE__ */ g(_u, { baseUrl: t, notiPath: n })
|