@flarehr/apollo-super-selection 5.86.53344 → 5.88.58802

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.
Files changed (87) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  2. package/dist/lib/apollo-super-selection/p-035b3fcf.system.js +1 -0
  3. package/dist/lib/apollo-super-selection/p-10c435ea.system.entry.js +1 -0
  4. package/dist/lib/apollo-super-selection/p-157712cb.entry.js +1 -0
  5. package/dist/lib/apollo-super-selection/p-19a451d6.entry.js +1 -0
  6. package/dist/lib/apollo-super-selection/p-19be074b.entry.js +1 -0
  7. package/dist/lib/apollo-super-selection/p-240b48ec.system.entry.js +1 -0
  8. package/dist/lib/apollo-super-selection/p-36ea14fc.entry.js +14 -0
  9. package/dist/lib/apollo-super-selection/p-3cec4189.system.entry.js +1 -0
  10. package/dist/lib/apollo-super-selection/p-524b1ff5.system.js +1 -0
  11. package/dist/lib/apollo-super-selection/p-6a4fc9a6.js +1 -0
  12. package/dist/lib/apollo-super-selection/p-7b1087e8.system.js +1 -0
  13. package/dist/lib/apollo-super-selection/p-9640d3ea.js +1 -0
  14. package/dist/lib/apollo-super-selection/p-9a268e32.js +1 -0
  15. package/dist/lib/apollo-super-selection/p-a68b9b0f.system.js +1 -0
  16. package/dist/lib/apollo-super-selection/p-a7025e9f.js +1 -0
  17. package/dist/lib/apollo-super-selection/p-b819e464.system.entry.js +69 -0
  18. package/dist/lib/apollo-super-selection/p-b88cf353.system.js +1 -0
  19. package/dist/lib/apollo-super-selection/p-bd6e6a8f.system.js +1 -1
  20. package/dist/lib/apollo-super-selection/p-d5c7a35f.js +1 -0
  21. package/dist/lib/apollo-super-selection/p-e435c64b.entry.js +1 -0
  22. package/dist/lib/apollo-super-selection/p-f924ae7d.system.entry.js +1 -0
  23. package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
  24. package/dist/lib/cjs/australian-fund-lookup.service-ee589d6c.js +19 -0
  25. package/dist/lib/cjs/custom-fund.store-f56ea1fb.js +37 -0
  26. package/dist/lib/cjs/event-tracking.service-35513098.js +296 -0
  27. package/dist/lib/cjs/injectHistory-eb188cf0.js +9 -0
  28. package/dist/lib/cjs/loader.cjs.js +1 -1
  29. package/dist/lib/cjs/{sss-button_32.cjs.entry.js → sss-button_33.cjs.entry.js} +579 -387
  30. package/dist/lib/cjs/sss-default-fund-router.cjs.entry.js +23 -0
  31. package/dist/lib/cjs/sss-default-fund.cjs.entry.js +61 -0
  32. package/dist/lib/cjs/sss-promoted-fund-router.cjs.entry.js +23 -0
  33. package/dist/lib/cjs/sss-super-byof-host.cjs.entry.js +24 -21
  34. package/dist/lib/cjs/{custom-fund-choice.api-293c1ace.js → super-selection-app.service-352ccc67.js} +12 -331
  35. package/dist/lib/collection/collection-manifest.json +6 -1
  36. package/dist/lib/collection/components/default-fund/super-default-fund-types.js +1 -0
  37. package/dist/lib/collection/components/default-fund/super-default-fund.js +130 -0
  38. package/dist/lib/collection/components/promoted-fund/super-promoted-fund-types.js +1 -0
  39. package/dist/lib/collection/components/promoted-fund/super-promoted-fund.js +194 -0
  40. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund-router.js +37 -0
  41. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-router.js +37 -0
  42. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +2 -2
  43. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +8 -0
  44. package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +3 -1
  45. package/dist/lib/esm/apollo-super-selection.js +1 -1
  46. package/dist/lib/esm/australian-fund-lookup.service-139f6b9d.js +17 -0
  47. package/dist/lib/esm/custom-fund.store-59962585.js +36 -0
  48. package/dist/lib/esm/event-tracking.service-83984310.js +290 -0
  49. package/dist/lib/esm/injectHistory-e92e4664.js +7 -0
  50. package/dist/lib/esm/loader.js +1 -1
  51. package/dist/lib/esm/{sss-button_32.entry.js → sss-button_33.entry.js} +289 -98
  52. package/dist/lib/esm/sss-default-fund-router.entry.js +19 -0
  53. package/dist/lib/esm/sss-default-fund.entry.js +57 -0
  54. package/dist/lib/esm/sss-promoted-fund-router.entry.js +19 -0
  55. package/dist/lib/esm/sss-super-byof-host.entry.js +4 -1
  56. package/dist/lib/esm/{custom-fund-choice.api-42801d64.js → super-selection-app.service-312ba6b0.js} +13 -327
  57. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  58. package/dist/lib/esm-es5/australian-fund-lookup.service-139f6b9d.js +1 -0
  59. package/dist/lib/esm-es5/custom-fund.store-59962585.js +1 -0
  60. package/dist/lib/esm-es5/event-tracking.service-83984310.js +1 -0
  61. package/dist/lib/esm-es5/injectHistory-e92e4664.js +1 -0
  62. package/dist/lib/esm-es5/loader.js +1 -1
  63. package/dist/lib/esm-es5/sss-button_33.entry.js +69 -0
  64. package/dist/lib/esm-es5/sss-default-fund-router.entry.js +1 -0
  65. package/dist/lib/esm-es5/sss-default-fund.entry.js +1 -0
  66. package/dist/lib/esm-es5/sss-promoted-fund-router.entry.js +1 -0
  67. package/dist/lib/esm-es5/sss-super-byof-host.entry.js +1 -1
  68. package/dist/lib/esm-es5/super-selection-app.service-312ba6b0.js +1 -0
  69. package/dist/lib/types/components/default-fund/super-default-fund-types.d.ts +23 -0
  70. package/dist/lib/types/components/default-fund/super-default-fund.d.ts +20 -0
  71. package/dist/lib/types/components/promoted-fund/super-promoted-fund-types.d.ts +41 -0
  72. package/dist/lib/types/components/promoted-fund/super-promoted-fund.d.ts +23 -0
  73. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +2 -0
  74. package/dist/lib/types/components/super-selection-app/funds/custom-fund/default-fund/default-fund-router.d.ts +5 -0
  75. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-router.d.ts +5 -0
  76. package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +2 -0
  77. package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +2 -0
  78. package/dist/lib/types/components.d.ts +60 -0
  79. package/package.json +3 -2
  80. package/dist/lib/apollo-super-selection/p-24d6e2b8.js +0 -1
  81. package/dist/lib/apollo-super-selection/p-40bfe38f.entry.js +0 -14
  82. package/dist/lib/apollo-super-selection/p-a0063575.system.entry.js +0 -1
  83. package/dist/lib/apollo-super-selection/p-b00f648b.entry.js +0 -1
  84. package/dist/lib/apollo-super-selection/p-b2de6265.system.entry.js +0 -69
  85. package/dist/lib/apollo-super-selection/p-cd3ed541.system.js +0 -1
  86. package/dist/lib/esm-es5/custom-fund-choice.api-42801d64.js +0 -1
  87. package/dist/lib/esm-es5/sss-button_32.entry.js +0 -69
