@trafilea/afrodita-components 6.43.8 → 6.43.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/build/index.d.ts +2 -1
- package/build/index.esm.js +11 -5
- package/build/index.esm.js.map +1 -1
- package/build/index.js +11 -5
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -4074,7 +4074,8 @@ declare type IMobileGalleryProps = {
|
|
|
4074
4074
|
bottomTag?: JSX.Element;
|
|
4075
4075
|
productImageDataTestId?: string;
|
|
4076
4076
|
borderRadiusVariant?: boolean;
|
|
4077
|
-
|
|
4077
|
+
selectedIndex?: number;
|
|
4078
|
+
selectedValue?: IImage;
|
|
4078
4079
|
itemsOnViewport?: number;
|
|
4079
4080
|
};
|
|
4080
4081
|
declare const ProductGalleryMobileV4: React.FC<IMobileGalleryProps>;
|
package/build/index.esm.js
CHANGED
|
@@ -21538,7 +21538,7 @@ var Container$5 = newStyled.div({
|
|
|
21538
21538
|
width: '100vw',
|
|
21539
21539
|
position: 'fixed',
|
|
21540
21540
|
overflowY: 'scroll',
|
|
21541
|
-
zIndex: '
|
|
21541
|
+
zIndex: '99999999999',
|
|
21542
21542
|
top: 0,
|
|
21543
21543
|
left: 0,
|
|
21544
21544
|
display: 'flex',
|
|
@@ -21609,13 +21609,19 @@ var GalleryDetailed = function (_a) {
|
|
|
21609
21609
|
};
|
|
21610
21610
|
|
|
21611
21611
|
var ProductGalleryMobileV4 = function (_a) {
|
|
21612
|
-
var images = _a.images, customClick = _a.customClick, topTag = _a.topTag, topRightTag = _a.topRightTag, bottomTag = _a.bottomTag, productImageDataTestId = _a.productImageDataTestId, _b = _a.borderRadiusVariant, borderRadiusVariant = _b === void 0 ? false : _b, _c = _a.
|
|
21612
|
+
var images = _a.images, customClick = _a.customClick, topTag = _a.topTag, topRightTag = _a.topRightTag, bottomTag = _a.bottomTag, productImageDataTestId = _a.productImageDataTestId, _b = _a.borderRadiusVariant, borderRadiusVariant = _b === void 0 ? false : _b, _c = _a.selectedIndex, selectedIndex = _c === void 0 ? 0 : _c, selectedValue = _a.selectedValue, _d = _a.itemsOnViewport, itemsOnViewport = _d === void 0 ? 1 : _d;
|
|
21613
21613
|
var containerRef = useRef(null);
|
|
21614
|
-
var _e = useState(
|
|
21614
|
+
var _e = useState(selectedIndex), selectedImageIndex = _e[0], setSelectedImageIndex = _e[1];
|
|
21615
21615
|
var _f = useState(false), galleryOpened = _f[0], setGalleryOpened = _f[1];
|
|
21616
21616
|
useEffect(function () {
|
|
21617
|
-
|
|
21618
|
-
|
|
21617
|
+
if (selectedIndex) {
|
|
21618
|
+
setSelectedImageIndex(selectedIndex);
|
|
21619
|
+
}
|
|
21620
|
+
else if (selectedValue) {
|
|
21621
|
+
var actualIndex = images.findIndex(function (el) { return el.key === selectedValue.key; });
|
|
21622
|
+
setSelectedImageIndex(actualIndex);
|
|
21623
|
+
}
|
|
21624
|
+
}, [selectedIndex, selectedValue, images]);
|
|
21619
21625
|
useEffect(function () {
|
|
21620
21626
|
var body = document.querySelector('body');
|
|
21621
21627
|
if (!body) {
|