@mx-cartographer/experiences 6.1.0-alpha.al0 → 6.1.0-alpha.al10

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 (46) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/dist/analytics/SurveyMiniWidget.d.ts +9 -0
  3. package/dist/budgets/api/BudgetsApi.d.ts +0 -1
  4. package/dist/budgets/components/BubbleBudgets.d.ts +1 -0
  5. package/dist/budgets/components/BudgetsEmptyState.d.ts +7 -0
  6. package/dist/budgets/store/BudgetsStore.d.ts +4 -1
  7. package/dist/common/components/EmptyState.d.ts +6 -2
  8. package/dist/common/components/MiniWidgetContainer.d.ts +2 -0
  9. package/dist/common/constants/Analytics.d.ts +1 -0
  10. package/dist/common/constants/ApiEndpoints.d.ts +1 -0
  11. package/dist/common/context/hooks.d.ts +1 -0
  12. package/dist/common/context/index.d.ts +1 -1
  13. package/dist/common/stores/GlobalStore.d.ts +2 -0
  14. package/dist/common/types/Analytics.d.ts +2 -16
  15. package/dist/common/types/AppData.d.ts +2 -0
  16. package/dist/common/types/GlobalCopy.d.ts +2 -1
  17. package/dist/common/types/Holding.d.ts +39 -0
  18. package/dist/common/types/index.d.ts +1 -0
  19. package/dist/common/types/localization/BudgetsCopy.d.ts +13 -0
  20. package/dist/common/types/localization/InvestmentsCopy.d.ts +6 -0
  21. package/dist/common/types/localization/index.d.ts +1 -0
  22. package/dist/dashboard/Dashboard.d.ts +0 -2
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.es.js +4369 -4025
  25. package/dist/index.es.js.map +1 -1
  26. package/dist/insights/store/BeatStore.d.ts +1 -1
  27. package/dist/investments/InvestmentsWidget.d.ts +4 -0
  28. package/dist/investments/api/HoldingApi.d.ts +6 -0
  29. package/dist/investments/components/Allocation.d.ts +2 -0
  30. package/dist/investments/components/Analysis.d.ts +2 -0
  31. package/dist/investments/components/Overview.d.ts +2 -0
  32. package/dist/investments/components/TabTitle.d.ts +5 -0
  33. package/dist/investments/index.d.ts +1 -0
  34. package/dist/investments/stores/HoldingStore.d.ts +10 -0
  35. package/dist/microinsights/components/beatCard/BeatCard.d.ts +2 -2
  36. package/dist/microinsights/components/beaticons/BeatCategoryIcon.d.ts +2 -2
  37. package/dist/microinsights/components/beaticons/BeatMerchantLogo.d.ts +2 -2
  38. package/dist/microinsights/components/beaticons/MonthlySpendComparisonIcon.d.ts +2 -2
  39. package/dist/microinsights/interfaces.d.ts +39 -0
  40. package/dist/microinsights/utils/beatUtils.d.ts +2 -1
  41. package/package.json +1 -1
  42. package/dist/analytics/components/SurveyMiniWidget.d.ts +0 -4
  43. package/dist/analytics/components/SurveyModal.d.ts +0 -11
  44. package/dist/microinsights/constants/Insights.d.ts +0 -3
  45. package/dist/microinsights/constants/OnClickEvents.d.ts +0 -3
  46. package/dist/microinsights/types/BeatUIComponent.d.ts +0 -38
@@ -1,6 +1,6 @@
1
1
  import { BeatApi } from '../../common/api/BeatApi';
2
2
  import { Beat } from '../../common/types/Beat';
