@flarehr/apollo-super-selection 5.23.54085 → 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} +945 -2213
- 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 +52 -24
- 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 +5 -8
- 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} +946 -2202
- 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 +2 -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-8e24008c.system.entry.js +0 -69
- package/dist/lib/apollo-super-selection/p-a8cbd8bb.entry.js +0 -14
- 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,59 @@ 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 '';
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
function getPromotedFundId(dto) {
|
|
3429
|
+
switch (dto.kind) {
|
|
3430
|
+
case 'slate':
|
|
3431
|
+
return slate.fundId;
|
|
3432
|
+
case 'australianRetirementTrust':
|
|
3433
|
+
return 'australian-retirement-trust';
|
|
3434
|
+
case 'aware':
|
|
3435
|
+
return 'aware';
|
|
3436
|
+
case 'active':
|
|
3437
|
+
return 'active';
|
|
3438
|
+
case 'australianEthical':
|
|
3439
|
+
return 'australian-ethical';
|
|
3440
|
+
case 'virgin':
|
|
3441
|
+
return 'virgin';
|
|
3442
|
+
case 'spirit':
|
|
3443
|
+
return 'spirit';
|
|
3444
|
+
case 'firstSuper':
|
|
3445
|
+
return 'first-super';
|
|
3446
|
+
case 'mercerMyChoice':
|
|
3447
|
+
return 'mercermychoice';
|
|
3448
|
+
case 'generic':
|
|
3449
|
+
return dto.generic.fundId;
|
|
3450
|
+
default:
|
|
3451
|
+
return '';
|
|
3345
3452
|
}
|
|
3346
3453
|
}
|
|
3347
3454
|
function getSuperChoiceUsi(dto) {
|
|
3348
3455
|
switch (dto.kind) {
|
|
3349
3456
|
case 'Promoted':
|
|
3350
|
-
return getPromotedFundUsi(dto.promoted);
|
|
3457
|
+
return some(getPromotedFundUsi(dto.promoted));
|
|
3351
3458
|
case 'MyOwnFund':
|
|
3352
3459
|
return some(dto.myOwnFund.usi);
|
|
3353
3460
|
case 'SMSF':
|
|
@@ -3367,33 +3474,33 @@ function getSuperChoiceUsi(dto) {
|
|
|
3367
3474
|
function getPromotedFundMemberNumber(dto) {
|
|
3368
3475
|
switch (dto.kind) {
|
|
3369
3476
|
case 'slate':
|
|
3370
|
-
return
|
|
3477
|
+
return dto.slate.memberNumber;
|
|
3371
3478
|
case 'australianRetirementTrust':
|
|
3372
|
-
return
|
|
3479
|
+
return dto.australianRetirementTrust.memberNumber;
|
|
3373
3480
|
case 'aware':
|
|
3374
|
-
return
|
|
3481
|
+
return dto.aware.memberNumber;
|
|
3375
3482
|
case 'active':
|
|
3376
|
-
return
|
|
3483
|
+
return dto.active.memberNumber;
|
|
3377
3484
|
case 'australianEthical':
|
|
3378
|
-
return
|
|
3485
|
+
return dto.australianEthical.memberNumber;
|
|
3379
3486
|
case 'virgin':
|
|
3380
|
-
return
|
|
3487
|
+
return dto.virgin.memberNumber;
|
|
3381
3488
|
case 'spirit':
|
|
3382
|
-
return
|
|
3489
|
+
return dto.spirit.memberNumber;
|
|
3383
3490
|
case 'firstSuper':
|
|
3384
|
-
return
|
|
3491
|
+
return dto.firstSuper.memberNumber;
|
|
3385
3492
|
case 'mercerMyChoice':
|
|
3386
|
-
return
|
|
3493
|
+
return dto.mercerMyChoice.memberNumber;
|
|
3387
3494
|
case 'generic':
|
|
3388
|
-
return
|
|
3495
|
+
return dto.generic.memberNumber;
|
|
3389
3496
|
default:
|
|
3390
|
-
return
|
|
3497
|
+
return '';
|
|
3391
3498
|
}
|
|
3392
3499
|
}
|
|
3393
3500
|
function getSuperChoiceMemberNumber(dto) {
|
|
3394
3501
|
switch (dto.kind) {
|
|
3395
3502
|
case 'Promoted':
|
|
3396
|
-
return getPromotedFundMemberNumber(dto.promoted);
|
|
3503
|
+
return some(getPromotedFundMemberNumber(dto.promoted));
|
|
3397
3504
|
case 'MyOwnFund':
|
|
3398
3505
|
return some(dto.myOwnFund.memberNumber);
|
|
3399
3506
|
case 'DefinedBenefits':
|
|
@@ -3471,15 +3578,6 @@ class SuperSelectionApi {
|
|
|
3471
3578
|
}
|
|
3472
3579
|
return response;
|
|
3473
3580
|
}
|
|
3474
|
-
async getCampaignConnectAsync() {
|
|
3475
|
-
return buildBackendApiClient()
|
|
3476
|
-
.url('campaign-connect')
|
|
3477
|
-
.get()
|
|
3478
|
-
.notFound(() => {
|
|
3479
|
-
throw new Error('Failed to fetch campaign connect.');
|
|
3480
|
-
})
|
|
3481
|
-
.json();
|
|
3482
|
-
}
|
|
3483
3581
|
async clickPromotedTileAsync(payload) {
|
|
3484
3582
|
return buildBackendApiClient().url('click-promoted-tile').post(payload).res();
|
|
3485
3583
|
}
|
|
@@ -3534,10 +3632,8 @@ const initialState = {
|
|
|
3534
3632
|
profileConfiguration: Option.none,
|
|
3535
3633
|
hasSuccessPageBeenAcknowledged: false,
|
|
3536
3634
|
hasSuperSelectionBeenSubmitted: false,
|
|
3537
|
-
campaignConnectEnabled: false,
|
|
3538
3635
|
isDefinedBenefitsEligible: Option.none,
|
|
3539
|
-
|
|
3540
|
-
superCampaignEnabled: false,
|
|
3636
|
+
superCampaignEnabled: true,
|
|
3541
3637
|
superCampaignState: undefined,
|
|
3542
3638
|
superCampaignComponentStatus: SuperCampaignComponentStatus.NotLoaded,
|
|
3543
3639
|
superCampaignIsInView: false
|
|
@@ -3580,9 +3676,6 @@ class SuperSelectionAppService {
|
|
|
3580
3676
|
if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
|
|
3581
3677
|
return this.superCampaignState.PromotedFundIds;
|
|
3582
3678
|
}
|
|
3583
|
-
if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
|
|
3584
|
-
return this._state.campaignConnect.value.promotedFunds.map((v) => v.fundId);
|
|
3585
|
-
}
|
|
3586
3679
|
if (Option.isNone(this._state.promotedFunds)) {
|
|
3587
3680
|
throw Error('Promoted Funds is not set');
|
|
3588
3681
|
}
|
|
@@ -3592,35 +3685,15 @@ class SuperSelectionAppService {
|
|
|
3592
3685
|
if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
|
|
3593
3686
|
return Option.fromNullable(this.superCampaignState.DefaultFundPosition);
|
|
3594
3687
|
}
|
|
3595
|
-
if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
|
|
3596
|
-
const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => v.type === 'promoted-default');
|
|
3597
|
-
if (index === -1) {
|
|
3598
|
-
return Option.fromNullable(null);
|
|
3599
|
-
}
|
|
3600
|
-
else {
|
|
3601
|
-
return Option.fromNullable(index + 1);
|
|
3602
|
-
}
|
|
3603
|
-
}
|
|
3604
3688
|
return Option.none;
|
|
3605
3689
|
}
|
|
3606
3690
|
get promotedFundsConfig() {
|
|
3607
3691
|
return {
|
|
3608
3692
|
shownFunds: this.promotedFunds,
|
|
3609
3693
|
promotedDefaultFundPosition: Option.toUndefined(this.promotedDefaultFundPosition),
|
|
3610
|
-
promotedFundsConfigSource: this.isUsingSuperCampaign
|
|
3611
|
-
? 'superCampaign'
|
|
3612
|
-
: Option.isSome(this._state.campaignConnect)
|
|
3613
|
-
? 'campaignConnect'
|
|
3614
|
-
: 'superSelection'
|
|
3694
|
+
promotedFundsConfigSource: this.isUsingSuperCampaign ? 'superCampaign' : 'superSelection'
|
|
3615
3695
|
};
|
|
3616
3696
|
}
|
|
3617
|
-
get definedBenefitsFundId() {
|
|
3618
|
-
if (Option.isSome(this._state.campaignConnect)) {
|
|
3619
|
-
const definedBenefitsFund = this._state.campaignConnect.value.promotedFunds.find((fund) => fund.type == 'defined-benefits');
|
|
3620
|
-
return Option.fromNullable(definedBenefitsFund === null || definedBenefitsFund === void 0 ? void 0 : definedBenefitsFund.fundId);
|
|
3621
|
-
}
|
|
3622
|
-
return Option.none;
|
|
3623
|
-
}
|
|
3624
3697
|
get profileId() {
|
|
3625
3698
|
if (Option.isNone(this._state.profileId)) {
|
|
3626
3699
|
throw Error('Failed to get Profile ID from JWT');
|
|
@@ -3652,9 +3725,6 @@ class SuperSelectionAppService {
|
|
|
3652
3725
|
markSuperSelectionAsSubmitted() {
|
|
3653
3726
|
this._state.hasSuperSelectionBeenSubmitted = true;
|
|
3654
3727
|
}
|
|
3655
|
-
get campaignConnectEnabled() {
|
|
3656
|
-
return this._state.campaignConnectEnabled;
|
|
3657
|
-
}
|
|
3658
3728
|
get isDefinedBenefitsEligible() {
|
|
3659
3729
|
return this._state.isDefinedBenefitsEligible;
|
|
3660
3730
|
}
|
|
@@ -3664,17 +3734,9 @@ class SuperSelectionAppService {
|
|
|
3664
3734
|
this._state.profileConfiguration = Option.fromNullable(appStateResponse.profileConfiguration);
|
|
3665
3735
|
this._state.superBuyer = Option.fromNullable(appStateResponse.superBuyer);
|
|
3666
3736
|
this._state.promotedFunds = Option.fromNullable(appStateResponse.promotedFunds);
|
|
3667
|
-
this._state.campaignConnectEnabled = appStateResponse.campaignConnectEnabled;
|
|
3668
|
-
this._state.superCampaignEnabled = appStateResponse.superCampaignEnabled;
|
|
3669
3737
|
this._state.superChoicePrefill = Option.fromNullable(appStateResponse.prefill);
|
|
3670
3738
|
this._state.isDefinedBenefitsEligible = Option.fromNullable(appStateResponse.isDefinedBenefitsEligible);
|
|
3671
3739
|
}
|
|
3672
|
-
async loadCampaignConnectAsync() {
|
|
3673
|
-
if (this._state.campaignConnectEnabled) {
|
|
3674
|
-
const campaignConnect = await superSelectionApi.getCampaignConnectAsync();
|
|
3675
|
-
this._state.campaignConnect = Option.fromNullable(campaignConnect);
|
|
3676
|
-
}
|
|
3677
|
-
}
|
|
3678
3740
|
setSuperCampaignPromotedFundsShown(shownFunds) {
|
|
3679
3741
|
if (this._state.superCampaignState !== undefined)
|
|
3680
3742
|
this._state.superCampaignState.promotedFundsShown = shownFunds;
|
|
@@ -3718,306 +3780,33 @@ class SuperSelectionAppService {
|
|
|
3718
3780
|
}
|
|
3719
3781
|
const superSelectionAppService = new SuperSelectionAppService();
|
|
3720
3782
|
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
? 'True'
|
|
3727
|
-
: 'False';
|
|
3728
|
-
}
|
|
3729
|
-
return {
|
|
3730
|
-
isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
|
|
3731
|
-
superCampaignEnabled: superCampaignEnabled
|
|
3732
|
-
};
|
|
3783
|
+
class NavigationService {
|
|
3784
|
+
navigateInternally(history, route) {
|
|
3785
|
+
const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
|
|
3786
|
+
iframe.navigation(path);
|
|
3787
|
+
history.push(path);
|
|
3733
3788
|
}
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
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);
|
|
3740
3795
|
}
|
|
3741
|
-
|
|
3742
|
-
const
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
static get Instance() {
|
|
3746
|
-
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;
|
|
3747
3800
|
}
|
|
3748
|
-
|
|
3749
|
-
|
|
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}`;
|
|
3750
3807
|
}
|
|
3751
3808
|
}
|
|
3752
|
-
|
|
3753
|
-
class EventTrackingService {
|
|
3754
|
-
constructor() {
|
|
3755
|
-
this.eventTrackingApi = EventTrackingApi.Instance;
|
|
3756
|
-
}
|
|
3757
|
-
static get Instance() {
|
|
3758
|
-
return this.instance || (this.instance = new this());
|
|
3759
|
-
}
|
|
3760
|
-
async TrackSuperFundPdsViewedAsync(detail) {
|
|
3761
|
-
return this.trackEventAsync({
|
|
3762
|
-
SuperFundPdsViewed: detail
|
|
3763
|
-
});
|
|
3764
|
-
}
|
|
3765
|
-
async TrackPromotedSuperFundDetailViewedAsync(detail) {
|
|
3766
|
-
return this.trackEventAsync({
|
|
3767
|
-
SuperFundDetailViewed: {
|
|
3768
|
-
PromotedFund: detail
|
|
3769
|
-
}
|
|
3770
|
-
});
|
|
3771
|
-
}
|
|
3772
|
-
async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
|
|
3773
|
-
return this.trackEventAsync({
|
|
3774
|
-
SuperFundDetailViewed: {
|
|
3775
|
-
PromotedDefaultFund: detail
|
|
3776
|
-
}
|
|
3777
|
-
});
|
|
3778
|
-
}
|
|
3779
|
-
async TrackMyOwnSuperFundDetailViewedAsync(detail) {
|
|
3780
|
-
return this.trackEventAsync({
|
|
3781
|
-
SuperFundDetailViewed: {
|
|
3782
|
-
MyOwnFund: detail
|
|
3783
|
-
}
|
|
3784
|
-
});
|
|
3785
|
-
}
|
|
3786
|
-
async TrackSmsfSuperFundDetailViewedAsync(detail) {
|
|
3787
|
-
return this.trackEventAsync({
|
|
3788
|
-
SuperFundDetailViewed: {
|
|
3789
|
-
Smsf: detail
|
|
3790
|
-
}
|
|
3791
|
-
});
|
|
3792
|
-
}
|
|
3793
|
-
async TrackDefaultSuperFundDetailViewedAsync(detail) {
|
|
3794
|
-
return this.trackEventAsync({
|
|
3795
|
-
SuperFundDetailViewed: {
|
|
3796
|
-
DefaultFund: detail
|
|
3797
|
-
}
|
|
3798
|
-
});
|
|
3799
|
-
}
|
|
3800
|
-
async TrackSuperFundNominationViewedAsync(detail) {
|
|
3801
|
-
return this.trackEventAsync({
|
|
3802
|
-
SuperFundNominationViewed: detail
|
|
3803
|
-
});
|
|
3804
|
-
}
|
|
3805
|
-
async TrackSuperFundNominationDeclinedAsync(detail) {
|
|
3806
|
-
return this.trackEventAsync({
|
|
3807
|
-
SuperFundNominationDeclined: detail
|
|
3808
|
-
});
|
|
3809
|
-
}
|
|
3810
|
-
async TrackSuperFundDisclaimerViewedAsync(detail) {
|
|
3811
|
-
return this.trackEventAsync({
|
|
3812
|
-
SuperFundDisclaimerViewed: detail
|
|
3813
|
-
});
|
|
3814
|
-
}
|
|
3815
|
-
async TrackSuperFundDisclaimerAcceptedAsync(detail) {
|
|
3816
|
-
return this.trackEventAsync({
|
|
3817
|
-
SuperFundDisclaimerAccepted: detail
|
|
3818
|
-
});
|
|
3819
|
-
}
|
|
3820
|
-
async TrackSuperFundPrefillViewedAsync(detail) {
|
|
3821
|
-
return this.trackEventAsync({
|
|
3822
|
-
SuperFundPrefillViewed: detail
|
|
3823
|
-
});
|
|
3824
|
-
}
|
|
3825
|
-
async TrackSuperFundPrefillDeclinedAsync(detail) {
|
|
3826
|
-
return this.trackEventAsync({
|
|
3827
|
-
SuperFundPrefillDeclined: detail
|
|
3828
|
-
});
|
|
3829
|
-
}
|
|
3830
|
-
async TrackSuperFundDetailChangeRequestedAsync(detail) {
|
|
3831
|
-
return this.trackEventAsync({
|
|
3832
|
-
SuperFundDetailChangeRequested: detail
|
|
3833
|
-
});
|
|
3834
|
-
}
|
|
3835
|
-
async TrackSuperCampaignActivationSucceededAsync(detail) {
|
|
3836
|
-
return this.trackEventAsync({
|
|
3837
|
-
SuperCampaignActivationSucceeded: detail
|
|
3838
|
-
});
|
|
3839
|
-
}
|
|
3840
|
-
async trackEventAsync(event) {
|
|
3841
|
-
try {
|
|
3842
|
-
await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
|
|
3843
|
-
}
|
|
3844
|
-
catch (_a) {
|
|
3845
|
-
return;
|
|
3846
|
-
}
|
|
3847
|
-
}
|
|
3848
|
-
}
|
|
3849
|
-
|
|
3850
|
-
function appReady() {
|
|
3851
|
-
postMessage({
|
|
3852
|
-
type: 'appReady'
|
|
3853
|
-
});
|
|
3854
|
-
}
|
|
3855
|
-
function postMessage(message, origin) {
|
|
3856
|
-
if (origin === undefined)
|
|
3857
|
-
origin = '*';
|
|
3858
|
-
message.sender = 'flare';
|
|
3859
|
-
window.parent.postMessage(message, origin);
|
|
3860
|
-
}
|
|
3861
|
-
function resize(height, width) {
|
|
3862
|
-
postMessage({
|
|
3863
|
-
type: 'contentResized',
|
|
3864
|
-
height,
|
|
3865
|
-
width
|
|
3866
|
-
});
|
|
3867
|
-
}
|
|
3868
|
-
function navigation(url) {
|
|
3869
|
-
postMessage({
|
|
3870
|
-
type: 'pageNavigated',
|
|
3871
|
-
url
|
|
3872
|
-
});
|
|
3873
|
-
}
|
|
3874
|
-
function complete() {
|
|
3875
|
-
postMessage({ type: 'complete' });
|
|
3876
|
-
}
|
|
3877
|
-
function submitSuccess() {
|
|
3878
|
-
postMessage({
|
|
3879
|
-
type: 'submitSuccess'
|
|
3880
|
-
});
|
|
3881
|
-
}
|
|
3882
|
-
const iframe = { appReady, resize, navigation, complete, submitSuccess };
|
|
3883
|
-
|
|
3884
|
-
const initial$1 = {
|
|
3885
|
-
handleSubmitFn: async function () {
|
|
3886
|
-
return;
|
|
3887
|
-
},
|
|
3888
|
-
fundName: '',
|
|
3889
|
-
fundDetails: { type: 'null' },
|
|
3890
|
-
promotedFundId: undefined
|
|
3891
|
-
};
|
|
3892
|
-
const { state: state$1 } = createStore(initial$1);
|
|
3893
|
-
|
|
3894
|
-
var SuperSelectionAppRoutes;
|
|
3895
|
-
(function (SuperSelectionAppRoutes) {
|
|
3896
|
-
SuperSelectionAppRoutes["ConsentPage"] = "/consent";
|
|
3897
|
-
SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
|
|
3898
|
-
SuperSelectionAppRoutes["SuperCampaign"] = "/super-campaign";
|
|
3899
|
-
SuperSelectionAppRoutes["ChoicePage"] = "/";
|
|
3900
|
-
SuperSelectionAppRoutes["SlateJoin"] = "/slate/join/";
|
|
3901
|
-
SuperSelectionAppRoutes["PromotedFundJoinV1"] = "/promoted-fund/join/v1";
|
|
3902
|
-
SuperSelectionAppRoutes["PromotedFundJoinV2"] = "/promoted-fund/join/v2";
|
|
3903
|
-
SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
|
|
3904
|
-
SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
|
|
3905
|
-
SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
|
|
3906
|
-
SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
|
|
3907
|
-
SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
|
|
3908
|
-
SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
|
|
3909
|
-
SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
|
|
3910
|
-
SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
|
|
3911
|
-
SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
|
|
3912
|
-
SuperSelectionAppRoutes["Success"] = "/success/";
|
|
3913
|
-
})(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
|
|
3914
|
-
const superSelectionAppStencilRoutes = [
|
|
3915
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.ConsentPage, component: "sss-consent-page-wrapper" }),
|
|
3916
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
|
|
3917
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
|
|
3918
|
-
h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-super-choice-page-wrapper" }),
|
|
3919
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.SlateJoin, component: "sss-slate-join-page" }),
|
|
3920
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV1, component: "sss-promoted-fund-join-v1-page" }),
|
|
3921
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV2, component: "sss-promoted-fund-join-v2-page" }),
|
|
3922
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
|
|
3923
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
|
|
3924
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
|
|
3925
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
|
|
3926
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
|
|
3927
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
|
|
3928
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
|
|
3929
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
|
|
3930
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
|
|
3931
|
-
h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
|
|
3932
|
-
];
|
|
3933
|
-
|
|
3934
|
-
class NavigationService {
|
|
3935
|
-
navigateInternally(history, route) {
|
|
3936
|
-
const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
|
|
3937
|
-
iframe.navigation(path);
|
|
3938
|
-
history.push(path);
|
|
3939
|
-
}
|
|
3940
|
-
navigateInternallyToStandardChoice(options) {
|
|
3941
|
-
state$1.handleSubmitFn = options.handleSubmitFn;
|
|
3942
|
-
state$1.fundName = options.fundName;
|
|
3943
|
-
state$1.fundDetails = options.fundDetails;
|
|
3944
|
-
state$1.promotedFundId = options.promotedFundId;
|
|
3945
|
-
this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
|
|
3946
|
-
}
|
|
3947
|
-
toExternalUrl(url) {
|
|
3948
|
-
const externalUrl = new URL(url);
|
|
3949
|
-
externalUrl.searchParams.append('_extnav', 'true');
|
|
3950
|
-
return externalUrl.href;
|
|
3951
|
-
}
|
|
3952
|
-
get appBaseUrl() {
|
|
3953
|
-
const baseUrl = superSelectionAppService.appBaseUrl;
|
|
3954
|
-
return baseUrl.replace(/\/$/, '');
|
|
3955
|
-
}
|
|
3956
|
-
toRouteWithLeadingSlash(route) {
|
|
3957
|
-
return route.length > 0 && route[0] === '/' ? route : `/${route}`;
|
|
3958
|
-
}
|
|
3959
|
-
}
|
|
3960
|
-
const navigationService = new NavigationService();
|
|
3961
|
-
|
|
3962
|
-
const Link = (props, children) => {
|
|
3963
|
-
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));
|
|
3964
|
-
};
|
|
3965
|
-
const PoweredByFlareFS = 'Powered by Flare FS';
|
|
3966
|
-
function pdsViewedAsync(name, usi) {
|
|
3967
|
-
return EventTrackingService.Instance.TrackSuperFundPdsViewedAsync({
|
|
3968
|
-
fundUsi: usi,
|
|
3969
|
-
fundName: name,
|
|
3970
|
-
pageName: 'Panel Fund Page',
|
|
3971
|
-
superCampaignEnabled: false
|
|
3972
|
-
});
|
|
3973
|
-
}
|
|
3974
|
-
|
|
3975
|
-
const Consent = class {
|
|
3976
|
-
constructor(hostRef) {
|
|
3977
|
-
registerInstance(this, hostRef);
|
|
3978
|
-
this.campaignConnectRequestInProgress = false;
|
|
3979
|
-
this.eventTrackingService = EventTrackingService.Instance;
|
|
3980
|
-
}
|
|
3981
|
-
componentDidLoad() {
|
|
3982
|
-
return this.eventTrackingService.TrackSuperFundDisclaimerViewedAsync(SuperFundDisclaimerViewedDetail.create(false));
|
|
3983
|
-
}
|
|
3984
|
-
render() {
|
|
3985
|
-
if (this.campaignConnectRequestInProgress) {
|
|
3986
|
-
return h("sss-loading-super-indicator", null);
|
|
3987
|
-
}
|
|
3988
|
-
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")))));
|
|
3989
|
-
}
|
|
3990
|
-
async handleSuperFundDisclaimerAccepted() {
|
|
3991
|
-
await this.eventTrackingService.TrackSuperFundDisclaimerAcceptedAsync({
|
|
3992
|
-
superCampaignEnabled: false
|
|
3993
|
-
});
|
|
3994
|
-
if (superSelectionAppService.campaignConnectEnabled) {
|
|
3995
|
-
this.campaignConnectRequestInProgress = true;
|
|
3996
|
-
await superSelectionAppService.loadCampaignConnectAsync();
|
|
3997
|
-
if (superSelectionAppService.isDefinedBenefitsEligible &&
|
|
3998
|
-
Option.isSome(superSelectionAppService.definedBenefitsFundId)) {
|
|
3999
|
-
state.fund = {
|
|
4000
|
-
id: superSelectionAppService.definedBenefitsFundId.value,
|
|
4001
|
-
type: 'DefinedBenefits'
|
|
4002
|
-
};
|
|
4003
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PromotedFundJoinV2);
|
|
4004
|
-
return;
|
|
4005
|
-
}
|
|
4006
|
-
}
|
|
4007
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
4008
|
-
}
|
|
4009
|
-
};
|
|
4010
|
-
injectHistory(Consent);
|
|
4011
|
-
|
|
4012
|
-
const ConsentWrapper = class {
|
|
4013
|
-
constructor(hostRef) {
|
|
4014
|
-
registerInstance(this, hostRef);
|
|
4015
|
-
}
|
|
4016
|
-
render() {
|
|
4017
|
-
return superSelectionAppService.state.superCampaignEnabled ? (h("sss-super-campaign-host", null)) : (h("sss-consent-page", null));
|
|
4018
|
-
}
|
|
4019
|
-
};
|
|
4020
|
-
injectHistory(ConsentWrapper);
|
|
3809
|
+
const navigationService = new NavigationService();
|
|
4021
3810
|
|
|
4022
3811
|
var CustomFundTypes;
|
|
4023
3812
|
(function (CustomFundTypes) {
|
|
@@ -4066,9 +3855,9 @@ const initialStateCustomFund = {
|
|
|
4066
3855
|
}
|
|
4067
3856
|
]
|
|
4068
3857
|
};
|
|
4069
|
-
const { state: state$
|
|
3858
|
+
const { state: state$1, reset } = createStore(initialStateCustomFund);
|
|
4070
3859
|
|
|
4071
|
-
const customFundOptions = state$
|
|
3860
|
+
const customFundOptions = state$1.customFunds;
|
|
4072
3861
|
const CustomFund = class {
|
|
4073
3862
|
constructor(hostRef) {
|
|
4074
3863
|
registerInstance(this, hostRef);
|
|
@@ -4123,57 +3912,163 @@ class AustralianFundLookupService {
|
|
|
4123
3912
|
}
|
|
4124
3913
|
const australianFundLookupService = new AustralianFundLookupService();
|
|
4125
3914
|
|
|
4126
|
-
class
|
|
4127
|
-
|
|
4128
|
-
return
|
|
4129
|
-
.url('super-choice/default')
|
|
4130
|
-
.post(dto)
|
|
4131
|
-
.badRequest(() => {
|
|
4132
|
-
throw new Error('Failed to process default fund join request');
|
|
4133
|
-
})
|
|
4134
|
-
.text();
|
|
4135
|
-
}
|
|
4136
|
-
async submitCustomFundChoiceAsync(dto) {
|
|
4137
|
-
return buildBackendApiClient()
|
|
4138
|
-
.url('super-choice/custom-fund')
|
|
4139
|
-
.post(dto)
|
|
4140
|
-
.badRequest(() => {
|
|
4141
|
-
throw new Error('Failed to process custom fund join request');
|
|
4142
|
-
})
|
|
4143
|
-
.text();
|
|
4144
|
-
}
|
|
4145
|
-
async submitSelfManagedFundChoiceAsync(dto) {
|
|
4146
|
-
return buildBackendApiClient()
|
|
4147
|
-
.url('super-choice/smsf')
|
|
4148
|
-
.post(dto)
|
|
4149
|
-
.badRequest(() => {
|
|
4150
|
-
throw new Error('Failed to process SMSF choice request');
|
|
4151
|
-
})
|
|
4152
|
-
.text();
|
|
4153
|
-
}
|
|
4154
|
-
async submitDefinedBenefitsChoiceAsync(dto) {
|
|
4155
|
-
return buildBackendApiClient()
|
|
4156
|
-
.url('super-choice/defined-benefits')
|
|
4157
|
-
.post(dto)
|
|
4158
|
-
.badRequest(() => {
|
|
4159
|
-
throw new Error('Failed to process Defined Benefits choice request');
|
|
4160
|
-
})
|
|
4161
|
-
.text();
|
|
3915
|
+
class EventTrackingApi {
|
|
3916
|
+
static get Instance() {
|
|
3917
|
+
return this.instance || (this.instance = new this());
|
|
4162
3918
|
}
|
|
4163
|
-
async
|
|
4164
|
-
|
|
4165
|
-
.url(`super-choice/smsf/${abn}/validate`)
|
|
4166
|
-
.get()
|
|
4167
|
-
.badRequest(() => {
|
|
4168
|
-
throw new Error('Failed to verify that if the provided abn is used for regulated fund');
|
|
4169
|
-
})
|
|
4170
|
-
.json();
|
|
4171
|
-
return response.result;
|
|
3919
|
+
async PostAnalyticsEventAsync(event) {
|
|
3920
|
+
return buildBackendApiClient().url('analytics-events').post(event).res();
|
|
4172
3921
|
}
|
|
4173
3922
|
}
|
|
4174
|
-
const customFundChoiceApi = new CustomFundChoiceApi();
|
|
4175
3923
|
|
|
4176
|
-
|
|
3924
|
+
class EventTrackingService {
|
|
3925
|
+
constructor() {
|
|
3926
|
+
this.eventTrackingApi = EventTrackingApi.Instance;
|
|
3927
|
+
}
|
|
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 {
|
|
4177
4072
|
constructor(hostRef) {
|
|
4178
4073
|
registerInstance(this, hostRef);
|
|
4179
4074
|
this.defaultFundProductName = 'Loading fund...';
|
|
@@ -4392,466 +4287,6 @@ const SelectInputAsync = class {
|
|
|
4392
4287
|
};
|
|
4393
4288
|
SelectInputAsync.style = dropdownAsyncCss;
|
|
4394
4289
|
|
|
4395
|
-
const name = 'Active Super';
|
|
4396
|
-
const fund = {
|
|
4397
|
-
fundId: 'active',
|
|
4398
|
-
name,
|
|
4399
|
-
logo: 'logo-active.svg',
|
|
4400
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV1,
|
|
4401
|
-
features: [
|
|
4402
|
-
h("p", null, "Winner of Canstar's 2023 Outstanding Value \u2013 Superannuation Award considering investment performance, fees and product features*"),
|
|
4403
|
-
h("p", null, "Recognised as a leader in responsible investment"),
|
|
4404
|
-
h("p", null, "Calls answered in 20 seconds (average over 5 years)")
|
|
4405
|
-
],
|
|
4406
|
-
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.")),
|
|
4407
|
-
disclaimer: (h("p", null,
|
|
4408
|
-
"Issued by LGSS Pty Limited as trustee for Local Government Super (Active Super ABN:28 901 371 321). Consider the PDS and TMD at",
|
|
4409
|
-
' ',
|
|
4410
|
-
h(Link, { onClick: () => pdsViewedAsync(name), href: "https://www.activesuper.com.au/pds" }, "activesuper.com.au"),
|
|
4411
|
-
' ',
|
|
4412
|
-
"before making a decision.")),
|
|
4413
|
-
footnoteTextOverride: Option.some(PoweredByFlareFS),
|
|
4414
|
-
dtoPropName: 'active'
|
|
4415
|
-
};
|
|
4416
|
-
|
|
4417
|
-
const name$1 = 'Australian Ethical';
|
|
4418
|
-
const pdsUrl = 'https://www.australianethical.com.au/super/pds-forms/';
|
|
4419
|
-
const fund$1 = {
|
|
4420
|
-
fundId: 'australian-ethical',
|
|
4421
|
-
name: name$1,
|
|
4422
|
-
logo: 'logo-aus-eth.svg',
|
|
4423
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4424
|
-
features: [
|
|
4425
|
-
h("p", null,
|
|
4426
|
-
"Fastest growing super fund in Australia",
|
|
4427
|
-
h("sup", { class: "text-tiny" }, "1")),
|
|
4428
|
-
h("p", null,
|
|
4429
|
-
"Nil investments in fossil fuel companies",
|
|
4430
|
-
h("sup", { class: "text-tiny" }, "2")),
|
|
4431
|
-
h("p", null, "Competitive returns")
|
|
4432
|
-
],
|
|
4433
|
-
featureSubText: (h("ol", { class: "list-decimal list-outside ml-3" },
|
|
4434
|
-
h("li", null, "Source: KPMG Super Insights Report 2022."),
|
|
4435
|
-
h("li", null, "All our options go through positive and negative ethical screening in accordance with the Australian Ethical Charter (in place since 1986)."))),
|
|
4436
|
-
disclaimer: (h("p", null,
|
|
4437
|
-
"Issued by Australian Ethical Superannuation Pty Ltd (ABN 43 079 259 733, RSE L0001441, AFSL 526055). Please consider the",
|
|
4438
|
-
' ',
|
|
4439
|
-
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"),
|
|
4440
|
-
", the",
|
|
4441
|
-
' ',
|
|
4442
|
-
h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "Product Disclosure Statement"),
|
|
4443
|
-
' ',
|
|
4444
|
-
"and",
|
|
4445
|
-
' ',
|
|
4446
|
-
h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "Target Market Determination"),
|
|
4447
|
-
' ',
|
|
4448
|
-
"available on our",
|
|
4449
|
-
' ',
|
|
4450
|
-
h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "website"),
|
|
4451
|
-
".")),
|
|
4452
|
-
footnoteTextOverride: Option.none,
|
|
4453
|
-
dtoPropName: 'australianEthical'
|
|
4454
|
-
};
|
|
4455
|
-
|
|
4456
|
-
const name$2 = 'Australian Retirement Trust';
|
|
4457
|
-
const fund$2 = {
|
|
4458
|
-
fundId: 'australian-retirement-trust',
|
|
4459
|
-
name: name$2,
|
|
4460
|
-
logo: 'logo-art.svg',
|
|
4461
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV1,
|
|
4462
|
-
features: [
|
|
4463
|
-
h("p", null, "$200 billion in retirement savings"),
|
|
4464
|
-
h("p", null, "2+ million members"),
|
|
4465
|
-
h("p", null, "A focus on delivering strong, long\u2011term returns")
|
|
4466
|
-
],
|
|
4467
|
-
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.")),
|
|
4468
|
-
disclaimer: (h("p", null,
|
|
4469
|
-
"You should consider the",
|
|
4470
|
-
' ',
|
|
4471
|
-
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"),
|
|
4472
|
-
' ',
|
|
4473
|
-
"and",
|
|
4474
|
-
' ',
|
|
4475
|
-
h(Link, { href: "https://www.australianretirementtrust.com.au/tmd" }, "Target Market Determination"),
|
|
4476
|
-
' ',
|
|
4477
|
-
"before deciding to invest in or apply to become a member of this fund.")),
|
|
4478
|
-
abnInfo: name$2,
|
|
4479
|
-
abn: '60 905 115 063',
|
|
4480
|
-
footnoteTextOverride: Option.none,
|
|
4481
|
-
dtoPropName: 'australianRetirementTrust'
|
|
4482
|
-
};
|
|
4483
|
-
|
|
4484
|
-
const name$3 = 'Aware Super';
|
|
4485
|
-
const fund$3 = {
|
|
4486
|
-
fundId: 'aware',
|
|
4487
|
-
name: name$3,
|
|
4488
|
-
logo: 'logo-aware.svg',
|
|
4489
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV1,
|
|
4490
|
-
features: [
|
|
4491
|
-
h("p", null, "Awarded Canstar\u2019s Outstanding Value Super^ in 2022 and 2023."),
|
|
4492
|
-
h("p", null,
|
|
4493
|
-
"Over 1 million",
|
|
4494
|
-
h("sup", { class: "text-tiny" }, "\u2021"),
|
|
4495
|
-
" Australians trust us with their super."),
|
|
4496
|
-
h("p", null, "Our super helpful app helps you stay in control of your super.")
|
|
4497
|
-
],
|
|
4498
|
-
featureSubText: (h("div", { class: "space-y-0.5" },
|
|
4499
|
-
h("p", null,
|
|
4500
|
-
"^ See ",
|
|
4501
|
-
h(Link, { href: "https://aware.com.au/awards" }, "aware.com.au/awards"),
|
|
4502
|
-
" for more information"),
|
|
4503
|
-
h("p", null,
|
|
4504
|
-
h("sup", { class: "text-tiny" }, "\u2021"),
|
|
4505
|
-
" Member numbers as of December 2023"))),
|
|
4506
|
-
disclaimer: (h("p", null,
|
|
4507
|
-
"You should consider the",
|
|
4508
|
-
' ',
|
|
4509
|
-
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"),
|
|
4510
|
-
' ',
|
|
4511
|
-
"before deciding to invest in or apply to become a member of this fund.")),
|
|
4512
|
-
abnInfo: `Aware Super Pty Ltd`,
|
|
4513
|
-
abn: '53 226 460 365',
|
|
4514
|
-
footnoteTextOverride: Option.none,
|
|
4515
|
-
dtoPropName: 'aware'
|
|
4516
|
-
};
|
|
4517
|
-
|
|
4518
|
-
const name$4 = 'First Super';
|
|
4519
|
-
const fund$4 = {
|
|
4520
|
-
fundId: 'first-super',
|
|
4521
|
-
name: name$4,
|
|
4522
|
-
logo: 'logo-first.svg',
|
|
4523
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4524
|
-
features: [
|
|
4525
|
-
h("p", null, "Industry SuperFund that offers five investment options and default insurance"),
|
|
4526
|
-
h("p", null, "Strong long-term investment returns and superior customer service - members first"),
|
|
4527
|
-
h("p", null, "Established super fund \u2013 anyone can join including KiwiSaver members")
|
|
4528
|
-
],
|
|
4529
|
-
disclaimer: (h("div", null,
|
|
4530
|
-
h("p", null,
|
|
4531
|
-
"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",
|
|
4532
|
-
' ',
|
|
4533
|
-
h(Link, { onClick: () => pdsViewedAsync(name$4), href: "https://www.firstsuper.com.au/forms-tools/product-disclosure-statements/" }, "website"),
|
|
4534
|
-
". Past performance is not a reliable indicator of future performance."),
|
|
4535
|
-
h("br", null),
|
|
4536
|
-
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."))),
|
|
4537
|
-
footnoteTextOverride: Option.none,
|
|
4538
|
-
dtoPropName: 'firstSuper'
|
|
4539
|
-
};
|
|
4540
|
-
|
|
4541
|
-
const name$5 = 'HESTA';
|
|
4542
|
-
const fund$5 = {
|
|
4543
|
-
fundId: 'hesta-default',
|
|
4544
|
-
name: name$5,
|
|
4545
|
-
logo: 'logo-hesta.svg',
|
|
4546
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4547
|
-
features: [
|
|
4548
|
-
h("p", null, "A top-performing super fund* working for real-world impact"),
|
|
4549
|
-
h("p", null, "1+ million members"),
|
|
4550
|
-
h("p", null, "Expert help whenever you need it to help you face the future with confidence")
|
|
4551
|
-
],
|
|
4552
|
-
featureSubText: undefined,
|
|
4553
|
-
disclaimer: (h("div", { class: "space-y-2" },
|
|
4554
|
-
h("p", { class: "italic" },
|
|
4555
|
-
"* 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",
|
|
4556
|
-
' ',
|
|
4557
|
-
h(Link, { className: "underline underline-offset-2 hover:text-gray-600", href: "https://www.hesta.com.au/ratings" }, "hesta.com.au/ratings"),
|
|
4558
|
-
' ',
|
|
4559
|
-
"for more information."),
|
|
4560
|
-
h("p", null,
|
|
4561
|
-
"Consider whether this product is appropriate for you by reading the Product Disclosure Statement and Target Market Determination at",
|
|
4562
|
-
' ',
|
|
4563
|
-
h(Link, { onClick: () => pdsViewedAsync(name$5), href: "https://www.hesta.com.au/pds" }, "hesta.com.au/pds"),
|
|
4564
|
-
' ',
|
|
4565
|
-
"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."),
|
|
4566
|
-
h("p", null, "Issued by H.E.S.T. Australia Ltd ABN 66 006 818 695 AFSL No. 235249, Trustee of HESTA"))),
|
|
4567
|
-
footnoteTextOverride: Option.none,
|
|
4568
|
-
isPromotedDefault: true
|
|
4569
|
-
};
|
|
4570
|
-
|
|
4571
|
-
const name$6 = 'Mercer MyChoice';
|
|
4572
|
-
const fund$6 = {
|
|
4573
|
-
fundId: 'mercermychoice',
|
|
4574
|
-
name: name$6,
|
|
4575
|
-
logo: 'logo-mercer-mychoice.svg',
|
|
4576
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4577
|
-
features: [
|
|
4578
|
-
h("p", null, "Save more super with our low fees"),
|
|
4579
|
-
h("p", null, "Take control with 6 MyChoice investment options"),
|
|
4580
|
-
h("p", null, "Join 850,000 Australians who trust our global expertise")
|
|
4581
|
-
],
|
|
4582
|
-
disclaimer: (h("div", null,
|
|
4583
|
-
h("p", null,
|
|
4584
|
-
"You should consider the",
|
|
4585
|
-
' ',
|
|
4586
|
-
h(Link, { href: "https://www.mercersuper.com.au/campaign-page/mercer-mychoice", onClick: () => pdsViewedAsync(name$6) }, "Product Disclosure Statement"),
|
|
4587
|
-
' ',
|
|
4588
|
-
"and",
|
|
4589
|
-
' ',
|
|
4590
|
-
h(Link, { href: "https://www.mercersuper.com.au/documents/target-market-determinations" }, "Target Market Determination"),
|
|
4591
|
-
' ',
|
|
4592
|
-
"before deciding to invest in or apply to become a member of the fund."),
|
|
4593
|
-
h("br", null),
|
|
4594
|
-
h("p", null, "Issued by Mercer Superannuation (Australia) Limited (\u2018Mercer Super\u2019) ABN: 79 004 717 533"))),
|
|
4595
|
-
footnoteTextOverride: Option.some(PoweredByFlareFS),
|
|
4596
|
-
dtoPropName: 'mercerMyChoice',
|
|
4597
|
-
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"))
|
|
4598
|
-
};
|
|
4599
|
-
|
|
4600
|
-
const name$7 = 'REI Super';
|
|
4601
|
-
const fund$7 = {
|
|
4602
|
-
fundId: 'reisuper',
|
|
4603
|
-
name: name$7,
|
|
4604
|
-
logo: 'logo-rei.svg',
|
|
4605
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4606
|
-
features: [
|
|
4607
|
-
h("p", null, "Built by and for the real estate industry"),
|
|
4608
|
-
h("p", null, "Consistent long-term performance with competitive fees*"),
|
|
4609
|
-
h("p", null, "All profits to members, not shareholders")
|
|
4610
|
-
],
|
|
4611
|
-
disclaimer: (h("div", { class: "space-y-2" },
|
|
4612
|
-
h("p", null, "*Balanced Option net investment return of 9.45% for year ending 30 June 2023."),
|
|
4613
|
-
h("p", null,
|
|
4614
|
-
"You should consider the",
|
|
4615
|
-
' ',
|
|
4616
|
-
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"),
|
|
4617
|
-
' ',
|
|
4618
|
-
"and",
|
|
4619
|
-
' ',
|
|
4620
|
-
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"),
|
|
4621
|
-
' ',
|
|
4622
|
-
"before deciding to invest in or apply to become a member of the fund."))),
|
|
4623
|
-
abnInfo: `REI Superannuation Fund Pty Ltd`,
|
|
4624
|
-
abn: '68 056 044 770',
|
|
4625
|
-
footnoteTextOverride: Option.none,
|
|
4626
|
-
dtoPropName: 'reisuper'
|
|
4627
|
-
};
|
|
4628
|
-
|
|
4629
|
-
const name$8 = 'Slate Super';
|
|
4630
|
-
const slateUsi = '32367272075001';
|
|
4631
|
-
const fund$8 = {
|
|
4632
|
-
fundId: 'slate',
|
|
4633
|
-
name: name$8,
|
|
4634
|
-
logo: 'logo-slate.png',
|
|
4635
|
-
route: SuperSelectionAppRoutes.SlateJoin,
|
|
4636
|
-
features: [
|
|
4637
|
-
h("p", null, "A lifestage investment strategy that evolves with you"),
|
|
4638
|
-
h("p", null, "Advanced mobile app with retirement forecast and smart features"),
|
|
4639
|
-
h("p", null, "Member advocates at Slate to assist with your account")
|
|
4640
|
-
],
|
|
4641
|
-
disclaimer: (h("p", { class: "small text-muted" },
|
|
4642
|
-
"You should consider the",
|
|
4643
|
-
' ',
|
|
4644
|
-
h(Link, { href: "https://slate.co/pds/?utm_source=flare&utm_medium=superselection", onClick: () => pdsViewedAsync(name$8, slateUsi) }, "Product Disclosure Statement"),
|
|
4645
|
-
' ',
|
|
4646
|
-
"and",
|
|
4647
|
-
' ',
|
|
4648
|
-
h(Link, { href: "https://slate.co/forms-and-documents/target-market-determination/" }, "Target Market Determination"),
|
|
4649
|
-
' ',
|
|
4650
|
-
"before deciding to invest in or apply to become a member of the fund.")),
|
|
4651
|
-
abnInfo: `Diversa Trustees Limited`,
|
|
4652
|
-
abn: '49 006 421 638',
|
|
4653
|
-
footnoteTextOverride: Option.none,
|
|
4654
|
-
dtoPropName: 'slate'
|
|
4655
|
-
};
|
|
4656
|
-
|
|
4657
|
-
const name$9 = 'Spirit Super';
|
|
4658
|
-
const fund$9 = {
|
|
4659
|
-
fundId: 'spirit',
|
|
4660
|
-
name: name$9,
|
|
4661
|
-
logo: 'logo-spirit.svg',
|
|
4662
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4663
|
-
features: [
|
|
4664
|
-
h("p", null, "Proud Industry SuperFund - all profits go back to members"),
|
|
4665
|
-
h("p", null,
|
|
4666
|
-
"Best customer experience in super",
|
|
4667
|
-
h("sup", { class: "text-tiny" }, "1"),
|
|
4668
|
-
" and best for value",
|
|
4669
|
-
h("sup", { class: "text-tiny" }, "2")),
|
|
4670
|
-
h("p", null,
|
|
4671
|
-
"Low fees",
|
|
4672
|
-
h("sup", { class: "text-tiny" }, "3"),
|
|
4673
|
-
" with a focus on strong returns and investing with impact in communities",
|
|
4674
|
-
h("sup", { class: "text-tiny" }, "4"))
|
|
4675
|
-
],
|
|
4676
|
-
featureSubText: (h("div", { class: "m-4 pt-2" },
|
|
4677
|
-
h("ol", { class: "list-decimal space-y-2" },
|
|
4678
|
-
h("li", null,
|
|
4679
|
-
h("span", null, "CSBA SenseCX Benchmark 2021-22")),
|
|
4680
|
-
h("li", null,
|
|
4681
|
-
h("span", null, "Awarded Best for Value in the WeMoney Superannuation Awards 2022")),
|
|
4682
|
-
h("li", null,
|
|
4683
|
-
h("span", null, "Just $67.60 + 0.15% pa admin fees, capped at $517.60")),
|
|
4684
|
-
h("li", null,
|
|
4685
|
-
h("span", null, "Rainmaker ESG Leader Rating 2022"))))),
|
|
4686
|
-
disclaimer: (h("p", null,
|
|
4687
|
-
"Past performance isn\u2019t a reliable indicator of future performance. Consider the PDS and TMD at",
|
|
4688
|
-
' ',
|
|
4689
|
-
h(Link, { href: "https://www.spiritsuper.com.au/pds", onClick: () => pdsViewedAsync(name$9) }, "www.spiritsuper.com.au/pds"),
|
|
4690
|
-
' ',
|
|
4691
|
-
"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).")),
|
|
4692
|
-
footnoteTextOverride: Option.none,
|
|
4693
|
-
dtoPropName: 'spirit'
|
|
4694
|
-
};
|
|
4695
|
-
|
|
4696
|
-
const name$a = 'Unisuper';
|
|
4697
|
-
const pdsUrl$1 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
|
|
4698
|
-
const tmdUrl = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
|
|
4699
|
-
const fund$a = {
|
|
4700
|
-
fundId: 'unisuper-default',
|
|
4701
|
-
name: name$a,
|
|
4702
|
-
logo: 'logo-unisuper.svg',
|
|
4703
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4704
|
-
features: [
|
|
4705
|
-
h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
|
|
4706
|
-
h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
|
|
4707
|
-
h("p", null,
|
|
4708
|
-
"Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
|
|
4709
|
-
h("sup", { class: "text-tiny" }, "#"))
|
|
4710
|
-
],
|
|
4711
|
-
disclaimer: (h("div", { class: "space-y-2" },
|
|
4712
|
-
h("p", null,
|
|
4713
|
-
"^Read more about our fees and how we compare",
|
|
4714
|
-
' ',
|
|
4715
|
-
h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
|
|
4716
|
-
"."),
|
|
4717
|
-
h("p", null,
|
|
4718
|
-
"*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
|
|
4719
|
-
' ',
|
|
4720
|
-
h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
|
|
4721
|
-
"."),
|
|
4722
|
-
h("p", null,
|
|
4723
|
-
h("sup", { class: "text-tiny" }, "#"),
|
|
4724
|
-
"See our awards",
|
|
4725
|
-
' ',
|
|
4726
|
-
h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
|
|
4727
|
-
"."),
|
|
4728
|
-
h("p", null,
|
|
4729
|
-
"Remember to consider the",
|
|
4730
|
-
' ',
|
|
4731
|
-
h(Link, { href: pdsUrl$1, onClick: () => pdsViewedAsync(name$a) }, "Product Disclosure Statement"),
|
|
4732
|
-
' ',
|
|
4733
|
-
"and ",
|
|
4734
|
-
h(Link, { href: tmdUrl }, "Target Market Determination"),
|
|
4735
|
-
" that is relevant to you."),
|
|
4736
|
-
h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
|
|
4737
|
-
footnoteTextOverride: Option.none,
|
|
4738
|
-
isPromotedDefault: true
|
|
4739
|
-
};
|
|
4740
|
-
|
|
4741
|
-
const name$b = 'Unisuper';
|
|
4742
|
-
const pdsUrl$2 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
|
|
4743
|
-
const tmdUrl$1 = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
|
|
4744
|
-
const fund$b = {
|
|
4745
|
-
fundId: 'unisuper-default-v2',
|
|
4746
|
-
name: name$b,
|
|
4747
|
-
logo: 'logo-unisuper.svg',
|
|
4748
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4749
|
-
features: [
|
|
4750
|
-
h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
|
|
4751
|
-
h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
|
|
4752
|
-
h("p", null,
|
|
4753
|
-
"Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
|
|
4754
|
-
h("sup", { class: "text-tiny" }, "#"))
|
|
4755
|
-
],
|
|
4756
|
-
customContent: (h("div", { class: "mt-6 flex gap-3" },
|
|
4757
|
-
h("div", null,
|
|
4758
|
-
h("img", { alt: name$b, src: getAssetPath(`assets/unisuper-default-badge1.svg`) })),
|
|
4759
|
-
h("div", null,
|
|
4760
|
-
h("img", { alt: name$b, src: getAssetPath(`assets/unisuper-default-badge2.svg`) })),
|
|
4761
|
-
h("div", null,
|
|
4762
|
-
h("img", { alt: name$b, src: getAssetPath(`assets/unisuper-default-badge3.svg`) })))),
|
|
4763
|
-
disclaimer: (h("div", { class: "space-y-2" },
|
|
4764
|
-
h("p", null,
|
|
4765
|
-
"^Read more about our fees and how we compare",
|
|
4766
|
-
' ',
|
|
4767
|
-
h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
|
|
4768
|
-
"."),
|
|
4769
|
-
h("p", null,
|
|
4770
|
-
"*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
|
|
4771
|
-
' ',
|
|
4772
|
-
h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
|
|
4773
|
-
"."),
|
|
4774
|
-
h("p", null,
|
|
4775
|
-
h("sup", { class: "text-tiny" }, "#"),
|
|
4776
|
-
"See our awards",
|
|
4777
|
-
' ',
|
|
4778
|
-
h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
|
|
4779
|
-
"."),
|
|
4780
|
-
h("p", null,
|
|
4781
|
-
"Remember to consider the",
|
|
4782
|
-
' ',
|
|
4783
|
-
h(Link, { href: pdsUrl$2, onClick: () => pdsViewedAsync(name$b) }, "Product Disclosure Statement"),
|
|
4784
|
-
' ',
|
|
4785
|
-
"and ",
|
|
4786
|
-
h(Link, { href: tmdUrl$1 }, "Target Market Determination"),
|
|
4787
|
-
" that is relevant to you."),
|
|
4788
|
-
h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
|
|
4789
|
-
footnoteTextOverride: Option.none,
|
|
4790
|
-
isPromotedDefault: true
|
|
4791
|
-
};
|
|
4792
|
-
|
|
4793
|
-
const name$c = 'Virgin Money Super';
|
|
4794
|
-
const fund$c = {
|
|
4795
|
-
fundId: 'virgin',
|
|
4796
|
-
name: name$c,
|
|
4797
|
-
logo: 'logo-virgin.svg',
|
|
4798
|
-
route: SuperSelectionAppRoutes.PromotedFundJoinV2,
|
|
4799
|
-
features: [
|
|
4800
|
-
h("p", null,
|
|
4801
|
-
"Returns above industry and retail super fund medians over the past 5 years",
|
|
4802
|
-
h("sup", { class: "text-tiny" }, "1")),
|
|
4803
|
-
h("p", null, "One of the lowest fees in the market"),
|
|
4804
|
-
h("p", null,
|
|
4805
|
-
"Virgin Money rewards you with Velocity Points on your contributions",
|
|
4806
|
-
h("sup", { class: "text-tiny" }, "2"))
|
|
4807
|
-
],
|
|
4808
|
-
featureSubText: (h("div", { class: "m-4 pt-2" },
|
|
4809
|
-
h("ol", { class: "list-decimal space-y-2" },
|
|
4810
|
-
h("li", null,
|
|
4811
|
-
h("span", null, "Past performance is not a reliable indicator of future performance. Source: SuperRatings Fund Crediting Rate Survey April 2022.")),
|
|
4812
|
-
h("li", null,
|
|
4813
|
-
h("span", null,
|
|
4814
|
-
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")))))),
|
|
4815
|
-
disclaimer: (h("p", null,
|
|
4816
|
-
"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",
|
|
4817
|
-
' ',
|
|
4818
|
-
h(Link, { href: "https://virginmoney.com.au/superannuation/", onClick: () => pdsViewedAsync(name$c) }, "www.virginmoney.com.au"),
|
|
4819
|
-
' ',
|
|
4820
|
-
"before making a decision")),
|
|
4821
|
-
footnoteTextOverride: Option.some(PoweredByFlareFS),
|
|
4822
|
-
dtoPropName: 'virgin',
|
|
4823
|
-
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"))
|
|
4824
|
-
};
|
|
4825
|
-
|
|
4826
|
-
const fundsById = {
|
|
4827
|
-
[fund$8.fundId]: fund$8,
|
|
4828
|
-
[fund$2.fundId]: fund$2,
|
|
4829
|
-
[fund$3.fundId]: fund$3,
|
|
4830
|
-
[fund.fundId]: fund,
|
|
4831
|
-
[fund$1.fundId]: fund$1,
|
|
4832
|
-
[fund$c.fundId]: fund$c,
|
|
4833
|
-
[fund$9.fundId]: fund$9,
|
|
4834
|
-
[fund$4.fundId]: fund$4,
|
|
4835
|
-
[fund$6.fundId]: fund$6,
|
|
4836
|
-
[fund$5.fundId]: fund$5,
|
|
4837
|
-
[fund$a.fundId]: fund$a,
|
|
4838
|
-
[fund$b.fundId]: fund$b,
|
|
4839
|
-
[fund$7.fundId]: fund$7
|
|
4840
|
-
};
|
|
4841
|
-
const allPromotedFunds = Object.values(fundsById);
|
|
4842
|
-
const getFundByDtoPropName = (dtoPropName) => {
|
|
4843
|
-
const fund = allPromotedFunds.find((f) => f.dtoPropName == dtoPropName);
|
|
4844
|
-
return fund ? some(fund) : none;
|
|
4845
|
-
};
|
|
4846
|
-
const getFundByFundId = (fundId) => {
|
|
4847
|
-
const fund = allPromotedFunds.find((f) => f.fundId == fundId);
|
|
4848
|
-
return fund ? some(fund) : none;
|
|
4849
|
-
};
|
|
4850
|
-
const getFundNameByFundId = (fundId) => fundsById[fundId] != undefined ? some(fundsById[fundId].name) : none;
|
|
4851
|
-
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; };
|
|
4852
|
-
const getFundUsiByFundId = (fundId) => fundId == fund$8.fundId ? some(slateUsi) : none;
|
|
4853
|
-
const getLogoSrcByFundId = (fundId) => fundsById[fundId] != undefined ? some(getAssetPath(`assets/${fundsById[fundId].logo}`)) : none;
|
|
4854
|
-
|
|
4855
4290
|
class ExistingFundService {
|
|
4856
4291
|
async GetExistingFundAsync() {
|
|
4857
4292
|
var _a;
|
|
@@ -4866,15 +4301,13 @@ class ExistingFundService {
|
|
|
4866
4301
|
const memberNumber = getSuperChoiceMemberNumber(choiceDetails);
|
|
4867
4302
|
switch (choiceDetails.kind) {
|
|
4868
4303
|
case 'Promoted': {
|
|
4869
|
-
|
|
4870
|
-
? getFundByFundId(choiceDetails.promoted['generic'].fundId)
|
|
4871
|
-
: getFundByDtoPropName(Object.keys(choiceDetails.promoted)[0]);
|
|
4872
|
-
if (isNone(fund))
|
|
4304
|
+
if (isNone(usi))
|
|
4873
4305
|
return none;
|
|
4306
|
+
const fund = await this.getFundByUsiAsync(usi.value);
|
|
4874
4307
|
return some({
|
|
4875
4308
|
type: 'Promoted Fund',
|
|
4876
|
-
id:
|
|
4877
|
-
name: fund.value.
|
|
4309
|
+
id: getPromotedFundId(choiceDetails.promoted),
|
|
4310
|
+
name: isSome(fund) ? fund.value.productName : usi.value,
|
|
4878
4311
|
usi: usi,
|
|
4879
4312
|
valid: 'Active',
|
|
4880
4313
|
memberNumber: memberNumber,
|
|
@@ -5008,14 +4441,12 @@ const ExistingChoice = class {
|
|
|
5008
4441
|
this.existingFund = chosenFundOption.value;
|
|
5009
4442
|
}
|
|
5010
4443
|
else {
|
|
5011
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
4444
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5012
4445
|
}
|
|
5013
4446
|
}
|
|
5014
4447
|
render() {
|
|
5015
|
-
const PromotedFundView = (
|
|
5016
|
-
|
|
5017
|
-
const fundName = getFundNameByFundId(props.id);
|
|
5018
|
-
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" }));
|
|
5019
4450
|
};
|
|
5020
4451
|
const MyOwnFundView = () => {
|
|
5021
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" })))));
|
|
@@ -5036,7 +4467,7 @@ const ExistingChoice = class {
|
|
|
5036
4467
|
switch (this.existingFund.type) {
|
|
5037
4468
|
case 'Promoted Fund':
|
|
5038
4469
|
case 'Promoted Default Fund':
|
|
5039
|
-
return h(PromotedFundView, {
|
|
4470
|
+
return h(PromotedFundView, { name: this.existingFund.name });
|
|
5040
4471
|
case 'Self Managed Fund':
|
|
5041
4472
|
return h(SelfManagedFundView, null);
|
|
5042
4473
|
case 'My Own Fund':
|
|
@@ -5073,7 +4504,7 @@ const ExistingChoice = class {
|
|
|
5073
4504
|
async handleFundNominationDeclined() {
|
|
5074
4505
|
const detail = this.createSuperFundNominationDetail(this.existingFund);
|
|
5075
4506
|
await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(detail);
|
|
5076
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
4507
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5077
4508
|
}
|
|
5078
4509
|
};
|
|
5079
4510
|
|
|
@@ -5081,7 +4512,7 @@ const DefaultFooterText = 'Powered by Flare';
|
|
|
5081
4512
|
const FooterSection = class {
|
|
5082
4513
|
constructor(hostRef) {
|
|
5083
4514
|
registerInstance(this, hostRef);
|
|
5084
|
-
this.footerText = () =>
|
|
4515
|
+
this.footerText = () => this.textOverride !== undefined ? this.textOverride : DefaultFooterText;
|
|
5085
4516
|
}
|
|
5086
4517
|
render() {
|
|
5087
4518
|
return (h("div", { class: {
|
|
@@ -5117,27 +4548,6 @@ const HeaderSection = class {
|
|
|
5117
4548
|
}
|
|
5118
4549
|
};
|
|
5119
4550
|
|
|
5120
|
-
const IFrameHost = class {
|
|
5121
|
-
constructor(hostRef) {
|
|
5122
|
-
registerInstance(this, hostRef);
|
|
5123
|
-
}
|
|
5124
|
-
componentDidLoad() {
|
|
5125
|
-
this.build(this.iframeElement);
|
|
5126
|
-
}
|
|
5127
|
-
render() {
|
|
5128
|
-
return (h("div", { class: "w-screen" }, h("iframe", { width: "100%", height: window.innerHeight, style: { border: 'none' }, ref: (el) => (this.iframeElement = el) })));
|
|
5129
|
-
}
|
|
5130
|
-
};
|
|
5131
|
-
|
|
5132
|
-
const LoadingComponent = class {
|
|
5133
|
-
constructor(hostRef) {
|
|
5134
|
-
registerInstance(this, hostRef);
|
|
5135
|
-
}
|
|
5136
|
-
render() {
|
|
5137
|
-
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)));
|
|
5138
|
-
}
|
|
5139
|
-
};
|
|
5140
|
-
|
|
5141
4551
|
const LoadingIndicator = class {
|
|
5142
4552
|
constructor(hostRef) {
|
|
5143
4553
|
registerInstance(this, hostRef);
|
|
@@ -5158,15 +4568,6 @@ const LoadingPage = class {
|
|
|
5158
4568
|
}
|
|
5159
4569
|
};
|
|
5160
4570
|
|
|
5161
|
-
const LoadingComponent$1 = class {
|
|
5162
|
-
constructor(hostRef) {
|
|
5163
|
-
registerInstance(this, hostRef);
|
|
5164
|
-
}
|
|
5165
|
-
render() {
|
|
5166
|
-
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.")));
|
|
5167
|
-
}
|
|
5168
|
-
};
|
|
5169
|
-
|
|
5170
4571
|
const MyOwnFund = class {
|
|
5171
4572
|
constructor(hostRef) {
|
|
5172
4573
|
registerInstance(this, hostRef);
|
|
@@ -5184,8 +4585,8 @@ const MyOwnFund = class {
|
|
|
5184
4585
|
const isSuperCampaignFallbackActivated = superSelectionAppService.isSuperCampaignFallbackActivated;
|
|
5185
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: {
|
|
5186
4587
|
'was-validated': this.formState === 'validated'
|
|
5187
|
-
}, 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$
|
|
5188
|
-
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);
|
|
5189
4590
|
this.isNotAllInformationProvidedMessageVisible = false;
|
|
5190
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:
|
|
5191
4592
|
// user clicks on disabled button (div wrapper) then validation errors will show
|
|
@@ -5196,25 +4597,25 @@ const MyOwnFund = class {
|
|
|
5196
4597
|
if (!this.formElement.checkValidity()) {
|
|
5197
4598
|
return;
|
|
5198
4599
|
}
|
|
5199
|
-
const isAllInformationProvided = isSome(state$
|
|
5200
|
-
isSome(state$
|
|
5201
|
-
isSome(state$
|
|
5202
|
-
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);
|
|
5203
4604
|
if (!isAllInformationProvided) {
|
|
5204
4605
|
this.isNotAllInformationProvidedMessageVisible = true;
|
|
5205
4606
|
return;
|
|
5206
4607
|
}
|
|
5207
4608
|
navigationService.navigateInternallyToStandardChoice({
|
|
5208
4609
|
history: this.history,
|
|
5209
|
-
fundName: this.getOrError(state$
|
|
4610
|
+
fundName: this.getOrError(state$1.myOwnFundForm.fundName),
|
|
5210
4611
|
fundDetails: {
|
|
5211
4612
|
type: 'myOwnFund',
|
|
5212
|
-
fundName: this.getOrError(state$
|
|
5213
|
-
fundUsi: this.getOrError(state$
|
|
5214
|
-
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)
|
|
5215
4616
|
},
|
|
5216
4617
|
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
5217
|
-
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);
|
|
5218
4619
|
await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
|
|
5219
4620
|
}
|
|
5220
4621
|
});
|
|
@@ -5265,7 +4666,7 @@ const MyOwnFundInputs = class {
|
|
|
5265
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,
|
|
5266
4667
|
'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
|
|
5267
4668
|
.showValidationErrors
|
|
5268
|
-
}, 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()) }))))));
|
|
5269
4670
|
}
|
|
5270
4671
|
updateFund(fund) {
|
|
5271
4672
|
this.formChanged.emit({ fundUsi: some(fund.value), fundName: some(fund.label) });
|
|
@@ -5367,7 +4768,7 @@ const Prefill = class {
|
|
|
5367
4768
|
return this.renderInvalidSMSF(this.prefill.data);
|
|
5368
4769
|
}
|
|
5369
4770
|
}
|
|
5370
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
4771
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5371
4772
|
return null;
|
|
5372
4773
|
}
|
|
5373
4774
|
renderMyOwnFund(data) {
|
|
@@ -5762,8 +5163,8 @@ const PrefillInvalidMyOwnFund = class {
|
|
|
5762
5163
|
}
|
|
5763
5164
|
else {
|
|
5764
5165
|
// If prefill does not exist, or is valid we should
|
|
5765
|
-
// not have landed on this page, navigate to
|
|
5766
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5166
|
+
// not have landed on this page, navigate to choice page
|
|
5167
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5767
5168
|
}
|
|
5768
5169
|
}
|
|
5769
5170
|
render() {
|
|
@@ -5774,7 +5175,7 @@ const PrefillInvalidMyOwnFund = class {
|
|
|
5774
5175
|
async handleChooseAnotherFund() {
|
|
5775
5176
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
5776
5177
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
5777
|
-
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5178
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5778
5179
|
}
|
|
5779
5180
|
};
|
|
5780
5181
|
|
|
@@ -5809,7 +5210,7 @@ const PrefillInvalidSMSF = class {
|
|
|
5809
5210
|
}
|
|
5810
5211
|
else {
|
|
5811
5212
|
// If prefill does not exist, or is valid we should
|
|
5812
|
-
// not have landed on this page, navigate to
|
|
5213
|
+
// not have landed on this page, navigate to PrefillInvalidMyOwnFundPage page
|
|
5813
5214
|
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
|
|
5814
5215
|
}
|
|
5815
5216
|
}
|
|
@@ -5837,7 +5238,7 @@ const PrefillInvalidSMSF = class {
|
|
|
5837
5238
|
async handleFundNominationDeclined() {
|
|
5838
5239
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
5839
5240
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
5840
|
-
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5241
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5841
5242
|
}
|
|
5842
5243
|
};
|
|
5843
5244
|
|
|
@@ -5877,8 +5278,8 @@ const PrefillMyOwnFund = class {
|
|
|
5877
5278
|
}
|
|
5878
5279
|
else {
|
|
5879
5280
|
// If prefill does not exist, or is invalid we should
|
|
5880
|
-
// not have landed on this page, navigate to
|
|
5881
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5281
|
+
// not have landed on this page, navigate to choice page
|
|
5282
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5882
5283
|
}
|
|
5883
5284
|
}
|
|
5884
5285
|
render() {
|
|
@@ -5959,7 +5360,7 @@ const PrefillMyOwnFund = class {
|
|
|
5959
5360
|
async handleFundNominationDeclined() {
|
|
5960
5361
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
5961
5362
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
5962
|
-
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5363
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
5963
5364
|
}
|
|
5964
5365
|
};
|
|
5965
5366
|
|
|
@@ -6109,8 +5510,8 @@ const PrefillSMSF = class {
|
|
|
6109
5510
|
}
|
|
6110
5511
|
else {
|
|
6111
5512
|
// If prefill does not exist, or is invalid we should
|
|
6112
|
-
// not have landed on this page, navigate to
|
|
6113
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5513
|
+
// not have landed on this page, navigate to PrefillInvalidSMSFPage page
|
|
5514
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidSMSFPage);
|
|
6114
5515
|
}
|
|
6115
5516
|
}
|
|
6116
5517
|
render() {
|
|
@@ -6316,7 +5717,7 @@ const PrefillSMSF = class {
|
|
|
6316
5717
|
async handleFundNominationDeclined() {
|
|
6317
5718
|
const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
|
|
6318
5719
|
await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
|
|
6319
|
-
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
5720
|
+
return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
6320
5721
|
}
|
|
6321
5722
|
};
|
|
6322
5723
|
|
|
@@ -6332,157 +5733,320 @@ const PrefillWarningBox = class {
|
|
|
6332
5733
|
}
|
|
6333
5734
|
};
|
|
6334
5735
|
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
throw new Error('Failed to process Promoted Fund choice request');
|
|
6342
|
-
})
|
|
6343
|
-
.text();
|
|
6344
|
-
}
|
|
6345
|
-
async submitDefaultChoiceAsync(dto) {
|
|
6346
|
-
return buildBackendApiClient()
|
|
6347
|
-
.url('super-choice/promoted-fund/default')
|
|
6348
|
-
.post(dto)
|
|
6349
|
-
.badRequest(() => {
|
|
6350
|
-
throw new Error('Failed to process Promoted Default Fund choice request');
|
|
6351
|
-
})
|
|
6352
|
-
.text();
|
|
6353
|
-
}
|
|
6354
|
-
async submitDefaultChoiceWithJoinAsync(dto) {
|
|
6355
|
-
return buildBackendApiClient()
|
|
6356
|
-
.url('super-choice/promoted-fund/default-with-join')
|
|
6357
|
-
.post(dto)
|
|
6358
|
-
.badRequest(() => {
|
|
6359
|
-
throw new Error('Failed to process Promoted Default Fund With Join choice request');
|
|
6360
|
-
})
|
|
6361
|
-
.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;
|
|
6362
5742
|
}
|
|
5743
|
+
digitArray[0]--;
|
|
5744
|
+
const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
|
|
5745
|
+
return sum % 89 === 0;
|
|
6363
5746
|
}
|
|
6364
|
-
const promotedFundChoiceApi = new PromotedFundChoiceApi();
|
|
6365
5747
|
|
|
6366
|
-
class
|
|
6367
|
-
constructor() {
|
|
6368
|
-
this
|
|
6369
|
-
this.
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
fundName,
|
|
6401
|
-
fundDetails: {
|
|
6402
|
-
type: 'promoted',
|
|
6403
|
-
fundName,
|
|
6404
|
-
fundUsi: usi,
|
|
6405
|
-
memberNumber: data.memberNumber,
|
|
6406
|
-
promotedFundId
|
|
6407
|
-
},
|
|
6408
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: promotedFundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
|
|
6409
|
-
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig)),
|
|
6410
|
-
promotedFundId
|
|
6411
|
-
});
|
|
6412
|
-
break;
|
|
6413
|
-
}
|
|
6414
|
-
/* falls through */
|
|
6415
|
-
default:
|
|
6416
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
6417
|
-
break;
|
|
6418
|
-
}
|
|
6419
|
-
reset();
|
|
6420
|
-
return;
|
|
6421
|
-
}
|
|
6422
|
-
if (data.sender === 'promoted-fund-join') {
|
|
6423
|
-
switch (data.type) {
|
|
6424
|
-
case 'contentResized':
|
|
6425
|
-
iframe$1.height = data.height > 0 ? data.height : iframe$1.height;
|
|
6426
|
-
iframe$1.width = data.width > 0 ? data.width : iframe$1.width;
|
|
6427
|
-
break;
|
|
6428
|
-
case 'pageNavigated':
|
|
6429
|
-
window.scroll(iframe$1.offsetLeft, iframe$1.offsetTop);
|
|
6430
|
-
iframe.navigation(window.location.href);
|
|
6431
|
-
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);
|
|
6432
5782
|
}
|
|
6433
|
-
}
|
|
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
|
|
6434
5848
|
};
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
const
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
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 [];
|
|
6451
5894
|
}
|
|
6452
5895
|
}
|
|
6453
|
-
|
|
6454
|
-
iframeDoc.close();
|
|
6455
|
-
form.submit();
|
|
5896
|
+
return [];
|
|
6456
5897
|
}
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
5898
|
+
filterDigits(str) {
|
|
5899
|
+
return str.replace(/[^0-9]/g, '');
|
|
5900
|
+
}
|
|
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
|
+
};
|
|
5936
|
+
|
|
5937
|
+
const StandardChoiceFormInputDefaultFund = class {
|
|
5938
|
+
constructor(hostRef) {
|
|
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);
|
|
5951
|
+
}
|
|
5952
|
+
render() {
|
|
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)
|
|
6475
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
|
+
}
|
|
6476
6020
|
}
|
|
6477
|
-
|
|
6478
|
-
|
|
6021
|
+
async handleSubmitForm() {
|
|
6022
|
+
this.formState = 'validated';
|
|
6023
|
+
if (this.formElement.checkValidity()) {
|
|
6024
|
+
await state.handleSubmitFn(this.standardChoiceFormSignature.trim());
|
|
6025
|
+
superSelectionAppService.markSuperSelectionAsSubmitted();
|
|
6026
|
+
}
|
|
6027
|
+
}
|
|
6028
|
+
};
|
|
6479
6029
|
|
|
6480
|
-
const
|
|
6030
|
+
const Success = class {
|
|
6481
6031
|
constructor(hostRef) {
|
|
6482
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);
|
|
6483
6041
|
}
|
|
6484
6042
|
render() {
|
|
6485
|
-
|
|
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();
|
|
6486
6050
|
}
|
|
6487
6051
|
};
|
|
6488
6052
|
|
|
@@ -16094,819 +15658,123 @@ class AppConfigurationQuery extends Query {
|
|
|
16094
15658
|
}
|
|
16095
15659
|
get configuration() {
|
|
16096
15660
|
const configuration = this.getValue().appConfiguration;
|
|
16097
|
-
if (isNone(configuration)) {
|
|
16098
|
-
throw Error('App configuration is not yet loaded');
|
|
16099
|
-
}
|
|
16100
|
-
return configuration.value;
|
|
16101
|
-
}
|
|
16102
|
-
}
|
|
16103
|
-
const appConfigurationQuery = new AppConfigurationQuery(sessionStore);
|
|
16104
|
-
|
|
16105
|
-
class AppInsightsService {
|
|
16106
|
-
constructor() {
|
|
16107
|
-
this.appInsights = new Lazy(() => new Initialization({
|
|
16108
|
-
config: {
|
|
16109
|
-
instrumentationKey: appConfigurationQuery.configuration.AppInsightsKey,
|
|
16110
|
-
enableAutoRouteTracking: true,
|
|
16111
|
-
autoTrackPageVisitTime: true,
|
|
16112
|
-
maxBatchInterval: 1000,
|
|
16113
|
-
enableUnhandledPromiseRejectionTracking: true
|
|
16114
|
-
}
|
|
16115
|
-
}));
|
|
16116
|
-
}
|
|
16117
|
-
init() {
|
|
16118
|
-
this.appInsights.value.loadAppInsights();
|
|
16119
|
-
setErrorHandler((err) => this.appInsightsErrorHandler(err));
|
|
16120
|
-
}
|
|
16121
|
-
getAppInsights() {
|
|
16122
|
-
return this.appInsights.value;
|
|
16123
|
-
}
|
|
16124
|
-
addCustomProperties(properties) {
|
|
16125
|
-
this.appInsights.value.addTelemetryInitializer((envelope) => {
|
|
16126
|
-
envelope.data = envelope.data ? envelope.data : {};
|
|
16127
|
-
for (const [k, v] of Object.entries(properties)) {
|
|
16128
|
-
envelope.data[k] = v;
|
|
16129
|
-
}
|
|
16130
|
-
});
|
|
16131
|
-
}
|
|
16132
|
-
trackErrorTrace(message) {
|
|
16133
|
-
this.appInsights.value.trackTrace({ message, severityLevel: SeverityLevel.Error });
|
|
16134
|
-
}
|
|
16135
|
-
appInsightsErrorHandler(error) {
|
|
16136
|
-
this.appInsights.value.trackException({
|
|
16137
|
-
error: error,
|
|
16138
|
-
severityLevel: SeverityLevel.Error
|
|
16139
|
-
});
|
|
16140
|
-
// eslint-disable-next-line no-console
|
|
16141
|
-
const defaultStencilErrorHandler = (error) => console.error(error);
|
|
16142
|
-
defaultStencilErrorHandler(error);
|
|
16143
|
-
}
|
|
16144
|
-
}
|
|
16145
|
-
const appInsights = new AppInsightsService();
|
|
16146
|
-
|
|
16147
|
-
class PromotedFundJoinV2IFrameBuilder {
|
|
16148
|
-
constructor() {
|
|
16149
|
-
this.getFundName = (fundId) => {
|
|
16150
|
-
return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
|
|
16151
|
-
};
|
|
16152
|
-
this.cleanUsi = (usi) => {
|
|
16153
|
-
return usi.replace(/ /g, '');
|
|
16154
|
-
};
|
|
16155
|
-
this.stringIsNullOrEmtpty = (s) => {
|
|
16156
|
-
return !(typeof s === 'string' && s.trim().length > 0);
|
|
16157
|
-
};
|
|
16158
|
-
this.environmentDiscriminator = () => {
|
|
16159
|
-
const discriminator = window.location.hostname.toLowerCase().split('.')[0];
|
|
16160
|
-
switch (discriminator) {
|
|
16161
|
-
case 'autodev-partner':
|
|
16162
|
-
case 'test-partner':
|
|
16163
|
-
case 'partner':
|
|
16164
|
-
case 'sandbox-partner':
|
|
16165
|
-
return discriminator.replace('partner', '');
|
|
16166
|
-
default:
|
|
16167
|
-
return 'autodev-';
|
|
16168
|
-
}
|
|
16169
|
-
};
|
|
16170
|
-
this.promotedFundJoinAppUrl = () => {
|
|
16171
|
-
return `https://${this.environmentDiscriminator()}api.simplefinancialchoices.com/promoted-funds/embed`;
|
|
16172
|
-
};
|
|
16173
|
-
}
|
|
16174
|
-
build(iframe$1, history) {
|
|
16175
|
-
if (!(iframe$1 === null || iframe$1 === void 0 ? void 0 : iframe$1.contentDocument))
|
|
16176
|
-
return;
|
|
16177
|
-
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) });
|
|
16178
|
-
const handleMessage = async (event) => {
|
|
16179
|
-
const { data } = event;
|
|
16180
|
-
if (!data) {
|
|
16181
|
-
return;
|
|
16182
|
-
}
|
|
16183
|
-
if (data.sender === 'promoted-fund-redirect') {
|
|
16184
|
-
window.removeEventListener('message', handleMessage);
|
|
16185
|
-
switch (data.type) {
|
|
16186
|
-
case 'cancel':
|
|
16187
|
-
if (state.fund.type === 'DefinedBenefits') {
|
|
16188
|
-
// Note: we don't expect a cancel event from Defined Benefits flow but just in case
|
|
16189
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ConsentPage);
|
|
16190
|
-
}
|
|
16191
|
-
else {
|
|
16192
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16193
|
-
}
|
|
16194
|
-
break;
|
|
16195
|
-
case 'success': {
|
|
16196
|
-
const promotedFundId = state.fund.id;
|
|
16197
|
-
const fundName = this.getFundName(promotedFundId);
|
|
16198
|
-
const usi = this.cleanUsi(data.usi);
|
|
16199
|
-
switch (state.fund.type) {
|
|
16200
|
-
case 'Promoted':
|
|
16201
|
-
if (this.stringIsNullOrEmtpty(data.memberNumber) ||
|
|
16202
|
-
this.stringIsNullOrEmtpty(data.usi)) {
|
|
16203
|
-
appInsights.trackErrorTrace('PFJ C# did not return (Promoted) memberNumber and/or usi');
|
|
16204
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16205
|
-
break;
|
|
16206
|
-
}
|
|
16207
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16208
|
-
history,
|
|
16209
|
-
fundName,
|
|
16210
|
-
promotedFundId,
|
|
16211
|
-
fundDetails: {
|
|
16212
|
-
type: 'promoted',
|
|
16213
|
-
fundName,
|
|
16214
|
-
fundUsi: usi,
|
|
16215
|
-
memberNumber: data.memberNumber,
|
|
16216
|
-
promotedFundId
|
|
16217
|
-
},
|
|
16218
|
-
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))
|
|
16219
|
-
});
|
|
16220
|
-
break;
|
|
16221
|
-
case 'PromotedDefault':
|
|
16222
|
-
if (this.stringIsNullOrEmtpty(data.usi)) {
|
|
16223
|
-
appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefault) usi');
|
|
16224
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16225
|
-
break;
|
|
16226
|
-
}
|
|
16227
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16228
|
-
history,
|
|
16229
|
-
fundName,
|
|
16230
|
-
promotedFundId,
|
|
16231
|
-
fundDetails: {
|
|
16232
|
-
type: 'promotedDefault',
|
|
16233
|
-
fundName,
|
|
16234
|
-
fundUsi: usi,
|
|
16235
|
-
promotedFundId
|
|
16236
|
-
},
|
|
16237
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: promotedFundId, usi,
|
|
16238
|
-
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
|
|
16239
|
-
});
|
|
16240
|
-
break;
|
|
16241
|
-
case 'DefinedBenefits':
|
|
16242
|
-
throw Error('DefinedBenefits is not supported in legacy "success" message');
|
|
16243
|
-
case 'null':
|
|
16244
|
-
throw Error('PromotedFundState.type was not set.');
|
|
16245
|
-
}
|
|
16246
|
-
break;
|
|
16247
|
-
}
|
|
16248
|
-
case 'success-promoted': {
|
|
16249
|
-
if (this.stringIsNullOrEmtpty(data.memberNumber) ||
|
|
16250
|
-
this.stringIsNullOrEmtpty(data.usi)) {
|
|
16251
|
-
appInsights.trackErrorTrace('PFJ C# did not return (Promoted) memberNumber and/or usi');
|
|
16252
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16253
|
-
break;
|
|
16254
|
-
}
|
|
16255
|
-
const usi = this.cleanUsi(data.usi);
|
|
16256
|
-
const fundName = this.getFundName(data.fundId);
|
|
16257
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16258
|
-
history,
|
|
16259
|
-
fundName,
|
|
16260
|
-
promotedFundId: data.fundId,
|
|
16261
|
-
fundDetails: {
|
|
16262
|
-
type: 'promoted',
|
|
16263
|
-
fundName,
|
|
16264
|
-
fundUsi: usi,
|
|
16265
|
-
memberNumber: data.memberNumber,
|
|
16266
|
-
promotedFundId: data.fundId
|
|
16267
|
-
},
|
|
16268
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
|
|
16269
|
-
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
|
|
16270
|
-
});
|
|
16271
|
-
break;
|
|
16272
|
-
}
|
|
16273
|
-
case 'success-promoted-default': {
|
|
16274
|
-
if (this.stringIsNullOrEmtpty(data.usi)) {
|
|
16275
|
-
appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefault) usi');
|
|
16276
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16277
|
-
break;
|
|
16278
|
-
}
|
|
16279
|
-
const usi = this.cleanUsi(data.usi);
|
|
16280
|
-
const fundName = this.getFundName(data.fundId);
|
|
16281
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16282
|
-
history,
|
|
16283
|
-
fundName,
|
|
16284
|
-
promotedFundId: data.fundId,
|
|
16285
|
-
fundDetails: {
|
|
16286
|
-
type: 'promotedDefault',
|
|
16287
|
-
fundName,
|
|
16288
|
-
fundUsi: usi,
|
|
16289
|
-
promotedFundId: data.fundId
|
|
16290
|
-
},
|
|
16291
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: data.fundId, usi,
|
|
16292
|
-
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
|
|
16293
|
-
});
|
|
16294
|
-
break;
|
|
16295
|
-
}
|
|
16296
|
-
case 'success-promoted-default-with-join': {
|
|
16297
|
-
if (this.stringIsNullOrEmtpty(data.memberNumber) ||
|
|
16298
|
-
this.stringIsNullOrEmtpty(data.usi)) {
|
|
16299
|
-
appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefaultWithJoin) memberNumber and/or usi');
|
|
16300
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16301
|
-
break;
|
|
16302
|
-
}
|
|
16303
|
-
const usi = this.cleanUsi(data.usi);
|
|
16304
|
-
const fundName = this.getFundName(data.fundId);
|
|
16305
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16306
|
-
history,
|
|
16307
|
-
fundName,
|
|
16308
|
-
promotedFundId: data.fundId,
|
|
16309
|
-
fundDetails: {
|
|
16310
|
-
type: 'promotedDefaultWithJoin',
|
|
16311
|
-
fundName,
|
|
16312
|
-
fundUsi: usi,
|
|
16313
|
-
memberNumber: data.memberNumber,
|
|
16314
|
-
promotedFundId: data.fundId
|
|
16315
|
-
},
|
|
16316
|
-
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceWithJoinAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
|
|
16317
|
-
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
|
|
16318
|
-
});
|
|
16319
|
-
break;
|
|
16320
|
-
}
|
|
16321
|
-
case 'success-defined-benefits':
|
|
16322
|
-
if (this.stringIsNullOrEmtpty(data.memberNumber) ||
|
|
16323
|
-
this.stringIsNullOrEmtpty(data.usi)) {
|
|
16324
|
-
appInsights.trackErrorTrace('PFJ C# did not return (DefinedBenefits) memberNumber and/or usi');
|
|
16325
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ConsentPage);
|
|
16326
|
-
break;
|
|
16327
|
-
}
|
|
16328
|
-
await customFundChoiceApi.submitDefinedBenefitsChoiceAsync(Object.assign(Object.assign({ fundUsi: this.cleanUsi(data.usi) }, data), superSelectionAppService.promotedFundsConfig));
|
|
16329
|
-
superSelectionAppService.markSuperSelectionAsSubmitted();
|
|
16330
|
-
break;
|
|
16331
|
-
/* falls through */
|
|
16332
|
-
default:
|
|
16333
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16334
|
-
break;
|
|
16335
|
-
}
|
|
16336
|
-
reset();
|
|
16337
|
-
return;
|
|
16338
|
-
}
|
|
16339
|
-
if (data.sender === 'promoted-fund-join') {
|
|
16340
|
-
switch (data.type) {
|
|
16341
|
-
case 'contentResized':
|
|
16342
|
-
iframe$1.height = data.height > 0 ? String(data.height) : iframe$1.height;
|
|
16343
|
-
iframe$1.width = data.width > 0 ? String(data.width) : iframe$1.width;
|
|
16344
|
-
break;
|
|
16345
|
-
case 'pageNavigated':
|
|
16346
|
-
window.scroll(iframe$1.offsetLeft, iframe$1.offsetTop);
|
|
16347
|
-
iframe.navigation(window.location.href);
|
|
16348
|
-
break;
|
|
16349
|
-
}
|
|
16350
|
-
}
|
|
16351
|
-
};
|
|
16352
|
-
window.addEventListener('message', handleMessage);
|
|
16353
|
-
const iframeDoc = iframe$1.contentDocument;
|
|
16354
|
-
iframeDoc.open();
|
|
16355
|
-
const form = iframeDoc.createElement('form');
|
|
16356
|
-
form.method = 'POST';
|
|
16357
|
-
form.target = '_self';
|
|
16358
|
-
form.action = this.promotedFundJoinAppUrl();
|
|
16359
|
-
let prop;
|
|
16360
|
-
for (prop in postData) {
|
|
16361
|
-
const value = postData[prop];
|
|
16362
|
-
if (value !== undefined) {
|
|
16363
|
-
const input = document.createElement('input');
|
|
16364
|
-
input.name = prop;
|
|
16365
|
-
input.type = 'hidden';
|
|
16366
|
-
if (typeof value === 'boolean') {
|
|
16367
|
-
input.value = value ? 'true' : 'false';
|
|
16368
|
-
}
|
|
16369
|
-
else {
|
|
16370
|
-
input.value = value;
|
|
16371
|
-
}
|
|
16372
|
-
form.append(input);
|
|
16373
|
-
}
|
|
16374
|
-
}
|
|
16375
|
-
iframeDoc.appendChild(form);
|
|
16376
|
-
iframeDoc.close();
|
|
16377
|
-
form.submit();
|
|
16378
|
-
}
|
|
16379
|
-
getMemberData() {
|
|
16380
|
-
var _a, _b;
|
|
16381
|
-
const superBuyer = superSelectionAppService.superBuyer;
|
|
16382
|
-
return {
|
|
16383
|
-
title: superBuyer.userProfile.title,
|
|
16384
|
-
firstName: superBuyer.userProfile.firstName,
|
|
16385
|
-
middleName: superBuyer.userProfile.middleName,
|
|
16386
|
-
lastName: superBuyer.userProfile.lastName,
|
|
16387
|
-
dateOfBirth: superBuyer.userProfile.dateOfBirth,
|
|
16388
|
-
gender: superBuyer.userProfile.gender,
|
|
16389
|
-
email: superBuyer.userProfile.email,
|
|
16390
|
-
mobilePhone: superBuyer.userProfile.mobilePhone,
|
|
16391
|
-
taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
|
|
16392
|
-
addressLine1: superBuyer.userProfile.address.addressLine1,
|
|
16393
|
-
addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
|
|
16394
|
-
city: superBuyer.userProfile.address.city,
|
|
16395
|
-
state: superBuyer.userProfile.address.state,
|
|
16396
|
-
postCode: superBuyer.userProfile.address.postcode
|
|
16397
|
-
};
|
|
16398
|
-
}
|
|
16399
|
-
}
|
|
16400
|
-
const PromotedFundJoinV2IFrameBuilder$1 = new PromotedFundJoinV2IFrameBuilder();
|
|
16401
|
-
|
|
16402
|
-
const PromotedFundJoinV2Page = class {
|
|
16403
|
-
constructor(hostRef) {
|
|
16404
|
-
registerInstance(this, hostRef);
|
|
16405
|
-
}
|
|
16406
|
-
render() {
|
|
16407
|
-
return (h("sss-iframe-host", { build: (iframe) => PromotedFundJoinV2IFrameBuilder$1.build(iframe, this.history) }));
|
|
16408
|
-
}
|
|
16409
|
-
};
|
|
16410
|
-
|
|
16411
|
-
function validateAbn(abn) {
|
|
16412
|
-
const digitArray = abn.split('').map(Number);
|
|
16413
|
-
const isAllDigits = digitArray.every((d) => !isNaN(d));
|
|
16414
|
-
const weightingFactors = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
|
|
16415
|
-
if (!isAllDigits || digitArray.length !== weightingFactors.length) {
|
|
16416
|
-
return false;
|
|
16417
|
-
}
|
|
16418
|
-
digitArray[0]--;
|
|
16419
|
-
const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
|
|
16420
|
-
return sum % 89 === 0;
|
|
16421
|
-
}
|
|
16422
|
-
|
|
16423
|
-
const SelfManagedFund = class {
|
|
16424
|
-
constructor(hostRef) {
|
|
16425
|
-
registerInstance(this, hostRef);
|
|
16426
|
-
this.isSubmitDisabled = true;
|
|
16427
|
-
this.isAbnValid = validateAbn(state$2.selfManagedFundForm.fundAbn);
|
|
16428
|
-
this.eventTrackingService = EventTrackingService.Instance;
|
|
16429
|
-
this.success = () => {
|
|
16430
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16431
|
-
history: this.history,
|
|
16432
|
-
fundName: 'Self-managed super fund',
|
|
16433
|
-
fundDetails: {
|
|
16434
|
-
type: 'smsf',
|
|
16435
|
-
fundName: state$2.selfManagedFundForm.fundName,
|
|
16436
|
-
fundEsa: state$2.selfManagedFundForm.fundEsa
|
|
16437
|
-
},
|
|
16438
|
-
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
16439
|
-
const requestDto = Object.assign({ smsfChoice: {
|
|
16440
|
-
abn: state$2.selfManagedFundForm.fundAbn,
|
|
16441
|
-
fundName: state$2.selfManagedFundForm.fundName,
|
|
16442
|
-
fundAddress: {
|
|
16443
|
-
addressLine1: state$2.selfManagedFundForm.addressLine1,
|
|
16444
|
-
addressLine2: state$2.selfManagedFundForm.addressLine2,
|
|
16445
|
-
city: state$2.selfManagedFundForm.city,
|
|
16446
|
-
state: state$2.selfManagedFundForm.state,
|
|
16447
|
-
postcode: state$2.selfManagedFundForm.postcode
|
|
16448
|
-
},
|
|
16449
|
-
bsb: state$2.selfManagedFundForm.bsb,
|
|
16450
|
-
bankAccountName: state$2.selfManagedFundForm.bankAccountName,
|
|
16451
|
-
bankAccountNumber: state$2.selfManagedFundForm.bankAccountNumber,
|
|
16452
|
-
electronicServiceAddress: state$2.selfManagedFundForm.fundEsa,
|
|
16453
|
-
memberFirstName: state$2.selfManagedFundForm.memberFirstName,
|
|
16454
|
-
memberFamilyName: state$2.selfManagedFundForm.memberFamilyName
|
|
16455
|
-
}, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
|
|
16456
|
-
await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
|
|
16457
|
-
}
|
|
16458
|
-
});
|
|
16459
|
-
};
|
|
16460
|
-
}
|
|
16461
|
-
componentDidLoad() {
|
|
16462
|
-
this.updateIsSubmitDisabled();
|
|
16463
|
-
return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
|
|
16464
|
-
promotedFundsShown: superSelectionAppService.promotedFunds,
|
|
16465
|
-
defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
|
|
16466
|
-
});
|
|
16467
|
-
}
|
|
16468
|
-
render() {
|
|
16469
|
-
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: {
|
|
16470
|
-
'was-validated': this.formState === 'validated'
|
|
16471
|
-
}, 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) => {
|
|
16472
|
-
state$2.selfManagedFundForm = Object.assign(Object.assign({}, state$2.selfManagedFundForm), event.detail);
|
|
16473
|
-
if (event.detail.isAbnValid !== undefined)
|
|
16474
|
-
this.isAbnValid = event.detail.isAbnValid;
|
|
16475
|
-
this.updateIsSubmitDisabled();
|
|
16476
|
-
} })), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "sm:max-w-320 w-full" }, h("div", { class: "mb-4", onClick:
|
|
16477
|
-
// user clicks on disabled button (div wrapper) then validation errors will show
|
|
16478
|
-
() => (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")))))))));
|
|
16479
|
-
}
|
|
16480
|
-
updateIsSubmitDisabled() {
|
|
16481
|
-
this.isSubmitDisabled = !this.formElement.checkValidity() || !this.isAbnValid;
|
|
16482
|
-
}
|
|
16483
|
-
async handleSubmitForm() {
|
|
16484
|
-
this.formState = 'validated';
|
|
16485
|
-
if (this.formElement.checkValidity())
|
|
16486
|
-
this.success();
|
|
16487
|
-
}
|
|
16488
|
-
};
|
|
16489
|
-
injectHistory(SelfManagedFund);
|
|
16490
|
-
|
|
16491
|
-
var AbnValidationStatus;
|
|
16492
|
-
(function (AbnValidationStatus) {
|
|
16493
|
-
AbnValidationStatus[AbnValidationStatus["Invalid"] = 1] = "Invalid";
|
|
16494
|
-
AbnValidationStatus[AbnValidationStatus["AbnIsUsedForRegulatedFund"] = 2] = "AbnIsUsedForRegulatedFund";
|
|
16495
|
-
AbnValidationStatus[AbnValidationStatus["Valid"] = 3] = "Valid";
|
|
16496
|
-
})(AbnValidationStatus || (AbnValidationStatus = {}));
|
|
16497
|
-
const SelfManagedFundInputs = class {
|
|
16498
|
-
constructor(hostRef) {
|
|
16499
|
-
registerInstance(this, hostRef);
|
|
16500
|
-
this.formChanged = createEvent(this, "formChanged", 7);
|
|
16501
|
-
this.abnValidationStatus = AbnValidationStatus.Invalid;
|
|
16502
|
-
this.isAbnTouched = false;
|
|
16503
|
-
this.currentBank = none;
|
|
16504
|
-
this.addressErrorMessage = none;
|
|
16505
|
-
this.stateOptions = [
|
|
16506
|
-
{ value: 'NSW', label: 'NSW' },
|
|
16507
|
-
{ value: 'QLD', label: 'QLD' },
|
|
16508
|
-
{ value: 'ACT', label: 'ACT' },
|
|
16509
|
-
{ value: 'VIC', label: 'VIC' },
|
|
16510
|
-
{ value: 'TAS', label: 'TAS' },
|
|
16511
|
-
{ value: 'WA', label: 'WA' },
|
|
16512
|
-
{ value: 'SA', label: 'SA' },
|
|
16513
|
-
{ value: 'NT', label: 'NT' }
|
|
16514
|
-
];
|
|
16515
|
-
this.bsbRegex = new RegExp(/^[0-9]{3}[0-9]{3}$/);
|
|
16516
|
-
this.bankAccountNumberRegex = new RegExp(/^[0-9]{2,10}$/);
|
|
16517
|
-
}
|
|
16518
|
-
render() {
|
|
16519
|
-
const inputClass = {
|
|
16520
|
-
'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,
|
|
16521
|
-
'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
|
|
16522
|
-
.showValidationErrors
|
|
16523
|
-
};
|
|
16524
|
-
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) => {
|
|
16525
|
-
const abnInput = ev.target;
|
|
16526
|
-
this.updateFormField('fundAbn', abnInput.value.trim());
|
|
16527
|
-
this.abnValidationStatus = AbnValidationStatus.Invalid;
|
|
16528
|
-
if (validateAbn(abnInput.value)) {
|
|
16529
|
-
const isAbnUsedForRegulatedFund = await this.isAbnUsedForRegulatedAsync(abnInput.value);
|
|
16530
|
-
this.abnValidationStatus = isAbnUsedForRegulatedFund
|
|
16531
|
-
? AbnValidationStatus.AbnIsUsedForRegulatedFund
|
|
16532
|
-
: AbnValidationStatus.Valid;
|
|
16533
|
-
}
|
|
16534
|
-
// We need to set a custom validity message to trigger css invalid styles for non valid cases
|
|
16535
|
-
const validityMessage = this.abnValidationStatus === AbnValidationStatus.Valid
|
|
16536
|
-
? ''
|
|
16537
|
-
: 'Enter a valid fund ABN (digits only)';
|
|
16538
|
-
abnInput.setCustomValidity(validityMessage);
|
|
16539
|
-
this.updateFormField('isAbnValid', this.abnValidationStatus === AbnValidationStatus.Valid);
|
|
16540
|
-
}, 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) => {
|
|
16541
|
-
this.updateFormField('addressLine1', ev.target.value.trim());
|
|
16542
|
-
this.updateAddressErrorMessage();
|
|
16543
|
-
}, 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) => {
|
|
16544
|
-
this.updateFormField('city', ev.target.value.trim());
|
|
16545
|
-
this.updateAddressErrorMessage();
|
|
16546
|
-
}, 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) => {
|
|
16547
|
-
this.updateFormField('postcode', ev.target.value.trim());
|
|
16548
|
-
this.updateAddressErrorMessage();
|
|
16549
|
-
}, 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) => {
|
|
16550
|
-
this.updateFormField('state', ev.target.value.trim());
|
|
16551
|
-
this.updateAddressErrorMessage();
|
|
16552
|
-
}, 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")))));
|
|
16553
|
-
}
|
|
16554
|
-
updateFormField(key, value) {
|
|
16555
|
-
this.formChanged.emit({ [key]: value });
|
|
16556
|
-
}
|
|
16557
|
-
async isAbnUsedForRegulatedAsync(abn) {
|
|
16558
|
-
return !(await customFundChoiceApi.validateAbnForSMSF(abn));
|
|
16559
|
-
}
|
|
16560
|
-
renderAbnValidationError() {
|
|
16561
|
-
if (this.isAbnTouched || this.showValidationErrors) {
|
|
16562
|
-
switch (this.abnValidationStatus) {
|
|
16563
|
-
case AbnValidationStatus.Invalid:
|
|
16564
|
-
return h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
|
|
16565
|
-
case AbnValidationStatus.AbnIsUsedForRegulatedFund:
|
|
16566
|
-
return (h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
|
|
16567
|
-
case AbnValidationStatus.Valid:
|
|
16568
|
-
return [];
|
|
16569
|
-
}
|
|
16570
|
-
}
|
|
16571
|
-
return [];
|
|
16572
|
-
}
|
|
16573
|
-
filterDigits(str) {
|
|
16574
|
-
return str.replace(/[^0-9]/g, '');
|
|
16575
|
-
}
|
|
16576
|
-
updateCurrentBank(ev) {
|
|
16577
|
-
const value = this.filterDigits(ev.target.value);
|
|
16578
|
-
const firstTwoNumbers = value.substring(0, 2);
|
|
16579
|
-
const firstThreeNumbers = value.substring(0, 3);
|
|
16580
|
-
const firstTwoNumberBankName = bsbNumbers[firstTwoNumbers];
|
|
16581
|
-
const firstThreeNumberBankName = bsbNumbers[firstThreeNumbers];
|
|
16582
|
-
if (firstTwoNumberBankName)
|
|
16583
|
-
this.currentBank = some(firstTwoNumberBankName);
|
|
16584
|
-
if (firstThreeNumberBankName)
|
|
16585
|
-
this.currentBank = some(firstThreeNumberBankName);
|
|
16586
|
-
if (value === '' || value.length > 6)
|
|
16587
|
-
this.currentBank = none;
|
|
16588
|
-
this.updateFormField('bsb', value);
|
|
16589
|
-
}
|
|
16590
|
-
updateCurrentBankAccountNumber(ev) {
|
|
16591
|
-
const value = this.filterDigits(ev.target.value);
|
|
16592
|
-
this.updateFormField('bankAccountNumber', value);
|
|
16593
|
-
}
|
|
16594
|
-
updateAddressErrorMessage() {
|
|
16595
|
-
let message = none;
|
|
16596
|
-
if (isNone(message) && !this.addressLine1Element.checkValidity()) {
|
|
16597
|
-
message = some('Enter a valid address line 1');
|
|
16598
|
-
}
|
|
16599
|
-
if (isNone(message) && !this.cityElement.checkValidity()) {
|
|
16600
|
-
message = some('Enter a valid city/suburb');
|
|
16601
|
-
}
|
|
16602
|
-
if (isNone(message) && !this.postcodeElement.checkValidity()) {
|
|
16603
|
-
message = some('Enter a valid post code');
|
|
16604
|
-
}
|
|
16605
|
-
if (isNone(message) && !this.stateElement.checkValidity()) {
|
|
16606
|
-
message = some('Select a state');
|
|
16607
|
-
}
|
|
16608
|
-
this.addressErrorMessage = message;
|
|
16609
|
-
}
|
|
16610
|
-
};
|
|
16611
|
-
|
|
16612
|
-
class InteropQuery extends Query {
|
|
16613
|
-
constructor(store) {
|
|
16614
|
-
super(store);
|
|
16615
|
-
this.store = store;
|
|
16616
|
-
}
|
|
16617
|
-
isReactNativeInteropEnabled() {
|
|
16618
|
-
return isSome(this.getValue().reactNativeInterop);
|
|
16619
|
-
}
|
|
16620
|
-
isIframeInteropEnabled() {
|
|
16621
|
-
return isSome(this.getValue().iframeInterop);
|
|
16622
|
-
}
|
|
16623
|
-
getIframeInteropMode() {
|
|
16624
|
-
const iframeInterop = this.getValue().iframeInterop;
|
|
16625
|
-
if (isNone(iframeInterop)) {
|
|
16626
|
-
throw Error('Failed to get iframe interop information: no data in store');
|
|
16627
|
-
}
|
|
16628
|
-
if (!this.isIframeInteropEnabled()) {
|
|
16629
|
-
throw Error('Failed to get iframe interop information: iframe mode is disabled');
|
|
16630
|
-
}
|
|
16631
|
-
return iframeInterop.value;
|
|
16632
|
-
}
|
|
16633
|
-
}
|
|
16634
|
-
const interopQuery = new InteropQuery(sessionStore);
|
|
16635
|
-
|
|
16636
|
-
class SlateChoiceApi {
|
|
16637
|
-
async submitSlateChoiceAsync(dto) {
|
|
16638
|
-
return buildBackendApiClient()
|
|
16639
|
-
.url('super-choice/slate')
|
|
16640
|
-
.post(dto)
|
|
16641
|
-
.badRequest(() => {
|
|
16642
|
-
throw new Error('Failed to process Slate join request');
|
|
16643
|
-
})
|
|
16644
|
-
.text();
|
|
16645
|
-
}
|
|
16646
|
-
}
|
|
16647
|
-
const slateChoiceApi = new SlateChoiceApi();
|
|
16648
|
-
|
|
16649
|
-
class SlateIFrameBuilder {
|
|
16650
|
-
constructor() {
|
|
16651
|
-
this.hostIsLocalSuperSelection = () => window.location.origin === 'http://localhost:7100';
|
|
16652
|
-
this.hostIsDeployed = () => window.location.origin.endsWith('partner.flarehr.com');
|
|
16653
|
-
this.skipConsolidation = () => (interopQuery.isReactNativeInteropEnabled() ? 'true' : 'false');
|
|
16654
|
-
this.skipInsurance = () => (interopQuery.isReactNativeInteropEnabled() ? 'true' : 'false');
|
|
16655
|
-
this.environmentDiscriminator = () => {
|
|
16656
|
-
const discriminator = window.location.hostname.toLowerCase().split('.')[0];
|
|
16657
|
-
switch (discriminator) {
|
|
16658
|
-
case 'autodev-partner':
|
|
16659
|
-
case 'test-partner':
|
|
16660
|
-
case 'partner':
|
|
16661
|
-
case 'sandbox-partner':
|
|
16662
|
-
return discriminator.replace('partner', '');
|
|
16663
|
-
default:
|
|
16664
|
-
return 'autodev-';
|
|
16665
|
-
}
|
|
16666
|
-
};
|
|
16667
|
-
this.slateJoinAppUrl = () => {
|
|
16668
|
-
return `https://${this.environmentDiscriminator()}join.slatesuper.com.au/confirm`;
|
|
16669
|
-
};
|
|
16670
|
-
}
|
|
16671
|
-
build(iframe, history) {
|
|
16672
|
-
if (!(iframe === null || iframe === void 0 ? void 0 : iframe.contentDocument))
|
|
16673
|
-
return;
|
|
16674
|
-
const baseUrl = this.hostIsLocalSuperSelection() || this.hostIsDeployed()
|
|
16675
|
-
? `${window.location.origin}/super-selection/embed/v1.0/app`
|
|
16676
|
-
: 'https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app';
|
|
16677
|
-
const redirectUrl = `${baseUrl}/slate-redirect.html`;
|
|
16678
|
-
const postData = Object.assign(Object.assign({}, this.getSlateJoinMemberData()), { successRedirectUrl: redirectUrl, cancelRedirectUrl: redirectUrl, skipConsolidation: this.skipConsolidation(), skipInsurance: this.skipInsurance() });
|
|
16679
|
-
if (this.includeJwt()) {
|
|
16680
|
-
postData.authToken = superSelectionAppService.jwt;
|
|
16681
|
-
}
|
|
16682
|
-
const handleMessage = (event) => {
|
|
16683
|
-
const { data, origin } = event;
|
|
16684
|
-
if (!data) {
|
|
16685
|
-
return;
|
|
16686
|
-
}
|
|
16687
|
-
if (data.sender === 'slate-redirect') {
|
|
16688
|
-
window.removeEventListener('message', handleMessage);
|
|
16689
|
-
switch (data.type) {
|
|
16690
|
-
case 'success':
|
|
16691
|
-
if (data.memberNumber) {
|
|
16692
|
-
navigationService.navigateInternallyToStandardChoice({
|
|
16693
|
-
history,
|
|
16694
|
-
fundName: fund$8.name,
|
|
16695
|
-
fundDetails: {
|
|
16696
|
-
type: 'promoted',
|
|
16697
|
-
fundName: fund$8.name,
|
|
16698
|
-
fundUsi: slateUsi,
|
|
16699
|
-
memberNumber: data.memberNumber,
|
|
16700
|
-
promotedFundId: fund$8.fundId
|
|
16701
|
-
},
|
|
16702
|
-
handleSubmitFn: (standardChoiceFormSignature) => slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig)),
|
|
16703
|
-
promotedFundId: fund$8.fundId
|
|
16704
|
-
});
|
|
16705
|
-
break;
|
|
16706
|
-
}
|
|
16707
|
-
/* falls through */
|
|
16708
|
-
default:
|
|
16709
|
-
navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
|
|
16710
|
-
break;
|
|
16711
|
-
}
|
|
16712
|
-
reset();
|
|
16713
|
-
return;
|
|
16714
|
-
}
|
|
16715
|
-
if (data.sender === 'flare' && origin.endsWith('join.slatesuper.com.au')) {
|
|
16716
|
-
switch (data.type) {
|
|
16717
|
-
case 'contentResized':
|
|
16718
|
-
iframe.height = data.height > 0 ? data.height : iframe.height;
|
|
16719
|
-
iframe.width = data.width > 0 ? data.width : iframe.width;
|
|
16720
|
-
break;
|
|
16721
|
-
}
|
|
16722
|
-
}
|
|
16723
|
-
};
|
|
16724
|
-
window.addEventListener('message', handleMessage);
|
|
16725
|
-
const iframeDoc = iframe.contentDocument;
|
|
16726
|
-
iframeDoc.open();
|
|
16727
|
-
const form = iframeDoc.createElement('form');
|
|
16728
|
-
form.method = 'POST';
|
|
16729
|
-
form.target = '_self';
|
|
16730
|
-
form.action = this.slateJoinAppUrl();
|
|
16731
|
-
let prop;
|
|
16732
|
-
for (prop in postData) {
|
|
16733
|
-
const value = postData[prop];
|
|
16734
|
-
if (value !== undefined) {
|
|
16735
|
-
const input = document.createElement('input');
|
|
16736
|
-
input.type = 'hidden';
|
|
16737
|
-
input.name = prop;
|
|
16738
|
-
input.value = value;
|
|
16739
|
-
form.append(input);
|
|
16740
|
-
}
|
|
16741
|
-
}
|
|
16742
|
-
iframeDoc.appendChild(form);
|
|
16743
|
-
iframeDoc.close();
|
|
16744
|
-
form.submit();
|
|
16745
|
-
}
|
|
16746
|
-
getSlateJoinMemberData() {
|
|
16747
|
-
var _a, _b;
|
|
16748
|
-
const superBuyer = superSelectionAppService.superBuyer;
|
|
16749
|
-
const toSlateGender = (gender) => {
|
|
16750
|
-
switch (gender) {
|
|
16751
|
-
case 'Male':
|
|
16752
|
-
return 'Male';
|
|
16753
|
-
case 'Female':
|
|
16754
|
-
return 'Female';
|
|
16755
|
-
case 'Intersex':
|
|
16756
|
-
return 'Intersex/Indeterminate';
|
|
16757
|
-
default:
|
|
16758
|
-
return 'Unknown';
|
|
16759
|
-
}
|
|
16760
|
-
};
|
|
16761
|
-
return {
|
|
16762
|
-
firstName: superBuyer.userProfile.firstName,
|
|
16763
|
-
middleName: superBuyer.userProfile.middleName,
|
|
16764
|
-
lastName: superBuyer.userProfile.lastName,
|
|
16765
|
-
dateOfBirth: superBuyer.userProfile.dateOfBirth,
|
|
16766
|
-
gender: toSlateGender(superBuyer.userProfile.gender),
|
|
16767
|
-
email: superBuyer.userProfile.email,
|
|
16768
|
-
mobilePhone: superBuyer.userProfile.mobilePhone,
|
|
16769
|
-
taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
|
|
16770
|
-
addressLine1: superBuyer.userProfile.address.addressLine1,
|
|
16771
|
-
addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
|
|
16772
|
-
city: superBuyer.userProfile.address.city,
|
|
16773
|
-
state: superBuyer.userProfile.address.state,
|
|
16774
|
-
postCode: superBuyer.userProfile.address.postcode
|
|
16775
|
-
};
|
|
16776
|
-
}
|
|
16777
|
-
includeJwt() {
|
|
16778
|
-
return !this.slateJoinAppUrl().match(/autodev|sandbox/);
|
|
15661
|
+
if (isNone(configuration)) {
|
|
15662
|
+
throw Error('App configuration is not yet loaded');
|
|
15663
|
+
}
|
|
15664
|
+
return configuration.value;
|
|
16779
15665
|
}
|
|
16780
15666
|
}
|
|
16781
|
-
const
|
|
15667
|
+
const appConfigurationQuery = new AppConfigurationQuery(sessionStore);
|
|
16782
15668
|
|
|
16783
|
-
|
|
16784
|
-
constructor(
|
|
16785
|
-
|
|
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
|
+
}));
|
|
16786
15680
|
}
|
|
16787
|
-
|
|
16788
|
-
|
|
15681
|
+
init() {
|
|
15682
|
+
this.appInsights.value.loadAppInsights();
|
|
15683
|
+
setErrorHandler((err) => this.appInsightsErrorHandler(err));
|
|
16789
15684
|
}
|
|
16790
|
-
|
|
16791
|
-
|
|
16792
|
-
const StandardChoiceFormInputDefaultFund = class {
|
|
16793
|
-
constructor(hostRef) {
|
|
16794
|
-
registerInstance(this, hostRef);
|
|
16795
|
-
this.standardChoiceFormSignature = '';
|
|
16796
|
-
this.isSubmitDisabled = true;
|
|
16797
|
-
this.eventTrackingService = EventTrackingService.Instance;
|
|
16798
|
-
this.ignorePopState = () => window.history.pushState(null, '', null);
|
|
15685
|
+
getAppInsights() {
|
|
15686
|
+
return this.appInsights.value;
|
|
16799
15687
|
}
|
|
16800
|
-
|
|
16801
|
-
this.
|
|
16802
|
-
|
|
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
|
+
});
|
|
16803
15695
|
}
|
|
16804
|
-
|
|
16805
|
-
|
|
15696
|
+
trackErrorTrace(message) {
|
|
15697
|
+
this.appInsights.value.trackTrace({ message, severityLevel: SeverityLevel.Error });
|
|
16806
15698
|
}
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
'mt-3': true,
|
|
16816
|
-
'was-validated': this.formState === 'validated'
|
|
16817
|
-
}, 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: {
|
|
16818
|
-
'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,
|
|
16819
|
-
'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
|
|
16820
|
-
}, 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);
|
|
16821
15707
|
}
|
|
16822
|
-
|
|
16823
|
-
|
|
16824
|
-
|
|
16825
|
-
|
|
16826
|
-
|
|
16827
|
-
|
|
16828
|
-
}
|
|
15708
|
+
}
|
|
15709
|
+
const appInsights = new AppInsightsService();
|
|
15710
|
+
|
|
15711
|
+
class SuperCampaignErrorApi {
|
|
15712
|
+
static get Instance() {
|
|
15713
|
+
return this.instance || (this.instance = new this());
|
|
16829
15714
|
}
|
|
16830
|
-
async
|
|
16831
|
-
|
|
16832
|
-
promotedFundsShown: superSelectionAppService.promotedFunds,
|
|
16833
|
-
defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
|
|
16834
|
-
};
|
|
16835
|
-
switch (state$1.fundDetails.type) {
|
|
16836
|
-
case 'default':
|
|
16837
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16838
|
-
DefaultFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16839
|
-
});
|
|
16840
|
-
break;
|
|
16841
|
-
case 'myOwnFund':
|
|
16842
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16843
|
-
MyOwnFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16844
|
-
});
|
|
16845
|
-
break;
|
|
16846
|
-
case 'smsf':
|
|
16847
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16848
|
-
Smsf: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16849
|
-
});
|
|
16850
|
-
break;
|
|
16851
|
-
case 'promoted':
|
|
16852
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16853
|
-
PromotedFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16854
|
-
});
|
|
16855
|
-
break;
|
|
16856
|
-
case 'promotedDefault':
|
|
16857
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16858
|
-
PromotedDefaultFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16859
|
-
});
|
|
16860
|
-
break;
|
|
16861
|
-
case 'promotedDefaultWithJoin':
|
|
16862
|
-
await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
|
|
16863
|
-
PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, state$1.fundDetails), common)
|
|
16864
|
-
});
|
|
16865
|
-
break;
|
|
16866
|
-
case 'null':
|
|
16867
|
-
throw 'standardChoiceFormState.fundDetails was not set';
|
|
16868
|
-
}
|
|
15715
|
+
async PostError(error) {
|
|
15716
|
+
buildBackendApiClient().url('super-campaign/errors').post(error);
|
|
16869
15717
|
}
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
|
|
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';
|
|
16875
15727
|
}
|
|
15728
|
+
return {
|
|
15729
|
+
isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
|
|
15730
|
+
superCampaignEnabled: superCampaignEnabled
|
|
15731
|
+
};
|
|
16876
15732
|
}
|
|
16877
15733
|
};
|
|
16878
15734
|
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
|
|
16883
|
-
|
|
16884
|
-
|
|
16885
|
-
|
|
16886
|
-
|
|
16887
|
-
|
|
16888
|
-
disconnectedCallback() {
|
|
16889
|
-
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();
|
|
16890
15744
|
}
|
|
16891
|
-
|
|
16892
|
-
|
|
16893
|
-
|
|
16894
|
-
|
|
16895
|
-
|
|
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();
|
|
16896
15753
|
}
|
|
16897
|
-
|
|
16898
|
-
|
|
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();
|
|
16899
15762
|
}
|
|
16900
|
-
}
|
|
15763
|
+
}
|
|
15764
|
+
const promotedFundChoiceApi = new PromotedFundChoiceApi();
|
|
16901
15765
|
|
|
16902
|
-
class
|
|
16903
|
-
|
|
16904
|
-
return
|
|
16905
|
-
|
|
16906
|
-
|
|
16907
|
-
|
|
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();
|
|
16908
15775
|
}
|
|
16909
15776
|
}
|
|
15777
|
+
const slateChoiceApi = new SlateChoiceApi();
|
|
16910
15778
|
|
|
16911
15779
|
class MiscService {
|
|
16912
15780
|
trackClickPromotedTileAsync(payload) {
|
|
@@ -17066,9 +15934,6 @@ const SuperCampaignHost = class {
|
|
|
17066
15934
|
}
|
|
17067
15935
|
return Promise.resolve();
|
|
17068
15936
|
};
|
|
17069
|
-
this.getFundName = (fundId) => {
|
|
17070
|
-
return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
|
|
17071
|
-
};
|
|
17072
15937
|
this.stringIsNullOrEmtpty = (s) => {
|
|
17073
15938
|
return !(typeof s === 'string' && s.trim().length > 0);
|
|
17074
15939
|
};
|
|
@@ -17078,21 +15943,20 @@ const SuperCampaignHost = class {
|
|
|
17078
15943
|
return;
|
|
17079
15944
|
}
|
|
17080
15945
|
const usi = Usi.clean(data.usi);
|
|
17081
|
-
const fundName = this.getFundName(data.fundId);
|
|
17082
15946
|
const defaultFundUsiSet = Option.toUndefined(superSelectionAppService.defaultFundUsi);
|
|
17083
15947
|
navigationService.navigateInternallyToStandardChoice({
|
|
17084
15948
|
history: this.history,
|
|
17085
|
-
fundName,
|
|
15949
|
+
fundName: data.fundName,
|
|
17086
15950
|
promotedFundId: data.fundId,
|
|
17087
15951
|
fundDetails: {
|
|
17088
15952
|
type: 'promoted',
|
|
17089
|
-
fundName,
|
|
15953
|
+
fundName: data.fundName,
|
|
17090
15954
|
fundUsi: usi,
|
|
17091
15955
|
memberNumber: data.memberNumber,
|
|
17092
15956
|
promotedFundId: data.fundId
|
|
17093
15957
|
},
|
|
17094
15958
|
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
17095
|
-
if (data.fundId ==
|
|
15959
|
+
if (data.fundId == slate.fundId) {
|
|
17096
15960
|
await slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature,
|
|
17097
15961
|
defaultFundUsiSet }, this.PromotedFundsConfig));
|
|
17098
15962
|
}
|
|
@@ -17110,14 +15974,13 @@ const SuperCampaignHost = class {
|
|
|
17110
15974
|
return;
|
|
17111
15975
|
}
|
|
17112
15976
|
const usi = Usi.clean(data.usi);
|
|
17113
|
-
const fundName = this.getFundName(data.fundId);
|
|
17114
15977
|
navigationService.navigateInternallyToStandardChoice({
|
|
17115
15978
|
history: this.history,
|
|
17116
|
-
fundName,
|
|
15979
|
+
fundName: data.fundName,
|
|
17117
15980
|
promotedFundId: data.fundId,
|
|
17118
15981
|
fundDetails: {
|
|
17119
15982
|
type: 'promotedDefault',
|
|
17120
|
-
fundName,
|
|
15983
|
+
fundName: data.fundName,
|
|
17121
15984
|
fundUsi: usi,
|
|
17122
15985
|
promotedFundId: data.fundId
|
|
17123
15986
|
},
|
|
@@ -17131,14 +15994,13 @@ const SuperCampaignHost = class {
|
|
|
17131
15994
|
return;
|
|
17132
15995
|
}
|
|
17133
15996
|
const usi = Usi.clean(data.usi);
|
|
17134
|
-
const fundName = this.getFundName(data.fundId);
|
|
17135
15997
|
navigationService.navigateInternallyToStandardChoice({
|
|
17136
15998
|
history: this.history,
|
|
17137
|
-
fundName,
|
|
15999
|
+
fundName: data.fundName,
|
|
17138
16000
|
promotedFundId: data.fundId,
|
|
17139
16001
|
fundDetails: {
|
|
17140
16002
|
type: 'promotedDefaultWithJoin',
|
|
17141
|
-
fundName,
|
|
16003
|
+
fundName: data.fundName,
|
|
17142
16004
|
fundUsi: usi,
|
|
17143
16005
|
memberNumber: data.memberNumber,
|
|
17144
16006
|
promotedFundId: data.fundId
|
|
@@ -17171,7 +16033,7 @@ const SuperCampaignHost = class {
|
|
|
17171
16033
|
async componentWillLoad() {
|
|
17172
16034
|
if (superSelectionAppService.state.superCampaignComponentStatus ===
|
|
17173
16035
|
SuperCampaignComponentStatus.NotWorking) {
|
|
17174
|
-
|
|
16036
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
|
|
17175
16037
|
return;
|
|
17176
16038
|
}
|
|
17177
16039
|
let superCampaingScriptPath = undefined;
|
|
@@ -17245,136 +16107,6 @@ const SuperCampaignHost = class {
|
|
|
17245
16107
|
};
|
|
17246
16108
|
injectHistory(SuperCampaignHost);
|
|
17247
16109
|
|
|
17248
|
-
const SuperChoiceItemBottom = class {
|
|
17249
|
-
constructor(hostRef) {
|
|
17250
|
-
registerInstance(this, hostRef);
|
|
17251
|
-
this.joinFundClicked = createEvent(this, "joinFundClicked", 7);
|
|
17252
|
-
}
|
|
17253
|
-
render() {
|
|
17254
|
-
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))))));
|
|
17255
|
-
}
|
|
17256
|
-
handleFundClick() {
|
|
17257
|
-
return this.joinFundClicked.emit();
|
|
17258
|
-
}
|
|
17259
|
-
};
|
|
17260
|
-
|
|
17261
|
-
const SuperChoiceItemTop = class {
|
|
17262
|
-
constructor(hostRef) {
|
|
17263
|
-
registerInstance(this, hostRef);
|
|
17264
|
-
}
|
|
17265
|
-
render() {
|
|
17266
|
-
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: {
|
|
17267
|
-
'h-12 md:h-14 lg:h-16 object-contain w-[80px] md:w-[96px] lg:w-[140px] md:hidden lg:object-left': true,
|
|
17268
|
-
'lg:block': this.isMultiFund
|
|
17269
|
-
}, alt: this.name, src: getAssetPath(`assets/${this.logo}`) }), h("div", { class: "grid content-center" }, h("p", { class: {
|
|
17270
|
-
'text-base md:text-lg font-bold ml-4 md:ml-0 md:mb-0': true,
|
|
17271
|
-
'lg:mt-4': this.isMultiFund
|
|
17272
|
-
} }, 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)));
|
|
17273
|
-
}
|
|
17274
|
-
};
|
|
17275
|
-
|
|
17276
|
-
const SuperChoicePage = class {
|
|
17277
|
-
constructor(hostRef) {
|
|
17278
|
-
registerInstance(this, hostRef);
|
|
17279
|
-
this.promotedFunds = this.getPromotedFunds();
|
|
17280
|
-
this.eventTrackingService = EventTrackingService.Instance;
|
|
17281
|
-
}
|
|
17282
|
-
async componentDidLoad() {
|
|
17283
|
-
const promotedFundsShown = this.promotedFunds.map((item) => item.fundId);
|
|
17284
|
-
await superSelectionAppService.viewSuperFundPanelAsync(promotedFundsShown);
|
|
17285
|
-
}
|
|
17286
|
-
render() {
|
|
17287
|
-
const mygovLink = 'https://my.gov.au';
|
|
17288
|
-
const mygovLinkDisplay = 'www.my.gov.au';
|
|
17289
|
-
const superfundsLink = 'https://www.apra.gov.au/register-of-superannuation-institutions';
|
|
17290
|
-
const superfundsLinkDisplay = 'www.apra.gov.au';
|
|
17291
|
-
const isMultiFund = this.promotedFunds.length > 1;
|
|
17292
|
-
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: {
|
|
17293
|
-
'lg:grid border-l border-t lg:border-b rounded-lg': true,
|
|
17294
|
-
'lg:grid-cols-1 max-w-720': this.promotedFunds.length === 1,
|
|
17295
|
-
'lg:grid-cols-2 max-w-720': this.promotedFunds.length === 2,
|
|
17296
|
-
'lg:grid-cols-3 max-w-960': this.promotedFunds.length === 3
|
|
17297
|
-
} }, this.promotedFunds.map((fund, index) => (h("div", { class: {
|
|
17298
|
-
'border-r': true,
|
|
17299
|
-
'rounded-tr-lg': index === 0,
|
|
17300
|
-
'lg:rounded-tr-none': index === 0 && index !== this.promotedFunds.length - 1,
|
|
17301
|
-
'rounded-br-lg lg:rounded-br-none lg:rounded-tr-lg': index === this.promotedFunds.length - 1
|
|
17302
|
-
} }, h("div", { class: {
|
|
17303
|
-
'flex border-b lg:border-b-0': true,
|
|
17304
|
-
'rounded-b-lg': index === this.promotedFunds.length - 1
|
|
17305
|
-
} }, h("div", { class: {
|
|
17306
|
-
'hidden md:flex w-36 justify-center pt-6 pl-6': true,
|
|
17307
|
-
'lg:hidden': isMultiFund
|
|
17308
|
-
} }, 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: {
|
|
17309
|
-
'hidden border-r': true,
|
|
17310
|
-
'lg:block': isMultiFund,
|
|
17311
|
-
'rounded-br-lg': index === this.promotedFunds.length - 1
|
|
17312
|
-
} }, 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.")))))));
|
|
17313
|
-
}
|
|
17314
|
-
getPromotedFunds() {
|
|
17315
|
-
const fundTiles = [];
|
|
17316
|
-
superSelectionAppService.promotedFunds.forEach((fundId) => {
|
|
17317
|
-
const fund = allPromotedFunds.find((fund) => fundId === fund.fundId);
|
|
17318
|
-
if (fund !== undefined) {
|
|
17319
|
-
fundTiles.push(fund);
|
|
17320
|
-
}
|
|
17321
|
-
});
|
|
17322
|
-
return fundTiles;
|
|
17323
|
-
}
|
|
17324
|
-
async handleJoinSuperClickAsync(fund) {
|
|
17325
|
-
const promotedFundsShown = superSelectionAppService.promotedFunds;
|
|
17326
|
-
const fundUsi = getFundUsiByFundId(fund.fundId);
|
|
17327
|
-
const fundName = getFundNameByFundId(fund.fundId);
|
|
17328
|
-
await Promise.all([
|
|
17329
|
-
fund.isPromotedDefault == true
|
|
17330
|
-
? this.eventTrackingService.TrackPromotedDefaultSuperFundDetailViewedAsync({
|
|
17331
|
-
fundUsi: Option.isSome(fundUsi) ? fundUsi.value : '',
|
|
17332
|
-
fundName: Option.isSome(fundName) ? fundName.value : '',
|
|
17333
|
-
promotedFundId: fund.fundId,
|
|
17334
|
-
promotedFundsShown,
|
|
17335
|
-
defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
|
|
17336
|
-
superCampaignEnabled: false
|
|
17337
|
-
})
|
|
17338
|
-
: this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({
|
|
17339
|
-
fundUsi: Option.isSome(fundUsi) ? fundUsi.value : undefined,
|
|
17340
|
-
fundName: Option.isSome(fundName) ? fundName.value : '',
|
|
17341
|
-
promotedFundId: fund.fundId,
|
|
17342
|
-
promotedFundsShown,
|
|
17343
|
-
defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
|
|
17344
|
-
superCampaignEnabled: false
|
|
17345
|
-
}),
|
|
17346
|
-
miscService.trackClickPromotedTileAsync(fund.isPromotedDefault
|
|
17347
|
-
? {
|
|
17348
|
-
promotedDefault: {
|
|
17349
|
-
fundId: fund.fundId
|
|
17350
|
-
}
|
|
17351
|
-
}
|
|
17352
|
-
: {
|
|
17353
|
-
promoted: {
|
|
17354
|
-
fundId: fund.fundId
|
|
17355
|
-
}
|
|
17356
|
-
})
|
|
17357
|
-
]);
|
|
17358
|
-
state.fund = {
|
|
17359
|
-
id: fund.fundId,
|
|
17360
|
-
type: fund.isPromotedDefault ? 'PromotedDefault' : 'Promoted'
|
|
17361
|
-
};
|
|
17362
|
-
return navigationService.navigateInternally(this.history, fund.route);
|
|
17363
|
-
}
|
|
17364
|
-
static get assetsDirs() { return ["assets"]; }
|
|
17365
|
-
};
|
|
17366
|
-
injectHistory(SuperChoicePage);
|
|
17367
|
-
|
|
17368
|
-
const SuperChoicePageWrapper = class {
|
|
17369
|
-
constructor(hostRef) {
|
|
17370
|
-
registerInstance(this, hostRef);
|
|
17371
|
-
}
|
|
17372
|
-
render() {
|
|
17373
|
-
return superSelectionAppService.state.superCampaignEnabled ? (h("sss-super-campaign-host", null)) : (h("sss-super-choice-page", null));
|
|
17374
|
-
}
|
|
17375
|
-
};
|
|
17376
|
-
injectHistory(SuperChoicePageWrapper);
|
|
17377
|
-
|
|
17378
16110
|
const routeCss = "stencil-route.inactive{display:none}";
|
|
17379
16111
|
|
|
17380
16112
|
const Route = class {
|
|
@@ -18371,7 +17103,7 @@ const SuperSelectionApp = class {
|
|
|
18371
17103
|
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ExistingChoicePage);
|
|
18372
17104
|
}
|
|
18373
17105
|
else {
|
|
18374
|
-
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.
|
|
17106
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
18375
17107
|
}
|
|
18376
17108
|
}
|
|
18377
17109
|
authTokenChanged(newValue) {
|
|
@@ -18383,24 +17115,12 @@ const SuperSelectionApp = class {
|
|
|
18383
17115
|
render() {
|
|
18384
17116
|
return (h(Host, null, h("link", { rel: "stylesheet", href: getAssetPath('apollo-super-selection.css'), media: "all" }), this.renderAppContent()));
|
|
18385
17117
|
}
|
|
18386
|
-
isFundJoinPage() {
|
|
18387
|
-
return (window.location.pathname.includes(SuperSelectionAppRoutes.SlateJoin) ||
|
|
18388
|
-
window.location.pathname.includes(SuperSelectionAppRoutes.PromotedFundJoinV1) ||
|
|
18389
|
-
window.location.pathname.includes(SuperSelectionAppRoutes.PromotedFundJoinV2));
|
|
18390
|
-
}
|
|
18391
|
-
getFooterTextOverride() {
|
|
18392
|
-
return getFooterTextOverrideByFundId(state.fund.id);
|
|
18393
|
-
}
|
|
18394
17118
|
routerBaseUrl() {
|
|
18395
17119
|
var _a;
|
|
18396
17120
|
return ((_a = this.appBaseUrl) === null || _a === void 0 ? void 0 : _a.replace(/\/$/, '')) + '/';
|
|
18397
17121
|
}
|
|
18398
17122
|
renderAppContent() {
|
|
18399
|
-
return (h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" }, h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (h("div", { class: {
|
|
18400
|
-
'pt-28': true,
|
|
18401
|
-
'-mt-12 pb-6': !this.isFundJoinPage(),
|
|
18402
|
-
'-mt-28': this.isFundJoinPage() // -mt value same as pt to negate it in embedded fund join pages
|
|
18403
|
-
} }, 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))))));
|
|
18404
17124
|
}
|
|
18405
17125
|
static get assetsDirs() { return ["assets"]; }
|
|
18406
17126
|
static get watchers() { return {
|
|
@@ -19013,6 +17733,30 @@ class AuthenticationService {
|
|
|
19013
17733
|
}
|
|
19014
17734
|
const authenticationService = new AuthenticationService();
|
|
19015
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
|
+
|
|
19016
17760
|
class IFrameInteropService {
|
|
19017
17761
|
static completeSuperSelectionStep() {
|
|
19018
17762
|
const { successRedirectionUrl } = interopQuery.getIframeInteropMode();
|
|
@@ -19176,4 +17920,4 @@ const SuperSelectionAppHost = class {
|
|
|
19176
17920
|
};
|
|
19177
17921
|
SuperSelectionAppHost.style = superSelectionAppHostCss;
|
|
19178
17922
|
|
|
19179
|
-
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 };
|