@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
@@ -1,4 +1,4 @@
1
- import { Component, h, Host, Prop, State } from '@stencil/core';
1
+ import { Component, getAssetPath, h, Host, Prop, State } from '@stencil/core';
2
2
  import { injectHistory } from '@stencil/router';
3
3
  import { pipe } from 'fp-ts/lib/function';
4
4
  import * as O from 'fp-ts/Option';
@@ -11,6 +11,7 @@ import customFundState from '../custom-fund.store';
11
11
  export class MyOwnFund {
12
12
  constructor() {
13
13
  this.isNotAllInformationProvidedMessageVisible = false;
14
+ this.isSubmitDisabled = true;
14
15
  this.eventTrackingService = EventTrackingService.Instance;
15
16
  }
16
17
  componentDidLoad() {
@@ -19,33 +20,34 @@ export class MyOwnFund {
19
20
  });
20
21
  }
21
22
  render() {
22
- return (h(Host, { class: "d-flex flex-fill" },
23
- h("sss-custom-fund", { class: "flex-fill" },
24
- h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
25
- 'was-validated': this.formState === 'validated'
26
- }, ref: (el) => (this.formElement = el) },
27
- h("div", { class: "card p-4" },
28
- h("p", { class: "font-weight-bold" }, "Fund details"),
29
- h("p", { class: "text-warning mb-4 small" }, "Make sure you are already a member of the fund before completing this step."),
30
- h("sss-my-own-fund-inputs", { myOwnFundForm: customFundState.myOwnFundForm, onFormChanged: (event) => {
31
- customFundState.myOwnFundForm = Object.assign(Object.assign({}, customFundState.myOwnFundForm), event.detail);
32
- this.isNotAllInformationProvidedMessageVisible = false;
33
- } })),
34
- h("sss-standard-choice-form", { onStandardChoiceFormSignatureUpdated: (event) => {
35
- customFundState.myOwnFundForm = Object.assign(Object.assign({}, customFundState.myOwnFundForm), { standardChoiceFormSignature: O.fromNullable(event.detail.standardChoiceFormSignature) });
36
- } })),
37
- h("div", { class: "mt-4" },
38
- h("sss-notifications-section", null)),
39
- this.isNotAllInformationProvidedMessageVisible && (h("div", { class: "mt-4 alert alert-danger", role: "alert" }, "All fields are required to complete submission. Make sure you have selected a fund.")),
40
- h("div", { class: "d-flex mt-4" },
41
- h("div", { class: "flex-grow-1 w-50" },
42
- h("div", { class: "mr-2" },
43
- h("fl-button", { onClick: () => navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage), isBlockElement: true, variant: "secondary" },
44
- h("span", null, "Back")))),
45
- h("div", { class: "flex-grow-1 w-50" },
46
- h("div", { class: "ml-2" },
47
- h("fl-promise-button", { isBlockElement: true, promiseFn: () => this.handleSubmitForm() },
48
- h("span", null, "Save and continue"))))))));
23
+ return (h(Host, null,
24
+ h("sss-header-section", { currentPage: "own-fund" }),
25
+ h("div", { class: "flex justify-center mt-11" },
26
+ h("sss-custom-fund", null,
27
+ h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
28
+ 'was-validated': this.formState === 'validated'
29
+ }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) },
30
+ h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg" },
31
+ h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"),
32
+ h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4" },
33
+ h("div", { class: "flex" },
34
+ h("div", { class: "flex-shrink-0" },
35
+ h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })),
36
+ h("div", { class: "ml-2" },
37
+ h("ul", { class: "list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5" },
38
+ h("li", null, "Make sure you are a current member of the fund before completing this step."),
39
+ h("li", null, "Please check that the fund USI is correct as some funds have similar names."))))),
40
+ h("sss-my-own-fund-inputs", { myOwnFundForm: customFundState.myOwnFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
41
+ customFundState.myOwnFundForm = Object.assign(Object.assign({}, customFundState.myOwnFundForm), event.detail);
42
+ this.isNotAllInformationProvidedMessageVisible = false;
43
+ } }),
44
+ this.isNotAllInformationProvidedMessageVisible && (h("div", { class: "mt-4 rounded-md bg-red-50 p-4 text-sm text-red-700" }, "All fields are required to complete submission. Make sure you have selected a fund."))),
45
+ h("div", { class: "flex justify-center mt-8" },
46
+ h("div", { class: "sm:max-w-320 w-full" },
47
+ h("div", { class: "mb-4" },
48
+ h("sss-button", { fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")),
49
+ h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
50
+ h("sss-button", { fillWidth: true, variant: "secondary" }, "Back")))))))));
49
51
  }
