tuikit-atomicx-vue3 4.5.1 → 4.5.2

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 (122) hide show
  1. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js → MessageInput.vue_vue_type_script_setup_true_lang-3RVYOdkv.js} +38 -38
  2. package/dist/{PopoverPortal-DghpKKm8.js → PopoverPortal-DV6zFXcf.js} +3 -3
  3. package/dist/{PopoverTrigger-BajjNkGO.js → PopoverTrigger-DIjW4PKa.js} +4 -4
  4. package/dist/{PopperContent-SLoFuK7k.js → PopperContent-D__dbwpA.js} +1 -1
  5. package/dist/{Teleport-DFrneqLM.js → Teleport-98QrIYDI.js} +278 -268
  6. package/dist/baseComp/Modal/Modal.js +3 -3
  7. package/dist/components/AudioSettingPanel/index.js +14 -14
  8. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +2 -2
  9. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  10. package/dist/components/BarrageInput/TextEditor/EditorCore.js +4 -4
  11. package/dist/components/ConversationList/ConversationActions/ConversationActions.js +53 -50
  12. package/dist/components/ConversationList/ConversationActions/ConversationActions.vue.d.ts +2 -0
  13. package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +25 -25
  14. package/dist/components/ConversationList/ConversationList.vue.d.ts +16 -0
  15. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +16 -0
  16. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +18 -18
  17. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +13 -13
  18. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +11 -11
  19. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +84 -75
  20. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +4 -0
  21. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +14 -14
  22. package/dist/components/ConversationList/i18n/en-US.d.ts +1 -0
  23. package/dist/components/ConversationList/i18n/en-US.js +2 -1
  24. package/dist/components/ConversationList/i18n/zh-CN.d.ts +1 -0
  25. package/dist/components/ConversationList/i18n/zh-CN.js +2 -1
  26. package/dist/components/ConversationList/index.d.ts +48 -0
  27. package/dist/components/LiveScenePanel/index.js +9 -10
  28. package/dist/components/MessageInput/AttachmentPicker/index.js +2 -2
  29. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +2 -2
  30. package/dist/components/MessageInput/MessageInput.js +1 -1
  31. package/dist/components/MessageInput/TextEditor/EditorCore.js +1 -1
  32. package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +3 -3
  33. package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
  34. package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +1 -1
  35. package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +1 -1
  36. package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
  37. package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +2 -2
  38. package/dist/components/MessageInput/TextEditor/index.js +1 -1
  39. package/dist/components/MessageInput/index.js +1 -1
  40. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
  41. package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +37 -28
  42. package/dist/components/MessageList/MessageList.js +77 -67
  43. package/dist/components/ScheduleRoomPanel/RoomDetail.js +22 -22
  44. package/dist/components/ScheduleRoomPanel/RoomEdit.js +1 -1
  45. package/dist/components/ScheduleRoomPanel/RoomShare.js +4 -4
  46. package/dist/components/ScheduleRoomPanel/ScheduleRoomPanel.js +1 -1
  47. package/dist/components/ScheduleRoomPanel/ScheduledRoomList.js +1 -1
  48. package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.d.ts +72 -0
  49. package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.js +95 -0
  50. package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.d.ts +40 -0
  51. package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.js +51 -0
  52. package/dist/components/UIKitModal/chatErrorModal/i18n/index.d.ts +4 -0
  53. package/dist/components/UIKitModal/chatErrorModal/i18n/index.js +6 -0
  54. package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.d.ts +40 -0
  55. package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.js +51 -0
  56. package/dist/components/UIKitModal/chatErrorModal/index.d.ts +3 -0
  57. package/dist/components/UIKitModal/chatErrorModal/index.js +11 -0
  58. package/dist/components/VideoSettingPanel/index.js +1 -1
  59. package/dist/hooks/useReadReceipt/useReadReceipt.js +44 -41
  60. package/dist/index-CTthrJb2.js +1461 -0
  61. package/dist/{index-CzCDLp99.js → index-DXC5bPY4.js} +32 -32
  62. package/dist/{index-C8Jw_xE4.js → index-DuAffztD.js} +1731 -1648
  63. package/dist/{index-CiYL_XsE.js → index-hHVD-MG2.js} +1 -1
  64. package/dist/index.js +59 -58
  65. package/dist/states/GroupSettingState/GroupSettingState.js +109 -102
  66. package/dist/states/LoginState.js +43 -43
  67. package/dist/states/MessageInputState/MessageInputState.js +75 -78
  68. package/dist/states/MessageListState/MessageListState.js +26 -23
  69. package/dist/states/RoomParticipantState/index.js +83 -24
  70. package/dist/states/RoomParticipantState/participantEventManager.d.ts +2 -2
  71. package/dist/states/RoomParticipantState/participantEventManager.js +217 -205
  72. package/dist/states/RoomParticipantState/participantManager.d.ts +4 -0
  73. package/dist/states/RoomParticipantState/participantManager.js +159 -127
  74. package/dist/states/RoomState/callManager.d.ts +3 -3
  75. package/dist/states/RoomState/callManager.js +20 -20
  76. package/dist/states/RoomState/common.d.ts +3 -2
  77. package/dist/states/RoomState/common.js +34 -24
  78. package/dist/states/RoomState/roomManager.d.ts +0 -1
  79. package/dist/states/RoomState/roomManager.js +21 -27
  80. package/dist/states/RoomState/scheduleManager.js +2 -2
  81. package/dist/styles/index.css +1 -1
  82. package/dist/subEntry/chat/chat.d.ts +48 -0
  83. package/dist/subEntry/live/index.js +46 -45
  84. package/dist/subEntry/room/index.js +39 -38
  85. package/dist/types/beauty.d.ts +20 -0
  86. package/dist/types/index.js +37 -36
  87. package/dist/types/participant.d.ts +2 -0
  88. package/dist/types/room.d.ts +45 -1
  89. package/dist/types/room.js +4 -3
  90. package/dist/{useId-D5WE76CM.js → useId-B1VwPJLm.js} +1 -1
  91. package/dist/utils/call.js +77 -71
  92. package/dist/{utils-CttDpxqz.js → utils-BU8IkP_V.js} +1 -1
  93. package/package.json +5 -6
  94. package/src/components/AudioSettingPanel/index.vue +4 -5
  95. package/src/components/ConversationList/ConversationActions/ConversationActions.vue +7 -1
  96. package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +5 -1
  97. package/src/components/ConversationList/ConversationList.vue +0 -1
  98. package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +2 -2
  99. package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +15 -0
  100. package/src/components/ConversationList/i18n/en-US.ts +1 -0
  101. package/src/components/ConversationList/i18n/zh-CN.ts +1 -0
  102. package/src/components/LiveScenePanel/index.vue +0 -1
  103. package/src/components/MessageInput/MessageInput.module.scss +1 -0
  104. package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +12 -3
  105. package/src/components/MessageList/MessageList.vue +14 -0
  106. package/src/components/ScheduleRoomPanel/RoomDetail.vue +1 -0
  107. package/src/components/ScheduleRoomPanel/RoomEdit.vue +2 -1
  108. package/src/components/ScheduleRoomPanel/RoomShare.vue +1 -0
  109. package/src/components/ScheduleRoomPanel/ScheduleRoomPanel.vue +1 -0
  110. package/src/components/ScheduleRoomPanel/ScheduledRoomList.vue +1 -0
  111. package/src/components/UIKitModal/chatErrorModal/chatErrorModal.ts +205 -0
  112. package/src/components/UIKitModal/chatErrorModal/i18n/en-US/index.ts +56 -0
  113. package/src/components/UIKitModal/chatErrorModal/i18n/index.ts +4 -0
  114. package/src/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.ts +56 -0
  115. package/src/components/UIKitModal/chatErrorModal/index.ts +16 -0
  116. package/src/components/VideoSettingPanel/index.vue +1 -0
  117. package/src/hooks/useReadReceipt/useReadReceipt.ts +5 -4
  118. package/src/types/beauty.ts +20 -0
  119. package/src/types/participant.ts +3 -0
  120. package/src/types/room.ts +49 -1
  121. package/src/utils/call.ts +8 -0
  122. package/dist/index-BvFYOUyz.js +0 -2936
