@tencentcloud/chat-uikit-react 3.0.2 → 3.4.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 (115) hide show
  1. package/.eslintrc.cjs +5 -4
  2. package/CHANGELOG.md +9 -0
  3. package/debug/GenerateTestUserSig-es.js +26 -0
  4. package/debug/lib-generate-test-usersig-es.min.js +2 -0
  5. package/dist/components/Chat/Chat.d.ts +1 -1
  6. package/dist/components/Chat/Chat.js +18 -23
  7. package/dist/components/ChatHeader/AudioCallPicker/AudioCallPicker.d.ts +30 -0
  8. package/dist/components/ChatHeader/AudioCallPicker/AudioCallPicker.js +135 -0
  9. package/dist/components/ChatHeader/AudioCallPicker/index.d.ts +1 -0
  10. package/dist/components/ChatHeader/AudioCallPicker/index.js +4 -0
  11. package/dist/components/ChatHeader/ChatHeader.d.ts +6 -0
  12. package/dist/components/ChatHeader/ChatHeader.js +43 -41
  13. package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.d.ts +14 -9
  14. package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.js +47 -65
  15. package/dist/components/ChatHeader/VideoCallPicker/VideoCallPicker.d.ts +30 -0
  16. package/dist/components/ChatHeader/VideoCallPicker/VideoCallPicker.js +135 -0
  17. package/dist/components/ChatHeader/VideoCallPicker/index.d.ts +1 -0
  18. package/dist/components/ChatHeader/VideoCallPicker/index.js +4 -0
  19. package/dist/components/ChatHeader/index.d.ts +2 -1
  20. package/dist/components/ChatHeader/index.js +4 -2
  21. package/dist/components/Checkbox/index.js +1 -1
  22. package/dist/components/Modal/Modal.js +1 -1
  23. package/dist/components/Model/index.js +1 -1
  24. package/dist/components/Plugins/index.js +1 -1
  25. package/dist/components/Popup/index.js +1 -1
  26. package/dist/components/PopupNew/Popup.js +1 -1
  27. package/dist/components/Profile/Profile.js +20 -22
  28. package/dist/components/Profile/ProfileDefault.d.ts +3 -2
  29. package/dist/components/Profile/ProfileDefault.js +55 -56
  30. package/dist/components/Profile/hooks/useMyProfile.d.ts +2 -3
  31. package/dist/components/Profile/hooks/useMyProfile.js +1 -1
  32. package/dist/components/Profile/myProfile/MyProfile.d.ts +1 -1
  33. package/dist/components/Profile/myProfile/MyProfile.js +12 -16
  34. package/dist/components/index.js +27 -25
  35. package/dist/context/ChatContext.d.ts +1 -1
  36. package/dist/context/ChatContext.js +11 -16
  37. package/dist/context/ContactContext.d.ts +1 -1
  38. package/dist/external_modules/mui-BhvHeL5-.js +2253 -0
  39. package/dist/hooks/index.d.ts +2 -2
  40. package/dist/hooks/index.js +2 -2
  41. package/dist/{states/ChatHeaderState.d.ts → hooks/useChatHeader.d.ts} +6 -6
  42. package/dist/hooks/useChatHeader.js +41 -0
  43. package/dist/index-UBuvRM8r-DTXQB6zV.js +34000 -0
  44. package/dist/index.d.ts +3 -1
  45. package/dist/index.js +93 -4129
  46. package/dist/server/mainServer.js +2 -2
  47. package/dist/states/UIManagerState.d.ts +5 -5
  48. package/dist/states/UIManagerState.js +2 -2
  49. package/dist/states/index.d.ts +0 -1
  50. package/dist/states/index.js +2 -4
  51. package/dist/styles/AudioCallPicker.css +1 -0
  52. package/dist/styles/ChatHeaderUI.css +1 -1
  53. package/dist/styles/VideoCallPicker.css +1 -0
  54. package/dist/styles/index-UBuvRM8r.css +1 -0
  55. package/dist/styles/index.css +1 -1
  56. package/dist/styles/index2.css +1 -1
  57. package/dist/styles/index3.css +1 -1
  58. package/dist/styles/index4.css +1 -1
  59. package/dist/styles/index5.css +1 -1
  60. package/dist/types/message.d.ts +1 -1
  61. package/dist/types/user.d.ts +4 -4
  62. package/package.json +12 -20
  63. package/src/components/ChatHeader/AudioCallPicker/AudioCallPicker.module.scss +57 -0
  64. package/src/components/ChatHeader/AudioCallPicker/AudioCallPicker.tsx +234 -0
  65. package/src/components/ChatHeader/AudioCallPicker/index.ts +1 -0
  66. package/src/components/ChatHeader/ChatHeader.tsx +15 -3
  67. package/src/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.tsx +33 -40
  68. package/src/components/ChatHeader/VideoCallPicker/VideoCallPicker.module.scss +57 -0
  69. package/src/components/ChatHeader/VideoCallPicker/VideoCallPicker.tsx +233 -0
  70. package/src/components/ChatHeader/VideoCallPicker/index.ts +1 -0
  71. package/src/components/ChatHeader/index.ts +2 -1
  72. package/src/components/Profile/Profile.tsx +7 -6
  73. package/src/components/Profile/ProfileDefault.tsx +8 -8
  74. package/src/components/Profile/hooks/useMyProfile.tsx +2 -3
  75. package/src/components/Profile/myProfile/MyProfile.tsx +1 -1
  76. package/src/context/ChatContext.tsx +1 -1
  77. package/src/context/ContactContext.tsx +1 -1
  78. package/src/hooks/index.ts +2 -2
  79. package/src/{states/ChatHeaderState.ts → hooks/useChatHeader.ts} +19 -22
  80. package/src/index.ts +3 -5
  81. package/src/server/mainServer.ts +2 -2
  82. package/src/states/UIManagerState.ts +9 -9
  83. package/src/states/index.ts +0 -2
  84. package/src/styles/index.scss +0 -1
  85. package/src/types/message.ts +1 -1
  86. package/src/types/user.ts +4 -4
  87. package/vite.config.ts +4 -25
  88. package/dist/ChatSetting-BtQwjHr0.js +0 -28525
  89. package/dist/assets/fonts/iconfont.ttf +0 -0
  90. package/dist/assets/fonts/iconfont.woff +0 -0
  91. package/dist/assets/fonts/iconfont.woff2 +0 -0
  92. package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.d.ts +0 -11
  93. package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.js +0 -79
  94. package/dist/components/ChatHeader/ChatHeaderActions/index.d.ts +0 -1
  95. package/dist/components/ChatHeader/ChatHeaderActions/index.js +0 -4
  96. package/dist/components/IconFont/Icon.d.ts +0 -21
  97. package/dist/components/IconFont/Icon.js +0 -47
  98. package/dist/components/IconFont/index.d.ts +0 -2
  99. package/dist/components/IconFont/index.js +0 -4
  100. package/dist/external_modules/lodash-vwDjcXxQ.js +0 -0
  101. package/dist/external_modules/mui-BcA3SBHM.js +0 -2473
  102. package/dist/states/ChatHeaderState.js +0 -48
  103. package/dist/styles/ChatHeaderActions.css +0 -1
  104. package/dist/styles/ChatSetting.css +0 -1
  105. package/dist/styles/Icon2.css +0 -1
  106. package/src/assets/fonts/iconfont.ttf +0 -0
  107. package/src/assets/fonts/iconfont.woff +0 -0
  108. package/src/assets/fonts/iconfont.woff2 +0 -0
  109. package/src/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.module.scss +0 -44
  110. package/src/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.tsx +0 -105
  111. package/src/components/ChatHeader/ChatHeaderActions/index.ts +0 -1
  112. package/src/components/IconFont/Icon.module.scss +0 -42
  113. package/src/components/IconFont/Icon.tsx +0 -68
  114. package/src/components/IconFont/index.ts +0 -3
  115. package/src/styles/fonts/icon-font.scss +0 -18
