@mx-cartographer/experiences 3.9.5-alpha.sms1 → 3.10.1-alpha.mm1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/CHANGELOG.md +2 -33
  2. package/dist/accounts/ConnectMiniWidget.d.ts +2 -6
  3. package/dist/budgets/components/BubbleBudgets.d.ts +0 -2
  4. package/dist/budgets/utils/buildBubblesSVG.d.ts +3 -23
  5. package/dist/common/components/charts/StackedLineChart.d.ts +14 -12
  6. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +1 -0
  7. package/dist/common/components/charts/stackedlinechart/utils.d.ts +1 -0
  8. package/dist/common/components/index.d.ts +0 -1
  9. package/dist/common/types/Analytics.d.ts +9 -23
  10. package/dist/common/utils/Fetch.d.ts +2 -1
  11. package/dist/index.es.js +4472 -4490
  12. package/dist/index.es.js.map +1 -1
  13. package/dist/microinsights/analytics.d.ts +2 -2
  14. package/dist/microinsights/components/insightsmicrowidget/InsightsMicroWidget.d.ts +0 -1
  15. package/dist/microinsights/stores/AppStore.d.ts +1 -1
  16. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +4 -11
  17. package/dist/trends/mocks.d.ts +80 -0
  18. package/dist/trends/utils/index.d.ts +27 -4
  19. package/package.json +4 -4
  20. package/dist/accounts/components/ConnectMiniWidgetCard.d.ts +0 -5
  21. package/dist/budgets/components/bubblechart/Bubble.d.ts +0 -10
  22. package/dist/budgets/components/bubblechart/Mercury.d.ts +0 -8
  23. package/dist/insights/components/beats/SetUpDirectDeposit/components/FullFeedBodyHeader.d.ts +0 -7
  24. package/dist/insights/components/beats/SetUpDirectDeposit/components/FullFeedLogoSection.d.ts +0 -8
  25. package/dist/insights/components/beats/SetUpDirectDeposit/components/LeftBox.d.ts +0 -9
  26. package/dist/insights/components/beats/SetUpDirectDeposit/components/LowerBoxesSection.d.ts +0 -12
  27. package/dist/insights/components/beats/SetUpDirectDeposit/components/MiniBodyHeader.d.ts +0 -8
  28. package/dist/insights/components/beats/SetUpDirectDeposit/components/RightBox.d.ts +0 -10
  29. package/dist/insights/components/beats/SetUpDirectDeposit/components/index.d.ts +0 -6
@@ -1,5 +1,5 @@
1
1
  import { analyticsSession } from '../common';
2
2
 
3
3
  export type AnalyticSession = Awaited<ReturnType<typeof analyticsSession>>;
