sceyt-chat-react-uikit 1.7.2-beta.7 → 1.7.2-beta.8
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/index.js +36 -40
- package/index.modern.js +36 -40
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -17845,16 +17845,14 @@ function sendTextMessage(action) {
|
|
|
17845
17845
|
case 16:
|
|
17846
17846
|
throw new Error('Connection required to send message');
|
|
17847
17847
|
case 17:
|
|
17848
|
+
store.dispatch(getMessagesAC(channel, true, channel.lastMessage.id, undefined, undefined, false));
|
|
17848
17849
|
_context4.n = 18;
|
|
17849
|
-
return effects.put(scrollToNewMessageAC(true));
|
|
17850
|
-
case 18:
|
|
17851
|
-
_context4.n = 19;
|
|
17852
17850
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
17853
|
-
case
|
|
17854
|
-
_context4.n =
|
|
17851
|
+
case 18:
|
|
17852
|
+
_context4.n = 21;
|
|
17855
17853
|
break;
|
|
17856
|
-
case
|
|
17857
|
-
_context4.p =
|
|
17854
|
+
case 19:
|
|
17855
|
+
_context4.p = 19;
|
|
17858
17856
|
_t3 = _context4.v;
|
|
17859
17857
|
log.error('error on send text message ... ', _t3);
|
|
17860
17858
|
updateMessageOnMap(channel.id, {
|
|
@@ -17864,23 +17862,23 @@ function sendTextMessage(action) {
|
|
|
17864
17862
|
}
|
|
17865
17863
|
});
|
|
17866
17864
|
if (!(activeChannelId === channel.id)) {
|
|
17867
|
-
_context4.n =
|
|
17865
|
+
_context4.n = 20;
|
|
17868
17866
|
break;
|
|
17869
17867
|
}
|
|
17870
17868
|
updateMessageOnAllMessages(sendMessageTid, {
|
|
17871
17869
|
state: MESSAGE_STATUS.FAILED
|
|
17872
17870
|
});
|
|
17873
|
-
_context4.n =
|
|
17871
|
+
_context4.n = 20;
|
|
17874
17872
|
return effects.put(updateMessageAC(sendMessageTid, {
|
|
17875
17873
|
state: MESSAGE_STATUS.FAILED
|
|
17876
17874
|
}));
|
|
17877
|
-
case
|
|
17878
|
-
_context4.n =
|
|
17875
|
+
case 20:
|
|
17876
|
+
_context4.n = 21;
|
|
17879
17877
|
return effects.put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
17880
|
-
case
|
|
17878
|
+
case 21:
|
|
17881
17879
|
return _context4.a(2);
|
|
17882
17880
|
}
|
|
17883
|
-
}, _marked2$2, null, [[3,
|
|
17881
|
+
}, _marked2$2, null, [[3, 19]]);
|
|
17884
17882
|
}
|
|
17885
17883
|
function forwardMessage(action) {
|
|
17886
17884
|
var payload, message, channelId, connectionState, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, activeChannelId, isCachedChannel, hasNextMessages, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t4;
|
|
@@ -26417,21 +26415,15 @@ function ReactionsPopup(_ref) {
|
|
|
26417
26415
|
var _useState = React.useState('all'),
|
|
26418
26416
|
activeTabKey = _useState[0],
|
|
26419
26417
|
setActiveTabKey = _useState[1];
|
|
26420
|
-
var _useState2 = React.useState(
|
|
26421
|
-
|
|
26422
|
-
|
|
26423
|
-
var _useState3 = React.useState(
|
|
26424
|
-
|
|
26425
|
-
|
|
26426
|
-
var _useState4 = React.useState(
|
|
26427
|
-
|
|
26428
|
-
|
|
26429
|
-
var _useState5 = React.useState(false),
|
|
26430
|
-
calculateSizes = _useState5[0],
|
|
26431
|
-
setCalculateSizes = _useState5[1];
|
|
26432
|
-
var _useState6 = React.useState(false),
|
|
26433
|
-
closeIsApproved = _useState6[0],
|
|
26434
|
-
setCloseIsApproved = _useState6[1];
|
|
26418
|
+
var _useState2 = React.useState(0),
|
|
26419
|
+
popupHeight = _useState2[0],
|
|
26420
|
+
setPopupHeight = _useState2[1];
|
|
26421
|
+
var _useState3 = React.useState(false),
|
|
26422
|
+
calculateSizes = _useState3[0],
|
|
26423
|
+
setCalculateSizes = _useState3[1];
|
|
26424
|
+
var _useState4 = React.useState(false),
|
|
26425
|
+
closeIsApproved = _useState4[0],
|
|
26426
|
+
setCloseIsApproved = _useState4[1];
|
|
26435
26427
|
var totalReactions = 0;
|
|
26436
26428
|
if (reactionTotals) {
|
|
26437
26429
|
reactionTotals.forEach(function (summery) {
|
|
@@ -26440,9 +26432,9 @@ function ReactionsPopup(_ref) {
|
|
|
26440
26432
|
}
|
|
26441
26433
|
var user = getClient().user;
|
|
26442
26434
|
var dispatch = useDispatch();
|
|
26443
|
-
var
|
|
26444
|
-
isScrolling =
|
|
26445
|
-
setIsScrolling =
|
|
26435
|
+
var _useState5 = React.useState(false),
|
|
26436
|
+
isScrolling = _useState5[0],
|
|
26437
|
+
setIsScrolling = _useState5[1];
|
|
26446
26438
|
var handleReactionsListScroll = function handleReactionsListScroll(event) {
|
|
26447
26439
|
if (event.target.scrollTop >= event.target.scrollHeight - event.target.offsetHeight - 100 && reactionsHasNext) {
|
|
26448
26440
|
if (reactionsLoadingState === LOADING_STATE.LOADED) {
|
|
@@ -26471,20 +26463,23 @@ function ReactionsPopup(_ref) {
|
|
|
26471
26463
|
dispatch(setReactionsListAC([], true));
|
|
26472
26464
|
};
|
|
26473
26465
|
}, [messageId]);
|
|
26474
|
-
React.
|
|
26466
|
+
var scoresHeight = React.useMemo(function () {
|
|
26475
26467
|
var scoresElem = scoresRef.current;
|
|
26476
26468
|
if (scoresElem) {
|
|
26477
|
-
|
|
26469
|
+
return scoresElem.offsetHeight;
|
|
26478
26470
|
}
|
|
26479
|
-
|
|
26471
|
+
return 0;
|
|
26472
|
+
}, [scoresRef]);
|
|
26480
26473
|
React.useEffect(function () {
|
|
26481
26474
|
if (!reactionTotals || !reactionTotals.length) {
|
|
26482
26475
|
handleReactionsPopupClose();
|
|
26483
26476
|
}
|
|
26484
26477
|
}, [reactionTotals]);
|
|
26478
|
+
var reactionsHeight = React.useMemo(function () {
|
|
26479
|
+
return reactions.length * 50 + 45;
|
|
26480
|
+
}, [reactions]);
|
|
26485
26481
|
React.useEffect(function () {
|
|
26486
26482
|
if (reactions && reactionsPrevLength < reactions.length) {
|
|
26487
|
-
var reactionsHeight = reactions.length * 44 + 45;
|
|
26488
26483
|
if (reactionsHeight > popupHeight) {
|
|
26489
26484
|
setPopupHeight(reactionsHeight);
|
|
26490
26485
|
}
|
|
@@ -26494,14 +26489,15 @@ function ReactionsPopup(_ref) {
|
|
|
26494
26489
|
}
|
|
26495
26490
|
if (reactions && reactions.length) {
|
|
26496
26491
|
if (calculateSizes) {
|
|
26497
|
-
|
|
26498
|
-
var _reactionsHeight = reactions.length * 50 + 45;
|
|
26499
|
-
setPopupHeight(_reactionsHeight);
|
|
26500
|
-
setPopupVerticalPosition(botPost >= (_reactionsHeight > 320 ? 320 : _reactionsHeight) ? 'bottom' : 'top');
|
|
26492
|
+
setPopupHeight(reactionsHeight);
|
|
26501
26493
|
setCalculateSizes(false);
|
|
26502
26494
|
}
|
|
26503
26495
|
}
|
|
26504
|
-
}, [reactions]);
|
|
26496
|
+
}, [reactions, reactionsHeight]);
|
|
26497
|
+
var popupVerticalPosition = React.useMemo(function () {
|
|
26498
|
+
var botPost = bottomPosition - messageInputHeight - 40;
|
|
26499
|
+
return botPost >= (reactionsHeight > 320 ? 320 : reactionsHeight) ? 'bottom' : 'top';
|
|
26500
|
+
}, [bottomPosition, messageInputHeight, reactionsHeight]);
|
|
26505
26501
|
return /*#__PURE__*/React__default.createElement(Container$d, {
|
|
26506
26502
|
ref: popupRef,
|
|
26507
26503
|
popupVerticalPosition: popupVerticalPosition,
|
package/index.modern.js
CHANGED
|
@@ -17824,16 +17824,14 @@ function sendTextMessage(action) {
|
|
|
17824
17824
|
case 16:
|
|
17825
17825
|
throw new Error('Connection required to send message');
|
|
17826
17826
|
case 17:
|
|
17827
|
+
store.dispatch(getMessagesAC(channel, true, channel.lastMessage.id, undefined, undefined, false));
|
|
17827
17828
|
_context4.n = 18;
|
|
17828
|
-
return put(scrollToNewMessageAC(true));
|
|
17829
|
-
case 18:
|
|
17830
|
-
_context4.n = 19;
|
|
17831
17829
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
17832
|
-
case
|
|
17833
|
-
_context4.n =
|
|
17830
|
+
case 18:
|
|
17831
|
+
_context4.n = 21;
|
|
17834
17832
|
break;
|
|
17835
|
-
case
|
|
17836
|
-
_context4.p =
|
|
17833
|
+
case 19:
|
|
17834
|
+
_context4.p = 19;
|
|
17837
17835
|
_t3 = _context4.v;
|
|
17838
17836
|
log.error('error on send text message ... ', _t3);
|
|
17839
17837
|
updateMessageOnMap(channel.id, {
|
|
@@ -17843,23 +17841,23 @@ function sendTextMessage(action) {
|
|
|
17843
17841
|
}
|
|
17844
17842
|
});
|
|
17845
17843
|
if (!(activeChannelId === channel.id)) {
|
|
17846
|
-
_context4.n =
|
|
17844
|
+
_context4.n = 20;
|
|
17847
17845
|
break;
|
|
17848
17846
|
}
|
|
17849
17847
|
updateMessageOnAllMessages(sendMessageTid, {
|
|
17850
17848
|
state: MESSAGE_STATUS.FAILED
|
|
17851
17849
|
});
|
|
17852
|
-
_context4.n =
|
|
17850
|
+
_context4.n = 20;
|
|
17853
17851
|
return put(updateMessageAC(sendMessageTid, {
|
|
17854
17852
|
state: MESSAGE_STATUS.FAILED
|
|
17855
17853
|
}));
|
|
17856
|
-
case
|
|
17857
|
-
_context4.n =
|
|
17854
|
+
case 20:
|
|
17855
|
+
_context4.n = 21;
|
|
17858
17856
|
return put(setMessagesLoadingStateAC(LOADING_STATE.LOADED));
|
|
17859
|
-
case
|
|
17857
|
+
case 21:
|
|
17860
17858
|
return _context4.a(2);
|
|
17861
17859
|
}
|
|
17862
|
-
}, _marked2$2, null, [[3,
|
|
17860
|
+
}, _marked2$2, null, [[3, 19]]);
|
|
17863
17861
|
}
|
|
17864
17862
|
function forwardMessage(action) {
|
|
17865
17863
|
var payload, message, channelId, connectionState, channel, SceytChatClient, mentionedUserIds, attachments, attachmentBuilder, att, messageBuilder, messageToSend, pendingMessage, activeChannelId, isCachedChannel, hasNextMessages, messageResponse, messageUpdateData, messageToUpdate, channelUpdateParam, _t4;
|
|
@@ -26396,21 +26394,15 @@ function ReactionsPopup(_ref) {
|
|
|
26396
26394
|
var _useState = useState('all'),
|
|
26397
26395
|
activeTabKey = _useState[0],
|
|
26398
26396
|
setActiveTabKey = _useState[1];
|
|
26399
|
-
var _useState2 = useState(
|
|
26400
|
-
|
|
26401
|
-
|
|
26402
|
-
var _useState3 = useState(
|
|
26403
|
-
|
|
26404
|
-
|
|
26405
|
-
var _useState4 = useState(
|
|
26406
|
-
|
|
26407
|
-
|
|
26408
|
-
var _useState5 = useState(false),
|
|
26409
|
-
calculateSizes = _useState5[0],
|
|
26410
|
-
setCalculateSizes = _useState5[1];
|
|
26411
|
-
var _useState6 = useState(false),
|
|
26412
|
-
closeIsApproved = _useState6[0],
|
|
26413
|
-
setCloseIsApproved = _useState6[1];
|
|
26397
|
+
var _useState2 = useState(0),
|
|
26398
|
+
popupHeight = _useState2[0],
|
|
26399
|
+
setPopupHeight = _useState2[1];
|
|
26400
|
+
var _useState3 = useState(false),
|
|
26401
|
+
calculateSizes = _useState3[0],
|
|
26402
|
+
setCalculateSizes = _useState3[1];
|
|
26403
|
+
var _useState4 = useState(false),
|
|
26404
|
+
closeIsApproved = _useState4[0],
|
|
26405
|
+
setCloseIsApproved = _useState4[1];
|
|
26414
26406
|
var totalReactions = 0;
|
|
26415
26407
|
if (reactionTotals) {
|
|
26416
26408
|
reactionTotals.forEach(function (summery) {
|
|
@@ -26419,9 +26411,9 @@ function ReactionsPopup(_ref) {
|
|
|
26419
26411
|
}
|
|
26420
26412
|
var user = getClient().user;
|
|
26421
26413
|
var dispatch = useDispatch();
|
|
26422
|
-
var
|
|
26423
|
-
isScrolling =
|
|
26424
|
-
setIsScrolling =
|
|
26414
|
+
var _useState5 = useState(false),
|
|
26415
|
+
isScrolling = _useState5[0],
|
|
26416
|
+
setIsScrolling = _useState5[1];
|
|
26425
26417
|
var handleReactionsListScroll = function handleReactionsListScroll(event) {
|
|
26426
26418
|
if (event.target.scrollTop >= event.target.scrollHeight - event.target.offsetHeight - 100 && reactionsHasNext) {
|
|
26427
26419
|
if (reactionsLoadingState === LOADING_STATE.LOADED) {
|
|
@@ -26450,20 +26442,23 @@ function ReactionsPopup(_ref) {
|
|
|
26450
26442
|
dispatch(setReactionsListAC([], true));
|
|
26451
26443
|
};
|
|
26452
26444
|
}, [messageId]);
|
|
26453
|
-
|
|
26445
|
+
var scoresHeight = useMemo(function () {
|
|
26454
26446
|
var scoresElem = scoresRef.current;
|
|
26455
26447
|
if (scoresElem) {
|
|
26456
|
-
|
|
26448
|
+
return scoresElem.offsetHeight;
|
|
26457
26449
|
}
|
|
26458
|
-
|
|
26450
|
+
return 0;
|
|
26451
|
+
}, [scoresRef]);
|
|
26459
26452
|
useEffect(function () {
|
|
26460
26453
|
if (!reactionTotals || !reactionTotals.length) {
|
|
26461
26454
|
handleReactionsPopupClose();
|
|
26462
26455
|
}
|
|
26463
26456
|
}, [reactionTotals]);
|
|
26457
|
+
var reactionsHeight = useMemo(function () {
|
|
26458
|
+
return reactions.length * 50 + 45;
|
|
26459
|
+
}, [reactions]);
|
|
26464
26460
|
useEffect(function () {
|
|
26465
26461
|
if (reactions && reactionsPrevLength < reactions.length) {
|
|
26466
|
-
var reactionsHeight = reactions.length * 44 + 45;
|
|
26467
26462
|
if (reactionsHeight > popupHeight) {
|
|
26468
26463
|
setPopupHeight(reactionsHeight);
|
|
26469
26464
|
}
|
|
@@ -26473,14 +26468,15 @@ function ReactionsPopup(_ref) {
|
|
|
26473
26468
|
}
|
|
26474
26469
|
if (reactions && reactions.length) {
|
|
26475
26470
|
if (calculateSizes) {
|
|
26476
|
-
|
|
26477
|
-
var _reactionsHeight = reactions.length * 50 + 45;
|
|
26478
|
-
setPopupHeight(_reactionsHeight);
|
|
26479
|
-
setPopupVerticalPosition(botPost >= (_reactionsHeight > 320 ? 320 : _reactionsHeight) ? 'bottom' : 'top');
|
|
26471
|
+
setPopupHeight(reactionsHeight);
|
|
26480
26472
|
setCalculateSizes(false);
|
|
26481
26473
|
}
|
|
26482
26474
|
}
|
|
26483
|
-
}, [reactions]);
|
|
26475
|
+
}, [reactions, reactionsHeight]);
|
|
26476
|
+
var popupVerticalPosition = useMemo(function () {
|
|
26477
|
+
var botPost = bottomPosition - messageInputHeight - 40;
|
|
26478
|
+
return botPost >= (reactionsHeight > 320 ? 320 : reactionsHeight) ? 'bottom' : 'top';
|
|
26479
|
+
}, [bottomPosition, messageInputHeight, reactionsHeight]);
|
|
26484
26480
|
return /*#__PURE__*/React__default.createElement(Container$d, {
|
|
26485
26481
|
ref: popupRef,
|
|
26486
26482
|
popupVerticalPosition: popupVerticalPosition,
|