@gem-sdk/components 2.4.2 → 2.4.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.
@@ -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>
@@ -118,25 +118,28 @@ const config = {
118
118
  id: 'openApp'
119
119
  }
120
120
  },
121
- {
122
- type: 'control',
123
- label: {
124
- en: 'Align'
125
- },
126
- setting: {
127
- id: 'align'
128
- }
129
- },
130
121
  {
131
122
  type: 'control',
132
123
  setting: {
133
124
  id: 'productId'
134
125
  },
126
+ label: {
127
+ en: 'Product ID'
128
+ },
135
129
  options: {
136
130
  hideOnPages: [
137
131
  'GP_PRODUCT'
138
132
  ]
139
133
  }
134
+ },
135
+ {
136
+ type: 'control',
137
+ label: {
138
+ en: 'Align'
139
+ },
140
+ setting: {
141
+ id: 'align'
142
+ }
140
143
  }
141
144
  ]
142
145
  };
@@ -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>
@@ -114,25 +114,28 @@ const config = {
114
114
  id: 'openApp'
115
115
  }
116
116
  },
117
- {
118
- type: 'control',
119
- label: {
120
- en: 'Align'
121
- },
122
- setting: {
123
- id: 'align'
124
- }
125
- },
126
117
  {
127
118
  type: 'control',
128
119
  setting: {
129
120
  id: 'productId'
130
121
  },
122
+ label: {
123
+ en: 'Product ID'
124
+ },
131
125
  options: {
132
126
  hideOnPages: [
133
127
  'GP_PRODUCT'
134
128
  ]
135
129
  }
130
+ },
131
+ {
132
+ type: 'control',
133
+ label: {
134
+ en: 'Align'
135
+ },
136
+ setting: {
137
+ id: 'align'
138
+ }
136
139
  }
137
140
  ]
138
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",