@flarehr/apollo-super-selection 1.3.54543 → 1.3.54544

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 (253) 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 -0
  3. package/dist/lib/apollo-super-selection/apollo-super-selection.js +130 -0
  4. package/dist/lib/apollo-super-selection/assets/icon-exclamation.svg +3 -0
  5. package/dist/lib/apollo-super-selection/assets/icon-information-circle.svg +3 -0
  6. package/dist/lib/apollo-super-selection/index.esm.js +0 -0
  7. package/dist/lib/apollo-super-selection/p-02f24922.system.entry.js +1 -0
  8. package/dist/lib/apollo-super-selection/p-071b8545.entry.js +1 -0
  9. package/dist/lib/apollo-super-selection/p-0a384ec4.entry.js +14 -0
  10. package/dist/lib/apollo-super-selection/p-14885f78.system.js +15 -0
  11. package/dist/lib/apollo-super-selection/p-15f0e5eb.system.js +1 -0
  12. package/dist/lib/apollo-super-selection/p-23cfdd82.entry.js +1 -0
  13. package/dist/lib/apollo-super-selection/p-29c11183.js +15 -0
  14. package/dist/lib/apollo-super-selection/p-44bec843.system.js +1 -0
  15. package/dist/lib/apollo-super-selection/p-50ea2036.system.js +1 -0
  16. package/dist/lib/apollo-super-selection/p-51aefdb1.system.entry.js +1 -0
  17. package/dist/lib/apollo-super-selection/p-51c6dd08.js +1 -0
  18. package/dist/lib/apollo-super-selection/p-6ac8791e.system.entry.js +1 -0
  19. package/dist/lib/apollo-super-selection/p-7a89efaf.js +1 -0
  20. package/dist/lib/apollo-super-selection/p-80178f87.system.js +1 -0
  21. package/dist/lib/apollo-super-selection/p-86e3e03f.js +1 -0
  22. package/dist/lib/apollo-super-selection/p-9c855634.entry.js +1 -0
  23. package/dist/lib/apollo-super-selection/p-b2bb0763.system.entry.js +69 -0
  24. package/dist/lib/apollo-super-selection/p-b89b68db.entry.js +1 -0
  25. package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -0
  26. package/dist/lib/apollo-super-selection/p-ef3afa00.system.entry.js +1 -0
  27. package/dist/lib/apollo-super-selection/p-f29066b9.system.entry.js +1 -0
  28. package/dist/lib/apollo-super-selection/p-fcb4050d.entry.js +1 -0
  29. package/dist/lib/cjs/active-router-1f555f75.js +75 -0
  30. package/dist/lib/cjs/apollo-super-selection.cjs.js +22 -0
  31. package/dist/lib/cjs/app-globals-b1125d8c.js +25 -0
  32. package/dist/lib/cjs/context-consumer.cjs.entry.js +29 -0
  33. package/dist/lib/cjs/datorama-akita-6c9cb8fb.js +3641 -0
  34. package/dist/lib/cjs/index-eb4f212f.js +1766 -0
  35. package/dist/lib/cjs/index.cjs.js +2 -0
  36. package/dist/lib/cjs/loader.cjs.js +24 -0
  37. package/dist/lib/cjs/sss-button_31.cjs.entry.js +17977 -0
  38. package/dist/lib/cjs/stencil-async-content.cjs.entry.js +32 -0
  39. package/dist/lib/cjs/stencil-route-title.cjs.entry.js +32 -0
  40. package/dist/lib/cjs/stencil-router-prompt.cjs.entry.js +59 -0
  41. package/dist/lib/cjs/stencil-router-redirect.cjs.entry.js +32 -0
  42. package/dist/lib/collection/apollo-super-selection.css +1 -0
  43. package/dist/lib/collection/collection-manifest.json +95 -0
  44. package/dist/lib/collection/components/app-host/loading-page.js +9 -0
  45. package/dist/lib/collection/components/app-host/services/app-configuration.query.js +18 -0
  46. package/dist/lib/collection/components/app-host/services/app-configuration.service.js +25 -0
  47. package/dist/lib/collection/components/app-host/services/app-parameters.query.js +13 -0
  48. package/dist/lib/collection/components/app-host/services/app-parameters.service.js +14 -0
  49. package/dist/lib/collection/components/app-host/services/appinsights.service.js +46 -0
  50. package/dist/lib/collection/components/app-host/services/authentication.query.js +21 -0
  51. package/dist/lib/collection/components/app-host/services/authentication.service.js +50 -0
  52. package/dist/lib/collection/components/app-host/services/interop/host-interop.service.js +31 -0
  53. package/dist/lib/collection/components/app-host/services/interop/iframe-interop.service.js +30 -0
  54. package/dist/lib/collection/components/app-host/services/interop/react-native-interop.service.js +20 -0
  55. package/dist/lib/collection/components/app-host/services/interop.query.js +26 -0
  56. package/dist/lib/collection/components/app-host/services/session.store.js +38 -0
  57. package/dist/lib/collection/components/app-host/super-selection-app-host.css +24 -0
  58. package/dist/lib/collection/components/app-host/super-selection-app-host.js +87 -0
  59. package/dist/lib/collection/components/external-loading-page/external-loading-page.js +29 -0
  60. package/dist/lib/collection/components/super-campaign/super-campaign-types.js +6 -0
  61. package/dist/lib/collection/components/super-campaign/super-campaign.js +361 -0
  62. package/dist/lib/collection/components/super-selection-app/api/api-client.js +14 -0
  63. package/dist/lib/collection/components/super-selection-app/api/event-tracking.api.js +9 -0
  64. package/dist/lib/collection/components/super-selection-app/api/super-campaign-errors-api.js +9 -0
  65. package/dist/lib/collection/components/super-selection-app/api/super-campaign-errors.api.dtos.js +1 -0
  66. package/dist/lib/collection/components/super-selection-app/api/super-selection-events.model.js +16 -0
  67. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +179 -0
  68. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +69 -0
  69. package/dist/lib/collection/components/super-selection-app/app-state-pages/success.js +36 -0
  70. package/dist/lib/collection/components/super-selection-app/assets/icon-exclamation.svg +3 -0
  71. package/dist/lib/collection/components/super-selection-app/assets/icon-information-circle.svg +3 -0
  72. package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +163 -0
  73. package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +39 -0
  74. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.dto.js +1 -0
  75. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.js +50 -0
  76. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.js +86 -0
  77. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js +53 -0
  78. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund.js +114 -0
  79. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/member-name-input.js +162 -0
  80. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.js +143 -0
  81. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +118 -0
  82. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/abn-validation.js +11 -0
  83. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/bankBsbNumbers.js +111 -0
  84. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +253 -0
  85. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.form.js +1 -0
  86. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +121 -0
  87. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.dto.js +1 -0
  88. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.js +31 -0
  89. package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate-choice.api.dto.js +1 -0
  90. package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate-choice.api.js +13 -0
  91. package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate.js +4 -0
  92. package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +53 -0
  93. package/dist/lib/collection/components/super-selection-app/misc/button.js +195 -0
  94. package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.css +7 -0
  95. package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.js +390 -0
  96. package/dist/lib/collection/components/super-selection-app/misc/loading-indicator.js +52 -0
  97. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-common.js +22 -0
  98. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-display-field.js +42 -0
  99. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-error-box.js +66 -0
  100. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.js +121 -0
  101. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-smsf.js +145 -0
  102. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +223 -0
  103. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +398 -0
  104. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-types.js +288 -0
  105. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-warning-box.js +37 -0
  106. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +81 -0
  107. package/dist/lib/collection/components/super-selection-app/services/australian-fund-lookup.service.js +15 -0
  108. package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +97 -0
  109. package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +134 -0
  110. package/dist/lib/collection/components/super-selection-app/services/misc.service.js +7 -0
  111. package/dist/lib/collection/components/super-selection-app/services/navigation.service.js +31 -0
  112. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +32 -0
  113. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +146 -0
  114. package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +42 -0
  115. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +155 -0
  116. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.store.js +11 -0
  117. package/dist/lib/collection/components/super-selection-app/super-selection-app.css +27 -0
  118. package/dist/lib/collection/components/super-selection-app/super-selection-app.js +291 -0
  119. package/dist/lib/collection/global/init-host.js +25 -0
  120. package/dist/lib/collection/global/main.dev.js +29 -0
  121. package/dist/lib/collection/global/main.js +11 -0
  122. package/dist/lib/collection/global/stencil-router-workaround.js +12 -0
  123. package/dist/lib/collection/index.js +2 -0
  124. package/dist/lib/collection/utils/config.js +2 -0
  125. package/dist/lib/collection/utils/gtm.js +5 -0
  126. package/dist/lib/collection/utils/iframe.js +33 -0
  127. package/dist/lib/collection/utils/index.js +11 -0
  128. package/dist/lib/collection/utils/lazy.js +29 -0
  129. package/dist/lib/collection/utils/storage.js +5 -0
  130. package/dist/lib/esm/active-router-5e40c0f8.js +73 -0
  131. package/dist/lib/esm/apollo-super-selection.js +20 -0
  132. package/dist/lib/esm/app-globals-c1f89805.js +23 -0
  133. package/dist/lib/esm/context-consumer.entry.js +25 -0
  134. package/dist/lib/esm/datorama-akita-127aea91.js +3624 -0
  135. package/dist/lib/esm/index-189b2180.js +1732 -0
  136. package/dist/lib/esm/index.js +1 -0
  137. package/dist/lib/esm/loader.js +20 -0
  138. package/dist/lib/esm/polyfills/core-js.js +11 -0
  139. package/dist/lib/esm/polyfills/css-shim.js +1 -0
  140. package/dist/lib/esm/polyfills/dom.js +79 -0
  141. package/dist/lib/esm/polyfills/es5-html-element.js +1 -0
  142. package/dist/lib/esm/polyfills/index.js +34 -0
  143. package/dist/lib/esm/polyfills/system.js +6 -0
  144. package/dist/lib/esm/sss-button_31.entry.js +17923 -0
  145. package/dist/lib/esm/stencil-async-content.entry.js +28 -0
  146. package/dist/lib/esm/stencil-route-title.entry.js +28 -0
  147. package/dist/lib/esm/stencil-router-prompt.entry.js +55 -0
  148. package/dist/lib/esm/stencil-router-redirect.entry.js +28 -0
  149. package/dist/lib/esm-es5/active-router-5e40c0f8.js +1 -0
  150. package/dist/lib/esm-es5/apollo-super-selection.js +1 -0
  151. package/dist/lib/esm-es5/app-globals-c1f89805.js +1 -0
  152. package/dist/lib/esm-es5/context-consumer.entry.js +1 -0
  153. package/dist/lib/esm-es5/datorama-akita-127aea91.js +15 -0
  154. package/dist/lib/esm-es5/index-189b2180.js +1 -0
  155. package/dist/lib/esm-es5/index.js +0 -0
  156. package/dist/lib/esm-es5/loader.js +1 -0
  157. package/dist/lib/esm-es5/sss-button_31.entry.js +69 -0
  158. package/dist/lib/esm-es5/stencil-async-content.entry.js +1 -0
  159. package/dist/lib/esm-es5/stencil-route-title.entry.js +1 -0
  160. package/dist/lib/esm-es5/stencil-router-prompt.entry.js +1 -0
  161. package/dist/lib/esm-es5/stencil-router-redirect.entry.js +1 -0
  162. package/dist/lib/index.cjs.js +1 -0
  163. package/dist/lib/index.js +1 -0
  164. package/dist/lib/loader/cdn.js +3 -0
  165. package/dist/lib/loader/index.cjs.js +3 -0
  166. package/dist/lib/loader/index.d.ts +13 -0
  167. package/dist/lib/loader/index.es2017.js +3 -0
  168. package/dist/lib/loader/index.js +4 -0
  169. package/dist/lib/loader/package.json +10 -0
  170. package/dist/lib/node_modules/@stencil/router/dist/collection/components/route/route.css +3 -0
  171. package/dist/lib/types/components/app-host/loading-page.d.ts +3 -0
  172. package/dist/lib/types/components/app-host/services/app-configuration.query.d.ts +11 -0
  173. package/dist/lib/types/components/app-host/services/app-configuration.service.d.ts +9 -0
  174. package/dist/lib/types/components/app-host/services/app-parameters.query.d.ts +10 -0
  175. package/dist/lib/types/components/app-host/services/app-parameters.service.d.ts +6 -0
  176. package/dist/lib/types/components/app-host/services/appinsights.service.d.ts +15 -0
  177. package/dist/lib/types/components/app-host/services/authentication.query.d.ts +13 -0
  178. package/dist/lib/types/components/app-host/services/authentication.service.d.ts +9 -0
  179. package/dist/lib/types/components/app-host/services/interop/host-interop.service.d.ts +7 -0
  180. package/dist/lib/types/components/app-host/services/interop/iframe-interop.service.d.ts +5 -0
  181. package/dist/lib/types/components/app-host/services/interop/react-native-interop.service.d.ts +7 -0
  182. package/dist/lib/types/components/app-host/services/interop.query.d.ts +11 -0
  183. package/dist/lib/types/components/app-host/services/session.store.d.ts +31 -0
  184. package/dist/lib/types/components/app-host/super-selection-app-host.d.ts +15 -0
  185. package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +96 -0
  186. package/dist/lib/types/components/super-campaign/super-campaign.d.ts +37 -0
  187. package/dist/lib/types/components/super-selection-app/api/api-client.d.ts +2 -0
  188. package/dist/lib/types/components/super-selection-app/api/event-tracking.api.d.ts +6 -0
  189. package/dist/lib/types/components/super-selection-app/api/super-campaign-errors-api.d.ts +6 -0
  190. package/dist/lib/types/components/super-selection-app/api/super-campaign-errors.api.dtos.d.ts +7 -0
  191. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +149 -0
  192. package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +16 -0
  193. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +233 -0
  194. package/dist/lib/types/components/super-selection-app/app-state-pages/success.d.ts +7 -0
  195. package/dist/lib/types/components/super-selection-app/existing-choice/existing-choice.d.ts +12 -0
  196. package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +5 -0
  197. package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.d.ts +10 -0
  198. package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.dto.d.ts +43 -0
  199. package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.d.ts +9 -0
  200. package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +30 -0
  201. package/dist/lib/types/components/super-selection-app/funds/custom-fund/default-fund/default-fund.d.ts +13 -0
  202. package/dist/lib/types/components/super-selection-app/funds/custom-fund/member-name-input.d.ts +14 -0
  203. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.d.ts +16 -0
  204. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.d.ts +13 -0
  205. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/abn-validation.d.ts +1 -0
  206. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/bankBsbNumbers.d.ts +112 -0
  207. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +29 -0
  208. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.d.ts +14 -0
  209. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.form.d.ts +15 -0
  210. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.d.ts +8 -0
  211. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/api/promoted-fund-choice.api.dto.d.ts +25 -0
  212. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate-choice.api.d.ts +6 -0
  213. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate-choice.api.dto.d.ts +8 -0
  214. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate.d.ts +4 -0
  215. package/dist/lib/types/components/super-selection-app/header-section/header-section.d.ts +4 -0
  216. package/dist/lib/types/components/super-selection-app/misc/button.d.ts +14 -0
  217. package/dist/lib/types/components/super-selection-app/misc/dropdown-async.d.ts +52 -0
  218. package/dist/lib/types/components/super-selection-app/misc/loading-indicator.d.ts +5 -0
  219. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-common.d.ts +9 -0
  220. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-display-field.d.ts +5 -0
  221. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-error-box.d.ts +5 -0
  222. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.d.ts +18 -0
  223. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-smsf.d.ts +28 -0
  224. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-my-own-fund.d.ts +30 -0
  225. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-smsf.d.ts +52 -0
  226. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-types.d.ts +95 -0
  227. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-warning-box.d.ts +4 -0
  228. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill.d.ts +14 -0
  229. package/dist/lib/types/components/super-selection-app/services/australian-fund-lookup.service.d.ts +8 -0
  230. package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +21 -0
  231. package/dist/lib/types/components/super-selection-app/services/existing-super-choice-info.service.d.ts +75 -0
  232. package/dist/lib/types/components/super-selection-app/services/misc.service.d.ts +6 -0
  233. package/dist/lib/types/components/super-selection-app/services/navigation.service.d.ts +17 -0
  234. package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +16 -0
  235. package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +38 -0
  236. package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +34 -0
  237. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +16 -0
  238. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.store.d.ts +42 -0
  239. package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +27 -0
  240. package/dist/lib/types/components.d.ts +503 -0
  241. package/dist/lib/types/global/init-host.d.ts +1 -0
  242. package/dist/lib/types/global/main.d.ts +1 -0
  243. package/dist/lib/types/global/main.dev.d.ts +1 -0
  244. package/dist/lib/types/global/stencil-router-workaround.d.ts +1 -0
  245. package/dist/lib/types/index.d.ts +2 -0
  246. package/dist/lib/types/stencil-public-runtime.d.ts +1555 -0
  247. package/dist/lib/types/utils/config.d.ts +2 -0
  248. package/dist/lib/types/utils/gtm.d.ts +7 -0
  249. package/dist/lib/types/utils/iframe.d.ts +13 -0
  250. package/dist/lib/types/utils/index.d.ts +4 -0
  251. package/dist/lib/types/utils/lazy.d.ts +12 -0
  252. package/dist/lib/types/utils/storage.d.ts +4 -0
  253. package/package.json +1 -1
