@flarehr/apollo-super-selection 3.50.59382 → 3.53.61179

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 (162) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.css +1 -0
  2. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  3. package/dist/lib/apollo-super-selection/apollo-super-selection.js +1 -1
  4. package/dist/lib/apollo-super-selection/assets/icon-check.svg +3 -0
  5. package/dist/lib/apollo-super-selection/assets/icon-exclamation.svg +3 -0
  6. package/dist/lib/apollo-super-selection/assets/icon-information-circle.svg +3 -0
  7. package/dist/lib/apollo-super-selection/p-03373b03.system.js +1 -0
  8. package/dist/lib/apollo-super-selection/p-14885f78.system.js +15 -0
  9. package/dist/lib/apollo-super-selection/{p-381262c1.system.js → p-15f0e5eb.system.js} +1 -1
  10. package/dist/lib/apollo-super-selection/p-29c11183.js +15 -0
  11. package/dist/lib/apollo-super-selection/p-6c94de60.system.entry.js +69 -0
  12. package/dist/lib/apollo-super-selection/p-74f91404.entry.js +14 -0
  13. package/dist/lib/apollo-super-selection/p-86e3e03f.js +1 -0
  14. package/dist/lib/cjs/apollo-super-selection.cjs.js +3 -4
  15. package/dist/lib/cjs/{app-globals-45007120.js → app-globals-b1125d8c.js} +1 -1
  16. package/dist/lib/cjs/{datorama-akita-7f4b082a.js → datorama-akita-6c9cb8fb.js} +1005 -68
  17. package/dist/lib/cjs/loader.cjs.js +3 -4
  18. package/dist/lib/cjs/{fl-button_31.cjs.entry.js → sss-button_28.cjs.entry.js} +2099 -2167
  19. package/dist/lib/collection/apollo-super-selection.css +1 -0
  20. package/dist/lib/collection/collection-manifest.json +16 -28
  21. package/dist/lib/collection/components/app-host/loading-page.js +3 -3
  22. package/dist/lib/collection/components/app-host/super-selection-app-host.css +0 -4
  23. package/dist/lib/collection/components/app-host/super-selection-app-host.js +7 -19
  24. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +69 -1
  25. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +9 -3
  26. package/dist/lib/collection/components/super-selection-app/app-state-pages/success.js +16 -21
  27. package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +3 -0
  28. package/dist/lib/collection/components/super-selection-app/assets/icon-exclamation.svg +3 -0
  29. package/dist/lib/collection/components/super-selection-app/assets/icon-information-circle.svg +3 -0
  30. package/dist/lib/collection/components/super-selection-app/consent/consent.js +57 -0
  31. package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +132 -0
  32. package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +6 -18
  33. package/dist/lib/collection/components/super-selection-app/funds/constants.js +50 -0
  34. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.js +31 -16
  35. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js +10 -14
  36. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund.js +36 -45
  37. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.js +40 -19
  38. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +45 -40
  39. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +104 -58
  40. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +53 -49
  41. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-not-supported.js +6 -16
  42. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-page.js +1 -1
  43. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +1 -4
  44. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-iframe-builder.js +10 -4
  45. package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +13 -4
  46. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +2 -3
  47. package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +28 -0
  48. package/dist/lib/collection/components/super-selection-app/misc/button.js +146 -0
  49. package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.css +7 -0
  50. package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.js +359 -0
  51. package/dist/lib/collection/components/super-selection-app/misc/loading-indicator.js +52 -0
  52. package/dist/lib/collection/components/super-selection-app/services/australian-fund-lookup.service.js +8 -4
  53. package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +20 -0
  54. package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +95 -0
  55. package/dist/lib/collection/components/super-selection-app/services/navigation.service.js +8 -0
  56. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +6 -4
  57. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +71 -34
  58. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.store.js +10 -0
  59. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +94 -0
  60. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +89 -0
  61. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +67 -90
  62. package/dist/lib/collection/components/super-selection-app/super-selection-app.css +16 -4
  63. package/dist/lib/collection/components/super-selection-app/super-selection-app.js +32 -11
  64. package/dist/lib/esm/apollo-super-selection.js +3 -4
  65. package/dist/lib/esm/{app-globals-7ac1ffba.js → app-globals-c1f89805.js} +1 -1
  66. package/dist/lib/esm/{datorama-akita-79ce4385.js → datorama-akita-127aea91.js} +960 -28
  67. package/dist/lib/esm/loader.js +3 -4
  68. package/dist/lib/esm/{fl-button_31.entry.js → sss-button_28.entry.js} +2086 -2151
  69. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  70. package/dist/lib/esm-es5/{app-globals-7ac1ffba.js → app-globals-c1f89805.js} +1 -1
  71. package/dist/lib/esm-es5/datorama-akita-127aea91.js +15 -0
  72. package/dist/lib/esm-es5/loader.js +1 -1
  73. package/dist/lib/esm-es5/sss-button_28.entry.js +69 -0
  74. package/dist/lib/types/components/app-host/super-selection-app-host.d.ts +0 -3
  75. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +30 -0
  76. package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +2 -1
  77. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +19 -4
  78. package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +9 -0
  79. package/dist/lib/types/components/super-selection-app/existing-choice/existing-choice.d.ts +12 -0
  80. package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +0 -1
  81. package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +3 -0
  82. package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.d.ts +1 -1
  83. package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +4 -6
  84. package/dist/lib/types/components/super-selection-app/funds/custom-fund/default-fund/default-fund.d.ts +0 -2
  85. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.d.ts +2 -1
  86. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.d.ts +1 -0
  87. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +7 -0
  88. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.d.ts +1 -0
  89. package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.form.d.ts +0 -1
  90. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -3
  91. package/dist/lib/types/components/super-selection-app/header-section/header-section.d.ts +4 -0
  92. package/dist/lib/types/components/super-selection-app/misc/button.d.ts +11 -0
  93. package/dist/lib/types/components/super-selection-app/misc/dropdown-async.d.ts +44 -0
  94. package/dist/lib/types/components/super-selection-app/misc/loading-indicator.d.ts +5 -0
  95. package/dist/lib/types/components/super-selection-app/services/australian-fund-lookup.service.d.ts +1 -0
  96. package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +4 -0
  97. package/dist/lib/types/components/super-selection-app/services/existing-super-choice-info.service.d.ts +51 -0
  98. package/dist/lib/types/components/super-selection-app/services/navigation.service.d.ts +6 -0
  99. package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +3 -2
  100. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +6 -3
  101. package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.store.d.ts +8 -0
  102. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +9 -0
  103. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +7 -0
  104. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -3
  105. package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +1 -1
  106. package/dist/lib/types/components.d.ts +146 -97
  107. package/package.json +12 -7
  108. package/dist/lib/apollo-super-selection/assets/logo-qsuper-square.png +0 -0
  109. package/dist/lib/apollo-super-selection/assets/logo-qsuper.png +0 -0
  110. package/dist/lib/apollo-super-selection/p-03f41493.entry.js +0 -14
  111. package/dist/lib/apollo-super-selection/p-13573238.system.js +0 -15
  112. package/dist/lib/apollo-super-selection/p-342cee5a.js +0 -1
  113. package/dist/lib/apollo-super-selection/p-38f24f69.js +0 -1
  114. package/dist/lib/apollo-super-selection/p-64ebe17d.system.entry.js +0 -1
  115. package/dist/lib/apollo-super-selection/p-7dbe5a2f.system.js +0 -1
  116. package/dist/lib/apollo-super-selection/p-d82b00ed.system.js +0 -1
  117. package/dist/lib/apollo-super-selection/p-df9ce4b7.js +0 -15
  118. package/dist/lib/apollo-super-selection/p-e126ffd4.system.entry.js +0 -69
  119. package/dist/lib/apollo-super-selection/p-f7a45412.entry.js +0 -1
  120. package/dist/lib/cjs/delay-81aff2f1.js +0 -955
  121. package/dist/lib/cjs/fl-style-guide.cjs.entry.js +0 -90
  122. package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.css +0 -11
  123. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-not-supported.css +0 -23
  124. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-standard-choice-page.js +0 -62
  125. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-fund.store.js +0 -10
  126. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-standard-choice-page.js +0 -67
  127. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slatesuper-header.css +0 -0
  128. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slatesuper-header.js +0 -19
  129. package/dist/lib/collection/components/super-selection-app/notifications-section/notifications-section.js +0 -25
  130. package/dist/lib/collection/components/super-selection-app/services/notifications.service.js +0 -37
  131. package/dist/lib/collection/components/super-selection-app/services/notifications.store.js +0 -3
  132. package/dist/lib/collection/components/super-selection-app/services/selected-super-choice-info.service.js +0 -50
  133. package/dist/lib/collection/components/super-selection-app/standard-choice/api/standard-choice.model.js +0 -1
  134. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-qsuper-square.png +0 -0
  135. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-qsuper.png +0 -0
  136. package/dist/lib/collection/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.css +0 -18
  137. package/dist/lib/collection/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.js +0 -53
  138. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item.js +0 -296
  139. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.css +0 -70
  140. package/dist/lib/esm/delay-c0555599.js +0 -935
  141. package/dist/lib/esm/fl-style-guide.entry.js +0 -86
  142. package/dist/lib/esm-es5/datorama-akita-79ce4385.js +0 -15
  143. package/dist/lib/esm-es5/delay-c0555599.js +0 -1
  144. package/dist/lib/esm-es5/fl-button_31.entry.js +0 -69
  145. package/dist/lib/esm-es5/fl-style-guide.entry.js +0 -1
  146. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/button/button.css +0 -45
  147. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown/dropdown.css +0 -9
  148. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown-async/dropdown-async.css +0 -9
  149. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/loading-indicator/loading-indicator.css +0 -141
  150. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/promise-button/promise-button.css +0 -5
  151. package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/style-guide/style-guide.css +0 -0
  152. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-standard-choice-page.d.ts +0 -8
  153. package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-fund.store.d.ts +0 -7
  154. package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-standard-choice-page.d.ts +0 -8
  155. package/dist/lib/types/components/super-selection-app/funds/slate-super/slatesuper-header.d.ts +0 -3
  156. package/dist/lib/types/components/super-selection-app/notifications-section/notifications-section.d.ts +0 -5
  157. package/dist/lib/types/components/super-selection-app/services/notifications.service.d.ts +0 -15
  158. package/dist/lib/types/components/super-selection-app/services/notifications.store.d.ts +0 -14
  159. package/dist/lib/types/components/super-selection-app/services/selected-super-choice-info.service.d.ts +0 -18
  160. package/dist/lib/types/components/super-selection-app/standard-choice/api/standard-choice.model.d.ts +0 -3
  161. package/dist/lib/types/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.d.ts +0 -5
  162. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item.d.ts +0 -22