@@ -1,48 +0,0 @@
1
- import { useMemo as s } from "react";
2
- import { TUIChatEngine as i } from "@tencentcloud/chat-uikit-engine";
3
- import { E as p } from "../ChatSetting-BtQwjHr0.js";
4
- import "@tencentcloud/uikit-base-component-react";
5
- import "@tencentcloud/tui-core";
6
- import "react/jsx-runtime";
7
- import "@tencentcloud/chat";
8
- import { defaultUserAvatar as C, DEFAULT_GROUP_COMMON_AVATAR as E } from "../constant/avatar.js";
9
- import { useUIManagerState as T } from "./UIManagerState.js";
10
- function G() {
11
- const { userStatusMap: u } = T(), { activeConversation: t } = p(), n = t ? t.type === i.TYPES.CONV_SYSTEM : void 0, a = s(() => {
12
- if (!t)
13
- return;
14
- if (n)
15
- return "System Notice";
16
- const {
17
- type: e,
18
- userProfile: r,
19
- remark: m,
20
- groupProfile: o
21
- } = t;
22
- return e === i.TYPES.CONV_C2C ? m || (r == null ? void 0 : r.nick) || (r == null ? void 0 : r.userID) || "" : e === i.TYPES.CONV_GROUP && ((o == null ? void 0 : o.name) || (o == null ? void 0 : o.groupID)) || "";
23
- }, [t, n]), O = s(() => {
24
- if (!t || n)
25
- return;
26
- const {
27
- type: e,
28
- userProfile: r,
29
- groupProfile: m
30
- } = t;
31
- return e === i.TYPES.CONV_C2C ? (r == null ? void 0 : r.avatar) || C : e === i.TYPES.CONV_GROUP ? (m == null ? void 0 : m.avatar) || E : "";
32
- }, [t, n]), f = s(() => {
33
- var e;
34
- if (t && !n && t.type !== i.TYPES.CONV_GROUP)
35
- return u == null ? void 0 : u[(e = t == null ? void 0 : t.userProfile) == null ? void 0 : e.userID];
36
- }, [t, u, n]), S = s(() => (t == null ? void 0 : t.type) === i.TYPES.CONV_GROUP, [t]);
37
- return {
38
- title: a,
39
- avatar: O,
40
- isGroup: S,
41
- system: n,
42
- conversation: t,
43
- userStatus: f
44
- };
45
- }
46
- export {
47
- G as useChatHeaderState
48
- };
@@ -1 +0,0 @@
1
- .uikit-chat-header-actions{flex:0 0 auto;display:flex;flex-direction:row;align-items:center;margin-left:auto;gap:8px}[data-uikit-theme=light] .uikit-chat-header-actions__button{color:var(--uikit-theme-light-text-color-link);transition:color .3s ease-out,border-color .3s ease-out,background-color .3s ease-out}[data-uikit-theme=dark] .uikit-chat-header-actions__button{color:var(--uikit-theme-dark-text-color-link);transition:color .3s ease-out,border-color .3s ease-out,background-color .3s ease-out}.uikit-icon-button{flex:0 0 auto;border:none;padding:4px;margin:0;background:none;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;transition:background-color .2s ease;cursor:pointer}[data-uikit-theme=light] .uikit-icon-button{color:var(--uikit-theme-light-text-color-link);background-color:var(--uikit-theme-light-dropdown-color-default);transition:color .3s ease-out,border-color .3s ease-out,background-color .3s ease-out}[data-uikit-theme=light] .uikit-icon-button:hover{background-color:var(--uikit-theme-light-dropdown-color-hover)}[data-uikit-theme=light] .uikit-icon-button:active{background-color:var(--uikit-theme-light-dropdown-color-active)}[data-uikit-theme=dark] .uikit-icon-button{color:var(--uikit-theme-dark-text-color-link);background-color:var(--uikit-theme-dark-dropdown-color-default);transition:color .3s ease-out,border-color .3s ease-out,background-color .3s ease-out}[data-uikit-theme=dark] .uikit-icon-button:hover{background-color:var(--uikit-theme-dark-dropdown-color-hover)}[data-uikit-theme=dark] .uikit-icon-button:active{background-color:var(--uikit-theme-dark-dropdown-color-active)}