@everymatrix/nuts-inbox-widget 1.45.10 → 1.45.13
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-ae4a5047.js +1329 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/nuts-inbox-widget.cjs.js +25 -0
- package/dist/cjs/nuts-inbox-widget_3.cjs.entry.js +40953 -0
- package/dist/collection/api/methods/index.js +144 -0
- package/dist/collection/api/methods/types.js +1 -0
- package/dist/collection/collection-manifest.json +14 -0
- package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.css +21 -0
- package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.js +505 -0
- package/dist/collection/components/nuts-notification/constants.js +1 -0
- package/dist/collection/components/nuts-notification/nuts-notification.css +167 -0
- package/dist/collection/components/nuts-notification/nuts-notification.js +596 -0
- package/dist/collection/components/nuts-popover/nuts-popover.css +129 -0
- package/dist/collection/components/nuts-popover/nuts-popover.js +383 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/types/nuts-inbox-widget.types.js +39 -0
- package/dist/collection/utils/locale.utils.js +52 -0
- package/dist/collection/utils/utils.js +6 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-64960aae.js +1301 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/nuts-inbox-widget.js +20 -0
- package/dist/esm/nuts-inbox-widget_3.entry.js +40947 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/nuts-inbox-widget/index.esm.js +0 -0
- package/dist/nuts-inbox-widget/nuts-inbox-widget.esm.js +1 -0
- package/dist/nuts-inbox-widget/p-80fb2012.js +2 -0
- package/dist/nuts-inbox-widget/p-a97eb392.entry.js +1 -0
- package/dist/nuts-inbox-widget/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +15 -0
- package/dist/stencil.config.js +17 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.d.ts +2 -0
- package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.dev.d.ts +2 -0
- package/dist/types/api/methods/index.d.ts +7 -0
- package/dist/types/api/methods/types.d.ts +66 -0
- package/dist/types/components/nuts-inbox-widget/nuts-inbox-widget.d.ts +91 -0
- package/dist/types/components/nuts-notification/constants.d.ts +1 -0
- package/dist/types/components/nuts-notification/nuts-notification.d.ts +102 -0
- package/dist/types/components/nuts-popover/nuts-popover.d.ts +69 -0
- package/dist/types/components.d.ts +477 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/types/nuts-inbox-widget.types.d.ts +97 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +4 -1
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
import { h, } from "@stencil/core";
|
|
2
|
+
import { formatDistanceToNow } from "date-fns";
|
|
3
|
+
import { translate, getTranslations } from "../../utils/locale.utils";
|
|
4
|
+
import * as dateFnsLocales from "date-fns/locale";
|
|
5
|
+
import { WarningFilled, InfoCircleFilled, CheckCircleFilled, CloseCircleFilled, UpCircleFilled, QuestionCircleFilled, DownOutlined, } from "@ant-design/icons-svg";
|
|
6
|
+
import { renderIconDefinitionToSVGElement } from "@ant-design/icons-svg/es/helpers";
|
|
7
|
+
import { MAX_NOTIFICATION_TEXT_LENGTH } from "./constants";
|
|
8
|
+
import { truncate } from "../../utils/utils";
|
|
9
|
+
import { deleteMessage, markAsRead } from "../../api/methods";
|
|
10
|
+
const systemIcons = {
|
|
11
|
+
warning: {
|
|
12
|
+
icon: renderIconDefinitionToSVGElement(WarningFilled, {
|
|
13
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#FFF000' },
|
|
14
|
+
}),
|
|
15
|
+
},
|
|
16
|
+
info: {
|
|
17
|
+
icon: renderIconDefinitionToSVGElement(InfoCircleFilled, {
|
|
18
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#0000FF' },
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
up: {
|
|
22
|
+
icon: renderIconDefinitionToSVGElement(UpCircleFilled, {
|
|
23
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' },
|
|
24
|
+
}),
|
|
25
|
+
},
|
|
26
|
+
question: {
|
|
27
|
+
icon: renderIconDefinitionToSVGElement(QuestionCircleFilled, {
|
|
28
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' },
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
success: {
|
|
32
|
+
icon: renderIconDefinitionToSVGElement(CheckCircleFilled, {
|
|
33
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#4D9980' },
|
|
34
|
+
}),
|
|
35
|
+
},
|
|
36
|
+
error: {
|
|
37
|
+
icon: renderIconDefinitionToSVGElement(CloseCircleFilled, {
|
|
38
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#E54545' },
|
|
39
|
+
}),
|
|
40
|
+
},
|
|
41
|
+
arrowDown: {
|
|
42
|
+
icon: renderIconDefinitionToSVGElement(DownOutlined, {
|
|
43
|
+
extraSVGAttrs: { width: '16px', height: '16px', fill: '#A1A1B2' },
|
|
44
|
+
}),
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
const dateFnsLocale = (lang) => {
|
|
48
|
+
return lang in dateFnsLocales ? dateFnsLocales[lang] : dateFnsLocales.enUS;
|
|
49
|
+
};
|
|
50
|
+
export class NutsNotification {
|
|
51
|
+
constructor() {
|
|
52
|
+
this.toggleSettingsModal = (e) => {
|
|
53
|
+
e.stopImmediatePropagation();
|
|
54
|
+
this.showSettingsModal = !this.showSettingsModal;
|
|
55
|
+
this.settingsOpened.emit(this.messageId);
|
|
56
|
+
};
|
|
57
|
+
this.toggleNotificationRead = async (event) => {
|
|
58
|
+
event === null || event === void 0 ? void 0 : event.stopImmediatePropagation();
|
|
59
|
+
const unread = this.messageRead;
|
|
60
|
+
const markAsReadBody = {
|
|
61
|
+
messageId: `${this.messageId}`,
|
|
62
|
+
mark: {
|
|
63
|
+
seen: !unread,
|
|
64
|
+
read: !unread,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
const notificationData = await markAsRead({
|
|
68
|
+
baseUrl: this.baseUrl,
|
|
69
|
+
body: markAsReadBody,
|
|
70
|
+
token: this.token,
|
|
71
|
+
unread,
|
|
72
|
+
});
|
|
73
|
+
this.messageRead = notificationData.messageRead;
|
|
74
|
+
this.messageSeen = notificationData.messageSeen;
|
|
75
|
+
this.showSettingsModal = notificationData.showSettingsModal;
|
|
76
|
+
};
|
|
77
|
+
this.deleteNotification = async () => {
|
|
78
|
+
const deleteMessageResponse = await deleteMessage({
|
|
79
|
+
baseUrl: this.baseUrl,
|
|
80
|
+
token: this.token,
|
|
81
|
+
messageId: this.messageId,
|
|
82
|
+
});
|
|
83
|
+
this.showSettingsModal = deleteMessageResponse;
|
|
84
|
+
if (deleteMessageResponse) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.messageDeteled.emit(this.messageId);
|
|
88
|
+
};
|
|
89
|
+
this.notificationActionHandler = () => {
|
|
90
|
+
var _a, _b, _c;
|
|
91
|
+
if (this.notificationAction == 'default' || !this.notificationAction) {
|
|
92
|
+
if (this.redirectUrl.length > 0) {
|
|
93
|
+
window.location.href = this.redirectUrl;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (this.notificationAction == 'postMessage') {
|
|
97
|
+
window.postMessage({ type: 'NotificationRedirect', url: this.redirectUrl }, window.location.href);
|
|
98
|
+
}
|
|
99
|
+
if (!this.messageRead) {
|
|
100
|
+
this.toggleNotificationRead();
|
|
101
|
+
}
|
|
102
|
+
if (((_a = this.content) === null || _a === void 0 ? void 0 : _a.length) <= MAX_NOTIFICATION_TEXT_LENGTH) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (((_b = this.displayedContent) === null || _b === void 0 ? void 0 : _b.length) !== ((_c = this.content) === null || _c === void 0 ? void 0 : _c.length) &&
|
|
106
|
+
this.displayedContent !== this.content) {
|
|
107
|
+
this.displayedContent = this.content;
|
|
108
|
+
this.dropdownArrowRef.classList.add('FlipX');
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
this.displayedContent = truncate(this.content, MAX_NOTIFICATION_TEXT_LENGTH);
|
|
112
|
+
this.dropdownArrowRef.classList.remove('FlipX');
|
|
113
|
+
};
|
|
114
|
+
this.setClientStyling = () => {
|
|
115
|
+
let sheet = document.createElement('style');
|
|
116
|
+
sheet.innerHTML = this.clientStyling;
|
|
117
|
+
this.stylingContainer.prepend(sheet);
|
|
118
|
+
};
|
|
119
|
+
this.setClientStylingURL = () => {
|
|
120
|
+
let url = new URL(this.clientStylingUrl);
|
|
121
|
+
let cssFile = document.createElement('style');
|
|
122
|
+
fetch(url.href)
|
|
123
|
+
.then((res) => res.text())
|
|
124
|
+
.then((data) => {
|
|
125
|
+
cssFile.innerHTML = data;
|
|
126
|
+
setTimeout(() => {
|
|
127
|
+
this.stylingContainer.prepend(cssFile);
|
|
128
|
+
}, 1);
|
|
129
|
+
})
|
|
130
|
+
.catch((err) => {
|
|
131
|
+
console.log('error ', err);
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
this.assignRefToStylingContainer = (ref) => {
|
|
135
|
+
this.stylingContainer = ref;
|
|
136
|
+
};
|
|
137
|
+
this.assignRefToDropdownArrow = (ref) => {
|
|
138
|
+
this.dropdownArrowRef = ref;
|
|
139
|
+
};
|
|
140
|
+
this.badge = undefined;
|
|
141
|
+
this.content = undefined;
|
|
142
|
+
this.date = undefined;
|
|
143
|
+
this.showSettings = undefined;
|
|
144
|
+
this.read = undefined;
|
|
145
|
+
this.seen = undefined;
|
|
146
|
+
this.language = undefined;
|
|
147
|
+
this.sessionId = undefined;
|
|
148
|
+
this.subscriberId = undefined;
|
|
149
|
+
this.userId = undefined;
|
|
150
|
+
this.messageId = undefined;
|
|
151
|
+
this.operatorId = undefined;
|
|
152
|
+
this.token = undefined;
|
|
153
|
+
this.backendUrl = undefined;
|
|
154
|
+
this.redirectUrl = undefined;
|
|
155
|
+
this.notificationAction = undefined;
|
|
156
|
+
this.clientStylingUrl = undefined;
|
|
157
|
+
this.translationUrl = '';
|
|
158
|
+
this.clientStyling = '';
|
|
159
|
+
this.showSettingsModal = false;
|
|
160
|
+
this.messageSeen = false;
|
|
161
|
+
this.messageRead = false;
|
|
162
|
+
this.displayedContent = undefined;
|
|
163
|
+
}
|
|
164
|
+
allNotificationsReadHandler() {
|
|
165
|
+
this.messageSeen = true;
|
|
166
|
+
this.messageRead = true;
|
|
167
|
+
}
|
|
168
|
+
settingsOpenedHandler(event) {
|
|
169
|
+
if (event.detail != this.messageId) {
|
|
170
|
+
this.showSettingsModal = false;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
handleNewTranslations() {
|
|
174
|
+
getTranslations(this.translationUrl);
|
|
175
|
+
}
|
|
176
|
+
async componentWillLoad() {
|
|
177
|
+
if (this.translationUrl.length > 2) {
|
|
178
|
+
await getTranslations(this.translationUrl);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
connectedCallback() {
|
|
182
|
+
this.messageSeen = this.seen;
|
|
183
|
+
this.messageRead = this.read;
|
|
184
|
+
this.displayedContent = truncate(this.content, MAX_NOTIFICATION_TEXT_LENGTH);
|
|
185
|
+
this.baseUrl = `${this.backendUrl}/v1/${this.operatorId}`;
|
|
186
|
+
}
|
|
187
|
+
render() {
|
|
188
|
+
var _a, _b;
|
|
189
|
+
return (h("div", { key: '241e3882d506155469e1866c2e6c08295bf8b96a', class: "Wrapper" }, h("div", { key: 'd56153f521f757b11b129d555f4b197b581c3d70', class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: this.assignRefToStylingContainer, onClick: this.notificationActionHandler }, this.badge ? (h("div", { class: "AvatarContainer" }, h("div", { class: "Avatar" }, ((_a = systemIcons[this.badge]) === null || _a === void 0 ? void 0 : _a.icon) ? (h("div", { innerHTML: systemIcons[this.badge].icon })) : (h("img", { class: "AvatarImage", src: this.badge }))))) : (''), h("div", { key: 'c2d991cd04f17af75dedf0fce2d2febc51c361a4', class: "ContentContainer" }, h("p", { key: '57d8abcab3a9b3b721a4cdc01112ef5ed7357e71' }, this.displayedContent), h("p", { key: '8360147cbc1500b48644e4680b125419234e6989', class: "Date" }, formatDistanceToNow(new Date(this.date), {
|
|
190
|
+
addSuffix: true,
|
|
191
|
+
locale: dateFnsLocale(this.language),
|
|
192
|
+
}))), h("div", { key: '5ae9c01ea52240f0a7d5e79ea13a9b5eb56154f5', class: "RightActionsContainer" }, h("div", { key: 'f4d270028375dfed98c5671e5d505ae88621d83e', class: "Settings", onClick: this.toggleSettingsModal }, h("svg", { key: '9d6755cd6d73809bdf7dd5feab94a0b7e2a9997d', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '668350d8c765ecdfed6fa23abffd11ff9b9848c2', 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" }))), ((_b = this.content) === null || _b === void 0 ? void 0 : _b.length) > MAX_NOTIFICATION_TEXT_LENGTH && (h("div", { key: 'f41b92bb595e6e43875dba4ad098764f55adb52f', class: "AccordionArrow", innerHTML: systemIcons.arrowDown.icon, ref: this.assignRefToDropdownArrow })))), this.showSettingsModal ? (h("div", { class: "SettingsDropdown" }, h("button", { onClick: this.toggleNotificationRead }, 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(this.messageRead ? 'markAsUnread' : 'markAsRead', this.language)), h("button", { onClick: this.deleteNotification }, 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('removeMessage', this.language)))) : ('')));
|
|
193
|
+
}
|
|
194
|
+
static get is() { return "nuts-notification"; }
|
|
195
|
+
static get originalStyleUrls() {
|
|
196
|
+
return {
|
|
197
|
+
"$": ["nuts-notification.scss"]
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
static get styleUrls() {
|
|
201
|
+
return {
|
|
202
|
+
"$": ["nuts-notification.css"]
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
static get properties() {
|
|
206
|
+
return {
|
|
207
|
+
"badge": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"mutable": false,
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "string",
|
|
212
|
+
"resolved": "string",
|
|
213
|
+
"references": {}
|
|
214
|
+
},
|
|
215
|
+
"required": false,
|
|
216
|
+
"optional": false,
|
|
217
|
+
"docs": {
|
|
218
|
+
"tags": [],
|
|
219
|
+
"text": "Src for badge / avatar"
|
|
220
|
+
},
|
|
221
|
+
"attribute": "badge",
|
|
222
|
+
"reflect": true
|
|
223
|
+
},
|
|
224
|
+
"content": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"mutable": false,
|
|
227
|
+
"complexType": {
|
|
228
|
+
"original": "string",
|
|
229
|
+
"resolved": "string",
|
|
230
|
+
"references": {}
|
|
231
|
+
},
|
|
232
|
+
"required": false,
|
|
233
|
+
"optional": false,
|
|
234
|
+
"docs": {
|
|
235
|
+
"tags": [],
|
|
236
|
+
"text": "Text content of the notification"
|
|
237
|
+
},
|
|
238
|
+
"attribute": "content",
|
|
239
|
+
"reflect": true
|
|
240
|
+
},
|
|
241
|
+
"date": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"mutable": false,
|
|
244
|
+
"complexType": {
|
|
245
|
+
"original": "string",
|
|
246
|
+
"resolved": "string",
|
|
247
|
+
"references": {}
|
|
248
|
+
},
|
|
249
|
+
"required": false,
|
|
250
|
+
"optional": false,
|
|
251
|
+
"docs": {
|
|
252
|
+
"tags": [],
|
|
253
|
+
"text": "Date of the notification"
|
|
254
|
+
},
|
|
255
|
+
"attribute": "date",
|
|
256
|
+
"reflect": true
|
|
257
|
+
},
|
|
258
|
+
"showSettings": {
|
|
259
|
+
"type": "boolean",
|
|
260
|
+
"mutable": false,
|
|
261
|
+
"complexType": {
|
|
262
|
+
"original": "boolean",
|
|
263
|
+
"resolved": "boolean",
|
|
264
|
+
"references": {}
|
|
265
|
+
},
|
|
266
|
+
"required": false,
|
|
267
|
+
"optional": false,
|
|
268
|
+
"docs": {
|
|
269
|
+
"tags": [],
|
|
270
|
+
"text": "Wether or not to show notification settings"
|
|
271
|
+
},
|
|
272
|
+
"attribute": "show-settings",
|
|
273
|
+
"reflect": true
|
|
274
|
+
},
|
|
275
|
+
"read": {
|
|
276
|
+
"type": "boolean",
|
|
277
|
+
"mutable": false,
|
|
278
|
+
"complexType": {
|
|
279
|
+
"original": "boolean",
|
|
280
|
+
"resolved": "boolean",
|
|
281
|
+
"references": {}
|
|
282
|
+
},
|
|
283
|
+
"required": false,
|
|
284
|
+
"optional": false,
|
|
285
|
+
"docs": {
|
|
286
|
+
"tags": [],
|
|
287
|
+
"text": "Wether or not the item has been read"
|
|
288
|
+
},
|
|
289
|
+
"attribute": "read",
|
|
290
|
+
"reflect": true
|
|
291
|
+
},
|
|
292
|
+
"seen": {
|
|
293
|
+
"type": "boolean",
|
|
294
|
+
"mutable": false,
|
|
295
|
+
"complexType": {
|
|
296
|
+
"original": "boolean",
|
|
297
|
+
"resolved": "boolean",
|
|
298
|
+
"references": {}
|
|
299
|
+
},
|
|
300
|
+
"required": false,
|
|
301
|
+
"optional": false,
|
|
302
|
+
"docs": {
|
|
303
|
+
"tags": [],
|
|
304
|
+
"text": "Wether or not the item has been seen"
|
|
305
|
+
},
|
|
306
|
+
"attribute": "seen",
|
|
307
|
+
"reflect": true
|
|
308
|
+
},
|
|
309
|
+
"language": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"mutable": false,
|
|
312
|
+
"complexType": {
|
|
313
|
+
"original": "string",
|
|
314
|
+
"resolved": "string",
|
|
315
|
+
"references": {}
|
|
316
|
+
},
|
|
317
|
+
"required": false,
|
|
318
|
+
"optional": false,
|
|
319
|
+
"docs": {
|
|
320
|
+
"tags": [],
|
|
321
|
+
"text": "Language code of the content"
|
|
322
|
+
},
|
|
323
|
+
"attribute": "language",
|
|
324
|
+
"reflect": true
|
|
325
|
+
},
|
|
326
|
+
"sessionId": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"mutable": false,
|
|
329
|
+
"complexType": {
|
|
330
|
+
"original": "string",
|
|
331
|
+
"resolved": "string",
|
|
332
|
+
"references": {}
|
|
333
|
+
},
|
|
334
|
+
"required": true,
|
|
335
|
+
"optional": false,
|
|
336
|
+
"docs": {
|
|
337
|
+
"tags": [],
|
|
338
|
+
"text": "The sessionID of the user"
|
|
339
|
+
},
|
|
340
|
+
"attribute": "session-id",
|
|
341
|
+
"reflect": true
|
|
342
|
+
},
|
|
343
|
+
"subscriberId": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"mutable": false,
|
|
346
|
+
"complexType": {
|
|
347
|
+
"original": "string",
|
|
348
|
+
"resolved": "string",
|
|
349
|
+
"references": {}
|
|
350
|
+
},
|
|
351
|
+
"required": false,
|
|
352
|
+
"optional": true,
|
|
353
|
+
"docs": {
|
|
354
|
+
"tags": [],
|
|
355
|
+
"text": "The subscriberID"
|
|
356
|
+
},
|
|
357
|
+
"attribute": "subscriber-id",
|
|
358
|
+
"reflect": true
|
|
359
|
+
},
|
|
360
|
+
"userId": {
|
|
361
|
+
"type": "string",
|
|
362
|
+
"mutable": false,
|
|
363
|
+
"complexType": {
|
|
364
|
+
"original": "string",
|
|
365
|
+
"resolved": "string",
|
|
366
|
+
"references": {}
|
|
367
|
+
},
|
|
368
|
+
"required": false,
|
|
369
|
+
"optional": false,
|
|
370
|
+
"docs": {
|
|
371
|
+
"tags": [],
|
|
372
|
+
"text": "Unique ID of the user who receives the notification"
|
|
373
|
+
},
|
|
374
|
+
"attribute": "user-id",
|
|
375
|
+
"reflect": true
|
|
376
|
+
},
|
|
377
|
+
"messageId": {
|
|
378
|
+
"type": "string",
|
|
379
|
+
"mutable": false,
|
|
380
|
+
"complexType": {
|
|
381
|
+
"original": "string",
|
|
382
|
+
"resolved": "string",
|
|
383
|
+
"references": {}
|
|
384
|
+
},
|
|
385
|
+
"required": false,
|
|
386
|
+
"optional": false,
|
|
387
|
+
"docs": {
|
|
388
|
+
"tags": [],
|
|
389
|
+
"text": "Unique ID of the notification content"
|
|
390
|
+
},
|
|
391
|
+
"attribute": "message-id",
|
|
392
|
+
"reflect": true
|
|
393
|
+
},
|
|
394
|
+
"operatorId": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"mutable": false,
|
|
397
|
+
"complexType": {
|
|
398
|
+
"original": "string",
|
|
399
|
+
"resolved": "string",
|
|
400
|
+
"references": {}
|
|
401
|
+
},
|
|
402
|
+
"required": false,
|
|
403
|
+
"optional": false,
|
|
404
|
+
"docs": {
|
|
405
|
+
"tags": [],
|
|
406
|
+
"text": "Unique ID of the operator domain"
|
|
407
|
+
},
|
|
408
|
+
"attribute": "operator-id",
|
|
409
|
+
"reflect": true
|
|
410
|
+
},
|
|
411
|
+
"token": {
|
|
412
|
+
"type": "string",
|
|
413
|
+
"mutable": false,
|
|
414
|
+
"complexType": {
|
|
415
|
+
"original": "string",
|
|
416
|
+
"resolved": "string",
|
|
417
|
+
"references": {}
|
|
418
|
+
},
|
|
419
|
+
"required": false,
|
|
420
|
+
"optional": false,
|
|
421
|
+
"docs": {
|
|
422
|
+
"tags": [],
|
|
423
|
+
"text": "Token used in authorization of notification transactions"
|
|
424
|
+
},
|
|
425
|
+
"attribute": "token",
|
|
426
|
+
"reflect": true
|
|
427
|
+
},
|
|
428
|
+
"backendUrl": {
|
|
429
|
+
"type": "string",
|
|
430
|
+
"mutable": false,
|
|
431
|
+
"complexType": {
|
|
432
|
+
"original": "string",
|
|
433
|
+
"resolved": "string",
|
|
434
|
+
"references": {}
|
|
435
|
+
},
|
|
436
|
+
"required": false,
|
|
437
|
+
"optional": false,
|
|
438
|
+
"docs": {
|
|
439
|
+
"tags": [],
|
|
440
|
+
"text": "Endpoint for notification transactions"
|
|
441
|
+
},
|
|
442
|
+
"attribute": "backend-url",
|
|
443
|
+
"reflect": true
|
|
444
|
+
},
|
|
445
|
+
"redirectUrl": {
|
|
446
|
+
"type": "string",
|
|
447
|
+
"mutable": false,
|
|
448
|
+
"complexType": {
|
|
449
|
+
"original": "string",
|
|
450
|
+
"resolved": "string",
|
|
451
|
+
"references": {}
|
|
452
|
+
},
|
|
453
|
+
"required": false,
|
|
454
|
+
"optional": false,
|
|
455
|
+
"docs": {
|
|
456
|
+
"tags": [],
|
|
457
|
+
"text": "Redirect address in case of external url"
|
|
458
|
+
},
|
|
459
|
+
"attribute": "redirect-url",
|
|
460
|
+
"reflect": true
|
|
461
|
+
},
|
|
462
|
+
"notificationAction": {
|
|
463
|
+
"type": "string",
|
|
464
|
+
"mutable": false,
|
|
465
|
+
"complexType": {
|
|
466
|
+
"original": "string",
|
|
467
|
+
"resolved": "string",
|
|
468
|
+
"references": {}
|
|
469
|
+
},
|
|
470
|
+
"required": false,
|
|
471
|
+
"optional": false,
|
|
472
|
+
"docs": {
|
|
473
|
+
"tags": [],
|
|
474
|
+
"text": "Determines notification behaviour onClick"
|
|
475
|
+
},
|
|
476
|
+
"attribute": "notification-action",
|
|
477
|
+
"reflect": true
|
|
478
|
+
},
|
|
479
|
+
"clientStylingUrl": {
|
|
480
|
+
"type": "string",
|
|
481
|
+
"mutable": false,
|
|
482
|
+
"complexType": {
|
|
483
|
+
"original": "string",
|
|
484
|
+
"resolved": "string",
|
|
485
|
+
"references": {}
|
|
486
|
+
},
|
|
487
|
+
"required": false,
|
|
488
|
+
"optional": false,
|
|
489
|
+
"docs": {
|
|
490
|
+
"tags": [],
|
|
491
|
+
"text": "Custom styling passed as a URL"
|
|
492
|
+
},
|
|
493
|
+
"attribute": "client-styling-url",
|
|
494
|
+
"reflect": true
|
|
495
|
+
},
|
|
496
|
+
"translationUrl": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"mutable": false,
|
|
499
|
+
"complexType": {
|
|
500
|
+
"original": "string",
|
|
501
|
+
"resolved": "string",
|
|
502
|
+
"references": {}
|
|
503
|
+
},
|
|
504
|
+
"required": false,
|
|
505
|
+
"optional": false,
|
|
506
|
+
"docs": {
|
|
507
|
+
"tags": [],
|
|
508
|
+
"text": "Translations via URL"
|
|
509
|
+
},
|
|
510
|
+
"attribute": "translation-url",
|
|
511
|
+
"reflect": true,
|
|
512
|
+
"defaultValue": "''"
|
|
513
|
+
},
|
|
514
|
+
"clientStyling": {
|
|
515
|
+
"type": "string",
|
|
516
|
+
"mutable": true,
|
|
517
|
+
"complexType": {
|
|
518
|
+
"original": "string",
|
|
519
|
+
"resolved": "string",
|
|
520
|
+
"references": {}
|
|
521
|
+
},
|
|
522
|
+
"required": false,
|
|
523
|
+
"optional": false,
|
|
524
|
+
"docs": {
|
|
525
|
+
"tags": [],
|
|
526
|
+
"text": "Clienty styling passed as a string"
|
|
527
|
+
},
|
|
528
|
+
"attribute": "client-styling",
|
|
529
|
+
"reflect": true,
|
|
530
|
+
"defaultValue": "''"
|
|
531
|
+
}
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
static get states() {
|
|
535
|
+
return {
|
|
536
|
+
"showSettingsModal": {},
|
|
537
|
+
"messageSeen": {},
|
|
538
|
+
"messageRead": {},
|
|
539
|
+
"displayedContent": {}
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
static get events() {
|
|
543
|
+
return [{
|
|
544
|
+
"method": "messageDeteled",
|
|
545
|
+
"name": "messageDeleted",
|
|
546
|
+
"bubbles": true,
|
|
547
|
+
"cancelable": true,
|
|
548
|
+
"composed": true,
|
|
549
|
+
"docs": {
|
|
550
|
+
"tags": [],
|
|
551
|
+
"text": ""
|
|
552
|
+
},
|
|
553
|
+
"complexType": {
|
|
554
|
+
"original": "any",
|
|
555
|
+
"resolved": "any",
|
|
556
|
+
"references": {}
|
|
557
|
+
}
|
|
558
|
+
}, {
|
|
559
|
+
"method": "settingsOpened",
|
|
560
|
+
"name": "settingsOpened",
|
|
561
|
+
"bubbles": true,
|
|
562
|
+
"cancelable": true,
|
|
563
|
+
"composed": true,
|
|
564
|
+
"docs": {
|
|
565
|
+
"tags": [],
|
|
566
|
+
"text": ""
|
|
567
|
+
},
|
|
568
|
+
"complexType": {
|
|
569
|
+
"original": "any",
|
|
570
|
+
"resolved": "any",
|
|
571
|
+
"references": {}
|
|
572
|
+
}
|
|
573
|
+
}];
|
|
574
|
+
}
|
|
575
|
+
static get watchers() {
|
|
576
|
+
return [{
|
|
577
|
+
"propName": "translationUrl",
|
|
578
|
+
"methodName": "handleNewTranslations"
|
|
579
|
+
}];
|
|
580
|
+
}
|
|
581
|
+
static get listeners() {
|
|
582
|
+
return [{
|
|
583
|
+
"name": "allNotificationsRead",
|
|
584
|
+
"method": "allNotificationsReadHandler",
|
|
585
|
+
"target": "window",
|
|
586
|
+
"capture": false,
|
|
587
|
+
"passive": false
|
|
588
|
+
}, {
|
|
589
|
+
"name": "settingsOpened",
|
|
590
|
+
"method": "settingsOpenedHandler",
|
|
591
|
+
"target": "window",
|
|
592
|
+
"capture": false,
|
|
593
|
+
"passive": false
|
|
594
|
+
}];
|
|
595
|
+
}
|
|
596
|
+
}
|