@flarehr/apollo-super-selection 1.3.43303 → 1.3.43309

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.
@@ -0,0 +1,2 @@
1
+ import { EventHandlers } from './super-campaign-types';
2
+ export declare const eventHandlers: EventHandlers;
@@ -0,0 +1,30 @@
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 FundPanelShownEvent = 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 ShownFund = {
20
+ fundId: string;
21
+ fundType: ShownFundType;
22
+ };
23
+ export declare type ShownFundType = 'Promoted' | 'PromotedDefault' | 'PromotedDefaultWithJoin';
24
+ export declare type EventPayload = ChooseAnotherFundRequestedEvent | FundPanelShownEvent | FundTileClickedEvent;
25
+ export declare type EventType = EventPayload['type'];
26
+ export declare type EventHandlers = {
27
+ [k in EventType]: (event: Extract<EventPayload, {
28
+ t: k;
29
+ }>) => Promise<void>;
30
+ };
@@ -3,8 +3,11 @@ export declare class SuperCampaignHost {
3
3
  private backendUrl;
4
4
  private accessToken;
5
5
  componentWillLoad(): Promise<void>;
6
+ disconnectedCallback(): void;
6
7
  render(): Element[];
7
8
  private createApolloSuperCampaignScriptUrl;
8
9
  private getBaseUrl;
9
10
  private getEnvironmentTag;
11
+ private subscribeToSuperCampaignEvents;
12
+ private unSubscribeFromSuperCampaignEvents;
10
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/apollo-super-selection",
3
- "version": "1.3.43303",
3
+ "version": "1.3.43309",
4
4
  "description": "Apollo Super Selection",
5
5
  "main": "dist/lib/index.cjs.js",
6
6
  "module": "dist/lib/index.js",