@gem-sdk/components 2.0.0-dev.337 → 2.0.0-dev.338
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/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-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/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-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
|
}
|
|
@@ -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
|
|
@@ -6,9 +6,11 @@ const PriceComponent = ({ priceType, settings })=>{
|
|
|
6
6
|
const { lineThrough, typo } = settings;
|
|
7
7
|
const productPriceClasses = createClass(getProductPriceClasses());
|
|
8
8
|
return ProductPrice({
|
|
9
|
+
setting: {
|
|
10
|
+
priceType
|
|
11
|
+
},
|
|
9
12
|
styles: {
|
|
10
13
|
typo,
|
|
11
|
-
priceType,
|
|
12
14
|
lineThrough
|
|
13
15
|
},
|
|
14
16
|
classNames: productPriceClasses
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { filterTruthyObject } from '../../../../helpers.js';
|
|
2
2
|
|
|
3
3
|
const getAttrs = (props, productId)=>{
|
|
4
|
-
const { builderAttrs,
|
|
5
|
-
const isComparePrice =
|
|
4
|
+
const { builderAttrs, setting, builderProps } = props;
|
|
5
|
+
const isComparePrice = setting?.priceType === 'compare' || false;
|
|
6
6
|
const getDataHidden = ()=>{
|
|
7
7
|
if (isComparePrice) {
|
|
8
8
|
return `{% if variant.compare_at_price > variant.price and variant.compare_at_price >= 0 %}false{% else %}true{% endif %}`;
|
|
@@ -2,7 +2,7 @@ import { getGlobalColorClass, cls } from '@gem-sdk/core';
|
|
|
2
2
|
|
|
3
3
|
const getTextProps = (props, text)=>{
|
|
4
4
|
const { setting, styles, builderProps, classNames } = props;
|
|
5
|
-
const isComparePrice =
|
|
5
|
+
const isComparePrice = setting?.priceType === 'compare' || false;
|
|
6
6
|
const colorClass = getGlobalColorClass('decoration', styles?.lineColor);
|
|
7
7
|
const priceCompare = ()=>{
|
|
8
8
|
return `
|
|
@@ -3,7 +3,7 @@ import { useTransition } from '../../ProductVariants/common/common.js';
|
|
|
3
3
|
import { useEditorMode, useQuantity, useCurrentVariant, useProductBundleDiscount, useInteraction, useProduct, useFormatMoney } from '@gem-sdk/core';
|
|
4
4
|
|
|
5
5
|
const useGpPrice = (props)=>{
|
|
6
|
-
const {
|
|
6
|
+
const { setting, builderProps } = props;
|
|
7
7
|
const elementRef = useRef(null);
|
|
8
8
|
const mode = useEditorMode();
|
|
9
9
|
const { quantity, hasUpdatePrice } = useQuantity();
|
|
@@ -12,7 +12,7 @@ const useGpPrice = (props)=>{
|
|
|
12
12
|
const bundleItem = props['bundle-item'];
|
|
13
13
|
const price = currentVariant?.price ?? 0;
|
|
14
14
|
const salePrice = currentVariant?.salePrice ?? 0;
|
|
15
|
-
const isComparePrice =
|
|
15
|
+
const isComparePrice = setting?.priceType === 'compare' || false;
|
|
16
16
|
const { trigger } = useInteraction();
|
|
17
17
|
const currentProduct = useProduct();
|
|
18
18
|
const currentProductId = currentProduct?.baseID?.replace('gid://shopify/Product/', '');
|
|
@@ -7,12 +7,12 @@ import { getAttrs } from './common/getAttr.js';
|
|
|
7
7
|
import { getTextProps } from './common/getTextData.js';
|
|
8
8
|
|
|
9
9
|
const ProductPrice = (props)=>{
|
|
10
|
-
const { style, setting,
|
|
10
|
+
const { style, setting, builderProps } = props;
|
|
11
11
|
const wrapperClasses = createClass(getWrapperClasses(props));
|
|
12
12
|
const wrapperAttrs = createAttr(getAttrs(props));
|
|
13
13
|
const textProps = getTextProps(props);
|
|
14
14
|
const stateData = createStateOrContext({
|
|
15
|
-
priceType:
|
|
15
|
+
priceType: setting?.priceType,
|
|
16
16
|
uid: builderProps?.uid,
|
|
17
17
|
locale: `{{shop.locale}}`,
|
|
18
18
|
currency: `{{shop.currency}}`,
|
|
@@ -93,8 +93,10 @@ const ModalContent = ()=>{
|
|
|
93
93
|
children: [
|
|
94
94
|
/*#__PURE__*/ jsx(Column, {
|
|
95
95
|
children: /*#__PURE__*/ jsx(ProductPrice, {
|
|
96
|
+
setting: {
|
|
97
|
+
priceType: 'regular'
|
|
98
|
+
},
|
|
96
99
|
styles: {
|
|
97
|
-
priceType: 'regular',
|
|
98
100
|
typography: {
|
|
99
101
|
type: 'subheading-2'
|
|
100
102
|
}
|
|
@@ -103,11 +105,13 @@ const ModalContent = ()=>{
|
|
|
103
105
|
}),
|
|
104
106
|
/*#__PURE__*/ jsx(Column, {
|
|
105
107
|
children: /*#__PURE__*/ jsx(ProductPrice, {
|
|
108
|
+
setting: {
|
|
109
|
+
priceType: 'compare'
|
|
110
|
+
},
|
|
106
111
|
styles: {
|
|
107
112
|
typography: {
|
|
108
113
|
type: 'paragraph-2'
|
|
109
|
-
}
|
|
110
|
-
priceType: 'compare'
|
|
114
|
+
}
|
|
111
115
|
}
|
|
112
116
|
})
|
|
113
117
|
})
|
|
@@ -278,6 +278,7 @@ const horizontalOne = [
|
|
|
278
278
|
childrens: [],
|
|
279
279
|
label: 'Product Price',
|
|
280
280
|
settings: {
|
|
281
|
+
priceType: 'compare',
|
|
281
282
|
hasOnlyDefaultVariant: false
|
|
282
283
|
},
|
|
283
284
|
styles: {
|
|
@@ -289,7 +290,6 @@ const horizontalOne = [
|
|
|
289
290
|
},
|
|
290
291
|
lineColor: 'text-1',
|
|
291
292
|
lineThrough: true,
|
|
292
|
-
priceType: 'compare',
|
|
293
293
|
textAlign: {
|
|
294
294
|
desktop: 'right'
|
|
295
295
|
},
|
|
@@ -319,6 +319,7 @@ const horizontalOne = [
|
|
|
319
319
|
childrens: [],
|
|
320
320
|
label: 'Product Price',
|
|
321
321
|
settings: {
|
|
322
|
+
priceType: 'regular',
|
|
322
323
|
hasOnlyDefaultVariant: false
|
|
323
324
|
},
|
|
324
325
|
styles: {
|
|
@@ -330,7 +331,6 @@ const horizontalOne = [
|
|
|
330
331
|
},
|
|
331
332
|
lineColor: 'text-1',
|
|
332
333
|
lineThrough: true,
|
|
333
|
-
priceType: 'regular',
|
|
334
334
|
textAlign: {
|
|
335
335
|
desktop: 'right'
|
|
336
336
|
},
|
|
@@ -420,6 +420,7 @@ const horizontalTwo = [
|
|
|
420
420
|
childrens: [],
|
|
421
421
|
label: 'Product Price',
|
|
422
422
|
settings: {
|
|
423
|
+
priceType: 'compare',
|
|
423
424
|
hasOnlyDefaultVariant: false
|
|
424
425
|
},
|
|
425
426
|
styles: {
|
|
@@ -431,7 +432,6 @@ const horizontalTwo = [
|
|
|
431
432
|
},
|
|
432
433
|
lineColor: 'text-1',
|
|
433
434
|
lineThrough: true,
|
|
434
|
-
priceType: 'compare',
|
|
435
435
|
textAlign: {
|
|
436
436
|
desktop: 'right'
|
|
437
437
|
},
|
|
@@ -461,6 +461,7 @@ const horizontalTwo = [
|
|
|
461
461
|
childrens: [],
|
|
462
462
|
label: 'Product Price',
|
|
463
463
|
settings: {
|
|
464
|
+
priceType: 'regular',
|
|
464
465
|
hasOnlyDefaultVariant: false
|
|
465
466
|
},
|
|
466
467
|
styles: {
|
|
@@ -472,7 +473,6 @@ const horizontalTwo = [
|
|
|
472
473
|
},
|
|
473
474
|
lineColor: 'text-1',
|
|
474
475
|
lineThrough: true,
|
|
475
|
-
priceType: 'regular',
|
|
476
476
|
textAlign: {
|
|
477
477
|
desktop: 'right'
|
|
478
478
|
},
|
|
@@ -138,6 +138,7 @@ const verticalOne = [
|
|
|
138
138
|
{
|
|
139
139
|
label: 'Product Price',
|
|
140
140
|
settings: {
|
|
141
|
+
priceType: 'compare',
|
|
141
142
|
hasOnlyDefaultVariant: false
|
|
142
143
|
},
|
|
143
144
|
styles: {
|
|
@@ -149,7 +150,6 @@ const verticalOne = [
|
|
|
149
150
|
},
|
|
150
151
|
lineColor: 'text-1',
|
|
151
152
|
lineThrough: true,
|
|
152
|
-
priceType: 'compare',
|
|
153
153
|
textAlign: {
|
|
154
154
|
desktop: 'right'
|
|
155
155
|
},
|
|
@@ -180,6 +180,7 @@ const verticalOne = [
|
|
|
180
180
|
{
|
|
181
181
|
label: 'Product Price',
|
|
182
182
|
settings: {
|
|
183
|
+
priceType: 'regular',
|
|
183
184
|
hasOnlyDefaultVariant: false
|
|
184
185
|
},
|
|
185
186
|
styles: {
|
|
@@ -191,7 +192,6 @@ const verticalOne = [
|
|
|
191
192
|
},
|
|
192
193
|
lineColor: 'text-1',
|
|
193
194
|
lineThrough: true,
|
|
194
|
-
priceType: 'regular',
|
|
195
195
|
textAlign: {
|
|
196
196
|
desktop: 'right'
|
|
197
197
|
},
|
|
@@ -120,9 +120,10 @@ const product1Col = {
|
|
|
120
120
|
childrens: [
|
|
121
121
|
{
|
|
122
122
|
tag: 'ProductPrice',
|
|
123
|
-
|
|
123
|
+
settings: {
|
|
124
124
|
priceType: 'regular'
|
|
125
|
-
}
|
|
125
|
+
},
|
|
126
|
+
styles: {}
|
|
126
127
|
}
|
|
127
128
|
]
|
|
128
129
|
},
|
|
@@ -131,8 +132,10 @@ const product1Col = {
|
|
|
131
132
|
childrens: [
|
|
132
133
|
{
|
|
133
134
|
tag: 'ProductPrice',
|
|
135
|
+
settings: {
|
|
136
|
+
priceType: 'compare'
|
|
137
|
+
},
|
|
134
138
|
styles: {
|
|
135
|
-
priceType: 'compare',
|
|
136
139
|
color: {
|
|
137
140
|
normal: 'text-1'
|
|
138
141
|
}
|
|
@@ -365,9 +368,10 @@ const product1ColProductPage = {
|
|
|
365
368
|
childrens: [
|
|
366
369
|
{
|
|
367
370
|
tag: 'ProductPrice',
|
|
368
|
-
|
|
371
|
+
settings: {
|
|
369
372
|
priceType: 'regular'
|
|
370
|
-
}
|
|
373
|
+
},
|
|
374
|
+
styles: {}
|
|
371
375
|
}
|
|
372
376
|
]
|
|
373
377
|
},
|
|
@@ -376,8 +380,10 @@ const product1ColProductPage = {
|
|
|
376
380
|
childrens: [
|
|
377
381
|
{
|
|
378
382
|
tag: 'ProductPrice',
|
|
383
|
+
settings: {
|
|
384
|
+
priceType: 'compare'
|
|
385
|
+
},
|
|
379
386
|
styles: {
|
|
380
|
-
priceType: 'compare',
|
|
381
387
|
color: {
|
|
382
388
|
normal: 'text-1'
|
|
383
389
|
}
|
|
@@ -121,9 +121,10 @@ const product2Col = {
|
|
|
121
121
|
childrens: [
|
|
122
122
|
{
|
|
123
123
|
tag: 'ProductPrice',
|
|
124
|
-
|
|
124
|
+
settings: {
|
|
125
125
|
priceType: 'regular'
|
|
126
|
-
}
|
|
126
|
+
},
|
|
127
|
+
styles: {}
|
|
127
128
|
}
|
|
128
129
|
]
|
|
129
130
|
},
|
|
@@ -132,8 +133,10 @@ const product2Col = {
|
|
|
132
133
|
childrens: [
|
|
133
134
|
{
|
|
134
135
|
tag: 'ProductPrice',
|
|
136
|
+
settings: {
|
|
137
|
+
priceType: 'compare'
|
|
138
|
+
},
|
|
135
139
|
styles: {
|
|
136
|
-
priceType: 'compare',
|
|
137
140
|
color: {
|
|
138
141
|
normal: 'text-1'
|
|
139
142
|
}
|
|
@@ -371,9 +374,10 @@ const product2ColProductPage = {
|
|
|
371
374
|
childrens: [
|
|
372
375
|
{
|
|
373
376
|
tag: 'ProductPrice',
|
|
374
|
-
|
|
377
|
+
settings: {
|
|
375
378
|
priceType: 'regular'
|
|
376
|
-
}
|
|
379
|
+
},
|
|
380
|
+
styles: {}
|
|
377
381
|
}
|
|
378
382
|
]
|
|
379
383
|
},
|
|
@@ -382,8 +386,10 @@ const product2ColProductPage = {
|
|
|
382
386
|
childrens: [
|
|
383
387
|
{
|
|
384
388
|
tag: 'ProductPrice',
|
|
389
|
+
settings: {
|
|
390
|
+
priceType: 'compare'
|
|
391
|
+
},
|
|
385
392
|
styles: {
|
|
386
|
-
priceType: 'compare',
|
|
387
393
|
color: {
|
|
388
394
|
normal: 'text-1'
|
|
389
395
|
}
|
|
@@ -122,9 +122,10 @@ const productDefault = {
|
|
|
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 productDefault = {
|
|
|
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
|
}
|
|
@@ -378,9 +381,10 @@ const productDynamicProductPage = {
|
|
|
378
381
|
childrens: [
|
|
379
382
|
{
|
|
380
383
|
tag: 'ProductPrice',
|
|
381
|
-
|
|
384
|
+
settings: {
|
|
382
385
|
priceType: 'regular'
|
|
383
|
-
}
|
|
386
|
+
},
|
|
387
|
+
styles: {}
|
|
384
388
|
}
|
|
385
389
|
]
|
|
386
390
|
},
|
|
@@ -389,8 +393,10 @@ const productDynamicProductPage = {
|
|
|
389
393
|
childrens: [
|
|
390
394
|
{
|
|
391
395
|
tag: 'ProductPrice',
|
|
396
|
+
settings: {
|
|
397
|
+
priceType: 'compare'
|
|
398
|
+
},
|
|
392
399
|
styles: {
|
|
393
|
-
priceType: 'compare',
|
|
394
400
|
color: {
|
|
395
401
|
normal: 'text-1'
|
|
396
402
|
}
|
|
@@ -253,8 +253,10 @@ const ProductListPreset = [
|
|
|
253
253
|
{
|
|
254
254
|
tag: 'ProductPrice',
|
|
255
255
|
label: 'Product Price',
|
|
256
|
+
settings: {
|
|
257
|
+
priceType: 'regular'
|
|
258
|
+
},
|
|
256
259
|
styles: {
|
|
257
|
-
priceType: 'regular',
|
|
258
260
|
typo: {
|
|
259
261
|
type: 'subheading-2'
|
|
260
262
|
},
|
|
@@ -300,8 +302,10 @@ const ProductListPreset = [
|
|
|
300
302
|
{
|
|
301
303
|
tag: 'ProductPrice',
|
|
302
304
|
label: 'Product Price',
|
|
305
|
+
settings: {
|
|
306
|
+
priceType: 'compare'
|
|
307
|
+
},
|
|
303
308
|
styles: {
|
|
304
|
-
priceType: 'compare',
|
|
305
309
|
typo: {
|
|
306
310
|
type: 'subheading-2'
|
|
307
311
|
},
|
|
@@ -640,6 +644,9 @@ const ProductListPreset = [
|
|
|
640
644
|
{
|
|
641
645
|
tag: 'ProductPrice',
|
|
642
646
|
label: 'Product Price',
|
|
647
|
+
settings: {
|
|
648
|
+
priceType: 'regular'
|
|
649
|
+
},
|
|
643
650
|
styles: {
|
|
644
651
|
priceType: 'regular',
|
|
645
652
|
typo: {
|
|
@@ -687,8 +694,10 @@ const ProductListPreset = [
|
|
|
687
694
|
{
|
|
688
695
|
tag: 'ProductPrice',
|
|
689
696
|
label: 'Product Price',
|
|
697
|
+
settings: {
|
|
698
|
+
priceType: 'compare'
|
|
699
|
+
},
|
|
690
700
|
styles: {
|
|
691
|
-
priceType: 'compare',
|
|
692
701
|
typo: {
|
|
693
702
|
type: 'subheading-2'
|
|
694
703
|
},
|
|
@@ -5,18 +5,7 @@ const ProductPriceSettings = [
|
|
|
5
5
|
{
|
|
6
6
|
id: 'moneyWithCurrentFormat',
|
|
7
7
|
type: 'toggle'
|
|
8
|
-
}
|
|
9
|
-
]
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
id: 'style',
|
|
13
|
-
// info: {
|
|
14
|
-
// previous_link_text: 'You can change the content in',
|
|
15
|
-
// link_text: 'Shopify',
|
|
16
|
-
// next_link_text: '',
|
|
17
|
-
// link_type: 'shopify_admin',
|
|
18
|
-
// },
|
|
19
|
-
controls: [
|
|
8
|
+
},
|
|
20
9
|
{
|
|
21
10
|
id: 'priceType',
|
|
22
11
|
type: 'option:value',
|
|
@@ -31,7 +20,33 @@ const ProductPriceSettings = [
|
|
|
31
20
|
}
|
|
32
21
|
],
|
|
33
22
|
default: 'regular'
|
|
34
|
-
}
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'style',
|
|
28
|
+
// info: {
|
|
29
|
+
// previous_link_text: 'You can change the content in',
|
|
30
|
+
// link_text: 'Shopify',
|
|
31
|
+
// next_link_text: '',
|
|
32
|
+
// link_type: 'shopify_admin',
|
|
33
|
+
// },
|
|
34
|
+
controls: [
|
|
35
|
+
// {
|
|
36
|
+
// id: 'priceType',
|
|
37
|
+
// type: 'option:value',
|
|
38
|
+
// options: [
|
|
39
|
+
// {
|
|
40
|
+
// label: 'Original',
|
|
41
|
+
// value: 'regular',
|
|
42
|
+
// },
|
|
43
|
+
// {
|
|
44
|
+
// label: 'Compare',
|
|
45
|
+
// value: 'compare',
|
|
46
|
+
// },
|
|
47
|
+
// ],
|
|
48
|
+
// default: 'regular',
|
|
49
|
+
// },
|
|
35
50
|
{
|
|
36
51
|
id: 'lineThrough',
|
|
37
52
|
type: 'combo',
|
|
@@ -317,6 +317,9 @@ const StickyPreset = {
|
|
|
317
317
|
{
|
|
318
318
|
tag: 'ProductPrice',
|
|
319
319
|
label: 'Product Price',
|
|
320
|
+
settings: {
|
|
321
|
+
priceType: 'regular'
|
|
322
|
+
},
|
|
320
323
|
styles: {
|
|
321
324
|
typo: {
|
|
322
325
|
type: 'subheading-2',
|
|
@@ -335,7 +338,6 @@ const StickyPreset = {
|
|
|
335
338
|
fontStyle: 'normal'
|
|
336
339
|
}
|
|
337
340
|
},
|
|
338
|
-
priceType: 'regular',
|
|
339
341
|
lineThrough: true,
|
|
340
342
|
thickness: 1,
|
|
341
343
|
lineColor: 'text-1',
|
|
@@ -1412,6 +1414,9 @@ const StickyPresetProduct = {
|
|
|
1412
1414
|
{
|
|
1413
1415
|
tag: 'ProductPrice',
|
|
1414
1416
|
label: 'Product Price',
|
|
1417
|
+
settings: {
|
|
1418
|
+
priceType: 'regular'
|
|
1419
|
+
},
|
|
1415
1420
|
styles: {
|
|
1416
1421
|
typo: {
|
|
1417
1422
|
type: 'subheading-2',
|
|
@@ -1430,7 +1435,6 @@ const StickyPresetProduct = {
|
|
|
1430
1435
|
fontStyle: 'normal'
|
|
1431
1436
|
}
|
|
1432
1437
|
},
|
|
1433
|
-
priceType: 'regular',
|
|
1434
1438
|
lineThrough: true,
|
|
1435
1439
|
thickness: 1,
|
|
1436
1440
|
lineColor: 'text-1',
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3204,9 +3204,8 @@ type ProductPriceProps = BasePropsWrap<{
|
|
|
3204
3204
|
boxShadowPrice?: ShadowProps;
|
|
3205
3205
|
hasBoxShadowPrice?: boolean;
|
|
3206
3206
|
opacityPrice?: number;
|
|
3207
|
-
}, TextProps['setting'] & {
|
|
3208
3207
|
priceType?: 'regular' | 'compare';
|
|
3209
|
-
} & TextProps['styles'] & {
|
|
3208
|
+
}, TextProps['setting'] & {} & TextProps['styles'] & {
|
|
3210
3209
|
disableHoverColor?: boolean;
|
|
3211
3210
|
lineThrough?: boolean;
|
|
3212
3211
|
thickness?: number;
|