@bcc-code/vue-bcc-chat-ui 3.7.0 → 3.7.1

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.
@@ -74720,29 +74720,28 @@ async function Bit() {
74720
74720
  });
74721
74721
  }
74722
74722
  function Fp(e, t = !1, n = !1) {
74723
- var a, u, c, l, g;
74724
74723
  if (!e)
74725
74724
  return "";
74726
74725
  if (e.getDeletedAt() != null)
74727
74726
  return "(" + d.localize("MESSAGE_IS_DELETED") + ")";
74728
- let r, o, i;
74729
- switch (e.getType()) {
74730
- case d.CometChatUIKitConstants.MessageTypes.text:
74731
- return e.getText();
74732
- case "media":
74733
- return r = t ? "🖼️ " : "", o = n ? (a = e == null ? void 0 : e.getAttachment()) == null ? void 0 : a.getName() : "", i = e == null ? void 0 : e.getCaption(), r + (i || o || "Media message");
74734
- case d.CometChatUIKitConstants.MessageTypes.image:
74735
- return r = t ? "🖼️ " : "", o = n ? (u = e == null ? void 0 : e.getAttachment()) == null ? void 0 : u.getName() : "", i = e == null ? void 0 : e.getCaption(), r + (i || o || "Photo");
74736
- case d.CometChatUIKitConstants.MessageTypes.video:
74737
- return r = t ? "🎥 " : "", o = n ? (c = e == null ? void 0 : e.getAttachment()) == null ? void 0 : c.getName() : "", i = e == null ? void 0 : e.getCaption(), r + (i || o || "Video");
74738
- case d.CometChatUIKitConstants.MessageTypes.audio:
74739
- return r = t ? "🎤 " : "", o = n ? (l = e == null ? void 0 : e.getAttachment()) == null ? void 0 : l.getName() : "", r + (o || "Audio message");
74740
- case d.CometChatUIKitConstants.MessageTypes.file:
74741
- return r = t ? "📄 " : "", o = n ? (g = e == null ? void 0 : e.getAttachment()) == null ? void 0 : g.getName() : "", i = e == null ? void 0 : e.getCaption(), r + (i || o || "File");
74742
- case "custom":
74743
- default:
74744
- return (e == null ? void 0 : e.getCaption()) || "Custom message";
74745
- }
74727
+ if (e instanceof Z.CometChat.TextMessage)
74728
+ return e.getText();
74729
+ if (e instanceof Z.CometChat.MediaMessage) {
74730
+ let r, o = n ? e.getAttachment().getName() : "";
74731
+ switch (e.getType()) {
74732
+ case "media":
74733
+ return r = t ? "🖼️ " : "", r + (e.getCaption() || o || "Media message");
74734
+ case d.CometChatUIKitConstants.MessageTypes.image:
74735
+ return r = t ? "🖼️ " : "", r + (e.getCaption() || o || "Photo");
74736
+ case d.CometChatUIKitConstants.MessageTypes.video:
74737
+ return r = t ? "🎥 " : "", r + (e.getCaption() || o || "Video");
74738
+ case d.CometChatUIKitConstants.MessageTypes.audio:
74739
+ return r = t ? "🎤 " : "", r + (o || "Audio message");
74740
+ case d.CometChatUIKitConstants.MessageTypes.file:
74741
+ return r = t ? "📄 " : "", r + (e.getCaption() || o || "File");
74742
+ }
74743
+ }
74744
+ return e instanceof Z.CometChat.Action ? e.getMessage() : "Custom message";
74746
74745
  }
74747
74746
  function lI(e) {
74748
74747
  return e && e.startsWith("https://data-eu.cometchat.io/") && (e = `${qo().chatApiBaseUrl}/file-proxy?uri=${e}`), e;
@@ -79113,6 +79112,20 @@ const lct = {
79113
79112
  "word-break": "break-all"
79114
79113
  },
79115
79114
  shadowDomSelector: "cometchat-preview"
79115
+ },
79116
+ {
79117
+ selector: ".cc__file__url",
79118
+ style: {
79119
+ color: "var(--cc__text-color)"
79120
+ },
79121
+ shadowDomSelector: "cometchat-file-bubble"
79122
+ },
79123
+ {
79124
+ selector: ".cc__file__subtitle",
79125
+ style: {
79126
+ color: "var(--cc__accent)"
79127
+ },
79128
+ shadowDomSelector: "cometchat-file-bubble"
79116
79129
  }
79117
79130
  ]);
79118
79131
  }), br(() => {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@bcc-code/vue-bcc-chat-ui",
3
3
  "author": "bcc-code",
4
4
  "license": "Apache-2.0",
5
- "version": "3.7.0",
5
+ "version": "3.7.1",
6
6
  "type": "module",
7
7
  "private": false,
8
8
  "files": [
@@ -114,6 +114,20 @@ onMounted(() => {
114
114
  "word-break": "break-all"
115
115
  },
116
116
  shadowDomSelector: "cometchat-preview",
117
+ },
118
+ {
119
+ selector: ".cc__file__url",
120
+ style: {
121
+ "color": "var(--cc__text-color)"
122
+ },
123
+ shadowDomSelector: "cometchat-file-bubble",
124
+ },
125
+ {
126
+ selector: ".cc__file__subtitle",
127
+ style: {
128
+ "color": "var(--cc__accent)"
129
+ },
130
+ shadowDomSelector: "cometchat-file-bubble",
117
131
  }
118
132
  ]);
119
133
  });