isometrik-plugin-chat-sdk 1.0.8 → 1.3.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/LICENSE +21 -0
- package/dist/cjs/attachment-preview_22.cjs.entry.js +10 -9
- package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
- package/dist/cjs/audio-bubble_4.cjs.entry.js +1 -1
- package/dist/cjs/chat-assets-e32e80c0.js +73 -0
- package/dist/cjs/chat-assets-e32e80c0.js.map +1 -0
- package/dist/cjs/chat-tile_3.cjs.entry.js +1 -1
- package/dist/cjs/forward-memebers.cjs.entry.js +1 -1
- package/dist/cjs/isometrik-webchat.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/login-page_3.cjs.entry.js +23 -13
- package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
- package/dist/cjs/member-add.cjs.entry.js +1 -1
- package/dist/cjs/new-chat-sidebar.cjs.entry.js +1 -1
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +6 -7
- package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +12 -12
- package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/WebChat.js +39 -6
- package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
- package/dist/collection/components/my-component/web-chat/shell-render.js +4 -2
- package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
- package/dist/collection/components/theme-provider.js +9 -9
- package/dist/collection/components/theme-provider.js.map +1 -1
- package/dist/collection/constants/chat-assets.js +39 -123
- package/dist/components/ChatSidebar.js +2 -2
- package/dist/components/ChatSidebar.js.map +1 -1
- package/dist/components/WebChat.js +15 -4
- package/dist/components/WebChat.js.map +1 -1
- package/dist/components/WebChatBody.js +9 -8
- package/dist/components/WebChatBody.js.map +1 -1
- package/dist/components/chat-assets.js +34 -82
- package/dist/components/chat-assets.js.map +1 -1
- package/dist/components/theme-provider2.js +9 -9
- package/dist/components/theme-provider2.js.map +1 -1
- package/dist/esm/attachment-preview_22.entry.js +10 -9
- package/dist/esm/attachment-preview_22.entry.js.map +1 -1
- package/dist/esm/audio-bubble_4.entry.js +1 -1
- package/dist/esm/chat-assets-4dfb1106.js +38 -0
- package/dist/esm/chat-assets-4dfb1106.js.map +1 -0
- package/dist/esm/chat-tile_3.entry.js +1 -1
- package/dist/esm/forward-memebers.entry.js +1 -1
- package/dist/esm/isometrik-webchat.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/login-page_3.entry.js +23 -13
- package/dist/esm/login-page_3.entry.js.map +1 -1
- package/dist/esm/member-add.entry.js +1 -1
- package/dist/esm/new-chat-sidebar.entry.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.css +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
- package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
- package/dist/isometrik-webchat/{p-188b2631.entry.js → p-0085b397.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-ab5e1e85.entry.js → p-1ad1127f.entry.js} +2 -2
- package/dist/isometrik-webchat/p-6d9f8cec.entry.js +2 -0
- package/dist/isometrik-webchat/p-6d9f8cec.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-b44f0bd1.entry.js → p-6ec350aa.entry.js} +2 -2
- package/dist/isometrik-webchat/p-6ffeb379.entry.js +2 -0
- package/dist/isometrik-webchat/p-6ffeb379.entry.js.map +1 -0
- package/dist/isometrik-webchat/{p-e589ff24.entry.js → p-71cc96a3.entry.js} +2 -2
- package/dist/isometrik-webchat/{p-ff8f6bd2.entry.js → p-b8cef5e4.entry.js} +2 -2
- package/dist/isometrik-webchat/p-d424871c.js +2 -0
- package/dist/isometrik-webchat/p-d424871c.js.map +1 -0
- package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +2 -1
- package/dist/types/components/ChatUIComponent/WebChatBody/WebChatBody.d.ts +2 -2
- package/dist/types/components/theme-provider.d.ts +3 -2
- package/dist/types/components.d.ts +26 -8
- package/package.json +53 -10
- package/readme.md +428 -0
- package/dist/cjs/chat-assets-ff067e4d.js +0 -121
- package/dist/cjs/chat-assets-ff067e4d.js.map +0 -1
- package/dist/collection/assets/ExcelDocument.js +0 -2
- package/dist/collection/assets/IsometrikLogo.js +0 -38
- package/dist/collection/assets/Moon.svg +0 -1
- package/dist/collection/assets/New-Chat.svg +0 -5
- package/dist/collection/assets/NoChatPlaceholder.js +0 -16
- package/dist/collection/assets/NoContactsPlaceholder.js +0 -9
- package/dist/collection/assets/NoMessagePlaceholder.svg +0 -13
- package/dist/collection/assets/PdfDocument.js +0 -2
- package/dist/collection/assets/ProfilePlaceholder.js +0 -1
- package/dist/collection/assets/SelectChatPlaceholder.js +0 -13
- package/dist/collection/assets/Sun.svg +0 -1
- package/dist/collection/assets/add-user.svg +0 -6
- package/dist/collection/assets/attachment.svg +0 -4
- package/dist/collection/assets/avatar.svg +0 -1
- package/dist/collection/assets/block-user.svg +0 -4
- package/dist/collection/assets/camera-add.svg +0 -4
- package/dist/collection/assets/camera.svg +0 -17
- package/dist/collection/assets/cancel.svg +0 -12
- package/dist/collection/assets/chatBG.png +0 -0
- package/dist/collection/assets/chatdefaultbg.svg +0 -6140
- package/dist/collection/assets/clear-chat.svg +0 -4
- package/dist/collection/assets/close.svg +0 -4
- package/dist/collection/assets/dark-theme.svg +0 -12
- package/dist/collection/assets/delete.svg +0 -8
- package/dist/collection/assets/doc.png +0 -0
- package/dist/collection/assets/documents.svg +0 -15
- package/dist/collection/assets/doublecheck.svg +0 -1
- package/dist/collection/assets/download.svg +0 -4
- package/dist/collection/assets/drop-down.svg +0 -5
- package/dist/collection/assets/edit.svg +0 -4
- package/dist/collection/assets/equalizer.svg +0 -1
- package/dist/collection/assets/excel.svg +0 -2
- package/dist/collection/assets/forward.svg +0 -4
- package/dist/collection/assets/group-cast.svg +0 -1
- package/dist/collection/assets/group.svg +0 -13
- package/dist/collection/assets/imagePlaceholder.png +0 -0
- package/dist/collection/assets/imagePlaceholder.svg +0 -2
- package/dist/collection/assets/info.svg +0 -4
- package/dist/collection/assets/left-arrow.svg +0 -4
- package/dist/collection/assets/link.svg +0 -1
- package/dist/collection/assets/login.svg +0 -3051
- package/dist/collection/assets/logout.svg +0 -5
- package/dist/collection/assets/message-outline.svg +0 -5
- package/dist/collection/assets/message.svg +0 -1
- package/dist/collection/assets/microphone.svg +0 -2
- package/dist/collection/assets/new_group.svg +0 -9
- package/dist/collection/assets/odt-file.png +0 -0
- package/dist/collection/assets/onboarding.webp +0 -0
- package/dist/collection/assets/paper.svg +0 -5
- package/dist/collection/assets/pause.svg +0 -4
- package/dist/collection/assets/pdf.svg +0 -11
- package/dist/collection/assets/photos.svg +0 -4
- package/dist/collection/assets/play.svg +0 -19
- package/dist/collection/assets/profilePlaceholderImage.png +0 -0
- package/dist/collection/assets/reply.svg +0 -4
- package/dist/collection/assets/rtf.png +0 -0
- package/dist/collection/assets/search.svg +0 -4
- package/dist/collection/assets/send.svg +0 -4
- package/dist/collection/assets/singlecheck.svg +0 -1
- package/dist/collection/assets/smile.svg +0 -2
- package/dist/collection/assets/three-dots.svg +0 -5
- package/dist/collection/assets/txt.png +0 -0
- package/dist/collection/assets/videoPlaceholder.svg +0 -4
- package/dist/collection/assets/videoThumbnail.svg +0 -1
- package/dist/collection/components/ChatUIComponent/AudioBubble.js +0 -315
- package/dist/collection/components/ChatUIComponent/BlockChatList.js +0 -177
- package/dist/collection/components/ChatUIComponent/ForwardMessageList.js +0 -152
- package/dist/collection/components/ChatUIComponent/GroupCast.js +0 -461
- package/dist/collection/components/ChatUIComponent/shared/attachment-preview.js +0 -230
- package/dist/collection/components/ChatUIComponent/shared/chat-loading-placeholder.js +0 -70
- package/dist/collection/components/ChatUIComponent/shared/confirm-dialog.js +0 -51
- package/dist/collection/components/ChatUIComponent/shared/contact-info.js +0 -255
- package/dist/collection/components/ChatUIComponent/shared/context-menu.js +0 -112
- package/dist/collection/components/ChatUIComponent/shared/delete-message.js +0 -49
- package/dist/collection/components/ChatUIComponent/shared/document-message.js +0 -161
- package/dist/collection/components/ChatUIComponent/shared/forward-message.js +0 -139
- package/dist/collection/components/ChatUIComponent/shared/group-chat-contacts.js +0 -201
- package/dist/collection/components/ChatUIComponent/shared/group-info.js +0 -170
- package/dist/collection/components/ChatUIComponent/shared/image-message.js +0 -156
- package/dist/collection/components/ChatUIComponent/shared/incoming-text-message-bubble.js +0 -98
- package/dist/collection/components/ChatUIComponent/shared/link-preview.js +0 -125
- package/dist/collection/components/ChatUIComponent/shared/media-gallery.js +0 -152
- package/dist/collection/components/ChatUIComponent/shared/message-body-render.js +0 -19
- package/dist/collection/components/ChatUIComponent/shared/message-bubble.js +0 -189
- package/dist/collection/components/ChatUIComponent/shared/message-date-pill.js +0 -86
- package/dist/collection/components/ChatUIComponent/shared/message-info.js +0 -188
- package/dist/collection/components/ChatUIComponent/shared/message-search.js +0 -125
- package/dist/collection/components/ChatUIComponent/shared/new-chat-sidebar.js +0 -181
- package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble.js +0 -98
- package/dist/collection/components/ChatUIComponent/shared/profile-avatar.js +0 -136
- package/dist/collection/components/ChatUIComponent/shared/profile-info.js +0 -220
- package/dist/collection/components/ChatUIComponent/shared/reply-block.js +0 -162
- package/dist/collection/components/ChatUIComponent/shared/reply-message-container.js +0 -193
- package/dist/collection/components/ChatUIComponent/shared/share-popup.js +0 -69
- package/dist/collection/components/ChatUIComponent/shared/spinner-loader.js +0 -74
- package/dist/collection/components/ChatUIComponent/shared/toast-notification.js +0 -106
- package/dist/collection/components/ChatUIComponent/shared/video-message.js +0 -165
- package/dist/collection/components/my-component/my-component.e2e.js +0 -25
- package/dist/collection/components/my-component/my-component.spec.js +0 -34
- package/dist/collection/components/my-component/web-chat/web-chat-split.spec.js +0 -40
- package/dist/collection/lib/chat/chat.spec.js +0 -28
- package/dist/collection/lib/custom-ui/custom-ui.spec.js +0 -49
- package/dist/collection/lib/message-body-segments.spec.js +0 -21
- package/dist/collection/lib/message-dedup.spec.js +0 -17
- package/dist/collection/lib/mqtt/mqtt.spec.js +0 -39
- package/dist/collection/utils/utils.spec.js +0 -15
- package/dist/esm/chat-assets-95633770.js +0 -86
- package/dist/esm/chat-assets-95633770.js.map +0 -1
- package/dist/isometrik-webchat/assets/ExcelDocument.js +0 -2
- package/dist/isometrik-webchat/assets/IsometrikLogo.js +0 -38
- package/dist/isometrik-webchat/assets/Moon.svg +0 -1
- package/dist/isometrik-webchat/assets/New-Chat.svg +0 -5
- package/dist/isometrik-webchat/assets/NoChatPlaceholder.js +0 -16
- package/dist/isometrik-webchat/assets/NoContactsPlaceholder.js +0 -9
- package/dist/isometrik-webchat/assets/NoMessagePlaceholder.svg +0 -13
- package/dist/isometrik-webchat/assets/PdfDocument.js +0 -2
- package/dist/isometrik-webchat/assets/ProfilePlaceholder.js +0 -1
- package/dist/isometrik-webchat/assets/SelectChatPlaceholder.js +0 -13
- package/dist/isometrik-webchat/assets/Sun.svg +0 -1
- package/dist/isometrik-webchat/assets/add-user.svg +0 -6
- package/dist/isometrik-webchat/assets/attachment.svg +0 -4
- package/dist/isometrik-webchat/assets/avatar.svg +0 -1
- package/dist/isometrik-webchat/assets/block-user.svg +0 -4
- package/dist/isometrik-webchat/assets/camera-add.svg +0 -4
- package/dist/isometrik-webchat/assets/camera.svg +0 -17
- package/dist/isometrik-webchat/assets/cancel.svg +0 -12
- package/dist/isometrik-webchat/assets/chatBG.png +0 -0
- package/dist/isometrik-webchat/assets/chatdefaultbg.svg +0 -6140
- package/dist/isometrik-webchat/assets/clear-chat.svg +0 -4
- package/dist/isometrik-webchat/assets/close.svg +0 -4
- package/dist/isometrik-webchat/assets/dark-theme.svg +0 -12
- package/dist/isometrik-webchat/assets/delete.svg +0 -8
- package/dist/isometrik-webchat/assets/doc.png +0 -0
- package/dist/isometrik-webchat/assets/documents.svg +0 -15
- package/dist/isometrik-webchat/assets/doublecheck.svg +0 -1
- package/dist/isometrik-webchat/assets/download.svg +0 -4
- package/dist/isometrik-webchat/assets/drop-down.svg +0 -5
- package/dist/isometrik-webchat/assets/edit.svg +0 -4
- package/dist/isometrik-webchat/assets/equalizer.svg +0 -1
- package/dist/isometrik-webchat/assets/excel.svg +0 -2
- package/dist/isometrik-webchat/assets/forward.svg +0 -4
- package/dist/isometrik-webchat/assets/group-cast.svg +0 -1
- package/dist/isometrik-webchat/assets/group.svg +0 -13
- package/dist/isometrik-webchat/assets/imagePlaceholder.png +0 -0
- package/dist/isometrik-webchat/assets/imagePlaceholder.svg +0 -2
- package/dist/isometrik-webchat/assets/info.svg +0 -4
- package/dist/isometrik-webchat/assets/left-arrow.svg +0 -4
- package/dist/isometrik-webchat/assets/link.svg +0 -1
- package/dist/isometrik-webchat/assets/login.svg +0 -3051
- package/dist/isometrik-webchat/assets/logout.svg +0 -5
- package/dist/isometrik-webchat/assets/message-outline.svg +0 -5
- package/dist/isometrik-webchat/assets/message.svg +0 -1
- package/dist/isometrik-webchat/assets/microphone.svg +0 -2
- package/dist/isometrik-webchat/assets/new_group.svg +0 -9
- package/dist/isometrik-webchat/assets/odt-file.png +0 -0
- package/dist/isometrik-webchat/assets/onboarding.webp +0 -0
- package/dist/isometrik-webchat/assets/paper.svg +0 -5
- package/dist/isometrik-webchat/assets/pause.svg +0 -4
- package/dist/isometrik-webchat/assets/pdf.svg +0 -11
- package/dist/isometrik-webchat/assets/photos.svg +0 -4
- package/dist/isometrik-webchat/assets/play.svg +0 -19
- package/dist/isometrik-webchat/assets/profilePlaceholderImage.png +0 -0
- package/dist/isometrik-webchat/assets/reply.svg +0 -4
- package/dist/isometrik-webchat/assets/rtf.png +0 -0
- package/dist/isometrik-webchat/assets/search.svg +0 -4
- package/dist/isometrik-webchat/assets/send.svg +0 -4
- package/dist/isometrik-webchat/assets/singlecheck.svg +0 -1
- package/dist/isometrik-webchat/assets/smile.svg +0 -2
- package/dist/isometrik-webchat/assets/three-dots.svg +0 -5
- package/dist/isometrik-webchat/assets/txt.png +0 -0
- package/dist/isometrik-webchat/assets/videoPlaceholder.svg +0 -4
- package/dist/isometrik-webchat/assets/videoThumbnail.svg +0 -1
- package/dist/isometrik-webchat/p-4bad6da9.entry.js +0 -2
- package/dist/isometrik-webchat/p-4bad6da9.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-8c73a5d5.entry.js +0 -2
- package/dist/isometrik-webchat/p-8c73a5d5.entry.js.map +0 -1
- package/dist/isometrik-webchat/p-d6f0838c.js +0 -2
- package/dist/isometrik-webchat/p-d6f0838c.js.map +0 -1
- /package/dist/isometrik-webchat/{p-188b2631.entry.js.map → p-0085b397.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-ab5e1e85.entry.js.map → p-1ad1127f.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-b44f0bd1.entry.js.map → p-6ec350aa.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-e589ff24.entry.js.map → p-71cc96a3.entry.js.map} +0 -0
- /package/dist/isometrik-webchat/{p-ff8f6bd2.entry.js.map → p-b8cef5e4.entry.js.map} +0 -0
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Component, Prop, h } from '@stencil/core';
|
|
8
|
-
let ReplyBlock = class ReplyBlock {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.color = 'black';
|
|
11
|
-
this.fontSize = '16px';
|
|
12
|
-
this.textAlign = 'left';
|
|
13
|
-
this.fontWeight = 'normal';
|
|
14
|
-
this.fontStyle = 'normal';
|
|
15
|
-
this.backgroundColor = 'transparent';
|
|
16
|
-
this.borderColor = 'transparent';
|
|
17
|
-
this.borderRadius = '4px';
|
|
18
|
-
this.height = 'auto';
|
|
19
|
-
this.messageBody = '';
|
|
20
|
-
this.senderName = '';
|
|
21
|
-
this.messageInfo = {};
|
|
22
|
-
}
|
|
23
|
-
bodyLabel() {
|
|
24
|
-
var _a;
|
|
25
|
-
const attachments = (_a = this.messageInfo) === null || _a === void 0 ? void 0 : _a.attachments;
|
|
26
|
-
if ((attachments === null || attachments === void 0 ? void 0 : attachments.length) > 0) {
|
|
27
|
-
const attachment = attachments[attachments.length - 1];
|
|
28
|
-
const mime = (attachment === null || attachment === void 0 ? void 0 : attachment.mimeType) || '';
|
|
29
|
-
if (mime.startsWith('image/'))
|
|
30
|
-
return '🖼 Image';
|
|
31
|
-
if (mime.startsWith('video/'))
|
|
32
|
-
return '🎬 Video';
|
|
33
|
-
if (mime.startsWith('audio/'))
|
|
34
|
-
return '🎵 Audio';
|
|
35
|
-
if (mime.startsWith('application/'))
|
|
36
|
-
return (attachment === null || attachment === void 0 ? void 0 : attachment.name) || 'Document';
|
|
37
|
-
return `📎 ${(attachment === null || attachment === void 0 ? void 0 : attachment.name) || 'Attachment'}`;
|
|
38
|
-
}
|
|
39
|
-
return this.messageBody;
|
|
40
|
-
}
|
|
41
|
-
render() {
|
|
42
|
-
return (h("div", { class: "reply-block-container", style: {
|
|
43
|
-
color: this.color,
|
|
44
|
-
fontSize: this.fontSize,
|
|
45
|
-
textAlign: this.textAlign,
|
|
46
|
-
fontWeight: this.fontWeight,
|
|
47
|
-
fontStyle: this.fontStyle,
|
|
48
|
-
backgroundColor: this.backgroundColor,
|
|
49
|
-
borderColor: this.borderColor,
|
|
50
|
-
borderWidth: this.borderWidth,
|
|
51
|
-
borderStyle: this.borderStyle,
|
|
52
|
-
borderRadius: this.borderRadius,
|
|
53
|
-
fontFamily: this.fontFamily,
|
|
54
|
-
width: this.width,
|
|
55
|
-
height: this.height,
|
|
56
|
-
alignItems: this.alignItems,
|
|
57
|
-
justifyContent: this.justifyContent,
|
|
58
|
-
display: this.display,
|
|
59
|
-
padding: this.padding,
|
|
60
|
-
} },
|
|
61
|
-
h("div", { class: "reply-body" },
|
|
62
|
-
h("div", { class: "sender" }, this.senderName),
|
|
63
|
-
h("div", { class: "message-body-container" }, this.bodyLabel())),
|
|
64
|
-
h("button", { type: "button", class: "close-btn", "aria-label": "Close", onClick: () => { var _a; return (_a = this.onIconClick) === null || _a === void 0 ? void 0 : _a.call(this); } }, "\u00D7")));
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
__decorate([
|
|
68
|
-
Prop()
|
|
69
|
-
], ReplyBlock.prototype, "color", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
Prop()
|
|
72
|
-
], ReplyBlock.prototype, "fontSize", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
Prop()
|
|
75
|
-
], ReplyBlock.prototype, "textAlign", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
Prop()
|
|
78
|
-
], ReplyBlock.prototype, "fontWeight", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
Prop()
|
|
81
|
-
], ReplyBlock.prototype, "fontStyle", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
Prop()
|
|
84
|
-
], ReplyBlock.prototype, "backgroundColor", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
Prop()
|
|
87
|
-
], ReplyBlock.prototype, "borderColor", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
Prop()
|
|
90
|
-
], ReplyBlock.prototype, "borderWidth", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
Prop()
|
|
93
|
-
], ReplyBlock.prototype, "borderStyle", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
Prop()
|
|
96
|
-
], ReplyBlock.prototype, "borderRadius", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
Prop()
|
|
99
|
-
], ReplyBlock.prototype, "fontFamily", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
Prop()
|
|
102
|
-
], ReplyBlock.prototype, "width", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
Prop()
|
|
105
|
-
], ReplyBlock.prototype, "height", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
Prop()
|
|
108
|
-
], ReplyBlock.prototype, "display", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
Prop()
|
|
111
|
-
], ReplyBlock.prototype, "alignItems", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
Prop()
|
|
114
|
-
], ReplyBlock.prototype, "justifyContent", void 0);
|
|
115
|
-
__decorate([
|
|
116
|
-
Prop()
|
|
117
|
-
], ReplyBlock.prototype, "padding", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
Prop()
|
|
120
|
-
], ReplyBlock.prototype, "messageBody", void 0);
|
|
121
|
-
__decorate([
|
|
122
|
-
Prop()
|
|
123
|
-
], ReplyBlock.prototype, "senderName", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
Prop()
|
|
126
|
-
], ReplyBlock.prototype, "messageTime", void 0);
|
|
127
|
-
__decorate([
|
|
128
|
-
Prop()
|
|
129
|
-
], ReplyBlock.prototype, "icon1", void 0);
|
|
130
|
-
__decorate([
|
|
131
|
-
Prop()
|
|
132
|
-
], ReplyBlock.prototype, "icon2", void 0);
|
|
133
|
-
__decorate([
|
|
134
|
-
Prop()
|
|
135
|
-
], ReplyBlock.prototype, "onIconClick", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
Prop()
|
|
138
|
-
], ReplyBlock.prototype, "messageInfo", void 0);
|
|
139
|
-
ReplyBlock = __decorate([
|
|
140
|
-
Component({
|
|
141
|
-
tag: 'reply-block',
|
|
142
|
-
shadow: true,
|
|
143
|
-
styles: `
|
|
144
|
-
:host { display: block; }
|
|
145
|
-
.reply-block-container { display: flex; flex-direction: row; align-items: center; gap: 10px; }
|
|
146
|
-
.reply-body {
|
|
147
|
-
width: 100%; display: flex; flex-direction: column; align-items: flex-start;
|
|
148
|
-
background: var(--bg-primary-color); padding: 10px; border-radius: 10px;
|
|
149
|
-
}
|
|
150
|
-
.sender { font-size: 14px; font-weight: 600; color: var(--base-color); }
|
|
151
|
-
.message-body-container {
|
|
152
|
-
display: -webkit-box; color: var(--text-outgoing-message); font-size: 14px;
|
|
153
|
-
-webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;
|
|
154
|
-
padding: 10px 0;
|
|
155
|
-
}
|
|
156
|
-
.close-btn {
|
|
157
|
-
cursor: pointer; border: none; background: transparent; font-size: 20px; line-height: 1; padding: 4px;
|
|
158
|
-
}
|
|
159
|
-
`,
|
|
160
|
-
})
|
|
161
|
-
], ReplyBlock);
|
|
162
|
-
export { ReplyBlock };
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Component, Prop, h } from '@stencil/core';
|
|
8
|
-
import './message-bubble';
|
|
9
|
-
/** Quoted reply + message body (Stencil). */
|
|
10
|
-
let ReplyMessageContainer = class ReplyMessageContainer {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.borderRadius = '10px';
|
|
13
|
-
this.padding = '10px';
|
|
14
|
-
this.messageBody = '';
|
|
15
|
-
this.parentMessageBody = '';
|
|
16
|
-
this.reactions = {};
|
|
17
|
-
this.showReactionOnHover = false;
|
|
18
|
-
}
|
|
19
|
-
render() {
|
|
20
|
-
const parentBody = this.parentMessageBody || this.parentmessageBody || this.repliedMessage || '';
|
|
21
|
-
const parentName = this.parentMessageSenderName || this.senderName || 'Reply';
|
|
22
|
-
return (h("message-bubble", { isSelf: !!this.isSelf, time: this.messageTime, timeColor: this.timeColor, isRead: this.isRead, isDelivered: this.isDelivered, reactions: this.reactions, messageId: this.messageId, userMetaData: this.userMetaData, backgroundColor: this.backgroundColor, borderRadius: this.borderRadius || '10px', padding: this.padding || '10px', showReactionOnHover: this.showReactionOnHover },
|
|
23
|
-
h("div", { class: "quote", onClick: e => { var _a; return (_a = this.onMediaClick) === null || _a === void 0 ? void 0 : _a.call(this, e); } },
|
|
24
|
-
h("div", { class: "quote-sender" }, parentName),
|
|
25
|
-
h("div", { class: "quote-body" }, parentBody),
|
|
26
|
-
this.parentMessageMediaUrl ? (h("img", { class: "quote-media", src: this.parentMessageMediaUrl, alt: "" })) : null),
|
|
27
|
-
h("div", { class: "reply-body", style: { color: this.color, fontSize: this.fontSize, whiteSpace: 'pre-wrap', wordBreak: 'break-word' } }, this.messageBody)));
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
__decorate([
|
|
31
|
-
Prop()
|
|
32
|
-
], ReplyMessageContainer.prototype, "color", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
Prop()
|
|
35
|
-
], ReplyMessageContainer.prototype, "fontSize", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
Prop()
|
|
38
|
-
], ReplyMessageContainer.prototype, "textAlign", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
Prop()
|
|
41
|
-
], ReplyMessageContainer.prototype, "fontWeight", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
Prop()
|
|
44
|
-
], ReplyMessageContainer.prototype, "fontStyle", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
Prop()
|
|
47
|
-
], ReplyMessageContainer.prototype, "backgroundColor", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
Prop()
|
|
50
|
-
], ReplyMessageContainer.prototype, "borderColor", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
Prop()
|
|
53
|
-
], ReplyMessageContainer.prototype, "borderWidth", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
Prop()
|
|
56
|
-
], ReplyMessageContainer.prototype, "borderStyle", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
Prop()
|
|
59
|
-
], ReplyMessageContainer.prototype, "borderRadius", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
Prop()
|
|
62
|
-
], ReplyMessageContainer.prototype, "fontFamily", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
Prop()
|
|
65
|
-
], ReplyMessageContainer.prototype, "width", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
Prop()
|
|
68
|
-
], ReplyMessageContainer.prototype, "height", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
Prop()
|
|
71
|
-
], ReplyMessageContainer.prototype, "display", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
Prop()
|
|
74
|
-
], ReplyMessageContainer.prototype, "alignItems", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
Prop()
|
|
77
|
-
], ReplyMessageContainer.prototype, "justifyContent", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
Prop()
|
|
80
|
-
], ReplyMessageContainer.prototype, "padding", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
Prop()
|
|
83
|
-
], ReplyMessageContainer.prototype, "messageBody", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
Prop()
|
|
86
|
-
], ReplyMessageContainer.prototype, "parentMessageBody", void 0);
|
|
87
|
-
__decorate([
|
|
88
|
-
Prop()
|
|
89
|
-
], ReplyMessageContainer.prototype, "parentmessageBody", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
Prop()
|
|
92
|
-
], ReplyMessageContainer.prototype, "senderName", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
Prop()
|
|
95
|
-
], ReplyMessageContainer.prototype, "messageTime", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
Prop()
|
|
98
|
-
], ReplyMessageContainer.prototype, "icon1", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
Prop()
|
|
101
|
-
], ReplyMessageContainer.prototype, "repliedMessage", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
Prop()
|
|
104
|
-
], ReplyMessageContainer.prototype, "isRead", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
Prop()
|
|
107
|
-
], ReplyMessageContainer.prototype, "isDelivered", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
Prop()
|
|
110
|
-
], ReplyMessageContainer.prototype, "messageInfo", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
Prop()
|
|
113
|
-
], ReplyMessageContainer.prototype, "userMetaData", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
Prop()
|
|
116
|
-
], ReplyMessageContainer.prototype, "parentMessageTime", void 0);
|
|
117
|
-
__decorate([
|
|
118
|
-
Prop()
|
|
119
|
-
], ReplyMessageContainer.prototype, "parentMessageMediaUrl", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
Prop()
|
|
122
|
-
], ReplyMessageContainer.prototype, "parentMessageType", void 0);
|
|
123
|
-
__decorate([
|
|
124
|
-
Prop()
|
|
125
|
-
], ReplyMessageContainer.prototype, "parentMessageId", void 0);
|
|
126
|
-
__decorate([
|
|
127
|
-
Prop()
|
|
128
|
-
], ReplyMessageContainer.prototype, "parentMessageSenderIdentifier", void 0);
|
|
129
|
-
__decorate([
|
|
130
|
-
Prop()
|
|
131
|
-
], ReplyMessageContainer.prototype, "parentMessageSenderName", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
Prop()
|
|
134
|
-
], ReplyMessageContainer.prototype, "isSelf", void 0);
|
|
135
|
-
__decorate([
|
|
136
|
-
Prop()
|
|
137
|
-
], ReplyMessageContainer.prototype, "onMediaClick", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
Prop()
|
|
140
|
-
], ReplyMessageContainer.prototype, "allAttachments", void 0);
|
|
141
|
-
__decorate([
|
|
142
|
-
Prop()
|
|
143
|
-
], ReplyMessageContainer.prototype, "showEmojiReactions", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
Prop()
|
|
146
|
-
], ReplyMessageContainer.prototype, "reactions", void 0);
|
|
147
|
-
__decorate([
|
|
148
|
-
Prop()
|
|
149
|
-
], ReplyMessageContainer.prototype, "messageId", void 0);
|
|
150
|
-
__decorate([
|
|
151
|
-
Prop()
|
|
152
|
-
], ReplyMessageContainer.prototype, "timeColor", void 0);
|
|
153
|
-
__decorate([
|
|
154
|
-
Prop()
|
|
155
|
-
], ReplyMessageContainer.prototype, "showReactionButton", void 0);
|
|
156
|
-
__decorate([
|
|
157
|
-
Prop()
|
|
158
|
-
], ReplyMessageContainer.prototype, "showConfirmationPopup", void 0);
|
|
159
|
-
__decorate([
|
|
160
|
-
Prop()
|
|
161
|
-
], ReplyMessageContainer.prototype, "selectedEmojiToRemove", void 0);
|
|
162
|
-
__decorate([
|
|
163
|
-
Prop()
|
|
164
|
-
], ReplyMessageContainer.prototype, "showAllReactionsPopup", void 0);
|
|
165
|
-
__decorate([
|
|
166
|
-
Prop()
|
|
167
|
-
], ReplyMessageContainer.prototype, "showReactionOnHover", void 0);
|
|
168
|
-
ReplyMessageContainer = __decorate([
|
|
169
|
-
Component({
|
|
170
|
-
tag: 'reply-message-container',
|
|
171
|
-
shadow: true,
|
|
172
|
-
styles: `
|
|
173
|
-
:host { display: block; }
|
|
174
|
-
.quote {
|
|
175
|
-
border-left: 3px solid var(--base-color, #4A76FD);
|
|
176
|
-
background: rgba(0, 0, 0, 0.08);
|
|
177
|
-
border-radius: 6px;
|
|
178
|
-
padding: 6px 8px;
|
|
179
|
-
margin-bottom: 6px;
|
|
180
|
-
font-size: 12px;
|
|
181
|
-
max-width: 100%;
|
|
182
|
-
width: 100%;
|
|
183
|
-
box-sizing: border-box;
|
|
184
|
-
text-align: left;
|
|
185
|
-
}
|
|
186
|
-
.quote-sender { font-weight: 600; margin-bottom: 2px; color: var(--base-color, #4A76FD); }
|
|
187
|
-
.quote-body { opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
188
|
-
.quote-media { max-width: 120px; max-height: 80px; border-radius: 6px; margin-top: 4px; object-fit: cover; }
|
|
189
|
-
.reply-body { width: 100%; text-align: left; }
|
|
190
|
-
`,
|
|
191
|
-
})
|
|
192
|
-
], ReplyMessageContainer);
|
|
193
|
-
export { ReplyMessageContainer };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Component, Prop, h, State } from '@stencil/core';
|
|
8
|
-
let SharePopup = class SharePopup {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.dialogData = {};
|
|
11
|
-
this.isMobile = false;
|
|
12
|
-
this.copied = false;
|
|
13
|
-
this.copy = async () => {
|
|
14
|
-
var _a, _b;
|
|
15
|
-
const link = ((_a = this.dialogData) === null || _a === void 0 ? void 0 : _a.shareLink) || ((_b = this.dialogData) === null || _b === void 0 ? void 0 : _b.link) || '';
|
|
16
|
-
try {
|
|
17
|
-
await navigator.clipboard.writeText(link);
|
|
18
|
-
this.copied = true;
|
|
19
|
-
}
|
|
20
|
-
catch (_c) {
|
|
21
|
-
/* ignore */
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
const d = this.dialogData || {};
|
|
27
|
-
const link = d.shareLink || d.link || '';
|
|
28
|
-
return (h("div", { class: "popup" },
|
|
29
|
-
h("h3", null, d.title || 'Share'),
|
|
30
|
-
h("div", { class: "link" }, link),
|
|
31
|
-
h("div", { class: "actions" },
|
|
32
|
-
h("button", { type: "button", class: "secondary", onClick: () => { var _a; return (_a = this.onClose) === null || _a === void 0 ? void 0 : _a.call(this); } }, "Close"),
|
|
33
|
-
h("button", { type: "button", onClick: this.copy }, this.copied ? 'Copied' : d.primaryActionText || 'Copy'))));
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
__decorate([
|
|
37
|
-
Prop()
|
|
38
|
-
], SharePopup.prototype, "dialogData", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
Prop()
|
|
41
|
-
], SharePopup.prototype, "onClose", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
Prop()
|
|
44
|
-
], SharePopup.prototype, "isMobile", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
State()
|
|
47
|
-
], SharePopup.prototype, "copied", void 0);
|
|
48
|
-
SharePopup = __decorate([
|
|
49
|
-
Component({
|
|
50
|
-
tag: 'share-popup',
|
|
51
|
-
shadow: true,
|
|
52
|
-
styles: `
|
|
53
|
-
:host { display: block; width: 100%; }
|
|
54
|
-
.popup { text-align: left; }
|
|
55
|
-
h3 { margin: 0 0 12px; }
|
|
56
|
-
.link {
|
|
57
|
-
word-break: break-all; padding: 10px; background: var(--bg-primary-light, #f3f3f3);
|
|
58
|
-
border-radius: 8px; margin-bottom: 12px; font-size: 13px;
|
|
59
|
-
}
|
|
60
|
-
.actions { display: flex; gap: 8px; justify-content: flex-end; }
|
|
61
|
-
button {
|
|
62
|
-
border: none; border-radius: 16px; padding: 8px 16px; cursor: pointer;
|
|
63
|
-
background: var(--base-color); color: #fff;
|
|
64
|
-
}
|
|
65
|
-
button.secondary { background: transparent; color: var(--base-color); border: 1px solid var(--base-color); }
|
|
66
|
-
`,
|
|
67
|
-
})
|
|
68
|
-
], SharePopup);
|
|
69
|
-
export { SharePopup };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Component, Prop, h } from '@stencil/core';
|
|
8
|
-
/** Pure Stencil spinner — no Lit. */
|
|
9
|
-
let SpinnerLoader = class SpinnerLoader {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.height = '20px';
|
|
12
|
-
this.width = '20px';
|
|
13
|
-
this.spinTime = '1s';
|
|
14
|
-
this.spinnerPrimaryColor = 'var(--text-primary-color)';
|
|
15
|
-
this.spinnerSecondaryColor = 'var(--bg-primary-color)';
|
|
16
|
-
this.spinnerBorderWidth = '2px';
|
|
17
|
-
}
|
|
18
|
-
render() {
|
|
19
|
-
return (h("div", { class: "main-container" },
|
|
20
|
-
h("div", { class: "spinner", style: {
|
|
21
|
-
height: this.height,
|
|
22
|
-
width: this.width,
|
|
23
|
-
borderWidth: this.spinnerBorderWidth,
|
|
24
|
-
borderColor: this.spinnerSecondaryColor,
|
|
25
|
-
borderTopColor: this.spinnerPrimaryColor,
|
|
26
|
-
animationDuration: this.spinTime,
|
|
27
|
-
} })));
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
__decorate([
|
|
31
|
-
Prop()
|
|
32
|
-
], SpinnerLoader.prototype, "height", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
Prop()
|
|
35
|
-
], SpinnerLoader.prototype, "width", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
Prop()
|
|
38
|
-
], SpinnerLoader.prototype, "spinTime", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
Prop()
|
|
41
|
-
], SpinnerLoader.prototype, "spinnerPrimaryColor", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
Prop()
|
|
44
|
-
], SpinnerLoader.prototype, "spinnerSecondaryColor", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
Prop()
|
|
47
|
-
], SpinnerLoader.prototype, "spinnerBorderWidth", void 0);
|
|
48
|
-
SpinnerLoader = __decorate([
|
|
49
|
-
Component({
|
|
50
|
-
tag: 'spinner-loader',
|
|
51
|
-
shadow: true,
|
|
52
|
-
styles: `
|
|
53
|
-
:host { display: inline-flex; }
|
|
54
|
-
.main-container {
|
|
55
|
-
width: 100%;
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
}
|
|
60
|
-
.spinner {
|
|
61
|
-
border-radius: 50%;
|
|
62
|
-
border-style: solid;
|
|
63
|
-
animation-name: spin;
|
|
64
|
-
animation-timing-function: linear;
|
|
65
|
-
animation-iteration-count: infinite;
|
|
66
|
-
box-sizing: border-box;
|
|
67
|
-
}
|
|
68
|
-
@keyframes spin {
|
|
69
|
-
to { transform: rotate(360deg); }
|
|
70
|
-
}
|
|
71
|
-
`,
|
|
72
|
-
})
|
|
73
|
-
], SpinnerLoader);
|
|
74
|
-
export { SpinnerLoader };
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Component, Prop, h } from '@stencil/core';
|
|
8
|
-
let ToastNotification = class ToastNotification {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.bgColor = 'white';
|
|
11
|
-
this.width = '200px';
|
|
12
|
-
this.height = 'auto';
|
|
13
|
-
this.borderWidth = '1px';
|
|
14
|
-
this.borderColor = 'black';
|
|
15
|
-
this.color = 'black';
|
|
16
|
-
this.fontSize = '14px';
|
|
17
|
-
this.borderRadius = '5px';
|
|
18
|
-
this.fontWeight = 'normal';
|
|
19
|
-
this.progressBarBg = 'white';
|
|
20
|
-
this.progressBarHeight = '5px';
|
|
21
|
-
this.progressBarColor = '#4CAF50';
|
|
22
|
-
this.progressBarBorderRadius = '5px';
|
|
23
|
-
this.toastMessage = 'Default message';
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
return (h("div", { class: "toast-container", style: {
|
|
27
|
-
backgroundColor: this.bgColor,
|
|
28
|
-
color: this.color,
|
|
29
|
-
width: this.width,
|
|
30
|
-
height: this.height,
|
|
31
|
-
border: `${this.borderWidth} solid ${this.borderColor}`,
|
|
32
|
-
borderRadius: this.borderRadius,
|
|
33
|
-
fontSize: this.fontSize,
|
|
34
|
-
fontWeight: this.fontWeight,
|
|
35
|
-
} },
|
|
36
|
-
h("div", { class: "toast-message", style: { padding: this.padding } }, this.toastMessage),
|
|
37
|
-
h("div", { class: "progress-container", style: { height: this.progressBarHeight, borderRadius: this.progressBarBorderRadius, background: this.progressBarBg } },
|
|
38
|
-
h("div", { class: "progress-bar", style: { backgroundColor: this.progressBarColor } }))));
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
__decorate([
|
|
42
|
-
Prop()
|
|
43
|
-
], ToastNotification.prototype, "bgColor", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
Prop()
|
|
46
|
-
], ToastNotification.prototype, "width", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
Prop()
|
|
49
|
-
], ToastNotification.prototype, "height", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
Prop()
|
|
52
|
-
], ToastNotification.prototype, "borderWidth", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
Prop()
|
|
55
|
-
], ToastNotification.prototype, "borderColor", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
Prop()
|
|
58
|
-
], ToastNotification.prototype, "color", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
Prop()
|
|
61
|
-
], ToastNotification.prototype, "fontSize", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
Prop()
|
|
64
|
-
], ToastNotification.prototype, "borderRadius", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
Prop()
|
|
67
|
-
], ToastNotification.prototype, "fontWeight", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
Prop()
|
|
70
|
-
], ToastNotification.prototype, "progressBarBg", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
Prop()
|
|
73
|
-
], ToastNotification.prototype, "progressBarHeight", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
Prop()
|
|
76
|
-
], ToastNotification.prototype, "progressBarColor", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
Prop()
|
|
79
|
-
], ToastNotification.prototype, "progressBarBorderRadius", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
Prop()
|
|
82
|
-
], ToastNotification.prototype, "toastMessage", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
Prop()
|
|
85
|
-
], ToastNotification.prototype, "padding", void 0);
|
|
86
|
-
ToastNotification = __decorate([
|
|
87
|
-
Component({
|
|
88
|
-
tag: 'toast-notification',
|
|
89
|
-
shadow: true,
|
|
90
|
-
styles: `
|
|
91
|
-
:host { display: block; }
|
|
92
|
-
.toast-container { box-shadow: 0 4px 12px rgba(0,0,0,0.15); overflow: hidden; }
|
|
93
|
-
.toast-message { padding: 8px; }
|
|
94
|
-
.progress-container { width: 100%; overflow: hidden; position: relative; }
|
|
95
|
-
.progress-bar {
|
|
96
|
-
height: 100%; width: 100%; transform-origin: left;
|
|
97
|
-
animation: progress 3s linear forwards;
|
|
98
|
-
}
|
|
99
|
-
@keyframes progress {
|
|
100
|
-
from { width: 100%; }
|
|
101
|
-
to { width: 0%; }
|
|
102
|
-
}
|
|
103
|
-
`,
|
|
104
|
-
})
|
|
105
|
-
], ToastNotification);
|
|
106
|
-
export { ToastNotification };
|