@flarehr/apollo-super-campaign 1.43.43 → 1.44.44
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.
Binary file
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<svg width="160" height="34" viewBox="0 0 160 34" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<g clip-path="url(#clip0_4932_8135)">
|
3
|
+
<path d="M8.68534 15.4992L11.2309 21.4404H6.12033L8.68534 15.4992ZM7.55829 11.9501L0.621094 28.0092H3.34156L5.1293 23.813H12.2608L14.068 28.0092H16.8079L9.87069 11.9501H7.55829ZM27.3983 16.6953H24.9304V24.1856C24.4641 25.2444 23.5119 25.9699 22.3848 25.9699C20.8303 25.9699 19.9558 24.8326 19.9558 23.0483V16.6953H17.488V23.4601C17.488 26.3817 19.198 28.2248 21.8407 28.2248C22.9678 28.2248 24.192 27.7739 24.9304 26.8327V28.0092H27.3983V16.6953ZM48.0738 27.9895H50.5417V20.7346C51.0275 19.5581 52.1934 18.9894 53.1844 18.9894C53.5731 18.9894 53.9228 19.0287 54.156 19.1267L54.5058 16.7149C54.2338 16.6561 53.8257 16.5776 53.3593 16.5776C52.0962 16.5776 50.9692 17.3424 50.5417 18.2051V16.6953H48.0738V27.9895ZM60.1993 28.2248C56.8765 28.2248 54.6224 25.5385 54.6224 22.3424C54.6224 19.1463 56.8765 16.46 60.1993 16.46C61.5207 16.46 62.6866 16.911 63.4639 17.7345V16.6953H65.9318V28.0092H63.4639V26.9503C62.6866 27.7739 61.5207 28.2248 60.1993 28.2248ZM60.4908 25.9699C61.9288 25.9699 62.881 25.2836 63.4639 24.3817V20.2836C62.881 19.4012 61.9094 18.7149 60.4908 18.7149C58.5282 18.7149 57.1485 20.3424 57.1485 22.3228C57.1485 24.3424 58.5088 25.9699 60.4908 25.9699ZM68.1664 27.9895H70.6343V9.96973L68.1664 12.4011V27.9895ZM74.0932 14.9894C73.1993 14.9894 72.4609 14.2443 72.4609 13.3227C72.4609 12.4207 73.1993 11.6756 74.0932 11.6756C75.0065 11.6756 75.7449 12.4207 75.7449 13.3227C75.7449 14.2443 75.0065 14.9894 74.0932 14.9894ZM72.8495 16.6953H75.3174V28.0092H72.8495V16.6953ZM82.7015 28.2248C79.3786 28.2248 77.1245 25.5385 77.1245 22.3424C77.1245 19.1463 79.3786 16.46 82.7015 16.46C84.0229 16.46 85.1888 16.911 85.9661 17.7345V16.6953H88.4339V28.0092H85.9661V26.9503C85.1888 27.7739 84.0229 28.2248 82.7015 28.2248ZM82.993 25.9699C84.4309 25.9699 85.3831 25.2836 85.9661 24.3817V20.2836C85.3831 19.4012 84.4115 18.7149 82.993 18.7149C81.0304 18.7149 79.6507 20.3424 79.6507 22.3228C79.6701 24.3424 81.0304 25.9699 82.993 25.9699ZM90.5131 27.9895H92.981V20.4993C93.4474 19.46 94.419 18.7149 95.7403 18.7149C97.3143 18.7149 98.2082 19.8522 98.2082 21.6365V27.9895H100.676V21.2248C100.676 18.3032 98.966 16.46 96.2844 16.46C94.9631 16.46 93.7583 16.9306 93.0004 17.8914V16.6953H90.5326V27.9895H90.5131ZM102.988 25.3817C103.96 27.1072 106.098 28.2837 108.682 28.2837C111.791 28.2837 113.967 26.4601 113.987 23.6562C113.987 21.264 112.568 19.8326 110.237 18.9502L108.624 18.3424C106.972 17.7345 106.195 17.2051 106.195 16.0286C106.195 14.8717 107.361 14.1659 108.701 14.1659C109.926 14.1659 110.917 14.7149 111.713 15.6561L113.521 13.8717C112.355 12.4796 110.683 11.6756 108.701 11.6756C105.748 11.6756 103.552 13.4011 103.552 16.2051C103.552 18.4012 104.776 19.7934 107.302 20.7346L109.051 21.362C110.567 21.9307 111.305 22.6758 111.305 23.813C111.305 25.0091 110.237 25.7934 108.721 25.7934C107.166 25.7934 105.845 25.0287 105.029 23.7346L102.988 25.3817ZM125.452 16.6953H122.984V24.1856C122.517 25.2444 121.565 25.9699 120.438 25.9699C118.884 25.9699 118.009 24.8326 118.009 23.0483V16.6953H115.541V23.4601C115.541 26.3817 117.251 28.2248 119.894 28.2248C121.021 28.2248 122.245 27.7739 122.984 26.8327V28.0092H125.452V16.6953ZM127.531 16.6953H129.999V17.7345C130.776 16.911 131.942 16.46 133.263 16.46C136.606 16.46 138.86 19.1463 138.86 22.3424C138.86 25.5385 136.606 28.2248 133.263 28.2248C131.942 28.2248 130.776 27.7739 129.999 26.9307V32.97H127.531V16.6953ZM132.991 25.9699C134.973 25.9699 136.334 24.3228 136.334 22.3228C136.314 20.0483 134.235 18.3228 132.039 18.8326C131.106 19.0483 130.426 19.6169 129.999 20.2836V24.3817C130.562 25.2836 131.534 25.9699 132.991 25.9699ZM152.948 27.9895H155.416V20.7346C155.902 19.5581 157.067 18.9894 158.058 18.9894C158.447 18.9894 158.797 19.0287 159.03 19.1267L159.38 16.7149C159.108 16.6561 158.7 16.5776 158.233 16.5776C156.97 16.5776 155.843 17.3424 155.416 18.2051V16.6953H152.948V27.9895ZM34.1606 21.2836L33.0141 20.9502C31.9065 20.6365 31.6733 20.1659 31.6733 19.6169C31.6733 18.9306 32.4311 18.5581 33.1696 18.5581C34.0829 18.5581 34.8018 19.009 35.3071 19.7149L36.8616 18.1855C36.0649 17.0875 34.8018 16.4796 33.2278 16.4796C30.9932 16.4796 29.2443 17.6953 29.2249 19.7149C29.2054 21.3816 30.2159 22.6365 32.1591 23.166L33.1501 23.4405C34.4909 23.8522 34.8796 24.2248 34.8796 24.8915C34.8796 25.6758 34.1411 26.0876 33.2667 26.0876C32.1202 26.0876 31.032 25.5189 30.5851 24.5189L28.9334 26.1464C29.7884 27.5386 31.4012 28.2445 33.2667 28.2445C35.5791 28.2445 37.328 26.9111 37.328 24.7346C37.2891 22.8718 36.1232 21.8718 34.1606 21.2836ZM46.0335 25.6954C45.5477 25.8915 45.1396 25.9699 44.4401 25.9699C43.3907 25.9699 42.6912 25.4405 42.6912 24.0483V18.911H46.0335V16.6953H42.6912V12.4207H40.2233V16.6953H38.0275V18.911H40.2233V24.4797C40.2233 27.0287 41.9528 28.2248 44.1292 28.2248C44.8481 28.2248 45.5088 28.0876 46.0335 27.9307V25.6954ZM148.809 24.617C148.187 25.4209 147.215 25.9699 145.855 25.9699C143.99 25.9699 142.513 24.7542 142.396 22.8914H151.199C151.218 22.5385 151.218 22.3228 151.218 22.0875C151.218 18.4404 148.751 16.4796 145.816 16.4796C142.377 16.4796 139.909 19.0875 139.967 22.4797C140.026 25.9307 142.999 28.4797 146.399 28.2248C148.284 28.0876 149.742 27.2444 150.674 25.9895L148.809 24.617ZM145.758 18.5777C147.196 18.5777 148.498 19.46 148.77 21.0875H142.532C142.863 19.4012 144.32 18.5777 145.758 18.5777Z" fill="#260046"/>
|
4
|
+
<path d="M90.9212 3.20568C90.416 3.2449 90.3771 3.9704 90.8629 4.08805L101.861 6.6567C102.716 4.57825 102.736 2.73509 101.278 2.30371L90.9212 3.20568Z" fill="url(#paint0_linear_4932_8135)"/>
|
5
|
+
<path d="M110.956 1.44061C111.364 1.4014 111.597 1.91121 111.306 2.20533L99.4716 13.8525C99.1218 14.2055 98.5583 13.7937 98.7526 13.3427L101.842 6.65636C102.697 4.5779 102.717 2.75435 101.259 2.30337L110.956 1.44061Z" fill="url(#paint1_linear_4932_8135)"/>
|
6
|
+
</g>
|
7
|
+
<defs>
|
8
|
+
<linearGradient id="paint0_linear_4932_8135" x1="94.433" y1="7.18112" x2="99.7933" y2="0.850311" gradientUnits="userSpaceOnUse">
|
9
|
+
<stop offset="0.1155" stop-color="#EA4403"/>
|
10
|
+
<stop offset="0.2632" stop-color="#EA4A03"/>
|
11
|
+
<stop offset="0.4566" stop-color="#EC5A03"/>
|
12
|
+
<stop offset="0.65" stop-color="#EE7203"/>
|
13
|
+
<stop offset="0.7747" stop-color="#F18402"/>
|
14
|
+
<stop offset="1" stop-color="#F8AE00"/>
|
15
|
+
</linearGradient>
|
16
|
+
<linearGradient id="paint1_linear_4932_8135" x1="99.2771" y1="7.19372" x2="110.903" y2="8.20173" gradientUnits="userSpaceOnUse">
|
17
|
+
<stop offset="0.1155" stop-color="#EA4403"/>
|
18
|
+
<stop offset="0.2356" stop-color="#EA4A03"/>
|
19
|
+
<stop offset="0.3928" stop-color="#EC5A03"/>
|
20
|
+
<stop offset="0.55" stop-color="#EE7203"/>
|
21
|
+
<stop offset="0.6535" stop-color="#F18402"/>
|
22
|
+
<stop offset="0.8604" stop-color="#F9B301"/>
|
23
|
+
<stop offset="0.9959" stop-color="#FFD500"/>
|
24
|
+
<stop offset="1" stop-color="#FFD500"/>
|
25
|
+
</linearGradient>
|
26
|
+
<clipPath id="clip0_4932_8135">
|
27
|
+
<rect width="160" height="32.5926" fill="white" transform="translate(0 0.704102)"/>
|
28
|
+
</clipPath>
|
29
|
+
</defs>
|
30
|
+
</svg>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flarehr/apollo-super-campaign",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.44.44",
|
4
4
|
"description": "Flare Apollo Campaign",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
6
|
"type": "module",
|
@@ -48,6 +48,7 @@
|
|
48
48
|
"eslint-config-prettier": "9.1.0",
|
49
49
|
"eslint-plugin-compat": "4.2.0",
|
50
50
|
"eslint-plugin-prettier": "5.1.2",
|
51
|
+
"eslint-plugin-react-hooks": "4.6.2",
|
51
52
|
"eslint-plugin-simple-import-sort": "10.0.0",
|
52
53
|
"eslint-plugin-typescript-compat": "1.0.2",
|
53
54
|
"eslint-plugin-unused-imports": "3.0.0",
|
Binary file
|
package/dist/index.html
DELETED
@@ -1,170 +0,0 @@
|
|
1
|
-
<!-- This index is for local development -->
|
2
|
-
<!doctype html>
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<title>Apollo Super Campaign</title>
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
8
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
9
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
10
|
-
<link
|
11
|
-
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
|
12
|
-
rel="stylesheet"
|
13
|
-
/>
|
14
|
-
<script type="module" crossorigin src="./apollo-super-campaign.js"></script>
|
15
|
-
</head>
|
16
|
-
<style>
|
17
|
-
:root {
|
18
|
-
--fl-color-primary: #1890ff;
|
19
|
-
--fl-color-primary-light: #74c0ff;
|
20
|
-
--fl-color-primary-dark: #006bce;
|
21
|
-
--fl-color-primary-disabled: #f5f5f5;
|
22
|
-
--fl-color-primary-hover: #40a9ff;
|
23
|
-
--fl-color-primary-focus: #40a9ff;
|
24
|
-
--fl-color-primary-text: white;
|
25
|
-
--fl-color-secondary: #d3d3d3;
|
26
|
-
--fl-color-secondary-light: #e1e1e1;
|
27
|
-
--fl-color-secondary-dark: #cecece;
|
28
|
-
--fl-color-secondary-disabled: #f5f5f5;
|
29
|
-
--fl-color-secondary-hover: #ebebeb;
|
30
|
-
--fl-color-secondary-focus: #ebebeb;
|
31
|
-
--fl-color-secondary-text: #262626;
|
32
|
-
}
|
33
|
-
</style>
|
34
|
-
<body>
|
35
|
-
<fieldset>
|
36
|
-
<legend>Settings</legend>
|
37
|
-
<div>
|
38
|
-
<input type="radio" id="campaign-radio" name="app" value="campaign" checked />
|
39
|
-
<label for="campaign-radio">apollo-super-campaign</label>
|
40
|
-
<input type="radio" data-testid="byof-radio" id="byof-radio" name="app" value="byof" />
|
41
|
-
<label for="byof-radio">apollo-super-byof-engagement</label>
|
42
|
-
</div>
|
43
|
-
<div style="padding-top: 1rem;">
|
44
|
-
<label for="fund-usi-dropdown">Choose a Fund USI (for byof-engagement only):</label>
|
45
|
-
<select id="fund-usi-dropdown" name="fundUsis">
|
46
|
-
<option value="53226460365001">Aware Super</option>
|
47
|
-
<option value="MTA0100AU">Spirit Super</option>
|
48
|
-
<option value="STA0100AU">Australian Super</option>
|
49
|
-
<option value="HST0100AU">Hesta</option>
|
50
|
-
<option value="someUsi">Random Unsupported fund</option>
|
51
|
-
</select>
|
52
|
-
</div>
|
53
|
-
</fieldset>
|
54
|
-
|
55
|
-
<div style="padding-top: 3rem;">
|
56
|
-
<button id="campaignReturnButton" style="display: none">Return</button>
|
57
|
-
<div id="super-campaign">
|
58
|
-
<apollo-super-campaign
|
59
|
-
backend-url="%VITE_BACKEND_URL%"
|
60
|
-
access-token="%VITE_ACCESS_TOKEN%"
|
61
|
-
/>
|
62
|
-
</div>
|
63
|
-
<div id="super-byof-engagement" style="display: none">
|
64
|
-
<button id="byofReturnButton" style="display: none">Return</button>
|
65
|
-
<apollo-super-byof-engagement
|
66
|
-
id="super-byof-engagement-element"
|
67
|
-
backend-url="%VITE_BACKEND_URL%"
|
68
|
-
access-token="%VITE_ACCESS_TOKEN%"
|
69
|
-
fund-usi="53226460365001"
|
70
|
-
/>
|
71
|
-
</div>
|
72
|
-
</div>
|
73
|
-
|
74
|
-
<script>
|
75
|
-
// Wait till DOM loaded before attempting to hook up listeners
|
76
|
-
document.addEventListener('DOMContentLoaded', () => {
|
77
|
-
// Handle the picking of apps
|
78
|
-
const campaignOption = document.getElementById('campaign-radio');
|
79
|
-
const byofOption = document.getElementById('byof-radio');
|
80
|
-
const campaignDiv = document.getElementById('super-campaign');
|
81
|
-
const byofDiv = document.getElementById('super-byof-engagement');
|
82
|
-
|
83
|
-
const handleDisplay = () => {
|
84
|
-
if (campaignOption.checked) {
|
85
|
-
campaignDiv.style.display = 'block';
|
86
|
-
byofDiv.style.display = 'none';
|
87
|
-
} else {
|
88
|
-
campaignDiv.style.display = 'none';
|
89
|
-
byofDiv.style.display = 'block';
|
90
|
-
}
|
91
|
-
}
|
92
|
-
|
93
|
-
campaignOption.addEventListener('change', handleDisplay);
|
94
|
-
byofOption.addEventListener('change', handleDisplay);
|
95
|
-
|
96
|
-
// Handle the fund USI dropdown for byof-engagement
|
97
|
-
const byofEl = document.getElementById('super-byof-engagement-element');
|
98
|
-
const fundUsiDropdown = document.getElementById('fund-usi-dropdown');
|
99
|
-
|
100
|
-
const handleUsiDropdown = () => {
|
101
|
-
const fundUsi = fundUsiDropdown.value;
|
102
|
-
|
103
|
-
byofEl.setAttribute('fund-usi', fundUsi);
|
104
|
-
}
|
105
|
-
|
106
|
-
fundUsiDropdown.addEventListener('change', handleUsiDropdown);
|
107
|
-
});
|
108
|
-
</script>
|
109
|
-
<script>
|
110
|
-
// Setup button to recreate apollo-super-campaign
|
111
|
-
const campaignReturnButton = document.getElementById('campaignReturnButton');
|
112
|
-
campaignReturnButton.onclick = () => {
|
113
|
-
const el = document.createElement('apollo-super-campaign');
|
114
|
-
el.setAttribute('backend-url', '%VITE_BACKEND_URL%');
|
115
|
-
el.setAttribute('access-token', '%VITE_ACCESS_TOKEN%');
|
116
|
-
document.body.appendChild(el);
|
117
|
-
campaignReturnButton.style.display = 'none';
|
118
|
-
};
|
119
|
-
|
120
|
-
// Setup button to recreate apollo-super-byof-engagement
|
121
|
-
const byofReturnButton = document.getElementById('byofReturnButton');
|
122
|
-
byofReturnButton.onclick = () => {
|
123
|
-
const el = document.createElement('apollo-super-byof-engagement');
|
124
|
-
el.setAttribute('backend-url', '%VITE_BACKEND_URL%');
|
125
|
-
el.setAttribute('access-token', '%VITE_ACCESS_TOKEN%');
|
126
|
-
el.setAttribute('fund-usi', document.getElementById('fund-usi-dropdown').value);
|
127
|
-
document.body.appendChild(el);
|
128
|
-
byofReturnButton.style.display = 'none';
|
129
|
-
};
|
130
|
-
|
131
|
-
// Listen to events meant for apollo
|
132
|
-
const events = [
|
133
|
-
'choose-another-fund-requested',
|
134
|
-
'fund-panel-shown',
|
135
|
-
'fund-tile-clicked',
|
136
|
-
'disclaimer-viewed',
|
137
|
-
'disclaimer-accepted',
|
138
|
-
'fund-pds-viewed',
|
139
|
-
'promoted-fund-joined',
|
140
|
-
'super-campaign-loaded',
|
141
|
-
'super-campaign-load-failed',
|
142
|
-
'super-campaign-failed',
|
143
|
-
'continue'
|
144
|
-
];
|
145
|
-
for (const event of events) {
|
146
|
-
document.addEventListener(event, (e) => {
|
147
|
-
console.log('apollo received', e, e.detail);
|
148
|
-
|
149
|
-
// Simulate navigating away in apollo by destroying the element
|
150
|
-
if (
|
151
|
-
e.type === 'choose-another-fund-requested' ||
|
152
|
-
e.type === 'promoted-fund-joined'
|
153
|
-
) {
|
154
|
-
document.getElementsByTagName('apollo-super-campaign')[0].remove();
|
155
|
-
campaignReturnButton.style.display = 'block';
|
156
|
-
} else if (e.type === 'continue') {
|
157
|
-
document.getElementsByTagName('apollo-super-byof-engagement')[0].remove();
|
158
|
-
byofReturnButton.style.display = 'block';
|
159
|
-
}
|
160
|
-
});
|
161
|
-
}
|
162
|
-
|
163
|
-
// Listen for iFrame events for debugging
|
164
|
-
const handleMessage = async (e) => {
|
165
|
-
//console.log('received iframe event', e.data);
|
166
|
-
};
|
167
|
-
window.addEventListener('message', handleMessage);
|
168
|
-
</script>
|
169
|
-
</body>
|
170
|
-
</html>
|