@flarehr/apollo-super-selection 5.54.16008 → 5.55.16332

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 (75) 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/apollo-super-selection.js +1 -1
  4. package/dist/lib/apollo-super-selection/p-1596c9a2.system.entry.js +69 -0
  5. package/dist/lib/apollo-super-selection/{p-ef3afa00.system.entry.js → p-22939048.system.entry.js} +1 -1
  6. package/dist/lib/apollo-super-selection/p-2590548f.system.js +1 -0
  7. package/dist/lib/apollo-super-selection/{p-02f24922.system.entry.js → p-2b42304a.system.entry.js} +1 -1
  8. package/dist/lib/apollo-super-selection/{p-9c855634.entry.js → p-33eca162.entry.js} +1 -1
  9. package/dist/lib/apollo-super-selection/p-4e871154.entry.js +1 -0
  10. package/dist/lib/apollo-super-selection/{p-6ac8791e.system.entry.js → p-53b231f0.system.entry.js} +1 -1
  11. package/dist/lib/apollo-super-selection/{p-b89b68db.entry.js → p-5c73c587.entry.js} +1 -1
  12. package/dist/lib/apollo-super-selection/p-645755ee.system.entry.js +1 -0
  13. package/dist/lib/apollo-super-selection/{p-fcb4050d.entry.js → p-69bbf1dd.entry.js} +1 -1
  14. package/dist/lib/apollo-super-selection/p-6b03f1b2.entry.js +1 -0
  15. package/dist/lib/apollo-super-selection/{p-44bec843.system.js → p-71ca4cf8.system.js} +1 -1
  16. package/dist/lib/apollo-super-selection/p-8f3cc4bf.entry.js +14 -0
  17. package/dist/lib/apollo-super-selection/p-97188c78.system.js +1 -0
  18. package/dist/lib/apollo-super-selection/p-99266549.js +1 -0
  19. package/dist/lib/apollo-super-selection/{p-23cfdd82.entry.js → p-9d2a7c0e.entry.js} +1 -1
  20. package/dist/lib/apollo-super-selection/p-bd6e6a8f.system.js +1 -0
  21. package/dist/lib/apollo-super-selection/p-c775c0e4.system.entry.js +1 -0
  22. package/dist/lib/apollo-super-selection/{p-51c6dd08.js → p-db0bded8.js} +1 -1
  23. package/dist/lib/apollo-super-selection/{p-f29066b9.system.entry.js → p-e957b393.system.entry.js} +1 -1
  24. package/dist/lib/apollo-super-selection/{p-7a89efaf.js → p-fdadb647.js} +1 -1
  25. package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
  26. package/dist/lib/cjs/custom-fund-choice.api-713823d3.js +3043 -0
  27. package/dist/lib/cjs/loader.cjs.js +1 -1
  28. package/dist/lib/cjs/{sss-button_33.cjs.entry.js → sss-button_31.cjs.entry.js} +395 -3566
  29. package/dist/lib/cjs/sss-super-byof-host.cjs.entry.js +94 -0
  30. package/dist/lib/collection/apollo-super-selection.css +1 -1
  31. package/dist/lib/collection/collection-manifest.json +1 -4
  32. package/dist/lib/collection/components/super-byof/super-byof-types.js +1 -0
  33. package/dist/lib/collection/components/super-byof/super-byof.form.js +1 -0
  34. package/dist/lib/collection/components/super-byof/super-byof.js +120 -0
  35. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +1 -1
  36. package/dist/lib/esm/{active-router-5e40c0f8.js → active-router-d18b36fb.js} +1 -1
  37. package/dist/lib/esm/apollo-super-selection.js +2 -2
  38. package/dist/lib/esm/context-consumer.entry.js +1 -1
  39. package/dist/lib/esm/custom-fund-choice.api-45fa478c.js +3022 -0
  40. package/dist/lib/esm/{index-189b2180.js → index-107d7c24.js} +1 -1
  41. package/dist/lib/esm/loader.js +2 -2
  42. package/dist/lib/esm/{sss-button_33.entry.js → sss-button_31.entry.js} +142 -3311
  43. package/dist/lib/esm/sss-super-byof-host.entry.js +90 -0
  44. package/dist/lib/esm/stencil-async-content.entry.js +1 -1
  45. package/dist/lib/esm/stencil-route-title.entry.js +2 -2
  46. package/dist/lib/esm/stencil-router-prompt.entry.js +2 -2
  47. package/dist/lib/esm/stencil-router-redirect.entry.js +2 -2
  48. package/dist/lib/esm-es5/{active-router-5e40c0f8.js → active-router-d18b36fb.js} +1 -1
  49. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  50. package/dist/lib/esm-es5/context-consumer.entry.js +1 -1
  51. package/dist/lib/esm-es5/custom-fund-choice.api-45fa478c.js +1 -0
  52. package/dist/lib/esm-es5/{index-189b2180.js → index-107d7c24.js} +1 -1
  53. package/dist/lib/esm-es5/loader.js +1 -1
  54. package/dist/lib/esm-es5/sss-button_31.entry.js +69 -0
  55. package/dist/lib/esm-es5/sss-super-byof-host.entry.js +1 -0
  56. package/dist/lib/esm-es5/stencil-async-content.entry.js +1 -1
  57. package/dist/lib/esm-es5/stencil-route-title.entry.js +1 -1
  58. package/dist/lib/esm-es5/stencil-router-prompt.entry.js +1 -1
  59. package/dist/lib/esm-es5/stencil-router-redirect.entry.js +1 -1
  60. package/dist/lib/types/components/super-byof/super-byof-types.d.ts +26 -0
  61. package/dist/lib/types/components/super-byof/super-byof.d.ts +18 -0
  62. package/dist/lib/types/components/super-byof/super-byof.form.d.ts +6 -0
  63. package/dist/lib/types/components.d.ts +15 -34
  64. package/package.json +2 -1
  65. package/dist/lib/apollo-super-selection/p-071b8545.entry.js +0 -1
  66. package/dist/lib/apollo-super-selection/p-2298df79.system.entry.js +0 -69
  67. package/dist/lib/apollo-super-selection/p-51aefdb1.system.entry.js +0 -1
  68. package/dist/lib/apollo-super-selection/p-80178f87.system.js +0 -1
  69. package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +0 -1
  70. package/dist/lib/apollo-super-selection/p-d7dbf362.entry.js +0 -14
  71. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.js +0 -143
  72. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +0 -123
  73. package/dist/lib/esm-es5/sss-button_33.entry.js +0 -69
  74. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.d.ts +0 -16
  75. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.d.ts +0 -13
