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.
Files changed (253) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/attachment-preview_22.cjs.entry.js +10 -9
  3. package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
  4. package/dist/cjs/audio-bubble_4.cjs.entry.js +1 -1
  5. package/dist/cjs/chat-assets-e32e80c0.js +73 -0
  6. package/dist/cjs/chat-assets-e32e80c0.js.map +1 -0
  7. package/dist/cjs/chat-tile_3.cjs.entry.js +1 -1
  8. package/dist/cjs/forward-memebers.cjs.entry.js +1 -1
  9. package/dist/cjs/isometrik-webchat.cjs.js +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/login-page_3.cjs.entry.js +23 -13
  12. package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/member-add.cjs.entry.js +1 -1
  14. package/dist/cjs/new-chat-sidebar.cjs.entry.js +1 -1
  15. package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +6 -7
  16. package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
  17. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +12 -12
  18. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
  19. package/dist/collection/components/my-component/web-chat/WebChat.js +39 -6
  20. package/dist/collection/components/my-component/web-chat/WebChat.js.map +1 -1
  21. package/dist/collection/components/my-component/web-chat/shell-render.js +4 -2
  22. package/dist/collection/components/my-component/web-chat/shell-render.js.map +1 -1
  23. package/dist/collection/components/theme-provider.js +9 -9
  24. package/dist/collection/components/theme-provider.js.map +1 -1
  25. package/dist/collection/constants/chat-assets.js +39 -123
  26. package/dist/components/ChatSidebar.js +2 -2
  27. package/dist/components/ChatSidebar.js.map +1 -1
  28. package/dist/components/WebChat.js +15 -4
  29. package/dist/components/WebChat.js.map +1 -1
  30. package/dist/components/WebChatBody.js +9 -8
  31. package/dist/components/WebChatBody.js.map +1 -1
  32. package/dist/components/chat-assets.js +34 -82
  33. package/dist/components/chat-assets.js.map +1 -1
  34. package/dist/components/theme-provider2.js +9 -9
  35. package/dist/components/theme-provider2.js.map +1 -1
  36. package/dist/esm/attachment-preview_22.entry.js +10 -9
  37. package/dist/esm/attachment-preview_22.entry.js.map +1 -1
  38. package/dist/esm/audio-bubble_4.entry.js +1 -1
  39. package/dist/esm/chat-assets-4dfb1106.js +38 -0
  40. package/dist/esm/chat-assets-4dfb1106.js.map +1 -0
  41. package/dist/esm/chat-tile_3.entry.js +1 -1
  42. package/dist/esm/forward-memebers.entry.js +1 -1
  43. package/dist/esm/isometrik-webchat.js +1 -1
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/esm/login-page_3.entry.js +23 -13
  46. package/dist/esm/login-page_3.entry.js.map +1 -1
  47. package/dist/esm/member-add.entry.js +1 -1
  48. package/dist/esm/new-chat-sidebar.entry.js +1 -1
  49. package/dist/isometrik-webchat/isometrik-webchat.css +1 -1
  50. package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
  51. package/dist/isometrik-webchat/isometrik-webchat.esm.js.map +1 -1
  52. package/dist/isometrik-webchat/{p-188b2631.entry.js → p-0085b397.entry.js} +2 -2
  53. package/dist/isometrik-webchat/{p-ab5e1e85.entry.js → p-1ad1127f.entry.js} +2 -2
  54. package/dist/isometrik-webchat/p-6d9f8cec.entry.js +2 -0
  55. package/dist/isometrik-webchat/p-6d9f8cec.entry.js.map +1 -0
  56. package/dist/isometrik-webchat/{p-b44f0bd1.entry.js → p-6ec350aa.entry.js} +2 -2
  57. package/dist/isometrik-webchat/p-6ffeb379.entry.js +2 -0
  58. package/dist/isometrik-webchat/p-6ffeb379.entry.js.map +1 -0
  59. package/dist/isometrik-webchat/{p-e589ff24.entry.js → p-71cc96a3.entry.js} +2 -2
  60. package/dist/isometrik-webchat/{p-ff8f6bd2.entry.js → p-b8cef5e4.entry.js} +2 -2
  61. package/dist/isometrik-webchat/p-d424871c.js +2 -0
  62. package/dist/isometrik-webchat/p-d424871c.js.map +1 -0
  63. package/dist/types/components/ChatUIComponent/ChatSidebar/ChatSidebar.d.ts +2 -1
  64. package/dist/types/components/ChatUIComponent/WebChatBody/WebChatBody.d.ts +2 -2
  65. package/dist/types/components/theme-provider.d.ts +3 -2
  66. package/dist/types/components.d.ts +26 -8
  67. package/package.json +53 -10
  68. package/readme.md +428 -0
  69. package/dist/cjs/chat-assets-ff067e4d.js +0 -121
  70. package/dist/cjs/chat-assets-ff067e4d.js.map +0 -1
  71. package/dist/collection/assets/ExcelDocument.js +0 -2
  72. package/dist/collection/assets/IsometrikLogo.js +0 -38
  73. package/dist/collection/assets/Moon.svg +0 -1
  74. package/dist/collection/assets/New-Chat.svg +0 -5
  75. package/dist/collection/assets/NoChatPlaceholder.js +0 -16
  76. package/dist/collection/assets/NoContactsPlaceholder.js +0 -9
  77. package/dist/collection/assets/NoMessagePlaceholder.svg +0 -13
  78. package/dist/collection/assets/PdfDocument.js +0 -2
  79. package/dist/collection/assets/ProfilePlaceholder.js +0 -1
  80. package/dist/collection/assets/SelectChatPlaceholder.js +0 -13
  81. package/dist/collection/assets/Sun.svg +0 -1
  82. package/dist/collection/assets/add-user.svg +0 -6
  83. package/dist/collection/assets/attachment.svg +0 -4
  84. package/dist/collection/assets/avatar.svg +0 -1
  85. package/dist/collection/assets/block-user.svg +0 -4
  86. package/dist/collection/assets/camera-add.svg +0 -4
  87. package/dist/collection/assets/camera.svg +0 -17
  88. package/dist/collection/assets/cancel.svg +0 -12
  89. package/dist/collection/assets/chatBG.png +0 -0
  90. package/dist/collection/assets/chatdefaultbg.svg +0 -6140
  91. package/dist/collection/assets/clear-chat.svg +0 -4
  92. package/dist/collection/assets/close.svg +0 -4
  93. package/dist/collection/assets/dark-theme.svg +0 -12
  94. package/dist/collection/assets/delete.svg +0 -8
  95. package/dist/collection/assets/doc.png +0 -0
  96. package/dist/collection/assets/documents.svg +0 -15
  97. package/dist/collection/assets/doublecheck.svg +0 -1
  98. package/dist/collection/assets/download.svg +0 -4
  99. package/dist/collection/assets/drop-down.svg +0 -5
  100. package/dist/collection/assets/edit.svg +0 -4
  101. package/dist/collection/assets/equalizer.svg +0 -1
  102. package/dist/collection/assets/excel.svg +0 -2
  103. package/dist/collection/assets/forward.svg +0 -4
  104. package/dist/collection/assets/group-cast.svg +0 -1
  105. package/dist/collection/assets/group.svg +0 -13
  106. package/dist/collection/assets/imagePlaceholder.png +0 -0
  107. package/dist/collection/assets/imagePlaceholder.svg +0 -2
  108. package/dist/collection/assets/info.svg +0 -4
  109. package/dist/collection/assets/left-arrow.svg +0 -4
  110. package/dist/collection/assets/link.svg +0 -1
  111. package/dist/collection/assets/login.svg +0 -3051
  112. package/dist/collection/assets/logout.svg +0 -5
  113. package/dist/collection/assets/message-outline.svg +0 -5
  114. package/dist/collection/assets/message.svg +0 -1
  115. package/dist/collection/assets/microphone.svg +0 -2
  116. package/dist/collection/assets/new_group.svg +0 -9
  117. package/dist/collection/assets/odt-file.png +0 -0
  118. package/dist/collection/assets/onboarding.webp +0 -0
  119. package/dist/collection/assets/paper.svg +0 -5
  120. package/dist/collection/assets/pause.svg +0 -4
  121. package/dist/collection/assets/pdf.svg +0 -11
  122. package/dist/collection/assets/photos.svg +0 -4
  123. package/dist/collection/assets/play.svg +0 -19
  124. package/dist/collection/assets/profilePlaceholderImage.png +0 -0
  125. package/dist/collection/assets/reply.svg +0 -4
  126. package/dist/collection/assets/rtf.png +0 -0
  127. package/dist/collection/assets/search.svg +0 -4
  128. package/dist/collection/assets/send.svg +0 -4
  129. package/dist/collection/assets/singlecheck.svg +0 -1
  130. package/dist/collection/assets/smile.svg +0 -2
  131. package/dist/collection/assets/three-dots.svg +0 -5
  132. package/dist/collection/assets/txt.png +0 -0
  133. package/dist/collection/assets/videoPlaceholder.svg +0 -4
  134. package/dist/collection/assets/videoThumbnail.svg +0 -1
  135. package/dist/collection/components/ChatUIComponent/AudioBubble.js +0 -315
  136. package/dist/collection/components/ChatUIComponent/BlockChatList.js +0 -177
  137. package/dist/collection/components/ChatUIComponent/ForwardMessageList.js +0 -152
  138. package/dist/collection/components/ChatUIComponent/GroupCast.js +0 -461
  139. package/dist/collection/components/ChatUIComponent/shared/attachment-preview.js +0 -230
  140. package/dist/collection/components/ChatUIComponent/shared/chat-loading-placeholder.js +0 -70
  141. package/dist/collection/components/ChatUIComponent/shared/confirm-dialog.js +0 -51
  142. package/dist/collection/components/ChatUIComponent/shared/contact-info.js +0 -255
  143. package/dist/collection/components/ChatUIComponent/shared/context-menu.js +0 -112
  144. package/dist/collection/components/ChatUIComponent/shared/delete-message.js +0 -49
  145. package/dist/collection/components/ChatUIComponent/shared/document-message.js +0 -161
  146. package/dist/collection/components/ChatUIComponent/shared/forward-message.js +0 -139
  147. package/dist/collection/components/ChatUIComponent/shared/group-chat-contacts.js +0 -201
  148. package/dist/collection/components/ChatUIComponent/shared/group-info.js +0 -170
  149. package/dist/collection/components/ChatUIComponent/shared/image-message.js +0 -156
  150. package/dist/collection/components/ChatUIComponent/shared/incoming-text-message-bubble.js +0 -98
  151. package/dist/collection/components/ChatUIComponent/shared/link-preview.js +0 -125
  152. package/dist/collection/components/ChatUIComponent/shared/media-gallery.js +0 -152
  153. package/dist/collection/components/ChatUIComponent/shared/message-body-render.js +0 -19
  154. package/dist/collection/components/ChatUIComponent/shared/message-bubble.js +0 -189
  155. package/dist/collection/components/ChatUIComponent/shared/message-date-pill.js +0 -86
  156. package/dist/collection/components/ChatUIComponent/shared/message-info.js +0 -188
  157. package/dist/collection/components/ChatUIComponent/shared/message-search.js +0 -125
  158. package/dist/collection/components/ChatUIComponent/shared/new-chat-sidebar.js +0 -181
  159. package/dist/collection/components/ChatUIComponent/shared/outgoing-text-message-bubble.js +0 -98
  160. package/dist/collection/components/ChatUIComponent/shared/profile-avatar.js +0 -136
  161. package/dist/collection/components/ChatUIComponent/shared/profile-info.js +0 -220
  162. package/dist/collection/components/ChatUIComponent/shared/reply-block.js +0 -162
  163. package/dist/collection/components/ChatUIComponent/shared/reply-message-container.js +0 -193
  164. package/dist/collection/components/ChatUIComponent/shared/share-popup.js +0 -69
  165. package/dist/collection/components/ChatUIComponent/shared/spinner-loader.js +0 -74
  166. package/dist/collection/components/ChatUIComponent/shared/toast-notification.js +0 -106
  167. package/dist/collection/components/ChatUIComponent/shared/video-message.js +0 -165
  168. package/dist/collection/components/my-component/my-component.e2e.js +0 -25
  169. package/dist/collection/components/my-component/my-component.spec.js +0 -34
  170. package/dist/collection/components/my-component/web-chat/web-chat-split.spec.js +0 -40
  171. package/dist/collection/lib/chat/chat.spec.js +0 -28
  172. package/dist/collection/lib/custom-ui/custom-ui.spec.js +0 -49
  173. package/dist/collection/lib/message-body-segments.spec.js +0 -21
  174. package/dist/collection/lib/message-dedup.spec.js +0 -17
  175. package/dist/collection/lib/mqtt/mqtt.spec.js +0 -39
  176. package/dist/collection/utils/utils.spec.js +0 -15
  177. package/dist/esm/chat-assets-95633770.js +0 -86
  178. package/dist/esm/chat-assets-95633770.js.map +0 -1
  179. package/dist/isometrik-webchat/assets/ExcelDocument.js +0 -2
  180. package/dist/isometrik-webchat/assets/IsometrikLogo.js +0 -38
  181. package/dist/isometrik-webchat/assets/Moon.svg +0 -1
  182. package/dist/isometrik-webchat/assets/New-Chat.svg +0 -5
  183. package/dist/isometrik-webchat/assets/NoChatPlaceholder.js +0 -16
  184. package/dist/isometrik-webchat/assets/NoContactsPlaceholder.js +0 -9
  185. package/dist/isometrik-webchat/assets/NoMessagePlaceholder.svg +0 -13
  186. package/dist/isometrik-webchat/assets/PdfDocument.js +0 -2
  187. package/dist/isometrik-webchat/assets/ProfilePlaceholder.js +0 -1
  188. package/dist/isometrik-webchat/assets/SelectChatPlaceholder.js +0 -13
  189. package/dist/isometrik-webchat/assets/Sun.svg +0 -1
  190. package/dist/isometrik-webchat/assets/add-user.svg +0 -6
  191. package/dist/isometrik-webchat/assets/attachment.svg +0 -4
  192. package/dist/isometrik-webchat/assets/avatar.svg +0 -1
  193. package/dist/isometrik-webchat/assets/block-user.svg +0 -4
  194. package/dist/isometrik-webchat/assets/camera-add.svg +0 -4
  195. package/dist/isometrik-webchat/assets/camera.svg +0 -17
  196. package/dist/isometrik-webchat/assets/cancel.svg +0 -12
  197. package/dist/isometrik-webchat/assets/chatBG.png +0 -0
  198. package/dist/isometrik-webchat/assets/chatdefaultbg.svg +0 -6140
  199. package/dist/isometrik-webchat/assets/clear-chat.svg +0 -4
  200. package/dist/isometrik-webchat/assets/close.svg +0 -4
  201. package/dist/isometrik-webchat/assets/dark-theme.svg +0 -12
  202. package/dist/isometrik-webchat/assets/delete.svg +0 -8
  203. package/dist/isometrik-webchat/assets/doc.png +0 -0
  204. package/dist/isometrik-webchat/assets/documents.svg +0 -15
  205. package/dist/isometrik-webchat/assets/doublecheck.svg +0 -1
  206. package/dist/isometrik-webchat/assets/download.svg +0 -4
  207. package/dist/isometrik-webchat/assets/drop-down.svg +0 -5
  208. package/dist/isometrik-webchat/assets/edit.svg +0 -4
  209. package/dist/isometrik-webchat/assets/equalizer.svg +0 -1
  210. package/dist/isometrik-webchat/assets/excel.svg +0 -2
  211. package/dist/isometrik-webchat/assets/forward.svg +0 -4
  212. package/dist/isometrik-webchat/assets/group-cast.svg +0 -1
  213. package/dist/isometrik-webchat/assets/group.svg +0 -13
  214. package/dist/isometrik-webchat/assets/imagePlaceholder.png +0 -0
  215. package/dist/isometrik-webchat/assets/imagePlaceholder.svg +0 -2
  216. package/dist/isometrik-webchat/assets/info.svg +0 -4
  217. package/dist/isometrik-webchat/assets/left-arrow.svg +0 -4
  218. package/dist/isometrik-webchat/assets/link.svg +0 -1
  219. package/dist/isometrik-webchat/assets/login.svg +0 -3051
  220. package/dist/isometrik-webchat/assets/logout.svg +0 -5
  221. package/dist/isometrik-webchat/assets/message-outline.svg +0 -5
  222. package/dist/isometrik-webchat/assets/message.svg +0 -1
  223. package/dist/isometrik-webchat/assets/microphone.svg +0 -2
  224. package/dist/isometrik-webchat/assets/new_group.svg +0 -9
  225. package/dist/isometrik-webchat/assets/odt-file.png +0 -0
  226. package/dist/isometrik-webchat/assets/onboarding.webp +0 -0
  227. package/dist/isometrik-webchat/assets/paper.svg +0 -5
  228. package/dist/isometrik-webchat/assets/pause.svg +0 -4
  229. package/dist/isometrik-webchat/assets/pdf.svg +0 -11
  230. package/dist/isometrik-webchat/assets/photos.svg +0 -4
  231. package/dist/isometrik-webchat/assets/play.svg +0 -19
  232. package/dist/isometrik-webchat/assets/profilePlaceholderImage.png +0 -0
  233. package/dist/isometrik-webchat/assets/reply.svg +0 -4
  234. package/dist/isometrik-webchat/assets/rtf.png +0 -0
  235. package/dist/isometrik-webchat/assets/search.svg +0 -4
  236. package/dist/isometrik-webchat/assets/send.svg +0 -4
  237. package/dist/isometrik-webchat/assets/singlecheck.svg +0 -1
  238. package/dist/isometrik-webchat/assets/smile.svg +0 -2
  239. package/dist/isometrik-webchat/assets/three-dots.svg +0 -5
  240. package/dist/isometrik-webchat/assets/txt.png +0 -0
  241. package/dist/isometrik-webchat/assets/videoPlaceholder.svg +0 -4
  242. package/dist/isometrik-webchat/assets/videoThumbnail.svg +0 -1
  243. package/dist/isometrik-webchat/p-4bad6da9.entry.js +0 -2
  244. package/dist/isometrik-webchat/p-4bad6da9.entry.js.map +0 -1
  245. package/dist/isometrik-webchat/p-8c73a5d5.entry.js +0 -2
  246. package/dist/isometrik-webchat/p-8c73a5d5.entry.js.map +0 -1
  247. package/dist/isometrik-webchat/p-d6f0838c.js +0 -2
  248. package/dist/isometrik-webchat/p-d6f0838c.js.map +0 -1
  249. /package/dist/isometrik-webchat/{p-188b2631.entry.js.map → p-0085b397.entry.js.map} +0 -0
  250. /package/dist/isometrik-webchat/{p-ab5e1e85.entry.js.map → p-1ad1127f.entry.js.map} +0 -0
  251. /package/dist/isometrik-webchat/{p-b44f0bd1.entry.js.map → p-6ec350aa.entry.js.map} +0 -0
  252. /package/dist/isometrik-webchat/{p-e589ff24.entry.js.map → p-71cc96a3.entry.js.map} +0 -0
  253. /package/dist/isometrik-webchat/{p-ff8f6bd2.entry.js.map → p-b8cef5e4.entry.js.map} +0 -0
