@novu/js 2.6.6 → 3.0.0-canary.1
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/cjs/{chunk-Z4XIR64I.js → chunk-ZA235BHP.js} +307 -280
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +14 -14
- package/dist/{esm/novu-DbpFmjhC.d.mts → cjs/novu-C2hAbM3b.d.ts} +20 -4
- package/dist/cjs/themes/index.d.ts +2 -2
- package/dist/cjs/themes/index.js +4 -3
- package/dist/cjs/types-CKkldJh0.d.ts +102 -0
- package/dist/cjs/ui/index.d.ts +22 -9
- package/dist/cjs/ui/index.js +1358 -842
- package/dist/esm/{chunk-JJC36NOH.mjs → chunk-X3JPDGPW.mjs} +307 -280
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/{cjs/novu-DbpFmjhC.d.ts → esm/novu-C2hAbM3b.d.mts} +20 -4
- package/dist/esm/themes/index.d.mts +2 -2
- package/dist/esm/themes/index.mjs +4 -3
- package/dist/esm/types-Bi5NkU2g.d.mts +102 -0
- package/dist/esm/ui/index.d.mts +22 -9
- package/dist/esm/ui/index.mjs +1357 -841
- package/dist/index.css +1 -1
- package/dist/novu.min.js +10 -10
- package/dist/novu.min.js.gz +0 -0
- package/package.json +6 -6
- package/dist/cjs/types-B8jOWXQS.d.ts +0 -98
- package/dist/esm/types-DVZXB5KI.d.mts +0 -98
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NotificationFilter } from './novu-
|
|
2
|
-
export { k as Action, A as ActionTypeEnum, m as ChannelPreference, f as ChannelType, C as CtaType, E as EventHandler, a as Events, F as FiltersCountResponse, q as IPreferenceOverride, I as InboxNotification, L as ListNotificationsResponse, i as MessageAction, M as MessageButton, u as Notification, e as NotificationActionStatus, d as NotificationButton, c as NotificationStatus, b as Novu, w as NovuError, s as NovuOptions, n as PaginatedResponse, v as Preference, P as PreferenceLevel, g as PreferenceOverrideSource, p as PreferenceOverrideSourceEnum, o as PreferencesResponse, t as Prettify, R as Redirect, r as Result, h as Session, S as SocketEventNames, j as Subscriber, T as TODO, W as WebSocketEvent, l as Workflow } from './novu-
|
|
1
|
+
import { N as NotificationFilter } from './novu-C2hAbM3b.js';
|
|
2
|
+
export { k as Action, A as ActionTypeEnum, m as ChannelPreference, f as ChannelType, C as CtaType, E as EventHandler, a as Events, F as FiltersCountResponse, q as IPreferenceOverride, I as InboxNotification, L as ListNotificationsResponse, i as MessageAction, M as MessageButton, u as Notification, e as NotificationActionStatus, d as NotificationButton, c as NotificationStatus, b as Novu, w as NovuError, s as NovuOptions, n as PaginatedResponse, v as Preference, P as PreferenceLevel, g as PreferenceOverrideSource, p as PreferenceOverrideSourceEnum, o as PreferencesResponse, t as Prettify, R as Redirect, r as Result, h as Session, S as SocketEventNames, j as Subscriber, T as TODO, W as WebSocketEvent, l as Workflow } from './novu-C2hAbM3b.js';
|
|
3
3
|
|
|
4
4
|
declare const areTagsEqual: (tags1?: string[], tags2?: string[]) => boolean;
|
|
5
5
|
declare const isSameFilter: (filter1: NotificationFilter, filter2: NotificationFilter) => boolean;
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkZA235BHP_js = require('./chunk-ZA235BHP.js');
|
|
4
4
|
require('./chunk-7B52C2XE.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "ActionTypeEnum", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkZA235BHP_js.ActionTypeEnum; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "ChannelType", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkZA235BHP_js.ChannelType; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "CtaType", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkZA235BHP_js.CtaType; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "NotificationActionStatus", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkZA235BHP_js.NotificationActionStatus; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "NotificationButton", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkZA235BHP_js.NotificationButton; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "NotificationStatus", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkZA235BHP_js.NotificationStatus; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "Novu", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkZA235BHP_js.Novu; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "PreferenceLevel", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkZA235BHP_js.PreferenceLevel; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "PreferenceOverrideSource", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkZA235BHP_js.PreferenceOverrideSource; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "PreferenceOverrideSourceEnum", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkZA235BHP_js.PreferenceOverrideSourceEnum; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "WebSocketEvent", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkZA235BHP_js.WebSocketEvent; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "areTagsEqual", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkZA235BHP_js.areTagsEqual; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "isSameFilter", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkZA235BHP_js.isSameFilter; }
|
|
59
59
|
});
|
|
@@ -9,6 +9,7 @@ type ListPreferencesArgs = {
|
|
|
9
9
|
type UpdatePreferencesArgs = {
|
|
10
10
|
workflowId?: string;
|
|
11
11
|
channels: ChannelPreference;
|
|
12
|
+
/** @deprecated Use channels instead */
|
|
12
13
|
channelPreferences?: ChannelPreference;
|
|
13
14
|
preference?: {
|
|
14
15
|
level: PreferenceLevel;
|
|
@@ -44,7 +45,9 @@ declare class Preference {
|
|
|
44
45
|
cache: PreferencesCache;
|
|
45
46
|
useCache: boolean;
|
|
46
47
|
});
|
|
47
|
-
update({ channels,
|
|
48
|
+
update({ channels,
|
|
49
|
+
/** @deprecated Use channels instead */
|
|
50
|
+
channelPreferences, }: Prettify<Pick<UpdatePreferencesArgs, 'channels' | 'channelPreferences'>>): Result<Preference>;
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
declare enum NotificationStatus {
|
|
@@ -192,13 +195,12 @@ type NovuOptions = {
|
|
|
192
195
|
applicationIdentifier: string;
|
|
193
196
|
subscriberId: string;
|
|
194
197
|
subscriberHash?: string;
|
|
198
|
+
/** @deprecated Use apiUrl instead */
|
|
195
199
|
backendUrl?: string;
|
|
196
200
|
apiUrl?: string;
|
|
197
201
|
socketUrl?: string;
|
|
198
202
|
useCache?: boolean;
|
|
199
|
-
/**
|
|
200
|
-
* @internal Should be used internally
|
|
201
|
-
*/
|
|
203
|
+
/** @internal Should be used internally for testing purposes */
|
|
202
204
|
__userAgent?: string;
|
|
203
205
|
};
|
|
204
206
|
type Prettify<T> = {
|
|
@@ -538,10 +540,24 @@ declare class Preferences extends BaseModule {
|
|
|
538
540
|
list(args?: ListPreferencesArgs): Result<Preference[]>;
|
|
539
541
|
}
|
|
540
542
|
|
|
543
|
+
declare class Socket extends BaseModule {
|
|
544
|
+
#private;
|
|
545
|
+
constructor({ socketUrl, inboxServiceInstance, eventEmitterInstance, }: {
|
|
546
|
+
socketUrl?: string;
|
|
547
|
+
inboxServiceInstance: InboxService;
|
|
548
|
+
eventEmitterInstance: NovuEventEmitter;
|
|
549
|
+
});
|
|
550
|
+
protected onSessionSuccess({ token }: Session): void;
|
|
551
|
+
isSocketEvent(eventName: string): eventName is SocketEventNames;
|
|
552
|
+
connect(): Result<void>;
|
|
553
|
+
disconnect(): Result<void>;
|
|
554
|
+
}
|
|
555
|
+
|
|
541
556
|
declare class Novu implements Pick<NovuEventEmitter, 'on'> {
|
|
542
557
|
#private;
|
|
543
558
|
readonly notifications: Notifications;
|
|
544
559
|
readonly preferences: Preferences;
|
|
560
|
+
readonly socket: Socket;
|
|
545
561
|
on: <Key extends EventNames>(eventName: Key, listener: EventHandler<Events[Key]>) => () => void;
|
|
546
562
|
/**
|
|
547
563
|
* @deprecated
|
package/dist/cjs/themes/index.js
CHANGED
|
@@ -6,11 +6,12 @@ require('../chunk-7B52C2XE.js');
|
|
|
6
6
|
var dark = {
|
|
7
7
|
variables: {
|
|
8
8
|
colorNeutral: "white",
|
|
9
|
-
colorBackground: "#
|
|
9
|
+
colorBackground: "#1A1A1A",
|
|
10
10
|
colorForeground: "#EDEDEF",
|
|
11
|
-
colorSecondary: "#
|
|
11
|
+
colorSecondary: "#383838",
|
|
12
12
|
colorSecondaryForeground: "#EDEDEF",
|
|
13
|
-
colorShadow: "black"
|
|
13
|
+
colorShadow: "black",
|
|
14
|
+
colorRing: "#E1E4EA"
|
|
14
15
|
}
|
|
15
16
|
};
|
|
16
17
|
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { u as Notification, N as NotificationFilter, s as NovuOptions, b as Novu } from './novu-C2hAbM3b.js';
|
|
2
|
+
|
|
3
|
+
declare const appearanceKeys: readonly ["button", "icon", "popoverContent", "popoverTrigger", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeft__icon", "dropdownItemRight__icon", "dropdownItem__icon", "collapsible", "tooltipContent", "tooltipTrigger", "back__button", "skeletonText", "skeletonAvatar", "skeletonSwitch", "skeletonSwitchThumb", "tabsRoot", "tabsList", "tabsContent", "tabsTrigger", "dots", "root", "bellIcon", "bellContainer", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "inboxContent", "inbox__popoverTrigger", "inbox__popoverContent", "notificationListContainer", "notificationList", "notificationListEmptyNoticeContainer", "notificationListEmptyNoticeOverlay", "notificationListEmptyNoticeIcon", "notificationListEmptyNotice", "notificationList__skeleton", "notificationList__skeletonContent", "notificationList__skeletonItem", "notificationList__skeletonAvatar", "notificationList__skeletonText", "notificationListNewNotificationsNotice__button", "notification", "notificationContent", "notificationTextContainer", "notificationDot", "notificationSubject", "notificationSubject__strong", "notificationBody", "notificationBody__strong", "notificationBodyContainer", "notificationImage", "notificationImageLoadingFallback", "notificationDate", "notificationDateActionsContainer", "notificationDefaultActions", "notificationCustomActions", "notificationPrimaryAction__button", "notificationSecondaryAction__button", "notificationRead__button", "notificationUnread__button", "notificationArchive__button", "notificationUnarchive__button", "notificationRead__icon", "notificationUnread__icon", "notificationArchive__icon", "notificationUnarchive__icon", "notificationsTabs__tabsRoot", "notificationsTabs__tabsList", "notificationsTabs__tabsContent", "notificationsTabs__tabsTrigger", "notificationsTabsTriggerLabel", "notificationsTabsTriggerCount", "inboxStatus__title", "inboxStatus__dropdownTrigger", "inboxStatus__dropdownContent", "inboxStatus__dropdownItem", "inboxStatus__dropdownItemLabel", "inboxStatus__dropdownItemLabelContainer", "inboxStatus__dropdownItemLeft__icon", "inboxStatus__dropdownItemRight__icon", "inboxStatus__dropdownItem__icon", "inboxStatus__dropdownItemCheck__icon", "moreActionsContainer", "moreActions__dropdownTrigger", "moreActions__dropdownContent", "moreActions__dropdownItem", "moreActions__dropdownItemLabel", "moreActions__dropdownItemLeft__icon", "moreActions__dots", "moreTabs__button", "moreTabs__icon", "moreTabs__dropdownTrigger", "moreTabs__dropdownContent", "moreTabs__dropdownItem", "moreTabs__dropdownItemLabel", "moreTabs__dropdownItemRight__icon", "workflowContainer", "workflowLabel", "workflowLabelHeader", "workflowLabelContainer", "workflowContainerDisabledNotice", "workflowLabelDisabled__icon", "workflowContainerRight__icon", "workflowArrow__icon", "workflowDescription", "channelContainer", "channelIconContainer", "channel__icon", "channelsContainerCollapsible", "channelsContainer", "channelLabel", "channelLabelContainer", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__back__button__icon", "preferencesHeader__title", "preferencesHeader__icon", "preferencesListEmptyNoticeContainer", "preferencesListEmptyNotice", "preferencesList__skeleton", "preferencesList__skeletonContent", "preferencesList__skeletonItem", "preferencesList__skeletonIcon", "preferencesList__skeletonSwitch", "preferencesList__skeletonSwitchThumb", "preferencesList__skeletonText", "strong"];
|
|
4
|
+
|
|
5
|
+
declare const defaultLocalization: {
|
|
6
|
+
readonly locale: "en-US";
|
|
7
|
+
readonly 'inbox.filters.dropdownOptions.unread': "Unread only";
|
|
8
|
+
readonly 'inbox.filters.dropdownOptions.default': "Unread & read";
|
|
9
|
+
readonly 'inbox.filters.dropdownOptions.archived': "Archived";
|
|
10
|
+
readonly 'inbox.filters.labels.unread': "Unread";
|
|
11
|
+
readonly 'inbox.filters.labels.default': "Inbox";
|
|
12
|
+
readonly 'inbox.filters.labels.archived': "Archived";
|
|
13
|
+
readonly 'notifications.emptyNotice': "Quiet for now. Check back later.";
|
|
14
|
+
readonly 'notifications.actions.readAll': "Mark all as read";
|
|
15
|
+
readonly 'notifications.actions.archiveAll': "Archive all";
|
|
16
|
+
readonly 'notifications.actions.archiveRead': "Archive read";
|
|
17
|
+
readonly 'notifications.newNotifications': ({ notificationCount }: {
|
|
18
|
+
notificationCount: number;
|
|
19
|
+
}) => string;
|
|
20
|
+
readonly 'notification.actions.read.tooltip': "Mark as read";
|
|
21
|
+
readonly 'notification.actions.unread.tooltip': "Mark as unread";
|
|
22
|
+
readonly 'notification.actions.archive.tooltip': "Archive";
|
|
23
|
+
readonly 'notification.actions.unarchive.tooltip': "Unarchive";
|
|
24
|
+
readonly 'preferences.title': "Preferences";
|
|
25
|
+
readonly 'preferences.emptyNotice': "No notification specific preferences yet.";
|
|
26
|
+
readonly 'preferences.global': "Global Preferences";
|
|
27
|
+
readonly 'preferences.workflow.disabled.notice': "Contact admin to enable subscription management for this critical notification.";
|
|
28
|
+
readonly 'preferences.workflow.disabled.tooltip': "Contact admin to edit";
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
type LocalizationKey = keyof typeof defaultLocalization;
|
|
32
|
+
type Localization = {
|
|
33
|
+
[K in LocalizationKey]?: (typeof defaultLocalization)[K] extends (...args: infer P) => any ? ((...args: P) => ReturnType<(typeof defaultLocalization)[K]>) | string : string;
|
|
34
|
+
} & {
|
|
35
|
+
dynamic?: Record<string, string>;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type NotificationClickHandler = (notification: Notification) => void;
|
|
39
|
+
type NotificationActionClickHandler = (notification: Notification) => void;
|
|
40
|
+
type NotificationRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
41
|
+
type SubjectRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
42
|
+
type BodyRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
43
|
+
type BellRenderer = (el: HTMLDivElement, unreadCount: number) => () => void;
|
|
44
|
+
type RouterPush = (path: string) => void;
|
|
45
|
+
type Tab = {
|
|
46
|
+
label: string;
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Use `filter` instead
|
|
49
|
+
*/
|
|
50
|
+
value?: Array<string>;
|
|
51
|
+
filter?: Pick<NotificationFilter, 'tags'>;
|
|
52
|
+
};
|
|
53
|
+
type CSSProperties = {
|
|
54
|
+
[key: string]: string | number;
|
|
55
|
+
};
|
|
56
|
+
type ElementStyles = string | CSSProperties;
|
|
57
|
+
type Variables = {
|
|
58
|
+
colorBackground?: string;
|
|
59
|
+
colorForeground?: string;
|
|
60
|
+
colorPrimary?: string;
|
|
61
|
+
colorPrimaryForeground?: string;
|
|
62
|
+
colorSecondary?: string;
|
|
63
|
+
colorSecondaryForeground?: string;
|
|
64
|
+
colorCounter?: string;
|
|
65
|
+
colorCounterForeground?: string;
|
|
66
|
+
colorNeutral?: string;
|
|
67
|
+
colorShadow?: string;
|
|
68
|
+
colorRing?: string;
|
|
69
|
+
fontSize?: string;
|
|
70
|
+
borderRadius?: string;
|
|
71
|
+
};
|
|
72
|
+
type AppearanceKey = (typeof appearanceKeys)[number];
|
|
73
|
+
type Elements = Partial<Record<AppearanceKey, ElementStyles>>;
|
|
74
|
+
type Theme = {
|
|
75
|
+
variables?: Variables;
|
|
76
|
+
elements?: Elements;
|
|
77
|
+
animations?: boolean;
|
|
78
|
+
};
|
|
79
|
+
type Appearance = Theme & {
|
|
80
|
+
baseTheme?: Theme | Theme[];
|
|
81
|
+
};
|
|
82
|
+
type BaseNovuProviderProps = {
|
|
83
|
+
appearance?: Appearance;
|
|
84
|
+
localization?: Localization;
|
|
85
|
+
options: NovuOptions;
|
|
86
|
+
tabs?: Array<Tab>;
|
|
87
|
+
preferencesFilter?: PreferencesFilter;
|
|
88
|
+
routerPush?: RouterPush;
|
|
89
|
+
novu?: Novu;
|
|
90
|
+
};
|
|
91
|
+
type NovuProviderProps = BaseNovuProviderProps & {
|
|
92
|
+
renderNotification?: NotificationRenderer;
|
|
93
|
+
renderBell?: BellRenderer;
|
|
94
|
+
};
|
|
95
|
+
declare enum NotificationStatus {
|
|
96
|
+
UNREAD_READ = "unreadRead",
|
|
97
|
+
UNREAD = "unread",
|
|
98
|
+
ARCHIVED = "archived"
|
|
99
|
+
}
|
|
100
|
+
type PreferencesFilter = Pick<NotificationFilter, 'tags'>;
|
|
101
|
+
|
|
102
|
+
export { type Appearance as A, type BellRenderer as B, type CSSProperties as C, type ElementStyles as E, type Localization as L, type NotificationClickHandler as N, type PreferencesFilter as P, type RouterPush as R, type SubjectRenderer as S, type Tab as T, type Variables as V, type NotificationActionClickHandler as a, type NotificationRenderer as b, type BodyRenderer as c, type NovuProviderProps as d, type BaseNovuProviderProps as e, type AppearanceKey as f, type Elements as g, type Theme as h, NotificationStatus as i, type LocalizationKey as j };
|
package/dist/cjs/ui/index.d.ts
CHANGED
|
@@ -1,34 +1,47 @@
|
|
|
1
|
-
import { s as NovuOptions } from '../novu-
|
|
2
|
-
export { u as Notification } from '../novu-
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
1
|
+
import { s as NovuOptions } from '../novu-C2hAbM3b.js';
|
|
2
|
+
export { u as Notification } from '../novu-C2hAbM3b.js';
|
|
3
|
+
import { B as BellRenderer, N as NotificationClickHandler, a as NotificationActionClickHandler, b as NotificationRenderer, S as SubjectRenderer, c as BodyRenderer, d as NovuProviderProps, e as BaseNovuProviderProps, A as Appearance, L as Localization, T as Tab, P as PreferencesFilter, R as RouterPush } from '../types-CKkldJh0.js';
|
|
4
|
+
export { f as AppearanceKey, C as CSSProperties, E as ElementStyles, g as Elements, j as LocalizationKey, i as NotificationStatus, h as Theme, V as Variables } from '../types-CKkldJh0.js';
|
|
5
5
|
import { Placement, OffsetOptions } from '@floating-ui/dom';
|
|
6
6
|
import * as solid_js from 'solid-js';
|
|
7
7
|
import { ComponentProps } from 'solid-js';
|
|
8
8
|
import { MountableElement } from 'solid-js/web';
|
|
9
9
|
|
|
10
|
+
type NotificationRendererProps = {
|
|
11
|
+
renderNotification: NotificationRenderer;
|
|
12
|
+
renderSubject?: never;
|
|
13
|
+
renderBody?: never;
|
|
14
|
+
};
|
|
15
|
+
type SubjectBodyRendererProps = {
|
|
16
|
+
renderNotification?: never;
|
|
17
|
+
renderSubject?: SubjectRenderer;
|
|
18
|
+
renderBody?: BodyRenderer;
|
|
19
|
+
};
|
|
20
|
+
type NoRendererProps = {
|
|
21
|
+
renderNotification?: undefined;
|
|
22
|
+
renderSubject?: undefined;
|
|
23
|
+
renderBody?: undefined;
|
|
24
|
+
};
|
|
10
25
|
type InboxProps = {
|
|
11
26
|
open?: boolean;
|
|
12
|
-
renderNotification?: NotificationRenderer;
|
|
13
27
|
renderBell?: BellRenderer;
|
|
14
28
|
onNotificationClick?: NotificationClickHandler;
|
|
15
29
|
onPrimaryActionClick?: NotificationActionClickHandler;
|
|
16
30
|
onSecondaryActionClick?: NotificationActionClickHandler;
|
|
17
31
|
placement?: Placement;
|
|
18
32
|
placementOffset?: OffsetOptions;
|
|
19
|
-
};
|
|
33
|
+
} & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
|
|
20
34
|
declare enum InboxPage {
|
|
21
35
|
Notifications = "notifications",
|
|
22
36
|
Preferences = "preferences"
|
|
23
37
|
}
|
|
24
38
|
type InboxContentProps = {
|
|
25
|
-
renderNotification?: NotificationRenderer;
|
|
26
39
|
onNotificationClick?: NotificationClickHandler;
|
|
27
40
|
onPrimaryActionClick?: NotificationActionClickHandler;
|
|
28
41
|
onSecondaryActionClick?: NotificationActionClickHandler;
|
|
29
42
|
initialPage?: InboxPage;
|
|
30
43
|
hideNav?: boolean;
|
|
31
|
-
};
|
|
44
|
+
} & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
|
|
32
45
|
|
|
33
46
|
declare const novuComponents: {
|
|
34
47
|
Inbox: (props: InboxProps) => solid_js.JSX.Element;
|
|
@@ -62,4 +75,4 @@ declare class NovuUI {
|
|
|
62
75
|
unmount(): void;
|
|
63
76
|
}
|
|
64
77
|
|
|
65
|
-
export { Appearance, BaseNovuProviderProps, type BaseNovuUIOptions, BellRenderer, InboxPage, type InboxProps, Localization, NotificationActionClickHandler, NotificationClickHandler, NotificationRenderer, NovuProviderProps, NovuUI, type NovuUIOptions, PreferencesFilter, RouterPush, Tab };
|
|
78
|
+
export { Appearance, BaseNovuProviderProps, type BaseNovuUIOptions, BellRenderer, BodyRenderer, InboxPage, type InboxProps, Localization, NotificationActionClickHandler, NotificationClickHandler, NotificationRenderer, NovuProviderProps, NovuUI, type NovuUIOptions, PreferencesFilter, RouterPush, SubjectRenderer, Tab };
|