@flarehr/apollo-super-selection 3.51.59881 → 3.54.61365
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 -0
- package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
- package/dist/lib/apollo-super-selection/apollo-super-selection.js +1 -1
- package/dist/lib/apollo-super-selection/assets/icon-check.svg +3 -0
- package/dist/lib/apollo-super-selection/assets/icon-exclamation.svg +3 -0
- package/dist/lib/apollo-super-selection/assets/icon-information-circle.svg +3 -0
- package/dist/lib/apollo-super-selection/p-03373b03.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-14885f78.system.js +15 -0
- package/dist/lib/apollo-super-selection/{p-381262c1.system.js → p-15f0e5eb.system.js} +1 -1
- package/dist/lib/apollo-super-selection/p-29c11183.js +15 -0
- package/dist/lib/apollo-super-selection/p-37369ee1.system.entry.js +69 -0
- package/dist/lib/apollo-super-selection/p-52c08b79.entry.js +14 -0
- package/dist/lib/apollo-super-selection/p-86e3e03f.js +1 -0
- package/dist/lib/cjs/apollo-super-selection.cjs.js +3 -4
- package/dist/lib/cjs/{app-globals-45007120.js → app-globals-b1125d8c.js} +1 -1
- package/dist/lib/cjs/{datorama-akita-7f4b082a.js → datorama-akita-6c9cb8fb.js} +1005 -68
- package/dist/lib/cjs/loader.cjs.js +3 -4
- package/dist/lib/cjs/{fl-button_31.cjs.entry.js → sss-button_28.cjs.entry.js} +2096 -2162
- package/dist/lib/collection/apollo-super-selection.css +1 -0
- package/dist/lib/collection/collection-manifest.json +16 -28
- package/dist/lib/collection/components/app-host/loading-page.js +3 -3
- package/dist/lib/collection/components/app-host/super-selection-app-host.css +0 -4
- package/dist/lib/collection/components/app-host/super-selection-app-host.js +7 -19
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +69 -1
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +9 -3
- package/dist/lib/collection/components/super-selection-app/app-state-pages/success.js +16 -21
- package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +3 -0
- package/dist/lib/collection/components/super-selection-app/assets/icon-exclamation.svg +3 -0
- package/dist/lib/collection/components/super-selection-app/assets/icon-information-circle.svg +3 -0
- package/dist/lib/collection/components/super-selection-app/consent/consent.js +57 -0
- package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +131 -0
- package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +6 -18
- package/dist/lib/collection/components/super-selection-app/funds/constants.js +50 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.js +32 -16
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js +10 -14
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund.js +36 -45
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.js +40 -19
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +45 -40
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +104 -58
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +53 -49
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-not-supported.js +6 -16
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-page.js +1 -1
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +1 -4
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-iframe-builder.js +10 -4
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +13 -4
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +2 -3
- package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +28 -0
- package/dist/lib/collection/components/super-selection-app/misc/button.js +146 -0
- package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.css +7 -0
- package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.js +359 -0
- package/dist/lib/collection/components/super-selection-app/misc/loading-indicator.js +52 -0
- package/dist/lib/collection/components/super-selection-app/services/australian-fund-lookup.service.js +8 -4
- package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +20 -0
- package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +95 -0
- package/dist/lib/collection/components/super-selection-app/services/navigation.service.js +8 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +6 -4
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +69 -34
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.store.js +10 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +94 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +89 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +67 -90
- package/dist/lib/collection/components/super-selection-app/super-selection-app.css +16 -4
- package/dist/lib/collection/components/super-selection-app/super-selection-app.js +54 -11
- package/dist/lib/esm/apollo-super-selection.js +3 -4
- package/dist/lib/esm/{app-globals-7ac1ffba.js → app-globals-c1f89805.js} +1 -1
- package/dist/lib/esm/{datorama-akita-79ce4385.js → datorama-akita-127aea91.js} +960 -28
- package/dist/lib/esm/loader.js +3 -4
- package/dist/lib/esm/{fl-button_31.entry.js → sss-button_28.entry.js} +2083 -2146
- package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
- package/dist/lib/esm-es5/{app-globals-7ac1ffba.js → app-globals-c1f89805.js} +1 -1
- package/dist/lib/esm-es5/datorama-akita-127aea91.js +15 -0
- package/dist/lib/esm-es5/loader.js +1 -1
- package/dist/lib/esm-es5/sss-button_28.entry.js +69 -0
- package/dist/lib/types/components/app-host/super-selection-app-host.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +30 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +19 -4
- package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +9 -0
- package/dist/lib/types/components/super-selection-app/existing-choice/existing-choice.d.ts +12 -0
- package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +0 -1
- package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +3 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.d.ts +1 -1
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +4 -6
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/default-fund/default-fund.d.ts +0 -2
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +7 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.form.d.ts +0 -1
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/header-section/header-section.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/misc/button.d.ts +11 -0
- package/dist/lib/types/components/super-selection-app/misc/dropdown-async.d.ts +44 -0
- package/dist/lib/types/components/super-selection-app/misc/loading-indicator.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/services/australian-fund-lookup.service.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/services/existing-super-choice-info.service.d.ts +51 -0
- package/dist/lib/types/components/super-selection-app/services/navigation.service.d.ts +6 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +3 -2
- package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +6 -3
- package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.store.d.ts +8 -0
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +9 -0
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +7 -0
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +2 -1
- package/dist/lib/types/components.d.ts +148 -97
- package/package.json +12 -7
- package/dist/lib/apollo-super-selection/assets/logo-qsuper-square.png +0 -0
- package/dist/lib/apollo-super-selection/assets/logo-qsuper.png +0 -0
- package/dist/lib/apollo-super-selection/p-13573238.system.js +0 -15
- package/dist/lib/apollo-super-selection/p-342cee5a.js +0 -1
- package/dist/lib/apollo-super-selection/p-38f24f69.js +0 -1
- package/dist/lib/apollo-super-selection/p-5c1ee0f8.system.entry.js +0 -69
- package/dist/lib/apollo-super-selection/p-64ebe17d.system.entry.js +0 -1
- package/dist/lib/apollo-super-selection/p-7dbe5a2f.system.js +0 -1
- package/dist/lib/apollo-super-selection/p-9317c049.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-d82b00ed.system.js +0 -1
- package/dist/lib/apollo-super-selection/p-df9ce4b7.js +0 -15
- package/dist/lib/apollo-super-selection/p-f7a45412.entry.js +0 -1
- package/dist/lib/cjs/delay-81aff2f1.js +0 -955
- package/dist/lib/cjs/fl-style-guide.cjs.entry.js +0 -90
- package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.css +0 -11
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-not-supported.css +0 -23
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-standard-choice-page.js +0 -62
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-fund.store.js +0 -10
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-standard-choice-page.js +0 -67
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slatesuper-header.css +0 -0
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slatesuper-header.js +0 -19
- package/dist/lib/collection/components/super-selection-app/notifications-section/notifications-section.js +0 -25
- package/dist/lib/collection/components/super-selection-app/services/notifications.service.js +0 -37
- package/dist/lib/collection/components/super-selection-app/services/notifications.store.js +0 -3
- package/dist/lib/collection/components/super-selection-app/services/selected-super-choice-info.service.js +0 -50
- package/dist/lib/collection/components/super-selection-app/standard-choice/api/standard-choice.model.js +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-qsuper-square.png +0 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-qsuper.png +0 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.css +0 -18
- package/dist/lib/collection/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.js +0 -53
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item.js +0 -296
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.css +0 -70
- package/dist/lib/esm/delay-c0555599.js +0 -935
- package/dist/lib/esm/fl-style-guide.entry.js +0 -86
- package/dist/lib/esm-es5/datorama-akita-79ce4385.js +0 -15
- package/dist/lib/esm-es5/delay-c0555599.js +0 -1
- package/dist/lib/esm-es5/fl-button_31.entry.js +0 -69
- package/dist/lib/esm-es5/fl-style-guide.entry.js +0 -1
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/button/button.css +0 -45
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown/dropdown.css +0 -9
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown-async/dropdown-async.css +0 -9
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/loading-indicator/loading-indicator.css +0 -141
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/promise-button/promise-button.css +0 -5
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/style-guide/style-guide.css +0 -0
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-standard-choice-page.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-fund.store.d.ts +0 -7
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-standard-choice-page.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slatesuper-header.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/notifications-section/notifications-section.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/services/notifications.service.d.ts +0 -15
- package/dist/lib/types/components/super-selection-app/services/notifications.store.d.ts +0 -14
- package/dist/lib/types/components/super-selection-app/services/selected-super-choice-info.service.d.ts +0 -18
- package/dist/lib/types/components/super-selection-app/standard-choice/api/standard-choice.model.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item.d.ts +0 -22
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getAssetPath } from '@stencil/core';
|
|
1
2
|
export const Slate = {
|
|
2
3
|
Id: 'slate',
|
|
3
4
|
Name: 'Slate Super',
|
|
@@ -31,3 +32,52 @@ export const PromotedFundIdList = [
|
|
|
31
32
|
{ dtoPropName: 'aware', id: Aware.Id },
|
|
32
33
|
{ dtoPropName: 'active', id: Active.Id }
|
|
33
34
|
];
|
|
35
|
+
export const getFundNameById = (id) => {
|
|
36
|
+
switch (id) {
|
|
37
|
+
case Slate.Id:
|
|
38
|
+
return Slate.Name;
|
|
39
|
+
case AustralianRetirementTrust.Id:
|
|
40
|
+
return AustralianRetirementTrust.Name;
|
|
41
|
+
case Aware.Id:
|
|
42
|
+
return Aware.Name;
|
|
43
|
+
case Active.Id:
|
|
44
|
+
return Active.Name;
|
|
45
|
+
default:
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export const getFundUsiById = (id) => {
|
|
50
|
+
switch (id) {
|
|
51
|
+
case Slate.Id:
|
|
52
|
+
return Slate.Usi;
|
|
53
|
+
case AustralianRetirementTrust.Id:
|
|
54
|
+
return;
|
|
55
|
+
case Aware.Id:
|
|
56
|
+
return;
|
|
57
|
+
case Active.Id:
|
|
58
|
+
return;
|
|
59
|
+
default:
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
export const getLogoSrc = (id) => {
|
|
64
|
+
let logo = '';
|
|
65
|
+
switch (id) {
|
|
66
|
+
case Slate.Id:
|
|
67
|
+
logo = 'logo-slate.png';
|
|
68
|
+
break;
|
|
69
|
+
case AustralianRetirementTrust.Id:
|
|
70
|
+
logo = 'logo-art.svg';
|
|
71
|
+
break;
|
|
72
|
+
case Aware.Id:
|
|
73
|
+
logo = 'logo-aware.svg';
|
|
74
|
+
break;
|
|
75
|
+
case Active.Id:
|
|
76
|
+
logo = 'logo-active.svg';
|
|
77
|
+
break;
|
|
78
|
+
default:
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (logo !== '')
|
|
82
|
+
return getAssetPath(`assets/${logo}`);
|
|
83
|
+
};
|
|
@@ -8,6 +8,7 @@ export class CustomFund {
|
|
|
8
8
|
constructor() {
|
|
9
9
|
this.currentCustomFund = customFundOptions[0];
|
|
10
10
|
this.fundOptionsList = customFundOptions;
|
|
11
|
+
this.showFundOptionsSelection = false;
|
|
11
12
|
}
|
|
12
13
|
componentWillLoad() {
|
|
13
14
|
let currentRoute = '';
|
|
@@ -22,24 +23,38 @@ export class CustomFund {
|
|
|
22
23
|
navigationService.navigateInternally(this.history, currentRoute);
|
|
23
24
|
}
|
|
24
25
|
render() {
|
|
25
|
-
|
|
26
|
-
h("
|
|
27
|
-
h("
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} }, this.fundOptionsList.map((f) => (h("option", { value: f.value, selected: this.currentCustomFund.value === f.value }, f.label))))),
|
|
33
|
-
h("slot", null)))));
|
|
34
|
-
}
|
|
35
|
-
handleChange(value) {
|
|
36
|
-
const newFund = customFundOptions.find((item) => item.value === value) || {
|
|
37
|
-
value: SuperSelectionAppRoutes.MyOwnFund
|
|
26
|
+
const ChevronDownIcon = () => {
|
|
27
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-gray-500", viewBox: "0 0 20 20" },
|
|
28
|
+
h("path", { "fill-rule": "evenodd", d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", "clip-rule": "evenodd" })));
|
|
29
|
+
};
|
|
30
|
+
const CheckIcon = () => {
|
|
31
|
+
return (h("svg", { class: "h-5 w-5 fill-primary-base", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" },
|
|
32
|
+
h("path", { "fill-rule": "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", "clip-rule": "evenodd" })));
|
|
38
33
|
};
|
|
39
|
-
|
|
34
|
+
return (h("div", { class: "max-w-560 relative" },
|
|
35
|
+
h("label", { class: "font-medium text-gray-700 text-sm" }, "Which fund would you like to nominate?"),
|
|
36
|
+
h("div", { class: "mt-1 mb-4" },
|
|
37
|
+
h("button", { type: "button", class: "bg-white relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-primary-focus focus:border-primary-base text-sm", onClick: () => (this.showFundOptionsSelection = !this.showFundOptionsSelection) },
|
|
38
|
+
h("span", { class: {
|
|
39
|
+
'block truncate': true,
|
|
40
|
+
'text-gray-500': this.showFundOptionsSelection
|
|
41
|
+
} }, this.showFundOptionsSelection ? 'Select' : this.currentCustomFund.label),
|
|
42
|
+
h("span", { class: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none" },
|
|
43
|
+
h(ChevronDownIcon, null))),
|
|
44
|
+
this.showFundOptionsSelection && (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-sm" }, this.fundOptionsList.map((f) => (h("li", { class: "text-gray-900 cursor-default select-none relative py-2 pl-3 pr-9 hover:bg-primary-hover", onClick: () => {
|
|
45
|
+
this.showFundOptionsSelection = !this.showFundOptionsSelection;
|
|
46
|
+
navigationService.navigateInternally(this.history, f.value);
|
|
47
|
+
} },
|
|
48
|
+
h("span", { class: {
|
|
49
|
+
'block truncate': true,
|
|
50
|
+
'font-semibold': this.currentCustomFund === f
|
|
51
|
+
} }, f.label),
|
|
52
|
+
this.currentCustomFund === f && (h("span", { class: "absolute inset-y-0 right-0 flex items-center pr-4" },
|
|
53
|
+
h(CheckIcon, null))))))))),
|
|
54
|
+
h("div", { onClick: () => (this.showFundOptionsSelection = false) },
|
|
55
|
+
h("slot", null))));
|
|
40
56
|
}
|
|
41
57
|
static get is() { return "sss-custom-fund"; }
|
|
42
|
-
static get assetsDirs() { return ["assets"]; }
|
|
43
58
|
static get properties() { return {
|
|
44
59
|
"history": {
|
|
45
60
|
"type": "unknown",
|
|
@@ -64,7 +79,8 @@ export class CustomFund {
|
|
|
64
79
|
}; }
|
|
65
80
|
static get states() { return {
|
|
66
81
|
"currentCustomFund": {},
|
|
67
|
-
"fundOptionsList": {}
|
|
82
|
+
"fundOptionsList": {},
|
|
83
|
+
"showFundOptionsSelection": {}
|
|
68
84
|
}; }
|
|
69
85
|
}
|
|
70
86
|
injectHistory(CustomFund);
|
package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js
CHANGED
|
@@ -3,20 +3,17 @@ import * as O from 'fp-ts/Option';
|
|
|
3
3
|
import { SuperSelectionAppRoutes } from '../../services/super-selection-app.routes';
|
|
4
4
|
var CustomFundTypes;
|
|
5
5
|
(function (CustomFundTypes) {
|
|
6
|
-
CustomFundTypes["MyOwnFund"] = "
|
|
7
|
-
CustomFundTypes["DefaultFund"] = "
|
|
8
|
-
CustomFundTypes["SelfManagedFund"] = "
|
|
6
|
+
CustomFundTypes["MyOwnFund"] = "Your current super fund";
|
|
7
|
+
CustomFundTypes["DefaultFund"] = "Your employer's default fund";
|
|
8
|
+
CustomFundTypes["SelfManagedFund"] = "Your self-managed super fund";
|
|
9
9
|
})(CustomFundTypes || (CustomFundTypes = {}));
|
|
10
10
|
export const initialStateCustomFund = {
|
|
11
11
|
continueAllowed: false,
|
|
12
12
|
nextRoute: '/',
|
|
13
13
|
myOwnFundForm: {
|
|
14
14
|
fundUsi: O.none,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
defaultFundForm: {
|
|
19
|
-
standardChoiceFormSignature: ''
|
|
15
|
+
fundName: O.none,
|
|
16
|
+
memberNumber: O.none
|
|
20
17
|
},
|
|
21
18
|
selfManagedFundForm: {
|
|
22
19
|
fundName: '',
|
|
@@ -29,8 +26,7 @@ export const initialStateCustomFund = {
|
|
|
29
26
|
city: '',
|
|
30
27
|
bankAccountName: '',
|
|
31
28
|
bsb: '',
|
|
32
|
-
bankAccountNumber: ''
|
|
33
|
-
standardChoiceFormSignature: ''
|
|
29
|
+
bankAccountNumber: ''
|
|
34
30
|
},
|
|
35
31
|
currentCustomFundType: CustomFundTypes.MyOwnFund,
|
|
36
32
|
customFunds: [
|
|
@@ -38,13 +34,13 @@ export const initialStateCustomFund = {
|
|
|
38
34
|
label: CustomFundTypes.MyOwnFund,
|
|
39
35
|
value: SuperSelectionAppRoutes.MyOwnFund
|
|
40
36
|
},
|
|
41
|
-
{
|
|
42
|
-
label: CustomFundTypes.DefaultFund,
|
|
43
|
-
value: SuperSelectionAppRoutes.DefaultFund
|
|
44
|
-
},
|
|
45
37
|
{
|
|
46
38
|
label: CustomFundTypes.SelfManagedFund,
|
|
47
39
|
value: SuperSelectionAppRoutes.SelfManagedFund
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: CustomFundTypes.DefaultFund,
|
|
43
|
+
value: SuperSelectionAppRoutes.DefaultFund
|
|
48
44
|
}
|
|
49
45
|
]
|
|
50
46
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { Component, h, Host, Prop, State } from '@stencil/core';
|
|
1
|
+
import { Component, getAssetPath, h, Host, Prop, State } from '@stencil/core';
|
|
2
2
|
import * as O from 'fp-ts/lib/Option';
|
|
3
3
|
import australianFundLookupService from '../../../services/australian-fund-lookup.service';
|
|
4
4
|
import { EventTrackingService } from '../../../services/event-tracking.service';
|
|
5
5
|
import navigationService from '../../../services/navigation.service';
|
|
6
|
-
import notificationsService from '../../../services/notifications.service';
|
|
7
6
|
import { SuperSelectionAppRoutes } from '../../../services/super-selection-app.routes';
|
|
8
7
|
import superSelectionAppService from '../../../services/super-selection-app.service';
|
|
9
8
|
import customFundChoiceApi from '../api/custom-fund-choice.api';
|
|
10
|
-
import customFundState from '../custom-fund.store';
|
|
11
9
|
export class DefaultFund {
|
|
12
10
|
constructor() {
|
|
13
11
|
this.defaultFundProductName = 'Loading fund...';
|
|
@@ -19,65 +17,59 @@ export class DefaultFund {
|
|
|
19
17
|
return;
|
|
20
18
|
}
|
|
21
19
|
this.isDefaultFundExists = true;
|
|
22
|
-
const defaultFundSearchResult = await australianFundLookupService.
|
|
20
|
+
const defaultFundSearchResult = await australianFundLookupService.getActiveFundByUsiAsync(defaultFundUsi.value);
|
|
23
21
|
if (O.isNone(defaultFundSearchResult)) {
|
|
24
22
|
this.isInvalidDefaultFund = true;
|
|
25
|
-
notificationsService.showErrorNotification({
|
|
26
|
-
title: 'Something is not right',
|
|
27
|
-
description: `Couldn't find information about the configured default fund (USI ${defaultFundUsi.value})`
|
|
28
|
-
});
|
|
29
23
|
return;
|
|
30
24
|
}
|
|
31
25
|
this.defaultFund = defaultFundSearchResult.value;
|
|
32
26
|
this.defaultFundProductName = defaultFundSearchResult.value.productName;
|
|
33
27
|
}
|
|
34
28
|
componentDidLoad() {
|
|
29
|
+
var _a, _b, _c, _d;
|
|
35
30
|
return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({
|
|
36
|
-
fundUsi: this.defaultFund.usi,
|
|
37
|
-
fundName: this.defaultFund.productName,
|
|
31
|
+
fundUsi: (_b = (_a = this.defaultFund) === null || _a === void 0 ? void 0 : _a.usi) !== null && _b !== void 0 ? _b : '',
|
|
32
|
+
fundName: (_d = (_c = this.defaultFund) === null || _c === void 0 ? void 0 : _c.productName) !== null && _d !== void 0 ? _d : '',
|
|
38
33
|
promotedFundsShown: superSelectionAppService.promotedFunds
|
|
39
34
|
});
|
|
40
35
|
}
|
|
41
36
|
render() {
|
|
42
|
-
|
|
43
|
-
h("
|
|
44
|
-
h("
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
h("span", null, "Back")))),
|
|
67
|
-
h("div", { class: "flex-grow-1 w-50" }, this.isDefaultFundExists && (h("div", { class: "ml-2" },
|
|
68
|
-
h("fl-promise-button", { isBlockElement: true, disabled: this.isInvalidDefaultFund, promiseFn: () => this.handleSubmitForm() },
|
|
69
|
-
h("span", null, "Save and continue")))))))));
|
|
37
|
+
return (h(Host, null,
|
|
38
|
+
h("sss-header-section", { currentPage: "own-fund" }),
|
|
39
|
+
h("div", { class: "flex justify-center mt-11" },
|
|
40
|
+
h("sss-custom-fund", null,
|
|
41
|
+
h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg" },
|
|
42
|
+
h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"),
|
|
43
|
+
h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3" },
|
|
44
|
+
h("div", { class: "flex" },
|
|
45
|
+
h("div", { class: "flex-shrink-0" },
|
|
46
|
+
h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })),
|
|
47
|
+
h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" }, this.isDefaultFundExists && !this.isInvalidDefaultFund ? (h("span", null, "By choosing to join your employer\u2019s default super fund, you acknowledge that your application to join is subject to Trustee approval.")) : (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 defaut fund."))))),
|
|
48
|
+
this.isDefaultFundExists && !this.isInvalidDefaultFund && (h("div", null,
|
|
49
|
+
h("div", { class: "mt-3" },
|
|
50
|
+
h("label", { class: "text-sm font-medium text-gray-700" }, "Fund Name"),
|
|
51
|
+
h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm" }, this.defaultFundProductName)),
|
|
52
|
+
h("div", { class: "mt-3" },
|
|
53
|
+
h("label", { class: "text-sm font-medium text-gray-700" }, "Fund USI"),
|
|
54
|
+
h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm" }, this.defaultFund.usi))))),
|
|
55
|
+
h("div", { class: "flex justify-center mt-8" },
|
|
56
|
+
h("div", { class: "sm:max-w-320 w-full" },
|
|
57
|
+
this.isDefaultFundExists && !this.isInvalidDefaultFund && (h("div", { class: "mb-4" },
|
|
58
|
+
h("sss-button", { fillWidth: true, promiseFn: () => this.handleSubmitForm() }, "Continue"))),
|
|
59
|
+
h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
|
|
60
|
+
h("sss-button", { fillWidth: true, variant: "secondary" }, "Back"))))))));
|
|
70
61
|
}
|
|
71
62
|
async handleSubmitForm() {
|
|
72
63
|
if (this.isInvalidDefaultFund) {
|
|
73
64
|
return;
|
|
74
65
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
navigationService.navigateInternallyToStandardChoice({
|
|
67
|
+
history: this.history,
|
|
68
|
+
fundName: `Employer’s default fund`,
|
|
69
|
+
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
70
|
+
await customFundChoiceApi.submitDefaultFundChoiceAsync({ standardChoiceFormSignature });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
81
73
|
}
|
|
82
74
|
static get is() { return "sss-default-fund"; }
|
|
83
75
|
static get properties() { return {
|
|
@@ -103,7 +95,6 @@ export class DefaultFund {
|
|
|
103
95
|
}
|
|
104
96
|
}; }
|
|
105
97
|
static get states() { return {
|
|
106
|
-
"formState": {},
|
|
107
98
|
"defaultFundProductName": {}
|
|
108
99
|
}; }
|
|
109
100
|
}
|
|
@@ -18,24 +18,28 @@ export class MyOwnFundInputs {
|
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
20
|
return (h("div", null,
|
|
21
|
-
h("div",
|
|
22
|
-
h("label", { class: "
|
|
23
|
-
h("
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
O.isSome(this.myOwnFundForm.fundUsi) && (h("div",
|
|
29
|
-
h("label", { class: "
|
|
30
|
-
h("
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
h("
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
h("div", null,
|
|
22
|
+
h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"),
|
|
23
|
+
h("div", { class: "mt-1" },
|
|
24
|
+
h("sss-dropdown-async", { searchFunction: this.searchFundsAsync, minSearchStringLength: this.MIN_SEARCH_STRING_LENGTH, required: true, requiredValidationMessage: "Select a fund", placeholder: `Type to search by name or USI...`, value: this.selectedOption, onValueChanged: (ev) => {
|
|
25
|
+
this.selectedOption = ev.detail;
|
|
26
|
+
this.updateFund(ev.detail);
|
|
27
|
+
}, showValidationErrors: this.showValidationErrors })),
|
|
28
|
+
O.isSome(this.myOwnFundForm.fundUsi) && (h("div", { class: "mt-3" },
|
|
29
|
+
h("label", { class: "text-sm font-medium text-gray-700" }, "Fund USI"),
|
|
30
|
+
h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm" }, this.myOwnFundForm.fundUsi.value)))),
|
|
31
|
+
h("div", { class: "mt-3" },
|
|
32
|
+
h("label", { class: "text-sm font-medium text-gray-700" }, "Member number"),
|
|
33
|
+
h("div", { class: "mt-1" },
|
|
34
|
+
h("input", { type: "text", class: {
|
|
35
|
+
'shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-sm border-gray-300 rounded-md': true,
|
|
36
|
+
'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
|
|
37
|
+
.showValidationErrors
|
|
38
|
+
}, required: true, pattern: "[A-Za-z0-9]{4,16}", name: "memberNumber", id: "memberNumber", value: O.toUndefined(customFundState.myOwnFundForm.memberNumber), onChange: (ev) => this.updateMemberNumber(ev.target.value.trim()) }),
|
|
39
|
+
h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid member number (only numbers and / or letters)")))));
|
|
36
40
|
}
|
|
37
|
-
|
|
38
|
-
this.formChanged.emit({ fundUsi: O.some(
|
|
41
|
+
updateFund(fund) {
|
|
42
|
+
this.formChanged.emit({ fundUsi: O.some(fund.value), fundName: O.some(fund.label) });
|
|
39
43
|
}
|
|
40
44
|
updateMemberNumber(memberNumber) {
|
|
41
45
|
this.formChanged.emit({ memberNumber: O.some(memberNumber) });
|
|
@@ -47,7 +51,7 @@ export class MyOwnFundInputs {
|
|
|
47
51
|
"mutable": false,
|
|
48
52
|
"complexType": {
|
|
49
53
|
"original": "MyOwnFundFormState",
|
|
50
|
-
"resolved": "{ fundUsi: Option<string>;
|
|
54
|
+
"resolved": "{ fundUsi: Option<string>; fundName: Option<string>; memberNumber: Option<string>; }",
|
|
51
55
|
"references": {
|
|
52
56
|
"MyOwnFundFormState": {
|
|
53
57
|
"location": "import",
|
|
@@ -61,6 +65,23 @@ export class MyOwnFundInputs {
|
|
|
61
65
|
"tags": [],
|
|
62
66
|
"text": ""
|
|
63
67
|
}
|
|
68
|
+
},
|
|
69
|
+
"showValidationErrors": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "boolean",
|
|
74
|
+
"resolved": "boolean",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": ""
|
|
82
|
+
},
|
|
83
|
+
"attribute": "show-validation-errors",
|
|
84
|
+
"reflect": false
|
|
64
85
|
}
|
|
65
86
|
}; }
|
|
66
87
|
static get states() { return {
|
|
@@ -78,7 +99,7 @@ export class MyOwnFundInputs {
|
|
|
78
99
|
},
|
|
79
100
|
"complexType": {
|
|
80
101
|
"original": "Partial<MyOwnFundFormState>",
|
|
81
|
-
"resolved": "{ fundUsi?: None | Some<string> | undefined;
|
|
102
|
+
"resolved": "{ fundUsi?: None | Some<string> | undefined; fundName?: None | Some<string> | undefined; memberNumber?: None | Some<string> | undefined; }",
|
|
82
103
|
"references": {
|
|
83
104
|
"Partial": {
|
|
84
105
|
"location": "global"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, h, Host, Prop, State } from '@stencil/core';
|
|
1
|
+
import { Component, getAssetPath, h, Host, Prop, State } from '@stencil/core';
|
|
2
2
|
import { injectHistory } from '@stencil/router';
|
|
3
3
|
import { pipe } from 'fp-ts/lib/function';
|
|
4
4
|
import * as O from 'fp-ts/Option';
|
|
@@ -11,6 +11,7 @@ import customFundState from '../custom-fund.store';
|
|
|
11
11
|
export class MyOwnFund {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.isNotAllInformationProvidedMessageVisible = false;
|
|
14
|
+
this.isSubmitDisabled = true;
|
|
14
15
|
this.eventTrackingService = EventTrackingService.Instance;
|
|
15
16
|
}
|
|
16
17
|
componentDidLoad() {
|
|
@@ -19,33 +20,34 @@ export class MyOwnFund {
|
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
render() {
|
|
22
|
-
return (h(Host,
|
|
23
|
-
h("sss-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
h("
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
h("
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
h("
|
|
23
|
+
return (h(Host, null,
|
|
24
|
+
h("sss-header-section", { currentPage: "own-fund" }),
|
|
25
|
+
h("div", { class: "flex justify-center mt-11" },
|
|
26
|
+
h("sss-custom-fund", null,
|
|
27
|
+
h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
|
|
28
|
+
'was-validated': this.formState === 'validated'
|
|
29
|
+
}, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) },
|
|
30
|
+
h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg" },
|
|
31
|
+
h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"),
|
|
32
|
+
h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4" },
|
|
33
|
+
h("div", { class: "flex" },
|
|
34
|
+
h("div", { class: "flex-shrink-0" },
|
|
35
|
+
h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })),
|
|
36
|
+
h("div", { class: "ml-2" },
|
|
37
|
+
h("ul", { class: "list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5" },
|
|
38
|
+
h("li", null, "Make sure you are a current member of the fund before completing this step."),
|
|
39
|
+
h("li", null, "Please check that the fund USI is correct as some funds have similar names."))))),
|
|
40
|
+
h("sss-my-own-fund-inputs", { myOwnFundForm: customFundState.myOwnFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
|
|
41
|
+
customFundState.myOwnFundForm = Object.assign(Object.assign({}, customFundState.myOwnFundForm), event.detail);
|
|
42
|
+
this.isNotAllInformationProvidedMessageVisible = false;
|
|
43
|
+
} }),
|
|
44
|
+
this.isNotAllInformationProvidedMessageVisible && (h("div", { class: "mt-4 rounded-md bg-red-50 p-4 text-sm text-red-700" }, "All fields are required to complete submission. Make sure you have selected a fund."))),
|
|
45
|
+
h("div", { class: "flex justify-center mt-8" },
|
|
46
|
+
h("div", { class: "sm:max-w-320 w-full" },
|
|
47
|
+
h("div", { class: "mb-4" },
|
|
48
|
+
h("sss-button", { fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")),
|
|
49
|
+
h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
|
|
50
|
+
h("sss-button", { fillWidth: true, variant: "secondary" }, "Back")))))))));
|
|
49
51
|
}
|
|
50
52
|
async handleSubmitForm() {
|
|
51
53
|
this.formState = 'validated';
|
|
@@ -53,20 +55,23 @@ export class MyOwnFund {
|
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
57
|
const isAllInformationProvided = O.isSome(customFundState.myOwnFundForm.fundUsi) &&
|
|
56
|
-
O.isSome(customFundState.myOwnFundForm.memberNumber)
|
|
57
|
-
O.isSome(customFundState.myOwnFundForm.standardChoiceFormSignature);
|
|
58
|
+
O.isSome(customFundState.myOwnFundForm.memberNumber);
|
|
58
59
|
if (!isAllInformationProvided) {
|
|
59
60
|
this.isNotAllInformationProvidedMessageVisible = true;
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
navigationService.navigateInternallyToStandardChoice({
|
|
64
|
+
history: this.history,
|
|
65
|
+
fundName: this.getOrError(customFundState.myOwnFundForm.fundName),
|
|
66
|
+
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
67
|
+
const customFundChoiceDto = {
|
|
68
|
+
fundUsi: this.getOrError(customFundState.myOwnFundForm.fundUsi),
|
|
69
|
+
memberNumber: this.getOrError(customFundState.myOwnFundForm.memberNumber),
|
|
70
|
+
standardChoiceFormSignature
|
|
71
|
+
};
|
|
72
|
+
await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
70
75
|
}
|
|
71
76
|
getOrError(option) {
|
|
72
77
|
return pipe(option, O.getOrElse(() => {
|
|
@@ -74,7 +79,6 @@ export class MyOwnFund {
|
|
|
74
79
|
}));
|
|
75
80
|
}
|
|
76
81
|
static get is() { return "sss-my-own-fund"; }
|
|
77
|
-
static get assetsDirs() { return ["assets"]; }
|
|
78
82
|
static get properties() { return {
|
|
79
83
|
"history": {
|
|
80
84
|
"type": "unknown",
|
|
@@ -99,7 +103,8 @@ export class MyOwnFund {
|
|
|
99
103
|
}; }
|
|
100
104
|
static get states() { return {
|
|
101
105
|
"formState": {},
|
|
102
|
-
"isNotAllInformationProvidedMessageVisible": {}
|
|
106
|
+
"isNotAllInformationProvidedMessageVisible": {},
|
|
107
|
+
"isSubmitDisabled": {}
|
|
103
108
|
}; }
|
|
104
109
|
}
|
|
105
110
|
injectHistory(MyOwnFund);
|