@gem-sdk/components 17.0.0-dev.20 → 17.0.0-dev.21

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"),r=require("@gem-sdk/core"),i=require("react"),s=require("../../text/components/Text.js"),o=require("../hooks/useDynamicProduct.js"),t=require("../../../common/components/TooltipHover.js"),l=require("../helpers/product-price-breakdown/getPrice.js"),n=require("../hooks/useSubscriptionSellingType.js");exports.default=({styles:u,style:p,builderAttrs:a,builderProps:c,children:d,setting:g})=>{let m=r.useCurrentVariant(),f=r.useProduct(),{isOneTime:P}=n.useSubscriptionSellingType(),h=r.useProductStore(e=>e.selectedSellingPlan),y=r.convertDecimalToNumber(m?.price)??0,x=r.convertDecimalToNumber(m?.salePrice)??0,b=parseFloat(r.shopifyPriceRounding(r.useProductOfferDiscount(),2)),{isDynamicProduct:j}=o.useDynamicProduct(),{t:N}=r.useI18nStore(),{isEditMode:S}=r.useRenderMode(),{priceType:D,source:q}=g??{},v="compare"===D,M="offer"===D,T="price"===q,k="compare-price"===q,F=m?.sellingPlanGroups,R=f?.sellingPlanGroups,O=i.useMemo(()=>{if(!h||P)return null;let e=m?.sellingPlanGroups??f?.sellingPlanGroups??[];for(let r of e)if(r?.sellingPlans){for(let e of r.sellingPlans)if(e?.baseID===h)return e}return null},[JSON.stringify(F),JSON.stringify(R),h,P]),w=JSON.stringify(O?.pricingPolicies),G=O?.baseID,I=i.useMemo(()=>!O||y<=0||P?0:l.calculateSellingPlanDiscount({variantPrice:y,pricingPolicies:O.pricingPolicies}),[w,y,P]),J=i.useMemo(()=>{let e=M&&!P&&h&&G;if(e){let e=parseFloat(r.shopifyPriceRounding(y-I,2)),i=parseFloat(r.shopifyPriceRounding(e-b,2));return i>0?i:0}let i=parseFloat(r.shopifyPriceRounding(y-b,2));return i>0?i:0},[M,P,h,G,y,I,b]),$=i.useMemo(()=>v?T?y:x:M?J:y,[v,T,M,y,x,J]),_=r.useFormatMoney(parseFloat(r.shopifyPriceRounding(Number($)||0,2)),!1),C=f?.baseID?.replace("gid://shopify/Product/",""),H=i.useMemo(()=>v&&(!b&&x<y||k&&!x||T&&y<=0),[v,b,y,x,k,T]);return(!$&&!M||H)&&S?e.jsx(t.default,{enable:!0,text:N("Not be displayed when published"),width:"205px",position:"bottom",className:"gp-arrow-left-offset-10",children:e.jsx("div",{className:"gp-h-[28px] gp-px-1.5 gp-py-1 gp-flex gp-border gp-border-light-200 gp-items-center gp-justify-center gp-rounded-lg",style:{borderStyle:"dashed",strokeDasharray:"2,2"},children:e.jsx("span",{className:"gp-text-dark-400 gp-text-[12px] gp-leading-5",children:N("No compare price")})})}):H&&!S?null:e.jsxs("div",{...a,className:r.cls(c?.uid),style:{...p},id:`shopify-text-element-${c?.uid}`,"data-product-id":C,children:[e.jsx(s.default,{styles:u,setting:{text:j?"$???":_},className:r.cls({"gp-money":M,"gp-product-compare-price":v,"gp-line-through":v&&u?.lineThrough})}),d]})};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("@gem-sdk/core"),s=require("react"),i=require("../../text/components/Text.js"),o=require("../hooks/useDynamicProduct.js"),t=require("../../../common/components/TooltipHover.js"),l=require("../helpers/product-price-breakdown/getPrice.js"),n=require("../hooks/useSubscriptionSellingType.js");exports.default=({styles:u,style:a,builderAttrs:p,builderProps:c,children:d,setting:g})=>{let m=r.useCurrentVariant(),f=r.useProduct(),{isOneTime:y}=n.useSubscriptionSellingType(),P=r.useProductStore(e=>e.selectedSellingPlan),h=r.convertDecimalToNumber(m?.price)??0,x=r.convertDecimalToNumber(m?.salePrice)??0,b=parseFloat(r.shopifyPriceRounding(r.useProductOfferDiscount(),2)),{isDynamicProduct:j}=o.useDynamicProduct(),{t:N}=r.useI18nStore(),{isEditMode:S}=r.useRenderMode(),{quantity:D,hasUpdatePrice:M}=r.useQuantity(),{priceType:q,source:v}=g??{},T=s.useMemo(()=>M&&D||1,[D,M]),k="compare"===q,F="offer"===q,R="price"===v,O="compare-price"===v,w=m?.sellingPlanGroups,G=f?.sellingPlanGroups,I=s.useMemo(()=>{if(!P||y)return null;let e=m?.sellingPlanGroups??f?.sellingPlanGroups??[];for(let r of e)if(r?.sellingPlans){for(let e of r.sellingPlans)if(e?.baseID===P)return e}return null},[JSON.stringify(w),JSON.stringify(G),P,y]),J=JSON.stringify(I?.pricingPolicies),$=I?.baseID,_=s.useMemo(()=>!I||h<=0||y?0:l.calculateSellingPlanDiscount({variantPrice:h,pricingPolicies:I.pricingPolicies}),[J,h,y]),C=s.useMemo(()=>{let e=F&&!y&&P&&$;if(e){let e=parseFloat(r.shopifyPriceRounding(h-_,2)),s=parseFloat(r.shopifyPriceRounding(e-b,2));return s>0?s:0}let s=parseFloat(r.shopifyPriceRounding(h-b,2));return s>0?s:0},[F,y,P,$,h,_,b]),H=s.useMemo(()=>k?R?h:x:F?C:h,[k,R,F,h,x,C]),Q=s.useMemo(()=>H*T,[H,T]),V=r.useFormatMoney(parseFloat(r.shopifyPriceRounding(Number(Q)||0,2)),!1),z=f?.baseID?.replace("gid://shopify/Product/",""),A=s.useMemo(()=>k&&(!b&&x<h||O&&!x||R&&h<=0),[k,b,h,x,O,R]);return(!H&&!F||A)&&S?e.jsx(t.default,{enable:!0,text:N("Not be displayed when published"),width:"205px",position:"bottom",className:"gp-arrow-left-offset-10",children:e.jsx("div",{className:"gp-h-[28px] gp-px-1.5 gp-py-1 gp-flex gp-border gp-border-light-200 gp-items-center gp-justify-center gp-rounded-lg",style:{borderStyle:"dashed",strokeDasharray:"2,2"},children:e.jsx("span",{className:"gp-text-dark-400 gp-text-[12px] gp-leading-5",children:N("No compare price")})})}):A&&!S?null:e.jsxs("div",{...p,className:r.cls(c?.uid),style:{...a},id:`shopify-text-element-${c?.uid}`,"data-product-id":z,children:[e.jsx(i.default,{styles:u,setting:{text:j?"$???":V},className:r.cls({"gp-money":F,"gp-product-compare-price":k,"gp-line-through":k&&u?.lineThrough})}),d]})};
@@ -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("@gem-sdk/core"),t=require("../helpers/product-quantity/getClasses.js"),a=require("@gem-sdk/system"),r=require("../helpers/product-quantity/getStyles.js"),l=require("../hooks/useHandleQuantity.js");exports.default=({setting:u={},styles:n={}})=>{let{inputWidth:i,align:c}=n,{quantity:p,setQuantity:d}=s.useQuantity(),{value:o,onBlurInput:C,onChangeInput:m}=l.useHandleQuantity(p,d,u),y=s.useCurrentVariantInStock(),g=a.createClass(t.getWrapperClasses(c)),j=a.createClass(t.getContainerClasses()),h=a.createClass(t.getWrapperInputClasses()),q=a.createClass(t.getLabelClasses()),x=a.createClass(t.getInputClasses()),v=a.createStyle({...r.getWrapperStyles(i)});return e.jsx("div",{className:g,children:e.jsx("div",{className:j,style:{...v},children:e.jsxs("div",{className:h,children:[e.jsx("label",{htmlFor:"input",className:q,children:u.title||"Quantity"}),e.jsx("input",{disabled:!y,autoComplete:"off",name:"Select Option",className:x,type:"number",value:o,min:1,onBlur:C,onChange:m})]})})})};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("@gem-sdk/core"),t=require("../helpers/product-quantity/getClasses.js"),a=require("@gem-sdk/system"),r=require("../helpers/product-quantity/getStyles.js"),l=require("../hooks/useHandleQuantity.js"),u=require("react");exports.default=({setting:i={},styles:n={}})=>{let{inputWidth:c,align:p}=n,{updatePrice:d=!1}=i,{quantity:o,setQuantity:C,setUpdatePrice:m}=s.useQuantity(),{value:y,onBlurInput:g,onChangeInput:j}=l.useHandleQuantity(o,C,i),h=s.useCurrentVariantInStock(),q=a.createClass(t.getWrapperClasses(p)),x=a.createClass(t.getContainerClasses()),f=a.createClass(t.getWrapperInputClasses()),v=a.createClass(t.getLabelClasses()),b=a.createClass(t.getInputClasses()),N=a.createStyle({...r.getWrapperStyles(c)});return u.useEffect(()=>{m(d)},[d,m]),e.jsx("div",{className:q,children:e.jsx("div",{className:x,style:{...N},children:e.jsxs("div",{className:f,children:[e.jsx("label",{htmlFor:"input",className:v,children:i.title||"Quantity"}),e.jsx("input",{disabled:!h,autoComplete:"off",name:"Select Option",className:b,type:"number",value:y,min:1,onBlur:g,onChange:j})]})})})};
@@ -1 +1 @@
1
- "use strict";exports.ProductQuantitySettings=[{id:"setting",controls:[{id:"title",label:"Label title",type:"input",placeholder:"Add...",default:"Quantity",fallbackValue:"Quantity",clearButton:!1},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1,disableDecimal:!0}]},{id:"style",controls:[{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"inputWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]}]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"}]}];
1
+ "use strict";exports.ProductQuantitySettings=[{id:"setting",controls:[{id:"title",label:"Label title",type:"input",placeholder:"Add...",default:"Quantity",fallbackValue:"Quantity",clearButton:!1},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1,disableDecimal:!0},{id:"updatePrice",label:"Update price",type:"toggle",default:!0}]},{id:"style",controls:[{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"inputWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]}]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"}]}];
@@ -1 +1 @@
1
- "use strict";exports.SettingUIV2=[{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"inputWidth"},layout:"horizontal"}]},{label:"Display options",controls:[{label:"Default quantity",setting:{id:"defaultQtyValue"},layout:"horizontal"},{type:"combo",label:"Label title",iconName:"polaris-text-block",getValueFromSettingID:"title",disableClearMessage:"This label title is needed for customers <br> to adjust the product's quantity",controls:[{label:"Content",setting:{id:"title"},layout:"vertical",options:{clearButton:!1}}]}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(inputWidth) >= 100 && inputWidth?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];
1
+ "use strict";exports.SettingUIV2=[{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"inputWidth"},layout:"horizontal"}]},{label:"Display options",controls:[{label:"Default quantity",setting:{id:"defaultQtyValue"},layout:"horizontal"},{label:"Update price",setting:{id:"updatePrice"}},{type:"combo",label:"Label title",iconName:"polaris-text-block",getValueFromSettingID:"title",disableClearMessage:"This label title is needed for customers <br> to adjust the product's quantity",controls:[{label:"Content",setting:{id:"title"},layout:"vertical",options:{clearButton:!1}}]}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(inputWidth) >= 100 && inputWidth?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useCurrentVariant as t,useProduct as i,useProductStore as o,convertDecimalToNumber as l,shopifyPriceRounding as s,useProductOfferDiscount as p,useI18nStore as a,useRenderMode as n,useFormatMoney as c,cls as g}from"@gem-sdk/core";import{useMemo as m}from"react";import d from"../../text/components/Text.js";import{useDynamicProduct as u}from"../hooks/useDynamicProduct.js";import f from"../../../common/components/TooltipHover.js";import{calculateSellingPlanDiscount as h}from"../helpers/product-price-breakdown/getPrice.js";import{useSubscriptionSellingType as P}from"../hooks/useSubscriptionSellingType.js";let y=({styles:y,style:x,builderAttrs:b,builderProps:N,children:j,setting:S})=>{let k=t(),D=i(),{isOneTime:F}=P(),v=o(e=>e.selectedSellingPlan),w=l(k?.price)??0,G=l(k?.salePrice)??0,T=parseFloat(s(p(),2)),{isDynamicProduct:I}=u(),{t:J}=a(),{isEditMode:O}=n(),{priceType:$,source:H}=S??{},q="compare"===$,z="offer"===$,A="price"===H,B="compare-price"===H,C=k?.sellingPlanGroups,E=D?.sellingPlanGroups,K=m(()=>{if(!v||F)return null;let e=k?.sellingPlanGroups??D?.sellingPlanGroups??[];for(let r of e)if(r?.sellingPlans){for(let e of r.sellingPlans)if(e?.baseID===v)return e}return null},[JSON.stringify(C),JSON.stringify(E),v,F]),L=JSON.stringify(K?.pricingPolicies),M=K?.baseID,Q=m(()=>!K||w<=0||F?0:h({variantPrice:w,pricingPolicies:K.pricingPolicies}),[L,w,F]),R=m(()=>{let e=z&&!F&&v&&M;if(e){let e=parseFloat(s(w-Q,2)),r=parseFloat(s(e-T,2));return r>0?r:0}let r=parseFloat(s(w-T,2));return r>0?r:0},[z,F,v,M,w,Q,T]),U=m(()=>q?A?w:G:z?R:w,[q,A,z,w,G,R]),V=c(parseFloat(s(Number(U)||0,2)),!1),W=D?.baseID?.replace("gid://shopify/Product/",""),X=m(()=>q&&(!T&&G<w||B&&!G||A&&w<=0),[q,T,w,G,B,A]);return(!U&&!z||X)&&O?e(f,{enable:!0,text:J("Not be displayed when published"),width:"205px",position:"bottom",className:"gp-arrow-left-offset-10",children:e("div",{className:"gp-h-[28px] gp-px-1.5 gp-py-1 gp-flex gp-border gp-border-light-200 gp-items-center gp-justify-center gp-rounded-lg",style:{borderStyle:"dashed",strokeDasharray:"2,2"},children:e("span",{className:"gp-text-dark-400 gp-text-[12px] gp-leading-5",children:J("No compare price")})})}):X&&!O?null:r("div",{...b,className:g(N?.uid),style:{...x},id:`shopify-text-element-${N?.uid}`,"data-product-id":W,children:[e(d,{styles:y,setting:{text:I?"$???":V},className:g({"gp-money":z,"gp-product-compare-price":q,"gp-line-through":q&&y?.lineThrough})}),j]})};export{y as default};
2
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useCurrentVariant as t,useProduct as i,useProductStore as o,convertDecimalToNumber as l,shopifyPriceRounding as s,useProductOfferDiscount as p,useI18nStore as a,useRenderMode as n,useQuantity as c,useFormatMoney as g,cls as m}from"@gem-sdk/core";import{useMemo as d}from"react";import u from"../../text/components/Text.js";import{useDynamicProduct as f}from"../hooks/useDynamicProduct.js";import h from"../../../common/components/TooltipHover.js";import{calculateSellingPlanDiscount as P}from"../helpers/product-price-breakdown/getPrice.js";import{useSubscriptionSellingType as y}from"../hooks/useSubscriptionSellingType.js";let x=({styles:x,style:b,builderAttrs:N,builderProps:j,children:S,setting:k})=>{let D=t(),F=i(),{isOneTime:v}=y(),w=o(e=>e.selectedSellingPlan),G=l(D?.price)??0,T=l(D?.salePrice)??0,I=parseFloat(s(p(),2)),{isDynamicProduct:J}=f(),{t:O}=a(),{isEditMode:$}=n(),{quantity:H,hasUpdatePrice:q}=c(),{priceType:z,source:A}=k??{},B=d(()=>q&&H||1,[H,q]),C="compare"===z,E="offer"===z,K="price"===A,L="compare-price"===A,M=D?.sellingPlanGroups,Q=F?.sellingPlanGroups,R=d(()=>{if(!w||v)return null;let e=D?.sellingPlanGroups??F?.sellingPlanGroups??[];for(let r of e)if(r?.sellingPlans){for(let e of r.sellingPlans)if(e?.baseID===w)return e}return null},[JSON.stringify(M),JSON.stringify(Q),w,v]),U=JSON.stringify(R?.pricingPolicies),V=R?.baseID,W=d(()=>!R||G<=0||v?0:P({variantPrice:G,pricingPolicies:R.pricingPolicies}),[U,G,v]),X=d(()=>{let e=E&&!v&&w&&V;if(e){let e=parseFloat(s(G-W,2)),r=parseFloat(s(e-I,2));return r>0?r:0}let r=parseFloat(s(G-I,2));return r>0?r:0},[E,v,w,V,G,W,I]),Y=d(()=>C?K?G:T:E?X:G,[C,K,E,G,T,X]),Z=d(()=>Y*B,[Y,B]),_=g(parseFloat(s(Number(Z)||0,2)),!1),ee=F?.baseID?.replace("gid://shopify/Product/",""),er=d(()=>C&&(!I&&T<G||L&&!T||K&&G<=0),[C,I,G,T,L,K]);return(!Y&&!E||er)&&$?e(h,{enable:!0,text:O("Not be displayed when published"),width:"205px",position:"bottom",className:"gp-arrow-left-offset-10",children:e("div",{className:"gp-h-[28px] gp-px-1.5 gp-py-1 gp-flex gp-border gp-border-light-200 gp-items-center gp-justify-center gp-rounded-lg",style:{borderStyle:"dashed",strokeDasharray:"2,2"},children:e("span",{className:"gp-text-dark-400 gp-text-[12px] gp-leading-5",children:O("No compare price")})})}):er&&!$?null:r("div",{...N,className:m(j?.uid),style:{...b},id:`shopify-text-element-${j?.uid}`,"data-product-id":ee,children:[e(u,{styles:x,setting:{text:J?"$???":_},className:m({"gp-money":E,"gp-product-compare-price":C,"gp-line-through":C&&x?.lineThrough})}),S]})};export{x as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useQuantity as r,useCurrentVariantInStock as s}from"@gem-sdk/core";import{getWrapperClasses as a,getContainerClasses as l,getWrapperInputClasses as o,getLabelClasses as m,getInputClasses as i}from"../helpers/product-quantity/getClasses.js";import{createClass as n,createStyle as u}from"@gem-sdk/system";import{getWrapperStyles as c}from"../helpers/product-quantity/getStyles.js";import{useHandleQuantity as d}from"../hooks/useHandleQuantity.js";let p=({setting:p={},styles:h={}})=>{let{inputWidth:f,align:y}=h,{quantity:g,setQuantity:N}=r(),{value:j,onBlurInput:v,onChangeInput:b}=d(g,N,p),k=s(),C=n(a(y)),P=n(l()),Q=n(o()),q=n(m()),x=n(i()),S=u({...c(f)});return e("div",{className:C,children:e("div",{className:P,style:{...S},children:t("div",{className:Q,children:[e("label",{htmlFor:"input",className:q,children:p.title||"Quantity"}),e("input",{disabled:!k,autoComplete:"off",name:"Select Option",className:x,type:"number",value:j,min:1,onBlur:v,onChange:b})]})})})};export{p as default};
2
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useQuantity as r,useCurrentVariantInStock as s}from"@gem-sdk/core";import{getWrapperClasses as o,getContainerClasses as a,getWrapperInputClasses as m,getLabelClasses as l,getInputClasses as i}from"../helpers/product-quantity/getClasses.js";import{createClass as n,createStyle as u}from"@gem-sdk/system";import{getWrapperStyles as c}from"../helpers/product-quantity/getStyles.js";import{useHandleQuantity as p}from"../hooks/useHandleQuantity.js";import{useEffect as d}from"react";let f=({setting:f={},styles:h={}})=>{let{inputWidth:y,align:g}=h,{updatePrice:N=!1}=f,{quantity:j,setQuantity:v,setUpdatePrice:b}=r(),{value:k,onBlurInput:C,onChangeInput:P}=p(j,v,f),Q=s(),q=n(o(g)),x=n(a()),S=n(m()),B=n(l()),F=n(i()),H=u({...c(y)});return d(()=>{b(N)},[N,b]),e("div",{className:q,children:e("div",{className:x,style:{...H},children:t("div",{className:S,children:[e("label",{htmlFor:"input",className:B,children:f.title||"Quantity"}),e("input",{disabled:!Q,autoComplete:"off",name:"Select Option",className:F,type:"number",value:k,min:1,onBlur:C,onChange:P})]})})})};export{f as default};
@@ -1 +1 @@
1
- let t=[{id:"setting",controls:[{id:"title",label:"Label title",type:"input",placeholder:"Add...",default:"Quantity",fallbackValue:"Quantity",clearButton:!1},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1,disableDecimal:!0}]},{id:"style",controls:[{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"inputWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]}]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"}]}];export{t as ProductQuantitySettings};
1
+ let e=[{id:"setting",controls:[{id:"title",label:"Label title",type:"input",placeholder:"Add...",default:"Quantity",fallbackValue:"Quantity",clearButton:!1},{id:"defaultQtyValue",label:"Text",type:"input:stepper",min:1,default:1,disableDecimal:!0},{id:"updatePrice",label:"Update price",type:"toggle",default:!0}]},{id:"style",controls:[{id:"dimensions",type:"group",label:"Dimensions",controls:[{id:"fullWidth",label:"Full Width",type:"toggle",devices:{desktop:{default:!1}}},{id:"inputWidth",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]}]},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"start",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"end",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"start"}]}];export{e as ProductQuantitySettings};
@@ -1 +1 @@
1
- let t=[{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"inputWidth"},layout:"horizontal"}]},{label:"Display options",controls:[{label:"Default quantity",setting:{id:"defaultQtyValue"},layout:"horizontal"},{type:"combo",label:"Label title",iconName:"polaris-text-block",getValueFromSettingID:"title",disableClearMessage:"This label title is needed for customers <br> to adjust the product's quantity",controls:[{label:"Content",setting:{id:"title"},layout:"vertical",options:{clearButton:!1}}]}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(inputWidth) >= 100 && inputWidth?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];export{t as SettingUIV2};
1
+ let t=[{label:"Size",controls:[{type:"control",label:"Width",setting:{id:"inputWidth"},layout:"horizontal"}]},{label:"Display options",controls:[{label:"Default quantity",setting:{id:"defaultQtyValue"},layout:"horizontal"},{label:"Update price",setting:{id:"updatePrice"}},{type:"combo",label:"Label title",iconName:"polaris-text-block",getValueFromSettingID:"title",disableClearMessage:"This label title is needed for customers <br> to adjust the product's quantity",controls:[{label:"Content",setting:{id:"title"},layout:"vertical",options:{clearButton:!1}}]}]},{controls:[{type:"control",label:"Align",setting:{id:"align"},conditionEnable:'!(parseInt(inputWidth) >= 100 && inputWidth?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];export{t as SettingUIV2};
@@ -2832,6 +2832,7 @@ declare const PostPurchaseProductVariants: React.FC<PostPurchaseProductVariantsP
2832
2832
  type PostPurchaseProductQuantitySettingProps = {
2833
2833
  title?: string;
2834
2834
  defaultQtyValue?: number;
2835
+ updatePrice?: boolean;
2835
2836
  };
2836
2837
  type PostPurchaseProductQuantityStyleProps = {
2837
2838
  fullWidth?: ObjectDevices<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "17.0.0-dev.20",
3
+ "version": "17.0.0-dev.21",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",