@flarehr/apollo-super-selection 1.2.32739 → 1.3.36

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 (191) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.css +1 -1
  2. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  3. package/dist/lib/apollo-super-selection/p-065c0e01.system.entry.js +69 -0
  4. package/dist/lib/apollo-super-selection/p-42cd55d4.entry.js +14 -0
  5. package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
  6. package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
  7. package/dist/lib/cjs/loader.cjs.js +1 -1
  8. package/dist/lib/cjs/{sss-button_30.cjs.entry.js → sss-button_34.cjs.entry.js} +6510 -5652
  9. package/dist/lib/collection/apollo-super-selection.css +1 -1
  10. package/dist/lib/collection/collection-manifest.json +25 -17
  11. package/dist/lib/collection/components/app-host/services/appinsights.service.js +3 -0
  12. package/dist/lib/collection/components/app-host/super-selection-app-host.css +6 -6
  13. package/dist/lib/collection/components/super-campaign/fund-tile-clicked.handler.js +49 -0
  14. package/dist/lib/collection/components/super-campaign/promoted-fund-joined.handler.js +121 -0
  15. package/dist/lib/collection/components/super-campaign/super-campaign-types.js +6 -0
  16. package/dist/lib/collection/components/super-campaign/super-campaign.js +213 -0
  17. package/dist/lib/collection/components/super-selection-app/api/super-campaign-errors-api.js +9 -0
  18. package/dist/lib/collection/components/super-selection-app/api/super-campaign-errors.api.dtos.js +1 -0
  19. package/dist/lib/collection/components/super-selection-app/api/super-selection-events.model.js +16 -1
  20. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +71 -22
  21. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +5 -9
  22. package/dist/lib/collection/components/super-selection-app/app-state-pages/success.js +11 -1
  23. package/dist/lib/collection/components/super-selection-app/choice/choice-router.js +42 -0
  24. package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +26 -15
  25. package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +15 -15
  26. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.js +9 -0
  27. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.js +30 -7
  28. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js +6 -23
  29. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund.js +8 -3
  30. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.js +113 -0
  31. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.types.js +1 -0
  32. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/member-name-input.js +19 -5
  33. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step-types.js +1 -0
  34. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.js +115 -0
  35. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.js +4 -4
  36. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +16 -4
  37. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +32 -17
  38. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +8 -3
  39. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.js +9 -0
  40. package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate.js +4 -0
  41. package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +8 -38
  42. package/dist/lib/collection/components/super-selection-app/misc/button.js +20 -2
  43. package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.js +18 -1
  44. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-common.js +22 -0
  45. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-display-field.js +42 -0
  46. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-error-box.js +66 -0
  47. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.js +121 -0
  48. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-smsf.js +145 -0
  49. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +223 -0
  50. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +398 -0
  51. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-types.js +288 -0
  52. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-warning-box.js +37 -0
  53. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +81 -0
  54. package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +30 -25
  55. package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +29 -7
  56. package/dist/lib/collection/components/super-selection-app/services/navigation.service.js +1 -0
  57. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +17 -9
  58. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +69 -20
  59. package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +31 -3
  60. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +75 -12
  61. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.store.js +1 -0
  62. package/dist/lib/collection/components/super-selection-app/super-selection-app.js +14 -20
  63. package/dist/lib/esm/apollo-super-selection.js +1 -1
  64. package/dist/lib/esm/loader.js +1 -1
  65. package/dist/lib/esm/{sss-button_30.entry.js → sss-button_34.entry.js} +7864 -7030
  66. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  67. package/dist/lib/esm-es5/loader.js +1 -1
  68. package/dist/lib/esm-es5/sss-button_34.entry.js +69 -0
  69. package/dist/lib/types/components/app-host/services/appinsights.service.d.ts +1 -0
  70. package/dist/lib/types/components/super-campaign/fund-tile-clicked.handler.d.ts +12 -0
  71. package/dist/lib/types/components/super-campaign/promoted-fund-joined.handler.d.ts +15 -0
  72. package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +98 -0
  73. package/dist/lib/types/components/super-campaign/super-campaign.d.ts +28 -0
  74. package/dist/lib/types/components/super-selection-app/api/super-campaign-errors-api.d.ts +6 -0
  75. package/dist/lib/types/components/super-selection-app/api/super-campaign-errors.api.dtos.d.ts +7 -0
  76. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +83 -32
  77. package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +2 -2
  78. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +88 -8
  79. package/dist/lib/types/components/super-selection-app/app-state-pages/success.d.ts +3 -0
  80. 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
  81. package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +1 -2
  82. package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.d.ts +2 -1
  83. package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.dto.d.ts +16 -12
  84. package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +6 -9
  85. package/dist/lib/types/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.d.ts +18 -0
  86. package/dist/lib/types/components/super-selection-app/funds/custom-fund/featured-funds/super-campaign-featured-funds.types.d.ts +26 -0
  87. package/dist/lib/types/components/super-selection-app/funds/custom-fund/member-name-input.d.ts +1 -0
  88. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step-types.d.ts +15 -0
  89. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.d.ts +20 -0
  90. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +1 -2
  91. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.d.ts +2 -1
  92. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.dto.d.ts +16 -15
  93. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate-choice.api.dto.d.ts +3 -5
  94. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate.d.ts +4 -0
  95. package/dist/lib/types/components/super-selection-app/header-section/header-section.d.ts +0 -1
  96. package/dist/lib/types/components/super-selection-app/misc/button.d.ts +2 -1
  97. package/dist/lib/types/components/super-selection-app/misc/dropdown-async.d.ts +1 -0
  98. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-common.d.ts +9 -0
  99. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-display-field.d.ts +5 -0
  100. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-error-box.d.ts +5 -0
  101. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.d.ts +18 -0
  102. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-smsf.d.ts +28 -0
  103. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-my-own-fund.d.ts +30 -0
  104. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-smsf.d.ts +52 -0
  105. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-types.d.ts +95 -0
  106. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-warning-box.d.ts +4 -0
  107. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill.d.ts +14 -0
  108. package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +6 -5
  109. package/dist/lib/types/components/super-selection-app/services/existing-super-choice-info.service.d.ts +17 -1
  110. package/dist/lib/types/components/super-selection-app/services/navigation.service.d.ts +2 -0
  111. package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +8 -4
  112. package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +18 -9
  113. package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +22 -4
  114. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +5 -0
  115. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.store.d.ts +34 -0
  116. package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +0 -2
  117. package/dist/lib/types/components.d.ts +172 -115
  118. package/package.json +3 -3
  119. package/dist/lib/apollo-super-selection/assets/icon-check.svg +0 -3
  120. package/dist/lib/apollo-super-selection/assets/logo-active.svg +0 -1
  121. package/dist/lib/apollo-super-selection/assets/logo-art.svg +0 -7
  122. package/dist/lib/apollo-super-selection/assets/logo-aus-eth.svg +0 -31
  123. package/dist/lib/apollo-super-selection/assets/logo-aware.svg +0 -1
  124. package/dist/lib/apollo-super-selection/assets/logo-first.svg +0 -15
  125. package/dist/lib/apollo-super-selection/assets/logo-hesta.svg +0 -5
  126. package/dist/lib/apollo-super-selection/assets/logo-mercer-mychoice.svg +0 -1
  127. package/dist/lib/apollo-super-selection/assets/logo-slate.png +0 -0
  128. package/dist/lib/apollo-super-selection/assets/logo-spirit.svg +0 -141
  129. package/dist/lib/apollo-super-selection/assets/logo-virgin.svg +0 -8
  130. package/dist/lib/apollo-super-selection/p-74878c94.entry.js +0 -14
  131. package/dist/lib/apollo-super-selection/p-823c6c2c.system.entry.js +0 -69
  132. package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +0 -3
  133. package/dist/lib/collection/components/super-selection-app/consent/consent.js +0 -54
  134. package/dist/lib/collection/components/super-selection-app/funds/constants.js +0 -33
  135. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/active.js +0 -26
  136. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.js +0 -43
  137. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.js +0 -32
  138. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/aware.js +0 -27
  139. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/first.js +0 -27
  140. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/hesta-default.js +0 -41
  141. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.js +0 -32
  142. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/slate.js +0 -32
  143. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/spirit.js +0 -43
  144. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/virgin.js +0 -36
  145. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.js +0 -30
  146. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.js +0 -30
  147. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +0 -8
  148. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.js +0 -115
  149. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.js +0 -131
  150. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/types.js +0 -14
  151. package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +0 -136
  152. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +0 -30
  153. package/dist/lib/collection/components/super-selection-app/misc/iframe-host.js +0 -32
  154. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-active.svg +0 -1
  155. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-art.svg +0 -7
  156. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aus-eth.svg +0 -31
  157. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aware.svg +0 -1
  158. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-first.svg +0 -15
  159. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-hesta.svg +0 -5
  160. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-mercer-mychoice.svg +0 -1
  161. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-slate.png +0 -0
  162. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-spirit.svg +0 -141
  163. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-virgin.svg +0 -8
  164. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +0 -112
  165. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +0 -136
  166. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +0 -181
  167. package/dist/lib/esm-es5/sss-button_30.entry.js +0 -69
  168. package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +0 -8
  169. package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +0 -8
  170. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/active.d.ts +0 -3
  171. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.d.ts +0 -3
  172. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.d.ts +0 -3
  173. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/aware.d.ts +0 -3
  174. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/first.d.ts +0 -3
  175. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/hesta-default.d.ts +0 -3
  176. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.d.ts +0 -3
  177. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/slate.d.ts +0 -4
  178. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/spirit.d.ts +0 -3
  179. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/virgin.d.ts +0 -3
  180. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.d.ts +0 -5
  181. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -8
  182. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.d.ts +0 -10
  183. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.d.ts +0 -9
  184. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/types.d.ts +0 -24
  185. package/dist/lib/types/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.d.ts +0 -14
  186. package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-join-page.d.ts +0 -5
  187. package/dist/lib/types/components/super-selection-app/misc/iframe-host.d.ts +0 -6
  188. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +0 -10
  189. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +0 -10
  190. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -11
  191. package/readme.md +0 -41