50
52
  async handleSubmitForm() {
51
53
  this.formState = 'validated';
@@ -53,20 +55,23 @@ export class MyOwnFund {
53
55
  return;
54
56
  }
55
57
  const isAllInformationProvided = O.isSome(customFundState.myOwnFundForm.fundUsi) &&
56
- O.isSome(customFundState.myOwnFundForm.memberNumber) &&
57
- O.isSome(customFundState.myOwnFundForm.standardChoiceFormSignature);
58
+ O.isSome(customFundState.myOwnFundForm.memberNumber);
58
59
  if (!isAllInformationProvided) {
59
60
  this.isNotAllInformationProvidedMessageVisible = true;
60
61
  return;
61
62
  }
62
- const customFundChoiceDto = {
63
- fundUsi: this.getOrError(customFundState.myOwnFundForm.fundUsi),
64
- memberNumber: this.getOrError(customFundState.myOwnFundForm.memberNumber),
65
- standardChoiceFormSignature: this.getOrError(customFundState.myOwnFundForm.standardChoiceFormSignature)
66
- };
67
- await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
68
- superSelectionAppService.markSuperSelectionAsSubmitted();
69
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.Success);
63
+ navigationService.navigateInternallyToStandardChoice({
64
+ history: this.history,
65
+ fundName: this.getOrError(customFundState.myOwnFundForm.fundName),
66
+ handleSubmitFn: async (standardChoiceFormSignature) => {
67
+ const customFundChoiceDto = {
68
+ fundUsi: this.getOrError(customFundState.myOwnFundForm.fundUsi),
69
+ memberNumber: this.getOrError(customFundState.myOwnFundForm.memberNumber),
70
+ standardChoiceFormSignature
71
+ };
72
+ await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
73
+ }
74
+ });
70
75
  }