@@ -0,0 +1,130 @@
1
+ import { Component, h, Host, Prop, State } from '@stencil/core';
2
+ import { injectHistory } from '@stencil/router';
3
+ import * as O from 'fp-ts/lib/Option';
4
+ import customFundChoiceApi from '../super-selection-app/funds/custom-fund/api/custom-fund-choice.api';
5
+ import { EventTrackingService } from '../super-selection-app/services/event-tracking.service';
6
+ import navigationService from '../super-selection-app/services/navigation.service';
7
+ import { SuperSelectionAppRoutes } from '../super-selection-app/services/super-selection-app.routes';
8
+ import superSelectionAppService from '../super-selection-app/services/super-selection-app.service';
9
+ import { LoadWaitingTimeout } from './super-default-fund-types';
10
+ var SuperDefaultFundComponentStatus;
11
+ (function (SuperDefaultFundComponentStatus) {
12
+ SuperDefaultFundComponentStatus[SuperDefaultFundComponentStatus["NotLoaded"] = 1] = "NotLoaded";
13
+ SuperDefaultFundComponentStatus[SuperDefaultFundComponentStatus["Loaded"] = 2] = "Loaded";
14
+ })(SuperDefaultFundComponentStatus || (SuperDefaultFundComponentStatus = {}));
15
+ let superDefaultFundComponentStatus = SuperDefaultFundComponentStatus.NotLoaded;
16
+ export class SuperDefaultFundHost {
17
+ constructor() {
18
+ this.productName = 'Employer’s default fund';
19
+ this.eventTrackingService = EventTrackingService.Instance;
20
+ this.subscribeToSuperDefaultFundEvents = () => {
21
+ for (const eventName in this.defaultFundEventHandlers) {
22
+ document.addEventListener(eventName, this.defaultFundEventHandlers[eventName]);
23
+ }
24
+ };
25
+ this.unSubscribeFromSuperDefaultFundEvents = () => {
26
+ for (const eventName in this.defaultFundEventHandlers) {
27
+ document.removeEventListener(eventName, this.defaultFundEventHandlers[eventName]);
28
+ }
29
+ };
30
+ this.defaultFundLoaded = async (event) => {
31
+ var _a;
32
+ if (event.detail.sender === 'super-default-fund') {
33
+ superDefaultFundComponentStatus = SuperDefaultFundComponentStatus.Loaded;
34
+ clearTimeout(this.loadingTimeoutRef);
35
+ await this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({
36
+ fundUsi: (_a = event.detail.fundUsi) !== null && _a !== void 0 ? _a : '',
37
+ fundName: this.productName,
38
+ promotedFundsShown: superSelectionAppService.promotedFunds,
39
+ defaultFundUsiSet: O.toUndefined(superSelectionAppService.defaultFundUsi)
40
+ });
41
+ }
42
+ return Promise.resolve();
43
+ };
44
+ this.defaultFundCompleted = async (event) => {
45
+ if (event.detail.sender === 'super-default-fund') {
46
+ navigationService.navigateInternallyToStandardChoice({
47
+ history: this.history,
48
+ fundName: this.productName,
49
+ fundDetails: {
50
+ type: 'default',
51
+ fundName: this.productName,
52
+ fundUsi: event.detail.fundUsi
53
+ },
54
+ handleSubmitFn: async (standardChoiceFormSignature) => {
55
+ await customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({ standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig));
56
+ }
57
+ });
58
+ }
59
+ };
60
+ this.defaultFundCancelled = async (event) => {
61
+ if (event.detail.sender === 'super-default-fund') {
62
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
63
+ }
64
+ };
65
+ this.defaultFundEventHandlers = {
66
+ 'default-fund-loaded': this.defaultFundLoaded.bind(this),
67
+ 'default-fund-completed': this.defaultFundCompleted.bind(this),
68
+ 'default-fund-cancelled': this.defaultFundCancelled.bind(this)
69
+ };
70
+ }
71
+ async componentWillLoad() {
72
+ if (O.isSome(superSelectionAppService.backendUrl) &&
73
+ O.isSome(superSelectionAppService.state.jwt)) {
74
+ this.backendUrl = superSelectionAppService.backendUrl.value;
75
+ this.accessToken = superSelectionAppService.state.jwt.value;
76
+ if (superDefaultFundComponentStatus === SuperDefaultFundComponentStatus.NotLoaded) {
77
+ this.loadingTimeoutRef = setTimeout(this.defaultFundLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout);
78
+ }
79
+ this.subscribeToSuperDefaultFundEvents();
80
+ }
81
+ else {
82
+ throw Error(`SuperDefaultFundHost pre-requisites not met.`);
83
+ }
84
+ }
85
+ disconnectedCallback() {
86
+ clearTimeout(this.loadingTimeoutRef);
87
+ this.unSubscribeFromSuperDefaultFundEvents;
88
+ }
89
+ render() {
90
+ return (h(Host, null,
91
+ h("sss-header-section", null),
92
+ h("div", { class: "flex justify-center mt-11" },
93
+ h("sss-custom-fund", null,
94
+ h("div", null,
95
+ h("apollo-super-default-fund", { "backend-url": this.backendUrl, "access-token": this.accessToken }))))));
96
+ }
97
+ async defaultFundLoadingTimeoutTriggered() {
98
+ if (superDefaultFundComponentStatus !== SuperDefaultFundComponentStatus.Loaded) {
99
+ throw Error(`Default Fund component failed to load.`);
100
+ }
101
+ }
102
+ static get is() { return "sss-default-fund-host"; }
103
+ static get properties() { return {
104
+ "history": {
105
+ "type": "unknown",
106
+ "mutable": false,
107
+ "complexType": {
108
+ "original": "RouterHistory",
109
+ "resolved": "RouterHistory",
110
+ "references": {
111
+ "RouterHistory": {
112
+ "location": "import",
113
+ "path": "@stencil/router"
114
+ }
115
+ }
116
+ },
117
+ "required": false,
118
+ "optional": false,
119
+ "docs": {
120
+ "tags": [],
121
+ "text": ""
122
+ }
123
+ }
124
+ }; }
125
+ static get states() { return {
126
+ "backendUrl": {},
127
+ "accessToken": {}
128
+ }; }
129
+ }
130
+ injectHistory(SuperDefaultFundHost);
@@ -0,0 +1 @@
1
+ export const LoadWaitingTimeout = 30000;
@@ -0,0 +1,194 @@
1
+ import { Component, h, Host, Prop, State } from '@stencil/core';
2
+ import { injectHistory } from '@stencil/router';
3
+ import * as O from 'fp-ts/lib/Option';
4
+ import { SuperCampaignErrorApi } from '../super-selection-app/api/super-campaign-errors-api';
5
+ import promotedFundChoiceApi from '../super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api';
6
+ import navigationService from '../super-selection-app/services/navigation.service';
7
+ import { SuperCampaignComponentStatus } from '../super-selection-app/services/super-selection.store';
8
+ import { SuperSelectionAppRoutes } from '../super-selection-app/services/super-selection-app.routes';
9
+ import superSelectionAppService from '../super-selection-app/services/super-selection-app.service';
10
+ import { LoadWaitingTimeout } from './super-promoted-fund-types';
11
+ var SuperPromotedFundComponentStatus;
12
+ (function (SuperPromotedFundComponentStatus) {
13
+ SuperPromotedFundComponentStatus[SuperPromotedFundComponentStatus["NotLoaded"] = 1] = "NotLoaded";
14
+ SuperPromotedFundComponentStatus[SuperPromotedFundComponentStatus["Loaded"] = 2] = "Loaded";
15
+ })(SuperPromotedFundComponentStatus || (SuperPromotedFundComponentStatus = {}));
16
+ let superPromotedFundComponentStatus = SuperPromotedFundComponentStatus.NotLoaded;
17
+ export class SuperPromotedFundHost {
18
+ constructor() {
19
+ this.subscribeToSuperPromotedFundEvents = () => {
20
+ for (const eventName in this.promotedFundEventHandlers) {
21
+ document.addEventListener(eventName, this.promotedFundEventHandlers[eventName]);
22
+ }
23
+ };
24
+ this.unSubscribeFromSuperPromotedFundEvents = () => {
25
+ for (const eventName in this.promotedFundEventHandlers) {
26
+ document.removeEventListener(eventName, this.promotedFundEventHandlers[eventName]);
27
+ }
28
+ };
29
+ this.promotedFundLoaded = async (event) => {
30
+ if (event.detail.sender === 'super-promoted-fund') {
31
+ superPromotedFundComponentStatus = SuperPromotedFundComponentStatus.Loaded;
32
+ clearTimeout(this.loadingTimeoutRef);
33
+ }
34
+ };
35
+ this.promotedFundCompleted = async (event) => {
36
+ if (event.detail.sender === 'super-promoted-fund') {
37
+ const { fundType, fundId, fundUsi, fundName, memberNumber } = event.detail;
38
+ const fundDetails = this.buildFundDetails(fundType, fundId, fundUsi, fundName, memberNumber);
39
+ const handleSubmitFn = this.buildHandleSubmitFn(event.detail);
40
+ navigationService.navigateInternallyToStandardChoice({
41
+ history: this.history,
42
+ fundName,
43
+ promotedFundId: fundId,
44
+ fundDetails,
45
+ handleSubmitFn
46
+ });
47
+ }
48
+ };
49
+ this.promotedFundCancelled = async (event) => {
50
+ if (event.detail.sender === 'super-promoted-fund') {
51
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
52
+ }
53
+ };
54
+ this.superCampaignLoadFailed = async (event) => {
55
+ if (event.detail.sender === 'super-promoted-fund') {
56
+ await this.activateFallbackMechanism({
57
+ type: 'SuperCampaignActivationFailed',
58
+ reason: event.detail.reason || 'Unknown'
59
+ });
60
+ }
61
+ };
62
+ this.superCampaignFailed = async (event) => {
63
+ if (event.detail.sender === 'super-promoted-fund') {
64
+ await this.activateFallbackMechanism({
65
+ type: 'SuperCampaignOperationFailed',
66
+ reason: event.detail.reason || 'Unknown'
67
+ });
68
+ }
69
+ };
70
+ this.promotedFundEventHandlers = {
71
+ 'promoted-fund-loaded': this.promotedFundLoaded.bind(this),
72
+ 'promoted-fund-completed': this.promotedFundCompleted.bind(this),
73
+ 'promoted-fund-cancelled': this.promotedFundCancelled.bind(this),
74
+ 'super-campaign-load-failed': this.superCampaignLoadFailed.bind(this),
75
+ 'super-campaign-failed': this.superCampaignFailed.bind(this)
76
+ };
77
+ }
78
+ async componentWillLoad() {
79
+ if (O.isSome(superSelectionAppService.backendUrl) &&
80
+ O.isSome(superSelectionAppService.state.jwt)) {
81
+ this.backendUrl = superSelectionAppService.backendUrl.value;
82
+ this.accessToken = superSelectionAppService.state.jwt.value;
83
+ superSelectionAppService.hideFooterSection = true;
84
+ if (superPromotedFundComponentStatus === SuperPromotedFundComponentStatus.NotLoaded) {
85
+ this.loadingTimeoutRef = setTimeout(this.promotedFundLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout);
86
+ }
87
+ this.subscribeToSuperPromotedFundEvents();
88
+ }
89
+ else {
90
+ throw Error(`SuperPromotedFundHost pre-requisites not met.`);
91
+ }
92
+ }
93
+ disconnectedCallback() {
94
+ clearTimeout(this.loadingTimeoutRef);
95
+ this.unSubscribeFromSuperPromotedFundEvents();
96
+ superSelectionAppService.hideFooterSection = false;
97
+ }
98
+ render() {
99
+ return (h(Host, null,
100
+ h("apollo-super-promoted-fund", { "backend-url": this.backendUrl, "access-token": this.accessToken })));
101
+ }
102
+ buildFundDetails(fundType, fundId, fundUsi, fundName, memberNumber) {
103
+ switch (fundType) {
104
+ case 'Promoted':
105
+ return {
106
+ type: 'promoted',
107
+ fundName,
108
+ fundUsi,
109
+ memberNumber: memberNumber !== null && memberNumber !== void 0 ? memberNumber : '',
110
+ promotedFundId: fundId
111
+ };
112
+ case 'PromotedDefault':
113
+ return {
114
+ type: 'promotedDefault',
115
+ fundName,
116
+ fundUsi,
117
+ promotedFundId: fundId
118
+ };
119
+ case 'PromotedDefaultWithJoin':
120
+ return {
121
+ type: 'promotedDefaultWithJoin',
122
+ fundName,
123
+ fundUsi,
124
+ memberNumber: memberNumber !== null && memberNumber !== void 0 ? memberNumber : '',
125
+ promotedFundId: fundId
126
+ };
127
+ }
128
+ }
129
+ buildHandleSubmitFn(detail) {
130
+ const { fundType, fundId, fundUsi, memberNumber, memberFirstName, memberFamilyName, sourceOfJoin, isDefaultExclusive } = detail;
131
+ const defaultFundUsiSet = O.toUndefined(superSelectionAppService.defaultFundUsi);
132
+ const promotedFundsConfig = superSelectionAppService.promotedFundsConfig;
133
+ switch (fundType) {
134
+ case 'Promoted':
135
+ return (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId, memberNumber: memberNumber !== null && memberNumber !== void 0 ? memberNumber : '', memberFirstName,
136
+ memberFamilyName, usi: fundUsi, standardChoiceFormSignature,
137
+ defaultFundUsiSet, placementId: 'panel', sourceOfJoin,
138
+ isDefaultExclusive }, promotedFundsConfig));
139
+ case 'PromotedDefault':
140
+ return (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId, usi: fundUsi, standardChoiceFormSignature,
141
+ defaultFundUsiSet, placementId: 'panel', sourceOfJoin,
142
+ isDefaultExclusive }, promotedFundsConfig));
143
+ case 'PromotedDefaultWithJoin':
144
+ return (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceWithJoinAsync(Object.assign({ fundId, memberNumber: memberNumber !== null && memberNumber !== void 0 ? memberNumber : '', memberFirstName: memberFirstName !== null && memberFirstName !== void 0 ? memberFirstName : '', memberFamilyName: memberFamilyName !== null && memberFamilyName !== void 0 ? memberFamilyName : '', usi: fundUsi, standardChoiceFormSignature,
145
+ defaultFundUsiSet, placementId: 'panel', sourceOfJoin,
146
+ isDefaultExclusive }, promotedFundsConfig));
147
+ }
148
+ }
149
+ async activateFallbackMechanism(error) {
150
+ if (superSelectionAppService.superCampaignComponentStatus !==
151
+ SuperCampaignComponentStatus.NotWorking) {
152
+ superSelectionAppService.superCampaignComponentStatus =
153
+ SuperCampaignComponentStatus.NotWorking;
154
+ await SuperCampaignErrorApi.Instance.PostError(error);
155
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
156
+ }
157
+ }
158
+ async promotedFundLoadingTimeoutTriggered() {
159
+ if (superPromotedFundComponentStatus !== SuperPromotedFundComponentStatus.Loaded) {
160
+ this.activateFallbackMechanism({
161
+ type: 'SuperCampaignActivationFailed',
162
+ reason: `Activation timeout was triggered after:${LoadWaitingTimeout / 1000} seconds`
163
+ });
164
+ }
165
+ }
166
+ static get is() { return "sss-promoted-fund-host"; }
167
+ static get properties() { return {
168
+ "history": {
169
+ "type": "unknown",
170
+ "mutable": false,
171
+ "complexType": {
172
+ "original": "RouterHistory",
173
+ "resolved": "RouterHistory",
174
+ "references": {
175
+ "RouterHistory": {
176
+ "location": "import",
177
+ "path": "@stencil/router"
178
+ }
179
+ }
180
+ },
181
+ "required": false,
182
+ "optional": false,
183
+ "docs": {
184
+ "tags": [],
185
+ "text": ""
186
+ }
187
+ }
188
+ }; }
189
+ static get states() { return {
190
+ "backendUrl": {},
191
+ "accessToken": {}
192
+ }; }
193
+ }
194
+ injectHistory(SuperPromotedFundHost);
@@ -0,0 +1,37 @@
1
+ import { Component, h, Host, Prop } from '@stencil/core';
2
+ import { injectHistory } from '@stencil/router';
3
+ import superSelectionAppService from '../../../services/super-selection-app.service';
4
+ export class DefaultFundRouter {
5
+ render() {
6
+ if (superSelectionAppService.isDefaultFundNewComponentEnabled) {
7
+ return (h(Host, null,
8
+ h("sss-default-fund-host", { history: this.history })));
9
+ }
10
+ return (h(Host, null,
11
+ h("sss-default-fund", { history: this.history })));
12
+ }
13
+ static get is() { return "sss-default-fund-router"; }
14
+ static get properties() { return {
15
+ "history": {
16
+ "type": "unknown",
17
+ "mutable": false,
18
+ "complexType": {
19
+ "original": "RouterHistory",
20
+ "resolved": "RouterHistory",
21
+ "references": {
22
+ "RouterHistory": {
23
+ "location": "import",
24
+ "path": "@stencil/router"
25
+ }
26
+ }
27
+ },
28
+ "required": false,
29
+ "optional": false,
30
+ "docs": {
31
+ "tags": [],
32
+ "text": ""
33
+ }
34
+ }
35
+ }; }
36
+ }
37
+ injectHistory(DefaultFundRouter);
@@ -0,0 +1,37 @@
1
+ import { Component, h, Host, Prop } from '@stencil/core';
2
+ import { injectHistory } from '@stencil/router';
3
+ import superSelectionAppService from '../../services/super-selection-app.service';
4
+ export class PromotedFundRouter {
5
+ render() {
6
+ if (superSelectionAppService.isPromotedFundNewComponentEnabled) {
7
+ return (h(Host, null,
8
+ h("sss-promoted-fund-host", { history: this.history })));
9
+ }
10
+ return (h(Host, null,
11
+ h("sss-super-campaign-host", { history: this.history })));
12
+ }
13
+ static get is() { return "sss-promoted-fund-router"; }
14
+ static get properties() { return {
15
+ "history": {
16
+ "type": "unknown",
17
+ "mutable": false,
18
+ "complexType": {
19
+ "original": "RouterHistory",
20
+ "resolved": "RouterHistory",
21
+ "references": {
22
+ "RouterHistory": {
23
+ "location": "import",
24
+ "path": "@stencil/router"
25
+ }
26
+ }
27
+ },
28
+ "required": false,
29
+ "optional": false,
30
+ "docs": {
31
+ "tags": [],
32
+ "text": ""
33
+ }
34
+ }
35
+ }; }
36
+ }
37
+ injectHistory(PromotedFundRouter);
@@ -20,7 +20,7 @@ export var SuperSelectionAppRoutes;
20
20
  })(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
21
21
  export const superSelectionAppStencilRoutes = [
22
22
  h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
23
- h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
23
+ h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-promoted-fund-router" }),
24
24
  h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-choice-router" }),
25
25
  h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-super-byof-host" }),
26
26
  h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFundEngagementStep, component: "sss-my-own-fund-engagement-step-host" }),
