@flarehr/apollo-super-selection 1.4.56819 → 1.4.56936
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-07893761.system.entry.js +1 -0
- package/dist/lib/apollo-super-selection/p-23fd6656.system.entry.js +69 -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-65607828.entry.js +14 -0
- package/dist/lib/apollo-super-selection/p-6d4e757b.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-89c8d0e2.entry.js +1 -0
- package/dist/lib/apollo-super-selection/p-9cd765f5.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-a2b4e667.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-a99c601b.js +1 -0
- package/dist/lib/apollo-super-selection/p-b3f43d1a.entry.js +1 -0
- package/dist/lib/apollo-super-selection/p-bbe230d9.entry.js +1 -0
- package/dist/lib/apollo-super-selection/p-bd6e6a8f.system.js +1 -1
- package/dist/lib/apollo-super-selection/p-d5c7a35f.js +1 -0
- package/dist/lib/apollo-super-selection/p-dac37462.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-f8bb280b.js +1 -0
- package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
- package/dist/lib/cjs/australian-fund-lookup.service-4be59dec.js +19 -0
- package/dist/lib/cjs/custom-fund.store-3d1ac996.js +37 -0
- package/dist/lib/cjs/event-tracking.service-ed12699a.js +296 -0
- package/dist/lib/cjs/injectHistory-eb188cf0.js +9 -0
- package/dist/lib/cjs/loader.cjs.js +1 -1
- package/dist/lib/cjs/sss-button_32.cjs.entry.js +382 -351
- package/dist/lib/cjs/sss-default-fund-router.cjs.entry.js +23 -0
- package/dist/lib/cjs/sss-default-fund.cjs.entry.js +61 -0
- package/dist/lib/cjs/sss-super-byof-host.cjs.entry.js +24 -21
- package/dist/lib/cjs/{custom-fund-choice.api-293c1ace.js → super-selection-app.service-ca52a1fc.js} +7 -331
- package/dist/lib/collection/collection-manifest.json +3 -1
- package/dist/lib/collection/components/default-fund/super-default-fund-types.js +1 -0
- package/dist/lib/collection/components/default-fund/super-default-fund.js +130 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund-router.js +37 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +1 -1
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +4 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +2 -1
- package/dist/lib/esm/apollo-super-selection.js +1 -1
- package/dist/lib/esm/australian-fund-lookup.service-a2f593d3.js +17 -0
- package/dist/lib/esm/custom-fund.store-dcc61edf.js +36 -0
- package/dist/lib/esm/event-tracking.service-9398a317.js +290 -0
- package/dist/lib/esm/injectHistory-e92e4664.js +7 -0
- package/dist/lib/esm/loader.js +1 -1
- package/dist/lib/esm/sss-button_32.entry.js +89 -58
- package/dist/lib/esm/sss-default-fund-router.entry.js +19 -0
- package/dist/lib/esm/sss-default-fund.entry.js +57 -0
- package/dist/lib/esm/sss-super-byof-host.entry.js +4 -1
- package/dist/lib/esm/{custom-fund-choice.api-42801d64.js → super-selection-app.service-50f199de.js} +8 -327
- package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
- package/dist/lib/esm-es5/australian-fund-lookup.service-a2f593d3.js +1 -0
- package/dist/lib/esm-es5/custom-fund.store-dcc61edf.js +1 -0
- package/dist/lib/esm-es5/event-tracking.service-9398a317.js +1 -0
- package/dist/lib/esm-es5/injectHistory-e92e4664.js +1 -0
- package/dist/lib/esm-es5/loader.js +1 -1
- package/dist/lib/esm-es5/sss-button_32.entry.js +5 -5
- package/dist/lib/esm-es5/sss-default-fund-router.entry.js +1 -0
- package/dist/lib/esm-es5/sss-default-fund.entry.js +1 -0
- package/dist/lib/esm-es5/sss-super-byof-host.entry.js +1 -1
- package/dist/lib/esm-es5/super-selection-app.service-50f199de.js +1 -0
- package/dist/lib/types/components/default-fund/super-default-fund-types.d.ts +23 -0
- package/dist/lib/types/components/default-fund/super-default-fund.d.ts +20 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/default-fund/default-fund-router.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +1 -0
- package/dist/lib/types/components.d.ts +30 -0
- package/package.json +1 -1
- package/dist/lib/apollo-super-selection/p-24d6e2b8.js +0 -1
- package/dist/lib/apollo-super-selection/p-a0063575.system.entry.js +0 -1
- package/dist/lib/apollo-super-selection/p-aa9dedee.system.entry.js +0 -69
- package/dist/lib/apollo-super-selection/p-b00f648b.entry.js +0 -1
- package/dist/lib/apollo-super-selection/p-c7ab3701.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-cd3ed541.system.js +0 -1
- package/dist/lib/esm-es5/custom-fund-choice.api-42801d64.js +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-eb4f212f.js');
|
|
6
|
+
const superSelectionApp_service = require('./super-selection-app.service-ca52a1fc.js');
|
|
7
|
+
require('./active-router-1f555f75.js');
|
|
8
|
+
const injectHistory = require('./injectHistory-eb188cf0.js');
|
|
9
|
+
|
|
10
|
+
const DefaultFundRouter = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
if (superSelectionApp_service.superSelectionAppService.isDefaultFundNewComponentEnabled) {
|
|
16
|
+
return (index.h(index.Host, null, index.h("sss-default-fund-host", null)));
|
|
17
|
+
}
|
|
18
|
+
return (index.h(index.Host, null, index.h("sss-default-fund", { history: this.history })));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
injectHistory.injectHistory(DefaultFundRouter);
|
|
22
|
+
|
|
23
|
+
exports.sss_default_fund_router = DefaultFundRouter;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-eb4f212f.js');
|
|
6
|
+
const superSelectionApp_service = require('./super-selection-app.service-ca52a1fc.js');
|
|
7
|
+
const eventTracking_service = require('./event-tracking.service-ed12699a.js');
|
|
8
|
+
const australianFundLookup_service = require('./australian-fund-lookup.service-4be59dec.js');
|
|
9
|
+
|
|
10
|
+
const DefaultFund = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.defaultFundProductName = 'Loading fund...';
|
|
14
|
+
this.eventTrackingService = eventTracking_service.EventTrackingService.Instance;
|
|
15
|
+
}
|
|
16
|
+
async componentWillLoad() {
|
|
17
|
+
const defaultFundUsi = superSelectionApp_service.superSelectionAppService.defaultFundUsi;
|
|
18
|
+
if (superSelectionApp_service.Option.isNone(defaultFundUsi)) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
this.isDefaultFundExists = true;
|
|
22
|
+
const defaultFundSearchResult = await australianFundLookup_service.australianFundLookupService.getFundAsync(defaultFundUsi.value, true);
|
|
23
|
+
if (superSelectionApp_service.Option.isNone(defaultFundSearchResult)) {
|
|
24
|
+
this.isInvalidDefaultFund = true;
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.defaultFund = defaultFundSearchResult.value;
|
|
28
|
+
this.defaultFundProductName = defaultFundSearchResult.value.productName;
|
|
29
|
+
}
|
|
30
|
+
componentDidLoad() {
|
|
31
|
+
var _a, _b, _c, _d;
|
|
32
|
+
return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({
|
|
33
|
+
fundUsi: (_b = (_a = this.defaultFund) === null || _a === void 0 ? void 0 : _a.usi) !== null && _b !== void 0 ? _b : '',
|
|
34
|
+
fundName: (_d = (_c = this.defaultFund) === null || _c === void 0 ? void 0 : _c.productName) !== null && _d !== void 0 ? _d : '',
|
|
35
|
+
promotedFundsShown: superSelectionApp_service.superSelectionAppService.promotedFunds,
|
|
36
|
+
defaultFundUsiSet: superSelectionApp_service.Option.toUndefined(superSelectionApp_service.superSelectionAppService.defaultFundUsi)
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
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", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" }, index.h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"), (!this.isDefaultFundExists || this.isInvalidDefaultFund) && (index.h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-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-exclamation.svg') })), index.h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" }, index.h("span", null, "It looks like your employer has not specified a default fund, please contact them if you\u2019d like to use your company\u2019s default fund."))))), this.isDefaultFundExists && !this.isInvalidDefaultFund && (index.h("div", null, index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Fund Name"), index.h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm" }, this.defaultFundProductName)), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Fund USI"), index.h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm" }, this.defaultFund.usi)), index.h("div", { class: "mt-8 mb-8 h-px w-full bg-gray-200" }), index.h("div", { class: "text-sm text-gray-700" }, index.h("label", { class: "font-semibold text-gray-900" }, "By clicking \u201CContinue\u201D, you acknowledge that:"), index.h("ul", { class: "list-disc list-outside pl-5" }, index.h("li", { class: "mt-2" }, "you are choosing to join your employer\u2019s default super fund;"), index.h("li", { class: "mt-2" }, "your employer will open a new account for you with their default super fund; and"), index.h("li", { class: "mt-2" }, "your application to join is subject to Trustee approval.")))))), index.h("div", { class: "flex justify-center mt-8" }, index.h("div", { class: "sm:max-w-320 w-full" }, this.isDefaultFundExists && !this.isInvalidDefaultFund && (index.h("div", { class: "mb-4" }, index.h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm() }, "Continue"))), index.h("stencil-route-link", { url: eventTracking_service.SuperSelectionAppRoutes.ChoicePage }, index.h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back"))))))));
|
|
41
|
+
}
|
|
42
|
+
async handleSubmitForm() {
|
|
43
|
+
if (this.isInvalidDefaultFund) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
47
|
+
history: this.history,
|
|
48
|
+
fundName: `Employer’s default fund`,
|
|
49
|
+
fundDetails: {
|
|
50
|
+
type: 'default',
|
|
51
|
+
fundName: this.defaultFundProductName,
|
|
52
|
+
fundUsi: this.defaultFund.usi
|
|
53
|
+
},
|
|
54
|
+
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
55
|
+
await eventTracking_service.customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({ standardChoiceFormSignature }, superSelectionApp_service.superSelectionAppService.promotedFundsConfig));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
exports.sss_default_fund = DefaultFund;
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-eb4f212f.js');
|
|
6
|
-
const
|
|
6
|
+
const superSelectionApp_service = require('./super-selection-app.service-ca52a1fc.js');
|
|
7
7
|
require('./active-router-1f555f75.js');
|
|
8
|
+
const injectHistory = require('./injectHistory-eb188cf0.js');
|
|
9
|
+
const eventTracking_service = require('./event-tracking.service-ed12699a.js');
|
|
10
|
+
const customFund_store = require('./custom-fund.store-3d1ac996.js');
|
|
8
11
|
|
|
9
12
|
const LoadWaitingTimeout = 30000;
|
|
10
13
|
|
|
@@ -17,7 +20,7 @@ let superByofComponentStatus = SuperByofComponentStatus.NotLoaded;
|
|
|
17
20
|
const SuperByofHost = class {
|
|
18
21
|
constructor(hostRef) {
|
|
19
22
|
index.registerInstance(this, hostRef);
|
|
20
|
-
this.eventTrackingService =
|
|
23
|
+
this.eventTrackingService = eventTracking_service.EventTrackingService.Instance;
|
|
21
24
|
this.subscribeToSuperByofEvents = () => {
|
|
22
25
|
for (const eventName in this.byofEventHandlers) {
|
|
23
26
|
document.addEventListener(eventName, this.byofEventHandlers[eventName]);
|
|
@@ -33,27 +36,27 @@ const SuperByofHost = class {
|
|
|
33
36
|
superByofComponentStatus = SuperByofComponentStatus.Loaded;
|
|
34
37
|
clearTimeout(this.loadingTimeoutRef);
|
|
35
38
|
this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({
|
|
36
|
-
promotedFundsShown:
|
|
37
|
-
defaultFundUsiSet:
|
|
39
|
+
promotedFundsShown: superSelectionApp_service.superSelectionAppService.promotedFunds,
|
|
40
|
+
defaultFundUsiSet: superSelectionApp_service.Option.toUndefined(superSelectionApp_service.superSelectionAppService.defaultFundUsi)
|
|
38
41
|
});
|
|
39
42
|
}
|
|
40
43
|
return Promise.resolve();
|
|
41
44
|
};
|
|
42
45
|
this.byofCompleted = async (event) => {
|
|
43
46
|
if (event.detail.sender === 'super-byof') {
|
|
44
|
-
|
|
45
|
-
fundUsi:
|
|
46
|
-
fundName:
|
|
47
|
-
memberNumber:
|
|
48
|
-
memberFirstName:
|
|
49
|
-
memberFamilyName:
|
|
47
|
+
customFund_store.state.myOwnFundForm = {
|
|
48
|
+
fundUsi: superSelectionApp_service.Option.fromNullable(event.detail.fundUsi),
|
|
49
|
+
fundName: superSelectionApp_service.Option.fromNullable(event.detail.fundName),
|
|
50
|
+
memberNumber: superSelectionApp_service.Option.fromNullable(event.detail.memberNumber),
|
|
51
|
+
memberFirstName: superSelectionApp_service.Option.fromNullable(event.detail.memberFirstName),
|
|
52
|
+
memberFamilyName: superSelectionApp_service.Option.fromNullable(event.detail.memberLastName)
|
|
50
53
|
};
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
if (superSelectionApp_service.superSelectionAppService.isBringYourOwnFundCustomStepEnabled &&
|
|
55
|
+
superSelectionApp_service.superSelectionAppService.isUsingSuperCampaign) {
|
|
56
|
+
eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.MyOwnFundEngagementStep);
|
|
54
57
|
return;
|
|
55
58
|
}
|
|
56
|
-
|
|
59
|
+
eventTracking_service.navigationService.navigateInternallyToStandardChoice({
|
|
57
60
|
history: this.history,
|
|
58
61
|
fundName: event.detail.fundName,
|
|
59
62
|
fundDetails: {
|
|
@@ -63,15 +66,15 @@ const SuperByofHost = class {
|
|
|
63
66
|
memberNumber: event.detail.memberNumber
|
|
64
67
|
},
|
|
65
68
|
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
66
|
-
const customFundChoiceDto = Object.assign({ fundUsi: event.detail.fundUsi, memberNumber: event.detail.memberNumber, memberFirstName: event.detail.memberFirstName, memberFamilyName: event.detail.memberLastName, standardChoiceFormSignature },
|
|
67
|
-
await
|
|
69
|
+
const customFundChoiceDto = Object.assign({ fundUsi: event.detail.fundUsi, memberNumber: event.detail.memberNumber, memberFirstName: event.detail.memberFirstName, memberFamilyName: event.detail.memberLastName, standardChoiceFormSignature }, superSelectionApp_service.superSelectionAppService.promotedFundsConfig);
|
|
70
|
+
await eventTracking_service.customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
|
|
68
71
|
}
|
|
69
72
|
});
|
|
70
73
|
}
|
|
71
74
|
};
|
|
72
75
|
this.byofCancelled = async (event) => {
|
|
73
76
|
if (event.detail.sender === 'super-byof') {
|
|
74
|
-
await
|
|
77
|
+
await eventTracking_service.navigationService.navigateInternally(this.history, eventTracking_service.SuperSelectionAppRoutes.ChoicePage);
|
|
75
78
|
}
|
|
76
79
|
};
|
|
77
80
|
this.byofEventHandlers = {
|
|
@@ -81,9 +84,9 @@ const SuperByofHost = class {
|
|
|
81
84
|
};
|
|
82
85
|
}
|
|
83
86
|
async componentWillLoad() {
|
|
84
|
-
if (
|
|
85
|
-
this.backendUrl =
|
|
86
|
-
this.accessToken =
|
|
87
|
+
if (superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.backendUrl) && superSelectionApp_service.Option.isSome(superSelectionApp_service.superSelectionAppService.state.jwt)) {
|
|
88
|
+
this.backendUrl = superSelectionApp_service.superSelectionAppService.backendUrl.value;
|
|
89
|
+
this.accessToken = superSelectionApp_service.superSelectionAppService.state.jwt.value;
|
|
87
90
|
if (superByofComponentStatus === SuperByofComponentStatus.NotLoaded) {
|
|
88
91
|
this.loadingTimeoutRef = setTimeout(this.byofLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout);
|
|
89
92
|
}
|
|
@@ -106,6 +109,6 @@ const SuperByofHost = class {
|
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
111
|
};
|
|
109
|
-
|
|
112
|
+
injectHistory.injectHistory(SuperByofHost);
|
|
110
113
|
|
|
111
114
|
exports.sss_super_byof_host = SuperByofHost;
|
package/dist/lib/cjs/{custom-fund-choice.api-293c1ace.js → super-selection-app.service-ca52a1fc.js}
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-eb4f212f.js');
|
|
4
|
-
const activeRouter = require('./active-router-1f555f75.js');
|
|
5
4
|
|
|
6
5
|
// -------------------------------------------------------------------------------------
|
|
7
6
|
// guards
|
|
@@ -95,44 +94,6 @@ function toUndefined(ma) {
|
|
|
95
94
|
return isNone(ma) ? undefined : ma.value;
|
|
96
95
|
}
|
|
97
96
|
|
|
98
|
-
function injectHistory(Component) {
|
|
99
|
-
activeRouter.ActiveRouter.injectProps(Component, ['history', 'location']);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function appReady() {
|
|
103
|
-
postMessage({
|
|
104
|
-
type: 'appReady'
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
function postMessage(message, origin) {
|
|
108
|
-
if (origin === undefined)
|
|
109
|
-
origin = '*';
|
|
110
|
-
message.sender = 'flare';
|
|
111
|
-
window.parent.postMessage(message, origin);
|
|
112
|
-
}
|
|
113
|
-
function resize(height, width) {
|
|
114
|
-
postMessage({
|
|
115
|
-
type: 'contentResized',
|
|
116
|
-
height,
|
|
117
|
-
width
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function navigation(url) {
|
|
121
|
-
postMessage({
|
|
122
|
-
type: 'pageNavigated',
|
|
123
|
-
url
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function complete() {
|
|
127
|
-
postMessage({ type: 'complete' });
|
|
128
|
-
}
|
|
129
|
-
function submitSuccess() {
|
|
130
|
-
postMessage({
|
|
131
|
-
type: 'submitSuccess'
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
const iframe = { appReady, resize, navigation, complete, submitSuccess };
|
|
135
|
-
|
|
136
97
|
const appendToMap = (map, propName, value) => {
|
|
137
98
|
const items = map.get(propName);
|
|
138
99
|
if (!items) {
|
|
@@ -304,53 +265,6 @@ const createStore = (defaultState, shouldUpdate) => {
|
|
|
304
265
|
return map;
|
|
305
266
|
};
|
|
306
267
|
|
|
307
|
-
const initial = {
|
|
308
|
-
handleSubmitFn: async function () {
|
|
309
|
-
return;
|
|
310
|
-
},
|
|
311
|
-
fundName: '',
|
|
312
|
-
fundDetails: { type: 'null' },
|
|
313
|
-
promotedFundId: undefined
|
|
314
|
-
};
|
|
315
|
-
const { state } = createStore(initial);
|
|
316
|
-
|
|
317
|
-
(function (SuperSelectionAppRoutes) {
|
|
318
|
-
SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
|
|
319
|
-
SuperSelectionAppRoutes["SuperCampaign"] = "/super-campaign";
|
|
320
|
-
SuperSelectionAppRoutes["ChoicePage"] = "/";
|
|
321
|
-
SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
|
|
322
|
-
SuperSelectionAppRoutes["MyOwnFundEngagementStep"] = "/super-choice/my-own-fund-engagement/";
|
|
323
|
-
SuperSelectionAppRoutes["SmsfEngagementStep"] = "/super-choice/smsf-engagement/";
|
|
324
|
-
SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
|
|
325
|
-
SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
|
|
326
|
-
SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
|
|
327
|
-
SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
|
|
328
|
-
SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
|
|
329
|
-
SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
|
|
330
|
-
SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
|
|
331
|
-
SuperSelectionAppRoutes["FeaturedFunds"] = "/super-choice/featured-funds/";
|
|
332
|
-
SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
|
|
333
|
-
SuperSelectionAppRoutes["Success"] = "/success/";
|
|
334
|
-
})(exports.SuperSelectionAppRoutes || (exports.SuperSelectionAppRoutes = {}));
|
|
335
|
-
const superSelectionAppStencilRoutes = [
|
|
336
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
|
|
337
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
|
|
338
|
-
index.h("stencil-route", { exact: true, url: exports.SuperSelectionAppRoutes.ChoicePage, component: "sss-choice-router" }),
|
|
339
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.MyOwnFund, component: "sss-super-byof-host" }),
|
|
340
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.MyOwnFundEngagementStep, component: "sss-my-own-fund-engagement-step-host" }),
|
|
341
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.SmsfEngagementStep, component: "sss-smsf-engagement-step-host" }),
|
|
342
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
|
|
343
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
|
|
344
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
|
|
345
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
|
|
346
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
|
|
347
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.SelfManagedFund, component: "sss-super-smsf-host" }),
|
|
348
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
|
|
349
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.FeaturedFunds, component: "sss-super-campaign-featured-funds" }),
|
|
350
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
|
|
351
|
-
index.h("stencil-route", { url: exports.SuperSelectionAppRoutes.Success, component: "sss-success" })
|
|
352
|
-
];
|
|
353
|
-
|
|
354
268
|
function createCommonjsModule(fn, basedir, module) {
|
|
355
269
|
return module = {
|
|
356
270
|
path: basedir,
|
|
@@ -2779,7 +2693,8 @@ const initialState = {
|
|
|
2779
2693
|
hideFooterSection: false,
|
|
2780
2694
|
bringYourOwnFundCustomStepEnabled: false,
|
|
2781
2695
|
smsfCustomStepEnabled: false,
|
|
2782
|
-
featuredFundsEnabled: false
|
|
2696
|
+
featuredFundsEnabled: false,
|
|
2697
|
+
defaultFundNewComponentEnabled: false
|
|
2783
2698
|
};
|
|
2784
2699
|
|
|
2785
2700
|
class SuperSelectionAppService {
|
|
@@ -2881,6 +2796,7 @@ class SuperSelectionAppService {
|
|
|
2881
2796
|
appStateResponse.bringYourOwnFundCustomStepEnabled;
|
|
2882
2797
|
this._state.smsfCustomStepEnabled = appStateResponse.smsfCustomStepEnabled;
|
|
2883
2798
|
this._state.featuredFundsEnabled = appStateResponse.featuredFundsEnabled;
|
|
2799
|
+
this._state.defaultFundNewComponentEnabled = appStateResponse.defaultFundNewComponentEnabled;
|
|
2884
2800
|
this._state.superChoicePrefill = Option.fromNullable(appStateResponse.prefill);
|
|
2885
2801
|
this._state.isDefinedBenefitsEligible = Option.fromNullable(appStateResponse.isDefinedBenefitsEligible);
|
|
2886
2802
|
if (Option.isSome(this._state.accountConfiguration)) {
|
|
@@ -2928,6 +2844,9 @@ class SuperSelectionAppService {
|
|
|
2928
2844
|
get isFeaturedFundsEnabled() {
|
|
2929
2845
|
return this.state.featuredFundsEnabled;
|
|
2930
2846
|
}
|
|
2847
|
+
get isDefaultFundNewComponentEnabled() {
|
|
2848
|
+
return this.state.defaultFundNewComponentEnabled;
|
|
2849
|
+
}
|
|
2931
2850
|
get superCampaignCanNotBeActivated() {
|
|
2932
2851
|
return (!this.state.superCampaignEnabled ||
|
|
2933
2852
|
this.superCampaignComponentStatus === exports.SuperCampaignComponentStatus.NotWorking);
|
|
@@ -2948,262 +2867,19 @@ class SuperSelectionAppService {
|
|
|
2948
2867
|
}
|
|
2949
2868
|
const superSelectionAppService = new SuperSelectionAppService();
|
|
2950
2869
|
|
|
2951
|
-
class NavigationService {
|
|
2952
|
-
navigateInternally(history, route) {
|
|
2953
|
-
const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
|
|
2954
|
-
iframe.navigation(path);
|
|
2955
|
-
history.push(path);
|
|
2956
|
-
}
|
|
2957
|
-
navigateInternallyToStandardChoice(options) {
|
|
2958
|
-
state.handleSubmitFn = options.handleSubmitFn;
|
|
2959
|
-
state.fundName = options.fundName;
|
|
2960
|
-
state.fundDetails = options.fundDetails;
|
|
2961
|
-
state.promotedFundId = options.promotedFundId;
|
|
2962
|
-
this.navigateInternally(options.history, exports.SuperSelectionAppRoutes.StandardChoice);
|
|
2963
|
-
}
|
|
2964
|
-
toExternalUrl(url) {
|
|
2965
|
-
const externalUrl = new URL(url);
|
|
2966
|
-
externalUrl.searchParams.append('_extnav', 'true');
|
|
2967
|
-
return externalUrl.href;
|
|
2968
|
-
}
|
|
2969
|
-
get appBaseUrl() {
|
|
2970
|
-
const baseUrl = superSelectionAppService.appBaseUrl;
|
|
2971
|
-
return baseUrl.replace(/\/$/, '');
|
|
2972
|
-
}
|
|
2973
|
-
toRouteWithLeadingSlash(route) {
|
|
2974
|
-
return route.length > 0 && route[0] === '/' ? route : `/${route}`;
|
|
2975
|
-
}
|
|
2976
|
-
}
|
|
2977
|
-
const navigationService = new NavigationService();
|
|
2978
|
-
|
|
2979
|
-
(function (CustomFundTypes) {
|
|
2980
|
-
CustomFundTypes["MyOwnFund"] = "Existing super fund";
|
|
2981
|
-
CustomFundTypes["DefaultFund"] = "Default super fund";
|
|
2982
|
-
CustomFundTypes["SelfManagedFund"] = "Self-managed super fund";
|
|
2983
|
-
CustomFundTypes["FeaturedFunds"] = "Featured super funds";
|
|
2984
|
-
})(exports.CustomFundTypes || (exports.CustomFundTypes = {}));
|
|
2985
|
-
const initialStateCustomFund = {
|
|
2986
|
-
myOwnFundForm: {
|
|
2987
|
-
fundUsi: none,
|
|
2988
|
-
fundName: none,
|
|
2989
|
-
memberNumber: none,
|
|
2990
|
-
memberFirstName: none,
|
|
2991
|
-
memberFamilyName: none
|
|
2992
|
-
},
|
|
2993
|
-
selfManagedFundForm: {
|
|
2994
|
-
fundName: '',
|
|
2995
|
-
fundAbn: '',
|
|
2996
|
-
fundEsa: '',
|
|
2997
|
-
addressLine1: '',
|
|
2998
|
-
addressLine2: '',
|
|
2999
|
-
state: '',
|
|
3000
|
-
postcode: '',
|
|
3001
|
-
city: '',
|
|
3002
|
-
bankAccountName: '',
|
|
3003
|
-
bsb: '',
|
|
3004
|
-
bankAccountNumber: '',
|
|
3005
|
-
memberFirstName: '',
|
|
3006
|
-
memberFamilyName: ''
|
|
3007
|
-
}
|
|
3008
|
-
};
|
|
3009
|
-
const { state: state$1, reset } = createStore(initialStateCustomFund);
|
|
3010
|
-
|
|
3011
|
-
class EventTrackingApi {
|
|
3012
|
-
static get Instance() {
|
|
3013
|
-
return this.instance || (this.instance = new this());
|
|
3014
|
-
}
|
|
3015
|
-
async PostAnalyticsEventAsync(event) {
|
|
3016
|
-
return buildBackendApiClient().url('analytics-events').post(event).res();
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
|
|
3020
|
-
class EventTrackingService {
|
|
3021
|
-
constructor() {
|
|
3022
|
-
this.eventTrackingApi = EventTrackingApi.Instance;
|
|
3023
|
-
}
|
|
3024
|
-
static get Instance() {
|
|
3025
|
-
return this.instance || (this.instance = new this());
|
|
3026
|
-
}
|
|
3027
|
-
async TrackSuperFundPdsViewedAsync(detail) {
|
|
3028
|
-
return this.trackEventAsync({
|
|
3029
|
-
SuperFundPdsViewed: detail
|
|
3030
|
-
});
|
|
3031
|
-
}
|
|
3032
|
-
async TrackPromotedSuperFundDetailViewedAsync(detail) {
|
|
3033
|
-
return this.trackEventAsync({
|
|
3034
|
-
SuperFundDetailViewed: {
|
|
3035
|
-
PromotedFund: detail
|
|
3036
|
-
}
|
|
3037
|
-
});
|
|
3038
|
-
}
|
|
3039
|
-
async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
|
|
3040
|
-
return this.trackEventAsync({
|
|
3041
|
-
SuperFundDetailViewed: {
|
|
3042
|
-
PromotedDefaultFund: detail
|
|
3043
|
-
}
|
|
3044
|
-
});
|
|
3045
|
-
}
|
|
3046
|
-
async TrackMyOwnSuperFundDetailViewedAsync(detail) {
|
|
3047
|
-
return this.trackEventAsync({
|
|
3048
|
-
SuperFundDetailViewed: {
|
|
3049
|
-
MyOwnFund: detail
|
|
3050
|
-
}
|
|
3051
|
-
});
|
|
3052
|
-
}
|
|
3053
|
-
async TrackSmsfSuperFundDetailViewedAsync(detail) {
|
|
3054
|
-
return this.trackEventAsync({
|
|
3055
|
-
SuperFundDetailViewed: {
|
|
3056
|
-
Smsf: detail
|
|
3057
|
-
}
|
|
3058
|
-
});
|
|
3059
|
-
}
|
|
3060
|
-
async TrackDefaultSuperFundDetailViewedAsync(detail) {
|
|
3061
|
-
return this.trackEventAsync({
|
|
3062
|
-
SuperFundDetailViewed: {
|
|
3063
|
-
DefaultFund: detail
|
|
3064
|
-
}
|
|
3065
|
-
});
|
|
3066
|
-
}
|
|
3067
|
-
async TrackSuperFundNominationViewedAsync(detail) {
|
|
3068
|
-
return this.trackEventAsync({
|
|
3069
|
-
SuperFundNominationViewed: detail
|
|
3070
|
-
});
|
|
3071
|
-
}
|
|
3072
|
-
async TrackSuperFundNominationDeclinedAsync(detail) {
|
|
3073
|
-
return this.trackEventAsync({
|
|
3074
|
-
SuperFundNominationDeclined: detail
|
|
3075
|
-
});
|
|
3076
|
-
}
|
|
3077
|
-
async TrackSuperFundDisclaimerViewedAsync(detail) {
|
|
3078
|
-
return this.trackEventAsync({
|
|
3079
|
-
SuperFundDisclaimerViewed: detail
|
|
3080
|
-
});
|
|
3081
|
-
}
|
|
3082
|
-
async TrackSuperFundDisclaimerAcceptedAsync(detail) {
|
|
3083
|
-
return this.trackEventAsync({
|
|
3084
|
-
SuperFundDisclaimerAccepted: detail
|
|
3085
|
-
});
|
|
3086
|
-
}
|
|
3087
|
-
async TrackSuperFundPrefillViewedAsync(detail) {
|
|
3088
|
-
return this.trackEventAsync({
|
|
3089
|
-
SuperFundPrefillViewed: detail
|
|
3090
|
-
});
|
|
3091
|
-
}
|
|
3092
|
-
async TrackSuperFundPrefillDeclinedAsync(detail) {
|
|
3093
|
-
return this.trackEventAsync({
|
|
3094
|
-
SuperFundPrefillDeclined: detail
|
|
3095
|
-
});
|
|
3096
|
-
}
|
|
3097
|
-
async TrackSuperFundDetailChangeRequestedAsync(detail) {
|
|
3098
|
-
return this.trackEventAsync({
|
|
3099
|
-
SuperFundDetailChangeRequested: detail
|
|
3100
|
-
});
|
|
3101
|
-
}
|
|
3102
|
-
async TrackSuperCampaignActivationSucceededAsync(detail) {
|
|
3103
|
-
return this.trackEventAsync({
|
|
3104
|
-
SuperCampaignActivationSucceeded: detail
|
|
3105
|
-
});
|
|
3106
|
-
}
|
|
3107
|
-
async TrackSuperMyOwnFundEngagementStepActivationSucceeded(fundUsi) {
|
|
3108
|
-
return this.trackEventAsync({
|
|
3109
|
-
SuperMyOwnFundEngagementStepActivationSucceeded: { fundUsi }
|
|
3110
|
-
});
|
|
3111
|
-
}
|
|
3112
|
-
async TrackSuperMyOwnFundEngagementStepContinued(fundUsi, reason) {
|
|
3113
|
-
return this.trackEventAsync({
|
|
3114
|
-
SuperMyOwnFundEngagementStepContinued: { fundUsi, reason }
|
|
3115
|
-
});
|
|
3116
|
-
}
|
|
3117
|
-
async TrackSuperSmsfEngagementStepActivationSucceeded() {
|
|
3118
|
-
return this.trackEventAsync({
|
|
3119
|
-
SuperSmsfEngagementStepActivationSucceeded: {}
|
|
3120
|
-
});
|
|
3121
|
-
}
|
|
3122
|
-
async TrackSuperSmsfEngagementStepContinued(reason) {
|
|
3123
|
-
return this.trackEventAsync({
|
|
3124
|
-
SuperSmsfEngagementStepContinued: { reason }
|
|
3125
|
-
});
|
|
3126
|
-
}
|
|
3127
|
-
async trackEventAsync(event) {
|
|
3128
|
-
try {
|
|
3129
|
-
await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
|
|
3130
|
-
}
|
|
3131
|
-
catch (_a) {
|
|
3132
|
-
return;
|
|
3133
|
-
}
|
|
3134
|
-
}
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3137
|
-
class CustomFundChoiceApi {
|
|
3138
|
-
async submitDefaultFundChoiceAsync(dto) {
|
|
3139
|
-
return buildBackendApiClient()
|
|
3140
|
-
.url('super-choice/default')
|
|
3141
|
-
.post(dto)
|
|
3142
|
-
.badRequest(() => {
|
|
3143
|
-
throw new Error('Failed to process default fund join request');
|
|
3144
|
-
})
|
|
3145
|
-
.text();
|
|
3146
|
-
}
|
|
3147
|
-
async submitCustomFundChoiceAsync(dto) {
|
|
3148
|
-
return buildBackendApiClient()
|
|
3149
|
-
.url('super-choice/custom-fund')
|
|
3150
|
-
.post(dto)
|
|
3151
|
-
.badRequest(() => {
|
|
3152
|
-
throw new Error('Failed to process custom fund join request');
|
|
3153
|
-
})
|
|
3154
|
-
.text();
|
|
3155
|
-
}
|
|
3156
|
-
async submitSelfManagedFundChoiceAsync(dto) {
|
|
3157
|
-
return buildBackendApiClient()
|
|
3158
|
-
.url('super-choice/smsf')
|
|
3159
|
-
.post(dto)
|
|
3160
|
-
.badRequest(() => {
|
|
3161
|
-
throw new Error('Failed to process SMSF choice request');
|
|
3162
|
-
})
|
|
3163
|
-
.text();
|
|
3164
|
-
}
|
|
3165
|
-
async submitDefinedBenefitsChoiceAsync(dto) {
|
|
3166
|
-
return buildBackendApiClient()
|
|
3167
|
-
.url('super-choice/defined-benefits')
|
|
3168
|
-
.post(dto)
|
|
3169
|
-
.badRequest(() => {
|
|
3170
|
-
throw new Error('Failed to process Defined Benefits choice request');
|
|
3171
|
-
})
|
|
3172
|
-
.text();
|
|
3173
|
-
}
|
|
3174
|
-
async validateAbnForSMSF(abn) {
|
|
3175
|
-
const response = await buildBackendApiClient()
|
|
3176
|
-
.url(`super-choice/smsf/${abn}/validate`)
|
|
3177
|
-
.get()
|
|
3178
|
-
.badRequest(() => {
|
|
3179
|
-
throw new Error('Failed to verify that if the provided abn is used for regulated fund');
|
|
3180
|
-
})
|
|
3181
|
-
.json();
|
|
3182
|
-
return response.result;
|
|
3183
|
-
}
|
|
3184
|
-
}
|
|
3185
|
-
const customFundChoiceApi = new CustomFundChoiceApi();
|
|
3186
|
-
|
|
3187
|
-
exports.EventTrackingService = EventTrackingService;
|
|
3188
2870
|
exports.Option = Option;
|
|
3189
2871
|
exports.buildBackendApiClient = buildBackendApiClient;
|
|
3190
|
-
exports.
|
|
2872
|
+
exports.createStore = createStore;
|
|
3191
2873
|
exports.factory = factory;
|
|
3192
2874
|
exports.fromNullable = fromNullable;
|
|
3193
2875
|
exports.getPromotedFundId = getPromotedFundId;
|
|
3194
2876
|
exports.getSuperChoiceMemberNumber = getSuperChoiceMemberNumber;
|
|
3195
2877
|
exports.getSuperChoiceUsi = getSuperChoiceUsi;
|
|
3196
|
-
exports.iframe = iframe;
|
|
3197
|
-
exports.injectHistory = injectHistory;
|
|
3198
2878
|
exports.isNone = isNone;
|
|
3199
2879
|
exports.isSome = isSome;
|
|
3200
|
-
exports.navigationService = navigationService;
|
|
3201
2880
|
exports.none = none;
|
|
3202
2881
|
exports.slate = slate;
|
|
3203
2882
|
exports.some = some;
|
|
3204
|
-
exports.state = state$1;
|
|
3205
|
-
exports.state$1 = state;
|
|
3206
2883
|
exports.superSelectionApi = superSelectionApi;
|
|
3207
2884
|
exports.superSelectionAppService = superSelectionAppService;
|
|
3208
|
-
exports.superSelectionAppStencilRoutes = superSelectionAppStencilRoutes;
|
|
3209
2885
|
exports.toUndefined = toUndefined;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"./components/super-selection-app/super-selection-app.js",
|
|
6
6
|
"./components/app-host/loading-page.js",
|
|
7
7
|
"./components/app-host/super-selection-app-host.js",
|
|
8
|
+
"./components/default-fund/super-default-fund.js",
|
|
8
9
|
"./components/super-byof/super-byof.js",
|
|
9
10
|
"./components/super-campaign/super-campaign.js",
|
|
10
11
|
"./components/super-selection-app/app-state-pages/success.js",
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
"./components/super-selection-app/footer-section/footer-section.js",
|
|
14
15
|
"./components/super-selection-app/funds/custom-fund/custom-fund.js",
|
|
15
16
|
"./components/super-selection-app/funds/custom-fund/member-name-input.js",
|
|
17
|
+
"./components/super-selection-app/funds/custom-fund/default-fund/default-fund-router.js",
|
|
16
18
|
"./components/super-selection-app/funds/custom-fund/default-fund/default-fund.js",
|
|
17
19
|
"./components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.js",
|
|
18
20
|
"./components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.js",
|
|
@@ -62,7 +64,7 @@
|
|
|
62
64
|
"sss-button",
|
|
63
65
|
"sss-choice-router",
|
|
64
66
|
"sss-custom-fund",
|
|
65
|
-
"sss-default-fund",
|
|
67
|
+
"sss-default-fund-host",
|
|
66
68
|
"sss-dropdown-async",
|
|
67
69
|
"sss-existing-choice-page",
|
|
68
70
|
"sss-footer-section",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const LoadWaitingTimeout = 30000;
|