@flarehr/apollo-super-selection 4.54.43093 → 4.55.43666

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.
Files changed (21) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  2. package/dist/lib/apollo-super-selection/p-06c394ee.system.entry.js +69 -0
  3. package/dist/lib/apollo-super-selection/p-90e363b7.entry.js +14 -0
  4. package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
  5. package/dist/lib/cjs/sss-button_41.cjs.entry.js +46 -26
  6. package/dist/lib/collection/components/super-campaign/super-campaign-event-handlers.js +26 -0
  7. package/dist/lib/collection/components/super-campaign/super-campaign-types.js +1 -0
  8. package/dist/lib/collection/components/super-campaign/super-campaign.js +16 -0
  9. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.js +3 -5
  10. package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +0 -20
  11. package/dist/lib/esm/sss-button_41.entry.js +46 -26
  12. package/dist/lib/esm-es5/sss-button_41.entry.js +4 -4
  13. package/dist/lib/types/components/super-campaign/super-campaign-event-handlers.d.ts +2 -0
  14. package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +30 -0
  15. package/dist/lib/types/components/super-campaign/super-campaign.d.ts +3 -0
  16. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +0 -28
  17. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-types.d.ts +1 -0
  18. package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +0 -4
  19. package/package.json +1 -1
  20. package/dist/lib/apollo-super-selection/p-4e5b95c3.system.entry.js +0 -69
  21. package/dist/lib/apollo-super-selection/p-89d1f1eb.entry.js +0 -14
@@ -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-4e5b95c3.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-06c394ee.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 = '4.54.43093';
287
+ const AppVersion = '4.55.43666';
288
288
 
289
289
  // -------------------------------------------------------------------------------------
290
290
  // guards
