tuikit-atomicx-vue3 3.3.3 → 3.3.4

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 (48) hide show
  1. package/dist/chat/index.d.ts +7 -1
  2. package/dist/chat/index.js +9 -0
  3. package/dist/chat/server.js +5 -0
  4. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  5. package/dist/components/BarrageInput/TextEditor/EditorCore.js +2 -2
  6. package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +2 -2
  7. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +3 -3
  8. package/dist/components/MessageInput/TextEditor/EditorCore.js +2 -2
  9. package/dist/components/MessageList/Message/RecalledMessage/RecalledMessage.js +9 -9
  10. package/dist/components/MessageList/Message/RecalledMessage/RecalledMessage.vue.d.ts +2 -2
  11. package/dist/components/MessageList/i18n/en-US.d.ts +7 -0
  12. package/dist/components/MessageList/i18n/en-US.js +8 -1
  13. package/dist/components/MessageList/i18n/index.d.ts +14 -0
  14. package/dist/components/MessageList/i18n/zh-CN.d.ts +7 -0
  15. package/dist/components/MessageList/i18n/zh-CN.js +8 -1
  16. package/dist/components/Search/SearchResults/SearchResults.js +20 -20
  17. package/dist/hooks/useMessageActions.js +6 -6
  18. package/dist/{index-t9cbWbGG.js → index-BPFJrNlA.js} +14 -12
  19. package/dist/{index-ex2Jv3Tj.js → index-v15JHz0-.js} +1 -1
  20. package/dist/index.js +8 -1
  21. package/dist/states/LoginState.js +3 -0
  22. package/dist/states/SearchState.js +1 -0
  23. package/dist/statistical/const.d.ts +4 -0
  24. package/dist/statistical/const.js +8 -0
  25. package/dist/statistical/index.d.ts +2 -0
  26. package/dist/statistical/index.js +6 -0
  27. package/dist/statistical/statistical.d.ts +10 -0
  28. package/dist/statistical/statistical.js +19 -0
  29. package/dist/styles/index.css +38 -37
  30. package/dist/types/chatSetting.d.ts +1 -0
  31. package/dist/types/chatSetting.js +6 -0
  32. package/dist/types/index.d.ts +1 -0
  33. package/dist/types/index.js +4 -0
  34. package/package.json +1 -1
  35. package/src/chat/index.ts +9 -0
  36. package/src/chat/server.ts +5 -0
  37. package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +1 -1
  38. package/src/components/MessageInput/EmojiPicker/EmojiPicker.module.scss +1 -1
  39. package/src/components/MessageList/Message/RecalledMessage/RecalledMessage.vue +10 -18
  40. package/src/components/MessageList/i18n/en-US.ts +8 -0
  41. package/src/components/MessageList/i18n/zh-CN.ts +8 -0
  42. package/src/components/Search/SearchResults/SearchResults.scss +1 -0
  43. package/src/hooks/useMessageActions.ts +6 -6
  44. package/src/statistical/const.ts +5 -0
  45. package/src/statistical/index.ts +2 -0
  46. package/src/statistical/statistical.ts +23 -0
  47. package/src/types/chatSetting.ts +5 -0
  48. package/src/types/index.ts +1 -0
@@ -4,6 +4,9 @@ import { useMessageActionState as messageActionState } from '../states/MessageAc
4
4
  import { useMessageInputState as messageInputState } from '../states/MessageInputState';
5
5
  import { useMessageListState as messageListState } from '../states/MessageListState';
6
6
  import { useSearchState as searchState } from '../states/SearchState';
7
+ import { useContactListState as contactListState } from '../states/ContactListState';
8
+ import { useC2CSettingState as c2cSettingState } from '../states/C2CSettingState';
9
+ import { useGroupSettingState as groupSettingState } from '../states/GroupSettingState';
7
10
 
8
11
  declare const Search: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
