@gem-sdk/components 2.0.0-dev.621 → 2.0.0-dev.623
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/cjs/article/setting/configs/ArticleAuthor/uiV2.js +1 -0
- package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +0 -1
- package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +1 -0
- package/dist/cjs/banner/setting/presets/heroBanner1Col.js +1 -1
- package/dist/cjs/banner/setting/presets/heroBannerContentLeft.js +2 -4
- package/dist/cjs/banner/setting/presets/heroBannerContentRight.js +2 -5
- package/dist/cjs/banner/setting/presets/heroBannerVideo.js +10 -0
- package/dist/cjs/banner/setting/setting.js +9 -6
- package/dist/cjs/banner/setting/uiV2.js +34 -10
- package/dist/cjs/builder.js +12 -6
- package/dist/cjs/collection/components/collection-banner/components/CollectionBanner.liquid.js +1 -1
- package/dist/cjs/collection/components/collection-paginator/common/index.js +1 -2
- package/dist/cjs/collection/components/collection-paginator/common/styles.js +2 -2
- package/dist/cjs/collection/components/collection-paginator/components/CollectionPaginator.liquid.js +3 -3
- package/dist/cjs/collection/setting/collection-banner/configs/uiV2.js +2 -2
- package/dist/cjs/collection/setting/collection-paginator/configs/settings.js +8 -5
- package/dist/cjs/collection/setting/collection-paginator/configs/uiV2.js +28 -3
- package/dist/cjs/index.js +34 -32
- package/dist/cjs/index.liquid.js +16 -10
- package/dist/cjs/next.js +3 -1
- package/dist/cjs/product/components/ProductImagesV3/common/common.js +360 -0
- package/dist/cjs/product/components/ProductImagesV3/common/getAttr.js +192 -0
- package/dist/cjs/product/components/ProductImagesV3/common/getBorderActiveCss.js +26 -0
- package/dist/cjs/product/components/ProductImagesV3/common/getClasses.js +94 -0
- package/dist/cjs/product/components/ProductImagesV3/common/getStyle.js +303 -0
- package/dist/cjs/product/components/ProductImagesV3/common/hoverAction.js +95 -0
- package/dist/cjs/product/components/ProductImagesV3/common/productFeaturedImage.js +59 -0
- package/dist/cjs/product/components/ProductImagesV3/common/productGallery.js +266 -0
- package/dist/cjs/product/components/ProductImagesV3/components/child/MediaIcon.js +63 -0
- package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeatureVideo.js +36 -0
- package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeaturedImageCarousel.js +109 -0
- package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeaturedImageOnly.js +139 -0
- package/dist/cjs/product/components/ProductImagesV3/components/child/ProductGalleryGrid.js +100 -0
- package/dist/cjs/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.js +77 -0
- package/dist/cjs/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.liquid.js +300 -0
- package/dist/cjs/product/components/ProductImagesV3/components/feature-only/OnlyFeatureImage.js +44 -0
- package/dist/cjs/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.js +83 -0
- package/dist/cjs/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.liquid.js +182 -0
- package/dist/cjs/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.js +30 -0
- package/dist/cjs/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.liquid.js +239 -0
- package/dist/cjs/product/components/ProductImagesV3/components/lightbox/ButtonOpenLightBox.js +28 -0
- package/dist/cjs/product/components/ProductImagesV3/components/lightbox/ProductImagesLightBox.js +144 -0
- package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesAttr.js +14 -0
- package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesClassName.js +54 -0
- package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesStyles.js +53 -0
- package/dist/cjs/product/components/ProductImagesV3/hooks/useFeatureImageWithGallery.js +55 -0
- package/dist/cjs/product/components/ProductImagesV3/hooks/useFilterImagesByVariant.js +41 -0
- package/dist/cjs/product/components/ProductImagesV3/hooks/useGalleryCarousel.js +134 -0
- package/dist/cjs/product/components/ProductImagesV3/hooks/useProductFeaturedImageCarousel.js +203 -0
- package/dist/cjs/product/components/ProductImagesV3/hooks/useProductGalleryGrid.js +87 -0
- package/dist/cjs/product/components/ProductImagesV3/index.js +291 -0
- package/dist/cjs/product/components/ProductImagesV3/index.liquid.js +153 -0
- package/dist/cjs/product/index.js +6 -4
- package/dist/cjs/product/next.js +4 -0
- package/dist/cjs/product/setting/product-image-v3/ProductFeatureImage.js +252 -0
- package/dist/cjs/product/setting/product-image-v3/ProductGalleryImage.js +251 -0
- package/dist/cjs/product/setting/product-image-v3/ProductImages.js +74 -0
- package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/ProductFeatureImage.js +388 -0
- package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/ProductGalleryImage.js +518 -0
- package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/index.js +336 -0
- package/dist/cjs/product/setting/product-image-v3/configs/ui/FeatureNavigation.js +118 -0
- package/dist/cjs/product/setting/product-image-v3/configs/ui/ImageListNavigation.js +119 -0
- package/dist/cjs/product/setting/product-image-v3/configs/uiV1.js +237 -0
- package/dist/cjs/product/setting/product-image-v3/configs/uiV2.js +491 -0
- package/dist/cjs/setting.js +97 -95
- package/dist/cjs/swiper-carousel/arrow/Arrow.js +52 -0
- package/dist/cjs/swiper-carousel/arrow/Arrow.liquid.js +46 -0
- package/dist/cjs/swiper-carousel/arrow/common/common.js +119 -0
- package/dist/cjs/swiper-carousel/arrow/common/getClass.js +50 -0
- package/dist/cjs/swiper-carousel/arrow/common/getStyle.js +84 -0
- package/dist/cjs/swiper-carousel/carousel-item/SwiperItem.js +34 -0
- package/dist/cjs/swiper-carousel/carousel-item/SwiperItem.liquid.js +38 -0
- package/dist/cjs/swiper-carousel/carousel-item/common/getClass.js +29 -0
- package/dist/cjs/swiper-carousel/carousel-item/common/getStyle.js +79 -0
- package/dist/cjs/swiper-carousel/carousel-item/hook/useCarouseItem.js +22 -0
- package/dist/cjs/swiper-carousel/components/common/carousel.js +98 -0
- package/dist/cjs/swiper-carousel/components/const/index.js +5 -0
- package/dist/cjs/swiper-carousel/components/hooks/useTrackPreviewPause.js +34 -0
- package/dist/cjs/swiper-carousel/components/plugins/AnimationPlugin.js +42 -0
- package/dist/cjs/swiper-carousel/components/plugins/AutoPlayPlugin.js +105 -0
- package/dist/cjs/swiper-carousel/components/plugins/FixSliderMoveBackwards.js +15 -0
- package/dist/cjs/swiper-carousel/components/plugins/MutationPlugin.js +45 -0
- package/dist/cjs/swiper-carousel/dots/Dots.js +51 -0
- package/dist/cjs/swiper-carousel/dots/Dots.liquid.js +26 -0
- package/dist/cjs/swiper-carousel/dots/common/common.js +28 -0
- package/dist/cjs/swiper-carousel/dots/common/getClass.js +40 -0
- package/dist/cjs/swiper-carousel/dots/common/getStyle.js +33 -0
- package/dist/cjs/swiper-carousel/dots/hook/useDotsSetting.js +21 -0
- package/dist/cjs/swiper-carousel/index.js +17 -0
- package/dist/cjs/swiper-carousel/next.js +22 -0
- package/dist/cjs/swiper-carousel/root/Swiper.js +128 -0
- package/dist/cjs/swiper-carousel/root/Swiper.liquid.js +104 -0
- package/dist/cjs/swiper-carousel/root/common/getAttr.js +25 -0
- package/dist/cjs/swiper-carousel/root/common/getClass.js +135 -0
- package/dist/cjs/swiper-carousel/root/common/getData.js +56 -0
- package/dist/cjs/swiper-carousel/root/common/getStyle.js +64 -0
- package/dist/cjs/swiper-carousel/root/hook/useCarousel.js +482 -0
- package/dist/cjs/swiper-carousel/setting/Swiper.js +42 -0
- package/dist/cjs/swiper-carousel/setting/SwiperItem.js +40 -0
- package/dist/cjs/swiper-carousel/setting/configs/presets.js +87 -0
- package/dist/cjs/swiper-carousel/setting/configs/settingV2.js +819 -0
- package/dist/cjs/swiper-carousel/setting/configs/uiV2.js +718 -0
- package/dist/esm/article/setting/configs/ArticleAuthor/uiV2.js +1 -0
- package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +0 -1
- package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +1 -0
- package/dist/esm/banner/setting/presets/heroBanner1Col.js +1 -1
- package/dist/esm/banner/setting/presets/heroBannerContentLeft.js +2 -4
- package/dist/esm/banner/setting/presets/heroBannerContentRight.js +2 -5
- package/dist/esm/banner/setting/presets/heroBannerVideo.js +10 -0
- package/dist/esm/banner/setting/setting.js +9 -6
- package/dist/esm/banner/setting/uiV2.js +34 -10
- package/dist/esm/builder.js +6 -0
- package/dist/esm/collection/components/collection-banner/components/CollectionBanner.liquid.js +1 -1
- package/dist/esm/collection/components/collection-paginator/common/index.js +1 -2
- package/dist/esm/collection/components/collection-paginator/common/styles.js +2 -2
- package/dist/esm/collection/components/collection-paginator/components/CollectionPaginator.liquid.js +3 -3
- package/dist/esm/collection/setting/collection-banner/configs/uiV2.js +2 -2
- package/dist/esm/collection/setting/collection-paginator/configs/settings.js +8 -5
- package/dist/esm/collection/setting/collection-paginator/configs/uiV2.js +28 -3
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.liquid.js +3 -0
- package/dist/esm/next.js +3 -1
- package/dist/esm/product/components/ProductImagesV3/common/common.js +344 -0
- package/dist/esm/product/components/ProductImagesV3/common/getAttr.js +189 -0
- package/dist/esm/product/components/ProductImagesV3/common/getBorderActiveCss.js +24 -0
- package/dist/esm/product/components/ProductImagesV3/common/getClasses.js +83 -0
- package/dist/esm/product/components/ProductImagesV3/common/getStyle.js +292 -0
- package/dist/esm/product/components/ProductImagesV3/common/hoverAction.js +92 -0
- package/dist/esm/product/components/ProductImagesV3/common/productFeaturedImage.js +53 -0
- package/dist/esm/product/components/ProductImagesV3/common/productGallery.js +251 -0
- package/dist/esm/product/components/ProductImagesV3/components/child/MediaIcon.js +59 -0
- package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeatureVideo.js +32 -0
- package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeaturedImageCarousel.js +105 -0
- package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeaturedImageOnly.js +135 -0
- package/dist/esm/product/components/ProductImagesV3/components/child/ProductGalleryGrid.js +96 -0
- package/dist/esm/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.js +73 -0
- package/dist/esm/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.liquid.js +296 -0
- package/dist/esm/product/components/ProductImagesV3/components/feature-only/OnlyFeatureImage.js +40 -0
- package/dist/esm/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.js +79 -0
- package/dist/esm/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.liquid.js +178 -0
- package/dist/esm/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.js +26 -0
- package/dist/esm/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.liquid.js +235 -0
- package/dist/esm/product/components/ProductImagesV3/components/lightbox/ButtonOpenLightBox.js +24 -0
- package/dist/esm/product/components/ProductImagesV3/components/lightbox/ProductImagesLightBox.js +140 -0
- package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesAttr.js +12 -0
- package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesClassName.js +52 -0
- package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesStyles.js +51 -0
- package/dist/esm/product/components/ProductImagesV3/hooks/useFeatureImageWithGallery.js +53 -0
- package/dist/esm/product/components/ProductImagesV3/hooks/useFilterImagesByVariant.js +39 -0
- package/dist/esm/product/components/ProductImagesV3/hooks/useGalleryCarousel.js +132 -0
- package/dist/esm/product/components/ProductImagesV3/hooks/useProductFeaturedImageCarousel.js +201 -0
- package/dist/esm/product/components/ProductImagesV3/hooks/useProductGalleryGrid.js +85 -0
- package/dist/esm/product/components/ProductImagesV3/index.js +287 -0
- package/dist/esm/product/components/ProductImagesV3/index.liquid.js +149 -0
- package/dist/esm/product/index.js +26 -24
- package/dist/esm/product/next.js +4 -0
- package/dist/esm/product/setting/product-image-v3/ProductFeatureImage.js +248 -0
- package/dist/esm/product/setting/product-image-v3/ProductGalleryImage.js +248 -0
- package/dist/esm/product/setting/product-image-v3/ProductImages.js +70 -0
- package/dist/esm/product/setting/product-image-v3/configs/setting-v2/ProductFeatureImage.js +384 -0
- package/dist/esm/product/setting/product-image-v3/configs/setting-v2/ProductGalleryImage.js +515 -0
- package/dist/esm/product/setting/product-image-v3/configs/setting-v2/index.js +334 -0
- package/dist/esm/product/setting/product-image-v3/configs/ui/FeatureNavigation.js +116 -0
- package/dist/esm/product/setting/product-image-v3/configs/ui/ImageListNavigation.js +117 -0
- package/dist/esm/product/setting/product-image-v3/configs/uiV1.js +235 -0
- package/dist/esm/product/setting/product-image-v3/configs/uiV2.js +489 -0
- package/dist/esm/setting.js +2 -0
- package/dist/esm/swiper-carousel/arrow/Arrow.js +48 -0
- package/dist/esm/swiper-carousel/arrow/Arrow.liquid.js +42 -0
- package/dist/esm/swiper-carousel/arrow/common/common.js +111 -0
- package/dist/esm/swiper-carousel/arrow/common/getClass.js +48 -0
- package/dist/esm/swiper-carousel/arrow/common/getStyle.js +82 -0
- package/dist/esm/swiper-carousel/carousel-item/SwiperItem.js +30 -0
- package/dist/esm/swiper-carousel/carousel-item/SwiperItem.liquid.js +34 -0
- package/dist/esm/swiper-carousel/carousel-item/common/getClass.js +27 -0
- package/dist/esm/swiper-carousel/carousel-item/common/getStyle.js +77 -0
- package/dist/esm/swiper-carousel/carousel-item/hook/useCarouseItem.js +20 -0
- package/dist/esm/swiper-carousel/components/common/carousel.js +93 -0
- package/dist/esm/swiper-carousel/components/const/index.js +3 -0
- package/dist/esm/swiper-carousel/components/hooks/useTrackPreviewPause.js +30 -0
- package/dist/esm/swiper-carousel/components/plugins/AnimationPlugin.js +35 -0
- package/dist/esm/swiper-carousel/components/plugins/AutoPlayPlugin.js +103 -0
- package/dist/esm/swiper-carousel/components/plugins/FixSliderMoveBackwards.js +13 -0
- package/dist/esm/swiper-carousel/components/plugins/MutationPlugin.js +43 -0
- package/dist/esm/swiper-carousel/dots/Dots.js +47 -0
- package/dist/esm/swiper-carousel/dots/Dots.liquid.js +22 -0
- package/dist/esm/swiper-carousel/dots/common/common.js +26 -0
- package/dist/esm/swiper-carousel/dots/common/getClass.js +38 -0
- package/dist/esm/swiper-carousel/dots/common/getStyle.js +31 -0
- package/dist/esm/swiper-carousel/dots/hook/useDotsSetting.js +19 -0
- package/dist/esm/swiper-carousel/index.js +15 -0
- package/dist/esm/swiper-carousel/next.js +18 -0
- package/dist/esm/swiper-carousel/root/Swiper.js +124 -0
- package/dist/esm/swiper-carousel/root/Swiper.liquid.js +100 -0
- package/dist/esm/swiper-carousel/root/common/getAttr.js +23 -0
- package/dist/esm/swiper-carousel/root/common/getClass.js +133 -0
- package/dist/esm/swiper-carousel/root/common/getData.js +54 -0
- package/dist/esm/swiper-carousel/root/common/getStyle.js +62 -0
- package/dist/esm/swiper-carousel/root/hook/useCarousel.js +480 -0
- package/dist/esm/swiper-carousel/setting/Swiper.js +38 -0
- package/dist/esm/swiper-carousel/setting/SwiperItem.js +36 -0
- package/dist/esm/swiper-carousel/setting/configs/presets.js +85 -0
- package/dist/esm/swiper-carousel/setting/configs/settingV2.js +815 -0
- package/dist/esm/swiper-carousel/setting/configs/uiV2.js +713 -0
- package/dist/types/index.d.ts +552 -117
- package/package.json +3 -3
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
const MediaIcon = ({ contentType })=>{
|
|
5
|
+
const isVideoSource = contentType == 'VIDEO' || contentType == 'EXTERNAL_VIDEO';
|
|
6
|
+
const isModel3D = contentType == 'MODEL_3D';
|
|
7
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
8
|
+
children: (isVideoSource || isModel3D) && /*#__PURE__*/ jsxs("div", {
|
|
9
|
+
className: "gp-absolute gp-bottom-0 gp-right-0 gp-pb-[15px] gp-pr-[15px]",
|
|
10
|
+
children: [
|
|
11
|
+
isVideoSource && /*#__PURE__*/ jsxs("svg", {
|
|
12
|
+
width: "24",
|
|
13
|
+
height: "24",
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
fill: "none",
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ jsx("rect", {
|
|
19
|
+
opacity: "0.9",
|
|
20
|
+
width: "24",
|
|
21
|
+
height: "24",
|
|
22
|
+
rx: "3",
|
|
23
|
+
fill: "#212121"
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ jsx("path", {
|
|
26
|
+
d: "M17.6869 12.2646L17.6868 12.2646L6.78379 18.4464C6.78378 18.4464 6.78376 18.4464 6.78374 18.4464C6.52931 18.5903 6.1665 18.4179 6.1665 18.0416V5.95844C6.1665 5.58218 6.52917 5.40981 6.7836 5.55354C6.78366 5.55357 6.78373 5.55361 6.78379 5.55365L17.6868 11.7354L17.6869 11.7354C17.8819 11.846 17.8819 12.154 17.6869 12.2646Z",
|
|
27
|
+
stroke: "#F9F9F9",
|
|
28
|
+
strokeMiterlimit: "10"
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
}),
|
|
32
|
+
isModel3D && /*#__PURE__*/ jsxs("svg", {
|
|
33
|
+
width: "24",
|
|
34
|
+
height: "24",
|
|
35
|
+
viewBox: "0 0 24 24",
|
|
36
|
+
fill: "none",
|
|
37
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
38
|
+
children: [
|
|
39
|
+
/*#__PURE__*/ jsx("rect", {
|
|
40
|
+
opacity: "0.9",
|
|
41
|
+
width: "24",
|
|
42
|
+
height: "24",
|
|
43
|
+
rx: "3",
|
|
44
|
+
fill: "#212121"
|
|
45
|
+
}),
|
|
46
|
+
/*#__PURE__*/ jsx("path", {
|
|
47
|
+
fillRule: "evenodd",
|
|
48
|
+
clipRule: "evenodd",
|
|
49
|
+
d: "M11.7441 4.57034C11.9017 4.47655 12.098 4.47655 12.2555 4.57034L18.5889 8.33957C18.7404 8.42971 18.8332 8.59296 18.8332 8.76923V15.2308C18.8332 15.407 18.7404 15.5703 18.5889 15.6604L12.2555 19.4297C12.098 19.5234 11.9017 19.5234 11.7441 19.4297L5.41079 15.6604C5.25932 15.5703 5.1665 15.407 5.1665 15.2308V8.76923C5.1665 8.59296 5.25932 8.42971 5.41079 8.33957L11.7441 4.57034ZM6.1665 9.64865V14.9465L11.4998 18.1206V12.8227L6.1665 9.64865ZM12.4998 12.8227V18.1206L17.8332 14.9465V9.64865L12.4998 12.8227ZM17.3555 8.76923L11.9998 11.9566L6.64417 8.76923L11.9998 5.58185L17.3555 8.76923Z",
|
|
50
|
+
fill: "#F9F9F9"
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export { MediaIcon as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { memo, useMemo } from 'react';
|
|
3
|
+
import 'next/link';
|
|
4
|
+
import '@gem-sdk/core';
|
|
5
|
+
import Video from '../../../../../video/components/Video.js';
|
|
6
|
+
|
|
7
|
+
const ProductFeatureVideo = (props)=>{
|
|
8
|
+
const { url, aspectRatio } = props;
|
|
9
|
+
const videoType = useMemo(()=>{
|
|
10
|
+
if (url.includes('youtu.be')) return 'youtube';
|
|
11
|
+
if (url.includes('vimeo')) return 'vimeo';
|
|
12
|
+
return 'html5';
|
|
13
|
+
}, [
|
|
14
|
+
url
|
|
15
|
+
]);
|
|
16
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
17
|
+
children: /*#__PURE__*/ jsx(Video, {
|
|
18
|
+
setting: {
|
|
19
|
+
type: videoType,
|
|
20
|
+
html5Url: url,
|
|
21
|
+
youtubeUrl: url,
|
|
22
|
+
vimeoUrl: url,
|
|
23
|
+
preload: true,
|
|
24
|
+
controls: true,
|
|
25
|
+
aspectRatio
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var ProductFeatureVideo$1 = /*#__PURE__*/ memo(ProductFeatureVideo);
|
|
31
|
+
|
|
32
|
+
export { ProductFeatureVideo$1 as default };
|
package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeaturedImageCarousel.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { useCurrentDevice, getResponsiveValueByScreen, makeStyleResponsive } from '@gem-sdk/core';
|
|
4
|
+
import { handleMouseMove, handleMouseOut } from '../../common/hoverAction.js';
|
|
5
|
+
import { getProductImagesStyles } from '../../composables/getProductImagesStyles.js';
|
|
6
|
+
import { getProductImagesClassName } from '../../composables/getProductImagesClassName.js';
|
|
7
|
+
import { getProductImagesAttr } from '../../composables/getProductImagesAttr.js';
|
|
8
|
+
import { createStyle } from '@gem-sdk/system';
|
|
9
|
+
import { getFeaturedImageOnlyOneImageStyle } from '../../common/getStyle.js';
|
|
10
|
+
import Carousel from '../../../../../carousel/root/Carousel.js';
|
|
11
|
+
import CarouselItem from '../../../../../carousel/carousel-item/CarouselItem.js';
|
|
12
|
+
import ProductFeaturedImageOnly from './ProductFeaturedImageOnly.js';
|
|
13
|
+
import { useProductFeaturedImageCarousel } from '../../hooks/useProductFeaturedImageCarousel.js';
|
|
14
|
+
|
|
15
|
+
const ProductFeaturedImageCarousel = (props)=>{
|
|
16
|
+
const { productImages, imgRef, onHandleClick, onClickArrow, onHandleLoaded, onHandleUpdateActiveIndex, builderPropUID, builderPropsClass, children, parentUid, ...setting } = props;
|
|
17
|
+
const { ref, imageActive, imageActiveIndex, imageShowWhenHover, enableOpenLightBox, filteredProductImages, isRenderFeatureCarousel, genRandomKey, getAspectRatioFinal, emitUpdateActiveIndex } = useProductFeaturedImageCarousel(props);
|
|
18
|
+
const currentDevice = useCurrentDevice();
|
|
19
|
+
const { galleryItemClasses, featureImageOnlyOneImageClasses } = getProductImagesClassName(setting);
|
|
20
|
+
const { featuredImageCarouselStyle, featureImageCarouselItemStyle } = getProductImagesStyles(setting);
|
|
21
|
+
const featureImageOnlyOneImageStyle = createStyle({
|
|
22
|
+
...getFeaturedImageOnlyOneImageStyle({
|
|
23
|
+
setting,
|
|
24
|
+
options: {
|
|
25
|
+
enableRadius: true,
|
|
26
|
+
enableHeight: true
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
const { featuredImageCarouselSettingAttrs } = getProductImagesAttr(setting);
|
|
31
|
+
return /*#__PURE__*/ jsx("div", {
|
|
32
|
+
ref: ref,
|
|
33
|
+
"data-slot": "children",
|
|
34
|
+
className: "product-feature-image",
|
|
35
|
+
children: isRenderFeatureCarousel ? /*#__PURE__*/ jsxs(Carousel, {
|
|
36
|
+
parentClass: builderPropsClass,
|
|
37
|
+
elmRef: imgRef,
|
|
38
|
+
setting: featuredImageCarouselSettingAttrs,
|
|
39
|
+
styles: featuredImageCarouselStyle,
|
|
40
|
+
builderProps: {
|
|
41
|
+
uid: builderPropUID
|
|
42
|
+
},
|
|
43
|
+
isHiddenArrowWhenDisabled: true,
|
|
44
|
+
onLoaded: (status)=>onHandleLoaded && onHandleLoaded(status),
|
|
45
|
+
onChangeActive: (index)=>emitUpdateActiveIndex(index),
|
|
46
|
+
onClickArrow: ()=>onClickArrow && onClickArrow(genRandomKey()),
|
|
47
|
+
moveToIdx: imageActiveIndex,
|
|
48
|
+
disableMarginAuto: true,
|
|
49
|
+
onHandleChangeSlideByInteraction: (idx)=>{
|
|
50
|
+
const length = filteredProductImages?.length ?? 0;
|
|
51
|
+
const index = idx >= length ? 0 : idx;
|
|
52
|
+
onHandleClick(filteredProductImages?.[index]?.id ?? '', enableOpenLightBox);
|
|
53
|
+
},
|
|
54
|
+
children: [
|
|
55
|
+
children,
|
|
56
|
+
filteredProductImages?.map((image)=>{
|
|
57
|
+
return /*#__PURE__*/ jsx(CarouselItem, {
|
|
58
|
+
contentType: "productImage",
|
|
59
|
+
className: galleryItemClasses('gp-ft-image-item'),
|
|
60
|
+
onClickItem: ()=>{
|
|
61
|
+
const clickEffect = getResponsiveValueByScreen(setting?.ftClickOpenLightBox, currentDevice);
|
|
62
|
+
if (clickEffect !== 'none') onHandleClick(image?.id ?? '', enableOpenLightBox);
|
|
63
|
+
},
|
|
64
|
+
style: featureImageCarouselItemStyle,
|
|
65
|
+
onMouseMove: (e)=>handleMouseMove(e, setting),
|
|
66
|
+
onMouseOut: (e)=>handleMouseOut(e),
|
|
67
|
+
children: /*#__PURE__*/ jsx(ProductFeaturedImageOnly, {
|
|
68
|
+
image: image,
|
|
69
|
+
imageShowWhenHover: imageShowWhenHover,
|
|
70
|
+
setting: setting,
|
|
71
|
+
aspectRatio: getAspectRatioFinal()
|
|
72
|
+
})
|
|
73
|
+
}, image?.id);
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}) : /*#__PURE__*/ jsx("div", {
|
|
77
|
+
ref: imgRef,
|
|
78
|
+
className: "gp-flex gp-w-full",
|
|
79
|
+
style: {
|
|
80
|
+
...makeStyleResponsive('jc', setting?.align)
|
|
81
|
+
},
|
|
82
|
+
"data-id": builderPropUID,
|
|
83
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
84
|
+
"aria-hidden": "true",
|
|
85
|
+
className: featureImageOnlyOneImageClasses,
|
|
86
|
+
style: featureImageOnlyOneImageStyle,
|
|
87
|
+
onMouseMove: (e)=>handleMouseMove(e, setting),
|
|
88
|
+
onMouseOut: (e)=>handleMouseOut(e),
|
|
89
|
+
onBlur: ()=>void 0,
|
|
90
|
+
onClick: ()=>{
|
|
91
|
+
onHandleClick(imageActive?.id ?? '', enableOpenLightBox);
|
|
92
|
+
},
|
|
93
|
+
children: /*#__PURE__*/ jsx(ProductFeaturedImageOnly, {
|
|
94
|
+
image: imageActive,
|
|
95
|
+
imageShowWhenHover: imageShowWhenHover,
|
|
96
|
+
setting: setting,
|
|
97
|
+
aspectRatio: getAspectRatioFinal(imageActive)
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
var ProductFeaturedImageCarousel$1 = /*#__PURE__*/ memo(ProductFeaturedImageCarousel);
|
|
104
|
+
|
|
105
|
+
export { ProductFeaturedImageCarousel$1 as default };
|
package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeaturedImageOnly.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useProduct, useCurrentDevice, useShopStore, useEditorMode, getResponsiveValueByScreen, cls, makeStyle } from '@gem-sdk/core';
|
|
4
|
+
import { memo, useMemo } from 'react';
|
|
5
|
+
import NextImage from '../../../../../image/components/NextImage.js';
|
|
6
|
+
import MediaIcon from './MediaIcon.js';
|
|
7
|
+
import { isFeatureMedia, getZoomImageClass, getZoomLenClass } from '../../common/productFeaturedImage.js';
|
|
8
|
+
import ProductFeatureVideo from './ProductFeatureVideo.js';
|
|
9
|
+
|
|
10
|
+
const defaultImage = {
|
|
11
|
+
src: 'https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif',
|
|
12
|
+
id: `noImageError`,
|
|
13
|
+
width: 480,
|
|
14
|
+
height: 480,
|
|
15
|
+
alt: `no image`,
|
|
16
|
+
contentType: 'IMAGE'
|
|
17
|
+
};
|
|
18
|
+
const ProductFeaturedImageOnly = ({ image, imageShowWhenHover, setting, aspectRatio })=>{
|
|
19
|
+
const product = useProduct();
|
|
20
|
+
const currentDevice = useCurrentDevice();
|
|
21
|
+
const storefrontUrl = useShopStore((state)=>state.storefrontUrl);
|
|
22
|
+
const mode = useEditorMode();
|
|
23
|
+
const isClickEffect = useMemo(()=>getResponsiveValueByScreen(setting.ftClickOpenLightBox, currentDevice) !== 'none', [
|
|
24
|
+
currentDevice,
|
|
25
|
+
setting.ftClickOpenLightBox
|
|
26
|
+
]);
|
|
27
|
+
const isRenderVideo = useMemo(()=>mode !== 'edit' && [
|
|
28
|
+
'VIDEO',
|
|
29
|
+
'EXTERNAL_VIDEO'
|
|
30
|
+
].includes(image?.contentType || '') && !isClickEffect, [
|
|
31
|
+
mode,
|
|
32
|
+
image?.contentType,
|
|
33
|
+
isClickEffect
|
|
34
|
+
]);
|
|
35
|
+
const renderImage = useMemo(()=>{
|
|
36
|
+
if (!image) return defaultImage;
|
|
37
|
+
return {
|
|
38
|
+
...image,
|
|
39
|
+
src: isRenderVideo ? image.src : isFeatureMedia(image?.contentType) ? image?.previewImage : image.src
|
|
40
|
+
};
|
|
41
|
+
}, [
|
|
42
|
+
image,
|
|
43
|
+
isRenderVideo
|
|
44
|
+
]);
|
|
45
|
+
const shopifyProductLink = useMemo(()=>{
|
|
46
|
+
if (!storefrontUrl) return `#`;
|
|
47
|
+
const url = new URL(storefrontUrl);
|
|
48
|
+
if (product) {
|
|
49
|
+
return `${url.protocol}//${url.host}/products/${product.handle}`;
|
|
50
|
+
}
|
|
51
|
+
return `#`;
|
|
52
|
+
}, [
|
|
53
|
+
storefrontUrl,
|
|
54
|
+
product
|
|
55
|
+
]);
|
|
56
|
+
const handleProductLink = (children)=>{
|
|
57
|
+
if (getResponsiveValueByScreen(setting.ftClickOpenLightBox, currentDevice) === 'product-link') return /*#__PURE__*/ jsx("a", {
|
|
58
|
+
title: product?.title,
|
|
59
|
+
href: shopifyProductLink,
|
|
60
|
+
className: "gp-w-full",
|
|
61
|
+
children: children
|
|
62
|
+
});
|
|
63
|
+
return children;
|
|
64
|
+
};
|
|
65
|
+
const isRenderHoverImage = useMemo(()=>setting?.hoverEffect !== 'none' && !isFeatureMedia(renderImage?.contentType), [
|
|
66
|
+
renderImage?.contentType,
|
|
67
|
+
setting?.hoverEffect
|
|
68
|
+
]);
|
|
69
|
+
const isZoomImage = useMemo(()=>setting?.hoverEffect == 'zoom' && setting?.zoomType == 'glasses' && !isFeatureMedia(renderImage?.contentType), [
|
|
70
|
+
renderImage?.contentType,
|
|
71
|
+
setting?.hoverEffect,
|
|
72
|
+
setting?.zoomType
|
|
73
|
+
]);
|
|
74
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
75
|
+
children: handleProductLink(/*#__PURE__*/ jsx(Fragment, {
|
|
76
|
+
children: isRenderVideo ? /*#__PURE__*/ jsx(ProductFeatureVideo, {
|
|
77
|
+
type: renderImage?.contentType,
|
|
78
|
+
url: renderImage.src ?? '',
|
|
79
|
+
aspectRatio: aspectRatio
|
|
80
|
+
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
81
|
+
children: [
|
|
82
|
+
/*#__PURE__*/ jsx(NextImage, {
|
|
83
|
+
draggable: "false",
|
|
84
|
+
src: renderImage.src,
|
|
85
|
+
width: renderImage?.width,
|
|
86
|
+
height: renderImage?.height,
|
|
87
|
+
alt: renderImage?.alt,
|
|
88
|
+
setting: {
|
|
89
|
+
aspectRatio: aspectRatio,
|
|
90
|
+
layout: setting?.ftLayout
|
|
91
|
+
},
|
|
92
|
+
priority: setting?.preload,
|
|
93
|
+
className: "featured-image-only",
|
|
94
|
+
style: {
|
|
95
|
+
width: '100%',
|
|
96
|
+
height: '100%',
|
|
97
|
+
cursor: 'pointer'
|
|
98
|
+
}
|
|
99
|
+
}),
|
|
100
|
+
/*#__PURE__*/ jsx(MediaIcon, {
|
|
101
|
+
contentType: renderImage?.contentType ?? ''
|
|
102
|
+
}),
|
|
103
|
+
isRenderHoverImage && /*#__PURE__*/ jsx(NextImage, {
|
|
104
|
+
draggable: "false",
|
|
105
|
+
src: setting?.hoverEffect === 'other' ? imageShowWhenHover?.src : renderImage.src,
|
|
106
|
+
width: setting?.hoverEffect === 'other' ? imageShowWhenHover?.width : renderImage.width,
|
|
107
|
+
height: setting?.hoverEffect === 'other' ? imageShowWhenHover?.height : renderImage.height,
|
|
108
|
+
alt: setting?.hoverEffect === 'other' ? imageShowWhenHover?.alt : renderImage.alt,
|
|
109
|
+
setting: {
|
|
110
|
+
layout: setting.ftLayout,
|
|
111
|
+
aspectRatio: aspectRatio
|
|
112
|
+
},
|
|
113
|
+
style: {
|
|
114
|
+
width: '100%',
|
|
115
|
+
height: '100%'
|
|
116
|
+
},
|
|
117
|
+
className: cls('hover-image featured-image-only !gp-max-w-none', getZoomImageClass()),
|
|
118
|
+
priority: setting?.preload
|
|
119
|
+
}),
|
|
120
|
+
isZoomImage && /*#__PURE__*/ jsx("div", {
|
|
121
|
+
className: cls(getZoomLenClass(), 'room-len'),
|
|
122
|
+
style: {
|
|
123
|
+
...makeStyle({
|
|
124
|
+
bgi: `url("${renderImage?.src}")`
|
|
125
|
+
})
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
})
|
|
130
|
+
}))
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
var ProductFeaturedImageOnly$1 = /*#__PURE__*/ memo(ProductFeaturedImageOnly);
|
|
134
|
+
|
|
135
|
+
export { ProductFeaturedImageOnly$1 as default };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useCurrentDevice, cls, getResponsiveValueByScreen, makeStyle } from '@gem-sdk/core';
|
|
3
|
+
import { memo } from 'react';
|
|
4
|
+
import { getAspectRatio } from '../../common/common.js';
|
|
5
|
+
import NextImage from '../../../../../image/components/NextImage.js';
|
|
6
|
+
import ButtonOpenLightBox from '../lightbox/ButtonOpenLightBox.js';
|
|
7
|
+
import MediaIcon from './MediaIcon.js';
|
|
8
|
+
import { isFeatureMedia, getZoomImageClass, getZoomLenClass } from '../../common/productFeaturedImage.js';
|
|
9
|
+
import { handleMouseMove, handleMouseOut } from '../../common/hoverAction.js';
|
|
10
|
+
import { getProductImagesClassName } from '../../composables/getProductImagesClassName.js';
|
|
11
|
+
import { getProductImagesStyles } from '../../composables/getProductImagesStyles.js';
|
|
12
|
+
import { useProductGalleryGrid } from '../../hooks/useProductGalleryGrid.js';
|
|
13
|
+
|
|
14
|
+
const ProductGalleryGrid = (props)=>{
|
|
15
|
+
const { builderPropUID, productImages, onHandleClick, activeIndexFormFeatureImage, children, isHiddenInteraction, ...setting } = props;
|
|
16
|
+
const { isDisplay, shapeByLayout, imageActiveIndex, enableOpenLightBox, isEnableBorderActive, filteredProductImages } = useProductGalleryGrid(props);
|
|
17
|
+
const currentDevice = useCurrentDevice();
|
|
18
|
+
const { galleryGridWrapperClasses, galleryItemClasses } = getProductImagesClassName(setting);
|
|
19
|
+
const { galleryGridStyles, galleryGridItemStyles } = getProductImagesStyles(setting);
|
|
20
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
21
|
+
children: isDisplay && /*#__PURE__*/ jsxs("div", {
|
|
22
|
+
"data-slot": "children",
|
|
23
|
+
"data-id": builderPropUID,
|
|
24
|
+
className: galleryGridWrapperClasses,
|
|
25
|
+
style: galleryGridStyles,
|
|
26
|
+
"gp-data-hidden": `${isHiddenInteraction}`,
|
|
27
|
+
children: [
|
|
28
|
+
filteredProductImages?.map((image, index)=>{
|
|
29
|
+
const canActive = index === imageActiveIndex;
|
|
30
|
+
const imageSrc = isFeatureMedia(image.contentType) ? image.previewImage : image.src;
|
|
31
|
+
return(// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
32
|
+
/*#__PURE__*/ jsxs("div", {
|
|
33
|
+
"aria-hidden": true,
|
|
34
|
+
className: galleryItemClasses(`gem-slider-item-${builderPropUID}
|
|
35
|
+
${canActive && isEnableBorderActive ? 'gem-slider-item-active' : ''}`),
|
|
36
|
+
onClick: ()=>onHandleClick(image?.id || '', enableOpenLightBox),
|
|
37
|
+
style: galleryGridItemStyles,
|
|
38
|
+
onMouseMove: (e)=>handleMouseMove(e, {
|
|
39
|
+
hoverEffect: setting.galleryHoverEffect,
|
|
40
|
+
zoom: setting.galleryZoom,
|
|
41
|
+
zoomType: setting.galleryZoomType
|
|
42
|
+
}),
|
|
43
|
+
onMouseOut: (e)=>handleMouseOut(e),
|
|
44
|
+
"data-border": canActive && !!setting?.borderActive ? 'active' : 'deactive',
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ jsx(NextImage, {
|
|
47
|
+
src: imageSrc,
|
|
48
|
+
width: image?.width,
|
|
49
|
+
height: image?.height,
|
|
50
|
+
alt: image?.alt,
|
|
51
|
+
setting: {
|
|
52
|
+
aspectRatio: getAspectRatio(shapeByLayout),
|
|
53
|
+
layout: setting?.layout
|
|
54
|
+
},
|
|
55
|
+
style: {
|
|
56
|
+
width: '100%',
|
|
57
|
+
height: '100%'
|
|
58
|
+
}
|
|
59
|
+
}, image?.id),
|
|
60
|
+
/*#__PURE__*/ jsx(MediaIcon, {
|
|
61
|
+
contentType: image?.contentType || ''
|
|
62
|
+
}),
|
|
63
|
+
setting?.galleryHoverEffect !== 'none' && !isFeatureMedia(image?.contentType) && /*#__PURE__*/ jsx(NextImage, {
|
|
64
|
+
src: imageSrc,
|
|
65
|
+
width: image?.width,
|
|
66
|
+
height: image?.height,
|
|
67
|
+
alt: image?.alt,
|
|
68
|
+
setting: {
|
|
69
|
+
layout: setting.layout,
|
|
70
|
+
aspectRatio: getAspectRatio(shapeByLayout)
|
|
71
|
+
},
|
|
72
|
+
className: cls('hover-image !gp-max-w-none', getZoomImageClass())
|
|
73
|
+
}),
|
|
74
|
+
setting?.galleryHoverEffect == 'zoom' && setting?.galleryZoomType == 'glasses' && [
|
|
75
|
+
'one-col',
|
|
76
|
+
'two-col'
|
|
77
|
+
].includes(getResponsiveValueByScreen(setting.position, currentDevice) || '') && !isFeatureMedia(image?.contentType) && /*#__PURE__*/ jsx("div", {
|
|
78
|
+
className: cls(getZoomLenClass(), 'room-len'),
|
|
79
|
+
style: {
|
|
80
|
+
...makeStyle({
|
|
81
|
+
bgi: `url("${image?.src}")`
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
}),
|
|
85
|
+
getResponsiveValueByScreen(setting?.clickOpenLightBox, currentDevice) && /*#__PURE__*/ jsx(ButtonOpenLightBox, {})
|
|
86
|
+
]
|
|
87
|
+
}, image?.id));
|
|
88
|
+
}),
|
|
89
|
+
children
|
|
90
|
+
]
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
var ProductGalleryGrid$1 = /*#__PURE__*/ memo(ProductGalleryGrid);
|
|
95
|
+
|
|
96
|
+
export { ProductGalleryGrid$1 as default };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { cls } from '@gem-sdk/core';
|
|
3
|
+
import ProductGalleryCarousel from '../gallery-carousel/GalleryCarousel.js';
|
|
4
|
+
import ProductGalleryGrid from '../child/ProductGalleryGrid.js';
|
|
5
|
+
import ProductFeaturedImageCarousel from '../child/ProductFeaturedImageCarousel.js';
|
|
6
|
+
import { getProductImagesStyles } from '../../composables/getProductImagesStyles.js';
|
|
7
|
+
import { getProductImagesClassName } from '../../composables/getProductImagesClassName.js';
|
|
8
|
+
import { useFeatureImageWithGallery } from '../../hooks/useFeatureImageWithGallery.js';
|
|
9
|
+
|
|
10
|
+
const FeatureImageWithGallery = (props)=>{
|
|
11
|
+
const { setting, styles, builderProps, gallery, onHandleClickImage, priorityFeatureImage, children, noDataChildren } = props;
|
|
12
|
+
const settings = {
|
|
13
|
+
...setting,
|
|
14
|
+
...styles
|
|
15
|
+
};
|
|
16
|
+
const { isShowCarousel, featureImageHeight, featureWrapperImage, onClickFeatureArrow, activeIndexFromFeatureImage, setOnClickFeatureArrow, onHandleLoadedFeatureImage, setActiveIndexFromFeatureImage } = useFeatureImageWithGallery(props);
|
|
17
|
+
if (gallery?.[0]?.id === 'noImageError') {
|
|
18
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
19
|
+
children: noDataChildren
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
const { ftImageGalleryClasses, imageGalleryWrapperClasses } = getProductImagesClassName(props);
|
|
23
|
+
const { wrapperFeaturedImageStyle, featureImageStyle, galleryImageStyle } = getProductImagesStyles(settings, {
|
|
24
|
+
gallery,
|
|
25
|
+
featureImageHeight
|
|
26
|
+
});
|
|
27
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
28
|
+
className: cls('gp-grid gp-w-full gp-relative'),
|
|
29
|
+
style: wrapperFeaturedImageStyle,
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ jsx("div", {
|
|
32
|
+
className: ftImageGalleryClasses,
|
|
33
|
+
style: featureImageStyle,
|
|
34
|
+
children: /*#__PURE__*/ jsx(ProductFeaturedImageCarousel, {
|
|
35
|
+
imgRef: featureWrapperImage,
|
|
36
|
+
productImages: gallery,
|
|
37
|
+
...settings,
|
|
38
|
+
onHandleClick: (imageID, enableOpenLightBox)=>onHandleClickImage(imageID || '', enableOpenLightBox),
|
|
39
|
+
onHandleLoaded: onHandleLoadedFeatureImage,
|
|
40
|
+
onHandleUpdateActiveIndex: setActiveIndexFromFeatureImage,
|
|
41
|
+
onClickArrow: (randomKey)=>setOnClickFeatureArrow(randomKey),
|
|
42
|
+
builderPropUID: builderProps?.uid,
|
|
43
|
+
builderPropsClass: `gp-product-images-feature-${builderProps?.uid}`,
|
|
44
|
+
children: children
|
|
45
|
+
})
|
|
46
|
+
}),
|
|
47
|
+
gallery.length > 1 && /*#__PURE__*/ jsx("div", {
|
|
48
|
+
className: imageGalleryWrapperClasses,
|
|
49
|
+
style: galleryImageStyle,
|
|
50
|
+
children: isShowCarousel ? /*#__PURE__*/ jsx(ProductGalleryCarousel, {
|
|
51
|
+
productImages: gallery,
|
|
52
|
+
position: settings?.position,
|
|
53
|
+
...settings,
|
|
54
|
+
builderPropUID: builderProps?.uid,
|
|
55
|
+
onHandleClick: (imageID, enableOpenLightBox)=>onHandleClickImage(imageID || '', enableOpenLightBox),
|
|
56
|
+
activeIndexFormFeatureImage: activeIndexFromFeatureImage,
|
|
57
|
+
priorityFeatureImage: priorityFeatureImage,
|
|
58
|
+
onClickFeatureArrow: onClickFeatureArrow,
|
|
59
|
+
builderPropsClass: `gp-product-images-gallery-${builderProps?.uid}`
|
|
60
|
+
}) : /*#__PURE__*/ jsx(ProductGalleryGrid, {
|
|
61
|
+
productImages: gallery,
|
|
62
|
+
...settings,
|
|
63
|
+
builderPropUID: builderProps?.uid,
|
|
64
|
+
onHandleClick: (imageID, enableOpenLightBox)=>onHandleClickImage(imageID || '', enableOpenLightBox),
|
|
65
|
+
activeIndexFormFeatureImage: activeIndexFromFeatureImage,
|
|
66
|
+
isHiddenInteraction: true
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export { FeatureImageWithGallery as default };
|