@@ -0,0 +1,146 @@
1
+ import { Component, h, Prop, State } from '@stencil/core';
2
+ var PromiseButtonState;
3
+ (function (PromiseButtonState) {
4
+ PromiseButtonState[PromiseButtonState["Available"] = 0] = "Available";
5
+ PromiseButtonState[PromiseButtonState["Pending"] = 1] = "Pending";
6
+ PromiseButtonState[PromiseButtonState["Error"] = 2] = "Error";
7
+ })(PromiseButtonState || (PromiseButtonState = {}));
8
+ export class Button {
9
+ constructor() {
10
+ this.fillWidth = false;
11
+ this.fillWidthOnMobile = false;
12
+ this.disabled = false;
13
+ this.variant = 'primary';
14
+ this.promiseFn = () => Promise.resolve();
15
+ // eslint-disable-next-line @typescript-eslint/member-ordering
16
+ this.state = PromiseButtonState.Available;
17
+ }
18
+ render() {
19
+ return (h("button", { class: {
20
+ 'inline-flex items-center justify-center px-4 py-2 border text-base font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-focus pointer-events-auto': true,
21
+ 'disabled:pointer-events-none disabled:border-gray-300 disabled:bg-gray-100 disabled:text-gray-400': true,
22
+ 'border-transparent text-white bg-primary-base hover:bg-primary-hover': this.variant === 'primary',
23
+ 'border-gray-300 text-gray-700 bg-white hover:bg-gray-50': this.variant === 'secondary',
24
+ 'w-full': this.fillWidth || this.fillWidthOnMobile,
25
+ 'sm:w-auto': this.fillWidthOnMobile
26
+ }, disabled: this.disabled, onClick: () => this.clicked() },
27
+ this.state === PromiseButtonState.Pending && (h("sss-loading-indicator", { theme: this.variant === 'primary' ? 'light' : 'primary', size: 16 })),
28
+ h("div", { class: { hidden: this.state === PromiseButtonState.Pending } },
29
+ h("slot", null))));
30
+ }
31
+ async clicked() {
32
+ if (!this.promiseFn || this.state === PromiseButtonState.Pending)
33
+ return;
34
+ try {
35
+ this.state = PromiseButtonState.Pending;
36
+ await this.promiseFn();
37
+ this.state = PromiseButtonState.Available;
38
+ }
39
+ catch (err) {
40
+ this.state = PromiseButtonState.Error;
41
+ throw err;
42
+ }
43
+ }
44
+ static get is() { return "sss-button"; }
45
+ static get properties() { return {
46
+ "fillWidth": {
47
+ "type": "boolean",
48
+ "mutable": false,
49
+ "complexType": {
50
+ "original": "boolean",
51
+ "resolved": "boolean",
52
+ "references": {}
53
+ },
54
+ "required": false,
55
+ "optional": false,
56
+ "docs": {
57
+ "tags": [],
58
+ "text": ""
59
+ },
60
+ "attribute": "fill-width",
61
+ "reflect": false,
62
+ "defaultValue": "false"
63
+ },
64
+ "fillWidthOnMobile": {
65
+ "type": "boolean",
66
+ "mutable": false,
67
+ "complexType": {
68
+ "original": "boolean",
69
+ "resolved": "boolean",
70
+ "references": {}
71
+ },
72
+ "required": false,
73
+ "optional": false,
74
+ "docs": {
75
+ "tags": [],
76
+ "text": ""
77
+ },
78
+ "attribute": "fill-width-on-mobile",
79
+ "reflect": false,
80
+ "defaultValue": "false"
81
+ },
82
+ "disabled": {
83
+ "type": "boolean",
84
+ "mutable": false,
85
+ "complexType": {
86
+ "original": "boolean",
87
+ "resolved": "boolean",
88
+ "references": {}
89
+ },
90
+ "required": false,
91
+ "optional": false,
92
+ "docs": {
93
+ "tags": [],
94
+ "text": ""
95
+ },
96
+ "attribute": "disabled",
97
+ "reflect": false,
98
+ "defaultValue": "false"
99
+ },
100
+ "variant": {
101
+ "type": "string",
102
+ "mutable": false,
103
+ "complexType": {
104
+ "original": "ButtonVariant",
105
+ "resolved": "\"primary\" | \"secondary\"",
106
+ "references": {
107
+ "ButtonVariant": {
108
+ "location": "local"
109
+ }
110
+ }
111
+ },
112
+ "required": false,
113
+ "optional": false,
114
+ "docs": {
115
+ "tags": [],
116
+ "text": ""
117
+ },
118
+ "attribute": "variant",
119
+ "reflect": false,
120
+ "defaultValue": "'primary'"
121
+ },
122
+ "promiseFn": {
123
+ "type": "unknown",
124
+ "mutable": false,
125
+ "complexType": {
126
+ "original": "() => Promise<unknown>",
127
+ "resolved": "(() => Promise<unknown>) | undefined",
128
+ "references": {
129
+ "Promise": {
130
+ "location": "global"
131
+ }
132
+ }
133
+ },
134
+ "required": false,
135
+ "optional": true,
136
+ "docs": {
137
+ "tags": [],
138
+ "text": ""
139
+ },
140
+ "defaultValue": "() => Promise.resolve()"
141
+ }
142
+ }; }
143
+ static get states() { return {
144
+ "state": {}
145
+ }; }
146
+ }
@@ -0,0 +1,7 @@
1
+ html {
2
+ scroll-behavior: smooth;
3
+ }
4
+
5
+ .sss-dropdown-menu {
6
+ max-height: min(20rem, 50vh);
7
+ }
@@ -0,0 +1,359 @@
1
+ import { Component, Event, h, Host, Listen, Prop, State } from '@stencil/core';
2
+ import { fromEvent } from 'rxjs';
3
+ import { debounceTime, distinctUntilChanged, filter, map, mergeMap, tap } from 'rxjs/operators';
4
+ const DEFAULT_SEARCH_LENGTH = 3;
5
+ export class SelectInputAsync {
6
+ constructor() {
7
+ this.required = false;
8
+ this.disabled = false;
9
+ this.minSearchStringLength = DEFAULT_SEARCH_LENGTH;
10
+ this.isMouseOver = false;
11
+ this.searchState = 'pristine';
12
+ this.inputValue = '';
13
+ this.isDropdownVisible = false;
14
+ this.filteredOptions = [];
15
+ this.shouldExecuteSearch = (searchQuery) => {
16
+ var _a;
17
+ return (this.isDropdownVisible &&
18
+ (searchQuery === null || searchQuery === void 0 ? void 0 : searchQuery.length) >= this.minSearchStringLength &&
19
+ ((_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.label) !== searchQuery);
20
+ };
21
+ this.onBeginSearch = (searchQuery) => {
22
+ this.inputValue = searchQuery;
23
+ this.searchState = 'in progress';
24
+ };
25
+ this.onCompleteSearch = (results) => {
26
+ this.filteredOptions = results;
27
+ this.highlightedOptionIndex = undefined;
28
+ this.searchState = 'done';
29
+ };
30
+ this.renderFilteredResults = () => {
31
+ if (this.searchState === 'pristine') {
32
+ return (h("span", { class: "cursor-pointer text-gray-500 py-1.5 pl-4" }, "Start typing to find the results"));
33
+ }
34
+ if (this.searchState === 'in progress') {
35
+ return h("span", { class: "cursor-pointer text-gray-500 py-1.5 pl-4" }, "Searching...");
36
+ }
37
+ if (this.filteredOptions.length === 0) {
38
+ return (h("span", { class: "cursor-pointer text-gray-500 py-1.5 pl-4" }, "No items match your search"));
39
+ }
40
+ return this.filteredOptions.map((option, _index) => (h("div", { class: {
41
+ 'cursor-pointer text-wrap hover:bg-primary-hover py-1.5 pl-4': true,
42
+ 'bg-primary-base': this.isOptionSelected(option)
43
+ }, onClick: (_event) => {
44
+ this.toggleDropdown(false);
45
+ this.selectOption(option);
46
+ } }, option.label)));
47
+ };
48
+ this.resetInput = () => {
49
+ var _a, _b;
50
+ this.inputValue = (_b = (_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : '';
51
+ };
52
+ this.toggleDropdown = (newState) => {
53
+ this.isDropdownVisible = newState;
54
+ };
55
+ this.processKeyboardNavigation = (event) => {
56
+ const ENTER_KEY = 'Enter';
57
+ const DOWN_KEY = 'ArrowDown';
58
+ const UP_KEY = 'ArrowUp';
59
+ const ESC_KEY = 'Escape';
60
+ switch (event.key) {
61
+ case DOWN_KEY:
62
+ this.toggleDropdown(true);
63
+ this.highlightNextItem();
64
+ return true;
65
+ case UP_KEY:
66
+ this.highlightPreviousItem();
67
+ return true;
68
+ case ENTER_KEY:
69
+ if (this.highlightedOptionIndex !== undefined) {
70
+ this.toggleDropdown(false);
71
+ this.selectOption(this.filteredOptions[this.highlightedOptionIndex]);
72
+ }
73
+ return true;
74
+ case ESC_KEY:
75
+ this.inputElement.blur();
76
+ return true;
77
+ }
78
+ return false;
79
+ };
80
+ this.highlightPreviousItem = () => {
81
+ if (this.filteredOptions.length === 0) {
82
+ return;
83
+ }
84
+ this.highlightedOptionIndex =
85
+ this.highlightedOptionIndex === undefined ? 0 : Math.max(this.highlightedOptionIndex - 1, 0);
86
+ };
87
+ this.highlightNextItem = () => {
88
+ if (this.filteredOptions.length === 0) {
89
+ return;
90
+ }
91
+ this.highlightedOptionIndex =
92
+ this.highlightedOptionIndex === undefined
93
+ ? 0
94
+ : Math.min(this.highlightedOptionIndex + 1, this.filteredOptions.length - 1);
95
+ };
96
+ this.selectOption = (option) => {
97
+ this.selectedOption = option;
98
+ this.inputValue = option.label;
99
+ this.valueChanged.emit(option);
100
+ };
101
+ this.isOptionSelected = (option) => {
102
+ var _a;
103
+ return ((_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.label) === option.label;
104
+ };
105
+ }
106
+ componentWillLoad() {
107
+ this.selectedOption = this.value;
108
+ }
109
+ componentDidLoad() {
110
+ this.searchResultsSubscription = fromEvent(this.inputElement, 'keyup')
111
+ .pipe(debounceTime(500), map((_) => this.inputElement.value), distinctUntilChanged(), filter(this.shouldExecuteSearch), tap(this.onBeginSearch), mergeMap(this._searchFunction), tap(this.onCompleteSearch))
112
+ .subscribe();
113
+ }
114
+ disconnectedCallback() {
115
+ this.searchResultsSubscription.unsubscribe();
116
+ }
117
+ handleFocus() {
118
+ this.toggleDropdown(true);
119
+ }
120
+ handleBlur() {
121
+ if (this.isMouseOver) {
122
+ return;
123
+ }
124
+ this.toggleDropdown(false);
125
+ this.highlightedOptionIndex = undefined;
126
+ this.resetInput();
127
+ }
128
+ handleKeyDown(event) {
129
+ if (this.processKeyboardNavigation(event)) {
130
+ event.preventDefault();
131
+ }
132
+ }
133
+ render() {
134
+ var _a;
135
+ return (h(Host, null,
136
+ h("div", { class: "relative" },
137
+ h("input", { type: "text", class: {
138
+ 'shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-sm border-gray-300 rounded-md': true,
139
+ 'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
140
+ .showValidationErrors
141
+ }, placeholder: this.placeholder, required: this.required, disabled: this.disabled, value: this.inputValue, ref: (el) => (this.inputElement = el) }),
142
+ h("div", { class: {
143
+ 'invalid-feedback mt-2 text-sm text-red-600': true,
144
+ hidden: !this.isDropdownVisible
145
+ } }, (_a = this.requiredValidationMessage) !== null && _a !== void 0 ? _a : 'Required.'),
146
+ h("div", { class: {
147
+ 'sss-dropdown-menu absolute shadow rounded-md border mt-0 w-full overflow-auto bg-white z-50 py-2': true,
148
+ hidden: !this.isDropdownVisible
149
+ }, onMouseEnter: (_event) => (this.isMouseOver = true), onMouseLeave: (_event) => (this.isMouseOver = false) }, this.renderFilteredResults()))));
150
+ }
151
+ get _searchFunction() {
152
+ if (this.searchFunction === undefined) {
153
+ throw new Error("Can't render <sss-dropdown-async/> component with no searchFunction");
154
+ }
155
+ return this.searchFunction;
156
+ }
157
+ static get is() { return "sss-dropdown-async"; }
158
+ static get originalStyleUrls() { return {
159
+ "$": ["dropdown-async.scss"]
160
+ }; }
161
+ static get styleUrls() { return {
162
+ "$": ["dropdown-async.css"]
163
+ }; }
164
+ static get properties() { return {
165
+ "placeholder": {
166
+ "type": "string",
167
+ "mutable": false,
168
+ "complexType": {
169
+ "original": "string",
170
+ "resolved": "string | undefined",
171
+ "references": {}
172
+ },
173
+ "required": false,
174
+ "optional": true,
175
+ "docs": {
176
+ "tags": [],
177
+ "text": ""
178
+ },
179
+ "attribute": "placeholder",
180
+ "reflect": false
181
+ },
182
+ "searchFunction": {
183
+ "type": "unknown",
184
+ "mutable": false,
185
+ "complexType": {
186
+ "original": "(query: string) => Promise<SelectInputOption<unknown>[]>",
187
+ "resolved": "((query: string) => Promise<SelectInputOption<unknown>[]>) | undefined",
188
+ "references": {
189
+ "Promise": {
190
+ "location": "global"
191
+ },
192
+ "SelectInputOption": {
193
+ "location": "local"
194
+ }
195
+ }
196
+ },
197
+ "required": false,
198
+ "optional": true,
199
+ "docs": {
200
+ "tags": [],
201
+ "text": ""
202
+ }
203
+ },
204
+ "value": {
205
+ "type": "unknown",
206
+ "mutable": false,
207
+ "complexType": {
208
+ "original": "SelectInputOption<unknown>",
209
+ "resolved": "undefined | { label: string; value: unknown; }",
210
+ "references": {
211
+ "SelectInputOption": {
212
+ "location": "local"
213
+ }
214
+ }
215
+ },
216
+ "required": false,
217
+ "optional": true,
218
+ "docs": {
219
+ "tags": [],
220
+ "text": ""
221
+ }
222
+ },
223
+ "required": {
224
+ "type": "boolean",
225
+ "mutable": false,
226
+ "complexType": {
227
+ "original": "boolean",
228
+ "resolved": "boolean",
229
+ "references": {}
230
+ },
231
+ "required": false,
232
+ "optional": false,
233
+ "docs": {
234
+ "tags": [],
235
+ "text": ""
236
+ },
237
+ "attribute": "required",
238
+ "reflect": false,
239
+ "defaultValue": "false"
240
+ },
241
+ "requiredValidationMessage": {
242
+ "type": "string",
243
+ "mutable": false,
244
+ "complexType": {
245
+ "original": "string",
246
+ "resolved": "string | undefined",
247
+ "references": {}
248
+ },
249
+ "required": false,
250
+ "optional": true,
251
+ "docs": {
252
+ "tags": [],
253
+ "text": ""
254
+ },
255
+ "attribute": "required-validation-message",
256
+ "reflect": false
257
+ },
258
+ "disabled": {
259
+ "type": "boolean",
260
+ "mutable": false,
261
+ "complexType": {
262
+ "original": "boolean",
263
+ "resolved": "boolean",
264
+ "references": {}
265
+ },
266
+ "required": false,
267
+ "optional": false,
268
+ "docs": {
269
+ "tags": [],
270
+ "text": ""
271
+ },
272
+ "attribute": "disabled",
273
+ "reflect": false,
274
+ "defaultValue": "false"
275
+ },
276
+ "minSearchStringLength": {
277
+ "type": "number",
278
+ "mutable": false,
279
+ "complexType": {
280
+ "original": "number",
281
+ "resolved": "number",
282
+ "references": {}
283
+ },
284
+ "required": false,
285
+ "optional": false,
286
+ "docs": {
287
+ "tags": [],
288
+ "text": ""
289
+ },
290
+ "attribute": "min-search-string-length",
291
+ "reflect": false,
292
+ "defaultValue": "DEFAULT_SEARCH_LENGTH"
293
+ },
294
+ "showValidationErrors": {
295
+ "type": "boolean",
296
+ "mutable": false,
297
+ "complexType": {
298
+ "original": "boolean",
299
+ "resolved": "boolean",
300
+ "references": {}
301
+ },
302
+ "required": false,
303
+ "optional": false,
304
+ "docs": {
305
+ "tags": [],
306
+ "text": ""
307
+ },
308
+ "attribute": "show-validation-errors",
309
+ "reflect": false
310
+ }
311
+ }; }
312
+ static get states() { return {
313
+ "searchState": {},
314
+ "inputValue": {},
315
+ "isDropdownVisible": {},
316
+ "filteredOptions": {},
317
+ "highlightedOptionIndex": {},
318
+ "selectedOption": {}
319
+ }; }
320
+ static get events() { return [{
321
+ "method": "valueChanged",
322
+ "name": "valueChanged",
323
+ "bubbles": true,
324
+ "cancelable": true,
325
+ "composed": true,
326
+ "docs": {
327
+ "tags": [],
328
+ "text": ""
329
+ },
330
+ "complexType": {
331
+ "original": "SelectInputOption<unknown>",
332
+ "resolved": "{ label: string; value: unknown; }",
333
+ "references": {
334
+ "SelectInputOption": {
335
+ "location": "local"
336
+ }
337
+ }
338
+ }
339
+ }]; }
340
+ static get listeners() { return [{
341
+ "name": "focus",
342
+ "method": "handleFocus",
343
+ "target": undefined,
344
+ "capture": true,
345
+ "passive": false
346
+ }, {
347
+ "name": "blur",
348
+ "method": "handleBlur",
349
+ "target": undefined,
350
+ "capture": true,
351
+ "passive": false
352
+ }, {
353
+ "name": "keydown",
354
+ "method": "handleKeyDown",
355
+ "target": undefined,
356
+ "capture": true,
357
+ "passive": false
358
+ }]; }
359
+ }
@@ -0,0 +1,52 @@
1
+ import { Component, h, Prop } from '@stencil/core';
2
+ export class LoadingIndicator {
3
+ constructor() {
4
+ this.theme = 'primary';
5
+ this.size = 48;
6
+ }
7
+ render() {
8
+ return (h("div", { class: "inline-block animate-spin" },
9
+ h("svg", { width: this.size, height: this.size, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
10
+ h("path", { d: "M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM1.99743 8C1.99743 11.3151 4.68487 14.0026 8 14.0026C11.3151 14.0026 14.0026 11.3151 14.0026 8C14.0026 4.68487 11.3151 1.99743 8 1.99743C4.68487 1.99743 1.99743 4.68487 1.99743 8Z", fill: "white", "fill-opacity": "0.3" }),
11
+ h("path", { d: "M8 1C8 0.447715 8.44943 -0.00643769 8.99741 0.0624193C9.70527 0.151368 10.3996 0.334798 11.0615 0.608964C12.0321 1.011 12.914 1.60028 13.6569 2.34315C14.3997 3.08602 14.989 3.96793 15.391 4.93853C15.6652 5.60043 15.8486 6.29473 15.9376 7.0026C16.0064 7.55057 15.5523 8 15 8C14.4477 8 14.0085 7.54925 13.9169 7.00462C13.842 6.55939 13.7169 6.12298 13.5433 5.7039C13.2417 4.97595 12.7998 4.31451 12.2426 3.75736C11.6855 3.20021 11.0241 2.75825 10.2961 2.45672C9.87702 2.28313 9.44061 2.15804 8.99538 2.08314C8.45075 1.99152 8 1.55228 8 1Z", class: this.theme === 'primary' ? 'fill-primary-base' : 'fill-white' }))));
12
+ }
13
+ static get is() { return "sss-loading-indicator"; }
14
+ static get properties() { return {
15
+ "theme": {
16
+ "type": "string",
17
+ "mutable": false,
18
+ "complexType": {
19
+ "original": "'primary' | 'light'",
20
+ "resolved": "\"light\" | \"primary\"",
21
+ "references": {}
22
+ },
23
+ "required": false,
24
+ "optional": false,
25
+ "docs": {
26
+ "tags": [],
27
+ "text": ""
28
+ },
29
+ "attribute": "theme",
30
+ "reflect": false,
31
+ "defaultValue": "'primary'"
32
+ },
33
+ "size": {
34
+ "type": "number",
35
+ "mutable": false,
36
+ "complexType": {
37
+ "original": "number",
38
+ "resolved": "number",
39
+ "references": {}
40
+ },
41
+ "required": false,
42
+ "optional": false,
43
+ "docs": {
44
+ "tags": [],
45
+ "text": ""
46
+ },
47
+ "attribute": "size",
48
+ "reflect": false,
49
+ "defaultValue": "48"
50
+ }
51
+ }; }
52
+ }
@@ -8,11 +8,15 @@ export class AustralianFundLookupService {
8
8
  maxRecordCount
9
9
  });
10
10
  }
11
+ async getActiveFundByUsiAsync(usi) {
12
+ const results = await superSelectionApi.getAustralianFundsAsync({ type: 'usiMatch', usi });
13
+ if (results.length === 1) {
14
+ return some(results[0]);
15
+ }
16
+ return none;
17
+ }
11
18
  async getFundByUsiAsync(usi) {
12
- const results = await superSelectionApi.getAustralianFundsAsync({
13
- type: 'usiMatch',
14
- usi
15
- });
19
+ const results = await superSelectionApi.getAustralianFundsAsync({ type: 'usiMatch', usi }, true);
16
20
  if (results.length === 1) {
17
21
  return some(results[0]);
18
22
  }
@@ -64,6 +64,26 @@ export class EventTrackingService {
64
64
  SuperFundPanelViewed: detail
65
65
  });
66
66
  }
67
+ async TrackSuperFundNominationViewedAsync(detail) {
68
+ return this.trackEventAsync({
69
+ SuperFundNominationViewed: detail
70
+ });
71
+ }
72
+ async TrackSuperFundNominationDeclinedAsync(detail) {
73
+ return this.trackEventAsync({
74
+ SuperFundNominationDeclined: detail
75
+ });
76
+ }
77
+ async TrackSuperFundDisclaimerViewedAsync(detail) {
78
+ return this.trackEventAsync({
79
+ SuperFundDisclaimerViewed: detail
80
+ });
81
+ }
82
+ async TrackSuperFundDisclaimerAcceptedAsync(detail) {
83
+ return this.trackEventAsync({
84
+ SuperFundDisclaimerAccepted: detail
85
+ });
86
+ }
67
87
  async trackEventAsync(event) {
68
88
  try {
69
89
  await this.eventTrackingApi.PostAnalyticsEventAsync({ event });