@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
|
@@ -357,6 +357,7 @@ var Notification = class {
|
|
|
357
357
|
this.channelType = notification.channelType;
|
|
358
358
|
this.tags = notification.tags;
|
|
359
359
|
this.redirect = notification.redirect;
|
|
360
|
+
this.data = notification.data;
|
|
360
361
|
}
|
|
361
362
|
read() {
|
|
362
363
|
return read({
|
|
@@ -1291,7 +1292,8 @@ var mapToNotification = ({
|
|
|
1291
1292
|
subject,
|
|
1292
1293
|
avatar,
|
|
1293
1294
|
cta,
|
|
1294
|
-
tags
|
|
1295
|
+
tags,
|
|
1296
|
+
data
|
|
1295
1297
|
}) => {
|
|
1296
1298
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1297
1299
|
const to = {
|
|
@@ -1318,17 +1320,27 @@ var mapToNotification = ({
|
|
|
1318
1320
|
avatar,
|
|
1319
1321
|
primaryAction: primaryCta && {
|
|
1320
1322
|
label: primaryCta.content,
|
|
1321
|
-
isCompleted: actionType === "primary" /* PRIMARY */ && actionStatus === "done" /* DONE
|
|
1323
|
+
isCompleted: actionType === "primary" /* PRIMARY */ && actionStatus === "done" /* DONE */,
|
|
1324
|
+
redirect: primaryCta.url ? {
|
|
1325
|
+
target: primaryCta.target,
|
|
1326
|
+
url: primaryCta.url
|
|
1327
|
+
} : void 0
|
|
1322
1328
|
},
|
|
1323
1329
|
secondaryAction: secondaryCta && {
|
|
1324
1330
|
label: secondaryCta.content,
|
|
1325
|
-
isCompleted: actionType === "secondary" /* SECONDARY */ && actionStatus === "done" /* DONE
|
|
1331
|
+
isCompleted: actionType === "secondary" /* SECONDARY */ && actionStatus === "done" /* DONE */,
|
|
1332
|
+
redirect: secondaryCta.url ? {
|
|
1333
|
+
target: secondaryCta.target,
|
|
1334
|
+
url: secondaryCta.url
|
|
1335
|
+
} : void 0
|
|
1326
1336
|
},
|
|
1327
1337
|
channelType: channel,
|
|
1328
1338
|
tags,
|
|
1329
1339
|
redirect: ((_j = cta.data) == null ? void 0 : _j.url) ? {
|
|
1330
|
-
url: cta.data.url
|
|
1331
|
-
|
|
1340
|
+
url: cta.data.url,
|
|
1341
|
+
target: cta.data.target
|
|
1342
|
+
} : void 0,
|
|
1343
|
+
data
|
|
1332
1344
|
};
|
|
1333
1345
|
};
|
|
1334
1346
|
var _token, _emitter5, _socketIo, _socketUrl, _notificationReceived, _unseenCountChanged, _unreadCountChanged, _Socket_instances, initializeSocket_fn;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNEEKTCEQ_cjs = require('./chunk-NEEKTCEQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "ActionTypeEnum", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkNEEKTCEQ_cjs.ActionTypeEnum; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "ChannelType", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkNEEKTCEQ_cjs.ChannelType; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "CtaType", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkNEEKTCEQ_cjs.CtaType; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "NotificationActionStatus", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkNEEKTCEQ_cjs.NotificationActionStatus; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "NotificationButton", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkNEEKTCEQ_cjs.NotificationButton; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "NotificationStatus", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkNEEKTCEQ_cjs.NotificationStatus; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "Novu", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkNEEKTCEQ_cjs.Novu; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "PreferenceLevel", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkNEEKTCEQ_cjs.PreferenceLevel; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "PreferenceOverrideSource", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkNEEKTCEQ_cjs.PreferenceOverrideSource; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "PreferenceOverrideSourceEnum", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkNEEKTCEQ_cjs.PreferenceOverrideSourceEnum; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "WebSocketEvent", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkNEEKTCEQ_cjs.WebSocketEvent; }
|
|
50
50
|
});
|