@flarehr/apollo-super-selection 5.24.54264 → 5.25.54575
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/lib/apollo-super-selection/apollo-super-selection.css +1 -1
- package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
- package/dist/lib/apollo-super-selection/p-64e00db6.entry.js +14 -0
- package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
- package/dist/lib/apollo-super-selection/p-cf19c194.system.entry.js +69 -0
- package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
- package/dist/lib/cjs/loader.cjs.js +1 -1
- package/dist/lib/cjs/{sss-button_43.cjs.entry.js → sss-button_31.cjs.entry.js} +947 -2250
- package/dist/lib/collection/apollo-super-selection.css +1 -1
- package/dist/lib/collection/collection-manifest.json +1 -25
- package/dist/lib/collection/components/super-campaign/super-campaign.js +8 -16
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +26 -25
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +0 -9
- package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +5 -9
- package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +9 -13
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate.js +4 -0
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.js +3 -3
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-smsf.js +2 -2
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +3 -3
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +3 -3
- package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +1 -1
- package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +4 -16
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +1 -9
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +1 -35
- package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +1 -3
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +16 -13
- package/dist/lib/collection/components/super-selection-app/super-selection-app.js +3 -17
- package/dist/lib/esm/apollo-super-selection.js +1 -1
- package/dist/lib/esm/loader.js +1 -1
- package/dist/lib/esm/{sss-button_43.entry.js → sss-button_31.entry.js} +948 -2239
- package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
- package/dist/lib/esm-es5/loader.js +1 -1
- package/dist/lib/esm-es5/sss-button_31.entry.js +69 -0
- package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +4 -0
- package/dist/lib/types/components/super-campaign/super-campaign.d.ts +0 -1
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +1 -2
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +1 -10
- package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +1 -2
- package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +0 -4
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +1 -3
- package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +0 -2
- package/dist/lib/types/components.d.ts +2 -203
- package/package.json +1 -1
- package/dist/lib/apollo-super-selection/assets/icon-check.svg +0 -3
- package/dist/lib/apollo-super-selection/assets/logo-active.svg +0 -1
- package/dist/lib/apollo-super-selection/assets/logo-art.svg +0 -7
- package/dist/lib/apollo-super-selection/assets/logo-aus-eth.svg +0 -31
- package/dist/lib/apollo-super-selection/assets/logo-aware.svg +0 -58
- package/dist/lib/apollo-super-selection/assets/logo-first.svg +0 -15
- package/dist/lib/apollo-super-selection/assets/logo-hesta.svg +0 -5
- package/dist/lib/apollo-super-selection/assets/logo-mercer-mychoice.svg +0 -1
- package/dist/lib/apollo-super-selection/assets/logo-rei.svg +0 -27
- package/dist/lib/apollo-super-selection/assets/logo-slate.png +0 -0
- package/dist/lib/apollo-super-selection/assets/logo-spirit.svg +0 -141
- package/dist/lib/apollo-super-selection/assets/logo-unisuper.svg +0 -15
- package/dist/lib/apollo-super-selection/assets/logo-virgin.svg +0 -8
- package/dist/lib/apollo-super-selection/assets/unisuper-default-badge1.svg +0 -25
- package/dist/lib/apollo-super-selection/assets/unisuper-default-badge2.svg +0 -109
- package/dist/lib/apollo-super-selection/assets/unisuper-default-badge3.svg +0 -102
- package/dist/lib/apollo-super-selection/p-203c74a8.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-b0120851.system.entry.js +0 -69
- package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +0 -3
- package/dist/lib/collection/components/super-selection-app/consent/consent-wrapper.js +0 -32
- package/dist/lib/collection/components/super-selection-app/consent/consent.js +0 -88
- package/dist/lib/collection/components/super-selection-app/funds/constants.js +0 -43
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/active.js +0 -26
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.js +0 -43
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.js +0 -32
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/aware.js +0 -38
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/first.js +0 -27
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/hesta-default.js +0 -34
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.js +0 -33
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/rei.js +0 -33
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/slate.js +0 -32
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/spirit.js +0 -43
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/unisuper-default-v2.js +0 -56
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/unisuper-default.js +0 -49
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/virgin.js +0 -37
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.js +0 -30
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.js +0 -30
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +0 -10
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.js +0 -125
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.js +0 -271
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-types.js +0 -1
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/types.js +0 -15
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +0 -143
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +0 -30
- package/dist/lib/collection/components/super-selection-app/loading-component/loading-component.js +0 -29
- package/dist/lib/collection/components/super-selection-app/loading-super-indicator/loading-super-indicator.js +0 -11
- package/dist/lib/collection/components/super-selection-app/misc/iframe-host.js +0 -32
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-active.svg +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-art.svg +0 -7
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aus-eth.svg +0 -31
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aware.svg +0 -58
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-first.svg +0 -15
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-hesta.svg +0 -5
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-mercer-mychoice.svg +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-rei.svg +0 -27
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-slate.png +0 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-spirit.svg +0 -141
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-unisuper.svg +0 -15
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-virgin.svg +0 -8
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge1.svg +0 -25
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge2.svg +0 -109
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge3.svg +0 -102
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +0 -112
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +0 -178
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page-wrapper.js +0 -32
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +0 -171
- package/dist/lib/esm-es5/sss-button_43.entry.js +0 -69
- package/dist/lib/types/components/super-selection-app/consent/consent-wrapper.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +0 -9
- package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +0 -9
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/active.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/aware.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/first.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/hesta-default.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/rei.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/slate.d.ts +0 -4
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/spirit.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/unisuper-default-v2.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/unisuper-default.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/virgin.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -10
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.d.ts +0 -10
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.d.ts +0 -12
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-types.d.ts +0 -75
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/types.d.ts +0 -26
- package/dist/lib/types/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.d.ts +0 -14
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-join-page.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/loading-component/loading-component.d.ts +0 -4
- package/dist/lib/types/components/super-selection-app/loading-super-indicator/loading-super-indicator.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/misc/iframe-host.d.ts +0 -6
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +0 -10
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +0 -12
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page-wrapper.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -10
|
@@ -260,7 +260,7 @@ class TapSubscriber extends Subscriber {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
const AppVersion = '5.
|
|
263
|
+
const AppVersion = '5.25.54575';
|
|
264
264
|
|
|
265
265
|
// -------------------------------------------------------------------------------------
|
|
266
266
|
// guards
|
|
@@ -963,6 +963,253 @@ const Button = class {
|
|
|
963
963
|
}
|
|
964
964
|
};
|
|
965
965
|
|
|
966
|
+
function appReady() {
|
|
967
|
+
postMessage({
|
|
968
|
+
type: 'appReady'
|
|
969
|
+
});
|
|
970
|
+
}
|
|
971
|
+
function postMessage(message, origin) {
|
|
972
|
+
if (origin === undefined)
|
|
973
|
+
origin = '*';
|
|
974
|
+
message.sender = 'flare';
|
|
975
|
+
window.parent.postMessage(message, origin);
|
|
976
|
+
}
|
|
977
|
+
function resize(height, width) {
|
|
978
|
+
postMessage({
|
|
979
|
+
type: 'contentResized',
|
|
980
|
+
height,
|
|
981
|
+
width
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
function navigation(url) {
|
|
985
|
+
postMessage({
|
|
986
|
+
type: 'pageNavigated',
|
|
987
|
+
url
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
function complete() {
|
|
991
|
+
postMessage({ type: 'complete' });
|
|
992
|
+
}
|
|
993
|
+
function submitSuccess() {
|
|
994
|
+
postMessage({
|
|
995
|
+
type: 'submitSuccess'
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
const iframe = { appReady, resize, navigation, complete, submitSuccess };
|
|
999
|
+
|
|
1000
|
+
const appendToMap = (map, propName, value) => {
|
|
1001
|
+
const items = map.get(propName);
|
|
1002
|
+
if (!items) {
|
|
1003
|
+
map.set(propName, [value]);
|
|
1004
|
+
}
|
|
1005
|
+
else if (!items.includes(value)) {
|
|
1006
|
+
items.push(value);
|
|
1007
|
+
}
|
|
1008
|
+
};
|
|
1009
|
+
const debounce = (fn, ms) => {
|
|
1010
|
+
let timeoutId;
|
|
1011
|
+
return (...args) => {
|
|
1012
|
+
if (timeoutId) {
|
|
1013
|
+
clearTimeout(timeoutId);
|
|
1014
|
+
}
|
|
1015
|
+
timeoutId = setTimeout(() => {
|
|
1016
|
+
timeoutId = 0;
|
|
1017
|
+
fn(...args);
|
|
1018
|
+
}, ms);
|
|
1019
|
+
};
|
|
1020
|
+
};
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Check if a possible element isConnected.
|
|
1024
|
+
* The property might not be there, so we check for it.
|
|
1025
|
+
*
|
|
1026
|
+
* We want it to return true if isConnected is not a property,
|
|
1027
|
+
* otherwise we would remove these elements and would not update.
|
|
1028
|
+
*
|
|
1029
|
+
* Better leak in Edge than to be useless.
|
|
1030
|
+
*/
|
|
1031
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
1032
|
+
const cleanupElements = debounce((map) => {
|
|
1033
|
+
for (let key of map.keys()) {
|
|
1034
|
+
map.set(key, map.get(key).filter(isConnected));
|
|
1035
|
+
}
|
|
1036
|
+
}, 2000);
|
|
1037
|
+
const stencilSubscription = ({ on }) => {
|
|
1038
|
+
const elmsToUpdate = new Map();
|
|
1039
|
+
if (typeof getRenderingRef === 'function') {
|
|
1040
|
+
// If we are not in a stencil project, we do nothing.
|
|
1041
|
+
// This function is not really exported by @stencil/core.
|
|
1042
|
+
on('dispose', () => {
|
|
1043
|
+
elmsToUpdate.clear();
|
|
1044
|
+
});
|
|
1045
|
+
on('get', (propName) => {
|
|
1046
|
+
const elm = getRenderingRef();
|
|
1047
|
+
if (elm) {
|
|
1048
|
+
appendToMap(elmsToUpdate, propName, elm);
|
|
1049
|
+
}
|
|
1050
|
+
});
|
|
1051
|
+
on('set', (propName) => {
|
|
1052
|
+
const elements = elmsToUpdate.get(propName);
|
|
1053
|
+
if (elements) {
|
|
1054
|
+
elmsToUpdate.set(propName, elements.filter(forceUpdate));
|
|
1055
|
+
}
|
|
1056
|
+
cleanupElements(elmsToUpdate);
|
|
1057
|
+
});
|
|
1058
|
+
on('reset', () => {
|
|
1059
|
+
elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
|
|
1060
|
+
cleanupElements(elmsToUpdate);
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
1066
|
+
let states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
|
|
1067
|
+
const handlers = {
|
|
1068
|
+
dispose: [],
|
|
1069
|
+
get: [],
|
|
1070
|
+
set: [],
|
|
1071
|
+
reset: [],
|
|
1072
|
+
};
|
|
1073
|
+
const reset = () => {
|
|
1074
|
+
states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
|
|
1075
|
+
handlers.reset.forEach((cb) => cb());
|
|
1076
|
+
};
|
|
1077
|
+
const dispose = () => {
|
|
1078
|
+
// Call first dispose as resetting the state would
|
|
1079
|
+
// cause less updates ;)
|
|
1080
|
+
handlers.dispose.forEach((cb) => cb());
|
|
1081
|
+
reset();
|
|
1082
|
+
};
|
|
1083
|
+
const get = (propName) => {
|
|
1084
|
+
handlers.get.forEach((cb) => cb(propName));
|
|
1085
|
+
return states.get(propName);
|
|
1086
|
+
};
|
|
1087
|
+
const set = (propName, value) => {
|
|
1088
|
+
const oldValue = states.get(propName);
|
|
1089
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
|
1090
|
+
states.set(propName, value);
|
|
1091
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
const state = (typeof Proxy === 'undefined'
|
|
1095
|
+
? {}
|
|
1096
|
+
: new Proxy(defaultState, {
|
|
1097
|
+
get(_, propName) {
|
|
1098
|
+
return get(propName);
|
|
1099
|
+
},
|
|
1100
|
+
ownKeys(_) {
|
|
1101
|
+
return Array.from(states.keys());
|
|
1102
|
+
},
|
|
1103
|
+
getOwnPropertyDescriptor() {
|
|
1104
|
+
return {
|
|
1105
|
+
enumerable: true,
|
|
1106
|
+
configurable: true,
|
|
1107
|
+
};
|
|
1108
|
+
},
|
|
1109
|
+
has(_, propName) {
|
|
1110
|
+
return states.has(propName);
|
|
1111
|
+
},
|
|
1112
|
+
set(_, propName, value) {
|
|
1113
|
+
set(propName, value);
|
|
1114
|
+
return true;
|
|
1115
|
+
},
|
|
1116
|
+
}));
|
|
1117
|
+
const on = (eventName, callback) => {
|
|
1118
|
+
handlers[eventName].push(callback);
|
|
1119
|
+
return () => {
|
|
1120
|
+
removeFromArray(handlers[eventName], callback);
|
|
1121
|
+
};
|
|
1122
|
+
};
|
|
1123
|
+
const onChange = (propName, cb) => {
|
|
1124
|
+
const unSet = on('set', (key, newValue) => {
|
|
1125
|
+
if (key === propName) {
|
|
1126
|
+
cb(newValue);
|
|
1127
|
+
}
|
|
1128
|
+
});
|
|
1129
|
+
const unReset = on('reset', () => cb(defaultState[propName]));
|
|
1130
|
+
return () => {
|
|
1131
|
+
unSet();
|
|
1132
|
+
unReset();
|
|
1133
|
+
};
|
|
1134
|
+
};
|
|
1135
|
+
const use = (...subscriptions) => subscriptions.forEach((subscription) => {
|
|
1136
|
+
if (subscription.set) {
|
|
1137
|
+
on('set', subscription.set);
|
|
1138
|
+
}
|
|
1139
|
+
if (subscription.get) {
|
|
1140
|
+
on('get', subscription.get);
|
|
1141
|
+
}
|
|
1142
|
+
if (subscription.reset) {
|
|
1143
|
+
on('reset', subscription.reset);
|
|
1144
|
+
}
|
|
1145
|
+
});
|
|
1146
|
+
return {
|
|
1147
|
+
state,
|
|
1148
|
+
get,
|
|
1149
|
+
set,
|
|
1150
|
+
on,
|
|
1151
|
+
onChange,
|
|
1152
|
+
use,
|
|
1153
|
+
dispose,
|
|
1154
|
+
reset,
|
|
1155
|
+
};
|
|
1156
|
+
};
|
|
1157
|
+
const removeFromArray = (array, item) => {
|
|
1158
|
+
const index = array.indexOf(item);
|
|
1159
|
+
if (index >= 0) {
|
|
1160
|
+
array[index] = array[array.length - 1];
|
|
1161
|
+
array.length--;
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
const createStore = (defaultState, shouldUpdate) => {
|
|
1166
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
|
1167
|
+
stencilSubscription(map);
|
|
1168
|
+
return map;
|
|
1169
|
+
};
|
|
1170
|
+
|
|
1171
|
+
const initial = {
|
|
1172
|
+
handleSubmitFn: async function () {
|
|
1173
|
+
return;
|
|
1174
|
+
},
|
|
1175
|
+
fundName: '',
|
|
1176
|
+
fundDetails: { type: 'null' },
|
|
1177
|
+
promotedFundId: undefined
|
|
1178
|
+
};
|
|
1179
|
+
const { state } = createStore(initial);
|
|
1180
|
+
|
|
1181
|
+
var SuperSelectionAppRoutes;
|
|
1182
|
+
(function (SuperSelectionAppRoutes) {
|
|
1183
|
+
SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
|
|
1184
|
+
SuperSelectionAppRoutes["SuperCampaign"] = "/super-campaign";
|
|
1185
|
+
SuperSelectionAppRoutes["ChoicePage"] = "/";
|
|
1186
|
+
SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
|
|
1187
|
+
SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
|
|
1188
|
+
SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
|
|
1189
|
+
SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
|
|
1190
|
+
SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
|
|
1191
|
+
SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
|
|
1192
|
+
SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
|
|
1193
|
+
SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
|
|
1194
|
+
SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
|
|
1195
|
+
SuperSelectionAppRoutes["Success"] = "/success/";
|
|
1196
|
+
})(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
|
|
1197
|
+
const superSelectionAppStencilRoutes = [
|
|
1198
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
|
|
1199
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
|
|
1200
|
+
h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-super-campaign-host" }),
|
|
1201
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
|
|
1202
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
|
|
1203
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
|
|
1204
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
|
|
1205
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
|
|
1206
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
|
|
1207
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
|
|
1208
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
|
|
1209
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
|
|
1210
|
+
h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
|
|
1211
|
+
];
|
|
1212
|
+
|
|
966
1213
|
function createCommonjsModule(fn, basedir, module) {
|
|
967
1214
|
return module = {
|
|
968
1215
|
path: basedir,
|
|
@@ -2426,177 +2673,6 @@ exports.sequenceArray =
|
|
|
2426
2673
|
exports.traverseArray(_function.identity);
|
|
2427
2674
|
});
|
|
2428
2675
|
|
|
2429
|
-
const appendToMap = (map, propName, value) => {
|
|
2430
|
-
const items = map.get(propName);
|
|
2431
|
-
if (!items) {
|
|
2432
|
-
map.set(propName, [value]);
|
|
2433
|
-
}
|
|
2434
|
-
else if (!items.includes(value)) {
|
|
2435
|
-
items.push(value);
|
|
2436
|
-
}
|
|
2437
|
-
};
|
|
2438
|
-
const debounce = (fn, ms) => {
|
|
2439
|
-
let timeoutId;
|
|
2440
|
-
return (...args) => {
|
|
2441
|
-
if (timeoutId) {
|
|
2442
|
-
clearTimeout(timeoutId);
|
|
2443
|
-
}
|
|
2444
|
-
timeoutId = setTimeout(() => {
|
|
2445
|
-
timeoutId = 0;
|
|
2446
|
-
fn(...args);
|
|
2447
|
-
}, ms);
|
|
2448
|
-
};
|
|
2449
|
-
};
|
|
2450
|
-
|
|
2451
|
-
/**
|
|
2452
|
-
* Check if a possible element isConnected.
|
|
2453
|
-
* The property might not be there, so we check for it.
|
|
2454
|
-
*
|
|
2455
|
-
* We want it to return true if isConnected is not a property,
|
|
2456
|
-
* otherwise we would remove these elements and would not update.
|
|
2457
|
-
*
|
|
2458
|
-
* Better leak in Edge than to be useless.
|
|
2459
|
-
*/
|
|
2460
|
-
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
2461
|
-
const cleanupElements = debounce((map) => {
|
|
2462
|
-
for (let key of map.keys()) {
|
|
2463
|
-
map.set(key, map.get(key).filter(isConnected));
|
|
2464
|
-
}
|
|
2465
|
-
}, 2000);
|
|
2466
|
-
const stencilSubscription = ({ on }) => {
|
|
2467
|
-
const elmsToUpdate = new Map();
|
|
2468
|
-
if (typeof getRenderingRef === 'function') {
|
|
2469
|
-
// If we are not in a stencil project, we do nothing.
|
|
2470
|
-
// This function is not really exported by @stencil/core.
|
|
2471
|
-
on('dispose', () => {
|
|
2472
|
-
elmsToUpdate.clear();
|
|
2473
|
-
});
|
|
2474
|
-
on('get', (propName) => {
|
|
2475
|
-
const elm = getRenderingRef();
|
|
2476
|
-
if (elm) {
|
|
2477
|
-
appendToMap(elmsToUpdate, propName, elm);
|
|
2478
|
-
}
|
|
2479
|
-
});
|
|
2480
|
-
on('set', (propName) => {
|
|
2481
|
-
const elements = elmsToUpdate.get(propName);
|
|
2482
|
-
if (elements) {
|
|
2483
|
-
elmsToUpdate.set(propName, elements.filter(forceUpdate));
|
|
2484
|
-
}
|
|
2485
|
-
cleanupElements(elmsToUpdate);
|
|
2486
|
-
});
|
|
2487
|
-
on('reset', () => {
|
|
2488
|
-
elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
|
|
2489
|
-
cleanupElements(elmsToUpdate);
|
|
2490
|
-
});
|
|
2491
|
-
}
|
|
2492
|
-
};
|
|
2493
|
-
|
|
2494
|
-
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
2495
|
-
let states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
|
|
2496
|
-
const handlers = {
|
|
2497
|
-
dispose: [],
|
|
2498
|
-
get: [],
|
|
2499
|
-
set: [],
|
|
2500
|
-
reset: [],
|
|
2501
|
-
};
|
|
2502
|
-
const reset = () => {
|
|
2503
|
-
states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
|
|
2504
|
-
handlers.reset.forEach((cb) => cb());
|
|
2505
|
-
};
|
|
2506
|
-
const dispose = () => {
|
|
2507
|
-
// Call first dispose as resetting the state would
|
|
2508
|
-
// cause less updates ;)
|
|
2509
|
-
handlers.dispose.forEach((cb) => cb());
|
|
2510
|
-
reset();
|
|
2511
|
-
};
|
|
2512
|
-
const get = (propName) => {
|
|
2513
|
-
handlers.get.forEach((cb) => cb(propName));
|
|
2514
|
-
return states.get(propName);
|
|
2515
|
-
};
|
|
2516
|
-
const set = (propName, value) => {
|
|
2517
|
-
const oldValue = states.get(propName);
|
|
2518
|
-
if (shouldUpdate(value, oldValue, propName)) {
|
|
2519
|
-
states.set(propName, value);
|
|
2520
|
-
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
2521
|
-
}
|
|
2522
|
-
};
|
|
2523
|
-
const state = (typeof Proxy === 'undefined'
|
|
2524
|
-
? {}
|
|
2525
|
-
: new Proxy(defaultState, {
|
|
2526
|
-
get(_, propName) {
|
|
2527
|
-
return get(propName);
|
|
2528
|
-
},
|
|
2529
|
-
ownKeys(_) {
|
|
2530
|
-
return Array.from(states.keys());
|
|
2531
|
-
},
|
|
2532
|
-
getOwnPropertyDescriptor() {
|
|
2533
|
-
return {
|
|
2534
|
-
enumerable: true,
|
|
2535
|
-
configurable: true,
|
|
2536
|
-
};
|
|
2537
|
-
},
|
|
2538
|
-
has(_, propName) {
|
|
2539
|
-
return states.has(propName);
|
|
2540
|
-
},
|
|
2541
|
-
set(_, propName, value) {
|
|
2542
|
-
set(propName, value);
|
|
2543
|
-
return true;
|
|
2544
|
-
},
|
|
2545
|
-
}));
|
|
2546
|
-
const on = (eventName, callback) => {
|
|
2547
|
-
handlers[eventName].push(callback);
|
|
2548
|
-
return () => {
|
|
2549
|
-
removeFromArray(handlers[eventName], callback);
|
|
2550
|
-
};
|
|
2551
|
-
};
|
|
2552
|
-
const onChange = (propName, cb) => {
|
|
2553
|
-
const unSet = on('set', (key, newValue) => {
|
|
2554
|
-
if (key === propName) {
|
|
2555
|
-
cb(newValue);
|
|
2556
|
-
}
|
|
2557
|
-
});
|
|
2558
|
-
const unReset = on('reset', () => cb(defaultState[propName]));
|
|
2559
|
-
return () => {
|
|
2560
|
-
unSet();
|
|
2561
|
-
unReset();
|
|
2562
|
-
};
|
|
2563
|
-
};
|
|
2564
|
-
const use = (...subscriptions) => subscriptions.forEach((subscription) => {
|
|
2565
|
-
if (subscription.set) {
|
|
2566
|
-
on('set', subscription.set);
|
|
2567
|
-
}
|
|
2568
|
-
if (subscription.get) {
|
|
2569
|
-
on('get', subscription.get);
|
|
2570
|
-
}
|
|
2571
|
-
if (subscription.reset) {
|
|
2572
|
-
on('reset', subscription.reset);
|
|
2573
|
-
}
|
|
2574
|
-
});
|
|
2575
|
-
return {
|
|
2576
|
-
state,
|
|
2577
|
-
get,
|
|
2578
|
-
set,
|
|
2579
|
-
on,
|
|
2580
|
-
onChange,
|
|
2581
|
-
use,
|
|
2582
|
-
dispose,
|
|
2583
|
-
reset,
|
|
2584
|
-
};
|
|
2585
|
-
};
|
|
2586
|
-
const removeFromArray = (array, item) => {
|
|
2587
|
-
const index = array.indexOf(item);
|
|
2588
|
-
if (index >= 0) {
|
|
2589
|
-
array[index] = array[array.length - 1];
|
|
2590
|
-
array.length--;
|
|
2591
|
-
}
|
|
2592
|
-
};
|
|
2593
|
-
|
|
2594
|
-
const createStore = (defaultState, shouldUpdate) => {
|
|
2595
|
-
const map = createObservableMap(defaultState, shouldUpdate);
|
|
2596
|
-
stencilSubscription(map);
|
|
2597
|
-
return map;
|
|
2598
|
-
};
|
|
2599
|
-
|
|
2600
2676
|
function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";
|
|
2601
2677
|
|
|
2602
2678
|
var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
@@ -3286,6 +3362,11 @@ function buildBackendApiClient() {
|
|
|
3286
3362
|
});
|
|
3287
3363
|
}
|
|
3288
3364
|
|
|
3365
|
+
const slate = {
|
|
3366
|
+
fundId: 'slate',
|
|
3367
|
+
usi: '32367272075001'
|
|
3368
|
+
};
|
|
3369
|
+
|
|
3289
3370
|
function hydratePromotedFundChoiceDtoKind(dto) {
|
|
3290
3371
|
if ('slate' in dto) {
|
|
3291
3372
|
dto.kind = 'slate';
|
|
@@ -3321,33 +3402,33 @@ function hydratePromotedFundChoiceDtoKind(dto) {
|
|
|
3321
3402
|
function getPromotedFundUsi(dto) {
|
|
3322
3403
|
switch (dto.kind) {
|
|
3323
3404
|
case 'slate':
|
|
3324
|
-
return
|
|
3405
|
+
return slate.usi;
|
|
3325
3406
|
case 'australianRetirementTrust':
|
|
3326
|
-
return
|
|
3407
|
+
return dto.australianRetirementTrust.usi;
|
|
3327
3408
|
case 'aware':
|
|
3328
|
-
return
|
|
3409
|
+
return dto.aware.usi;
|
|
3329
3410
|
case 'active':
|
|
3330
|
-
return
|
|
3411
|
+
return dto.active.usi;
|
|
3331
3412
|
case 'australianEthical':
|
|
3332
|
-
return
|
|
3413
|
+
return dto.australianEthical.usi;
|
|
3333
3414
|
case 'virgin':
|
|
3334
|
-
return
|
|
3415
|
+
return dto.virgin.usi;
|
|
3335
3416
|
case 'spirit':
|
|
3336
|
-
return
|
|
3417
|
+
return dto.spirit.usi;
|
|
3337
3418
|
case 'firstSuper':
|
|
3338
|
-
return
|
|
3419
|
+
return dto.firstSuper.usi;
|
|
3339
3420
|
case 'mercerMyChoice':
|
|
3340
|
-
return
|
|
3421
|
+
return dto.mercerMyChoice.usi;
|
|
3341
3422
|
case 'generic':
|
|
3342
|
-
return
|
|
3423
|
+
return dto.generic.usi;
|
|
3343
3424
|
default:
|
|
3344
|
-
return
|
|
3425
|
+
return '';
|
|
3345
3426
|
}
|
|
3346
3427
|
}
|
|
3347
3428
|
function getPromotedFundId(dto) {
|
|
3348
3429
|
switch (dto.kind) {
|
|
3349
3430
|
case 'slate':
|
|
3350
|
-
return
|
|
3431
|
+
return slate.fundId;
|
|
3351
3432
|
case 'australianRetirementTrust':
|
|
3352
3433
|
return 'australian-retirement-trust';
|
|
3353
3434
|
case 'aware':
|
|
@@ -3373,7 +3454,7 @@ function getPromotedFundId(dto) {
|
|
|
3373
3454
|
function getSuperChoiceUsi(dto) {
|
|
3374
3455
|
switch (dto.kind) {
|
|
3375
3456
|
case 'Promoted':
|
|
3376
|
-
return getPromotedFundUsi(dto.promoted);
|
|
3457
|
+
return some(getPromotedFundUsi(dto.promoted));
|
|
3377
3458
|
case 'MyOwnFund':
|
|
3378
3459
|
return some(dto.myOwnFund.usi);
|
|
3379
3460
|
case 'SMSF':
|
|
@@ -3393,33 +3474,33 @@ function getSuperChoiceUsi(dto) {
|
|
|
3393
3474
|
function getPromotedFundMemberNumber(dto) {
|
|
3394
3475
|
switch (dto.kind) {
|
|
3395
3476
|
case 'slate':
|
|
3396
|
-
return
|
|
3477
|
+
return dto.slate.memberNumber;
|
|
3397
3478
|
case 'australianRetirementTrust':
|
|
3398
|
-
return
|
|
3479
|
+
return dto.australianRetirementTrust.memberNumber;
|
|
3399
3480
|
case 'aware':
|
|
3400
|
-
return
|
|
3481
|
+
return dto.aware.memberNumber;
|
|
3401
3482
|
case 'active':
|
|
3402
|
-
return
|
|
3483
|
+
return dto.active.memberNumber;
|
|
3403
3484
|
case 'australianEthical':
|
|
3404
|
-
return
|
|
3485
|
+
return dto.australianEthical.memberNumber;
|
|
3405
3486
|
case 'virgin':
|
|
3406
|
-
return
|
|
3487
|
+
return dto.virgin.memberNumber;
|
|
3407
3488
|
case 'spirit':
|
|
3408
|
-
return
|
|
3489
|
+
return dto.spirit.memberNumber;
|
|
3409
3490
|
case 'firstSuper':
|
|
3410
|
-
return
|
|
3491
|
+
return dto.firstSuper.memberNumber;
|
|
3411
3492
|
case 'mercerMyChoice':
|
|
3412
|
-
return
|
|
3493
|
+
return dto.mercerMyChoice.memberNumber;
|
|
3413
3494
|
case 'generic':
|
|
3414
|
-
return
|
|
3495
|
+
return dto.generic.memberNumber;
|
|
3415
3496
|
default:
|
|
3416
|
-
return
|
|
3497
|
+
return '';
|
|
3417
3498
|
}
|
|
3418
3499
|
}
|
|
3419
3500
|
function getSuperChoiceMemberNumber(dto) {
|
|
3420
3501
|
switch (dto.kind) {
|
|
3421
3502
|
case 'Promoted':
|
|
3422
|
-
return getPromotedFundMemberNumber(dto.promoted);
|
|
3503
|
+
return some(getPromotedFundMemberNumber(dto.promoted));
|
|
3423
3504
|
case 'MyOwnFund':
|
|
3424
3505
|
return some(dto.myOwnFund.memberNumber);
|
|
3425
3506
|
case 'DefinedBenefits':
|
|
@@ -3497,15 +3578,6 @@ class SuperSelectionApi {
|
|
|
3497
3578
|
}
|
|
3498
3579
|
return response;
|
|
3499
3580
|
}
|
|
3500
|
-
async getCampaignConnectAsync() {
|
|
3501
|
-
return buildBackendApiClient()
|
|
3502
|
-
.url('campaign-connect')
|
|
3503
|
-
.get()
|
|
3504
|
-
.notFound(() => {
|
|
3505
|
-
throw new Error('Failed to fetch campaign connect.');
|
|
3506
|
-
})
|
|
3507
|
-
.json();
|
|
3508
|
-
}
|
|
3509
3581
|
async clickPromotedTileAsync(payload) {
|
|
3510
3582
|
return buildBackendApiClient().url('click-promoted-tile').post(payload).res();
|
|
3511
3583
|
}
|
|
@@ -3560,10 +3632,8 @@ const initialState = {
|
|
|
3560
3632
|
profileConfiguration: Option.none,
|
|
3561
3633
|
hasSuccessPageBeenAcknowledged: false,
|
|
3562
3634
|
hasSuperSelectionBeenSubmitted: false,
|
|
3563
|
-
campaignConnectEnabled: false,
|
|
3564
3635
|
isDefinedBenefitsEligible: Option.none,
|
|
3565
|
-
|
|
3566
|
-
superCampaignEnabled: false,
|
|
3636
|
+
superCampaignEnabled: true,
|
|
3567
3637
|
superCampaignState: undefined,
|
|
3568
3638
|
superCampaignComponentStatus: SuperCampaignComponentStatus.NotLoaded,
|
|
3569
3639
|
superCampaignIsInView: false
|
|
@@ -3606,9 +3676,6 @@ class SuperSelectionAppService {
|
|
|
3606
3676
|
if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
|
|
3607
3677
|
return this.superCampaignState.PromotedFundIds;
|
|
3608
3678
|
}
|
|
3609
|
-
if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
|
|
3610
|
-
return this._state.campaignConnect.value.promotedFunds.map((v) => v.fundId);
|
|
3611
|
-
}
|
|
3612
3679
|
if (Option.isNone(this._state.promotedFunds)) {
|
|
3613
3680
|
throw Error('Promoted Funds is not set');
|
|
3614
3681
|
}
|
|
@@ -3618,35 +3685,15 @@ class SuperSelectionAppService {
|
|
|
3618
3685
|
if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
|
|
3619
3686
|
return Option.fromNullable(this.superCampaignState.DefaultFundPosition);
|
|
3620
3687
|
}
|
|
3621
|
-
if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
|
|
3622
|
-
const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => v.type === 'promoted-default');
|
|
3623
|
-
if (index === -1) {
|
|
3624
|
-
return Option.fromNullable(null);
|
|
3625
|
-
}
|
|
3626
|
-
else {
|
|
3627
|
-
return Option.fromNullable(index + 1);
|
|
3628
|
-
}
|
|
3629
|
-
}
|
|
3630
3688
|
return Option.none;
|
|
3631
3689
|
}
|
|
3632
3690
|
get promotedFundsConfig() {
|
|
3633
3691
|
return {
|
|
3634
3692
|
shownFunds: this.promotedFunds,
|
|
3635
3693
|
promotedDefaultFundPosition: Option.toUndefined(this.promotedDefaultFundPosition),
|
|
3636
|
-
promotedFundsConfigSource: this.isUsingSuperCampaign
|
|
3637
|
-
? 'superCampaign'
|
|
3638
|
-
: Option.isSome(this._state.campaignConnect)
|
|
3639
|
-
? 'campaignConnect'
|
|
3640
|
-
: 'superSelection'
|
|
3694
|
+
promotedFundsConfigSource: this.isUsingSuperCampaign ? 'superCampaign' : 'superSelection'
|
|
3641
3695
|
};
|
|
3642
3696
|
}
|
|
3643
|
-
get definedBenefitsFundId() {
|
|
3644
|
-
if (Option.isSome(this._state.campaignConnect)) {
|
|
3645
|
-
const definedBenefitsFund = this._state.campaignConnect.value.promotedFunds.find((fund) => fund.type == 'defined-benefits');
|
|
3646
|
-
return Option.fromNullable(definedBenefitsFund === null || definedBenefitsFund === void 0 ? void 0 : definedBenefitsFund.fundId);
|
|
3647
|
-
}
|
|
3648
|
-
return Option.none;
|
|
3649
|
-
}
|
|
3650
3697
|
get profileId() {
|
|
3651
3698
|
if (Option.isNone(this._state.profileId)) {
|
|
3652
3699
|
throw Error('Failed to get Profile ID from JWT');
|
|
@@ -3678,9 +3725,6 @@ class SuperSelectionAppService {
|
|
|
3678
3725
|
markSuperSelectionAsSubmitted() {
|
|
3679
3726
|
this._state.hasSuperSelectionBeenSubmitted = true;
|
|
3680
3727
|
}
|
|
3681
|
-
get campaignConnectEnabled() {
|
|
3682
|
-
return this._state.campaignConnectEnabled;
|
|
3683
|
-
}
|
|
3684
3728
|
get isDefinedBenefitsEligible() {
|
|
3685
3729
|
return this._state.isDefinedBenefitsEligible;
|
|
3686
3730
|
}
|
|
@@ -3690,17 +3734,9 @@ class SuperSelectionAppService {
|
|
|
3690
3734
|
this._state.profileConfiguration = Option.fromNullable(appStateResponse.profileConfiguration);
|
|
3691
3735
|
this._state.superBuyer = Option.fromNullable(appStateResponse.superBuyer);
|
|
3692
3736
|
this._state.promotedFunds = Option.fromNullable(appStateResponse.promotedFunds);
|
|
3693
|
-
this._state.campaignConnectEnabled = appStateResponse.campaignConnectEnabled;
|
|
3694
|
-
this._state.superCampaignEnabled = appStateResponse.superCampaignEnabled;
|
|
3695
3737
|
this._state.superChoicePrefill = Option.fromNullable(appStateResponse.prefill);
|
|
3696
3738
|
this._state.isDefinedBenefitsEligible = Option.fromNullable(appStateResponse.isDefinedBenefitsEligible);
|
|
3697
3739
|
}
|
|
3698
|
-
async loadCampaignConnectAsync() {
|
|
3699
|
-
if (this._state.campaignConnectEnabled) {
|
|
3700
|
-
const campaignConnect = await superSelectionApi.getCampaignConnectAsync();
|
|
3701
|
-
this._state.campaignConnect = Option.fromNullable(campaignConnect);
|
|
3702
|
-
}
|
|
3703
|
-
}
|
|
3704
3740
|
setSuperCampaignPromotedFundsShown(shownFunds) {
|
|
3705
3741
|
if (this._state.superCampaignState !== undefined)
|
|
3706
3742
|
this._state.superCampaignState.promotedFundsShown = shownFunds;
|
|
@@ -3744,306 +3780,33 @@ class SuperSelectionAppService {
|
|
|
3744
3780
|
}
|
|
3745
3781
|
const superSelectionAppService = new SuperSelectionAppService();
|
|
3746
3782
|
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
? 'True'
|
|
3753
|
-
: 'False';
|
|
3754
|
-
}
|
|
3755
|
-
return {
|
|
3756
|
-
isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
|
|
3757
|
-
superCampaignEnabled: superCampaignEnabled
|
|
3758
|
-
};
|
|
3783
|
+
class NavigationService {
|
|
3784
|
+
navigateInternally(history, route) {
|
|
3785
|
+
const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
|
|
3786
|
+
iframe.navigation(path);
|
|
3787
|
+
history.push(path);
|
|
3759
3788
|
}
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3789
|
+
navigateInternallyToStandardChoice(options) {
|
|
3790
|
+
state.handleSubmitFn = options.handleSubmitFn;
|
|
3791
|
+
state.fundName = options.fundName;
|
|
3792
|
+
state.fundDetails = options.fundDetails;
|
|
3793
|
+
state.promotedFundId = options.promotedFundId;
|
|
3794
|
+
this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
|
|
3766
3795
|
}
|
|
3767
|
-
|
|
3768
|
-
const
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
static get Instance() {
|
|
3772
|
-
return this.instance || (this.instance = new this());
|
|
3796
|
+
toExternalUrl(url) {
|
|
3797
|
+
const externalUrl = new URL(url);
|
|
3798
|
+
externalUrl.searchParams.append('_extnav', 'true');
|
|
3799
|
+
return externalUrl.href;
|
|
3773
3800
|
}
|
|
3774
|
-
|
|
3775
|
-
|
|
3801
|
+
get appBaseUrl() {
|
|
3802
|
+
const baseUrl = superSelectionAppService.appBaseUrl;
|
|
3803
|
+
return baseUrl.replace(/\/$/, '');
|
|
3804
|
+
}
|
|
3805
|
+
toRouteWithLeadingSlash(route) {
|
|
3806
|
+
return route.length > 0 && route[0] === '/' ? route : `/${route}`;
|
|
3776
3807
|
}
|
|
3777
3808
|
}
|
|
3778
|
-
|
|
3779
|
-
class EventTrackingService {
|
|
3780
|
-
constructor() {
|
|
3781
|
-
this.eventTrackingApi = EventTrackingApi.Instance;
|
|
3782
|
-
}
|
|
3783
|
-
static get Instance() {
|
|
3784
|
-
return this.instance || (this.instance = new this());
|
|
3785
|
-
}
|
|
3786
|
-
async TrackSuperFundPdsViewedAsync(detail) {
|
|
3787
|
-
return this.trackEventAsync({
|
|
3788
|
-
SuperFundPdsViewed: detail
|
|
3789
|
-
});
|
|
3790
|
-
}
|
|
3791
|
-
async TrackPromotedSuperFundDetailViewedAsync(detail) {
|
|
3792
|
-
return this.trackEventAsync({
|
|
3793
|
-
SuperFundDetailViewed: {
|
|
3794
|
-
PromotedFund: detail
|
|
3795
|
-
}
|
|
3796
|
-
});
|
|
3797
|
-
}
|
|
3798
|
-
async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
|
|
3799
|
-
return this.trackEventAsync({
|
|
3800
|
-
SuperFundDetailViewed: {
|
|
3801
|
-
PromotedDefaultFund: detail
|
|
3802
|
-
}
|
|
3803
|
-
});
|
|
3804
|
-
}
|
|
3805
|
-
async TrackMyOwnSuperFundDetailViewedAsync(detail) {
|
|
3806
|
-
return this.trackEventAsync({
|
|
3807
|
-
SuperFundDetailViewed: {
|
|
3808
|
-
MyOwnFund: detail
|
|
3809
|
-
}
|
|
3810
|
-
});
|
|
3811
|
-
}
|
|
3812
|
-
async TrackSmsfSuperFundDetailViewedAsync(detail) {
|
|
3813
|
-
return this.trackEventAsync({
|
|
3814
|
-
SuperFundDetailViewed: {
|
|
3815
|
-
Smsf: detail
|
|
3816
|
-
}
|
|
3817
|
-
});
|
|
3818
|
-
}
|
|
3819
|
-
async TrackDefaultSuperFundDetailViewedAsync(detail) {
|
|
3820
|
-
return this.trackEventAsync({
|
|
3821
|
-
SuperFundDetailViewed: {
|
|
3822
|
-
DefaultFund: detail
|
|
3823
|
-
}
|
|
3824
|
-
});
|
|
3825
|
-
}
|
|
3826
|
-
async TrackSuperFundNominationViewedAsync(detail) {
|
|
3827
|
-
return this.trackEventAsync({
|
|
3828
|
-
SuperFundNominationViewed: detail
|
|
3829
|
-
});
|
|
3830
|
-
}
|
|
3831
|
-
async TrackSuperFundNominationDeclinedAsync(detail) {
|
|
3832
|
-
return this.trackEventAsync({
|
|
3833
|
-
SuperFundNominationDeclined: detail
|
|
3834
|
-
});
|
|
3835
|
-
}
|
|
3836
|
-
async TrackSuperFundDisclaimerViewedAsync(detail) {
|
|
3837
|
-
return this.trackEventAsync({
|
|
3838
|
-
SuperFundDisclaimerViewed: detail
|
|
3839
|
-
});
|
|
3840
|
-
}
|
|
3841
|
-
async TrackSuperFundDisclaimerAcceptedAsync(detail) {
|
|
3842
|
-
return this.trackEventAsync({
|
|
3843
|
-
SuperFundDisclaimerAccepted: detail
|
|
3844
|
-
});
|
|
3845
|
-
}
|
|
3846
|
-
async TrackSuperFundPrefillViewedAsync(detail) {
|
|
3847
|
-
return this.trackEventAsync({
|
|
3848
|
-
SuperFundPrefillViewed: detail
|
|
3849
|
-
});
|
|
3850
|
-
}
|
|
3851
|
-
async TrackSuperFundPrefillDeclinedAsync(detail) {
|
|
3852
|
-
return this.trackEventAsync({
|
|
3853
|
-
SuperFundPrefillDeclined: detail
|
|
3854
|
-
});
|
|
3855
|
-
}
|
|
3856
|
-
async TrackSuperFundDetailChangeRequestedAsync(detail) {
|
|
3857
|
-
return this.trackEventAsync({
|
|
3858
|
-
SuperFundDetailChangeRequested: detail
|
|
3859
|
-
});
|
|
3860
|
-
}
|
|
3861
|
-
async TrackSuperCampaignActivationSucceededAsync(detail) {
|
|
3862
|
-
return this.trackEventAsync({
|
|
3863
|
-
SuperCampaignActivationSucceeded: detail
|
|
3864
|
-
});
|
|
3865
|
-
}
|
|
3866
|
-
async trackEventAsync(event) {
|
|
3867
|
-
try {
|
|
3868
|
-
await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
|
|
3869
|
-
}
|
|
3870
|
-
catch (_a) {
|
|
3871
|
-
return;
|
|
3872
|
-
}
|
|
3873
|
-
}
|
|
3874
|
-
}
|
|
3875
|
-
|
|
3876
|
-
function appReady() {
|
|
3877
|
-
postMessage({
|
|
3878
|
-
type: 'appReady'
|
|
3879
|
-
});
|
|
3880
|
-
}
|
|
3881
|
-
function postMessage(message, origin) {
|
|
3882
|
-
if (origin === undefined)
|
|
3883
|
-
origin = '*';
|
|
3884
|
-
message.sender = 'flare';
|
|
3885
|
-
window.parent.postMessage(message, origin);
|
|
3886
|
-
}
|
|
3887
|
-
function resize(height, width) {
|
|
3888
|
-
postMessage({
|
|
3889
|
-
type: 'contentResized',
|
|
3890
|
-
height,
|
|
3891
|
-
width
|
|
3892
|
-
});
|
|
3893
|
-
}
|
|
3894
|
-
function navigation(url) {
|
|
3895
|
-
postMessage({
|
|
3896
|
-
type: 'pageNavigated',
|
|
3897
|
-
url
|
|
3898
|
-
});
|
|
3899
|
-
}
|
|
3900
|
-
function complete() {
|
|
3901
|
-
postMessage({ type: 'complete' });
|
|
3902
|
-
}
|
|
3903
|
-
function submitSuccess() {
|
|
3904
|
-
postMessage({
|
|
3905
|
-
type: 'submitSuccess'
|
|
3906
|
-
});
|
|
3907
|
-
}
|
|
3908
|
-
const iframe = { appReady, resize, navigation, complete, submitSuccess };
|
|
3909
|
-
|
|
3910
|
-
const initial$1 = {
|
|
3911
|
-
handleSubmitFn: async function () {
|
|
3912
|
-
return;
|
|
3913
|
-
},
|
|
3914
|
-
fundName: '',
|
|
3915
|
-
fundDetails: { type: 'null' },
|
|
3916
|
-
promotedFundId: undefined
|
|
3917
|
-
};
|
|
3918
|
-
const { state: state$1 } = createStore(initial$1);
|
|
3919
|
-
|
|
3920
|
-
var SuperSelectionAppRoutes;
|
|
3921
|
-
(function (SuperSelectionAppRoutes) {
|
|
3922
|
-
SuperSelectionAppRoutes["ConsentPage"] = "/consent";
|
|
3923
|
-
SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
|
|
3924
|
-
SuperSelectionAppRoutes["SuperCampaign"] = "/super-campaign";
|
|
3925
|
-
SuperSelectionAppRoutes["ChoicePage"] = "/";
|
|
3926
|
-
SuperSelectionAppRoutes["SlateJoin"] = "/slate/join/";
|
|
3927
|
-
SuperSelectionAppRoutes["PromotedFundJoinV1"] = "/promoted-fund/join/v1";
|
|
3928
|
-
SuperSelectionAppRoutes["PromotedFundJoinV2"] = "/promoted-fund/join/v2";
|
|
3929
|
-
SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
|
|
3930
|
-
SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
|
|
3931
|
-
SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
|
|
3932
|
-
SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
|
|
3933
|
-
SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
|
|
3934
|
-
SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
|
|
3935
|
-
SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
|
|
3936
|
-
SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
|
|
3937
|
-
SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
|
|
3938
|
-
SuperSelectionAppRoutes["Success"] = "/success/";
|
|
3939
|
-
})(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
|
|
3940
|
-
const superSelectionAppStencilRoutes = [
|
|
3941
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.ConsentPage, component: "sss-consent-page-wrapper" }),
|
|
3942
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
|
|
3943
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
|
|
3944
|
-
h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-super-choice-page-wrapper" }),
|
|
3945
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.SlateJoin, component: "sss-slate-join-page" }),
|
|
3946
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV1, component: "sss-promoted-fund-join-v1-page" }),
|
|
3947
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV2, component: "sss-promoted-fund-join-v2-page" }),
|
|
3948
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
|
|
3949
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
|
|
3950
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
|
|
3951
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
|
|
3952
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
|
|
3953
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
|
|
3954
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
|
|
3955
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
|
|
3956
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
|
|
3957
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
|
|
3958
|
-
];
|
|
3959
|
-
|
|
3960
|
-
class NavigationService {
|
|
3961
|
-
navigateInternally(history, route) {
|
|
3962
|
-
const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
|
|
3963
|
-
iframe.navigation(path);
|
|
3964
|
-
history.push(path);
|
|
3965
|
-
}
|
|
3966
|
-
navigateInternallyToStandardChoice(options) {
|
|
3967
|
-
state$1.handleSubmitFn = options.handleSubmitFn;
|
|
3968
|
-
state$1.fundName = options.fundName;
|
|
3969
|
-
state$1.fundDetails = options.fundDetails;
|
|
3970
|
-
state$1.promotedFundId = options.promotedFundId;
|
|
3971
|
-
this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
|
|
3972
|
-
}
|
|
3973
|
-
toExternalUrl(url) {
|
|
3974
|
-
const externalUrl = new URL(url);
|
|
3975
|
-
externalUrl.searchParams.append('_extnav', 'true');
|
|
3976
|
-
return externalUrl.href;
|
|
3977
|
-
}
|
|
3978
|
-
get appBaseUrl() {
|
|
3979
|
-
const baseUrl = superSelectionAppService.appBaseUrl;
|
|
3980
|
-
return baseUrl.replace(/\/$/, '');
|
|
3981
|
-
}
|
|
3982
|
-
toRouteWithLeadingSlash(route) {
|
|
3983
|
-
return route.length > 0 && route[0] === '/' ? route : `/${route}`;
|
|
3984
|
-
}
|
|
3985
|
-
}
|
|
3986
|
-
const navigationService = new NavigationService();
|
|
3987
|
-
|
|
3988
|
-
const Link = (props, children) => {
|
|
3989
|
-
return (h("a", { class: props.className || 'font-medium underline underline-offset-2 hover:text-gray-600', target: "_blank", href: navigationService.toExternalUrl(props.href), onClick: props.onClick }, children));
|
|
3990
|
-
};
|
|
3991
|
-
const PoweredByFlareFS = 'Powered by Flare FS';
|
|
3992
|
-
function pdsViewedAsync(name, usi) {
|
|
3993
|
-
return EventTrackingService.Instance.TrackSuperFundPdsViewedAsync({
|
|
3994
|
-
fundUsi: usi,
|
|
3995
|
-
fundName: name,
|
|
3996
|
-
pageName: 'Panel Fund Page',
|
|
3997
|
-
superCampaignEnabled: false
|
|
3998
|
-
});
|
|
3999
|
-
}
|
|
4000
|
-
|
|
4001
|
-
const Consent = class {
|
|
4002
|
-
constructor(hostRef) {
|
|
4003
|
-
registerInstance(this, hostRef);
|
|
4004
|
-
this.campaignConnectRequestInProgress = false;
|
|
4005
|
-
this.eventTrackingService = EventTrackingService.Instance;
|
|
4006
|
-
}
|
|
4007
|
-
componentDidLoad() {
|
|
4008
|
-
return this.eventTrackingService.TrackSuperFundDisclaimerViewedAsync(SuperFundDisclaimerViewedDetail.create(false));
|
|
4009
|
-
}
|
|
4010
|
-
render() {
|
|
4011
|
-
if (this.campaignConnectRequestInProgress) {
|
|
4012
|
-
return h("sss-loading-super-indicator", null);
|
|
4013
|
-
}
|
|
4014
|
-
return (h("div", null, h("div", { class: "text-2xl sm:text-3xl font-bold text-center leading-8" }, "Important information about super"), h("div", { class: "sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7 sm:leading-8" }, "The choice of superannuation fund is an important personal financial decision. Next, you\u2019ll be asked to nominate a super fund to receive your employer contributions."), h("div", { class: "flex justify-center mt-8 sm:mt-12" }, h("div", { class: "border shadow-sm p-4 pb-6 sm:p-6 sm:pb-8 max-w-560 rounded-lg" }, h("div", { class: "sm:text-lg font-bold leading-6" }, "By clicking \u201CContinue\u201D you acknowledge that:"), h("ul", { class: "list-disc list-outside ml-6 mt-3 mb-6 space-y-2 text-sm leading-6" }, h("li", null, "Flare (we/us) provides this paperless employee management service, will feature superannuation funds and offer you employee benefits that you may be interested in;"), h("li", null, "all content contained in the following pages does not take into account any of your objectives, financial situation or needs and does not constitute financial product advice;"), h("li", null, "in featuring any superannuation funds, we, the technology partner you are accessing us via, or your employer, are not providing any opinion or recommendation (actual or implied) in relation to the suitability or appropriateness of the featured funds;"), h("li", null, "Trustees of the featured superannuation funds pay fees to Flare and/or its associates. Some funds pay us a fee if you choose one of the featured funds, while others pay us to have their application form on our platform;"), h("li", null, "in the event that you choose one of the featured superannuation funds, we may pass on your personal information and TFN to a related party for the purpose of completing your chosen fund's application form."), h("li", null, "Your personal data that is provided to us will be subject to our", ' ', h(Link, { className: "font-medium text-blue-600 hover:text-blue-800", href: "https://www.flarehr.com/privacy-policy" }, "Privacy Policy"), ".")), h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSuperFundDisclaimerAccepted() }, "Continue")))));
|
|
4015
|
-
}
|
|
4016
|
-
async handleSuperFundDisclaimerAccepted() {
|
|
4017
|
-
await this.eventTrackingService.TrackSuperFundDisclaimerAcceptedAsync({
|
|
4018
|
-
superCampaignEnabled: false
|
|
4019
|
-
});
|
|
4020
|
-
if (superSelectionAppService.campaignConnectEnabled) {
|
|
4021
|
-
this.campaignConnectRequestInProgress = true;
|
|
4022
|
-
await superSelectionAppService.loadCampaignConnectAsync();
|
|
4023
|
-
if (superSelectionAppService.isDefinedBenefitsEligible &&
|
|
4024
|
-
Option.isSome(superSelectionAppService.definedBenefitsFundId)) {
|
|
4025
|
-
state.fund = {
|
|
4026
|
-
id: superSelectionAppService.definedBenefitsFundId.value,
|
|
4027
|
-
type: 'DefinedBenefits'
|
|
4028
|
-
};
|
|
4029
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PromotedFundJoinV2);
|
|
4030
|
-
return;
|
|
4031
|
-
}
|
|
4032
|
-
}
|
|
4033
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
4034
|
-
}
|
|
4035
|
-
};
|
|
4036
|
-
injectHistory(Consent);
|
|
4037
|
-
|
|
4038
|
-
const ConsentWrapper = class {
|
|
4039
|
-
constructor(hostRef) {
|
|
4040
|
-
registerInstance(this, hostRef);
|
|
4041
|
-
}
|
|
4042
|
-
render() {
|
|
4043
|
-
return superSelectionAppService.state.superCampaignEnabled ? (h("sss-super-campaign-host", null)) : (h("sss-consent-page", null));
|
|
4044
|
-
}
|
|
4045
|
-
};
|
|
4046
|
-
injectHistory(ConsentWrapper);
|
|
3809
|
+
const navigationService = new NavigationService();
|
|
4047
3810
|
|
|
4048
3811
|
var CustomFundTypes;
|
|
4049
3812
|
(function (CustomFundTypes) {
|
|
@@ -4092,9 +3855,9 @@ const initialStateCustomFund = {
|
|
|
4092
3855
|
}
|
|
4093
3856
|
]
|
|
4094
3857
|
};
|
|
4095
|
-
const { state: state$
|
|
3858
|
+
const { state: state$1, reset } = createStore(initialStateCustomFund);
|
|
4096
3859
|
|
|
4097
|
-
const customFundOptions = state$
|
|
3860
|
+
const customFundOptions = state$1.customFunds;
|
|
4098
3861
|
const CustomFund = class {
|
|
4099
3862
|
constructor(hostRef) {
|
|
4100
3863
|
registerInstance(this, hostRef);
|
|
@@ -4149,67 +3912,173 @@ class AustralianFundLookupService {
|
|
|
4149
3912
|
}
|
|
4150
3913
|
const australianFundLookupService = new AustralianFundLookupService();
|
|
4151
3914
|
|
|
4152
|
-
class
|
|
4153
|
-
|
|
4154
|
-
return
|
|
4155
|
-
.url('super-choice/default')
|
|
4156
|
-
.post(dto)
|
|
4157
|
-
.badRequest(() => {
|
|
4158
|
-
throw new Error('Failed to process default fund join request');
|
|
4159
|
-
})
|
|
4160
|
-
.text();
|
|
4161
|
-
}
|
|
4162
|
-
async submitCustomFundChoiceAsync(dto) {
|
|
4163
|
-
return buildBackendApiClient()
|
|
4164
|
-
.url('super-choice/custom-fund')
|
|
4165
|
-
.post(dto)
|
|
4166
|
-
.badRequest(() => {
|
|
4167
|
-
throw new Error('Failed to process custom fund join request');
|
|
4168
|
-
})
|
|
4169
|
-
.text();
|
|
4170
|
-
}
|
|
4171
|
-
async submitSelfManagedFundChoiceAsync(dto) {
|
|
4172
|
-
return buildBackendApiClient()
|
|
4173
|
-
.url('super-choice/smsf')
|
|
4174
|
-
.post(dto)
|
|
4175
|
-
.badRequest(() => {
|
|
4176
|
-
throw new Error('Failed to process SMSF choice request');
|
|
4177
|
-
})
|
|
4178
|
-
.text();
|
|
4179
|
-
}
|
|
4180
|
-
async submitDefinedBenefitsChoiceAsync(dto) {
|
|
4181
|
-
return buildBackendApiClient()
|
|
4182
|
-
.url('super-choice/defined-benefits')
|
|
4183
|
-
.post(dto)
|
|
4184
|
-
.badRequest(() => {
|
|
4185
|
-
throw new Error('Failed to process Defined Benefits choice request');
|
|
4186
|
-
})
|
|
4187
|
-
.text();
|
|
3915
|
+
class EventTrackingApi {
|
|
3916
|
+
static get Instance() {
|
|
3917
|
+
return this.instance || (this.instance = new this());
|
|
4188
3918
|
}
|
|
4189
|
-
async
|
|
4190
|
-
|
|
4191
|
-
.url(`super-choice/smsf/${abn}/validate`)
|
|
4192
|
-
.get()
|
|
4193
|
-
.badRequest(() => {
|
|
4194
|
-
throw new Error('Failed to verify that if the provided abn is used for regulated fund');
|
|
4195
|
-
})
|
|
4196
|
-
.json();
|
|
4197
|
-
return response.result;
|
|
3919
|
+
async PostAnalyticsEventAsync(event) {
|
|
3920
|
+
return buildBackendApiClient().url('analytics-events').post(event).res();
|
|
4198
3921
|
}
|
|
4199
3922
|
}
|
|
4200
|
-
const customFundChoiceApi = new CustomFundChoiceApi();
|
|
4201
3923
|
|
|
4202
|
-
|
|
4203
|
-
constructor(
|
|
4204
|
-
|
|
4205
|
-
this.defaultFundProductName = 'Loading fund...';
|
|
4206
|
-
this.eventTrackingService = EventTrackingService.Instance;
|
|
3924
|
+
class EventTrackingService {
|
|
3925
|
+
constructor() {
|
|
3926
|
+
this.eventTrackingApi = EventTrackingApi.Instance;
|
|
4207
3927
|
}
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
3928
|
+
static get Instance() {
|
|
3929
|
+
return this.instance || (this.instance = new this());
|
|
3930
|
+
}
|
|
3931
|
+
async TrackSuperFundPdsViewedAsync(detail) {
|
|
3932
|
+
return this.trackEventAsync({
|
|
3933
|
+
SuperFundPdsViewed: detail
|
|
3934
|
+
});
|
|
3935
|
+
}
|
|
3936
|
+
async TrackPromotedSuperFundDetailViewedAsync(detail) {
|
|
3937
|
+
return this.trackEventAsync({
|
|
3938
|
+
SuperFundDetailViewed: {
|
|
3939
|
+
PromotedFund: detail
|
|
3940
|
+
}
|
|
3941
|
+
});
|
|
3942
|
+
}
|
|
3943
|
+
async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
|
|
3944
|
+
return this.trackEventAsync({
|
|
3945
|
+
SuperFundDetailViewed: {
|
|
3946
|
+
PromotedDefaultFund: detail
|
|
3947
|
+
}
|
|
3948
|
+
});
|
|
3949
|
+
}
|
|
3950
|
+
async TrackMyOwnSuperFundDetailViewedAsync(detail) {
|
|
3951
|
+
return this.trackEventAsync({
|
|
3952
|
+
SuperFundDetailViewed: {
|
|
3953
|
+
MyOwnFund: detail
|
|
3954
|
+
}
|
|
3955
|
+
});
|
|
3956
|
+
}
|
|
3957
|
+
async TrackSmsfSuperFundDetailViewedAsync(detail) {
|
|
3958
|
+
return this.trackEventAsync({
|
|
3959
|
+
SuperFundDetailViewed: {
|
|
3960
|
+
Smsf: detail
|
|
3961
|
+
}
|
|
3962
|
+
});
|
|
3963
|
+
}
|
|
3964
|
+
async TrackDefaultSuperFundDetailViewedAsync(detail) {
|
|
3965
|
+
return this.trackEventAsync({
|
|
3966
|
+
SuperFundDetailViewed: {
|
|
3967
|
+
DefaultFund: detail
|
|
3968
|
+
}
|
|
3969
|
+
});
|
|
3970
|
+
}
|
|
3971
|
+
async TrackSuperFundNominationViewedAsync(detail) {
|
|
3972
|
+
return this.trackEventAsync({
|
|
3973
|
+
SuperFundNominationViewed: detail
|
|
3974
|
+
});
|
|
3975
|
+
}
|
|
3976
|
+
async TrackSuperFundNominationDeclinedAsync(detail) {
|
|
3977
|
+
return this.trackEventAsync({
|
|
3978
|
+
SuperFundNominationDeclined: detail
|
|
3979
|
+
});
|
|
3980
|
+
}
|
|
3981
|
+
async TrackSuperFundDisclaimerViewedAsync(detail) {
|
|
3982
|
+
return this.trackEventAsync({
|
|
3983
|
+
SuperFundDisclaimerViewed: detail
|
|
3984
|
+
});
|
|
3985
|
+
}
|
|
3986
|
+
async TrackSuperFundDisclaimerAcceptedAsync(detail) {
|
|
3987
|
+
return this.trackEventAsync({
|
|
3988
|
+
SuperFundDisclaimerAccepted: detail
|
|
3989
|
+
});
|
|
3990
|
+
}
|
|
3991
|
+
async TrackSuperFundPrefillViewedAsync(detail) {
|
|
3992
|
+
return this.trackEventAsync({
|
|
3993
|
+
SuperFundPrefillViewed: detail
|
|
3994
|
+
});
|
|
3995
|
+
}
|
|
3996
|
+
async TrackSuperFundPrefillDeclinedAsync(detail) {
|
|
3997
|
+
return this.trackEventAsync({
|
|
3998
|
+
SuperFundPrefillDeclined: detail
|
|
3999
|
+
});
|
|
4000
|
+
}
|
|
4001
|
+
async TrackSuperFundDetailChangeRequestedAsync(detail) {
|
|
4002
|
+
return this.trackEventAsync({
|
|
4003
|
+
SuperFundDetailChangeRequested: detail
|
|
4004
|
+
});
|
|
4005
|
+
}
|
|
4006
|
+
async TrackSuperCampaignActivationSucceededAsync(detail) {
|
|
4007
|
+
return this.trackEventAsync({
|
|
4008
|
+
SuperCampaignActivationSucceeded: detail
|
|
4009
|
+
});
|
|
4010
|
+
}
|
|
4011
|
+
async trackEventAsync(event) {
|
|
4012
|
+
try {
|
|
4013
|
+
await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
|
|
4014
|
+
}
|
|
4015
|
+
catch (_a) {
|
|
4016
|
+
return;
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4019
|
+
}
|
|
4020
|
+
|
|
4021
|
+
class CustomFundChoiceApi {
|
|
4022
|
+
async submitDefaultFundChoiceAsync(dto) {
|
|
4023
|
+
return buildBackendApiClient()
|
|
4024
|
+
.url('super-choice/default')
|
|
4025
|
+
.post(dto)
|
|
4026
|
+
.badRequest(() => {
|
|
4027
|
+
throw new Error('Failed to process default fund join request');
|
|
4028
|
+
})
|
|
4029
|
+
.text();
|
|
4030
|
+
}
|
|
4031
|
+
async submitCustomFundChoiceAsync(dto) {
|
|
4032
|
+
return buildBackendApiClient()
|
|
4033
|
+
.url('super-choice/custom-fund')
|
|
4034
|
+
.post(dto)
|
|
4035
|
+
.badRequest(() => {
|
|
4036
|
+
throw new Error('Failed to process custom fund join request');
|
|
4037
|
+
})
|
|
4038
|
+
.text();
|
|
4039
|
+
}
|
|
4040
|
+
async submitSelfManagedFundChoiceAsync(dto) {
|
|
4041
|
+
return buildBackendApiClient()
|
|
4042
|
+
.url('super-choice/smsf')
|
|
4043
|
+
.post(dto)
|
|
4044
|
+
.badRequest(() => {
|
|
4045
|
+
throw new Error('Failed to process SMSF choice request');
|
|
4046
|
+
})
|
|
4047
|
+
.text();
|
|
4048
|
+
}
|
|
4049
|
+
async submitDefinedBenefitsChoiceAsync(dto) {
|
|
4050
|
+
return buildBackendApiClient()
|
|
4051
|
+
.url('super-choice/defined-benefits')
|
|
4052
|
+
.post(dto)
|
|
4053
|
+
.badRequest(() => {
|
|
4054
|
+
throw new Error('Failed to process Defined Benefits choice request');
|
|
4055
|
+
})
|
|
4056
|
+
.text();
|
|
4057
|
+
}
|
|
4058
|
+
async validateAbnForSMSF(abn) {
|
|
4059
|
+
const response = await buildBackendApiClient()
|
|
4060
|
+
.url(`super-choice/smsf/${abn}/validate`)
|
|
4061
|
+
.get()
|
|
4062
|
+
.badRequest(() => {
|
|
4063
|
+
throw new Error('Failed to verify that if the provided abn is used for regulated fund');
|
|
4064
|
+
})
|
|
4065
|
+
.json();
|
|
4066
|
+
return response.result;
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
const customFundChoiceApi = new CustomFundChoiceApi();
|
|
4070
|
+
|
|
4071
|
+
const DefaultFund = class {
|
|
4072
|
+
constructor(hostRef) {
|
|
4073
|
+
registerInstance(this, hostRef);
|
|
4074
|
+
this.defaultFundProductName = 'Loading fund...';
|
|
4075
|
+
this.eventTrackingService = EventTrackingService.Instance;
|
|
4076
|
+
}
|
|
4077
|
+
async componentWillLoad() {
|
|
4078
|
+
const defaultFundUsi = superSelectionAppService.defaultFundUsi;
|
|
4079
|
+
if (Option.isNone(defaultFundUsi)) {
|
|
4080
|
+
return;
|
|
4081
|
+
}
|
|
4213
4082
|
this.isDefaultFundExists = true;
|
|
4214
4083
|
const defaultFundSearchResult = await australianFundLookupService.getFundAsync(defaultFundUsi.value, true);
|
|
4215
4084
|
if (Option.isNone(defaultFundSearchResult)) {
|
|
@@ -4418,466 +4287,6 @@ const SelectInputAsync = class {
|
|
|
4418
4287
|
};
|
|
4419
4288
|
SelectInputAsync.style = dropdownAsyncCss;
|
|
4420
4289
|
|
|
4421
|
-
const name = 'Active Super';
|
|
4422
|
-
const fund = {
|
|
4423
|
-
fundId: 'active',
|
|
4424
|
-
name,
|
|
4425
|
-
logo: 'logo-active.svg',
|
|
4426
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV1,
|
|
4427
|
-
features: [
|
|
4428
|
-
h("p", null, "Winner of Canstar's 2023 Outstanding Value \u2013 Superannuation Award considering investment performance, fees and product features*"),
|
|
4429
|
-
h("p", null, "Recognised as a leader in responsible investment"),
|
|
4430
|
-
h("p", null, "Calls answered in 20 seconds (average over 5 years)")
|
|
4431
|
-
],
|
|
4432
|
-
featureSubText: (h("span", null, "*Based on a comparison of the Active Super Accumulation Scheme held by those aged 20-69 years and balances between $30,000 and $1.5 million.")),
|
|
4433
|
-
disclaimer: (h("p", null,
|
|
4434
|
-
"Issued by LGSS Pty Limited as trustee for Local Government Super (Active Super ABN:28 901 371 321). Consider the PDS and TMD at",
|
|
4435
|
-
' ',
|
|
4436
|
-
h(Link, { onClick: () => pdsViewedAsync(name), href: "https://www.activesuper.com.au/pds" }, "activesuper.com.au"),
|
|
4437
|
-
' ',
|
|
4438
|
-
"before making a decision.")),
|
|
4439
|
-
footnoteTextOverride: Option.some(PoweredByFlareFS),
|
|
4440
|
-
dtoPropName: 'active'
|
|
4441
|
-
};
|
|
4442
|
-
|
|
4443
|
-
const name$1 = 'Australian Ethical';
|
|
4444
|
-
const pdsUrl = 'https://www.australianethical.com.au/super/pds-forms/';
|
|
4445
|
-
const fund$1 = {
|
|
4446
|
-
fundId: 'australian-ethical',
|
|
4447
|
-
name: name$1,
|
|
4448
|
-
logo: 'logo-aus-eth.svg',
|
|
4449
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4450
|
-
features: [
|
|
4451
|
-
h("p", null,
|
|
4452
|
-
"Fastest growing super fund in Australia",
|
|
4453
|
-
h("sup", { class: "text-tiny" }, "1")),
|
|
4454
|
-
h("p", null,
|
|
4455
|
-
"Nil investments in fossil fuel companies",
|
|
4456
|
-
h("sup", { class: "text-tiny" }, "2")),
|
|
4457
|
-
h("p", null, "Competitive returns")
|
|
4458
|
-
],
|
|
4459
|
-
featureSubText: (h("ol", { class: "list-decimal list-outside ml-3" },
|
|
4460
|
-
h("li", null, "Source: KPMG Super Insights Report 2022."),
|
|
4461
|
-
h("li", null, "All our options go through positive and negative ethical screening in accordance with the Australian Ethical Charter (in place since 1986)."))),
|
|
4462
|
-
disclaimer: (h("p", null,
|
|
4463
|
-
"Issued by Australian Ethical Superannuation Pty Ltd (ABN 43 079 259 733, RSE L0001441, AFSL 526055). Please consider the",
|
|
4464
|
-
' ',
|
|
4465
|
-
h(Link, { href: "https://www.australianethical.com.au/globalassets/pdf-files/forms--pds/superpension/important-information/ae-financial-services-guide_sec.pdf" }, "Financial Services Guide"),
|
|
4466
|
-
", the",
|
|
4467
|
-
' ',
|
|
4468
|
-
h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "Product Disclosure Statement"),
|
|
4469
|
-
' ',
|
|
4470
|
-
"and",
|
|
4471
|
-
' ',
|
|
4472
|
-
h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "Target Market Determination"),
|
|
4473
|
-
' ',
|
|
4474
|
-
"available on our",
|
|
4475
|
-
' ',
|
|
4476
|
-
h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "website"),
|
|
4477
|
-
".")),
|
|
4478
|
-
footnoteTextOverride: Option.none,
|
|
4479
|
-
dtoPropName: 'australianEthical'
|
|
4480
|
-
};
|
|
4481
|
-
|
|
4482
|
-
const name$2 = 'Australian Retirement Trust';
|
|
4483
|
-
const fund$2 = {
|
|
4484
|
-
fundId: 'australian-retirement-trust',
|
|
4485
|
-
name: name$2,
|
|
4486
|
-
logo: 'logo-art.svg',
|
|
4487
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV1,
|
|
4488
|
-
features: [
|
|
4489
|
-
h("p", null, "$200 billion in retirement savings"),
|
|
4490
|
-
h("p", null, "2+ million members"),
|
|
4491
|
-
h("p", null, "A focus on delivering strong, long\u2011term returns")
|
|
4492
|
-
],
|
|
4493
|
-
featureSubText: (h("span", null, "QSuper is now part of Australian Retirement Trust. If you have an existing QSuper account, you will continue to hold that account by selecting this option.")),
|
|
4494
|
-
disclaimer: (h("p", null,
|
|
4495
|
-
"You should consider the",
|
|
4496
|
-
' ',
|
|
4497
|
-
h(Link, { href: "https://www.australianretirementtrust.com.au/library/media/pdfs/pds/super-savings-product-disclosure-statement-and-membership-form.pdf", onClick: () => pdsViewedAsync(name$2) }, "Product Disclosure Statement"),
|
|
4498
|
-
' ',
|
|
4499
|
-
"and",
|
|
4500
|
-
' ',
|
|
4501
|
-
h(Link, { href: "https://www.australianretirementtrust.com.au/tmd" }, "Target Market Determination"),
|
|
4502
|
-
' ',
|
|
4503
|
-
"before deciding to invest in or apply to become a member of this fund.")),
|
|
4504
|
-
abnInfo: name$2,
|
|
4505
|
-
abn: '60 905 115 063',
|
|
4506
|
-
footnoteTextOverride: Option.none,
|
|
4507
|
-
dtoPropName: 'australianRetirementTrust'
|
|
4508
|
-
};
|
|
4509
|
-
|
|
4510
|
-
const name$3 = 'Aware Super';
|
|
4511
|
-
const fund$3 = {
|
|
4512
|
-
fundId: 'aware',
|
|
4513
|
-
name: name$3,
|
|
4514
|
-
logo: 'logo-aware.svg',
|
|
4515
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV1,
|
|
4516
|
-
features: [
|
|
4517
|
-
h("p", null, "Awarded Canstar\u2019s Outstanding Value Super^ in 2022 and 2023."),
|
|
4518
|
-
h("p", null,
|
|
4519
|
-
"Over 1 million",
|
|
4520
|
-
h("sup", { class: "text-tiny" }, "\u2021"),
|
|
4521
|
-
" Australians trust us with their super."),
|
|
4522
|
-
h("p", null, "Our super helpful app helps you stay in control of your super.")
|
|
4523
|
-
],
|
|
4524
|
-
featureSubText: (h("div", { class: "space-y-0.5" },
|
|
4525
|
-
h("p", null,
|
|
4526
|
-
"^ See ",
|
|
4527
|
-
h(Link, { href: "https://aware.com.au/awards" }, "aware.com.au/awards"),
|
|
4528
|
-
" for more information"),
|
|
4529
|
-
h("p", null,
|
|
4530
|
-
h("sup", { class: "text-tiny" }, "\u2021"),
|
|
4531
|
-
" Member numbers as of December 2023"))),
|
|
4532
|
-
disclaimer: (h("p", null,
|
|
4533
|
-
"You should consider the",
|
|
4534
|
-
' ',
|
|
4535
|
-
h(Link, { href: "https://aware.com.au/member/campaign/flare-documents?cid=par-aq-no-su-Flare-PDSTMD-Direct-ImpDocs-", onClick: () => pdsViewedAsync(name$3) }, "Product Disclosure Statement and Target Market Determination"),
|
|
4536
|
-
' ',
|
|
4537
|
-
"before deciding to invest in or apply to become a member of this fund.")),
|
|
4538
|
-
abnInfo: `Aware Super Pty Ltd`,
|
|
4539
|
-
abn: '53 226 460 365',
|
|
4540
|
-
footnoteTextOverride: Option.none,
|
|
4541
|
-
dtoPropName: 'aware'
|
|
4542
|
-
};
|
|
4543
|
-
|
|
4544
|
-
const name$4 = 'First Super';
|
|
4545
|
-
const fund$4 = {
|
|
4546
|
-
fundId: 'first-super',
|
|
4547
|
-
name: name$4,
|
|
4548
|
-
logo: 'logo-first.svg',
|
|
4549
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4550
|
-
features: [
|
|
4551
|
-
h("p", null, "Industry SuperFund that offers five investment options and default insurance"),
|
|
4552
|
-
h("p", null, "Strong long-term investment returns and superior customer service - members first"),
|
|
4553
|
-
h("p", null, "Established super fund \u2013 anyone can join including KiwiSaver members")
|
|
4554
|
-
],
|
|
4555
|
-
disclaimer: (h("div", null,
|
|
4556
|
-
h("p", null,
|
|
4557
|
-
"General advice only which has been prepared without taking into account your objectives, financial situation or needs. Consider whether the advice is appropriate for you and read the Product Disclosure Statement (PDS) before making any investment decisions. PDS and Target Market Determination are available at our",
|
|
4558
|
-
' ',
|
|
4559
|
-
h(Link, { onClick: () => pdsViewedAsync(name$4), href: "https://www.firstsuper.com.au/forms-tools/product-disclosure-statements/" }, "website"),
|
|
4560
|
-
". Past performance is not a reliable indicator of future performance."),
|
|
4561
|
-
h("br", null),
|
|
4562
|
-
h("p", null, "Issued by First Super Pty Ltd ABN 42 053 498 472, AFSL 223988 (Trustee) as Trustee of First Super ABN 56 286 625 181."))),
|
|
4563
|
-
footnoteTextOverride: Option.none,
|
|
4564
|
-
dtoPropName: 'firstSuper'
|
|
4565
|
-
};
|
|
4566
|
-
|
|
4567
|
-
const name$5 = 'HESTA';
|
|
4568
|
-
const fund$5 = {
|
|
4569
|
-
fundId: 'hesta-default',
|
|
4570
|
-
name: name$5,
|
|
4571
|
-
logo: 'logo-hesta.svg',
|
|
4572
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4573
|
-
features: [
|
|
4574
|
-
h("p", null, "A top-performing super fund* working for real-world impact"),
|
|
4575
|
-
h("p", null, "1+ million members"),
|
|
4576
|
-
h("p", null, "Expert help whenever you need it to help you face the future with confidence")
|
|
4577
|
-
],
|
|
4578
|
-
featureSubText: undefined,
|
|
4579
|
-
disclaimer: (h("div", { class: "space-y-2" },
|
|
4580
|
-
h("p", { class: "italic" },
|
|
4581
|
-
"* SuperRatings 10 Year Platinum Performance 2014-2024 (MySuper). Investment performance contributes to but is not the only factor in determining this product rating. Product ratings and awards are only one factor to be considered. See",
|
|
4582
|
-
' ',
|
|
4583
|
-
h(Link, { className: "underline underline-offset-2 hover:text-gray-600", href: "https://www.hesta.com.au/ratings" }, "hesta.com.au/ratings"),
|
|
4584
|
-
' ',
|
|
4585
|
-
"for more information."),
|
|
4586
|
-
h("p", null,
|
|
4587
|
-
"Consider whether this product is appropriate for you by reading the Product Disclosure Statement and Target Market Determination at",
|
|
4588
|
-
' ',
|
|
4589
|
-
h(Link, { onClick: () => pdsViewedAsync(name$5), href: "https://www.hesta.com.au/pds" }, "hesta.com.au/pds"),
|
|
4590
|
-
' ',
|
|
4591
|
-
"In considering your own circumstances about the suitability of HESTA products, you may wish to consult an adviser or use the ATO YourSuper comparison tool. Please also consider the relevant risks."),
|
|
4592
|
-
h("p", null, "Issued by H.E.S.T. Australia Ltd ABN 66 006 818 695 AFSL No. 235249, Trustee of HESTA"))),
|
|
4593
|
-
footnoteTextOverride: Option.none,
|
|
4594
|
-
isPromotedDefault: true
|
|
4595
|
-
};
|
|
4596
|
-
|
|
4597
|
-
const name$6 = 'Mercer MyChoice';
|
|
4598
|
-
const fund$6 = {
|
|
4599
|
-
fundId: 'mercermychoice',
|
|
4600
|
-
name: name$6,
|
|
4601
|
-
logo: 'logo-mercer-mychoice.svg',
|
|
4602
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4603
|
-
features: [
|
|
4604
|
-
h("p", null, "Save more super with our low fees"),
|
|
4605
|
-
h("p", null, "Take control with 6 MyChoice investment options"),
|
|
4606
|
-
h("p", null, "Join 850,000 Australians who trust our global expertise")
|
|
4607
|
-
],
|
|
4608
|
-
disclaimer: (h("div", null,
|
|
4609
|
-
h("p", null,
|
|
4610
|
-
"You should consider the",
|
|
4611
|
-
' ',
|
|
4612
|
-
h(Link, { href: "https://www.mercersuper.com.au/campaign-page/mercer-mychoice", onClick: () => pdsViewedAsync(name$6) }, "Product Disclosure Statement"),
|
|
4613
|
-
' ',
|
|
4614
|
-
"and",
|
|
4615
|
-
' ',
|
|
4616
|
-
h(Link, { href: "https://www.mercersuper.com.au/documents/target-market-determinations" }, "Target Market Determination"),
|
|
4617
|
-
' ',
|
|
4618
|
-
"before deciding to invest in or apply to become a member of the fund."),
|
|
4619
|
-
h("br", null),
|
|
4620
|
-
h("p", null, "Issued by Mercer Superannuation (Australia) Limited (\u2018Mercer Super\u2019) ABN: 79 004 717 533"))),
|
|
4621
|
-
footnoteTextOverride: Option.some(PoweredByFlareFS),
|
|
4622
|
-
dtoPropName: 'mercerMyChoice',
|
|
4623
|
-
extraBadge: (h("span", { class: "text-xs bg-green-100 text-green-800 font-medium rounded-xl py-0.5 px-2.5 mr-1" }, "Low fees"))
|
|
4624
|
-
};
|
|
4625
|
-
|
|
4626
|
-
const name$7 = 'REI Super';
|
|
4627
|
-
const fund$7 = {
|
|
4628
|
-
fundId: 'reisuper',
|
|
4629
|
-
name: name$7,
|
|
4630
|
-
logo: 'logo-rei.svg',
|
|
4631
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4632
|
-
features: [
|
|
4633
|
-
h("p", null, "Built by and for the real estate industry"),
|
|
4634
|
-
h("p", null, "Consistent long-term performance with competitive fees*"),
|
|
4635
|
-
h("p", null, "All profits to members, not shareholders")
|
|
4636
|
-
],
|
|
4637
|
-
disclaimer: (h("div", { class: "space-y-2" },
|
|
4638
|
-
h("p", null, "*Balanced Option net investment return of 9.45% for year ending 30 June 2023."),
|
|
4639
|
-
h("p", null,
|
|
4640
|
-
"You should consider the",
|
|
4641
|
-
' ',
|
|
4642
|
-
h(Link, { href: "https://www.reisuper.com.au/docs/default-source/super/rei-super-pds.pdf?utm_source=flarehr&utm_medium=banners&utm_campaign=flarehr_join&utm_term=pds", onClick: () => pdsViewedAsync(name$7) }, "Product Disclosure Statement"),
|
|
4643
|
-
' ',
|
|
4644
|
-
"and",
|
|
4645
|
-
' ',
|
|
4646
|
-
h(Link, { href: "https://www.reisuper.com.au/publications-and-forms/target-market-determination?utm_source=flarehr&utm_medium=banners&utm_campaign=flarehr_join&utm_term=tmd" }, "Target Market Determination"),
|
|
4647
|
-
' ',
|
|
4648
|
-
"before deciding to invest in or apply to become a member of the fund."))),
|
|
4649
|
-
abnInfo: `REI Superannuation Fund Pty Ltd`,
|
|
4650
|
-
abn: '68 056 044 770',
|
|
4651
|
-
footnoteTextOverride: Option.none,
|
|
4652
|
-
dtoPropName: 'reisuper'
|
|
4653
|
-
};
|
|
4654
|
-
|
|
4655
|
-
const name$8 = 'Slate Super';
|
|
4656
|
-
const slateUsi = '32367272075001';
|
|
4657
|
-
const fund$8 = {
|
|
4658
|
-
fundId: 'slate',
|
|
4659
|
-
name: name$8,
|
|
4660
|
-
logo: 'logo-slate.png',
|
|
4661
|
-
route: SuperSelectionAppRoutes.SlateJoin,
|
|
4662
|
-
features: [
|
|
4663
|
-
h("p", null, "A lifestage investment strategy that evolves with you"),
|
|
4664
|
-
h("p", null, "Advanced mobile app with retirement forecast and smart features"),
|
|
4665
|
-
h("p", null, "Member advocates at Slate to assist with your account")
|
|
4666
|
-
],
|
|
4667
|
-
disclaimer: (h("p", { class: "small text-muted" },
|
|
4668
|
-
"You should consider the",
|
|
4669
|
-
' ',
|
|
4670
|
-
h(Link, { href: "https://slate.co/pds/?utm_source=flare&utm_medium=superselection", onClick: () => pdsViewedAsync(name$8, slateUsi) }, "Product Disclosure Statement"),
|
|
4671
|
-
' ',
|
|
4672
|
-
"and",
|
|
4673
|
-
' ',
|
|
4674
|
-
h(Link, { href: "https://slate.co/forms-and-documents/target-market-determination/" }, "Target Market Determination"),
|
|
4675
|
-
' ',
|
|
4676
|
-
"before deciding to invest in or apply to become a member of the fund.")),
|
|
4677
|
-
abnInfo: `Diversa Trustees Limited`,
|
|
4678
|
-
abn: '49 006 421 638',
|
|
4679
|
-
footnoteTextOverride: Option.none,
|
|
4680
|
-
dtoPropName: 'slate'
|
|
4681
|
-
};
|
|
4682
|
-
|
|
4683
|
-
const name$9 = 'Spirit Super';
|
|
4684
|
-
const fund$9 = {
|
|
4685
|
-
fundId: 'spirit',
|
|
4686
|
-
name: name$9,
|
|
4687
|
-
logo: 'logo-spirit.svg',
|
|
4688
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4689
|
-
features: [
|
|
4690
|
-
h("p", null, "Proud Industry SuperFund - all profits go back to members"),
|
|
4691
|
-
h("p", null,
|
|
4692
|
-
"Best customer experience in super",
|
|
4693
|
-
h("sup", { class: "text-tiny" }, "1"),
|
|
4694
|
-
" and best for value",
|
|
4695
|
-
h("sup", { class: "text-tiny" }, "2")),
|
|
4696
|
-
h("p", null,
|
|
4697
|
-
"Low fees",
|
|
4698
|
-
h("sup", { class: "text-tiny" }, "3"),
|
|
4699
|
-
" with a focus on strong returns and investing with impact in communities",
|
|
4700
|
-
h("sup", { class: "text-tiny" }, "4"))
|
|
4701
|
-
],
|
|
4702
|
-
featureSubText: (h("div", { class: "m-4 pt-2" },
|
|
4703
|
-
h("ol", { class: "list-decimal space-y-2" },
|
|
4704
|
-
h("li", null,
|
|
4705
|
-
h("span", null, "CSBA SenseCX Benchmark 2021-22")),
|
|
4706
|
-
h("li", null,
|
|
4707
|
-
h("span", null, "Awarded Best for Value in the WeMoney Superannuation Awards 2022")),
|
|
4708
|
-
h("li", null,
|
|
4709
|
-
h("span", null, "Just $67.60 + 0.15% pa admin fees, capped at $517.60")),
|
|
4710
|
-
h("li", null,
|
|
4711
|
-
h("span", null, "Rainmaker ESG Leader Rating 2022"))))),
|
|
4712
|
-
disclaimer: (h("p", null,
|
|
4713
|
-
"Past performance isn\u2019t a reliable indicator of future performance. Consider the PDS and TMD at",
|
|
4714
|
-
' ',
|
|
4715
|
-
h(Link, { href: "https://www.spiritsuper.com.au/pds", onClick: () => pdsViewedAsync(name$9) }, "www.spiritsuper.com.au/pds"),
|
|
4716
|
-
' ',
|
|
4717
|
-
"before making a decision. Issuer is Motor Trades Association of Australia Superannuation Fund Pty Ltd (AFSL 238 718, ABN 14 008 650 628), the trustee of Spirit Super (ABN 74 559 365 913). Advice is provided by Quadrant First Pty Ltd (ABN 78 102 167 877, AFSL 284443).")),
|
|
4718
|
-
footnoteTextOverride: Option.none,
|
|
4719
|
-
dtoPropName: 'spirit'
|
|
4720
|
-
};
|
|
4721
|
-
|
|
4722
|
-
const name$a = 'Unisuper';
|
|
4723
|
-
const pdsUrl$1 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
|
|
4724
|
-
const tmdUrl = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
|
|
4725
|
-
const fund$a = {
|
|
4726
|
-
fundId: 'unisuper-default',
|
|
4727
|
-
name: name$a,
|
|
4728
|
-
logo: 'logo-unisuper.svg',
|
|
4729
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4730
|
-
features: [
|
|
4731
|
-
h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
|
|
4732
|
-
h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
|
|
4733
|
-
h("p", null,
|
|
4734
|
-
"Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
|
|
4735
|
-
h("sup", { class: "text-tiny" }, "#"))
|
|
4736
|
-
],
|
|
4737
|
-
disclaimer: (h("div", { class: "space-y-2" },
|
|
4738
|
-
h("p", null,
|
|
4739
|
-
"^Read more about our fees and how we compare",
|
|
4740
|
-
' ',
|
|
4741
|
-
h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
|
|
4742
|
-
"."),
|
|
4743
|
-
h("p", null,
|
|
4744
|
-
"*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
|
|
4745
|
-
' ',
|
|
4746
|
-
h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
|
|
4747
|
-
"."),
|
|
4748
|
-
h("p", null,
|
|
4749
|
-
h("sup", { class: "text-tiny" }, "#"),
|
|
4750
|
-
"See our awards",
|
|
4751
|
-
' ',
|
|
4752
|
-
h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
|
|
4753
|
-
"."),
|
|
4754
|
-
h("p", null,
|
|
4755
|
-
"Remember to consider the",
|
|
4756
|
-
' ',
|
|
4757
|
-
h(Link, { href: pdsUrl$1, onClick: () => pdsViewedAsync(name$a) }, "Product Disclosure Statement"),
|
|
4758
|
-
' ',
|
|
4759
|
-
"and ",
|
|
4760
|
-
h(Link, { href: tmdUrl }, "Target Market Determination"),
|
|
4761
|
-
" that is relevant to you."),
|
|
4762
|
-
h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
|
|
4763
|
-
footnoteTextOverride: Option.none,
|
|
4764
|
-
isPromotedDefault: true
|
|
4765
|
-
};
|
|
4766
|
-
|
|
4767
|
-
const name$b = 'Unisuper';
|
|
4768
|
-
const pdsUrl$2 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
|
|
4769
|
-
const tmdUrl$1 = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
|
|
4770
|
-
const fund$b = {
|
|
4771
|
-
fundId: 'unisuper-default-v2',
|
|
4772
|
-
name: name$b,
|
|
4773
|
-
logo: 'logo-unisuper.svg',
|
|
4774
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4775
|
-
features: [
|
|
4776
|
-
h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
|
|
4777
|
-
h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
|
|
4778
|
-
h("p", null,
|
|
4779
|
-
"Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
|
|
4780
|
-
h("sup", { class: "text-tiny" }, "#"))
|
|
4781
|
-
],
|
|
4782
|
-
customContent: (h("div", { class: "mt-6 flex gap-3" },
|
|
4783
|
-
h("div", null,
|
|
4784
|
-
h("img", { alt: name$b, src: getAssetPath(`assets/unisuper-default-badge1.svg`) })),
|
|
4785
|
-
h("div", null,
|
|
4786
|
-
h("img", { alt: name$b, src: getAssetPath(`assets/unisuper-default-badge2.svg`) })),
|
|
4787
|
-
h("div", null,
|
|
4788
|
-
h("img", { alt: name$b, src: getAssetPath(`assets/unisuper-default-badge3.svg`) })))),
|
|
4789
|
-
disclaimer: (h("div", { class: "space-y-2" },
|
|
4790
|
-
h("p", null,
|
|
4791
|
-
"^Read more about our fees and how we compare",
|
|
4792
|
-
' ',
|
|
4793
|
-
h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
|
|
4794
|
-
"."),
|
|
4795
|
-
h("p", null,
|
|
4796
|
-
"*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
|
|
4797
|
-
' ',
|
|
4798
|
-
h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
|
|
4799
|
-
"."),
|
|
4800
|
-
h("p", null,
|
|
4801
|
-
h("sup", { class: "text-tiny" }, "#"),
|
|
4802
|
-
"See our awards",
|
|
4803
|
-
' ',
|
|
4804
|
-
h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
|
|
4805
|
-
"."),
|
|
4806
|
-
h("p", null,
|
|
4807
|
-
"Remember to consider the",
|
|
4808
|
-
' ',
|
|
4809
|
-
h(Link, { href: pdsUrl$2, onClick: () => pdsViewedAsync(name$b) }, "Product Disclosure Statement"),
|
|
4810
|
-
' ',
|
|
4811
|
-
"and ",
|
|
4812
|
-
h(Link, { href: tmdUrl$1 }, "Target Market Determination"),
|
|
4813
|
-
" that is relevant to you."),
|
|
4814
|
-
h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
|
|
4815
|
-
footnoteTextOverride: Option.none,
|
|
4816
|
-
isPromotedDefault: true
|
|
4817
|
-
};
|
|
4818
|
-
|
|
4819
|
-
const name$c = 'Virgin Money Super';
|
|
4820
|
-
const fund$c = {
|
|
4821
|
-
fundId: 'virgin',
|
|
4822
|
-
name: name$c,
|
|
4823
|
-
logo: 'logo-virgin.svg',
|
|
4824
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4825
|
-
features: [
|
|
4826
|
-
h("p", null,
|
|
4827
|
-
"Returns above industry and retail super fund medians over the past 5 years",
|
|
4828
|
-
h("sup", { class: "text-tiny" }, "1")),
|
|
4829
|
-
h("p", null, "One of the lowest fees in the market"),
|
|
4830
|
-
h("p", null,
|
|
4831
|
-
"Virgin Money rewards you with Velocity Points on your contributions",
|
|
4832
|
-
h("sup", { class: "text-tiny" }, "2"))
|
|
4833
|
-
],
|
|
4834
|
-
featureSubText: (h("div", { class: "m-4 pt-2" },
|
|
4835
|
-
h("ol", { class: "list-decimal space-y-2" },
|
|
4836
|
-
h("li", null,
|
|
4837
|
-
h("span", null, "Past performance is not a reliable indicator of future performance. Source: SuperRatings Fund Crediting Rate Survey April 2022.")),
|
|
4838
|
-
h("li", null,
|
|
4839
|
-
h("span", null,
|
|
4840
|
-
h(Link, { className: "underline underline-offset-2 hover:text-gray-600", href: "https://virginmoney.com.au/superannuation/forms-and-key-information/key-documents" }, "Eligibility and T&Cs apply")))))),
|
|
4841
|
-
disclaimer: (h("p", null,
|
|
4842
|
-
"Prepared by Virgin Money Financial Services Pty Ltd ABN 51 113 285 395 AFSL 286869 (\u2018Virgin Money\u2019). Virgin Money Super is a plan in the Mercer Super Trust ABN 19 905 422 981. Virgin Money Super is issued by Mercer Superannuation (Australia) Limited (MSAL) ABN 79 004 717 533 AFSL 235906 as trustee of the Mercer Super Trust. Consider the PDS and TMD at",
|
|
4843
|
-
' ',
|
|
4844
|
-
h(Link, { href: "https://virginmoney.com.au/superannuation/", onClick: () => pdsViewedAsync(name$c) }, "www.virginmoney.com.au"),
|
|
4845
|
-
' ',
|
|
4846
|
-
"before making a decision")),
|
|
4847
|
-
footnoteTextOverride: Option.some(PoweredByFlareFS),
|
|
4848
|
-
dtoPropName: 'virgin',
|
|
4849
|
-
extraBadge: (h("span", { class: "text-xs bg-green-100 text-green-800 font-medium rounded-xl py-0.5 px-2.5 mr-1" }, "Low fees"))
|
|
4850
|
-
};
|
|
4851
|
-
|
|
4852
|
-
const fundsById = {
|
|
4853
|
-
[fund$8.fundId]: fund$8,
|
|
4854
|
-
[fund$2.fundId]: fund$2,
|
|
4855
|
-
[fund$3.fundId]: fund$3,
|
|
4856
|
-
[fund.fundId]: fund,
|
|
4857
|
-
[fund$1.fundId]: fund$1,
|
|
4858
|
-
[fund$c.fundId]: fund$c,
|
|
4859
|
-
[fund$9.fundId]: fund$9,
|
|
4860
|
-
[fund$4.fundId]: fund$4,
|
|
4861
|
-
[fund$6.fundId]: fund$6,
|
|
4862
|
-
[fund$5.fundId]: fund$5,
|
|
4863
|
-
[fund$a.fundId]: fund$a,
|
|
4864
|
-
[fund$b.fundId]: fund$b,
|
|
4865
|
-
[fund$7.fundId]: fund$7
|
|
4866
|
-
};
|
|
4867
|
-
const allPromotedFunds = Object.values(fundsById);
|
|
4868
|
-
const getFundByDtoPropName = (dtoPropName) => {
|
|
4869
|
-
const fund = allPromotedFunds.find((f) => f.dtoPropName == dtoPropName);
|
|
4870
|
-
return fund ? some(fund) : none;
|
|
4871
|
-
};
|
|
4872
|
-
const getFundByFundId = (fundId) => {
|
|
4873
|
-
const fund = allPromotedFunds.find((f) => f.fundId == fundId);
|
|
4874
|
-
return fund ? some(fund) : none;
|
|
4875
|
-
};
|
|
4876
|
-
const getFundNameByFundId = (fundId) => fundsById[fundId] != undefined ? some(fundsById[fundId].name) : none;
|
|
4877
|
-
const getFooterTextOverrideByFundId = (fundId) => { var _a, _b; return (_b = (_a = fundsById[fundId]) === null || _a === void 0 ? void 0 : _a.footnoteTextOverride) !== null && _b !== void 0 ? _b : none; };
|
|
4878
|
-
const getFundUsiByFundId = (fundId) => fundId == fund$8.fundId ? some(slateUsi) : none;
|
|
4879
|
-
const getLogoSrcByFundId = (fundId) => fundsById[fundId] != undefined ? some(getAssetPath(`assets/${fundsById[fundId].logo}`)) : none;
|
|
4880
|
-
|
|
4881
4290
|
class ExistingFundService {
|
|
4882
4291
|
async GetExistingFundAsync() {
|
|
4883
4292
|
var _a;
|
|
@@ -4892,24 +4301,13 @@ class ExistingFundService {
|
|
|
4892
4301
|
const memberNumber = getSuperChoiceMemberNumber(choiceDetails);
|
|
4893
4302
|
switch (choiceDetails.kind) {
|
|
4894
4303
|
case 'Promoted': {
|
|
4895
|
-
|
|
4896
|
-
? getFundByFundId(choiceDetails.promoted['generic'].fundId)
|
|
4897
|
-
: getFundByDtoPropName(Object.keys(choiceDetails.promoted)[0]);
|
|
4898
|
-
let fundName = '';
|
|
4899
|
-
if (isSome(fund)) {
|
|
4900
|
-
fundName = fund.value.name;
|
|
4901
|
-
}
|
|
4902
|
-
else if (isSome(usi)) {
|
|
4903
|
-
const fundLookup = await this.getFundByUsiAsync(usi.value);
|
|
4904
|
-
fundName = isSome(fundLookup) ? fundLookup.value.productName : usi.value;
|
|
4905
|
-
}
|
|
4906
|
-
else {
|
|
4304
|
+
if (isNone(usi))
|
|
4907
4305
|
return none;
|
|
4908
|
-
|
|
4306
|
+
const fund = await this.getFundByUsiAsync(usi.value);
|
|
4909
4307
|
return some({
|
|
4910
4308
|
type: 'Promoted Fund',
|
|
4911
4309
|
id: getPromotedFundId(choiceDetails.promoted),
|
|
4912
|
-
name:
|
|
4310
|
+
name: isSome(fund) ? fund.value.productName : usi.value,
|
|
4913
4311
|
usi: usi,
|
|
4914
4312
|
valid: 'Active',
|
|
4915
4313
|
memberNumber: memberNumber,
|
|
@@ -5043,14 +4441,12 @@ const ExistingChoice = class {
|
|
|
5043
4441
|
this.existingFund = chosenFundOption.value;
|
|
5044
4442
|
}
|
|
5045
4443
|
else {
|
|
5046
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
4444
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5047
4445
|
}
|
|
5048
4446
|
}
|
|
5049
4447
|
render() {
|
|
5050
|
-
const PromotedFundView = (
|
|
5051
|
-
|
|
5052
|
-
const fundName = getFundNameByFundId(props.id);
|
|
5053
|
-
return (h("div", { class: "flex justify-center" }, h("img", { class: "h-16 object-contain w-full max-w-140", alt: isSome(fundName) ? fundName.value : undefined, src: isSome(logo) ? logo.value : undefined })));
|
|
4448
|
+
const PromotedFundView = (_props) => {
|
|
4449
|
+
return (h("div", { class: "flex justify-center" }));
|
|
5054
4450
|
};
|
|
5055
4451
|
const MyOwnFundView = () => {
|
|
5056
4452
|
return (h("div", { class: "flex h-20 justify-center items-center relative" }, h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }), h("div", { class: "h-10 w-10 absolute" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", class: "fill-primary-base" }, h("path", { d: "M174.7 111.8C165.1 110.3 160.1 102.1 161.5 93.35C170.4 40.37 216.5 0 272 0C320.8 0 362.3 31.19 377.6 74.67C380.6 82.1 376.2 92.14 367.9 95.09C359.5 98.03 350.4 93.66 347.5 85.33C336.5 54.24 306.8 32 272 32C232.4 32 199.5 60.82 193.1 98.65C191.6 107.4 183.4 113.2 174.7 111.8V111.8zM400 264C400 250.7 410.7 240 424 240C437.3 240 448 250.7 448 264C448 277.3 437.3 288 424 288C410.7 288 400 277.3 400 264zM488.5 125.8L480 159.1C501.1 176.5 519.6 198.5 530.7 224H544C561.7 224 576 238.3 576 256V352C576 369.7 561.7 384 544 384H512C495.5 405.1 473.5 423.6 448 434.7V464C448 490.5 426.5 512 400 512H368C341.5 512 320 490.5 320 464V448H256V464C256 490.5 234.5 512 208 512H176C149.5 512 128 490.5 128 464V416C89.14 386.8 64 340.3 64 288C28.52 287.2 0 258.2 0 222.6C0 197.8 14 175.1 36.18 164L40.84 161.7C48.75 157.7 58.36 160.9 62.31 168.8C66.26 176.7 63.06 186.4 55.16 190.3L50.49 192.6C39.16 198.3 31.1 209.9 31.1 222.6C31.1 241 46.97 256 65.44 256H67.2C82.02 182.1 146.6 128 223.1 128H376.4C394 108.4 419.6 96 448 96H465.3C480.9 96 492.3 110.7 488.5 125.8H488.5zM224 160C153.3 160 96 217.3 96 288C96 329.9 116.1 367 147.2 390.4L160 400V464C160 472.8 167.2 480 176 480H208C216.8 480 224 472.8 224 464V416H352V464C352 472.8 359.2 480 368 480H400C408.8 480 416 472.8 416 464V413.7L435.2 405.4C455.6 396.5 473.2 382.4 486.4 364.8L496 352H544V256H509.7L501.4 236.8C492.5 216.4 478.4 198.8 460.8 185.6L443.8 172.8L455 128H448C429 128 412.1 136.2 400.3 149.3L390.7 160H224z" })))));
|
|
@@ -5071,7 +4467,7 @@ const ExistingChoice = class {
|
|
|
5071
4467
|
switch (this.existingFund.type) {
|
|
5072
4468
|
case 'Promoted Fund':
|
|
5073
4469
|
case 'Promoted Default Fund':
|
|
5074
|
-
return h(PromotedFundView, {
|
|
4470
|
+
return h(PromotedFundView, { name: this.existingFund.name });
|
|
5075
4471
|
case 'Self Managed Fund':
|
|
5076
4472
|
return h(SelfManagedFundView, null);
|
|
5077
4473
|
case 'My Own Fund':
|
|
@@ -5108,7 +4504,7 @@ const ExistingChoice = class {
|
|
|
5108
4504
|
async handleFundNominationDeclined() {
|
|
5109
4505
|
const detail = this.createSuperFundNominationDetail(this.existingFund);
|
|
5110
4506
|
await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(detail);
|
|
5111
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
4507
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5112
4508
|
}
|
|
5113
4509
|
};
|
|
5114
4510
|
|
|
@@ -5116,7 +4512,7 @@ const DefaultFooterText = 'Powered by Flare';
|
|
|
5116
4512
|
const FooterSection = class {
|
|
5117
4513
|
constructor(hostRef) {
|
|
5118
4514
|
registerInstance(this, hostRef);
|
|
5119
|
-
this.footerText = () =>
|
|
4515
|
+
this.footerText = () => this.textOverride !== undefined ? this.textOverride : DefaultFooterText;
|
|
5120
4516
|
}
|
|
5121
4517
|
render() {
|
|
5122
4518
|
return (h("div", { class: {
|
|
@@ -5152,27 +4548,6 @@ const HeaderSection = class {
|
|
|
5152
4548
|
}
|
|
5153
4549
|
};
|
|
5154
4550
|
|
|
5155
|
-
const IFrameHost = class {
|
|
5156
|
-
constructor(hostRef) {
|
|
5157
|
-
registerInstance(this, hostRef);
|
|
5158
|
-
}
|
|
5159
|
-
componentDidLoad() {
|
|
5160
|
-
this.build(this.iframeElement);
|
|
5161
|
-
}
|
|
5162
|
-
render() {
|
|
5163
|
-
return (h("div", { class: "w-screen" }, h("iframe", { width: "100%", height: window.innerHeight, style: { border: 'none' }, ref: (el) => (this.iframeElement = el) })));
|
|
5164
|
-
}
|
|
5165
|
-
};
|
|
5166
|
-
|
|
5167
|
-
const LoadingComponent = class {
|
|
5168
|
-
constructor(hostRef) {
|
|
5169
|
-
registerInstance(this, hostRef);
|
|
5170
|
-
}
|
|
5171
|
-
render() {
|
|
5172
|
-
return (h("div", { class: "w-full bg-white flex flex-col items-center" }, h("sss-loading-indicator", null), h("h5", { class: "mt-4 text-xl font-bold leading-7" }, this.header), h("slot", null)));
|
|
5173
|
-
}
|
|
5174
|
-
};
|
|
5175
|
-
|
|
5176
4551
|
const LoadingIndicator = class {
|
|
5177
4552
|
constructor(hostRef) {
|
|
5178
4553
|
registerInstance(this, hostRef);
|
|
@@ -5193,15 +4568,6 @@ const LoadingPage = class {
|
|
|
5193
4568
|
}
|
|
5194
4569
|
};
|
|
5195
4570
|
|
|
5196
|
-
const LoadingComponent$1 = class {
|
|
5197
|
-
constructor(hostRef) {
|
|
5198
|
-
registerInstance(this, hostRef);
|
|
5199
|
-
}
|
|
5200
|
-
render() {
|
|
5201
|
-
return (h("sss-loading-component", { header: "Loading Super" }, h("p", { class: "text-base text-gray-600 mt-4 max-w-560 text-center font-normal leading-7" }, "This can take up to 30 seconds.", h("br", null), "Please don\u2019t navigate away or refresh your browser.")));
|
|
5202
|
-
}
|
|
5203
|
-
};
|
|
5204
|
-
|
|
5205
4571
|
const MyOwnFund = class {
|
|
5206
4572
|
constructor(hostRef) {
|
|
5207
4573
|
registerInstance(this, hostRef);
|
|
@@ -5219,8 +4585,8 @@ const MyOwnFund = class {
|
|
|
5219
4585
|
const isSuperCampaignFallbackActivated = superSelectionAppService.isSuperCampaignFallbackActivated;
|
|
5220
4586
|
return (h(Host, null, h("sss-header-section", { currentPage: "own-fund" }), h("div", { class: "flex justify-center mt-11" }, h("sss-custom-fund", null, h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
|
|
5221
4587
|
'was-validated': this.formState === 'validated'
|
|
5222
|
-
}, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" }, h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"), h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })), h("div", { class: "ml-2" }, h("ul", { class: "list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5" }, h("li", null, "Make sure you are a current member of the fund before completing this step."), h("li", null, "Please check that the fund USI is correct as some funds have similar names."))))), h("sss-my-own-fund-inputs", { myOwnFundForm: state$
|
|
5223
|
-
state$
|
|
4588
|
+
}, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" }, h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"), h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })), h("div", { class: "ml-2" }, h("ul", { class: "list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5" }, h("li", null, "Make sure you are a current member of the fund before completing this step."), h("li", null, "Please check that the fund USI is correct as some funds have similar names."))))), h("sss-my-own-fund-inputs", { myOwnFundForm: state$1.myOwnFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
|
|
4589
|
+
state$1.myOwnFundForm = Object.assign(Object.assign({}, state$1.myOwnFundForm), event.detail);
|
|
5224
4590
|
this.isNotAllInformationProvidedMessageVisible = false;
|
|
5225
4591
|
} }), 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."))), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "sm:max-w-320 w-full" }, h("div", { class: "mb-4", onClick:
|
|
5226
4592
|
// user clicks on disabled button (div wrapper) then validation errors will show
|
|
@@ -5231,25 +4597,25 @@ const MyOwnFund = class {
|
|
|
5231
4597
|
if (!this.formElement.checkValidity()) {
|
|
5232
4598
|
return;
|
|
5233
4599
|
}
|
|
5234
|
-
const isAllInformationProvided = isSome(state$
|
|
5235
|
-
isSome(state$
|
|
5236
|
-
isSome(state$
|
|
5237
|
-
isSome(state$
|
|
4600
|
+
const isAllInformationProvided = isSome(state$1.myOwnFundForm.fundUsi) &&
|
|
4601
|
+
isSome(state$1.myOwnFundForm.memberNumber) &&
|
|
4602
|
+
isSome(state$1.myOwnFundForm.memberFirstName) &&
|
|
4603
|
+
isSome(state$1.myOwnFundForm.memberFamilyName);
|
|
5238
4604
|
if (!isAllInformationProvided) {
|
|
5239
4605
|
this.isNotAllInformationProvidedMessageVisible = true;
|
|
5240
4606
|
return;
|
|
5241
4607
|
}
|
|
5242
4608
|
navigationService.navigateInternallyToStandardChoice({
|
|
5243
4609
|
history: this.history,
|
|
5244
|
-
fundName: this.getOrError(state$
|
|
4610
|
+
fundName: this.getOrError(state$1.myOwnFundForm.fundName),
|
|
5245
4611
|
fundDetails: {
|
|
5246
4612
|
type: 'myOwnFund',
|
|
5247
|
-
fundName: this.getOrError(state$
|
|
5248
|
-
fundUsi: this.getOrError(state$
|
|
5249
|
-
memberNumber: this.getOrError(state$
|
|
4613
|
+
fundName: this.getOrError(state$1.myOwnFundForm.fundName),
|
|
4614
|
+
fundUsi: this.getOrError(state$1.myOwnFundForm.fundUsi),
|
|
4615
|
+
memberNumber: this.getOrError(state$1.myOwnFundForm.memberNumber)
|
|
5250
4616
|
},
|
|
5251
4617
|
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
5252
|
-
const customFundChoiceDto = Object.assign({ fundUsi: this.getOrError(state$
|
|
4618
|
+
const customFundChoiceDto = Object.assign({ fundUsi: this.getOrError(state$1.myOwnFundForm.fundUsi), memberNumber: this.getOrError(state$1.myOwnFundForm.memberNumber), memberFirstName: this.getOrError(state$1.myOwnFundForm.memberFirstName), memberFamilyName: this.getOrError(state$1.myOwnFundForm.memberFamilyName), standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
|
|
5253
4619
|
await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
|
|
5254
4620
|
}
|
|
5255
4621
|
});
|
|
@@ -5300,7 +4666,7 @@ const MyOwnFundInputs = class {
|
|
|
5300
4666
|
'shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md': true,
|
|
5301
4667
|
'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
|
|
5302
4668
|
.showValidationErrors
|
|
5303
|
-
}, required: true, pattern: "[A-Za-z0-9]{4,16}", name: "memberNumber", id: "memberNumber", value: toUndefined(state$
|
|
4669
|
+
}, required: true, pattern: "[A-Za-z0-9]{4,16}", name: "memberNumber", id: "memberNumber", value: toUndefined(state$1.myOwnFundForm.memberNumber), onChange: (ev) => this.updateMemberNumber(ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid member number (only numbers and / or letters)"))), h("div", { class: "flex space-x-4" }, h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: toUndefined(state$1.myOwnFundForm.memberFirstName), onChange: (ev) => this.updateMemberFirstName(ev.target.value.trim()) }))), h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: toUndefined(state$1.myOwnFundForm.memberFamilyName), onChange: (ev) => this.updateMemberFamilyName(ev.target.value.trim()) }))))));
|
|
5304
4670
|
}
|
|
5305
4671
|
updateFund(fund) {
|
|
5306
4672
|
this.formChanged.emit({ fundUsi: some(fund.value), fundName: some(fund.label) });
|
|
@@ -5402,7 +4768,7 @@ const Prefill = class {
|
|
|
5402
4768
|
return this.renderInvalidSMSF(this.prefill.data);
|
|
5403
4769
|
}
|
|
5404
4770
|
}
|
|
5405
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
4771
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5406
4772
|
return null;
|
|
5407
4773
|
}
|
|
5408
4774
|
renderMyOwnFund(data) {
|
|
@@ -5797,8 +5163,8 @@ const PrefillInvalidMyOwnFund = class {
|
|
|
5797
5163
|
}
|
|
5798
5164
|
else {
|
|
5799
5165
|
// If prefill does not exist, or is valid we should
|
|
5800
|
-
// not have landed on this page, navigate to
|
|
5801
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5166
|
+
// not have landed on this page, navigate to choice page
|
|
5167
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5802
5168
|
}
|
|
5803
5169
|
}
|
|
5804
5170
|
render() {
|
|
@@ -5809,7 +5175,7 @@ const PrefillInvalidMyOwnFund = class {
|
|
|
5809
5175
|
async handleChooseAnotherFund() {
|
|
5810
5176
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
5811
5177
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
5812
|
-
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5178
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5813
5179
|
}
|
|
5814
5180
|
};
|
|
5815
5181
|
|
|
@@ -5844,7 +5210,7 @@ const PrefillInvalidSMSF = class {
|
|
|
5844
5210
|
}
|
|
5845
5211
|
else {
|
|
5846
5212
|
// If prefill does not exist, or is valid we should
|
|
5847
|
-
// not have landed on this page, navigate to
|
|
5213
|
+
// not have landed on this page, navigate to PrefillInvalidMyOwnFundPage page
|
|
5848
5214
|
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
|
|
5849
5215
|
}
|
|
5850
5216
|
}
|
|
@@ -5872,7 +5238,7 @@ const PrefillInvalidSMSF = class {
|
|
|
5872
5238
|
async handleFundNominationDeclined() {
|
|
5873
5239
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
5874
5240
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
5875
|
-
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5241
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5876
5242
|
}
|
|
5877
5243
|
};
|
|
5878
5244
|
|
|
@@ -5912,8 +5278,8 @@ const PrefillMyOwnFund = class {
|
|
|
5912
5278
|
}
|
|
5913
5279
|
else {
|
|
5914
5280
|
// If prefill does not exist, or is invalid we should
|
|
5915
|
-
// not have landed on this page, navigate to
|
|
5916
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5281
|
+
// not have landed on this page, navigate to choice page
|
|
5282
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5917
5283
|
}
|
|
5918
5284
|
}
|
|
5919
5285
|
render() {
|
|
@@ -5994,7 +5360,7 @@ const PrefillMyOwnFund = class {
|
|
|
5994
5360
|
async handleFundNominationDeclined() {
|
|
5995
5361
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
5996
5362
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
5997
|
-
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5363
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5998
5364
|
}
|
|
5999
5365
|
};
|
|
6000
5366
|
|
|
@@ -6144,8 +5510,8 @@ const PrefillSMSF = class {
|
|
|
6144
5510
|
}
|
|
6145
5511
|
else {
|
|
6146
5512
|
// If prefill does not exist, or is invalid we should
|
|
6147
|
-
// not have landed on this page, navigate to
|
|
6148
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5513
|
+
// not have landed on this page, navigate to PrefillInvalidSMSFPage page
|
|
5514
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidSMSFPage);
|
|
6149
5515
|
}
|
|
6150
5516
|
}
|
|
6151
5517
|
render() {
|
|
@@ -6351,7 +5717,7 @@ const PrefillSMSF = class {
|
|
|
6351
5717
|
async handleFundNominationDeclined() {
|
|
6352
5718
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
6353
5719
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
6354
|
-
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5720
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
6355
5721
|
}
|
|
6356
5722
|
};
|
|
6357
5723
|
|
|
@@ -6367,178 +5733,341 @@ const PrefillWarningBox = class {
|
|
|
6367
5733
|
}
|
|
6368
5734
|
};
|
|
6369
5735
|
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
throw new Error('Failed to process Promoted Fund choice request');
|
|
6377
|
-
})
|
|
6378
|
-
.text();
|
|
6379
|
-
}
|
|
6380
|
-
async submitDefaultChoiceAsync(dto) {
|
|
6381
|
-
return buildBackendApiClient()
|
|
6382
|
-
.url('super-choice/promoted-fund/default')
|
|
6383
|
-
.post(dto)
|
|
6384
|
-
.badRequest(() => {
|
|
6385
|
-
throw new Error('Failed to process Promoted Default Fund choice request');
|
|
6386
|
-
})
|
|
6387
|
-
.text();
|
|
6388
|
-
}
|
|
6389
|
-
async submitDefaultChoiceWithJoinAsync(dto) {
|
|
6390
|
-
return buildBackendApiClient()
|
|
6391
|
-
.url('super-choice/promoted-fund/default-with-join')
|
|
6392
|
-
.post(dto)
|
|
6393
|
-
.badRequest(() => {
|
|
6394
|
-
throw new Error('Failed to process Promoted Default Fund With Join choice request');
|
|
6395
|
-
})
|
|
6396
|
-
.text();
|
|
5736
|
+
function validateAbn(abn) {
|
|
5737
|
+
const digitArray = abn.split('').map(Number);
|
|
5738
|
+
const isAllDigits = digitArray.every((d) => !isNaN(d));
|
|
5739
|
+
const weightingFactors = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
|
|
5740
|
+
if (!isAllDigits || digitArray.length !== weightingFactors.length) {
|
|
5741
|
+
return false;
|
|
6397
5742
|
}
|
|
5743
|
+
digitArray[0]--;
|
|
5744
|
+
const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
|
|
5745
|
+
return sum % 89 === 0;
|
|
6398
5746
|
}
|
|
6399
|
-
const promotedFundChoiceApi = new PromotedFundChoiceApi();
|
|
6400
5747
|
|
|
6401
|
-
class
|
|
6402
|
-
constructor() {
|
|
6403
|
-
this
|
|
6404
|
-
this.
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
fundName,
|
|
6436
|
-
fundDetails: {
|
|
6437
|
-
type: 'promoted',
|
|
6438
|
-
fundName,
|
|
6439
|
-
fundUsi: usi,
|
|
6440
|
-
memberNumber: data.memberNumber,
|
|
6441
|
-
promotedFundId
|
|
6442
|
-
},
|
|
6443
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: promotedFundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
|
|
6444
|
-
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig)),
|
|
6445
|
-
promotedFundId
|
|
6446
|
-
});
|
|
6447
|
-
break;
|
|
6448
|
-
}
|
|
6449
|
-
/* falls through */
|
|
6450
|
-
default:
|
|
6451
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
6452
|
-
break;
|
|
6453
|
-
}
|
|
6454
|
-
reset();
|
|
6455
|
-
return;
|
|
6456
|
-
}
|
|
6457
|
-
if (data.sender === 'promoted-fund-join') {
|
|
6458
|
-
switch (data.type) {
|
|
6459
|
-
case 'contentResized':
|
|
6460
|
-
iframe$1.height = data.height > 0 ? data.height : iframe$1.height;
|
|
6461
|
-
iframe$1.width = data.width > 0 ? data.width : iframe$1.width;
|
|
6462
|
-
break;
|
|
6463
|
-
case 'pageNavigated':
|
|
6464
|
-
window.scroll(iframe$1.offsetLeft, iframe$1.offsetTop);
|
|
6465
|
-
iframe.navigation(window.location.href);
|
|
6466
|
-
break;
|
|
5748
|
+
const SelfManagedFund = class {
|
|
5749
|
+
constructor(hostRef) {
|
|
5750
|
+
registerInstance(this, hostRef);
|
|
5751
|
+
this.isSubmitDisabled = true;
|
|
5752
|
+
this.isAbnValid = validateAbn(state$1.selfManagedFundForm.fundAbn);
|
|
5753
|
+
this.eventTrackingService = EventTrackingService.Instance;
|
|
5754
|
+
this.success = () => {
|
|
5755
|
+
navigationService.navigateInternallyToStandardChoice({
|
|
5756
|
+
history: this.history,
|
|
5757
|
+
fundName: 'Self-managed super fund',
|
|
5758
|
+
fundDetails: {
|
|
5759
|
+
type: 'smsf',
|
|
5760
|
+
fundName: state$1.selfManagedFundForm.fundName,
|
|
5761
|
+
fundEsa: state$1.selfManagedFundForm.fundEsa
|
|
5762
|
+
},
|
|
5763
|
+
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
5764
|
+
const requestDto = Object.assign({ smsfChoice: {
|
|
5765
|
+
abn: state$1.selfManagedFundForm.fundAbn,
|
|
5766
|
+
fundName: state$1.selfManagedFundForm.fundName,
|
|
5767
|
+
fundAddress: {
|
|
5768
|
+
addressLine1: state$1.selfManagedFundForm.addressLine1,
|
|
5769
|
+
addressLine2: state$1.selfManagedFundForm.addressLine2,
|
|
5770
|
+
city: state$1.selfManagedFundForm.city,
|
|
5771
|
+
state: state$1.selfManagedFundForm.state,
|
|
5772
|
+
postcode: state$1.selfManagedFundForm.postcode
|
|
5773
|
+
},
|
|
5774
|
+
bsb: state$1.selfManagedFundForm.bsb,
|
|
5775
|
+
bankAccountName: state$1.selfManagedFundForm.bankAccountName,
|
|
5776
|
+
bankAccountNumber: state$1.selfManagedFundForm.bankAccountNumber,
|
|
5777
|
+
electronicServiceAddress: state$1.selfManagedFundForm.fundEsa,
|
|
5778
|
+
memberFirstName: state$1.selfManagedFundForm.memberFirstName,
|
|
5779
|
+
memberFamilyName: state$1.selfManagedFundForm.memberFamilyName
|
|
5780
|
+
}, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
|
|
5781
|
+
await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
|
|
6467
5782
|
}
|
|
6468
|
-
}
|
|
5783
|
+
});
|
|
5784
|
+
};
|
|
5785
|
+
}
|
|
5786
|
+
componentDidLoad() {
|
|
5787
|
+
this.updateIsSubmitDisabled();
|
|
5788
|
+
return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
|
|
5789
|
+
promotedFundsShown: superSelectionAppService.promotedFunds,
|
|
5790
|
+
defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
|
|
5791
|
+
});
|
|
5792
|
+
}
|
|
5793
|
+
render() {
|
|
5794
|
+
return (h(Host, null, h("sss-header-section", { currentPage: "own-fund" }), h("div", { class: "flex justify-center mt-11" }, h("sss-custom-fund", null, h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
|
|
5795
|
+
'was-validated': this.formState === 'validated'
|
|
5796
|
+
}, ref: (el) => (this.formElement = el), onInput: (_) => this.updateIsSubmitDisabled() }, h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg max-w-560" }, h("p", { class: "sm:text-lg font-bold" }, "Fund details"), h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })), h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" }, "Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."))), h("sss-self-managed-fund-inputs", { fundForm: state$1.selfManagedFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
|
|
5797
|
+
state$1.selfManagedFundForm = Object.assign(Object.assign({}, state$1.selfManagedFundForm), event.detail);
|
|
5798
|
+
if (event.detail.isAbnValid !== undefined)
|
|
5799
|
+
this.isAbnValid = event.detail.isAbnValid;
|
|
5800
|
+
this.updateIsSubmitDisabled();
|
|
5801
|
+
} })), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "sm:max-w-320 w-full" }, h("div", { class: "mb-4", onClick:
|
|
5802
|
+
// user clicks on disabled button (div wrapper) then validation errors will show
|
|
5803
|
+
() => (this.formState = 'validated') }, h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")), h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage }, h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back")))))))));
|
|
5804
|
+
}
|
|
5805
|
+
updateIsSubmitDisabled() {
|
|
5806
|
+
this.isSubmitDisabled = !this.formElement.checkValidity() || !this.isAbnValid;
|
|
5807
|
+
}
|
|
5808
|
+
async handleSubmitForm() {
|
|
5809
|
+
this.formState = 'validated';
|
|
5810
|
+
if (this.formElement.checkValidity())
|
|
5811
|
+
this.success();
|
|
5812
|
+
}
|
|
5813
|
+
};
|
|
5814
|
+
injectHistory(SelfManagedFund);
|
|
5815
|
+
|
|
5816
|
+
var AbnValidationStatus;
|
|
5817
|
+
(function (AbnValidationStatus) {
|
|
5818
|
+
AbnValidationStatus[AbnValidationStatus["Invalid"] = 1] = "Invalid";
|
|
5819
|
+
AbnValidationStatus[AbnValidationStatus["AbnIsUsedForRegulatedFund"] = 2] = "AbnIsUsedForRegulatedFund";
|
|
5820
|
+
AbnValidationStatus[AbnValidationStatus["Valid"] = 3] = "Valid";
|
|
5821
|
+
})(AbnValidationStatus || (AbnValidationStatus = {}));
|
|
5822
|
+
const SelfManagedFundInputs = class {
|
|
5823
|
+
constructor(hostRef) {
|
|
5824
|
+
registerInstance(this, hostRef);
|
|
5825
|
+
this.formChanged = createEvent(this, "formChanged", 7);
|
|
5826
|
+
this.abnValidationStatus = AbnValidationStatus.Invalid;
|
|
5827
|
+
this.isAbnTouched = false;
|
|
5828
|
+
this.currentBank = none;
|
|
5829
|
+
this.addressErrorMessage = none;
|
|
5830
|
+
this.stateOptions = [
|
|
5831
|
+
{ value: 'NSW', label: 'NSW' },
|
|
5832
|
+
{ value: 'QLD', label: 'QLD' },
|
|
5833
|
+
{ value: 'ACT', label: 'ACT' },
|
|
5834
|
+
{ value: 'VIC', label: 'VIC' },
|
|
5835
|
+
{ value: 'TAS', label: 'TAS' },
|
|
5836
|
+
{ value: 'WA', label: 'WA' },
|
|
5837
|
+
{ value: 'SA', label: 'SA' },
|
|
5838
|
+
{ value: 'NT', label: 'NT' }
|
|
5839
|
+
];
|
|
5840
|
+
this.bsbRegex = new RegExp(/^[0-9]{3}[0-9]{3}$/);
|
|
5841
|
+
this.bankAccountNumberRegex = new RegExp(/^[0-9]{2,10}$/);
|
|
5842
|
+
}
|
|
5843
|
+
render() {
|
|
5844
|
+
const inputClass = {
|
|
5845
|
+
'relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md focus:z-10': true,
|
|
5846
|
+
'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
|
|
5847
|
+
.showValidationErrors
|
|
6469
5848
|
};
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
const
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
5849
|
+
return (h("div", null, h("div", null, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundName", id: "fundName", value: state$1.selfManagedFundForm.fundName, onChange: (ev) => this.updateFormField('fundName', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund name"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund ABN"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundAbn", id: "fundAbn", value: state$1.selfManagedFundForm.fundAbn, inputmode: "numeric", pattern: "[0-9]*", onKeyUp: async (ev) => {
|
|
5850
|
+
const abnInput = ev.target;
|
|
5851
|
+
this.updateFormField('fundAbn', abnInput.value.trim());
|
|
5852
|
+
this.abnValidationStatus = AbnValidationStatus.Invalid;
|
|
5853
|
+
if (validateAbn(abnInput.value)) {
|
|
5854
|
+
const isAbnUsedForRegulatedFund = await this.isAbnUsedForRegulatedAsync(abnInput.value);
|
|
5855
|
+
this.abnValidationStatus = isAbnUsedForRegulatedFund
|
|
5856
|
+
? AbnValidationStatus.AbnIsUsedForRegulatedFund
|
|
5857
|
+
: AbnValidationStatus.Valid;
|
|
5858
|
+
}
|
|
5859
|
+
// We need to set a custom validity message to trigger css invalid styles for non valid cases
|
|
5860
|
+
const validityMessage = this.abnValidationStatus === AbnValidationStatus.Valid
|
|
5861
|
+
? ''
|
|
5862
|
+
: 'Enter a valid fund ABN (digits only)';
|
|
5863
|
+
abnInput.setCustomValidity(validityMessage);
|
|
5864
|
+
this.updateFormField('isAbnValid', this.abnValidationStatus === AbnValidationStatus.Valid);
|
|
5865
|
+
}, onBlur: () => (this.isAbnTouched = true) }), this.renderAbnValidationError())), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Electronic service address alias (ESA)"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundEsa", id: "fundEsa", value: state$1.selfManagedFundForm.fundEsa, onChange: (ev) => this.updateFormField('fundEsa', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund ESA"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund address"), h("div", { class: "mt-1 rounded-md shadow-sm -space-y-px" }, h("input", { placeholder: "Address line 1", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-t-md shadow-none': true }), required: true, minlength: "2", name: "addressLine1", id: "addressLine1", value: state$1.selfManagedFundForm.addressLine1, onChange: (ev) => {
|
|
5866
|
+
this.updateFormField('addressLine1', ev.target.value.trim());
|
|
5867
|
+
this.updateAddressErrorMessage();
|
|
5868
|
+
}, ref: (el) => (this.addressLine1Element = el) }), h("input", { placeholder: "Address line 2 (optional)", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "addressLine2", id: "addressLine2", value: state$1.selfManagedFundForm.addressLine2, onChange: (ev) => this.updateFormField('addressLine2', ev.target.value.trim()) }), h("input", { placeholder: "City/suburb", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "city", required: true, id: "city", value: state$1.selfManagedFundForm.city, onChange: (ev) => {
|
|
5869
|
+
this.updateFormField('city', ev.target.value.trim());
|
|
5870
|
+
this.updateAddressErrorMessage();
|
|
5871
|
+
}, ref: (el) => (this.cityElement = el) }), h("div", { class: "flex -space-x-px" }, h("div", { class: "w-1/2 flex-1 min-w-0" }, h("input", { placeholder: "Postcode", type: "text", required: true, class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-bl-md shadow-none': true }), name: "postcode", minlength: "4", maxlength: "4", pattern: "[0-9]{4}", id: "postcode", value: state$1.selfManagedFundForm.postcode, inputmode: "numeric", onChange: (ev) => {
|
|
5872
|
+
this.updateFormField('postcode', ev.target.value.trim());
|
|
5873
|
+
this.updateAddressErrorMessage();
|
|
5874
|
+
}, ref: (el) => (this.postcodeElement = el) })), h("div", { class: "flex-1 min-w-0" }, h("select", { class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-br-md shadow-none': true, 'text-gray-500': this.fundForm.state !== undefined }), name: "state", required: true, id: "state", onChange: (ev) => {
|
|
5875
|
+
this.updateFormField('state', ev.target.value.trim());
|
|
5876
|
+
this.updateAddressErrorMessage();
|
|
5877
|
+
}, ref: (el) => (this.stateElement = el) }, h("option", { disabled: true, selected: this.fundForm.state !== undefined, value: "" }, "State"), this.stateOptions.map((s) => (h("option", { value: s.value, selected: this.fundForm.state === s.value }, s.label))))))), isSome(this.addressErrorMessage) && this.showValidationErrors && (h("div", { class: "mt-2 text-sm text-red-600" }, this.addressErrorMessage.value))), h("div", { class: "flex space-x-4" }, h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: state$1.selfManagedFundForm.memberFirstName, onChange: (ev) => this.updateFormField('memberFirstName', ev.target.value.trim()) }))), h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: state$1.selfManagedFundForm.memberFamilyName, onChange: (ev) => this.updateFormField('memberFamilyName', ev.target.value.trim()) })))), h("h3", { class: "text-lg font-bold mt-6" }, "Fund bank details"), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Account name"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bankAccountName", minlength: "2", id: "bankAccountName", value: state$1.selfManagedFundForm.bankAccountName, onChange: (ev) => this.updateFormField('bankAccountName', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account name"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "BSB"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bsb", id: "bsb", minlength: "6", maxlength: "7", inputmode: "numeric", onKeyUp: (ev) => this.updateCurrentBank(ev), pattern: this.bsbRegex.source, value: state$1.selfManagedFundForm.bsb }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid BSB"))), isSome(this.currentBank) && (h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Bank name"), h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm" }, this.currentBank.value))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Account number"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bankAccountNumber", id: "bankAccountNumber", minlength: "2", maxlength: "11", pattern: this.bankAccountNumberRegex.source, inputmode: "numeric", value: state$1.selfManagedFundForm.bankAccountNumber, onKeyUp: (ev) => this.updateCurrentBankAccountNumber(ev), onChange: (ev) => this.updateFormField('bankAccountNumber', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account number")))));
|
|
5878
|
+
}
|
|
5879
|
+
updateFormField(key, value) {
|
|
5880
|
+
this.formChanged.emit({ [key]: value });
|
|
5881
|
+
}
|
|
5882
|
+
async isAbnUsedForRegulatedAsync(abn) {
|
|
5883
|
+
return !(await customFundChoiceApi.validateAbnForSMSF(abn));
|
|
5884
|
+
}
|
|
5885
|
+
renderAbnValidationError() {
|
|
5886
|
+
if (this.isAbnTouched || this.showValidationErrors) {
|
|
5887
|
+
switch (this.abnValidationStatus) {
|
|
5888
|
+
case AbnValidationStatus.Invalid:
|
|
5889
|
+
return h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
|
|
5890
|
+
case AbnValidationStatus.AbnIsUsedForRegulatedFund:
|
|
5891
|
+
return (h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
|
|
5892
|
+
case AbnValidationStatus.Valid:
|
|
5893
|
+
return [];
|
|
6486
5894
|
}
|
|
6487
5895
|
}
|
|
6488
|
-
|
|
6489
|
-
iframeDoc.close();
|
|
6490
|
-
form.submit();
|
|
5896
|
+
return [];
|
|
6491
5897
|
}
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
const superBuyer = superSelectionAppService.superBuyer;
|
|
6495
|
-
return {
|
|
6496
|
-
title: superBuyer.userProfile.title,
|
|
6497
|
-
firstName: superBuyer.userProfile.firstName,
|
|
6498
|
-
middleName: superBuyer.userProfile.middleName,
|
|
6499
|
-
lastName: superBuyer.userProfile.lastName,
|
|
6500
|
-
dateOfBirth: superBuyer.userProfile.dateOfBirth,
|
|
6501
|
-
gender: superBuyer.userProfile.gender,
|
|
6502
|
-
email: superBuyer.userProfile.email,
|
|
6503
|
-
mobilePhone: superBuyer.userProfile.mobilePhone,
|
|
6504
|
-
taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
|
|
6505
|
-
addressLine1: superBuyer.userProfile.address.addressLine1,
|
|
6506
|
-
addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
|
|
6507
|
-
city: superBuyer.userProfile.address.city,
|
|
6508
|
-
state: superBuyer.userProfile.address.state,
|
|
6509
|
-
postCode: superBuyer.userProfile.address.postcode
|
|
6510
|
-
};
|
|
5898
|
+
filterDigits(str) {
|
|
5899
|
+
return str.replace(/[^0-9]/g, '');
|
|
6511
5900
|
}
|
|
6512
|
-
|
|
6513
|
-
const
|
|
5901
|
+
updateCurrentBank(ev) {
|
|
5902
|
+
const value = this.filterDigits(ev.target.value);
|
|
5903
|
+
const firstTwoNumbers = value.substring(0, 2);
|
|
5904
|
+
const firstThreeNumbers = value.substring(0, 3);
|
|
5905
|
+
const firstTwoNumberBankName = bsbNumbers[firstTwoNumbers];
|
|
5906
|
+
const firstThreeNumberBankName = bsbNumbers[firstThreeNumbers];
|
|
5907
|
+
if (firstTwoNumberBankName)
|
|
5908
|
+
this.currentBank = some(firstTwoNumberBankName);
|
|
5909
|
+
if (firstThreeNumberBankName)
|
|
5910
|
+
this.currentBank = some(firstThreeNumberBankName);
|
|
5911
|
+
if (value === '' || value.length > 6)
|
|
5912
|
+
this.currentBank = none;
|
|
5913
|
+
this.updateFormField('bsb', value);
|
|
5914
|
+
}
|
|
5915
|
+
updateCurrentBankAccountNumber(ev) {
|
|
5916
|
+
const value = this.filterDigits(ev.target.value);
|
|
5917
|
+
this.updateFormField('bankAccountNumber', value);
|
|
5918
|
+
}
|
|
5919
|
+
updateAddressErrorMessage() {
|
|
5920
|
+
let message = none;
|
|
5921
|
+
if (isNone(message) && !this.addressLine1Element.checkValidity()) {
|
|
5922
|
+
message = some('Enter a valid address line 1');
|
|
5923
|
+
}
|
|
5924
|
+
if (isNone(message) && !this.cityElement.checkValidity()) {
|
|
5925
|
+
message = some('Enter a valid city/suburb');
|
|
5926
|
+
}
|
|
5927
|
+
if (isNone(message) && !this.postcodeElement.checkValidity()) {
|
|
5928
|
+
message = some('Enter a valid post code');
|
|
5929
|
+
}
|
|
5930
|
+
if (isNone(message) && !this.stateElement.checkValidity()) {
|
|
5931
|
+
message = some('Select a state');
|
|
5932
|
+
}
|
|
5933
|
+
this.addressErrorMessage = message;
|
|
5934
|
+
}
|
|
5935
|
+
};
|
|
6514
5936
|
|
|
6515
|
-
const
|
|
5937
|
+
const StandardChoiceFormInputDefaultFund = class {
|
|
6516
5938
|
constructor(hostRef) {
|
|
6517
5939
|
registerInstance(this, hostRef);
|
|
5940
|
+
this.standardChoiceFormSignature = '';
|
|
5941
|
+
this.isSubmitDisabled = true;
|
|
5942
|
+
this.eventTrackingService = EventTrackingService.Instance;
|
|
5943
|
+
this.ignorePopState = () => window.history.pushState(null, '', null);
|
|
5944
|
+
}
|
|
5945
|
+
connectedCallback() {
|
|
5946
|
+
this.ignorePopState();
|
|
5947
|
+
window.addEventListener('popstate', this.ignorePopState);
|
|
5948
|
+
}
|
|
5949
|
+
disconnectedCallback() {
|
|
5950
|
+
window.removeEventListener('popstate', this.ignorePopState);
|
|
6518
5951
|
}
|
|
6519
5952
|
render() {
|
|
6520
|
-
return (h("
|
|
5953
|
+
return (h(Host, null, h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"), h("div", { class: "sm:text-lg text-gray-600 max-w-800 mt-4 text-center leading-7 sm:leading-8" }, "Your authorisation is required to complete your super choice by signing the standard choice form, which informs your employer of your choice of fund."), h("div", { class: "flex justify-center mt-8 sm:mt-12" }, h("div", { class: "max-w-560" }, h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" }, this.renderLogo(), h("div", { class: "flex justify-between w-full" }, h("div", null, h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"), h("div", { class: "text-sm mt-2" }, state.fundName)), h("div", { class: "grid content-center ml-4" }, h("sss-button", { testid: "change-fund-button", size: "xs", variant: "secondary", promiseFn: async () => {
|
|
5954
|
+
await this.trackChangeRequestedAsync();
|
|
5955
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5956
|
+
} }, "Change")))), h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" }, h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"), h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-information-circle.svg') })), h("div", { class: "ml-2" }, h("p", { class: "text-sm text-blue-800 leading-5" }, "Applying your full name in the text field below is the same as applying your written signature and is legally binding.")))), h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
|
|
5957
|
+
'mt-3': true,
|
|
5958
|
+
'was-validated': this.formState === 'validated'
|
|
5959
|
+
}, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, h("label", { class: "text-sm font-medium text-gray-700" }, "Type your full name"), h("input", { "data-testid": "standard-choice-form-signature-input", type: "text", autocomplete: "off", class: {
|
|
5960
|
+
'shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full text-base sm:text-sm border-gray-300 rounded-md mt-1': true,
|
|
5961
|
+
'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
|
|
5962
|
+
}, required: true, minlength: "2", name: "standardChoiceFormSignature", id: "standardChoiceFormSignature", value: this.standardChoiceFormSignature, onInput: (event) => (this.standardChoiceFormSignature = event.target.value) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Type your full name"), h("div", { class: "mt-6" }, h("sss-button", { testid: "confirm-and-continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Confirm and continue"))))))));
|
|
5963
|
+
}
|
|
5964
|
+
// TODO: fetch external promoted fund logo
|
|
5965
|
+
renderLogo() {
|
|
5966
|
+
return;
|
|
5967
|
+
// if (standardChoiceFormState.promotedFundId == undefined) return;
|
|
5968
|
+
// const logoSource = getLogoSrcByFundId(standardChoiceFormState.promotedFundId);
|
|
5969
|
+
// if (isSome(logoSource)) {
|
|
5970
|
+
// return (
|
|
5971
|
+
// <div class="pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start">
|
|
5972
|
+
// <img
|
|
5973
|
+
// class="h-16 max-w-140 sm:h-12 sm:max-w-[100px] object-contain"
|
|
5974
|
+
// alt={standardChoiceFormState.fundName}
|
|
5975
|
+
// src={logoSource.value}
|
|
5976
|
+
// />
|
|
5977
|
+
// </div>
|
|
5978
|
+
// );
|
|
5979
|
+
// }
|
|
5980
|
+
}
|
|
5981
|
+
async trackChangeRequestedAsync() {
|
|
5982
|
+
const common = {
|
|
5983
|
+
promotedFundsShown: superSelectionAppService.promotedFunds,
|
|
5984
|
+
defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
|
|
5985
|
+
};
|
|
5986
|
+
switch (state.fundDetails.type) {
|
|
5987
|
+
case 'default':
|
|
5988
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
5989
|
+
DefaultFund: Object.assign(Object.assign({}, state.fundDetails), common)
|
|
5990
|
+
});
|
|
5991
|
+
break;
|
|
5992
|
+
case 'myOwnFund':
|
|
5993
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
5994
|
+
MyOwnFund: Object.assign(Object.assign({}, state.fundDetails), common)
|
|
5995
|
+
});
|
|
5996
|
+
break;
|
|
5997
|
+
case 'smsf':
|
|
5998
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
5999
|
+
Smsf: Object.assign(Object.assign({}, state.fundDetails), common)
|
|
6000
|
+
});
|
|
6001
|
+
break;
|
|
6002
|
+
case 'promoted':
|
|
6003
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
6004
|
+
PromotedFund: Object.assign(Object.assign({}, state.fundDetails), common)
|
|
6005
|
+
});
|
|
6006
|
+
break;
|
|
6007
|
+
case 'promotedDefault':
|
|
6008
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
6009
|
+
PromotedDefaultFund: Object.assign(Object.assign({}, state.fundDetails), common)
|
|
6010
|
+
});
|
|
6011
|
+
break;
|
|
6012
|
+
case 'promotedDefaultWithJoin':
|
|
6013
|
+
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
6014
|
+
PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, state.fundDetails), common)
|
|
6015
|
+
});
|
|
6016
|
+
break;
|
|
6017
|
+
case 'null':
|
|
6018
|
+
throw 'standardChoiceFormState.fundDetails was not set';
|
|
6019
|
+
}
|
|
6020
|
+
}
|
|
6021
|
+
async handleSubmitForm() {
|
|
6022
|
+
this.formState = 'validated';
|
|
6023
|
+
if (this.formElement.checkValidity()) {
|
|
6024
|
+
await state.handleSubmitFn(this.standardChoiceFormSignature.trim());
|
|
6025
|
+
superSelectionAppService.markSuperSelectionAsSubmitted();
|
|
6026
|
+
}
|
|
6521
6027
|
}
|
|
6522
6028
|
};
|
|
6523
6029
|
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6030
|
+
const Success = class {
|
|
6031
|
+
constructor(hostRef) {
|
|
6032
|
+
registerInstance(this, hostRef);
|
|
6033
|
+
this.ignorePopState = () => window.history.pushState(null, '', null);
|
|
6034
|
+
}
|
|
6035
|
+
connectedCallback() {
|
|
6036
|
+
this.ignorePopState();
|
|
6037
|
+
window.addEventListener('popstate', this.ignorePopState);
|
|
6038
|
+
}
|
|
6039
|
+
disconnectedCallback() {
|
|
6040
|
+
window.removeEventListener('popstate', this.ignorePopState);
|
|
6041
|
+
}
|
|
6042
|
+
render() {
|
|
6043
|
+
const CheckIcon = () => {
|
|
6044
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", class: "fill-primary-base" }, h("path", { d: "M443.3 100.7C449.6 106.9 449.6 117.1 443.3 123.3L171.3 395.3C165.1 401.6 154.9 401.6 148.7 395.3L4.686 251.3C-1.562 245.1-1.562 234.9 4.686 228.7C10.93 222.4 21.06 222.4 27.31 228.7L160 361.4L420.7 100.7C426.9 94.44 437.1 94.44 443.3 100.7H443.3z" })));
|
|
6045
|
+
};
|
|
6046
|
+
return (h(Host, { class: "text-center" }, h("div", { class: "flex justify-center" }, h("div", { class: "relative" }, h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }), h("div", { class: "h-8 w-8 absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2" }, h(CheckIcon, null)))), h("h3", { class: "text-2xl leading-8 font-bold mt-4" }, "Your super choice has been submitted"), h("p", { class: "mt-4 text-center text-gray-600 leading-7 max-w-560 mx-auto" }, "Your superannuation details have been updated successfully and will be submitted to your employer."), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "max-w-[200px] w-full" }, h("sss-button", { testid: "continue-button", size: "xl", fillWidth: true, onClick: this.handleContinueButtonClick }, h("span", null, "Continue"))))));
|
|
6047
|
+
}
|
|
6048
|
+
handleContinueButtonClick(_event) {
|
|
6049
|
+
superSelectionAppService.completeSuperSelectionFlow();
|
|
6050
|
+
}
|
|
6051
|
+
};
|
|
6052
|
+
|
|
6053
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
6054
|
+
// Licensed under the MIT License.
|
|
6055
|
+
var strShimFunction = "function";
|
|
6056
|
+
var strShimObject = "object";
|
|
6057
|
+
var strShimUndefined = "undefined";
|
|
6058
|
+
var strShimPrototype = "prototype";
|
|
6059
|
+
var strShimHasOwnProperty = "hasOwnProperty";
|
|
6060
|
+
/**
|
|
6061
|
+
* Returns the current global scope object, for a normal web page this will be the current
|
|
6062
|
+
* window, for a Web Worker this will be current worker global scope via "self". The internal
|
|
6063
|
+
* implementation returns the first available instance object in the following order
|
|
6064
|
+
* - globalThis (New standard)
|
|
6065
|
+
* - self (Will return the current window instance for supported browsers)
|
|
6066
|
+
* - window (fallback for older browser implementations)
|
|
6067
|
+
* - global (NodeJS standard)
|
|
6068
|
+
* - <null> (When all else fails)
|
|
6069
|
+
* While the return type is a Window for the normal case, not all environments will support all
|
|
6070
|
+
* of the properties or functions.
|
|
6542
6071
|
*/
|
|
6543
6072
|
function getGlobal() {
|
|
6544
6073
|
if (typeof globalThis !== strShimUndefined && globalThis) {
|
|
@@ -16129,819 +15658,123 @@ class AppConfigurationQuery extends Query {
|
|
|
16129
15658
|
}
|
|
16130
15659
|
get configuration() {
|
|
16131
15660
|
const configuration = this.getValue().appConfiguration;
|
|
16132
|
-
if (isNone(configuration)) {
|
|
16133
|
-
throw Error('App configuration is not yet loaded');
|
|
16134
|
-
}
|
|
16135
|
-
return configuration.value;
|
|
16136
|
-
}
|
|
16137
|
-
}
|
|
16138
|
-
const appConfigurationQuery = new AppConfigurationQuery(sessionStore);
|
|
16139
|
-
|
|
16140
|
-
class AppInsightsService {
|
|
16141
|
-
constructor() {
|
|
16142
|
-
this.appInsights = new Lazy(() => new Initialization({
|
|
16143
|
-
config: {
|
|
16144
|
-
instrumentationKey: appConfigurationQuery.configuration.AppInsightsKey,
|
|
16145
|
-
enableAutoRouteTracking: true,
|
|
16146
|
-
autoTrackPageVisitTime: true,
|
|
16147
|
-
maxBatchInterval: 1000,
|
|
16148
|
-
enableUnhandledPromiseRejectionTracking: true
|
|
16149
|
-
}
|
|
16150
|
-
}));
|
|
16151
|
-
}
|
|
16152
|
-
init() {
|
|
16153
|
-
this.appInsights.value.loadAppInsights();
|
|
16154
|
-
setErrorHandler((err) => this.appInsightsErrorHandler(err));
|
|
16155
|
-
}
|
|
16156
|
-
getAppInsights() {
|
|
16157
|
-
return this.appInsights.value;
|
|
16158
|
-
}
|
|
16159
|
-
addCustomProperties(properties) {
|
|
16160
|
-
this.appInsights.value.addTelemetryInitializer((envelope) => {
|
|
16161
|
-
envelope.data = envelope.data ? envelope.data : {};
|
|
16162
|
-
for (const [k, v] of Object.entries(properties)) {
|
|
16163
|
-
envelope.data[k] = v;
|
|
16164
|
-
}
|
|
16165
|
-
});
|
|
16166
|
-
}
|
|
16167
|
-
trackErrorTrace(message) {
|
|
16168
|
-
this.appInsights.value.trackTrace({ message, severityLevel: SeverityLevel.Error });
|
|
16169
|
-
}
|
|
16170
|
-
appInsightsErrorHandler(error) {
|
|
16171
|
-
this.appInsights.value.trackException({
|
|
16172
|
-
error: error,
|
|
16173
|
-
severityLevel: SeverityLevel.Error
|
|
16174
|
-
});
|
|
16175
|
-
// eslint-disable-next-line no-console
|
|
16176
|
-
const defaultStencilErrorHandler = (error) => console.error(error);
|
|
16177
|
-
defaultStencilErrorHandler(error);
|
|
16178
|
-
}
|
|
16179
|
-
}
|
|
16180
|
-
const appInsights = new AppInsightsService();
|
|
16181
|
-
|
|
16182
|
-
class PromotedFundJoinV2IFrameBuilder {
|
|
16183
|
-
constructor() {
|
|
16184
|
-
this.getFundName = (fundId) => {
|
|
16185
|
-
return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
|
|
16186
|
-
};
|
|
16187
|
-
this.cleanUsi = (usi) => {
|
|
16188
|
-
return usi.replace(/ /g, '');
|
|
16189
|
-
};
|
|
16190
|
-
this.stringIsNullOrEmtpty = (s) => {
|
|
16191
|
-
return !(typeof s === 'string' && s.trim().length > 0);
|
|
16192
|
-
};
|
|
16193
|
-
this.environmentDiscriminator = () => {
|
|
16194
|
-
const discriminator = window.location.hostname.toLowerCase().split('.')[0];
|
|
16195
|
-
switch (discriminator) {
|
|
16196
|
-
case 'autodev-partner':
|
|
16197
|
-
case 'test-partner':
|
|
16198
|
-
case 'partner':
|
|
16199
|
-
case 'sandbox-partner':
|
|
16200
|
-
return discriminator.replace('partner', '');
|
|
16201
|
-
default:
|
|
16202
|
-
return 'autodev-';
|
|
16203
|
-
}
|
|
16204
|
-
};
|
|
16205
|
-
this.promotedFundJoinAppUrl = () => {
|
|
16206
|
-
return `https://${this.environmentDiscriminator()}api.simplefinancialchoices.com/promoted-funds/embed`;
|
|
16207
|
-
};
|
|
16208
|
-
}
|
|
16209
|
-
build(iframe$1, history) {
|
|
16210
|
-
if (!(iframe$1 === null || iframe$1 === void 0 ? void 0 : iframe$1.contentDocument))
|
|
16211
|
-
return;
|
|
16212
|
-
const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: state.fund.id, authToken: superSelectionAppService.jwt, employerDefault: state.fund.type === 'PromotedDefault', definedBenefitsEligibility: Option.toUndefined(superSelectionAppService.isDefinedBenefitsEligible) });
|
|
16213
|
-
const handleMessage = async (event) => {
|
|
16214
|
-
const { data } = event;
|
|
16215
|
-
if (!data) {
|
|
16216
|
-
return;
|
|
16217
|
-
}
|
|
16218
|
-
if (data.sender === 'promoted-fund-redirect') {
|
|
16219
|
-
window.removeEventListener('message', handleMessage);
|
|
16220
|
-
switch (data.type) {
|
|
16221
|
-
case 'cancel':
|
|
16222
|
-
if (state.fund.type === 'DefinedBenefits') {
|
|
16223
|
-
// Note: we don't expect a cancel event from Defined Benefits flow but just in case
|
|
16224
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ConsentPage);
|
|
16225
|
-
}
|
|
16226
|
-
else {
|
|
16227
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16228
|
-
}
|
|
16229
|
-
break;
|
|
16230
|
-
case 'success': {
|
|
16231
|
-
const promotedFundId = state.fund.id;
|
|
16232
|
-
const fundName = this.getFundName(promotedFundId);
|
|
16233
|
-
const usi = this.cleanUsi(data.usi);
|
|
16234
|
-
switch (state.fund.type) {
|
|
16235
|
-
case 'Promoted':
|
|
16236
|
-
if (this.stringIsNullOrEmtpty(data.memberNumber) ||
|
|
16237
|
-
this.stringIsNullOrEmtpty(data.usi)) {
|
|
16238
|
-
appInsights.trackErrorTrace('PFJ C# did not return (Promoted) memberNumber and/or usi');
|
|
16239
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16240
|
-
break;
|
|
16241
|
-
}
|
|
16242
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16243
|
-
history,
|
|
16244
|
-
fundName,
|
|
16245
|
-
promotedFundId,
|
|
16246
|
-
fundDetails: {
|
|
16247
|
-
type: 'promoted',
|
|
16248
|
-
fundName,
|
|
16249
|
-
fundUsi: usi,
|
|
16250
|
-
memberNumber: data.memberNumber,
|
|
16251
|
-
promotedFundId
|
|
16252
|
-
},
|
|
16253
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: promotedFundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi: data.usi.replace(/ /g, ''), standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
|
|
16254
|
-
});
|
|
16255
|
-
break;
|
|
16256
|
-
case 'PromotedDefault':
|
|
16257
|
-
if (this.stringIsNullOrEmtpty(data.usi)) {
|
|
16258
|
-
appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefault) usi');
|
|
16259
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16260
|
-
break;
|
|
16261
|
-
}
|
|
16262
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16263
|
-
history,
|
|
16264
|
-
fundName,
|
|
16265
|
-
promotedFundId,
|
|
16266
|
-
fundDetails: {
|
|
16267
|
-
type: 'promotedDefault',
|
|
16268
|
-
fundName,
|
|
16269
|
-
fundUsi: usi,
|
|
16270
|
-
promotedFundId
|
|
16271
|
-
},
|
|
16272
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: promotedFundId, usi,
|
|
16273
|
-
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
|
|
16274
|
-
});
|
|
16275
|
-
break;
|
|
16276
|
-
case 'DefinedBenefits':
|
|
16277
|
-
throw Error('DefinedBenefits is not supported in legacy "success" message');
|
|
16278
|
-
case 'null':
|
|
16279
|
-
throw Error('PromotedFundState.type was not set.');
|
|
16280
|
-
}
|
|
16281
|
-
break;
|
|
16282
|
-
}
|
|
16283
|
-
case 'success-promoted': {
|
|
16284
|
-
if (this.stringIsNullOrEmtpty(data.memberNumber) ||
|
|
16285
|
-
this.stringIsNullOrEmtpty(data.usi)) {
|
|
16286
|
-
appInsights.trackErrorTrace('PFJ C# did not return (Promoted) memberNumber and/or usi');
|
|
16287
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16288
|
-
break;
|
|
16289
|
-
}
|
|
16290
|
-
const usi = this.cleanUsi(data.usi);
|
|
16291
|
-
const fundName = this.getFundName(data.fundId);
|
|
16292
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16293
|
-
history,
|
|
16294
|
-
fundName,
|
|
16295
|
-
promotedFundId: data.fundId,
|
|
16296
|
-
fundDetails: {
|
|
16297
|
-
type: 'promoted',
|
|
16298
|
-
fundName,
|
|
16299
|
-
fundUsi: usi,
|
|
16300
|
-
memberNumber: data.memberNumber,
|
|
16301
|
-
promotedFundId: data.fundId
|
|
16302
|
-
},
|
|
16303
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
|
|
16304
|
-
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
|
|
16305
|
-
});
|
|
16306
|
-
break;
|
|
16307
|
-
}
|
|
16308
|
-
case 'success-promoted-default': {
|
|
16309
|
-
if (this.stringIsNullOrEmtpty(data.usi)) {
|
|
16310
|
-
appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefault) usi');
|
|
16311
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16312
|
-
break;
|
|
16313
|
-
}
|
|
16314
|
-
const usi = this.cleanUsi(data.usi);
|
|
16315
|
-
const fundName = this.getFundName(data.fundId);
|
|
16316
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16317
|
-
history,
|
|
16318
|
-
fundName,
|
|
16319
|
-
promotedFundId: data.fundId,
|
|
16320
|
-
fundDetails: {
|
|
16321
|
-
type: 'promotedDefault',
|
|
16322
|
-
fundName,
|
|
16323
|
-
fundUsi: usi,
|
|
16324
|
-
promotedFundId: data.fundId
|
|
16325
|
-
},
|
|
16326
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: data.fundId, usi,
|
|
16327
|
-
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
|
|
16328
|
-
});
|
|
16329
|
-
break;
|
|
16330
|
-
}
|
|
16331
|
-
case 'success-promoted-default-with-join': {
|
|
16332
|
-
if (this.stringIsNullOrEmtpty(data.memberNumber) ||
|
|
16333
|
-
this.stringIsNullOrEmtpty(data.usi)) {
|
|
16334
|
-
appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefaultWithJoin) memberNumber and/or usi');
|
|
16335
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16336
|
-
break;
|
|
16337
|
-
}
|
|
16338
|
-
const usi = this.cleanUsi(data.usi);
|
|
16339
|
-
const fundName = this.getFundName(data.fundId);
|
|
16340
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16341
|
-
history,
|
|
16342
|
-
fundName,
|
|
16343
|
-
promotedFundId: data.fundId,
|
|
16344
|
-
fundDetails: {
|
|
16345
|
-
type: 'promotedDefaultWithJoin',
|
|
16346
|
-
fundName,
|
|
16347
|
-
fundUsi: usi,
|
|
16348
|
-
memberNumber: data.memberNumber,
|
|
16349
|
-
promotedFundId: data.fundId
|
|
16350
|
-
},
|
|
16351
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceWithJoinAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
|
|
16352
|
-
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
|
|
16353
|
-
});
|
|
16354
|
-
break;
|
|
16355
|
-
}
|
|
16356
|
-
case 'success-defined-benefits':
|
|
16357
|
-
if (this.stringIsNullOrEmtpty(data.memberNumber) ||
|
|
16358
|
-
this.stringIsNullOrEmtpty(data.usi)) {
|
|
16359
|
-
appInsights.trackErrorTrace('PFJ C# did not return (DefinedBenefits) memberNumber and/or usi');
|
|
16360
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ConsentPage);
|
|
16361
|
-
break;
|
|
16362
|
-
}
|
|
16363
|
-
await customFundChoiceApi.submitDefinedBenefitsChoiceAsync(Object.assign(Object.assign({ fundUsi: this.cleanUsi(data.usi) }, data), superSelectionAppService.promotedFundsConfig));
|
|
16364
|
-
superSelectionAppService.markSuperSelectionAsSubmitted();
|
|
16365
|
-
break;
|
|
16366
|
-
/* falls through */
|
|
16367
|
-
default:
|
|
16368
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16369
|
-
break;
|
|
16370
|
-
}
|
|
16371
|
-
reset();
|
|
16372
|
-
return;
|
|
16373
|
-
}
|
|
16374
|
-
if (data.sender === 'promoted-fund-join') {
|
|
16375
|
-
switch (data.type) {
|
|
16376
|
-
case 'contentResized':
|
|
16377
|
-
iframe$1.height = data.height > 0 ? String(data.height) : iframe$1.height;
|
|
16378
|
-
iframe$1.width = data.width > 0 ? String(data.width) : iframe$1.width;
|
|
16379
|
-
break;
|
|
16380
|
-
case 'pageNavigated':
|
|
16381
|
-
window.scroll(iframe$1.offsetLeft, iframe$1.offsetTop);
|
|
16382
|
-
iframe.navigation(window.location.href);
|
|
16383
|
-
break;
|
|
16384
|
-
}
|
|
16385
|
-
}
|
|
16386
|
-
};
|
|
16387
|
-
window.addEventListener('message', handleMessage);
|
|
16388
|
-
const iframeDoc = iframe$1.contentDocument;
|
|
16389
|
-
iframeDoc.open();
|
|
16390
|
-
const form = iframeDoc.createElement('form');
|
|
16391
|
-
form.method = 'POST';
|
|
16392
|
-
form.target = '_self';
|
|
16393
|
-
form.action = this.promotedFundJoinAppUrl();
|
|
16394
|
-
let prop;
|
|
16395
|
-
for (prop in postData) {
|
|
16396
|
-
const value = postData[prop];
|
|
16397
|
-
if (value !== undefined) {
|
|
16398
|
-
const input = document.createElement('input');
|
|
16399
|
-
input.name = prop;
|
|
16400
|
-
input.type = 'hidden';
|
|
16401
|
-
if (typeof value === 'boolean') {
|
|
16402
|
-
input.value = value ? 'true' : 'false';
|
|
16403
|
-
}
|
|
16404
|
-
else {
|
|
16405
|
-
input.value = value;
|
|
16406
|
-
}
|
|
16407
|
-
form.append(input);
|
|
16408
|
-
}
|
|
16409
|
-
}
|
|
16410
|
-
iframeDoc.appendChild(form);
|
|
16411
|
-
iframeDoc.close();
|
|
16412
|
-
form.submit();
|
|
16413
|
-
}
|
|
16414
|
-
getMemberData() {
|
|
16415
|
-
var _a, _b;
|
|
16416
|
-
const superBuyer = superSelectionAppService.superBuyer;
|
|
16417
|
-
return {
|
|
16418
|
-
title: superBuyer.userProfile.title,
|
|
16419
|
-
firstName: superBuyer.userProfile.firstName,
|
|
16420
|
-
middleName: superBuyer.userProfile.middleName,
|
|
16421
|
-
lastName: superBuyer.userProfile.lastName,
|
|
16422
|
-
dateOfBirth: superBuyer.userProfile.dateOfBirth,
|
|
16423
|
-
gender: superBuyer.userProfile.gender,
|
|
16424
|
-
email: superBuyer.userProfile.email,
|
|
16425
|
-
mobilePhone: superBuyer.userProfile.mobilePhone,
|
|
16426
|
-
taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
|
|
16427
|
-
addressLine1: superBuyer.userProfile.address.addressLine1,
|
|
16428
|
-
addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
|
|
16429
|
-
city: superBuyer.userProfile.address.city,
|
|
16430
|
-
state: superBuyer.userProfile.address.state,
|
|
16431
|
-
postCode: superBuyer.userProfile.address.postcode
|
|
16432
|
-
};
|
|
16433
|
-
}
|
|
16434
|
-
}
|
|
16435
|
-
const PromotedFundJoinV2IFrameBuilder$1 = new PromotedFundJoinV2IFrameBuilder();
|
|
16436
|
-
|
|
16437
|
-
const PromotedFundJoinV2Page = class {
|
|
16438
|
-
constructor(hostRef) {
|
|
16439
|
-
registerInstance(this, hostRef);
|
|
16440
|
-
}
|
|
16441
|
-
render() {
|
|
16442
|
-
return (h("sss-iframe-host", { build: (iframe) => PromotedFundJoinV2IFrameBuilder$1.build(iframe, this.history) }));
|
|
16443
|
-
}
|
|
16444
|
-
};
|
|
16445
|
-
|
|
16446
|
-
function validateAbn(abn) {
|
|
16447
|
-
const digitArray = abn.split('').map(Number);
|
|
16448
|
-
const isAllDigits = digitArray.every((d) => !isNaN(d));
|
|
16449
|
-
const weightingFactors = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
|
|
16450
|
-
if (!isAllDigits || digitArray.length !== weightingFactors.length) {
|
|
16451
|
-
return false;
|
|
16452
|
-
}
|
|
16453
|
-
digitArray[0]--;
|
|
16454
|
-
const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
|
|
16455
|
-
return sum % 89 === 0;
|
|
16456
|
-
}
|
|
16457
|
-
|
|
16458
|
-
const SelfManagedFund = class {
|
|
16459
|
-
constructor(hostRef) {
|
|
16460
|
-
registerInstance(this, hostRef);
|
|
16461
|
-
this.isSubmitDisabled = true;
|
|
16462
|
-
this.isAbnValid = validateAbn(state$2.selfManagedFundForm.fundAbn);
|
|
16463
|
-
this.eventTrackingService = EventTrackingService.Instance;
|
|
16464
|
-
this.success = () => {
|
|
16465
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16466
|
-
history: this.history,
|
|
16467
|
-
fundName: 'Self-managed super fund',
|
|
16468
|
-
fundDetails: {
|
|
16469
|
-
type: 'smsf',
|
|
16470
|
-
fundName: state$2.selfManagedFundForm.fundName,
|
|
16471
|
-
fundEsa: state$2.selfManagedFundForm.fundEsa
|
|
16472
|
-
},
|
|
16473
|
-
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
16474
|
-
const requestDto = Object.assign({ smsfChoice: {
|
|
16475
|
-
abn: state$2.selfManagedFundForm.fundAbn,
|
|
16476
|
-
fundName: state$2.selfManagedFundForm.fundName,
|
|
16477
|
-
fundAddress: {
|
|
16478
|
-
addressLine1: state$2.selfManagedFundForm.addressLine1,
|
|
16479
|
-
addressLine2: state$2.selfManagedFundForm.addressLine2,
|
|
16480
|
-
city: state$2.selfManagedFundForm.city,
|
|
16481
|
-
state: state$2.selfManagedFundForm.state,
|
|
16482
|
-
postcode: state$2.selfManagedFundForm.postcode
|
|
16483
|
-
},
|
|
16484
|
-
bsb: state$2.selfManagedFundForm.bsb,
|
|
16485
|
-
bankAccountName: state$2.selfManagedFundForm.bankAccountName,
|
|
16486
|
-
bankAccountNumber: state$2.selfManagedFundForm.bankAccountNumber,
|
|
16487
|
-
electronicServiceAddress: state$2.selfManagedFundForm.fundEsa,
|
|
16488
|
-
memberFirstName: state$2.selfManagedFundForm.memberFirstName,
|
|
16489
|
-
memberFamilyName: state$2.selfManagedFundForm.memberFamilyName
|
|
16490
|
-
}, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
|
|
16491
|
-
await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
|
|
16492
|
-
}
|
|
16493
|
-
});
|
|
16494
|
-
};
|
|
16495
|
-
}
|
|
16496
|
-
componentDidLoad() {
|
|
16497
|
-
this.updateIsSubmitDisabled();
|
|
16498
|
-
return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
|
|
16499
|
-
promotedFundsShown: superSelectionAppService.promotedFunds,
|
|
16500
|
-
defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
|
|
16501
|
-
});
|
|
16502
|
-
}
|
|
16503
|
-
render() {
|
|
16504
|
-
return (h(Host, null, h("sss-header-section", { currentPage: "own-fund" }), h("div", { class: "flex justify-center mt-11" }, h("sss-custom-fund", null, h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
|
|
16505
|
-
'was-validated': this.formState === 'validated'
|
|
16506
|
-
}, ref: (el) => (this.formElement = el), onInput: (_) => this.updateIsSubmitDisabled() }, h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg max-w-560" }, h("p", { class: "sm:text-lg font-bold" }, "Fund details"), h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })), h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" }, "Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."))), h("sss-self-managed-fund-inputs", { fundForm: state$2.selfManagedFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
|
|
16507
|
-
state$2.selfManagedFundForm = Object.assign(Object.assign({}, state$2.selfManagedFundForm), event.detail);
|
|
16508
|
-
if (event.detail.isAbnValid !== undefined)
|
|
16509
|
-
this.isAbnValid = event.detail.isAbnValid;
|
|
16510
|
-
this.updateIsSubmitDisabled();
|
|
16511
|
-
} })), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "sm:max-w-320 w-full" }, h("div", { class: "mb-4", onClick:
|
|
16512
|
-
// user clicks on disabled button (div wrapper) then validation errors will show
|
|
16513
|
-
() => (this.formState = 'validated') }, h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")), h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage }, h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back")))))))));
|
|
16514
|
-
}
|
|
16515
|
-
updateIsSubmitDisabled() {
|
|
16516
|
-
this.isSubmitDisabled = !this.formElement.checkValidity() || !this.isAbnValid;
|
|
16517
|
-
}
|
|
16518
|
-
async handleSubmitForm() {
|
|
16519
|
-
this.formState = 'validated';
|
|
16520
|
-
if (this.formElement.checkValidity())
|
|
16521
|
-
this.success();
|
|
16522
|
-
}
|
|
16523
|
-
};
|
|
16524
|
-
injectHistory(SelfManagedFund);
|
|
16525
|
-
|
|
16526
|
-
var AbnValidationStatus;
|
|
16527
|
-
(function (AbnValidationStatus) {
|
|
16528
|
-
AbnValidationStatus[AbnValidationStatus["Invalid"] = 1] = "Invalid";
|
|
16529
|
-
AbnValidationStatus[AbnValidationStatus["AbnIsUsedForRegulatedFund"] = 2] = "AbnIsUsedForRegulatedFund";
|
|
16530
|
-
AbnValidationStatus[AbnValidationStatus["Valid"] = 3] = "Valid";
|
|
16531
|
-
})(AbnValidationStatus || (AbnValidationStatus = {}));
|
|
16532
|
-
const SelfManagedFundInputs = class {
|
|
16533
|
-
constructor(hostRef) {
|
|
16534
|
-
registerInstance(this, hostRef);
|
|
16535
|
-
this.formChanged = createEvent(this, "formChanged", 7);
|
|
16536
|
-
this.abnValidationStatus = AbnValidationStatus.Invalid;
|
|
16537
|
-
this.isAbnTouched = false;
|
|
16538
|
-
this.currentBank = none;
|
|
16539
|
-
this.addressErrorMessage = none;
|
|
16540
|
-
this.stateOptions = [
|
|
16541
|
-
{ value: 'NSW', label: 'NSW' },
|
|
16542
|
-
{ value: 'QLD', label: 'QLD' },
|
|
16543
|
-
{ value: 'ACT', label: 'ACT' },
|
|
16544
|
-
{ value: 'VIC', label: 'VIC' },
|
|
16545
|
-
{ value: 'TAS', label: 'TAS' },
|
|
16546
|
-
{ value: 'WA', label: 'WA' },
|
|
16547
|
-
{ value: 'SA', label: 'SA' },
|
|
16548
|
-
{ value: 'NT', label: 'NT' }
|
|
16549
|
-
];
|
|
16550
|
-
this.bsbRegex = new RegExp(/^[0-9]{3}[0-9]{3}$/);
|
|
16551
|
-
this.bankAccountNumberRegex = new RegExp(/^[0-9]{2,10}$/);
|
|
16552
|
-
}
|
|
16553
|
-
render() {
|
|
16554
|
-
const inputClass = {
|
|
16555
|
-
'relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md focus:z-10': true,
|
|
16556
|
-
'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
|
|
16557
|
-
.showValidationErrors
|
|
16558
|
-
};
|
|
16559
|
-
return (h("div", null, h("div", null, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundName", id: "fundName", value: state$2.selfManagedFundForm.fundName, onChange: (ev) => this.updateFormField('fundName', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund name"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund ABN"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundAbn", id: "fundAbn", value: state$2.selfManagedFundForm.fundAbn, inputmode: "numeric", pattern: "[0-9]*", onKeyUp: async (ev) => {
|
|
16560
|
-
const abnInput = ev.target;
|
|
16561
|
-
this.updateFormField('fundAbn', abnInput.value.trim());
|
|
16562
|
-
this.abnValidationStatus = AbnValidationStatus.Invalid;
|
|
16563
|
-
if (validateAbn(abnInput.value)) {
|
|
16564
|
-
const isAbnUsedForRegulatedFund = await this.isAbnUsedForRegulatedAsync(abnInput.value);
|
|
16565
|
-
this.abnValidationStatus = isAbnUsedForRegulatedFund
|
|
16566
|
-
? AbnValidationStatus.AbnIsUsedForRegulatedFund
|
|
16567
|
-
: AbnValidationStatus.Valid;
|
|
16568
|
-
}
|
|
16569
|
-
// We need to set a custom validity message to trigger css invalid styles for non valid cases
|
|
16570
|
-
const validityMessage = this.abnValidationStatus === AbnValidationStatus.Valid
|
|
16571
|
-
? ''
|
|
16572
|
-
: 'Enter a valid fund ABN (digits only)';
|
|
16573
|
-
abnInput.setCustomValidity(validityMessage);
|
|
16574
|
-
this.updateFormField('isAbnValid', this.abnValidationStatus === AbnValidationStatus.Valid);
|
|
16575
|
-
}, onBlur: () => (this.isAbnTouched = true) }), this.renderAbnValidationError())), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Electronic service address alias (ESA)"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundEsa", id: "fundEsa", value: state$2.selfManagedFundForm.fundEsa, onChange: (ev) => this.updateFormField('fundEsa', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund ESA"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund address"), h("div", { class: "mt-1 rounded-md shadow-sm -space-y-px" }, h("input", { placeholder: "Address line 1", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-t-md shadow-none': true }), required: true, minlength: "2", name: "addressLine1", id: "addressLine1", value: state$2.selfManagedFundForm.addressLine1, onChange: (ev) => {
|
|
16576
|
-
this.updateFormField('addressLine1', ev.target.value.trim());
|
|
16577
|
-
this.updateAddressErrorMessage();
|
|
16578
|
-
}, ref: (el) => (this.addressLine1Element = el) }), h("input", { placeholder: "Address line 2 (optional)", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "addressLine2", id: "addressLine2", value: state$2.selfManagedFundForm.addressLine2, onChange: (ev) => this.updateFormField('addressLine2', ev.target.value.trim()) }), h("input", { placeholder: "City/suburb", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "city", required: true, id: "city", value: state$2.selfManagedFundForm.city, onChange: (ev) => {
|
|
16579
|
-
this.updateFormField('city', ev.target.value.trim());
|
|
16580
|
-
this.updateAddressErrorMessage();
|
|
16581
|
-
}, ref: (el) => (this.cityElement = el) }), h("div", { class: "flex -space-x-px" }, h("div", { class: "w-1/2 flex-1 min-w-0" }, h("input", { placeholder: "Postcode", type: "text", required: true, class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-bl-md shadow-none': true }), name: "postcode", minlength: "4", maxlength: "4", pattern: "[0-9]{4}", id: "postcode", value: state$2.selfManagedFundForm.postcode, inputmode: "numeric", onChange: (ev) => {
|
|
16582
|
-
this.updateFormField('postcode', ev.target.value.trim());
|
|
16583
|
-
this.updateAddressErrorMessage();
|
|
16584
|
-
}, ref: (el) => (this.postcodeElement = el) })), h("div", { class: "flex-1 min-w-0" }, h("select", { class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-br-md shadow-none': true, 'text-gray-500': this.fundForm.state !== undefined }), name: "state", required: true, id: "state", onChange: (ev) => {
|
|
16585
|
-
this.updateFormField('state', ev.target.value.trim());
|
|
16586
|
-
this.updateAddressErrorMessage();
|
|
16587
|
-
}, ref: (el) => (this.stateElement = el) }, h("option", { disabled: true, selected: this.fundForm.state !== undefined, value: "" }, "State"), this.stateOptions.map((s) => (h("option", { value: s.value, selected: this.fundForm.state === s.value }, s.label))))))), isSome(this.addressErrorMessage) && this.showValidationErrors && (h("div", { class: "mt-2 text-sm text-red-600" }, this.addressErrorMessage.value))), h("div", { class: "flex space-x-4" }, h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: state$2.selfManagedFundForm.memberFirstName, onChange: (ev) => this.updateFormField('memberFirstName', ev.target.value.trim()) }))), h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: state$2.selfManagedFundForm.memberFamilyName, onChange: (ev) => this.updateFormField('memberFamilyName', ev.target.value.trim()) })))), h("h3", { class: "text-lg font-bold mt-6" }, "Fund bank details"), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Account name"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bankAccountName", minlength: "2", id: "bankAccountName", value: state$2.selfManagedFundForm.bankAccountName, onChange: (ev) => this.updateFormField('bankAccountName', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account name"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "BSB"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bsb", id: "bsb", minlength: "6", maxlength: "7", inputmode: "numeric", onKeyUp: (ev) => this.updateCurrentBank(ev), pattern: this.bsbRegex.source, value: state$2.selfManagedFundForm.bsb }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid BSB"))), isSome(this.currentBank) && (h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Bank name"), h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm" }, this.currentBank.value))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Account number"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bankAccountNumber", id: "bankAccountNumber", minlength: "2", maxlength: "11", pattern: this.bankAccountNumberRegex.source, inputmode: "numeric", value: state$2.selfManagedFundForm.bankAccountNumber, onKeyUp: (ev) => this.updateCurrentBankAccountNumber(ev), onChange: (ev) => this.updateFormField('bankAccountNumber', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account number")))));
|
|
16588
|
-
}
|
|
16589
|
-
updateFormField(key, value) {
|
|
16590
|
-
this.formChanged.emit({ [key]: value });
|
|
16591
|
-
}
|
|
16592
|
-
async isAbnUsedForRegulatedAsync(abn) {
|
|
16593
|
-
return !(await customFundChoiceApi.validateAbnForSMSF(abn));
|
|
16594
|
-
}
|
|
16595
|
-
renderAbnValidationError() {
|
|
16596
|
-
if (this.isAbnTouched || this.showValidationErrors) {
|
|
16597
|
-
switch (this.abnValidationStatus) {
|
|
16598
|
-
case AbnValidationStatus.Invalid:
|
|
16599
|
-
return h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
|
|
16600
|
-
case AbnValidationStatus.AbnIsUsedForRegulatedFund:
|
|
16601
|
-
return (h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
|
|
16602
|
-
case AbnValidationStatus.Valid:
|
|
16603
|
-
return [];
|
|
16604
|
-
}
|
|
16605
|
-
}
|
|
16606
|
-
return [];
|
|
16607
|
-
}
|
|
16608
|
-
filterDigits(str) {
|
|
16609
|
-
return str.replace(/[^0-9]/g, '');
|
|
16610
|
-
}
|
|
16611
|
-
updateCurrentBank(ev) {
|
|
16612
|
-
const value = this.filterDigits(ev.target.value);
|
|
16613
|
-
const firstTwoNumbers = value.substring(0, 2);
|
|
16614
|
-
const firstThreeNumbers = value.substring(0, 3);
|
|
16615
|
-
const firstTwoNumberBankName = bsbNumbers[firstTwoNumbers];
|
|
16616
|
-
const firstThreeNumberBankName = bsbNumbers[firstThreeNumbers];
|
|
16617
|
-
if (firstTwoNumberBankName)
|
|
16618
|
-
this.currentBank = some(firstTwoNumberBankName);
|
|
16619
|
-
if (firstThreeNumberBankName)
|
|
16620
|
-
this.currentBank = some(firstThreeNumberBankName);
|
|
16621
|
-
if (value === '' || value.length > 6)
|
|
16622
|
-
this.currentBank = none;
|
|
16623
|
-
this.updateFormField('bsb', value);
|
|
16624
|
-
}
|
|
16625
|
-
updateCurrentBankAccountNumber(ev) {
|
|
16626
|
-
const value = this.filterDigits(ev.target.value);
|
|
16627
|
-
this.updateFormField('bankAccountNumber', value);
|
|
16628
|
-
}
|
|
16629
|
-
updateAddressErrorMessage() {
|
|
16630
|
-
let message = none;
|
|
16631
|
-
if (isNone(message) && !this.addressLine1Element.checkValidity()) {
|
|
16632
|
-
message = some('Enter a valid address line 1');
|
|
16633
|
-
}
|
|
16634
|
-
if (isNone(message) && !this.cityElement.checkValidity()) {
|
|
16635
|
-
message = some('Enter a valid city/suburb');
|
|
16636
|
-
}
|
|
16637
|
-
if (isNone(message) && !this.postcodeElement.checkValidity()) {
|
|
16638
|
-
message = some('Enter a valid post code');
|
|
16639
|
-
}
|
|
16640
|
-
if (isNone(message) && !this.stateElement.checkValidity()) {
|
|
16641
|
-
message = some('Select a state');
|
|
16642
|
-
}
|
|
16643
|
-
this.addressErrorMessage = message;
|
|
16644
|
-
}
|
|
16645
|
-
};
|
|
16646
|
-
|
|
16647
|
-
class InteropQuery extends Query {
|
|
16648
|
-
constructor(store) {
|
|
16649
|
-
super(store);
|
|
16650
|
-
this.store = store;
|
|
16651
|
-
}
|
|
16652
|
-
isReactNativeInteropEnabled() {
|
|
16653
|
-
return isSome(this.getValue().reactNativeInterop);
|
|
16654
|
-
}
|
|
16655
|
-
isIframeInteropEnabled() {
|
|
16656
|
-
return isSome(this.getValue().iframeInterop);
|
|
16657
|
-
}
|
|
16658
|
-
getIframeInteropMode() {
|
|
16659
|
-
const iframeInterop = this.getValue().iframeInterop;
|
|
16660
|
-
if (isNone(iframeInterop)) {
|
|
16661
|
-
throw Error('Failed to get iframe interop information: no data in store');
|
|
16662
|
-
}
|
|
16663
|
-
if (!this.isIframeInteropEnabled()) {
|
|
16664
|
-
throw Error('Failed to get iframe interop information: iframe mode is disabled');
|
|
16665
|
-
}
|
|
16666
|
-
return iframeInterop.value;
|
|
16667
|
-
}
|
|
16668
|
-
}
|
|
16669
|
-
const interopQuery = new InteropQuery(sessionStore);
|
|
16670
|
-
|
|
16671
|
-
class SlateChoiceApi {
|
|
16672
|
-
async submitSlateChoiceAsync(dto) {
|
|
16673
|
-
return buildBackendApiClient()
|
|
16674
|
-
.url('super-choice/slate')
|
|
16675
|
-
.post(dto)
|
|
16676
|
-
.badRequest(() => {
|
|
16677
|
-
throw new Error('Failed to process Slate join request');
|
|
16678
|
-
})
|
|
16679
|
-
.text();
|
|
16680
|
-
}
|
|
16681
|
-
}
|
|
16682
|
-
const slateChoiceApi = new SlateChoiceApi();
|
|
16683
|
-
|
|
16684
|
-
class SlateIFrameBuilder {
|
|
16685
|
-
constructor() {
|
|
16686
|
-
this.hostIsLocalSuperSelection = () => window.location.origin === 'http://localhost:7100';
|
|
16687
|
-
this.hostIsDeployed = () => window.location.origin.endsWith('partner.flarehr.com');
|
|
16688
|
-
this.skipConsolidation = () => (interopQuery.isReactNativeInteropEnabled() ? 'true' : 'false');
|
|
16689
|
-
this.skipInsurance = () => (interopQuery.isReactNativeInteropEnabled() ? 'true' : 'false');
|
|
16690
|
-
this.environmentDiscriminator = () => {
|
|
16691
|
-
const discriminator = window.location.hostname.toLowerCase().split('.')[0];
|
|
16692
|
-
switch (discriminator) {
|
|
16693
|
-
case 'autodev-partner':
|
|
16694
|
-
case 'test-partner':
|
|
16695
|
-
case 'partner':
|
|
16696
|
-
case 'sandbox-partner':
|
|
16697
|
-
return discriminator.replace('partner', '');
|
|
16698
|
-
default:
|
|
16699
|
-
return 'autodev-';
|
|
16700
|
-
}
|
|
16701
|
-
};
|
|
16702
|
-
this.slateJoinAppUrl = () => {
|
|
16703
|
-
return `https://${this.environmentDiscriminator()}join.slatesuper.com.au/confirm`;
|
|
16704
|
-
};
|
|
16705
|
-
}
|
|
16706
|
-
build(iframe, history) {
|
|
16707
|
-
if (!(iframe === null || iframe === void 0 ? void 0 : iframe.contentDocument))
|
|
16708
|
-
return;
|
|
16709
|
-
const baseUrl = this.hostIsLocalSuperSelection() || this.hostIsDeployed()
|
|
16710
|
-
? `${window.location.origin}/super-selection/embed/v1.0/app`
|
|
16711
|
-
: 'https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app';
|
|
16712
|
-
const redirectUrl = `${baseUrl}/slate-redirect.html`;
|
|
16713
|
-
const postData = Object.assign(Object.assign({}, this.getSlateJoinMemberData()), { successRedirectUrl: redirectUrl, cancelRedirectUrl: redirectUrl, skipConsolidation: this.skipConsolidation(), skipInsurance: this.skipInsurance() });
|
|
16714
|
-
if (this.includeJwt()) {
|
|
16715
|
-
postData.authToken = superSelectionAppService.jwt;
|
|
16716
|
-
}
|
|
16717
|
-
const handleMessage = (event) => {
|
|
16718
|
-
const { data, origin } = event;
|
|
16719
|
-
if (!data) {
|
|
16720
|
-
return;
|
|
16721
|
-
}
|
|
16722
|
-
if (data.sender === 'slate-redirect') {
|
|
16723
|
-
window.removeEventListener('message', handleMessage);
|
|
16724
|
-
switch (data.type) {
|
|
16725
|
-
case 'success':
|
|
16726
|
-
if (data.memberNumber) {
|
|
16727
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16728
|
-
history,
|
|
16729
|
-
fundName: fund$8.name,
|
|
16730
|
-
fundDetails: {
|
|
16731
|
-
type: 'promoted',
|
|
16732
|
-
fundName: fund$8.name,
|
|
16733
|
-
fundUsi: slateUsi,
|
|
16734
|
-
memberNumber: data.memberNumber,
|
|
16735
|
-
promotedFundId: fund$8.fundId
|
|
16736
|
-
},
|
|
16737
|
-
handleSubmitFn: (standardChoiceFormSignature) => slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig)),
|
|
16738
|
-
promotedFundId: fund$8.fundId
|
|
16739
|
-
});
|
|
16740
|
-
break;
|
|
16741
|
-
}
|
|
16742
|
-
/* falls through */
|
|
16743
|
-
default:
|
|
16744
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16745
|
-
break;
|
|
16746
|
-
}
|
|
16747
|
-
reset();
|
|
16748
|
-
return;
|
|
16749
|
-
}
|
|
16750
|
-
if (data.sender === 'flare' && origin.endsWith('join.slatesuper.com.au')) {
|
|
16751
|
-
switch (data.type) {
|
|
16752
|
-
case 'contentResized':
|
|
16753
|
-
iframe.height = data.height > 0 ? data.height : iframe.height;
|
|
16754
|
-
iframe.width = data.width > 0 ? data.width : iframe.width;
|
|
16755
|
-
break;
|
|
16756
|
-
}
|
|
16757
|
-
}
|
|
16758
|
-
};
|
|
16759
|
-
window.addEventListener('message', handleMessage);
|
|
16760
|
-
const iframeDoc = iframe.contentDocument;
|
|
16761
|
-
iframeDoc.open();
|
|
16762
|
-
const form = iframeDoc.createElement('form');
|
|
16763
|
-
form.method = 'POST';
|
|
16764
|
-
form.target = '_self';
|
|
16765
|
-
form.action = this.slateJoinAppUrl();
|
|
16766
|
-
let prop;
|
|
16767
|
-
for (prop in postData) {
|
|
16768
|
-
const value = postData[prop];
|
|
16769
|
-
if (value !== undefined) {
|
|
16770
|
-
const input = document.createElement('input');
|
|
16771
|
-
input.type = 'hidden';
|
|
16772
|
-
input.name = prop;
|
|
16773
|
-
input.value = value;
|
|
16774
|
-
form.append(input);
|
|
16775
|
-
}
|
|
16776
|
-
}
|
|
16777
|
-
iframeDoc.appendChild(form);
|
|
16778
|
-
iframeDoc.close();
|
|
16779
|
-
form.submit();
|
|
16780
|
-
}
|
|
16781
|
-
getSlateJoinMemberData() {
|
|
16782
|
-
var _a, _b;
|
|
16783
|
-
const superBuyer = superSelectionAppService.superBuyer;
|
|
16784
|
-
const toSlateGender = (gender) => {
|
|
16785
|
-
switch (gender) {
|
|
16786
|
-
case 'Male':
|
|
16787
|
-
return 'Male';
|
|
16788
|
-
case 'Female':
|
|
16789
|
-
return 'Female';
|
|
16790
|
-
case 'Intersex':
|
|
16791
|
-
return 'Intersex/Indeterminate';
|
|
16792
|
-
default:
|
|
16793
|
-
return 'Unknown';
|
|
16794
|
-
}
|
|
16795
|
-
};
|
|
16796
|
-
return {
|
|
16797
|
-
firstName: superBuyer.userProfile.firstName,
|
|
16798
|
-
middleName: superBuyer.userProfile.middleName,
|
|
16799
|
-
lastName: superBuyer.userProfile.lastName,
|
|
16800
|
-
dateOfBirth: superBuyer.userProfile.dateOfBirth,
|
|
16801
|
-
gender: toSlateGender(superBuyer.userProfile.gender),
|
|
16802
|
-
email: superBuyer.userProfile.email,
|
|
16803
|
-
mobilePhone: superBuyer.userProfile.mobilePhone,
|
|
16804
|
-
taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
|
|
16805
|
-
addressLine1: superBuyer.userProfile.address.addressLine1,
|
|
16806
|
-
addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
|
|
16807
|
-
city: superBuyer.userProfile.address.city,
|
|
16808
|
-
state: superBuyer.userProfile.address.state,
|
|
16809
|
-
postCode: superBuyer.userProfile.address.postcode
|
|
16810
|
-
};
|
|
16811
|
-
}
|
|
16812
|
-
includeJwt() {
|
|
16813
|
-
return !this.slateJoinAppUrl().match(/autodev|sandbox/);
|
|
15661
|
+
if (isNone(configuration)) {
|
|
15662
|
+
throw Error('App configuration is not yet loaded');
|
|
15663
|
+
}
|
|
15664
|
+
return configuration.value;
|
|
16814
15665
|
}
|
|
16815
15666
|
}
|
|
16816
|
-
const
|
|
15667
|
+
const appConfigurationQuery = new AppConfigurationQuery(sessionStore);
|
|
16817
15668
|
|
|
16818
|
-
|
|
16819
|
-
constructor(
|
|
16820
|
-
|
|
15669
|
+
class AppInsightsService {
|
|
15670
|
+
constructor() {
|
|
15671
|
+
this.appInsights = new Lazy(() => new Initialization({
|
|
15672
|
+
config: {
|
|
15673
|
+
instrumentationKey: appConfigurationQuery.configuration.AppInsightsKey,
|
|
15674
|
+
enableAutoRouteTracking: true,
|
|
15675
|
+
autoTrackPageVisitTime: true,
|
|
15676
|
+
maxBatchInterval: 1000,
|
|
15677
|
+
enableUnhandledPromiseRejectionTracking: true
|
|
15678
|
+
}
|
|
15679
|
+
}));
|
|
16821
15680
|
}
|
|
16822
|
-
|
|
16823
|
-
|
|
15681
|
+
init() {
|
|
15682
|
+
this.appInsights.value.loadAppInsights();
|
|
15683
|
+
setErrorHandler((err) => this.appInsightsErrorHandler(err));
|
|
16824
15684
|
}
|
|
16825
|
-
|
|
16826
|
-
|
|
16827
|
-
const StandardChoiceFormInputDefaultFund = class {
|
|
16828
|
-
constructor(hostRef) {
|
|
16829
|
-
registerInstance(this, hostRef);
|
|
16830
|
-
this.standardChoiceFormSignature = '';
|
|
16831
|
-
this.isSubmitDisabled = true;
|
|
16832
|
-
this.eventTrackingService = EventTrackingService.Instance;
|
|
16833
|
-
this.ignorePopState = () => window.history.pushState(null, '', null);
|
|
15685
|
+
getAppInsights() {
|
|
15686
|
+
return this.appInsights.value;
|
|
16834
15687
|
}
|
|
16835
|
-
|
|
16836
|
-
this.
|
|
16837
|
-
|
|
15688
|
+
addCustomProperties(properties) {
|
|
15689
|
+
this.appInsights.value.addTelemetryInitializer((envelope) => {
|
|
15690
|
+
envelope.data = envelope.data ? envelope.data : {};
|
|
15691
|
+
for (const [k, v] of Object.entries(properties)) {
|
|
15692
|
+
envelope.data[k] = v;
|
|
15693
|
+
}
|
|
15694
|
+
});
|
|
16838
15695
|
}
|
|
16839
|
-
|
|
16840
|
-
|
|
15696
|
+
trackErrorTrace(message) {
|
|
15697
|
+
this.appInsights.value.trackTrace({ message, severityLevel: SeverityLevel.Error });
|
|
16841
15698
|
}
|
|
16842
|
-
|
|
16843
|
-
|
|
16844
|
-
|
|
16845
|
-
|
|
16846
|
-
|
|
16847
|
-
|
|
16848
|
-
|
|
16849
|
-
|
|
16850
|
-
'mt-3': true,
|
|
16851
|
-
'was-validated': this.formState === 'validated'
|
|
16852
|
-
}, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, h("label", { class: "text-sm font-medium text-gray-700" }, "Type your full name"), h("input", { "data-testid": "standard-choice-form-signature-input", type: "text", autocomplete: "off", class: {
|
|
16853
|
-
'shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full text-base sm:text-sm border-gray-300 rounded-md mt-1': true,
|
|
16854
|
-
'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
|
|
16855
|
-
}, required: true, minlength: "2", name: "standardChoiceFormSignature", id: "standardChoiceFormSignature", value: this.standardChoiceFormSignature, onInput: (event) => (this.standardChoiceFormSignature = event.target.value) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Type your full name"), h("div", { class: "mt-6" }, h("sss-button", { testid: "confirm-and-continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Confirm and continue"))))))));
|
|
15699
|
+
appInsightsErrorHandler(error) {
|
|
15700
|
+
this.appInsights.value.trackException({
|
|
15701
|
+
error: error,
|
|
15702
|
+
severityLevel: SeverityLevel.Error
|
|
15703
|
+
});
|
|
15704
|
+
// eslint-disable-next-line no-console
|
|
15705
|
+
const defaultStencilErrorHandler = (error) => console.error(error);
|
|
15706
|
+
defaultStencilErrorHandler(error);
|
|
16856
15707
|
}
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
|
|
16862
|
-
|
|
16863
|
-
}
|
|
15708
|
+
}
|
|
15709
|
+
const appInsights = new AppInsightsService();
|
|
15710
|
+
|
|
15711
|
+
class SuperCampaignErrorApi {
|
|
15712
|
+
static get Instance() {
|
|
15713
|
+
return this.instance || (this.instance = new this());
|
|
16864
15714
|
}
|
|
16865
|
-
async
|
|
16866
|
-
|
|
16867
|
-
promotedFundsShown: superSelectionAppService.promotedFunds,
|
|
16868
|
-
defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
|
|
16869
|
-
};
|
|
16870
|
-
switch (state$1.fundDetails.type) {
|
|
16871
|
-
case 'default':
|
|
16872
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16873
|
-
DefaultFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16874
|
-
});
|
|
16875
|
-
break;
|
|
16876
|
-
case 'myOwnFund':
|
|
16877
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16878
|
-
MyOwnFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16879
|
-
});
|
|
16880
|
-
break;
|
|
16881
|
-
case 'smsf':
|
|
16882
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16883
|
-
Smsf: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16884
|
-
});
|
|
16885
|
-
break;
|
|
16886
|
-
case 'promoted':
|
|
16887
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16888
|
-
PromotedFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16889
|
-
});
|
|
16890
|
-
break;
|
|
16891
|
-
case 'promotedDefault':
|
|
16892
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16893
|
-
PromotedDefaultFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16894
|
-
});
|
|
16895
|
-
break;
|
|
16896
|
-
case 'promotedDefaultWithJoin':
|
|
16897
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16898
|
-
PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16899
|
-
});
|
|
16900
|
-
break;
|
|
16901
|
-
case 'null':
|
|
16902
|
-
throw 'standardChoiceFormState.fundDetails was not set';
|
|
16903
|
-
}
|
|
15715
|
+
async PostError(error) {
|
|
15716
|
+
buildBackendApiClient().url('super-campaign/errors').post(error);
|
|
16904
15717
|
}
|
|
16905
|
-
|
|
16906
|
-
|
|
16907
|
-
|
|
16908
|
-
|
|
16909
|
-
|
|
15718
|
+
}
|
|
15719
|
+
|
|
15720
|
+
const SuperFundDisclaimerViewedDetail = {
|
|
15721
|
+
create: (superCampaignEnabled) => {
|
|
15722
|
+
let isDefinedBenefitsEligibleString = 'Not set';
|
|
15723
|
+
if (Option.isSome(superSelectionAppService.isDefinedBenefitsEligible)) {
|
|
15724
|
+
isDefinedBenefitsEligibleString = superSelectionAppService.isDefinedBenefitsEligible.value
|
|
15725
|
+
? 'True'
|
|
15726
|
+
: 'False';
|
|
16910
15727
|
}
|
|
15728
|
+
return {
|
|
15729
|
+
isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
|
|
15730
|
+
superCampaignEnabled: superCampaignEnabled
|
|
15731
|
+
};
|
|
16911
15732
|
}
|
|
16912
15733
|
};
|
|
16913
15734
|
|
|
16914
|
-
|
|
16915
|
-
|
|
16916
|
-
|
|
16917
|
-
|
|
16918
|
-
|
|
16919
|
-
|
|
16920
|
-
|
|
16921
|
-
|
|
16922
|
-
|
|
16923
|
-
disconnectedCallback() {
|
|
16924
|
-
window.removeEventListener('popstate', this.ignorePopState);
|
|
15735
|
+
class PromotedFundChoiceApi {
|
|
15736
|
+
async submitChoiceAsync(dto) {
|
|
15737
|
+
return buildBackendApiClient()
|
|
15738
|
+
.url('super-choice/promoted-fund')
|
|
15739
|
+
.post(dto)
|
|
15740
|
+
.badRequest(() => {
|
|
15741
|
+
throw new Error('Failed to process Promoted Fund choice request');
|
|
15742
|
+
})
|
|
15743
|
+
.text();
|
|
16925
15744
|
}
|
|
16926
|
-
|
|
16927
|
-
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
|
|
15745
|
+
async submitDefaultChoiceAsync(dto) {
|
|
15746
|
+
return buildBackendApiClient()
|
|
15747
|
+
.url('super-choice/promoted-fund/default')
|
|
15748
|
+
.post(dto)
|
|
15749
|
+
.badRequest(() => {
|
|
15750
|
+
throw new Error('Failed to process Promoted Default Fund choice request');
|
|
15751
|
+
})
|
|
15752
|
+
.text();
|
|
16931
15753
|
}
|
|
16932
|
-
|
|
16933
|
-
|
|
15754
|
+
async submitDefaultChoiceWithJoinAsync(dto) {
|
|
15755
|
+
return buildBackendApiClient()
|
|
15756
|
+
.url('super-choice/promoted-fund/default-with-join')
|
|
15757
|
+
.post(dto)
|
|
15758
|
+
.badRequest(() => {
|
|
15759
|
+
throw new Error('Failed to process Promoted Default Fund With Join choice request');
|
|
15760
|
+
})
|
|
15761
|
+
.text();
|
|
16934
15762
|
}
|
|
16935
|
-
}
|
|
15763
|
+
}
|
|
15764
|
+
const promotedFundChoiceApi = new PromotedFundChoiceApi();
|
|
16936
15765
|
|
|
16937
|
-
class
|
|
16938
|
-
|
|
16939
|
-
return
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
15766
|
+
class SlateChoiceApi {
|
|
15767
|
+
async submitSlateChoiceAsync(dto) {
|
|
15768
|
+
return buildBackendApiClient()
|
|
15769
|
+
.url('super-choice/slate')
|
|
15770
|
+
.post(dto)
|
|
15771
|
+
.badRequest(() => {
|
|
15772
|
+
throw new Error('Failed to process Slate join request');
|
|
15773
|
+
})
|
|
15774
|
+
.text();
|
|
16943
15775
|
}
|
|
16944
15776
|
}
|
|
15777
|
+
const slateChoiceApi = new SlateChoiceApi();
|
|
16945
15778
|
|
|
16946
15779
|
class MiscService {
|
|
16947
15780
|
trackClickPromotedTileAsync(payload) {
|
|
@@ -17101,9 +15934,6 @@ const SuperCampaignHost = class {
|
|
|
17101
15934
|
}
|
|
17102
15935
|
return Promise.resolve();
|
|
17103
15936
|
};
|
|
17104
|
-
this.getFundName = (fundId) => {
|
|
17105
|
-
return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
|
|
17106
|
-
};
|
|
17107
15937
|
this.stringIsNullOrEmtpty = (s) => {
|
|
17108
15938
|
return !(typeof s === 'string' && s.trim().length > 0);
|
|
17109
15939
|
};
|
|
@@ -17113,21 +15943,20 @@ const SuperCampaignHost = class {
|
|
|
17113
15943
|
return;
|
|
17114
15944
|
}
|
|
17115
15945
|
const usi = Usi.clean(data.usi);
|
|
17116
|
-
const fundName = this.getFundName(data.fundId);
|
|
17117
15946
|
const defaultFundUsiSet = Option.toUndefined(superSelectionAppService.defaultFundUsi);
|
|
17118
15947
|
navigationService.navigateInternallyToStandardChoice({
|
|
17119
15948
|
history: this.history,
|
|
17120
|
-
fundName,
|
|
15949
|
+
fundName: data.fundName,
|
|
17121
15950
|
promotedFundId: data.fundId,
|
|
17122
15951
|
fundDetails: {
|
|
17123
15952
|
type: 'promoted',
|
|
17124
|
-
fundName,
|
|
15953
|
+
fundName: data.fundName,
|
|
17125
15954
|
fundUsi: usi,
|
|
17126
15955
|
memberNumber: data.memberNumber,
|
|
17127
15956
|
promotedFundId: data.fundId
|
|
17128
15957
|
},
|
|
17129
15958
|
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
17130
|
-
if (data.fundId ==
|
|
15959
|
+
if (data.fundId == slate.fundId) {
|
|
17131
15960
|
await slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature,
|
|
17132
15961
|
defaultFundUsiSet }, this.PromotedFundsConfig));
|
|
17133
15962
|
}
|
|
@@ -17145,14 +15974,13 @@ const SuperCampaignHost = class {
|
|
|
17145
15974
|
return;
|
|
17146
15975
|
}
|
|
17147
15976
|
const usi = Usi.clean(data.usi);
|
|
17148
|
-
const fundName = this.getFundName(data.fundId);
|
|
17149
15977
|
navigationService.navigateInternallyToStandardChoice({
|
|
17150
15978
|
history: this.history,
|
|
17151
|
-
fundName,
|
|
15979
|
+
fundName: data.fundName,
|
|
17152
15980
|
promotedFundId: data.fundId,
|
|
17153
15981
|
fundDetails: {
|
|
17154
15982
|
type: 'promotedDefault',
|
|
17155
|
-
fundName,
|
|
15983
|
+
fundName: data.fundName,
|
|
17156
15984
|
fundUsi: usi,
|
|
17157
15985
|
promotedFundId: data.fundId
|
|
17158
15986
|
},
|
|
@@ -17166,14 +15994,13 @@ const SuperCampaignHost = class {
|
|
|
17166
15994
|
return;
|
|
17167
15995
|
}
|
|
17168
15996
|
const usi = Usi.clean(data.usi);
|
|
17169
|
-
const fundName = this.getFundName(data.fundId);
|
|
17170
15997
|
navigationService.navigateInternallyToStandardChoice({
|
|
17171
15998
|
history: this.history,
|
|
17172
|
-
fundName,
|
|
15999
|
+
fundName: data.fundName,
|
|
17173
16000
|
promotedFundId: data.fundId,
|
|
17174
16001
|
fundDetails: {
|
|
17175
16002
|
type: 'promotedDefaultWithJoin',
|
|
17176
|
-
fundName,
|
|
16003
|
+
fundName: data.fundName,
|
|
17177
16004
|
fundUsi: usi,
|
|
17178
16005
|
memberNumber: data.memberNumber,
|
|
17179
16006
|
promotedFundId: data.fundId
|
|
@@ -17206,7 +16033,7 @@ const SuperCampaignHost = class {
|
|
|
17206
16033
|
async componentWillLoad() {
|
|
17207
16034
|
if (superSelectionAppService.state.superCampaignComponentStatus ===
|
|
17208
16035
|
SuperCampaignComponentStatus.NotWorking) {
|
|
17209
|
-
|
|
16036
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
|
|
17210
16037
|
return;
|
|
17211
16038
|
}
|
|
17212
16039
|
let superCampaingScriptPath = undefined;
|
|
@@ -17280,136 +16107,6 @@ const SuperCampaignHost = class {
|
|
|
17280
16107
|
};
|
|
17281
16108
|
injectHistory(SuperCampaignHost);
|
|
17282
16109
|
|
|
17283
|
-
const SuperChoiceItemBottom = class {
|
|
17284
|
-
constructor(hostRef) {
|
|
17285
|
-
registerInstance(this, hostRef);
|
|
17286
|
-
this.joinFundClicked = createEvent(this, "joinFundClicked", 7);
|
|
17287
|
-
}
|
|
17288
|
-
render() {
|
|
17289
|
-
return (h(Host, null, h("div", { class: "py-6 px-4 flex flex-col justify-between h-full" }, h("div", null, h("div", { class: { 'md:max-w-[240px]': true, 'lg:max-w-full': this.isMultiFund } }, h("sss-button", { testid: "choose-this-fund-button", class: "uuid-button-continue", fillWidth: true, onClick: () => this.handleFundClick() }, "Choose this fund")), h("div", { class: "text-xs text-gray-500 mt-6 leading-4" }, this.disclaimer)), this.abnInfo && this.abn && (h("div", { class: "text-xs text-gray-500 mt-2" }, h("p", null, "Issued by ", this.abnInfo, "."), h("p", null, "ABN: ", this.abn))))));
|
|
17290
|
-
}
|
|
17291
|
-
handleFundClick() {
|
|
17292
|
-
return this.joinFundClicked.emit();
|
|
17293
|
-
}
|
|
17294
|
-
};
|
|
17295
|
-
|
|
17296
|
-
const SuperChoiceItemTop = class {
|
|
17297
|
-
constructor(hostRef) {
|
|
17298
|
-
registerInstance(this, hostRef);
|
|
17299
|
-
}
|
|
17300
|
-
render() {
|
|
17301
|
-
return (h(Host, null, h("div", { class: "px-4 pt-6" }, h("div", { class: "text-right w-100 -mt-5 -mr-2" }, this.extraBadge, this.isPromotedDefault && (h("span", { class: "text-xs bg-blue-100 text-blue-800 font-medium rounded-xl py-0.5 px-2.5 mr-1" }, "Employer Default")), h("span", { class: "text-xs bg-gray-100 text-gray-800 font-medium rounded-xl py-0.5 px-2.5 mr-0.5" }, "Featured")), h("div", { class: { 'flex lg:block mt-2 md:mt-0': true, 'lg:mt-4': this.isMultiFund } }, h("img", { class: {
|
|
17302
|
-
'h-12 md:h-14 lg:h-16 object-contain w-[80px] md:w-[96px] lg:w-[140px] md:hidden lg:object-left': true,
|
|
17303
|
-
'lg:block': this.isMultiFund
|
|
17304
|
-
}, alt: this.name, src: getAssetPath(`assets/${this.logo}`) }), h("div", { class: "grid content-center" }, h("p", { class: {
|
|
17305
|
-
'text-base md:text-lg font-bold ml-4 md:ml-0 md:mb-0': true,
|
|
17306
|
-
'lg:mt-4': this.isMultiFund
|
|
17307
|
-
} }, this.name))), h("div", { class: "mt-4 sm:mt-2 text-sm space-y-2" }, this.features.map((feature) => (h("div", { class: "flex" }, h("div", { class: "h-5 w-5 flex-none mr-1.5" }, h("img", { alt: "checked", src: getAssetPath(`assets/icon-check.svg`) })), h("div", { class: "leading-5" }, feature))))), this.featureSubText && (h("p", { class: "text-xs text-gray-500 italic mt-4 leading-4" }, this.featureSubText)), this.customContent)));
|
|
17308
|
-
}
|
|
17309
|
-
};
|
|
17310
|
-
|
|
17311
|
-
const SuperChoicePage = class {
|
|
17312
|
-
constructor(hostRef) {
|
|
17313
|
-
registerInstance(this, hostRef);
|
|
17314
|
-
this.promotedFunds = this.getPromotedFunds();
|
|
17315
|
-
this.eventTrackingService = EventTrackingService.Instance;
|
|
17316
|
-
}
|
|
17317
|
-
async componentDidLoad() {
|
|
17318
|
-
const promotedFundsShown = this.promotedFunds.map((item) => item.fundId);
|
|
17319
|
-
await superSelectionAppService.viewSuperFundPanelAsync(promotedFundsShown);
|
|
17320
|
-
}
|
|
17321
|
-
render() {
|
|
17322
|
-
const mygovLink = 'https://my.gov.au';
|
|
17323
|
-
const mygovLinkDisplay = 'www.my.gov.au';
|
|
17324
|
-
const superfundsLink = 'https://www.apra.gov.au/register-of-superannuation-institutions';
|
|
17325
|
-
const superfundsLinkDisplay = 'www.apra.gov.au';
|
|
17326
|
-
const isMultiFund = this.promotedFunds.length > 1;
|
|
17327
|
-
return (h(Host, null, h("div", null, h("sss-header-section", { currentPage: "choice" }), h("div", { class: "mt-8 text-sm text-center leading-6" }, h("p", { class: "leading-6" }, "Not ready to join a new fund, or want to nominate another super fund?"), h("stencil-route-link", { url: SuperSelectionAppRoutes.MyOwnFund }, h("span", { class: "inline-block text-primary-base font-medium mt-3" }, "Skip Featured Funds\u00A0", h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", class: "inline h-5 w-5 fill-primary-base group-hover:fill-white" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3" }))))), h("div", { class: "flex justify-center mt-8" }, h("div", { class: {
|
|
17328
|
-
'lg:grid border-l border-t lg:border-b rounded-lg': true,
|
|
17329
|
-
'lg:grid-cols-1 max-w-720': this.promotedFunds.length === 1,
|
|
17330
|
-
'lg:grid-cols-2 max-w-720': this.promotedFunds.length === 2,
|
|
17331
|
-
'lg:grid-cols-3 max-w-960': this.promotedFunds.length === 3
|
|
17332
|
-
} }, this.promotedFunds.map((fund, index) => (h("div", { class: {
|
|
17333
|
-
'border-r': true,
|
|
17334
|
-
'rounded-tr-lg': index === 0,
|
|
17335
|
-
'lg:rounded-tr-none': index === 0 && index !== this.promotedFunds.length - 1,
|
|
17336
|
-
'rounded-br-lg lg:rounded-br-none lg:rounded-tr-lg': index === this.promotedFunds.length - 1
|
|
17337
|
-
} }, h("div", { class: {
|
|
17338
|
-
'flex border-b lg:border-b-0': true,
|
|
17339
|
-
'rounded-b-lg': index === this.promotedFunds.length - 1
|
|
17340
|
-
} }, h("div", { class: {
|
|
17341
|
-
'hidden md:flex w-36 justify-center pt-6 pl-6': true,
|
|
17342
|
-
'lg:hidden': isMultiFund
|
|
17343
|
-
} }, h("img", { class: "h-16 object-contain w-full max-w-[96px]", alt: fund.name, src: getAssetPath(`assets/${fund.logo}`) })), h("div", { class: "w-full" }, h("sss-super-choice-item-top", { logo: fund.logo, name: fund.name, features: fund.features, featureSubText: fund.featureSubText, customContent: fund.customContent, isMultiFund: isMultiFund, isPromotedDefault: fund.isPromotedDefault, extraBadge: fund.extraBadge }), h("div", { class: { 'lg:hidden': isMultiFund } }, h("sss-super-choice-item-bottom", { disclaimer: fund.disclaimer, abnInfo: fund.abnInfo, abn: fund.abn, isMultiFund: isMultiFund, onJoinFundClicked: async () => this.handleJoinSuperClickAsync(fund) }))))))), this.promotedFunds.map((fund, index) => (h("div", { class: {
|
|
17344
|
-
'hidden border-r': true,
|
|
17345
|
-
'lg:block': isMultiFund,
|
|
17346
|
-
'rounded-br-lg': index === this.promotedFunds.length - 1
|
|
17347
|
-
} }, h("sss-super-choice-item-bottom", { disclaimer: fund.disclaimer, abnInfo: fund.abnInfo, abn: fund.abn, isMultiFund: isMultiFund, onJoinFundClicked: async () => this.handleJoinSuperClickAsync(fund) })))))), h("div", { class: "flex justify-center mt-8 sm:mt-12" }, h("div", { class: "pb-8 sm:pb-12 max-w-720 border-b" }, h("h5", { class: "font-bold sm:text-lg" }, "Or, choose another super fund:"), h("ul", { class: "list-disc list-outside ml-6 mt-3 mb-6 space-y-2 leading-6 text-sm sm:text-base" }, h("li", null, "Select this option if you'd like to use your current account with another super fund, your self-managed super fund, or your employer's default fund."), h("li", null, "If you are unsure of your current super fund details, you can find out at", ' ', h("a", { class: "text-primary-base font-medium hover:text-primary-hover", target: "_blank", href: navigationService.toExternalUrl(mygovLink) }, mygovLinkDisplay)), h("li", null, "A full list of super funds can be viewed at", ' ', h("a", { class: "text-primary-base font-medium hover:text-primary-hover", target: "_blank", href: navigationService.toExternalUrl(superfundsLink) }, superfundsLinkDisplay))), h("stencil-route-link", { url: SuperSelectionAppRoutes.MyOwnFund }, h("sss-button", { testid: "choose-another-super-fund-button", fillWidthOnMobile: true }, "Choose another super fund")))), h("div", { class: "flex justify-center" }, h("div", { class: "pt-8 sm:pt-12 max-w-720" }, h("h5", { class: "font-semibold" }, "IMPORTANT INFORMATION:"), h("ul", { class: "list-disc list-outside ml-6 mt-3 space-y-2 text-sm leading-6" }, h("li", null, "The superannuation funds featured above are for your information only. The order, position and placement of content should not be interpreted as an opinion or recommendation (actual or implied) by Flare as to the suitability or appropriateness of any superannuation fund for you. In featuring these superannuation funds, Flare has not taken into account your objectives, financial situation or needs."), h("li", null, "This is not a comparison service. This page contains factual information only and does not constitute either general or personal advice about any financial products. We do not take into account your objectives, financial situation or needs. If you have questions or need help making a decision about your superannuation fund, you should speak to a licensed financial product advice provider."), h("li", null, "Flare, the technology partner you are accessing Flare via and your employer do not endorse or accept responsibility for any financial product advice or services provided by the promoters or trustees of the featured superannuation funds. Flare does not endorse or accept responsibility for any of the content shown about any of the featured superannuation funds."), h("li", null, "You should consider the relevant superannuation fund\u2019s PDS and TMD (if applicable) in deciding whether to apply to join the superannuation fund. Each of the superannuation funds featured above include a link to their PDS and TMD (if applicable) for your convenience. If you are considering joining another superannuation fund, you can typically find the PDS and TMD (if applicable) on that fund\u2019s website."), h("li", null, "You should be aware that the trustees of featured superannuation funds pay fees to Flare and/or its associates. Some funds pay us a fee if you choose one of the featured funds, while others pay us to have their application form on our platform.")))))));
|
|
17348
|
-
}
|
|
17349
|
-
getPromotedFunds() {
|
|
17350
|
-
const fundTiles = [];
|
|
17351
|
-
superSelectionAppService.promotedFunds.forEach((fundId) => {
|
|
17352
|
-
const fund = allPromotedFunds.find((fund) => fundId === fund.fundId);
|
|
17353
|
-
if (fund !== undefined) {
|
|
17354
|
-
fundTiles.push(fund);
|
|
17355
|
-
}
|
|
17356
|
-
});
|
|
17357
|
-
return fundTiles;
|
|
17358
|
-
}
|
|
17359
|
-
async handleJoinSuperClickAsync(fund) {
|
|
17360
|
-
const promotedFundsShown = superSelectionAppService.promotedFunds;
|
|
17361
|
-
const fundUsi = getFundUsiByFundId(fund.fundId);
|
|
17362
|
-
const fundName = getFundNameByFundId(fund.fundId);
|
|
17363
|
-
await Promise.all([
|
|
17364
|
-
fund.isPromotedDefault == true
|
|
17365
|
-
? this.eventTrackingService.TrackPromotedDefaultSuperFundDetailViewedAsync({
|
|
17366
|
-
fundUsi: Option.isSome(fundUsi) ? fundUsi.value : '',
|
|
17367
|
-
fundName: Option.isSome(fundName) ? fundName.value : '',
|
|
17368
|
-
promotedFundId: fund.fundId,
|
|
17369
|
-
promotedFundsShown,
|
|
17370
|
-
defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
|
|
17371
|
-
superCampaignEnabled: false
|
|
17372
|
-
})
|
|
17373
|
-
: this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({
|
|
17374
|
-
fundUsi: Option.isSome(fundUsi) ? fundUsi.value : undefined,
|
|
17375
|
-
fundName: Option.isSome(fundName) ? fundName.value : '',
|
|
17376
|
-
promotedFundId: fund.fundId,
|
|
17377
|
-
promotedFundsShown,
|
|
17378
|
-
defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
|
|
17379
|
-
superCampaignEnabled: false
|
|
17380
|
-
}),
|
|
17381
|
-
miscService.trackClickPromotedTileAsync(fund.isPromotedDefault
|
|
17382
|
-
? {
|
|
17383
|
-
promotedDefault: {
|
|
17384
|
-
fundId: fund.fundId
|
|
17385
|
-
}
|
|
17386
|
-
}
|
|
17387
|
-
: {
|
|
17388
|
-
promoted: {
|
|
17389
|
-
fundId: fund.fundId
|
|
17390
|
-
}
|
|
17391
|
-
})
|
|
17392
|
-
]);
|
|
17393
|
-
state.fund = {
|
|
17394
|
-
id: fund.fundId,
|
|
17395
|
-
type: fund.isPromotedDefault ? 'PromotedDefault' : 'Promoted'
|
|
17396
|
-
};
|
|
17397
|
-
return navigationService.navigateInternally(this.history, fund.route);
|
|
17398
|
-
}
|
|
17399
|
-
static get assetsDirs() { return ["assets"]; }
|
|
17400
|
-
};
|
|
17401
|
-
injectHistory(SuperChoicePage);
|
|
17402
|
-
|
|
17403
|
-
const SuperChoicePageWrapper = class {
|
|
17404
|
-
constructor(hostRef) {
|
|
17405
|
-
registerInstance(this, hostRef);
|
|
17406
|
-
}
|
|
17407
|
-
render() {
|
|
17408
|
-
return superSelectionAppService.state.superCampaignEnabled ? (h("sss-super-campaign-host", null)) : (h("sss-super-choice-page", null));
|
|
17409
|
-
}
|
|
17410
|
-
};
|
|
17411
|
-
injectHistory(SuperChoicePageWrapper);
|
|
17412
|
-
|
|
17413
16110
|
const routeCss = "stencil-route.inactive{display:none}";
|
|
17414
16111
|
|
|
17415
16112
|
const Route = class {
|
|
@@ -18406,7 +17103,7 @@ const SuperSelectionApp = class {
|
|
|
18406
17103
|
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ExistingChoicePage);
|
|
18407
17104
|
}
|
|
18408
17105
|
else {
|
|
18409
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
17106
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
18410
17107
|
}
|
|
18411
17108
|
}
|
|
18412
17109
|
authTokenChanged(newValue) {
|
|
@@ -18418,24 +17115,12 @@ const SuperSelectionApp = class {
|
|
|
18418
17115
|
render() {
|
|
18419
17116
|
return (h(Host, null, h("link", { rel: "stylesheet", href: getAssetPath('apollo-super-selection.css'), media: "all" }), this.renderAppContent()));
|
|
18420
17117
|
}
|
|
18421
|
-
isFundJoinPage() {
|
|
18422
|
-
return (window.location.pathname.includes(SuperSelectionAppRoutes.SlateJoin) ||
|
|
18423
|
-
window.location.pathname.includes(SuperSelectionAppRoutes.PromotedFundJoinV1) ||
|
|
18424
|
-
window.location.pathname.includes(SuperSelectionAppRoutes.PromotedFundJoinV2));
|
|
18425
|
-
}
|
|
18426
|
-
getFooterTextOverride() {
|
|
18427
|
-
return getFooterTextOverrideByFundId(state.fund.id);
|
|
18428
|
-
}
|
|
18429
17118
|
routerBaseUrl() {
|
|
18430
17119
|
var _a;
|
|
18431
17120
|
return ((_a = this.appBaseUrl) === null || _a === void 0 ? void 0 : _a.replace(/\/$/, '')) + '/';
|
|
18432
17121
|
}
|
|
18433
17122
|
renderAppContent() {
|
|
18434
|
-
return (h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" }, h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (h("div", { class: {
|
|
18435
|
-
'pt-28': true,
|
|
18436
|
-
'-mt-12 pb-6': !this.isFundJoinPage(),
|
|
18437
|
-
'-mt-28': this.isFundJoinPage() // -mt value same as pt to negate it in embedded fund join pages
|
|
18438
|
-
} }, superSelectionAppStencilRoutes, h("sss-footer-section", { textOverride: this.getFooterTextOverride() }))) : (h("div", { class: "flex justify-center py-20" }, h("sss-loading-indicator", null))))));
|
|
17123
|
+
return (h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" }, h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (h("div", { class: "pt-28 -mt-12 pb-6" }, superSelectionAppStencilRoutes, h("sss-footer-section", null))) : (h("div", { class: "flex justify-center py-20" }, h("sss-loading-indicator", null))))));
|
|
18439
17124
|
}
|
|
18440
17125
|
static get assetsDirs() { return ["assets"]; }
|
|
18441
17126
|
static get watchers() { return {
|
|
@@ -19048,6 +17733,30 @@ class AuthenticationService {
|
|
|
19048
17733
|
}
|
|
19049
17734
|
const authenticationService = new AuthenticationService();
|
|
19050
17735
|
|
|
17736
|
+
class InteropQuery extends Query {
|
|
17737
|
+
constructor(store) {
|
|
17738
|
+
super(store);
|
|
17739
|
+
this.store = store;
|
|
17740
|
+
}
|
|
17741
|
+
isReactNativeInteropEnabled() {
|
|
17742
|
+
return isSome(this.getValue().reactNativeInterop);
|
|
17743
|
+
}
|
|
17744
|
+
isIframeInteropEnabled() {
|
|
17745
|
+
return isSome(this.getValue().iframeInterop);
|
|
17746
|
+
}
|
|
17747
|
+
getIframeInteropMode() {
|
|
17748
|
+
const iframeInterop = this.getValue().iframeInterop;
|
|
17749
|
+
if (isNone(iframeInterop)) {
|
|
17750
|
+
throw Error('Failed to get iframe interop information: no data in store');
|
|
17751
|
+
}
|
|
17752
|
+
if (!this.isIframeInteropEnabled()) {
|
|
17753
|
+
throw Error('Failed to get iframe interop information: iframe mode is disabled');
|
|
17754
|
+
}
|
|
17755
|
+
return iframeInterop.value;
|
|
17756
|
+
}
|
|
17757
|
+
}
|
|
17758
|
+
const interopQuery = new InteropQuery(sessionStore);
|
|
17759
|
+
|
|
19051
17760
|
class IFrameInteropService {
|
|
19052
17761
|
static completeSuperSelectionStep() {
|
|
19053
17762
|
const { successRedirectionUrl } = interopQuery.getIframeInteropMode();
|
|
@@ -19211,4 +17920,4 @@ const SuperSelectionAppHost = class {
|
|
|
19211
17920
|
};
|
|
19212
17921
|
SuperSelectionAppHost.style = superSelectionAppHostCss;
|
|
19213
17922
|
|
|
19214
|
-
export { Button as sss_button,
|
|
17923
|
+
export { Button as sss_button, CustomFund as sss_custom_fund, DefaultFund as sss_default_fund, SelectInputAsync as sss_dropdown_async, ExistingChoice as sss_existing_choice_page, FooterSection as sss_footer_section, HeaderSection as sss_header_section, LoadingIndicator as sss_loading_indicator, LoadingPage as sss_loading_page, MyOwnFund as sss_my_own_fund, MyOwnFundInputs as sss_my_own_fund_inputs, MemberNameInput as sss_name_input, Prefill as sss_prefill, DisplayField as sss_prefill_display_field, PrefillErrorBox as sss_prefill_error_box, PrefillInvalidMyOwnFund as sss_prefill_invalid_my_own_fund, PrefillInvalidSMSF as sss_prefill_invalid_smsf, PrefillMyOwnFund as sss_prefill_my_own_fund, PrefillSMSF as sss_prefill_smsf, PrefillWarningBox as sss_prefill_warning_box, SelfManagedFund as sss_self_managed_fund, SelfManagedFundInputs as sss_self_managed_fund_inputs, StandardChoiceFormInputDefaultFund as sss_standard_choice_form, Success as sss_success, SuperCampaignHost as sss_super_campaign_host, Route as stencil_route, RouteLink$1 as stencil_route_link, RouteSwitch as stencil_route_switch, Router as stencil_router, SuperSelectionApp as super_selection_app, SuperSelectionAppHost as super_selection_app_host };
|