@gem-sdk/components 2.0.0-dev.622 → 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.
Files changed (174) hide show
  1. package/dist/cjs/builder.js +12 -6
  2. package/dist/cjs/index.js +34 -32
  3. package/dist/cjs/index.liquid.js +16 -10
  4. package/dist/cjs/next.js +3 -1
  5. package/dist/cjs/product/components/ProductImagesV3/common/common.js +360 -0
  6. package/dist/cjs/product/components/ProductImagesV3/common/getAttr.js +192 -0
  7. package/dist/cjs/product/components/ProductImagesV3/common/getBorderActiveCss.js +26 -0
  8. package/dist/cjs/product/components/ProductImagesV3/common/getClasses.js +94 -0
  9. package/dist/cjs/product/components/ProductImagesV3/common/getStyle.js +303 -0
  10. package/dist/cjs/product/components/ProductImagesV3/common/hoverAction.js +95 -0
  11. package/dist/cjs/product/components/ProductImagesV3/common/productFeaturedImage.js +59 -0
  12. package/dist/cjs/product/components/ProductImagesV3/common/productGallery.js +266 -0
  13. package/dist/cjs/product/components/ProductImagesV3/components/child/MediaIcon.js +63 -0
  14. package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeatureVideo.js +36 -0
  15. package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeaturedImageCarousel.js +109 -0
  16. package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeaturedImageOnly.js +139 -0
  17. package/dist/cjs/product/components/ProductImagesV3/components/child/ProductGalleryGrid.js +100 -0
  18. package/dist/cjs/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.js +77 -0
  19. package/dist/cjs/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.liquid.js +300 -0
  20. package/dist/cjs/product/components/ProductImagesV3/components/feature-only/OnlyFeatureImage.js +44 -0
  21. package/dist/cjs/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.js +83 -0
  22. package/dist/cjs/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.liquid.js +182 -0
  23. package/dist/cjs/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.js +30 -0
  24. package/dist/cjs/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.liquid.js +239 -0
  25. package/dist/cjs/product/components/ProductImagesV3/components/lightbox/ButtonOpenLightBox.js +28 -0
  26. package/dist/cjs/product/components/ProductImagesV3/components/lightbox/ProductImagesLightBox.js +144 -0
  27. package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesAttr.js +14 -0
  28. package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesClassName.js +54 -0
  29. package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesStyles.js +53 -0
  30. package/dist/cjs/product/components/ProductImagesV3/hooks/useFeatureImageWithGallery.js +55 -0
  31. package/dist/cjs/product/components/ProductImagesV3/hooks/useFilterImagesByVariant.js +41 -0
  32. package/dist/cjs/product/components/ProductImagesV3/hooks/useGalleryCarousel.js +134 -0
  33. package/dist/cjs/product/components/ProductImagesV3/hooks/useProductFeaturedImageCarousel.js +203 -0
  34. package/dist/cjs/product/components/ProductImagesV3/hooks/useProductGalleryGrid.js +87 -0
  35. package/dist/cjs/product/components/ProductImagesV3/index.js +291 -0
  36. package/dist/cjs/product/components/ProductImagesV3/index.liquid.js +153 -0
  37. package/dist/cjs/product/index.js +6 -4
  38. package/dist/cjs/product/next.js +4 -0
  39. package/dist/cjs/product/setting/product-image-v3/ProductFeatureImage.js +252 -0
  40. package/dist/cjs/product/setting/product-image-v3/ProductGalleryImage.js +251 -0
  41. package/dist/cjs/product/setting/product-image-v3/ProductImages.js +74 -0
  42. package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/ProductFeatureImage.js +388 -0
  43. package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/ProductGalleryImage.js +518 -0
  44. package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/index.js +336 -0
  45. package/dist/cjs/product/setting/product-image-v3/configs/ui/FeatureNavigation.js +118 -0
  46. package/dist/cjs/product/setting/product-image-v3/configs/ui/ImageListNavigation.js +119 -0
  47. package/dist/cjs/product/setting/product-image-v3/configs/uiV1.js +237 -0
  48. package/dist/cjs/product/setting/product-image-v3/configs/uiV2.js +491 -0
  49. package/dist/cjs/setting.js +97 -95
  50. package/dist/cjs/swiper-carousel/arrow/Arrow.js +52 -0
  51. package/dist/cjs/swiper-carousel/arrow/Arrow.liquid.js +46 -0
  52. package/dist/cjs/swiper-carousel/arrow/common/common.js +119 -0
  53. package/dist/cjs/swiper-carousel/arrow/common/getClass.js +50 -0
  54. package/dist/cjs/swiper-carousel/arrow/common/getStyle.js +84 -0
  55. package/dist/cjs/swiper-carousel/carousel-item/SwiperItem.js +34 -0
  56. package/dist/cjs/swiper-carousel/carousel-item/SwiperItem.liquid.js +38 -0
  57. package/dist/cjs/swiper-carousel/carousel-item/common/getClass.js +29 -0
  58. package/dist/cjs/swiper-carousel/carousel-item/common/getStyle.js +79 -0
  59. package/dist/cjs/swiper-carousel/carousel-item/hook/useCarouseItem.js +22 -0
  60. package/dist/cjs/swiper-carousel/components/common/carousel.js +98 -0
  61. package/dist/cjs/swiper-carousel/components/const/index.js +5 -0
  62. package/dist/cjs/swiper-carousel/components/hooks/useTrackPreviewPause.js +34 -0
  63. package/dist/cjs/swiper-carousel/components/plugins/AnimationPlugin.js +42 -0
  64. package/dist/cjs/swiper-carousel/components/plugins/AutoPlayPlugin.js +105 -0
  65. package/dist/cjs/swiper-carousel/components/plugins/FixSliderMoveBackwards.js +15 -0
  66. package/dist/cjs/swiper-carousel/components/plugins/MutationPlugin.js +45 -0
  67. package/dist/cjs/swiper-carousel/dots/Dots.js +51 -0
  68. package/dist/cjs/swiper-carousel/dots/Dots.liquid.js +26 -0
  69. package/dist/cjs/swiper-carousel/dots/common/common.js +28 -0
  70. package/dist/cjs/swiper-carousel/dots/common/getClass.js +40 -0
  71. package/dist/cjs/swiper-carousel/dots/common/getStyle.js +33 -0
  72. package/dist/cjs/swiper-carousel/dots/hook/useDotsSetting.js +21 -0
  73. package/dist/cjs/swiper-carousel/index.js +17 -0
  74. package/dist/cjs/swiper-carousel/next.js +22 -0
  75. package/dist/cjs/swiper-carousel/root/Swiper.js +128 -0
  76. package/dist/cjs/swiper-carousel/root/Swiper.liquid.js +104 -0
  77. package/dist/cjs/swiper-carousel/root/common/getAttr.js +25 -0
  78. package/dist/cjs/swiper-carousel/root/common/getClass.js +135 -0
  79. package/dist/cjs/swiper-carousel/root/common/getData.js +56 -0
  80. package/dist/cjs/swiper-carousel/root/common/getStyle.js +64 -0
  81. package/dist/cjs/swiper-carousel/root/hook/useCarousel.js +482 -0
  82. package/dist/cjs/swiper-carousel/setting/Swiper.js +42 -0
  83. package/dist/cjs/swiper-carousel/setting/SwiperItem.js +40 -0
  84. package/dist/cjs/swiper-carousel/setting/configs/presets.js +87 -0
  85. package/dist/cjs/swiper-carousel/setting/configs/settingV2.js +819 -0
  86. package/dist/cjs/swiper-carousel/setting/configs/uiV2.js +718 -0
  87. package/dist/esm/builder.js +6 -0
  88. package/dist/esm/index.js +1 -0
  89. package/dist/esm/index.liquid.js +3 -0
  90. package/dist/esm/next.js +3 -1
  91. package/dist/esm/product/components/ProductImagesV3/common/common.js +344 -0
  92. package/dist/esm/product/components/ProductImagesV3/common/getAttr.js +189 -0
  93. package/dist/esm/product/components/ProductImagesV3/common/getBorderActiveCss.js +24 -0
  94. package/dist/esm/product/components/ProductImagesV3/common/getClasses.js +83 -0
  95. package/dist/esm/product/components/ProductImagesV3/common/getStyle.js +292 -0
  96. package/dist/esm/product/components/ProductImagesV3/common/hoverAction.js +92 -0
  97. package/dist/esm/product/components/ProductImagesV3/common/productFeaturedImage.js +53 -0
  98. package/dist/esm/product/components/ProductImagesV3/common/productGallery.js +251 -0
  99. package/dist/esm/product/components/ProductImagesV3/components/child/MediaIcon.js +59 -0
  100. package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeatureVideo.js +32 -0
  101. package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeaturedImageCarousel.js +105 -0
  102. package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeaturedImageOnly.js +135 -0
  103. package/dist/esm/product/components/ProductImagesV3/components/child/ProductGalleryGrid.js +96 -0
  104. package/dist/esm/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.js +73 -0
  105. package/dist/esm/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.liquid.js +296 -0
  106. package/dist/esm/product/components/ProductImagesV3/components/feature-only/OnlyFeatureImage.js +40 -0
  107. package/dist/esm/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.js +79 -0
  108. package/dist/esm/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.liquid.js +178 -0
  109. package/dist/esm/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.js +26 -0
  110. package/dist/esm/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.liquid.js +235 -0
  111. package/dist/esm/product/components/ProductImagesV3/components/lightbox/ButtonOpenLightBox.js +24 -0
  112. package/dist/esm/product/components/ProductImagesV3/components/lightbox/ProductImagesLightBox.js +140 -0
  113. package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesAttr.js +12 -0
  114. package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesClassName.js +52 -0
  115. package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesStyles.js +51 -0
  116. package/dist/esm/product/components/ProductImagesV3/hooks/useFeatureImageWithGallery.js +53 -0
  117. package/dist/esm/product/components/ProductImagesV3/hooks/useFilterImagesByVariant.js +39 -0
  118. package/dist/esm/product/components/ProductImagesV3/hooks/useGalleryCarousel.js +132 -0
  119. package/dist/esm/product/components/ProductImagesV3/hooks/useProductFeaturedImageCarousel.js +201 -0
  120. package/dist/esm/product/components/ProductImagesV3/hooks/useProductGalleryGrid.js +85 -0
  121. package/dist/esm/product/components/ProductImagesV3/index.js +287 -0
  122. package/dist/esm/product/components/ProductImagesV3/index.liquid.js +149 -0
  123. package/dist/esm/product/index.js +26 -24
  124. package/dist/esm/product/next.js +4 -0
  125. package/dist/esm/product/setting/product-image-v3/ProductFeatureImage.js +248 -0
  126. package/dist/esm/product/setting/product-image-v3/ProductGalleryImage.js +248 -0
  127. package/dist/esm/product/setting/product-image-v3/ProductImages.js +70 -0
  128. package/dist/esm/product/setting/product-image-v3/configs/setting-v2/ProductFeatureImage.js +384 -0
  129. package/dist/esm/product/setting/product-image-v3/configs/setting-v2/ProductGalleryImage.js +515 -0
  130. package/dist/esm/product/setting/product-image-v3/configs/setting-v2/index.js +334 -0
  131. package/dist/esm/product/setting/product-image-v3/configs/ui/FeatureNavigation.js +116 -0
  132. package/dist/esm/product/setting/product-image-v3/configs/ui/ImageListNavigation.js +117 -0
  133. package/dist/esm/product/setting/product-image-v3/configs/uiV1.js +235 -0
  134. package/dist/esm/product/setting/product-image-v3/configs/uiV2.js +489 -0
  135. package/dist/esm/setting.js +2 -0
  136. package/dist/esm/swiper-carousel/arrow/Arrow.js +48 -0
  137. package/dist/esm/swiper-carousel/arrow/Arrow.liquid.js +42 -0
  138. package/dist/esm/swiper-carousel/arrow/common/common.js +111 -0
  139. package/dist/esm/swiper-carousel/arrow/common/getClass.js +48 -0
  140. package/dist/esm/swiper-carousel/arrow/common/getStyle.js +82 -0
  141. package/dist/esm/swiper-carousel/carousel-item/SwiperItem.js +30 -0
  142. package/dist/esm/swiper-carousel/carousel-item/SwiperItem.liquid.js +34 -0
  143. package/dist/esm/swiper-carousel/carousel-item/common/getClass.js +27 -0
  144. package/dist/esm/swiper-carousel/carousel-item/common/getStyle.js +77 -0
  145. package/dist/esm/swiper-carousel/carousel-item/hook/useCarouseItem.js +20 -0
  146. package/dist/esm/swiper-carousel/components/common/carousel.js +93 -0
  147. package/dist/esm/swiper-carousel/components/const/index.js +3 -0
  148. package/dist/esm/swiper-carousel/components/hooks/useTrackPreviewPause.js +30 -0
  149. package/dist/esm/swiper-carousel/components/plugins/AnimationPlugin.js +35 -0
  150. package/dist/esm/swiper-carousel/components/plugins/AutoPlayPlugin.js +103 -0
  151. package/dist/esm/swiper-carousel/components/plugins/FixSliderMoveBackwards.js +13 -0
  152. package/dist/esm/swiper-carousel/components/plugins/MutationPlugin.js +43 -0
  153. package/dist/esm/swiper-carousel/dots/Dots.js +47 -0
  154. package/dist/esm/swiper-carousel/dots/Dots.liquid.js +22 -0
  155. package/dist/esm/swiper-carousel/dots/common/common.js +26 -0
  156. package/dist/esm/swiper-carousel/dots/common/getClass.js +38 -0
  157. package/dist/esm/swiper-carousel/dots/common/getStyle.js +31 -0
  158. package/dist/esm/swiper-carousel/dots/hook/useDotsSetting.js +19 -0
  159. package/dist/esm/swiper-carousel/index.js +15 -0
  160. package/dist/esm/swiper-carousel/next.js +18 -0
  161. package/dist/esm/swiper-carousel/root/Swiper.js +124 -0
  162. package/dist/esm/swiper-carousel/root/Swiper.liquid.js +100 -0
  163. package/dist/esm/swiper-carousel/root/common/getAttr.js +23 -0
  164. package/dist/esm/swiper-carousel/root/common/getClass.js +133 -0
  165. package/dist/esm/swiper-carousel/root/common/getData.js +54 -0
  166. package/dist/esm/swiper-carousel/root/common/getStyle.js +62 -0
  167. package/dist/esm/swiper-carousel/root/hook/useCarousel.js +480 -0
  168. package/dist/esm/swiper-carousel/setting/Swiper.js +38 -0
  169. package/dist/esm/swiper-carousel/setting/SwiperItem.js +36 -0
  170. package/dist/esm/swiper-carousel/setting/configs/presets.js +85 -0
  171. package/dist/esm/swiper-carousel/setting/configs/settingV2.js +815 -0
  172. package/dist/esm/swiper-carousel/setting/configs/uiV2.js +713 -0
  173. package/dist/types/index.d.ts +551 -116
  174. package/package.json +2 -2
