@beamimpact/web-sdk 1.44.2 → 1.45.3
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/chunks/_share-dialog-dependencies-FXJR0ESq.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-FXJR0ESq.esm.js.map +1 -0
- package/dist/chunks/_share-dialog-dependencies-VM-oSkel.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-VM-oSkel.esm.js.map +1 -0
- package/dist/chunks/{css-card-grid-r6wxRbPV.esm.js → css-card-grid-nEc--M5M.esm.js} +2 -2
- package/dist/chunks/{css-card-grid-r6wxRbPV.esm.js.map → css-card-grid-nEc--M5M.esm.js.map} +1 -1
- package/dist/chunks/{enforce-config-HksNiOMu.esm.js → enforce-config-ZAI7WYAd.esm.js} +2 -2
- package/dist/chunks/{enforce-config-HksNiOMu.esm.js.map → enforce-config-ZAI7WYAd.esm.js.map} +1 -1
- package/dist/chunks/{enforce-config-er6B5Gkj.esm.js → enforce-config-ZyPq_4CF.esm.js} +2 -2
- package/dist/chunks/{enforce-config-er6B5Gkj.esm.js.map → enforce-config-ZyPq_4CF.esm.js.map} +1 -1
- package/dist/chunks/index-4Fvcu3-v.esm.js +2 -0
- package/dist/chunks/index-4Fvcu3-v.esm.js.map +1 -0
- package/dist/chunks/{index-tV7ZK858.esm.js → index-IujuLxUV.esm.js} +2 -2
- package/dist/chunks/{index-tV7ZK858.esm.js.map → index-IujuLxUV.esm.js.map} +1 -1
- package/dist/chunks/{index-1nI7l5vj.esm.js → index-JDZQClkA.esm.js} +2 -2
- package/dist/chunks/{index-1nI7l5vj.esm.js.map → index-JDZQClkA.esm.js.map} +1 -1
- package/dist/chunks/index-KQ5XYf5e.esm.js +2 -0
- package/dist/chunks/index-KQ5XYf5e.esm.js.map +1 -0
- package/dist/chunks/index-Uos3T3K9.esm.js +2 -0
- package/dist/chunks/index-Uos3T3K9.esm.js.map +1 -0
- package/dist/chunks/index-WibiKAEy.esm.js +2 -0
- package/dist/chunks/index-WibiKAEy.esm.js.map +1 -0
- package/dist/chunks/{index-Kz977KkP.esm.js → index-XN6JUoCQ.esm.js} +2 -2
- package/dist/chunks/{index-Kz977KkP.esm.js.map → index-XN6JUoCQ.esm.js.map} +1 -1
- package/dist/chunks/{index-mw70Caof.esm.js → index-eXilYHHK.esm.js} +2 -2
- package/dist/chunks/{index-mw70Caof.esm.js.map → index-eXilYHHK.esm.js.map} +1 -1
- package/dist/chunks/index-qOqcMZym.esm.js +2 -0
- package/dist/chunks/index-qOqcMZym.esm.js.map +1 -0
- package/dist/chunks/index-xJ0ZfjZW.esm.js +2 -0
- package/dist/chunks/index-xJ0ZfjZW.esm.js.map +1 -0
- package/dist/chunks/{lit-3QHn3fwl.esm.js → lit-iNN5L_Qk.esm.js} +2 -2
- package/dist/chunks/{lit-3QHn3fwl.esm.js.map → lit-iNN5L_Qk.esm.js.map} +1 -1
- package/dist/chunks/loading-template-t4fFsYtr.esm.js +2 -0
- package/dist/chunks/{loading-template-mLjOGXMj.esm.js.map → loading-template-t4fFsYtr.esm.js.map} +1 -1
- package/dist/chunks/localize-m-_ESmpk.esm.js +31 -0
- package/dist/chunks/localize-m-_ESmpk.esm.js.map +1 -0
- package/dist/chunks/localize-o-cYvHQf.esm.js +31 -0
- package/dist/chunks/localize-o-cYvHQf.esm.js.map +1 -0
- package/dist/chunks/order-page-Qptp0Cgw.esm.js +2 -0
- package/dist/chunks/{order-page-zPVHsu6v.esm.js.map → order-page-Qptp0Cgw.esm.js.map} +1 -1
- package/dist/chunks/order-page-fVZWjxXw.esm.js +2 -0
- package/dist/chunks/{order-page-zYoubhg4.esm.js.map → order-page-fVZWjxXw.esm.js.map} +1 -1
- package/dist/chunks/{progress-bar-HVG_n8_6.esm.js → progress-bar-PMU_xI3L.esm.js} +2 -2
- package/dist/chunks/{progress-bar-HVG_n8_6.esm.js.map → progress-bar-PMU_xI3L.esm.js.map} +1 -1
- package/dist/chunks/promo-pill-label-58PJRvSl.esm.js +15 -0
- package/dist/chunks/{promo-pill-label-81dVN7VY.esm.js.map → promo-pill-label-58PJRvSl.esm.js.map} +1 -1
- package/dist/chunks/{responsive-KbDsZM6S.esm.js → responsive-2lC2Wrtg.esm.js} +2 -2
- package/dist/chunks/{responsive-KbDsZM6S.esm.js.map → responsive-2lC2Wrtg.esm.js.map} +1 -1
- package/dist/chunks/{routes-4Mnz2XZX.esm.js → routes-4z90Ks28.esm.js} +2 -2
- package/dist/chunks/{routes-4Mnz2XZX.esm.js.map → routes-4z90Ks28.esm.js.map} +1 -1
- package/dist/chunks/{routes-eIRRJ7c1.esm.js → routes-kK10CmJz.esm.js} +2 -2
- package/dist/chunks/{routes-eIRRJ7c1.esm.js.map → routes-kK10CmJz.esm.js.map} +1 -1
- package/dist/chunks/{share-button-9d9kTwmG.esm.js → share-button-K_FE0-s2.esm.js} +4 -3
- package/dist/chunks/{share-button-9d9kTwmG.esm.js.map → share-button-K_FE0-s2.esm.js.map} +1 -1
- package/dist/chunks/{share-button-PJlajTPi.esm.js → share-button-RG2BkqMA.esm.js} +4 -3
- package/dist/chunks/{share-button-PJlajTPi.esm.js.map → share-button-RG2BkqMA.esm.js.map} +1 -1
- package/dist/chunks/share-button-SNvuFDC9.esm.js +2 -0
- package/dist/chunks/share-button-SNvuFDC9.esm.js.map +1 -0
- package/dist/chunks/{shoelace-components-A9MnfNMD.esm.js → shoelace-components-522x2Yt1.esm.js} +2 -2
- package/dist/chunks/{shoelace-components-A9MnfNMD.esm.js.map → shoelace-components-522x2Yt1.esm.js.map} +1 -1
- package/dist/chunks/{shoelace-components-c53kUkO2.esm.js → shoelace-components-59LxBr67.esm.js} +2 -2
- package/dist/chunks/{shoelace-components-c53kUkO2.esm.js.map → shoelace-components-59LxBr67.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-ZuRyrnAL.esm.js → update-cart-BcLkAJSc.esm.js} +2 -2
- package/dist/chunks/{update-cart-ZuRyrnAL.esm.js.map → update-cart-BcLkAJSc.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-SPqvT31b.esm.js → update-cart-eodNhDjI.esm.js} +2 -2
- package/dist/chunks/{update-cart-SPqvT31b.esm.js.map → update-cart-eodNhDjI.esm.js.map} +1 -1
- package/dist/chunks/{vendor--f7lkyBk.esm.js → vendor-GKiOHg2N.esm.js} +2 -2
- package/dist/chunks/{vendor--f7lkyBk.esm.js.map → vendor-GKiOHg2N.esm.js.map} +1 -1
- package/dist/components/beam-partner-logos.esm.js +1 -1
- package/dist/components/beam-partner-logos.js +1 -1
- package/dist/components/community-impact.esm.js +1 -1
- package/dist/components/community-impact.js +1 -1
- package/dist/components/cumulative-impact.esm.js +1 -1
- package/dist/components/cumulative-impact.js +1 -1
- package/dist/components/impact-overview.d.ts +6 -1
- package/dist/components/impact-overview.esm.js +87 -73
- package/dist/components/impact-overview.esm.js.map +1 -1
- package/dist/components/impact-overview.js +87 -73
- package/dist/components/impact-overview.js.map +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +1 -1
- package/dist/components/post-purchase.esm.js +1 -1
- package/dist/components/post-purchase.esm.js.map +1 -1
- package/dist/components/post-purchase.js +1 -1
- package/dist/components/post-purchase.js.map +1 -1
- package/dist/components/product-details-page.d.ts +1 -1
- package/dist/components/product-details-page.esm.js +1 -1
- package/dist/components/product-details-page.js +1 -1
- package/dist/components/redeem-transaction.d.ts +8 -2
- package/dist/components/redeem-transaction.esm.js +256 -185
- package/dist/components/redeem-transaction.esm.js.map +1 -1
- package/dist/components/redeem-transaction.js +256 -185
- package/dist/components/redeem-transaction.js.map +1 -1
- package/dist/components/select-nonprofit.d.ts +1 -1
- package/dist/components/select-nonprofit.esm.js +42 -28
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +42 -28
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.d.ts +1 -1
- package/dist/components/select-subscription-nonprofit.esm.js +34 -19
- package/dist/components/select-subscription-nonprofit.esm.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.js +34 -19
- package/dist/components/select-subscription-nonprofit.js.map +1 -1
- package/dist/components/shopify.esm.js +1 -1
- package/dist/components/shopify.esm.js.map +1 -1
- package/dist/components/shopify.js +1 -1
- package/dist/components/shopify.js.map +1 -1
- package/dist/components/social-share.esm.js +1 -1
- package/dist/components/social-share.js +1 -1
- package/dist/components/subscription-impact.d.ts +1 -1
- package/dist/components/subscription-impact.esm.js +1 -1
- package/dist/components/subscription-impact.js +1 -1
- package/dist/components/subscription-management.d.ts +1 -1
- package/dist/components/subscription-management.esm.js +1 -1
- package/dist/components/subscription-management.esm.js.map +1 -1
- package/dist/components/subscription-management.js +1 -1
- package/dist/components/subscription-management.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/beam.esm.js +1 -1
- package/dist/integrations/beam.js +1 -1
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/index.esm.js +1 -1
- package/dist/integrations/index.js +1 -1
- package/dist/integrations/logs.esm.js +1 -1
- package/dist/integrations/logs.js +1 -1
- package/dist/integrations/session.esm.js +1 -1
- package/dist/integrations/session.js +1 -1
- package/dist/integrations/shopify.esm.js +1 -1
- package/dist/integrations/shopify.js +1 -1
- package/dist/integrations/statsig.esm.js +1 -1
- package/dist/integrations/statsig.js +1 -1
- package/dist/react/beam-partner-logos.esm.js +1 -1
- package/dist/react/beam-partner-logos.js +1 -1
- package/dist/react/community-impact.esm.js +1 -1
- package/dist/react/community-impact.js +1 -1
- package/dist/react/cumulative-impact.esm.js +1 -1
- package/dist/react/cumulative-impact.js +1 -1
- package/dist/react/impact-overview.esm.js +1 -1
- package/dist/react/impact-overview.js +1 -1
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.esm.js +1 -1
- package/dist/react/post-purchase.esm.js.map +1 -1
- package/dist/react/post-purchase.js +1 -1
- package/dist/react/post-purchase.js.map +1 -1
- package/dist/react/product-details-page.esm.js +1 -1
- package/dist/react/product-details-page.js +1 -1
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.esm.js.map +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/redeem-transaction.js.map +1 -1
- package/dist/react/select-nonprofit.esm.js +1 -1
- package/dist/react/select-nonprofit.js +1 -1
- package/dist/react/select-subscription-nonprofit.esm.js +1 -1
- package/dist/react/select-subscription-nonprofit.esm.js.map +1 -1
- package/dist/react/select-subscription-nonprofit.js +1 -1
- package/dist/react/select-subscription-nonprofit.js.map +1 -1
- package/dist/react/social-share.esm.js +1 -1
- package/dist/react/social-share.js +1 -1
- package/dist/react/subscription-impact.esm.js +1 -1
- package/dist/react/subscription-impact.js +1 -1
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.esm.js.map +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/react/subscription-management.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/_share-dialog-dependencies-6qxEKq8s.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-6qxEKq8s.esm.js.map +0 -1
- package/dist/chunks/_share-dialog-dependencies-a05NZJ6I.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-a05NZJ6I.esm.js.map +0 -1
- package/dist/chunks/checkbox-P2JYPqxl.esm.js +0 -17
- package/dist/chunks/checkbox-P2JYPqxl.esm.js.map +0 -1
- package/dist/chunks/index-2fgoYcug.esm.js +0 -2
- package/dist/chunks/index-2fgoYcug.esm.js.map +0 -1
- package/dist/chunks/index-4mQhPzhb.esm.js +0 -2
- package/dist/chunks/index-4mQhPzhb.esm.js.map +0 -1
- package/dist/chunks/index-BL75MsEt.esm.js +0 -2
- package/dist/chunks/index-BL75MsEt.esm.js.map +0 -1
- package/dist/chunks/index-MewTlHYO.esm.js +0 -2
- package/dist/chunks/index-MewTlHYO.esm.js.map +0 -1
- package/dist/chunks/index-mbNUaby9.esm.js +0 -2
- package/dist/chunks/index-mbNUaby9.esm.js.map +0 -1
- package/dist/chunks/index-vNBrw3_d.esm.js +0 -2
- package/dist/chunks/index-vNBrw3_d.esm.js.map +0 -1
- package/dist/chunks/loading-template-mLjOGXMj.esm.js +0 -2
- package/dist/chunks/localize-IRs8JglT.esm.js +0 -29
- package/dist/chunks/localize-IRs8JglT.esm.js.map +0 -1
- package/dist/chunks/localize-SsJbTmMj.esm.js +0 -29
- package/dist/chunks/localize-SsJbTmMj.esm.js.map +0 -1
- package/dist/chunks/order-page-zPVHsu6v.esm.js +0 -2
- package/dist/chunks/order-page-zYoubhg4.esm.js +0 -2
- package/dist/chunks/promo-pill-label-81dVN7VY.esm.js +0 -15
- package/dist/chunks/share-button-CqTd80g8.esm.js +0 -2
- package/dist/chunks/share-button-CqTd80g8.esm.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as m,g as i,h as l,y as b}from"../chunks/lit-
|
|
1
|
+
import{f as m,g as i,h as l,y as b}from"../chunks/lit-iNN5L_Qk.esm.js";var h=Object.defineProperty,L=Object.getOwnPropertyDescriptor,p=(g,o,a,e)=>{for(var r=e>1?void 0:e?L(o,a):o,n=g.length-1,s;n>=0;n--)(s=g[n])&&(r=(e?s(o,a,r):s(r))||r);return e&&r&&h(o,a,r),r};const c="https://cdn01.beamimpact.com/chains/img/beam-logo.png";class t extends l{constructor(){super(...arguments),this.partnerLogoUrl="",this.beamLogoUrl=c,this.partnerName=""}render(){const{partnerLogoUrl:o,beamLogoUrl:a,partnerName:e}=this;return b`
|
|
2
2
|
<span class="partner-logo">
|
|
3
3
|
<img src="${o}" part="partner-logo" alt="${e} Logo" />
|
|
4
4
|
</span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as m,g as i,h as l,y as b}from"../chunks/lit-
|
|
1
|
+
import{f as m,g as i,h as l,y as b}from"../chunks/lit-iNN5L_Qk.esm.js";var h=Object.defineProperty,L=Object.getOwnPropertyDescriptor,p=(g,o,a,e)=>{for(var r=e>1?void 0:e?L(o,a):o,n=g.length-1,s;n>=0;n--)(s=g[n])&&(r=(e?s(o,a,r):s(r))||r);return e&&r&&h(o,a,r),r};const c="https://cdn01.beamimpact.com/chains/img/beam-logo.png";class t extends l{constructor(){super(...arguments),this.partnerLogoUrl="",this.beamLogoUrl=c,this.partnerName=""}render(){const{partnerLogoUrl:o,beamLogoUrl:a,partnerName:e}=this;return b`
|
|
2
2
|
<span class="partner-logo">
|
|
3
3
|
<img src="${o}" part="partner-logo" alt="${e} Logo" />
|
|
4
4
|
</span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as x,g as d,t as I,h as v,y as g,
|
|
1
|
+
import{f as x,g as d,t as I,h as v,y as g,k as b,m as u}from"../chunks/lit-iNN5L_Qk.esm.js";import{p as $}from"../chunks/progress-bar-PMU_xI3L.esm.js";import{partnerLogosConfigDefaults as T}from"./beam-partner-logos.esm.js";import{c as k,d as w,e as S}from"../chunks/enforce-config-ZAI7WYAd.esm.js";import{u as n,A as L,i as c,_ as f,d as m,a as A}from"../chunks/localize-o-cYvHQf.esm.js";import{D as z,g as F,W as D,S as M}from"../chunks/routes-4z90Ks28.esm.js";import{_ as U}from"../chunks/loading-template-t4fFsYtr.esm.js";import{B as E}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{c as C}from"../chunks/css-card-grid-nEc--M5M.esm.js";import"../utils/logger.esm.js";const y={en:{fundedTimes:({times:t=0})=>`Funded <b>${t}</b> ${t>1?"times":"time"} so far`,learnMore:()=>"Learn more",seeAll:()=>"See All"},fr:{fundedTimes:({times:t=0})=>`Financ\xE9 <b>${t}</b> fois pour l'instant`,learnMore:()=>"En savoir plus",seeAll:()=>"Voir tout"},de:{fundedTimes:({times:t=0})=>`<b>${t}</b> Mal finanziert`,learnMore:()=>"Mehr erfahren",seeAll:()=>"Alle anzeigen"},es:{fundedTimes:({times:t=0})=>`Financiado <b>${t}</b> ${t>1?"vez":"veces"}`,learnMore:()=>"Saber m\xE1s",seeAll:()=>"Ver Todo"},it:{fundedTimes:({times:t=0})=>`Finanziato <b>${t}</b> ${t>1?"volta":"volte"}`,learnMore:()=>"Scopri di pi\xF9",seeAll:()=>"Vedi Tutto"},pl:{fundedTimes:({times:t=0})=>`Udzielono wsparcia <b>${t}</b> ${t>1?"razy":"raz"}`,learnMore:()=>"Dowiedz si\u0119 wi\u0119cej",seeAll:()=>"Zobacz wszystko"}};var _=Object.defineProperty,P=Object.getOwnPropertyDescriptor,p=(t,a,i,r)=>{for(var o=r>1?void 0:r?P(a,i):a,e=t.length-1,l;e>=0;e--)(l=t[e])&&(o=(r?l(a,i,o):l(o))||o);return r&&o&&_(a,i,o),o};class s extends v{constructor(){super(...arguments),this.baseUrl=z,this.cardStyle="image",this.lang="en",this.debug=!1,this.draftConfig=!1,this.selectedFilter=null,this.getImpactData=async()=>(S(["apiKey","chainId"],this),F({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{chainId:this.chainId,personalImpactLimit:0,widgetName:D.community_impact,version:"1.0.0",lang:this.configLang,draftConfig:this.draftConfig}})),this.impactDataController=new L(this,this.getImpactData),this.renderImageCard=a=>{const i=`${a.nonprofit?.name} image`,r=`Learn more about ${a.nonprofit?.name}`;return g`
|
|
2
2
|
<div class="image-card" part="nonprofit-card" style="display: flex; flex-direction: column;">
|
|
3
3
|
<div
|
|
4
4
|
class="image-card-image-box"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as x,g as d,t as I,h as v,y as g,
|
|
1
|
+
import{f as x,g as d,t as I,h as v,y as g,k as b,m as u}from"../chunks/lit-iNN5L_Qk.esm.js";import{p as $}from"../chunks/progress-bar-PMU_xI3L.esm.js";import{partnerLogosConfigDefaults as T}from"./beam-partner-logos.js";import{c as k,d as w,e as S}from"../chunks/enforce-config-ZyPq_4CF.esm.js";import{u as n,A as L,i as c,_ as f,d as m,a as A}from"../chunks/localize-m-_ESmpk.esm.js";import{D as z,g as F,W as D,S as M}from"../chunks/routes-kK10CmJz.esm.js";import{_ as U}from"../chunks/loading-template-t4fFsYtr.esm.js";import{B as E}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{c as C}from"../chunks/css-card-grid-nEc--M5M.esm.js";import"../utils/logger.js";const y={en:{fundedTimes:({times:t=0})=>`Funded <b>${t}</b> ${t>1?"times":"time"} so far`,learnMore:()=>"Learn more",seeAll:()=>"See All"},fr:{fundedTimes:({times:t=0})=>`Financ\xE9 <b>${t}</b> fois pour l'instant`,learnMore:()=>"En savoir plus",seeAll:()=>"Voir tout"},de:{fundedTimes:({times:t=0})=>`<b>${t}</b> Mal finanziert`,learnMore:()=>"Mehr erfahren",seeAll:()=>"Alle anzeigen"},es:{fundedTimes:({times:t=0})=>`Financiado <b>${t}</b> ${t>1?"vez":"veces"}`,learnMore:()=>"Saber m\xE1s",seeAll:()=>"Ver Todo"},it:{fundedTimes:({times:t=0})=>`Finanziato <b>${t}</b> ${t>1?"volta":"volte"}`,learnMore:()=>"Scopri di pi\xF9",seeAll:()=>"Vedi Tutto"},pl:{fundedTimes:({times:t=0})=>`Udzielono wsparcia <b>${t}</b> ${t>1?"razy":"raz"}`,learnMore:()=>"Dowiedz si\u0119 wi\u0119cej",seeAll:()=>"Zobacz wszystko"}};var _=Object.defineProperty,P=Object.getOwnPropertyDescriptor,p=(t,a,i,r)=>{for(var o=r>1?void 0:r?P(a,i):a,e=t.length-1,l;e>=0;e--)(l=t[e])&&(o=(r?l(a,i,o):l(o))||o);return r&&o&&_(a,i,o),o};class s extends v{constructor(){super(...arguments),this.baseUrl=z,this.cardStyle="image",this.lang="en",this.debug=!1,this.draftConfig=!1,this.selectedFilter=null,this.getImpactData=async()=>(S(["apiKey","chainId"],this),F({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{chainId:this.chainId,personalImpactLimit:0,widgetName:D.community_impact,version:"1.0.0",lang:this.configLang,draftConfig:this.draftConfig}})),this.impactDataController=new L(this,this.getImpactData),this.renderImageCard=a=>{const i=`${a.nonprofit?.name} image`,r=`Learn more about ${a.nonprofit?.name}`;return g`
|
|
2
2
|
<div class="image-card" part="nonprofit-card" style="display: flex; flex-direction: column;">
|
|
3
3
|
<div
|
|
4
4
|
class="image-card-image-box"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as C,h as b,y as u,g as c,f as y,p as I}from"../chunks/lit-
|
|
1
|
+
import{t as C,h as b,y as u,g as c,f as y,p as I}from"../chunks/lit-iNN5L_Qk.esm.js";import{d as x}from"../chunks/lodash-P8OIs-at.esm.js";import{c as T,d as S,e as E}from"../chunks/enforce-config-ZAI7WYAd.esm.js";import{u as p,A as z,_ as f,i as d,d as v,a as B}from"../chunks/localize-o-cYvHQf.esm.js";import{D,l as k,S as L}from"../chunks/routes-4z90Ks28.esm.js";import{B as $}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{_ as V}from"../chunks/loading-template-t4fFsYtr.esm.js";import{i as A}from"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../utils/logger.esm.js";var j=Object.defineProperty,R=Object.getOwnPropertyDescriptor,h=(s,e,t,a)=>{for(var i=a>1?void 0:a?R(e,t):e,o=s.length-1,r;o>=0;o--)(r=s[o])&&(i=(a?r(e,t,i):r(i))||i);return a&&i&&j(e,t,i),i};class m extends b{constructor(){super(...arguments),this.finalValue=0,this.duration=1500,this.counter=0,this.intervalId=0,this.handleCounterAnimateIfInView=e=>{e.some(t=>t.isIntersecting)&&(this.animateCounter(),this.unobserveScrollTarget())},this.animateCounter=()=>{const e=41.666666666666664,t=e/this.duration*this.finalValue;this.intervalId=setInterval(()=>{const a=this.counter+t;if(a>=this.finalValue){this.counter=this.finalValue,clearInterval(this.intervalId);return}else this.counter=a},e)},this.observer=new IntersectionObserver(this.handleCounterAnimateIfInView,{threshold:.1}),this.observeScrollTarget=()=>{const e=this.scrollTargetElement;e&&this.observer.observe(e)},this.unobserveScrollTarget=()=>{const e=this.scrollTargetElement;e&&this.observer.unobserve(e)}}connectedCallback(){super.connectedCallback();const e=window.matchMedia("(prefers-reduced-motion: reduce)").matches;this.duration===0||e?this.counter=this.finalValue:this.observeScrollTarget()}disconnectedCallback(){super.disconnectedCallback(),this.unobserveScrollTarget(),clearInterval(this.intervalId)}get scrollTargetElement(){return this.scrollTarget?document.querySelector(this.scrollTarget):this}render(){return u`${Math.ceil(this.counter).toLocaleString()}`}}h([c({type:Number})],m.prototype,"finalValue",2),h([c({type:Number})],m.prototype,"duration",2),h([c({type:String})],m.prototype,"scrollTarget",2),h([C()],m.prototype,"counter",2),customElements.get("animated-counter")||customElements.define("animated-counter",m);const O=s=>{const e=s instanceof NodeList?Array.from(s):s;if(e.length===0||!A(e))return;const t=e.sort((i,o)=>{const r=getComputedStyle(i).getPropertyValue("width").replace("px",""),g=getComputedStyle(o).getPropertyValue("width").replace("px","");return parseInt(g)-parseInt(r)})[0],a=getComputedStyle(t).getPropertyValue("width");for(const i of e)getComputedStyle(i).getPropertyValue("width")!==a&&(i.style.width=a)},w={en:{cumulativeImpactTitle:()=>"What we've funded",cumulativeImpactDescription:()=>"Here's the impact that our community has made so far in partnership with Beam. Our impact is growing every day\u2014 scroll to check out the goals we're working toward together right now."},fr:{cumulativeImpactTitle:()=>"Ce que nous avons financ\xE9",cumulativeImpactDescription:()=>"Voici l'impact que notre communaut\xE9 a eu jusqu'\xE0 pr\xE9sent en partenariat avec Beam. Notre impact grandit chaque jour : faites d\xE9filer pour d\xE9couvrir les objectifs vers lesquels nous travaillons ensemble en ce moment."},de:{cumulativeImpactTitle:()=>"Was wir finanziert haben",cumulativeImpactDescription:()=>"Hier ist die Wirkung, die unsere Community bisher in Zusammenarbeit mit Beam erzielt hat. Unsere Wirkung w\xE4chst von Tag zu Tag - scrollen Sie, um einen Blick auf die Ziele zu werfen, auf die wir derzeit gemeinsam hinarbeiten."},es:{cumulativeImpactTitle:()=>"Lo que hemos financiado",cumulativeImpactDescription:()=>"Este es el impacto que nuestra comunidad ha tenido hasta ahora en asociaci\xF3n con Beam. Nuestro impacto crece cada d\xEDa; despl\xE1cese para ver los objetivos por los que estamos trabajando juntos en este momento."},it:{cumulativeImpactTitle:()=>"Cosa abbiamo finanziato",cumulativeImpactDescription:()=>"Ecco l'impatto che la nostra comunit\xE0 ha avuto finora in collaborazione con Beam. Il nostro impatto cresce ogni giorno: scorri per scoprire gli obiettivi a cui stiamo lavorando insieme in questo momento."},pl:{cumulativeImpactTitle:()=>"Co sfinansowali\u015Bmy",cumulativeImpactDescription:()=>"Oto wp\u0142yw, jaki nasza spo\u0142eczno\u015B\u0107 wywar\u0142a dotychczas we wsp\xF3\u0142pracy z Beam. Nasz wp\u0142yw ro\u015Bnie z ka\u017Cdym dniem \u2014 przewi\u0144, aby sprawdzi\u0107 cele, nad kt\xF3rymi obecnie wsp\xF3lnie pracujemy."}};var P=Object.defineProperty,q=Object.getOwnPropertyDescriptor,l=(s,e,t,a)=>{for(var i=a>1?void 0:a?q(e,t):e,o=s.length-1,r;o>=0;o--)(r=s[o])&&(i=(a?r(e,t,i):r(i))||i);return a&&i&&P(e,t,i),i};const U=1.5*1e3;class n extends b{constructor(){super(...arguments),this.baseUrl=D,this.lang="en",this.disableAnimation=!1,this.debug=!1,this.draftConfig=!1,this.getCumulativeImpactData=async()=>(E(["apiKey","chainId"],this),await k({baseUrl:this.baseUrl,pathParams:{chainId:this.chainId},headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{version:"1.0.0",lang:this.configLang,draftConfig:this.draftConfig}})),this.cumulativeImpactDataController=new z(this,this.getCumulativeImpactData),this.resizeElements=x(()=>{O(this.impactRowRefs)},50,{maxWait:50,leading:!0})}get configLang(){return L[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.resizeElements)}async updated(e){const t=["chainId","baseUrl","lang"];for(const a of t)if(e.has(a)){await this.cumulativeImpactDataController.exec();break}this.resizeElements()}render(){const{data:e,error:t,loading:a}=this.cumulativeImpactDataController;return a?V():t?this.debug?f({error:t}):"":e==null?this.debug?f({error:new $("Missing data")}):"":u`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
${this.cssVariables.toCSS()}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as C,h as b,y as u,g as c,f as y,p as I}from"../chunks/lit-
|
|
1
|
+
import{t as C,h as b,y as u,g as c,f as y,p as I}from"../chunks/lit-iNN5L_Qk.esm.js";import{d as x}from"../chunks/lodash-P8OIs-at.esm.js";import{c as T,d as S,e as E}from"../chunks/enforce-config-ZyPq_4CF.esm.js";import{u as p,A as z,_ as f,i as d,d as v,a as B}from"../chunks/localize-m-_ESmpk.esm.js";import{D,l as k,S as L}from"../chunks/routes-kK10CmJz.esm.js";import{B as $}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{_ as V}from"../chunks/loading-template-t4fFsYtr.esm.js";import{i as A}from"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../utils/logger.js";var j=Object.defineProperty,R=Object.getOwnPropertyDescriptor,h=(s,e,t,a)=>{for(var i=a>1?void 0:a?R(e,t):e,o=s.length-1,r;o>=0;o--)(r=s[o])&&(i=(a?r(e,t,i):r(i))||i);return a&&i&&j(e,t,i),i};class m extends b{constructor(){super(...arguments),this.finalValue=0,this.duration=1500,this.counter=0,this.intervalId=0,this.handleCounterAnimateIfInView=e=>{e.some(t=>t.isIntersecting)&&(this.animateCounter(),this.unobserveScrollTarget())},this.animateCounter=()=>{const e=41.666666666666664,t=e/this.duration*this.finalValue;this.intervalId=setInterval(()=>{const a=this.counter+t;if(a>=this.finalValue){this.counter=this.finalValue,clearInterval(this.intervalId);return}else this.counter=a},e)},this.observer=new IntersectionObserver(this.handleCounterAnimateIfInView,{threshold:.1}),this.observeScrollTarget=()=>{const e=this.scrollTargetElement;e&&this.observer.observe(e)},this.unobserveScrollTarget=()=>{const e=this.scrollTargetElement;e&&this.observer.unobserve(e)}}connectedCallback(){super.connectedCallback();const e=window.matchMedia("(prefers-reduced-motion: reduce)").matches;this.duration===0||e?this.counter=this.finalValue:this.observeScrollTarget()}disconnectedCallback(){super.disconnectedCallback(),this.unobserveScrollTarget(),clearInterval(this.intervalId)}get scrollTargetElement(){return this.scrollTarget?document.querySelector(this.scrollTarget):this}render(){return u`${Math.ceil(this.counter).toLocaleString()}`}}h([c({type:Number})],m.prototype,"finalValue",2),h([c({type:Number})],m.prototype,"duration",2),h([c({type:String})],m.prototype,"scrollTarget",2),h([C()],m.prototype,"counter",2),customElements.get("animated-counter")||customElements.define("animated-counter",m);const O=s=>{const e=s instanceof NodeList?Array.from(s):s;if(e.length===0||!A(e))return;const t=e.sort((i,o)=>{const r=getComputedStyle(i).getPropertyValue("width").replace("px",""),g=getComputedStyle(o).getPropertyValue("width").replace("px","");return parseInt(g)-parseInt(r)})[0],a=getComputedStyle(t).getPropertyValue("width");for(const i of e)getComputedStyle(i).getPropertyValue("width")!==a&&(i.style.width=a)},w={en:{cumulativeImpactTitle:()=>"What we've funded",cumulativeImpactDescription:()=>"Here's the impact that our community has made so far in partnership with Beam. Our impact is growing every day\u2014 scroll to check out the goals we're working toward together right now."},fr:{cumulativeImpactTitle:()=>"Ce que nous avons financ\xE9",cumulativeImpactDescription:()=>"Voici l'impact que notre communaut\xE9 a eu jusqu'\xE0 pr\xE9sent en partenariat avec Beam. Notre impact grandit chaque jour : faites d\xE9filer pour d\xE9couvrir les objectifs vers lesquels nous travaillons ensemble en ce moment."},de:{cumulativeImpactTitle:()=>"Was wir finanziert haben",cumulativeImpactDescription:()=>"Hier ist die Wirkung, die unsere Community bisher in Zusammenarbeit mit Beam erzielt hat. Unsere Wirkung w\xE4chst von Tag zu Tag - scrollen Sie, um einen Blick auf die Ziele zu werfen, auf die wir derzeit gemeinsam hinarbeiten."},es:{cumulativeImpactTitle:()=>"Lo que hemos financiado",cumulativeImpactDescription:()=>"Este es el impacto que nuestra comunidad ha tenido hasta ahora en asociaci\xF3n con Beam. Nuestro impacto crece cada d\xEDa; despl\xE1cese para ver los objetivos por los que estamos trabajando juntos en este momento."},it:{cumulativeImpactTitle:()=>"Cosa abbiamo finanziato",cumulativeImpactDescription:()=>"Ecco l'impatto che la nostra comunit\xE0 ha avuto finora in collaborazione con Beam. Il nostro impatto cresce ogni giorno: scorri per scoprire gli obiettivi a cui stiamo lavorando insieme in questo momento."},pl:{cumulativeImpactTitle:()=>"Co sfinansowali\u015Bmy",cumulativeImpactDescription:()=>"Oto wp\u0142yw, jaki nasza spo\u0142eczno\u015B\u0107 wywar\u0142a dotychczas we wsp\xF3\u0142pracy z Beam. Nasz wp\u0142yw ro\u015Bnie z ka\u017Cdym dniem \u2014 przewi\u0144, aby sprawdzi\u0107 cele, nad kt\xF3rymi obecnie wsp\xF3lnie pracujemy."}};var P=Object.defineProperty,q=Object.getOwnPropertyDescriptor,l=(s,e,t,a)=>{for(var i=a>1?void 0:a?q(e,t):e,o=s.length-1,r;o>=0;o--)(r=s[o])&&(i=(a?r(e,t,i):r(i))||i);return a&&i&&P(e,t,i),i};const U=1.5*1e3;class n extends b{constructor(){super(...arguments),this.baseUrl=D,this.lang="en",this.disableAnimation=!1,this.debug=!1,this.draftConfig=!1,this.getCumulativeImpactData=async()=>(E(["apiKey","chainId"],this),await k({baseUrl:this.baseUrl,pathParams:{chainId:this.chainId},headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{version:"1.0.0",lang:this.configLang,draftConfig:this.draftConfig}})),this.cumulativeImpactDataController=new z(this,this.getCumulativeImpactData),this.resizeElements=x(()=>{O(this.impactRowRefs)},50,{maxWait:50,leading:!0})}get configLang(){return L[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.resizeElements)}async updated(e){const t=["chainId","baseUrl","lang"];for(const a of t)if(e.has(a)){await this.cumulativeImpactDataController.exec();break}this.resizeElements()}render(){const{data:e,error:t,loading:a}=this.cumulativeImpactDataController;return a?V():t?this.debug?f({error:t}):"":e==null?this.debug?f({error:new $("Missing data")}):"":u`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
${this.cssVariables.toCSS()}
|
|
@@ -159,11 +159,16 @@ declare class BeamImpactOverview extends LitElement {
|
|
|
159
159
|
*/
|
|
160
160
|
handleFontLoad<T = any>(callback: () => T | void): Promise<void | T>;
|
|
161
161
|
resizeElements: lodash.DebouncedFuncLeading<() => void>;
|
|
162
|
-
renderCard({ imageUrl, title, percentFunded, description, }: {
|
|
162
|
+
renderCard({ imageUrl, title, percentFunded, goalProgressText, description, urlCopy, impactUrl, isImage, cardType, }: {
|
|
163
163
|
imageUrl: TUrl;
|
|
164
164
|
title: string;
|
|
165
165
|
percentFunded: number;
|
|
166
|
+
goalProgressText: string;
|
|
166
167
|
description: string;
|
|
168
|
+
urlCopy?: string;
|
|
169
|
+
impactUrl: TUrl;
|
|
170
|
+
isImage: boolean;
|
|
171
|
+
cardType: string;
|
|
167
172
|
}): lit_html.TemplateResult<1>;
|
|
168
173
|
render(): "" | lit_html.TemplateResult<1>;
|
|
169
174
|
get cssVariables(): any;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import{f,g as c,p as
|
|
2
|
-
<div class="impact-card" part="impact-card">
|
|
3
|
-
<
|
|
4
|
-
|
|
1
|
+
import{f as k,g as c,p as f,h as E,y as O,k as D}from"../chunks/lit-iNN5L_Qk.esm.js";import{d as N}from"../chunks/lodash-P8OIs-at.esm.js";import{D as j,g as P,W as R,S as A}from"../chunks/routes-4z90Ks28.esm.js";import{p as F}from"../chunks/progress-bar-PMU_xI3L.esm.js";import{u,A as _,i as g,_ as $,d as v,a as V}from"../chunks/localize-o-cYvHQf.esm.js";import{c as W,d as q,e as G}from"../chunks/enforce-config-ZAI7WYAd.esm.js";import{_ as K}from"../chunks/loading-template-t4fFsYtr.esm.js";import{logger as H}from"../utils/logger.esm.js";import"../chunks/shoelace-components-59LxBr67.esm.js";import{s as y,a as M}from"../chunks/share-button-RG2BkqMA.esm.js";import{partnerLogosConfigDefaults as Y}from"./beam-partner-logos.esm.js";import{c as J}from"../chunks/responsive-2lC2Wrtg.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";const l={en:{descriptionTitle:({nonprofitName:e="a nonprofit"})=>`You've just made an impact for ${e}`,descriptionSubtitle:({causeName:e=""})=>`Together, we\u2019re making an impact towards ${e} initiatives.`,yourImpactTitle:()=>"You\u2019ve Funded",communityImpactTitle:()=>"Together we\u2019re funding",personalImpactLinkCopy:({name:e=""})=>`Learn about ${e}`,communityImpactLinkCopy:({name:e=""})=>`Learn about ${e}'s Impact`,impactShareButton:()=>"Share to Grow Your Impact"},fr:{descriptionTitle:({nonprofitName:e=""})=>`Vous avez eu un impact positif sur ${e}`,descriptionSubtitle:({causeName:e=""})=>`D\xE9couvrez quel est l'impact de votre achat chez ${e} ci-dessous.`,yourImpactTitle:()=>"Vous avez financ\xE9",communityImpactTitle:()=>"Ensemble, nous finan\xE7ons",personalImpactLinkCopy:({name:e=""})=>`En savoir sur ${e}`,communityImpactLinkCopy:({name:e=""})=>`Apprendre l'impact de ${e}`,impactShareButton:()=>"Partagez pour augmentez notre cause"},de:{descriptionTitle:({nonprofitName:e=""})=>`Du hast soeben einen Beitrag geleistet f\xFCr ${e}`,descriptionSubtitle:({causeName:e=""})=>`Erfahre mehr \xFCber den Beitrag, den du mit deinem ${e} Kauf geleistet hast`,yourImpactTitle:()=>"Sie haben finanziert",communityImpactTitle:()=>"Gemeinsam finanzieren wir",personalImpactLinkCopy:({name:e=""})=>`Mehr \xFCber ${e} lernen`,communityImpactLinkCopy:({name:e=""})=>`Erfahre den Einfluss von ${e}`,impactShareButton:()=>"Teil, um unserem Beitrag zu erh\xF6hen"},es:{descriptionTitle:({nonprofitName:e=""})=>`Acabas de contribuir con ${e}`,descriptionSubtitle:({causeName:e=""})=>`Comprueba la contribuci\xF3n que has hecho con tu compra ${e} a continuaci\xF3n`,yourImpactTitle:()=>"Has financiado",communityImpactTitle:()=>"Juntos estamos financiando",personalImpactLinkCopy:({name:e=""})=>`Saber de ${e}`,communityImpactLinkCopy:({name:e=""})=>`Conocer el impacto de ${e}`,impactShareButton:()=>"Comparte para aumentar nuestro impacto"},it:{descriptionTitle:({nonprofitName:e=""})=>`Hai appena fatto la differenza per ${e}`,descriptionSubtitle:({causeName:e=""})=>`Guarda qui sotto l'impatto del tuo acquisto ${e}`,yourImpactTitle:()=>"Hai finanziato",communityImpactTitle:()=>"Insieme stiamo finanziando",personalImpactLinkCopy:({name:e=""})=>`Scopri su ${e}`,communityImpactLinkCopy:({name:e=""})=>`Scopri l'impatto di ${e}`,impactShareButton:()=>"Condividi, aiutaci a fare la differenza"},pl:{descriptionTitle:({nonprofitName:e=""})=>`W\u0142a\u015Bnie wspar\u0142a\u015B_e\u015B ${e}!`,descriptionSubtitle:({causeName:e=""})=>`Sprawd\u017A ni\u017Cej, jakiego wsparcia udzieli\u0142a\u015B_e\u015B kupuj\u0105c w ${e} `,yourImpactTitle:()=>"Sfinansowa\u0142e\u015B(a) ",communityImpactTitle:()=>"Razem finansujemy",personalImpactLinkCopy:({name:e=""})=>`Dowiedz si\u0119 o ${e}`,communityImpactLinkCopy:({name:e=""})=>`Poznaj wp\u0142yw ${e}`,impactShareButton:()=>"Udost\u0119pnij, by szerzy\u0107 nasz\u0105 misj\u0119"}};var Q=Object.defineProperty,X=Object.getOwnPropertyDescriptor,o=(e,a,i,r)=>{for(var n=r>1?void 0:r?X(a,i):a,p=e.length-1,s;p>=0;p--)(s=e[p])&&(n=(r?s(a,i,n):s(n))||n);return r&&n&&Q(a,i,n),n};class t extends E{constructor(){super(...arguments),this.baseUrl=j,this.lang="en",this.debug=!1,this.draftConfig=!1,this.getImpactData=async()=>(G(["apiKey","userId","nonprofitId"],this),await P({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{nonprofitId:this.nonprofitId,beamUserId:this.userId,personalImpactLimit:1,communityImpactLimit:1,storeId:this.storeId,widgetName:R.impact_overview,version:"1.0.0",draftConfig:this.draftConfig,lang:this.configLang,discountCodes:this.discountCodes&&this.discountCodes.length>0?this.discountCodes:void 0,transactionId:this.transactionId??void 0}})),this.impactDataController=new _(this,this.getImpactData),this.resizeElements=N(()=>{y(this.impactTitleRefs),y(this.impactDescriptionRefs),y(this.impactLinkRefs)},50,{maxWait:50,leading:!0})}get configLang(){return A[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.resizeElements)}async updated(a){const i=["baseUrl","storeId","apiKey","userId","lang","discountCodes"];for(const r of i)if(a.has(r)){await this.impactDataController.exec();break}this.resizeElements(),await this.handleFontLoad(this.resizeElements)}disconnectedCallback(){window.removeEventListener("resize",this.resizeElements),document.fonts.removeEventListener("loadingdone",this.resizeElements),super.disconnectedCallback()}async handleFontLoad(a){if(document.fonts.status==="loading")return await document.fonts.ready.catch(i=>H.error(i)),a()}renderCard({imageUrl:a,title:i,percentFunded:r,goalProgressText:n,description:p,urlCopy:s,impactUrl:m,isImage:d,cardType:b}){return O`
|
|
2
|
+
<div class="impact-card ${d?"":"icon"}" part="impact-card">
|
|
3
|
+
<div class="${d?"":"icon-background "}">
|
|
4
|
+
<img src="${a}" alt="${i}" class="${d?"impact-card-image":"impact-card-icon"}" />
|
|
5
|
+
</div>
|
|
6
|
+
<div class="${d?"":"impact-icon-card-content"}" style="margin: 12px;">
|
|
5
7
|
<div class="impact-card-title">${i}</div>
|
|
8
|
+
<p class="impact-card-description">${D(p)}</p>
|
|
6
9
|
<div class="impact-card-progress" style="display: flex; align-items: center;">
|
|
7
10
|
<beam-progress-bar
|
|
8
11
|
value="${r}"
|
|
@@ -10,13 +13,17 @@ import{f,g as c,p as h,h as x,y,m as S}from"../chunks/lit-3QHn3fwl.esm.js";impor
|
|
|
10
13
|
class="impact-card-progressbar"
|
|
11
14
|
></beam-progress-bar>
|
|
12
15
|
<span class="impact-card-progressText" style="flex: 0 1; margin-left: 10px; white-space: nowrap;"
|
|
13
|
-
>${
|
|
16
|
+
>${g(this.configLang,n)}</span
|
|
14
17
|
>
|
|
15
18
|
</div>
|
|
16
|
-
<p class="impact-
|
|
19
|
+
<p class="impact-link" part="impact-link">
|
|
20
|
+
<a href="${m}" target="_blank" rel="noopener noreferrer">
|
|
21
|
+
${b==="personal"?l[this.configLang].personalImpactLinkCopy({name:s}):l[this.configLang].communityImpactLinkCopy({name:s})}<span class="impact-link-arrow"> ›</span>
|
|
22
|
+
</a>
|
|
23
|
+
</p>
|
|
17
24
|
</div>
|
|
18
25
|
</div>
|
|
19
|
-
`}render(){const{data:a,loading:i,error:r}=this.impactDataController;if(i)return
|
|
26
|
+
`}render(){const{data:a,loading:i,error:r}=this.impactDataController;if(i)return K();if(r)return this.debug?$({error:r}):"";if(a==null)return this.debug?$({error:new Error("No data")}):"";const n=this.impactDataController.data?.chain.name,p=g(this.configLang,a.personal[0].nonprofit.cause||""),s=this.cssVariables["--beam-ImpactOverview-cardStyle"],m=s==="'image'",d=s==="'selected_icon'",b=a.personal[0]?.imageUrl||"",T=a.community[0].imageUrl||"",I=a.personal[0]?.nonprofit.causeIconUrl,w=a.personal[0]?.nonprofit.causeIconSelectedUrl,S=m?b:d?w:I,L=m?T:d?w:I,z=this.impactDataController.data?.promoAssetUrl||this.impactDataController.data?.personalImpactAssetUrl,C=this.cssVariables["--beam-ImpactOverview-share-button-display"]!=="none",B=C&&this.cssVariables["--beam-ImpactOverview-share-button-display-mobile"]!=="none",x=C&&this.cssVariables["--beam-ImpactOverview-share-button-display-desktop"]!=="none",U=this.cssVariables["--beam-ImpactOverview-share-button-icon-name"]||"share-2";let h="d-none";return B?h=x?"d-block":"d-lg-none":h=x?"d-none d-lg-block":"d-none",O`
|
|
20
27
|
<style>
|
|
21
28
|
:host {
|
|
22
29
|
${this.cssVariables.toCSS()}
|
|
@@ -33,51 +40,34 @@ import{f,g as c,p as h,h as x,y,m as S}from"../chunks/lit-3QHn3fwl.esm.js";impor
|
|
|
33
40
|
|
|
34
41
|
<div class="description">
|
|
35
42
|
<div class="title" part="title">
|
|
36
|
-
${
|
|
43
|
+
${g(this.configLang,a.config?.web?.title)||l[this.configLang].descriptionTitle({nonprofitName:a.personal[0].nonprofit.name})}
|
|
37
44
|
</div>
|
|
38
45
|
<div class="subtitle" part="subtitle">
|
|
39
|
-
${
|
|
46
|
+
${g(this.configLang,a.config?.web?.description)||l[this.configLang].descriptionSubtitle({causeName:p})}
|
|
40
47
|
</div>
|
|
41
48
|
</div>
|
|
42
49
|
|
|
43
|
-
<div class="impact-cards"
|
|
44
|
-
<div class="impact your-impact
|
|
45
|
-
${this.renderCard({imageUrl:
|
|
46
|
-
<p class="impact-link" part="impact-link">
|
|
47
|
-
<a href="${a.personal[0].nonprofit?.website}" target="_blank" rel="noopener noreferrer">
|
|
48
|
-
${s[this.configLang].learnMore({name:a.personal[0].nonprofit?.name})}<span class="impact-link-arrow"> ›</span>
|
|
49
|
-
</a>
|
|
50
|
-
</p>
|
|
50
|
+
<div class="${m?"impact-image-cards":"impact-icon-cards"}">
|
|
51
|
+
<div class="impact your-impact ${m?"image-card-container":"icon-card-container"}">
|
|
52
|
+
${this.renderCard({isImage:m,imageUrl:S||"",title:l[this.configLang].yourImpactTitle(),percentFunded:a.personal[0]?.impact?.goalProgressPercentage||0,goalProgressText:a.personal[0]?.impact?.goalProgressText,description:g(this.configLang,a.personal[0]?.impact?.description||""),urlCopy:a.personal[0].nonprofit?.name,impactUrl:a.personal[0].nonprofit?.website||"",cardType:"personal"})}
|
|
51
53
|
</div>
|
|
52
|
-
<div
|
|
53
|
-
|
|
54
|
-
style="flex: 1 1; display: inline-block; max-width: 100%; min-width: 200px;"
|
|
55
|
-
>
|
|
56
|
-
${this.renderCard({imageUrl:a.community[0].imageUrl||"",title:s[this.configLang].communityImpactTitle({brandName:a.chain.name}),percentFunded:a.community[0].impact?.goalProgressPercentage||0,description:u(this.configLang,a.community[0].impact?.description||"")})}
|
|
57
|
-
<p class="impact-link" part="impact-link">
|
|
58
|
-
<a
|
|
59
|
-
href="${a.chain.communityImpactUrl||a.community[0].nonprofit.website}"
|
|
60
|
-
target="_blank"
|
|
61
|
-
rel="noopener noreferrer"
|
|
62
|
-
>
|
|
63
|
-
${s[this.configLang].seeAllImpact({brandName:a.chain.name})}<span class="impact-link-arrow"> ›</span>
|
|
64
|
-
</a>
|
|
65
|
-
</p>
|
|
54
|
+
<div class="impact community-impact ${m?"image-card-container":"icon-card-container"}">
|
|
55
|
+
${this.renderCard({isImage:m,imageUrl:L||"",title:l[this.configLang].communityImpactTitle(),percentFunded:a.community[0].impact?.goalProgressPercentage||0,goalProgressText:a.community[0]?.impact?.goalProgressText,description:g(this.configLang,a.community[0].impact?.description||""),urlCopy:a.chain.name,impactUrl:a.chain.communityImpactUrl||a.community[0].nonprofit.website||"",cardType:"community"})}
|
|
66
56
|
</div>
|
|
67
57
|
</div>
|
|
68
58
|
|
|
69
|
-
<div class="footer ${
|
|
59
|
+
<div class="footer ${h} shareButtonContainer" part="social-share">
|
|
70
60
|
<beam-share-button
|
|
71
|
-
imageUrl="${
|
|
61
|
+
imageUrl="${z}"
|
|
72
62
|
brandName="${n}"
|
|
73
|
-
shareIcon="${
|
|
74
|
-
buttonText="${
|
|
63
|
+
shareIcon="${U}"
|
|
64
|
+
buttonText="${l[this.configLang].impactShareButton()}"
|
|
75
65
|
configLang="${this.configLang}"
|
|
76
66
|
></beam-share-button>
|
|
77
67
|
</div>
|
|
78
68
|
|
|
79
69
|
<div id="modal-root"></div>
|
|
80
|
-
`}get cssVariables(){const a={"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"inherit","--beam-textColor":"inherit","--beam-backgroundColor":"inherit",...
|
|
70
|
+
`}get cssVariables(){const a={"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"inherit","--beam-textColor":"inherit","--beam-backgroundColor":"inherit",...Y,...F,...M,...v("--beam-ImpactOverview-title",{fontSize:"16px",fontWeight:"bold",marginTop:"10px",textTransform:"capitalize"}),...v("--beam-ImpactOverview-subtitle",{marginTop:"5px"}),"--beam-ImpactOverview-impactCards-maxWidth":"650px","--beam-ImpactOverview-impactCard-backgroundColor":"inherit","--beam-ImpactOverview-impactCard-foregroundColor":"currentColor","--beam-ImpactOverview-impactCard-borderColor":"currentColor","--beam-ImpactOverview-impactCard-borderRadius":"5px","--beam-ImpactOverview-impactCard-marginTop":"10px",...v("--beam-ImpactOverview-impactCard-title",{fontSize:"15px",fontWeight:"bold",letterSpacing:"0.36px"}),"--beam-ImpactOverview-impactCard-progress-marginTop":"15px",...v("--beam-ImpactOverview-impactCard-progressText"),...v("--beam-ImpactOverview-impactCard-description",{marginTop:"10px"}),"--beam-ImpactOverview-impactCard-linkArrow-display":"inline","--beam-ImpactOverview-impactCard-link-color":"inherit",...v("--beam-ImpactOverview-impactCard-link",{marginTop:"10px",textDecoration:"underline",textTransform:"capitalize"}),"--beam-ImpactOverview-share-button-display":"none","--beam-ImpactOverview-share-button-display-mobile":"inherit","--beam-ImpactOverview-share-button-display-desktop":"inherit","--beam-ImpactOverview-image-display":"block","--beam-ImpactOverview-cardStyle":"'image'","--beam-ImpactOverview-iconBackground-width":"75px","--beam-ImpactOverview-iconBackground-height":"75px","--beam-ImpactOverview-iconBackground-borderRadius":"50px","--beam-ImpactOverview-icon-padding":"0px","--beam-ImpactOverview-iconBackground-background":"#f3f3f3","--beam-ImpactOverview-impactCard-shareButton-background":"#fff","--beam-ImpactOverview-impactCard-shareButton-boxShadow":"0px -20px 20px 0px rgb(0 0 0 / 2%)"},i=this.impactDataController?.data?.config?.web?.theme||{},r={...a,...i};return Object.assign(Object.create({toCSS(){return V(this)}}),r)}}t.tagName="beam-impact-overview",t.styles=[W,J,k`
|
|
81
71
|
:host {
|
|
82
72
|
display: block;
|
|
83
73
|
font-family: var(--beam-fontFamily);
|
|
@@ -85,13 +75,41 @@ import{f,g as c,p as h,h as x,y,m as S}from"../chunks/lit-3QHn3fwl.esm.js";impor
|
|
|
85
75
|
font-size: var(--beam-fontSize);
|
|
86
76
|
background-color: var(--beam-backgroundColor);
|
|
87
77
|
color: var(--beam-textColor);
|
|
88
|
-
max-width: var(--beam-ImpactOverview-impactCards-maxWidth,
|
|
78
|
+
max-width: var(--beam-ImpactOverview-impactCards-maxWidth, 650px);
|
|
89
79
|
word-break: normal;
|
|
90
80
|
}
|
|
91
|
-
.
|
|
81
|
+
.icon {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
}
|
|
85
|
+
.icon-background {
|
|
86
|
+
width: var(--beam-ImpactOverview-iconBackground-width, 75px);
|
|
87
|
+
height: var(--beam-ImpactOverview-iconBackground-height, 75px);
|
|
88
|
+
border-radius: var(--beam-ImpactOverview-iconBackground-borderRadius, 50px);
|
|
89
|
+
padding: var(--beam-ImpactOverview-icon-padding, 0px);
|
|
90
|
+
margin: 8px;
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
background: var(--beam-ImpactOverview-iconBackground-background, #f3f3f3);
|
|
93
|
+
display: flex;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
align-items: center;
|
|
96
|
+
}
|
|
97
|
+
.impact-icon-card-content {
|
|
98
|
+
flex: 3 1 75%;
|
|
99
|
+
}
|
|
100
|
+
.impact-image-cards {
|
|
101
|
+
max-width: var(--beam-ImpactOverview-impactCards-maxWidth);
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-wrap: wrap;
|
|
104
|
+
gap: 15px;
|
|
105
|
+
margin: 10px 0;
|
|
106
|
+
}
|
|
107
|
+
.impact-icon-cards {
|
|
92
108
|
max-width: var(--beam-ImpactOverview-impactCards-maxWidth);
|
|
109
|
+
margin: 10px 0;
|
|
93
110
|
}
|
|
94
111
|
.impact-card {
|
|
112
|
+
padding-bottom: 5px;
|
|
95
113
|
margin-top: var(--beam-ImpactOverview-impactCard-marginTop);
|
|
96
114
|
background-color: var(--beam-ImpactOverview-impactCard-backgroundColor);
|
|
97
115
|
border: 1px solid var(--beam-ImpactOverview-impactCard-borderColor);
|
|
@@ -101,30 +119,52 @@ import{f,g as c,p as h,h as x,y,m as S}from"../chunks/lit-3QHn3fwl.esm.js";impor
|
|
|
101
119
|
}
|
|
102
120
|
.impact-card-image {
|
|
103
121
|
object-fit: cover;
|
|
104
|
-
height:
|
|
122
|
+
height: 110px;
|
|
105
123
|
width: 100%;
|
|
106
124
|
display: var(--beam-ImpactOverview-image-display);
|
|
107
125
|
}
|
|
126
|
+
.impact-card-icon {
|
|
127
|
+
flex: 1 1 10%;
|
|
128
|
+
max-width: 50%;
|
|
129
|
+
display: var(--beam-ImpactOverview-image-display);
|
|
130
|
+
}
|
|
131
|
+
.image-card-container {
|
|
132
|
+
flex: 1 1;
|
|
133
|
+
display: inline-block;
|
|
134
|
+
min-width: 200px;
|
|
135
|
+
max-width: 100%;
|
|
136
|
+
}
|
|
137
|
+
.icon-card-container {
|
|
138
|
+
max-width: 100%;
|
|
139
|
+
min-width: 299px;
|
|
140
|
+
}
|
|
108
141
|
.impact-card-progress {
|
|
109
142
|
margin-top: var(--beam-ImpactOverview-impactCard-progress-marginTop);
|
|
110
143
|
}
|
|
144
|
+
.shareButtonContainer {
|
|
145
|
+
position: sticky;
|
|
146
|
+
bottom: 0;
|
|
147
|
+
z-index: 999;
|
|
148
|
+
background-color: var(--beam-ImpactOverview-impactCard-shareButton-background);
|
|
149
|
+
box-shadow: var(--beam-ImpactOverview-impactCard-shareButton-boxShadow);
|
|
150
|
+
}
|
|
111
151
|
.title {
|
|
112
|
-
${
|
|
152
|
+
${u("--beam-ImpactOverview-title")}
|
|
113
153
|
}
|
|
114
154
|
.subtitle {
|
|
115
|
-
${
|
|
155
|
+
${u("--beam-ImpactOverview-subtitle")}
|
|
116
156
|
}
|
|
117
157
|
.impact-card-title {
|
|
118
|
-
${
|
|
158
|
+
${u("--beam-ImpactOverview-impactCard-title")}
|
|
119
159
|
}
|
|
120
160
|
.impact-card-progressText {
|
|
121
|
-
${
|
|
161
|
+
${u("--beam-ImpactOverview-impactCard-progressText")}
|
|
122
162
|
}
|
|
123
163
|
.impact-card-description {
|
|
124
|
-
${
|
|
164
|
+
${u("--beam-ImpactOverview-impactCard-description")}
|
|
125
165
|
}
|
|
126
166
|
.impact-link {
|
|
127
|
-
${
|
|
167
|
+
${u("--beam-ImpactOverview-impactCard-link")}
|
|
128
168
|
}
|
|
129
169
|
.impact-link-arrow {
|
|
130
170
|
display: var(--beam-ImpactOverview-impactCard-linkArrow-display, "inline");
|
|
@@ -132,33 +172,11 @@ import{f,g as c,p as h,h as x,y,m as S}from"../chunks/lit-3QHn3fwl.esm.js";impor
|
|
|
132
172
|
.impact-link a,
|
|
133
173
|
.impact-link a:visited {
|
|
134
174
|
color: var(--beam-ImpactOverview-impactCard-link-color, inherit);
|
|
135
|
-
text-decoration: none;
|
|
136
175
|
}
|
|
137
176
|
.footer {
|
|
138
177
|
text-align: center;
|
|
139
178
|
}
|
|
140
|
-
|
|
141
|
-
//.impact-card {
|
|
142
|
-
// display: flex;
|
|
143
|
-
// flex-direction: row;
|
|
144
|
-
//}
|
|
145
|
-
//.impact-card-image {
|
|
146
|
-
// object-fit: cover;
|
|
147
|
-
// width: 25%;
|
|
148
|
-
// height: auto;
|
|
149
|
-
// flex: 1 0 45%;
|
|
150
|
-
//}
|
|
151
|
-
//.impact-card-content {
|
|
152
|
-
// flex: 1 1 55%;
|
|
153
|
-
//}
|
|
154
|
-
//.share-button-text {
|
|
155
|
-
// display: none;
|
|
156
|
-
//}
|
|
157
|
-
//.share-button-icon {
|
|
158
|
-
// font-size: calc(var(--beam-ImpactOverview-share-button-icon-size, 16px) * 1.33);
|
|
159
|
-
//}
|
|
160
|
-
}
|
|
161
|
-
`,f`
|
|
179
|
+
`,k`
|
|
162
180
|
.button {
|
|
163
181
|
cursor: pointer;
|
|
164
182
|
}
|
|
@@ -173,9 +191,5 @@ import{f,g as c,p as h,h as x,y,m as S}from"../chunks/lit-3QHn3fwl.esm.js";impor
|
|
|
173
191
|
font-size: inherit;
|
|
174
192
|
font-family: inherit;
|
|
175
193
|
}
|
|
176
|
-
|
|
177
|
-
text-decoration: none;
|
|
178
|
-
color: inherit;
|
|
179
|
-
}
|
|
180
|
-
`],o([c({type:String,reflect:!0})],t.prototype,"baseUrl",2),o([c({type:String,reflect:!1})],t.prototype,"apiKey",2),o([c({type:Number})],t.prototype,"storeId",2),o([c({type:String,reflect:!0})],t.prototype,"nonprofitId",2),o([c({type:String,reflect:!0})],t.prototype,"userId",2),o([c({type:String})],t.prototype,"lang",2),o([c({type:Boolean})],t.prototype,"debug",2),o([c({type:Boolean})],t.prototype,"draftConfig",2),o([c({type:Object})],t.prototype,"discountCodes",2),o([c({type:String})],t.prototype,"transactionId",2),o([h(".impact-card-title")],t.prototype,"impactTitleRefs",2),o([h(".impact-card-description")],t.prototype,"impactDescriptionRefs",2),o([h(".impact-link")],t.prototype,"impactLinkRefs",2),B(t);export{t as BeamImpactOverview};
|
|
194
|
+
`],o([c({type:String,reflect:!0})],t.prototype,"baseUrl",2),o([c({type:String,reflect:!1})],t.prototype,"apiKey",2),o([c({type:Number})],t.prototype,"storeId",2),o([c({type:String,reflect:!0})],t.prototype,"nonprofitId",2),o([c({type:String,reflect:!0})],t.prototype,"userId",2),o([c({type:String})],t.prototype,"lang",2),o([c({type:Boolean})],t.prototype,"debug",2),o([c({type:Boolean})],t.prototype,"draftConfig",2),o([c({type:Object})],t.prototype,"discountCodes",2),o([c({type:String})],t.prototype,"transactionId",2),o([f(".impact-card-title")],t.prototype,"impactTitleRefs",2),o([f(".impact-card-description")],t.prototype,"impactDescriptionRefs",2),o([f(".impact-link")],t.prototype,"impactLinkRefs",2),q(t);export{t as BeamImpactOverview};
|
|
181
195
|
//# sourceMappingURL=impact-overview.esm.js.map
|