tuikit-atomicx-vue3 4.5.0 → 4.5.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.
Files changed (109) hide show
  1. package/dist/{PopoverTrigger-L8abAry7.js → PopoverPortal-DghpKKm8.js} +91 -136
  2. package/dist/PopoverTrigger-BajjNkGO.js +54 -0
  3. package/dist/{PopperContent-XdhqL8Y2.js → PopperContent-SLoFuK7k.js} +6 -6
  4. package/dist/{Teleport-CSEuZbpM.js → Teleport-DFrneqLM.js} +4 -4
  5. package/dist/baseComp/Modal/Modal.js +3 -3
  6. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +10 -9
  7. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  8. package/dist/components/BarrageInput/TextEditor/EditorCore.js +16 -15
  9. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +62 -40
  10. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +29 -27
  11. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +27 -23
  12. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue.d.ts +1 -1
  13. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +67 -65
  14. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +32 -30
  15. package/dist/components/ConversationList/ConversationPreview/utils.d.ts +2 -2
  16. package/dist/components/ConversationList/ConversationPreview/utils.js +81 -35
  17. package/dist/components/ConversationList/i18n/en-US.d.ts +10 -1
  18. package/dist/components/ConversationList/i18n/en-US.js +11 -2
  19. package/dist/components/ConversationList/i18n/zh-CN.d.ts +10 -1
  20. package/dist/components/ConversationList/i18n/zh-CN.js +11 -2
  21. package/dist/components/LiveScenePanel/index.js +10 -9
  22. package/dist/components/MessageInput/AttachmentPicker/index.js +10 -9
  23. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +17 -16
  24. package/dist/components/MessageInput/QuotedMessagePreview/index.js +35 -35
  25. package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +13 -12
  26. package/dist/components/MessageInput/TextEditor/EditorCore.js +54 -89
  27. package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +229 -0
  28. package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue.d.ts +15 -0
  29. package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
  30. package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.d.ts +1 -0
  31. package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +22 -0
  32. package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.d.ts +3 -0
  33. package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +15 -0
  34. package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
  35. package/dist/components/MessageInput/TextEditor/extensions/index.d.ts +8 -0
  36. package/dist/components/MessageInput/TextEditor/extensions/index.js +12 -0
  37. package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.d.ts +5 -0
  38. package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +330 -0
  39. package/dist/components/MessageInput/TextEditor/index.js +62 -62
  40. package/dist/components/MessageInput/i18n/en-US.d.ts +3 -0
  41. package/dist/components/MessageInput/i18n/en-US.js +4 -1
  42. package/dist/components/MessageInput/i18n/index.d.ts +6 -0
  43. package/dist/components/MessageInput/i18n/zh-CN.d.ts +3 -0
  44. package/dist/components/MessageInput/i18n/zh-CN.js +4 -1
  45. package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +119 -89
  46. package/dist/components/MessageList/Message/ImageMessage/ImagePreview.js +142 -0
  47. package/dist/components/MessageList/Message/ImageMessage/ImagePreview.vue.d.ts +20 -0
  48. package/dist/components/MessageList/Message/Message.vue.d.ts +8 -0
  49. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
  50. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +69 -58
  51. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +8 -0
  52. package/dist/components/MessageList/Message/index.js +8 -4
  53. package/dist/components/MessageList/MessageList.js +98 -90
  54. package/dist/components/MessageList/MessageList.vue.d.ts +1 -1
  55. package/dist/components/MessageList/index.d.ts +21 -3
  56. package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +6 -6
  57. package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.vue.d.ts +1 -1
  58. package/dist/index-BvFYOUyz.js +2936 -0
  59. package/dist/{index-Do-2CngU.js → index-C8Jw_xE4.js} +1621 -1731
  60. package/dist/{index-7vNB_Vx8.js → index-CiYL_XsE.js} +1 -1
  61. package/dist/index-CzCDLp99.js +2174 -0
  62. package/dist/index.d.ts +1 -1
  63. package/dist/index.js +103 -103
  64. package/dist/states/MessageActionState/MessageActionState.js +83 -223
  65. package/dist/states/MessageInputState/MessageInputState.js +115 -83
  66. package/dist/states/MessageInputState/type.d.ts +36 -10
  67. package/dist/states/MessageInputState/utils.d.ts +1 -5
  68. package/dist/states/MessageListState/MessageListState.d.ts +1 -1
  69. package/dist/styles/index.css +1 -1
  70. package/dist/{chat/index.d.ts → subEntry/chat/chat.d.ts} +2112 -2087
  71. package/dist/subEntry/chat/chat.js +89 -0
  72. package/dist/subEntry/chat/index.d.ts +11 -0
  73. package/dist/subEntry/chat/index.js +81 -0
  74. package/dist/{chat → subEntry/chat}/server.js +4 -4
  75. package/dist/{useId-CtirfF0W.js → useId-D5WE76CM.js} +1 -1
  76. package/dist/{utils-DaB7eSu5.js → utils-CttDpxqz.js} +1 -1
  77. package/package.json +8 -6
  78. package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +8 -0
  79. package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +32 -1
  80. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +3 -2
  81. package/src/components/ConversationList/ConversationPreview/utils.ts +98 -28
  82. package/src/components/ConversationList/i18n/en-US.ts +10 -1
  83. package/src/components/ConversationList/i18n/zh-CN.ts +10 -1
  84. package/src/components/LiveScenePanel/index.vue +1 -0
  85. package/src/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.vue +19 -22
  86. package/src/components/MessageInput/TextEditor/Editor.scss +25 -0
  87. package/src/components/MessageInput/TextEditor/EditorCore.ts +79 -99
  88. package/src/components/MessageInput/TextEditor/TextEditor.vue +64 -68
  89. package/src/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue +449 -0
  90. package/src/components/MessageInput/TextEditor/extensions/emojiExtension.ts +22 -0
  91. package/src/components/MessageInput/TextEditor/extensions/enterKeyExtension.ts +22 -0
  92. package/src/components/MessageInput/TextEditor/extensions/index.ts +8 -0
  93. package/src/components/MessageInput/TextEditor/extensions/mentionExtension.ts +87 -0
  94. package/src/components/MessageInput/i18n/en-US.ts +3 -0
  95. package/src/components/MessageInput/i18n/zh-CN.ts +3 -0
  96. package/src/components/MessageList/Message/ImageMessage/ImageMessage.vue +49 -0
  97. package/src/components/MessageList/Message/ImageMessage/ImagePreview.vue +344 -0
  98. package/src/components/MessageList/Message/Message.vue +6 -0
  99. package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -1
  100. package/src/components/MessageList/MessageList.vue +36 -14
  101. package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +30 -31
  102. package/src/index.ts +1 -1
  103. package/src/{chat/index.ts → subEntry/chat/chat.ts} +25 -18
  104. package/src/subEntry/chat/index.ts +13 -0
  105. package/src/{chat → subEntry/chat}/server.ts +3 -3
  106. package/dist/chat/index.js +0 -59
  107. package/dist/index-ZILx4LYk.js +0 -4826
  108. package/dist/states/SearchState.d.ts +0 -314
  109. /package/dist/{chat → subEntry/chat}/server.d.ts +0 -0