@@ -0,0 +1,53 @@
1
+ import { createStore } from '@stencil/store';
2
+ import * as O from 'fp-ts/Option';
3
+ import { SuperSelectionAppRoutes } from '../../services/super-selection-app.routes';
4
+ var CustomFundTypes;
5
+ (function (CustomFundTypes) {
6
+ CustomFundTypes["MyOwnFund"] = "Your current super fund";
7
+ CustomFundTypes["DefaultFund"] = "Your employer's default fund";
8
+ CustomFundTypes["SelfManagedFund"] = "Your self-managed super fund";
9
+ })(CustomFundTypes || (CustomFundTypes = {}));
10
+ export const initialStateCustomFund = {
11
+ continueAllowed: false,
12
+ nextRoute: '/',
13
+ myOwnFundForm: {
14
+ fundUsi: O.none,
15
+ fundName: O.none,
16
+ memberNumber: O.none,
17
+ memberFirstName: O.none,
18
+ memberFamilyName: O.none
19
+ },
20
+ selfManagedFundForm: {
21
+ fundName: '',
22
+ fundAbn: '',
23
+ fundEsa: '',
24
+ addressLine1: '',
25
+ addressLine2: '',
26
+ state: '',
27
+ postcode: '',
28
+ city: '',
29
+ bankAccountName: '',
30
+ bsb: '',
31
+ bankAccountNumber: '',
32
+ memberFirstName: '',
33
+ memberFamilyName: ''
34
+ },
35
+ currentCustomFundType: CustomFundTypes.MyOwnFund,
36
+ customFunds: [
37
+ {
38
+ label: CustomFundTypes.MyOwnFund,
39
+ value: SuperSelectionAppRoutes.MyOwnFund
40
+ },
41
+ {
42
+ label: CustomFundTypes.SelfManagedFund,
43
+ value: SuperSelectionAppRoutes.SelfManagedFund
44
+ },
45
+ {
46
+ label: CustomFundTypes.DefaultFund,
47
+ value: SuperSelectionAppRoutes.DefaultFund
48
+ }
49
+ ]
50
+ };
51
+ const { state, reset } = createStore(initialStateCustomFund);
52
+ export const resetCustomFund = reset;
53
+ export default state;
@@ -0,0 +1,114 @@
1
+ import { Component, getAssetPath, h, Host, Prop, State } from '@stencil/core';
2
+ import * as O from 'fp-ts/lib/Option';
3
+ import australianFundLookupService from '../../../services/australian-fund-lookup.service';
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
+ export class DefaultFund {
10
+ constructor() {
11
+ this.defaultFundProductName = 'Loading fund...';
12
+ this.eventTrackingService = EventTrackingService.Instance;
13
+ }
14
+ async componentWillLoad() {
15
+ const defaultFundUsi = superSelectionAppService.defaultFundUsi;
16
+ if (O.isNone(defaultFundUsi)) {
17
+ return;
18
+ }
19
+ this.isDefaultFundExists = true;
20
+ const defaultFundSearchResult = await australianFundLookupService.getFundAsync(defaultFundUsi.value, true);
21
+ if (O.isNone(defaultFundSearchResult)) {
22
+ this.isInvalidDefaultFund = true;
23
+ return;
24
+ }
25
+ this.defaultFund = defaultFundSearchResult.value;
26
+ this.defaultFundProductName = defaultFundSearchResult.value.productName;
27
+ }
28
+ componentDidLoad() {
29
+ var _a, _b, _c, _d;
30
+ return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({
31
+ fundUsi: (_b = (_a = this.defaultFund) === null || _a === void 0 ? void 0 : _a.usi) !== null && _b !== void 0 ? _b : '',
32
+ fundName: (_d = (_c = this.defaultFund) === null || _c === void 0 ? void 0 : _c.productName) !== null && _d !== void 0 ? _d : '',
33
+ promotedFundsShown: superSelectionAppService.promotedFunds,
34
+ defaultFundUsiSet: O.toUndefined(superSelectionAppService.defaultFundUsi)
35
+ });
36
+ }
37
+ render() {
38
+ return (h(Host, null,
39
+ h("sss-header-section", { currentPage: "own-fund" }),
40
+ h("div", { class: "flex justify-center mt-11" },
41
+ h("sss-custom-fund", null,
42
+ h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" },
43
+ h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"),
44
+ (!this.isDefaultFundExists || this.isInvalidDefaultFund) && (h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3" },
45
+ h("div", { class: "flex" },
46
+ h("div", { class: "flex-shrink-0" },
47
+ h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })),
48
+ h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" },
49
+ h("span", null, "It looks like your employer has not specified a default fund, please contact them if you\u2019d like to use your company\u2019s default fund."))))),
50
+ this.isDefaultFundExists && !this.isInvalidDefaultFund && (h("div", null,
51
+ h("div", { class: "mt-3" },
52
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Fund Name"),
53
+ h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm" }, this.defaultFundProductName)),
54
+ h("div", { class: "mt-3" },
55
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Fund USI"),
56
+ h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm" }, this.defaultFund.usi)),
57
+ h("div", { class: "mt-8 mb-8 h-px w-full bg-gray-200" }),
58
+ h("div", { class: "text-sm text-gray-700" },
59
+ h("label", { class: "font-semibold text-gray-900" }, "By clicking \u201CContinue\u201D, you acknowledge that:"),
60
+ h("ul", { class: "list-disc list-outside pl-5" },
61
+ h("li", { class: "mt-2" }, "you are choosing to join your employer\u2019s default super fund;"),
62
+ h("li", { class: "mt-2" }, "your employer will open a new account for you with their default super fund; and"),
63
+ h("li", { class: "mt-2" }, "your application to join is subject to Trustee approval.")))))),
64
+ h("div", { class: "flex justify-center mt-8" },
65
+ h("div", { class: "sm:max-w-320 w-full" },
66
+ this.isDefaultFundExists && !this.isInvalidDefaultFund && (h("div", { class: "mb-4" },
67
+ h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm() }, "Continue"))),
68
+ h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
69
+ h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back"))))))));
70
+ }
71
+ async handleSubmitForm() {
72
+ if (this.isInvalidDefaultFund) {
73
+ return;
74
+ }
75
+ navigationService.navigateInternallyToStandardChoice({
76
+ history: this.history,
77
+ fundName: `Employer’s default fund`,
78
+ fundDetails: {
79
+ type: 'default',
80
+ fundName: this.defaultFundProductName,
81
+ fundUsi: this.defaultFund.usi
82
+ },
83
+ handleSubmitFn: async (standardChoiceFormSignature) => {
84
+ await customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({ standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig));
85
+ }
86
+ });
87
+ }
88
+ static get is() { return "sss-default-fund"; }
89
+ static get properties() { return {
90
+ "history": {
91
+ "type": "unknown",
92
+ "mutable": false,
93
+ "complexType": {
94
+ "original": "RouterHistory",
95
+ "resolved": "RouterHistory",
96
+ "references": {
97
+ "RouterHistory": {
98
+ "location": "import",
99
+ "path": "@stencil/router"
100
+ }
101
+ }
102
+ },
103
+ "required": false,
104
+ "optional": false,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": ""
108
+ }
109
+ }
110
+ }; }
111
+ static get states() { return {
112
+ "defaultFundProductName": {}
113
+ }; }
114
+ }
@@ -0,0 +1,162 @@
1
+ import { Component, Event, h, Host, Prop, State } from '@stencil/core';
2
+ export class MemberNameInput {
3
+ constructor() {
4
+ this.value = '';
5
+ this.name = '';
6
+ this.readableName = '';
7
+ this.showValidationErrors = false;
8
+ this.errorMessage = '';
9
+ // Pattern for name validation
10
+ this.NAME_PATTERN = "[A-Za-z]+(( |-)[A-Za-z][A-Za-z']+)*\\s*$";
11
+ }
12
+ render() {
13
+ return (h(Host, null,
14
+ h("input", { "data-testid": this.testId, type: "text", class: {
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
+ 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
17
+ .showValidationErrors
18
+ }, required: true, pattern: this.NAME_PATTERN, name: this.name, value: this.value, onInput: (ev) => this.handleInput(ev) }),
19
+ this.errorMessage && (h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, this.errorMessage))));
20
+ }
21
+ handleInput(ev) {
22
+ const target = ev.target;
23
+ target.value = target.value.replace(/\s+/g, ' ');
24
+ this.validateInput(target);
25
+ this.myInputChange.emit(target.value.trim());
26
+ }
27
+ validateInput(target) {
28
+ if (!target.checkValidity()) {
29
+ if (target.validity.valueMissing) {
30
+ this.errorMessage = `${this.readableName} is required.`;
31
+ }
32
+ else if (target.validity.patternMismatch) {
33
+ if (target.value.startsWith('-') || target.value.startsWith("'")) {
34
+ this.errorMessage = `${this.readableName} must start with a letter.`;
35
+ }
36
+ else if (target.value.includes('--')) {
37
+ this.errorMessage = `${this.readableName} must not have a double hypen.`;
38
+ }
39
+ else {
40
+ this.errorMessage = `${this.readableName} contains unsupported characters.`;
41
+ }
42
+ }
43
+ else {
44
+ this.errorMessage = 'Invalid input.';
45
+ }
46
+ }
47
+ else {
48
+ this.errorMessage = '';
49
+ }
50
+ }
51
+ static get is() { return "sss-name-input"; }
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
+ },
70
+ "value": {
71
+ "type": "string",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "string",
75
+ "resolved": "string",
76
+ "references": {}
77
+ },
78
+ "required": false,
79
+ "optional": false,
80
+ "docs": {
81
+ "tags": [],
82
+ "text": ""
83
+ },
84
+ "attribute": "value",
85
+ "reflect": false,
86
+ "defaultValue": "''"
87
+ },
88
+ "name": {
89
+ "type": "string",
90
+ "mutable": false,
91
+ "complexType": {
92
+ "original": "string",
93
+ "resolved": "string",
94
+ "references": {}
95
+ },
96
+ "required": false,
97
+ "optional": false,
98
+ "docs": {
99
+ "tags": [],
100
+ "text": ""
101
+ },
102
+ "attribute": "name",
103
+ "reflect": false,
104
+ "defaultValue": "''"
105
+ },
106
+ "readableName": {
107
+ "type": "string",
108
+ "mutable": false,
109
+ "complexType": {
110
+ "original": "string",
111
+ "resolved": "string",
112
+ "references": {}
113
+ },
114
+ "required": false,
115
+ "optional": false,
116
+ "docs": {
117
+ "tags": [],
118
+ "text": ""
119
+ },
120
+ "attribute": "readable-name",
121
+ "reflect": false,
122
+ "defaultValue": "''"
123
+ },
124
+ "showValidationErrors": {
125
+ "type": "boolean",
126
+ "mutable": false,
127
+ "complexType": {
128
+ "original": "boolean",
129
+ "resolved": "boolean",
130
+ "references": {}
131
+ },
132
+ "required": false,
133
+ "optional": false,
134
+ "docs": {
135
+ "tags": [],
136
+ "text": ""
137
+ },
138
+ "attribute": "show-validation-errors",
139
+ "reflect": false,
140
+ "defaultValue": "false"
141
+ }
142
+ }; }
143
+ static get states() { return {
144
+ "errorMessage": {}
145
+ }; }
146
+ static get events() { return [{
147
+ "method": "myInputChange",
148
+ "name": "myInputChange",
149
+ "bubbles": true,
150
+ "cancelable": true,
151
+ "composed": true,
152
+ "docs": {
153
+ "tags": [],
154
+ "text": ""
155
+ },
156
+ "complexType": {
157
+ "original": "any",
158
+ "resolved": "any",
159
+ "references": {}
160
+ }
161
+ }]; }
162
+ }
@@ -0,0 +1,143 @@
1
+ import { Component, Event, h, Prop, State } from '@stencil/core';
2
+ import * as O from 'fp-ts/Option';
3
+ import australianFundLookupService from '../../../services/australian-fund-lookup.service';
4
+ import customFundState from '../custom-fund.store';
5
+ export class MyOwnFundInputs {
6
+ constructor() {
7
+ this.MIN_SEARCH_STRING_LENGTH = 3;
8
+ this.MAX_RECORD_COUNT = 25;
9
+ this.searchFundsAsync = async (searchBy) => {
10
+ const response = await australianFundLookupService.searchFundsAsync(searchBy, this.MAX_RECORD_COUNT);
11
+ switch (response.result) {
12
+ case 'TooManyResults': {
13
+ return { kind: 'too-many-results' };
14
+ }
15
+ default: {
16
+ const funds = response.data
17
+ .sort((a, b) => a.productName.localeCompare(b.productName))
18
+ .map((fund) => ({
19
+ label: `${fund.productName} (${fund.usi})`,
20
+ value: fund.usi
21
+ }));
22
+ return { kind: 'success', value: funds };
23
+ }
24
+ }
25
+ };
26
+ if (O.isSome(this.myOwnFundForm.fundUsi) && O.isSome(this.myOwnFundForm.fundName)) {
27
+ this.selectedOption = {
28
+ label: this.myOwnFundForm.fundName.value,
29
+ value: this.myOwnFundForm.fundUsi.value
30
+ };
31
+ }
32
+ }
33
+ render() {
34
+ return (h("div", null,
35
+ h("div", null,
36
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"),
37
+ h("div", { class: "mt-1" },
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
+ this.selectedOption = ev.detail;
40
+ this.updateFund(ev.detail);
41
+ }, showValidationErrors: this.showValidationErrors })),
42
+ O.isSome(this.myOwnFundForm.fundUsi) && (h("div", { class: "mt-3" },
43
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Fund USI"),
44
+ h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm" }, this.myOwnFundForm.fundUsi.value)))),
45
+ h("div", { class: "mt-3" },
46
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Member number"),
47
+ h("div", { class: "mt-1" },
48
+ h("input", { "data-testid": "member-number-input", type: "text", class: {
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
+ 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
51
+ .showValidationErrors
52
+ }, required: true, pattern: "[A-Za-z0-9]{4,16}", name: "memberNumber", id: "memberNumber", value: O.toUndefined(customFundState.myOwnFundForm.memberNumber), onChange: (ev) => this.updateMemberNumber(ev.target.value.trim()) }),
53
+ h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid member number (only numbers and / or letters)"))),
54
+ h("div", { class: "flex space-x-4" },
55
+ h("div", { class: "mt-3 w-1/2" },
56
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"),
57
+ h("div", { class: "mt-1" },
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
+ h("div", { class: "mt-3 w-1/2" },
60
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"),
61
+ h("div", { class: "mt-1" },
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
+ }
64
+ updateFund(fund) {
65
+ this.formChanged.emit({ fundUsi: O.some(fund.value), fundName: O.some(fund.label) });
66
+ }
67
+ updateMemberNumber(memberNumber) {
68
+ this.formChanged.emit({ memberNumber: O.some(memberNumber) });
69
+ }
70
+ updateMemberFirstName(memberFirstName) {
71
+ this.formChanged.emit({ memberFirstName: O.some(memberFirstName) });
72
+ }
73
+ updateMemberFamilyName(memberFamilyName) {
74
+ this.formChanged.emit({ memberFamilyName: O.some(memberFamilyName) });
75
+ }
76
+ static get is() { return "sss-my-own-fund-inputs"; }
77
+ static get properties() { return {
78
+ "myOwnFundForm": {
79
+ "type": "unknown",
80
+ "mutable": false,
81
+ "complexType": {
82
+ "original": "MyOwnFundFormState",
83
+ "resolved": "{ fundUsi: Option<string>; fundName: Option<string>; memberNumber: Option<string>; memberFirstName: Option<string>; memberFamilyName: Option<string>; }",
84
+ "references": {
85
+ "MyOwnFundFormState": {
86
+ "location": "import",
87
+ "path": "../custom-fund.store"
88
+ }
89
+ }
90
+ },
91
+ "required": false,
92
+ "optional": false,
93
+ "docs": {
94
+ "tags": [],
95
+ "text": ""
96
+ }
97
+ },
98
+ "showValidationErrors": {
99
+ "type": "boolean",
100
+ "mutable": false,
101
+ "complexType": {
102
+ "original": "boolean",
103
+ "resolved": "boolean",
104
+ "references": {}
105
+ },
106
+ "required": false,
107
+ "optional": false,
108
+ "docs": {
109
+ "tags": [],
110
+ "text": ""
111
+ },
112
+ "attribute": "show-validation-errors",
113
+ "reflect": false
114
+ }
115
+ }; }
116
+ static get states() { return {
117
+ "selectedOption": {}
118
+ }; }
119
+ static get events() { return [{
120
+ "method": "formChanged",
121
+ "name": "formChanged",
122
+ "bubbles": true,
123
+ "cancelable": true,
124
+ "composed": true,
125
+ "docs": {
126
+ "tags": [],
127
+ "text": ""
128
+ },
129
+ "complexType": {
130
+ "original": "Partial<MyOwnFundFormState>",
131
+ "resolved": "{ fundUsi?: None | Some<string> | undefined; fundName?: None | Some<string> | undefined; memberNumber?: None | Some<string> | undefined; memberFirstName?: None | Some<string> | undefined; memberFamilyName?: None | Some<string> | undefined; }",
132
+ "references": {
133
+ "Partial": {
134
+ "location": "global"
135
+ },
136
+ "MyOwnFundFormState": {
137
+ "location": "import",
138
+ "path": "../custom-fund.store"
139
+ }
140
+ }
141
+ }
142
+ }]; }
143
+ }
@@ -0,0 +1,118 @@
1
+ import { Component, getAssetPath, h, Host, Prop, State } from '@stencil/core';
2
+ import { injectHistory } from '@stencil/router';
3
+ import { pipe } from 'fp-ts/lib/function';
4
+ import * as O from 'fp-ts/Option';
5
+ import { EventTrackingService } from '../../../services/event-tracking.service';
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
+ import customFundChoiceApi from '../api/custom-fund-choice.api';
10
+ import customFundState from '../custom-fund.store';
11
+ export class MyOwnFund {
12
+ constructor() {
13
+ this.isNotAllInformationProvidedMessageVisible = false;
14
+ this.isSubmitDisabled = true;
15
+ this.eventTrackingService = EventTrackingService.Instance;
16
+ }
17
+ componentDidLoad() {
18
+ return this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({
19
+ promotedFundsShown: superSelectionAppService.promotedFunds,
20
+ defaultFundUsiSet: O.toUndefined(superSelectionAppService.defaultFundUsi)
21
+ });
22
+ }
23
+ render() {
24
+ const isSuperCampaignFallbackActivated = superSelectionAppService.isSuperCampaignFallbackActivated;
25
+ return (h(Host, null,
26
+ h("sss-header-section", { currentPage: "own-fund" }),
27
+ h("div", { class: "flex justify-center mt-11" },
28
+ h("sss-custom-fund", null,
29
+ h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
30
+ 'was-validated': this.formState === 'validated'
31
+ }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) },
32
+ h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" },
33
+ h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"),
34
+ h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4" },
35
+ h("div", { class: "flex" },
36
+ h("div", { class: "flex-shrink-0" },
37
+ h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })),
38
+ h("div", { class: "ml-2" },
39
+ h("ul", { class: "list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5" },
40
+ h("li", null, "Make sure you are a current member of the fund before completing this step."),
41
+ h("li", null, "Please check that the fund USI is correct as some funds have similar names."))))),
42
+ h("sss-my-own-fund-inputs", { myOwnFundForm: customFundState.myOwnFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
43
+ customFundState.myOwnFundForm = Object.assign(Object.assign({}, customFundState.myOwnFundForm), event.detail);
44
+ this.isNotAllInformationProvidedMessageVisible = false;
45
+ } }),
46
+ this.isNotAllInformationProvidedMessageVisible && (h("div", { class: "mt-4 rounded-md bg-red-50 p-4 text-sm text-red-700" }, "All fields are required to complete submission. Make sure you have selected a fund."))),
47
+ h("div", { class: "flex justify-center mt-8" },
48
+ h("div", { class: "sm:max-w-320 w-full" },
49
+ h("div", { class: "mb-4", onClick:
50
+ // user clicks on disabled button (div wrapper) then validation errors will show
51
+ () => (this.formState = 'validated') },
52
+ h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")),
53
+ !isSuperCampaignFallbackActivated && (h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
54
+ h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back"))))))))));
55
+ }
56
+ async handleSubmitForm() {
57
+ this.formState = 'validated';
58
+ if (!this.formElement.checkValidity()) {
59
+ return;
60
+ }
61
+ const isAllInformationProvided = O.isSome(customFundState.myOwnFundForm.fundUsi) &&
62
+ O.isSome(customFundState.myOwnFundForm.memberNumber) &&
63
+ O.isSome(customFundState.myOwnFundForm.memberFirstName) &&
64
+ O.isSome(customFundState.myOwnFundForm.memberFamilyName);
65
+ if (!isAllInformationProvided) {
66
+ this.isNotAllInformationProvidedMessageVisible = true;
67
+ return;
68
+ }
69
+ navigationService.navigateInternallyToStandardChoice({
70
+ history: this.history,
71
+ fundName: this.getOrError(customFundState.myOwnFundForm.fundName),
72
+ fundDetails: {
73
+ type: 'myOwnFund',
74
+ fundName: this.getOrError(customFundState.myOwnFundForm.fundName),
75
+ fundUsi: this.getOrError(customFundState.myOwnFundForm.fundUsi),
76
+ memberNumber: this.getOrError(customFundState.myOwnFundForm.memberNumber)
77
+ },
78
+ handleSubmitFn: async (standardChoiceFormSignature) => {
79
+ 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);
80
+ await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
81
+ }
82
+ });
83
+ }
84
+ getOrError(option) {
85
+ return pipe(option, O.getOrElse(() => {
86
+ throw new Error('Option value is none.');
87
+ }));
88
+ }
89
+ static get is() { return "sss-my-own-fund"; }
90
+ static get properties() { return {
91
+ "history": {
92
+ "type": "unknown",
93
+ "mutable": false,
94
+ "complexType": {
95
+ "original": "RouterHistory",
96
+ "resolved": "RouterHistory",
97
+ "references": {
98
+ "RouterHistory": {
99
+ "location": "import",
100
+ "path": "@stencil/router"
101
+ }
102
+ }
103
+ },
104
+ "required": false,
105
+ "optional": false,
106
+ "docs": {
107
+ "tags": [],
108
+ "text": ""
109
+ }
110
+ }
111
+ }; }
112
+ static get states() { return {
113
+ "formState": {},
114
+ "isNotAllInformationProvidedMessageVisible": {},
115
+ "isSubmitDisabled": {}
116
+ }; }
117
+ }
118
+ injectHistory(MyOwnFund);
@@ -0,0 +1,11 @@
1
+ export function validateAbn(abn) {
2
+ const digitArray = abn.split('').map(Number);
3
+ const isAllDigits = digitArray.every((d) => !isNaN(d));
4
+ const weightingFactors = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
5
+ if (!isAllDigits || digitArray.length !== weightingFactors.length) {
6
+ return false;
7
+ }
8
+ digitArray[0]--;
9
+ const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
10
+ return sum % 89 === 0;
11
+ }