@flarehr/apollo-super-selection 3.52.60060 → 3.55.61713

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 (203) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.css +1 -0
  2. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  3. package/dist/lib/apollo-super-selection/apollo-super-selection.js +1 -1
  4. package/dist/lib/apollo-super-selection/assets/icon-check.svg +3 -0
  5. package/dist/lib/apollo-super-selection/assets/icon-exclamation.svg +3 -0
  6. package/dist/lib/apollo-super-selection/assets/icon-information-circle.svg +3 -0
  7. package/dist/lib/apollo-super-selection/p-0d3b8084.system.entry.js +1 -0
  8. package/dist/lib/apollo-super-selection/p-0ef73515.entry.js +1 -0
  9. package/dist/lib/apollo-super-selection/p-0f723eb4.system.js +1 -0
  10. package/dist/lib/apollo-super-selection/{p-01a9f4a4.entry.js → p-12d77532.entry.js} +1 -1
  11. package/dist/lib/apollo-super-selection/p-14885f78.system.js +15 -0
  12. package/dist/lib/apollo-super-selection/{p-381262c1.system.js → p-15f0e5eb.system.js} +1 -1
  13. package/dist/lib/apollo-super-selection/p-29c11183.js +15 -0
  14. package/dist/lib/apollo-super-selection/{p-20136efe.entry.js → p-375401a0.entry.js} +1 -1
  15. package/dist/lib/apollo-super-selection/{p-285da037.system.entry.js → p-3ce021a5.system.entry.js} +1 -1
  16. package/dist/lib/apollo-super-selection/{p-61734b66.js → p-40e504c4.js} +1 -1
  17. package/dist/lib/apollo-super-selection/p-67b71067.entry.js +1 -0
  18. package/dist/lib/apollo-super-selection/{p-082669d9.js → p-683b6e23.js} +1 -1
  19. package/dist/lib/apollo-super-selection/{p-38ee2795.system.js → p-6cdec249.system.js} +1 -1
  20. package/dist/lib/apollo-super-selection/{p-cd49a6b7.system.entry.js → p-76eee25a.system.entry.js} +1 -1
  21. package/dist/lib/apollo-super-selection/p-86e3e03f.js +1 -0
  22. package/dist/lib/apollo-super-selection/{p-8cbfc343.system.entry.js → p-918a740c.system.entry.js} +1 -1
  23. package/dist/lib/apollo-super-selection/p-93f7a547.entry.js +14 -0
  24. package/dist/lib/apollo-super-selection/p-c249f6ed.system.js +1 -0
  25. package/dist/lib/apollo-super-selection/p-c2b9cfa5.system.entry.js +69 -0
  26. package/dist/lib/apollo-super-selection/{p-a98c2760.entry.js → p-cb6b386e.entry.js} +1 -1
  27. package/dist/lib/apollo-super-selection/{p-f15bf700.system.entry.js → p-e9a34be2.system.entry.js} +1 -1
  28. package/dist/lib/cjs/{active-router-e92fd784.js → active-router-71d965f4.js} +1 -1
  29. package/dist/lib/cjs/apollo-super-selection.cjs.js +4 -5
  30. package/dist/lib/cjs/{app-globals-45007120.js → app-globals-b1125d8c.js} +1 -1
  31. package/dist/lib/cjs/context-consumer.cjs.entry.js +1 -1
  32. package/dist/lib/cjs/{datorama-akita-7f4b082a.js → datorama-akita-6c9cb8fb.js} +1005 -68
  33. package/dist/lib/cjs/{index-942e6faa.js → index-f746d8f0.js} +2 -0
  34. package/dist/lib/cjs/loader.cjs.js +4 -5
  35. package/dist/lib/cjs/{fl-button_31.cjs.entry.js → sss-button_28.cjs.entry.js} +2138 -2177
  36. package/dist/lib/cjs/stencil-async-content.cjs.entry.js +1 -1
  37. package/dist/lib/cjs/stencil-route-title.cjs.entry.js +2 -2
  38. package/dist/lib/cjs/stencil-router-prompt.cjs.entry.js +2 -2
  39. package/dist/lib/cjs/stencil-router-redirect.cjs.entry.js +2 -2
  40. package/dist/lib/collection/apollo-super-selection.css +1 -0
  41. package/dist/lib/collection/collection-manifest.json +16 -28
  42. package/dist/lib/collection/components/app-host/loading-page.js +3 -3
  43. package/dist/lib/collection/components/app-host/super-selection-app-host.css +0 -4
  44. package/dist/lib/collection/components/app-host/super-selection-app-host.js +7 -19
  45. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +69 -1
  46. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +9 -3
  47. package/dist/lib/collection/components/super-selection-app/app-state-pages/success.js +16 -21
  48. package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +3 -0
  49. package/dist/lib/collection/components/super-selection-app/assets/icon-exclamation.svg +3 -0
  50. package/dist/lib/collection/components/super-selection-app/assets/icon-information-circle.svg +3 -0
  51. package/dist/lib/collection/components/super-selection-app/consent/consent.js +57 -0
  52. package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +136 -0
  53. package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +6 -18
  54. package/dist/lib/collection/components/super-selection-app/funds/constants.js +50 -0
  55. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.js +32 -16
  56. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js +10 -14
  57. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund.js +36 -45
  58. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.js +40 -19
  59. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +45 -40
  60. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +104 -58
  61. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +53 -49
  62. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-not-supported.js +6 -16
  63. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-page.js +1 -1
  64. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +1 -4
  65. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-iframe-builder.js +10 -4
  66. package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +13 -4
  67. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +2 -3
  68. package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +45 -0
  69. package/dist/lib/collection/components/super-selection-app/misc/button.js +146 -0
  70. package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.css +7 -0
  71. package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.js +359 -0
  72. package/dist/lib/collection/components/super-selection-app/misc/loading-indicator.js +52 -0
  73. package/dist/lib/collection/components/super-selection-app/services/australian-fund-lookup.service.js +8 -4
  74. package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +20 -0
  75. package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +95 -0
  76. package/dist/lib/collection/components/super-selection-app/services/feature-flag.service.js +11 -0
  77. package/dist/lib/collection/components/super-selection-app/services/navigation.service.js +8 -0
  78. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +6 -4
  79. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +69 -34
  80. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.store.js +10 -0
  81. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +94 -0
  82. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +90 -0
  83. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +85 -92
  84. package/dist/lib/collection/components/super-selection-app/super-selection-app.css +16 -4
  85. package/dist/lib/collection/components/super-selection-app/super-selection-app.js +59 -11
  86. package/dist/lib/esm/{active-router-4c80d3d2.js → active-router-2056f552.js} +1 -1
  87. package/dist/lib/esm/apollo-super-selection.js +4 -5
  88. package/dist/lib/esm/{app-globals-7ac1ffba.js → app-globals-c1f89805.js} +1 -1
  89. package/dist/lib/esm/context-consumer.entry.js +1 -1
  90. package/dist/lib/esm/{datorama-akita-79ce4385.js → datorama-akita-127aea91.js} +960 -28
  91. package/dist/lib/esm/{index-0496d1af.js → index-e1e930c8.js} +2 -1
  92. package/dist/lib/esm/loader.js +4 -5
  93. package/dist/lib/esm/{fl-button_31.entry.js → sss-button_28.entry.js} +2124 -2160
  94. package/dist/lib/esm/stencil-async-content.entry.js +1 -1
  95. package/dist/lib/esm/stencil-route-title.entry.js +2 -2
  96. package/dist/lib/esm/stencil-router-prompt.entry.js +2 -2
  97. package/dist/lib/esm/stencil-router-redirect.entry.js +2 -2
  98. package/dist/lib/esm-es5/{active-router-4c80d3d2.js → active-router-2056f552.js} +1 -1
  99. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  100. package/dist/lib/esm-es5/{app-globals-7ac1ffba.js → app-globals-c1f89805.js} +1 -1
  101. package/dist/lib/esm-es5/context-consumer.entry.js +1 -1
  102. package/dist/lib/esm-es5/datorama-akita-127aea91.js +15 -0
  103. package/dist/lib/esm-es5/{index-0496d1af.js → index-e1e930c8.js} +1 -1
  104. package/dist/lib/esm-es5/loader.js +1 -1
  105. package/dist/lib/esm-es5/sss-button_28.entry.js +69 -0
  106. package/dist/lib/esm-es5/stencil-async-content.entry.js +1 -1
  107. package/dist/lib/esm-es5/stencil-route-title.entry.js +1 -1
  108. package/dist/lib/esm-es5/stencil-router-prompt.entry.js +1 -1
  109. package/dist/lib/esm-es5/stencil-router-redirect.entry.js +1 -1
  110. package/dist/lib/types/components/app-host/super-selection-app-host.d.ts +0 -3
  111. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +30 -0
  112. package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +2 -1
  113. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +19 -4
  114. package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +9 -0
  115. package/dist/lib/types/components/super-selection-app/existing-choice/existing-choice.d.ts +12 -0
  116. package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +0 -1
  117. package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +3 -0
  118. package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.d.ts +1 -1
  119. package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +4 -6
  120. package/dist/lib/types/components/super-selection-app/funds/custom-fund/default-fund/default-fund.d.ts +0 -2
  121. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.d.ts +2 -1
  122. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.d.ts +1 -0
  123. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +7 -0
  124. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.d.ts +1 -0
  125. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.form.d.ts +0 -1
  126. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -3
  127. package/dist/lib/types/components/super-selection-app/header-section/header-section.d.ts +4 -0
  128. package/dist/lib/types/components/super-selection-app/misc/button.d.ts +11 -0
  129. package/dist/lib/types/components/super-selection-app/misc/dropdown-async.d.ts +44 -0
  130. package/dist/lib/types/components/super-selection-app/misc/loading-indicator.d.ts +5 -0
  131. package/dist/lib/types/components/super-selection-app/services/australian-fund-lookup.service.d.ts +1 -0
  132. package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +4 -0
  133. package/dist/lib/types/components/super-selection-app/services/existing-super-choice-info.service.d.ts +51 -0
  134. package/dist/lib/types/components/super-selection-app/services/feature-flag.service.d.ts +3 -0
  135. package/dist/lib/types/components/super-selection-app/services/navigation.service.d.ts +6 -0
  136. package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +3 -2
  137. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +6 -3
  138. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.store.d.ts +8 -0
  139. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +9 -0
  140. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +7 -0
  141. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +1 -4
  142. package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +2 -1
  143. package/dist/lib/types/components.d.ts +148 -97
  144. package/package.json +12 -7
  145. package/dist/lib/apollo-super-selection/assets/logo-qsuper-square.png +0 -0
  146. package/dist/lib/apollo-super-selection/assets/logo-qsuper.png +0 -0
  147. package/dist/lib/apollo-super-selection/p-0623b20a.system.entry.js +0 -69
  148. package/dist/lib/apollo-super-selection/p-13573238.system.js +0 -15
  149. package/dist/lib/apollo-super-selection/p-342cee5a.js +0 -1
  150. package/dist/lib/apollo-super-selection/p-38f24f69.js +0 -1
  151. package/dist/lib/apollo-super-selection/p-642db1f7.system.entry.js +0 -1
  152. package/dist/lib/apollo-super-selection/p-64ebe17d.system.entry.js +0 -1
  153. package/dist/lib/apollo-super-selection/p-7dbe5a2f.system.js +0 -1
  154. package/dist/lib/apollo-super-selection/p-abedb220.entry.js +0 -1
  155. package/dist/lib/apollo-super-selection/p-ae4f5e0b.system.js +0 -1
  156. package/dist/lib/apollo-super-selection/p-c5e41889.entry.js +0 -1
  157. package/dist/lib/apollo-super-selection/p-d82b00ed.system.js +0 -1
  158. package/dist/lib/apollo-super-selection/p-df9ce4b7.js +0 -15
  159. package/dist/lib/apollo-super-selection/p-f7a45412.entry.js +0 -1
  160. package/dist/lib/apollo-super-selection/p-fbe8c6d1.entry.js +0 -14
  161. package/dist/lib/cjs/delay-81aff2f1.js +0 -955
  162. package/dist/lib/cjs/fl-style-guide.cjs.entry.js +0 -90
  163. package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.css +0 -11
  164. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-not-supported.css +0 -23
  165. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-standard-choice-page.js +0 -62
  166. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-fund.store.js +0 -10
  167. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-standard-choice-page.js +0 -67
  168. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slatesuper-header.css +0 -0
  169. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slatesuper-header.js +0 -19
  170. package/dist/lib/collection/components/super-selection-app/notifications-section/notifications-section.js +0 -25
  171. package/dist/lib/collection/components/super-selection-app/services/notifications.service.js +0 -37
  172. package/dist/lib/collection/components/super-selection-app/services/notifications.store.js +0 -3
  173. package/dist/lib/collection/components/super-selection-app/services/selected-super-choice-info.service.js +0 -50
  174. package/dist/lib/collection/components/super-selection-app/standard-choice/api/standard-choice.model.js +0 -1
  175. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-qsuper-square.png +0 -0
  176. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-qsuper.png +0 -0
  177. package/dist/lib/collection/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.css +0 -18
  178. package/dist/lib/collection/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.js +0 -53
  179. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item.js +0 -296
  180. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.css +0 -70
  181. package/dist/lib/esm/delay-c0555599.js +0 -935
  182. package/dist/lib/esm/fl-style-guide.entry.js +0 -86
  183. package/dist/lib/esm-es5/datorama-akita-79ce4385.js +0 -15
  184. package/dist/lib/esm-es5/delay-c0555599.js +0 -1
  185. package/dist/lib/esm-es5/fl-button_31.entry.js +0 -69
  186. package/dist/lib/esm-es5/fl-style-guide.entry.js +0 -1
  187. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/button/button.css +0 -45
  188. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown/dropdown.css +0 -9
  189. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown-async/dropdown-async.css +0 -9
  190. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/loading-indicator/loading-indicator.css +0 -141
  191. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/promise-button/promise-button.css +0 -5
  192. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/style-guide/style-guide.css +0 -0
  193. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-standard-choice-page.d.ts +0 -8
  194. package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-fund.store.d.ts +0 -7
  195. package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-standard-choice-page.d.ts +0 -8
  196. package/dist/lib/types/components/super-selection-app/funds/slate-super/slatesuper-header.d.ts +0 -3
  197. package/dist/lib/types/components/super-selection-app/notifications-section/notifications-section.d.ts +0 -5
  198. package/dist/lib/types/components/super-selection-app/services/notifications.service.d.ts +0 -15
  199. package/dist/lib/types/components/super-selection-app/services/notifications.store.d.ts +0 -14
  200. package/dist/lib/types/components/super-selection-app/services/selected-super-choice-info.service.d.ts +0 -18
  201. package/dist/lib/types/components/super-selection-app/standard-choice/api/standard-choice.model.d.ts +0 -3
  202. package/dist/lib/types/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.d.ts +0 -5
  203. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item.d.ts +0 -22
