@edusight/notification-widget 1.0.32 → 1.0.35
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/README.md +38 -23
- package/dist/{components-D8XxiFEB.js → components-Dq8aSwWR.js} +125 -131
- package/dist/components-Dq8aSwWR.js.map +1 -0
- package/dist/components-dwdMDd9K.cjs +71 -0
- package/dist/{components-D8XxiFEB.js.map → components-dwdMDd9K.cjs.map} +1 -1
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +121 -119
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/components-KafszaqK.cjs +0 -71
- package/dist/components-KafszaqK.cjs.map +0 -1
|
@@ -59,13 +59,13 @@ function I(e) {
|
|
|
59
59
|
return e;
|
|
60
60
|
}
|
|
61
61
|
function me(e, r, a) {
|
|
62
|
-
return r =
|
|
62
|
+
return r = ge(r), r in e ? Object.defineProperty(e, r, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = a, e;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
var r =
|
|
64
|
+
function ge(e) {
|
|
65
|
+
var r = fe(e, "string");
|
|
66
66
|
return typeof r == "symbol" ? r : r + "";
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function fe(e, r) {
|
|
69
69
|
if (typeof e != "object" || !e) return e;
|
|
70
70
|
var a = e[Symbol.toPrimitive];
|
|
71
71
|
if (a !== void 0) {
|
|
@@ -91,7 +91,7 @@ function pe(e) {
|
|
|
91
91
|
attr: n,
|
|
92
92
|
size: s,
|
|
93
93
|
title: o
|
|
94
|
-
} = e, h = ue(e, ce),
|
|
94
|
+
} = e, h = ue(e, ce), f = s || a.size || "1em", m;
|
|
95
95
|
return a.className && (m = a.className), e.className && (m = (m ? m + " " : "") + e.className), /* @__PURE__ */ z.createElement("svg", T({
|
|
96
96
|
stroke: "currentColor",
|
|
97
97
|
fill: "currentColor",
|
|
@@ -101,8 +101,8 @@ function pe(e) {
|
|
|
101
101
|
style: I(I({
|
|
102
102
|
color: e.color || a.color
|
|
103
103
|
}, a.style), e.style),
|
|
104
|
-
height:
|
|
105
|
-
width:
|
|
104
|
+
height: f,
|
|
105
|
+
width: f,
|
|
106
106
|
xmlns: "http://www.w3.org/2000/svg"
|
|
107
107
|
}), o && /* @__PURE__ */ z.createElement("title", null, o), e.children);
|
|
108
108
|
};
|
|
@@ -120,7 +120,7 @@ const Fe = ({
|
|
|
120
120
|
}) => {
|
|
121
121
|
const o = (d) => d === 0 ? "" : d > 99 ? "99+" : d.toString(), h = (d) => {
|
|
122
122
|
s || (d.key === "Enter" || d.key === " ") && (d.preventDefault(), r());
|
|
123
|
-
},
|
|
123
|
+
}, f = o(e), m = e > 0;
|
|
124
124
|
return /* @__PURE__ */ i(
|
|
125
125
|
"button",
|
|
126
126
|
{
|
|
@@ -135,6 +135,7 @@ const Fe = ({
|
|
|
135
135
|
focus:outline-none focus:ring-1 focus:ring-[var(--widget-primary)] focus:ring-offset-1
|
|
136
136
|
disabled:opacity-70 disabled:cursor-not-allowed
|
|
137
137
|
w-10 h-10
|
|
138
|
+
mx-widget-bell
|
|
138
139
|
${n}
|
|
139
140
|
`,
|
|
140
141
|
onClick: r,
|
|
@@ -144,8 +145,9 @@ const Fe = ({
|
|
|
144
145
|
"aria-expanded": !1,
|
|
145
146
|
"aria-haspopup": "dialog",
|
|
146
147
|
"data-testid": "bell-component",
|
|
148
|
+
"data-mx-widget": "bell",
|
|
147
149
|
children: [
|
|
148
|
-
/* @__PURE__ */ i("div", { className: "relative inline-flex items-center justify-center", children: [
|
|
150
|
+
/* @__PURE__ */ i("div", { className: "relative inline-flex items-center justify-center text-align-center", children: [
|
|
149
151
|
/* @__PURE__ */ t(ve, { className: "w-6 h-6" }),
|
|
150
152
|
m && /* @__PURE__ */ t(
|
|
151
153
|
"span",
|
|
@@ -155,16 +157,17 @@ const Fe = ({
|
|
|
155
157
|
flex items-center justify-center\r
|
|
156
158
|
w-[16px] h-[16px]\r
|
|
157
159
|
text-[10px] font-bold leading-none\r
|
|
158
|
-
text-
|
|
160
|
+
text-[var(--widget-text)] bg-red-500\r
|
|
159
161
|
rounded-full\r
|
|
160
162
|
border border-white dark:border-gray-900\r
|
|
161
163
|
shadow-sm\r
|
|
162
164
|
pointer-events-none\r
|
|
165
|
+
text-align-center\r
|
|
163
166
|
`,
|
|
164
167
|
"aria-hidden": "true",
|
|
165
168
|
"data-testid": "unread-badge",
|
|
166
169
|
style: { marginTop: "-25px", marginRight: "-25px" },
|
|
167
|
-
children:
|
|
170
|
+
children: f
|
|
168
171
|
}
|
|
169
172
|
)
|
|
170
173
|
] }),
|
|
@@ -242,7 +245,7 @@ const P = ({
|
|
|
242
245
|
position: a = "top",
|
|
243
246
|
delay: n = 200
|
|
244
247
|
}) => {
|
|
245
|
-
const [s, o] = k(!1), [h,
|
|
248
|
+
const [s, o] = k(!1), [h, f] = k({ x: 0, y: 0 }), m = j(null), d = j(null), y = () => {
|
|
246
249
|
m.current && clearTimeout(m.current), m.current = setTimeout(() => {
|
|
247
250
|
if (d.current) {
|
|
248
251
|
const v = d.current.getBoundingClientRect();
|
|
@@ -261,7 +264,7 @@ const P = ({
|
|
|
261
264
|
l = v.right + 8, u = v.top + v.height / 2;
|
|
262
265
|
break;
|
|
263
266
|
}
|
|
264
|
-
|
|
267
|
+
f({ x: l, y: u }), o(!0);
|
|
265
268
|
}
|
|
266
269
|
}, n);
|
|
267
270
|
}, c = () => {
|
|
@@ -284,16 +287,16 @@ const P = ({
|
|
|
284
287
|
"div",
|
|
285
288
|
{
|
|
286
289
|
className: `
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
+
fixed z-50 px-2 py-1 text-xs font-medium text-[var(--widget-text)] rounded-md pointer-events-none
|
|
291
|
+
bg-[var(--widget-text)] shadow-lg
|
|
292
|
+
${{
|
|
290
293
|
top: "-translate-x-1/2 -translate-y-full",
|
|
291
294
|
bottom: "-translate-x-1/2 translate-y-0",
|
|
292
295
|
left: "-translate-x-full -translate-y-1/2",
|
|
293
296
|
right: "translate-x-0 -translate-y-1/2"
|
|
294
297
|
}[a]}
|
|
295
|
-
|
|
296
|
-
|
|
298
|
+
animate-in fade-in-0 zoom-in-95 duration-200
|
|
299
|
+
`,
|
|
297
300
|
style: {
|
|
298
301
|
left: `${h.x}px`,
|
|
299
302
|
top: `${h.y}px`
|
|
@@ -324,7 +327,7 @@ const P = ({
|
|
|
324
327
|
onSelectionChange: a,
|
|
325
328
|
isSelected: n = !1
|
|
326
329
|
}) => {
|
|
327
|
-
const [s, o] = k(!1), h = Number.isNaN(e.timestamp.getTime()),
|
|
330
|
+
const [s, o] = k(!1), h = Number.isNaN(e.timestamp.getTime()), f = h ? void 0 : e.timestamp.toISOString(), m = He(e.timestamp), d = (c) => {
|
|
328
331
|
r && r(e.id, c), o(!1);
|
|
329
332
|
}, y = () => {
|
|
330
333
|
a && a(!n);
|
|
@@ -333,7 +336,7 @@ const P = ({
|
|
|
333
336
|
"div",
|
|
334
337
|
{
|
|
335
338
|
className: `
|
|
336
|
-
relative group flex items-start gap-3 px-4 py-3 border-b border-border-light
|
|
339
|
+
mx-widget-item relative group flex items-start gap-3 px-4 py-3 border-b border-border-light
|
|
337
340
|
transition-all duration-200
|
|
338
341
|
bg-widget-background hover:bg-widget-hover
|
|
339
342
|
min-w-[20rem]
|
|
@@ -343,6 +346,7 @@ const P = ({
|
|
|
343
346
|
onMouseLeave: () => o(!1),
|
|
344
347
|
"data-testid": "notification-item",
|
|
345
348
|
"data-notification-id": e.id,
|
|
349
|
+
"data-mx-widget": "item",
|
|
346
350
|
children: [
|
|
347
351
|
a && /* @__PURE__ */ t("div", { className: "flex-shrink-0 pt-0.5", children: /* @__PURE__ */ t(
|
|
348
352
|
"input",
|
|
@@ -363,7 +367,7 @@ const P = ({
|
|
|
363
367
|
"aria-hidden": "true",
|
|
364
368
|
loading: "lazy"
|
|
365
369
|
}
|
|
366
|
-
) : /* @__PURE__ */ t("div", { className: "w-10 h-10 rounded-full bg-gradient-to-br from-widget-primary to-widget-primary-hover flex items-center justify-center shadow-sm", children: /* @__PURE__ */ t("span", { className: "text-
|
|
370
|
+
) : /* @__PURE__ */ t("div", { className: "w-10 h-10 rounded-full bg-gradient-to-br from-widget-primary to-widget-primary-hover flex items-center justify-center shadow-sm", children: /* @__PURE__ */ t("span", { className: "text-[var(--widget-text)] font-semibold text-base", children: e.subject.charAt(0).toUpperCase() }) }) }),
|
|
367
371
|
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
|
|
368
372
|
/* @__PURE__ */ i("div", { className: "flex items-start justify-between gap-2 mb-0.5", children: [
|
|
369
373
|
/* @__PURE__ */ t("h3", { className: `text-sm leading-5 text-[var(--widget-text)] ${e.isRead ? "font-medium" : "font-semibold"}`, children: e.subject }),
|
|
@@ -378,14 +382,15 @@ const P = ({
|
|
|
378
382
|
},
|
|
379
383
|
className: `
|
|
380
384
|
px-3 py-1.5 rounded-md text-sm font-medium transition-colors
|
|
381
|
-
${b === 0 ? "bg-[var(--widget-primary)] text-
|
|
385
|
+
${b === 0 ? "bg-[var(--widget-primary)] text-[var(--widget-text)] hover:bg-[var(--widget-primary-hover)] shadow-sm" : "bg-transparent text-[var(--widget-text-secondary)] hover:bg-[var(--widget-bg-hover)] border border-[var(--widget-border)]"}
|
|
382
386
|
`,
|
|
387
|
+
"data-mx-widget": "action",
|
|
383
388
|
children: c.label
|
|
384
389
|
},
|
|
385
390
|
b
|
|
386
391
|
)) }),
|
|
387
392
|
/* @__PURE__ */ i("div", { className: "flex items-center justify-between min-h-[20px]", children: [
|
|
388
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ t("time", { className: "text-xs text-[var(--widget-text-tertiary)]", dateTime:
|
|
393
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ t("time", { className: "text-xs text-[var(--widget-text-tertiary)]", dateTime: f, children: m }) }),
|
|
389
394
|
/* @__PURE__ */ i(
|
|
390
395
|
"div",
|
|
391
396
|
{
|
|
@@ -473,7 +478,7 @@ const P = ({
|
|
|
473
478
|
onClearSelection: o,
|
|
474
479
|
className: h = ""
|
|
475
480
|
}) => {
|
|
476
|
-
const [
|
|
481
|
+
const [f, m] = k(!1), [d, y] = k(null), c = e.length, b = async (v, l) => {
|
|
477
482
|
if (c !== 0) {
|
|
478
483
|
m(!0), y(null);
|
|
479
484
|
try {
|
|
@@ -527,7 +532,7 @@ const P = ({
|
|
|
527
532
|
{
|
|
528
533
|
type: "button",
|
|
529
534
|
onClick: () => b(r),
|
|
530
|
-
disabled:
|
|
535
|
+
disabled: f,
|
|
531
536
|
className: "inline-flex items-center px-2 py-1 text-xs font-medium text-blue-700 bg-white border border-blue-300 rounded hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
532
537
|
"data-testid": "bulk-mark-read",
|
|
533
538
|
children: [
|
|
@@ -541,7 +546,7 @@ const P = ({
|
|
|
541
546
|
{
|
|
542
547
|
type: "button",
|
|
543
548
|
onClick: () => b(a),
|
|
544
|
-
disabled:
|
|
549
|
+
disabled: f,
|
|
545
550
|
className: "inline-flex items-center px-2 py-1 text-xs font-medium text-blue-700 bg-white border border-blue-300 rounded hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
546
551
|
"data-testid": "bulk-mark-unread",
|
|
547
552
|
children: [
|
|
@@ -555,7 +560,7 @@ const P = ({
|
|
|
555
560
|
{
|
|
556
561
|
type: "button",
|
|
557
562
|
onClick: () => b(n),
|
|
558
|
-
disabled:
|
|
563
|
+
disabled: f,
|
|
559
564
|
className: "inline-flex items-center px-2 py-1 text-xs font-medium text-text-secondary bg-white border border-border rounded hover:bg-widget-hover focus:outline-none focus:ring-2 focus:ring-text-secondary disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
560
565
|
"data-testid": "bulk-archive",
|
|
561
566
|
children: [
|
|
@@ -571,7 +576,7 @@ const P = ({
|
|
|
571
576
|
onClick: () => {
|
|
572
577
|
window.confirm(`Are you sure you want to delete ${c} notification${c !== 1 ? "s" : ""}? This action cannot be undone.`) && b(s);
|
|
573
578
|
},
|
|
574
|
-
disabled:
|
|
579
|
+
disabled: f,
|
|
575
580
|
className: "inline-flex items-center px-2 py-1 text-xs font-medium text-[var(--widget-error)] bg-white border border-[var(--widget-error)]/30 rounded hover:bg-[var(--widget-error)]/10 focus:outline-none focus:ring-2 focus:ring-[var(--widget-error)] disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
576
581
|
"data-testid": "bulk-delete",
|
|
577
582
|
children: [
|
|
@@ -585,7 +590,7 @@ const P = ({
|
|
|
585
590
|
{
|
|
586
591
|
type: "button",
|
|
587
592
|
onClick: o,
|
|
588
|
-
disabled:
|
|
593
|
+
disabled: f,
|
|
589
594
|
className: "inline-flex items-center px-1 py-1 text-xs font-medium text-text-secondary hover:text-text-primary focus:outline-none focus:ring-2 focus:ring-text-secondary disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
590
595
|
"data-testid": "clear-selection",
|
|
591
596
|
"aria-label": "Clear selection",
|
|
@@ -594,7 +599,7 @@ const P = ({
|
|
|
594
599
|
)
|
|
595
600
|
] })
|
|
596
601
|
] }),
|
|
597
|
-
|
|
602
|
+
f && /* @__PURE__ */ i("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
598
603
|
/* @__PURE__ */ t("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-[var(--widget-primary)]" }),
|
|
599
604
|
/* @__PURE__ */ t(
|
|
600
605
|
"span",
|
|
@@ -643,16 +648,16 @@ const P = ({
|
|
|
643
648
|
selectedNotifications: s = [],
|
|
644
649
|
onSelectionChange: o,
|
|
645
650
|
onSelectAll: h,
|
|
646
|
-
onLoadMore:
|
|
651
|
+
onLoadMore: f,
|
|
647
652
|
hasMore: m = !1,
|
|
648
653
|
className: d = ""
|
|
649
654
|
}) => {
|
|
650
655
|
const y = j(null), c = j(null), [b, v] = k(!1);
|
|
651
656
|
D(() => {
|
|
652
|
-
if (!(!
|
|
657
|
+
if (!(!f || !m || b))
|
|
653
658
|
return y.current = new IntersectionObserver(
|
|
654
|
-
(
|
|
655
|
-
|
|
659
|
+
(g) => {
|
|
660
|
+
g[0].isIntersecting && m && !b && (v(!0), f(), setTimeout(() => v(!1), 500));
|
|
656
661
|
},
|
|
657
662
|
{
|
|
658
663
|
root: null,
|
|
@@ -662,16 +667,16 @@ const P = ({
|
|
|
662
667
|
), c.current && y.current.observe(c.current), () => {
|
|
663
668
|
y.current && y.current.disconnect();
|
|
664
669
|
};
|
|
665
|
-
}, [
|
|
666
|
-
const l = S(async (
|
|
670
|
+
}, [f, m, b]);
|
|
671
|
+
const l = S(async (g, p) => {
|
|
667
672
|
try {
|
|
668
|
-
p.handler && await p.handler(
|
|
673
|
+
p.handler && await p.handler(g), n && p.type && n(g, p);
|
|
669
674
|
} catch {
|
|
670
675
|
}
|
|
671
|
-
}, [n]), u = S((
|
|
672
|
-
o && o(
|
|
676
|
+
}, [n]), u = S((g, p) => {
|
|
677
|
+
o && o(g, p);
|
|
673
678
|
}, [o]);
|
|
674
|
-
return r && e.length === 0 ? /* @__PURE__ */ t("div", { className: `flex flex-col h-full bg-widget-background ${d}`, children: /* @__PURE__ */ t(Y, { count: 5 }) }) : a ? /* @__PURE__ */ t("div", { className: `flex flex-col h-full bg-widget-background ${d}`, children: /* @__PURE__ */ t("div", { className: "flex items-center justify-center flex-1 py-12", children: /* @__PURE__ */ t(
|
|
679
|
+
return r && e.length === 0 ? /* @__PURE__ */ t("div", { className: `flex flex-col h-full bg-widget-background min-w-[20rem] ${d}`, children: /* @__PURE__ */ t(Y, { count: 5 }) }) : a ? /* @__PURE__ */ t("div", { className: `flex flex-col h-full bg-widget-background min-w-[20rem] ${d}`, children: /* @__PURE__ */ t("div", { className: "flex items-center justify-center flex-1 py-12", children: /* @__PURE__ */ t(
|
|
675
680
|
J,
|
|
676
681
|
{
|
|
677
682
|
title: "Error Loading Notifications",
|
|
@@ -695,7 +700,7 @@ const P = ({
|
|
|
695
700
|
}
|
|
696
701
|
)
|
|
697
702
|
}
|
|
698
|
-
) }) }) : e.length === 0 ? /* @__PURE__ */ t("div", { className: `flex flex-col h-full bg-widget-background ${d}`, children: /* @__PURE__ */ t("div", { className: "flex items-center justify-center flex-1 py-12", children: /* @__PURE__ */ t(
|
|
703
|
+
) }) }) : e.length === 0 ? /* @__PURE__ */ t("div", { className: `flex flex-col h-full bg-widget-background min-w-[20rem] ${d}`, children: /* @__PURE__ */ t("div", { className: "flex items-center justify-center flex-1 py-12", children: /* @__PURE__ */ t(
|
|
699
704
|
J,
|
|
700
705
|
{
|
|
701
706
|
title: "No Notifications",
|
|
@@ -719,19 +724,19 @@ const P = ({
|
|
|
719
724
|
}
|
|
720
725
|
)
|
|
721
726
|
}
|
|
722
|
-
) }) }) : /* @__PURE__ */ i("div", { className: `flex flex-col h-full ${d}`, children: [
|
|
727
|
+
) }) }) : /* @__PURE__ */ i("div", { className: `flex flex-col h-full min-w-[20rem] ${d}`, children: [
|
|
723
728
|
h && n && /* @__PURE__ */ t(
|
|
724
729
|
Te,
|
|
725
730
|
{
|
|
726
731
|
selectedNotifications: s,
|
|
727
|
-
onMarkAllAsRead: async (
|
|
732
|
+
onMarkAllAsRead: async (g) => {
|
|
728
733
|
try {
|
|
729
|
-
for (const p of
|
|
734
|
+
for (const p of g)
|
|
730
735
|
n(p, { type: "mark_read", label: "Mark as read", handler: async () => {
|
|
731
736
|
} });
|
|
732
737
|
return {
|
|
733
738
|
success: !0,
|
|
734
|
-
processedCount:
|
|
739
|
+
processedCount: g.length,
|
|
735
740
|
failedCount: 0,
|
|
736
741
|
errors: []
|
|
737
742
|
};
|
|
@@ -739,19 +744,19 @@ const P = ({
|
|
|
739
744
|
return {
|
|
740
745
|
success: !1,
|
|
741
746
|
processedCount: 0,
|
|
742
|
-
failedCount:
|
|
747
|
+
failedCount: g.length,
|
|
743
748
|
errors: [{ notificationId: "", error: p }]
|
|
744
749
|
};
|
|
745
750
|
}
|
|
746
751
|
},
|
|
747
|
-
onMarkAllAsUnread: async (
|
|
752
|
+
onMarkAllAsUnread: async (g) => {
|
|
748
753
|
try {
|
|
749
|
-
for (const p of
|
|
754
|
+
for (const p of g)
|
|
750
755
|
n(p, { type: "mark_unread", label: "Mark as unread", handler: async () => {
|
|
751
756
|
} });
|
|
752
757
|
return {
|
|
753
758
|
success: !0,
|
|
754
|
-
processedCount:
|
|
759
|
+
processedCount: g.length,
|
|
755
760
|
failedCount: 0,
|
|
756
761
|
errors: []
|
|
757
762
|
};
|
|
@@ -759,19 +764,19 @@ const P = ({
|
|
|
759
764
|
return {
|
|
760
765
|
success: !1,
|
|
761
766
|
processedCount: 0,
|
|
762
|
-
failedCount:
|
|
767
|
+
failedCount: g.length,
|
|
763
768
|
errors: [{ notificationId: "", error: p }]
|
|
764
769
|
};
|
|
765
770
|
}
|
|
766
771
|
},
|
|
767
|
-
onArchiveAll: async (
|
|
772
|
+
onArchiveAll: async (g) => {
|
|
768
773
|
try {
|
|
769
|
-
for (const p of
|
|
774
|
+
for (const p of g)
|
|
770
775
|
n(p, { type: "archive", label: "Archive", handler: async () => {
|
|
771
776
|
} });
|
|
772
777
|
return {
|
|
773
778
|
success: !0,
|
|
774
|
-
processedCount:
|
|
779
|
+
processedCount: g.length,
|
|
775
780
|
failedCount: 0,
|
|
776
781
|
errors: []
|
|
777
782
|
};
|
|
@@ -779,19 +784,19 @@ const P = ({
|
|
|
779
784
|
return {
|
|
780
785
|
success: !1,
|
|
781
786
|
processedCount: 0,
|
|
782
|
-
failedCount:
|
|
787
|
+
failedCount: g.length,
|
|
783
788
|
errors: [{ notificationId: "", error: p }]
|
|
784
789
|
};
|
|
785
790
|
}
|
|
786
791
|
},
|
|
787
|
-
onDeleteAll: async (
|
|
792
|
+
onDeleteAll: async (g) => {
|
|
788
793
|
try {
|
|
789
|
-
for (const p of
|
|
794
|
+
for (const p of g)
|
|
790
795
|
n(p, { type: "delete", label: "Delete", handler: async () => {
|
|
791
796
|
} });
|
|
792
797
|
return {
|
|
793
798
|
success: !0,
|
|
794
|
-
processedCount:
|
|
799
|
+
processedCount: g.length,
|
|
795
800
|
failedCount: 0,
|
|
796
801
|
errors: []
|
|
797
802
|
};
|
|
@@ -799,7 +804,7 @@ const P = ({
|
|
|
799
804
|
return {
|
|
800
805
|
success: !1,
|
|
801
806
|
processedCount: 0,
|
|
802
|
-
failedCount:
|
|
807
|
+
failedCount: g.length,
|
|
803
808
|
errors: [{ notificationId: "", error: p }]
|
|
804
809
|
};
|
|
805
810
|
}
|
|
@@ -808,15 +813,15 @@ const P = ({
|
|
|
808
813
|
}
|
|
809
814
|
),
|
|
810
815
|
/* @__PURE__ */ t("div", { className: "flex-1", children: /* @__PURE__ */ i("div", { children: [
|
|
811
|
-
e.map((
|
|
816
|
+
e.map((g) => /* @__PURE__ */ t(
|
|
812
817
|
Ee,
|
|
813
818
|
{
|
|
814
|
-
notification:
|
|
819
|
+
notification: g,
|
|
815
820
|
onActionClick: l,
|
|
816
|
-
isSelected: s.includes(
|
|
817
|
-
onSelectionChange: o ? (p) => u(
|
|
821
|
+
isSelected: s.includes(g.id),
|
|
822
|
+
onSelectionChange: o ? (p) => u(g.id, p) : void 0
|
|
818
823
|
},
|
|
819
|
-
|
|
824
|
+
g.id
|
|
820
825
|
)),
|
|
821
826
|
m && /* @__PURE__ */ t("div", { ref: c, className: "py-2", children: b && /* @__PURE__ */ t(Y, { count: 3 }) })
|
|
822
827
|
] }) })
|
|
@@ -829,7 +834,7 @@ const P = ({
|
|
|
829
834
|
className: s = ""
|
|
830
835
|
}) => {
|
|
831
836
|
const o = Z(() => {
|
|
832
|
-
const h = e.length,
|
|
837
|
+
const h = e.length, f = e.filter((c) => !c.isRead).length, m = /* @__PURE__ */ new Map();
|
|
833
838
|
e.forEach((c) => {
|
|
834
839
|
c.tags.forEach((b) => {
|
|
835
840
|
m.set(b, (m.get(b) || 0) + 1);
|
|
@@ -845,7 +850,7 @@ const P = ({
|
|
|
845
850
|
{
|
|
846
851
|
id: "unread",
|
|
847
852
|
label: "Unread",
|
|
848
|
-
count:
|
|
853
|
+
count: f,
|
|
849
854
|
icon: /* @__PURE__ */ t(ie, { className: "w-4 h-4" })
|
|
850
855
|
}
|
|
851
856
|
], y = Array.from(m.entries()).sort(([, c], [, b]) => b - c).slice(0, 5).map(([c, b]) => ({
|
|
@@ -860,40 +865,31 @@ const P = ({
|
|
|
860
865
|
"div",
|
|
861
866
|
{
|
|
862
867
|
className: `
|
|
863
|
-
flex items-center gap-1 overflow-x-auto widget-scrollbar border-b border-[var(--widget-border)] px-2 py-1.5
|
|
868
|
+
mx-widget-tabs flex items-center gap-1 overflow-x-auto widget-scrollbar border-b border-[var(--widget-border)] px-2 py-1.5 bg-[var(--widget-background)]
|
|
864
869
|
${s}
|
|
865
870
|
`,
|
|
866
|
-
style: { backgroundColor: "var(--widget-background)" },
|
|
867
871
|
role: "tablist",
|
|
872
|
+
"data-mx-widget": "tabs",
|
|
868
873
|
children: o.map((h) => {
|
|
869
|
-
const
|
|
874
|
+
const f = r === h.id;
|
|
870
875
|
return /* @__PURE__ */ i(
|
|
871
876
|
"button",
|
|
872
877
|
{
|
|
873
878
|
onClick: () => a(h.id),
|
|
874
879
|
className: `
|
|
875
880
|
flex items-center gap-2 px-3 py-1.5 rounded-full text-sm font-medium transition-all whitespace-nowrap outline-none focus:ring-2 focus:ring-offset-1
|
|
876
|
-
${
|
|
881
|
+
${f ? "shadow-sm bg-[var(--widget-primary)] text-[var(--widget-text)]" : "tab-inactive text-[var(--widget-text-secondary)]"}
|
|
877
882
|
`,
|
|
878
|
-
style: g ? {
|
|
879
|
-
backgroundColor: "var(--widget-primary)",
|
|
880
|
-
color: "#ffffff"
|
|
881
|
-
} : {
|
|
882
|
-
color: "var(--widget-text-secondary)"
|
|
883
|
-
},
|
|
884
883
|
role: "tab",
|
|
885
|
-
"aria-selected":
|
|
884
|
+
"aria-selected": f,
|
|
886
885
|
"data-testid": `tab-${h.id}`,
|
|
887
886
|
children: [
|
|
888
|
-
h.icon && /* @__PURE__ */ t("span", {
|
|
887
|
+
h.icon && /* @__PURE__ */ t("span", { className: f ? "text-[var(--widget-text)]" : "text-[var(--widget-text-tertiary)]", children: h.icon }),
|
|
889
888
|
/* @__PURE__ */ t("span", { children: h.label }),
|
|
890
889
|
h.count !== void 0 && h.count > 0 && /* @__PURE__ */ i(
|
|
891
890
|
"span",
|
|
892
891
|
{
|
|
893
|
-
className:
|
|
894
|
-
style: {
|
|
895
|
-
color: g ? "#ffffff" : "var(--widget-text-tertiary)"
|
|
896
|
-
},
|
|
892
|
+
className: `ml-1 text-[10px] font-semibold ${f ? "text-[var(--widget-text)]" : "text-[var(--widget-text-tertiary)]"}`,
|
|
897
893
|
children: [
|
|
898
894
|
"(",
|
|
899
895
|
h.count > 99 ? "99+" : h.count,
|
|
@@ -928,27 +924,25 @@ const P = ({
|
|
|
928
924
|
role: "switch",
|
|
929
925
|
"aria-checked": a,
|
|
930
926
|
disabled: s,
|
|
931
|
-
className: `
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
`,
|
|
927
|
+
className: `relative inline-flex h-5 w-9 flex-shrink-0 rounded-full border-2 border-transparent
|
|
928
|
+
transition-colors duration-200 ease-in-out
|
|
929
|
+
focus:outline-none focus:ring-2 focus:ring-widget-primary focus:ring-offset-2
|
|
930
|
+
${a ? "bg-widget-primary" : "bg-gray-300 dark:bg-gray-600"}
|
|
931
|
+
${s ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
932
|
+
`,
|
|
938
933
|
onClick: () => !s && n(!a),
|
|
939
934
|
children: /* @__PURE__ */ t(
|
|
940
935
|
"span",
|
|
941
936
|
{
|
|
942
|
-
className: `
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
`
|
|
937
|
+
className: `pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow-md ring-0
|
|
938
|
+
transition duration-200 ease-in-out
|
|
939
|
+
${a ? "translate-x-4" : "translate-x-0"}
|
|
940
|
+
`
|
|
947
941
|
}
|
|
948
942
|
)
|
|
949
943
|
}
|
|
950
944
|
)
|
|
951
|
-
] }),
|
|
945
|
+
] }), $e = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], Oe = ({
|
|
952
946
|
preferences: e,
|
|
953
947
|
onPreferenceChange: r,
|
|
954
948
|
isLoading: a
|
|
@@ -956,7 +950,7 @@ const P = ({
|
|
|
956
950
|
const [n, s] = k({
|
|
957
951
|
global: !0,
|
|
958
952
|
schedule: !1
|
|
959
|
-
}), [o, h] = k({}),
|
|
953
|
+
}), [o, h] = k({}), f = (l) => {
|
|
960
954
|
s((u) => ({ ...u, [l]: !u[l] }));
|
|
961
955
|
}, m = (l) => {
|
|
962
956
|
h((u) => ({ ...u, [l]: !u[l] }));
|
|
@@ -964,8 +958,8 @@ const P = ({
|
|
|
964
958
|
r(`channels.${l}`, u);
|
|
965
959
|
}, y = (l, u) => {
|
|
966
960
|
r(`subscriptions.${l}.enabled`, u);
|
|
967
|
-
}, c = (l, u,
|
|
968
|
-
r(`subscriptions.${l}.channels.${u}`,
|
|
961
|
+
}, c = (l, u, g) => {
|
|
962
|
+
r(`subscriptions.${l}.channels.${u}`, g);
|
|
969
963
|
}, b = (l) => {
|
|
970
964
|
const u = [...e.deliverySchedule.weekdays];
|
|
971
965
|
u[l] = !u[l], r("deliverySchedule.weekdays", u);
|
|
@@ -983,7 +977,7 @@ const P = ({
|
|
|
983
977
|
return null;
|
|
984
978
|
}
|
|
985
979
|
};
|
|
986
|
-
return /* @__PURE__ */ i("div", { className: "h-full overflow-y-auto widget-scrollbar p-2
|
|
980
|
+
return /* @__PURE__ */ i("div", { className: "h-full overflow-y-auto widget-scrollbar p-2 bg-[var(--widget-background)]", "data-testid": "preferences-view", children: [
|
|
987
981
|
a && /* @__PURE__ */ t("div", { className: "absolute inset-0 bg-[var(--widget-bg)]/75 backdrop-blur-sm flex items-center justify-center z-10", children: /* @__PURE__ */ t("div", { className: "w-8 h-8 border-2 border-[var(--widget-primary)] border-t-transparent rounded-full animate-spin" }) }),
|
|
988
982
|
/* @__PURE__ */ i("div", { className: "space-y-2", children: [
|
|
989
983
|
/* @__PURE__ */ i("div", { className: "border border-[var(--widget-border)] rounded-lg overflow-hidden", children: [
|
|
@@ -991,7 +985,7 @@ const P = ({
|
|
|
991
985
|
"button",
|
|
992
986
|
{
|
|
993
987
|
type: "button",
|
|
994
|
-
onClick: () =>
|
|
988
|
+
onClick: () => f("global"),
|
|
995
989
|
className: "w-full flex items-center justify-between px-2 py-1.5 bg-[var(--widget-bg-secondary)] hover:bg-[var(--widget-bg-hover)] transition-colors",
|
|
996
990
|
children: [
|
|
997
991
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1002,7 +996,7 @@ const P = ({
|
|
|
1002
996
|
]
|
|
1003
997
|
}
|
|
1004
998
|
),
|
|
1005
|
-
n.global && /* @__PURE__ */ i("div", { className: "px-2 pb-1.5 divide-y divide-border-light
|
|
999
|
+
n.global && /* @__PURE__ */ i("div", { className: "px-2 pb-1.5 divide-y divide-border-light bg-[var(--widget-background)]", children: [
|
|
1006
1000
|
/* @__PURE__ */ t(
|
|
1007
1001
|
M,
|
|
1008
1002
|
{
|
|
@@ -1038,12 +1032,12 @@ const P = ({
|
|
|
1038
1032
|
)
|
|
1039
1033
|
] })
|
|
1040
1034
|
] }),
|
|
1041
|
-
/* @__PURE__ */ i("div", { className: "border border-[var(--widget-border)] rounded-lg overflow-hidden
|
|
1035
|
+
/* @__PURE__ */ i("div", { className: "border border-[var(--widget-border)] rounded-lg overflow-hidden bg-[var(--widget-background)]", children: [
|
|
1042
1036
|
/* @__PURE__ */ i(
|
|
1043
1037
|
"button",
|
|
1044
1038
|
{
|
|
1045
1039
|
type: "button",
|
|
1046
|
-
onClick: () =>
|
|
1040
|
+
onClick: () => f("schedule"),
|
|
1047
1041
|
className: "w-full flex items-center justify-between px-2 py-1.5 bg-[var(--widget-bg-secondary)] hover:bg-[var(--widget-bg-hover)] transition-colors",
|
|
1048
1042
|
children: [
|
|
1049
1043
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1073,25 +1067,25 @@ const P = ({
|
|
|
1073
1067
|
]
|
|
1074
1068
|
}
|
|
1075
1069
|
),
|
|
1076
|
-
n.schedule && /* @__PURE__ */ i("div", { className: "px-2 py-1.5 space-y-2 animate-in slide-in-from-top-2 duration-200
|
|
1070
|
+
n.schedule && /* @__PURE__ */ i("div", { className: "px-2 py-1.5 space-y-2 animate-in slide-in-from-top-2 duration-200 bg-[var(--widget-background)]", children: [
|
|
1077
1071
|
/* @__PURE__ */ t("div", { className: "text-sm text-[var(--widget-text-secondary)]", children: "Allow notifications between:" }),
|
|
1078
1072
|
/* @__PURE__ */ i("div", { className: "grid grid-cols-[auto_1fr_auto_auto] gap-x-4 gap-y-3 items-center", children: [
|
|
1079
1073
|
/* @__PURE__ */ t("div", { className: "col-span-2 text-xs font-semibold text-[var(--widget-text-tertiary)] pl-1", children: "Days" }),
|
|
1080
1074
|
/* @__PURE__ */ t("div", { className: "text-xs font-semibold text-[var(--widget-text-tertiary)] w-[88px]", children: "From" }),
|
|
1081
1075
|
/* @__PURE__ */ t("div", { className: "text-xs font-semibold text-[var(--widget-text-tertiary)] w-[88px]", children: "To" }),
|
|
1082
|
-
|
|
1083
|
-
const
|
|
1076
|
+
$e.map((l, u) => {
|
|
1077
|
+
const g = e.deliverySchedule.weekdays[u];
|
|
1084
1078
|
return /* @__PURE__ */ i(z.Fragment, { children: [
|
|
1085
1079
|
/* @__PURE__ */ t("div", { className: "flex items-center h-8", children: /* @__PURE__ */ t(
|
|
1086
1080
|
M,
|
|
1087
1081
|
{
|
|
1088
1082
|
id: `day-${u}`,
|
|
1089
|
-
checked:
|
|
1083
|
+
checked: g,
|
|
1090
1084
|
onChange: () => b(u),
|
|
1091
1085
|
disabled: a
|
|
1092
1086
|
}
|
|
1093
1087
|
) }),
|
|
1094
|
-
/* @__PURE__ */ t("div", { className: `text-sm ${
|
|
1088
|
+
/* @__PURE__ */ t("div", { className: `text-sm ${g ? "text-text-primary" : "text-text-tertiary"}`, children: l }),
|
|
1095
1089
|
/* @__PURE__ */ t("div", { className: "w-[88px]", children: /* @__PURE__ */ t(
|
|
1096
1090
|
"input",
|
|
1097
1091
|
{
|
|
@@ -1099,7 +1093,7 @@ const P = ({
|
|
|
1099
1093
|
className: "w-full px-2 py-1 bg-widget-background border border-border rounded text-sm text-text-primary focus:outline-none focus:ring-1 focus:ring-widget-primary disabled:opacity-50 disabled:bg-widget-hover",
|
|
1100
1094
|
value: e.deliverySchedule.quietHours.start,
|
|
1101
1095
|
onChange: (p) => r("deliverySchedule.quietHours.start", p.target.value),
|
|
1102
|
-
disabled: a || !
|
|
1096
|
+
disabled: a || !g
|
|
1103
1097
|
}
|
|
1104
1098
|
) }),
|
|
1105
1099
|
/* @__PURE__ */ t("div", { className: "w-[88px]", children: /* @__PURE__ */ t(
|
|
@@ -1109,7 +1103,7 @@ const P = ({
|
|
|
1109
1103
|
className: "w-full px-2 py-1 bg-widget-background border border-border rounded text-sm text-text-primary focus:outline-none focus:ring-1 focus:ring-widget-primary disabled:opacity-50 disabled:bg-widget-hover",
|
|
1110
1104
|
value: e.deliverySchedule.quietHours.end,
|
|
1111
1105
|
onChange: (p) => r("deliverySchedule.quietHours.end", p.target.value),
|
|
1112
|
-
disabled: a || !
|
|
1106
|
+
disabled: a || !g
|
|
1113
1107
|
}
|
|
1114
1108
|
) })
|
|
1115
1109
|
] }, l);
|
|
@@ -1141,7 +1135,7 @@ const P = ({
|
|
|
1141
1135
|
]
|
|
1142
1136
|
}
|
|
1143
1137
|
),
|
|
1144
|
-
o[l.workflowId] && l.enabled && /* @__PURE__ */ i("div", { className: "px-2 pb-1.5 divide-y divide-border-light
|
|
1138
|
+
o[l.workflowId] && l.enabled && /* @__PURE__ */ i("div", { className: "px-2 pb-1.5 divide-y divide-border-light bg-[var(--widget-background)]", children: [
|
|
1145
1139
|
/* @__PURE__ */ t(
|
|
1146
1140
|
M,
|
|
1147
1141
|
{
|
|
@@ -1357,12 +1351,12 @@ const Le = ({ onRetry: e, error: r }) => /* @__PURE__ */ i(
|
|
|
1357
1351
|
onViewChange: s,
|
|
1358
1352
|
notifications: o,
|
|
1359
1353
|
onNotificationAction: h,
|
|
1360
|
-
preferences:
|
|
1354
|
+
preferences: f,
|
|
1361
1355
|
onPreferenceChange: m,
|
|
1362
1356
|
isPreferencesLoading: d = !1,
|
|
1363
1357
|
size: y = "medium"
|
|
1364
1358
|
}) => {
|
|
1365
|
-
const c = j(null), b = j(null), [v, l] = k("all"), [u,
|
|
1359
|
+
const c = j(null), b = j(null), [v, l] = k("all"), [u, g] = k([]), [p, A] = k(""), _ = S(() => {
|
|
1366
1360
|
const x = window.__notificationSDK?.config, N = window.__notificationSDK?.client;
|
|
1367
1361
|
if (!x || !N) return null;
|
|
1368
1362
|
const { tenantId: C, environmentId: H, subscriberId: W } = x;
|
|
@@ -1377,9 +1371,9 @@ const Le = ({ onRetry: e, error: r }) => /* @__PURE__ */ i(
|
|
|
1377
1371
|
} catch (C) {
|
|
1378
1372
|
return { success: !1, processedCount: 0, failedCount: x.length, errors: [{ notificationId: "", error: C }] };
|
|
1379
1373
|
}
|
|
1380
|
-
}, [_]), le = Z(() => De(o, v, p), [o, v, p]),
|
|
1374
|
+
}, [_]), le = Z(() => De(o, v, p), [o, v, p]), $ = S((x) => {
|
|
1381
1375
|
c.current && !c.current.contains(x.target) && r();
|
|
1382
|
-
}, [r]),
|
|
1376
|
+
}, [r]), O = S((x) => {
|
|
1383
1377
|
x.key === "Escape" && r();
|
|
1384
1378
|
}, [r]), L = S((x) => {
|
|
1385
1379
|
if (!(!e || !c.current) && x.key === "Tab") {
|
|
@@ -1391,13 +1385,13 @@ const Le = ({ onRetry: e, error: r }) => /* @__PURE__ */ i(
|
|
|
1391
1385
|
x.shiftKey ? document.activeElement === C && (H.focus(), x.preventDefault()) : document.activeElement === H && (C.focus(), x.preventDefault());
|
|
1392
1386
|
}
|
|
1393
1387
|
}, [e]);
|
|
1394
|
-
if (D(() => (e ? (b.current = document.activeElement, document.addEventListener("mousedown",
|
|
1388
|
+
if (D(() => (e ? (b.current = document.activeElement, document.addEventListener("mousedown", $), document.addEventListener("keydown", O), document.addEventListener("keydown", L), setTimeout(() => {
|
|
1395
1389
|
c.current?.querySelector(
|
|
1396
1390
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1397
1391
|
)?.focus();
|
|
1398
|
-
}, 0)) : (b.current && b.current.focus(), l("all"),
|
|
1399
|
-
document.removeEventListener("mousedown",
|
|
1400
|
-
}), [e, O,
|
|
1392
|
+
}, 0)) : (b.current && b.current.focus(), l("all"), g([]), A("")), () => {
|
|
1393
|
+
document.removeEventListener("mousedown", $), document.removeEventListener("keydown", O), document.removeEventListener("keydown", L);
|
|
1394
|
+
}), [e, $, O, L]), !e) return null;
|
|
1401
1395
|
const oe = {
|
|
1402
1396
|
left: "left-0 origin-top-left",
|
|
1403
1397
|
right: "right-0 origin-top-right"
|
|
@@ -1416,23 +1410,23 @@ const Le = ({ onRetry: e, error: r }) => /* @__PURE__ */ i(
|
|
|
1416
1410
|
{
|
|
1417
1411
|
ref: c,
|
|
1418
1412
|
className: `
|
|
1419
|
-
absolute top-full mt-2 ${oe[a]}
|
|
1413
|
+
mx-widget-popover absolute top-full mt-2 ${oe[a]}
|
|
1420
1414
|
w-[var(--widget-popover-width,400px)] max-h-[var(--widget-popover-max-height,580px)]
|
|
1421
1415
|
border border-[var(--widget-border)] rounded-2xl overflow-hidden
|
|
1422
|
-
shadow-[var(--widget-shadow-xl)]
|
|
1416
|
+
shadow-[var(--widget-shadow-xl)] bg-[var(--widget-background)]
|
|
1423
1417
|
z-50 flex flex-col
|
|
1424
1418
|
animate-in fade-in-0 zoom-in-95 duration-200
|
|
1425
1419
|
max-sm:fixed max-sm:inset-x-4 max-sm:top-16 max-sm:bottom-4
|
|
1426
1420
|
max-sm:w-auto max-sm:max-w-none max-sm:max-h-[calc(100vh-120px)]
|
|
1427
1421
|
`,
|
|
1428
|
-
style: { backgroundColor: "var(--widget-background)" },
|
|
1429
1422
|
role: "dialog",
|
|
1430
1423
|
"aria-modal": "true",
|
|
1431
1424
|
"aria-label": "Notifications",
|
|
1432
1425
|
"data-testid": "inbox-popover",
|
|
1426
|
+
"data-mx-widget": "popover",
|
|
1433
1427
|
children: [
|
|
1434
|
-
/* @__PURE__ */ i("div", { className: "flex-shrink-0 flex items-center justify-between px-4 py-3 border-b border-[var(--widget-border)]
|
|
1435
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ t("h2", { className: "text-base font-semibold
|
|
1428
|
+
/* @__PURE__ */ i("div", { className: "flex-shrink-0 flex items-center justify-between px-4 py-3 border-b border-[var(--widget-border)] bg-[var(--widget-background)]", children: [
|
|
1429
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ t("h2", { className: "text-base font-semibold text-[var(--widget-text)]", children: n === "notifications" ? "Notifications" : "Preferences" }) }),
|
|
1436
1430
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
1437
1431
|
n === "notifications" && /* @__PURE__ */ t(
|
|
1438
1432
|
"button",
|
|
@@ -1470,7 +1464,7 @@ const Le = ({ onRetry: e, error: r }) => /* @__PURE__ */ i(
|
|
|
1470
1464
|
] })
|
|
1471
1465
|
] }),
|
|
1472
1466
|
n === "notifications" ? /* @__PURE__ */ i(E, { children: [
|
|
1473
|
-
/* @__PURE__ */ t("div", { className: "flex-shrink-0 px-4 py-2.5 border-b border-[var(--widget-border)]
|
|
1467
|
+
/* @__PURE__ */ t("div", { className: "flex-shrink-0 px-4 py-2.5 border-b border-[var(--widget-border)] bg-[var(--widget-background)]", children: /* @__PURE__ */ i("div", { className: "relative", children: [
|
|
1474
1468
|
/* @__PURE__ */ t("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: /* @__PURE__ */ t(we, { className: "w-5 h-5 text-[var(--widget-text-tertiary)]" }) }),
|
|
1475
1469
|
/* @__PURE__ */ t(
|
|
1476
1470
|
"input",
|
|
@@ -1502,14 +1496,14 @@ const Le = ({ onRetry: e, error: r }) => /* @__PURE__ */ i(
|
|
|
1502
1496
|
size: y
|
|
1503
1497
|
}
|
|
1504
1498
|
),
|
|
1505
|
-
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto widget-scrollbar
|
|
1499
|
+
/* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto widget-scrollbar bg-[var(--widget-background)] max-h-[calc(var(--widget-popover-max-height)-200px)]", children: /* @__PURE__ */ t(Q, { fallback: /* @__PURE__ */ t(Le, {}), children: /* @__PURE__ */ t(
|
|
1506
1500
|
Ie,
|
|
1507
1501
|
{
|
|
1508
1502
|
notifications: le,
|
|
1509
1503
|
onNotificationAction: h
|
|
1510
1504
|
}
|
|
1511
1505
|
) }) }),
|
|
1512
|
-
F > 0 && /* @__PURE__ */ t("div", { className: "flex-shrink-0 px-4 py-2.5 border-t border-[var(--widget-border)]
|
|
1506
|
+
F > 0 && /* @__PURE__ */ t("div", { className: "flex-shrink-0 px-4 py-2.5 border-t border-[var(--widget-border)] bg-[var(--widget-bg-hover)]", children: /* @__PURE__ */ t(
|
|
1513
1507
|
"button",
|
|
1514
1508
|
{
|
|
1515
1509
|
type: "button",
|
|
@@ -1522,10 +1516,10 @@ const Le = ({ onRetry: e, error: r }) => /* @__PURE__ */ i(
|
|
|
1522
1516
|
children: "Mark all as read"
|
|
1523
1517
|
}
|
|
1524
1518
|
) })
|
|
1525
|
-
] }) : /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto widget-scrollbar", children: /* @__PURE__ */ t(Q, { fallback: /* @__PURE__ */ t(X, {}), children:
|
|
1526
|
-
|
|
1519
|
+
] }) : /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto widget-scrollbar", children: /* @__PURE__ */ t(Q, { fallback: /* @__PURE__ */ t(X, {}), children: f && m ? /* @__PURE__ */ t(
|
|
1520
|
+
Oe,
|
|
1527
1521
|
{
|
|
1528
|
-
preferences:
|
|
1522
|
+
preferences: f,
|
|
1529
1523
|
onPreferenceChange: m,
|
|
1530
1524
|
isLoading: d,
|
|
1531
1525
|
onBack: () => s("notifications")
|
|
@@ -1543,8 +1537,8 @@ export {
|
|
|
1543
1537
|
qe as L,
|
|
1544
1538
|
We as M,
|
|
1545
1539
|
Ee as N,
|
|
1546
|
-
|
|
1540
|
+
Oe as P,
|
|
1547
1541
|
Ke as S,
|
|
1548
1542
|
Ue as a
|
|
1549
1543
|
};
|
|
1550
|
-
//# sourceMappingURL=components-
|
|
1544
|
+
//# sourceMappingURL=components-Dq8aSwWR.js.map
|