@flarehr/apollo-super-selection 1.4.56747 → 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-754c4c99.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-a0063575.system.entry.js +0 -1
- package/dist/lib/apollo-super-selection/p-b00f648b.entry.js +0 -1
- package/dist/lib/apollo-super-selection/p-b52579e3.system.entry.js +0 -69
- 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
|
@@ -4,8 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-eb4f212f.js');
|
|
6
6
|
const datoramaAkita = require('./datorama-akita-6c9cb8fb.js');
|
|
7
|
-
const
|
|
7
|
+
const superSelectionApp_service = require('./super-selection-app.service-ca52a1fc.js');
|
|
8
8
|
const activeRouter = require('./active-router-1f555f75.js');
|
|
9
|
+
const injectHistory = require('./injectHistory-eb188cf0.js');
|
|
10
|
+
const eventTracking_service = require('./event-tracking.service-ed12699a.js');
|
|
11
|
+
const customFund_store = require('./custom-fund.store-3d1ac996.js');
|
|
12
|
+
const australianFundLookup_service = require('./australian-fund-lookup.service-4be59dec.js');
|
|
9
13
|
|
|
10
14
|
function _interopNamespace(e) {
|
|
11
15
|
if (e && e.__esModule) return e;
|
|
@@ -285,19 +289,19 @@ class TapSubscriber extends datoramaAkita.Subscriber {
|
|
|
285
289
|
}
|
|
286
290
|
}
|
|
287
291
|
|
|
288
|
-
const AppVersion = '1.4.
|
|
292
|
+
const AppVersion = '1.4.56843';
|
|
289
293
|
|
|
290
294
|
class Lazy {
|
|
291
295
|
constructor(factory) {
|
|
292
296
|
this.factory = factory;
|
|
293
|
-
this._value =
|
|
297
|
+
this._value = superSelectionApp_service.none;
|
|
294
298
|
}
|
|
295
299
|
get value() {
|
|
296
|
-
if (
|
|
300
|
+
if (superSelectionApp_service.isSome(this._value)) {
|
|
297
301
|
return this._value.value;
|
|
298
302
|
}
|
|
299
303
|
const lazyValue = this.factory();
|
|
300
|
-
this._value =
|
|
304
|
+
this._value = superSelectionApp_service.some(lazyValue);
|
|
301
305
|
return lazyValue;
|
|
302
306
|
}
|
|
303
307
|
}
|
|
@@ -864,22 +868,22 @@ const ChoiceRouter = class {
|
|
|
864
868
|
index.registerInstance(this, hostRef);
|
|
865
869
|
}
|
|
866
870
|
async componentWillLoad() {
|
|
867
|
-
if (
|
|
868
|
-
|
|
871
|
+
if (superSelectionApp_service.superSelectionAppService.superCampaignCanNotBeActivated) {
|
|
872
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.MyOwnFund);
|
|
869
873
|
}
|
|
870
874
|
else {
|
|
871
|
-
|
|
875
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.SuperCampaign);
|
|
872
876
|
}
|
|
873
877
|
}
|
|
874
878
|
render() {
|
|
875
879
|
return index.h(index.Fragment, null);
|
|
876
880
|
}
|
|
877
881
|
};
|
|
878
|
-
|
|
882
|
+
injectHistory.injectHistory(ChoiceRouter);
|
|
879
883
|
|
|
880
884
|
const myOwnFundCustomOption = {
|
|
881
|
-
label:
|
|
882
|
-
value:
|
|
885
|
+
label: customFund_store.CustomFundTypes.MyOwnFund,
|
|
886
|
+
value: eventTracking_service.SuperSelectionAppRoutes.MyOwnFund
|
|
883
887
|
};
|
|
884
888
|
const CustomFund = class {
|
|
885
889
|
constructor(hostRef) {
|
|
@@ -888,36 +892,36 @@ const CustomFund = class {
|
|
|
888
892
|
this.showFundOptionsSelection = false;
|
|
889
893
|
}
|
|
890
894
|
componentWillLoad() {
|
|
891
|
-
let currentRoute =
|
|
892
|
-
if (window.location.pathname.includes(
|
|
893
|
-
currentRoute =
|
|
894
|
-
if (window.location.pathname.includes(
|
|
895
|
-
currentRoute =
|
|
896
|
-
if (window.location.pathname.includes(
|
|
897
|
-
currentRoute =
|
|
898
|
-
if (window.location.pathname.includes(
|
|
899
|
-
currentRoute =
|
|
895
|
+
let currentRoute = eventTracking_service.SuperSelectionAppRoutes.MyOwnFund;
|
|
896
|
+
if (window.location.pathname.includes(eventTracking_service.SuperSelectionAppRoutes.MyOwnFund))
|
|
897
|
+
currentRoute = eventTracking_service.SuperSelectionAppRoutes.MyOwnFund;
|
|
898
|
+
if (window.location.pathname.includes(eventTracking_service.SuperSelectionAppRoutes.DefaultFund))
|
|
899
|
+
currentRoute = eventTracking_service.SuperSelectionAppRoutes.DefaultFund;
|
|
900
|
+
if (window.location.pathname.includes(eventTracking_service.SuperSelectionAppRoutes.SelfManagedFund))
|
|
901
|
+
currentRoute = eventTracking_service.SuperSelectionAppRoutes.SelfManagedFund;
|
|
902
|
+
if (window.location.pathname.includes(eventTracking_service.SuperSelectionAppRoutes.FeaturedFunds))
|
|
903
|
+
currentRoute = eventTracking_service.SuperSelectionAppRoutes.FeaturedFunds;
|
|
900
904
|
this.fundOptionsList = [
|
|
901
905
|
myOwnFundCustomOption,
|
|
902
906
|
{
|
|
903
|
-
label:
|
|
904
|
-
value:
|
|
907
|
+
label: customFund_store.CustomFundTypes.SelfManagedFund,
|
|
908
|
+
value: eventTracking_service.SuperSelectionAppRoutes.SelfManagedFund
|
|
905
909
|
}
|
|
906
910
|
];
|
|
907
|
-
if (
|
|
908
|
-
|
|
911
|
+
if (superSelectionApp_service.superSelectionAppService.isFeaturedFundsEnabled &&
|
|
912
|
+
superSelectionApp_service.superSelectionAppService.isUsingSuperCampaign) {
|
|
909
913
|
this.fundOptionsList.push({
|
|
910
|
-
label:
|
|
911
|
-
value:
|
|
914
|
+
label: customFund_store.CustomFundTypes.FeaturedFunds,
|
|
915
|
+
value: eventTracking_service.SuperSelectionAppRoutes.FeaturedFunds
|
|
912
916
|
});
|
|
913
917
|
}
|
|
914
918
|
this.fundOptionsList.push({
|
|
915
|
-
label:
|
|
916
|
-
value:
|
|
919
|
+
label: customFund_store.CustomFundTypes.DefaultFund,
|
|
920
|
+
value: eventTracking_service.SuperSelectionAppRoutes.DefaultFund
|
|
917
921
|
});
|
|
918
922
|
this.currentCustomFund =
|
|
919
923
|
this.fundOptionsList.find((item) => item.value === currentRoute) || this.currentCustomFund;
|
|
920
|
-
|
|
924
|
+
eventTracking_service.navigationService.navigateInternally(this.history, currentRoute);
|
|
921
925
|
}
|
|
922
926
|
render() {
|
|
923
927
|
const ChevronDownIcon = () => {
|
|
@@ -931,79 +935,106 @@ const CustomFund = class {
|
|
|
931
935
|
'text-gray-500': this.showFundOptionsSelection
|
|
932
936
|
} }, this.showFundOptionsSelection ? 'Select' : this.currentCustomFund.label), index.h("span", { class: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none" }, index.h(ChevronDownIcon, null))), this.showFundOptionsSelection && (index.h("ul", { class: "absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-md py-1 ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none text-base sm:text-sm" }, this.fundOptionsList.map((f) => (index.h("li", { class: "text-gray-900 cursor-default select-none relative py-2 pl-3 pr-9 group hover:bg-primary-base hover:text-white", onClick: () => {
|
|
933
937
|
this.showFundOptionsSelection = !this.showFundOptionsSelection;
|
|
934
|
-
|
|
938
|
+
eventTracking_service.navigationService.navigateInternally(this.history, f.value);
|
|
935
939
|
} }, index.h("span", { class: {
|
|
936
940
|
'block truncate': true,
|
|
937
941
|
'font-semibold': this.currentCustomFund === f
|
|
938
942
|
} }, f.label), this.currentCustomFund === f && (index.h("span", { class: "absolute inset-y-0 right-0 flex items-center pr-4" }, index.h(CheckIcon, null))))))))), index.h("div", { onClick: () => (this.showFundOptionsSelection = false) }, index.h("slot", null))));
|
|
939
943
|
}
|
|
940
944
|
};
|
|
941
|
-
|
|
945
|
+
injectHistory.injectHistory(CustomFund);
|
|
942
946
|
|
|
943
|
-
|
|
944
|
-
async searchFundsAsync(searchString, maxRecordCount) {
|
|
945
|
-
return customFundChoice_api.superSelectionApi.getAustralianFundsAsync({
|
|
946
|
-
searchString,
|
|
947
|
-
maxRecordCount
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
async getFundAsync(usi, includeInactive) {
|
|
951
|
-
const result = await customFundChoice_api.superSelectionApi.getAustralianFundAsync(usi, includeInactive);
|
|
952
|
-
return customFundChoice_api.Option.some(result);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
const australianFundLookupService = new AustralianFundLookupService();
|
|
947
|
+
const LoadWaitingTimeout = 30000;
|
|
956
948
|
|
|
957
|
-
|
|
949
|
+
var SuperDefaultFundComponentStatus;
|
|
950
|
+
(function (SuperDefaultFundComponentStatus) {
|
|
951
|
+
SuperDefaultFundComponentStatus[SuperDefaultFundComponentStatus["NotLoaded"] = 1] = "NotLoaded";
|
|
952
|
+
SuperDefaultFundComponentStatus[SuperDefaultFundComponentStatus["Loaded"] = 2] = "Loaded";
|
|
953
|
+
})(SuperDefaultFundComponentStatus || (SuperDefaultFundComponentStatus = {}));
|
|
954
|
+
let superDefaultFundComponentStatus = SuperDefaultFundComponentStatus.NotLoaded;
|
|
955
|
+
const SuperDefaultFundHost = class {
|
|
958
956
|
constructor(hostRef) {
|
|
959
957
|
index.registerInstance(this, hostRef);
|
|
960
|
-
this.
|
|
961
|
-
this.eventTrackingService =
|
|
958
|
+
this.productName = 'Employer’s default fund';
|
|
959
|
+
this.eventTrackingService = eventTracking_service.EventTrackingService.Instance;
|
|
960
|
+
this.subscribeToSuperDefaultFundEvents = () => {
|
|
961
|
+
for (const eventName in this.defaultFundEventHandlers) {
|
|
962
|
+
document.addEventListener(eventName, this.defaultFundEventHandlers[eventName]);
|
|
963
|
+
}
|
|
964
|
+
};
|
|
965
|
+
this.unSubscribeFromSuperDefaultFundEvents = () => {
|
|
966
|
+
for (const eventName in this.defaultFundEventHandlers) {
|
|
967
|
+
document.removeEventListener(eventName, this.defaultFundEventHandlers[eventName]);
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
this.defaultFundLoaded = async (event) => {
|
|
971
|
+
var _a;
|
|
972
|
+
if (event.detail.sender === 'super-default-fund') {
|
|
973
|
+
superDefaultFundComponentStatus = SuperDefaultFundComponentStatus.Loaded;
|
|
974
|
+
clearTimeout(this.loadingTimeoutRef);
|
|
975
|
+
await this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({
|
|
976
|
+
fundUsi: (_a = event.detail.fundUsi) !== null && _a !== void 0 ? _a : '',
|
|
977
|
+
fundName: this.productName,
|
|
978
|
+
promotedFundsShown: superSelectionApp_service.superSelectionAppService.promotedFunds,
|
|
979
|
+
defaultFundUsiSet: superSelectionApp_service.Option.toUndefined(superSelectionApp_service.superSelectionAppService.defaultFundUsi)
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
return Promise.resolve();
|
|
983
|
+
};
|
|
984
|
+
this.defaultFundCompleted = async (event) => {
|
|
985
|
+
if (event.detail.sender === 'super-default-fund') {
|
|
986
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
987
|
+
history: this.history,
|
|
988
|
+
fundName: this.productName,
|
|
989
|
+
fundDetails: {
|
|
990
|
+
type: 'default',
|
|
991
|
+
fundName: this.productName,
|
|
992
|
+
fundUsi: event.detail.fundUsi
|
|
993
|
+
},
|
|
994
|
+
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
995
|
+
await eventTracking_service.customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({ standardChoiceFormSignature }, superSelectionApp_service.superSelectionAppService.promotedFundsConfig));
|
|
996
|
+
}
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
this.defaultFundCancelled = async (event) => {
|
|
1001
|
+
if (event.detail.sender === 'super-default-fund') {
|
|
1002
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
1003
|
+
}
|
|
1004
|
+
};
|
|
1005
|
+
this.defaultFundEventHandlers = {
|
|
1006
|
+
'default-fund-loaded': this.defaultFundLoaded.bind(this),
|
|
1007
|
+
'default-fund-completed': this.defaultFundCompleted.bind(this),
|
|
1008
|
+
'default-fund-cancelled': this.defaultFundCancelled.bind(this)
|
|
1009
|
+
};
|
|
962
1010
|
}
|
|
963
1011
|
async componentWillLoad() {
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1012
|
+
if (superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.backendUrl) &&
|
|
1013
|
+
superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.state.jwt)) {
|
|
1014
|
+
this.backendUrl = superSelectionApp_service.superSelectionAppService.backendUrl.value;
|
|
1015
|
+
this.accessToken = superSelectionApp_service.superSelectionAppService.state.jwt.value;
|
|
1016
|
+
if (superDefaultFundComponentStatus === SuperDefaultFundComponentStatus.NotLoaded) {
|
|
1017
|
+
this.loadingTimeoutRef = setTimeout(this.defaultFundLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout);
|
|
1018
|
+
}
|
|
1019
|
+
this.subscribeToSuperDefaultFundEvents();
|
|
967
1020
|
}
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
if (customFundChoice_api.Option.isNone(defaultFundSearchResult)) {
|
|
971
|
-
this.isInvalidDefaultFund = true;
|
|
972
|
-
return;
|
|
1021
|
+
else {
|
|
1022
|
+
throw Error(`SuperDefaultFundHost pre-requisites not met.`);
|
|
973
1023
|
}
|
|
974
|
-
this.defaultFund = defaultFundSearchResult.value;
|
|
975
|
-
this.defaultFundProductName = defaultFundSearchResult.value.productName;
|
|
976
1024
|
}
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({
|
|
980
|
-
fundUsi: (_b = (_a = this.defaultFund) === null || _a === void 0 ? void 0 : _a.usi) !== null && _b !== void 0 ? _b : '',
|
|
981
|
-
fundName: (_d = (_c = this.defaultFund) === null || _c === void 0 ? void 0 : _c.productName) !== null && _d !== void 0 ? _d : '',
|
|
982
|
-
promotedFundsShown: customFundChoice_api.superSelectionAppService.promotedFunds,
|
|
983
|
-
defaultFundUsiSet: customFundChoice_api.Option.toUndefined(customFundChoice_api.superSelectionAppService.defaultFundUsi)
|
|
984
|
-
});
|
|
1025
|
+
disconnectedCallback() {
|
|
1026
|
+
clearTimeout(this.loadingTimeoutRef);
|
|
985
1027
|
}
|
|
986
1028
|
render() {
|
|
987
|
-
return (index.h(index.Host, null, index.h("sss-header-section", null), index.h("div", { class: "flex justify-center mt-11" }, index.h("sss-custom-fund", null, index.h("div",
|
|
1029
|
+
return (index.h(index.Host, null, index.h("sss-header-section", null), index.h("div", { class: "flex justify-center mt-11" }, index.h("sss-custom-fund", null, index.h("div", null, index.h("apollo-super-default-fund", { "backend-url": this.backendUrl, "access-token": this.accessToken }))))));
|
|
988
1030
|
}
|
|
989
|
-
async
|
|
990
|
-
if (
|
|
991
|
-
|
|
1031
|
+
async defaultFundLoadingTimeoutTriggered() {
|
|
1032
|
+
if (superDefaultFundComponentStatus !== SuperDefaultFundComponentStatus.Loaded) {
|
|
1033
|
+
throw Error(`Default Fund component failed to load.`);
|
|
992
1034
|
}
|
|
993
|
-
customFundChoice_api.navigationService.navigateInternallyToStandardChoice({
|
|
994
|
-
history: this.history,
|
|
995
|
-
fundName: `Employer’s default fund`,
|
|
996
|
-
fundDetails: {
|
|
997
|
-
type: 'default',
|
|
998
|
-
fundName: this.defaultFundProductName,
|
|
999
|
-
fundUsi: this.defaultFund.usi
|
|
1000
|
-
},
|
|
1001
|
-
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
1002
|
-
await customFundChoice_api.customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({ standardChoiceFormSignature }, customFundChoice_api.superSelectionAppService.promotedFundsConfig));
|
|
1003
|
-
}
|
|
1004
|
-
});
|
|
1005
1035
|
}
|
|
1006
1036
|
};
|
|
1037
|
+
injectHistory.injectHistory(SuperDefaultFundHost);
|
|
1007
1038
|
|
|
1008
1039
|
const dropdownAsyncCss = "html{scroll-behavior:smooth}.sss-dropdown-menu{max-height:min(20rem, 50vh)}";
|
|
1009
1040
|
|
|
@@ -1176,24 +1207,24 @@ SelectInputAsync.style = dropdownAsyncCss;
|
|
|
1176
1207
|
class ExistingFundService {
|
|
1177
1208
|
async GetExistingFundAsync() {
|
|
1178
1209
|
var _a;
|
|
1179
|
-
const choice =
|
|
1180
|
-
const choiceDetails = (_a =
|
|
1210
|
+
const choice = superSelectionApp_service.superSelectionAppService.superBuyer.superChoice;
|
|
1211
|
+
const choiceDetails = (_a = superSelectionApp_service.superSelectionAppService.superBuyer.superChoice) === null || _a === void 0 ? void 0 : _a.choiceDetails;
|
|
1181
1212
|
if (!choice)
|
|
1182
|
-
return
|
|
1213
|
+
return superSelectionApp_service.none;
|
|
1183
1214
|
if (!choiceDetails)
|
|
1184
|
-
return
|
|
1185
|
-
const dateSubmitted = choice.dateSubmitted == undefined ?
|
|
1186
|
-
const usi =
|
|
1187
|
-
const memberNumber =
|
|
1215
|
+
return superSelectionApp_service.none;
|
|
1216
|
+
const dateSubmitted = choice.dateSubmitted == undefined ? superSelectionApp_service.none : superSelectionApp_service.some(new Date(choice.dateSubmitted));
|
|
1217
|
+
const usi = superSelectionApp_service.getSuperChoiceUsi(choiceDetails);
|
|
1218
|
+
const memberNumber = superSelectionApp_service.getSuperChoiceMemberNumber(choiceDetails);
|
|
1188
1219
|
switch (choiceDetails.kind) {
|
|
1189
1220
|
case 'Promoted': {
|
|
1190
|
-
if (
|
|
1191
|
-
return
|
|
1221
|
+
if (superSelectionApp_service.isNone(usi))
|
|
1222
|
+
return superSelectionApp_service.none;
|
|
1192
1223
|
const fund = await this.getFundByUsiAsync(usi.value);
|
|
1193
|
-
return
|
|
1224
|
+
return superSelectionApp_service.some({
|
|
1194
1225
|
type: 'Promoted Fund',
|
|
1195
|
-
id:
|
|
1196
|
-
name:
|
|
1226
|
+
id: superSelectionApp_service.getPromotedFundId(choiceDetails.promoted),
|
|
1227
|
+
name: superSelectionApp_service.isSome(fund) ? fund.value.productName : usi.value,
|
|
1197
1228
|
usi: usi,
|
|
1198
1229
|
valid: 'Active',
|
|
1199
1230
|
memberNumber: memberNumber,
|
|
@@ -1203,9 +1234,9 @@ class ExistingFundService {
|
|
|
1203
1234
|
case 'MyOwnFund': {
|
|
1204
1235
|
const fundUsi = choiceDetails.myOwnFund.usi;
|
|
1205
1236
|
const fund = await this.getFundByUsiAsync(fundUsi);
|
|
1206
|
-
return
|
|
1237
|
+
return superSelectionApp_service.some({
|
|
1207
1238
|
type: 'My Own Fund',
|
|
1208
|
-
name:
|
|
1239
|
+
name: superSelectionApp_service.isSome(fund) ? fund.value.productName : fundUsi,
|
|
1209
1240
|
usi: usi,
|
|
1210
1241
|
valid: this.toFundValidState(fund),
|
|
1211
1242
|
memberNumber: memberNumber,
|
|
@@ -1213,7 +1244,7 @@ class ExistingFundService {
|
|
|
1213
1244
|
});
|
|
1214
1245
|
}
|
|
1215
1246
|
case 'SMSF':
|
|
1216
|
-
return
|
|
1247
|
+
return superSelectionApp_service.some({
|
|
1217
1248
|
type: 'Self Managed Fund',
|
|
1218
1249
|
name: choiceDetails.smsf.fundName,
|
|
1219
1250
|
valid: 'Unknown',
|
|
@@ -1222,9 +1253,9 @@ class ExistingFundService {
|
|
|
1222
1253
|
case 'Default': {
|
|
1223
1254
|
const defaultUsi = choiceDetails.default.usi;
|
|
1224
1255
|
const defaultFund = await this.getFundByUsiAsync(defaultUsi);
|
|
1225
|
-
return
|
|
1256
|
+
return superSelectionApp_service.some({
|
|
1226
1257
|
type: 'Default Fund',
|
|
1227
|
-
name:
|
|
1258
|
+
name: superSelectionApp_service.isSome(defaultFund) ? defaultFund.value.productName : defaultUsi,
|
|
1228
1259
|
usi: usi,
|
|
1229
1260
|
valid: this.toFundValidState(defaultFund),
|
|
1230
1261
|
lastNominatedAt: dateSubmitted
|
|
@@ -1233,10 +1264,10 @@ class ExistingFundService {
|
|
|
1233
1264
|
case 'PromotedDefault': {
|
|
1234
1265
|
const defaultUsi = choiceDetails.promotedDefault.usi;
|
|
1235
1266
|
const defaultFund = await this.getFundByUsiAsync(defaultUsi);
|
|
1236
|
-
return
|
|
1267
|
+
return superSelectionApp_service.some({
|
|
1237
1268
|
type: 'Promoted Default Fund',
|
|
1238
1269
|
id: choiceDetails.promotedDefault.fundId,
|
|
1239
|
-
name:
|
|
1270
|
+
name: superSelectionApp_service.isSome(defaultFund) ? defaultFund.value.productName : defaultUsi,
|
|
1240
1271
|
usi: usi,
|
|
1241
1272
|
valid: this.toFundValidState(defaultFund),
|
|
1242
1273
|
lastNominatedAt: dateSubmitted
|
|
@@ -1245,9 +1276,9 @@ class ExistingFundService {
|
|
|
1245
1276
|
case 'DefinedBenefits': {
|
|
1246
1277
|
const defaultUsi = choiceDetails.definedBenefits.usi;
|
|
1247
1278
|
const fund = await this.getFundByUsiAsync(defaultUsi);
|
|
1248
|
-
return
|
|
1279
|
+
return superSelectionApp_service.some({
|
|
1249
1280
|
type: 'Defined Benefits Fund',
|
|
1250
|
-
name:
|
|
1281
|
+
name: superSelectionApp_service.isSome(fund) ? fund.value.productName : defaultUsi,
|
|
1251
1282
|
usi: usi,
|
|
1252
1283
|
valid: this.toFundValidState(fund),
|
|
1253
1284
|
lastNominatedAt: dateSubmitted
|
|
@@ -1256,10 +1287,10 @@ class ExistingFundService {
|
|
|
1256
1287
|
case 'PromotedDefaultWithJoin': {
|
|
1257
1288
|
const defaultUsi = choiceDetails.promotedDefaultWithJoin.usi;
|
|
1258
1289
|
const defaultFund = await this.getFundByUsiAsync(defaultUsi);
|
|
1259
|
-
return
|
|
1290
|
+
return superSelectionApp_service.some({
|
|
1260
1291
|
type: 'Promoted Default Fund With Join',
|
|
1261
1292
|
id: choiceDetails.promotedDefaultWithJoin.fundId,
|
|
1262
|
-
name:
|
|
1293
|
+
name: superSelectionApp_service.isSome(defaultFund) ? defaultFund.value.productName : defaultUsi,
|
|
1263
1294
|
usi: usi,
|
|
1264
1295
|
valid: this.toFundValidState(defaultFund),
|
|
1265
1296
|
memberNumber: memberNumber,
|
|
@@ -1267,11 +1298,11 @@ class ExistingFundService {
|
|
|
1267
1298
|
});
|
|
1268
1299
|
}
|
|
1269
1300
|
default:
|
|
1270
|
-
return
|
|
1301
|
+
return superSelectionApp_service.none;
|
|
1271
1302
|
}
|
|
1272
1303
|
}
|
|
1273
1304
|
async submitRetainSuperFundAsync(dto) {
|
|
1274
|
-
return
|
|
1305
|
+
return superSelectionApp_service.buildBackendApiClient()
|
|
1275
1306
|
.url('super-choice/retain-super-fund')
|
|
1276
1307
|
.post(dto)
|
|
1277
1308
|
.badRequest(() => {
|
|
@@ -1280,10 +1311,10 @@ class ExistingFundService {
|
|
|
1280
1311
|
.text();
|
|
1281
1312
|
}
|
|
1282
1313
|
getFundByUsiAsync(usi) {
|
|
1283
|
-
return australianFundLookupService.getFundAsync(usi, true);
|
|
1314
|
+
return australianFundLookup_service.australianFundLookupService.getFundAsync(usi, true);
|
|
1284
1315
|
}
|
|
1285
1316
|
toFundValidState(fund) {
|
|
1286
|
-
if (
|
|
1317
|
+
if (superSelectionApp_service.isSome(fund)) {
|
|
1287
1318
|
return fund.value.isActive ? 'Active' : 'Inactive';
|
|
1288
1319
|
}
|
|
1289
1320
|
else {
|
|
@@ -1296,10 +1327,10 @@ const existingFundService = new ExistingFundService();
|
|
|
1296
1327
|
const ExistingChoice = class {
|
|
1297
1328
|
constructor(hostRef) {
|
|
1298
1329
|
index.registerInstance(this, hostRef);
|
|
1299
|
-
this.eventTrackingService =
|
|
1330
|
+
this.eventTrackingService = eventTracking_service.EventTrackingService.Instance;
|
|
1300
1331
|
this.createSuperFundNominationDetail = (fund) => {
|
|
1301
1332
|
function toUndefined(opt) {
|
|
1302
|
-
return
|
|
1333
|
+
return superSelectionApp_service.isSome(opt) ? opt.value : undefined;
|
|
1303
1334
|
}
|
|
1304
1335
|
function getUsi(fund) {
|
|
1305
1336
|
return 'usi' in fund ? toUndefined(fund.usi) : undefined;
|
|
@@ -1313,7 +1344,7 @@ const ExistingChoice = class {
|
|
|
1313
1344
|
fundUsi: getUsi(fund),
|
|
1314
1345
|
memberNumber: getMemberNumber(fund),
|
|
1315
1346
|
fundStatus: fund.valid.toString(),
|
|
1316
|
-
lastNominatedAt:
|
|
1347
|
+
lastNominatedAt: superSelectionApp_service.isSome(fund.lastNominatedAt) ? fund.lastNominatedAt.value.toISOString() : ''
|
|
1317
1348
|
};
|
|
1318
1349
|
};
|
|
1319
1350
|
}
|
|
@@ -1323,11 +1354,11 @@ const ExistingChoice = class {
|
|
|
1323
1354
|
}
|
|
1324
1355
|
async componentWillLoad() {
|
|
1325
1356
|
const chosenFundOption = await existingFundService.GetExistingFundAsync();
|
|
1326
|
-
if (
|
|
1357
|
+
if (superSelectionApp_service.isSome(chosenFundOption) && chosenFundOption.value.valid !== 'Inactive') {
|
|
1327
1358
|
this.existingFund = chosenFundOption.value;
|
|
1328
1359
|
}
|
|
1329
1360
|
else {
|
|
1330
|
-
|
|
1361
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
1331
1362
|
}
|
|
1332
1363
|
}
|
|
1333
1364
|
render() {
|
|
@@ -1385,12 +1416,12 @@ const ExistingChoice = class {
|
|
|
1385
1416
|
async handleFundNominationAccepted() {
|
|
1386
1417
|
const detail = this.createSuperFundNominationDetail(this.existingFund);
|
|
1387
1418
|
await existingFundService.submitRetainSuperFundAsync(detail);
|
|
1388
|
-
|
|
1419
|
+
superSelectionApp_service.superSelectionAppService.markSuperSelectionAsSubmitted();
|
|
1389
1420
|
}
|
|
1390
1421
|
async handleFundNominationDeclined() {
|
|
1391
1422
|
const detail = this.createSuperFundNominationDetail(this.existingFund);
|
|
1392
1423
|
await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(detail);
|
|
1393
|
-
|
|
1424
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
1394
1425
|
}
|
|
1395
1426
|
};
|
|
1396
1427
|
|
|
@@ -1403,8 +1434,8 @@ const FooterSection = class {
|
|
|
1403
1434
|
render() {
|
|
1404
1435
|
return (index.h("div", { class: {
|
|
1405
1436
|
'text-center text-gray-500 text-xs w-full max-w-960 mx-auto': true,
|
|
1406
|
-
'mt-8 sm:mt-20': !
|
|
1407
|
-
} }, !
|
|
1437
|
+
'mt-8 sm:mt-20': !superSelectionApp_service.superSelectionAppService.hideFooterSection
|
|
1438
|
+
} }, !superSelectionApp_service.superSelectionAppService.hideFooterSection && index.h("span", null, this.footerText()), index.h("p", { class: "block text-transparent" }, "v", AppVersion)));
|
|
1408
1439
|
}
|
|
1409
1440
|
};
|
|
1410
1441
|
|
|
@@ -1416,15 +1447,15 @@ const RouteLink = (props, children) => {
|
|
|
1416
1447
|
} }, children)));
|
|
1417
1448
|
};
|
|
1418
1449
|
const ChooseAnotherFundLink = (props) => {
|
|
1419
|
-
let route =
|
|
1420
|
-
if (window.location.href.includes(
|
|
1421
|
-
route =
|
|
1450
|
+
let route = eventTracking_service.SuperSelectionAppRoutes.MyOwnFund;
|
|
1451
|
+
if (window.location.href.includes(eventTracking_service.SuperSelectionAppRoutes.SelfManagedFund)) {
|
|
1452
|
+
route = eventTracking_service.SuperSelectionAppRoutes.SelfManagedFund;
|
|
1422
1453
|
}
|
|
1423
|
-
else if (window.location.href.includes(
|
|
1424
|
-
route =
|
|
1454
|
+
else if (window.location.href.includes(eventTracking_service.SuperSelectionAppRoutes.DefaultFund)) {
|
|
1455
|
+
route = eventTracking_service.SuperSelectionAppRoutes.DefaultFund;
|
|
1425
1456
|
}
|
|
1426
|
-
else if (window.location.href.includes(
|
|
1427
|
-
route =
|
|
1457
|
+
else if (window.location.href.includes(eventTracking_service.SuperSelectionAppRoutes.FeaturedFunds)) {
|
|
1458
|
+
route = eventTracking_service.SuperSelectionAppRoutes.FeaturedFunds;
|
|
1428
1459
|
}
|
|
1429
1460
|
return (index.h(RouteLink, { route: route, isActive: props.isActive }, "Choose another fund"));
|
|
1430
1461
|
};
|
|
@@ -1433,7 +1464,7 @@ const HeaderSection = class {
|
|
|
1433
1464
|
index.registerInstance(this, hostRef);
|
|
1434
1465
|
}
|
|
1435
1466
|
render() {
|
|
1436
|
-
return (index.h("div", { class: "flex justify-center" }, index.h("div", { class: "text-center max-w-800" }, index.h("h3", { class: "font-bold mb-3 sm:mb-4 text-2xl sm:text-3xl" }, "Nominate a super fund"), index.h(index.Fragment, null, index.h("div", { class: "text-gray-600 sm:text-lg leading-7 sm:leading-8" },
|
|
1467
|
+
return (index.h("div", { class: "flex justify-center" }, index.h("div", { class: "text-center max-w-800" }, index.h("h3", { class: "font-bold mb-3 sm:mb-4 text-2xl sm:text-3xl" }, "Nominate a super fund"), index.h(index.Fragment, null, index.h("div", { class: "text-gray-600 sm:text-lg leading-7 sm:leading-8" }, superSelectionApp_service.superSelectionAppService.superCampaignCanNotBeActivated ? (index.h(index.Fragment, null, "You can choose any super fund, including your current fund/SMSF or your employer\u2019s default fund.")) : (index.h(index.Fragment, null, "You can choose any super fund, including your current fund/SMSF, your employer\u2019s default fund, or alternatively, you can select from one of the featured\u00A0funds."))), !superSelectionApp_service.superSelectionAppService.superCampaignCanNotBeActivated && (index.h("div", { class: "inline-flex mt-8 sm:mt-12 bg-primary-base rounded-lg p-0.5 whitespace-normal" }, index.h(RouteLink, { route: eventTracking_service.SuperSelectionAppRoutes.ChoicePage, isActive: false }, "Featured super funds"), index.h(ChooseAnotherFundLink, { isActive: true })))))));
|
|
1437
1468
|
}
|
|
1438
1469
|
};
|
|
1439
1470
|
|
|
@@ -1462,7 +1493,7 @@ const MyOwnFundEngagementStep = class {
|
|
|
1462
1493
|
index.registerInstance(this, hostRef);
|
|
1463
1494
|
this.stepContinued = async (event) => {
|
|
1464
1495
|
if (event.detail.sender == 'byof-engagement') {
|
|
1465
|
-
await
|
|
1496
|
+
await eventTracking_service.EventTrackingService.Instance.TrackSuperMyOwnFundEngagementStepContinued(this.fundUsi, event.detail.reason);
|
|
1466
1497
|
this.navigateToStandardChoice();
|
|
1467
1498
|
}
|
|
1468
1499
|
};
|
|
@@ -1481,40 +1512,40 @@ const MyOwnFundEngagementStep = class {
|
|
|
1481
1512
|
};
|
|
1482
1513
|
}
|
|
1483
1514
|
async componentWillLoad() {
|
|
1484
|
-
if (
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
this.backendUrl =
|
|
1494
|
-
this.accessToken =
|
|
1495
|
-
this.fundUsi =
|
|
1496
|
-
this.fundName =
|
|
1497
|
-
this.memberNumber =
|
|
1498
|
-
this.memberFirstName =
|
|
1499
|
-
this.memberFamilyName =
|
|
1515
|
+
if (superSelectionApp_service.superSelectionAppService.isBringYourOwnFundCustomStepEnabled &&
|
|
1516
|
+
superSelectionApp_service.superSelectionAppService.isUsingSuperCampaign &&
|
|
1517
|
+
superSelectionApp_service.Option.isSome(customFund_store.state.myOwnFundForm.fundUsi) &&
|
|
1518
|
+
superSelectionApp_service.Option.isSome(customFund_store.state.myOwnFundForm.fundName) &&
|
|
1519
|
+
superSelectionApp_service.Option.isSome(customFund_store.state.myOwnFundForm.memberNumber) &&
|
|
1520
|
+
superSelectionApp_service.Option.isSome(customFund_store.state.myOwnFundForm.memberFirstName) &&
|
|
1521
|
+
superSelectionApp_service.Option.isSome(customFund_store.state.myOwnFundForm.memberFamilyName) &&
|
|
1522
|
+
superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.backendUrl) &&
|
|
1523
|
+
superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.state.jwt)) {
|
|
1524
|
+
this.backendUrl = superSelectionApp_service.superSelectionAppService.backendUrl.value;
|
|
1525
|
+
this.accessToken = superSelectionApp_service.superSelectionAppService.state.jwt.value;
|
|
1526
|
+
this.fundUsi = customFund_store.state.myOwnFundForm.fundUsi.value;
|
|
1527
|
+
this.fundName = customFund_store.state.myOwnFundForm.fundName.value;
|
|
1528
|
+
this.memberNumber = customFund_store.state.myOwnFundForm.memberNumber.value;
|
|
1529
|
+
this.memberFirstName = customFund_store.state.myOwnFundForm.memberFirstName.value;
|
|
1530
|
+
this.memberFamilyName = customFund_store.state.myOwnFundForm.memberFamilyName.value;
|
|
1500
1531
|
this.unSubscribeFromStepEvents();
|
|
1501
1532
|
this.subscribeToStepEvents();
|
|
1502
|
-
|
|
1503
|
-
await
|
|
1533
|
+
superSelectionApp_service.superSelectionAppService.hideFooterSection = true;
|
|
1534
|
+
await eventTracking_service.EventTrackingService.Instance.TrackSuperMyOwnFundEngagementStepActivationSucceeded(this.fundUsi);
|
|
1504
1535
|
}
|
|
1505
1536
|
else {
|
|
1506
|
-
|
|
1537
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.MyOwnFund);
|
|
1507
1538
|
}
|
|
1508
1539
|
}
|
|
1509
1540
|
disconnectedCallback() {
|
|
1510
1541
|
this.unSubscribeFromStepEvents();
|
|
1511
|
-
|
|
1542
|
+
superSelectionApp_service.superSelectionAppService.hideFooterSection = false;
|
|
1512
1543
|
}
|
|
1513
1544
|
render() {
|
|
1514
1545
|
return (index.h(index.Host, null, index.h("apollo-super-byof-engagement", { "backend-url": this.backendUrl, "access-token": this.accessToken, "fund-usi": this.fundUsi })));
|
|
1515
1546
|
}
|
|
1516
1547
|
navigateToStandardChoice() {
|
|
1517
|
-
|
|
1548
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
1518
1549
|
history: this.history,
|
|
1519
1550
|
fundName: this.fundName,
|
|
1520
1551
|
fundDetails: {
|
|
@@ -1524,13 +1555,13 @@ const MyOwnFundEngagementStep = class {
|
|
|
1524
1555
|
memberNumber: this.memberNumber
|
|
1525
1556
|
},
|
|
1526
1557
|
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
1527
|
-
const customFundChoiceDto = Object.assign({ fundUsi: this.fundUsi, memberNumber: this.memberNumber, memberFirstName: this.memberFirstName, memberFamilyName: this.memberFamilyName, standardChoiceFormSignature },
|
|
1528
|
-
await
|
|
1558
|
+
const customFundChoiceDto = Object.assign({ fundUsi: this.fundUsi, memberNumber: this.memberNumber, memberFirstName: this.memberFirstName, memberFamilyName: this.memberFamilyName, standardChoiceFormSignature }, superSelectionApp_service.superSelectionAppService.promotedFundsConfig);
|
|
1559
|
+
await eventTracking_service.customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
|
|
1529
1560
|
}
|
|
1530
1561
|
});
|
|
1531
1562
|
}
|
|
1532
1563
|
};
|
|
1533
|
-
|
|
1564
|
+
injectHistory.injectHistory(MyOwnFundEngagementStep);
|
|
1534
1565
|
|
|
1535
1566
|
const MemberNameInput = class {
|
|
1536
1567
|
constructor(hostRef) {
|
|
@@ -1597,8 +1628,8 @@ const Prefill = class {
|
|
|
1597
1628
|
window.removeEventListener('popstate', this.ignorePopState);
|
|
1598
1629
|
}
|
|
1599
1630
|
async componentWillLoad() {
|
|
1600
|
-
this.prefill =
|
|
1601
|
-
?
|
|
1631
|
+
this.prefill = superSelectionApp_service.isSome(superSelectionApp_service.superSelectionAppService.state.superChoicePrefill)
|
|
1632
|
+
? superSelectionApp_service.superSelectionAppService.state.superChoicePrefill.value
|
|
1602
1633
|
: undefined;
|
|
1603
1634
|
}
|
|
1604
1635
|
render() {
|
|
@@ -1618,7 +1649,7 @@ const Prefill = class {
|
|
|
1618
1649
|
return this.renderInvalidSMSF(this.prefill.data);
|
|
1619
1650
|
}
|
|
1620
1651
|
}
|
|
1621
|
-
|
|
1652
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
1622
1653
|
return null;
|
|
1623
1654
|
}
|
|
1624
1655
|
renderMyOwnFund(data) {
|
|
@@ -1979,7 +2010,7 @@ class BankAccountNumber extends FormField {
|
|
|
1979
2010
|
const PrefillInvalidMyOwnFund = class {
|
|
1980
2011
|
constructor(hostRef) {
|
|
1981
2012
|
index.registerInstance(this, hostRef);
|
|
1982
|
-
this.eventTrackingService =
|
|
2013
|
+
this.eventTrackingService = eventTracking_service.EventTrackingService.Instance;
|
|
1983
2014
|
this.createSuperFundPrefillDeclinedDetail = (prefill) => {
|
|
1984
2015
|
return {
|
|
1985
2016
|
fundType: 'My Own Fund',
|
|
@@ -2014,7 +2045,7 @@ const PrefillInvalidMyOwnFund = class {
|
|
|
2014
2045
|
else {
|
|
2015
2046
|
// If prefill does not exist, or is valid we should
|
|
2016
2047
|
// not have landed on this page, navigate to choice page
|
|
2017
|
-
|
|
2048
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
2018
2049
|
}
|
|
2019
2050
|
}
|
|
2020
2051
|
render() {
|
|
@@ -2025,14 +2056,14 @@ const PrefillInvalidMyOwnFund = class {
|
|
|
2025
2056
|
async handleChooseAnotherFund() {
|
|
2026
2057
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
2027
2058
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
2028
|
-
return
|
|
2059
|
+
return eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
2029
2060
|
}
|
|
2030
2061
|
};
|
|
2031
2062
|
|
|
2032
2063
|
const PrefillInvalidSMSF = class {
|
|
2033
2064
|
constructor(hostRef) {
|
|
2034
2065
|
index.registerInstance(this, hostRef);
|
|
2035
|
-
this.eventTrackingService =
|
|
2066
|
+
this.eventTrackingService = eventTracking_service.EventTrackingService.Instance;
|
|
2036
2067
|
this.createSuperFundPrefillDeclinedDetail = (prefill) => {
|
|
2037
2068
|
return {
|
|
2038
2069
|
fundType: 'SMSF',
|
|
@@ -2061,7 +2092,7 @@ const PrefillInvalidSMSF = class {
|
|
|
2061
2092
|
else {
|
|
2062
2093
|
// If prefill does not exist, or is valid we should
|
|
2063
2094
|
// not have landed on this page, navigate to PrefillInvalidMyOwnFundPage page
|
|
2064
|
-
|
|
2095
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
|
|
2065
2096
|
}
|
|
2066
2097
|
}
|
|
2067
2098
|
render() {
|
|
@@ -2088,7 +2119,7 @@ const PrefillInvalidSMSF = class {
|
|
|
2088
2119
|
async handleFundNominationDeclined() {
|
|
2089
2120
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
2090
2121
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
2091
|
-
return
|
|
2122
|
+
return eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
2092
2123
|
}
|
|
2093
2124
|
};
|
|
2094
2125
|
|
|
@@ -2098,7 +2129,7 @@ const PrefillMyOwnFund = class {
|
|
|
2098
2129
|
this.mode = 'review';
|
|
2099
2130
|
this.formState = 'pristine';
|
|
2100
2131
|
this.isSubmitDisabled = true;
|
|
2101
|
-
this.eventTrackingService =
|
|
2132
|
+
this.eventTrackingService = eventTracking_service.EventTrackingService.Instance;
|
|
2102
2133
|
this.createSuperFundPrefillDeclinedDetail = (prefill) => {
|
|
2103
2134
|
return {
|
|
2104
2135
|
fundType: 'My Own Fund',
|
|
@@ -2129,7 +2160,7 @@ const PrefillMyOwnFund = class {
|
|
|
2129
2160
|
else {
|
|
2130
2161
|
// If prefill does not exist, or is invalid we should
|
|
2131
2162
|
// not have landed on this page, navigate to choice page
|
|
2132
|
-
|
|
2163
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
2133
2164
|
}
|
|
2134
2165
|
}
|
|
2135
2166
|
render() {
|
|
@@ -2192,7 +2223,7 @@ const PrefillMyOwnFund = class {
|
|
|
2192
2223
|
if (this.mode === 'edit' && !this.formElement.checkValidity()) {
|
|
2193
2224
|
return;
|
|
2194
2225
|
}
|
|
2195
|
-
|
|
2226
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
2196
2227
|
history: this.history,
|
|
2197
2228
|
fundName: this.fundName.value,
|
|
2198
2229
|
fundDetails: {
|
|
@@ -2202,15 +2233,15 @@ const PrefillMyOwnFund = class {
|
|
|
2202
2233
|
memberNumber: this.memberNumber.value
|
|
2203
2234
|
},
|
|
2204
2235
|
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
2205
|
-
const customFundChoiceDto = Object.assign({ fundUsi: this.fundUsi.value, memberNumber: this.memberNumber.value, memberFirstName: this.memberGivenNames.value, memberFamilyName: this.memberLastName.value, standardChoiceFormSignature },
|
|
2206
|
-
await
|
|
2236
|
+
const customFundChoiceDto = Object.assign({ fundUsi: this.fundUsi.value, memberNumber: this.memberNumber.value, memberFirstName: this.memberGivenNames.value, memberFamilyName: this.memberLastName.value, standardChoiceFormSignature }, superSelectionApp_service.superSelectionAppService.promotedFundsConfig);
|
|
2237
|
+
await eventTracking_service.customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
|
|
2207
2238
|
}
|
|
2208
2239
|
});
|
|
2209
2240
|
}
|
|
2210
2241
|
async handleFundNominationDeclined() {
|
|
2211
2242
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
2212
2243
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
2213
|
-
return
|
|
2244
|
+
return eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
2214
2245
|
}
|
|
2215
2246
|
};
|
|
2216
2247
|
|
|
@@ -2332,7 +2363,7 @@ const PrefillSMSF = class {
|
|
|
2332
2363
|
this.mode = 'review';
|
|
2333
2364
|
this.formState = 'pristine';
|
|
2334
2365
|
this.isSubmitDisabled = true;
|
|
2335
|
-
this.eventTrackingService =
|
|
2366
|
+
this.eventTrackingService = eventTracking_service.EventTrackingService.Instance;
|
|
2336
2367
|
this.createSuperFundPrefillDeclinedDetail = (prefill) => {
|
|
2337
2368
|
return {
|
|
2338
2369
|
fundType: 'SMSF',
|
|
@@ -2361,7 +2392,7 @@ const PrefillSMSF = class {
|
|
|
2361
2392
|
else {
|
|
2362
2393
|
// If prefill does not exist, or is invalid we should
|
|
2363
2394
|
// not have landed on this page, navigate to PrefillInvalidSMSFPage page
|
|
2364
|
-
|
|
2395
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.PrefillInvalidSMSFPage);
|
|
2365
2396
|
}
|
|
2366
2397
|
}
|
|
2367
2398
|
render() {
|
|
@@ -2513,7 +2544,7 @@ const PrefillSMSF = class {
|
|
|
2513
2544
|
if (this.mode === 'edit' && !this.formElement.checkValidity()) {
|
|
2514
2545
|
return;
|
|
2515
2546
|
}
|
|
2516
|
-
|
|
2547
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
2517
2548
|
history: this.history,
|
|
2518
2549
|
fundName: 'Self-managed super fund',
|
|
2519
2550
|
fundDetails: {
|
|
@@ -2540,8 +2571,8 @@ const PrefillSMSF = class {
|
|
|
2540
2571
|
electronicServiceAddress: this.fundEsa.value,
|
|
2541
2572
|
memberFirstName: this.memberGivenNames.value,
|
|
2542
2573
|
memberFamilyName: this.memberLastName.value
|
|
2543
|
-
}, standardChoiceFormSignature },
|
|
2544
|
-
await
|
|
2574
|
+
}, standardChoiceFormSignature }, superSelectionApp_service.superSelectionAppService.promotedFundsConfig);
|
|
2575
|
+
await eventTracking_service.customFundChoiceApi.submitSelfManagedFundChoiceAsync(smsfChoiceDto);
|
|
2545
2576
|
}
|
|
2546
2577
|
});
|
|
2547
2578
|
}
|
|
@@ -2567,7 +2598,7 @@ const PrefillSMSF = class {
|
|
|
2567
2598
|
async handleFundNominationDeclined() {
|
|
2568
2599
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
2569
2600
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
2570
|
-
return
|
|
2601
|
+
return eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
2571
2602
|
}
|
|
2572
2603
|
};
|
|
2573
2604
|
|
|
@@ -2602,7 +2633,7 @@ const SmsfEngagementStep = class {
|
|
|
2602
2633
|
};
|
|
2603
2634
|
this.stepContinued = async (event) => {
|
|
2604
2635
|
if (event.detail.sender == 'smsf-engagement') {
|
|
2605
|
-
await
|
|
2636
|
+
await eventTracking_service.EventTrackingService.Instance.TrackSuperSmsfEngagementStepContinued(event.detail.reason);
|
|
2606
2637
|
this.navigateToStandardChoice();
|
|
2607
2638
|
}
|
|
2608
2639
|
};
|
|
@@ -2621,34 +2652,34 @@ const SmsfEngagementStep = class {
|
|
|
2621
2652
|
};
|
|
2622
2653
|
}
|
|
2623
2654
|
async componentWillLoad() {
|
|
2624
|
-
if (
|
|
2625
|
-
|
|
2626
|
-
this.allFormFieldsAreFilled(
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
this.backendUrl =
|
|
2630
|
-
this.accessToken =
|
|
2631
|
-
this.accountId =
|
|
2632
|
-
this.partnerId =
|
|
2633
|
-
this.initialiseFormState(
|
|
2655
|
+
if (superSelectionApp_service.superSelectionAppService.isSmsfCustomStepEnabled &&
|
|
2656
|
+
superSelectionApp_service.superSelectionAppService.isUsingSuperCampaign &&
|
|
2657
|
+
this.allFormFieldsAreFilled(customFund_store.state.selfManagedFundForm) &&
|
|
2658
|
+
superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.backendUrl) &&
|
|
2659
|
+
superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.state.jwt)) {
|
|
2660
|
+
this.backendUrl = superSelectionApp_service.superSelectionAppService.backendUrl.value;
|
|
2661
|
+
this.accessToken = superSelectionApp_service.superSelectionAppService.state.jwt.value;
|
|
2662
|
+
this.accountId = superSelectionApp_service.superSelectionAppService.accountIdOrDefault;
|
|
2663
|
+
this.partnerId = superSelectionApp_service.superSelectionAppService.partnerIdOrDefault;
|
|
2664
|
+
this.initialiseFormState(customFund_store.state.selfManagedFundForm);
|
|
2634
2665
|
this.unSubscribeFromStepEvents();
|
|
2635
2666
|
this.subscribeToStepEvents();
|
|
2636
|
-
|
|
2637
|
-
await
|
|
2667
|
+
superSelectionApp_service.superSelectionAppService.hideFooterSection = true;
|
|
2668
|
+
await eventTracking_service.EventTrackingService.Instance.TrackSuperSmsfEngagementStepActivationSucceeded();
|
|
2638
2669
|
}
|
|
2639
2670
|
else {
|
|
2640
|
-
|
|
2671
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.SelfManagedFund);
|
|
2641
2672
|
}
|
|
2642
2673
|
}
|
|
2643
2674
|
disconnectedCallback() {
|
|
2644
2675
|
this.unSubscribeFromStepEvents();
|
|
2645
|
-
|
|
2676
|
+
superSelectionApp_service.superSelectionAppService.hideFooterSection = false;
|
|
2646
2677
|
}
|
|
2647
2678
|
render() {
|
|
2648
2679
|
return (index.h(index.Host, null, index.h("apollo-super-smsf-engagement", { "backend-url": this.backendUrl, "access-token": this.accessToken, "account-id": this.accountId, "partner-id": this.partnerId })));
|
|
2649
2680
|
}
|
|
2650
2681
|
navigateToStandardChoice() {
|
|
2651
|
-
|
|
2682
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
2652
2683
|
history: this.history,
|
|
2653
2684
|
fundName: 'Self-managed super fund',
|
|
2654
2685
|
fundDetails: {
|
|
@@ -2673,8 +2704,8 @@ const SmsfEngagementStep = class {
|
|
|
2673
2704
|
electronicServiceAddress: this.fundEsa,
|
|
2674
2705
|
memberFirstName: this.memberFirstName,
|
|
2675
2706
|
memberFamilyName: this.memberFamilyName
|
|
2676
|
-
}, standardChoiceFormSignature },
|
|
2677
|
-
await
|
|
2707
|
+
}, standardChoiceFormSignature }, superSelectionApp_service.superSelectionAppService.promotedFundsConfig);
|
|
2708
|
+
await eventTracking_service.customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
|
|
2678
2709
|
}
|
|
2679
2710
|
});
|
|
2680
2711
|
}
|
|
@@ -2696,14 +2727,14 @@ const SmsfEngagementStep = class {
|
|
|
2696
2727
|
this.memberFamilyName = selfManagedFundForm.memberFamilyName;
|
|
2697
2728
|
}
|
|
2698
2729
|
};
|
|
2699
|
-
|
|
2730
|
+
injectHistory.injectHistory(SmsfEngagementStep);
|
|
2700
2731
|
|
|
2701
2732
|
const StandardChoiceFormInputDefaultFund = class {
|
|
2702
2733
|
constructor(hostRef) {
|
|
2703
2734
|
index.registerInstance(this, hostRef);
|
|
2704
2735
|
this.standardChoiceFormSignature = '';
|
|
2705
2736
|
this.isSubmitDisabled = true;
|
|
2706
|
-
this.eventTrackingService =
|
|
2737
|
+
this.eventTrackingService = eventTracking_service.EventTrackingService.Instance;
|
|
2707
2738
|
this.ignorePopState = () => window.history.pushState(null, '', null);
|
|
2708
2739
|
}
|
|
2709
2740
|
connectedCallback() {
|
|
@@ -2714,9 +2745,9 @@ const StandardChoiceFormInputDefaultFund = class {
|
|
|
2714
2745
|
window.removeEventListener('popstate', this.ignorePopState);
|
|
2715
2746
|
}
|
|
2716
2747
|
render() {
|
|
2717
|
-
return (index.h(index.Host, null, index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"), index.h("div", { class: "sm:text-lg text-gray-600 max-w-800 mt-4 text-center leading-7 sm:leading-8" }, "Your authorisation is required to complete your super choice by signing the standard choice form, which informs your employer of your choice of fund."), index.h("div", { class: "flex justify-center mt-8 sm:mt-12" }, index.h("div", { class: "max-w-560" }, index.h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" }, this.renderLogo(), index.h("div", { class: "flex justify-between w-full" }, index.h("div", null, index.h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"), index.h("div", { class: "text-sm mt-2" },
|
|
2748
|
+
return (index.h(index.Host, null, index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"), index.h("div", { class: "sm:text-lg text-gray-600 max-w-800 mt-4 text-center leading-7 sm:leading-8" }, "Your authorisation is required to complete your super choice by signing the standard choice form, which informs your employer of your choice of fund."), index.h("div", { class: "flex justify-center mt-8 sm:mt-12" }, index.h("div", { class: "max-w-560" }, index.h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" }, this.renderLogo(), index.h("div", { class: "flex justify-between w-full" }, index.h("div", null, index.h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"), index.h("div", { class: "text-sm mt-2" }, eventTracking_service.state.fundName)), index.h("div", { class: "grid content-center ml-4" }, index.h("sss-button", { testid: "change-fund-button", size: "xs", variant: "secondary", promiseFn: async () => {
|
|
2718
2749
|
await this.trackChangeRequestedAsync();
|
|
2719
|
-
|
|
2750
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
2720
2751
|
} }, "Change")))), index.h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"), index.h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" }, index.h("div", { class: "flex" }, index.h("div", { class: "flex-shrink-0" }, index.h("img", { class: "h-5 w-5", src: index.getAssetPath('assets/icon-information-circle.svg') })), index.h("div", { class: "ml-2" }, index.h("p", { class: "text-sm text-blue-800 leading-5" }, "Applying your full name in the text field below is the same as applying your written signature and is legally binding.")))), index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
|
|
2721
2752
|
'mt-3': true,
|
|
2722
2753
|
'was-validated': this.formState === 'validated'
|
|
@@ -2744,38 +2775,38 @@ const StandardChoiceFormInputDefaultFund = class {
|
|
|
2744
2775
|
}
|
|
2745
2776
|
async trackChangeRequestedAsync() {
|
|
2746
2777
|
const common = {
|
|
2747
|
-
promotedFundsShown:
|
|
2748
|
-
defaultFundUsiSet:
|
|
2778
|
+
promotedFundsShown: superSelectionApp_service.superSelectionAppService.promotedFunds,
|
|
2779
|
+
defaultFundUsiSet: superSelectionApp_service.toUndefined(superSelectionApp_service.superSelectionAppService.defaultFundUsi)
|
|
2749
2780
|
};
|
|
2750
|
-
switch (
|
|
2781
|
+
switch (eventTracking_service.state.fundDetails.type) {
|
|
2751
2782
|
case 'default':
|
|
2752
2783
|
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
2753
|
-
DefaultFund: Object.assign(Object.assign({},
|
|
2784
|
+
DefaultFund: Object.assign(Object.assign({}, eventTracking_service.state.fundDetails), common)
|
|
2754
2785
|
});
|
|
2755
2786
|
break;
|
|
2756
2787
|
case 'myOwnFund':
|
|
2757
2788
|
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
2758
|
-
MyOwnFund: Object.assign(Object.assign({},
|
|
2789
|
+
MyOwnFund: Object.assign(Object.assign({}, eventTracking_service.state.fundDetails), common)
|
|
2759
2790
|
});
|
|
2760
2791
|
break;
|
|
2761
2792
|
case 'smsf':
|
|
2762
2793
|
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
2763
|
-
Smsf: Object.assign(Object.assign({},
|
|
2794
|
+
Smsf: Object.assign(Object.assign({}, eventTracking_service.state.fundDetails), common)
|
|
2764
2795
|
});
|
|
2765
2796
|
break;
|
|
2766
2797
|
case 'promoted':
|
|
2767
2798
|
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
2768
|
-
PromotedFund: Object.assign(Object.assign({},
|
|
2799
|
+
PromotedFund: Object.assign(Object.assign({}, eventTracking_service.state.fundDetails), common)
|
|
2769
2800
|
});
|
|
2770
2801
|
break;
|
|
2771
2802
|
case 'promotedDefault':
|
|
2772
2803
|
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
2773
|
-
PromotedDefaultFund: Object.assign(Object.assign({},
|
|
2804
|
+
PromotedDefaultFund: Object.assign(Object.assign({}, eventTracking_service.state.fundDetails), common)
|
|
2774
2805
|
});
|
|
2775
2806
|
break;
|
|
2776
2807
|
case 'promotedDefaultWithJoin':
|
|
2777
2808
|
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
2778
|
-
PromotedDefaultFundWithJoin: Object.assign(Object.assign({},
|
|
2809
|
+
PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, eventTracking_service.state.fundDetails), common)
|
|
2779
2810
|
});
|
|
2780
2811
|
break;
|
|
2781
2812
|
case 'null':
|
|
@@ -2785,8 +2816,8 @@ const StandardChoiceFormInputDefaultFund = class {
|
|
|
2785
2816
|
async handleSubmitForm() {
|
|
2786
2817
|
this.formState = 'validated';
|
|
2787
2818
|
if (this.formElement.checkValidity()) {
|
|
2788
|
-
await
|
|
2789
|
-
|
|
2819
|
+
await eventTracking_service.state.handleSubmitFn(this.standardChoiceFormSignature.trim());
|
|
2820
|
+
superSelectionApp_service.superSelectionAppService.markSuperSelectionAsSubmitted();
|
|
2790
2821
|
}
|
|
2791
2822
|
}
|
|
2792
2823
|
};
|
|
@@ -2810,29 +2841,29 @@ const Success = class {
|
|
|
2810
2841
|
return (index.h(index.Host, { class: "text-center" }, index.h("div", { class: "flex justify-center" }, index.h("div", { class: "relative" }, index.h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }), index.h("div", { class: "h-8 w-8 absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2" }, index.h(CheckIcon, null)))), index.h("h3", { class: "text-2xl leading-8 font-bold mt-4" }, "Your super choice has been submitted"), index.h("p", { class: "mt-4 text-center text-gray-600 leading-7 max-w-560 mx-auto" }, "Your superannuation details have been updated successfully and will be submitted to your employer."), index.h("div", { class: "flex justify-center mt-8" }, index.h("div", { class: "max-w-[200px] w-full" }, index.h("sss-button", { testid: "continue-button", size: "xl", fillWidth: true, onClick: this.handleContinueButtonClick }, index.h("span", null, "Continue"))))));
|
|
2811
2842
|
}
|
|
2812
2843
|
handleContinueButtonClick(_event) {
|
|
2813
|
-
|
|
2844
|
+
superSelectionApp_service.superSelectionAppService.completeSuperSelectionFlow();
|
|
2814
2845
|
}
|
|
2815
2846
|
};
|
|
2816
2847
|
|
|
2817
2848
|
class MiscService {
|
|
2818
2849
|
trackClickPromotedTileAsync(payload) {
|
|
2819
|
-
return
|
|
2850
|
+
return superSelectionApp_service.superSelectionApi.clickPromotedTileAsync(payload);
|
|
2820
2851
|
}
|
|
2821
2852
|
}
|
|
2822
2853
|
const miscService = new MiscService();
|
|
2823
2854
|
|
|
2824
2855
|
const getSuperCampaignState = () => {
|
|
2825
|
-
if (
|
|
2826
|
-
return
|
|
2856
|
+
if (superSelectionApp_service.superSelectionAppService.superCampaignState != undefined)
|
|
2857
|
+
return superSelectionApp_service.superSelectionAppService.superCampaignState;
|
|
2827
2858
|
throw new Error('Super campaign state has not been initialized');
|
|
2828
2859
|
};
|
|
2829
2860
|
const fundTileClicked = async ({ sender, placementId, fundId, fundUsi, fundName, fundType, sourceOfJoin, isDefaultExclusive }) => {
|
|
2830
2861
|
if (sender === 'super-campaign' || sender === 'featured-funds') {
|
|
2831
2862
|
const promotedFundsShown = getSuperCampaignState().PromotedFundIds;
|
|
2832
|
-
const defaultFundUsiSet =
|
|
2863
|
+
const defaultFundUsiSet = superSelectionApp_service.Option.toUndefined(superSelectionApp_service.superSelectionAppService.defaultFundUsi);
|
|
2833
2864
|
await Promise.all([
|
|
2834
2865
|
fundType === 'promoted-default'
|
|
2835
|
-
? await
|
|
2866
|
+
? await eventTracking_service.EventTrackingService.Instance.TrackPromotedDefaultSuperFundDetailViewedAsync({
|
|
2836
2867
|
fundUsi: fundUsi !== null && fundUsi !== void 0 ? fundUsi : '',
|
|
2837
2868
|
fundName,
|
|
2838
2869
|
promotedFundId: fundId,
|
|
@@ -2843,7 +2874,7 @@ const fundTileClicked = async ({ sender, placementId, fundId, fundUsi, fundName,
|
|
|
2843
2874
|
sourceOfJoin,
|
|
2844
2875
|
isDefaultExclusive
|
|
2845
2876
|
})
|
|
2846
|
-
: await
|
|
2877
|
+
: await eventTracking_service.EventTrackingService.Instance.TrackPromotedSuperFundDetailViewedAsync({
|
|
2847
2878
|
fundUsi: fundUsi !== null && fundUsi !== void 0 ? fundUsi : undefined,
|
|
2848
2879
|
fundName,
|
|
2849
2880
|
promotedFundId: fundId,
|
|
@@ -12454,10 +12485,10 @@ class ReactNativeInteropMode {
|
|
|
12454
12485
|
function createInitialState() {
|
|
12455
12486
|
return {
|
|
12456
12487
|
authenticationState: AuthenticationState.Unauthorized,
|
|
12457
|
-
jwt:
|
|
12458
|
-
reactNativeInterop:
|
|
12459
|
-
iframeInterop:
|
|
12460
|
-
appConfiguration:
|
|
12488
|
+
jwt: superSelectionApp_service.none,
|
|
12489
|
+
reactNativeInterop: superSelectionApp_service.none,
|
|
12490
|
+
iframeInterop: superSelectionApp_service.none,
|
|
12491
|
+
appConfiguration: superSelectionApp_service.none,
|
|
12461
12492
|
ignoreExistingSelection: false
|
|
12462
12493
|
};
|
|
12463
12494
|
}
|
|
@@ -12479,7 +12510,7 @@ class AppConfigurationQuery extends datoramaAkita.Query {
|
|
|
12479
12510
|
}
|
|
12480
12511
|
get configuration() {
|
|
12481
12512
|
const configuration = this.getValue().appConfiguration;
|
|
12482
|
-
if (
|
|
12513
|
+
if (superSelectionApp_service.isNone(configuration)) {
|
|
12483
12514
|
throw Error('App configuration is not yet loaded');
|
|
12484
12515
|
}
|
|
12485
12516
|
return configuration.value;
|
|
@@ -12531,7 +12562,7 @@ const appInsights = new AppInsightsService();
|
|
|
12531
12562
|
|
|
12532
12563
|
class PromotedFundChoiceApi {
|
|
12533
12564
|
async submitChoiceAsync(dto) {
|
|
12534
|
-
return
|
|
12565
|
+
return superSelectionApp_service.buildBackendApiClient()
|
|
12535
12566
|
.url('super-choice/promoted-fund')
|
|
12536
12567
|
.post(dto)
|
|
12537
12568
|
.badRequest(() => {
|
|
@@ -12540,7 +12571,7 @@ class PromotedFundChoiceApi {
|
|
|
12540
12571
|
.text();
|
|
12541
12572
|
}
|
|
12542
12573
|
async submitDefaultChoiceAsync(dto) {
|
|
12543
|
-
return
|
|
12574
|
+
return superSelectionApp_service.buildBackendApiClient()
|
|
12544
12575
|
.url('super-choice/promoted-fund/default')
|
|
12545
12576
|
.post(dto)
|
|
12546
12577
|
.badRequest(() => {
|
|
@@ -12549,7 +12580,7 @@ class PromotedFundChoiceApi {
|
|
|
12549
12580
|
.text();
|
|
12550
12581
|
}
|
|
12551
12582
|
async submitDefaultChoiceWithJoinAsync(dto) {
|
|
12552
|
-
return
|
|
12583
|
+
return superSelectionApp_service.buildBackendApiClient()
|
|
12553
12584
|
.url('super-choice/promoted-fund/default-with-join')
|
|
12554
12585
|
.post(dto)
|
|
12555
12586
|
.badRequest(() => {
|
|
@@ -12562,7 +12593,7 @@ const promotedFundChoiceApi = new PromotedFundChoiceApi();
|
|
|
12562
12593
|
|
|
12563
12594
|
class SlateChoiceApi {
|
|
12564
12595
|
async submitSlateChoiceAsync(dto) {
|
|
12565
|
-
return
|
|
12596
|
+
return superSelectionApp_service.buildBackendApiClient()
|
|
12566
12597
|
.url('super-choice/slate')
|
|
12567
12598
|
.post(dto)
|
|
12568
12599
|
.badRequest(() => {
|
|
@@ -12578,7 +12609,7 @@ const Usi = {
|
|
|
12578
12609
|
return usi.replace(/ /g, '');
|
|
12579
12610
|
}
|
|
12580
12611
|
};
|
|
12581
|
-
const LoadWaitingTimeout = 30000;
|
|
12612
|
+
const LoadWaitingTimeout$1 = 30000;
|
|
12582
12613
|
|
|
12583
12614
|
class PromotedFundJoinedEventHandler {
|
|
12584
12615
|
constructor(placementId, history) {
|
|
@@ -12611,8 +12642,8 @@ class PromotedFundJoinedEventHandler {
|
|
|
12611
12642
|
return;
|
|
12612
12643
|
}
|
|
12613
12644
|
const usi = Usi.clean(data.usi);
|
|
12614
|
-
const defaultFundUsiSet =
|
|
12615
|
-
|
|
12645
|
+
const defaultFundUsiSet = superSelectionApp_service.Option.toUndefined(superSelectionApp_service.superSelectionAppService.defaultFundUsi);
|
|
12646
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
12616
12647
|
history: this.history,
|
|
12617
12648
|
fundName: data.fundName,
|
|
12618
12649
|
promotedFundId: data.fundId,
|
|
@@ -12624,7 +12655,7 @@ class PromotedFundJoinedEventHandler {
|
|
|
12624
12655
|
promotedFundId: data.fundId
|
|
12625
12656
|
},
|
|
12626
12657
|
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
12627
|
-
if (data.fundId ===
|
|
12658
|
+
if (data.fundId === superSelectionApp_service.slate.fundId) {
|
|
12628
12659
|
await slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature,
|
|
12629
12660
|
defaultFundUsiSet, placementId: this.placementId }, this.PromotedFundsConfig));
|
|
12630
12661
|
}
|
|
@@ -12642,7 +12673,7 @@ class PromotedFundJoinedEventHandler {
|
|
|
12642
12673
|
return;
|
|
12643
12674
|
}
|
|
12644
12675
|
const usi = Usi.clean(data.usi);
|
|
12645
|
-
|
|
12676
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
12646
12677
|
history: this.history,
|
|
12647
12678
|
fundName: data.fundName,
|
|
12648
12679
|
promotedFundId: data.fundId,
|
|
@@ -12653,7 +12684,7 @@ class PromotedFundJoinedEventHandler {
|
|
|
12653
12684
|
promotedFundId: data.fundId
|
|
12654
12685
|
},
|
|
12655
12686
|
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: data.fundId, usi,
|
|
12656
|
-
standardChoiceFormSignature, defaultFundUsiSet:
|
|
12687
|
+
standardChoiceFormSignature, defaultFundUsiSet: superSelectionApp_service.Option.toUndefined(superSelectionApp_service.superSelectionAppService.defaultFundUsi), placementId: this.placementId, sourceOfJoin: data.sourceOfJoin, isDefaultExclusive: data.isDefaultExclusive }, this.PromotedFundsConfig))
|
|
12657
12688
|
});
|
|
12658
12689
|
};
|
|
12659
12690
|
this.handlePromotedDefaultFundWithJoinWasJoined = (data) => {
|
|
@@ -12662,7 +12693,7 @@ class PromotedFundJoinedEventHandler {
|
|
|
12662
12693
|
return;
|
|
12663
12694
|
}
|
|
12664
12695
|
const usi = Usi.clean(data.usi);
|
|
12665
|
-
|
|
12696
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
12666
12697
|
history: this.history,
|
|
12667
12698
|
fundName: data.fundName,
|
|
12668
12699
|
promotedFundId: data.fundId,
|
|
@@ -12674,7 +12705,7 @@ class PromotedFundJoinedEventHandler {
|
|
|
12674
12705
|
promotedFundId: data.fundId
|
|
12675
12706
|
},
|
|
12676
12707
|
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceWithJoinAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
|
|
12677
|
-
standardChoiceFormSignature, defaultFundUsiSet:
|
|
12708
|
+
standardChoiceFormSignature, defaultFundUsiSet: superSelectionApp_service.Option.toUndefined(superSelectionApp_service.superSelectionAppService.defaultFundUsi), placementId: this.placementId, sourceOfJoin: data.sourceOfJoin, isDefaultExclusive: data.isDefaultExclusive }, this.PromotedFundsConfig))
|
|
12678
12709
|
});
|
|
12679
12710
|
};
|
|
12680
12711
|
this.handleDefinedBenefitsJoined = async (data) => {
|
|
@@ -12682,14 +12713,14 @@ class PromotedFundJoinedEventHandler {
|
|
|
12682
12713
|
appInsights.trackErrorTrace('Super Campaign did not return (DefinedBenefits) memberNumber and/or usi');
|
|
12683
12714
|
return;
|
|
12684
12715
|
}
|
|
12685
|
-
await
|
|
12686
|
-
|
|
12716
|
+
await eventTracking_service.customFundChoiceApi.submitDefinedBenefitsChoiceAsync(Object.assign({ fundUsi: Usi.clean(data.usi), fundId: data.fundId, memberNumber: data.memberNumber, memberElectContributionRatePreTax: data.memberElectContributionRatePreTax, memberElectContributionRatePostTax: data.memberElectContributionRatePostTax, sourceOfJoin: data.sourceOfJoin, isDefaultExclusive: data.isDefaultExclusive }, this.PromotedFundsConfig));
|
|
12717
|
+
superSelectionApp_service.superSelectionAppService.markSuperSelectionAsSubmitted();
|
|
12687
12718
|
};
|
|
12688
12719
|
this.history = history;
|
|
12689
12720
|
this.placementId = placementId;
|
|
12690
12721
|
}
|
|
12691
12722
|
get PromotedFundsConfig() {
|
|
12692
|
-
return
|
|
12723
|
+
return superSelectionApp_service.superSelectionAppService.promotedFundsConfig;
|
|
12693
12724
|
}
|
|
12694
12725
|
}
|
|
12695
12726
|
|
|
@@ -12708,7 +12739,7 @@ const FeaturedFunds = class {
|
|
|
12708
12739
|
}
|
|
12709
12740
|
};
|
|
12710
12741
|
this.backClicked = () => {
|
|
12711
|
-
|
|
12742
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
12712
12743
|
return Promise.resolve();
|
|
12713
12744
|
};
|
|
12714
12745
|
this.cancelClicked = () => {
|
|
@@ -12731,7 +12762,7 @@ const FeaturedFunds = class {
|
|
|
12731
12762
|
this.fundPanelShown = async (event) => {
|
|
12732
12763
|
if (event.detail.sender === 'featured-funds') {
|
|
12733
12764
|
const fundIdList = event.detail.shownFunds.map((f) => f.fundId);
|
|
12734
|
-
await
|
|
12765
|
+
await superSelectionApp_service.superSelectionAppService.viewSuperFundPanelAsync('byof', fundIdList);
|
|
12735
12766
|
}
|
|
12736
12767
|
};
|
|
12737
12768
|
this.eventHandlers = {
|
|
@@ -12743,23 +12774,23 @@ const FeaturedFunds = class {
|
|
|
12743
12774
|
};
|
|
12744
12775
|
}
|
|
12745
12776
|
componentWillLoad() {
|
|
12746
|
-
if (
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
this.backendUrl =
|
|
12751
|
-
this.accessToken =
|
|
12777
|
+
if (superSelectionApp_service.superSelectionAppService.isFeaturedFundsEnabled &&
|
|
12778
|
+
superSelectionApp_service.superSelectionAppService.isUsingSuperCampaign &&
|
|
12779
|
+
superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.backendUrl) &&
|
|
12780
|
+
superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.state.jwt)) {
|
|
12781
|
+
this.backendUrl = superSelectionApp_service.superSelectionAppService.backendUrl.value;
|
|
12782
|
+
this.accessToken = superSelectionApp_service.superSelectionAppService.state.jwt.value;
|
|
12752
12783
|
this.unsubscribeFromEvents();
|
|
12753
12784
|
this.subscribeToEvents();
|
|
12754
|
-
|
|
12785
|
+
superSelectionApp_service.superSelectionAppService.hideFooterSection = true;
|
|
12755
12786
|
}
|
|
12756
12787
|
else {
|
|
12757
|
-
|
|
12788
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.MyOwnFund);
|
|
12758
12789
|
}
|
|
12759
12790
|
}
|
|
12760
12791
|
disconnectedCallback() {
|
|
12761
12792
|
this.unsubscribeFromEvents();
|
|
12762
|
-
|
|
12793
|
+
superSelectionApp_service.superSelectionAppService.hideFooterSection = false;
|
|
12763
12794
|
}
|
|
12764
12795
|
render() {
|
|
12765
12796
|
return (index.h(index.Host, null, this.currentView === 'featured-funds' && index.h("sss-header-section", null), index.h("div", { class: {
|
|
@@ -12768,22 +12799,22 @@ const FeaturedFunds = class {
|
|
|
12768
12799
|
} }, this.currentView === 'featured-funds' && index.h("sss-custom-fund", null), index.h("apollo-super-campaign-featured-funds", { "backend-url": this.backendUrl, "access-token": this.accessToken }))));
|
|
12769
12800
|
}
|
|
12770
12801
|
};
|
|
12771
|
-
|
|
12802
|
+
injectHistory.injectHistory(FeaturedFunds);
|
|
12772
12803
|
|
|
12773
12804
|
class SuperCampaignErrorApi {
|
|
12774
12805
|
static get Instance() {
|
|
12775
12806
|
return this.instance || (this.instance = new this());
|
|
12776
12807
|
}
|
|
12777
12808
|
async PostError(error) {
|
|
12778
|
-
|
|
12809
|
+
superSelectionApp_service.buildBackendApiClient().url('super-campaign/errors').post(error);
|
|
12779
12810
|
}
|
|
12780
12811
|
}
|
|
12781
12812
|
|
|
12782
12813
|
const SuperFundDisclaimerViewedDetail = {
|
|
12783
12814
|
create: (superCampaignEnabled) => {
|
|
12784
12815
|
let isDefinedBenefitsEligibleString = 'Not set';
|
|
12785
|
-
if (
|
|
12786
|
-
isDefinedBenefitsEligibleString =
|
|
12816
|
+
if (superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.isDefinedBenefitsEligible)) {
|
|
12817
|
+
isDefinedBenefitsEligibleString = superSelectionApp_service.superSelectionAppService.isDefinedBenefitsEligible.value
|
|
12787
12818
|
? 'True'
|
|
12788
12819
|
: 'False';
|
|
12789
12820
|
}
|
|
@@ -12810,9 +12841,9 @@ const SuperCampaignHost = class {
|
|
|
12810
12841
|
};
|
|
12811
12842
|
this.superCampaignLoaded = async (event) => {
|
|
12812
12843
|
if (event.detail.sender === 'super-campaign') {
|
|
12813
|
-
|
|
12844
|
+
superSelectionApp_service.superSelectionAppService.superCampaignComponentStatus = superSelectionApp_service.SuperCampaignComponentStatus.Loaded;
|
|
12814
12845
|
clearTimeout(this.loadingTimeoutRef);
|
|
12815
|
-
await
|
|
12846
|
+
await eventTracking_service.EventTrackingService.Instance.TrackSuperCampaignActivationSucceededAsync({});
|
|
12816
12847
|
}
|
|
12817
12848
|
return Promise.resolve();
|
|
12818
12849
|
};
|
|
@@ -12834,13 +12865,13 @@ const SuperCampaignHost = class {
|
|
|
12834
12865
|
};
|
|
12835
12866
|
this.chooseAnotherFundRequested = async (event) => {
|
|
12836
12867
|
if (event.detail.sender === 'super-campaign') {
|
|
12837
|
-
await
|
|
12868
|
+
await eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.MyOwnFund);
|
|
12838
12869
|
}
|
|
12839
12870
|
};
|
|
12840
12871
|
this.fundPanelShown = async (event) => {
|
|
12841
12872
|
if (event.detail.sender === 'super-campaign') {
|
|
12842
|
-
|
|
12843
|
-
await
|
|
12873
|
+
superSelectionApp_service.superSelectionAppService.setSuperCampaignPromotedFundsShown(event.detail.shownFunds);
|
|
12874
|
+
await superSelectionApp_service.superSelectionAppService.viewSuperFundPanelAsync('panel');
|
|
12844
12875
|
}
|
|
12845
12876
|
};
|
|
12846
12877
|
this.fundTileClicked = async (event) => {
|
|
@@ -12857,7 +12888,7 @@ const SuperCampaignHost = class {
|
|
|
12857
12888
|
};
|
|
12858
12889
|
this.fundPdsViewed = async (event) => {
|
|
12859
12890
|
if (event.detail.sender === 'super-campaign') {
|
|
12860
|
-
await
|
|
12891
|
+
await eventTracking_service.EventTrackingService.Instance.TrackSuperFundPdsViewedAsync({
|
|
12861
12892
|
fundName: event.detail.fundName,
|
|
12862
12893
|
fundUsi: event.detail.fundUsi,
|
|
12863
12894
|
pageName: event.detail.pageName,
|
|
@@ -12867,12 +12898,12 @@ const SuperCampaignHost = class {
|
|
|
12867
12898
|
};
|
|
12868
12899
|
this.disclaimerViewed = async (event) => {
|
|
12869
12900
|
if (event.detail.sender === 'super-campaign') {
|
|
12870
|
-
await
|
|
12901
|
+
await eventTracking_service.EventTrackingService.Instance.TrackSuperFundDisclaimerViewedAsync(SuperFundDisclaimerViewedDetail.create(true));
|
|
12871
12902
|
}
|
|
12872
12903
|
};
|
|
12873
12904
|
this.disclaimerAccepted = async (event) => {
|
|
12874
12905
|
if (event.detail.sender === 'super-campaign') {
|
|
12875
|
-
await
|
|
12906
|
+
await eventTracking_service.EventTrackingService.Instance.TrackSuperFundDisclaimerAcceptedAsync({
|
|
12876
12907
|
superCampaignEnabled: true
|
|
12877
12908
|
});
|
|
12878
12909
|
}
|
|
@@ -12891,27 +12922,27 @@ const SuperCampaignHost = class {
|
|
|
12891
12922
|
};
|
|
12892
12923
|
}
|
|
12893
12924
|
async componentWillLoad() {
|
|
12894
|
-
if (
|
|
12895
|
-
|
|
12896
|
-
|
|
12925
|
+
if (superSelectionApp_service.superSelectionAppService.state.superCampaignComponentStatus ===
|
|
12926
|
+
superSelectionApp_service.SuperCampaignComponentStatus.NotWorking) {
|
|
12927
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.MyOwnFund);
|
|
12897
12928
|
return;
|
|
12898
12929
|
}
|
|
12899
12930
|
let superCampaingScriptPath = undefined;
|
|
12900
12931
|
try {
|
|
12901
|
-
if (
|
|
12902
|
-
|
|
12903
|
-
this.backendUrl =
|
|
12904
|
-
this.accessToken =
|
|
12932
|
+
if (superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.backendUrl) &&
|
|
12933
|
+
superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.state.jwt)) {
|
|
12934
|
+
this.backendUrl = superSelectionApp_service.superSelectionAppService.backendUrl.value;
|
|
12935
|
+
this.accessToken = superSelectionApp_service.superSelectionAppService.state.jwt.value;
|
|
12905
12936
|
this.unSubscribeFromSuperCampaignEvents();
|
|
12906
|
-
if (
|
|
12907
|
-
|
|
12937
|
+
if (superSelectionApp_service.superSelectionAppService.state.superCampaignComponentStatus ===
|
|
12938
|
+
superSelectionApp_service.SuperCampaignComponentStatus.NotLoaded) {
|
|
12908
12939
|
superCampaingScriptPath = this.createApolloSuperCampaignScriptUrl();
|
|
12909
12940
|
await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(superCampaingScriptPath)); });
|
|
12910
|
-
this.loadingTimeoutRef = setTimeout(this.superCampaignLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout);
|
|
12941
|
+
this.loadingTimeoutRef = setTimeout(this.superCampaignLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout$1);
|
|
12911
12942
|
}
|
|
12912
12943
|
this.subscribeToSuperCampaignEvents();
|
|
12913
12944
|
this.scriptImported = true;
|
|
12914
|
-
|
|
12945
|
+
superSelectionApp_service.superSelectionAppService.hideFooterSection = true;
|
|
12915
12946
|
}
|
|
12916
12947
|
else {
|
|
12917
12948
|
throw Error(`SuperCampaignHost pre-requisites not met.`);
|
|
@@ -12927,25 +12958,25 @@ const SuperCampaignHost = class {
|
|
|
12927
12958
|
disconnectedCallback() {
|
|
12928
12959
|
clearTimeout(this.loadingTimeoutRef);
|
|
12929
12960
|
this.unSubscribeFromSuperCampaignEvents();
|
|
12930
|
-
|
|
12961
|
+
superSelectionApp_service.superSelectionAppService.hideFooterSection = false;
|
|
12931
12962
|
}
|
|
12932
12963
|
render() {
|
|
12933
12964
|
return (index.h("div", null, this.scriptImported ? (index.h("apollo-super-campaign", { "backend-url": this.backendUrl, "access-token": this.accessToken })) : null));
|
|
12934
12965
|
}
|
|
12935
12966
|
async activateFallbackMechanism(error) {
|
|
12936
|
-
if (
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
|
|
12967
|
+
if (superSelectionApp_service.superSelectionAppService.superCampaignComponentStatus !==
|
|
12968
|
+
superSelectionApp_service.SuperCampaignComponentStatus.NotWorking) {
|
|
12969
|
+
superSelectionApp_service.superSelectionAppService.superCampaignComponentStatus =
|
|
12970
|
+
superSelectionApp_service.SuperCampaignComponentStatus.NotWorking;
|
|
12940
12971
|
await SuperCampaignErrorApi.Instance.PostError(error);
|
|
12941
|
-
await
|
|
12972
|
+
await eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.MyOwnFund);
|
|
12942
12973
|
}
|
|
12943
12974
|
}
|
|
12944
12975
|
async superCampaignLoadingTimeoutTriggered() {
|
|
12945
|
-
if (
|
|
12976
|
+
if (superSelectionApp_service.superSelectionAppService.superCampaignComponentStatus !== superSelectionApp_service.SuperCampaignComponentStatus.Loaded) {
|
|
12946
12977
|
this.activateFallbackMechanism({
|
|
12947
12978
|
type: 'SuperCampaignActivationFailed',
|
|
12948
|
-
reason: `Activation timeout was triggered after:${LoadWaitingTimeout / 1000} seconds`
|
|
12979
|
+
reason: `Activation timeout was triggered after:${LoadWaitingTimeout$1 / 1000} seconds`
|
|
12949
12980
|
});
|
|
12950
12981
|
}
|
|
12951
12982
|
}
|
|
@@ -12965,9 +12996,9 @@ const SuperCampaignHost = class {
|
|
|
12965
12996
|
return `https://${getSubdomain()}.flarehr.com/super-campaign/cdn/app/apollo-super-campaign.js`;
|
|
12966
12997
|
}
|
|
12967
12998
|
};
|
|
12968
|
-
|
|
12999
|
+
injectHistory.injectHistory(SuperCampaignHost);
|
|
12969
13000
|
|
|
12970
|
-
const LoadWaitingTimeout$
|
|
13001
|
+
const LoadWaitingTimeout$2 = 30000;
|
|
12971
13002
|
|
|
12972
13003
|
var SuperSmsfComponentStatus;
|
|
12973
13004
|
(function (SuperSmsfComponentStatus) {
|
|
@@ -12978,7 +13009,7 @@ let superSmsfComponentStatus = SuperSmsfComponentStatus.NotLoaded;
|
|
|
12978
13009
|
const SuperSmsfHost = class {
|
|
12979
13010
|
constructor(hostRef) {
|
|
12980
13011
|
index.registerInstance(this, hostRef);
|
|
12981
|
-
this.eventTrackingService =
|
|
13012
|
+
this.eventTrackingService = eventTracking_service.EventTrackingService.Instance;
|
|
12982
13013
|
this.subscribeToSuperSmsfEvents = () => {
|
|
12983
13014
|
for (const eventName in this.smsfEventHandlers) {
|
|
12984
13015
|
document.addEventListener(eventName, this.smsfEventHandlers[eventName]);
|
|
@@ -12994,8 +13025,8 @@ const SuperSmsfHost = class {
|
|
|
12994
13025
|
superSmsfComponentStatus = SuperSmsfComponentStatus.Loaded;
|
|
12995
13026
|
clearTimeout(this.loadingTimeoutRef);
|
|
12996
13027
|
await this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
|
|
12997
|
-
promotedFundsShown:
|
|
12998
|
-
defaultFundUsiSet:
|
|
13028
|
+
promotedFundsShown: superSelectionApp_service.superSelectionAppService.promotedFunds,
|
|
13029
|
+
defaultFundUsiSet: superSelectionApp_service.Option.toUndefined(superSelectionApp_service.superSelectionAppService.defaultFundUsi)
|
|
12999
13030
|
});
|
|
13000
13031
|
}
|
|
13001
13032
|
return Promise.resolve();
|
|
@@ -13003,12 +13034,12 @@ const SuperSmsfHost = class {
|
|
|
13003
13034
|
this.smsfCompleted = async (event) => {
|
|
13004
13035
|
if (event.detail.sender === 'super-smsf') {
|
|
13005
13036
|
this.updateCustomFundStateStore(event.detail);
|
|
13006
|
-
if (
|
|
13007
|
-
|
|
13008
|
-
|
|
13037
|
+
if (superSelectionApp_service.superSelectionAppService.isSmsfCustomStepEnabled &&
|
|
13038
|
+
superSelectionApp_service.superSelectionAppService.isUsingSuperCampaign) {
|
|
13039
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.SmsfEngagementStep);
|
|
13009
13040
|
return;
|
|
13010
13041
|
}
|
|
13011
|
-
|
|
13042
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
13012
13043
|
history: this.history,
|
|
13013
13044
|
fundName: 'Self-managed super fund',
|
|
13014
13045
|
fundDetails: {
|
|
@@ -13033,15 +13064,15 @@ const SuperSmsfHost = class {
|
|
|
13033
13064
|
electronicServiceAddress: event.detail.fundEsa,
|
|
13034
13065
|
memberFirstName: event.detail.memberFirstName,
|
|
13035
13066
|
memberFamilyName: event.detail.memberLastName
|
|
13036
|
-
}, standardChoiceFormSignature },
|
|
13037
|
-
await
|
|
13067
|
+
}, standardChoiceFormSignature }, superSelectionApp_service.superSelectionAppService.promotedFundsConfig);
|
|
13068
|
+
await eventTracking_service.customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
|
|
13038
13069
|
}
|
|
13039
13070
|
});
|
|
13040
13071
|
}
|
|
13041
13072
|
};
|
|
13042
13073
|
this.smsfCancelled = async (event) => {
|
|
13043
13074
|
if (event.detail.sender === 'super-smsf') {
|
|
13044
|
-
|
|
13075
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
13045
13076
|
}
|
|
13046
13077
|
};
|
|
13047
13078
|
this.smsfEventHandlers = {
|
|
@@ -13051,11 +13082,11 @@ const SuperSmsfHost = class {
|
|
|
13051
13082
|
};
|
|
13052
13083
|
}
|
|
13053
13084
|
async componentWillLoad() {
|
|
13054
|
-
if (
|
|
13055
|
-
this.backendUrl =
|
|
13056
|
-
this.accessToken =
|
|
13085
|
+
if (superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.backendUrl) && superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.state.jwt)) {
|
|
13086
|
+
this.backendUrl = superSelectionApp_service.superSelectionAppService.backendUrl.value;
|
|
13087
|
+
this.accessToken = superSelectionApp_service.superSelectionAppService.state.jwt.value;
|
|
13057
13088
|
if (superSmsfComponentStatus === SuperSmsfComponentStatus.NotLoaded) {
|
|
13058
|
-
this.loadingTimeoutRef = setTimeout(this.smsfLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout$
|
|
13089
|
+
this.loadingTimeoutRef = setTimeout(this.smsfLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout$2);
|
|
13059
13090
|
}
|
|
13060
13091
|
this.subscribeToSuperSmsfEvents();
|
|
13061
13092
|
}
|
|
@@ -13071,7 +13102,7 @@ const SuperSmsfHost = class {
|
|
|
13071
13102
|
return (index.h(index.Host, null, index.h("sss-header-section", null), index.h("div", { class: "flex justify-center mt-11" }, index.h("sss-custom-fund", null, index.h("div", null, index.h("apollo-super-smsf", { "backend-url": this.backendUrl, "access-token": this.accessToken }))))));
|
|
13072
13103
|
}
|
|
13073
13104
|
updateCustomFundStateStore(details) {
|
|
13074
|
-
|
|
13105
|
+
customFund_store.state.selfManagedFundForm = {
|
|
13075
13106
|
fundAbn: details.fundAbn,
|
|
13076
13107
|
fundName: details.fundName,
|
|
13077
13108
|
addressLine1: details.fundAddressLine1,
|
|
@@ -13093,7 +13124,7 @@ const SuperSmsfHost = class {
|
|
|
13093
13124
|
}
|
|
13094
13125
|
}
|
|
13095
13126
|
};
|
|
13096
|
-
|
|
13127
|
+
injectHistory.injectHistory(SuperSmsfHost);
|
|
13097
13128
|
|
|
13098
13129
|
const routeCss = "stencil-route.inactive{display:none}";
|
|
13099
13130
|
|
|
@@ -14039,63 +14070,63 @@ const SuperSelectionApp = class {
|
|
|
14039
14070
|
this.isAppInitialised = false;
|
|
14040
14071
|
}
|
|
14041
14072
|
async componentWillLoad() {
|
|
14042
|
-
const jwt =
|
|
14043
|
-
if (
|
|
14073
|
+
const jwt = superSelectionApp_service.Option.fromNullable(this.accessToken);
|
|
14074
|
+
if (superSelectionApp_service.Option.isNone(jwt)) {
|
|
14044
14075
|
throw Error(`jwt property is missing.`);
|
|
14045
14076
|
}
|
|
14046
|
-
|
|
14047
|
-
const apiBaseUrl =
|
|
14048
|
-
if (
|
|
14077
|
+
superSelectionApp_service.superSelectionAppService.state.jwt = jwt;
|
|
14078
|
+
const apiBaseUrl = superSelectionApp_service.Option.fromNullable(this.backendUrl);
|
|
14079
|
+
if (superSelectionApp_service.Option.isNone(apiBaseUrl)) {
|
|
14049
14080
|
throw Error(`apiBaseUrl property is missing.`);
|
|
14050
14081
|
}
|
|
14051
|
-
|
|
14052
|
-
const appBaseUrl =
|
|
14053
|
-
if (
|
|
14082
|
+
superSelectionApp_service.superSelectionAppService.state.apiBaseUrl = superSelectionApp_service.Option.some(apiBaseUrl.value.replace(/\/$/, '') + '/');
|
|
14083
|
+
const appBaseUrl = superSelectionApp_service.Option.fromNullable(this.appBaseUrl);
|
|
14084
|
+
if (superSelectionApp_service.Option.isNone(appBaseUrl)) {
|
|
14054
14085
|
throw Error(`appBaseUrl property is missing.`);
|
|
14055
14086
|
}
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14087
|
+
superSelectionApp_service.superSelectionAppService.state.appBaseUrl = superSelectionApp_service.Option.some(appBaseUrl.value.replace(/\/$/, ''));
|
|
14088
|
+
superSelectionApp_service.superSelectionAppService.onChange('hasSuccessPageBeenAcknowledged', (_) => this.successPageAcknowledged.emit());
|
|
14089
|
+
superSelectionApp_service.superSelectionAppService.onChange('hasSuperSelectionBeenSubmitted', (submitted) => {
|
|
14059
14090
|
if (!submitted)
|
|
14060
14091
|
return;
|
|
14061
14092
|
this.stepSubmitSuccess.emit();
|
|
14062
|
-
|
|
14093
|
+
superSelectionApp_service.superSelectionAppService.state.hasSuperSelectionBeenSubmitted = false;
|
|
14063
14094
|
if (this.isSelfHosted) {
|
|
14064
|
-
|
|
14095
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.Success);
|
|
14065
14096
|
}
|
|
14066
14097
|
});
|
|
14067
14098
|
}
|
|
14068
14099
|
async componentDidLoad() {
|
|
14069
|
-
await
|
|
14100
|
+
await superSelectionApp_service.superSelectionAppService.loadAppStateAsync();
|
|
14070
14101
|
const chosenFundOption = await existingFundService.GetExistingFundAsync();
|
|
14071
14102
|
this.isAppInitialised = true;
|
|
14072
14103
|
this.initialised.emit({
|
|
14073
|
-
accountIdOrDefault:
|
|
14074
|
-
partnerIdOrDefault:
|
|
14075
|
-
profileId:
|
|
14104
|
+
accountIdOrDefault: superSelectionApp_service.superSelectionAppService.accountIdOrDefault,
|
|
14105
|
+
partnerIdOrDefault: superSelectionApp_service.superSelectionAppService.partnerIdOrDefault,
|
|
14106
|
+
profileId: superSelectionApp_service.superSelectionAppService.profileId
|
|
14076
14107
|
});
|
|
14077
|
-
|
|
14078
|
-
const ignoreExistingSelectionOption =
|
|
14079
|
-
const shouldIgnoreExistingDefinedBenefitsChoice =
|
|
14108
|
+
eventTracking_service.iframe.appReady();
|
|
14109
|
+
const ignoreExistingSelectionOption = superSelectionApp_service.Option.fromNullable(this.ignoreExistingSelection);
|
|
14110
|
+
const shouldIgnoreExistingDefinedBenefitsChoice = superSelectionApp_service.Option.isSome(chosenFundOption) &&
|
|
14080
14111
|
chosenFundOption.value.type == 'Defined Benefits Fund' &&
|
|
14081
|
-
(
|
|
14082
|
-
!
|
|
14083
|
-
const shouldIgnoreExistingChoice = (
|
|
14112
|
+
(superSelectionApp_service.Option.isNone(superSelectionApp_service.superSelectionAppService.isDefinedBenefitsEligible) ||
|
|
14113
|
+
!superSelectionApp_service.superSelectionAppService.isDefinedBenefitsEligible.value);
|
|
14114
|
+
const shouldIgnoreExistingChoice = (superSelectionApp_service.Option.isSome(ignoreExistingSelectionOption) && ignoreExistingSelectionOption.value) ||
|
|
14084
14115
|
shouldIgnoreExistingDefinedBenefitsChoice;
|
|
14085
|
-
if (
|
|
14086
|
-
|
|
14116
|
+
if (superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.state.superChoicePrefill)) {
|
|
14117
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.Prefill);
|
|
14087
14118
|
}
|
|
14088
|
-
else if (
|
|
14119
|
+
else if (superSelectionApp_service.Option.isSome(chosenFundOption) &&
|
|
14089
14120
|
chosenFundOption.value.valid !== 'Inactive' &&
|
|
14090
14121
|
!shouldIgnoreExistingChoice) {
|
|
14091
|
-
|
|
14122
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ExistingChoicePage);
|
|
14092
14123
|
}
|
|
14093
14124
|
else {
|
|
14094
|
-
|
|
14125
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
14095
14126
|
}
|
|
14096
14127
|
}
|
|
14097
14128
|
authTokenChanged(newValue) {
|
|
14098
|
-
|
|
14129
|
+
superSelectionApp_service.superSelectionAppService.state.jwt = superSelectionApp_service.Option.fromNullable(newValue);
|
|
14099
14130
|
}
|
|
14100
14131
|
onRouteChange() {
|
|
14101
14132
|
window === null || window === void 0 ? void 0 : window.scroll(0, 0);
|
|
@@ -14108,7 +14139,7 @@ const SuperSelectionApp = class {
|
|
|
14108
14139
|
return ((_a = this.appBaseUrl) === null || _a === void 0 ? void 0 : _a.replace(/\/$/, '')) + '/';
|
|
14109
14140
|
}
|
|
14110
14141
|
renderAppContent() {
|
|
14111
|
-
return (index.h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" }, index.h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (index.h("div", { class: "pt-28 -mt-12 pb-6" },
|
|
14142
|
+
return (index.h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" }, index.h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (index.h("div", { class: "pt-28 -mt-12 pb-6" }, eventTracking_service.superSelectionAppStencilRoutes, index.h("sss-footer-section", null))) : (index.h("div", { class: "flex justify-center py-20" }, index.h("sss-loading-indicator", null))))));
|
|
14112
14143
|
}
|
|
14113
14144
|
static get assetsDirs() { return ["assets"]; }
|
|
14114
14145
|
static get watchers() { return {
|
|
@@ -14116,7 +14147,7 @@ const SuperSelectionApp = class {
|
|
|
14116
14147
|
"location": ["onRouteChange"]
|
|
14117
14148
|
}; }
|
|
14118
14149
|
};
|
|
14119
|
-
|
|
14150
|
+
injectHistory.injectHistory(SuperSelectionApp);
|
|
14120
14151
|
SuperSelectionApp.style = superSelectionAppCss;
|
|
14121
14152
|
|
|
14122
14153
|
var resizeObservers = [];
|
|
@@ -14622,14 +14653,14 @@ class AppConfigurationService {
|
|
|
14622
14653
|
this.getAppHostUrl = () => `${window.location.origin}${this.getAppRootUrl()}`.replace(/\/$/, '');
|
|
14623
14654
|
}
|
|
14624
14655
|
async loadConfigurationAsync() {
|
|
14625
|
-
const configuration = await
|
|
14656
|
+
const configuration = await superSelectionApp_service.factory(`${this.getAppRootUrl()}config.json`)
|
|
14626
14657
|
.get()
|
|
14627
14658
|
.json();
|
|
14628
|
-
sessionStore.update({ appConfiguration:
|
|
14659
|
+
sessionStore.update({ appConfiguration: superSelectionApp_service.Option.fromNullable(configuration) });
|
|
14629
14660
|
}
|
|
14630
14661
|
resolveRootUrl() {
|
|
14631
|
-
const match =
|
|
14632
|
-
if (
|
|
14662
|
+
const match = superSelectionApp_service.Option.fromNullable(window.location.pathname.match(/^\/super-selection\/embed\/v1.0\/app/));
|
|
14663
|
+
if (superSelectionApp_service.Option.isNone(match)) {
|
|
14633
14664
|
throw Error('Unsupported host URL');
|
|
14634
14665
|
}
|
|
14635
14666
|
return match.value[0] + '/';
|
|
@@ -14643,8 +14674,8 @@ class AppParametersService {
|
|
|
14643
14674
|
}
|
|
14644
14675
|
init(query) {
|
|
14645
14676
|
const urlParams = new URLSearchParams(query);
|
|
14646
|
-
const queryParamValue =
|
|
14647
|
-
const ignoreExistingSelection =
|
|
14677
|
+
const queryParamValue = superSelectionApp_service.Option.fromNullable(urlParams.get(this.ignoreExistingSelectionQueryParameter));
|
|
14678
|
+
const ignoreExistingSelection = superSelectionApp_service.Option.fold(() => false, (value) => value === 'true')(queryParamValue);
|
|
14648
14679
|
sessionStore.update({ ignoreExistingSelection: ignoreExistingSelection });
|
|
14649
14680
|
}
|
|
14650
14681
|
}
|
|
@@ -14682,11 +14713,11 @@ class AuthenticationService {
|
|
|
14682
14713
|
}
|
|
14683
14714
|
authorizationCodeIsPresent(query) {
|
|
14684
14715
|
const authCode = this.getAuthorizationCodeFromRoute(query);
|
|
14685
|
-
return
|
|
14716
|
+
return superSelectionApp_service.Option.isSome(authCode);
|
|
14686
14717
|
}
|
|
14687
14718
|
initFromRoute(query) {
|
|
14688
14719
|
const authorizationCode = this.getAuthorizationCodeFromRoute(query);
|
|
14689
|
-
if (
|
|
14720
|
+
if (superSelectionApp_service.Option.isNone(authorizationCode)) {
|
|
14690
14721
|
sessionStore.update({ authenticationState: AuthenticationState.Error });
|
|
14691
14722
|
throw Error(`"${this.authCodeQueryParameter}" URL query parameter missing`);
|
|
14692
14723
|
}
|
|
@@ -14699,7 +14730,7 @@ class AuthenticationService {
|
|
|
14699
14730
|
['code', authorizationCode],
|
|
14700
14731
|
['redirect_uri', `${appConfigurationService.getAppHostUrl()}`]
|
|
14701
14732
|
]);
|
|
14702
|
-
const tokenResponse = await
|
|
14733
|
+
const tokenResponse = await superSelectionApp_service.factory(appConfigurationQuery.configuration.OidcAuthority + '/connect/token')
|
|
14703
14734
|
.headers({ 'Content-Type': 'application/x-www-form-urlencoded' })
|
|
14704
14735
|
.post(formData.toString())
|
|
14705
14736
|
.badRequest(() => {
|
|
@@ -14708,7 +14739,7 @@ class AuthenticationService {
|
|
|
14708
14739
|
})
|
|
14709
14740
|
.json();
|
|
14710
14741
|
sessionStore.update({
|
|
14711
|
-
jwt:
|
|
14742
|
+
jwt: superSelectionApp_service.Option.fromNullable(tokenResponse.access_token),
|
|
14712
14743
|
authenticationState: AuthenticationState.Authenticated
|
|
14713
14744
|
});
|
|
14714
14745
|
sendAnalyticsEvent('oidc_sign_in', {});
|
|
@@ -14716,7 +14747,7 @@ class AuthenticationService {
|
|
|
14716
14747
|
}
|
|
14717
14748
|
getAuthorizationCodeFromRoute(query) {
|
|
14718
14749
|
const urlParams = new URLSearchParams(query);
|
|
14719
|
-
return
|
|
14750
|
+
return superSelectionApp_service.Option.fromNullable(urlParams.get(this.authCodeQueryParameter));
|
|
14720
14751
|
}
|
|
14721
14752
|
}
|
|
14722
14753
|
const authenticationService = new AuthenticationService();
|
|
@@ -14727,14 +14758,14 @@ class InteropQuery extends datoramaAkita.Query {
|
|
|
14727
14758
|
this.store = store;
|
|
14728
14759
|
}
|
|
14729
14760
|
isReactNativeInteropEnabled() {
|
|
14730
|
-
return
|
|
14761
|
+
return superSelectionApp_service.isSome(this.getValue().reactNativeInterop);
|
|
14731
14762
|
}
|
|
14732
14763
|
isIframeInteropEnabled() {
|
|
14733
|
-
return
|
|
14764
|
+
return superSelectionApp_service.isSome(this.getValue().iframeInterop);
|
|
14734
14765
|
}
|
|
14735
14766
|
getIframeInteropMode() {
|
|
14736
14767
|
const iframeInterop = this.getValue().iframeInterop;
|
|
14737
|
-
if (
|
|
14768
|
+
if (superSelectionApp_service.isNone(iframeInterop)) {
|
|
14738
14769
|
throw Error('Failed to get iframe interop information: no data in store');
|
|
14739
14770
|
}
|
|
14740
14771
|
if (!this.isIframeInteropEnabled()) {
|
|
@@ -14748,22 +14779,22 @@ const interopQuery = new InteropQuery(sessionStore);
|
|
|
14748
14779
|
class IFrameInteropService {
|
|
14749
14780
|
static completeSuperSelectionStep() {
|
|
14750
14781
|
const { successRedirectionUrl } = interopQuery.getIframeInteropMode();
|
|
14751
|
-
if (
|
|
14782
|
+
if (superSelectionApp_service.Option.isSome(successRedirectionUrl)) {
|
|
14752
14783
|
window.top.location.href = successRedirectionUrl.value;
|
|
14753
14784
|
}
|
|
14754
14785
|
else {
|
|
14755
|
-
|
|
14786
|
+
eventTracking_service.iframe.complete();
|
|
14756
14787
|
}
|
|
14757
14788
|
}
|
|
14758
14789
|
static initFromRoute(route) {
|
|
14759
14790
|
const redirectionUrlQueryParameter = 'success-redirection-url';
|
|
14760
14791
|
const urlParams = new URLSearchParams(route);
|
|
14761
|
-
const redirectionUrl =
|
|
14762
|
-
const iframeMode = { successRedirectionUrl:
|
|
14763
|
-
if (
|
|
14792
|
+
const redirectionUrl = superSelectionApp_service.Option.fromNullable(urlParams.get(redirectionUrlQueryParameter));
|
|
14793
|
+
const iframeMode = { successRedirectionUrl: superSelectionApp_service.Option.none };
|
|
14794
|
+
if (superSelectionApp_service.Option.isSome(redirectionUrl)) {
|
|
14764
14795
|
try {
|
|
14765
14796
|
const validatedUrl = new URL(redirectionUrl.value);
|
|
14766
|
-
iframeMode.successRedirectionUrl =
|
|
14797
|
+
iframeMode.successRedirectionUrl = superSelectionApp_service.Option.some(validatedUrl.toString());
|
|
14767
14798
|
}
|
|
14768
14799
|
catch (error) {
|
|
14769
14800
|
throw Error(`"${redirectionUrl.value}" is not a valid URL`);
|
|
@@ -14810,12 +14841,12 @@ class HostInteropService {
|
|
|
14810
14841
|
}
|
|
14811
14842
|
init(urlQuery) {
|
|
14812
14843
|
const urlParams = new URLSearchParams(urlQuery);
|
|
14813
|
-
const interopMode =
|
|
14814
|
-
if (
|
|
14815
|
-
sessionStore.update({ reactNativeInterop:
|
|
14844
|
+
const interopMode = superSelectionApp_service.fromNullable(urlParams.get(this.interopModeQueryParameter));
|
|
14845
|
+
if (superSelectionApp_service.isSome(interopMode) && interopMode.value === "react-native") {
|
|
14846
|
+
sessionStore.update({ reactNativeInterop: superSelectionApp_service.some(ReactNativeInteropService.init()) });
|
|
14816
14847
|
return;
|
|
14817
14848
|
}
|
|
14818
|
-
sessionStore.update({ iframeInterop:
|
|
14849
|
+
sessionStore.update({ iframeInterop: superSelectionApp_service.some(IFrameInteropService.initFromRoute(urlQuery)) });
|
|
14819
14850
|
}
|
|
14820
14851
|
}
|
|
14821
14852
|
const hostInteropService = new HostInteropService();
|
|
@@ -14860,10 +14891,10 @@ const SuperSelectionAppHost = class {
|
|
|
14860
14891
|
appParametersQuery.ignoreExistingSelection$.subscribe((newValue) => (this.ignoreExistingSelection = newValue));
|
|
14861
14892
|
}
|
|
14862
14893
|
render() {
|
|
14863
|
-
return (index.h(index.Host, null, index.h("link", { rel: "stylesheet", href: index.getAssetPath('apollo-super-selection.css'), media: "all" }), index.h("div", { ref: (el) => this.observeContentResize(el) },
|
|
14894
|
+
return (index.h(index.Host, null, index.h("link", { rel: "stylesheet", href: index.getAssetPath('apollo-super-selection.css'), media: "all" }), index.h("div", { ref: (el) => this.observeContentResize(el) }, superSelectionApp_service.Option.isNone(this.appConfiguration) ? (index.h("sss-loading-page", { class: "font-inter" })) : (this.renderAppContent()))));
|
|
14864
14895
|
}
|
|
14865
14896
|
renderAppContent() {
|
|
14866
|
-
return (index.h("stencil-router", { root: appConfigurationService.getAppRootUrl(), class: "sss-app-container" }, index.h("stencil-route-switch", { scrollTopOffset: 0 }, index.h("stencil-route", { url: "/", routeRender: this.renderProtectedRoute((props) => (index.h("super-selection-app", Object.assign({ accessToken:
|
|
14897
|
+
return (index.h("stencil-router", { root: appConfigurationService.getAppRootUrl(), class: "sss-app-container" }, index.h("stencil-route-switch", { scrollTopOffset: 0 }, index.h("stencil-route", { url: "/", routeRender: this.renderProtectedRoute((props) => (index.h("super-selection-app", Object.assign({ accessToken: superSelectionApp_service.Option.toUndefined(this.jwt), ignoreExistingSelection: this.ignoreExistingSelection, backendUrl: appConfigurationQuery.configuration.ApiBaseUrl, appBaseUrl: this.getAppBaseUrl(), onSuccessPageAcknowledged: this.handleSuccessPageAcknowledged, "onStep-completion": this.handleStepSubmitSuccess, onInitialised: this.handleAppInitialised, isSelfHosted: true }, props)))) }))));
|
|
14867
14898
|
}
|
|
14868
14899
|
getAppBaseUrl() {
|
|
14869
14900
|
const splits = window.location.pathname.split('app');
|
|
@@ -14873,7 +14904,7 @@ const SuperSelectionAppHost = class {
|
|
|
14873
14904
|
hostInteropService.completeSuperSelectionStep();
|
|
14874
14905
|
}
|
|
14875
14906
|
handleStepSubmitSuccess() {
|
|
14876
|
-
|
|
14907
|
+
eventTracking_service.iframe.submitSuccess();
|
|
14877
14908
|
}
|
|
14878
14909
|
handleAppInitialised(evt) {
|
|
14879
14910
|
appInsights.addCustomProperties({
|
|
@@ -14890,7 +14921,7 @@ const SuperSelectionAppHost = class {
|
|
|
14890
14921
|
observeContentResize(appContent) {
|
|
14891
14922
|
const ResizeObserver$1 = window.ResizeObserver || ResizeObserver;
|
|
14892
14923
|
new ResizeObserver$1(() => {
|
|
14893
|
-
|
|
14924
|
+
eventTracking_service.iframe.resize(appContent.offsetHeight, -1);
|
|
14894
14925
|
}).observe(appContent);
|
|
14895
14926
|
}
|
|
14896
14927
|
renderProtectedRoute(renderProtectedComponent) {
|
|
@@ -14911,7 +14942,7 @@ SuperSelectionAppHost.style = superSelectionAppHostCss;
|
|
|
14911
14942
|
exports.sss_button = Button;
|
|
14912
14943
|
exports.sss_choice_router = ChoiceRouter;
|
|
14913
14944
|
exports.sss_custom_fund = CustomFund;
|
|
14914
|
-
exports.
|
|
14945
|
+
exports.sss_default_fund_host = SuperDefaultFundHost;
|
|
14915
14946
|
exports.sss_dropdown_async = SelectInputAsync;
|
|
14916
14947
|
exports.sss_existing_choice_page = ExistingChoice;
|
|
14917
14948
|
exports.sss_footer_section = FooterSection;
|