@@ -1,70 +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 boot loader — fills the viewport and centers status + bar. */
9
- let ChatLoadingPlaceholder = class ChatLoadingPlaceholder {
10
- constructor() {
11
- this.progress = 0;
12
- this.loadingStatus = 'Loading…';
13
- }
14
- render() {
15
- const pct = Math.max(0, Math.min(100, Number(this.progress) || 0));
16
- return (h("div", { class: "box" },
17
- h("div", { class: "status" }, this.loadingStatus),
18
- h("div", { class: "bar" },
19
- h("div", { class: "fill", style: { width: `${pct}%` } }))));
20
- }
21
- };
22
- __decorate([
23
- Prop()
24
- ], ChatLoadingPlaceholder.prototype, "progress", void 0);
25
- __decorate([
26
- Prop()
27
- ], ChatLoadingPlaceholder.prototype, "loadingStatus", void 0);
28
- ChatLoadingPlaceholder = __decorate([
29
- Component({
30
- tag: 'chat-loading-placeholder',
31
- shadow: true,
32
- styles: `
33
- :host {
34
- display: flex;
35
- box-sizing: border-box;
36
- width: 100%;
37
- min-height: 100dvh;
38
- height: 100%;
39
- align-items: center;
40
- justify-content: center;
41
- background: var(--bg-secondary-color, #f5f5f5);
42
- color: var(--text-primary-color, #222);
43
- }
44
- .box {
45
- display: flex;
46
- flex-direction: column;
47
- gap: 12px;
48
- align-items: center;
49
- min-width: 220px;
50
- max-width: 320px;
51
- width: min(320px, 80vw);
52
- padding: 24px;
53
- }
54
- .bar {
55
- width: 100%;
56
- height: 6px;
57
- border-radius: 999px;
58
- background: var(--bg-primary-color, #e8e8e8);
59
- overflow: hidden;
60
- }
61
- .fill {
62
- height: 100%;
63
- background: var(--bg-primary-light, #9aa7d5);
64
- transition: width 0.2s ease;
65
- }
66
- .status { font-size: 13px; opacity: 0.8; text-align: center; }
67
- `,
68
- })
69
- ], ChatLoadingPlaceholder);
70
- export { ChatLoadingPlaceholder };
@@ -1,51 +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 ConfirmDialog = class ConfirmDialog {
9
- constructor() {
10
- this.dialogData = {};
11
- this.isMobile = false;
12
- }
13
- render() {
14
- const d = this.dialogData || {};
15
- return (h("div", { class: "dialog" },
16
- h("h2", null, d.title),
17
- d.description1 ? h("p", null, d.description1) : null,
18
- h("p", null, d.description),
19
- h("div", { class: "actions" },
20
- h("button", { type: "button", class: "confirm", onClick: () => { var _a; return (_a = d.handleConfirm) === null || _a === void 0 ? void 0 : _a.call(d); } }, d.yesText || 'Yes'),
21
- h("button", { type: "button", class: "cancel", onClick: () => { var _a, _b; return ((_a = d.handleCancel) === null || _a === void 0 ? void 0 : _a.call(d)) || ((_b = this.onClose) === null || _b === void 0 ? void 0 : _b.call(this)); } }, d.noText || 'No'))));
22
- }
23
- };
24
- __decorate([
25
- Prop()
26
- ], ConfirmDialog.prototype, "dialogData", void 0);
27
- __decorate([
28
- Prop()
29
- ], ConfirmDialog.prototype, "onClose", void 0);
30
- __decorate([
31
- Prop()
32
- ], ConfirmDialog.prototype, "isMobile", void 0);
33
- ConfirmDialog = __decorate([
34
- Component({
35
- tag: 'confirm-dialog',
36
- shadow: true,
37
- styles: `
38
- :host { display: block; width: 100%; }
39
- .dialog { width: 100%; text-align: center; }
40
- h2 { margin: 0 0 16px; font-size: 1.25rem; color: var(--text-primary-color); text-transform: capitalize; }
41
- p { margin: 0 0 16px; color: #666; }
42
- .actions { display: flex; justify-content: center; gap: 16px; }
43
- button {
44
- flex: 1; padding: 12px; border: none; border-radius: 20px; cursor: pointer; font-weight: 500;
45
- }
46
- .confirm { background: var(--base-color); color: var(--bg-incoming-message, #fff); }
47
- .cancel { background: var(--bg-primary-color); border: 2px solid var(--base-color); color: var(--base-color); }
48
- `,
49
- })
50
- ], ConfirmDialog);
51
- export { ConfirmDialog };
@@ -1,255 +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 { generateProfileImageByInitials } from '../../../lib/helpers';
9
- const shellStyles = `
10
- :host { display: block; height: 100%; }
11
- .panel {
12
- display: flex; flex-direction: column; height: 100%; box-sizing: border-box;
13
- background: var(--bg-primary-color); color: var(--text-primary-color); padding: 12px; gap: 12px;
14
- }
15
- .header { display: flex; align-items: center; gap: 10px; }
16
- .close-btn { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 20px; color: inherit; }
17
- .hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 0; }
18
- .avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--bg-primary-light); }
19
- .name { font-size: 20px; font-weight: 600; }
20
- .email { font-size: 13px; opacity: 0.7; }
21
- .section { border-top: 1px solid var(--bg-secondary-color); padding-top: 12px; }
22
- .section h4 { margin: 0 0 8px; font-size: 13px; opacity: 0.75; text-transform: uppercase; }
23
- .row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
24
- .member-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--bg-primary-light); }
25
- .actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
26
- .actions button {
27
- padding: 10px 12px; border-radius: 8px; border: 1px solid var(--bg-secondary-color);
28
- background: var(--bg-secondary-color); color: inherit; cursor: pointer; text-align: left;
29
- }
30
- .actions button.danger { color: var(--text-danger-color); }
31
- .media-count { cursor: pointer; opacity: 0.85; }
32
- `;
33
- let ContactInfo = class ContactInfo {
34
- constructor() {
35
- this.groupMembers = [];
36
- this.allAttachments = [];
37
- }
38
- close() {
39
- if (typeof this.closeContactInfo === 'function')
40
- this.closeContactInfo();
41
- }
42
- action(key) {
43
- var _a, _b;
44
- const fn = ((_a = this.messageAction) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = this.messageAction) === null || _b === void 0 ? void 0 : _b[key.replace(/([A-Z])/g, '_$1').toLowerCase()]);
45
- if (typeof this.messageAction === 'function')
46
- this.messageAction(key);
47
- else if (typeof fn === 'function')
48
- fn();
49
- }
50
- render() {
51
- const members = this.isGroupcast ? this.groupcastMembers || [] : this.groupMembers || [];
52
- const mediaCount = (this.allAttachments || []).length;
53
- const avatar = this.contactImage || generateProfileImageByInitials(this.contactName || '?', 96, 96);
54
- return (h("div", { class: "panel", style: {
55
- padding: this.padding,
56
- margin: this.margin,
57
- width: this.width,
58
- height: this.height,
59
- boxShadow: this.boxShadow,
60
- borderRadius: this.borderRadius,
61
- backgroundColor: this.backgroundColor,
62
- color: this.textColor,
63
- fontFamily: this.fontFamily,
64
- fontSize: this.fontSize,
65
- } },
66
- h("div", { class: "header" },
67
- h("strong", null, this.isGroup || this.isGroupcast ? 'Group info' : 'Contact info'),
68
- h("button", { class: "close-btn", type: "button", onClick: () => this.close() }, "\u2715")),
69
- h("div", { class: "hero" },
70
- h("img", { class: "avatar", src: avatar, alt: "" }),
71
- h("div", { class: "name" }, this.contactName || 'Unknown'),
72
- this.contactEmail ? h("div", { class: "email" }, this.contactEmail) : null),
73
- h("div", { class: "section" },
74
- h("h4", null, "Media"),
75
- h("div", { class: "media-count" },
76
- mediaCount,
77
- " items",
78
- this.allLinksCount ? ` · ${this.allLinksCount} links` : '')),
79
- (this.isGroup || this.isGroupcast) && members.length > 0 ? (h("div", { class: "section" },
80
- h("h4", null,
81
- "Members (",
82
- members.length,
83
- ")"),
84
- members.slice(0, 8).map((m) => { var _a; return (h("div", { class: "row" },
85
- h("img", { class: "member-avatar", src: m.userProfileImageUrl || generateProfileImageByInitials(m.userName || '?', 32, 32), alt: "" }),
86
- h("span", null, m.userId === ((_a = this.userMetaData) === null || _a === void 0 ? void 0 : _a.userId) ? 'You' : m.userName))); }))) : null,
87
- h("div", { class: "actions" },
88
- this.isBlocked ? (h("button", { type: "button", onClick: () => this.action('unblock') }, "Unblock")) : null,
89
- h("button", { class: "danger", type: "button", onClick: () => this.action('clearChat') }, "Clear chat"))));
90
- }
91
- };
92
- __decorate([
93
- Prop()
94
- ], ContactInfo.prototype, "padding", void 0);
95
- __decorate([
96
- Prop()
97
- ], ContactInfo.prototype, "margin", void 0);
98
- __decorate([
99
- Prop()
100
- ], ContactInfo.prototype, "width", void 0);
101
- __decorate([
102
- Prop()
103
- ], ContactInfo.prototype, "boxShadow", void 0);
104
- __decorate([
105
- Prop()
106
- ], ContactInfo.prototype, "height", void 0);
107
- __decorate([
108
- Prop()
109
- ], ContactInfo.prototype, "borderRadius", void 0);
110
- __decorate([
111
- Prop()
112
- ], ContactInfo.prototype, "borderWidth", void 0);
113
- __decorate([
114
- Prop()
115
- ], ContactInfo.prototype, "borderColor", void 0);
116
- __decorate([
117
- Prop()
118
- ], ContactInfo.prototype, "borderStyle", void 0);
119
- __decorate([
120
- Prop()
121
- ], ContactInfo.prototype, "backgroundColor", void 0);
122
- __decorate([
123
- Prop()
124
- ], ContactInfo.prototype, "textColor", void 0);
125
- __decorate([
126
- Prop()
127
- ], ContactInfo.prototype, "fontSize", void 0);
128
- __decorate([
129
- Prop()
130
- ], ContactInfo.prototype, "fontWeight", void 0);
131
- __decorate([
132
- Prop()
133
- ], ContactInfo.prototype, "fontFamily", void 0);
134
- __decorate([
135
- Prop()
136
- ], ContactInfo.prototype, "fontStyle", void 0);
137
- __decorate([
138
- Prop()
139
- ], ContactInfo.prototype, "lineHeight", void 0);
140
- __decorate([
141
- Prop()
142
- ], ContactInfo.prototype, "textAlign", void 0);
143
- __decorate([
144
- Prop()
145
- ], ContactInfo.prototype, "contactImage", void 0);
146
- __decorate([
147
- Prop()
148
- ], ContactInfo.prototype, "contactName", void 0);
149
- __decorate([
150
- Prop()
151
- ], ContactInfo.prototype, "contactEmail", void 0);
152
- __decorate([
153
- Prop()
154
- ], ContactInfo.prototype, "messageAction", void 0);
155
- __decorate([
156
- Prop()
157
- ], ContactInfo.prototype, "groupMembers", void 0);
158
- __decorate([
159
- Prop()
160
- ], ContactInfo.prototype, "allAttachments", void 0);
161
- __decorate([
162
- Prop()
163
- ], ContactInfo.prototype, "isGroup", void 0);
164
- __decorate([
165
- Prop()
166
- ], ContactInfo.prototype, "showAllMembers", void 0);
167
- __decorate([
168
- Prop()
169
- ], ContactInfo.prototype, "isPopupOpen", void 0);
170
- __decorate([
171
- Prop()
172
- ], ContactInfo.prototype, "showMediaList", void 0);
173
- __decorate([
174
- Prop()
175
- ], ContactInfo.prototype, "isImageFullscreen", void 0);
176
- __decorate([
177
- Prop()
178
- ], ContactInfo.prototype, "showConfirmationPopup", void 0);
179
- __decorate([
180
- Prop()
181
- ], ContactInfo.prototype, "confirmationAction", void 0);
182
- __decorate([
183
- Prop()
184
- ], ContactInfo.prototype, "conversationId", void 0);
185
- __decorate([
186
- Prop()
187
- ], ContactInfo.prototype, "oppenentId", void 0);
188
- __decorate([
189
- Prop()
190
- ], ContactInfo.prototype, "userMetaData", void 0);
191
- __decorate([
192
- Prop()
193
- ], ContactInfo.prototype, "onEditTitle", void 0);
194
- __decorate([
195
- Prop()
196
- ], ContactInfo.prototype, "onEditImage", void 0);
197
- __decorate([
198
- Prop()
199
- ], ContactInfo.prototype, "openOwnProfile", void 0);
200
- __decorate([
201
- Prop()
202
- ], ContactInfo.prototype, "editedName", void 0);
203
- __decorate([
204
- Prop()
205
- ], ContactInfo.prototype, "eligibleMembers", void 0);
206
- __decorate([
207
- Prop()
208
- ], ContactInfo.prototype, "isEligibleMembersPopupOpen", void 0);
209
- __decorate([
210
- Prop()
211
- ], ContactInfo.prototype, "hasMoreEligibleMembers", void 0);
212
- __decorate([
213
- Prop()
214
- ], ContactInfo.prototype, "isLoadingMembers", void 0);
215
- __decorate([
216
- Prop()
217
- ], ContactInfo.prototype, "activeTab", void 0);
218
- __decorate([
219
- Prop()
220
- ], ContactInfo.prototype, "docsAttachments", void 0);
221
- __decorate([
222
- Prop()
223
- ], ContactInfo.prototype, "linksAttachments", void 0);
224
- __decorate([
225
- Prop()
226
- ], ContactInfo.prototype, "allLinks", void 0);
227
- __decorate([
228
- Prop()
229
- ], ContactInfo.prototype, "allLinksCount", void 0);
230
- __decorate([
231
- Prop()
232
- ], ContactInfo.prototype, "isBlocked", void 0);
233
- __decorate([
234
- Prop()
235
- ], ContactInfo.prototype, "conversationMetaData", void 0);
236
- __decorate([
237
- Prop()
238
- ], ContactInfo.prototype, "isGroupcast", void 0);
239
- __decorate([
240
- Prop()
241
- ], ContactInfo.prototype, "groupcastId", void 0);
242
- __decorate([
243
- Prop()
244
- ], ContactInfo.prototype, "groupcastMembers", void 0);
245
- __decorate([
246
- Prop()
247
- ], ContactInfo.prototype, "closeContactInfo", void 0);
248
- ContactInfo = __decorate([
249
- Component({
250
- tag: 'contact-info',
251
- shadow: true,
252
- styles: shellStyles,
253
- })
254
- ], ContactInfo);
255
- export { ContactInfo };
@@ -1,112 +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, Element, Prop, h, Event, Listen } from '@stencil/core';
8
- import { getCustomPartTag } from '../../../lib/custom-ui';
9
- let ContextMenu = class ContextMenu {
10
- constructor() {
11
- this.x = 0;
12
- this.y = 0;
13
- this.isOpen = false;
14
- this.menuItems = [];
15
- }
16
- handleOutsideClick(e) {
17
- if (!this.isOpen)
18
- return;
19
- if (!this.el.contains(e.target))
20
- this.close();
21
- }
22
- close() {
23
- this.isOpen = false;
24
- this.menuClosed.emit();
25
- if (typeof this.onMenuClosed === 'function')
26
- this.onMenuClosed();
27
- }
28
- selectItem(item) {
29
- this.menuItemSelected.emit(item);
30
- if (typeof this.onMenuItemSelected === 'function')
31
- this.onMenuItemSelected({ detail: item });
32
- this.close();
33
- }
34
- render() {
35
- const tag = getCustomPartTag('contextMenu', this.el);
36
- if (tag) {
37
- return h(tag, {
38
- x: this.x,
39
- y: this.y,
40
- isOpen: this.isOpen,
41
- menuItems: this.menuItems,
42
- onMenuItemSelected: this.onMenuItemSelected,
43
- onMenuClosed: this.onMenuClosed,
44
- });
45
- }
46
- if (!this.isOpen)
47
- return null;
48
- return (h("div", { class: "context-menu", style: { left: `${this.x}px`, top: `${this.y}px` }, onClick: e => e.stopPropagation() }, (this.menuItems || []).map(item => (h("div", { class: `menu-item ${item.type || ''}`, onClick: () => this.selectItem(item) },
49
- item.icon ? h("span", { class: "icon" }, item.icon) : null,
50
- item.label)))));
51
- }
52
- };
53
- __decorate([
54
- Element()
55
- ], ContextMenu.prototype, "el", void 0);
56
- __decorate([
57
- Prop()
58
- ], ContextMenu.prototype, "x", void 0);
59
- __decorate([
60
- Prop()
61
- ], ContextMenu.prototype, "y", void 0);
62
- __decorate([
63
- Prop()
64
- ], ContextMenu.prototype, "isOpen", void 0);
65
- __decorate([
66
- Prop()
67
- ], ContextMenu.prototype, "menuItems", void 0);
68
- __decorate([
69
- Prop()
70
- ], ContextMenu.prototype, "onMenuItemSelected", void 0);
71
- __decorate([
72
- Prop()
73
- ], ContextMenu.prototype, "onMenuClosed", void 0);
74
- __decorate([
75
- Event({ eventName: 'menu-item-selected', bubbles: true, composed: true })
76
- ], ContextMenu.prototype, "menuItemSelected", void 0);
77
- __decorate([
78
- Event({ eventName: 'menu-closed', bubbles: true, composed: true })
79
- ], ContextMenu.prototype, "menuClosed", void 0);
80
- __decorate([
81
- Listen('click', { target: 'document' })
82
- ], ContextMenu.prototype, "handleOutsideClick", null);
83
- ContextMenu = __decorate([
84
- Component({
85
- tag: 'context-menu',
86
- shadow: true,
87
- styles: `
88
- :host { display: contents; }
89
- .context-menu {
90
- position: fixed;
91
- background: var(--bg-primary-color, #fff);
92
- border: 1px solid var(--bg-grey-color, #ccc);
93
- border-radius: 4px;
94
- box-shadow: 0 2px 5px rgba(0,0,0,0.2);
95
- padding: 8px 0;
96
- min-width: 150px;
97
- z-index: 1000;
98
- color: var(--text-primary-color, #333);
99
- }
100
- .menu-item {
101
- padding: 8px 16px;
102
- cursor: pointer;
103
- display: flex;
104
- align-items: center;
105
- gap: 8px;
106
- }
107
- .menu-item:hover { background: var(--bg-secondary-color, #f5f5f5); }
108
- .menu-item.danger { color: var(--text-danger-color, #dc3545); }
109
- `,
110
- })
111
- ], ContextMenu);
112
- export { ContextMenu };
@@ -1,49 +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 DeleteMessageDialog = class DeleteMessageDialog {
9
- constructor() {
10
- this.dialogData = {};
11
- this.isMobile = false;
12
- }
13
- render() {
14
- const d = this.dialogData || {};
15
- return (h("div", { class: "dialog" },
16
- h("h2", null, d.title || 'Delete message?'),
17
- h("div", { class: "actions" },
18
- h("button", { type: "button", onClick: () => { var _a; return (_a = d.deleteMessageForSelf) === null || _a === void 0 ? void 0 : _a.call(d); } }, "Delete for me"),
19
- d.isSelf ? (h("button", { type: "button", class: "danger", onClick: () => { var _a; return (_a = d.deleteMessageForEveryone) === null || _a === void 0 ? void 0 : _a.call(d); } }, "Delete for everyone")) : null,
20
- h("button", { type: "button", onClick: () => { var _a; return (_a = this.onClose) === null || _a === void 0 ? void 0 : _a.call(this); } }, "Cancel"))));
21
- }
22
- };
23
- __decorate([
24
- Prop()
25
- ], DeleteMessageDialog.prototype, "dialogData", void 0);
26
- __decorate([
27
- Prop()
28
- ], DeleteMessageDialog.prototype, "onClose", void 0);
29
- __decorate([
30
- Prop()
31
- ], DeleteMessageDialog.prototype, "isMobile", void 0);
32
- DeleteMessageDialog = __decorate([
33
- Component({
34
- tag: 'delete-message',
35
- shadow: true,
36
- styles: `
37
- :host { display: block; width: 100%; }
38
- .dialog { width: 100%; text-align: center; }
39
- h2 { margin: 0 0 16px; font-size: 1.25rem; color: var(--text-primary-color); }
40
- .actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; padding: 16px; }
41
- button {
42
- background: var(--bg-primary-light); color: var(--text-primary-color);
43
- border: none; padding: 10px 20px; font-size: 14px; border-radius: 20px; cursor: pointer; width: fit-content;
44
- }
45
- .danger { color: var(--text-danger-color, #c00); }
46
- `,
47
- })
48
- ], DeleteMessageDialog);
49
- export { DeleteMessageDialog };