sceyt-chat-react-uikit 1.9.0-beta.14 → 1.9.0-beta.15
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 +9 -8
- package/index.modern.js +9 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -42593,7 +42593,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
42593
42593
|
};
|
|
42594
42594
|
var handleClicks = React.useCallback(function (e) {
|
|
42595
42595
|
var target = e.target;
|
|
42596
|
-
if (!target.closest('.
|
|
42596
|
+
if (!target.closest('.slider-preview-media, .custom_video_player, .custom_carousel_arrow')) {
|
|
42597
42597
|
if (currentFileType === 'image') {
|
|
42598
42598
|
log.info('[MEDIA_IMAGE_SLIDER] outside click closing slider ' + JSON.stringify({
|
|
42599
42599
|
channelId: channel.id,
|
|
@@ -43030,6 +43030,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
43030
43030
|
})))), isItemLoading(file.id) && file.type === 'image' && (/*#__PURE__*/React__default.createElement(ItemLoadingCont, null, /*#__PURE__*/React__default.createElement(UploadingIcon, {
|
|
43031
43031
|
color: textOnPrimary
|
|
43032
43032
|
}))), file.type === 'image' ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, ((file.id === (currentFile === null || currentFile === void 0 ? void 0 : currentFile.id) ? currentAttachmentUrl : undefined) || attachmentUpdatedMap[getAttachmentURLWithVersion(file.url + '_original_image_url')] || getMediaThumbnailSource(file)) && (/*#__PURE__*/React__default.createElement("img", {
|
|
43033
|
+
className: 'slider-preview-media',
|
|
43033
43034
|
loading: 'eager',
|
|
43034
43035
|
decoding: 'async',
|
|
43035
43036
|
draggable: false,
|
|
@@ -43144,7 +43145,7 @@ var IconWrapper = styled__default.span(_templateObject10$7 || (_templateObject10
|
|
|
43144
43145
|
}, function (props) {
|
|
43145
43146
|
return props.hideInMobile && "\n @media (max-width: 550px) {\n display: none;\n }\n ";
|
|
43146
43147
|
});
|
|
43147
|
-
var CarouselItem$1 = styled__default.div(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n width: calc(100% - 200px);\n height: calc(100% - 80px);\n max-width: calc(100% - 200px);\n max-height: calc(100vh - 140px);\n align-items: center;\n justify-content: center;\n z-index: 2;\n\n img,\n video {\n
|
|
43148
|
+
var CarouselItem$1 = styled__default.div(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n width: calc(100% - 200px);\n height: calc(100% - 80px);\n max-width: calc(100% - 200px);\n max-height: calc(100vh - 140px);\n align-items: center;\n justify-content: center;\n z-index: 2;\n\n img,\n video {\n height: 100%;\n min-width: 0;\n min-height: 0;\n object-fit: contain;\n @media (max-width: 480px) {\n width: 100%;\n }\n }\n @media (max-width: 480px) {\n width: calc(100% - 100px);\n height: calc(100% - 48px);\n max-width: calc(100% - 100px);\n }\n\n img {\n display: block;\n }\n"])));
|
|
43148
43149
|
var UploadCont$1 = styled__default.div(_templateObject12$5 || (_templateObject12$5 = _taggedTemplateLiteralLoose(["\n left: calc((100vw - 100%) / -2);\n top: calc((100vh - 100%) / -2);\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n z-index: 1;\n"])));
|
|
43149
43150
|
var ItemLoadingCont = styled__default.div(_templateObject13$5 || (_templateObject13$5 = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: calc((100vw - 100%) / -2);\n top: calc((100vh - 100% + 60px) / -2);\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n"])));
|
|
43150
43151
|
var ArrowButton = styled__default.button(_templateObject14$5 || (_templateObject14$5 = _taggedTemplateLiteralLoose(["\n min-width: 60px;\n max-width: 60px;\n height: 60px;\n margin-right: ", ";\n margin-left: ", ";\n border: none;\n color: ", ";\n background: transparent;\n box-sizing: border-box;\n border-radius: 50%;\n line-height: 1px;\n align-self: center;\n outline: none;\n cursor: pointer;\n visibility: ", ";\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: ", ";\n right: ", ";\n & > svg {\n width: 40px;\n height: 40px;\n }\n @media (max-width: 768px) {\n min-width: 36px;\n max-width: 36px;\n height: 36px;\n margin-right: ", ";\n margin-left: ", ";\n\n & > svg {\n width: 22px;\n height: 22px;\n }\n }\n @media (max-width: 450px) {\n min-width: 32px;\n max-width: 32px;\n height: 32px;\n\n & > svg {\n width: 20px;\n height: 20px;\n }\n }\n"])), function (props) {
|
|
@@ -51080,8 +51081,8 @@ var Message$1 = function Message(_ref) {
|
|
|
51080
51081
|
var prevMessageUserID = prevMessage ? getComparableUserId(prevMessage.user) : null;
|
|
51081
51082
|
var current = moment(message.createdAt).startOf('day');
|
|
51082
51083
|
var firstMessageInInterval = React.useMemo(function () {
|
|
51083
|
-
return ifLatestAndHasNotPreview || !(prevMessage && current.diff(moment(prevMessage.createdAt).startOf('day'), 'days') === 0) || (prevMessage === null || prevMessage === void 0 ? void 0 : prevMessage.type) === exports.MESSAGE_TYPE.SYSTEM || unreadMessageId === prevMessage.id;
|
|
51084
|
-
}, [prevMessage, unreadMessageId, ifLatestAndHasNotPreview]);
|
|
51084
|
+
return ifLatestAndHasNotPreview || !isPinnedMessagesList && !(prevMessage && current.diff(moment(prevMessage.createdAt).startOf('day'), 'days') === 0) || (prevMessage === null || prevMessage === void 0 ? void 0 : prevMessage.type) === exports.MESSAGE_TYPE.SYSTEM || unreadMessageId === (prevMessage === null || prevMessage === void 0 ? void 0 : prevMessage.id);
|
|
51085
|
+
}, [prevMessage, unreadMessageId, ifLatestAndHasNotPreview, isPinnedMessagesList]);
|
|
51085
51086
|
var nextMessageUserID = nextMessage ? getComparableUserId(nextMessage.user) : null;
|
|
51086
51087
|
var nextDay = nextMessage ? moment(nextMessage.createdAt).startOf('day') : null;
|
|
51087
51088
|
var nextMessageFirstInInterval = !nextMessage || nextDay !== null && nextDay.diff(current, 'days') !== 0 || nextMessage.type === exports.MESSAGE_TYPE.SYSTEM || nextMessageStartsUnreadSection;
|
|
@@ -51457,8 +51458,8 @@ var Message$1 = function Message(_ref) {
|
|
|
51457
51458
|
if (!nextMessage || nextMessage.type === exports.MESSAGE_TYPE.SYSTEM) {
|
|
51458
51459
|
spacingBottom = '';
|
|
51459
51460
|
} else if (nextMessageStartsUnreadSection) {
|
|
51460
|
-
spacingBottom = differentUserMessageSpacing || '16px';
|
|
51461
|
-
} else if (nextMessageUserID && (nextMessageUserID !== messageUserID || nextMessageFirstInInterval)) {
|
|
51461
|
+
spacingBottom = isPinnedMessagesList ? '0' : differentUserMessageSpacing || '16px';
|
|
51462
|
+
} else if (nextMessageUserID && (nextMessageUserID !== messageUserID || nextMessageFirstInInterval && !isPinnedMessagesList)) {
|
|
51462
51463
|
spacingBottom = differentUserMessageSpacing || '16px';
|
|
51463
51464
|
}
|
|
51464
51465
|
spacingTop = sameUserMessageSpacing || '6px';
|
|
@@ -51471,7 +51472,7 @@ var Message$1 = function Message(_ref) {
|
|
|
51471
51472
|
bottom: reactionsMargin || spacingBottom,
|
|
51472
51473
|
top: spacingTop
|
|
51473
51474
|
};
|
|
51474
|
-
}, [nextMessageUserID, messageUserID, nextMessageFirstInInterval, (_message$reactionTota = message.reactionTotals) === null || _message$reactionTota === void 0 ? void 0 : _message$reactionTota.length]);
|
|
51475
|
+
}, [nextMessageUserID, isPinnedMessagesList, messageUserID, nextMessageFirstInInterval, (_message$reactionTota = message.reactionTotals) === null || _message$reactionTota === void 0 ? void 0 : _message$reactionTota.length]);
|
|
51475
51476
|
return /*#__PURE__*/React__default.createElement(MessageItem, {
|
|
51476
51477
|
className: 'message_item',
|
|
51477
51478
|
rtl: ownMessageOnRightSide && !message.incoming,
|
|
@@ -52957,7 +52958,7 @@ var MessageList = function MessageList(_ref) {
|
|
|
52957
52958
|
isUnreadMessage: false,
|
|
52958
52959
|
nextMessageStartsUnreadSection: false,
|
|
52959
52960
|
isHighlighted: false,
|
|
52960
|
-
ifLatestAndHasNotPreview:
|
|
52961
|
+
ifLatestAndHasNotPreview: index === 0,
|
|
52961
52962
|
registerInMessagesIndex: false,
|
|
52962
52963
|
isPinnedMessagesList: true
|
|
52963
52964
|
});
|
package/index.modern.js
CHANGED
|
@@ -42573,7 +42573,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
42573
42573
|
};
|
|
42574
42574
|
var handleClicks = useCallback(function (e) {
|
|
42575
42575
|
var target = e.target;
|
|
42576
|
-
if (!target.closest('.
|
|
42576
|
+
if (!target.closest('.slider-preview-media, .custom_video_player, .custom_carousel_arrow')) {
|
|
42577
42577
|
if (currentFileType === 'image') {
|
|
42578
42578
|
log.info('[MEDIA_IMAGE_SLIDER] outside click closing slider ' + JSON.stringify({
|
|
42579
42579
|
channelId: channel.id,
|
|
@@ -43010,6 +43010,7 @@ var SliderPopup = function SliderPopup(_ref) {
|
|
|
43010
43010
|
})))), isItemLoading(file.id) && file.type === 'image' && (/*#__PURE__*/React__default.createElement(ItemLoadingCont, null, /*#__PURE__*/React__default.createElement(UploadingIcon, {
|
|
43011
43011
|
color: textOnPrimary
|
|
43012
43012
|
}))), file.type === 'image' ? (/*#__PURE__*/React__default.createElement(React__default.Fragment, null, ((file.id === (currentFile === null || currentFile === void 0 ? void 0 : currentFile.id) ? currentAttachmentUrl : undefined) || attachmentUpdatedMap[getAttachmentURLWithVersion(file.url + '_original_image_url')] || getMediaThumbnailSource(file)) && (/*#__PURE__*/React__default.createElement("img", {
|
|
43013
|
+
className: 'slider-preview-media',
|
|
43013
43014
|
loading: 'eager',
|
|
43014
43015
|
decoding: 'async',
|
|
43015
43016
|
draggable: false,
|
|
@@ -43124,7 +43125,7 @@ var IconWrapper = styled.span(_templateObject10$7 || (_templateObject10$7 = _tag
|
|
|
43124
43125
|
}, function (props) {
|
|
43125
43126
|
return props.hideInMobile && "\n @media (max-width: 550px) {\n display: none;\n }\n ";
|
|
43126
43127
|
});
|
|
43127
|
-
var CarouselItem$1 = styled.div(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n width: calc(100% - 200px);\n height: calc(100% - 80px);\n max-width: calc(100% - 200px);\n max-height: calc(100vh - 140px);\n align-items: center;\n justify-content: center;\n z-index: 2;\n\n img,\n video {\n
|
|
43128
|
+
var CarouselItem$1 = styled.div(_templateObject11$6 || (_templateObject11$6 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n width: calc(100% - 200px);\n height: calc(100% - 80px);\n max-width: calc(100% - 200px);\n max-height: calc(100vh - 140px);\n align-items: center;\n justify-content: center;\n z-index: 2;\n\n img,\n video {\n height: 100%;\n min-width: 0;\n min-height: 0;\n object-fit: contain;\n @media (max-width: 480px) {\n width: 100%;\n }\n }\n @media (max-width: 480px) {\n width: calc(100% - 100px);\n height: calc(100% - 48px);\n max-width: calc(100% - 100px);\n }\n\n img {\n display: block;\n }\n"])));
|
|
43128
43129
|
var UploadCont$1 = styled.div(_templateObject12$5 || (_templateObject12$5 = _taggedTemplateLiteralLoose(["\n left: calc((100vw - 100%) / -2);\n top: calc((100vh - 100%) / -2);\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n z-index: 1;\n"])));
|
|
43129
43130
|
var ItemLoadingCont = styled.div(_templateObject13$5 || (_templateObject13$5 = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: calc((100vw - 100%) / -2);\n top: calc((100vh - 100% + 60px) / -2);\n width: 100vw;\n height: 100vh;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n"])));
|
|
43130
43131
|
var ArrowButton = styled.button(_templateObject14$5 || (_templateObject14$5 = _taggedTemplateLiteralLoose(["\n min-width: 60px;\n max-width: 60px;\n height: 60px;\n margin-right: ", ";\n margin-left: ", ";\n border: none;\n color: ", ";\n background: transparent;\n box-sizing: border-box;\n border-radius: 50%;\n line-height: 1px;\n align-self: center;\n outline: none;\n cursor: pointer;\n visibility: ", ";\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: ", ";\n right: ", ";\n & > svg {\n width: 40px;\n height: 40px;\n }\n @media (max-width: 768px) {\n min-width: 36px;\n max-width: 36px;\n height: 36px;\n margin-right: ", ";\n margin-left: ", ";\n\n & > svg {\n width: 22px;\n height: 22px;\n }\n }\n @media (max-width: 450px) {\n min-width: 32px;\n max-width: 32px;\n height: 32px;\n\n & > svg {\n width: 20px;\n height: 20px;\n }\n }\n"])), function (props) {
|
|
@@ -51060,8 +51061,8 @@ var Message$1 = function Message(_ref) {
|
|
|
51060
51061
|
var prevMessageUserID = prevMessage ? getComparableUserId(prevMessage.user) : null;
|
|
51061
51062
|
var current = moment(message.createdAt).startOf('day');
|
|
51062
51063
|
var firstMessageInInterval = useMemo(function () {
|
|
51063
|
-
return ifLatestAndHasNotPreview || !(prevMessage && current.diff(moment(prevMessage.createdAt).startOf('day'), 'days') === 0) || (prevMessage === null || prevMessage === void 0 ? void 0 : prevMessage.type) === MESSAGE_TYPE.SYSTEM || unreadMessageId === prevMessage.id;
|
|
51064
|
-
}, [prevMessage, unreadMessageId, ifLatestAndHasNotPreview]);
|
|
51064
|
+
return ifLatestAndHasNotPreview || !isPinnedMessagesList && !(prevMessage && current.diff(moment(prevMessage.createdAt).startOf('day'), 'days') === 0) || (prevMessage === null || prevMessage === void 0 ? void 0 : prevMessage.type) === MESSAGE_TYPE.SYSTEM || unreadMessageId === (prevMessage === null || prevMessage === void 0 ? void 0 : prevMessage.id);
|
|
51065
|
+
}, [prevMessage, unreadMessageId, ifLatestAndHasNotPreview, isPinnedMessagesList]);
|
|
51065
51066
|
var nextMessageUserID = nextMessage ? getComparableUserId(nextMessage.user) : null;
|
|
51066
51067
|
var nextDay = nextMessage ? moment(nextMessage.createdAt).startOf('day') : null;
|
|
51067
51068
|
var nextMessageFirstInInterval = !nextMessage || nextDay !== null && nextDay.diff(current, 'days') !== 0 || nextMessage.type === MESSAGE_TYPE.SYSTEM || nextMessageStartsUnreadSection;
|
|
@@ -51437,8 +51438,8 @@ var Message$1 = function Message(_ref) {
|
|
|
51437
51438
|
if (!nextMessage || nextMessage.type === MESSAGE_TYPE.SYSTEM) {
|
|
51438
51439
|
spacingBottom = '';
|
|
51439
51440
|
} else if (nextMessageStartsUnreadSection) {
|
|
51440
|
-
spacingBottom = differentUserMessageSpacing || '16px';
|
|
51441
|
-
} else if (nextMessageUserID && (nextMessageUserID !== messageUserID || nextMessageFirstInInterval)) {
|
|
51441
|
+
spacingBottom = isPinnedMessagesList ? '0' : differentUserMessageSpacing || '16px';
|
|
51442
|
+
} else if (nextMessageUserID && (nextMessageUserID !== messageUserID || nextMessageFirstInInterval && !isPinnedMessagesList)) {
|
|
51442
51443
|
spacingBottom = differentUserMessageSpacing || '16px';
|
|
51443
51444
|
}
|
|
51444
51445
|
spacingTop = sameUserMessageSpacing || '6px';
|
|
@@ -51451,7 +51452,7 @@ var Message$1 = function Message(_ref) {
|
|
|
51451
51452
|
bottom: reactionsMargin || spacingBottom,
|
|
51452
51453
|
top: spacingTop
|
|
51453
51454
|
};
|
|
51454
|
-
}, [nextMessageUserID, messageUserID, nextMessageFirstInInterval, (_message$reactionTota = message.reactionTotals) === null || _message$reactionTota === void 0 ? void 0 : _message$reactionTota.length]);
|
|
51455
|
+
}, [nextMessageUserID, isPinnedMessagesList, messageUserID, nextMessageFirstInInterval, (_message$reactionTota = message.reactionTotals) === null || _message$reactionTota === void 0 ? void 0 : _message$reactionTota.length]);
|
|
51455
51456
|
return /*#__PURE__*/React__default.createElement(MessageItem, {
|
|
51456
51457
|
className: 'message_item',
|
|
51457
51458
|
rtl: ownMessageOnRightSide && !message.incoming,
|
|
@@ -52937,7 +52938,7 @@ var MessageList = function MessageList(_ref) {
|
|
|
52937
52938
|
isUnreadMessage: false,
|
|
52938
52939
|
nextMessageStartsUnreadSection: false,
|
|
52939
52940
|
isHighlighted: false,
|
|
52940
|
-
ifLatestAndHasNotPreview:
|
|
52941
|
+
ifLatestAndHasNotPreview: index === 0,
|
|
52941
52942
|
registerInMessagesIndex: false,
|
|
52942
52943
|
isPinnedMessagesList: true
|
|
52943
52944
|
});
|