@gem-sdk/components 2.0.0-dev.739 → 2.0.0-dev.741
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/builder.js +2 -2
- package/dist/cjs/carousel/components/item/CarouselItem.js +1 -2
- package/dist/cjs/carousel/components/root/Carousel.liquid.js +3 -3
- package/dist/cjs/carousel/components/root/common/classes.js +2 -2
- package/dist/cjs/carousel/components/root/common/styles.js +0 -2
- package/dist/cjs/carousel/index.js +3 -3
- package/dist/cjs/hero-banner/settings/configs/settings.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/product/components/product-images/ProductGalleryCarousel.js +2 -2
- package/dist/cjs/product/components/product-images/ProductImagesLightBox.js +2 -2
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +3 -3
- package/dist/cjs/product/components/product-images-v2/components/child/ProductFeaturedImageCarousel.js +2 -2
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +2 -2
- package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +2 -2
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.js +2 -2
- package/dist/cjs/product/index.js +1 -1
- package/dist/esm/builder.js +2 -2
- package/dist/esm/carousel/components/item/CarouselItem.js +1 -2
- package/dist/esm/carousel/components/root/Carousel.liquid.js +3 -3
- package/dist/esm/carousel/components/root/common/classes.js +2 -2
- package/dist/esm/carousel/components/root/common/styles.js +0 -2
- package/dist/esm/carousel/index.js +1 -1
- package/dist/esm/hero-banner/settings/configs/settings.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/product/components/product-images/ProductGalleryCarousel.js +2 -2
- package/dist/esm/product/components/product-images/ProductImagesLightBox.js +2 -2
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +3 -3
- package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageCarousel.js +2 -2
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +2 -2
- package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +2 -2
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.js +2 -2
- package/dist/esm/product/index.js +1 -1
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/cjs/carousel/components/root/CarouselWithSwiper.js +0 -131
- package/dist/cjs/carousel/components/root/CustomSwiper.js +0 -59
- package/dist/cjs/carousel/hooks/useCarouselWithSwiper.js +0 -343
- package/dist/esm/carousel/components/root/CarouselWithSwiper.js +0 -127
- package/dist/esm/carousel/components/root/CustomSwiper.js +0 -56
- package/dist/esm/carousel/hooks/useCarouselWithSwiper.js +0 -341
package/dist/cjs/builder.js
CHANGED
|
@@ -136,7 +136,7 @@ var ArticleReadMore = require('./article/components/ArticleReadMore.js');
|
|
|
136
136
|
var HeroBanner = require('./hero-banner/components/HeroBanner.js');
|
|
137
137
|
var Breadcrumb = require('./breadcrumb/components/Breadcrumb.js');
|
|
138
138
|
var Button = require('./button/components/Button.js');
|
|
139
|
-
var
|
|
139
|
+
var Carousel = require('./carousel/components/root/Carousel.js');
|
|
140
140
|
var CarouselItem = require('./carousel/components/item/CarouselItem.js');
|
|
141
141
|
var Cart = require('./cart/components/Cart.js');
|
|
142
142
|
var CartList = require('./cart/components/CartList.js');
|
|
@@ -284,7 +284,7 @@ var builder = {
|
|
|
284
284
|
HeroBanner: HeroBanner.default,
|
|
285
285
|
Breadcrumb: Breadcrumb.default,
|
|
286
286
|
Button: Button.default,
|
|
287
|
-
Carousel:
|
|
287
|
+
Carousel: Carousel.default,
|
|
288
288
|
CarouselItem: CarouselItem.default,
|
|
289
289
|
Cart: Cart.default,
|
|
290
290
|
CartList: CartList.default,
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var core = require('@gem-sdk/core');
|
|
8
|
-
var CustomSwiper = require('../root/CustomSwiper.js');
|
|
9
8
|
var styles = require('./common/styles.js');
|
|
10
9
|
var classes = require('./common/classes.js');
|
|
11
10
|
var useCarouseItem = require('../../hooks/useCarouseItem.js');
|
|
@@ -16,7 +15,7 @@ const CarouselItem = (props)=>{
|
|
|
16
15
|
const { handleClick, handleMouseMove, handleMouseOut } = useCarouseItem.useCarouselItem(props);
|
|
17
16
|
const { carouselItemStyle, carouselItemInnerStyle } = styles.getStyle(props);
|
|
18
17
|
const { carouselItemClass, carouselItemInnerClass } = classes.getClass(props);
|
|
19
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
18
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
20
19
|
...builderAttrs,
|
|
21
20
|
"aria-hidden": true,
|
|
22
21
|
className: carouselItemClass,
|
|
@@ -25,7 +25,7 @@ const Carousel = (props)=>{
|
|
|
25
25
|
const { rootStyleRender, wrapperStyleRender, wrapperInnerStyle, sliderStyle } = styles.getStyle(renderData);
|
|
26
26
|
const { rootAttrRender, sliderAttr } = attrs.getAttr(renderData);
|
|
27
27
|
const renderJS = ()=>{
|
|
28
|
-
return core.RenderIf(core.isLocalEnv, `<script ${helpers$2.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-carousel-
|
|
28
|
+
return core.RenderIf(core.isLocalEnv, `<script ${helpers$2.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-carousel-v2.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers$2.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-carousel-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);
|
|
29
29
|
};
|
|
30
30
|
const renderArrow = (position)=>{
|
|
31
31
|
const isNext = position === 'next';
|
|
@@ -77,9 +77,9 @@ const Carousel = (props)=>{
|
|
|
77
77
|
class="${wrapperClassRender}"
|
|
78
78
|
style="${wrapperStyleRender}"
|
|
79
79
|
>
|
|
80
|
-
<div
|
|
80
|
+
<div class="${wrapperInnerClass}" style="${wrapperInnerStyle}">
|
|
81
81
|
${renderArrow('prev')}
|
|
82
|
-
<div class="${sliderClass}" style="${sliderStyle}">
|
|
82
|
+
<div ${sliderAttr} class="${sliderClass}" style="${sliderStyle}">
|
|
83
83
|
${renderChildren()}
|
|
84
84
|
</div>
|
|
85
85
|
${renderArrow('next')}
|
|
@@ -98,7 +98,7 @@ const getClass = (props)=>{
|
|
|
98
98
|
...getDisplayOfWrapper()
|
|
99
99
|
});
|
|
100
100
|
const wrapperInnerClass = system.createClass({
|
|
101
|
-
'gp-relative gp-
|
|
101
|
+
'gp-relative gp-flex gp-items-center gp-justify-between': true,
|
|
102
102
|
'!gp-h-full': fullHeight,
|
|
103
103
|
...getWrapperInnerHeight(),
|
|
104
104
|
...makeFlexColClass()
|
|
@@ -116,7 +116,7 @@ const getClass = (props)=>{
|
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
118
|
const sliderClass = system.createClass({
|
|
119
|
-
'gem-slider
|
|
119
|
+
'gem-slider gp-h-full gp-overflow-hidden gp-select-none': true,
|
|
120
120
|
[sliderSelector]: true,
|
|
121
121
|
...slidesClass && {
|
|
122
122
|
[slidesClass]: true
|
|
@@ -5,12 +5,12 @@ require('@gem-sdk/core');
|
|
|
5
5
|
require('react');
|
|
6
6
|
require('@gem-sdk/system');
|
|
7
7
|
require('next/link');
|
|
8
|
-
require('
|
|
9
|
-
var Carousel = require('./settings/Carousel.js');
|
|
8
|
+
require('@gem-sdk/keen-slider/react');
|
|
9
|
+
var Carousel$1 = require('./settings/Carousel.js');
|
|
10
10
|
var CarouselItem$1 = require('./settings/CarouselItem.js');
|
|
11
11
|
|
|
12
12
|
const carouselSetting = {
|
|
13
|
-
Carousel: Carousel.default,
|
|
13
|
+
Carousel: Carousel$1.default,
|
|
14
14
|
CarouselItem: CarouselItem$1.default
|
|
15
15
|
};
|
|
16
16
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -81,7 +81,7 @@ var ArticleReadMore = require('./article/components/ArticleReadMore.js');
|
|
|
81
81
|
var HeroBanner = require('./hero-banner/components/HeroBanner.js');
|
|
82
82
|
var Breadcrumb = require('./breadcrumb/components/Breadcrumb.js');
|
|
83
83
|
var Button = require('./button/components/Button.js');
|
|
84
|
-
var
|
|
84
|
+
var Carousel = require('./carousel/components/root/Carousel.js');
|
|
85
85
|
var CarouselItem = require('./carousel/components/item/CarouselItem.js');
|
|
86
86
|
var Cart = require('./cart/components/Cart.js');
|
|
87
87
|
var CartList = require('./cart/components/CartList.js');
|
|
@@ -420,7 +420,7 @@ exports.ArticleReadMore = ArticleReadMore.default;
|
|
|
420
420
|
exports.HeroBanner = HeroBanner.default;
|
|
421
421
|
exports.Breadcrumb = Breadcrumb.default;
|
|
422
422
|
exports.Button = Button.default;
|
|
423
|
-
exports.Carousel =
|
|
423
|
+
exports.Carousel = Carousel.default;
|
|
424
424
|
exports.CarouselItem = CarouselItem.default;
|
|
425
425
|
exports.Cart = Cart.default;
|
|
426
426
|
exports.CartList = CartList.default;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var
|
|
8
|
+
var Carousel = require('../../../carousel/components/root/Carousel.js');
|
|
9
9
|
var CarouselItem = require('../../../carousel/components/item/CarouselItem.js');
|
|
10
10
|
var core = require('@gem-sdk/core');
|
|
11
11
|
var helpers = require('./common/helpers.js');
|
|
@@ -63,7 +63,7 @@ const ProductGalleryCarousel = ({ builderPropUID, productImages, onHandleClick,
|
|
|
63
63
|
setting?.aspectRatio,
|
|
64
64
|
aspectHeight
|
|
65
65
|
]);
|
|
66
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
66
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Carousel.default, {
|
|
67
67
|
setting: {
|
|
68
68
|
loop: setting?.loop,
|
|
69
69
|
slidesToShow: slidePerShow,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var core = require('@gem-sdk/core');
|
|
8
|
-
var
|
|
8
|
+
var Carousel = require('../../../carousel/components/root/Carousel.js');
|
|
9
9
|
var CarouselItem = require('../../../carousel/components/item/CarouselItem.js');
|
|
10
10
|
var NextImage = require('../../../image/components/NextImage.js');
|
|
11
11
|
require('../../../modal/components/confirm.js');
|
|
@@ -43,7 +43,7 @@ const ProductImagesLightBox = ({ builderPropUID, productImages, open, imageRatio
|
|
|
43
43
|
onClose: ()=>onHandleClose(),
|
|
44
44
|
disableIframeClickEvent: true,
|
|
45
45
|
contentClass: "mobile:!gp-w-[100%] gp-px-2",
|
|
46
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(
|
|
46
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(Carousel.default, {
|
|
47
47
|
setting: {
|
|
48
48
|
loop: loopControl,
|
|
49
49
|
slidesToShow: {
|
|
@@ -126,7 +126,7 @@ const ProductImages = (props)=>{
|
|
|
126
126
|
{% assign featured_image = product.featured_image %}
|
|
127
127
|
${system.LiquidIf(`variant != null and variant.featured_image != null`, `{% assign featured_image = variant.featured_image %}`)}
|
|
128
128
|
`)}
|
|
129
|
-
<gp-product-images-
|
|
129
|
+
<gp-product-images-v2
|
|
130
130
|
gp-data='${gpData}'
|
|
131
131
|
${{
|
|
132
132
|
...gpProductImagesAttrs
|
|
@@ -148,8 +148,8 @@ const ProductImages = (props)=>{
|
|
|
148
148
|
})}
|
|
149
149
|
${system.If(!isOnlyFeatureAllDevices, system.LiquidIf('product.media.size > 1', renderProductGalleryImages()))}
|
|
150
150
|
</div>
|
|
151
|
-
</gp-product-images-
|
|
152
|
-
${system.If(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-images-
|
|
151
|
+
</gp-product-images-v2>
|
|
152
|
+
${system.If(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-images-v2.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-product-images-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
153
153
|
`;
|
|
154
154
|
};
|
|
155
155
|
|
|
@@ -11,7 +11,7 @@ var getProductImagesClassName = require('../../composables/getProductImagesClass
|
|
|
11
11
|
var getProductImagesAttr = require('../../composables/getProductImagesAttr.js');
|
|
12
12
|
var system = require('@gem-sdk/system');
|
|
13
13
|
var styles = require('../../common/styles.js');
|
|
14
|
-
var
|
|
14
|
+
var Carousel = require('../../../../../carousel/components/root/Carousel.js');
|
|
15
15
|
var CarouselItem = require('../../../../../carousel/components/item/CarouselItem.js');
|
|
16
16
|
var ProductFeaturedImageOnly = require('./ProductFeaturedImageOnly.js');
|
|
17
17
|
var useProductFeaturedImageCarousel = require('../../hooks/useProductFeaturedImageCarousel.js');
|
|
@@ -36,7 +36,7 @@ const ProductFeaturedImageCarousel = (props)=>{
|
|
|
36
36
|
ref: ref,
|
|
37
37
|
"data-slot": "children",
|
|
38
38
|
className: "product-feature-image",
|
|
39
|
-
children: isRenderFeatureCarousel ? /*#__PURE__*/ jsxRuntime.jsxs(
|
|
39
|
+
children: isRenderFeatureCarousel ? /*#__PURE__*/ jsxRuntime.jsxs(Carousel.default, {
|
|
40
40
|
parentClass: builderPropsClass,
|
|
41
41
|
elmRef: imgRef,
|
|
42
42
|
setting: featuredImageCarouselSettingAttrs,
|
package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js
CHANGED
|
@@ -13,7 +13,7 @@ var productFeaturedImage = require('../../common/productFeaturedImage.js');
|
|
|
13
13
|
var MediaIcon = require('../child/MediaIcon.js');
|
|
14
14
|
var ButtonOpenLightBox = require('../lightbox/ButtonOpenLightBox.js');
|
|
15
15
|
var NextImage = require('../../../../../image/components/NextImage.js');
|
|
16
|
-
var
|
|
16
|
+
var Carousel = require('../../../../../carousel/components/root/Carousel.js');
|
|
17
17
|
var CarouselItem = require('../../../../../carousel/components/item/CarouselItem.js');
|
|
18
18
|
var useGalleryCarousel = require('../../hooks/useGalleryCarousel.js');
|
|
19
19
|
var system = require('@gem-sdk/system');
|
|
@@ -27,7 +27,7 @@ const ProductGalleryCarousel = (props)=>{
|
|
|
27
27
|
const { galleryCarouselStyle, galleryCarouselItemStyle } = getProductImagesStyles.getProductImagesStyles(setting);
|
|
28
28
|
const { moveToIdx, isDisplay, shapeByLayout, isEnableBorderActive, isShowButtonLightbox, filteredProductImages, handleClickCarouselItem } = useGalleryCarousel.useGalleryCarousel(props);
|
|
29
29
|
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
30
|
-
children: isDisplay && /*#__PURE__*/ jsxRuntime.jsx(
|
|
30
|
+
children: isDisplay && /*#__PURE__*/ jsxRuntime.jsx(Carousel.default, {
|
|
31
31
|
parentClass: builderPropsClass,
|
|
32
32
|
rootClass: builderPropsClass,
|
|
33
33
|
setting: galleryCarouselSettingAttrs,
|
package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var core = require('@gem-sdk/core');
|
|
8
|
-
var
|
|
8
|
+
var Carousel = require('../../../../../carousel/components/root/Carousel.js');
|
|
9
9
|
var CarouselItem = require('../../../../../carousel/components/item/CarouselItem.js');
|
|
10
10
|
var NextImage = require('../../../../../image/components/NextImage.js');
|
|
11
11
|
require('../../../../../modal/components/confirm.js');
|
|
@@ -53,7 +53,7 @@ const ProductImagesLightBox = ({ builderPropUID, productImages, open, imageRatio
|
|
|
53
53
|
},
|
|
54
54
|
disableIframeClickEvent: true,
|
|
55
55
|
contentClass: "mobile:!gp-w-[100%] gp-px-2 gp-pb-10",
|
|
56
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(
|
|
56
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(Carousel.default, {
|
|
57
57
|
setting: {
|
|
58
58
|
loop: loopControl,
|
|
59
59
|
slidesToShow: {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var core = require('@gem-sdk/core');
|
|
7
|
-
var
|
|
7
|
+
var Carousel = require('../../../carousel/components/root/Carousel.js');
|
|
8
8
|
var CarouselItem = require('../../../carousel/components/item/CarouselItem.js');
|
|
9
9
|
var ChildrenDroppable = require('../../../grid/components/ChildrenDroppable.js');
|
|
10
10
|
var helpers = require('./common/helpers.js');
|
|
@@ -19,7 +19,7 @@ const ProductListCarouselLayout = (props)=>{
|
|
|
19
19
|
const { productListAttr, getAttrProductItemEditor } = attrs.getAttr(props);
|
|
20
20
|
const { carouselItemStyle } = styles.getStyle(props);
|
|
21
21
|
const { carouselClass, productItemClass } = classes.getClass(props);
|
|
22
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
22
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Carousel.default, {
|
|
23
23
|
advanced: advanced,
|
|
24
24
|
builderProps: {
|
|
25
25
|
uid: builderProps?.uid
|
|
@@ -11,7 +11,7 @@ require('../notification/components/Notice.js');
|
|
|
11
11
|
require('./components/product-button/types.js');
|
|
12
12
|
require('./components/product-variants/components/variants/index.js');
|
|
13
13
|
require('next/image');
|
|
14
|
-
require('
|
|
14
|
+
require('@gem-sdk/keen-slider/react');
|
|
15
15
|
require('../modal/components/confirm.js');
|
|
16
16
|
require('react-dom');
|
|
17
17
|
require('../video/components/Video.js');
|
package/dist/esm/builder.js
CHANGED
|
@@ -132,7 +132,7 @@ import ArticleReadMore from './article/components/ArticleReadMore.js';
|
|
|
132
132
|
import HeroBanner from './hero-banner/components/HeroBanner.js';
|
|
133
133
|
import Breadcrumb from './breadcrumb/components/Breadcrumb.js';
|
|
134
134
|
import Button from './button/components/Button.js';
|
|
135
|
-
import
|
|
135
|
+
import Carousel from './carousel/components/root/Carousel.js';
|
|
136
136
|
import CarouselItem from './carousel/components/item/CarouselItem.js';
|
|
137
137
|
import Cart from './cart/components/Cart.js';
|
|
138
138
|
import CartList from './cart/components/CartList.js';
|
|
@@ -280,7 +280,7 @@ var builder = {
|
|
|
280
280
|
HeroBanner,
|
|
281
281
|
Breadcrumb,
|
|
282
282
|
Button,
|
|
283
|
-
Carousel
|
|
283
|
+
Carousel,
|
|
284
284
|
CarouselItem,
|
|
285
285
|
Cart,
|
|
286
286
|
CartList,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { isEmptyChildren } from '@gem-sdk/core';
|
|
4
|
-
import { SwiperSlide } from '../root/CustomSwiper.js';
|
|
5
4
|
import { getStyle } from './common/styles.js';
|
|
6
5
|
import { getClass } from './common/classes.js';
|
|
7
6
|
import { useCarouselItem } from '../../hooks/useCarouseItem.js';
|
|
@@ -12,7 +11,7 @@ const CarouselItem = (props)=>{
|
|
|
12
11
|
const { handleClick, handleMouseMove, handleMouseOut } = useCarouselItem(props);
|
|
13
12
|
const { carouselItemStyle, carouselItemInnerStyle } = getStyle(props);
|
|
14
13
|
const { carouselItemClass, carouselItemInnerClass } = getClass(props);
|
|
15
|
-
return /*#__PURE__*/ jsx(
|
|
14
|
+
return /*#__PURE__*/ jsx("div", {
|
|
16
15
|
...builderAttrs,
|
|
17
16
|
"aria-hidden": true,
|
|
18
17
|
className: carouselItemClass,
|
|
@@ -21,7 +21,7 @@ const Carousel = (props)=>{
|
|
|
21
21
|
const { rootStyleRender, wrapperStyleRender, wrapperInnerStyle, sliderStyle } = getStyle(renderData);
|
|
22
22
|
const { rootAttrRender, sliderAttr } = getAttr(renderData);
|
|
23
23
|
const renderJS = ()=>{
|
|
24
|
-
return RenderIf(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-carousel-
|
|
24
|
+
return RenderIf(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-carousel-v2.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-carousel-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);
|
|
25
25
|
};
|
|
26
26
|
const renderArrow = (position)=>{
|
|
27
27
|
const isNext = position === 'next';
|
|
@@ -73,9 +73,9 @@ const Carousel = (props)=>{
|
|
|
73
73
|
class="${wrapperClassRender}"
|
|
74
74
|
style="${wrapperStyleRender}"
|
|
75
75
|
>
|
|
76
|
-
<div
|
|
76
|
+
<div class="${wrapperInnerClass}" style="${wrapperInnerStyle}">
|
|
77
77
|
${renderArrow('prev')}
|
|
78
|
-
<div class="${sliderClass}" style="${sliderStyle}">
|
|
78
|
+
<div ${sliderAttr} class="${sliderClass}" style="${sliderStyle}">
|
|
79
79
|
${renderChildren()}
|
|
80
80
|
</div>
|
|
81
81
|
${renderArrow('next')}
|
|
@@ -96,7 +96,7 @@ const getClass = (props)=>{
|
|
|
96
96
|
...getDisplayOfWrapper()
|
|
97
97
|
});
|
|
98
98
|
const wrapperInnerClass = createClass({
|
|
99
|
-
'gp-relative gp-
|
|
99
|
+
'gp-relative gp-flex gp-items-center gp-justify-between': true,
|
|
100
100
|
'!gp-h-full': fullHeight,
|
|
101
101
|
...getWrapperInnerHeight(),
|
|
102
102
|
...makeFlexColClass()
|
|
@@ -114,7 +114,7 @@ const getClass = (props)=>{
|
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
116
|
const sliderClass = createClass({
|
|
117
|
-
'gem-slider
|
|
117
|
+
'gem-slider gp-h-full gp-overflow-hidden gp-select-none': true,
|
|
118
118
|
[sliderSelector]: true,
|
|
119
119
|
...slidesClass && {
|
|
120
120
|
[slidesClass]: true
|
package/dist/esm/index.js
CHANGED
|
@@ -80,7 +80,7 @@ export { default as ArticleReadMore } from './article/components/ArticleReadMore
|
|
|
80
80
|
export { default as HeroBanner } from './hero-banner/components/HeroBanner.js';
|
|
81
81
|
export { default as Breadcrumb } from './breadcrumb/components/Breadcrumb.js';
|
|
82
82
|
export { default as Button } from './button/components/Button.js';
|
|
83
|
-
export { default as Carousel } from './carousel/components/root/
|
|
83
|
+
export { default as Carousel } from './carousel/components/root/Carousel.js';
|
|
84
84
|
export { default as CarouselItem } from './carousel/components/item/CarouselItem.js';
|
|
85
85
|
export { default as Cart } from './cart/components/Cart.js';
|
|
86
86
|
export { default as CartList } from './cart/components/CartList.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
-
import
|
|
4
|
+
import Carousel from '../../../carousel/components/root/Carousel.js';
|
|
5
5
|
import CarouselItem from '../../../carousel/components/item/CarouselItem.js';
|
|
6
6
|
import { useCurrentDevice, useFeaturedImageGlobal, getResponsiveValueByScreen, makeAspectRatio, cls, makeStyleResponsive, makeWidth } from '@gem-sdk/core';
|
|
7
7
|
import { convertSpacing } from './common/helpers.js';
|
|
@@ -59,7 +59,7 @@ const ProductGalleryCarousel = ({ builderPropUID, productImages, onHandleClick,
|
|
|
59
59
|
setting?.aspectRatio,
|
|
60
60
|
aspectHeight
|
|
61
61
|
]);
|
|
62
|
-
return /*#__PURE__*/ jsx(
|
|
62
|
+
return /*#__PURE__*/ jsx(Carousel, {
|
|
63
63
|
setting: {
|
|
64
64
|
loop: setting?.loop,
|
|
65
65
|
slidesToShow: slidePerShow,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useFeaturedImageGlobal, cls } from '@gem-sdk/core';
|
|
4
|
-
import
|
|
4
|
+
import Carousel from '../../../carousel/components/root/Carousel.js';
|
|
5
5
|
import CarouselItem from '../../../carousel/components/item/CarouselItem.js';
|
|
6
6
|
import NextImage from '../../../image/components/NextImage.js';
|
|
7
7
|
import '../../../modal/components/confirm.js';
|
|
@@ -39,7 +39,7 @@ const ProductImagesLightBox = ({ builderPropUID, productImages, open, imageRatio
|
|
|
39
39
|
onClose: ()=>onHandleClose(),
|
|
40
40
|
disableIframeClickEvent: true,
|
|
41
41
|
contentClass: "mobile:!gp-w-[100%] gp-px-2",
|
|
42
|
-
children: /*#__PURE__*/ jsx(
|
|
42
|
+
children: /*#__PURE__*/ jsx(Carousel, {
|
|
43
43
|
setting: {
|
|
44
44
|
loop: loopControl,
|
|
45
45
|
slidesToShow: {
|
|
@@ -122,7 +122,7 @@ const ProductImages = (props)=>{
|
|
|
122
122
|
{% assign featured_image = product.featured_image %}
|
|
123
123
|
${LiquidIf(`variant != null and variant.featured_image != null`, `{% assign featured_image = variant.featured_image %}`)}
|
|
124
124
|
`)}
|
|
125
|
-
<gp-product-images-
|
|
125
|
+
<gp-product-images-v2
|
|
126
126
|
gp-data='${gpData}'
|
|
127
127
|
${{
|
|
128
128
|
...gpProductImagesAttrs
|
|
@@ -144,8 +144,8 @@ const ProductImages = (props)=>{
|
|
|
144
144
|
})}
|
|
145
145
|
${If(!isOnlyFeatureAllDevices, LiquidIf('product.media.size > 1', renderProductGalleryImages()))}
|
|
146
146
|
</div>
|
|
147
|
-
</gp-product-images-
|
|
148
|
-
${If(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-images-
|
|
147
|
+
</gp-product-images-v2>
|
|
148
|
+
${If(isLocalEnv, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-product-images-v2.js' | asset_url }}" defer="defer"></script>`, `<script ${getSettingPreloadData('class="gps-link" delay', 'src')}="${baseAssetURL}/assets-v2/gp-product-images-v2.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
149
149
|
`;
|
|
150
150
|
};
|
|
151
151
|
|
|
@@ -7,7 +7,7 @@ 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/styles.js';
|
|
10
|
-
import
|
|
10
|
+
import Carousel from '../../../../../carousel/components/root/Carousel.js';
|
|
11
11
|
import CarouselItem from '../../../../../carousel/components/item/CarouselItem.js';
|
|
12
12
|
import ProductFeaturedImageOnly from './ProductFeaturedImageOnly.js';
|
|
13
13
|
import { useProductFeaturedImageCarousel } from '../../hooks/useProductFeaturedImageCarousel.js';
|
|
@@ -32,7 +32,7 @@ const ProductFeaturedImageCarousel = (props)=>{
|
|
|
32
32
|
ref: ref,
|
|
33
33
|
"data-slot": "children",
|
|
34
34
|
className: "product-feature-image",
|
|
35
|
-
children: isRenderFeatureCarousel ? /*#__PURE__*/ jsxs(
|
|
35
|
+
children: isRenderFeatureCarousel ? /*#__PURE__*/ jsxs(Carousel, {
|
|
36
36
|
parentClass: builderPropsClass,
|
|
37
37
|
elmRef: imgRef,
|
|
38
38
|
setting: featuredImageCarouselSettingAttrs,
|
package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js
CHANGED
|
@@ -9,7 +9,7 @@ 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
|
|
12
|
+
import Carousel from '../../../../../carousel/components/root/Carousel.js';
|
|
13
13
|
import CarouselItem from '../../../../../carousel/components/item/CarouselItem.js';
|
|
14
14
|
import { useGalleryCarousel } from '../../hooks/useGalleryCarousel.js';
|
|
15
15
|
import { If } from '@gem-sdk/system';
|
|
@@ -23,7 +23,7 @@ const ProductGalleryCarousel = (props)=>{
|
|
|
23
23
|
const { galleryCarouselStyle, galleryCarouselItemStyle } = getProductImagesStyles(setting);
|
|
24
24
|
const { moveToIdx, isDisplay, shapeByLayout, isEnableBorderActive, isShowButtonLightbox, filteredProductImages, handleClickCarouselItem } = useGalleryCarousel(props);
|
|
25
25
|
return /*#__PURE__*/ jsx(Fragment, {
|
|
26
|
-
children: isDisplay && /*#__PURE__*/ jsx(
|
|
26
|
+
children: isDisplay && /*#__PURE__*/ jsx(Carousel, {
|
|
27
27
|
parentClass: builderPropsClass,
|
|
28
28
|
rootClass: builderPropsClass,
|
|
29
29
|
setting: galleryCarouselSettingAttrs,
|
package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
4
|
+
import Carousel from '../../../../../carousel/components/root/Carousel.js';
|
|
5
5
|
import CarouselItem from '../../../../../carousel/components/item/CarouselItem.js';
|
|
6
6
|
import NextImage from '../../../../../image/components/NextImage.js';
|
|
7
7
|
import '../../../../../modal/components/confirm.js';
|
|
@@ -49,7 +49,7 @@ const ProductImagesLightBox = ({ builderPropUID, productImages, open, imageRatio
|
|
|
49
49
|
},
|
|
50
50
|
disableIframeClickEvent: true,
|
|
51
51
|
contentClass: "mobile:!gp-w-[100%] gp-px-2 gp-pb-10",
|
|
52
|
-
children: /*#__PURE__*/ jsx(
|
|
52
|
+
children: /*#__PURE__*/ jsx(Carousel, {
|
|
53
53
|
setting: {
|
|
54
54
|
loop: loopControl,
|
|
55
55
|
slidesToShow: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useEditorMode, ProductProvider, isEmptyChildren } from '@gem-sdk/core';
|
|
3
|
-
import
|
|
3
|
+
import Carousel from '../../../carousel/components/root/Carousel.js';
|
|
4
4
|
import CarouselItem from '../../../carousel/components/item/CarouselItem.js';
|
|
5
5
|
import ChildrenDroppable from '../../../grid/components/ChildrenDroppable.js';
|
|
6
6
|
import { getData } from './common/helpers.js';
|
|
@@ -15,7 +15,7 @@ const ProductListCarouselLayout = (props)=>{
|
|
|
15
15
|
const { productListAttr, getAttrProductItemEditor } = getAttr(props);
|
|
16
16
|
const { carouselItemStyle } = getStyle(props);
|
|
17
17
|
const { carouselClass, productItemClass } = getClass(props);
|
|
18
|
-
return /*#__PURE__*/ jsx(
|
|
18
|
+
return /*#__PURE__*/ jsx(Carousel, {
|
|
19
19
|
advanced: advanced,
|
|
20
20
|
builderProps: {
|
|
21
21
|
uid: builderProps?.uid
|
|
@@ -9,7 +9,7 @@ import '../notification/components/Notice.js';
|
|
|
9
9
|
import './components/product-button/types.js';
|
|
10
10
|
import './components/product-variants/components/variants/index.js';
|
|
11
11
|
import 'next/image';
|
|
12
|
-
import '
|
|
12
|
+
import '@gem-sdk/keen-slider/react';
|
|
13
13
|
import '../modal/components/confirm.js';
|
|
14
14
|
import 'react-dom';
|
|
15
15
|
import '../video/components/Video.js';
|