@gem-sdk/components 8.0.0-dev.112 → 8.0.0-dev.114
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/post-purchase/product/components/ProductPriceBreakdown.js +1 -1
- package/dist/cjs/post-purchase/product/components/price-breakdown/MoneyLine.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-subscription/common/styles.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-subscription/hooks/useSellingSubscription.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
- package/dist/cjs/post-purchase/product/index.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/settings.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-price-breakdown/configs/ui-v2.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-subscription/configs/settings.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPriceBreakdown.js +1 -1
- package/dist/esm/post-purchase/product/components/price-breakdown/MoneyLine.js +1 -1
- package/dist/esm/post-purchase/product/components/product-subscription/common/styles.js +1 -1
- package/dist/esm/post-purchase/product/components/product-subscription/hooks/useSellingSubscription.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useGetMoneyLines.js +1 -1
- package/dist/esm/post-purchase/product/index.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/settings.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-price-breakdown/configs/ui-v2.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-subscription/configs/settings.js +1 -1
- package/dist/types/index.d.ts +5 -3
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),getClasses=require("../helpers/product-price-breakdown/getClasses.js"),getStyles=require("../helpers/product-price-breakdown/getStyles.js"),useGetItemGapPriceBreakdown=require("../hooks/useGetItemGapPriceBreakdown.js"),useSetCollapsePrice=require("../hooks/useSetCollapsePrice.js"),MoneyLine=require("./price-breakdown/MoneyLine.js"),Text=require("../../text/components/Text.js"),useGetMoneyLines=require("../hooks/useGetMoneyLines.js");const PostPurchaseProductPriceBreakdown=({setting:e={},styles:s={},style:t,builderAttrs:r,builderProps:i,children:a})=>{let{labelStyle:l,moneyStyle:n,spacing:o,width:u,align:d,isShowPrice:c,direction:m}=s,p=core.useProduct(),x=p?.baseID?.replace("gid://shopify/Product/",""),{isCollapsePrice:y,onClickLabelPriceBreakdown:j}=useSetCollapsePrice.useSetCollapsePrice(c),{itemGap:C}=useGetItemGapPriceBreakdown.useGetItemGapPriceBreakdown(o),{getMoneyLines:g}=useGetMoneyLines.useGetMoneyLines(s,e),h=system.createStyle({...getStyles.getStyle(t)}),w=system.createAttr({...r}),P=system.createClass(getClasses.getIconCollapseClassesRotate(y)),R=system.createClass(getClasses.getContainerPriceBreakdownClasses(d,i?.uid)),
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),React=require("react"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),getClasses=require("../helpers/product-price-breakdown/getClasses.js"),getStyles=require("../helpers/product-price-breakdown/getStyles.js"),useGetItemGapPriceBreakdown=require("../hooks/useGetItemGapPriceBreakdown.js"),useSetCollapsePrice=require("../hooks/useSetCollapsePrice.js"),MoneyLine=require("./price-breakdown/MoneyLine.js"),Text=require("../../text/components/Text.js"),useGetMoneyLines=require("../hooks/useGetMoneyLines.js");const PostPurchaseProductPriceBreakdown=({setting:e={},styles:s={},style:t,builderAttrs:r,builderProps:i,children:a})=>{let{labelStyle:l,moneyStyle:n,spacing:o,width:u,align:d,isShowPrice:c,direction:m}=s,p=core.useProduct(),x=p?.baseID?.replace("gid://shopify/Product/",""),{isCollapsePrice:y,onClickLabelPriceBreakdown:j}=useSetCollapsePrice.useSetCollapsePrice(c),{itemGap:C}=useGetItemGapPriceBreakdown.useGetItemGapPriceBreakdown(o),{getMoneyLines:g}=useGetMoneyLines.useGetMoneyLines(s,e),h=system.createStyle({...getStyles.getStyle(t)}),w=system.createAttr({...r}),P=system.createClass(getClasses.getIconCollapseClassesRotate(y)),R=system.createClass(getClasses.getContainerPriceBreakdownClasses(d,i?.uid)),b=system.createClass(getClasses.getWrapperLabelClasses(m)),k=system.createClass(getClasses.getLabelClasses()),q=system.createClass(getClasses.getDividerClasses()),L=system.createClass(getClasses.getWrapperMoneyLinesClasses()),S=system.createClass(getClasses.getWrapperBreakdownClasses()),v=system.createStyle({...getStyles.getWrapperMoneyLinesStyles(u,C)});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:b,onClick:j,role:"button",tabIndex:0,"aria-hidden":"true",children:[jsxRuntime.jsx(Text.default,{className:k,styles:{direction:m},setting:{text:y?e.contentHide||"Hide price breakdown":e.contentShow||"Show price breakdown",options:{isCannotEditing:!0}}}),jsxRuntime.jsx("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:P,children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0187 10.3598C10.7759 10.5853 10.3963 10.5712 10.1708 10.3284L8.01045 8.00191L5.85012 10.3284C5.62464 10.5712 5.245 10.5853 5.00218 10.3598C4.75935 10.1343 4.74529 9.75469 4.97077 9.51187L7.57077 6.71187C7.6843 6.58961 7.84361 6.52014 8.01045 6.52014C8.17729 6.52014 8.3366 6.58961 8.45012 6.71187L11.0501 9.51187C11.2756 9.75469 11.2615 10.1343 11.0187 10.3598Z",fill:"#1879B9"})})]}),jsxRuntime.jsx("div",{className:q}),y?jsxRuntime.jsx("div",{className:S,children:jsxRuntime.jsxs("div",{...w,className:R,style:h,id:`shopify-text-element-${i?.uid}`,"data-product-id":x,children:[jsxRuntime.jsx("div",{className:L,style:v,children:g().map(e=>jsxRuntime.jsxs(React.Fragment,{children:["totalLabel"===e.uniqueId&&g().length>1&&jsxRuntime.jsx("hr",{}),jsxRuntime.jsx("div",{children:jsxRuntime.jsx(MoneyLine.default,{uniqueId:e.uniqueId,direction:m,builderPropsUID:i?.uid,title:"totalLabel"===e.uniqueId?`<b>${e.title}</b>`:e.title,money:e.money,tooltipData:e.tooltip,labelTextStyles:{typo:{...l},direction:m},moneyTextStyles:{typo:n},subTitle:e.subTitle})},e.uniqueId)]},e.uniqueId))}),a]})}):null]})};exports.default=PostPurchaseProductPriceBreakdown;
|
|
@@ -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"),Tooltip=require("../../../../common/components/Tooltip.js"),Text=require("../../../text/components/Text.js"),system=require("@gem-sdk/system"),getClasses=require("../../helpers/product-price-breakdown/getClasses.js"),getStyles=require("../../helpers/product-price-breakdown/getStyles.js");const MoneyLine=({uniqueId:e,title:s,money:t,labelTextStyles:r,moneyTextStyles:
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Tooltip=require("../../../../common/components/Tooltip.js"),Text=require("../../../text/components/Text.js"),system=require("@gem-sdk/system"),getClasses=require("../../helpers/product-price-breakdown/getClasses.js"),getStyles=require("../../helpers/product-price-breakdown/getStyles.js");const MoneyLine=({uniqueId:e,title:s,money:t,labelTextStyles:r,moneyTextStyles:i,builderPropsUID:o,tooltipData:l,direction:n,subTitle:a})=>{let u=core.useProduct(),c=u?.baseID?.replace("gid://shopify/Product/",""),x=system.createClass(getClasses.getMoneyRowClasses(n)),d=system.createClass(getClasses.getTextLabelMoneyClasses(n)),m=system.createClass(getClasses.getTextValueMoneyClasses(n)),p=getStyles.getLabelTextStyles(n,r);return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:x,children:[jsxRuntime.jsx(Text.default,{className:d,setting:{text:s,options:{uniqueId:`${e}-${o}-${c}`,productID:c,useState:!0}},styles:p}),l?jsxRuntime.jsx(Tooltip.default,{tooltip:l.content||"",width:l.width||""}):jsxRuntime.jsx(Text.default,{className:m,setting:{text:t,options:{isCannotEditing:!0}},styles:i})]}),a&&jsxRuntime.jsx("div",{className:"gp-text-xs gp-font-normal gp-leading-5 gp-text-[#737373]",children:a})]})};exports.default=MoneyLine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),helper=require("../../../../common/helper.js");const getSubscriptionStyles=(e,r)=>{let{sellingType:t}=r??{},{width:
|
|
1
|
+
"use strict";var SubscriptionBgColorEnum,core=require("@gem-sdk/core"),helper=require("../../../../common/helper.js");!function(e){e.info="#f0f8ff",e.success="#E8F8EB",e.warning="#FFF8E0",e.critical="#FFEBEB",e.none="#FAFAFA"}(SubscriptionBgColorEnum||(SubscriptionBgColorEnum={}));const getSubscriptionStyles=(e,r)=>{let{sellingType:t}=r??{},{width:o,backgroundColor:i,sellingPlanItemGap:s}=e??{},n=helper.postPurchaseSpacing[s??"tight"]||"9px",c=core.makeStyle({rg:"subscription"===t?n:"9px"}),p=core.makeStyleResponsive("w",core.makeWidth(o)),u=i?{backgroundColor:SubscriptionBgColorEnum[i]??SubscriptionBgColorEnum.none}:{};return core.filterTruthyStyles({...p,...u,...c})},getSubscriptionWrapperStyles=e=>core.filterTruthyStyles({...core.makeStyle({ai:e??"left"})});exports.getSubscriptionStyles=getSubscriptionStyles,exports.getSubscriptionWrapperStyles=getSubscriptionWrapperStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var React=require("react"),core=require("@gem-sdk/core"),extractSellingPlanSettings=require("../common/extractSellingPlanSettings.js");const useSellingSubscription=e=>{let l=core.useProduct(),
|
|
1
|
+
"use strict";var React=require("react"),core=require("@gem-sdk/core"),extractSellingPlanSettings=require("../common/extractSellingPlanSettings.js");const useSellingSubscription=e=>{let l=core.useProduct(),n=core.useVariants(),{selectedOptions:t}=core.useSelectedOption(),s=core.usePageStore(e=>e.sellingPlanMeta),u=core.useEditorMode(),i=React.useRef(!1);React.useEffect(()=>{if(!i.current&&u===core.RenderModeEnv.EDIT&&!s){let e=new CustomEvent("element-subscription-mount");globalThis.dispatchEvent(e),i.current=!0}},[u,s]);let r=s??e?.sellingPlans,a=React.useMemo(()=>{if(!r)return{sourceApp:void 0,group:void 0,defaultOptions:void 0};let e=null;return s&&t&&(e=n.find(e=>!!e?.selectedOptions&&e.selectedOptions.every(e=>t[e.name??""]===e.value))??null),extractSellingPlanSettings.extractSellingPlanSettings({sellingPlansSetting:r,currentVariant:e,product:l,isFromEvent:!!s})},[r,s,n,t,l]),o=React.useMemo(()=>{if(!t||!n||0===n.length)return null;let e=n.find(e=>!!e?.selectedOptions&&e.selectedOptions.every(e=>t[e.name??""]===e.value))??null;return e},[t,n]),{sellingPlans:c,defaultValue:p}=React.useMemo(()=>{let e,n;let t=o?.sellingPlanGroups??l?.sellingPlanGroups??[];if(!t||0===t.length)return{sellingPlans:[],defaultValue:void 0};"__unknown__"===a.sourceApp?a.group&&(e=t.find(e=>null!=e&&e.id===a.group)):a.sourceApp&&a.group&&(e=t.find(e=>null!=e&&e.appID===a.sourceApp&&e.id===a.group)),e??(e=t[0]);let s=e?.sellingPlans?.filter(e=>null!=e).map(e=>({label:e.name,value:e.baseID}))??[];if(a.defaultOptions){let l=e?.sellingPlans?.find(e=>null!=e&&e.baseID===a.defaultOptions),t=e?.sellingPlans?.find(e=>null!=e&&e.id===a.defaultOptions);n=l?.baseID??t?.baseID??s[0]?.value}else n=s[0]?.value;return{sellingPlans:s,defaultValue:n}},[l,o,a]);return{sellingPlans:c,defaultValue:p}};exports.useSellingSubscription=useSellingSubscription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),useDynamicProduct=require("./useDynamicProduct.js");const useGetMoneyLines=(e,t)=>{let{isDynamicProduct:o,dynamicPrice:u,dynamicDiscount:i,isEnableDynamicDiscount:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),useDynamicProduct=require("./useDynamicProduct.js");const useGetMoneyLines=(e,t)=>{let{isDynamicProduct:o,dynamicPrice:u,dynamicDiscount:i,isEnableDynamicDiscount:s}=useDynamicProduct.useDynamicProduct(),a=core.useProductOfferDiscount(),n=core.useCurrentVariant(),{quantity:r}=core.useQuantity(),{t:l}=core.useI18nStore(),c=a*(r||1),b=core.useFormatMoney(c,!1),p=core.convertDecimalToNumber(n?.price)??0,d=p*(r||1),h=core.useFormatMoney(d,!1),L=core.shopifyPriceRounding(c,2),y=core.useFormatMoney(d-parseFloat(L),!1),m=()=>{let n=[];return!1!==e.isShowSubTotalLabel&&n.push({title:t.subTotalLabel,money:o?u:h,uniqueId:"subTotalLabel"}),!1!==e.isShowDiscountLabel&&n.push({title:t.discountLabel,money:o&&i&&s?`${i.value}%`:a>0?b:"No discount",uniqueId:"discountLabel"}),!1!==e.isShowShippingLabel&&n.push({title:t.shippingLabel,uniqueId:"shippingLabel",tooltip:{content:"Shipping fee will be calculated on real offer page",width:"23em"}}),!1!==e.isShowTaxesLabel&&n.push({title:t.taxesLabel,uniqueId:"taxesLabel",tooltip:{content:"Taxes will be calculated on real offer page",width:"20em"}}),!1!==e.isShowTotalLabel&&n.push({title:t.totalLabel,money:o?u:y,uniqueId:"totalLabel"}),t?.isShowRecurringTotalLabel!==!1&&n.push({title:l("Recurring subtotal"),money:"$20.00 every week",uniqueId:"recurringTotalLabel",subTitle:l("Doesn't include shipping, tax or duties")}),n};return{getMoneyLines:m}};exports.useGetMoneyLines=useGetMoneyLines;
|
|
@@ -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/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
|
+
"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/common/styles.js"),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
|
-
"use strict";var constants=require("../../../../common/constants.js");const ProductPriceBreakdownSettings=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"subTotalLabel",type:"input",default:"Sub total",emptyOnClear:!0},{id:"discountLabel",type:"input",default:"Discount",emptyOnClear:!0},{id:"shippingLabel",type:"input",default:"Shipping",emptyOnClear:!0},{id:"taxesLabel",type:"input",default:"Taxes",emptyOnClear:!0},{id:"totalLabel",type:"input",default:"Total",emptyOnClear:!0},{id:"contentShow",type:"input",default:"Show price breakdown",fallbackValue:"Show price breakdown",clearButton:!1},{id:"contentHide",type:"input",default:"Hide price breakdown",fallbackValue:"Hide price breakdown",clearButton:!1}]},{id:"style",controls:[{id:"labelStyle",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"moneyStyle",label:"Money value",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"isShowPrice",label:"Expand price breakdown",type:"toggle",default:!0},{id:"isShowSubTotalLabel",label:"Sub total",type:"toggle",default:!0},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"isShowDiscountLabel",label:"Discount",type:"toggle",default:!0},{id:"isShowShippingLabel",label:"Shipping",type:"toggle",default:!0},{id:"isShowTaxesLabel",label:"Taxes",type:"toggle",default:!0},{id:"isShowTotalLabel",label:"Total",type:"toggle",default:!0},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",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:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{type:"select",label:"Spacing",id:"spacing",options:constants.postPurchaseSpacing,default:"none"}]}];exports.ProductPriceBreakdownSettings=ProductPriceBreakdownSettings;
|
|
1
|
+
"use strict";var constants=require("../../../../common/constants.js");const ProductPriceBreakdownSettings=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"subTotalLabel",type:"input",default:"Sub total",emptyOnClear:!0},{id:"discountLabel",type:"input",default:"Discount",emptyOnClear:!0},{id:"shippingLabel",type:"input",default:"Shipping",emptyOnClear:!0},{id:"taxesLabel",type:"input",default:"Taxes",emptyOnClear:!0},{id:"totalLabel",type:"input",default:"Total",emptyOnClear:!0},{id:"contentShow",type:"input",default:"Show price breakdown",fallbackValue:"Show price breakdown",clearButton:!1},{id:"contentHide",type:"input",default:"Hide price breakdown",fallbackValue:"Hide price breakdown",clearButton:!1},{id:"isShowRecurringTotalLabel",label:"Recurring price",type:"toggle",default:!0}]},{id:"style",controls:[{id:"labelStyle",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"moneyStyle",label:"Money value",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"isShowPrice",label:"Expand price breakdown",type:"toggle",default:!0},{id:"isShowSubTotalLabel",label:"Sub total",type:"toggle",default:!0},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"isShowDiscountLabel",label:"Discount",type:"toggle",default:!0},{id:"isShowShippingLabel",label:"Shipping",type:"toggle",default:!0},{id:"isShowTaxesLabel",label:"Taxes",type:"toggle",default:!0},{id:"isShowTotalLabel",label:"Total",type:"toggle",default:!0},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",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:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{type:"select",label:"Spacing",id:"spacing",options:constants.postPurchaseSpacing,default:"none"}]}];exports.ProductPriceBreakdownSettings=ProductPriceBreakdownSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const SettingUIV2=[{controls:[{type:"control",setting:{id:"discountAndShippingFee"},layout:"vertical"}]},{label:{en:"Content"},controls:[{label:{en:"Show"},popoverLabel:{en:"Show button"},type:"combo",iconName:"polaris-text-block",compoDefaultValue:"Show",getValueFromSettingID:"contentShow",disableClearMessage:"This content is needed for customers <br> to show the price breakdown",layout:"horizontal",controls:[{setting:{id:"contentShow"},label:{en:"Content"},layout:"vertical",isHideClear:!0}]},{label:{en:"Hide"},popoverLabel:{en:"Hide button"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"contentHide",disableClearMessage:"This content is needed for customers <br> to hide the price breakdown",layout:"horizontal",controls:[{setting:{id:"contentHide"},label:{en:"Content"},layout:"vertical"}]}]},{label:{en:"Label"},controls:[{setting:{id:"labelStyle"},layout:"vertical"}]},{label:{en:"Money value"},controls:[{setting:{id:"moneyStyle"},layout:"vertical"}]},{label:{en:"Item spacing"},controls:[{label:{en:"Item gap"},setting:{id:"spacing"},layout:"horizontal"}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"width"},layout:"horizontal"}]},{label:{en:"Price breakdown option"},controls:[{label:{en:"Direction"},setting:{id:"direction"},layout:"horizontal"},{label:{en:"Auto-expand"},setting:{id:"isShowPrice"},layout:"horizontal"}],moreSettings:{type:"collapse",controls:[{label:{en:"Sub total"},setting:{id:"isShowSubTotalLabel"},layout:"horizontal"},{label:{en:"Discount"},setting:{id:"isShowDiscountLabel"},layout:"horizontal"},{label:{en:"Shipping"},setting:{id:"isShowShippingLabel"},layout:"horizontal"},{label:{en:"Taxes"},setting:{id:"isShowTaxesLabel"},layout:"horizontal"},{label:{en:"Total"},setting:{id:"isShowTotalLabel"},layout:"horizontal"}]}},{controls:[{type:"control",label:{en:"Align"},setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];exports.SettingUIV2=SettingUIV2;
|
|
1
|
+
"use strict";const SettingUIV2=[{controls:[{type:"control",setting:{id:"discountAndShippingFee"},layout:"vertical"}]},{label:{en:"Content"},controls:[{label:{en:"Show"},popoverLabel:{en:"Show button"},type:"combo",iconName:"polaris-text-block",compoDefaultValue:"Show",getValueFromSettingID:"contentShow",disableClearMessage:"This content is needed for customers <br> to show the price breakdown",layout:"horizontal",controls:[{setting:{id:"contentShow"},label:{en:"Content"},layout:"vertical",isHideClear:!0}]},{label:{en:"Hide"},popoverLabel:{en:"Hide button"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"contentHide",disableClearMessage:"This content is needed for customers <br> to hide the price breakdown",layout:"horizontal",controls:[{setting:{id:"contentHide"},label:{en:"Content"},layout:"vertical"}]}]},{label:{en:"Label"},controls:[{setting:{id:"labelStyle"},layout:"vertical"}]},{label:{en:"Money value"},controls:[{setting:{id:"moneyStyle"},layout:"vertical"}]},{label:{en:"Item spacing"},controls:[{label:{en:"Item gap"},setting:{id:"spacing"},layout:"horizontal"}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"width"},layout:"horizontal"}]},{label:{en:"Price breakdown option"},controls:[{label:{en:"Direction"},setting:{id:"direction"},layout:"horizontal"},{label:{en:"Auto-expand"},setting:{id:"isShowPrice"},layout:"horizontal"}],moreSettings:{type:"collapse",controls:[{label:{en:"Sub total"},setting:{id:"isShowSubTotalLabel"},layout:"horizontal"},{label:{en:"Discount"},setting:{id:"isShowDiscountLabel"},layout:"horizontal"},{label:{en:"Shipping"},setting:{id:"isShowShippingLabel"},layout:"horizontal"},{label:{en:"Taxes"},setting:{id:"isShowTaxesLabel"},layout:"horizontal"},{label:{en:"Total"},setting:{id:"isShowTotalLabel"},layout:"horizontal"},{label:{en:"Recurring price"},setting:{id:"isShowRecurringTotalLabel"},layout:"horizontal"}]}},{controls:[{type:"control",label:{en:"Align"},setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];exports.SettingUIV2=SettingUIV2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var constants=require("../../../../common/constants.js");const ProductSubscriptionSettings=[{id:"setting",controls:[{id:"sellingType",label:"Type",type:"pick-subscription",options:[{value:"one-time",label:"One-time"},{value:"subscription",label:"Subscription"}],default:"subscription"},{id:"sellingPlans",label:"Selling plans",type:"selling-plan"},{id:"sellingTitle",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"Subscribe and save up to {total_max_discount}",suggestContents:[{message:"{total_max_discount}",eg:"E.g: 50% (offer’s + plan’s max discount)"},{message:"{offer_selling_plan_discount}",eg:"E.g: 20%"}]},{id:"sellingLabel",label:"Text",type:"input",default:"Purchase options",placeholder:"E.g. Purchase options",clearButton:!1},{id:"sellingTitleOneTime",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"One-time purchase",suggestContents:[]},{id:"sellingStyle",label:"Style",type:"option:illustration",default:"dropdown",options:[{label:"Dropdown",value:"dropdown",svgName:"gp-selling-plan-dropdown"},{label:"Radio",value:"radio",svgName:"gp-selling-plan-radio"}]},{id:"subscriptionLabel",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"Delivery every {selling_plan_delivery_frequency}, save {selling_plan_discount}",suggestContents:[{message:"{selling_plan_delivery_frequency}",eg:"E.g: every week"},{message:"{selling_plan_discount}",eg:"E.g: 10%"},{message:"{selling_plan_billing_cycle}",eg:"E.g: every 1 month"}]},{id:"enableSubscriptionDetail",label:"Enable subscription detail",type:"toggle",default:!1}]},{id:"style",controls:[{id:"sellingTitleDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"sellingTitleOneTimeDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"subscriptionDetailDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"sellingPlanItemGap",type:"select",label:"Item gap",options:constants.postPurchaseSpacing,default:"tight"},{id:"sellingTitleTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"sellingTitleAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"sellingTitleOneTimeTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"sellingTitleOneTimeAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"subscriptionDetailTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"subscriptionDetailAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"backgroundColor",type:"
|
|
1
|
+
"use strict";var constants=require("../../../../common/constants.js");const ProductSubscriptionSettings=[{id:"setting",controls:[{id:"sellingType",label:"Type",type:"pick-subscription",options:[{value:"one-time",label:"One-time"},{value:"subscription",label:"Subscription"}],default:"subscription"},{id:"sellingPlans",label:"Selling plans",type:"selling-plan"},{id:"sellingTitle",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"Subscribe and save up to {total_max_discount}",suggestContents:[{message:"{total_max_discount}",eg:"E.g: 50% (offer’s + plan’s max discount)"},{message:"{offer_selling_plan_discount}",eg:"E.g: 20%"}]},{id:"sellingLabel",label:"Text",type:"input",default:"Purchase options",placeholder:"E.g. Purchase options",clearButton:!1},{id:"sellingTitleOneTime",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"One-time purchase",suggestContents:[]},{id:"sellingStyle",label:"Style",type:"option:illustration",default:"dropdown",options:[{label:"Dropdown",value:"dropdown",svgName:"gp-selling-plan-dropdown"},{label:"Radio",value:"radio",svgName:"gp-selling-plan-radio"}]},{id:"subscriptionLabel",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"Delivery every {selling_plan_delivery_frequency}, save {selling_plan_discount}",suggestContents:[{message:"{selling_plan_delivery_frequency}",eg:"E.g: every week"},{message:"{selling_plan_discount}",eg:"E.g: 10%"},{message:"{selling_plan_billing_cycle}",eg:"E.g: every 1 month"}]},{id:"enableSubscriptionDetail",label:"Enable subscription detail",type:"toggle",default:!1}]},{id:"style",controls:[{id:"sellingTitleDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"sellingTitleOneTimeDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"subscriptionDetailDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"sellingPlanItemGap",type:"select",label:"Item gap",options:constants.postPurchaseSpacing,default:"tight"},{id:"sellingTitleTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"sellingTitleAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"sellingTitleOneTimeTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"sellingTitleOneTimeAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"subscriptionDetailTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"subscriptionDetailAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"backgroundColor",type:"select",label:"Background Color",options:[{label:"Transparent",value:"none",icon:"gp-bg-transparent"},{label:"Red",value:"critical",icon:"gp-bg-color-red"},{label:"Blue",value:"info",icon:"gp-bg-color-blue"},{label:"Green",value:"success",icon:"gp-bg-color-green"},{label:"Yellow",value:"warning",icon:"gp-bg-color-yellow"}],default:"none"},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",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:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"}]}];exports.ProductSubscriptionSettings=ProductSubscriptionSettings;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{Fragment as i}from"react";import{useProduct as r}from"@gem-sdk/core";import{createStyle as s,createAttr as
|
|
2
|
+
import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{Fragment as i}from"react";import{useProduct as r}from"@gem-sdk/core";import{createStyle as s,createAttr as l,createClass as d}from"@gem-sdk/system";import{getIconCollapseClassesRotate as n,getContainerPriceBreakdownClasses as a,getWrapperLabelClasses as c,getLabelClasses as m,getDividerClasses as p,getWrapperMoneyLinesClasses as u,getWrapperBreakdownClasses as h}from"../helpers/product-price-breakdown/getClasses.js";import{getStyle as f,getWrapperMoneyLinesStyles as b}from"../helpers/product-price-breakdown/getStyles.js";import{useGetItemGapPriceBreakdown as w}from"../hooks/useGetItemGapPriceBreakdown.js";import{useSetCollapsePrice as y}from"../hooks/useSetCollapsePrice.js";import k from"./price-breakdown/MoneyLine.js";import g from"../../text/components/Text.js";import{useGetMoneyLines as P}from"../hooks/useGetMoneyLines.js";let PostPurchaseProductPriceBreakdown=({setting:v={},styles:x={},style:C,builderAttrs:I,builderProps:j,children:L})=>{let{labelStyle:N,moneyStyle:q,spacing:S,width:B,align:T,isShowPrice:D,direction:G}=x,M=r(),H=M?.baseID?.replace("gid://shopify/Product/",""),{isCollapsePrice:R,onClickLabelPriceBreakdown:$}=y(D),{itemGap:E}=w(S),{getMoneyLines:F}=P(x,v),U=s({...f(C)}),Z=l({...I}),z=d(n(R)),A=d(a(T,j?.uid)),J=d(c(G)),K=d(m()),O=d(p()),Q=d(u()),V=d(h()),W=s({...b(B,E)});return e(t,{children:[e("div",{className:J,onClick:$,role:"button",tabIndex:0,"aria-hidden":"true",children:[o(g,{className:K,styles:{direction:G},setting:{text:R?v.contentHide||"Hide price breakdown":v.contentShow||"Show price breakdown",options:{isCannotEditing:!0}}}),o("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:z,children:o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0187 10.3598C10.7759 10.5853 10.3963 10.5712 10.1708 10.3284L8.01045 8.00191L5.85012 10.3284C5.62464 10.5712 5.245 10.5853 5.00218 10.3598C4.75935 10.1343 4.74529 9.75469 4.97077 9.51187L7.57077 6.71187C7.6843 6.58961 7.84361 6.52014 8.01045 6.52014C8.17729 6.52014 8.3366 6.58961 8.45012 6.71187L11.0501 9.51187C11.2756 9.75469 11.2615 10.1343 11.0187 10.3598Z",fill:"#1879B9"})})]}),o("div",{className:O}),R?o("div",{className:V,children:e("div",{...Z,className:A,style:U,id:`shopify-text-element-${j?.uid}`,"data-product-id":H,children:[o("div",{className:Q,style:W,children:F().map(t=>e(i,{children:["totalLabel"===t.uniqueId&&F().length>1&&o("hr",{}),o("div",{children:o(k,{uniqueId:t.uniqueId,direction:G,builderPropsUID:j?.uid,title:"totalLabel"===t.uniqueId?`<b>${t.title}</b>`:t.title,money:t.money,tooltipData:t.tooltip,labelTextStyles:{typo:{...N},direction:G},moneyTextStyles:{typo:q},subTitle:t.subTitle})},t.uniqueId)]},t.uniqueId))}),L]})}):null]})};export{PostPurchaseProductPriceBreakdown as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useProduct as o}from"@gem-sdk/core";import s from"../../../../common/components/Tooltip.js";import r from"../../../text/components/Text.js";import{createClass as i}from"@gem-sdk/system";import{getMoneyRowClasses as
|
|
2
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{useProduct as o}from"@gem-sdk/core";import s from"../../../../common/components/Tooltip.js";import r from"../../../text/components/Text.js";import{createClass as i}from"@gem-sdk/system";import{getMoneyRowClasses as n,getTextLabelMoneyClasses as m,getTextValueMoneyClasses as p}from"../../helpers/product-price-breakdown/getClasses.js";import{getLabelTextStyles as d}from"../../helpers/product-price-breakdown/getStyles.js";let MoneyLine=({uniqueId:l,title:a,money:c,labelTextStyles:g,moneyTextStyles:f,builderPropsUID:u,tooltipData:x,direction:h,subTitle:y})=>{let j=o(),k=j?.baseID?.replace("gid://shopify/Product/",""),w=i(n(h)),N=i(m(h)),b=i(p(h)),v=d(h,g);return t("div",{children:[t("div",{className:w,children:[e(r,{className:N,setting:{text:a,options:{uniqueId:`${l}-${u}-${k}`,productID:k,useState:!0}},styles:v}),x?e(s,{tooltip:x.content||"",width:x.width||""}):e(r,{className:b,setting:{text:c,options:{isCannotEditing:!0}},styles:f})]}),y&&e("div",{className:"gp-text-xs gp-font-normal gp-leading-5 gp-text-[#737373]",children:y})]})};export{MoneyLine as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyle as
|
|
1
|
+
var SubscriptionBgColorEnum;import{makeStyle as o,makeStyleResponsive as r,makeWidth as i,filterTruthyStyles as t}from"@gem-sdk/core";import{postPurchaseSpacing as n}from"../../../../common/helper.js";!function(o){o.info="#f0f8ff",o.success="#E8F8EB",o.warning="#FFF8E0",o.critical="#FFEBEB",o.none="#FAFAFA"}(SubscriptionBgColorEnum||(SubscriptionBgColorEnum={}));let getSubscriptionStyles=(e,p)=>{let{sellingType:s}=p??{},{width:u,backgroundColor:c,sellingPlanItemGap:l}=e??{},g=n[l??"tight"]||"9px",S=o({rg:"subscription"===s?g:"9px"}),m=r("w",i(u)),b=c?{backgroundColor:SubscriptionBgColorEnum[c]??SubscriptionBgColorEnum.none}:{};return t({...m,...b,...S})},getSubscriptionWrapperStyles=r=>t({...o({ai:r??"left"})});export{getSubscriptionStyles,getSubscriptionWrapperStyles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as e,useEffect as l,useMemo as n}from"react";import{useProduct as t,useVariants as i,useSelectedOption as s,usePageStore as u,useEditorMode as r,RenderModeEnv as
|
|
1
|
+
import{useRef as e,useEffect as l,useMemo as n}from"react";import{useProduct as t,useVariants as i,useSelectedOption as s,usePageStore as u,useEditorMode as r,RenderModeEnv as o}from"@gem-sdk/core";import{extractSellingPlanSettings as a}from"../common/extractSellingPlanSettings.js";let useSellingSubscription=p=>{let d=t(),g=i(),{selectedOptions:f}=s(),c=u(e=>e.sellingPlanMeta),m=r(),v=e(!1);l(()=>{if(!v.current&&m===o.EDIT&&!c){let e=new CustomEvent("element-subscription-mount");globalThis.dispatchEvent(e),v.current=!0}},[m,c]);let P=c??p?.sellingPlans,b=n(()=>{if(!P)return{sourceApp:void 0,group:void 0,defaultOptions:void 0};let e=null;return c&&f&&(e=g.find(e=>!!e?.selectedOptions&&e.selectedOptions.every(e=>f[e.name??""]===e.value))??null),a({sellingPlansSetting:P,currentVariant:e,product:d,isFromEvent:!!c})},[P,c,g,f,d]),O=n(()=>{if(!f||!g||0===g.length)return null;let e=g.find(e=>!!e?.selectedOptions&&e.selectedOptions.every(e=>f[e.name??""]===e.value))??null;return e},[f,g]),{sellingPlans:D,defaultValue:I}=n(()=>{let e,l;let n=O?.sellingPlanGroups??d?.sellingPlanGroups??[];if(!n||0===n.length)return{sellingPlans:[],defaultValue:void 0};"__unknown__"===b.sourceApp?b.group&&(e=n.find(e=>null!=e&&e.id===b.group)):b.sourceApp&&b.group&&(e=n.find(e=>null!=e&&e.appID===b.sourceApp&&e.id===b.group)),e??(e=n[0]);let t=e?.sellingPlans?.filter(e=>null!=e).map(e=>({label:e.name,value:e.baseID}))??[];if(b.defaultOptions){let n=e?.sellingPlans?.find(e=>null!=e&&e.baseID===b.defaultOptions),i=e?.sellingPlans?.find(e=>null!=e&&e.id===b.defaultOptions);l=n?.baseID??i?.baseID??t[0]?.value}else l=t[0]?.value;return{sellingPlans:t,defaultValue:l}},[d,O,b]);return{sellingPlans:D,defaultValue:I}};export{useSellingSubscription};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useProductOfferDiscount as e,useCurrentVariant as t,useQuantity as l,
|
|
1
|
+
import{useProductOfferDiscount as e,useCurrentVariant as t,useQuantity as l,useI18nStore as i,useFormatMoney as o,convertDecimalToNumber as a,shopifyPriceRounding as u}from"@gem-sdk/core";import{useDynamicProduct as n}from"./useDynamicProduct.js";let useGetMoneyLines=(s,r)=>{let{isDynamicProduct:p,dynamicPrice:b,dynamicDiscount:h,isEnableDynamicDiscount:L}=n(),c=e(),d=t(),{quantity:m}=l(),{t:g}=i(),w=c*(m||1),S=o(w,!1),T=a(d?.price)??0,y=T*(m||1),f=o(y,!1),q=u(w,2),x=o(y-parseFloat(q),!1),I=()=>{let e=[];return!1!==s.isShowSubTotalLabel&&e.push({title:r.subTotalLabel,money:p?b:f,uniqueId:"subTotalLabel"}),!1!==s.isShowDiscountLabel&&e.push({title:r.discountLabel,money:p&&h&&L?`${h.value}%`:c>0?S:"No discount",uniqueId:"discountLabel"}),!1!==s.isShowShippingLabel&&e.push({title:r.shippingLabel,uniqueId:"shippingLabel",tooltip:{content:"Shipping fee will be calculated on real offer page",width:"23em"}}),!1!==s.isShowTaxesLabel&&e.push({title:r.taxesLabel,uniqueId:"taxesLabel",tooltip:{content:"Taxes will be calculated on real offer page",width:"20em"}}),!1!==s.isShowTotalLabel&&e.push({title:r.totalLabel,money:p?b:x,uniqueId:"totalLabel"}),r?.isShowRecurringTotalLabel!==!1&&e.push({title:g("Recurring subtotal"),money:"$20.00 every week",uniqueId:"recurringTotalLabel",subTitle:g("Doesn't include shipping, tax or duties")}),e};return{getMoneyLines:I}};export{useGetMoneyLines};
|
|
@@ -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/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 u from"./settings/product-discount-tag/ProductDiscountTag.js";import p 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:u,PostPurchaseProductImages:m,PostPurchaseProductSubscription:p};export{postPurchaseProductSetting};
|
|
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/common/styles.js";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 u from"./settings/product-discount-tag/ProductDiscountTag.js";import p 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:u,PostPurchaseProductImages:m,PostPurchaseProductSubscription:p};export{postPurchaseProductSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{postPurchaseSpacing as e}from"../../../../common/constants.js";let ProductPriceBreakdownSettings=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"subTotalLabel",type:"input",default:"Sub total",emptyOnClear:!0},{id:"discountLabel",type:"input",default:"Discount",emptyOnClear:!0},{id:"shippingLabel",type:"input",default:"Shipping",emptyOnClear:!0},{id:"taxesLabel",type:"input",default:"Taxes",emptyOnClear:!0},{id:"totalLabel",type:"input",default:"Total",emptyOnClear:!0},{id:"contentShow",type:"input",default:"Show price breakdown",fallbackValue:"Show price breakdown",clearButton:!1},{id:"contentHide",type:"input",default:"Hide price breakdown",fallbackValue:"Hide price breakdown",clearButton:!1}]},{id:"style",controls:[{id:"labelStyle",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"moneyStyle",label:"Money value",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"isShowPrice",label:"Expand price breakdown",type:"toggle",default:!0},{id:"isShowSubTotalLabel",label:"Sub total",type:"toggle",default:!0},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"isShowDiscountLabel",label:"Discount",type:"toggle",default:!0},{id:"isShowShippingLabel",label:"Shipping",type:"toggle",default:!0},{id:"isShowTaxesLabel",label:"Taxes",type:"toggle",default:!0},{id:"isShowTotalLabel",label:"Total",type:"toggle",default:!0},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",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:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{type:"select",label:"Spacing",id:"spacing",options:e,default:"none"}]}];export{ProductPriceBreakdownSettings};
|
|
1
|
+
import{postPurchaseSpacing as e}from"../../../../common/constants.js";let ProductPriceBreakdownSettings=[{id:"setting",controls:[{id:"discountAndShippingFee",type:"discount-and-shipping-fee-product-offer",multiple:!1},{id:"subTotalLabel",type:"input",default:"Sub total",emptyOnClear:!0},{id:"discountLabel",type:"input",default:"Discount",emptyOnClear:!0},{id:"shippingLabel",type:"input",default:"Shipping",emptyOnClear:!0},{id:"taxesLabel",type:"input",default:"Taxes",emptyOnClear:!0},{id:"totalLabel",type:"input",default:"Total",emptyOnClear:!0},{id:"contentShow",type:"input",default:"Show price breakdown",fallbackValue:"Show price breakdown",clearButton:!1},{id:"contentHide",type:"input",default:"Hide price breakdown",fallbackValue:"Hide price breakdown",clearButton:!1},{id:"isShowRecurringTotalLabel",label:"Recurring price",type:"toggle",default:!0}]},{id:"style",controls:[{id:"labelStyle",label:"Label",type:"typography-post-purchase",default:{fontSize:"medium",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"moneyStyle",label:"Money value",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"isShowPrice",label:"Expand price breakdown",type:"toggle",default:!0},{id:"isShowSubTotalLabel",label:"Sub total",type:"toggle",default:!0},{id:"direction",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"isShowDiscountLabel",label:"Discount",type:"toggle",default:!0},{id:"isShowShippingLabel",label:"Shipping",type:"toggle",default:!0},{id:"isShowTaxesLabel",label:"Taxes",type:"toggle",default:!0},{id:"isShowTotalLabel",label:"Total",type:"toggle",default:!0},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",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:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"}},displayOptions:[{label:"Full",value:"100%",showValue:!0}]},{type:"select",label:"Spacing",id:"spacing",options:e,default:"none"}]}];export{ProductPriceBreakdownSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let SettingUIV2=[{controls:[{type:"control",setting:{id:"discountAndShippingFee"},layout:"vertical"}]},{label:{en:"Content"},controls:[{label:{en:"Show"},popoverLabel:{en:"Show button"},type:"combo",iconName:"polaris-text-block",compoDefaultValue:"Show",getValueFromSettingID:"contentShow",disableClearMessage:"This content is needed for customers <br> to show the price breakdown",layout:"horizontal",controls:[{setting:{id:"contentShow"},label:{en:"Content"},layout:"vertical",isHideClear:!0}]},{label:{en:"Hide"},popoverLabel:{en:"Hide button"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"contentHide",disableClearMessage:"This content is needed for customers <br> to hide the price breakdown",layout:"horizontal",controls:[{setting:{id:"contentHide"},label:{en:"Content"},layout:"vertical"}]}]},{label:{en:"Label"},controls:[{setting:{id:"labelStyle"},layout:"vertical"}]},{label:{en:"Money value"},controls:[{setting:{id:"moneyStyle"},layout:"vertical"}]},{label:{en:"Item spacing"},controls:[{label:{en:"Item gap"},setting:{id:"spacing"},layout:"horizontal"}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"width"},layout:"horizontal"}]},{label:{en:"Price breakdown option"},controls:[{label:{en:"Direction"},setting:{id:"direction"},layout:"horizontal"},{label:{en:"Auto-expand"},setting:{id:"isShowPrice"},layout:"horizontal"}],moreSettings:{type:"collapse",controls:[{label:{en:"Sub total"},setting:{id:"isShowSubTotalLabel"},layout:"horizontal"},{label:{en:"Discount"},setting:{id:"isShowDiscountLabel"},layout:"horizontal"},{label:{en:"Shipping"},setting:{id:"isShowShippingLabel"},layout:"horizontal"},{label:{en:"Taxes"},setting:{id:"isShowTaxesLabel"},layout:"horizontal"},{label:{en:"Total"},setting:{id:"isShowTotalLabel"},layout:"horizontal"}]}},{controls:[{type:"control",label:{en:"Align"},setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];export{SettingUIV2};
|
|
1
|
+
let SettingUIV2=[{controls:[{type:"control",setting:{id:"discountAndShippingFee"},layout:"vertical"}]},{label:{en:"Content"},controls:[{label:{en:"Show"},popoverLabel:{en:"Show button"},type:"combo",iconName:"polaris-text-block",compoDefaultValue:"Show",getValueFromSettingID:"contentShow",disableClearMessage:"This content is needed for customers <br> to show the price breakdown",layout:"horizontal",controls:[{setting:{id:"contentShow"},label:{en:"Content"},layout:"vertical",isHideClear:!0}]},{label:{en:"Hide"},popoverLabel:{en:"Hide button"},type:"combo",iconName:"polaris-text-block",getValueFromSettingID:"contentHide",disableClearMessage:"This content is needed for customers <br> to hide the price breakdown",layout:"horizontal",controls:[{setting:{id:"contentHide"},label:{en:"Content"},layout:"vertical"}]}]},{label:{en:"Label"},controls:[{setting:{id:"labelStyle"},layout:"vertical"}]},{label:{en:"Money value"},controls:[{setting:{id:"moneyStyle"},layout:"vertical"}]},{label:{en:"Item spacing"},controls:[{label:{en:"Item gap"},setting:{id:"spacing"},layout:"horizontal"}]},{label:{en:"Size"},controls:[{label:{en:"Width"},setting:{id:"width"},layout:"horizontal"}]},{label:{en:"Price breakdown option"},controls:[{label:{en:"Direction"},setting:{id:"direction"},layout:"horizontal"},{label:{en:"Auto-expand"},setting:{id:"isShowPrice"},layout:"horizontal"}],moreSettings:{type:"collapse",controls:[{label:{en:"Sub total"},setting:{id:"isShowSubTotalLabel"},layout:"horizontal"},{label:{en:"Discount"},setting:{id:"isShowDiscountLabel"},layout:"horizontal"},{label:{en:"Shipping"},setting:{id:"isShowShippingLabel"},layout:"horizontal"},{label:{en:"Taxes"},setting:{id:"isShowTaxesLabel"},layout:"horizontal"},{label:{en:"Total"},setting:{id:"isShowTotalLabel"},layout:"horizontal"},{label:{en:"Recurring price"},setting:{id:"isShowRecurringTotalLabel"},layout:"horizontal"}]}},{controls:[{type:"control",label:{en:"Align"},setting:{id:"align"},conditionEnable:'!(parseInt(width) >= 100 && width?.includes("%"))',options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"},layout:"horizontal"}]}];export{SettingUIV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{postPurchaseSpacing as e}from"../../../../common/constants.js";let ProductSubscriptionSettings=[{id:"setting",controls:[{id:"sellingType",label:"Type",type:"pick-subscription",options:[{value:"one-time",label:"One-time"},{value:"subscription",label:"Subscription"}],default:"subscription"},{id:"sellingPlans",label:"Selling plans",type:"selling-plan"},{id:"sellingTitle",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"Subscribe and save up to {total_max_discount}",suggestContents:[{message:"{total_max_discount}",eg:"E.g: 50% (offer’s + plan’s max discount)"},{message:"{offer_selling_plan_discount}",eg:"E.g: 20%"}]},{id:"sellingLabel",label:"Text",type:"input",default:"Purchase options",placeholder:"E.g. Purchase options",clearButton:!1},{id:"sellingTitleOneTime",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"One-time purchase",suggestContents:[]},{id:"sellingStyle",label:"Style",type:"option:illustration",default:"dropdown",options:[{label:"Dropdown",value:"dropdown",svgName:"gp-selling-plan-dropdown"},{label:"Radio",value:"radio",svgName:"gp-selling-plan-radio"}]},{id:"subscriptionLabel",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"Delivery every {selling_plan_delivery_frequency}, save {selling_plan_discount}",suggestContents:[{message:"{selling_plan_delivery_frequency}",eg:"E.g: every week"},{message:"{selling_plan_discount}",eg:"E.g: 10%"},{message:"{selling_plan_billing_cycle}",eg:"E.g: every 1 month"}]},{id:"enableSubscriptionDetail",label:"Enable subscription detail",type:"toggle",default:!1}]},{id:"style",controls:[{id:"sellingTitleDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"sellingTitleOneTimeDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"subscriptionDetailDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"sellingPlanItemGap",type:"select",label:"Item gap",options:e,default:"tight"},{id:"sellingTitleTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"sellingTitleAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"sellingTitleOneTimeTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"sellingTitleOneTimeAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"subscriptionDetailTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"subscriptionDetailAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"backgroundColor",type:"
|
|
1
|
+
import{postPurchaseSpacing as e}from"../../../../common/constants.js";let ProductSubscriptionSettings=[{id:"setting",controls:[{id:"sellingType",label:"Type",type:"pick-subscription",options:[{value:"one-time",label:"One-time"},{value:"subscription",label:"Subscription"}],default:"subscription"},{id:"sellingPlans",label:"Selling plans",type:"selling-plan"},{id:"sellingTitle",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"Subscribe and save up to {total_max_discount}",suggestContents:[{message:"{total_max_discount}",eg:"E.g: 50% (offer’s + plan’s max discount)"},{message:"{offer_selling_plan_discount}",eg:"E.g: 20%"}]},{id:"sellingLabel",label:"Text",type:"input",default:"Purchase options",placeholder:"E.g. Purchase options",clearButton:!1},{id:"sellingTitleOneTime",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"One-time purchase",suggestContents:[]},{id:"sellingStyle",label:"Style",type:"option:illustration",default:"dropdown",options:[{label:"Dropdown",value:"dropdown",svgName:"gp-selling-plan-dropdown"},{label:"Radio",value:"radio",svgName:"gp-selling-plan-radio"}]},{id:"subscriptionLabel",label:"Text",type:"textarea",defaultRows:4,showPlusBtn:!0,autoHeight:!0,minHeight:72,default:"Delivery every {selling_plan_delivery_frequency}, save {selling_plan_discount}",suggestContents:[{message:"{selling_plan_delivery_frequency}",eg:"E.g: every week"},{message:"{selling_plan_discount}",eg:"E.g: 10%"},{message:"{selling_plan_billing_cycle}",eg:"E.g: every 1 month"}]},{id:"enableSubscriptionDetail",label:"Enable subscription detail",type:"toggle",default:!1}]},{id:"style",controls:[{id:"sellingTitleDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"sellingTitleOneTimeDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"subscriptionDetailDirection",label:"Direction",type:"option:value",options:[{label:"LTR",value:"ltr"},{label:"RTL",value:"rtl"}],default:"ltr"},{id:"sellingPlanItemGap",type:"select",label:"Item gap",options:e,default:"tight"},{id:"sellingTitleTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"sellingTitleAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"sellingTitleOneTimeTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"sellingTitleOneTimeAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"subscriptionDetailTypo",label:"Label",type:"typography-post-purchase",default:{fontSize:"default",textColor:"default",fontWeight:"normal",textTransform:"none"}},{id:"subscriptionDetailAlign",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left",iconName:"polaris-text-align-left"},{label:"Center",value:"center",type:"text",tooltip:"Align center",iconName:"polaris-text-align-center"},{label:"Right",value:"right",type:"text",tooltip:"Align right",iconName:"polaris-text-align-right"}],default:"left"},{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},{id:"backgroundColor",type:"select",label:"Background Color",options:[{label:"Transparent",value:"none",icon:"gp-bg-transparent"},{label:"Red",value:"critical",icon:"gp-bg-color-red"},{label:"Blue",value:"info",icon:"gp-bg-color-blue"},{label:"Green",value:"success",icon:"gp-bg-color-green"},{label:"Yellow",value:"warning",icon:"gp-bg-color-yellow"}],default:"none"},{id:"align",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",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:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],default:"left"}]}];export{ProductSubscriptionSettings};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2587,9 +2587,9 @@ declare const postPurchaseButtonSetting: {
|
|
|
2587
2587
|
PostPurchaseButton: _gem_sdk_core.ComponentSetting<PostPurchaseButtonProps>;
|
|
2588
2588
|
};
|
|
2589
2589
|
|
|
2590
|
-
type TStatus = 'info' | 'success' | 'warning' | 'critical' | 'none';
|
|
2590
|
+
type TStatus$1 = 'info' | 'success' | 'warning' | 'critical' | 'none';
|
|
2591
2591
|
type BackgroundColor = {
|
|
2592
|
-
backgroundColor: TStatus | '';
|
|
2592
|
+
backgroundColor: TStatus$1 | '';
|
|
2593
2593
|
};
|
|
2594
2594
|
type CalloutBoxProps = RowProps & {
|
|
2595
2595
|
styles: BackgroundColor;
|
|
@@ -2904,6 +2904,7 @@ type PostPurchaseProductPriceBreakdownSettingProps = {
|
|
|
2904
2904
|
discountAndShippingFee?: boolean;
|
|
2905
2905
|
contentShow?: string;
|
|
2906
2906
|
contentHide?: string;
|
|
2907
|
+
isShowRecurringTotalLabel?: boolean;
|
|
2907
2908
|
};
|
|
2908
2909
|
type PostPurchaseProductPriceBreakdownStyleProps = {
|
|
2909
2910
|
labelStyle?: PostPurchaseTypo;
|
|
@@ -3069,6 +3070,7 @@ type PostPurchaseProductImagesProps = BasePropsWrap<ProductImagesSettingProps, P
|
|
|
3069
3070
|
|
|
3070
3071
|
declare const postPurchaseSpacing: Record<string, string>;
|
|
3071
3072
|
|
|
3073
|
+
type TStatus = 'info' | 'success' | 'warning' | 'critical' | 'none';
|
|
3072
3074
|
type ProductSubscriptionSettingProps = {
|
|
3073
3075
|
sellingType?: 'one-time' | 'subscription';
|
|
3074
3076
|
sellingLabel?: string;
|
|
@@ -3099,7 +3101,7 @@ type ProductSubscriptionStyleProps = {
|
|
|
3099
3101
|
subscriptionDetailAlign?: AlignItemProp;
|
|
3100
3102
|
sellingPlanItemGap?: keyof typeof postPurchaseSpacing;
|
|
3101
3103
|
width?: ObjectDevices<string>;
|
|
3102
|
-
backgroundColor?:
|
|
3104
|
+
backgroundColor?: TStatus | '';
|
|
3103
3105
|
align?: AlignItemProp;
|
|
3104
3106
|
sellingPlanId?: string;
|
|
3105
3107
|
};
|