@@ -1,50 +1,72 @@
1
- import { defineComponent as m, computed as s, createElementBlock as r, openBlock as _, normalizeClass as v, Fragment as c, createElementVNode as u, createTextVNode as P, toDisplayString as o, unref as x } from "vue";
2
- import { useUIKit as d } from "@tencentcloud/uikit-base-component-vue3";
3
- import { getLatestMessagePreview as f } from "./utils.js";
4
- import { JSONStringToParse as p } from "../../../utils/json.js";
5
- import { _ as q } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
6
- const b = /* @__PURE__ */ m({
1
+ import { defineComponent as p, computed as v, createElementBlock as _, openBlock as i, normalizeClass as c, Fragment as u, createElementVNode as y, createTextVNode as m, toDisplayString as r, unref as T, createCommentVNode as C } from "vue";
2
+ import { useUIKit as I } from "@tencentcloud/uikit-base-component-vue3";
3
+ import { getLatestMessagePreview as $ } from "./utils.js";
4
+ import { JSONStringToParse as g } from "../../../utils/json.js";
5
+ import { ConversationType as x } from "../../../types/engine.js";
6
+ import { _ as U } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
7
+ const h = /* @__PURE__ */ p({
7
8
  __name: "ConversationPreviewAbstract",
8
9
  props: {
9
10
  conversation: {}
10
11
  },
11
- setup(w) {
12
- const t = w, { t: a } = d(), i = s(() => {
13
- var n;
14
- const { draftText: e = "" } = (t == null ? void 0 : t.conversation) || {};
15
- return ((n = p(e)) == null ? void 0 : n.abstract) || e;
16
- }), l = s(() => f(t.conversation, a));
17
- return (e, n) => (_(), r("div", {
18
- class: v(e.$style.conversationPreview__abstract)
12
+ setup(d) {
13
+ const o = d, { t: n } = I(), P = v(() => {
14
+ var t;
15
+ const { draftText: e = "" } = (o == null ? void 0 : o.conversation) || {};
16
+ return ((t = g(e)) == null ? void 0 : t.abstract) || e;
17
+ }), b = v(() => $(o.conversation, n)), w = v(() => {
18
+ const { type: e, groupAtInfoList: t } = (o == null ? void 0 : o.conversation) || {};
19
+ if (e !== x.GROUP || !(t != null && t.length))
20
+ return "";
21
+ const z = [
22
+ `[${n("TUIConversation.someone_at_me")}]`,
23
+ `[${n("TUIConversation.at_all")}]`,
24
+ `[${n("TUIConversation.at_all")}][${n("TUIConversation.someone_at_me")}]`
25
+ ];
26
+ let f = "";
27
+ return t.forEach((s) => {
28
+ var l;
29
+ const a = (l = s == null ? void 0 : s.atTypeArray) == null ? void 0 : l[0];
30
+ a && a >= 1 && a <= 3 && (f = z[a - 1]);
31
+ }), f;
32
+ });
33
+ return (e, t) => (i(), _("div", {
34
+ class: c(e.$style.conversationPreview__abstract)
19
35
  }, [
20
- i.value ? (_(), r(c, { key: 0 }, [
21
- u("label", {
22
- class: v(e.$style.conversationPreview__drafts)
23
- }, "[" + o(x(a)("TUIConversation.Drafts")) + "]", 3),
24
- P(" " + o(" ") + " " + o(i.value), 1)
25
- ], 64)) : (_(), r(c, { key: 1 }, [
26
- P(o(l.value), 1)
36
+ P.value ? (i(), _(u, { key: 0 }, [
37
+ y("label", {
38
+ class: c(e.$style.conversationPreview__abstract__drafts)
39
+ }, "[" + r(T(n)("TUIConversation.Drafts")) + "]", 3),
40
+ m(" " + r(" ") + " " + r(P.value), 1)
41
+ ], 64)) : (i(), _(u, { key: 1 }, [
42
+ w.value ? (i(), _("label", {
43
+ key: 0,
44
+ class: c(e.$style["conversationPreview__abstract__at-info"])
45
+ }, r(w.value), 3)) : C("", !0),
46
+ m(" " + r(b.value), 1)
27
47
  ], 64))
28
48
  ], 2));
29
49
  }
30
- }), g = "_conversationPreview_29xqv_12", y = "_conversationPreview__avatar_29xqv_34", M = "_conversationPreview__content_29xqv_38", T = "_conversationPreview__header_29xqv_42", h = "_conversationPreview__title_29xqv_48", k = "_conversationPreview__time_29xqv_58", C = "_conversationPreview__footer_29xqv_65", A = "_conversationPreview__abstract_29xqv_70", D = "_conversationPreview__external_29xqv_79", N = "_conversationPreview__unread_29xqv_88", S = "_conversationPreview__actions_29xqv_108", $ = {
31
- conversationPreview: g,
32
- "conversationPreview--active": "_conversationPreview--active_29xqv_28",
33
- "conversationPreview--pin": "_conversationPreview--pin_29xqv_31",
34
- conversationPreview__avatar: y,
35
- conversationPreview__content: M,
36
- conversationPreview__header: T,
37
- conversationPreview__title: h,
38
- conversationPreview__time: k,
39
- conversationPreview__footer: C,
40
- conversationPreview__abstract: A,
41
- conversationPreview__external: D,
42
- conversationPreview__unread: N,
43
- "unread-count": "_unread-count_29xqv_95",
44
- conversationPreview__actions: S
45
- }, B = {
46
- $style: $
47
- }, z = /* @__PURE__ */ q(b, [["__cssModules", B]]);
50
+ }), k = "_conversationPreview_ivuzf_12", M = "_conversationPreview__avatar_ivuzf_34", N = "_conversationPreview__content_ivuzf_38", A = "_conversationPreview__header_ivuzf_42", D = "_conversationPreview__title_ivuzf_48", E = "_conversationPreview__time_ivuzf_58", S = "_conversationPreview__footer_ivuzf_65", V = "_conversationPreview__abstract_ivuzf_70", B = "_conversationPreview__abstract__drafts_ivuzf_79", L = "_conversationPreview__external_ivuzf_85", O = "_conversationPreview__unread_ivuzf_94", F = "_conversationPreview__actions_ivuzf_114", G = {
51
+ conversationPreview: k,
52
+ "conversationPreview--active": "_conversationPreview--active_ivuzf_28",
53
+ "conversationPreview--pin": "_conversationPreview--pin_ivuzf_31",
54
+ conversationPreview__avatar: M,
55
+ conversationPreview__content: N,
56
+ conversationPreview__header: A,
57
+ conversationPreview__title: D,
58
+ conversationPreview__time: E,
59
+ conversationPreview__footer: S,
60
+ conversationPreview__abstract: V,
61
+ conversationPreview__abstract__drafts: B,
62
+ "conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_ivuzf_82",
63
+ conversationPreview__external: L,
64
+ conversationPreview__unread: O,
65
+ "unread-count": "_unread-count_ivuzf_101",
66
+ conversationPreview__actions: F
67
+ }, J = {
68
+ $style: G
69
+ }, W = /* @__PURE__ */ U(h, [["__cssModules", J]]);
48
70
  export {
49
- z as default
71
+ W as default
50
72
  };
@@ -1,42 +1,44 @@
1
- import { defineComponent as i, computed as v, createElementBlock as a, openBlock as s, normalizeClass as c, toDisplayString as w } from "vue";
1
+ import { defineComponent as r, computed as a, createElementBlock as v, openBlock as s, normalizeClass as c, toDisplayString as w } from "vue";
2
2
  import { useUIKit as P } from "@tencentcloud/uikit-base-component-vue3";
3
- import { getTimeStamp as m } from "../../../utils/time.js";
4
- import { _ as l } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
5
- const u = /* @__PURE__ */ i({
3
+ import { getTimeStamp as u } from "../../../utils/time.js";
4
+ import { _ as f } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const m = /* @__PURE__ */ r({
6
6
  __name: "ConversationPreviewTimestamp",
7
7
  props: {
8
8
  conversation: {}
9
9
  },
10
- setup(n) {
11
- const t = n, { language: r } = P(), _ = v(() => {
10
+ setup(t) {
11
+ const n = t, { language: _ } = P(), i = a(() => {
12
12
  var e, o;
13
- return m({
14
- time: Number(((o = (e = t.conversation) == null ? void 0 : e.lastMessage) == null ? void 0 : o.lastTime) || 0) * 1e3,
15
- language: r.value
13
+ return u({
14
+ time: Number(((o = (e = n.conversation) == null ? void 0 : e.lastMessage) == null ? void 0 : o.lastTime) || 0) * 1e3,
15
+ language: _.value
16
16
  }) || "";
17
17
  });
18
- return (e, o) => (s(), a("div", {
18
+ return (e, o) => (s(), v("div", {
19
19
  class: c(e.$style.conversationPreview__time)
20
- }, w(_.value), 3));
20
+ }, w(i.value), 3));
21
21
  }
22
- }), p = "_conversationPreview_29xqv_12", x = "_conversationPreview__avatar_29xqv_34", d = "_conversationPreview__content_29xqv_38", q = "_conversationPreview__header_29xqv_42", f = "_conversationPreview__title_29xqv_48", g = "_conversationPreview__time_29xqv_58", b = "_conversationPreview__footer_29xqv_65", h = "_conversationPreview__abstract_29xqv_70", y = "_conversationPreview__external_29xqv_79", M = "_conversationPreview__unread_29xqv_88", T = "_conversationPreview__actions_29xqv_108", C = {
23
- conversationPreview: p,
24
- "conversationPreview--active": "_conversationPreview--active_29xqv_28",
25
- "conversationPreview--pin": "_conversationPreview--pin_29xqv_31",
26
- conversationPreview__avatar: x,
22
+ }), l = "_conversationPreview_ivuzf_12", p = "_conversationPreview__avatar_ivuzf_34", d = "_conversationPreview__content_ivuzf_38", z = "_conversationPreview__header_ivuzf_42", b = "_conversationPreview__title_ivuzf_48", g = "_conversationPreview__time_ivuzf_58", x = "_conversationPreview__footer_ivuzf_65", h = "_conversationPreview__abstract_ivuzf_70", y = "_conversationPreview__abstract__drafts_ivuzf_79", M = "_conversationPreview__external_ivuzf_85", T = "_conversationPreview__unread_ivuzf_94", C = "_conversationPreview__actions_ivuzf_114", k = {
23
+ conversationPreview: l,
24
+ "conversationPreview--active": "_conversationPreview--active_ivuzf_28",
25
+ "conversationPreview--pin": "_conversationPreview--pin_ivuzf_31",
26
+ conversationPreview__avatar: p,
27
27
  conversationPreview__content: d,
28
- conversationPreview__header: q,
29
- conversationPreview__title: f,
28
+ conversationPreview__header: z,
29
+ conversationPreview__title: b,
30
30
  conversationPreview__time: g,
31
- conversationPreview__footer: b,
31
+ conversationPreview__footer: x,
32
32
  conversationPreview__abstract: h,
33
- conversationPreview__external: y,
34
- conversationPreview__unread: M,
35
- "unread-count": "_unread-count_29xqv_95",
36
- conversationPreview__actions: T
37
- }, k = {
38
- $style: C
39
- }, z = /* @__PURE__ */ l(u, [["__cssModules", k]]);
33
+ conversationPreview__abstract__drafts: y,
34
+ "conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_ivuzf_82",
35
+ conversationPreview__external: M,
36
+ conversationPreview__unread: T,
37
+ "unread-count": "_unread-count_ivuzf_101",
38
+ conversationPreview__actions: C
39
+ }, B = {
40
+ $style: k
41
+ }, I = /* @__PURE__ */ f(m, [["__cssModules", B]]);
40
42
  export {
41
- z as default
43
+ I as default
42
44
  };
@@ -1,35 +1,39 @@
1
- import { defineComponent as i, createElementBlock as v, openBlock as s, normalizeClass as a, toDisplayString as c, unref as w } from "vue";
2
- import { _ as P } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
3
- const l = /* @__PURE__ */ i({
1
+ import { defineComponent as i, computed as r, createElementBlock as v, openBlock as a, normalizeClass as s, toDisplayString as c } from "vue";
2
+ import { _ as w } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const P = /* @__PURE__ */ i({
4
4
  __name: "ConversationPreviewTitle",
5
5
  props: {
6
6
  conversation: {}
7
7
  },
8
- setup(r) {
9
- var e, o;
10
- const n = r, _ = ((o = (e = n == null ? void 0 : n.conversation) == null ? void 0 : e.getShowName) == null ? void 0 : o.call(e)) || "";
11
- return (t, k) => (s(), v("div", {
12
- class: a([t.$style.conversationPreview__title, t.$style.textEllipsis])
13
- }, c(w(_)), 3));
8
+ setup(t) {
9
+ const n = t, _ = r(() => {
10
+ var e, o;
11
+ return ((o = (e = n == null ? void 0 : n.conversation) == null ? void 0 : e.getShowName) == null ? void 0 : o.call(e)) || "";
12
+ });
13
+ return (e, o) => (a(), v("div", {
14
+ class: s([e.$style.conversationPreview__title, e.$style.textEllipsis])
15
+ }, c(_.value), 3));
14
16
  }
15
- }), x = "_conversationPreview_29xqv_12", u = "_conversationPreview__avatar_29xqv_34", q = "_conversationPreview__content_29xqv_38", d = "_conversationPreview__header_29xqv_42", m = "_conversationPreview__title_29xqv_48", f = "_conversationPreview__time_29xqv_58", p = "_conversationPreview__footer_29xqv_65", h = "_conversationPreview__abstract_29xqv_70", y = "_conversationPreview__external_29xqv_79", b = "_conversationPreview__unread_29xqv_88", C = "_conversationPreview__actions_29xqv_108", $ = {
16
- conversationPreview: x,
17
- "conversationPreview--active": "_conversationPreview--active_29xqv_28",
18
- "conversationPreview--pin": "_conversationPreview--pin_29xqv_31",
19
- conversationPreview__avatar: u,
20
- conversationPreview__content: q,
17
+ }), u = "_conversationPreview_ivuzf_12", f = "_conversationPreview__avatar_ivuzf_34", l = "_conversationPreview__content_ivuzf_38", d = "_conversationPreview__header_ivuzf_42", z = "_conversationPreview__title_ivuzf_48", m = "_conversationPreview__time_ivuzf_58", p = "_conversationPreview__footer_ivuzf_65", b = "_conversationPreview__abstract_ivuzf_70", h = "_conversationPreview__abstract__drafts_ivuzf_79", x = "_conversationPreview__external_ivuzf_85", y = "_conversationPreview__unread_ivuzf_94", C = "_conversationPreview__actions_ivuzf_114", $ = {
18
+ conversationPreview: u,
19
+ "conversationPreview--active": "_conversationPreview--active_ivuzf_28",
20
+ "conversationPreview--pin": "_conversationPreview--pin_ivuzf_31",
21
+ conversationPreview__avatar: f,
22
+ conversationPreview__content: l,
21
23
  conversationPreview__header: d,
22
- conversationPreview__title: m,
23
- conversationPreview__time: f,
24
+ conversationPreview__title: z,
25
+ conversationPreview__time: m,
24
26
  conversationPreview__footer: p,
25
- conversationPreview__abstract: h,
26
- conversationPreview__external: y,
27
- conversationPreview__unread: b,
28
- "unread-count": "_unread-count_29xqv_95",
27
+ conversationPreview__abstract: b,
28
+ conversationPreview__abstract__drafts: h,
29
+ "conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_ivuzf_82",
30
+ conversationPreview__external: x,
31
+ conversationPreview__unread: y,
32
+ "unread-count": "_unread-count_ivuzf_101",
29
33
  conversationPreview__actions: C
30
34
  }, g = {
31
35
  $style: $
32
- }, E = /* @__PURE__ */ P(l, [["__cssModules", g]]);
36
+ }, D = /* @__PURE__ */ w(P, [["__cssModules", g]]);
33
37
  export {
34
- E as default
38
+ D as default
35
39
  };
@@ -1,4 +1,4 @@
1
- import { ConversationModel } from '../../../types';
1
+ import { ConversationModel } from '../../../types/engine';
2
2
 
3
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
4
  conversation: ConversationModel;
@@ -1,28 +1,28 @@
1
- import { defineComponent as O, ref as U, watch as V, createElementBlock as H, openBlock as o, createElementVNode as c, createBlock as i, createCommentVNode as K, mergeProps as l, unref as t, renderSlot as j, normalizeClass as u, resolveDynamicComponent as a } from "vue";
2
- import P from "@tencentcloud/chat-uikit-engine";
3
- import F from "../../Avatar/Avatar.js";
4
- import z from "./ConversationPreviewAbstract.js";
5
- import G from "./ConversationPreviewTimestamp.js";
6
- import J from "./ConversationPreviewTitle.js";
7
- import Q from "./ConversationPreviewUnread.js";
8
- import W from "../ConversationActions/ConversationActions.js";
9
- import { useMouseHover as X } from "../../../hooks/useMouseHover.js";
10
- import { useLongPress as Z } from "../../../hooks/useLongPress.js";
11
- import { isH5 as r } from "../../../utils/env.js";
1
+ import { defineComponent as V, ref as $, watch as H, createElementBlock as K, openBlock as t, createElementVNode as c, createBlock as i, createCommentVNode as j, mergeProps as l, unref as o, renderSlot as F, normalizeClass as u, resolveDynamicComponent as a } from "vue";
2
+ import _ from "@tencentcloud/chat-uikit-engine";
3
+ import q from "../../Avatar/Avatar.js";
4
+ import G from "./ConversationPreviewAbstract.js";
5
+ import J from "./ConversationPreviewTimestamp.js";
6
+ import Q from "./ConversationPreviewTitle.js";
7
+ import W from "./ConversationPreviewUnread.js";
8
+ import X from "../ConversationActions/ConversationActions.js";
9
+ import { useMouseHover as Z } from "../../../hooks/useMouseHover.js";
10
+ import { useLongPress as x } from "../../../hooks/useLongPress.js";
11
+ import { isH5 as s } from "../../../utils/env.js";
12
12
  import { useConversationListState as p } from "../../../states/ConversationListState/ConversationListState.js";
13
13
  import { _ as ee } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
14
- const ne = /* @__PURE__ */ O({
14
+ const ne = /* @__PURE__ */ V({
15
15
  __name: "ConversationPreviewUI",
16
16
  props: {
17
17
  conversation: {},
18
18
  isSelected: { type: Boolean, default: !1 },
19
19
  enableActions: { type: Boolean, default: !0 },
20
- Avatar: { type: [Object, Function], default: () => F },
21
- Title: { default: () => J },
22
- LastMessageAbstract: { default: () => z },
23
- LastMessageTimestamp: { default: () => G },
24
- Unread: { default: () => Q },
25
- ConversationActions: { type: [Object, Function], default: () => W },
20
+ Avatar: { type: [Object, Function], default: () => q },
21
+ Title: { default: () => Q },
22
+ LastMessageAbstract: { default: () => G },
23
+ LastMessageTimestamp: { default: () => J },
24
+ Unread: { default: () => W },
25
+ ConversationActions: { type: [Object, Function], default: () => X },
26
26
  onSelectConversation: {},
27
27
  actionsConfig: {},
28
28
  className: {},
@@ -30,61 +30,61 @@ const ne = /* @__PURE__ */ O({
30
30
  children: {}
31
31
  },
32
32
  emits: ["selectConversation"],
33
- setup(e, { emit: $ }) {
34
- const m = e, N = $, { activeConversation: h, setActiveConversation: R } = p(), _ = U(), s = U(!1), { isHovered: S } = X(_), { getEventHandlers: I } = Z(() => {
35
- r && (s.value = !0);
36
- }), Y = I();
37
- V(S, (n) => {
38
- r || (s.value = n);
33
+ setup(e, { emit: N }) {
34
+ const f = e, h = N, { activeConversation: R, setActiveConversation: S } = p(), P = $(), r = $(!1), { isHovered: I } = Z(P), { getEventHandlers: Y } = x(() => {
35
+ s && (r.value = !0);
36
+ }), B = Y();
37
+ H(I, (n) => {
38
+ s || (r.value = n);
39
39
  });
40
- const B = () => {
41
- N("selectConversation", m.conversation), R(m.conversation.conversationID);
40
+ const O = () => {
41
+ h("selectConversation", f.conversation), S(f.conversation.conversationID);
42
42
  }, d = () => {
43
- s.value = !1;
43
+ r.value = !1;
44
44
  };
45
- return (n, de) => {
46
- var w, f, C, A, y, M, g, q;
47
- return o(), H("div", null, [
45
+ return (n, me) => {
46
+ var m, w, C, A, y, M, b, z;
47
+ return t(), K("div", null, [
48
48
  c("div", l({
49
49
  ref_key: "conversationPreviewRef",
50
- ref: _,
50
+ ref: P,
51
51
  class: [
52
52
  n.$style.conversationPreview,
53
53
  e.className,
54
- t(r) && [n.$style["conversationPreview--mobile"]],
55
- (e.isSelected || ((w = e.conversation) == null ? void 0 : w.conversationID) === ((f = t(h)) == null ? void 0 : f.conversationID)) && [n.$style["conversationPreview--active"]],
56
- !((C = e.conversation) != null && C.isMuted) && (((A = e.conversation) == null ? void 0 : A.unreadCount) > 0 || ((M = (y = e.conversation) == null ? void 0 : y.markList) == null ? void 0 : M.includes(t(P).TYPES.CONV_MARK_TYPE_UNREAD))) && [n.$style["conversationPreview--unread"]],
57
- ((g = e.conversation) == null ? void 0 : g.isPinned) && [n.$style["conversationPreview--pin"]],
58
- ((q = e.conversation) == null ? void 0 : q.isMuted) && [n.$style["conversationPreview--mute"]]
54
+ o(s) && [n.$style["conversationPreview--mobile"]],
55
+ (e.isSelected || ((m = e.conversation) == null ? void 0 : m.conversationID) === ((w = o(R)) == null ? void 0 : w.conversationID)) && [n.$style["conversationPreview--active"]],
56
+ !((C = e.conversation) != null && C.isMuted) && (((A = e.conversation) == null ? void 0 : A.unreadCount) > 0 || ((M = (y = e.conversation) == null ? void 0 : y.markList) == null ? void 0 : M.includes(o(_).TYPES.CONV_MARK_TYPE_UNREAD))) && [n.$style["conversationPreview--unread"]],
57
+ ((b = e.conversation) == null ? void 0 : b.isPinned) && [n.$style["conversationPreview--pin"]],
58
+ ((z = e.conversation) == null ? void 0 : z.isMuted) && [n.$style["conversationPreview--mute"]]
59
59
  ],
60
60
  style: e.style
61
- }, t(Y), { onClick: B }), [
62
- j(n.$slots, "default", {}, () => {
63
- var v, E, D, T, b, k, x, L;
61
+ }, o(B), { onClick: O }), [
62
+ F(n.$slots, "default", {}, () => {
63
+ var v, g, E, D, T, k, L, U;
64
64
  return [
65
65
  c("div", {
66
66
  class: u(n.$style.conversationPreview__avatar)
67
67
  }, [
68
- (o(), i(a(e.Avatar), {
69
- src: (E = (v = e.conversation) == null ? void 0 : v.getAvatar) == null ? void 0 : E.call(v),
70
- unreadCount: (D = e.conversation) != null && D.isMuted && ((b = (T = e.conversation) == null ? void 0 : T.markList) != null && b.includes(t(P).TYPES.CONV_MARK_TYPE_UNREAD)) ? 1 : void 0,
71
- isDotUnreadCount: ((k = e.conversation) == null ? void 0 : k.isMuted) && ((L = (x = e.conversation) == null ? void 0 : x.markList) == null ? void 0 : L.includes(t(P).TYPES.CONV_MARK_TYPE_UNREAD))
68
+ (t(), i(a(e.Avatar), {
69
+ src: (g = (v = e.conversation) == null ? void 0 : v.getAvatar) == null ? void 0 : g.call(v),
70
+ unreadCount: (E = e.conversation) != null && E.isMuted && ((T = (D = e.conversation) == null ? void 0 : D.markList) != null && T.includes(o(_).TYPES.CONV_MARK_TYPE_UNREAD)) ? 1 : void 0,
71
+ isDotUnreadCount: ((k = e.conversation) == null ? void 0 : k.isMuted) && ((U = (L = e.conversation) == null ? void 0 : L.markList) == null ? void 0 : U.includes(o(_).TYPES.CONV_MARK_TYPE_UNREAD))
72
72
  }, null, 8, ["src", "unreadCount", "isDotUnreadCount"]))
73
73
  ], 2),
74
74
  c("div", {
75
75
  class: u(n.$style.conversationPreview__content)
76
76
  }, [
77
- (o(), i(a(e.Title), { conversation: e.conversation }, null, 8, ["conversation"])),
78
- (o(), i(a(e.LastMessageAbstract), { conversation: e.conversation }, null, 8, ["conversation"]))
77
+ (t(), i(a(e.Title), { conversation: e.conversation }, null, 8, ["conversation"])),
78
+ (t(), i(a(e.LastMessageAbstract), { conversation: e.conversation }, null, 8, ["conversation"]))
79
79
  ], 2),
80
80
  c("div", {
81
81
  class: u(n.$style.conversationPreview__external)
82
82
  }, [
83
- (o(), i(a(e.Unread), { conversation: e.conversation }, null, 8, ["conversation"])),
84
- e.enableActions && s.value && !t(r) ? (o(), i(a(e.ConversationActions), l({
83
+ (t(), i(a(e.Unread), { conversation: e.conversation }, null, 8, ["conversation"])),
84
+ e.enableActions && r.value && !o(s) ? (t(), i(a(e.ConversationActions), l({
85
85
  key: 0,
86
86
  conversation: e.conversation
87
- }, e.actionsConfig, { onClose: d }), null, 16, ["conversation"])) : (o(), i(a(e.LastMessageTimestamp), {
87
+ }, e.actionsConfig, { onClose: d }), null, 16, ["conversation"])) : (t(), i(a(e.LastMessageTimestamp), {
88
88
  key: 1,
89
89
  conversation: e.conversation
90
90
  }, null, 8, ["conversation"]))
@@ -92,31 +92,33 @@ const ne = /* @__PURE__ */ O({
92
92
  ];
93
93
  })
94
94
  ], 16),
95
- t(r) && e.enableActions && s.value ? (o(), i(a(e.ConversationActions), l({
95
+ o(s) && e.enableActions && r.value ? (t(), i(a(e.ConversationActions), l({
96
96
  key: 0,
97
97
  conversation: e.conversation
98
- }, e.actionsConfig, { onClose: d }), null, 16, ["conversation"])) : K("", !0)
98
+ }, e.actionsConfig, { onClose: d }), null, 16, ["conversation"])) : j("", !0)
99
99
  ]);
100
100
  };
101
101
  }
102
- }), oe = "_conversationPreview_29xqv_12", te = "_conversationPreview__avatar_29xqv_34", ie = "_conversationPreview__content_29xqv_38", ae = "_conversationPreview__header_29xqv_42", se = "_conversationPreview__title_29xqv_48", re = "_conversationPreview__time_29xqv_58", ve = "_conversationPreview__footer_29xqv_65", ce = "_conversationPreview__abstract_29xqv_70", le = "_conversationPreview__external_29xqv_79", ue = "_conversationPreview__unread_29xqv_88", Pe = "_conversationPreview__actions_29xqv_108", me = {
103
- conversationPreview: oe,
104
- "conversationPreview--active": "_conversationPreview--active_29xqv_28",
105
- "conversationPreview--pin": "_conversationPreview--pin_29xqv_31",
106
- conversationPreview__avatar: te,
102
+ }), te = "_conversationPreview_ivuzf_12", oe = "_conversationPreview__avatar_ivuzf_34", ie = "_conversationPreview__content_ivuzf_38", ae = "_conversationPreview__header_ivuzf_42", re = "_conversationPreview__title_ivuzf_48", se = "_conversationPreview__time_ivuzf_58", ve = "_conversationPreview__footer_ivuzf_65", ce = "_conversationPreview__abstract_ivuzf_70", le = "_conversationPreview__abstract__drafts_ivuzf_79", ue = "_conversationPreview__external_ivuzf_85", _e = "_conversationPreview__unread_ivuzf_94", fe = "_conversationPreview__actions_ivuzf_114", Pe = {
103
+ conversationPreview: te,
104
+ "conversationPreview--active": "_conversationPreview--active_ivuzf_28",
105
+ "conversationPreview--pin": "_conversationPreview--pin_ivuzf_31",
106
+ conversationPreview__avatar: oe,
107
107
  conversationPreview__content: ie,
108
108
  conversationPreview__header: ae,
109
- conversationPreview__title: se,
110
- conversationPreview__time: re,
109
+ conversationPreview__title: re,
110
+ conversationPreview__time: se,
111
111
  conversationPreview__footer: ve,
112
112
  conversationPreview__abstract: ce,
113
- conversationPreview__external: le,
114
- conversationPreview__unread: ue,
115
- "unread-count": "_unread-count_29xqv_95",
116
- conversationPreview__actions: Pe
117
- }, _e = {
118
- $style: me
119
- }, xe = /* @__PURE__ */ ee(ne, [["__cssModules", _e]]);
113
+ conversationPreview__abstract__drafts: le,
114
+ "conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_ivuzf_82",
115
+ conversationPreview__external: ue,
116
+ conversationPreview__unread: _e,
117
+ "unread-count": "_unread-count_ivuzf_101",
118
+ conversationPreview__actions: fe
119
+ }, de = {
120
+ $style: Pe
121
+ }, Ue = /* @__PURE__ */ ee(ne, [["__cssModules", de]]);
120
122
  export {
121
- xe as default
123
+ Ue as default
122
124
  };
@@ -1,53 +1,55 @@
1
- import { defineComponent as w, computed as u, createElementBlock as r, openBlock as o, normalizeClass as t, createBlock as l, createCommentVNode as d, unref as m, toDisplayString as x } from "vue";
2
- import q from "@tencentcloud/chat-uikit-engine";
3
- import { IconMute as f } from "@tencentcloud/uikit-base-component-vue3";
4
- import { _ as p } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
5
- const y = /* @__PURE__ */ w({
1
+ import { defineComponent as P, computed as w, createElementBlock as t, openBlock as o, normalizeClass as r, createBlock as f, createCommentVNode as d, unref as l, toDisplayString as m } from "vue";
2
+ import z from "@tencentcloud/chat-uikit-engine";
3
+ import { IconMute as p } from "@tencentcloud/uikit-base-component-vue3";
4
+ import { _ as y } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const k = /* @__PURE__ */ P({
6
6
  __name: "ConversationPreviewUnread",
7
7
  props: {
8
8
  conversation: {}
9
9
  },
10
10
  setup(n) {
11
- const c = n, P = u(() => {
11
+ const c = n, u = w(() => {
12
12
  var e, i;
13
- return (i = (e = c.conversation) == null ? void 0 : e.markList) == null ? void 0 : i.includes(q.TYPES.CONV_MARK_TYPE_UNREAD);
13
+ return (i = (e = c.conversation) == null ? void 0 : e.markList) == null ? void 0 : i.includes(z.TYPES.CONV_MARK_TYPE_UNREAD);
14
14
  });
15
15
  return (e, i) => {
16
- var a, _, v, s;
17
- return o(), r("div", {
18
- class: t(e.$style.conversationPreview__unread)
16
+ var _, a, v, s;
17
+ return o(), t("div", {
18
+ class: r(e.$style.conversationPreview__unread)
19
19
  }, [
20
- (a = n.conversation) != null && a.isMuted ? (o(), l(m(f), { key: 0 })) : ((_ = n.conversation) == null ? void 0 : _.unreadCount) > 99 ? (o(), r("span", {
20
+ (_ = n.conversation) != null && _.isMuted ? (o(), f(l(p), { key: 0 })) : ((a = n.conversation) == null ? void 0 : a.unreadCount) > 99 ? (o(), t("span", {
21
21
  key: 1,
22
- class: t(e.$style["unread-count"])
23
- }, "99+", 2)) : ((v = n.conversation) == null ? void 0 : v.unreadCount) > 0 ? (o(), r("span", {
22
+ class: r(e.$style["unread-count"])
23
+ }, "99+", 2)) : ((v = n.conversation) == null ? void 0 : v.unreadCount) > 0 ? (o(), t("span", {
24
24
  key: 2,
25
- class: t(e.$style["unread-count"])
26
- }, x((s = n.conversation) == null ? void 0 : s.unreadCount), 3)) : P.value ? (o(), r("span", {
25
+ class: r(e.$style["unread-count"])
26
+ }, m((s = n.conversation) == null ? void 0 : s.unreadCount), 3)) : u.value ? (o(), t("span", {
27
27
  key: 3,
28
- class: t(e.$style["unread-count"])
28
+ class: r(e.$style["unread-count"])
29
29
  }, "1", 2)) : d("", !0)
30
30
  ], 2);
31
31
  };
32
32
  }
33
- }), k = "_conversationPreview_29xqv_12", C = "_conversationPreview__avatar_29xqv_34", M = "_conversationPreview__content_29xqv_38", h = "_conversationPreview__header_29xqv_42", E = "_conversationPreview__title_29xqv_48", U = "_conversationPreview__time_29xqv_58", $ = "_conversationPreview__footer_29xqv_65", b = "_conversationPreview__abstract_29xqv_70", B = "_conversationPreview__external_29xqv_79", D = "_conversationPreview__unread_29xqv_88", N = "_conversationPreview__actions_29xqv_108", T = {
34
- conversationPreview: k,
35
- "conversationPreview--active": "_conversationPreview--active_29xqv_28",
36
- "conversationPreview--pin": "_conversationPreview--pin_29xqv_31",
37
- conversationPreview__avatar: C,
33
+ }), C = "_conversationPreview_ivuzf_12", b = "_conversationPreview__avatar_ivuzf_34", M = "_conversationPreview__content_ivuzf_38", h = "_conversationPreview__header_ivuzf_42", E = "_conversationPreview__title_ivuzf_48", U = "_conversationPreview__time_ivuzf_58", $ = "_conversationPreview__footer_ivuzf_65", B = "_conversationPreview__abstract_ivuzf_70", D = "_conversationPreview__abstract__drafts_ivuzf_79", N = "_conversationPreview__external_ivuzf_85", T = "_conversationPreview__unread_ivuzf_94", g = "_conversationPreview__actions_ivuzf_114", x = {
34
+ conversationPreview: C,
35
+ "conversationPreview--active": "_conversationPreview--active_ivuzf_28",
36
+ "conversationPreview--pin": "_conversationPreview--pin_ivuzf_31",
37
+ conversationPreview__avatar: b,
38
38
  conversationPreview__content: M,
39
39
  conversationPreview__header: h,
40
40
  conversationPreview__title: E,
41
41
  conversationPreview__time: U,
42
42
  conversationPreview__footer: $,
43
- conversationPreview__abstract: b,
44
- conversationPreview__external: B,
45
- conversationPreview__unread: D,
46
- "unread-count": "_unread-count_29xqv_95",
47
- conversationPreview__actions: N
48
- }, g = {
49
- $style: T
50
- }, V = /* @__PURE__ */ p(y, [["__cssModules", g]]);
43
+ conversationPreview__abstract: B,
44
+ conversationPreview__abstract__drafts: D,
45
+ "conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_ivuzf_82",
46
+ conversationPreview__external: N,
47
+ conversationPreview__unread: T,
48
+ "unread-count": "_unread-count_ivuzf_101",
49
+ conversationPreview__actions: g
50
+ }, A = {
51
+ $style: x
52
+ }, Y = /* @__PURE__ */ y(k, [["__cssModules", A]]);
51
53
  export {
52
- V as default
54
+ Y as default
53
55
  };
@@ -1,7 +1,7 @@
1
- import { ConversationModel } from '../../../types';
1
+ import { ConversationModel } from '../../../types/engine';
2
2
 
3
3
  export declare const generateHighlightTitle: (conversation: ConversationModel, highlightMatchString?: string) => {
4
4
  text: string;
5
5
  isHighlight: boolean;
6
6
  }[];
7
- export declare const getLatestMessagePreview: (conversation: ConversationModel, t: (key: string) => string) => any;
7
+ export declare const getLatestMessagePreview: (conversation: ConversationModel, t: (key: string) => string) => string;