@novu/js 3.15.0 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{chunk-C23LCEUU.js → chunk-6I5A5OGE.js} +393 -50
- package/dist/{esm/novu-event-emitter-D9AphR7g.d.mts → cjs/inbox-service-CEMMLHsX.d.ts} +715 -611
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.js +18 -18
- package/dist/cjs/internal/index.d.ts +1 -1
- package/dist/cjs/internal/index.js +6 -6
- package/dist/{esm/novu-DTGsXJjv.d.mts → cjs/novu-ChPiHuXt.d.ts} +27 -1
- package/dist/cjs/themes/index.d.ts +3 -3
- package/dist/cjs/{types-DXbz7pFA.d.ts → types-CPxEgcM4.d.ts} +52 -7
- package/dist/cjs/ui/index.d.ts +52 -6
- package/dist/cjs/ui/index.js +6574 -5632
- package/dist/esm/{chunk-DXONCY42.mjs → chunk-FBE56J52.mjs} +345 -2
- package/dist/{cjs/novu-event-emitter-D9AphR7g.d.ts → esm/inbox-service-CEMMLHsX.d.mts} +715 -611
- package/dist/esm/index.d.mts +3 -3
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/internal/index.d.mts +1 -1
- package/dist/esm/internal/index.mjs +1 -1
- package/dist/{cjs/novu-CI_mzxvm.d.ts → esm/novu-BlonRpYH.d.mts} +27 -1
- package/dist/esm/themes/index.d.mts +3 -3
- package/dist/esm/{types-zMKIpsOL.d.mts → types-B29Y1SQy.d.mts} +52 -7
- package/dist/esm/ui/index.d.mts +52 -6
- package/dist/esm/ui/index.mjs +6573 -5631
- package/dist/index.css +1 -1
- package/dist/novu.min.js +16 -16
- package/dist/novu.min.js.gz +0 -0
- package/package.json +1 -1
- /package/dist/cjs/{chunk-YPTYVCVE.js → chunk-WDGG3OER.js} +0 -0
- /package/dist/esm/{chunk-3WBJEI4O.mjs → chunk-4S22IB5W.mjs} +0 -0
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from 'json-logic-js';
|
|
2
|
-
import { S as SeverityLevelEnum, T as TagsFilter, N as Notification, a as NotificationFilter } from './
|
|
3
|
-
export { B as BaseDeleteSubscriptionArgs, b as BaseUpdateSubscriptionArgs, C as
|
|
4
|
-
export { N as Novu } from './novu-
|
|
2
|
+
import { S as SeverityLevelEnum, T as TagsFilter, N as Notification, a as NotificationFilter } from './inbox-service-CEMMLHsX.mjs';
|
|
3
|
+
export { B as BaseDeleteSubscriptionArgs, b as BaseUpdateSubscriptionArgs, C as ChannelConnectionResponse, c as ChannelEndpointResponse, d as ChannelPreference, e as ChannelType, f as Context, g as CreateChannelConnectionArgs, h as CreateChannelEndpointArgs, i as CreateSubscriptionArgs, D as DaySchedule, j as DefaultSchedule, k as DeleteChannelConnectionArgs, l as DeleteChannelEndpointArgs, m as DeleteSubscriptionArgs, E as EventHandler, n as Events, F as FiltersCountResponse, G as GenerateChatOAuthUrlArgs, o as GetChannelConnectionArgs, p as GetChannelEndpointArgs, q as GetSubscriptionArgs, I as InboxNotification, r as InstanceDeleteSubscriptionArgs, s as InstanceUpdateSubscriptionArgs, L as ListChannelConnectionsArgs, t as ListChannelEndpointsArgs, u as ListNotificationsResponse, v as ListSubscriptionsArgs, w as NotificationStatus, x as NovuError, y as NovuOptions, z as NovuSocketOptions, P as Preference, A as PreferenceFilter, H as PreferenceLevel, J as PreferencesResponse, K as Schedule, M as SocketEventNames, O as SocketTypeOption, Q as StandardNovuOptions, R as Subscriber, U as SubscriptionPreference, V as TagsFilterAndForm, W as TagsFilterOrGroup, X as TimeRange, Y as TopicSubscription, Z as UnreadCount, _ as UpdateSubscriptionArgs, $ as UpdateSubscriptionPreferenceArgs, a0 as WebSocketEvent, a1 as WeeklySchedule, a2 as WorkflowCriticalityEnum, a3 as WorkflowFilter, a4 as WorkflowGroupFilter, a5 as WorkflowIdentifierOrId } from './inbox-service-CEMMLHsX.mjs';
|
|
4
|
+
export { N as Novu } from './novu-BlonRpYH.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Normalizes inbox tag filters to CNF: `string[][]` where each inner array is one OR-group.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Novu, SubscriptionPreference, TopicSubscription, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter, normalizeTagGroups } from './chunk-
|
|
2
|
-
export { ChannelType, NotificationStatus, NovuError, PreferenceLevel, SeverityLevelEnum, WebSocketEvent, WorkflowCriticalityEnum } from './chunk-
|
|
1
|
+
export { Novu, SubscriptionPreference, TopicSubscription, areSeveritiesEqual, areTagsEqual, checkNotificationDataFilter, checkNotificationMatchesFilter, isSameFilter, normalizeTagGroups } from './chunk-FBE56J52.mjs';
|
|
2
|
+
export { ChannelType, NotificationStatus, NovuError, PreferenceLevel, SeverityLevelEnum, WebSocketEvent, WorkflowCriticalityEnum } from './chunk-4S22IB5W.mjs';
|
|
3
3
|
import './chunk-STZMOEWR.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as Context, R as Subscriber, a8 as NovuEventEmitter, a7 as InboxService, I as InboxNotification, N as Notification } from '../inbox-service-CEMMLHsX.mjs';
|
|
2
2
|
import 'json-logic-js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { buildContextKey, buildSubscriber, buildSubscriptionIdentifier, createNotification, parseMarkdownIntoTokens } from '../chunk-
|
|
1
|
+
export { buildContextKey, buildSubscriber, buildSubscriptionIdentifier, createNotification, parseMarkdownIntoTokens } from '../chunk-4S22IB5W.mjs';
|
|
2
2
|
import '../chunk-STZMOEWR.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a7 as InboxService, a8 as NovuEventEmitter, a9 as Session, aa as Result, ab as ScheduleCache, K as Schedule, ac as UpdateScheduleArgs, ad as PreferencesCache, ae as ListPreferencesArgs, P as Preference, af as BasePreferenceArgs, ag as InstancePreferenceArgs, ah as ListNotificationsArgs, u as ListNotificationsResponse, I as InboxNotification, N as Notification, a as NotificationFilter, ai as FilterCountArgs, aj as FilterCountResponse, ak as FiltersCountArgs, F as FiltersCountResponse, al as BaseArgs, am as InstanceArgs, an as SnoozeArgs, G as GenerateChatOAuthUrlArgs, L as ListChannelConnectionsArgs, C as ChannelConnectionResponse, o as GetChannelConnectionArgs, k as DeleteChannelConnectionArgs, t as ListChannelEndpointsArgs, c as ChannelEndpointResponse, p as GetChannelEndpointArgs, h as CreateChannelEndpointArgs, l as DeleteChannelEndpointArgs, ao as SubscriptionsCache, R as Subscriber, v as ListSubscriptionsArgs, ap as Options, Y as TopicSubscription, q as GetSubscriptionArgs, i as CreateSubscriptionArgs, b as BaseUpdateSubscriptionArgs, s as InstanceUpdateSubscriptionArgs, B as BaseDeleteSubscriptionArgs, r as InstanceDeleteSubscriptionArgs, M as SocketEventNames, aq as EventNames, E as EventHandler, n as Events, ar as ContextValue, y as NovuOptions, f as Context } from './inbox-service-CEMMLHsX.mjs';
|
|
2
2
|
|
|
3
3
|
declare class BaseModule {
|
|
4
4
|
#private;
|
|
@@ -130,6 +130,30 @@ declare class Notifications extends BaseModule {
|
|
|
130
130
|
triggerHelloWorldEvent(): Promise<any>;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
declare class ChannelConnections extends BaseModule {
|
|
134
|
+
constructor({ inboxServiceInstance, eventEmitterInstance, }: {
|
|
135
|
+
inboxServiceInstance: InboxService;
|
|
136
|
+
eventEmitterInstance: NovuEventEmitter;
|
|
137
|
+
});
|
|
138
|
+
generateOAuthUrl(args: GenerateChatOAuthUrlArgs): Result<{
|
|
139
|
+
url: string;
|
|
140
|
+
}>;
|
|
141
|
+
list(args?: ListChannelConnectionsArgs): Result<ChannelConnectionResponse[]>;
|
|
142
|
+
get(args: GetChannelConnectionArgs): Result<ChannelConnectionResponse | null>;
|
|
143
|
+
delete(args: DeleteChannelConnectionArgs): Result<void>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare class ChannelEndpoints extends BaseModule {
|
|
147
|
+
constructor({ inboxServiceInstance, eventEmitterInstance, }: {
|
|
148
|
+
inboxServiceInstance: InboxService;
|
|
149
|
+
eventEmitterInstance: NovuEventEmitter;
|
|
150
|
+
});
|
|
151
|
+
list(args?: ListChannelEndpointsArgs): Result<ChannelEndpointResponse[]>;
|
|
152
|
+
get(args: GetChannelEndpointArgs): Result<ChannelEndpointResponse | null>;
|
|
153
|
+
create(args: CreateChannelEndpointArgs): Result<ChannelEndpointResponse>;
|
|
154
|
+
delete(args: DeleteChannelEndpointArgs): Result<void>;
|
|
155
|
+
}
|
|
156
|
+
|
|
133
157
|
declare class Subscriptions extends BaseModule {
|
|
134
158
|
#private;
|
|
135
159
|
readonly cache: SubscriptionsCache;
|
|
@@ -160,6 +184,8 @@ declare class Novu implements Pick<NovuEventEmitter, 'on'> {
|
|
|
160
184
|
readonly notifications: Notifications;
|
|
161
185
|
readonly preferences: Preferences;
|
|
162
186
|
readonly subscriptions: Subscriptions;
|
|
187
|
+
readonly channelConnections: ChannelConnections;
|
|
188
|
+
readonly channelEndpoints: ChannelEndpoints;
|
|
163
189
|
readonly socket: BaseSocketInterface;
|
|
164
190
|
on: <Key extends EventNames>(eventName: Key, listener: EventHandler<Events[Key]>) => () => void;
|
|
165
191
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../
|
|
1
|
+
import { L as InboxTheme, a3 as SubscriptionTheme } from '../types-B29Y1SQy.mjs';
|
|
2
|
+
import '../inbox-service-CEMMLHsX.mjs';
|
|
3
3
|
import 'json-logic-js';
|
|
4
|
-
import '../novu-
|
|
4
|
+
import '../novu-BlonRpYH.mjs';
|
|
5
5
|
|
|
6
6
|
declare const inboxDarkTheme: InboxTheme;
|
|
7
7
|
/**
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { P as Preference,
|
|
2
|
-
import { N as Novu } from './novu-
|
|
1
|
+
import { P as Preference, K as Schedule, N as Notification, Y as TopicSubscription, U as SubscriptionPreference, y as NovuOptions, a as NotificationFilter, a2 as WorkflowCriticalityEnum, Z as UnreadCount } from './inbox-service-CEMMLHsX.mjs';
|
|
2
|
+
import { N as Novu } from './novu-BlonRpYH.mjs';
|
|
3
3
|
|
|
4
4
|
declare const commonAppearanceKeys: readonly ["root", "button", "input", "icon", "badge", "popoverContent", "popoverTrigger", "popoverClose", "collapsible", "tooltipContent", "tooltipTrigger"];
|
|
5
5
|
declare const inboxAppearanceKeys: readonly ["bellIcon", "lockIcon", "bellContainer", "severityHigh__bellContainer", "severityMedium__bellContainer", "severityLow__bellContainer", "bellSeverityGlow", "severityGlowHigh__bellSeverityGlow", "severityGlowMedium__bellSeverityGlow", "severityGlowLow__bellSeverityGlow", "bellDot", "preferences__button", "preferencesContainer", "inboxHeader", "loading", "dropdownContent", "dropdownTrigger", "dropdownItem", "dropdownItemLabel", "dropdownItemLabelContainer", "dropdownItemLeft__icon", "dropdownItemRight__icon", "dropdownItem__icon", "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", "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", "notificationSubject__em", "notificationBody", "notificationBody__strong", "notificationBody__em", "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", "em"];
|
|
6
6
|
declare const subscriptionAppearanceKeys: readonly ["subscriptionContainer", "subscriptionButton__button", "subscriptionButtonContainer", "subscriptionButtonIcon", "subscriptionButtonLabel", "subscription__popoverTriggerContainer", "subscription__popoverTrigger", "subscriptionTriggerIcon", "subscription__popoverContent", "subscriptionPreferencesContainer", "subscriptionPreferencesHeaderContainer", "subscriptionPreferencesHeader", "subscriptionPreferencesInfoIcon", "subscriptionPreferencesContent", "subscriptionPreferencesGroupsContainer", "subscriptionPreferencesFallback", "subscriptionPreferencesFallbackTexts", "subscriptionPreferencesFallbackHeader", "subscriptionPreferencesFallbackDescription", "subscriptionPreferenceRow", "subscriptionPreferenceLabel", "subscriptionPreferenceGroupContainer", "subscriptionPreferenceGroupHeader", "subscriptionPreferenceGroupLabelContainer", "subscriptionPreferenceGroupLabelIcon", "subscriptionPreferenceGroupLabel", "subscriptionPreferenceGroupActionsContainer", "subscriptionPreferenceGroupActionsContainerRight__icon", "subscriptionPreferenceGroupBody", "subscriptionPreferenceGroupWorkflowRow", "subscriptionPreferenceGroupWorkflowLabel"];
|
|
7
|
+
declare const connectChatAppearanceKeys: readonly ["connectChatContainer", "connectChatButton", "connectChatButtonContainer", "connectChatButtonLabel", "connectChatMisconfiguredTooltip"];
|
|
8
|
+
declare const channelConnectButtonAppearanceKeys: readonly ["channelConnectButtonContainer", "channelConnectButton", "channelConnectButtonInner", "channelConnectButtonIcon", "channelConnectButtonLabel", "channelConnectButtonMisconfiguredTooltip"];
|
|
9
|
+
declare const linkSlackUserAppearanceKeys: readonly ["linkSlackUserContainer", "linkSlackUserButton", "linkSlackUserButtonContainer", "linkSlackUserButtonIcon", "linkSlackUserButtonLabel"];
|
|
7
10
|
|
|
8
11
|
declare const defaultInboxLocalization: {
|
|
9
12
|
readonly 'inbox.filters.dropdownOptions.unread': "Unread only";
|
|
@@ -753,6 +756,47 @@ type SubscriptionAppearanceCallback = {
|
|
|
753
756
|
type SubscriptionAppearanceCallbackKeys = keyof SubscriptionAppearanceCallback;
|
|
754
757
|
type SubscriptionAppearanceCallbackFunction<K extends SubscriptionAppearanceCallbackKeys> = SubscriptionAppearanceCallback[K];
|
|
755
758
|
type SubscriptionAppearanceKey = (typeof subscriptionAppearanceKeys)[number];
|
|
759
|
+
type ConnectChatAppearanceKey = (typeof connectChatAppearanceKeys)[number];
|
|
760
|
+
type SlackLinkUserAppearanceKey = (typeof linkSlackUserAppearanceKeys)[number];
|
|
761
|
+
type ChannelConnectButtonAppearanceKey = (typeof channelConnectButtonAppearanceKeys)[number];
|
|
762
|
+
type SlackLinkUserAppearanceCallback = {
|
|
763
|
+
linkSlackUserContainer: (context: {
|
|
764
|
+
linked: boolean;
|
|
765
|
+
}) => string;
|
|
766
|
+
linkSlackUserButton: (context: {
|
|
767
|
+
linked: boolean;
|
|
768
|
+
}) => string;
|
|
769
|
+
linkSlackUserButtonContainer: (context: {
|
|
770
|
+
linked: boolean;
|
|
771
|
+
}) => string;
|
|
772
|
+
linkSlackUserButtonIcon: (context: {
|
|
773
|
+
linked: boolean;
|
|
774
|
+
}) => string;
|
|
775
|
+
linkSlackUserButtonLabel: (context: {
|
|
776
|
+
linked: boolean;
|
|
777
|
+
}) => string;
|
|
778
|
+
};
|
|
779
|
+
type SlackLinkUserAppearanceCallbackKeys = keyof SlackLinkUserAppearanceCallback;
|
|
780
|
+
type SlackLinkUserAppearanceCallbackFunction<K extends SlackLinkUserAppearanceCallbackKeys> = SlackLinkUserAppearanceCallback[K];
|
|
781
|
+
type ChannelConnectButtonAppearanceCallback = {
|
|
782
|
+
channelConnectButtonContainer: (context: {
|
|
783
|
+
connected: boolean;
|
|
784
|
+
}) => string;
|
|
785
|
+
channelConnectButton: (context: {
|
|
786
|
+
connected: boolean;
|
|
787
|
+
}) => string;
|
|
788
|
+
channelConnectButtonInner: (context: {
|
|
789
|
+
connected: boolean;
|
|
790
|
+
}) => string;
|
|
791
|
+
channelConnectButtonIcon: (context: {
|
|
792
|
+
connected: boolean;
|
|
793
|
+
}) => string;
|
|
794
|
+
channelConnectButtonLabel: (context: {
|
|
795
|
+
connected: boolean;
|
|
796
|
+
}) => string;
|
|
797
|
+
};
|
|
798
|
+
type ChannelConnectButtonAppearanceCallbackKeys = keyof ChannelConnectButtonAppearanceCallback;
|
|
799
|
+
type ChannelConnectButtonAppearanceCallbackFunction<K extends ChannelConnectButtonAppearanceCallbackKeys> = ChannelConnectButtonAppearanceCallback[K];
|
|
756
800
|
type SubscriptionElements = Partial<{
|
|
757
801
|
[K in CommonAppearanceKey]: ElementStyles;
|
|
758
802
|
} & {
|
|
@@ -773,9 +817,9 @@ type SubscriptionTheme = {
|
|
|
773
817
|
type SubscriptionAppearance = SubscriptionTheme & {
|
|
774
818
|
baseTheme?: SubscriptionTheme | SubscriptionTheme[];
|
|
775
819
|
};
|
|
776
|
-
type AllAppearanceCallbackKeys = InboxAppearanceCallbackKeys | SubscriptionAppearanceCallbackKeys;
|
|
777
|
-
type AllAppearanceCallbackFunction<K extends AllAppearanceCallbackKeys> = K extends InboxAppearanceCallbackKeys ? InboxAppearanceCallbackFunction<K> : K extends SubscriptionAppearanceCallbackKeys ? SubscriptionAppearanceCallbackFunction<K> : never;
|
|
778
|
-
type AllAppearanceKey = CommonAppearanceKey | InboxAppearanceKey | SubscriptionAppearanceKey;
|
|
820
|
+
type AllAppearanceCallbackKeys = InboxAppearanceCallbackKeys | SubscriptionAppearanceCallbackKeys | SlackLinkUserAppearanceCallbackKeys | ChannelConnectButtonAppearanceCallbackKeys;
|
|
821
|
+
type AllAppearanceCallbackFunction<K extends AllAppearanceCallbackKeys> = K extends InboxAppearanceCallbackKeys ? InboxAppearanceCallbackFunction<K> : K extends SubscriptionAppearanceCallbackKeys ? SubscriptionAppearanceCallbackFunction<K> : K extends SlackLinkUserAppearanceCallbackKeys ? SlackLinkUserAppearanceCallbackFunction<K> : K extends ChannelConnectButtonAppearanceCallbackKeys ? ChannelConnectButtonAppearanceCallbackFunction<K> : never;
|
|
822
|
+
type AllAppearanceKey = CommonAppearanceKey | InboxAppearanceKey | SubscriptionAppearanceKey | ConnectChatAppearanceKey | SlackLinkUserAppearanceKey | ChannelConnectButtonAppearanceKey;
|
|
779
823
|
type AllElements = Partial<{
|
|
780
824
|
[K in CommonAppearanceKey]: ElementStyles;
|
|
781
825
|
} & {
|
|
@@ -783,7 +827,8 @@ type AllElements = Partial<{
|
|
|
783
827
|
} & {
|
|
784
828
|
[K in Extract<AllAppearanceKey, AllAppearanceCallbackKeys>]: ElementStyles | AllAppearanceCallbackFunction<K>;
|
|
785
829
|
}>;
|
|
786
|
-
type
|
|
830
|
+
type ChannelConnectButtonIconKey = 'channelConnect' | 'channelConnected';
|
|
831
|
+
type AllIconKey = CommonIconKey | InboxIconKey | SubscriptionIconKey | ChannelConnectButtonIconKey;
|
|
787
832
|
type AllIconOverrides = {
|
|
788
833
|
[key in AllIconKey]?: IconRenderer;
|
|
789
834
|
};
|
|
@@ -836,4 +881,4 @@ type PreferenceGroups = Array<{
|
|
|
836
881
|
filter: PreferenceGroupFilter;
|
|
837
882
|
}>;
|
|
838
883
|
|
|
839
|
-
export { type AvatarRenderer as A, type BellRenderer as B, type CustomActionsRenderer as C, type DefaultActionsRenderer as D, type ElementStyles as E, type
|
|
884
|
+
export { type SubscriptionIconKey as $, type AvatarRenderer as A, type BellRenderer as B, type CustomActionsRenderer as C, type DefaultActionsRenderer as D, type ElementStyles as E, type InboxElements as F, type InboxIconKey as G, type InboxIconOverrides as H, type IconRenderer as I, type InboxLocalization as J, type InboxLocalizationKey as K, type InboxTheme as L, NotificationStatus as M, type NotificationClickHandler as N, type SlackLinkUserAppearanceCallback as O, type PreferencesFilter as P, type SlackLinkUserAppearanceCallbackFunction as Q, type RouterPush as R, type SubjectRenderer as S, type Tab as T, type SlackLinkUserAppearanceCallbackKeys as U, type SubscriptionAppearance as V, type SubscriptionAppearanceCallback as W, type SubscriptionAppearanceCallbackFunction as X, type SubscriptionAppearanceCallbackKeys as Y, type SubscriptionAppearanceKey as Z, type SubscriptionElements as _, type NotificationActionClickHandler as a, type SubscriptionIconOverrides as a0, type SubscriptionLocalization as a1, type SubscriptionLocalizationKey as a2, type SubscriptionTheme as a3, type Variables as a4, type NotificationRenderer as b, type BodyRenderer as c, type BaseNovuProviderProps as d, type NovuProviderProps as e, type AllAppearance as f, type AllLocalization as g, type PreferenceGroups as h, type PreferencesSort as i, type AllAppearanceCallbackFunction as j, type AllAppearanceCallbackKeys as k, type AllAppearanceKey as l, type AllElements as m, type AllIconKey as n, type AllIconOverrides as o, type AllLocalizationKey as p, type AllTheme as q, type ChannelConnectButtonAppearanceCallback as r, type ChannelConnectButtonAppearanceCallbackFunction as s, type ChannelConnectButtonAppearanceCallbackKeys as t, type ChannelConnectButtonIconKey as u, type InboxAppearance as v, type InboxAppearanceCallback as w, type InboxAppearanceCallbackFunction as x, type InboxAppearanceCallbackKeys as y, type InboxAppearanceKey as z };
|
package/dist/esm/ui/index.d.mts
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { N as Notification } from '../
|
|
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 BaseNovuProviderProps, e as NovuProviderProps, f as AllAppearance, g as AllLocalization, T as Tab, P as PreferencesFilter, h as PreferenceGroups, i as PreferencesSort, R as RouterPush } from '../types-
|
|
4
|
-
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,
|
|
1
|
+
import { f as Context, a6 as ConnectionMode, a5 as WorkflowIdentifierOrId, Y as TopicSubscription, y as NovuOptions } from '../inbox-service-CEMMLHsX.mjs';
|
|
2
|
+
export { N as Notification } from '../inbox-service-CEMMLHsX.mjs';
|
|
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 BaseNovuProviderProps, e as NovuProviderProps, f as AllAppearance, g as AllLocalization, T as Tab, P as PreferencesFilter, h as PreferenceGroups, i as PreferencesSort, R as RouterPush } from '../types-B29Y1SQy.mjs';
|
|
4
|
+
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, r as ChannelConnectButtonAppearanceCallback, s as ChannelConnectButtonAppearanceCallbackFunction, t as ChannelConnectButtonAppearanceCallbackKeys, u as ChannelConnectButtonIconKey, E as ElementStyles, I as IconRenderer, v as InboxAppearance, w as InboxAppearanceCallback, x as InboxAppearanceCallbackFunction, y as InboxAppearanceCallbackKeys, z as InboxAppearanceKey, F as InboxElements, G as InboxIconKey, H as InboxIconOverrides, J as InboxLocalization, K as InboxLocalizationKey, L as InboxTheme, M as NotificationStatus, O as SlackLinkUserAppearanceCallback, Q as SlackLinkUserAppearanceCallbackFunction, U as SlackLinkUserAppearanceCallbackKeys, V as SubscriptionAppearance, W as SubscriptionAppearanceCallback, X as SubscriptionAppearanceCallbackFunction, Y as SubscriptionAppearanceCallbackKeys, Z as SubscriptionAppearanceKey, _ as SubscriptionElements, $ as SubscriptionIconKey, a0 as SubscriptionIconOverrides, a1 as SubscriptionLocalization, a2 as SubscriptionLocalizationKey, a3 as SubscriptionTheme, a4 as Variables } from '../types-B29Y1SQy.mjs';
|
|
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';
|
|
8
8
|
import { MountableElement } from 'solid-js/web';
|
|
9
|
-
import { N as Novu } from '../novu-
|
|
9
|
+
import { N as Novu } from '../novu-BlonRpYH.mjs';
|
|
10
10
|
import 'json-logic-js';
|
|
11
11
|
|
|
12
|
+
type ConnectChatProps = {
|
|
13
|
+
integrationIdentifier: string;
|
|
14
|
+
connectionIdentifier?: string;
|
|
15
|
+
subscriberId?: string;
|
|
16
|
+
context?: Context;
|
|
17
|
+
scope?: string[];
|
|
18
|
+
connectionMode?: ConnectionMode;
|
|
19
|
+
onConnectSuccess?: (connectionIdentifier: string) => void;
|
|
20
|
+
onConnectError?: (error: unknown) => void;
|
|
21
|
+
onDisconnectSuccess?: () => void;
|
|
22
|
+
onDisconnectError?: (error: unknown) => void;
|
|
23
|
+
};
|
|
24
|
+
|
|
12
25
|
type NotificationRendererProps = {
|
|
13
26
|
renderNotification: NotificationRenderer;
|
|
14
27
|
renderAvatar?: never;
|
|
@@ -54,6 +67,36 @@ type InboxContentProps = {
|
|
|
54
67
|
hideNav?: boolean;
|
|
55
68
|
} & (NotificationRendererProps | SubjectBodyRendererProps | NoRendererProps);
|
|
56
69
|
|
|
70
|
+
type SlackConnectButtonProps = {
|
|
71
|
+
integrationIdentifier?: string;
|
|
72
|
+
connectionIdentifier?: string;
|
|
73
|
+
subscriberId?: string;
|
|
74
|
+
context?: Context;
|
|
75
|
+
scope?: string[];
|
|
76
|
+
connectionMode?: ConnectionMode;
|
|
77
|
+
onConnectSuccess?: (connectionIdentifier: string) => void;
|
|
78
|
+
onConnectError?: (error: unknown) => void;
|
|
79
|
+
onDisconnectSuccess?: () => void;
|
|
80
|
+
onDisconnectError?: (error: unknown) => void;
|
|
81
|
+
connectLabel?: string;
|
|
82
|
+
connectedLabel?: string;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
type SlackLinkUserProps = {
|
|
86
|
+
integrationIdentifier?: string;
|
|
87
|
+
connectionIdentifier?: string;
|
|
88
|
+
subscriberId?: string;
|
|
89
|
+
context?: Context;
|
|
90
|
+
onLinkSuccess?: (endpoint: {
|
|
91
|
+
identifier: string;
|
|
92
|
+
}) => void;
|
|
93
|
+
onLinkError?: (error: unknown) => void;
|
|
94
|
+
onUnlinkSuccess?: () => void;
|
|
95
|
+
onUnlinkError?: (error: unknown) => void;
|
|
96
|
+
linkLabel?: string;
|
|
97
|
+
unlinkLabel?: string;
|
|
98
|
+
};
|
|
99
|
+
|
|
57
100
|
type SubscriptionPreferencesRenderer = (el: HTMLDivElement, subscription?: TopicSubscription, loading?: boolean) => () => void;
|
|
58
101
|
type WorkflowPreference = {
|
|
59
102
|
label?: string;
|
|
@@ -126,6 +169,9 @@ declare const novuComponents: {
|
|
|
126
169
|
Subscription: (props: SubscriptionProps) => solid_js.JSX.Element;
|
|
127
170
|
SubscriptionButton: (props: SubscriptionButtonWrapperProps) => solid_js.JSX.Element;
|
|
128
171
|
SubscriptionPreferences: (props: SubscriptionPreferencesWrapperProps) => solid_js.JSX.Element;
|
|
172
|
+
ConnectChat: (props: ConnectChatProps) => solid_js.JSX.Element;
|
|
173
|
+
SlackLinkUser: (props: SlackLinkUserProps) => solid_js.JSX.Element;
|
|
174
|
+
SlackConnectButton: (props: SlackConnectButtonProps) => solid_js.JSX.Element;
|
|
129
175
|
};
|
|
130
176
|
type NovuComponentName = keyof typeof novuComponents;
|
|
131
177
|
|
|
@@ -154,4 +200,4 @@ declare class NovuUI {
|
|
|
154
200
|
unmount(): void;
|
|
155
201
|
}
|
|
156
202
|
|
|
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 };
|
|
203
|
+
export { AllAppearance, AllLocalization, type BaseNovuUIOptions, BellRenderer, BodyRenderer, type ConnectChatProps, InboxPage, type InboxProps, NotificationActionClickHandler, NotificationClickHandler, NotificationRenderer, NovuProviderProps, NovuUI, type NovuUIOptions, PreferenceGroups, PreferencesFilter, PreferencesSort, RouterPush, type SlackConnectButtonProps, type SlackLinkUserProps, SubjectRenderer, type SubscriptionButtonWrapperProps, type SubscriptionPreferencesWrapperProps, type SubscriptionProps, Tab };
|