@notificationapi/react 0.0.9 → 0.0.11
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/BellOutlined.js +18 -15
- package/dist/assets/Inbox.js +2376 -2270
- package/dist/assets/Notification.js +1967 -1342
- package/dist/assets/Preferences.js +828 -782
- package/dist/assets/PurePanel.js +24 -23
- package/dist/assets/button.js +275 -265
- package/dist/assets/colors.js +19298 -7652
- package/dist/assets/index.js +48 -47
- package/dist/assets/index2.js +94 -92
- package/dist/assets/index3.js +2990 -2647
- package/dist/components/Notifications/Inbox.d.ts +0 -1
- package/dist/components/Notifications/InboxHeader.d.ts +2 -3
- package/dist/components/Notifications/InboxHeader.js +14 -13
- package/dist/components/Notifications/Notification.d.ts +3 -3
- package/dist/components/Notifications/NotificationCounter.d.ts +1 -1
- package/dist/components/Notifications/NotificationFeed.d.ts +2 -2
- package/dist/components/Notifications/NotificationLauncher.d.ts +0 -1
- package/dist/components/Notifications/NotificationPopup.d.ts +2 -2
- package/dist/components/Notifications/UnreadBadge.d.ts +1 -1
- package/dist/components/Notifications/UnreadBadge.js +1 -1
- package/dist/components/Preferences/NotificationPreferencesInline.d.ts +2 -3
- package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +3 -3
- package/dist/components/Preferences/NotificationPreferencesPopup.js +684 -647
- package/dist/components/Preferences/PreferenceInput.d.ts +10 -0
- package/dist/components/Preferences/{PreferenceGroup.js → PreferenceInput.js} +2 -3
- package/dist/components/Preferences/Preferences.d.ts +1 -2
- package/dist/components/Preferences/Preferences.js +4 -5
- package/dist/components/Provider/index.d.ts +4 -22
- package/dist/components/Provider/index.js +139 -117
- package/dist/interface.d.ts +19 -0
- package/dist/interface.js +1 -0
- package/package.json +1 -1
- package/dist/components/Preferences/PreferenceGroup.d.ts +0 -8
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { I as
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
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
6
|
import * as n from "react";
|
|
7
|
-
var
|
|
8
|
-
return /* @__PURE__ */ n.createElement(
|
|
9
|
-
ref:
|
|
10
|
-
icon:
|
|
7
|
+
var p = { 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" }, u = function(o, r) {
|
|
8
|
+
return /* @__PURE__ */ n.createElement(s, m({}, o, {
|
|
9
|
+
ref: r,
|
|
10
|
+
icon: p
|
|
11
11
|
}));
|
|
12
|
-
},
|
|
13
|
-
|
|
12
|
+
}, i = /* @__PURE__ */ n.forwardRef(u);
|
|
13
|
+
process.env.NODE_ENV !== "production" && (i.displayName = "SettingOutlined");
|
|
14
|
+
const R = (t) => /* @__PURE__ */ l(
|
|
14
15
|
"div",
|
|
15
16
|
{
|
|
16
17
|
style: {
|
|
@@ -19,23 +20,23 @@ const R = (l) => /* @__PURE__ */ t(
|
|
|
19
20
|
paddingRight: 5
|
|
20
21
|
},
|
|
21
22
|
children: [
|
|
22
|
-
/* @__PURE__ */ e(
|
|
23
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ e(d.Text, { strong: !0, children: "Notifications" }),
|
|
24
|
+
/* @__PURE__ */ l("div", { children: [
|
|
24
25
|
/* @__PURE__ */ e(c, { content: "Resolve all", children: /* @__PURE__ */ e(
|
|
25
26
|
a,
|
|
26
27
|
{
|
|
27
|
-
icon: /* @__PURE__ */ e(
|
|
28
|
+
icon: /* @__PURE__ */ e(f, {}),
|
|
28
29
|
size: "small",
|
|
29
30
|
type: "text",
|
|
30
31
|
onClick: () => {
|
|
31
|
-
|
|
32
|
+
t.markAsArchived("ALL");
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
) }),
|
|
35
36
|
/* @__PURE__ */ e(c, { content: "Notification Preferences", children: /* @__PURE__ */ e(
|
|
36
37
|
a,
|
|
37
38
|
{
|
|
38
|
-
icon: /* @__PURE__ */ e(
|
|
39
|
+
icon: /* @__PURE__ */ e(i, {}),
|
|
39
40
|
size: "small",
|
|
40
41
|
type: "text",
|
|
41
42
|
onClick: () => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InAppNotification } from '../../interface';
|
|
2
2
|
|
|
3
3
|
export declare enum ImageShape {
|
|
4
4
|
square = "square",
|
|
5
5
|
circle = "circle"
|
|
6
6
|
}
|
|
7
7
|
export declare const Notification: (props: {
|
|
8
|
-
notification:
|
|
8
|
+
notification: InAppNotification;
|
|
9
9
|
markAsArchived: (ids: string[] | "ALL") => void;
|
|
10
10
|
markAsClicked: (id: string) => void;
|
|
11
11
|
imageShape: keyof typeof ImageShape;
|
|
12
|
-
}) =>
|
|
12
|
+
}) => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Pagination } from './Inbox';
|
|
3
2
|
import { ImageShape } from './Notification';
|
|
4
3
|
import { Filter } from './NotificationPopup';
|
|
4
|
+
import { InAppNotification } from '../../interface';
|
|
5
5
|
|
|
6
6
|
export type NotificationFeedProps = {
|
|
7
7
|
imageShape?: keyof typeof ImageShape;
|
|
@@ -10,6 +10,6 @@ export type NotificationFeedProps = {
|
|
|
10
10
|
pagePosition?: "top" | "bottom";
|
|
11
11
|
infiniteScrollHeight?: number;
|
|
12
12
|
style?: React.CSSProperties;
|
|
13
|
-
filter?: keyof typeof Filter | ((n:
|
|
13
|
+
filter?: keyof typeof Filter | ((n: InAppNotification) => boolean);
|
|
14
14
|
};
|
|
15
15
|
export declare const NotificationFeed: React.FC<NotificationFeedProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { Pagination } from './Inbox';
|
|
3
2
|
import { UnreadBadgeProps } from './UnreadBadge';
|
|
4
3
|
import { ImageShape } from './Notification';
|
|
4
|
+
import { InAppNotification } from '../../interface';
|
|
5
5
|
|
|
6
6
|
export declare enum Filter {
|
|
7
7
|
ALL = "ALL",
|
|
@@ -20,6 +20,6 @@ export type NotificationPopupProps = {
|
|
|
20
20
|
style?: React.CSSProperties;
|
|
21
21
|
unreadBadgeProps?: UnreadBadgeProps;
|
|
22
22
|
count?: UnreadBadgeProps["count"];
|
|
23
|
-
filter?: keyof typeof Filter | ((n:
|
|
23
|
+
filter?: keyof typeof Filter | ((n: InAppNotification) => boolean);
|
|
24
24
|
};
|
|
25
25
|
export declare const NotificationPopup: React.FC<NotificationPopupProps>;
|
|
@@ -9,7 +9,7 @@ const d = (e) => {
|
|
|
9
9
|
I,
|
|
10
10
|
{
|
|
11
11
|
count: ((n) => e.count === "COUNT_UNOPENED_NOTIFICATIONS" || e.count === void 0 ? n.filter((t) => !t.opened && !t.seen).length : e.count === "COUNT_UNARCHIVED_NOTIFICATIONS" ? n.filter(
|
|
12
|
-
(t) => !t.archived && !t.clicked && !t.
|
|
12
|
+
(t) => !t.archived && !t.clicked && !t.replies && !t.actioned1 && !t.actioned2
|
|
13
13
|
).length : n.filter(e.count).length)((o == null ? void 0 : o.notifications) || []),
|
|
14
14
|
color: e.color,
|
|
15
15
|
overflowCount: e.overflowCount,
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare function NotificationPreferencesInline(props: React.HTMLAttributes<HTMLElement>): React.JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function NotificationPreferencesInline(props: React.HTMLAttributes<HTMLElement>): JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
3
2
|
type NotificationPreferencesPopupProps = {
|
|
4
3
|
open?: boolean;
|
|
5
4
|
onClose?: () => void;
|
|
5
|
+
collapse?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare function NotificationPreferencesPopup(props: NotificationPreferencesPopupProps):
|
|
7
|
+
export declare function NotificationPreferencesPopup(props: NotificationPreferencesPopupProps): JSX.Element;
|
|
8
8
|
export {};
|