@flarehr/apollo-super-selection 1.4.56819 → 1.4.56843
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
- package/dist/lib/apollo-super-selection/p-0726177d.system.entry.js +69 -0
- package/dist/lib/apollo-super-selection/p-07893761.system.entry.js +1 -0
- package/dist/lib/apollo-super-selection/p-1a574672.entry.js +14 -0
- package/dist/lib/apollo-super-selection/p-2c136506.system.entry.js +1 -0
- package/dist/lib/apollo-super-selection/p-37ed5963.system.entry.js +1 -0
- package/dist/lib/apollo-super-selection/p-4a95528c.js +1 -0
- package/dist/lib/apollo-super-selection/p-524b1ff5.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-5716179f.js +1 -0
- package/dist/lib/apollo-super-selection/p-6d4e757b.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-89c8d0e2.entry.js +1 -0
- package/dist/lib/apollo-super-selection/p-9cd765f5.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-a2b4e667.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-a99c601b.js +1 -0
- package/dist/lib/apollo-super-selection/p-b3f43d1a.entry.js +1 -0
- package/dist/lib/apollo-super-selection/p-bbe230d9.entry.js +1 -0
- package/dist/lib/apollo-super-selection/p-bd6e6a8f.system.js +1 -1
- package/dist/lib/apollo-super-selection/p-d5c7a35f.js +1 -0
- package/dist/lib/apollo-super-selection/p-dac37462.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-f8bb280b.js +1 -0
- package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
- package/dist/lib/cjs/australian-fund-lookup.service-4be59dec.js +19 -0
- package/dist/lib/cjs/custom-fund.store-3d1ac996.js +37 -0
- package/dist/lib/cjs/event-tracking.service-ed12699a.js +296 -0
- package/dist/lib/cjs/injectHistory-eb188cf0.js +9 -0
- package/dist/lib/cjs/loader.cjs.js +1 -1
- package/dist/lib/cjs/sss-button_32.cjs.entry.js +382 -351
- package/dist/lib/cjs/sss-default-fund-router.cjs.entry.js +23 -0
- package/dist/lib/cjs/sss-default-fund.cjs.entry.js +61 -0
- package/dist/lib/cjs/sss-super-byof-host.cjs.entry.js +24 -21
- package/dist/lib/cjs/{custom-fund-choice.api-293c1ace.js → super-selection-app.service-ca52a1fc.js} +7 -331
- package/dist/lib/collection/collection-manifest.json +3 -1
- package/dist/lib/collection/components/default-fund/super-default-fund-types.js +1 -0
- package/dist/lib/collection/components/default-fund/super-default-fund.js +130 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund-router.js +37 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +1 -1
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +4 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +2 -1
- package/dist/lib/esm/apollo-super-selection.js +1 -1
- package/dist/lib/esm/australian-fund-lookup.service-a2f593d3.js +17 -0
- package/dist/lib/esm/custom-fund.store-dcc61edf.js +36 -0
- package/dist/lib/esm/event-tracking.service-9398a317.js +290 -0
- package/dist/lib/esm/injectHistory-e92e4664.js +7 -0
- package/dist/lib/esm/loader.js +1 -1
- package/dist/lib/esm/sss-button_32.entry.js +89 -58
- package/dist/lib/esm/sss-default-fund-router.entry.js +19 -0
- package/dist/lib/esm/sss-default-fund.entry.js +57 -0
- package/dist/lib/esm/sss-super-byof-host.entry.js +4 -1
- package/dist/lib/esm/{custom-fund-choice.api-42801d64.js → super-selection-app.service-50f199de.js} +8 -327
- package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
- package/dist/lib/esm-es5/australian-fund-lookup.service-a2f593d3.js +1 -0
- package/dist/lib/esm-es5/custom-fund.store-dcc61edf.js +1 -0
- package/dist/lib/esm-es5/event-tracking.service-9398a317.js +1 -0
- package/dist/lib/esm-es5/injectHistory-e92e4664.js +1 -0
- package/dist/lib/esm-es5/loader.js +1 -1
- package/dist/lib/esm-es5/sss-button_32.entry.js +5 -5
- package/dist/lib/esm-es5/sss-default-fund-router.entry.js +1 -0
- package/dist/lib/esm-es5/sss-default-fund.entry.js +1 -0
- package/dist/lib/esm-es5/sss-super-byof-host.entry.js +1 -1
- package/dist/lib/esm-es5/super-selection-app.service-50f199de.js +1 -0
- package/dist/lib/types/components/default-fund/super-default-fund-types.d.ts +23 -0
- package/dist/lib/types/components/default-fund/super-default-fund.d.ts +20 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/default-fund/default-fund-router.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +1 -0
- package/dist/lib/types/components.d.ts +30 -0
- package/package.json +1 -1
- package/dist/lib/apollo-super-selection/p-24d6e2b8.js +0 -1
- package/dist/lib/apollo-super-selection/p-a0063575.system.entry.js +0 -1
- package/dist/lib/apollo-super-selection/p-aa9dedee.system.entry.js +0 -69
- package/dist/lib/apollo-super-selection/p-b00f648b.entry.js +0 -1
- package/dist/lib/apollo-super-selection/p-c7ab3701.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-cd3ed541.system.js +0 -1
- package/dist/lib/esm-es5/custom-fund-choice.api-42801d64.js +0 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { r as registerInstance, h, F as Fragment,
|
|
1
|
+
import { r as registerInstance, h, F as Fragment, H as Host, c as createEvent, g as getAssetPath, s as setErrorHandler, a as getElement, d as getContext } from './index-107d7c24.js';
|
|
2
2
|
import { f as from, m as map, S as SimpleOuterSubscriber, a as SimpleInnerSubscriber, i as innerSubscribe, b as isArray, O as Observable, c as isFunction, d as async, g as Subscriber, h as distinctUntilChanged, j as filter, k as StoreConfig, l as Store, Q as Query } from './datorama-akita-127aea91.js';
|
|
3
|
-
import { n as none, i as isSome, s as some, a as superSelectionAppService,
|
|
3
|
+
import { n as none, i as isSome, s as some, a as superSelectionAppService, O as Option, b as isNone, g as getPromotedFundId, c as buildBackendApiClient, d as getSuperChoiceUsi, e as getSuperChoiceMemberNumber, t as toUndefined, f as superSelectionApi, h as slate, S as SuperCampaignComponentStatus, j as factory, k as fromNullable } from './super-selection-app.service-50f199de.js';
|
|
4
4
|
import { A as ActiveRouter } from './active-router-d18b36fb.js';
|
|
5
|
+
import { i as injectHistory } from './injectHistory-e92e4664.js';
|
|
6
|
+
import { n as navigationService, S as SuperSelectionAppRoutes, E as EventTrackingService, c as customFundChoiceApi, s as state$1, i as iframe, a as superSelectionAppStencilRoutes } from './event-tracking.service-9398a317.js';
|
|
7
|
+
import { C as CustomFundTypes, s as state } from './custom-fund.store-dcc61edf.js';
|
|
8
|
+
import { a as australianFundLookupService } from './australian-fund-lookup.service-a2f593d3.js';
|
|
5
9
|
|
|
6
10
|
function noop() { }
|
|
7
11
|
|
|
@@ -261,7 +265,7 @@ class TapSubscriber extends Subscriber {
|
|
|
261
265
|
}
|
|
262
266
|
}
|
|
263
267
|
|
|
264
|
-
const AppVersion = '1.4.
|
|
268
|
+
const AppVersion = '1.4.56843';
|
|
265
269
|
|
|
266
270
|
class Lazy {
|
|
267
271
|
constructor(factory) {
|
|
@@ -916,70 +920,97 @@ const CustomFund = class {
|
|
|
916
920
|
};
|
|
917
921
|
injectHistory(CustomFund);
|
|
918
922
|
|
|
919
|
-
|
|
920
|
-
async searchFundsAsync(searchString, maxRecordCount) {
|
|
921
|
-
return superSelectionApi.getAustralianFundsAsync({
|
|
922
|
-
searchString,
|
|
923
|
-
maxRecordCount
|
|
924
|
-
});
|
|
925
|
-
}
|
|
926
|
-
async getFundAsync(usi, includeInactive) {
|
|
927
|
-
const result = await superSelectionApi.getAustralianFundAsync(usi, includeInactive);
|
|
928
|
-
return Option.some(result);
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
const australianFundLookupService = new AustralianFundLookupService();
|
|
923
|
+
const LoadWaitingTimeout = 30000;
|
|
932
924
|
|
|
933
|
-
|
|
925
|
+
var SuperDefaultFundComponentStatus;
|
|
926
|
+
(function (SuperDefaultFundComponentStatus) {
|
|
927
|
+
SuperDefaultFundComponentStatus[SuperDefaultFundComponentStatus["NotLoaded"] = 1] = "NotLoaded";
|
|
928
|
+
SuperDefaultFundComponentStatus[SuperDefaultFundComponentStatus["Loaded"] = 2] = "Loaded";
|
|
929
|
+
})(SuperDefaultFundComponentStatus || (SuperDefaultFundComponentStatus = {}));
|
|
930
|
+
let superDefaultFundComponentStatus = SuperDefaultFundComponentStatus.NotLoaded;
|
|
931
|
+
const SuperDefaultFundHost = class {
|
|
934
932
|
constructor(hostRef) {
|
|
935
933
|
registerInstance(this, hostRef);
|
|
936
|
-
this.
|
|
934
|
+
this.productName = 'Employer’s default fund';
|
|
937
935
|
this.eventTrackingService = EventTrackingService.Instance;
|
|
936
|
+
this.subscribeToSuperDefaultFundEvents = () => {
|
|
937
|
+
for (const eventName in this.defaultFundEventHandlers) {
|
|
938
|
+
document.addEventListener(eventName, this.defaultFundEventHandlers[eventName]);
|
|
939
|
+
}
|
|
940
|
+
};
|
|
941
|
+
this.unSubscribeFromSuperDefaultFundEvents = () => {
|
|
942
|
+
for (const eventName in this.defaultFundEventHandlers) {
|
|
943
|
+
document.removeEventListener(eventName, this.defaultFundEventHandlers[eventName]);
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
this.defaultFundLoaded = async (event) => {
|
|
947
|
+
var _a;
|
|
948
|
+
if (event.detail.sender === 'super-default-fund') {
|
|
949
|
+
superDefaultFundComponentStatus = SuperDefaultFundComponentStatus.Loaded;
|
|
950
|
+
clearTimeout(this.loadingTimeoutRef);
|
|
951
|
+
await this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({
|
|
952
|
+
fundUsi: (_a = event.detail.fundUsi) !== null && _a !== void 0 ? _a : '',
|
|
953
|
+
fundName: this.productName,
|
|
954
|
+
promotedFundsShown: superSelectionAppService.promotedFunds,
|
|
955
|
+
defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi)
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
return Promise.resolve();
|
|
959
|
+
};
|
|
960
|
+
this.defaultFundCompleted = async (event) => {
|
|
961
|
+
if (event.detail.sender === 'super-default-fund') {
|
|
962
|
+
navigationService.navigateInternallyToStandardChoice({
|
|
963
|
+
history: this.history,
|
|
964
|
+
fundName: this.productName,
|
|
965
|
+
fundDetails: {
|
|
966
|
+
type: 'default',
|
|
967
|
+
fundName: this.productName,
|
|
968
|
+
fundUsi: event.detail.fundUsi
|
|
969
|
+
},
|
|
970
|
+
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
971
|
+
await customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({ standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig));
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
this.defaultFundCancelled = async (event) => {
|
|
977
|
+
if (event.detail.sender === 'super-default-fund') {
|
|
978
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
979
|
+
}
|
|
980
|
+
};
|
|
981
|
+
this.defaultFundEventHandlers = {
|
|
982
|
+
'default-fund-loaded': this.defaultFundLoaded.bind(this),
|
|
983
|
+
'default-fund-completed': this.defaultFundCompleted.bind(this),
|
|
984
|
+
'default-fund-cancelled': this.defaultFundCancelled.bind(this)
|
|
985
|
+
};
|
|
938
986
|
}
|
|
939
987
|
async componentWillLoad() {
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
988
|
+
if (Option.isSome(superSelectionAppService.backendUrl) &&
|
|
989
|
+
Option.isSome(superSelectionAppService.state.jwt)) {
|
|
990
|
+
this.backendUrl = superSelectionAppService.backendUrl.value;
|
|
991
|
+
this.accessToken = superSelectionAppService.state.jwt.value;
|
|
992
|
+
if (superDefaultFundComponentStatus === SuperDefaultFundComponentStatus.NotLoaded) {
|
|
993
|
+
this.loadingTimeoutRef = setTimeout(this.defaultFundLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout);
|
|
994
|
+
}
|
|
995
|
+
this.subscribeToSuperDefaultFundEvents();
|
|
943
996
|
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
if (Option.isNone(defaultFundSearchResult)) {
|
|
947
|
-
this.isInvalidDefaultFund = true;
|
|
948
|
-
return;
|
|
997
|
+
else {
|
|
998
|
+
throw Error(`SuperDefaultFundHost pre-requisites not met.`);
|
|
949
999
|
}
|
|
950
|
-
this.defaultFund = defaultFundSearchResult.value;
|
|
951
|
-
this.defaultFundProductName = defaultFundSearchResult.value.productName;
|
|
952
1000
|
}
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({
|
|
956
|
-
fundUsi: (_b = (_a = this.defaultFund) === null || _a === void 0 ? void 0 : _a.usi) !== null && _b !== void 0 ? _b : '',
|
|
957
|
-
fundName: (_d = (_c = this.defaultFund) === null || _c === void 0 ? void 0 : _c.productName) !== null && _d !== void 0 ? _d : '',
|
|
958
|
-
promotedFundsShown: superSelectionAppService.promotedFunds,
|
|
959
|
-
defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi)
|
|
960
|
-
});
|
|
1001
|
+
disconnectedCallback() {
|
|
1002
|
+
clearTimeout(this.loadingTimeoutRef);
|
|
961
1003
|
}
|
|
962
1004
|
render() {
|
|
963
|
-
return (h(Host, null, h("sss-header-section", null), h("div", { class: "flex justify-center mt-11" }, h("sss-custom-fund", null, h("div",
|
|
1005
|
+
return (h(Host, null, h("sss-header-section", null), h("div", { class: "flex justify-center mt-11" }, h("sss-custom-fund", null, h("div", null, h("apollo-super-default-fund", { "backend-url": this.backendUrl, "access-token": this.accessToken }))))));
|
|
964
1006
|
}
|
|
965
|
-
async
|
|
966
|
-
if (
|
|
967
|
-
|
|
1007
|
+
async defaultFundLoadingTimeoutTriggered() {
|
|
1008
|
+
if (superDefaultFundComponentStatus !== SuperDefaultFundComponentStatus.Loaded) {
|
|
1009
|
+
throw Error(`Default Fund component failed to load.`);
|
|
968
1010
|
}
|
|
969
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
970
|
-
history: this.history,
|
|
971
|
-
fundName: `Employer’s default fund`,
|
|
972
|
-
fundDetails: {
|
|
973
|
-
type: 'default',
|
|
974
|
-
fundName: this.defaultFundProductName,
|
|
975
|
-
fundUsi: this.defaultFund.usi
|
|
976
|
-
},
|
|
977
|
-
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
978
|
-
await customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({ standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig));
|
|
979
|
-
}
|
|
980
|
-
});
|
|
981
1011
|
}
|
|
982
1012
|
};
|
|
1013
|
+
injectHistory(SuperDefaultFundHost);
|
|
983
1014
|
|
|
984
1015
|
const dropdownAsyncCss = "html{scroll-behavior:smooth}.sss-dropdown-menu{max-height:min(20rem, 50vh)}";
|
|
985
1016
|
|
|
@@ -12554,7 +12585,7 @@ const Usi = {
|
|
|
12554
12585
|
return usi.replace(/ /g, '');
|
|
12555
12586
|
}
|
|
12556
12587
|
};
|
|
12557
|
-
const LoadWaitingTimeout = 30000;
|
|
12588
|
+
const LoadWaitingTimeout$1 = 30000;
|
|
12558
12589
|
|
|
12559
12590
|
class PromotedFundJoinedEventHandler {
|
|
12560
12591
|
constructor(placementId, history) {
|
|
@@ -12883,7 +12914,7 @@ const SuperCampaignHost = class {
|
|
|
12883
12914
|
SuperCampaignComponentStatus.NotLoaded) {
|
|
12884
12915
|
superCampaingScriptPath = this.createApolloSuperCampaignScriptUrl();
|
|
12885
12916
|
await import(superCampaingScriptPath);
|
|
12886
|
-
this.loadingTimeoutRef = setTimeout(this.superCampaignLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout);
|
|
12917
|
+
this.loadingTimeoutRef = setTimeout(this.superCampaignLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout$1);
|
|
12887
12918
|
}
|
|
12888
12919
|
this.subscribeToSuperCampaignEvents();
|
|
12889
12920
|
this.scriptImported = true;
|
|
@@ -12921,7 +12952,7 @@ const SuperCampaignHost = class {
|
|
|
12921
12952
|
if (superSelectionAppService.superCampaignComponentStatus !== SuperCampaignComponentStatus.Loaded) {
|
|
12922
12953
|
this.activateFallbackMechanism({
|
|
12923
12954
|
type: 'SuperCampaignActivationFailed',
|
|
12924
|
-
reason: `Activation timeout was triggered after:${LoadWaitingTimeout / 1000} seconds`
|
|
12955
|
+
reason: `Activation timeout was triggered after:${LoadWaitingTimeout$1 / 1000} seconds`
|
|
12925
12956
|
});
|
|
12926
12957
|
}
|
|
12927
12958
|
}
|
|
@@ -12943,7 +12974,7 @@ const SuperCampaignHost = class {
|
|
|
12943
12974
|
};
|
|
12944
12975
|
injectHistory(SuperCampaignHost);
|
|
12945
12976
|
|
|
12946
|
-
const LoadWaitingTimeout$
|
|
12977
|
+
const LoadWaitingTimeout$2 = 30000;
|
|
12947
12978
|
|
|
12948
12979
|
var SuperSmsfComponentStatus;
|
|
12949
12980
|
(function (SuperSmsfComponentStatus) {
|
|
@@ -13031,7 +13062,7 @@ const SuperSmsfHost = class {
|
|
|
13031
13062
|
this.backendUrl = superSelectionAppService.backendUrl.value;
|
|
13032
13063
|
this.accessToken = superSelectionAppService.state.jwt.value;
|
|
13033
13064
|
if (superSmsfComponentStatus === SuperSmsfComponentStatus.NotLoaded) {
|
|
13034
|
-
this.loadingTimeoutRef = setTimeout(this.smsfLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout$
|
|
13065
|
+
this.loadingTimeoutRef = setTimeout(this.smsfLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout$2);
|
|
13035
13066
|
}
|
|
13036
13067
|
this.subscribeToSuperSmsfEvents();
|
|
13037
13068
|
}
|
|
@@ -14884,4 +14915,4 @@ const SuperSelectionAppHost = class {
|
|
|
14884
14915
|
};
|
|
14885
14916
|
SuperSelectionAppHost.style = superSelectionAppHostCss;
|
|
14886
14917
|
|
|
14887
|
-
export { Button as sss_button, ChoiceRouter as sss_choice_router, CustomFund as sss_custom_fund,
|
|
14918
|
+
export { Button as sss_button, ChoiceRouter as sss_choice_router, CustomFund as sss_custom_fund, SuperDefaultFundHost as sss_default_fund_host, SelectInputAsync as sss_dropdown_async, ExistingChoice as sss_existing_choice_page, FooterSection as sss_footer_section, HeaderSection as sss_header_section, LoadingIndicator as sss_loading_indicator, LoadingPage as sss_loading_page, MyOwnFundEngagementStep as sss_my_own_fund_engagement_step_host, MemberNameInput as sss_name_input, Prefill as sss_prefill, DisplayField as sss_prefill_display_field, PrefillErrorBox as sss_prefill_error_box, PrefillInvalidMyOwnFund as sss_prefill_invalid_my_own_fund, PrefillInvalidSMSF as sss_prefill_invalid_smsf, PrefillMyOwnFund as sss_prefill_my_own_fund, PrefillSMSF as sss_prefill_smsf, PrefillWarningBox as sss_prefill_warning_box, SmsfEngagementStep as sss_smsf_engagement_step_host, StandardChoiceFormInputDefaultFund as sss_standard_choice_form, Success as sss_success, FeaturedFunds as sss_super_campaign_featured_funds, SuperCampaignHost as sss_super_campaign_host, SuperSmsfHost as sss_super_smsf_host, Route as stencil_route, RouteLink$1 as stencil_route_link, RouteSwitch as stencil_route_switch, Router as stencil_router, SuperSelectionApp as super_selection_app, SuperSelectionAppHost as super_selection_app_host };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-107d7c24.js';
|
|
2
|
+
import { a as superSelectionAppService } from './super-selection-app.service-50f199de.js';
|
|
3
|
+
import './active-router-d18b36fb.js';
|
|
4
|
+
import { i as injectHistory } from './injectHistory-e92e4664.js';
|
|
5
|
+
|
|
6
|
+
const DefaultFundRouter = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
if (superSelectionAppService.isDefaultFundNewComponentEnabled) {
|
|
12
|
+
return (h(Host, null, h("sss-default-fund-host", null)));
|
|
13
|
+
}
|
|
14
|
+
return (h(Host, null, h("sss-default-fund", { history: this.history })));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
injectHistory(DefaultFundRouter);
|
|
18
|
+
|
|
19
|
+
export { DefaultFundRouter as sss_default_fund_router };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getAssetPath, H as Host } from './index-107d7c24.js';
|
|
2
|
+
import { O as Option, a as superSelectionAppService } from './super-selection-app.service-50f199de.js';
|
|
3
|
+
import { E as EventTrackingService, S as SuperSelectionAppRoutes, n as navigationService, c as customFundChoiceApi } from './event-tracking.service-9398a317.js';
|
|
4
|
+
import { a as australianFundLookupService } from './australian-fund-lookup.service-a2f593d3.js';
|
|
5
|
+
|
|
6
|
+
const DefaultFund = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.defaultFundProductName = 'Loading fund...';
|
|
10
|
+
this.eventTrackingService = EventTrackingService.Instance;
|
|
11
|
+
}
|
|
12
|
+
async componentWillLoad() {
|
|
13
|
+
const defaultFundUsi = superSelectionAppService.defaultFundUsi;
|
|
14
|
+
if (Option.isNone(defaultFundUsi)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.isDefaultFundExists = true;
|
|
18
|
+
const defaultFundSearchResult = await australianFundLookupService.getFundAsync(defaultFundUsi.value, true);
|
|
19
|
+
if (Option.isNone(defaultFundSearchResult)) {
|
|
20
|
+
this.isInvalidDefaultFund = true;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
this.defaultFund = defaultFundSearchResult.value;
|
|
24
|
+
this.defaultFundProductName = defaultFundSearchResult.value.productName;
|
|
25
|
+
}
|
|
26
|
+
componentDidLoad() {
|
|
27
|
+
var _a, _b, _c, _d;
|
|
28
|
+
return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({
|
|
29
|
+
fundUsi: (_b = (_a = this.defaultFund) === null || _a === void 0 ? void 0 : _a.usi) !== null && _b !== void 0 ? _b : '',
|
|
30
|
+
fundName: (_d = (_c = this.defaultFund) === null || _c === void 0 ? void 0 : _c.productName) !== null && _d !== void 0 ? _d : '',
|
|
31
|
+
promotedFundsShown: superSelectionAppService.promotedFunds,
|
|
32
|
+
defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi)
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
return (h(Host, null, h("sss-header-section", null), h("div", { class: "flex justify-center mt-11" }, h("sss-custom-fund", null, h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" }, h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"), (!this.isDefaultFundExists || this.isInvalidDefaultFund) && (h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })), h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" }, h("span", null, "It looks like your employer has not specified a default fund, please contact them if you\u2019d like to use your company\u2019s default fund."))))), this.isDefaultFundExists && !this.isInvalidDefaultFund && (h("div", null, h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund Name"), h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm" }, this.defaultFundProductName)), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund USI"), h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm" }, this.defaultFund.usi)), h("div", { class: "mt-8 mb-8 h-px w-full bg-gray-200" }), h("div", { class: "text-sm text-gray-700" }, h("label", { class: "font-semibold text-gray-900" }, "By clicking \u201CContinue\u201D, you acknowledge that:"), h("ul", { class: "list-disc list-outside pl-5" }, h("li", { class: "mt-2" }, "you are choosing to join your employer\u2019s default super fund;"), h("li", { class: "mt-2" }, "your employer will open a new account for you with their default super fund; and"), h("li", { class: "mt-2" }, "your application to join is subject to Trustee approval.")))))), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "sm:max-w-320 w-full" }, this.isDefaultFundExists && !this.isInvalidDefaultFund && (h("div", { class: "mb-4" }, h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm() }, "Continue"))), h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage }, h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back"))))))));
|
|
37
|
+
}
|
|
38
|
+
async handleSubmitForm() {
|
|
39
|
+
if (this.isInvalidDefaultFund) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
navigationService.navigateInternallyToStandardChoice({
|
|
43
|
+
history: this.history,
|
|
44
|
+
fundName: `Employer’s default fund`,
|
|
45
|
+
fundDetails: {
|
|
46
|
+
type: 'default',
|
|
47
|
+
fundName: this.defaultFundProductName,
|
|
48
|
+
fundUsi: this.defaultFund.usi
|
|
49
|
+
},
|
|
50
|
+
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
51
|
+
await customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({ standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export { DefaultFund as sss_default_fund };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-107d7c24.js';
|
|
2
|
-
import {
|
|
2
|
+
import { a as superSelectionAppService, O as Option } from './super-selection-app.service-50f199de.js';
|
|
3
3
|
import './active-router-d18b36fb.js';
|
|
4
|
+
import { i as injectHistory } from './injectHistory-e92e4664.js';
|
|
5
|
+
import { E as EventTrackingService, n as navigationService, S as SuperSelectionAppRoutes, c as customFundChoiceApi } from './event-tracking.service-9398a317.js';
|
|
6
|
+
import { s as state } from './custom-fund.store-dcc61edf.js';
|
|
4
7
|
|
|
5
8
|
const LoadWaitingTimeout = 30000;
|
|
6
9
|
|