@tencentcloud/chat-uikit-react 2.2.3 → 2.2.5
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/.babelrc +2 -2
- package/.editorconfig +16 -0
- package/.eslintrc.js +225 -48
- package/.husky/pre-commit +4 -0
- package/.lintstagedrc.json +6 -0
- package/.stylelintrc.js +40 -0
- package/CHANGELOG.md +14 -0
- package/README.md +8 -8
- package/dist/cjs/assets/fonts/iconfont.ttf +0 -0
- package/dist/cjs/assets/fonts/iconfont.woff +0 -0
- package/dist/cjs/assets/fonts/iconfont.woff2 +0 -0
- package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
- package/dist/cjs/components/ConversationPreview/utils.js +1 -1
- package/dist/cjs/components/DivWithEdit/WithText.js +1 -1
- package/dist/cjs/components/Input/Input.js +1 -1
- package/dist/cjs/components/Plugins/index.js +1 -1
- package/dist/cjs/components/TUIKit/TUIKit.js +1 -1
- package/dist/cjs/components/TUIMessage/utils/emojiMap.js +1 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/cjs/components/TUIMessageList/TUIMessageList.js +1 -1
- package/dist/cjs/components/untils.js +1 -1
- package/dist/cjs/context/TUIKitContext.js +1 -1
- package/dist/cjs/index.css +2 -1
- package/dist/cjs/index.d.css +646 -172
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/locales/en-US/index.js +1 -0
- package/dist/cjs/locales/index.js +1 -1
- package/dist/cjs/locales/ja-JP/TUIChat.js +1 -0
- package/dist/cjs/locales/ja-JP/TUIContact.js +1 -0
- package/dist/cjs/locales/ja-JP/TUIConversation.js +1 -0
- package/dist/cjs/locales/ja-JP/TUIProfile.js +1 -0
- package/dist/cjs/locales/ja-JP/index.js +1 -0
- package/dist/cjs/locales/ko-KR/TUIChat.js +1 -0
- package/dist/cjs/locales/ko-KR/TUIContact.js +1 -0
- package/dist/cjs/locales/ko-KR/TUIConversation.js +1 -0
- package/dist/cjs/locales/ko-KR/TUIProfile.js +1 -0
- package/dist/cjs/locales/ko-KR/index.js +1 -0
- package/dist/cjs/utils/env.d.ts +4 -3
- package/dist/cjs/utils/env.js +1 -1
- package/dist/esm/assets/fonts/iconfont.ttf +0 -0
- package/dist/esm/assets/fonts/iconfont.woff +0 -0
- package/dist/esm/assets/fonts/iconfont.woff2 +0 -0
- package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
- package/dist/esm/components/ConversationPreview/utils.js +1 -1
- package/dist/esm/components/DivWithEdit/WithText.js +1 -1
- package/dist/esm/components/Input/Input.js +1 -1
- package/dist/esm/components/Plugins/index.js +1 -1
- package/dist/esm/components/TUIKit/TUIKit.js +1 -1
- package/dist/esm/components/TUIMessage/utils/emojiMap.js +1 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/esm/components/TUIMessageList/TUIMessageList.js +1 -1
- package/dist/esm/components/untils.js +1 -1
- package/dist/esm/context/TUIKitContext.js +1 -1
- package/dist/esm/index.css +2 -1
- package/dist/esm/index.d.css +646 -172
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/locales/en-US/index.js +1 -0
- package/dist/esm/locales/index.js +1 -1
- package/dist/esm/locales/ja-JP/TUIChat.js +1 -0
- package/dist/esm/locales/ja-JP/TUIContact.js +1 -0
- package/dist/esm/locales/ja-JP/TUIConversation.js +1 -0
- package/dist/esm/locales/ja-JP/TUIProfile.js +1 -0
- package/dist/esm/locales/ja-JP/index.js +1 -0
- package/dist/esm/locales/ko-KR/TUIChat.js +1 -0
- package/dist/esm/locales/ko-KR/TUIContact.js +1 -0
- package/dist/esm/locales/ko-KR/TUIConversation.js +1 -0
- package/dist/esm/locales/ko-KR/TUIProfile.js +1 -0
- package/dist/esm/locales/ko-KR/index.js +1 -0
- package/dist/esm/utils/env.d.ts +4 -3
- package/dist/esm/utils/env.js +1 -1
- package/package.json +22 -16
- package/rollup.config.js +40 -25
- package/src/assets/fonts/iconfont.ttf +0 -0
- package/src/assets/fonts/iconfont.woff +0 -0
- package/src/assets/fonts/iconfont.woff2 +0 -0
- package/src/components/ConversationCreate/styles/ConversationCreatGroupDetail.scss +16 -7
- package/src/components/ConversationCreate/styles/index.scss +23 -13
- package/src/components/ConversationPreview/ConversationPreviewContent.tsx +1 -2
- package/src/components/ConversationPreview/styles/index.scss +47 -19
- package/src/components/ConversationPreview/utils.tsx +37 -29
- package/src/components/DivWithEdit/WithText.tsx +4 -2
- package/src/components/Input/Input.tsx +3 -1
- package/src/components/Input/styles/index.scss +7 -5
- package/src/components/Model/styles/layout.scss +3 -3
- package/src/components/Plugins/styles/color.scss +17 -3
- package/src/components/Popup/styles/layout.scss +2 -1
- package/src/components/TUIChatHeader/styles/layout.scss +13 -2
- package/src/components/TUIConversationList/index.scss +26 -9
- package/src/components/TUIKit/TUIKit.tsx +4 -3
- package/src/components/TUIKit/styles/index.scss +27 -7
- package/src/components/TUIManage/styles/index.scss +20 -10
- package/src/components/TUIMessage/styles/color.scss +20 -9
- package/src/components/TUIMessage/styles/layout.scss +44 -11
- package/src/components/TUIMessage/utils/emojiMap.ts +1 -1
- package/src/components/TUIMessageInput/TUIMessageInputDefault.tsx +3 -1
- package/src/components/TUIMessageInput/hooks/useEmojiPicker.tsx +1 -1
- package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +3 -1
- package/src/components/TUIMessageInput/styles/color.scss +25 -6
- package/src/components/TUIMessageInput/styles/layout.scss +58 -16
- package/src/components/TUIMessageList/TUIMessageList.tsx +17 -10
- package/src/components/TUIMessageList/styles/layout.scss +16 -2
- package/src/components/TUIProfile/styles/layout.scss +33 -16
- package/src/components/untils.ts +13 -17
- package/src/context/TUIKitContext.tsx +6 -1
- package/src/locales/en-US/TUIGlobal.ts +6 -0
- package/src/locales/en-US/index.ts +14 -0
- package/src/locales/index.ts +15 -7
- package/src/locales/ja-JP/TUIChat.ts +27 -0
- package/src/locales/ja-JP/TUIContact.ts +30 -0
- package/src/locales/ja-JP/TUIConversation.ts +33 -0
- package/src/locales/ja-JP/TUIGlobal.ts +6 -0
- package/src/locales/ja-JP/TUIProfile.ts +15 -0
- package/src/locales/{en → ja-JP}/index.ts +0 -2
- package/src/locales/ko-KR/TUIChat.ts +27 -0
- package/src/locales/ko-KR/TUIContact.ts +30 -0
- package/src/locales/ko-KR/TUIConversation.ts +33 -0
- package/src/locales/ko-KR/TUIGlobal.ts +6 -0
- package/src/locales/ko-KR/TUIProfile.ts +15 -0
- package/src/locales/ko-KR/index.ts +11 -0
- package/src/locales/zh-CN/TUIGlobal.ts +6 -0
- package/src/styles/colors/_color-dark.scss +35 -0
- package/src/styles/colors/_color-light.scss +35 -0
- package/src/styles/colors/_color-theme.scss +54 -0
- package/src/styles/fonts/icon-font.scss +18 -0
- package/src/styles/index.scss +4 -0
- package/src/styles/normalize.scss +355 -0
- package/src/utils/env.ts +7 -2
- package/tsconfig.json +1 -0
- package/dist/cjs/locales/en/index.js +0 -1
- package/dist/esm/locales/en/index.js +0 -1
- package/src/components/TUIKit/styles/reset.scss +0 -67
- /package/dist/cjs/locales/{en → en-US}/TUIChat.js +0 -0
- /package/dist/cjs/locales/{en → en-US}/TUIContact.js +0 -0
- /package/dist/cjs/locales/{en → en-US}/TUIConversation.js +0 -0
- /package/dist/cjs/locales/{en → en-US}/TUIProfile.js +0 -0
- /package/dist/cjs/locales/{zh_cn → zh-CN}/TUIChat.js +0 -0
- /package/dist/cjs/locales/{zh_cn → zh-CN}/TUIContact.js +0 -0
- /package/dist/cjs/locales/{zh_cn → zh-CN}/TUIConversation.js +0 -0
- /package/dist/cjs/locales/{zh_cn → zh-CN}/TUIProfile.js +0 -0
- /package/dist/cjs/locales/{zh_cn → zh-CN}/index.js +0 -0
- /package/dist/esm/locales/{en → en-US}/TUIChat.js +0 -0
- /package/dist/esm/locales/{en → en-US}/TUIContact.js +0 -0
- /package/dist/esm/locales/{en → en-US}/TUIConversation.js +0 -0
- /package/dist/esm/locales/{en → en-US}/TUIProfile.js +0 -0
- /package/dist/esm/locales/{zh_cn → zh-CN}/TUIChat.js +0 -0
- /package/dist/esm/locales/{zh_cn → zh-CN}/TUIContact.js +0 -0
- /package/dist/esm/locales/{zh_cn → zh-CN}/TUIConversation.js +0 -0
- /package/dist/esm/locales/{zh_cn → zh-CN}/TUIProfile.js +0 -0
- /package/dist/esm/locales/{zh_cn → zh-CN}/index.js +0 -0
- /package/src/locales/{en → en-US}/TUIChat.ts +0 -0
- /package/src/locales/{en → en-US}/TUIContact.ts +0 -0
- /package/src/locales/{en → en-US}/TUIConversation.ts +0 -0
- /package/src/locales/{en → en-US}/TUIProfile.ts +0 -0
- /package/src/locales/{zh_cn → zh-CN}/TUIChat.ts +0 -0
- /package/src/locales/{zh_cn → zh-CN}/TUIContact.ts +0 -0
- /package/src/locales/{zh_cn → zh-CN}/TUIConversation.ts +0 -0
- /package/src/locales/{zh_cn → zh-CN}/TUIProfile.ts +0 -0
- /package/src/locales/{zh_cn → zh-CN}/index.ts +0 -0
package/dist/cjs/index.d.ts
CHANGED
|
@@ -46,5 +46,5 @@ export { TUIContact, UnMemoizedTUIContact } from './components/TUIContact/TUICon
|
|
|
46
46
|
export { CreateGroupConversationParams, useConversation } from './hooks/useConversation.js';
|
|
47
47
|
export { useProfile } from './hooks/useProfile.js';
|
|
48
48
|
export { t } from './locales/index.js';
|
|
49
|
-
export { isH5, isPC } from './utils/env.js';
|
|
49
|
+
export { isH5, isPC, setPlatform } from './utils/env.js';
|
|
50
50
|
export { default as i18next } from 'i18next';
|
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./server.js"),t=require("./components/TUIKit/TUIKit.js"),o=require("./components/TUIKit/hooks/useTUIKit.js"),n=require("./components/TUIKit/hooks/useCreateTUIKitContext.js"),s=require("./components/TUIConversation/TUIConversation.js"),r=require("./components/TUIConversationList/TUIConversationList.js");require("react"),require("@tencentcloud/chat"),require("@tencentcloud/chat-uikit-engine");var a=require("./components/TUIChat/TUIChat.js");require("tslib");var i=require("./components/ConversationPreview/ConversationPreview.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./server.js"),t=require("./components/TUIKit/TUIKit.js"),o=require("./components/TUIKit/hooks/useTUIKit.js"),n=require("./components/TUIKit/hooks/useCreateTUIKitContext.js"),s=require("./components/TUIConversation/TUIConversation.js"),r=require("./components/TUIConversationList/TUIConversationList.js");require("react"),require("@tencentcloud/chat"),require("@tencentcloud/chat-uikit-engine");var a=require("./components/TUIChat/TUIChat.js");require("tslib");var i=require("./components/ConversationPreview/ConversationPreview.js"),u=require("./components/ConversationPreview/ConversationPreviewContent.js"),p=require("./components/TUIChatHeader/TUIChatHeader.js"),I=require("./components/TUIChatHeader/TUIChatHeaderDefault.js"),C=require("./components/TUIMessageList/TUIMessageList.js"),x=require("./components/TUIMessage/TUIMessage.js"),T=require("./components/TUIMessage/MessagePlugins.js"),U=require("./components/TUIMessage/MessageContext.js"),c=require("./components/TUIMessageInput/TUIMessageInput.js"),v=require("./components/TUIMessageInput/TUIMessageInputDefault.js"),m=require("./components/TUIMessageInput/InputPluginsDefalut.js"),l=require("./components/TUIProfile/TUIProfile.js"),d=require("./components/TUIProfile/TUIProfileDefault.js"),g=require("./components/Avatar/Avatar.js"),M=require("./components/Avatar/default.js"),P=require("./components/ConversationSearch/ConversationSearchInput.js"),f=require("./components/ConversationSearch/ConversationSearchResult.js"),h=require("./components/TUIManage/TUIManage.js"),j=require("./components/Popup/index.js"),q=require("./components/Checkbox/index.js"),S=require("./components/DivWithEdit/DivWithEdit.js"),A=require("./components/Icon/Icon.js"),K=require("./components/Icon/type.js"),b=require("./components/EmptyStateIndicator/EmptyStateIndicator.js"),y=require("./components/Input/Input.js"),w=require("./components/Model/index.js"),D=require("./components/Plugins/index.js"),L=require("./components/Switch/Switch.js"),k=require("./components/Toast/index.js"),H=require("./components/TUIContact/TUIContactList/TUIContactList.js"),E=require("./components/TUIContact/TUIContactInfo/TUIContactInfo.js"),G=require("./components/TUIContact/TUIContact.js"),z=require("./context/TUIKitContext.js"),O=require("./context/TUIChatStateContext.js"),W=require("./context/TUIChatActionContext.js"),R=require("./context/TUIMessageContext.js"),N=require("./context/ComponentContext.js"),V=require("./context/TUIMessageInputContext.js"),_=require("./context/TUIContactContext.js"),B=require("./hooks/useConversation.js"),F=require("./hooks/useProfile.js"),J=require("./locales/index.js"),Q=require("./utils/env.js");function X(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var Y=X(require("i18next"));new e,exports.TUIKit=t.TUIKit,exports.useTUIKit=o.useTUIKit,exports.useCreateTUIKitContext=n.useCreateTUIKitContext,exports.TUIConversation=s.TUIConversation,exports.UnMemoizedTUIConversation=s.UnMemoizedTUIConversation,exports.TUIConversationList=r.TUIConversationList,exports.UnMemoTUIConversationList=r.UnMemoTUIConversationList,exports.TUIChat=a.TUIChat,exports.ConversationPreview=i.ConversationPreview,exports.ConversationPreviewContent=u.ConversationPreviewContent,exports.unMemoConversationPreviewContent=u.unMemoConversationPreviewContent,exports.TUIChatHeader=p.TUIChatHeader,exports.TUIChatHeaderDefault=I.TUIChatHeaderDefault,exports.TUIMessageList=C.TUIMessageList,exports.TUIMessage=x.TUIMessage,exports.MessagePlugins=T.MessagePlugins,exports.MessageContext=U.MessageContext,exports.TUIMessageInput=c.TUIMessageInput,exports.TUIMessageInputDefault=v.TUIMessageInputDefault,exports.InputPluginsDefalut=m.InputPluginsDefalut,exports.TUIProfile=l.TUIProfile,exports.TUIProfileDefault=d.TUIProfileDefault,exports.Avatar=g.Avatar,exports.defaultGroupAvatarAVChatRoom=M.defaultGroupAvatarAVChatRoom,exports.defaultGroupAvatarMeeting=M.defaultGroupAvatarMeeting,exports.defaultGroupAvatarPublic=M.defaultGroupAvatarPublic,exports.defaultGroupAvatarWork=M.defaultGroupAvatarWork,exports.defaultUserAvatar=M.defaultUserAvatar,exports.ConversationSearchInput=P.ConversationSearchInput,exports.ConversationSearchResult=f.ConversationSearchResult,exports.TUIManage=h.TUIManage,exports.Popup=j.Popup,exports.Checkbox=q.Checkbox,exports.DivWithEdit=S.DivWithEdit,exports.Icon=A.Icon,exports.changeTypeToIconClassName=A.changeTypeToIconClassName,Object.defineProperty(exports,"IconTypes",{enumerable:!0,get:function(){return K.IconTypes}}),exports.EmptyStateIndicator=b.EmptyStateIndicator,exports.Input=y.Input,exports.Model=w.Model,exports.Plugins=D.Plugins,exports.Switch=L.Switch,exports.Toast=k.Toast,exports.TUIContactList=H.TUIContactList,exports.TUIContactInfo=E.TUIContactInfo,exports.UnMemoizedTUIContactInfo=E.UnMemoizedTUIContactInfo,exports.TUIContact=G.TUIContact,exports.UnMemoizedTUIContact=G.UnMemoizedTUIContact,exports.TUIKitContext=z.TUIKitContext,exports.TUIKitProvider=z.TUIKitProvider,exports.useTUIKitContext=z.useTUIKitContext,exports.TUIChatStateContext=O.TUIChatStateContext,exports.TUIChatStateContextProvider=O.TUIChatStateContextProvider,exports.useTUIChatStateContext=O.useTUIChatStateContext,exports.TUIChatActionContext=W.TUIChatActionContext,exports.TUIChatActionProvider=W.TUIChatActionProvider,exports.useTUIChatActionContext=W.useTUIChatActionContext,exports.TUIMessageContext=R.TUIMessageContext,exports.TUIMessageContextProvider=R.TUIMessageContextProvider,Object.defineProperty(exports,"messageShowType",{enumerable:!0,get:function(){return R.messageShowType}}),exports.useTUIMessageContext=R.useTUIMessageContext,exports.ComponentContext=N.ComponentContext,exports.ComponentProvider=N.ComponentProvider,exports.useComponentContext=N.useComponentContext,exports.TUIMessageInputContext=V.TUIMessageInputContext,exports.TUIMessageInputContextProvider=V.TUIMessageInputContextProvider,exports.useTUIMessageInputContext=V.useTUIMessageInputContext,exports.TUIContactContext=_.TUIContactContext,exports.TUIContactContextProvider=_.TUIContactContextProvider,exports.useTUIContactContext=_.useTUIContactContext,exports.useConversation=B.useConversation,exports.useProfile=F.useProfile,exports.t=J.t,Object.defineProperty(exports,"isH5",{enumerable:!0,get:function(){return Q.isH5}}),Object.defineProperty(exports,"isPC",{enumerable:!0,get:function(){return Q.isPC}}),exports.setPlatform=Q.setPlatform,Object.defineProperty(exports,"i18next",{enumerable:!0,get:function(){return Y.default}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./TUIChat.js"),r=require("./TUIConversation.js"),t=require("./TUIContact.js"),o=require("./TUIProfile.js"),s={TUIGlobal:o,TUIChat:e,TUIConversation:r,TUIContact:t,TUIProfile:o};exports.message=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("i18next"),t=require("react-i18next"),r=require("./en/index.js"),n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("i18next"),t=require("react-i18next"),r=require("./en-US/index.js"),n=require("./zh-CN/index.js"),a=require("./ja-JP/index.js"),i=require("./ko-KR/index.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=s(e),o={"en-US":{translation:r.message},"zh-CN":{translation:n.message},"ja-JP":{translation:a.message},"ko-KR":{translation:i.message}};u.default.use(t.initReactI18next).init({resources:o,lng:"en-US",interpolation:{escapeValue:!1}});var l=u.default.t;Object.defineProperty(exports,"i18next",{enumerable:!0,get:function(){return u.default}}),exports.t=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";module.exports={Recall:"取り消す",Reference:"参照",Forward:"転送",Copy:"コピー",Delete:"削除","Forward to":"転送先","recalled a message":"メッセージを取り消しました","Re-edit":"再編集",Resend:"再送信",You:"あなた","Recent Chats":"最近のチャット","Frequently Contacted":"よく連絡する相手","No Result":"検索結果なし","Search Result":"検索結果",Image:"画像",Video:"ビデオ",File:"ファイル","Enter a message":"メッセージを入力してください","No More":"これ以上なし","Error deleting message":"メッセージの削除エラー","The message recall exceeded the time limit (default 2 minutes)":"メッセージの取り消しは制限時間を超過しました(デフォルトは2分)","Error revoke Message":"メッセージの取り消しエラー","Custom message":"カスタムメッセージ"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";module.exports={"Enter a userID":"ユーザーIDを入力して、エンターで検索","Enter the verification info":"認証情報を記入してください","Request to join":"参加申請",Requested:"申請済み",Accept:"受け入れる",Refuse:"拒否",Handled:"処理済み",Friends:"私の友達","Send Message":"メッセージを送信",Signature:"個性的なサイン","Successful application, waiting for the administrator to agree to join the group application":"申請が成功し、管理者のグループ参加同意を待っています","New Contacts":"新しい連絡先","Blocked List":"ブロックリスト","Group List":"私のグループチャット","No Result":"検索結果なし",ID:"ID",User:"連絡先","Add Friend":"友達追加",remark:"備考",block:"ブロック","Delete friend":"友達削除","waiting for verification":"認証待ち","verification info":"認証情報","Send application":"申請を送信",Agree:"賛成"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";module.exports={"Start chat":"チャットを開始","New one-to-one chat":"新しい一対一のチャットを開始","New group chat":"新しいグループチャットを開始",Delete:"チャットを削除",Pin:"チャットをトップに固定",Unpin:"トップ固定を解除","Conversation Information":"チャット情報",Search:"検索","Add Participants":"グループチャットを作成","No conversation":"チャットなし",Next:"次へ","Group Name":"グループ名","Group ID":"グループID","Group Type":"グループタイプ",Participants:"参加者",Create:"作成",Details:"詳細",Work:"友達の仕事グループ(Work)",Public:"見知らぬ人の社交グループ(Public)",Meeting:"一時的な会議グループ(Meeting)",AVChatRoom:"ライブチャットルーム(AVChatroom)",Community:"コミュニティ(Community)","Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.":"通常のWeChatグループのように、作成後はグループ内の友達のみが招待してグループに参加できます。招待は招待される側の同意やグループオーナーの承認が必要ありません。詳細はドキュメントを参照してください。","After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.":"QQグループのように、作成後にグループオーナーがグループ管理者を指名できます。ユーザーはグループIDを検索してグループ参加申請を行い、グループオーナーまたは管理者の承認を得た後にグループに参加できます。詳細はドキュメントを参照してください。","After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.":"グループ作成後、ユーザーは自由にグループに参加したり退出したりでき、グループ参加前のメッセージも閲覧できます。これは、音声およびビデオ会議やオンライン教育などの腾讯实时通信(TRTC)を統合するシナリオに適しています。詳細はドキュメントを参照してください。","After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.":"グループ作成後、ユーザーは自由にグループに参加したり退出したりできますが、グループメンバー数に上限はありませんが、メッセージ履歴は保存されません。これはライブビデオ放送(LVB)と組み合わせて、画面上のコメントシナリオをサポートするために使用できます。詳細はドキュメントを参照してください。","After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.":"作成後は自由に出入りでき、最大10万人をサポートし、歴史的メッセージの保存をサポートしています。ユーザーがグループIDを検索してグループ参加申請を行った後、管理者承認なしにグループに参加できます。詳細は製品ドキュメントを参照してください。","Participant cannot be empty":"参加者は空にできません"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";module.exports={"Personal information":"個人情報",Signature:"個性署名",Gender:"性別",Male:"男",Female:"女",AllowType:"友達追加の認証方法",NeedConfirm:"認証が必要",AllowAny:"どのユーザーにも友達追加を許可",DenyAny:"どのユーザーにも友達追加を拒否",Birthday:"誕生日",Unknown:"未設定"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={TUIChat:require("./TUIChat.js"),TUIConversation:require("./TUIConversation.js"),TUIContact:require("./TUIContact.js"),TUIProfile:require("./TUIProfile.js")};exports.message=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";module.exports={Recall:"회수",Reference:"인용",Forward:"전송",Copy:"복사",Delete:"삭제","Forward to":"전송 대상","recalled a message":"메시지를 회수했습니다","Re-edit":"재편집",Resend:"재전송",You:"당신","Recent Chats":"대화","Frequently Contacted":"자주 연락하는 사람들","No Result":"검색 결과 없음","Search Result":"검색 결과",Image:"이미지",Video:"비디오",File:"파일","Enter a message":"메시지를 입력하세요","No More":"더 이상 없습니다","Error deleting message":"메시지 삭제에 실패했습니다","The message recall exceeded the time limit (default 2 minutes)":"메시지 회수 시간이 제한을 초과했습니다 (기본 2분)","Error revoke Message":"메시지 회수에 실패했습니다","Custom message":"사용자 정의 메시지"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";module.exports={"Enter a userID":"사용자 ID를 입력하고 엔터로 검색","Enter the verification info":"확인 정보를 입력하세요","Request to join":"가입 신청",Requested:"신청됨",Accept:"수락",Refuse:"거절",Handled:"처리됨",Friends:"내 친구들","Send Message":"메시지 보내기",Signature:"개성 서명","Successful application, waiting for the administrator to agree to join the group application":"관리자 승인을 기다리는 중","New Contacts":"새 연락처","Blocked List":"블랙리스트","Group List":"내 그룹 채팅","No Result":"검색 결과 없음",ID:"ID",User:"연락처","Add Friend":"친구 추가",remark:"비고",block:"블랙리스트에 추가","Delete friend":"친구 삭제","waiting for verification":"확인 대기 중","verification info":"확인 정보","Send application":"신청 보내기",Agree:"동의"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";module.exports={"Start chat":"채팅 시작","New one-to-one chat":"1:1 채팅 시작","New group chat":"그룹 채팅 시작",Delete:"채팅 삭제",Pin:"채팅 고정",Unpin:"채팅 고정 해제","Conversation Information":"채팅 정보",Search:"검색","Add Participants":"그룹 채팅 생성","No conversation":"채팅 없음",Next:"다음","Group Name":"그룹 이름","Group ID":"그룹 ID","Group Type":"그룹 유형",Participants:"멤버",Create:"생성",Details:"상세",Work:"친구 작업 그룹(Work)",Public:"낯선 사람 소셜 그룹(Public)",Meeting:"임시 회의 그룹(Meeting)",AVChatRoom:"라이브 방송 그룹(AVChatroom)",Community:"커뮤니티(Community)","Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.":"일반 위챗 그룹과 유사하게, 생성 후에는 이미 그룹에 있는 친구의 초대로만 그룹 가입이 가능하며, 초대자는 수락하지 않아도 되고 그룹 소유자의 승인을 받지 않아도 됩니다. 자세한 내용은 문서를 참조하십시오.","After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.":"QQ 그룹과 유사하게, 생성 후에는 그룹 소유자가 그룹 관리자를 지정할 수 있습니다. 사용자가 그룹 ID를 검색하여 가입 요청을 보내면, 그룹 소유자 또는 관리자의 승인을 받아야만 그룹에 가입할 수 있습니다. 자세한 내용은 문서를 참조하십시오.","After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.":"그룹을 생성한 후에는 사용자가 그룹에 자유롭게 가입하고 탈퇴할 수 있으며, 가입하기 전에 보낸 메시지를 볼 수 있습니다. 이는 음성 및 비디오 회의, 온라인 교육 등 Tencent 실시간 통신(TRTC)과 통합되는 시나리오에 적합합니다. 자세한 내용은 문서를 참조하십시오.","After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.":"그룹을 생성한 후에는 사용자가 그룹에 자유롭게 가입하고 탈퇴할 수 있으며, 그룹은 무제한의 멤버 수를 가질 수 있지만 메시지 역사를 저장하지는 않습니다. 이는 라이브 비디오 방송(LVB)과 결합하여 화면상 커멘트 시나리오를 지원하는 데 사용할 수 있습니다. 자세한 내용은 문서를 참조하십시오.","After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.":"생성 후에는 자유롭게 입장하고 탈퇴할 수 있으며, 최대 100,000명을 지원하고, 메시지 역사를 저장하며, 사용자가 그룹 ID를 검색하여 그룹 신청을 시작한 후에는 관리자 승인 없이 그룹에 가입할 수 있습니다. 자세한 내용은 제품 문서를 참조하십시오.","Participant cannot be empty":"참여자는 비워둘 수 없습니다"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";module.exports={"Personal information":"개인 정보",Signature:"개성 서명",Gender:"성별",Male:"남성",Female:"여성",AllowType:"친구 추가 인증 방법",NeedConfirm:"인증 필요",AllowAny:"모든 사용자에게 친구 추가를 허용",DenyAny:"모든 사용자에게 친구 추가를 거부",Birthday:"생일",Unknown:"미 설정"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={TUIChat:require("./TUIChat.js"),TUIConversation:require("./TUIConversation.js"),TUIContact:require("./TUIContact.js"),TUIProfile:require("./TUIProfile.js")};exports.message=e;
|
package/dist/cjs/utils/env.d.ts
CHANGED
package/dist/cjs/utils/env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@tencentcloud/universal-api")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@tencentcloud/universal-api");exports.isPC="pc"===e.getPlatform(),exports.isH5="h5"===e.getPlatform();exports.setPlatform=function(e){exports.isPC="pc"===e,exports.isH5="h5"===e};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import t,{useRef as i,useState as r,useEffect as a}from"react";import{useTranslation as c}from"react-i18next";import{TUIConversationService as s}from"@tencentcloud/chat-uikit-engine";import{isPC as l}from"../../utils/env.js";import{Avatar as v}from"../Avatar/Avatar.js";import{Icon as m}from"../Icon/Icon.js";import{IconTypes as u}from"../Icon/type.js";import{Plugins as d}from"../Plugins/index.js";import{useConversation as p}from"../../hooks/useConversation.js";import{useTUIKitContext as h}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function f(t){var f,C=t.conversation,I=t.Avatar,N=void 0===I?v:I,T=t.displayImage,x=t.displayTitle,g=t.displayMessage,w=t.displayTime,j=t.unread,D=t.active,b=t.activeConversationID,
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import t,{useRef as i,useState as r,useEffect as a}from"react";import{useTranslation as c}from"react-i18next";import{TUIConversationService as s}from"@tencentcloud/chat-uikit-engine";import{isPC as l}from"../../utils/env.js";import{Avatar as v}from"../Avatar/Avatar.js";import{Icon as m}from"../Icon/Icon.js";import{IconTypes as u}from"../Icon/type.js";import{Plugins as d}from"../Plugins/index.js";import{useConversation as p}from"../../hooks/useConversation.js";import{useTUIKitContext as h}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function f(t){var f,C=t.conversation,I=t.Avatar,N=void 0===I?v:I,T=t.displayImage,x=t.displayTitle,g=t.displayMessage,w=t.displayTime,j=t.unread,D=t.active,b=t.activeConversationID,M=t.setActiveConversationID,P=t.setActiveConversation,k=c().t,y=i(null),U=h("ConversationPreviewContent"),A=U.chat,E=U.conversation,z=p(A),K=z.pinConversation,L=z.deleteConversation,O=D?"conversation-preview-content--active":"",R=j&&j>=1?"conversation-preview-content--unread":"",S=C.isPinned?"conversation-preview-content--pin":"",q=r(!1),B=q[0],F=q[1],G=i(null);a((function(){b!==C.conversationID&&F(!1)}),[b]);var H=function(e){if(!l){var n=C.conversationID;switch(M&&M(n),e){case"touchstart":f=setTimeout(o,500);break;case"touchend":clearTimeout(f),setTimeout((function(){}),200)}}function o(){clearTimeout(f),F(!0)}},J=function(e,n){var o,t=C.conversationID,i=C.isPinned;switch(e.stopPropagation(),F(!1),(null===(o=null==G?void 0:G.current)||void 0===o?void 0:o.closeMore)&&G.current.closeMore(),n){case"pin":K({conversationID:t,isPinned:!i});break;case"delete":L(t),P&&t===(null==E?void 0:E.conversationID)&&P(void 0)}};return n("button",e({type:"button","aria-selected":D,role:"option",className:"conversation-preview-container ".concat(O," ").concat(R," ").concat(S),onClick:function(){s.switchConversation(null==C?void 0:C.conversationID),P&&P(C),(null==y?void 0:y.current)&&y.current.blur()},onMouseEnter:function(){F(!0)},onMouseLeave:function(){F(!1)},onTouchStart:function(){return H("touchstart")},onTouchEnd:function(){return H("touchend")},ref:y},{children:[o("div",e({className:"avatar"},{children:o(N,{image:T,name:x,size:40})})),n("div",e({className:"content"},{children:[o("div",e({className:"title text-ellipsis"},{children:x})),o("div",e({className:"message"},{children:g}))]})),n("div",e({className:"external"},{children:[o("div",j?e({className:"unread"},{children:j<=99?j:"99+"}):{className:"unread"}),o("div",B?e({className:"".concat(B?"more--hover":"more")},{children:o(d,{customClass:"more-handle-box",ref:G,plugins:[o("div",e({role:"presentation",className:"more-handle-item",onClick:function(e){J(e,"pin")}},{children:k(C.isPinned?"TUIConversation.Unpin":"TUIConversation.Pin")})),o("div",e({className:"more-handle-item delete",onClick:function(e){J(e,"delete")},role:"presentation"},{children:k("TUIConversation.Delete")}))],showNumber:0,MoreIcon:o(m,{className:"icon-more",width:16,height:16,type:u.MORE})})}):e({className:"time"},{children:w}))]}))]}))}var C=t.memo(f);export{C as ConversationPreviewContent,f as unMemoConversationPreviewContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as r,jsx as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as r,jsx as o,Fragment as a}from"react/jsx-runtime";import t from"@tencentcloud/chat";import"react";import"../Icon/config.js";import"../Icon/type.js";import{defaultGroupAvatarWork as i,defaultUserAvatar as n}from"../Avatar/default.js";import{formatEmojiString as s}from"../TUIMessage/utils/emojiMap.js";import{getTimeStamp as c}from"../untils.js";var l=function(e){if(!e)return null;var r={},o=e.type,a=e.groupProfile,i=e.userProfile;switch(o){case t.TYPES.CONV_C2C:r=i;break;case t.TYPES.CONV_GROUP:r=a;case t.TYPES.CONV_SYSTEM:}return r},p=function(i,n,s){void 0===s&&(s="#147AFF");var c=l(i),p=c.name,u=c.nick,d=c.groupID,m=c.userID,f=i.type,C=i.remark,v="";switch(f){case t.TYPES.CONV_C2C:v=C||u||m;break;case t.TYPES.CONV_GROUP:v=p||d;break;default:v=""}var O,P,S,h;return n?(P=(O=v).toLocaleLowerCase(),S=n&&P.indexOf(n.toLocaleLowerCase()),h=O.split(new RegExp("(".concat(n,")"),"gi")),""===S?o(a,{}):r("div",{children:[n&&h.map((function(r,a){return r.toLowerCase()===n.toLowerCase()?o("span",e({style:{color:s}},{children:r}),a):o("span",{children:r},a)})),";"]})):v},u=function(e){var r=e.type,o=l(e).avatar,a=o;if(!o)switch(r){case t.TYPES.CONV_C2C:a=n;break;case t.TYPES.CONV_GROUP:default:a=i}return a},d=function(a,i,n){var c,l=a.lastMessage,p=a.type,u=l.fromAccount,d=l.nick,m=l.nameCard,f=l.isRevoked,C=l.messageForShow;l.type===t.TYPES.MSG_CUSTOM&&(null===(c=l.payload)||void 0===c?void 0:c.description)&&(C=l.payload.description);var v="";switch(p){case t.TYPES.CONV_GROUP:v=(null==l?void 0:l.fromAccount)===(null==i?void 0:i.userID)?"You":"".concat(m||d||u||""),v="".concat(v?"".concat(v,":"):"");break;case t.TYPES.CONV_C2C:v=f?"you ":""}return r("div",e({style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{children:[o("span",{children:v}),o("span",{children:l.isRevoked?"recalled a message":s(C,1)})]}))},m=function(e,r){var o=e.lastMessage;return c(1e3*o.lastTime,r)};export{u as getDisplayImage,d as getDisplayMessage,m as getDisplayTime,p as getDisplayTitle,l as getMessageProfile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as o,jsx as
|
|
1
|
+
import{__assign as t}from"tslib";import{jsxs as o,jsx as r}from"react/jsx-runtime";import{useRef as n,useState as e,useLayoutEffect as i}from"react";import{Icon as c}from"../Icon/Icon.js";import{IconTypes as a}from"../Icon/type.js";function l(l){var m=l.value,u=l.confirm,f=l.className,p=n(),s=e(m),v=s[0],d=s[1];i((function(){var t;null===(t=null==p?void 0:p.current)||void 0===t||t.focus({preventScroll:!0}),d(v)}),[p,m]);return o("div",t({className:"edit ".concat(f)},{children:[r("input",{ref:p,type:"text",value:v,onChange:function(t){d(t.target.value)}}),r(c,{className:"icon",width:15,height:10.5,type:a.CONFIRM,onClick:function(){u&&u(v)}})]}))}export{l as WithText};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import e,{useState as
|
|
1
|
+
import{__assign as n}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import e,{useState as r,useRef as u,useImperativeHandle as i}from"react";import{Icon as c}from"../Icon/Icon.js";import{IconTypes as l}from"../Icon/type.js";var a=e.forwardRef((function(e,a){var d=e.className,v=void 0===d?"":d,f=e.customClassName,s=void 0===f?"":f,p=e.placeholder,m=e.clearable,b=void 0!==m&&m,h=e.prefix,x=e.suffix,g=e.onChange,k=e.onBlur,N=e.onFocus,y=e.onKeyDown,C=e.value,j=void 0===C?"":C,w=e.border,D=void 0===w?"":w,E=e.disabled,I=void 0!==E&&E,L=e.maxLength,B=void 0===L?void 0:L,F=r(!1),K=F[0],O=F[1],R=["Enter","NumpadEnter"],A=r(j),S=A[0],T=A[1],q=u(null),z=function(){q.current&&q.current.focus({preventScroll:!0})};return i(a,(function(){return{focus:z,blur:function(){var n;null===(n=q.current)||void 0===n||n.blur()},input:q.current}})),t("div",n({className:"".concat(v," tui-kit-input-container")},{children:o("div",n({className:"tui-kit-input-box ".concat(D&&"tui-kit-input-border--".concat(D)," ").concat(K?"tui-kit-input-box--focus":"tui-kit-input-box--blur")},{children:[h,t("input",{maxLength:B,disabled:I,className:"tui-kit-input ".concat(s),placeholder:p,ref:q,value:S,onFocus:function(n){O(!0),null==N||N(n)},onBlur:function(n){O(!1),null==k||k(n)},onChange:function(n){T(n.target.value),q.current&&(null==g||g(n))},onKeyDown:function(n){R.indexOf(null==n?void 0:n.key)>-1&&y&&(null==n||n.preventDefault(),y(n))}}),x,b&&S&&t(c,{type:l.CLEAR,height:13,width:13,onClick:function(n){!function(n){var t;T(""),z();var o=null===(t=null==q?void 0:q.current)||void 0===t?void 0:t.cloneNode(!0),e=Object.create(n,{target:{value:o},currentTarget:{value:o}});o.value="",null==g||g(e)}(n)}})]}))}))}));export{a as Input};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import{jsxs as o,jsx as e}from"react/jsx-runtime";import{forwardRef as i,useImperativeHandle as l,useRef as t,useState as r}from"react";import{Icon as c}from"../Icon/Icon.js";import{IconTypes as u}from"../Icon/type.js";import{Popup as s}from"../Popup/index.js";import{usePluginsElement as d}from"./hooks/usePluginsElement.js";function a(i,a){var m=i.plugins,v=void 0===m?[]:m,p=i.showNumber,h=i.MoreIcon,f=i.className,g=void 0===f?"":f,N=i.style,b=i.customClass,w=void 0===b?"":b,x=i.root,y=i.handleVisible;l(a,(function(){return{closeMore:function(n){B(!1)}}}));var P=d({plugins:v,showNumber:p}),j=P.showPicker,I=P.elements,C=t(null),k=r(!1),E=k[0],B=k[1],D=function
|
|
1
|
+
import{__assign as n}from"tslib";import{jsxs as o,jsx as e}from"react/jsx-runtime";import{forwardRef as i,useImperativeHandle as l,useRef as t,useState as r}from"react";import{Icon as c}from"../Icon/Icon.js";import{IconTypes as u}from"../Icon/type.js";import{Popup as s}from"../Popup/index.js";import{usePluginsElement as d}from"./hooks/usePluginsElement.js";function a(i,a){var m=i.plugins,v=void 0===m?[]:m,p=i.showNumber,h=i.MoreIcon,f=i.className,g=void 0===f?"":f,N=i.style,b=i.customClass,w=void 0===b?"":b,x=i.root,y=i.handleVisible;l(a,(function(){return{closeMore:function(n){B(!1)}}}));var P=d({plugins:v,showNumber:p}),j=P.showPicker,I=P.elements,C=t(null),k=r(!1),E=k[0],B=k[1],D=function(n){var o,e;n.stopPropagation(),B(!E),E||null===(e=null===(o=null==C?void 0:C.current)||void 0===o?void 0:o.offsetParent)||void 0===e||e.removeEventListener("scroll",D)};return(j&&j.length>0||I&&(null==I?void 0:I.length)>0)&&o("ul",n({className:"plugin ".concat(g)},{children:[j&&(null==j?void 0:j.length)>0&&j.map((function(o,i){var l="".concat(o).concat(i);return e("li",n({className:"plugin-item"},{children:o}),l)})),I&&(null==I?void 0:I.length)>0&&o("div",n({className:"plugin-popup",ref:C},{children:[o("div",n({role:"menuitem",tabIndex:0,className:"more",onClick:D},{children:[!h&&e(c,{width:20,height:20,type:u.ADD}),h&&h]})),e(s,n({className:"plugin-popup-box ".concat(w),style:N,show:E,close:D,root:x,handleVisible:function(o){var e,i,l,t;if(y){var r=(null===(e=null==C?void 0:C.current)||void 0===e?void 0:e.children[1].getBoundingClientRect())||{},c=r.width,u=r.height,s=(null===(i=null==C?void 0:C.current)||void 0===i?void 0:i.getBoundingClientRect())||{},d=s.x,a=void 0===d?0:d,m=s.y,v=void 0===m?0:m;null===(t=null===(l=C.current)||void 0===l?void 0:l.offsetParent)||void 0===t||t.addEventListener("scroll",D),y(n(n({},o),{width:c,height:u,x:a,y:v}))}}},{children:e("ul",{children:I.map((function(o,i){var l="".concat(o).concat(i);return e("li",n({className:"plugin-item"},{children:o}),l)}))})}))]}))]}))}var m=i(a);export{m as Plugins};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e,jsxs as o,Fragment as a}from"react/jsx-runtime";import{useState as n,useEffect as r}from"react";import{TUIStore as i,StoreName as c,TUIConversationService as s}from"@tencentcloud/chat-uikit-engine";import{TUILogin as l}from"@tencentcloud/tui-core";import{useTranslation as m}from"react-i18next";import{isPC as u,isH5 as C}from"../../utils/env.js";import{useTUIKit as h}from"./hooks/useTUIKit.js";import{useCreateTUIKitContext as d}from"./hooks/useCreateTUIKitContext.js";import{TUIKitProvider as v}from"../../context/TUIKitContext.js";import{TUIConversation as f}from"../TUIConversation/TUIConversation.js";import{TUIChat as T}from"../TUIChat/TUIChat.js";import{TUIManage as p}from"../TUIManage/TUIManage.js";import{TUIProfile as I}from"../TUIProfile/TUIProfile.js";import"../TUIProfile/TUIProfileDefault.js";import"@tencentcloud/chat";import"../../context/TUIMessageContext.js";import"../Icon/config.js";import"../Icon/type.js";import{TUIContactInfo as g}from"../TUIContact/TUIContactInfo/TUIContactInfo.js";import{TUIContact as U}from"../TUIContact/TUIContact.js";import{TUIKIT_TABBAR as S}from"../../constants.js";import"../../locales/index.js";import j from"../Icon/images/chats.svg.js";import A from"../Icon/images/chats-selected.svg.js";import N from"../Icon/images/contacts.svg.js";import w from"../Icon/images/contacts-selected.svg.js";var b=[{id:1,name:S.CHATS,icon:j,selectedIcon:A,value:S.CHATS},{id:2,name:S.CONTACTS,icon:N,selectedIcon:w,value:S.CONTACTS}],x={className:"sample-h5-input",isTransmitter:!0};function M(n){var r=n.moduleValue,i=n.tabbarRender,c=n.setModuleValue;return o(a,{children:[o("div",t({className:"sample-chat-left-container"},{children:[e(I,{className:"sample-chat-profile"}),i,r===S.CHATS&&e(f,{}),r===S.CONTACTS&&e(U,{})]})),r===S.CHATS&&o(a,{children:[e(T,{}),e(p,{})]}),r===S.CONTACTS&&e(U,{children:e(g,{showChats:function(){c(S.CHATS)}})})]})}function P(n){var r=n.moduleValue,i=n.contactData,c=n.tabbarRender,s=n.currentConversationID,l=n.setModuleValue;return o("div",t({className:"sample-chat-h5"},{children:[!s&&!i&&o("div",t({className:"sample-chat-h5-container"},{children:[e(I,{className:"sample-profile"}),c,r===S.CHATS&&e(f,{}),r===S.CONTACTS&&e(U,{})]})),r===S.CHATS&&s&&o(a,{children:[e(T,{TUIMessageInputConfig:x}),e(p,{})]}),r===S.CONTACTS&&i&&e(U,{children:e(g,{showChats:function(){l(S.CHATS)}})})]}))}function V(a){var f=n("chats"),T=f[0],p=f[1],I=m().t,g=a.children,U=a.chat,S=void 0===U?l.getContext().chat:U,j=a.customClasses,A=a.activeConversation,N=a.language,w=void 0===N?"en":N;window.tencent_cloud_im_csig_react_uikit_23F_xa=!0;var x=h({chat:S,activeConversation:A,language:w}),V=x.conversation,D=x.contactData,H=x.setActiveConversation,O=x.myProfile,_=x.TUIManageShow,k=x.setTUIManageShow,R=x.TUIProfileShow,y=x.setTUIProfileShow,K=x.setActiveContact,F=d({chat:S,language:w,conversation:V,contactData:D,setActiveConversation:H,customClasses:j,myProfile:O,TUIManageShow:_,setTUIManageShow:k,TUIProfileShow:R,setTUIProfileShow:y,setActiveContact:K});r((function(){return i.watch(c.CONV,{currentConversation:q}),function(){i.unwatch(c.CONV,{currentConversation:q})}}),[]);var q=function(t){H(null==t?void 0:t.getConversation())},z=e("div",t({className:"sample-chat-tab"},{children:b.map((function(a){return o("div",t({className:"sample-chat-tab-container",role:"presentation",onClick:function(){var t;t=a.value,p(t),s.switchConversation("")}},{children:[e("img",{src:T===a.value?a.selectedIcon:a.icon,alt:""}),e("p",t({className:"sample-chat-tab-text ".concat(T===a.value?"sample-chat-tab-active":"")},{children:I(a.name)}))]}),a.id)}))}));return e(v,t({value:F},{children:e("div",t({className:"tui-kit"},{children:g||u&&e(M,{moduleValue:T,tabbarRender:z,setModuleValue:p})||C&&e(P,{contactData:D,moduleValue:T,tabbarRender:z,currentConversationID:(null==V?void 0:V.conversationID)||"",setModuleValue:p})}))}))}export{V as TUIKit};
|
|
1
|
+
import{__assign as t}from"tslib";import{jsx as e,jsxs as o,Fragment as a}from"react/jsx-runtime";import{useState as n,useEffect as r}from"react";import{TUIStore as i,StoreName as c,TUIConversationService as s}from"@tencentcloud/chat-uikit-engine";import{TUILogin as l}from"@tencentcloud/tui-core";import{useTranslation as m}from"react-i18next";import{isPC as u,isH5 as C}from"../../utils/env.js";import{useTUIKit as h}from"./hooks/useTUIKit.js";import{useCreateTUIKitContext as d}from"./hooks/useCreateTUIKitContext.js";import{TUIKitProvider as v}from"../../context/TUIKitContext.js";import{TUIConversation as f}from"../TUIConversation/TUIConversation.js";import{TUIChat as T}from"../TUIChat/TUIChat.js";import{TUIManage as p}from"../TUIManage/TUIManage.js";import{TUIProfile as I}from"../TUIProfile/TUIProfile.js";import"../TUIProfile/TUIProfileDefault.js";import"@tencentcloud/chat";import"../../context/TUIMessageContext.js";import"../Icon/config.js";import"../Icon/type.js";import{TUIContactInfo as g}from"../TUIContact/TUIContactInfo/TUIContactInfo.js";import{TUIContact as U}from"../TUIContact/TUIContact.js";import{TUIKIT_TABBAR as S}from"../../constants.js";import"../../locales/index.js";import j from"../Icon/images/chats.svg.js";import A from"../Icon/images/chats-selected.svg.js";import N from"../Icon/images/contacts.svg.js";import w from"../Icon/images/contacts-selected.svg.js";var b=[{id:1,name:S.CHATS,icon:j,selectedIcon:A,value:S.CHATS},{id:2,name:S.CONTACTS,icon:N,selectedIcon:w,value:S.CONTACTS}],x={className:"sample-h5-input",isTransmitter:!0};function M(n){var r=n.moduleValue,i=n.tabbarRender,c=n.setModuleValue;return o(a,{children:[o("div",t({className:"sample-chat-left-container"},{children:[e(I,{className:"sample-chat-profile"}),i,r===S.CHATS&&e(f,{}),r===S.CONTACTS&&e(U,{})]})),r===S.CHATS&&o(a,{children:[e(T,{}),e(p,{})]}),r===S.CONTACTS&&e(U,{children:e(g,{showChats:function(){c(S.CHATS)}})})]})}function P(n){var r=n.moduleValue,i=n.contactData,c=n.tabbarRender,s=n.currentConversationID,l=n.setModuleValue;return o("div",t({className:"sample-chat-h5"},{children:[!s&&!i&&o("div",t({className:"sample-chat-h5-container"},{children:[e(I,{className:"sample-profile"}),c,r===S.CHATS&&e(f,{}),r===S.CONTACTS&&e(U,{})]})),r===S.CHATS&&s&&o(a,{children:[e(T,{TUIMessageInputConfig:x}),e(p,{})]}),r===S.CONTACTS&&i&&e(U,{children:e(g,{showChats:function(){l(S.CHATS)}})})]}))}function V(a){var f=n("chats"),T=f[0],p=f[1],I=m().t,g=a.children,U=a.chat,S=void 0===U?l.getContext().chat:U,j=a.customClasses,A=a.activeConversation,N=a.language,w=void 0===N?"en-US":N;window.tencent_cloud_im_csig_react_uikit_23F_xa=!0;var x=h({chat:S,activeConversation:A,language:w}),V=x.conversation,D=x.contactData,H=x.setActiveConversation,O=x.myProfile,_=x.TUIManageShow,k=x.setTUIManageShow,R=x.TUIProfileShow,y=x.setTUIProfileShow,K=x.setActiveContact,F=d({chat:S,language:w,conversation:V,contactData:D,setActiveConversation:H,customClasses:j,myProfile:O,TUIManageShow:_,setTUIManageShow:k,TUIProfileShow:R,setTUIProfileShow:y,setActiveContact:K});r((function(){return i.watch(c.CONV,{currentConversation:q}),function(){i.unwatch(c.CONV,{currentConversation:q})}}),[]);var q=function(t){H(null==t?void 0:t.getConversation())},z=e("div",t({className:"sample-chat-tab"},{children:b.map((function(a){return o("div",t({className:"sample-chat-tab-container",role:"presentation",onClick:function(){var t;t=a.value,p(t),s.switchConversation("")}},{children:[e("img",{src:T===a.value?a.selectedIcon:a.icon,alt:""}),e("p",t({className:"sample-chat-tab-text ".concat(T===a.value?"sample-chat-tab-active":"")},{children:I(a.name)}))]}),a.id)}))}));return e(v,t({value:F},{children:e("div",t({className:"tui-kit"},{children:g||u&&e(M,{moduleValue:T,tabbarRender:z,setModuleValue:p})||C&&e(P,{contactData:D,moduleValue:T,tabbarRender:z,currentConversationID:(null==V?void 0:V.conversationID)||"",setModuleValue:p})}))}))}export{V as TUIKit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="https://web.sdk.qcloud.com/im/assets/emoji/",i={"[NO]":"emoji_0@2x.png","[OK]":"emoji_1@2x.png","[下雨]":"emoji_2@2x.png","[么么哒]":"emoji_3@2x.png","[乒乓]":"emoji_4@2x.png","[便便]":"emoji_5@2x.png","[信封]":"emoji_6@2x.png","[偷笑]":"emoji_7@2x.png","[傲慢]":"emoji_8@2x.png","[再见]":"emoji_9@2x.png","[冷汗]":"emoji_10@2x.png","[凋谢]":"emoji_11@2x.png","[刀]":"emoji_12@2x.png","[删除]":"emoji_13@2x.png","[勾引]":"emoji_14@2x.png","[发呆]":"emoji_15@2x.png","[发抖]":"emoji_16@2x.png","[可怜]":"emoji_17@2x.png","[可爱]":"emoji_18@2x.png","[右哼哼]":"emoji_19@2x.png","[右太极]":"emoji_20@2x.png","[右车头]":"emoji_21@2x.png","[吐]":"emoji_22@2x.png","[吓]":"emoji_23@2x.png","[咒骂]":"emoji_24@2x.png","[咖啡]":"emoji_25@2x.png","[啤酒]":"emoji_26@2x.png","[嘘]":"emoji_27@2x.png","[回头]":"emoji_28@2x.png","[困]":"emoji_29@2x.png","[坏笑]":"emoji_30@2x.png","[多云]":"emoji_31@2x.png","[大兵]":"emoji_32@2x.png","[大哭]":"emoji_33@2x.png","[太阳]":"emoji_34@2x.png","[奋斗]":"emoji_35@2x.png","[奶瓶]":"emoji_36@2x.png","[委屈]":"emoji_37@2x.png","[害羞]":"emoji_38@2x.png","[尴尬]":"emoji_39@2x.png","[左哼哼]":"emoji_40@2x.png","[左太极]":"emoji_41@2x.png","[左车头]":"emoji_42@2x.png","[差劲]":"emoji_43@2x.png","[弱]":"emoji_44@2x.png","[强]":"emoji_45@2x.png","[彩带]":"emoji_46@2x.png","[彩球]":"emoji_47@2x.png","[得意]":"emoji_48@2x.png","[微笑]":"emoji_49@2x.png","[心碎了]":"emoji_50@2x.png","[快哭了]":"emoji_51@2x.png","[怄火]":"emoji_52@2x.png","[怒]":"emoji_53@2x.png","[惊恐]":"emoji_54@2x.png","[惊讶]":"emoji_55@2x.png","[憨笑]":"emoji_56@2x.png","[手枪]":"emoji_57@2x.png","[打哈欠]":"emoji_58@2x.png","[抓狂]":"emoji_59@2x.png","[折磨]":"emoji_60@2x.png","[抠鼻]":"emoji_61@2x.png","[抱抱]":"emoji_62@2x.png","[抱拳]":"emoji_63@2x.png","[拳头]":"emoji_64@2x.png","[挥手]":"emoji_65@2x.png","[握手]":"emoji_66@2x.png","[撇嘴]":"emoji_67@2x.png","[擦汗]":"emoji_68@2x.png","[敲打]":"emoji_69@2x.png","[晕]":"emoji_70@2x.png","[月亮]":"emoji_71@2x.png","[棒棒糖]":"emoji_72@2x.png","[汽车]":"emoji_73@2x.png","[沙发]":"emoji_74@2x.png","[流汗]":"emoji_75@2x.png","[流泪]":"emoji_76@2x.png","[激动]":"emoji_77@2x.png","[灯泡]":"emoji_78@2x.png","[炸弹]":"emoji_79@2x.png","[熊猫]":"emoji_80@2x.png","[爆筋]":"emoji_81@2x.png","[爱你]":"emoji_82@2x.png","[爱心]":"emoji_83@2x.png","[爱情]":"emoji_84@2x.png","[猪头]":"emoji_85@2x.png","[猫咪]":"emoji_86@2x.png","[献吻]":"emoji_87@2x.png","[玫瑰]":"emoji_88@2x.png","[瓢虫]":"emoji_89@2x.png","[疑问]":"emoji_90@2x.png","[白眼]":"emoji_91@2x.png","[皮球]":"emoji_92@2x.png","[睡觉]":"emoji_93@2x.png","[磕头]":"emoji_94@2x.png","[示爱]":"emoji_95@2x.png","[礼品袋]":"emoji_96@2x.png","[礼物]":"emoji_97@2x.png","[篮球]":"emoji_98@2x.png","[米饭]":"emoji_99@2x.png","[糗大了]":"emoji_100@2x.png","[红双喜]":"emoji_101@2x.png","[红灯笼]":"emoji_102@2x.png","[纸巾]":"emoji_103@2x.png","[胜利]":"emoji_104@2x.png","[色]":"emoji_105@2x.png","[药]":"emoji_106@2x.png","[菜刀]":"emoji_107@2x.png","[蛋糕]":"emoji_108@2x.png","[蜡烛]":"emoji_109@2x.png","[街舞]":"emoji_110@2x.png","[衰]":"emoji_111@2x.png","[西瓜]":"emoji_112@2x.png","[调皮]":"emoji_113@2x.png","[象棋]":"emoji_114@2x.png","[跳绳]":"emoji_115@2x.png","[跳跳]":"emoji_116@2x.png","[车厢]":"emoji_117@2x.png","[转圈]":"emoji_118@2x.png","[鄙视]":"emoji_119@2x.png","[酷]":"emoji_120@2x.png","[钞票]":"emoji_121@2x.png","[钻戒]":"emoji_122@2x.png","[闪电]":"emoji_123@2x.png","[闭嘴]":"emoji_124@2x.png","[闹钟]":"emoji_125@2x.png","[阴险]":"emoji_126@2x.png","[难过]":"emoji_127@2x.png","[雨伞]":"emoji_128@2x.png","[青蛙]":"emoji_129@2x.png","[面条]":"emoji_130@2x.png","[鞭炮]":"emoji_131@2x.png","[风车]":"emoji_132@2x.png","[飞吻]":"emoji_133@2x.png","[飞机]":"emoji_134@2x.png","[饥饿]":"emoji_135@2x.png","[香蕉]":"emoji_136@2x.png","[骷髅]":"emoji_137@2x.png","[麦克风]":"emoji_138@2x.png","[麻将]":"emoji_139@2x.png","[鼓掌]":"emoji_140@2x.png","[龇牙]":"emoji_141@2x.png"},o={"[NO]":"[no]","[OK]":"[ok]","[下雨]":"[rain]","[么么哒]":"[muah]","[乒乓]":"[ping pong]","[便便]":"[poo]","[信封]":"[mail]","[偷笑]":"[snicker]","[傲慢]":"[arrogant]","[再见]":"[bye]","[冷汗]":"[sweat]","[凋谢]":"[wither]","[刀]":"[knife]","[删除]":"[delete]","[勾引]":"[hook]","[发呆]":"[daze]","[发抖]":"[shaking]","[可怜]":"[pitiful]","[可爱]":"[cute]","[右哼哼]":"[right hum]","[右太极]":"[right Tai Chi]","[右车头]":"[right head]","[吐]":"[vomit]","[吓]":"[scare]","[咒骂]":"[curse]","[咖啡]":"[cafe]","[啤酒]":"[beer]","[嘘]":"[hiss]","[回头]":"[look back]","[困]":"[sleepy]","[坏笑]":"[bad laugh]","[多云]":"[cloud]","[大兵]":"[soldiers]","[大哭]":"[cry]","[太阳]":"[sun]","[奋斗]":"[struggle]","[奶瓶]":"[feeding bottle]","[委屈]":"[wronged]","[害羞]":"[shy]","[尴尬]":"[awkward]","[左哼哼]":"[left hem]","[左太极]":"[left Tai Chi]","[左车头]":"[left head]","[差劲]":"[poor]","[弱]":"[weak]","[强]":"[stong]","[彩带]":"[ribbon]","[彩球]":"[ball]","[得意]":"[proud]","[微笑]":"[smile]","[心碎了]":"[heartbroken]","[快哭了]":"[almost cry]","[怄火]":"[ire]","[怒]":"[anger]","[惊恐]":"[terrify]","[惊讶]":"[flummox]","[憨笑]":"[smirk]","[手枪]":"[gun]","[打哈欠]":"[yawn]","[抓狂]":"[crazy]","[折磨]":"[torment]","[抠鼻]":"[nose picking]","[抱抱]":"[hug]","[抱拳]":"[hug fist]","[拳头]":"[fist]","[挥手]":"[waving hands]","[握手]":"[shake hands]","[撇嘴]":"[pouted]","[擦汗]":"[wipe sweat]","[敲打]":"[knock on the head]","[晕]":"[faint]","[月亮]":"[moon]","[棒棒糖]":"[lollipop]","[汽车]":"[car]","[沙发]":"[sofa]","[流汗]":"[sweat]","[流泪]":"[tears]","[激动]":"[excitement]","[灯泡]":"[light]","[炸弹]":"[bomb]","[熊猫]":"[panda]","[爆筋]":"[exploding muscle]","[爱你]":"[love you]","[爱心]":"[love heart]","[爱情]":"[love]","[猪头]":"[pig]","[猫咪]":"[cat]","[献吻]":"[kiss]","[玫瑰]":"[rose]","[瓢虫]":"[ladybird]","[疑问]":"[what]","[白眼]":"[rolling eyes]","[皮球]":"[rubber ball]","[睡觉]":"[sleep]","[磕头]":"[kowtow]","[示爱]":"[show love]","[礼品袋]":"[gift bag]","[礼物]":"[gift]","[篮球]":"[basketball]","[米饭]":"[rice]","[糗大了]":"[shame]","[红双喜]":"[happiness]","[红灯笼]":"[lantern]","[纸巾]":"[tissue]","[胜利]":"[victory]","[色]":"[lecherous]","[药]":"[medicine]","[菜刀]":"[kitchen knife]","[蛋糕]":"[coke]","[蜡烛]":"[candle]","[街舞]":"[hip hop]","[衰]":"[decline]","[西瓜]":"[lemon]","[调皮]":"[naughty]","[象棋]":"[chess]","[跳绳]":"[jump rope]","[跳跳]":"[jump]","[车厢]":"[compartment]","[转圈]":"[turn in circles]","[鄙视]":"[contempt]","[酷]":"[cool]","[钞票]":"[money]","[钻戒]":"[diamond]","[闪电]":"[lightning]","[闭嘴]":"[shut up]","[闹钟]":"[clock]","[阴险]":"[sinister]","[难过]":"[sad]","[雨伞]":"[umbrella]","[青蛙]":"[frog]","[面条]":"[noodles]","[鞭炮]":"[firecracker]","[风车]":"[windmill]","[飞吻]":"[blow kisses]","[飞机]":"[air]","[饥饿]":"[hunger]","[香蕉]":"[banana]","[骷髅]":"[skull]","[麦克风]":"[mic]","[麻将]":"[mahjong]","[鼓掌]":"[handclap]","[龇牙]":"[happy]"},n=["[龇牙]","[调皮]","[流汗]","[偷笑]","[再见]","[敲打]","[擦汗]","[猪头]","[玫瑰]","[流泪]","[大哭]","[嘘]","[酷]","[抓狂]","[委屈]","[便便]","[炸弹]","[菜刀]","[可爱]","[色]","[害羞]","[得意]","[吐]","[微笑]","[怒]","[尴尬]","[惊恐]","[冷汗]","[爱心]","[示爱]","[白眼]","[傲慢]","[难过]","[惊讶]","[疑问]","[困]","[么么哒]","[憨笑]","[爱情]","[衰]","[撇嘴]","[阴险]","[奋斗]","[发呆]","[右哼哼]","[抱抱]","[坏笑]","[飞吻]","[鄙视]","[晕]","[大兵]","[可怜]","[强]","[弱]","[握手]","[胜利]","[抱拳]","[凋谢]","[米饭]","[蛋糕]","[西瓜]","[啤酒]","[瓢虫]","[勾引]","[OK]","[爱你]","[咖啡]","[月亮]","[刀]","[发抖]","[差劲]","[拳头]","[心碎了]","[太阳]","[礼物]","[皮球]","[骷髅]","[挥手]","[闪电]","[饥饿]","[咒骂]","[折磨]","[抠鼻]","[鼓掌]","[糗大了]","[左哼哼]","[打哈欠]","[快哭了]","[吓]","[篮球]","[乒乓]","[NO]","[跳跳]","[怄火]","[转圈]","[磕头]","[回头]","[跳绳]","[激动]","[街舞]","[献吻]","[左太极]","[右太极]","[闭嘴]","[猫咪]","[红双喜]","[鞭炮]","[红灯笼]","[麻将]","[麦克风]","[礼品袋]","[信封]","[象棋]","[彩带]","[蜡烛]","[爆筋]","[棒棒糖]","[奶瓶]","[面条]","[香蕉]","[飞机]","[左车头]","[车厢]","[右车头]","[多云]","[下雨]","[钞票]","[熊猫]","[灯泡]","[风车]","[闹钟]","[雨伞]","[彩球]","[钻戒]","[沙发]","[纸巾]","[手枪]","[青蛙]"];function m(e,i,n){void 0===i&&(i=0);var m=e,g=0===i?1:0,j=i;return Object.entries(o).map((function(e){return m.includes(e[g])&&(m=n&&"zh"===n?e[g]:p(m,e[g],e[j])),e})),m}function p(e,i,o){var n=e;return(n=n.replace(i,o)).includes(i)&&(n=p(n,i,o)),n}export{o as emojiEnKey,i as emojiMap,n as emojiName,e as emojiUrl,m as formatEmojiString};
|
|
1
|
+
var e="https://web.sdk.qcloud.com/im/assets/emoji/",i={"[NO]":"emoji_0@2x.png","[OK]":"emoji_1@2x.png","[下雨]":"emoji_2@2x.png","[么么哒]":"emoji_3@2x.png","[乒乓]":"emoji_4@2x.png","[便便]":"emoji_5@2x.png","[信封]":"emoji_6@2x.png","[偷笑]":"emoji_7@2x.png","[傲慢]":"emoji_8@2x.png","[再见]":"emoji_9@2x.png","[冷汗]":"emoji_10@2x.png","[凋谢]":"emoji_11@2x.png","[刀]":"emoji_12@2x.png","[删除]":"emoji_13@2x.png","[勾引]":"emoji_14@2x.png","[发呆]":"emoji_15@2x.png","[发抖]":"emoji_16@2x.png","[可怜]":"emoji_17@2x.png","[可爱]":"emoji_18@2x.png","[右哼哼]":"emoji_19@2x.png","[右太极]":"emoji_20@2x.png","[右车头]":"emoji_21@2x.png","[吐]":"emoji_22@2x.png","[吓]":"emoji_23@2x.png","[咒骂]":"emoji_24@2x.png","[咖啡]":"emoji_25@2x.png","[啤酒]":"emoji_26@2x.png","[嘘]":"emoji_27@2x.png","[回头]":"emoji_28@2x.png","[困]":"emoji_29@2x.png","[坏笑]":"emoji_30@2x.png","[多云]":"emoji_31@2x.png","[大兵]":"emoji_32@2x.png","[大哭]":"emoji_33@2x.png","[太阳]":"emoji_34@2x.png","[奋斗]":"emoji_35@2x.png","[奶瓶]":"emoji_36@2x.png","[委屈]":"emoji_37@2x.png","[害羞]":"emoji_38@2x.png","[尴尬]":"emoji_39@2x.png","[左哼哼]":"emoji_40@2x.png","[左太极]":"emoji_41@2x.png","[左车头]":"emoji_42@2x.png","[差劲]":"emoji_43@2x.png","[弱]":"emoji_44@2x.png","[强]":"emoji_45@2x.png","[彩带]":"emoji_46@2x.png","[彩球]":"emoji_47@2x.png","[得意]":"emoji_48@2x.png","[微笑]":"emoji_49@2x.png","[心碎了]":"emoji_50@2x.png","[快哭了]":"emoji_51@2x.png","[怄火]":"emoji_52@2x.png","[怒]":"emoji_53@2x.png","[惊恐]":"emoji_54@2x.png","[惊讶]":"emoji_55@2x.png","[憨笑]":"emoji_56@2x.png","[手枪]":"emoji_57@2x.png","[打哈欠]":"emoji_58@2x.png","[抓狂]":"emoji_59@2x.png","[折磨]":"emoji_60@2x.png","[抠鼻]":"emoji_61@2x.png","[抱抱]":"emoji_62@2x.png","[抱拳]":"emoji_63@2x.png","[拳头]":"emoji_64@2x.png","[挥手]":"emoji_65@2x.png","[握手]":"emoji_66@2x.png","[撇嘴]":"emoji_67@2x.png","[擦汗]":"emoji_68@2x.png","[敲打]":"emoji_69@2x.png","[晕]":"emoji_70@2x.png","[月亮]":"emoji_71@2x.png","[棒棒糖]":"emoji_72@2x.png","[汽车]":"emoji_73@2x.png","[沙发]":"emoji_74@2x.png","[流汗]":"emoji_75@2x.png","[流泪]":"emoji_76@2x.png","[激动]":"emoji_77@2x.png","[灯泡]":"emoji_78@2x.png","[炸弹]":"emoji_79@2x.png","[熊猫]":"emoji_80@2x.png","[爆筋]":"emoji_81@2x.png","[爱你]":"emoji_82@2x.png","[爱心]":"emoji_83@2x.png","[爱情]":"emoji_84@2x.png","[猪头]":"emoji_85@2x.png","[猫咪]":"emoji_86@2x.png","[献吻]":"emoji_87@2x.png","[玫瑰]":"emoji_88@2x.png","[瓢虫]":"emoji_89@2x.png","[疑问]":"emoji_90@2x.png","[白眼]":"emoji_91@2x.png","[皮球]":"emoji_92@2x.png","[睡觉]":"emoji_93@2x.png","[磕头]":"emoji_94@2x.png","[示爱]":"emoji_95@2x.png","[礼品袋]":"emoji_96@2x.png","[礼物]":"emoji_97@2x.png","[篮球]":"emoji_98@2x.png","[米饭]":"emoji_99@2x.png","[糗大了]":"emoji_100@2x.png","[红双喜]":"emoji_101@2x.png","[红灯笼]":"emoji_102@2x.png","[纸巾]":"emoji_103@2x.png","[胜利]":"emoji_104@2x.png","[色]":"emoji_105@2x.png","[药]":"emoji_106@2x.png","[菜刀]":"emoji_107@2x.png","[蛋糕]":"emoji_108@2x.png","[蜡烛]":"emoji_109@2x.png","[街舞]":"emoji_110@2x.png","[衰]":"emoji_111@2x.png","[西瓜]":"emoji_112@2x.png","[调皮]":"emoji_113@2x.png","[象棋]":"emoji_114@2x.png","[跳绳]":"emoji_115@2x.png","[跳跳]":"emoji_116@2x.png","[车厢]":"emoji_117@2x.png","[转圈]":"emoji_118@2x.png","[鄙视]":"emoji_119@2x.png","[酷]":"emoji_120@2x.png","[钞票]":"emoji_121@2x.png","[钻戒]":"emoji_122@2x.png","[闪电]":"emoji_123@2x.png","[闭嘴]":"emoji_124@2x.png","[闹钟]":"emoji_125@2x.png","[阴险]":"emoji_126@2x.png","[难过]":"emoji_127@2x.png","[雨伞]":"emoji_128@2x.png","[青蛙]":"emoji_129@2x.png","[面条]":"emoji_130@2x.png","[鞭炮]":"emoji_131@2x.png","[风车]":"emoji_132@2x.png","[飞吻]":"emoji_133@2x.png","[飞机]":"emoji_134@2x.png","[饥饿]":"emoji_135@2x.png","[香蕉]":"emoji_136@2x.png","[骷髅]":"emoji_137@2x.png","[麦克风]":"emoji_138@2x.png","[麻将]":"emoji_139@2x.png","[鼓掌]":"emoji_140@2x.png","[龇牙]":"emoji_141@2x.png"},o={"[NO]":"[no]","[OK]":"[ok]","[下雨]":"[rain]","[么么哒]":"[muah]","[乒乓]":"[ping pong]","[便便]":"[poo]","[信封]":"[mail]","[偷笑]":"[snicker]","[傲慢]":"[arrogant]","[再见]":"[bye]","[冷汗]":"[sweat]","[凋谢]":"[wither]","[刀]":"[knife]","[删除]":"[delete]","[勾引]":"[hook]","[发呆]":"[daze]","[发抖]":"[shaking]","[可怜]":"[pitiful]","[可爱]":"[cute]","[右哼哼]":"[right hum]","[右太极]":"[right Tai Chi]","[右车头]":"[right head]","[吐]":"[vomit]","[吓]":"[scare]","[咒骂]":"[curse]","[咖啡]":"[cafe]","[啤酒]":"[beer]","[嘘]":"[hiss]","[回头]":"[look back]","[困]":"[sleepy]","[坏笑]":"[bad laugh]","[多云]":"[cloud]","[大兵]":"[soldiers]","[大哭]":"[cry]","[太阳]":"[sun]","[奋斗]":"[struggle]","[奶瓶]":"[feeding bottle]","[委屈]":"[wronged]","[害羞]":"[shy]","[尴尬]":"[awkward]","[左哼哼]":"[left hem]","[左太极]":"[left Tai Chi]","[左车头]":"[left head]","[差劲]":"[poor]","[弱]":"[weak]","[强]":"[stong]","[彩带]":"[ribbon]","[彩球]":"[ball]","[得意]":"[proud]","[微笑]":"[smile]","[心碎了]":"[heartbroken]","[快哭了]":"[almost cry]","[怄火]":"[ire]","[怒]":"[anger]","[惊恐]":"[terrify]","[惊讶]":"[flummox]","[憨笑]":"[smirk]","[手枪]":"[gun]","[打哈欠]":"[yawn]","[抓狂]":"[crazy]","[折磨]":"[torment]","[抠鼻]":"[nose picking]","[抱抱]":"[hug]","[抱拳]":"[hug fist]","[拳头]":"[fist]","[挥手]":"[waving hands]","[握手]":"[shake hands]","[撇嘴]":"[pouted]","[擦汗]":"[wipe sweat]","[敲打]":"[knock on the head]","[晕]":"[faint]","[月亮]":"[moon]","[棒棒糖]":"[lollipop]","[汽车]":"[car]","[沙发]":"[sofa]","[流汗]":"[sweat]","[流泪]":"[tears]","[激动]":"[excitement]","[灯泡]":"[light]","[炸弹]":"[bomb]","[熊猫]":"[panda]","[爆筋]":"[exploding muscle]","[爱你]":"[love you]","[爱心]":"[love heart]","[爱情]":"[love]","[猪头]":"[pig]","[猫咪]":"[cat]","[献吻]":"[kiss]","[玫瑰]":"[rose]","[瓢虫]":"[ladybird]","[疑问]":"[what]","[白眼]":"[rolling eyes]","[皮球]":"[rubber ball]","[睡觉]":"[sleep]","[磕头]":"[kowtow]","[示爱]":"[show love]","[礼品袋]":"[gift bag]","[礼物]":"[gift]","[篮球]":"[basketball]","[米饭]":"[rice]","[糗大了]":"[shame]","[红双喜]":"[happiness]","[红灯笼]":"[lantern]","[纸巾]":"[tissue]","[胜利]":"[victory]","[色]":"[lecherous]","[药]":"[medicine]","[菜刀]":"[kitchen knife]","[蛋糕]":"[coke]","[蜡烛]":"[candle]","[街舞]":"[hip hop]","[衰]":"[decline]","[西瓜]":"[lemon]","[调皮]":"[naughty]","[象棋]":"[chess]","[跳绳]":"[jump rope]","[跳跳]":"[jump]","[车厢]":"[compartment]","[转圈]":"[turn in circles]","[鄙视]":"[contempt]","[酷]":"[cool]","[钞票]":"[money]","[钻戒]":"[diamond]","[闪电]":"[lightning]","[闭嘴]":"[shut up]","[闹钟]":"[clock]","[阴险]":"[sinister]","[难过]":"[sad]","[雨伞]":"[umbrella]","[青蛙]":"[frog]","[面条]":"[noodles]","[鞭炮]":"[firecracker]","[风车]":"[windmill]","[飞吻]":"[blow kisses]","[飞机]":"[air]","[饥饿]":"[hunger]","[香蕉]":"[banana]","[骷髅]":"[skull]","[麦克风]":"[mic]","[麻将]":"[mahjong]","[鼓掌]":"[handclap]","[龇牙]":"[happy]"},n=["[龇牙]","[调皮]","[流汗]","[偷笑]","[再见]","[敲打]","[擦汗]","[猪头]","[玫瑰]","[流泪]","[大哭]","[嘘]","[酷]","[抓狂]","[委屈]","[便便]","[炸弹]","[菜刀]","[可爱]","[色]","[害羞]","[得意]","[吐]","[微笑]","[怒]","[尴尬]","[惊恐]","[冷汗]","[爱心]","[示爱]","[白眼]","[傲慢]","[难过]","[惊讶]","[疑问]","[困]","[么么哒]","[憨笑]","[爱情]","[衰]","[撇嘴]","[阴险]","[奋斗]","[发呆]","[右哼哼]","[抱抱]","[坏笑]","[飞吻]","[鄙视]","[晕]","[大兵]","[可怜]","[强]","[弱]","[握手]","[胜利]","[抱拳]","[凋谢]","[米饭]","[蛋糕]","[西瓜]","[啤酒]","[瓢虫]","[勾引]","[OK]","[爱你]","[咖啡]","[月亮]","[刀]","[发抖]","[差劲]","[拳头]","[心碎了]","[太阳]","[礼物]","[皮球]","[骷髅]","[挥手]","[闪电]","[饥饿]","[咒骂]","[折磨]","[抠鼻]","[鼓掌]","[糗大了]","[左哼哼]","[打哈欠]","[快哭了]","[吓]","[篮球]","[乒乓]","[NO]","[跳跳]","[怄火]","[转圈]","[磕头]","[回头]","[跳绳]","[激动]","[街舞]","[献吻]","[左太极]","[右太极]","[闭嘴]","[猫咪]","[红双喜]","[鞭炮]","[红灯笼]","[麻将]","[麦克风]","[礼品袋]","[信封]","[象棋]","[彩带]","[蜡烛]","[爆筋]","[棒棒糖]","[奶瓶]","[面条]","[香蕉]","[飞机]","[左车头]","[车厢]","[右车头]","[多云]","[下雨]","[钞票]","[熊猫]","[灯泡]","[风车]","[闹钟]","[雨伞]","[彩球]","[钻戒]","[沙发]","[纸巾]","[手枪]","[青蛙]"];function m(e,i,n){void 0===i&&(i=0);var m=e,g=0===i?1:0,j=i;return Object.entries(o).map((function(e){return m.includes(e[g])&&(m=n&&"zh-CN"===n?e[g]:p(m,e[g],e[j])),e})),m}function p(e,i,o){var n=e;return(n=n.replace(i,o)).includes(i)&&(n=p(n,i,o)),n}export{o as emojiEnKey,i as emojiMap,n as emojiName,e as emojiUrl,m as formatEmojiString};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useEffect as o,useState as r}from"react";import{useTranslation as a}from"react-i18next";import{MESSAGE_OPERATE as i}from"../../constants.js";import{useTUIChatStateContext as s}from"../../context/TUIChatStateContext.js";import"../../context/TUIMessageContext.js";import{useTUIMessageInputContext as u}from"../../context/TUIMessageInputContext.js";import{isPC as l}from"../../utils/env.js";import{formatEmojiString as c}from"../TUIMessage/utils/emojiMap.js";function d(){var d=u("TUIMessageInputDefault"),m=d.text,
|
|
1
|
+
import{__assign as t}from"tslib";import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useEffect as o,useState as r}from"react";import{useTranslation as a}from"react-i18next";import{MESSAGE_OPERATE as i}from"../../constants.js";import{useTUIChatStateContext as s}from"../../context/TUIChatStateContext.js";import"../../context/TUIMessageContext.js";import{useTUIMessageInputContext as u}from"../../context/TUIMessageInputContext.js";import{isPC as l}from"../../utils/env.js";import{formatEmojiString as c}from"../TUIMessage/utils/emojiMap.js";function d(){var d=u("TUIMessageInputDefault"),m=d.text,p=d.disabled,f=d.handleChange,v=d.handleKeyDown,x=d.handlePasete,g=d.textareaRef,h=d.focus,I=d.setText,b=d.setCursorPos,j=a().t,C=s("TUIMessageInputDefault").operateData;o((function(){C&&C[i.REVOKE]&&I&&I(c(C[i.REVOKE].payload.text,1))}),[C]),o((function(){var t,e;return h&&g&&g.current&&(g.current.autofocus=!0,l&&(null===(t=null==g?void 0:g.current)||void 0===t||t.focus({preventScroll:!0})),null===(e=null==g?void 0:g.current)||void 0===e||e.addEventListener("paste",x)),function(){var t;null===(t=null==g?void 0:g.current)||void 0===t||t.removeEventListener("paste",x)}}),[h,g]);var E=r(!1),T=E[0],U=E[1];return e("div",t({className:"input-box ".concat(p?"disabled":""," ").concat(T?"tui-kit-input-box--focus":"tui-kit-input-box--blur")},{children:[n("div",t({className:"input-visibility-content"},{children:m})),!p&&n("textarea",{placeholder:j("TUIChat.Enter a message"),rows:1,value:m,ref:g,onChange:f,onKeyDown:v,onFocus:function(){U(!0)},onBlur:function(t){!function(t){var e;b&&b({start:null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.selectionStart,end:t.target.selectionEnd}),U(!1)}(t)}})]}))}export{d as TUIMessageInputDefault};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as e}from"react";import{useTranslation as t}from"react-i18next";import{TUIChatService as a}from"@tencentcloud/chat-uikit-engine";import{emojiEnKey as n}from"../../TUIMessage/utils/emojiMap.js";function o(o){o.textareaRef;var i=o.insertText,r=t().i18n;return{onSelectEmoji:function(e){"zh"===r.language?i&&i(e.data):i&&i(n[e.data])},sendFaceMessage:e((function(e){a.sendFaceMessage({payload:e})}),[])}}export{o as useEmojiPicker};
|
|
1
|
+
import{useCallback as e}from"react";import{useTranslation as t}from"react-i18next";import{TUIChatService as a}from"@tencentcloud/chat-uikit-engine";import{emojiEnKey as n}from"../../TUIMessage/utils/emojiMap.js";function o(o){o.textareaRef;var i=o.insertText,r=t().i18n;return{onSelectEmoji:function(e){"zh-CN"===r.language?i&&i(e.data):i&&i(n[e.data])},sendFaceMessage:e((function(e){a.sendFaceMessage({payload:e})}),[])}}export{o as useEmojiPicker};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from"tslib";import{useCallback as n}from"react";import{TUIChatService as o}from"@tencentcloud/chat-uikit-engine";import{CONSTANT_DISPATCH_TYPE as r,MESSAGE_TYPE_NAME as i,MESSAGE_OPERATE as u}from"../../../constants.js";import{useTUIKitContext as a}from"../../../context/TUIKitContext.js";import"react/jsx-runtime";import{useTUIChatActionContext as s}from"../../../context/TUIChatActionContext.js";import"../../../context/TUIMessageContext.js";import{enableSampleTaskStatus as l}from"../../untils.js";import{formatEmojiString as c}from"../../TUIMessage/utils/emojiMap.js";import{useHandleQuoteMessage as d}from"./useHandleQuoteMessage.js";var
|
|
1
|
+
import{__awaiter as t,__generator as e}from"tslib";import{useCallback as n}from"react";import{TUIChatService as o}from"@tencentcloud/chat-uikit-engine";import{CONSTANT_DISPATCH_TYPE as r,MESSAGE_TYPE_NAME as i,MESSAGE_OPERATE as u}from"../../../constants.js";import{useTUIKitContext as a}from"../../../context/TUIKitContext.js";import"react/jsx-runtime";import{useTUIChatActionContext as s}from"../../../context/TUIChatActionContext.js";import"../../../context/TUIMessageContext.js";import{enableSampleTaskStatus as l}from"../../untils.js";import{formatEmojiString as c}from"../../TUIMessage/utils/emojiMap.js";import{useHandleQuoteMessage as d}from"./useHandleQuoteMessage.js";var v=function(v){var f=v.state,p=v.dispatch;v.focus;var T=v.textareaRef,m=v.sendUploadMessage,g=a("useMessageInputText").chat,x=s(),y=x.operateMessage,E=x.setFirstSendMessage,S=d().cloudCustomData,h=["Enter","NumpadEnter"],C=n((function(t){t.preventDefault(),t&&t.target&&p({type:r.SET_TEXT,getNewText:function(e){return t.target.value}})}),[g]),M=function(n){return t(void 0,void 0,void 0,(function(){var t,i;return e(this,(function(e){return null==n||n.preventDefault(),f.text?(t={payload:{text:c(f.text)}},S.messageReply&&(t.cloudCustomData=JSON.stringify(S)),o.sendTextMessage(t).then((function(t){var e=t.data.message;E&&E(e)})),l("sendMessage"),p({getNewText:function(t){return""},type:r.SET_TEXT}),y&&y(((i={})[u.QUOTE]=null,i)),[2]):[2]}))}))},D=n((function(t){!(null==t?void 0:t.ctrlKey)&&(null==t?void 0:t.code)&&h.indexOf(null==t?void 0:t.code)>-1&&13===t.keyCode&&(null==t||t.preventDefault(),M(t)),(null==t?void 0:t.ctrlKey)&&h.indexOf(null==t?void 0:t.code)>-1&&13===t.keyCode&&p({type:r.SET_TEXT,getNewText:function(t){return"".concat(t,"\n")}})}),[M,p]),P=n((function(n){return t(void 0,void 0,void 0,(function(){var t,o,u;return e(this,(function(e){return n.preventDefault(),n.clipboardData&&n.clipboardData.items?(t=n.clipboardData,o=t.types,u=t.items,o.find((function(t,e){var n=u[e];switch(t){case"text/plain":return n.getAsString((function(t){p({type:r.SET_TEXT,getNewText:function(e){return"".concat(e).concat(t)}})})),!0;case"Files":var o=n.getAsFile();return n&&"file"===n.kind&&n.type.match(/^image\//i)&&m&&m({file:o},i.IMAGE),!0;default:return!1}})),[2]):[2]}))}))}),[T]),_=n((function(t){var e,n,o;p({type:r.SET_TEXT,getNewText:function(e){var n,o;return"".concat(e.slice(0,(null===(n=null==f?void 0:f.cursorPos)||void 0===n?void 0:n.start)||0)).concat(t).concat(e.slice((null===(o=null==f?void 0:f.cursorPos)||void 0===o?void 0:o.start)||0))}}),p({type:r.SET_CURSOR_POS,value:{start:(null===(e=null==f?void 0:f.cursorPos)||void 0===e?void 0:e.start)&&f.cursorPos.start+t.length,end:(null===(n=null==f?void 0:f.cursorPos)||void 0===n?void 0:n.end)&&f.cursorPos.end+t.length}}),null===(o=null==T?void 0:T.current)||void 0===o||o.focus({preventScroll:!0})}),[T,f]),j=n((function(t){var e;p({type:r.SET_TEXT,getNewText:function(){return"".concat(t)}}),null===(e=null==T?void 0:T.current)||void 0===e||e.focus()}),[T]),w=n((function(t){p({type:r.SET_CURSOR_POS,value:t})}),[T]);return{handleChange:C,handleSubmit:M,handleKeyDown:D,handlePasete:P,insertText:_,setText:j,setCursorPos:w}};export{v as useMessageInputText};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__generator as i}from"tslib";import{jsx as o,jsxs as
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as i}from"tslib";import{jsx as o,jsxs as r}from"react/jsx-runtime";import n,{useState as l,useEffect as s}from"react";import{useTranslation as a}from"react-i18next";import{useTUIChatStateContext as c}from"../../context/TUIChatStateContext.js";import{useTUIChatActionContext as d}from"../../context/TUIChatActionContext.js";import"../../context/TUIMessageContext.js";import{useComponentContext as m}from"../../context/ComponentContext.js";import u from"./hooks/useMessageListElement.js";import{InfiniteScroll as g}from"../InfiniteScrollPaginator/InfiniteScroll.js";import{EmptyStateIndicator as h}from"../EmptyStateIndicator/EmptyStateIndicator.js";function v(n){var v=this,f=n.highlightedMessageId,p=n.loadMore,M=n.intervalsTimer,T=n.className,I=a().t,C=l(null),x=C[0],L=C[1],j=l(!1),S=j[0],U=j[1],E=c("TUIMessageList"),y=E.messageList,N=E.highlightedMessageId,b=E.isCompleted;E.isSameLastMessageID;var H=E.messageListRef,R=E.noMore,B=E.TUIMessageListConfig,k=d(),q=k.loadMore,w=k.setHighlightedMessageId,A=m(),D=A.TUIMessage,P=A.EmptyStateIndicator,z=void 0===P?h:P,F=f||(null==B?void 0:B.highlightedMessageId)||N,G=60*(M||(null==B?void 0:B.intervalsTimer)||30),J=p||(null==B?void 0:B.loadMore)||q,K=y&&u({enrichedMessageList:y,TUIMessage:D,intervalsTimer:G});return s((function(){t(v,void 0,void 0,(function(){var e,t,o,r;return i(this,(function(i){switch(i.label){case 0:return e=null===(r=null==x?void 0:x.parentElement)||void 0===r?void 0:r.parentElement,!b&&e&&(null==e?void 0:e.clientHeight)>=(null==x?void 0:x.clientHeight)?J?[4,J()]:[3,2]:[3,3];case 1:i.sent(),i.label=2;case 2:i.label=3;case 3:return(null==x?void 0:x.children)&&((t=(null==x?void 0:x.children)||[])[t.length-1],o=setTimeout((function(){(null==H?void 0:H.current)&&(H.current.scrollTop=H.current.scrollHeight),U(!0),clearTimeout(o)}),100)),[2]}}))}))}),[K,S]),s((function(){if(F){var e=null==x?void 0:x.querySelector("[data-message-id='".concat(F,"']"));if(!e)return;var t=e.children;if(t[t.length-1].classList.add("high-lighted"),null==H?void 0:H.current){var i=e.getBoundingClientRect(),o=H.current.getBoundingClientRect(),r=i.top-o.top+H.current.scrollTop;H.current.scrollTop=r}var n=setTimeout((function(){t[t.length-1].classList.remove("high-lighted"),clearTimeout(n),w&&w("")}),1e3)}}),[F]),r("div",e({className:"message-list ".concat(T," ").concat(S?"":"hide"),ref:H},{children:[R,R&&o("p",e({className:"no-more"},{children:I("TUIChat.No More")})),o(g,e({className:"message-list-infinite-scroll",hasMore:!0,loadMore:J,threshold:1},{children:o("ul",e({ref:L},{children:(null==K?void 0:K.length)&&K.length>0?K:o(z,{listType:"message"})}))}))]}))}var f=n.memo(v);function p(t){return o(f,e({},t))}export{p as TUIMessageList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isThisYear as t,format as e,isToday as r,isYesterday as
|
|
1
|
+
import{isThisYear as t,format as e,isToday as r,isYesterday as o,formatDistance as a,isThisWeek as n}from"date-fns";import{zhCN as i,enGB as c,ja as f,ko as u}from"date-fns/locale";import l from"@tencentcloud/chat";import{TUIStore as p,StoreName as s}from"@tencentcloud/chat-uikit-engine";import"tslib";import"react/jsx-runtime";import"react";import"./Icon/config.js";import"./Icon/type.js";import{defaultGroupAvatarWork as m,defaultUserAvatar as d}from"./Avatar/default.js";function P(t){if("string"==typeof t)try{return!!JSON.parse(t)}catch(t){return!1}return!1}function C(t){return P(t)?JSON.parse(t):t}var v=function(t,e){void 0===e&&(e=l.TYPES.CONV_C2C);var r=t;if(!t)switch(e){case l.TYPES.CONV_C2C:r=d;break;case l.TYPES.CONV_GROUP:default:r=m}return r},y=function(l,p){void 0===p&&(p="en-US");var s={"zh-CN":i,"en-US":c,"ja-JP":f,"ko-KR":u};return l?t(l)?r(l)?e(l,"p",{locale:s[p]}):o(l)?a(l,new Date,{locale:s[p]}):n(l)?e(l,"eeee",{locale:s[p]}):e(l,"MMM dd",{locale:s[p]}):e(l,"yyyy MMM dd",{locale:s[p]}):""};function S(t){var e=p.getData(s.APP,"tasks");t in e&&!e[t]&&(e[t]=!0,p.update(s.APP,"tasks",e))}export{C as JSONStringToParse,S as enableSampleTaskStatus,y as getTimeStamp,v as handleDisplayAvatar,P as isJSON};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import{jsx as t}from"react/jsx-runtime";import e,{useContext as o}from"react";var i=e.createContext(void 0);function
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as t}from"react/jsx-runtime";import e,{useLayoutEffect as n,useContext as o}from"react";var i=e.createContext(void 0);function a(e){var o=e.children,a=e.value;return n((function(){document.documentElement.dataset.chatTheme="light"}),[]),t(i.Provider,r({value:a},{children:o}))}var c=function(r){var t=o(i);return!t&&r?{}:t};export{i as TUIKitContext,a as TUIKitProvider,c as useTUIKitContext};
|