@flarehr/apollo-super-selection 4.33.32977 → 4.35.34649

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 (64) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.css +1 -1
  2. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  3. package/dist/lib/apollo-super-selection/assets/logo-unisuper.svg +15 -0
  4. package/dist/lib/apollo-super-selection/p-15f6e7da.system.entry.js +69 -0
  5. package/dist/lib/apollo-super-selection/p-af2735f2.entry.js +14 -0
  6. package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
  7. package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
  8. package/dist/lib/cjs/loader.cjs.js +1 -1
  9. package/dist/lib/cjs/{sss-button_30.cjs.entry.js → sss-button_38.cjs.entry.js} +954 -25
  10. package/dist/lib/collection/apollo-super-selection.css +1 -1
  11. package/dist/lib/collection/collection-manifest.json +16 -0
  12. package/dist/lib/collection/components/app-host/super-selection-app-host.css +2 -2
  13. package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +1 -1
  14. package/dist/lib/collection/components/super-selection-app/funds/constants.js +3 -1
  15. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/unisuper-default.js +49 -0
  16. package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +17 -13
  17. package/dist/lib/collection/components/super-selection-app/misc/button.js +2 -1
  18. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-common.js +22 -0
  19. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-display-field.js +41 -0
  20. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-error-box.js +66 -0
  21. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.js +121 -0
  22. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-smsf.js +145 -0
  23. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +217 -0
  24. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +360 -0
  25. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-types.js +281 -0
  26. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-warning-box.js +37 -0
  27. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +81 -0
  28. package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +10 -0
  29. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +10 -0
  30. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +1 -0
  31. package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +1 -0
  32. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +9 -2
  33. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-unisuper.svg +15 -0
  34. package/dist/lib/collection/components/super-selection-app/super-selection-app.js +4 -1
  35. package/dist/lib/esm/apollo-super-selection.js +1 -1
  36. package/dist/lib/esm/loader.js +1 -1
  37. package/dist/lib/esm/{sss-button_30.entry.js → sss-button_38.entry.js} +946 -25
  38. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  39. package/dist/lib/esm-es5/loader.js +1 -1
  40. package/dist/lib/esm-es5/sss-button_38.entry.js +69 -0
  41. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +20 -0
  42. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +39 -0
  43. package/dist/lib/types/components/super-selection-app/funds/custom-fund/api/custom-fund-choice.api.dto.d.ts +1 -1
  44. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/unisuper-default.d.ts +3 -0
  45. package/dist/lib/types/components/super-selection-app/misc/button.d.ts +1 -1
  46. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-common.d.ts +9 -0
  47. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-display-field.d.ts +5 -0
  48. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-error-box.d.ts +5 -0
  49. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.d.ts +18 -0
  50. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-invalid-smsf.d.ts +28 -0
  51. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-my-own-fund.d.ts +30 -0
  52. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-smsf.d.ts +48 -0
  53. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-types.d.ts +90 -0
  54. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill-warning-box.d.ts +4 -0
  55. package/dist/lib/types/components/super-selection-app/prefill-fund/prefill.d.ts +14 -0
  56. package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +2 -0
  57. package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +5 -0
  58. package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +2 -1
  59. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +2 -0
  60. package/dist/lib/types/components.d.ts +132 -0
  61. package/package.json +2 -2
  62. package/dist/lib/apollo-super-selection/p-1dca1954.system.entry.js +0 -69
  63. package/dist/lib/apollo-super-selection/p-6292b3a9.entry.js +0 -14
  64. package/dist/lib/esm-es5/sss-button_30.entry.js +0 -69
@@ -264,7 +264,7 @@ class TapSubscriber extends datoramaAkita.Subscriber {
264
264
  }
265
265
  }
266
266
 
267
- const AppVersion = '4.33.32977';
267
+ const AppVersion = '4.35.34649';
268
268
 
269
269
  // -------------------------------------------------------------------------------------
270
270
  // guards
@@ -947,6 +947,7 @@ const Button = class {
947
947
  'disabled:pointer-events-none disabled:border-gray-300 disabled:bg-gray-100 disabled:text-gray-400': true,
948
948
  'border-transparent text-white bg-primary-base hover:bg-primary-hover': this.variant === 'primary',
949
949
  'border-gray-300 text-gray-700 bg-white hover:bg-gray-50': this.variant === 'secondary',
950
+ 'border-transparent bg-primary-light hover:bg-primary-base text-primary-dark hover:text-white': this.variant === 'light',
950
951
  'w-full': this.fillWidth || this.fillWidthOnMobile,
951
952
  'sm:w-auto': this.fillWidthOnMobile
952
953
  }, disabled: this.disabled, onClick: () => this.clicked() }, this.state === PromiseButtonState.Pending && (index.h("sss-loading-indicator", { theme: this.variant === 'primary' ? 'light' : 'primary', size: 16 })), index.h("div", { class: { hidden: this.state === PromiseButtonState.Pending } }, index.h("slot", null))));
@@ -3471,6 +3472,7 @@ const initialState = {
3471
3472
  profileId: Option.none,
3472
3473
  jwt: Option.none,
3473
3474
  superBuyer: Option.none,
3475
+ superChoicePrefill: Option.none,
3474
3476
  promotedFunds: Option.none,
3475
3477
  accountConfiguration: Option.none,
3476
3478
  profileConfiguration: Option.none,
@@ -3576,6 +3578,7 @@ class SuperSelectionAppService {
3576
3578
  this._state.superBuyer = Option.fromNullable(appStateResponse.superBuyer);
3577
3579
  this._state.promotedFunds = Option.fromNullable(appStateResponse.promotedFunds);
3578
3580
  this._state.campaignConnectEnabled = appStateResponse.campaignConnectEnabled;
3581
+ this._state.superChoicePrefill = Option.fromNullable(appStateResponse.prefill);
3579
3582
  if (this._state.campaignConnectEnabled) {
3580
3583
  this._state.campaignConnectPromise = Option.fromNullable(superSelectionApi.getCampaignConnectAsync());
3581
3584
  }
@@ -3708,6 +3711,16 @@ class EventTrackingService {
3708
3711
  SuperFundDisclaimerAccepted: detail
3709
3712
  });
3710
3713
  }
3714
+ async TrackSuperFundPrefillViewedAsync(detail) {
3715
+ return this.trackEventAsync({
3716
+ SuperFundPrefillViewed: detail
3717
+ });
3718
+ }
3719
+ async TrackSuperFundPrefillDeclinedAsync(detail) {
3720
+ return this.trackEventAsync({
3721
+ SuperFundPrefillDeclined: detail
3722
+ });
3723
+ }
3711
3724
  async trackEventAsync(event) {
3712
3725
  try {
3713
3726
  await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
@@ -3770,6 +3783,11 @@ var SuperSelectionAppRoutes;
3770
3783
  SuperSelectionAppRoutes["PromotedFundJoinV1"] = "/promoted-fund/join/v1";
3771
3784
  SuperSelectionAppRoutes["PromotedFundJoinV2"] = "/promoted-fund/join/v2";
3772
3785
  SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
3786
+ SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
3787
+ SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
3788
+ SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
3789
+ SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
3790
+ SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
3773
3791
  SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
3774
3792
  SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
3775
3793
  SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
@@ -3783,6 +3801,11 @@ const superSelectionAppStencilRoutes = [
3783
3801
  index.h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV1, component: "sss-promoted-fund-join-v1-page" }),
3784
3802
  index.h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV2, component: "sss-promoted-fund-join-v2-page" }),
3785
3803
  index.h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
3804
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
3805
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
3806
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
3807
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
3808
+ index.h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
3786
3809
  index.h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
3787
3810
  index.h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
3788
3811
  index.h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
@@ -4471,10 +4494,55 @@ const fund$8 = {
4471
4494
  dtoPropName: 'spirit'
4472
4495
  };
4473
4496
 
