@naviedu/room-platform-react 0.0.82 → 0.0.83
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.esm.js +9 -8
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -59309,13 +59309,6 @@ function ComposerImagePreview(param) {
|
|
|
59309
59309
|
var file = param.file, url = param.url;
|
|
59310
59310
|
var _useState = _sliced_to_array$b(useState(false), 2), isOpen = _useState[0], setIsOpen = _useState[1];
|
|
59311
59311
|
var dialogRef = useRef(null);
|
|
59312
|
-
useEffect(function() {
|
|
59313
|
-
return function() {
|
|
59314
|
-
return URL.revokeObjectURL(url);
|
|
59315
|
-
};
|
|
59316
|
-
}, [
|
|
59317
|
-
url
|
|
59318
|
-
]);
|
|
59319
59312
|
useEffect(function() {
|
|
59320
59313
|
var _dialogRef_current;
|
|
59321
59314
|
if (isOpen) (_dialogRef_current = dialogRef.current) === null || _dialogRef_current === void 0 ? void 0 : _dialogRef_current.showModal();
|
|
@@ -59670,7 +59663,7 @@ var EMPTY_LOCAL_PREVIEW_URLS = {};
|
|
|
59670
59663
|
function MessageAttachmentGallery(param) {
|
|
59671
59664
|
var attachments = param.attachments, className = param.className, _param_localPreviewUrls = param.localPreviewUrls, localPreviewUrls = _param_localPreviewUrls === void 0 ? EMPTY_LOCAL_PREVIEW_URLS : _param_localPreviewUrls, _param_now = param.now, now = _param_now === void 0 ? function() {
|
|
59672
59665
|
return new Date();
|
|
59673
|
-
} : _param_now, onRefreshPreview = param.onRefreshPreview, onRefreshView = param.onRefreshView, onRetryAttachment = param.onRetryAttachment;
|
|
59666
|
+
} : _param_now, onImageLoad = param.onImageLoad, onRefreshPreview = param.onRefreshPreview, onRefreshView = param.onRefreshView, onRetryAttachment = param.onRetryAttachment;
|
|
59674
59667
|
var _ref;
|
|
59675
59668
|
var _orderedAttachments_selectedIndex;
|
|
59676
59669
|
var _useState = _sliced_to_array$a(useState(), 2), selectedIndex = _useState[0], setSelectedIndex = _useState[1];
|
|
@@ -60027,6 +60020,7 @@ function MessageAttachmentGallery(param) {
|
|
|
60027
60020
|
alt: attachment.fileName,
|
|
60028
60021
|
decoding: "async",
|
|
60029
60022
|
height: 240,
|
|
60023
|
+
onLoad: onImageLoad,
|
|
60030
60024
|
src: localPreviewUrl,
|
|
60031
60025
|
width: 240
|
|
60032
60026
|
}),
|
|
@@ -60085,6 +60079,7 @@ function MessageAttachmentGallery(param) {
|
|
|
60085
60079
|
decoding: "async",
|
|
60086
60080
|
height: 240,
|
|
60087
60081
|
loading: "lazy",
|
|
60082
|
+
onLoad: onImageLoad,
|
|
60088
60083
|
onError: function() {
|
|
60089
60084
|
return handlePreviewError(attachment);
|
|
60090
60085
|
},
|
|
@@ -60477,6 +60472,11 @@ function MessageList(param) {
|
|
|
60477
60472
|
if (!list) return;
|
|
60478
60473
|
list.scrollTop = list.scrollHeight;
|
|
60479
60474
|
}, []);
|
|
60475
|
+
var handleAttachmentImageLoad = useCallback(function() {
|
|
60476
|
+
if (isAtLatestRef.current) scrollToLatest();
|
|
60477
|
+
}, [
|
|
60478
|
+
scrollToLatest
|
|
60479
|
+
]);
|
|
60480
60480
|
useLayoutEffect(function() {
|
|
60481
60481
|
if (isAtLatest) scrollToLatest();
|
|
60482
60482
|
}, [
|
|
@@ -60732,6 +60732,7 @@ function MessageList(param) {
|
|
|
60732
60732
|
attachments: message.attachments,
|
|
60733
60733
|
localPreviewUrls: localPreviewUrls,
|
|
60734
60734
|
now: now,
|
|
60735
|
+
onImageLoad: handleAttachmentImageLoad,
|
|
60735
60736
|
onRefreshPreview: onRefreshAttachment ? function(attachmentId) {
|
|
60736
60737
|
return onRefreshAttachment(message.id, attachmentId, 'preview');
|
|
60737
60738
|
} : undefined,
|