@flarehr/apollo-super-selection 4.54.43093 → 4.56.44913

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.
Files changed (34) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  2. package/dist/lib/apollo-super-selection/p-1a253321.entry.js +14 -0
  3. package/dist/lib/apollo-super-selection/p-47600481.system.entry.js +69 -0
  4. package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
  5. package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
  6. package/dist/lib/cjs/loader.cjs.js +1 -1
  7. package/dist/lib/cjs/sss-button_41.cjs.entry.js +182 -68
  8. package/dist/lib/collection/components/super-campaign/super-campaign-types.js +1 -0
  9. package/dist/lib/collection/components/super-campaign/super-campaign.js +144 -1
  10. package/dist/lib/collection/components/super-selection-app/api/super-selection-events.model.js +16 -1
  11. package/dist/lib/collection/components/super-selection-app/consent/consent.js +5 -10
  12. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.js +3 -5
  13. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/types.js +2 -1
  14. package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +0 -20
  15. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +6 -0
  16. package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +4 -1
  17. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +6 -3
  18. package/dist/lib/esm/apollo-super-selection.js +1 -1
  19. package/dist/lib/esm/loader.js +1 -1
  20. package/dist/lib/esm/sss-button_41.entry.js +182 -68
  21. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  22. package/dist/lib/esm-es5/loader.js +1 -1
  23. package/dist/lib/esm-es5/sss-button_41.entry.js +4 -4
  24. package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +42 -0
  25. package/dist/lib/types/components/super-campaign/super-campaign.d.ts +13 -0
  26. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +15 -32
  27. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-types.d.ts +1 -0
  28. package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +0 -4
  29. package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +3 -1
  30. package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +4 -0
  31. package/dist/lib/types/components.d.ts +2 -0
  32. package/package.json +1 -1
  33. package/dist/lib/apollo-super-selection/p-4e5b95c3.system.entry.js +0 -69
  34. package/dist/lib/apollo-super-selection/p-89d1f1eb.entry.js +0 -14
@@ -0,0 +1,42 @@
1
+ export declare type Sender = 'super-campaign';
2
+ export declare type SuperCampaignCommonEventPayload = {
3
+ sender: Sender;
4
+ };
5
+ export declare type ChooseAnotherFundRequestedEvent = SuperCampaignCommonEventPayload & {
6
+ type: 'choose-another-fund-requested';
7
+ };
8
+ export declare type FundsPanelShownEvent = SuperCampaignCommonEventPayload & {
9
+ type: 'fund-panel-shown';
10
+ shownFunds: Array<ShownFund>;
11
+ };
12
+ export declare type FundTileClickedEvent = SuperCampaignCommonEventPayload & {
13
+ type: 'fund-tile-clicked';
14
+ fundId: string;
15
+ fundUsi?: string;
16
+ fundName: string;
17
+ fundType: ShownFundType;
18
+ };
19
+ export declare type FundPdsViewedEvent = SuperCampaignCommonEventPayload & {
20
+ type: 'fund-pds-viewed';
21
+ fundUsi?: string;
22
+ fundName: string;
23
+ pageName: string;
24
+ };
25
+ export declare type DisclaimerViewedEvent = SuperCampaignCommonEventPayload & {
26
+ type: 'disclaimer-viewed';
27
+ };
28
+ export declare type DisclaimerAcceptedEvent = SuperCampaignCommonEventPayload & {
29
+ type: 'disclaimer-accepted';
30
+ };
31
+ export declare type ShownFund = {
32
+ fundId: string;
33
+ fundType: ShownFundType;
34
+ };
35
+ export declare type ShownFundType = 'Promoted' | 'PromotedDefault' | 'PromotedDefaultWithJoin';
36
+ export declare type EventPayload = ChooseAnotherFundRequestedEvent | FundsPanelShownEvent | FundTileClickedEvent | FundPdsViewedEvent | DisclaimerViewedEvent | DisclaimerAcceptedEvent;
37
+ export declare type EventType = EventPayload['type'];
38
+ export declare type EventHandlers = {
39
+ [k in EventType]: (event: CustomEvent<Extract<EventPayload, {
40
+ type: k;
41
+ }>>) => Promise<void>;
42
+ };
@@ -1,10 +1,23 @@
1
+ import { RouterHistory } from '@stencil/router';
1
2
  export declare class SuperCampaignHost {
3
+ history: RouterHistory;
2
4
  private componentLoaded;
3
5
  private backendUrl;
4
6
  private accessToken;
7
+ private superCampaignEventHandlers;
8
+ constructor();
5
9
  componentWillLoad(): Promise<void>;
10
+ disconnectedCallback(): void;
6
11
  render(): Element[];
7
12
  private createApolloSuperCampaignScriptUrl;
8
13
  private getBaseUrl;
9
14
  private getEnvironmentTag;
15
+ private subscribeToSuperCampaignEvents;
16
+ private unSubscribeFromSuperCampaignEvents;
17
+ private chooseAnotherFundRequested;
18
+ private fundPanelShown;
19
+ private fundTileClicked;
20
+ private fundPdsViewed;
21
+ private disclaimerViewed;
22
+ private disclaimerAccepted;
10
23
  }