4474
- const name$9 = 'Virgin Money Super';
4497
+ const name$9 = 'Unisuper';
4498
+ const pdsUrl$1 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
4499
+ const tmdUrl = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
4475
4500
  const fund$9 = {
4476
- fundId: 'virgin',
4501
+ fundId: 'unisuper-default',
4477
4502
  name: name$9,
4503
+ logo: 'logo-unisuper.svg',
4504
+ route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4505
+ features: [
4506
+ index.h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
4507
+ index.h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
4508
+ index.h("p", null,
4509
+ "Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
4510
+ index.h("sup", { class: "text-tiny" }, "#"))
4511
+ ],
4512
+ disclaimer: (index.h("div", { class: "space-y-2" },
4513
+ index.h("p", null,
4514
+ "^Read more about our fees and how we compare",
4515
+ ' ',
4516
+ index.h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
4517
+ "."),
4518
+ index.h("p", null,
4519
+ "*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
4520
+ ' ',
4521
+ index.h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
4522
+ "."),
4523
+ index.h("p", null,
4524
+ index.h("sup", { class: "text-tiny" }, "#"),
4525
+ "See our awards",
4526
+ ' ',
4527
+ index.h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
4528
+ "."),
4529
+ index.h("p", null,
4530
+ "Remember to consider the",
4531
+ ' ',
4532
+ index.h(Link, { href: pdsUrl$1, onClick: () => pdsViewedAsync(name$9) }, "Product Disclosure Statement"),
4533
+ ' ',
4534
+ "and ",
4535
+ index.h(Link, { href: tmdUrl }, "Target Market Determination"),
4536
+ " that is relevant to you."),
4537
+ index.h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
4538
+ footnoteTextOverride: Option.none,
4539
+ isPromotedDefault: true
4540
+ };
4541
+
4542
+ const name$a = 'Virgin Money Super';
4543
+ const fund$a = {
4544
+ fundId: 'virgin',
4545
+ name: name$a,
4478
4546
  logo: 'logo-virgin.svg',
4479
4547
  route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4480
4548
  features: [
@@ -4496,7 +4564,7 @@ const fund$9 = {
4496
4564
  disclaimer: (index.h("p", null,
4497
4565
  "Prepared by Virgin Money Financial Services Pty Ltd ABN 51 113 285 395 AFSL 286869 (\u2018Virgin Money\u2019). Virgin Money Super is a plan in the Mercer Super Trust ABN 19 905 422 981. Virgin Money Super is issued by Mercer Superannuation (Australia) Limited (MSAL) ABN 79 004 717 533 AFSL 235906 as trustee of the Mercer Super Trust. Consider the PDS and TMD at",
4498
4566
  ' ',
4499
- index.h(Link, { href: "https://virginmoney.com.au/superannuation/", onClick: () => pdsViewedAsync(name$9) }, "www.virginmoney.com.au"),
4567
+ index.h(Link, { href: "https://virginmoney.com.au/superannuation/", onClick: () => pdsViewedAsync(name$a) }, "www.virginmoney.com.au"),
4500
4568
  ' ',
4501
4569
  "before making a decision")),
4502
4570
  footnoteTextOverride: Option.some(PoweredByFlareFS),
@@ -4509,11 +4577,12 @@ const fundsById = {
4509
4577
  [fund$3.fundId]: fund$3,
4510
4578
  [fund.fundId]: fund,
4511
4579
  [fund$1.fundId]: fund$1,
4512
- [fund$9.fundId]: fund$9,
4580
+ [fund$a.fundId]: fund$a,
4513
4581
  [fund$8.fundId]: fund$8,
4514
4582
  [fund$4.fundId]: fund$4,
4515
4583
  [fund$6.fundId]: fund$6,
4516
- [fund$5.fundId]: fund$5
4584
+ [fund$5.fundId]: fund$5,
4585
+ [fund$9.fundId]: fund$9
4517
4586
  };
4518
4587
  const allPromotedFunds = Object.values(fundsById);
4519
4588
  const getFundByDtoPropName = (dtoPropName) => {
@@ -4674,7 +4743,7 @@ const ExistingChoice = class {
4674
4743
  const DefaultFundView = () => {
4675
4744
  return (index.h("div", { class: "flex h-20 justify-center items-center relative" }, index.h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }), index.h("div", { class: "h-10 w-10 absolute" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", class: "fill-primary-base" }, index.h("path", { d: "M448 96h-64V48C384 21.53 362.5 0 336 0h-160C149.5 0 128 21.53 128 48V96H64C28.65 96 0 124.7 0 160v256c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V160C512 124.7 483.3 96 448 96zM160 48C160 39.17 167.2 32 176 32h160C344.8 32 352 39.17 352 48V96H160V48zM480 416c0 17.64-14.36 32-32 32H64c-17.64 0-32-14.36-32-32V288h144v64c0 8.844 7.156 16 16 16h128c8.844 0 16-7.156 16-16V288H480V416zM208 336V288h96v48H208zM480 256H32V160c0-17.64 14.36-32 32-32h384c17.64 0 32 14.36 32 32V256z" })))));
4676
4745
  };
4677
- return (index.h("div", null, index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Your super choice"), index.h("div", { class: "sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7" }, "Continue with your chosen fund or choose another fund below."), index.h("div", { class: "flex justify-center mt-8 sm:mt-12" }, index.h("div", { class: "max-w-400 w-full" }, index.h("div", { class: "flex-col border shadow-sm p-6 pt-8 rounded-lg text-center" }, index.h("div", { class: "space-y-4" }, (() => {
4746
+ return (index.h("div", null, index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Your super nomination"), index.h("div", { class: "sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7" }, "Continue with your chosen fund or choose another fund below."), index.h("div", { class: "flex justify-center mt-8 sm:mt-12" }, index.h("div", { class: "max-w-400 w-full" }, index.h("div", { class: "flex-col border shadow-sm p-6 pt-8 rounded-lg text-center" }, index.h("div", { class: "space-y-4" }, (() => {
4678
4747
  switch (this.existingFund.type) {
4679
4748
  case 'Promoted Fund':
4680
4749
  case 'Promoted Default Fund':
@@ -4725,26 +4794,29 @@ const FooterSection = class {
4725
4794
  }
4726
4795
  };
4727
4796
 
4728
- function renderChooseAnotherFundLink() {
4729
- function buildRouteLink(route) {
4730
- return (index.h("stencil-route-link", { exact: true, url: route, anchorClass: "hover:bg-primary-hover block focus:outline-none focus:ring-2 ring-offset-1 focus:ring-primary-focus focus:z-10 border border-transparent text-gray-700 text-white rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full", activeClass: "hover:bg-white block focus:outline-none focus:ring-2 ring-offset-1 focus:ring-primary-focus focus:z-10 rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full bg-white border-gray-200 text-gray-900 shadow-sm text-primary-base" }, "Choose another fund"));
4731
- }
4797
+ const RouteLink = (props, children) => {
4798
+ return (index.h("stencil-route-link", { exact: true, url: props.route }, index.h("div", { class: {
4799
+ 'block focus:outline-none focus:ring-2 ring-offset-1 focus:ring-primary-focus focus:z-10 rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full': true,
4800
+ 'bg-white shadow-sm text-primary-base': props.isActive,
4801
+ 'hover:bg-primary-hover text-white': !props.isActive
4802
+ } }, children)));
4803
+ };
4804
+ const ChooseAnotherFundLink = (props) => {
4805
+ let route = SuperSelectionAppRoutes.MyOwnFund;
4732
4806
  if (window.location.href.includes(SuperSelectionAppRoutes.SelfManagedFund)) {
4733
- return buildRouteLink(SuperSelectionAppRoutes.SelfManagedFund);
4807
+ route = SuperSelectionAppRoutes.SelfManagedFund;
4734
4808
  }
4735
- if (window.location.href.includes(SuperSelectionAppRoutes.DefaultFund)) {
4736
- return buildRouteLink(SuperSelectionAppRoutes.DefaultFund);
4809
+ else if (window.location.href.includes(SuperSelectionAppRoutes.DefaultFund)) {
4810
+ route = SuperSelectionAppRoutes.DefaultFund;
4737
4811
  }
4738
- else {
4739
- return buildRouteLink(SuperSelectionAppRoutes.MyOwnFund);
4740
- }
4741
- }
4812
+ return (index.h(RouteLink, { route: route, isActive: props.isActive }, "Choose another fund"));
4813
+ };
4742
4814
  const HeaderSection = class {
4743
4815
  constructor(hostRef) {
4744
4816
  index.registerInstance(this, hostRef);
4745
4817
  }
4746
4818
  render() {
4747
- return (index.h("div", { class: "flex justify-center" }, index.h("div", { class: "text-center max-w-800" }, index.h("h3", { class: "font-bold mb-3 sm:mb-4 text-2xl sm:text-3xl" }, "Nominate a super fund"), index.h(index.Fragment, null, index.h("div", { class: "text-gray-600 sm:text-lg leading-7 sm:leading-8" }, "You can choose any super fund, including your current fund/SMSF, your employer\u2019s default fund, or alternatively, you can select from one of the featured\u00A0funds."), index.h("div", { class: "inline-flex mt-8 sm:mt-12 bg-primary-base rounded-lg p-0.5 whitespace-normal" }, index.h("stencil-route-link", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, anchorClass: "hover:bg-primary-hover block focus:outline-none focus:ring-2 ring-offset-1 focus:ring-primary-focus relative focus:z-10 border border-transparent text-gray-700 text-white rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full", activeClass: "hover:bg-white block focus:outline-none focus:ring-2 ring-offset-1 focus:ring-primary-focus focus:z-10 rounded-md py-2 text-sm font-medium w-auto px-3 sm:px-8 h-full bg-white border-gray-200 text-gray-900 shadow-sm text-primary-base" }, "Featured super funds"), renderChooseAnotherFundLink())))));
4819
+ return (index.h("div", { class: "flex justify-center" }, index.h("div", { class: "text-center max-w-800" }, index.h("h3", { class: "font-bold mb-3 sm:mb-4 text-2xl sm:text-3xl" }, "Nominate a super fund"), index.h(index.Fragment, null, index.h("div", { class: "text-gray-600 sm:text-lg leading-7 sm:leading-8" }, "You can choose any super fund, including your current fund/SMSF, your employer\u2019s default fund, or alternatively, you can select from one of the featured\u00A0funds."), index.h("div", { class: "inline-flex mt-8 sm:mt-12 bg-primary-base rounded-lg p-0.5 whitespace-normal" }, index.h(RouteLink, { route: SuperSelectionAppRoutes.ChoicePage, isActive: this.currentPage === 'choice' }, "Featured super funds"), index.h(ChooseAnotherFundLink, { isActive: this.currentPage === 'own-fund' }))))));
4748
4820
  }
4749
4821
  };
4750
4822
 
@@ -4941,6 +5013,846 @@ const MemberNameInput = class {
4941
5013
  }
4942
5014
  };
4943
5015
 
5016
+ const Prefill = class {
5017
+ constructor(hostRef) {
5018
+ index.registerInstance(this, hostRef);
5019
+ this.prefill = undefined;
5020
+ this.ignorePopState = () => window.history.pushState(null, '', null);
5021
+ }
5022
+ connectedCallback() {
5023
+ this.ignorePopState();
5024
+ window.addEventListener('popstate', this.ignorePopState);
5025
+ }
5026
+ disconnectedCallback() {
5027
+ window.removeEventListener('popstate', this.ignorePopState);
5028
+ }
5029
+ async componentWillLoad() {
5030
+ this.prefill = isSome(superSelectionAppService.state.superChoicePrefill)
5031
+ ? superSelectionAppService.state.superChoicePrefill.value
5032
+ : undefined;
5033
+ }
5034
+ render() {
5035
+ if (this.prefill && this.prefill.type === 'myOwnFund') {
5036
+ if (this.prefill.data.fundDetail.type === 'Valid') {
5037
+ return this.renderMyOwnFund(this.prefill.data);
5038
+ }
5039
+ else {
5040
+ return this.renderInvalidMyOwnFund(this.prefill.data);
5041
+ }
5042
+ }
5043
+ if (this.prefill && this.prefill.type === 'smsf') {
5044
+ if (this.prefill.data.fundAbn.valid) {
5045
+ return this.renderSMSF(this.prefill.data);
5046
+ }
5047
+ else {
5048
+ return this.renderInvalidSMSF(this.prefill.data);
5049
+ }
5050
+ }
5051
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5052
+ return null;
5053
+ }
5054
+ renderMyOwnFund(data) {
5055
+ return index.h("sss-prefill-my-own-fund", { history: this.history, prefill: data });
5056
+ }
5057
+ renderInvalidMyOwnFund(data) {
5058
+ return index.h("sss-prefill-invalid-my-own-fund", { history: this.history, prefill: data });
5059
+ }
5060
+ renderSMSF(data) {
5061
+ return index.h("sss-prefill-smsf", { history: this.history, prefill: data });
5062
+ }
5063
+ renderInvalidSMSF(data) {
5064
+ return index.h("sss-prefill-invalid-smsf", { history: this.history, prefill: data });
5065
+ }
5066
+ };
5067
+
5068
+ const DisplayField = class {
5069
+ constructor(hostRef) {
5070
+ index.registerInstance(this, hostRef);
5071
+ }
5072
+ render() {
5073
+ return (index.h("div", { class: "flex w-full flex-col sm:flex-row sm:min-h-5 justify-center items-start gap-0.5 sm:gap-4 self-stretch" }, index.h("div", { class: {
5074
+ 'sm:w-2/5 sm:max-w-40 self-stretch text-gray-500 text-xs sm:text-sm not-italic font-medium leading-4 sm:leading-5': true,
5075
+ 'text-red-600': !this.field.isValid
5076
+ } }, this.field.name), index.h("div", { class: {
5077
+ 'sm:w-3/5 max-w-[300px] self-stretch text-gray-900 text-sm not-italic font-normal leading-5 break-words': true,
5078
+ 'text-red-600': !this.field.isValid
5079
+ } }, this.field.value)));
5080
+ }
5081
+ };
5082
+
5083
+ const PrefillErrorBox = class {
5084
+ constructor(hostRef) {
5085
+ index.registerInstance(this, hostRef);
5086
+ this.withHeader = false;
5087
+ }
5088
+ render() {
5089
+ const ErrorIcon = () => {
5090
+ return (index.h("div", { class: "w-5 h-5" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM8.70711 7.29289C8.31658 6.90237 7.68342 6.90237 7.29289 7.29289C6.90237 7.68342 6.90237 8.31658 7.29289 8.70711L8.58579 10L7.29289 11.2929C6.90237 11.6834 6.90237 12.3166 7.29289 12.7071C7.68342 13.0976 8.31658 13.0976 8.70711 12.7071L10 11.4142L11.2929 12.7071C11.6834 13.0976 12.3166 13.0976 12.7071 12.7071C13.0976 12.3166 13.0976 11.6834 12.7071 11.2929L11.4142 10L12.7071 8.70711C13.0976 8.31658 13.0976 7.68342 12.7071 7.29289C12.3166 6.90237 11.6834 6.90237 11.2929 7.29289L10 8.58579L8.70711 7.29289Z", fill: "#F87171" }))));
5091
+ };
5092
+ return (index.h("div", { class: "flex items-start self-stretch rounded-md bg-red-50" }, index.h("div", { class: "w-1 self-stretch bg-red-400" }), index.h("div", { class: "flex items-start gap-3 flex-[1_0_0] p-4" }, index.h(ErrorIcon, null), index.h("div", { class: "flex-col justify-start items-start gap-2 inline-flex" }, this.withHeader && (index.h("div", { class: "self-stretch text-red-800 text-sm font-medium leading-tight" }, "Please correct ", this.notificationList.length, " issues with your fund details")), this.withHeader &&
5093
+ this.notificationList.map((text) => (index.h("div", { class: "self-stretch h-5 flex-col justify-start items-start gap-1 flex" }, index.h("div", { class: "self-stretch pl-1.5 justify-start items-start gap-[7px] inline-flex" }, index.h("div", { class: "pt-1.5 justify-center items-center flex" }, index.h("div", { class: "w-1.5 h-1.5 bg-red-700 rounded-full" })), index.h("div", { class: "grow shrink basis-0 text-red-700 text-sm font-normal leading-tight" }, text))))), !this.withHeader &&
5094
+ this.notificationList.map((text) => (index.h("div", { class: "text-sm font-medium leading-tight text-red-800" }, text)))))));
5095
+ }
5096
+ };
5097
+
5098
+ function isNullOrWhitespace(value) {
5099
+ return value == null || value.trim() === '';
5100
+ }
5101
+ const DisabledField = (name, value) => {
5102
+ return (index.h("div", { class: "mt-3" },
5103
+ index.h("label", { class: "text-sm font-medium text-gray-700" }, name),
5104
+ index.h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm" }, value)));
5105
+ };
5106
+ const Header = () => {
5107
+ return (index.h("div", null,
5108
+ index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Your super nomination"),
5109
+ index.h("div", { class: "sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7" }, "Review or update the below super fund nomination details provided by your employer.")));
5110
+ };
5111
+ class Style {
5112
+ static Input(isValidated) {
5113
+ return {
5114
+ 'relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md focus:z-10': true,
5115
+ 'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': isValidated
5116
+ };
5117
+ }
5118
+ }
5119
+
5120
+ const NAME_PATTERN = "[A-Za-z][A-Za-z']+(( |-)[A-Za-z][A-Za-z']+)*\\s*$";
5121
+ class FormField {
5122
+ constructor(name, value) {
5123
+ this.name = name;
5124
+ this._value = value !== null && value !== void 0 ? value : '';
5125
+ this._errorMessage = this.validateAndReturnErrorMessage(this._value);
5126
+ }
5127
+ get value() {
5128
+ return this._value;
5129
+ }
5130
+ set value(newValue) {
5131
+ this._errorMessage = this.validateAndReturnErrorMessage(newValue);
5132
+ this._value = newValue;
5133
+ }
5134
+ get isValid() {
5135
+ return this._errorMessage === null;
5136
+ }
5137
+ get isEmpty() {
5138
+ return isNullOrWhitespace(this._value);
5139
+ }
5140
+ get errorMessage() {
5141
+ return this._errorMessage;
5142
+ }
5143
+ }
5144
+ class StaticFormField {
5145
+ constructor(name, value, isValid) {
5146
+ this.name = name;
5147
+ this._value = value !== null && value !== void 0 ? value : '';
5148
+ this._isValid = isValid;
5149
+ }
5150
+ get value() {
5151
+ return this._value;
5152
+ }
5153
+ get isValid() {
5154
+ return this._isValid;
5155
+ }
5156
+ get isEmpty() {
5157
+ return isNullOrWhitespace(this._value);
5158
+ }
5159
+ }
5160
+ class FundUsi extends StaticFormField {
5161
+ constructor(value, isValid) {
5162
+ super('Fund USI', value, isValid);
5163
+ }
5164
+ }
5165
+ class FundName extends StaticFormField {
5166
+ constructor(value, isValid) {
5167
+ super('Fund name', value, isValid);
5168
+ }
5169
+ }
5170
+ class SmsfFundName extends FormField {
5171
+ constructor(value) {
5172
+ super('Fund name', value);
5173
+ }
5174
+ validateAndReturnErrorMessage(newValue) {
5175
+ if (isNullOrWhitespace(newValue)) {
5176
+ return 'Fund name is required.';
5177
+ }
5178
+ else if (newValue.length < 2) {
5179
+ return 'Enter a valid Fund name.';
5180
+ }
5181
+ else {
5182
+ return null;
5183
+ }
5184
+ }
5185
+ }
5186
+ class MemberNumber extends FormField {
5187
+ constructor(value) {
5188
+ super('Member number', value);
5189
+ }
5190
+ validateAndReturnErrorMessage(newValue) {
5191
+ const regex = /^[A-Za-z0-9]{4,16}$/;
5192
+ if (isNullOrWhitespace(newValue)) {
5193
+ return 'Member number is required.';
5194
+ }
5195
+ else if (!regex.test(newValue)) {
5196
+ return 'Enter a valid member number (only numbers and / or letters)';
5197
+ }
5198
+ else {
5199
+ return null;
5200
+ }
5201
+ }
5202
+ }
5203
+ class MemberLastName extends FormField {
5204
+ constructor(value) {
5205
+ super('Member last name', value);
5206
+ }
5207
+ validateAndReturnErrorMessage(newValue) {
5208
+ const regex = new RegExp(NAME_PATTERN);
5209
+ if (isNullOrWhitespace(newValue)) {
5210
+ return 'Member last name is required.';
5211
+ }
5212
+ else if (!regex.test(newValue)) {
5213
+ return 'Member last name contains unsupported characters.';
5214
+ }
5215
+ else {
5216
+ return null;
5217
+ }
5218
+ }
5219
+ }
5220
+ class MemberGivenNames extends FormField {
5221
+ constructor(value) {
5222
+ super('Member given name(s)', value);
5223
+ }
5224
+ validateAndReturnErrorMessage(newValue) {
5225
+ const regex = new RegExp(NAME_PATTERN);
5226
+ if (isNullOrWhitespace(newValue)) {
5227
+ return 'Member given name(s) is required.';
5228
+ }
5229
+ else if (!regex.test(newValue)) {
5230
+ return 'Member given name(s) contains unsupported characters.';
5231
+ }
5232
+ else {
5233
+ return null;
5234
+ }
5235
+ }
5236
+ }
5237
+ class FundAbn extends StaticFormField {
5238
+ constructor(value, isValid) {
5239
+ super('Fund ABN', value, isValid);
5240
+ }
5241
+ }
5242
+ class FundEsa extends FormField {
5243
+ constructor(value) {
5244
+ super('Fund ESA', value);
5245
+ }
5246
+ validateAndReturnErrorMessage(newValue) {
5247
+ if (isNullOrWhitespace(newValue)) {
5248
+ return 'Fund ESA is required.';
5249
+ }
5250
+ else if (newValue.length < 2) {
5251
+ return 'Enter a valid Fund ESA.';
5252
+ }
5253
+ else {
5254
+ return null;
5255
+ }
5256
+ }
5257
+ }
5258
+ class FundAddressLine1 extends FormField {
5259
+ constructor(value) {
5260
+ super('Address line 1', value);
5261
+ }
5262
+ validateAndReturnErrorMessage(newValue) {
5263
+ if (isNullOrWhitespace(newValue)) {
5264
+ return 'Address line 1 is required.';
5265
+ }
5266
+ else if (newValue.length < 2) {
5267
+ return 'Enter a valid Address line 1.';
5268
+ }
5269
+ else {
5270
+ return null;
5271
+ }
5272
+ }
5273
+ }
5274
+ class FundAddressLine2 extends FormField {
5275
+ constructor(value) {
5276
+ super('Address line 2', value);
5277
+ }
5278
+ validateAndReturnErrorMessage(_newValue) {
5279
+ return null;
5280
+ }
5281
+ }
5282
+ class FundAddressCity extends FormField {
5283
+ constructor(value) {
5284
+ super('City/suburb', value);
5285
+ }
5286
+ validateAndReturnErrorMessage(newValue) {
5287
+ if (isNullOrWhitespace(newValue)) {
5288
+ return 'City/suburb is required.';
5289
+ }
5290
+ else {
5291
+ return null;
5292
+ }
5293
+ }
5294
+ }
5295
+ class FundAddressPostcode extends FormField {
5296
+ constructor(value) {
5297
+ super('Postcode', value);
5298
+ }
5299
+ validateAndReturnErrorMessage(newValue) {
5300
+ const regex = /^[0-9]{4}$/;
5301
+ if (isNullOrWhitespace(newValue)) {
5302
+ return 'Postcode is required.';
5303
+ }
5304
+ else if (!regex.test(newValue)) {
5305
+ return 'Enter a valid postcode.';
5306
+ }
5307
+ else {
5308
+ return null;
5309
+ }
5310
+ }
5311
+ }
5312
+ class FundAddressState extends FormField {
5313
+ constructor(value) {
5314
+ super('State', value);
5315
+ }
5316
+ get options() {
5317
+ return [
5318
+ { value: 'NSW', label: 'NSW' },
5319
+ { value: 'QLD', label: 'QLD' },
5320
+ { value: 'ACT', label: 'ACT' },
5321
+ { value: 'VIC', label: 'VIC' },
5322
+ { value: 'TAS', label: 'TAS' },
5323
+ { value: 'WA', label: 'WA' },
5324
+ { value: 'SA', label: 'SA' },
5325
+ { value: 'NT', label: 'NT' }
5326
+ ];
5327
+ }
5328
+ validateAndReturnErrorMessage(newValue) {
5329
+ if (isNullOrWhitespace(newValue)) {
5330
+ return 'State is required.';
5331
+ }
5332
+ else if (this.options.find((option) => (option.value = newValue)) === undefined) {
5333
+ return 'Enter a valid state.';
5334
+ }
5335
+ else {
5336
+ return null;
5337
+ }
5338
+ }
5339
+ }
5340
+ class FundAddress extends StaticFormField {
5341
+ constructor(addrLine1, addrLine2, city, state, postcode) {
5342
+ const value = [addrLine1, addrLine2, city, state, postcode]
5343
+ .map((x) => x.value)
5344
+ .filter((v) => v)
5345
+ .join(', ');
5346
+ const isValid = addrLine1.isValid && addrLine2.isValid && city.isValid && state.isValid && postcode.isValid;
5347
+ super('Fund address', value, isValid);
5348
+ }
5349
+ }
5350
+ class BankAccountName extends FormField {
5351
+ constructor(value) {
5352
+ super('Account name', value);
5353
+ }
5354
+ validateAndReturnErrorMessage(newValue) {
5355
+ if (isNullOrWhitespace(newValue)) {
5356
+ return 'Account name is required.';
5357
+ }
5358
+ else if (newValue.length < 2) {
5359
+ return 'Enter a valid Account name.';
5360
+ }
5361
+ else {
5362
+ return null;
5363
+ }
5364
+ }
5365
+ }
5366
+ class BankAccountBsb extends FormField {
5367
+ constructor(value) {
5368
+ super('BSB', value);
5369
+ }
5370
+ validateAndReturnErrorMessage(newValue) {
5371
+ const regex = /^[0-9]{6,7}$/;
5372
+ if (isNullOrWhitespace(newValue)) {
5373
+ return 'BSB is required.';
5374
+ }
5375
+ else if (!regex.test(newValue)) {
5376
+ return 'Enter a valid BSB.';
5377
+ }
5378
+ else {
5379
+ return null;
5380
+ }
5381
+ }
5382
+ }
5383
+ class BankAccountNumber extends FormField {
5384
+ constructor(value) {
5385
+ super('Account number', value);
5386
+ }
5387
+ validateAndReturnErrorMessage(newValue) {
5388
+ const regex = /^[0-9]{2,11}$/;
5389
+ if (isNullOrWhitespace(newValue)) {
5390
+ return 'Account number is required.';
5391
+ }
5392
+ else if (!regex.test(newValue)) {
5393
+ return 'Enter a valid Account number.';
5394
+ }
5395
+ else {
5396
+ return null;
5397
+ }
5398
+ }
5399
+ }
5400
+
5401
+ const PrefillInvalidMyOwnFund = class {
5402
+ constructor(hostRef) {
5403
+ index.registerInstance(this, hostRef);
5404
+ this.eventTrackingService = EventTrackingService.Instance;
5405
+ this.createSuperFundPrefillDeclinedDetail = (prefill) => {
5406
+ return {
5407
+ fundType: 'My Own Fund',
5408
+ isUsiValid: prefill.fundDetail.type === 'Valid',
5409
+ isMemberNumberPresent: !isNullOrWhitespace(prefill.memberNumber),
5410
+ isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
5411
+ isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
5412
+ };
5413
+ };
5414
+ this.createSuperFundPrefillViewedDetail = (prefill) => {
5415
+ return {
5416
+ fundType: 'My Own Fund',
5417
+ isUsiValid: prefill.fundDetail.type === 'Valid',
5418
+ isMemberNumberPresent: !isNullOrWhitespace(prefill.memberNumber),
5419
+ isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
5420
+ isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
5421
+ };
5422
+ };
5423
+ }
5424
+ componentDidLoad() {
5425
+ const detail = this.createSuperFundPrefillViewedDetail(this.prefill);
5426
+ return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(detail);
5427
+ }
5428
+ async componentWillLoad() {
5429
+ if (this.prefill && this.prefill.fundDetail.type === 'Invalid') {
5430
+ this.fundUsi = new FundUsi(this.prefill.fundDetail.fundUsi, false);
5431
+ this.fundName = new FundName('', false);
5432
+ this.memberNumber = new MemberNumber(this.prefill.memberNumber);
5433
+ this.memberGivenNames = new MemberGivenNames(this.prefill.memberFirstName);
5434
+ this.memberLastName = new MemberLastName(this.prefill.memberFamilyName);
5435
+ }
5436
+ else {
5437
+ // If prefill does not exist, or is valid we should
5438
+ // not have landed on this page, navigate to consent page
5439
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5440
+ }
5441
+ }
5442
+ render() {
5443
+ return (index.h("div", null, index.h(Header, null), index.h("div", { class: "flex flex-col items-center gap-8 mt-8 sm:mt-12" }, index.h("div", { class: "flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "flex flex-col items-start gap-3 self-stretch" }, index.h("div", { class: "self-stretch text-grey-900 text-lg not-italic font-bold leading-7" }, "Your fund details"), index.h("sss-prefill-error-box", { class: "self-stretch", notificationList: [
5444
+ 'The fund USI is invalid, or no longer in use. You are required to choose another fund to continue with your super nomination.'
5445
+ ] }), index.h("div", { class: "flex flex-col gap-3 self-stretch mt-4" }, index.h("sss-prefill-display-field", { field: this.fundUsi }), index.h("sss-prefill-display-field", { field: this.fundName }), index.h("sss-prefill-display-field", { field: this.memberNumber }), index.h("sss-prefill-display-field", { field: this.memberLastName }), index.h("sss-prefill-display-field", { field: this.memberGivenNames })))), index.h("div", { class: "flex w-80 flex-col items-start gap-4" }, index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "primary", promiseFn: () => this.handleChooseAnotherFund() }, "Choose another fund")))));
5446
+ }
5447
+ async handleChooseAnotherFund() {
5448
+ const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5449
+ await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5450
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5451
+ }
5452
+ };
5453
+
5454
+ const PrefillInvalidSMSF = class {
5455
+ constructor(hostRef) {
5456
+ index.registerInstance(this, hostRef);
5457
+ this.eventTrackingService = EventTrackingService.Instance;
5458
+ this.createSuperFundPrefillDeclinedDetail = (prefill) => {
5459
+ return {
5460
+ fundType: 'SMSF',
5461
+ isAbnValid: prefill.fundAbn.valid,
5462
+ isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
5463
+ isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
5464
+ };
5465
+ };
5466
+ this.createSuperFundPrefillViewedDetail = (prefill) => {
5467
+ return {
5468
+ fundType: 'SMSF',
5469
+ isAbnValid: prefill.fundAbn.valid,
5470
+ isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
5471
+ isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
5472
+ };
5473
+ };
5474
+ }
5475
+ componentDidLoad() {
5476
+ const detail = this.createSuperFundPrefillViewedDetail(this.prefill);
5477
+ return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(detail);
5478
+ }
5479
+ async componentWillLoad() {
5480
+ if (this.prefill && !this.prefill.fundAbn.valid) {
5481
+ this.initialiseComponent(this.prefill);
5482
+ }
5483
+ else {
5484
+ // If prefill does not exist, or is valid we should
5485
+ // not have landed on this page, navigate to consent page
5486
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
5487
+ }
5488
+ }
5489
+ render() {
5490
+ return (index.h("div", null, index.h(Header, null), index.h("div", { class: "flex flex-col items-center gap-8 mt-8 sm:mt-12" }, index.h("div", { class: "flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "flex flex-col items-start gap-3 self-stretch" }, index.h("div", { class: "self-stretch text-grey-900 text-lg not-italic font-bold leading-7" }, "Your self-managed super fund (SMSF) details"), index.h("sss-prefill-error-box", { class: "self-stretch", notificationList: [
5491
+ 'The fund ABN is invalid. You are required to choose another fund to continue with your super nomination.'
5492
+ ] }), index.h("div", { class: "flex flex-col gap-3 self-stretch mt-4" }, index.h("sss-prefill-display-field", { field: this.fundName }), index.h("sss-prefill-display-field", { field: this.fundAbn }), index.h("sss-prefill-display-field", { field: this.fundEsa }), index.h("sss-prefill-display-field", { field: this.fundAddress }), index.h("sss-prefill-display-field", { field: this.memberLastName }), index.h("sss-prefill-display-field", { field: this.memberGivenNames }), index.h("div", { class: "mt-4 mb-2 text-gray-900 text-lg font-bold leading-7" }, "Fund bank details"), index.h("sss-prefill-display-field", { field: this.bankAccountName }), index.h("sss-prefill-display-field", { field: this.bankAccountBsb }), index.h("sss-prefill-display-field", { field: this.bankAccountNumber })))), index.h("div", { class: "flex w-80 flex-col items-start gap-4" }, index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "primary", promiseFn: () => this.handleFundNominationDeclined() }, "Make another nomination")))));
5493
+ }
5494
+ initialiseComponent(prefill) {
5495
+ this.fundName = new SmsfFundName(prefill.fundName);
5496
+ this.fundAbn = new FundAbn(prefill.fundAbn.value, prefill.fundAbn.valid);
5497
+ this.fundEsa = new FundEsa(prefill.electronicServiceAddress);
5498
+ this.fundAddressLine1 = new FundAddressLine1(prefill.addressLine1);
5499
+ this.fundAddressLine2 = new FundAddressLine2(prefill.addressLine2);
5500
+ this.fundAddressCity = new FundAddressCity(prefill.addressCity);
5501
+ this.fundAddressPostcode = new FundAddressPostcode(prefill.addressPostcode);
5502
+ this.fundAddressState = new FundAddressState(prefill.addressState);
5503
+ this.fundAddress = new FundAddress(this.fundAddressLine1, this.fundAddressLine2, this.fundAddressCity, this.fundAddressState, this.fundAddressPostcode);
5504
+ this.memberGivenNames = new MemberGivenNames(prefill.memberFirstName);
5505
+ this.memberLastName = new MemberLastName(prefill.memberFamilyName);
5506
+ this.bankAccountName = new BankAccountName(prefill.bankAccountName);
5507
+ this.bankAccountBsb = new BankAccountBsb(prefill.bankAccountBsb);
5508
+ this.bankAccountNumber = new BankAccountNumber(prefill.bankAccountNumber);
5509
+ }
5510
+ async handleFundNominationDeclined() {
5511
+ const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5512
+ await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5513
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5514
+ }
5515
+ };
5516
+
5517
+ const PrefillMyOwnFund = class {
5518
+ constructor(hostRef) {
5519
+ index.registerInstance(this, hostRef);
5520
+ this.mode = 'review';
5521
+ this.formState = 'pristine';
5522
+ this.isSubmitDisabled = true;
5523
+ this.eventTrackingService = EventTrackingService.Instance;
5524
+ this.createSuperFundPrefillDeclinedDetail = (prefill) => {
5525
+ return {
5526
+ fundType: 'My Own Fund',
5527
+ isUsiValid: prefill.fundDetail.type === 'Valid',
5528
+ isMemberNumberPresent: !isNullOrWhitespace(prefill.memberNumber),
5529
+ isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
5530
+ isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
5531
+ };
5532
+ };
5533
+ this.createSuperFundPrefillViewedDetail = (prefill) => {
5534
+ return {
5535
+ fundType: 'My Own Fund',
5536
+ isUsiValid: prefill.fundDetail.type === 'Valid',
5537
+ isMemberNumberPresent: !isNullOrWhitespace(prefill.memberNumber),
5538
+ isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
5539
+ isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
5540
+ };
5541
+ };
5542
+ }
5543
+ componentDidLoad() {
5544
+ const detail = this.createSuperFundPrefillViewedDetail(this.prefill);
5545
+ return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(detail);
5546
+ }
5547
+ async componentWillLoad() {
5548
+ if (this.prefill && this.prefill.fundDetail.type === 'Valid') {
5549
+ this.initialiseComponent(this.prefill.fundDetail.fundName, this.prefill);
5550
+ }
5551
+ else {
5552
+ // If prefill does not exist, or is invalid we should
5553
+ // not have landed on this page, navigate to consent page
5554
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5555
+ }
5556
+ }
5557
+ render() {
5558
+ const errorMessages = [
5559
+ this.memberNumber.errorMessage,
5560
+ this.memberLastName.errorMessage,
5561
+ this.memberGivenNames.errorMessage
5562
+ ].filter((err) => err !== null);
5563
+ return (index.h("div", null, index.h(Header, null), index.h("div", { class: "flex flex-col items-center gap-8 mt-8 sm:mt-12" }, index.h("div", { class: "flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "flex flex-col items-start gap-3.5 self-stretch" }, index.h("div", { class: "self-stretch text-grey-900 text-lg not-italic font-bold leading-7" }, "Your fund details"), index.h("sss-prefill-warning-box", { class: "self-stretch", notificationList: [
5564
+ 'Make sure you are a current member of the fund before completing this step.',
5565
+ 'Please check that the fund USI is correct as some funds have similar names.'
5566
+ ] }), this.mode === 'review' && errorMessages.length > 0 && (index.h("sss-prefill-error-box", { class: "self-stretch", notificationList: errorMessages, withHeader: true })), this.mode === 'review' && (index.h("div", { class: "flex flex-col gap-3 self-stretch mt-4" }, index.h("sss-prefill-display-field", { field: this.fundUsi }), index.h("sss-prefill-display-field", { field: this.fundName }), index.h("sss-prefill-display-field", { field: this.memberNumber }), index.h("sss-prefill-display-field", { field: this.memberLastName }), index.h("sss-prefill-display-field", { field: this.memberGivenNames }))), this.mode === 'review' && (index.h("sss-button", { class: "self-stretch mt-3", fillWidth: true, variant: "secondary", promiseFn: () => this.setModeToEdit() }, index.h("div", { class: "flex flex-row gap-2" }, index.h("div", { class: "text-sm not-italic font-medium leading-4" }, "Edit details"), index.h("div", { class: "w-4 h-4 relative" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "currentColor" }, index.h("path", { d: "M11.369 2.86865C11.9939 2.24381 13.0069 2.24381 13.6318 2.86865C14.2566 3.49349 14.2566 4.50656 13.6318 5.1314L12.9974 5.76571L10.7347 3.50297L11.369 2.86865Z" }), index.h("path", { d: "M9.60334 4.63434L2.90039 11.3373V13.6H5.16313L11.8661 6.89708L9.60334 4.63434Z" })))))), this.mode === 'edit' && (index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: { 'was-validated': this.formState === 'validated' }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = this.formHasMissingData()) }, DisabledField(this.fundName.name, this.fundName.value), DisabledField(this.fundUsi.name, this.fundUsi.value), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.memberNumber.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, pattern: "[A-Za-z0-9]{4,16}", value: this.memberNumber.value, onInput: (ev) => {
5567
+ this.updateMemberNumber(ev.target.value);
5568
+ } }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.memberNumber.errorMessage))), index.h("div", { class: "flex gap-x-4 flex-col sm:flex-row" }, index.h("div", { class: "mt-3 w-full sm:w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.memberGivenNames.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, pattern: NAME_PATTERN, value: this.memberGivenNames.value, onInput: (ev) => {
5569
+ this.updateMemberGivenNames(ev.target.value);
5570
+ } }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.memberGivenNames.errorMessage))), index.h("div", { class: "mt-3 w-full sm:w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.memberLastName.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, pattern: NAME_PATTERN, value: this.memberLastName.value, onInput: (ev) => {
5571
+ this.updateMemberLastName(ev.target.value);
5572
+ } }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.memberLastName.errorMessage)))))))), index.h("div", { class: "flex w-80 flex-col items-start gap-4" }, index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "primary", disabled: this.isSubmitDisabled, promiseFn: () => this.handleSubmitForm() }, "Continue"), index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "secondary", promiseFn: () => this.handleFundNominationDeclined() }, "Choose another fund")))));
5573
+ }
5574
+ initialiseComponent(fundName, prefill) {
5575
+ this.fundUsi = new FundUsi(prefill.fundDetail.fundUsi, true);
5576
+ this.fundName = new FundName(fundName, true);
5577
+ this.memberNumber = new MemberNumber(prefill.memberNumber);
5578
+ this.memberGivenNames = new MemberGivenNames(prefill.memberFirstName);
5579
+ this.memberLastName = new MemberLastName(prefill.memberFamilyName);
5580
+ this.isSubmitDisabled = this.formHasMissingData();
5581
+ }
5582
+ isFormValid() {
5583
+ return (this.fundUsi.isValid &&
5584
+ this.fundName.isValid &&
5585
+ this.memberNumber.isValid &&
5586
+ this.memberGivenNames.isValid &&
5587
+ this.memberLastName.isValid);
5588
+ }
5589
+ formHasMissingData() {
5590
+ return (this.fundUsi.isEmpty ||
5591
+ this.fundName.isEmpty ||
5592
+ this.memberNumber.isEmpty ||
5593
+ this.memberGivenNames.isEmpty ||
5594
+ this.memberLastName.isEmpty);
5595
+ }
5596
+ setModeToEdit() {
5597
+ this.mode = 'edit';
5598
+ return Promise.resolve();
5599
+ }
5600
+ updateMemberNumber(memberNumber) {
5601
+ this.memberNumber = new MemberNumber(memberNumber.trim());
5602
+ }
5603
+ updateMemberGivenNames(memberGivenNames) {
5604
+ this.memberGivenNames = new MemberGivenNames(memberGivenNames.trimStart());
5605
+ }
5606
+ updateMemberLastName(memberLastName) {
5607
+ this.memberLastName = new MemberLastName(memberLastName.trim());
5608
+ }
5609
+ async handleSubmitForm() {
5610
+ this.formState = 'validated';
5611
+ if (!this.isFormValid()) {
5612
+ return;
5613
+ }
5614
+ if (this.mode === 'edit' && !this.formElement.checkValidity()) {
5615
+ return;
5616
+ }
5617
+ navigationService.navigateInternallyToStandardChoice({
5618
+ history: this.history,
5619
+ fundName: this.fundName.value,
5620
+ handleSubmitFn: async (standardChoiceFormSignature) => {
5621
+ const customFundChoiceDto = Object.assign({ fundUsi: this.fundUsi.value, memberNumber: this.memberNumber.value, memberFirstName: this.memberGivenNames.value, memberFamilyName: this.memberLastName.value, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
5622
+ await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
5623
+ }
5624
+ });
5625
+ }
5626
+ async handleFundNominationDeclined() {
5627
+ const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5628
+ await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5629
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5630
+ }
5631
+ };
5632
+
5633
+ const PrefillSMSF = class {
5634
+ constructor(hostRef) {
5635
+ index.registerInstance(this, hostRef);
5636
+ this.mode = 'review';
5637
+ this.formState = 'pristine';
5638
+ this.isSubmitDisabled = true;
5639
+ this.eventTrackingService = EventTrackingService.Instance;
5640
+ this.createSuperFundPrefillDeclinedDetail = (prefill) => {
5641
+ return {
5642
+ fundType: 'SMSF',
5643
+ isAbnValid: prefill.fundAbn.valid,
5644
+ isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
5645
+ isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
5646
+ };
5647
+ };
5648
+ this.createSuperFundPrefillViewedDetail = (prefill) => {
5649
+ return {
5650
+ fundType: 'SMSF',
5651
+ isAbnValid: prefill.fundAbn.valid,
5652
+ isMemberFirstNamePresent: !isNullOrWhitespace(prefill.memberFirstName),
5653
+ isMemberLastNamePresent: !isNullOrWhitespace(prefill.memberFamilyName)
5654
+ };
5655
+ };
5656
+ }
5657
+ componentDidLoad() {
5658
+ const detail = this.createSuperFundPrefillViewedDetail(this.prefill);
5659
+ return this.eventTrackingService.TrackSuperFundPrefillViewedAsync(detail);
5660
+ }
5661
+ async componentWillLoad() {
5662
+ if (this.prefill && this.prefill.fundAbn.valid) {
5663
+ this.initialiseComponent(this.prefill);
5664
+ }
5665
+ else {
5666
+ // If prefill does not exist, or is invalid we should
5667
+ // not have landed on this page, navigate to consent page
5668
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
5669
+ }
5670
+ }
5671
+ render() {
5672
+ const errorMessages = [
5673
+ this.fundName.errorMessage,
5674
+ this.fundEsa.errorMessage,
5675
+ this.fundAddressLine1.errorMessage,
5676
+ this.fundAddressLine2.errorMessage,
5677
+ this.fundAddressCity.errorMessage,
5678
+ this.fundAddressPostcode.errorMessage,
5679
+ this.fundAddressState.errorMessage,
5680
+ this.memberLastName.errorMessage,
5681
+ this.memberGivenNames.errorMessage,
5682
+ this.bankAccountName.errorMessage,
5683
+ this.bankAccountBsb.errorMessage,
5684
+ this.bankAccountNumber.errorMessage
5685
+ ].filter((err) => err !== null);
5686
+ return (index.h("div", null, index.h(Header, null), index.h("div", { class: "flex flex-col items-center gap-8 mt-8 sm:mt-12" }, index.h("div", { class: "flex max-w-[560px] flex-col items-start gap-6 p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "flex flex-col items-start gap-3 self-stretch" }, index.h("div", { class: "self-stretch text-grey-900 text-lg not-italic font-bold leading-7" }, "Your self-managed super fund (SMSF) details"), index.h("sss-prefill-warning-box", { class: "self-stretch", notificationList: [
5687
+ 'Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step.'
5688
+ ] }), this.mode === 'review' && errorMessages.length > 0 && (index.h("sss-prefill-error-box", { class: "self-stretch", notificationList: errorMessages, withHeader: true })), this.mode === 'review' && (index.h("div", { class: "flex flex-col gap-3 self-stretch mt-4" }, index.h("sss-prefill-display-field", { field: this.fundName }), index.h("sss-prefill-display-field", { field: this.fundAbn }), index.h("sss-prefill-display-field", { field: this.fundEsa }), index.h("sss-prefill-display-field", { field: this.fundAddress }), index.h("sss-prefill-display-field", { field: this.memberLastName }), index.h("sss-prefill-display-field", { field: this.memberGivenNames }), index.h("div", { class: "mt-4 mb-2 text-gray-900 text-lg font-bold leading-7" }, "Fund bank details"), index.h("sss-prefill-display-field", { field: this.bankAccountName }), index.h("sss-prefill-display-field", { field: this.bankAccountBsb }), index.h("sss-prefill-display-field", { field: this.bankAccountNumber }))), this.mode === 'review' && (index.h("sss-button", { class: "self-stretch mt-3", fillWidth: true, variant: "secondary", promiseFn: () => this.setModeToEdit() }, index.h("div", { class: "flex flex-row gap-2" }, index.h("div", { class: "text-sm not-italic font-medium leading-4" }, "Edit details"), index.h("div", { class: "w-4 h-4 relative" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "currentColor" }, index.h("path", { d: "M11.369 2.86865C11.9939 2.24381 13.0069 2.24381 13.6318 2.86865C14.2566 3.49349 14.2566 4.50656 13.6318 5.1314L12.9974 5.76571L10.7347 3.50297L11.369 2.86865Z" }), index.h("path", { d: "M9.60334 4.63434L2.90039 11.3373V13.6H5.16313L11.8661 6.89708L9.60334 4.63434Z" })))))), this.mode === 'edit' && (index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: { 'was-validated': this.formState === 'validated' }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = this.formHasMissingData()) }, index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.fundName.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.fundName.value, onInput: (ev) => {
5689
+ this.updateFundName(ev.target.value);
5690
+ } }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.fundName.errorMessage))), DisabledField(this.fundAbn.name, this.fundAbn.value), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.fundEsa.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, minlength: "2", value: this.fundEsa.value, onInput: (ev) => {
5691
+ this.updateFundEsa(ev.target.value);
5692
+ } }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.fundEsa.errorMessage))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Fund address"), index.h("div", { class: "mt-1 rounded-md shadow-sm -space-y-px" }, index.h("input", { placeholder: "Address line 1", type: "text", class: Object.assign(Object.assign({}, Style.Input(this.formState === 'validated')), { 'rounded-none rounded-t-md shadow-none': true }), required: true, minlength: "2", name: "addressLine1", id: "addressLine1", value: this.fundAddressLine1.value, onInput: (ev) => {
5693
+ this.updateAddressLine1(ev.target.value);
5694
+ } }), index.h("input", { placeholder: "Address line 2 (optional)", type: "text", class: Object.assign(Object.assign({}, Style.Input(this.formState === 'validated')), { 'rounded-none shadow-none': true }), value: this.fundAddressLine2.value, onInput: (ev) => this.updateAddressLine2(ev.target.value) }), index.h("input", { placeholder: "City/suburb", type: "text", class: Object.assign(Object.assign({}, Style.Input(this.formState === 'validated')), { 'rounded-none shadow-none': true }), required: true, value: this.fundAddressCity.value, onInput: (ev) => {
5695
+ this.updateAddressCity(ev.target.value);
5696
+ } }), index.h("div", { class: "flex -space-x-px" }, index.h("div", { class: "w-1/2 flex-1 min-w-0" }, index.h("input", { placeholder: "Postcode", type: "text", required: true, class: Object.assign(Object.assign({}, Style.Input(this.formState === 'validated')), { 'rounded-none rounded-bl-md shadow-none': true }), name: "postcode", minlength: "4", maxlength: "4", pattern: "[0-9]{4}", id: "postcode", value: this.fundAddressPostcode.value, inputmode: "numeric", onInput: (ev) => {
5697
+ this.updateAddressPostcode(ev.target.value);
5698
+ } })), index.h("div", { class: "flex-1 min-w-0" }, index.h("select", { class: Object.assign(Object.assign({}, Style.Input(this.formState === 'validated')), { 'rounded-none rounded-br-md shadow-none': true, 'text-gray-500': this.formState !== 'validated' }), name: "state", required: true, id: "state", onInput: (ev) => {
5699
+ this.updateAddressState(ev.target.value);
5700
+ } }, index.h("option", { disabled: true, selected: this.fundAddressState.value !== undefined, value: "" }, "State"), this.fundAddressState.options.map((s) => (index.h("option", { value: s.value, selected: this.fundAddressState.value === s.value }, s.label))))))), this.formState === 'validated' && (index.h("div", { class: "mt-2 text-sm text-red-600" }, this.fundAddressLine1.errorMessage ||
5701
+ this.fundAddressLine1.errorMessage ||
5702
+ this.fundAddressCity.errorMessage ||
5703
+ this.fundAddressPostcode.errorMessage ||
5704
+ this.fundAddressState.errorMessage))), index.h("div", { class: "flex gap-x-4 flex-col sm:flex-row" }, index.h("div", { class: "mt-3 w-full sm:w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.memberGivenNames.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.memberGivenNames.value, onInput: (ev) => {
5705
+ this.updateMemberGivenNames(ev.target.value);
5706
+ } }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.memberGivenNames.errorMessage))), index.h("div", { class: "mt-3 w-full sm:w-1/2" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.memberLastName.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.memberLastName.value, onInput: (ev) => {
5707
+ this.updateMemberLastName(ev.target.value);
5708
+ } }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.memberLastName.errorMessage)))), index.h("div", { class: "mt-6 text-gray-900 text-lg font-bold leading-7" }, "Fund bank details"), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.bankAccountName.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.bankAccountName.value, onInput: (ev) => {
5709
+ this.updateBankAccountName(ev.target.value);
5710
+ } }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.bankAccountName.errorMessage))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.bankAccountBsb.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.bankAccountBsb.value, onInput: (ev) => {
5711
+ this.updateBankAccountBsb(ev.target.value);
5712
+ } }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.bankAccountBsb.errorMessage))), index.h("div", { class: "mt-3" }, index.h("label", { class: "text-sm font-medium text-gray-700" }, this.bankAccountNumber.name), index.h("div", { class: "mt-1" }, index.h("input", { type: "text", class: Style.Input(this.formState === 'validated'), required: true, value: this.bankAccountNumber.value, onInput: (ev) => {
5713
+ this.updateBankAccountNumber(ev.target.value);
5714
+ } }), index.h("div", { class: "mt-2 text-sm text-red-600" }, this.formState === 'validated' && this.bankAccountNumber.errorMessage))))))), index.h("div", { class: "flex w-80 flex-col items-start gap-4" }, index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "primary", disabled: this.isSubmitDisabled, promiseFn: () => this.handleSubmitForm() }, "Continue"), index.h("sss-button", { class: "self-stretch", fillWidth: true, variant: "secondary", promiseFn: () => this.handleFundNominationDeclined() }, "Make another nomination")))));
5715
+ }
5716
+ isFormValid() {
5717
+ return (this.fundName.isValid &&
5718
+ this.fundAbn.isValid &&
5719
+ this.fundEsa.isValid &&
5720
+ this.fundAddressLine1.isValid &&
5721
+ this.fundAddressLine2.isValid &&
5722
+ this.fundAddressCity.isValid &&
5723
+ this.fundAddressPostcode.isValid &&
5724
+ this.fundAddressState.isValid &&
5725
+ this.memberGivenNames.isValid &&
5726
+ this.memberLastName.isValid &&
5727
+ this.bankAccountName.isValid &&
5728
+ this.bankAccountBsb.isValid &&
5729
+ this.bankAccountNumber.isValid);
5730
+ }
5731
+ formHasMissingData() {
5732
+ return (this.fundName.isEmpty ||
5733
+ this.fundAbn.isEmpty ||
5734
+ this.fundEsa.isEmpty ||
5735
+ this.fundAddressLine1.isEmpty ||
5736
+ this.fundAddressCity.isEmpty ||
5737
+ this.fundAddressPostcode.isEmpty ||
5738
+ this.fundAddressState.isEmpty ||
5739
+ this.memberGivenNames.isEmpty ||
5740
+ this.memberLastName.isEmpty ||
5741
+ this.bankAccountName.isEmpty ||
5742
+ this.bankAccountBsb.isEmpty ||
5743
+ this.bankAccountNumber.isEmpty);
5744
+ }
5745
+ setModeToEdit() {
5746
+ this.mode = 'edit';
5747
+ return Promise.resolve();
5748
+ }
5749
+ updateFundName(fundName) {
5750
+ this.fundName = new SmsfFundName(fundName.trim());
5751
+ }
5752
+ updateFundEsa(fundEda) {
5753
+ this.fundEsa = new FundEsa(fundEda.trim());
5754
+ }
5755
+ updateAddressLine1(value) {
5756
+ this.fundAddressLine1 = new FundAddressLine1(value.trim());
5757
+ }
5758
+ updateAddressLine2(value) {
5759
+ this.fundAddressLine2 = new FundAddressLine2(value.trim());
5760
+ }
5761
+ updateAddressCity(value) {
5762
+ this.fundAddressCity = new FundAddressCity(value.trim());
5763
+ }
5764
+ updateAddressPostcode(value) {
5765
+ this.fundAddressPostcode = new FundAddressPostcode(value.trim());
5766
+ }
5767
+ updateAddressState(value) {
5768
+ this.fundAddressState = new FundAddressState(value.trim());
5769
+ }
5770
+ updateBankAccountName(bankAccountName) {
5771
+ this.bankAccountName = new BankAccountName(bankAccountName.trim());
5772
+ }
5773
+ updateBankAccountBsb(bankAccountBsb) {
5774
+ this.bankAccountBsb = new BankAccountBsb(bankAccountBsb.trim());
5775
+ }
5776
+ updateBankAccountNumber(bankAccountNumber) {
5777
+ this.bankAccountNumber = new BankAccountNumber(bankAccountNumber.trim());
5778
+ }
5779
+ updateMemberGivenNames(memberGivenNames) {
5780
+ this.memberGivenNames = new MemberGivenNames(memberGivenNames);
5781
+ }
5782
+ updateMemberLastName(memberLastName) {
5783
+ this.memberLastName = new MemberLastName(memberLastName.trim());
5784
+ }
5785
+ async handleSubmitForm() {
5786
+ this.formState = 'validated';
5787
+ if (!this.isFormValid()) {
5788
+ return;
5789
+ }
5790
+ if (this.mode === 'edit' && !this.formElement.checkValidity()) {
5791
+ return;
5792
+ }
5793
+ navigationService.navigateInternallyToStandardChoice({
5794
+ history: this.history,
5795
+ fundName: this.fundName.value,
5796
+ handleSubmitFn: async (standardChoiceFormSignature) => {
5797
+ const smsfChoiceDto = Object.assign({ smsfChoice: {
5798
+ abn: this.fundAbn.value,
5799
+ fundName: this.fundName.value,
5800
+ fundAddress: {
5801
+ addressLine1: this.fundAddressLine1.value,
5802
+ addressLine2: this.fundAddressLine2.value.trim() === ''
5803
+ ? null
5804
+ : this.fundAddressLine2.value.trim(),
5805
+ city: this.fundAddressCity.value,
5806
+ state: this.fundAddressState.value,
5807
+ postcode: this.fundAddressPostcode.value
5808
+ },
5809
+ bsb: this.bankAccountBsb.value,
5810
+ bankAccountName: this.bankAccountName.value,
5811
+ bankAccountNumber: this.bankAccountNumber.value,
5812
+ electronicServiceAddress: this.fundEsa.value,
5813
+ memberFirstName: this.memberGivenNames.value,
5814
+ memberFamilyName: this.memberLastName.value
5815
+ }, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
5816
+ await customFundChoiceApi.submitSelfManagedFundChoiceAsync(smsfChoiceDto);
5817
+ }
5818
+ });
5819
+ }
5820
+ initialiseComponent(prefill) {
5821
+ this.fundName = new SmsfFundName(prefill.fundName);
5822
+ this.fundAbn = new FundAbn(prefill.fundAbn.value, prefill.fundAbn.valid);
5823
+ this.fundEsa = new FundEsa(prefill.electronicServiceAddress);
5824
+ this.fundAddressLine1 = new FundAddressLine1(prefill.addressLine1);
5825
+ this.fundAddressLine2 = new FundAddressLine2(prefill.addressLine2);
5826
+ this.fundAddressCity = new FundAddressCity(prefill.addressCity);
5827
+ this.fundAddressPostcode = new FundAddressPostcode(prefill.addressPostcode);
5828
+ this.fundAddressState = new FundAddressState(prefill.addressState);
5829
+ this.fundAddress = new FundAddress(this.fundAddressLine1, this.fundAddressLine2, this.fundAddressCity, this.fundAddressState, this.fundAddressPostcode);
5830
+ this.memberGivenNames = new MemberGivenNames(prefill.memberFirstName);
5831
+ this.memberLastName = new MemberLastName(prefill.memberFamilyName);
5832
+ this.bankAccountName = new BankAccountName(prefill.bankAccountName);
5833
+ this.bankAccountBsb = new BankAccountBsb(prefill.bankAccountBsb);
5834
+ this.bankAccountNumber = new BankAccountNumber(prefill.bankAccountNumber);
5835
+ this.isSubmitDisabled = this.formHasMissingData();
5836
+ }
5837
+ async handleFundNominationDeclined() {
5838
+ const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5839
+ await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5840
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5841
+ }
5842
+ };
5843
+
5844
+ const PrefillWarningBox = class {
5845
+ constructor(hostRef) {
5846
+ index.registerInstance(this, hostRef);
5847
+ }
5848
+ render() {
5849
+ const WarningIcon = () => {
5850
+ return (index.h("div", { class: "w-5 h-5" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.25706 3.09882C9.02167 1.73952 10.9788 1.73952 11.7434 3.09882L17.3237 13.0194C18.0736 14.3526 17.1102 15.9999 15.5805 15.9999H4.4199C2.89025 15.9999 1.92682 14.3526 2.67675 13.0194L8.25706 3.09882ZM11.0001 13C11.0001 13.5523 10.5524 14 10.0001 14C9.44784 14 9.00012 13.5523 9.00012 13C9.00012 12.4477 9.44784 12 10.0001 12C10.5524 12 11.0001 12.4477 11.0001 13ZM10.0001 5C9.44784 5 9.00012 5.44772 9.00012 6V9C9.00012 9.55228 9.44784 10 10.0001 10C10.5524 10 11.0001 9.55228 11.0001 9V6C11.0001 5.44772 10.5524 5 10.0001 5Z", fill: "#FBBF24" }))));
5851
+ };
5852
+ return (index.h("div", { class: "flex items-start self-stretch rounded-md bg-yellow-50" }, index.h("div", { class: "w-1 self-stretch bg-yellow-400" }), index.h("div", { class: "flex items-start gap-3 flex-[1_0_0] p-4" }, index.h(WarningIcon, null), index.h("div", { class: "flex flex-col items-start gap-2 flex-[1_0_0]" }, index.h("div", { class: "flex flex-col items-start gap-1 self-stretch" }, this.notificationList.map((text) => (index.h("div", { class: "flex items-start gap-[7px] self-stretch pl-0" }, this.notificationList.length > 1 && (index.h("div", { class: "pt-1.5 justify-center items-center flex" }, index.h("div", { class: "w-1.5 h-1.5 bg-yellow-700 rounded-full" }))), index.h("div", { class: "flex-[1_0_0] text-sm not-italic font-normal leading-5 text-yellow-700" }, text)))))))));
5853
+ }
5854
+ };
5855
+
4944
5856
  class PromotedFundChoiceApi {
4945
5857
  async submitChoiceAsync(dto) {
4946
5858
  return buildBackendApiClient()
@@ -5717,6 +6629,7 @@ const StandardChoiceFormInputDefaultFund = class {
5717
6629
  index.registerInstance(this, hostRef);
5718
6630
  this.standardChoiceFormSignature = '';
5719
6631
  this.isSubmitDisabled = true;
6632
+ this.changeFundUrl = SuperSelectionAppRoutes.ChoicePage;
5720
6633
  this.ignorePopState = () => window.history.pushState(null, '', null);
5721
6634
  }
5722
6635
  connectedCallback() {
@@ -5726,8 +6639,13 @@ const StandardChoiceFormInputDefaultFund = class {
5726
6639
  disconnectedCallback() {
5727
6640
  window.removeEventListener('popstate', this.ignorePopState);
5728
6641
  }
6642
+ async componentWillLoad() {
6643
+ if (Option.isSome(superSelectionAppService.state.superChoicePrefill)) {
6644
+ this.changeFundUrl = SuperSelectionAppRoutes.ConsentPage;
6645
+ }
6646
+ }
5729
6647
  render() {
5730
- return (index.h(index.Host, null, index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"), index.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."), index.h("div", { class: "flex justify-center mt-8 sm:mt-12" }, index.h("div", { class: "max-w-560" }, index.h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" }, this.renderLogo(), index.h("div", { class: "flex justify-between w-full" }, index.h("div", null, index.h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"), index.h("div", { class: "text-sm mt-2" }, state.fundName)), index.h("div", { class: "grid content-center ml-4" }, index.h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage }, index.h("sss-button", { size: "xs", variant: "secondary" }, "Change"))))), index.h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"), index.h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" }, index.h("div", { class: "flex" }, index.h("div", { class: "flex-shrink-0" }, index.h("img", { class: "h-5 w-5", src: index.getAssetPath('assets/icon-information-circle.svg') })), index.h("div", { class: "ml-2" }, index.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.")))), index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
6648
+ return (index.h(index.Host, null, index.h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"), index.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."), index.h("div", { class: "flex justify-center mt-8 sm:mt-12" }, index.h("div", { class: "max-w-560" }, index.h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" }, this.renderLogo(), index.h("div", { class: "flex justify-between w-full" }, index.h("div", null, index.h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"), index.h("div", { class: "text-sm mt-2" }, state.fundName)), index.h("div", { class: "grid content-center ml-4" }, index.h("stencil-route-link", { url: this.changeFundUrl }, index.h("sss-button", { size: "xs", variant: "secondary" }, "Change"))))), index.h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" }, index.h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"), index.h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" }, index.h("div", { class: "flex" }, index.h("div", { class: "flex-shrink-0" }, index.h("img", { class: "h-5 w-5", src: index.getAssetPath('assets/icon-information-circle.svg') })), index.h("div", { class: "ml-2" }, index.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.")))), index.h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
5731
6649
  'mt-3': true,
5732
6650
  'was-validated': this.formState === 'validated'
5733
6651
  }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, index.h("label", { class: "text-sm font-medium text-gray-700" }, "Type your full name"), index.h("input", { type: "text", autocomplete: "off", class: {
@@ -6055,7 +6973,7 @@ const getUrl = (url, root) => {
6055
6973
  }
6056
6974
  return root + url;
6057
6975
  };
6058
- const RouteLink = class {
6976
+ const RouteLink$1 = class {
6059
6977
  constructor(hostRef) {
6060
6978
  index.registerInstance(this, hostRef);
6061
6979
  this.unsubscribe = () => { return; };
@@ -6109,7 +7027,7 @@ const RouteLink = class {
6109
7027
  "location": ["computeMatch"]
6110
7028
  }; }
6111
7029
  };
6112
- activeRouter.ActiveRouter.injectProps(RouteLink, [
7030
+ activeRouter.ActiveRouter.injectProps(RouteLink$1, [
6113
7031
  'history',
6114
7032
  'location',
6115
7033
  'root'
@@ -6889,7 +7807,10 @@ const SuperSelectionApp = class {
6889
7807
  iframe.appReady();
6890
7808
  const ignoreExistingSelectionOption = Option.fromNullable(this.ignoreExistingSelection);
6891
7809
  const shouldIgnoreExistingChoice = Option.isSome(ignoreExistingSelectionOption) && ignoreExistingSelectionOption.value;
6892
- if (Option.isSome(chosenFundOption) &&
7810
+ if (Option.isSome(superSelectionAppService.state.superChoicePrefill)) {
7811
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.Prefill);
7812
+ }
7813
+ else if (Option.isSome(chosenFundOption) &&
6893
7814
  chosenFundOption.value.valid !== 'Inactive' &&
6894
7815
  !shouldIgnoreExistingChoice) {
6895
7816
  navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ExistingChoicePage);
@@ -17259,7 +18180,7 @@ class AppParametersQuery extends datoramaAkita.Query {
17259
18180
  }
17260
18181
  const appParametersQuery = new AppParametersQuery(sessionStore);
17261
18182
 
17262
- const superSelectionAppHostCss = "html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#fdbd00;--fl-color-primary-light:#ffc418;--fl-color-primary-dark:#e4aa00;--fl-color-primary-disabled:#ffde7e;--fl-color-primary-hover:#e4aa00;--fl-color-primary-focus:#ca9700;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";
18183
+ const superSelectionAppHostCss = "html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#fdbd00;--fl-color-primary-light:#fef3c7;--fl-color-primary-dark:#d97706;--fl-color-primary-disabled:#ffde7e;--fl-color-primary-hover:#e4aa00;--fl-color-primary-focus:#ca9700;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";
17263
18184
 
17264
18185
  const SuperSelectionAppHost = class {
17265
18186
  constructor(hostRef) {
@@ -17335,6 +18256,14 @@ exports.sss_loading_page = LoadingPage;
17335
18256
  exports.sss_my_own_fund = MyOwnFund;
17336
18257
  exports.sss_my_own_fund_inputs = MyOwnFundInputs;
17337
18258
  exports.sss_name_input = MemberNameInput;
18259
+ exports.sss_prefill = Prefill;
18260
+ exports.sss_prefill_display_field = DisplayField;
18261
+ exports.sss_prefill_error_box = PrefillErrorBox;
18262
+ exports.sss_prefill_invalid_my_own_fund = PrefillInvalidMyOwnFund;
18263
+ exports.sss_prefill_invalid_smsf = PrefillInvalidSMSF;
18264
+ exports.sss_prefill_my_own_fund = PrefillMyOwnFund;
18265
+ exports.sss_prefill_smsf = PrefillSMSF;
18266
+ exports.sss_prefill_warning_box = PrefillWarningBox;
17338
18267
  exports.sss_promoted_fund_join_v1_page = PromotedFundJoinV1Page;
17339
18268
  exports.sss_promoted_fund_join_v2_page = PromotedFundJoinV2Page;
17340
18269
  exports.sss_self_managed_fund = SelfManagedFund;
@@ -17346,7 +18275,7 @@ exports.sss_super_choice_item_bottom = SuperChoiceItemBottom;
17346
18275
  exports.sss_super_choice_item_top = SuperChoiceItemTop;
17347
18276
  exports.sss_super_choice_page = SuperChoicePage;
17348
18277
  exports.stencil_route = Route;
17349
- exports.stencil_route_link = RouteLink;
18278
+ exports.stencil_route_link = RouteLink$1;
17350
18279
  exports.stencil_route_switch = RouteSwitch;
17351
18280
  exports.stencil_router = Router;
17352
18281
  exports.super_selection_app = SuperSelectionApp;