@flarehr/apollo-super-selection 5.44.6793 → 5.45.6971

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 (31) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  2. package/dist/lib/apollo-super-selection/p-44edd355.system.entry.js +69 -0
  3. package/dist/lib/apollo-super-selection/p-46cf321a.entry.js +14 -0
  4. package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
  5. package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
  6. package/dist/lib/cjs/loader.cjs.js +1 -1
  7. package/dist/lib/cjs/{sss-button_33.cjs.entry.js → sss-button_34.cjs.entry.js} +205 -103
  8. package/dist/lib/collection/collection-manifest.json +5 -3
  9. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +253 -0
  10. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +121 -0
  11. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +1 -1
  12. package/dist/lib/esm/apollo-super-selection.js +1 -1
  13. package/dist/lib/esm/loader.js +1 -1
  14. package/dist/lib/esm/{sss-button_33.entry.js → sss-button_34.entry.js} +204 -103
  15. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  16. package/dist/lib/esm-es5/loader.js +1 -1
  17. package/dist/lib/esm-es5/sss-button_34.entry.js +69 -0
  18. package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +1 -1
  19. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +29 -0
  20. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.d.ts +14 -0
  21. package/dist/lib/types/components.d.ts +35 -15
  22. package/package.json +1 -1
  23. package/dist/lib/apollo-super-selection/p-36a6d49c.system.entry.js +0 -69
  24. package/dist/lib/apollo-super-selection/p-4f85f43b.entry.js +0 -14
  25. package/dist/lib/collection/components/super-smsf/super-smsf-types.js +0 -1
  26. package/dist/lib/collection/components/super-smsf/super-smsf.js +0 -136
  27. package/dist/lib/esm-es5/sss-button_33.entry.js +0 -69
  28. package/dist/lib/types/components/super-smsf/super-smsf-types.d.ts +0 -34
  29. package/dist/lib/types/components/super-smsf/super-smsf.d.ts +0 -18
  30. /package/dist/lib/collection/components/{super-smsf/super-smsf.form.js → super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.form.js} +0 -0
  31. /package/dist/lib/types/components/{super-smsf/super-smsf.form.d.ts → super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.form.d.ts} +0 -0
