@gem-sdk/components 2.0.0-dev.337 → 2.0.0-dev.339
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/post-purchase/link/setting/configs/uiV2.js +1 -1
- package/dist/cjs/product/components/ProductButton/components/PriceComponent.js +3 -1
- package/dist/cjs/product/components/ProductButton/components/PriceComponent.liquid.js +3 -1
- package/dist/cjs/product/components/ProductPrice/common/getAttr.js +2 -2
- package/dist/cjs/product/components/ProductPrice/common/getTextData.js +1 -1
- package/dist/cjs/product/components/ProductPrice/hooks/useGpPrice.js +2 -2
- package/dist/cjs/product/components/ProductPrice/index.liquid.js +2 -2
- package/dist/cjs/product/components/ProductQuickView/ProductQuickView.js +7 -3
- package/dist/cjs/product/setting/constant/bundle-layout/horizontalOne.js +2 -2
- package/dist/cjs/product/setting/constant/bundle-layout/horizontalTwo.js +2 -2
- package/dist/cjs/product/setting/constant/bundle-layout/verticalOne.js +2 -2
- package/dist/cjs/product/setting/product/configs/product-presets/product-1-col.js +12 -6
- package/dist/cjs/product/setting/product/configs/product-presets/product-2-col.js +12 -6
- package/dist/cjs/product/setting/product/configs/product-presets/product-default.js +12 -6
- package/dist/cjs/product/setting/product-badge/configs/settings.js +13 -21
- package/dist/cjs/product/setting/product-badge/configs/uiV2.js +12 -2
- package/dist/cjs/product/setting/product-list/configs/presets.js +12 -3
- package/dist/cjs/product/setting/product-price/configs/presets.js +3 -1
- package/dist/cjs/product/setting/product-price/configs/settings.js +28 -13
- package/dist/cjs/sticky/setting/preset-config.js +6 -2
- package/dist/esm/post-purchase/link/setting/configs/uiV2.js +1 -1
- package/dist/esm/product/components/ProductButton/components/PriceComponent.js +3 -1
- package/dist/esm/product/components/ProductButton/components/PriceComponent.liquid.js +3 -1
- package/dist/esm/product/components/ProductPrice/common/getAttr.js +2 -2
- package/dist/esm/product/components/ProductPrice/common/getTextData.js +1 -1
- package/dist/esm/product/components/ProductPrice/hooks/useGpPrice.js +2 -2
- package/dist/esm/product/components/ProductPrice/index.liquid.js +2 -2
- package/dist/esm/product/components/ProductQuickView/ProductQuickView.js +7 -3
- package/dist/esm/product/setting/constant/bundle-layout/horizontalOne.js +2 -2
- package/dist/esm/product/setting/constant/bundle-layout/horizontalTwo.js +2 -2
- package/dist/esm/product/setting/constant/bundle-layout/verticalOne.js +2 -2
- package/dist/esm/product/setting/product/configs/product-presets/product-1-col.js +12 -6
- package/dist/esm/product/setting/product/configs/product-presets/product-2-col.js +12 -6
- package/dist/esm/product/setting/product/configs/product-presets/product-default.js +12 -6
- package/dist/esm/product/setting/product-badge/configs/settings.js +13 -21
- package/dist/esm/product/setting/product-badge/configs/uiV2.js +12 -2
- package/dist/esm/product/setting/product-list/configs/presets.js +12 -3
- package/dist/esm/product/setting/product-price/configs/presets.js +3 -1
- package/dist/esm/product/setting/product-price/configs/settings.js +28 -13
- package/dist/esm/sticky/setting/preset-config.js +6 -2
- package/dist/types/index.d.ts +1 -2
- package/package.json +1 -1
|
@@ -11,9 +11,11 @@ const PriceComponent = ({ priceType, settings })=>{
|
|
|
11
11
|
const { lineThrough, typo } = settings;
|
|
12
12
|
const productPriceClasses = system.createClass(classes.getProductPriceClasses());
|
|
13
13
|
return /*#__PURE__*/ jsxRuntime.jsx(index.default, {
|
|
14
|
+
setting: {
|
|
15
|
+
priceType
|
|
16
|
+
},
|
|
14
17
|
styles: {
|
|
15
18
|
typo,
|
|
16
|
-
priceType,
|
|
17
19
|
lineThrough
|
|
18
20
|
},
|
|
19
21
|
classNames: productPriceClasses
|
|
@@ -10,9 +10,11 @@ const PriceComponent = ({ priceType, settings })=>{
|
|
|
10
10
|
const { lineThrough, typo } = settings;
|
|
11
11
|
const productPriceClasses = system.createClass(classes.getProductPriceClasses());
|
|
12
12
|
return index_liquid.ProductPrice({
|
|
13
|
+
setting: {
|
|
14
|
+
priceType
|
|
15
|
+
},
|
|
13
16
|
styles: {
|
|
14
17
|
typo,
|
|
15
|
-
priceType,
|
|
16
18
|
lineThrough
|
|
17
19
|
},
|
|
18
20
|
classNames: productPriceClasses
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var helpers = require('../../../../helpers.js');
|
|
4
4
|
|
|
5
5
|
const getAttrs = (props, productId)=>{
|
|
6
|
-
const { builderAttrs,
|
|
7
|
-
const isComparePrice =
|
|
6
|
+
const { builderAttrs, setting, builderProps } = props;
|
|
7
|
+
const isComparePrice = setting?.priceType === 'compare' || false;
|
|
8
8
|
const getDataHidden = ()=>{
|
|
9
9
|
if (isComparePrice) {
|
|
10
10
|
return `{% if variant.compare_at_price > variant.price and variant.compare_at_price >= 0 %}false{% else %}true{% endif %}`;
|
|
@@ -4,7 +4,7 @@ var core = require('@gem-sdk/core');
|
|
|
4
4
|
|
|
5
5
|
const getTextProps = (props, text)=>{
|
|
6
6
|
const { setting, styles, builderProps, classNames } = props;
|
|
7
|
-
const isComparePrice =
|
|
7
|
+
const isComparePrice = setting?.priceType === 'compare' || false;
|
|
8
8
|
const colorClass = core.getGlobalColorClass('decoration', styles?.lineColor);
|
|
9
9
|
const priceCompare = ()=>{
|
|
10
10
|
return `
|
|
@@ -5,7 +5,7 @@ var common = require('../../ProductVariants/common/common.js');
|
|
|
5
5
|
var core = require('@gem-sdk/core');
|
|
6
6
|
|
|
7
7
|
const useGpPrice = (props)=>{
|
|
8
|
-
const {
|
|
8
|
+
const { setting, builderProps } = props;
|
|
9
9
|
const elementRef = React.useRef(null);
|
|
10
10
|
const mode = core.useEditorMode();
|
|
11
11
|
const { quantity, hasUpdatePrice } = core.useQuantity();
|
|
@@ -14,7 +14,7 @@ const useGpPrice = (props)=>{
|
|
|
14
14
|
const bundleItem = props['bundle-item'];
|
|
15
15
|
const price = currentVariant?.price ?? 0;
|
|
16
16
|
const salePrice = currentVariant?.salePrice ?? 0;
|
|
17
|
-
const isComparePrice =
|
|
17
|
+
const isComparePrice = setting?.priceType === 'compare' || false;
|
|
18
18
|
const { trigger } = core.useInteraction();
|
|
19
19
|
const currentProduct = core.useProduct();
|
|
20
20
|
const currentProductId = currentProduct?.baseID?.replace('gid://shopify/Product/', '');
|
|
@@ -11,12 +11,12 @@ var getAttr = require('./common/getAttr.js');
|
|
|
11
11
|
var getTextData = require('./common/getTextData.js');
|
|
12
12
|
|
|
13
13
|
const ProductPrice = (props)=>{
|
|
14
|
-
const { style, setting,
|
|
14
|
+
const { style, setting, builderProps } = props;
|
|
15
15
|
const wrapperClasses = system.createClass(getClasses.getWrapperClasses(props));
|
|
16
16
|
const wrapperAttrs = system.createAttr(getAttr.getAttrs(props));
|
|
17
17
|
const textProps = getTextData.getTextProps(props);
|
|
18
18
|
const stateData = system.createStateOrContext({
|
|
19
|
-
priceType:
|
|
19
|
+
priceType: setting?.priceType,
|
|
20
20
|
uid: builderProps?.uid,
|
|
21
21
|
locale: `{{shop.locale}}`,
|
|
22
22
|
currency: `{{shop.currency}}`,
|
|
@@ -97,8 +97,10 @@ const ModalContent = ()=>{
|
|
|
97
97
|
children: [
|
|
98
98
|
/*#__PURE__*/ jsxRuntime.jsx(Col.default, {
|
|
99
99
|
children: /*#__PURE__*/ jsxRuntime.jsx(index$1.default, {
|
|
100
|
+
setting: {
|
|
101
|
+
priceType: 'regular'
|
|
102
|
+
},
|
|
100
103
|
styles: {
|
|
101
|
-
priceType: 'regular',
|
|
102
104
|
typography: {
|
|
103
105
|
type: 'subheading-2'
|
|
104
106
|
}
|
|
@@ -107,11 +109,13 @@ const ModalContent = ()=>{
|
|
|
107
109
|
}),
|
|
108
110
|
/*#__PURE__*/ jsxRuntime.jsx(Col.default, {
|
|
109
111
|
children: /*#__PURE__*/ jsxRuntime.jsx(index$1.default, {
|
|
112
|
+
setting: {
|
|
113
|
+
priceType: 'compare'
|
|
114
|
+
},
|
|
110
115
|
styles: {
|
|
111
116
|
typography: {
|
|
112
117
|
type: 'paragraph-2'
|
|
113
|
-
}
|
|
114
|
-
priceType: 'compare'
|
|
118
|
+
}
|
|
115
119
|
}
|
|
116
120
|
})
|
|
117
121
|
})
|
|
@@ -280,6 +280,7 @@ const horizontalOne = [
|
|
|
280
280
|
childrens: [],
|
|
281
281
|
label: 'Product Price',
|
|
282
282
|
settings: {
|
|
283
|
+
priceType: 'compare',
|
|
283
284
|
hasOnlyDefaultVariant: false
|
|
284
285
|
},
|
|
285
286
|
styles: {
|
|
@@ -291,7 +292,6 @@ const horizontalOne = [
|
|
|
291
292
|
},
|
|
292
293
|
lineColor: 'text-1',
|
|
293
294
|
lineThrough: true,
|
|
294
|
-
priceType: 'compare',
|
|
295
295
|
textAlign: {
|
|
296
296
|
desktop: 'right'
|
|
297
297
|
},
|
|
@@ -321,6 +321,7 @@ const horizontalOne = [
|
|
|
321
321
|
childrens: [],
|
|
322
322
|
label: 'Product Price',
|
|
323
323
|
settings: {
|
|
324
|
+
priceType: 'regular',
|
|
324
325
|
hasOnlyDefaultVariant: false
|
|
325
326
|
},
|
|
326
327
|
styles: {
|
|
@@ -332,7 +333,6 @@ const horizontalOne = [
|
|
|
332
333
|
},
|
|
333
334
|
lineColor: 'text-1',
|
|
334
335
|
lineThrough: true,
|
|
335
|
-
priceType: 'regular',
|
|
336
336
|
textAlign: {
|
|
337
337
|
desktop: 'right'
|
|
338
338
|
},
|
|
@@ -422,6 +422,7 @@ const horizontalTwo = [
|
|
|
422
422
|
childrens: [],
|
|
423
423
|
label: 'Product Price',
|
|
424
424
|
settings: {
|
|
425
|
+
priceType: 'compare',
|
|
425
426
|
hasOnlyDefaultVariant: false
|
|
426
427
|
},
|
|
427
428
|
styles: {
|
|
@@ -433,7 +434,6 @@ const horizontalTwo = [
|
|
|
433
434
|
},
|
|
434
435
|
lineColor: 'text-1',
|
|
435
436
|
lineThrough: true,
|
|
436
|
-
priceType: 'compare',
|
|
437
437
|
textAlign: {
|
|
438
438
|
desktop: 'right'
|
|
439
439
|
},
|
|
@@ -463,6 +463,7 @@ const horizontalTwo = [
|
|
|
463
463
|
childrens: [],
|
|
464
464
|
label: 'Product Price',
|
|
465
465
|
settings: {
|
|
466
|
+
priceType: 'regular',
|
|
466
467
|
hasOnlyDefaultVariant: false
|
|
467
468
|
},
|
|
468
469
|
styles: {
|
|
@@ -474,7 +475,6 @@ const horizontalTwo = [
|
|
|
474
475
|
},
|
|
475
476
|
lineColor: 'text-1',
|
|
476
477
|
lineThrough: true,
|
|
477
|
-
priceType: 'regular',
|
|
478
478
|
textAlign: {
|
|
479
479
|
desktop: 'right'
|
|
480
480
|
},
|
|
@@ -140,6 +140,7 @@ const verticalOne = [
|
|
|
140
140
|
{
|
|
141
141
|
label: 'Product Price',
|
|
142
142
|
settings: {
|
|
143
|
+
priceType: 'compare',
|
|
143
144
|
hasOnlyDefaultVariant: false
|
|
144
145
|
},
|
|
145
146
|
styles: {
|
|
@@ -151,7 +152,6 @@ const verticalOne = [
|
|
|
151
152
|
},
|
|
152
153
|
lineColor: 'text-1',
|
|
153
154
|
lineThrough: true,
|
|
154
|
-
priceType: 'compare',
|
|
155
155
|
textAlign: {
|
|
156
156
|
desktop: 'right'
|
|
157
157
|
},
|
|
@@ -182,6 +182,7 @@ const verticalOne = [
|
|
|
182
182
|
{
|
|
183
183
|
label: 'Product Price',
|
|
184
184
|
settings: {
|
|
185
|
+
priceType: 'regular',
|
|
185
186
|
hasOnlyDefaultVariant: false
|
|
186
187
|
},
|
|
187
188
|
styles: {
|
|
@@ -193,7 +194,6 @@ const verticalOne = [
|
|
|
193
194
|
},
|
|
194
195
|
lineColor: 'text-1',
|
|
195
196
|
lineThrough: true,
|
|
196
|
-
priceType: 'regular',
|
|
197
197
|
textAlign: {
|
|
198
198
|
desktop: 'right'
|
|
199
199
|
},
|
|
@@ -122,9 +122,10 @@ const product1Col = {
|
|
|
122
122
|
childrens: [
|
|
123
123
|
{
|
|
124
124
|
tag: 'ProductPrice',
|
|
125
|
-
|
|
125
|
+
settings: {
|
|
126
126
|
priceType: 'regular'
|
|
127
|
-
}
|
|
127
|
+
},
|
|
128
|
+
styles: {}
|
|
128
129
|
}
|
|
129
130
|
]
|
|
130
131
|
},
|
|
@@ -133,8 +134,10 @@ const product1Col = {
|
|
|
133
134
|
childrens: [
|
|
134
135
|
{
|
|
135
136
|
tag: 'ProductPrice',
|
|
137
|
+
settings: {
|
|
138
|
+
priceType: 'compare'
|
|
139
|
+
},
|
|
136
140
|
styles: {
|
|
137
|
-
priceType: 'compare',
|
|
138
141
|
color: {
|
|
139
142
|
normal: 'text-1'
|
|
140
143
|
}
|
|
@@ -367,9 +370,10 @@ const product1ColProductPage = {
|
|
|
367
370
|
childrens: [
|
|
368
371
|
{
|
|
369
372
|
tag: 'ProductPrice',
|
|
370
|
-
|
|
373
|
+
settings: {
|
|
371
374
|
priceType: 'regular'
|
|
372
|
-
}
|
|
375
|
+
},
|
|
376
|
+
styles: {}
|
|
373
377
|
}
|
|
374
378
|
]
|
|
375
379
|
},
|
|
@@ -378,8 +382,10 @@ const product1ColProductPage = {
|
|
|
378
382
|
childrens: [
|
|
379
383
|
{
|
|
380
384
|
tag: 'ProductPrice',
|
|
385
|
+
settings: {
|
|
386
|
+
priceType: 'compare'
|
|
387
|
+
},
|
|
381
388
|
styles: {
|
|
382
|
-
priceType: 'compare',
|
|
383
389
|
color: {
|
|
384
390
|
normal: 'text-1'
|
|
385
391
|
}
|
|
@@ -123,9 +123,10 @@ const product2Col = {
|
|
|
123
123
|
childrens: [
|
|
124
124
|
{
|
|
125
125
|
tag: 'ProductPrice',
|
|
126
|
-
|
|
126
|
+
settings: {
|
|
127
127
|
priceType: 'regular'
|
|
128
|
-
}
|
|
128
|
+
},
|
|
129
|
+
styles: {}
|
|
129
130
|
}
|
|
130
131
|
]
|
|
131
132
|
},
|
|
@@ -134,8 +135,10 @@ const product2Col = {
|
|
|
134
135
|
childrens: [
|
|
135
136
|
{
|
|
136
137
|
tag: 'ProductPrice',
|
|
138
|
+
settings: {
|
|
139
|
+
priceType: 'compare'
|
|
140
|
+
},
|
|
137
141
|
styles: {
|
|
138
|
-
priceType: 'compare',
|
|
139
142
|
color: {
|
|
140
143
|
normal: 'text-1'
|
|
141
144
|
}
|
|
@@ -373,9 +376,10 @@ const product2ColProductPage = {
|
|
|
373
376
|
childrens: [
|
|
374
377
|
{
|
|
375
378
|
tag: 'ProductPrice',
|
|
376
|
-
|
|
379
|
+
settings: {
|
|
377
380
|
priceType: 'regular'
|
|
378
|
-
}
|
|
381
|
+
},
|
|
382
|
+
styles: {}
|
|
379
383
|
}
|
|
380
384
|
]
|
|
381
385
|
},
|
|
@@ -384,8 +388,10 @@ const product2ColProductPage = {
|
|
|
384
388
|
childrens: [
|
|
385
389
|
{
|
|
386
390
|
tag: 'ProductPrice',
|
|
391
|
+
settings: {
|
|
392
|
+
priceType: 'compare'
|
|
393
|
+
},
|
|
387
394
|
styles: {
|
|
388
|
-
priceType: 'compare',
|
|
389
395
|
color: {
|
|
390
396
|
normal: 'text-1'
|
|
391
397
|
}
|
|
@@ -124,9 +124,10 @@ const productDefault = {
|
|
|
124
124
|
childrens: [
|
|
125
125
|
{
|
|
126
126
|
tag: 'ProductPrice',
|
|
127
|
-
|
|
127
|
+
settings: {
|
|
128
128
|
priceType: 'regular'
|
|
129
|
-
}
|
|
129
|
+
},
|
|
130
|
+
styles: {}
|
|
130
131
|
}
|
|
131
132
|
]
|
|
132
133
|
},
|
|
@@ -135,8 +136,10 @@ const productDefault = {
|
|
|
135
136
|
childrens: [
|
|
136
137
|
{
|
|
137
138
|
tag: 'ProductPrice',
|
|
139
|
+
settings: {
|
|
140
|
+
priceType: 'compare'
|
|
141
|
+
},
|
|
138
142
|
styles: {
|
|
139
|
-
priceType: 'compare',
|
|
140
143
|
color: {
|
|
141
144
|
normal: 'text-1'
|
|
142
145
|
}
|
|
@@ -380,9 +383,10 @@ const productDynamicProductPage = {
|
|
|
380
383
|
childrens: [
|
|
381
384
|
{
|
|
382
385
|
tag: 'ProductPrice',
|
|
383
|
-
|
|
386
|
+
settings: {
|
|
384
387
|
priceType: 'regular'
|
|
385
|
-
}
|
|
388
|
+
},
|
|
389
|
+
styles: {}
|
|
386
390
|
}
|
|
387
391
|
]
|
|
388
392
|
},
|
|
@@ -391,8 +395,10 @@ const productDynamicProductPage = {
|
|
|
391
395
|
childrens: [
|
|
392
396
|
{
|
|
393
397
|
tag: 'ProductPrice',
|
|
398
|
+
settings: {
|
|
399
|
+
priceType: 'compare'
|
|
400
|
+
},
|
|
394
401
|
styles: {
|
|
395
|
-
priceType: 'compare',
|
|
396
402
|
color: {
|
|
397
403
|
normal: 'text-1'
|
|
398
404
|
}
|
|
@@ -420,11 +420,17 @@ const ProductBadgeSettings = [
|
|
|
420
420
|
{
|
|
421
421
|
id: 'textSizeV2',
|
|
422
422
|
type: 'size-setting',
|
|
423
|
+
hiddenShowMore: true,
|
|
424
|
+
disableShapeLinkedTooltip: 'Use other badge shape to resize without proportions',
|
|
423
425
|
devices: {
|
|
424
426
|
desktop: {
|
|
425
427
|
default: {
|
|
426
428
|
width: 'auto',
|
|
427
429
|
height: 'auto',
|
|
430
|
+
shapeLinked: false,
|
|
431
|
+
disableShapeLinked: true,
|
|
432
|
+
hiddenShape: true,
|
|
433
|
+
shape: 'custom',
|
|
428
434
|
padding: {
|
|
429
435
|
top: '8px',
|
|
430
436
|
bottom: '8px',
|
|
@@ -437,35 +443,21 @@ const ProductBadgeSettings = [
|
|
|
437
443
|
settingConfig: {
|
|
438
444
|
width: {
|
|
439
445
|
displayOptions: [
|
|
440
|
-
'full',
|
|
441
446
|
'auto',
|
|
442
|
-
'
|
|
443
|
-
|
|
444
|
-
'medium'
|
|
445
|
-
],
|
|
446
|
-
sizeConfig: {
|
|
447
|
-
small: '100px',
|
|
448
|
-
medium: '116px',
|
|
449
|
-
large: '132px'
|
|
450
|
-
}
|
|
447
|
+
'default'
|
|
448
|
+
]
|
|
451
449
|
},
|
|
452
450
|
height: {
|
|
453
451
|
displayOptions: [
|
|
454
452
|
'auto',
|
|
455
|
-
'
|
|
456
|
-
|
|
457
|
-
'medium'
|
|
458
|
-
],
|
|
459
|
-
sizeConfig: {
|
|
460
|
-
small: '28px',
|
|
461
|
-
medium: '36px',
|
|
462
|
-
large: '44px'
|
|
463
|
-
}
|
|
453
|
+
'default'
|
|
454
|
+
]
|
|
464
455
|
}
|
|
465
456
|
},
|
|
466
457
|
hiddenSettings: [
|
|
467
|
-
'
|
|
468
|
-
'
|
|
458
|
+
'gap',
|
|
459
|
+
'proportion',
|
|
460
|
+
'padding'
|
|
469
461
|
]
|
|
470
462
|
},
|
|
471
463
|
{
|
|
@@ -255,6 +255,14 @@ const SettingUIV2 = [
|
|
|
255
255
|
},
|
|
256
256
|
conditionDisplay: 'contentType == "text"',
|
|
257
257
|
controls: [
|
|
258
|
+
{
|
|
259
|
+
type: 'control',
|
|
260
|
+
setting: {
|
|
261
|
+
id: 'textSizeV2'
|
|
262
|
+
},
|
|
263
|
+
layout: 'vertical',
|
|
264
|
+
conditionDisplay: '["square" ,"ribbon" ,"star","triangle"].includes(shape)'
|
|
265
|
+
},
|
|
258
266
|
{
|
|
259
267
|
id: 'Width',
|
|
260
268
|
label: {
|
|
@@ -287,7 +295,8 @@ const SettingUIV2 = [
|
|
|
287
295
|
}
|
|
288
296
|
]
|
|
289
297
|
},
|
|
290
|
-
layout: 'horizontal'
|
|
298
|
+
layout: 'horizontal',
|
|
299
|
+
conditionDisplay: '!["square" ,"ribbon" ,"star","triangle"].includes(shape)'
|
|
291
300
|
},
|
|
292
301
|
{
|
|
293
302
|
id: 'Height',
|
|
@@ -316,7 +325,8 @@ const SettingUIV2 = [
|
|
|
316
325
|
}
|
|
317
326
|
]
|
|
318
327
|
},
|
|
319
|
-
layout: 'horizontal'
|
|
328
|
+
layout: 'horizontal',
|
|
329
|
+
conditionDisplay: '!["square" ,"ribbon" ,"star","triangle"].includes(shape)'
|
|
320
330
|
},
|
|
321
331
|
{
|
|
322
332
|
label: {
|
|
@@ -255,8 +255,10 @@ const ProductListPreset = [
|
|
|
255
255
|
{
|
|
256
256
|
tag: 'ProductPrice',
|
|
257
257
|
label: 'Product Price',
|
|
258
|
+
settings: {
|
|
259
|
+
priceType: 'regular'
|
|
260
|
+
},
|
|
258
261
|
styles: {
|
|
259
|
-
priceType: 'regular',
|
|
260
262
|
typo: {
|
|
261
263
|
type: 'subheading-2'
|
|
262
264
|
},
|
|
@@ -302,8 +304,10 @@ const ProductListPreset = [
|
|
|
302
304
|
{
|
|
303
305
|
tag: 'ProductPrice',
|
|
304
306
|
label: 'Product Price',
|
|
307
|
+
settings: {
|
|
308
|
+
priceType: 'compare'
|
|
309
|
+
},
|
|
305
310
|
styles: {
|
|
306
|
-
priceType: 'compare',
|
|
307
311
|
typo: {
|
|
308
312
|
type: 'subheading-2'
|
|
309
313
|
},
|
|
@@ -642,6 +646,9 @@ const ProductListPreset = [
|
|
|
642
646
|
{
|
|
643
647
|
tag: 'ProductPrice',
|
|
644
648
|
label: 'Product Price',
|
|
649
|
+
settings: {
|
|
650
|
+
priceType: 'regular'
|
|
651
|
+
},
|
|
645
652
|
styles: {
|
|
646
653
|
priceType: 'regular',
|
|
647
654
|
typo: {
|
|
@@ -689,8 +696,10 @@ const ProductListPreset = [
|
|
|
689
696
|
{
|
|
690
697
|
tag: 'ProductPrice',
|
|
691
698
|
label: 'Product Price',
|
|
699
|
+
settings: {
|
|
700
|
+
priceType: 'compare'
|
|
701
|
+
},
|
|
692
702
|
styles: {
|
|
693
|
-
priceType: 'compare',
|
|
694
703
|
typo: {
|
|
695
704
|
type: 'subheading-2'
|
|
696
705
|
},
|
|
@@ -7,18 +7,7 @@ const ProductPriceSettings = [
|
|
|
7
7
|
{
|
|
8
8
|
id: 'moneyWithCurrentFormat',
|
|
9
9
|
type: 'toggle'
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
id: 'style',
|
|
15
|
-
// info: {
|
|
16
|
-
// previous_link_text: 'You can change the content in',
|
|
17
|
-
// link_text: 'Shopify',
|
|
18
|
-
// next_link_text: '',
|
|
19
|
-
// link_type: 'shopify_admin',
|
|
20
|
-
// },
|
|
21
|
-
controls: [
|
|
10
|
+
},
|
|
22
11
|
{
|
|
23
12
|
id: 'priceType',
|
|
24
13
|
type: 'option:value',
|
|
@@ -33,7 +22,33 @@ const ProductPriceSettings = [
|
|
|
33
22
|
}
|
|
34
23
|
],
|
|
35
24
|
default: 'regular'
|
|
36
|
-
}
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 'style',
|
|
30
|
+
// info: {
|
|
31
|
+
// previous_link_text: 'You can change the content in',
|
|
32
|
+
// link_text: 'Shopify',
|
|
33
|
+
// next_link_text: '',
|
|
34
|
+
// link_type: 'shopify_admin',
|
|
35
|
+
// },
|
|
36
|
+
controls: [
|
|
37
|
+
// {
|
|
38
|
+
// id: 'priceType',
|
|
39
|
+
// type: 'option:value',
|
|
40
|
+
// options: [
|
|
41
|
+
// {
|
|
42
|
+
// label: 'Original',
|
|
43
|
+
// value: 'regular',
|
|
44
|
+
// },
|
|
45
|
+
// {
|
|
46
|
+
// label: 'Compare',
|
|
47
|
+
// value: 'compare',
|
|
48
|
+
// },
|
|
49
|
+
// ],
|
|
50
|
+
// default: 'regular',
|
|
51
|
+
// },
|
|
37
52
|
{
|
|
38
53
|
id: 'lineThrough',
|
|
39
54
|
type: 'combo',
|
|
@@ -319,6 +319,9 @@ const StickyPreset = {
|
|
|
319
319
|
{
|
|
320
320
|
tag: 'ProductPrice',
|
|
321
321
|
label: 'Product Price',
|
|
322
|
+
settings: {
|
|
323
|
+
priceType: 'regular'
|
|
324
|
+
},
|
|
322
325
|
styles: {
|
|
323
326
|
typo: {
|
|
324
327
|
type: 'subheading-2',
|
|
@@ -337,7 +340,6 @@ const StickyPreset = {
|
|
|
337
340
|
fontStyle: 'normal'
|
|
338
341
|
}
|
|
339
342
|
},
|
|
340
|
-
priceType: 'regular',
|
|
341
343
|
lineThrough: true,
|
|
342
344
|
thickness: 1,
|
|
343
345
|
lineColor: 'text-1',
|
|
@@ -1414,6 +1416,9 @@ const StickyPresetProduct = {
|
|
|
1414
1416
|
{
|
|
1415
1417
|
tag: 'ProductPrice',
|
|
1416
1418
|
label: 'Product Price',
|
|
1419
|
+
settings: {
|
|
1420
|
+
priceType: 'regular'
|
|
1421
|
+
},
|
|
1417
1422
|
styles: {
|
|
1418
1423
|
typo: {
|
|
1419
1424
|
type: 'subheading-2',
|
|
@@ -1432,7 +1437,6 @@ const StickyPresetProduct = {
|
|
|
1432
1437
|
fontStyle: 'normal'
|
|
1433
1438
|
}
|
|
1434
1439
|
},
|
|
1435
|
-
priceType: 'regular',
|
|
1436
1440
|
lineThrough: true,
|
|
1437
1441
|
thickness: 1,
|
|
1438
1442
|
lineColor: 'text-1',
|
|
@@ -7,9 +7,11 @@ const PriceComponent = ({ priceType, settings })=>{
|
|
|
7
7
|
const { lineThrough, typo } = settings;
|
|
8
8
|
const productPriceClasses = createClass(getProductPriceClasses());
|
|
9
9
|
return /*#__PURE__*/ jsx(ProductPrice, {
|
|
10
|
+
setting: {
|
|
11
|
+
priceType
|
|
12
|
+
},
|
|
10
13
|
styles: {
|
|
11
14
|
typo,
|
|
12
|
-
priceType,
|
|
13
15
|
lineThrough
|
|
14
16
|
},
|
|
15
17
|
classNames: productPriceClasses
|