@geowiki/design-system 0.16.18 → 0.16.19
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/index.js +10 -3
- package/dist/index.mjs +10 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7610,12 +7610,13 @@ var GalleryCarouselOpen = ({
|
|
|
7610
7610
|
setOpen,
|
|
7611
7611
|
saveRotationChanges,
|
|
7612
7612
|
selectImage,
|
|
7613
|
-
selectImageText
|
|
7613
|
+
selectImageText,
|
|
7614
|
+
imageRotation
|
|
7614
7615
|
}) => {
|
|
7615
7616
|
const [defaultPhoto, setDefaultPhoto] = (0, import_react25.useState)(currentPhoto);
|
|
7616
7617
|
const [text, setDefaultText] = (0, import_react25.useState)("");
|
|
7617
7618
|
const [id, setDefaultId] = (0, import_react25.useState)("");
|
|
7618
|
-
const [rotation, setRotation] = (0, import_react25.useState)(
|
|
7619
|
+
const [rotation, setRotation] = (0, import_react25.useState)(imageRotation);
|
|
7619
7620
|
(0, import_react25.useEffect)(() => {
|
|
7620
7621
|
setDefaultPhoto(currentPhoto);
|
|
7621
7622
|
}, [currentPhoto]);
|
|
@@ -7626,6 +7627,7 @@ var GalleryCarouselOpen = ({
|
|
|
7626
7627
|
if (currentIndex > 0) {
|
|
7627
7628
|
const previousIndex = currentIndex - 1;
|
|
7628
7629
|
setDefaultPhoto({ imageUrl: list[previousIndex].url });
|
|
7630
|
+
setDefaultId(list[previousIndex].id);
|
|
7629
7631
|
}
|
|
7630
7632
|
};
|
|
7631
7633
|
const handleNext = () => {
|
|
@@ -7635,6 +7637,7 @@ var GalleryCarouselOpen = ({
|
|
|
7635
7637
|
if (currentIndex < list.length - 1) {
|
|
7636
7638
|
const nextIndex = currentIndex + 1;
|
|
7637
7639
|
setDefaultPhoto({ imageUrl: list[nextIndex].url });
|
|
7640
|
+
setDefaultId(list[nextIndex].id);
|
|
7638
7641
|
}
|
|
7639
7642
|
};
|
|
7640
7643
|
const generateBase64ofImage = () => {
|
|
@@ -7800,7 +7803,10 @@ var GalleryCarouselOpen = ({
|
|
|
7800
7803
|
"div",
|
|
7801
7804
|
{
|
|
7802
7805
|
className: "z-40 text-white hover:cursor-pointer",
|
|
7803
|
-
onClick: () =>
|
|
7806
|
+
onClick: () => {
|
|
7807
|
+
saveRotationChanges(generateBase64ofImage(), id);
|
|
7808
|
+
setRotation(0);
|
|
7809
|
+
},
|
|
7804
7810
|
children: "Save rotation changes"
|
|
7805
7811
|
}
|
|
7806
7812
|
),
|
|
@@ -7858,6 +7864,7 @@ var CarouselItemList = (props) => {
|
|
|
7858
7864
|
id: galleryItem.id
|
|
7859
7865
|
})),
|
|
7860
7866
|
open,
|
|
7867
|
+
imageRotation: 0,
|
|
7861
7868
|
allowZoom: props.allowZoom,
|
|
7862
7869
|
selectImageText: props.selectImageText,
|
|
7863
7870
|
setOpen,
|
package/dist/index.mjs
CHANGED
|
@@ -7242,12 +7242,13 @@ var GalleryCarouselOpen = ({
|
|
|
7242
7242
|
setOpen,
|
|
7243
7243
|
saveRotationChanges,
|
|
7244
7244
|
selectImage,
|
|
7245
|
-
selectImageText
|
|
7245
|
+
selectImageText,
|
|
7246
|
+
imageRotation
|
|
7246
7247
|
}) => {
|
|
7247
7248
|
const [defaultPhoto, setDefaultPhoto] = useState14(currentPhoto);
|
|
7248
7249
|
const [text, setDefaultText] = useState14("");
|
|
7249
7250
|
const [id, setDefaultId] = useState14("");
|
|
7250
|
-
const [rotation, setRotation] = useState14(
|
|
7251
|
+
const [rotation, setRotation] = useState14(imageRotation);
|
|
7251
7252
|
useEffect8(() => {
|
|
7252
7253
|
setDefaultPhoto(currentPhoto);
|
|
7253
7254
|
}, [currentPhoto]);
|
|
@@ -7258,6 +7259,7 @@ var GalleryCarouselOpen = ({
|
|
|
7258
7259
|
if (currentIndex > 0) {
|
|
7259
7260
|
const previousIndex = currentIndex - 1;
|
|
7260
7261
|
setDefaultPhoto({ imageUrl: list[previousIndex].url });
|
|
7262
|
+
setDefaultId(list[previousIndex].id);
|
|
7261
7263
|
}
|
|
7262
7264
|
};
|
|
7263
7265
|
const handleNext = () => {
|
|
@@ -7267,6 +7269,7 @@ var GalleryCarouselOpen = ({
|
|
|
7267
7269
|
if (currentIndex < list.length - 1) {
|
|
7268
7270
|
const nextIndex = currentIndex + 1;
|
|
7269
7271
|
setDefaultPhoto({ imageUrl: list[nextIndex].url });
|
|
7272
|
+
setDefaultId(list[nextIndex].id);
|
|
7270
7273
|
}
|
|
7271
7274
|
};
|
|
7272
7275
|
const generateBase64ofImage = () => {
|
|
@@ -7432,7 +7435,10 @@ var GalleryCarouselOpen = ({
|
|
|
7432
7435
|
"div",
|
|
7433
7436
|
{
|
|
7434
7437
|
className: "z-40 text-white hover:cursor-pointer",
|
|
7435
|
-
onClick: () =>
|
|
7438
|
+
onClick: () => {
|
|
7439
|
+
saveRotationChanges(generateBase64ofImage(), id);
|
|
7440
|
+
setRotation(0);
|
|
7441
|
+
},
|
|
7436
7442
|
children: "Save rotation changes"
|
|
7437
7443
|
}
|
|
7438
7444
|
),
|
|
@@ -7490,6 +7496,7 @@ var CarouselItemList = (props) => {
|
|
|
7490
7496
|
id: galleryItem.id
|
|
7491
7497
|
})),
|
|
7492
7498
|
open,
|
|
7499
|
+
imageRotation: 0,
|
|
7493
7500
|
allowZoom: props.allowZoom,
|
|
7494
7501
|
selectImageText: props.selectImageText,
|
|
7495
7502
|
setOpen,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geowiki/design-system",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.19",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"react": "^19.2.0",
|
|
17
17
|
"react-dom": "^19.2.0",
|
|
18
|
-
"@geowiki/core": "0.16.
|
|
18
|
+
"@geowiki/core": "0.16.19"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/react": "^19.2.14",
|