@@ -1,27 +1,8 @@
1
- export declare type FinancialProductViewedDetail = {
2
- fundUsi: string;
3
- fundName: string;
4
- financialProduct: string;
5
- };
6
1
  export declare type SuperFundPdsViewedDetail = {
7
2
  fundUsi?: string;
8
3
  fundName: string;
9
4
  pageName: string;
10
- };
11
- export declare type FinancialProductAcceptedDetail = {
12
- fundUsi: string;
13
- fundName: string;
14
- financialProduct: string;
15
- };
16
- export declare type FinancialProductRejectedDetail = {
17
- fundUsi: string;
18
- fundName: string;
19
- financialProduct: string;
20
- };
21
- export declare type SuperFundPrivacyConfirmationAcceptedDetail = {
22
- fundUsi: string;
23
- fundName: string;
24
- financialProduct: string;
5
+ superCampaignEnabled: boolean;
25
6
  };
26
7
  export declare type ViewedPromotedFundDetail = {
27
8
  fundUsi?: string;
@@ -29,13 +10,16 @@ export declare type ViewedPromotedFundDetail = {
29
10
  promotedFundId: string;
30
11
  promotedFundsShown: Array<string>;
31
12
  defaultFundUsiSet?: string;
13
+ superCampaignEnabled: boolean;
32
14
  };
15
+ export declare type FundDetailChangeRequested = Omit<ViewedDefaultFundDetail, 'superCampaignEnabled'>;
33
16
  export declare type ViewedPromotedDefaultFundDetail = {
34
17
  fundUsi: string;
35
18
  fundName: string;
36
19
  promotedFundId: string;
37
20
  promotedFundsShown: Array<string>;
38
21
  defaultFundUsiSet?: string;
22
+ superCampaignEnabled: boolean;
39
23
  };
40
24
  export declare type ViewedMyOwnFundDetail = {
41
25
  promotedFundsShown: Array<string>;
@@ -85,11 +69,18 @@ export declare type SuperFundNominationDeclinedDetail = {
85
69
  };
86
70
  export declare type SuperFundDisclaimerViewedDetail = {
87
71
  isDefinedBenefitsEligible: string;
72
+ superCampaignEnabled: boolean;
73
+ };
74
+ export declare const SuperFundDisclaimerViewedDetail: {
75
+ create: (superCampaignEnabled: boolean) => SuperFundDisclaimerViewedDetail;
76
+ };
77
+ export declare type SuperFundDisclaimerAcceptedDetail = {
78
+ superCampaignEnabled: boolean;
88
79
  };
89
- export declare type SuperFundDisclaimerAcceptedDetail = Record<string, never>;
90
80
  export declare type SuperFundPanelViewedDetail = {
91
81
  promotedFundsShown: Array<string>;
92
82
  defaultFundUsiSet?: string;
83
+ superCampaignEnabled: boolean;
93
84
  };
94
85
  export declare type SuperFundDetailViewedDetail = {
95
86
  PromotedFund: ViewedPromotedFundDetail;
@@ -105,13 +96,13 @@ export declare type SuperFundDetailViewedDetail = {
105
96
  export declare type SuperFundDetailChangeRequested = {
106
97
  PromotedFund: {
107
98
  memberNumber: string;
108
- } & ViewedPromotedFundDetail;
99
+ } & FundDetailChangeRequested;
109
100
  } | {
110
- PromotedDefaultFund: ViewedPromotedDefaultFundDetail;
101
+ PromotedDefaultFund: FundDetailChangeRequested;
111
102
  } | {
112
103
  PromotedDefaultFundWithJoin: {
113
104
  memberNumber: string;
114
- } & ViewedPromotedDefaultFundDetail;
105
+ } & FundDetailChangeRequested;
115
106
  } | {
116
107
  MyOwnFund: {
117
108
  fundName: string;
@@ -127,15 +118,7 @@ export declare type SuperFundDetailChangeRequested = {
127
118
  DefaultFund: ViewedDefaultFundDetail;
128
119
  };
129
120
  export declare type SuperSelectionAnalyticsEvent = {
130
- FinancialProductViewed: FinancialProductViewedDetail;
131
- } | {
132
121
  SuperFundPdsViewed: SuperFundPdsViewedDetail;
133
- } | {
134
- FinancialProductAccepted: FinancialProductAcceptedDetail;
135
- } | {
136
- FinancialProductRejected: FinancialProductRejectedDetail;
137
- } | {
138
- SuperFundPrivacyConfirmationAccepted: SuperFundPrivacyConfirmationAcceptedDetail;
139
122
  } | {
140
123
  SuperFundDetailViewed: SuperFundDetailViewedDetail;
141
124
  } | {
@@ -21,6 +21,7 @@ declare type PromotedFundJoinAppParams = {
21
21
  fundId: string;
22
22
  authToken: string;
23
23
  employerDefault: boolean;
24
+ definedBenefitsEligibility?: boolean;
24
25
  };
25
26
  export declare type PromotedFundJoinData = PromotedFundJoinMemberData & PromotedFundJoinAppParams;
26
27
  export declare type NotificationData = {
@@ -3,11 +3,7 @@ export declare class EventTrackingService {
3
3
  private static instance;
4
4
  static get Instance(): EventTrackingService;
5
5
  private readonly eventTrackingApi;
6
- TrackFinancialProductViewedAsync(detail: model.FinancialProductViewedDetail): Promise<void>;
7
6
  TrackSuperFundPdsViewedAsync(detail: model.SuperFundPdsViewedDetail): Promise<void>;
8
- TrackFinancialProductAcceptedAsync(detail: model.FinancialProductAcceptedDetail): Promise<void>;
9
- TrackFinancialProductRejectedAsync(detail: model.FinancialProductRejectedDetail): Promise<void>;
10
- TrackSuperFundPrivacyConfirmationAcceptedAsync(detail: model.SuperFundPrivacyConfirmationAcceptedDetail): Promise<void>;
11
7
  TrackPromotedSuperFundDetailViewedAsync(detail: model.ViewedPromotedFundDetail): Promise<void>;
12
8
  TrackPromotedDefaultSuperFundDetailViewedAsync(detail: model.ViewedPromotedDefaultFundDetail): Promise<void>;
13
9
  TrackMyOwnSuperFundDetailViewedAsync(detail: model.ViewedMyOwnFundDetail): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { OnChangeHandler } from '@stencil/store/dist/types';
2
2
  import * as O from 'fp-ts/lib/Option';
3
3
  import { PromotedFundsConfigSourceDto, SuperBuyerDto } from '../api/super-selection.api.dto';
4
- import { AppContextState } from './super-selection.store';
4
+ import { AppContextState, SuperCampaignState } from './super-selection.store';
5
5
  declare type PromotedFundsConfig = {
6
6
  shownFunds: string[];
7
7
  promotedDefaultFundPosition?: number;
@@ -31,6 +31,8 @@ export declare class SuperSelectionAppService {
31
31
  get isDefinedBenefitsEligible(): O.Option<boolean>;
32
32
  loadAppStateAsync(): Promise<void>;
33
33
  loadCampaignConnectAsync(): Promise<void>;
34
+ setSuperCampaignPromotedFundsShown(shownFund: string[]): void;
35
+ get superCampaignState(): SuperCampaignState;
34
36
  }
35
37
  declare const _default: SuperSelectionAppService;
36
38
  export default _default;
@@ -16,5 +16,9 @@ export declare type AppContextState = {
16
16
  isDefinedBenefitsEligible: O.Option<boolean>;
17
17
  campaignConnect: O.Option<CampaignConnectDto>;
18
18
  superCampaignEnabled: boolean;
19
+ superCampaignState: SuperCampaignState;
20
+ };
21
+ export declare type SuperCampaignState = {
22
+ promotedFundsShown: string[];
19
23
  };
20
24
  export declare const initialState: AppContextState;
@@ -131,6 +131,7 @@ export namespace Components {
131
131
  interface SssSuccess {
132
132
  }
133
133
  interface SssSuperCampaignHost {
134
+ "history": RouterHistory;
134
135
  }
135
136
  interface SssSuperChoiceItemBottom {
136
137
  "abn"?: string;
@@ -545,6 +546,7 @@ declare namespace LocalJSX {
545
546
  interface SssSuccess {
546
547
  }
547
548
  interface SssSuperCampaignHost {
549
+ "history"?: RouterHistory;
548
550
  }
549
551
  interface SssSuperChoiceItemBottom {
550
552
  "abn"?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/apollo-super-selection",
3
- "version": "4.54.43093",
3
+ "version": "4.56.44913",
4
4
  "description": "Apollo Super Selection",
5
5
  "main": "dist/lib/index.cjs.js",
6
6
  "module": "dist/lib/index.js",