@@ -31,7 +31,7 @@ export const superSelectionAppStencilRoutes = [
31
31
  h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
32
32
  h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
33
33
  h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-super-smsf-host" }),
34
- h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
34
+ h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund-router" }),
35
35
  h("stencil-route", { url: SuperSelectionAppRoutes.FeaturedFunds, component: "sss-super-campaign-featured-funds" }),
36
36
  h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
37
37
  h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
@@ -103,6 +103,8 @@ export class SuperSelectionAppService {
103
103
  appStateResponse.bringYourOwnFundCustomStepEnabled;
104
104
  this._state.smsfCustomStepEnabled = appStateResponse.smsfCustomStepEnabled;
105
105
  this._state.featuredFundsEnabled = appStateResponse.featuredFundsEnabled;
106
+ this._state.defaultFundNewComponentEnabled = appStateResponse.defaultFundNewComponentEnabled;
107
+ this._state.promotedFundNewComponentEnabled = appStateResponse.promotedFundNewComponentEnabled;
106
108
  this._state.superChoicePrefill = O.fromNullable(appStateResponse.prefill);
107
109
  this._state.isDefinedBenefitsEligible = O.fromNullable(appStateResponse.isDefinedBenefitsEligible);
108
110
  if (O.isSome(this._state.accountConfiguration)) {
@@ -150,6 +152,12 @@ export class SuperSelectionAppService {
150
152
  get isFeaturedFundsEnabled() {
151
153
  return this.state.featuredFundsEnabled;
152
154
  }
155
+ get isDefaultFundNewComponentEnabled() {
156
+ return this.state.defaultFundNewComponentEnabled;
157
+ }
158
+ get isPromotedFundNewComponentEnabled() {
159
+ return this.state.promotedFundNewComponentEnabled;
160
+ }
153
161
  get superCampaignCanNotBeActivated() {
154
162
  return (!this.state.superCampaignEnabled ||
155
163
  this.superCampaignComponentStatus === SuperCampaignComponentStatus.NotWorking);
@@ -41,5 +41,7 @@ export const initialState = {
41
41
  hideFooterSection: false,
42
42
  bringYourOwnFundCustomStepEnabled: false,
43
43
  smsfCustomStepEnabled: false,
44
- featuredFundsEnabled: false
44
+ featuredFundsEnabled: false,
45
+ defaultFundNewComponentEnabled: false,
46
+ promotedFundNewComponentEnabled: false
45
47
  };
@@ -16,5 +16,5 @@ const patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(options => {
18
18
  globalScripts();
19
- return bootstrapLazy([["sss-super-byof-host",[[0,"sss-super-byof-host",{"history":[16],"backendUrl":[32],"accessToken":[32]}]]],["context-consumer",[[0,"context-consumer",{"context":[16],"renderer":[16],"subscribe":[16],"unsubscribe":[32]}]]],["stencil-async-content",[[0,"stencil-async-content",{"documentLocation":[1,"document-location"],"content":[32]}]]],["stencil-route-title",[[0,"stencil-route-title",{"titleSuffix":[1,"title-suffix"],"pageTitle":[1,"page-title"]}]]],["stencil-router-prompt",[[0,"stencil-router-prompt",{"when":[4],"message":[1],"history":[16],"unblock":[32]}]]],["stencil-router-redirect",[[0,"stencil-router-redirect",{"history":[16],"root":[1],"url":[1]}]]],["sss-button_32",[[0,"sss-prefill",{"history":[16],"prefill":[32]}],[1,"super-selection-app-host",{"sessionState":[32],"jwt":[32],"appConfiguration":[32],"ignoreExistingSelection":[32]}],[0,"sss-default-fund",{"history":[16],"defaultFundProductName":[32]}],[0,"sss-super-campaign-featured-funds",{"history":[16],"backendUrl":[32],"accessToken":[32],"currentView":[32]}],[0,"sss-super-smsf-host",{"history":[16],"backendUrl":[32],"accessToken":[32]}],[0,"sss-existing-choice-page",{"history":[16],"existingFund":[32]}],[0,"sss-standard-choice-form",{"history":[16],"standardChoiceFormSignature":[32],"formState":[32],"isSubmitDisabled":[32]}],[0,"sss-success"],[0,"sss-choice-router",{"history":[16]}],[0,"sss-my-own-fund-engagement-step-host",{"history":[16],"backendUrl":[32],"accessToken":[32],"fundUsi":[32],"fundName":[32],"memberNumber":[32],"memberFirstName":[32],"memberFamilyName":[32]}],[0,"sss-smsf-engagement-step-host",{"history":[16],"backendUrl":[32],"accessToken":[32],"fundName":[32],"fundAbn":[32],"fundEsa":[32],"fundAddress":[32],"bsb":[32],"bankAccountName":[32],"bankAccountNumber":[32],"memberFirstName":[32],"memberFamilyName":[32],"accountId":[32],"partnerId":[32]}],[0,"sss-super-campaign-host",{"history":[16],"scriptImported":[32],"backendUrl":[32],"accessToken":[32]}],[0,"sss-dropdown-async",{"testId":[1,"test-id"],"placeholder":[1],"searchFunction":[16],"value":[16],"required":[4],"requiredValidationMessage":[1,"required-validation-message"],"disabled":[4],"minSearchStringLength":[2,"min-search-string-length"],"showValidationErrors":[4,"show-validation-errors"],"searchState":[32],"inputValue":[32],"isDropdownVisible":[32],"filteredOptions":[32],"highlightedOptionIndex":[32],"selectedOption":[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]],[0,"sss-name-input",{"testId":[1,"test-id"],"value":[1],"name":[1],"readableName":[1,"readable-name"],"showValidationErrors":[4,"show-validation-errors"],"errorMessage":[32]}],[0,"sss-prefill-my-own-fund",{"history":[16],"prefill":[16],"mode":[32],"formState":[32],"isSubmitDisabled":[32],"fundUsi":[32],"fundName":[32],"memberNumber":[32],"memberGivenNames":[32],"memberLastName":[32]}],[0,"sss-prefill-smsf",{"history":[16],"prefill":[16],"mode":[32],"formState":[32],"isSubmitDisabled":[32],"fundName":[32],"fundAbn":[32],"fundEsa":[32],"fundAddressLine1":[32],"fundAddressLine2":[32],"fundAddressCity":[32],"fundAddressPostcode":[32],"fundAddressState":[32],"fundAddress":[32],"memberGivenNames":[32],"memberLastName":[32],"bankAccountName":[32],"bankName":[32],"bankAccountBsb":[32],"bankAccountNumber":[32]}],[0,"sss-prefill-invalid-my-own-fund",{"history":[16],"prefill":[16],"fundUsi":[32],"fundName":[32],"memberNumber":[32],"memberGivenNames":[32],"memberLastName":[32]}],[0,"sss-prefill-invalid-smsf",{"history":[16],"prefill":[16],"fundName":[32],"fundAbn":[32],"fundEsa":[32],"fundAddressLine1":[32],"fundAddressLine2":[32],"fundAddressCity":[32],"fundAddressPostcode":[32],"fundAddressState":[32],"fundAddress":[32],"memberGivenNames":[32],"memberLastName":[32],"bankAccountName":[32],"bankAccountBsb":[32],"bankAccountNumber":[32]}],[1,"super-selection-app",{"ignoreExistingSelection":[4,"ignore-existing-selection"],"accessToken":[1,"access-token"],"backendUrl":[1,"backend-url"],"appBaseUrl":[1,"app-base-url"],"history":[16],"location":[16],"isSelfHosted":[4,"is-self-hosted"],"isAppInitialised":[32]}],[0,"sss-loading-page"],[0,"sss-footer-section",{"textOverride":[1,"text-override"]}],[4,"stencil-route-switch",{"group":[513],"scrollTopOffset":[2,"scroll-top-offset"],"location":[16],"routeViewsUpdated":[16]}],[4,"stencil-router",{"root":[1],"historyType":[1,"history-type"],"titleSuffix":[1,"title-suffix"],"scrollTopOffset":[2,"scroll-top-offset"],"location":[32],"history":[32]}],[0,"sss-prefill-warning-box",{"notificationList":[16]}],[0,"sss-header-section"],[4,"sss-custom-fund",{"history":[16],"currentCustomFund":[32],"fundOptionsList":[32],"showFundOptionsSelection":[32]}],[0,"sss-prefill-display-field",{"field":[16]}],[0,"sss-prefill-error-box",{"withHeader":[4,"with-header"],"notificationList":[16]}],[4,"stencil-route-link",{"url":[1],"urlMatch":[1,"url-match"],"activeClass":[1,"active-class"],"exact":[4],"strict":[4],"custom":[1],"anchorClass":[1,"anchor-class"],"anchorRole":[1,"anchor-role"],"anchorTitle":[1,"anchor-title"],"anchorTabIndex":[1,"anchor-tab-index"],"anchorId":[1,"anchor-id"],"history":[16],"location":[16],"root":[1],"ariaHaspopup":[1,"aria-haspopup"],"ariaPosinset":[1,"aria-posinset"],"ariaSetsize":[2,"aria-setsize"],"ariaLabel":[1,"aria-label"],"match":[32]}],[4,"sss-button",{"testid":[1],"fillWidth":[4,"fill-width"],"fillWidthOnMobile":[4,"fill-width-on-mobile"],"disabled":[4],"variant":[1],"size":[1],"promiseFn":[16],"state":[32]}],[0,"sss-loading-indicator",{"theme":[1],"size":[2]}],[0,"stencil-route",{"group":[513],"componentUpdated":[16],"match":[1040],"url":[1],"component":[1],"componentProps":[16],"exact":[4],"routeRender":[16],"scrollTopOffset":[2,"scroll-top-offset"],"routeViewsUpdated":[16],"location":[16],"history":[16],"historyType":[1,"history-type"]}]]]], options);
19
+ return bootstrapLazy([["sss-default-fund-router",[[0,"sss-default-fund-router",{"history":[16]}]]],["sss-super-byof-host",[[0,"sss-super-byof-host",{"history":[16],"backendUrl":[32],"accessToken":[32]}]]],["sss-promoted-fund-router",[[0,"sss-promoted-fund-router",{"history":[16]}]]],["context-consumer",[[0,"context-consumer",{"context":[16],"renderer":[16],"subscribe":[16],"unsubscribe":[32]}]]],["stencil-async-content",[[0,"stencil-async-content",{"documentLocation":[1,"document-location"],"content":[32]}]]],["stencil-route-title",[[0,"stencil-route-title",{"titleSuffix":[1,"title-suffix"],"pageTitle":[1,"page-title"]}]]],["stencil-router-prompt",[[0,"stencil-router-prompt",{"when":[4],"message":[1],"history":[16],"unblock":[32]}]]],["stencil-router-redirect",[[0,"stencil-router-redirect",{"history":[16],"root":[1],"url":[1]}]]],["sss-button_33",[[0,"sss-prefill",{"history":[16],"prefill":[32]}],[1,"super-selection-app-host",{"sessionState":[32],"jwt":[32],"appConfiguration":[32],"ignoreExistingSelection":[32]}],[0,"sss-super-campaign-featured-funds",{"history":[16],"backendUrl":[32],"accessToken":[32],"currentView":[32]}],[0,"sss-super-smsf-host",{"history":[16],"backendUrl":[32],"accessToken":[32]}],[0,"sss-existing-choice-page",{"history":[16],"existingFund":[32]}],[0,"sss-standard-choice-form",{"history":[16],"standardChoiceFormSignature":[32],"formState":[32],"isSubmitDisabled":[32]}],[0,"sss-success"],[0,"sss-choice-router",{"history":[16]}],[0,"sss-my-own-fund-engagement-step-host",{"history":[16],"backendUrl":[32],"accessToken":[32],"fundUsi":[32],"fundName":[32],"memberNumber":[32],"memberFirstName":[32],"memberFamilyName":[32]}],[0,"sss-smsf-engagement-step-host",{"history":[16],"backendUrl":[32],"accessToken":[32],"fundName":[32],"fundAbn":[32],"fundEsa":[32],"fundAddress":[32],"bsb":[32],"bankAccountName":[32],"bankAccountNumber":[32],"memberFirstName":[32],"memberFamilyName":[32],"accountId":[32],"partnerId":[32]}],[0,"sss-dropdown-async",{"testId":[1,"test-id"],"placeholder":[1],"searchFunction":[16],"value":[16],"required":[4],"requiredValidationMessage":[1,"required-validation-message"],"disabled":[4],"minSearchStringLength":[2,"min-search-string-length"],"showValidationErrors":[4,"show-validation-errors"],"searchState":[32],"inputValue":[32],"isDropdownVisible":[32],"filteredOptions":[32],"highlightedOptionIndex":[32],"selectedOption":[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]],[0,"sss-name-input",{"testId":[1,"test-id"],"value":[1],"name":[1],"readableName":[1,"readable-name"],"showValidationErrors":[4,"show-validation-errors"],"errorMessage":[32]}],[0,"sss-prefill-my-own-fund",{"history":[16],"prefill":[16],"mode":[32],"formState":[32],"isSubmitDisabled":[32],"fundUsi":[32],"fundName":[32],"memberNumber":[32],"memberGivenNames":[32],"memberLastName":[32]}],[0,"sss-prefill-smsf",{"history":[16],"prefill":[16],"mode":[32],"formState":[32],"isSubmitDisabled":[32],"fundName":[32],"fundAbn":[32],"fundEsa":[32],"fundAddressLine1":[32],"fundAddressLine2":[32],"fundAddressCity":[32],"fundAddressPostcode":[32],"fundAddressState":[32],"fundAddress":[32],"memberGivenNames":[32],"memberLastName":[32],"bankAccountName":[32],"bankName":[32],"bankAccountBsb":[32],"bankAccountNumber":[32]}],[0,"sss-prefill-invalid-my-own-fund",{"history":[16],"prefill":[16],"fundUsi":[32],"fundName":[32],"memberNumber":[32],"memberGivenNames":[32],"memberLastName":[32]}],[0,"sss-prefill-invalid-smsf",{"history":[16],"prefill":[16],"fundName":[32],"fundAbn":[32],"fundEsa":[32],"fundAddressLine1":[32],"fundAddressLine2":[32],"fundAddressCity":[32],"fundAddressPostcode":[32],"fundAddressState":[32],"fundAddress":[32],"memberGivenNames":[32],"memberLastName":[32],"bankAccountName":[32],"bankAccountBsb":[32],"bankAccountNumber":[32]}],[1,"super-selection-app",{"ignoreExistingSelection":[4,"ignore-existing-selection"],"accessToken":[1,"access-token"],"backendUrl":[1,"backend-url"],"appBaseUrl":[1,"app-base-url"],"history":[16],"location":[16],"isSelfHosted":[4,"is-self-hosted"],"isAppInitialised":[32]}],[0,"sss-default-fund-host",{"history":[16],"backendUrl":[32],"accessToken":[32]}],[0,"sss-loading-page"],[0,"sss-promoted-fund-host",{"history":[16],"backendUrl":[32],"accessToken":[32]}],[0,"sss-super-campaign-host",{"history":[16],"scriptImported":[32],"backendUrl":[32],"accessToken":[32]}],[0,"sss-footer-section",{"textOverride":[1,"text-override"]}],[4,"stencil-route-switch",{"group":[513],"scrollTopOffset":[2,"scroll-top-offset"],"location":[16],"routeViewsUpdated":[16]}],[4,"stencil-router",{"root":[1],"historyType":[1,"history-type"],"titleSuffix":[1,"title-suffix"],"scrollTopOffset":[2,"scroll-top-offset"],"location":[32],"history":[32]}],[0,"sss-prefill-warning-box",{"notificationList":[16]}],[0,"sss-prefill-display-field",{"field":[16]}],[0,"sss-prefill-error-box",{"withHeader":[4,"with-header"],"notificationList":[16]}],[0,"sss-header-section"],[4,"sss-custom-fund",{"history":[16],"currentCustomFund":[32],"fundOptionsList":[32],"showFundOptionsSelection":[32]}],[4,"stencil-route-link",{"url":[1],"urlMatch":[1,"url-match"],"activeClass":[1,"active-class"],"exact":[4],"strict":[4],"custom":[1],"anchorClass":[1,"anchor-class"],"anchorRole":[1,"anchor-role"],"anchorTitle":[1,"anchor-title"],"anchorTabIndex":[1,"anchor-tab-index"],"anchorId":[1,"anchor-id"],"history":[16],"location":[16],"root":[1],"ariaHaspopup":[1,"aria-haspopup"],"ariaPosinset":[1,"aria-posinset"],"ariaSetsize":[2,"aria-setsize"],"ariaLabel":[1,"aria-label"],"match":[32]}],[4,"sss-button",{"testid":[1],"fillWidth":[4,"fill-width"],"fillWidthOnMobile":[4,"fill-width-on-mobile"],"disabled":[4],"variant":[1],"size":[1],"promiseFn":[16],"state":[32]}],[0,"sss-loading-indicator",{"theme":[1],"size":[2]}],[0,"stencil-route",{"group":[513],"componentUpdated":[16],"match":[1040],"url":[1],"component":[1],"componentProps":[16],"exact":[4],"routeRender":[16],"scrollTopOffset":[2,"scroll-top-offset"],"routeViewsUpdated":[16],"location":[16],"history":[16],"historyType":[1,"history-type"]}]]],["sss-default-fund",[[0,"sss-default-fund",{"history":[16],"defaultFundProductName":[32]}]]]], options);
20
20
  });
@@ -0,0 +1,17 @@
1
+ import { f as superSelectionApi, O as Option } from './super-selection-app.service-312ba6b0.js';
2
+
3
+ class AustralianFundLookupService {
4
+ async searchFundsAsync(searchString, maxRecordCount) {
5
+ return superSelectionApi.getAustralianFundsAsync({
6
+ searchString,
7
+ maxRecordCount
8
+ });
9
+ }
10
+ async getFundAsync(usi, includeInactive) {
11
+ const result = await superSelectionApi.getAustralianFundAsync(usi, includeInactive);
12
+ return Option.some(result);
13
+ }
14
+ }
15
+ const australianFundLookupService = new AustralianFundLookupService();
16
+
17
+ export { australianFundLookupService as a };
@@ -0,0 +1,36 @@
1
+ import { l as createStore, n as none } from './super-selection-app.service-312ba6b0.js';
2
+
3
+ var CustomFundTypes;
4
+ (function (CustomFundTypes) {
5
+ CustomFundTypes["MyOwnFund"] = "Existing super fund";
6
+ CustomFundTypes["DefaultFund"] = "Default super fund";
7
+ CustomFundTypes["SelfManagedFund"] = "Self-managed super fund";
8
+ CustomFundTypes["FeaturedFunds"] = "Featured super funds";
9
+ })(CustomFundTypes || (CustomFundTypes = {}));
10
+ const initialStateCustomFund = {
11
+ myOwnFundForm: {
12
+ fundUsi: none,
13
+ fundName: none,
14
+ memberNumber: none,
15
+ memberFirstName: none,
16
+ memberFamilyName: none
17
+ },
18
+ selfManagedFundForm: {
19
+ fundName: '',
20
+ fundAbn: '',
21
+ fundEsa: '',
22
+ addressLine1: '',
23
+ addressLine2: '',
24
+ state: '',
25
+ postcode: '',
26
+ city: '',
27
+ bankAccountName: '',
28
+ bsb: '',
29
+ bankAccountNumber: '',
30
+ memberFirstName: '',
31
+ memberFamilyName: ''
32
+ }
33
+ };
34
+ const { state, reset } = createStore(initialStateCustomFund);
35
+
36
+ export { CustomFundTypes as C, state as s };