@notificationapi/react 1.4.1 → 1.5.0
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/Badge.js +1 -1
- package/dist/assets/Box.js +13 -13
- package/dist/assets/Button.js +781 -0
- package/dist/assets/ButtonBase.js +409 -622
- package/dist/assets/DefaultPropsProvider.js +220 -215
- package/dist/assets/Divider.js +105 -154
- package/dist/assets/Grow.js +201 -0
- package/dist/assets/IconButton.js +1 -1
- package/dist/assets/List.js +142 -0
- package/dist/assets/Modal.js +1094 -0
- package/dist/assets/Notification.js +71 -71
- package/dist/assets/Paper.js +1 -1
- package/dist/assets/Popover.js +8 -6
- package/dist/assets/Portal.js +2 -2
- package/dist/assets/Stack.js +216 -0
- package/dist/assets/Typography.js +193 -117
- package/dist/assets/WebPushOptInMessage.js +40 -814
- package/dist/assets/createSvgIcon.js +5 -5
- package/dist/assets/dividerClasses.js +56 -0
- package/dist/assets/index.js +151 -0
- package/dist/assets/useTheme2.js +253 -11
- package/dist/assets/utils.js +4 -4
- package/dist/components/Notifications/Inbox.js +2927 -9
- package/dist/components/Notifications/InboxHeader.js +2146 -7
- package/dist/components/Notifications/NotificationFeed.js +13 -13
- package/dist/components/Notifications/NotificationLauncher.js +2 -2
- package/dist/components/Notifications/NotificationPopup.js +7 -7
- package/dist/components/Preferences/NotificationPreferencesPopup.js +608 -7
- package/dist/components/Preferences/PreferenceInput.js +1451 -6
- package/dist/components/Preferences/Preferences.js +368 -515
- package/dist/components/Preferences/index.js +1 -1
- package/dist/components/Provider/index.js +226 -202
- package/dist/components/Slack/SlackConnect.d.ts +12 -0
- package/dist/components/Slack/SlackConnect.js +4826 -0
- package/dist/components/Slack/index.d.ts +1 -0
- package/dist/components/Slack/index.js +4 -0
- package/dist/components/WebPush/WebPushOptInMessage.js +3 -2
- package/dist/main.d.ts +1 -0
- package/dist/main.js +5 -3
- package/package.json +4 -4
- package/dist/assets/Inbox.js +0 -3061
- package/dist/assets/InboxHeader.js +0 -2338
- package/dist/assets/NotificationPreferencesPopup.js +0 -1694
- package/dist/assets/PreferenceInput.js +0 -1657
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
1
|
+
import { jsx as n, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useContext as m, useEffect as h } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Inbox as u } from "./Inbox.js";
|
|
4
4
|
import { NotificationAPIContext as p } from "../Provider/context.js";
|
|
5
|
-
import {
|
|
5
|
+
import { NotificationPreferencesPopup as x } from "../Preferences/NotificationPreferencesPopup.js";
|
|
6
6
|
import { Filter as S } from "./interface.js";
|
|
7
|
-
import { W as
|
|
8
|
-
import { c as
|
|
9
|
-
import { D as
|
|
10
|
-
const H =
|
|
7
|
+
import { W as b } from "../../assets/WebPushOptInMessage.js";
|
|
8
|
+
import { c as C } from "../../assets/createSvgIcon.js";
|
|
9
|
+
import { D as I } from "../../assets/Divider.js";
|
|
10
|
+
const H = C(/* @__PURE__ */ n("path", {
|
|
11
11
|
d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56M12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96M4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56m2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8M12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96M14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2m.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56M16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2z"
|
|
12
12
|
}), "Language"), N = (e) => {
|
|
13
|
-
var a, o, c,
|
|
13
|
+
var a, o, c, l;
|
|
14
14
|
const [f, r] = d(!1), i = m(p);
|
|
15
15
|
if (h(() => {
|
|
16
16
|
if (!i) return;
|
|
@@ -34,11 +34,11 @@ const H = b(/* @__PURE__ */ n("path", {
|
|
|
34
34
|
header: {
|
|
35
35
|
title: (o = e.header) == null ? void 0 : o.title,
|
|
36
36
|
button1ClickHandler: ((c = e.header) == null ? void 0 : c.button1ClickHandler) ?? i.markAsArchived,
|
|
37
|
-
button2ClickHandler: ((
|
|
37
|
+
button2ClickHandler: ((l = e.header) == null ? void 0 : l.button2ClickHandler) ?? (() => r(!0))
|
|
38
38
|
},
|
|
39
39
|
imageShape: e.imageShape || "circle"
|
|
40
40
|
};
|
|
41
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ s(
|
|
42
42
|
"div",
|
|
43
43
|
{
|
|
44
44
|
style: {
|
|
@@ -63,10 +63,10 @@ const H = b(/* @__PURE__ */ n("path", {
|
|
|
63
63
|
imageShape: t.imageShape
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
|
-
i.webPushOptInMessage && localStorage.getItem("hideWebPushOptInMessage") !== "true" && /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */ n(
|
|
66
|
+
i.webPushOptInMessage && localStorage.getItem("hideWebPushOptInMessage") !== "true" && /* @__PURE__ */ s("div", { children: [
|
|
67
|
+
/* @__PURE__ */ n(I, { style: { margin: "10px 0" } }),
|
|
68
68
|
/* @__PURE__ */ n(
|
|
69
|
-
|
|
69
|
+
b,
|
|
70
70
|
{
|
|
71
71
|
hideAfterInteraction: !0,
|
|
72
72
|
icon: /* @__PURE__ */ n(H, { type: "text", style: { marginLeft: "9px" } }),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as o, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as c, useContext as C } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Inbox as S } from "./Inbox.js";
|
|
4
4
|
import { UnreadBadge as y } from "./UnreadBadge.js";
|
|
5
5
|
import { NotificationAPIContext as z } from "../Provider/context.js";
|
|
6
|
-
import { N } from "
|
|
6
|
+
import { NotificationPreferencesPopup as N } from "../Preferences/NotificationPreferencesPopup.js";
|
|
7
7
|
import { W as k, L as v } from "../../assets/WebPushOptInMessage.js";
|
|
8
8
|
import { N as A } from "../../assets/channelUtils.js";
|
|
9
9
|
import { I as H } from "../../assets/IconButton.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as o, jsxs as r, Fragment as C } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m, useContext as O } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Inbox as S } from "./Inbox.js";
|
|
4
4
|
import { UnreadBadge as x } from "./UnreadBadge.js";
|
|
5
|
-
import { NotificationAPIContext as
|
|
6
|
-
import {
|
|
5
|
+
import { NotificationAPIContext as v } from "../Provider/context.js";
|
|
6
|
+
import { NotificationPreferencesPopup as N } from "../Preferences/NotificationPreferencesPopup.js";
|
|
7
7
|
import { Filter as z } from "./interface.js";
|
|
8
8
|
import { W as y } from "../../assets/WebPushOptInMessage.js";
|
|
9
9
|
import { N as k } from "../../assets/channelUtils.js";
|
|
@@ -11,8 +11,8 @@ import { I as H } from "../../assets/IconButton.js";
|
|
|
11
11
|
import { P as A } from "../../assets/Popover.js";
|
|
12
12
|
import { D as B } from "../../assets/Divider.js";
|
|
13
13
|
const j = (e) => {
|
|
14
|
-
var c, d, u, h,
|
|
15
|
-
const [I, a] = m(!1), [n, l] = m(null), i = O(
|
|
14
|
+
var c, d, u, h, p, s, g, f;
|
|
15
|
+
const [I, a] = m(!1), [n, l] = m(null), i = O(v);
|
|
16
16
|
if (!i)
|
|
17
17
|
return null;
|
|
18
18
|
const t = {
|
|
@@ -51,7 +51,7 @@ const j = (e) => {
|
|
|
51
51
|
},
|
|
52
52
|
popoverPosition: {
|
|
53
53
|
anchorOrigin: {
|
|
54
|
-
vertical: ((
|
|
54
|
+
vertical: ((s = (p = e.popoverPosition) == null ? void 0 : p.anchorOrigin) == null ? void 0 : s.vertical) ?? "top",
|
|
55
55
|
horizontal: ((f = (g = e.popoverPosition) == null ? void 0 : g.anchorOrigin) == null ? void 0 : f.horizontal) ?? "left"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -123,7 +123,7 @@ const j = (e) => {
|
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
125
|
/* @__PURE__ */ o(
|
|
126
|
-
|
|
126
|
+
N,
|
|
127
127
|
{
|
|
128
128
|
open: I,
|
|
129
129
|
onClose: () => a(!1)
|