9
12
  style: {
@@ -16852,4 +16855,7 @@ declare const useMessageActionState: typeof messageActionState;
16852
16855
  declare const useMessageInputState: typeof messageInputState;
16853
16856
  declare const useMessageListState: typeof messageListState;
16854
16857
  declare const useSearchState: typeof searchState;
16855
- export { Search, SearchAdvanced, UserAdvanced, MessageAdvanced, SearchResults, SearchResultItem, SearchBar, ConversationList, ConversationActions, ConversationListHeader, ConversationListContent, ConversationPreview, ConversationPreviewUI, ConversationSearch, MessageList, Message, MessageInput, EmojiPicker, ChatSetting, View, ContactList, ContactListItem, ContactInfo, useMessageActions, useMessageListState, useMessageInputState, useMessageActionState, useConversationListState, useSearchState, };
16858
+ declare const useContactListState: typeof contactListState;
16859
+ declare const useC2CSettingState: typeof c2cSettingState;
16860
+ declare const useGroupSettingState: typeof groupSettingState;
16861
+ export { Search, SearchAdvanced, UserAdvanced, MessageAdvanced, SearchResults, SearchResultItem, SearchBar, ConversationList, ConversationActions, ConversationListHeader, ConversationListContent, ConversationPreview, ConversationPreviewUI, ConversationSearch, MessageList, Message, MessageInput, EmojiPicker, ChatSetting, View, ContactList, ContactListItem, ContactInfo, useMessageActions, useMessageListState, useMessageInputState, useMessageActionState, useConversationListState, useSearchState, useContactListState, useC2CSettingState, useGroupSettingState, };
@@ -8,6 +8,9 @@ import { Search as Search$1, SearchAdvanced as SearchAdvanced$1, UserAdvanced as
8
8
  import { useMessageActions as useMessageActions$1 } from "../hooks/useMessageActions.js";
9
9
  import { useSearchState as useSearchState$1 } from "../states/SearchState.js";
10
10
  import ChatLoginServer from "./server.js";
11
+ import { useContactListState as useContactListState$1 } from "../states/ContactListState/ContactListState.js";
12
+ import { useC2CSettingState as useC2CSettingState$1 } from "../states/C2CSettingState/C2CSettingState.js";
13
+ import { useGroupSettingState as useGroupSettingState$1 } from "../states/GroupSettingState/GroupSettingState.js";
11
14
  import { useMessageListState as useMessageListState$1 } from "../states/MessageListState/MessageListState.js";
12
15
  import { useMessageInputState as useMessageInputState$1 } from "../states/MessageInputState/MessageInputState.js";
13
16
  import { useMessageActionState as useMessageActionState$1 } from "../states/MessageActionState/MessageActionState.js";
@@ -42,6 +45,9 @@ const useMessageActionState = useMessageActionState$1;
42
45
  const useMessageInputState = useMessageInputState$1;
43
46
  const useMessageListState = useMessageListState$1;
44
47
  const useSearchState = useSearchState$1;
48
+ const useContactListState = useContactListState$1;
49
+ const useC2CSettingState = useC2CSettingState$1;
50
+ const useGroupSettingState = useGroupSettingState$1;
45
51
  export {
46
52
  ChatSetting,
47
53
  ContactInfo,
@@ -66,7 +72,10 @@ export {
66
72
  SearchResults,
67
73
  UserAdvanced,
68
74
  View,
75
+ useC2CSettingState,
76
+ useContactListState,
69
77
  useConversationListState,
78
+ useGroupSettingState,
70
79
  useMessageActionState,
71
80
  useMessageActions,
72
81
  useMessageInputState,
@@ -5,6 +5,10 @@ import { ref } from "vue";
5
5
  import TUIChatEngine from "@tencentcloud/chat-uikit-engine";
6
6
  import TUICore, { TUIConstants, TUILogin } from "@tencentcloud/tui-core";
7
7
  import { useLoginState } from "../states/LoginState.js";
8
+ import { ChatSceneType } from "../statistical/const.js";
9
+ import { useStatistical } from "../statistical/statistical.js";
10
+ import { isPC } from "../utils/env.js";
11
+ const { setChatScene } = useStatistical();
8
12
  const _ChatLoginServer = class _ChatLoginServer {
9
13
  constructor() {
10
14
  __publicField(this, "isReady", false);
@@ -21,6 +25,7 @@ const _ChatLoginServer = class _ChatLoginServer {
21
25
  return _ChatLoginServer.instance;
22
26
  }
23
27
  init() {
28
+ setChatScene(isPC ? ChatSceneType.CHAT_WEB : ChatSceneType.CHAT_H5);
24
29
  if (!this.isReady) {
25
30
  this.isReady = true;
26
31
  TUICore.registerEvent(
@@ -1,4 +1,4 @@
1
- import { E as Extension, P as Plugin, a as PluginKey } from "../../../index-t9cbWbGG.js";
1
+ import { E as Extension, P as Plugin, a as PluginKey } from "../../../index-BPFJrNlA.js";
2
2
  const CharacterCount = Extension.create({
3
3
  name: "characterCount",
4
4
  addOptions() {
@@ -1,7 +1,7 @@
1
- import { S as StarterKit, P as Placeholder, E as Editor, I as Image } from "../../../index-ex2Jv3Tj.js";
1
+ import { S as StarterKit, P as Placeholder, E as Editor, I as Image } from "../../../index-v15JHz0-.js";
2
2
  import { isMobile } from "../../../utils/environment.js";
3
3
  import { CharacterCount } from "./CharacterCountExtension.js";
4
- import { E as Extension } from "../../../index-t9cbWbGG.js";
4
+ import { E as Extension } from "../../../index-BPFJrNlA.js";
5
5
  import { MessageContentType } from "../../../states/MessageInputState/type.js";
6
6
  function createEmojiExtension() {
7
7
  return Image.extend({
@@ -143,7 +143,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
143
143
  const generateGroupName = (userList) => {
144
144
  var _a, _b;
145
145
  const selfName = ((_a = loginUserInfo.value) == null ? void 0 : _a.userName) || ((_b = loginUserInfo.value) == null ? void 0 : _b.userId) || "";
146
- const name = selfName + userList.map((item) => (item == null ? void 0 : item.remark) || (item == null ? void 0 : item.nick) || (item == null ? void 0 : item.userID)).join("、");
146
+ const name = `${selfName}、` + userList.map((item) => (item == null ? void 0 : item.remark) || (item == null ? void 0 : item.nick) || (item == null ? void 0 : item.userID)).join("、");
147
147
  return name.length >= GROUP_NAME_LIMIT ? name.slice(0, GROUP_NAME_LIMIT) : name;
148
148
  };
149
149
  const handleConfirm = () => {
@@ -211,7 +211,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
211
211
  };
212
212
  }
213
213
  });
214
- const ConversationCreateComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bdcdab3b"]]);
214
+ const ConversationCreateComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7e2d265f"]]);
215
215
  export {
216
216
  ConversationCreateComponent as default
217
217
  };
@@ -7,9 +7,9 @@ import { useMessageInputState } from "../../../states/MessageInputState/MessageI
7
7
  import { MessageContentType } from "../../../states/MessageInputState/type.js";
8
8
  import { _ as _export_sfc } from "../../../_plugin-vue_export-helper-1tPrXgE0.js";
9
9
  const styles = {
10
- "emoji-picker__icon": "_emoji-picker__icon_z2wnx_1",
11
- "emoji-picker__list": "_emoji-picker__list_z2wnx_5",
12
- "emoji-picker__list-item": "_emoji-picker__list-item_z2wnx_16"
10
+ "emoji-picker__icon": "_emoji-picker__icon_b0gby_1",
11
+ "emoji-picker__list": "_emoji-picker__list_b0gby_5",
12
+ "emoji-picker__list-item": "_emoji-picker__list-item_b0gby_16"
13
13
  };
14
14
  const _hoisted_1 = { class: "flex flex-col gap-2.5" };
15
15
  const _hoisted_2 = ["onClick"];
@@ -1,5 +1,5 @@
1
- import { S as StarterKit, P as Placeholder, E as Editor, I as Image } from "../../../index-ex2Jv3Tj.js";
2
- import { E as Extension } from "../../../index-t9cbWbGG.js";
1
+ import { S as StarterKit, P as Placeholder, E as Editor, I as Image } from "../../../index-v15JHz0-.js";
2
+ import { E as Extension } from "../../../index-BPFJrNlA.js";
3
3
  import { MessageContentType } from "../../../states/MessageInputState/type.js";
4
4
  function createEmojiExtension() {
5
5
  return Image.extend({
@@ -1,8 +1,9 @@
1
1
  import { defineComponent, computed, createBlock, openBlock, unref, normalizeStyle, normalizeClass, withCtx, createElementBlock, Fragment, createTextVNode, createCommentVNode, toDisplayString } from "vue";
2
- import TUIChatEngine from "@tencentcloud/chat-uikit-engine";
3
2
  import { useUIKit } from "@tencentcloud/uikit-base-component-vue3";
4
3
  import { c as cs } from "../../../../index-BF6QB9jF.js";
5
4
  import { View as _sfc_main$1 } from "../../../../baseComp/View/index.js";
5
+ import { MessageType } from "../../../../types/engine.js";
6
+ import { useMessageInputState } from "../../../../states/MessageInputState/MessageInputState.js";
6
7
  import { _ as _export_sfc } from "../../../../_plugin-vue_export-helper-1tPrXgE0.js";
7
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
9
  __name: "RecalledMessage",
@@ -14,15 +15,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
15
  setup(__props) {
15
16
  const props = __props;
16
17
  const { t } = useUIKit();
17
- const setInputValue = (text) => {
18
- console.log("Set input value:", text);
19
- };
20
- const isTextMessage = computed(() => props.message.type === TUIChatEngine.TYPES.MSG_TEXT);
18
+ const { setContent, focusEditor } = useMessageInputState();
19
+ const isTextMessage = computed(() => props.message.type === MessageType.TEXT);
21
20
  const isMessageOwner = computed(() => props.message.flow === "out");
22
21
  const otherDisplayName = computed(() => props.message.nick || props.message.from || "");
23
22
  function recallMessageToInput() {
24
23
  const transformedText = props.message.payload.text;
25
- setInputValue(transformedText);
24
+ setContent(transformedText);
25
+ focusEditor();
26
26
  }
27
27
  return (_ctx, _cache) => {
28
28
  return openBlock(), createBlock(unref(_sfc_main$1), {
@@ -31,7 +31,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
31
  }, {
32
32
  default: withCtx(() => [
33
33
  isMessageOwner.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
34
- createTextVNode(toDisplayString(unref(t)("MessageList.you")) + toDisplayString(unref(t)("MessageList.recalled_a_message")) + " ", 1),
34
+ createTextVNode(toDisplayString(`${unref(t)("MessageList.you")} ${unref(t)("MessageList.recalled_a_message")}`) + " ", 1),
35
35
  isTextMessage.value ? (openBlock(), createBlock(unref(_sfc_main$1), {
36
36
  key: 0,
37
37
  role: "button",
@@ -44,7 +44,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
44
  _: 1
45
45
  })) : createCommentVNode("", true)
46
46
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
47
- createTextVNode(toDisplayString(otherDisplayName.value) + " " + toDisplayString(unref(t)("MessageList.recalled_a_message")), 1)
47
+ createTextVNode(toDisplayString(`${otherDisplayName.value} ${unref(t)("MessageList.recalled_a_message")}`), 1)
48
48
  ], 64))
49
49
  ]),
50
50
  _: 1
@@ -52,7 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
52
52
  };
53
53
  }
54
54
  });
55
- const RecalledMessage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c0fdcab9"]]);
55
+ const RecalledMessage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-63c123ed"]]);
56
56
  export {
57
57
  RecalledMessage as default
58
58
  };
@@ -1,7 +1,7 @@
1
- import { IMessageModel } from '@tencentcloud/chat-uikit-engine';
1
+ import { MessageModel } from '../../../../types';
2
2
 
3
3
  interface IRecalledMessageProps {
4
- message: IMessageModel;
4
+ message: MessageModel;
5
5
  class?: string;
6
6
  style?: Record<string, any>;
7
7
  }
@@ -38,5 +38,12 @@ declare const MessageList: {
38
38
  no_more: string;
39
39
  no_unread_members: string;
40
40
  yesterday: string;
41
+ copy_success: string;
42
+ copy_failed: string;
43
+ recall_success: string;
44
+ recall_failed: string;
45
+ recall_time_limit_exceeded: string;
46
+ delete_success: string;
47
+ delete_failed: string;
41
48
  };
42
49
  export default MessageList;
@@ -39,7 +39,14 @@ const MessageList = {
39
39
  no_read_members: "No Read Members",
40
40
  no_more: "No More",
41
41
  no_unread_members: "No Unread Members",
42
- yesterday: "Yesterday"
42
+ yesterday: "Yesterday",
43
+ copy_success: "Copied",
44
+ copy_failed: "Copy Failed",
45
+ recall_success: "Message recalled",
46
+ recall_failed: "Recall Failed",
47
+ recall_time_limit_exceeded: "Recall time limit exceeded",
48
+ delete_success: "Deleted",
49
+ delete_failed: "Delete Failed"
43
50
  };
44
51
  export {
45
52
  MessageList as default
@@ -39,6 +39,13 @@ declare const resources: {
39
39
  no_more: string;
40
40
  no_unread_members: string;
41
41
  yesterday: string;
42
+ copy_success: string;
43
+ copy_failed: string;
44
+ recall_success: string;
45
+ recall_failed: string;
46
+ recall_time_limit_exceeded: string;
47
+ delete_success: string;
48
+ delete_failed: string;
42
49
  };
43
50
  'zh-CN': {
44
51
  administrator: string;
@@ -80,6 +87,13 @@ declare const resources: {
80
87
  no_more: string;
81
88
  no_unread_members: string;
82
89
  yesterday: string;
90
+ copy_success: string;
91
+ copy_failed: string;
92
+ recall_success: string;
93
+ recall_failed: string;
94
+ recall_time_limit_exceeded: string;
95
+ delete_success: string;
96
+ delete_failed: string;
83
97
  };
84
98
  };
85
99
  export { resources };
@@ -38,5 +38,12 @@ declare const MessageList: {
38
38
  no_more: string;
39
39
  no_unread_members: string;
40
40
  yesterday: string;
41
+ copy_success: string;
42
+ copy_failed: string;
43
+ recall_success: string;
44
+ recall_failed: string;
45
+ recall_time_limit_exceeded: string;
46
+ delete_success: string;
47
+ delete_failed: string;
41
48
  };
42
49
  export default MessageList;
@@ -39,7 +39,14 @@ const MessageList = {
39
39
  no_read_members: "暂无已读成员",
40
40
  no_more: "已加载全部",
41
41
  no_unread_members: "暂无未读成员",
42
- yesterday: "昨天"
42
+ yesterday: "昨天",
43
+ copy_success: "已复制",
44
+ copy_failed: "复制失败",
45
+ recall_success: "消息已撤回",
46
+ recall_failed: "撤回失败",
47
+ recall_time_limit_exceeded: "撤回时间限制已过期",
48
+ delete_success: "删除成功",
49
+ delete_failed: "删除失败"
43
50
  };
44
51
  export {
45
52
  MessageList as default
@@ -392,31 +392,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
392
392
  };
393
393
  }
394
394
  });
395
- const SearchResults = "_SearchResults_17oxs_12";
396
- const SearchResults__list = "_SearchResults__list_17oxs_67";
397
- const SearchResults__error = "_SearchResults__error_17oxs_85";
398
- const SearchResults__highlight = "_SearchResults__highlight_17oxs_111";
395
+ const SearchResults = "_SearchResults_rr0x3_12";
396
+ const SearchResults__list = "_SearchResults__list_rr0x3_67";
397
+ const SearchResults__error = "_SearchResults__error_rr0x3_85";
398
+ const SearchResults__highlight = "_SearchResults__highlight_rr0x3_112";
399
399
  const style0 = {
400
400
  SearchResults,
401
- "SearchResults__section-header": "_SearchResults__section-header_17oxs_22",
402
- "SearchResults__item-border": "_SearchResults__item-border_17oxs_39",
403
- "SearchResults__load-more-button": "_SearchResults__load-more-button_17oxs_52",
401
+ "SearchResults__section-header": "_SearchResults__section-header_rr0x3_22",
402
+ "SearchResults__item-border": "_SearchResults__item-border_rr0x3_39",
403
+ "SearchResults__load-more-button": "_SearchResults__load-more-button_rr0x3_52",
404
404
  SearchResults__list,
405
405
  SearchResults__error,
406
- "SearchResults__load-more-container": "_SearchResults__load-more-container_17oxs_91",
407
- "SearchResults__load-more-error": "_SearchResults__load-more-error_17oxs_98",
408
- "SearchResults__section-header-title": "_SearchResults__section-header-title_17oxs_104",
406
+ "SearchResults__load-more-container": "_SearchResults__load-more-container_rr0x3_92",
407
+ "SearchResults__load-more-error": "_SearchResults__load-more-error_rr0x3_99",
408
+ "SearchResults__section-header-title": "_SearchResults__section-header-title_rr0x3_105",
409
409
  SearchResults__highlight,
410
- "SearchResults__item--active": "_SearchResults__item--active_17oxs_116",
411
- "SearchResults__section-header-action": "_SearchResults__section-header-action_17oxs_120",
412
- "SearchResults--embedded": "_SearchResults--embedded_17oxs_131",
413
- "SearchResults__message-detail-page": "_SearchResults__message-detail-page_17oxs_139",
414
- "SearchResults__message-detail-header": "_SearchResults__message-detail-header_17oxs_151",
415
- "SearchResults__message-detail-title": "_SearchResults__message-detail-title_17oxs_162",
416
- "SearchResults__message-detail-content": "_SearchResults__message-detail-content_17oxs_175",
417
- "SearchResults__result-section": "_SearchResults__result-section_17oxs_190",
418
- "SearchResults__result-items": "_SearchResults__result-items_17oxs_195",
419
- "SearchResults__section-footer": "_SearchResults__section-footer_17oxs_200"
410
+ "SearchResults__item--active": "_SearchResults__item--active_rr0x3_117",
411
+ "SearchResults__section-header-action": "_SearchResults__section-header-action_rr0x3_121",
412
+ "SearchResults--embedded": "_SearchResults--embedded_rr0x3_132",
413
+ "SearchResults__message-detail-page": "_SearchResults__message-detail-page_rr0x3_140",
414
+ "SearchResults__message-detail-header": "_SearchResults__message-detail-header_rr0x3_152",
415
+ "SearchResults__message-detail-title": "_SearchResults__message-detail-title_rr0x3_163",
416
+ "SearchResults__message-detail-content": "_SearchResults__message-detail-content_rr0x3_176",
417
+ "SearchResults__result-section": "_SearchResults__result-section_rr0x3_191",
418
+ "SearchResults__result-items": "_SearchResults__result-items_rr0x3_196",
419
+ "SearchResults__section-footer": "_SearchResults__section-footer_rr0x3_201"
420
420
  };
421
421
  const cssModules = {
422
422
  "$style": style0
@@ -44,16 +44,16 @@ function useMessageActions(propsActionList) {
44
44
  const defaultActionHandlers = {
45
45
  copy: (message) => {
46
46
  state.copyTextMessage(message).then(() => TUIToast.success({
47
- message: i18next.t("TUIChat.Copied")
47
+ message: i18next.t("MessageList.copy_success")
48
48
  })).catch(() => TUIToast.error({
49
- message: i18next.t("TUIChat.Copy Failed")
49
+ message: i18next.t("MessageList.copy_failed")
50
50
  }));
51
51
  },
52
52
  recall: (message) => {
53
53
  state.recallMessage(message).then(() => TUIToast.success({
54
- message: i18next.t("TUIChat.Recall Succeed")
54
+ message: i18next.t("MessageList.recall_success")
55
55
  })).catch((err) => TUIToast.error({
56
- message: err.code === 20016 ? i18next.t("TUIChat.Recall Time Limit Exceeded") : i18next.t("TUIChat.Recall Failed")
56
+ message: err.code === 20016 ? i18next.t("MessageList.recall_time_limit_exceeded") : i18next.t("MessageList.recall_failed")
57
57
  }));
58
58
  },
59
59
  quote: state.quoteMessage,
@@ -63,9 +63,9 @@ function useMessageActions(propsActionList) {
63
63
  },
64
64
  delete: (message) => {
65
65
  state.deleteMessage(message).then(() => TUIToast.success({
66
- message: i18next.t("TUIChat.Deleted")
66
+ message: i18next.t("MessageList.delete_success")
67
67
  })).catch(() => TUIToast.error({
68
- message: i18next.t("TUIChat.Delete Failed")
68
+ message: i18next.t("MessageList.delete_failed")
69
69
  }));
70
70
  }
71
71
  };
@@ -6969,7 +6969,7 @@ class ViewDesc {
6969
6969
  if (!(force || brKludge && safari) && isEquivalentPosition(anchorDOM.node, anchorDOM.offset, selRange.anchorNode, selRange.anchorOffset) && isEquivalentPosition(headDOM.node, headDOM.offset, selRange.focusNode, selRange.focusOffset))
6970
6970
  return;
6971
6971
  let domSelExtended = false;
6972
- if ((domSel.extend || anchor == head) && !brKludge) {
6972
+ if ((domSel.extend || anchor == head) && !(brKludge && gecko)) {
6973
6973
  domSel.collapse(anchorDOM.node, anchorDOM.offset);
6974
6974
  try {
6975
6975
  if (anchor != head)
@@ -8123,17 +8123,14 @@ function removeClassOnSelectionChange(view) {
8123
8123
  });
8124
8124
  }
8125
8125
  function selectCursorWrapper(view) {
8126
- let domSel = view.domSelection(), range = document.createRange();
8126
+ let domSel = view.domSelection();
8127
8127
  if (!domSel)
8128
8128
  return;
8129
8129
  let node = view.cursorWrapper.dom, img = node.nodeName == "IMG";
8130
8130
  if (img)
8131
- range.setStart(node.parentNode, domIndex(node) + 1);
8131
+ domSel.collapse(node.parentNode, domIndex(node) + 1);
8132
8132
  else
8133
- range.setStart(node, 0);
8134
- range.collapse(true);
8135
- domSel.removeAllRanges();
8136
- domSel.addRange(range);
8133
+ domSel.collapse(node, 0);
8137
8134
  if (!img && !view.state.selection.visible && ie$1 && ie_version <= 11) {
8138
8135
  node.disabled = true;
8139
8136
  node.disabled = false;
@@ -8543,13 +8540,18 @@ function parseFromClipboard(view, text, html, plainText, $context) {
8543
8540
  let dom, slice;
8544
8541
  if (!html && !text)
8545
8542
  return null;
8546
- let asText = text && (plainText || inCode || !html);
8543
+ let asText = !!text && (plainText || inCode || !html);
8547
8544
  if (asText) {
8548
8545
  view.someProp("transformPastedText", (f) => {
8549
8546
  text = f(text, inCode || plainText, view);
8550
8547
  });
8551
- if (inCode)
8552
- return text ? new Slice(Fragment.from(view.state.schema.text(text.replace(/\r\n?/g, "\n"))), 0, 0) : Slice.empty;
8548
+ if (inCode) {
8549
+ slice = new Slice(Fragment.from(view.state.schema.text(text.replace(/\r\n?/g, "\n"))), 0, 0);
8550
+ view.someProp("transformPasted", (f) => {
8551
+ slice = f(slice, view, true);
8552
+ });
8553
+ return slice;
8554
+ }
8553
8555
  let parsed = view.someProp("clipboardTextParser", (f) => f(text, $context, plainText, view));
8554
8556
  if (parsed) {
8555
8557
  slice = parsed;
@@ -8608,7 +8610,7 @@ function parseFromClipboard(view, text, html, plainText, $context) {
8608
8610
  }
8609
8611
  }
8610
8612
  view.someProp("transformPasted", (f) => {
8611
- slice = f(slice, view);
8613
+ slice = f(slice, view, asText);
8612
8614
  });
8613
8615
  return slice;
8614
8616
  }
@@ -9362,7 +9364,7 @@ editHandlers.drop = (view, _event) => {
9362
9364
  let slice = dragging && dragging.slice;
9363
9365
  if (slice) {
9364
9366
  view.someProp("transformPasted", (f) => {
9365
- slice = f(slice, view);
9367
+ slice = f(slice, view, false);
9366
9368
  });
9367
9369
  } else {
9368
9370
  slice = parseFromClipboard(view, getText$1(event.dataTransfer), brokenClipboardAPI ? null : event.dataTransfer.getData("text/html"), false, $mouse);
@@ -1,4 +1,4 @@
1
- import { N as Node$1, n as nodeInputRule$1, m as mergeAttributes$1, E as Extension$1, P as Plugin, a as PluginKey, i as isNodeEmpty$1, D as Decoration, b as DecorationSet, f as findWrapping, c as canJoin, d as NodeSelection, S as Selection, w as wrapInList$1, e as wrapIn$1, F as Fragment, g as Slice, T as TextSelection, h as canSplit, s as sinkListItem$1, j as setBlockType, k as selectTextblockStart$1, l as selectTextblockEnd$1, o as selectParentNode$1, p as selectNodeForward$1, q as selectNodeBackward$1, A as AllSelection, r as newlineInCode$1, t as liftListItem$1, u as liftEmptyBlock$1, v as lift$1, x as joinUp$1, y as joinTextblockForward$1, z as joinTextblockBackward$1, B as joinPoint, C as joinForward$1, G as joinDown$1, H as joinBackward$1, I as exitCode$1, J as deleteSelection$1, K as createParagraphNear$1, L as liftTarget, M as Node$2, O as Schema, Q as DOMParser, R as ReplaceStep, U as ReplaceAroundStep, V as dropPoint, W as keydownHandler, X as Mapping, Y as isTextSelection$1, Z as isNodeSelection$1, _ as posToDOMRect, $ as getText, a0 as getTextSerializersFromSchema$1, a1 as Editor$1 } from "./index-t9cbWbGG.js";
1
+ import { N as Node$1, n as nodeInputRule$1, m as mergeAttributes$1, E as Extension$1, P as Plugin, a as PluginKey, i as isNodeEmpty$1, D as Decoration, b as DecorationSet, f as findWrapping, c as canJoin, d as NodeSelection, S as Selection, w as wrapInList$1, e as wrapIn$1, F as Fragment, g as Slice, T as TextSelection, h as canSplit, s as sinkListItem$1, j as setBlockType, k as selectTextblockStart$1, l as selectTextblockEnd$1, o as selectParentNode$1, p as selectNodeForward$1, q as selectNodeBackward$1, A as AllSelection, r as newlineInCode$1, t as liftListItem$1, u as liftEmptyBlock$1, v as lift$1, x as joinUp$1, y as joinTextblockForward$1, z as joinTextblockBackward$1, B as joinPoint, C as joinForward$1, G as joinDown$1, H as joinBackward$1, I as exitCode$1, J as deleteSelection$1, K as createParagraphNear$1, L as liftTarget, M as Node$2, O as Schema, Q as DOMParser, R as ReplaceStep, U as ReplaceAroundStep, V as dropPoint, W as keydownHandler, X as Mapping, Y as isTextSelection$1, Z as isNodeSelection$1, _ as posToDOMRect, $ as getText, a0 as getTextSerializersFromSchema$1, a1 as Editor$1 } from "./index-BPFJrNlA.js";
2
2
  import { markRaw, customRef, defineComponent, ref, onMounted, onBeforeUnmount, h, getCurrentInstance, watchEffect, nextTick, unref } from "vue";
3
3
  const inputRegex$5 = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/;
4
4
  const Image = Node$1.create({
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import './styles/index.css';
2
2
  import { useLoginState } from "./states/LoginState.js";
3
- import { ChatSetting, ContactInfo, ContactList, ContactListItem, ConversationActions, ConversationList, ConversationListContent, ConversationListHeader, ConversationPreview, ConversationPreviewUI, ConversationSearch, EmojiPicker, Message, MessageAdvanced, MessageInput, MessageList, Search, SearchAdvanced, SearchBar, SearchResultItem, SearchResults, UserAdvanced, View, useConversationListState, useMessageActionState, useMessageActions, useMessageInputState, useMessageListState, useSearchState } from "./chat/index.js";
3
+ import { ChatSetting, ContactInfo, ContactList, ContactListItem, ConversationActions, ConversationList, ConversationListContent, ConversationListHeader, ConversationPreview, ConversationPreviewUI, ConversationSearch, EmojiPicker, Message, MessageAdvanced, MessageInput, MessageList, Search, SearchAdvanced, SearchBar, SearchResultItem, SearchResults, UserAdvanced, View, useC2CSettingState, useContactListState, useConversationListState, useGroupSettingState, useMessageActionState, useMessageActions, useMessageInputState, useMessageListState, useSearchState } from "./chat/index.js";
4
4
  import { AudioSetting, AudioSettingPanel, BarrageInput, BarrageList, CameraButton, CoGuestPanel, LiveAudienceList, LiveCoreView, LiveList, LiveMonitorView, LiveScenePanel, MicButton, StreamMixer, StreamView, VideoSetting, VideoSettingPanel, useBarrageListState, useCoGuestState, useCoHostState, useDeviceState, useLiveAudienceState, useLiveMonitorState, useLiveSeatState, useLiveState, useRoomEngine, useRoomState, useUserState, useVideoMixerState } from "./rtc/index.js";
5
5
  import { addI18n } from "./i18n/index.js";
6
6
  import { default as default2 } from "./components/Avatar/Avatar.js";
@@ -18,6 +18,7 @@ import { VariantType, defaultTypeLabels } from "./types/search.js";
18
18
  import { MessageType, SearchType } from "./types/engine.js";
19
19
  import { CreateConvTypes, GroupLabelTypes, GroupType, PageStateTypes, PlaceHolderTypes } from "./types/conversation.js";
20
20
  import { ContactItemType, GroupApplicationType } from "./types/contact.js";
21
+ import { GroupInviteType, GroupMemberRole, GroupPermission } from "./states/GroupSettingState/types.js";
21
22
  export {
22
23
  AudioOutput,
23
24
  AudioSetting,
@@ -55,7 +56,10 @@ export {
55
56
  DeviceType,
56
57
  EmojiPicker,
57
58
  GroupApplicationType,
59
+ GroupInviteType,
58
60
  GroupLabelTypes,
61
+ GroupMemberRole,
62
+ GroupPermission,
59
63
  GroupType,
60
64
  LiveAudienceList,
61
65
  LiveCoreView,
@@ -134,10 +138,13 @@ export {
134
138
  addI18n,
135
139
  defaultTypeLabels,
136
140
  useBarrageListState,
141
+ useC2CSettingState,
137
142
  useCoGuestState,
138
143
  useCoHostState,
144
+ useContactListState,
139
145
  useConversationListState,
140
146
  useDeviceState,
147
+ useGroupSettingState,
141
148
  useLiveAudienceState,
142
149
  useLiveMonitorState,
143
150
  useLiveSeatState,
@@ -1,6 +1,8 @@
1
1
  import { ref } from "vue";
2
2
  import { TUILogin } from "@tencentcloud/tui-core";
3
+ import { useStatistical } from "../statistical/statistical.js";
3
4
  const loginUserInfo = ref(null);
5
+ const { getChatScene } = useStatistical();
4
6
  async function login(options) {
5
7
  if (!options.userId || !options.userSig || !options.sdkAppId) {
6
8
  throw new Error("[loginState login] params error");
@@ -11,6 +13,7 @@ async function login(options) {
11
13
  userID: userId,
12
14
  userSig,
13
15
  useUploadPlugin: true,
16
+ scene: getChatScene(),
14
17
  ...restOptions
15
18
  };
16
19
  try {
@@ -222,6 +222,7 @@ const setKeyword = (variant, k) => {
222
222
  const { searchAdvancedParams, selectedSearchType } = state;
223
223
  const newStates = {
224
224
  ...state,
225
+ error: null,
225
226
  isLoading: false,
226
227
  keyword: k.trimEnd(),
227
228
  searchAdvancedParams: /* @__PURE__ */ new Map(),
@@ -0,0 +1,4 @@
1
+ export declare enum ChatSceneType {
2
+ CHAT_WEB = "42",
3
+ CHAT_H5 = "43"
4
+ }
@@ -0,0 +1,8 @@
1
+ var ChatSceneType = /* @__PURE__ */ ((ChatSceneType2) => {
2
+ ChatSceneType2["CHAT_WEB"] = "42";
3
+ ChatSceneType2["CHAT_H5"] = "43";
4
+ return ChatSceneType2;
5
+ })(ChatSceneType || {});
6
+ export {
7
+ ChatSceneType
8
+ };
@@ -0,0 +1,2 @@
1
+ export * from './statistical';
2
+ export * from './const';
@@ -0,0 +1,6 @@
1
+ import { useStatistical } from "./statistical.js";
2
+ import { ChatSceneType } from "./const.js";
3
+ export {
4
+ ChatSceneType,
5
+ useStatistical
6
+ };
@@ -0,0 +1,10 @@
1
+ import { ChatSceneType } from './const';
2
+
3
+ declare function setChatScene(value: ChatSceneType): void;
4
+ declare function getChatScene(): ChatSceneType | undefined;
5
+ export declare function useStatistical(): {
6
+ chatScene: import('vue').Ref<ChatSceneType | undefined, ChatSceneType | undefined>;
7
+ setChatScene: typeof setChatScene;
8
+ getChatScene: typeof getChatScene;
9
+ };
10
+ export default useStatistical;
@@ -0,0 +1,19 @@
1
+ import { ref } from "vue";
2
+ const chatScene = ref(void 0);
3
+ function setChatScene(value) {
4
+ chatScene.value = value;
5
+ }
6
+ function getChatScene() {
7
+ return chatScene.value;
8
+ }
9
+ function useStatistical() {
10
+ return {
11
+ chatScene,
12
+ setChatScene,
13
+ getChatScene
14
+ };
15
+ }
16
+ export {
17
+ useStatistical as default,
18
+ useStatistical
19
+ };
@@ -4436,7 +4436,7 @@ to {
4436
4436
  * @include multi-line-ellipsis(3);
4437
4437
  * }
4438
4438
  */
4439
- ._SearchResults_17oxs_12 {
4439
+ ._SearchResults_rr0x3_12 {
4440
4440
  flex: 1;
4441
4441
  overflow: hidden;
4442
4442
  padding-right: 8px;
@@ -4445,7 +4445,7 @@ to {
4445
4445
  gap: 20px;
4446
4446
  background-color: var(--bg-color-dialog);
4447
4447
  }
4448
- ._SearchResults__section-header_17oxs_22 {
4448
+ ._SearchResults__section-header_rr0x3_22 {
4449
4449
  display: flex;
4450
4450
  justify-content: space-between;
4451
4451
  align-items: center;
@@ -4455,16 +4455,16 @@ to {
4455
4455
  z-index: 1;
4456
4456
  background-color: var(--bg-color-operate);
4457
4457
  }
4458
- ._SearchResults__section-header_17oxs_22 h3 {
4458
+ ._SearchResults__section-header_rr0x3_22 h3 {
4459
4459
  margin: 0;
4460
4460
  font-size: 14px;
4461
4461
  font-weight: 400;
4462
4462
  color: var(--text-color-secondary);
4463
4463
  }
4464
- ._SearchResults__item-border_17oxs_39 {
4464
+ ._SearchResults__item-border_rr0x3_39 {
4465
4465
  position: relative;
4466
4466
  }
4467
- ._SearchResults__item-border_17oxs_39::before {
4467
+ ._SearchResults__item-border_rr0x3_39::before {
4468
4468
  content: "";
4469
4469
  position: absolute;
4470
4470
  bottom: 0;
@@ -4473,7 +4473,7 @@ to {
4473
4473
  height: 1px;
4474
4474
  background-color: var(--shadow-color);
4475
4475
  }
4476
- ._SearchResults__load-more-button_17oxs_52 {
4476
+ ._SearchResults__load-more-button_rr0x3_52 {
4477
4477
  border: none;
4478
4478
  background: none;
4479
4479
  color: var(--text-color-link);
@@ -4483,11 +4483,11 @@ to {
4483
4483
  line-height: 20px;
4484
4484
  padding: 20px 20px 10px;
4485
4485
  }
4486
- ._SearchResults__load-more-button_17oxs_52:disabled {
4486
+ ._SearchResults__load-more-button_rr0x3_52:disabled {
4487
4487
  color: var(--text-color-disabled);
4488
4488
  cursor: not-allowed;
4489
4489
  }
4490
- ._SearchResults__list_17oxs_67 {
4490
+ ._SearchResults__list_rr0x3_67 {
4491
4491
  flex: 1;
4492
4492
  overflow-y: auto;
4493
4493
  display: flex;
@@ -4496,44 +4496,45 @@ to {
4496
4496
  overflow: auto;
4497
4497
  -ms-overflow-style: none;
4498
4498
  }
4499
- ._SearchResults__list_17oxs_67::-webkit-scrollbar {
4499
+ ._SearchResults__list_rr0x3_67::-webkit-scrollbar {
4500
4500
  display: none;
4501
4501
  }
4502
4502
  @supports (scrollbar-width: none) {
4503
- ._SearchResults__list_17oxs_67 {
4503
+ ._SearchResults__list_rr0x3_67 {
4504
4504
  scrollbar-width: none;
4505
4505
  }
4506
4506
  }
4507
- ._SearchResults__error_17oxs_85 {
4507
+ ._SearchResults__error_rr0x3_85 {
4508
+ word-break: break-all;
4508
4509
  padding: 16px;
4509
4510
  text-align: center;
4510
4511
  color: var(--text-color-error);
4511
4512
  }
4512
- ._SearchResults__load-more-container_17oxs_91 {
4513
+ ._SearchResults__load-more-container_rr0x3_92 {
4513
4514
  display: flex;
4514
4515
  flex-direction: column;
4515
4516
  align-items: center;
4516
4517
  gap: 8px;
4517
4518
  }
4518
- ._SearchResults__load-more-error_17oxs_98 {
4519
+ ._SearchResults__load-more-error_rr0x3_99 {
4519
4520
  color: var(--text-color-error);
4520
4521
  font-size: 12px;
4521
4522
  text-align: center;
4522
4523
  }
4523
- ._SearchResults__section-header-title_17oxs_104 {
4524
+ ._SearchResults__section-header-title_rr0x3_105 {
4524
4525
  font-size: 14px;
4525
4526
  color: var(--text-color-secondary);
4526
4527
  margin: 0;
4527
4528
  padding: 0 12px;
4528
4529
  }
4529
- ._SearchResults__highlight_17oxs_111 {
4530
+ ._SearchResults__highlight_rr0x3_112 {
4530
4531
  color: var(--text-color-link);
4531
4532
  font-weight: normal;
4532
4533
  }
4533
- ._SearchResults__item--active_17oxs_116 {
4534
+ ._SearchResults__item--active_rr0x3_117 {
4534
4535
  background-color: var(--list-color-focused);
4535
4536
  }
4536
- ._SearchResults__section-header-action_17oxs_120 {
4537
+ ._SearchResults__section-header-action_rr0x3_121 {
4537
4538
  font-size: 14px;
4538
4539
  display: flex;
4539
4540
  align-items: center;
@@ -4543,14 +4544,14 @@ to {
4543
4544
  cursor: pointer;
4544
4545
  padding: 0;
4545
4546
  }
4546
- ._SearchResults--embedded_17oxs_131 {
4547
+ ._SearchResults--embedded_rr0x3_132 {
4547
4548
  flex: 1;
4548
4549
  display: flex;
4549
4550
  flex-direction: column;
4550
4551
  overflow: hidden;
4551
4552
  background: var(--bg-color-dialog);
4552
4553
  }
4553
- ._SearchResults__message-detail-page_17oxs_139 {
4554
+ ._SearchResults__message-detail-page_rr0x3_140 {
4554
4555
  display: flex;
4555
4556
  flex-direction: column;
4556
4557
  height: 100%;
@@ -4561,7 +4562,7 @@ to {
4561
4562
  z-index: 1000;
4562
4563
  background: var(--bg-color-dialog);
4563
4564
  }
4564
- ._SearchResults__message-detail-header_17oxs_151 {
4565
+ ._SearchResults__message-detail-header_rr0x3_152 {
4565
4566
  display: flex;
4566
4567
  align-items: center;
4567
4568
  padding: 12px;
@@ -4571,7 +4572,7 @@ to {
4571
4572
  top: 0;
4572
4573
  z-index: 1;
4573
4574
  }
4574
- ._SearchResults__message-detail-title_17oxs_162 {
4575
+ ._SearchResults__message-detail-title_rr0x3_163 {
4575
4576
  flex: 1;
4576
4577
  font-size: 14px;
4577
4578
  color: var(--text-color-secondary);
@@ -4583,29 +4584,29 @@ to {
4583
4584
  white-space: nowrap;
4584
4585
  text-overflow: ellipsis;
4585
4586
  }
4586
- ._SearchResults__message-detail-content_17oxs_175 {
4587
+ ._SearchResults__message-detail-content_rr0x3_176 {
4587
4588
  flex: 1;
4588
4589
  overflow-y: auto;
4589
4590
  overflow: auto;
4590
4591
  -ms-overflow-style: none;
4591
4592
  }
4592
- ._SearchResults__message-detail-content_17oxs_175::-webkit-scrollbar {
4593
+ ._SearchResults__message-detail-content_rr0x3_176::-webkit-scrollbar {
4593
4594
  display: none;
4594
4595
  }
4595
4596
  @supports (scrollbar-width: none) {
4596
- ._SearchResults__message-detail-content_17oxs_175 {
4597
+ ._SearchResults__message-detail-content_rr0x3_176 {
4597
4598
  scrollbar-width: none;
4598
4599
  }
4599
4600
  }
4600
- ._SearchResults__result-section_17oxs_190 {
4601
+ ._SearchResults__result-section_rr0x3_191 {
4601
4602
  display: flex;
4602
4603
  flex-direction: column;
4603
4604
  }
4604
- ._SearchResults__result-items_17oxs_195 {
4605
+ ._SearchResults__result-items_rr0x3_196 {
4605
4606
  display: flex;
4606
4607
  flex-direction: column;
4607
4608
  }
4608
- ._SearchResults__section-footer_17oxs_200 {
4609
+ ._SearchResults__section-footer_rr0x3_201 {
4609
4610
  display: flex;
4610
4611
  padding: 10px 0;
4611
4612
  }
@@ -5972,21 +5973,21 @@ to {
5972
5973
  ._conversationCreateUserSelectList--h5_pa6me_7 {
5973
5974
  height: 100%;
5974
5975
  padding: 0 20px;
5975
- }.conversationCreate__container[data-v-bdcdab3b] {
5976
+ }.conversationCreate__container[data-v-7e2d265f] {
5976
5977
  display: flex;
5977
5978
  flex-direction: column;
5978
5979
  justify-content: center;
5979
5980
  }
5980
- .conversationCreate__detail[data-v-bdcdab3b] {
5981
+ .conversationCreate__detail[data-v-7e2d265f] {
5981
5982
  flex: 1;
5982
5983
  }
5983
- [data-v-bdcdab3b] .conversationCreate__dialog {
5984
+ [data-v-7e2d265f] .conversationCreate__dialog {
5984
5985
  width: 100%;
5985
5986
  height: 100%;
5986
5987
  max-width: 100%;
5987
5988
  border-radius: 0;
5988
5989
  }
5989
- [data-v-bdcdab3b] .conversationCreate__dialog .dialog-body {
5990
+ [data-v-7e2d265f] .conversationCreate__dialog .dialog-body {
5990
5991
  height: 0;
5991
5992
  }/**
5992
5993
  * Multi-line ellipsis
@@ -6718,11 +6719,11 @@ to {
6718
6719
  }
6719
6720
  ._attachment-picker__item-icon_1bduq_48 {
6720
6721
  cursor: pointer;
6721
- }._emoji-picker__icon_z2wnx_1 {
6722
+ }._emoji-picker__icon_b0gby_1 {
6722
6723
  cursor: pointer;
6723
- display: flex;
6724
+ display: flex !important;
6724
6725
  }
6725
- ._emoji-picker__list_z2wnx_5 {
6726
+ ._emoji-picker__list_b0gby_5 {
6726
6727
  display: flex;
6727
6728
  flex-flow: row wrap;
6728
6729
  gap: 8px;
@@ -6733,7 +6734,7 @@ to {
6733
6734
  background-color: var(--dropdown-color-default);
6734
6735
  box-shadow: 0 0 10px 0 var(--shadow-color);
6735
6736
  }
6736
- ._emoji-picker__list-item_z2wnx_16 {
6737
+ ._emoji-picker__list-item_b0gby_16 {
6737
6738
  display: flex;
6738
6739
  align-items: center;
6739
6740
  justify-content: center;
@@ -7414,7 +7415,7 @@ to {
7414
7415
  100% {
7415
7416
  background-position: -200% 0;
7416
7417
  }
7417
- }.recalled-message[data-v-c0fdcab9] {
7418
+ }.recalled-message[data-v-63c123ed] {
7418
7419
  display: flex;
7419
7420
  flex-direction: row;
7420
7421
  align-self: center;
@@ -7423,7 +7424,7 @@ to {
7423
7424
  white-space: pre-wrap;
7424
7425
  color: var(--text-color-secondary);
7425
7426
  }
7426
- .recalled-message__button[data-v-c0fdcab9] {
7427
+ .recalled-message__button[data-v-63c123ed] {
7427
7428
  cursor: pointer;
7428
7429
  text-decoration: underline;
7429
7430
  color: var(--text-color-link);
@@ -0,0 +1 @@
1
+ export { GroupMemberRole, GroupPermission, GroupInviteType, } from '../states/GroupSettingState/types';
@@ -0,0 +1,6 @@
1
+ import { GroupInviteType, GroupMemberRole, GroupPermission } from "../states/GroupSettingState/types.js";
2
+ export {
3
+ GroupInviteType,
4
+ GroupMemberRole,
5
+ GroupPermission
6
+ };
@@ -15,3 +15,4 @@ export * from './engine';
15
15
  export * from './login';
16
16
  export * from './conversation';
17
17
  export * from './contact';
18
+ export * from './chatSetting';
@@ -11,6 +11,7 @@ import { VariantType, defaultTypeLabels } from "./search.js";
11
11
  import { MessageType, SearchType } from "./engine.js";
12
12
  import { CreateConvTypes, GroupLabelTypes, GroupType, PageStateTypes, PlaceHolderTypes } from "./conversation.js";
13
13
  import { ContactItemType, GroupApplicationType } from "./contact.js";
14
+ import { GroupInviteType, GroupMemberRole, GroupPermission } from "../states/GroupSettingState/types.js";
14
15
  export {
15
16
  AudioOutput,
16
17
  BattleStatus,
@@ -23,7 +24,10 @@ export {
23
24
  DeviceStatus,
24
25
  DeviceType,
25
26
  GroupApplicationType,
27
+ GroupInviteType,
26
28
  GroupLabelTypes,
29
+ GroupMemberRole,
30
+ GroupPermission,
27
31
  GroupType,
28
32
  LiveOrientation,
29
33
  LiveStatus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuikit-atomicx-vue3",
3
- "version": "3.3.3",
3
+ "version": "3.3.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
package/src/chat/index.ts CHANGED
@@ -38,6 +38,9 @@ import { useMessageActionState as messageActionState } from '../states/MessageAc
38
38
  import { useMessageInputState as messageInputState } from '../states/MessageInputState';
39
39
  import { useMessageListState as messageListState } from '../states/MessageListState';
40
40
  import { useSearchState as searchState } from '../states/SearchState';
41
+ import { useContactListState as contactListState } from "../states/ContactListState";
42
+ import { useC2CSettingState as c2cSettingState } from '../states/C2CSettingState';
43
+ import { useGroupSettingState as groupSettingState } from '../states/GroupSettingState';
41
44
 
42
45
  import ChatLoginServer from './server';
43
46
 
@@ -78,6 +81,9 @@ const useMessageActionState = messageActionState;
78
81
  const useMessageInputState = messageInputState;
79
82
  const useMessageListState = messageListState;
80
83
  const useSearchState = searchState;
84
+ const useContactListState = contactListState;
85
+ const useC2CSettingState = c2cSettingState;
86
+ const useGroupSettingState = groupSettingState;
81
87
 
82
88
  export {
83
89
  // component
@@ -114,4 +120,7 @@ export {
114
120
  useMessageActionState,
115
121
  useConversationListState,
116
122
  useSearchState,
123
+ useContactListState,
124
+ useC2CSettingState,
125
+ useGroupSettingState,
117
126
  };
@@ -3,6 +3,10 @@ import { ref } from 'vue';
3
3
  import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
4
4
  import TUICore, { TUILogin, TUIConstants } from '@tencentcloud/tui-core';
5
5
  import { useLoginState } from '../states/LoginState';
6
+ import { ChatSceneType, useStatistical } from '../statistical';
7
+ import { isPC } from '../utils';
8
+
9
+ const { setChatScene } = useStatistical();
6
10
 
7
11
  export default class ChatLoginServer {
8
12
  static instance: ChatLoginServer;
@@ -24,6 +28,7 @@ export default class ChatLoginServer {
24
28
  }
25
29
 
26
30
  public init() {
31
+ setChatScene(isPC ? ChatSceneType.CHAT_WEB : ChatSceneType.CHAT_H5);
27
32
  if (!this.isReady) {
28
33
  this.isReady = true;
29
34
  TUICore.registerEvent(
@@ -194,7 +194,7 @@ const handleCreateGroupConversation = async () => {
194
194
 
195
195
  const generateGroupName = (userList: Friend[]) => {
196
196
  const selfName = loginUserInfo.value?.userName || loginUserInfo.value?.userId || '';
197
- const name = selfName + userList.map(item => item?.remark || item?.nick || item?.userID).join('、');
197
+ const name = `${selfName}、` + userList.map(item => item?.remark || item?.nick || item?.userID).join('、');
198
198
  return name.length >= GROUP_NAME_LIMIT ? name.slice(0, GROUP_NAME_LIMIT) : name;
199
199
  };
200
200
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  &__icon {
4
4
  cursor: pointer;
5
- display: flex;
5
+ display: flex !important;
6
6
  }
7
7
 
8
8
  &__list {
@@ -4,7 +4,7 @@
4
4
  :style="props.style"
5
5
  >
6
6
  <template v-if="isMessageOwner">
7
- {{ t('MessageList.you') }}{{ t('MessageList.recalled_a_message') }}
7
+ {{ `${t('MessageList.you')} ${t('MessageList.recalled_a_message')}` }}
8
8
  <View
9
9
  v-if="isTextMessage"
10
10
  role="button"
@@ -15,21 +15,22 @@
15
15
  </View>
16
16
  </template>
17
17
  <template v-else>
18
- {{ otherDisplayName }} {{ t('MessageList.recalled_a_message') }}
18
+ {{ `${otherDisplayName} ${t('MessageList.recalled_a_message')}` }}
19
19
  </template>
20
20
  </View>
21
21
  </template>
22
22
 
23
23
  <script lang="ts" setup>
24
24
  import { computed } from 'vue';
25
- import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
26
25
  import { useUIKit } from '@tencentcloud/uikit-base-component-vue3';
27
26
  import cs from 'classnames';
27
+ import { useMessageInputState } from '../../../../states/MessageInputState';
28
28
  import { View } from '../../../../baseComp/View';
29
- import type { IMessageModel } from '@tencentcloud/chat-uikit-engine';
29
+ import { MessageType } from '../../../../types';
30
+ import type { MessageModel } from '../../../../types';
30
31
 
31
32
  interface IRecalledMessageProps {
32
- message: IMessageModel;
33
+ message: MessageModel;
33
34
  class?: string;
34
35
  style?: Record<string, any>;
35
36
  }
@@ -40,18 +41,9 @@ const props = withDefaults(defineProps<IRecalledMessageProps>(), {
40
41
  });
41
42
 
42
43
  const { t } = useUIKit();
44
+ const { setContent, focusEditor } = useMessageInputState();
43
45
 
44
- // Assuming Vue version has similar inputStore
45
- // Need to implement or import the corresponding store when actually used
46
- const setInputValue = (text: string) => {
47
- // Implement logic to set input value
48
- console.log('Set input value:', text);
49
- };
50
- const inputElementRef = {
51
- current: null as HTMLElement | null,
52
- };
53
-
54
- const isTextMessage = computed(() => props.message.type === TUIChatEngine.TYPES.MSG_TEXT);
46
+ const isTextMessage = computed(() => props.message.type === MessageType.TEXT as any);
55
47
  const isMessageOwner = computed(() => props.message.flow === 'out');
56
48
  const otherDisplayName = computed(() => props.message.nick || props.message.from || '');
57
49
 
@@ -59,8 +51,8 @@ function recallMessageToInput() {
59
51
  // Assuming Vue version has similar transformTextWithEmojiKeyToName function
60
52
  // Need to implement or import the corresponding function when actually used
61
53
  const transformedText = props.message.payload.text;
62
- setInputValue(transformedText);
63
- inputElementRef.current?.focus();
54
+ setContent(transformedText);
55
+ focusEditor();
64
56
  }
65
57
  </script>
66
58
 
@@ -42,6 +42,14 @@ const MessageList = {
42
42
  no_more: 'No More',
43
43
  no_unread_members: 'No Unread Members',
44
44
  yesterday: 'Yesterday',
45
+
46
+ copy_success: 'Copied',
47
+ copy_failed: 'Copy Failed',
48
+ recall_success: 'Message recalled',
49
+ recall_failed: 'Recall Failed',
50
+ recall_time_limit_exceeded: 'Recall time limit exceeded',
51
+ delete_success: 'Deleted',
52
+ delete_failed: 'Delete Failed',
45
53
  };
46
54
 
47
55
  export default MessageList;
@@ -41,6 +41,14 @@ const MessageList = {
41
41
  no_more: '已加载全部',
42
42
  no_unread_members: '暂无未读成员',
43
43
  yesterday: '昨天',
44
+
45
+ copy_success: '已复制',
46
+ copy_failed: '复制失败',
47
+ recall_success: '消息已撤回',
48
+ recall_failed: '撤回失败',
49
+ recall_time_limit_exceeded: '撤回时间限制已过期',
50
+ delete_success: '删除成功',
51
+ delete_failed: '删除失败',
44
52
  };
45
53
 
46
54
  export default MessageList;
@@ -67,6 +67,7 @@
67
67
  }
68
68
 
69
69
  .SearchResults__error {
70
+ word-break: break-all;
70
71
  padding: 16px;
71
72
  text-align: center;
72
73
  color: var(--text-color-error);
@@ -97,19 +97,19 @@ function useMessageActions(propsActionList?: Array<MessageAction['key'] | Messag
97
97
  copy: (message) => {
98
98
  state.copyTextMessage(message)
99
99
  .then(() => TUIToast.success({
100
- message: i18next.t('TUIChat.Copied'),
100
+ message: i18next.t('MessageList.copy_success'),
101
101
  }))
102
102
  .catch(() => TUIToast.error({
103
- message: i18next.t('TUIChat.Copy Failed'),
103
+ message: i18next.t('MessageList.copy_failed'),
104
104
  }));
105
105
  },
106
106
  recall: (message) => {
107
107
  state.recallMessage(message)
108
108
  .then(() => TUIToast.success({
109
- message: i18next.t('TUIChat.Recall Succeed'),
109
+ message: i18next.t('MessageList.recall_success'),
110
110
  }))
111
111
  .catch(err => TUIToast.error({
112
- message: err.code === 20016 ? i18next.t('TUIChat.Recall Time Limit Exceeded') : i18next.t('TUIChat.Recall Failed'),
112
+ message: err.code === 20016 ? i18next.t('MessageList.recall_time_limit_exceeded') : i18next.t('MessageList.recall_failed'),
113
113
  }));
114
114
  },
115
115
  quote: state.quoteMessage,
@@ -120,10 +120,10 @@ function useMessageActions(propsActionList?: Array<MessageAction['key'] | Messag
120
120
  delete: (message) => {
121
121
  state.deleteMessage(message)
122
122
  .then(() => TUIToast.success({
123
- message: i18next.t('TUIChat.Deleted'),
123
+ message: i18next.t('MessageList.delete_success'),
124
124
  }))
125
125
  .catch(() => TUIToast.error({
126
- message: i18next.t('TUIChat.Delete Failed'),
126
+ message: i18next.t('MessageList.delete_failed'),
127
127
  }));
128
128
  },
129
129
  };
@@ -0,0 +1,5 @@
1
+ // https://iwiki.woa.com/p/613583683
2
+ export enum ChatSceneType {
3
+ CHAT_WEB = '42',
4
+ CHAT_H5 = '43',
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from './statistical';
2
+ export * from './const';
@@ -0,0 +1,23 @@
1
+ import { ref } from 'vue';
2
+ import { ChatSceneType } from './const';
3
+
4
+ const chatScene = ref<ChatSceneType | undefined>(undefined);
5
+
6
+ function setChatScene(value: ChatSceneType) {
7
+ chatScene.value = value;
8
+ }
9
+
10
+ function getChatScene() {
11
+ return chatScene.value;
12
+ }
13
+
14
+
15
+ export function useStatistical() {
16
+ return {
17
+ chatScene,
18
+ setChatScene,
19
+ getChatScene,
20
+ };
21
+ }
22
+
23
+ export default useStatistical;
@@ -0,0 +1,5 @@
1
+ export {
2
+ GroupMemberRole,
3
+ GroupPermission,
4
+ GroupInviteType,
5
+ } from '../states/GroupSettingState/types';
@@ -15,3 +15,4 @@ export * from './engine';
15
15
  export * from './login';
16
16
  export * from './conversation';
17
17
  export * from './contact';
18
+ export * from './chatSetting';