@flarehr/apollo-super-selection 1.3.43303 → 1.3.43309

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.
@@ -1 +1 @@
1
- System.register(["./p-44bec843.system.js","./p-14885f78.system.js","./p-15f0e5eb.system.js"],(function(e,s){"use strict";var t,i,o;return{setters:[function(e){t=e.p;i=e.b},function(){},function(e){o=e.g}],execute:function(){var e=function(){var e=s.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return t(i)};e().then((function(e){o();return i([["p-6ac8791e.system",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["p-02f24922.system",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["p-ef3afa00.system",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["p-f29066b9.system",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["p-51aefdb1.system",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["p-d617a46a.system",[[0,"sss-prefill",{history:[16],prefill:[32]}],[0,"sss-my-own-fund",{history:[16],formState:[32],isNotAllInformationProvidedMessageVisible:[32],isSubmitDisabled:[32]}],[0,"sss-self-managed-fund",{history:[16],formState:[32],isSubmitDisabled:[32]}],[0,"sss-super-choice-page",{history:[16],promotedFunds:[32]}],[1,"super-selection-app-host",{sessionState:[32],jwt:[32],appConfiguration:[32],ignoreExistingSelection:[32]}],[0,"sss-default-fund",{history:[16],defaultFundProductName:[32]}],[0,"sss-consent-page",{history:[16],campaignConnectRequestInProgress:[32]}],[0,"sss-existing-choice-page",{history:[16],existingFund:[32]}],[0,"sss-standard-choice-form",{history:[16],standardChoiceFormSignature:[32],formState:[32],isSubmitDisabled:[32]}],[0,"sss-promoted-fund-join-v1-page",{history:[16]}],[0,"sss-promoted-fund-join-v2-page",{history:[16]}],[0,"sss-slate-join-page",{history:[16]}],[0,"sss-success"],[0,"sss-super-campaign-host",{componentLoaded:[32],backendUrl:[32],accessToken:[32]}],[0,"sss-prefill-my-own-fund",{history:[16],prefill:[16],mode:[32],formState:[32],isSubmitDisabled:[32],fundUsi:[32],fundName:[32],memberNumber:[32],memberGivenNames:[32],memberLastName:[32]}],[0,"sss-prefill-smsf",{history:[16],prefill:[16],mode:[32],formState:[32],isSubmitDisabled:[32],fundName:[32],fundAbn:[32],fundEsa:[32],fundAddressLine1:[32],fundAddressLine2:[32],fundAddressCity:[32],fundAddressPostcode:[32],fundAddressState:[32],fundAddress:[32],memberGivenNames:[32],memberLastName:[32],bankAccountName:[32],bankName:[32],bankAccountBsb:[32],bankAccountNumber:[32]}],[0,"sss-prefill-invalid-my-own-fund",{history:[16],prefill:[16],fundUsi:[32],fundName:[32],memberNumber:[32],memberGivenNames:[32],memberLastName:[32]}],[0,"sss-prefill-invalid-smsf",{history:[16],prefill:[16],fundName:[32],fundAbn:[32],fundEsa:[32],fundAddressLine1:[32],fundAddressLine2:[32],fundAddressCity:[32],fundAddressPostcode:[32],fundAddressState:[32],fundAddress:[32],memberGivenNames:[32],memberLastName:[32],bankAccountName:[32],bankAccountBsb:[32],bankAccountNumber:[32]}],[1,"super-selection-app",{ignoreExistingSelection:[4,"ignore-existing-selection"],accessToken:[1,"access-token"],backendUrl:[1,"backend-url"],appBaseUrl:[1,"app-base-url"],history:[16],location:[16],isSelfHosted:[4,"is-self-hosted"],isAppInitialised:[32]}],[0,"sss-my-own-fund-inputs",{myOwnFundForm:[16],showValidationErrors:[4,"show-validation-errors"],selectedOption:[32]}],[0,"sss-loading-super-indicator"],[0,"sss-self-managed-fund-inputs",{fundForm:[16],showValidationErrors:[4,"show-validation-errors"],isAbnValid:[32],isAbnTouched:[32],isAbnUsedForRegulated:[32],currentBank:[32],addressErrorMessage:[32]}],[0,"sss-super-choice-item-bottom",{disclaimer:[16],abnInfo:[1,"abn-info"],abn:[1],isMultiFund:[4,"is-multi-fund"]}],[0,"sss-loading-page"],[0,"sss-super-choice-item-top",{name:[1],logo:[1],features:[16],featureSubText:[16],customContent:[16],isMultiFund:[4,"is-multi-fund"],isPromotedDefault:[4,"is-promoted-default"],extraBadge:[16]}],[4,"sss-loading-component",{header:[1]}],[0,"sss-dropdown-async",{placeholder:[1],searchFunction:[16],value:[16],required:[4],requiredValidationMessage:[1,"required-validation-message"],disabled:[4],minSearchStringLength:[2,"min-search-string-length"],showValidationErrors:[4,"show-validation-errors"],searchState:[32],inputValue:[32],isDropdownVisible:[32],filteredOptions:[32],highlightedOptionIndex:[32],selectedOption:[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]],[0,"sss-footer-section",{textOverride:[16]}],[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}],[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}],[4,"sss-custom-fund",{history:[16],currentCustomFund:[32],fundOptionsList:[32],showFundOptionsSelection:[32]}],[0,"sss-iframe-host",{build:[16]}],[0,"sss-prefill-warning-box",{notificationList:[16]}],[0,"sss-header-section",{currentPage:[1,"current-page"]}],[0,"sss-name-input",{value:[1],name:[1],readableName:[1,"readable-name"],showValidationErrors:[4,"show-validation-errors"],errorMessage:[32]}],[0,"sss-prefill-display-field",{field:[16]}],[0,"sss-prefill-error-box",{withHeader:[4,"with-header"],notificationList:[16]}],[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}],[4,"sss-button",{fillWidth:[4,"fill-width"],fillWidthOnMobile:[4,"fill-width-on-mobile"],disabled:[4],variant:[1],size:[1],promiseFn:[16],state:[32]}],[0,"sss-loading-indicator",{theme:[1],size:[2]}],[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}]]]],e)}))}}}));
1
+ System.register(["./p-44bec843.system.js","./p-14885f78.system.js","./p-15f0e5eb.system.js"],(function(e,s){"use strict";var t,i,o;return{setters:[function(e){t=e.p;i=e.b},function(){},function(e){o=e.g}],execute:function(){var e=function(){var e=s.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return t(i)};e().then((function(e){o();return i([["p-6ac8791e.system",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["p-02f24922.system",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["p-ef3afa00.system",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["p-f29066b9.system",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["p-51aefdb1.system",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["p-2a3ea368.system",[[0,"sss-prefill",{history:[16],prefill:[32]}],[0,"sss-my-own-fund",{history:[16],formState:[32],isNotAllInformationProvidedMessageVisible:[32],isSubmitDisabled:[32]}],[0,"sss-self-managed-fund",{history:[16],formState:[32],isSubmitDisabled:[32]}],[0,"sss-super-choice-page",{history:[16],promotedFunds:[32]}],[1,"super-selection-app-host",{sessionState:[32],jwt:[32],appConfiguration:[32],ignoreExistingSelection:[32]}],[0,"sss-default-fund",{history:[16],defaultFundProductName:[32]}],[0,"sss-consent-page",{history:[16],campaignConnectRequestInProgress:[32]}],[0,"sss-existing-choice-page",{history:[16],existingFund:[32]}],[0,"sss-standard-choice-form",{history:[16],standardChoiceFormSignature:[32],formState:[32],isSubmitDisabled:[32]}],[0,"sss-promoted-fund-join-v1-page",{history:[16]}],[0,"sss-promoted-fund-join-v2-page",{history:[16]}],[0,"sss-slate-join-page",{history:[16]}],[0,"sss-success"],[0,"sss-super-campaign-host",{componentLoaded:[32],backendUrl:[32],accessToken:[32]}],[0,"sss-prefill-my-own-fund",{history:[16],prefill:[16],mode:[32],formState:[32],isSubmitDisabled:[32],fundUsi:[32],fundName:[32],memberNumber:[32],memberGivenNames:[32],memberLastName:[32]}],[0,"sss-prefill-smsf",{history:[16],prefill:[16],mode:[32],formState:[32],isSubmitDisabled:[32],fundName:[32],fundAbn:[32],fundEsa:[32],fundAddressLine1:[32],fundAddressLine2:[32],fundAddressCity:[32],fundAddressPostcode:[32],fundAddressState:[32],fundAddress:[32],memberGivenNames:[32],memberLastName:[32],bankAccountName:[32],bankName:[32],bankAccountBsb:[32],bankAccountNumber:[32]}],[0,"sss-prefill-invalid-my-own-fund",{history:[16],prefill:[16],fundUsi:[32],fundName:[32],memberNumber:[32],memberGivenNames:[32],memberLastName:[32]}],[0,"sss-prefill-invalid-smsf",{history:[16],prefill:[16],fundName:[32],fundAbn:[32],fundEsa:[32],fundAddressLine1:[32],fundAddressLine2:[32],fundAddressCity:[32],fundAddressPostcode:[32],fundAddressState:[32],fundAddress:[32],memberGivenNames:[32],memberLastName:[32],bankAccountName:[32],bankAccountBsb:[32],bankAccountNumber:[32]}],[1,"super-selection-app",{ignoreExistingSelection:[4,"ignore-existing-selection"],accessToken:[1,"access-token"],backendUrl:[1,"backend-url"],appBaseUrl:[1,"app-base-url"],history:[16],location:[16],isSelfHosted:[4,"is-self-hosted"],isAppInitialised:[32]}],[0,"sss-my-own-fund-inputs",{myOwnFundForm:[16],showValidationErrors:[4,"show-validation-errors"],selectedOption:[32]}],[0,"sss-loading-super-indicator"],[0,"sss-self-managed-fund-inputs",{fundForm:[16],showValidationErrors:[4,"show-validation-errors"],isAbnValid:[32],isAbnTouched:[32],isAbnUsedForRegulated:[32],currentBank:[32],addressErrorMessage:[32]}],[0,"sss-super-choice-item-bottom",{disclaimer:[16],abnInfo:[1,"abn-info"],abn:[1],isMultiFund:[4,"is-multi-fund"]}],[0,"sss-loading-page"],[0,"sss-super-choice-item-top",{name:[1],logo:[1],features:[16],featureSubText:[16],customContent:[16],isMultiFund:[4,"is-multi-fund"],isPromotedDefault:[4,"is-promoted-default"],extraBadge:[16]}],[4,"sss-loading-component",{header:[1]}],[0,"sss-dropdown-async",{placeholder:[1],searchFunction:[16],value:[16],required:[4],requiredValidationMessage:[1,"required-validation-message"],disabled:[4],minSearchStringLength:[2,"min-search-string-length"],showValidationErrors:[4,"show-validation-errors"],searchState:[32],inputValue:[32],isDropdownVisible:[32],filteredOptions:[32],highlightedOptionIndex:[32],selectedOption:[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]],[0,"sss-footer-section",{textOverride:[16]}],[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}],[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}],[4,"sss-custom-fund",{history:[16],currentCustomFund:[32],fundOptionsList:[32],showFundOptionsSelection:[32]}],[0,"sss-iframe-host",{build:[16]}],[0,"sss-prefill-warning-box",{notificationList:[16]}],[0,"sss-header-section",{currentPage:[1,"current-page"]}],[0,"sss-name-input",{value:[1],name:[1],readableName:[1,"readable-name"],showValidationErrors:[4,"show-validation-errors"],errorMessage:[32]}],[0,"sss-prefill-display-field",{field:[16]}],[0,"sss-prefill-error-box",{withHeader:[4,"with-header"],notificationList:[16]}],[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}],[4,"sss-button",{fillWidth:[4,"fill-width"],fillWidthOnMobile:[4,"fill-width-on-mobile"],disabled:[4],variant:[1],size:[1],promiseFn:[16],state:[32]}],[0,"sss-loading-indicator",{theme:[1],size:[2]}],[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}]]]],e)}))}}}));
@@ -284,7 +284,7 @@ class TapSubscriber extends datoramaAkita.Subscriber {
284
284
  }
285
285
  }
286
286
 
287
- const AppVersion = '1.3.43303';
287
+ const AppVersion = '1.3.43309';
288
288
 
289
289
  // -------------------------------------------------------------------------------------
290
290
  // guards
@@ -16813,6 +16813,33 @@ const Success = class {
16813
16813
  }
16814
16814
  };
16815
16815
 
16816
+ const chooseAnotherFundRequestedEventHandler = (event) => {
16817
+ if (event.sender != 'super-campaign') {
16818
+ // eslint-disable-next-line no-console
16819
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16820
+ }
16821
+ return Promise.resolve();
16822
+ };
16823
+ const fundPanelShownEventHandler = (event) => {
16824
+ if (event.sender != 'super-campaign') {
16825
+ // eslint-disable-next-line no-console
16826
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16827
+ }
16828
+ return Promise.resolve();
16829
+ };
16830
+ const fundTileClicked = (event) => {
16831
+ if (event.sender != 'super-campaign') {
16832
+ // eslint-disable-next-line no-console
16833
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16834
+ }
16835
+ return Promise.resolve();
16836
+ };
16837
+ const eventHandlers = {
16838
+ 'choose-another-fund-requested': chooseAnotherFundRequestedEventHandler,
16839
+ 'fund-panel-shown': fundPanelShownEventHandler,
16840
+ 'fund-tile-clicked': fundTileClicked
16841
+ };
16842
+
16816
16843
  const SuperCampaignHost = class {
16817
16844
  constructor(hostRef) {
16818
16845
  index.registerInstance(this, hostRef);
@@ -16829,6 +16856,16 @@ const SuperCampaignHost = class {
16829
16856
  return 'autodev';
16830
16857
  }
16831
16858
  };
16859
+ this.subscribeToSuperCampaignEvents = () => {
16860
+ for (const eventName in eventHandlers) {
16861
+ document.addEventListener(eventName, eventHandlers[eventName]);
16862
+ }
16863
+ };
16864
+ this.unSubscribeFromSuperCampaignEvents = () => {
16865
+ for (const eventName in eventHandlers) {
16866
+ document.removeEventListener(eventName, eventHandlers[eventName]);
16867
+ }
16868
+ };
16832
16869
  }
16833
16870
  async componentWillLoad() {
16834
16871
  try {
@@ -16836,7 +16873,9 @@ const SuperCampaignHost = class {
16836
16873
  Option.isSome(superSelectionAppService.state.jwt)) {
16837
16874
  this.backendUrl = this.getBaseUrl(superSelectionAppService.state.apiBaseUrl.value);
16838
16875
  this.accessToken = superSelectionAppService.state.jwt.value;
16876
+ this.unSubscribeFromSuperCampaignEvents();
16839
16877
  await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(this.createApolloSuperCampaignScriptUrl(this.getEnvironmentTag()))); });
16878
+ this.subscribeToSuperCampaignEvents();
16840
16879
  this.componentLoaded = true;
16841
16880
  }
16842
16881
  else {
@@ -16849,6 +16888,9 @@ const SuperCampaignHost = class {
16849
16888
  console.error('Error loading component:', error);
16850
16889
  }
16851
16890
  }
16891
+ disconnectedCallback() {
16892
+ this.unSubscribeFromSuperCampaignEvents();
16893
+ }
16852
16894
  render() {
16853
16895
  return (index.h("div", null, this.componentLoaded ? (index.h("apollo-super-campaign", { "backend-url": this.backendUrl, "access-token": this.accessToken })) : null));
16854
16896
  }
@@ -0,0 +1,26 @@
1
+ const chooseAnotherFundRequestedEventHandler = (event) => {
2
+ if (event.sender != 'super-campaign') {
3
+ // eslint-disable-next-line no-console
4
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
5
+ }
6
+ return Promise.resolve();
7
+ };
8
+ const fundPanelShownEventHandler = (event) => {
9
+ if (event.sender != 'super-campaign') {
10
+ // eslint-disable-next-line no-console
11
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
12
+ }
13
+ return Promise.resolve();
14
+ };
15
+ const fundTileClicked = (event) => {
16
+ if (event.sender != 'super-campaign') {
17
+ // eslint-disable-next-line no-console
18
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
19
+ }
20
+ return Promise.resolve();
21
+ };
22
+ export const eventHandlers = {
23
+ 'choose-another-fund-requested': chooseAnotherFundRequestedEventHandler,
24
+ 'fund-panel-shown': fundPanelShownEventHandler,
25
+ 'fund-tile-clicked': fundTileClicked
26
+ };
@@ -1,6 +1,7 @@
1
1
  import { Component, h, State } from '@stencil/core';
2
2
  import { isSome } from 'fp-ts/lib/Option';
3
3
  import superSelectionAppService from '../super-selection-app/services/super-selection-app.service';
4
+ import { eventHandlers as superCampaignEventHandlers } from './super-campaign-event-handlers';
4
5
  export class SuperCampaignHost {
5
6
  constructor() {
6
7
  this.componentLoaded = false;
@@ -16,6 +17,16 @@ export class SuperCampaignHost {
16
17
  return 'autodev';
17
18
  }
18
19
  };
20
+ this.subscribeToSuperCampaignEvents = () => {
21
+ for (const eventName in superCampaignEventHandlers) {
22
+ document.addEventListener(eventName, superCampaignEventHandlers[eventName]);
23
+ }
24
+ };
25
+ this.unSubscribeFromSuperCampaignEvents = () => {
26
+ for (const eventName in superCampaignEventHandlers) {
27
+ document.removeEventListener(eventName, superCampaignEventHandlers[eventName]);
28
+ }
29
+ };
19
30
  }
20
31
  async componentWillLoad() {
21
32
  try {
@@ -23,7 +34,9 @@ export class SuperCampaignHost {
23
34
  isSome(superSelectionAppService.state.jwt)) {
24
35
  this.backendUrl = this.getBaseUrl(superSelectionAppService.state.apiBaseUrl.value);
25
36
  this.accessToken = superSelectionAppService.state.jwt.value;
37
+ this.unSubscribeFromSuperCampaignEvents();
26
38
  await import(this.createApolloSuperCampaignScriptUrl(this.getEnvironmentTag()));
39
+ this.subscribeToSuperCampaignEvents();
27
40
  this.componentLoaded = true;
28
41
  }
29
42
  else {
@@ -36,6 +49,9 @@ export class SuperCampaignHost {
36
49
  console.error('Error loading component:', error);
37
50
  }
38
51
  }
52
+ disconnectedCallback() {
53
+ this.unSubscribeFromSuperCampaignEvents();
54
+ }
39
55
  render() {
40
56
  return (h("div", null, this.componentLoaded ? (h("apollo-super-campaign", { "backend-url": this.backendUrl, "access-token": this.accessToken })) : null));
41
57
  }
@@ -260,7 +260,7 @@ class TapSubscriber extends Subscriber {
260
260
  }
261
261
  }
262
262
 
263
- const AppVersion = '1.3.43303';
263
+ const AppVersion = '1.3.43309';
264
264
 
265
265
  // -------------------------------------------------------------------------------------
266
266
  // guards
@@ -16789,6 +16789,33 @@ const Success = class {
16789
16789
  }
16790
16790
  };
16791
16791
 
16792
+ const chooseAnotherFundRequestedEventHandler = (event) => {
16793
+ if (event.sender != 'super-campaign') {
16794
+ // eslint-disable-next-line no-console
16795
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16796
+ }
16797
+ return Promise.resolve();
16798
+ };
16799
+ const fundPanelShownEventHandler = (event) => {
16800
+ if (event.sender != 'super-campaign') {
16801
+ // eslint-disable-next-line no-console
16802
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16803
+ }
16804
+ return Promise.resolve();
16805
+ };
16806
+ const fundTileClicked = (event) => {
16807
+ if (event.sender != 'super-campaign') {
16808
+ // eslint-disable-next-line no-console
16809
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16810
+ }
16811
+ return Promise.resolve();
16812
+ };
16813
+ const eventHandlers = {
16814
+ 'choose-another-fund-requested': chooseAnotherFundRequestedEventHandler,
16815
+ 'fund-panel-shown': fundPanelShownEventHandler,
16816
+ 'fund-tile-clicked': fundTileClicked
16817
+ };
16818
+
16792
16819
  const SuperCampaignHost = class {
16793
16820
  constructor(hostRef) {
16794
16821
  registerInstance(this, hostRef);
@@ -16805,6 +16832,16 @@ const SuperCampaignHost = class {
16805
16832
  return 'autodev';
16806
16833
  }
16807
16834
  };
16835
+ this.subscribeToSuperCampaignEvents = () => {
16836
+ for (const eventName in eventHandlers) {
16837
+ document.addEventListener(eventName, eventHandlers[eventName]);
16838
+ }
16839
+ };
16840
+ this.unSubscribeFromSuperCampaignEvents = () => {
16841
+ for (const eventName in eventHandlers) {
16842
+ document.removeEventListener(eventName, eventHandlers[eventName]);
16843
+ }
16844
+ };
16808
16845
  }
16809
16846
  async componentWillLoad() {
16810
16847
  try {
@@ -16812,7 +16849,9 @@ const SuperCampaignHost = class {
16812
16849
  Option.isSome(superSelectionAppService.state.jwt)) {
16813
16850
  this.backendUrl = this.getBaseUrl(superSelectionAppService.state.apiBaseUrl.value);
16814
16851
  this.accessToken = superSelectionAppService.state.jwt.value;
16852
+ this.unSubscribeFromSuperCampaignEvents();
16815
16853
  await import(this.createApolloSuperCampaignScriptUrl(this.getEnvironmentTag()));
16854
+ this.subscribeToSuperCampaignEvents();
16816
16855
  this.componentLoaded = true;
16817
16856
  }
16818
16857
  else {
@@ -16825,6 +16864,9 @@ const SuperCampaignHost = class {
16825
16864
  console.error('Error loading component:', error);
16826
16865
  }
16827
16866
  }
16867
+ disconnectedCallback() {
16868
+ this.unSubscribeFromSuperCampaignEvents();
16869
+ }
16828
16870
  render() {
16829
16871
  return (h("div", null, this.componentLoaded ? (h("apollo-super-campaign", { "backend-url": this.backendUrl, "access-token": this.accessToken })) : null));
16830
16872
  }