isometrik-plugin-chat-sdk 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/cjs/{app-globals-61a8bfde.js → app-globals-dba84d07.js} +4 -4
  2. package/dist/cjs/{app-globals-61a8bfde.js.map → app-globals-dba84d07.js.map} +1 -1
  3. package/dist/cjs/attachment-preview_22.cjs.entry.js +65 -53
  4. package/dist/cjs/attachment-preview_22.cjs.entry.js.map +1 -1
  5. package/dist/cjs/{send-media-14908d4b.js → groupcast-5e3d49c4.js} +1 -127
  6. package/dist/cjs/groupcast-5e3d49c4.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +9 -9
  8. package/dist/cjs/isometrik-webchat.cjs.js +4 -4
  9. package/dist/cjs/loader.cjs.js +4 -4
  10. package/dist/cjs/login-page_3.cjs.entry.js +43 -42
  11. package/dist/cjs/login-page_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/{runtime-controls-201c71ba.js → runtime-controls-b5a3836e.js} +21 -21
  13. package/dist/cjs/{runtime-controls-201c71ba.js.map → runtime-controls-b5a3836e.js.map} +1 -1
  14. package/dist/cjs/send-media-2c02bba7.js +319 -0
  15. package/dist/cjs/send-media-2c02bba7.js.map +1 -0
  16. package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js +25 -17
  17. package/dist/collection/components/ChatUIComponent/ChatSidebar/ChatSidebar.js.map +1 -1
  18. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js +15 -16
  19. package/dist/collection/components/ChatUIComponent/Footer/ChatFooter.js.map +1 -1
  20. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js +9 -6
  21. package/dist/collection/components/ChatUIComponent/WebChatBody/WebChatBody.js.map +1 -1
  22. package/dist/collection/components/ChatUIComponent/shared/message-info/message-info.js +6 -2
  23. package/dist/collection/components/ChatUIComponent/shared/message-info/message-info.js.map +1 -1
  24. package/dist/collection/components/my-component/web-chat/offline-host.js +7 -6
  25. package/dist/collection/components/my-component/web-chat/offline-host.js.map +1 -1
  26. package/dist/collection/components/my-component/web-chat/public-send.js +3 -3
  27. package/dist/collection/components/my-component/web-chat/public-send.js.map +1 -1
  28. package/dist/collection/lib/chat/index.js +1 -1
  29. package/dist/collection/lib/chat/index.js.map +1 -1
  30. package/dist/collection/lib/chat/send-media.js +30 -5
  31. package/dist/collection/lib/chat/send-media.js.map +1 -1
  32. package/dist/components/ChatFooter.js +15 -16
  33. package/dist/components/ChatFooter.js.map +1 -1
  34. package/dist/components/ChatSidebar.js +25 -17
  35. package/dist/components/ChatSidebar.js.map +1 -1
  36. package/dist/components/WebChat.js +10 -8
  37. package/dist/components/WebChat.js.map +1 -1
  38. package/dist/components/WebChatBody.js +9 -6
  39. package/dist/components/WebChatBody.js.map +1 -1
  40. package/dist/components/client.js +1 -121
  41. package/dist/components/client.js.map +1 -1
  42. package/dist/components/index.js +3 -2
  43. package/dist/components/index.js.map +1 -1
  44. package/dist/components/message-info2.js +6 -2
  45. package/dist/components/message-info2.js.map +1 -1
  46. package/dist/components/send-media.js +150 -0
  47. package/dist/components/send-media.js.map +1 -0
  48. package/dist/esm/{app-globals-2beecb81.js → app-globals-8fea092d.js} +3 -3
  49. package/dist/esm/{app-globals-2beecb81.js.map → app-globals-8fea092d.js.map} +1 -1
  50. package/dist/esm/attachment-preview_22.entry.js +54 -42
  51. package/dist/esm/attachment-preview_22.entry.js.map +1 -1
  52. package/dist/esm/{send-media-917dcc2f.js → groupcast-58a59d64.js} +2 -122
  53. package/dist/esm/groupcast-58a59d64.js.map +1 -0
  54. package/dist/esm/index.js +4 -4
  55. package/dist/esm/isometrik-webchat.js +4 -4
  56. package/dist/esm/loader.js +4 -4
  57. package/dist/esm/login-page_3.entry.js +10 -9
  58. package/dist/esm/login-page_3.entry.js.map +1 -1
  59. package/dist/esm/{runtime-controls-cf599fe2.js → runtime-controls-c5ba5009.js} +3 -3
  60. package/dist/esm/{runtime-controls-cf599fe2.js.map → runtime-controls-c5ba5009.js.map} +1 -1
  61. package/dist/esm/send-media-588837c7.js +296 -0
  62. package/dist/esm/send-media-588837c7.js.map +1 -0
  63. package/dist/isometrik-webchat/index.esm.js +1 -1
  64. package/dist/isometrik-webchat/isometrik-webchat.esm.js +1 -1
  65. package/dist/isometrik-webchat/p-1953573d.js +2 -0
  66. package/dist/isometrik-webchat/p-1953573d.js.map +1 -0
  67. package/dist/isometrik-webchat/p-1a6e6524.js +2 -0
  68. package/dist/isometrik-webchat/p-1a6e6524.js.map +1 -0
  69. package/dist/isometrik-webchat/p-70f66001.js +2 -0
  70. package/dist/isometrik-webchat/{p-0731d488.js.map → p-70f66001.js.map} +1 -1
  71. package/dist/isometrik-webchat/p-8816acc1.js +2 -0
  72. package/dist/isometrik-webchat/p-92eec03b.entry.js +2 -0
  73. package/dist/isometrik-webchat/p-92eec03b.entry.js.map +1 -0
  74. package/dist/isometrik-webchat/p-b16c3db0.entry.js +2 -0
  75. package/dist/isometrik-webchat/p-b16c3db0.entry.js.map +1 -0
  76. package/dist/types/components/ChatUIComponent/Footer/ChatFooter.d.ts +2 -22
  77. package/dist/types/lib/chat/index.d.ts +1 -1
  78. package/dist/types/lib/chat/send-media.d.ts +8 -0
  79. package/package.json +2 -1
  80. package/dist/cjs/media-limits-eba42629.js +0 -165
  81. package/dist/cjs/media-limits-eba42629.js.map +0 -1
  82. package/dist/cjs/send-media-14908d4b.js.map +0 -1
  83. package/dist/esm/media-limits-3fa07c09.js +0 -152
  84. package/dist/esm/media-limits-3fa07c09.js.map +0 -1
  85. package/dist/esm/send-media-917dcc2f.js.map +0 -1
  86. package/dist/isometrik-webchat/p-0731d488.js +0 -2
  87. package/dist/isometrik-webchat/p-7d4cc4e3.entry.js +0 -2
  88. package/dist/isometrik-webchat/p-7d4cc4e3.entry.js.map +0 -1
  89. package/dist/isometrik-webchat/p-7f415f28.js +0 -2
  90. package/dist/isometrik-webchat/p-bdcdf1c5.js +0 -2
  91. package/dist/isometrik-webchat/p-bdcdf1c5.js.map +0 -1
  92. package/dist/isometrik-webchat/p-dc2bf17e.entry.js +0 -2
  93. package/dist/isometrik-webchat/p-dc2bf17e.entry.js.map +0 -1
  94. package/dist/isometrik-webchat/p-eb54f75d.js +0 -2
  95. package/dist/isometrik-webchat/p-eb54f75d.js.map +0 -1
  96. /package/dist/isometrik-webchat/{p-7f415f28.js.map → p-8816acc1.js.map} +0 -0
