@novu/js 2.1.0 → 2.1.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-UUYKXZBW.js → chunk-D7P7KCZI.js} +361 -271
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +14 -14
- package/dist/cjs/{novu-PgupDkfH.d.ts → novu-04KlkBy4.d.ts} +24 -14
- package/dist/cjs/ui/index.d.ts +2 -2
- package/dist/cjs/ui/index.js +209 -116
- package/dist/esm/{chunk-PCEUODSO.mjs → chunk-APRCCICD.mjs} +361 -271
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/{novu-PgupDkfH.d.mts → novu-04KlkBy4.d.mts} +24 -14
- package/dist/esm/ui/index.d.mts +2 -2
- package/dist/esm/ui/index.mjs +118 -25
- package/dist/novu.min.js +10 -10
- package/dist/novu.min.js.gz +0 -0
- package/package.json +1 -1
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NotificationFilter } from './novu-
|
|
2
|
-
export { k as Action, A as ActionTypeEnum, m as ChannelPreference, f as ChannelType, C as CtaType, E as EventHandler, a as Events, F as FiltersCountResponse, q as IPreferenceOverride, I as InboxNotification, L as ListNotificationsResponse, i as MessageAction, M as MessageButton, t as Notification, e as NotificationActionStatus, d as NotificationButton, c as NotificationStatus, b as Novu, v as NovuError, s as NovuOptions, n as PaginatedResponse, u as Preference, P as PreferenceLevel, g as PreferenceOverrideSource, p as PreferenceOverrideSourceEnum, o as PreferencesResponse, R as Redirect, r as Result, h as Session, S as SocketEventNames, j as Subscriber, T as TODO, W as WebSocketEvent, l as Workflow } from './novu-
|
|
1
|
+
import { N as NotificationFilter } from './novu-04KlkBy4.mjs';
|
|
2
|
+
export { k as Action, A as ActionTypeEnum, m as ChannelPreference, f as ChannelType, C as CtaType, E as EventHandler, a as Events, F as FiltersCountResponse, q as IPreferenceOverride, I as InboxNotification, L as ListNotificationsResponse, i as MessageAction, M as MessageButton, t as Notification, e as NotificationActionStatus, d as NotificationButton, c as NotificationStatus, b as Novu, v as NovuError, s as NovuOptions, n as PaginatedResponse, u as Preference, P as PreferenceLevel, g as PreferenceOverrideSource, p as PreferenceOverrideSourceEnum, o as PreferencesResponse, R as Redirect, r as Result, h as Session, S as SocketEventNames, j as Subscriber, T as TODO, W as WebSocketEvent, l as Workflow } from './novu-04KlkBy4.mjs';
|
|
3
3
|
import '@novu/client';
|
|
4
4
|
|
|
5
5
|
declare const areTagsEqual: (tags1?: string[], tags2?: string[]) => boolean;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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-APRCCICD.mjs';
|
|
@@ -12,7 +12,10 @@ declare class Preference {
|
|
|
12
12
|
readonly enabled: boolean;
|
|
13
13
|
readonly channels: ChannelPreference;
|
|
14
14
|
readonly workflow?: Workflow;
|
|
15
|
-
constructor(preference: PreferenceLike
|
|
15
|
+
constructor(preference: PreferenceLike, { emitterInstance, inboxServiceInstance }: {
|
|
16
|
+
emitterInstance: NovuEventEmitter;
|
|
17
|
+
inboxServiceInstance: InboxService;
|
|
18
|
+
});
|
|
16
19
|
update({ channelPreferences }: {
|
|
17
20
|
channelPreferences: ChannelPreference;
|
|
18
21
|
}): Result<Preference>;
|
|
@@ -232,9 +235,12 @@ declare class InboxService {
|
|
|
232
235
|
|
|
233
236
|
declare class BaseModule {
|
|
234
237
|
#private;
|
|
235
|
-
_inboxService: InboxService;
|
|
236
|
-
_emitter: NovuEventEmitter;
|
|
237
|
-
constructor(
|
|
238
|
+
protected _inboxService: InboxService;
|
|
239
|
+
protected _emitter: NovuEventEmitter;
|
|
240
|
+
constructor({ inboxServiceInstance, eventEmitterInstance, }: {
|
|
241
|
+
inboxServiceInstance: InboxService;
|
|
242
|
+
eventEmitterInstance: NovuEventEmitter;
|
|
243
|
+
});
|
|
238
244
|
protected onSessionSuccess(_: Session): void;
|
|
239
245
|
protected onSessionError(_: unknown): void;
|
|
240
246
|
callWithSession<T>(fn: () => Result<T>): Result<T>;
|
|
@@ -258,7 +264,7 @@ declare class Notification implements Pick<NovuEventEmitter, 'on' | 'off'>, Inbo
|
|
|
258
264
|
readonly tags: InboxNotification['tags'];
|
|
259
265
|
readonly redirect: InboxNotification['redirect'];
|
|
260
266
|
readonly data?: InboxNotification['data'];
|
|
261
|
-
constructor(notification: InboxNotification);
|
|
267
|
+
constructor(notification: InboxNotification, emitter: NovuEventEmitter, inboxService: InboxService);
|
|
262
268
|
read(): Result<Notification>;
|
|
263
269
|
unread(): Result<Notification>;
|
|
264
270
|
archive(): Result<Notification>;
|
|
@@ -323,7 +329,9 @@ type RevertArgs = BaseArgs | InstanceArgs;
|
|
|
323
329
|
|
|
324
330
|
declare class NotificationsCache {
|
|
325
331
|
#private;
|
|
326
|
-
constructor(
|
|
332
|
+
constructor({ emitter }: {
|
|
333
|
+
emitter: NovuEventEmitter;
|
|
334
|
+
});
|
|
327
335
|
private updateNotification;
|
|
328
336
|
private removeNotification;
|
|
329
337
|
private handleNotificationEvent;
|
|
@@ -344,8 +352,10 @@ declare class NotificationsCache {
|
|
|
344
352
|
declare class Notifications extends BaseModule {
|
|
345
353
|
#private;
|
|
346
354
|
readonly cache: NotificationsCache;
|
|
347
|
-
constructor({ useCache }: {
|
|
355
|
+
constructor({ useCache, inboxServiceInstance, eventEmitterInstance, }: {
|
|
348
356
|
useCache: boolean;
|
|
357
|
+
inboxServiceInstance: InboxService;
|
|
358
|
+
eventEmitterInstance: NovuEventEmitter;
|
|
349
359
|
});
|
|
350
360
|
list({ limit, ...restOptions }?: ListNotificationsArgs): Result<ListNotificationsResponse>;
|
|
351
361
|
count(args?: FilterCountArgs): Result<FilterCountResponse>;
|
|
@@ -474,13 +484,9 @@ type EventNames = keyof Events;
|
|
|
474
484
|
type SocketEventNames = keyof SocketEvents;
|
|
475
485
|
type EventHandler<T = unknown> = (event: T) => void;
|
|
476
486
|
|
|
477
|
-
type SingletonOptions = {
|
|
478
|
-
recreate: true;
|
|
479
|
-
};
|
|
480
487
|
declare class NovuEventEmitter {
|
|
481
488
|
#private;
|
|
482
|
-
|
|
483
|
-
private constructor();
|
|
489
|
+
constructor();
|
|
484
490
|
on<Key extends EventNames>(eventName: Key, listener: EventHandler<Events[Key]>): void;
|
|
485
491
|
off<Key extends EventNames>(eventName: Key, listener: EventHandler<Events[Key]>): void;
|
|
486
492
|
emit<Key extends EventNames>(type: Key, event?: Events[Key]): void;
|
|
@@ -488,7 +494,9 @@ declare class NovuEventEmitter {
|
|
|
488
494
|
|
|
489
495
|
declare class PreferencesCache {
|
|
490
496
|
#private;
|
|
491
|
-
constructor(
|
|
497
|
+
constructor({ emitterInstance }: {
|
|
498
|
+
emitterInstance: NovuEventEmitter;
|
|
499
|
+
});
|
|
492
500
|
private updatePreference;
|
|
493
501
|
private handlePreferenceEvent;
|
|
494
502
|
set(data: Preference[]): void;
|
|
@@ -499,8 +507,10 @@ declare class PreferencesCache {
|
|
|
499
507
|
declare class Preferences extends BaseModule {
|
|
500
508
|
#private;
|
|
501
509
|
readonly cache: PreferencesCache;
|
|
502
|
-
constructor({ useCache }: {
|
|
510
|
+
constructor({ useCache, inboxServiceInstance, eventEmitterInstance, }: {
|
|
503
511
|
useCache: boolean;
|
|
512
|
+
inboxServiceInstance: InboxService;
|
|
513
|
+
eventEmitterInstance: NovuEventEmitter;
|
|
504
514
|
});
|
|
505
515
|
list(): Result<Preference[]>;
|
|
506
516
|
update(args: UpdatePreferencesArgs): Result<Preference>;
|
package/dist/esm/ui/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Notification, s as NovuOptions, b as Novu } from '../novu-
|
|
1
|
+
import { t as Notification, s as NovuOptions, b as Novu } from '../novu-04KlkBy4.mjs';
|
|
2
2
|
import * as solid_js from 'solid-js';
|
|
3
3
|
import { ComponentProps } from 'solid-js';
|
|
4
4
|
import { MountableElement } from 'solid-js/web';
|
|
@@ -29,7 +29,7 @@ declare const defaultLocalization: {
|
|
|
29
29
|
readonly 'preferences.workflow.disabled.tooltip': "Contact admin to edit";
|
|
30
30
|
};
|
|
31
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", "notificationBody", "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", "channelsContainer", "channelLabel", "channelLabelContainer", "channelDescription", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__title", "preferencesLoadingContainer"];
|
|
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", "channelsContainer", "channelLabel", "channelLabelContainer", "channelDescription", "channelName", "channelSwitchContainer", "channelSwitch", "channelSwitchThumb", "preferencesHeader", "preferencesHeader__back__button", "preferencesHeader__title", "preferencesLoadingContainer", "strong"];
|
|
33
33
|
|
|
34
34
|
type LocalizationKey = keyof typeof defaultLocalization;
|
|
35
35
|
type Localization = {
|
package/dist/esm/ui/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __privateAdd, __privateSet, __privateMethod, __privateGet, __spreadProps, __spreadValues, __objRest, Novu, __async, isSameFilter } from '../chunk-
|
|
1
|
+
import { __privateAdd, __privateSet, __privateMethod, __privateGet, __spreadProps, __spreadValues, __objRest, Novu, __async, isSameFilter } from '../chunk-APRCCICD.mjs';
|
|
2
2
|
import { delegateEvents, render, createComponent, Portal, mergeProps, setAttribute, spread, template, insert, memo, effect, className, use, addEventListener, Dynamic, isServer } from 'solid-js/web';
|
|
3
3
|
import { createSignal, createContext, onMount, onCleanup, For, createMemo, createEffect, splitProps, useContext, Show, Switch as Switch$1, Match, createResource, createComputed, batch } from 'solid-js';
|
|
4
4
|
import { createStore, reconcile } from 'solid-js/store';
|
|
@@ -92,7 +92,9 @@ var appearanceKeys = [
|
|
|
92
92
|
"notification",
|
|
93
93
|
"notificationDot",
|
|
94
94
|
"notificationSubject",
|
|
95
|
+
"notificationSubject__strong",
|
|
95
96
|
"notificationBody",
|
|
97
|
+
"notificationBody__strong",
|
|
96
98
|
"notificationBodyContainer",
|
|
97
99
|
"notificationImage",
|
|
98
100
|
"notificationDate",
|
|
@@ -159,7 +161,9 @@ var appearanceKeys = [
|
|
|
159
161
|
"preferencesHeader__back__button",
|
|
160
162
|
"preferencesHeader__title",
|
|
161
163
|
// Preferences Loading
|
|
162
|
-
"preferencesLoadingContainer"
|
|
164
|
+
"preferencesLoadingContainer",
|
|
165
|
+
// Text formatting
|
|
166
|
+
"strong"
|
|
163
167
|
];
|
|
164
168
|
function createInfiniteScroll(fetcher) {
|
|
165
169
|
const [data, setData] = createSignal([]);
|
|
@@ -2809,10 +2813,90 @@ var PreferencesRow = (props) => {
|
|
|
2809
2813
|
});
|
|
2810
2814
|
};
|
|
2811
2815
|
delegateEvents(["click"]);
|
|
2812
|
-
var _tmpl$46 = /* @__PURE__ */ template(`<
|
|
2813
|
-
var _tmpl$213 = /* @__PURE__ */ template(`<
|
|
2814
|
-
var
|
|
2815
|
-
|
|
2816
|
+
var _tmpl$46 = /* @__PURE__ */ template(`<strong>`);
|
|
2817
|
+
var _tmpl$213 = /* @__PURE__ */ template(`<p>`);
|
|
2818
|
+
var parseMarkdownIntoTokens = (text) => {
|
|
2819
|
+
const tokens = [];
|
|
2820
|
+
let buffer = "";
|
|
2821
|
+
let inBold = false;
|
|
2822
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
2823
|
+
if (text[i] === "\\" && text[i + 1] === "*") {
|
|
2824
|
+
buffer += "*";
|
|
2825
|
+
i += 1;
|
|
2826
|
+
} else if (text[i] === "*" && text[i + 1] === "*") {
|
|
2827
|
+
if (buffer) {
|
|
2828
|
+
tokens.push({
|
|
2829
|
+
type: inBold ? "bold" : "text",
|
|
2830
|
+
content: buffer
|
|
2831
|
+
});
|
|
2832
|
+
buffer = "";
|
|
2833
|
+
}
|
|
2834
|
+
inBold = !inBold;
|
|
2835
|
+
i += 1;
|
|
2836
|
+
} else {
|
|
2837
|
+
buffer += text[i];
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
if (buffer) {
|
|
2841
|
+
tokens.push({
|
|
2842
|
+
type: inBold ? "bold" : "text",
|
|
2843
|
+
content: buffer
|
|
2844
|
+
});
|
|
2845
|
+
}
|
|
2846
|
+
return tokens;
|
|
2847
|
+
};
|
|
2848
|
+
var Bold = (props) => {
|
|
2849
|
+
const style = useStyle();
|
|
2850
|
+
return (() => {
|
|
2851
|
+
var _el$ = _tmpl$46();
|
|
2852
|
+
insert(_el$, () => props.children);
|
|
2853
|
+
effect(() => className(_el$, style(props.appearanceKey || "strong", "nt-font-semibold")));
|
|
2854
|
+
return _el$;
|
|
2855
|
+
})();
|
|
2856
|
+
};
|
|
2857
|
+
var Text = (props) => props.children;
|
|
2858
|
+
var Markdown = (props) => {
|
|
2859
|
+
const _a = props, {
|
|
2860
|
+
children,
|
|
2861
|
+
strongAppearanceKey
|
|
2862
|
+
} = _a, rest = __objRest(_a, [
|
|
2863
|
+
"children",
|
|
2864
|
+
"strongAppearanceKey"
|
|
2865
|
+
]);
|
|
2866
|
+
const tokens = createMemo(() => parseMarkdownIntoTokens(children));
|
|
2867
|
+
return (() => {
|
|
2868
|
+
var _el$2 = _tmpl$213();
|
|
2869
|
+
spread(_el$2, rest, false, true);
|
|
2870
|
+
insert(_el$2, createComponent(For, {
|
|
2871
|
+
get each() {
|
|
2872
|
+
return tokens();
|
|
2873
|
+
},
|
|
2874
|
+
children: (token) => {
|
|
2875
|
+
if (token.type === "bold") {
|
|
2876
|
+
return createComponent(Bold, {
|
|
2877
|
+
appearanceKey: strongAppearanceKey,
|
|
2878
|
+
get children() {
|
|
2879
|
+
return token.content;
|
|
2880
|
+
}
|
|
2881
|
+
});
|
|
2882
|
+
} else {
|
|
2883
|
+
return createComponent(Text, {
|
|
2884
|
+
get children() {
|
|
2885
|
+
return token.content;
|
|
2886
|
+
}
|
|
2887
|
+
});
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
}));
|
|
2891
|
+
return _el$2;
|
|
2892
|
+
})();
|
|
2893
|
+
};
|
|
2894
|
+
var Markdown_default = Markdown;
|
|
2895
|
+
|
|
2896
|
+
// src/ui/components/Notification/DefaultNotification.tsx
|
|
2897
|
+
var _tmpl$47 = /* @__PURE__ */ template(`<span>`);
|
|
2898
|
+
var _tmpl$214 = /* @__PURE__ */ template(`<img>`);
|
|
2899
|
+
var _tmpl$311 = /* @__PURE__ */ template(`<a><div><div class="nt-relative nt-shrink-0 nt-float-right"><p></p><div></div></div><div>`);
|
|
2816
2900
|
var DefaultNotification = (props) => {
|
|
2817
2901
|
const style = useStyle();
|
|
2818
2902
|
const {
|
|
@@ -2861,14 +2945,14 @@ var DefaultNotification = (props) => {
|
|
|
2861
2945
|
}
|
|
2862
2946
|
};
|
|
2863
2947
|
return (() => {
|
|
2864
|
-
var _el$ = _tmpl$
|
|
2948
|
+
var _el$ = _tmpl$311(), _el$4 = _el$.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling;
|
|
2865
2949
|
_el$.$$click = handleNotificationClick;
|
|
2866
2950
|
insert(_el$, createComponent(Show, {
|
|
2867
2951
|
get when() {
|
|
2868
2952
|
return !props.notification.isRead;
|
|
2869
2953
|
},
|
|
2870
2954
|
get children() {
|
|
2871
|
-
var _el$2 = _tmpl$
|
|
2955
|
+
var _el$2 = _tmpl$47();
|
|
2872
2956
|
effect(() => className(_el$2, style("notificationDot", "nt-absolute -nt-translate-x-[1.0625rem] nt-translate-y-1/2 nt-size-2.5 nt-bg-primary nt-rounded-full nt-border")));
|
|
2873
2957
|
return _el$2;
|
|
2874
2958
|
}
|
|
@@ -2878,7 +2962,7 @@ var DefaultNotification = (props) => {
|
|
|
2878
2962
|
return props.notification.avatar;
|
|
2879
2963
|
},
|
|
2880
2964
|
get children() {
|
|
2881
|
-
var _el$3 = _tmpl$
|
|
2965
|
+
var _el$3 = _tmpl$214();
|
|
2882
2966
|
effect((_p$) => {
|
|
2883
2967
|
var _v$ = style("notificationImage", "nt-size-8 nt-rounded-lg"), _v$2 = props.notification.avatar;
|
|
2884
2968
|
_v$ !== _p$.e && className(_el$3, _p$.e = _v$);
|
|
@@ -3021,15 +3105,26 @@ var DefaultNotification = (props) => {
|
|
|
3021
3105
|
get when() {
|
|
3022
3106
|
return props.notification.subject;
|
|
3023
3107
|
},
|
|
3108
|
+
children: (subject) => createComponent(Markdown_default, {
|
|
3109
|
+
get ["class"]() {
|
|
3110
|
+
return style("notificationSubject", "nt-text-start");
|
|
3111
|
+
},
|
|
3112
|
+
strongAppearanceKey: "notificationSubject__strong",
|
|
3113
|
+
get children() {
|
|
3114
|
+
return subject();
|
|
3115
|
+
}
|
|
3116
|
+
})
|
|
3117
|
+
}), _el$8);
|
|
3118
|
+
insert(_el$4, createComponent(Markdown_default, {
|
|
3119
|
+
get ["class"]() {
|
|
3120
|
+
return style("notificationBody", "nt-text-start");
|
|
3121
|
+
},
|
|
3122
|
+
strongAppearanceKey: "notificationBody__strong",
|
|
3024
3123
|
get children() {
|
|
3025
|
-
|
|
3026
|
-
insert(_el$8, () => props.notification.subject);
|
|
3027
|
-
effect(() => className(_el$8, style("notificationSubject", "nt-text-start nt-font-semibold")));
|
|
3028
|
-
return _el$8;
|
|
3124
|
+
return props.notification.body;
|
|
3029
3125
|
}
|
|
3030
|
-
}), _el$
|
|
3031
|
-
insert(_el$
|
|
3032
|
-
insert(_el$10, createComponent(Show, {
|
|
3126
|
+
}), _el$8);
|
|
3127
|
+
insert(_el$8, createComponent(Show, {
|
|
3033
3128
|
get when() {
|
|
3034
3129
|
return props.notification.primaryAction;
|
|
3035
3130
|
},
|
|
@@ -3043,7 +3138,7 @@ var DefaultNotification = (props) => {
|
|
|
3043
3138
|
}
|
|
3044
3139
|
})
|
|
3045
3140
|
}), null);
|
|
3046
|
-
insert(_el$
|
|
3141
|
+
insert(_el$8, createComponent(Show, {
|
|
3047
3142
|
get when() {
|
|
3048
3143
|
return props.notification.secondaryAction;
|
|
3049
3144
|
},
|
|
@@ -3064,21 +3159,19 @@ var DefaultNotification = (props) => {
|
|
|
3064
3159
|
})), _v$4 = style("notificationBody", "nt-overflow-hidden nt-w-full"), _v$5 = style("notificationDate", `nt-transition nt-duration-100 nt-ease-out nt-text-foreground-alpha-400 nt-shrink-0
|
|
3065
3160
|
nt-float-right nt-text-right group-hover:nt-opacity-0`), _v$6 = style("notificationDefaultActions", `nt-transition nt-duration-100 nt-ease-out nt-gap-2 nt-flex nt-shrink-0
|
|
3066
3161
|
nt-opacity-0 group-hover:nt-opacity-100 nt-justify-center nt-items-center
|
|
3067
|
-
nt-absolute nt-top-0 nt-right-0 nt-bg-neutral-100 nt-p-0.5 nt-rounded nt-z-50`), _v$7 = style("
|
|
3162
|
+
nt-absolute nt-top-0 nt-right-0 nt-bg-neutral-100 nt-p-0.5 nt-rounded nt-z-50`), _v$7 = style("notificationCustomActions", "nt-flex nt-gap-4 nt-mt-4");
|
|
3068
3163
|
_v$3 !== _p$.e && className(_el$, _p$.e = _v$3);
|
|
3069
3164
|
_v$4 !== _p$.t && className(_el$4, _p$.t = _v$4);
|
|
3070
3165
|
_v$5 !== _p$.a && className(_el$6, _p$.a = _v$5);
|
|
3071
3166
|
_v$6 !== _p$.o && className(_el$7, _p$.o = _v$6);
|
|
3072
|
-
_v$7 !== _p$.i && className(_el$
|
|
3073
|
-
_v$8 !== _p$.n && className(_el$10, _p$.n = _v$8);
|
|
3167
|
+
_v$7 !== _p$.i && className(_el$8, _p$.i = _v$7);
|
|
3074
3168
|
return _p$;
|
|
3075
3169
|
}, {
|
|
3076
3170
|
e: void 0,
|
|
3077
3171
|
t: void 0,
|
|
3078
3172
|
a: void 0,
|
|
3079
3173
|
o: void 0,
|
|
3080
|
-
i: void 0
|
|
3081
|
-
n: void 0
|
|
3174
|
+
i: void 0
|
|
3082
3175
|
});
|
|
3083
3176
|
return _el$;
|
|
3084
3177
|
})();
|
|
@@ -3189,7 +3282,7 @@ var NotificationListSkeleton = (props) => {
|
|
|
3189
3282
|
|
|
3190
3283
|
// src/ui/components/Notification/NotificationList.tsx
|
|
3191
3284
|
var _tmpl$50 = /* @__PURE__ */ template(`<div><p data-localization=notifications.emptyNotice>`);
|
|
3192
|
-
var _tmpl$
|
|
3285
|
+
var _tmpl$215 = /* @__PURE__ */ template(`<div>`);
|
|
3193
3286
|
var _tmpl$312 = /* @__PURE__ */ template(`<div><div>`);
|
|
3194
3287
|
var EmptyNotificationList = () => {
|
|
3195
3288
|
const style = useStyle();
|
|
@@ -3315,7 +3408,7 @@ var NotificationList = (props) => {
|
|
|
3315
3408
|
return !end();
|
|
3316
3409
|
},
|
|
3317
3410
|
get children() {
|
|
3318
|
-
var _el$5 = _tmpl$
|
|
3411
|
+
var _el$5 = _tmpl$215();
|
|
3319
3412
|
use(setEl, _el$5);
|
|
3320
3413
|
insert(_el$5, createComponent(For, {
|
|
3321
3414
|
get each() {
|
|
@@ -3875,7 +3968,7 @@ var Renderer = (props) => {
|
|
|
3875
3968
|
}
|
|
3876
3969
|
});
|
|
3877
3970
|
};
|
|
3878
|
-
var version = "2.1.
|
|
3971
|
+
var version = "2.1.1";
|
|
3879
3972
|
var cssHref = `https://cdn.jsdelivr.net/npm/@novu/js@${version}/dist/index.css`;
|
|
3880
3973
|
var _dispose, _rootElement, _mountedElements, _setMountedElements, _appearance, _setAppearance, _localization, _setLocalization, _options, _setOptions, _tabs, _setTabs, _routerPush, _setRouterPush, _predefinedNovu, _NovuUI_instances, mountComponentRenderer_fn, updateComponentProps_fn;
|
|
3881
3974
|
var NovuUI = class {
|