@gem-sdk/components 2.0.0-dev.554 → 2.0.0-dev.556

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.
Files changed (52) hide show
  1. package/dist/cjs/article/components/ArticleList.js +1 -0
  2. package/dist/cjs/article/components/ArticleList.liquid.js +1 -0
  3. package/dist/cjs/article/setting/configs/ArticleList/uiV2.js +16 -0
  4. package/dist/cjs/carousel/carousel-item/CarouselItem.js +4 -2
  5. package/dist/cjs/carousel/carousel-item/hook/useCarouseItem.js +10 -2
  6. package/dist/cjs/carousel/setting/configs/settingV2.js +6 -4
  7. package/dist/cjs/carousel/setting/configs/uiV2.js +4 -1
  8. package/dist/cjs/product/components/ProductImagesV2/common/common.js +1 -23
  9. package/dist/cjs/product/components/ProductImagesV2/common/getAttr.js +29 -7
  10. package/dist/cjs/product/components/ProductImagesV2/common/getStyle.js +3 -3
  11. package/dist/cjs/product/components/ProductImagesV2/common/productFeaturedImage.js +1 -1
  12. package/dist/cjs/product/components/ProductImagesV2/components/child/ProductFeaturedImageOnly.js +2 -10
  13. package/dist/cjs/product/components/ProductImagesV2/components/child/ProductGalleryGrid.js +1 -1
  14. package/dist/cjs/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.js +1 -1
  15. package/dist/cjs/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
  16. package/dist/cjs/product/components/ProductImagesV2/components/gallery-grid/GalleryGrid.liquid.js +1 -1
  17. package/dist/cjs/product/components/ProductImagesV2/hooks/useGalleryCarousel.js +2 -3
  18. package/dist/cjs/product/components/ProductImagesV2/hooks/useProductGalleryGrid.js +1 -1
  19. package/dist/cjs/product/components/ProductImagesV2/index.js +2 -4
  20. package/dist/cjs/product/components/ProductImagesV2/index.liquid.js +1 -1
  21. package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/ProductFeatureImage.js +69 -63
  22. package/dist/cjs/product/setting/product-image-v2/configs/setting-v2/ProductGalleryImage.js +23 -31
  23. package/dist/cjs/product/setting/product-image-v2/configs/ui/FeatureNavigation.js +118 -0
  24. package/dist/cjs/product/setting/product-image-v2/configs/ui/ImageListNavigation.js +119 -0
  25. package/dist/cjs/product/setting/product-image-v2/configs/uiV2.js +193 -415
  26. package/dist/esm/article/components/ArticleList.js +2 -1
  27. package/dist/esm/article/components/ArticleList.liquid.js +2 -1
  28. package/dist/esm/article/setting/configs/ArticleList/uiV2.js +16 -0
  29. package/dist/esm/carousel/carousel-item/CarouselItem.js +4 -2
  30. package/dist/esm/carousel/carousel-item/hook/useCarouseItem.js +10 -2
  31. package/dist/esm/carousel/setting/configs/settingV2.js +6 -4
  32. package/dist/esm/carousel/setting/configs/uiV2.js +4 -1
  33. package/dist/esm/product/components/ProductImagesV2/common/common.js +1 -23
  34. package/dist/esm/product/components/ProductImagesV2/common/getAttr.js +29 -7
  35. package/dist/esm/product/components/ProductImagesV2/common/getStyle.js +3 -3
  36. package/dist/esm/product/components/ProductImagesV2/common/productFeaturedImage.js +1 -1
  37. package/dist/esm/product/components/ProductImagesV2/components/child/ProductFeaturedImageOnly.js +2 -10
  38. package/dist/esm/product/components/ProductImagesV2/components/child/ProductGalleryGrid.js +1 -1
  39. package/dist/esm/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.js +1 -1
  40. package/dist/esm/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
  41. package/dist/esm/product/components/ProductImagesV2/components/gallery-grid/GalleryGrid.liquid.js +1 -1
  42. package/dist/esm/product/components/ProductImagesV2/hooks/useGalleryCarousel.js +2 -3
  43. package/dist/esm/product/components/ProductImagesV2/hooks/useProductGalleryGrid.js +1 -1
  44. package/dist/esm/product/components/ProductImagesV2/index.js +2 -4
  45. package/dist/esm/product/components/ProductImagesV2/index.liquid.js +1 -1
  46. package/dist/esm/product/setting/product-image-v2/configs/setting-v2/ProductFeatureImage.js +69 -63
  47. package/dist/esm/product/setting/product-image-v2/configs/setting-v2/ProductGalleryImage.js +23 -31
  48. package/dist/esm/product/setting/product-image-v2/configs/ui/FeatureNavigation.js +116 -0
  49. package/dist/esm/product/setting/product-image-v2/configs/ui/ImageListNavigation.js +117 -0
  50. package/dist/esm/product/setting/product-image-v2/configs/uiV2.js +193 -415
  51. package/dist/types/index.d.ts +4 -8
  52. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