@@ -64,6 +64,26 @@ export class EventTrackingService {
64
64
  SuperFundPanelViewed: detail
65
65
  });
66
66
  }
67
+ async TrackSuperFundNominationViewedAsync(detail) {
68
+ return this.trackEventAsync({
69
+ SuperFundNominationViewed: detail
70
+ });
71
+ }
72
+ async TrackSuperFundNominationDeclinedAsync(detail) {
73
+ return this.trackEventAsync({
74
+ SuperFundNominationDeclined: detail
75
+ });
76
+ }
77
+ async TrackSuperFundDisclaimerViewedAsync(detail) {
78
+ return this.trackEventAsync({
79
+ SuperFundDisclaimerViewed: detail
80
+ });
81
+ }
82
+ async TrackSuperFundDisclaimerAcceptedAsync(detail) {
83
+ return this.trackEventAsync({
84
+ SuperFundDisclaimerAccepted: detail
85
+ });
86
+ }
67
87
  async trackEventAsync(event) {
68
88
  try {
69
89
  await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
@@ -0,0 +1,95 @@
1
+ import { isSome, none, some } from 'fp-ts/Option';
2
+ import { buildBackendApiClient } from '../api/api-client';
3
+ import { getSuperChoiceMemberNumber, getSuperChoiceUsi } from '../api/super-selection.api.dto';
4
+ import * as constants from '../funds/constants';
5
+ import australianFundLookupService from './australian-fund-lookup.service';
6
+ import superSelectionAppService from './super-selection-app.service';
7
+ export function ExistingFund(fund) {
8
+ if (isSome(fund)) {
9
+ return fund.value.isActive ? 'Active' : 'Inactive';
10
+ }
11
+ else {
12
+ return 'Unknown';
13
+ }
14
+ }
15
+ export class ExistingFundService {
16
+ async GetExistingFundAsync() {
17
+ var _a, _b;
18
+ const choice = superSelectionAppService.superBuyer.superChoice;
19
+ const choiceDetails = (_a = superSelectionAppService.superBuyer.superChoice) === null || _a === void 0 ? void 0 : _a.choiceDetails;
20
+ if (!choice)
21
+ return none;
22
+ if (!choiceDetails)
23
+ return none;
24
+ const dateSubmitted = choice.dateSubmitted == undefined ? none : some(new Date(choice.dateSubmitted));
25
+ const usi = getSuperChoiceUsi(choiceDetails);
26
+ const memberNumber = getSuperChoiceMemberNumber(choiceDetails);
27
+ if ('promoted' in choiceDetails) {
28
+ const fund = constants.PromotedFundIdList.find((f) => f.dtoPropName in choiceDetails.promoted);
29
+ if ((fund === null || fund === void 0 ? void 0 : fund.id) == undefined)
30
+ return none;
31
+ return some({
32
+ type: 'Promoted Fund',
33
+ id: fund.id,
34
+ name: (_b = constants.getFundNameById(fund.id)) !== null && _b !== void 0 ? _b : '',
35
+ usi: usi,
36
+ valid: 'Active',
37
+ memberNumber: memberNumber,
38
+ lastNominatedAt: dateSubmitted
39
+ });
40
+ }
41
+ else if ('smsf' in choiceDetails) {
42
+ return some({
43
+ type: 'Self Managed Fund',
44
+ name: choiceDetails.smsf.fundName,
45
+ valid: 'Unknown',
46
+ lastNominatedAt: dateSubmitted
47
+ });
48
+ }
49
+ else if ('myOwnFund' in choiceDetails) {
50
+ const fundUsi = choiceDetails.myOwnFund.usi;
51
+ const fund = await this.getFundByUsiAsync(fundUsi);
52
+ return some({
53
+ type: 'My Own Fund',
54
+ name: isSome(fund) ? fund.value.productName : fundUsi,
55
+ usi: usi,
56
+ valid: this.toFundValidState(fund),
57
+ memberNumber: memberNumber,
58
+ lastNominatedAt: dateSubmitted
59
+ });
60
+ }
61
+ else if ('default' in choiceDetails) {
62
+ const defaultUsi = choiceDetails.default.usi;
63
+ const defaultFund = await this.getFundByUsiAsync(defaultUsi);
64
+ return some({
65
+ type: 'Default Fund',
66
+ name: isSome(defaultFund) ? defaultFund.value.productName : defaultUsi,
67
+ usi: usi,
68
+ valid: this.toFundValidState(defaultFund),
69
+ lastNominatedAt: dateSubmitted
70
+ });
71
+ }
72
+ return none;
73
+ }
74
+ async submitRetainSuperFundAsync(dto) {
75
+ return buildBackendApiClient()
76
+ .url('super-choice/retain-super-fund')
77
+ .post(dto)
78
+ .badRequest(() => {
79
+ throw new Error('Failed to process default fund join request');
80
+ })
81
+ .text();
82
+ }
83
+ getFundByUsiAsync(usi) {
84
+ return australianFundLookupService.getFundByUsiAsync(usi);
85
+ }
86
+ toFundValidState(fund) {
87
+ if (isSome(fund)) {
88
+ return fund.value.isActive ? 'Active' : 'Inactive';
89
+ }
90
+ else {
91
+ return 'Unknown';
92
+ }
93
+ }
94
+ }
95
+ export default new ExistingFundService();
@@ -0,0 +1,11 @@
1
+ import superSelectionAppService from '../services/super-selection-app.service';
2
+ export class FeatureFlagService {
3
+ static isNewComplianceEnabled() {
4
+ const whitelistedPartners = [
5
+ 'PARTNER-TEST-FLARE',
6
+ '962e142f-df98-460e-92ed-2c4e24149c91',
7
+ '8ad88c67-d446-4c30-8321-f896e1b7643b' // Entire
8
+ ];
9
+ return whitelistedPartners.includes(superSelectionAppService.partnerIdOrDefault);
10
+ }
11
+ }
@@ -1,4 +1,6 @@
1
1
  import iframe from '../../../utils/iframe';
2
+ import standardChoiceFormState from './../standard-choice/standard-choice-form.store';
3
+ import { SuperSelectionAppRoutes } from './super-selection-app.routes';
2
4
  import superSelectionAppService from './super-selection-app.service';
3
5
  class NavigationService {
4
6
  navigateInternally(history, route) {
@@ -6,6 +8,12 @@ class NavigationService {
6
8
  iframe.navigation(path);
7
9
  history.push(path);
8
10
  }
11
+ navigateInternallyToStandardChoice(options) {
12
+ standardChoiceFormState.handleSubmitFn = options.handleSubmitFn;
13
+ standardChoiceFormState.fundName = options.fundName;
14
+ standardChoiceFormState.promotedFundId = options.promotedFundId;
15
+ this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
16
+ }
9
17
  toExternalUrl(url) {
10
18
  const externalUrl = new URL(url);
11
19
  externalUrl.searchParams.append('_extnav', 'true');
@@ -1,24 +1,26 @@
1
1
  import { h } from '@stencil/core';
2
2
  export var SuperSelectionAppRoutes;
3
3
  (function (SuperSelectionAppRoutes) {
4
+ SuperSelectionAppRoutes["ConsentPage"] = "/consent";
5
+ SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
4
6
  SuperSelectionAppRoutes["ChoicePage"] = "/";
5
7
  SuperSelectionAppRoutes["SlateJoin"] = "/slate/join/";
6
- SuperSelectionAppRoutes["SlateStandardChoice"] = "/slate/standard-choice/";
7
8
  SuperSelectionAppRoutes["PromotedFundJoin"] = "/promoted-fund/join";
8
- SuperSelectionAppRoutes["PromotedFundStandardChoice"] = "/promoted-fund/standard-choice/";
9
9
  SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
10
10
  SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
11
11
  SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
12
+ SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
12
13
  SuperSelectionAppRoutes["Success"] = "/success/";
13
14
  })(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
14
15
  export const superSelectionAppStencilRoutes = [
16
+ h("stencil-route", { url: SuperSelectionAppRoutes.ConsentPage, component: "sss-consent-page" }),
17
+ h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
15
18
  h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-super-choice-page" }),
16
19
  h("stencil-route", { url: SuperSelectionAppRoutes.SlateJoin, component: "sss-slate-join-page" }),
17
- h("stencil-route", { url: SuperSelectionAppRoutes.SlateStandardChoice, component: "sss-slate-standard-choice-page" }),
18
20
  h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoin, component: "sss-promoted-fund-join-page" }),
19
- h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundStandardChoice, component: "sss-promoted-fund-standard-choice-page" }),
20
21
  h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
21
22
  h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
22
23
  h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
24
+ h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
23
25
  h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
24
26
  ];
@@ -1,49 +1,84 @@
1
- import { Component, Event, h, State } from '@stencil/core';
1
+ import { Component, getAssetPath, h, Host, Prop, State } from '@stencil/core';
2
+ import { getLogoSrc } from '../funds/constants';
3
+ import { SuperSelectionAppRoutes } from '../services/super-selection-app.routes';
4
+ import superSelectionAppService from '../services/super-selection-app.service';
5
+ import standardChoiceFormState from './standard-choice-form.store';
2
6
  export class StandardChoiceFormInputDefaultFund {
3
7
  constructor() {
4
- this.standardChoiceFormUrl = '/super-selection/embed/v1.0/app/assets/Superannuation_Standard_Choice_Form.pdf';
5
8
  this.standardChoiceFormSignature = '';
9
+ this.isSubmitDisabled = true;
6
10
  }
7
11
  render() {
8
- return (h("div", { class: "card p-4 mt-4 bg-light" },
9
- h("h4", { class: "small font-weight-bold" }, "Superannuation Standard Choice Form"),
10
- h("p", { class: "small mt-2" },
11
- "The superannuation",
12
- ' ',
13
- h("a", { target: "_blank", href: this.standardChoiceFormUrl }, "standard choice form"),
14
- ' ',
15
- "informs your employer of your choice of fund."),
16
- h("h4", { class: "small font-weight-bold" }, "Type your full name below (required)"),
17
- h("input", { placeholder: "Type your full name", type: "text", autocomplete: "off", class: "form-control", required: true, minlength: "2", name: "standardChoiceFormSignature", id: "standardChoiceFormSignature", value: this.standardChoiceFormSignature, onChange: (ev) => this.updateFormField(ev.target.value.trim()) }),
18
- h("div", { class: "invalid-feedback" }, "Type your full name"),
19
- h("p", { class: "small mt-3 mb-0" }, "Your authorisation is required for signing this form. Applying your full name in the text field above is the same as applying your written signature and is legally binding.")));
12
+ return (h(Host, null,
13
+ h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"),
14
+ h("div", { class: "sm:text-lg text-gray-600 max-w-800 mt-4 text-center leading-7 sm:leading-8" }, "Your authorisation is required to complete your super choice by signing the standard choice form, which informs your employer of your choice of fund."),
15
+ h("div", { class: "flex justify-center mt-8 sm:mt-12" },
16
+ h("div", { class: "max-w-560" },
17
+ h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" },
18
+ standardChoiceFormState.promotedFundId &&
19
+ getLogoSrc(standardChoiceFormState.promotedFundId) && (h("div", { class: "pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start" },
20
+ h("img", { class: "h-16 w-auto", alt: standardChoiceFormState.fundName, src: getLogoSrc(standardChoiceFormState.promotedFundId) }))),
21
+ h("div", { class: "flex justify-between w-full" },
22
+ h("div", null,
23
+ h("div", { class: "text-xs font-semibold text-gray-500 sm:uppercase" }, "Nominated fund"),
24
+ h("div", { class: "text-sm mt-2" }, standardChoiceFormState.fundName)),
25
+ h("div", { class: "grid content-center ml-4" },
26
+ h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
27
+ h("sss-button", { variant: "secondary" }, "Change"))))),
28
+ h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" },
29
+ h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"),
30
+ h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" },
31
+ h("div", { class: "flex" },
32
+ h("div", { class: "flex-shrink-0" },
33
+ h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-information-circle.svg') })),
34
+ h("div", { class: "ml-2" },
35
+ h("p", { class: "text-sm text-blue-800 leading-5" }, "Applying your full name in the text field below is the same as applying your written signature and is legally binding.")))),
36
+ h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
37
+ 'mt-3': true,
38
+ 'was-validated': this.formState === 'validated'
39
+ }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) },
40
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Type your full name"),
41
+ h("input", { type: "text", autocomplete: "off", class: {
42
+ 'shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full text-sm border-gray-300 rounded-md mt-1': true,
43
+ 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
44
+ }, required: true, minlength: "2", name: "standardChoiceFormSignature", id: "standardChoiceFormSignature", value: this.standardChoiceFormSignature, onInput: (event) => (this.standardChoiceFormSignature = event.target.value) }),
45
+ h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Type your full name"),
46
+ h("div", { class: "mt-6" },
47
+ h("sss-button", { fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Confirm and continue"))))))));
20
48
  }
21
- updateFormField(value) {
22
- this.standardChoiceFormSignatureUpdated.emit({ standardChoiceFormSignature: value });
49
+ async handleSubmitForm() {
50
+ this.formState = 'validated';
51
+ if (this.formElement.checkValidity()) {
52
+ await standardChoiceFormState.handleSubmitFn(this.standardChoiceFormSignature.trim());
53
+ superSelectionAppService.markSuperSelectionAsSubmitted();
54
+ }
23
55
  }
24
56
  static get is() { return "sss-standard-choice-form"; }
25
- static get states() { return {
26
- "standardChoiceFormSignature": {}
27
- }; }
28
- static get events() { return [{
29
- "method": "standardChoiceFormSignatureUpdated",
30
- "name": "standardChoiceFormSignatureUpdated",
31
- "bubbles": true,
32
- "cancelable": true,
33
- "composed": true,
34
- "docs": {
35
- "tags": [],
36
- "text": ""
37
- },
57
+ static get properties() { return {
58
+ "history": {
59
+ "type": "unknown",
60
+ "mutable": false,
38
61
  "complexType": {
39
- "original": "StandardChoiceInput",
40
- "resolved": "{ standardChoiceFormSignature: string; }",
62
+ "original": "RouterHistory",
63
+ "resolved": "RouterHistory",
41
64
  "references": {
42
- "StandardChoiceInput": {
65
+ "RouterHistory": {
43
66
  "location": "import",
44
- "path": "./api/standard-choice.model"
67
+ "path": "@stencil/router"
45
68
  }
46
69
  }
70
+ },
71
+ "required": false,
72
+ "optional": false,
73
+ "docs": {
74
+ "tags": [],
75
+ "text": ""
47
76
  }
48
- }]; }
77
+ }
78
+ }; }
79
+ static get states() { return {
80
+ "standardChoiceFormSignature": {},
81
+ "formState": {},
82
+ "isSubmitDisabled": {}
83
+ }; }
49
84
  }
@@ -0,0 +1,10 @@
1
+ import { createStore } from '@stencil/store';
2
+ export const initial = {
3
+ handleSubmitFn: async function () {
4
+ return;
5
+ },
6
+ fundName: '',
7
+ promotedFundId: undefined
8
+ };
9
+ const { state } = createStore(initial);
10
+ export default state;
@@ -0,0 +1,94 @@
1
+ import { Component, Event, h, Host, Prop } from '@stencil/core';
2
+ export class SuperChoiceItemBottom {
3
+ render() {
4
+ return (h(Host, null,
5
+ h("div", { class: "py-6 px-4 lg:px-6 flex flex-col justify-between h-full" },
6
+ h("div", null,
7
+ h("div", { class: "md:max-w-[240px] lg:max-w-full" },
8
+ h("sss-button", { class: "uuid-button-continue", fillWidth: true, onClick: () => this.handleFundClick() }, "Choose this fund")),
9
+ h("div", { class: "text-xs text-gray-500 mt-6 leading-4" }, this.disclaimer)),
10
+ this.abnInfo && this.abn && (h("div", { class: "text-xs text-gray-500 mt-2" },
11
+ h("p", null,
12
+ this.abnInfo,
13
+ "."),
14
+ h("p", null,
15
+ "ABN: ",
16
+ this.abn))))));
17
+ }
18
+ handleFundClick() {
19
+ return this.joinFundClicked.emit();
20
+ }
21
+ static get is() { return "sss-super-choice-item-bottom"; }
22
+ static get properties() { return {
23
+ "disclaimer": {
24
+ "type": "unknown",
25
+ "mutable": false,
26
+ "complexType": {
27
+ "original": "VNode",
28
+ "resolved": "VNode",
29
+ "references": {
30
+ "VNode": {
31
+ "location": "import",
32
+ "path": "@stencil/core"
33
+ }
34
+ }
35
+ },
36
+ "required": false,
37
+ "optional": false,
38
+ "docs": {
39
+ "tags": [],
40
+ "text": ""
41
+ }
42
+ },
43
+ "abnInfo": {
44
+ "type": "string",
45
+ "mutable": false,
46
+ "complexType": {
47
+ "original": "string",
48
+ "resolved": "string | undefined",
49
+ "references": {}
50
+ },
51
+ "required": false,
52
+ "optional": true,
53
+ "docs": {
54
+ "tags": [],
55
+ "text": ""
56
+ },
57
+ "attribute": "abn-info",
58
+ "reflect": false
59
+ },
60
+ "abn": {
61
+ "type": "string",
62
+ "mutable": false,
63
+ "complexType": {
64
+ "original": "string",
65
+ "resolved": "string | undefined",
66
+ "references": {}
67
+ },
68
+ "required": false,
69
+ "optional": true,
70
+ "docs": {
71
+ "tags": [],
72
+ "text": ""
73
+ },
74
+ "attribute": "abn",
75
+ "reflect": false
76
+ }
77
+ }; }
78
+ static get events() { return [{
79
+ "method": "joinFundClicked",
80
+ "name": "joinFundClicked",
81
+ "bubbles": true,
82
+ "cancelable": true,
83
+ "composed": true,
84
+ "docs": {
85
+ "tags": [],
86
+ "text": ""
87
+ },
88
+ "complexType": {
89
+ "original": "void",
90
+ "resolved": "void",
91
+ "references": {}
92
+ }
93
+ }]; }
94
+ }
@@ -0,0 +1,90 @@
1
+ import { Component, getAssetPath, h, Host, Prop } from '@stencil/core';
2
+ import { FeatureFlagService } from '../../services/feature-flag.service';
3
+ export class SuperChoiceItemTop {
4
+ render() {
5
+ return (h(Host, null,
6
+ h("div", { class: "px-4 lg:px-6 pt-6" },
7
+ h("div", { class: "text-right w-100 -mt-5 -mr-3.5 lg:-mr-5" },
8
+ h("span", { class: "text-xs bg-gray-100 text-gray-800 font-medium rounded-xl py-0.5 px-2.5 mr-0.5" }, FeatureFlagService.isNewComplianceEnabled() ? 'Featured' : 'Advertised')),
9
+ h("div", { class: "flex lg:block mt-2 md:mt-0 lg:mt-2" },
10
+ h("img", { class: "h-16 object-contain w-auto max-w-[80px] md:hidden lg:block lg:max-w-none", alt: this.name, src: getAssetPath(`assets/${this.logo}`) }),
11
+ h("div", { class: "grid content-center" },
12
+ h("p", { class: "text-lg font-bold ml-4 mb-2 md:ml-0 md:mb-0 lg:mt-4" }, this.name))),
13
+ h("div", { class: "mt-4 text-sm space-y-2" }, JSON.parse(this.features).map((feature) => (h("div", { class: "flex" },
14
+ h("div", { class: "h-5 w-5 flex-none mr-1.5" },
15
+ h("img", { src: getAssetPath(`assets/icon-check.svg`) })),
16
+ h("p", { class: "leading-5" }, feature.value))))),
17
+ this.featureSubText && (h("p", { class: "text-xs text-gray-500 italic mt-4 leading-4" }, this.featureSubText)))));
18
+ }
19
+ static get is() { return "sss-super-choice-item-top"; }
20
+ static get properties() { return {
21
+ "name": {
22
+ "type": "string",
23
+ "mutable": false,
24
+ "complexType": {
25
+ "original": "string",
26
+ "resolved": "string",
27
+ "references": {}
28
+ },
29
+ "required": false,
30
+ "optional": false,
31
+ "docs": {
32
+ "tags": [],
33
+ "text": ""
34
+ },
35
+ "attribute": "name",
36
+ "reflect": false
37
+ },
38
+ "logo": {
39
+ "type": "string",
40
+ "mutable": false,
41
+ "complexType": {
42
+ "original": "string",
43
+ "resolved": "string",
44
+ "references": {}
45
+ },
46
+ "required": false,
47
+ "optional": false,
48
+ "docs": {
49
+ "tags": [],
50
+ "text": ""
51
+ },
52
+ "attribute": "logo",
53
+ "reflect": false
54
+ },
55
+ "features": {
56
+ "type": "string",
57
+ "mutable": false,
58
+ "complexType": {
59
+ "original": "string",
60
+ "resolved": "string",
61
+ "references": {}
62
+ },
63
+ "required": false,
64
+ "optional": false,
65
+ "docs": {
66
+ "tags": [],
67
+ "text": ""
68
+ },
69
+ "attribute": "features",
70
+ "reflect": false
71
+ },
72
+ "featureSubText": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "string",
77
+ "resolved": "string | undefined",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": true,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": ""
85
+ },
86
+ "attribute": "feature-sub-text",
87
+ "reflect": false
88
+ }
89
+ }; }
90
+ }