71
76
  getOrError(option) {
72
77
  return pipe(option, O.getOrElse(() => {
@@ -74,7 +79,6 @@ export class MyOwnFund {
74
79
  }));
75
80
  }
76
81
  static get is() { return "sss-my-own-fund"; }
77
- static get assetsDirs() { return ["assets"]; }
78
82
  static get properties() { return {
79
83
  "history": {
80
84
  "type": "unknown",
@@ -99,7 +103,8 @@ export class MyOwnFund {
99
103
  }; }
100
104
  static get states() { return {
101
105
  "formState": {},
102
- "isNotAllInformationProvidedMessageVisible": {}
106
+ "isNotAllInformationProvidedMessageVisible": {},
107
+ "isSubmitDisabled": {}
103
108
  }; }
104
109
  }
105
110
  injectHistory(MyOwnFund);
@@ -1,10 +1,11 @@
1
1
  import { Component, Event, h, Prop, State } from '@stencil/core';
2
- import { isSome, none, some } from 'fp-ts/Option';
2
+ import { isNone, isSome, none, some } from 'fp-ts/Option';
3
3
  import customFundState from '../custom-fund.store';
4
4
  import bsbNumbers from './bankBsbNumbers';
5
5
  export class SelfManagedFundInputs {
6
6
  constructor() {
7
7
  this.currentBank = none;
8
+ this.addressErrorMessage = none;
8
9
  this.stateOptions = [
9
10
  { value: 'NSW', label: 'NSW' },
10
11
  { value: 'QLD', label: 'QLD' },
@@ -19,61 +20,72 @@ export class SelfManagedFundInputs {
19
20
  this.bankAccountNumberRegex = new RegExp(/^[0-9]{2,10}$/);
20
21
  }
21
22
  render() {
23
+ const inputClass = {
24
+ 'relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-sm border-gray-300 rounded-md focus:z-10': true,
25
+ 'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
26
+ .showValidationErrors
27
+ };
22
28
  return (h("div", null,
23
- h("div", { class: "mt-4" },
24
- h("label", { class: "mb-2 font-weight-bold" }, "Fund name *"),
25
- h("input", { placeholder: "Enter your fund name", type: "text", class: "form-control", required: true, minlength: "2", name: "fundName", id: "fundName", value: customFundState.selfManagedFundForm.fundName, onChange: (ev) => this.updateFormField('fundName', ev.target.value.trim()) }),
26
- h("div", { class: "invalid-feedback" }, "Enter a valid fund name")),
27
- h("div", { class: "mt-4" },
28
- h("label", { class: "mb-2 font-weight-bold" }, "Fund ABN *"),
29
- h("input", { placeholder: "Enter your fund ABN", type: "text", class: "form-control", required: true, minlength: "2", name: "fundAbn", id: "fundAbn", value: customFundState.selfManagedFundForm.fundAbn, onChange: (ev) => this.updateFormField('fundAbn', ev.target.value.trim()) }),
30
- h("div", { class: "invalid-feedback" }, "Enter a valid fund ABN")),
31
- h("div", { class: "mt-4" },
32
- h("label", { class: "mb-2 font-weight-bold" }, "Electronic service address alias (ESA) *"),
33
- h("input", { placeholder: "Enter your ESA", type: "text", class: "form-control", required: true, minlength: "2", name: "fundEsa", id: "fundEsa", value: customFundState.selfManagedFundForm.fundEsa, onChange: (ev) => this.updateFormField('fundEsa', ev.target.value.trim()) }),
34
- h("div", { class: "invalid-feedback" }, "Enter a valid fund ESA")),
35
- h("div", { class: "mt-4" },
36
- h("label", { class: "mb-2 font-weight-bold" }, "Address line 1 *"),
37
- h("input", { placeholder: "Enter your address", type: "text", class: "form-control", required: true, minlength: "2", name: "addressLine1", id: "addressLine1", value: customFundState.selfManagedFundForm.addressLine1, onChange: (ev) => this.updateFormField('addressLine1', ev.target.value.trim()) }),
38
- h("div", { class: "invalid-feedback" }, "Enter a valid address")),
39
- h("div", { class: "mt-4" },
40
- h("label", { class: "mb-2 font-weight-bold" }, "Address line 2 (optional)"),
41
- h("input", { placeholder: "Enter your address", type: "text", class: "form-control", name: "addressLine2", id: "addressLine2", value: customFundState.selfManagedFundForm.addressLine2, onChange: (ev) => this.updateFormField('addressLine2', ev.target.value.trim()) }),
42
- h("div", { class: "invalid-feedback" }, "Enter a valid address")),
43
- h("div", { class: "mt-4" },
44
- h("label", { class: "mb-2 font-weight-bold" }, "City/suburb *"),
45
- h("input", { placeholder: "Enter your city", type: "text", class: "form-control", name: "city", required: true, id: "city", value: customFundState.selfManagedFundForm.city, onChange: (ev) => this.updateFormField('city', ev.target.value.trim()) }),
46
- h("div", { class: "invalid-feedback" }, "Enter a valid city/suburb *")),
47
- h("div", { class: "mt-3" },
48
- h("label", { class: "mb-2 font-weight-bold" }, "State *"),
49
- h("select", { class: "form-control", name: "state", required: true, id: "state", onChange: (ev) => {
50
- this.updateFormField('state', ev.target.value.trim());
51
- } },
52
- h("option", { disabled: true, selected: !this.fundForm.state, value: "" }, "Select a state"),
53
- this.stateOptions.map((s) => (h("option", { value: s.value, selected: this.fundForm.state === s.value }, s.label)))),
54
- h("div", { class: "invalid-feedback" }, "Select a state")),
55
- h("div", { class: "mt-4" },
56
- h("label", { class: "mb-2 font-weight-bold" }, "Post code *"),
57
- h("input", { placeholder: "Enter your post code", type: "text", required: true, class: "form-control", name: "postcode", minlength: "4", maxlength: "4", pattern: "[0-9]{4}", id: "postcode", value: customFundState.selfManagedFundForm.postcode, onChange: (ev) => this.updateFormField('postcode', ev.target.value.trim()) }),
58
- h("div", { class: "invalid-feedback" }, "Enter a valid post code")),
59
29
  h("div", null,
60
- h("i", { class: "fas fa-check-circle" })),
61
- h("div", { class: "mt-4" },
62
- h("label", { class: "mb-2 font-weight-bold" }, "BSB *"),
63
- h("input", { placeholder: "Enter your BSB", type: "text", required: true, class: "form-control", name: "bsb", id: "bsb", minlength: "6", maxlength: "7", onKeyUp: (ev) => this.updateCurrentBank(ev), pattern: this.bsbRegex.source, value: customFundState.selfManagedFundForm.bsb }),
64
- isSome(this.currentBank) && (h("p", { class: "mt-3" },
65
- h("strong", null, "Bank name"),
66
- h("br", null),
67
- h("span", { class: "ml-2" }, this.currentBank.value))),
68
- h("div", { class: "invalid-feedback" }, "Enter a valid BSB")),
69
- h("div", { class: "mt-4" },
70
- h("label", { class: "mb-2 font-weight-bold" }, "Bank account name *"),
71
- h("input", { placeholder: "Enter your bank account name", type: "text", required: true, class: "form-control", name: "bankAccountName", minlength: "2", id: "bankAccountName", value: customFundState.selfManagedFundForm.bankAccountName, onChange: (ev) => this.updateFormField('bankAccountName', ev.target.value.trim()) }),
72
- h("div", { class: "invalid-feedback" }, "Enter a valid bank account name")),
73
- h("div", { class: "mt-4" },
74
- h("label", { class: "mb-2 font-weight-bold" }, "Bank account number *"),
75
- h("input", { placeholder: "Enter your bank account number", type: "text", required: true, class: "form-control", name: "bankAccountNumber", id: "bankAccountNumber", minlength: "2", maxlength: "11", pattern: this.bankAccountNumberRegex.source, value: customFundState.selfManagedFundForm.bankAccountNumber, onKeyUp: (ev) => this.updateCurrentBankAccountNumber(ev), onChange: (ev) => this.updateFormField('bankAccountNumber', ev.target.value.trim()) }),
76
- h("div", { class: "invalid-feedback" }, "Enter a valid bank account number"))));
30
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"),
31
+ h("div", { class: "mt-1" },
32
+ h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundName", id: "fundName", value: customFundState.selfManagedFundForm.fundName, onChange: (ev) => this.updateFormField('fundName', ev.target.value.trim()) }),
33
+ h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund name"))),
34
+ h("div", { class: "mt-3" },
35
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Fund ABN"),
36
+ h("div", { class: "mt-1" },
37
+ h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundAbn", id: "fundAbn", value: customFundState.selfManagedFundForm.fundAbn, onChange: (ev) => this.updateFormField('fundAbn', ev.target.value.trim()) }),
38
+ h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund ABN"))),
39
+ h("div", { class: "mt-3" },
40
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Electronic service address alias (ESA)"),
41
+ h("div", { class: "mt-1" },
42
+ h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundEsa", id: "fundEsa", value: customFundState.selfManagedFundForm.fundEsa, onChange: (ev) => this.updateFormField('fundEsa', ev.target.value.trim()) }),
43
+ h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund ESA"))),
44
+ h("div", { class: "mt-3" },
45
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Fund address"),
46
+ h("div", { class: "mt-1 rounded-md shadow-sm -space-y-px" },
47
+ h("input", { placeholder: "Address line 1", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-t-md shadow-none': true }), required: true, minlength: "2", name: "addressLine1", id: "addressLine1", value: customFundState.selfManagedFundForm.addressLine1, onChange: (ev) => {
48
+ this.updateFormField('addressLine1', ev.target.value.trim());
49
+ this.updateAddressErrorMessage();
50
+ }, ref: (el) => (this.addressLine1Element = el) }),
51
+ h("input", { placeholder: "Address line 2 (optional)", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "addressLine2", id: "addressLine2", value: customFundState.selfManagedFundForm.addressLine2, onChange: (ev) => this.updateFormField('addressLine2', ev.target.value.trim()) }),
52
+ h("input", { placeholder: "City/suburb", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "city", required: true, id: "city", value: customFundState.selfManagedFundForm.city, onChange: (ev) => {
53
+ this.updateFormField('city', ev.target.value.trim());
54
+ this.updateAddressErrorMessage();
55
+ }, ref: (el) => (this.cityElement = el) }),
56
+ h("div", { class: "flex -space-x-px" },
57
+ h("div", { class: "w-1/2 flex-1 min-w-0" },
58
+ h("input", { placeholder: "Postcode", type: "text", required: true, class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-bl-md shadow-none': true }), name: "postcode", minlength: "4", maxlength: "4", pattern: "[0-9]{4}", id: "postcode", value: customFundState.selfManagedFundForm.postcode, onChange: (ev) => {
59
+ this.updateFormField('postcode', ev.target.value.trim());
60
+ this.updateAddressErrorMessage();
61
+ }, ref: (el) => (this.postcodeElement = el) })),
62
+ h("div", { class: "flex-1 min-w-0" },
63
+ h("select", { class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-br-md shadow-none': true, 'text-gray-500': !this.fundForm.state }), name: "state", required: true, id: "state", onChange: (ev) => {
64
+ this.updateFormField('state', ev.target.value.trim());
65
+ this.updateAddressErrorMessage();
66
+ }, ref: (el) => (this.stateElement = el) },
67
+ h("option", { disabled: true, selected: !this.fundForm.state, value: "" }, "State"),
68
+ this.stateOptions.map((s) => (h("option", { value: s.value, selected: this.fundForm.state === s.value }, s.label))))))),
69
+ isSome(this.addressErrorMessage) && this.showValidationErrors && (h("div", { class: "mt-2 text-sm text-red-600" }, this.addressErrorMessage.value))),
70
+ h("h3", { class: "text-lg font-bold mt-6" }, "Fund bank details"),
71
+ h("div", { class: "mt-3" },
72
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Account name"),
73
+ h("div", { class: "mt-1" },
74
+ h("input", { type: "text", required: true, class: inputClass, name: "bankAccountName", minlength: "2", id: "bankAccountName", value: customFundState.selfManagedFundForm.bankAccountName, onChange: (ev) => this.updateFormField('bankAccountName', ev.target.value.trim()) }),
75
+ h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account name"))),
76
+ h("div", { class: "mt-3" },
77
+ h("label", { class: "text-sm font-medium text-gray-700" }, "BSB"),
78
+ h("div", { class: "mt-1" },
79
+ h("input", { type: "text", required: true, class: inputClass, name: "bsb", id: "bsb", minlength: "6", maxlength: "7", onKeyUp: (ev) => this.updateCurrentBank(ev), pattern: this.bsbRegex.source, value: customFundState.selfManagedFundForm.bsb }),
80
+ h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid BSB"))),
81
+ isSome(this.currentBank) && (h("div", { class: "mt-3" },
82
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Bank name"),
83
+ h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm" }, this.currentBank.value))),
84
+ h("div", { class: "mt-3" },
85
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Account number"),
86
+ h("div", { class: "mt-1" },
87
+ h("input", { type: "text", required: true, class: inputClass, name: "bankAccountNumber", id: "bankAccountNumber", minlength: "2", maxlength: "11", pattern: this.bankAccountNumberRegex.source, value: customFundState.selfManagedFundForm.bankAccountNumber, onKeyUp: (ev) => this.updateCurrentBankAccountNumber(ev), onChange: (ev) => this.updateFormField('bankAccountNumber', ev.target.value.trim()) }),
88
+ h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account number")))));
77
89
  }
78
90
  updateFormField(key, value) {
79
91
  this.formChanged.emit({ [key]: value });
@@ -91,7 +103,7 @@ export class SelfManagedFundInputs {
91
103
  this.currentBank = some(firstTwoNumberBankName);
92
104
  if (firstThreeNumberBankName)
93
105
  this.currentBank = some(firstThreeNumberBankName);
94
- if (value === '')
106
+ if (value === '' || value.length > 6)
95
107
  this.currentBank = none;
96
108
  this.updateFormField('bsb', value);
97
109
  }
@@ -99,6 +111,22 @@ export class SelfManagedFundInputs {
99
111
  const value = this.filterDigits(ev.target.value);
100
112
  this.updateFormField('bankAccountNumber', value);
101
113
  }
114
+ updateAddressErrorMessage() {
115
+ let message = none;
116
+ if (isNone(message) && !this.addressLine1Element.checkValidity()) {
117
+ message = some('Enter a valid address line 1');
118
+ }
119
+ if (isNone(message) && !this.cityElement.checkValidity()) {
120
+ message = some('Enter a valid city/suburb');
121
+ }
122
+ if (isNone(message) && !this.postcodeElement.checkValidity()) {
123
+ message = some('Enter a valid post code');
124
+ }
125
+ if (isNone(message) && !this.stateElement.checkValidity()) {
126
+ message = some('Select a state');
127
+ }
128
+ this.addressErrorMessage = message;
129
+ }
102
130
  static get is() { return "sss-self-managed-fund-inputs"; }
103
131
  static get properties() { return {
104
132
  "fundForm": {
@@ -106,7 +134,7 @@ export class SelfManagedFundInputs {
106
134
  "mutable": false,
107
135
  "complexType": {
108
136
  "original": "Partial<SelfManagedFundForm>",
109
- "resolved": "{ fundName?: string | undefined; fundAbn?: string | undefined; fundEsa?: string | undefined; addressLine1?: string | undefined; addressLine2?: string | undefined; state?: string | undefined; postcode?: string | undefined; city?: string | undefined; bankAccountName?: string | undefined; bsb?: string | undefined; bankAccountNumber?: string | undefined; standardChoiceFormSignature?: string | undefined; }",
137
+ "resolved": "{ fundName?: string | undefined; fundAbn?: string | undefined; fundEsa?: string | undefined; addressLine1?: string | undefined; addressLine2?: string | undefined; state?: string | undefined; postcode?: string | undefined; city?: string | undefined; bankAccountName?: string | undefined; bsb?: string | undefined; bankAccountNumber?: string | undefined; }",
110
138
  "references": {
111
139
  "Partial": {
112
140
  "location": "global"
@@ -123,10 +151,28 @@ export class SelfManagedFundInputs {
123
151
  "tags": [],
124
152
  "text": ""
125
153
  }
154
+ },
155
+ "showValidationErrors": {
156
+ "type": "boolean",
157
+ "mutable": false,
158
+ "complexType": {
159
+ "original": "boolean",
160
+ "resolved": "boolean",
161
+ "references": {}
162
+ },
163
+ "required": false,
164
+ "optional": false,
165
+ "docs": {
166
+ "tags": [],
167
+ "text": ""
168
+ },
169
+ "attribute": "show-validation-errors",
170
+ "reflect": false
126
171
  }
127
172
  }; }
128
173
  static get states() { return {
129
- "currentBank": {}
174
+ "currentBank": {},
175
+ "addressErrorMessage": {}
130
176
  }; }
131
177
  static get events() { return [{
132
178
  "method": "formChanged",
@@ -140,7 +186,7 @@ export class SelfManagedFundInputs {
140
186
  },
141
187
  "complexType": {
142
188
  "original": "Partial<SelfManagedFundForm>",
143
- "resolved": "{ fundName?: string | undefined; fundAbn?: string | undefined; fundEsa?: string | undefined; addressLine1?: string | undefined; addressLine2?: string | undefined; state?: string | undefined; postcode?: string | undefined; city?: string | undefined; bankAccountName?: string | undefined; bsb?: string | undefined; bankAccountNumber?: string | undefined; standardChoiceFormSignature?: string | undefined; }",
189
+ "resolved": "{ fundName?: string | undefined; fundAbn?: string | undefined; fundEsa?: string | undefined; addressLine1?: string | undefined; addressLine2?: string | undefined; state?: string | undefined; postcode?: string | undefined; city?: string | undefined; bankAccountName?: string | undefined; bsb?: string | undefined; bankAccountNumber?: string | undefined; }",
144
190
  "references": {
145
191
  "Partial": {
146
192
  "location": "global"
@@ -1,4 +1,4 @@
1
- import { Component, h, Host, Prop, State } from '@stencil/core';
1
+ import { Component, getAssetPath, h, Host, Prop, State } from '@stencil/core';
2
2
  import { injectHistory } from '@stencil/router';
3
3
  import { EventTrackingService } from '../../../services/event-tracking.service';
4
4
  import navigationService from '../../../services/navigation.service';
@@ -9,10 +9,34 @@ import customFundState from '../custom-fund.store';
9
9
  export class SelfManagedFund {
10
10
  constructor() {
11
11
  this.showSmsfNotSupported = false;
12
+ this.isSubmitDisabled = true;
12
13
  this.eventTrackingService = EventTrackingService.Instance;
13
14
  this.success = () => {
14
- superSelectionAppService.markSuperSelectionAsSubmitted();
15
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.Success);
15
+ navigationService.navigateInternallyToStandardChoice({
16
+ history: this.history,
17
+ fundName: 'Self-managed super fund',
18
+ handleSubmitFn: async (standardChoiceFormSignature) => {
19
+ const requestDto = {
20
+ smsfChoice: {
21
+ abn: customFundState.selfManagedFundForm.fundAbn,
22
+ fundName: customFundState.selfManagedFundForm.fundName,
23
+ fundAddress: {
24
+ addressLine1: customFundState.selfManagedFundForm.addressLine1,
25
+ addressLine2: customFundState.selfManagedFundForm.addressLine2,
26
+ city: customFundState.selfManagedFundForm.city,
27
+ state: customFundState.selfManagedFundForm.state,
28
+ postcode: customFundState.selfManagedFundForm.postcode
29
+ },
30
+ bsb: customFundState.selfManagedFundForm.bsb,
31
+ bankAccountName: customFundState.selfManagedFundForm.bankAccountName,
32
+ bankAccountNumber: customFundState.selfManagedFundForm.bankAccountNumber,
33
+ electronicServiceAddress: customFundState.selfManagedFundForm.fundEsa
34
+ },
35
+ standardChoiceFormSignature
36
+ };
37
+ await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
38
+ }
39
+ });
16
40
  };
17
41
  }
18
42
  componentDidLoad() {
@@ -21,32 +45,30 @@ export class SelfManagedFund {
21
45
  });
22
46
  }
23
47
  render() {
24
- return (h(Host, { class: "d-flex flex-fill" },
25
- h("sss-custom-fund", { class: "flex-fill" },
26
- h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
27
- 'was-validated': this.formState === 'validated'
28
- }, ref: (el) => (this.formElement = el) },
29
- h("div", { class: "card p-4" },
30
- h("p", { class: "font-weight-bold" }, "Fund details"),
31
- h("p", { class: "text-warning mb-4 small" }, "Make sure you are already a member of the fund before completing this step."),
32
- h("sss-self-managed-fund-inputs", { fundForm: customFundState.selfManagedFundForm, onFormChanged: (event) => {
33
- customFundState.selfManagedFundForm = Object.assign(Object.assign({}, customFundState.selfManagedFundForm), event.detail);
34
- } })),
35
- h("sss-standard-choice-form", { onStandardChoiceFormSignatureUpdated: (event) => {
36
- customFundState.selfManagedFundForm = Object.assign(Object.assign({}, customFundState.selfManagedFundForm), event.detail);
37
- } }),
38
- this.showSmsfNotSupported && (h("sss-smsf-not-supported-dialog", { ref: (el) => (this.notSupportedDialog = el), onContinue: this.success }))),
39
- h("div", { class: "mt-4" },
40
- h("sss-notifications-section", null)),
41
- h("div", { class: "d-flex mt-4" },
42
- h("div", { class: "flex-grow-1 w-50" },
43
- h("div", { class: "mr-2" },
44
- h("fl-button", { onClick: () => navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage), isBlockElement: true, variant: "secondary" },
45
- h("span", null, "Back")))),
46
- h("div", { class: "flex-grow-1 w-50" },
47
- h("div", { class: "ml-2" },
48
- h("fl-promise-button", { isBlockElement: true, promiseFn: () => this.handleSubmitForm() },
49
- h("span", null, "Save and continue"))))))));
48
+ return (h(Host, null,
49
+ h("sss-header-section", { currentPage: "own-fund" }),
50
+ h("div", { class: "flex justify-center mt-11" },
51
+ h("sss-custom-fund", null,
52
+ h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
53
+ 'was-validated': this.formState === 'validated'
54
+ }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) },
55
+ h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg max-w-560" },
56
+ h("p", { class: "sm:text-lg font-bold" }, "Fund details"),
57
+ h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3" },
58
+ h("div", { class: "flex" },
59
+ h("div", { class: "flex-shrink-0" },
60
+ h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })),
61
+ h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" }, "Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."))),
62
+ h("sss-self-managed-fund-inputs", { fundForm: customFundState.selfManagedFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
63
+ customFundState.selfManagedFundForm = Object.assign(Object.assign({}, customFundState.selfManagedFundForm), event.detail);
64
+ } })),
65
+ h("div", { class: "flex justify-center mt-8" },
66
+ h("div", { class: "sm:max-w-320 w-full" },
67
+ h("div", { class: "mb-4" },
68
+ h("sss-button", { fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")),
69
+ h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
70
+ h("sss-button", { fillWidth: true, variant: "secondary" }, "Back")))),
71
+ this.showSmsfNotSupported && (h("sss-smsf-not-supported-dialog", { ref: (el) => (this.notSupportedDialog = el), onContinue: this.success })))))));
50
72
  }
51
73
  componentDidRender() {
52
74
  var _a;
@@ -55,25 +77,6 @@ export class SelfManagedFund {
55
77
  async handleSubmitForm() {
56
78
  this.formState = 'validated';
57
79
  if (this.formElement.checkValidity()) {
58
- const requestDto = {
59
- smsfChoice: {
60
- abn: customFundState.selfManagedFundForm.fundAbn,
61
- fundName: customFundState.selfManagedFundForm.fundName,
62
- fundAddress: {
63
- addressLine1: customFundState.selfManagedFundForm.addressLine1,
64
- addressLine2: customFundState.selfManagedFundForm.addressLine2,
65
- city: customFundState.selfManagedFundForm.city,
66
- state: customFundState.selfManagedFundForm.state,
67
- postcode: customFundState.selfManagedFundForm.postcode
68
- },
69
- bsb: customFundState.selfManagedFundForm.bsb,
70
- bankAccountName: customFundState.selfManagedFundForm.bankAccountName,
71
- bankAccountNumber: customFundState.selfManagedFundForm.bankAccountNumber,
72
- electronicServiceAddress: customFundState.selfManagedFundForm.fundEsa
73
- },
74
- standardChoiceFormSignature: customFundState.selfManagedFundForm.standardChoiceFormSignature
75
- };
76
- await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
77
80
  if (superSelectionAppService.showSmsfNotSupported) {
78
81
  this.showSmsfNotSupported = true;
79
82
  }
@@ -107,7 +110,8 @@ export class SelfManagedFund {
107
110
  }; }
108
111
  static get states() { return {
109
112
  "formState": {},
110
- "showSmsfNotSupported": {}
113
+ "showSmsfNotSupported": {},
114
+ "isSubmitDisabled": {}
111
115
  }; }
112
116
  }
113
117
  injectHistory(SelfManagedFund);
@@ -8,31 +8,21 @@ export class SmsfNotSupportedDialog {
8
8
  }
9
9
  render() {
10
10
  return (h(Host, null,
11
- h("div", { class: "overlay" }),
12
- h("div", { class: "dialog" },
13
- h("div", { class: "card p-4 mt-4 bg-light text-center" },
14
- h("div", { style: { 'text-align': 'center' } },
11
+ h("div", { class: "fixed z-40 top-0 left-0 bg-white opacity-70 w-full h-full" }),
12
+ h("div", { class: "fixed z-50 top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2" },
13
+ h("div", { class: "p-6 shadow-sm border rounded-lg bg-white text-center max-w-560" },
14
+ h("div", { class: "flex justify-center" },
15
15
  h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", fill: "orange", viewBox: "0 0 16 16" },
16
16
  h("path", { d: "M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z" }))),
17
- h("p", { class: "small mt-4 mb-0" },
17
+ h("p", { class: "my-4" },
18
18
  "You\u2019ve selected a self-managed super fund (SMSF). Currently, SMSF information can\u2019t be sent via this form. You\u2019ll need to provide your employer with a",
19
19
  ' ',
20
20
  h("a", { target: "_blank", href: this.standardChoiceFormUrl }, "standard choice form"),
21
21
  ' ',
22
22
  "for your SMSF details."),
23
- h("div", { class: "d-flex mt-4" },
24
- h("div", { class: "w-25" }),
25
- h("div", { class: "w-50" },
26
- h("fl-button", { onClick: this.handleContinue, isBlockElement: true, variant: "primary" },
27
- h("span", null, "Continue"))))))));
23
+ h("sss-button", { onClick: this.handleContinue, fillWidth: true }, "Continue")))));
28
24
  }
29
25
  static get is() { return "sss-smsf-not-supported-dialog"; }
30
- static get originalStyleUrls() { return {
31
- "$": ["self-managed-not-supported.scss"]
32
- }; }
33
- static get styleUrls() { return {
34
- "$": ["self-managed-not-supported.css"]
35
- }; }
36
26
  static get events() { return [{
37
27
  "method": "continue",
38
28
  "name": "continue",
@@ -5,7 +5,7 @@ export class PromotedFundJoinPage {
5
5
  PromotedFundJoinIFrameBuilder.build(this.iframeElement, this.history);
6
6
  }
7
7
  render() {
8
- return (h(Host, { class: "d-flex flex-fill" },
8
+ return (h(Host, { class: "w-screen" },
9
9
  h("iframe", { width: "100%", height: window.innerHeight, style: { border: 'none' }, ref: (el) => (this.iframeElement = el) })));
10
10
  }
11
11
  static get is() { return "sss-promoted-fund-join-page"; }
@@ -1,9 +1,6 @@
1
1
  import { createStore } from '@stencil/store';
2
2
  export const initial = {
3
- fundId: '',
4
- memberNumber: '',
5
- usi: '',
6
- standardChoiceFormSignature: ''
3
+ fundId: ''
7
4
  };
8
5
  const { state } = createStore(initial);
9
6
  export default state;
@@ -2,10 +2,12 @@ import iframeUtil from '../../../../../utils/iframe';
2
2
  import navigationService from '../../../services/navigation.service';
3
3
  import { SuperSelectionAppRoutes } from '../../../services/super-selection-app.routes';
4
4
  import superSelectionAppService from '../../../services/super-selection-app.service';
5
+ import { getFundNameById } from '../../constants';
6
+ import promotedFundChoiceApi from '../api/promoted-fund-choice.api';
5
7
  import promotedFundState from '../promoted-fund.store';
6
8
  class PromotedFundJoinIFrameBuilder {
7
9
  constructor() {
8
- this.hostIsLocalSuperSelection = () => window.location.origin == 'http://localhost:7100';
10
+ this.hostIsLocalSuperSelection = () => window.location.origin === 'http://localhost:7100';
9
11
  this.environmentDiscriminator = () => {
10
12
  return this.hostIsLocalSuperSelection()
11
13
  ? 'autodev-partner'
@@ -20,6 +22,7 @@ class PromotedFundJoinIFrameBuilder {
20
22
  return;
21
23
  const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: promotedFundState.fundId, authToken: superSelectionAppService.jwt });
22
24
  const handleMessage = (event) => {
25
+ var _a;
23
26
  const { data } = event;
24
27
  if (!data) {
25
28
  return;
@@ -32,9 +35,12 @@ class PromotedFundJoinIFrameBuilder {
32
35
  break;
33
36
  case 'success':
34
37
  if (data.memberNumber) {
35
- promotedFundState.memberNumber = data.memberNumber;
36
- promotedFundState.usi = data.usi.replace(/ /g, '');
37
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.PromotedFundStandardChoice);
38
+ navigationService.navigateInternallyToStandardChoice({
39
+ history,
40
+ fundName: (_a = getFundNameById(promotedFundState.fundId)) !== null && _a !== void 0 ? _a : '',
41
+ handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign(Object.assign({}, promotedFundState), { memberNumber: data.memberNumber, usi: data.usi.replace(/ /g, ''), standardChoiceFormSignature, shownFunds: superSelectionAppService.promotedFunds })),
42
+ promotedFundId: promotedFundState.fundId
43
+ });
38
44
  break;
39
45
  }
40
46
  /* falls through */