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
@@ -22,6 +22,7 @@ import { Three_Dots, Reply, Forward, Info, Delete } from "../../../constants/cha
22
22
  import "../shared/profile-avatar/profile-avatar";
23
23
  import { postReaction, deleteReaction } from "../../../api/message-reaction.js";
24
24
  import { deriveMessageStatus } from "../../../lib/custom-ui/contracts";
25
+ import { attachmentCaption } from "../../../lib/chat/send-media";
25
26
  import { DEFAULT_VIRTUAL_WINDOW, computeVirtualRange, rangeAroundIndex, rangeAtBottom, } from "./virtual-window";
26
27
  import "../shared/AudioBubble/AudioBubble";
27
28
  import "../../ChatUIComponent/ReactionContainer";
@@ -319,6 +320,8 @@ class WebChatBody {
319
320
  };
320
321
  this.renderAttachmentMessage = (message, isSelf) => {
321
322
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
323
+ // Caption from metaData.caption (Flutter/Swift); never show AttachmentMessage:* body placeholders
324
+ const caption = attachmentCaption(message);
322
325
  // Common props for all message types
323
326
  const commonOutgoingProps = {
324
327
  time: message === null || message === void 0 ? void 0 : message.sentAt,
@@ -328,7 +331,7 @@ class WebChatBody {
328
331
  deliveryStatus: (message === null || message === void 0 ? void 0 : message.deliveryStatus) || '',
329
332
  textColor: 'var(--text-outgoing-message)',
330
333
  timeColor: 'var(--text-outgoing-time)',
331
- message: message === null || message === void 0 ? void 0 : message.body,
334
+ message: caption,
332
335
  mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers,
333
336
  bgColor: 'var(--bg-outgoing-message)',
334
337
  borderRadius: '6px 6px 0 6px',
@@ -339,7 +342,7 @@ class WebChatBody {
339
342
  isSelf: isSelf,
340
343
  textColor: 'var(--text-incoming-message)',
341
344
  timeColor: 'var(--text-incoming-time)',
342
- message: message === null || message === void 0 ? void 0 : message.body,
345
+ message: caption,
343
346
  mentionedUsers: message === null || message === void 0 ? void 0 : message.mentionedUsers,
344
347
  bgColor: 'var(--bg-incoming-message)',
345
348
  borderRadius: '6px 6px 6px 0',
@@ -763,7 +766,7 @@ class WebChatBody {
763
766
  var _a, _b, _c, _d, _e, _f, _g, _h;
764
767
  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);
765
768
  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'));
766
- return (h("div", { key: '41349e4779d95a79ef70c03dfae5cb49a2b45414', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, this.showScrollButton || this.newMessageNotification && (h("div", { key: '961f05e545a0e143777387b0e47e4600641873c7', onClick: this.scrollToBottom, style: {
769
+ return (h("div", { key: 'fcb897b1540131642caba826fe6551d06a7ac9c9', class: `chat-body ${this.isChatBodyUnscrollable ? 'unscrollable' : null}` }, this.showScrollButton || this.newMessageNotification && (h("div", { key: '1232ce848507a42e5dbd73708f57b10966511f6c', onClick: this.scrollToBottom, style: {
767
770
  position: 'sticky',
768
771
  top: '90%',
769
772
  left: '95%',
@@ -777,7 +780,7 @@ class WebChatBody {
777
780
  cursor: 'pointer',
778
781
  boxShadow: '0 2px 5px rgba(0,0,0,0.2)',
779
782
  zIndex: '100',
780
- } }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: '5c19e65015c475122cebb6c534acefead6b34d42', style: {
783
+ } }, ((_f = this.newMessageNotification) === null || _f === void 0 ? void 0 : _f.count) > 0 && (h("div", { key: 'f37caffdf257d82abefde7490978fc107d8befb5', style: {
781
784
  position: 'absolute',
782
785
  bottom: '22px',
783
786
  right: '-2px',
@@ -791,7 +794,7 @@ class WebChatBody {
791
794
  justifyContent: 'center',
792
795
  fontSize: '12px',
793
796
  padding: '0 4px',
794
- } })), 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: {
797
+ } })), 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: {
795
798
  display: 'flex',
796
799
  flexDirection: 'column',
797
800
  alignItems: 'center',
@@ -801,7 +804,7 @@ class WebChatBody {
801
804
  textAlign: 'center',
802
805
  color: 'var(--text-secondary-color)',
803
806
  marginTop: '20px',
804
- } }, 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 &&
807
+ } }, 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 &&
805
808
  ((_h = this.userMetaData) === null || _h === void 0 ? void 0 : _h.userId) &&
806
809
  (() => {
807
810
  const total = this.allMessages.length;