@@ -3689,31 +3689,11 @@ class EventTrackingService {
3689
3689
  static get Instance() {
3690
3690
  return this.instance || (this.instance = new this());
3691
3691
  }
3692
- async TrackFinancialProductViewedAsync(detail) {
3693
- return this.trackEventAsync({
3694
- FinancialProductViewed: detail
3695
- });
3696
- }
3697
3692
  async TrackSuperFundPdsViewedAsync(detail) {
3698
3693
  return this.trackEventAsync({
3699
3694
  SuperFundPdsViewed: detail
3700
3695
  });
3701
3696
  }
3702
- async TrackFinancialProductAcceptedAsync(detail) {
3703
- return this.trackEventAsync({
3704
- FinancialProductAccepted: detail
3705
- });
3706
- }
3707
- async TrackFinancialProductRejectedAsync(detail) {
3708
- return this.trackEventAsync({
3709
- FinancialProductRejected: detail
3710
- });
3711
- }
3712
- async TrackSuperFundPrivacyConfirmationAcceptedAsync(detail) {
3713
- return this.trackEventAsync({
3714
- SuperFundPrivacyConfirmationAccepted: detail
3715
- });
3716
- }
3717
3697
  async TrackPromotedSuperFundDetailViewedAsync(detail) {
3718
3698
  return this.trackEventAsync({
3719
3699
  SuperFundDetailViewed: {
@@ -16122,7 +16102,7 @@ class PromotedFundJoinV2IFrameBuilder {
16122
16102
  build(iframe$1, history) {
16123
16103
  if (!(iframe$1 === null || iframe$1 === void 0 ? void 0 : iframe$1.contentDocument))
16124
16104
  return;
16125
- const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: state.fund.id, authToken: superSelectionAppService.jwt, employerDefault: state.fund.type === 'PromotedDefault' });
16105
+ const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: state.fund.id, authToken: superSelectionAppService.jwt, employerDefault: state.fund.type === 'PromotedDefault', definedBenefitsEligibility: Option.toUndefined(superSelectionAppService.isDefinedBenefitsEligible) });
16126
16106
  const handleMessage = async (event) => {
16127
16107
  const { data } = event;
16128
16108
  if (!data) {
@@ -16310,13 +16290,11 @@ class PromotedFundJoinV2IFrameBuilder {
16310
16290
  if (value !== undefined) {
16311
16291
  const input = document.createElement('input');
16312
16292
  input.name = prop;
16293
+ input.type = 'hidden';
16313
16294
  if (typeof value === 'boolean') {
16314
- input.type = 'checkbox';
16315
- input.checked = value;
16316
- input.style.visibility = 'hidden';
16295
+ input.value = value ? 'true' : 'false';
16317
16296
  }
16318
16297
  else {
16319
- input.type = 'hidden';
16320
16298
  input.value = value;
16321
16299
  }
16322
16300
  form.append(input);
@@ -16833,6 +16811,33 @@ const Success = class {
16833
16811
  }
16834
16812
  };
16835
16813
 
16814
+ const chooseAnotherFundRequestedEventHandler = (event) => {
16815
+ if (event.sender != 'super-campaign') {
16816
+ // eslint-disable-next-line no-console
16817
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16818
+ }
16819
+ return Promise.resolve();
16820
+ };
16821
+ const fundPanelShownEventHandler = (event) => {
16822
+ if (event.sender != 'super-campaign') {
16823
+ // eslint-disable-next-line no-console
16824
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16825
+ }
16826
+ return Promise.resolve();
16827
+ };
16828
+ const fundTileClicked = (event) => {
16829
+ if (event.sender != 'super-campaign') {
16830
+ // eslint-disable-next-line no-console
16831
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16832
+ }
16833
+ return Promise.resolve();
16834
+ };
16835
+ const eventHandlers = {
16836
+ 'choose-another-fund-requested': chooseAnotherFundRequestedEventHandler,
16837
+ 'fund-panel-shown': fundPanelShownEventHandler,
16838
+ 'fund-tile-clicked': fundTileClicked
16839
+ };
16840
+
16836
16841
  const SuperCampaignHost = class {
16837
16842
  constructor(hostRef) {
16838
16843
  index.registerInstance(this, hostRef);
@@ -16849,6 +16854,16 @@ const SuperCampaignHost = class {
16849
16854
  return 'autodev';
16850
16855
  }
16851
16856
  };
16857
+ this.subscribeToSuperCampaignEvents = () => {
16858
+ for (const eventName in eventHandlers) {
16859
+ document.addEventListener(eventName, eventHandlers[eventName]);
16860
+ }
16861
+ };
16862
+ this.unSubscribeFromSuperCampaignEvents = () => {
16863
+ for (const eventName in eventHandlers) {
16864
+ document.removeEventListener(eventName, eventHandlers[eventName]);
16865
+ }
16866
+ };
16852
16867
  }
16853
16868
  async componentWillLoad() {
16854
16869
  try {
@@ -16856,7 +16871,9 @@ const SuperCampaignHost = class {
16856
16871
  Option.isSome(superSelectionAppService.state.jwt)) {
16857
16872
  this.backendUrl = this.getBaseUrl(superSelectionAppService.state.apiBaseUrl.value);
16858
16873
  this.accessToken = superSelectionAppService.state.jwt.value;
16874
+ this.unSubscribeFromSuperCampaignEvents();
16859
16875
  await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(this.createApolloSuperCampaignScriptUrl(this.getEnvironmentTag()))); });
16876
+ this.subscribeToSuperCampaignEvents();
16860
16877
  this.componentLoaded = true;
16861
16878
  }
16862
16879
  else {
@@ -16869,6 +16886,9 @@ const SuperCampaignHost = class {
16869
16886
  console.error('Error loading component:', error);
16870
16887
  }
16871
16888
  }
16889
+ disconnectedCallback() {
16890
+ this.unSubscribeFromSuperCampaignEvents();
16891
+ }
16872
16892
  render() {
16873
16893
  return (index.h("div", null, this.componentLoaded ? (index.h("apollo-super-campaign", { "backend-url": this.backendUrl, "access-token": this.accessToken })) : null));
16874
16894
  }
@@ -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
  }
@@ -41,7 +41,7 @@ class PromotedFundJoinV2IFrameBuilder {
41
41
  build(iframe, history) {
42
42
  if (!(iframe === null || iframe === void 0 ? void 0 : iframe.contentDocument))
43
43
  return;
44
- const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: promotedFundState.fund.id, authToken: superSelectionAppService.jwt, employerDefault: promotedFundState.fund.type === 'PromotedDefault' });
44
+ const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: promotedFundState.fund.id, authToken: superSelectionAppService.jwt, employerDefault: promotedFundState.fund.type === 'PromotedDefault', definedBenefitsEligibility: O.toUndefined(superSelectionAppService.isDefinedBenefitsEligible) });
45
45
  const handleMessage = async (event) => {
46
46
  const { data } = event;
47
47
  if (!data) {
@@ -233,13 +233,11 @@ class PromotedFundJoinV2IFrameBuilder {
233
233
  if (value !== undefined) {
234
234
  const input = document.createElement('input');
235
235
  input.name = prop;
236
+ input.type = 'hidden';
236
237
  if (typeof value === 'boolean') {
237
- input.type = 'checkbox';
238
- input.checked = value;
239
- input.style.visibility = 'hidden';
238
+ input.value = value ? 'true' : 'false';
240
239
  }
241
240
  else {
242
- input.type = 'hidden';
243
241
  input.value = value;
244
242
  }
245
243
  form.append(input);
@@ -6,31 +6,11 @@ export class EventTrackingService {
6
6
  static get Instance() {
7
7
  return this.instance || (this.instance = new this());
8
8
  }
9
- async TrackFinancialProductViewedAsync(detail) {
10
- return this.trackEventAsync({
11
- FinancialProductViewed: detail
12
- });
13
- }
14
9
  async TrackSuperFundPdsViewedAsync(detail) {
15
10
  return this.trackEventAsync({
16
11
  SuperFundPdsViewed: detail
17
12
  });
18
13
  }
19
- async TrackFinancialProductAcceptedAsync(detail) {
20
- return this.trackEventAsync({
21
- FinancialProductAccepted: detail
22
- });
23
- }
24
- async TrackFinancialProductRejectedAsync(detail) {
25
- return this.trackEventAsync({
26
- FinancialProductRejected: detail
27
- });
28
- }
29
- async TrackSuperFundPrivacyConfirmationAcceptedAsync(detail) {
30
- return this.trackEventAsync({
31
- SuperFundPrivacyConfirmationAccepted: detail
32
- });
33
- }
34
14
  async TrackPromotedSuperFundDetailViewedAsync(detail) {
35
15
  return this.trackEventAsync({
36
16
  SuperFundDetailViewed: {
@@ -260,7 +260,7 @@ class TapSubscriber extends Subscriber {
260
260
  }
261
261
  }
262
262
 
263
- const AppVersion = '4.54.43093';
263
+ const AppVersion = '4.55.43666';
264
264
 
265
265
  // -------------------------------------------------------------------------------------
266
266
  // guards
@@ -3665,31 +3665,11 @@ class EventTrackingService {
3665
3665
  static get Instance() {
3666
3666
  return this.instance || (this.instance = new this());
3667
3667
  }
3668
- async TrackFinancialProductViewedAsync(detail) {
3669
- return this.trackEventAsync({
3670
- FinancialProductViewed: detail
3671
- });
3672
- }
3673
3668
  async TrackSuperFundPdsViewedAsync(detail) {
3674
3669
  return this.trackEventAsync({
3675
3670
  SuperFundPdsViewed: detail
3676
3671
  });
3677
3672
  }
3678
- async TrackFinancialProductAcceptedAsync(detail) {
3679
- return this.trackEventAsync({
3680
- FinancialProductAccepted: detail
3681
- });
3682
- }
3683
- async TrackFinancialProductRejectedAsync(detail) {
3684
- return this.trackEventAsync({
3685
- FinancialProductRejected: detail
3686
- });
3687
- }
3688
- async TrackSuperFundPrivacyConfirmationAcceptedAsync(detail) {
3689
- return this.trackEventAsync({
3690
- SuperFundPrivacyConfirmationAccepted: detail
3691
- });
3692
- }
3693
3673
  async TrackPromotedSuperFundDetailViewedAsync(detail) {
3694
3674
  return this.trackEventAsync({
3695
3675
  SuperFundDetailViewed: {
@@ -16098,7 +16078,7 @@ class PromotedFundJoinV2IFrameBuilder {
16098
16078
  build(iframe$1, history) {
16099
16079
  if (!(iframe$1 === null || iframe$1 === void 0 ? void 0 : iframe$1.contentDocument))
16100
16080
  return;
16101
- const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: state.fund.id, authToken: superSelectionAppService.jwt, employerDefault: state.fund.type === 'PromotedDefault' });
16081
+ const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: state.fund.id, authToken: superSelectionAppService.jwt, employerDefault: state.fund.type === 'PromotedDefault', definedBenefitsEligibility: Option.toUndefined(superSelectionAppService.isDefinedBenefitsEligible) });
16102
16082
  const handleMessage = async (event) => {
16103
16083
  const { data } = event;
16104
16084
  if (!data) {
@@ -16286,13 +16266,11 @@ class PromotedFundJoinV2IFrameBuilder {
16286
16266
  if (value !== undefined) {
16287
16267
  const input = document.createElement('input');
16288
16268
  input.name = prop;
16269
+ input.type = 'hidden';
16289
16270
  if (typeof value === 'boolean') {
16290
- input.type = 'checkbox';
16291
- input.checked = value;
16292
- input.style.visibility = 'hidden';
16271
+ input.value = value ? 'true' : 'false';
16293
16272
  }
16294
16273
  else {
16295
- input.type = 'hidden';
16296
16274
  input.value = value;
16297
16275
  }
16298
16276
  form.append(input);
@@ -16809,6 +16787,33 @@ const Success = class {
16809
16787
  }
16810
16788
  };
16811
16789
 
16790
+ const chooseAnotherFundRequestedEventHandler = (event) => {
16791
+ if (event.sender != 'super-campaign') {
16792
+ // eslint-disable-next-line no-console
16793
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16794
+ }
16795
+ return Promise.resolve();
16796
+ };
16797
+ const fundPanelShownEventHandler = (event) => {
16798
+ if (event.sender != 'super-campaign') {
16799
+ // eslint-disable-next-line no-console
16800
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16801
+ }
16802
+ return Promise.resolve();
16803
+ };
16804
+ const fundTileClicked = (event) => {
16805
+ if (event.sender != 'super-campaign') {
16806
+ // eslint-disable-next-line no-console
16807
+ console.error(`$handling super-campaign panel event: ${event === null || event === void 0 ? void 0 : event.type}`);
16808
+ }
16809
+ return Promise.resolve();
16810
+ };
16811
+ const eventHandlers = {
16812
+ 'choose-another-fund-requested': chooseAnotherFundRequestedEventHandler,
16813
+ 'fund-panel-shown': fundPanelShownEventHandler,
16814
+ 'fund-tile-clicked': fundTileClicked
16815
+ };
16816
+
16812
16817
  const SuperCampaignHost = class {
16813
16818
  constructor(hostRef) {
16814
16819
  registerInstance(this, hostRef);
@@ -16825,6 +16830,16 @@ const SuperCampaignHost = class {
16825
16830
  return 'autodev';
16826
16831
  }
16827
16832
  };
16833
+ this.subscribeToSuperCampaignEvents = () => {
16834
+ for (const eventName in eventHandlers) {
16835
+ document.addEventListener(eventName, eventHandlers[eventName]);
16836
+ }
16837
+ };
16838
+ this.unSubscribeFromSuperCampaignEvents = () => {
16839
+ for (const eventName in eventHandlers) {
16840
+ document.removeEventListener(eventName, eventHandlers[eventName]);
16841
+ }
16842
+ };
16828
16843
  }
16829
16844
  async componentWillLoad() {
16830
16845
  try {
@@ -16832,7 +16847,9 @@ const SuperCampaignHost = class {
16832
16847
  Option.isSome(superSelectionAppService.state.jwt)) {
16833
16848
  this.backendUrl = this.getBaseUrl(superSelectionAppService.state.apiBaseUrl.value);
16834
16849
  this.accessToken = superSelectionAppService.state.jwt.value;
16850
+ this.unSubscribeFromSuperCampaignEvents();
16835
16851
  await import(this.createApolloSuperCampaignScriptUrl(this.getEnvironmentTag()));
16852
+ this.subscribeToSuperCampaignEvents();
16836
16853
  this.componentLoaded = true;
16837
16854
  }
16838
16855
  else {
@@ -16845,6 +16862,9 @@ const SuperCampaignHost = class {
16845
16862
  console.error('Error loading component:', error);
16846
16863
  }
16847
16864
  }
16865
+ disconnectedCallback() {
16866
+ this.unSubscribeFromSuperCampaignEvents();
16867
+ }
16848
16868
  render() {
16849
16869
  return (h("div", null, this.componentLoaded ? (h("apollo-super-campaign", { "backend-url": this.backendUrl, "access-token": this.accessToken })) : null));
16850
16870
  }