@notificationapi/react 0.0.34 → 0.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 +1 -1
- package/dist/assets/AntdIcon.js +1 -1
- package/dist/assets/CloseOutlined.js +13 -0
- package/dist/assets/Notification.js +17 -16
- package/dist/assets/PreferenceInput.js +1470 -0
- package/dist/assets/PurePanel.js +32 -42
- package/dist/assets/WebPushOptInMessage.js +478 -0
- package/dist/assets/button.js +50 -50
- package/dist/assets/colors.js +25 -20840
- package/dist/assets/compact-item.js +860 -0
- package/dist/assets/index.js +11 -9
- package/dist/assets/index2.js +10 -9
- package/dist/assets/index3.js +2303 -3150
- package/dist/assets/presets.js +22 -22
- package/dist/assets/reactNode.js +20821 -0
- package/dist/components/Notifications/Inbox.js +81 -78
- package/dist/components/Notifications/NotificationFeed.js +59 -31
- package/dist/components/Notifications/NotificationLauncher.js +61 -41
- package/dist/components/Notifications/NotificationPopup.js +72 -65
- package/dist/components/Preferences/NotificationPreferencesInline.d.ts +1 -1
- package/dist/components/Preferences/NotificationPreferencesInline.js +39 -5
- package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +1 -1
- package/dist/components/Preferences/NotificationPreferencesPopup.js +463 -464
- package/dist/components/Preferences/PreferenceInput.js +5 -1466
- package/dist/components/Preferences/Preferences.js +24 -23
- package/dist/components/Provider/index.d.ts +9 -1
- package/dist/components/Provider/index.js +209 -154
- package/dist/components/WebPush/WebPushOptInMessage.d.ts +14 -0
- package/dist/components/WebPush/WebPushOptInMessage.js +8 -0
- package/package.json +2 -2
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useContext as m, useEffect as h } from "react";
|
|
3
3
|
import { Inbox as u } from "./Inbox.js";
|
|
4
|
-
import { NotificationAPIContext as
|
|
4
|
+
import { NotificationAPIContext as p } from "../Provider/index.js";
|
|
5
5
|
import { NotificationPreferencesPopup as x } from "../Preferences/NotificationPreferencesPopup.js";
|
|
6
|
-
import "
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { D as S } from "../../assets/PreferenceInput.js";
|
|
7
|
+
import { W as I, R as b } from "../../assets/WebPushOptInMessage.js";
|
|
8
|
+
import { Filter as P } from "./interface.js";
|
|
9
|
+
const L = (e) => {
|
|
10
|
+
var o, a, l, f;
|
|
11
|
+
const [c, r] = d(!1), i = m(p);
|
|
11
12
|
if (h(() => {
|
|
12
|
-
if (!
|
|
13
|
-
|
|
13
|
+
if (!i) return;
|
|
14
|
+
i.markAsOpened();
|
|
14
15
|
const g = setInterval(() => {
|
|
15
|
-
|
|
16
|
+
i.markAsOpened();
|
|
16
17
|
}, 5e3);
|
|
17
18
|
return () => clearInterval(g);
|
|
18
|
-
}, [
|
|
19
|
+
}, [i]), !i)
|
|
19
20
|
return null;
|
|
20
|
-
const
|
|
21
|
+
const t = {
|
|
21
22
|
imageShape: e.imageShape || "circle",
|
|
22
23
|
pagination: e.pagination || "INFINITE_SCROLL",
|
|
23
24
|
pageSize: e.pageSize || 10,
|
|
24
25
|
pagePosition: e.pagePosition || "top",
|
|
25
26
|
style: e.style || {},
|
|
26
|
-
filter: e.filter ||
|
|
27
|
+
filter: e.filter || P.ALL,
|
|
27
28
|
infiniteScrollHeight: e.infiniteScrollHeight ? e.infiniteScrollHeight : window.innerHeight * 0.75,
|
|
28
29
|
renderers: {
|
|
29
|
-
notification: (
|
|
30
|
+
notification: (o = e.renderers) == null ? void 0 : o.notification
|
|
30
31
|
},
|
|
31
32
|
header: {
|
|
32
|
-
title: (
|
|
33
|
-
button1ClickHandler: ((
|
|
34
|
-
button2ClickHandler: ((
|
|
33
|
+
title: (a = e.header) == null ? void 0 : a.title,
|
|
34
|
+
button1ClickHandler: ((l = e.header) == null ? void 0 : l.button1ClickHandler) ?? i.markAsArchived,
|
|
35
|
+
button2ClickHandler: ((f = e.header) == null ? void 0 : f.button2ClickHandler) ?? (() => r(!0))
|
|
35
36
|
}
|
|
36
37
|
};
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ s(
|
|
38
39
|
"div",
|
|
39
40
|
{
|
|
40
41
|
style: {
|
|
@@ -44,24 +45,51 @@ const v = (e) => {
|
|
|
44
45
|
...e.style
|
|
45
46
|
},
|
|
46
47
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ n(
|
|
48
49
|
u,
|
|
49
50
|
{
|
|
50
|
-
maxHeight:
|
|
51
|
-
pagination:
|
|
52
|
-
filter:
|
|
53
|
-
imageShape:
|
|
54
|
-
pageSize:
|
|
55
|
-
pagePosition:
|
|
56
|
-
notificationRenderer:
|
|
57
|
-
header:
|
|
51
|
+
maxHeight: t.infiniteScrollHeight,
|
|
52
|
+
pagination: t.pagination,
|
|
53
|
+
filter: t.filter,
|
|
54
|
+
imageShape: t.imageShape,
|
|
55
|
+
pageSize: t.pageSize,
|
|
56
|
+
pagePosition: t.pagePosition,
|
|
57
|
+
notificationRenderer: t.renderers.notification,
|
|
58
|
+
header: t.header
|
|
58
59
|
}
|
|
59
60
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
+
i.webPushOptInMessage && localStorage.getItem("hideWebPushOptInMessage") !== "true" && /* @__PURE__ */ s("div", { children: [
|
|
62
|
+
/* @__PURE__ */ n(S, { style: { margin: "10px 0" } }),
|
|
63
|
+
/* @__PURE__ */ n(
|
|
64
|
+
I,
|
|
65
|
+
{
|
|
66
|
+
hideAfterInteraction: !0,
|
|
67
|
+
icon: /* @__PURE__ */ n(b, { type: "text", style: { marginLeft: "9px" } }),
|
|
68
|
+
descriptionStyle: {
|
|
69
|
+
flexDirection: "column",
|
|
70
|
+
// Stack the elements vertically
|
|
71
|
+
justifyContent: "flex-start",
|
|
72
|
+
// Align items to the left
|
|
73
|
+
fontSize: "14px",
|
|
74
|
+
alignItems: "flex-start"
|
|
75
|
+
// Align items to the left
|
|
76
|
+
},
|
|
77
|
+
buttonContainerStyle: {
|
|
78
|
+
justifyContent: "flex-start",
|
|
79
|
+
// Align buttons to the left
|
|
80
|
+
alignItems: "flex-start",
|
|
81
|
+
// Align buttons to the left
|
|
82
|
+
marginTop: "10px"
|
|
83
|
+
// Add some space between message and buttons
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
] }),
|
|
88
|
+
/* @__PURE__ */ n(
|
|
61
89
|
x,
|
|
62
90
|
{
|
|
63
91
|
open: c,
|
|
64
|
-
onClose: () =>
|
|
92
|
+
onClose: () => r(!1)
|
|
65
93
|
}
|
|
66
94
|
)
|
|
67
95
|
]
|
|
@@ -69,5 +97,5 @@ const v = (e) => {
|
|
|
69
97
|
);
|
|
70
98
|
};
|
|
71
99
|
export {
|
|
72
|
-
|
|
100
|
+
L as NotificationFeed
|
|
73
101
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { Inbox as
|
|
3
|
-
import { UnreadBadge as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { NotificationAPIContext as
|
|
6
|
-
import { NotificationPreferencesPopup as
|
|
7
|
-
import "
|
|
8
|
-
import { R as S } from "../../assets/
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as i, jsxs as o, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { Inbox as g } from "./Inbox.js";
|
|
3
|
+
import { UnreadBadge as m } from "./UnreadBadge.js";
|
|
4
|
+
import { useState as s, useContext as b } from "react";
|
|
5
|
+
import { NotificationAPIContext as I } from "../Provider/index.js";
|
|
6
|
+
import { NotificationPreferencesPopup as p } from "../Preferences/NotificationPreferencesPopup.js";
|
|
7
|
+
import { D as x } from "../../assets/PreferenceInput.js";
|
|
8
|
+
import { W as P, R as S } from "../../assets/WebPushOptInMessage.js";
|
|
9
|
+
import { R as C } from "../../assets/channelUtils.js";
|
|
10
|
+
import { P as W } from "../../assets/index.js";
|
|
11
|
+
import { B as O } from "../../assets/button.js";
|
|
12
|
+
const w = (t) => {
|
|
13
|
+
var r, d, c, u;
|
|
14
|
+
const [f, a] = s(!1), n = b(I);
|
|
14
15
|
if (!n)
|
|
15
16
|
return null;
|
|
16
17
|
const e = {
|
|
17
18
|
buttonIcon: t.buttonIcon || /* @__PURE__ */ i(
|
|
18
|
-
|
|
19
|
+
C,
|
|
19
20
|
{
|
|
20
21
|
style: {
|
|
21
22
|
fontSize: t.buttonIconSize || (t.buttonWidth ? t.buttonWidth / 2 : 20),
|
|
@@ -41,15 +42,15 @@ const B = (t) => {
|
|
|
41
42
|
count: t.count || "COUNT_UNOPENED_NOTIFICATIONS",
|
|
42
43
|
filter: t.filter || "ALL",
|
|
43
44
|
header: {
|
|
44
|
-
title: (
|
|
45
|
-
button1ClickHandler: ((
|
|
46
|
-
button2ClickHandler: ((
|
|
45
|
+
title: (r = t.header) == null ? void 0 : r.title,
|
|
46
|
+
button1ClickHandler: ((d = t.header) == null ? void 0 : d.button1ClickHandler) ?? n.markAsArchived,
|
|
47
|
+
button2ClickHandler: ((c = t.header) == null ? void 0 : c.button2ClickHandler) ?? (() => a(!0))
|
|
47
48
|
},
|
|
48
49
|
renderers: {
|
|
49
|
-
notification: (
|
|
50
|
+
notification: (u = t.renderers) == null ? void 0 : u.notification
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ o(
|
|
53
54
|
"div",
|
|
54
55
|
{
|
|
55
56
|
style: {
|
|
@@ -60,30 +61,49 @@ const B = (t) => {
|
|
|
60
61
|
},
|
|
61
62
|
children: [
|
|
62
63
|
/* @__PURE__ */ i(
|
|
63
|
-
|
|
64
|
+
W,
|
|
64
65
|
{
|
|
65
66
|
autoAdjustOverflow: !0,
|
|
66
67
|
trigger: "click",
|
|
67
|
-
content: /* @__PURE__ */
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
content: /* @__PURE__ */ o(h, { children: [
|
|
69
|
+
/* @__PURE__ */ i(
|
|
70
|
+
g,
|
|
71
|
+
{
|
|
72
|
+
maxHeight: 500,
|
|
73
|
+
pagination: e.pagination,
|
|
74
|
+
filter: e.filter,
|
|
75
|
+
imageShape: e.imageShape,
|
|
76
|
+
pageSize: e.pageSize,
|
|
77
|
+
pagePosition: e.pagePosition,
|
|
78
|
+
notificationRenderer: e.renderers.notification,
|
|
79
|
+
header: e.header
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
n.webPushOptInMessage && localStorage.getItem("hideWebPushOptInMessage") !== "true" && /* @__PURE__ */ o("div", { children: [
|
|
83
|
+
/* @__PURE__ */ i(x, { style: { margin: "10px 0" } }),
|
|
84
|
+
/* @__PURE__ */ i(
|
|
85
|
+
P,
|
|
86
|
+
{
|
|
87
|
+
hideAfterInteraction: !0,
|
|
88
|
+
icon: /* @__PURE__ */ i(
|
|
89
|
+
S,
|
|
90
|
+
{
|
|
91
|
+
type: "text",
|
|
92
|
+
style: { marginLeft: "9px" }
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
alertContainerStyle: { maxWidth: "345px" }
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] })
|
|
99
|
+
] }),
|
|
80
100
|
arrow: !1,
|
|
81
101
|
overlayStyle: {
|
|
82
102
|
padding: "0 16px",
|
|
83
103
|
minWidth: e.popupWidth
|
|
84
104
|
},
|
|
85
|
-
onOpenChange: (
|
|
86
|
-
|
|
105
|
+
onOpenChange: (l) => {
|
|
106
|
+
l && n.markAsOpened();
|
|
87
107
|
},
|
|
88
108
|
children: /* @__PURE__ */ i(
|
|
89
109
|
"div",
|
|
@@ -92,7 +112,7 @@ const B = (t) => {
|
|
|
92
112
|
display: "inline-block"
|
|
93
113
|
},
|
|
94
114
|
children: /* @__PURE__ */ i(
|
|
95
|
-
|
|
115
|
+
m,
|
|
96
116
|
{
|
|
97
117
|
...t.unreadBadgeProps,
|
|
98
118
|
style: {
|
|
@@ -101,7 +121,7 @@ const B = (t) => {
|
|
|
101
121
|
},
|
|
102
122
|
count: e.count,
|
|
103
123
|
children: /* @__PURE__ */ i(
|
|
104
|
-
|
|
124
|
+
O,
|
|
105
125
|
{
|
|
106
126
|
icon: e.buttonIcon,
|
|
107
127
|
style: {
|
|
@@ -119,10 +139,10 @@ const B = (t) => {
|
|
|
119
139
|
}
|
|
120
140
|
),
|
|
121
141
|
/* @__PURE__ */ i(
|
|
122
|
-
|
|
142
|
+
p,
|
|
123
143
|
{
|
|
124
|
-
open:
|
|
125
|
-
onClose: () =>
|
|
144
|
+
open: f,
|
|
145
|
+
onClose: () => a(!1)
|
|
126
146
|
}
|
|
127
147
|
)
|
|
128
148
|
]
|
|
@@ -130,5 +150,5 @@ const B = (t) => {
|
|
|
130
150
|
);
|
|
131
151
|
};
|
|
132
152
|
export {
|
|
133
|
-
|
|
153
|
+
w as NotificationLauncher
|
|
134
154
|
};
|
|
@@ -1,80 +1,87 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { Inbox as
|
|
1
|
+
import { jsx as i, jsxs as o, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import { Inbox as f } from "./Inbox.js";
|
|
3
3
|
import { UnreadBadge as m } from "./UnreadBadge.js";
|
|
4
4
|
import { NotificationAPIContext as p } from "../Provider/index.js";
|
|
5
|
-
import { useState as b, useContext as
|
|
6
|
-
import { NotificationPreferencesPopup as
|
|
7
|
-
import "
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
import { useState as b, useContext as s } from "react";
|
|
6
|
+
import { NotificationPreferencesPopup as I } from "../Preferences/NotificationPreferencesPopup.js";
|
|
7
|
+
import { D as P } from "../../assets/PreferenceInput.js";
|
|
8
|
+
import { W as S } from "../../assets/WebPushOptInMessage.js";
|
|
9
|
+
import { Filter as x } from "./interface.js";
|
|
10
|
+
import { R as C } from "../../assets/channelUtils.js";
|
|
11
|
+
import { P as W } from "../../assets/index.js";
|
|
12
|
+
import { B as O } from "../../assets/button.js";
|
|
13
|
+
const T = (e) => {
|
|
14
|
+
var a, d, c, u;
|
|
15
|
+
const [h, r] = b(!1), n = s(p);
|
|
15
16
|
if (!n)
|
|
16
17
|
return null;
|
|
17
|
-
const
|
|
18
|
-
buttonIcon:
|
|
19
|
-
|
|
18
|
+
const t = {
|
|
19
|
+
buttonIcon: e.buttonIcon || /* @__PURE__ */ i(
|
|
20
|
+
C,
|
|
20
21
|
{
|
|
21
22
|
style: {
|
|
22
|
-
fontSize:
|
|
23
|
-
color:
|
|
23
|
+
fontSize: e.buttonIconSize || (e.buttonWidth ? e.buttonWidth / 2 : 20),
|
|
24
|
+
color: e.iconColor || "#000000"
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
27
|
),
|
|
27
|
-
buttonWidth:
|
|
28
|
-
buttonHeight:
|
|
29
|
-
popupWidth:
|
|
30
|
-
popupHeight:
|
|
31
|
-
buttonIconSize:
|
|
32
|
-
imageShape:
|
|
33
|
-
iconColor:
|
|
34
|
-
pagination:
|
|
35
|
-
pageSize:
|
|
36
|
-
pagePosition:
|
|
37
|
-
popupZIndex:
|
|
38
|
-
unreadBadgeProps:
|
|
39
|
-
count:
|
|
40
|
-
filter:
|
|
28
|
+
buttonWidth: e.buttonWidth || 40,
|
|
29
|
+
buttonHeight: e.buttonHeight || 40,
|
|
30
|
+
popupWidth: e.popupWidth || 400,
|
|
31
|
+
popupHeight: e.popupHeight || 600,
|
|
32
|
+
buttonIconSize: e.buttonIconSize || (e.buttonWidth ? e.buttonWidth / 2 : 20),
|
|
33
|
+
imageShape: e.imageShape || "circle",
|
|
34
|
+
iconColor: e.iconColor || "#000000",
|
|
35
|
+
pagination: e.pagination || "INFINITE_SCROLL",
|
|
36
|
+
pageSize: e.pageSize || 10,
|
|
37
|
+
pagePosition: e.pagePosition || "top",
|
|
38
|
+
popupZIndex: e.popupZIndex || 1030,
|
|
39
|
+
unreadBadgeProps: e.unreadBadgeProps ?? {},
|
|
40
|
+
count: e.count || "COUNT_UNOPENED_NOTIFICATIONS",
|
|
41
|
+
filter: e.filter || x.ALL,
|
|
41
42
|
header: {
|
|
42
|
-
title: (a =
|
|
43
|
-
button1ClickHandler: ((
|
|
44
|
-
button2ClickHandler: ((c =
|
|
43
|
+
title: (a = e.header) == null ? void 0 : a.title,
|
|
44
|
+
button1ClickHandler: ((d = e.header) == null ? void 0 : d.button1ClickHandler) ?? n.markAsArchived,
|
|
45
|
+
button2ClickHandler: ((c = e.header) == null ? void 0 : c.button2ClickHandler) ?? (() => r(!0))
|
|
45
46
|
},
|
|
46
47
|
renderers: {
|
|
47
|
-
notification: (
|
|
48
|
+
notification: (u = e.renderers) == null ? void 0 : u.notification
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ o(l, { children: [
|
|
51
52
|
/* @__PURE__ */ i(
|
|
52
|
-
|
|
53
|
+
W,
|
|
53
54
|
{
|
|
54
55
|
autoAdjustOverflow: !0,
|
|
55
56
|
trigger: "click",
|
|
56
|
-
content: /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
57
|
+
content: /* @__PURE__ */ o(l, { children: [
|
|
58
|
+
/* @__PURE__ */ i(
|
|
59
|
+
f,
|
|
60
|
+
{
|
|
61
|
+
maxHeight: t.popupHeight - 73,
|
|
62
|
+
pagination: t.pagination,
|
|
63
|
+
filter: t.filter,
|
|
64
|
+
imageShape: t.imageShape,
|
|
65
|
+
pageSize: t.pageSize,
|
|
66
|
+
pagePosition: t.pagePosition,
|
|
67
|
+
notificationRenderer: t.renderers.notification,
|
|
68
|
+
header: t.header
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
n.webPushOptInMessage && localStorage.getItem("hideWebPushOptInMessage") !== "true" && /* @__PURE__ */ o("div", { children: [
|
|
72
|
+
/* @__PURE__ */ i(P, { style: { margin: "10px 0" } }),
|
|
73
|
+
/* @__PURE__ */ i(S, { hideAfterInteraction: !0 })
|
|
74
|
+
] })
|
|
75
|
+
] }),
|
|
76
|
+
onOpenChange: (g) => {
|
|
77
|
+
g && n.markAsOpened();
|
|
71
78
|
},
|
|
72
79
|
arrow: !1,
|
|
73
80
|
overlayStyle: {
|
|
74
81
|
padding: "0 16px",
|
|
75
|
-
width:
|
|
82
|
+
width: t.popupWidth
|
|
76
83
|
},
|
|
77
|
-
zIndex:
|
|
84
|
+
zIndex: e.popupZIndex,
|
|
78
85
|
children: /* @__PURE__ */ i(
|
|
79
86
|
"div",
|
|
80
87
|
{
|
|
@@ -84,20 +91,20 @@ const F = (t) => {
|
|
|
84
91
|
children: /* @__PURE__ */ i(
|
|
85
92
|
m,
|
|
86
93
|
{
|
|
87
|
-
...
|
|
94
|
+
...e.unreadBadgeProps,
|
|
88
95
|
style: {
|
|
89
96
|
top: 5,
|
|
90
97
|
right: 5
|
|
91
98
|
},
|
|
92
|
-
count:
|
|
93
|
-
filter:
|
|
99
|
+
count: t.count,
|
|
100
|
+
filter: t.filter,
|
|
94
101
|
children: /* @__PURE__ */ i(
|
|
95
|
-
|
|
102
|
+
O,
|
|
96
103
|
{
|
|
97
|
-
icon:
|
|
104
|
+
icon: t.buttonIcon,
|
|
98
105
|
style: {
|
|
99
|
-
width:
|
|
100
|
-
height:
|
|
106
|
+
width: t.buttonWidth,
|
|
107
|
+
height: t.buttonHeight
|
|
101
108
|
},
|
|
102
109
|
shape: "circle",
|
|
103
110
|
type: "text"
|
|
@@ -110,14 +117,14 @@ const F = (t) => {
|
|
|
110
117
|
}
|
|
111
118
|
),
|
|
112
119
|
/* @__PURE__ */ i(
|
|
113
|
-
|
|
120
|
+
I,
|
|
114
121
|
{
|
|
115
|
-
open:
|
|
116
|
-
onClose: () =>
|
|
122
|
+
open: h,
|
|
123
|
+
onClose: () => r(!1)
|
|
117
124
|
}
|
|
118
125
|
)
|
|
119
126
|
] });
|
|
120
127
|
};
|
|
121
128
|
export {
|
|
122
|
-
|
|
129
|
+
T as NotificationPopup
|
|
123
130
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
type NotificationPreferencesInlineProps = object;
|
|
2
|
-
export declare function NotificationPreferencesInline(props: NotificationPreferencesInlineProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function NotificationPreferencesInline(props: NotificationPreferencesInlineProps): import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export {};
|
|
@@ -1,8 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Preferences as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsxs as n, Fragment as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Preferences as i } from "./Preferences.js";
|
|
3
|
+
import { W as o } from "../../assets/WebPushOptInMessage.js";
|
|
4
|
+
import { useContext as s } from "react";
|
|
5
|
+
import { NotificationAPIContext as f } from "../Provider/index.js";
|
|
6
|
+
import { D as a } from "../../assets/PreferenceInput.js";
|
|
7
|
+
function I(m) {
|
|
8
|
+
const e = s(f);
|
|
9
|
+
return e ? /* @__PURE__ */ n(r, { children: [
|
|
10
|
+
/* @__PURE__ */ t(i, {}),
|
|
11
|
+
" ",
|
|
12
|
+
e.webPushOptInMessage && /* @__PURE__ */ n("div", { children: [
|
|
13
|
+
/* @__PURE__ */ t(a, { style: { margin: "10px 0" } }),
|
|
14
|
+
/* @__PURE__ */ t(
|
|
15
|
+
o,
|
|
16
|
+
{
|
|
17
|
+
hideAfterInteraction: !1,
|
|
18
|
+
descriptionStyle: {
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
// Stack the elements vertically
|
|
21
|
+
justifyContent: "flex-start",
|
|
22
|
+
// Align items to the left
|
|
23
|
+
fontSize: "14px",
|
|
24
|
+
alignItems: "flex-start"
|
|
25
|
+
// Align items to the left
|
|
26
|
+
},
|
|
27
|
+
buttonContainerStyle: {
|
|
28
|
+
justifyContent: "flex-start",
|
|
29
|
+
// Align buttons to the left
|
|
30
|
+
alignItems: "flex-start",
|
|
31
|
+
// Align buttons to the left
|
|
32
|
+
marginTop: "10px"
|
|
33
|
+
// Add some space between message and buttons
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] })
|
|
38
|
+
] }) : null;
|
|
5
39
|
}
|
|
6
40
|
export {
|
|
7
|
-
|
|
41
|
+
I as NotificationPreferencesInline
|
|
8
42
|
};
|
|
@@ -3,5 +3,5 @@ type NotificationPreferencesPopupProps = {
|
|
|
3
3
|
onClose?: () => void;
|
|
4
4
|
collapse?: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare function NotificationPreferencesPopup(props: NotificationPreferencesPopupProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function NotificationPreferencesPopup(props: NotificationPreferencesPopupProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
export {};
|