@everymatrix/nuts-inbox-widget 0.0.3 → 0.0.5
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/{index-305bcf58.js → index-8aa58524.js} +4 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/nuts-inbox-widget.cjs.js +2 -2
- package/dist/cjs/nuts-inbox-widget_3.cjs.entry.js +28 -9
- package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.css +2 -1
- package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.js +38 -4
- package/dist/collection/components/nuts-notification/nuts-notification.css +24 -24
- package/dist/collection/components/nuts-notification/nuts-notification.js +23 -20
- package/dist/collection/utils/locale.utils.js +2 -2
- package/dist/components/nuts-inbox-widget.js +21 -4
- package/dist/components/nuts-notification2.js +7 -4
- package/dist/esm/{index-4e49d940.js → index-5bd134e8.js} +4 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/nuts-inbox-widget.js +2 -2
- package/dist/esm/nuts-inbox-widget_3.entry.js +28 -9
- package/dist/nuts-inbox-widget/nuts-inbox-widget.esm.js +1 -1
- package/dist/nuts-inbox-widget/p-1aaf84db.js +1 -0
- package/dist/nuts-inbox-widget/p-422c8529.entry.js +1 -0
- package/dist/types/components/nuts-inbox-widget/nuts-inbox-widget.d.ts +8 -1
- package/dist/types/components/nuts-notification/nuts-notification.d.ts +2 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/nuts-inbox-widget/p-5409f451.entry.js +0 -1
- package/dist/nuts-inbox-widget/p-d5a07a94.js +0 -1
|
@@ -772,7 +772,11 @@ const postUpdateComponent = (hostRef) => {
|
|
|
772
772
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
773
773
|
const elm = hostRef.$hostElement$;
|
|
774
774
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
775
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
775
776
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
777
|
+
{
|
|
778
|
+
safeCall(instance, 'componentDidRender');
|
|
779
|
+
}
|
|
776
780
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
777
781
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
778
782
|
{
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8aa58524.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["nuts-inbox-widget_3.cjs",[[1,"nuts-inbox-widget",{"backendUrl":[513,"backend-url"],"socketUrl":[513,"socket-url"],"userId":[513,"user-id"],"sessionId":[513,"session-id"],"operatorId":[513,"operator-id"],"deviceId":[513,"device-id"],"language":[513],"environment":[513],"applicationIdentifier":[513,"application-identifier"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isLoading":[32],"popoverVisible":[32],"unseenCount":[32]}],[0,"nuts-popover",{"language":[513],"userId":[513,"user-id"],"operatorId":[513,"operator-id"],"token":[513],"backendUrl":[513,"backend-url"],"unseenCount":[514,"unseen-count"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"notifications":[32],"isLoading":[32],"showMarkAll":[32]},[[8,"messageDeleted","messageDeteledHandler"],[8,"newNotification","newNotificationHandler"]]],[0,"nuts-notification",{"badge":[513],"content":[513],"date":[513],"showSettings":[516,"show-settings"],"read":[516],"seen":[516],"language":[513],"userId":[513,"user-id"],"messageId":[513,"message-id"],"operatorId":[513,"operator-id"],"token":[513],"backendUrl":[513,"backend-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showSettingsModal":[32],"messageSeen":[32],"messageRead":[32]},[[8,"allNotificationsRead","allNotificationsReadHandler"],[8,"settingsOpened","settingsOpenedHandler"]]]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["nuts-inbox-widget_3.cjs",[[1,"nuts-inbox-widget",{"backendUrl":[513,"backend-url"],"socketUrl":[513,"socket-url"],"userId":[513,"user-id"],"sessionId":[513,"session-id"],"operatorId":[513,"operator-id"],"deviceId":[513,"device-id"],"language":[513],"environment":[513],"applicationIdentifier":[513,"application-identifier"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"bellIconPosition":[513,"bell-icon-position"],"isLoading":[32],"popoverVisible":[32],"unseenCount":[32]}],[0,"nuts-popover",{"language":[513],"userId":[513,"user-id"],"operatorId":[513,"operator-id"],"token":[513],"backendUrl":[513,"backend-url"],"unseenCount":[514,"unseen-count"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"notifications":[32],"isLoading":[32],"showMarkAll":[32]},[[8,"messageDeleted","messageDeteledHandler"],[8,"newNotification","newNotificationHandler"]]],[0,"nuts-notification",{"badge":[513],"content":[513],"date":[513],"showSettings":[516,"show-settings"],"read":[516],"seen":[516],"language":[513],"userId":[513,"user-id"],"messageId":[513,"message-id"],"operatorId":[513,"operator-id"],"token":[513],"backendUrl":[513,"backend-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showSettingsModal":[32],"messageSeen":[32],"messageRead":[32]},[[8,"allNotificationsRead","allNotificationsReadHandler"],[8,"settingsOpened","settingsOpenedHandler"]]]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-8aa58524.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["nuts-inbox-widget_3.cjs",[[1,"nuts-inbox-widget",{"backendUrl":[513,"backend-url"],"socketUrl":[513,"socket-url"],"userId":[513,"user-id"],"sessionId":[513,"session-id"],"operatorId":[513,"operator-id"],"deviceId":[513,"device-id"],"language":[513],"environment":[513],"applicationIdentifier":[513,"application-identifier"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isLoading":[32],"popoverVisible":[32],"unseenCount":[32]}],[0,"nuts-popover",{"language":[513],"userId":[513,"user-id"],"operatorId":[513,"operator-id"],"token":[513],"backendUrl":[513,"backend-url"],"unseenCount":[514,"unseen-count"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"notifications":[32],"isLoading":[32],"showMarkAll":[32]},[[8,"messageDeleted","messageDeteledHandler"],[8,"newNotification","newNotificationHandler"]]],[0,"nuts-notification",{"badge":[513],"content":[513],"date":[513],"showSettings":[516,"show-settings"],"read":[516],"seen":[516],"language":[513],"userId":[513,"user-id"],"messageId":[513,"message-id"],"operatorId":[513,"operator-id"],"token":[513],"backendUrl":[513,"backend-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showSettingsModal":[32],"messageSeen":[32],"messageRead":[32]},[[8,"allNotificationsRead","allNotificationsReadHandler"],[8,"settingsOpened","settingsOpenedHandler"]]]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["nuts-inbox-widget_3.cjs",[[1,"nuts-inbox-widget",{"backendUrl":[513,"backend-url"],"socketUrl":[513,"socket-url"],"userId":[513,"user-id"],"sessionId":[513,"session-id"],"operatorId":[513,"operator-id"],"deviceId":[513,"device-id"],"language":[513],"environment":[513],"applicationIdentifier":[513,"application-identifier"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"bellIconPosition":[513,"bell-icon-position"],"isLoading":[32],"popoverVisible":[32],"unseenCount":[32]}],[0,"nuts-popover",{"language":[513],"userId":[513,"user-id"],"operatorId":[513,"operator-id"],"token":[513],"backendUrl":[513,"backend-url"],"unseenCount":[514,"unseen-count"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"notifications":[32],"isLoading":[32],"showMarkAll":[32]},[[8,"messageDeleted","messageDeteledHandler"],[8,"newNotification","newNotificationHandler"]]],[0,"nuts-notification",{"badge":[513],"content":[513],"date":[513],"showSettings":[516,"show-settings"],"read":[516],"seen":[516],"language":[513],"userId":[513,"user-id"],"messageId":[513,"message-id"],"operatorId":[513,"operator-id"],"token":[513],"backendUrl":[513,"backend-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"showSettingsModal":[32],"messageSeen":[32],"messageRead":[32]},[[8,"allNotificationsRead","allNotificationsReadHandler"],[8,"settingsOpened","settingsOpenedHandler"]]]]]], options);
|
|
19
19
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-8aa58524.js');
|
|
6
6
|
|
|
7
7
|
/******************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -3983,7 +3983,7 @@ function isExcluded(target, excudedNodes) {
|
|
|
3983
3983
|
return false;
|
|
3984
3984
|
}
|
|
3985
3985
|
|
|
3986
|
-
const nutsInboxWidgetCss = ":host{display:block;font-family:\"Roboto\", \"Arial\", sans-serif}.BellIconWrapper{width:40px;
|
|
3986
|
+
const nutsInboxWidgetCss = ":host{display:block;font-family:\"Roboto\", \"Arial\", sans-serif}.BellIconWrapper{width:100%;height:40px;display:flex}.BellIcon{width:40px;height:40px;display:flex}";
|
|
3987
3987
|
|
|
3988
3988
|
const NutsInboxWidget = class {
|
|
3989
3989
|
constructor(hostRef) {
|
|
@@ -4002,9 +4002,13 @@ const NutsInboxWidget = class {
|
|
|
4002
4002
|
* Client custom styling via inline styles
|
|
4003
4003
|
*/
|
|
4004
4004
|
this.clientStyling = '';
|
|
4005
|
+
/**
|
|
4006
|
+
* Position of the widget (possible values: `left` and `right`) - this changes the `justify-content` property of the `.BellIconWrapper` class
|
|
4007
|
+
*/
|
|
4008
|
+
this.bellIconPosition = 'left';
|
|
4005
4009
|
this.isLoading = true;
|
|
4006
4010
|
this.popoverVisible = false;
|
|
4007
|
-
this.
|
|
4011
|
+
this.ssEndpoint = 'https://nts.everymatrix.com/ss';
|
|
4008
4012
|
this.token = null;
|
|
4009
4013
|
this.setClientStyling = () => {
|
|
4010
4014
|
let sheet = document.createElement('style');
|
|
@@ -4042,9 +4046,18 @@ const NutsInboxWidget = class {
|
|
|
4042
4046
|
}
|
|
4043
4047
|
clickOutsideHandle() {
|
|
4044
4048
|
this.popoverVisible = false;
|
|
4049
|
+
window.postMessage({ type: 'nuts-popover-isVisible', value: this.popoverVisible }, window.location.href);
|
|
4050
|
+
}
|
|
4051
|
+
positionIcon() {
|
|
4052
|
+
if (this.bellIconPosition == 'left') {
|
|
4053
|
+
this.bellIconRef.style.justifyContent = 'flex-start';
|
|
4054
|
+
}
|
|
4055
|
+
if (this.bellIconPosition == 'right') {
|
|
4056
|
+
this.bellIconRef.style.justifyContent = 'flex-end';
|
|
4057
|
+
}
|
|
4045
4058
|
}
|
|
4046
4059
|
callSS() {
|
|
4047
|
-
const url = new URL(`${this.
|
|
4060
|
+
const url = new URL(`${this.ssEndpoint}/v1/${this.operatorId}/subscribers/${this.userId}`);
|
|
4048
4061
|
if (this.deviceId) {
|
|
4049
4062
|
url.searchParams.append('deviceToken', this.deviceId);
|
|
4050
4063
|
}
|
|
@@ -4147,11 +4160,14 @@ const NutsInboxWidget = class {
|
|
|
4147
4160
|
this.setClientStylingURL();
|
|
4148
4161
|
}
|
|
4149
4162
|
}
|
|
4163
|
+
componentDidRender() {
|
|
4164
|
+
this.positionIcon();
|
|
4165
|
+
}
|
|
4150
4166
|
renderBellIcon() {
|
|
4151
4167
|
return (index.h("div", { onClick: () => this.togglePopover(), class: "BellIcon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", fill: "currentColor", class: "bi bi-bell", viewBox: "0 0 16 16" }, " ", index.h("path", { d: "M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2zM8 1.918l-.797.161A4.002 4.002 0 0 0 4 6c0 .628-.134 2.197-.459 3.742-.16.767-.376 1.566-.663 2.258h10.244c-.287-.692-.502-1.49-.663-2.258C12.134 8.197 12 6.628 12 6a4.002 4.002 0 0 0-3.203-3.92L8 1.917zM14.22 12c.223.447.481.801.78 1H1c.299-.199.557-.553.78-1C2.68 10.2 3 6.88 3 6c0-2.42 1.72-4.44 4.005-4.901a1 1 0 1 1 1.99 0A5.002 5.002 0 0 1 13 6c0 .88.32 4.2 1.22 6z" }), " "), this.unseenCount > 0 ? index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", class: "nc-bell-button-dot css-0 css-1eg2znq" }, index.h("rect", { x: "1.5", y: "1.5", width: "13", height: "13", rx: "6.5", fill: "url(#paint0_linear_1722_2699)", stroke: "#1E1E26", "stroke-width": "3" }), index.h("defs", null, index.h("linearGradient", { id: "paint0_linear_1722_2699", x1: "8", y1: "13", x2: "8", y2: "3", gradientUnits: "userSpaceOnUse" }, index.h("stop", { "stop-color": "#FF512F" }), index.h("stop", { offset: "1", "stop-color": "#DD2476" })))) : ''));
|
|
4152
4168
|
}
|
|
4153
4169
|
render() {
|
|
4154
|
-
return (index.h("div", { class: "
|
|
4170
|
+
return (index.h("div", { ref: el => this.stylingContainer = el, class: "Wrapper" }, index.h("div", { ref: el => this.bellIconRef = el, class: "BellIconWrapper" }, !this.isLoading && this.renderBellIcon()), this.popoverVisible && index.h("nuts-popover", { "unseen-count": this.unseenCount, token: this.token, "backend-url": this.backendUrl, "operator-id": this.operatorId, "user-id": this.userId, language: this.language, "client-styling": this.clientStyling })));
|
|
4155
4171
|
}
|
|
4156
4172
|
static get watchers() { return {
|
|
4157
4173
|
"userId": ["paramChangeHandler", "initializeHandler"],
|
|
@@ -5342,7 +5358,7 @@ function formatDistanceToNow(dirtyDate, options) {
|
|
|
5342
5358
|
}
|
|
5343
5359
|
|
|
5344
5360
|
const DEFAULT_LANGUAGE = 'en';
|
|
5345
|
-
const SUPPORTED_LANGUAGES = ['
|
|
5361
|
+
const SUPPORTED_LANGUAGES = ['hu', 'en'];
|
|
5346
5362
|
const TRANSLATIONS = {
|
|
5347
5363
|
en: {
|
|
5348
5364
|
notifications: 'Notifications',
|
|
@@ -5351,7 +5367,7 @@ const TRANSLATIONS = {
|
|
|
5351
5367
|
markAsRead: 'Mark as read',
|
|
5352
5368
|
removeMessage: 'Remove the message'
|
|
5353
5369
|
},
|
|
5354
|
-
|
|
5370
|
+
hu: {
|
|
5355
5371
|
notifications: 'értesítéseket',
|
|
5356
5372
|
noMessages: 'Itt még semmi újat nem látni',
|
|
5357
5373
|
markAllAsRead: 'összes megjelölése olvasottként',
|
|
@@ -39812,7 +39828,7 @@ const dateFnsLocales = /*#__PURE__*/Object.freeze({
|
|
|
39812
39828
|
zhTW: locale
|
|
39813
39829
|
});
|
|
39814
39830
|
|
|
39815
|
-
const nutsNotificationCss = ":host{display:block}p{display:block;margin-block-start:0em;margin-block-end:0em;margin-inline-start:0px;margin-inline-end:0px}.NotificationContainer{animation:show 600ms 100ms cubic-bezier(0.38, 0.97, 0.56, 0.76) forwards;opacity:0;transform-origin:top center;padding:15px;position:relative;display:flex;line-height:20px;justify-content:flex-start;align-items:center;border-radius:7px;margin:10px 15px;color:white;background:#23232b;font-weight:400;font-size:14px}@keyframes show{100%{opacity:1;transform:none}}.NotificationContainer .AvatarContainer{margin-right:10px;width:40px;min-width:40px;height:40px;border-radius:50%;display:flex;justify-content:center;align-items:center;font-size:40px;border:1px solid #525266;overflow:hidden}.NotificationContainer .AvatarContainer .Avatar{box-sizing:border-box;position:relative;display:block;user-select:none;overflow:hidden;width:38px;min-width:38px;height:38px;border-radius:32px;text-decoration:none;border:0px;background-color:transparent;padding:0px}.NotificationContainer .AvatarContainer .Avatar .AvatarImage{object-fit:cover;width:100%;height:100%;display:block}.NotificationContainer .ContentContainer{display:flex;flex-direction:column}.NotificationContainer .Date{min-width:55px;font-size:12px;font-weight:400;opacity:0.5;line-height:14.4px;color:#525266}.NotificationContainer .Settings{opacity:0;margin-left:auto;cursor:pointer}.NotificationContainer .SettingsDropdown{z-index:999;position:absolute;background:#292933;box-shadow:rgba(0, 0, 0, 0.2) 0px 5px 20px;border-radius:7px;padding:4px;border:none;
|
|
39831
|
+
const nutsNotificationCss = ":host{display:block}p{display:block;margin-block-start:0em;margin-block-end:0em;margin-inline-start:0px;margin-inline-end:0px}.NotificationContainer{animation:show 600ms 100ms cubic-bezier(0.38, 0.97, 0.56, 0.76) forwards;opacity:0;transform-origin:top center;padding:15px;position:relative;display:flex;line-height:20px;justify-content:flex-start;align-items:center;border-radius:7px;margin:10px 15px;color:white;background:#23232b;font-weight:400;font-size:14px}@keyframes show{100%{opacity:1;transform:none}}.NotificationContainer .AvatarContainer{margin-right:10px;width:40px;min-width:40px;height:40px;border-radius:50%;display:flex;justify-content:center;align-items:center;font-size:40px;border:1px solid #525266;overflow:hidden}.NotificationContainer .AvatarContainer .Avatar{box-sizing:border-box;position:relative;display:block;user-select:none;overflow:hidden;width:38px;min-width:38px;height:38px;border-radius:32px;text-decoration:none;border:0px;background-color:transparent;padding:0px}.NotificationContainer .AvatarContainer .Avatar .AvatarImage{object-fit:cover;width:100%;height:100%;display:block}.NotificationContainer .ContentContainer{display:flex;flex-direction:column}.NotificationContainer .Date{min-width:55px;font-size:12px;font-weight:400;opacity:0.5;line-height:14.4px;color:#525266}.NotificationContainer .Settings{opacity:0;margin-left:auto;cursor:pointer}.NotificationContainer:hover .Settings{opacity:0.5}.Unseen::before{content:\"\";position:absolute;inset:0px;width:5px;border-radius:7px 0px 0px 7px;background:linear-gradient(0deg, #ff512f 0%, #dd2476 100%)}.Unseen:hover .UnseenButton{opacity:0;width:0px}.SettingsDropdown{z-index:999;position:absolute;background:#292933;box-shadow:rgba(0, 0, 0, 0.2) 0px 5px 20px;border-radius:7px;padding:4px;border:none;transition-property:opacity;transition-duration:150ms;transition-timing-function:ease;opacity:1;width:max-content;display:flex;flex-direction:column;margin-left:195px;margin-top:-30px}.SettingsDropdown svg{margin-right:10px}.SettingsDropdown button{font-family:inherit;border:0px;background-color:transparent;outline:0px;width:100%;text-align:left;text-decoration:none;box-sizing:border-box;padding:10px 12px;cursor:pointer;border-radius:7px;display:flex;align-items:center;color:white;font-weight:400;font-size:14px}.SettingsDropdown button:hover{background:#3d3d4d;transition:300ms}";
|
|
39816
39832
|
|
|
39817
39833
|
const dateFnsLocale = (lang) => {
|
|
39818
39834
|
return lang in dateFnsLocales ? dateFnsLocales[lang] : locale$1s;
|
|
@@ -39907,11 +39923,14 @@ const NutsNotification = class {
|
|
|
39907
39923
|
toggleSettingsModal() {
|
|
39908
39924
|
this.showSettingsModal = !this.showSettingsModal;
|
|
39909
39925
|
if (this.showSettingsModal) {
|
|
39926
|
+
let rect = this.settingsButtonRef.getBoundingClientRect();
|
|
39927
|
+
this.settingsModalRef.style.left = `${rect.left}px`;
|
|
39928
|
+
this.settingsModalRef.style.top = `${rect.top}px`;
|
|
39910
39929
|
this.settingsOpened.emit(this.messageId);
|
|
39911
39930
|
}
|
|
39912
39931
|
}
|
|
39913
39932
|
render() {
|
|
39914
|
-
return (index.h("div", { class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: el => this.stylingContainer = el }, this.badge ? index.h("div", { class: "AvatarContainer" }, index.h("div", { class: "Avatar" }, index.h("img", { class: "AvatarImage", src: this.badge }))) : '', index.h("div", { class: "ContentContainer" }, index.h("p", null, this.content), index.h("p", { class: "Date" }, formatDistanceToNow(new Date(this.date), { addSuffix: true, locale: dateFnsLocale(this.language) }))), index.h("div", { class: "Settings", onClick: () => this.toggleSettingsModal() }, index.h("svg", { width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M20.625 15.5C20.625 16.5547 21.4453 17.375 22.5 17.375C23.5156 17.375 24.375 16.5547 24.375 15.5C24.375 14.4844 23.5156 13.625 22.5 13.625C21.4453 13.625 20.625 14.4844 20.625 15.5ZM9.375 15.5C9.375 14.4844 8.51562 13.625 7.5 13.625C6.44531 13.625 5.625 14.4844 5.625 15.5C5.625 16.5547 6.44531 17.375 7.5 17.375C8.51562 17.375 9.375 16.5547 9.375 15.5ZM16.875 15.5C16.875 14.4844 16.0156 13.625 15 13.625C13.9453 13.625 13.125 14.4844 13.125 15.5C13.125 16.5547 13.9453 17.375 15 17.375C16.0156 17.375 16.875 16.5547 16.875 15.5Z", fill: "currentColor" }))), this.showSettingsModal ? index.h("div", { class: "SettingsDropdown" }, index.h("button", { onClick: () => this.markAsRead(this.messageId) }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M14.9434 5.17969C14.2109 4.59375 13.625 4.125 10.1387 1.60547C9.64062 1.25391 8.67383 0.375 8 0.375V0.404297C7.9707 0.404297 7.9707 0.375 7.9707 0.375C7.29688 0.375 6.33008 1.25391 5.83203 1.60547C2.3457 4.125 1.75977 4.59375 1.02734 5.17969C0.675781 5.44336 0.5 5.85352 0.5 6.26367V13.9688C0.5 14.7598 1.11523 15.375 1.90625 15.375H14.0938C14.8555 15.375 15.5 14.7598 15.5 13.9688V6.26367C15.5 5.85352 15.2949 5.44336 14.9434 5.17969ZM9.37695 11.1562C8.9668 11.4785 8.46875 11.6543 8 11.6543C7.50195 11.6543 7.00391 11.4785 6.59375 11.1562L2.375 7.8457V6.49805C2.99023 6 3.72266 5.44336 6.94531 3.12891C7.0332 3.04102 7.15039 2.95312 7.26758 2.86523C7.41406 2.74805 7.73633 2.48438 8 2.33789C8.23438 2.48438 8.55664 2.74805 8.70312 2.86523C8.82031 2.95312 8.9375 3.04102 9.02539 3.12891C12.2188 5.44336 12.9805 6 13.625 6.49805V7.8457L9.37695 11.1562Z", fill: "currentColor" })), translate$1('markAsRead', this.language)), index.h("button", { onClick: () => this.deleteMessage(this.messageId) }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M4.375 15.4375C4.375 16.1758 4.94922 16.75 5.6875 16.75H13.5625C14.2734 16.75 14.875 16.1758 14.875 15.4375V6.25H4.375V15.4375ZM11.8125 8.4375C11.8125 8.21875 12.0039 8 12.25 8C12.4688 8 12.6875 8.21875 12.6875 8.4375V14.5625C12.6875 14.8086 12.4688 15 12.25 15C12.0039 15 11.8125 14.8086 11.8125 14.5625V8.4375ZM9.1875 8.4375C9.1875 8.21875 9.37891 8 9.625 8C9.84375 8 10.0625 8.21875 10.0625 8.4375V14.5625C10.0625 14.8086 9.84375 15 9.625 15C9.37891 15 9.1875 14.8086 9.1875 14.5625V8.4375ZM6.5625 8.4375C6.5625 8.21875 6.75391 8 7 8C7.21875 8 7.4375 8.21875 7.4375 8.4375V14.5625C7.4375 14.8086 7.21875 15 7 15C6.75391 15 6.5625 14.8086 6.5625 14.5625V8.4375ZM15.3125 3.625H12.25L11.9219 2.99609C11.8398 2.85938 11.7031 2.75 11.5391 2.75H7.68359C7.51953 2.75 7.38281 2.85938 7.30078 2.99609L7 3.625H3.9375C3.69141 3.625 3.5 3.84375 3.5 4.0625V4.9375C3.5 5.18359 3.69141 5.375 3.9375 5.375H15.3125C15.5312 5.375 15.75 5.18359 15.75 4.9375V4.0625C15.75 3.84375 15.5312 3.625 15.3125 3.625Z", fill: "currentColor" })), translate$1('removeMessage', this.language))) : ''
|
|
39933
|
+
return (index.h("div", null, index.h("div", { class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: el => this.stylingContainer = el }, this.badge ? index.h("div", { class: "AvatarContainer" }, index.h("div", { class: "Avatar" }, index.h("img", { class: "AvatarImage", src: this.badge }))) : '', index.h("div", { class: "ContentContainer" }, index.h("p", null, this.content), index.h("p", { class: "Date" }, formatDistanceToNow(new Date(this.date), { addSuffix: true, locale: dateFnsLocale(this.language) }))), index.h("div", { class: "Settings", onClick: () => this.toggleSettingsModal(), ref: el => this.settingsButtonRef = el }, index.h("svg", { width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M20.625 15.5C20.625 16.5547 21.4453 17.375 22.5 17.375C23.5156 17.375 24.375 16.5547 24.375 15.5C24.375 14.4844 23.5156 13.625 22.5 13.625C21.4453 13.625 20.625 14.4844 20.625 15.5ZM9.375 15.5C9.375 14.4844 8.51562 13.625 7.5 13.625C6.44531 13.625 5.625 14.4844 5.625 15.5C5.625 16.5547 6.44531 17.375 7.5 17.375C8.51562 17.375 9.375 16.5547 9.375 15.5ZM16.875 15.5C16.875 14.4844 16.0156 13.625 15 13.625C13.9453 13.625 13.125 14.4844 13.125 15.5C13.125 16.5547 13.9453 17.375 15 17.375C16.0156 17.375 16.875 16.5547 16.875 15.5Z", fill: "currentColor" }))), this.messageSeen ? '' : index.h("div", { class: "UnseenButton" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10px", height: "10px", viewBox: "0 0 16 16", fill: "none" }, index.h("rect", { x: "1.5", y: "1.5", width: "13", height: "13", rx: "6.5", fill: "url(#paint0_linear_1722_2699)", stroke: "#1E1E26", "stroke-width": "3" }), index.h("defs", null, index.h("linearGradient", { id: "paint0_linear_1722_2699", x1: "8", y1: "13", x2: "8", y2: "3", gradientUnits: "userSpaceOnUse" }, index.h("stop", { "stop-color": "#FF512F" }), index.h("stop", { offset: "1", "stop-color": "#DD2476" })))))), this.showSettingsModal ? index.h("div", { class: "SettingsDropdown", ref: el => this.settingsModalRef = el }, index.h("button", { onClick: () => this.markAsRead(this.messageId) }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M14.9434 5.17969C14.2109 4.59375 13.625 4.125 10.1387 1.60547C9.64062 1.25391 8.67383 0.375 8 0.375V0.404297C7.9707 0.404297 7.9707 0.375 7.9707 0.375C7.29688 0.375 6.33008 1.25391 5.83203 1.60547C2.3457 4.125 1.75977 4.59375 1.02734 5.17969C0.675781 5.44336 0.5 5.85352 0.5 6.26367V13.9688C0.5 14.7598 1.11523 15.375 1.90625 15.375H14.0938C14.8555 15.375 15.5 14.7598 15.5 13.9688V6.26367C15.5 5.85352 15.2949 5.44336 14.9434 5.17969ZM9.37695 11.1562C8.9668 11.4785 8.46875 11.6543 8 11.6543C7.50195 11.6543 7.00391 11.4785 6.59375 11.1562L2.375 7.8457V6.49805C2.99023 6 3.72266 5.44336 6.94531 3.12891C7.0332 3.04102 7.15039 2.95312 7.26758 2.86523C7.41406 2.74805 7.73633 2.48438 8 2.33789C8.23438 2.48438 8.55664 2.74805 8.70312 2.86523C8.82031 2.95312 8.9375 3.04102 9.02539 3.12891C12.2188 5.44336 12.9805 6 13.625 6.49805V7.8457L9.37695 11.1562Z", fill: "currentColor" })), translate$1('markAsRead', this.language)), index.h("button", { onClick: () => this.deleteMessage(this.messageId) }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M4.375 15.4375C4.375 16.1758 4.94922 16.75 5.6875 16.75H13.5625C14.2734 16.75 14.875 16.1758 14.875 15.4375V6.25H4.375V15.4375ZM11.8125 8.4375C11.8125 8.21875 12.0039 8 12.25 8C12.4688 8 12.6875 8.21875 12.6875 8.4375V14.5625C12.6875 14.8086 12.4688 15 12.25 15C12.0039 15 11.8125 14.8086 11.8125 14.5625V8.4375ZM9.1875 8.4375C9.1875 8.21875 9.37891 8 9.625 8C9.84375 8 10.0625 8.21875 10.0625 8.4375V14.5625C10.0625 14.8086 9.84375 15 9.625 15C9.37891 15 9.1875 14.8086 9.1875 14.5625V8.4375ZM6.5625 8.4375C6.5625 8.21875 6.75391 8 7 8C7.21875 8 7.4375 8.21875 7.4375 8.4375V14.5625C7.4375 14.8086 7.21875 15 7 15C6.75391 15 6.5625 14.8086 6.5625 14.5625V8.4375ZM15.3125 3.625H12.25L11.9219 2.99609C11.8398 2.85938 11.7031 2.75 11.5391 2.75H7.68359C7.51953 2.75 7.38281 2.85938 7.30078 2.99609L7 3.625H3.9375C3.69141 3.625 3.5 3.84375 3.5 4.0625V4.9375C3.5 5.18359 3.69141 5.375 3.9375 5.375H15.3125C15.5312 5.375 15.75 5.18359 15.75 4.9375V4.0625C15.75 3.84375 15.5312 3.625 15.3125 3.625Z", fill: "currentColor" })), translate$1('removeMessage', this.language))) : ''));
|
|
39915
39934
|
}
|
|
39916
39935
|
};
|
|
39917
39936
|
NutsNotification.style = nutsNotificationCss;
|
|
@@ -16,9 +16,13 @@ export class NutsInboxWidget {
|
|
|
16
16
|
* Client custom styling via inline styles
|
|
17
17
|
*/
|
|
18
18
|
this.clientStyling = '';
|
|
19
|
+
/**
|
|
20
|
+
* Position of the widget (possible values: `left` and `right`) - this changes the `justify-content` property of the `.BellIconWrapper` class
|
|
21
|
+
*/
|
|
22
|
+
this.bellIconPosition = 'left';
|
|
19
23
|
this.isLoading = true;
|
|
20
24
|
this.popoverVisible = false;
|
|
21
|
-
this.
|
|
25
|
+
this.ssEndpoint = 'https://nts.everymatrix.com/ss';
|
|
22
26
|
this.token = null;
|
|
23
27
|
this.setClientStyling = () => {
|
|
24
28
|
let sheet = document.createElement('style');
|
|
@@ -56,9 +60,18 @@ export class NutsInboxWidget {
|
|
|
56
60
|
}
|
|
57
61
|
clickOutsideHandle() {
|
|
58
62
|
this.popoverVisible = false;
|
|
63
|
+
window.postMessage({ type: 'nuts-popover-isVisible', value: this.popoverVisible }, window.location.href);
|
|
64
|
+
}
|
|
65
|
+
positionIcon() {
|
|
66
|
+
if (this.bellIconPosition == 'left') {
|
|
67
|
+
this.bellIconRef.style.justifyContent = 'flex-start';
|
|
68
|
+
}
|
|
69
|
+
if (this.bellIconPosition == 'right') {
|
|
70
|
+
this.bellIconRef.style.justifyContent = 'flex-end';
|
|
71
|
+
}
|
|
59
72
|
}
|
|
60
73
|
callSS() {
|
|
61
|
-
const url = new URL(`${this.
|
|
74
|
+
const url = new URL(`${this.ssEndpoint}/v1/${this.operatorId}/subscribers/${this.userId}`);
|
|
62
75
|
if (this.deviceId) {
|
|
63
76
|
url.searchParams.append('deviceToken', this.deviceId);
|
|
64
77
|
}
|
|
@@ -161,6 +174,9 @@ export class NutsInboxWidget {
|
|
|
161
174
|
this.setClientStylingURL();
|
|
162
175
|
}
|
|
163
176
|
}
|
|
177
|
+
componentDidRender() {
|
|
178
|
+
this.positionIcon();
|
|
179
|
+
}
|
|
164
180
|
renderBellIcon() {
|
|
165
181
|
return (h("div", { onClick: () => this.togglePopover(), class: "BellIcon" },
|
|
166
182
|
h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", fill: "currentColor", class: "bi bi-bell", viewBox: "0 0 16 16" },
|
|
@@ -175,8 +191,8 @@ export class NutsInboxWidget {
|
|
|
175
191
|
h("stop", { offset: "1", "stop-color": "#DD2476" })))) : ''));
|
|
176
192
|
}
|
|
177
193
|
render() {
|
|
178
|
-
return (h("div", {
|
|
179
|
-
!this.isLoading && this.renderBellIcon(),
|
|
194
|
+
return (h("div", { ref: el => this.stylingContainer = el, class: "Wrapper" },
|
|
195
|
+
h("div", { ref: el => this.bellIconRef = el, class: "BellIconWrapper" }, !this.isLoading && this.renderBellIcon()),
|
|
180
196
|
this.popoverVisible && h("nuts-popover", { "unseen-count": this.unseenCount, token: this.token, "backend-url": this.backendUrl, "operator-id": this.operatorId, "user-id": this.userId, language: this.language, "client-styling": this.clientStyling })));
|
|
181
197
|
}
|
|
182
198
|
static get is() { return "nuts-inbox-widget"; }
|
|
@@ -377,6 +393,24 @@ export class NutsInboxWidget {
|
|
|
377
393
|
},
|
|
378
394
|
"attribute": "client-styling-url",
|
|
379
395
|
"reflect": true
|
|
396
|
+
},
|
|
397
|
+
"bellIconPosition": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"mutable": false,
|
|
400
|
+
"complexType": {
|
|
401
|
+
"original": "string",
|
|
402
|
+
"resolved": "string",
|
|
403
|
+
"references": {}
|
|
404
|
+
},
|
|
405
|
+
"required": false,
|
|
406
|
+
"optional": false,
|
|
407
|
+
"docs": {
|
|
408
|
+
"tags": [],
|
|
409
|
+
"text": "Position of the widget (possible values: `left` and `right`) - this changes the `justify-content` property of the `.BellIconWrapper` class"
|
|
410
|
+
},
|
|
411
|
+
"attribute": "bell-icon-position",
|
|
412
|
+
"reflect": true,
|
|
413
|
+
"defaultValue": "'left'"
|
|
380
414
|
}
|
|
381
415
|
}; }
|
|
382
416
|
static get states() { return {
|
|
@@ -84,7 +84,25 @@ p {
|
|
|
84
84
|
margin-left: auto;
|
|
85
85
|
cursor: pointer;
|
|
86
86
|
}
|
|
87
|
-
.NotificationContainer .
|
|
87
|
+
.NotificationContainer:hover .Settings {
|
|
88
|
+
opacity: 0.5;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.Unseen::before {
|
|
92
|
+
content: "";
|
|
93
|
+
position: absolute;
|
|
94
|
+
inset: 0px;
|
|
95
|
+
width: 5px;
|
|
96
|
+
border-radius: 7px 0px 0px 7px;
|
|
97
|
+
background: linear-gradient(0deg, #ff512f 0%, #dd2476 100%);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.Unseen:hover .UnseenButton {
|
|
101
|
+
opacity: 0;
|
|
102
|
+
width: 0px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.SettingsDropdown {
|
|
88
106
|
z-index: 999;
|
|
89
107
|
position: absolute;
|
|
90
108
|
background: #292933;
|
|
@@ -92,21 +110,20 @@ p {
|
|
|
92
110
|
border-radius: 7px;
|
|
93
111
|
padding: 4px;
|
|
94
112
|
border: none;
|
|
95
|
-
left: 190px;
|
|
96
|
-
top: 40px;
|
|
97
113
|
transition-property: opacity;
|
|
98
114
|
transition-duration: 150ms;
|
|
99
115
|
transition-timing-function: ease;
|
|
100
116
|
opacity: 1;
|
|
101
|
-
z-index: 300;
|
|
102
117
|
width: max-content;
|
|
103
118
|
display: flex;
|
|
104
119
|
flex-direction: column;
|
|
120
|
+
margin-left: 195px;
|
|
121
|
+
margin-top: -30px;
|
|
105
122
|
}
|
|
106
|
-
.
|
|
123
|
+
.SettingsDropdown svg {
|
|
107
124
|
margin-right: 10px;
|
|
108
125
|
}
|
|
109
|
-
.
|
|
126
|
+
.SettingsDropdown button {
|
|
110
127
|
font-family: inherit;
|
|
111
128
|
border: 0px;
|
|
112
129
|
background-color: transparent;
|
|
@@ -124,24 +141,7 @@ p {
|
|
|
124
141
|
font-weight: 400;
|
|
125
142
|
font-size: 14px;
|
|
126
143
|
}
|
|
127
|
-
.
|
|
144
|
+
.SettingsDropdown button:hover {
|
|
128
145
|
background: #3d3d4d;
|
|
129
146
|
transition: 300ms;
|
|
130
|
-
}
|
|
131
|
-
.NotificationContainer:hover .Settings {
|
|
132
|
-
opacity: 0.5;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.Unseen::before {
|
|
136
|
-
content: "";
|
|
137
|
-
position: absolute;
|
|
138
|
-
inset: 0px;
|
|
139
|
-
width: 5px;
|
|
140
|
-
border-radius: 7px 0px 0px 7px;
|
|
141
|
-
background: linear-gradient(0deg, #ff512f 0%, #dd2476 100%);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.Unseen:hover .UnseenButton {
|
|
145
|
-
opacity: 0;
|
|
146
|
-
width: 0px;
|
|
147
147
|
}
|
|
@@ -91,23 +91,33 @@ export class NutsNotification {
|
|
|
91
91
|
}
|
|
92
92
|
toggleSettingsModal() {
|
|
93
93
|
this.showSettingsModal = !this.showSettingsModal;
|
|
94
|
-
;
|
|
95
94
|
if (this.showSettingsModal) {
|
|
95
|
+
let rect = this.settingsButtonRef.getBoundingClientRect();
|
|
96
|
+
this.settingsModalRef.style.left = `${rect.left}px`;
|
|
97
|
+
this.settingsModalRef.style.top = `${rect.top}px`;
|
|
96
98
|
this.settingsOpened.emit(this.messageId);
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
render() {
|
|
100
|
-
return (h("div",
|
|
101
|
-
|
|
102
|
-
h("div", { class: "
|
|
103
|
-
h("
|
|
104
|
-
|
|
105
|
-
h("
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
h("
|
|
109
|
-
h("
|
|
110
|
-
|
|
102
|
+
return (h("div", null,
|
|
103
|
+
h("div", { class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: el => this.stylingContainer = el },
|
|
104
|
+
this.badge ? h("div", { class: "AvatarContainer" },
|
|
105
|
+
h("div", { class: "Avatar" },
|
|
106
|
+
h("img", { class: "AvatarImage", src: this.badge }))) : '',
|
|
107
|
+
h("div", { class: "ContentContainer" },
|
|
108
|
+
h("p", null, this.content),
|
|
109
|
+
h("p", { class: "Date" }, formatDistanceToNow(new Date(this.date), { addSuffix: true, locale: dateFnsLocale(this.language) }))),
|
|
110
|
+
h("div", { class: "Settings", onClick: () => this.toggleSettingsModal(), ref: el => this.settingsButtonRef = el },
|
|
111
|
+
h("svg", { width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
112
|
+
h("path", { d: "M20.625 15.5C20.625 16.5547 21.4453 17.375 22.5 17.375C23.5156 17.375 24.375 16.5547 24.375 15.5C24.375 14.4844 23.5156 13.625 22.5 13.625C21.4453 13.625 20.625 14.4844 20.625 15.5ZM9.375 15.5C9.375 14.4844 8.51562 13.625 7.5 13.625C6.44531 13.625 5.625 14.4844 5.625 15.5C5.625 16.5547 6.44531 17.375 7.5 17.375C8.51562 17.375 9.375 16.5547 9.375 15.5ZM16.875 15.5C16.875 14.4844 16.0156 13.625 15 13.625C13.9453 13.625 13.125 14.4844 13.125 15.5C13.125 16.5547 13.9453 17.375 15 17.375C16.0156 17.375 16.875 16.5547 16.875 15.5Z", fill: "currentColor" }))),
|
|
113
|
+
this.messageSeen ? '' : h("div", { class: "UnseenButton" },
|
|
114
|
+
h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10px", height: "10px", viewBox: "0 0 16 16", fill: "none" },
|
|
115
|
+
h("rect", { x: "1.5", y: "1.5", width: "13", height: "13", rx: "6.5", fill: "url(#paint0_linear_1722_2699)", stroke: "#1E1E26", "stroke-width": "3" }),
|
|
116
|
+
h("defs", null,
|
|
117
|
+
h("linearGradient", { id: "paint0_linear_1722_2699", x1: "8", y1: "13", x2: "8", y2: "3", gradientUnits: "userSpaceOnUse" },
|
|
118
|
+
h("stop", { "stop-color": "#FF512F" }),
|
|
119
|
+
h("stop", { offset: "1", "stop-color": "#DD2476" })))))),
|
|
120
|
+
this.showSettingsModal ? h("div", { class: "SettingsDropdown", ref: el => this.settingsModalRef = el },
|
|
111
121
|
h("button", { onClick: () => this.markAsRead(this.messageId) },
|
|
112
122
|
h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
113
123
|
h("path", { d: "M14.9434 5.17969C14.2109 4.59375 13.625 4.125 10.1387 1.60547C9.64062 1.25391 8.67383 0.375 8 0.375V0.404297C7.9707 0.404297 7.9707 0.375 7.9707 0.375C7.29688 0.375 6.33008 1.25391 5.83203 1.60547C2.3457 4.125 1.75977 4.59375 1.02734 5.17969C0.675781 5.44336 0.5 5.85352 0.5 6.26367V13.9688C0.5 14.7598 1.11523 15.375 1.90625 15.375H14.0938C14.8555 15.375 15.5 14.7598 15.5 13.9688V6.26367C15.5 5.85352 15.2949 5.44336 14.9434 5.17969ZM9.37695 11.1562C8.9668 11.4785 8.46875 11.6543 8 11.6543C7.50195 11.6543 7.00391 11.4785 6.59375 11.1562L2.375 7.8457V6.49805C2.99023 6 3.72266 5.44336 6.94531 3.12891C7.0332 3.04102 7.15039 2.95312 7.26758 2.86523C7.41406 2.74805 7.73633 2.48438 8 2.33789C8.23438 2.48438 8.55664 2.74805 8.70312 2.86523C8.82031 2.95312 8.9375 3.04102 9.02539 3.12891C12.2188 5.44336 12.9805 6 13.625 6.49805V7.8457L9.37695 11.1562Z", fill: "currentColor" })),
|
|
@@ -115,14 +125,7 @@ export class NutsNotification {
|
|
|
115
125
|
h("button", { onClick: () => this.deleteMessage(this.messageId) },
|
|
116
126
|
h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
117
127
|
h("path", { d: "M4.375 15.4375C4.375 16.1758 4.94922 16.75 5.6875 16.75H13.5625C14.2734 16.75 14.875 16.1758 14.875 15.4375V6.25H4.375V15.4375ZM11.8125 8.4375C11.8125 8.21875 12.0039 8 12.25 8C12.4688 8 12.6875 8.21875 12.6875 8.4375V14.5625C12.6875 14.8086 12.4688 15 12.25 15C12.0039 15 11.8125 14.8086 11.8125 14.5625V8.4375ZM9.1875 8.4375C9.1875 8.21875 9.37891 8 9.625 8C9.84375 8 10.0625 8.21875 10.0625 8.4375V14.5625C10.0625 14.8086 9.84375 15 9.625 15C9.37891 15 9.1875 14.8086 9.1875 14.5625V8.4375ZM6.5625 8.4375C6.5625 8.21875 6.75391 8 7 8C7.21875 8 7.4375 8.21875 7.4375 8.4375V14.5625C7.4375 14.8086 7.21875 15 7 15C6.75391 15 6.5625 14.8086 6.5625 14.5625V8.4375ZM15.3125 3.625H12.25L11.9219 2.99609C11.8398 2.85938 11.7031 2.75 11.5391 2.75H7.68359C7.51953 2.75 7.38281 2.85938 7.30078 2.99609L7 3.625H3.9375C3.69141 3.625 3.5 3.84375 3.5 4.0625V4.9375C3.5 5.18359 3.69141 5.375 3.9375 5.375H15.3125C15.5312 5.375 15.75 5.18359 15.75 4.9375V4.0625C15.75 3.84375 15.5312 3.625 15.3125 3.625Z", fill: "currentColor" })),
|
|
118
|
-
translate('removeMessage', this.language))) : ''
|
|
119
|
-
this.messageSeen ? '' : h("div", { class: "UnseenButton" },
|
|
120
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10px", height: "10px", viewBox: "0 0 16 16", fill: "none" },
|
|
121
|
-
h("rect", { x: "1.5", y: "1.5", width: "13", height: "13", rx: "6.5", fill: "url(#paint0_linear_1722_2699)", stroke: "#1E1E26", "stroke-width": "3" }),
|
|
122
|
-
h("defs", null,
|
|
123
|
-
h("linearGradient", { id: "paint0_linear_1722_2699", x1: "8", y1: "13", x2: "8", y2: "3", gradientUnits: "userSpaceOnUse" },
|
|
124
|
-
h("stop", { "stop-color": "#FF512F" }),
|
|
125
|
-
h("stop", { offset: "1", "stop-color": "#DD2476" })))))));
|
|
128
|
+
translate('removeMessage', this.language))) : ''));
|
|
126
129
|
}
|
|
127
130
|
static get is() { return "nuts-notification"; }
|
|
128
131
|
static get originalStyleUrls() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const DEFAULT_LANGUAGE = 'en';
|
|
2
|
-
const SUPPORTED_LANGUAGES = ['
|
|
2
|
+
const SUPPORTED_LANGUAGES = ['hu', 'en'];
|
|
3
3
|
const TRANSLATIONS = {
|
|
4
4
|
en: {
|
|
5
5
|
notifications: 'Notifications',
|
|
@@ -8,7 +8,7 @@ const TRANSLATIONS = {
|
|
|
8
8
|
markAsRead: 'Mark as read',
|
|
9
9
|
removeMessage: 'Remove the message'
|
|
10
10
|
},
|
|
11
|
-
|
|
11
|
+
hu: {
|
|
12
12
|
notifications: 'értesítéseket',
|
|
13
13
|
noMessages: 'Itt még semmi újat nem látni',
|
|
14
14
|
markAllAsRead: 'összes megjelölése olvasottként',
|
|
@@ -3985,7 +3985,7 @@ function isExcluded(target, excudedNodes) {
|
|
|
3985
3985
|
return false;
|
|
3986
3986
|
}
|
|
3987
3987
|
|
|
3988
|
-
const nutsInboxWidgetCss = ":host{display:block;font-family:\"Roboto\", \"Arial\", sans-serif}.BellIconWrapper{width:40px;
|
|
3988
|
+
const nutsInboxWidgetCss = ":host{display:block;font-family:\"Roboto\", \"Arial\", sans-serif}.BellIconWrapper{width:100%;height:40px;display:flex}.BellIcon{width:40px;height:40px;display:flex}";
|
|
3989
3989
|
|
|
3990
3990
|
const NutsInboxWidget$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
3991
3991
|
constructor() {
|
|
@@ -4006,9 +4006,13 @@ const NutsInboxWidget$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
4006
4006
|
* Client custom styling via inline styles
|
|
4007
4007
|
*/
|
|
4008
4008
|
this.clientStyling = '';
|
|
4009
|
+
/**
|
|
4010
|
+
* Position of the widget (possible values: `left` and `right`) - this changes the `justify-content` property of the `.BellIconWrapper` class
|
|
4011
|
+
*/
|
|
4012
|
+
this.bellIconPosition = 'left';
|
|
4009
4013
|
this.isLoading = true;
|
|
4010
4014
|
this.popoverVisible = false;
|
|
4011
|
-
this.
|
|
4015
|
+
this.ssEndpoint = 'https://nts.everymatrix.com/ss';
|
|
4012
4016
|
this.token = null;
|
|
4013
4017
|
this.setClientStyling = () => {
|
|
4014
4018
|
let sheet = document.createElement('style');
|
|
@@ -4046,9 +4050,18 @@ const NutsInboxWidget$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
4046
4050
|
}
|
|
4047
4051
|
clickOutsideHandle() {
|
|
4048
4052
|
this.popoverVisible = false;
|
|
4053
|
+
window.postMessage({ type: 'nuts-popover-isVisible', value: this.popoverVisible }, window.location.href);
|
|
4054
|
+
}
|
|
4055
|
+
positionIcon() {
|
|
4056
|
+
if (this.bellIconPosition == 'left') {
|
|
4057
|
+
this.bellIconRef.style.justifyContent = 'flex-start';
|
|
4058
|
+
}
|
|
4059
|
+
if (this.bellIconPosition == 'right') {
|
|
4060
|
+
this.bellIconRef.style.justifyContent = 'flex-end';
|
|
4061
|
+
}
|
|
4049
4062
|
}
|
|
4050
4063
|
callSS() {
|
|
4051
|
-
const url = new URL(`${this.
|
|
4064
|
+
const url = new URL(`${this.ssEndpoint}/v1/${this.operatorId}/subscribers/${this.userId}`);
|
|
4052
4065
|
if (this.deviceId) {
|
|
4053
4066
|
url.searchParams.append('deviceToken', this.deviceId);
|
|
4054
4067
|
}
|
|
@@ -4151,11 +4164,14 @@ const NutsInboxWidget$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
4151
4164
|
this.setClientStylingURL();
|
|
4152
4165
|
}
|
|
4153
4166
|
}
|
|
4167
|
+
componentDidRender() {
|
|
4168
|
+
this.positionIcon();
|
|
4169
|
+
}
|
|
4154
4170
|
renderBellIcon() {
|
|
4155
4171
|
return (h("div", { onClick: () => this.togglePopover(), class: "BellIcon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", fill: "currentColor", class: "bi bi-bell", viewBox: "0 0 16 16" }, " ", h("path", { d: "M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2zM8 1.918l-.797.161A4.002 4.002 0 0 0 4 6c0 .628-.134 2.197-.459 3.742-.16.767-.376 1.566-.663 2.258h10.244c-.287-.692-.502-1.49-.663-2.258C12.134 8.197 12 6.628 12 6a4.002 4.002 0 0 0-3.203-3.92L8 1.917zM14.22 12c.223.447.481.801.78 1H1c.299-.199.557-.553.78-1C2.68 10.2 3 6.88 3 6c0-2.42 1.72-4.44 4.005-4.901a1 1 0 1 1 1.99 0A5.002 5.002 0 0 1 13 6c0 .88.32 4.2 1.22 6z" }), " "), this.unseenCount > 0 ? h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", class: "nc-bell-button-dot css-0 css-1eg2znq" }, h("rect", { x: "1.5", y: "1.5", width: "13", height: "13", rx: "6.5", fill: "url(#paint0_linear_1722_2699)", stroke: "#1E1E26", "stroke-width": "3" }), h("defs", null, h("linearGradient", { id: "paint0_linear_1722_2699", x1: "8", y1: "13", x2: "8", y2: "3", gradientUnits: "userSpaceOnUse" }, h("stop", { "stop-color": "#FF512F" }), h("stop", { offset: "1", "stop-color": "#DD2476" })))) : ''));
|
|
4156
4172
|
}
|
|
4157
4173
|
render() {
|
|
4158
|
-
return (h("div", { class: "
|
|
4174
|
+
return (h("div", { ref: el => this.stylingContainer = el, class: "Wrapper" }, h("div", { ref: el => this.bellIconRef = el, class: "BellIconWrapper" }, !this.isLoading && this.renderBellIcon()), this.popoverVisible && h("nuts-popover", { "unseen-count": this.unseenCount, token: this.token, "backend-url": this.backendUrl, "operator-id": this.operatorId, "user-id": this.userId, language: this.language, "client-styling": this.clientStyling })));
|
|
4159
4175
|
}
|
|
4160
4176
|
static get watchers() { return {
|
|
4161
4177
|
"userId": ["paramChangeHandler", "initializeHandler"],
|
|
@@ -4177,6 +4193,7 @@ const NutsInboxWidget$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
4177
4193
|
"applicationIdentifier": [513, "application-identifier"],
|
|
4178
4194
|
"clientStyling": [1537, "client-styling"],
|
|
4179
4195
|
"clientStylingUrl": [513, "client-styling-url"],
|
|
4196
|
+
"bellIconPosition": [513, "bell-icon-position"],
|
|
4180
4197
|
"isLoading": [32],
|
|
4181
4198
|
"popoverVisible": [32],
|
|
4182
4199
|
"unseenCount": [32]
|
|
@@ -1173,7 +1173,7 @@ function formatDistanceToNow(dirtyDate, options) {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
|
|
1175
1175
|
const DEFAULT_LANGUAGE = 'en';
|
|
1176
|
-
const SUPPORTED_LANGUAGES = ['
|
|
1176
|
+
const SUPPORTED_LANGUAGES = ['hu', 'en'];
|
|
1177
1177
|
const TRANSLATIONS = {
|
|
1178
1178
|
en: {
|
|
1179
1179
|
notifications: 'Notifications',
|
|
@@ -1182,7 +1182,7 @@ const TRANSLATIONS = {
|
|
|
1182
1182
|
markAsRead: 'Mark as read',
|
|
1183
1183
|
removeMessage: 'Remove the message'
|
|
1184
1184
|
},
|
|
1185
|
-
|
|
1185
|
+
hu: {
|
|
1186
1186
|
notifications: 'értesítéseket',
|
|
1187
1187
|
noMessages: 'Itt még semmi újat nem látni',
|
|
1188
1188
|
markAllAsRead: 'összes megjelölése olvasottként',
|
|
@@ -35643,7 +35643,7 @@ const dateFnsLocales = /*#__PURE__*/Object.freeze({
|
|
|
35643
35643
|
zhTW: locale
|
|
35644
35644
|
});
|
|
35645
35645
|
|
|
35646
|
-
const nutsNotificationCss = ":host{display:block}p{display:block;margin-block-start:0em;margin-block-end:0em;margin-inline-start:0px;margin-inline-end:0px}.NotificationContainer{animation:show 600ms 100ms cubic-bezier(0.38, 0.97, 0.56, 0.76) forwards;opacity:0;transform-origin:top center;padding:15px;position:relative;display:flex;line-height:20px;justify-content:flex-start;align-items:center;border-radius:7px;margin:10px 15px;color:white;background:#23232b;font-weight:400;font-size:14px}@keyframes show{100%{opacity:1;transform:none}}.NotificationContainer .AvatarContainer{margin-right:10px;width:40px;min-width:40px;height:40px;border-radius:50%;display:flex;justify-content:center;align-items:center;font-size:40px;border:1px solid #525266;overflow:hidden}.NotificationContainer .AvatarContainer .Avatar{box-sizing:border-box;position:relative;display:block;user-select:none;overflow:hidden;width:38px;min-width:38px;height:38px;border-radius:32px;text-decoration:none;border:0px;background-color:transparent;padding:0px}.NotificationContainer .AvatarContainer .Avatar .AvatarImage{object-fit:cover;width:100%;height:100%;display:block}.NotificationContainer .ContentContainer{display:flex;flex-direction:column}.NotificationContainer .Date{min-width:55px;font-size:12px;font-weight:400;opacity:0.5;line-height:14.4px;color:#525266}.NotificationContainer .Settings{opacity:0;margin-left:auto;cursor:pointer}.NotificationContainer .SettingsDropdown{z-index:999;position:absolute;background:#292933;box-shadow:rgba(0, 0, 0, 0.2) 0px 5px 20px;border-radius:7px;padding:4px;border:none;
|
|
35646
|
+
const nutsNotificationCss = ":host{display:block}p{display:block;margin-block-start:0em;margin-block-end:0em;margin-inline-start:0px;margin-inline-end:0px}.NotificationContainer{animation:show 600ms 100ms cubic-bezier(0.38, 0.97, 0.56, 0.76) forwards;opacity:0;transform-origin:top center;padding:15px;position:relative;display:flex;line-height:20px;justify-content:flex-start;align-items:center;border-radius:7px;margin:10px 15px;color:white;background:#23232b;font-weight:400;font-size:14px}@keyframes show{100%{opacity:1;transform:none}}.NotificationContainer .AvatarContainer{margin-right:10px;width:40px;min-width:40px;height:40px;border-radius:50%;display:flex;justify-content:center;align-items:center;font-size:40px;border:1px solid #525266;overflow:hidden}.NotificationContainer .AvatarContainer .Avatar{box-sizing:border-box;position:relative;display:block;user-select:none;overflow:hidden;width:38px;min-width:38px;height:38px;border-radius:32px;text-decoration:none;border:0px;background-color:transparent;padding:0px}.NotificationContainer .AvatarContainer .Avatar .AvatarImage{object-fit:cover;width:100%;height:100%;display:block}.NotificationContainer .ContentContainer{display:flex;flex-direction:column}.NotificationContainer .Date{min-width:55px;font-size:12px;font-weight:400;opacity:0.5;line-height:14.4px;color:#525266}.NotificationContainer .Settings{opacity:0;margin-left:auto;cursor:pointer}.NotificationContainer:hover .Settings{opacity:0.5}.Unseen::before{content:\"\";position:absolute;inset:0px;width:5px;border-radius:7px 0px 0px 7px;background:linear-gradient(0deg, #ff512f 0%, #dd2476 100%)}.Unseen:hover .UnseenButton{opacity:0;width:0px}.SettingsDropdown{z-index:999;position:absolute;background:#292933;box-shadow:rgba(0, 0, 0, 0.2) 0px 5px 20px;border-radius:7px;padding:4px;border:none;transition-property:opacity;transition-duration:150ms;transition-timing-function:ease;opacity:1;width:max-content;display:flex;flex-direction:column;margin-left:195px;margin-top:-30px}.SettingsDropdown svg{margin-right:10px}.SettingsDropdown button{font-family:inherit;border:0px;background-color:transparent;outline:0px;width:100%;text-align:left;text-decoration:none;box-sizing:border-box;padding:10px 12px;cursor:pointer;border-radius:7px;display:flex;align-items:center;color:white;font-weight:400;font-size:14px}.SettingsDropdown button:hover{background:#3d3d4d;transition:300ms}";
|
|
35647
35647
|
|
|
35648
35648
|
const dateFnsLocale = (lang) => {
|
|
35649
35649
|
return lang in dateFnsLocales ? dateFnsLocales[lang] : locale$1s;
|
|
@@ -35739,11 +35739,14 @@ const NutsNotification = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
35739
35739
|
toggleSettingsModal() {
|
|
35740
35740
|
this.showSettingsModal = !this.showSettingsModal;
|
|
35741
35741
|
if (this.showSettingsModal) {
|
|
35742
|
+
let rect = this.settingsButtonRef.getBoundingClientRect();
|
|
35743
|
+
this.settingsModalRef.style.left = `${rect.left}px`;
|
|
35744
|
+
this.settingsModalRef.style.top = `${rect.top}px`;
|
|
35742
35745
|
this.settingsOpened.emit(this.messageId);
|
|
35743
35746
|
}
|
|
35744
35747
|
}
|
|
35745
35748
|
render() {
|
|
35746
|
-
return (h("div", { class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: el => this.stylingContainer = el }, this.badge ? h("div", { class: "AvatarContainer" }, h("div", { class: "Avatar" }, h("img", { class: "AvatarImage", src: this.badge }))) : '', h("div", { class: "ContentContainer" }, h("p", null, this.content), h("p", { class: "Date" }, formatDistanceToNow(new Date(this.date), { addSuffix: true, locale: dateFnsLocale(this.language) }))), h("div", { class: "Settings", onClick: () => this.toggleSettingsModal() }, h("svg", { width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M20.625 15.5C20.625 16.5547 21.4453 17.375 22.5 17.375C23.5156 17.375 24.375 16.5547 24.375 15.5C24.375 14.4844 23.5156 13.625 22.5 13.625C21.4453 13.625 20.625 14.4844 20.625 15.5ZM9.375 15.5C9.375 14.4844 8.51562 13.625 7.5 13.625C6.44531 13.625 5.625 14.4844 5.625 15.5C5.625 16.5547 6.44531 17.375 7.5 17.375C8.51562 17.375 9.375 16.5547 9.375 15.5ZM16.875 15.5C16.875 14.4844 16.0156 13.625 15 13.625C13.9453 13.625 13.125 14.4844 13.125 15.5C13.125 16.5547 13.9453 17.375 15 17.375C16.0156 17.375 16.875 16.5547 16.875 15.5Z", fill: "currentColor" }))), this.showSettingsModal ? h("div", { class: "SettingsDropdown" }, h("button", { onClick: () => this.markAsRead(this.messageId) }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M14.9434 5.17969C14.2109 4.59375 13.625 4.125 10.1387 1.60547C9.64062 1.25391 8.67383 0.375 8 0.375V0.404297C7.9707 0.404297 7.9707 0.375 7.9707 0.375C7.29688 0.375 6.33008 1.25391 5.83203 1.60547C2.3457 4.125 1.75977 4.59375 1.02734 5.17969C0.675781 5.44336 0.5 5.85352 0.5 6.26367V13.9688C0.5 14.7598 1.11523 15.375 1.90625 15.375H14.0938C14.8555 15.375 15.5 14.7598 15.5 13.9688V6.26367C15.5 5.85352 15.2949 5.44336 14.9434 5.17969ZM9.37695 11.1562C8.9668 11.4785 8.46875 11.6543 8 11.6543C7.50195 11.6543 7.00391 11.4785 6.59375 11.1562L2.375 7.8457V6.49805C2.99023 6 3.72266 5.44336 6.94531 3.12891C7.0332 3.04102 7.15039 2.95312 7.26758 2.86523C7.41406 2.74805 7.73633 2.48438 8 2.33789C8.23438 2.48438 8.55664 2.74805 8.70312 2.86523C8.82031 2.95312 8.9375 3.04102 9.02539 3.12891C12.2188 5.44336 12.9805 6 13.625 6.49805V7.8457L9.37695 11.1562Z", fill: "currentColor" })), translate$1('markAsRead', this.language)), h("button", { onClick: () => this.deleteMessage(this.messageId) }, h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M4.375 15.4375C4.375 16.1758 4.94922 16.75 5.6875 16.75H13.5625C14.2734 16.75 14.875 16.1758 14.875 15.4375V6.25H4.375V15.4375ZM11.8125 8.4375C11.8125 8.21875 12.0039 8 12.25 8C12.4688 8 12.6875 8.21875 12.6875 8.4375V14.5625C12.6875 14.8086 12.4688 15 12.25 15C12.0039 15 11.8125 14.8086 11.8125 14.5625V8.4375ZM9.1875 8.4375C9.1875 8.21875 9.37891 8 9.625 8C9.84375 8 10.0625 8.21875 10.0625 8.4375V14.5625C10.0625 14.8086 9.84375 15 9.625 15C9.37891 15 9.1875 14.8086 9.1875 14.5625V8.4375ZM6.5625 8.4375C6.5625 8.21875 6.75391 8 7 8C7.21875 8 7.4375 8.21875 7.4375 8.4375V14.5625C7.4375 14.8086 7.21875 15 7 15C6.75391 15 6.5625 14.8086 6.5625 14.5625V8.4375ZM15.3125 3.625H12.25L11.9219 2.99609C11.8398 2.85938 11.7031 2.75 11.5391 2.75H7.68359C7.51953 2.75 7.38281 2.85938 7.30078 2.99609L7 3.625H3.9375C3.69141 3.625 3.5 3.84375 3.5 4.0625V4.9375C3.5 5.18359 3.69141 5.375 3.9375 5.375H15.3125C15.5312 5.375 15.75 5.18359 15.75 4.9375V4.0625C15.75 3.84375 15.5312 3.625 15.3125 3.625Z", fill: "currentColor" })), translate$1('removeMessage', this.language))) : ''
|
|
35749
|
+
return (h("div", null, h("div", { class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: el => this.stylingContainer = el }, this.badge ? h("div", { class: "AvatarContainer" }, h("div", { class: "Avatar" }, h("img", { class: "AvatarImage", src: this.badge }))) : '', h("div", { class: "ContentContainer" }, h("p", null, this.content), h("p", { class: "Date" }, formatDistanceToNow(new Date(this.date), { addSuffix: true, locale: dateFnsLocale(this.language) }))), h("div", { class: "Settings", onClick: () => this.toggleSettingsModal(), ref: el => this.settingsButtonRef = el }, h("svg", { width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M20.625 15.5C20.625 16.5547 21.4453 17.375 22.5 17.375C23.5156 17.375 24.375 16.5547 24.375 15.5C24.375 14.4844 23.5156 13.625 22.5 13.625C21.4453 13.625 20.625 14.4844 20.625 15.5ZM9.375 15.5C9.375 14.4844 8.51562 13.625 7.5 13.625C6.44531 13.625 5.625 14.4844 5.625 15.5C5.625 16.5547 6.44531 17.375 7.5 17.375C8.51562 17.375 9.375 16.5547 9.375 15.5ZM16.875 15.5C16.875 14.4844 16.0156 13.625 15 13.625C13.9453 13.625 13.125 14.4844 13.125 15.5C13.125 16.5547 13.9453 17.375 15 17.375C16.0156 17.375 16.875 16.5547 16.875 15.5Z", fill: "currentColor" }))), this.messageSeen ? '' : h("div", { class: "UnseenButton" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10px", height: "10px", viewBox: "0 0 16 16", fill: "none" }, h("rect", { x: "1.5", y: "1.5", width: "13", height: "13", rx: "6.5", fill: "url(#paint0_linear_1722_2699)", stroke: "#1E1E26", "stroke-width": "3" }), h("defs", null, h("linearGradient", { id: "paint0_linear_1722_2699", x1: "8", y1: "13", x2: "8", y2: "3", gradientUnits: "userSpaceOnUse" }, h("stop", { "stop-color": "#FF512F" }), h("stop", { offset: "1", "stop-color": "#DD2476" })))))), this.showSettingsModal ? h("div", { class: "SettingsDropdown", ref: el => this.settingsModalRef = el }, h("button", { onClick: () => this.markAsRead(this.messageId) }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M14.9434 5.17969C14.2109 4.59375 13.625 4.125 10.1387 1.60547C9.64062 1.25391 8.67383 0.375 8 0.375V0.404297C7.9707 0.404297 7.9707 0.375 7.9707 0.375C7.29688 0.375 6.33008 1.25391 5.83203 1.60547C2.3457 4.125 1.75977 4.59375 1.02734 5.17969C0.675781 5.44336 0.5 5.85352 0.5 6.26367V13.9688C0.5 14.7598 1.11523 15.375 1.90625 15.375H14.0938C14.8555 15.375 15.5 14.7598 15.5 13.9688V6.26367C15.5 5.85352 15.2949 5.44336 14.9434 5.17969ZM9.37695 11.1562C8.9668 11.4785 8.46875 11.6543 8 11.6543C7.50195 11.6543 7.00391 11.4785 6.59375 11.1562L2.375 7.8457V6.49805C2.99023 6 3.72266 5.44336 6.94531 3.12891C7.0332 3.04102 7.15039 2.95312 7.26758 2.86523C7.41406 2.74805 7.73633 2.48438 8 2.33789C8.23438 2.48438 8.55664 2.74805 8.70312 2.86523C8.82031 2.95312 8.9375 3.04102 9.02539 3.12891C12.2188 5.44336 12.9805 6 13.625 6.49805V7.8457L9.37695 11.1562Z", fill: "currentColor" })), translate$1('markAsRead', this.language)), h("button", { onClick: () => this.deleteMessage(this.messageId) }, h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M4.375 15.4375C4.375 16.1758 4.94922 16.75 5.6875 16.75H13.5625C14.2734 16.75 14.875 16.1758 14.875 15.4375V6.25H4.375V15.4375ZM11.8125 8.4375C11.8125 8.21875 12.0039 8 12.25 8C12.4688 8 12.6875 8.21875 12.6875 8.4375V14.5625C12.6875 14.8086 12.4688 15 12.25 15C12.0039 15 11.8125 14.8086 11.8125 14.5625V8.4375ZM9.1875 8.4375C9.1875 8.21875 9.37891 8 9.625 8C9.84375 8 10.0625 8.21875 10.0625 8.4375V14.5625C10.0625 14.8086 9.84375 15 9.625 15C9.37891 15 9.1875 14.8086 9.1875 14.5625V8.4375ZM6.5625 8.4375C6.5625 8.21875 6.75391 8 7 8C7.21875 8 7.4375 8.21875 7.4375 8.4375V14.5625C7.4375 14.8086 7.21875 15 7 15C6.75391 15 6.5625 14.8086 6.5625 14.5625V8.4375ZM15.3125 3.625H12.25L11.9219 2.99609C11.8398 2.85938 11.7031 2.75 11.5391 2.75H7.68359C7.51953 2.75 7.38281 2.85938 7.30078 2.99609L7 3.625H3.9375C3.69141 3.625 3.5 3.84375 3.5 4.0625V4.9375C3.5 5.18359 3.69141 5.375 3.9375 5.375H15.3125C15.5312 5.375 15.75 5.18359 15.75 4.9375V4.0625C15.75 3.84375 15.5312 3.625 15.3125 3.625Z", fill: "currentColor" })), translate$1('removeMessage', this.language))) : ''));
|
|
35747
35750
|
}
|
|
35748
35751
|
static get style() { return nutsNotificationCss; }
|
|
35749
35752
|
}, [0, "nuts-notification", {
|
|
@@ -750,7 +750,11 @@ const postUpdateComponent = (hostRef) => {
|
|
|
750
750
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
751
751
|
const elm = hostRef.$hostElement$;
|
|
752
752
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
753
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
753
754
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
755
|
+
{
|
|
756
|
+
safeCall(instance, 'componentDidRender');
|
|
757
|
+
}
|
|
754
758
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
755
759
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
756
760
|
{
|