@gem-sdk/components 2.5.3 → 2.5.4
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/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +6 -1
- package/dist/cjs/product/setting/product-image-v2/ProductFeatureImage.js +11 -6
- package/dist/esm/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js +6 -1
- package/dist/esm/product/setting/product-image-v2/ProductFeatureImage.js +11 -6
- package/package.json +2 -2
package/dist/cjs/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js
CHANGED
|
@@ -123,7 +123,12 @@ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyload
|
|
|
123
123
|
return core.template`
|
|
124
124
|
{% assign src = featureMedia.src %}
|
|
125
125
|
${hasHoverEffect && setting.hoverEffect == 'other' ? `
|
|
126
|
-
{% assign
|
|
126
|
+
{% assign media_length = product.media | size %}
|
|
127
|
+
{% assign other_image_index = ${setting.otherImage} | plus: 0 %}
|
|
128
|
+
{% if other_image_index >= media_length %}
|
|
129
|
+
{% assign other_image_index = media_length | minus: 1 %}
|
|
130
|
+
{% endif %}
|
|
131
|
+
{% assign otherImage = product.media[other_image_index] %}
|
|
127
132
|
{% assign src = otherImage.src %}
|
|
128
133
|
{% if otherImage.media_type != 'image' %}
|
|
129
134
|
{% assign src = otherImage.preview_image.src %}
|
|
@@ -70,23 +70,28 @@ const productFeatureImageSetting = [
|
|
|
70
70
|
{
|
|
71
71
|
id: 'otherImage',
|
|
72
72
|
label: 'Other image',
|
|
73
|
-
type: '
|
|
74
|
-
|
|
73
|
+
type: 'dropdown:input',
|
|
74
|
+
inputType: 'number',
|
|
75
|
+
useOnlyUnitInit: true,
|
|
76
|
+
hideUnit: true,
|
|
77
|
+
isReturnNumber: true,
|
|
78
|
+
isIndexValue: true,
|
|
79
|
+
displayOptions: [
|
|
75
80
|
{
|
|
76
81
|
label: 'Image 1',
|
|
77
|
-
value:
|
|
82
|
+
value: 1
|
|
78
83
|
},
|
|
79
84
|
{
|
|
80
85
|
label: 'Image 2',
|
|
81
|
-
value:
|
|
86
|
+
value: 2
|
|
82
87
|
},
|
|
83
88
|
{
|
|
84
89
|
label: 'Image 3',
|
|
85
|
-
value:
|
|
90
|
+
value: 3
|
|
86
91
|
},
|
|
87
92
|
{
|
|
88
93
|
label: 'Image 4',
|
|
89
|
-
value:
|
|
94
|
+
value: 4
|
|
90
95
|
},
|
|
91
96
|
{
|
|
92
97
|
label: 'Last image',
|
package/dist/esm/product/components/ProductImagesV2/liquid/ProductFeaturedImageCarousel.liquid.js
CHANGED
|
@@ -119,7 +119,12 @@ const ProductFeaturedImageCarousel = ({ builderPropUID, children, enableLazyload
|
|
|
119
119
|
return template`
|
|
120
120
|
{% assign src = featureMedia.src %}
|
|
121
121
|
${hasHoverEffect && setting.hoverEffect == 'other' ? `
|
|
122
|
-
{% assign
|
|
122
|
+
{% assign media_length = product.media | size %}
|
|
123
|
+
{% assign other_image_index = ${setting.otherImage} | plus: 0 %}
|
|
124
|
+
{% if other_image_index >= media_length %}
|
|
125
|
+
{% assign other_image_index = media_length | minus: 1 %}
|
|
126
|
+
{% endif %}
|
|
127
|
+
{% assign otherImage = product.media[other_image_index] %}
|
|
123
128
|
{% assign src = otherImage.src %}
|
|
124
129
|
{% if otherImage.media_type != 'image' %}
|
|
125
130
|
{% assign src = otherImage.preview_image.src %}
|
|
@@ -68,23 +68,28 @@ const productFeatureImageSetting = [
|
|
|
68
68
|
{
|
|
69
69
|
id: 'otherImage',
|
|
70
70
|
label: 'Other image',
|
|
71
|
-
type: '
|
|
72
|
-
|
|
71
|
+
type: 'dropdown:input',
|
|
72
|
+
inputType: 'number',
|
|
73
|
+
useOnlyUnitInit: true,
|
|
74
|
+
hideUnit: true,
|
|
75
|
+
isReturnNumber: true,
|
|
76
|
+
isIndexValue: true,
|
|
77
|
+
displayOptions: [
|
|
73
78
|
{
|
|
74
79
|
label: 'Image 1',
|
|
75
|
-
value:
|
|
80
|
+
value: 1
|
|
76
81
|
},
|
|
77
82
|
{
|
|
78
83
|
label: 'Image 2',
|
|
79
|
-
value:
|
|
84
|
+
value: 2
|
|
80
85
|
},
|
|
81
86
|
{
|
|
82
87
|
label: 'Image 3',
|
|
83
|
-
value:
|
|
88
|
+
value: 3
|
|
84
89
|
},
|
|
85
90
|
{
|
|
86
91
|
label: 'Image 4',
|
|
87
|
-
value:
|
|
92
|
+
value: 4
|
|
88
93
|
},
|
|
89
94
|
{
|
|
90
95
|
label: 'Last image',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"format": "prettier --write \"./src/**/*.{ts,tsx}\""
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@gem-sdk/core": "2.4
|
|
24
|
+
"@gem-sdk/core": "2.5.4",
|
|
25
25
|
"@gem-sdk/styles": "2.4.8",
|
|
26
26
|
"@types/react-transition-group": "^4.4.5"
|
|
27
27
|
},
|