sceyt-chat-react-uikit 1.7.4-beta.8 → 1.7.4-beta.9
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 +7 -2
- package/index.modern.js +7 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -32914,6 +32914,11 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
32914
32914
|
var attachmentMetas = React.useMemo(function () {
|
|
32915
32915
|
return mediaAttachment && (isJSON(mediaAttachment.metadata) ? JSON.parse(mediaAttachment.metadata) : mediaAttachment.metadata);
|
|
32916
32916
|
}, [mediaAttachment]);
|
|
32917
|
+
var fileAttachment = React.useMemo(function () {
|
|
32918
|
+
return message.attachments.find(function (attachment) {
|
|
32919
|
+
return attachment.type === attachmentTypes.file;
|
|
32920
|
+
});
|
|
32921
|
+
}, [message.attachments]);
|
|
32917
32922
|
var borderRadius = React.useMemo(function () {
|
|
32918
32923
|
return message.incoming && (incomingMessageStyles === null || incomingMessageStyles === void 0 ? void 0 : incomingMessageStyles.background) === 'inherit' ? '0px' : !message.incoming && (outgoingMessageStyles === null || outgoingMessageStyles === void 0 ? void 0 : outgoingMessageStyles.background) === 'inherit' ? '0px' : !message.incoming && ownMessageOnRightSide ? prevMessageUserID !== messageUserID || firstMessageInInterval ? '16px 16px 4px 16px' : nextMessageUserID !== messageUserID || lastMessageInInterval ? '16px 4px 16px 16px' : '16px 4px 4px 16px' : prevMessageUserID !== messageUserID || firstMessageInInterval ? '16px 16px 16px 4px' : nextMessageUserID !== messageUserID || lastMessageInInterval ? '4px 16px 16px 16px' : '4px 16px 16px 4px';
|
|
32919
32924
|
}, [message.incoming, incomingMessageStyles === null || incomingMessageStyles === void 0 ? void 0 : incomingMessageStyles.background, outgoingMessageStyles === null || outgoingMessageStyles === void 0 ? void 0 : outgoingMessageStyles.background, prevMessageUserID, messageUserID, firstMessageInInterval, nextMessageUserID, lastMessageInInterval, ownMessageOnRightSide]);
|
|
@@ -33088,7 +33093,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
33088
33093
|
linkColor: linkColor,
|
|
33089
33094
|
unsupportedMessage: unsupportedMessage,
|
|
33090
33095
|
unsupportedMessageColor: textSecondary
|
|
33091
|
-
}, ogContainerFirst && linkAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
33096
|
+
}, ogContainerFirst && linkAttachment && !mediaAttachment && !withMediaAttachment && !fileAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
33092
33097
|
maxWidth: (ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxWidth) || 400,
|
|
33093
33098
|
maxHeight: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxHeight,
|
|
33094
33099
|
attachments: [linkAttachment],
|
|
@@ -33124,7 +33129,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
33124
33129
|
unsupportedMessage: unsupportedMessage
|
|
33125
33130
|
})), !withAttachments && message.state === MESSAGE_STATUS.DELETE ? (/*#__PURE__*/React__default.createElement(MessageStatusDeleted$1, {
|
|
33126
33131
|
color: textSecondary
|
|
33127
|
-
}, " Message was deleted. ")) : '', !ogContainerFirst && linkAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
33132
|
+
}, " Message was deleted. ")) : '', !ogContainerFirst && linkAttachment && !mediaAttachment && !withMediaAttachment && !fileAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
33128
33133
|
maxWidth: (ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxWidth) || 400,
|
|
33129
33134
|
maxHeight: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxHeight,
|
|
33130
33135
|
attachments: [linkAttachment],
|
package/index.modern.js
CHANGED
|
@@ -32913,6 +32913,11 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
32913
32913
|
var attachmentMetas = useMemo(function () {
|
|
32914
32914
|
return mediaAttachment && (isJSON(mediaAttachment.metadata) ? JSON.parse(mediaAttachment.metadata) : mediaAttachment.metadata);
|
|
32915
32915
|
}, [mediaAttachment]);
|
|
32916
|
+
var fileAttachment = useMemo(function () {
|
|
32917
|
+
return message.attachments.find(function (attachment) {
|
|
32918
|
+
return attachment.type === attachmentTypes.file;
|
|
32919
|
+
});
|
|
32920
|
+
}, [message.attachments]);
|
|
32916
32921
|
var borderRadius = useMemo(function () {
|
|
32917
32922
|
return message.incoming && (incomingMessageStyles === null || incomingMessageStyles === void 0 ? void 0 : incomingMessageStyles.background) === 'inherit' ? '0px' : !message.incoming && (outgoingMessageStyles === null || outgoingMessageStyles === void 0 ? void 0 : outgoingMessageStyles.background) === 'inherit' ? '0px' : !message.incoming && ownMessageOnRightSide ? prevMessageUserID !== messageUserID || firstMessageInInterval ? '16px 16px 4px 16px' : nextMessageUserID !== messageUserID || lastMessageInInterval ? '16px 4px 16px 16px' : '16px 4px 4px 16px' : prevMessageUserID !== messageUserID || firstMessageInInterval ? '16px 16px 16px 4px' : nextMessageUserID !== messageUserID || lastMessageInInterval ? '4px 16px 16px 16px' : '4px 16px 16px 4px';
|
|
32918
32923
|
}, [message.incoming, incomingMessageStyles === null || incomingMessageStyles === void 0 ? void 0 : incomingMessageStyles.background, outgoingMessageStyles === null || outgoingMessageStyles === void 0 ? void 0 : outgoingMessageStyles.background, prevMessageUserID, messageUserID, firstMessageInInterval, nextMessageUserID, lastMessageInInterval, ownMessageOnRightSide]);
|
|
@@ -33087,7 +33092,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
33087
33092
|
linkColor: linkColor,
|
|
33088
33093
|
unsupportedMessage: unsupportedMessage,
|
|
33089
33094
|
unsupportedMessageColor: textSecondary
|
|
33090
|
-
}, ogContainerFirst && linkAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
33095
|
+
}, ogContainerFirst && linkAttachment && !mediaAttachment && !withMediaAttachment && !fileAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
33091
33096
|
maxWidth: (ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxWidth) || 400,
|
|
33092
33097
|
maxHeight: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxHeight,
|
|
33093
33098
|
attachments: [linkAttachment],
|
|
@@ -33123,7 +33128,7 @@ var MessageBody = function MessageBody(_ref) {
|
|
|
33123
33128
|
unsupportedMessage: unsupportedMessage
|
|
33124
33129
|
})), !withAttachments && message.state === MESSAGE_STATUS.DELETE ? (/*#__PURE__*/React__default.createElement(MessageStatusDeleted$1, {
|
|
33125
33130
|
color: textSecondary
|
|
33126
|
-
}, " Message was deleted. ")) : '', !ogContainerFirst && linkAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
33131
|
+
}, " Message was deleted. ")) : '', !ogContainerFirst && linkAttachment && !mediaAttachment && !withMediaAttachment && !fileAttachment && (/*#__PURE__*/React__default.createElement(OGMetadata, {
|
|
33127
33132
|
maxWidth: (ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxWidth) || 400,
|
|
33128
33133
|
maxHeight: ogMetadataProps === null || ogMetadataProps === void 0 ? void 0 : ogMetadataProps.maxHeight,
|
|
33129
33134
|
attachments: [linkAttachment],
|