@yogiswara/honcho-editor-ui 2.2.1 → 2.2.3
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/dist/components/editor/GalleryAlbum/AlbumImageGallery.d.ts +4 -5
- package/dist/components/editor/GalleryAlbum/AlbumImageGallery.js +3 -4
- package/dist/components/editor/GalleryAlbum/ImageItem.d.ts +0 -1
- package/dist/components/editor/GalleryAlbum/ImageItem.js +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AdjustmentValues } from "../../../lib/editor/honcho-editor";
|
|
3
3
|
import type { PhotoData as BulkPhotoData } from "../../../hooks/editor/useHonchoEditorBulk";
|
|
4
|
-
interface ExtendedPhotoData extends BulkPhotoData {
|
|
4
|
+
export interface ExtendedPhotoData extends BulkPhotoData {
|
|
5
5
|
adjustments?: Partial<AdjustmentValues>;
|
|
6
6
|
frame?: string;
|
|
7
7
|
}
|
|
@@ -10,9 +10,8 @@ interface ImageGalleryProps {
|
|
|
10
10
|
isSelectedMode: boolean;
|
|
11
11
|
isHiddenGallery: boolean;
|
|
12
12
|
enableEditor: boolean;
|
|
13
|
-
onPreview: (photo: ExtendedPhotoData) => () => void;
|
|
14
13
|
onSelectedMode: () => void;
|
|
15
|
-
onToggleSelect: (photo: ExtendedPhotoData) =>
|
|
14
|
+
onToggleSelect: (photo: ExtendedPhotoData) => void;
|
|
16
15
|
}
|
|
17
|
-
declare const AlbumImageGallery: React.FC<ImageGalleryProps>;
|
|
18
|
-
export
|
|
16
|
+
export declare const AlbumImageGallery: React.FC<ImageGalleryProps>;
|
|
17
|
+
export {};
|
|
@@ -3,9 +3,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { Box, Stack } from "@mui/material";
|
|
4
4
|
import Masonry, { ResponsiveMasonry } from "react-responsive-masonry";
|
|
5
5
|
import GalleryImageItem from "./ImageItem";
|
|
6
|
-
const AlbumImageGallery = (props) => {
|
|
6
|
+
export const AlbumImageGallery = (props) => {
|
|
7
7
|
const { imageCollection, isSelectedMode, isHiddenGallery, enableEditor, // Destructure the new prop
|
|
8
|
-
|
|
8
|
+
onSelectedMode, onToggleSelect, } = props;
|
|
9
9
|
console.log("imageCollection: ", imageCollection);
|
|
10
10
|
return (_jsx(Stack, { sx: { width: '100%', maxHeight: '100%', overflowY: 'auto' }, children: _jsx(ResponsiveMasonry, { columnsCountBreakPoints: { 750: 2, 900: 4 }, children: _jsx(Masonry, { children: imageCollection.map((photo, index) => {
|
|
11
11
|
// This guard clause is still important for runtime safety.
|
|
@@ -27,7 +27,6 @@ const AlbumImageGallery = (props) => {
|
|
|
27
27
|
};
|
|
28
28
|
return (_jsx(Box, { sx: { m: 0.5 }, children: _jsx(GalleryImageItem, { margin: "0px", index: index,
|
|
29
29
|
// UPDATED: Pass the new, correctly-typed object.
|
|
30
|
-
photo: imageItemPhotoProps, direction: "column", isFullScreenMode: false, isSelected: photo.isSelected, isSelectedMode: isSelectedMode, isHiddenGallery: isHiddenGallery,
|
|
30
|
+
photo: imageItemPhotoProps, direction: "column", isFullScreenMode: false, isSelected: photo.isSelected, isSelectedMode: isSelectedMode, isHiddenGallery: isHiddenGallery, onSelectedMode: onSelectedMode, onToggleSelect: () => { onToggleSelect(photo); }, enableEditor: enableEditor, adjustments: photo.adjustments, frame: photo.frame, data: photo }) }, photo.key));
|
|
31
31
|
}) }) }) }));
|
|
32
32
|
};
|
|
33
|
-
export default AlbumImageGallery;
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export { default as HWatermarkView } from './components/editor/HWatermarkView';
|
|
|
21
21
|
export { default as HModalMobile } from './components/editor/HModalMobile';
|
|
22
22
|
export { default as HPresetOptionsMenu } from './components/editor/HPresetOptionMenu';
|
|
23
23
|
export { HAlertInternetBox, HAlertCopyBox, HAlertInternetConnectionBox, HAlertPresetSave } from './components/editor/HAlertBox';
|
|
24
|
-
export {
|
|
24
|
+
export { AlbumImageGallery, ExtendedPhotoData } from './components/editor/GalleryAlbum/AlbumImageGallery';
|
|
25
25
|
export { default as GalleryImageItem } from './components/editor/GalleryAlbum/ImageItem';
|
|
26
26
|
export { default as SimplifiedAlbumGallery } from './components/editor/GalleryAlbum/SimplifiedAlbumGallery';
|
|
27
27
|
export { default as SimplifiedImageItem } from './components/editor/GalleryAlbum/SimplifiedImageItem';
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export { default as HWatermarkView } from './components/editor/HWatermarkView';
|
|
|
18
18
|
export { default as HModalMobile } from './components/editor/HModalMobile';
|
|
19
19
|
export { default as HPresetOptionsMenu } from './components/editor/HPresetOptionMenu';
|
|
20
20
|
export { HAlertInternetBox, HAlertCopyBox, HAlertInternetConnectionBox, HAlertPresetSave } from './components/editor/HAlertBox';
|
|
21
|
-
export {
|
|
21
|
+
export { AlbumImageGallery } from './components/editor/GalleryAlbum/AlbumImageGallery';
|
|
22
22
|
export { default as GalleryImageItem } from './components/editor/GalleryAlbum/ImageItem';
|
|
23
23
|
export { default as SimplifiedAlbumGallery } from './components/editor/GalleryAlbum/SimplifiedAlbumGallery';
|
|
24
24
|
export { default as SimplifiedImageItem } from './components/editor/GalleryAlbum/SimplifiedImageItem';
|