whyuzeim 1.1.146 → 1.1.147
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/cjs/ChatBox/BuyIM/index.d.ts +5 -0
- package/cjs/index.js +34 -18
- package/es/ChatBox/BuyIM/index.d.ts +5 -0
- package/es/index.js +34 -18
- package/package.json +1 -1
package/cjs/index.js
CHANGED
|
@@ -137468,7 +137468,8 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
137468
137468
|
};
|
|
137469
137469
|
|
|
137470
137470
|
var BuyIM = function BuyIM(props) {
|
|
137471
|
-
var headerInfo = props.headerInfo
|
|
137471
|
+
var headerInfo = props.headerInfo,
|
|
137472
|
+
tokenInfo = props.tokenInfo;
|
|
137472
137473
|
return /*#__PURE__*/React.createElement("div", {
|
|
137473
137474
|
className: "flex-1 default_chat_box flex flex-col justify-center items-center gap-3 !bg-[#f5f5f5]"
|
|
137474
137475
|
}, /*#__PURE__*/React.createElement("svg", {
|
|
@@ -137510,9 +137511,9 @@ var BuyIM = function BuyIM(props) {
|
|
|
137510
137511
|
className: "text-black text-[24px] font-semibold"
|
|
137511
137512
|
}, "Private Chat Locked"), /*#__PURE__*/React.createElement("span", {
|
|
137512
137513
|
className: "text-[#2C7CF5] text-[14px]"
|
|
137513
|
-
}, "Private chat with username requires holding at least
|
|
137514
|
+
}, "Private chat with username requires holding at least ", tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.requiredAmount, " ", tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.tokenSymbol), /*#__PURE__*/React.createElement(antd.Button, {
|
|
137514
137515
|
className: "!bg-[#2C7CF5] !text-white !w-[320px] !h-[48px] mt-3"
|
|
137515
|
-
}, "Buy
|
|
137516
|
+
}, "Buy ", tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.requiredAmount, " ", tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.tokenSymbol, " to unlock"));
|
|
137516
137517
|
};
|
|
137517
137518
|
|
|
137518
137519
|
function ownKeys$3(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -137541,23 +137542,27 @@ var Chatbox = function Chatbox(props) {
|
|
|
137541
137542
|
_Modal$useModal2 = _slicedToArray(_Modal$useModal, 2),
|
|
137542
137543
|
modal = _Modal$useModal2[0],
|
|
137543
137544
|
contextHolder = _Modal$useModal2[1];
|
|
137544
|
-
var _useState3 = React.useState(
|
|
137545
|
+
var _useState3 = React.useState(undefined),
|
|
137546
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
137547
|
+
tokenInfo = _useState4[0],
|
|
137548
|
+
setTokenInfo = _useState4[1];
|
|
137549
|
+
var _useState5 = React.useState({
|
|
137545
137550
|
headerImageURL: "",
|
|
137546
137551
|
conversationName: "",
|
|
137547
137552
|
memberCount: 0,
|
|
137548
137553
|
chatType: "singleChat"
|
|
137549
137554
|
}),
|
|
137550
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
137551
|
-
headerInfo = _useState4[0],
|
|
137552
|
-
setHeaderInfo = _useState4[1];
|
|
137553
|
-
var _useState5 = React.useState(true),
|
|
137554
137555
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
137555
|
-
|
|
137556
|
-
|
|
137557
|
-
var _useState7 = React.useState(
|
|
137556
|
+
headerInfo = _useState6[0],
|
|
137557
|
+
setHeaderInfo = _useState6[1];
|
|
137558
|
+
var _useState7 = React.useState(true),
|
|
137558
137559
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
137559
|
-
|
|
137560
|
-
|
|
137560
|
+
isAgent = _useState8[0],
|
|
137561
|
+
setIsAgent = _useState8[1];
|
|
137562
|
+
var _useState9 = React.useState(undefined),
|
|
137563
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
137564
|
+
specialConversation = _useState10[0],
|
|
137565
|
+
setSpecialConversation = _useState10[1];
|
|
137561
137566
|
var handleConfirmRemove = /*#__PURE__*/function () {
|
|
137562
137567
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
137563
137568
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -138040,10 +138045,20 @@ var Chatbox = function Chatbox(props) {
|
|
|
138040
138045
|
setRightComponent && setRightComponent(undefined);
|
|
138041
138046
|
}
|
|
138042
138047
|
}, [currentConversation]);
|
|
138043
|
-
var
|
|
138044
|
-
|
|
138045
|
-
isFree =
|
|
138046
|
-
|
|
138048
|
+
var _useState11 = React.useState(false),
|
|
138049
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
138050
|
+
isFree = _useState12[0],
|
|
138051
|
+
setIsFree = _useState12[1];
|
|
138052
|
+
React.useEffect(function () {
|
|
138053
|
+
http.post('/api/agora/validatePrivateChatToken', {
|
|
138054
|
+
targetWalletAddress: currentConversation.conversationId
|
|
138055
|
+
}).then(function (res) {
|
|
138056
|
+
if (res.data.code === 200) {
|
|
138057
|
+
setTokenInfo(res.data.data.tokenInfo);
|
|
138058
|
+
setIsFree(res.data.data.canChat);
|
|
138059
|
+
}
|
|
138060
|
+
});
|
|
138061
|
+
}, [currentConversation.conversationId]);
|
|
138047
138062
|
// useEffect(()=>{
|
|
138048
138063
|
// const cuiScrollList = document.querySelector(".cui-messageList .cui-scrollList div");
|
|
138049
138064
|
// const generatingLoader = document.querySelector("#agent-generating-loader");
|
|
@@ -138054,7 +138069,8 @@ var Chatbox = function Chatbox(props) {
|
|
|
138054
138069
|
return /*#__PURE__*/React.createElement("div", {
|
|
138055
138070
|
className: "yuze_chat_container w-full h-full overflow-hidden flex flex-col"
|
|
138056
138071
|
}, currentConversation.conversationId && customHeader(), !isFree ? /*#__PURE__*/React.createElement(BuyIM, {
|
|
138057
|
-
headerInfo: headerInfo
|
|
138072
|
+
headerInfo: headerInfo,
|
|
138073
|
+
tokenInfo: tokenInfo
|
|
138058
138074
|
}) : /*#__PURE__*/React.createElement(HighlyCustomChat, _extends({
|
|
138059
138075
|
conversationId: currentConversation.conversationId,
|
|
138060
138076
|
chatType: currentConversation.chatType
|
package/es/index.js
CHANGED
|
@@ -137447,7 +137447,8 @@ var HighlyCustomChat = function HighlyCustomChat(props) {
|
|
|
137447
137447
|
};
|
|
137448
137448
|
|
|
137449
137449
|
var BuyIM = function BuyIM(props) {
|
|
137450
|
-
var headerInfo = props.headerInfo
|
|
137450
|
+
var headerInfo = props.headerInfo,
|
|
137451
|
+
tokenInfo = props.tokenInfo;
|
|
137451
137452
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
137452
137453
|
className: "flex-1 default_chat_box flex flex-col justify-center items-center gap-3 !bg-[#f5f5f5]"
|
|
137453
137454
|
}, /*#__PURE__*/React__default.createElement("svg", {
|
|
@@ -137489,9 +137490,9 @@ var BuyIM = function BuyIM(props) {
|
|
|
137489
137490
|
className: "text-black text-[24px] font-semibold"
|
|
137490
137491
|
}, "Private Chat Locked"), /*#__PURE__*/React__default.createElement("span", {
|
|
137491
137492
|
className: "text-[#2C7CF5] text-[14px]"
|
|
137492
|
-
}, "Private chat with username requires holding at least
|
|
137493
|
+
}, "Private chat with username requires holding at least ", tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.requiredAmount, " ", tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.tokenSymbol), /*#__PURE__*/React__default.createElement(Button, {
|
|
137493
137494
|
className: "!bg-[#2C7CF5] !text-white !w-[320px] !h-[48px] mt-3"
|
|
137494
|
-
}, "Buy
|
|
137495
|
+
}, "Buy ", tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.requiredAmount, " ", tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.tokenSymbol, " to unlock"));
|
|
137495
137496
|
};
|
|
137496
137497
|
|
|
137497
137498
|
function ownKeys$3(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -137520,23 +137521,27 @@ var Chatbox = function Chatbox(props) {
|
|
|
137520
137521
|
_Modal$useModal2 = _slicedToArray(_Modal$useModal, 2),
|
|
137521
137522
|
modal = _Modal$useModal2[0],
|
|
137522
137523
|
contextHolder = _Modal$useModal2[1];
|
|
137523
|
-
var _useState3 = useState(
|
|
137524
|
+
var _useState3 = useState(undefined),
|
|
137525
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
137526
|
+
tokenInfo = _useState4[0],
|
|
137527
|
+
setTokenInfo = _useState4[1];
|
|
137528
|
+
var _useState5 = useState({
|
|
137524
137529
|
headerImageURL: "",
|
|
137525
137530
|
conversationName: "",
|
|
137526
137531
|
memberCount: 0,
|
|
137527
137532
|
chatType: "singleChat"
|
|
137528
137533
|
}),
|
|
137529
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
137530
|
-
headerInfo = _useState4[0],
|
|
137531
|
-
setHeaderInfo = _useState4[1];
|
|
137532
|
-
var _useState5 = useState(true),
|
|
137533
137534
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
137534
|
-
|
|
137535
|
-
|
|
137536
|
-
var _useState7 = useState(
|
|
137535
|
+
headerInfo = _useState6[0],
|
|
137536
|
+
setHeaderInfo = _useState6[1];
|
|
137537
|
+
var _useState7 = useState(true),
|
|
137537
137538
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
137538
|
-
|
|
137539
|
-
|
|
137539
|
+
isAgent = _useState8[0],
|
|
137540
|
+
setIsAgent = _useState8[1];
|
|
137541
|
+
var _useState9 = useState(undefined),
|
|
137542
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
137543
|
+
specialConversation = _useState10[0],
|
|
137544
|
+
setSpecialConversation = _useState10[1];
|
|
137540
137545
|
var handleConfirmRemove = /*#__PURE__*/function () {
|
|
137541
137546
|
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
137542
137547
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -138019,10 +138024,20 @@ var Chatbox = function Chatbox(props) {
|
|
|
138019
138024
|
setRightComponent && setRightComponent(undefined);
|
|
138020
138025
|
}
|
|
138021
138026
|
}, [currentConversation]);
|
|
138022
|
-
var
|
|
138023
|
-
|
|
138024
|
-
isFree =
|
|
138025
|
-
|
|
138027
|
+
var _useState11 = useState(false),
|
|
138028
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
138029
|
+
isFree = _useState12[0],
|
|
138030
|
+
setIsFree = _useState12[1];
|
|
138031
|
+
useEffect(function () {
|
|
138032
|
+
http.post('/api/agora/validatePrivateChatToken', {
|
|
138033
|
+
targetWalletAddress: currentConversation.conversationId
|
|
138034
|
+
}).then(function (res) {
|
|
138035
|
+
if (res.data.code === 200) {
|
|
138036
|
+
setTokenInfo(res.data.data.tokenInfo);
|
|
138037
|
+
setIsFree(res.data.data.canChat);
|
|
138038
|
+
}
|
|
138039
|
+
});
|
|
138040
|
+
}, [currentConversation.conversationId]);
|
|
138026
138041
|
// useEffect(()=>{
|
|
138027
138042
|
// const cuiScrollList = document.querySelector(".cui-messageList .cui-scrollList div");
|
|
138028
138043
|
// const generatingLoader = document.querySelector("#agent-generating-loader");
|
|
@@ -138033,7 +138048,8 @@ var Chatbox = function Chatbox(props) {
|
|
|
138033
138048
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
138034
138049
|
className: "yuze_chat_container w-full h-full overflow-hidden flex flex-col"
|
|
138035
138050
|
}, currentConversation.conversationId && customHeader(), !isFree ? /*#__PURE__*/React__default.createElement(BuyIM, {
|
|
138036
|
-
headerInfo: headerInfo
|
|
138051
|
+
headerInfo: headerInfo,
|
|
138052
|
+
tokenInfo: tokenInfo
|
|
138037
138053
|
}) : /*#__PURE__*/React__default.createElement(HighlyCustomChat, _extends({
|
|
138038
138054
|
conversationId: currentConversation.conversationId,
|
|
138039
138055
|
chatType: currentConversation.chatType
|