@novu/js 3.8.1 → 3.9.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-JOKRZMGH.js → chunk-TAYTG4H3.js} +77 -23
- package/dist/cjs/index.d.ts +6 -5
- package/dist/cjs/index.js +18 -10
- package/dist/cjs/internal/index.d.ts +1 -1
- package/dist/{esm/novu-CktM1OXQ.d.mts → cjs/novu-_TLnMLv6.d.ts} +14 -4
- package/dist/cjs/themes/index.d.ts +3 -3
- package/dist/cjs/themes/index.js +10 -0
- package/dist/{esm/types-CiFWY1AG.d.mts → cjs/types-DfB6oB2v.d.ts} +16 -1
- package/dist/cjs/types-DhzxFu7R.d.ts +443 -0
- package/dist/cjs/ui/index.d.ts +13 -4
- package/dist/cjs/ui/index.js +1314 -365
- package/dist/esm/{chunk-HL3WZM2B.mjs → chunk-SH2NZJC6.mjs} +76 -24
- package/dist/esm/index.d.mts +6 -5
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal/index.d.mts +1 -1
- package/dist/{cjs/novu-D6fucMvr.d.ts → esm/novu-uWXW2_yT.d.mts} +14 -4
- package/dist/esm/themes/index.d.mts +3 -3
- package/dist/esm/themes/index.mjs +10 -0
- package/dist/{cjs/types-CiFWY1AG.d.ts → esm/types-DfB6oB2v.d.mts} +16 -1
- package/dist/esm/types-KJGvXLvJ.d.mts +443 -0
- package/dist/esm/ui/index.d.mts +13 -4
- package/dist/esm/ui/index.mjs +1307 -358
- package/dist/index.css +1 -1
- package/dist/novu.min.js +12 -12
- package/dist/novu.min.js.gz +0 -0
- package/package.json +1 -1
- package/dist/cjs/types-B3PJouaR.d.ts +0 -143
- package/dist/esm/types-C8yNgqZQ.d.mts +0 -143
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { N as Notification, P as Preference, b as Novu } from './novu-_TLnMLv6.js';
|
|
2
|
+
import { U as UnreadCount, N as NotificationFilter, d as NovuOptions } from './types-DfB6oB2v.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", "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.workflow.disabled.notice': "Contact admin to enable subscription management for this critical notification.";
|
|
34
|
+
readonly 'preferences.workflow.disabled.tooltip': "Contact admin to edit";
|
|
35
|
+
readonly 'preferences.group.info': "Applies to all notifications under this group.";
|
|
36
|
+
readonly 'snooze.datePicker.timePickerLabel': "Time";
|
|
37
|
+
readonly 'snooze.datePicker.apply': "Apply";
|
|
38
|
+
readonly 'snooze.datePicker.cancel': "Cancel";
|
|
39
|
+
readonly 'snooze.options.anHourFromNow': "An hour from now";
|
|
40
|
+
readonly 'snooze.datePicker.pastDateTooltip': "Selected time must be at least 3 minutes in the future";
|
|
41
|
+
readonly 'snooze.datePicker.noDateSelectedTooltip': "Please select a date";
|
|
42
|
+
readonly 'snooze.datePicker.exceedingLimitTooltip': ({ days }: {
|
|
43
|
+
days: number;
|
|
44
|
+
}) => string;
|
|
45
|
+
readonly 'snooze.options.customTime': "Custom time...";
|
|
46
|
+
readonly 'snooze.options.inOneDay': "Tomorrow";
|
|
47
|
+
readonly 'snooze.options.inOneWeek': "Next week";
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
type LocalizationKey = keyof typeof defaultLocalization;
|
|
51
|
+
type Localization = {
|
|
52
|
+
[K in LocalizationKey]?: (typeof defaultLocalization)[K] extends (...args: infer P) => any ? ((...args: P) => ReturnType<(typeof defaultLocalization)[K]>) | string : string;
|
|
53
|
+
} & {
|
|
54
|
+
dynamic?: Record<string, string>;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
type NotificationClickHandler = (notification: Notification) => void;
|
|
58
|
+
type NotificationActionClickHandler = (notification: Notification) => void;
|
|
59
|
+
type NotificationRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
60
|
+
type AvatarRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
61
|
+
type SubjectRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
62
|
+
type BodyRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
63
|
+
type DefaultActionsRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
64
|
+
type CustomActionsRenderer = (el: HTMLDivElement, notification: Notification) => () => void;
|
|
65
|
+
type BellRenderer = (el: HTMLDivElement, unreadCount: UnreadCount) => () => void;
|
|
66
|
+
type RouterPush = (path: string) => void;
|
|
67
|
+
type Tab = {
|
|
68
|
+
label: string;
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated Use `filter` instead
|
|
71
|
+
*/
|
|
72
|
+
value?: Array<string>;
|
|
73
|
+
filter?: Pick<NotificationFilter, 'tags' | 'data' | 'severity'>;
|
|
74
|
+
};
|
|
75
|
+
type CSSProperties = {
|
|
76
|
+
[key: string]: string | number;
|
|
77
|
+
};
|
|
78
|
+
type ElementStyles = string | CSSProperties;
|
|
79
|
+
type Variables = {
|
|
80
|
+
colorBackground?: string;
|
|
81
|
+
colorForeground?: string;
|
|
82
|
+
colorPrimary?: string;
|
|
83
|
+
colorPrimaryForeground?: string;
|
|
84
|
+
colorSecondary?: string;
|
|
85
|
+
colorSecondaryForeground?: string;
|
|
86
|
+
colorCounter?: string;
|
|
87
|
+
colorCounterForeground?: string;
|
|
88
|
+
colorNeutral?: string;
|
|
89
|
+
colorShadow?: string;
|
|
90
|
+
colorRing?: string;
|
|
91
|
+
fontSize?: string;
|
|
92
|
+
borderRadius?: string;
|
|
93
|
+
colorStripes?: string;
|
|
94
|
+
colorSeverityHigh?: string;
|
|
95
|
+
colorSeverityMedium?: string;
|
|
96
|
+
colorSeverityLow?: string;
|
|
97
|
+
};
|
|
98
|
+
type AppearanceCallback = {
|
|
99
|
+
bellDot: (context: {
|
|
100
|
+
unreadCount: {
|
|
101
|
+
total: number;
|
|
102
|
+
severity: Record<string, number>;
|
|
103
|
+
};
|
|
104
|
+
}) => string;
|
|
105
|
+
bellIcon: (context: {
|
|
106
|
+
unreadCount: {
|
|
107
|
+
total: number;
|
|
108
|
+
severity: Record<string, number>;
|
|
109
|
+
};
|
|
110
|
+
}) => string;
|
|
111
|
+
bellContainer: (context: {
|
|
112
|
+
unreadCount: {
|
|
113
|
+
total: number;
|
|
114
|
+
severity: Record<string, number>;
|
|
115
|
+
};
|
|
116
|
+
}) => string;
|
|
117
|
+
severityHigh__bellContainer: (context: {
|
|
118
|
+
unreadCount: {
|
|
119
|
+
total: number;
|
|
120
|
+
severity: Record<string, number>;
|
|
121
|
+
};
|
|
122
|
+
}) => string;
|
|
123
|
+
severityMedium__bellContainer: (context: {
|
|
124
|
+
unreadCount: {
|
|
125
|
+
total: number;
|
|
126
|
+
severity: Record<string, number>;
|
|
127
|
+
};
|
|
128
|
+
}) => string;
|
|
129
|
+
severityLow__bellContainer: (context: {
|
|
130
|
+
unreadCount: {
|
|
131
|
+
total: number;
|
|
132
|
+
severity: Record<string, number>;
|
|
133
|
+
};
|
|
134
|
+
}) => string;
|
|
135
|
+
bellSeverityGlow: (context: {
|
|
136
|
+
unreadCount: {
|
|
137
|
+
total: number;
|
|
138
|
+
severity: Record<string, number>;
|
|
139
|
+
};
|
|
140
|
+
}) => string;
|
|
141
|
+
severityGlowHigh__bellSeverityGlow: (context: {
|
|
142
|
+
unreadCount: {
|
|
143
|
+
total: number;
|
|
144
|
+
severity: Record<string, number>;
|
|
145
|
+
};
|
|
146
|
+
}) => string;
|
|
147
|
+
severityGlowMedium__bellSeverityGlow: (context: {
|
|
148
|
+
unreadCount: {
|
|
149
|
+
total: number;
|
|
150
|
+
severity: Record<string, number>;
|
|
151
|
+
};
|
|
152
|
+
}) => string;
|
|
153
|
+
severityGlowLow__bellSeverityGlow: (context: {
|
|
154
|
+
unreadCount: {
|
|
155
|
+
total: number;
|
|
156
|
+
severity: Record<string, number>;
|
|
157
|
+
};
|
|
158
|
+
}) => string;
|
|
159
|
+
preferencesContainer: (context: {
|
|
160
|
+
preferences?: Preference[];
|
|
161
|
+
groups: Array<{
|
|
162
|
+
name: string;
|
|
163
|
+
preferences: Preference[];
|
|
164
|
+
}>;
|
|
165
|
+
}) => string;
|
|
166
|
+
workflowContainer: (context: {
|
|
167
|
+
preference: Preference;
|
|
168
|
+
}) => string;
|
|
169
|
+
workflowLabelContainer: (context: {
|
|
170
|
+
preference: Preference;
|
|
171
|
+
}) => string;
|
|
172
|
+
workflowLabelHeader: (context: {
|
|
173
|
+
preference: Preference;
|
|
174
|
+
}) => string;
|
|
175
|
+
workflowLabelHeaderContainer: (context: {
|
|
176
|
+
preference: Preference;
|
|
177
|
+
}) => string;
|
|
178
|
+
workflowLabelIcon: (context: {
|
|
179
|
+
preference: Preference;
|
|
180
|
+
}) => string;
|
|
181
|
+
workflowLabel: (context: {
|
|
182
|
+
preference: Preference;
|
|
183
|
+
}) => string;
|
|
184
|
+
workflowArrow__icon: (context: {
|
|
185
|
+
preference: Preference;
|
|
186
|
+
}) => string;
|
|
187
|
+
workflowContainerRight__icon: (context: {
|
|
188
|
+
preference: Preference;
|
|
189
|
+
}) => string;
|
|
190
|
+
channelsContainer: (context: {
|
|
191
|
+
preference: Preference;
|
|
192
|
+
}) => string;
|
|
193
|
+
channelName: (context: {
|
|
194
|
+
preference: Preference;
|
|
195
|
+
}) => string;
|
|
196
|
+
channelContainer: (context: {
|
|
197
|
+
preference?: Preference;
|
|
198
|
+
preferenceGroup?: {
|
|
199
|
+
name: string;
|
|
200
|
+
preferences: Preference[];
|
|
201
|
+
};
|
|
202
|
+
}) => string;
|
|
203
|
+
channelLabelContainer: (context: {
|
|
204
|
+
preference?: Preference;
|
|
205
|
+
preferenceGroup?: {
|
|
206
|
+
name: string;
|
|
207
|
+
preferences: Preference[];
|
|
208
|
+
};
|
|
209
|
+
}) => string;
|
|
210
|
+
channelIconContainer: (context: {
|
|
211
|
+
preference?: Preference;
|
|
212
|
+
preferenceGroup?: {
|
|
213
|
+
name: string;
|
|
214
|
+
preferences: Preference[];
|
|
215
|
+
};
|
|
216
|
+
}) => string;
|
|
217
|
+
channelLabel: (context: {
|
|
218
|
+
preference?: Preference;
|
|
219
|
+
preferenceGroup?: {
|
|
220
|
+
name: string;
|
|
221
|
+
preferences: Preference[];
|
|
222
|
+
};
|
|
223
|
+
}) => string;
|
|
224
|
+
channelSwitchContainer: (context: {
|
|
225
|
+
preference?: Preference;
|
|
226
|
+
preferenceGroup?: {
|
|
227
|
+
name: string;
|
|
228
|
+
preferences: Preference[];
|
|
229
|
+
};
|
|
230
|
+
}) => string;
|
|
231
|
+
channel__icon: (context: {
|
|
232
|
+
preference?: Preference;
|
|
233
|
+
preferenceGroup?: {
|
|
234
|
+
name: string;
|
|
235
|
+
preferences: Preference[];
|
|
236
|
+
};
|
|
237
|
+
}) => string;
|
|
238
|
+
preferencesGroupContainer: (context: {
|
|
239
|
+
preferenceGroup: {
|
|
240
|
+
name: string;
|
|
241
|
+
preferences: Preference[];
|
|
242
|
+
};
|
|
243
|
+
}) => string;
|
|
244
|
+
preferencesGroupHeader: (context: {
|
|
245
|
+
preferenceGroup: {
|
|
246
|
+
name: string;
|
|
247
|
+
preferences: Preference[];
|
|
248
|
+
};
|
|
249
|
+
}) => string;
|
|
250
|
+
preferencesGroupLabelContainer: (context: {
|
|
251
|
+
preferenceGroup: {
|
|
252
|
+
name: string;
|
|
253
|
+
preferences: Preference[];
|
|
254
|
+
};
|
|
255
|
+
}) => string;
|
|
256
|
+
preferencesGroupLabelIcon: (context: {
|
|
257
|
+
preferenceGroup: {
|
|
258
|
+
name: string;
|
|
259
|
+
preferences: Preference[];
|
|
260
|
+
};
|
|
261
|
+
}) => string;
|
|
262
|
+
preferencesGroupLabel: (context: {
|
|
263
|
+
preferenceGroup: {
|
|
264
|
+
name: string;
|
|
265
|
+
preferences: Preference[];
|
|
266
|
+
};
|
|
267
|
+
}) => string;
|
|
268
|
+
preferencesGroupActionsContainer: (context: {
|
|
269
|
+
preferenceGroup: {
|
|
270
|
+
name: string;
|
|
271
|
+
preferences: Preference[];
|
|
272
|
+
};
|
|
273
|
+
}) => string;
|
|
274
|
+
preferencesGroupActionsContainerRight__icon: (context: {
|
|
275
|
+
preferenceGroup: {
|
|
276
|
+
name: string;
|
|
277
|
+
preferences: Preference[];
|
|
278
|
+
};
|
|
279
|
+
}) => string;
|
|
280
|
+
preferencesGroupBody: (context: {
|
|
281
|
+
preferenceGroup: {
|
|
282
|
+
name: string;
|
|
283
|
+
preferences: Preference[];
|
|
284
|
+
};
|
|
285
|
+
}) => string;
|
|
286
|
+
preferencesGroupChannels: (context: {
|
|
287
|
+
preferenceGroup: {
|
|
288
|
+
name: string;
|
|
289
|
+
preferences: Preference[];
|
|
290
|
+
};
|
|
291
|
+
}) => string;
|
|
292
|
+
preferencesGroupInfo: (context: {
|
|
293
|
+
preferenceGroup: {
|
|
294
|
+
name: string;
|
|
295
|
+
preferences: Preference[];
|
|
296
|
+
};
|
|
297
|
+
}) => string;
|
|
298
|
+
preferencesGroupInfoIcon: (context: {
|
|
299
|
+
preferenceGroup: {
|
|
300
|
+
name: string;
|
|
301
|
+
preferences: Preference[];
|
|
302
|
+
};
|
|
303
|
+
}) => string;
|
|
304
|
+
preferencesGroupWorkflows: (context: {
|
|
305
|
+
preferenceGroup: {
|
|
306
|
+
name: string;
|
|
307
|
+
preferences: Preference[];
|
|
308
|
+
};
|
|
309
|
+
}) => string;
|
|
310
|
+
notificationList: (context: {
|
|
311
|
+
notifications: Notification[];
|
|
312
|
+
}) => string;
|
|
313
|
+
notificationListContainer: (context: {
|
|
314
|
+
notifications: Notification[];
|
|
315
|
+
}) => string;
|
|
316
|
+
notification: (context: {
|
|
317
|
+
notification: Notification;
|
|
318
|
+
}) => string;
|
|
319
|
+
severityHigh__notification: (context: {
|
|
320
|
+
notification: Notification;
|
|
321
|
+
}) => string;
|
|
322
|
+
severityMedium__notification: (context: {
|
|
323
|
+
notification: Notification;
|
|
324
|
+
}) => string;
|
|
325
|
+
severityLow__notification: (context: {
|
|
326
|
+
notification: Notification;
|
|
327
|
+
}) => string;
|
|
328
|
+
notificationBar: (context: {
|
|
329
|
+
notification: Notification;
|
|
330
|
+
}) => string;
|
|
331
|
+
severityHigh__notificationBar: (context: {
|
|
332
|
+
notification: Notification;
|
|
333
|
+
}) => string;
|
|
334
|
+
severityMedium__notificationBar: (context: {
|
|
335
|
+
notification: Notification;
|
|
336
|
+
}) => string;
|
|
337
|
+
severityLow__notificationBar: (context: {
|
|
338
|
+
notification: Notification;
|
|
339
|
+
}) => string;
|
|
340
|
+
notificationImageLoadingFallback: (context: {
|
|
341
|
+
notification: Notification;
|
|
342
|
+
}) => string;
|
|
343
|
+
notificationImage: (context: {
|
|
344
|
+
notification: Notification;
|
|
345
|
+
}) => string;
|
|
346
|
+
notificationContent: (context: {
|
|
347
|
+
notification: Notification;
|
|
348
|
+
}) => string;
|
|
349
|
+
notificationTextContainer: (context: {
|
|
350
|
+
notification: Notification;
|
|
351
|
+
}) => string;
|
|
352
|
+
notificationSubject: (context: {
|
|
353
|
+
notification: Notification;
|
|
354
|
+
}) => string;
|
|
355
|
+
notificationBody: (context: {
|
|
356
|
+
notification: Notification;
|
|
357
|
+
}) => string;
|
|
358
|
+
notificationDefaultActions: (context: {
|
|
359
|
+
notification: Notification;
|
|
360
|
+
}) => string;
|
|
361
|
+
notificationCustomActions: (context: {
|
|
362
|
+
notification: Notification;
|
|
363
|
+
}) => string;
|
|
364
|
+
notificationPrimaryAction__button: (context: {
|
|
365
|
+
notification: Notification;
|
|
366
|
+
}) => string;
|
|
367
|
+
notificationSecondaryAction__button: (context: {
|
|
368
|
+
notification: Notification;
|
|
369
|
+
}) => string;
|
|
370
|
+
notificationDate: (context: {
|
|
371
|
+
notification: Notification;
|
|
372
|
+
}) => string;
|
|
373
|
+
notificationDeliveredAt__badge: (context: {
|
|
374
|
+
notification: Notification;
|
|
375
|
+
}) => string;
|
|
376
|
+
notificationDeliveredAt__icon: (context: {
|
|
377
|
+
notification: Notification;
|
|
378
|
+
}) => string;
|
|
379
|
+
notificationSnoozedUntil__icon: (context: {
|
|
380
|
+
notification: Notification;
|
|
381
|
+
}) => string;
|
|
382
|
+
notificationDot: (context: {
|
|
383
|
+
notification: Notification;
|
|
384
|
+
}) => string;
|
|
385
|
+
};
|
|
386
|
+
type AppearanceCallbackKeys = keyof AppearanceCallback;
|
|
387
|
+
type AppearanceCallbackFunction<K extends AppearanceCallbackKeys> = AppearanceCallback[K];
|
|
388
|
+
type AppearanceKey = (typeof appearanceKeys)[number];
|
|
389
|
+
type Elements = Partial<{
|
|
390
|
+
[K in Exclude<AppearanceKey, AppearanceCallbackKeys>]: ElementStyles;
|
|
391
|
+
} & {
|
|
392
|
+
[K in Extract<AppearanceKey, AppearanceCallbackKeys>]: ElementStyles | AppearanceCallbackFunction<K>;
|
|
393
|
+
}>;
|
|
394
|
+
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';
|
|
395
|
+
type IconRenderer = (el: HTMLDivElement, props: {
|
|
396
|
+
class?: string;
|
|
397
|
+
}) => () => void;
|
|
398
|
+
type IconOverrides = {
|
|
399
|
+
[key in IconKey]?: IconRenderer;
|
|
400
|
+
};
|
|
401
|
+
type Theme = {
|
|
402
|
+
variables?: Variables;
|
|
403
|
+
elements?: Elements;
|
|
404
|
+
animations?: boolean;
|
|
405
|
+
icons?: IconOverrides;
|
|
406
|
+
};
|
|
407
|
+
type Appearance = Theme & {
|
|
408
|
+
baseTheme?: Theme | Theme[];
|
|
409
|
+
};
|
|
410
|
+
type BaseNovuProviderProps = {
|
|
411
|
+
container?: Node | string | null;
|
|
412
|
+
appearance?: Appearance;
|
|
413
|
+
localization?: Localization;
|
|
414
|
+
options: NovuOptions;
|
|
415
|
+
tabs?: Array<Tab>;
|
|
416
|
+
preferencesFilter?: PreferencesFilter;
|
|
417
|
+
preferenceGroups?: PreferenceGroups;
|
|
418
|
+
routerPush?: RouterPush;
|
|
419
|
+
novu?: Novu;
|
|
420
|
+
};
|
|
421
|
+
type NovuProviderProps = BaseNovuProviderProps & {
|
|
422
|
+
renderNotification?: NotificationRenderer;
|
|
423
|
+
renderBell?: BellRenderer;
|
|
424
|
+
};
|
|
425
|
+
declare enum NotificationStatus {
|
|
426
|
+
UNREAD_READ = "unreadRead",
|
|
427
|
+
UNREAD = "unread",
|
|
428
|
+
ARCHIVED = "archived",
|
|
429
|
+
SNOOZED = "snoozed"
|
|
430
|
+
}
|
|
431
|
+
type PreferencesFilter = Pick<NotificationFilter, 'tags' | 'severity'>;
|
|
432
|
+
type PreferenceFilterFunction = (args: {
|
|
433
|
+
preferences: Preference[];
|
|
434
|
+
}) => Preference[];
|
|
435
|
+
type PreferenceGroupFilter = (PreferencesFilter & {
|
|
436
|
+
workflowIds?: string[];
|
|
437
|
+
}) | PreferenceFilterFunction;
|
|
438
|
+
type PreferenceGroups = Array<{
|
|
439
|
+
name: string;
|
|
440
|
+
filter: PreferenceGroupFilter;
|
|
441
|
+
}>;
|
|
442
|
+
|
|
443
|
+
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 AppearanceCallback as h, type AppearanceCallbackFunction as i, type AppearanceCallbackKeys as j, type AppearanceKey as k, type Elements as l, type IconOverrides as m, type IconRenderer as n, type LocalizationKey as o, NotificationStatus as p, type Theme as q };
|
package/dist/cjs/ui/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { N as Notification } from '../novu-
|
|
2
|
-
import { d as NovuOptions } from '../types-
|
|
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,
|
|
4
|
-
export {
|
|
1
|
+
export { N as Notification } from '../novu-_TLnMLv6.js';
|
|
2
|
+
import { d as NovuOptions } from '../types-DfB6oB2v.js';
|
|
3
|
+
import { B as BellRenderer, N as NotificationClickHandler, a as NotificationActionClickHandler, b as NotificationRenderer, A as AvatarRenderer, S as SubjectRenderer, c as BodyRenderer, D as DefaultActionsRenderer, C as CustomActionsRenderer, d as NovuProviderProps, e as BaseNovuProviderProps, f as Appearance, L as Localization, T as Tab, P as PreferencesFilter, g as PreferenceGroups, R as RouterPush } from '../types-DhzxFu7R.js';
|
|
4
|
+
export { h as AppearanceCallback, i as AppearanceCallbackFunction, j as AppearanceCallbackKeys, k as AppearanceKey, E as ElementStyles, l as Elements, I as IconKey, m as IconOverrides, n as IconRenderer, o as LocalizationKey, p as NotificationStatus, q as Theme, V as Variables } from '../types-DhzxFu7R.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';
|
|
@@ -9,18 +9,27 @@ import { MountableElement } from 'solid-js/web';
|
|
|
9
9
|
|
|
10
10
|
type NotificationRendererProps = {
|
|
11
11
|
renderNotification: NotificationRenderer;
|
|
12
|
+
renderAvatar?: never;
|
|
12
13
|
renderSubject?: never;
|
|
13
14
|
renderBody?: never;
|
|
15
|
+
renderDefaultActions?: never;
|
|
16
|
+
renderCustomActions?: never;
|
|
14
17
|
};
|
|
15
18
|
type SubjectBodyRendererProps = {
|
|
16
19
|
renderNotification?: never;
|
|
20
|
+
renderAvatar?: AvatarRenderer;
|
|
17
21
|
renderSubject?: SubjectRenderer;
|
|
18
22
|
renderBody?: BodyRenderer;
|
|
23
|
+
renderDefaultActions?: DefaultActionsRenderer;
|
|
24
|
+
renderCustomActions?: CustomActionsRenderer;
|
|
19
25
|
};
|
|
20
26
|
type NoRendererProps = {
|
|
21
27
|
renderNotification?: undefined;
|
|
28
|
+
renderAvatar?: undefined;
|
|
22
29
|
renderSubject?: undefined;
|
|
23
30
|
renderBody?: undefined;
|
|
31
|
+
renderDefaultActions?: undefined;
|
|
32
|
+
renderCustomActions?: undefined;
|
|
24
33
|
};
|
|
25
34
|
type InboxProps = {
|
|
26
35
|
open?: boolean;
|