@@ -16,6 +16,7 @@ import { T as Three_Dots, q as Info, R as Reply, F as Forward, D as Delete } fro
16
16
  import { d as defineCustomElement$4 } from './profile-avatar2.js';
17
17
  import { p as postReaction, d as deleteReaction } from './message-reaction.js';
18
18
  import { d as deriveMessageStatus } from './contracts.js';
19
+ import { e as attachmentCaption } from './send-media.js';
19
20
  import { d as defineCustomElement$c } from './AudioBubble.js';
20
21
  import { d as drawerDialogService } from './drawer.js';
21
22
  import { f as getGroupcastMessageReadStatus, h as getGroupcastMessageDeliveryStatus, i as deleteGroupcastMessageSelf, j as deleteGroupcastMessageEveryone } from './groupcast.js';
@@ -385,6 +386,8 @@ const WebChatBody = /*@__PURE__*/ proxyCustomElement(class WebChatBody extends H
385
386
  };
386
387
  this.renderAttachmentMessage = (message, isSelf) => {
387
388
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
389
+ // Caption from metaData.caption (Flutter/Swift); never show AttachmentMessage:* body placeholders
390
+ const caption = attachmentCaption(message);
388
391
  // Common props for all message types
389
392
  const commonOutgoingProps = {
390
393
  time: message === null || message === void 0 ? void 0 : message.sentAt,
@@ -394,7 +397,7 @@ const WebChatBody = /*@__PURE__*/ proxyCustomElement(class WebChatBody extends H
394
397
  deliveryStatus: (message === null || message === void 0 ? void 0 : message.deliveryStatus) || '',
395
398
  textColor: 'var(--text-outgoing-message)',
396
399
  timeColor: 'var(--text-outgoing-time)',
397
- message: message === null || message === void 0 ? void 0 : message.body,
400
+ message: caption,
398
401
  mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers,
399
402
  bgColor: 'var(--bg-outgoing-message)',
400
403
  borderRadius: '6px 6px 0 6px',
@@ -405,7 +408,7 @@ const WebChatBody = /*@__PURE__*/ proxyCustomElement(class WebChatBody extends H
405
408
  isSelf: isSelf,
406
409
  textColor: 'var(--text-incoming-message)',
407
410
  timeColor: 'var(--text-incoming-time)',
408
- message: message === null || message === void 0 ? void 0 : message.body,
411
+ message: caption,
409
412
  mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers,
410
413
  bgColor: 'var(--bg-incoming-message)',
411
414
  borderRadius: '6px 6px 6px 0',
@@ -829,7 +832,7 @@ const WebChatBody = /*@__PURE__*/ proxyCustomElement(class WebChatBody extends H
829
832
  var _a, _b, _c, _d, _e, _f, _g, _h;
830
833
  const currentConversation = (_a = this.conversationList) === null || _a === void 0 ? void 0 : _a.find(conversation => (conversation === null || conversation === void 0 ? void 0 : conversation.conversationId) === this.selectedConversationId);
831
834
  const shouldShowPlaceholder = ((_b = this.allMessages) === null || _b === void 0 ? void 0 : _b.length) === 1 && ((_d = (_c = this.allMessages) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.action) !== 'clearConversation' && ((_e = this.allMessages) === null || _e === void 0 ? void 0 : _e.some(message => (message === null || message === void 0 ? void 0 : message.action) === 'clearConversation'));
832
- return (h("div", { key: '41349e4779d95a79ef70c03dfae5cb49a2b45414', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, this.showScrollButton || this.newMessageNotification && (h("div", { key: '961f05e545a0e143777387b0e47e4600641873c7', onClick: this.scrollToBottom, style: {
835
+ return (h("div", { key: 'fcb897b1540131642caba826fe6551d06a7ac9c9', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, this.showScrollButton || this.newMessageNotification && (h("div", { key: '1232ce848507a42e5dbd73708f57b10966511f6c', onClick: this.scrollToBottom, style: {
833
836
  position: 'sticky',
834
837
  top: '90%',
835
838
  left: '95%',
@@ -843,7 +846,7 @@ const WebChatBody = /*@__PURE__*/ proxyCustomElement(class WebChatBody extends H
843
846
  cursor: 'pointer',
844
847
  boxShadow: '0 2px 5px rgba(0,0,0,0.2)',
845
848
  zIndex: '100',
846
- } }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: '5c19e65015c475122cebb6c534acefead6b34d42', style: {
849
+ } }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: 'f37caffdf257d82abefde7490978fc107d8befb5', style: {
847
850
  position: 'absolute',
848
851
  bottom: '22px',
849
852
  right: '-2px',
@@ -857,7 +860,7 @@ const WebChatBody = /*@__PURE__*/ proxyCustomElement(class WebChatBody extends H
857
860
  justifyContent: 'center',
858
861
  fontSize: '12px',
859
862
  padding: '0 4px',
860
- } })), h("svg", { key: '5b5ebe5fd78b4edeb07af288de25ef448c80c8da', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'cdadce78ef4ea10c889e7e9dfe1af479c96e3928', d: "M12 5V19M12 19L19 12M12 19L5 12", stroke: "var(--text-primary-color)", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), shouldShowPlaceholder && (h("div", { key: '179cc7c4014f96666cb435fa8367259df8a3cdbd', style: {
863
+ } })), h("svg", { key: '07567e171c2f415dab0e3c87b1e42cb9ae994c9d', width: "20px", height: "30px", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '919b12ffce28266d6f7a1de58876488f2b4cec59', d: "M12 5V19M12 19L19 12M12 19L5 12", stroke: "var(--text-primary-color)", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), shouldShowPlaceholder && (h("div", { key: 'dd06f9a496736731adf73db4eb68ed9bffdaf7a4', style: {
861
864
  display: 'flex',
862
865
  flexDirection: 'column',
863
866
  alignItems: 'center',
@@ -867,7 +870,7 @@ const WebChatBody = /*@__PURE__*/ proxyCustomElement(class WebChatBody extends H
867
870
  textAlign: 'center',
868
871
  color: 'var(--text-secondary-color)',
869
872
  marginTop: '20px',
870
- } }, h("img", { key: 'b5378a6691d73fc077fd4cdfddcac75e8e58fe6a', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), h("div", { key: '46d0559e27bcc19835a4302a1cc309d54e3676d2', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, h("span", { key: '6e98d5e69eb9d6bb7d02492d081d6b168551efd3', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), h("span", { key: '0bde23971bbf29e2e96aae4f6f9cd0842a665bdb', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (h("spinner-loader", { key: '202bb3f336ff309f71611c60529e589371df0eaf', height: "20px", width: "20px", spinTime: "1s", spinnerPrimaryColor: "#000", spinnerSecondaryColor: "var(--bg-grey-color)", spinnerBorderWidth: "3px" })), ((_g = this.allMessages) === null || _g === void 0 ? void 0 : _g.length) > 0 &&
873
+ } }, h("img", { key: '7a3a75d2fd64671ce5384180794169356d524d07', src: NoMessagePlaceholder, alt: "No messages", style: { width: '200px', height: '200px' } }), h("div", { key: '3cc5745e16a98a047c4633e4fc5c5b0bfcfc1b5c', style: { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px' } }, h("span", { key: 'febc50bf7352f62d97443f8518611a662712b9c3', style: { fontSize: '24px', color: 'var(--text-primary-color)' } }, "No messages"), h("span", { key: '80e42faea0eb8ea092b8499ba3d9833033de45e5', style: { fontSize: '16px', color: 'var(--text-secondary-color)' } }, "Send a \"Hi\" and make someone's day brighter!")))), this.isMessagesLoading && (h("spinner-loader", { key: '31c0a6c01075d2cc291a8f26cb59cacdf4c05f7d', height: "20px", width: "20px", spinTime: "1s", spinnerPrimaryColor: "#000", spinnerSecondaryColor: "var(--bg-grey-color)", spinnerBorderWidth: "3px" })), ((_g = this.allMessages) === null || _g === void 0 ? void 0 : _g.length) > 0 &&
871
874
  ((_h = this.userMetaData) === null || _h === void 0 ? void 0 : _h.userId) &&
872
875
  (() => {
873
876
  const total = this.allMessages.length;