@beamimpact/web-sdk 1.52.7 → 1.53.1
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-CYeOdZWi.esm.js → _share-dialog-dependencies-Cirjl8zP.esm.js} +2 -2
- package/dist/chunks/{_share-dialog-dependencies-CYeOdZWi.esm.js.map → _share-dialog-dependencies-Cirjl8zP.esm.js.map} +1 -1
- package/dist/chunks/{_share-dialog-dependencies-FmC7lLQ6.esm.js → _share-dialog-dependencies-DElW9Yip.esm.js} +2 -2
- package/dist/chunks/{_share-dialog-dependencies-FmC7lLQ6.esm.js.map → _share-dialog-dependencies-DElW9Yip.esm.js.map} +1 -1
- package/dist/chunks/cart-contents-DkoytiZh.esm.js.map +1 -1
- package/dist/chunks/{cart-contents-CUgc4y1N.esm.d.ts → cart-contents-oArgpFbi.esm.d.ts} +1 -1
- package/dist/chunks/{events-BKkf9u9l.esm.d.ts → events-BMTcECV9.esm.d.ts} +2 -2
- package/dist/chunks/{index-TAxKoTC1.esm.d.ts → index-1Mhh255_.esm.d.ts} +1 -1
- package/dist/chunks/index-2vxtp84k.esm.js +2 -0
- package/dist/chunks/index-2vxtp84k.esm.js.map +1 -0
- package/dist/chunks/index-Bs4Q42bL.esm.js +2 -0
- package/dist/chunks/index-Bs4Q42bL.esm.js.map +1 -0
- package/dist/chunks/{index-ki8pLX6n.esm.d.ts → index-C4P0R2un.esm.d.ts} +4 -4
- package/dist/chunks/{index-CbKkAM6h.esm.d.ts → index-CPVMm4wx.esm.d.ts} +1 -1
- package/dist/chunks/{index-Dnm34FcO.esm.d.ts → index-Ca8xkEwS.esm.d.ts} +1 -1
- package/dist/chunks/{index-ChmhNz41.esm.js → index-CaBSaNNT.esm.js} +2 -2
- package/dist/chunks/index-CaBSaNNT.esm.js.map +1 -0
- package/dist/chunks/index-CjT2ycv5.esm.js +389 -0
- package/dist/chunks/index-CjT2ycv5.esm.js.map +1 -0
- package/dist/chunks/{index-BqBEii8E.esm.d.ts → index-CkuCObi0.esm.d.ts} +1 -1
- package/dist/chunks/index-DGyP7M3g.esm.js +2 -0
- package/dist/chunks/index-DGyP7M3g.esm.js.map +1 -0
- package/dist/chunks/index-DUeE7FLq.esm.js +2 -0
- package/dist/chunks/index-DUeE7FLq.esm.js.map +1 -0
- package/dist/chunks/index-DZyO6--E.esm.js +2 -0
- package/dist/chunks/index-DZyO6--E.esm.js.map +1 -0
- package/dist/chunks/{index-DkGjP-Zg.esm.js → index-D_L-n4we.esm.js} +2 -2
- package/dist/chunks/index-D_L-n4we.esm.js.map +1 -0
- package/dist/chunks/{index-DvbUE31b.esm.d.ts → index-DqffUXvi.esm.d.ts} +1 -1
- package/dist/chunks/index-IZJ4xhyj.esm.js +2 -0
- package/dist/chunks/index-IZJ4xhyj.esm.js.map +1 -0
- package/dist/chunks/index-Z9-EAuWk.esm.js +2 -0
- package/dist/chunks/index-Z9-EAuWk.esm.js.map +1 -0
- package/dist/chunks/index-sUGvOawY.esm.js +2 -0
- package/dist/chunks/index-sUGvOawY.esm.js.map +1 -0
- package/dist/chunks/index-vH6HFI2B.esm.js +389 -0
- package/dist/chunks/index-vH6HFI2B.esm.js.map +1 -0
- package/dist/chunks/{openapi-spec-VAt3phhg.esm.d.ts → openapi-spec-x9NbL7bU.esm.d.ts} +860 -199
- package/dist/chunks/{order-page-Cerye00Q.esm.d.ts → order-page-D_p01zgd.esm.d.ts} +3 -3
- package/dist/chunks/{order-page-DFtCsDYa.esm.js → order-page-O5u1cAz8.esm.js} +2 -2
- package/dist/chunks/{order-page-DFtCsDYa.esm.js.map → order-page-O5u1cAz8.esm.js.map} +1 -1
- package/dist/chunks/{order-page-BPm0hcsC.esm.js → order-page-Vk9anZAb.esm.js} +2 -2
- package/dist/chunks/{order-page-BPm0hcsC.esm.js.map → order-page-Vk9anZAb.esm.js.map} +1 -1
- package/dist/chunks/{promo-types-C1unMpo2.esm.d.ts → promo-types-Cz_Zkjy1.esm.d.ts} +1 -1
- package/dist/chunks/promoManager-B9cTR1R3.esm.js.map +1 -1
- package/dist/chunks/promoManager-fl54hq13.esm.js.map +1 -1
- package/dist/chunks/routes-BnPd0lrO.esm.js +2 -0
- package/dist/chunks/routes-BnPd0lrO.esm.js.map +1 -0
- package/dist/chunks/{routes-DDRd747e.esm.d.ts → routes-BwRUVGsk.esm.d.ts} +21 -4
- package/dist/chunks/routes-D7s2_Xn5.esm.js +2 -0
- package/dist/chunks/routes-D7s2_Xn5.esm.js.map +1 -0
- package/dist/chunks/{share-button-C2_VjXAY.esm.js → share-button-8zVx6bYw.esm.js} +2 -2
- package/dist/chunks/{share-button-C2_VjXAY.esm.js.map → share-button-8zVx6bYw.esm.js.map} +1 -1
- package/dist/chunks/{share-button-BXEwUmT4.esm.js → share-button-CM4kwufS.esm.js} +2 -2
- package/dist/chunks/{share-button-CLpGIG3j.esm.js.map → share-button-CM4kwufS.esm.js.map} +1 -1
- package/dist/chunks/{share-button-DVQotZGR.esm.js → share-button-CWFcBlaF.esm.js} +2 -2
- package/dist/chunks/{share-button-DVQotZGR.esm.js.map → share-button-CWFcBlaF.esm.js.map} +1 -1
- package/dist/chunks/{share-button-CLpGIG3j.esm.js → share-button-DNyMCeHQ.esm.js} +2 -2
- package/dist/chunks/{share-button-BXEwUmT4.esm.js.map → share-button-DNyMCeHQ.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-DIJcb6w0.esm.js → update-cart-BQHJ9lRb.esm.js} +2 -2
- package/dist/chunks/{update-cart-DIJcb6w0.esm.js.map → update-cart-BQHJ9lRb.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-BpiNvvDT.esm.js → update-cart-DCxR1dVX.esm.js} +2 -2
- package/dist/chunks/{update-cart-BpiNvvDT.esm.js.map → update-cart-DCxR1dVX.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-NiToHHJH.esm.d.ts → update-cart-Dp0v0m4d.esm.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.esm.js +1 -1
- package/dist/components/cumulative-impact.js +1 -1
- package/dist/components/impact-overview.d.ts +3 -0
- package/dist/components/impact-overview.esm.js +1 -1
- package/dist/components/impact-overview.js +1 -1
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +10 -88
- package/dist/components/post-purchase.esm.js +4 -3
- package/dist/components/post-purchase.esm.js.map +1 -1
- package/dist/components/post-purchase.js +4 -3
- 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 +2 -2
- package/dist/components/redeem-transaction.esm.js +1 -388
- package/dist/components/redeem-transaction.esm.js.map +1 -1
- package/dist/components/redeem-transaction.js +1 -388
- package/dist/components/redeem-transaction.js.map +1 -1
- package/dist/components/select-nonprofit.d.ts +2 -2
- package/dist/components/select-nonprofit.esm.js +1 -1
- package/dist/components/select-nonprofit.js +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 +7 -7
- 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 +3 -0
- package/dist/components/subscription-impact.esm.js +1 -1
- package/dist/components/subscription-impact.js +1 -1
- package/dist/components/subscription-management.d.ts +16 -3
- package/dist/components/subscription-management.esm.js +18 -18
- package/dist/components/subscription-management.esm.js.map +1 -1
- package/dist/components/subscription-management.js +18 -18
- package/dist/components/subscription-management.js.map +1 -1
- package/dist/index.d.ts +13 -13
- 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.d.ts +3 -3
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/index.d.ts +11 -11
- package/dist/integrations/index.esm.js +1 -1
- package/dist/integrations/index.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/shopify.d.ts +5 -5
- 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/integrations/utils.d.ts +4 -4
- 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.d.ts +5 -5
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.d.ts +2 -2
- 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.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 +4 -4
- 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.d.ts +4 -4
- 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 +4 -4
- package/dist/react/select-subscription-nonprofit.esm.js +1 -1
- package/dist/react/select-subscription-nonprofit.js +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.d.ts +3 -3
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/utils/events.d.ts +4 -4
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/promoManager.d.ts +3 -3
- package/package.json +2 -2
- package/dist/chunks/index-9s_WWt_5.esm.js +0 -2
- package/dist/chunks/index-9s_WWt_5.esm.js.map +0 -1
- package/dist/chunks/index-B-4isAGW.esm.js +0 -2
- package/dist/chunks/index-B-4isAGW.esm.js.map +0 -1
- package/dist/chunks/index-Bp28pZSn.esm.js +0 -2
- package/dist/chunks/index-Bp28pZSn.esm.js.map +0 -1
- package/dist/chunks/index-CFtmDAHb.esm.js +0 -2
- package/dist/chunks/index-CFtmDAHb.esm.js.map +0 -1
- package/dist/chunks/index-CL7fWjz1.esm.js +0 -2
- package/dist/chunks/index-CL7fWjz1.esm.js.map +0 -1
- package/dist/chunks/index-CfgpHhN1.esm.js +0 -2
- package/dist/chunks/index-CfgpHhN1.esm.js.map +0 -1
- package/dist/chunks/index-ChmhNz41.esm.js.map +0 -1
- package/dist/chunks/index-DkGjP-Zg.esm.js.map +0 -1
- package/dist/chunks/index-DrOeOk1M.esm.js +0 -2
- package/dist/chunks/index-DrOeOk1M.esm.js.map +0 -1
- package/dist/chunks/index-oGObXjk6.esm.js +0 -2
- package/dist/chunks/index-oGObXjk6.esm.js.map +0 -1
- package/dist/chunks/routes-Dl-QWRUP.esm.js +0 -2
- package/dist/chunks/routes-Dl-QWRUP.esm.js.map +0 -1
- package/dist/chunks/routes-VlLXqb7P.esm.js +0 -2
- package/dist/chunks/routes-VlLXqb7P.esm.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { waitForElement } from '../utils/wait-for-element.js';
|
|
2
2
|
export { initNetworkListeners } from '../utils/network-listeners.js';
|
|
3
|
-
export { e as events } from '../chunks/events-
|
|
4
|
-
export { B as BeamShopifyCartIntegrationConfig, T as TBeamOrderPageParams, a as addBeamAttributesToCart, d as appendBeamAttributesToCart, b as appendStatsigToShopifyCartAttributes, c as appendToShopifyCartBeamAttribute, f as getBeamAttributesForCart, g as getCurrentCart, e as getShopifyCart, r as registerCartIntegration, s as showBeamOrderPageWidgets, t as trackCart } from '../chunks/order-page-
|
|
5
|
-
import '../chunks/cart-contents-
|
|
6
|
-
import '../chunks/openapi-spec-
|
|
7
|
-
import '../chunks/promo-types-
|
|
3
|
+
export { e as events } from '../chunks/events-BMTcECV9.esm.js';
|
|
4
|
+
export { B as BeamShopifyCartIntegrationConfig, T as TBeamOrderPageParams, a as addBeamAttributesToCart, d as appendBeamAttributesToCart, b as appendStatsigToShopifyCartAttributes, c as appendToShopifyCartBeamAttribute, f as getBeamAttributesForCart, g as getCurrentCart, e as getShopifyCart, r as registerCartIntegration, s as showBeamOrderPageWidgets, t as trackCart } from '../chunks/order-page-D_p01zgd.esm.js';
|
|
5
|
+
import '../chunks/cart-contents-oArgpFbi.esm.js';
|
|
6
|
+
import '../chunks/openapi-spec-x9NbL7bU.esm.js';
|
|
7
|
+
import '../chunks/promo-types-Cz_Zkjy1.esm.js';
|
|
8
8
|
import '../chunks/types-CPxMwnoR.esm.js';
|
|
9
9
|
import 'lodash';
|
|
10
|
-
import '../chunks/update-cart-
|
|
10
|
+
import '../chunks/update-cart-Dp0v0m4d.esm.js';
|
|
11
11
|
import '../chunks/types-C7gqAyyH.esm.js';
|
|
12
12
|
import './post-purchase.js';
|
|
13
13
|
import 'lit';
|
|
@@ -18,7 +18,7 @@ import '../chunks/promo-pill-label-BXRqZHET.esm.js';
|
|
|
18
18
|
import './beam-partner-logos.js';
|
|
19
19
|
import './impact-overview.js';
|
|
20
20
|
import '../chunks/share-button-B9hpxBVr.esm.js';
|
|
21
|
-
import '../chunks/routes-
|
|
21
|
+
import '../chunks/routes-BwRUVGsk.esm.js';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* @deprecated
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{waitForElement as t}from"../utils/wait-for-element.esm.js";import{getCookieValue as r,getCookieMap as o}from"../utils/cookies.esm.js";import{initNetworkListeners as L}from"../utils/network-listeners.esm.js";import{e as O}from"../chunks/events-BohmT6Lp.esm.js";import{z as Y,g as _,W as j,T as q,f as D,_ as G,I as H,K as J,s as Q,Y as R}from"../chunks/order-page-
|
|
1
|
+
import{waitForElement as t}from"../utils/wait-for-element.esm.js";import{getCookieValue as r,getCookieMap as o}from"../utils/cookies.esm.js";import{initNetworkListeners as L}from"../utils/network-listeners.esm.js";import{e as O}from"../chunks/events-BohmT6Lp.esm.js";import{z as Y,g as _,W as j,T as q,f as D,_ as G,I as H,K as J,s as Q,Y as R}from"../chunks/order-page-Vk9anZAb.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../utils/logger.esm.js";import"../utils/local-storage.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/promoManager-fl54hq13.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../chunks/update-cart-DCxR1dVX.esm.js";import"../chunks/routes-BnPd0lrO.esm.js";import"../utils/remote-session.esm.js";import"../utils/cart.esm.js";import"./post-purchase.esm.js";import"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/index-vH6HFI2B.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"./beam-partner-logos.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"./impact-overview.esm.js";import"../chunks/_share-dialog-dependencies-Cirjl8zP.esm.js";import"../chunks/share-button-DNyMCeHQ.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-CWFcBlaF.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const i={waitForElement:t,getCookieMap:o,getCookieValue:r};export{Y as addBeamAttributesToCart,_ as appendBeamAttributesToCart,j as appendStatsigToShopifyCartAttributes,q as appendToShopifyCartBeamAttribute,O as events,D as getBeamAttributesForCart,G as getCurrentCart,H as getShopifyCart,L as initNetworkListeners,J as registerCartIntegration,Q as showBeamOrderPageWidgets,R as trackCart,i as utils};
|
|
2
2
|
//# sourceMappingURL=shopify.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopify.esm.js","sources":["../../src/components/shopify/index.ts"],"sourcesContent":["/**\n * @deprecated\n * This file is preserved for backwards compatability, but future users should import from:\n * - integrations/shopify\n * - integration/utils\n * */\n\nimport { waitForElement } from \"../../utils/wait-for-element\";\nimport { getCookieMap, getCookieValue } from \"../../utils/cookies\";\n\nconst utils = {\n waitForElement,\n getCookieMap,\n getCookieValue,\n};\n\nexport { utils };\nexport { initNetworkListeners } from \"../../utils/network-listeners\";\nexport * as events from \"../../utils/events\";\n\nexport * from \"../../integrations/shopify\";\n"],"names":["utils","waitForElement","getCookieMap","getCookieValue"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shopify.esm.js","sources":["../../src/components/shopify/index.ts"],"sourcesContent":["/**\n * @deprecated\n * This file is preserved for backwards compatability, but future users should import from:\n * - integrations/shopify\n * - integration/utils\n * */\n\nimport { waitForElement } from \"../../utils/wait-for-element\";\nimport { getCookieMap, getCookieValue } from \"../../utils/cookies\";\n\nconst utils = {\n waitForElement,\n getCookieMap,\n getCookieValue,\n};\n\nexport { utils };\nexport { initNetworkListeners } from \"../../utils/network-listeners\";\nexport * as events from \"../../utils/events\";\n\nexport * from \"../../integrations/shopify\";\n"],"names":["utils","waitForElement","getCookieMap","getCookieValue"],"mappings":"yjDAUA,MAAMA,EAAQ,CACZ,eAAAC,EACA,aAAAC,EACA,eAAAC,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{waitForElement as t}from"../utils/wait-for-element.js";import{getCookieValue as r,getCookieMap as o}from"../utils/cookies.js";import{initNetworkListeners as L}from"../utils/network-listeners.js";import{e as O}from"../chunks/events-BohmT6Lp.esm.js";import{z as Y,g as _,W as j,T as q,f as D,_ as G,I as H,K as J,s as Q,Y as R}from"../chunks/order-page-
|
|
1
|
+
import{waitForElement as t}from"../utils/wait-for-element.js";import{getCookieValue as r,getCookieMap as o}from"../utils/cookies.js";import{initNetworkListeners as L}from"../utils/network-listeners.js";import{e as O}from"../chunks/events-BohmT6Lp.esm.js";import{z as Y,g as _,W as j,T as q,f as D,_ as G,I as H,K as J,s as Q,Y as R}from"../chunks/order-page-O5u1cAz8.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../utils/logger.js";import"../utils/local-storage.js";import"../utils/memoize-last.js";import"../chunks/promoManager-B9cTR1R3.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../chunks/update-cart-BQHJ9lRb.esm.js";import"../chunks/routes-D7s2_Xn5.esm.js";import"../utils/remote-session.js";import"../utils/cart.js";import"./post-purchase.js";import"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/index-CjT2ycv5.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"./beam-partner-logos.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"./impact-overview.js";import"../chunks/_share-dialog-dependencies-DElW9Yip.esm.js";import"../chunks/share-button-CM4kwufS.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-8zVx6bYw.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const i={waitForElement:t,getCookieMap:o,getCookieValue:r};export{Y as addBeamAttributesToCart,_ as appendBeamAttributesToCart,j as appendStatsigToShopifyCartAttributes,q as appendToShopifyCartBeamAttribute,O as events,D as getBeamAttributesForCart,G as getCurrentCart,H as getShopifyCart,L as initNetworkListeners,J as registerCartIntegration,Q as showBeamOrderPageWidgets,R as trackCart,i as utils};
|
|
2
2
|
//# sourceMappingURL=shopify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopify.js","sources":["../../src/components/shopify/index.ts"],"sourcesContent":["/**\n * @deprecated\n * This file is preserved for backwards compatability, but future users should import from:\n * - integrations/shopify\n * - integration/utils\n * */\n\nimport { waitForElement } from \"../../utils/wait-for-element\";\nimport { getCookieMap, getCookieValue } from \"../../utils/cookies\";\n\nconst utils = {\n waitForElement,\n getCookieMap,\n getCookieValue,\n};\n\nexport { utils };\nexport { initNetworkListeners } from \"../../utils/network-listeners\";\nexport * as events from \"../../utils/events\";\n\nexport * from \"../../integrations/shopify\";\n"],"names":["utils","waitForElement","getCookieMap","getCookieValue"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shopify.js","sources":["../../src/components/shopify/index.ts"],"sourcesContent":["/**\n * @deprecated\n * This file is preserved for backwards compatability, but future users should import from:\n * - integrations/shopify\n * - integration/utils\n * */\n\nimport { waitForElement } from \"../../utils/wait-for-element\";\nimport { getCookieMap, getCookieValue } from \"../../utils/cookies\";\n\nconst utils = {\n waitForElement,\n getCookieMap,\n getCookieValue,\n};\n\nexport { utils };\nexport { initNetworkListeners } from \"../../utils/network-listeners\";\nexport * as events from \"../../utils/events\";\n\nexport * from \"../../integrations/shopify\";\n"],"names":["utils","waitForElement","getCookieMap","getCookieValue"],"mappings":"6gDAUA,MAAMA,EAAQ,CACZ,eAAAC,EACA,aAAAC,EACA,eAAAC,CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as m,g as o,t as n,h as g,y as f}from"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-
|
|
1
|
+
import{f as m,g as o,t as n,h as g,y as f}from"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-Cirjl8zP.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"./beam-partner-logos.esm.js";import{c as b,d as y,e as u}from"../chunks/enforce-config-CZ3ToOgr.esm.js";import{D as w,S as x,g as I,W as U}from"../chunks/routes-BnPd0lrO.esm.js";import{_ as S}from"../chunks/loading-template-DG4lkIIc.esm.js";import{u as d,s as r,p}from"../chunks/share-button-CWFcBlaF.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";var k=Object.defineProperty,a=(l,t,i,v)=>{for(var s=void 0,c=l.length-1,h;c>=0;c--)(h=l[c])&&(s=h(t,i,s)||s);return s&&k(t,i,s),s};class e extends g{constructor(){super(...arguments),this.baseUrl=w,this.lang="en",this.debug=!1,this.brandName=null,this.shareImageUrl=null,this.isMobile=!1,this.windowResized=!1,this.checkViewport=()=>{this.windowResized=window.innerWidth<=768}}get configLang(){return x[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.checkViewport),this.checkViewport()}disconnectedCallback(){window.removeEventListener("resize",this.checkViewport),super.disconnectedCallback()}async fetchImpactData(){u(["apiKey","storeId","nonprofitId"],this);try{return await I({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{storeId:this.storeId,personalImpactLimit:0,nonprofitId:this.nonprofitId,widgetName:U.community_impact,version:"1.0.0",lang:this.configLang,transactionId:this.transactionId??void 0}})}catch(t){throw this.debug&&console.error("Failed to fetch impact data",t),t}}async updateImpactData(){try{const t=await this.fetchImpactData();if(t&&(this.brandName=t.chain.name,this.shareImageUrl=t.promoAssetUrl||t.personalImpactAssetUrl||t.community[0].share.imageUrl,this.shareImageUrl)){const i=await d(this.shareImageUrl);this.file=i,this.dataUrl=URL.createObjectURL(i)}}catch(t){this.debug&&console.error("Error updating impact data:",t)}}async firstUpdated(){await this.updateImpactData(),this.isMobile=/Mobi|Android/i.test(navigator.userAgent)||"ontouchstart"in window||navigator.maxTouchPoints>0}async openSystemShareSheet(t){if(t)try{const i=await d(t);navigator.share&&this.brandName&&await navigator.share({files:[i],title:r[this.lang].impactShareTitle(),text:r[this.lang].impactShareText({brandName:this.brandName})})}catch(i){this.debug&&console.error("Failed to open share sheet",i)}}async handleClickCopy(){if(this.file)try{this.apiKey&&this.transactionId?p({baseUrl:this.baseUrl,apiKey:this.apiKey||"",requestBody:{eventName:"ExtensibilityCopyImageButtonClick",nonprofitId:this.nonprofitId,storeId:this.storeId,timestamp:Date.now(),transactionId:Number(this.transactionId)}}).catch(()=>null):console.error("Missing data for social share analytics. Skipping send"),await navigator.clipboard.write([new ClipboardItem({"image/png":this.file})])}catch(t){this.debug&&console.error("Failed to copy image to clipboard:",t)}}handleClickDownload(t){this.apiKey&&this.transactionId?p({baseUrl:this.baseUrl,apiKey:this.apiKey||"",requestBody:{eventName:"ExtensibilityDownloadImageButtonClick",nonprofitId:this.nonprofitId,storeId:this.storeId,timestamp:Date.now(),transactionId:Number(this.transactionId)}}).catch(()=>null):console.error("Missing data for social share analytics. Skipping send");const i=t.currentTarget;this.isMobile&&this.shareImageUrl?(t.preventDefault(),this.openSystemShareSheet(this.shareImageUrl)):this.dataUrl&&(i.href=this.dataUrl,i.download=r[this.lang].impactShareTitle())}render(){return!this.brandName||!this.shareImageUrl||!this.dataUrl?S():f`
|
|
2
2
|
<div class="share-container ${this.windowResized||this.isMobile?"mobile":"desktop"}">
|
|
3
3
|
<h2 class="share-title">${r[this.lang].impactShareTitle()}</h2>
|
|
4
4
|
<p class="share-text">${r[this.lang].impactShareText({brandName:this.brandName})}</p>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as m,g as o,t as n,h as g,y as f}from"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-
|
|
1
|
+
import{f as m,g as o,t as n,h as g,y as f}from"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-DElW9Yip.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"./beam-partner-logos.js";import{c as b,d as y,e as u}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{D as w,S as x,g as I,W as U}from"../chunks/routes-D7s2_Xn5.esm.js";import{_ as S}from"../chunks/loading-template-DG4lkIIc.esm.js";import{u as d,s as r,p}from"../chunks/share-button-8zVx6bYw.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";var k=Object.defineProperty,a=(l,t,i,v)=>{for(var s=void 0,c=l.length-1,h;c>=0;c--)(h=l[c])&&(s=h(t,i,s)||s);return s&&k(t,i,s),s};class e extends g{constructor(){super(...arguments),this.baseUrl=w,this.lang="en",this.debug=!1,this.brandName=null,this.shareImageUrl=null,this.isMobile=!1,this.windowResized=!1,this.checkViewport=()=>{this.windowResized=window.innerWidth<=768}}get configLang(){return x[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.checkViewport),this.checkViewport()}disconnectedCallback(){window.removeEventListener("resize",this.checkViewport),super.disconnectedCallback()}async fetchImpactData(){u(["apiKey","storeId","nonprofitId"],this);try{return await I({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{storeId:this.storeId,personalImpactLimit:0,nonprofitId:this.nonprofitId,widgetName:U.community_impact,version:"1.0.0",lang:this.configLang,transactionId:this.transactionId??void 0}})}catch(t){throw this.debug&&console.error("Failed to fetch impact data",t),t}}async updateImpactData(){try{const t=await this.fetchImpactData();if(t&&(this.brandName=t.chain.name,this.shareImageUrl=t.promoAssetUrl||t.personalImpactAssetUrl||t.community[0].share.imageUrl,this.shareImageUrl)){const i=await d(this.shareImageUrl);this.file=i,this.dataUrl=URL.createObjectURL(i)}}catch(t){this.debug&&console.error("Error updating impact data:",t)}}async firstUpdated(){await this.updateImpactData(),this.isMobile=/Mobi|Android/i.test(navigator.userAgent)||"ontouchstart"in window||navigator.maxTouchPoints>0}async openSystemShareSheet(t){if(t)try{const i=await d(t);navigator.share&&this.brandName&&await navigator.share({files:[i],title:r[this.lang].impactShareTitle(),text:r[this.lang].impactShareText({brandName:this.brandName})})}catch(i){this.debug&&console.error("Failed to open share sheet",i)}}async handleClickCopy(){if(this.file)try{this.apiKey&&this.transactionId?p({baseUrl:this.baseUrl,apiKey:this.apiKey||"",requestBody:{eventName:"ExtensibilityCopyImageButtonClick",nonprofitId:this.nonprofitId,storeId:this.storeId,timestamp:Date.now(),transactionId:Number(this.transactionId)}}).catch(()=>null):console.error("Missing data for social share analytics. Skipping send"),await navigator.clipboard.write([new ClipboardItem({"image/png":this.file})])}catch(t){this.debug&&console.error("Failed to copy image to clipboard:",t)}}handleClickDownload(t){this.apiKey&&this.transactionId?p({baseUrl:this.baseUrl,apiKey:this.apiKey||"",requestBody:{eventName:"ExtensibilityDownloadImageButtonClick",nonprofitId:this.nonprofitId,storeId:this.storeId,timestamp:Date.now(),transactionId:Number(this.transactionId)}}).catch(()=>null):console.error("Missing data for social share analytics. Skipping send");const i=t.currentTarget;this.isMobile&&this.shareImageUrl?(t.preventDefault(),this.openSystemShareSheet(this.shareImageUrl)):this.dataUrl&&(i.href=this.dataUrl,i.download=r[this.lang].impactShareTitle())}render(){return!this.brandName||!this.shareImageUrl||!this.dataUrl?S():f`
|
|
2
2
|
<div class="share-container ${this.windowResized||this.isMobile?"mobile":"desktop"}">
|
|
3
3
|
<h2 class="share-title">${r[this.lang].impactShareTitle()}</h2>
|
|
4
4
|
<p class="share-text">${r[this.lang].impactShareText({brandName:this.brandName})}</p>
|
|
@@ -157,6 +157,9 @@ declare class BeamSubscriptionImpact extends LitElement {
|
|
|
157
157
|
} | null;
|
|
158
158
|
promoAssetUrl: string | null;
|
|
159
159
|
personalImpactAssetUrl: string | null;
|
|
160
|
+
settings?: {
|
|
161
|
+
excludeDonationsForRecurringTransactions: boolean;
|
|
162
|
+
} | undefined;
|
|
160
163
|
}>;
|
|
161
164
|
private impactDataController;
|
|
162
165
|
impactTitleRefs: HTMLElement[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as $,f as w,y as p,g as l,t as _,p as C}from"../chunks/lit-WqMxC_PA.esm.js";import{d as S,b as H}from"../chunks/lodash-D3TLHRR_.esm.js";import{p as j}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{s as A,a as K}from"../chunks/share-button-
|
|
1
|
+
import{h as $,f as w,y as p,g as l,t as _,p as C}from"../chunks/lit-WqMxC_PA.esm.js";import{d as S,b as H}from"../chunks/lodash-D3TLHRR_.esm.js";import{p as j}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{s as A,a as K}from"../chunks/share-button-DNyMCeHQ.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import{D as q,g as J,S as Q}from"../chunks/routes-BnPd0lrO.esm.js";import{u as b,A as X,d as g,a as Z,_ as ee,i as r}from"../chunks/localize-Btu9xYcE.esm.js";import{c as ie,d as te,e as ae}from"../chunks/enforce-config-CZ3ToOgr.esm.js";import{_ as re}from"../chunks/loading-template-DG4lkIIc.esm.js";import{makeApiKeyHeader as ne}from"../utils/makeApiKeyHeader.esm.js";import{c as oe}from"../chunks/responsive-BR8qUfBa.esm.js";import{logger as se}from"../utils/logger.esm.js";import{c as ce}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-CWFcBlaF.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";var pe=Object.defineProperty,le=(i,e,n,m)=>{for(var a=void 0,t=i.length-1,d;t>=0;t--)(d=i[t])&&(a=d(e,n,a)||a);return a&&pe(e,n,a),a};class P extends ${constructor(){super(...arguments),this.infoText=""}static get styles(){return w`
|
|
2
2
|
sl-badge::part(base) {
|
|
3
3
|
background-color: var(--beam-pillLabel-color-background, #000);
|
|
4
4
|
color: var(--beam-pillLabel-color, #fff);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as $,f as w,y as p,g as l,t as _,p as C}from"../chunks/lit-WqMxC_PA.esm.js";import{d as S,b as H}from"../chunks/lodash-D3TLHRR_.esm.js";import{p as j}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{s as A,a as K}from"../chunks/share-button-
|
|
1
|
+
import{h as $,f as w,y as p,g as l,t as _,p as C}from"../chunks/lit-WqMxC_PA.esm.js";import{d as S,b as H}from"../chunks/lodash-D3TLHRR_.esm.js";import{p as j}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{s as A,a as K}from"../chunks/share-button-CM4kwufS.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import{D as q,g as J,S as Q}from"../chunks/routes-D7s2_Xn5.esm.js";import{u as b,A as X,d as g,a as Z,_ as ee,i as r}from"../chunks/localize-C25pEGnx.esm.js";import{c as ie,d as te,e as ae}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{_ as re}from"../chunks/loading-template-DG4lkIIc.esm.js";import{makeApiKeyHeader as ne}from"../utils/makeApiKeyHeader.js";import{c as oe}from"../chunks/responsive-BR8qUfBa.esm.js";import{logger as se}from"../utils/logger.js";import{c as ce}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-8zVx6bYw.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";var pe=Object.defineProperty,le=(i,e,n,m)=>{for(var a=void 0,t=i.length-1,d;t>=0;t--)(d=i[t])&&(a=d(e,n,a)||a);return a&&pe(e,n,a),a};class P extends ${constructor(){super(...arguments),this.infoText=""}static get styles(){return w`
|
|
2
2
|
sl-badge::part(base) {
|
|
3
3
|
background-color: var(--beam-pillLabel-color-background, #000);
|
|
4
4
|
color: var(--beam-pillLabel-color, #fff);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
2
|
import * as lit from 'lit';
|
|
3
3
|
import { LitElement } from 'lit';
|
|
4
|
-
import { g as getImpact, a as getChainNonprofits } from '../chunks/routes-
|
|
5
|
-
import { T as TCart } from '../chunks/cart-contents-
|
|
4
|
+
import { g as getImpact, a as getChainNonprofits } from '../chunks/routes-BwRUVGsk.esm.js';
|
|
5
|
+
import { T as TCart } from '../chunks/cart-contents-oArgpFbi.esm.js';
|
|
6
6
|
import './select-subscription-nonprofit.js';
|
|
7
7
|
import './subscription-impact.js';
|
|
8
8
|
import './beam-partner-logos.js';
|
|
9
9
|
import '../chunks/progress-bar-CveZ8E6Q.esm.js';
|
|
10
10
|
import { L as LANGUAGES } from '../chunks/types-C7gqAyyH.esm.js';
|
|
11
11
|
import { T as TNumericId } from '../chunks/types-CPxMwnoR.esm.js';
|
|
12
|
-
import '../chunks/openapi-spec-
|
|
12
|
+
import '../chunks/openapi-spec-x9NbL7bU.esm.js';
|
|
13
13
|
import 'lodash';
|
|
14
14
|
import '../chunks/share-button-B9hpxBVr.esm.js';
|
|
15
15
|
|
|
@@ -162,13 +162,23 @@ declare class BeamSubscriptionManagement extends LitElement {
|
|
|
162
162
|
apply: boolean;
|
|
163
163
|
}[];
|
|
164
164
|
} | undefined;
|
|
165
|
+
extensibility?: {
|
|
166
|
+
excludeB2BOrders?: boolean | undefined;
|
|
167
|
+
} | undefined;
|
|
168
|
+
settings?: {
|
|
169
|
+
excludeDonationsForRecurringTransactions: boolean;
|
|
170
|
+
} | undefined;
|
|
165
171
|
}>;
|
|
166
172
|
fetchSubscription(): Promise<{
|
|
167
173
|
beamUserId: string;
|
|
168
174
|
remoteSubscriptionId: string;
|
|
169
175
|
internalSubscriptionId: string;
|
|
176
|
+
settings?: {
|
|
177
|
+
excludeDonationsForRecurringTransactions: boolean;
|
|
178
|
+
} | undefined;
|
|
170
179
|
nonprofit: {
|
|
171
180
|
id: number;
|
|
181
|
+
name?: string | undefined;
|
|
172
182
|
} | null;
|
|
173
183
|
}>;
|
|
174
184
|
fetchImpact(): Promise<{
|
|
@@ -293,6 +303,9 @@ declare class BeamSubscriptionManagement extends LitElement {
|
|
|
293
303
|
} | null;
|
|
294
304
|
promoAssetUrl: string | null;
|
|
295
305
|
personalImpactAssetUrl: string | null;
|
|
306
|
+
settings?: {
|
|
307
|
+
excludeDonationsForRecurringTransactions: boolean;
|
|
308
|
+
} | undefined;
|
|
296
309
|
}>;
|
|
297
310
|
getDisplayablePreviousImpacts(): {
|
|
298
311
|
imageUrl: string | null;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import{f as z,g as r,t as d,h as H,y as n,k as E}from"../chunks/lit-WqMxC_PA.esm.js";import{D as R,S as _,e as j,W as B,f as K,g as F}from"../chunks/routes-Dl-QWRUP.esm.js";import{p as O}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{c as V,d as Y,e as S}from"../chunks/enforce-config-CZ3ToOgr.esm.js";import{u as l,A as y,d as c,a as G,i as p,_ as v}from"../chunks/localize-Btu9xYcE.esm.js";import{c as N}from"../chunks/events-BohmT6Lp.esm.js";import{M as q}from"../chunks/beam-errors-Ci0d3926.esm.js";import"./select-subscription-nonprofit.esm.js";import"./subscription-impact.esm.js";import{partnerLogosConfigDefaults as J}from"./beam-partner-logos.esm.js";import{makeApiKeyHeader as x}from"../utils/makeApiKeyHeader.esm.js";import{_ as $}from"../chunks/loading-template-DG4lkIIc.esm.js";import{c as Q}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../utils/logger.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../utils/local-storage.esm.js";import"../chunks/share-button-CLpGIG3j.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-DVQotZGR.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const g={en:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},fr:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},de:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},es:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},it:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},pl:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"}};var X=Object.defineProperty,i=(M,t,o,s)=>{for(var a=void 0,b=M.length-1,m;b>=0;b--)(m=M[b])&&(a=m(t,o,a)||a);return a&&X(t,o,a),a};const D=3,Z=0,tt=1,et=98;class e extends H{constructor(){super(...arguments),this.baseUrl=R,this.lang="en",this.debug=!1,this.draftConfig=!1,this.activeWidget=null,this.nonprofitId=null,this.beamUserId=null,this.eligibleNonprofits=[],this.showAllTiles=!1,this.isMobile=window.innerWidth<720,this.dropdownVisible=!1,this.emojis=["\u{1F44F}","\u{1F4AA}","\u{1F64C}","\u2728","\u{1F947}"],this.subscriptionDataController=new y(this,this.fetchSubscription),this.eligibleNonprofitsDataController=new y(this,this.fetchEligibleNonprofits),this.personalImpactDataController=new y(this,this.fetchImpact)}get configLang(){return _[this.lang]||"en"}async firstUpdated(){if(!this.email&&!this.partnerUserId)throw new q(["email","partnerUserId"],"One of the following properties needs to be specified: email, partnerUserId ");S(["apiKey","subscriptionId"],this),await this.loadWidget()}async loadWidget(){await Promise.all([this.fetchEligibleNonprofits(),this.fetchSubscription()]),await this.fetchImpact(),this.activeWidget=this.nonprofitId?"subscription-impact":"select-subscription-nonprofit"}async fetchEligibleNonprofits(){S(["apiKey","subscriptionId"],this);const t=await j({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{storeId:this.storeId||void 0,postalCode:this.postalCode||void 0,countryCode:this.countryCode||void 0,widgetName:B.subscription_management,version:"1.0.0"}});return this.storeId=t.store.id,this.eligibleNonprofits=t.nonprofits,this.eligibleNonprofitsDataController.data=t,t}async fetchSubscription(){S(["apiKey","subscriptionId"],this);const t=await K({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{remoteSubscriptionId:this.subscriptionId,email:this.email,partnerUserId:this.partnerUserId}});return this.beamUserId=t.beamUserId,this.nonprofitId=t.nonprofit?.id||null,t}async fetchImpact(){S(["apiKey"],this);const t=await F({baseUrl:this.baseUrl,headers:x(this.apiKey),queryParams:{beamUserId:this.beamUserId?this.beamUserId:void 0,widgetName:"subscription-management",version:"1.0.0",lang:this.configLang}});return this.personalImpactDataController.data=t,t}getDisplayablePreviousImpacts(){const t=this.personalImpactDataController.data?.personal;return!t||t?.length<1?[]:t.filter(o=>!(!o.nonprofit.includeInPersonalImpact||o.nonprofit.id===this.nonprofitId&&(!o.impact.goalCompletionText||o.impact.goalCompletionText?.length<1)))}handleSwapNonprofitButtonClick(){this.activeWidget="select-subscription-nonprofit"}handleBackToSubscriptionImpactButtonClick(){this.activeWidget="subscription-impact"}handleSupportAgainButtonClick(t,o){this.activeWidget="select-subscription-nonprofit",this.selectedNonprofitId=t;const s=new N({selectedNonprofitId:t,nonprofitName:o,source:B.subscription_management});this.dispatchEvent(s)}handleNonprofitSelect(t){if(!(t instanceof N))return;const{selectedNonprofitId:o}=t.detail;this.nonprofitId=o??null,this.activeWidget="subscription-impact"}isNonprofitEligible(t){return this.eligibleNonprofits.some(o=>o.nonprofit.id===t)}shouldDisplayProgressBar(t){return t>tt&&t<et}get cssVariables(){const t={...J,...O,"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"inherit","--beam-textColor":"inherit","--beam-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-borderColor":"#d5d5d5","--beam-SubscriptionManagement-widgetContainer-borderRadius":"4px","--beam-SubscriptionManagement-widgetContainer-padding":"8px 20px","--beam-SubscriptionManagement-widgetContainer-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-maxWidth":"820px","--beam-SubscriptionManagement-logo-align-desktop":"left","--beam-SubscriptionManagement-logo-align-mobile":"center","--beam-SubscriptionManagement-previousImpact-cardStyle":"'selected_icon'","--beam-SubscriptionManagement-header-padding":"10px 20px 10px 0px","--beam-SubscriptionManagement-header-borderRadius":"0px","--beam-SubscriptionManagement-header-backgroundColor":"#fff","--beam-SubscriptionManagement-header-meatballsMenu-fontSize":"24px","--beam-SubscriptionManagement-header-meatballsMenu-color":"24px","--beam-SubscriptionManagement-lineBreak-color":"#ddd","--beam-SubscriptionManagement-lineBreak-width":"1px","--beam-SubscriptionManagement-lineBreak-margin":"10px 0 20px 0","--beam-SubscriptionManagement-tile-marginBottom":"20px","--beam-SubscriptionManagement-tile-border-width":"0px","--beam-SubscriptionManagement-tile-border-color":"#ddd","--beam-SubscriptionManagement-tile-padding":"12.5px","--beam-SubscriptionManagement-tile-borderRadius":"8px","--beam-SubscriptionManagement-tile-background":"#f8fbfb","--beam-SubscriptionManagement-tileContent-gap":" 15px","--beam-SubscriptionManagement-tileContent-padding":"5px 0px","--beam-SubscriptionManagement-tile-icon-borderRadius":"4px","--beam-SubscriptionManagement-tile-icon-height":"28px","--beam-SubscriptionManagement-tile-icon-background-borderRadius":"50%","--beam-SubscriptionManagement-tile-icon-background-width":"50px","--beam-SubscriptionManagement-tile-icon-background-height":"50px","--beam-SubscriptionManagement-tile-icon-background-backgroundColor":"#0a323c","--beam-SubscriptionManagement-tile-icon-background-padding":"10px","--beam-SubscriptionManagement-blockTileDescription-gap":"5px","--beam-SubscriptionManagement-blockTileDescription-padding":"0px","--beam-SubscriptionManagement-blockTileDescription-lineHeight":"130%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-desktop":"60%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-mobile":"100%","--beam-SubscriptionManagement-subWidgetContainer-padding":"0px 0px 10px","--beam-SubscriptionManagement-previousImpactContainer-padding-desktop":"10px 24px 10px 0px","--beam-SubscriptionManagement-previousImpactContainer-padding-mobile":"0px","--beam-SubscriptionManagement-dropDown-padding":"15px 8px","--beam-SubscriptionManagement-dropDown-borderRadius":"8px","--beam-SubscriptionManagement-dropDown-backgroundColor":"#f8fbfb","--beam-SubscriptionManagement-dropDown-boxShadow":"0px 4px 28px 0px rgba(0, 0, 0, 0.04)","--beam-SubscriptionManagement-dropDown-width":"128px","--beam-SubscriptionManagement-dropDown-hover-backgroundColor":"#E1F1EE","--beam-SubscriptionManagement-dropDownOptions-textDecoration":"underline",...c("--beam-SubscriptionManagement-dropDownOptions",{fontSize:"12px",fontWeight:"400",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpactTitle-marginBottom":"15px",...c("--beam-SubscriptionManagement-yourPreviousImpactTitle",{fontSize:"18px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-yourPreviousImpact-showAllButton",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-title-letterSpacing":"0.36px",...c("--beam-SubscriptionManagement-tile-title",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"uppercase",fontStyle:"normal",color:"#0a323c"}),...c("--beam-SubscriptionManagement-tile-description",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),...c("--beam-SubscriptionManagement-tile-via",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),"--beam-SubscriptionManagement-tile-nonprofitLink-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-nonprofitLink",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-supportAgainButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-supportAgainButton",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-progressBarLabel-marginLeft":"8px",...c("--beam-SubscriptionManagement-tile-progressBarLabel",{fontSize:"10px",fontWeight:"bold",fontStyle:"normal",color:"#878a92"}),"--beam-SubscriptionManagement-tile-fundedAmount-lineHeight":"16px",...c("--beam-SubscriptionManagement-tile-fundedAmount",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",fontStyle:"italic",color:"#0a323c"})},o=this.eligibleNonprofitsDataController?.data?.config?.web?.theme||{},s={...t,...o};return Object.assign(Object.create({toCSS(){return G(this)}}),s)}renderPreviousImpactTiles({personalImpact:t,cardStyle:o,eligibleNonprofitConfig:s}){if(!t)return n``;if(!s)return n``;const a=this.showAllTiles?t:t.slice(0,D);let b=0;return n`
|
|
2
|
-
${a.map(m=>{const{impact:{goalCompletionText:u,description:h,goalProgressPercentage:f,goalProgressText:A},nonprofit:{cause:C,causeIconSelectedUrl:L,causeIconUrl:T,website:P,name:I,id:w}}=m,k=this.nonprofitId!==w&&this.isNonprofitEligible(w),U=k&&this.shouldDisplayProgressBar(f),W=u?`${this.emojis[b]} `:"";return b=(b+1)%this.emojis.length,
|
|
1
|
+
import{f as z,g as r,t as d,h as H,y as o,k as E}from"../chunks/lit-WqMxC_PA.esm.js";import{D as R,S as _,d as j,W as B,e as K,g as F}from"../chunks/routes-BnPd0lrO.esm.js";import{p as O}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{c as V,d as Y,e as S}from"../chunks/enforce-config-CZ3ToOgr.esm.js";import{u as l,A as y,d as c,a as G,i as p,_ as v}from"../chunks/localize-Btu9xYcE.esm.js";import{c as N}from"../chunks/events-BohmT6Lp.esm.js";import{M as q}from"../chunks/beam-errors-Ci0d3926.esm.js";import"./select-subscription-nonprofit.esm.js";import"./subscription-impact.esm.js";import{partnerLogosConfigDefaults as J}from"./beam-partner-logos.esm.js";import{makeApiKeyHeader as x}from"../utils/makeApiKeyHeader.esm.js";import{_ as D}from"../chunks/loading-template-DG4lkIIc.esm.js";import{c as Q}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../utils/logger.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../utils/local-storage.esm.js";import"../chunks/share-button-DNyMCeHQ.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-CWFcBlaF.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const g={en:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},fr:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},de:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},es:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},it:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},pl:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"}};var X=Object.defineProperty,i=(M,t,n,s)=>{for(var a=void 0,b=M.length-1,m;b>=0;b--)(m=M[b])&&(a=m(t,n,a)||a);return a&&X(t,n,a),a};const $=3,Z=0,tt=1,et=98;class e extends H{constructor(){super(...arguments),this.baseUrl=R,this.lang="en",this.debug=!1,this.draftConfig=!1,this.activeWidget=null,this.nonprofitId=null,this.beamUserId=null,this.eligibleNonprofits=[],this.showAllTiles=!1,this.isMobile=window.innerWidth<720,this.dropdownVisible=!1,this.emojis=["\u{1F44F}","\u{1F4AA}","\u{1F64C}","\u2728","\u{1F947}"],this.subscriptionDataController=new y(this,this.fetchSubscription),this.eligibleNonprofitsDataController=new y(this,this.fetchEligibleNonprofits),this.personalImpactDataController=new y(this,this.fetchImpact)}get configLang(){return _[this.lang]||"en"}async firstUpdated(){if(!this.email&&!this.partnerUserId)throw new q(["email","partnerUserId"],"One of the following properties needs to be specified: email, partnerUserId ");S(["apiKey","subscriptionId"],this),await this.loadWidget()}async loadWidget(){await Promise.all([this.fetchEligibleNonprofits(),this.fetchSubscription()]),await this.fetchImpact(),this.activeWidget=this.nonprofitId?"subscription-impact":"select-subscription-nonprofit"}async fetchEligibleNonprofits(){S(["apiKey","subscriptionId"],this);const t=await j({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{storeId:this.storeId||void 0,postalCode:this.postalCode||void 0,countryCode:this.countryCode||void 0,widgetName:B.subscription_management,version:"1.0.0"}});return this.storeId=t.store.id,this.eligibleNonprofits=t.nonprofits,this.eligibleNonprofitsDataController.data=t,t}async fetchSubscription(){S(["apiKey","subscriptionId"],this);const t=await K({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{remoteSubscriptionId:this.subscriptionId,email:this.email,partnerUserId:this.partnerUserId}});return this.beamUserId=t.beamUserId,this.nonprofitId=t.nonprofit?.id||null,t}async fetchImpact(){S(["apiKey"],this);const t=await F({baseUrl:this.baseUrl,headers:x(this.apiKey),queryParams:{beamUserId:this.beamUserId?this.beamUserId:void 0,widgetName:"subscription-management",version:"1.0.0",lang:this.configLang}});return this.personalImpactDataController.data=t,t}getDisplayablePreviousImpacts(){const t=this.personalImpactDataController.data?.personal;return!t||t?.length<1?[]:t.filter(n=>!(!n.nonprofit.includeInPersonalImpact||n.nonprofit.id===this.nonprofitId&&(!n.impact.goalCompletionText||n.impact.goalCompletionText?.length<1)))}handleSwapNonprofitButtonClick(){this.activeWidget="select-subscription-nonprofit"}handleBackToSubscriptionImpactButtonClick(){this.activeWidget="subscription-impact"}handleSupportAgainButtonClick(t,n){this.activeWidget="select-subscription-nonprofit",this.selectedNonprofitId=t;const s=new N({selectedNonprofitId:t,nonprofitName:n,source:B.subscription_management});this.dispatchEvent(s)}handleNonprofitSelect(t){if(!(t instanceof N))return;const{selectedNonprofitId:n}=t.detail;this.nonprofitId=n??null,this.activeWidget="subscription-impact"}isNonprofitEligible(t){return this.eligibleNonprofits.some(n=>n.nonprofit.id===t)}shouldDisplayProgressBar(t){return t>tt&&t<et}get cssVariables(){const t={...J,...O,"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"inherit","--beam-textColor":"inherit","--beam-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-borderColor":"#d5d5d5","--beam-SubscriptionManagement-widgetContainer-borderRadius":"4px","--beam-SubscriptionManagement-widgetContainer-padding":"8px 20px","--beam-SubscriptionManagement-widgetContainer-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-maxWidth":"820px","--beam-SubscriptionManagement-logo-align-desktop":"left","--beam-SubscriptionManagement-logo-align-mobile":"center","--beam-SubscriptionManagement-previousImpact-cardStyle":"'selected_icon'","--beam-SubscriptionManagement-header-padding":"10px 20px 10px 0px","--beam-SubscriptionManagement-header-borderRadius":"0px","--beam-SubscriptionManagement-header-backgroundColor":"#fff","--beam-SubscriptionManagement-header-meatballsMenu-fontSize":"24px","--beam-SubscriptionManagement-header-meatballsMenu-color":"24px","--beam-SubscriptionManagement-lineBreak-color":"#ddd","--beam-SubscriptionManagement-lineBreak-width":"1px","--beam-SubscriptionManagement-lineBreak-margin":"10px 0 20px 0","--beam-SubscriptionManagement-tile-marginBottom":"20px","--beam-SubscriptionManagement-tile-border-width":"0px","--beam-SubscriptionManagement-tile-border-color":"#ddd","--beam-SubscriptionManagement-tile-padding":"12.5px","--beam-SubscriptionManagement-tile-borderRadius":"8px","--beam-SubscriptionManagement-tile-background":"#f8fbfb","--beam-SubscriptionManagement-tileContent-gap":" 15px","--beam-SubscriptionManagement-tileContent-padding":"5px 0px","--beam-SubscriptionManagement-tile-icon-borderRadius":"4px","--beam-SubscriptionManagement-tile-icon-height":"28px","--beam-SubscriptionManagement-tile-icon-background-borderRadius":"50%","--beam-SubscriptionManagement-tile-icon-background-width":"50px","--beam-SubscriptionManagement-tile-icon-background-height":"50px","--beam-SubscriptionManagement-tile-icon-background-backgroundColor":"#0a323c","--beam-SubscriptionManagement-tile-icon-background-padding":"10px","--beam-SubscriptionManagement-blockTileDescription-gap":"5px","--beam-SubscriptionManagement-blockTileDescription-padding":"0px","--beam-SubscriptionManagement-blockTileDescription-lineHeight":"130%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-desktop":"60%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-mobile":"100%","--beam-SubscriptionManagement-subWidgetContainer-padding":"0px 0px 10px","--beam-SubscriptionManagement-previousImpactContainer-padding-desktop":"10px 24px 10px 0px","--beam-SubscriptionManagement-previousImpactContainer-padding-mobile":"0px","--beam-SubscriptionManagement-dropDown-padding":"15px 8px","--beam-SubscriptionManagement-dropDown-borderRadius":"8px","--beam-SubscriptionManagement-dropDown-backgroundColor":"#f8fbfb","--beam-SubscriptionManagement-dropDown-boxShadow":"0px 4px 28px 0px rgba(0, 0, 0, 0.04)","--beam-SubscriptionManagement-dropDown-width":"128px","--beam-SubscriptionManagement-dropDown-hover-backgroundColor":"#E1F1EE","--beam-SubscriptionManagement-dropDownOptions-textDecoration":"underline",...c("--beam-SubscriptionManagement-dropDownOptions",{fontSize:"12px",fontWeight:"400",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpactTitle-marginBottom":"15px",...c("--beam-SubscriptionManagement-yourPreviousImpactTitle",{fontSize:"18px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-yourPreviousImpact-showAllButton",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-title-letterSpacing":"0.36px",...c("--beam-SubscriptionManagement-tile-title",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"uppercase",fontStyle:"normal",color:"#0a323c"}),...c("--beam-SubscriptionManagement-tile-description",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),...c("--beam-SubscriptionManagement-tile-via",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),"--beam-SubscriptionManagement-tile-nonprofitLink-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-nonprofitLink",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-supportAgainButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-supportAgainButton",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-progressBarLabel-marginLeft":"8px",...c("--beam-SubscriptionManagement-tile-progressBarLabel",{fontSize:"10px",fontWeight:"bold",fontStyle:"normal",color:"#878a92"}),"--beam-SubscriptionManagement-tile-fundedAmount-lineHeight":"16px",...c("--beam-SubscriptionManagement-tile-fundedAmount",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",fontStyle:"italic",color:"#0a323c"})},n=this.eligibleNonprofitsDataController?.data?.config?.web?.theme||{},s={...t,...n};return Object.assign(Object.create({toCSS(){return G(this)}}),s)}renderPreviousImpactTiles({personalImpact:t,cardStyle:n,eligibleNonprofitConfig:s}){if(!t)return o``;if(!s)return o``;const a=this.showAllTiles?t:t.slice(0,$);let b=0;return o`
|
|
2
|
+
${a.map(m=>{const{impact:{goalCompletionText:u,description:h,goalProgressPercentage:f,goalProgressText:A},nonprofit:{cause:C,causeIconSelectedUrl:L,causeIconUrl:T,website:P,name:I,id:w}}=m,k=this.nonprofitId!==w&&this.isNonprofitEligible(w),U=k&&this.shouldDisplayProgressBar(f),W=u?`${this.emojis[b]} `:"";return b=(b+1)%this.emojis.length,o`
|
|
3
3
|
<div class="tile">
|
|
4
4
|
<div class="tile-header">
|
|
5
5
|
<div class="tile-title">${p(this.configLang,C||"")}</div>
|
|
6
|
-
${k?
|
|
6
|
+
${k?o` <button
|
|
7
7
|
class="tile-support-again button"
|
|
8
8
|
@click="${()=>this.handleSupportAgainButtonClick(w,I)}"
|
|
9
9
|
>
|
|
10
10
|
${p(this.configLang,s?.web?.additionalStrings?.supportAgainButton||"")||g[this.configLang].supportAgainButton()}
|
|
11
|
-
</button>`:
|
|
11
|
+
</button>`:o``}
|
|
12
12
|
</div>
|
|
13
13
|
<div class="tile-content">
|
|
14
14
|
<div class="icon-background">
|
|
15
15
|
<img
|
|
16
|
-
src="${
|
|
16
|
+
src="${n==="'selected_icon'"?L:T}"
|
|
17
17
|
alt="${C}"
|
|
18
18
|
class="icon"
|
|
19
19
|
/>
|
|
@@ -28,12 +28,12 @@ import{f as z,g as r,t as d,h as H,y as n,k as E}from"../chunks/lit-WqMxC_PA.esm
|
|
|
28
28
|
${p(this.configLang,I||"")}
|
|
29
29
|
</a>
|
|
30
30
|
</div>
|
|
31
|
-
${U?
|
|
31
|
+
${U?o` <div
|
|
32
32
|
class="${this.isMobile?"tile-progress-bar-container-mobile":"tile-progress-bar-container-desktop"}"
|
|
33
33
|
>
|
|
34
34
|
<beam-progress-bar value="${f}" style="flex: 1 0;"></beam-progress-bar>
|
|
35
35
|
<span class="details-funding-progress-label">${A}</span>
|
|
36
|
-
</div>`:
|
|
36
|
+
</div>`:o``}
|
|
37
37
|
<div class="funded-times">
|
|
38
38
|
${W}${E(p(this.configLang,u))}
|
|
39
39
|
</div>
|
|
@@ -41,7 +41,7 @@ import{f as z,g as r,t as d,h as H,y as n,k as E}from"../chunks/lit-WqMxC_PA.esm
|
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
`})}
|
|
44
|
-
`}render(){const{data:t,loading:
|
|
44
|
+
`}render(){const{data:t,loading:n,error:s}=this.eligibleNonprofitsDataController;if(n)return D();if(t?.settings?.excludeDonationsForRecurringTransactions)return o``;if(s||t==null)return this.debug?v({error:s||new Error("No data")}):"";let a;const b=this.cssVariables["--beam-SubscriptionManagement-previousImpact-cardStyle"],m=this.cssVariables["--beam-SubscriptionManagement-logo-align-desktop"],u=this.cssVariables["--beam-SubscriptionManagement-logo-align-mobile"],h=this.getDisplayablePreviousImpacts().length??0;if((this.subscriptionDataController.loading||this.eligibleNonprofitsDataController.loading||this.personalImpactDataController.loading)&&D(),(this.subscriptionDataController.error||this.eligibleNonprofitsDataController.error||this.personalImpactDataController.error)&&this.debug){if(this.subscriptionDataController.error!==null)return v({error:this.subscriptionDataController.error});if(this.eligibleNonprofitsDataController.error!==null)return v({error:this.eligibleNonprofitsDataController.error});if(this.personalImpactDataController.error!==null)return v({error:this.personalImpactDataController.error})}else a="";return this.activeWidget==="select-subscription-nonprofit"?a=o` <beam-select-subscription-nonprofit
|
|
45
45
|
part="subscription-nonprofit"
|
|
46
46
|
storeId="${this.storeId}"
|
|
47
47
|
subscriptionId="${this.subscriptionId}"
|
|
@@ -55,7 +55,7 @@ import{f as z,g as r,t as d,h as H,y as n,k as E}from"../chunks/lit-WqMxC_PA.esm
|
|
|
55
55
|
?draftConfig="${this.draftConfig}"
|
|
56
56
|
?debug="${this.debug}"
|
|
57
57
|
@beamnonprofitselect="${f=>this.handleNonprofitSelect(f)}"
|
|
58
|
-
></beam-select-subscription-nonprofit>`:this.activeWidget==="subscription-impact"&&(a=
|
|
58
|
+
></beam-select-subscription-nonprofit>`:this.activeWidget==="subscription-impact"&&(a=o`
|
|
59
59
|
<beam-subscription-impact
|
|
60
60
|
part="subscription-impact"
|
|
61
61
|
baseUrl="${this.baseUrl}"
|
|
@@ -67,7 +67,7 @@ import{f as z,g as r,t as d,h as H,y as n,k as E}from"../chunks/lit-WqMxC_PA.esm
|
|
|
67
67
|
?draftConfig="${this.draftConfig}"
|
|
68
68
|
?debug="${this.debug}"
|
|
69
69
|
></beam-subscription-impact>
|
|
70
|
-
`),
|
|
70
|
+
`),o`
|
|
71
71
|
<style>
|
|
72
72
|
:host {
|
|
73
73
|
${this.cssVariables.toCSS()}
|
|
@@ -84,23 +84,23 @@ import{f as z,g as r,t as d,h as H,y as n,k as E}from"../chunks/lit-WqMxC_PA.esm
|
|
|
84
84
|
partnerLogoUrl="${this.eligibleNonprofitsDataController.data?.chain.logoUrl}"
|
|
85
85
|
></beam-partner-logos>
|
|
86
86
|
</div>
|
|
87
|
-
${this.nonprofitId?
|
|
87
|
+
${this.nonprofitId?o` <div class="meatballsMenu" @click="${()=>this.dropdownVisible=!this.dropdownVisible}">
|
|
88
88
|
<span>…</span>
|
|
89
89
|
<div class="dropdown-container ${this.dropdownVisible?"visible":""}">
|
|
90
|
-
${this.activeWidget==="select-subscription-nonprofit"?
|
|
90
|
+
${this.activeWidget==="select-subscription-nonprofit"?o`<button
|
|
91
91
|
@click="${this.handleBackToSubscriptionImpactButtonClick}"
|
|
92
92
|
class="drop-down-options button"
|
|
93
93
|
>
|
|
94
94
|
${p(this.configLang,t?.config?.web?.additionalStrings?.previousNonprofitButtonText||"")||g[this.configLang].previousNonprofitButton()}
|
|
95
|
-
</button>`:this.activeWidget==="subscription-impact"?
|
|
95
|
+
</button>`:this.activeWidget==="subscription-impact"?o`<button @click="${this.handleSwapNonprofitButtonClick}" class="drop-down-options button">
|
|
96
96
|
${p(this.configLang,t?.config?.web?.additionalStrings?.changeNonprofitButtonText||"")||g[this.configLang].changeNonprofitButton()}
|
|
97
97
|
</button>`:""}
|
|
98
98
|
</div>
|
|
99
|
-
</div>`:
|
|
99
|
+
</div>`:o``}
|
|
100
100
|
</div>
|
|
101
101
|
</div>
|
|
102
102
|
<div class="sub-widget-container" part="previous-impact">${a}</div>
|
|
103
|
-
${h>Z?
|
|
103
|
+
${h>Z?o` <div class="line-break"></div>
|
|
104
104
|
|
|
105
105
|
<div
|
|
106
106
|
class="previous-impact-container ${this.isMobile?"--beam-SubscriptionManagement-previousImpactContainer-padding-mobile":"--beam-SubscriptionManagement-previousImpactContainer-padding-desktop"}"
|
|
@@ -111,7 +111,7 @@ import{f as z,g as r,t as d,h as H,y as n,k as E}from"../chunks/lit-WqMxC_PA.esm
|
|
|
111
111
|
<div class="cardGrid">
|
|
112
112
|
${this.renderPreviousImpactTiles({personalImpact:this.getDisplayablePreviousImpacts(),cardStyle:b,eligibleNonprofitConfig:this.eligibleNonprofitsDataController.data?.config})}
|
|
113
113
|
</div>
|
|
114
|
-
${h
|
|
114
|
+
${h>$?o`
|
|
115
115
|
<div class="previous-impact-link-container">
|
|
116
116
|
<button
|
|
117
117
|
@click="${()=>this.showAllTiles=!this.showAllTiles}"
|
|
@@ -120,8 +120,8 @@ import{f as z,g as r,t as d,h as H,y as n,k as E}from"../chunks/lit-WqMxC_PA.esm
|
|
|
120
120
|
${this.showAllTiles?p(this.configLang,t?.config?.web?.additionalStrings?.showLessButton||"")||g[this.configLang].showLessButton():p(this.configLang,t?.config?.web?.additionalStrings?.showAllButton||"")||g[this.configLang].showAllButton()}
|
|
121
121
|
</button>
|
|
122
122
|
</div>
|
|
123
|
-
`:
|
|
124
|
-
</div>`:
|
|
123
|
+
`:o``}
|
|
124
|
+
</div>`:o``}
|
|
125
125
|
</div>
|
|
126
126
|
`}}e.tagName="beam-subscription-management",e.styles=[V,z`
|
|
127
127
|
:host {
|