@gem-sdk/components 2.0.0-dev.336 → 2.0.0-dev.337

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.
@@ -26,61 +26,57 @@ const ProductGalleryCarousel = (props)=>{
26
26
  const { galleryCarouselSettingAttrs } = getProductImagesAttr.getProductImagesAttr(setting);
27
27
  const { galleryCarouselStyle, galleryCarouselItemStyle } = getProductImagesStyles.getProductImagesStyles(setting);
28
28
  const { moveToIdx, isDisplay, shapeByLayout, isEnableBorderActive, isShowButtonLightbox, filteredProductImages, handleClickCarouselItem } = useGalleryCarousel.useGalleryCarousel(props);
29
- return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
30
- children: [
31
- "(",
32
- isDisplay && /*#__PURE__*/ jsxRuntime.jsx(Carousel.default, {
33
- parentClass: builderPropsClass,
34
- rootClass: builderPropsClass,
35
- setting: galleryCarouselSettingAttrs,
36
- styles: galleryCarouselStyle,
37
- slidesClass: productGallery.getEditorMinHeightClass(currentDevice, setting.position, setting.navigationPosition),
38
- builderProps: {
39
- uid: `${builderPropUID}-carousel`
40
- },
41
- moveToIdx: moveToIdx,
42
- isHiddenArrowWhenDisabled: true,
43
- disableMarginAuto: true,
44
- children: filteredProductImages?.map((image, index)=>{
45
- const canActive = index === moveToIdx;
46
- const imageSrc = productFeaturedImage.isFeatureMedia(image.contentType) ? image.previewImage : image.src;
47
- return /*#__PURE__*/ jsxRuntime.jsxs(CarouselItem.default, {
48
- contentType: "productImage",
49
- className: galleryItemClasses(`gp-gallery-image-item gem-slider-item-${builderPropUID} ${canActive && isEnableBorderActive ? 'gem-slider-item-active' : ''}`),
50
- onClickItem: ()=>handleClickCarouselItem(image?.id),
51
- style: galleryCarouselItemStyle,
52
- "data-id": image?.id,
53
- "data-border": canActive && !!setting?.borderActive && setting?.activeEffectEnable ? 'active' : 'deactive',
54
- children: [
55
- /*#__PURE__*/ jsxRuntime.jsx(NextImage.default, {
56
- draggable: "false",
57
- src: imageSrc,
58
- width: image?.width,
59
- height: image?.height,
60
- alt: image?.alt,
61
- setting: {
62
- aspectRatio: common.getAspectRatio(shapeByLayout),
63
- layout: setting?.layout,
64
- qualityPercent: setting?.qualityPercent,
65
- qualityType: setting?.qualityType
66
- },
67
- style: {
68
- width: '100%',
69
- height: '100%',
70
- cursor: 'pointer'
71
- },
72
- className: "product-list-image"
73
- }),
74
- /*#__PURE__*/ jsxRuntime.jsx(MediaIcon.default, {
75
- contentType: image?.contentType || ''
76
- }),
77
- system.If(isShowButtonLightbox, /*#__PURE__*/ jsxRuntime.jsx(ButtonOpenLightBox.default, {}))
78
- ]
79
- }, image?.id);
80
- })
81
- }),
82
- ")"
83
- ]
29
+ return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
30
+ children: isDisplay && /*#__PURE__*/ jsxRuntime.jsx(Carousel.default, {
31
+ parentClass: builderPropsClass,
32
+ rootClass: builderPropsClass,
33
+ setting: galleryCarouselSettingAttrs,
34
+ styles: galleryCarouselStyle,
35
+ slidesClass: productGallery.getEditorMinHeightClass(currentDevice, setting.position, setting.navigationPosition),
36
+ builderProps: {
37
+ uid: `${builderPropUID}-carousel`
38
+ },
39
+ moveToIdx: moveToIdx,
40
+ isHiddenArrowWhenDisabled: true,
41
+ disableMarginAuto: true,
42
+ children: filteredProductImages?.map((image, index)=>{
43
+ const canActive = index === moveToIdx;
44
+ const imageSrc = productFeaturedImage.isFeatureMedia(image.contentType) ? image.previewImage : image.src;
45
+ return /*#__PURE__*/ jsxRuntime.jsxs(CarouselItem.default, {
46
+ contentType: "productImage",
47
+ className: galleryItemClasses(`gp-gallery-image-item gem-slider-item-${builderPropUID} ${canActive && isEnableBorderActive ? 'gem-slider-item-active' : ''}`),
48
+ onClickItem: ()=>handleClickCarouselItem(image?.id),
49
+ style: galleryCarouselItemStyle,
50
+ "data-id": image?.id,
51
+ "data-border": canActive && !!setting?.borderActive && setting?.activeEffectEnable ? 'active' : 'deactive',
52
+ children: [
53
+ /*#__PURE__*/ jsxRuntime.jsx(NextImage.default, {
54
+ draggable: "false",
55
+ src: imageSrc,
56
+ width: image?.width,
57
+ height: image?.height,
58
+ alt: image?.alt,
59
+ setting: {
60
+ aspectRatio: common.getAspectRatio(shapeByLayout),
61
+ layout: setting?.layout,
62
+ qualityPercent: setting?.qualityPercent,
63
+ qualityType: setting?.qualityType
64
+ },
65
+ style: {
66
+ width: '100%',
67
+ height: '100%',
68
+ cursor: 'pointer'
69
+ },
70
+ className: "product-list-image"
71
+ }),
72
+ /*#__PURE__*/ jsxRuntime.jsx(MediaIcon.default, {
73
+ contentType: image?.contentType || ''
74
+ }),
75
+ system.If(isShowButtonLightbox, /*#__PURE__*/ jsxRuntime.jsx(ButtonOpenLightBox.default, {}))
76
+ ]
77
+ }, image?.id);
78
+ })
79
+ })
84
80
  });
