@gem-sdk/components 2.0.0-dev.581 → 2.0.0-dev.583
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/button/components/Button.js +4 -0
- package/dist/cjs/button/components/Button.liquid.js +1 -1
- package/dist/cjs/button/components/ButtonLabel.js +2 -1
- package/dist/cjs/button/components/common/styles.js +2 -2
- package/dist/cjs/carousel/setting/configs/settingV2.js +2 -3
- package/dist/cjs/carousel/setting/configs/uiV1.js +1 -1
- package/dist/cjs/carousel/setting/configs/uiV2.js +1 -1
- package/dist/cjs/product/components/ProductButton/common/helpers.js +0 -4
- package/dist/cjs/product/components/ProductButton/components/PriceLayout.js +2 -2
- package/dist/cjs/product/components/ProductButton/components/PriceLayout.liquid.js +5 -5
- package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.js +1 -3
- package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.liquid.js +1 -3
- package/dist/cjs/product/components/ProductButton/components/Separator.js +1 -0
- package/dist/cjs/product/components/ProductButton/components/Separator.liquid.js +1 -0
- package/dist/cjs/product/components/ProductList/ProductListCarouselItem.liquid.js +28 -0
- package/dist/cjs/product/components/ProductList/ProductListCarouselLayout.liquid.js +4 -2
- package/dist/cjs/product/components/ProductList/ProductListGridLayout.liquid.js +2 -2
- package/dist/cjs/product/setting/product-button/configs/settings.js +17 -20
- package/dist/cjs/product/setting/product-button/configs/uiV2.js +63 -142
- package/dist/cjs/product/setting/product-list/configs/presets.js +10 -4
- package/dist/cjs/product/setting/product-view-more/configs/uiV2.js +71 -66
- package/dist/cjs/sticky/setting/preset-config.js +8 -2
- package/dist/esm/button/components/Button.js +5 -1
- package/dist/esm/button/components/Button.liquid.js +1 -1
- package/dist/esm/button/components/ButtonLabel.js +2 -1
- package/dist/esm/button/components/common/styles.js +2 -3
- package/dist/esm/carousel/setting/configs/settingV2.js +2 -3
- package/dist/esm/carousel/setting/configs/uiV1.js +1 -1
- package/dist/esm/carousel/setting/configs/uiV2.js +1 -1
- package/dist/esm/product/components/ProductButton/common/helpers.js +1 -4
- package/dist/esm/product/components/ProductButton/components/PriceLayout.js +2 -2
- package/dist/esm/product/components/ProductButton/components/PriceLayout.liquid.js +5 -5
- package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.js +2 -4
- package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.liquid.js +2 -4
- package/dist/esm/product/components/ProductButton/components/Separator.js +1 -0
- package/dist/esm/product/components/ProductButton/components/Separator.liquid.js +1 -0
- package/dist/esm/product/components/ProductList/ProductListCarouselItem.liquid.js +24 -0
- package/dist/esm/product/components/ProductList/ProductListCarouselLayout.liquid.js +3 -1
- package/dist/esm/product/components/ProductList/ProductListGridLayout.liquid.js +1 -1
- package/dist/esm/product/setting/product-button/configs/settings.js +17 -20
- package/dist/esm/product/setting/product-button/configs/uiV2.js +63 -142
- package/dist/esm/product/setting/product-list/configs/presets.js +10 -4
- package/dist/esm/product/setting/product-view-more/configs/uiV2.js +71 -66
- package/dist/esm/sticky/setting/preset-config.js +8 -2
- package/package.json +1 -1
- /package/dist/cjs/product/components/ProductList/{ProductListItem.liquid.js → ProductListGridItem.liquid.js} +0 -0
- /package/dist/esm/product/components/ProductList/{ProductListItem.liquid.js → ProductListGridItem.liquid.js} +0 -0
|
@@ -4,14 +4,14 @@ import { If } from '@gem-sdk/system';
|
|
|
4
4
|
import Separator from './Separator.js';
|
|
5
5
|
import BlankSpace from './BlankSpace.js';
|
|
6
6
|
|
|
7
|
-
const PriceLayout = ({ components, showSeparator, separator })=>{
|
|
7
|
+
const PriceLayout = ({ components, showPrice, showSeparator, separator })=>{
|
|
8
8
|
const separatorComponent = If(showSeparator, /*#__PURE__*/ jsx(Separator, {
|
|
9
9
|
separator: separator
|
|
10
10
|
}), /*#__PURE__*/ jsx(BlankSpace, {}));
|
|
11
11
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
12
12
|
children: [
|
|
13
13
|
separatorComponent,
|
|
14
|
-
components.map((component, index)=>/*#__PURE__*/ jsxs(React.Fragment, {
|
|
14
|
+
showPrice && components.map((component, index)=>/*#__PURE__*/ jsxs(React.Fragment, {
|
|
15
15
|
children: [
|
|
16
16
|
component,
|
|
17
17
|
index < components.length - 1 && /*#__PURE__*/ jsx(BlankSpace, {})
|
|
@@ -3,16 +3,16 @@ import Separator from './Separator.liquid.js';
|
|
|
3
3
|
import BlankSpace from './BlankSpace.liquid.js';
|
|
4
4
|
import { template } from '@gem-sdk/core';
|
|
5
5
|
|
|
6
|
-
const PriceLayout = ({ components, separator, showSeparator })=>{
|
|
6
|
+
const PriceLayout = ({ components, separator, showPrice, showSeparator })=>{
|
|
7
7
|
const separatorComponent = If(showSeparator, Separator({
|
|
8
8
|
separator
|
|
9
9
|
}), BlankSpace());
|
|
10
10
|
return template`
|
|
11
11
|
${separatorComponent}
|
|
12
|
-
${components.map((component, index)=>template`
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
${showPrice && components.map((component, index)=>template`
|
|
13
|
+
${component()}
|
|
14
|
+
${index < components.length - 1 ? BlankSpace() : ''}
|
|
15
|
+
`).join('')}
|
|
16
16
|
`;
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { PriceType } from '../common/types.js';
|
|
4
4
|
import 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { getRenderRegularPriceSettings, getRenderComparePriceSettings, isLayoutSupportComparePrice } from '../common/helpers.js';
|
|
6
6
|
import PriceLayout from './PriceLayout.js';
|
|
7
7
|
import PriceComponent from './PriceComponent.js';
|
|
8
8
|
|
|
9
9
|
const ProductButtonPrice = ({ setting, styles })=>{
|
|
10
|
-
if (!shouldRenderPrice(styles)) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
10
|
const createPriceComponents = ({ includeCompare })=>{
|
|
14
11
|
const components = [
|
|
15
12
|
/*#__PURE__*/ jsx(PriceComponent, {
|
|
@@ -31,6 +28,7 @@ const ProductButtonPrice = ({ setting, styles })=>{
|
|
|
31
28
|
return /*#__PURE__*/ jsx(PriceLayout, {
|
|
32
29
|
components: components,
|
|
33
30
|
separator: setting?.separator,
|
|
31
|
+
showPrice: !!styles?.enablePrice,
|
|
34
32
|
showSeparator: !!styles?.enableSeparator
|
|
35
33
|
});
|
|
36
34
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { PriceType } from '../common/types.js';
|
|
3
|
-
import {
|
|
3
|
+
import { getRenderComparePriceSettings, isLayoutSupportComparePrice, getRenderRegularPriceSettings } from '../common/helpers.js';
|
|
4
4
|
import PriceLayout from './PriceLayout.liquid.js';
|
|
5
5
|
import PriceComponent from './PriceComponent.liquid.js';
|
|
6
6
|
|
|
7
7
|
const ProductButtonPrice = ({ setting, styles })=>{
|
|
8
|
-
if (!shouldRenderPrice(styles)) {
|
|
9
|
-
return '';
|
|
10
|
-
}
|
|
11
8
|
const createPriceComponents = ({ includeCompare })=>{
|
|
12
9
|
const components = [
|
|
13
10
|
()=>PriceComponent({
|
|
@@ -29,6 +26,7 @@ const ProductButtonPrice = ({ setting, styles })=>{
|
|
|
29
26
|
return PriceLayout({
|
|
30
27
|
components,
|
|
31
28
|
separator: setting?.separator,
|
|
29
|
+
showPrice: !!styles?.enablePrice,
|
|
32
30
|
showSeparator: !!styles?.enableSeparator
|
|
33
31
|
});
|
|
34
32
|
};
|
|
@@ -4,6 +4,7 @@ import { getSeparatorStyle } from '../common/styles.js';
|
|
|
4
4
|
|
|
5
5
|
const Separator = ({ separator })=>{
|
|
6
6
|
return /*#__PURE__*/ jsx("div", {
|
|
7
|
+
className: "group-data-[state=loading]:gp-invisible data-[hidden=true]:gp-hidden",
|
|
7
8
|
style: getSeparatorStyle(),
|
|
8
9
|
dangerouslySetInnerHTML: {
|
|
9
10
|
__html: renderSeparator(separator)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { template } from '@gem-sdk/core';
|
|
2
|
+
import { getClass } from './common/getClass.js';
|
|
3
|
+
|
|
4
|
+
const ProductListItem = (props)=>{
|
|
5
|
+
const { pageContext, children } = props;
|
|
6
|
+
const { productItemClass, gpProductClass } = getClass(props);
|
|
7
|
+
return template /* liquid */ `
|
|
8
|
+
<gp-product
|
|
9
|
+
gp-context='{"variantSelected": {{ variant | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
|
|
10
|
+
gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(pageContext)}}'
|
|
11
|
+
class="${gpProductClass}"
|
|
12
|
+
|
|
13
|
+
>
|
|
14
|
+
{%- form 'product', product, id: product_form_id, class: 'form contents ${productItemClass}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
|
|
15
|
+
<input type="hidden" name="id" value="{{ variant.id }}" />
|
|
16
|
+
<input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
|
|
17
|
+
<button type="submit" onclick="return false;" style="display:none;"></button>
|
|
18
|
+
${children}
|
|
19
|
+
{%- endform -%}
|
|
20
|
+
</gp-product>
|
|
21
|
+
`;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { ProductListItem as default };
|
|
@@ -5,7 +5,7 @@ import { getData } from './common/index.js';
|
|
|
5
5
|
import { getClass } from './common/getClass.js';
|
|
6
6
|
import { getStyle } from './common/getStyle.js';
|
|
7
7
|
import { getStaticLocale } from '../../../helpers.js';
|
|
8
|
-
import ProductListItem from './
|
|
8
|
+
import ProductListItem from './ProductListCarouselItem.liquid.js';
|
|
9
9
|
|
|
10
10
|
const ProductListCarouselLayout = (props)=>{
|
|
11
11
|
const { builderProps, advanced, productSrc, productListId } = props;
|
|
@@ -38,6 +38,8 @@ const ProductListCarouselLayout = (props)=>{
|
|
|
38
38
|
},
|
|
39
39
|
style: carouselItemStyle,
|
|
40
40
|
parentId: `product-list-carousel-${builderProps?.uid} gp-child-item-${builderProps?.uid}`,
|
|
41
|
+
parentStyle: carouselConfigStyle,
|
|
42
|
+
background: carouselConfigSetting?.background,
|
|
41
43
|
children: `
|
|
42
44
|
${ProductListItem({
|
|
43
45
|
...props
|
|
@@ -2,7 +2,7 @@ import { template, RenderIf } from '@gem-sdk/core';
|
|
|
2
2
|
import { getStyle } from './common/getStyle.js';
|
|
3
3
|
import { getClass } from './common/getClass.js';
|
|
4
4
|
import { getAttr } from './common/getAttr.js';
|
|
5
|
-
import ProductListItem from './
|
|
5
|
+
import ProductListItem from './ProductListGridItem.liquid.js';
|
|
6
6
|
import { getStaticLocale } from '../../../helpers.js';
|
|
7
7
|
|
|
8
8
|
const ProductListGridLayout = (props)=>{
|
|
@@ -61,12 +61,6 @@ const ProductButtonSettings = [
|
|
|
61
61
|
value: 'cart-icon',
|
|
62
62
|
name: `<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon} Add to cart</div>`,
|
|
63
63
|
icon: true
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: 'icon-only',
|
|
67
|
-
value: 'icon-only',
|
|
68
|
-
name: `<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon}</div>`,
|
|
69
|
-
icon: true
|
|
70
64
|
}
|
|
71
65
|
]
|
|
72
66
|
},
|
|
@@ -176,16 +170,16 @@ const ProductButtonSettings = [
|
|
|
176
170
|
{
|
|
177
171
|
id: 'successMessage',
|
|
178
172
|
type: 'textarea',
|
|
179
|
-
label: 'Success
|
|
180
|
-
minHeight:
|
|
173
|
+
label: 'Success',
|
|
174
|
+
minHeight: 58,
|
|
181
175
|
default: 'Add product to cart successfully',
|
|
182
176
|
autoHeight: true
|
|
183
177
|
},
|
|
184
178
|
{
|
|
185
179
|
id: 'errorMessage',
|
|
186
180
|
type: 'textarea',
|
|
187
|
-
label: 'Error
|
|
188
|
-
minHeight:
|
|
181
|
+
label: 'Error',
|
|
182
|
+
minHeight: 58,
|
|
189
183
|
default: 'Cannot add product to cart',
|
|
190
184
|
autoHeight: true
|
|
191
185
|
},
|
|
@@ -193,7 +187,7 @@ const ProductButtonSettings = [
|
|
|
193
187
|
id: 'variantSelectionRequiredMessage',
|
|
194
188
|
type: 'textarea',
|
|
195
189
|
label: 'Error Message',
|
|
196
|
-
minHeight:
|
|
190
|
+
minHeight: 78,
|
|
197
191
|
default: 'Please select a variant to add product to cart',
|
|
198
192
|
autoHeight: true
|
|
199
193
|
}
|
|
@@ -539,14 +533,14 @@ const ProductButtonSettings = [
|
|
|
539
533
|
devices: {
|
|
540
534
|
desktop: {
|
|
541
535
|
default: {
|
|
542
|
-
hover: '
|
|
536
|
+
hover: 'text-3'
|
|
543
537
|
}
|
|
544
538
|
}
|
|
545
539
|
},
|
|
546
540
|
compoDefaultValue: {
|
|
547
541
|
desktop: {
|
|
548
542
|
default: {
|
|
549
|
-
hover: '
|
|
543
|
+
hover: 'text-3'
|
|
550
544
|
}
|
|
551
545
|
}
|
|
552
546
|
}
|
|
@@ -578,14 +572,14 @@ const ProductButtonSettings = [
|
|
|
578
572
|
devices: {
|
|
579
573
|
desktop: {
|
|
580
574
|
default: {
|
|
581
|
-
normal: '
|
|
575
|
+
normal: 'text-3'
|
|
582
576
|
}
|
|
583
577
|
}
|
|
584
578
|
},
|
|
585
579
|
compoDefaultValue: {
|
|
586
580
|
desktop: {
|
|
587
581
|
default: {
|
|
588
|
-
normal: '
|
|
582
|
+
normal: 'text-3'
|
|
589
583
|
}
|
|
590
584
|
}
|
|
591
585
|
}
|
|
@@ -720,19 +714,22 @@ const ProductButtonSettings = [
|
|
|
720
714
|
label: 'Left',
|
|
721
715
|
value: 'left',
|
|
722
716
|
type: 'align',
|
|
723
|
-
tooltip: 'Align left'
|
|
717
|
+
tooltip: 'Align left',
|
|
718
|
+
iconName: 'gp-align-left'
|
|
724
719
|
},
|
|
725
720
|
{
|
|
726
721
|
label: 'Center',
|
|
727
722
|
value: 'center',
|
|
728
723
|
type: 'align',
|
|
729
|
-
tooltip: 'Align center'
|
|
724
|
+
tooltip: 'Align center',
|
|
725
|
+
iconName: 'gp-align-center'
|
|
730
726
|
},
|
|
731
727
|
{
|
|
732
728
|
label: 'Right',
|
|
733
729
|
value: 'right',
|
|
734
730
|
type: 'align',
|
|
735
|
-
tooltip: 'Align right'
|
|
731
|
+
tooltip: 'Align right',
|
|
732
|
+
iconName: 'gp-align-right'
|
|
736
733
|
}
|
|
737
734
|
],
|
|
738
735
|
devices: {
|
|
@@ -764,12 +761,12 @@ const ProductButtonSettings = [
|
|
|
764
761
|
{
|
|
765
762
|
id: 'enablePrice',
|
|
766
763
|
type: 'toggle',
|
|
767
|
-
default:
|
|
764
|
+
default: false
|
|
768
765
|
},
|
|
769
766
|
{
|
|
770
767
|
id: 'enableSeparator',
|
|
771
768
|
type: 'toggle',
|
|
772
|
-
default:
|
|
769
|
+
default: false
|
|
773
770
|
},
|
|
774
771
|
{
|
|
775
772
|
id: 'enableTextStyle',
|
|
@@ -23,18 +23,6 @@ const SettingUIV2 = [
|
|
|
23
23
|
newValue: true
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
{
|
|
27
|
-
condition: 'buttonLayout === "cart-full"',
|
|
28
|
-
source: [
|
|
29
|
-
'buttonLayout'
|
|
30
|
-
],
|
|
31
|
-
action: {
|
|
32
|
-
controlId: 'enableTextStyle',
|
|
33
|
-
groupType: 'style',
|
|
34
|
-
controlType: 'style',
|
|
35
|
-
newValue: true
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
26
|
{
|
|
39
27
|
condition: 'buttonLayout === "cart-full"',
|
|
40
28
|
source: [
|
|
@@ -83,18 +71,6 @@ const SettingUIV2 = [
|
|
|
83
71
|
newValue: true
|
|
84
72
|
}
|
|
85
73
|
},
|
|
86
|
-
{
|
|
87
|
-
condition: 'buttonLayout === "cart-price"',
|
|
88
|
-
source: [
|
|
89
|
-
'buttonLayout'
|
|
90
|
-
],
|
|
91
|
-
action: {
|
|
92
|
-
controlId: 'enableTextStyle',
|
|
93
|
-
groupType: 'style',
|
|
94
|
-
controlType: 'style',
|
|
95
|
-
newValue: true
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
74
|
{
|
|
99
75
|
condition: 'buttonLayout === "cart-price"',
|
|
100
76
|
source: [
|
|
@@ -143,18 +119,6 @@ const SettingUIV2 = [
|
|
|
143
119
|
newValue: false
|
|
144
120
|
}
|
|
145
121
|
},
|
|
146
|
-
{
|
|
147
|
-
condition: 'buttonLayout === "cart-only"',
|
|
148
|
-
source: [
|
|
149
|
-
'buttonLayout'
|
|
150
|
-
],
|
|
151
|
-
action: {
|
|
152
|
-
controlId: 'enableTextStyle',
|
|
153
|
-
groupType: 'style',
|
|
154
|
-
controlType: 'style',
|
|
155
|
-
newValue: true
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
122
|
{
|
|
159
123
|
condition: 'buttonLayout === "cart-only"',
|
|
160
124
|
source: [
|
|
@@ -203,18 +167,6 @@ const SettingUIV2 = [
|
|
|
203
167
|
newValue: false
|
|
204
168
|
}
|
|
205
169
|
},
|
|
206
|
-
{
|
|
207
|
-
condition: 'buttonLayout === "cart-price-icon"',
|
|
208
|
-
source: [
|
|
209
|
-
'buttonLayout'
|
|
210
|
-
],
|
|
211
|
-
action: {
|
|
212
|
-
controlId: 'enableTextStyle',
|
|
213
|
-
groupType: 'style',
|
|
214
|
-
controlType: 'style',
|
|
215
|
-
newValue: true
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
170
|
{
|
|
219
171
|
condition: 'buttonLayout === "cart-price-icon"',
|
|
220
172
|
source: [
|
|
@@ -263,18 +215,6 @@ const SettingUIV2 = [
|
|
|
263
215
|
newValue: false
|
|
264
216
|
}
|
|
265
217
|
},
|
|
266
|
-
{
|
|
267
|
-
condition: 'buttonLayout === "cart-icon"',
|
|
268
|
-
source: [
|
|
269
|
-
'buttonLayout'
|
|
270
|
-
],
|
|
271
|
-
action: {
|
|
272
|
-
controlId: 'enableTextStyle',
|
|
273
|
-
groupType: 'style',
|
|
274
|
-
controlType: 'style',
|
|
275
|
-
newValue: true
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
218
|
{
|
|
279
219
|
condition: 'buttonLayout === "cart-icon"',
|
|
280
220
|
source: [
|
|
@@ -322,66 +262,6 @@ const SettingUIV2 = [
|
|
|
322
262
|
controlType: 'setting',
|
|
323
263
|
newValue: false
|
|
324
264
|
}
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
condition: 'buttonLayout === "icon-only"',
|
|
328
|
-
source: [
|
|
329
|
-
'buttonLayout'
|
|
330
|
-
],
|
|
331
|
-
action: {
|
|
332
|
-
controlId: 'enableTextStyle',
|
|
333
|
-
groupType: 'style',
|
|
334
|
-
controlType: 'style',
|
|
335
|
-
newValue: false
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
condition: 'buttonLayout === "icon-only"',
|
|
340
|
-
source: [
|
|
341
|
-
'buttonLayout'
|
|
342
|
-
],
|
|
343
|
-
action: {
|
|
344
|
-
controlId: 'enableIcon',
|
|
345
|
-
groupType: 'style',
|
|
346
|
-
controlType: 'style',
|
|
347
|
-
newValue: true
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
condition: 'buttonLayout === "icon-only"',
|
|
352
|
-
source: [
|
|
353
|
-
'buttonLayout'
|
|
354
|
-
],
|
|
355
|
-
action: {
|
|
356
|
-
controlId: 'enableSeparator',
|
|
357
|
-
groupType: 'style',
|
|
358
|
-
controlType: 'style',
|
|
359
|
-
newValue: false
|
|
360
|
-
}
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
condition: 'buttonLayout === "icon-only"',
|
|
364
|
-
source: [
|
|
365
|
-
'buttonLayout'
|
|
366
|
-
],
|
|
367
|
-
action: {
|
|
368
|
-
controlId: 'enablePrice',
|
|
369
|
-
groupType: 'style',
|
|
370
|
-
controlType: 'style',
|
|
371
|
-
newValue: false
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
condition: 'buttonLayout === "icon-only"',
|
|
376
|
-
source: [
|
|
377
|
-
'buttonLayout'
|
|
378
|
-
],
|
|
379
|
-
action: {
|
|
380
|
-
controlId: 'shouldClearSpace',
|
|
381
|
-
groupType: 'setting',
|
|
382
|
-
controlType: 'setting',
|
|
383
|
-
newValue: true
|
|
384
|
-
}
|
|
385
265
|
}
|
|
386
266
|
],
|
|
387
267
|
options: {
|
|
@@ -612,7 +492,7 @@ const SettingUIV2 = [
|
|
|
612
492
|
setting: {
|
|
613
493
|
id: 'iconAlign'
|
|
614
494
|
},
|
|
615
|
-
conditionDisplay: 'enableIcon === true
|
|
495
|
+
conditionDisplay: 'enableIcon === true'
|
|
616
496
|
},
|
|
617
497
|
{
|
|
618
498
|
type: 'control',
|
|
@@ -622,36 +502,39 @@ const SettingUIV2 = [
|
|
|
622
502
|
setting: {
|
|
623
503
|
id: 'iconSpacing'
|
|
624
504
|
},
|
|
625
|
-
conditionDisplay: 'enableIcon === true
|
|
505
|
+
conditionDisplay: 'enableIcon === true'
|
|
626
506
|
}
|
|
627
507
|
]
|
|
628
508
|
},
|
|
629
509
|
{
|
|
510
|
+
label: {
|
|
511
|
+
en: 'Text'
|
|
512
|
+
},
|
|
630
513
|
controls: [
|
|
631
514
|
{
|
|
515
|
+
type: 'combo',
|
|
632
516
|
label: {
|
|
633
|
-
en: '
|
|
634
|
-
},
|
|
635
|
-
setting: {
|
|
636
|
-
id: 'enableTextStyle'
|
|
517
|
+
en: 'Content'
|
|
637
518
|
},
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
519
|
+
iconName: 'polaris-text-block',
|
|
520
|
+
fixedValue: 'Add to cart',
|
|
521
|
+
getValueFromSettingID: 'label',
|
|
522
|
+
isHideClear: true,
|
|
523
|
+
controls: [
|
|
524
|
+
{
|
|
525
|
+
label: {
|
|
526
|
+
en: 'Content'
|
|
527
|
+
},
|
|
528
|
+
setting: {
|
|
529
|
+
id: 'label'
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
]
|
|
642
533
|
},
|
|
643
534
|
{
|
|
644
|
-
label: {
|
|
645
|
-
en: 'Text'
|
|
646
|
-
},
|
|
647
535
|
setting: {
|
|
648
536
|
id: 'typo'
|
|
649
537
|
},
|
|
650
|
-
conditionDisplay: 'enableTextStyle === true',
|
|
651
|
-
options: {
|
|
652
|
-
hideLabel: true,
|
|
653
|
-
fullWidth: true
|
|
654
|
-
},
|
|
655
538
|
layout: 'vertical'
|
|
656
539
|
}
|
|
657
540
|
]
|
|
@@ -697,12 +580,15 @@ const SettingUIV2 = [
|
|
|
697
580
|
},
|
|
698
581
|
{
|
|
699
582
|
label: {
|
|
700
|
-
en: '
|
|
583
|
+
en: 'Product price'
|
|
701
584
|
},
|
|
702
585
|
conditionDisplay: 'enablePrice === true',
|
|
703
586
|
type: 'combo',
|
|
704
587
|
fixedValue: 'Edit',
|
|
705
588
|
iconName: 'polaris-text-title',
|
|
589
|
+
popoverLabel: {
|
|
590
|
+
en: 'Price text style'
|
|
591
|
+
},
|
|
706
592
|
isHideClear: true,
|
|
707
593
|
controls: [
|
|
708
594
|
{
|
|
@@ -715,12 +601,15 @@ const SettingUIV2 = [
|
|
|
715
601
|
},
|
|
716
602
|
{
|
|
717
603
|
label: {
|
|
718
|
-
en: '
|
|
604
|
+
en: 'Compare-at'
|
|
719
605
|
},
|
|
720
606
|
conditionDisplay: 'enablePrice === true',
|
|
721
607
|
type: 'combo',
|
|
722
608
|
fixedValue: 'Edit',
|
|
723
609
|
iconName: 'polaris-text-title',
|
|
610
|
+
popoverLabel: {
|
|
611
|
+
en: 'Price text style'
|
|
612
|
+
},
|
|
724
613
|
isHideClear: true,
|
|
725
614
|
controls: [
|
|
726
615
|
{
|
|
@@ -959,8 +848,11 @@ const SettingUIV2 = [
|
|
|
959
848
|
conditionDisplay: "enableMessage === true && actionEffect === 'continue-shopping'",
|
|
960
849
|
type: 'combo',
|
|
961
850
|
getValueFromSettingID: 'successMessage',
|
|
962
|
-
iconName: 'polaris-
|
|
851
|
+
iconName: 'polaris-check-circle',
|
|
963
852
|
isHideClear: true,
|
|
853
|
+
popoverLabel: {
|
|
854
|
+
en: 'Success message'
|
|
855
|
+
},
|
|
964
856
|
controls: [
|
|
965
857
|
{
|
|
966
858
|
label: {
|
|
@@ -985,10 +877,39 @@ const SettingUIV2 = [
|
|
|
985
877
|
conditionDisplay: "enableMessage === true && actionEffect === 'continue-shopping'",
|
|
986
878
|
type: 'combo',
|
|
987
879
|
fixedValue: 'Edit',
|
|
988
|
-
iconName: 'polaris-
|
|
880
|
+
iconName: 'polaris-alert-bubble',
|
|
989
881
|
getValueFromSettingID: 'errorMessage',
|
|
990
882
|
isHideClear: true,
|
|
883
|
+
popoverLabel: {
|
|
884
|
+
en: 'Error message'
|
|
885
|
+
},
|
|
991
886
|
controls: [
|
|
887
|
+
{
|
|
888
|
+
label: {
|
|
889
|
+
en: 'Source'
|
|
890
|
+
},
|
|
891
|
+
setting: {
|
|
892
|
+
id: 'errorType'
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
label: {
|
|
897
|
+
en: 'Add failed'
|
|
898
|
+
},
|
|
899
|
+
conditionDisplay: "errorType === 'custom'",
|
|
900
|
+
setting: {
|
|
901
|
+
id: 'errorMessage'
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
label: {
|
|
906
|
+
en: 'Not select variant'
|
|
907
|
+
},
|
|
908
|
+
conditionDisplay: "errorType === 'custom'",
|
|
909
|
+
setting: {
|
|
910
|
+
id: 'variantSelectionRequiredMessage'
|
|
911
|
+
}
|
|
912
|
+
},
|
|
992
913
|
{
|
|
993
914
|
label: {
|
|
994
915
|
en: 'Content'
|
|
@@ -358,7 +358,7 @@ const ProductListPreset = [
|
|
|
358
358
|
},
|
|
359
359
|
settings: {
|
|
360
360
|
actionEffect: 'open-cart-drawer',
|
|
361
|
-
label: 'Add
|
|
361
|
+
label: 'Add to cart',
|
|
362
362
|
outOfStockLabel: 'Out Of Stock',
|
|
363
363
|
successMessage: 'Add product to cart successfully',
|
|
364
364
|
errorMessage: 'Cannot add product to cart',
|
|
@@ -371,7 +371,10 @@ const ProductListPreset = [
|
|
|
371
371
|
desktop: {
|
|
372
372
|
width: '100%'
|
|
373
373
|
}
|
|
374
|
-
}
|
|
374
|
+
},
|
|
375
|
+
enableIcon: true,
|
|
376
|
+
enablePrice: false,
|
|
377
|
+
enableSeparator: false
|
|
375
378
|
}
|
|
376
379
|
}
|
|
377
380
|
]
|
|
@@ -749,7 +752,7 @@ const ProductListPreset = [
|
|
|
749
752
|
},
|
|
750
753
|
settings: {
|
|
751
754
|
actionEffect: 'open-cart-drawer',
|
|
752
|
-
label: 'Add
|
|
755
|
+
label: 'Add to cart',
|
|
753
756
|
outOfStockLabel: 'Out Of Stock',
|
|
754
757
|
successMessage: 'Add product to cart successfully',
|
|
755
758
|
errorMessage: 'Cannot add product to cart',
|
|
@@ -762,7 +765,10 @@ const ProductListPreset = [
|
|
|
762
765
|
desktop: {
|
|
763
766
|
width: '100%'
|
|
764
767
|
}
|
|
765
|
-
}
|
|
768
|
+
},
|
|
769
|
+
enableIcon: true,
|
|
770
|
+
enablePrice: false,
|
|
771
|
+
enableSeparator: false
|
|
766
772
|
}
|
|
767
773
|
}
|
|
768
774
|
]
|