@@ -0,0 +1,113 @@
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 { fundTileClicked } from '../../../../super-campaign/fund-tile-clicked.handler';
5
+ import { PromotedFundJoinedEventHandler } from '../../../../super-campaign/promoted-fund-joined.handler';
6
+ import navigationService from '../../../services/navigation.service';
7
+ import { SuperSelectionAppRoutes } from '../../../services/super-selection-app.routes';
8
+ import superSelectionAppService from '../../../services/super-selection-app.service';
9
+ export class FeaturedFunds {
10
+ constructor() {
11
+ this.currentView = 'featured-funds';
12
+ this.subscribeToEvents = () => {
13
+ for (const eventName in this.eventHandlers) {
14
+ document.addEventListener(eventName, this.eventHandlers[eventName]);
15
+ }
16
+ };
17
+ this.unsubscribeFromEvents = () => {
18
+ for (const eventName in this.eventHandlers) {
19
+ document.removeEventListener(eventName, this.eventHandlers[eventName]);
20
+ }
21
+ };
22
+ this.backClicked = () => {
23
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
24
+ return Promise.resolve();
25
+ };
26
+ this.cancelClicked = () => {
27
+ this.currentView = 'featured-funds';
28
+ return Promise.resolve();
29
+ };
30
+ this.continueClicked = async (event) => {
31
+ this.currentView = 'fund-join';
32
+ await fundTileClicked({
33
+ sender: event.detail.sender,
34
+ placementId: 'byof',
35
+ fundId: event.detail.fundId,
36
+ fundUsi: event.detail.fundUsi,
37
+ fundName: event.detail.fundName,
38
+ fundType: event.detail.fundType
39
+ });
40
+ };
41
+ this.fundPanelShown = async (event) => {
42
+ if (event.detail.sender === 'featured-funds') {
43
+ const fundIdList = event.detail.shownFunds.map((f) => f.fundId);
44
+ await superSelectionAppService.viewSuperFundPanelAsync('byof', fundIdList);
45
+ }
46
+ };
47
+ this.eventHandlers = {
48
+ 'back-clicked': this.backClicked.bind(this),
49
+ 'continue-clicked': this.continueClicked.bind(this),
50
+ 'cancel-clicked': this.cancelClicked.bind(this),
51
+ 'featured-fund-panel-shown': this.fundPanelShown.bind(this),
52
+ 'promoted-fund-joined': new PromotedFundJoinedEventHandler('byof', this.history).handle
53
+ };
54
+ }
55
+ componentWillLoad() {
56
+ if (superSelectionAppService.isFeaturedFundsEnabled &&
57
+ superSelectionAppService.isUsingSuperCampaign &&
58
+ O.isSome(superSelectionAppService.backendUrl) &&
59
+ O.isSome(superSelectionAppService.state.jwt)) {
60
+ this.backendUrl = superSelectionAppService.backendUrl.value;
61
+ this.accessToken = superSelectionAppService.state.jwt.value;
62
+ this.unsubscribeFromEvents();
63
+ this.subscribeToEvents();
64
+ superSelectionAppService.hideFooterSection = true;
65
+ }
66
+ else {
67
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
68
+ }
69
+ }
70
+ disconnectedCallback() {
71
+ this.unsubscribeFromEvents();
72
+ superSelectionAppService.hideFooterSection = false;
73
+ }
74
+ render() {
75
+ return (h(Host, null,
76
+ this.currentView === 'featured-funds' && h("sss-header-section", null),
77
+ h("div", { class: {
78
+ 'flex flex-col w-full justify-center items-center mt-11 mx-auto': this.currentView === 'featured-funds',
79
+ '-mt-20': this.currentView === 'fund-join'
80
+ } },
81
+ this.currentView === 'featured-funds' && h("sss-custom-fund", null),
82
+ h("apollo-super-campaign-featured-funds", { "backend-url": this.backendUrl, "access-token": this.accessToken }))));
83
+ }
84
+ static get is() { return "sss-super-campaign-featured-funds"; }
85
+ static get properties() { return {
86
+ "history": {
87
+ "type": "unknown",
88
+ "mutable": false,
89
+ "complexType": {
90
+ "original": "RouterHistory",
91
+ "resolved": "RouterHistory",
92
+ "references": {
93
+ "RouterHistory": {
94
+ "location": "import",
95
+ "path": "@stencil/router"
96
+ }
97
+ }
98
+ },
99
+ "required": false,
100
+ "optional": false,
101
+ "docs": {
102
+ "tags": [],
103
+ "text": ""
104
+ }
105
+ }
106
+ }; }
107
+ static get states() { return {
108
+ "backendUrl": {},
109
+ "accessToken": {},
110
+ "currentView": {}
111
+ }; }
112
+ }
113
+ injectHistory(FeaturedFunds);
@@ -7,11 +7,11 @@ export class MemberNameInput {
7
7
  this.showValidationErrors = false;
8
8
  this.errorMessage = '';
9
9
  // Pattern for name validation
10
- this.NAME_PATTERN = "[A-Za-z][A-Za-z']+(( |-)[A-Za-z][A-Za-z']+)*\\s*$";
10
+ this.NAME_PATTERN = "^[A-Za-z](?:[A-Za-z]||'[A-Za-z]||-[A-Za-z]|| [A-Za-z])*\\s*$";
11
11
  }
