@tencentcloud/chat-uikit-react 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/cjs/components/Chat/Chat.js +1 -1
- package/dist/cjs/components/Chat/index.js +1 -1
- package/dist/cjs/components/ChatHeader/ChatHeader.js +1 -1
- package/dist/cjs/components/ChatHeader/ChatHeaderDefault.js +1 -1
- package/dist/cjs/components/ChatSetting/ChatSetting.js +1 -1
- package/dist/cjs/components/Contact/Contact.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/ContactInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/addFriendInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/basicInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/blockInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/friendApplication.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/friendInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/groupInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/hooks/useContactInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactList/ContactList.js +1 -1
- package/dist/cjs/components/Contact/hooks/useTUIContact.js +1 -1
- package/dist/cjs/components/ContactSearch/ContactSearch.js +1 -1
- package/dist/cjs/components/ContactSearch/hooks/useContactSearch.js +1 -1
- package/dist/cjs/components/ConversationActions/ConversationActions.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreateGroupDetail.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
- package/dist/cjs/components/ConversationList/ConversationList.js +1 -1
- package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/cjs/components/ConversationPreview/utils.js +1 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js +1 -1
- package/dist/cjs/components/MessageElement/Message.js +1 -1
- package/dist/cjs/components/MessageElement/MessageAudio.js +1 -1
- package/dist/cjs/components/MessageElement/MessageAvatar.js +1 -1
- package/dist/cjs/components/MessageElement/MessageBubble.js +1 -1
- package/dist/cjs/components/MessageElement/MessageContext.js +1 -1
- package/dist/cjs/components/MessageElement/MessageCustom.js +1 -1
- package/dist/cjs/components/MessageElement/MessageDefault.js +1 -1
- package/dist/cjs/components/MessageElement/MessageName.js +1 -1
- package/dist/cjs/components/MessageElement/MessagePlugins.js +1 -1
- package/dist/cjs/components/MessageElement/MessageProgress.js +1 -1
- package/dist/cjs/components/MessageElement/MessageRevoke.js +1 -1
- package/dist/cjs/components/MessageElement/MessageStatus.js +1 -1
- package/dist/cjs/components/MessageElement/MessageSystem.js +1 -1
- package/dist/cjs/components/MessageElement/MessageText.js +1 -1
- package/dist/cjs/components/MessageElement/MessageTip.js +1 -1
- package/dist/cjs/components/MessageElement/hooks/useMessageHandler.js +1 -1
- package/dist/cjs/components/MessageElement/hooks/useMessageReply.js +1 -1
- package/dist/cjs/components/MessageElement/utils/decodeText.js +1 -1
- package/dist/cjs/components/MessageElement/utils/emojiMap.js +1 -1
- package/dist/cjs/components/MessageElement/utils/index.js +1 -1
- package/dist/cjs/components/MessageInput/EmojiPicker.js +1 -1
- package/dist/cjs/components/MessageInput/Forward.js +1 -1
- package/dist/cjs/components/MessageInput/InputPluginsDefalut.js +1 -1
- package/dist/cjs/components/MessageInput/InputQuoteDefalut.js +1 -1
- package/dist/cjs/components/MessageInput/MessageInput.js +1 -1
- package/dist/cjs/components/MessageInput/MessageInputDefault.js +1 -1
- package/dist/cjs/components/MessageInput/hooks/useEmojiPicker.js +1 -1
- package/dist/cjs/components/MessageInput/hooks/useHandleForwardMessage.js +1 -1
- package/dist/cjs/components/MessageInput/hooks/useHandleQuoteMessage.js +1 -1
- package/dist/cjs/components/MessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/cjs/components/MessageList/MessageList.js +1 -1
- package/dist/cjs/components/MessageList/hooks/useMessageListElement.js +1 -1
- package/dist/cjs/components/Profile/Profile.js +1 -1
- package/dist/cjs/components/Profile/ProfileDefault.js +1 -1
- package/dist/cjs/context/UIKitContext.js +1 -1
- package/dist/cjs/index.css +2 -2
- package/dist/cjs/index.d.css +213 -207
- package/dist/cjs/index.d.ts +0 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/locales/en-US/emoji.js +1 -0
- package/dist/cjs/locales/en-US/index.js +1 -1
- package/dist/cjs/locales/index.js +1 -1
- package/dist/cjs/locales/ja-JP/emoji.js +1 -0
- package/dist/cjs/locales/ja-JP/index.js +1 -1
- package/dist/cjs/locales/ko-KR/emoji.js +1 -0
- package/dist/cjs/locales/ko-KR/index.js +1 -1
- package/dist/cjs/locales/zh-CN/emoji.js +1 -0
- package/dist/cjs/locales/zh-CN/index.js +1 -1
- package/dist/cjs/locales/zh-TW/emoji.js +1 -0
- package/dist/cjs/locales/zh-TW/index.js +1 -1
- package/dist/cjs/node_modules/zustand/esm/react.mjs.js +1 -0
- package/dist/cjs/node_modules/zustand/esm/vanilla.mjs.js +1 -0
- package/dist/cjs/store/UIManagerStore.js +1 -0
- package/dist/esm/components/Chat/Chat.js +1 -1
- package/dist/esm/components/Chat/index.js +1 -1
- package/dist/esm/components/ChatHeader/ChatHeader.js +1 -1
- package/dist/esm/components/ChatHeader/ChatHeaderDefault.js +1 -1
- package/dist/esm/components/ChatSetting/ChatSetting.js +1 -1
- package/dist/esm/components/Contact/Contact.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/ContactInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/addFriendInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/basicInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/blockInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/friendApplication.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/friendInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/groupInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/hooks/useContactInfo.js +1 -1
- package/dist/esm/components/Contact/ContactList/ContactList.js +1 -1
- package/dist/esm/components/Contact/hooks/useTUIContact.js +1 -1
- package/dist/esm/components/ContactSearch/ContactSearch.js +1 -1
- package/dist/esm/components/ContactSearch/hooks/useContactSearch.js +1 -1
- package/dist/esm/components/ConversationActions/ConversationActions.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreateGroupDetail.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
- package/dist/esm/components/ConversationList/ConversationList.js +1 -1
- package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/esm/components/ConversationPreview/utils.js +1 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js +1 -1
- package/dist/esm/components/MessageElement/Message.js +1 -1
- package/dist/esm/components/MessageElement/MessageAudio.js +1 -1
- package/dist/esm/components/MessageElement/MessageAvatar.js +1 -1
- package/dist/esm/components/MessageElement/MessageBubble.js +1 -1
- package/dist/esm/components/MessageElement/MessageContext.js +1 -1
- package/dist/esm/components/MessageElement/MessageCustom.js +1 -1
- package/dist/esm/components/MessageElement/MessageDefault.js +1 -1
- package/dist/esm/components/MessageElement/MessageName.js +1 -1
- package/dist/esm/components/MessageElement/MessagePlugins.js +1 -1
- package/dist/esm/components/MessageElement/MessageProgress.js +1 -1
- package/dist/esm/components/MessageElement/MessageRevoke.js +1 -1
- package/dist/esm/components/MessageElement/MessageStatus.js +1 -1
- package/dist/esm/components/MessageElement/MessageSystem.js +1 -1
- package/dist/esm/components/MessageElement/MessageText.js +1 -1
- package/dist/esm/components/MessageElement/MessageTip.js +1 -1
- package/dist/esm/components/MessageElement/hooks/useMessageHandler.js +1 -1
- package/dist/esm/components/MessageElement/hooks/useMessageReply.js +1 -1
- package/dist/esm/components/MessageElement/utils/decodeText.js +1 -1
- package/dist/esm/components/MessageElement/utils/emojiMap.js +1 -1
- package/dist/esm/components/MessageElement/utils/index.js +1 -1
- package/dist/esm/components/MessageInput/EmojiPicker.js +1 -1
- package/dist/esm/components/MessageInput/Forward.js +1 -1
- package/dist/esm/components/MessageInput/InputPluginsDefalut.js +1 -1
- package/dist/esm/components/MessageInput/InputQuoteDefalut.js +1 -1
- package/dist/esm/components/MessageInput/MessageInput.js +1 -1
- package/dist/esm/components/MessageInput/MessageInputDefault.js +1 -1
- package/dist/esm/components/MessageInput/hooks/useEmojiPicker.js +1 -1
- package/dist/esm/components/MessageInput/hooks/useHandleForwardMessage.js +1 -1
- package/dist/esm/components/MessageInput/hooks/useHandleQuoteMessage.js +1 -1
- package/dist/esm/components/MessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/esm/components/MessageList/MessageList.js +1 -1
- package/dist/esm/components/MessageList/hooks/useMessageListElement.js +1 -1
- package/dist/esm/components/Profile/Profile.js +1 -1
- package/dist/esm/components/Profile/ProfileDefault.js +1 -1
- package/dist/esm/context/UIKitContext.js +1 -1
- package/dist/esm/index.css +2 -2
- package/dist/esm/index.d.css +213 -207
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/locales/en-US/emoji.js +1 -0
- package/dist/esm/locales/en-US/index.js +1 -1
- package/dist/esm/locales/index.js +1 -1
- package/dist/esm/locales/ja-JP/emoji.js +1 -0
- package/dist/esm/locales/ja-JP/index.js +1 -1
- package/dist/esm/locales/ko-KR/emoji.js +1 -0
- package/dist/esm/locales/ko-KR/index.js +1 -1
- package/dist/esm/locales/zh-CN/emoji.js +1 -0
- package/dist/esm/locales/zh-CN/index.js +1 -1
- package/dist/esm/locales/zh-TW/emoji.js +1 -0
- package/dist/esm/locales/zh-TW/index.js +1 -1
- package/dist/esm/node_modules/zustand/esm/react.mjs.js +1 -0
- package/dist/esm/node_modules/zustand/esm/vanilla.mjs.js +1 -0
- package/dist/esm/store/UIManagerStore.js +1 -0
- package/package.json +5 -3
- package/src/components/Chat/Chat.tsx +3 -3
- package/src/components/Chat/styles/layout.scss +1 -1
- package/src/components/ChatHeader/ChatHeaderDefault.tsx +4 -3
- package/src/components/ChatHeader/styles/layout.scss +1 -1
- package/src/components/ChatSetting/ChatSetting.tsx +8 -7
- package/src/components/ChatSetting/styles/index.scss +2 -1
- package/src/components/Checkbox/styles/color.scss +1 -1
- package/src/components/Contact/Contact.tsx +4 -4
- package/src/components/Contact/ContactInfo/ContactInfo.tsx +2 -2
- package/src/components/Contact/ContactInfo/addFriendInfo.tsx +38 -36
- package/src/components/Contact/ContactInfo/basicInfo.tsx +10 -10
- package/src/components/Contact/ContactInfo/blockInfo.tsx +4 -4
- package/src/components/Contact/ContactInfo/friendApplication.tsx +4 -4
- package/src/components/Contact/ContactInfo/friendInfo.tsx +7 -7
- package/src/components/Contact/ContactInfo/groupInfo.tsx +23 -23
- package/src/components/Contact/ContactInfo/hooks/useContactInfo.tsx +2 -2
- package/src/components/Contact/ContactInfo/index.scss +1 -1
- package/src/components/Contact/ContactList/ContactList.tsx +5 -4
- package/src/components/Contact/ContactList/index.scss +1 -1
- package/src/components/Contact/hooks/useTUIContact.tsx +2 -2
- package/src/components/Contact/index.scss +1 -1
- package/src/components/ContactSearch/ContactSearch.tsx +5 -4
- package/src/components/ContactSearch/hooks/useContactSearch.tsx +4 -3
- package/src/components/ContactSearch/index.scss +1 -1
- package/src/components/ConversationActions/ConversationActions.scss +1 -1
- package/src/components/ConversationActions/ConversationActions.tsx +2 -2
- package/src/components/ConversationCreate/ConversationCreate.tsx +2 -2
- package/src/components/ConversationCreate/ConversationCreateGroupDetail.tsx +4 -4
- package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +4 -4
- package/src/components/ConversationCreate/ConversationGroupTypeInfo.tsx +2 -2
- package/src/components/ConversationCreate/styles/ConversationCreateGroupDetail.scss +1 -1
- package/src/components/ConversationCreate/styles/conversationCreateSelectView.scss +1 -1
- package/src/components/ConversationCreate/styles/conversationGroupTypeInfo.scss +1 -1
- package/src/components/ConversationCreate/styles/index.scss +1 -1
- package/src/components/ConversationList/ConversationList.scss +1 -1
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.scss +1 -1
- package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.scss +1 -1
- package/src/components/ConversationPreview/ConversationPreview.scss +1 -1
- package/src/components/ConversationPreview/ConversationPreview.tsx +3 -3
- package/src/components/ConversationPreview/utils.tsx +2 -2
- package/src/components/ConversationSearch/ConversationSearch.scss +1 -1
- package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.scss +1 -1
- package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.tsx +2 -2
- package/src/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.scss +1 -1
- package/src/components/DivWithEdit/styles/index.scss +1 -1
- package/src/components/Icon/styles/index.scss +1 -1
- package/src/components/Input/styles/index.scss +2 -2
- package/src/components/MessageElement/MessageCustom.tsx +4 -4
- package/src/components/MessageElement/MessagePlugins.tsx +3 -3
- package/src/components/MessageElement/MessageRevoke.tsx +5 -5
- package/src/components/MessageElement/MessageStatus.tsx +2 -1
- package/src/components/MessageElement/hooks/useMessageHandler.ts +9 -6
- package/src/components/MessageElement/hooks/useMessageReply.ts +3 -2
- package/src/components/MessageElement/styles/color.scss +1 -1
- package/src/components/MessageElement/styles/layout.scss +2 -2
- package/src/components/MessageElement/utils/decodeText.ts +59 -9
- package/src/components/MessageElement/utils/emojiMap.ts +73 -474
- package/src/components/MessageElement/utils/index.ts +1 -5
- package/src/components/MessageInput/EmojiPicker.tsx +10 -8
- package/src/components/MessageInput/Forward.tsx +2 -2
- package/src/components/MessageInput/InputPluginsDefalut.tsx +2 -2
- package/src/components/MessageInput/InputQuoteDefalut.tsx +6 -6
- package/src/components/MessageInput/MessageInput.tsx +0 -1
- package/src/components/MessageInput/MessageInputDefault.tsx +5 -5
- package/src/components/MessageInput/hooks/useEmojiPicker.tsx +11 -16
- package/src/components/MessageInput/hooks/useHandleForwardMessage.tsx +3 -4
- package/src/components/MessageInput/hooks/useMessageInputText.tsx +17 -11
- package/src/components/MessageInput/styles/color.scss +1 -1
- package/src/components/MessageInput/styles/layout.scss +2 -2
- package/src/components/MessageList/MessageList.tsx +2 -2
- package/src/components/MessageList/hooks/useMessageListElement.tsx +3 -2
- package/src/components/MessageList/styles/layout.scss +1 -1
- package/src/components/Plugins/styles/color.scss +1 -1
- package/src/components/Profile/Profile.tsx +2 -2
- package/src/components/Profile/ProfileDefault.tsx +4 -4
- package/src/components/Profile/myProfile/styles/index.scss +1 -1
- package/src/components/Profile/styles/color.scss +1 -1
- package/src/components/Profile/styles/layout.scss +1 -1
- package/src/context/UIKitContext.tsx +2 -8
- package/src/context/UIManagerContext.tsx +5 -5
- package/src/context/index.ts +0 -1
- package/src/locales/en-US/emoji.ts +66 -0
- package/src/locales/en-US/index.ts +2 -0
- package/src/locales/index.ts +4 -22
- package/src/locales/ja-JP/emoji.ts +66 -0
- package/src/locales/ja-JP/index.ts +2 -0
- package/src/locales/ko-KR/emoji.ts +66 -0
- package/src/locales/ko-KR/index.ts +2 -0
- package/src/locales/zh-CN/emoji.ts +66 -0
- package/src/locales/zh-CN/index.ts +2 -0
- package/src/locales/zh-TW/emoji.ts +65 -0
- package/src/locales/zh-TW/index.ts +2 -0
- package/src/store/UIManagerStore.ts +108 -0
- package/src/store/index.ts +5 -0
- package/.babelrc +0 -7
- package/.editorconfig +0 -16
- package/.husky/pre-commit +0 -4
- package/.lintstagedrc.json +0 -6
- package/.stylelintrc.js +0 -40
- package/dist/cjs/context/UIManagerContext.d.ts +0 -46
- package/dist/cjs/context/UIManagerContext.js +0 -1
- package/dist/cjs/locales/index.d.ts +0 -6
- package/dist/esm/context/UIManagerContext.d.ts +0 -46
- package/dist/esm/context/UIManagerContext.js +0 -1
- package/dist/esm/locales/index.d.ts +0 -6
- package/rollup.config.js +0 -81
- package/scripts/publish-npm.js +0 -22
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import { TUIConversationService, IGroupModel, IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
4
|
-
import {
|
|
4
|
+
import { useUIManagerStore } from '../../../store';
|
|
5
5
|
import { Icon, IconTypes } from '../../Icon';
|
|
6
6
|
import { isH5 } from '../../../utils/env';
|
|
7
7
|
import '../index.scss';
|
|
@@ -9,7 +9,7 @@ import { Avatar, defaultUserAvatar } from '../../Avatar';
|
|
|
9
9
|
|
|
10
10
|
interface Props {
|
|
11
11
|
group: IGroupModel;
|
|
12
|
-
showChats?: () => void
|
|
12
|
+
showChats?: () => void;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export function UnMemoizedGroupInfo<T extends Props>(
|
|
@@ -17,8 +17,8 @@ export function UnMemoizedGroupInfo<T extends Props>(
|
|
|
17
17
|
): React.ReactElement {
|
|
18
18
|
const { group, showChats } = props;
|
|
19
19
|
|
|
20
|
-
const { setActiveContact, setActiveConversation } =
|
|
21
|
-
const { t } =
|
|
20
|
+
const { setActiveContact, setActiveConversation } = useUIManagerStore('TUIContact');
|
|
21
|
+
const { t } = useUIKit();
|
|
22
22
|
const { groupID, name, avatar } = group;
|
|
23
23
|
|
|
24
24
|
const back = () => {
|
|
@@ -31,34 +31,34 @@ export function UnMemoizedGroupInfo<T extends Props>(
|
|
|
31
31
|
TUIConversationService.switchConversation(conversationID).then(
|
|
32
32
|
(conversationModel: IConversationModel) => {
|
|
33
33
|
setActiveConversation(conversationModel.getConversation());
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
35
|
);
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
39
|
<>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
<div className="tui-contact-info-header">
|
|
41
|
+
{isH5 && (
|
|
42
|
+
<Icon
|
|
43
|
+
width={9}
|
|
44
|
+
height={16}
|
|
45
|
+
type={IconTypes.BACK}
|
|
46
|
+
onClick={back}
|
|
47
|
+
/>
|
|
48
|
+
)}
|
|
49
|
+
<div className="header-container">
|
|
50
|
+
<div className="header-container-avatar">
|
|
51
|
+
<Avatar size={60} image={avatar || defaultUserAvatar} />
|
|
52
|
+
<div className="header-container-name">{name || groupID}</div>
|
|
53
|
+
</div>
|
|
54
|
+
<div className="header-container-text">{`groupID:${groupID}`}</div>
|
|
53
55
|
</div>
|
|
54
|
-
<div className="header-container-text">{`groupID:${groupID}`}</div>
|
|
55
56
|
</div>
|
|
56
|
-
|
|
57
|
-
<div className="tui-contact-info-content">
|
|
57
|
+
<div className="tui-contact-info-content">
|
|
58
58
|
<div className="content-btn-container">
|
|
59
59
|
<div className="content-item-btn confirm-btn" role="button" tabIndex={0} onClick={openGroupConversation}>{t('TUIContact.Send Message')}</div>
|
|
60
60
|
</div>
|
|
61
|
-
|
|
61
|
+
</div>
|
|
62
62
|
</>
|
|
63
63
|
);
|
|
64
64
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import TencentCloudChat from '@tencentcloud/chat';
|
|
3
3
|
import { Toast } from '../../../Toast';
|
|
4
|
-
import {
|
|
4
|
+
import { useUIManagerStore } from '../../../../store';
|
|
5
5
|
|
|
6
6
|
function useContactInfo() {
|
|
7
|
-
const { chat } =
|
|
7
|
+
const { chat } = useUIManagerStore();
|
|
8
8
|
|
|
9
9
|
const removeFromBlocklist = useCallback((userID: string) => {
|
|
10
10
|
chat.removeFromBlacklist({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import TencentCloudChat from '@tencentcloud/chat';
|
|
4
4
|
import { isH5 } from '../../../utils/env';
|
|
5
|
-
import {
|
|
5
|
+
import { useTUIContactContext } from '../../../context';
|
|
6
|
+
import { useUIManagerStore } from '../../../store';
|
|
6
7
|
import useContactInfo from '../ContactInfo/hooks/useContactInfo';
|
|
7
8
|
import useTUIContact from '../hooks/useTUIContact';
|
|
8
9
|
import { Avatar, defaultUserAvatar } from '../../Avatar';
|
|
@@ -19,8 +20,8 @@ interface RenderContactListProps {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
function UnMemoizedContactList<T>(): React.ReactElement {
|
|
22
|
-
const { setActiveContact } =
|
|
23
|
-
const { t } =
|
|
23
|
+
const { setActiveContact } = useUIManagerStore();
|
|
24
|
+
const { t } = useUIKit();
|
|
24
25
|
const {
|
|
25
26
|
isShowContactList, friendList, blocklistProfile, friendApplicationList,
|
|
26
27
|
} = useTUIContactContext('TUIContactList');
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
StoreName,
|
|
6
6
|
IGroupModel,
|
|
7
7
|
} from '@tencentcloud/chat-uikit-engine';
|
|
8
|
-
import {
|
|
8
|
+
import { useUIManagerStore } from '../../../store';
|
|
9
9
|
|
|
10
10
|
function useTUIContact() {
|
|
11
|
-
const { chat } =
|
|
11
|
+
const { chat } = useUIManagerStore();
|
|
12
12
|
const [friendList, setFriendList] = useState([]);
|
|
13
13
|
const [blockList, setBlockList] = useState([]);
|
|
14
14
|
const [friendApplicationList, setFriendApplicationList] = useState([]);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
|
+
import { useTUIContactContext } from '../../context';
|
|
4
|
+
import { useUIManagerStore } from '../../store';
|
|
4
5
|
import useContactSearch from './hooks/useContactSearch';
|
|
5
6
|
import { Icon, IconTypes } from '../Icon';
|
|
6
7
|
import { Avatar, defaultUserAvatar } from '../Avatar';
|
|
@@ -8,8 +9,8 @@ import { Input } from '../Input';
|
|
|
8
9
|
import './index.scss';
|
|
9
10
|
|
|
10
11
|
export function UnMemoizedContactSearch<T>(): React.ReactElement {
|
|
11
|
-
const { setActiveContact } =
|
|
12
|
-
const { t } =
|
|
12
|
+
const { setActiveContact } = useUIManagerStore('TUIContactSearch');
|
|
13
|
+
const { t } = useUIKit();
|
|
13
14
|
const { friendList, setShowContactList } = useTUIContactContext('TUIContactList');
|
|
14
15
|
const [isShowSearchResult, setShowSearchResult] = useState(false);
|
|
15
16
|
const { checkFriend, isBlock, getUserProfile } = useContactSearch();
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import TencentCloudChat from '@tencentcloud/chat';
|
|
2
|
-
import {
|
|
2
|
+
import { useTUIContactContext } from '../../../context';
|
|
3
|
+
import { useUIManagerStore } from '../../../store';
|
|
3
4
|
|
|
4
5
|
function useContactSearch() {
|
|
5
6
|
const { blockList } = useTUIContactContext('TUIContactList');
|
|
6
|
-
const { chat } =
|
|
7
|
+
const { chat } = useUIManagerStore();
|
|
7
8
|
|
|
8
9
|
const checkFriend = (info: any): Promise<any> => chat.checkFriend({
|
|
9
10
|
userIDList: [info?.userID],
|
|
10
11
|
type: TencentCloudChat.TYPES.SNS_CHECK_TYPE_BOTH,
|
|
11
12
|
}).then((res: any) => res?.data?.successUserIDList[0]?.relation
|
|
12
|
-
|
|
13
|
+
=== TencentCloudChat.TYPES.SNS_TYPE_BOTH_WAY);
|
|
13
14
|
|
|
14
15
|
const isBlock = (userID: string) => (
|
|
15
16
|
blockList?.includes(userID)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ConversationActions.tsx
|
|
2
2
|
import React, { useRef, useEffect } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
4
4
|
import { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
5
5
|
import cs from 'classnames';
|
|
6
6
|
|
|
@@ -78,7 +78,7 @@ const ConversationActions = (props: IConversationActionsProps) => {
|
|
|
78
78
|
style,
|
|
79
79
|
} = props;
|
|
80
80
|
|
|
81
|
-
const { t } =
|
|
81
|
+
const { t } = useUIKit();
|
|
82
82
|
const pluginsRef = useRef<IPluginsRef>(null);
|
|
83
83
|
const [conversationActions, setConversationActions] = React.useState<Record<string, IConversationActionItem>>({});
|
|
84
84
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import { CreateGroupParams, IConversationModel, TUIConversationService } from '@tencentcloud/chat-uikit-engine';
|
|
4
4
|
import cs from 'classnames';
|
|
5
5
|
|
|
@@ -34,7 +34,7 @@ export function ConversationCreate<T extends IConversationCreateProps>(props: T)
|
|
|
34
34
|
onBeforeCreateConversation,
|
|
35
35
|
onConversationCreated,
|
|
36
36
|
} = props;
|
|
37
|
-
const { t } =
|
|
37
|
+
const { t } = useUIKit();
|
|
38
38
|
|
|
39
39
|
const [showCreateModel, setShowCreateModel] = useState(false);
|
|
40
40
|
const [isCreateGroup, setIsCreateGroup] = useState(false);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import { Profile } from '@tencentcloud/chat';
|
|
4
4
|
import { CreateGroupParams, IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
5
5
|
import { Input } from '../Input';
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from '../Avatar';
|
|
17
17
|
import { PageStateTypes } from './ConversationCreate';
|
|
18
18
|
import { ConversationGroupTypeInfo, GroupType, typeInfoList } from './ConversationGroupTypeInfo';
|
|
19
|
-
import {
|
|
19
|
+
import { useUIManagerStore } from '../../store';
|
|
20
20
|
import { createGroupConversation } from '../../hooks/useConversation';
|
|
21
21
|
|
|
22
22
|
export interface ConversationCreateGroupDetailProps {
|
|
@@ -34,8 +34,8 @@ export function ConversationCreateGroupDetail(props: ConversationCreateGroupDeta
|
|
|
34
34
|
onBeforeCreateConversation,
|
|
35
35
|
onConversationCreated,
|
|
36
36
|
} = props;
|
|
37
|
-
const { t } =
|
|
38
|
-
const { setActiveConversation, myProfile } =
|
|
37
|
+
const { t } = useUIKit();
|
|
38
|
+
const { setActiveConversation, myProfile } = useUIManagerStore();
|
|
39
39
|
const temp = [...profileList];
|
|
40
40
|
myProfile && temp.unshift(myProfile);
|
|
41
41
|
const name = temp.map(item => item.nick || item.userID).toString();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import { Profile } from '@tencentcloud/chat';
|
|
4
4
|
import { Input } from '../Input';
|
|
5
5
|
import { Icon, IconTypes } from '../Icon';
|
|
@@ -7,7 +7,7 @@ import { ConversationCreateSelectView, ConversationCreateSelectViewProps } from
|
|
|
7
7
|
import { Avatar, defaultUserAvatar } from '../Avatar';
|
|
8
8
|
import { useConversationCreate } from './hooks/useConversationCreate';
|
|
9
9
|
import { createC2CConversation } from '../../hooks/useConversation';
|
|
10
|
-
import {
|
|
10
|
+
import { useUIManagerStore } from '../../store';
|
|
11
11
|
import { PageStateTypes } from './ConversationCreate';
|
|
12
12
|
import { Toast } from '../Toast';
|
|
13
13
|
import { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
@@ -33,9 +33,9 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
33
33
|
onBeforeCreateConversation,
|
|
34
34
|
onConversationCreated,
|
|
35
35
|
} = props;
|
|
36
|
-
const { t } =
|
|
36
|
+
const { t } = useUIKit();
|
|
37
37
|
const [searchValue, setSearchValue] = useState('');
|
|
38
|
-
const { chat } =
|
|
38
|
+
const { chat } = useUIManagerStore();
|
|
39
39
|
const [friendList, setFriendList] = useState<any>({});
|
|
40
40
|
const {
|
|
41
41
|
getFriendListSortSearchResult,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import { TUIChatEngine } from '@tencentcloud/chat-uikit-engine';
|
|
4
4
|
import './styles/conversationGroupTypeInfo.scss';
|
|
5
5
|
import { PageStateTypes } from './ConversationCreate';
|
|
@@ -27,7 +27,7 @@ export const typeInfoList: Array<{ type: GroupType; name: string; des: string }>
|
|
|
27
27
|
export function ConversationGroupTypeInfo(props: ConversationGroupTypeInfoProps) {
|
|
28
28
|
const { groupType, setGroupType, setPageState } = props;
|
|
29
29
|
|
|
30
|
-
const { t } =
|
|
30
|
+
const { t } = useUIKit();
|
|
31
31
|
const selectGroupType = (type: GroupType) => {
|
|
32
32
|
setGroupType(type);
|
|
33
33
|
setPageState(PageStateTypes.CREATE_DETAIL);
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import React, { CSSProperties, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import cs from 'classnames';
|
|
4
4
|
import { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
5
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
5
6
|
import { Icon, IconTypes } from '../Icon';
|
|
6
7
|
import { Avatar as DefaultAvatar, type AvatarProps } from '../Avatar';
|
|
7
8
|
import { ConversationActions as DefaultConversationActions, type IConversationActionsConfig, type IConversationActionsProps } from '../ConversationActions';
|
|
8
9
|
import { useConversationList } from '../../context/ConversationListContext';
|
|
9
|
-
import {
|
|
10
|
-
import { useUIKit } from '../../context';
|
|
10
|
+
import { useUIManagerStore } from '../../store';
|
|
11
11
|
import useLongPress from '../../hooks/useLongPress';
|
|
12
12
|
import useMouseHover from '../../hooks/useMouseHover';
|
|
13
13
|
import { generateHighlightTitle, getLatestMessagePreview } from './utils';
|
|
@@ -92,7 +92,7 @@ function ConversationPreviewAbstract(props: {
|
|
|
92
92
|
conversation: IConversationModel;
|
|
93
93
|
}): string | JSX.Element {
|
|
94
94
|
const { conversation } = props;
|
|
95
|
-
const { myProfile } =
|
|
95
|
+
const { myProfile } = useUIManagerStore();
|
|
96
96
|
return (
|
|
97
97
|
<div className="uikit-conversation-preview__abstract">
|
|
98
98
|
{getLatestMessagePreview(conversation, myProfile)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import TUIChatEngine, { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
2
|
-
import { formatEmojiString } from '../MessageElement/utils/emojiMap';
|
|
3
2
|
import { Conversation, Profile } from '@tencentcloud/chat';
|
|
4
3
|
import { defaultGroupAvatarWork, defaultUserAvatar } from '../Avatar';
|
|
4
|
+
import { transformTextWithEmojiKeyToName } from '../MessageElement/utils/decodeText';
|
|
5
5
|
|
|
6
6
|
interface IMessageProfile {
|
|
7
7
|
name?: string;
|
|
@@ -57,7 +57,7 @@ export const getLatestMessagePreview = (
|
|
|
57
57
|
}}
|
|
58
58
|
>
|
|
59
59
|
<span>{from}</span>
|
|
60
|
-
<span>{lastMessage.isRevoked ? 'recalled a message' :
|
|
60
|
+
<span>{lastMessage.isRevoked ? 'recalled a message' : transformTextWithEmojiKeyToName(messageForShow)}</span>
|
|
61
61
|
</div>
|
|
62
62
|
);
|
|
63
63
|
};
|
package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
2
2
|
import { Icon, IconTypes } from '../../Icon';
|
|
3
3
|
import { Input, InputProps } from '../../Input';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -18,7 +18,7 @@ function ConversationSearchInput(props: IConversationSearchInputProps) {
|
|
|
18
18
|
onFocus,
|
|
19
19
|
onBlur,
|
|
20
20
|
} = props;
|
|
21
|
-
const { t } =
|
|
21
|
+
const { t } = useUIKit();
|
|
22
22
|
return (
|
|
23
23
|
<Input
|
|
24
24
|
className={classNames(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "
|
|
1
|
+
@use "~@tencentcloud/uikit-base-component-react/dist/styles/theme/util" as *;
|
|
2
2
|
|
|
3
3
|
.tui-kit-input-box {
|
|
4
4
|
//width: 100%;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
align-items: center;
|
|
7
7
|
border-radius: 10px;
|
|
8
8
|
padding: 0 8px;
|
|
9
|
-
height:
|
|
9
|
+
height: 38px;
|
|
10
10
|
box-sizing: border-box;
|
|
11
11
|
|
|
12
12
|
@include theme() {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import TencentCloudChat from '@tencentcloud/chat';
|
|
3
|
-
import {
|
|
3
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
4
4
|
import { JSONStringToParse } from '../utils';
|
|
5
5
|
import { isCallMessage } from './utils';
|
|
6
6
|
import type { MessageContextProps } from './MessageText';
|
|
7
7
|
import { useComponentContext, useTUIChatActionContext } from '../../context';
|
|
8
|
-
import {
|
|
8
|
+
import { useUIManagerStore } from '../../store';
|
|
9
9
|
import { CallMessage } from '@tencentcloud/call-uikit-react';
|
|
10
10
|
import { startCall } from '../Chat/utils';
|
|
11
11
|
|
|
@@ -17,10 +17,10 @@ function MessageCustomWithContext<T extends MessageContextProps>(
|
|
|
17
17
|
message,
|
|
18
18
|
children,
|
|
19
19
|
} = props;
|
|
20
|
-
const { t } =
|
|
20
|
+
const { t } = useUIKit();
|
|
21
21
|
const { callButtonClicked } = useTUIChatActionContext('TUIChat');
|
|
22
22
|
const { MessageCustomPlugins } = useComponentContext('MessageCustom');
|
|
23
|
-
const { conversation } =
|
|
23
|
+
const { conversation } = useUIManagerStore('MessageCustom');
|
|
24
24
|
const handleContext = (data: any) => {
|
|
25
25
|
if (data.data === 'Hyperlink') {
|
|
26
26
|
const extension = JSONStringToParse(data?.extension);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useRef, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import TencentCloudChat from '@tencentcloud/chat';
|
|
4
4
|
import './styles/index.scss';
|
|
5
5
|
|
|
@@ -39,7 +39,7 @@ export function MessagePlugins<T extends MessagePluginsProps>(
|
|
|
39
39
|
config: propsPluginConfig,
|
|
40
40
|
} = props;
|
|
41
41
|
|
|
42
|
-
const { t } =
|
|
42
|
+
const { t } = useUIKit();
|
|
43
43
|
const [className, setClassName] = useState('');
|
|
44
44
|
const [popStyle, setPopStyle] = useState({});
|
|
45
45
|
const pluginsRef = useRef<IPluginsRef>();
|
|
@@ -114,7 +114,7 @@ export function MessagePlugins<T extends MessagePluginsProps>(
|
|
|
114
114
|
},
|
|
115
115
|
message,
|
|
116
116
|
isShow: pluginConfig.revoke.isShow
|
|
117
|
-
|
|
117
|
+
&& (message?.status === MESSAGE_STATUS.SUCCESS && message.flow === MESSAGE_FLOW.OUT),
|
|
118
118
|
relateMessageType: pluginConfig.revoke.relateMessageType,
|
|
119
119
|
});
|
|
120
120
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useCallback } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import TencentCloudChat from '@tencentcloud/chat';
|
|
4
4
|
import { MESSAGE_FLOW, MESSAGE_OPERATE } from '../../constants';
|
|
5
5
|
import { useTUIChatActionContext } from '../../context';
|
|
6
6
|
import type { MessageContextProps } from './MessageText';
|
|
7
7
|
|
|
8
|
-
function MessageRevokeWithContext
|
|
8
|
+
function MessageRevokeWithContext<T extends MessageContextProps>(
|
|
9
9
|
props: PropsWithChildren<T>,
|
|
10
|
-
):React.ReactElement {
|
|
10
|
+
): React.ReactElement {
|
|
11
11
|
const {
|
|
12
12
|
message,
|
|
13
13
|
} = props;
|
|
14
|
-
const { t } =
|
|
14
|
+
const { t } = useUIKit();
|
|
15
15
|
const { operateMessage } = useTUIChatActionContext('MessageRevokeWithContext');
|
|
16
16
|
|
|
17
17
|
const handleRevoke = useCallback(() => {
|
|
@@ -41,7 +41,7 @@ function MessageRevokeWithContext <T extends MessageContextProps>(
|
|
|
41
41
|
const MemoizedMessageRevoke = React.memo(MessageRevokeWithContext) as
|
|
42
42
|
typeof MessageRevokeWithContext;
|
|
43
43
|
|
|
44
|
-
export function MessageRevoke(props:MessageContextProps):React.ReactElement {
|
|
44
|
+
export function MessageRevoke(props: MessageContextProps): React.ReactElement {
|
|
45
45
|
return (
|
|
46
46
|
<MemoizedMessageRevoke {...props} />
|
|
47
47
|
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { Message } from '@tencentcloud/chat';
|
|
3
|
-
import {
|
|
3
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
4
|
+
import { useTUIMessageContext } from '../../context';
|
|
4
5
|
import { getTimeStamp } from '../utils';
|
|
5
6
|
|
|
6
7
|
export interface MessageContextProps {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import { Message } from '@tencentcloud/chat';
|
|
4
4
|
import { TUIStore } from '@tencentcloud/chat-uikit-engine';
|
|
5
5
|
import { CONSTANT_DISPATCH_TYPE, MESSAGE_FLOW, MESSAGE_OPERATE } from '../../../constants';
|
|
6
6
|
import { enableSampleTaskStatus } from '../../utils';
|
|
7
|
-
import { useTUIChatActionContext
|
|
7
|
+
import { useTUIChatActionContext } from '../../../context';
|
|
8
|
+
import { useUIManagerStore } from '../../../store';
|
|
8
9
|
import { Toast } from '../../Toast';
|
|
10
|
+
import { transformTextWithEmojiKeyToName } from '../utils/decodeText';
|
|
9
11
|
|
|
10
12
|
interface MessageHandlerProps {
|
|
11
13
|
handleError?: (error: any) => void;
|
|
@@ -23,8 +25,8 @@ export const useMessageHandler = (props: MessageHandlerProps) => {
|
|
|
23
25
|
operateMessage,
|
|
24
26
|
revokeMessage,
|
|
25
27
|
} = useTUIChatActionContext('useDeleteHandler');
|
|
26
|
-
const { t } =
|
|
27
|
-
const { chat } =
|
|
28
|
+
const { t } = useUIKit();
|
|
29
|
+
const { chat } = useUIManagerStore();
|
|
28
30
|
|
|
29
31
|
const handleDelMessage = useCallback(async (event?: any) => {
|
|
30
32
|
event.preventDefault();
|
|
@@ -66,9 +68,10 @@ export const useMessageHandler = (props: MessageHandlerProps) => {
|
|
|
66
68
|
|
|
67
69
|
const handleCopyMessage = useCallback((event?: any) => {
|
|
68
70
|
event.preventDefault();
|
|
71
|
+
const copyText = transformTextWithEmojiKeyToName(message?.payload.text);
|
|
69
72
|
if (navigator.clipboard) {
|
|
70
73
|
// clipboard api
|
|
71
|
-
navigator.clipboard.writeText(
|
|
74
|
+
navigator.clipboard.writeText(copyText);
|
|
72
75
|
} else {
|
|
73
76
|
const textarea = document.createElement('textarea');
|
|
74
77
|
document.body.appendChild(textarea);
|
|
@@ -76,7 +79,7 @@ export const useMessageHandler = (props: MessageHandlerProps) => {
|
|
|
76
79
|
textarea.style.position = 'fixed';
|
|
77
80
|
textarea.style.clip = 'rect(0 0 0 0)';
|
|
78
81
|
textarea.style.top = '10px';
|
|
79
|
-
textarea.value =
|
|
82
|
+
textarea.value = copyText;
|
|
80
83
|
// select
|
|
81
84
|
textarea.select();
|
|
82
85
|
// copy
|