@@ -0,0 +1,153 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var core = require('@gem-sdk/core');
6
+ var common = require('./common/common.js');
7
+ var FeatureImageWithGallery_liquid = require('./components/feature-gallery/FeatureImageWithGallery.liquid.js');
8
+ var GalleryCarousel_liquid = require('./components/gallery-carousel/GalleryCarousel.liquid.js');
9
+ var GalleryGrid_liquid = require('./components/gallery-grid/GalleryGrid.liquid.js');
10
+ var helpers = require('../../../helpers.js');
11
+ var productGallery = require('./common/productGallery.js');
12
+ var getProductImagesClassName = require('./composables/getProductImagesClassName.js');
13
+ var getProductImagesStyles = require('./composables/getProductImagesStyles.js');
14
+ var system = require('@gem-sdk/system');
15
+ var getBorderActiveCss = require('./common/getBorderActiveCss.js');
16
+ var _function = require('../../helpers/function.js');
17
+
18
+ const ProductImages = (props)=>{
19
+ const productImageProps = common.setDefaultWhenUndefineSetting(props);
20
+ const { setting, styles, builderProps, style } = productImageProps;
21
+ const { rawChildren, pageContext, enableLazyLoadImage } = props;
22
+ const settings = {
23
+ ...setting,
24
+ ...styles
25
+ };
26
+ const gpData = `
27
+ {
28
+ "id":${JSON.stringify(builderProps?.uid)},
29
+ "pageContext": ${JSON.stringify(pageContext)},
30
+ "setting":${JSON.stringify(setting)},
31
+ "styles":${JSON.stringify(styles)},
32
+ "productUrl":{{product.url | json | escape}},
33
+ "product":{{product | json | escape}},
34
+ "collectionUrl": {{ collection.url | json | escape }},
35
+ "collection": {{ collection | json | escape}}
36
+ }
37
+ `;
38
+ const gpProductImagesAttrs = system.createAttr({
39
+ 'section-id': '{{section.id}}',
40
+ 'data-id': `${builderProps?.uid}`
41
+ });
42
+ const dataOnlyImageAttrs = system.createAttr({
43
+ 'data-only-image': system.LiquidIf('product.media.size > 1', 'false', 'true')
44
+ });
45
+ const { wrapperClasses, productImagesGalleryClasses } = getProductImagesClassName.getProductImagesClassName(props);
46
+ const wrapContainerClasses = system.createClass({
47
+ 'gp-grid gp-w-full !gp-m-0 gp-relative': true
48
+ });
49
+ const wrapContainerClassesOnlyOneImage = system.createClass({
50
+ 'gp-w-full !gp-m-0 gp-relative': true
51
+ });
52
+ const { wrapContainerStyle, wrapContainerStyleOnlyOneImage, galleryImageStyle } = getProductImagesStyles.getProductImagesStyles(settings);
53
+ const { isOnlyFeatureAllDevices } = common.getConditionRenderGalleryImages(settings?.position);
54
+ const shapeByLayout = productGallery.getShapeByLayout({
55
+ shape: settings.shape,
56
+ shapeForBottom: settings.shapeForBottom,
57
+ shapeFor1Col: settings.shapeFor1Col,
58
+ shapeFor2Col: settings.shapeFor2Col,
59
+ shapeForFtOnly: settings.shapeForFtOnly,
60
+ shapeForInsideBottom: settings.shapeForInsideBottom ?? productGallery.sizeSettingDefaultForNewLayout,
61
+ shapeForInside: settings.shapeForInside ?? productGallery.sizeSettingDefaultForNewLayout
62
+ }, settings.position);
63
+ const styleInsideLayout = common.getStyleInsideLayout(settings.position, shapeByLayout, settings?.spacing);
64
+ const renderProductBadge = ()=>{
65
+ return core.template`
66
+ ${core.WrapRenderChildren({
67
+ uid: builderProps?.uid || '',
68
+ customProps: rawChildren?.[0].customProps
69
+ }, rawChildren?.map((child)=>{
70
+ if (child) {
71
+ return core.template`${core.RenderChildren({
72
+ ...child,
73
+ isInsideProductImage: true,
74
+ imageData: {
75
+ imageShape: styles?.ftShape,
76
+ imageAlign: styles?.align,
77
+ imageLayout: styles?.position
78
+ },
79
+ dotData: {
80
+ dotSize: setting?.ftDotSize,
81
+ dotGapToCarousel: setting?.ftDotGapToCarousel,
82
+ dotStyle: setting?.ftDotStyle
83
+ }
84
+ })}`;
85
+ }
86
+ }))}
87
+ `;
88
+ };
89
+ const renderProductGalleryImages = ()=>{
90
+ return core.template`
91
+ <div
92
+ class="${productImagesGalleryClasses}"
93
+ style="${_function.getStyleOfObject(galleryImageStyle)}"
94
+ ${{
95
+ ...dataOnlyImageAttrs
96
+ }}
97
+ >
98
+ ${GalleryCarousel_liquid.default({
99
+ builderPropUID: `gp-gallery-${builderProps?.uid}`,
100
+ ...settings
101
+ })}
102
+ </div>
103
+ ${GalleryGrid_liquid.default({
104
+ builderPropUID: builderProps?.uid,
105
+ wrapperStyle: {
106
+ ...styleInsideLayout
107
+ },
108
+ children: renderProductBadge(),
109
+ ...settings
110
+ })}
111
+ `;
112
+ };
113
+ const isEnableBorderActive = ()=>{
114
+ return setting?.borderActive?.border !== 'none';
115
+ };
116
+ return core.template`
117
+ ${system.If(isEnableBorderActive(), `<style>${getBorderActiveCss.getBorderActiveCss({
118
+ settings,
119
+ uid: builderProps?.uid,
120
+ type: 'Liquid'
121
+ })}</style>`)}
122
+ ${system.Liquid(`
123
+ {% assign featured_image = product.featured_image %}
124
+ ${system.LiquidIf(`variant != null and variant.featured_image != null`, `{% assign featured_image = variant.featured_image %}`)}
125
+ `)}
126
+ <gp-product-images-v3
127
+ gp-data='${gpData}'
128
+ ${{
129
+ ...gpProductImagesAttrs
130
+ }}
131
+ style="${{
132
+ ...style
133
+ }}"
134
+ class="${wrapperClasses}"
135
+ >
136
+ <div
137
+ class="${system.LiquidIf('product.media.size > 1', `${wrapContainerClasses}`, `${wrapContainerClassesOnlyOneImage}`)}"
138
+ style="${system.LiquidIf('product.media.size > 1', _function.getStyleOfObject(wrapContainerStyle), _function.getStyleOfObject(wrapContainerStyleOnlyOneImage))}"
139
+ >
140
+ ${FeatureImageWithGallery_liquid.default({
141
+ builderPropUID: `gp-carousel-${builderProps?.uid}`,
142
+ ...settings,
143
+ children: renderProductBadge(),
144
+ enableLazyLoadImage
145
+ })}
146
+ ${system.If(!isOnlyFeatureAllDevices, system.LiquidIf('product.media.size > 1', renderProductGalleryImages()))}
147
+ </div>
148
+ </gp-product-images-v3>
149
+ ${system.If(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-images-v3.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-product-images-v3.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
150
+ `;
151
+ };
152
+
153
+ exports.default = ProductImages;
@@ -15,7 +15,7 @@ require('@gem-sdk/keen-slider/react');
15
15
  require('react-dom');