85
81
  };
86
82
 
@@ -99,7 +99,7 @@ const SettingUIV2 = [
99
99
  fixedValue: 'Custom',
100
100
  iconName: 'polaris-edit',
101
101
  label: {
102
- en: 'Featured image slider'
102
+ en: 'Featured slider'
103
103
  },
104
104
  setting: {
105
105
  id: 'ftSlidesActionEnable'
@@ -1,4 +1,4 @@
1
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { useCurrentDevice } from '@gem-sdk/core';
3
3
  import { getAspectRatio } from '../../common/common.js';
4
4
  import { getEditorMinHeightClass } from '../../common/productGallery.js';
@@ -22,61 +22,57 @@ const ProductGalleryCarousel = (props)=>{
22
22
  const { galleryCarouselSettingAttrs } = getProductImagesAttr(setting);
23
23
  const { galleryCarouselStyle, galleryCarouselItemStyle } = getProductImagesStyles(setting);
24
24
  const { moveToIdx, isDisplay, shapeByLayout, isEnableBorderActive, isShowButtonLightbox, filteredProductImages, handleClickCarouselItem } = useGalleryCarousel(props);
25
- return /*#__PURE__*/ jsxs(Fragment, {
26
- children: [
27
- "(",
28
- isDisplay && /*#__PURE__*/ jsx(Carousel, {
29
- parentClass: builderPropsClass,
30
- rootClass: builderPropsClass,
31
- setting: galleryCarouselSettingAttrs,
32
- styles: galleryCarouselStyle,
33
- slidesClass: getEditorMinHeightClass(currentDevice, setting.position, setting.navigationPosition),
34
- builderProps: {
35
- uid: `${builderPropUID}-carousel`
36
- },
37
- moveToIdx: moveToIdx,
38
- isHiddenArrowWhenDisabled: true,
39
- disableMarginAuto: true,
40
- children: filteredProductImages?.map((image, index)=>{
41
- const canActive = index === moveToIdx;
42
- const imageSrc = isFeatureMedia(image.contentType) ? image.previewImage : image.src;
43
- return /*#__PURE__*/ jsxs(CarouselItem, {
44
- contentType: "productImage",
45
- className: galleryItemClasses(`gp-gallery-image-item gem-slider-item-${builderPropUID} ${canActive && isEnableBorderActive ? 'gem-slider-item-active' : ''}`),
46
- onClickItem: ()=>handleClickCarouselItem(image?.id),
47
- style: galleryCarouselItemStyle,
48
- "data-id": image?.id,
49
- "data-border": canActive && !!setting?.borderActive && setting?.activeEffectEnable ? 'active' : 'deactive',
50
- children: [
51
- /*#__PURE__*/ jsx(NextImage, {
52
- draggable: "false",
53
- src: imageSrc,
54
- width: image?.width,
55
- height: image?.height,
56
- alt: image?.alt,
57
- setting: {
58
- aspectRatio: getAspectRatio(shapeByLayout),
59
- layout: setting?.layout,
60
- qualityPercent: setting?.qualityPercent,
61
- qualityType: setting?.qualityType
62
- },
63
- style: {
64
- width: '100%',
65
- height: '100%',
66
- cursor: 'pointer'
67
- },
68
- className: "product-list-image"
69
- }),
70
- /*#__PURE__*/ jsx(MediaIcon, {
71
- contentType: image?.contentType || ''
72
- }),
73
- If(isShowButtonLightbox, /*#__PURE__*/ jsx(ButtonOpenLightBox, {}))
74
- ]
75
- }, image?.id);
76
- })
77
- }),
78
- ")"
79
- ]
25
+ return /*#__PURE__*/ jsx(Fragment, {
26
+ children: isDisplay && /*#__PURE__*/ jsx(Carousel, {
27
+ parentClass: builderPropsClass,
28
+ rootClass: builderPropsClass,
29
+ setting: galleryCarouselSettingAttrs,
30
+ styles: galleryCarouselStyle,
31
+ slidesClass: getEditorMinHeightClass(currentDevice, setting.position, setting.navigationPosition),
32
+ builderProps: {
33
+ uid: `${builderPropUID}-carousel`
34
+ },
35
+ moveToIdx: moveToIdx,
36
+ isHiddenArrowWhenDisabled: true,
37
+ disableMarginAuto: true,
38
+ children: filteredProductImages?.map((image, index)=>{
39
+ const canActive = index === moveToIdx;
40
+ const imageSrc = isFeatureMedia(image.contentType) ? image.previewImage : image.src;
41
+ return /*#__PURE__*/ jsxs(CarouselItem, {
42
+ contentType: "productImage",
43
+ className: galleryItemClasses(`gp-gallery-image-item gem-slider-item-${builderPropUID} ${canActive && isEnableBorderActive ? 'gem-slider-item-active' : ''}`),
44
+ onClickItem: ()=>handleClickCarouselItem(image?.id),
45
+ style: galleryCarouselItemStyle,
46
+ "data-id": image?.id,
47
+ "data-border": canActive && !!setting?.borderActive && setting?.activeEffectEnable ? 'active' : 'deactive',
48
+ children: [
49
+ /*#__PURE__*/ jsx(NextImage, {
50
+ draggable: "false",
51
+ src: imageSrc,
52
+ width: image?.width,
53
+ height: image?.height,
54
+ alt: image?.alt,
55
+ setting: {
56
+ aspectRatio: getAspectRatio(shapeByLayout),
57
+ layout: setting?.layout,
58
+ qualityPercent: setting?.qualityPercent,
59
+ qualityType: setting?.qualityType
60
+ },
61
+ style: {
62
+ width: '100%',
63
+ height: '100%',
64
+ cursor: 'pointer'
65
+ },
66
+ className: "product-list-image"
67
+ }),
68
+ /*#__PURE__*/ jsx(MediaIcon, {
69
+ contentType: image?.contentType || ''
70
+ }),
71
+ If(isShowButtonLightbox, /*#__PURE__*/ jsx(ButtonOpenLightBox, {}))
72
+ ]
73
+ }, image?.id);
74
+ })
75
+ })
80
76
  });
81
77
  };
82
78
 
@@ -97,7 +97,7 @@ const SettingUIV2 = [
97
97
  fixedValue: 'Custom',
98
98
  iconName: 'polaris-edit',
99
99
  label: {
100
- en: 'Featured image slider'
100
+ en: 'Featured slider'
101
101
  },
102
102
  setting: {
103
103
  id: 'ftSlidesActionEnable'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.336",
3
+ "version": "2.0.0-dev.337",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",