@gem-sdk/components 12.0.0-dev.85 → 12.0.0-dev.89
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/carousel-v3/components/root/common/styles.js +1 -1
- package/dist/cjs/post-purchase/buyer-consent/components/BuyerConsent.js +1 -1
- package/dist/cjs/shop-pay-installment/settings/ShopPayInstallments.js +1 -1
- package/dist/cjs/shop-pay-installment/settings/configs/settings.js +1 -1
- package/dist/esm/carousel-v3/components/root/common/styles.js +1 -1
- package/dist/esm/post-purchase/buyer-consent/components/BuyerConsent.js +1 -1
- package/dist/esm/shop-pay-installment/settings/ShopPayInstallments.js +2 -2
- package/dist/esm/shop-pay-installment/settings/configs/settings.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),system=require("@gem-sdk/system");const getStyle=e=>{let{styles:t,setting:r,style:
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),system=require("@gem-sdk/system");const getStyle=e=>{let{styles:t,setting:r,style:i,rootStyles:o}=e,{arrowGapToEachSide:s="16"}=r??{},a=core.makeStyleResponsive("h",core.getHeightByShapeGlobalSize(t?.sizeSetting)),c=core.makeStyleWithDefault("w",core.getWidthByShapeGlobalSize(t?.sizeSetting,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),l=system.createStyle({...i,...!e?.isProductList&&a,...c,...core.getBgByDevice({backgroundColor:t?.backgroundColor,backgroundImage:t?.backgroundImage})}),g=system.createStyle({...core.makeContainerWidthOrHeight({vertical:r?.vertical,dotStyle:r?.dotStyle}),gap:s+"px"}),y=system.createStyle({...core.makeStyleResponsive("jc",t?.align),...o,...!!e?.isProductList&&a}),n=system.createStyle({...c,...a}),S=system.createStyle({overflow:"hidden",flex:1,width:"100%",height:"100%",transitionTimingFunction:r?.animationMode??"ease"});return{rootStyleRender:y,wrapperStyleRender:l,wrapperInnerStyle:g,sliderStyle:n,sliderWrapperStyle:S}};exports.getStyle=getStyle;
|
|
@@ -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"),PostPurchaseCheckbox=require("./PostPurchaseCheckbox.js");const DEFAULT_PRE_CHECK_VALUE=!0,COMPONENT_ID_PREFIX="buyer-consent-product",BuyerConsent=({styles:e,builderProps:s,setting:t,builderAttrs:r,style:l,children:c})=>{let{isEditMode:o}=core.useRenderMode(),a=core.useProduct(),n=core.usePageStore(e=>e.buyerConsentChecked),i=core.usePageStore(e=>e.setBuyerConsentChecked),u=core.usePageStore(e=>e.subscriptionVisible),{description:d,policyLabel:y,policyLink:m,align:h}=t??{},C=a?.id?`buyer-consent-product-${s?.uid}-${a.id}`:void 0,x=helpers$1.getComponentTag(m),j=system.createStyle(styles.getWrapperStyles({styles:e})),p=system.createClass(classes.getWrapperClassName({align:h,uid:s?.uid})),
|
|
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"),PostPurchaseCheckbox=require("./PostPurchaseCheckbox.js");const DEFAULT_PRE_CHECK_VALUE=!0,COMPONENT_ID_PREFIX="buyer-consent-product",BuyerConsent=({styles:e,builderProps:s,setting:t,builderAttrs:r,style:l,children:c})=>{console.log("children",c);let{isEditMode:o}=core.useRenderMode(),a=core.useProduct(),n=core.usePageStore(e=>e.buyerConsentChecked),i=core.usePageStore(e=>e.setBuyerConsentChecked),u=core.usePageStore(e=>e.subscriptionVisible),{description:d,policyLabel:y,policyLink:m,align:h}=t??{},C=a?.id?`buyer-consent-product-${s?.uid}-${a.id}`:void 0,x=helpers$1.getComponentTag(m),j=system.createStyle(styles.getWrapperStyles({styles:e})),p=system.createClass(classes.getWrapperClassName({align:h,uid:s?.uid})),g=system.createStyle(styles.getContainerStyles({styles:e})),b=system.createClass(classes.getCheckboxContainerClassName()),P=system.createStyle(styles.getTextStyle({styles:e})),k=system.createClass(classes.getLinkComponentClassName()),R=system.createStyle(classes.getLinkComponentStyles()),S=React.useMemo(()=>helpers.extractProductID(a?.baseID??""),[a?.baseID]),q=React.useMemo(()=>{let e=`${S}`;return n?.[e]??!0},[n,S]),N=e=>{let s=`${S}`,t={...n,[s]:e.target.checked};i(t)},_=!o&&!u?.[a?.id??""];return _?null:jsxRuntime.jsxs("div",{...r,style:{...l},children:[jsxRuntime.jsx("div",{"data-id":s?.uid,style:j,className:p,children:jsxRuntime.jsxs("label",{htmlFor:C,dir:e?.direction??"ltr",style:g,className:b,children:[jsxRuntime.jsx(PostPurchaseCheckbox.default,{id:C,name:C,type:"checkbox",checked:q,onChange:N}),jsxRuntime.jsxs("bdo",{dir:e?.direction??"ltr",style:P,children:[d," ",jsxRuntime.jsx(x,{target:"_blank",rel:"noreferrer",href:m,className:k,style:R,children:y})]})]})}),core.filterToolbarPreview(c,!0)]})};exports.default=BuyerConsent;
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
</defs>
|
|
10
10
|
</svg>
|
|
11
11
|
<span class="preset-item-title"> Shop Pay Installments</span>
|
|
12
|
-
</div>`,config={tag:helpers.APP_CONFIG.id,label:helpers.APP_CONFIG.label,icon,settings:settings.ShopPayInstallmentSettings,ui:[{type:"group",label:{en:""},options:{labelSpacing:"small"},controls:[{type:"control",label:{en:""},layout:"vertical",setting:{id:"setupGuide"}}]}],editorConfigs:{placeholder:{flowTag:["Product"]},component:{isThirdParty:!0}},presets:[{id:"shop-pay-installment",name:"Shop Pay Installments",icon:{desktop:icon},components:[{tag:"ShopPayInstallments",advanced:{margin:{desktop:{bottom:"var(--g-s-l)"}}}}]}]};exports.default=config;
|
|
12
|
+
</div>`,config={tag:helpers.APP_CONFIG.id,label:helpers.APP_CONFIG.label,icon,settings:settings.ShopPayInstallmentSettings,ui:[{type:"group",label:{en:""},options:{labelSpacing:"small"},controls:[{type:"control",label:{en:""},layout:"vertical",setting:{id:"setupGuide"}}]}],uiV2:[{messageConfig:{type:"info",message:"Shop Pay Installments is available only for U.S.-based merchants selling in USD with Shopify Payments and Shop Pay activated."}}],editorConfigs:{placeholder:{flowTag:["Product"]},component:{isThirdParty:!0}},presets:[{id:"shop-pay-installment",name:"Shop Pay Installments",icon:{desktop:icon},components:[{tag:"ShopPayInstallments",advanced:{margin:{desktop:{bottom:"var(--g-s-l)"}}}}]}]};exports.default=config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const ShopPayInstallmentSettings=[{id:"setting",
|
|
1
|
+
"use strict";const ShopPayInstallmentSettings=[{id:"setting",controls:[]}];exports.ShopPayInstallmentSettings=ShopPayInstallmentSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as t,getHeightByShapeGlobalSize as e,makeStyleWithDefault as o,getWidthByShapeGlobalSize as
|
|
1
|
+
import{makeStyleResponsive as t,getHeightByShapeGlobalSize as e,makeStyleWithDefault as o,getWidthByShapeGlobalSize as i,getBgByDevice as r,makeContainerWidthOrHeight as g}from"@gem-sdk/core";import{createStyle as n}from"@gem-sdk/system";let getStyle=a=>{let{styles:d,setting:l,style:c,rootStyles:s}=a,{arrowGapToEachSide:m="16"}=l??{},u=t("h",e(d?.sizeSetting)),k=o("w",i(d?.sizeSetting,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),b=n({...c,...!a?.isProductList&&u,...k,...r({backgroundColor:d?.backgroundColor,backgroundImage:d?.backgroundImage})}),p=n({...g({vertical:l?.vertical,dotStyle:l?.dotStyle}),gap:m+"px"}),w=n({...t("jc",d?.align),...s,...!!a?.isProductList&&u}),S=n({...k,...u}),h=n({overflow:"hidden",flex:1,width:"100%",height:"100%",transitionTimingFunction:l?.animationMode??"ease"});return{rootStyleRender:w,wrapperStyleRender:b,wrapperInnerStyle:p,sliderStyle:S,sliderWrapperStyle:h}};export{getStyle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useMemo as t}from"react";import{createStyle as o,createClass as s}from"@gem-sdk/system";import{getWrapperStyles as i,getContainerStyles as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useMemo as t}from"react";import{createStyle as o,createClass as s}from"@gem-sdk/system";import{getWrapperStyles as i,getContainerStyles as l,getTextStyle as c}from"../common/styles.js";import{getWrapperClassName as n,getCheckboxContainerClassName as d,getLinkComponentClassName as m,getLinkComponentStyles as a}from"../common/classes.js";import{getComponentTag as u}from"../common/helpers.js";import{useRenderMode as h,useProduct as p,usePageStore as y,filterToolbarPreview as b}from"@gem-sdk/core";import{extractProductID as f}from"../../../helpers.js";import C from"./PostPurchaseCheckbox.js";let DEFAULT_PRE_CHECK_VALUE=!0,COMPONENT_ID_PREFIX="buyer-consent-product",BuyerConsent=({styles:k,builderProps:g,setting:j,builderAttrs:E,style:_,children:N})=>{console.log("children",N);let{isEditMode:P}=h(),x=p(),D=y(e=>e.buyerConsentChecked),I=y(e=>e.setBuyerConsentChecked),$=y(e=>e.subscriptionVisible),{description:v,policyLabel:B,policyLink:F,align:A}=j??{},L=x?.id?`buyer-consent-product-${g?.uid}-${x.id}`:void 0,O=u(F),R=o(i({styles:k})),T=s(n({align:A,uid:g?.uid})),U=o(l({styles:k})),V=s(d()),H=o(c({styles:k})),K=s(m()),M=o(a()),X=t(()=>f(x?.baseID??""),[x?.baseID]),q=t(()=>{let e=`${X}`;return D?.[e]??!0},[D,X]),w=e=>{let r=`${X}`,t={...D,[r]:e.target.checked};I(t)},z=!P&&!$?.[x?.id??""];return z?null:e("div",{...E,style:{..._},children:[r("div",{"data-id":g?.uid,style:R,className:T,children:e("label",{htmlFor:L,dir:k?.direction??"ltr",style:U,className:V,children:[r(C,{id:L,name:L,type:"checkbox",checked:q,onChange:w}),e("bdo",{dir:k?.direction??"ltr",style:H,children:[v," ",r(O,{target:"_blank",rel:"noreferrer",href:F,className:K,style:M,children:B})]})]})}),b(N,!0)]})};export{BuyerConsent as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{APP_CONFIG as A}from"../components/common/helpers.js";import{ShopPayInstallmentSettings as
|
|
1
|
+
import{APP_CONFIG as A}from"../components/common/helpers.js";import{ShopPayInstallmentSettings as e}from"./configs/settings.js";let icon=`<div class="w-full flex flex-col items-center">
|
|
2
2
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
3
|
<rect width="24" height="24" rx="3" fill="url(#pattern0_26273_9952)"/>
|
|
4
4
|
<defs>
|
|
@@ -9,4 +9,4 @@ import{APP_CONFIG as A}from"../components/common/helpers.js";import{ShopPayInsta
|
|
|
9
9
|
</defs>
|
|
10
10
|
</svg>
|
|
11
11
|
<span class="preset-item-title"> Shop Pay Installments</span>
|
|
12
|
-
</div>`,config={tag:A.id,label:A.label,icon,settings:
|
|
12
|
+
</div>`,config={tag:A.id,label:A.label,icon,settings:e,ui:[{type:"group",label:{en:""},options:{labelSpacing:"small"},controls:[{type:"control",label:{en:""},layout:"vertical",setting:{id:"setupGuide"}}]}],uiV2:[{messageConfig:{type:"info",message:"Shop Pay Installments is available only for U.S.-based merchants selling in USD with Shopify Payments and Shop Pay activated."}}],editorConfigs:{placeholder:{flowTag:["Product"]},component:{isThirdParty:!0}},presets:[{id:"shop-pay-installment",name:"Shop Pay Installments",icon:{desktop:icon},components:[{tag:"ShopPayInstallments",advanced:{margin:{desktop:{bottom:"var(--g-s-l)"}}}}]}]};export{config as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let ShopPayInstallmentSettings=[{id:"setting",
|
|
1
|
+
let ShopPayInstallmentSettings=[{id:"setting",controls:[]}];export{ShopPayInstallmentSettings};
|
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.89",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"i18n:extract": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/translate/extract-texts-to-locales.js && node ./scripts/translate/en-keys-usage.js"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "12.0.0-dev.
|
|
30
|
-
"@gem-sdk/styles": "12.0.0-dev.
|
|
29
|
+
"@gem-sdk/core": "12.0.0-dev.87",
|
|
30
|
+
"@gem-sdk/styles": "12.0.0-dev.86",
|
|
31
31
|
"@gem-sdk/system": "12.0.0-dev.53",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|
|
33
33
|
"tsup": "8.5.1",
|