@gem-sdk/components 2.0.0-staging.1107 → 2.0.0-staging.1109

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.
@@ -1 +1 @@
1
- "use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet"];return t.forEach(t=>{delete e?.[t]}),e},getStyleContainerIconlistMain=({styles:e,style:t,type:o,advanced:l})=>{let{align:r}=e??{};return{...t="react"===o?filterStyles(t):t,...core.makeStyleResponsive("jc",r),...core.makeStyleResponsive("d",{desktop:l?.d?.desktop?"flex":"none",tablet:l?.d?.tablet?"flex":"none",mobile:l?.d?.mobile?"flex":"none"})}},getStyleWraplistIcon=({styles:e})=>{let{panelAlign:t,contentBoxPadding:o,contentBoxWidth:l,background:r,contentBoxBorder:s,contentBoxRounded:n,contentBoxShadow:i}=e??{};return{...core.composeBorderResponsive(s),...core.getResponsiveStyleShadowWithoutState(i,"box-shadow",i),...core.composeRadiusResponsive(n),...core.getStyleBackgroundByDevice(r),...core.getResponsiveStylePadding(o),...core.makeStyleResponsive("w",l),...core.makeStyleResponsive("jc",t),...core.getGradientBgrStyleByDevice(r,{desktop:!0,tablet:!0,mobile:!0})}},getStyleColListIcon=({styles:e})=>{let{verticalSpacing:t}=e??{};return{...core.makeStyleResponsive("rg",t)}},getStyleWrapItemIcon=({styles:e})=>{let{horizontalSpacing:t,position:o}=e??{};return{...core.makeStyleResponsive("cg",t),...core.makeStyleResponsive("ai",{...o,mobile:o?.mobile=="baseline"?"flex-start":o?.mobile})}},getStyleWrapIcon=({styles:e,setting:t})=>{let{iconBorder:o,backgroundColor:l,iconRounded:r}=e??{},{globalSize:s}=t??{},n=core.makeGlobalSize(s);return{...n.padding,...core.makeStyle({bs:o?.border,bw:o?.width,bc:core.getSingleColorVariable(o?.color),bg:core.getSingleColorVariable(l),bblr:r?.bblr,bbrr:r?.bbrr,btlr:r?.btlr,btrr:r?.btrr})}},getStyleIcon=({styles:e,setting:t})=>{let{iconColor:o}=e||{},{iconWidth:l}=t??{};return{"--c":core.getSingleColorVariable(o),"--w":"100%","--h":"100%","--size-desktop":`${l?.desktop}px`,"--size-tablet":`${l?.tablet||l?.desktop}px`,"--size-mobile":`${l?.mobile||l?.tablet||l?.desktop}px`}},getStyleTypoText=({setting:e})=>({typo:e?.textTypo});exports.getStyleColListIcon=getStyleColListIcon,exports.getStyleContainerIconlistMain=getStyleContainerIconlistMain,exports.getStyleIcon=getStyleIcon,exports.getStyleTypoText=getStyleTypoText,exports.getStyleWrapIcon=getStyleWrapIcon,exports.getStyleWrapItemIcon=getStyleWrapItemIcon,exports.getStyleWraplistIcon=getStyleWraplistIcon;
1
+ "use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet"];return t.forEach(t=>{delete e?.[t]}),e},getStyleContainerIconlistMain=({styles:e,style:t,type:o,advanced:l})=>{let{align:r}=e??{};return{...t="react"===o?filterStyles(t):t,...core.makeStyleResponsive("jc",r),...core.makeStyleResponsive("d",{desktop:l?.d?.desktop?"flex":"none",tablet:l?.d?.tablet?"flex":"none",mobile:l?.d?.mobile?"flex":"none"})}},getStyleWraplistIcon=({styles:e})=>{let{panelAlign:t,contentBoxPadding:o,contentBoxWidth:l,background:r,contentBoxBorder:s,contentBoxRounded:i,contentBoxShadow:n}=e??{};return{...core.composeBorderResponsive(s),...core.getResponsiveStyleShadowWithoutState(n,"box-shadow",n),...core.composeRadiusResponsive(i),...core.getStyleBackgroundByDevice(r),...core.getResponsiveStylePadding(o),...core.makeStyleResponsive("w",l),...core.makeStyleResponsive("jc",t),...core.getGradientBgrStyleByDevice(r,{desktop:!0,tablet:!0,mobile:!0})}},getStyleColListIcon=({styles:e})=>{let{verticalSpacing:t}=e??{};return{...core.makeStyleResponsive("rg",t)}},getStyleWrapItemIcon=({styles:e})=>{let{horizontalSpacing:t,position:o}=e??{};return{...core.makeStyleResponsive("cg",t),...core.makeStyleResponsive("ai",{...o,mobile:o?.mobile=="baseline"?"flex-start":o?.mobile})}},getStyleWrapIcon=({styles:e,setting:t})=>{let{iconBorder:o,backgroundColor:l,iconRounded:r}=e??{},{globalSize:s}=t??{},i=core.makeGlobalSize(s);return{...i.padding,...core.makeStyle({bs:o?.border,bw:o?.width,bc:core.getSingleColorVariable(o?.color),bg:core.getSingleColorVariable(l),bblr:r?.bblr,bbrr:r?.bbrr,btlr:r?.btlr,btrr:r?.btrr}),...core.makeStyleResponsive("top",{desktop:"unset",tablet:"unset",mobile:"unset"}),...core.makeStyleResponsive("pos",{desktop:"relative",tablet:"relative",mobile:"relative"})}},getStyleIcon=({styles:e,setting:t})=>{let{iconColor:o}=e||{},{iconWidth:l}=t??{};return{"--c":core.getSingleColorVariable(o),"--w":"100%","--h":"100%","--size-desktop":`${l?.desktop}px`,"--size-tablet":`${l?.tablet||l?.desktop}px`,"--size-mobile":`${l?.mobile||l?.tablet||l?.desktop}px`}},getStyleTypoText=({setting:e})=>({typo:e?.textTypo});exports.getStyleColListIcon=getStyleColListIcon,exports.getStyleContainerIconlistMain=getStyleContainerIconlistMain,exports.getStyleIcon=getStyleIcon,exports.getStyleTypoText=getStyleTypoText,exports.getStyleWrapIcon=getStyleWrapIcon,exports.getStyleWrapItemIcon=getStyleWrapItemIcon,exports.getStyleWraplistIcon=getStyleWraplistIcon;
@@ -1,11 +1,11 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),classes=require("./common/classes.js");const ProductListItem=e=>{let{pageContext:t,children:o}=e,{productItemClass:a,gpProductClass:r}=classes.getClass(e);return core.template`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),classes=require("./common/classes.js");const ProductListItem=e=>{let{pageContext:t,children:o}=e,{productItemClass:n,gpProductClass:a}=classes.getClass(e);return core.template`
2
2
  <gp-product
3
- gp-context='{"variantSelected": {{ variant | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
3
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_policy": {{ variant.inventory_policy }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
4
4
  gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(t)}}'
