@gem-sdk/components 24.0.0-dev.12 → 24.0.0-dev.15

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,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("./common/classes.js"),t=require("@gem-sdk/system"),r=require("@gem-sdk/core");exports.default=({isFreePlan:a,onPrimaryClick:n,onGuidelineClick:l})=>{let{t:i}=r.useI18nStore(),c=t.createClass(s.getWarningPillClasses),o=t.createClass(s.getWarningCardClasses),d=t.createClass(s.getWarningIconWrapperClasses),u=t.createClass(s.getWarningTextWrapperClasses),g=t.createClass(s.getWarningTextClasses),p=t.createClass(s.getWarningActionsClasses),h=t.createClass(s.getWarningPrimaryButtonClasses),C=t.createClass(s.getWarningSecondaryButtonClasses),x=e=>s=>{s.stopPropagation(),e()},m=x(n),j=x(l);return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:c,children:t.If(a,i("Bundle Discount locked"),i("Bundle Discount not set up"))}),e.jsxs("div",{className:o,children:[e.jsx("div",{className:d,children:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M8.575 3.10858C9.199 1.99714 10.801 1.99714 11.425 3.10858L17.494 13.9308C18.1013 15.0128 17.3187 16.3462 16.069 16.3462H3.93098C2.68127 16.3462 1.8987 15.0128 2.50598 13.9308L8.575 3.10858Z",stroke:"#916A00",strokeWidth:"1.3"}),e.jsx("path",{d:"M10 7.5V10.8333",stroke:"#916A00",strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("circle",{cx:"10",cy:"13.3333",r:"0.833333",fill:"#916A00"})]})}),e.jsxs("div",{className:u,children:[e.jsx("p",{className:g,children:t.If(a,i("Upgrade to Build plan to unlock Product Bundle & other premium features."),i("Add a bundle discount to this product to show the offer on your page."))}),e.jsxs("div",{className:p,children:[e.jsx("button",{type:"button",onClick:m,className:h,children:t.If(a,i("Upgrade plan"),i("Set it up"))}),t.If(!a,e.jsx("button",{type:"button",onClick:j,className:C,children:i("Read guideline")}))]})]})]})]})};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("./common/classes.js"),t=require("@gem-sdk/system"),a=require("@gem-sdk/core");exports.default=({isFreePlan:r,onPrimaryClick:n,onGuidelineClick:l})=>{let{t:i}=a.useI18nStore(),c=t.createClass(s.getWarningPillClasses),o=t.createClass(s.getWarningCardClasses),d=t.createClass(s.getWarningIconWrapperClasses),u=t.createClass(s.getWarningTextWrapperClasses),g=t.createClass(s.getWarningTextClasses),p=t.createClass(s.getWarningActionsClasses),h=t.createClass(s.getWarningPrimaryButtonClasses),C=t.createClass(s.getWarningSecondaryButtonClasses),x=e=>s=>{s.stopPropagation(),e()},m=x(n),j=x(l);return e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-bundle-discount-pill":!0,className:c,children:t.If(r,i("Bundle Discount locked"),i("Bundle Discount not set up"))}),e.jsxs("div",{className:o,children:[e.jsx("div",{className:d,children:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M8.575 3.10858C9.199 1.99714 10.801 1.99714 11.425 3.10858L17.494 13.9308C18.1013 15.0128 17.3187 16.3462 16.069 16.3462H3.93098C2.68127 16.3462 1.8987 15.0128 2.50598 13.9308L8.575 3.10858Z",stroke:"#916A00",strokeWidth:"1.3"}),e.jsx("path",{d:"M10 7.5V10.8333",stroke:"#916A00",strokeWidth:"1.3",strokeLinecap:"round"}),e.jsx("circle",{cx:"10",cy:"13.3333",r:"0.833333",fill:"#916A00"})]})}),e.jsxs("div",{className:u,children:[e.jsx("p",{className:g,children:t.If(r,i("Upgrade to Build plan to unlock Product Bundle & other premium features."),i("Add a bundle discount to this product to show the offer on your page."))}),e.jsxs("div",{className:p,children:[e.jsx("button",{type:"button",onClick:m,className:h,children:t.If(r,i("Upgrade plan"),i("Set it up"))}),t.If(!r,e.jsx("button",{type:"button",onClick:j,className:C,children:i("Read guideline")}))]})]})]})]})};
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./common/classes.js"),e=require("@gem-sdk/core");exports.default=n=>{let{pageContext:a,children:o}=n,{productItemClass:r,gpProductClass:i}=t.getClass(n);return e.template`
2
2
  <gp-product
3
- gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
3
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "hasPreSelected": false, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
4
4
  class="${i}"
5
5
  >
6
6
  <script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@gem-sdk/core"),e=require("./common/classes.js");exports.default=n=>{let{pageContext:a,rawChildren:o}=n,{productItemClass:r,gpProductClass:i}=e.getClass(n);return t.template`
2
2
  <gp-product
3
- gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
3
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "hasPreSelected": false, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
4
4
  class="${i}"
5
5
  >
6
6
  <script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{getWarningPillClasses as r,getWarningCardClasses as i,getWarningIconWrapperClasses as s,getWarningTextWrapperClasses as n,getWarningTextClasses as d,getWarningActionsClasses as l,getWarningPrimaryButtonClasses as c,getWarningSecondaryButtonClasses as a}from"./common/classes.js";import{createClass as u,If as m}from"@gem-sdk/system";import{useI18nStore as p}from"@gem-sdk/core";let h=({isFreePlan:h,onPrimaryClick:g,onGuidelineClick:k})=>{let{t:f}=p(),v=u(r),N=u(i),w=u(s),B=u(n),b=u(d),x=u(l),y=u(c),C=u(a),A=e=>t=>{t.stopPropagation(),e()},D=A(g),L=A(k);return e(t,{children:[o("div",{className:v,children:m(h,f("Bundle Discount locked"),f("Bundle Discount not set up"))}),e("div",{className:N,children:[o("div",{className:w,children:e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{d:"M8.575 3.10858C9.199 1.99714 10.801 1.99714 11.425 3.10858L17.494 13.9308C18.1013 15.0128 17.3187 16.3462 16.069 16.3462H3.93098C2.68127 16.3462 1.8987 15.0128 2.50598 13.9308L8.575 3.10858Z",stroke:"#916A00",strokeWidth:"1.3"}),o("path",{d:"M10 7.5V10.8333",stroke:"#916A00",strokeWidth:"1.3",strokeLinecap:"round"}),o("circle",{cx:"10",cy:"13.3333",r:"0.833333",fill:"#916A00"})]})}),e("div",{className:B,children:[o("p",{className:b,children:m(h,f("Upgrade to Build plan to unlock Product Bundle & other premium features."),f("Add a bundle discount to this product to show the offer on your page."))}),e("div",{className:x,children:[o("button",{type:"button",onClick:D,className:y,children:m(h,f("Upgrade plan"),f("Set it up"))}),m(!h,o("button",{type:"button",onClick:L,className:C,children:f("Read guideline")}))]})]})]})]})};export{h as default};
2
+ import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{getWarningPillClasses as i,getWarningCardClasses as r,getWarningIconWrapperClasses as d,getWarningTextWrapperClasses as l,getWarningTextClasses as n,getWarningActionsClasses as s,getWarningPrimaryButtonClasses as c,getWarningSecondaryButtonClasses as a}from"./common/classes.js";import{createClass as u,If as m}from"@gem-sdk/system";import{useI18nStore as p}from"@gem-sdk/core";let h=({isFreePlan:h,onPrimaryClick:g,onGuidelineClick:k})=>{let{t:f}=p(),v=u(i),N=u(r),w=u(d),b=u(l),B=u(n),x=u(s),y=u(c),C=u(a),A=e=>t=>{t.stopPropagation(),e()},D=A(g),L=A(k);return e(t,{children:[o("div",{"data-bundle-discount-pill":!0,className:v,children:m(h,f("Bundle Discount locked"),f("Bundle Discount not set up"))}),e("div",{className:N,children:[o("div",{className:w,children:e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o("path",{d:"M8.575 3.10858C9.199 1.99714 10.801 1.99714 11.425 3.10858L17.494 13.9308C18.1013 15.0128 17.3187 16.3462 16.069 16.3462H3.93098C2.68127 16.3462 1.8987 15.0128 2.50598 13.9308L8.575 3.10858Z",stroke:"#916A00",strokeWidth:"1.3"}),o("path",{d:"M10 7.5V10.8333",stroke:"#916A00",strokeWidth:"1.3",strokeLinecap:"round"}),o("circle",{cx:"10",cy:"13.3333",r:"0.833333",fill:"#916A00"})]})}),e("div",{className:b,children:[o("p",{className:B,children:m(h,f("Upgrade to Build plan to unlock Product Bundle & other premium features."),f("Add a bundle discount to this product to show the offer on your page."))}),e("div",{className:x,children:[o("button",{type:"button",onClick:D,className:y,children:m(h,f("Upgrade plan"),f("Set it up"))}),m(!h,o("button",{type:"button",onClick:L,className:C,children:f("Read guideline")}))]})]})]})]})};export{h as default};
@@ -1,14 +1,14 @@
1
- import{getClass as t}from"./common/classes.js";import{template as n}from"@gem-sdk/core";let o=o=>{let{pageContext:e,children:a}=o,{productItemClass:r,gpProductClass:i}=t(o);return n`
1
+ import{getClass as t}from"./common/classes.js";import{template as n}from"@gem-sdk/core";let e=e=>{let{pageContext:a,children:o}=e,{productItemClass:r,gpProductClass:i}=t(e);return n`
2
2
  <gp-product
3
- gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
3
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "hasPreSelected": false, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
4
4
  class="${i}"
5
5
  >
6
- <script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(e)}}</script>
6
+ <script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
7
7
  {%- form 'product', product, id: product_form_id, class: 'form contents ${r}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
8
8
  <input type="hidden" name="id" value="{{ variant.id }}" />
9
9
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
10
10
  <button type="submit" onclick="return false;" style="display:none;"></button>
11
- ${a}
11
+ ${o}
12
12
  {%- endform -%}
13
13
  </gp-product>
14
- `};export{o as default};
14
+ `};export{e as default};
@@ -1,18 +1,18 @@
1
- import{template as t,RenderChildren as n}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let o=o=>{let{pageContext:a,rawChildren:r}=o,{productItemClass:i,gpProductClass:c}=e(o);return t`
1
+ import{template as t,RenderChildren as n}from"@gem-sdk/core";import{getClass as e}from"./common/classes.js";let a=a=>{let{pageContext:o,rawChildren:r}=a,{productItemClass:i,gpProductClass:c}=e(a);return t`
2
2
  <gp-product
3
- gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
3
+ gp-context='{"variantSelected": {{ variant | json | escape }}, "hasOnlyDefaultVariant": {{ product.has_only_default_variant }}, "hasPreSelected": false, "inventory_management": {{ variant.inventory_management | json | escape }}, "inventory_policy": {{ variant.inventory_policy | json | escape }}, "quantity": 1 ,"inventoryQuantity": {{ variant.inventory_quantity | default: 0 }}, "formId": "{{ product_form_id }}"}'
4
4
  class="${c}"
5
5
  >
6
- <script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(a)}}</script>
6
+ <script gp-data type="application/json">{"variantSelected": {{ variant | json }}, "quantity": 1, "productUrl":{{ product.url | json }}, "productHandle":{{ product.handle | json }}, "collectionUrl": {{ collection.url | json }}, "collectionHandle": {{ collection.handle | json }},"pageContext" : ${JSON.stringify(o)}}</script>
7
7
  {%- form 'product', product, id: product_form_id, class: 'form contents ${i}', data-type: 'add-to-cart-form', autocomplete: 'off' -%}
