@gem-sdk/components 12.0.0-dev.82 → 12.0.0-dev.87
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/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/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/dist/types/index.d.ts +3 -1
- package/package.json +3 -3
|
@@ -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})=>{let{isEditMode:
|
|
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})),b=system.createStyle(styles.getContainerStyles({styles:e})),g=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:b,className:g,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,!1)]})};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{
|
|
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 m,getTextStyle as c}from"../common/styles.js";import{getWrapperClassName as d,getCheckboxContainerClassName as l,getLinkComponentClassName as n,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:j,setting:E,builderAttrs:_,style:g,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}=E??{},L=x?.id?`buyer-consent-product-${j?.uid}-${x.id}`:void 0,O=u(F),R=o(i({styles:k})),T=s(d({align:A,uid:j?.uid})),U=o(m({styles:k})),V=s(l()),H=o(c({styles:k})),K=s(n()),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",{..._,style:{...g},children:[r("div",{"data-id":j?.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,!1)]})};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/dist/types/index.d.ts
CHANGED
|
@@ -3561,7 +3561,9 @@ type PostPurchaseBuyerConsentStyleProps = {
|
|
|
3561
3561
|
textAlign?: AlignItemProp;
|
|
3562
3562
|
typo?: PostPurchaseTypo;
|
|
3563
3563
|
};
|
|
3564
|
-
type PostPurchaseBuyerConsentProps = BasePropsWrap<PostPurchaseBuyerConsentSettingProps, PostPurchaseBuyerConsentStyleProps
|
|
3564
|
+
type PostPurchaseBuyerConsentProps = BasePropsWrap<PostPurchaseBuyerConsentSettingProps, PostPurchaseBuyerConsentStyleProps> & {
|
|
3565
|
+
children: React.ReactNode;
|
|
3566
|
+
};
|
|
3565
3567
|
|
|
3566
3568
|
declare const BuyerConsent: React.FC<PostPurchaseBuyerConsentProps>;
|
|
3567
3569
|
|
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.87",
|
|
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",
|