@flarehr/apollo-super-selection 4.59.46171 → 4.61.46546

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-8c9c7343.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",{history:[16],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-124c1e44.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",{history:[16],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.59.46171';
287
+ const AppVersion = '4.61.46546';
288
288
 
289
289
  // -------------------------------------------------------------------------------------
290
290
  // guards
@@ -3521,19 +3521,20 @@ class SuperSelectionApi {
3521
3521
  const superSelectionApi = new SuperSelectionApi();
3522
3522
 
3523
3523
  class SuperCampaignState {
3524
- constructor(funds) {
3525
- this.promotedFundsShown = funds;
3524
+ constructor() {
3525
+ this._promotedFundsShown = [];
3526
3526
  }
3527
3527
  get PromotedFundIds() {
3528
- return this.promotedFundsShown.map((p) => p.fundId);
3528
+ return this._promotedFundsShown.map((p) => p.fundId);
3529
+ }
3530
+ set promotedFundsShown(value) {
3531
+ this._promotedFundsShown = value;
3529
3532
  }
3530
3533
  get DefaultFundPosition() {
3531
- this.promotedFundsShown.filter((value, index) => {
3532
- if (value.fundType == 'promoted-default') {
3533
- return index;
3534
- }
3535
- });
3536
- return undefined;
3534
+ const index = this._promotedFundsShown.findIndex((value) => value.fundType === 'promoted-default');
3535
+ if (index === -1)
3536
+ return undefined;
3537
+ return index + 1;
3537
3538
  }
3538
3539
  }
3539
3540
  const initialState = {
@@ -3605,8 +3606,8 @@ class SuperSelectionAppService {
3605
3606
  return Option.fromNullable(this.superCampaignState.DefaultFundPosition);
3606
3607
  }
3607
3608
  if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
3608
- const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => (v.type = 'promoted-default'));
3609
- if (index == -1) {
3609
+ const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => v.type === 'promoted-default');
3610
+ if (index === -1) {
3610
3611
  return Option.fromNullable(null);
3611
3612
  }
3612
3613
  else {
@@ -3688,11 +3689,17 @@ class SuperSelectionAppService {
3688
3689
  }
3689
3690
  }
3690
3691
  setSuperCampaignPromotedFundsShown(shownFunds) {
3691
- this._state.superCampaignState = new SuperCampaignState(shownFunds);
3692
+ if (this._state.superCampaignState !== undefined)
3693
+ this._state.superCampaignState.promotedFundsShown = shownFunds;
3694
+ else
3695
+ throw new Error('Cannot set shown funds for SuperCampaing state because it is undefined');
3692
3696
  }
3693
3697
  get superCampaignState() {
3694
3698
  return this._state.superCampaignState;
3695
3699
  }
3700
+ initializeSuperCampaignState(value) {
3701
+ this._state.superCampaignState = value;
3702
+ }
3696
3703
  get isUsingSuperCampaign() {
3697
3704
  return this.state.superCampaignEnabled && this.superCampaignState !== undefined;
3698
3705
  }
@@ -16887,16 +16894,19 @@ const SuperCampaignHost = class {
16887
16894
  document.removeEventListener(eventName, this.superCampaignEventHandlers[eventName]);
16888
16895
  }
16889
16896
  };
16897
+ this.superCampaignLoaded = async (event) => {
16898
+ if (event.detail.sender == 'super-campaign') {
16899
+ superSelectionAppService.initializeSuperCampaignState(new SuperCampaignState());
16900
+ }
16901
+ return Promise.resolve();
16902
+ };
16890
16903
  this.chooseAnotherFundRequested = async (event) => {
16891
16904
  if (event.detail.sender == 'super-campaign') {
16892
16905
  await navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
16893
16906
  }
16894
16907
  };
16895
16908
  this.fundPanelShown = async (event) => {
16896
- var _a;
16897
16909
  if (event.detail.sender == 'super-campaign') {
16898
- // eslint-disable-next-line no-console
16899
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16900
16910
  const promotedFundsShown = event.detail.shownFunds.map((f) => f.fundId);
16901
16911
  superSelectionAppService.setSuperCampaignPromotedFundsShown(event.detail.shownFunds);
16902
16912
  await EventTrackingService.Instance.TrackSuperFundPanelViewedAsync({
@@ -16907,17 +16917,15 @@ const SuperCampaignHost = class {
16907
16917
  }
16908
16918
  };
16909
16919
  this.fundTileClicked = async (event) => {
16910
- var _a, _b, _c;
16920
+ var _a, _b;
16911
16921
  const eventDetails = event.detail;
16912
16922
  if (eventDetails.sender == 'super-campaign') {
16913
- // eslint-disable-next-line no-console
16914
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16915
16923
  const promotedFundsShown = this.SuperCampaignState.PromotedFundIds;
16916
16924
  const defaultFundUsiSet = Option.toUndefined(superSelectionAppService.defaultFundUsi);
16917
16925
  await Promise.all([
16918
16926
  eventDetails.fundType == 'promoted-default'
16919
16927
  ? await EventTrackingService.Instance.TrackPromotedDefaultSuperFundDetailViewedAsync({
16920
- fundUsi: (_b = eventDetails.fundUsi) !== null && _b !== void 0 ? _b : '',
16928
+ fundUsi: (_a = eventDetails.fundUsi) !== null && _a !== void 0 ? _a : '',
16921
16929
  fundName: eventDetails.fundName,
16922
16930
  promotedFundId: eventDetails.fundId,
16923
16931
  promotedFundsShown,
@@ -16925,7 +16933,7 @@ const SuperCampaignHost = class {
16925
16933
  superCampaignEnabled: true
16926
16934
  })
16927
16935
  : await EventTrackingService.Instance.TrackPromotedSuperFundDetailViewedAsync({
16928
- fundUsi: (_c = eventDetails.fundUsi) !== null && _c !== void 0 ? _c : undefined,
16936
+ fundUsi: (_b = eventDetails.fundUsi) !== null && _b !== void 0 ? _b : undefined,
16929
16937
  fundName: eventDetails.fundName,
16930
16938
  promotedFundId: eventDetails.fundId,
16931
16939
  promotedFundsShown,
@@ -16947,10 +16955,7 @@ const SuperCampaignHost = class {
16947
16955
  }
16948
16956
  };
16949
16957
  this.fundPdsViewed = async (event) => {
16950
- var _a;
16951
16958
  if (event.detail.sender == 'super-campaign') {
16952
- // eslint-disable-next-line no-console
16953
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16954
16959
  await EventTrackingService.Instance.TrackSuperFundPdsViewedAsync({
16955
16960
  fundName: event.detail.fundName,
16956
16961
  fundUsi: event.detail.fundUsi,
@@ -16960,28 +16965,19 @@ const SuperCampaignHost = class {
16960
16965
  }
16961
16966
  };
16962
16967
  this.disclaimerViewed = async (event) => {
16963
- var _a;
16964
16968
  if (event.detail.sender == 'super-campaign') {
16965
- // eslint-disable-next-line no-console
16966
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16967
16969
  await EventTrackingService.Instance.TrackSuperFundDisclaimerViewedAsync(SuperFundDisclaimerViewedDetail.create(true));
16968
16970
  }
16969
16971
  };
16970
16972
  this.disclaimerAccepted = async (event) => {
16971
- var _a;
16972
16973
  if (event.detail.sender == 'super-campaign') {
16973
- // eslint-disable-next-line no-console
16974
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16975
16974
  await EventTrackingService.Instance.TrackSuperFundDisclaimerAcceptedAsync({
16976
16975
  superCampaignEnabled: true
16977
16976
  });
16978
16977
  }
16979
16978
  };
16980
16979
  this.promotedFundJoined = async (event) => {
16981
- var _a;
16982
16980
  if (event.detail.sender == 'super-campaign') {
16983
- // eslint-disable-next-line no-console
16984
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16985
16981
  const fundJoinInfo = event.detail.fundJoinInfo;
16986
16982
  switch (fundJoinInfo.fundType) {
16987
16983
  case 'Promoted':
@@ -17097,7 +17093,8 @@ const SuperCampaignHost = class {
17097
17093
  'fund-pds-viewed': this.fundPdsViewed.bind(this),
17098
17094
  'disclaimer-viewed': this.disclaimerViewed.bind(this),
17099
17095
  'disclaimer-accepted': this.disclaimerAccepted.bind(this),
17100
- 'promoted-fund-joined': this.promotedFundJoined.bind(this)
17096
+ 'promoted-fund-joined': this.promotedFundJoined.bind(this),
17097
+ 'super-campaign-loaded': this.superCampaignLoaded.bind(this)
17101
17098
  };
17102
17099
  }
17103
17100
  async componentWillLoad() {
@@ -13,6 +13,7 @@ import slateChoiceApi from '../super-selection-app/funds/slate-super/api/slate-c
13
13
  import { EventTrackingService } from '../super-selection-app/services/event-tracking.service';
14
14
  import miscService from '../super-selection-app/services/misc.service';
15
15
  import navigationService from '../super-selection-app/services/navigation.service';
16
+ import { SuperCampaignState } from '../super-selection-app/services/super-selection.store';
16
17
  import { SuperSelectionAppRoutes } from '../super-selection-app/services/super-selection-app.routes';
17
18
  import superSelectionAppService from '../super-selection-app/services/super-selection-app.service';
18
19
  import { Usi } from './super-campaign-types';
@@ -41,16 +42,19 @@ export class SuperCampaignHost {
41
42
  document.removeEventListener(eventName, this.superCampaignEventHandlers[eventName]);
42
43
  }
43
44
  };
45
+ this.superCampaignLoaded = async (event) => {
46
+ if (event.detail.sender == 'super-campaign') {
47
+ superSelectionAppService.initializeSuperCampaignState(new SuperCampaignState());
48
+ }
49
+ return Promise.resolve();
50
+ };
44
51
  this.chooseAnotherFundRequested = async (event) => {
45
52
  if (event.detail.sender == 'super-campaign') {
46
53
  await navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
47
54
  }
48
55
  };
49
56
  this.fundPanelShown = async (event) => {
50
- var _a;
51
57
  if (event.detail.sender == 'super-campaign') {
52
- // eslint-disable-next-line no-console
53
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
54
58
  const promotedFundsShown = event.detail.shownFunds.map((f) => f.fundId);
55
59
  superSelectionAppService.setSuperCampaignPromotedFundsShown(event.detail.shownFunds);
56
60
  await EventTrackingService.Instance.TrackSuperFundPanelViewedAsync({
@@ -61,17 +65,15 @@ export class SuperCampaignHost {
61
65
  }
62
66
  };
63
67
  this.fundTileClicked = async (event) => {
64
- var _a, _b, _c;
68
+ var _a, _b;
65
69
  const eventDetails = event.detail;
66
70
  if (eventDetails.sender == 'super-campaign') {
67
- // eslint-disable-next-line no-console
68
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
69
71
  const promotedFundsShown = this.SuperCampaignState.PromotedFundIds;
70
72
  const defaultFundUsiSet = O.toUndefined(superSelectionAppService.defaultFundUsi);
71
73
  await Promise.all([
72
74
  eventDetails.fundType == 'promoted-default'
73
75
  ? await EventTrackingService.Instance.TrackPromotedDefaultSuperFundDetailViewedAsync({
74
- fundUsi: (_b = eventDetails.fundUsi) !== null && _b !== void 0 ? _b : '',
76
+ fundUsi: (_a = eventDetails.fundUsi) !== null && _a !== void 0 ? _a : '',
75
77
  fundName: eventDetails.fundName,
76
78
  promotedFundId: eventDetails.fundId,
77
79
  promotedFundsShown,
@@ -79,7 +81,7 @@ export class SuperCampaignHost {
79
81
  superCampaignEnabled: true
80
82
  })
81
83
  : await EventTrackingService.Instance.TrackPromotedSuperFundDetailViewedAsync({
82
- fundUsi: (_c = eventDetails.fundUsi) !== null && _c !== void 0 ? _c : undefined,
84
+ fundUsi: (_b = eventDetails.fundUsi) !== null && _b !== void 0 ? _b : undefined,
83
85
  fundName: eventDetails.fundName,
84
86
  promotedFundId: eventDetails.fundId,
85
87
  promotedFundsShown,
@@ -101,10 +103,7 @@ export class SuperCampaignHost {
101
103
  }
102
104
  };
103
105
  this.fundPdsViewed = async (event) => {
104
- var _a;
105
106
  if (event.detail.sender == 'super-campaign') {
106
- // eslint-disable-next-line no-console
107
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
108
107
  await EventTrackingService.Instance.TrackSuperFundPdsViewedAsync({
109
108
  fundName: event.detail.fundName,
110
109
  fundUsi: event.detail.fundUsi,
@@ -114,28 +113,19 @@ export class SuperCampaignHost {
114
113
  }
115
114
  };
116
115
  this.disclaimerViewed = async (event) => {
117
- var _a;
118
116
  if (event.detail.sender == 'super-campaign') {
119
- // eslint-disable-next-line no-console
120
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
121
117
  await EventTrackingService.Instance.TrackSuperFundDisclaimerViewedAsync(SuperFundDisclaimerViewedDetail.create(true));
122
118
  }
123
119
  };
124
120
  this.disclaimerAccepted = async (event) => {
125
- var _a;
126
121
  if (event.detail.sender == 'super-campaign') {
127
- // eslint-disable-next-line no-console
128
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
129
122
  await EventTrackingService.Instance.TrackSuperFundDisclaimerAcceptedAsync({
130
123
  superCampaignEnabled: true
131
124
  });
132
125
  }
133
126
  };
134
127
  this.promotedFundJoined = async (event) => {
135
- var _a;
136
128
  if (event.detail.sender == 'super-campaign') {
137
- // eslint-disable-next-line no-console
138
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
139
129
  const fundJoinInfo = event.detail.fundJoinInfo;
140
130
  switch (fundJoinInfo.fundType) {
141
131
  case 'Promoted':
@@ -251,7 +241,8 @@ export class SuperCampaignHost {
251
241
  'fund-pds-viewed': this.fundPdsViewed.bind(this),
252
242
  'disclaimer-viewed': this.disclaimerViewed.bind(this),
253
243
  'disclaimer-accepted': this.disclaimerAccepted.bind(this),
254
- 'promoted-fund-joined': this.promotedFundJoined.bind(this)
244
+ 'promoted-fund-joined': this.promotedFundJoined.bind(this),
245
+ 'super-campaign-loaded': this.superCampaignLoaded.bind(this)
255
246
  };
256
247
  }
257
248
  async componentWillLoad() {
@@ -3,7 +3,7 @@ import { pipe } from 'fp-ts/lib/function';
3
3
  import * as O from 'fp-ts/lib/Option';
4
4
  import jwtDecode from 'jwt-decode';
5
5
  import superSelectionApi from '../api/super-selection.api';
6
- import { initialState, SuperCampaignState } from './super-selection.store';
6
+ import { initialState } from './super-selection.store';
7
7
  export class SuperSelectionAppService {
8
8
  constructor() {
9
9
  const { state, onChange } = createStore(initialState);
@@ -54,8 +54,8 @@ export class SuperSelectionAppService {
54
54
  return O.fromNullable(this.superCampaignState.DefaultFundPosition);
55
55
  }
56
56
  if (this._state.campaignConnectEnabled && O.isSome(this._state.campaignConnect)) {
57
- const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => (v.type = 'promoted-default'));
58
- if (index == -1) {
57
+ const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => v.type === 'promoted-default');
58
+ if (index === -1) {
59
59
  return O.fromNullable(null);
60
60
  }
61
61
  else {
@@ -137,11 +137,17 @@ export class SuperSelectionAppService {
137
137
  }
138
138
  }
139
139
  setSuperCampaignPromotedFundsShown(shownFunds) {
140
- this._state.superCampaignState = new SuperCampaignState(shownFunds);
140
+ if (this._state.superCampaignState !== undefined)
141
+ this._state.superCampaignState.promotedFundsShown = shownFunds;
142
+ else
143
+ throw new Error('Cannot set shown funds for SuperCampaing state because it is undefined');
141
144
  }
142
145
  get superCampaignState() {
143
146
  return this._state.superCampaignState;
144
147
  }
148
+ initializeSuperCampaignState(value) {
149
+ this._state.superCampaignState = value;
150
+ }
145
151
  get isUsingSuperCampaign() {
146
152
  return this.state.superCampaignEnabled && this.superCampaignState !== undefined;
147
153
  }
@@ -1,18 +1,19 @@
1
1
  import * as O from 'fp-ts/lib/Option';
2
2
  export class SuperCampaignState {
3
- constructor(funds) {
4
- this.promotedFundsShown = funds;
3
+ constructor() {
4
+ this._promotedFundsShown = [];
5
5
  }
6
6
  get PromotedFundIds() {
7
- return this.promotedFundsShown.map((p) => p.fundId);
7
+ return this._promotedFundsShown.map((p) => p.fundId);
8
+ }
9
+ set promotedFundsShown(value) {
10
+ this._promotedFundsShown = value;
8
11
  }
9
12
  get DefaultFundPosition() {
10
- this.promotedFundsShown.filter((value, index) => {
11
- if (value.fundType == 'promoted-default') {
12
- return index;
13
- }
14
- });
15
- return undefined;
13
+ const index = this._promotedFundsShown.findIndex((value) => value.fundType === 'promoted-default');
14
+ if (index === -1)
15
+ return undefined;
16
+ return index + 1;
16
17
  }
17
18
  }
18
19
  export const initialState = {
@@ -260,7 +260,7 @@ class TapSubscriber extends Subscriber {
260
260
  }
261
261
  }
262
262
 
263
- const AppVersion = '4.59.46171';
263
+ const AppVersion = '4.61.46546';
264
264
 
265
265
  // -------------------------------------------------------------------------------------
266
266
  // guards
@@ -3497,19 +3497,20 @@ class SuperSelectionApi {
3497
3497
  const superSelectionApi = new SuperSelectionApi();
3498
3498
 
3499
3499
  class SuperCampaignState {
3500
- constructor(funds) {
3501
- this.promotedFundsShown = funds;
3500
+ constructor() {
3501
+ this._promotedFundsShown = [];
3502
3502
  }
3503
3503
  get PromotedFundIds() {
3504
- return this.promotedFundsShown.map((p) => p.fundId);
3504
+ return this._promotedFundsShown.map((p) => p.fundId);
3505
+ }
3506
+ set promotedFundsShown(value) {
3507
+ this._promotedFundsShown = value;
3505
3508
  }
3506
3509
  get DefaultFundPosition() {
3507
- this.promotedFundsShown.filter((value, index) => {
3508
- if (value.fundType == 'promoted-default') {
3509
- return index;
3510
- }
3511
- });
3512
- return undefined;
3510
+ const index = this._promotedFundsShown.findIndex((value) => value.fundType === 'promoted-default');
3511
+ if (index === -1)
3512
+ return undefined;
3513
+ return index + 1;
3513
3514
  }
3514
3515
  }
3515
3516
  const initialState = {
@@ -3581,8 +3582,8 @@ class SuperSelectionAppService {
3581
3582
  return Option.fromNullable(this.superCampaignState.DefaultFundPosition);
3582
3583
  }
3583
3584
  if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
3584
- const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => (v.type = 'promoted-default'));
3585
- if (index == -1) {
3585
+ const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => v.type === 'promoted-default');
3586
+ if (index === -1) {
3586
3587
  return Option.fromNullable(null);
3587
3588
  }
3588
3589
  else {
@@ -3664,11 +3665,17 @@ class SuperSelectionAppService {
3664
3665
  }
3665
3666
  }
3666
3667
  setSuperCampaignPromotedFundsShown(shownFunds) {
3667
- this._state.superCampaignState = new SuperCampaignState(shownFunds);
3668
+ if (this._state.superCampaignState !== undefined)
3669
+ this._state.superCampaignState.promotedFundsShown = shownFunds;
3670
+ else
3671
+ throw new Error('Cannot set shown funds for SuperCampaing state because it is undefined');
3668
3672
  }
3669
3673
  get superCampaignState() {
3670
3674
  return this._state.superCampaignState;
3671
3675
  }
3676
+ initializeSuperCampaignState(value) {
3677
+ this._state.superCampaignState = value;
3678
+ }
3672
3679
  get isUsingSuperCampaign() {
3673
3680
  return this.state.superCampaignEnabled && this.superCampaignState !== undefined;
3674
3681
  }
@@ -16863,16 +16870,19 @@ const SuperCampaignHost = class {
16863
16870
  document.removeEventListener(eventName, this.superCampaignEventHandlers[eventName]);
16864
16871
  }
16865
16872
  };
16873
+ this.superCampaignLoaded = async (event) => {
16874
+ if (event.detail.sender == 'super-campaign') {
16875
+ superSelectionAppService.initializeSuperCampaignState(new SuperCampaignState());
16876
+ }
16877
+ return Promise.resolve();
16878
+ };
16866
16879
  this.chooseAnotherFundRequested = async (event) => {
16867
16880
  if (event.detail.sender == 'super-campaign') {
16868
16881
  await navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
16869
16882
  }
16870
16883
  };
16871
16884
  this.fundPanelShown = async (event) => {
16872
- var _a;
16873
16885
  if (event.detail.sender == 'super-campaign') {
16874
- // eslint-disable-next-line no-console
16875
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16876
16886
  const promotedFundsShown = event.detail.shownFunds.map((f) => f.fundId);
16877
16887
  superSelectionAppService.setSuperCampaignPromotedFundsShown(event.detail.shownFunds);
16878
16888
  await EventTrackingService.Instance.TrackSuperFundPanelViewedAsync({
@@ -16883,17 +16893,15 @@ const SuperCampaignHost = class {
16883
16893
  }
16884
16894
  };
16885
16895
  this.fundTileClicked = async (event) => {
16886
- var _a, _b, _c;
16896
+ var _a, _b;
16887
16897
  const eventDetails = event.detail;
16888
16898
  if (eventDetails.sender == 'super-campaign') {
16889
- // eslint-disable-next-line no-console
16890
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16891
16899
  const promotedFundsShown = this.SuperCampaignState.PromotedFundIds;
16892
16900
  const defaultFundUsiSet = Option.toUndefined(superSelectionAppService.defaultFundUsi);
16893
16901
  await Promise.all([
16894
16902
  eventDetails.fundType == 'promoted-default'
16895
16903
  ? await EventTrackingService.Instance.TrackPromotedDefaultSuperFundDetailViewedAsync({
16896
- fundUsi: (_b = eventDetails.fundUsi) !== null && _b !== void 0 ? _b : '',
16904
+ fundUsi: (_a = eventDetails.fundUsi) !== null && _a !== void 0 ? _a : '',
16897
16905
  fundName: eventDetails.fundName,
16898
16906
  promotedFundId: eventDetails.fundId,
16899
16907
  promotedFundsShown,
@@ -16901,7 +16909,7 @@ const SuperCampaignHost = class {
16901
16909
  superCampaignEnabled: true
16902
16910
  })
16903
16911
  : await EventTrackingService.Instance.TrackPromotedSuperFundDetailViewedAsync({
16904
- fundUsi: (_c = eventDetails.fundUsi) !== null && _c !== void 0 ? _c : undefined,
16912
+ fundUsi: (_b = eventDetails.fundUsi) !== null && _b !== void 0 ? _b : undefined,
16905
16913
  fundName: eventDetails.fundName,
16906
16914
  promotedFundId: eventDetails.fundId,
16907
16915
  promotedFundsShown,
@@ -16923,10 +16931,7 @@ const SuperCampaignHost = class {
16923
16931
  }
16924
16932
  };
16925
16933
  this.fundPdsViewed = async (event) => {
16926
- var _a;
16927
16934
  if (event.detail.sender == 'super-campaign') {
16928
- // eslint-disable-next-line no-console
16929
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16930
16935
  await EventTrackingService.Instance.TrackSuperFundPdsViewedAsync({
16931
16936
  fundName: event.detail.fundName,
16932
16937
  fundUsi: event.detail.fundUsi,
@@ -16936,28 +16941,19 @@ const SuperCampaignHost = class {
16936
16941
  }
16937
16942
  };
16938
16943
  this.disclaimerViewed = async (event) => {
16939
- var _a;
16940
16944
  if (event.detail.sender == 'super-campaign') {
16941
- // eslint-disable-next-line no-console
16942
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16943
16945
  await EventTrackingService.Instance.TrackSuperFundDisclaimerViewedAsync(SuperFundDisclaimerViewedDetail.create(true));
16944
16946
  }
16945
16947
  };
16946
16948
  this.disclaimerAccepted = async (event) => {
16947
- var _a;
16948
16949
  if (event.detail.sender == 'super-campaign') {
16949
- // eslint-disable-next-line no-console
16950
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16951
16950
  await EventTrackingService.Instance.TrackSuperFundDisclaimerAcceptedAsync({
16952
16951
  superCampaignEnabled: true
16953
16952
  });
16954
16953
  }
16955
16954
  };
16956
16955
  this.promotedFundJoined = async (event) => {
16957
- var _a;
16958
16956
  if (event.detail.sender == 'super-campaign') {
16959
- // eslint-disable-next-line no-console
16960
- console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
16961
16957
  const fundJoinInfo = event.detail.fundJoinInfo;
16962
16958
  switch (fundJoinInfo.fundType) {
16963
16959
  case 'Promoted':
@@ -17073,7 +17069,8 @@ const SuperCampaignHost = class {
17073
17069
  'fund-pds-viewed': this.fundPdsViewed.bind(this),
17074
17070
  'disclaimer-viewed': this.disclaimerViewed.bind(this),
17075
17071
  'disclaimer-accepted': this.disclaimerAccepted.bind(this),
17076
- 'promoted-fund-joined': this.promotedFundJoined.bind(this)
17072
+ 'promoted-fund-joined': this.promotedFundJoined.bind(this),
17073
+ 'super-campaign-loaded': this.superCampaignLoaded.bind(this)
17077
17074
  };
17078
17075
  }
17079
17076
  async componentWillLoad() {