@@ -1,4 +1,4 @@
1
- import { E as l, P as f, a as h } from "../../../../index-C8Jw_xE4.js";
1
+ import { E as l, P as f, a as h } from "../../../../index-DuAffztD.js";
2
2
  function g(e) {
3
3
  if (typeof Intl < "u" && "Segmenter" in Intl) {
4
4
  const r = new Intl.Segmenter("en", { granularity: "grapheme" });
@@ -1,4 +1,4 @@
1
- import { I as t } from "../../../../index-CiYL_XsE.js";
1
+ import { I as t } from "../../../../index-hHVD-MG2.js";
2
2
  import { MessageContentType as n } from "../../../../states/MessageInputState/type.js";
3
3
  function o() {
4
4
  return t.extend({
@@ -1,4 +1,4 @@
1
- import { E as t } from "../../../../index-C8Jw_xE4.js";
1
+ import { E as t } from "../../../../index-DuAffztD.js";
2
2
  function n(e) {
3
3
  return t.create({
4
4
  name: "enterKey",
@@ -1,5 +1,5 @@
1
- import { I as g } from "../../../../index-CiYL_XsE.js";
2
- import { P as m, a as f } from "../../../../index-C8Jw_xE4.js";
1
+ import { I as g } from "../../../../index-hHVD-MG2.js";
2
+ import { P as m, a as f } from "../../../../index-DuAffztD.js";
3
3
  function I() {
4
4
  return g.extend({
5
5
  addOptions() {
@@ -1,5 +1,5 @@
1
- import { P as V, a as K, D as F, b as G, e as z, N as j, c as J, m as q } from "../../../../index-C8Jw_xE4.js";
2
- import { V as Q } from "../../../../index-CzCDLp99.js";
1
+ import { P as V, a as K, D as F, b as G, e as z, N as j, c as J, m as q } from "../../../../index-DuAffztD.js";
2
+ import { V as Q } from "../../../../index-DXC5bPY4.js";
3
3
  import { ConversationType as X } from "../../../../types/engine.js";
4
4
  import Y from "./MentionSuggestion.js";
5
5
  import { useGroupSettingState as Z } from "../../../../states/GroupSettingState/GroupSettingState.js";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as b, computed as I, watch as i, onBeforeUnmount as S, createElementBlock as B, openBlock as L, normalizeClass as r, unref as n, createElementVNode as p, createVNode as M, renderSlot as c } from "vue";
2
2
  import { useUIKit as y } from "@tencentcloud/uikit-base-component-vue3";
3
- import { u as N, a as P } from "../../../index-CzCDLp99.js";
3
+ import { u as N, a as P } from "../../../index-DXC5bPY4.js";
4
4
  import { createExtensions as U, convertEditorContent as V } from "./EditorCore.js";
5
5
  import { useMessageInputState as k } from "../../../states/MessageInputState/MessageInputState.js";
6
6
  import { useConversationListState as w } from "../../../states/ConversationListState/ConversationListState.js";
@@ -6,7 +6,7 @@ import n from "./EmojiPicker/EmojiPicker.js";
6
6
  import { TextEditor as c } from "./TextEditor/index.js";
7
7
  import s from "./AudioCallPicker/AudioCallPicker.js";
8
8
  import a from "./VideoCallPicker/VideoCallPicker.js";
9
- import { _ as p } from "../../MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js";
9
+ import { _ as p } from "../../MessageInput.vue_vue_type_script_setup_true_lang-3RVYOdkv.js";
10
10
  import { addI18n as o } from "../../i18n/index.js";
11
11
  import { resources as t } from "./i18n/index.js";
12
12
  o("en-US", { translation: { MessageInput: t["en-US"] } });
@@ -1,9 +1,9 @@
1
1
  import { ref as q, computed as D, provide as Se, inject as Pe, defineComponent as w, watch as te, h as ie, watchEffect as Be, markRaw as Oe, toRefs as $, createBlock as C, openBlock as h, unref as n, withCtx as g, createVNode as E, renderSlot as M, normalizeProps as x, guardReactiveProps as j, onMounted as ge, mergeDefaults as Ie, onUnmounted as Fe, mergeProps as A, nextTick as k, withModifiers as Ee, createElementBlock as N, Fragment as U, normalizeClass as Q, renderList as ke, normalizeStyle as Ae, createCommentVNode as ue, resolveDynamicComponent as de, createElementVNode as Te, toDisplayString as fe } from "vue";
2
2
  import { useUIKit as Re } from "@tencentcloud/uikit-base-component-vue3";
3
3
  import { c as Z } from "../../../../../index-DPczIrgX.js";
4
- import { i as De, l as xe, g as z, j as Ne, S as pe, a as _e, c as K, P as oe, m as $e, n as ce, b as Ke, u as T, F as Le, D as Ve, d as Ue, e as ze, T as je, f as Ge } from "../../../../../Teleport-DFrneqLM.js";
5
- import { P as We, a as Xe, b as Ye, c as He, e as Je, d as G } from "../../../../../PopperContent-SLoFuK7k.js";
6
- import { g as Qe, i as Ze, a as ee, F as et, f as tt, L as ot, S as nt, I as rt } from "../../../../../utils-CttDpxqz.js";
4
+ import { i as De, l as xe, g as z, j as Ne, S as pe, a as _e, c as K, P as oe, m as $e, n as ce, b as Ke, u as T, F as Le, D as Ve, d as Ue, e as ze, T as je, f as Ge } from "../../../../../Teleport-98QrIYDI.js";
5
+ import { P as We, a as Xe, b as Ye, c as He, e as Je, d as G } from "../../../../../PopperContent-D__dbwpA.js";
6
+ import { g as Qe, i as Ze, a as ee, F as et, f as tt, L as ot, S as nt, I as rt } from "../../../../../utils-BU8IkP_V.js";
7
7
  import { useMessageActions as at } from "../../../../../hooks/useMessageActions.js";
8
8
  import { _ as st } from "../../../../../_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const lt = ["INPUT", "TEXTAREA"];
@@ -1,10 +1,10 @@
1
- import { defineComponent as y, useCssModule as v, computed as l, createBlock as d, openBlock as t, unref as a, normalizeClass as u, withCtx as C, createElementBlock as r, createCommentVNode as m, Fragment as _, toDisplayString as i } from "vue";
2
- import { useUIKit as M } from "@tencentcloud/uikit-base-component-vue3";
3
- import { View as I } from "../../../../../baseComp/View/index.js";
4
- import { getTimeStampAuto as w } from "../../../../../utils/time.js";
5
- import x from "./MessageStatusIcon.js";
6
- import { _ as $ } from "../../../../../_plugin-vue_export-helper-CHgC5LLL.js";
7
- const B = /* @__PURE__ */ y({
1
+ import { defineComponent as M, useCssModule as I, computed as c, createBlock as p, openBlock as s, unref as a, normalizeClass as u, withCtx as w, createElementBlock as r, createCommentVNode as m, Fragment as f, toDisplayString as l } from "vue";
2
+ import { useUIKit as x } from "@tencentcloud/uikit-base-component-vue3";
3
+ import { View as $ } from "../../../../../baseComp/View/index.js";
4
+ import { getTimeStampAuto as B } from "../../../../../utils/time.js";
5
+ import G from "./MessageStatusIcon.js";
6
+ import { _ as S } from "../../../../../_plugin-vue_export-helper-CHgC5LLL.js";
7
+ const h = /* @__PURE__ */ M({
8
8
  __name: "MessageMeta",
9
9
  props: {
10
10
  isGroup: { type: Boolean },
@@ -15,51 +15,60 @@ const B = /* @__PURE__ */ y({
15
15
  status: { default: void 0 }
16
16
  },
17
17
  emits: ["onReadReceiptTextClick"],
18
- setup(p, { emit: f }) {
19
- const e = p, g = f, { t: n } = M(), o = v(), c = l(() => w(e.timestamp)), k = () => {
20
- g("onReadReceiptTextClick");
21
- }, R = l(() => e.flow === "out" && (!e.needReadReceipt || e.status === "unSend" || e.status === "fail")), s = l(() => !e.needReadReceipt || e.status !== "success" || !e.readReceiptInfo || e.flow === "in" ? "" : e.isGroup ? e.readReceiptInfo.unreadCount > 0 ? `${e.readReceiptInfo.unreadCount} ${n("MessageList.unread")} ·` : `${n("MessageList.all_read")} ·` : e.readReceiptInfo.isPeerRead ? `${n("MessageList.read")} ·` : `${n("MessageList.unread")} ·`);
22
- return (h, T) => (t(), d(a(I), {
18
+ setup(g, { emit: k }) {
19
+ const e = g, R = k, { t: n } = x(), o = I(), d = c(() => B(e.timestamp)), v = () => {
20
+ R("onReadReceiptTextClick");
21
+ }, y = c(() => e.flow === "out" && (!e.needReadReceipt || e.status === "unSend" || e.status === "fail")), t = c(() => {
22
+ if (!e.needReadReceipt || e.status !== "success" || !e.readReceiptInfo || e.flow === "in")
23
+ return "";
24
+ const {
25
+ readCount: _,
26
+ unreadCount: i,
27
+ isPeerRead: C
28
+ } = e.readReceiptInfo;
29
+ return e.isGroup ? i === void 0 || _ === void 0 ? "" : i > 0 ? `${i} ${n("MessageList.unread")} ·` : `${n("MessageList.all_read")} ·` : C ? `${n("MessageList.read")} ·` : `${n("MessageList.unread")} ·`;
30
+ });
31
+ return (_, i) => (s(), p(a($), {
23
32
  class: u(a(o)["message-meta"]),
24
33
  dir: "row",
25
34
  align: "center"
26
35
  }, {
27
- default: C(() => [
28
- R.value ? (t(), r(_, { key: 0 }, [
29
- e.status ? (t(), d(x, {
36
+ default: w(() => [
37
+ y.value ? (s(), r(f, { key: 0 }, [
38
+ e.status ? (s(), p(G, {
30
39
  key: 0,
31
40
  status: e.status
32
41
  }, null, 8, ["status"])) : m("", !0)
33
- ], 64)) : s.value ? (t(), r(_, { key: 1 }, [
34
- s.value && !e.isGroup ? (t(), r("span", {
42
+ ], 64)) : t.value ? (s(), r(f, { key: 1 }, [
43
+ t.value && !e.isGroup ? (s(), r("span", {
35
44
  key: 0,
36
45
  class: u(a(o)["message-meta__read-status"])
37
- }, i(s.value), 3)) : s.value && e.isGroup && e.readReceiptInfo && e.readReceiptInfo.unreadCount > 0 ? (t(), r("span", {
46
+ }, l(t.value), 3)) : t.value && e.isGroup && e.readReceiptInfo && e.readReceiptInfo.unreadCount > 0 ? (s(), r("span", {
38
47
  key: 1,
39
48
  class: u(a(o)["message-meta__group-unread"]),
40
- onClick: k
41
- }, i(s.value), 3)) : s.value && e.isGroup ? (t(), r("span", {
49
+ onClick: v
50
+ }, l(t.value), 3)) : t.value && e.isGroup ? (s(), r("span", {
42
51
  key: 2,
43
52
  class: u(a(o)["message-meta__group-all-read"])
44
- }, i(s.value), 3)) : m("", !0)
53
+ }, l(t.value), 3)) : m("", !0)
45
54
  ], 64)) : m("", !0),
46
- c.value ? (t(), r("span", {
55
+ d.value ? (s(), r("span", {
47
56
  key: 2,
48
57
  class: u(a(o)["message-meta__time"])
49
- }, i(c.value), 3)) : m("", !0)
58
+ }, l(d.value), 3)) : m("", !0)
50
59
  ]),
51
60
  _: 1
52
61
  }, 8, ["class"]));
53
62
  }
54
- }), G = {
63
+ }), T = {
55
64
  "message-meta": "_message-meta_rk5t7_1",
56
65
  "message-meta__read-status": "_message-meta__read-status_rk5t7_6",
57
66
  "message-meta__group-unread": "_message-meta__group-unread_rk5t7_9",
58
67
  "message-meta__group-all-read": "_message-meta__group-all-read_rk5t7_18",
59
68
  "message-meta__time": "_message-meta__time_rk5t7_21"
60
- }, S = {
61
- $style: G
62
- }, E = /* @__PURE__ */ $(B, [["__cssModules", S]]);
69
+ }, L = {
70
+ $style: T
71
+ }, F = /* @__PURE__ */ S(h, [["__cssModules", L]]);
63
72
  export {
64
- E as default
73
+ F as default
65
74
  };
@@ -1,21 +1,22 @@
1
- import { defineComponent as Q, useSlots as Y, provide as Z, ref as v, computed as y, watch as A, nextTick as G, onMounted as ee, onUnmounted as te, createElementBlock as _, openBlock as c, createElementVNode as L, createVNode as N, createBlock as T, createCommentVNode as se, unref as n, withCtx as O, Fragment as V, renderList as F, normalizeClass as $, resolveDynamicComponent as U } from "vue";
2
- import { c as x } from "../../index-DPczIrgX.js";
3
- import oe from "../../baseComp/ObserverView/ObserverView.js";
4
- import { View as ie } from "../../baseComp/View/index.js";
5
- import { useScroll as ae } from "../../hooks/useScroll.js";
6
- import { ConversationType as le, MessageType as re } from "../../types/engine.js";
7
- import { isCallMessage as z } from "../../utils/call.js";
8
- import { throttle as ne } from "../../utils/lodash.js";
9
- import { Message as ue } from "./Message/index.js";
10
- import ce from "./MessageForward/MessageForward.js";
11
- import { MessageListContextSymbol as me } from "./MessageListContext.js";
12
- import ve from "./MessageTimeDivider/MessageTimeDivider.js";
13
- import ge from "./ScrollToBottom/ScrollToBottom.js";
14
- import { useGroupSettingState as fe } from "../../states/GroupSettingState/GroupSettingState.js";
15
- import { useConversationListState as de } from "../../states/ConversationListState/ConversationListState.js";
16
- import { useMessageListState as pe } from "../../states/MessageListState/MessageListState.js";
17
- import { _ as he } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
18
- const Me = { class: "message-list" }, ke = { class: "message-chunk" }, b = 150, Te = /* @__PURE__ */ Q({
1
+ import { defineComponent as Z, useSlots as ee, provide as te, ref as v, computed as y, watch as A, nextTick as L, onMounted as se, onUnmounted as oe, createElementBlock as _, openBlock as c, createElementVNode as b, createVNode as N, createBlock as T, createCommentVNode as ae, unref as n, withCtx as O, Fragment as V, renderList as $, normalizeClass as I, resolveDynamicComponent as U } from "vue";
2
+ import { c as P } from "../../index-DPczIrgX.js";
3
+ import ie from "../../baseComp/ObserverView/ObserverView.js";
4
+ import { View as le } from "../../baseComp/View/index.js";
5
+ import { useReadReceipt as re } from "../../hooks/useReadReceipt/useReadReceipt.js";
6
+ import { useScroll as ne } from "../../hooks/useScroll.js";
7
+ import { ConversationType as ue, MessageType as ce } from "../../types/engine.js";
8
+ import { isCallMessage as x } from "../../utils/call.js";
9
+ import { throttle as me } from "../../utils/lodash.js";
10
+ import { Message as ve } from "./Message/index.js";
11
+ import ge from "./MessageForward/MessageForward.js";
12
+ import { MessageListContextSymbol as fe } from "./MessageListContext.js";
13
+ import de from "./MessageTimeDivider/MessageTimeDivider.js";
14
+ import pe from "./ScrollToBottom/ScrollToBottom.js";
15
+ import { useGroupSettingState as he } from "../../states/GroupSettingState/GroupSettingState.js";
16
+ import { useConversationListState as Me } from "../../states/ConversationListState/ConversationListState.js";
17
+ import { useMessageListState as ke } from "../../states/MessageListState/MessageListState.js";
18
+ import { _ as Te } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
19
+ const Ce = { class: "message-list" }, Se = { class: "message-chunk" }, D = 150, ye = /* @__PURE__ */ Z({
19
20
  __name: "MessageList",
20
21
  props: {
21
22
  alignment: { default: "two-sided" },
@@ -27,19 +28,26 @@ const Me = { class: "message-list" }, ke = { class: "message-chunk" }, b = 150,
27
28
  MessageTimeDivider: { default: void 0 }
28
29
  },
29
30
  setup(C) {
30
- const a = C, I = Y();
31
- Z(me, { slots: I });
32
- const f = v(!1), d = v(0), p = v(!1), t = v(null), h = v(!1), B = v(0), {
31
+ const a = C, z = ee();
32
+ te(fe, { slots: z });
33
+ const f = v(!1), d = v(0), p = v(!1), t = v(null), h = v(!1), R = v(0), {
33
34
  messageList: g,
34
- loadMoreOlderMessage: P,
35
- activeConversationID: W,
36
- isDisableScroll: X,
35
+ loadMoreOlderMessage: W,
36
+ activeConversationID: X,
37
+ isDisableScroll: j,
37
38
  setIsDisableScroll: M,
38
- setEnableReadReceipt: j
39
- } = pe(), { getGroupMemberList: q } = fe(), { scrollToBottom: S } = ae(), { activeConversation: J } = de(), D = y(() => {
39
+ setEnableReadReceipt: q
40
+ } = ke(), { getGroupMemberList: J } = he(), { scrollToBottom: S } = ne(), { activeConversation: K } = Me(), {
41
+ observeMessageList: B,
42
+ resetProcessedMessages: Q
43
+ } = re({
44
+ enabled: a.enableReadReceipt ?? !1,
45
+ containerSelector: "#messageScrollList",
46
+ getMessageIDFromDom: (s) => s.dataset.messageId || ""
47
+ }), H = y(() => {
40
48
  var s;
41
- return ((s = J.value) == null ? void 0 : s.type) === le.GROUP;
42
- }), m = y(() => a.messageAggregationTime && a.messageAggregationTime > 0), H = y(() => {
49
+ return ((s = K.value) == null ? void 0 : s.type) === ue.GROUP;
50
+ }), m = y(() => a.messageAggregationTime && a.messageAggregationTime > 0), w = y(() => {
43
51
  if (!g.value)
44
52
  return [];
45
53
  const s = a.filter ? g.value.filter(a.filter) : g.value.filter((e) => !e.isDeleted);
@@ -51,26 +59,26 @@ const Me = { class: "message-list" }, ke = { class: "message-chunk" }, b = 150,
51
59
  }));
52
60
  const o = [], i = a.messageAggregationTime;
53
61
  return s.forEach((e, u, r) => {
54
- const E = e.time, k = o.length > 0 ? o[o.length - 1] : void 0, l = u > 0 ? r[u - 1] : void 0;
55
- !k || E - k.timestamp > i || k.messages[0].from !== e.from || e.isRevoked || l && l.isRevoked || e.status === "fail" || l && l.status === "fail" || e.hasRiskContent || l && l.hasRiskContent || z(e) || l && z(l) || l && l.type === re.CUSTOM && l.getMessageContent().businessID === "group_create" ? o.push({
56
- timestamp: E,
62
+ const G = e.time, k = o.length > 0 ? o[o.length - 1] : void 0, l = u > 0 ? r[u - 1] : void 0;
63
+ !k || G - k.timestamp > i || k.messages[0].from !== e.from || e.isRevoked || l && l.isRevoked || e.status === "fail" || l && l.status === "fail" || e.hasRiskContent || l && l.hasRiskContent || x(e) || l && x(l) || l && l.type === ce.CUSTOM && l.getMessageContent().businessID === "group_create" ? o.push({
64
+ timestamp: G,
57
65
  messages: [e],
58
66
  key: `chunk-${e.ID}`
59
67
  }) : k.messages.push(e);
60
68
  }), o;
61
- }), R = ne(() => {
62
- t.value && (d.value = t.value.scrollHeight - t.value.scrollTop - t.value.clientHeight, d.value > b && (M(!0), h.value = !0), d.value < b && (M(!1), h.value = !1));
63
- }, 100), w = async () => {
64
- f.value = !1, M(!1), h.value = !1;
65
- }, K = async () => {
69
+ }), E = me(() => {
70
+ t.value && (d.value = t.value.scrollHeight - t.value.scrollTop - t.value.clientHeight, d.value > D && (M(!0), h.value = !0), d.value < D && (M(!1), h.value = !1));
71
+ }, 100), F = async () => {
72
+ f.value = !1, M(!1), h.value = !1, Q();
73
+ }, Y = async () => {
66
74
  var s;
67
75
  if (!(!f.value || p.value || !((s = g.value) != null && s.length))) {
68
76
  if (M(!0), p.value = !0, !t.value) {
69
77
  p.value = !1;
70
78
  return;
71
79
  }
72
- if (B.value = t.value.scrollHeight - t.value.scrollTop - t.value.clientHeight, await P(), await G(), t.value) {
73
- const o = t.value.scrollHeight - t.value.clientHeight - B.value;
80
+ if (R.value = t.value.scrollHeight - t.value.scrollTop - t.value.clientHeight, await W(), await L(), t.value) {
81
+ const o = t.value.scrollHeight - t.value.clientHeight - R.value;
74
82
  t.value.scrollTop = Math.max(0, Math.min(
75
83
  t.value.scrollHeight - t.value.clientHeight,
76
84
  o
@@ -79,58 +87,60 @@ const Me = { class: "message-list" }, ke = { class: "message-chunk" }, b = 150,
79
87
  p.value = !1;
80
88
  }
81
89
  };
82
- return A(W, () => {
83
- w();
90
+ return A(X, () => {
91
+ F();
84
92
  }), A(g, (s, o) => {
85
93
  if (o === void 0 && s && !f.value) {
86
- G(() => {
87
- S({ behavior: "instant" }), f.value = !0;
88
- }), D.value && q();
94
+ L(() => {
95
+ S({ behavior: "instant" }), f.value = !0, B();
96
+ }), H.value && J();
89
97
  return;
90
98
  }
91
99
  if (!o || !s || !s.length)
92
100
  return;
93
101
  const i = s[s.length - 1], e = o[o.length - 1];
94
- (i == null ? void 0 : i.ID) !== (e == null ? void 0 : e.ID) && (i.flow === "out" || !X.value && d.value < b) && S({ behavior: "smooth" });
102
+ (i == null ? void 0 : i.ID) !== (e == null ? void 0 : e.ID) && (L(() => {
103
+ B();
104
+ }), (i.flow === "out" || !j.value && d.value < D) && S({ behavior: "smooth" }));
95
105
  }, {
96
106
  immediate: !0
97
107
  }), A(() => a.enableReadReceipt, (s) => {
98
- j(s);
108
+ q(s);
99
109
  }, {
100
110
  immediate: !0
101
- }), ee(() => {
102
- t.value && t.value.addEventListener("scroll", R), w();
103
- }), te(() => {
104
- t.value && t.value.removeEventListener("scroll", R);
105
- }), (s, o) => (c(), _("div", Me, [
106
- L("div", {
111
+ }), se(() => {
112
+ t.value && t.value.addEventListener("scroll", E), F();
113
+ }), oe(() => {
114
+ t.value && t.value.removeEventListener("scroll", E);
115
+ }), (s, o) => (c(), _("div", Ce, [
116
+ b("div", {
107
117
  id: "messageScrollList",
108
118
  ref_key: "scrollContainer",
109
119
  ref: t,
110
120
  class: "message-list-container"
111
121
  }, [
112
- N(n(oe), {
122
+ N(n(ie), {
113
123
  root: "#messageScrollList",
114
124
  rootMargin: "50px 0px 0px 0px",
115
125
  threshold: 0.1,
116
- onOnShow: K
126
+ onOnShow: Y
117
127
  }, {
118
128
  default: O(() => [...o[1] || (o[1] = [
119
- L("div", { id: "loadMore" }, null, -1)
129
+ b("div", { id: "loadMore" }, null, -1)
120
130
  ])]),
121
131
  _: 1
122
132
  }),
123
- (c(!0), _(V, null, F(H.value, (i, e) => (c(), T(n(ie), {
133
+ (c(!0), _(V, null, $(w.value, (i, e) => (c(), T(n(le), {
124
134
  key: i.key,
125
- class: $(n(x)("message-chunk--container"))
135
+ class: I(n(P)("message-chunk--container"))
126
136
  }, {
127
137
  default: O(() => [
128
- (c(), T(U(a.MessageTimeDivider || n(ve)), {
129
- previousMessage: e > 0 ? H.value[e - 1].messages[0] : void 0,
138
+ (c(), T(U(a.MessageTimeDivider || n(de)), {
139
+ previousMessage: e > 0 ? w.value[e - 1].messages[0] : void 0,
130
140
  currentMessage: i.messages[0]
131
141
  }, null, 8, ["previousMessage", "currentMessage"])),
132
- L("div", ke, [
133
- (c(!0), _(V, null, F(i.messages, (u, r) => (c(), T(U(a.Message || n(ue)), {
142
+ b("div", Se, [
143
+ (c(!0), _(V, null, $(i.messages, (u, r) => (c(), T(U(a.Message || n(ve)), {
134
144
  key: u.ID,
135
145
  message: u,
136
146
  alignment: a.alignment,
@@ -139,7 +149,7 @@ const Me = { class: "message-list" }, ke = { class: "message-chunk" }, b = 150,
139
149
  "is-first-in-chunk": r === 0,
140
150
  "is-last-in-chunk": r === i.messages.length - 1,
141
151
  isHiddenMessageAvatar: !!(C.alignment === "two-sided" ? m.value && r !== 0 || u.flow === "out" : m.value && r !== 0),
142
- "is-hidden-message-nick": !!(!D.value || (C.alignment === "two-sided" ? m.value && r !== 0 || u.flow === "out" : m.value && r !== 0)),
152
+ "is-hidden-message-nick": !!(!H.value || (C.alignment === "two-sided" ? m.value && r !== 0 || u.flow === "out" : m.value && r !== 0)),
143
153
  isHiddenMessageMeta: !!(m.value && r !== i.messages.length - 1)
144
154
  }, null, 8, ["message", "alignment", "messageActionList", "isAggregated", "is-first-in-chunk", "is-last-in-chunk", "isHiddenMessageAvatar", "is-hidden-message-nick", "isHiddenMessageMeta"]))), 128))
145
155
  ])
@@ -147,15 +157,15 @@ const Me = { class: "message-list" }, ke = { class: "message-chunk" }, b = 150,
147
157
  _: 2
148
158
  }, 1032, ["class"]))), 128))
149
159
  ], 512),
150
- N(n(ce)),
151
- h.value ? (c(), T(n(ge), {
160
+ N(n(ge)),
161
+ h.value ? (c(), T(n(pe), {
152
162
  key: 0,
153
- class: $(n(x)("scroll-to-bottom")),
163
+ class: I(n(P)("scroll-to-bottom")),
154
164
  onClick: o[0] || (o[0] = (i) => n(S)({ behavior: "smooth" }))
155
- }, null, 8, ["class"])) : se("", !0)
165
+ }, null, 8, ["class"])) : ae("", !0)
156
166
  ]));
157
167
  }
158
- }), $e = /* @__PURE__ */ he(Te, [["__scopeId", "data-v-85ea222b"]]);
168
+ }), xe = /* @__PURE__ */ Te(ye, [["__scopeId", "data-v-07d705f7"]]);
159
169
  export {
160
- $e as default
170
+ xe as default
161
171
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as b, createElementBlock as d, openBlock as c, toDisplayString as t, unref as n, createElementVNode as o, createCommentVNode as v, createTextVNode as r, createVNode as m, normalizeClass as w } from "vue";
2
- import { useUIKit as R, IconCopy as I, IconLoadingSchedule as C, TUIToast as g } from "@tencentcloud/uikit-base-component-vue3";
3
- import { copyText as T } from "./utils.js";
1
+ import { defineComponent as w, createElementBlock as d, openBlock as l, toDisplayString as t, unref as n, createElementVNode as o, createCommentVNode as v, createTextVNode as r, createVNode as m, normalizeClass as R } from "vue";
2
+ import { useUIKit as C, IconCopy as I, IconLoadingSchedule as T, TUIToast as g } from "@tencentcloud/uikit-base-component-vue3";
3
+ import { copyText as b } from "./utils.js";
4
4
  import { RoomStatus as u } from "../../types/room.js";
5
5
  import { _ as A } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  const D = { class: "room-detail" }, x = {
@@ -18,20 +18,20 @@ const D = { class: "room-detail" }, x = {
18
18
  }, X = ["title"], Z = {
19
19
  key: 2,
20
20
  class: "no-attendees"
21
- }, p = /* @__PURE__ */ b({
21
+ }, p = /* @__PURE__ */ w({
22
22
  __name: "RoomDetail",
23
23
  props: {
24
24
  roomInfo: {},
25
25
  isLoadingAttendees: { type: Boolean, default: !1 }
26
26
  },
27
27
  setup(e) {
28
- const { t: s } = R(), f = (l) => {
29
- if (!l)
28
+ const { t: s } = C(), f = (c) => {
29
+ if (!c)
30
30
  return "--";
31
- const i = new Date(l * 1e3), a = i.getFullYear(), S = (i.getMonth() + 1).toString().padStart(2, "0"), _ = i.getDate().toString().padStart(2, "0"), k = i.getHours().toString().padStart(2, "0"), N = i.getMinutes().toString().padStart(2, "0");
31
+ const i = new Date(c * 1e3), a = i.getFullYear(), S = (i.getMonth() + 1).toString().padStart(2, "0"), _ = i.getDate().toString().padStart(2, "0"), k = i.getHours().toString().padStart(2, "0"), N = i.getMinutes().toString().padStart(2, "0");
32
32
  return `${a}-${S}-${_} ${k}:${N}`;
33
- }, y = (l) => {
34
- switch (l) {
33
+ }, y = (c) => {
34
+ switch (c) {
35
35
  case u.Scheduled:
36
36
  return s("Not Started");
37
37
  case u.Running:
@@ -39,11 +39,11 @@ const D = { class: "room-detail" }, x = {
39
39
  default:
40
40
  return s("Unknown Status");
41
41
  }
42
- }, h = async (l) => {
43
- await T(l) ? g.success({ message: s("Copy Success") }) : g.error({ message: s("Copy Failed") });
42
+ }, h = async (c) => {
43
+ await b(c) ? g.success({ message: s("Copy Success") }) : g.error({ message: s("Copy Failed") });
44
44
  };
45
- return (l, i) => (c(), d("div", D, [
46
- e.roomInfo ? (c(), d("div", $, [
45
+ return (c, i) => (l(), d("div", D, [
46
+ e.roomInfo ? (l(), d("div", $, [
47
47
  o("div", L, [
48
48
  o("div", V, t(n(s)("Room Name")), 1),
49
49
  o("div", B, t(e.roomInfo.roomName), 1)
@@ -61,7 +61,7 @@ const D = { class: "room-detail" }, x = {
61
61
  })
62
62
  ])
63
63
  ]),
64
- e.roomInfo.password ? (c(), d("div", z, [
64
+ e.roomInfo.password ? (l(), d("div", z, [
65
65
  o("div", F, t(n(s)("Room Password")), 1),
66
66
  o("div", M, [
67
67
  r(t(e.roomInfo.password) + " ", 1),
@@ -78,9 +78,9 @@ const D = { class: "room-detail" }, x = {
78
78
  o("div", P, t(n(s)("Room Time")), 1),
79
79
  o("div", H, [
80
80
  r(t(f(e.roomInfo.scheduledStartTime)) + " - " + t(f(e.roomInfo.scheduledEndTime)) + " ", 1),
81
- e.roomInfo.roomStatus ? (c(), d("span", {
81
+ e.roomInfo.roomStatus ? (l(), d("span", {
82
82
  key: 0,
83
- class: w(["status-badge", e.roomInfo.roomStatus === n(u).Running && "running"])
83
+ class: R(["status-badge", e.roomInfo.roomStatus === n(u).Running && "running"])
84
84
  }, t(y(e.roomInfo.roomStatus)), 3)) : v("", !0)
85
85
  ])
86
86
  ]),
@@ -91,23 +91,23 @@ const D = { class: "room-detail" }, x = {
91
91
  o("div", G, [
92
92
  o("div", J, t(n(s)("Attendees")), 1),
93
93
  o("div", Q, [
94
- e.isLoadingAttendees ? (c(), d("div", W, [
95
- m(n(C), {
94
+ e.isLoadingAttendees ? (l(), d("div", W, [
95
+ m(n(T), {
96
96
  class: "loading-icon",
97
97
  size: "16"
98
98
  }),
99
99
  o("span", null, t(n(s)("Loading...")), 1)
100
- ])) : e.roomInfo.scheduleAttendees && e.roomInfo.scheduleAttendees.length > 0 ? (c(), d("div", {
100
+ ])) : e.roomInfo.scheduleAttendees && e.roomInfo.scheduleAttendees.length > 0 ? (l(), d("div", {
101
101
  key: 1,
102
102
  class: "attendees-list",
103
103
  title: e.roomInfo.scheduleAttendees.map((a) => a.userName || a.userId).join(", ")
104
- }, t(e.roomInfo.scheduleAttendees.map((a) => a.userName || a.userId).join(", ")), 9, X)) : (c(), d("div", Z, t(n(s)("No scheduled members")), 1))
104
+ }, t(e.roomInfo.scheduleAttendees.map((a) => a.userName || a.userId).join(", ")), 9, X)) : (l(), d("div", Z, t(n(s)("No scheduled members")), 1))
105
105
  ])
106
106
  ])
107
- ])) : (c(), d("div", x, t(n(s)("No room information")), 1))
107
+ ])) : (l(), d("div", x, t(n(s)("No room information")), 1))
108
108
  ]));
109
109
  }
110
- }), ne = /* @__PURE__ */ A(p, [["__scopeId", "data-v-b6bcef44"]]);
110
+ }), ne = /* @__PURE__ */ A(p, [["__scopeId", "data-v-81fa9511"]]);
111
111
  export {
112
112
  ne as default
113
113
  };
@@ -275,7 +275,7 @@ const re = { class: "room-edit" }, ne = { class: "edit-form" }, ie = { class: "f
275
275
  ]);
276
276
  };
277
277
  }
278
- }), $e = /* @__PURE__ */ le(Ve, [["__scopeId", "data-v-4cd10f6f"]]);
278
+ }), $e = /* @__PURE__ */ le(Ve, [["__scopeId", "data-v-05d94b0a"]]);
279
279
  export {
280
280
  $e as default
281
281
  };
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as R, computed as C, createElementBlock as l, openBlock as h, toDisplayString as t, unref as n, createElementVNode as s, createCommentVNode as T, createTextVNode as v, createVNode as f, withCtx as w } from "vue";
2
2
  import { useUIKit as N, IconCopy as _, TUIButton as x, TUIToast as m } from "@tencentcloud/uikit-base-component-vue3";
3
3
  import { generateRoomLink as L, copyText as p } from "./utils.js";
4
- import { _ as b } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
5
- const D = { class: "room-share" }, B = {
4
+ import { _ as D } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
5
+ const b = { class: "room-share" }, B = {
6
6
  key: 0,
7
7
  class: "room-share-empty"
8
8
  }, E = {
@@ -42,7 +42,7 @@ const D = { class: "room-share" }, B = {
42
42
  `);
43
43
  await p(e) ? m.success({ message: o("Copy Success") }) : m.error({ message: o("Copy Failed") });
44
44
  };
45
- return (c, e) => (h(), l("div", D, [
45
+ return (c, e) => (h(), l("div", b, [
46
46
  r.roomInfo ? (h(), l("div", E, [
47
47
  s("div", V, [
48
48
  s("div", F, t(n(o)("Room Name")), 1),
@@ -104,7 +104,7 @@ const D = { class: "room-share" }, B = {
104
104
  ])) : (h(), l("div", B, t(n(o)("No room information")), 1))
105
105
  ]));
106
106
  }
107
- }), to = /* @__PURE__ */ b(X, [["__scopeId", "data-v-0ae4ba21"]]);
107
+ }), to = /* @__PURE__ */ D(X, [["__scopeId", "data-v-c5489163"]]);
108
108
  export {
109
109
  to as default
110
110
  };
@@ -379,7 +379,7 @@ const Ce = { class: "schedule-room-panel" }, xe = { class: "panel-content" }, Ie
379
379
  ]);
380
380
  };
381
381
  }
382
- }), Ut = /* @__PURE__ */ we(at, [["__scopeId", "data-v-05ebded9"]]);
382
+ }), Ut = /* @__PURE__ */ we(at, [["__scopeId", "data-v-9cd542ad"]]);
383
383
  export {
384
384
  Ut as default
385
385
  };
@@ -339,7 +339,7 @@ const Ae = {
339
339
  ], 544);
340
340
  };
341
341
  }
342
- }), ro = /* @__PURE__ */ Le(Pe, [["__scopeId", "data-v-39e98448"]]);
342
+ }), ro = /* @__PURE__ */ Le(Pe, [["__scopeId", "data-v-10df17f8"]]);
343
343
  export {
344
344
  ro as default
345
345
  };