5
- class="${r}"
5
+ class="${a}"
6
6
 
7
7
  >
8
- {%- form 'product', product, id: product_form_id, class: 'form contents ${a}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
8
+ {%- form 'product', product, id: product_form_id, class: 'form contents ${n}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
9
9
  <input type="hidden" name="id" value="{{ variant.id }}" />
10
10
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
11
11
  <button type="submit" onclick="return false;" style="display:none;"></button>
@@ -1,19 +1,19 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),classes=require("./common/classes.js");const ProductListItem=e=>{let{pageContext:t,rawChildren:o}=e,{productItemClass:r,gpProductClass:a}=classes.getClass(e),n=()=>core.template`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),classes=require("./common/classes.js");const ProductListItem=e=>{let{pageContext:t,rawChildren:o}=e,{productItemClass:r,gpProductClass:n}=classes.getClass(e),a=()=>core.template`
2
2
  ${o?.map((e,t)=>{if(e)return core.template`
3
3
  ${core.RenderChildren({...e,index:t})}
4
4
  `})}
5
5
  `;return core.template`
6
6
  <gp-product
7
- gp-context='{"variantSelected": {{ variant | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
7
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_policy": {{ variant.inventory_policy }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
8
8
  gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(t)}}'
9
- class="${a}"
9
+ class="${n}"
10
10
 
