@novu/js 2.0.0-canary.1 → 2.0.0-canary.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-2C4L4ZUQ.cjs → chunk-NEEKTCEQ.cjs} +17 -5
- package/dist/cjs/index.cjs +12 -12
- package/dist/cjs/ui/index.cjs +284 -217
- package/dist/esm/{chunk-Y6CIZNAK.mjs → chunk-YOLQVRKF.mjs} +17 -5
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/ui/index.mjs +208 -141
- package/dist/index.css +1 -1
- package/dist/novu.min.js +7 -7
- package/dist/novu.min.js.gz +0 -0
- package/dist/types/base-module.d.ts +0 -2
- package/dist/types/base-module.d.ts.map +1 -1
- package/dist/types/notifications/notification.d.ts +1 -0
- package/dist/types/notifications/notification.d.ts.map +1 -1
- package/dist/types/types.d.ts +9 -5
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/ui/components/ExternalElementRenderer.d.ts +7 -0
- package/dist/types/ui/components/ExternalElementRenderer.d.ts.map +1 -0
- package/dist/types/ui/components/Inbox.d.ts +4 -4
- package/dist/types/ui/components/Inbox.d.ts.map +1 -1
- package/dist/types/ui/components/InboxTabs/InboxTabs.d.ts +5 -1
- package/dist/types/ui/components/InboxTabs/InboxTabs.d.ts.map +1 -1
- package/dist/types/ui/components/Notification/DefaultNotification.d.ts.map +1 -1
- package/dist/types/ui/components/Notification/NewMessagesCta.d.ts.map +1 -1
- package/dist/types/ui/components/Notification/Notification.d.ts +2 -2
- package/dist/types/ui/components/Notification/Notification.d.ts.map +1 -1
- package/dist/types/ui/components/Notification/NotificationList.d.ts +2 -2
- package/dist/types/ui/components/Notification/NotificationList.d.ts.map +1 -1
- package/dist/types/ui/components/Renderer.d.ts +1 -1
- package/dist/types/ui/components/elements/Bell/Bell.d.ts +2 -2
- package/dist/types/ui/components/elements/Bell/Bell.d.ts.map +1 -1
- package/dist/types/ui/components/elements/Header/MoreActionsOptions.d.ts +2 -1
- package/dist/types/ui/components/elements/Header/MoreActionsOptions.d.ts.map +1 -1
- package/dist/types/ui/components/elements/Header/PreferencesHeader.d.ts.map +1 -1
- package/dist/types/ui/components/elements/InboxStatus/InboxStatusDropdown.d.ts.map +1 -1
- package/dist/types/ui/components/elements/InboxStatus/InboxStatusOptions.d.ts +2 -1
- package/dist/types/ui/components/elements/InboxStatus/InboxStatusOptions.d.ts.map +1 -1
- package/dist/types/ui/components/elements/InboxStatus/constants.d.ts +7 -7
- package/dist/types/ui/components/elements/Preferences/Preferences.d.ts.map +1 -1
- package/dist/types/ui/config/defaultLocalization.d.ts +11 -10
- package/dist/types/ui/config/defaultLocalization.d.ts.map +1 -1
- package/dist/types/ui/context/LocalizationContext.d.ts +12 -4
- package/dist/types/ui/context/LocalizationContext.d.ts.map +1 -1
- package/dist/types/ui/helpers/constants.d.ts +2 -0
- package/dist/types/ui/helpers/constants.d.ts.map +1 -1
- package/dist/types/ui/helpers/index.d.ts +1 -0
- package/dist/types/ui/helpers/index.d.ts.map +1 -1
- package/dist/types/ui/types.d.ts +7 -7
- package/dist/types/ui/types.d.ts.map +1 -1
- package/dist/types/ws/socket.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/types/ui/components/ExternalElementMounter.d.ts +0 -7
- package/dist/types/ui/components/ExternalElementMounter.d.ts.map +0 -1
|
@@ -350,6 +350,7 @@ var Notification = class {
|
|
|
350
350
|
this.channelType = notification.channelType;
|
|
351
351
|
this.tags = notification.tags;
|
|
352
352
|
this.redirect = notification.redirect;
|
|
353
|
+
this.data = notification.data;
|
|
353
354
|
}
|
|
354
355
|
read() {
|
|
355
356
|
return read({
|
|
@@ -1284,7 +1285,8 @@ var mapToNotification = ({
|
|
|
1284
1285
|
subject,
|
|
1285
1286
|
avatar,
|
|
1286
1287
|
cta,
|
|
1287
|
-
tags
|
|
1288
|
+
tags,
|
|
1289
|
+
data
|
|
1288
1290
|
}) => {
|
|
1289
1291
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1290
1292
|
const to = {
|
|
@@ -1311,17 +1313,27 @@ var mapToNotification = ({
|
|
|
1311
1313
|
avatar,
|
|
1312
1314
|
primaryAction: primaryCta && {
|
|
1313
1315
|
label: primaryCta.content,
|
|
1314
|
-
isCompleted: actionType === "primary" /* PRIMARY */ && actionStatus === "done" /* DONE
|
|
1316
|
+
isCompleted: actionType === "primary" /* PRIMARY */ && actionStatus === "done" /* DONE */,
|
|
1317
|
+
redirect: primaryCta.url ? {
|
|
1318
|
+
target: primaryCta.target,
|
|
1319
|
+
url: primaryCta.url
|
|
1320
|
+
} : void 0
|
|
1315
1321
|
},
|
|
1316
1322
|
secondaryAction: secondaryCta && {
|
|
1317
1323
|
label: secondaryCta.content,
|
|
1318
|
-
isCompleted: actionType === "secondary" /* SECONDARY */ && actionStatus === "done" /* DONE
|
|
1324
|
+
isCompleted: actionType === "secondary" /* SECONDARY */ && actionStatus === "done" /* DONE */,
|
|
1325
|
+
redirect: secondaryCta.url ? {
|
|
1326
|
+
target: secondaryCta.target,
|
|
1327
|
+
url: secondaryCta.url
|
|
1328
|
+
} : void 0
|
|
1319
1329
|
},
|
|
1320
1330
|
channelType: channel,
|
|
1321
1331
|
tags,
|
|
1322
1332
|
redirect: ((_j = cta.data) == null ? void 0 : _j.url) ? {
|
|
1323
|
-
url: cta.data.url
|
|
1324
|
-
|
|
1333
|
+
url: cta.data.url,
|
|
1334
|
+
target: cta.data.target
|
|
1335
|
+
} : void 0,
|
|
1336
|
+
data
|
|
1325
1337
|
};
|
|
1326
1338
|
};
|
|
1327
1339
|
var _token, _emitter5, _socketIo, _socketUrl, _notificationReceived, _unseenCountChanged, _unreadCountChanged, _Socket_instances, initializeSocket_fn;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ActionTypeEnum, ChannelType, CtaType, NotificationActionStatus, NotificationButton, NotificationStatus, Novu, PreferenceLevel, PreferenceOverrideSource, PreferenceOverrideSourceEnum, WebSocketEvent } from './chunk-
|
|
1
|
+
export { ActionTypeEnum, ChannelType, CtaType, NotificationActionStatus, NotificationButton, NotificationStatus, Novu, PreferenceLevel, PreferenceOverrideSource, PreferenceOverrideSourceEnum, WebSocketEvent } from './chunk-YOLQVRKF.mjs';
|