12
12
  render() {
13
13
  return (h(Host, null,
14
- h("input", { type: "text", class: {
14
+ h("input", { "data-testid": this.testId, type: "text", class: {
15
15
  'shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md': true,
16
16
  'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
17
17
  .showValidationErrors
@@ -29,9 +29,6 @@ export class MemberNameInput {
29
29
  if (target.validity.valueMissing) {
30
30
  this.errorMessage = `${this.readableName} is required.`;
31
31
  }
32
- else if (target.value.length < 2) {
33
- this.errorMessage = 'A minimum of 2 characters is required.';
34
- }
35
32
  else if (target.validity.patternMismatch) {
36
33
  if (target.value.startsWith('-') || target.value.startsWith("'")) {
37
34
  this.errorMessage = `${this.readableName} must start with a letter.`;
@@ -53,6 +50,23 @@ export class MemberNameInput {
53
50
  }
54
51
  static get is() { return "sss-name-input"; }
55
52
  static get properties() { return {
53
+ "testId": {
54
+ "type": "string",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "string",
58
+ "resolved": "string",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": false,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": ""
66
+ },
67
+ "attribute": "test-id",
68
+ "reflect": false
69
+ },
56
70
  "value": {
57
71
  "type": "string",
58
72
  "mutable": false,
@@ -0,0 +1,115 @@
1
+ import { Component, h, Host, Prop, State } from '@stencil/core';
2
+ import { injectHistory } from '@stencil/router';
3
+ import { isSome } from 'fp-ts/lib/Option';
4
+ import { EventTrackingService } from '../../../services/event-tracking.service';
5
+ import navigationService from '../../../services/navigation.service';
6
+ import { SuperSelectionAppRoutes } from '../../../services/super-selection-app.routes';
7
+ import superSelectionAppService from '../../../services/super-selection-app.service';
8
+ import customFundChoiceApi from '../api/custom-fund-choice.api';
9
+ import customFundState from '../custom-fund.store';
10
+ export class MyOwnFundEngagementStep {
11
+ constructor() {
12
+ this.stepContinued = async (event) => {
13
+ if (event.detail.sender == 'byof-engagement') {
14
+ await EventTrackingService.Instance.TrackSuperMyOwnFundEngagementStepContinued(this.fundUsi, event.detail.reason);
15
+ this.navigateToStandardChoice();
16
+ }
17
+ };
18
+ this.subscribeToStepEvents = () => {
19
+ for (const eventName in this.stepEventHandlers) {
20
+ document.addEventListener(eventName, this.stepEventHandlers[eventName]);
21
+ }
22
+ };
23
+ this.unSubscribeFromStepEvents = () => {
24
+ for (const eventName in this.stepEventHandlers) {
25
+ document.removeEventListener(eventName, this.stepEventHandlers[eventName]);
26
+ }
27
+ };
28
+ this.stepEventHandlers = {
29
+ continue: this.stepContinued.bind(this)
30
+ };
31
+ }
32
+ async componentWillLoad() {
33
+ if (superSelectionAppService.isBringYourOwnFundCustomStepEnabled &&
34
+ superSelectionAppService.isUsingSuperCampaign &&
35
+ isSome(customFundState.myOwnFundForm.fundUsi) &&
36
+ isSome(customFundState.myOwnFundForm.fundName) &&
37
+ isSome(customFundState.myOwnFundForm.memberNumber) &&
38
+ isSome(customFundState.myOwnFundForm.memberFirstName) &&
39
+ isSome(customFundState.myOwnFundForm.memberFamilyName) &&
40
+ isSome(superSelectionAppService.backendUrl) &&
41
+ isSome(superSelectionAppService.state.jwt)) {
42
+ this.backendUrl = superSelectionAppService.backendUrl.value;
43
+ this.accessToken = superSelectionAppService.state.jwt.value;
44
+ this.fundUsi = customFundState.myOwnFundForm.fundUsi.value;
45
+ this.fundName = customFundState.myOwnFundForm.fundName.value;
46
+ this.memberNumber = customFundState.myOwnFundForm.memberNumber.value;
47
+ this.memberFirstName = customFundState.myOwnFundForm.memberFirstName.value;
48
+ this.memberFamilyName = customFundState.myOwnFundForm.memberFamilyName.value;
49
+ this.unSubscribeFromStepEvents();
50
+ this.subscribeToStepEvents();
51
+ superSelectionAppService.hideFooterSection = true;
52
+ await EventTrackingService.Instance.TrackSuperMyOwnFundEngagementStepActivationSucceeded(this.fundUsi);
53
+ }
54
+ else {
55
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
56
+ }
57
+ }
58
+ disconnectedCallback() {
59
+ this.unSubscribeFromStepEvents();
60
+ superSelectionAppService.hideFooterSection = false;
61
+ }
62
+ render() {
63
+ return (h(Host, null,
64
+ h("apollo-super-byof-engagement", { "backend-url": this.backendUrl, "access-token": this.accessToken, "fund-usi": this.fundUsi })));
65
+ }
66
+ navigateToStandardChoice() {
67
+ navigationService.navigateInternallyToStandardChoice({
68
+ history: this.history,
69
+ fundName: this.fundName,
70
+ fundDetails: {
71
+ type: 'myOwnFund',
72
+ fundName: this.fundName,
73
+ fundUsi: this.fundUsi,
74
+ memberNumber: this.memberNumber
75
+ },
76
+ handleSubmitFn: async (standardChoiceFormSignature) => {
77
+ const customFundChoiceDto = Object.assign({ fundUsi: this.fundUsi, memberNumber: this.memberNumber, memberFirstName: this.memberFirstName, memberFamilyName: this.memberFamilyName, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
78
+ await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
79
+ }
80
+ });
81
+ }
82
+ static get is() { return "sss-my-own-fund-engagement-step-host"; }
83
+ static get properties() { return {
84
+ "history": {
85
+ "type": "unknown",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "RouterHistory",
89
+ "resolved": "RouterHistory",
90
+ "references": {
91
+ "RouterHistory": {
92
+ "location": "import",
93
+ "path": "@stencil/router"
94
+ }
95
+ }
96
+ },
97
+ "required": false,
98
+ "optional": false,
99
+ "docs": {
100
+ "tags": [],
101
+ "text": ""
102
+ }
103
+ }
104
+ }; }
105
+ static get states() { return {
106
+ "backendUrl": {},
107
+ "accessToken": {},
108
+ "fundUsi": {},
109
+ "fundName": {},
110
+ "memberNumber": {},
111
+ "memberFirstName": {},
112
+ "memberFamilyName": {}
113
+ }; }
114
+ }
115
+ injectHistory(MyOwnFundEngagementStep);
@@ -35,7 +35,7 @@ export class MyOwnFundInputs {
35
35
  h("div", null,
36
36
  h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"),
37
37
  h("div", { class: "mt-1" },
38
- 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) => {
38
+ h("sss-dropdown-async", { testId: "fund-search-input", 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) => {
39
39
  this.selectedOption = ev.detail;
40
40
  this.updateFund(ev.detail);
41
41
  }, showValidationErrors: this.showValidationErrors })),
@@ -45,7 +45,7 @@ export class MyOwnFundInputs {
45
45
  h("div", { class: "mt-3" },
46
46
  h("label", { class: "text-sm font-medium text-gray-700" }, "Member number"),
47
47
  h("div", { class: "mt-1" },
48
- h("input", { type: "text", class: {
48
+ h("input", { "data-testid": "member-number-input", type: "text", class: {
49
49
  'shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md': true,
50
50
  'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
51
51
  .showValidationErrors
@@ -55,11 +55,11 @@ export class MyOwnFundInputs {
55
55
  h("div", { class: "mt-3 w-1/2" },
56
56
  h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"),
57
57
  h("div", { class: "mt-1" },
58
- h("sss-name-input", { name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: O.toUndefined(customFundState.myOwnFundForm.memberFirstName), onChange: (ev) => this.updateMemberFirstName(ev.target.value.trim()) }))),
58
+ h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: O.toUndefined(customFundState.myOwnFundForm.memberFirstName), onChange: (ev) => this.updateMemberFirstName(ev.target.value.trim()) }))),
59
59
  h("div", { class: "mt-3 w-1/2" },
60
60
  h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"),
61
61
  h("div", { class: "mt-1" },
62
- h("sss-name-input", { name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: O.toUndefined(customFundState.myOwnFundForm.memberFamilyName), onChange: (ev) => this.updateMemberFamilyName(ev.target.value.trim()) }))))));
62
+ h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: O.toUndefined(customFundState.myOwnFundForm.memberFamilyName), onChange: (ev) => this.updateMemberFamilyName(ev.target.value.trim()) }))))));
63
63
  }
64
64
  updateFund(fund) {
65
65
  this.formChanged.emit({ fundUsi: O.some(fund.value), fundName: O.some(fund.label) });
@@ -21,8 +21,9 @@ export class MyOwnFund {
21
21
  });
22
22
  }
23
23
  render() {
24
+ const superCampaignCanNotBeActivated = superSelectionAppService.superCampaignCanNotBeActivated;
24
25
  return (h(Host, null,
25
- h("sss-header-section", { currentPage: "own-fund" }),
26
+ h("sss-header-section", null),
26
27
  h("div", { class: "flex justify-center mt-11" },
27
28
  h("sss-custom-fund", null,
28
29
  h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
@@ -48,9 +49,9 @@ export class MyOwnFund {
48
49
  h("div", { class: "mb-4", onClick:
49
50
  // user clicks on disabled button (div wrapper) then validation errors will show
50
51
  () => (this.formState = 'validated') },
51
- h("sss-button", { fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")),
52
- h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
53
- h("sss-button", { fillWidth: true, variant: "secondary" }, "Back")))))))));
52
+ h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")),
53
+ !superCampaignCanNotBeActivated && (h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
54
+ h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back"))))))))));
54
55
  }
55
56
  async handleSubmitForm() {
56
57
  this.formState = 'validated';
@@ -65,9 +66,20 @@ export class MyOwnFund {
65
66
  this.isNotAllInformationProvidedMessageVisible = true;
66
67
  return;
67
68
  }
69
+ if (superSelectionAppService.isBringYourOwnFundCustomStepEnabled &&
70
+ superSelectionAppService.isUsingSuperCampaign) {
71
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFundEngagementStep);
72
+ return;
73
+ }
68
74
  navigationService.navigateInternallyToStandardChoice({
69
75
  history: this.history,
70
76
  fundName: this.getOrError(customFundState.myOwnFundForm.fundName),
77
+ fundDetails: {
78
+ type: 'myOwnFund',
79
+ fundName: this.getOrError(customFundState.myOwnFundForm.fundName),
80
+ fundUsi: this.getOrError(customFundState.myOwnFundForm.fundUsi),
81
+ memberNumber: this.getOrError(customFundState.myOwnFundForm.memberNumber)
82
+ },
71
83
  handleSubmitFn: async (standardChoiceFormSignature) => {
72
84
  const customFundChoiceDto = Object.assign({ fundUsi: this.getOrError(customFundState.myOwnFundForm.fundUsi), memberNumber: this.getOrError(customFundState.myOwnFundForm.memberNumber), memberFirstName: this.getOrError(customFundState.myOwnFundForm.memberFirstName), memberFamilyName: this.getOrError(customFundState.myOwnFundForm.memberFamilyName), standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
73
85
  await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
@@ -4,11 +4,16 @@ import customFundChoiceApi from '../api/custom-fund-choice.api';
4
4
  import customFundState from '../custom-fund.store';
5
5
  import { validateAbn } from './abn-validation';
6
6
  import bsbNumbers from './bankBsbNumbers';
7
+ var AbnValidationStatus;
8
+ (function (AbnValidationStatus) {
9
+ AbnValidationStatus[AbnValidationStatus["Invalid"] = 1] = "Invalid";
10
+ AbnValidationStatus[AbnValidationStatus["AbnIsUsedForRegulatedFund"] = 2] = "AbnIsUsedForRegulatedFund";
11
+ AbnValidationStatus[AbnValidationStatus["Valid"] = 3] = "Valid";
12
+ })(AbnValidationStatus || (AbnValidationStatus = {}));
7
13
  export class SelfManagedFundInputs {
8
14
  constructor() {
9
- this.isAbnValid = false;
15
+ this.abnValidationStatus = AbnValidationStatus.Invalid;
10
16
  this.isAbnTouched = false;
11
- this.isAbnUsedForRegulated = false;
12
17
  this.currentBank = none;
13
18
  this.addressErrorMessage = none;
14
19
  this.stateOptions = [
@@ -40,12 +45,21 @@ export class SelfManagedFundInputs {
40
45
  h("label", { class: "text-sm font-medium text-gray-700" }, "Fund ABN"),
41
46
  h("div", { class: "mt-1" },
42
47
  h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundAbn", id: "fundAbn", value: customFundState.selfManagedFundForm.fundAbn, inputmode: "numeric", pattern: "[0-9]*", onKeyUp: async (ev) => {
43
- const inputAbnValue = ev.target.value;
44
- this.updateFormField('fundAbn', inputAbnValue.trim());
45
- this.isAbnValid = validateAbn(inputAbnValue);
46
- if (this.isAbnValid)
47
- this.isAbnUsedForRegulated = await this.isAbnUsedForRegulatedAsync(inputAbnValue);
48
- this.updateFormField('isAbnValid', this.isAbnValid);
48
+ const abnInput = ev.target;
49
+ this.updateFormField('fundAbn', abnInput.value.trim());
50
+ this.abnValidationStatus = AbnValidationStatus.Invalid;
51
+ if (validateAbn(abnInput.value)) {
52
+ const isAbnUsedForRegulatedFund = await this.isAbnUsedForRegulatedAsync(abnInput.value);
53
+ this.abnValidationStatus = isAbnUsedForRegulatedFund
54
+ ? AbnValidationStatus.AbnIsUsedForRegulatedFund
55
+ : AbnValidationStatus.Valid;
56
+ }
57
+ // We need to set a custom validity message to trigger css invalid styles for non valid cases
58
+ const validityMessage = this.abnValidationStatus === AbnValidationStatus.Valid
59
+ ? ''
60
+ : 'Enter a valid fund ABN (digits only)';
61
+ abnInput.setCustomValidity(validityMessage);
62
+ this.updateFormField('isAbnValid', this.abnValidationStatus === AbnValidationStatus.Valid);
49
63
  }, onBlur: () => (this.isAbnTouched = true) }),
50
64
  this.renderAbnValidationError())),
51
65
  h("div", { class: "mt-3" },
@@ -83,11 +97,11 @@ export class SelfManagedFundInputs {
83
97
  h("div", { class: "mt-3 w-1/2" },
84
98
  h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"),
85
99
  h("div", { class: "mt-1" },
86
- h("sss-name-input", { name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: customFundState.selfManagedFundForm.memberFirstName, onChange: (ev) => this.updateFormField('memberFirstName', ev.target.value.trim()) }))),
100
+ h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: customFundState.selfManagedFundForm.memberFirstName, onChange: (ev) => this.updateFormField('memberFirstName', ev.target.value.trim()) }))),
87
101
  h("div", { class: "mt-3 w-1/2" },
88
102
  h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"),
89
103
  h("div", { class: "mt-1" },
90
- h("sss-name-input", { name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: customFundState.selfManagedFundForm.memberFamilyName, onChange: (ev) => this.updateFormField('memberFamilyName', ev.target.value.trim()) })))),
104
+ h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: customFundState.selfManagedFundForm.memberFamilyName, onChange: (ev) => this.updateFormField('memberFamilyName', ev.target.value.trim()) })))),
91
105
  h("h3", { class: "text-lg font-bold mt-6" }, "Fund bank details"),
92
106
  h("div", { class: "mt-3" },
93
107
  h("label", { class: "text-sm font-medium text-gray-700" }, "Account name"),
@@ -116,11 +130,13 @@ export class SelfManagedFundInputs {
116
130
  }
117
131
  renderAbnValidationError() {
118
132
  if (this.isAbnTouched || this.showValidationErrors) {
119
- if (!this.isAbnValid) {
120
- return h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
121
- }
122
- else if (this.isAbnUsedForRegulated) {
123
- return (h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
133
+ switch (this.abnValidationStatus) {
134
+ case AbnValidationStatus.Invalid:
135
+ return h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
136
+ case AbnValidationStatus.AbnIsUsedForRegulatedFund:
137
+ return (h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
138
+ case AbnValidationStatus.Valid:
139
+ return [];
124
140
  }
125
141
  }
126
142
  return [];
@@ -206,9 +222,8 @@ export class SelfManagedFundInputs {
206
222
  }
207
223
  }; }
208
224
  static get states() { return {
209
- "isAbnValid": {},
225
+ "abnValidationStatus": {},
210
226
  "isAbnTouched": {},
211
- "isAbnUsedForRegulated": {},
212
227
  "currentBank": {},
213
228
  "addressErrorMessage": {}
214
229
  }; }
@@ -17,6 +17,11 @@ export class SelfManagedFund {
17
17
  navigationService.navigateInternallyToStandardChoice({
18
18
  history: this.history,
19
19
  fundName: 'Self-managed super fund',
20
+ fundDetails: {
21
+ type: 'smsf',
22
+ fundName: customFundState.selfManagedFundForm.fundName,
23
+ fundEsa: customFundState.selfManagedFundForm.fundEsa
24
+ },
20
25
  handleSubmitFn: async (standardChoiceFormSignature) => {
21
26
  const requestDto = Object.assign({ smsfChoice: {
22
27
  abn: customFundState.selfManagedFundForm.fundAbn,
@@ -49,7 +54,7 @@ export class SelfManagedFund {
49
54
  }
50
55
  render() {
51
56
  return (h(Host, null,
52
- h("sss-header-section", { currentPage: "own-fund" }),
57
+ h("sss-header-section", null),
53
58
  h("div", { class: "flex justify-center mt-11" },
54
59
  h("sss-custom-fund", null,
55
60
  h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
@@ -73,9 +78,9 @@ export class SelfManagedFund {
73
78
  h("div", { class: "mb-4", onClick:
74
79
  // user clicks on disabled button (div wrapper) then validation errors will show
75
80
  () => (this.formState = 'validated') },
76
- h("sss-button", { fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")),
81
+ h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")),
77
82
  h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
78
- h("sss-button", { fillWidth: true, variant: "secondary" }, "Back")))))))));
83
+ h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back")))))))));
79
84
  }
80
85
  updateIsSubmitDisabled() {
81
86
  this.isSubmitDisabled = !this.formElement.checkValidity() || !this.isAbnValid;
@@ -18,5 +18,14 @@ export class PromotedFundChoiceApi {
18
18
  })
19
19
  .text();
20
20
  }
21
+ async submitDefaultChoiceWithJoinAsync(dto) {
22
+ return buildBackendApiClient()
23
+ .url('super-choice/promoted-fund/default-with-join')
24
+ .post(dto)
25
+ .badRequest(() => {
26
+ throw new Error('Failed to process Promoted Default Fund With Join choice request');
27
+ })
28
+ .text();
29
+ }
21
30
  }
22
31
  export default new PromotedFundChoiceApi();
@@ -0,0 +1,4 @@
1
+ export const slate = {
2
+ fundId: 'slate',
3
+ usi: '32367272075001'
4
+ };
@@ -1,48 +1,18 @@
1
- import { Component, Fragment, h, Prop } from '@stencil/core';
1
+ import { Component, Fragment, h } from '@stencil/core';
2
2
  import { SuperSelectionAppRoutes } from '../services/super-selection-app.routes';
3
- function renderChooseAnotherFundLink() {
4
- function buildRouteLink(route) {
5
- return (h("stencil-route-link", { exact: true, url: route, anchorClass: "hover:bg-primary-hover block focus:outline-none focus:ring-2 ring-offset-1 focus:ring-primary-focus focus:z-10 border border-transparent text-gray-700 text-white rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full", activeClass: "hover:bg-white block focus:outline-none focus:ring-2 ring-offset-1 focus:ring-primary-focus focus:z-10 rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full bg-white border-gray-200 text-gray-900 shadow-sm text-primary-base" }, "Choose another fund"));
6
- }
7
- if (window.location.href.includes(SuperSelectionAppRoutes.SelfManagedFund)) {
8
- return buildRouteLink(SuperSelectionAppRoutes.SelfManagedFund);
9
- }
10
- if (window.location.href.includes(SuperSelectionAppRoutes.DefaultFund)) {
11
- return buildRouteLink(SuperSelectionAppRoutes.DefaultFund);
12
- }
13
- else {
14
- return buildRouteLink(SuperSelectionAppRoutes.MyOwnFund);
15
- }
16
- }
3
+ import superSelectionAppService from '../services/super-selection-app.service';
17
4
  export class HeaderSection {
18
5
  render() {
19
6
  return (h("div", { class: "flex justify-center" },
20
7
  h("div", { class: "text-center max-w-800" },
21
8
  h("h3", { class: "font-bold mb-3 sm:mb-4 text-2xl sm:text-3xl" }, "Nominate a super fund"),
22
9
  h(Fragment, null,
23
- h("div", { class: "text-gray-600 sm:text-lg leading-7 sm:leading-8" }, "You can choose any super fund, including your current fund/SMSF, your employer\u2019s default fund, or alternatively, you can select from one of the featured\u00A0funds."),
24
- h("div", { class: "inline-flex mt-8 sm:mt-12 bg-primary-base rounded-lg p-0.5 whitespace-normal" },
25
- h("stencil-route-link", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, anchorClass: "hover:bg-primary-hover block focus:outline-none focus:ring-2 ring-offset-1 focus:ring-primary-focus relative focus:z-10 border border-transparent text-gray-700 text-white rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full", activeClass: "hover:bg-white block focus:outline-none focus:ring-2 ring-offset-1 focus:ring-primary-focus focus:z-10 rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full bg-white border-gray-200 text-gray-900 shadow-sm text-primary-base" }, "Featured super funds"),
26
- renderChooseAnotherFundLink())))));
10
+ h("div", { class: "text-gray-600 sm:text-lg leading-7 sm:leading-8" }, superSelectionAppService.superCampaignCanNotBeActivated ? (h(Fragment, null, "You can choose any super fund, including your current fund/SMSF or your employer\u2019s default fund.")) : (h(Fragment, null, "You can choose any super fund, including your current fund/SMSF, your employer\u2019s default fund, or alternatively, you can select from one of the featured\u00A0funds."))),
11
+ !superSelectionAppService.superCampaignCanNotBeActivated && (h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
12
+ h("a", { class: "inline-flex items-center mt-3 font-semibold text-primary-base" },
13
+ h("svg", { width: "16", height: "10", viewBox: "0 0 16 10", fill: "none", class: "mr-1", xmlns: "http://www.w3.org/2000/svg" },
14
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.7071 9.70711C5.31657 10.0976 4.68341 10.0976 4.29288 9.70711L0.29288 5.70711C-0.0976448 5.31658 -0.0976448 4.68342 0.29288 4.29289L4.29288 0.292893C4.68341 -0.0976315 5.31657 -0.0976315 5.7071 0.292893C6.09762 0.683417 6.09762 1.31658 5.7071 1.70711L3.4142 4L15 4C15.5523 4 16 4.44772 16 5C16 5.55228 15.5523 6 15 6L3.4142 6L5.7071 8.29289C6.09762 8.68342 6.09762 9.31658 5.7071 9.70711Z", fill: "currentColor" })),
15
+ h("span", { class: "leading-5 text-sm" }, "Back to featured funds"))))))));
27
16
  }
28
17
  static get is() { return "sss-header-section"; }
29
- static get properties() { return {
30
- "currentPage": {
31
- "type": "string",
32
- "mutable": false,
33
- "complexType": {
34
- "original": "'choice' | 'own-fund'",
35
- "resolved": "\"choice\" | \"own-fund\"",
36
- "references": {}
37
- },
38
- "required": false,
39
- "optional": false,
40
- "docs": {
41
- "tags": [],
42
- "text": ""
43
- },
44
- "attribute": "current-page",
45
- "reflect": false
46
- }
47
- }; }
48
18
  }
@@ -22,7 +22,7 @@ export class Button {
22
22
  base: 'px-4 py-2 text-base',
23
23
  xl: 'px-6 py-3 text-base'
24
24
  };
25
- return (h("button", { class: {
25
+ return (h("button", { "data-testid": this.testid, class: {
26
26
  [sizeCss[this.size]]: true,
27
27
  'inline-flex items-center justify-center border font-medium': true,
28
28
  'rounded-md shadow-sm focus:outline-none focus:ring-2': true,
@@ -30,6 +30,7 @@ export class Button {
30
30
  'disabled:pointer-events-none disabled:border-gray-300 disabled:bg-gray-100 disabled:text-gray-400': true,
31
31
  'border-transparent text-white bg-primary-base hover:bg-primary-hover': this.variant === 'primary',
32
32
  'border-gray-300 text-gray-700 bg-white hover:bg-gray-50': this.variant === 'secondary',
33
+ 'border-transparent bg-primary-light hover:bg-primary-base text-primary-dark hover:text-white': this.variant === 'light',
33
34
  'w-full': this.fillWidth || this.fillWidthOnMobile,
34
35
  'sm:w-auto': this.fillWidthOnMobile
35
36
  }, disabled: this.disabled, onClick: () => this.clicked() },
@@ -52,6 +53,23 @@ export class Button {
52
53
  }
53
54
  static get is() { return "sss-button"; }
54
55
  static get properties() { return {
56
+ "testid": {
57
+ "type": "string",
58
+ "mutable": false,
59
+ "complexType": {
60
+ "original": "string",
61
+ "resolved": "string",
62
+ "references": {}
63
+ },
64
+ "required": false,
65
+ "optional": false,
66
+ "docs": {
67
+ "tags": [],
68
+ "text": ""
69
+ },
70
+ "attribute": "testid",
71
+ "reflect": false
72
+ },
55
73
  "fillWidth": {
56
74
  "type": "boolean",
57
75
  "mutable": false,
@@ -111,7 +129,7 @@ export class Button {
111
129
  "mutable": false,
112
130
  "complexType": {
113
131
  "original": "ButtonVariant",
114
- "resolved": "\"primary\" | \"secondary\"",
132
+ "resolved": "\"light\" | \"primary\" | \"secondary\"",
115
133
  "references": {
116
134
  "ButtonVariant": {
117
135
  "location": "local"