@gem-sdk/components 12.0.0-dev.87 → 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/esm/carousel-v3/components/root/common/styles.js +1 -1
- package/dist/esm/post-purchase/buyer-consent/components/BuyerConsent.js +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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};
|