@yogiswara/honcho-editor-ui 2.2.3 → 2.2.5
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 +0 -1
- package/dist/components/editor/GalleryAlbum/AlbumImageGallery.js +2 -2
- package/dist/components/editor/GalleryAlbum/ImageItem.d.ts +0 -1
- package/dist/components/editor/GalleryAlbum/ImageItem.js +0 -1
- package/dist/hooks/editor/useHonchoEditorBulk.js +1 -0
- package/package.json +1 -1
|
@@ -10,7 +10,6 @@ interface ImageGalleryProps {
|
|
|
10
10
|
isSelectedMode: boolean;
|
|
11
11
|
isHiddenGallery: boolean;
|
|
12
12
|
enableEditor: boolean;
|
|
13
|
-
onSelectedMode: () => void;
|
|
14
13
|
onToggleSelect: (photo: ExtendedPhotoData) => void;
|
|
15
14
|
}
|
|
16
15
|
export declare const AlbumImageGallery: React.FC<ImageGalleryProps>;
|
|
@@ -5,7 +5,7 @@ import Masonry, { ResponsiveMasonry } from "react-responsive-masonry";
|
|
|
5
5
|
import GalleryImageItem from "./ImageItem";
|
|
6
6
|
export const AlbumImageGallery = (props) => {
|
|
7
7
|
const { imageCollection, isSelectedMode, isHiddenGallery, enableEditor, // Destructure the new prop
|
|
8
|
-
|
|
8
|
+
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,6 +27,6 @@ export 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, onToggleSelect: () => { onToggleSelect(photo); }, enableEditor: enableEditor, adjustments: photo.adjustments, frame: photo.frame, data: photo }) }, photo.key));
|
|
31
31
|
}) }) }) }));
|
|
32
32
|
};
|
|
@@ -52,6 +52,7 @@ export function useHonchoEditorBulk(controller, eventID, firebaseUid) {
|
|
|
52
52
|
const handleSelectBulkPreset = (event) => setSelectedBulkPreset(event.target.value);
|
|
53
53
|
// This factory creates functions that adjust a value for all selected images
|
|
54
54
|
const createRelativeAdjuster = useCallback((key, amount) => () => {
|
|
55
|
+
console.debug("createRelativeAdjuster", key, amount);
|
|
55
56
|
batchActions.adjustSelected({ [key]: amount });
|
|
56
57
|
}, [batchActions]);
|
|
57
58
|
const handleBulkTempDecreaseMax = createRelativeAdjuster('tempScore', -20);
|