@novu/react 2.1.2 → 2.3.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/client/index.d.mts +25 -6
- package/dist/client/index.d.ts +25 -6
- package/dist/client/index.js +232 -155
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +231 -154
- package/dist/client/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +3 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/server/server.d.mts +5 -1
- package/dist/server/server.d.ts +5 -1
- package/dist/server/server.js +1 -1
- package/dist/server/server.js.map +1 -1
- package/dist/server/server.mjs +1 -1
- package/dist/server/server.mjs.map +1 -1
- package/dist/themes/index.d.mts +1 -0
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/index.js +21 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/index.mjs +3 -0
- package/dist/themes/index.mjs.map +1 -0
- package/package.json +18 -5
- package/themes/package.json +5 -0
package/dist/client/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import React$1, { ReactNode } from 'react';
|
|
3
|
-
import { Notification, NotificationClickHandler, NotificationActionClickHandler, Appearance, Localization, Tab, RouterPush } from '@novu/js/ui';
|
|
2
|
+
import { Notification, NotificationClickHandler, NotificationActionClickHandler, Appearance, Localization, Tab, PreferencesFilter, RouterPush, InboxPage } from '@novu/js/ui';
|
|
4
3
|
export { Notification } from '@novu/js/ui';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { Novu, NovuOptions, Notification as Notification$1, NovuError, Preference, NotificationFilter } from '@novu/js';
|
|
6
6
|
|
|
7
7
|
type NotificationsRenderer = (notification: Notification) => React.ReactNode;
|
|
@@ -23,6 +23,7 @@ type BaseProps = {
|
|
|
23
23
|
appearance?: Appearance;
|
|
24
24
|
localization?: Localization;
|
|
25
25
|
tabs?: Array<Tab>;
|
|
26
|
+
preferencesFilter?: PreferencesFilter;
|
|
26
27
|
routerPush?: RouterPush;
|
|
27
28
|
};
|
|
28
29
|
type DefaultProps = BaseProps & DefaultInboxProps & {
|
|
@@ -35,11 +36,12 @@ type WithChildrenProps = BaseProps & {
|
|
|
35
36
|
type BellProps = {
|
|
36
37
|
renderBell?: BellRenderer;
|
|
37
38
|
};
|
|
38
|
-
declare const Bell: React$1.
|
|
39
|
+
declare const Bell: React$1.ComponentType<BellProps & {
|
|
40
|
+
children?: React$1.ReactNode | undefined;
|
|
41
|
+
}>;
|
|
39
42
|
|
|
40
43
|
type InboxProps = DefaultProps | WithChildrenProps;
|
|
41
44
|
declare const Inbox: React$1.MemoExoticComponent<(props: InboxProps) => react_jsx_runtime.JSX.Element>;
|
|
42
|
-
declare const InboxChild: React$1.MemoExoticComponent<(props: InboxProps) => react_jsx_runtime.JSX.Element>;
|
|
43
45
|
|
|
44
46
|
declare const Preferences: () => react_jsx_runtime.JSX.Element;
|
|
45
47
|
|
|
@@ -49,7 +51,21 @@ type NotificationProps = {
|
|
|
49
51
|
onPrimaryActionClick?: NotificationActionClickHandler;
|
|
50
52
|
onSecondaryActionClick?: NotificationActionClickHandler;
|
|
51
53
|
};
|
|
52
|
-
declare const Notifications: React$1.
|
|
54
|
+
declare const Notifications: React$1.ComponentType<NotificationProps & {
|
|
55
|
+
children?: React$1.ReactNode | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
|
|
58
|
+
type InboxContentProps = {
|
|
59
|
+
renderNotification?: NotificationsRenderer;
|
|
60
|
+
onNotificationClick?: NotificationClickHandler;
|
|
61
|
+
onPrimaryActionClick?: NotificationActionClickHandler;
|
|
62
|
+
onSecondaryActionClick?: NotificationActionClickHandler;
|
|
63
|
+
initialPage?: InboxPage;
|
|
64
|
+
hideNav?: boolean;
|
|
65
|
+
};
|
|
66
|
+
declare const InboxContent: React$1.ComponentType<InboxContentProps & {
|
|
67
|
+
children?: React$1.ReactNode | undefined;
|
|
68
|
+
}>;
|
|
53
69
|
|
|
54
70
|
type NovuProviderProps = NovuOptions & {
|
|
55
71
|
children: ReactNode;
|
|
@@ -89,6 +105,9 @@ declare const useNotifications: (props?: UseNotificationsProps) => {
|
|
|
89
105
|
};
|
|
90
106
|
|
|
91
107
|
type UsePreferencesProps = {
|
|
108
|
+
filter?: {
|
|
109
|
+
tags?: string[];
|
|
110
|
+
};
|
|
92
111
|
onSuccess?: (data: Preference[]) => void;
|
|
93
112
|
onError?: (error: NovuError) => void;
|
|
94
113
|
};
|
|
@@ -119,4 +138,4 @@ type UseCountsResult = {
|
|
|
119
138
|
};
|
|
120
139
|
declare const useCounts: (props: UseCountsProps) => UseCountsResult;
|
|
121
140
|
|
|
122
|
-
export { type BaseProps, Bell, type BellProps, type BellRenderer, type DefaultInboxProps, type DefaultProps, Inbox,
|
|
141
|
+
export { type BaseProps, Bell, type BellProps, type BellRenderer, type DefaultInboxProps, type DefaultProps, Inbox, InboxContent, type InboxContentProps, type InboxProps, type NotificationProps, Notifications, type NotificationsRenderer, NovuProvider, Preferences, type UseNotificationsProps, type WithChildrenProps, useCounts, useNotifications, useNovu, usePreferences, useUnsafeNovu };
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import React$1, { ReactNode } from 'react';
|
|
3
|
-
import { Notification, NotificationClickHandler, NotificationActionClickHandler, Appearance, Localization, Tab, RouterPush } from '@novu/js/ui';
|
|
2
|
+
import { Notification, NotificationClickHandler, NotificationActionClickHandler, Appearance, Localization, Tab, PreferencesFilter, RouterPush, InboxPage } from '@novu/js/ui';
|
|
4
3
|
export { Notification } from '@novu/js/ui';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { Novu, NovuOptions, Notification as Notification$1, NovuError, Preference, NotificationFilter } from '@novu/js';
|
|
6
6
|
|
|
7
7
|
type NotificationsRenderer = (notification: Notification) => React.ReactNode;
|
|
@@ -23,6 +23,7 @@ type BaseProps = {
|
|
|
23
23
|
appearance?: Appearance;
|
|
24
24
|
localization?: Localization;
|
|
25
25
|
tabs?: Array<Tab>;
|
|
26
|
+
preferencesFilter?: PreferencesFilter;
|
|
26
27
|
routerPush?: RouterPush;
|
|
27
28
|
};
|
|
28
29
|
type DefaultProps = BaseProps & DefaultInboxProps & {
|
|
@@ -35,11 +36,12 @@ type WithChildrenProps = BaseProps & {
|
|
|
35
36
|
type BellProps = {
|
|
36
37
|
renderBell?: BellRenderer;
|
|
37
38
|
};
|
|
38
|
-
declare const Bell: React$1.
|
|
39
|
+
declare const Bell: React$1.ComponentType<BellProps & {
|
|
40
|
+
children?: React$1.ReactNode | undefined;
|
|
41
|
+
}>;
|
|
39
42
|
|
|
40
43
|
type InboxProps = DefaultProps | WithChildrenProps;
|
|
41
44
|
declare const Inbox: React$1.MemoExoticComponent<(props: InboxProps) => react_jsx_runtime.JSX.Element>;
|
|
42
|
-
declare const InboxChild: React$1.MemoExoticComponent<(props: InboxProps) => react_jsx_runtime.JSX.Element>;
|
|
43
45
|
|
|
44
46
|
declare const Preferences: () => react_jsx_runtime.JSX.Element;
|
|
45
47
|
|
|
@@ -49,7 +51,21 @@ type NotificationProps = {
|
|
|
49
51
|
onPrimaryActionClick?: NotificationActionClickHandler;
|
|
50
52
|
onSecondaryActionClick?: NotificationActionClickHandler;
|
|
51
53
|
};
|
|
52
|
-
declare const Notifications: React$1.
|
|
54
|
+
declare const Notifications: React$1.ComponentType<NotificationProps & {
|
|
55
|
+
children?: React$1.ReactNode | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
|
|
58
|
+
type InboxContentProps = {
|
|
59
|
+
renderNotification?: NotificationsRenderer;
|
|
60
|
+
onNotificationClick?: NotificationClickHandler;
|
|
61
|
+
onPrimaryActionClick?: NotificationActionClickHandler;
|
|
62
|
+
onSecondaryActionClick?: NotificationActionClickHandler;
|
|
63
|
+
initialPage?: InboxPage;
|
|
64
|
+
hideNav?: boolean;
|
|
65
|
+
};
|
|
66
|
+
declare const InboxContent: React$1.ComponentType<InboxContentProps & {
|
|
67
|
+
children?: React$1.ReactNode | undefined;
|
|
68
|
+
}>;
|
|
53
69
|
|
|
54
70
|
type NovuProviderProps = NovuOptions & {
|
|
55
71
|
children: ReactNode;
|
|
@@ -89,6 +105,9 @@ declare const useNotifications: (props?: UseNotificationsProps) => {
|
|
|
89
105
|
};
|
|
90
106
|
|
|
91
107
|
type UsePreferencesProps = {
|
|
108
|
+
filter?: {
|
|
109
|
+
tags?: string[];
|
|
110
|
+
};
|
|
92
111
|
onSuccess?: (data: Preference[]) => void;
|
|
93
112
|
onError?: (error: NovuError) => void;
|
|
94
113
|
};
|
|
@@ -119,4 +138,4 @@ type UseCountsResult = {
|
|
|
119
138
|
};
|
|
120
139
|
declare const useCounts: (props: UseCountsProps) => UseCountsResult;
|
|
121
140
|
|
|
122
|
-
export { type BaseProps, Bell, type BellProps, type BellRenderer, type DefaultInboxProps, type DefaultProps, Inbox,
|
|
141
|
+
export { type BaseProps, Bell, type BellProps, type BellRenderer, type DefaultInboxProps, type DefaultProps, Inbox, InboxContent, type InboxContentProps, type InboxProps, type NotificationProps, Notifications, type NotificationsRenderer, NovuProvider, Preferences, type UseNotificationsProps, type WithChildrenProps, useCounts, useNotifications, useNovu, usePreferences, useUnsafeNovu };
|