@beamimpact/web-sdk 1.57.2 → 1.57.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/README.md +66 -42
- package/dist/chunks/{_share-dialog-dependencies-DFXGKz-z.esm.js → _share-dialog-dependencies-BonvNllt.esm.js} +2 -2
- package/dist/chunks/{_share-dialog-dependencies-DFXGKz-z.esm.js.map → _share-dialog-dependencies-BonvNllt.esm.js.map} +1 -1
- package/dist/chunks/{cart-hrlPQg3L.esm.d.ts → cart-DCezceUX.esm.d.ts} +2 -2
- package/dist/chunks/{index-DXFRJEgw.esm.js → index-BXivnoQL.esm.js} +6 -6
- package/dist/chunks/index-BXivnoQL.esm.js.map +1 -0
- package/dist/chunks/{index-BXEbjPDK.esm.d.ts → index-Bi9LFICg.esm.d.ts} +1 -1
- package/dist/chunks/{index-C20vHMzS.esm.js → index-BnbtpTg-.esm.js} +2 -2
- package/dist/chunks/{index-C20vHMzS.esm.js.map → index-BnbtpTg-.esm.js.map} +1 -1
- package/dist/chunks/{index-Dc4HgxdT.esm.js → index-BpR0FMss.esm.js} +2 -2
- package/dist/chunks/{index-Dc4HgxdT.esm.js.map → index-BpR0FMss.esm.js.map} +1 -1
- package/dist/chunks/index-C03QP2W-.esm.js +32 -0
- package/dist/chunks/index-C03QP2W-.esm.js.map +1 -0
- package/dist/chunks/{index-BuLbvDL8.esm.d.ts → index-C6gns2ul.esm.d.ts} +1 -1
- package/dist/chunks/index-CQEhF7Dy.esm.js +32 -0
- package/dist/chunks/index-CQEhF7Dy.esm.js.map +1 -0
- package/dist/chunks/{index-xsFjZMYP.esm.js → index-DJ5OwAaV.esm.js} +6 -6
- package/dist/chunks/index-DJ5OwAaV.esm.js.map +1 -0
- package/dist/chunks/{index-D3OYVBqK.esm.d.ts → index-DQ89VjpD.esm.d.ts} +1 -1
- package/dist/chunks/{index-D9W31jYp.esm.js → index-Ghl9JrXJ.esm.js} +2 -2
- package/dist/chunks/{index-D9W31jYp.esm.js.map → index-Ghl9JrXJ.esm.js.map} +1 -1
- package/dist/chunks/{index-BZZiSTrL.esm.d.ts → index-h_-rDiMR.esm.d.ts} +1 -1
- package/dist/chunks/{promo-pill-label-rrCE5zhs.esm.js → promo-pill-label-F6oSUeZ_.esm.js} +2 -2
- package/dist/chunks/{promo-pill-label-rrCE5zhs.esm.js.map → promo-pill-label-F6oSUeZ_.esm.js.map} +1 -1
- package/dist/chunks/{share-button-DctAhc8i.esm.js → share-button-C_qDR7Rw.esm.js} +2 -2
- package/dist/chunks/{share-button-DctAhc8i.esm.js.map → share-button-C_qDR7Rw.esm.js.map} +1 -1
- package/dist/chunks/{share-button-Dob19-Da.esm.js → share-button-Cle5Uexn.esm.js} +2 -2
- package/dist/chunks/{share-button-Dob19-Da.esm.js.map → share-button-Cle5Uexn.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-BclA4Tsd.esm.d.ts → update-cart-B5Tr9N3V.esm.d.ts} +1 -1
- package/dist/chunks/{utils-SWm8ZEfg.esm.d.ts → utils-BPcZ5h8J.esm.d.ts} +66 -0
- package/dist/components/beam-partner-logos.d.ts +1 -1
- package/dist/components/community-impact.d.ts +1 -1
- package/dist/components/community-impact.esm.js +1 -1
- package/dist/components/community-impact.js +1 -1
- package/dist/components/cumulative-impact.d.ts +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 +1 -1
- package/dist/components/impact-overview.esm.js +1 -1
- package/dist/components/impact-overview.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +2 -1
- package/dist/components/post-purchase.esm.js +1 -1
- package/dist/components/post-purchase.js +1 -1
- package/dist/components/product-details-page.d.ts +1 -1
- package/dist/components/product-details-page.esm.js +2 -2
- package/dist/components/product-details-page.esm.js.map +1 -1
- package/dist/components/product-details-page.js +2 -2
- package/dist/components/product-details-page.js.map +1 -1
- package/dist/components/redeem-transaction.d.ts +1 -1
- package/dist/components/redeem-transaction.esm.js +1 -1
- package/dist/components/redeem-transaction.js +1 -1
- package/dist/components/select-nonprofit.d.ts +1 -1
- package/dist/components/select-nonprofit.esm.js +2 -2
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +2 -2
- 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 +1 -1
- package/dist/components/select-subscription-nonprofit.js +1 -1
- package/dist/components/shopify.d.ts +4 -4
- package/dist/components/shopify.esm.js +1 -1
- package/dist/components/shopify.js +1 -1
- package/dist/components/social-share.d.ts +1 -1
- package/dist/components/social-share.esm.js +1 -1
- package/dist/components/social-share.js +1 -1
- package/dist/components/subscriber-select-nonprofit.d.ts +1 -1
- package/dist/components/subscriber-select-nonprofit.esm.js +1 -1
- package/dist/components/subscriber-select-nonprofit.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.js +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/beam.d.ts +1 -1
- package/dist/integrations/beam.esm.js +1 -1
- package/dist/integrations/beam.js +1 -1
- package/dist/integrations/cart.d.ts +2 -2
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/logs.d.ts +2 -2
- package/dist/integrations/logs.esm.js +1 -1
- package/dist/integrations/logs.js +1 -1
- package/dist/integrations/promoManager.d.ts +1 -1
- package/dist/integrations/shopify-order.d.ts +1 -1
- package/dist/integrations/shopify-order.esm.js +1 -1
- package/dist/integrations/shopify-order.js +1 -1
- package/dist/integrations/shopify.d.ts +3 -3
- package/dist/integrations/shopify.esm.js +1 -1
- package/dist/integrations/shopify.js +1 -1
- package/dist/integrations/statsig.d.ts +1 -1
- package/dist/integrations/statsig.esm.js +1 -1
- package/dist/integrations/statsig.js +1 -1
- package/dist/integrations/utils.d.ts +1 -1
- package/dist/react/beam-partner-logos.d.ts +1 -1
- package/dist/react/community-impact.d.ts +1 -1
- package/dist/react/community-impact.esm.js +1 -1
- package/dist/react/community-impact.js +1 -1
- package/dist/react/cumulative-impact.d.ts +1 -1
- package/dist/react/cumulative-impact.esm.js +1 -1
- package/dist/react/cumulative-impact.js +1 -1
- package/dist/react/impact-overview.d.ts +1 -1
- package/dist/react/impact-overview.esm.js +1 -1
- package/dist/react/impact-overview.js +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.d.ts +1 -1
- package/dist/react/post-purchase.esm.js +1 -1
- package/dist/react/post-purchase.js +1 -1
- package/dist/react/product-details-page.d.ts +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.d.ts +1 -1
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/select-nonprofit.d.ts +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.d.ts +1 -1
- package/dist/react/select-subscription-nonprofit.esm.js +1 -1
- package/dist/react/select-subscription-nonprofit.js +1 -1
- package/dist/react/social-share.d.ts +1 -1
- package/dist/react/social-share.esm.js +1 -1
- package/dist/react/social-share.js +1 -1
- package/dist/react/subscriber-select-nonprofit.d.ts +1 -1
- package/dist/react/subscriber-select-nonprofit.esm.js +1 -1
- package/dist/react/subscriber-select-nonprofit.js +1 -1
- package/dist/react/subscription-impact.d.ts +1 -1
- package/dist/react/subscription-impact.esm.js +1 -1
- package/dist/react/subscription-impact.js +1 -1
- package/dist/react/subscription-management.d.ts +1 -1
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/utils/beam-errors.d.ts +1 -1
- package/dist/utils/cart.d.ts +1 -1
- package/dist/utils/clear-beam-storage.d.ts +1 -1
- package/dist/utils/cookies.d.ts +1 -1
- package/dist/utils/events.d.ts +1 -1
- package/dist/utils/local-storage.d.ts +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/makeApiKeyHeader.d.ts +1 -1
- package/dist/utils/memoize-last.d.ts +1 -1
- package/dist/utils/network-listeners.d.ts +1 -1
- package/dist/utils/promoManager.d.ts +1 -1
- package/dist/utils/remote-session.d.ts +1 -1
- package/dist/utils/wait-for-element.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunks/index-BW8B2iVX.esm.js +0 -32
- package/dist/chunks/index-BW8B2iVX.esm.js.map +0 -1
- package/dist/chunks/index-CxHPGblW.esm.js +0 -32
- package/dist/chunks/index-CxHPGblW.esm.js.map +0 -1
- package/dist/chunks/index-DXFRJEgw.esm.js.map +0 -1
- package/dist/chunks/index-xsFjZMYP.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-button-
|
|
1
|
+
{"version":3,"file":"share-button-Cle5Uexn.esm.js","sources":["../../src/shared/components/progress-bar.ts","../../src/api-sdk/v2/users/events.ts","../../src/shared/files.ts","../../src/shared/components/strings/share-button.ts"],"sourcesContent":["import { css, html, LitElement } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\n\nexport class BeamProgressBar extends LitElement {\n @property({ type: Number }) value = 0;\n @property({ type: Boolean }) animateProgress = true;\n\n render() {\n return html`<div class=\"progress-bar-container\">\n <style>\n :host {\n --beam-ProgressBar-value: ${this.value};\n }\n </style>\n <div class=\"progress-bar\"></div>\n </div>`;\n }\n\n static styles = css`\n :host {\n display: inline-block;\n min-width: 20px;\n }\n\n .progress-bar-container {\n border-radius: var(--beam-ProgressBar-border-radius, 8px);\n height: var(--beam-ProgressBar-height, 8px);\n padding: 0;\n width: 100%;\n background: var(--beam-ProgressBar-color-background, lightgray);\n position: relative;\n border: var(--beam-ProgressBar-border-width, 1px) solid var(--beam-ProgressBar-color-border, currentColor);\n overflow: hidden;\n }\n\n @keyframes animate-bar {\n 0% {\n width: 0;\n }\n\n 100% {\n width: calc(var(--beam-ProgressBar-value) * 1%);\n }\n }\n\n .progress-bar {\n width: calc(var(--beam-ProgressBar-value, 0) * 1%);\n height: 100%;\n position: absolute;\n background: var(--beam-ProgressBar-color-bar, linear-gradient(to right, currentColor, currentColor));\n left: 0;\n bottom: 0;\n top: 0;\n background-clip: padding-box;\n animation-duration: calc(\n var(--beam-ProgressBar-animation-duration-base, 0s) + var(--beam-ProgressBar-animation-duration-variable, 0s) *\n var(--beam-ProgressBar-value) / 100\n );\n animation-iteration-count: 1;\n animation-name: animate-bar;\n animation-timing-function: linear;\n border-radius: var(--beam-ProgressBar-progress-border-radius, 8px);\n }\n `;\n}\n\ncustomElements.get(\"beam-progress-bar\") || customElements.define(\"beam-progress-bar\", BeamProgressBar);\n\nexport const progressBarConfigDefaults = {\n \"--beam-ProgressBar-border-radius\": \"8px\",\n \"--beam-ProgressBar-progress-border-radius\": \"8px\",\n \"--beam-ProgressBar-height\": \"8px\",\n \"--beam-ProgressBar-color-background\": \"transparent\",\n \"--beam-ProgressBar-border-width\": \"1px\",\n \"--beam-ProgressBar-color-border\": \"currentColor\",\n \"--beam-ProgressBar-color-bar\": \"currentColor\",\n \"--beam-ProgressBar-animation-duration-base\": \"0s\",\n \"--beam-ProgressBar-animation-duration-variable\": \"0s\",\n} as const;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-progress-bar\": BeamProgressBar;\n }\n}\n","import { TUrl } from \"../../types\";\nimport { fetchJson } from \"../../fetch-json\";\n\nexport interface SocialShareAnalyticsEventPayload {\n eventName?: string | null;\n nonprofitId?: number | null;\n storeId?: number | null;\n transactionId?: number | null;\n timestamp?: number | null;\n}\n\nexport async function postSocialShareAnalyticsEvent({\n baseUrl,\n apiKey,\n requestBody,\n}: {\n baseUrl: TUrl;\n apiKey: string;\n requestBody: SocialShareAnalyticsEventPayload;\n}): Promise<void> {\n try {\n const url = baseUrl + \"/api/v4/events/socialShare\";\n const body = JSON.stringify(requestBody);\n await fetchJson(url, {\n method: \"POST\",\n body,\n headers: { authorization: `Api-Key ${apiKey}` },\n });\n } catch (error: any) {\n console.error(error);\n }\n}\n","export const urlToFile = async (url: string) => {\n return fetch(url).then(async (r) => {\n const u = new URL(url);\n const blob = await r.blob();\n return new File([blob], u.pathname, { type: blob.type });\n });\n};\n","export const strings = {\n en: {\n impactShareButton: () => `Share to Grow Your Impact`,\n impactShareText: ({ brandName = \"\" }) =>\n `Help ${brandName} reach their giving goal by sharing this cause on social media`,\n impactShareTitle: () => `Share on Social Media`,\n impactShareCopy: () => `Copy`,\n impactShareDownload: () => `Download`,\n impactShareClose: () => `Close`,\n },\n fr: {\n impactShareButton: () => `Partagez pour augmentez votre cause`,\n impactShareText: ({ brandName = \"\" }) =>\n `Aidez ${brandName} a atteindre leur objectif en partageant cette cause sur votre réseaux sociaux`,\n impactShareTitle: () => `Partager sur votre réseaux sociaux`,\n impactShareCopy: () => `Copier`,\n impactShareDownload: () => `Télécharger`,\n impactShareClose: () => `Fermer`,\n },\n de: {\n impactShareButton: () => `Teil, um unserem Beitrag zu erhöhen`, // TODO: Update translation copy SDK-2210\n impactShareText: ({ brandName = \"\" }) => `Hilf ${brandName} ihre Spendenziel zu erreichen`,\n impactShareTitle: () => `In den sozialen Medien teilen`,\n impactShareCopy: () => `Kopieren`,\n impactShareDownload: () => `Herunterladen`,\n impactShareClose: () => `Schließen`,\n },\n es: {\n impactShareButton: () => \"Comparte para aumentar nuestro impacto\", // TODO: Update translation copy SDK-2210\n impactShareText: ({ brandName = \"\" }) =>\n `Comparte en las redes sociales para ayudar a ${brandName} a alcanzar su objetivo.`,\n impactShareTitle: () => \"Compartir en redes sociales\",\n impactShareCopy: () => \"Copiar\",\n impactShareDownload: () => \"Descargar\",\n impactShareClose: () => \"Cerrar\",\n },\n it: {\n impactShareButton: () => \"Condividi, aiutaci a fare la differenza\", // TODO: Update translation copy SDK-2210\n impactShareText: ({ brandName = \"\" }) =>\n `Aiuta ${brandName} a raggiungere il suo obiettivo di donazione condividendo questa causa sui social media.`,\n impactShareTitle: () => \"Condividi, aiutaci a fare la differenza\",\n impactShareCopy: () => \"Copia\",\n impactShareDownload: () => \"Scarica\",\n impactShareClose: () => \"Chiudi\",\n },\n pl: {\n impactShareButton: () => `Udostępnij, by szerzyć naszą misję`, // TODO: Update translation copy SDK-2210\n impactShareText: ({ brandName = \"\" }) =>\n `Pomóż ${brandName} osiągnąć cel i podziel się tą inicjatywą na swoim profilu`,\n impactShareTitle: () => `Udostępnij na swoim profilu`,\n impactShareCopy: () => `Kopiuj`,\n impactShareDownload: () => `Pobierz`,\n impactShareClose: () => `Zamknij`,\n },\n ja: {\n impactShareButton: () => `活動の輪を広げよう`,\n impactShareText: ({ brandName = \"\" }) =>\n `${brandName}の寄付目標達成に向けて、SNSでこの活動を是非シェアしてください。`,\n impactShareTitle: () => `SNSでシェアする`,\n impactShareCopy: () => `コピー`,\n impactShareDownload: () => `ダウンロード`,\n impactShareClose: () => `閉じる`,\n },\n};\n"],"names":["BeamProgressBar","LitElement","html","css","__decorateClass","property","progressBarConfigDefaults","postSocialShareAnalyticsEvent","baseUrl","apiKey","requestBody","url","body","fetchJson","error","urlToFile","r","u","blob","strings","brandName"],"mappings":"oPAGaA,UAAwBC,CAAW,CAAzC,aAAA,CAAA,MAAA,GAAA,SAAA,EACuB,KAAA,MAAQ,EACP,KAAA,gBAAkB,EAAA,CAE/C,QAAS,CACP,OAAOC;AAAAA;AAAAA;AAAAA,sCAG2B,KAAK,KAAK;AAAA;AAAA;AAAA;AAAA,WAK9C,CAgDF,CA7DaF,EAeJ,OAASG;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,IAdYC,EAAA,CAA3BC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EADfL,EACiB,UAAA,OAAA,EACCI,EAAA,CAA5BC,EAAS,CAAE,KAAM,OAAQ,CAAC,GAFhBL,EAEkB,UAAA,iBAAA,EA6D/B,eAAe,IAAI,mBAAmB,GAAK,eAAe,OAAO,oBAAqBA,CAAe,EAE9F,MAAMM,EAA4B,CACvC,mCAAoC,MACpC,4CAA6C,MAC7C,4BAA6B,MAC7B,sCAAuC,cACvC,kCAAmC,MACnC,kCAAmC,eACnC,+BAAgC,eAChC,6CAA8C,KAC9C,iDAAkD,IACpD,ECnEA,eAAsBC,EAA8B,CAClD,QAAAC,EACA,OAAAC,EACA,YAAAC,CACF,EAIkB,CAChB,GAAI,CACF,MAAMC,EAAMH,EAAU,6BAChBI,EAAO,KAAK,UAAUF,CAAW,EACvC,MAAMG,EAAUF,EAAK,CACnB,OAAQ,OACR,KAAAC,EACA,QAAS,CAAE,cAAe,WAAWH,CAAM,EAAG,CAChD,CAAC,CACH,OAASK,EAAY,CACnB,QAAQ,MAAMA,CAAK,CACrB,CACF,CC/BO,MAAMC,EAAY,MAAOJ,GACvB,MAAMA,CAAG,EAAE,KAAK,MAAOK,GAAM,CAClC,MAAMC,EAAI,IAAI,IAAIN,CAAG,EACfO,EAAO,MAAMF,EAAE,OACrB,OAAO,IAAI,KAAK,CAACE,CAAI,EAAGD,EAAE,SAAU,CAAE,KAAMC,EAAK,IAAK,CAAC,CACzD,CAAC,ECLUC,EAAU,CACrB,GAAI,CACF,kBAAmB,IAAM,4BACzB,gBAAiB,CAAC,CAAE,UAAAC,EAAY,EAAG,IACjC,QAAQA,CAAS,iEACnB,iBAAkB,IAAM,wBACxB,gBAAiB,IAAM,OACvB,oBAAqB,IAAM,WAC3B,iBAAkB,IAAM,OAC1B,EACA,GAAI,CACF,kBAAmB,IAAM,sCACzB,gBAAiB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACjC,SAASA,CAAS,oFACpB,iBAAkB,IAAM,wCACxB,gBAAiB,IAAM,SACvB,oBAAqB,IAAM,oBAC3B,iBAAkB,IAAM,QAC1B,EACA,GAAI,CACF,kBAAmB,IAAM,yCACzB,gBAAiB,CAAC,CAAE,UAAAA,EAAY,EAAG,IAAM,QAAQA,CAAS,iCAC1D,iBAAkB,IAAM,gCACxB,gBAAiB,IAAM,WACvB,oBAAqB,IAAM,gBAC3B,iBAAkB,IAAM,cAC1B,EACA,GAAI,CACF,kBAAmB,IAAM,yCACzB,gBAAiB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACjC,gDAAgDA,CAAS,2BAC3D,iBAAkB,IAAM,8BACxB,gBAAiB,IAAM,SACvB,oBAAqB,IAAM,YAC3B,iBAAkB,IAAM,QAC1B,EACA,GAAI,CACF,kBAAmB,IAAM,0CACzB,gBAAiB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACjC,SAASA,CAAS,2FACpB,iBAAkB,IAAM,0CACxB,gBAAiB,IAAM,QACvB,oBAAqB,IAAM,UAC3B,iBAAkB,IAAM,QAC1B,EACA,GAAI,CACF,kBAAmB,IAAM,yDACzB,gBAAiB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACjC,iBAASA,CAAS,2FACpB,iBAAkB,IAAM,mCACxB,gBAAiB,IAAM,SACvB,oBAAqB,IAAM,UAC3B,iBAAkB,IAAM,SAC1B,EACA,GAAI,CACF,kBAAmB,IAAM,yDACzB,gBAAiB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACjC,GAAGA,CAAS,0LACd,iBAAkB,IAAM,0CACxB,gBAAiB,IAAM,qBACvB,oBAAqB,IAAM,uCAC3B,iBAAkB,IAAM,oBAC1B,CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as lodash from 'lodash';
|
|
2
|
-
import { g as BeamBaseAPIConfig, h as TCartApi, M as MemoizedLast } from './utils-
|
|
2
|
+
import { g as BeamBaseAPIConfig, h as TCartApi, M as MemoizedLast } from './utils-BPcZ5h8J.esm.js';
|
|
3
3
|
|
|
4
4
|
type BeamCartAPIConfig = BeamBaseAPIConfig & {
|
|
5
5
|
storeId: number;
|
|
@@ -3629,6 +3629,12 @@ interface paths {
|
|
|
3629
3629
|
content: {
|
|
3630
3630
|
"application/json": {
|
|
3631
3631
|
transactionId: string;
|
|
3632
|
+
/**
|
|
3633
|
+
* Format: uuid
|
|
3634
|
+
* @description The ID of the selection
|
|
3635
|
+
* @example bqkdk-0393b-jbkdd-02difj
|
|
3636
|
+
*/
|
|
3637
|
+
selectionId: string | null;
|
|
3632
3638
|
transactionCreated: boolean;
|
|
3633
3639
|
beamUserId: string;
|
|
3634
3640
|
nonprofitId: number | null;
|
|
@@ -4107,6 +4113,66 @@ interface paths {
|
|
|
4107
4113
|
};
|
|
4108
4114
|
};
|
|
4109
4115
|
};
|
|
4116
|
+
"/v4/transaction/{transactionId}/update": {
|
|
4117
|
+
post: {
|
|
4118
|
+
parameters: {
|
|
4119
|
+
path: {
|
|
4120
|
+
transactionId: string;
|
|
4121
|
+
};
|
|
4122
|
+
};
|
|
4123
|
+
responses: {
|
|
4124
|
+
/** The updated transaction */
|
|
4125
|
+
200: {
|
|
4126
|
+
content: {
|
|
4127
|
+
"application/json": {
|
|
4128
|
+
transactionId: string;
|
|
4129
|
+
selectionId: string | null;
|
|
4130
|
+
transactionCreated: boolean;
|
|
4131
|
+
beamUserId: string;
|
|
4132
|
+
nonprofitId: number | null;
|
|
4133
|
+
creationMethod: string | null;
|
|
4134
|
+
timestamp: string;
|
|
4135
|
+
};
|
|
4136
|
+
};
|
|
4137
|
+
};
|
|
4138
|
+
/** Standard error */
|
|
4139
|
+
default: {
|
|
4140
|
+
content: {
|
|
4141
|
+
"application/json": {
|
|
4142
|
+
/** @description Beam code for the error, meant to be used programmatically */
|
|
4143
|
+
code: string;
|
|
4144
|
+
/** @description A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization */
|
|
4145
|
+
title: string;
|
|
4146
|
+
/** @description A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized */
|
|
4147
|
+
detail: string;
|
|
4148
|
+
/** @description a JSON Pointer to the associated entity in the request document */
|
|
4149
|
+
field?: string;
|
|
4150
|
+
/** @description A meta object containing non-standard meta-information about the error */
|
|
4151
|
+
metadata?: {
|
|
4152
|
+
[key: string]: unknown;
|
|
4153
|
+
};
|
|
4154
|
+
/** @description Whether the API or user can resend the request */
|
|
4155
|
+
retryable?: boolean;
|
|
4156
|
+
} & {
|
|
4157
|
+
source: unknown;
|
|
4158
|
+
meta: unknown;
|
|
4159
|
+
};
|
|
4160
|
+
};
|
|
4161
|
+
};
|
|
4162
|
+
};
|
|
4163
|
+
requestBody: {
|
|
4164
|
+
content: {
|
|
4165
|
+
"application/json": {
|
|
4166
|
+
/**
|
|
4167
|
+
* @description The ID of the selection to add to the transaction
|
|
4168
|
+
* @example bqkdk-0393b-jbkdd-02difj
|
|
4169
|
+
*/
|
|
4170
|
+
selectionId: string;
|
|
4171
|
+
};
|
|
4172
|
+
};
|
|
4173
|
+
};
|
|
4174
|
+
};
|
|
4175
|
+
};
|
|
4110
4176
|
"/v4/events/socialShare": {
|
|
4111
4177
|
post: {
|
|
4112
4178
|
responses: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
3
|
import * as lit_html from 'lit-html';
|
|
4
|
-
import { T as TUrl } from '../chunks/utils-
|
|
4
|
+
import { T as TUrl } from '../chunks/utils-BPcZ5h8J.esm.js';
|
|
5
5
|
import 'lodash-es/debounce';
|
|
6
6
|
import 'lodash-es/isEqual';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
3
|
import * as lit_html from 'lit-html';
|
|
4
|
-
import { b as TNumericId, L as LANGUAGES } from '../chunks/utils-
|
|
4
|
+
import { b as TNumericId, L as LANGUAGES } from '../chunks/utils-BPcZ5h8J.esm.js';
|
|
5
5
|
import 'lodash-es/debounce';
|
|
6
6
|
import 'lodash-es/isEqual';
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as x,n as d,r as I,a as v,h as u,b as g,j as b}from"../chunks/lit-BEag9MFp.esm.js";import{c as $,a as f,d as T,e as k}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import{u as n,g as w,A as S,d as s,_ as L,c as C,e as m,f as A}from"../chunks/index-
|
|
1
|
+
import{i as x,n as d,r as I,a as v,h as u,b as g,j as b}from"../chunks/lit-BEag9MFp.esm.js";import{c as $,a as f,d as T,e as k}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import{u as n,g as w,A as S,d as s,_ as L,c as C,e as m,f as A}from"../chunks/index-BpR0FMss.esm.js";import{D as z,W as F,v as D,n as M}from"../chunks/utils-C5hmbxa4.esm.js";import{a as E}from"../chunks/share-button-Cle5Uexn.esm.js";import{partnerLogosConfigDefaults as U}from"./beam-partner-logos.esm.js";import"../chunks/lodash-CrMU6wKg.esm.js";const y={en:{fundedTimes:({times:e=0})=>`Funded <b>${e}</b> ${e>1?"times":"time"} so far`,learnMore:()=>"Learn more",seeAll:()=>"See All"},fr:{fundedTimes:({times:e=0})=>`Financ\xE9 <b>${e}</b> fois pour l'instant`,learnMore:()=>"En savoir plus",seeAll:()=>"Voir tout"},de:{fundedTimes:({times:e=0})=>`<b>${e}</b> Mal finanziert`,learnMore:()=>"Mehr erfahren",seeAll:()=>"Alle anzeigen"},es:{fundedTimes:({times:e=0})=>`Financiado <b>${e}</b> ${e>1?"vez":"veces"}`,learnMore:()=>"Saber m\xE1s",seeAll:()=>"Ver Todo"},it:{fundedTimes:({times:e=0})=>`Finanziato <b>${e}</b> ${e>1?"volta":"volte"}`,learnMore:()=>"Scopri di pi\xF9",seeAll:()=>"Vedi Tutto"},pl:{fundedTimes:({times:e=0})=>`Udzielono wsparcia <b>${e}</b> ${e>1?"razy":"raz"}`,learnMore:()=>"Dowiedz si\u0119 wi\u0119cej",seeAll:()=>"Zobacz wszystko"},ja:{fundedTimes:({times:e=0})=>`\u73FE\u5728\u307E\u3067\u306B<b>${e}</b>\u56DE\u3001\u3092\u9054\u6210`,learnMore:()=>"\u8A73\u3057\u304F\u898B\u308B",seeAll:()=>"\u3059\u3079\u3066\u898B\u308B"}};var B=Object.defineProperty,l=(e,a,t,r)=>{for(var o=void 0,i=e.length-1,p;i>=0;i--)(p=e[i])&&(o=p(a,t,o)||o);return o&&B(a,t,o),o};class c 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()=>(k(["apiKey","chainId"],this),w({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{chainId:this.chainId,personalImpactLimit:0,widgetName:F.community_impact,version:"1.0.0",lang:this.configLang,draftConfig:this.draftConfig}})),this.impactDataController=new S(this,this.getImpactData),this.renderImageCard=a=>{const t=`${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{i as x,n as d,r as I,a as v,h as u,b as g,j as b}from"../chunks/lit-BEag9MFp.esm.js";import{c as $,a as f,d as T,e as k}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import{u as n,g as w,A as S,d as s,_ as L,c as C,e as m,f as A}from"../chunks/index-
|
|
1
|
+
import{i as x,n as d,r as I,a as v,h as u,b as g,j as b}from"../chunks/lit-BEag9MFp.esm.js";import{c as $,a as f,d as T,e as k}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import{u as n,g as w,A as S,d as s,_ as L,c as C,e as m,f as A}from"../chunks/index-BpR0FMss.esm.js";import{D as z,W as F,v as D,n as M}from"../chunks/utils-C5hmbxa4.esm.js";import{a as E}from"../chunks/share-button-Cle5Uexn.esm.js";import{partnerLogosConfigDefaults as U}from"./beam-partner-logos.js";import"../chunks/lodash-CrMU6wKg.esm.js";const y={en:{fundedTimes:({times:e=0})=>`Funded <b>${e}</b> ${e>1?"times":"time"} so far`,learnMore:()=>"Learn more",seeAll:()=>"See All"},fr:{fundedTimes:({times:e=0})=>`Financ\xE9 <b>${e}</b> fois pour l'instant`,learnMore:()=>"En savoir plus",seeAll:()=>"Voir tout"},de:{fundedTimes:({times:e=0})=>`<b>${e}</b> Mal finanziert`,learnMore:()=>"Mehr erfahren",seeAll:()=>"Alle anzeigen"},es:{fundedTimes:({times:e=0})=>`Financiado <b>${e}</b> ${e>1?"vez":"veces"}`,learnMore:()=>"Saber m\xE1s",seeAll:()=>"Ver Todo"},it:{fundedTimes:({times:e=0})=>`Finanziato <b>${e}</b> ${e>1?"volta":"volte"}`,learnMore:()=>"Scopri di pi\xF9",seeAll:()=>"Vedi Tutto"},pl:{fundedTimes:({times:e=0})=>`Udzielono wsparcia <b>${e}</b> ${e>1?"razy":"raz"}`,learnMore:()=>"Dowiedz si\u0119 wi\u0119cej",seeAll:()=>"Zobacz wszystko"},ja:{fundedTimes:({times:e=0})=>`\u73FE\u5728\u307E\u3067\u306B<b>${e}</b>\u56DE\u3001\u3092\u9054\u6210`,learnMore:()=>"\u8A73\u3057\u304F\u898B\u308B",seeAll:()=>"\u3059\u3079\u3066\u898B\u308B"}};var B=Object.defineProperty,l=(e,a,t,r)=>{for(var o=void 0,i=e.length-1,p;i>=0;i--)(p=e[i])&&(o=p(a,t,o)||o);return o&&B(a,t,o),o};class c 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()=>(k(["apiKey","chainId"],this),w({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{chainId:this.chainId,personalImpactLimit:0,widgetName:F.community_impact,version:"1.0.0",lang:this.configLang,draftConfig:this.draftConfig}})),this.impactDataController=new S(this,this.getImpactData),this.renderImageCard=a=>{const t=`${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"
|
|
@@ -2,7 +2,7 @@ import * as lit from 'lit';
|
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
3
|
import * as lit_html from 'lit-html';
|
|
4
4
|
import * as lodash from 'lodash';
|
|
5
|
-
import { b as TNumericId, L as LANGUAGES } from '../chunks/utils-
|
|
5
|
+
import { b as TNumericId, L as LANGUAGES } from '../chunks/utils-BPcZ5h8J.esm.js';
|
|
6
6
|
import 'lodash-es/debounce';
|
|
7
7
|
import 'lodash-es/isEqual';
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as C,a as b,b as u,n as c,i as y,g as I}from"../chunks/lit-BEag9MFp.esm.js";import{d as x}from"../chunks/lodash-CrMU6wKg.esm.js";import{c as T,d as S,e as E}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import{a as z,u as p,b as B,A as $,_ as k,c as f,d,e as h,f as D}from"../chunks/index-
|
|
1
|
+
import{r as C,a as b,b as u,n as c,i as y,g as I}from"../chunks/lit-BEag9MFp.esm.js";import{d as x}from"../chunks/lodash-CrMU6wKg.esm.js";import{c as T,d as S,e as E}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import{a as z,u as p,b as B,A as $,_ as k,c as f,d,e as h,f as D}from"../chunks/index-BpR0FMss.esm.js";import{D as L,v as V,n as A}from"../chunks/utils-C5hmbxa4.esm.js";var R=Object.defineProperty,v=(n,e,t,i)=>{for(var a=void 0,o=n.length-1,s;o>=0;o--)(s=n[o])&&(a=s(e,t,a)||a);return a&&R(e,t,a),a};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 i=this.counter+t;if(i>=this.finalValue){this.counter=this.finalValue,clearInterval(this.intervalId);return}else this.counter=i},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()}`}}v([c({type:Number})],m.prototype,"finalValue"),v([c({type:Number})],m.prototype,"duration"),v([c({type:String})],m.prototype,"scrollTarget"),v([C()],m.prototype,"counter"),customElements.get("animated-counter")||customElements.define("animated-counter",m);const j=n=>{const e=n instanceof NodeList?Array.from(n):n;if(e.length===0||!z(e))return;const t=e.sort((a,o)=>{const s=getComputedStyle(a).getPropertyValue("width").replace("px",""),g=getComputedStyle(o).getPropertyValue("width").replace("px","");return parseInt(g)-parseInt(s)})[0],i=getComputedStyle(t).getPropertyValue("width");for(const a of e)getComputedStyle(a).getPropertyValue("width")!==i&&(a.style.width=i)},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."},ja:{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."}};var q=Object.defineProperty,l=(n,e,t,i)=>{for(var a=void 0,o=n.length-1,s;o>=0;o--)(s=n[o])&&(a=s(e,t,a)||a);return a&&q(e,t,a),a};const U=1.5*1e3;class r extends b{constructor(){super(...arguments),this.baseUrl=L,this.lang="en",this.disableAnimation=!1,this.debug=!1,this.draftConfig=!1,this.getCumulativeImpactData=async()=>(E(["apiKey","chainId"],this),await B({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 $(this,this.getCumulativeImpactData),this.resizeElements=x(()=>{j(this.impactRowRefs)},50,{maxWait:50,leading:!0})}get configLang(){return V[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.resizeElements)}async updated(e){const t=["chainId","baseUrl","lang"];for(const i of t)if(e.has(i)){await this.cumulativeImpactDataController.exec();break}this.resizeElements()}render(){const{data:e,error:t,loading:i}=this.cumulativeImpactDataController;return i?k():t?this.debug?f({error:t}):"":e==null?this.debug?f({error:new A("Missing data")}):"":u`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
${this.cssVariables.toCSS()}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as C,a as b,b as u,n as c,i as y,g as I}from"../chunks/lit-BEag9MFp.esm.js";import{d as x}from"../chunks/lodash-CrMU6wKg.esm.js";import{c as T,d as S,e as E}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import{a as z,u as p,b as B,A as $,_ as k,c as f,d,e as h,f as D}from"../chunks/index-
|
|
1
|
+
import{r as C,a as b,b as u,n as c,i as y,g as I}from"../chunks/lit-BEag9MFp.esm.js";import{d as x}from"../chunks/lodash-CrMU6wKg.esm.js";import{c as T,d as S,e as E}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import{a as z,u as p,b as B,A as $,_ as k,c as f,d,e as h,f as D}from"../chunks/index-BpR0FMss.esm.js";import{D as L,v as V,n as A}from"../chunks/utils-C5hmbxa4.esm.js";var R=Object.defineProperty,v=(n,e,t,i)=>{for(var a=void 0,o=n.length-1,s;o>=0;o--)(s=n[o])&&(a=s(e,t,a)||a);return a&&R(e,t,a),a};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 i=this.counter+t;if(i>=this.finalValue){this.counter=this.finalValue,clearInterval(this.intervalId);return}else this.counter=i},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()}`}}v([c({type:Number})],m.prototype,"finalValue"),v([c({type:Number})],m.prototype,"duration"),v([c({type:String})],m.prototype,"scrollTarget"),v([C()],m.prototype,"counter"),customElements.get("animated-counter")||customElements.define("animated-counter",m);const j=n=>{const e=n instanceof NodeList?Array.from(n):n;if(e.length===0||!z(e))return;const t=e.sort((a,o)=>{const s=getComputedStyle(a).getPropertyValue("width").replace("px",""),g=getComputedStyle(o).getPropertyValue("width").replace("px","");return parseInt(g)-parseInt(s)})[0],i=getComputedStyle(t).getPropertyValue("width");for(const a of e)getComputedStyle(a).getPropertyValue("width")!==i&&(a.style.width=i)},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."},ja:{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."}};var q=Object.defineProperty,l=(n,e,t,i)=>{for(var a=void 0,o=n.length-1,s;o>=0;o--)(s=n[o])&&(a=s(e,t,a)||a);return a&&q(e,t,a),a};const U=1.5*1e3;class r extends b{constructor(){super(...arguments),this.baseUrl=L,this.lang="en",this.disableAnimation=!1,this.debug=!1,this.draftConfig=!1,this.getCumulativeImpactData=async()=>(E(["apiKey","chainId"],this),await B({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 $(this,this.getCumulativeImpactData),this.resizeElements=x(()=>{j(this.impactRowRefs)},50,{maxWait:50,leading:!0})}get configLang(){return V[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.resizeElements)}async updated(e){const t=["chainId","baseUrl","lang"];for(const i of t)if(e.has(i)){await this.cumulativeImpactDataController.exec();break}this.resizeElements()}render(){const{data:e,error:t,loading:i}=this.cumulativeImpactDataController;return i?k():t?this.debug?f({error:t}):"":e==null?this.debug?f({error:new A("Missing data")}):"":u`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
${this.cssVariables.toCSS()}
|
|
@@ -2,7 +2,7 @@ import * as lit from 'lit';
|
|
|
2
2
|
import { LitElement, PropertyValues } from 'lit';
|
|
3
3
|
import * as lit_html from 'lit-html';
|
|
4
4
|
import * as lodash from 'lodash';
|
|
5
|
-
import { T as TUrl, b as TNumericId, c as TId, L as LANGUAGES } from '../chunks/utils-
|
|
5
|
+
import { T as TUrl, b as TNumericId, c as TId, L as LANGUAGES } from '../chunks/utils-BPcZ5h8J.esm.js';
|
|
6
6
|
import 'lodash-es/debounce';
|
|
7
7
|
import 'lodash-es/isEqual';
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as k,n as c,g as f,a as N,h as $,b as T}from"../chunks/lit-BEag9MFp.esm.js";import{d as F}from"../chunks/lodash-CrMU6wKg.esm.js";import{D as U,W as D,v as A,l as R}from"../chunks/utils-C5hmbxa4.esm.js";import{u as s,g as j,A as P,d as g,_,c as O,e as d,f as V}from"../chunks/index-
|
|
1
|
+
import{i as k,n as c,g as f,a as N,h as $,b as T}from"../chunks/lit-BEag9MFp.esm.js";import{d as F}from"../chunks/lodash-CrMU6wKg.esm.js";import{D as U,W as D,v as A,l as R}from"../chunks/utils-C5hmbxa4.esm.js";import{u as s,g as j,A as P,d as g,_,c as O,e as d,f as V}from"../chunks/index-BpR0FMss.esm.js";import{a as W}from"../chunks/share-button-Cle5Uexn.esm.js";import{c as G,d as K,e as M}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import"../chunks/_share-dialog-dependencies-BonvNllt.esm.js";import{s as h,a as q}from"../chunks/share-button-C_qDR7Rw.esm.js";import{partnerLogosConfigDefaults as Y}from"./beam-partner-logos.esm.js";import{c as H}from"../chunks/responsive-aN8P5PqD.esm.js";import"../chunks/vendor-DUOg5fL-.esm.js";const l={en:{descriptionTitle:({nonprofitName:a="a nonprofit"})=>`You just made an impact for ${a}`,descriptionSubtitle:({brandName:a=""})=>`Check out the impact your ${a} purchase made below.`,yourImpactTitle:()=>"You\u2019re funding",communityImpactTitle:()=>"Together we\u2019re funding",personalImpactLinkCopy:({nonprofitName:a=""})=>`Learn about ${a}`,communityImpactLinkCopy:({brandName:a=""})=>`See all of the ${a} community's impact`,impactShareButton:()=>"Share to Grow Your Impact"},fr:{descriptionTitle:({nonprofitName:a="une organisation"})=>`Vous avez cr\xE9\xE9 un impact pour ${a}`,descriptionSubtitle:({brandName:a=""})=>`D\xE9couvrez ci-dessous l'impact de votre achat ${a}.`,yourImpactTitle:()=>"Vous financez",communityImpactTitle:()=>"Ensemble, nous finan\xE7ons",personalImpactLinkCopy:({nonprofitName:a=""})=>`En savoir plus sur ${a}`,communityImpactLinkCopy:({brandName:a=""})=>`Voir tout l'impact de la communaut\xE9 ${a}`,impactShareButton:()=>"Partagez pour d\xE9velopper votre impact"},de:{descriptionTitle:({nonprofitName:a="eine Organisation"})=>`Du hast einen Beitrag f\xFCr ${a} geleistet`,descriptionSubtitle:({brandName:a=""})=>`Sieh dir unten den Beitrag an, den dein ${a} Einkauf gemacht hat.`,yourImpactTitle:()=>"Du finanzierst",communityImpactTitle:()=>"Gemeinsam finanzieren wir",personalImpactLinkCopy:({nonprofitName:a=""})=>`Mehr \xFCber ${a} erfahren`,communityImpactLinkCopy:({brandName:a=""})=>`Sieh dir den gesamten Beitrag der ${a}-Community an`,impactShareButton:()=>"Teile, um deinen Beitrag zu vergr\xF6\xDFern"},es:{descriptionTitle:({nonprofitName:a="una organizaci\xF3n"})=>`Generaste un impacto para ${a}`,descriptionSubtitle:({brandName:a=""})=>`Mira a continuaci\xF3n el impacto que tu compra de ${a} ha generado.`,yourImpactTitle:()=>"Est\xE1s financiando",communityImpactTitle:()=>"Juntos estamos financiando",personalImpactLinkCopy:({nonprofitName:a=""})=>`Conoce m\xE1s sobre ${a}`,communityImpactLinkCopy:({brandName:a=""})=>`Mira todo el impacto de la comunidad ${a}`,impactShareButton:()=>"Comparte para hacer crecer tu impacto"},it:{descriptionTitle:({nonprofitName:a="un'organizzazione"})=>`Hai creato un impatto per ${a}`,descriptionSubtitle:({brandName:a=""})=>`Scopri qui sotto l'impatto del tuo acquisto ${a}.`,yourImpactTitle:()=>"Stai finanziando",communityImpactTitle:()=>"Insieme stiamo finanziando",personalImpactLinkCopy:({nonprofitName:a=""})=>`Scopri di pi\xF9 su ${a}`,communityImpactLinkCopy:({brandName:a=""})=>`Guarda tutto l'impatto della comunit\xE0 ${a}`,impactShareButton:()=>"Condividi per far crescere il tuo impatto"},pl:{descriptionTitle:({nonprofitName:a="organizacj\u0119"})=>`Wywar\u0142a\u015B_e\u015B wp\u0142yw na ${a}`,descriptionSubtitle:({brandName:a=""})=>`Sprawd\u017A poni\u017Cej, jaki wp\u0142yw mia\u0142 Tw\xF3j zakup ${a}.`,yourImpactTitle:()=>"Finansujesz",communityImpactTitle:()=>"Razem finansujemy",personalImpactLinkCopy:({nonprofitName:a=""})=>`Dowiedz si\u0119 wi\u0119cej o ${a}`,communityImpactLinkCopy:({brandName:a=""})=>`Zobacz ca\u0142y wp\u0142yw spo\u0142eczno\u015Bci ${a}`,impactShareButton:()=>"Udost\u0119pnij, aby powi\u0119kszy\u0107 sw\xF3j wp\u0142yw"},ja:{descriptionTitle:({nonprofitName:a=""})=>`\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01${a}\u3078\u306E\u5BC4\u4ED8\u306B\u3088\u308A\u3001\u4E16\u754C\u306B\u78BA\u304B\u306A\u5909\u5316\u3092\u3082\u305F\u3089\u3057\u307E\u3057\u305F\u3002`,descriptionSubtitle:({brandName:a=""})=>`${a}\u3067\u306E\u3054\u8CFC\u5165\u304C\u3001\u3069\u306E\u3088\u3046\u306B\u4EBA\u3005\u306E\u5F79\u306B\u7ACB\u3064\u304B\u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002`,yourImpactTitle:()=>"\u3042\u306A\u305F\u306E\u652F\u63F4\u5B9F\u7E3E",communityImpactTitle:()=>"\u79C1\u305F\u3061\u306F\u5171\u306B\u652F\u63F4\u3057\u3066\u3044\u307E\u3059",personalImpactLinkCopy:({nonprofitName:a=""})=>`${a} \u306B\u3064\u3044\u3066\u8A73\u3057\u304F\u898B\u308B`,communityImpactLinkCopy:({brandName:a=""})=>`${a}\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306E\u6D3B\u52D5\u5B9F\u7E3E\u3092\u3059\u3079\u3066\u898B\u308B `,impactShareButton:()=>"SNS\u3067\u30B7\u30A7\u30A2\u3059\u308B"}};var J=Object.defineProperty,i=(a,e,r,p)=>{for(var n=void 0,m=a.length-1,o;m>=0;m--)(o=a[m])&&(n=o(e,r,n)||n);return n&&J(e,r,n),n};class t extends N{constructor(){super(...arguments),this.baseUrl=U,this.lang="en",this.debug=!1,this.draftConfig=!1,this.getImpactData=async()=>(M(["apiKey","userId","nonprofitId"],this),await j({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{nonprofitId:this.nonprofitId,beamUserId:this.userId,personalImpactLimit:1,communityImpactLimit:1,storeId:this.storeId,widgetName:D.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 P(this,this.getImpactData),this.resizeElements=F(()=>{h(this.impactTitleRefs),h(this.impactDescriptionRefs),h(this.impactLinkRefs),h(this.goalCompletionTextRefs)},50,{maxWait:50,leading:!0})}get configLang(){return A[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.resizeElements)}async updated(e){const r=["baseUrl","storeId","apiKey","userId","lang","discountCodes"];for(const p of r)if(e.has(p)){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(e){if(document.fonts.status==="loading")return await document.fonts.ready.catch(r=>R.error(r)),e()}renderCard({imageUrl:e,title:r,percentFunded:p,goalProgressText:n,description:m,urlCopy:o,impactUrl:b,isImage:u,cardType:y,goalCompletionText:v}){return T`
|
|
2
2
|
<div class="impact-card ${u?"":"icon"}" part="impact-card">
|
|
3
3
|
<div class="${u?"":"icon-background "}">
|
|
4
4
|
<img
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as k,n as c,g as f,a as N,h as $,b as T}from"../chunks/lit-BEag9MFp.esm.js";import{d as F}from"../chunks/lodash-CrMU6wKg.esm.js";import{D as U,W as D,v as A,l as R}from"../chunks/utils-C5hmbxa4.esm.js";import{u as s,g as j,A as P,d as g,_,c as O,e as d,f as V}from"../chunks/index-
|
|
1
|
+
import{i as k,n as c,g as f,a as N,h as $,b as T}from"../chunks/lit-BEag9MFp.esm.js";import{d as F}from"../chunks/lodash-CrMU6wKg.esm.js";import{D as U,W as D,v as A,l as R}from"../chunks/utils-C5hmbxa4.esm.js";import{u as s,g as j,A as P,d as g,_,c as O,e as d,f as V}from"../chunks/index-BpR0FMss.esm.js";import{a as W}from"../chunks/share-button-Cle5Uexn.esm.js";import{c as G,d as K,e as M}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import"../chunks/_share-dialog-dependencies-BonvNllt.esm.js";import{s as h,a as q}from"../chunks/share-button-C_qDR7Rw.esm.js";import{partnerLogosConfigDefaults as Y}from"./beam-partner-logos.js";import{c as H}from"../chunks/responsive-aN8P5PqD.esm.js";import"../chunks/vendor-DUOg5fL-.esm.js";const l={en:{descriptionTitle:({nonprofitName:a="a nonprofit"})=>`You just made an impact for ${a}`,descriptionSubtitle:({brandName:a=""})=>`Check out the impact your ${a} purchase made below.`,yourImpactTitle:()=>"You\u2019re funding",communityImpactTitle:()=>"Together we\u2019re funding",personalImpactLinkCopy:({nonprofitName:a=""})=>`Learn about ${a}`,communityImpactLinkCopy:({brandName:a=""})=>`See all of the ${a} community's impact`,impactShareButton:()=>"Share to Grow Your Impact"},fr:{descriptionTitle:({nonprofitName:a="une organisation"})=>`Vous avez cr\xE9\xE9 un impact pour ${a}`,descriptionSubtitle:({brandName:a=""})=>`D\xE9couvrez ci-dessous l'impact de votre achat ${a}.`,yourImpactTitle:()=>"Vous financez",communityImpactTitle:()=>"Ensemble, nous finan\xE7ons",personalImpactLinkCopy:({nonprofitName:a=""})=>`En savoir plus sur ${a}`,communityImpactLinkCopy:({brandName:a=""})=>`Voir tout l'impact de la communaut\xE9 ${a}`,impactShareButton:()=>"Partagez pour d\xE9velopper votre impact"},de:{descriptionTitle:({nonprofitName:a="eine Organisation"})=>`Du hast einen Beitrag f\xFCr ${a} geleistet`,descriptionSubtitle:({brandName:a=""})=>`Sieh dir unten den Beitrag an, den dein ${a} Einkauf gemacht hat.`,yourImpactTitle:()=>"Du finanzierst",communityImpactTitle:()=>"Gemeinsam finanzieren wir",personalImpactLinkCopy:({nonprofitName:a=""})=>`Mehr \xFCber ${a} erfahren`,communityImpactLinkCopy:({brandName:a=""})=>`Sieh dir den gesamten Beitrag der ${a}-Community an`,impactShareButton:()=>"Teile, um deinen Beitrag zu vergr\xF6\xDFern"},es:{descriptionTitle:({nonprofitName:a="una organizaci\xF3n"})=>`Generaste un impacto para ${a}`,descriptionSubtitle:({brandName:a=""})=>`Mira a continuaci\xF3n el impacto que tu compra de ${a} ha generado.`,yourImpactTitle:()=>"Est\xE1s financiando",communityImpactTitle:()=>"Juntos estamos financiando",personalImpactLinkCopy:({nonprofitName:a=""})=>`Conoce m\xE1s sobre ${a}`,communityImpactLinkCopy:({brandName:a=""})=>`Mira todo el impacto de la comunidad ${a}`,impactShareButton:()=>"Comparte para hacer crecer tu impacto"},it:{descriptionTitle:({nonprofitName:a="un'organizzazione"})=>`Hai creato un impatto per ${a}`,descriptionSubtitle:({brandName:a=""})=>`Scopri qui sotto l'impatto del tuo acquisto ${a}.`,yourImpactTitle:()=>"Stai finanziando",communityImpactTitle:()=>"Insieme stiamo finanziando",personalImpactLinkCopy:({nonprofitName:a=""})=>`Scopri di pi\xF9 su ${a}`,communityImpactLinkCopy:({brandName:a=""})=>`Guarda tutto l'impatto della comunit\xE0 ${a}`,impactShareButton:()=>"Condividi per far crescere il tuo impatto"},pl:{descriptionTitle:({nonprofitName:a="organizacj\u0119"})=>`Wywar\u0142a\u015B_e\u015B wp\u0142yw na ${a}`,descriptionSubtitle:({brandName:a=""})=>`Sprawd\u017A poni\u017Cej, jaki wp\u0142yw mia\u0142 Tw\xF3j zakup ${a}.`,yourImpactTitle:()=>"Finansujesz",communityImpactTitle:()=>"Razem finansujemy",personalImpactLinkCopy:({nonprofitName:a=""})=>`Dowiedz si\u0119 wi\u0119cej o ${a}`,communityImpactLinkCopy:({brandName:a=""})=>`Zobacz ca\u0142y wp\u0142yw spo\u0142eczno\u015Bci ${a}`,impactShareButton:()=>"Udost\u0119pnij, aby powi\u0119kszy\u0107 sw\xF3j wp\u0142yw"},ja:{descriptionTitle:({nonprofitName:a=""})=>`\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\uFF01${a}\u3078\u306E\u5BC4\u4ED8\u306B\u3088\u308A\u3001\u4E16\u754C\u306B\u78BA\u304B\u306A\u5909\u5316\u3092\u3082\u305F\u3089\u3057\u307E\u3057\u305F\u3002`,descriptionSubtitle:({brandName:a=""})=>`${a}\u3067\u306E\u3054\u8CFC\u5165\u304C\u3001\u3069\u306E\u3088\u3046\u306B\u4EBA\u3005\u306E\u5F79\u306B\u7ACB\u3064\u304B\u3092\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002`,yourImpactTitle:()=>"\u3042\u306A\u305F\u306E\u652F\u63F4\u5B9F\u7E3E",communityImpactTitle:()=>"\u79C1\u305F\u3061\u306F\u5171\u306B\u652F\u63F4\u3057\u3066\u3044\u307E\u3059",personalImpactLinkCopy:({nonprofitName:a=""})=>`${a} \u306B\u3064\u3044\u3066\u8A73\u3057\u304F\u898B\u308B`,communityImpactLinkCopy:({brandName:a=""})=>`${a}\u30B3\u30DF\u30E5\u30CB\u30C6\u30A3\u306E\u6D3B\u52D5\u5B9F\u7E3E\u3092\u3059\u3079\u3066\u898B\u308B `,impactShareButton:()=>"SNS\u3067\u30B7\u30A7\u30A2\u3059\u308B"}};var J=Object.defineProperty,i=(a,e,r,p)=>{for(var n=void 0,m=a.length-1,o;m>=0;m--)(o=a[m])&&(n=o(e,r,n)||n);return n&&J(e,r,n),n};class t extends N{constructor(){super(...arguments),this.baseUrl=U,this.lang="en",this.debug=!1,this.draftConfig=!1,this.getImpactData=async()=>(M(["apiKey","userId","nonprofitId"],this),await j({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{nonprofitId:this.nonprofitId,beamUserId:this.userId,personalImpactLimit:1,communityImpactLimit:1,storeId:this.storeId,widgetName:D.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 P(this,this.getImpactData),this.resizeElements=F(()=>{h(this.impactTitleRefs),h(this.impactDescriptionRefs),h(this.impactLinkRefs),h(this.goalCompletionTextRefs)},50,{maxWait:50,leading:!0})}get configLang(){return A[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.resizeElements)}async updated(e){const r=["baseUrl","storeId","apiKey","userId","lang","discountCodes"];for(const p of r)if(e.has(p)){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(e){if(document.fonts.status==="loading")return await document.fonts.ready.catch(r=>R.error(r)),e()}renderCard({imageUrl:e,title:r,percentFunded:p,goalProgressText:n,description:m,urlCopy:o,impactUrl:b,isImage:u,cardType:y,goalCompletionText:v}){return T`
|
|
2
2
|
<div class="impact-card ${u?"":"icon"}" part="impact-card">
|
|
3
3
|
<div class="${u?"":"icon-background "}">
|
|
4
4
|
<img
|
|
@@ -12,7 +12,7 @@ export { BeamSocialShare } from './social-share.js';
|
|
|
12
12
|
export { BeamSubscriberSelectNonprofit } from './subscriber-select-nonprofit.js';
|
|
13
13
|
import 'lit';
|
|
14
14
|
import 'lit-html';
|
|
15
|
-
import '../chunks/utils-
|
|
15
|
+
import '../chunks/utils-BPcZ5h8J.esm.js';
|
|
16
16
|
import 'lodash-es/debounce';
|
|
17
17
|
import 'lodash-es/isEqual';
|
|
18
18
|
import 'lodash';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{BeamCommunityImpact as S}from"./community-impact.esm.js";import{BeamCumulativeImpact as b}from"./cumulative-impact.esm.js";import{BeamImpactOverview as P}from"./impact-overview.esm.js";import{BeamSelectNonprofit as N}from"./select-nonprofit.esm.js";import{B as g}from"../chunks/index-
|
|
1
|
+
import{BeamCommunityImpact as S}from"./community-impact.esm.js";import{BeamCumulativeImpact as b}from"./cumulative-impact.esm.js";import{BeamImpactOverview as P}from"./impact-overview.esm.js";import{BeamSelectNonprofit as N}from"./select-nonprofit.esm.js";import{B as g}from"../chunks/index-DJ5OwAaV.esm.js";import{B as C}from"../chunks/index-C03QP2W-.esm.js";import{BeamSubscriptionManagement as y}from"./subscription-management.esm.js";import{BeamSubscriptionImpact as M}from"./subscription-impact.esm.js";import{BeamProductDetailsPage as R}from"./product-details-page.esm.js";import{BeamSelectSubscriptionNonprofit as j}from"./select-subscription-nonprofit.esm.js";import{BeamSocialShare as q}from"./social-share.esm.js";import{BeamSubscriberSelectNonprofit as A}from"./subscriber-select-nonprofit.esm.js";import"../chunks/lit-BEag9MFp.esm.js";import"../chunks/css-card-grid-CiqEjkwR.esm.js";import"../chunks/utils-C5hmbxa4.esm.js";import"../chunks/lodash-CrMU6wKg.esm.js";import"../chunks/index-BpR0FMss.esm.js";import"../chunks/share-button-Cle5Uexn.esm.js";import"./beam-partner-logos.esm.js";import"../chunks/_share-dialog-dependencies-BonvNllt.esm.js";import"../chunks/vendor-DUOg5fL-.esm.js";import"../chunks/share-button-C_qDR7Rw.esm.js";import"../chunks/responsive-aN8P5PqD.esm.js";import"../chunks/promo-pill-label-F6oSUeZ_.esm.js";import"../chunks/handlebars-B_i-to-h.esm.js";export{S as BeamCommunityImpact,b as BeamCumulativeImpact,P as BeamImpactOverview,C as BeamPostPurchase,R as BeamProductDetailsPage,g as BeamRedeemTransaction,N as BeamSelectNonprofit,j as BeamSelectSubscriptionNonprofit,q as BeamSocialShare,A as BeamSubscriberSelectNonprofit,M as BeamSubscriptionImpact,y as BeamSubscriptionManagement};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/components/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{BeamCommunityImpact as S}from"./community-impact.js";import{BeamCumulativeImpact as b}from"./cumulative-impact.js";import{BeamImpactOverview as P}from"./impact-overview.js";import{BeamSelectNonprofit as N}from"./select-nonprofit.js";import{B as g}from"../chunks/index-
|
|
1
|
+
import{BeamCommunityImpact as S}from"./community-impact.js";import{BeamCumulativeImpact as b}from"./cumulative-impact.js";import{BeamImpactOverview as P}from"./impact-overview.js";import{BeamSelectNonprofit as N}from"./select-nonprofit.js";import{B as g}from"../chunks/index-BXivnoQL.esm.js";import{B as C}from"../chunks/index-CQEhF7Dy.esm.js";import{BeamSubscriptionManagement as y}from"./subscription-management.js";import{BeamSubscriptionImpact as M}from"./subscription-impact.js";import{BeamProductDetailsPage as R}from"./product-details-page.js";import{BeamSelectSubscriptionNonprofit as j}from"./select-subscription-nonprofit.js";import{BeamSocialShare as q}from"./social-share.js";import{BeamSubscriberSelectNonprofit as A}from"./subscriber-select-nonprofit.js";import"../chunks/lit-BEag9MFp.esm.js";import"../chunks/css-card-grid-CiqEjkwR.esm.js";import"../chunks/utils-C5hmbxa4.esm.js";import"../chunks/lodash-CrMU6wKg.esm.js";import"../chunks/index-BpR0FMss.esm.js";import"../chunks/share-button-Cle5Uexn.esm.js";import"./beam-partner-logos.js";import"../chunks/_share-dialog-dependencies-BonvNllt.esm.js";import"../chunks/vendor-DUOg5fL-.esm.js";import"../chunks/share-button-C_qDR7Rw.esm.js";import"../chunks/responsive-aN8P5PqD.esm.js";import"../chunks/promo-pill-label-F6oSUeZ_.esm.js";import"../chunks/handlebars-B_i-to-h.esm.js";export{S as BeamCommunityImpact,b as BeamCumulativeImpact,P as BeamImpactOverview,C as BeamPostPurchase,R as BeamProductDetailsPage,g as BeamRedeemTransaction,N as BeamSelectNonprofit,j as BeamSelectSubscriptionNonprofit,q as BeamSocialShare,A as BeamSubscriberSelectNonprofit,M as BeamSubscriptionImpact,y as BeamSubscriptionManagement};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement, PropertyValues } from 'lit';
|
|
3
3
|
import * as lit_html from 'lit-html';
|
|
4
|
-
import { L as LANGUAGES, d as TCart } from '../chunks/utils-
|
|
4
|
+
import { L as LANGUAGES, d as TCart } from '../chunks/utils-BPcZ5h8J.esm.js';
|
|
5
5
|
import './redeem-transaction.js';
|
|
6
6
|
import './impact-overview.js';
|
|
7
7
|
import 'lodash-es/debounce';
|
|
@@ -57,6 +57,7 @@ declare class BeamPostPurchase extends LitElement {
|
|
|
57
57
|
private getManualPromoCodes;
|
|
58
58
|
handlePostTransaction: () => Promise<{
|
|
59
59
|
transactionId: string;
|
|
60
|
+
selectionId: string | null;
|
|
60
61
|
transactionCreated: boolean;
|
|
61
62
|
beamUserId: string;
|
|
62
63
|
nonprofitId: number | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunks/lit-BEag9MFp.esm.js";import"../chunks/utils-C5hmbxa4.esm.js";import"../chunks/css-card-grid-CiqEjkwR.esm.js";import"../chunks/index-
|
|
1
|
+
import"../chunks/lit-BEag9MFp.esm.js";import"../chunks/utils-C5hmbxa4.esm.js";import"../chunks/css-card-grid-CiqEjkwR.esm.js";import"../chunks/index-BpR0FMss.esm.js";import"../chunks/index-DJ5OwAaV.esm.js";import"./impact-overview.esm.js";import{B as b}from"../chunks/index-C03QP2W-.esm.js";import"../chunks/lodash-CrMU6wKg.esm.js";import"../chunks/share-button-Cle5Uexn.esm.js";import"./beam-partner-logos.esm.js";import"../chunks/promo-pill-label-F6oSUeZ_.esm.js";import"../chunks/_share-dialog-dependencies-BonvNllt.esm.js";import"../chunks/vendor-DUOg5fL-.esm.js";import"../chunks/share-button-C_qDR7Rw.esm.js";import"../chunks/responsive-aN8P5PqD.esm.js";export{b as BeamPostPurchase};
|
|
2
2
|
//# sourceMappingURL=post-purchase.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunks/lit-BEag9MFp.esm.js";import"../chunks/utils-C5hmbxa4.esm.js";import"../chunks/css-card-grid-CiqEjkwR.esm.js";import"../chunks/index-
|
|
1
|
+
import"../chunks/lit-BEag9MFp.esm.js";import"../chunks/utils-C5hmbxa4.esm.js";import"../chunks/css-card-grid-CiqEjkwR.esm.js";import"../chunks/index-BpR0FMss.esm.js";import"../chunks/index-BXivnoQL.esm.js";import"./impact-overview.js";import{B as b}from"../chunks/index-CQEhF7Dy.esm.js";import"../chunks/lodash-CrMU6wKg.esm.js";import"../chunks/share-button-Cle5Uexn.esm.js";import"./beam-partner-logos.js";import"../chunks/promo-pill-label-F6oSUeZ_.esm.js";import"../chunks/_share-dialog-dependencies-BonvNllt.esm.js";import"../chunks/vendor-DUOg5fL-.esm.js";import"../chunks/share-button-C_qDR7Rw.esm.js";import"../chunks/responsive-aN8P5PqD.esm.js";export{b as BeamPostPurchase};
|
|
2
2
|
//# sourceMappingURL=post-purchase.js.map
|
|
@@ -2,7 +2,7 @@ import * as lit from 'lit';
|
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
3
|
import * as lit_html from 'lit-html';
|
|
4
4
|
import { p as postProductDetailsPage } from '../chunks/routes-D6Gtw6kZ.esm.js';
|
|
5
|
-
import { T as TUrl, L as LANGUAGES } from '../chunks/utils-
|
|
5
|
+
import { T as TUrl, L as LANGUAGES } from '../chunks/utils-BPcZ5h8J.esm.js';
|
|
6
6
|
import 'lodash-es/debounce';
|
|
7
7
|
import 'lodash-es/isEqual';
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as E,b as r,i as B,n as p,r as z,a as A,h as L}from"../chunks/lit-BEag9MFp.esm.js";import{u as b,B as G,l as W,A as M,c as R,d as k,e as D,f as _}from"../chunks/index-
|
|
1
|
+
import{m as E,b as r,i as B,n as p,r as z,a as A,h as L}from"../chunks/lit-BEag9MFp.esm.js";import{u as b,B as G,l as W,A as M,c as R,d as k,e as D,f as _}from"../chunks/index-BpR0FMss.esm.js";import{D as O,z as j,A as H,h as U,C as K,E as w,W as y,x as N,v as V,F as q,G as J,H as Y,I as Z,m as S}from"../chunks/utils-C5hmbxa4.esm.js";import{c as Q,d as X,e as ee}from"../chunks/css-card-grid-CiqEjkwR.esm.js";import{c as te}from"../chunks/responsive-aN8P5PqD.esm.js";import"../chunks/_share-dialog-dependencies-BonvNllt.esm.js";import"../chunks/vendor-DUOg5fL-.esm.js";import{p as oe}from"../chunks/promo-pill-label-F6oSUeZ_.esm.js";import"../chunks/lodash-CrMU6wKg.esm.js";const ae=(n="",{borderRadius:e="0px",borderStyle:t="unset",borderColor:o="#000000",borderWidth:i="1px"}={})=>{const a=n.startsWith("--beam-")?n:`--beam-${n}`;return{[`${a}-borderRadius`]:e,[`${a}-borderStyle`]:t,[`${a}-borderColor`]:o,[`${a}-borderWidth`]:i}},ie=(n="",{borderRadius:e="0px",borderStyle:t="unset",borderColor:o="#000000",borderWidth:i="1px"}={})=>{const a=n.startsWith("--beam-")?n:`--beam-${n}`;return E(` border-radius: var(${a}-borderRadius, ${e});
|
|
2
2
|
border-style: var(${a}-borderStyle, ${t});
|
|
3
3
|
border-color: var(${a}-borderColor, ${o});
|
|
4
4
|
border-width: var(${a}-borderWidth, ${i});
|
|
@@ -17,7 +17,7 @@ import{m as E,b as r,i as B,n as p,r as z,a as A,h as L}from"../chunks/lit-BEag9
|
|
|
17
17
|
<circle cx="12" cy="12" r="10"></circle>
|
|
18
18
|
<path d="M12 16v-4"></path>
|
|
19
19
|
<path d="M12 8h.01"></path>
|
|
20
|
-
</svg>`,v={en:{ctaTitle:()=>"Choose Your Impact",ctaMessage:()=>"At no extra cost, 1% of every order will be donated to a nonprofit you choose. Add to cart to choose. Powered by Beam",inlineSeparator:()=>":"},fr:{ctaTitle:()=>"Choisissez votre impact",ctaMessage:()=>"Sans frais suppl\xE9mentaires, 1 % de chaque commande est revers\xE9 \xE0 l'association de votre choix. Ajoutez au panier pour choisir. Propuls\xE9 par Beam.",inlineSeparator:()=>":"},es:{ctaTitle:()=>"Elige tu impacto",ctaMessage:()=>"Sin coste adicional, el 1 % de cada pedido se dona a la organizaci\xF3n sin \xE1nimo de lucro que elijas. A\xF1\xE1delo al carrito para elegir. Impulsado por Beam.",inlineSeparator:()=>":"},de:{ctaTitle:()=>"W\xE4hlen Sie Ihren Impact",ctaMessage:()=>"Ohne zus\xE4tzliche Kosten wird 1 % jeder Bestellung an eine von Ihnen gew\xE4hlte gemeinn\xFCtzige Organisation gespendet. Zum Warenkorb hinzuf\xFCgen, um auszuw\xE4hlen. Unterst\xFCtzt von Beam.",inlineSeparator:()=>":"},it:{ctaTitle:()=>"Scegli il tuo impatto",ctaMessage:()=>"L'1 % di ogni acquisto viene donato, senza alcun costo aggiuntivo, a un'organizzazione no-profit a tua scelta. Aggiungi al carrello per scegliere. Promosso da Beam.",inlineSeparator:()=>":"},pl:{ctaTitle:()=>"Wybierz sw\xF3j wp\u0142yw",ctaMessage:()=>"1 % warto\u015Bci ka\u017Cdego zam\xF3wienia przekazywany jest na wybran\u0105 przez Ciebie organizacj\u0119 non-profit \u2013 bez dodatkowych koszt\xF3w. Dodaj do koszyka, aby wybra\u0107. Obs\u0142ugiwane przez Beam.",inlineSeparator:()=>":"},ja:{ctaTitle:()=>"\u5BC4\u4ED8\u5148\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044\u3002",ctaMessage:()=>"\u8FFD\u52A0\u8CBB\u7528\u306A\u3057\u3067\u3001\u3054\u6CE8\u6587\u91D1\u984D\u306E1%\u3092\u975E\u55B6\u5229\u56E3\u4F53\u3078\u5BC4\u4ED8\u3067\u304D\u307E\u3059\u3002\u3054\u5E0C\u671B\u306E\u5834\u5408\u3001\u30AB\u30FC\u30C8\u306B\u8FFD\u52A0\u3057\u3066\u5BC4\u4ED8\u5185\u5BB9\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044\u3002Powered by Beam",inlineSeparator:()=>":"}};var se=Object.defineProperty,c=(n,e,t,o)=>{for(var i=void 0,a=n.length-1,l;a>=0;a--)(l=n[a])&&(i=l(e,t,i)||i);return i&&se(e,t,i),i};const le="--beam-ProductDetailsPage-imageUrl";class s extends A{constructor(){super(...arguments),this.baseUrl=O,this.lang="en",this.draftConfig=!1,this.debug=!1,this.localStorage=j(this),this.pluginPromoCodes=[],this.handlePromoCodesStored=e=>{const t=(e.detail.promoCodes?.unvalidatedPromoCodes??[]).map(o=>o.attributes?.value??o.attributes?.url??"").sort();this.pluginPromoCodes=t},this.postProductDetailsPageData=async()=>{ee(["apiKey","storeId"],this);const e=H(G,{apiKey:this.apiKey}),t=this.getManualPromoCodes(),o=U(t.map(l=>({value:l})),this.apiKey),i=o&&!K(o);i&&this.dispatchEvent(new w({source:y.product_details_page}));const a=await W({baseUrl:this.baseUrl,headers:N(this.apiKey),queryParams:{version:"1.0.0",lang:this.configLang,storeId:this.storeId,widgetName:y.product_details_page,draftConfig:this.draftConfig,remoteProductIdentifier:this.remoteProductIdentifier},requestBody:{...i&&{promos:o},beamCartId:e||void 0}});return this.handleValidatedPromoCodes(a),a},this.productDetailsPageDataController=new M(this,this.postProductDetailsPageData)}get configLang(){return V[this.lang]||"en"}get parsedPromoCodes(){return q(this.promoCodes)}getManualPromoCodes(){if(this.parsedPromoCodes&&this.parsedPromoCodes.length>0)return this.parsedPromoCodes;const e=this.localStorage.getItemJson("cart");return e?J(e):[]}async handleValidatedPromoCodes(e){e.promos?.validatedPromoCodes&&(await Promise.all([Y({apiKey:this.apiKey,promoCodes:{validatedPromoCodes:e.promos.validatedPromoCodes,unvalidatedPromoCodes:[]}}),Z({validatedPromoCodes:e.promos.validatedPromoCodes,domain:this.domain})]),this.dispatchEvent(new w({source:y.product_details_page})))}async firstUpdated(){window.addEventListener(S.eventName,this.handlePromoCodesStored)}disconnectedCallback(){window.removeEventListener(S.eventName,this.handlePromoCodesStored),super.disconnectedCallback()}async updated(e){const t=["storeId","baseUrl","lang","apiKey","pluginPromoCodes","promoCodes"];this.pluginPromoCodes;for(const o of t)if(e.has(o)){await this.productDetailsPageDataController.exec();break}}render(){const{data:e,loading:t}=this.productDetailsPageDataController,o=this.cssVariables["--beam-ProductDetailsPage-image-placement"],i=P=>P!=="0px"&&P!=="0",a=this.cssVariables["--beam-ProductDetailsPage-shouldDisplayPromoPill"]==="true",l=!!e?.config?.web?.promo,g=i(this.cssVariables["--beam-ProductDetailsPage-imageHeight"]),h=i(this.cssVariables["--beam-ProductDetailsPage-title-fontSize"]),u=a&&l&&g&&h,m=this.cssVariables["--beam-ProductDetailsPage-shouldDisplayColon"]==="true";return t?r``:e==null?this.debug?R({error:new Error("No data")}):"":r`
|
|
20
|
+
</svg>`,v={en:{ctaTitle:()=>"Choose Your Impact",ctaMessage:()=>"At no extra cost, 1% of every order will be donated to a nonprofit you choose. Add to cart to choose. Powered by Beam",inlineSeparator:()=>":"},fr:{ctaTitle:()=>"Choisissez votre impact",ctaMessage:()=>"Sans frais suppl\xE9mentaires, 1 % de chaque commande est revers\xE9 \xE0 l'association de votre choix. Ajoutez au panier pour choisir. Propuls\xE9 par Beam.",inlineSeparator:()=>":"},es:{ctaTitle:()=>"Elige tu impacto",ctaMessage:()=>"Sin coste adicional, el 1 % de cada pedido se dona a la organizaci\xF3n sin \xE1nimo de lucro que elijas. A\xF1\xE1delo al carrito para elegir. Impulsado por Beam.",inlineSeparator:()=>":"},de:{ctaTitle:()=>"W\xE4hlen Sie Ihren Impact",ctaMessage:()=>"Ohne zus\xE4tzliche Kosten wird 1 % jeder Bestellung an eine von Ihnen gew\xE4hlte gemeinn\xFCtzige Organisation gespendet. Zum Warenkorb hinzuf\xFCgen, um auszuw\xE4hlen. Unterst\xFCtzt von Beam.",inlineSeparator:()=>":"},it:{ctaTitle:()=>"Scegli il tuo impatto",ctaMessage:()=>"L'1 % di ogni acquisto viene donato, senza alcun costo aggiuntivo, a un'organizzazione no-profit a tua scelta. Aggiungi al carrello per scegliere. Promosso da Beam.",inlineSeparator:()=>":"},pl:{ctaTitle:()=>"Wybierz sw\xF3j wp\u0142yw",ctaMessage:()=>"1 % warto\u015Bci ka\u017Cdego zam\xF3wienia przekazywany jest na wybran\u0105 przez Ciebie organizacj\u0119 non-profit \u2013 bez dodatkowych koszt\xF3w. Dodaj do koszyka, aby wybra\u0107. Obs\u0142ugiwane przez Beam.",inlineSeparator:()=>":"},ja:{ctaTitle:()=>"\u5BC4\u4ED8\u5148\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044\u3002",ctaMessage:()=>"\u8FFD\u52A0\u8CBB\u7528\u306A\u3057\u3067\u3001\u3054\u6CE8\u6587\u91D1\u984D\u306E1%\u3092\u975E\u55B6\u5229\u56E3\u4F53\u3078\u5BC4\u4ED8\u3067\u304D\u307E\u3059\u3002\u3054\u5E0C\u671B\u306E\u5834\u5408\u3001\u30AB\u30FC\u30C8\u306B\u8FFD\u52A0\u3057\u3066\u5BC4\u4ED8\u5185\u5BB9\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044\u3002Powered by Beam",inlineSeparator:()=>":"}};var se=Object.defineProperty,c=(n,e,t,o)=>{for(var i=void 0,a=n.length-1,l;a>=0;a--)(l=n[a])&&(i=l(e,t,i)||i);return i&&se(e,t,i),i};const le="--beam-ProductDetailsPage-imageUrl";class s extends A{constructor(){super(...arguments),this.baseUrl=O,this.lang="en",this.draftConfig=!1,this.debug=!1,this.localStorage=j(this),this.pluginPromoCodes=[],this.handlePromoCodesStored=e=>{const t=(e.detail.promoCodes?.unvalidatedPromoCodes??[]).map(o=>o.attributes?.value??o.attributes?.url??"").sort();this.pluginPromoCodes=t},this.postProductDetailsPageData=async()=>{ee(["apiKey","storeId"],this);const e=H(G,{apiKey:this.apiKey}),t=this.getManualPromoCodes(),o=U(t.map(l=>({value:l})),this.apiKey),i=o&&!K(o);i&&this.dispatchEvent(new w({source:y.product_details_page}));const a=await W({baseUrl:this.baseUrl,headers:N(this.apiKey),queryParams:{version:"1.0.0",lang:this.configLang,storeId:this.storeId,widgetName:y.product_details_page,draftConfig:this.draftConfig,remoteProductIdentifier:this.remoteProductIdentifier},requestBody:{...i&&{promos:o},beamCartId:e||void 0}});return this.handleValidatedPromoCodes(a),a},this.productDetailsPageDataController=new M(this,this.postProductDetailsPageData)}get configLang(){return V[this.lang]||"en"}get parsedPromoCodes(){return q(this.promoCodes)}getManualPromoCodes(){if(this.parsedPromoCodes&&this.parsedPromoCodes.length>0)return this.parsedPromoCodes;const e=this.localStorage.getItemJson("cart");return e?J(e):[]}async handleValidatedPromoCodes(e){e.promos?.validatedPromoCodes?.length&&(await Promise.all([Y({apiKey:this.apiKey,promoCodes:{validatedPromoCodes:e.promos.validatedPromoCodes,unvalidatedPromoCodes:[]}}),Z({validatedPromoCodes:e.promos.validatedPromoCodes,domain:this.domain})]),this.dispatchEvent(new w({source:y.product_details_page})))}async firstUpdated(){window.addEventListener(S.eventName,this.handlePromoCodesStored)}disconnectedCallback(){window.removeEventListener(S.eventName,this.handlePromoCodesStored),super.disconnectedCallback()}async updated(e){const t=["storeId","baseUrl","lang","apiKey","pluginPromoCodes","promoCodes"];this.pluginPromoCodes;for(const o of t)if(e.has(o)){await this.productDetailsPageDataController.exec();break}}render(){const{data:e,loading:t}=this.productDetailsPageDataController,o=this.cssVariables["--beam-ProductDetailsPage-image-placement"],i=P=>P!=="0px"&&P!=="0",a=this.cssVariables["--beam-ProductDetailsPage-shouldDisplayPromoPill"]==="true",l=!!e?.config?.web?.promo,g=i(this.cssVariables["--beam-ProductDetailsPage-imageHeight"]),h=i(this.cssVariables["--beam-ProductDetailsPage-title-fontSize"]),u=a&&l&&g&&h,m=this.cssVariables["--beam-ProductDetailsPage-shouldDisplayColon"]==="true";return t?r``:e==null?this.debug?R({error:new Error("No data")}):"":r`
|
|
21
21
|
<style>
|
|
22
22
|
:host {
|
|
23
23
|
${this.cssVariables.toCSS()}
|