@gem-sdk/components 2.4.3 → 2.4.5

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.
@@ -32,7 +32,7 @@ const ProductPrice = (props)=>{
32
32
  bundleItem?.quantity
33
33
  ]);
34
34
  const bundleDiscount = React.useMemo(()=>{
35
- const value = parseInt(bundleItem?.discountValue);
35
+ const value = Number(bundleItem?.discountValue);
36
36
  if (bundleItem?.discountType === 'percentage') {
37
37
  return price * quantityProduct * value / 100;
38
38
  }
@@ -341,10 +341,8 @@ const ProductVariants = ({ builderProps, style, styles, setting, advanced })=>{
341
341
  '>
342
342
  {%- assign options = product.options_with_values -%}
343
343
  {%- assign variants = product.variants -%}
344
- {%- if options.size == 0 or options.size == 1 and options[0].name == 'Title' and options[0].values.size == 1 and options[0].values[0] == 'Default Title' -%}
345
- <div>
346
-
347
- </div>
344
+ {%- if options.size == 0 or options.size == 1 and variants.size == 1 and variants[0].title == 'Default Title' and variants[0].option1 == 'Default Title' -%}
345
+ <div></div>
348
346
  {% else %}
349
347
  <div
350
348
  class="gp-grid !gp-ml-0"
@@ -9,7 +9,7 @@ const renderCombineVariants = (isSoldOutMark, hasPreSelected, enablePrice)=>{
9
9
  ${isSoldOutMark ? `{%- if variantItem.available == false -%}
10
10
  {%- if variantItem.id == variant.id -%}
11
11
  <option origin-price="{{variantItem.price}}" disabled ${hasPreSelected ? 'selected' : ''} value="{{variantItem.id}}" key="{{variantItem.id}}">
12
- {{variantItem.title}} ${hasPrice} : ''}
12
+ {{variantItem.title}} ${hasPrice}
13
13
  </option>
14
14
  {% else %}
15
15
  <option ${optionAttrs} disabled>
@@ -28,7 +28,7 @@ const ProductPrice = (props)=>{
28
28
  bundleItem?.quantity
29
29
  ]);
30
30
  const bundleDiscount = useMemo(()=>{
31
- const value = parseInt(bundleItem?.discountValue);
31
+ const value = Number(bundleItem?.discountValue);
32
32
  if (bundleItem?.discountType === 'percentage') {
33
33
  return price * quantityProduct * value / 100;
34
34
  }
@@ -337,10 +337,8 @@ const ProductVariants = ({ builderProps, style, styles, setting, advanced })=>{
337
337
  '>
338
338
  {%- assign options = product.options_with_values -%}
339
339
  {%- assign variants = product.variants -%}
340
- {%- if options.size == 0 or options.size == 1 and options[0].name == 'Title' and options[0].values.size == 1 and options[0].values[0] == 'Default Title' -%}
341
- <div>
342
-
343
- </div>
340
+ {%- if options.size == 0 or options.size == 1 and variants.size == 1 and variants[0].title == 'Default Title' and variants[0].option1 == 'Default Title' -%}
341
+ <div></div>
344
342
  {% else %}
345
343
  <div
346
344
  class="gp-grid !gp-ml-0"
@@ -7,7 +7,7 @@ const renderCombineVariants = (isSoldOutMark, hasPreSelected, enablePrice)=>{
7
7
  ${isSoldOutMark ? `{%- if variantItem.available == false -%}
8
8
  {%- if variantItem.id == variant.id -%}
9
9
  <option origin-price="{{variantItem.price}}" disabled ${hasPreSelected ? 'selected' : ''} value="{{variantItem.id}}" key="{{variantItem.id}}">
10
- {{variantItem.title}} ${hasPrice} : ''}
10
+ {{variantItem.title}} ${hasPrice}
11
11
  </option>
12
12
  {% else %}
13
13
  <option ${optionAttrs} disabled>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.4.3",
3
+ "version": "2.4.5",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",