4
- export declare const onAnalyticEvent: (event: string, session: AnalyticSession) => Promise<any>;
5
- export declare const onAnalyticPageView: (page: string, session: AnalyticSession) => Promise<any>;
4
+ export declare const onAnalyticEvent: (event: string, session: AnalyticSession | null) => Promise<any>;
5
+ export declare const onAnalyticPageView: (page: string, session: AnalyticSession | null) => Promise<any>;
@@ -6,7 +6,6 @@ export interface InsightsMicroWidgetProps extends MicroWidgetProps {
6
6
  areBeatsLoading: boolean;
7
7
  beats: Beat[];
8
8
  endpoint: string;
9
- logOutUser: () => void;
10
9
  onEvent?: (event?: string | undefined) => void;
11
10
  onPageview?: (event?: string | undefined) => void;
12
11
  token: string;
@@ -10,5 +10,5 @@ export declare class AppStore {
10
10
  token: string;
11
11
  isInitialized: boolean;
12
12
  constructor();
13
- initialize: (endpoint: string, token: string, logOutUser: () => void) => Promise<void>;
13
+ initialize: (endpoint: string, token: string) => Promise<void>;
14
14
  }
@@ -1,17 +1,10 @@
1
- import { AnalyticSession } from '../analytics';
2
1
  import { BeatApi } from '../../common/api/BeatApi';
3
2
  import { Beat } from '../../common';
4
3
 
5
- export interface ErrPromise<TSuccess, TError = unknown> {
6
- then<TResult1 = TSuccess, TResult2 = never>(onfulfilled?: ((value: TSuccess) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: TError) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
7
- catch<TResult = never>(onrejected?: ((reason: TError) => TResult | PromiseLike<TResult>) | undefined | null): Promise<TSuccess | TResult>;
8
- }
9
4
  export declare class InsightsMicroWidgetStore {
10
- onAnalyticEvent: (event: string, session: AnalyticSession) => ErrPromise<string, AnalyticSession>;
11
- onAnalyticPageView: (event: string, session: AnalyticSession) => ErrPromise<string, AnalyticSession>;
5
+ onAnalyticEvent: (event: string, session: import('../analytics').AnalyticSession | null) => Promise<any>;
6
+ onAnalyticPageView: (page: string, session: import('../analytics').AnalyticSession | null) => Promise<any>;
12
7
  beatApi: BeatApi;
13
- sessionIsExpired: boolean;
14
- constructor();
15
- initialize: (endpoint: string, token: string, logOutUser: () => void) => Promise<void>;
16
- updateBeat: (beat: Beat) => void;
8
+ initialize: (endpoint: string, token: string) => Promise<void>;
9
+ updateBeat: (beat: Beat) => Promise<void>;
17
10
  }
@@ -0,0 +1,80 @@
1
+ export declare const mockStackedDatasetsSequential: {
2
+ top_level_category_guid: string;
3
+ category_guid: string;
4
+ category_name: string;
5
+ category_color: string;
6
+ dataset: {
7
+ x: Date;
8
+ y: number;
9
+ }[];
10
+ }[];
11
+ export declare const mockStackedDatasetsVarying: {
12
+ top_level_category_guid: string;
13
+ category_guid: string;
14
+ category_name: string;
15
+ category_color: string;
16
+ dataset: {
17
+ x: Date;
18
+ y: number;
19
+ }[];
20
+ }[];
21
+ export declare const mockStackedDatasetsOverlapping: {
22
+ top_level_category_guid: string;
23
+ category_guid: string;
24
+ category_name: string;
25
+ category_color: string;
26
+ dataset: {
27
+ x: Date;
28
+ y: number;
29
+ }[];
30
+ }[];
31
+ export declare const mockStackedDatasetsRepeatValues: {
32
+ top_level_category_guid: string;
33
+ category_guid: string;
34
+ category_name: string;
35
+ category_color: string;
36
+ dataset: {
37
+ x: Date;
38
+ y: number;
39
+ }[];
40
+ }[];
41
+ export declare const mockUnstackedDatasetsSequential: {
42
+ top_level_category_guid: string;
43
+ category_guid: string;
44
+ category_name: string;
45
+ category_color: string;
46
+ dataset: {
47
+ x: Date;
48
+ y: number;
49
+ }[];
50
+ }[];
51
+ export declare const mockUnstackedDatasetsVarying: {
52
+ top_level_category_guid: string;
53
+ category_guid: string;
54
+ category_name: string;
55
+ category_color: string;
56
+ dataset: {
57
+ x: Date;
58
+ y: number;
59
+ }[];
60
+ }[];
61
+ export declare const mockUnstackedDatasetsOverlapping: {
62
+ top_level_category_guid: string;
63
+ category_guid: string;
64
+ category_name: string;
65
+ category_color: string;
66
+ dataset: {
67
+ x: Date;
68
+ y: number;
69
+ }[];
70
+ }[];
71
+ export declare const mockUnstackedDatasetsRepeatValues: {
72
+ top_level_category_guid: string;
73
+ category_guid: string;
74
+ category_name: string;
75
+ category_color: string;
76
+ dataset: {
77
+ x: Date;
78
+ y: number;
79
+ }[];
80
+ }[];
@@ -9,10 +9,6 @@ export declare const isIncome: (totals: MonthlyCategoryTotals) => boolean;
9
9
  export declare const isPayment: (totals: MonthlyCategoryTotals) => boolean;
10
10
  export declare const isTransfer: (totals: MonthlyCategoryTotals) => boolean;
11
11
  export declare const isSpend: (totals: MonthlyCategoryTotals) => boolean;
12
- export declare const getMonthlyTotalsDataset: (totals: MonthlyCategoryTotals[]) => {
13
- x: string;
14
- y: number;
15
- }[][];
16
12
  export declare const getMonthlyTotals: (totals: MonthlyCategoryTotals[], range?: DateRange) => {
17
13
  x: string;
18
14
  y: number;
@@ -31,4 +27,31 @@ export declare const getSpendingTotals: (totals: MonthlyCategoryTotals[], range?
31
27
  }[];
32
28
  export declare const getTopLevelCategoryTotals: (totals: MonthlyCategoryTotals[]) => MonthlyCategoryTotals[];
33
29
  export declare const amountComparator: GridComparatorFn<string | number>;
30
+ type DataPoint = {
31
+ x: Date;
32
+ y: number;
33
+ };
34
+ type Dataset = DataPoint[];
35
+ type CategoryTotalData = {
36
+ top_level_category_guid: string;
37
+ category_guid: string;
38
+ category_name: string;
39
+ total: number;
40
+ date: Date;
41
+ color: string;
42
+ };
43
+ type GroupedCategoryTotalData = {
44
+ [topLevelCategory: string]: {
45
+ [category: string]: CategoryTotalData[];
46
+ };
47
+ };
48
+ interface StackedLineChartData {
49
+ top_level_category_guid: string;
50
+ category_guid: string;
51
+ category_name: string;
52
+ category_color: string;
53
+ dataset: Dataset;
54
+ }
55
+ export declare const createGroupedCategoryTotals: (totals: MonthlyCategoryTotals[]) => GroupedCategoryTotalData;
56
+ export declare const getStackedLineChartData: (groupedTotals: GroupedCategoryTotalData, datasetLength: number) => StackedLineChartData[];
34
57
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "3.9.5-alpha.sms1",
3
+ "version": "3.10.1-alpha.mm1",
4
4
  "description": "Library containing experience widgets",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "@emotion/styled": "^11.11.0",
28
28
  "@honeybadger-io/js": "^6.8.3",
29
29
  "@honeybadger-io/react": "^6.1.19",
30
- "@kyper/mui": "4.0.4",
30
+ "@kyper/mui": "^4.0.4",
31
31
  "@mui/icons-material": "^5.16.0",
32
32
  "@mui/lab": "^5.0.0-alpha.172",
33
33
  "@mui/material": "^5.16.0",
@@ -110,7 +110,7 @@
110
110
  "vitest": "^2.0.3"
111
111
  },
112
112
  "peerDependencies": {
113
- "@kyper/mui": "4.0.4",
113
+ "@kyper/mui": "^4",
114
114
  "d3": "^7",
115
115
  "date-fns": "^3",
116
116
  "react": "^18",
@@ -122,4 +122,4 @@
122
122
  "README.md"
123
123
  ],
124
124
  "packageManager": "yarn@4.4.1"
125
- }
125
+ }
@@ -1,5 +0,0 @@
1
- import { default as React } from 'react';
2
- import { MiniWidgetProps } from '../../common';
3
-
4
- declare const _default: React.FunctionComponent<MiniWidgetProps>;
5
- export default _default;
@@ -1,10 +0,0 @@
1
- import { default as React } from 'react';
2
- import { BubbleData } from '../BubbleChart';
3
-
4
- interface BubbleProps {
5
- bubble: BubbleData;
6
- isDraggable: boolean;
7
- onClick?: (bubble: BubbleData) => void;
8
- }
9
- export declare const Bubble: React.FC<BubbleProps>;
10
- export {};
@@ -1,8 +0,0 @@
1
- import { default as React } from 'react';
2
- import { BubbleData } from '../BubbleChart';
3
-
4
- interface MercuryProps {
5
- bubble: BubbleData;
6
- }
7
- export declare const Mercury: React.FC<MercuryProps>;
8
- export {};
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- interface BodyHeaderProps {
4
- headerString: string;
5
- }
6
- export declare const FullFeedBodyHeader: React.FC<BodyHeaderProps>;
7
- export {};
@@ -1,8 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- interface FullFeedLogoSectionProps {
4
- accountGuid: string;
5
- width: string | number;
6
- }
7
- export declare const FullFeedLogoSection: React.FC<FullFeedLogoSectionProps>;
8
- export {};
@@ -1,9 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- interface LeftBoxProps {
4
- isDarkMode: boolean;
5
- leftLowerText: string;
6
- leftUpperText: string;
7
- }
8
- export declare const LeftBox: React.FC<LeftBoxProps>;
9
- export {};
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- interface LowerBoxSectionProps {
4
- isComplete?: boolean;
5
- isDarkMode: boolean;
6
- leftLowerText: string;
7
- leftUpperText: string;
8
- rightLowerText: string;
9
- rightUpperText: string;
10
- }
11
- export declare const LowerBoxesSection: React.FC<LowerBoxSectionProps>;
12
- export {};
@@ -1,8 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- interface MiniBodyHeaderProps {
4
- accountGuid: string;
5
- headerString: string;
6
- }
7
- export declare const MiniBodyHeader: React.FC<MiniBodyHeaderProps>;
8
- export {};
@@ -1,10 +0,0 @@
1
- import { default as React } from 'react';
2
-
3
- interface RightBoxProps {
4
- isComplete?: boolean;
5
- isDarkMode: boolean;
6
- rightLowerText: string;
7
- rightUpperText: string;
8
- }
9
- export declare const RightBox: React.FC<RightBoxProps>;
10
- export {};
@@ -1,6 +0,0 @@
1
- export { LeftBox } from './LeftBox';
2
- export { FullFeedBodyHeader } from './FullFeedBodyHeader';
3
- export { FullFeedLogoSection } from './FullFeedLogoSection';
4
- export { LowerBoxesSection } from './LowerBoxesSection';
5
- export { MiniBodyHeader } from './MiniBodyHeader';
6
- export { RightBox } from './RightBox';