@gem-sdk/components 19.0.0-staging.30 → 19.0.0-staging.31

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.
@@ -2,6 +2,16 @@
2
2
  ${i.Liquid("{%- assign optionRendered = false -%}")}
3
3
  ${i.Liquid("{%- assign swatches = shop.metafields.GEMPAGES.swatchesJSONFormat.value -%}")}
4
4
 
5
+ ${i.Liquid(`{%- assign variantPresetString = "${r}" -%}
6
+ {%- assign optionName = option.name | replace: "'", "'" | replace: '"', """ -%}
7
+ {%- assign items = variantPresetString | split: '($2)' -%}
8
+ {%- assign type = 'dropdown' -%}
9
+ {% for item in items %}
10
+ {%- assign itemPreset = item | split: '($1)' -%}
11
+ {% if itemPreset[0] == optionName %}{%- assign type = itemPreset[1] -%}{% endif %}
12
+ {% if itemPreset[0] == 'base' %}{%- assign type = itemPreset[1] -%}{% endif %}
13
+ {% endfor %}`)}
14
+
5
15
  ${i.Liquid(`{% for swatch in swatches %}
6
16
  {%- assign optionTitle = swatch.optionTitle -%}
7
17
  {%- assign optionType = swatch.optionType -%}
@@ -21,21 +31,10 @@
21
31
  {%- assign imageUrls = imageUrlsString | split: '${s.OPTION_VALUES_DELIMITER}' | slice: 0, imageUrlsString.size -%}
22
32
 
23
33
  {% if optionTitle == option.name %}
24
- {%- assign variantPresetString = "${r}" -%}
25
- {%- assign optionName = option.name | replace: "'", "'" | replace: '"', """ -%}
26
- {%- assign items = variantPresetString | split: '($2)' -%}
27
- {%- assign type = 'dropdown' -%}
28
-
29
- {% for item in items %}
30
- {%- assign itemPreset = item | split: '($1)' -%}
31
- {% if itemPreset[0] == optionName %}{%- assign type = itemPreset[1] -%}{% endif %}
32
- {% if itemPreset[0] == 'base' %}{%- assign type = itemPreset[1] -%}{% endif %}
33
- {% endfor %}
34
34
  {%- assign optionRendered = true -%}
35
-
36
35
  ${t({showDropdown:!0})}
37
36
  {% endif %}
38
37
  {% endfor %}`)}
39
38
 