16
16
  require('../modal/components/confirm.js');
17
17
  require('../video/components/Video.js');
18
- var index$6 = require('./components/ProductQuickView/index.js');
18
+ var index$7 = require('./components/ProductQuickView/index.js');
19
19
  require('./components/constants/product-bundle.js');
20
20
  var ProductList = require('./components/ProductList/ProductList.js');
21
21
  require('./components/ProductBundle/common/styles.js');
@@ -31,6 +31,7 @@ var ProductPrice = require('./setting/ProductPrice.js');
31
31
  var ProductVariants = require('./setting/ProductVariants.js');
32
32
  var ProductImages$1 = require('./setting/ProductImages.js');
33
33
  var ProductImages$2 = require('./setting/product-image-v2/ProductImages.js');
34
+ var ProductImages$3 = require('./setting/product-image-v3/ProductImages.js');
34
35
  var ProductDescription = require('./setting/ProductDescription.js');
35
36
  var ProductProperties$1 = require('./setting/ProductProperties.js');
36
37
  var ProductTag = require('./setting/ProductTag.js');
@@ -42,7 +43,7 @@ var ProductBundleDiscount$1 = require('./components/ProductBundle/setting/Produc
42
43
  var ProductBundleDiscountItem$1 = require('./components/ProductBundle/setting/ProductBundleDiscountItem.js');
43
44
  var ProductViewMore$1 = require('./setting/ProductViewMore.js');
44
45
  var ProductBadge = require('./setting/ProductBadge.js');
45
- var index$9 = require('./components/FileUpload/components/setting/index.js');
46
+ var index$a = require('./components/FileUpload/components/setting/index.js');
46
47
 
47
48
  const productSetting = {
48
49
  Product: Product$1.default,
@@ -53,6 +54,7 @@ const productSetting = {
53
54
  ProductVariants: ProductVariants.default,
54
55
  ProductImages: ProductImages$1.default,
55
56
  ProductImagesV2: ProductImages$2.default,
57
+ ProductImagesV3: ProductImages$3.default,
56
58
  ProductDescription: ProductDescription.default,
57
59
  ProductProperties: ProductProperties$1.default,
58
60
  ProductTag: ProductTag.default,
@@ -64,10 +66,10 @@ const productSetting = {
64
66
  ProductBundleDiscountItem: ProductBundleDiscountItem$1.default,
65
67
  ProductViewMore: ProductViewMore$1.default,
66
68
  ProductBadge: ProductBadge.default,
67
- FileUpload: index$9.default
69
+ FileUpload: index$a.default
68
70
  };
69
71
 
70
72
  exports.Product = Product.default;
71
- exports.ProductQuickView = index$6.default;
73
+ exports.ProductQuickView = index$7.default;
72
74
  exports.ProductList = ProductList.default;
73
75
  exports.productSetting = productSetting;
@@ -35,6 +35,9 @@ const ProductImages = dynamic(()=>Promise.resolve().then(function () { return re
35
35
  const ProductImagesV2 = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductImagesV2/index.js'); }), {
36
36
  loading: Loading.default
37
37
  });
38
+ const ProductImagesV3 = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductImagesV3/index.js'); }), {
39
+ loading: Loading.default
40
+ });
38
41
  const ProductProperties = dynamic(()=>Promise.resolve().then(function () { return require('./components/ProductProperties/ProductProperties.js'); }), {
39
42
  loading: Loading.default
40
43
  });
@@ -81,6 +84,7 @@ var product = {
81
84
  ProductVariants,
82
85
  ProductImages,
83
86
  ProductImagesV2,
87
+ ProductImagesV3,
84
88
  ProductProperties,
85
89
  ProductQuickView,
86
90
  ProductTag,
@@ -0,0 +1,252 @@
1
+ 'use strict';
2
+
3
+ const productFeatureImageUI = [
4
+ {
5
+ type: 'control',
6
+ setting: {
7
+ id: 'ftShape'
8
+ },
9
+ layout: 'vertical',
10
+ controlChangeTrigger: {
11
+ settings: [
12
+ {
13
+ condition: "ftShape.shape === 'original'",
14
+ source: [
15
+ 'ftShape'
16
+ ],
17
+ action: {
18
+ controlId: 'ftLayout',
19
+ newValue: 'contain',
20
+ groupType: 'style',
21
+ controlType: 'style'
22
+ }
23
+ }
24
+ ],
25
+ options: {
26
+ noRecordHistory: true
27
+ }
28
+ }
29
+ },
30
+ {
31
+ type: 'control',
32
+ condition: "ftShape.shape !== 'original'",
33
+ label: {
34
+ en: 'Image scale'
35
+ },
36
+ setting: {
37
+ id: 'ftLayout'
38
+ },
39
+ isMoreSetting: true
40
+ },
41
+ {
42
+ type: 'control',
43
+ label: {
44
+ en: 'Hover effect'
45
+ },
46
+ setting: {
47
+ id: 'hoverEffect'
48
+ },
49
+ isMoreSetting: true
50
+ },
51
+ {
52
+ type: 'control',
53
+ label: {
54
+ en: 'Zoom type'
55
+ },
56
+ condition: 'hoverEffect == "zoom"',
57
+ setting: {
58
+ id: 'zoomType'
59
+ },
60
+ isMoreSetting: true
61
+ },
62
+ {
63
+ type: 'control',
64
+ label: {
65
+ en: 'Zoom value'
66
+ },
67
+ condition: 'hoverEffect == "zoom"',
68
+ setting: {
69
+ id: 'zoom'
70
+ },
71
+ isMoreSetting: true
72
+ },
73
+ {
74
+ type: 'control',
75
+ label: {
76
+ en: 'Other image'
77
+ },
78
+ condition: 'hoverEffect == "other"',
79
+ setting: {
80
+ id: 'otherImage'
81
+ },
82
+ isMoreSetting: true
83
+ },
84
+ {
85
+ type: 'control',
86
+ label: {
87
+ en: 'Click effect'
88
+ },
89
+ setting: {
90
+ id: 'ftClickOpenLightBox'
91
+ },
92
+ isMoreSetting: true
93
+ },
94
+ {
95
+ type: 'control',
96
+ label: {
97
+ en: 'Open link in'
98
+ },
99
+ setting: {
100
+ id: 'ftClickOpenNewTab'
101
+ },
102
+ condition: `ftClickOpenLightBox === "product-link"`,
103
+ isMoreSetting: true
104
+ },
105
+ {
106
+ type: 'control',
107
+ label: {
108
+ en: 'Corner'
109
+ },
110
+ setting: {
111
+ id: 'ftCorner'
112
+ },
113
+ isMoreSetting: true
114
+ },
115
+ {
116
+ type: 'control',
117
+ label: {
118
+ en: 'Drag to scroll'
119
+ },
120
+ setting: {
121
+ id: 'ftDragToScroll'
122
+ },
123
+ isMoreSetting: true
124
+ },
125
+ {
126
+ type: 'control',
127
+ label: {
128
+ en: 'Loop'
129
+ },
130
+ setting: {
131
+ id: 'ftLoop'
132
+ },
133
+ isMoreSetting: true
134
+ },
135
+ {
136
+ type: 'control',
137
+ label: {
138
+ en: 'Slide speed'
139
+ },
140
+ setting: {
141
+ id: 'ftAnimationSpeed'
142
+ },
143
+ isMoreSetting: true
144
+ },
145
+ {
146
+ type: 'control',
147
+ label: {
148
+ en: 'Animation'
149
+ },
150
+ setting: {
151
+ id: 'ftAnimationMode'
152
+ },
153
+ isMoreSetting: true
154
+ }
155
+ ];
156
+ const productSelectImage = [
157
+ // tạm ẩn khi hỗ trợ đủ 2 option sẽ mở
158
+ // {
159
+ // type: 'control',
160
+ // setting: {
161
+ // id: 'typeDisplay',
162
+ // },
163
+ // layout: 'vertical',
164
+ // },
165
+ {
166
+ type: 'control',
167
+ label: {
168
+ en: 'Pre-display'
169
+ },
170
+ setting: {
171
+ id: 'preDisplay'
172
+ }
173
+ },
174
+ {
175
+ type: 'control',
176
+ label: {
177
+ en: 'Preload'
178
+ },
179
+ setting: {
180
+ id: 'preload'
181
+ }
182
+ }
183
+ ];
184
+ const productFeatureImageNavigationUI = [
185
+ {
186
+ type: 'control',
187
+ label: {
188
+ en: 'Navigation'
189
+ },
190
+ setting: {
191
+ id: 'ftNavigationPosition'
192
+ },
193
+ layout: 'vertical'
194
+ },
195
+ {
196
+ type: 'control',
197
+ layout: 'vertical',
198
+ condition: 'ftNavigationPosition !== "none"',
199
+ setting: {
200
+ id: 'ftArrowIcon'
201
+ },
202
+ isMoreSetting: true
203
+ },
204
+ {
205
+ type: 'control',
206
+ condition: 'ftNavigationPosition !== "none"',
207
+ label: {
208
+ en: 'Icon color'
209
+ },
210
+ setting: {
211
+ id: 'ftArrowIconColor'
212
+ },
213
+ isMoreSetting: true
214
+ },
215
+ {
216
+ type: 'control',
217
+ condition: 'ftNavigationPosition !== "none"',
218
+ label: {
219
+ en: 'Nav. color'
220
+ },
221
+ setting: {
222
+ id: 'ftArrowNavColor'
223
+ },
224
+ isMoreSetting: true
225
+ },
226
+ {
227
+ type: 'control',
228
+ condition: 'ftNavigationPosition !== "none"',
229
+ label: {
230
+ en: 'Nav. border'
231
+ },
232
+ setting: {
233
+ id: 'ftArrowNavBorder'
234
+ },
235
+ isMoreSetting: true
236
+ },
237
+ {
238
+ type: 'control',
239
+ condition: 'ftNavigationPosition !== "none"',
240
+ label: {
241
+ en: 'Nav. corner'
242
+ },
243
+ setting: {
244
+ id: 'ftArrowNavRadius'
245
+ },
246
+ isMoreSetting: true
247
+ }
248
+ ];
249
+
250
+ exports.productFeatureImageNavigationUI = productFeatureImageNavigationUI;
251
+ exports.productFeatureImageUI = productFeatureImageUI;
252
+ exports.productSelectImage = productSelectImage;