@@ -1 +0,0 @@
1
- export const LoadWaitingTimeout = 30000;
@@ -1,136 +0,0 @@
1
- import { Component, h, Host, Prop, State } from '@stencil/core';
2
- import { injectHistory } from '@stencil/router';
3
- import { isSome } from 'fp-ts/lib/Option';
4
- import customFundChoiceApi from '../super-selection-app/funds/custom-fund/api/custom-fund-choice.api';
5
- import navigationService from '../super-selection-app/services/navigation.service';
6
- import { SuperSelectionAppRoutes } from '../super-selection-app/services/super-selection-app.routes';
7
- import superSelectionAppService from '../super-selection-app/services/super-selection-app.service';
8
- import { LoadWaitingTimeout } from './super-smsf-types';
9
- var SuperSmsfComponentStatus;
10
- (function (SuperSmsfComponentStatus) {
11
- SuperSmsfComponentStatus[SuperSmsfComponentStatus["NotLoaded"] = 1] = "NotLoaded";
12
- SuperSmsfComponentStatus[SuperSmsfComponentStatus["Loaded"] = 2] = "Loaded";
13
- })(SuperSmsfComponentStatus || (SuperSmsfComponentStatus = {}));
14
- let superSmsfComponentStatus = SuperSmsfComponentStatus.NotLoaded;
15
- export class SuperSmsfHost {
16
- constructor() {
17
- this.subscribeToSuperSmsfEvents = () => {
18
- for (const eventName in this.smsfEventHandlers) {
19
- document.addEventListener(eventName, this.smsfEventHandlers[eventName]);
20
- }
21
- };
22
- this.unSubscribeFromSuperSmsfEvents = () => {
23
- for (const eventName in this.smsfEventHandlers) {
24
- document.removeEventListener(eventName, this.smsfEventHandlers[eventName]);
25
- }
26
- };
27
- this.smsfLoaded = async (event) => {
28
- if (event.detail.sender === 'super-smsf') {
29
- superSmsfComponentStatus = SuperSmsfComponentStatus.Loaded;
30
- clearTimeout(this.loadingTimeoutRef);
31
- }
32
- return Promise.resolve();
33
- };
34
- this.smsfCompleted = async (event) => {
35
- if (event.detail.sender === 'super-smsf') {
36
- navigationService.navigateInternallyToStandardChoice({
37
- history: this.history,
38
- fundName: 'Self-managed super fund',
39
- fundDetails: {
40
- type: 'smsf',
41
- fundName: event.detail.fundName,
42
- fundEsa: event.detail.fundEsa
43
- },
44
- handleSubmitFn: async (standardChoiceFormSignature) => {
45
- const requestDto = Object.assign({ smsfChoice: {
46
- abn: event.detail.fundAbn,
47
- fundName: event.detail.fundName,
48
- fundAddress: {
49
- addressLine1: event.detail.fundAddressLine1,
50
- addressLine2: event.detail.fundAddressLine2,
51
- city: event.detail.fundCity,
52
- state: event.detail.fundState,
53
- postcode: event.detail.fundPostcode
54
- },
55
- bsb: event.detail.bankBsb,
56
- bankAccountName: event.detail.bankAccountName,
57
- bankAccountNumber: event.detail.bankAccountNumber,
58
- electronicServiceAddress: event.detail.fundEsa,
59
- memberFirstName: event.detail.memberFirstName,
60
- memberFamilyName: event.detail.memberLastName
61
- }, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
62
- await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
63
- }
64
- });
65
- }
66
- };
67
- this.smsfCancelled = async (event) => {
68
- if (event.detail.sender === 'super-smsf') {
69
- await navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
70
- }
71
- };
72
- this.smsfEventHandlers = {
73
- 'smsf-loaded': this.smsfLoaded.bind(this),
74
- 'smsf-completed': this.smsfCompleted.bind(this),
75
- 'smsf-cancelled': this.smsfCancelled.bind(this)
76
- };
77
- }
78
- async componentWillLoad() {
79
- if (isSome(superSelectionAppService.backendUrl) && isSome(superSelectionAppService.state.jwt)) {
80
- this.backendUrl = superSelectionAppService.backendUrl.value;
81
- this.accessToken = superSelectionAppService.state.jwt.value;
82
- if (superSmsfComponentStatus === SuperSmsfComponentStatus.NotLoaded) {
83
- this.loadingTimeoutRef = setTimeout(this.smsfLoadingTimeoutTriggered.bind(this), LoadWaitingTimeout);
84
- }
85
- this.subscribeToSuperSmsfEvents();
86
- }
87
- else {
88
- throw Error(`SuperSmsfHost pre-requisites not met.`);
89
- }
90
- }
91
- disconnectedCallback() {
92
- clearTimeout(this.loadingTimeoutRef);
93
- this.unSubscribeFromSuperSmsfEvents();
94
- }
95
- render() {
96
- return (h(Host, null,
97
- h("sss-header-section", null),
98
- h("div", { class: "flex justify-center mt-11" },
99
- h("sss-custom-fund", null,
100
- h("div", null,
101
- h("apollo-super-smsf", { "backend-url": this.backendUrl, "access-token": this.accessToken }))))));
102
- }
103
- async smsfLoadingTimeoutTriggered() {
104
- if (superSmsfComponentStatus !== SuperSmsfComponentStatus.Loaded) {
105
- throw Error(`SMSF component failed to load.`);
106
- }
107
- }
108
- static get is() { return "sss-super-smsf-host"; }
109
- static get properties() { return {
110
- "history": {
111
- "type": "unknown",
112
- "mutable": false,
113
- "complexType": {
114
- "original": "RouterHistory",
115
- "resolved": "RouterHistory",
116
- "references": {
117
- "RouterHistory": {
118
- "location": "import",
119
- "path": "@stencil/router"
120
- }
121
- }
122
- },
123
- "required": false,
124
- "optional": false,
125
- "docs": {
126
- "tags": [],
127
- "text": ""
128
- }
129
- }
130
- }; }
131
- static get states() { return {
132
- "backendUrl": {},
133
- "accessToken": {}
134
- }; }
135
- }
136
- injectHistory(SuperSmsfHost);