@@ -1,143 +0,0 @@
1
- import { Component, Event, h, Prop, State } from '@stencil/core';
2
- import * as O from 'fp-ts/Option';
3
- import australianFundLookupService from '../../../services/australian-fund-lookup.service';
4
- import customFundState from '../custom-fund.store';
5
- export class MyOwnFundInputs {
6
- constructor() {
7
- this.MIN_SEARCH_STRING_LENGTH = 3;
8
- this.MAX_RECORD_COUNT = 25;
9
- this.searchFundsAsync = async (searchBy) => {
10
- const response = await australianFundLookupService.searchFundsAsync(searchBy, this.MAX_RECORD_COUNT);
11
- switch (response.result) {
12
- case 'TooManyResults': {
13
- return { kind: 'too-many-results' };
14
- }
15
- default: {
16
- const funds = response.data
17
- .sort((a, b) => a.productName.localeCompare(b.productName))
18
- .map((fund) => ({
19
- label: `${fund.productName} (${fund.usi})`,
20
- value: fund.usi
21
- }));
22
- return { kind: 'success', value: funds };
23
- }
24
- }
25
- };
26
- if (O.isSome(this.myOwnFundForm.fundUsi) && O.isSome(this.myOwnFundForm.fundName)) {
27
- this.selectedOption = {
28
- label: this.myOwnFundForm.fundName.value,
29
- value: this.myOwnFundForm.fundUsi.value
30
- };
31
- }
32
- }
33
- render() {
34
- return (h("div", null,
35
- h("div", null,
36
- h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"),
37
- h("div", { class: "mt-1" },
38
- h("sss-dropdown-async", { testId: "fund-search-input", searchFunction: this.searchFundsAsync, minSearchStringLength: this.MIN_SEARCH_STRING_LENGTH, required: true, requiredValidationMessage: "Select a fund", placeholder: `Type to search by name or USI...`, value: this.selectedOption, onValueChanged: (ev) => {
39
- this.selectedOption = ev.detail;
40
- this.updateFund(ev.detail);
41
- }, showValidationErrors: this.showValidationErrors })),
42
- O.isSome(this.myOwnFundForm.fundUsi) && (h("div", { class: "mt-3" },
43
- h("label", { class: "text-sm font-medium text-gray-700" }, "Fund USI"),
44
- h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm" }, this.myOwnFundForm.fundUsi.value)))),
45
- h("div", { class: "mt-3" },
46
- h("label", { class: "text-sm font-medium text-gray-700" }, "Member number"),
47
- h("div", { class: "mt-1" },
48
- h("input", { "data-testid": "member-number-input", type: "text", class: {
49
- 'shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md': true,
50
- 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
51
- .showValidationErrors
52
- }, required: true, pattern: "[A-Za-z0-9]{4,16}", name: "memberNumber", id: "memberNumber", value: O.toUndefined(customFundState.myOwnFundForm.memberNumber), onChange: (ev) => this.updateMemberNumber(ev.target.value.trim()) }),
53
- h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid member number (only numbers and / or letters)"))),
54
- h("div", { class: "flex space-x-4" },
55
- h("div", { class: "mt-3 w-1/2" },
56
- h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"),
57
- h("div", { class: "mt-1" },
58
- h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: O.toUndefined(customFundState.myOwnFundForm.memberFirstName), onChange: (ev) => this.updateMemberFirstName(ev.target.value.trim()) }))),
59
- h("div", { class: "mt-3 w-1/2" },
60
- h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"),
61
- h("div", { class: "mt-1" },
62
- h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: O.toUndefined(customFundState.myOwnFundForm.memberFamilyName), onChange: (ev) => this.updateMemberFamilyName(ev.target.value.trim()) }))))));
63
- }
64
- updateFund(fund) {
65
- this.formChanged.emit({ fundUsi: O.some(fund.value), fundName: O.some(fund.label) });
66
- }
67
- updateMemberNumber(memberNumber) {
68
- this.formChanged.emit({ memberNumber: O.some(memberNumber) });
69
- }
70
- updateMemberFirstName(memberFirstName) {
71
- this.formChanged.emit({ memberFirstName: O.some(memberFirstName) });
72
- }
73
- updateMemberFamilyName(memberFamilyName) {
74
- this.formChanged.emit({ memberFamilyName: O.some(memberFamilyName) });
75
- }
76
- static get is() { return "sss-my-own-fund-inputs"; }
77
- static get properties() { return {
78
- "myOwnFundForm": {
79
- "type": "unknown",
80
- "mutable": false,
81
- "complexType": {
82
- "original": "MyOwnFundFormState",
83
- "resolved": "{ fundUsi: Option<string>; fundName: Option<string>; memberNumber: Option<string>; memberFirstName: Option<string>; memberFamilyName: Option<string>; }",
84
- "references": {
85
- "MyOwnFundFormState": {
86
- "location": "import",
87
- "path": "../custom-fund.store"
88
- }
89
- }
90
- },
91
- "required": false,
92
- "optional": false,
93
- "docs": {
94
- "tags": [],
95
- "text": ""
96
- }
97
- },
98
- "showValidationErrors": {
99
- "type": "boolean",
100
- "mutable": false,
101
- "complexType": {
102
- "original": "boolean",
103
- "resolved": "boolean",
104
- "references": {}
105
- },
106
- "required": false,
107
- "optional": false,
108
- "docs": {
109
- "tags": [],
110
- "text": ""
111
- },
112
- "attribute": "show-validation-errors",
113
- "reflect": false
114
- }
115
- }; }
116
- static get states() { return {
117
- "selectedOption": {}
118
- }; }
119
- static get events() { return [{
120
- "method": "formChanged",
121
- "name": "formChanged",
122
- "bubbles": true,
123
- "cancelable": true,
124
- "composed": true,
125
- "docs": {
126
- "tags": [],
127
- "text": ""
128
- },
129
- "complexType": {
130
- "original": "Partial<MyOwnFundFormState>",
131
- "resolved": "{ fundUsi?: None | Some<string> | undefined; fundName?: None | Some<string> | undefined; memberNumber?: None | Some<string> | undefined; memberFirstName?: None | Some<string> | undefined; memberFamilyName?: None | Some<string> | undefined; }",
132
- "references": {
133
- "Partial": {
134
- "location": "global"
135
- },
136
- "MyOwnFundFormState": {
137
- "location": "import",
138
- "path": "../custom-fund.store"
139
- }
140
- }
141
- }
142
- }]; }
143
- }
@@ -1,123 +0,0 @@
1
- import { Component, getAssetPath, h, Host, Prop, State } from '@stencil/core';
2
- import { injectHistory } from '@stencil/router';
3
- import { pipe } from 'fp-ts/lib/function';
4
- import * as O from 'fp-ts/Option';
5
- import { EventTrackingService } from '../../../services/event-tracking.service';
6
- import navigationService from '../../../services/navigation.service';
7
- import { SuperSelectionAppRoutes } from '../../../services/super-selection-app.routes';
8
- import superSelectionAppService from '../../../services/super-selection-app.service';
9
- import customFundChoiceApi from '../api/custom-fund-choice.api';
10
- import customFundState from '../custom-fund.store';
11
- export class MyOwnFund {
12
- constructor() {
13
- this.isNotAllInformationProvidedMessageVisible = false;
14
- this.isSubmitDisabled = true;
15
- this.eventTrackingService = EventTrackingService.Instance;
16
- }
17
- componentDidLoad() {
18
- return this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({
19
- promotedFundsShown: superSelectionAppService.promotedFunds,
20
- defaultFundUsiSet: O.toUndefined(superSelectionAppService.defaultFundUsi)
21
- });
22
- }
23
- render() {
24
- const superCampaignCanNotBeActivated = superSelectionAppService.superCampaignCanNotBeActivated;
25
- return (h(Host, null,
26
- h("sss-header-section", null),
27
- h("div", { class: "flex justify-center mt-11" },
28
- h("sss-custom-fund", null,
29
- h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
30
- 'was-validated': this.formState === 'validated'
31
- }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) },
32
- h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" },
33
- h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"),
34
- h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4" },
35
- h("div", { class: "flex" },
36
- h("div", { class: "flex-shrink-0" },
37
- h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })),
38
- h("div", { class: "ml-2" },
39
- h("ul", { class: "list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5" },
40
- h("li", null, "Make sure you are a current member of the fund before completing this step."),
41
- h("li", null, "Please check that the fund USI is correct as some funds have similar names."))))),
42
- h("sss-my-own-fund-inputs", { myOwnFundForm: customFundState.myOwnFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
43
- customFundState.myOwnFundForm = Object.assign(Object.assign({}, customFundState.myOwnFundForm), event.detail);
44
- this.isNotAllInformationProvidedMessageVisible = false;
45
- } }),
46
- this.isNotAllInformationProvidedMessageVisible && (h("div", { class: "mt-4 rounded-md bg-red-50 p-4 text-sm text-red-700" }, "All fields are required to complete submission. Make sure you have selected a fund."))),
47
- h("div", { class: "flex justify-center mt-8" },
48
- h("div", { class: "sm:max-w-320 w-full" },
49
- h("div", { class: "mb-4", onClick:
50
- // user clicks on disabled button (div wrapper) then validation errors will show
51
- () => (this.formState = 'validated') },
52
- h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")),
53
- !superCampaignCanNotBeActivated && (h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage },
54
- h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back"))))))))));
55
- }
56
- async handleSubmitForm() {
57
- this.formState = 'validated';
58
- if (!this.formElement.checkValidity()) {
59
- return;
60
- }
61
- const isAllInformationProvided = O.isSome(customFundState.myOwnFundForm.fundUsi) &&
62
- O.isSome(customFundState.myOwnFundForm.memberNumber) &&
63
- O.isSome(customFundState.myOwnFundForm.memberFirstName) &&
64
- O.isSome(customFundState.myOwnFundForm.memberFamilyName);
65
- if (!isAllInformationProvided) {
66
- this.isNotAllInformationProvidedMessageVisible = true;
67
- return;
68
- }
69
- if (superSelectionAppService.isBringYourOwnFundCustomStepEnabled &&
70
- superSelectionAppService.isUsingSuperCampaign) {
71
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFundEngagementStep);
72
- return;
73
- }
74
- navigationService.navigateInternallyToStandardChoice({
75
- history: this.history,
76
- fundName: this.getOrError(customFundState.myOwnFundForm.fundName),
77
- fundDetails: {
78
- type: 'myOwnFund',
79
- fundName: this.getOrError(customFundState.myOwnFundForm.fundName),
80
- fundUsi: this.getOrError(customFundState.myOwnFundForm.fundUsi),
81
- memberNumber: this.getOrError(customFundState.myOwnFundForm.memberNumber)
82
- },
83
- handleSubmitFn: async (standardChoiceFormSignature) => {
84
- const customFundChoiceDto = Object.assign({ fundUsi: this.getOrError(customFundState.myOwnFundForm.fundUsi), memberNumber: this.getOrError(customFundState.myOwnFundForm.memberNumber), memberFirstName: this.getOrError(customFundState.myOwnFundForm.memberFirstName), memberFamilyName: this.getOrError(customFundState.myOwnFundForm.memberFamilyName), standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
85
- await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
86
- }
87
- });
88
- }
89
- getOrError(option) {
90
- return pipe(option, O.getOrElse(() => {
91
- throw new Error('Option value is none.');
92
- }));
93
- }
94
- static get is() { return "sss-my-own-fund"; }
95
- static get properties() { return {
96
- "history": {
97
- "type": "unknown",
98
- "mutable": false,
99
- "complexType": {
100
- "original": "RouterHistory",
101
- "resolved": "RouterHistory",
102
- "references": {
103
- "RouterHistory": {
104
- "location": "import",
105
- "path": "@stencil/router"
106
- }
107
- }
108
- },
109
- "required": false,
110
- "optional": false,
111
- "docs": {
112
- "tags": [],
113
- "text": ""
114
- }
115
- }
116
- }; }
117
- static get states() { return {
118
- "formState": {},
119
- "isNotAllInformationProvidedMessageVisible": {},
120
- "isSubmitDisabled": {}
121
- }; }
122
- }
123
- injectHistory(MyOwnFund);