11
11
  >
12
12
  {%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
13
13
  <input type="hidden" name="id" value="{{ variant.id }}" />
14
14
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
15
15
  <button type="submit" onclick="return false;" style="display:none;"></button>
16
- ${n()}
16
+ ${a()}
17
17
  {%- endform -%}
18
18
  </gp-product>
19
19
  `};exports.default=ProductListItem;
@@ -1 +1 @@
1
- import{makeStyleResponsive as e,composeBorderResponsive as t,getResponsiveStyleShadowWithoutState as l,composeRadiusResponsive as o,getStyleBackgroundByDevice as r,getResponsiveStylePadding as b,getGradientBgrStyleByDevice as n,makeGlobalSize as i,makeStyle as a,getSingleColorVariable as p}from"@gem-sdk/core";let filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet"];return t.forEach(t=>{delete e?.[t]}),e},getStyleContainerIconlistMain=({styles:t,style:l,type:o,advanced:r})=>{let{align:b}=t??{};return{...l="react"===o?filterStyles(l):l,...e("jc",b),...e("d",{desktop:r?.d?.desktop?"flex":"none",tablet:r?.d?.tablet?"flex":"none",mobile:r?.d?.mobile?"flex":"none"})}},getStyleWraplistIcon=({styles:i})=>{let{panelAlign:a,contentBoxPadding:p,contentBoxWidth:s,background:c,contentBoxBorder:y,contentBoxRounded:g,contentBoxShadow:d}=i??{};return{...t(y),...l(d,"box-shadow",d),...o(g),...r(c),...b(p),...e("w",s),...e("jc",a),...n(c,{desktop:!0,tablet:!0,mobile:!0})}},getStyleColListIcon=({styles:t})=>{let{verticalSpacing:l}=t??{};return{...e("rg",l)}},getStyleWrapItemIcon=({styles:t})=>{let{horizontalSpacing:l,position:o}=t??{};return{...e("cg",l),...e("ai",{...o,mobile:o?.mobile=="baseline"?"flex-start":o?.mobile})}},getStyleWrapIcon=({styles:e,setting:t})=>{let{iconBorder:l,backgroundColor:o,iconRounded:r}=e??{},{globalSize:b}=t??{},n=i(b);return{...n.padding,...a({bs:l?.border,bw:l?.width,bc:p(l?.color),bg:p(o),bblr:r?.bblr,bbrr:r?.bbrr,btlr:r?.btlr,btrr:r?.btrr})}},getStyleIcon=({styles:e,setting:t})=>{let{iconColor:l}=e||{},{iconWidth:o}=t??{};return{"--c":p(l),"--w":"100%","--h":"100%","--size-desktop":`${o?.desktop}px`,"--size-tablet":`${o?.tablet||o?.desktop}px`,"--size-mobile":`${o?.mobile||o?.tablet||o?.desktop}px`}},getStyleTypoText=({setting:e})=>({typo:e?.textTypo});export{getStyleColListIcon,getStyleContainerIconlistMain,getStyleIcon,getStyleTypoText,getStyleWrapIcon,getStyleWrapItemIcon,getStyleWraplistIcon};
1
+ import{makeStyleResponsive as e,composeBorderResponsive as t,getResponsiveStyleShadowWithoutState as l,composeRadiusResponsive as o,getStyleBackgroundByDevice as r,getResponsiveStylePadding as b,getGradientBgrStyleByDevice as n,makeGlobalSize as i,makeStyle as a,getSingleColorVariable as s}from"@gem-sdk/core";let filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet"];return t.forEach(t=>{delete e?.[t]}),e},getStyleContainerIconlistMain=({styles:t,style:l,type:o,advanced:r})=>{let{align:b}=t??{};return{...l="react"===o?filterStyles(l):l,...e("jc",b),...e("d",{desktop:r?.d?.desktop?"flex":"none",tablet:r?.d?.tablet?"flex":"none",mobile:r?.d?.mobile?"flex":"none"})}},getStyleWraplistIcon=({styles:i})=>{let{panelAlign:a,contentBoxPadding:s,contentBoxWidth:p,background:c,contentBoxBorder:d,contentBoxRounded:y,contentBoxShadow:g}=i??{};return{...t(d),...l(g,"box-shadow",g),...o(y),...r(c),...b(s),...e("w",p),...e("jc",a),...n(c,{desktop:!0,tablet:!0,mobile:!0})}},getStyleColListIcon=({styles:t})=>{let{verticalSpacing:l}=t??{};return{...e("rg",l)}},getStyleWrapItemIcon=({styles:t})=>{let{horizontalSpacing:l,position:o}=t??{};return{...e("cg",l),...e("ai",{...o,mobile:o?.mobile=="baseline"?"flex-start":o?.mobile})}},getStyleWrapIcon=({styles:t,setting:l})=>{let{iconBorder:o,backgroundColor:r,iconRounded:b}=t??{},{globalSize:n}=l??{},p=i(n);return{...p.padding,...a({bs:o?.border,bw:o?.width,bc:s(o?.color),bg:s(r),bblr:b?.bblr,bbrr:b?.bbrr,btlr:b?.btlr,btrr:b?.btrr}),...e("top",{desktop:"unset",tablet:"unset",mobile:"unset"}),...e("pos",{desktop:"relative",tablet:"relative",mobile:"relative"})}},getStyleIcon=({styles:e,setting:t})=>{let{iconColor:l}=e||{},{iconWidth:o}=t??{};return{"--c":s(l),"--w":"100%","--h":"100%","--size-desktop":`${o?.desktop}px`,"--size-tablet":`${o?.tablet||o?.desktop}px`,"--size-mobile":`${o?.mobile||o?.tablet||o?.desktop}px`}},getStyleTypoText=({setting:e})=>({typo:e?.textTypo});export{getStyleColListIcon,getStyleContainerIconlistMain,getStyleIcon,getStyleTypoText,getStyleWrapIcon,getStyleWrapItemIcon,getStyleWraplistIcon};
@@ -1,6 +1,6 @@
1
1
  import{template as t}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let ProductListItem=o=>{let{pageContext:n,children:a}=o,{productItemClass:r,gpProductClass:c}=e(o);return t`
2
2
  <gp-product
3
- gp-context='{"variantSelected": {{ variant | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
3
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_policy": {{ variant.inventory_policy }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
4
4
  gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(n)}}'
