@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,155 @@
1
+ import { Component, getAssetPath, h, Host, Prop, State } from '@stencil/core';
2
+ import * as O from 'fp-ts/Option';
3
+ import { assertExhaustive } from '../../../utils';
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 standardChoiceFormState from './standard-choice-form.store';
9
+ export class StandardChoiceFormInputDefaultFund {
10
+ constructor() {
11
+ this.standardChoiceFormSignature = '';
12
+ this.isSubmitDisabled = true;
13
+ this.eventTrackingService = EventTrackingService.Instance;
14
+ this.ignorePopState = () => window.history.pushState(null, '', null);
15
+ }
16
+ connectedCallback() {
17
+ this.ignorePopState();
18
+ window.addEventListener('popstate', this.ignorePopState);
19
+ }
20
+ disconnectedCallback() {
21
+ window.removeEventListener('popstate', this.ignorePopState);
22
+ }
23
+ render() {
24
+ return (h(Host, null,
25
+ h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"),
26
+ h("div", { class: "sm:text-lg text-gray-600 max-w-800 mt-4 text-center leading-7 sm:leading-8" }, "Your authorisation is required to complete your super choice by signing the standard choice form, which informs your employer of your choice of fund."),
27
+ h("div", { class: "flex justify-center mt-8 sm:mt-12" },
28
+ h("div", { class: "max-w-560" },
29
+ h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" },
30
+ this.renderLogo(),
31
+ h("div", { class: "flex justify-between w-full" },
32
+ h("div", null,
33
+ h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"),
34
+ h("div", { class: "text-sm mt-2" }, standardChoiceFormState.fundName)),
35
+ h("div", { class: "grid content-center ml-4" },
36
+ h("sss-button", { testid: "change-fund-button", size: "xs", variant: "secondary", promiseFn: async () => {
37
+ await this.trackChangeRequestedAsync();
38
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
39
+ } }, "Change")))),
40
+ h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" },
41
+ h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"),
42
+ h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" },
43
+ h("div", { class: "flex" },
44
+ h("div", { class: "flex-shrink-0" },
45
+ h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-information-circle.svg') })),
46
+ h("div", { class: "ml-2" },
47
+ h("p", { class: "text-sm text-blue-800 leading-5" }, "Applying your full name in the text field below is the same as applying your written signature and is legally binding.")))),
48
+ h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
49
+ 'mt-3': true,
50
+ 'was-validated': this.formState === 'validated'
51
+ }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) },
52
+ h("label", { class: "text-sm font-medium text-gray-700" }, "Type your full name"),
53
+ h("input", { "data-testid": "standard-choice-form-signature-input", type: "text", autocomplete: "off", class: {
54
+ 'shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full text-base sm:text-sm border-gray-300 rounded-md mt-1': true,
55
+ 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
56
+ }, required: true, minlength: "2", name: "standardChoiceFormSignature", id: "standardChoiceFormSignature", value: this.standardChoiceFormSignature, onInput: (event) => (this.standardChoiceFormSignature = event.target.value) }),
57
+ h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Type your full name"),
58
+ h("div", { class: "mt-6" },
59
+ h("sss-button", { testid: "confirm-and-continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Confirm and continue"))))))));
60
+ }
61
+ // TODO: fetch external promoted fund logo
62
+ renderLogo() {
63
+ return;
64
+ // if (standardChoiceFormState.promotedFundId == undefined) return;
65
+ // const logoSource = getLogoSrcByFundId(standardChoiceFormState.promotedFundId);
66
+ // if (isSome(logoSource)) {
67
+ // return (
68
+ // <div class="pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start">
69
+ // <img
70
+ // class="h-16 max-w-140 sm:h-12 sm:max-w-[100px] object-contain"
71
+ // alt={standardChoiceFormState.fundName}
72
+ // src={logoSource.value}
73
+ // />
74
+ // </div>
75
+ // );
76
+ // }
77
+ }
78
+ async trackChangeRequestedAsync() {
79
+ const common = {
80
+ promotedFundsShown: superSelectionAppService.promotedFunds,
81
+ defaultFundUsiSet: O.toUndefined(superSelectionAppService.defaultFundUsi)
82
+ };
83
+ switch (standardChoiceFormState.fundDetails.type) {
84
+ case 'default':
85
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
86
+ DefaultFund: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
87
+ });
88
+ break;
89
+ case 'myOwnFund':
90
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
91
+ MyOwnFund: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
92
+ });
93
+ break;
94
+ case 'smsf':
95
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
96
+ Smsf: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
97
+ });
98
+ break;
99
+ case 'promoted':
100
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
101
+ PromotedFund: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
102
+ });
103
+ break;
104
+ case 'promotedDefault':
105
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
106
+ PromotedDefaultFund: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
107
+ });
108
+ break;
109
+ case 'promotedDefaultWithJoin':
110
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
111
+ PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, standardChoiceFormState.fundDetails), common)
112
+ });
113
+ break;
114
+ case 'null':
115
+ throw 'standardChoiceFormState.fundDetails was not set';
116
+ default:
117
+ assertExhaustive(standardChoiceFormState.fundDetails);
118
+ }
119
+ }
120
+ async handleSubmitForm() {
121
+ this.formState = 'validated';
122
+ if (this.formElement.checkValidity()) {
123
+ await standardChoiceFormState.handleSubmitFn(this.standardChoiceFormSignature.trim());
124
+ superSelectionAppService.markSuperSelectionAsSubmitted();
125
+ }
126
+ }
127
+ static get is() { return "sss-standard-choice-form"; }
128
+ static get properties() { return {
129
+ "history": {
130
+ "type": "unknown",
131
+ "mutable": false,
132
+ "complexType": {
133
+ "original": "RouterHistory",
134
+ "resolved": "RouterHistory",
135
+ "references": {
136
+ "RouterHistory": {
137
+ "location": "import",
138
+ "path": "@stencil/router"
139
+ }
140
+ }
141
+ },
142
+ "required": false,
143
+ "optional": false,
144
+ "docs": {
145
+ "tags": [],
146
+ "text": ""
147
+ }
148
+ }
149
+ }; }
150
+ static get states() { return {
151
+ "standardChoiceFormSignature": {},
152
+ "formState": {},
153
+ "isSubmitDisabled": {}
154
+ }; }
155
+ }
@@ -0,0 +1,11 @@
1
+ import { createStore } from '@stencil/store';
2
+ export const initial = {
3
+ handleSubmitFn: async function () {
4
+ return;
5
+ },
6
+ fundName: '',
7
+ fundDetails: { type: 'null' },
8
+ promotedFundId: undefined
9
+ };
10
+ const { state } = createStore(initial);
11
+ export default state;
@@ -0,0 +1,27 @@
1
+ html {
2
+ scroll-behavior: smooth;
3
+ }
4
+
5
+ stencil-route {
6
+ display: flex;
7
+ flex: 1 1 auto;
8
+ justify-content: center;
9
+ }
10
+ stencil-route:empty {
11
+ display: none;
12
+ }
13
+
14
+ input + .invalid-feedback {
15
+ display: none;
16
+ }
17
+
18
+ select + .invalid-feedback {
19
+ display: none;
20
+ }
21
+
22
+ .was-validated input:invalid + .invalid-feedback {
23
+ display: block;
24
+ }
25
+ .was-validated select:invalid + .invalid-feedback {
26
+ display: block;
27
+ }
@@ -0,0 +1,291 @@
1
+ import { Component, Event, getAssetPath, h, Host, Prop, State, Watch } from '@stencil/core';
2
+ import { injectHistory } from '@stencil/router';
3
+ import * as O from 'fp-ts/lib/Option';
4
+ import { isNone, isSome } from 'fp-ts/lib/Option';
5
+ import iframe from '../../utils/iframe';
6
+ import existingFundService from './services/existing-super-choice-info.service';
7
+ import navigationService from './services/navigation.service';
8
+ import { SuperSelectionAppRoutes, superSelectionAppStencilRoutes } from './services/super-selection-app.routes';
9
+ import superSelectionAppService from './services/super-selection-app.service';
10
+ export class SuperSelectionApp {
11
+ constructor() {
12
+ this.isSelfHosted = false;
13
+ this.isAppInitialised = false;
14
+ }
15
+ async componentWillLoad() {
16
+ const jwt = O.fromNullable(this.accessToken);
17
+ if (O.isNone(jwt)) {
18
+ throw Error(`jwt property is missing.`);
19
+ }
20
+ superSelectionAppService.state.jwt = jwt;
21
+ const apiBaseUrl = O.fromNullable(this.backendUrl);
22
+ if (O.isNone(apiBaseUrl)) {
23
+ throw Error(`apiBaseUrl property is missing.`);
24
+ }
25
+ superSelectionAppService.state.apiBaseUrl = O.some(apiBaseUrl.value.replace(/\/$/, '') + '/');
26
+ const appBaseUrl = O.fromNullable(this.appBaseUrl);
27
+ if (O.isNone(appBaseUrl)) {
28
+ throw Error(`appBaseUrl property is missing.`);
29
+ }
30
+ superSelectionAppService.state.appBaseUrl = O.some(appBaseUrl.value.replace(/\/$/, ''));
31
+ superSelectionAppService.onChange('hasSuccessPageBeenAcknowledged', (_) => this.successPageAcknowledged.emit());
32
+ superSelectionAppService.onChange('hasSuperSelectionBeenSubmitted', (submitted) => {
33
+ if (!submitted)
34
+ return;
35
+ this.stepSubmitSuccess.emit();
36
+ superSelectionAppService.state.hasSuperSelectionBeenSubmitted = false;
37
+ if (this.isSelfHosted) {
38
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.Success);
39
+ }
40
+ });
41
+ }
42
+ async componentDidLoad() {
43
+ await superSelectionAppService.loadAppStateAsync();
44
+ const chosenFundOption = await existingFundService.GetExistingFundAsync();
45
+ this.isAppInitialised = true;
46
+ this.initialised.emit({
47
+ accountIdOrDefault: superSelectionAppService.accountIdOrDefault,
48
+ partnerIdOrDefault: superSelectionAppService.partnerIdOrDefault,
49
+ profileId: superSelectionAppService.profileId
50
+ });
51
+ iframe.appReady();
52
+ const ignoreExistingSelectionOption = O.fromNullable(this.ignoreExistingSelection);
53
+ const shouldIgnoreExistingDefinedBenefitsChoice = isSome(chosenFundOption) &&
54
+ chosenFundOption.value.type == 'Defined Benefits Fund' &&
55
+ (isNone(superSelectionAppService.isDefinedBenefitsEligible) ||
56
+ !superSelectionAppService.isDefinedBenefitsEligible.value);
57
+ const shouldIgnoreExistingChoice = (isSome(ignoreExistingSelectionOption) && ignoreExistingSelectionOption.value) ||
58
+ shouldIgnoreExistingDefinedBenefitsChoice;
59
+ if (isSome(superSelectionAppService.state.superChoicePrefill)) {
60
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.Prefill);
61
+ }
62
+ else if (isSome(chosenFundOption) &&
63
+ chosenFundOption.value.valid !== 'Inactive' &&
64
+ !shouldIgnoreExistingChoice) {
65
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ExistingChoicePage);
66
+ }
67
+ else {
68
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
69
+ }
70
+ }
71
+ authTokenChanged(newValue) {
72
+ superSelectionAppService.state.jwt = O.fromNullable(newValue);
73
+ }
74
+ onRouteChange() {
75
+ window === null || window === void 0 ? void 0 : window.scroll(0, 0);
76
+ }
77
+ render() {
78
+ return (h(Host, null,
79
+ h("link", { rel: "stylesheet", href: getAssetPath('apollo-super-selection.css'), media: "all" }),
80
+ this.renderAppContent()));
81
+ }
82
+ routerBaseUrl() {
83
+ var _a;
84
+ return ((_a = this.appBaseUrl) === null || _a === void 0 ? void 0 : _a.replace(/\/$/, '')) + '/';
85
+ }
86
+ renderAppContent() {
87
+ return (h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" },
88
+ h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (h("div", { class: "pt-28 -mt-12 pb-6" },
89
+ superSelectionAppStencilRoutes,
90
+ h("sss-footer-section", null))) : (h("div", { class: "flex justify-center py-20" },
91
+ h("sss-loading-indicator", null))))));
92
+ }
93
+ static get is() { return "super-selection-app"; }
94
+ static get encapsulation() { return "shadow"; }
95
+ static get originalStyleUrls() { return {
96
+ "$": ["super-selection-app.scss"]
97
+ }; }
98
+ static get styleUrls() { return {
99
+ "$": ["super-selection-app.css"]
100
+ }; }
101
+ static get assetsDirs() { return ["assets"]; }
102
+ static get properties() { return {
103
+ "ignoreExistingSelection": {
104
+ "type": "boolean",
105
+ "mutable": false,
106
+ "complexType": {
107
+ "original": "boolean",
108
+ "resolved": "boolean | undefined",
109
+ "references": {}
110
+ },
111
+ "required": false,
112
+ "optional": true,
113
+ "docs": {
114
+ "tags": [],
115
+ "text": ""
116
+ },
117
+ "attribute": "ignore-existing-selection",
118
+ "reflect": false
119
+ },
120
+ "accessToken": {
121
+ "type": "string",
122
+ "mutable": false,
123
+ "complexType": {
124
+ "original": "string",
125
+ "resolved": "string",
126
+ "references": {}
127
+ },
128
+ "required": false,
129
+ "optional": false,
130
+ "docs": {
131
+ "tags": [],
132
+ "text": ""
133
+ },
134
+ "attribute": "access-token",
135
+ "reflect": false
136
+ },
137
+ "backendUrl": {
138
+ "type": "string",
139
+ "mutable": false,
140
+ "complexType": {
141
+ "original": "string",
142
+ "resolved": "string | undefined",
143
+ "references": {}
144
+ },
145
+ "required": false,
146
+ "optional": true,
147
+ "docs": {
148
+ "tags": [],
149
+ "text": ""
150
+ },
151
+ "attribute": "backend-url",
152
+ "reflect": false
153
+ },
154
+ "appBaseUrl": {
155
+ "type": "string",
156
+ "mutable": false,
157
+ "complexType": {
158
+ "original": "string",
159
+ "resolved": "string | undefined",
160
+ "references": {}
161
+ },
162
+ "required": false,
163
+ "optional": true,
164
+ "docs": {
165
+ "tags": [],
166
+ "text": ""
167
+ },
168
+ "attribute": "app-base-url",
169
+ "reflect": false
170
+ },
171
+ "history": {
172
+ "type": "unknown",
173
+ "mutable": false,
174
+ "complexType": {
175
+ "original": "RouterHistory",
176
+ "resolved": "RouterHistory",
177
+ "references": {
178
+ "RouterHistory": {
179
+ "location": "import",
180
+ "path": "@stencil/router"
181
+ }
182
+ }
183
+ },
184
+ "required": false,
185
+ "optional": false,
186
+ "docs": {
187
+ "tags": [],
188
+ "text": ""
189
+ }
190
+ },
191
+ "location": {
192
+ "type": "unknown",
193
+ "mutable": false,
194
+ "complexType": {
195
+ "original": "LocationSegments",
196
+ "resolved": "LocationSegments | undefined",
197
+ "references": {
198
+ "LocationSegments": {
199
+ "location": "import",
200
+ "path": "@stencil/router"
201
+ }
202
+ }
203
+ },
204
+ "required": false,
205
+ "optional": true,
206
+ "docs": {
207
+ "tags": [],
208
+ "text": ""
209
+ }
210
+ },
211
+ "isSelfHosted": {
212
+ "type": "boolean",
213
+ "mutable": false,
214
+ "complexType": {
215
+ "original": "boolean",
216
+ "resolved": "boolean",
217
+ "references": {}
218
+ },
219
+ "required": false,
220
+ "optional": false,
221
+ "docs": {
222
+ "tags": [],
223
+ "text": ""
224
+ },
225
+ "attribute": "is-self-hosted",
226
+ "reflect": false,
227
+ "defaultValue": "false"
228
+ }
229
+ }; }
230
+ static get states() { return {
231
+ "isAppInitialised": {}
232
+ }; }
233
+ static get events() { return [{
234
+ "method": "stepSubmitSuccess",
235
+ "name": "step-completion",
236
+ "bubbles": true,
237
+ "cancelable": true,
238
+ "composed": true,
239
+ "docs": {
240
+ "tags": [],
241
+ "text": ""
242
+ },
243
+ "complexType": {
244
+ "original": "void",
245
+ "resolved": "void",
246
+ "references": {}
247
+ }
248
+ }, {
249
+ "method": "successPageAcknowledged",
250
+ "name": "successPageAcknowledged",
251
+ "bubbles": true,
252
+ "cancelable": true,
253
+ "composed": false,
254
+ "docs": {
255
+ "tags": [],
256
+ "text": ""
257
+ },
258
+ "complexType": {
259
+ "original": "void",
260
+ "resolved": "void",
261
+ "references": {}
262
+ }
263
+ }, {
264
+ "method": "initialised",
265
+ "name": "initialised",
266
+ "bubbles": true,
267
+ "cancelable": true,
268
+ "composed": true,
269
+ "docs": {
270
+ "tags": [],
271
+ "text": ""
272
+ },
273
+ "complexType": {
274
+ "original": "InitialisedWith",
275
+ "resolved": "{ accountIdOrDefault: string; partnerIdOrDefault: string; profileId: string; }",
276
+ "references": {
277
+ "InitialisedWith": {
278
+ "location": "local"
279
+ }
280
+ }
281
+ }
282
+ }]; }
283
+ static get watchers() { return [{
284
+ "propName": "accessToken",
285
+ "methodName": "authTokenChanged"
286
+ }, {
287
+ "propName": "location",
288
+ "methodName": "onRouteChange"
289
+ }]; }
290
+ }
291
+ injectHistory(SuperSelectionApp);
@@ -0,0 +1,25 @@
1
+ import appConfigurationService from '../components/app-host/services/app-configuration.service';
2
+ import appParametersService from '../components/app-host/services/app-parameters.service';
3
+ import appInsights from '../components/app-host/services/appinsights.service';
4
+ import sessionQuery from '../components/app-host/services/authentication.query';
5
+ import authenticationService from '../components/app-host/services/authentication.service';
6
+ import hostInteropService from '../components/app-host/services/interop/host-interop.service';
7
+ import { Environment } from '../utils';
8
+ import { addSlashToUrl } from '../utils';
9
+ export default async function () {
10
+ if (Environment !== 'prod') {
11
+ // main.dev.ts does the bootstrapping in this case.
12
+ return;
13
+ }
14
+ appParametersService.init(window.location.search);
15
+ await appConfigurationService.loadConfigurationAsync();
16
+ appInsights.init();
17
+ addSlashToUrl();
18
+ const doAuthFlow = sessionQuery.isUnauthorized ||
19
+ authenticationService.authorizationCodeIsPresent(window.location.search);
20
+ if (!doAuthFlow) {
21
+ return;
22
+ }
23
+ hostInteropService.init(window.location.search);
24
+ authenticationService.initFromRoute(window.location.search);
25
+ }
@@ -0,0 +1,29 @@
1
+ import { akitaDevtools } from '@datorama/akita';
2
+ import appConfigurationService from '../components/app-host/services/app-configuration.service';
3
+ import appParametersService from '../components/app-host/services/app-parameters.service';
4
+ import appInsights from '../components/app-host/services/appinsights.service';
5
+ import sessionQuery from '../components/app-host/services/authentication.query';
6
+ import authenticationService from '../components/app-host/services/authentication.service';
7
+ import hostInteropService from '../components/app-host/services/interop/host-interop.service';
8
+ import { addSlashToUrl, Environment } from '../utils';
9
+ import stencilRouterWorkaround from './stencil-router-workaround';
10
+ export default async function () {
11
+ if (Environment !== 'dev') {
12
+ // main.ts does the bootstrapping in this case.
13
+ return;
14
+ }
15
+ stencilRouterWorkaround();
16
+ akitaDevtools();
17
+ appParametersService.init(window.location.search);
18
+ await appConfigurationService.loadConfigurationAsync();
19
+ appInsights.init();
20
+ appInsights.getAppInsights().addTelemetryInitializer(() => false);
21
+ addSlashToUrl();
22
+ const doAuthFlow = sessionQuery.isUnauthorized ||
23
+ authenticationService.authorizationCodeIsPresent(window.location.search);
24
+ if (!doAuthFlow) {
25
+ return;
26
+ }
27
+ hostInteropService.init(window.location.search);
28
+ authenticationService.initFromRoute(window.location.search);
29
+ }
@@ -0,0 +1,11 @@
1
+ import { enableAkitaProdMode } from '@datorama/akita';
2
+ import { Environment } from '../utils';
3
+ import stencilRouterWorkaround from './stencil-router-workaround';
4
+ export default async function () {
5
+ if (Environment !== 'prod') {
6
+ // main.dev.ts does the bootstrapping in this case.
7
+ return;
8
+ }
9
+ stencilRouterWorkaround();
10
+ enableAkitaProdMode();
11
+ }
@@ -0,0 +1,12 @@
1
+ // Interim workaround for stencil router accessing session storage.
2
+ // See https://github.com/ionic-team/stencil-router/pull/111/files.
3
+ // In incognito mode, window.sessionStorage read access is denied from a third party iframe.
4
+ // Stencil router checks for the presence of session storage, but does not handle a read access exception.
5
+ export default function () {
6
+ if (window.location == window.parent.location) {
7
+ // Only apply this workaround when running in an embedded iframe.
8
+ return;
9
+ }
10
+ delete window.sessionStorage;
11
+ window.sessionStorage = {};
12
+ }
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ import '@stencil/router';
@@ -0,0 +1,2 @@
1
+ export const Environment = '$ENVIRONMENT';
2
+ export const AppVersion = '$APP_VERSION';
@@ -0,0 +1,5 @@
1
+ export function sendAnalyticsEvent(action, data) {
2
+ if (window['gtag']) {
3
+ window['gtag']('event', action, data);
4
+ }
5
+ }
@@ -0,0 +1,33 @@
1
+ function appReady() {
2
+ postMessage({
3
+ type: 'appReady'
4
+ });
5
+ }
6
+ function postMessage(message, origin) {
7
+ if (origin === undefined)
8
+ origin = '*';
9
+ message.sender = 'flare';
10
+ window.parent.postMessage(message, origin);
11
+ }
12
+ function resize(height, width) {
13
+ postMessage({
14
+ type: 'contentResized',
15
+ height,
16
+ width
17
+ });
18
+ }
19
+ function navigation(url) {
20
+ postMessage({
21
+ type: 'pageNavigated',
22
+ url
23
+ });
24
+ }
25
+ function complete() {
26
+ postMessage({ type: 'complete' });
27
+ }
28
+ function submitSuccess() {
29
+ postMessage({
30
+ type: 'submitSuccess'
31
+ });
32
+ }
33
+ export default { appReady, resize, navigation, complete, submitSuccess };
@@ -0,0 +1,11 @@
1
+ export * from './config';
2
+ export * from './lazy';
3
+ export function addSlashToUrl() {
4
+ if (!window.location.pathname.endsWith('/')) {
5
+ const url = window.location.pathname + '/' + window.location.search + window.location.hash;
6
+ history.pushState(history.state, '', url);
7
+ }
8
+ }
9
+ export function assertExhaustive(_value) {
10
+ return;
11
+ }
@@ -0,0 +1,29 @@
1
+ import * as O from 'fp-ts/Option';
2
+ export class Lazy {
3
+ constructor(factory) {
4
+ this.factory = factory;
5
+ this._value = O.none;
6
+ }
7
+ get value() {
8
+ if (O.isSome(this._value)) {
9
+ return this._value.value;
10
+ }
11
+ const lazyValue = this.factory();
12
+ this._value = O.some(lazyValue);
13
+ return lazyValue;
14
+ }
15
+ }
16
+ export class AsyncLazy {
17
+ constructor(factory) {
18
+ this.factory = factory;
19
+ this._value = O.none;
20
+ }
21
+ async getValueAsync() {
22
+ if (O.isSome(this._value)) {
23
+ return this._value.value;
24
+ }
25
+ const lazyValue = await this.factory();
26
+ this._value = O.some(lazyValue);
27
+ return lazyValue;
28
+ }
29
+ }
@@ -0,0 +1,5 @@
1
+ import * as O from 'fp-ts/lib/Option';
2
+ import { pipe } from 'fp-ts/lib/pipeable';
3
+ export const getFromSessionStorage = (key) => pipe(sessionStorage.getItem(key), O.fromNullable, O.mapNullable(JSON.parse));
4
+ export const saveToSessionStorage = (key, value) => sessionStorage.setItem(key, JSON.stringify(value));
5
+ export const clearFromSessionStorage = (key) => sessionStorage.removeItem(key);