@flarehr/apollo-super-selection 1.2.32739 → 1.3.89
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.css +1 -1
- package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
- package/dist/lib/apollo-super-selection/p-42d24a38.entry.js +14 -0
- package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
- package/dist/lib/apollo-super-selection/p-fc0b7567.system.entry.js +69 -0
- package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
- package/dist/lib/cjs/loader.cjs.js +1 -1
- package/dist/lib/cjs/{sss-button_30.cjs.entry.js → sss-button_34.cjs.entry.js} +6510 -5652
- package/dist/lib/collection/apollo-super-selection.css +1 -1
- package/dist/lib/collection/collection-manifest.json +25 -17
- package/dist/lib/collection/components/app-host/services/appinsights.service.js +3 -0
- package/dist/lib/collection/components/app-host/super-selection-app-host.css +6 -6
- package/dist/lib/collection/components/super-campaign/fund-tile-clicked.handler.js +49 -0
- package/dist/lib/collection/components/super-campaign/promoted-fund-joined.handler.js +121 -0
- package/dist/lib/collection/components/super-campaign/super-campaign-types.js +6 -0
- package/dist/lib/collection/components/super-campaign/super-campaign.js +213 -0
- package/dist/lib/collection/components/super-selection-app/api/super-campaign-errors-api.js +9 -0
- package/dist/lib/collection/components/super-selection-app/api/super-campaign-errors.api.dtos.js +1 -0
- package/dist/lib/collection/components/super-selection-app/api/super-selection-events.model.js +16 -1
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +71 -22
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +5 -9
- package/dist/lib/collection/components/super-selection-app/app-state-pages/success.js +11 -1
- package/dist/lib/collection/components/super-selection-app/choice/choice-router.js +42 -0
- package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +26 -15
- package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +15 -15
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.js +9 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.js +30 -7
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js +6 -23
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund.js +8 -3
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.js +113 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.types.js +1 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/member-name-input.js +19 -5
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step-types.js +1 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.js +115 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.js +4 -4
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +16 -4
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +32 -17
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +8 -3
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.js +9 -0
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate.js +4 -0
- package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +8 -38
- package/dist/lib/collection/components/super-selection-app/misc/button.js +20 -2
- package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.js +18 -1
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-common.js +22 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-display-field.js +42 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-error-box.js +66 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.js +121 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-smsf.js +145 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +223 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +398 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-types.js +288 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-warning-box.js +37 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +81 -0
- package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +30 -25
- package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +29 -7
- package/dist/lib/collection/components/super-selection-app/services/navigation.service.js +1 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +17 -9
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +69 -20
- package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +31 -3
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +75 -12
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.store.js +1 -0
- package/dist/lib/collection/components/super-selection-app/super-selection-app.js +14 -20
- package/dist/lib/esm/apollo-super-selection.js +1 -1
- package/dist/lib/esm/loader.js +1 -1
- package/dist/lib/esm/{sss-button_30.entry.js → sss-button_34.entry.js} +7864 -7030
- package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
- package/dist/lib/esm-es5/loader.js +1 -1
- package/dist/lib/esm-es5/sss-button_34.entry.js +69 -0
- package/dist/lib/types/components/app-host/services/appinsights.service.d.ts +1 -0
- package/dist/lib/types/components/super-campaign/fund-tile-clicked.handler.d.ts +12 -0
- package/dist/lib/types/components/super-campaign/promoted-fund-joined.handler.d.ts +15 -0
- package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +98 -0
- package/dist/lib/types/components/super-campaign/super-campaign.d.ts +28 -0
- package/dist/lib/types/components/super-selection-app/api/super-campaign-errors-api.d.ts +6 -0
- package/dist/lib/types/components/super-selection-app/api/super-campaign-errors.api.dtos.d.ts +7 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +83 -32
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +2 -2
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +88 -8
- package/dist/lib/types/components/super-selection-app/app-state-pages/success.d.ts +3 -0
- package/dist/lib/types/components/super-selection-app/{funds/promoted-fund/promoted-fund-join-v1-page.d.ts → choice/choice-router.d.ts} +2 -1
- package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +1 -2
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.dto.d.ts +16 -12
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +6 -9
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.d.ts +18 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.types.d.ts +26 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/member-name-input.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step-types.d.ts +15 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.d.ts +20 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +1 -2
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.dto.d.ts +16 -15
- package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate-choice.api.dto.d.ts +3 -5
- package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/header-section/header-section.d.ts +0 -1
- package/dist/lib/types/components/super-selection-app/misc/button.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/misc/dropdown-async.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-common.d.ts +9 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-display-field.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-error-box.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.d.ts +18 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-smsf.d.ts +28 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-my-own-fund.d.ts +30 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-smsf.d.ts +52 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-types.d.ts +95 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-warning-box.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/prefill-fund/prefill.d.ts +14 -0
- package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +6 -5
- package/dist/lib/types/components/super-selection-app/services/existing-super-choice-info.service.d.ts +17 -1
- package/dist/lib/types/components/super-selection-app/services/navigation.service.d.ts +2 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +8 -4
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +18 -9
- package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +22 -4
- package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.store.d.ts +34 -0
- package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +0 -2
- package/dist/lib/types/components.d.ts +172 -115
- package/package.json +3 -3
- package/dist/lib/apollo-super-selection/assets/icon-check.svg +0 -3
- package/dist/lib/apollo-super-selection/assets/logo-active.svg +0 -1
- package/dist/lib/apollo-super-selection/assets/logo-art.svg +0 -7
- package/dist/lib/apollo-super-selection/assets/logo-aus-eth.svg +0 -31
- package/dist/lib/apollo-super-selection/assets/logo-aware.svg +0 -1
- package/dist/lib/apollo-super-selection/assets/logo-first.svg +0 -15
- package/dist/lib/apollo-super-selection/assets/logo-hesta.svg +0 -5
- package/dist/lib/apollo-super-selection/assets/logo-mercer-mychoice.svg +0 -1
- package/dist/lib/apollo-super-selection/assets/logo-slate.png +0 -0
- package/dist/lib/apollo-super-selection/assets/logo-spirit.svg +0 -141
- package/dist/lib/apollo-super-selection/assets/logo-virgin.svg +0 -8
- package/dist/lib/apollo-super-selection/p-74878c94.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-823c6c2c.system.entry.js +0 -69
- package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +0 -3
- package/dist/lib/collection/components/super-selection-app/consent/consent.js +0 -54
- package/dist/lib/collection/components/super-selection-app/funds/constants.js +0 -33
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/active.js +0 -26
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.js +0 -43
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.js +0 -32
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/aware.js +0 -27
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/first.js +0 -27
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/hesta-default.js +0 -41
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.js +0 -32
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/slate.js +0 -32
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/spirit.js +0 -43
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/virgin.js +0 -36
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.js +0 -30
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.js +0 -30
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +0 -8
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.js +0 -115
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.js +0 -131
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/types.js +0 -14
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +0 -136
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +0 -30
- package/dist/lib/collection/components/super-selection-app/misc/iframe-host.js +0 -32
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-active.svg +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-art.svg +0 -7
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aus-eth.svg +0 -31
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aware.svg +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-first.svg +0 -15
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-hesta.svg +0 -5
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-mercer-mychoice.svg +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-slate.png +0 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-spirit.svg +0 -141
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-virgin.svg +0 -8
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +0 -112
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +0 -136
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +0 -181
- package/dist/lib/esm-es5/sss-button_30.entry.js +0 -69
- package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/active.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/aware.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/first.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/hesta-default.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/slate.d.ts +0 -4
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/spirit.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/virgin.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.d.ts +0 -10
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.d.ts +0 -9
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/types.d.ts +0 -24
- package/dist/lib/types/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.d.ts +0 -14
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-join-page.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/misc/iframe-host.d.ts +0 -6
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +0 -10
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +0 -10
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -11
- package/readme.md +0 -41
package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-warning-box.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Component, h, Prop } from '@stencil/core';
|
|
2
|
+
export class PrefillWarningBox {
|
|
3
|
+
render() {
|
|
4
|
+
const WarningIcon = () => {
|
|
5
|
+
return (h("div", { class: "w-5 h-5" },
|
|
6
|
+
h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" },
|
|
7
|
+
h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.25706 3.09882C9.02167 1.73952 10.9788 1.73952 11.7434 3.09882L17.3237 13.0194C18.0736 14.3526 17.1102 15.9999 15.5805 15.9999H4.4199C2.89025 15.9999 1.92682 14.3526 2.67675 13.0194L8.25706 3.09882ZM11.0001 13C11.0001 13.5523 10.5524 14 10.0001 14C9.44784 14 9.00012 13.5523 9.00012 13C9.00012 12.4477 9.44784 12 10.0001 12C10.5524 12 11.0001 12.4477 11.0001 13ZM10.0001 5C9.44784 5 9.00012 5.44772 9.00012 6V9C9.00012 9.55228 9.44784 10 10.0001 10C10.5524 10 11.0001 9.55228 11.0001 9V6C11.0001 5.44772 10.5524 5 10.0001 5Z", fill: "#FBBF24" }))));
|
|
8
|
+
};
|
|
9
|
+
return (h("div", { class: "flex items-start self-stretch rounded-md bg-yellow-50" },
|
|
10
|
+
h("div", { class: "w-1 self-stretch bg-yellow-400" }),
|
|
11
|
+
h("div", { class: "flex items-start gap-3 flex-[1_0_0] p-4" },
|
|
12
|
+
h(WarningIcon, null),
|
|
13
|
+
h("div", { class: "flex flex-col items-start gap-2 flex-[1_0_0]" },
|
|
14
|
+
h("div", { class: "flex flex-col items-start gap-1 self-stretch" }, this.notificationList.map((text) => (h("div", { class: "flex items-start gap-[7px] self-stretch pl-0" },
|
|
15
|
+
this.notificationList.length > 1 && (h("div", { class: "pt-1.5 justify-center items-center flex" },
|
|
16
|
+
h("div", { class: "w-1.5 h-1.5 bg-yellow-700 rounded-full" }))),
|
|
17
|
+
h("div", { class: "flex-[1_0_0] text-sm not-italic font-normal leading-5 text-yellow-700" }, text)))))))));
|
|
18
|
+
}
|
|
19
|
+
static get is() { return "sss-prefill-warning-box"; }
|
|
20
|
+
static get properties() { return {
|
|
21
|
+
"notificationList": {
|
|
22
|
+
"type": "unknown",
|
|
23
|
+
"mutable": false,
|
|
24
|
+
"complexType": {
|
|
25
|
+
"original": "string[]",
|
|
26
|
+
"resolved": "string[]",
|
|
27
|
+
"references": {}
|
|
28
|
+
},
|
|
29
|
+
"required": false,
|
|
30
|
+
"optional": false,
|
|
31
|
+
"docs": {
|
|
32
|
+
"tags": [],
|
|
33
|
+
"text": ""
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}; }
|
|
37
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Component, h, Prop, State } from '@stencil/core';
|
|
2
|
+
import { isSome } from 'fp-ts/Option';
|
|
3
|
+
import navigationService from '../services/navigation.service';
|
|
4
|
+
import { SuperSelectionAppRoutes } from '../services/super-selection-app.routes';
|
|
5
|
+
import superSelectionAppService from '../services/super-selection-app.service';
|
|
6
|
+
export class Prefill {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.prefill = undefined;
|
|
9
|
+
this.ignorePopState = () => window.history.pushState(null, '', null);
|
|
10
|
+
}
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
this.ignorePopState();
|
|
13
|
+
window.addEventListener('popstate', this.ignorePopState);
|
|
14
|
+
}
|
|
15
|
+
disconnectedCallback() {
|
|
16
|
+
window.removeEventListener('popstate', this.ignorePopState);
|
|
17
|
+
}
|
|
18
|
+
async componentWillLoad() {
|
|
19
|
+
this.prefill = isSome(superSelectionAppService.state.superChoicePrefill)
|
|
20
|
+
? superSelectionAppService.state.superChoicePrefill.value
|
|
21
|
+
: undefined;
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
if (this.prefill && this.prefill.type === 'myOwnFund') {
|
|
25
|
+
if (this.prefill.data.fundDetail.type === 'Valid') {
|
|
26
|
+
return this.renderMyOwnFund(this.prefill.data);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return this.renderInvalidMyOwnFund(this.prefill.data);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (this.prefill && this.prefill.type === 'smsf') {
|
|
33
|
+
if (this.prefill.data.fundAbn.valid) {
|
|
34
|
+
return this.renderSMSF(this.prefill.data);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return this.renderInvalidSMSF(this.prefill.data);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
renderMyOwnFund(data) {
|
|
44
|
+
return h("sss-prefill-my-own-fund", { history: this.history, prefill: data });
|
|
45
|
+
}
|
|
46
|
+
renderInvalidMyOwnFund(data) {
|
|
47
|
+
return h("sss-prefill-invalid-my-own-fund", { history: this.history, prefill: data });
|
|
48
|
+
}
|
|
49
|
+
renderSMSF(data) {
|
|
50
|
+
return h("sss-prefill-smsf", { history: this.history, prefill: data });
|
|
51
|
+
}
|
|
52
|
+
renderInvalidSMSF(data) {
|
|
53
|
+
return h("sss-prefill-invalid-smsf", { history: this.history, prefill: data });
|
|
54
|
+
}
|
|
55
|
+
static get is() { return "sss-prefill"; }
|
|
56
|
+
static get properties() { return {
|
|
57
|
+
"history": {
|
|
58
|
+
"type": "unknown",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "RouterHistory",
|
|
62
|
+
"resolved": "RouterHistory",
|
|
63
|
+
"references": {
|
|
64
|
+
"RouterHistory": {
|
|
65
|
+
"location": "import",
|
|
66
|
+
"path": "@stencil/router"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": false,
|
|
71
|
+
"optional": false,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"text": ""
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}; }
|
|
78
|
+
static get states() { return {
|
|
79
|
+
"prefill": {}
|
|
80
|
+
}; }
|
|
81
|
+
}
|
package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js
CHANGED
|
@@ -6,31 +6,11 @@ export class EventTrackingService {
|
|
|
6
6
|
static get Instance() {
|
|
7
7
|
return this.instance || (this.instance = new this());
|
|
8
8
|
}
|
|
9
|
-
async TrackFinancialProductViewedAsync(detail) {
|
|
10
|
-
return this.trackEventAsync({
|
|
11
|
-
FinancialProductViewed: detail
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
9
|
async TrackSuperFundPdsViewedAsync(detail) {
|
|
15
10
|
return this.trackEventAsync({
|
|
16
11
|
SuperFundPdsViewed: detail
|
|
17
12
|
});
|
|
18
13
|
}
|
|
19
|
-
async TrackFinancialProductAcceptedAsync(detail) {
|
|
20
|
-
return this.trackEventAsync({
|
|
21
|
-
FinancialProductAccepted: detail
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
async TrackFinancialProductRejectedAsync(detail) {
|
|
25
|
-
return this.trackEventAsync({
|
|
26
|
-
FinancialProductRejected: detail
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
async TrackSuperFundPrivacyConfirmationAcceptedAsync(detail) {
|
|
30
|
-
return this.trackEventAsync({
|
|
31
|
-
SuperFundPrivacyConfirmationAccepted: detail
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
14
|
async TrackPromotedSuperFundDetailViewedAsync(detail) {
|
|
35
15
|
return this.trackEventAsync({
|
|
36
16
|
SuperFundDetailViewed: {
|
|
@@ -66,11 +46,6 @@ export class EventTrackingService {
|
|
|
66
46
|
}
|
|
67
47
|
});
|
|
68
48
|
}
|
|
69
|
-
async TrackSuperFundPanelViewedAsync(detail) {
|
|
70
|
-
return this.trackEventAsync({
|
|
71
|
-
SuperFundPanelViewed: detail
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
49
|
async TrackSuperFundNominationViewedAsync(detail) {
|
|
75
50
|
return this.trackEventAsync({
|
|
76
51
|
SuperFundNominationViewed: detail
|
|
@@ -91,6 +66,36 @@ export class EventTrackingService {
|
|
|
91
66
|
SuperFundDisclaimerAccepted: detail
|
|
92
67
|
});
|
|
93
68
|
}
|
|
69
|
+
async TrackSuperFundPrefillViewedAsync(detail) {
|
|
70
|
+
return this.trackEventAsync({
|
|
71
|
+
SuperFundPrefillViewed: detail
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
async TrackSuperFundPrefillDeclinedAsync(detail) {
|
|
75
|
+
return this.trackEventAsync({
|
|
76
|
+
SuperFundPrefillDeclined: detail
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
async TrackSuperFundDetailChangeRequestedAsync(detail) {
|
|
80
|
+
return this.trackEventAsync({
|
|
81
|
+
SuperFundDetailChangeRequested: detail
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
async TrackSuperCampaignActivationSucceededAsync(detail) {
|
|
85
|
+
return this.trackEventAsync({
|
|
86
|
+
SuperCampaignActivationSucceeded: detail
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
async TrackSuperMyOwnFundEngagementStepActivationSucceeded(fundUsi) {
|
|
90
|
+
return this.trackEventAsync({
|
|
91
|
+
SuperMyOwnFundEngagementStepActivationSucceeded: { fundUsi }
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
async TrackSuperMyOwnFundEngagementStepContinued(fundUsi, reason) {
|
|
95
|
+
return this.trackEventAsync({
|
|
96
|
+
SuperMyOwnFundEngagementStepContinued: { fundUsi, reason }
|
|
97
|
+
});
|
|
98
|
+
}
|
|
94
99
|
async trackEventAsync(event) {
|
|
95
100
|
try {
|
|
96
101
|
await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { isNone, isSome, none, some } from 'fp-ts/Option';
|
|
2
2
|
import { assertExhaustive } from '../../../utils';
|
|
3
3
|
import { buildBackendApiClient } from '../api/api-client';
|
|
4
|
-
import { getSuperChoiceMemberNumber, getSuperChoiceUsi } from '../api/super-selection.api.dto';
|
|
5
|
-
import * as constants from '../funds/constants';
|
|
4
|
+
import { getPromotedFundId, getSuperChoiceMemberNumber, getSuperChoiceUsi } from '../api/super-selection.api.dto';
|
|
6
5
|
import australianFundLookupService from './australian-fund-lookup.service';
|
|
7
6
|
import superSelectionAppService from './super-selection-app.service';
|
|
8
7
|
export function ExistingFund(fund) {
|
|
@@ -27,14 +26,13 @@ export class ExistingFundService {
|
|
|
27
26
|
const memberNumber = getSuperChoiceMemberNumber(choiceDetails);
|
|
28
27
|
switch (choiceDetails.kind) {
|
|
29
28
|
case 'Promoted': {
|
|
30
|
-
|
|
31
|
-
const fund = constants.getFundByDtoPropName(dtoPropName);
|
|
32
|
-
if (isNone(fund))
|
|
29
|
+
if (isNone(usi))
|
|
33
30
|
return none;
|
|
31
|
+
const fund = await this.getFundByUsiAsync(usi.value);
|
|
34
32
|
return some({
|
|
35
33
|
type: 'Promoted Fund',
|
|
36
|
-
id:
|
|
37
|
-
name: fund.value.
|
|
34
|
+
id: getPromotedFundId(choiceDetails.promoted),
|
|
35
|
+
name: isSome(fund) ? fund.value.productName : usi.value,
|
|
38
36
|
usi: usi,
|
|
39
37
|
valid: 'Active',
|
|
40
38
|
memberNumber: memberNumber,
|
|
@@ -83,6 +81,30 @@ export class ExistingFundService {
|
|
|
83
81
|
lastNominatedAt: dateSubmitted
|
|
84
82
|
});
|
|
85
83
|
}
|
|
84
|
+
case 'DefinedBenefits': {
|
|
85
|
+
const defaultUsi = choiceDetails.definedBenefits.usi;
|
|
86
|
+
const fund = await this.getFundByUsiAsync(defaultUsi);
|
|
87
|
+
return some({
|
|
88
|
+
type: 'Defined Benefits Fund',
|
|
89
|
+
name: isSome(fund) ? fund.value.productName : defaultUsi,
|
|
90
|
+
usi: usi,
|
|
91
|
+
valid: this.toFundValidState(fund),
|
|
92
|
+
lastNominatedAt: dateSubmitted
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
case 'PromotedDefaultWithJoin': {
|
|
96
|
+
const defaultUsi = choiceDetails.promotedDefaultWithJoin.usi;
|
|
97
|
+
const defaultFund = await this.getFundByUsiAsync(defaultUsi);
|
|
98
|
+
return some({
|
|
99
|
+
type: 'Promoted Default Fund With Join',
|
|
100
|
+
id: choiceDetails.promotedDefaultWithJoin.fundId,
|
|
101
|
+
name: isSome(defaultFund) ? defaultFund.value.productName : defaultUsi,
|
|
102
|
+
usi: usi,
|
|
103
|
+
valid: this.toFundValidState(defaultFund),
|
|
104
|
+
memberNumber: memberNumber,
|
|
105
|
+
lastNominatedAt: dateSubmitted
|
|
106
|
+
});
|
|
107
|
+
}
|
|
86
108
|
default:
|
|
87
109
|
assertExhaustive(choiceDetails);
|
|
88
110
|
return none;
|
|
@@ -11,6 +11,7 @@ class NavigationService {
|
|
|
11
11
|
navigateInternallyToStandardChoice(options) {
|
|
12
12
|
standardChoiceFormState.handleSubmitFn = options.handleSubmitFn;
|
|
13
13
|
standardChoiceFormState.fundName = options.fundName;
|
|
14
|
+
standardChoiceFormState.fundDetails = options.fundDetails;
|
|
14
15
|
standardChoiceFormState.promotedFundId = options.promotedFundId;
|
|
15
16
|
this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
|
|
16
17
|
}
|
package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js
CHANGED
|
@@ -1,28 +1,36 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
export var SuperSelectionAppRoutes;
|
|
3
3
|
(function (SuperSelectionAppRoutes) {
|
|
4
|
-
SuperSelectionAppRoutes["ConsentPage"] = "/consent";
|
|
5
4
|
SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
|
|
5
|
+
SuperSelectionAppRoutes["SuperCampaign"] = "/super-campaign";
|
|
6
6
|
SuperSelectionAppRoutes["ChoicePage"] = "/";
|
|
7
|
-
SuperSelectionAppRoutes["SlateJoin"] = "/slate/join/";
|
|
8
|
-
SuperSelectionAppRoutes["PromotedFundJoinV1"] = "/promoted-fund/join/v1";
|
|
9
|
-
SuperSelectionAppRoutes["PromotedFundJoinV2"] = "/promoted-fund/join/v2";
|
|
10
7
|
SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
|
|
8
|
+
SuperSelectionAppRoutes["MyOwnFundEngagementStep"] = "/super-choice/my-own-fund-engagement/";
|
|
9
|
+
SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
|
|
10
|
+
SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
|
|
11
|
+
SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
|
|
12
|
+
SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
|
|
13
|
+
SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
|
|
11
14
|
SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
|
|
12
15
|
SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
|
|
16
|
+
SuperSelectionAppRoutes["FeaturedFunds"] = "/super-choice/featured-funds/";
|
|
13
17
|
SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
|
|
14
18
|
SuperSelectionAppRoutes["Success"] = "/success/";
|
|
15
19
|
})(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
|
|
16
20
|
export const superSelectionAppStencilRoutes = [
|
|
17
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.ConsentPage, component: "sss-consent-page" }),
|
|
18
21
|
h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
|
|
19
|
-
h("stencil-route", {
|
|
20
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.
|
|
21
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV1, component: "sss-promoted-fund-join-v1-page" }),
|
|
22
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV2, component: "sss-promoted-fund-join-v2-page" }),
|
|
22
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
|
|
23
|
+
h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-choice-router" }),
|
|
23
24
|
h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
|
|
25
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFundEngagementStep, component: "sss-my-own-fund-engagement-step-host" }),
|
|
26
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
|
|
27
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
|
|
28
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
|
|
29
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
|
|
30
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
|
|
24
31
|
h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
|
|
25
32
|
h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
|
|
33
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.FeaturedFunds, component: "sss-super-campaign-featured-funds" }),
|
|
26
34
|
h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
|
|
27
35
|
h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
|
|
28
36
|
];
|
package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js
CHANGED
|
@@ -3,7 +3,7 @@ import { pipe } from 'fp-ts/lib/function';
|
|
|
3
3
|
import * as O from 'fp-ts/lib/Option';
|
|
4
4
|
import jwtDecode from 'jwt-decode';
|
|
5
5
|
import superSelectionApi from '../api/super-selection.api';
|
|
6
|
-
import { initialState } from './super-selection.store';
|
|
6
|
+
import { initialState, SuperCampaignComponentStatus, SuperCampaignState } from './super-selection.store';
|
|
7
7
|
export class SuperSelectionAppService {
|
|
8
8
|
constructor() {
|
|
9
9
|
const { state, onChange } = createStore(initialState);
|
|
@@ -38,8 +38,8 @@ export class SuperSelectionAppService {
|
|
|
38
38
|
return this._state.appBaseUrl.value;
|
|
39
39
|
}
|
|
40
40
|
get promotedFunds() {
|
|
41
|
-
if (this.
|
|
42
|
-
return this.
|
|
41
|
+
if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
|
|
42
|
+
return this.superCampaignState.PromotedFundIds;
|
|
43
43
|
}
|
|
44
44
|
if (O.isNone(this._state.promotedFunds)) {
|
|
45
45
|
throw Error('Promoted Funds is not set');
|
|
@@ -47,8 +47,8 @@ export class SuperSelectionAppService {
|
|
|
47
47
|
return this._state.promotedFunds.value;
|
|
48
48
|
}
|
|
49
49
|
get promotedDefaultFundPosition() {
|
|
50
|
-
if (this.
|
|
51
|
-
return O.fromNullable(this.
|
|
50
|
+
if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
|
|
51
|
+
return O.fromNullable(this.superCampaignState.DefaultFundPosition);
|
|
52
52
|
}
|
|
53
53
|
return O.none;
|
|
54
54
|
}
|
|
@@ -56,9 +56,7 @@ export class SuperSelectionAppService {
|
|
|
56
56
|
return {
|
|
57
57
|
shownFunds: this.promotedFunds,
|
|
58
58
|
promotedDefaultFundPosition: O.toUndefined(this.promotedDefaultFundPosition),
|
|
59
|
-
promotedFundsConfigSource:
|
|
60
|
-
? 'campaignConnect'
|
|
61
|
-
: 'superSelection'
|
|
59
|
+
promotedFundsConfigSource: this.isUsingSuperCampaign ? 'superCampaign' : 'superSelection'
|
|
62
60
|
};
|
|
63
61
|
}
|
|
64
62
|
get profileId() {
|
|
@@ -92,27 +90,78 @@ export class SuperSelectionAppService {
|
|
|
92
90
|
markSuperSelectionAsSubmitted() {
|
|
93
91
|
this._state.hasSuperSelectionBeenSubmitted = true;
|
|
94
92
|
}
|
|
93
|
+
get isDefinedBenefitsEligible() {
|
|
94
|
+
return this._state.isDefinedBenefitsEligible;
|
|
95
|
+
}
|
|
95
96
|
async loadAppStateAsync() {
|
|
96
97
|
const appStateResponse = await superSelectionApi.getAppStateAsync();
|
|
97
98
|
this._state.accountConfiguration = O.fromNullable(appStateResponse.accountConfiguration);
|
|
98
99
|
this._state.profileConfiguration = O.fromNullable(appStateResponse.profileConfiguration);
|
|
99
100
|
this._state.superBuyer = O.fromNullable(appStateResponse.superBuyer);
|
|
100
101
|
this._state.promotedFunds = O.fromNullable(appStateResponse.promotedFunds);
|
|
101
|
-
this._state.
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
this._state.bringYourOwnFundCustomStepEnabled =
|
|
103
|
+
appStateResponse.bringYourOwnFundCustomStepEnabled;
|
|
104
|
+
this._state.featuredFundsEnabled = appStateResponse.featuredFundsEnabled;
|
|
105
|
+
this._state.superChoicePrefill = O.fromNullable(appStateResponse.prefill);
|
|
106
|
+
this._state.isDefinedBenefitsEligible = O.fromNullable(appStateResponse.isDefinedBenefitsEligible);
|
|
107
|
+
if (O.isSome(this._state.accountConfiguration)) {
|
|
108
|
+
if (this._state.accountConfiguration.value.featureSet.type === 'basic') {
|
|
109
|
+
this._state.superCampaignEnabled = false;
|
|
110
|
+
}
|
|
104
111
|
}
|
|
105
112
|
}
|
|
106
|
-
|
|
107
|
-
if (this._state.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
setSuperCampaignPromotedFundsShown(shownFunds) {
|
|
114
|
+
if (this._state.superCampaignState !== undefined)
|
|
115
|
+
this._state.superCampaignState.promotedFundsShown = shownFunds;
|
|
116
|
+
else
|
|
117
|
+
throw new Error('Cannot set shown funds for SuperCampaing state because it is undefined');
|
|
118
|
+
}
|
|
119
|
+
viewSuperFundPanelAsync(placementId, promotedFundIdListOverride) {
|
|
120
|
+
return superSelectionApi.viewSuperFundPanelAsync(Object.assign(Object.assign({}, this.promotedFundsConfig), { shownFunds: promotedFundIdListOverride
|
|
121
|
+
? promotedFundIdListOverride
|
|
122
|
+
: this.promotedFundsConfig.shownFunds, placementId }));
|
|
123
|
+
}
|
|
124
|
+
get superCampaignState() {
|
|
125
|
+
return this._state.superCampaignState;
|
|
126
|
+
}
|
|
127
|
+
get superCampaignComponentStatus() {
|
|
128
|
+
return this._state.superCampaignComponentStatus;
|
|
129
|
+
}
|
|
130
|
+
set superCampaignComponentStatus(value) {
|
|
131
|
+
if (value === SuperCampaignComponentStatus.Loaded) {
|
|
132
|
+
this._state.superCampaignComponentStatus = SuperCampaignComponentStatus.Loaded;
|
|
133
|
+
this._state.superCampaignState = new SuperCampaignState();
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
this._state.superCampaignComponentStatus = value;
|
|
137
|
+
this._state.superCampaignState = undefined;
|
|
115
138
|
}
|
|
116
139
|
}
|
|
140
|
+
get isUsingSuperCampaign() {
|
|
141
|
+
return this.state.superCampaignEnabled && this.superCampaignState !== undefined;
|
|
142
|
+
}
|
|
143
|
+
get isBringYourOwnFundCustomStepEnabled() {
|
|
144
|
+
return this.state.bringYourOwnFundCustomStepEnabled;
|
|
145
|
+
}
|
|
146
|
+
get isFeaturedFundsEnabled() {
|
|
147
|
+
return this.state.featuredFundsEnabled;
|
|
148
|
+
}
|
|
149
|
+
get superCampaignCanNotBeActivated() {
|
|
150
|
+
return (!this.state.superCampaignEnabled ||
|
|
151
|
+
this.superCampaignComponentStatus === SuperCampaignComponentStatus.NotWorking);
|
|
152
|
+
}
|
|
153
|
+
get hideFooterSection() {
|
|
154
|
+
return this._state.hideFooterSection;
|
|
155
|
+
}
|
|
156
|
+
set hideFooterSection(value) {
|
|
157
|
+
this._state.hideFooterSection = value;
|
|
158
|
+
}
|
|
159
|
+
get backendUrl() {
|
|
160
|
+
return O.map(this.getBaseUrl)(this.state.apiBaseUrl);
|
|
161
|
+
}
|
|
162
|
+
getBaseUrl(url) {
|
|
163
|
+
const parsedUrl = new URL(url);
|
|
164
|
+
return `${parsedUrl.protocol}//${parsedUrl.hostname}${parsedUrl.port.length > 0 ? `:${parsedUrl.port}` : ''}`;
|
|
165
|
+
}
|
|
117
166
|
}
|
|
118
167
|
export default new SuperSelectionAppService();
|
package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js
CHANGED
|
@@ -1,16 +1,44 @@
|
|
|
1
1
|
import * as O from 'fp-ts/lib/Option';
|
|
2
|
+
export var SuperCampaignComponentStatus;
|
|
3
|
+
(function (SuperCampaignComponentStatus) {
|
|
4
|
+
SuperCampaignComponentStatus[SuperCampaignComponentStatus["NotLoaded"] = 1] = "NotLoaded";
|
|
5
|
+
SuperCampaignComponentStatus[SuperCampaignComponentStatus["Loaded"] = 2] = "Loaded";
|
|
6
|
+
SuperCampaignComponentStatus[SuperCampaignComponentStatus["NotWorking"] = 3] = "NotWorking";
|
|
7
|
+
})(SuperCampaignComponentStatus || (SuperCampaignComponentStatus = {}));
|
|
8
|
+
export class SuperCampaignState {
|
|
9
|
+
constructor() {
|
|
10
|
+
this._promotedFundsShown = [];
|
|
11
|
+
}
|
|
12
|
+
get PromotedFundIds() {
|
|
13
|
+
return this._promotedFundsShown.map((p) => p.fundId);
|
|
14
|
+
}
|
|
15
|
+
set promotedFundsShown(value) {
|
|
16
|
+
this._promotedFundsShown = value;
|
|
17
|
+
}
|
|
18
|
+
get DefaultFundPosition() {
|
|
19
|
+
const index = this._promotedFundsShown.findIndex((value) => value.fundType === 'promoted-default');
|
|
20
|
+
if (index === -1)
|
|
21
|
+
return undefined;
|
|
22
|
+
return index + 1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
2
25
|
export const initialState = {
|
|
3
26
|
apiBaseUrl: O.none,
|
|
4
27
|
appBaseUrl: O.none,
|
|
5
28
|
profileId: O.none,
|
|
6
29
|
jwt: O.none,
|
|
7
30
|
superBuyer: O.none,
|
|
31
|
+
superChoicePrefill: O.none,
|
|
8
32
|
promotedFunds: O.none,
|
|
9
33
|
accountConfiguration: O.none,
|
|
10
34
|
profileConfiguration: O.none,
|
|
11
35
|
hasSuccessPageBeenAcknowledged: false,
|
|
12
36
|
hasSuperSelectionBeenSubmitted: false,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
37
|
+
isDefinedBenefitsEligible: O.none,
|
|
38
|
+
superCampaignEnabled: true,
|
|
39
|
+
superCampaignState: undefined,
|
|
40
|
+
superCampaignComponentStatus: SuperCampaignComponentStatus.NotLoaded,
|
|
41
|
+
hideFooterSection: false,
|
|
42
|
+
bringYourOwnFundCustomStepEnabled: false,
|
|
43
|
+
featuredFundsEnabled: false
|
|
16
44
|
};
|
package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Component, getAssetPath, h, Host, Prop, State } from '@stencil/core';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import * as O from 'fp-ts/Option';
|
|
3
|
+
import { assertExhaustive } from '../../../utils';
|
|
4
|
+
import { EventTrackingService } from '../services/event-tracking.service';
|
|
5
|
+
import navigationService from '../services/navigation.service';
|
|
4
6
|
import { SuperSelectionAppRoutes } from '../services/super-selection-app.routes';
|
|
5
7
|
import superSelectionAppService from '../services/super-selection-app.service';
|
|
6
8
|
import standardChoiceFormState from './standard-choice-form.store';
|
|
@@ -8,6 +10,15 @@ export class StandardChoiceFormInputDefaultFund {
|
|
|
8
10
|
constructor() {
|
|
9
11
|
this.standardChoiceFormSignature = '';
|
|
10
12
|
this.isSubmitDisabled = true;
|
|
13
|
+
this.eventTrackingService = EventTrackingService.Instance;
|
|
14
|
+
this.ignorePopState = () => window.history.pushState(null, '', null);
|
|
15
|
+
}
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
this.ignorePopState();
|
|
18
|
+
window.addEventListener('popstate', this.ignorePopState);
|
|
19
|
+
}
|
|
20
|
+
disconnectedCallback() {
|
|
21
|
+
window.removeEventListener('popstate', this.ignorePopState);
|
|
11
22
|
}
|
|
12
23
|
render() {
|
|
13
24
|
return (h(Host, null,
|
|
@@ -22,8 +33,10 @@ export class StandardChoiceFormInputDefaultFund {
|
|
|
22
33
|
h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"),
|
|
23
34
|
h("div", { class: "text-sm mt-2" }, standardChoiceFormState.fundName)),
|
|
24
35
|
h("div", { class: "grid content-center ml-4" },
|
|
25
|
-
h("
|
|
26
|
-
|
|
36
|
+
h("sss-button", { testid: "change-fund-button", size: "xs", variant: "secondary", promiseFn: async () => {
|
|
37
|
+
await this.trackChangeRequestedAsync();
|
|
38
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
39
|
+
} }, "Change")))),
|
|
27
40
|
h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" },
|
|
28
41
|
h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"),
|
|
29
42
|
h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" },
|
|
@@ -37,21 +50,71 @@ export class StandardChoiceFormInputDefaultFund {
|
|
|
37
50
|
'was-validated': this.formState === 'validated'
|
|
38
51
|
}, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) },
|
|
39
52
|
h("label", { class: "text-sm font-medium text-gray-700" }, "Type your full name"),
|
|
40
|
-
h("input", { type: "text", autocomplete: "off", class: {
|
|
53
|
+
h("input", { "data-testid": "standard-choice-form-signature-input", type: "text", autocomplete: "off", class: {
|
|
41
54
|
'shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full text-base sm:text-sm border-gray-300 rounded-md mt-1': true,
|
|
42
55
|
'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
|
|
43
56
|
}, required: true, minlength: "2", name: "standardChoiceFormSignature", id: "standardChoiceFormSignature", value: this.standardChoiceFormSignature, onInput: (event) => (this.standardChoiceFormSignature = event.target.value) }),
|
|
44
57
|
h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Type your full name"),
|
|
45
58
|
h("div", { class: "mt-6" },
|
|
46
|
-
h("sss-button", { fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Confirm and continue"))))))));
|
|
59
|
+
h("sss-button", { testid: "confirm-and-continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Confirm and continue"))))))));
|
|
47
60
|
}
|
|
61
|
+
// TODO: fetch external promoted fund logo
|
|
48
62
|
renderLogo() {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const logoSource = getLogoSrcByFundId(standardChoiceFormState.promotedFundId);
|
|
52
|
-
if (isSome(logoSource)) {
|
|
53
|
-
|
|
54
|
-
|
|
63
|
+
return;
|
|
64
|
+
// if (standardChoiceFormState.promotedFundId == undefined) return;
|
|
65
|
+
// const logoSource = getLogoSrcByFundId(standardChoiceFormState.promotedFundId);
|
|
66
|
+
// if (isSome(logoSource)) {
|
|
67
|
+
// return (
|
|
68
|
+
// <div class="pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start">
|
|
69
|
+
// <img
|
|
70
|
+
// class="h-16 max-w-140 sm:h-12 sm:max-w-[100px] object-contain"
|
|
71
|
+
// alt={standardChoiceFormState.fundName}
|
|
72
|
+
// src={logoSource.value}
|
|
73
|
+
// />
|
|
74
|
+
// </div>
|
|
75
|
+
// );
|
|
76
|
+
// }
|
|
77
|
+
}
|
|
78
|
+
async trackChangeRequestedAsync() {
|
|
79
|
+
const common = {
|
|
80
|
+
promotedFundsShown: superSelectionAppService.promotedFunds,
|
|
81
|
+
defaultFundUsiSet: O.toUndefined(superSelectionAppService.defaultFundUsi)
|
|
82
|
+
};
|
|
83
|
+
switch (standardChoiceFormState.fundDetails.type) {
|
|
84
|
+
case 'default':
|
|
85
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
86
|
+
DefaultFund: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
|
|
87
|
+
});
|
|
88
|
+
break;
|
|
89
|
+
case 'myOwnFund':
|
|
90
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
91
|
+
MyOwnFund: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
|
|
92
|
+
});
|
|
93
|
+
break;
|
|
94
|
+
case 'smsf':
|
|
95
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
96
|
+
Smsf: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
|
|
97
|
+
});
|
|
98
|
+
break;
|
|
99
|
+
case 'promoted':
|
|
100
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
101
|
+
PromotedFund: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
|
|
102
|
+
});
|
|
103
|
+
break;
|
|
104
|
+
case 'promotedDefault':
|
|
105
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
106
|
+
PromotedDefaultFund: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
|
|
107
|
+
});
|
|
108
|
+
break;
|
|
109
|
+
case 'promotedDefaultWithJoin':
|
|
110
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
111
|
+
PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
|
|
112
|
+
});
|
|
113
|
+
break;
|
|
114
|
+
case 'null':
|
|
115
|
+
throw 'standardChoiceFormState.fundDetails was not set';
|
|
116
|
+
default:
|
|
117
|
+
assertExhaustive(standardChoiceFormState.fundDetails);
|
|
55
118
|
}
|
|
56
119
|
}
|
|
57
120
|
async handleSubmitForm() {
|