5
5
  class="${c}"
6
6
 
@@ -1,19 +1,19 @@
1
- import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as o}from"./common/classes.js";let ProductListItem=n=>{let{pageContext:a,rawChildren:r}=n,{productItemClass:c,gpProductClass:d}=o(n),i=()=>t`
1
+ import{template as t,RenderChildren as e}from"@gem-sdk/core";import{getClass as o}from"./common/classes.js";let ProductListItem=n=>{let{pageContext:a,rawChildren:r}=n,{productItemClass:c,gpProductClass:i}=o(n),d=()=>t`
2
2
  ${r?.map((o,n)=>{if(o)return t`
3
3
  ${e({...o,index:n})}
4
4
  `})}
5
5
  `;return t`
6
6
  <gp-product
7
- gp-context='{"variantSelected": {{ variant | json | escape }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
7
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "inventory_policy": {{ variant.inventory_policy }}, "quantity": 1 , "formId": "{{ product_form_id }}"}'
8
8
  gp-data='{"variantSelected": {{ variant | json | escape }}, "quantity": 1, "productUrl":{{ product.url | json | escape }}, "productHandle":{{ product.handle | json | escape }}, "collectionUrl": {{ collection.url | json | escape }}, "collectionHandle": {{ collection.handle | json | escape }},"pageContext" : ${JSON.stringify(a)}}'
9
- class="${d}"
9
+ class="${i}"
10
10
 
11
11
  >
12
12
  {%- form 'product', product, id: product_form_id, class: 'form contents ${c}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
13
13
  <input type="hidden" name="id" value="{{ variant.id }}" />
14
14
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
15
15
  <button type="submit" onclick="return false;" style="display:none;"></button>
16
- ${i()}
16
+ ${d()}
17
17
  {%- endform -%}
18
18
  </gp-product>
19
19
  `};export{ProductListItem as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-staging.1107",
3
+ "version": "2.0.0-staging.1109",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",