@flarehr/apollo-super-selection 4.56.44913 → 4.58.46161
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.esm.js +1 -1
- package/dist/lib/apollo-super-selection/p-26251f49.entry.js +14 -0
- package/dist/lib/apollo-super-selection/p-8263f5b7.system.entry.js +69 -0
- package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
- package/dist/lib/cjs/sss-button_41.cjs.entry.js +165 -26
- package/dist/lib/collection/components/super-campaign/super-campaign-types.js +5 -1
- package/dist/lib/collection/components/super-campaign/super-campaign.js +140 -5
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/hesta-default.js +8 -15
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +3 -3
- package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +17 -3
- package/dist/lib/esm/sss-button_41.entry.js +165 -26
- package/dist/lib/esm-es5/sss-button_41.entry.js +4 -4
- package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +40 -2
- package/dist/lib/types/components/super-campaign/super-campaign.d.ts +9 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +1 -1
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +4 -3
- package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +8 -4
- package/package.json +1 -1
- package/dist/lib/apollo-super-selection/p-1a253321.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-47600481.system.entry.js +0 -69
- package/readme.md +0 -41
|
@@ -260,7 +260,7 @@ class TapSubscriber extends Subscriber {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
const AppVersion = '4.
|
|
263
|
+
const AppVersion = '4.58.46161';
|
|
264
264
|
|
|
265
265
|
// -------------------------------------------------------------------------------------
|
|
266
266
|
// guards
|
|
@@ -3496,6 +3496,22 @@ class SuperSelectionApi {
|
|
|
3496
3496
|
}
|
|
3497
3497
|
const superSelectionApi = new SuperSelectionApi();
|
|
3498
3498
|
|
|
3499
|
+
class SuperCampaignState {
|
|
3500
|
+
constructor(funds) {
|
|
3501
|
+
this.promotedFundsShown = funds;
|
|
3502
|
+
}
|
|
3503
|
+
get PromotedFundIds() {
|
|
3504
|
+
return this.promotedFundsShown.map((p) => p.fundId);
|
|
3505
|
+
}
|
|
3506
|
+
get DefaultFundPosition() {
|
|
3507
|
+
this.promotedFundsShown.filter((value, index) => {
|
|
3508
|
+
if (value.fundType == 'promoted-default') {
|
|
3509
|
+
return index;
|
|
3510
|
+
}
|
|
3511
|
+
});
|
|
3512
|
+
return undefined;
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3499
3515
|
const initialState = {
|
|
3500
3516
|
apiBaseUrl: Option.none,
|
|
3501
3517
|
appBaseUrl: Option.none,
|
|
@@ -3512,9 +3528,7 @@ const initialState = {
|
|
|
3512
3528
|
isDefinedBenefitsEligible: Option.none,
|
|
3513
3529
|
campaignConnect: Option.none,
|
|
3514
3530
|
superCampaignEnabled: false,
|
|
3515
|
-
superCampaignState:
|
|
3516
|
-
promotedFundsShown: []
|
|
3517
|
-
}
|
|
3531
|
+
superCampaignState: undefined
|
|
3518
3532
|
};
|
|
3519
3533
|
|
|
3520
3534
|
class SuperSelectionAppService {
|
|
@@ -3641,8 +3655,8 @@ class SuperSelectionAppService {
|
|
|
3641
3655
|
this._state.campaignConnect = Option.fromNullable(campaignConnect);
|
|
3642
3656
|
}
|
|
3643
3657
|
}
|
|
3644
|
-
setSuperCampaignPromotedFundsShown(
|
|
3645
|
-
this._state.superCampaignState
|
|
3658
|
+
setSuperCampaignPromotedFundsShown(shownFunds) {
|
|
3659
|
+
this._state.superCampaignState = new SuperCampaignState(shownFunds);
|
|
3646
3660
|
}
|
|
3647
3661
|
get superCampaignState() {
|
|
3648
3662
|
return this._state.superCampaignState;
|
|
@@ -4470,27 +4484,20 @@ const fund$5 = {
|
|
|
4470
4484
|
h("p", null, "1+ million members"),
|
|
4471
4485
|
h("p", null, "Expert help whenever you need it to help you face the future with confidence")
|
|
4472
4486
|
],
|
|
4473
|
-
featureSubText:
|
|
4474
|
-
"* SuperRatings 10 Year Platinum Performance 2013-2023 (MySuper). Product ratings and awards are only one factor to be considered. See",
|
|
4475
|
-
' ',
|
|
4476
|
-
h(Link, { className: "underline underline-offset-2 hover:text-gray-600", href: "https://www.hesta.com.au/ratings" }, "hesta.com.au/ratings"),
|
|
4477
|
-
' ',
|
|
4478
|
-
"for more information.")),
|
|
4487
|
+
featureSubText: undefined,
|
|
4479
4488
|
disclaimer: (h("div", { class: "space-y-2" },
|
|
4480
|
-
h("p",
|
|
4481
|
-
"
|
|
4489
|
+
h("p", { class: "italic" },
|
|
4490
|
+
"* 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",
|
|
4482
4491
|
' ',
|
|
4483
|
-
h(Link, { href: "https://www.
|
|
4484
|
-
|
|
4492
|
+
h(Link, { className: "underline underline-offset-2 hover:text-gray-600", href: "https://www.hesta.com.au/ratings" }, "hesta.com.au/ratings"),
|
|
4493
|
+
' ',
|
|
4494
|
+
"for more information."),
|
|
4485
4495
|
h("p", null,
|
|
4486
|
-
"
|
|
4496
|
+
"Consider whether this product is appropriate for you by reading the Product Disclosure Statement and Target Market Determination at",
|
|
4487
4497
|
' ',
|
|
4488
4498
|
h(Link, { onClick: () => pdsViewedAsync(name$5), href: "https://www.hesta.com.au/pds" }, "hesta.com.au/pds"),
|
|
4489
4499
|
' ',
|
|
4490
|
-
"
|
|
4491
|
-
' ',
|
|
4492
|
-
h(Link, { href: "https://www.hesta.com.au/tmd" }, "hesta.com.au/tmd"),
|
|
4493
|
-
"."),
|
|
4500
|
+
"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."),
|
|
4494
4501
|
h("p", null, "Issued by H.E.S.T. Australia Ltd ABN 66 006 818 695 AFSL No. 235249, Trustee of HESTA"))),
|
|
4495
4502
|
footnoteTextOverride: Option.none,
|
|
4496
4503
|
isPromotedDefault: true
|
|
@@ -16813,6 +16820,12 @@ class MiscService {
|
|
|
16813
16820
|
}
|
|
16814
16821
|
const miscService = new MiscService();
|
|
16815
16822
|
|
|
16823
|
+
const Usi = {
|
|
16824
|
+
clean: (usi) => {
|
|
16825
|
+
return usi.replace(/ /g, '');
|
|
16826
|
+
}
|
|
16827
|
+
};
|
|
16828
|
+
|
|
16816
16829
|
const SuperCampaignHost = class {
|
|
16817
16830
|
constructor(hostRef) {
|
|
16818
16831
|
registerInstance(this, hostRef);
|
|
@@ -16850,7 +16863,7 @@ const SuperCampaignHost = class {
|
|
|
16850
16863
|
// eslint-disable-next-line no-console
|
|
16851
16864
|
console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
|
|
16852
16865
|
const promotedFundsShown = event.detail.shownFunds.map((f) => f.fundId);
|
|
16853
|
-
superSelectionAppService.setSuperCampaignPromotedFundsShown(
|
|
16866
|
+
superSelectionAppService.setSuperCampaignPromotedFundsShown(event.detail.shownFunds);
|
|
16854
16867
|
await EventTrackingService.Instance.TrackSuperFundPanelViewedAsync({
|
|
16855
16868
|
promotedFundsShown,
|
|
16856
16869
|
defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
|
|
@@ -16864,10 +16877,10 @@ const SuperCampaignHost = class {
|
|
|
16864
16877
|
if (eventDetails.sender == 'super-campaign') {
|
|
16865
16878
|
// eslint-disable-next-line no-console
|
|
16866
16879
|
console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
|
|
16867
|
-
const promotedFundsShown =
|
|
16880
|
+
const promotedFundsShown = this.SuperCampaignState.PromotedFundIds;
|
|
16868
16881
|
const defaultFundUsiSet = Option.toUndefined(superSelectionAppService.defaultFundUsi);
|
|
16869
16882
|
await Promise.all([
|
|
16870
|
-
eventDetails.fundType == '
|
|
16883
|
+
eventDetails.fundType == 'promoted-default'
|
|
16871
16884
|
? await EventTrackingService.Instance.TrackPromotedDefaultSuperFundDetailViewedAsync({
|
|
16872
16885
|
fundUsi: (_b = eventDetails.fundUsi) !== null && _b !== void 0 ? _b : '',
|
|
16873
16886
|
fundName: eventDetails.fundName,
|
|
@@ -16884,7 +16897,7 @@ const SuperCampaignHost = class {
|
|
|
16884
16897
|
defaultFundUsiSet,
|
|
16885
16898
|
superCampaignEnabled: true
|
|
16886
16899
|
}),
|
|
16887
|
-
miscService.trackClickPromotedTileAsync(eventDetails.fundType == '
|
|
16900
|
+
miscService.trackClickPromotedTileAsync(eventDetails.fundType == 'promoted-default'
|
|
16888
16901
|
? {
|
|
16889
16902
|
promotedDefault: {
|
|
16890
16903
|
fundId: eventDetails.fundId
|
|
@@ -16929,13 +16942,127 @@ const SuperCampaignHost = class {
|
|
|
16929
16942
|
});
|
|
16930
16943
|
}
|
|
16931
16944
|
};
|
|
16945
|
+
this.promotedFundJoined = async (event) => {
|
|
16946
|
+
var _a;
|
|
16947
|
+
if (event.detail.sender == 'super-campaign') {
|
|
16948
|
+
// eslint-disable-next-line no-console
|
|
16949
|
+
console.log(`$handling super-campaign event: ${(_a = event.detail) === null || _a === void 0 ? void 0 : _a.type}`);
|
|
16950
|
+
const fundJoinInfo = event.detail.fundJoinInfo;
|
|
16951
|
+
switch (fundJoinInfo.fundType) {
|
|
16952
|
+
case 'Promoted':
|
|
16953
|
+
this.handlePromotedFundJoined(fundJoinInfo);
|
|
16954
|
+
break;
|
|
16955
|
+
case 'DefinedBenefits':
|
|
16956
|
+
await this.handleDefinedBenefitsJoined(fundJoinInfo);
|
|
16957
|
+
break;
|
|
16958
|
+
case 'PromotedDefault':
|
|
16959
|
+
this.handlePromotedDefaultFundJoined(fundJoinInfo);
|
|
16960
|
+
break;
|
|
16961
|
+
case 'PromotedDefaultWithJoin':
|
|
16962
|
+
this.handlePromotedDefaultFundWithJoinWasJoined(fundJoinInfo);
|
|
16963
|
+
break;
|
|
16964
|
+
}
|
|
16965
|
+
}
|
|
16966
|
+
return Promise.resolve();
|
|
16967
|
+
};
|
|
16968
|
+
this.getFundName = (fundId) => {
|
|
16969
|
+
return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
|
|
16970
|
+
};
|
|
16971
|
+
this.stringIsNullOrEmtpty = (s) => {
|
|
16972
|
+
return !(typeof s === 'string' && s.trim().length > 0);
|
|
16973
|
+
};
|
|
16974
|
+
this.handlePromotedFundJoined = (data) => {
|
|
16975
|
+
if (this.stringIsNullOrEmtpty(data.memberNumber) || this.stringIsNullOrEmtpty(data.usi)) {
|
|
16976
|
+
appInsights.trackErrorTrace('Super Campaign did not return (Promoted) memberNumber and/or usi');
|
|
16977
|
+
navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
|
|
16978
|
+
return;
|
|
16979
|
+
}
|
|
16980
|
+
const usi = Usi.clean(data.usi);
|
|
16981
|
+
const fundName = this.getFundName(data.fundId);
|
|
16982
|
+
const defaultFundUsiSet = Option.toUndefined(superSelectionAppService.defaultFundUsi);
|
|
16983
|
+
navigationService.navigateInternallyToStandardChoice({
|
|
16984
|
+
history: this.history,
|
|
16985
|
+
fundName,
|
|
16986
|
+
promotedFundId: data.fundId,
|
|
16987
|
+
fundDetails: {
|
|
16988
|
+
type: 'promoted',
|
|
16989
|
+
fundName,
|
|
16990
|
+
fundUsi: usi,
|
|
16991
|
+
memberNumber: data.memberNumber,
|
|
16992
|
+
promotedFundId: data.fundId
|
|
16993
|
+
},
|
|
16994
|
+
handleSubmitFn: async (standardChoiceFormSignature) => {
|
|
16995
|
+
if (data.fundId == fund$8.fundId) {
|
|
16996
|
+
await slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature,
|
|
16997
|
+
defaultFundUsiSet }, this.PromotedFundsConfig));
|
|
16998
|
+
}
|
|
16999
|
+
else {
|
|
17000
|
+
await promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
|
|
17001
|
+
standardChoiceFormSignature,
|
|
17002
|
+
defaultFundUsiSet }, this.PromotedFundsConfig));
|
|
17003
|
+
}
|
|
17004
|
+
}
|
|
17005
|
+
});
|
|
17006
|
+
};
|
|
17007
|
+
this.handlePromotedDefaultFundJoined = (data) => {
|
|
17008
|
+
if (this.stringIsNullOrEmtpty(data.usi)) {
|
|
17009
|
+
appInsights.trackErrorTrace('Super Campaign did not return (PromotedDefault) usi');
|
|
17010
|
+
return;
|
|
17011
|
+
}
|
|
17012
|
+
const usi = Usi.clean(data.usi);
|
|
17013
|
+
const fundName = this.getFundName(data.fundId);
|
|
17014
|
+
navigationService.navigateInternallyToStandardChoice({
|
|
17015
|
+
history: this.history,
|
|
17016
|
+
fundName,
|
|
17017
|
+
promotedFundId: data.fundId,
|
|
17018
|
+
fundDetails: {
|
|
17019
|
+
type: 'promotedDefault',
|
|
17020
|
+
fundName,
|
|
17021
|
+
fundUsi: usi,
|
|
17022
|
+
promotedFundId: data.fundId
|
|
17023
|
+
},
|
|
17024
|
+
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: data.fundId, usi,
|
|
17025
|
+
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, this.PromotedFundsConfig))
|
|
17026
|
+
});
|
|
17027
|
+
};
|
|
17028
|
+
this.handlePromotedDefaultFundWithJoinWasJoined = (data) => {
|
|
17029
|
+
if (this.stringIsNullOrEmtpty(data.memberNumber) || this.stringIsNullOrEmtpty(data.usi)) {
|
|
17030
|
+
appInsights.trackErrorTrace('Super Campaign did not return (PromotedDefaultWithJoin) memberNumber and/or usi');
|
|
17031
|
+
return;
|
|
17032
|
+
}
|
|
17033
|
+
const usi = Usi.clean(data.usi);
|
|
17034
|
+
const fundName = this.getFundName(data.fundId);
|
|
17035
|
+
navigationService.navigateInternallyToStandardChoice({
|
|
17036
|
+
history: this.history,
|
|
17037
|
+
fundName,
|
|
17038
|
+
promotedFundId: data.fundId,
|
|
17039
|
+
fundDetails: {
|
|
17040
|
+
type: 'promotedDefaultWithJoin',
|
|
17041
|
+
fundName,
|
|
17042
|
+
fundUsi: usi,
|
|
17043
|
+
memberNumber: data.memberNumber,
|
|
17044
|
+
promotedFundId: data.fundId
|
|
17045
|
+
},
|
|
17046
|
+
handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceWithJoinAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
|
|
17047
|
+
standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, this.PromotedFundsConfig))
|
|
17048
|
+
});
|
|
17049
|
+
};
|
|
17050
|
+
this.handleDefinedBenefitsJoined = async (data) => {
|
|
17051
|
+
if (this.stringIsNullOrEmtpty(data.memberNumber) || this.stringIsNullOrEmtpty(data.usi)) {
|
|
17052
|
+
appInsights.trackErrorTrace('Super Campaign did not return (DefinedBenefits) memberNumber and/or usi');
|
|
17053
|
+
return;
|
|
17054
|
+
}
|
|
17055
|
+
await customFundChoiceApi.submitDefinedBenefitsChoiceAsync(Object.assign({ fundUsi: Usi.clean(data.usi), fundId: data.fundId, memberNumber: data.memberNumber, memberElectContributionRatePreTax: data.memberElectContributionRatePreTax, memberElectContributionRatePostTax: data.memberElectContributionRatePostTax }, this.PromotedFundsConfig));
|
|
17056
|
+
superSelectionAppService.markSuperSelectionAsSubmitted();
|
|
17057
|
+
};
|
|
16932
17058
|
this.superCampaignEventHandlers = {
|
|
16933
17059
|
'choose-another-fund-requested': this.chooseAnotherFundRequested.bind(this),
|
|
16934
17060
|
'fund-panel-shown': this.fundPanelShown.bind(this),
|
|
16935
17061
|
'fund-tile-clicked': this.fundTileClicked.bind(this),
|
|
16936
17062
|
'fund-pds-viewed': this.fundPdsViewed.bind(this),
|
|
16937
17063
|
'disclaimer-viewed': this.disclaimerViewed.bind(this),
|
|
16938
|
-
'disclaimer-accepted': this.disclaimerAccepted.bind(this)
|
|
17064
|
+
'disclaimer-accepted': this.disclaimerAccepted.bind(this),
|
|
17065
|
+
'promoted-fund-joined': this.promotedFundJoined.bind(this)
|
|
16939
17066
|
};
|
|
16940
17067
|
}
|
|
16941
17068
|
async componentWillLoad() {
|
|
@@ -16972,6 +17099,18 @@ const SuperCampaignHost = class {
|
|
|
16972
17099
|
const parsedUrl = new URL(url);
|
|
16973
17100
|
return `${parsedUrl.protocol}//${parsedUrl.hostname}${parsedUrl.port.length > 0 ? `:${parsedUrl.port}` : ''}`;
|
|
16974
17101
|
}
|
|
17102
|
+
get SuperCampaignState() {
|
|
17103
|
+
if (superSelectionAppService.superCampaignState != undefined)
|
|
17104
|
+
return superSelectionAppService.superCampaignState;
|
|
17105
|
+
throw new Error('Super campaign state has not been initialized');
|
|
17106
|
+
}
|
|
17107
|
+
get PromotedFundsConfig() {
|
|
17108
|
+
return {
|
|
17109
|
+
shownFunds: this.SuperCampaignState.PromotedFundIds,
|
|
17110
|
+
promotedDefaultFundPosition: this.SuperCampaignState.DefaultFundPosition,
|
|
17111
|
+
promotedFundsConfigSource: 'superCampaign'
|
|
17112
|
+
};
|
|
17113
|
+
}
|
|
16975
17114
|
};
|
|
16976
17115
|
injectHistory(SuperCampaignHost);
|
|
16977
17116
|
|