@flarehr/apollo-super-campaign 1.32.28 → 1.33.32
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.
- package/dist/apollo-super-campaign.js +7 -7
- package/dist/index.html +24 -7
- package/package.json +1 -1
package/dist/index.html
CHANGED
@@ -33,11 +33,11 @@
|
|
33
33
|
</style>
|
34
34
|
<body>
|
35
35
|
<fieldset>
|
36
|
-
<legend>
|
36
|
+
<legend>Settings</legend>
|
37
37
|
<div>
|
38
38
|
<input type="radio" id="campaign-radio" name="app" value="campaign" checked />
|
39
39
|
<label for="campaign-radio">apollo-super-campaign</label>
|
40
|
-
<input type="radio" id="byof-radio" name="app" value="byof" />
|
40
|
+
<input type="radio" data-testid="byof-radio" id="byof-radio" name="app" value="byof" />
|
41
41
|
<label for="byof-radio">apollo-super-byof-engagement</label>
|
42
42
|
</div>
|
43
43
|
<div style="padding-top: 1rem;">
|
@@ -45,12 +45,13 @@
|
|
45
45
|
<select id="fund-usi-dropdown" name="fundUsis">
|
46
46
|
<option value="53226460365001">Aware Super</option>
|
47
47
|
<option value="MTA0100AU">Spirit Super</option>
|
48
|
+
<option value="STA0100AU">Australian Super</option>
|
48
49
|
</select>
|
49
50
|
</div>
|
50
51
|
</fieldset>
|
51
52
|
|
52
53
|
<div style="padding-top: 3rem;">
|
53
|
-
<button id="
|
54
|
+
<button id="campaignReturnButton" style="display: none">Return</button>
|
54
55
|
<div id="super-campaign">
|
55
56
|
<apollo-super-campaign
|
56
57
|
backend-url="%VITE_BACKEND_URL%"
|
@@ -58,6 +59,7 @@
|
|
58
59
|
/>
|
59
60
|
</div>
|
60
61
|
<div id="super-byof-engagement" style="display: none">
|
62
|
+
<button id="byofReturnButton" style="display: none">Return</button>
|
61
63
|
<apollo-super-byof-engagement
|
62
64
|
id="super-byof-engagement-element"
|
63
65
|
backend-url="%VITE_BACKEND_URL%"
|
@@ -104,13 +106,24 @@
|
|
104
106
|
</script>
|
105
107
|
<script>
|
106
108
|
// Setup button to recreate apollo-super-campaign
|
107
|
-
const
|
108
|
-
|
109
|
+
const campaignReturnButton = document.getElementById('campaignReturnButton');
|
110
|
+
campaignReturnButton.onclick = () => {
|
109
111
|
const el = document.createElement('apollo-super-campaign');
|
110
112
|
el.setAttribute('backend-url', '%VITE_BACKEND_URL%');
|
111
113
|
el.setAttribute('access-token', '%VITE_ACCESS_TOKEN%');
|
112
114
|
document.body.appendChild(el);
|
113
|
-
|
115
|
+
campaignReturnButton.style.display = 'none';
|
116
|
+
};
|
117
|
+
|
118
|
+
// Setup button to recreate apollo-super-byof-engagement
|
119
|
+
const byofReturnButton = document.getElementById('byofReturnButton');
|
120
|
+
byofReturnButton.onclick = () => {
|
121
|
+
const el = document.createElement('apollo-super-byof-engagement');
|
122
|
+
el.setAttribute('backend-url', '%VITE_BACKEND_URL%');
|
123
|
+
el.setAttribute('access-token', '%VITE_ACCESS_TOKEN%');
|
124
|
+
el.setAttribute('fund-usi', document.getElementById('fund-usi-dropdown').value);
|
125
|
+
document.body.appendChild(el);
|
126
|
+
byofReturnButton.style.display = 'none';
|
114
127
|
};
|
115
128
|
|
116
129
|
// Listen to events meant for apollo
|
@@ -125,6 +138,7 @@
|
|
125
138
|
'super-campaign-loaded',
|
126
139
|
'super-campaign-load-failed',
|
127
140
|
'super-campaign-failed',
|
141
|
+
'continue'
|
128
142
|
];
|
129
143
|
for (const event of events) {
|
130
144
|
document.addEventListener(event, (e) => {
|
@@ -136,7 +150,10 @@
|
|
136
150
|
e.type === 'promoted-fund-joined'
|
137
151
|
) {
|
138
152
|
document.getElementsByTagName('apollo-super-campaign')[0].remove();
|
139
|
-
|
153
|
+
campaignReturnButton.style.display = 'block';
|
154
|
+
} else if (e.type === 'continue') {
|
155
|
+
document.getElementsByTagName('apollo-super-byof-engagement')[0].remove();
|
156
|
+
byofReturnButton.style.display = 'block';
|
140
157
|
}
|
141
158
|
});
|
142
159
|
}
|