@novu/js 2.2.1 → 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/cjs/chunk-7B52C2XE.js +70 -0
- package/dist/cjs/{chunk-HEC6BX2T.js → chunk-AALXN67T.js} +237 -304
- package/dist/cjs/index.js +15 -14
- package/dist/cjs/themes/index.d.ts +7 -0
- package/dist/cjs/themes/index.js +17 -0
- package/dist/cjs/types-yDke_w6U.d.ts +98 -0
- package/dist/cjs/ui/index.d.ts +6 -97
- package/dist/cjs/ui/index.js +161 -144
- package/dist/esm/{chunk-J3BKCO4X.mjs → chunk-QIWP6QB5.mjs} +2 -61
- package/dist/esm/chunk-STZMOEWR.mjs +61 -0
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/themes/index.d.mts +7 -0
- package/dist/esm/themes/index.mjs +15 -0
- package/dist/esm/types-xYLv4vWZ.d.mts +98 -0
- package/dist/esm/ui/index.d.mts +6 -97
- package/dist/esm/ui/index.mjs +66 -49
- package/dist/index.css +1 -1
- package/dist/novu.min.js +1 -1
- package/dist/novu.min.js.gz +0 -0
- package/package.json +13 -2
- package/themes/package.json +5 -0
|
@@ -1,67 +1,8 @@
|
|
|
1
|
+
import { __privateAdd, __privateSet, __privateGet, __async, __objRest, __spreadValues, __privateMethod, __spreadProps } from './chunk-STZMOEWR.mjs';
|
|
1
2
|
import mitt from 'mitt';
|
|
2
3
|
import io from 'socket.io-client';
|
|
3
4
|
import { HttpClient } from '@novu/client';
|
|
4
5
|
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __defProps = Object.defineProperties;
|
|
7
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __typeError = (msg) => {
|
|
12
|
-
throw TypeError(msg);
|
|
13
|
-
};
|
|
14
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
|
-
var __spreadValues = (a, b) => {
|
|
16
|
-
for (var prop in b || (b = {}))
|
|
17
|
-
if (__hasOwnProp.call(b, prop))
|
|
18
|
-
__defNormalProp(a, prop, b[prop]);
|
|
19
|
-
if (__getOwnPropSymbols)
|
|
20
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
-
if (__propIsEnum.call(b, prop))
|
|
22
|
-
__defNormalProp(a, prop, b[prop]);
|
|
23
|
-
}
|
|
24
|
-
return a;
|
|
25
|
-
};
|
|
26
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
27
|
-
var __objRest = (source, exclude) => {
|
|
28
|
-
var target = {};
|
|
29
|
-
for (var prop in source)
|
|
30
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
31
|
-
target[prop] = source[prop];
|
|
32
|
-
if (source != null && __getOwnPropSymbols)
|
|
33
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
34
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
35
|
-
target[prop] = source[prop];
|
|
36
|
-
}
|
|
37
|
-
return target;
|
|
38
|
-
};
|
|
39
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
40
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
41
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
42
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
43
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
44
|
-
var __async = (__this, __arguments, generator) => {
|
|
45
|
-
return new Promise((resolve, reject) => {
|
|
46
|
-
var fulfilled = (value) => {
|
|
47
|
-
try {
|
|
48
|
-
step(generator.next(value));
|
|
49
|
-
} catch (e) {
|
|
50
|
-
reject(e);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var rejected = (value) => {
|
|
54
|
-
try {
|
|
55
|
-
step(generator.throw(value));
|
|
56
|
-
} catch (e) {
|
|
57
|
-
reject(e);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
61
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
|
|
65
6
|
// src/types.ts
|
|
66
7
|
var NotificationStatus = /* @__PURE__ */ ((NotificationStatus2) => {
|
|
67
8
|
NotificationStatus2["READ"] = "read";
|
|
@@ -1634,4 +1575,4 @@ _session = new WeakMap();
|
|
|
1634
1575
|
_socket = new WeakMap();
|
|
1635
1576
|
_inboxService3 = new WeakMap();
|
|
1636
1577
|
|
|
1637
|
-
export { ActionTypeEnum, ChannelType, CtaType, NotificationActionStatus, NotificationButton, NotificationStatus, Novu, PreferenceLevel, PreferenceOverrideSource, PreferenceOverrideSourceEnum, WebSocketEvent,
|
|
1578
|
+
export { ActionTypeEnum, ChannelType, CtaType, NotificationActionStatus, NotificationButton, NotificationStatus, Novu, PreferenceLevel, PreferenceOverrideSource, PreferenceOverrideSourceEnum, WebSocketEvent, areTagsEqual, isSameFilter };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __typeError = (msg) => {
|
|
8
|
+
throw TypeError(msg);
|
|
9
|
+
};
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
36
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
37
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
38
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
39
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
40
|
+
var __async = (__this, __arguments, generator) => {
|
|
41
|
+
return new Promise((resolve, reject) => {
|
|
42
|
+
var fulfilled = (value) => {
|
|
43
|
+
try {
|
|
44
|
+
step(generator.next(value));
|
|
45
|
+
} catch (e) {
|
|
46
|
+
reject(e);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var rejected = (value) => {
|
|
50
|
+
try {
|
|
51
|
+
step(generator.throw(value));
|
|
52
|
+
} catch (e) {
|
|
53
|
+
reject(e);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
57
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { __async, __objRest, __privateAdd, __privateGet, __privateMethod, __privateSet, __spreadProps, __spreadValues };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { ActionTypeEnum, ChannelType, CtaType, NotificationActionStatus, NotificationButton, NotificationStatus, Novu, PreferenceLevel, PreferenceOverrideSource, PreferenceOverrideSourceEnum, WebSocketEvent, areTagsEqual, isSameFilter } from './chunk-
|
|
1
|
+
export { ActionTypeEnum, ChannelType, CtaType, NotificationActionStatus, NotificationButton, NotificationStatus, Novu, PreferenceLevel, PreferenceOverrideSource, PreferenceOverrideSourceEnum, WebSocketEvent, areTagsEqual, isSameFilter } from './chunk-QIWP6QB5.mjs';
|
|
2
|
+
import './chunk-STZMOEWR.mjs';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import '../chunk-STZMOEWR.mjs';
|
|
2
|
+
|
|
3
|
+
// src/ui/themes/dark.ts
|
|
4
|
+
var dark = {
|
|
5
|
+
variables: {
|
|
6
|
+
colorNeutral: "white",
|
|
7
|
+
colorBackground: "#161618",
|
|
8
|
+
colorForeground: "#EDEDEF",
|
|
9
|
+
colorSecondary: "#7E7D86",
|
|
10
|
+
colorSecondaryForeground: "#EDEDEF",
|
|
11
|
+
colorShadow: "black"
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { dark };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { t as Notification, N as NotificationFilter, s as NovuOptions, b as Novu } from './novu-psplDV5F.mjs';
|
|
2
|
+
|
|
3
|
+
declare const defaultLocalization: {
|
|
4
|
+
readonly locale: "en-US";
|
|
5
|
+
readonly 'inbox.filters.dropdownOptions.unread': "Unread only";
|
|
6
|
+
readonly 'inbox.filters.dropdownOptions.default': "Unread & read";
|
|
7
|
+
readonly 'inbox.filters.dropdownOptions.archived': "Archived";
|
|
8
|
+
readonly 'inbox.filters.labels.unread': "Unread";
|
|
9
|
+
readonly 'inbox.filters.labels.default': "Inbox";
|
|
10
|
+
readonly 'inbox.filters.labels.archived': "Archived";
|
|
11
|
+
readonly 'notifications.emptyNotice': "No notifications";
|
|
12
|
+
readonly 'notifications.actions.readAll': "Mark all as read";
|
|
13
|
+
readonly 'notifications.actions.archiveAll': "Archive all";
|
|
14
|
+
readonly 'notifications.actions.archiveRead': "Archive read";
|
|
15
|
+
readonly 'notifications.newNotifications': ({ notificationCount }: {
|
|
16
|
+
notificationCount: number;
|
|
17
|
+
}) => string;
|
|
18
|
+
readonly 'notification.actions.read.tooltip': "Mark as read";
|
|
19
|
+
readonly 'notification.actions.unread.tooltip': "Mark as unread";
|
|
20
|
+
readonly 'notification.actions.archive.tooltip': "Archive";
|
|
21
|
+
readonly 'notification.actions.unarchive.tooltip': "Unarchive";
|
|
22
|
+
readonly 'preferences.title': "Notification Preferences";
|
|
23
|
+
readonly 'preferences.global': "Global Preferences";
|
|
24
|
+
readonly 'preferences.workflow.disabled.notice': "Contact admin to enable subscription management for this critical notification.";
|
|
25
|
+
readonly 'preferences.workflow.disabled.tooltip': "Contact admin to edit";
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
declare const appearanceKeys: readonly ["button", "popoverContent", "popoverTrigger", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeftIcon", "dropdownItemRightIcon", "tooltipContent", "tooltipTrigger", "back__button", "skeletonText", "skeletonAvatar", "tabsRoot", "tabsList", "tabsContent", "tabsTrigger", "dots", "root", "bellIcon", "bellContainer", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "inboxContent", "inbox__popoverTrigger", "inbox__popoverContent", "notificationListContainer", "notificationList", "notificationListEmptyNoticeContainer", "notificationListEmptyNotice", "notificationListEmptyNoticeIcon", "notificationListNewNotificationsNotice__button", "notification", "notificationDot", "notificationSubject", "notificationSubject__strong", "notificationBody", "notificationBody__strong", "notificationBodyContainer", "notificationImage", "notificationDate", "notificationDefaultActions", "notificationCustomActions", "notificationPrimaryAction__button", "notificationSecondaryAction__button", "notificationRead__button", "notificationUnread__button", "notificationArchive__button", "notificationUnarchive__button", "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", "moreActionsContainer", "moreActions__dropdownTrigger", "moreActions__dropdownContent", "moreActions__dropdownItem", "moreActions__dropdownItemLabel", "moreActions__dropdownItemLeft__icon", "moreActions__dots", "moreTabs__button", "moreTabs__dots", "moreTabs__dropdownTrigger", "moreTabs__dropdownContent", "moreTabs__dropdownItem", "moreTabs__dropdownItemLabel", "moreTabs__dropdownItemRight__icon", "workflowContainer", "workflowLabel", "workflowLabelContainer", "workflowContainerDisabledNotice", "workflowLabelDisabled__icon", "workflowContainerRight__icon", "workflowArrow__icon", "channelContainer", "channelsContainerCollapsible", "channelsContainer", "channelLabel", "channelLabelContainer", "channelDescription", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__title", "preferencesLoadingContainer", "strong"];
|
|
29
|
+
|
|
30
|
+
type LocalizationKey = keyof typeof defaultLocalization;
|
|
31
|
+
type Localization = {
|
|
32
|
+
[K in LocalizationKey]?: (typeof defaultLocalization)[K] extends (...args: infer P) => any ? ((...args: P) => ReturnType<(typeof defaultLocalization)[K]>) | string : string;
|
|
33
|
+
} & {
|
|
34
|
+
dynamic?: Record<string, string>;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
type NotificationClickHandler = (notification: Notification) => void;
|
|
38
|
+
type NotificationActionClickHandler = (notification: Notification) => void;
|
|
39
|
+
type NotificationRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
40
|
+
type BellRenderer = (el: HTMLDivElement, unreadCount: number) => () => void;
|
|
41
|
+
type RouterPush = (path: string) => void;
|
|
42
|
+
type Tab = {
|
|
43
|
+
label: string;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated Use `filter` instead
|
|
46
|
+
*/
|
|
47
|
+
value?: Array<string>;
|
|
48
|
+
filter?: Pick<NotificationFilter, 'tags'>;
|
|
49
|
+
};
|
|
50
|
+
type CSSProperties = {
|
|
51
|
+
[key: string]: string | number;
|
|
52
|
+
};
|
|
53
|
+
type ElementStyles = string | CSSProperties;
|
|
54
|
+
type Variables = {
|
|
55
|
+
colorBackground?: string;
|
|
56
|
+
colorForeground?: string;
|
|
57
|
+
colorPrimary?: string;
|
|
58
|
+
colorPrimaryForeground?: string;
|
|
59
|
+
colorSecondary?: string;
|
|
60
|
+
colorSecondaryForeground?: string;
|
|
61
|
+
colorCounter?: string;
|
|
62
|
+
colorCounterForeground?: string;
|
|
63
|
+
colorNeutral?: string;
|
|
64
|
+
colorShadow?: string;
|
|
65
|
+
fontSize?: string;
|
|
66
|
+
borderRadius?: string;
|
|
67
|
+
};
|
|
68
|
+
type AppearanceKey = (typeof appearanceKeys)[number];
|
|
69
|
+
type Elements = Partial<Record<AppearanceKey, ElementStyles>>;
|
|
70
|
+
type Theme = {
|
|
71
|
+
variables?: Variables;
|
|
72
|
+
elements?: Elements;
|
|
73
|
+
animations?: boolean;
|
|
74
|
+
};
|
|
75
|
+
type Appearance = Theme & {
|
|
76
|
+
baseTheme?: Theme | Theme[];
|
|
77
|
+
};
|
|
78
|
+
type BaseNovuProviderProps = {
|
|
79
|
+
appearance?: Appearance;
|
|
80
|
+
localization?: Localization;
|
|
81
|
+
options: NovuOptions;
|
|
82
|
+
tabs?: Array<Tab>;
|
|
83
|
+
preferencesFilter?: PreferencesFilter;
|
|
84
|
+
routerPush?: RouterPush;
|
|
85
|
+
novu?: Novu;
|
|
86
|
+
};
|
|
87
|
+
type NovuProviderProps = BaseNovuProviderProps & {
|
|
88
|
+
renderNotification?: NotificationRenderer;
|
|
89
|
+
renderBell?: BellRenderer;
|
|
90
|
+
};
|
|
91
|
+
declare enum NotificationStatus {
|
|
92
|
+
UNREAD_READ = "unreadRead",
|
|
93
|
+
UNREAD = "unread",
|
|
94
|
+
ARCHIVED = "archived"
|
|
95
|
+
}
|
|
96
|
+
type PreferencesFilter = Pick<NotificationFilter, 'tags'>;
|
|
97
|
+
|
|
98
|
+
export { type Appearance as A, type BellRenderer as B, type CSSProperties as C, type ElementStyles as E, type Localization as L, type NotificationRenderer as N, type PreferencesFilter as P, type RouterPush as R, type Tab as T, type Variables as V, type NotificationClickHandler as a, type NotificationActionClickHandler as b, type NovuProviderProps as c, type BaseNovuProviderProps as d, type AppearanceKey as e, type Elements as f, type Theme as g, NotificationStatus as h, type LocalizationKey as i };
|
package/dist/esm/ui/index.d.mts
CHANGED
|
@@ -1,104 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as NovuOptions } from '../novu-psplDV5F.mjs';
|
|
2
|
+
export { t as Notification } from '../novu-psplDV5F.mjs';
|
|
3
|
+
import { N as NotificationRenderer, B as BellRenderer, a as NotificationClickHandler, b as NotificationActionClickHandler, c as NovuProviderProps, d as BaseNovuProviderProps, A as Appearance, L as Localization, T as Tab, P as PreferencesFilter, R as RouterPush } from '../types-xYLv4vWZ.mjs';
|
|
4
|
+
export { e as AppearanceKey, C as CSSProperties, E as ElementStyles, f as Elements, i as LocalizationKey, h as NotificationStatus, g as Theme, V as Variables } from '../types-xYLv4vWZ.mjs';
|
|
2
5
|
import * as solid_js from 'solid-js';
|
|
3
6
|
import { ComponentProps } from 'solid-js';
|
|
4
7
|
import { MountableElement } from 'solid-js/web';
|
|
5
8
|
import '@novu/client';
|
|
6
9
|
|
|
7
|
-
declare const defaultLocalization: {
|
|
8
|
-
readonly locale: "en-US";
|
|
9
|
-
readonly 'inbox.filters.dropdownOptions.unread': "Unread only";
|
|
10
|
-
readonly 'inbox.filters.dropdownOptions.default': "Unread & read";
|
|
11
|
-
readonly 'inbox.filters.dropdownOptions.archived': "Archived";
|
|
12
|
-
readonly 'inbox.filters.labels.unread': "Unread";
|
|
13
|
-
readonly 'inbox.filters.labels.default': "Inbox";
|
|
14
|
-
readonly 'inbox.filters.labels.archived': "Archived";
|
|
15
|
-
readonly 'notifications.emptyNotice': "No notifications";
|
|
16
|
-
readonly 'notifications.actions.readAll': "Mark all as read";
|
|
17
|
-
readonly 'notifications.actions.archiveAll': "Archive all";
|
|
18
|
-
readonly 'notifications.actions.archiveRead': "Archive read";
|
|
19
|
-
readonly 'notifications.newNotifications': ({ notificationCount }: {
|
|
20
|
-
notificationCount: number;
|
|
21
|
-
}) => string;
|
|
22
|
-
readonly 'notification.actions.read.tooltip': "Mark as read";
|
|
23
|
-
readonly 'notification.actions.unread.tooltip': "Mark as unread";
|
|
24
|
-
readonly 'notification.actions.archive.tooltip': "Archive";
|
|
25
|
-
readonly 'notification.actions.unarchive.tooltip': "Unarchive";
|
|
26
|
-
readonly 'preferences.title': "Notification Preferences";
|
|
27
|
-
readonly 'preferences.global': "Global Preferences";
|
|
28
|
-
readonly 'preferences.workflow.disabled.notice': "Contact admin to enable subscription management for this critical notification.";
|
|
29
|
-
readonly 'preferences.workflow.disabled.tooltip': "Contact admin to edit";
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
declare const appearanceKeys: readonly ["button", "popoverContent", "popoverTrigger", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeftIcon", "dropdownItemRightIcon", "tooltipContent", "tooltipTrigger", "back__button", "skeletonText", "skeletonAvatar", "tabsRoot", "tabsList", "tabsContent", "tabsTrigger", "dots", "root", "bellIcon", "bellContainer", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "inboxContent", "inbox__popoverTrigger", "inbox__popoverContent", "notificationListContainer", "notificationList", "notificationListEmptyNoticeContainer", "notificationListEmptyNotice", "notificationListEmptyNoticeIcon", "notificationListNewNotificationsNotice__button", "notification", "notificationDot", "notificationSubject", "notificationSubject__strong", "notificationBody", "notificationBody__strong", "notificationBodyContainer", "notificationImage", "notificationDate", "notificationDefaultActions", "notificationCustomActions", "notificationPrimaryAction__button", "notificationSecondaryAction__button", "notificationRead__button", "notificationUnread__button", "notificationArchive__button", "notificationUnarchive__button", "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", "moreActionsContainer", "moreActions__dropdownTrigger", "moreActions__dropdownContent", "moreActions__dropdownItem", "moreActions__dropdownItemLabel", "moreActions__dropdownItemLeft__icon", "moreActions__dots", "moreTabs__button", "moreTabs__dots", "moreTabs__dropdownTrigger", "moreTabs__dropdownContent", "moreTabs__dropdownItem", "moreTabs__dropdownItemLabel", "moreTabs__dropdownItemRight__icon", "workflowContainer", "workflowLabel", "workflowLabelContainer", "workflowContainerDisabledNotice", "workflowLabelDisabled__icon", "workflowContainerRight__icon", "workflowArrow__icon", "channelContainer", "channelsContainerCollapsible", "channelsContainer", "channelLabel", "channelLabelContainer", "channelDescription", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__title", "preferencesLoadingContainer", "strong"];
|
|
33
|
-
|
|
34
|
-
type LocalizationKey = keyof typeof defaultLocalization;
|
|
35
|
-
type Localization = {
|
|
36
|
-
[K in LocalizationKey]?: (typeof defaultLocalization)[K] extends (...args: infer P) => any ? ((...args: P) => ReturnType<(typeof defaultLocalization)[K]>) | string : string;
|
|
37
|
-
} & {
|
|
38
|
-
dynamic?: Record<string, string>;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
type NotificationClickHandler = (notification: Notification) => void;
|
|
42
|
-
type NotificationActionClickHandler = (notification: Notification) => void;
|
|
43
|
-
type NotificationRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
44
|
-
type BellRenderer = (el: HTMLDivElement, unreadCount: number) => () => void;
|
|
45
|
-
type RouterPush = (path: string) => void;
|
|
46
|
-
type Tab = {
|
|
47
|
-
label: string;
|
|
48
|
-
/**
|
|
49
|
-
* @deprecated Use `filter` instead
|
|
50
|
-
*/
|
|
51
|
-
value?: Array<string>;
|
|
52
|
-
filter?: Pick<NotificationFilter, 'tags'>;
|
|
53
|
-
};
|
|
54
|
-
type CSSProperties = {
|
|
55
|
-
[key: string]: string | number;
|
|
56
|
-
};
|
|
57
|
-
type ElementStyles = string | CSSProperties;
|
|
58
|
-
type Variables = {
|
|
59
|
-
colorBackground?: string;
|
|
60
|
-
colorForeground?: string;
|
|
61
|
-
colorPrimary?: string;
|
|
62
|
-
colorPrimaryForeground?: string;
|
|
63
|
-
colorSecondary?: string;
|
|
64
|
-
colorSecondaryForeground?: string;
|
|
65
|
-
colorCounter?: string;
|
|
66
|
-
colorCounterForeground?: string;
|
|
67
|
-
colorNeutral?: string;
|
|
68
|
-
colorShadow?: 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
10
|
type InboxProps = {
|
|
103
11
|
open?: boolean;
|
|
104
12
|
renderNotification?: NotificationRenderer;
|
|
@@ -122,6 +30,7 @@ type InboxContentProps = {
|
|
|
122
30
|
|
|
123
31
|
declare const novuComponents: {
|
|
124
32
|
Inbox: (props: InboxProps) => solid_js.JSX.Element;
|
|
33
|
+
InboxContent: (props: InboxContentProps) => solid_js.JSX.Element;
|
|
125
34
|
Bell: solid_js.Component<{
|
|
126
35
|
renderBell?: BellRenderer;
|
|
127
36
|
}>;
|
|
@@ -151,4 +60,4 @@ declare class NovuUI {
|
|
|
151
60
|
unmount(): void;
|
|
152
61
|
}
|
|
153
62
|
|
|
154
|
-
export {
|
|
63
|
+
export { Appearance, BaseNovuProviderProps, type BaseNovuUIOptions, BellRenderer, InboxPage, type InboxProps, Localization, NotificationActionClickHandler, NotificationClickHandler, NotificationRenderer, NovuProviderProps, NovuUI, type NovuUIOptions, PreferencesFilter, RouterPush, Tab };
|