@notificationapi/react 0.0.13 → 0.0.15
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/assets/Inbox.js +433 -417
- package/dist/assets/Notification.js +22 -21
- package/dist/components/Notifications/Inbox.d.ts +4 -2
- package/dist/components/Notifications/Notification.d.ts +5 -2
- package/dist/components/Notifications/NotificationFeed.d.ts +5 -1
- package/dist/components/Notifications/NotificationFeed.js +18 -11
- package/dist/components/Notifications/NotificationLauncher.js +23 -16
- package/dist/components/Notifications/NotificationPopup.d.ts +5 -1
- package/dist/components/Provider/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as lt, jsx as
|
|
1
|
+
import { jsxs as lt, jsx as oe } from "react/jsx-runtime";
|
|
2
2
|
import * as q from "react";
|
|
3
3
|
import ie, { useRef as Qe, useDebugValue as er, createElement as uo, useContext as co, useMemo as ye, useCallback as fo, useState as lo, useEffect as tr } from "react";
|
|
4
4
|
import { S as po, U as N, V as le, W as B, X as U, Y as mo, Z as pt, $ as Me, a0 as pe, a1 as ho, a2 as dn, a3 as yo, a4 as go, a5 as mn, a6 as me, a7 as vo, a8 as bo, a9 as Te, aa as rr, ab as nr, h as wo, ac as So, g as Oo, m as To, r as xo, u as Eo, p as Po, a as hn, j as Ao, c as St, b as Ro, ad as Co, ae as $o, af as ko, ag as Do, ah as Io, ai as yn, aj as gn, ak as vn } from "./colors.js";
|
|
@@ -436,16 +436,16 @@ const Qo = (e, t) => {
|
|
|
436
436
|
} = e, Z = Zo(e, ["prefixCls", "shape", "size", "src", "srcSet", "icon", "className", "rootClassName", "alt", "draggable", "children", "crossOrigin"]), Y = _o((g) => {
|
|
437
437
|
var w, C;
|
|
438
438
|
return (C = (w = M ?? (y == null ? void 0 : y.size)) !== null && w !== void 0 ? w : g) !== null && C !== void 0 ? C : "default";
|
|
439
|
-
}), Q = Object.keys(typeof Y == "object" ? Y || {} : {}).some((g) => ["xs", "sm", "md", "lg", "xl", "xxl"].includes(g)),
|
|
439
|
+
}), Q = Object.keys(typeof Y == "object" ? Y || {} : {}).some((g) => ["xs", "sm", "md", "lg", "xl", "xxl"].includes(g)), ae = Go(Q), X = q.useMemo(() => {
|
|
440
440
|
if (typeof Y != "object")
|
|
441
441
|
return {};
|
|
442
|
-
const g = Sn.find((C) =>
|
|
442
|
+
const g = Sn.find((C) => ae[C]), w = Y[g];
|
|
443
443
|
return w ? {
|
|
444
444
|
width: w,
|
|
445
445
|
height: w,
|
|
446
446
|
fontSize: w && (f || ee) ? w / 2 : 18
|
|
447
447
|
} : {};
|
|
448
|
-
}, [
|
|
448
|
+
}, [ae, Y]);
|
|
449
449
|
if (process.env.NODE_ENV !== "production") {
|
|
450
450
|
const g = Ao("Avatar");
|
|
451
451
|
process.env.NODE_ENV !== "production" && g(!(typeof f == "string" && f.length > 2), "breaking", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${f}\` at https://ant.design/components/icon`);
|
|
@@ -1142,9 +1142,9 @@ function qa(e, t, r) {
|
|
|
1142
1142
|
var k = new Ua(r, b, n ? o.componentStyle : void 0);
|
|
1143
1143
|
function M(x, f) {
|
|
1144
1144
|
return function(D, V, W) {
|
|
1145
|
-
var K = D.attrs, ee = D.componentStyle, re = D.defaultProps, Z = D.foldedComponentIds, Y = D.styledComponentId, Q = D.target,
|
|
1145
|
+
var K = D.attrs, ee = D.componentStyle, re = D.defaultProps, Z = D.foldedComponentIds, Y = D.styledComponentId, Q = D.target, ae = ie.useContext(Fn), X = mr(), L = D.shouldForwardProp || X.shouldForwardProp;
|
|
1146
1146
|
process.env.NODE_ENV !== "production" && er(Y);
|
|
1147
|
-
var J = sa(V,
|
|
1147
|
+
var J = sa(V, ae, re) || Ce, H = function(_, $, A) {
|
|
1148
1148
|
for (var g, w = te(te({}, $), { className: void 0, theme: A }), C = 0; C < _.length; C += 1) {
|
|
1149
1149
|
var G = $e(g = _[C]) ? g(w) : g;
|
|
1150
1150
|
for (var d in G)
|
|
@@ -3408,7 +3408,7 @@ function ms() {
|
|
|
3408
3408
|
}
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
3411
|
-
var f = c, D = l, V = s, W = i, K = t, ee = m, re = n, Z = E, Y = y, Q = r,
|
|
3411
|
+
var f = c, D = l, V = s, W = i, K = t, ee = m, re = n, Z = E, Y = y, Q = r, ae = a, X = o, L = v, J = !1;
|
|
3412
3412
|
function H(d) {
|
|
3413
3413
|
return J || (J = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), p(d) || x(d) === c;
|
|
3414
3414
|
}
|
|
@@ -3448,7 +3448,7 @@ function ms() {
|
|
|
3448
3448
|
function G(d) {
|
|
3449
3449
|
return x(d) === v;
|
|
3450
3450
|
}
|
|
3451
|
-
z.AsyncMode = f, z.ConcurrentMode = D, z.ContextConsumer = V, z.ContextProvider = W, z.Element = K, z.ForwardRef = ee, z.Fragment = re, z.Lazy = Z, z.Memo = Y, z.Portal = Q, z.Profiler =
|
|
3451
|
+
z.AsyncMode = f, z.ConcurrentMode = D, z.ContextConsumer = V, z.ContextProvider = W, z.Element = K, z.ForwardRef = ee, z.Fragment = re, z.Lazy = Z, z.Memo = Y, z.Portal = Q, z.Profiler = ae, z.StrictMode = X, z.Suspense = L, z.isAsyncMode = H, z.isConcurrentMode = p, z.isContextConsumer = h, z.isContextProvider = T, z.isElement = P, z.isForwardRef = R, z.isFragment = _, z.isLazy = $, z.isMemo = A, z.isPortal = g, z.isProfiler = w, z.isStrictMode = C, z.isSuspense = G, z.isValidElementType = O, z.typeOf = x;
|
|
3452
3452
|
}()), z;
|
|
3453
3453
|
}
|
|
3454
3454
|
var Qr;
|
|
@@ -3738,12 +3738,12 @@ Valid keys: ` + JSON.stringify(Object.keys(p), null, " ")
|
|
|
3738
3738
|
return !1;
|
|
3739
3739
|
}
|
|
3740
3740
|
}
|
|
3741
|
-
function
|
|
3741
|
+
function ae(p, h) {
|
|
3742
3742
|
return p === "symbol" ? !0 : h ? h["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && h instanceof Symbol : !1;
|
|
3743
3743
|
}
|
|
3744
3744
|
function X(p) {
|
|
3745
3745
|
var h = typeof p;
|
|
3746
|
-
return Array.isArray(p) ? "array" : p instanceof RegExp ? "object" :
|
|
3746
|
+
return Array.isArray(p) ? "array" : p instanceof RegExp ? "object" : ae(h, p) ? "symbol" : h;
|
|
3747
3747
|
}
|
|
3748
3748
|
function L(p) {
|
|
3749
3749
|
if (typeof p > "u" || p === null)
|
|
@@ -4293,11 +4293,11 @@ function ru(e) {
|
|
|
4293
4293
|
Y(H);
|
|
4294
4294
|
}
|
|
4295
4295
|
}, [x]);
|
|
4296
|
-
var
|
|
4296
|
+
var ae = ye(function() {
|
|
4297
4297
|
return Is(M, m);
|
|
4298
4298
|
}, [M, m]), X = ye(function() {
|
|
4299
|
-
return c ? c(t) :
|
|
4300
|
-
}, [t, c,
|
|
4299
|
+
return c ? c(t) : ae(t);
|
|
4300
|
+
}, [t, c, ae]);
|
|
4301
4301
|
return {
|
|
4302
4302
|
date: t,
|
|
4303
4303
|
formattedDate: Z,
|
|
@@ -4492,7 +4492,7 @@ const pu = Un.div`
|
|
|
4492
4492
|
&:hover .notification-archive-button {
|
|
4493
4493
|
visibility: ${(e) => e.$archived ? "hidden" : "visible"};
|
|
4494
4494
|
}
|
|
4495
|
-
`, wu = (e) => /* @__PURE__ */ lt(
|
|
4495
|
+
`, wu = (e) => e.renderer ? e.renderer(e.notification) : /* @__PURE__ */ lt(
|
|
4496
4496
|
pu,
|
|
4497
4497
|
{
|
|
4498
4498
|
$redirect: !!e.notification.redirectURL,
|
|
@@ -4510,7 +4510,7 @@ const pu = Un.div`
|
|
|
4510
4510
|
width: "100%"
|
|
4511
4511
|
},
|
|
4512
4512
|
children: [
|
|
4513
|
-
/* @__PURE__ */
|
|
4513
|
+
/* @__PURE__ */ oe("div", { children: /* @__PURE__ */ oe(
|
|
4514
4514
|
Tn,
|
|
4515
4515
|
{
|
|
4516
4516
|
src: e.notification.imageURL,
|
|
@@ -4529,19 +4529,20 @@ const pu = Un.div`
|
|
|
4529
4529
|
flexGrow: 1
|
|
4530
4530
|
},
|
|
4531
4531
|
children: [
|
|
4532
|
-
/* @__PURE__ */
|
|
4532
|
+
/* @__PURE__ */ oe("div", { children: /* @__PURE__ */ oe(or.Text, { children: /* @__PURE__ */ oe(
|
|
4533
4533
|
"span",
|
|
4534
4534
|
{
|
|
4535
4535
|
dangerouslySetInnerHTML: { __html: e.notification.title }
|
|
4536
4536
|
}
|
|
4537
4537
|
) }) }),
|
|
4538
|
-
/* @__PURE__ */
|
|
4538
|
+
/* @__PURE__ */ oe("div", { children: /* @__PURE__ */ oe(or.Text, { type: "secondary", style: { fontSize: 12 }, children: /* @__PURE__ */ oe(
|
|
4539
4539
|
st,
|
|
4540
4540
|
{
|
|
4541
4541
|
date: new Date(e.notification.date).getTime(),
|
|
4542
4542
|
locale: "en-US"
|
|
4543
4543
|
}
|
|
4544
|
-
) }) })
|
|
4544
|
+
) }) }),
|
|
4545
|
+
e.extraRenderer && /* @__PURE__ */ oe("div", { children: e.extraRenderer(e.notification) })
|
|
4545
4546
|
]
|
|
4546
4547
|
}
|
|
4547
4548
|
),
|
|
@@ -4556,18 +4557,18 @@ const pu = Un.div`
|
|
|
4556
4557
|
alignItems: "center"
|
|
4557
4558
|
},
|
|
4558
4559
|
children: [
|
|
4559
|
-
/* @__PURE__ */
|
|
4560
|
+
/* @__PURE__ */ oe(
|
|
4560
4561
|
Fo,
|
|
4561
4562
|
{
|
|
4562
4563
|
className: "notification-archive-button",
|
|
4563
|
-
icon: /* @__PURE__ */
|
|
4564
|
+
icon: /* @__PURE__ */ oe(Mo, {}),
|
|
4564
4565
|
size: "small",
|
|
4565
4566
|
type: "text",
|
|
4566
4567
|
shape: "circle",
|
|
4567
4568
|
onClick: (t) => (e.markAsArchived([e.notification.id]), t.preventDefault(), t.stopPropagation(), !1)
|
|
4568
4569
|
}
|
|
4569
4570
|
),
|
|
4570
|
-
/* @__PURE__ */
|
|
4571
|
+
/* @__PURE__ */ oe(
|
|
4571
4572
|
zo,
|
|
4572
4573
|
{
|
|
4573
4574
|
dot: !0,
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { ImageShape } from './Notification';
|
|
2
2
|
import { NotificationPopupProps } from './NotificationPopup';
|
|
3
|
+
import { InAppNotification } from '../../interface';
|
|
3
4
|
|
|
4
5
|
export declare enum Pagination {
|
|
5
6
|
INFINITE_SCROLL = "infinite_scroll",
|
|
6
7
|
PAGINATED = "paginated"
|
|
7
8
|
}
|
|
8
|
-
type InboxProps = {
|
|
9
|
+
export type InboxProps = {
|
|
9
10
|
pagination: keyof typeof Pagination;
|
|
10
11
|
maxHeight: number;
|
|
11
12
|
filter: NotificationPopupProps["filter"];
|
|
12
13
|
imageShape: keyof typeof ImageShape;
|
|
13
14
|
pageSize: number;
|
|
14
15
|
pagePosition: NotificationPopupProps["pagePosition"];
|
|
16
|
+
notificationRenderer: ((notification: InAppNotification) => JSX.Element) | undefined;
|
|
17
|
+
notificationExtraRenderer: ((notification: InAppNotification) => JSX.Element) | undefined;
|
|
15
18
|
};
|
|
16
19
|
export declare const Inbox: React.FC<InboxProps>;
|
|
17
|
-
export {};
|
|
@@ -4,9 +4,12 @@ export declare enum ImageShape {
|
|
|
4
4
|
square = "square",
|
|
5
5
|
circle = "circle"
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export type NotificationProps = {
|
|
8
8
|
notification: InAppNotification;
|
|
9
9
|
markAsArchived: (ids: string[] | "ALL") => void;
|
|
10
10
|
markAsClicked: (id: string) => void;
|
|
11
11
|
imageShape: keyof typeof ImageShape;
|
|
12
|
-
|
|
12
|
+
renderer?: (notification: InAppNotification) => JSX.Element;
|
|
13
|
+
extraRenderer?: (notification: InAppNotification) => JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
export declare const Notification: (props: NotificationProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Pagination } from './Inbox';
|
|
2
|
-
import { ImageShape } from './Notification';
|
|
2
|
+
import { ImageShape, NotificationProps } from './Notification';
|
|
3
3
|
import { Filter } from './NotificationPopup';
|
|
4
4
|
import { InAppNotification } from '../../interface';
|
|
5
5
|
|
|
@@ -11,5 +11,9 @@ export type NotificationFeedProps = {
|
|
|
11
11
|
infiniteScrollHeight?: number;
|
|
12
12
|
style?: React.CSSProperties;
|
|
13
13
|
filter?: keyof typeof Filter | ((n: InAppNotification) => boolean);
|
|
14
|
+
renderers?: {
|
|
15
|
+
notification?: NotificationProps["renderer"];
|
|
16
|
+
notificationExtra?: NotificationProps["extraRenderer"];
|
|
17
|
+
};
|
|
14
18
|
};
|
|
15
19
|
export declare const NotificationFeed: React.FC<NotificationFeedProps>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useContext as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as f, useEffect as c } from "react";
|
|
3
3
|
import { F as g, I as l } from "../../assets/Inbox.js";
|
|
4
|
-
import { NotificationAPIContext as
|
|
4
|
+
import { NotificationAPIContext as d } from "../Provider/index.js";
|
|
5
5
|
const h = (i) => {
|
|
6
|
+
var n, o;
|
|
6
7
|
const e = {
|
|
7
8
|
imageShape: i.imageShape || "circle",
|
|
8
9
|
pagination: i.pagination || "INFINITE_SCROLL",
|
|
@@ -10,15 +11,19 @@ const h = (i) => {
|
|
|
10
11
|
pagePosition: i.pagePosition || "top",
|
|
11
12
|
style: i.style || {},
|
|
12
13
|
filter: i.filter || g.ALL,
|
|
13
|
-
infiniteScrollHeight: i.infiniteScrollHeight ? i.infiniteScrollHeight : window.innerHeight * 0.75
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
infiniteScrollHeight: i.infiniteScrollHeight ? i.infiniteScrollHeight : window.innerHeight * 0.75,
|
|
15
|
+
renderers: {
|
|
16
|
+
notification: (n = i.renderers) == null ? void 0 : n.notification,
|
|
17
|
+
notificationExtra: (o = i.renderers) == null ? void 0 : o.notificationExtra
|
|
18
|
+
}
|
|
19
|
+
}, t = f(d);
|
|
20
|
+
return t ? (c(() => {
|
|
16
21
|
t.markAsOpened();
|
|
17
|
-
const
|
|
22
|
+
const r = setInterval(() => {
|
|
18
23
|
t.markAsOpened();
|
|
19
24
|
}, 5e3);
|
|
20
|
-
return () => clearInterval(
|
|
21
|
-
}, []), /* @__PURE__ */
|
|
25
|
+
return () => clearInterval(r);
|
|
26
|
+
}, []), /* @__PURE__ */ a(
|
|
22
27
|
"div",
|
|
23
28
|
{
|
|
24
29
|
style: {
|
|
@@ -27,7 +32,7 @@ const h = (i) => {
|
|
|
27
32
|
background: "#fff",
|
|
28
33
|
...i.style
|
|
29
34
|
},
|
|
30
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ a(
|
|
31
36
|
l,
|
|
32
37
|
{
|
|
33
38
|
maxHeight: e.infiniteScrollHeight,
|
|
@@ -35,7 +40,9 @@ const h = (i) => {
|
|
|
35
40
|
filter: e.filter,
|
|
36
41
|
imageShape: e.imageShape,
|
|
37
42
|
pageSize: e.pageSize,
|
|
38
|
-
pagePosition: e.pagePosition
|
|
43
|
+
pagePosition: e.pagePosition,
|
|
44
|
+
notificationRenderer: e.renderers.notification,
|
|
45
|
+
notificationExtraRenderer: e.renderers.notificationExtra
|
|
39
46
|
}
|
|
40
47
|
)
|
|
41
48
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { I as
|
|
3
|
-
import { UnreadBadge as
|
|
4
|
-
import { useContext as
|
|
2
|
+
import { I as f } from "../../assets/Inbox.js";
|
|
3
|
+
import { UnreadBadge as d } from "./UnreadBadge.js";
|
|
4
|
+
import { useContext as c } from "react";
|
|
5
5
|
import { NotificationAPIContext as g } from "../Provider/index.js";
|
|
6
6
|
import { P as u } from "../../assets/index.js";
|
|
7
7
|
import { B as h } from "../../assets/button.js";
|
|
8
|
-
import { R as
|
|
9
|
-
var
|
|
10
|
-
const
|
|
8
|
+
import { R as l } from "../../assets/BellOutlined.js";
|
|
9
|
+
var m = /* @__PURE__ */ ((t) => (t.TOP_LEFT = "top-left", t.TOP_RIGHT = "top-right", t.BOTTOM_LEFT = "bottom-left", t.BOTTOM_RIGHT = "bottom-right", t))(m || {});
|
|
10
|
+
const y = (t) => {
|
|
11
|
+
var n, a;
|
|
11
12
|
const e = {
|
|
12
13
|
buttonWidth: t.buttonWidth || 40,
|
|
13
14
|
buttonHeight: t.buttonHeight || 40,
|
|
@@ -27,8 +28,12 @@ const S = (t) => {
|
|
|
27
28
|
offsetY: t.offsetY || 16,
|
|
28
29
|
position: t.position || "BOTTOM_RIGHT",
|
|
29
30
|
count: t.count || "COUNT_UNOPENED_NOTIFICATIONS",
|
|
30
|
-
filter: t.filter || "ALL"
|
|
31
|
-
|
|
31
|
+
filter: t.filter || "ALL",
|
|
32
|
+
renderers: {
|
|
33
|
+
notification: (n = t.renderers) == null ? void 0 : n.notification,
|
|
34
|
+
notificationExtra: (a = t.renderers) == null ? void 0 : a.notificationExtra
|
|
35
|
+
}
|
|
36
|
+
}, o = c(g);
|
|
32
37
|
return o ? /* @__PURE__ */ i(
|
|
33
38
|
"div",
|
|
34
39
|
{
|
|
@@ -44,14 +49,16 @@ const S = (t) => {
|
|
|
44
49
|
autoAdjustOverflow: !0,
|
|
45
50
|
trigger: "click",
|
|
46
51
|
content: /* @__PURE__ */ i(
|
|
47
|
-
|
|
52
|
+
f,
|
|
48
53
|
{
|
|
49
54
|
maxHeight: 500,
|
|
50
55
|
pagination: e.pagination,
|
|
51
56
|
filter: e.filter,
|
|
52
57
|
imageShape: e.imageShape,
|
|
53
58
|
pageSize: e.pageSize,
|
|
54
|
-
pagePosition: e.pagePosition
|
|
59
|
+
pagePosition: e.pagePosition,
|
|
60
|
+
notificationRenderer: e.renderers.notification,
|
|
61
|
+
notificationExtraRenderer: e.renderers.notificationExtra
|
|
55
62
|
}
|
|
56
63
|
),
|
|
57
64
|
arrow: !1,
|
|
@@ -59,8 +66,8 @@ const S = (t) => {
|
|
|
59
66
|
padding: "0 16px",
|
|
60
67
|
minWidth: e.popupWidth
|
|
61
68
|
},
|
|
62
|
-
onOpenChange: (
|
|
63
|
-
|
|
69
|
+
onOpenChange: (r) => {
|
|
70
|
+
r && o.markAsOpened();
|
|
64
71
|
},
|
|
65
72
|
children: /* @__PURE__ */ i(
|
|
66
73
|
"div",
|
|
@@ -69,7 +76,7 @@ const S = (t) => {
|
|
|
69
76
|
display: "inline-block"
|
|
70
77
|
},
|
|
71
78
|
children: /* @__PURE__ */ i(
|
|
72
|
-
|
|
79
|
+
d,
|
|
73
80
|
{
|
|
74
81
|
...t.unreadBadgeProps,
|
|
75
82
|
style: {
|
|
@@ -81,7 +88,7 @@ const S = (t) => {
|
|
|
81
88
|
h,
|
|
82
89
|
{
|
|
83
90
|
icon: /* @__PURE__ */ i(
|
|
84
|
-
|
|
91
|
+
l,
|
|
85
92
|
{
|
|
86
93
|
style: {
|
|
87
94
|
fontSize: e.buttonIconSize
|
|
@@ -106,6 +113,6 @@ const S = (t) => {
|
|
|
106
113
|
) : null;
|
|
107
114
|
};
|
|
108
115
|
export {
|
|
109
|
-
|
|
110
|
-
|
|
116
|
+
y as NotificationLauncher,
|
|
117
|
+
m as Position
|
|
111
118
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Pagination } from './Inbox';
|
|
2
2
|
import { UnreadBadgeProps } from './UnreadBadge';
|
|
3
|
-
import { ImageShape } from './Notification';
|
|
3
|
+
import { ImageShape, NotificationProps } from './Notification';
|
|
4
4
|
import { InAppNotification } from '../../interface';
|
|
5
5
|
|
|
6
6
|
export declare enum Filter {
|
|
@@ -21,5 +21,9 @@ export type NotificationPopupProps = {
|
|
|
21
21
|
unreadBadgeProps?: UnreadBadgeProps;
|
|
22
22
|
count?: UnreadBadgeProps["count"];
|
|
23
23
|
filter?: keyof typeof Filter | ((n: InAppNotification) => boolean);
|
|
24
|
+
renderers?: {
|
|
25
|
+
notification?: NotificationProps["renderer"];
|
|
26
|
+
notificationExtra?: NotificationProps["extraRenderer"];
|
|
27
|
+
};
|
|
24
28
|
};
|
|
25
29
|
export declare const NotificationPopup: React.FC<NotificationPopupProps>;
|
|
@@ -25,7 +25,7 @@ export declare enum DeliveryOptions {
|
|
|
25
25
|
WEEKLY = "weekly",
|
|
26
26
|
MONTHLY = "monthly"
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
28
|
+
export interface NotificationConfig {
|
|
29
29
|
envId: string;
|
|
30
30
|
notificationId: string;
|
|
31
31
|
title: string;
|
|
@@ -82,7 +82,7 @@ export interface Preferences {
|
|
|
82
82
|
notificationId: string;
|
|
83
83
|
title: string;
|
|
84
84
|
channels: Channels[];
|
|
85
|
-
options:
|
|
85
|
+
options: NotificationConfig["options"];
|
|
86
86
|
}[];
|
|
87
87
|
subNotifications: {
|
|
88
88
|
notificationId: string;
|