- import { useEditorMode, useBlogsQuery, useArticlesQuery, flattenConnection, ArticleListProvider, getBorderStyle, getBorderRadiusStyle, getStyleShadow, makeStyleResponsive, makeWidth, getStyleBackgroundByDevice, getResponsiveValueByScreen, cls, ArticleProvider, isEmptyChildren } from '@gem-sdk/core';
3
+ import { useEditorMode, useBlogsQuery, useArticlesQuery, flattenConnection, ArticleListProvider, getBorderStyle, getBorderRadiusStyle, getStyleShadow, makeStyleResponsive, makeWidth, getStyleBackgroundByDevice, getGradientBgrStyleByDevice, getResponsiveValueByScreen, cls, ArticleProvider, isEmptyChildren } from '@gem-sdk/core';
4
4
  import ChildrenDroppable from '../../grid/components/ChildrenDroppable.js';
5
5
  import Loading from '../../common/components/Loading.js';
6
6
  import { useState } from 'react';
@@ -111,6 +111,7 @@ const ArticleList = ({ styles, setting, className, children, builderProps })=>{
111
111
  ...makeStyleResponsive('rg', styles?.horizontalGutter),
112
112
  ...makeStyleResponsive('cg', styles?.verticalGutter),
113
113
  ...getStyleBackgroundByDevice(setting?.background),
114
+ ...getGradientBgrStyleByDevice(setting?.background),
114
115
  ...makeStyleResponsive('gtc', {
115
116
  desktop: `repeat(${getResponsiveValueByScreen(setting?.slideToShow, 'desktop')}, minmax(0, 1fr))`,
116
117
  tablet: setting?.slideToShow?.tablet && `repeat(${getResponsiveValueByScreen(setting?.slideToShow, 'tablet')}, minmax(0, 1fr))`,
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { template, getBorderStyle, getBorderRadiusStyle, getStyleShadow, makeStyleResponsive, makeWidth, getStyleBackgroundByDevice, getResponsiveValueByScreen, cls } from '@gem-sdk/core';
2
+ import { template, getBorderStyle, getBorderRadiusStyle, getStyleShadow, makeStyleResponsive, makeWidth, getStyleBackgroundByDevice, getGradientBgrStyleByDevice, getResponsiveValueByScreen, cls } from '@gem-sdk/core';
3
3
  import { convertSpecialCharacter } from '../utils/string.js';
4
4
  import { convertUnitToNumber } from '../../helpers.js';
5
5
 
@@ -31,6 +31,7 @@ const ArticleList = ({ setting, styles, className, children, advanced, builderPr
31
31
  ...makeStyleResponsive('rg', styles?.horizontalGutter),
32
32
  ...makeStyleResponsive('cg', styles?.verticalGutter),
33
33
  ...getStyleBackgroundByDevice(setting?.background),
34
+ ...getGradientBgrStyleByDevice(setting?.background),
34
35
  ...makeStyleResponsive('gtc', {
35
36
  desktop: `repeat(${getResponsiveValueByScreen(setting?.slideToShow, 'desktop')}, minmax(0, 1fr))`,
36
37
  tablet: setting?.slideToShow?.tablet && `repeat(${getResponsiveValueByScreen(setting?.slideToShow, 'tablet')}, minmax(0, 1fr))`,
@@ -27,6 +27,22 @@ const uiV2 = [
27
27
  }
28
28
  ]
29
29
  },
30
+ {
31
+ label: {
32
+ en: 'Number of article'
33
+ },
34
+ controls: [
35
+ {
36
+ label: {
37
+ en: 'Number'
38
+ },
39
+ conditionDisplay: 'articleSetting && articleSetting.articlePickType !== "manually"',
40
+ setting: {
41
+ id: 'numberOfArticle'
42
+ }
43
+ }
44
+ ]
45
+ },
30
46
  {
31
47
  label: {
32
48
  en: 'Grid'
@@ -8,15 +8,17 @@ import { useCarouselItem } from './hook/useCarouseItem.js';
8
8
 
9
9
  const CarouselItem = (props)=>{
10
10
  const { children, builderAttrs } = props;
11
- const { handleClick } = useCarouselItem(props);
11
+ const { handleClick, handleMouseMove, handleMouseOut } = useCarouselItem(props);
12
12
  const { carouselItemStyle, carouselItemInnerStyle } = getStyle(props);
13
13
  const { carouselItemClass, carouselItemInnerClass } = getClass(props);
14
14
  return /*#__PURE__*/ jsx("div", {
15
15
  ...builderAttrs,
16
+ "aria-hidden": true,
16
17
  className: carouselItemClass,
17
18
  style: carouselItemStyle,
18
19
  onClick: handleClick,
19
- "aria-hidden": true,
20
+ onMouseMove: handleMouseMove,
21
+ onMouseLeave: handleMouseOut,
20
22
  children: /*#__PURE__*/ jsx("div", {
21
23
  className: carouselItemInnerClass,
22
24
  style: carouselItemInnerStyle,
@@ -1,11 +1,19 @@
1
1
  const useCarouselItem = (props)=>{
2
- const { onClickItem, dispatchEventSelectSlide, index = 0 } = props;
2
+ const { onClickItem, onMouseMove, onMouseOut, dispatchEventSelectSlide, index = 0 } = props;
3
3
  const handleClick = (e)=>{
4
4
  onClickItem && onClickItem(e);
5
5
  dispatchEventSelectSlide && dispatchEventSelectSlide(index);
6
6
  };
7
+ const handleMouseMove = (e)=>{
8
+ onMouseMove && onMouseMove(e);
9
+ };
10
+ const handleMouseOut = (e)=>{
11
+ onMouseOut && onMouseOut(e);
12
+ };
7
13
  return {
8
- handleClick
14
+ handleClick,
15
+ handleMouseMove,
16
+ handleMouseOut
9
17
  };
10
18
  };
11
19
 
@@ -473,12 +473,14 @@ const CarouselSettingsV2Setting = [
473
473
  label: 'Time out',
474
474
  type: 'input:slider',
475
475
  min: 1,
476
- max: 10,
476
+ max: 4,
477
477
  step: 0.1,
478
478
  default: 2,
479
- hide: true,
480
- hideUnit: true,
481
- useOnlyUnitInit: true,
479
+ units: [
480
+ 's'
481
+ ],
482
+ isNumber: true,
483
+ showDefaultUnit: true,
482
484
  ignoreMax: true
483
485
  },
484
486
  {
@@ -308,7 +308,10 @@ const SettingUIV2 = [
308
308
  setting: {
309
309
  id: 'itemNumber'
310
310
  },
311
- layout: 'vertical'
311
+ layout: 'vertical',
312
+ popoverLabel: {
313
+ en: 'Items per slide'
314
+ }
312
315
  }
313
316
  ]
314
317
  },
@@ -292,29 +292,7 @@ const setDefaultWhenUndefineSetting = (props)=>{
292
292
  return {
293
293
  ...props,
294
294
  setting: {
295
- ...props.setting,
296
- ftSlidesEnable: props.setting?.ftSlidesEnable === undefined ? {
297
- desktop: true
298
- } : props.setting?.ftSlidesEnable,
299
- ftSlidesActionEnable: props.setting?.ftSlidesActionEnable === undefined ? {
300
- desktop: true
301
- } : props.setting?.ftSlidesActionEnable,
302
- ftSlidesNavigationEnable: props.setting?.ftSlidesNavigationEnable === undefined ? {
303
- desktop: true
304
- } : props.setting?.ftSlidesNavigationEnable,
305
- ftActionEnable: props.setting?.ftActionEnable === undefined ? {
306
- desktop: true
307
- } : props.setting?.ftActionEnable,
308
- slidesActionEnable: props.setting?.slidesActionEnable === undefined ? {
309
- desktop: true
310
- } : props.setting?.slidesActionEnable,
311
- slidesNavigationEnable: props.setting?.slidesNavigationEnable === undefined ? {
312
- desktop: true
313
- } : props.setting?.slidesNavigationEnable,
314
- activeEffectEnable: props.setting?.activeEffectEnable === undefined || props.setting?.activeEffectEnable,
315
- actionEnable: props.setting?.actionEnable === undefined ? {
316
- desktop: true
317
- } : props.setting?.actionEnable
295
+ ...props.setting
318
296
  }
319
297
  };
320
298
  };
@@ -48,6 +48,11 @@ const getGalleryCarouselSettingAttr = (setting)=>{
48
48
  ...setting?.arrowIcon && {
49
49
  arrowCustom: setting.arrowIcon
50
50
  },
51
+ ...{
52
+ arrowIconSize: setting.arrowIconSize || {
53
+ desktop: 24
54
+ }
55
+ },
51
56
  ...setting?.arrowIconColor && {
52
57
  arrowCustomColor: setting.arrowIconColor
53
58
  },
@@ -64,6 +69,11 @@ const getGalleryCarouselSettingAttr = (setting)=>{
64
69
  desktop: setting.arrowNavRadius
65
70
  }
66
71
  },
72
+ ...setting?.arrowNavShadow && {
73
+ arrowShadow: {
74
+ desktop: setting.arrowNavShadow
75
+ }
76
+ },
67
77
  sneakPeakType: {
68
78
  desktop: 'center'
69
79
  },
@@ -72,13 +82,13 @@ const getGalleryCarouselSettingAttr = (setting)=>{
72
82
  navigationEnable: mappingNavigationEnable,
73
83
  arrowButtonSize: {
74
84
  desktop: {
75
- width: '24px',
76
- height: '24px'
85
+ width: undefined,
86
+ height: undefined
77
87
  }
78
88
  },
79
89
  animationMode: setting?.ftAnimationMode,
80
- ...setting?.slidesActionEnable && {
81
- enableAction: setting.slidesActionEnable
90
+ enableAction: {
91
+ desktop: true
82
92
  }
83
93
  };
84
94
  };
@@ -129,6 +139,11 @@ const getFeaturedCarouselSettingAttr = (setting)=>{
129
139
  ...setting?.ftArrowIcon && {
130
140
  arrowCustom: setting.ftArrowIcon
131
141
  },
142
+ ...{
143
+ arrowIconSize: setting.ftArrowIconSize || {
144
+ desktop: 24
145
+ }
146
+ },
132
147
  ...setting?.ftArrowIconColor && {
133
148
  arrowCustomColor: setting.ftArrowIconColor
134
149
  },
@@ -145,6 +160,11 @@ const getFeaturedCarouselSettingAttr = (setting)=>{
145
160
  desktop: setting.ftArrowNavRadius
146
161
  }
147
162
  },
163
+ ...setting?.ftArrowNavShadow && {
164
+ arrowShadow: {
165
+ desktop: setting.ftArrowNavShadow
166
+ }
167
+ },
148
168
  sneakPeakType: {
149
169
  desktop: 'center'
150
170
  },
@@ -156,11 +176,13 @@ const getFeaturedCarouselSettingAttr = (setting)=>{
156
176
  navigationEnable: mappingNavigationEnable,
157
177
  arrowButtonSize: {
158
178
  desktop: {
159
- width: '24px',
160
- height: '24px'
179
+ width: undefined,
180
+ height: undefined
161
181
  }
162
182
  },
163
- enableAction: setting.ftSlidesActionEnable
183
+ enableAction: {
184
+ desktop: true
185
+ }
164
186
  };
165
187
  };
166
188
 
@@ -197,15 +197,15 @@ const getGalleryCarouselStyle = (setting)=>{
197
197
  sizeSetting: {
198
198
  desktop: {
199
199
  width: getWidthByLayoutForCarouselByDevice('desktop'),
200
- height: 'auto'
200
+ height: '100%'
201
201
  },
202
202
  tablet: {
203
203
  width: getWidthByLayoutForCarouselByDevice('tablet'),
204
- height: 'auto'
204
+ height: '100%'
205
205
  },
206
206
  mobile: {
207
207
  width: getWidthByLayoutForCarouselByDevice('mobile'),
208
- height: 'auto'
208
+ height: '100%'
209
209
  }
210
210
  }
211
211
  };
@@ -47,7 +47,7 @@ const checkRenderFeaturedCarousel = (setting)=>{
47
47
  return isShow;
48
48
  };
49
49
  const checkShowCarousel = (setting, device)=>{
50
- return (getResponsiveValueByScreen(setting.position, device) !== 'only-feature' || getResponsiveValueByScreen(setting.ftNavigationPosition, device) !== 'none' || getResponsiveValueByScreen(setting.ftDotStyle, device) !== 'none' || getResponsiveValueByScreen(setting.ftLoop, device) === true || setting.ftDragToScroll === true) && getResponsiveValueByScreen(setting.ftSlidesEnable) === true;
50
+ return getResponsiveValueByScreen(setting.position, device) !== 'only-feature' || getResponsiveValueByScreen(setting.ftNavigationPosition, device) !== 'none' || getResponsiveValueByScreen(setting.ftDotStyle, device) !== 'none' || getResponsiveValueByScreen(setting.ftLoop, device) === true || setting.ftDragToScroll === true;
51
51
  };
52
52
 
53
53
  export { checkRenderFeaturedCarousel, getDotStyleForOnlyFeaturedImage, getZoomImageClass, getZoomLenClass, isFeatureMedia };
@@ -62,19 +62,11 @@ const ProductFeaturedImageOnly = ({ image, imageShowWhenHover, setting, aspectRa
62
62
  });
63
63
  return children;
64
64
  };
65
- const enableHoverAction = useMemo(()=>{
66
- return getResponsiveValueByScreen(setting.ftActionEnable, currentDevice);
67
- }, [
68
- currentDevice,
69
- setting.ftActionEnable
70
- ]);
71
- const isRenderHoverImage = useMemo(()=>enableHoverAction && setting?.hoverEffect !== 'none' && !isFeatureMedia(renderImage?.contentType), [
72
- enableHoverAction,
65
+ const isRenderHoverImage = useMemo(()=>setting?.hoverEffect !== 'none' && !isFeatureMedia(renderImage?.contentType), [
73
66
  renderImage?.contentType,
74
67
  setting?.hoverEffect
75
68
  ]);
76
- const isZoomImage = useMemo(()=>enableHoverAction && setting?.hoverEffect == 'zoom' && setting?.zoomType == 'glasses' && !isFeatureMedia(renderImage?.contentType), [
77
- enableHoverAction,
69
+ const isZoomImage = useMemo(()=>setting?.hoverEffect == 'zoom' && setting?.zoomType == 'glasses' && !isFeatureMedia(renderImage?.contentType), [
78
70
  renderImage?.contentType,
79
71
  setting?.hoverEffect,
80
72
  setting?.zoomType
@@ -41,7 +41,7 @@ const ProductGalleryGrid = (props)=>{
41
41
  zoomType: setting.galleryZoomType
42
42
  }),
43
43
  onMouseOut: (e)=>handleMouseOut(e),
44
- "data-border": canActive && !!setting?.borderActive && setting?.activeEffectEnable ? 'active' : 'deactive',
44
+ "data-border": canActive && !!setting?.borderActive ? 'active' : 'deactive',
45
45
  children: [
46
46
  /*#__PURE__*/ jsx(NextImage, {
47
47
  src: imageSrc,
@@ -44,7 +44,7 @@ const ProductGalleryCarousel = (props)=>{
44
44
  onClickItem: ()=>handleClickCarouselItem(image?.id),
45
45
  style: galleryCarouselItemStyle,
46
46
  "data-id": image?.id,
47
- "data-border": canActive && !!setting?.borderActive && setting?.activeEffectEnable ? 'active' : 'deactive',
47
+ "data-border": canActive && !!setting?.borderActive ? 'active' : 'deactive',
48
48
  children: [
49
49
  /*#__PURE__*/ jsx(NextImage, {
50
50
  draggable: "false",
@@ -136,7 +136,7 @@ const ProductGalleryCarousel = ({ builderPropUID, children, enableLazyLoadImage,
136
136
  return ` ${isNotVerticalClass.join(' ')}`;
137
137
  };
138
138
  const carouselChildren = LiquidIf(`product.media.size > 1`, LiquidFor(`media in product.media`, `${LiquidIf(`media.media_type == 'image'`, LiquidFor(`image in product.images`, LiquidIf(`image.src == media.src`, `{% assign imageID = image.id %}{% break %}`)), `{% assign imageID = '' %}`)}
139
- ${LiquidIf(`media.id == product.featured_media.id `, renderCarouselGalleryItem(setting?.activeEffectEnable && setting?.borderActive?.border !== 'none' ? 'active' : ''), renderCarouselGalleryItem())}`));
139
+ ${LiquidIf(`media.id == product.featured_media.id `, renderCarouselGalleryItem(setting?.borderActive?.border !== 'none' ? 'active' : ''), renderCarouselGalleryItem())}`));
140
140
  return template`
141
141
  ${Carousel({
142
142
  builderProps: {
@@ -226,7 +226,7 @@ const ProductGalleryGrid = ({ builderPropUID, wrapperStyle, children, enableLazy
226
226
  style="${getStyleOfObject(galleryGridStyles)}}"
227
227
  >
228
228
  ${LiquidFor(`media in product.media`, `${LiquidIf(`media.media_type == 'image'`, LiquidFor(`image in product.images`, LiquidIf(`image.src == media.src`, `{% assign imageID = image.id %}{% break %}`)), `{% assign imageID = '' %}`)}
229
- ${LiquidIf(`media.id == product.featured_media.id `, renderGridGalleryItem(setting?.activeEffectEnable && setting?.borderActive?.border !== 'none' ? 'active' : ''), renderGridGalleryItem())}`)}
229
+ ${LiquidIf(`media.id == product.featured_media.id `, renderGridGalleryItem(setting?.borderActive?.border !== 'none' ? 'active' : ''), renderGridGalleryItem())}`)}
230
230
  ${LiquidIf(`product.media.size > 0`, children)}
231
231
  ${LiquidIf(`product.media.size < 1`, renderGridGalleryItem())}
232
232
  </div>`);
@@ -110,10 +110,9 @@ const useGalleryCarousel = (props)=>{
110
110
  currentDevice
111
111
  ]);
112
112
  const isEnableBorderActive = useMemo(()=>{
113
- return setting?.borderActive?.border !== 'none' && setting?.activeEffectEnable;
113
+ return setting?.borderActive?.border !== 'none';
114
114
  }, [
115
- setting?.borderActive?.border,
116
- setting?.activeEffectEnable
115
+ setting?.borderActive?.border
117
116
  ]);
118
117
  const isShowButtonLightbox = getResponsiveValueByScreen(setting?.clickOpenLightBox, currentDevice);
119
118
  const handleClickCarouselItem = (imageId)=>{
@@ -29,7 +29,7 @@ const useProductGalleryGrid = (props)=>{
29
29
  shapeByLayout
30
30
  });
31
31
  const isDisplay = getResponsiveValueByScreen(isDisplayByWidth, currentDevice);
32
- const isEnableBorderActive = setting?.borderActive?.border !== 'none' && setting?.activeEffectEnable;
32
+ const isEnableBorderActive = setting?.borderActive?.border !== 'none';
33
33
  const handleSetSrc = useCallback(()=>{
34
34
  handleSetSrcForProductImageList({
35
35
  builderPropUID,
@@ -120,7 +120,7 @@ const ProductImagesV2 = (props)=>{
120
120
  ]);
121
121
  const handleGalleryClick = (imageID, enableOpenLightBox)=>{
122
122
  handleClickSwitchImage(imageID);
123
- enableOpenLightBox && getResponsiveValueByScreen(setting?.ftActionEnable, currentDevice) && handleOpenLightBox();
123
+ enableOpenLightBox && handleOpenLightBox();
124
124
  };
125
125
  const handleOpenLightBox = ()=>{
126
126
  setOpenLightBox(true);
@@ -154,7 +154,7 @@ const ProductImagesV2 = (props)=>{
154
154
  hasVariantAvailable
155
155
  ]);
156
156
  const isRenderLightBox = useMemo(()=>{
157
- const isRender = getResponsiveValueByScreen(setting?.ftActionEnable, currentDevice) && getResponsiveValueByScreen(setting?.ftClickOpenLightBox, currentDevice) === 'popup' || getResponsiveValueByScreen(setting?.actionEnable, currentDevice) && getResponsiveValueByScreen(setting?.clickOpenLightBox, currentDevice);
157
+ const isRender = getResponsiveValueByScreen(setting?.ftClickOpenLightBox, currentDevice) === 'popup' || getResponsiveValueByScreen(setting?.clickOpenLightBox, currentDevice);
158
158
  if (!isRender && mode === 'edit') {
159
159
  window?.parent?.postMessage?.(JSON.stringify({
160
160
  type: 'active-modal',
@@ -163,9 +163,7 @@ const ProductImagesV2 = (props)=>{
163
163
  }
164
164
  return isRender;
165
165
  }, [
166
- setting?.ftActionEnable,
167
166
  setting?.ftClickOpenLightBox,
168
- setting?.actionEnable,
169
167
  setting?.clickOpenLightBox,
170
168
  currentDevice,
171
169
  mode
@@ -107,7 +107,7 @@ const ProductImages = (props)=>{
107
107
  `;
108
108
  };
109
109
  const isEnableBorderActive = ()=>{
110
- return setting?.borderActive?.border !== 'none' && setting?.activeEffectEnable;
110
+ return setting?.borderActive?.border !== 'none';
111
111
  };
112
112
  return template`
113
113
  ${If(isEnableBorderActive(), `<style>${getBorderActiveCss({
@@ -1,3 +1,5 @@
1
+ import { CAROUSEL_ANIMATION } from '../../../../../carousel/components/plugins/AnimationPlugin.js';
2
+
1
3
  const getDefaultResponsive = (defaultValue)=>{
2
4
  return {
3
5
  desktop: {
@@ -15,10 +17,6 @@ const productFeatureImageSetting = [
15
17
  mobileOnly: true
16
18
  },
17
19
  options: [
18
- {
19
- title: 'Do nothing',
20
- value: 'none'
21
- },
22
20
  {
23
21
  title: 'Zoom',
24
22
  value: 'zoom'
@@ -32,7 +30,7 @@ const productFeatureImageSetting = [
32
30
  },
33
31
  {
34
32
  id: 'zoomType',
35
- type: 'select',
33
+ type: 'option:value',
36
34
  label: 'Zoom Type',
37
35
  hide: true,
38
36
  default: 'default',
@@ -41,11 +39,11 @@ const productFeatureImageSetting = [
41
39
  },
42
40
  options: [
43
41
  {
44
- title: 'Default',
42
+ label: 'Default',
45
43
  value: 'default'
46
44
  },
47
45
  {
48
- title: 'Glasses',
46
+ label: 'Glasses',
49
47
  value: 'glasses'
50
48
  }
51
49
  ]
@@ -61,6 +59,7 @@ const productFeatureImageSetting = [
61
59
  units: [
62
60
  '%'
63
61
  ],
62
+ showDefaultUnit: true,
64
63
  useOnlyUnitInit: true,
65
64
  isNumber: true
66
65
  },
@@ -98,15 +97,11 @@ const productFeatureImageSetting = [
98
97
  type: 'select',
99
98
  options: [
100
99
  {
101
- title: 'Do nothing',
102
- value: 'none'
103
- },
104
- {
105
- title: 'Open view image',
100
+ title: 'Open gallery',
106
101
  value: 'popup'
107
102
  },
108
103
  {
109
- title: 'Open product page',
104
+ title: 'Open product',
110
105
  value: 'product-link'
111
106
  }
112
107
  ],
@@ -114,15 +109,15 @@ const productFeatureImageSetting = [
114
109
  },
115
110
  {
116
111
  id: 'ftClickOpenNewTab',
117
- type: 'segment',
112
+ type: 'option:value',
118
113
  options: [
119
114
  {
120
- label: 'Current',
121
- value: false
115
+ label: 'Yes',
116
+ value: true
122
117
  },
123
118
  {
124
- label: 'New tab',
125
- value: true
119
+ label: 'No',
120
+ value: false
126
121
  }
127
122
  ],
128
123
  default: false
@@ -168,15 +163,38 @@ const productFeatureImageSetting = [
168
163
  },
169
164
  {
170
165
  id: 'ftAnimationSpeed',
166
+ label: 'Slide speed',
171
167
  type: 'input:slider',
172
- label: 'Speed (s)',
173
- hide: true,
174
- min: 0,
175
- max: 60,
176
- step: 1,
177
- default: 1,
178
168
  useOnlyUnitInit: true,
179
- isNumber: true
169
+ min: 100,
170
+ max: 5000,
171
+ step: 50,
172
+ units: [
173
+ 'ms'
174
+ ],
175
+ showDefaultUnit: true,
176
+ isNumber: true,
177
+ default: 500
178
+ },
179
+ {
180
+ id: 'ftAnimationMode',
181
+ label: 'Animation',
182
+ type: 'select',
183
+ default: CAROUSEL_ANIMATION.EASE_IN.value,
184
+ options: [
185
+ {
186
+ label: 'Ease in',
187
+ value: CAROUSEL_ANIMATION.EASE_IN.value
188
+ },
189
+ {
190
+ label: 'Ease out',
191
+ value: CAROUSEL_ANIMATION.EASE_OUT.value
192
+ },
193
+ {
194
+ label: 'Ease in out',
195
+ value: CAROUSEL_ANIMATION.EASE_IN_OUT.value
196
+ }
197
+ ]
180
198
  },
181
199
  {
182
200
  id: 'ftArrowIcon',
@@ -194,6 +212,17 @@ const productFeatureImageSetting = [
194
212
  type: 'color-picker-v2',
195
213
  default: '#000000'
196
214
  },
215
+ {
216
+ id: 'ftArrowIconSize',
217
+ label: 'Number per show',
218
+ type: 'input:stepper',
219
+ min: 1,
220
+ devices: {
221
+ desktop: {
222
+ default: 24
223
+ }
224
+ }
225
+ },
197
226
  {
198
227
  id: 'ftDragToScroll',
199
228
  label: 'Drag to scroll',
@@ -231,39 +260,16 @@ const productFeatureImageSetting = [
231
260
  }
232
261
  },
233
262
  {
234
- id: 'ftSlidesEnable',
235
- type: 'toggle',
236
- devices: {
237
- desktop: {
238
- default: true
239
- }
240
- }
241
- },
242
- {
243
- id: 'ftSlidesActionEnable',
244
- type: 'combo',
245
- devices: {
246
- desktop: {
247
- default: true
248
- }
249
- }
250
- },
251
- {
252
- id: 'ftSlidesNavigationEnable',
253
- type: 'combo',
254
- devices: {
255
- desktop: {
256
- default: true
257
- }
258
- }
259
- },
260
- {
261
- id: 'ftActionEnable',
262
- type: 'combo',
263
- devices: {
264
- desktop: {
265
- default: true
266
- }
263
+ id: 'ftArrowNavShadow',
264
+ type: 'shadow-v2',
265
+ default: {
266
+ type: 'shadow-1',
267
+ distance: '4px',
268
+ blur: '12px',
269
+ spread: '0px',
270
+ color: 'rgba(0, 0, 0, 0.20)',
271
+ angle: 90,
272
+ enable: false
267
273
  }
268
274
  }
269
275
  ];
@@ -338,21 +344,21 @@ const productFeatureImageStyle = [
338
344
  },
339
345
  {
340
346
  id: 'ftLayout',
341
- type: 'layout-segment',
342
- iconViewBox: '0 0 66 48',
343
- enableItemBackground: true,
347
+ type: 'option:illustration',
344
348
  enableTooltip: true,
345
349
  label: 'Image scale',
346
350
  options: [
347
351
  {
348
352
  label: 'Fill image',
349
353
  value: 'cover',
350
- type: 'image'
354
+ type: 'image',
355
+ svgName: 'gp-image-cover'
351
356
  },
352
357
  {
353
358
  label: 'Fit image',
354
359
  value: 'contain',
355
- type: 'image'
360
+ type: 'image',
361
+ svgName: 'gp-image-contain'
356
362
  }
357
363
  ],
358
364
  devices: getDefaultResponsive('cover')