3
- import { GlobalStore } from '../../common';
3
+ import { GlobalStore } from '../../common/stores/GlobalStore';
4
4
  export declare class BeatStore {
5
5
  globalStore: GlobalStore;
6
6
  api: BeatApi;
@@ -0,0 +1,4 @@
1
+ import { WidgetProps } from '../common';
2
+ export declare const InvestmentsWidget: (({ onBackClick, sx }: WidgetProps) => import("react/jsx-runtime").JSX.Element) & {
3
+ displayName: string;
4
+ };
@@ -0,0 +1,6 @@
1
+ import { Fetch } from '../../common';
2
+ export declare class HoldingApi {
3
+ fetchInstance: Fetch;
4
+ constructor(endpoint: string, token: string);
5
+ getHoldings: () => Promise<any>;
6
+ }
@@ -0,0 +1,2 @@
1
+ declare const Allocation: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Allocation;
@@ -0,0 +1,2 @@
1
+ declare const Analysis: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Analysis;
@@ -0,0 +1,2 @@
1
+ declare const Overview: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Overview;
@@ -0,0 +1,5 @@
1
+ interface TabTitleProps {
2
+ title: string;
3
+ }
4
+ export declare const TabTitle: ({ title }: TabTitleProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1 @@
1
+ export { InvestmentsWidget } from './InvestmentsWidget';
@@ -0,0 +1,10 @@
1
+ import { HoldingApi } from '../api/HoldingApi';
2
+ import { Holding, GlobalStore } from '../../common';
3
+ export declare class HoldingStore {
4
+ globalStore: GlobalStore;
5
+ api: HoldingApi;
6
+ holdings: Holding[];
7
+ holdingsLoaded: boolean;
8
+ constructor(globalStore: GlobalStore);
9
+ loadHoldings: () => Promise<void>;
10
+ }
@@ -1,9 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { MicroWidgetProps } from '../../interfaces';
2
+ import { MicroWidgetProps, BeatLikeOffer } from '../../interfaces';
3
3
  import { Beat } from '../../../common/types/Beat';
4
4
  export interface BeatCardProps extends MicroWidgetProps {
5
5
  backgroundColor?: string;
6
- beat: Beat;
6
+ beat: Beat | BeatLikeOffer;
7
7
  index?: number;
8
8
  variant?: 'elevation' | 'outlined';
9
9
  }
@@ -1,3 +1,3 @@
1
1
  import { FC } from 'react';
2
- import { BeatUIComponent } from '../../types/BeatUIComponent';
3
- export declare const BeatCategoryIcon: FC<BeatUIComponent>;
2
+ import { WeGotTheBeat } from '../../interfaces';
3
+ export declare const BeatCategoryIcon: FC<WeGotTheBeat>;
@@ -1,3 +1,3 @@
1
- import { BeatUIComponent } from '../../types/BeatUIComponent';
2
- declare const _default: import('react').FunctionComponent<BeatUIComponent>;
1
+ import { WeGotTheBeat } from '../../interfaces';
2
+ declare const _default: import('react').FunctionComponent<WeGotTheBeat>;
3
3
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { BeatUIComponent } from '../../types/BeatUIComponent';
2
+ import { WeGotTheBeat } from '../../interfaces';
3
3
  import { DataSeries } from '../../../common/types/Beat';
4
4
  export declare const getIconColor: (data: DataSeries | undefined, designTokens: any) => any;
5
- export declare const MonthlySpendComparisonIcon: FC<BeatUIComponent>;
5
+ export declare const MonthlySpendComparisonIcon: FC<WeGotTheBeat>;
@@ -26,3 +26,42 @@ export interface TheWholeHog {
26
26
  identify: (userGuid: string, clientGuid: string, properties?: Record<string, any>) => void;
27
27
  capture: (eventName: string, properties?: Record<string, any>) => void;
28
28
  }
29
+ export interface BeatLikeOffer extends Offer, Beat {
30
+ image_url: string;
31
+ pulse_campaign_name: string;
32
+ }
33
+ export interface Offer {
34
+ analytics_client_guid: string;
35
+ campaign_activated_at: string;
36
+ campaign_call_to_action: string | null;
37
+ campaign_image_url: string;
38
+ campaign_guid: string;
39
+ campaign_name: string;
40
+ campaign_type: number;
41
+ campaign_url: string;
42
+ clicked_at: string | null;
43
+ created_at?: string | number;
44
+ deleted_at: string | null;
45
+ dismissed_at?: number | null;
46
+ expire_at: string | null;
47
+ guid: string;
48
+ has_been_clicked: boolean;
49
+ has_been_dismissed: boolean;
50
+ has_been_viewed: boolean;
51
+ image_url: string;
52
+ is_deleted: boolean;
53
+ is_expired: boolean;
54
+ pulse_body: string;
55
+ pulse_title: string;
56
+ pulse_call_to_action_text: string;
57
+ pulse_call_to_action_text_secondary: string;
58
+ pulse_post_message: string;
59
+ pulse_post_message_secondary: string;
60
+ status_code: number;
61
+ updated_at: string;
62
+ user_external_guid: string | null;
63
+ viewed_at: string | null;
64
+ }
65
+ export interface WeGotTheBeat {
66
+ beat: Beat;
67
+ }
@@ -1,4 +1,4 @@
1
- import { Offer } from '../types/BeatUIComponent';
1
+ import { Offer } from '../interfaces';
2
2
  type SortOrder = 'asc' | 'desc';
3
3
  export declare function orderArray<T>(arr1: T[], arr2: T[], prop: keyof T, order?: SortOrder): T[];
4
4
  export declare const transformOfferIntoBeatLikeObject: (offer: Offer) => {
@@ -43,6 +43,7 @@ export declare const transformOfferIntoBeatLikeObject: (offer: Offer) => {
43
43
  campaign_activated_at: string;
44
44
  campaign_call_to_action: string | null;
45
45
  campaign_image_url: string;
46
+ campaign_guid: string;
46
47
  campaign_name: string;
47
48
  campaign_type: number;
48
49
  campaign_url: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "6.1.0-alpha.al0",
3
+ "version": "6.1.0-alpha.al10",
4
4
  "description": "Library containing experience widgets",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SurveyWidgetProps } from '../../common/types/Analytics';
3
- declare const _default: React.FunctionComponent<SurveyWidgetProps>;
4
- export default _default;
@@ -1,11 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SurveyQuestion } from '../../common/types/Analytics';
3
- interface SurveyModalProps {
4
- onContinue: () => void;
5
- onDismiss: () => void;
6
- onSelect: (value: number) => void;
7
- onSubmit: () => void;
8
- surveyQuestion: SurveyQuestion;
9
- }
10
- declare const _default: React.FunctionComponent<SurveyModalProps>;
11
- export default _default;
@@ -1,3 +0,0 @@
1
- export interface InsightIcons {
2
- }
3
- export declare const INSIGHT_ICONS: InsightIcons;
@@ -1,3 +0,0 @@
1
- export declare const ON_CLICK_EVENTS: {
2
- ON_VIEW_ALL_CLICKED: string;
3
- };
@@ -1,38 +0,0 @@
1
- import { Beat } from '../../common/types/Beat';
2
- export interface BeatUIComponent {
3
- beat: Beat;
4
- }
5
- export interface BeatLikeOffer extends Offer, Beat {
6
- image_url: string;
7
- }
8
- export interface Offer {
9
- analytics_client_guid: string;
10
- campaign_activated_at: string;
11
- campaign_call_to_action: string | null;
12
- campaign_image_url: string;
13
- campaign_name: string;
14
- campaign_type: number;
15
- campaign_url: string;
16
- clicked_at: string | null;
17
- created_at?: string | number;
18
- deleted_at: string | null;
19
- dismissed_at?: number | null;
20
- expire_at: string | null;
21
- guid: string;
22
- has_been_clicked: boolean;
23
- has_been_dismissed: boolean;
24
- has_been_viewed: boolean;
25
- image_url: string;
26
- is_deleted: boolean;
27
- is_expired: boolean;
28
- pulse_body: string;
29
- pulse_title: string;
30
- pulse_call_to_action_text: string;
31
- pulse_call_to_action_text_secondary: string;
32
- pulse_post_message: string;
33
- pulse_post_message_secondary: string;
34
- status_code: number;
35
- updated_at: string;
36
- user_external_guid: string | null;
37
- viewed_at: string | null;
38
- }