@gem-sdk/components 2.0.0-dev.370 → 2.0.0-dev.372
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/ArticleDate/presets.js +1 -1
- package/dist/cjs/article/setting/configs/ArticleDate/settings.js +3 -0
- package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +20 -1
- package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +10 -10
- package/dist/cjs/builder.js +2 -2
- package/dist/cjs/button/setting/configs/settings.js +0 -14
- package/dist/cjs/carousel/arrow/Arrow.js +52 -0
- package/dist/cjs/carousel/arrow/Arrow.liquid.js +46 -0
- package/dist/cjs/carousel/{components/common/arrow.js → arrow/common/common.js} +13 -11
- package/dist/cjs/carousel/arrow/common/getClass.js +50 -0
- package/dist/cjs/carousel/arrow/common/getStyle.js +84 -0
- package/dist/cjs/carousel/carousel-item/CarouselItem.js +32 -0
- package/dist/cjs/carousel/carousel-item/CarouselItem.liquid.js +38 -0
- package/dist/cjs/carousel/carousel-item/common/getClass.js +29 -0
- package/dist/cjs/carousel/{components/CarouselItem.liquid.js → carousel-item/common/getStyle.js} +30 -47
- package/dist/cjs/carousel/carousel-item/hook/useCarouseItem.js +14 -0
- package/dist/cjs/carousel/components/const/index.js +5 -0
- package/dist/cjs/carousel/dots/Dots.js +51 -0
- package/dist/cjs/carousel/dots/Dots.liquid.js +26 -0
- package/dist/cjs/carousel/dots/common/common.js +46 -0
- package/dist/cjs/carousel/dots/common/getClass.js +40 -0
- package/dist/cjs/carousel/dots/common/getStyle.js +33 -0
- package/dist/cjs/carousel/dots/hook/useDotsSetting.js +21 -0
- package/dist/cjs/carousel/index.js +1 -2
- package/dist/cjs/carousel/next.js +2 -2
- package/dist/cjs/carousel/root/Carousel.js +129 -0
- package/dist/cjs/carousel/root/Carousel.liquid.js +104 -0
- package/dist/cjs/carousel/root/common/getAttr.js +25 -0
- package/dist/cjs/carousel/root/common/getClass.js +135 -0
- package/dist/cjs/carousel/root/common/getData.js +56 -0
- package/dist/cjs/carousel/root/common/getStyle.js +64 -0
- package/dist/cjs/carousel/{components/Carousel.js → root/hook/useCarousel.js} +153 -321
- package/dist/cjs/carousel/setting/Carousel.js +8 -1555
- package/dist/cjs/carousel/setting/configs/presets.js +380 -0
- package/dist/cjs/carousel/setting/configs/settingV2.js +771 -0
- package/dist/cjs/carousel/setting/configs/uiV1.js +434 -0
- package/dist/cjs/carousel/setting/configs/uiV2.js +627 -0
- package/dist/cjs/common/components/NoDataState.js +5 -5
- package/dist/cjs/grid/row/commons/common.js +3 -3
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.liquid.js +2 -2
- package/dist/cjs/product/components/ProductImages/ProductGalleryCarousel.js +2 -2
- package/dist/cjs/product/components/ProductImages/ProductImagesLightBox.js +2 -2
- package/dist/cjs/product/components/ProductImages/liquid/ProductGalleryCarousel.liquid.js +5 -3
- package/dist/cjs/product/components/ProductImagesV2/common/getAttr.js +1 -0
- package/dist/cjs/product/components/ProductImagesV2/common/productFeaturedImage.js +1 -1
- package/dist/cjs/product/components/ProductImagesV2/common/productGallery.js +1 -1
- package/dist/cjs/product/components/ProductImagesV2/components/child/ProductFeaturedImageCarousel.js +5 -5
- package/dist/cjs/product/components/ProductImagesV2/components/feature-gallery/FeatureImageWithGallery.liquid.js +8 -4
- package/dist/cjs/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.js +2 -2
- package/dist/cjs/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.liquid.js +6 -3
- package/dist/cjs/product/components/ProductImagesV2/components/lightbox/ProductImagesLightBox.js +2 -2
- package/dist/cjs/product/components/ProductImagesV2/hooks/useProductFeaturedImageCarousel.js +3 -3
- package/dist/cjs/product/components/ProductList/ProductListCarouselLayout.js +2 -2
- package/dist/cjs/product/components/ProductList/ProductListCarouselLayout.liquid.js +5 -3
- package/dist/cjs/product/components/ProductList/common/index.js +5 -5
- package/dist/cjs/product/components/ProductVariants/common/main/getAttr.js +1 -1
- package/dist/cjs/text/components/Text.js +3 -3
- package/dist/esm/article/setting/configs/ArticleDate/presets.js +1 -1
- package/dist/esm/article/setting/configs/ArticleDate/settings.js +3 -0
- package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +20 -1
- package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +10 -10
- package/dist/esm/builder.js +2 -2
- package/dist/esm/button/setting/configs/settings.js +0 -14
- package/dist/esm/carousel/arrow/Arrow.js +48 -0
- package/dist/esm/carousel/arrow/Arrow.liquid.js +42 -0
- package/dist/esm/carousel/{components/common/arrow.js → arrow/common/common.js} +12 -10
- package/dist/esm/carousel/arrow/common/getClass.js +48 -0
- package/dist/esm/carousel/arrow/common/getStyle.js +82 -0
- package/dist/esm/carousel/carousel-item/CarouselItem.js +28 -0
- package/dist/esm/carousel/carousel-item/CarouselItem.liquid.js +34 -0
- package/dist/esm/carousel/carousel-item/common/getClass.js +27 -0
- package/dist/esm/carousel/{components/CarouselItem.liquid.js → carousel-item/common/getStyle.js} +31 -46
- package/dist/esm/carousel/carousel-item/hook/useCarouseItem.js +12 -0
- package/dist/esm/carousel/components/const/index.js +3 -0
- package/dist/esm/carousel/dots/Dots.js +47 -0
- package/dist/esm/carousel/dots/Dots.liquid.js +22 -0
- package/dist/esm/carousel/dots/common/common.js +43 -0
- package/dist/esm/carousel/dots/common/getClass.js +38 -0
- package/dist/esm/carousel/dots/common/getStyle.js +31 -0
- package/dist/esm/carousel/dots/hook/useDotsSetting.js +19 -0
- package/dist/esm/carousel/index.js +1 -2
- package/dist/esm/carousel/next.js +2 -2
- package/dist/esm/carousel/root/Carousel.js +125 -0
- package/dist/esm/carousel/root/Carousel.liquid.js +100 -0
- package/dist/esm/carousel/root/common/getAttr.js +23 -0
- package/dist/esm/carousel/root/common/getClass.js +133 -0
- package/dist/esm/carousel/root/common/getData.js +54 -0
- package/dist/esm/carousel/root/common/getStyle.js +62 -0
- package/dist/esm/carousel/{components/Carousel.js → root/hook/useCarousel.js} +150 -316
- package/dist/esm/carousel/setting/Carousel.js +8 -1555
- package/dist/esm/carousel/setting/configs/presets.js +378 -0
- package/dist/esm/carousel/setting/configs/settingV2.js +769 -0
- package/dist/esm/carousel/setting/configs/uiV1.js +432 -0
- package/dist/esm/carousel/setting/configs/uiV2.js +625 -0
- package/dist/esm/common/components/NoDataState.js +6 -6
- package/dist/esm/grid/row/commons/common.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.liquid.js +2 -2
- package/dist/esm/product/components/ProductImages/ProductGalleryCarousel.js +2 -2
- package/dist/esm/product/components/ProductImages/ProductImagesLightBox.js +2 -2
- package/dist/esm/product/components/ProductImages/liquid/ProductGalleryCarousel.liquid.js +5 -3
- package/dist/esm/product/components/ProductImagesV2/common/getAttr.js +1 -0
- package/dist/esm/product/components/ProductImagesV2/common/productFeaturedImage.js +1 -1
- package/dist/esm/product/components/ProductImagesV2/common/productGallery.js +1 -1
- package/dist/esm/product/components/ProductImagesV2/components/child/ProductFeaturedImageCarousel.js +5 -5
- package/dist/esm/product/components/ProductImagesV2/components/feature-gallery/FeatureImageWithGallery.liquid.js +8 -4
- package/dist/esm/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.js +2 -2
- package/dist/esm/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.liquid.js +6 -3
- package/dist/esm/product/components/ProductImagesV2/components/lightbox/ProductImagesLightBox.js +2 -2
- package/dist/esm/product/components/ProductImagesV2/hooks/useProductFeaturedImageCarousel.js +3 -3
- package/dist/esm/product/components/ProductList/ProductListCarouselLayout.js +2 -2
- package/dist/esm/product/components/ProductList/ProductListCarouselLayout.liquid.js +5 -3
- package/dist/esm/product/components/ProductList/common/index.js +3 -3
- package/dist/esm/product/components/ProductVariants/common/main/getAttr.js +1 -1
- package/dist/esm/text/components/Text.js +4 -4
- package/dist/types/index.d.ts +164 -67
- package/package.json +3 -3
- package/dist/cjs/carousel/components/Arrow.js +0 -110
- package/dist/cjs/carousel/components/Arrow.liquid.js +0 -103
- package/dist/cjs/carousel/components/Carousel.liquid.js +0 -256
- package/dist/cjs/carousel/components/CarouselItem.js +0 -88
- package/dist/cjs/carousel/components/Dots.js +0 -69
- package/dist/cjs/carousel/components/Dots.liquid.js +0 -23
- package/dist/cjs/carousel/components/common/dots.js +0 -57
- package/dist/esm/carousel/components/Arrow.js +0 -106
- package/dist/esm/carousel/components/Arrow.liquid.js +0 -99
- package/dist/esm/carousel/components/Carousel.liquid.js +0 -252
- package/dist/esm/carousel/components/CarouselItem.js +0 -84
- package/dist/esm/carousel/components/Dots.js +0 -65
- package/dist/esm/carousel/components/Dots.liquid.js +0 -19
- package/dist/esm/carousel/components/common/dots.js +0 -53
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
-
import Carousel from '../../../carousel/
|
|
5
|
-
import CarouselItem from '../../../carousel/
|
|
4
|
+
import Carousel from '../../../carousel/root/Carousel.js';
|
|
5
|
+
import CarouselItem from '../../../carousel/carousel-item/CarouselItem.js';
|
|
6
6
|
import { useCurrentDevice, useFeaturedImageGlobal, getResponsiveValueByScreen, makeAspectRatio, cls, makeStyleResponsive, makeWidth } from '@gem-sdk/core';
|
|
7
7
|
import { convertSpacing } from './common/common.js';
|
|
8
8
|
import NextImage from '../../../image/components/NextImage.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useFeaturedImageGlobal, cls } from '@gem-sdk/core';
|
|
4
|
-
import Carousel from '../../../carousel/
|
|
5
|
-
import CarouselItem from '../../../carousel/
|
|
4
|
+
import Carousel from '../../../carousel/root/Carousel.js';
|
|
5
|
+
import CarouselItem from '../../../carousel/carousel-item/CarouselItem.js';
|
|
6
6
|
import NextImage from '../../../image/components/NextImage.js';
|
|
7
7
|
import Modal from '../../../modal/components/Modal.js';
|
|
8
8
|
import '../../../modal/components/confirm.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { template, getResponsiveValueByScreen, makeStyleResponsive, makeWidth } from '@gem-sdk/core';
|
|
2
|
-
import Carousel from '../../../../carousel/
|
|
3
|
-
import CarouselItem from '../../../../carousel/
|
|
2
|
+
import Carousel from '../../../../carousel/root/Carousel.liquid.js';
|
|
3
|
+
import CarouselItem from '../../../../carousel/carousel-item/CarouselItem.liquid.js';
|
|
4
4
|
import NextImage from '../../../../image/components/NextImage.liquid.js';
|
|
5
5
|
import { convertSpacing, getDisplayStyle } from '../common/common.js';
|
|
6
6
|
import { getGalleryImageAspectRatio, getSliderPerShowConfig, getAllowDotConfig, getCarouselVerticalConfigByPosition, getZoomDisplay } from '../common/productGallery.js';
|
|
@@ -98,7 +98,9 @@ const ProductGalleryCarousel = ({ builderPropUID, ...setting })=>{
|
|
|
98
98
|
return template`${Carousel({
|
|
99
99
|
rootId: `${builderPropUID}-{{product.id}}`,
|
|
100
100
|
rootClass: 'gp-flex-1 gp-w-full carousel-gallery',
|
|
101
|
-
|
|
101
|
+
rootAttrs: {
|
|
102
|
+
type: 'grid-carousel'
|
|
103
|
+
},
|
|
102
104
|
isHiddenArrowWhenDisabled: true,
|
|
103
105
|
setting: {
|
|
104
106
|
navigationStyle: {
|
|
@@ -21,7 +21,7 @@ const getZoomImageClass = ()=>{
|
|
|
21
21
|
};
|
|
22
22
|
const getDotStyleForOnlyFeaturedImage = (setting)=>{
|
|
23
23
|
let result = {};
|
|
24
|
-
devices.
|
|
24
|
+
devices.forEach((device)=>{
|
|
25
25
|
const position = getResponsiveValueByScreen(setting.position, device);
|
|
26
26
|
const dotStyle = getResponsiveValueByScreen(setting.dotStyle, device);
|
|
27
27
|
result = {
|
|
@@ -153,7 +153,7 @@ const checkDisplayGalleryByWidth = (setting)=>{
|
|
|
153
153
|
'tablet'
|
|
154
154
|
];
|
|
155
155
|
DEVICES.forEach((device)=>{
|
|
156
|
-
const itemWidth = getResponsiveValueByScreen(setting.shapeByLayout, device)?.width
|
|
156
|
+
const itemWidth = getResponsiveValueByScreen(setting.shapeByLayout, device)?.width ?? '100%';
|
|
157
157
|
const isDisplay = parseInt(itemWidth) !== 0;
|
|
158
158
|
result = {
|
|
159
159
|
...result,
|
package/dist/esm/product/components/ProductImagesV2/components/child/ProductFeaturedImageCarousel.js
CHANGED
|
@@ -7,8 +7,8 @@ import { getProductImagesClassName } from '../../composables/getProductImagesCla
|
|
|
7
7
|
import { getProductImagesAttr } from '../../composables/getProductImagesAttr.js';
|
|
8
8
|
import { createStyle } from '@gem-sdk/system';
|
|
9
9
|
import { getFeaturedImageOnlyOneImageStyle } from '../../common/getStyle.js';
|
|
10
|
-
import Carousel from '../../../../../carousel/
|
|
11
|
-
import CarouselItem from '../../../../../carousel/
|
|
10
|
+
import Carousel from '../../../../../carousel/root/Carousel.js';
|
|
11
|
+
import CarouselItem from '../../../../../carousel/carousel-item/CarouselItem.js';
|
|
12
12
|
import ProductFeaturedImageOnly from './ProductFeaturedImageOnly.js';
|
|
13
13
|
import { useProductFeaturedImageCarousel } from '../../hooks/useProductFeaturedImageCarousel.js';
|
|
14
14
|
|
|
@@ -49,7 +49,7 @@ const ProductFeaturedImageCarousel = (props)=>{
|
|
|
49
49
|
onHandleChangeSlideByInteraction: (idx)=>{
|
|
50
50
|
const length = filteredProductImages?.length ?? 0;
|
|
51
51
|
const index = idx >= length ? 0 : idx;
|
|
52
|
-
onHandleClick(filteredProductImages?.[index]?.id
|
|
52
|
+
onHandleClick(filteredProductImages?.[index]?.id ?? '', enableOpenLightBox);
|
|
53
53
|
},
|
|
54
54
|
children: [
|
|
55
55
|
children,
|
|
@@ -59,7 +59,7 @@ const ProductFeaturedImageCarousel = (props)=>{
|
|
|
59
59
|
className: galleryItemClasses('gp-ft-image-item'),
|
|
60
60
|
onClickItem: ()=>{
|
|
61
61
|
const clickEffect = getResponsiveValueByScreen(setting?.ftClickOpenLightBox, currentDevice);
|
|
62
|
-
if (clickEffect !== 'none') onHandleClick(image?.id
|
|
62
|
+
if (clickEffect !== 'none') onHandleClick(image?.id ?? '', enableOpenLightBox);
|
|
63
63
|
},
|
|
64
64
|
style: featureImageCarouselItemStyle,
|
|
65
65
|
onMouseMove: (e)=>handleMouseMove(e, setting),
|
|
@@ -88,7 +88,7 @@ const ProductFeaturedImageCarousel = (props)=>{
|
|
|
88
88
|
onMouseOut: (e)=>handleMouseOut(e),
|
|
89
89
|
onBlur: ()=>void 0,
|
|
90
90
|
onClick: ()=>{
|
|
91
|
-
onHandleClick(imageActive?.id
|
|
91
|
+
onHandleClick(imageActive?.id ?? '', enableOpenLightBox);
|
|
92
92
|
},
|
|
93
93
|
children: /*#__PURE__*/ jsx(ProductFeaturedImageOnly, {
|
|
94
94
|
image: imageActive,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { makeStyleResponsive, template, cls } from '@gem-sdk/core';
|
|
2
2
|
import { getAspectRatio, getPaddingBottomByShapeSetting, getSrcImage } from '../../common/common.js';
|
|
3
3
|
import { checkRenderFeaturedCarousel, getZoomImageClass, getZoomLenClass } from '../../common/productFeaturedImage.js';
|
|
4
|
-
import Carousel from '../../../../../carousel/
|
|
5
|
-
import CarouselItem from '../../../../../carousel/
|
|
4
|
+
import Carousel from '../../../../../carousel/root/Carousel.liquid.js';
|
|
5
|
+
import CarouselItem from '../../../../../carousel/carousel-item/CarouselItem.liquid.js';
|
|
6
6
|
import HTML5Embed from '../../../../../video/components/HTML5Embed.liquid.js';
|
|
7
7
|
import Model3d from '../../../../../image/components/Modal3d.liquid.js';
|
|
8
8
|
import NextImage from '../../../../../image/components/NextImage.liquid.js';
|
|
@@ -163,7 +163,7 @@ const FeatureImageWithGallery = ({ builderPropUID, children, enableLazyLoadImage
|
|
|
163
163
|
};
|
|
164
164
|
const isRenderFeatureCarousel = checkRenderFeaturedCarousel(setting);
|
|
165
165
|
const FEATURE_IMAGE_WRAPPER_CLASS = 'gp-featured-image-wrapper';
|
|
166
|
-
const carouselChildren = LiquidIf(`product.media.size > 0`, `${LiquidFor(`media in product.media`, `${children
|
|
166
|
+
const carouselChildren = LiquidIf(`product.media.size > 0`, `${LiquidFor(`media in product.media`, `${children || ''} {% assign largestRatio = 0 %}
|
|
167
167
|
${LiquidFor(`featureMedia in product.media`, `{% assign height = featureMedia.height | times: 1.0 %}
|
|
168
168
|
{% assign width = featureMedia.width | times: 1.0 %}
|
|
169
169
|
{% assign ratio = height | divided_by: width %}
|
|
@@ -199,7 +199,11 @@ const FeatureImageWithGallery = ({ builderPropUID, children, enableLazyLoadImage
|
|
|
199
199
|
conditionAppendJs: 'product.media.size > 1',
|
|
200
200
|
wrapperClass: FEATURE_IMAGE_WRAPPER_CLASS,
|
|
201
201
|
rootClass: `${featuredImageCarouselClasses}`,
|
|
202
|
-
|
|
202
|
+
rootAttrs: {
|
|
203
|
+
type: 'gp-feature-image-carousel',
|
|
204
|
+
'product-id': '{{product.id}}',
|
|
205
|
+
'product-media': '{{product.media.size}}'
|
|
206
|
+
},
|
|
203
207
|
isHiddenArrowWhenDisabled: true,
|
|
204
208
|
setting: featuredImageCarouselSettingAttrs,
|
|
205
209
|
rootStyles: featureImageStyle,
|
package/dist/esm/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.js
CHANGED
|
@@ -9,8 +9,8 @@ import { isFeatureMedia } from '../../common/productFeaturedImage.js';
|
|
|
9
9
|
import MediaIcon from '../child/MediaIcon.js';
|
|
10
10
|
import ButtonOpenLightBox from '../lightbox/ButtonOpenLightBox.js';
|
|
11
11
|
import NextImage from '../../../../../image/components/NextImage.js';
|
|
12
|
-
import Carousel from '../../../../../carousel/
|
|
13
|
-
import CarouselItem from '../../../../../carousel/
|
|
12
|
+
import Carousel from '../../../../../carousel/root/Carousel.js';
|
|
13
|
+
import CarouselItem from '../../../../../carousel/carousel-item/CarouselItem.js';
|
|
14
14
|
import { useGalleryCarousel } from '../../hooks/useGalleryCarousel.js';
|
|
15
15
|
import { If } from '@gem-sdk/system';
|
|
16
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { template, makeStyleResponsive, getResponsiveValueByScreen } from '@gem-sdk/core';
|
|
2
|
-
import Carousel from '../../../../../carousel/
|
|
3
|
-
import CarouselItem from '../../../../../carousel/
|
|
2
|
+
import Carousel from '../../../../../carousel/root/Carousel.liquid.js';
|
|
3
|
+
import CarouselItem from '../../../../../carousel/carousel-item/CarouselItem.liquid.js';
|
|
4
4
|
import NextImage from '../../../../../image/components/NextImage.liquid.js';
|
|
5
5
|
import { getPaddingBottomByShapeSetting, getDisplayStyle, getAspectRatio, getSrcImage } from '../../common/common.js';
|
|
6
6
|
import { getShapeByLayout, getMinHeightByPosition, checkDisplayGalleryByWidth, getZoomDisplay, getCarouselVerticalConfigByPosition } from '../../common/productGallery.js';
|
|
@@ -144,7 +144,10 @@ const ProductGalleryCarousel = ({ builderPropUID, children, enableLazyLoadImage,
|
|
|
144
144
|
},
|
|
145
145
|
rootId: `${builderPropUID}-{{product.id}}`,
|
|
146
146
|
rootClass: `${featuredImageGalleryClasses}`,
|
|
147
|
-
|
|
147
|
+
rootAttrs: {
|
|
148
|
+
type: 'grid-carousel',
|
|
149
|
+
'product-media': '{{product.media.size}}'
|
|
150
|
+
},
|
|
148
151
|
wrapperClass: getSpacingClassByVerticalConfig(),
|
|
149
152
|
slidesClass: getMinHeightByPosition(setting.position, setting.navigationPosition),
|
|
150
153
|
isHiddenArrowWhenDisabled: true,
|
package/dist/esm/product/components/ProductImagesV2/components/lightbox/ProductImagesLightBox.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useFeaturedImageGlobal, useEditorMode, cls } from '@gem-sdk/core';
|
|
4
|
-
import Carousel from '../../../../../carousel/
|
|
5
|
-
import CarouselItem from '../../../../../carousel/
|
|
4
|
+
import Carousel from '../../../../../carousel/root/Carousel.js';
|
|
5
|
+
import CarouselItem from '../../../../../carousel/carousel-item/CarouselItem.js';
|
|
6
6
|
import NextImage from '../../../../../image/components/NextImage.js';
|
|
7
7
|
import Modal from '../../../../../modal/components/Modal.js';
|
|
8
8
|
import '../../../../../modal/components/confirm.js';
|
package/dist/esm/product/components/ProductImagesV2/hooks/useProductFeaturedImageCarousel.js
CHANGED
|
@@ -94,9 +94,9 @@ const useProductFeaturedImageCarousel = (props)=>{
|
|
|
94
94
|
const result = getAspectRatio(setting.ftShape);
|
|
95
95
|
const defaultRatio = getDefaultAspectRatio(image);
|
|
96
96
|
return {
|
|
97
|
-
desktop: result.desktop
|
|
98
|
-
tablet: result.tablet
|
|
99
|
-
mobile: result.mobile
|
|
97
|
+
desktop: result.desktop ?? defaultRatio,
|
|
98
|
+
tablet: result.tablet ?? defaultRatio,
|
|
99
|
+
mobile: result.mobile ?? defaultRatio
|
|
100
100
|
};
|
|
101
101
|
};
|
|
102
102
|
const handleSetSrc = useCallback(()=>{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useEditorMode, ProductProvider, isEmptyChildren } from '@gem-sdk/core';
|
|
3
|
-
import Carousel from '../../../carousel/
|
|
4
|
-
import CarouselItem from '../../../carousel/
|
|
3
|
+
import Carousel from '../../../carousel/root/Carousel.js';
|
|
4
|
+
import CarouselItem from '../../../carousel/carousel-item/CarouselItem.js';
|
|
5
5
|
import ChildrenDroppable from '../../../grid/components/ChildrenDroppable.js';
|
|
6
6
|
import { getData } from './common/index.js';
|
|
7
7
|
import { getAttr } from './common/getAttr.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { template } from '@gem-sdk/core';
|
|
2
|
-
import CarouselItem from '../../../carousel/
|
|
3
|
-
import Carousel from '../../../carousel/
|
|
2
|
+
import CarouselItem from '../../../carousel/carousel-item/CarouselItem.liquid.js';
|
|
3
|
+
import Carousel from '../../../carousel/root/Carousel.liquid.js';
|
|
4
4
|
import { getData } from './common/index.js';
|
|
5
5
|
import { getClass } from './common/getClass.js';
|
|
6
6
|
import { getStyle } from './common/getStyle.js';
|
|
@@ -18,7 +18,9 @@ const ProductListCarouselLayout = (props)=>{
|
|
|
18
18
|
builderProps: {
|
|
19
19
|
...builderProps
|
|
20
20
|
},
|
|
21
|
-
|
|
21
|
+
rootAttrs: {
|
|
22
|
+
'items-repeat': 'true'
|
|
23
|
+
},
|
|
22
24
|
rootId: `product-list-carousel-${builderProps?.uid}`,
|
|
23
25
|
rootClass: carouselClass,
|
|
24
26
|
setting: carouselConfigSetting,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getUpdatedArrowDisplay } from '../../../../carousel/
|
|
2
|
-
import { getUpdatedDotStyle } from '../../../../carousel/
|
|
1
|
+
import { getUpdatedArrowDisplay } from '../../../../carousel/arrow/common/common.js';
|
|
2
|
+
import { getUpdatedDotStyle } from '../../../../carousel/dots/common/common.js';
|
|
3
3
|
import { getSizeSetting } from '../../../helpers/product.js';
|
|
4
4
|
import { convertUnitToNumber } from '../../ProductImages/common/productFeaturedImage.js';
|
|
5
5
|
import { PREFIX_COLLECTION_ID, PREFIX_PRODUCT_ID } from './const.js';
|
|
@@ -69,7 +69,7 @@ const getDataLiquid = (props)=>{
|
|
|
69
69
|
const productSetting = setting?.productSetting;
|
|
70
70
|
const relatedTag = productSetting?.relatedTag;
|
|
71
71
|
const hasRelatedExclude = productSetting?.hasRelatedExclude;
|
|
72
|
-
const mainRelatedExclude = (relatedTag && relatedTag[0] === 'collection' ? productSetting?.relatedCollectionExclude : productSetting?.relatedTagsExclude)
|
|
72
|
+
const mainRelatedExclude = (relatedTag && relatedTag[0] === 'collection' ? productSetting?.relatedCollectionExclude : productSetting?.relatedTagsExclude) ?? '';
|
|
73
73
|
const relatedExcludeTrim = mainRelatedExclude?.split(',').map((item)=>item.trim()).toString();
|
|
74
74
|
const productSrc = productSetting?.productSrc ?? 'Collection';
|
|
75
75
|
const collectionID = productSetting?.collectionId?.replace(PREFIX_COLLECTION_ID, '') ?? 'latest';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useEditorMode } from '@gem-sdk/core';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
-
import { createAttr,
|
|
5
|
+
import { createAttr, createStyleReact, createClass, createContent } from '@gem-sdk/system';
|
|
6
6
|
import { getAttr, getTextAttr } from './common/getAttr.js';
|
|
7
7
|
import { getStyle, getContainerStyle, getTextStyle } from './common/getStyle.js';
|
|
8
8
|
import { getClasses, getContainerClasses, getTextClasses } from './common/getClasses.js';
|
|
@@ -19,13 +19,13 @@ const Text = /*#__PURE__*/ forwardRef(({ styles, builderAttrs, style, setting, a
|
|
|
19
19
|
const textAttrs = createAttr({
|
|
20
20
|
...getTextAttr(options)
|
|
21
21
|
});
|
|
22
|
-
const wrapperStyle =
|
|
22
|
+
const wrapperStyle = createStyleReact({
|
|
23
23
|
...getStyle(styles, style)
|
|
24
24
|
});
|
|
25
|
-
const containerStyle =
|
|
25
|
+
const containerStyle = createStyleReact({
|
|
26
26
|
...getContainerStyle(styles, setting)
|
|
27
27
|
});
|
|
28
|
-
const gpTextStyle =
|
|
28
|
+
const gpTextStyle = createStyleReact({
|
|
29
29
|
...getTextStyle(styles, setting)
|
|
30
30
|
});
|
|
31
31
|
const wrapperClasses = createClass({
|