@gem-sdk/components 12.0.0-dev.45 → 12.0.0-dev.47
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.
- package/dist/cjs/estimate-delivery/common/styles.js +1 -1
- package/dist/cjs/estimate-delivery/components/EstimateDate.js +1 -1
- package/dist/cjs/estimate-delivery/components/EstimateDate.liquid.js +2 -2
- package/dist/cjs/post-purchase/buyer-consent/common/classes.js +1 -1
- package/dist/cjs/post-purchase/buyer-consent/common/styles.js +1 -1
- package/dist/cjs/post-purchase/buyer-consent/components/BuyerConsent.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/common/attrs.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-subscription/common/classes.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-subscription/hooks/useSellingSubscription.js +1 -1
- package/dist/cjs/post-purchase/product/helpers/product-price-breakdown/getPrice.js +1 -0
- package/dist/cjs/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useProductPriceBreakdown.js +1 -0
- package/dist/cjs/post-purchase/product/hooks/useRecurringSubtotal.js +1 -0
- package/dist/cjs/post-purchase/product/index.js +1 -1
- package/dist/esm/estimate-delivery/common/styles.js +1 -1
- package/dist/esm/estimate-delivery/components/EstimateDate.js +1 -1
- package/dist/esm/estimate-delivery/components/EstimateDate.liquid.js +3 -3
- package/dist/esm/post-purchase/buyer-consent/common/classes.js +1 -1
- package/dist/esm/post-purchase/buyer-consent/common/styles.js +1 -1
- package/dist/esm/post-purchase/buyer-consent/components/BuyerConsent.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/common/attrs.js +1 -1
- package/dist/esm/post-purchase/product/components/product-subscription/common/classes.js +1 -1
- package/dist/esm/post-purchase/product/components/product-subscription/hooks/useSellingSubscription.js +1 -1
- package/dist/esm/post-purchase/product/helpers/product-price-breakdown/getPrice.js +1 -0
- package/dist/esm/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useProductPriceBreakdown.js +1 -0
- package/dist/esm/post-purchase/product/hooks/useRecurringSubtotal.js +1 -0
- package/dist/esm/post-purchase/product/index.js +1 -1
- package/dist/types/index.d.ts +10 -33
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const getStyleEstimateDate=(t,e)=>({align:t?.align,typo:t?.[e]});exports.getStyleEstimateDate=getStyleEstimateDate;
|
|
1
|
+
"use strict";const getStyleEstimateDate=(t,e)=>({align:t?.align,typo:t?.[e]}),getTextStyles=t=>({hasTextShadowNotState:t?.hasTextShadowNotState,typography:t?.typography,typo:t?.typo,textAlign:t?.textAlign,lineClamp:t?.lineClamp,hasLineClamp:t?.hasLineClamp,hasTextShadow:t?.hasTextShadow,textShadow:t?.textShadow,align:t?.align});exports.getStyleEstimateDate=getStyleEstimateDate,exports.getTextStyles=getTextStyles;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),system=require("@gem-sdk/system"),Text=require("../../text/components/Text.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js");const EstimateDate=({setting:e,styles:s,builderAttrs:t,style:r,builderProps:a,advanced:l,children:c})=>{let i=system.createClass({"estimate-date-container":!0}),
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),system=require("@gem-sdk/system"),Text=require("../../text/components/Text.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js"),styles=require("../common/styles.js");const EstimateDate=({setting:e,styles:s,builderAttrs:t,style:r,builderProps:a,advanced:l,children:c})=>{let i=system.createClass({"estimate-date-container":!0}),m=classes.getClassAdvanced({setting:e,advanced:l,type:"React"}),n=helpers.getNewSetting({type:"React",styles:s,setting:e,builderProps:a});return jsxRuntime.jsx(Text.default,{builderProps:a,builderAttrs:t,advanced:{...l,cssClass:m},style:r,styles:styles.getTextStyles(s),setting:n,className:i,children:c})};exports.default=EstimateDate;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers$1=require("../../helpers.js"),system=require("@gem-sdk/system"),Text_liquid=require("../../text/components/Text.liquid.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js");const EstimateDate=({setting:e={},styles:s,builderAttrs:t,style:r,builderProps:a,advanced:i,isText:l,pageContext:c})=>{let d=system.createClass({"estimate-date-container":!0}),o=classes.getClassAdvanced({setting:e,advanced:i,type:"Liquid"}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers$1=require("../../helpers.js"),system=require("@gem-sdk/system"),Text_liquid=require("../../text/components/Text.liquid.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js"),styles=require("../common/styles.js");const EstimateDate=({setting:e={},styles:s,builderAttrs:t,style:r,builderProps:a,advanced:i,isText:l,pageContext:c})=>{let d=system.createClass({"estimate-date-container":!0}),o=classes.getClassAdvanced({setting:e,advanced:i,type:"Liquid"}),n=helpers.getNewSetting({type:"Liquid",styles:s,setting:e,builderProps:a,pageContext:c});return core.template`
|
|
2
2
|
<gp-estimate-date>
|
|
3
|
-
${Text_liquid.default({builderProps:a,builderAttrs:t,advanced:{...i,cssClass:o},style:r,styles:s,setting:
|
|
3
|
+
${Text_liquid.default({builderProps:a,builderAttrs:t,advanced:{...i,cssClass:o},style:r,styles:styles.getTextStyles(s),setting:n,className:d,isText:l,pageContext:c,elementAttrs:{"setting-estimate-date":encodeURIComponent(JSON.stringify(e))},isForceValue:!0})}
|
|
4
4
|
</gp-estimate-date>
|
|
5
5
|
${core.RenderIf(core.isLocalEnv,`<script ${helpers$1.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-estimate-date-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${helpers$1.getSettingPreloadData('class="gps-link" delay',"src")}="${core.baseAssetURL}/assets-v2/gp-estimate-date-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
6
6
|
`};exports.default=EstimateDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helper=require("../../common/helper.js");const composeClasses=e=>core.filterTruthyStyles(e),getWrapperClassName=({align:e,uid:s})=>{let t={"gp-flex gp-items-center":!0,"gp-justify-center":"center"===e,"gp-justify-end":"right"===e,"gp-justify-start":"right"!==e&&"center"!==e};return s&&(t[s]=!!s),composeClasses(t)},getCheckboxContainerClassName=()=>({"gp-
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helper=require("../../common/helper.js");const composeClasses=e=>core.filterTruthyStyles(e),getWrapperClassName=({align:e,uid:s})=>{let t={"gp-flex gp-items-center":!0,"gp-justify-center":"center"===e,"gp-justify-end":"right"===e,"gp-justify-start":"right"!==e&&"center"!==e};return s&&(t[s]=!!s),composeClasses(t)},getCheckboxContainerClassName=()=>({"gp-grid gp-items-start gp-leading-[1.3]":!0}),getCheckboxClassName=()=>composeClasses({"gp-h-[18px] gp-w-[18px] gp-inline-block gp-static gp-flex-shrink-0":!0}),getLinkComponentClassName=()=>({"gp-underline":!0}),getLinkComponentStyles=()=>({color:helper.postPurchaseTextColor.defaultLink});exports.getCheckboxClassName=getCheckboxClassName,exports.getCheckboxContainerClassName=getCheckboxContainerClassName,exports.getLinkComponentClassName=getLinkComponentClassName,exports.getLinkComponentStyles=getLinkComponentStyles,exports.getWrapperClassName=getWrapperClassName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helper=require("../../common/helper.js");const composeStyles=e=>core.filterTruthyStyles(e),getWrapperStyles=({styles:e})=>{let{globalSize:t}=e??{},r=core.makeGlobalSize(t);return composeStyles({...r?.width?.["--w"]?r.width:{"--w":"100%"},...r.padding,"--ta":e?.textAlign})},getContainerStyles=({styles:e})=>
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),helper=require("../../common/helper.js");const SHOPIFY_CHECKBOX_GAP_FALLBACK="9px",composeStyles=e=>core.filterTruthyStyles(e),getWrapperStyles=({styles:e})=>{let{globalSize:t}=e??{},r=core.makeGlobalSize(t);return composeStyles({...r?.width?.["--w"]?r.width:{"--w":"100%"},...r.padding,"--ta":e?.textAlign})},getContainerStyles=({styles:e})=>{let{horizontalSpacing:t}=e??{},r=t??"9px";return{"--w":e?.width,justifyContent:"start",alignItems:"start",gridTemplate:`"checkbox gap label" auto / auto ${r} auto`}},getCheckboxInputStyles=()=>({appearance:"auto",maxWidth:"none",gridArea:"checkbox"}),getTextStyle=({styles:e})=>{let{typo:t}=e??{},r={display:"block",maxWidth:"100%",gridArea:"label",overflowWrap:"break-word"};if(!t)return core.filterTruthyStyles({...r});let o={"text-transform":t.textTransform,color:helper.makeTextColor(t.textColor,t.fontWeight),"font-weight":helper.makeFontWeight(t.fontWeight),"font-size":helper.makeFontSize(t.fontSize)};return core.filterTruthyStyles({...r,...o})};exports.getCheckboxInputStyles=getCheckboxInputStyles,exports.getContainerStyles=getContainerStyles,exports.getTextStyle=getTextStyle,exports.getWrapperStyles=getWrapperStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),system=require("@gem-sdk/system"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),helpers$1=require("../common/helpers.js"),core=require("@gem-sdk/core"),helpers=require("../../../helpers.js");const DEFAULT_PRE_CHECK_VALUE=!0,COMPONENT_ID_PREFIX="buyer-consent-product",BuyerConsent=({styles:e,builderProps:s,setting:t})=>{let r=core.useProduct(),l=core.usePageStore(e=>e.buyerConsentPreCheck),c=core.useProductStore(e=>e.isAgreeBuyWithSubscription),a=core.useProductStore(e=>e.setIsAgreeBuyWithSubscription),{description:o,policyLabel:n,policyLink:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),system=require("@gem-sdk/system"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),helpers$1=require("../common/helpers.js"),core=require("@gem-sdk/core"),helpers=require("../../../helpers.js");const DEFAULT_PRE_CHECK_VALUE=!0,COMPONENT_ID_PREFIX="buyer-consent-product",BuyerConsent=({styles:e,builderProps:s,setting:t})=>{let r=core.useProduct(),l=core.usePageStore(e=>e.buyerConsentPreCheck),c=core.useProductStore(e=>e.isAgreeBuyWithSubscription),a=core.useProductStore(e=>e.setIsAgreeBuyWithSubscription),{description:o,policyLabel:n,policyLink:i,align:u}=t??{},y=r?.id?`buyer-consent-product-${r.id}`:void 0,m=helpers$1.getComponentTag(i),d=system.createStyle(styles.getWrapperStyles({styles:e})),C=system.createClass(classes.getWrapperClassName({align:u,uid:s?.uid})),p=system.createStyle(styles.getContainerStyles({styles:e})),h=system.createClass(classes.getCheckboxContainerClassName()),x=system.createStyle(styles.getCheckboxInputStyles()),g=system.createStyle(styles.getTextStyle({styles:e})),j=system.createClass(classes.getCheckboxClassName()),b=system.createClass(classes.getLinkComponentClassName()),S=system.createStyle(classes.getLinkComponentStyles()),k=React.useMemo(()=>{let e=helpers.extractProductID(r?.baseID??"");return l?.[e]??!0},[l,r?.baseID]),R=e=>{a(e.target.checked)};return React.useEffect(()=>{a(k)},[a,k]),jsxRuntime.jsx("div",{"data-id":s?.uid,style:d,className:C,children:jsxRuntime.jsxs("label",{htmlFor:y,dir:e?.direction??"ltr",style:p,className:h,children:[jsxRuntime.jsx("input",{id:y,name:y,type:"checkbox",style:x,className:j,checked:c,onChange:R}),jsxRuntime.jsxs("bdo",{dir:e?.direction??"ltr",style:g,children:[o," ",jsxRuntime.jsx(m,{target:"_blank",rel:"noreferrer",href:i,className:b,style:S,children:n})]})]})})};exports.default=BuyerConsent;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),Text=require("../../text/components/Text.js"),useDynamicProduct=require("../hooks/useDynamicProduct.js"),TooltipHover=require("../../../common/components/TooltipHover.js");const PostPurchaseProductPrice=({styles:e,style:r,builderAttrs:o,builderProps:t,children:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),React=require("react"),Text=require("../../text/components/Text.js"),useDynamicProduct=require("../hooks/useDynamicProduct.js"),TooltipHover=require("../../../common/components/TooltipHover.js"),getPrice=require("../helpers/product-price-breakdown/getPrice.js");const PostPurchaseProductPrice=({styles:e,style:r,builderAttrs:o,builderProps:t,children:i,setting:s})=>{let c=core.useCurrentVariant(),n=core.useProduct(),l=core.useProductStore(e=>e.selectedSellingPlan),u=core.convertDecimalToNumber(c?.price)??0,a=core.convertDecimalToNumber(c?.salePrice)??0,p=parseFloat(core.shopifyPriceRounding(core.useProductOfferDiscount(),2)),{isDynamicProduct:d}=useDynamicProduct.useDynamicProduct(),{t:g}=core.useI18nStore(),{isEditMode:m}=core.useRenderMode(),{priceType:P,source:f}=s??{},x="compare"===P,h="offer"===P,y="price"===f,j="compare-price"===f,R=c?.sellingPlanGroups,b=n?.sellingPlanGroups,N=React.useMemo(()=>{if(!l)return null;let e=c?.sellingPlanGroups??n?.sellingPlanGroups??[];for(let r of e)if(r?.sellingPlans){for(let e of r.sellingPlans)if(e?.baseID===l)return e}return null},[JSON.stringify(R),JSON.stringify(b),l]),D=JSON.stringify(N?.pricingPolicies),v=N?.baseID,T=React.useMemo(()=>!N||u<=0?0:getPrice.calculateSellingPlanDiscount({variantPrice:u,pricingPolicies:N.pricingPolicies}),[D,u]),M=React.useMemo(()=>{if(h&&l&&v){let e=parseFloat(core.shopifyPriceRounding(u-T,2)),r=parseFloat(core.shopifyPriceRounding(e-p,2));return r>0?r:0}let e=parseFloat(core.shopifyPriceRounding(u-p,2));return e>0?e:0},[h,l,v,u,T,p]),S=React.useMemo(()=>x?y?u:a:h?M:u,[x,y,h,u,a,M]),q=core.useFormatMoney(parseFloat(core.shopifyPriceRounding(Number(S)||0,2)),!1),F=n?.baseID?.replace("gid://shopify/Product/",""),k=React.useMemo(()=>x&&(!p&&a<u||j&&!a||y&&u<=0),[x,p,u,a,j,y]);return(!S&&!h||k)&&m?jsxRuntime.jsx(TooltipHover.default,{enable:!0,text:"Not be displayed when published",width:"205px",position:"bottom",className:"gp-arrow-left-offset-10",children:jsxRuntime.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:jsxRuntime.jsx("span",{className:"gp-text-dark-400 gp-text-[12px] gp-leading-5",children:g("No compare price")})})}):k&&!m?null:jsxRuntime.jsxs("div",{...o,className:core.cls(t?.uid),style:{...r},id:`shopify-text-element-${t?.uid}`,"data-product-id":F,children:[jsxRuntime.jsx(Text.default,{styles:e,setting:{text:d?"$???":q},className:core.cls({"gp-money":h,"gp-product-compare-price":x,"gp-line-through":x&&e?.lineThrough})}),i]})};exports.default=PostPurchaseProductPrice;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const getProductOfferAttrs=(t,o)=>({"data-uid":o||"","data-component-type":"component","data-component-tag":"Product","data-component-label":"Product","data-component-no-setting":!0,"data-product-id":t?.baseID?.replace("gid://shopify/Product/","")||""});exports.getProductOfferAttrs=getProductOfferAttrs;
|
|
1
|
+
"use strict";const getProductOfferAttrs=(t,o)=>({"data-uid":o||"","data-component-type":"component","data-component-tag":"Product","data-component-label":"Product","data-component-no-setting":!0,"data-product-id":t?.baseID?.replace("gid://shopify/Product/","")||"","data-product-gp-id":t?.id||""});exports.getProductOfferAttrs=getProductOfferAttrs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const getWrapperClasses=()=>core.composeClasses("gp-flex gp-gap-x-[10px] gap-[10px]"),getContainerClasses=()=>core.composeClasses("gp-flex gp-flex-col"),getSellingPlanRadioContainerClasses=()=>core.composeClasses("gp-relative gp-flex gp-flex-col"),getSellingPlanRadioLabelClasses=()=>core.composeClasses("gp-
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const getWrapperClasses=()=>core.composeClasses("gp-flex gp-gap-x-[10px] gap-[10px]"),getContainerClasses=()=>core.composeClasses("gp-flex gp-flex-col"),getSellingPlanRadioContainerClasses=()=>core.composeClasses("gp-relative gp-flex gp-flex-col"),getSellingPlanRadioLabelClasses=()=>core.composeClasses("gp-text-xs gp-leading-[1.3]"),getSellingPlanRadioOptionsClasses=()=>core.composeClasses("gp-flex gp-flex-col"),getSellingPlanRadioOptionTextClasses=()=>core.composeClasses("gp-text-[14px] gp-leading-[1.3] gp-text-text-light-500"),getSubscriptionRadioLabelClasses=e=>{let s=e?"gp-opacity-50 gp-cursor-not-allowed":"";return core.composeClasses(`gp-flex gp-items-center gp-cursor-pointer gp-gap-2 ${s}`.trim())},getSubscriptionRadioInputClasses=()=>core.composeClasses("gp-relative gp-min-h-[18px] gp-min-w-[18px] gp-mt-[3px] gp-w-4 gp-h-4 gp-cursor-pointer gp-appearance-none gp-rounded-full gp-bg-light-100 gp-transition-all gp-border-light-500 gp-border-2 checked:gp-border-[#1879b9] checked:gp-border-[6px] checked:gp-after:gp-content-[''] checked:gp-after:gp-absolute checked:gp-after:gp-top-1/2 checked:gp-after:gp-left-1/2 checked:gp-after:gp-transform checked:gp-after:gp--translate-x-1/2 checked:gp-after:gp--translate-y-1/2 checked:gp-after:gp-h-2 checked:gp-after:gp-w-2 checked:gp-after:gp-rounded-full checked:gp-after:gp-bg-white disabled:gp-cursor-not-allowed"),getSellingPlanDropdownContainerClasses=()=>core.composeClasses("gp-relative"),getSellingPlanDropdownLabelClasses=()=>core.composeClasses("!gp-max-w-[calc(100%_-_66px)] gp-absolute gp-left-[12px] gp-top-[6px] gp-p-0 gp-text-xs gp-leading-[1.3] gp-text-[#737373] gp-transition-[top]"),getSellingPlanDropdownLabelSpanClasses=()=>core.composeClasses("gp-max-w-full"),getSellingPlanDropdownLabelInnerSpanClasses=()=>core.composeClasses("gp-block gp-overflow-hidden"),getSellingPlanDropdownSelectClasses=({isNoLabel:e=!1})=>core.composeClasses(`gp-min-h-[47px] gp-appearance-none gp-bg-transparent gp-w-full gp-whitespace-nowrap gp-rounded-[5px] gp-border gp-border-[#d9d9d9] gp-pl-[11px] gp-pr-[40px] gp-text-[14px] gp-outline-none gp-text-[#545454] gp-leading-[1.3] ${e?"gp-pt-0 gp-pb-0":"gp-pt-[21px] gp-pb-[6px]"}`),getSellingPlanDropdownOptionClasses=()=>core.composeClasses("gp-text-[14px] gp-text-black"),getSellingPlanDropdownIconContainerClasses=()=>core.composeClasses("gp-pointer-events-none gp-absolute gp-right-[2px] gp-top-[50%] gp-flex gp-h-[43%] gp-w-[40px] gp-translate-y-[-50%] gp-items-center gp-justify-center gp-border-l-[1px] gp-bg-white gp-border-[#545454]"),getSellingPlanDropdownIconClasses=()=>core.composeClasses("gp-h-[10px] gp-w-[10px]");exports.getContainerClasses=getContainerClasses,exports.getSellingPlanDropdownContainerClasses=getSellingPlanDropdownContainerClasses,exports.getSellingPlanDropdownIconClasses=getSellingPlanDropdownIconClasses,exports.getSellingPlanDropdownIconContainerClasses=getSellingPlanDropdownIconContainerClasses,exports.getSellingPlanDropdownLabelClasses=getSellingPlanDropdownLabelClasses,exports.getSellingPlanDropdownLabelInnerSpanClasses=getSellingPlanDropdownLabelInnerSpanClasses,exports.getSellingPlanDropdownLabelSpanClasses=getSellingPlanDropdownLabelSpanClasses,exports.getSellingPlanDropdownOptionClasses=getSellingPlanDropdownOptionClasses,exports.getSellingPlanDropdownSelectClasses=getSellingPlanDropdownSelectClasses,exports.getSellingPlanRadioContainerClasses=getSellingPlanRadioContainerClasses,exports.getSellingPlanRadioLabelClasses=getSellingPlanRadioLabelClasses,exports.getSellingPlanRadioOptionTextClasses=getSellingPlanRadioOptionTextClasses,exports.getSellingPlanRadioOptionsClasses=getSellingPlanRadioOptionsClasses,exports.getSubscriptionRadioInputClasses=getSubscriptionRadioInputClasses,exports.getSubscriptionRadioLabelClasses=getSubscriptionRadioLabelClasses,exports.getWrapperClasses=getWrapperClasses;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var React=require("react"),core=require("@gem-sdk/core"),extractSellingPlanSettings=require("../common/extractSellingPlanSettings.js"),findMatchedGroup=require("../helpers/findMatchedGroup.js"),findDefaultValue=require("../helpers/findDefaultValue.js"),findVariantByOptions=require("../helpers/findVariantByOptions.js");const useSellingSubscription=e=>{let t=core.useProduct(),n=core.useVariants(),{selectedOptions:l}=core.useSelectedOption(),r=core.useProductStore(e=>e.selectedSellingPlan),i=core.useProductStore(e=>e.setSelectedSellingPlan),a=core.usePageStore(e=>e.sellingPlanMeta),
|
|
1
|
+
"use strict";var React=require("react"),core=require("@gem-sdk/core"),extractSellingPlanSettings=require("../common/extractSellingPlanSettings.js"),findMatchedGroup=require("../helpers/findMatchedGroup.js"),findDefaultValue=require("../helpers/findDefaultValue.js"),findVariantByOptions=require("../helpers/findVariantByOptions.js");const useSellingSubscription=e=>{let t=core.useProduct(),n=core.useVariants(),{selectedOptions:l}=core.useSelectedOption(),r=core.useProductStore(e=>e.selectedSellingPlan),i=core.useProductStore(e=>e.setSelectedSellingPlan),a=core.usePageStore(e=>e.sellingPlanMeta),u=core.useEditorMode(),s=React.useRef(!1),o=React.useRef(void 0);React.useEffect(()=>{if(!s.current&&u===core.RenderModeEnv.EDIT&&!a){let e=new CustomEvent("element-subscription-mount");globalThis.dispatchEvent(e),s.current=!0}},[u,a]);let c=a??e?.sellingPlans,d=React.useMemo(()=>{if(!c)return{sourceApp:void 0,group:void 0,defaultOptions:void 0};let e=null;return a&&l&&(e=findVariantByOptions.findVariantByOptions({variants:n,selectedOptions:l})),extractSellingPlanSettings.extractSellingPlanSettings({sellingPlansSetting:c,currentVariant:e,product:t,isFromEvent:!!a})},[c,a,n,l,t]),f=React.useMemo(()=>l?findVariantByOptions.findVariantByOptions({variants:n,selectedOptions:l}):null,[l,n]);React.useEffect(()=>{o.current=void 0},[f?.baseID]);let{sellingPlans:p,defaultValue:g}=React.useMemo(()=>{let e=f?.sellingPlanGroups??t?.sellingPlanGroups??[];if(!e||0===e.length)return{sellingPlans:[],defaultValue:void 0};let n=findMatchedGroup.findMatchedGroup({sellingPlanGroups:e,extractedSettings:d,currentVariant:f}),l=n?.sellingPlans?.filter(e=>null!=e)??[],r=l.map(e=>({label:e.name||"",value:e.baseID})),i=findDefaultValue.findDefaultValue({validPlans:l,extractedSettings:d,currentVariant:f,plans:r});return{sellingPlans:r,defaultValue:i}},[t,f,d]);return React.useEffect(()=>{!r&&g&&o.current!==g&&(o.current=g,i(g))},[g,r,i]),{sellingPlans:p,defaultValue:g,selectedSellingPlan:r,setSelectedSellingPlan:i}};exports.useSellingSubscription=useSellingSubscription;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var types=require("../../components/product-subscription/types.js");const findPolicyWithoutAfterCycle=({policies:e})=>{let t=e.filter(e=>null!=e);if(0===t.length)return null;let l=t.find(e=>{let t=e?.AfterCycle??e.afterCycle;return!t});return l??t[0]??null},parseAmount=({value:e})=>{if(!e)return 0;let t=parseFloat(e);return isNaN(t)||t<=0?0:t},calculatePercentageDiscount=({variantPrice:e,percentage:t})=>isNaN(t)||t<=0?0:e*t/100,calculateFixedAmountDiscount=({amount:e})=>parseAmount({value:e}),calculatePriceDiscount=({variantPrice:e,fixedPrice:t})=>{let l=parseAmount({value:t});return l<=0?0:e-l},calculateSellingPlanDiscount=({variantPrice:e,pricingPolicies:t})=>{if(!t||0===t.length)return 0;let l=t.filter(e=>null!=e);if(0===l.length)return 0;let r=findPolicyWithoutAfterCycle({policies:l});if(!r)return 0;let n=r.AdjustmentType??r.adjustmentType,u=r.AdjustmentValue??r.adjustmentValue;return n&&u?n===types.AdjustmentType.FIXED_AMOUNT&&u.amount?calculateFixedAmountDiscount({amount:u.amount}):n===types.AdjustmentType.PERCENTAGE&&void 0!==u.percentage?calculatePercentageDiscount({variantPrice:e,percentage:u.percentage}):n===types.AdjustmentType.PRICE&&u.amount?calculatePriceDiscount({variantPrice:e,fixedPrice:u.amount}):0:0},calculateFixedAmountPrice=({variantPrice:e,amount:t})=>{let l=parseAmount({value:t});return l<=0?e:e-l},calculatePercentagePrice=({variantPrice:e,percentage:t})=>isNaN(t)||t<=0?e:e-e*t/100,calculateFixedPrice=({fixedPrice:e})=>parseAmount({value:e}),calculateRecurringPrice=({variantPrice:e,pricingPolicies:t})=>{if(!t||0===t.length)return e;let l=t.filter(e=>null!=e);if(0===l.length)return e;let r=findPolicyWithoutAfterCycle({policies:l});if(!r)return e;let n=r.AdjustmentType??r.adjustmentType,u=r.AdjustmentValue??r.adjustmentValue;return n&&u?n===types.AdjustmentType.FIXED_AMOUNT&&u.amount?calculateFixedAmountPrice({variantPrice:e,amount:u.amount}):n===types.AdjustmentType.PERCENTAGE&&void 0!==u.percentage?calculatePercentagePrice({variantPrice:e,percentage:u.percentage}):n===types.AdjustmentType.PRICE&&u.amount?calculateFixedPrice({fixedPrice:u.amount}):e:e},getIntervalText=({interval:e,intervalCount:t})=>{let l={DAY:{singular:"day",plural:"days"},WEEK:{singular:"week",plural:"weeks"},MONTH:{singular:"month",plural:"months"},YEAR:{singular:"year",plural:"years"}}[e];if(!l){let l=e.toLowerCase();return 1===t?`every ${l}`:`every ${t} ${l}`}let r=1===t?l.singular:l.plural;return 1===t?`every ${r}`:`every ${t} ${r}`},formatInterval=({billingPolicy:e})=>{if(!e)return"";let t=e.interval?.toUpperCase();if(!t)return"";let l=e.intervalCount??1;return getIntervalText({interval:t,intervalCount:l})};exports.calculateRecurringPrice=calculateRecurringPrice,exports.calculateSellingPlanDiscount=calculateSellingPlanDiscount,exports.findPolicyWithoutAfterCycle=findPolicyWithoutAfterCycle,exports.formatInterval=formatInterval;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),useDynamicProduct=require("./useDynamicProduct.js");const useGetMoneyLines=(e,t)=>{let{isDynamicProduct:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),useDynamicProduct=require("./useDynamicProduct.js"),useRecurringSubtotal=require("./useRecurringSubtotal.js"),useProductPriceBreakdown=require("./useProductPriceBreakdown.js");const useGetMoneyLines=(e,t)=>{let{isDynamicProduct:u,dynamicPrice:i,dynamicDiscount:o,isEnableDynamicDiscount:s}=useDynamicProduct.useDynamicProduct(),{t:r}=core.useI18nStore(),a=useRecurringSubtotal.useRecurringSubtotal(),{subTotalMoneyFormatted:l,offerDiscountTotal:n,discountMoneyFormatted:c,totalMoneyFormatted:b}=useProductPriceBreakdown.useProductPriceBreakdown(),d=()=>{let d=[];return!1!==e.isShowSubTotalLabel&&d.push({title:t.subTotalLabel,money:u?i:l,uniqueId:"subTotalLabel"}),!1!==e.isShowDiscountLabel&&d.push({title:t.discountLabel,money:u&&o&&s?`${o.value}%`:n>0?c:"No discount",uniqueId:"discountLabel"}),!1!==e.isShowShippingLabel&&d.push({title:t.shippingLabel,uniqueId:"shippingLabel",tooltip:{content:"Shipping fee will be calculated on real offer page",width:"23em"}}),!1!==e.isShowTaxesLabel&&d.push({title:t.taxesLabel,uniqueId:"taxesLabel",tooltip:{content:"Taxes will be calculated on real offer page",width:"20em"}}),!1!==e.isShowTotalLabel&&d.push({title:t.totalLabel,money:u?i:b,uniqueId:"totalLabel"}),t?.isShowRecurringTotalLabel!==!1&&a&&d.push({title:r("Recurring subtotal"),money:a,uniqueId:"recurringTotalLabel",subTitle:r("Doesn't include shipping, tax or duties")}),d};return{getMoneyLines:d}};exports.useGetMoneyLines=useGetMoneyLines;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var React=require("react"),core=require("@gem-sdk/core"),getPrice=require("../helpers/product-price-breakdown/getPrice.js");const useProductPriceBreakdown=()=>{let e=core.useProductOfferDiscount(),r=core.useCurrentVariant(),o=core.useProduct(),c=core.useProductStore(e=>e.selectedSellingPlan),{quantity:i}=core.useQuantity(),n=React.useMemo(()=>{if(!c)return null;let e=r?.sellingPlanGroups??o?.sellingPlanGroups??[];for(let r of e)if(r?.sellingPlans){let e=r.sellingPlans.find(e=>e?.baseID===c);if(e)return e}return null},[r,o,c]),t=core.convertDecimalToNumber(r?.price)??0,s=React.useMemo(()=>!n||t<=0?0:getPrice.calculateSellingPlanDiscount({variantPrice:t,pricingPolicies:n.pricingPolicies}),[n,t]),u=parseFloat(core.shopifyPriceRounding(t-s,2)),l=parseFloat(core.shopifyPriceRounding(u*(i||1),2)),a=core.useFormatMoney(l,!1),P=e*(i||1),d=parseFloat(core.shopifyPriceRounding(P,2)),p=core.useFormatMoney(d,!1),g=core.shopifyPriceRounding(d,2),f=parseFloat(core.shopifyPriceRounding(l-parseFloat(g),2)),y=core.useFormatMoney(f>0?f:0,!1);return{price:t,sellingPlanDiscountPerUnit:s,priceAfterSellingPlanDiscount:u,subTotal:l,subTotalMoneyFormatted:a,offerDiscountTotal:P,discountWithQuantity:d,discountMoneyFormatted:p,totalMoneyFormatted:y}};exports.useProductPriceBreakdown=useProductPriceBreakdown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var React=require("react"),core=require("@gem-sdk/core"),getPrice=require("../helpers/product-price-breakdown/getPrice.js");const useRecurringSubtotal=()=>{let e=core.useCurrentVariant(),r=core.useProduct(),i=core.useProductStore(e=>e.selectedSellingPlan),{quantity:l}=core.useQuantity(),t=e?.sellingPlanGroups,n=r?.sellingPlanGroups,u=core.convertDecimalToNumber(e?.price)??0,c=React.useMemo(()=>{if(!i)return null;let l=e?.sellingPlanGroups??r?.sellingPlanGroups??[];for(let e of l)if(e?.sellingPlans){for(let r of e.sellingPlans)if(r?.baseID===i)return r}return null},[JSON.stringify(t),JSON.stringify(n),i]),o=JSON.stringify(c?.pricingPolicies),s=JSON.stringify(c?.billingPolicy),a=c?.baseID,g=React.useMemo(()=>{if(!a||!e||u<=0||!c)return 0;let r=getPrice.calculateRecurringPrice({variantPrice:u,pricingPolicies:c.pricingPolicies}),i=r*(l||1);return parseFloat(core.shopifyPriceRounding(i,2))},[o,u,l,a]),P=React.useMemo(()=>{if(!a||!c)return null;let e=c.billingPolicy;return getPrice.formatInterval({billingPolicy:e})},[s,a]),f=core.useFormatMoney(g,!1),p=React.useMemo(()=>a&&!(g<=0)&&P?`${f} ${P}`:null,[a,g,P,f]);return p};exports.useRecurringSubtotal=useRecurringSubtotal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("react/jsx-runtime"),require("@gem-sdk/core"),require("@gem-sdk/system"),require("react"),require("./components/product-variant/components/variants/VariantItem.js"),require("next/link"),require("./constants/index.js"),require("next/head"),require("next/image"),require("react-youtube"),require("./components/product-subscription/
|
|
1
|
+
"use strict";require("react/jsx-runtime"),require("@gem-sdk/core"),require("@gem-sdk/system"),require("react"),require("./components/product-subscription/types.js"),require("./components/product-variant/components/variants/VariantItem.js"),require("next/link"),require("./constants/index.js"),require("next/head"),require("next/image"),require("react-youtube"),require("./components/product-subscription/components/OneTimePurchaseTooltip.js"),require("../image/components/Img.js");var ProductTitle$1=require("./settings/product-title/ProductTitle.js"),ProductDescription$1=require("./settings/product-description/ProductDescription.js"),ProductPrice$1=require("./settings/product-price/ProductPrice.js"),ProductVariant$1=require("./settings/product-variants/ProductVariant.js"),index$1=require("./settings/accept-button/index.js"),index$2=require("./settings/product-quantity/index.js"),index$4=require("./settings/product-offer/index.js"),index$3=require("./settings/product-price-breakdown/index.js"),ProductDiscountTag$1=require("./settings/product-discount-tag/ProductDiscountTag.js"),index$5=require("./settings/product-subscription/index.js"),ProductImages=require("./settings/product-image/ProductImages.js");const postPurchaseProductSetting={PostPurchaseProductTitle:ProductTitle$1.default,PostPurchaseProductDescription:ProductDescription$1.default,PostPurchaseProductPrice:ProductPrice$1.default,PostPurchaseProductVariants:ProductVariant$1.default,PostPurchaseAcceptButton:index$1.default,PostPurchaseProductQuantity:index$2.default,PostPurchaseProductPriceBreakdown:index$3.default,PostPurchaseProductOffer:index$4.default,PostPurchaseProductDiscountTag:ProductDiscountTag$1.default,PostPurchaseProductImages:ProductImages.default,PostPurchaseProductSubscription:index$5.default};exports.postPurchaseProductSetting=postPurchaseProductSetting;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let getStyleEstimateDate=(t,e)=>({align:t?.align,typo:t?.[e]});export{getStyleEstimateDate};
|
|
1
|
+
let getStyleEstimateDate=(t,e)=>({align:t?.align,typo:t?.[e]}),getTextStyles=t=>({hasTextShadowNotState:t?.hasTextShadowNotState,typography:t?.typography,typo:t?.typo,textAlign:t?.textAlign,lineClamp:t?.lineClamp,hasLineClamp:t?.hasLineClamp,hasTextShadow:t?.hasTextShadow,textShadow:t?.textShadow,align:t?.align});export{getStyleEstimateDate,getTextStyles};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as t}from"react/jsx-runtime";import{createClass as e}from"@gem-sdk/system";import s from"../../text/components/Text.js";import{getClassAdvanced as m}from"../common/classes.js";import{getNewSetting as r}from"../common/helpers.js";let EstimateDate=({setting:
|
|
2
|
+
import{jsx as t}from"react/jsx-runtime";import{createClass as e}from"@gem-sdk/system";import s from"../../text/components/Text.js";import{getClassAdvanced as m}from"../common/classes.js";import{getNewSetting as r}from"../common/helpers.js";import{getTextStyles as o}from"../common/styles.js";let EstimateDate=({setting:a,styles:i,builderAttrs:c,style:l,builderProps:n,advanced:p,children:d})=>{let f=e({"estimate-date-container":!0}),y=m({setting:a,advanced:p,type:"React"}),j=r({type:"React",styles:i,setting:a,builderProps:n});return t(s,{builderProps:n,builderAttrs:c,advanced:{...p,cssClass:y},style:l,styles:o(i),setting:j,className:f,children:d})};export{EstimateDate as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as
|
|
1
|
+
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as m}from"@gem-sdk/core";import{getSettingPreloadData as r}from"../../helpers.js";import{createClass as i}from"@gem-sdk/system";import a from"../../text/components/Text.liquid.js";import{getClassAdvanced as o}from"../common/classes.js";import{getNewSetting as p}from"../common/helpers.js";import{getTextStyles as d}from"../common/styles.js";let EstimateDate=({setting:l={},styles:c,builderAttrs:n,style:f,builderProps:g,advanced:y,isText:j,pageContext:u})=>{let E=i({"estimate-date-container":!0}),S=o({setting:l,advanced:y,type:"Liquid"}),v=p({type:"Liquid",styles:c,setting:l,builderProps:g,pageContext:u});return e`
|
|
2
2
|
<gp-estimate-date>
|
|
3
|
-
${
|
|
3
|
+
${a({builderProps:g,builderAttrs:n,advanced:{...y,cssClass:S},style:f,styles:d(c),setting:v,className:E,isText:j,pageContext:u,elementAttrs:{"setting-estimate-date":encodeURIComponent(JSON.stringify(l))},isForceValue:!0})}
|
|
4
4
|
</gp-estimate-date>
|
|
5
|
-
${t(s,`<script ${
|
|
5
|
+
${t(s,`<script ${r('class="gps-link" delay',"src")}="{{ 'gp-estimate-date-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${r('class="gps-link" delay',"src")}="${m}/assets-v2/gp-estimate-date-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
6
6
|
`};export{EstimateDate as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{filterTruthyStyles as e}from"@gem-sdk/core";import{postPurchaseTextColor as t}from"../../common/helper.js";let composeClasses=t=>e(t),getWrapperClassName=({align:e,uid:t})=>{let s={"gp-flex gp-items-center":!0,"gp-justify-center":"center"===e,"gp-justify-end":"right"===e,"gp-justify-start":"right"!==e&&"center"!==e};return t&&(s[t]=!!t),composeClasses(s)},getCheckboxContainerClassName=()=>({"gp-
|
|
1
|
+
import{filterTruthyStyles as e}from"@gem-sdk/core";import{postPurchaseTextColor as t}from"../../common/helper.js";let composeClasses=t=>e(t),getWrapperClassName=({align:e,uid:t})=>{let s={"gp-flex gp-items-center":!0,"gp-justify-center":"center"===e,"gp-justify-end":"right"===e,"gp-justify-start":"right"!==e&&"center"!==e};return t&&(s[t]=!!t),composeClasses(s)},getCheckboxContainerClassName=()=>({"gp-grid gp-items-start gp-leading-[1.3]":!0}),getCheckboxClassName=()=>composeClasses({"gp-h-[18px] gp-w-[18px] gp-inline-block gp-static gp-flex-shrink-0":!0}),getLinkComponentClassName=()=>({"gp-underline":!0}),getLinkComponentStyles=()=>({color:t.defaultLink});export{getCheckboxClassName,getCheckboxContainerClassName,getLinkComponentClassName,getLinkComponentStyles,getWrapperClassName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeGlobalSize as t,filterTruthyStyles as e}from"@gem-sdk/core";import{makeTextColor as o,makeFontWeight as r,makeFontSize as
|
|
1
|
+
import{makeGlobalSize as t,filterTruthyStyles as e}from"@gem-sdk/core";import{makeTextColor as o,makeFontWeight as r,makeFontSize as a}from"../../common/helper.js";let SHOPIFY_CHECKBOX_GAP_FALLBACK="9px",composeStyles=t=>e(t),getWrapperStyles=({styles:e})=>{let{globalSize:o}=e??{},r=t(o);return composeStyles({...r?.width?.["--w"]?r.width:{"--w":"100%"},...r.padding,"--ta":e?.textAlign})},getContainerStyles=({styles:t})=>{let{horizontalSpacing:e}=t??{},o=e??"9px";return{"--w":t?.width,justifyContent:"start",alignItems:"start",gridTemplate:`"checkbox gap label" auto / auto ${o} auto`}},getCheckboxInputStyles=()=>({appearance:"auto",maxWidth:"none",gridArea:"checkbox"}),getTextStyle=({styles:t})=>{let{typo:l}=t??{},n={display:"block",maxWidth:"100%",gridArea:"label",overflowWrap:"break-word"};if(!l)return e({...n});let i={"text-transform":l.textTransform,color:o(l.textColor,l.fontWeight),"font-weight":r(l.fontWeight),"font-size":a(l.fontSize)};return e({...n,...i})};export{getCheckboxInputStyles,getContainerStyles,getTextStyle,getWrapperStyles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useMemo as t,useEffect as s}from"react";import{createStyle as o,createClass as i}from"@gem-sdk/system";import{getWrapperStyles as m,getContainerStyles as c,getCheckboxInputStyles as n,getTextStyle as l}from"../common/styles.js";import{getWrapperClassName as d,getCheckboxContainerClassName as a,getCheckboxClassName as u,getLinkComponentClassName as p,getLinkComponentStyles as h}from"../common/classes.js";import{getComponentTag as y}from"../common/helpers.js";import{useProduct as b,usePageStore as f,useProductStore as C}from"@gem-sdk/core";import{extractProductID as g}from"../../../helpers.js";let DEFAULT_PRE_CHECK_VALUE=!0,COMPONENT_ID_PREFIX="buyer-consent-product",BuyerConsent=({styles:k,builderProps:E,setting:N})=>{let _=b(),j=f(e=>e.buyerConsentPreCheck),I=C(e=>e.isAgreeBuyWithSubscription),A=C(e=>e.setIsAgreeBuyWithSubscription),{description:B,policyLabel:D,policyLink:P,align:x}=N??{},F=_?.id?`buyer-consent-product-${_.id}`:void 0,v=y(P),L=o(m({styles:k})),O=i(d({align:x,uid:E?.uid})),R=o(c({styles:k})),S=i(a()),T=o(n()),U=o(l({styles:k})),W=i(u()),H=i(p()),K=o(h()),M=t(()=>{let e=g(_?.baseID??"");return j?.[e]??!0},[j,_?.baseID]),V=e=>{A(e.target.checked)};return s(()=>{A(M)},[A,M]),e("div",{"data-id":E?.uid,style:L,className:O,children:r("label",{htmlFor:F,style:R,className:S,children:[e("input",{id:F,name:F,type:"checkbox",style:T,className:W,checked:I,onChange:V}),r("bdo",{dir:k?.direction??"ltr",style:U,children:[B," ",e(v,{target:"_blank",rel:"noreferrer",href:P,className:H,style:K,children:D})]})]})})};export{BuyerConsent as default};
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useMemo as t,useEffect as s}from"react";import{createStyle as o,createClass as i}from"@gem-sdk/system";import{getWrapperStyles as m,getContainerStyles as c,getCheckboxInputStyles as n,getTextStyle as l}from"../common/styles.js";import{getWrapperClassName as d,getCheckboxContainerClassName as a,getCheckboxClassName as u,getLinkComponentClassName as p,getLinkComponentStyles as h}from"../common/classes.js";import{getComponentTag as y}from"../common/helpers.js";import{useProduct as b,usePageStore as f,useProductStore as C}from"@gem-sdk/core";import{extractProductID as g}from"../../../helpers.js";let DEFAULT_PRE_CHECK_VALUE=!0,COMPONENT_ID_PREFIX="buyer-consent-product",BuyerConsent=({styles:k,builderProps:E,setting:N})=>{let _=b(),j=f(e=>e.buyerConsentPreCheck),I=C(e=>e.isAgreeBuyWithSubscription),A=C(e=>e.setIsAgreeBuyWithSubscription),{description:B,policyLabel:D,policyLink:P,align:x}=N??{},F=_?.id?`buyer-consent-product-${_.id}`:void 0,v=y(P),L=o(m({styles:k})),O=i(d({align:x,uid:E?.uid})),R=o(c({styles:k})),S=i(a()),T=o(n()),U=o(l({styles:k})),W=i(u()),H=i(p()),K=o(h()),M=t(()=>{let e=g(_?.baseID??"");return j?.[e]??!0},[j,_?.baseID]),V=e=>{A(e.target.checked)};return s(()=>{A(M)},[A,M]),e("div",{"data-id":E?.uid,style:L,className:O,children:r("label",{htmlFor:F,dir:k?.direction??"ltr",style:R,className:S,children:[e("input",{id:F,name:F,type:"checkbox",style:T,className:W,checked:I,onChange:V}),r("bdo",{dir:k?.direction??"ltr",style:U,children:[B," ",e(v,{target:"_blank",rel:"noreferrer",href:P,className:H,style:K,children:D})]})]})})};export{BuyerConsent as default};
|
|
@@ -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 o,convertDecimalToNumber as
|
|
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 d}from"react";import m from"../../text/components/Text.js";import{useDynamicProduct as u}from"../hooks/useDynamicProduct.js";import f from"../../../common/components/TooltipHover.js";import{calculateSellingPlanDiscount as P}from"../helpers/product-price-breakdown/getPrice.js";let PostPurchaseProductPrice=({styles:h,style:y,builderAttrs:x,builderProps:b,children:N,setting:j})=>{let k=t(),D=i(),F=o(e=>e.selectedSellingPlan),S=l(k?.price)??0,v=l(k?.salePrice)??0,w=parseFloat(s(p(),2)),{isDynamicProduct:G}=u(),{t:I}=a(),{isEditMode:J}=n(),{priceType:O,source:T}=j??{},$="compare"===O,H="offer"===O,q="price"===T,z="compare-price"===T,A=k?.sellingPlanGroups,B=D?.sellingPlanGroups,C=d(()=>{if(!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===F)return e}return null},[JSON.stringify(A),JSON.stringify(B),F]),E=JSON.stringify(C?.pricingPolicies),K=C?.baseID,L=d(()=>!C||S<=0?0:P({variantPrice:S,pricingPolicies:C.pricingPolicies}),[E,S]),M=d(()=>{if(H&&F&&K){let e=parseFloat(s(S-L,2)),r=parseFloat(s(e-w,2));return r>0?r:0}let e=parseFloat(s(S-w,2));return e>0?e:0},[H,F,K,S,L,w]),Q=d(()=>$?q?S:v:H?M:S,[$,q,H,S,v,M]),R=c(parseFloat(s(Number(Q)||0,2)),!1),U=D?.baseID?.replace("gid://shopify/Product/",""),V=d(()=>$&&(!w&&v<S||z&&!v||q&&S<=0),[$,w,S,v,z,q]);return(!Q&&!H||V)&&J?e(f,{enable:!0,text:"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:I("No compare price")})})}):V&&!J?null:r("div",{...x,className:g(b?.uid),style:{...y},id:`shopify-text-element-${b?.uid}`,"data-product-id":U,children:[e(m,{styles:h,setting:{text:G?"$???":R},className:g({"gp-money":H,"gp-product-compare-price":$,"gp-line-through":$&&h?.lineThrough})}),N]})};export{PostPurchaseProductPrice as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let getProductOfferAttrs=(t,o)=>({"data-uid":o||"","data-component-type":"component","data-component-tag":"Product","data-component-label":"Product","data-component-no-setting":!0,"data-product-id":t?.baseID?.replace("gid://shopify/Product/","")||""});export{getProductOfferAttrs};
|
|
1
|
+
let getProductOfferAttrs=(t,o)=>({"data-uid":o||"","data-component-type":"component","data-component-tag":"Product","data-component-label":"Product","data-component-no-setting":!0,"data-product-id":t?.baseID?.replace("gid://shopify/Product/","")||"","data-product-gp-id":t?.id||""});export{getProductOfferAttrs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{composeClasses as e}from"@gem-sdk/core";let getWrapperClasses=()=>e("gp-flex gp-gap-x-[10px] gap-[10px]"),getContainerClasses=()=>e("gp-flex gp-flex-col"),getSellingPlanRadioContainerClasses=()=>e("gp-relative gp-flex gp-flex-col"),getSellingPlanRadioLabelClasses=()=>e("gp-
|
|
1
|
+
import{composeClasses as e}from"@gem-sdk/core";let getWrapperClasses=()=>e("gp-flex gp-gap-x-[10px] gap-[10px]"),getContainerClasses=()=>e("gp-flex gp-flex-col"),getSellingPlanRadioContainerClasses=()=>e("gp-relative gp-flex gp-flex-col"),getSellingPlanRadioLabelClasses=()=>e("gp-text-xs gp-leading-[1.3]"),getSellingPlanRadioOptionsClasses=()=>e("gp-flex gp-flex-col"),getSellingPlanRadioOptionTextClasses=()=>e("gp-text-[14px] gp-leading-[1.3] gp-text-text-light-500"),getSubscriptionRadioLabelClasses=p=>{let g=p?"gp-opacity-50 gp-cursor-not-allowed":"";return e(`gp-flex gp-items-center gp-cursor-pointer gp-gap-2 ${g}`.trim())},getSubscriptionRadioInputClasses=()=>e("gp-relative gp-min-h-[18px] gp-min-w-[18px] gp-mt-[3px] gp-w-4 gp-h-4 gp-cursor-pointer gp-appearance-none gp-rounded-full gp-bg-light-100 gp-transition-all gp-border-light-500 gp-border-2 checked:gp-border-[#1879b9] checked:gp-border-[6px] checked:gp-after:gp-content-[''] checked:gp-after:gp-absolute checked:gp-after:gp-top-1/2 checked:gp-after:gp-left-1/2 checked:gp-after:gp-transform checked:gp-after:gp--translate-x-1/2 checked:gp-after:gp--translate-y-1/2 checked:gp-after:gp-h-2 checked:gp-after:gp-w-2 checked:gp-after:gp-rounded-full checked:gp-after:gp-bg-white disabled:gp-cursor-not-allowed"),getSellingPlanDropdownContainerClasses=()=>e("gp-relative"),getSellingPlanDropdownLabelClasses=()=>e("!gp-max-w-[calc(100%_-_66px)] gp-absolute gp-left-[12px] gp-top-[6px] gp-p-0 gp-text-xs gp-leading-[1.3] gp-text-[#737373] gp-transition-[top]"),getSellingPlanDropdownLabelSpanClasses=()=>e("gp-max-w-full"),getSellingPlanDropdownLabelInnerSpanClasses=()=>e("gp-block gp-overflow-hidden"),getSellingPlanDropdownSelectClasses=({isNoLabel:p=!1})=>e(`gp-min-h-[47px] gp-appearance-none gp-bg-transparent gp-w-full gp-whitespace-nowrap gp-rounded-[5px] gp-border gp-border-[#d9d9d9] gp-pl-[11px] gp-pr-[40px] gp-text-[14px] gp-outline-none gp-text-[#545454] gp-leading-[1.3] ${p?"gp-pt-0 gp-pb-0":"gp-pt-[21px] gp-pb-[6px]"}`),getSellingPlanDropdownOptionClasses=()=>e("gp-text-[14px] gp-text-black"),getSellingPlanDropdownIconContainerClasses=()=>e("gp-pointer-events-none gp-absolute gp-right-[2px] gp-top-[50%] gp-flex gp-h-[43%] gp-w-[40px] gp-translate-y-[-50%] gp-items-center gp-justify-center gp-border-l-[1px] gp-bg-white gp-border-[#545454]"),getSellingPlanDropdownIconClasses=()=>e("gp-h-[10px] gp-w-[10px]");export{getContainerClasses,getSellingPlanDropdownContainerClasses,getSellingPlanDropdownIconClasses,getSellingPlanDropdownIconContainerClasses,getSellingPlanDropdownLabelClasses,getSellingPlanDropdownLabelInnerSpanClasses,getSellingPlanDropdownLabelSpanClasses,getSellingPlanDropdownOptionClasses,getSellingPlanDropdownSelectClasses,getSellingPlanRadioContainerClasses,getSellingPlanRadioLabelClasses,getSellingPlanRadioOptionTextClasses,getSellingPlanRadioOptionsClasses,getSubscriptionRadioInputClasses,getSubscriptionRadioLabelClasses,getWrapperClasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as e,useEffect as l,useMemo as n}from"react";import{useProduct as t,useVariants as r,useSelectedOption as i,useProductStore as s,usePageStore as o,useEditorMode as
|
|
1
|
+
import{useRef as e,useEffect as l,useMemo as n}from"react";import{useProduct as t,useVariants as r,useSelectedOption as i,useProductStore as s,usePageStore as o,useEditorMode as u,RenderModeEnv as a}from"@gem-sdk/core";import{extractSellingPlanSettings as p}from"../common/extractSellingPlanSettings.js";import{findMatchedGroup as m}from"../helpers/findMatchedGroup.js";import{findDefaultValue as c}from"../helpers/findDefaultValue.js";import{findVariantByOptions as d}from"../helpers/findVariantByOptions.js";let useSellingSubscription=f=>{let g=t(),v=r(),{selectedOptions:P}=i(),S=s(e=>e.selectedSellingPlan),b=s(e=>e.setSelectedSellingPlan),h=o(e=>e.sellingPlanMeta),V=u(),j=e(!1),D=e(void 0);l(()=>{if(!j.current&&V===a.EDIT&&!h){let e=new CustomEvent("element-subscription-mount");globalThis.dispatchEvent(e),j.current=!0}},[V,h]);let E=h??f?.sellingPlans,G=n(()=>{if(!E)return{sourceApp:void 0,group:void 0,defaultOptions:void 0};let e=null;return h&&P&&(e=d({variants:v,selectedOptions:P})),p({sellingPlansSetting:E,currentVariant:e,product:g,isFromEvent:!!h})},[E,h,v,P,g]),I=n(()=>P?d({variants:v,selectedOptions:P}):null,[P,v]);l(()=>{D.current=void 0},[I?.baseID]);let{sellingPlans:x,defaultValue:M}=n(()=>{let e=I?.sellingPlanGroups??g?.sellingPlanGroups??[];if(!e||0===e.length)return{sellingPlans:[],defaultValue:void 0};let l=m({sellingPlanGroups:e,extractedSettings:G,currentVariant:I}),n=l?.sellingPlans?.filter(e=>null!=e)??[],t=n.map(e=>({label:e.name||"",value:e.baseID})),r=c({validPlans:n,extractedSettings:G,currentVariant:I,plans:t});return{sellingPlans:t,defaultValue:r}},[g,I,G]);return l(()=>{!S&&M&&D.current!==M&&(D.current=M,b(M))},[M,S,b]),{sellingPlans:x,defaultValue:M,selectedSellingPlan:S,setSelectedSellingPlan:b}};export{useSellingSubscription};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AdjustmentType as e}from"../../components/product-subscription/types.js";let findPolicyWithoutAfterCycle=({policies:e})=>{let t=e.filter(e=>null!=e);if(0===t.length)return null;let l=t.find(e=>{let t=e?.AfterCycle??e.afterCycle;return!t});return l??t[0]??null},parseAmount=({value:e})=>{if(!e)return 0;let t=parseFloat(e);return isNaN(t)||t<=0?0:t},calculatePercentageDiscount=({variantPrice:e,percentage:t})=>isNaN(t)||t<=0?0:e*t/100,calculateFixedAmountDiscount=({amount:e})=>parseAmount({value:e}),calculatePriceDiscount=({variantPrice:e,fixedPrice:t})=>{let l=parseAmount({value:t});return l<=0?0:e-l},calculateSellingPlanDiscount=({variantPrice:t,pricingPolicies:l})=>{if(!l||0===l.length)return 0;let r=l.filter(e=>null!=e);if(0===r.length)return 0;let n=findPolicyWithoutAfterCycle({policies:r});if(!n)return 0;let u=n.AdjustmentType??n.adjustmentType,a=n.AdjustmentValue??n.adjustmentValue;return u&&a?u===e.FIXED_AMOUNT&&a.amount?calculateFixedAmountDiscount({amount:a.amount}):u===e.PERCENTAGE&&void 0!==a.percentage?calculatePercentageDiscount({variantPrice:t,percentage:a.percentage}):u===e.PRICE&&a.amount?calculatePriceDiscount({variantPrice:t,fixedPrice:a.amount}):0:0},calculateFixedAmountPrice=({variantPrice:e,amount:t})=>{let l=parseAmount({value:t});return l<=0?e:e-l},calculatePercentagePrice=({variantPrice:e,percentage:t})=>isNaN(t)||t<=0?e:e-e*t/100,calculateFixedPrice=({fixedPrice:e})=>parseAmount({value:e}),calculateRecurringPrice=({variantPrice:t,pricingPolicies:l})=>{if(!l||0===l.length)return t;let r=l.filter(e=>null!=e);if(0===r.length)return t;let n=findPolicyWithoutAfterCycle({policies:r});if(!n)return t;let u=n.AdjustmentType??n.adjustmentType,a=n.AdjustmentValue??n.adjustmentValue;return u&&a?u===e.FIXED_AMOUNT&&a.amount?calculateFixedAmountPrice({variantPrice:t,amount:a.amount}):u===e.PERCENTAGE&&void 0!==a.percentage?calculatePercentagePrice({variantPrice:t,percentage:a.percentage}):u===e.PRICE&&a.amount?calculateFixedPrice({fixedPrice:a.amount}):t:t},getIntervalText=({interval:e,intervalCount:t})=>{let l={DAY:{singular:"day",plural:"days"},WEEK:{singular:"week",plural:"weeks"},MONTH:{singular:"month",plural:"months"},YEAR:{singular:"year",plural:"years"}}[e];if(!l){let l=e.toLowerCase();return 1===t?`every ${l}`:`every ${t} ${l}`}let r=1===t?l.singular:l.plural;return 1===t?`every ${r}`:`every ${t} ${r}`},formatInterval=({billingPolicy:e})=>{if(!e)return"";let t=e.interval?.toUpperCase();if(!t)return"";let l=e.intervalCount??1;return getIntervalText({interval:t,intervalCount:l})};export{calculateRecurringPrice,calculateSellingPlanDiscount,findPolicyWithoutAfterCycle,formatInterval};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useI18nStore as e}from"@gem-sdk/core";import{useDynamicProduct as t}from"./useDynamicProduct.js";import{useRecurringSubtotal as i}from"./useRecurringSubtotal.js";import{useProductPriceBreakdown as o}from"./useProductPriceBreakdown.js";let useGetMoneyLines=(l,u)=>{let{isDynamicProduct:a,dynamicPrice:s,dynamicDiscount:n,isEnableDynamicDiscount:r}=t(),{t:b}=e(),p=i(),{subTotalMoneyFormatted:c,offerDiscountTotal:d,discountMoneyFormatted:h,totalMoneyFormatted:L}=o(),m=()=>{let e=[];return!1!==l.isShowSubTotalLabel&&e.push({title:u.subTotalLabel,money:a?s:c,uniqueId:"subTotalLabel"}),!1!==l.isShowDiscountLabel&&e.push({title:u.discountLabel,money:a&&n&&r?`${n.value}%`:d>0?h:"No discount",uniqueId:"discountLabel"}),!1!==l.isShowShippingLabel&&e.push({title:u.shippingLabel,uniqueId:"shippingLabel",tooltip:{content:"Shipping fee will be calculated on real offer page",width:"23em"}}),!1!==l.isShowTaxesLabel&&e.push({title:u.taxesLabel,uniqueId:"taxesLabel",tooltip:{content:"Taxes will be calculated on real offer page",width:"20em"}}),!1!==l.isShowTotalLabel&&e.push({title:u.totalLabel,money:a?s:L,uniqueId:"totalLabel"}),u?.isShowRecurringTotalLabel!==!1&&p&&e.push({title:b("Recurring subtotal"),money:p,uniqueId:"recurringTotalLabel",subTitle:b("Doesn't include shipping, tax or duties")}),e};return{getMoneyLines:m}};export{useGetMoneyLines};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useMemo as e}from"react";import{useProductOfferDiscount as r,useCurrentVariant as l,useProduct as i,useProductStore as o,useQuantity as t,convertDecimalToNumber as n,shopifyPriceRounding as a,useFormatMoney as s}from"@gem-sdk/core";import{calculateSellingPlanDiscount as p}from"../helpers/product-price-breakdown/getPrice.js";let useProductPriceBreakdown=()=>{let c=r(),u=l(),P=i(),d=o(e=>e.selectedSellingPlan),{quantity:f}=t(),g=e(()=>{if(!d)return null;let e=u?.sellingPlanGroups??P?.sellingPlanGroups??[];for(let r of e)if(r?.sellingPlans){let e=r.sellingPlans.find(e=>e?.baseID===d);if(e)return e}return null},[u,P,d]),m=n(u?.price)??0,F=e(()=>!g||m<=0?0:p({variantPrice:m,pricingPolicies:g.pricingPolicies}),[g,m]),k=parseFloat(a(m-F,2)),w=parseFloat(a(k*(f||1),2)),b=s(w,!1),B=c*(f||1),G=parseFloat(a(B,2)),h=s(G,!1),j=a(G,2),v=parseFloat(a(w-parseFloat(j),2)),x=s(v>0?v:0,!1);return{price:m,sellingPlanDiscountPerUnit:F,priceAfterSellingPlanDiscount:k,subTotal:w,subTotalMoneyFormatted:b,offerDiscountTotal:B,discountWithQuantity:G,discountMoneyFormatted:h,totalMoneyFormatted:x}};export{useProductPriceBreakdown};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useMemo as l}from"react";import{useCurrentVariant as r,useProduct as e,useProductStore as i,useQuantity as n,convertDecimalToNumber as t,shopifyPriceRounding as s,useFormatMoney as o}from"@gem-sdk/core";import{calculateRecurringPrice as u,formatInterval as g}from"../helpers/product-price-breakdown/getPrice.js";let useRecurringSubtotal=()=>{let c=r(),f=e(),p=i(l=>l.selectedSellingPlan),{quantity:a}=n(),P=c?.sellingPlanGroups,b=f?.sellingPlanGroups,m=t(c?.price)??0,S=l(()=>{if(!p)return null;let l=c?.sellingPlanGroups??f?.sellingPlanGroups??[];for(let r of l)if(r?.sellingPlans){for(let l of r.sellingPlans)if(l?.baseID===p)return l}return null},[JSON.stringify(P),JSON.stringify(b),p]),y=JSON.stringify(S?.pricingPolicies),d=JSON.stringify(S?.billingPolicy),G=S?.baseID,J=l(()=>{if(!G||!c||m<=0||!S)return 0;let l=u({variantPrice:m,pricingPolicies:S.pricingPolicies}),r=l*(a||1);return parseFloat(s(r,2))},[y,m,a,G]),N=l(()=>{if(!G||!S)return null;let l=S.billingPolicy;return g({billingPolicy:l})},[d,G]),O=o(J,!1),k=l(()=>G&&!(J<=0)&&N?`${O} ${N}`:null,[G,J,N,O]);return k};export{useRecurringSubtotal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"@gem-sdk/core";import"@gem-sdk/system";import"react";import"./components/product-variant/components/variants/VariantItem.js";import"next/link";import"./constants/index.js";import"next/head";import"next/image";import"react-youtube";import"./components/product-subscription/
|
|
1
|
+
import"react/jsx-runtime";import"@gem-sdk/core";import"@gem-sdk/system";import"react";import"./components/product-subscription/types.js";import"./components/product-variant/components/variants/VariantItem.js";import"next/link";import"./constants/index.js";import"next/head";import"next/image";import"react-youtube";import"./components/product-subscription/components/OneTimePurchaseTooltip.js";import"../image/components/Img.js";import t from"./settings/product-title/ProductTitle.js";import o from"./settings/product-description/ProductDescription.js";import r from"./settings/product-price/ProductPrice.js";import s from"./settings/product-variants/ProductVariant.js";import i from"./settings/accept-button/index.js";import e from"./settings/product-quantity/index.js";import c from"./settings/product-offer/index.js";import n from"./settings/product-price-breakdown/index.js";import p from"./settings/product-discount-tag/ProductDiscountTag.js";import u from"./settings/product-subscription/index.js";import m from"./settings/product-image/ProductImages.js";let postPurchaseProductSetting={PostPurchaseProductTitle:t,PostPurchaseProductDescription:o,PostPurchaseProductPrice:r,PostPurchaseProductVariants:s,PostPurchaseAcceptButton:i,PostPurchaseProductQuantity:e,PostPurchaseProductPriceBreakdown:n,PostPurchaseProductOffer:c,PostPurchaseProductDiscountTag:p,PostPurchaseProductImages:m,PostPurchaseProductSubscription:u};export{postPurchaseProductSetting};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1549,44 +1549,14 @@ type EstimateStyleProps = {
|
|
|
1549
1549
|
shapeBoxShadow?: ObjectDevices<ShadowProps>;
|
|
1550
1550
|
};
|
|
1551
1551
|
type EstimateDateTranslateKeys = keyof EstimateSettingProps;
|
|
1552
|
-
type
|
|
1553
|
-
children: React.ReactNode;
|
|
1554
|
-
};
|
|
1555
|
-
type EstimateDateProps = BasePropsWrap<{
|
|
1556
|
-
htmlTag?: number;
|
|
1557
|
-
text?: string;
|
|
1558
|
-
globalSize?: ObjectDevices<SizeSettingGlobal>;
|
|
1559
|
-
background?: ObjectDevices<BackgroundMedia>;
|
|
1560
|
-
enableCustomText?: boolean;
|
|
1561
|
-
customText?: string;
|
|
1562
|
-
minEstimate?: number;
|
|
1563
|
-
maxEstimate?: number;
|
|
1564
|
-
estimateTime?: number;
|
|
1565
|
-
typeFormat?: string;
|
|
1566
|
-
customFormat?: string;
|
|
1567
|
-
typeEstimate?: string;
|
|
1568
|
-
ifOutOfStock?: string;
|
|
1569
|
-
}, {
|
|
1570
|
-
textShadowNotState?: ShadowProps;
|
|
1571
|
-
hasTextShadowNotState?: boolean;
|
|
1572
|
-
typography?: TypographySetting;
|
|
1573
|
-
typoCustom?: TypographySettingV2;
|
|
1574
|
-
typoDate?: TypographySettingV2;
|
|
1575
|
-
typo?: TypographySettingV2;
|
|
1576
|
-
textAlign?: ObjectDevices<AlignProp>;
|
|
1577
|
-
lineClamp?: ObjectDevices<number>;
|
|
1578
|
-
hasLineClamp?: ObjectDevices<boolean>;
|
|
1579
|
-
hasTextShadow?: StateProp<boolean>;
|
|
1580
|
-
textShadow?: StateProp<ShadowProps>;
|
|
1581
|
-
align?: ObjectDevices<AlignProp>;
|
|
1582
|
-
}> & Omit<React.ComponentPropsWithoutRef<'h1'>, 'children'> & {
|
|
1552
|
+
type EstimateDateProps = BasePropsWrap<EstimateSettingProps, EstimateStyleProps> & Omit<React.ComponentPropsWithoutRef<'h1'>, 'children'> & {
|
|
1583
1553
|
children: React.ReactNode;
|
|
1584
1554
|
};
|
|
1585
1555
|
|
|
1586
1556
|
declare const EstimateDate$2: React.FC<EstimateDateProps>;
|
|
1587
1557
|
|
|
1588
1558
|
declare const estimateDeliverySetting: {
|
|
1589
|
-
EstimateDate: _gem_sdk_core.ComponentSetting<
|
|
1559
|
+
EstimateDate: _gem_sdk_core.ComponentSetting<EstimateDateProps>;
|
|
1590
1560
|
};
|
|
1591
1561
|
|
|
1592
1562
|
type RootProps$1 = {
|
|
@@ -6587,6 +6557,13 @@ declare const EstimateDate$1: ({ setting, styles, builderAttrs, style, builderPr
|
|
|
6587
6557
|
hasTextShadow?: Partial<Record<_gem_sdk_core.StateType, boolean>> | undefined;
|
|
6588
6558
|
textShadow?: Partial<Record<_gem_sdk_core.StateType, _gem_sdk_core.ShadowProps>> | undefined;
|
|
6589
6559
|
align?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.AlignProp>> | undefined;
|
|
6560
|
+
padding?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.SizeSettingGlobal>> | undefined;
|
|
6561
|
+
border?: Partial<Record<_gem_sdk_core.NameDevices, Partial<Record<_gem_sdk_core.StateType, _gem_sdk_core.Border>>>> | undefined;
|
|
6562
|
+
rounded?: Partial<Record<_gem_sdk_core.NameDevices, Partial<Record<_gem_sdk_core.StateType, _gem_sdk_core.CornerRadius>>>> | undefined;
|
|
6563
|
+
boxShadow?: Partial<Record<_gem_sdk_core.NameDevices, Partial<Record<_gem_sdk_core.StateType, _gem_sdk_core.ShadowProps>>>> | undefined;
|
|
6564
|
+
shapeBorder?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.Border>> | undefined;
|
|
6565
|
+
shapeRounded?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.CornerRadius>> | undefined;
|
|
6566
|
+
shapeBoxShadow?: Partial<Record<_gem_sdk_core.NameDevices, _gem_sdk_core.ShadowProps>> | undefined;
|
|
6590
6567
|
}, Record<string, any>> & {
|
|
6591
6568
|
builderAttrs?: Record<string, any> | undefined;
|
|
6592
6569
|
style?: React.CSSProperties | undefined;
|
|
@@ -7855,7 +7832,7 @@ declare const _default$1: {
|
|
|
7855
7832
|
Section: _gem_sdk_core.ComponentSetting<RowProps>;
|
|
7856
7833
|
Row: _gem_sdk_core.ComponentSetting<RowProps>;
|
|
7857
7834
|
Col: _gem_sdk_core.ComponentSetting<ColProps>;
|
|
7858
|
-
EstimateDate: _gem_sdk_core.ComponentSetting<
|
|
7835
|
+
EstimateDate: _gem_sdk_core.ComponentSetting<EstimateDateProps>;
|
|
7859
7836
|
Dialog: _gem_sdk_core.ComponentSetting<DialogProps$1>;
|
|
7860
7837
|
Coupon: _gem_sdk_core.ComponentSetting<CouponProps>;
|
|
7861
7838
|
Countdown: _gem_sdk_core.ComponentSetting<CountdownProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "12.0.0-dev.
|
|
3
|
+
"version": "12.0.0-dev.47",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"i18n:generate": "node ./scripts/update-locales-to-setting.js"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@gem-sdk/core": "12.0.0-dev.
|
|
30
|
+
"@gem-sdk/core": "12.0.0-dev.46",
|
|
31
31
|
"@gem-sdk/styles": "12.0.0-dev.44",
|
|
32
32
|
"@gem-sdk/system": "12.0.0-dev.44",
|
|
33
33
|
"@types/react-transition-group": "^4.4.12",
|