40
- ${i.LiquidIf("optionRendered == false",t({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
39
+ ${i.LiquidIf("optionRendered == false",t({showDropdown:!0,isRenderDefault:!0,typeOfOption:"optionType"}))}
41
40
  `};
@@ -3,6 +3,16 @@
3
3
  ${i.Liquid("{%- assign swatches = shop.metafields.GEMPAGES.swatches -%}")}
4
4
  ${i.Liquid("{%- assign swatchesItems = swatches | split: '($1)' -%}")}
5
5
 
6
+ ${i.Liquid(`{%- assign variantPresetString = "${a}" -%}
7
+ {%- assign optionName = option.name | replace: "'", "'" | replace: '"', """ -%}
8
+ {%- assign items = variantPresetString | split: '($2)' -%}
9
+ {%- assign type = 'dropdown' -%}
10
+ {% for item in items %}
11
+ {%- assign itemPreset = item | split: '($1)' -%}
12
+ {% if itemPreset[0] == optionName %}{%- assign type = itemPreset[1] -%}{% endif %}
13
+ {% if itemPreset[0] == 'base' %}{%- assign type = itemPreset[1] -%}{% endif %}
14
+ {% endfor %}`)}
15
+
6
16
  ${i.LiquidFor("swatchesItem in swatchesItems",`
7
17
  ${i.Liquid('{%- assign colorArraysString = "" -%}')}
8
18
  ${i.Liquid('{%- assign labelsString = "" -%}')}
@@ -48,19 +58,10 @@
48
58
  ${i.Liquid("{%- assign imageUrls = imageUrlsString | split: '($8)' -%}")}
49
59
 
50
60
  ${i.LiquidIf("optionTitle == option.name",`
51
- ${i.Liquid(`{%- assign variantPresetString = "${a}" -%}`)}
52
- ${i.Liquid('{%- assign optionName = option.name | replace: "\'", "'" | replace: \'"\', """ -%}')}
53
- ${i.Liquid("{%- assign items = variantPresetString | split:'($2)' -%}")}
54
- ${i.Liquid("{%- assign type = 'dropdown' -%}")}
55
- ${i.LiquidFor("item in items",`
56
- ${i.Liquid("{%- assign itemPreset = item | split:'($1)' -%}")}
57
- ${i.LiquidIf("itemPreset[0] == optionName",i.Liquid("{%- assign type = itemPreset[1] -%}"))}
58
- ${i.LiquidIf('itemPreset[0] == "base"',i.Liquid("{%- assign type = itemPreset[1] -%}"))}
59
- `)}
60
61
  ${i.Liquid("{%- assign optionRendered = true -%}")}
61
62
  ${t({showDropdown:!0})}
62
63
  `)}
63
64
  `)}
64
65
 
65
- ${i.LiquidIf("optionRendered == false",t({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
66
+ ${i.LiquidIf("optionRendered == false",t({showDropdown:!0,isRenderDefault:!0,typeOfOption:"optionType"}))}
66
67
  `};
@@ -2,6 +2,16 @@ import{template as e}from"@gem-sdk/core";import{Liquid as s,LiquidIf as i}from"@
2
2
  ${s("{%- assign optionRendered = false -%}")}
3
3
  ${s("{%- assign swatches = shop.metafields.GEMPAGES.swatchesJSONFormat.value -%}")}
4
4
 
5
+ ${s(`{%- assign variantPresetString = "${r}" -%}
6
+ {%- assign optionName = option.name | replace: "'", "'" | replace: '"', """ -%}
7
+ {%- assign items = variantPresetString | split: '($2)' -%}
8
+ {%- assign type = 'dropdown' -%}
9
+ {% for item in items %}
10
+ {%- assign itemPreset = item | split: '($1)' -%}
11
+ {% if itemPreset[0] == optionName %}{%- assign type = itemPreset[1] -%}{% endif %}
12
+ {% if itemPreset[0] == 'base' %}{%- assign type = itemPreset[1] -%}{% endif %}
13
+ {% endfor %}`)}
14
+
5
15
  ${s(`{% for swatch in swatches %}
6
16
  {%- assign optionTitle = swatch.optionTitle -%}
7
17
  {%- assign optionType = swatch.optionType -%}
@@ -21,21 +31,10 @@ import{template as e}from"@gem-sdk/core";import{Liquid as s,LiquidIf as i}from"@
21
31
  {%- assign imageUrls = imageUrlsString | split: '${n}' | slice: 0, imageUrlsString.size -%}
22
32
 
23
33
  {% if optionTitle == option.name %}
24
- {%- assign variantPresetString = "${r}" -%}
25
- {%- assign optionName = option.name | replace: "'", "'" | replace: '"', """ -%}
26
- {%- assign items = variantPresetString | split: '($2)' -%}
27
- {%- assign type = 'dropdown' -%}
28
-
29
- {% for item in items %}
30
- {%- assign itemPreset = item | split: '($1)' -%}
31
- {% if itemPreset[0] == optionName %}{%- assign type = itemPreset[1] -%}{% endif %}
32
- {% if itemPreset[0] == 'base' %}{%- assign type = itemPreset[1] -%}{% endif %}
33
- {% endfor %}
34
34
  {%- assign optionRendered = true -%}
35
-
36
35
  ${o({showDropdown:!0})}
37
36
  {% endif %}
38
37
  {% endfor %}`)}
39
38
 
40
- ${i("optionRendered == false",o({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
39
+ ${i("optionRendered == false",o({showDropdown:!0,isRenderDefault:!0,typeOfOption:"optionType"}))}
41
40
  `};export{t as renderOptionValuesNewFormatSwatches};
@@ -3,6 +3,16 @@ import{Liquid as e,LiquidFor as s,LiquidIf as t}from"@gem-sdk/system";import{tem
3
3
  ${e("{%- assign swatches = shop.metafields.GEMPAGES.swatches -%}")}
4
4
  ${e("{%- assign swatchesItems = swatches | split: '($1)' -%}")}
5
5
 
6
+ ${e(`{%- assign variantPresetString = "${o}" -%}
7
+ {%- assign optionName = option.name | replace: "'", "'" | replace: '"', """ -%}
8
+ {%- assign items = variantPresetString | split: '($2)' -%}
9
+ {%- assign type = 'dropdown' -%}
10
+ {% for item in items %}
11
+ {%- assign itemPreset = item | split: '($1)' -%}
12
+ {% if itemPreset[0] == optionName %}{%- assign type = itemPreset[1] -%}{% endif %}
13
+ {% if itemPreset[0] == 'base' %}{%- assign type = itemPreset[1] -%}{% endif %}
14
+ {% endfor %}`)}
15
+
6
16
  ${s("swatchesItem in swatchesItems",`
7
17
  ${e('{%- assign colorArraysString = "" -%}')}
8
18
  ${e('{%- assign labelsString = "" -%}')}
@@ -48,19 +58,10 @@ import{Liquid as e,LiquidFor as s,LiquidIf as t}from"@gem-sdk/system";import{tem
48
58
  ${e("{%- assign imageUrls = imageUrlsString | split: '($8)' -%}")}
49
59
 
50
60
  ${t("optionTitle == option.name",`
51
- ${e(`{%- assign variantPresetString = "${o}" -%}`)}
52
- ${e('{%- assign optionName = option.name | replace: "\'", "'" | replace: \'"\', """ -%}')}
53
- ${e("{%- assign items = variantPresetString | split:'($2)' -%}")}
54
- ${e("{%- assign type = 'dropdown' -%}")}
55
- ${s("item in items",`
56
- ${e("{%- assign itemPreset = item | split:'($1)' -%}")}
57
- ${t("itemPreset[0] == optionName",e("{%- assign type = itemPreset[1] -%}"))}
58
- ${t('itemPreset[0] == "base"',e("{%- assign type = itemPreset[1] -%}"))}
59
- `)}
60
61
  ${e("{%- assign optionRendered = true -%}")}
61
62
  ${n({showDropdown:!0})}
62
63
  `)}
63
64
  `)}
64
65
 
65
- ${t("optionRendered == false",n({showDropdown:!1,isRenderDefault:!0,typeOfOption:"optionType"}))}
66
+ ${t("optionRendered == false",n({showDropdown:!0,isRenderDefault:!0,typeOfOption:"optionType"}))}
66
67
  `};export{a as renderOptionValuesOld};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "19.0.0-staging.30",
3
+ "version": "19.0.0-staging.31",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",