@gem-sdk/components 12.0.0-dev.97 → 12.0.0-dev.98
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/common/constants.js +1 -0
- package/dist/cjs/post-purchase/buyer-consent/components/BuyerConsent.js +1 -1
- package/dist/cjs/post-purchase/buyer-consent/hooks/useBuyerConsentChecked.js +1 -0
- package/dist/cjs/post-purchase/buyer-consent/index.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-subscription/ProductSubscription.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useSubscriptionConsentCheck.js +1 -1
- package/dist/esm/post-purchase/buyer-consent/common/constants.js +1 -0
- package/dist/esm/post-purchase/buyer-consent/components/BuyerConsent.js +1 -1
- package/dist/esm/post-purchase/buyer-consent/hooks/useBuyerConsentChecked.js +1 -0
- package/dist/esm/post-purchase/buyer-consent/index.js +1 -1
- package/dist/esm/post-purchase/product/components/product-subscription/ProductSubscription.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useSubscriptionConsentCheck.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const DEFAULT_BUYER_CONSENT_CHECKED_VALUE=!0;exports.DEFAULT_BUYER_CONSENT_CHECKED_VALUE=!0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),system=require("@gem-sdk/system"),styles=require("../common/styles.js"),classes=require("../common/classes.js"),helpers=require("../common/helpers.js"),core=require("@gem-sdk/core"),PostPurchaseCheckbox=require("./PostPurchaseCheckbox.js"),useBuyerConsentChecked=require("../hooks/useBuyerConsentChecked.js");const COMPONENT_ID_PREFIX="buyer-consent-product",BuyerConsent=({styles:e,builderProps:s,setting:t,builderAttrs:r,style:l,children:c})=>{let{isEditMode:n}=core.useRenderMode(),o=core.useProduct(),{checked:a,setChecked:i}=useBuyerConsentChecked.useBuyerConsentChecked(),u=core.usePageStore(e=>e.subscriptionVisible),{description:y,policyLabel:d,policyLink:m,align:h}=t??{},C=o?.id?`buyer-consent-product-${s?.uid}-${o.id}`:void 0,x=helpers.getComponentTag(m),j=system.createStyle(styles.getWrapperStyles({styles:e})),k=system.createClass(classes.getWrapperClassName({align:h,uid:s?.uid})),p=system.createStyle(styles.getContainerStyles({styles:e})),g=system.createClass(classes.getCheckboxContainerClassName()),b=system.createStyle(styles.getTextStyle({styles:e})),P=system.createClass(classes.getLinkComponentClassName()),R=system.createStyle(classes.getLinkComponentStyles()),S=e=>{i(e.target.checked)},q=!n&&!u?.[o?.id??""]?.length;return q?null:jsxRuntime.jsxs("div",{...r,style:{...l},children:[jsxRuntime.jsx("div",{"data-id":s?.uid,style:j,className:k,children:jsxRuntime.jsxs("label",{htmlFor:C,dir:e?.direction??"ltr",style:p,className:g,children:[jsxRuntime.jsx(PostPurchaseCheckbox.default,{id:C,name:C,type:"checkbox",checked:a,onChange:S}),jsxRuntime.jsxs("bdo",{dir:e?.direction??"ltr",style:b,children:[y," ",jsxRuntime.jsx(x,{target:"_blank",rel:"noreferrer",href:m,className:P,style:R,children:d})]})]})}),core.filterToolbarPreview(c,!0)]})};exports.default=BuyerConsent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var React=require("react"),core=require("@gem-sdk/core"),helpers=require("../../../helpers.js"),constants=require("../common/constants.js");const useBuyerConsentChecked=()=>{let e=core.useProduct(),t=core.useProductStore(e=>e.uid),r=!!e?.requiresSellingPlan,s=core.usePageStore(e=>e.buyerConsentChecked),c=core.usePageStore(e=>e.setBuyerConsentChecked),o=core.usePageStore(e=>e.getBuyerConsentChecked),u=helpers.extractProductID(e?.baseID??""),n=s?.[u],C=React.useMemo(()=>{let e=r?u:`${u}_${t}`;return e},[r,u,t]),a=s?.[C]??constants.DEFAULT_BUYER_CONSENT_CHECKED_VALUE,E=e=>{let t=o();c({...t,[C]:e})};return React.useEffect(()=>{void 0!==n&&E(n)},[n]),React.useEffect(()=>{0===Object.keys(s??{}).length&&E(constants.DEFAULT_BUYER_CONSENT_CHECKED_VALUE)},[s]),{checked:a,setChecked:E}};exports.useBuyerConsentChecked=useBuyerConsentChecked;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("react/jsx-runtime"),require("
|
|
1
|
+
"use strict";require("react/jsx-runtime"),require("@gem-sdk/system"),require("@gem-sdk/core"),require("react"),require("next/link");var BuyerConsent$1=require("./settings/BuyerConsent.js");const postPurchaseBuyerConsentSetting={PostPurchaseBuyerConsent:BuyerConsent$1.default};exports.postPurchaseBuyerConsentSetting=postPurchaseBuyerConsentSetting;
|
package/dist/cjs/post-purchase/product/components/product-subscription/ProductSubscription.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),React=require("react"),index=require("../../constants/index.js"),classes=require("./common/classes.js"),styles=require("./common/styles.js"),useSellingPlanChange=require("./hooks/useSellingPlanChange.js"),useSellingSubscription=require("./hooks/useSellingSubscription.js"),useSellingPlanOptions=require("./hooks/useSellingPlanOptions.js"),useSubscriptionVisibility=require("./hooks/useSubscriptionVisibility.js"),OneTimePurchaseTooltip=require("./components/OneTimePurchaseTooltip.js"),SellingPlanDropdown=require("./components/SellingPlanDropdown.js"),SellingPlanLabel=require("./components/SellingPlanLabel.js"),SellingPlanRadio=require("./components/SellingPlanRadio.js"),SubscriptionDetail=require("./components/SubscriptionDetail.js"),SubscriptionRadio=require("./components/SubscriptionRadio.js"),useDynamicProduct=require("../../hooks/useDynamicProduct.js");const ProductSubscription=({styles:e,setting:s,builderProps:i,builderAttrs:n,style:t,children:l})=>{let r=core.useProduct(),u=core.usePageStore(e=>e.setSubscriptionVisible),{defaultValue:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),system=require("@gem-sdk/system"),React=require("react"),index=require("../../constants/index.js"),classes=require("./common/classes.js"),styles=require("./common/styles.js"),useSellingPlanChange=require("./hooks/useSellingPlanChange.js"),useSellingSubscription=require("./hooks/useSellingSubscription.js"),useSellingPlanOptions=require("./hooks/useSellingPlanOptions.js"),useSubscriptionVisibility=require("./hooks/useSubscriptionVisibility.js"),OneTimePurchaseTooltip=require("./components/OneTimePurchaseTooltip.js"),SellingPlanDropdown=require("./components/SellingPlanDropdown.js"),SellingPlanLabel=require("./components/SellingPlanLabel.js"),SellingPlanRadio=require("./components/SellingPlanRadio.js"),SubscriptionDetail=require("./components/SubscriptionDetail.js"),SubscriptionRadio=require("./components/SubscriptionRadio.js"),useDynamicProduct=require("../../hooks/useDynamicProduct.js");const ProductSubscription=({styles:e,setting:s,builderProps:i,builderAttrs:n,style:t,children:l})=>{let r=core.useProduct(),u=core.usePageStore(e=>e.setSubscriptionVisible),o=core.usePageStore(e=>e.getSubscriptionVisible),{defaultValue:a,selectedSellingPlan:c,setSelectedSellingPlan:d}=useSellingSubscription.useSellingSubscription(s),S=useSellingPlanOptions.useSellingPlanOptions(s),{selectedValue:p,handleSellingPlanChange:m}=useSellingPlanChange.useSellingPlanChange({defaultValue:a,selectedSellingPlan:c,setSelectedSellingPlan:d,sellingPlanOptions:S}),g=React.useRef(null),j=React.useId(),{selectedType:b,shouldShowRadio:x,isOneTimeHidden:P,hasNoSellingPlanOptions:y,setSubscriptionSellingType:R}=useSubscriptionVisibility.useSubscriptionVisibility({setting:s}),h=system.createStyle(styles.getSubscriptionStyles(e)),T=system.createStyle(styles.getSubscriptionWrapperStyles(e?.align)),O=system.createClass(classes.getWrapperClasses()),q=system.createClass(classes.getContainerClasses()),C=system.createStyle({...t}),{isEditMode:E}=core.useRenderMode(),I=`product-subscription-${r?.baseID}`,N=r?.baseID,D=`subscription-type-selection-${j}`,v=s?.sellingType===index.SubscriptionEnum.ONE_TIME,f=s?.sellingType===index.SubscriptionEnum.SUBSCRIPTION,{isDynamicProduct:k}=useDynamicProduct.useDynamicProduct();if(React.useEffect(()=>{if(!r?.id||!f||E)return;let e=r?.id,s=`${i?.uid}-${e}`,n=!(y||k),t=o()??{};if(!n){u({...t,[e]:(t[e]??[]).filter(e=>e!==s)});return}u({...t,[e]:[...t[e]??[],s]})},[i?.uid,o,y,k,E,f,r?.id,u]),P||y||k)return E?jsxRuntime.jsxs("div",{...n,style:C,children:[jsxRuntime.jsx(OneTimePurchaseTooltip.OneTimePurchaseTooltip,{ref:g,setting:s}),core.filterToolbarPreview(l,!0)]}):null;let L=e=>jsxRuntime.jsxs("div",{...n,style:C,children:[jsxRuntime.jsx("div",{ref:g,"data-selling-type":s?.sellingType,id:I,className:O,style:T,children:e}),core.filterToolbarPreview(l,!0)]}),V=()=>jsxRuntime.jsx(jsxRuntime.Fragment,{children:s?.sellingStyle==="radio"?jsxRuntime.jsx(SellingPlanRadio.SellingPlanRadio,{setting:s,styles:e,builderProps:i,productId:N??"",sellingPlanOptions:S,selectedValue:p,onChange:m}):jsxRuntime.jsx(SellingPlanDropdown.SellingPlanDropdown,{setting:s,sellingPlanOptions:S,selectedValue:p,onChange:m})});return L(v&&x?jsxRuntime.jsx("div",{className:q,style:h,children:jsxRuntime.jsx(SubscriptionRadio.SubscriptionRadio,{id:`${N}-one-time-radio`,name:D,value:index.SubscriptionEnum.ONE_TIME,checked:b===index.SubscriptionEnum.ONE_TIME,className:"!gp-items-start",onChange:e=>{e.target.checked&&R(index.SubscriptionEnum.ONE_TIME)},children:jsxRuntime.jsx(SellingPlanLabel.SellingPlanLabel,{setting:s,styles:e})})}):f&&x?jsxRuntime.jsxs("div",{className:q,style:h,children:[jsxRuntime.jsx(SubscriptionRadio.SubscriptionRadio,{id:`${N}-subscription-radio`,name:D,value:index.SubscriptionEnum.SUBSCRIPTION,checked:b===index.SubscriptionEnum.SUBSCRIPTION,className:"!gp-items-start",onChange:e=>{e.target.checked&&R(index.SubscriptionEnum.SUBSCRIPTION)},children:jsxRuntime.jsx(SellingPlanLabel.SellingPlanLabel,{setting:s,styles:e})}),b===index.SubscriptionEnum.SUBSCRIPTION&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:"gp-pl-7",children:V()}),jsxRuntime.jsx("div",{className:"gp-pl-7",children:jsxRuntime.jsx(SubscriptionDetail.SubscriptionDetail,{setting:s,styles:e})})]})]}):jsxRuntime.jsxs("div",{className:q,style:h,children:[jsxRuntime.jsx(SellingPlanLabel.SellingPlanLabel,{setting:s,styles:e}),f&&V(),f&&jsxRuntime.jsx(SubscriptionDetail.SubscriptionDetail,{setting:s,styles:e})]}))};exports.default=ProductSubscription;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core"),React=require("react"),index=require("../constants/index.js"),product=require("../../../product/helpers/product.js"),
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core"),React=require("react"),index=require("../constants/index.js"),product=require("../../../product/helpers/product.js"),useBuyerConsentChecked=require("../../buyer-consent/hooks/useBuyerConsentChecked.js");const useSubscriptionConsentCheck=()=>{let{checked:e}=useBuyerConsentChecked.useBuyerConsentChecked(),r=core.useProductStore(e=>e.selectedOptions),t=core.useProductStore(e=>e.subscriptionSellingType),n=core.usePageStore(e=>e.getSubscriptionVisible()),s=core.useProduct(),u=core.useVariants(),o=React.useMemo(()=>{let o=t===index.SubscriptionEnum.ONE_TIME,c=!n?.[s?.id??""]?.length;if(e||o||c)return!1;let i=!!s?.sellingPlanGroups?.length||!!s?.variants?.edges.find(e=>!!e.node?.sellingPlanGroups?.length);if(!i||!r)return!1;let l=product.checkDefaultVariant(s);if(!l){let e=u.find(e=>e?.selectedOptions.every(e=>r[e.name??""]===e.value)),t=!!e?.sellingPlanGroups?.length;return t}return!0},[r,t,e,s,u]);return{isDisableAccept:o}};exports.useSubscriptionConsentCheck=useSubscriptionConsentCheck;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let DEFAULT_BUYER_CONSENT_CHECKED_VALUE=!0;export{DEFAULT_BUYER_CONSENT_CHECKED_VALUE};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{createStyle as o,createClass as t}from"@gem-sdk/system";import{getWrapperStyles as s,getContainerStyles as i,getTextStyle as d}from"../common/styles.js";import{getWrapperClassName as m,getCheckboxContainerClassName as c,getLinkComponentClassName as l,getLinkComponentStyles as n}from"../common/classes.js";import{getComponentTag as a}from"../common/helpers.js";import{useRenderMode as u,useProduct as h,usePageStore as p,filterToolbarPreview as y}from"@gem-sdk/core";import f from"./PostPurchaseCheckbox.js";import{useBuyerConsentChecked as b}from"../hooks/useBuyerConsentChecked.js";let COMPONENT_ID_PREFIX="buyer-consent-product",BuyerConsent=({styles:k,builderProps:C,setting:g,builderAttrs:j,style:N,children:x})=>{let{isEditMode:P}=u(),v=h(),{checked:B,setChecked:_}=b(),E=p(e=>e.subscriptionVisible),{description:F,policyLabel:I,policyLink:O,align:$}=g??{},D=v?.id?`buyer-consent-product-${C?.uid}-${v.id}`:void 0,M=a(O),R=o(s({styles:k})),T=t(m({align:$,uid:C?.uid})),V=o(i({styles:k})),X=t(c()),q=o(d({styles:k})),w=t(l()),z=o(n()),A=e=>{_(e.target.checked)},G=!P&&!E?.[v?.id??""]?.length;return G?null:e("div",{...j,style:{...N},children:[r("div",{"data-id":C?.uid,style:R,className:T,children:e("label",{htmlFor:D,dir:k?.direction??"ltr",style:V,className:X,children:[r(f,{id:D,name:D,type:"checkbox",checked:B,onChange:A}),e("bdo",{dir:k?.direction??"ltr",style:q,children:[F," ",r(M,{target:"_blank",rel:"noreferrer",href:O,className:w,style:z,children:I})]})]})}),y(x,!0)]})};export{BuyerConsent as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useMemo as e,useEffect as r}from"react";import{useProduct as t,useProductStore as o,usePageStore as n}from"@gem-sdk/core";import{extractProductID as s}from"../../../helpers.js";import{DEFAULT_BUYER_CONSENT_CHECKED_VALUE as m}from"../common/constants.js";let useBuyerConsentChecked=()=>{let u=t(),c=o(e=>e.uid),C=!!u?.requiresSellingPlan,l=n(e=>e.buyerConsentChecked),d=n(e=>e.setBuyerConsentChecked),i=n(e=>e.getBuyerConsentChecked),h=s(u?.baseID??""),k=l?.[h],p=e(()=>{let e=C?h:`${h}_${c}`;return e},[C,h,c]),y=l?.[p]??m,a=e=>{let r=i();d({...r,[p]:e})};return r(()=>{void 0!==k&&a(k)},[k]),r(()=>{0===Object.keys(l??{}).length&&a(m)},[l]),{checked:y,setChecked:a}};export{useBuyerConsentChecked};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"
|
|
1
|
+
import"react/jsx-runtime";import"@gem-sdk/system";import"@gem-sdk/core";import"react";import"next/link";import t from"./settings/BuyerConsent.js";let postPurchaseBuyerConsentSetting={PostPurchaseBuyerConsent:t};export{postPurchaseBuyerConsentSetting};
|
package/dist/esm/post-purchase/product/components/product-subscription/ProductSubscription.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as s,Fragment as i}from"react/jsx-runtime";import{useProduct as t,usePageStore as o,useRenderMode as l,filterToolbarPreview as n}from"@gem-sdk/core";import{createStyle as r,createClass as m}from"@gem-sdk/system";import{useRef as c,useId as a,useEffect as p}from"react";import{SubscriptionEnum as d}from"../../constants/index.js";import{getWrapperClasses as
|
|
1
|
+
import{jsxs as e,jsx as s,Fragment as i}from"react/jsx-runtime";import{useProduct as t,usePageStore as o,useRenderMode as l,filterToolbarPreview as n}from"@gem-sdk/core";import{createStyle as r,createClass as m}from"@gem-sdk/system";import{useRef as c,useId as a,useEffect as p}from"react";import{SubscriptionEnum as d}from"../../constants/index.js";import{getWrapperClasses as u,getContainerClasses as g}from"./common/classes.js";import{getSubscriptionStyles as h,getSubscriptionWrapperStyles as f}from"./common/styles.js";import{useSellingPlanChange as S}from"./hooks/useSellingPlanChange.js";import{useSellingSubscription as y}from"./hooks/useSellingSubscription.js";import{useSellingPlanOptions as b}from"./hooks/useSellingPlanOptions.js";import{useSubscriptionVisibility as I}from"./hooks/useSubscriptionVisibility.js";import{OneTimePurchaseTooltip as N}from"./components/OneTimePurchaseTooltip.js";import{SellingPlanDropdown as P}from"./components/SellingPlanDropdown.js";import{SellingPlanLabel as j}from"./components/SellingPlanLabel.js";import{SellingPlanRadio as T}from"./components/SellingPlanRadio.js";import{SubscriptionDetail as O}from"./components/SubscriptionDetail.js";import{SubscriptionRadio as k}from"./components/SubscriptionRadio.js";import{useDynamicProduct as v}from"../../hooks/useDynamicProduct.js";let ProductSubscription=({styles:C,setting:E,builderProps:R,builderAttrs:$,style:B,children:D})=>{let U=t(),V=o(e=>e.setSubscriptionVisible),M=o(e=>e.getSubscriptionVisible),{defaultValue:_,selectedSellingPlan:x,setSelectedSellingPlan:w}=y(E),L=b(E),{selectedValue:q,handleSellingPlanChange:z}=S({defaultValue:_,selectedSellingPlan:x,setSelectedSellingPlan:w,sellingPlanOptions:L}),A=c(null),F=a(),{selectedType:G,shouldShowRadio:H,isOneTimeHidden:J,hasNoSellingPlanOptions:K,setSubscriptionSellingType:Q}=I({setting:E}),W=r(h(C)),X=r(f(C?.align)),Y=m(u()),Z=m(g()),ee=r({...B}),{isEditMode:es}=l(),ei=`product-subscription-${U?.baseID}`,et=U?.baseID,eo=`subscription-type-selection-${F}`,el=E?.sellingType===d.ONE_TIME,en=E?.sellingType===d.SUBSCRIPTION,{isDynamicProduct:er}=v();if(p(()=>{if(!U?.id||!en||es)return;let e=U?.id,s=`${R?.uid}-${e}`,i=!(K||er),t=M()??{};if(!i){V({...t,[e]:(t[e]??[]).filter(e=>e!==s)});return}V({...t,[e]:[...t[e]??[],s]})},[R?.uid,M,K,er,es,en,U?.id,V]),J||K||er)return es?e("div",{...$,style:ee,children:[s(N,{ref:A,setting:E}),n(D,!0)]}):null;let em=i=>e("div",{...$,style:ee,children:[s("div",{ref:A,"data-selling-type":E?.sellingType,id:ei,className:Y,style:X,children:i}),n(D,!0)]}),ec=()=>s(i,{children:E?.sellingStyle==="radio"?s(T,{setting:E,styles:C,builderProps:R,productId:et??"",sellingPlanOptions:L,selectedValue:q,onChange:z}):s(P,{setting:E,sellingPlanOptions:L,selectedValue:q,onChange:z})});return em(el&&H?s("div",{className:Z,style:W,children:s(k,{id:`${et}-one-time-radio`,name:eo,value:d.ONE_TIME,checked:G===d.ONE_TIME,className:"!gp-items-start",onChange:e=>{e.target.checked&&Q(d.ONE_TIME)},children:s(j,{setting:E,styles:C})})}):en&&H?e("div",{className:Z,style:W,children:[s(k,{id:`${et}-subscription-radio`,name:eo,value:d.SUBSCRIPTION,checked:G===d.SUBSCRIPTION,className:"!gp-items-start",onChange:e=>{e.target.checked&&Q(d.SUBSCRIPTION)},children:s(j,{setting:E,styles:C})}),G===d.SUBSCRIPTION&&e(i,{children:[s("div",{className:"gp-pl-7",children:ec()}),s("div",{className:"gp-pl-7",children:s(O,{setting:E,styles:C})})]})]}):e("div",{className:Z,style:W,children:[s(j,{setting:E,styles:C}),en&&ec(),en&&s(O,{setting:E,styles:C})]}))};export{ProductSubscription as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useProductStore as e,usePageStore as t,useProduct as n,useVariants as r}from"@gem-sdk/core";import{useMemo as s}from"react";import{SubscriptionEnum as o}from"../constants/index.js";import{checkDefaultVariant as i}from"../../../product/helpers/product.js";import{useBuyerConsentChecked as l}from"../../buyer-consent/hooks/useBuyerConsentChecked.js";let useSubscriptionConsentCheck=()=>{let{checked:u}=l(),p=e(e=>e.selectedOptions),c=e(e=>e.subscriptionSellingType),d=t(e=>e.getSubscriptionVisible()),m=n(),g=r(),f=s(()=>{let e=c===o.ONE_TIME,t=!d?.[m?.id??""]?.length;if(u||e||t)return!1;let n=!!m?.sellingPlanGroups?.length||!!m?.variants?.edges.find(e=>!!e.node?.sellingPlanGroups?.length);if(!n||!p)return!1;let r=i(m);if(!r){let e=g.find(e=>e?.selectedOptions.every(e=>p[e.name??""]===e.value)),t=!!e?.sellingPlanGroups?.length;return t}return!0},[p,c,u,m,g]);return{isDisableAccept:f}};export{useSubscriptionConsentCheck};
|
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.98",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
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.
|
|
29
|
+
"@gem-sdk/core": "12.0.0-dev.98",
|
|
30
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",
|