@mx-cartographer/experiences 3.13.4-alpha.mm3 → 3.13.4
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.
- package/CHANGELOG.md +5 -0
- package/dist/categories/stores/CategoryStore.d.ts +5 -36
- package/dist/categories/util/CategoryUtil.d.ts +8 -0
- package/dist/common/components/charts/LineChart.d.ts +3 -2
- package/dist/common/components/charts/linechart/CustomMark.d.ts +6 -1
- package/dist/common/components/dialog/index.d.ts +0 -1
- package/dist/common/types/Category.d.ts +22 -9
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/utils/Categories.d.ts +4 -1
- package/dist/common/utils/index.d.ts +1 -1
- package/dist/index.es.js +3284 -3131
- package/dist/index.es.js.map +1 -1
- package/dist/networth/components/NetWorthChart.d.ts +2 -7
- package/dist/networth/components/NetWorthList.d.ts +2 -6
- package/dist/networth/components/NetWorthListItem.d.ts +17 -0
- package/dist/networth/components/NetWorthSummary.d.ts +7 -0
- package/dist/networth/index.d.ts +1 -0
- package/dist/networth/stores/NetWorthStore.d.ts +8 -2
- package/dist/networth/types/NetWorth.d.ts +32 -0
- package/dist/networth/utils/NetWorthUtils.d.ts +24 -0
- package/package.json +1 -1
- package/dist/common/components/dialog/ErrorDialog.d.ts +0 -13
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
chartData: NetWorth[];
|
|
4
|
-
onDataClick: any;
|
|
5
|
-
selectedData?: NetWorth;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: import('react').FunctionComponent<NetWorthChartProps>;
|
|
1
|
+
import { NetWorthProps } from '../types/NetWorth';
|
|
2
|
+
declare const _default: import('react').FunctionComponent<NetWorthProps>;
|
|
8
3
|
export default _default;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
chartData: NetWorth[];
|
|
5
|
-
selectedData: NetWorth;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: React.FunctionComponent<NetWorthListProps>;
|
|
2
|
+
import { NetWorthProps } from '../types/NetWorth';
|
|
3
|
+
declare const _default: React.FunctionComponent<NetWorthProps>;
|
|
8
4
|
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NetWorth } from '../types/NetWorth';
|
|
3
|
+
interface NetWorthListItemProps {
|
|
4
|
+
item: NetWorth;
|
|
5
|
+
getStyles: (item: NetWorth) => {
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
borderBottom: string;
|
|
8
|
+
color: string;
|
|
9
|
+
};
|
|
10
|
+
isHovered: boolean;
|
|
11
|
+
isSelected: boolean;
|
|
12
|
+
onItemClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>, dataIndex: number) => void;
|
|
13
|
+
onMouseEnter: (dataIndex: number) => void;
|
|
14
|
+
onMouseLeave: () => void;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: React.FunctionComponent<NetWorthListItemProps>;
|
|
17
|
+
export default _default;
|
package/dist/networth/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { NetWorthStore } from './stores/NetWorthStore';
|
|
2
2
|
export { default as NetWorthChart } from './components/NetWorthChart';
|
|
3
3
|
export { default as NetWorthList } from './components/NetWorthList';
|
|
4
|
+
export { default as NetWorthSummary } from './components/NetWorthSummary';
|
|
4
5
|
export { NetWorthWidget } from './NetWorthWidget';
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { GlobalStore } from '../../common';
|
|
2
|
-
import { NetWorth, NetWorthData } from '../types/NetWorth';
|
|
2
|
+
import { AssetsLiabilities, GainsLosses, NetWorth, NetWorthData } from '../types/NetWorth';
|
|
3
3
|
export declare class NetWorthStore {
|
|
4
4
|
globalStore: GlobalStore;
|
|
5
5
|
netWorthData: NetWorthData;
|
|
6
6
|
netWorthChartData: NetWorth[];
|
|
7
|
+
hoveredData?: NetWorth;
|
|
7
8
|
selectedData?: NetWorth;
|
|
9
|
+
assetsLiabilities?: AssetsLiabilities;
|
|
10
|
+
gainsLosses?: GainsLosses;
|
|
8
11
|
constructor(globalStore: GlobalStore);
|
|
9
12
|
loadNetWorthData: () => Promise<void>;
|
|
10
13
|
loadChartData: (numberOfMonths: number) => Promise<void>;
|
|
11
|
-
|
|
14
|
+
loadGainsLosses: () => Promise<void>;
|
|
15
|
+
loadAssetsLiabilities: () => Promise<void>;
|
|
16
|
+
setSelectedData: (dataIndex: number) => void;
|
|
17
|
+
setHoveredData: (dataIndex: number | null) => void;
|
|
12
18
|
}
|
|
@@ -17,3 +17,35 @@ export type NetWorthData = {
|
|
|
17
17
|
accounts: Account[];
|
|
18
18
|
monthlyAccountBalances: MonthlyAccountBalance[];
|
|
19
19
|
};
|
|
20
|
+
export type NetWorthProps = {
|
|
21
|
+
chartData: NetWorth[];
|
|
22
|
+
hoveredData?: NetWorth;
|
|
23
|
+
onDataClick: any;
|
|
24
|
+
onMouseEnter: any;
|
|
25
|
+
onMouseLeave: any;
|
|
26
|
+
selectedData?: NetWorth;
|
|
27
|
+
};
|
|
28
|
+
export interface AssetsLiabilities {
|
|
29
|
+
assets: {
|
|
30
|
+
accountName?: string;
|
|
31
|
+
balance: number;
|
|
32
|
+
}[];
|
|
33
|
+
liabilities: {
|
|
34
|
+
accountName?: string;
|
|
35
|
+
balance: number;
|
|
36
|
+
}[];
|
|
37
|
+
totalAssets: number;
|
|
38
|
+
totalLiabilities: number;
|
|
39
|
+
}
|
|
40
|
+
export interface GainsLosses {
|
|
41
|
+
gains: {
|
|
42
|
+
accountName: string;
|
|
43
|
+
gain: number;
|
|
44
|
+
}[];
|
|
45
|
+
losses: {
|
|
46
|
+
accountName: string;
|
|
47
|
+
loss: number;
|
|
48
|
+
}[];
|
|
49
|
+
totalGains: number;
|
|
50
|
+
totalLosses: number;
|
|
51
|
+
}
|
|
@@ -5,3 +5,27 @@ export declare const flattenBalances: (balances: any, balance: any) => any[];
|
|
|
5
5
|
export declare const getSelectedDataDefault: (chartData: NetWorth[]) => NetWorth | undefined;
|
|
6
6
|
export declare const sortByYearMonthAscending: (a: MonthlyAccountBalance, b: MonthlyAccountBalance) => number;
|
|
7
7
|
export declare const buildChartData: (accounts: Account[], monthlyAccountBalances: MonthlyAccountBalance[], numberOfMonths: number) => any;
|
|
8
|
+
export declare const buildGainsLosses: (selectedData?: NetWorth) => Promise<{
|
|
9
|
+
gains: {
|
|
10
|
+
accountName: string;
|
|
11
|
+
gain: number;
|
|
12
|
+
}[];
|
|
13
|
+
losses: {
|
|
14
|
+
accountName: string;
|
|
15
|
+
loss: number;
|
|
16
|
+
}[];
|
|
17
|
+
totalGains: number;
|
|
18
|
+
totalLosses: number;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const buildAssetsLiabilities: (accounts: Account[]) => Promise<{
|
|
21
|
+
assets: {
|
|
22
|
+
accountName?: string;
|
|
23
|
+
balance: number;
|
|
24
|
+
}[];
|
|
25
|
+
liabilities: {
|
|
26
|
+
accountName?: string;
|
|
27
|
+
balance: number;
|
|
28
|
+
}[];
|
|
29
|
+
totalAssets: number;
|
|
30
|
+
totalLiabilities: number;
|
|
31
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type CopyObject = {
|
|
3
|
-
error_title: string;
|
|
4
|
-
error_body: string;
|
|
5
|
-
error_button: string;
|
|
6
|
-
};
|
|
7
|
-
interface ErrorDialogProps {
|
|
8
|
-
copy: CopyObject;
|
|
9
|
-
isOpen: boolean;
|
|
10
|
-
onClickAction: () => void;
|
|
11
|
-
}
|
|
12
|
-
declare const ErrorDialog: React.FC<ErrorDialogProps>;
|
|
13
|
-
export default ErrorDialog;
|