sceyt-chat-react-uikit 1.8.6 → 1.8.7-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js
CHANGED
|
@@ -18695,7 +18695,6 @@ function markMessagesRead(action) {
|
|
|
18695
18695
|
_context0.n = 9;
|
|
18696
18696
|
break;
|
|
18697
18697
|
}
|
|
18698
|
-
console.log('Mark Messages As Read', messageIds);
|
|
18699
18698
|
_context0.n = 4;
|
|
18700
18699
|
return effects.call(channel.markMessagesAsDisplayed, messageIds);
|
|
18701
18700
|
case 4:
|
|
@@ -18956,7 +18955,6 @@ function markMessagesDelivered(action) {
|
|
|
18956
18955
|
_context12.n = 7;
|
|
18957
18956
|
break;
|
|
18958
18957
|
}
|
|
18959
|
-
console.log('Mark Messages As Delivered', messageIds);
|
|
18960
18958
|
_context12.n = 3;
|
|
18961
18959
|
return effects.call(channel.markMessagesAsReceived, messageIds);
|
|
18962
18960
|
case 3:
|
|
@@ -31333,10 +31331,12 @@ var UsersPopup = function UsersPopup(_ref2) {
|
|
|
31333
31331
|
})));
|
|
31334
31332
|
};
|
|
31335
31333
|
var List = styled__default.div(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n overflow-y: scroll;\n overflow-x: hidden;\n margin-top: 12px;\n min-height: 150px;\n box-sizing: border-box;\n"])));
|
|
31336
|
-
var MembersContainer = styled__default(List)(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n position: relative;\n max-height: ", ";\n overflow-y: auto;\n padding-right: 16px;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
31334
|
+
var MembersContainer = styled__default(List)(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n position: relative;\n max-height: ", ";\n overflow-y: auto;\n padding-right: 16px;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n"])), function (props) {
|
|
31337
31335
|
return "calc(100% - (" + ((props.isAdd ? 67 : 70) + props.selectedMembersHeight) + "px))";
|
|
31338
31336
|
}, function (props) {
|
|
31339
31337
|
return props.thumbColor;
|
|
31338
|
+
}, function (props) {
|
|
31339
|
+
return props.thumbColor;
|
|
31340
31340
|
});
|
|
31341
31341
|
var SearchUserCont = styled__default.div(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["\n position: relative;\n margin: 24px 12px 0;\n\n ", " {\n top: 10px;\n right: 11px;\n }\n"])), ClearTypedText);
|
|
31342
31342
|
var SearchUsersInput = styled__default.input(_templateObject4$7 || (_templateObject4$7 = _taggedTemplateLiteralLoose(["\n height: 40px;\n width: 100%;\n font-size: 14px;\n border: ", ";\n box-sizing: border-box;\n border-radius: 8px;\n padding-left: 36px;\n color: ", ";\n background-color: ", ";\n\n &::placeholder {\n color: ", ";\n font-size: 14px;\n opacity: 1;\n }\n\n &:focus {\n outline: none;\n }\n"])), function (props) {
|
|
@@ -31357,7 +31357,7 @@ var UserNamePresence = styled__default.div(_templateObject6$3 || (_templateObjec
|
|
|
31357
31357
|
var MemberName = styled__default.h4(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n font-style: normal;\n font-size: 15px;\n font-weight: 500;\n line-height: 16px;\n color: ", ";\n margin: 0;\n max-width: calc(100% - 10px);\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])), function (props) {
|
|
31358
31358
|
return props.color;
|
|
31359
31359
|
});
|
|
31360
|
-
var SelectedMembersContainer = styled__default.div(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: flex-start;\n flex-wrap: wrap;\n width: 100%;\n max-height: 85px;\n overflow-x: hidden;\n padding: 2px 12px 0;\n box-sizing: border-box;\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
31360
|
+
var SelectedMembersContainer = styled__default.div(_templateObject8$3 || (_templateObject8$3 = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: flex-start;\n flex-wrap: wrap;\n width: 100%;\n max-height: 85px;\n overflow-x: hidden;\n padding: 2px 12px 0;\n box-sizing: border-box;\n overflow-y: auto;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
31361
31361
|
return props.thumbColor;
|
|
31362
31362
|
});
|
|
31363
31363
|
var SelectedMemberBubble = styled__default.div(_templateObject9$2 || (_templateObject9$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n background: ", ";\n border-radius: 16px;\n align-items: center;\n padding: 4px 10px 4px 0;\n height: 28px;\n margin: 8px 8px 0 0;\n box-sizing: border-box;\n"])), function (props) {
|
|
@@ -33144,7 +33144,9 @@ var Container$7 = styled__default.div(_templateObject$i || (_templateObject$i =
|
|
|
33144
33144
|
}, function (props) {
|
|
33145
33145
|
return props.withCustomList ? '' : "\n @media " + device.laptopL + " {\n width: 400px;\n min-width: 400px;\n }\n ";
|
|
33146
33146
|
});
|
|
33147
|
-
var ChannelsList = styled__default.div(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n overflow-y: auto;\n width: 400px;\n height: 100%;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
33147
|
+
var ChannelsList = styled__default.div(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n overflow-y: auto;\n width: 400px;\n height: 100%;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n"])), function (props) {
|
|
33148
|
+
return props.thumbColor;
|
|
33149
|
+
}, function (props) {
|
|
33148
33150
|
return props.thumbColor;
|
|
33149
33151
|
});
|
|
33150
33152
|
var SearchedChannels = styled__default.div(_templateObject3$d || (_templateObject3$d = _taggedTemplateLiteralLoose(["\n height: calc(100vh - 123px);\n overflow-x: hidden;\n"])));
|
|
@@ -34993,10 +34995,12 @@ function ForwardMessagePopup(_ref2) {
|
|
|
34993
34995
|
onClick: handleForwardMessage
|
|
34994
34996
|
}, buttonText || 'Forward'))));
|
|
34995
34997
|
}
|
|
34996
|
-
var ForwardChannelsCont = styled__default.div(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n overflow-y: auto;\n margin-top: 16px;\n max-height: ", ";\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
34998
|
+
var ForwardChannelsCont = styled__default.div(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n overflow-y: auto;\n margin-top: 16px;\n max-height: ", ";\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n"])), function (props) {
|
|
34997
34999
|
return "calc(100% - " + (props.selectedChannelsHeight + 82) + "px)";
|
|
34998
35000
|
}, function (props) {
|
|
34999
35001
|
return props.thumbColor;
|
|
35002
|
+
}, function (props) {
|
|
35003
|
+
return props.thumbColor;
|
|
35000
35004
|
});
|
|
35001
35005
|
var ChannelItem = styled__default.div(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 8px 12px;\n cursor: pointer;\n border-radius: 8px;\n position: relative;\n\n ", "\n"])), function (_ref3) {
|
|
35002
35006
|
var disabled = _ref3.disabled,
|
|
@@ -39877,7 +39881,9 @@ var AllVotesPopup = function AllVotesPopup(_ref) {
|
|
|
39877
39881
|
color: textSecondary
|
|
39878
39882
|
}, "Loading...")))))));
|
|
39879
39883
|
};
|
|
39880
|
-
var VotesList = styled__default.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n max-height: 500px;\n padding: 8px 0;\n overflow-y: auto;\n overflow-x: hidden;\n padding-right: 14px;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
39884
|
+
var VotesList = styled__default.div(_templateObject$E || (_templateObject$E = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n max-height: 500px;\n padding: 8px 0;\n overflow-y: auto;\n overflow-x: hidden;\n padding-right: 14px;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n"])), function (props) {
|
|
39885
|
+
return props.thumbColor;
|
|
39886
|
+
}, function (props) {
|
|
39881
39887
|
return props.thumbColor;
|
|
39882
39888
|
});
|
|
39883
39889
|
var VoterRow = styled__default.div(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 0;\n"])));
|
|
@@ -40060,10 +40066,12 @@ var VotesResultsPopup = function VotesResultsPopup(_ref) {
|
|
|
40060
40066
|
})) === null || _poll$options$find === void 0 ? void 0 : _poll$options$find.name) || ''
|
|
40061
40067
|
})));
|
|
40062
40068
|
};
|
|
40063
|
-
var OptionsList = styled__default.div(_templateObject$F || (_templateObject$F = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n max-height: calc(554px - ", "px);\n border-radius: 10px;\n overflow-y: auto;\n overflow-x: hidden;\n width: calc(100% + 20px);\n padding-right: 14px;\n box-sizing: border-box;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
40069
|
+
var OptionsList = styled__default.div(_templateObject$F || (_templateObject$F = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n max-height: calc(554px - ", "px);\n border-radius: 10px;\n overflow-y: auto;\n overflow-x: hidden;\n width: calc(100% + 20px);\n padding-right: 14px;\n box-sizing: border-box;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n"])), function (props) {
|
|
40064
40070
|
return props.titleHeight;
|
|
40065
40071
|
}, function (props) {
|
|
40066
40072
|
return props.thumbColor;
|
|
40073
|
+
}, function (props) {
|
|
40074
|
+
return props.thumbColor;
|
|
40067
40075
|
});
|
|
40068
40076
|
var OptionBlock = styled__default.div(_templateObject2$A || (_templateObject2$A = _taggedTemplateLiteralLoose(["\n background: ", ";\n border-radius: 10px;\n border: 1px solid ", "0F; /* subtle */\n padding: 14px 16px 0 16px;\n"])), function (p) {
|
|
40069
40077
|
return p.backgroundColor;
|
|
@@ -42797,7 +42805,7 @@ var MESSAGE_ACTIONS_HOVER_DELAY = 450;
|
|
|
42797
42805
|
var MAX_SELECTED_MESSAGES = 30;
|
|
42798
42806
|
var EMOJI_POPUP_THRESHOLD = 300;
|
|
42799
42807
|
var Message$1 = function Message(_ref) {
|
|
42800
|
-
var _message$reactionTota;
|
|
42808
|
+
var _tabIsActiveRef$curre, _message$reactionTota;
|
|
42801
42809
|
var message = _ref.message,
|
|
42802
42810
|
channel = _ref.channel,
|
|
42803
42811
|
MessageActionsMenu = _ref.MessageActionsMenu,
|
|
@@ -42953,6 +42961,7 @@ var Message$1 = function Message(_ref) {
|
|
|
42953
42961
|
openedMessageMenuId = _ref.openedMessageMenuId,
|
|
42954
42962
|
_ref$tabIsActive = _ref.tabIsActive,
|
|
42955
42963
|
tabIsActive = _ref$tabIsActive === void 0 ? true : _ref$tabIsActive,
|
|
42964
|
+
tabIsActiveRef = _ref.tabIsActiveRef,
|
|
42956
42965
|
connectionStatus = _ref.connectionStatus,
|
|
42957
42966
|
messageTextFontSize = _ref.messageTextFontSize,
|
|
42958
42967
|
messageTextLineHeight = _ref.messageTextLineHeight,
|
|
@@ -42965,6 +42974,7 @@ var Message$1 = function Message(_ref) {
|
|
|
42965
42974
|
_ref$createChatOnAvat = _ref.createChatOnAvatarTap,
|
|
42966
42975
|
createChatOnAvatarTap = _ref$createChatOnAvat === void 0 ? true : _ref$createChatOnAvat,
|
|
42967
42976
|
ifLatestAndHasNotPreview = _ref.ifLatestAndHasNotPreview;
|
|
42977
|
+
var isTabActive = (_tabIsActiveRef$curre = tabIsActiveRef === null || tabIsActiveRef === void 0 ? void 0 : tabIsActiveRef.current) != null ? _tabIsActiveRef$curre : tabIsActive;
|
|
42968
42978
|
var getComparableUserId = function getComparableUserId(messageUser) {
|
|
42969
42979
|
return messageUser !== null && messageUser !== void 0 && messageUser.id ? String(messageUser.id) : 'deleted';
|
|
42970
42980
|
};
|
|
@@ -43206,14 +43216,14 @@ var Message$1 = function Message(_ref) {
|
|
|
43206
43216
|
}
|
|
43207
43217
|
if (isVisible && message.incoming && !(message.userMarkers && message.userMarkers.length && message.userMarkers.find(function (marker) {
|
|
43208
43218
|
return marker.name === MESSAGE_DELIVERY_STATUS.READ;
|
|
43209
|
-
})) && !disableAutoReadTracking &&
|
|
43219
|
+
})) && !disableAutoReadTracking && isTabActive && channel.newMessageCount && channel.newMessageCount > 0 && connectionStatus === CONNECTION_STATUS.CONNECTED) {
|
|
43210
43220
|
if (queueReadMarker) {
|
|
43211
43221
|
queueReadMarker(channel.id, message.id);
|
|
43212
43222
|
} else {
|
|
43213
43223
|
dispatch(markMessagesAsReadAC(channel.id, [message.id]));
|
|
43214
43224
|
}
|
|
43215
43225
|
}
|
|
43216
|
-
}, [dispatch, message.incoming, message.userMarkers, message.id, isVisible, channel.id, channel.newMessageCount, connectionStatus, queueReadMarker, queueDeliveredMarker, disableAutoReadTracking,
|
|
43226
|
+
}, [dispatch, message.incoming, message.userMarkers, message.id, isVisible, channel.id, channel.newMessageCount, connectionStatus, queueReadMarker, queueDeliveredMarker, disableAutoReadTracking, isTabActive]);
|
|
43217
43227
|
var handleForwardMessage = React.useCallback(function (channelIds) {
|
|
43218
43228
|
if (channelIds && channelIds.length) {
|
|
43219
43229
|
channelIds.forEach(function (channelId) {
|
|
@@ -43267,7 +43277,7 @@ var Message$1 = function Message(_ref) {
|
|
|
43267
43277
|
removeMessageFromVisibleMessagesMap(message);
|
|
43268
43278
|
}
|
|
43269
43279
|
}
|
|
43270
|
-
}, [isVisible, setLastVisibleMessageId, message.id, handleSendReadMarker, channel.isLinkedChannel, channel.lastMessage, scrollToNewMessage.scrollToBottom, dispatch, message,
|
|
43280
|
+
}, [isVisible, setLastVisibleMessageId, message.id, handleSendReadMarker, channel.isLinkedChannel, channel.lastMessage, scrollToNewMessage.scrollToBottom, dispatch, message, isTabActive]);
|
|
43271
43281
|
React.useEffect(function () {
|
|
43272
43282
|
return function () {
|
|
43273
43283
|
if (!channel.isLinkedChannel) {
|
|
@@ -43633,7 +43643,7 @@ var Message$1 = function Message(_ref) {
|
|
|
43633
43643
|
}));
|
|
43634
43644
|
};
|
|
43635
43645
|
var Message$2 = /*#__PURE__*/React__default.memo(Message$1, function (prev, next) {
|
|
43636
|
-
var _prev$prevMessage, _next$prevMessage, _prev$prevMessage2, _prev$prevMessage2$us, _next$prevMessage2, _next$prevMessage2$us, _prev$prevMessage3, _next$prevMessage3, _prev$nextMessage, _next$nextMessage, _prev$nextMessage2, _prev$nextMessage2$us, _next$nextMessage2, _next$nextMessage2$us, _prev$nextMessage3, _next$nextMessage3;
|
|
43646
|
+
var _prev$prevMessage, _next$prevMessage, _prev$prevMessage2, _prev$prevMessage2$us, _next$prevMessage2, _next$prevMessage2$us, _prev$prevMessage3, _next$prevMessage3, _prev$nextMessage, _next$nextMessage, _prev$nextMessage2, _prev$nextMessage2$us, _next$nextMessage2, _next$nextMessage2$us, _prev$nextMessage3, _next$nextMessage3, _prev$tabIsActiveRef$, _prev$tabIsActiveRef, _next$tabIsActiveRef$, _next$tabIsActiveRef;
|
|
43637
43647
|
if (prev.message.id !== next.message.id) return false;
|
|
43638
43648
|
if (prev.message.deliveryStatus !== next.message.deliveryStatus) return false;
|
|
43639
43649
|
if (prev.message.state !== next.message.state) return false;
|
|
@@ -43661,7 +43671,7 @@ var Message$2 = /*#__PURE__*/React__default.memo(Message$1, function (prev, next
|
|
|
43661
43671
|
if (prev.selectedMessagesMap !== next.selectedMessagesMap) return false;
|
|
43662
43672
|
if (prev.contactsMap !== next.contactsMap) return false;
|
|
43663
43673
|
if (prev.connectionStatus !== next.connectionStatus) return false;
|
|
43664
|
-
if (prev.tabIsActive !== next.tabIsActive) return false;
|
|
43674
|
+
if (((_prev$tabIsActiveRef$ = (_prev$tabIsActiveRef = prev.tabIsActiveRef) === null || _prev$tabIsActiveRef === void 0 ? void 0 : _prev$tabIsActiveRef.current) != null ? _prev$tabIsActiveRef$ : prev.tabIsActive) !== ((_next$tabIsActiveRef$ = (_next$tabIsActiveRef = next.tabIsActiveRef) === null || _next$tabIsActiveRef === void 0 ? void 0 : _next$tabIsActiveRef.current) != null ? _next$tabIsActiveRef$ : next.tabIsActive)) return false;
|
|
43665
43675
|
if (prev.ifLatestAndHasNotPreview !== next.ifLatestAndHasNotPreview) return false;
|
|
43666
43676
|
var prevMenuOpen = prev.openedMessageMenuId === (prev.message.id || prev.message.tid);
|
|
43667
43677
|
var nextMenuOpen = next.openedMessageMenuId === (next.message.id || next.message.tid);
|
|
@@ -43713,7 +43723,7 @@ var MessageItem = styled__default.div(_templateObject6$n || (_templateObject6$n
|
|
|
43713
43723
|
|
|
43714
43724
|
var PRELOAD_TRIGGER_PX = 5;
|
|
43715
43725
|
var PRELOAD_RESET_PX = 50;
|
|
43716
|
-
var LATEST_EDGE_GAP_PX =
|
|
43726
|
+
var LATEST_EDGE_GAP_PX = 0;
|
|
43717
43727
|
var PINNED_TO_LATEST_PX = 96;
|
|
43718
43728
|
var HIGHLIGHT_DURATION_MS = 1600;
|
|
43719
43729
|
var DEFAULT_UNREAD_VISIBILITY_THRESHOLD = 0.5;
|
|
@@ -43749,20 +43759,65 @@ var setScrollTop = function setScrollTop(container, top, behavior) {
|
|
|
43749
43759
|
}
|
|
43750
43760
|
container.scrollTop = top;
|
|
43751
43761
|
};
|
|
43762
|
+
var getMaxScrollTop = function getMaxScrollTop(container) {
|
|
43763
|
+
return Math.max(0, container.scrollHeight - container.clientHeight);
|
|
43764
|
+
};
|
|
43765
|
+
var clampScrollTopToViewport = function clampScrollTopToViewport(container, nextScrollTop) {
|
|
43766
|
+
var maxScrollTop = getMaxScrollTop(container);
|
|
43767
|
+
var minScrollTop = Math.min(LATEST_EDGE_GAP_PX, maxScrollTop);
|
|
43768
|
+
var maxVisibleScrollTop = Math.max(minScrollTop, maxScrollTop - LATEST_EDGE_GAP_PX);
|
|
43769
|
+
return Math.min(maxVisibleScrollTop, Math.max(minScrollTop, nextScrollTop));
|
|
43770
|
+
};
|
|
43771
|
+
var getHistoryEdgeScrollTop = function getHistoryEdgeScrollTop(container) {
|
|
43772
|
+
return clampScrollTopToViewport(container, LATEST_EDGE_GAP_PX);
|
|
43773
|
+
};
|
|
43774
|
+
var getLatestEdgeScrollTop = function getLatestEdgeScrollTop(container) {
|
|
43775
|
+
return clampScrollTopToViewport(container, getMaxScrollTop(container) - LATEST_EDGE_GAP_PX);
|
|
43776
|
+
};
|
|
43777
|
+
var getWheelDelta = function getWheelDelta(event, container) {
|
|
43778
|
+
if (event.deltaMode === 1) {
|
|
43779
|
+
return event.deltaY * 16;
|
|
43780
|
+
}
|
|
43781
|
+
if (event.deltaMode === 2) {
|
|
43782
|
+
return event.deltaY * container.clientHeight;
|
|
43783
|
+
}
|
|
43784
|
+
return event.deltaY;
|
|
43785
|
+
};
|
|
43786
|
+
var shouldUseFirefoxWheelInterop = function shouldUseFirefoxWheelInterop() {
|
|
43787
|
+
return typeof window !== 'undefined' && /firefox/i.test(window.navigator.userAgent);
|
|
43788
|
+
};
|
|
43752
43789
|
var scrollToLatestEdge = function scrollToLatestEdge(container, behavior) {
|
|
43753
43790
|
if (behavior === void 0) {
|
|
43754
43791
|
behavior = 'auto';
|
|
43755
43792
|
}
|
|
43756
|
-
setScrollTop(container,
|
|
43757
|
-
};
|
|
43758
|
-
var getMaxScrollTop = function getMaxScrollTop(container) {
|
|
43759
|
-
return Math.max(0, container.scrollHeight - container.clientHeight);
|
|
43793
|
+
setScrollTop(container, getLatestEdgeScrollTop(container), behavior);
|
|
43760
43794
|
};
|
|
43761
43795
|
var scrollToHistoryEdge = function scrollToHistoryEdge(container, behavior) {
|
|
43762
43796
|
if (behavior === void 0) {
|
|
43763
43797
|
behavior = 'auto';
|
|
43764
43798
|
}
|
|
43765
|
-
setScrollTop(container,
|
|
43799
|
+
setScrollTop(container, getHistoryEdgeScrollTop(container), behavior);
|
|
43800
|
+
};
|
|
43801
|
+
var getElementScrollTopInContainer = function getElementScrollTopInContainer(container, target, alignment) {
|
|
43802
|
+
if (alignment === void 0) {
|
|
43803
|
+
alignment = 'center';
|
|
43804
|
+
}
|
|
43805
|
+
var containerRect = container.getBoundingClientRect();
|
|
43806
|
+
var targetRect = target.getBoundingClientRect();
|
|
43807
|
+
var targetTop = container.scrollTop + (targetRect.top - containerRect.top);
|
|
43808
|
+
var nextScrollTop = alignment === 'start' ? targetTop : targetTop - (container.clientHeight - targetRect.height) / 2;
|
|
43809
|
+
return clampScrollTopToViewport(container, nextScrollTop);
|
|
43810
|
+
};
|
|
43811
|
+
var scrollElementInContainer = function scrollElementInContainer(container, target, options) {
|
|
43812
|
+
if (options === void 0) {
|
|
43813
|
+
options = {};
|
|
43814
|
+
}
|
|
43815
|
+
var _options = options,
|
|
43816
|
+
_options$behavior = _options.behavior,
|
|
43817
|
+
behavior = _options$behavior === void 0 ? 'auto' : _options$behavior,
|
|
43818
|
+
_options$alignment = _options.alignment,
|
|
43819
|
+
alignment = _options$alignment === void 0 ? 'center' : _options$alignment;
|
|
43820
|
+
setScrollTop(container, getElementScrollTopInContainer(container, target, alignment), behavior);
|
|
43766
43821
|
};
|
|
43767
43822
|
var scrollItemIntoView = function scrollItemIntoView(container, target, smooth, isInView, direction) {
|
|
43768
43823
|
if (isInView === void 0) {
|
|
@@ -43778,19 +43833,17 @@ var scrollItemIntoView = function scrollItemIntoView(container, target, smooth,
|
|
|
43778
43833
|
}
|
|
43779
43834
|
requestAnimationFrame(function () {
|
|
43780
43835
|
requestAnimationFrame(function () {
|
|
43781
|
-
target
|
|
43836
|
+
scrollElementInContainer(container, target, {
|
|
43782
43837
|
behavior: 'smooth',
|
|
43783
|
-
|
|
43784
|
-
inline: 'nearest'
|
|
43838
|
+
alignment: 'center'
|
|
43785
43839
|
});
|
|
43786
43840
|
});
|
|
43787
43841
|
});
|
|
43788
43842
|
return;
|
|
43789
43843
|
}
|
|
43790
|
-
target
|
|
43844
|
+
scrollElementInContainer(container, target, {
|
|
43791
43845
|
behavior: 'auto',
|
|
43792
|
-
|
|
43793
|
-
inline: 'nearest'
|
|
43846
|
+
alignment: 'center'
|
|
43794
43847
|
});
|
|
43795
43848
|
};
|
|
43796
43849
|
var getItemElement = function getItemElement(container, itemId) {
|
|
@@ -43849,7 +43902,7 @@ var isPinnedToLatest = function isPinnedToLatest(container) {
|
|
|
43849
43902
|
if (!container) {
|
|
43850
43903
|
return true;
|
|
43851
43904
|
}
|
|
43852
|
-
return container.scrollTop <= PINNED_TO_LATEST_PX;
|
|
43905
|
+
return getLatestEdgeScrollTop(container) - container.scrollTop <= PINNED_TO_LATEST_PX;
|
|
43853
43906
|
};
|
|
43854
43907
|
var getVisibilityRatio = function getVisibilityRatio(containerRect, targetRect) {
|
|
43855
43908
|
var visibleTop = Math.max(containerRect.top, targetRect.top);
|
|
@@ -43857,15 +43910,6 @@ var getVisibilityRatio = function getVisibilityRatio(containerRect, targetRect)
|
|
|
43857
43910
|
var visibleHeight = Math.max(0, visibleBottom - visibleTop);
|
|
43858
43911
|
return targetRect.height > 0 ? visibleHeight / targetRect.height : 0;
|
|
43859
43912
|
};
|
|
43860
|
-
var getWheelDelta = function getWheelDelta(event, container) {
|
|
43861
|
-
if (event.deltaMode === 1) {
|
|
43862
|
-
return event.deltaY * 16;
|
|
43863
|
-
}
|
|
43864
|
-
if (event.deltaMode === 2) {
|
|
43865
|
-
return event.deltaY * container.clientHeight;
|
|
43866
|
-
}
|
|
43867
|
-
return event.deltaY;
|
|
43868
|
-
};
|
|
43869
43913
|
var isUnreadIncomingMessage = function isUnreadIncomingMessage(message) {
|
|
43870
43914
|
var _message$userMarkers;
|
|
43871
43915
|
return message.incoming && !((_message$userMarkers = message.userMarkers) !== null && _message$userMarkers !== void 0 && _message$userMarkers.some(function (marker) {
|
|
@@ -43976,6 +44020,7 @@ function useChatController(_ref5) {
|
|
|
43976
44020
|
var historyArmTimerRef = React.useRef(null);
|
|
43977
44021
|
var latestArmTimerRef = React.useRef(null);
|
|
43978
44022
|
var pendingEdgeCheckAfterLoadRef = React.useRef(false);
|
|
44023
|
+
var lastUnreadCheckAtRef = React.useRef(0);
|
|
43979
44024
|
var _useState = React.useState(false),
|
|
43980
44025
|
isLoadingPrevious = _useState[0],
|
|
43981
44026
|
setIsLoadingPrevious = _useState[1];
|
|
@@ -44102,11 +44147,11 @@ function useChatController(_ref5) {
|
|
|
44102
44147
|
return jumpLockModeRef.current === 'latest' && (isJumping.current || Date.now() < jumpLockUntilRef.current);
|
|
44103
44148
|
}, []);
|
|
44104
44149
|
var captureWindowPreserveAnchor = React.useCallback(function () {
|
|
44105
|
-
var _restoreRef$current, _restoreRef$current2;
|
|
44106
|
-
if (
|
|
44150
|
+
var _restoreRef$current, _restoreRef$current2, _restoreRef$current3;
|
|
44151
|
+
if (isJumping.current || jumpLockModeRef.current !== null && Date.now() < jumpLockUntilRef.current) {
|
|
44107
44152
|
return;
|
|
44108
44153
|
}
|
|
44109
|
-
if (((_restoreRef$current = restoreRef.current) === null || _restoreRef$current === void 0 ? void 0 : _restoreRef$current.mode) === 'to-bottom' || ((_restoreRef$current2 = restoreRef.current) === null || _restoreRef$current2 === void 0 ? void 0 : _restoreRef$current2.mode) === 'to-bottom-smooth') {
|
|
44154
|
+
if (((_restoreRef$current = restoreRef.current) === null || _restoreRef$current === void 0 ? void 0 : _restoreRef$current.mode) === 'to-bottom' || ((_restoreRef$current2 = restoreRef.current) === null || _restoreRef$current2 === void 0 ? void 0 : _restoreRef$current2.mode) === 'to-bottom-smooth' || ((_restoreRef$current3 = restoreRef.current) === null || _restoreRef$current3 === void 0 ? void 0 : _restoreRef$current3.mode) === 'reveal-message') {
|
|
44110
44155
|
return;
|
|
44111
44156
|
}
|
|
44112
44157
|
var container = scrollRef.current;
|
|
@@ -44123,7 +44168,7 @@ function useChatController(_ref5) {
|
|
|
44123
44168
|
offsetFromTop: anchor.offsetFromTop,
|
|
44124
44169
|
sourceScrollTop: container.scrollTop
|
|
44125
44170
|
};
|
|
44126
|
-
}, [
|
|
44171
|
+
}, []);
|
|
44127
44172
|
var syncLatestState = React.useCallback(function () {
|
|
44128
44173
|
var nextIsViewingLatest = !hasNext && isPinnedToLatest(scrollRef.current);
|
|
44129
44174
|
viewIsAtLatestRef.current = nextIsViewingLatest;
|
|
@@ -44298,8 +44343,8 @@ function useChatController(_ref5) {
|
|
|
44298
44343
|
return !direction || activeRequest.direction === direction;
|
|
44299
44344
|
}, []);
|
|
44300
44345
|
var clearPreserveAnchorForRequest = React.useCallback(function (requestId) {
|
|
44301
|
-
var _restoreRef$
|
|
44302
|
-
if (((_restoreRef$
|
|
44346
|
+
var _restoreRef$current4;
|
|
44347
|
+
if (((_restoreRef$current4 = restoreRef.current) === null || _restoreRef$current4 === void 0 ? void 0 : _restoreRef$current4.mode) !== 'preserve-anchor') {
|
|
44303
44348
|
return;
|
|
44304
44349
|
}
|
|
44305
44350
|
if (requestId && restoreRef.current.requestId !== requestId) {
|
|
@@ -44458,7 +44503,6 @@ function useChatController(_ref5) {
|
|
|
44458
44503
|
try {
|
|
44459
44504
|
var _channelRef$current, _pendingLatestJumpRef, _pendingLatestJumpRef2, _channelRef$current2, _channelRef$current2$;
|
|
44460
44505
|
clearScrollIdleTimer();
|
|
44461
|
-
isJumping.current = true;
|
|
44462
44506
|
lockJumpScrolling(smooth, 'latest');
|
|
44463
44507
|
invalidateEdgeDirection('previous');
|
|
44464
44508
|
invalidateEdgeDirection('next');
|
|
@@ -44524,12 +44568,16 @@ function useChatController(_ref5) {
|
|
|
44524
44568
|
cancelAnimationFrame(jumpToLatestFrameRef.current);
|
|
44525
44569
|
}
|
|
44526
44570
|
jumpToLatestFrameRef.current = requestAnimationFrame(function () {
|
|
44571
|
+
var _restoreRef$current5, _restoreRef$current6;
|
|
44527
44572
|
jumpToLatestFrameRef.current = null;
|
|
44528
44573
|
var renderedContainer = scrollRef.current;
|
|
44529
44574
|
if (!renderedContainer) {
|
|
44530
44575
|
return;
|
|
44531
44576
|
}
|
|
44532
|
-
|
|
44577
|
+
if (((_restoreRef$current5 = restoreRef.current) === null || _restoreRef$current5 === void 0 ? void 0 : _restoreRef$current5.mode) === 'to-bottom' || ((_restoreRef$current6 = restoreRef.current) === null || _restoreRef$current6 === void 0 ? void 0 : _restoreRef$current6.mode) === 'to-bottom-smooth') {
|
|
44578
|
+
restoreRef.current = null;
|
|
44579
|
+
scrollToLatestEdge(renderedContainer, smooth ? 'smooth' : 'auto');
|
|
44580
|
+
}
|
|
44533
44581
|
});
|
|
44534
44582
|
});
|
|
44535
44583
|
} catch (e) {
|
|
@@ -44558,9 +44606,12 @@ function useChatController(_ref5) {
|
|
|
44558
44606
|
});
|
|
44559
44607
|
setTimeout(function () {
|
|
44560
44608
|
try {
|
|
44609
|
+
clearScrollIdleTimer();
|
|
44561
44610
|
clearPendingLatestJump();
|
|
44562
44611
|
var jumpId = ++currentJumpIdRef.current;
|
|
44563
|
-
|
|
44612
|
+
if (!isLoaded) {
|
|
44613
|
+
isJumping.current = true;
|
|
44614
|
+
}
|
|
44564
44615
|
invalidateEdgeDirection('previous');
|
|
44565
44616
|
invalidateEdgeDirection('next');
|
|
44566
44617
|
restoreRef.current = {
|
|
@@ -44920,26 +44971,32 @@ function useChatController(_ref5) {
|
|
|
44920
44971
|
}
|
|
44921
44972
|
}, [channel.id, clearPreserveAnchorForRequest, consumeSuppressedMessageChange, createEdgeRequestId, clearPendingLatestJump, dispatch, suppressNextMessageChange, hasNext, hasPrevious, isActiveEdgeRequestCurrent, isLoadingNext, loadNext, messages, requestDirectionalPrefetchIfNeeded]);
|
|
44922
44973
|
var handleTimelineScroll = React.useCallback(function () {
|
|
44923
|
-
var _restoreRef$
|
|
44974
|
+
var _restoreRef$current7, _restoreRef$current8;
|
|
44924
44975
|
var container = scrollRef.current;
|
|
44925
44976
|
if (!container) {
|
|
44926
44977
|
return;
|
|
44927
44978
|
}
|
|
44979
|
+
var historyEdgeScrollTop = getHistoryEdgeScrollTop(container);
|
|
44980
|
+
var latestEdgeScrollTop = getLatestEdgeScrollTop(container);
|
|
44981
|
+
var currentScrollTop = container.scrollTop;
|
|
44928
44982
|
lastScrollActivityAtRef.current = Date.now();
|
|
44929
44983
|
if (isJumping.current) {
|
|
44930
44984
|
return;
|
|
44931
44985
|
}
|
|
44986
|
+
if (currentScrollTop <= historyEdgeScrollTop + PRELOAD_TRIGGER_PX) {
|
|
44987
|
+
currentScrollTop = historyEdgeScrollTop;
|
|
44988
|
+
} else if (currentScrollTop >= latestEdgeScrollTop - PRELOAD_TRIGGER_PX) {
|
|
44989
|
+
currentScrollTop = latestEdgeScrollTop;
|
|
44990
|
+
}
|
|
44991
|
+
var distanceFromLatest = latestEdgeScrollTop - currentScrollTop;
|
|
44932
44992
|
if (Date.now() < jumpLockUntilRef.current) {
|
|
44933
|
-
if (jumpLockModeRef.current === 'latest' &&
|
|
44993
|
+
if (jumpLockModeRef.current === 'latest' && distanceFromLatest > PRELOAD_RESET_PX) {
|
|
44934
44994
|
clearJumpScrollingLock();
|
|
44935
44995
|
} else {
|
|
44936
44996
|
return;
|
|
44937
44997
|
}
|
|
44938
44998
|
}
|
|
44939
|
-
|
|
44940
|
-
setScrollTop(container, LATEST_EDGE_GAP_PX);
|
|
44941
|
-
}
|
|
44942
|
-
var pendingRestore = ((_restoreRef$current4 = restoreRef.current) === null || _restoreRef$current4 === void 0 ? void 0 : _restoreRef$current4.mode) === 'preserve-anchor' || ((_restoreRef$current5 = restoreRef.current) === null || _restoreRef$current5 === void 0 ? void 0 : _restoreRef$current5.mode) === 'preserve-anchor-window' ? restoreRef.current : null;
|
|
44999
|
+
var pendingRestore = ((_restoreRef$current7 = restoreRef.current) === null || _restoreRef$current7 === void 0 ? void 0 : _restoreRef$current7.mode) === 'preserve-anchor' || ((_restoreRef$current8 = restoreRef.current) === null || _restoreRef$current8 === void 0 ? void 0 : _restoreRef$current8.mode) === 'preserve-anchor-window' ? restoreRef.current : null;
|
|
44943
45000
|
if (pendingRestore && Math.abs(container.scrollTop - pendingRestore.sourceScrollTop) > PRESERVE_ANCHOR_SCROLL_EPSILON_PX && (pendingRestore.mode === 'preserve-anchor-window' || pendingRestore.mode === 'preserve-anchor' && isActiveEdgeRequestCurrent(pendingRestore.requestId))) {
|
|
44944
45001
|
var currentAnchor = getTopViewportAnchor(container, itemElementsRef.current);
|
|
44945
45002
|
restoreRef.current = currentAnchor ? pendingRestore.mode === 'preserve-anchor-window' ? {
|
|
@@ -44957,15 +45014,14 @@ function useChatController(_ref5) {
|
|
|
44957
45014
|
} : null;
|
|
44958
45015
|
}
|
|
44959
45016
|
syncLatestState();
|
|
44960
|
-
|
|
44961
|
-
|
|
44962
|
-
|
|
44963
|
-
|
|
44964
|
-
}
|
|
44965
|
-
var
|
|
44966
|
-
var
|
|
44967
|
-
|
|
44968
|
-
if (distanceFromHistory > PRELOAD_RESET_PX) {
|
|
45017
|
+
var now = Date.now();
|
|
45018
|
+
if (now - lastUnreadCheckAtRef.current >= 100) {
|
|
45019
|
+
lastUnreadCheckAtRef.current = now;
|
|
45020
|
+
queueVisibleUnreadCheck();
|
|
45021
|
+
}
|
|
45022
|
+
var historyTriggered = currentScrollTop <= historyEdgeScrollTop + PRELOAD_TRIGGER_PX && hasPrevious;
|
|
45023
|
+
var latestTriggered = distanceFromLatest <= PRELOAD_TRIGGER_PX && hasNext;
|
|
45024
|
+
if (currentScrollTop > historyEdgeScrollTop + PRELOAD_RESET_PX) {
|
|
44969
45025
|
if (historyArmTimerRef.current === null) {
|
|
44970
45026
|
historyArmTimerRef.current = setTimeout(function () {
|
|
44971
45027
|
historyArmTimerRef.current = null;
|
|
@@ -44974,7 +45030,7 @@ function useChatController(_ref5) {
|
|
|
44974
45030
|
}
|
|
44975
45031
|
invalidateEdgeDirection('previous');
|
|
44976
45032
|
}
|
|
44977
|
-
if (
|
|
45033
|
+
if (distanceFromLatest > PRELOAD_RESET_PX) {
|
|
44978
45034
|
if (latestArmTimerRef.current === null) {
|
|
44979
45035
|
latestArmTimerRef.current = setTimeout(function () {
|
|
44980
45036
|
latestArmTimerRef.current = null;
|
|
@@ -45047,39 +45103,45 @@ function useChatController(_ref5) {
|
|
|
45047
45103
|
handleScrollRef.current = handleTimelineScroll;
|
|
45048
45104
|
React.useEffect(function () {
|
|
45049
45105
|
var el = scrollRef.current;
|
|
45050
|
-
if (!el) {
|
|
45106
|
+
if (!el || !messages || !messages.length) {
|
|
45051
45107
|
return;
|
|
45052
45108
|
}
|
|
45053
45109
|
var onScroll = function onScroll() {
|
|
45054
|
-
|
|
45110
|
+
handleScrollRef.current();
|
|
45055
45111
|
};
|
|
45056
45112
|
el.addEventListener('scroll', onScroll, {
|
|
45057
45113
|
passive: true
|
|
45058
45114
|
});
|
|
45059
45115
|
return function () {
|
|
45060
|
-
|
|
45116
|
+
el.removeEventListener('scroll', onScroll);
|
|
45061
45117
|
};
|
|
45062
|
-
}, [channel === null || channel === void 0 ? void 0 : channel.id]);
|
|
45118
|
+
}, [channel === null || channel === void 0 ? void 0 : channel.id, messages]);
|
|
45063
45119
|
React.useEffect(function () {
|
|
45064
45120
|
var el = scrollRef.current;
|
|
45065
|
-
if (!el) {
|
|
45121
|
+
if (!el || !shouldUseFirefoxWheelInterop() || !messages.length) {
|
|
45066
45122
|
return;
|
|
45067
45123
|
}
|
|
45068
45124
|
var onWheel = function onWheel(event) {
|
|
45125
|
+
if (event.ctrlKey) {
|
|
45126
|
+
return;
|
|
45127
|
+
}
|
|
45069
45128
|
event.preventDefault();
|
|
45070
45129
|
if (isJumping.current || jumpLockModeRef.current === 'item' && Date.now() < jumpLockUntilRef.current) {
|
|
45071
45130
|
return;
|
|
45072
45131
|
}
|
|
45073
|
-
el.scrollTop
|
|
45132
|
+
var nextScrollTop = clampScrollTopToViewport(el, el.scrollTop + getWheelDelta(event, el));
|
|
45133
|
+
if (nextScrollTop !== el.scrollTop) {
|
|
45134
|
+
setScrollTop(el, nextScrollTop, 'auto');
|
|
45135
|
+
}
|
|
45074
45136
|
handleScrollRef.current();
|
|
45075
45137
|
};
|
|
45076
45138
|
el.addEventListener('wheel', onWheel, {
|
|
45077
45139
|
passive: false
|
|
45078
45140
|
});
|
|
45079
45141
|
return function () {
|
|
45080
|
-
|
|
45142
|
+
el.removeEventListener('wheel', onWheel);
|
|
45081
45143
|
};
|
|
45082
|
-
}, [channel === null || channel === void 0 ? void 0 : channel.id]);
|
|
45144
|
+
}, [channel === null || channel === void 0 ? void 0 : channel.id, messages]);
|
|
45083
45145
|
React.useEffect(function () {
|
|
45084
45146
|
var _pendingWindowLoadRef, _pendingEdgeLoadRefs$, _pendingEdgeLoadRefs$2;
|
|
45085
45147
|
if (activeChannelIdRef.current === null) {
|
|
@@ -45141,6 +45203,7 @@ function useChatController(_ref5) {
|
|
|
45141
45203
|
itemElementsRef.current.clear();
|
|
45142
45204
|
previousMessagesRef.current = [];
|
|
45143
45205
|
suppressedMessageChangesRef.current = 0;
|
|
45206
|
+
lastScrollActivityAtRef.current = 0;
|
|
45144
45207
|
pendingLatestJumpRef.current = null;
|
|
45145
45208
|
pendingEdgeCheckAfterLoadRef.current = false;
|
|
45146
45209
|
(_pendingWindowLoadRef = pendingWindowLoadRef.current) === null || _pendingWindowLoadRef === void 0 ? void 0 : _pendingWindowLoadRef.resolve({
|
|
@@ -45203,12 +45266,12 @@ function useChatController(_ref5) {
|
|
|
45203
45266
|
}
|
|
45204
45267
|
}
|
|
45205
45268
|
React.useLayoutEffect(function () {
|
|
45206
|
-
var _restoreRef$
|
|
45269
|
+
var _restoreRef$current9;
|
|
45207
45270
|
var container = scrollRef.current;
|
|
45208
45271
|
if (!container || !messages.length) {
|
|
45209
45272
|
return;
|
|
45210
45273
|
}
|
|
45211
|
-
if (((_restoreRef$
|
|
45274
|
+
if (((_restoreRef$current9 = restoreRef.current) === null || _restoreRef$current9 === void 0 ? void 0 : _restoreRef$current9.mode) === 'restore-scroll-top') {
|
|
45212
45275
|
var savedScrollTop = restoreRef.current.scrollTop;
|
|
45213
45276
|
if (!lastBootKeyRef.current) {
|
|
45214
45277
|
lastBootKeyRef.current = channel.id + ":" + getMessageLocalRef(messages[0]);
|
|
@@ -45222,9 +45285,10 @@ function useChatController(_ref5) {
|
|
|
45222
45285
|
}
|
|
45223
45286
|
if (!lastBootKeyRef.current) {
|
|
45224
45287
|
lastBootKeyRef.current = channel.id + ":" + getMessageLocalRef(messages[0]);
|
|
45288
|
+
var preservePendingHistoryEdge = pendingEdgeCheckAfterLoadRef.current && activeEdgeIntentRef.current === 'previous';
|
|
45225
45289
|
restoreRef.current = unreadScrollTo && unreadMessageId ? {
|
|
45226
45290
|
mode: 'reveal-unread-separator'
|
|
45227
|
-
} : isScrollInteractionActive() ? null : {
|
|
45291
|
+
} : preservePendingHistoryEdge ? null : isScrollInteractionActive() ? null : {
|
|
45228
45292
|
mode: 'to-bottom'
|
|
45229
45293
|
};
|
|
45230
45294
|
}
|
|
@@ -45267,10 +45331,9 @@ function useChatController(_ref5) {
|
|
|
45267
45331
|
unreadRestoreCompletedRef.current = true;
|
|
45268
45332
|
viewIsAtLatestRef.current = false;
|
|
45269
45333
|
setIsViewingLatest(false);
|
|
45270
|
-
unreadDivider
|
|
45334
|
+
scrollElementInContainer(container, unreadDivider, {
|
|
45271
45335
|
behavior: 'auto',
|
|
45272
|
-
|
|
45273
|
-
inline: 'nearest'
|
|
45336
|
+
alignment: 'center'
|
|
45274
45337
|
});
|
|
45275
45338
|
} else {
|
|
45276
45339
|
return;
|
|
@@ -45292,6 +45355,13 @@ function useChatController(_ref5) {
|
|
|
45292
45355
|
return;
|
|
45293
45356
|
}
|
|
45294
45357
|
if (restoreState.mode === 'preserve-anchor-window') {
|
|
45358
|
+
if (!hasNextMessages && getLatestEdgeScrollTop(container) - container.scrollTop <= PRELOAD_TRIGGER_PX) {
|
|
45359
|
+
restoreRef.current = null;
|
|
45360
|
+
viewIsAtLatestRef.current = true;
|
|
45361
|
+
setIsViewingLatest(true);
|
|
45362
|
+
scrollToLatestEdge(container, 'auto');
|
|
45363
|
+
return;
|
|
45364
|
+
}
|
|
45295
45365
|
var anchorElement = getItemElement(container, restoreState.itemId);
|
|
45296
45366
|
if (!anchorElement) {
|
|
45297
45367
|
return;
|
|
@@ -45301,7 +45371,7 @@ function useChatController(_ref5) {
|
|
|
45301
45371
|
var offsetDelta = anchorRect.top - containerRect.top - restoreState.offsetFromTop;
|
|
45302
45372
|
restoreRef.current = null;
|
|
45303
45373
|
if (offsetDelta !== 0) {
|
|
45304
|
-
setScrollTop(container,
|
|
45374
|
+
setScrollTop(container, clampScrollTopToViewport(container, container.scrollTop + offsetDelta), 'auto');
|
|
45305
45375
|
}
|
|
45306
45376
|
return;
|
|
45307
45377
|
}
|
|
@@ -45333,7 +45403,7 @@ function useChatController(_ref5) {
|
|
|
45333
45403
|
cachedEdgeRequestRef.current = null;
|
|
45334
45404
|
}
|
|
45335
45405
|
if (_offsetDelta !== 0) {
|
|
45336
|
-
var nextScrollTop =
|
|
45406
|
+
var nextScrollTop = clampScrollTopToViewport(container, container.scrollTop + _offsetDelta);
|
|
45337
45407
|
setScrollTop(container, nextScrollTop, 'auto');
|
|
45338
45408
|
}
|
|
45339
45409
|
}
|
|
@@ -45354,10 +45424,9 @@ function useChatController(_ref5) {
|
|
|
45354
45424
|
restoreRef.current = null;
|
|
45355
45425
|
viewIsAtLatestRef.current = false;
|
|
45356
45426
|
setIsViewingLatest(false);
|
|
45357
|
-
unreadDivider
|
|
45427
|
+
scrollElementInContainer(container, unreadDivider, {
|
|
45358
45428
|
behavior: 'auto',
|
|
45359
|
-
|
|
45360
|
-
inline: 'nearest'
|
|
45429
|
+
alignment: 'center'
|
|
45361
45430
|
});
|
|
45362
45431
|
}, [messages, unreadMessageId, unreadScrollTo]);
|
|
45363
45432
|
React.useEffect(function () {
|
|
@@ -45562,9 +45631,8 @@ function useChatController(_ref5) {
|
|
|
45562
45631
|
}) : false;
|
|
45563
45632
|
var reconnectContainer = scrollRef.current;
|
|
45564
45633
|
if (reconnectContainer) {
|
|
45565
|
-
var
|
|
45566
|
-
var
|
|
45567
|
-
var atLatestEdge = reconnectContainer.scrollTop <= PRELOAD_TRIGGER_PX + LATEST_EDGE_GAP_PX;
|
|
45634
|
+
var atHistoryEdge = reconnectContainer.scrollTop <= getHistoryEdgeScrollTop(reconnectContainer) + PRELOAD_TRIGGER_PX;
|
|
45635
|
+
var atLatestEdge = getLatestEdgeScrollTop(reconnectContainer) - reconnectContainer.scrollTop <= PRELOAD_TRIGGER_PX;
|
|
45568
45636
|
if (atHistoryEdge || atLatestEdge) {
|
|
45569
45637
|
pendingEdgeCheckAfterLoadRef.current = true;
|
|
45570
45638
|
}
|
|
@@ -46082,12 +46150,9 @@ var MessageList = function MessageList(_ref) {
|
|
|
46082
46150
|
var _useState3 = React.useState(false),
|
|
46083
46151
|
stopScrolling = _useState3[0],
|
|
46084
46152
|
setStopScrolling = _useState3[1];
|
|
46085
|
-
var _useState4 = React.useState(
|
|
46086
|
-
|
|
46087
|
-
|
|
46088
|
-
var _useState5 = React.useState(''),
|
|
46089
|
-
stickyDate = _useState5[0],
|
|
46090
|
-
setStickyDate = _useState5[1];
|
|
46153
|
+
var _useState4 = React.useState(''),
|
|
46154
|
+
stickyDate = _useState4[0],
|
|
46155
|
+
setStickyDate = _useState4[1];
|
|
46091
46156
|
var markerBatcherRef = React__default.useRef(null);
|
|
46092
46157
|
if (!markerBatcherRef.current) {
|
|
46093
46158
|
markerBatcherRef.current = createMessageMarkerBatcher({
|
|
@@ -46126,6 +46191,17 @@ var MessageList = function MessageList(_ref) {
|
|
|
46126
46191
|
isJumpingToItem = _useChatController.isJumpingToItem,
|
|
46127
46192
|
jumpToLatest = _useChatController.jumpToLatest,
|
|
46128
46193
|
jumpToItem = _useChatController.jumpToItem;
|
|
46194
|
+
var handleScrollToRepliedMessageRef = React__default.useRef(handleScrollToRepliedMessage);
|
|
46195
|
+
React.useEffect(function () {
|
|
46196
|
+
handleScrollToRepliedMessageRef.current = handleScrollToRepliedMessage;
|
|
46197
|
+
}, [handleScrollToRepliedMessage]);
|
|
46198
|
+
var stableHandleScrollToRepliedMessage = React.useCallback(function (messageId) {
|
|
46199
|
+
handleScrollToRepliedMessageRef.current(messageId);
|
|
46200
|
+
}, []);
|
|
46201
|
+
var tabIsActiveRef = React__default.useRef(browserTabIsActive);
|
|
46202
|
+
React.useEffect(function () {
|
|
46203
|
+
tabIsActiveRef.current = browserTabIsActive;
|
|
46204
|
+
}, [browserTabIsActive]);
|
|
46129
46205
|
var queueReadMarker = React.useCallback(function (channelId, messageId) {
|
|
46130
46206
|
var _markerBatcherRef$cur;
|
|
46131
46207
|
(_markerBatcherRef$cur = markerBatcherRef.current) === null || _markerBatcherRef$cur === void 0 ? void 0 : _markerBatcherRef$cur.enqueueRead(channelId, messageId);
|
|
@@ -46220,7 +46296,7 @@ var MessageList = function MessageList(_ref) {
|
|
|
46220
46296
|
var remainingMentionIds = mentionIds.filter(function (mentionId) {
|
|
46221
46297
|
return mentionId !== nextUnreadMentionId;
|
|
46222
46298
|
});
|
|
46223
|
-
|
|
46299
|
+
stableHandleScrollToRepliedMessage(nextUnreadMentionId);
|
|
46224
46300
|
dispatch(markMessagesAsReadAC(channel.id, [nextUnreadMentionId]));
|
|
46225
46301
|
dispatch(updateChannelDataAC(channel.id, {
|
|
46226
46302
|
mentionsIds: remainingMentionIds
|
|
@@ -46228,7 +46304,7 @@ var MessageList = function MessageList(_ref) {
|
|
|
46228
46304
|
if (channel.newMentionCount >= 3 && remainingMentionIds.length < 3) {
|
|
46229
46305
|
dispatch(getChannelMentionsAC(channel.id));
|
|
46230
46306
|
}
|
|
46231
|
-
}, [channel === null || channel === void 0 ? void 0 : channel.id, channel.newMentionCount, dispatch,
|
|
46307
|
+
}, [channel === null || channel === void 0 ? void 0 : channel.id, channel.newMentionCount, dispatch, isMessageRead, stableHandleScrollToRepliedMessage]);
|
|
46232
46308
|
React.useEffect(function () {
|
|
46233
46309
|
registerMessageListNavigator(jumpToItem);
|
|
46234
46310
|
return function () {
|
|
@@ -46386,7 +46462,7 @@ var MessageList = function MessageList(_ref) {
|
|
|
46386
46462
|
channel: channel,
|
|
46387
46463
|
stopScrolling: setStopScrolling,
|
|
46388
46464
|
handleMediaItemClick: handleMediaItemClickStable,
|
|
46389
|
-
handleScrollToRepliedMessage:
|
|
46465
|
+
handleScrollToRepliedMessage: stableHandleScrollToRepliedMessage,
|
|
46390
46466
|
prevMessage: prevMessage,
|
|
46391
46467
|
nextMessage: nextMessage,
|
|
46392
46468
|
isUnreadMessage: isUnreadMessage,
|
|
@@ -46503,7 +46579,7 @@ var MessageList = function MessageList(_ref) {
|
|
|
46503
46579
|
contactsMap: contactsMap,
|
|
46504
46580
|
connectionStatus: connectionStatus,
|
|
46505
46581
|
openedMessageMenuId: openedMessageMenuId,
|
|
46506
|
-
|
|
46582
|
+
tabIsActiveRef: tabIsActiveRef,
|
|
46507
46583
|
messageTextFontSize: messageTextFontSize,
|
|
46508
46584
|
messageTextLineHeight: messageTextLineHeight,
|
|
46509
46585
|
messageStatusSize: messageStatusSize,
|
|
@@ -46559,15 +46635,9 @@ var MessageList = function MessageList(_ref) {
|
|
|
46559
46635
|
"$color": iconInactive
|
|
46560
46636
|
}))), /*#__PURE__*/React__default.createElement(Container$j, {
|
|
46561
46637
|
id: 'scrollableDiv',
|
|
46562
|
-
className:
|
|
46638
|
+
className: 'show-scrollbar',
|
|
46563
46639
|
ref: scrollRef,
|
|
46564
46640
|
stopScrolling: stopScrolling,
|
|
46565
|
-
onMouseEnter: function onMouseEnter() {
|
|
46566
|
-
return setIsScrolling(true);
|
|
46567
|
-
},
|
|
46568
|
-
onMouseLeave: function onMouseLeave() {
|
|
46569
|
-
return setIsScrolling(false);
|
|
46570
|
-
},
|
|
46571
46641
|
onDragEnter: handleDragIn,
|
|
46572
46642
|
backgroundColor: backgroundColor || themeBackgroundColor,
|
|
46573
46643
|
thumbColor: surface2
|
|
@@ -46664,10 +46734,12 @@ var MessageList = function MessageList(_ref) {
|
|
|
46664
46734
|
}
|
|
46665
46735
|
})));
|
|
46666
46736
|
};
|
|
46667
|
-
var Container$j = styled__default.div(_templateObject$P || (_templateObject$P = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n
|
|
46737
|
+
var Container$j = styled__default.div(_templateObject$P || (_templateObject$P = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n background-color: ", ";\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n"])), function (props) {
|
|
46668
46738
|
return props.backgroundColor;
|
|
46669
46739
|
}, function (props) {
|
|
46670
46740
|
return props.thumbColor;
|
|
46741
|
+
}, function (props) {
|
|
46742
|
+
return props.thumbColor;
|
|
46671
46743
|
});
|
|
46672
46744
|
var JumpOverlay = styled__default.div(_templateObject2$K || (_templateObject2$K = _taggedTemplateLiteralLoose(["\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 10;\n"])));
|
|
46673
46745
|
var JumpSpinner = styled__default.div(_templateObject3$C || (_templateObject3$C = _taggedTemplateLiteralLoose(["\n width: ", "px;\n height: ", "px;\n border: 2.5px solid transparent;\n border-top-color: ", ";\n border-radius: 50%;\n animation: spin 0.7s linear infinite;\n @keyframes spin {\n to {\n transform: rotate(360deg);\n }\n }\n"])), function (props) {
|
|
@@ -46677,7 +46749,7 @@ var JumpSpinner = styled__default.div(_templateObject3$C || (_templateObject3$C
|
|
|
46677
46749
|
}, function (props) {
|
|
46678
46750
|
return props.$color || '#9EA6B0';
|
|
46679
46751
|
});
|
|
46680
|
-
var MessagesBox = styled__default.div(_templateObject4$x || (_templateObject4$x = _taggedTemplateLiteralLoose(["\n display: flex;\n
|
|
46752
|
+
var MessagesBox = styled__default.div(_templateObject4$x || (_templateObject4$x = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n width: 100%;\n margin-top: auto;\n flex-shrink: 0;\n filter: ", ";\n transition: filter 0.2s ease;\n"])), function (props) {
|
|
46681
46753
|
return props.$isJumping ? 'blur(4px)' : 'none';
|
|
46682
46754
|
});
|
|
46683
46755
|
var ScrollViewport = styled__default.div(_templateObject5$s || (_templateObject5$s = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n"])));
|
|
@@ -46718,7 +46790,7 @@ var DropAttachmentArea = styled__default.div(_templateObject9$h || (_templateObj
|
|
|
46718
46790
|
var MessageWrapper = styled__default.div(_templateObject0$g || (_templateObject0$g = _taggedTemplateLiteralLoose(["\n &.highlight {\n & .message_item {\n background-color: ", ";\n }\n }\n"])), function (props) {
|
|
46719
46791
|
return props.highlightBg || '#d5d5d5';
|
|
46720
46792
|
});
|
|
46721
|
-
var NoMessagesContainer = styled__default.div(_templateObject1$e || (_templateObject1$e = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n height: 100%;\n width: 100%;\n
|
|
46793
|
+
var NoMessagesContainer = styled__default.div(_templateObject1$e || (_templateObject1$e = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n height: 100%;\n width: 100%;\n font-weight: 400;\n font-size: 15px;\n line-height: 18px;\n letter-spacing: -0.2px;\n color: ", ";\n"])), function (props) {
|
|
46722
46794
|
return props.color;
|
|
46723
46795
|
});
|
|
46724
46796
|
var NoMessagesTitle = styled__default.h4(_templateObject10$b || (_templateObject10$b = _taggedTemplateLiteralLoose(["\n margin: 12px 0 8px;\n font-family: Inter, sans-serif;\n text-align: center;\n font-size: 20px;\n font-style: normal;\n font-weight: 500;\n line-height: 24px;\n color: ", ";\n"])), function (props) {
|
|
@@ -50123,7 +50195,9 @@ var CustomTextArea = styled__default.textarea(_templateObject2$Q || (_templateOb
|
|
|
50123
50195
|
var TextCounter = styled__default.span(_templateObject3$H || (_templateObject3$H = _taggedTemplateLiteralLoose(["\n color: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 20px;\n margin-left: auto;\n"])), function (props) {
|
|
50124
50196
|
return props.color;
|
|
50125
50197
|
});
|
|
50126
|
-
var OptionsList$1 = styled__default.div(_templateObject4$B || (_templateObject4$B = _taggedTemplateLiteralLoose(["\n max-height: 200px;\n overflow-y: auto;\n margin-top: 8px;\n padding-right: 6px;\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
50198
|
+
var OptionsList$1 = styled__default.div(_templateObject4$B || (_templateObject4$B = _taggedTemplateLiteralLoose(["\n max-height: 200px;\n overflow-y: auto;\n margin-top: 8px;\n padding-right: 6px;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n"])), function (props) {
|
|
50199
|
+
return props.thumbColor;
|
|
50200
|
+
}, function (props) {
|
|
50127
50201
|
return props.thumbColor;
|
|
50128
50202
|
});
|
|
50129
50203
|
var OptionRow = styled__default.div(_templateObject5$w || (_templateObject5$w = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 8px;\n margin-top: 8px;\n cursor: grab;\n border: ", ";\n border-radius: 6px;\n padding: 4px;\n opacity: ", ";\n"])), function (props) {
|
|
@@ -52170,7 +52244,7 @@ var MessageInputWrapper = styled__default.div(_templateObject12$6 || (_templateO
|
|
|
52170
52244
|
}, function (props) {
|
|
52171
52245
|
return props.borderRadius || '18px';
|
|
52172
52246
|
});
|
|
52173
|
-
var LexicalWrapper = styled__default.div(_templateObject13$5 || (_templateObject13$5 = _taggedTemplateLiteralLoose(["\n position: relative;\n width: 100%;\n\n & .rich_text_editor {\n width: 100%;\n max-height: 80px;\n min-height: 20px;\n display: block;\n border: none;\n box-sizing: border-box;\n outline: none !important;\n border-radius: ", ";\n background-color: ", ";\n padding: ", ";\n color: ", ";\n order: ", ";\n overflow-y: auto;\n overflow-x: hidden;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n & p {\n font-size: 15px;\n line-height: 20px;\n color: ", ";\n }\n\n &::selection {\n background-color: ", ";\n }\n\n & *::selection {\n background-color: ", ";\n }\n\n & span::selection {\n background-color: ", ";\n }\n\n &:empty:before {\n content: attr(data-placeholder);\n }\n\n & .content_editable_input {\n border: none !important;\n outline: none !important;\n }\n\n & .mention {\n color: ", ";\n background-color: inherit !important;\n user-modify: read-only;\n }\n\n & span.bold {\n font-weight: bold;\n }\n\n & .editor_paragraph {\n margin: 0;\n }\n\n & .text_bold {\n font-weight: 600;\n }\n\n & .text_italic {\n font-style: italic;\n }\n\n & .text_underline {\n text-decoration: underline;\n }\n\n & .text_strikethrough {\n text-decoration: line-through;\n }\n\n & .text_underlineStrikethrough {\n text-decoration: underline line-through;\n }\n\n & code {\n font-family: inherit;\n letter-spacing: 4px;\n }\n }\n"])), function (props) {
|
|
52247
|
+
var LexicalWrapper = styled__default.div(_templateObject13$5 || (_templateObject13$5 = _taggedTemplateLiteralLoose(["\n position: relative;\n width: 100%;\n\n & .rich_text_editor {\n width: 100%;\n max-height: 80px;\n min-height: 20px;\n display: block;\n border: none;\n box-sizing: border-box;\n outline: none !important;\n border-radius: ", ";\n background-color: ", ";\n padding: ", ";\n color: ", ";\n order: ", ";\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n\n & p {\n font-size: 15px;\n line-height: 20px;\n color: ", ";\n }\n\n &::selection {\n background-color: ", ";\n }\n\n & *::selection {\n background-color: ", ";\n }\n\n & span::selection {\n background-color: ", ";\n }\n\n &:empty:before {\n content: attr(data-placeholder);\n }\n\n & .content_editable_input {\n border: none !important;\n outline: none !important;\n }\n\n & .mention {\n color: ", ";\n background-color: inherit !important;\n user-modify: read-only;\n }\n\n & span.bold {\n font-weight: bold;\n }\n\n & .editor_paragraph {\n margin: 0;\n }\n\n & .text_bold {\n font-weight: 600;\n }\n\n & .text_italic {\n font-style: italic;\n }\n\n & .text_underline {\n text-decoration: underline;\n }\n\n & .text_strikethrough {\n text-decoration: line-through;\n }\n\n & .text_underlineStrikethrough {\n text-decoration: underline line-through;\n }\n\n & code {\n font-family: inherit;\n letter-spacing: 4px;\n }\n }\n"])), function (props) {
|
|
52174
52248
|
return props.borderRadius;
|
|
52175
52249
|
}, function (props) {
|
|
52176
52250
|
return props.backgroundColor;
|
|
@@ -52182,6 +52256,8 @@ var LexicalWrapper = styled__default.div(_templateObject13$5 || (_templateObject
|
|
|
52182
52256
|
return props.order === 0 || props.order ? props.order : 1;
|
|
52183
52257
|
}, function (props) {
|
|
52184
52258
|
return props.thumbColor;
|
|
52259
|
+
}, function (props) {
|
|
52260
|
+
return props.thumbColor;
|
|
52185
52261
|
}, function (props) {
|
|
52186
52262
|
return props.color;
|
|
52187
52263
|
}, function (props) {
|
|
@@ -53017,7 +53093,9 @@ var GroupsInCommonPopup = function GroupsInCommonPopup(_ref2) {
|
|
|
53017
53093
|
color: textSecondary
|
|
53018
53094
|
}, "Loading more...")))));
|
|
53019
53095
|
};
|
|
53020
|
-
var ChannelsList$1 = styled__default.div(_templateObject$Z || (_templateObject$Z = _taggedTemplateLiteralLoose(["\n max-height: 400px;\n overflow-y: auto;\n overflow-x: hidden;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
53096
|
+
var ChannelsList$1 = styled__default.div(_templateObject$Z || (_templateObject$Z = _taggedTemplateLiteralLoose(["\n max-height: 400px;\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n"])), function (props) {
|
|
53097
|
+
return props.thumbColor;
|
|
53098
|
+
}, function (props) {
|
|
53021
53099
|
return props.thumbColor;
|
|
53022
53100
|
});
|
|
53023
53101
|
var ChannelItem$1 = styled__default.div(_templateObject2$U || (_templateObject2$U = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 6px 2px 6px 6px;\n border-radius: 8px;\n cursor: pointer;\n transition: background-color 0.2s;\n\n &:hover {\n background-color: ", ";\n }\n"])), function (props) {
|
|
@@ -56362,7 +56440,7 @@ var Container$v = styled__default.div(_templateObject$1a || (_templateObject$1a
|
|
|
56362
56440
|
var ChannelDetailsHeader = styled__default.div(_templateObject2$15 || (_templateObject2$15 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n padding: 16px;\n position: relative;\n height: 64px;\n box-sizing: border-box;\n border-bottom: 1px solid ", ";\n\n & svg {\n cursor: pointer;\n }\n"])), function (props) {
|
|
56363
56441
|
return props.borderColor;
|
|
56364
56442
|
});
|
|
56365
|
-
var ChatDetails = styled__default.div(_templateObject3$X || (_templateObject3$X = _taggedTemplateLiteralLoose(["\n //position: relative;\n width: ", ";\n //height: ", ";\n height: ", ";\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n"])), function (props) {
|
|
56443
|
+
var ChatDetails = styled__default.div(_templateObject3$X || (_templateObject3$X = _taggedTemplateLiteralLoose(["\n //position: relative;\n width: ", ";\n //height: ", ";\n height: ", ";\n overflow-y: auto;\n scrollbar-width: none;\n scrollbar-color: transparent transparent;\n overscroll-behavior: none;\n\n @supports (overflow: overlay) {\n overflow-y: overlay;\n }\n\n &::-webkit-scrollbar {\n width: 8px;\n background: transparent;\n }\n &::-webkit-scrollbar-thumb {\n background: transparent;\n }\n\n &.show-scrollbar::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 4px;\n }\n &.show-scrollbar::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &.show-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: ", " transparent;\n }\n"])), function (props) {
|
|
56366
56444
|
return props.size === 'small' ? '300px' : props.size === 'medium' ? '350px' : '400px';
|
|
56367
56445
|
}, function (props) {
|
|
56368
56446
|
return props.height ? "calc(100vh - " + props.heightOffset + "px)" : '100vh';
|
|
@@ -56370,6 +56448,8 @@ var ChatDetails = styled__default.div(_templateObject3$X || (_templateObject3$X
|
|
|
56370
56448
|
return props.height && props.height - (props.heightOffset ? props.heightOffset + 2 : 0) + "px";
|
|
56371
56449
|
}, function (props) {
|
|
56372
56450
|
return props.thumbColor;
|
|
56451
|
+
}, function (props) {
|
|
56452
|
+
return props.thumbColor;
|
|
56373
56453
|
});
|
|
56374
56454
|
var AboutChannel = styled__default.div(_templateObject4$N || (_templateObject4$N = _taggedTemplateLiteralLoose(["\n margin-top: 20px;\n"])));
|
|
56375
56455
|
var AboutChannelTitle = styled__default.h4(_templateObject5$H || (_templateObject5$H = _taggedTemplateLiteralLoose(["\n font-size: 12px;\n margin: 0;\n line-height: 16px;\n color: ", ";\n"])), function (props) {
|