@notificationapi/react 0.0.16 → 0.0.18
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 +1418 -1390
- package/dist/assets/Notification.js +20 -21
- package/dist/assets/NotificationPreferencesPopup.js +1562 -0
- package/dist/assets/Preferences.js +739 -684
- package/dist/assets/button.js +1 -1
- package/dist/assets/colors.js +25 -25
- package/dist/assets/index.js +1 -1
- package/dist/assets/index2.js +32 -32
- package/dist/assets/index3.js +268 -268
- package/dist/components/Notifications/Inbox.d.ts +2 -1
- package/dist/components/Notifications/InboxHeader.d.ts +6 -3
- package/dist/components/Notifications/InboxHeader.js +44 -42
- package/dist/components/Notifications/Notification.d.ts +0 -1
- package/dist/components/Notifications/NotificationFeed.d.ts +2 -1
- package/dist/components/Notifications/NotificationFeed.js +56 -37
- package/dist/components/Notifications/NotificationLauncher.js +105 -89
- package/dist/components/Notifications/NotificationPopup.d.ts +4 -2
- package/dist/components/Notifications/NotificationPopup.js +6 -4
- package/dist/components/Preferences/NotificationPreferencesPopup.js +4 -1500
- package/dist/components/Preferences/PreferenceInput.js +1 -1
- package/dist/components/Preferences/Preferences.js +4 -5
- package/dist/components/Preferences/index.js +1 -1
- package/dist/main.js +5 -5
- package/package.json +1 -1
- package/dist/assets/BellOutlined.js +0 -60
- package/dist/assets/PurePanel.js +0 -67
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InboxHeaderProps } from './InboxHeader';
|
|
1
2
|
import { ImageShape } from './Notification';
|
|
2
3
|
import { NotificationPopupProps } from './NotificationPopup';
|
|
3
4
|
import { InAppNotification } from '../../interface';
|
|
@@ -14,6 +15,6 @@ export type InboxProps = {
|
|
|
14
15
|
pageSize: number;
|
|
15
16
|
pagePosition: NotificationPopupProps["pagePosition"];
|
|
16
17
|
notificationRenderer: ((notification: InAppNotification) => JSX.Element) | undefined;
|
|
17
|
-
|
|
18
|
+
header?: InboxHeaderProps;
|
|
18
19
|
};
|
|
19
20
|
export declare const Inbox: React.FC<InboxProps>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export type InboxHeaderProps = {
|
|
3
|
+
title?: JSX.Element;
|
|
4
|
+
button1ClickHandler?: (ids: string[] | "ALL") => void;
|
|
5
|
+
button2ClickHandler?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const InboxHeader: (props: InboxHeaderProps) => JSX.Element;
|
|
@@ -1,52 +1,54 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { I as s, T as d, R as f } from "../../assets/index3.js";
|
|
3
3
|
import { P as c } from "../../assets/index.js";
|
|
4
4
|
import { B as a } from "../../assets/button.js";
|
|
5
5
|
import { _ as m } from "../../assets/colors.js";
|
|
6
|
-
import * as
|
|
7
|
-
var
|
|
8
|
-
return /* @__PURE__ */
|
|
6
|
+
import * as i from "react";
|
|
7
|
+
var u = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z" } }] }, name: "setting", theme: "outlined" }, p = function(l, r) {
|
|
8
|
+
return /* @__PURE__ */ i.createElement(s, m({}, l, {
|
|
9
9
|
ref: r,
|
|
10
|
-
icon:
|
|
10
|
+
icon: u
|
|
11
11
|
}));
|
|
12
|
-
},
|
|
13
|
-
process.env.NODE_ENV !== "production" && (
|
|
14
|
-
const
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
12
|
+
}, o = /* @__PURE__ */ i.forwardRef(p);
|
|
13
|
+
process.env.NODE_ENV !== "production" && (o.displayName = "SettingOutlined");
|
|
14
|
+
const C = (e) => {
|
|
15
|
+
const l = e.title ?? /* @__PURE__ */ t(d.Text, { strong: !0, children: "Notifications" });
|
|
16
|
+
return /* @__PURE__ */ n(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
style: {
|
|
20
|
+
display: "flex",
|
|
21
|
+
justifyContent: "space-between",
|
|
22
|
+
paddingRight: 5
|
|
23
|
+
},
|
|
24
|
+
children: [
|
|
25
|
+
l,
|
|
26
|
+
/* @__PURE__ */ n("div", { children: [
|
|
27
|
+
/* @__PURE__ */ t(c, { content: "Resolve all", children: /* @__PURE__ */ t(
|
|
28
|
+
a,
|
|
29
|
+
{
|
|
30
|
+
icon: /* @__PURE__ */ t(f, {}),
|
|
31
|
+
size: "small",
|
|
32
|
+
type: "text",
|
|
33
|
+
onClick: () => {
|
|
34
|
+
e.button1ClickHandler && e.button1ClickHandler("ALL");
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
onClick: () => {
|
|
37
|
+
) }),
|
|
38
|
+
/* @__PURE__ */ t(c, { content: "Notification Preferences", children: /* @__PURE__ */ t(
|
|
39
|
+
a,
|
|
40
|
+
{
|
|
41
|
+
icon: /* @__PURE__ */ t(o, {}),
|
|
42
|
+
size: "small",
|
|
43
|
+
type: "text",
|
|
44
|
+
onClick: e.button2ClickHandler
|
|
43
45
|
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
]
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
) })
|
|
47
|
+
] })
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
};
|
|
50
52
|
export {
|
|
51
|
-
|
|
53
|
+
C as InboxHeader
|
|
52
54
|
};
|
|
@@ -10,6 +10,5 @@ export type NotificationProps = {
|
|
|
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
13
|
};
|
|
15
14
|
export declare const Notification: (props: NotificationProps) => JSX.Element;
|
|
@@ -2,6 +2,7 @@ import { Pagination } from './Inbox';
|
|
|
2
2
|
import { ImageShape, NotificationProps } from './Notification';
|
|
3
3
|
import { Filter } from './NotificationPopup';
|
|
4
4
|
import { InAppNotification } from '../../interface';
|
|
5
|
+
import { InboxHeaderProps } from './InboxHeader';
|
|
5
6
|
|
|
6
7
|
export type NotificationFeedProps = {
|
|
7
8
|
imageShape?: keyof typeof ImageShape;
|
|
@@ -13,7 +14,7 @@ export type NotificationFeedProps = {
|
|
|
13
14
|
filter?: keyof typeof Filter | ((n: InAppNotification) => boolean);
|
|
14
15
|
renderers?: {
|
|
15
16
|
notification?: NotificationProps["renderer"];
|
|
16
|
-
notificationExtra?: NotificationProps["extraRenderer"];
|
|
17
17
|
};
|
|
18
|
+
header?: InboxHeaderProps;
|
|
18
19
|
};
|
|
19
20
|
export declare const NotificationFeed: React.FC<NotificationFeedProps>;
|
|
@@ -1,53 +1,72 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import { F as
|
|
4
|
-
import { NotificationAPIContext as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs as d, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as s, useContext as m, useEffect as h } from "react";
|
|
3
|
+
import { F as S, I as u } from "../../assets/Inbox.js";
|
|
4
|
+
import { NotificationAPIContext as x } from "../Provider/index.js";
|
|
5
|
+
import { N as H } from "../../assets/NotificationPreferencesPopup.js";
|
|
6
|
+
import "../../assets/colors.js";
|
|
7
|
+
import "../../assets/Preferences.js";
|
|
8
|
+
const N = (e) => {
|
|
9
|
+
var r, a, o, l;
|
|
10
|
+
const [f, n] = s(!1), t = m(x);
|
|
11
|
+
if (!t)
|
|
12
|
+
return null;
|
|
13
|
+
const i = {
|
|
14
|
+
imageShape: e.imageShape || "circle",
|
|
15
|
+
pagination: e.pagination || "INFINITE_SCROLL",
|
|
16
|
+
pageSize: e.pageSize || 10,
|
|
17
|
+
pagePosition: e.pagePosition || "top",
|
|
18
|
+
style: e.style || {},
|
|
19
|
+
filter: e.filter || S.ALL,
|
|
20
|
+
infiniteScrollHeight: e.infiniteScrollHeight ? e.infiniteScrollHeight : window.innerHeight * 0.75,
|
|
15
21
|
renderers: {
|
|
16
|
-
notification: (
|
|
17
|
-
|
|
22
|
+
notification: (r = e.renderers) == null ? void 0 : r.notification
|
|
23
|
+
},
|
|
24
|
+
header: {
|
|
25
|
+
title: (a = e.header) == null ? void 0 : a.title,
|
|
26
|
+
button1ClickHandler: ((o = e.header) == null ? void 0 : o.button1ClickHandler) ?? t.markAsArchived,
|
|
27
|
+
button2ClickHandler: ((l = e.header) == null ? void 0 : l.button2ClickHandler) ?? (() => n(!0))
|
|
18
28
|
}
|
|
19
|
-
}
|
|
20
|
-
return
|
|
29
|
+
};
|
|
30
|
+
return h(() => {
|
|
21
31
|
t.markAsOpened();
|
|
22
|
-
const
|
|
32
|
+
const g = setInterval(() => {
|
|
23
33
|
t.markAsOpened();
|
|
24
34
|
}, 5e3);
|
|
25
|
-
return () => clearInterval(
|
|
26
|
-
}, []), /* @__PURE__ */
|
|
35
|
+
return () => clearInterval(g);
|
|
36
|
+
}, []), /* @__PURE__ */ d(
|
|
27
37
|
"div",
|
|
28
38
|
{
|
|
29
39
|
style: {
|
|
30
40
|
padding: 12,
|
|
31
41
|
boxSizing: "border-box",
|
|
32
42
|
background: "#fff",
|
|
33
|
-
...
|
|
43
|
+
...e.style
|
|
34
44
|
},
|
|
35
|
-
children:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ c(
|
|
47
|
+
u,
|
|
48
|
+
{
|
|
49
|
+
maxHeight: i.infiniteScrollHeight,
|
|
50
|
+
pagination: i.pagination,
|
|
51
|
+
filter: i.filter,
|
|
52
|
+
imageShape: i.imageShape,
|
|
53
|
+
pageSize: i.pageSize,
|
|
54
|
+
pagePosition: i.pagePosition,
|
|
55
|
+
notificationRenderer: i.renderers.notification,
|
|
56
|
+
header: i.header
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ c(
|
|
60
|
+
H,
|
|
61
|
+
{
|
|
62
|
+
open: f,
|
|
63
|
+
onClose: () => n(!1)
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
]
|
|
48
67
|
}
|
|
49
|
-
)
|
|
68
|
+
);
|
|
50
69
|
};
|
|
51
70
|
export {
|
|
52
|
-
|
|
71
|
+
N as NotificationFeed
|
|
53
72
|
};
|
|
@@ -1,15 +1,28 @@
|
|
|
1
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { I as
|
|
3
|
-
import { UnreadBadge as
|
|
4
|
-
import { useContext as
|
|
5
|
-
import { NotificationAPIContext as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import { R as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsx as i, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { I as l } from "../../assets/Inbox.js";
|
|
3
|
+
import { UnreadBadge as g } from "./UnreadBadge.js";
|
|
4
|
+
import { useState as m, useContext as b } from "react";
|
|
5
|
+
import { NotificationAPIContext as s } from "../Provider/index.js";
|
|
6
|
+
import { N as I } from "../../assets/NotificationPreferencesPopup.js";
|
|
7
|
+
import "../../assets/colors.js";
|
|
8
|
+
import { R as p } from "../../assets/Preferences.js";
|
|
9
|
+
import { P as O } from "../../assets/index.js";
|
|
10
|
+
import { B as T } from "../../assets/button.js";
|
|
11
|
+
var S = /* @__PURE__ */ ((t) => (t.TOP_LEFT = "top-left", t.TOP_RIGHT = "top-right", t.BOTTOM_LEFT = "bottom-left", t.BOTTOM_RIGHT = "bottom-right", t))(S || {});
|
|
12
|
+
const _ = (t) => {
|
|
13
|
+
var a, r, d, f;
|
|
14
|
+
const [u, o] = m(!1), n = b(s);
|
|
15
|
+
if (!n)
|
|
16
|
+
return null;
|
|
12
17
|
const e = {
|
|
18
|
+
buttonIcon: t.buttonIcon || /* @__PURE__ */ i(
|
|
19
|
+
p,
|
|
20
|
+
{
|
|
21
|
+
style: {
|
|
22
|
+
fontSize: t.buttonIconSize || (t.buttonWidth ? t.buttonWidth / 2 : 20)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
),
|
|
13
26
|
buttonWidth: t.buttonWidth || 40,
|
|
14
27
|
buttonHeight: t.buttonHeight || 40,
|
|
15
28
|
popupWidth: t.popupWidth || 400,
|
|
@@ -19,100 +32,103 @@ const y = (t) => {
|
|
|
19
32
|
pagination: t.pagination || "INFINITE_SCROLL",
|
|
20
33
|
pageSize: t.pageSize || 10,
|
|
21
34
|
pagePosition: t.pagePosition || "top",
|
|
22
|
-
|
|
23
|
-
zIndex: 999,
|
|
24
|
-
...t.style
|
|
25
|
-
},
|
|
35
|
+
popupZIndex: t.popupZIndex || 1030,
|
|
26
36
|
unreadBadgeProps: t.unreadBadgeProps ?? {},
|
|
27
37
|
offsetX: t.offsetX || 16,
|
|
28
38
|
offsetY: t.offsetY || 16,
|
|
29
39
|
position: t.position || "BOTTOM_RIGHT",
|
|
30
40
|
count: t.count || "COUNT_UNOPENED_NOTIFICATIONS",
|
|
31
41
|
filter: t.filter || "ALL",
|
|
42
|
+
header: {
|
|
43
|
+
title: (a = t.header) == null ? void 0 : a.title,
|
|
44
|
+
button1ClickHandler: ((r = t.header) == null ? void 0 : r.button1ClickHandler) ?? n.markAsArchived,
|
|
45
|
+
button2ClickHandler: ((d = t.header) == null ? void 0 : d.button2ClickHandler) ?? (() => o(!0))
|
|
46
|
+
},
|
|
32
47
|
renderers: {
|
|
33
|
-
notification: (
|
|
34
|
-
notificationExtra: (a = t.renderers) == null ? void 0 : a.notificationExtra
|
|
48
|
+
notification: (f = t.renderers) == null ? void 0 : f.notification
|
|
35
49
|
}
|
|
36
|
-
}
|
|
37
|
-
return
|
|
50
|
+
};
|
|
51
|
+
return /* @__PURE__ */ h(
|
|
38
52
|
"div",
|
|
39
53
|
{
|
|
40
54
|
style: {
|
|
41
55
|
position: "fixed",
|
|
42
56
|
right: e.offsetX,
|
|
43
57
|
bottom: e.offsetY,
|
|
44
|
-
|
|
58
|
+
zIndex: 9999
|
|
45
59
|
},
|
|
46
|
-
children:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ i(
|
|
62
|
+
O,
|
|
63
|
+
{
|
|
64
|
+
autoAdjustOverflow: !0,
|
|
65
|
+
trigger: "click",
|
|
66
|
+
content: /* @__PURE__ */ i(
|
|
67
|
+
l,
|
|
68
|
+
{
|
|
69
|
+
maxHeight: 500,
|
|
70
|
+
pagination: e.pagination,
|
|
71
|
+
filter: e.filter,
|
|
72
|
+
imageShape: e.imageShape,
|
|
73
|
+
pageSize: e.pageSize,
|
|
74
|
+
pagePosition: e.pagePosition,
|
|
75
|
+
notificationRenderer: e.renderers.notification,
|
|
76
|
+
header: e.header
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
arrow: !1,
|
|
80
|
+
overlayStyle: {
|
|
81
|
+
padding: "0 16px",
|
|
82
|
+
minWidth: e.popupWidth
|
|
83
|
+
},
|
|
84
|
+
onOpenChange: (c) => {
|
|
85
|
+
c && n.markAsOpened();
|
|
86
|
+
},
|
|
87
|
+
children: /* @__PURE__ */ i(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
style: {
|
|
91
|
+
display: "inline-block"
|
|
92
|
+
},
|
|
93
|
+
children: /* @__PURE__ */ i(
|
|
94
|
+
g,
|
|
95
|
+
{
|
|
96
|
+
...t.unreadBadgeProps,
|
|
97
|
+
style: {
|
|
98
|
+
top: 5,
|
|
99
|
+
right: 5
|
|
100
|
+
},
|
|
101
|
+
count: e.count,
|
|
102
|
+
children: /* @__PURE__ */ i(
|
|
103
|
+
T,
|
|
104
|
+
{
|
|
105
|
+
icon: e.buttonIcon,
|
|
106
|
+
style: {
|
|
107
|
+
width: e.buttonWidth,
|
|
108
|
+
height: e.buttonHeight
|
|
109
|
+
},
|
|
110
|
+
shape: "circle",
|
|
111
|
+
type: "default"
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ i(
|
|
121
|
+
I,
|
|
122
|
+
{
|
|
123
|
+
open: u,
|
|
124
|
+
onClose: () => o(!1)
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
]
|
|
112
128
|
}
|
|
113
|
-
)
|
|
129
|
+
);
|
|
114
130
|
};
|
|
115
131
|
export {
|
|
116
|
-
|
|
117
|
-
|
|
132
|
+
_ as NotificationLauncher,
|
|
133
|
+
S as Position
|
|
118
134
|
};
|
|
@@ -2,12 +2,14 @@ import { Pagination } from './Inbox';
|
|
|
2
2
|
import { UnreadBadgeProps } from './UnreadBadge';
|
|
3
3
|
import { ImageShape, NotificationProps } from './Notification';
|
|
4
4
|
import { InAppNotification } from '../../interface';
|
|
5
|
+
import { InboxHeaderProps } from './InboxHeader';
|
|
5
6
|
|
|
6
7
|
export declare enum Filter {
|
|
7
8
|
ALL = "ALL",
|
|
8
9
|
UNARCHIVED = "UNARCHIVED"
|
|
9
10
|
}
|
|
10
11
|
export type NotificationPopupProps = {
|
|
12
|
+
buttonIcon?: React.ReactNode;
|
|
11
13
|
buttonIconSize?: number;
|
|
12
14
|
buttonWidth?: number;
|
|
13
15
|
buttonHeight?: number;
|
|
@@ -17,13 +19,13 @@ export type NotificationPopupProps = {
|
|
|
17
19
|
pagination?: keyof typeof Pagination;
|
|
18
20
|
pageSize?: number;
|
|
19
21
|
pagePosition?: "top" | "bottom";
|
|
20
|
-
|
|
22
|
+
popupZIndex?: number;
|
|
21
23
|
unreadBadgeProps?: UnreadBadgeProps;
|
|
22
24
|
count?: UnreadBadgeProps["count"];
|
|
23
25
|
filter?: keyof typeof Filter | ((n: InAppNotification) => boolean);
|
|
24
26
|
renderers?: {
|
|
25
27
|
notification?: NotificationProps["renderer"];
|
|
26
|
-
notificationExtra?: NotificationProps["extraRenderer"];
|
|
27
28
|
};
|
|
29
|
+
header?: InboxHeaderProps;
|
|
28
30
|
};
|
|
29
31
|
export declare const NotificationPopup: React.FC<NotificationPopupProps>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { F as
|
|
2
|
+
import { F as N, N as c } from "../../assets/Inbox.js";
|
|
3
3
|
import "./UnreadBadge.js";
|
|
4
4
|
import "../Provider/index.js";
|
|
5
5
|
import "react";
|
|
6
|
+
import "../../assets/NotificationPreferencesPopup.js";
|
|
7
|
+
import "../../assets/colors.js";
|
|
8
|
+
import "../../assets/Preferences.js";
|
|
6
9
|
import "../../assets/index.js";
|
|
7
10
|
import "../../assets/button.js";
|
|
8
|
-
import "../../assets/BellOutlined.js";
|
|
9
11
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
N as Filter,
|
|
13
|
+
c as NotificationPopup
|
|
12
14
|
};
|