8
8
  <input type="hidden" name="id" value="{{ variant.id }}" />
9
9
  <input type="hidden" min="1" name="quantity" value="{{ quantity }}" />
10
10
  <button type="submit" onclick="return false;" style="display:none;"></button>
11
11
  ${t`
12
- ${r?.map((e,o)=>{if(e)return t`
13
- ${n({...e,index:o})}
12
+ ${r?.map((e,a)=>{if(e)return t`
13
+ ${n({...e,index:a})}
14
14
  `}).join("")}
15
15
  `}
16
16
  {%- endform -%}
17
17
  </gp-product>
18
- `};export{o as default};
18
+ `};export{a as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "24.0.0-dev.12",
3
+ "version": "24.0.0-dev.15",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -34,8 +34,8 @@
34
34
  "react-youtube": "10.1.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@gem-sdk/core": "24.0.0-dev.11",
38
- "@gem-sdk/styles": "24.0.0-dev.12",
37
+ "@gem-sdk/core": "24.0.0-dev.14",
38
+ "@gem-sdk/styles": "24.0.0-dev.13",
39
39
  "@gem-sdk/system": "24.0.0-staging.0",
40
40
  "@shopify/prettier-plugin-liquid": "^1.10.3",
41
41
  "@thedutchcoder/postcss-rem-to-px": "0.0.2",