@novu/js 3.11.0 → 3.12.0-rc.2
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-VWSQDNZX.js → chunk-OZV3TKWX.js} +6 -0
- package/dist/cjs/{chunk-QQNKEWGC.js → chunk-SZEUW4CB.js} +1070 -309
- package/dist/cjs/index.d.ts +5 -4
- package/dist/cjs/index.js +26 -14
- package/dist/cjs/internal/index.d.ts +8 -2
- package/dist/cjs/internal/index.js +8 -4
- package/dist/{esm/novu-DY-mm8Og.d.mts → cjs/novu-BVtCFUxa.d.ts} +398 -203
- package/dist/cjs/themes/index.d.ts +11 -5
- package/dist/cjs/themes/index.js +17 -1
- package/dist/{esm/types-BM_9Xx5Z.d.mts → cjs/types-D-9ozWeQ.d.ts} +20 -1
- package/dist/cjs/types-Rjzg7eo3.d.ts +836 -0
- package/dist/cjs/ui/index.d.ts +74 -7
- package/dist/cjs/ui/index.js +1785 -260
- package/dist/esm/{chunk-UM35OVAD.mjs → chunk-IA6ISHOP.mjs} +1068 -310
- package/dist/esm/{chunk-RZWQYM3H.mjs → chunk-RO3GDYAG.mjs} +6 -1
- package/dist/esm/index.d.mts +5 -4
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/internal/index.d.mts +8 -2
- package/dist/esm/internal/index.mjs +1 -1
- package/dist/{cjs/novu-ThMWeiRt.d.ts → esm/novu-YP3PwsQR.d.mts} +398 -203
- package/dist/esm/themes/index.d.mts +11 -5
- package/dist/esm/themes/index.mjs +16 -2
- package/dist/{cjs/types-BM_9Xx5Z.d.ts → esm/types-D-9ozWeQ.d.mts} +20 -1
- package/dist/esm/types-DmMJ1GiR.d.mts +836 -0
- package/dist/esm/ui/index.d.mts +74 -7
- package/dist/esm/ui/index.mjs +1782 -256
- package/dist/index.css +1 -1
- package/dist/novu.min.js +12 -12
- package/dist/novu.min.js.gz +0 -0
- package/package.json +18 -17
- package/dist/cjs/types-BjANCN3c.d.ts +0 -537
- package/dist/esm/types-C5eX1GmB.d.mts +0 -537
package/dist/novu.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novu/js",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0-rc.2",
|
|
4
4
|
"repository": "https://github.com/novuhq/novu",
|
|
5
5
|
"description": "Novu JavaScript SDK for <Inbox />",
|
|
6
6
|
"author": "",
|
|
@@ -65,6 +65,21 @@
|
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
|
+
"scripts": {
|
|
69
|
+
"clean": "rimraf ./dist",
|
|
70
|
+
"start:server": "http-server ./dist -p 4010",
|
|
71
|
+
"prebuild": "cp ./src/ui/index.css ./src/ui/index.directcss",
|
|
72
|
+
"build": "pnpm run clean && NODE_ENV=production tsup",
|
|
73
|
+
"postbuild": "rm ./src/ui/index.directcss && ./scripts/copy-package-json.sh && node scripts/size-limit.mjs && pnpm run check-exports",
|
|
74
|
+
"build:umd": "webpack --config webpack.config.cjs",
|
|
75
|
+
"build:watch": "concurrently \"pnpm run prebuild\" \"NODE_ENV=development pnpm run tsup:watch\" \"pnpm run start:server\"",
|
|
76
|
+
"tsup:watch": "tsup --watch --onSuccess 'tsup --dts-only'",
|
|
77
|
+
"check-exports": "attw --pack .",
|
|
78
|
+
"check": "biome check .",
|
|
79
|
+
"check:fix": "biome check --write .",
|
|
80
|
+
"test": "jest",
|
|
81
|
+
"publish:rc": "pnpm publish --tag rc"
|
|
82
|
+
},
|
|
68
83
|
"browserslist": {
|
|
69
84
|
"production": [
|
|
70
85
|
">0.2%",
|
|
@@ -113,6 +128,7 @@
|
|
|
113
128
|
"dependencies": {
|
|
114
129
|
"@floating-ui/dom": "^1.6.13",
|
|
115
130
|
"@kobalte/core": "^0.13.10",
|
|
131
|
+
"@types/json-logic-js": "^2.0.8",
|
|
116
132
|
"class-variance-authority": "^0.7.0",
|
|
117
133
|
"clsx": "^2.1.1",
|
|
118
134
|
"event-target-polyfill": "^0.0.4",
|
|
@@ -128,20 +144,5 @@
|
|
|
128
144
|
"tags": [
|
|
129
145
|
"type:package"
|
|
130
146
|
]
|
|
131
|
-
},
|
|
132
|
-
"scripts": {
|
|
133
|
-
"clean": "rimraf ./dist",
|
|
134
|
-
"start:server": "http-server ./dist -p 4010",
|
|
135
|
-
"prebuild": "cp ./src/ui/index.css ./src/ui/index.directcss",
|
|
136
|
-
"build": "pnpm run clean && NODE_ENV=production tsup",
|
|
137
|
-
"postbuild": "rm ./src/ui/index.directcss && ./scripts/copy-package-json.sh && node scripts/size-limit.mjs && pnpm run check-exports",
|
|
138
|
-
"build:umd": "webpack --config webpack.config.cjs",
|
|
139
|
-
"build:watch": "concurrently \"pnpm run prebuild\" \"NODE_ENV=development pnpm run tsup:watch\" \"pnpm run start:server\"",
|
|
140
|
-
"tsup:watch": "tsup --watch --onSuccess 'tsup --dts-only'",
|
|
141
|
-
"check-exports": "attw --pack .",
|
|
142
|
-
"check": "biome check .",
|
|
143
|
-
"check:fix": "biome check --write .",
|
|
144
|
-
"test": "jest",
|
|
145
|
-
"publish:rc": "pnpm publish --tag rc"
|
|
146
147
|
}
|
|
147
|
-
}
|
|
148
|
+
}
|
|
@@ -1,537 +0,0 @@
|
|
|
1
|
-
import { U as UnreadCount, N as NotificationFilter, k as WorkflowCriticalityEnum, f as NovuOptions } from './types-BM_9Xx5Z.js';
|
|
2
|
-
import { N as Notification, P as Preference, c as Schedule, b as Novu } from './novu-ThMWeiRt.js';
|
|
3
|
-
|
|
4
|
-
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", "lockIcon", "bellContainer", "severityHigh__bellContainer", "severityMedium__bellContainer", "severityLow__bellContainer", "bellSeverityGlow", "severityGlowHigh__bellSeverityGlow", "severityGlowMedium__bellSeverityGlow", "severityGlowLow__bellSeverityGlow", "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", "severityHigh__notification", "severityMedium__notification", "severityLow__notification", "notificationBar", "severityHigh__notificationBar", "severityMedium__notificationBar", "severityLow__notificationBar", "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", "workflowLabelHeaderContainer", "workflowLabelIcon", "workflowLabelContainer", "workflowContainerDisabledNotice", "workflowLabelDisabled__icon", "workflowContainerRight__icon", "workflowArrow__icon", "workflowDescription", "preferencesGroupContainer", "preferencesGroupHeader", "preferencesGroupLabelContainer", "preferencesGroupLabelIcon", "preferencesGroupLabel", "preferencesGroupActionsContainer", "preferencesGroupActionsContainerRight__icon", "preferencesGroupBody", "preferencesGroupChannels", "preferencesGroupInfo", "preferencesGroupInfoIcon", "preferencesGroupWorkflows", "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", "scheduleContainer", "scheduleHeader", "scheduleLabelContainer", "scheduleLabelScheduleIcon", "scheduleLabelInfoIcon", "scheduleLabel", "scheduleActionsContainer", "scheduleActionsContainerRight", "scheduleBody", "scheduleDescription", "scheduleTable", "scheduleTableHeader", "scheduleHeaderColumn", "scheduleTableBody", "scheduleBodyRow", "scheduleBodyColumn", "scheduleInfoContainer", "scheduleInfoIcon", "scheduleInfo", "dayScheduleCopyTitle", "dayScheduleCopyIcon", "dayScheduleCopySelectAll", "dayScheduleCopyDay", "dayScheduleCopyFooterContainer", "dayScheduleCopy__dropdownTrigger", "dayScheduleCopy__dropdownContent", "timeSelect__dropdownTrigger", "timeSelect__time", "timeSelect__dropdownContent", "timeSelect__dropdownItem", "timeSelect__dropdownItemLabel", "timeSelect__dropdownItemLabelContainer", "timeSelect__dropdownItemCheck__icon", "notificationSnooze__dropdownContent", "notificationSnooze__dropdownItem", "notificationSnooze__dropdownItem__icon", "notificationSnoozeCustomTime_popoverContent", "notificationDeliveredAt__badge", "notificationDeliveredAt__icon", "notificationSnoozedUntil__icon", "strong"];
|
|
5
|
-
|
|
6
|
-
declare const defaultLocalization: {
|
|
7
|
-
readonly locale: "en-US";
|
|
8
|
-
readonly 'inbox.filters.dropdownOptions.unread': "Unread only";
|
|
9
|
-
readonly 'inbox.filters.dropdownOptions.default': "Unread & read";
|
|
10
|
-
readonly 'inbox.filters.dropdownOptions.archived': "Archived";
|
|
11
|
-
readonly 'inbox.filters.dropdownOptions.snoozed': "Snoozed";
|
|
12
|
-
readonly 'inbox.filters.labels.unread': "Unread";
|
|
13
|
-
readonly 'inbox.filters.labels.default': "Inbox";
|
|
14
|
-
readonly 'inbox.filters.labels.archived': "Archived";
|
|
15
|
-
readonly 'inbox.filters.labels.snoozed': "Snoozed";
|
|
16
|
-
readonly 'notifications.emptyNotice': "Quiet for now. Check back later.";
|
|
17
|
-
readonly 'notifications.actions.readAll': "Mark all as read";
|
|
18
|
-
readonly 'notifications.actions.archiveAll': "Archive all";
|
|
19
|
-
readonly 'notifications.actions.archiveRead': "Archive read";
|
|
20
|
-
readonly 'notifications.newNotifications': ({ notificationCount }: {
|
|
21
|
-
notificationCount: number;
|
|
22
|
-
}) => string;
|
|
23
|
-
readonly 'notification.actions.read.tooltip': "Mark as read";
|
|
24
|
-
readonly 'notification.actions.unread.tooltip': "Mark as unread";
|
|
25
|
-
readonly 'notification.actions.archive.tooltip': "Archive";
|
|
26
|
-
readonly 'notification.actions.unarchive.tooltip': "Unarchive";
|
|
27
|
-
readonly 'notification.actions.snooze.tooltip': "Snooze";
|
|
28
|
-
readonly 'notification.actions.unsnooze.tooltip': "Unsnooze";
|
|
29
|
-
readonly 'notification.snoozedUntil': "Snoozed until";
|
|
30
|
-
readonly 'preferences.title': "Preferences";
|
|
31
|
-
readonly 'preferences.emptyNotice': "No notification specific preferences yet.";
|
|
32
|
-
readonly 'preferences.global': "Global Preferences";
|
|
33
|
-
readonly 'preferences.schedule.title': "Schedule";
|
|
34
|
-
readonly 'preferences.schedule.description': "Allow notifications between:";
|
|
35
|
-
readonly 'preferences.schedule.headerInfo': "Set your schedule. Notifications to external channels will pause outside the schedule. In-app and critical notifications are always delivered.";
|
|
36
|
-
readonly 'preferences.schedule.info': "Critical and In-app notifications still reach you outside your schedule.";
|
|
37
|
-
readonly 'preferences.schedule.days': "Days";
|
|
38
|
-
readonly 'preferences.schedule.from': "From";
|
|
39
|
-
readonly 'preferences.schedule.to': "To";
|
|
40
|
-
readonly 'preferences.schedule.copyTimesTo': "Copy times to";
|
|
41
|
-
readonly 'preferences.schedule.sunday': "Sunday";
|
|
42
|
-
readonly 'preferences.schedule.monday': "Monday";
|
|
43
|
-
readonly 'preferences.schedule.tuesday': "Tuesday";
|
|
44
|
-
readonly 'preferences.schedule.wednesday': "Wednesday";
|
|
45
|
-
readonly 'preferences.schedule.thursday': "Thursday";
|
|
46
|
-
readonly 'preferences.schedule.friday': "Friday";
|
|
47
|
-
readonly 'preferences.schedule.saturday': "Saturday";
|
|
48
|
-
readonly 'preferences.schedule.dayScheduleCopy.title': "Copy times to:";
|
|
49
|
-
readonly 'preferences.schedule.dayScheduleCopy.selectAll': "Select all";
|
|
50
|
-
readonly 'preferences.schedule.dayScheduleCopy.apply': "Apply";
|
|
51
|
-
readonly 'preferences.workflow.disabled.notice': "Contact admin to enable subscription management for this critical notification.";
|
|
52
|
-
readonly 'preferences.workflow.disabled.tooltip': "Contact admin to edit";
|
|
53
|
-
readonly 'preferences.group.info': "Applies to all notifications under this group.";
|
|
54
|
-
readonly 'snooze.datePicker.timePickerLabel': "Time";
|
|
55
|
-
readonly 'snooze.datePicker.apply': "Apply";
|
|
56
|
-
readonly 'snooze.datePicker.cancel': "Cancel";
|
|
57
|
-
readonly 'snooze.options.anHourFromNow': "An hour from now";
|
|
58
|
-
readonly 'snooze.datePicker.pastDateTooltip': "Selected time must be at least 3 minutes in the future";
|
|
59
|
-
readonly 'snooze.datePicker.noDateSelectedTooltip': "Please select a date";
|
|
60
|
-
readonly 'snooze.datePicker.exceedingLimitTooltip': ({ days }: {
|
|
61
|
-
days: number;
|
|
62
|
-
}) => string;
|
|
63
|
-
readonly 'snooze.options.customTime': "Custom time...";
|
|
64
|
-
readonly 'snooze.options.inOneDay': "Tomorrow";
|
|
65
|
-
readonly 'snooze.options.inOneWeek': "Next week";
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
type LocalizationKey = keyof typeof defaultLocalization;
|
|
69
|
-
type Localization = {
|
|
70
|
-
[K in LocalizationKey]?: (typeof defaultLocalization)[K] extends (...args: infer P) => any ? ((...args: P) => ReturnType<(typeof defaultLocalization)[K]>) | string : string;
|
|
71
|
-
} & {
|
|
72
|
-
dynamic?: Record<string, string>;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
type NotificationClickHandler = (notification: Notification) => void;
|
|
76
|
-
type NotificationActionClickHandler = (notification: Notification) => void;
|
|
77
|
-
type NotificationRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
78
|
-
type AvatarRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
79
|
-
type SubjectRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
80
|
-
type BodyRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
81
|
-
type DefaultActionsRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
82
|
-
type CustomActionsRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
83
|
-
type BellRenderer = (el: HTMLDivElement, unreadCount: UnreadCount) => () => void;
|
|
84
|
-
type RouterPush = (path: string) => void;
|
|
85
|
-
type Tab = {
|
|
86
|
-
label: string;
|
|
87
|
-
/**
|
|
88
|
-
* @deprecated Use `filter` instead
|
|
89
|
-
*/
|
|
90
|
-
value?: Array<string>;
|
|
91
|
-
filter?: Pick<NotificationFilter, 'tags' | 'data' | 'severity'>;
|
|
92
|
-
};
|
|
93
|
-
type CSSProperties = {
|
|
94
|
-
[key: string]: string | number;
|
|
95
|
-
};
|
|
96
|
-
type ElementStyles = string | CSSProperties;
|
|
97
|
-
type Variables = {
|
|
98
|
-
colorBackground?: string;
|
|
99
|
-
colorForeground?: string;
|
|
100
|
-
colorPrimary?: string;
|
|
101
|
-
colorPrimaryForeground?: string;
|
|
102
|
-
colorSecondary?: string;
|
|
103
|
-
colorSecondaryForeground?: string;
|
|
104
|
-
colorCounter?: string;
|
|
105
|
-
colorCounterForeground?: string;
|
|
106
|
-
colorNeutral?: string;
|
|
107
|
-
colorShadow?: string;
|
|
108
|
-
colorRing?: string;
|
|
109
|
-
fontSize?: string;
|
|
110
|
-
borderRadius?: string;
|
|
111
|
-
colorStripes?: string;
|
|
112
|
-
colorSeverityHigh?: string;
|
|
113
|
-
colorSeverityMedium?: string;
|
|
114
|
-
colorSeverityLow?: string;
|
|
115
|
-
};
|
|
116
|
-
type AppearanceCallback = {
|
|
117
|
-
bellDot: (context: {
|
|
118
|
-
unreadCount: {
|
|
119
|
-
total: number;
|
|
120
|
-
severity: Record<string, number>;
|
|
121
|
-
};
|
|
122
|
-
}) => string;
|
|
123
|
-
bellIcon: (context: {
|
|
124
|
-
unreadCount: {
|
|
125
|
-
total: number;
|
|
126
|
-
severity: Record<string, number>;
|
|
127
|
-
};
|
|
128
|
-
}) => string;
|
|
129
|
-
bellContainer: (context: {
|
|
130
|
-
unreadCount: {
|
|
131
|
-
total: number;
|
|
132
|
-
severity: Record<string, number>;
|
|
133
|
-
};
|
|
134
|
-
}) => string;
|
|
135
|
-
severityHigh__bellContainer: (context: {
|
|
136
|
-
unreadCount: {
|
|
137
|
-
total: number;
|
|
138
|
-
severity: Record<string, number>;
|
|
139
|
-
};
|
|
140
|
-
}) => string;
|
|
141
|
-
severityMedium__bellContainer: (context: {
|
|
142
|
-
unreadCount: {
|
|
143
|
-
total: number;
|
|
144
|
-
severity: Record<string, number>;
|
|
145
|
-
};
|
|
146
|
-
}) => string;
|
|
147
|
-
severityLow__bellContainer: (context: {
|
|
148
|
-
unreadCount: {
|
|
149
|
-
total: number;
|
|
150
|
-
severity: Record<string, number>;
|
|
151
|
-
};
|
|
152
|
-
}) => string;
|
|
153
|
-
bellSeverityGlow: (context: {
|
|
154
|
-
unreadCount: {
|
|
155
|
-
total: number;
|
|
156
|
-
severity: Record<string, number>;
|
|
157
|
-
};
|
|
158
|
-
}) => string;
|
|
159
|
-
severityGlowHigh__bellSeverityGlow: (context: {
|
|
160
|
-
unreadCount: {
|
|
161
|
-
total: number;
|
|
162
|
-
severity: Record<string, number>;
|
|
163
|
-
};
|
|
164
|
-
}) => string;
|
|
165
|
-
severityGlowMedium__bellSeverityGlow: (context: {
|
|
166
|
-
unreadCount: {
|
|
167
|
-
total: number;
|
|
168
|
-
severity: Record<string, number>;
|
|
169
|
-
};
|
|
170
|
-
}) => string;
|
|
171
|
-
severityGlowLow__bellSeverityGlow: (context: {
|
|
172
|
-
unreadCount: {
|
|
173
|
-
total: number;
|
|
174
|
-
severity: Record<string, number>;
|
|
175
|
-
};
|
|
176
|
-
}) => string;
|
|
177
|
-
preferencesContainer: (context: {
|
|
178
|
-
preferences?: Preference[];
|
|
179
|
-
groups: Array<{
|
|
180
|
-
name: string;
|
|
181
|
-
preferences: Preference[];
|
|
182
|
-
}>;
|
|
183
|
-
}) => string;
|
|
184
|
-
workflowContainer: (context: {
|
|
185
|
-
preference: Preference;
|
|
186
|
-
}) => string;
|
|
187
|
-
workflowLabelContainer: (context: {
|
|
188
|
-
preference: Preference;
|
|
189
|
-
}) => string;
|
|
190
|
-
workflowLabelHeader: (context: {
|
|
191
|
-
preference: Preference;
|
|
192
|
-
}) => string;
|
|
193
|
-
workflowLabelHeaderContainer: (context: {
|
|
194
|
-
preference: Preference;
|
|
195
|
-
}) => string;
|
|
196
|
-
workflowLabelIcon: (context: {
|
|
197
|
-
preference: Preference;
|
|
198
|
-
}) => string;
|
|
199
|
-
workflowLabel: (context: {
|
|
200
|
-
preference: Preference;
|
|
201
|
-
}) => string;
|
|
202
|
-
workflowArrow__icon: (context: {
|
|
203
|
-
preference: Preference;
|
|
204
|
-
}) => string;
|
|
205
|
-
workflowContainerRight__icon: (context: {
|
|
206
|
-
preference: Preference;
|
|
207
|
-
}) => string;
|
|
208
|
-
channelsContainer: (context: {
|
|
209
|
-
preference: Preference;
|
|
210
|
-
}) => string;
|
|
211
|
-
channelName: (context: {
|
|
212
|
-
preference: Preference;
|
|
213
|
-
}) => string;
|
|
214
|
-
channelContainer: (context: {
|
|
215
|
-
preference?: Preference;
|
|
216
|
-
preferenceGroup?: {
|
|
217
|
-
name: string;
|
|
218
|
-
preferences: Preference[];
|
|
219
|
-
};
|
|
220
|
-
}) => string;
|
|
221
|
-
channelLabelContainer: (context: {
|
|
222
|
-
preference?: Preference;
|
|
223
|
-
preferenceGroup?: {
|
|
224
|
-
name: string;
|
|
225
|
-
preferences: Preference[];
|
|
226
|
-
};
|
|
227
|
-
}) => string;
|
|
228
|
-
channelIconContainer: (context: {
|
|
229
|
-
preference?: Preference;
|
|
230
|
-
preferenceGroup?: {
|
|
231
|
-
name: string;
|
|
232
|
-
preferences: Preference[];
|
|
233
|
-
};
|
|
234
|
-
}) => string;
|
|
235
|
-
channelLabel: (context: {
|
|
236
|
-
preference?: Preference;
|
|
237
|
-
preferenceGroup?: {
|
|
238
|
-
name: string;
|
|
239
|
-
preferences: Preference[];
|
|
240
|
-
};
|
|
241
|
-
}) => string;
|
|
242
|
-
channelSwitchContainer: (context: {
|
|
243
|
-
preference?: Preference;
|
|
244
|
-
preferenceGroup?: {
|
|
245
|
-
name: string;
|
|
246
|
-
preferences: Preference[];
|
|
247
|
-
};
|
|
248
|
-
}) => string;
|
|
249
|
-
channel__icon: (context: {
|
|
250
|
-
preference?: Preference;
|
|
251
|
-
preferenceGroup?: {
|
|
252
|
-
name: string;
|
|
253
|
-
preferences: Preference[];
|
|
254
|
-
};
|
|
255
|
-
}) => string;
|
|
256
|
-
scheduleContainer: (context: {
|
|
257
|
-
schedule?: Schedule;
|
|
258
|
-
}) => string;
|
|
259
|
-
scheduleHeader: (context: {
|
|
260
|
-
schedule?: Schedule;
|
|
261
|
-
}) => string;
|
|
262
|
-
scheduleLabelContainer: (context: {
|
|
263
|
-
schedule?: Schedule;
|
|
264
|
-
}) => string;
|
|
265
|
-
scheduleLabelScheduleIcon: (context: {
|
|
266
|
-
schedule?: Schedule;
|
|
267
|
-
}) => string;
|
|
268
|
-
scheduleLabelInfoIcon: (context: {
|
|
269
|
-
schedule?: Schedule;
|
|
270
|
-
}) => string;
|
|
271
|
-
scheduleLabel: (context: {
|
|
272
|
-
schedule?: Schedule;
|
|
273
|
-
}) => string;
|
|
274
|
-
scheduleActionsContainer: (context: {
|
|
275
|
-
schedule?: Schedule;
|
|
276
|
-
}) => string;
|
|
277
|
-
scheduleActionsContainerRight: (context: {
|
|
278
|
-
schedule?: Schedule;
|
|
279
|
-
}) => string;
|
|
280
|
-
scheduleBody: (context: {
|
|
281
|
-
schedule?: Schedule;
|
|
282
|
-
}) => string;
|
|
283
|
-
scheduleDescription: (context: {
|
|
284
|
-
schedule?: Schedule;
|
|
285
|
-
}) => string;
|
|
286
|
-
scheduleTable: (context: {
|
|
287
|
-
schedule?: Schedule;
|
|
288
|
-
}) => string;
|
|
289
|
-
scheduleTableHeader: (context: {
|
|
290
|
-
schedule?: Schedule;
|
|
291
|
-
}) => string;
|
|
292
|
-
scheduleHeaderColumn: (context: {
|
|
293
|
-
schedule?: Schedule;
|
|
294
|
-
}) => string;
|
|
295
|
-
scheduleTableBody: (context: {
|
|
296
|
-
schedule?: Schedule;
|
|
297
|
-
}) => string;
|
|
298
|
-
scheduleBodyRow: (context: {
|
|
299
|
-
schedule?: Schedule;
|
|
300
|
-
}) => string;
|
|
301
|
-
scheduleBodyColumn: (context: {
|
|
302
|
-
schedule?: Schedule;
|
|
303
|
-
}) => string;
|
|
304
|
-
scheduleInfoContainer: (context: {
|
|
305
|
-
schedule?: Schedule;
|
|
306
|
-
}) => string;
|
|
307
|
-
scheduleInfoIcon: (context: {
|
|
308
|
-
schedule?: Schedule;
|
|
309
|
-
}) => string;
|
|
310
|
-
scheduleInfo: (context: {
|
|
311
|
-
schedule?: Schedule;
|
|
312
|
-
}) => string;
|
|
313
|
-
dayScheduleCopyTitle: (context: {
|
|
314
|
-
schedule?: Schedule;
|
|
315
|
-
}) => string;
|
|
316
|
-
dayScheduleCopyIcon: (context: {
|
|
317
|
-
schedule?: Schedule;
|
|
318
|
-
}) => string;
|
|
319
|
-
dayScheduleCopySelectAll: (context: {
|
|
320
|
-
schedule?: Schedule;
|
|
321
|
-
}) => string;
|
|
322
|
-
dayScheduleCopyDay: (context: {
|
|
323
|
-
schedule?: Schedule;
|
|
324
|
-
}) => string;
|
|
325
|
-
dayScheduleCopyFooterContainer: (context: {
|
|
326
|
-
schedule?: Schedule;
|
|
327
|
-
}) => string;
|
|
328
|
-
preferencesGroupContainer: (context: {
|
|
329
|
-
preferenceGroup: {
|
|
330
|
-
name: string;
|
|
331
|
-
preferences: Preference[];
|
|
332
|
-
};
|
|
333
|
-
}) => string;
|
|
334
|
-
preferencesGroupHeader: (context: {
|
|
335
|
-
preferenceGroup: {
|
|
336
|
-
name: string;
|
|
337
|
-
preferences: Preference[];
|
|
338
|
-
};
|
|
339
|
-
}) => string;
|
|
340
|
-
preferencesGroupLabelContainer: (context: {
|
|
341
|
-
preferenceGroup: {
|
|
342
|
-
name: string;
|
|
343
|
-
preferences: Preference[];
|
|
344
|
-
};
|
|
345
|
-
}) => string;
|
|
346
|
-
preferencesGroupLabelIcon: (context: {
|
|
347
|
-
preferenceGroup: {
|
|
348
|
-
name: string;
|
|
349
|
-
preferences: Preference[];
|
|
350
|
-
};
|
|
351
|
-
}) => string;
|
|
352
|
-
preferencesGroupLabel: (context: {
|
|
353
|
-
preferenceGroup: {
|
|
354
|
-
name: string;
|
|
355
|
-
preferences: Preference[];
|
|
356
|
-
};
|
|
357
|
-
}) => string;
|
|
358
|
-
preferencesGroupActionsContainer: (context: {
|
|
359
|
-
preferenceGroup: {
|
|
360
|
-
name: string;
|
|
361
|
-
preferences: Preference[];
|
|
362
|
-
};
|
|
363
|
-
}) => string;
|
|
364
|
-
preferencesGroupActionsContainerRight__icon: (context: {
|
|
365
|
-
preferenceGroup: {
|
|
366
|
-
name: string;
|
|
367
|
-
preferences: Preference[];
|
|
368
|
-
};
|
|
369
|
-
}) => string;
|
|
370
|
-
preferencesGroupBody: (context: {
|
|
371
|
-
preferenceGroup: {
|
|
372
|
-
name: string;
|
|
373
|
-
preferences: Preference[];
|
|
374
|
-
};
|
|
375
|
-
}) => string;
|
|
376
|
-
preferencesGroupChannels: (context: {
|
|
377
|
-
preferenceGroup: {
|
|
378
|
-
name: string;
|
|
379
|
-
preferences: Preference[];
|
|
380
|
-
};
|
|
381
|
-
}) => string;
|
|
382
|
-
preferencesGroupInfo: (context: {
|
|
383
|
-
preferenceGroup: {
|
|
384
|
-
name: string;
|
|
385
|
-
preferences: Preference[];
|
|
386
|
-
};
|
|
387
|
-
}) => string;
|
|
388
|
-
preferencesGroupInfoIcon: (context: {
|
|
389
|
-
preferenceGroup: {
|
|
390
|
-
name: string;
|
|
391
|
-
preferences: Preference[];
|
|
392
|
-
};
|
|
393
|
-
}) => string;
|
|
394
|
-
preferencesGroupWorkflows: (context: {
|
|
395
|
-
preferenceGroup: {
|
|
396
|
-
name: string;
|
|
397
|
-
preferences: Preference[];
|
|
398
|
-
};
|
|
399
|
-
}) => string;
|
|
400
|
-
notificationList: (context: {
|
|
401
|
-
notifications: Notification[];
|
|
402
|
-
}) => string;
|
|
403
|
-
notificationListContainer: (context: {
|
|
404
|
-
notifications: Notification[];
|
|
405
|
-
}) => string;
|
|
406
|
-
notification: (context: {
|
|
407
|
-
notification: Notification;
|
|
408
|
-
}) => string;
|
|
409
|
-
severityHigh__notification: (context: {
|
|
410
|
-
notification: Notification;
|
|
411
|
-
}) => string;
|
|
412
|
-
severityMedium__notification: (context: {
|
|
413
|
-
notification: Notification;
|
|
414
|
-
}) => string;
|
|
415
|
-
severityLow__notification: (context: {
|
|
416
|
-
notification: Notification;
|
|
417
|
-
}) => string;
|
|
418
|
-
notificationBar: (context: {
|
|
419
|
-
notification: Notification;
|
|
420
|
-
}) => string;
|
|
421
|
-
severityHigh__notificationBar: (context: {
|
|
422
|
-
notification: Notification;
|
|
423
|
-
}) => string;
|
|
424
|
-
severityMedium__notificationBar: (context: {
|
|
425
|
-
notification: Notification;
|
|
426
|
-
}) => string;
|
|
427
|
-
severityLow__notificationBar: (context: {
|
|
428
|
-
notification: Notification;
|
|
429
|
-
}) => string;
|
|
430
|
-
notificationImageLoadingFallback: (context: {
|
|
431
|
-
notification: Notification;
|
|
432
|
-
}) => string;
|
|
433
|
-
notificationImage: (context: {
|
|
434
|
-
notification: Notification;
|
|
435
|
-
}) => string;
|
|
436
|
-
notificationContent: (context: {
|
|
437
|
-
notification: Notification;
|
|
438
|
-
}) => string;
|
|
439
|
-
notificationTextContainer: (context: {
|
|
440
|
-
notification: Notification;
|
|
441
|
-
}) => string;
|
|
442
|
-
notificationSubject: (context: {
|
|
443
|
-
notification: Notification;
|
|
444
|
-
}) => string;
|
|
445
|
-
notificationBody: (context: {
|
|
446
|
-
notification: Notification;
|
|
447
|
-
}) => string;
|
|
448
|
-
notificationDefaultActions: (context: {
|
|
449
|
-
notification: Notification;
|
|
450
|
-
}) => string;
|
|
451
|
-
notificationCustomActions: (context: {
|
|
452
|
-
notification: Notification;
|
|
453
|
-
}) => string;
|
|
454
|
-
notificationPrimaryAction__button: (context: {
|
|
455
|
-
notification: Notification;
|
|
456
|
-
}) => string;
|
|
457
|
-
notificationSecondaryAction__button: (context: {
|
|
458
|
-
notification: Notification;
|
|
459
|
-
}) => string;
|
|
460
|
-
notificationDate: (context: {
|
|
461
|
-
notification: Notification;
|
|
462
|
-
}) => string;
|
|
463
|
-
notificationDeliveredAt__badge: (context: {
|
|
464
|
-
notification: Notification;
|
|
465
|
-
}) => string;
|
|
466
|
-
notificationDeliveredAt__icon: (context: {
|
|
467
|
-
notification: Notification;
|
|
468
|
-
}) => string;
|
|
469
|
-
notificationSnoozedUntil__icon: (context: {
|
|
470
|
-
notification: Notification;
|
|
471
|
-
}) => string;
|
|
472
|
-
notificationDot: (context: {
|
|
473
|
-
notification: Notification;
|
|
474
|
-
}) => string;
|
|
475
|
-
};
|
|
476
|
-
type AppearanceCallbackKeys = keyof AppearanceCallback;
|
|
477
|
-
type AppearanceCallbackFunction<K extends AppearanceCallbackKeys> = AppearanceCallback[K];
|
|
478
|
-
type AppearanceKey = (typeof appearanceKeys)[number];
|
|
479
|
-
type Elements = Partial<{
|
|
480
|
-
[K in Exclude<AppearanceKey, AppearanceCallbackKeys>]: ElementStyles;
|
|
481
|
-
} & {
|
|
482
|
-
[K in Extract<AppearanceKey, AppearanceCallbackKeys>]: ElementStyles | AppearanceCallbackFunction<K>;
|
|
483
|
-
}>;
|
|
484
|
-
type IconKey = 'bell' | 'clock' | 'arrowDropDown' | 'dots' | 'markAsRead' | 'cogs' | 'trash' | 'markAsArchived' | 'markAsArchivedRead' | 'markAsUnread' | 'markAsUnarchived' | 'unsnooze' | 'arrowRight' | 'arrowLeft' | 'unread' | 'sms' | 'inApp' | 'email' | 'push' | 'chat' | 'check' | 'arrowDown' | 'routeFill' | 'info' | 'nodeTree' | 'calendarSchedule' | 'copy';
|
|
485
|
-
type IconRenderer = (el: HTMLDivElement, props: {
|
|
486
|
-
class?: string;
|
|
487
|
-
}) => () => void;
|
|
488
|
-
type IconOverrides = {
|
|
489
|
-
[key in IconKey]?: IconRenderer;
|
|
490
|
-
};
|
|
491
|
-
type Theme = {
|
|
492
|
-
variables?: Variables;
|
|
493
|
-
elements?: Elements;
|
|
494
|
-
animations?: boolean;
|
|
495
|
-
icons?: IconOverrides;
|
|
496
|
-
};
|
|
497
|
-
type Appearance = Theme & {
|
|
498
|
-
baseTheme?: Theme | Theme[];
|
|
499
|
-
};
|
|
500
|
-
type BaseNovuProviderProps = {
|
|
501
|
-
container?: Node | string | null;
|
|
502
|
-
appearance?: Appearance;
|
|
503
|
-
localization?: Localization;
|
|
504
|
-
options: NovuOptions;
|
|
505
|
-
tabs?: Array<Tab>;
|
|
506
|
-
preferencesFilter?: PreferencesFilter;
|
|
507
|
-
preferenceGroups?: PreferenceGroups;
|
|
508
|
-
preferencesSort?: PreferencesSort;
|
|
509
|
-
routerPush?: RouterPush;
|
|
510
|
-
novu?: Novu;
|
|
511
|
-
};
|
|
512
|
-
type NovuProviderProps = BaseNovuProviderProps & {
|
|
513
|
-
renderNotification?: NotificationRenderer;
|
|
514
|
-
renderBell?: BellRenderer;
|
|
515
|
-
};
|
|
516
|
-
declare enum NotificationStatus {
|
|
517
|
-
UNREAD_READ = "unreadRead",
|
|
518
|
-
UNREAD = "unread",
|
|
519
|
-
ARCHIVED = "archived",
|
|
520
|
-
SNOOZED = "snoozed"
|
|
521
|
-
}
|
|
522
|
-
type PreferencesFilter = Pick<NotificationFilter, 'tags' | 'severity'> & {
|
|
523
|
-
criticality?: WorkflowCriticalityEnum;
|
|
524
|
-
};
|
|
525
|
-
type PreferencesSort = (a: Preference, b: Preference) => number;
|
|
526
|
-
type PreferenceFilterFunction = (args: {
|
|
527
|
-
preferences: Preference[];
|
|
528
|
-
}) => Preference[];
|
|
529
|
-
type PreferenceGroupFilter = (PreferencesFilter & {
|
|
530
|
-
workflowIds?: string[];
|
|
531
|
-
}) | PreferenceFilterFunction;
|
|
532
|
-
type PreferenceGroups = Array<{
|
|
533
|
-
name: string;
|
|
534
|
-
filter: PreferenceGroupFilter;
|
|
535
|
-
}>;
|
|
536
|
-
|
|
537
|
-
export { type AvatarRenderer as A, type BellRenderer as B, type CustomActionsRenderer as C, type DefaultActionsRenderer as D, type ElementStyles as E, type IconKey as I, 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 Appearance as f, type PreferenceGroups as g, type PreferencesSort as h, type AppearanceCallback as i, type AppearanceCallbackFunction as j, type AppearanceCallbackKeys as k, type AppearanceKey as l, type Elements as m, type IconOverrides as n, type IconRenderer as o, type LocalizationKey as p, NotificationStatus as q, type Theme as r };
|