@mx-cartographer/experiences 3.12.3 → 3.14.0-alpha.mm2

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.
@@ -1,9 +1,11 @@
1
1
  import { default as React } from 'react';
2
2
  import { MonthlyCategoryTotals } from '../../common';
3
3
  interface TrendsTableProps {
4
+ sx?: any;
4
5
  height?: number | string;
5
6
  monthlyCategoryTotals: MonthlyCategoryTotals[];
6
- sx?: any;
7
+ selectedCategory?: string;
8
+ onClickRow?: (category: string) => void;
7
9
  }
8
10
  declare const TrendsTable: React.FC<TrendsTableProps>;
9
11
  export default TrendsTable;
@@ -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
+ }[];
@@ -0,0 +1,22 @@
1
+ import { MonthlyCategoryTotals } from '../../common';
2
+ type DateRange = {
3
+ start: Date;
4
+ end: Date;
5
+ };
6
+ export declare const getMonthlyTotals: (totals: MonthlyCategoryTotals[], range?: DateRange) => {
7
+ x: string;
8
+ y: number;
9
+ }[];
10
+ export declare const getIncomeTotals: (totals: MonthlyCategoryTotals[], range?: DateRange) => {
11
+ y: number;
12
+ x: string;
13
+ }[];
14
+ export declare const getPaymentTotals: (totals: MonthlyCategoryTotals[], range?: DateRange) => {
15
+ y: number;
16
+ x: string;
17
+ }[];
18
+ export declare const getSpendingTotals: (totals: MonthlyCategoryTotals[], range?: DateRange) => {
19
+ x: string;
20
+ y: number;
21
+ }[];
22
+ export {};
@@ -0,0 +1,24 @@
1
+ import { GridComparatorFn } from '@mui/x-data-grid-pro';
2
+ import { MonthlyCategoryTotals } from '../../common';
3
+ type DataPoint = {
4
+ x: Date;
5
+ y: number;
6
+ };
7
+ type Dataset = DataPoint[];
8
+ export interface StackedLineChartData {
9
+ top_level_category_guid: string;
10
+ category_guid: string;
11
+ category_name: string;
12
+ category_color: string;
13
+ dataset: Dataset;
14
+ }
15
+ export declare const getStackedLineChartData: (totals: MonthlyCategoryTotals[]) => StackedLineChartData[];
16
+ export declare const sliceStackedLineChartData: (data: StackedLineChartData[], limit: number) => {
17
+ dataset: DataPoint[];
18
+ top_level_category_guid: string;
19
+ category_guid: string;
20
+ category_name: string;
21
+ category_color: string;
22
+ }[];
23
+ export declare const amountComparator: GridComparatorFn<string | number>;
24
+ export {};
@@ -0,0 +1,10 @@
1
+ import { MonthlyCategoryTotals } from '../../common';
2
+ import { StackedLineChartData } from './TrendsData';
3
+ type TotalsData = MonthlyCategoryTotals | StackedLineChartData;
4
+ export declare const isIncome: (totals: TotalsData) => boolean;
5
+ export declare const isExpense: (totals: TotalsData) => boolean;
6
+ export declare const isPayment: (totals: TotalsData) => boolean;
7
+ export declare const isTransfer: (totals: TotalsData) => boolean;
8
+ export declare const isSpend: (totals: TotalsData) => boolean;
9
+ export declare const getTopLevelCategoryTotals: (totals: (MonthlyCategoryTotals | StackedLineChartData)[]) => (MonthlyCategoryTotals | StackedLineChartData)[];
10
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "3.12.3",
3
+ "version": "3.14.0-alpha.mm2",
4
4
  "description": "Library containing experience widgets",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,33 +0,0 @@
1
- import { GridComparatorFn } from '@mui/x-data-grid-pro';
2
- import { MonthlyCategoryTotals } from '../../common';
3
- type DateRange = {
4
- start: Date;
5
- end: Date;
6
- };
7
- export declare const isIncome: (totals: MonthlyCategoryTotals) => boolean;
8
- export declare const isPayment: (totals: MonthlyCategoryTotals) => boolean;
9
- export declare const isTransfer: (totals: MonthlyCategoryTotals) => boolean;
10
- export declare const isSpend: (totals: MonthlyCategoryTotals) => boolean;
11
- export declare const getMonthlyTotalsDataset: (totals: MonthlyCategoryTotals[]) => {
12
- x: string;
13
- y: number;
14
- }[][];
15
- export declare const getMonthlyTotals: (totals: MonthlyCategoryTotals[], range?: DateRange) => {
16
- x: string;
17
- y: number;
18
- }[];
19
- export declare const getIncomeTotals: (totals: MonthlyCategoryTotals[], range?: DateRange) => {
20
- y: number;
21
- x: string;
22
- }[];
23
- export declare const getPaymentTotals: (totals: MonthlyCategoryTotals[], range?: DateRange) => {
24
- y: number;
25
- x: string;
26
- }[];
27
- export declare const getSpendingTotals: (totals: MonthlyCategoryTotals[], range?: DateRange) => {
28
- x: string;
29
- y: number;
30
- }[];
31
- export declare const getTopLevelCategoryTotals: (totals: MonthlyCategoryTotals[]) => MonthlyCategoryTotals[];
32
- export declare const amountComparator: GridComparatorFn<string | number>;
33
- export {};