@novu/js 3.1.0 → 3.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/README.md +1 -1
- package/dist/cjs/{chunk-WONVNOTK.js → chunk-KIOGWIKT.js} +176 -29
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +8 -8
- package/dist/{esm/novu-DDPQzl99.d.mts → cjs/novu-DJTVB7VN.d.ts} +53 -15
- package/dist/cjs/themes/index.d.ts +2 -2
- package/dist/cjs/types-BPv1rvbm.d.ts +121 -0
- package/dist/cjs/ui/index.d.ts +4 -4
- package/dist/cjs/ui/index.js +1529 -343
- package/dist/esm/{chunk-WQDFFXIB.mjs → chunk-GTZM2EDR.mjs} +176 -29
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/{cjs/novu-DDPQzl99.d.ts → esm/novu-DJTVB7VN.d.mts} +53 -15
- package/dist/esm/themes/index.d.mts +2 -2
- package/dist/esm/types-CYgpCW2I.d.mts +121 -0
- package/dist/esm/ui/index.d.mts +4 -4
- package/dist/esm/ui/index.mjs +1527 -341
- package/dist/index.css +1 -1
- package/dist/novu.min.js +10 -10
- package/dist/novu.min.js.gz +0 -0
- package/package.json +3 -3
- package/dist/cjs/types-CVvP6EyP.d.ts +0 -103
- package/dist/esm/types-DFXwHejb.d.mts +0 -103
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { d as Notification, N as NotificationFilter, g as NovuOptions, b as Novu } from './novu-DJTVB7VN.js';
|
|
2
|
+
|
|
3
|
+
declare const appearanceKeys: readonly ["button", "input", "icon", "badge", "popoverContent", "popoverTrigger", "popoverClose", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeft__icon", "dropdownItemRight__icon", "dropdownItem__icon", "collapsible", "tooltipContent", "tooltipTrigger", "datePicker", "datePickerGrid", "datePickerGridRow", "datePickerGridCell", "datePickerGridCellTrigger", "datePickerTrigger", "datePickerGridHeader", "datePickerControl", "datePickerControlPrevTrigger", "datePickerControlNextTrigger", "datePickerControlPrevTrigger__icon", "datePickerControlNextTrigger__icon", "datePickerCalendar", "datePickerHeaderMonth", "datePickerCalendarDay__button", "timePicker", "timePicker__hourSelect", "timePicker__minuteSelect", "timePicker__periodSelect", "timePicker__separator", "timePickerHour__input", "timePickerMinute__input", "snoozeDatePicker", "snoozeDatePicker__actions", "snoozeDatePickerCancel__button", "snoozeDatePickerApply__button", "snoozeDatePicker__timePickerContainer", "snoozeDatePicker__timePickerLabel", "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", "notificationSnooze__button", "notificationUnsnooze__button", "notificationRead__icon", "notificationUnread__icon", "notificationArchive__icon", "notificationUnarchive__icon", "notificationSnooze__icon", "notificationUnsnooze__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", "notificationSnooze__dropdownContent", "notificationSnooze__dropdownItem", "notificationSnooze__dropdownItem__icon", "notificationSnoozeCustomTime_popoverContent", "notificationDeliveredAt__badge", "notificationDeliveredAt__icon", "notificationSnoozedUntil__icon", "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.dropdownOptions.snoozed': "Snoozed";
|
|
11
|
+
readonly 'inbox.filters.labels.unread': "Unread";
|
|
12
|
+
readonly 'inbox.filters.labels.default': "Inbox";
|
|
13
|
+
readonly 'inbox.filters.labels.archived': "Archived";
|
|
14
|
+
readonly 'inbox.filters.labels.snoozed': "Snoozed";
|
|
15
|
+
readonly 'notifications.emptyNotice': "Quiet for now. Check back later.";
|
|
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 'notification.actions.snooze.tooltip': "Snooze";
|
|
27
|
+
readonly 'notification.actions.unsnooze.tooltip': "Unsnooze";
|
|
28
|
+
readonly 'notification.snoozedUntil': "Snoozed until";
|
|
29
|
+
readonly 'preferences.title': "Preferences";
|
|
30
|
+
readonly 'preferences.emptyNotice': "No notification specific preferences yet.";
|
|
31
|
+
readonly 'preferences.global': "Global Preferences";
|
|
32
|
+
readonly 'preferences.workflow.disabled.notice': "Contact admin to enable subscription management for this critical notification.";
|
|
33
|
+
readonly 'preferences.workflow.disabled.tooltip': "Contact admin to edit";
|
|
34
|
+
readonly 'snooze.datePicker.timePickerLabel': "Time";
|
|
35
|
+
readonly 'snooze.datePicker.apply': "Apply";
|
|
36
|
+
readonly 'snooze.datePicker.cancel': "Cancel";
|
|
37
|
+
readonly 'snooze.options.anHourFromNow': "An hour from now";
|
|
38
|
+
readonly 'snooze.datePicker.pastDateTooltip': "Selected time must be at least 3 minutes in the future";
|
|
39
|
+
readonly 'snooze.datePicker.noDateSelectedTooltip': "Please select a date";
|
|
40
|
+
readonly 'snooze.datePicker.exceedingLimitTooltip': ({ days }: {
|
|
41
|
+
days: number;
|
|
42
|
+
}) => string;
|
|
43
|
+
readonly 'snooze.options.customTime': "Custom time...";
|
|
44
|
+
readonly 'snooze.options.inOneDay': "Tomorrow";
|
|
45
|
+
readonly 'snooze.options.inOneWeek': "Next week";
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
type LocalizationKey = keyof typeof defaultLocalization;
|
|
49
|
+
type Localization = {
|
|
50
|
+
[K in LocalizationKey]?: (typeof defaultLocalization)[K] extends (...args: infer P) => any ? ((...args: P) => ReturnType<(typeof defaultLocalization)[K]>) | string : string;
|
|
51
|
+
} & {
|
|
52
|
+
dynamic?: Record<string, string>;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
type NotificationClickHandler = (notification: Notification) => void;
|
|
56
|
+
type NotificationActionClickHandler = (notification: Notification) => void;
|
|
57
|
+
type NotificationRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
58
|
+
type SubjectRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
59
|
+
type BodyRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
60
|
+
type BellRenderer = (el: HTMLDivElement, unreadCount: number) => () => void;
|
|
61
|
+
type RouterPush = (path: string) => void;
|
|
62
|
+
type Tab = {
|
|
63
|
+
label: string;
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use `filter` instead
|
|
66
|
+
*/
|
|
67
|
+
value?: Array<string>;
|
|
68
|
+
filter?: Pick<NotificationFilter, 'tags'>;
|
|
69
|
+
};
|
|
70
|
+
type CSSProperties = {
|
|
71
|
+
[key: string]: string | number;
|
|
72
|
+
};
|
|
73
|
+
type ElementStyles = string | CSSProperties;
|
|
74
|
+
type Variables = {
|
|
75
|
+
colorBackground?: string;
|
|
76
|
+
colorForeground?: string;
|
|
77
|
+
colorPrimary?: string;
|
|
78
|
+
colorPrimaryForeground?: string;
|
|
79
|
+
colorSecondary?: string;
|
|
80
|
+
colorSecondaryForeground?: string;
|
|
81
|
+
colorCounter?: string;
|
|
82
|
+
colorCounterForeground?: string;
|
|
83
|
+
colorNeutral?: string;
|
|
84
|
+
colorShadow?: string;
|
|
85
|
+
colorRing?: string;
|
|
86
|
+
fontSize?: string;
|
|
87
|
+
borderRadius?: string;
|
|
88
|
+
colorStripes?: string;
|
|
89
|
+
};
|
|
90
|
+
type AppearanceKey = (typeof appearanceKeys)[number];
|
|
91
|
+
type Elements = Partial<Record<AppearanceKey, ElementStyles>>;
|
|
92
|
+
type Theme = {
|
|
93
|
+
variables?: Variables;
|
|
94
|
+
elements?: Elements;
|
|
95
|
+
animations?: boolean;
|
|
96
|
+
};
|
|
97
|
+
type Appearance = Theme & {
|
|
98
|
+
baseTheme?: Theme | Theme[];
|
|
99
|
+
};
|
|
100
|
+
type BaseNovuProviderProps = {
|
|
101
|
+
appearance?: Appearance;
|
|
102
|
+
localization?: Localization;
|
|
103
|
+
options: NovuOptions;
|
|
104
|
+
tabs?: Array<Tab>;
|
|
105
|
+
preferencesFilter?: PreferencesFilter;
|
|
106
|
+
routerPush?: RouterPush;
|
|
107
|
+
novu?: Novu;
|
|
108
|
+
};
|
|
109
|
+
type NovuProviderProps = BaseNovuProviderProps & {
|
|
110
|
+
renderNotification?: NotificationRenderer;
|
|
111
|
+
renderBell?: BellRenderer;
|
|
112
|
+
};
|
|
113
|
+
declare enum NotificationStatus {
|
|
114
|
+
UNREAD_READ = "unreadRead",
|
|
115
|
+
UNREAD = "unread",
|
|
116
|
+
ARCHIVED = "archived",
|
|
117
|
+
SNOOZED = "snoozed"
|
|
118
|
+
}
|
|
119
|
+
type PreferencesFilter = Pick<NotificationFilter, 'tags'>;
|
|
120
|
+
|
|
121
|
+
export { type Appearance as A, type BellRenderer as B, type Elements 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 ElementStyles as g, type LocalizationKey as h, NotificationStatus as i, type Theme as j };
|
package/dist/cjs/ui/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as NovuOptions } from '../novu-
|
|
2
|
-
export { d as Notification } from '../novu-
|
|
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-
|
|
4
|
-
export { f as AppearanceKey, g as ElementStyles, E as Elements, h as LocalizationKey, i as NotificationStatus, V as Variables } from '../types-
|
|
1
|
+
import { g as NovuOptions } from '../novu-DJTVB7VN.js';
|
|
2
|
+
export { d as Notification } from '../novu-DJTVB7VN.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-BPv1rvbm.js';
|
|
4
|
+
export { f as AppearanceKey, g as ElementStyles, E as Elements, h as LocalizationKey, i as NotificationStatus, V as Variables } from '../types-BPv1rvbm.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';
|