@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/esm/ui/index.d.mts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { T as TopicSubscription, d as WorkflowIdentifierOrId, b as Novu } from '../novu-YP3PwsQR.mjs';
|
|
2
|
+
export { N as Notification } from '../novu-YP3PwsQR.mjs';
|
|
3
|
+
import { l as NonEmptyArray, e as NovuOptions } from '../types-D-9ozWeQ.mjs';
|
|
4
|
+
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 AllAppearance, g as AllLocalization, T as Tab, P as PreferencesFilter, h as PreferenceGroups, i as PreferencesSort, R as RouterPush } from '../types-DmMJ1GiR.mjs';
|
|
5
|
+
export { j as AllAppearanceCallbackFunction, k as AllAppearanceCallbackKeys, l as AllAppearanceKey, m as AllElements, n as AllIconKey, o as AllIconOverrides, p as AllLocalizationKey, q as AllTheme, E as ElementStyles, I as IconRenderer, r as InboxAppearance, s as InboxAppearanceCallback, t as InboxAppearanceCallbackFunction, u as InboxAppearanceCallbackKeys, v as InboxAppearanceKey, w as InboxElements, x as InboxIconKey, y as InboxIconOverrides, z as InboxLocalization, F as InboxLocalizationKey, G as InboxTheme, H as NotificationStatus, J as SubscriptionAppearance, K as SubscriptionAppearanceCallback, L as SubscriptionAppearanceCallbackFunction, M as SubscriptionAppearanceCallbackKeys, O as SubscriptionAppearanceKey, Q as SubscriptionElements, U as SubscriptionIconKey, V as SubscriptionIconOverrides, W as SubscriptionLocalization, X as SubscriptionLocalizationKey, Y as SubscriptionTheme, Z as Variables } from '../types-DmMJ1GiR.mjs';
|
|
5
6
|
import { Placement, OffsetOptions } from '@floating-ui/dom';
|
|
6
7
|
import * as solid_js from 'solid-js';
|
|
7
8
|
import { ComponentProps } from 'solid-js';
|
|
8
9
|
import { MountableElement } from 'solid-js/web';
|
|
10
|
+
import 'json-logic-js';
|
|
9
11
|
|
|
10
12
|
type NotificationRendererProps = {
|
|
11
13
|
renderNotification: NotificationRenderer;
|
|
@@ -52,6 +54,67 @@ type InboxContentProps = {
|
|
|
52
54
|
hideNav?: boolean;
|
|
53
55
|
} & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
|
|
54
56
|
|
|
57
|
+
type SubscriptionPreferencesRenderer = (el: HTMLDivElement, subscription?: TopicSubscription, loading?: boolean) => () => void;
|
|
58
|
+
type WorkflowPreference = {
|
|
59
|
+
label?: string;
|
|
60
|
+
workflowId: WorkflowIdentifierOrId;
|
|
61
|
+
enabled?: boolean;
|
|
62
|
+
filter?: never;
|
|
63
|
+
};
|
|
64
|
+
type GroupPreference = {
|
|
65
|
+
label: string;
|
|
66
|
+
filter: {
|
|
67
|
+
workflowIds?: Array<WorkflowIdentifierOrId>;
|
|
68
|
+
workflows?: Array<{
|
|
69
|
+
label: string;
|
|
70
|
+
workflowId: WorkflowIdentifierOrId;
|
|
71
|
+
}>;
|
|
72
|
+
tags?: string[];
|
|
73
|
+
};
|
|
74
|
+
enabled?: boolean;
|
|
75
|
+
workflowId?: never;
|
|
76
|
+
};
|
|
77
|
+
type UIPreference = WorkflowIdentifierOrId | WorkflowPreference | GroupPreference;
|
|
78
|
+
type SubscriptionProps = {
|
|
79
|
+
open?: boolean;
|
|
80
|
+
placement?: Placement;
|
|
81
|
+
placementOffset?: OffsetOptions;
|
|
82
|
+
topicKey: string;
|
|
83
|
+
identifier?: string;
|
|
84
|
+
preferences: NonEmptyArray<UIPreference>;
|
|
85
|
+
renderPreferences?: SubscriptionPreferencesRenderer;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
type SubscriptionButtonWrapperProps = {
|
|
89
|
+
topicKey: string;
|
|
90
|
+
identifier?: string;
|
|
91
|
+
preferences: NonEmptyArray<UIPreference>;
|
|
92
|
+
onClick?: (args: {
|
|
93
|
+
subscription?: TopicSubscription;
|
|
94
|
+
}) => void;
|
|
95
|
+
onDeleteError?: (error: unknown) => void;
|
|
96
|
+
onDeleteSuccess?: () => void;
|
|
97
|
+
onCreateError?: (error: unknown) => void;
|
|
98
|
+
onCreateSuccess?: ({ subscription }: {
|
|
99
|
+
subscription: TopicSubscription;
|
|
100
|
+
}) => void;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
type SubscriptionPreferencesWrapperProps = {
|
|
104
|
+
topicKey: string;
|
|
105
|
+
identifier?: string;
|
|
106
|
+
preferences: NonEmptyArray<UIPreference>;
|
|
107
|
+
onClick?: (args: {
|
|
108
|
+
subscription?: TopicSubscription;
|
|
109
|
+
}) => void;
|
|
110
|
+
onDeleteError?: (error: unknown) => void;
|
|
111
|
+
onDeleteSuccess?: () => void;
|
|
112
|
+
onCreateError?: (error: unknown) => void;
|
|
113
|
+
onCreateSuccess?: ({ subscription }: {
|
|
114
|
+
subscription: TopicSubscription;
|
|
115
|
+
}) => void;
|
|
116
|
+
};
|
|
117
|
+
|
|
55
118
|
declare const novuComponents: {
|
|
56
119
|
Inbox: (props: InboxProps) => solid_js.JSX.Element;
|
|
57
120
|
InboxContent: (props: InboxContentProps) => solid_js.JSX.Element;
|
|
@@ -60,6 +123,9 @@ declare const novuComponents: {
|
|
|
60
123
|
}>;
|
|
61
124
|
Notifications: (props: Omit<InboxContentProps, "hideNav" | "initialPage">) => solid_js.JSX.Element;
|
|
62
125
|
Preferences: (props: Omit<InboxContentProps, "hideNav" | "initialPage">) => solid_js.JSX.Element;
|
|
126
|
+
Subscription: (props: SubscriptionProps) => solid_js.JSX.Element;
|
|
127
|
+
SubscriptionButton: (props: SubscriptionButtonWrapperProps) => solid_js.JSX.Element;
|
|
128
|
+
SubscriptionPreferences: (props: SubscriptionPreferencesWrapperProps) => solid_js.JSX.Element;
|
|
63
129
|
};
|
|
64
130
|
type NovuComponentName = keyof typeof novuComponents;
|
|
65
131
|
|
|
@@ -75,8 +141,9 @@ declare class NovuUI {
|
|
|
75
141
|
props?: ComponentProps<(typeof novuComponents)[T]>;
|
|
76
142
|
}): void;
|
|
77
143
|
unmountComponent(element: MountableElement): void;
|
|
78
|
-
|
|
79
|
-
|
|
144
|
+
updateNovu(novu: Novu): void;
|
|
145
|
+
updateAppearance(appearance?: AllAppearance): void;
|
|
146
|
+
updateLocalization(localization?: AllLocalization): void;
|
|
80
147
|
updateOptions(options: NovuOptions): void;
|
|
81
148
|
updateTabs(tabs?: Array<Tab>): void;
|
|
82
149
|
updatePreferencesFilter(preferencesFilter?: PreferencesFilter): void;
|
|
@@ -87,4 +154,4 @@ declare class NovuUI {
|
|
|
87
154
|
unmount(): void;
|
|
88
155
|
}
|
|
89
156
|
|
|
90
|
-
export {
|
|
157
|
+
export { AllAppearance, AllLocalization, type BaseNovuUIOptions, BellRenderer, BodyRenderer, InboxPage, type InboxProps, NotificationActionClickHandler, NotificationClickHandler, NotificationRenderer, NovuProviderProps, NovuUI, type NovuUIOptions, PreferenceGroups, PreferencesFilter, PreferencesSort, RouterPush, SubjectRenderer, type SubscriptionButtonWrapperProps, type SubscriptionPreferencesWrapperProps, type SubscriptionProps, Tab };
|