@mx-cartographer/experiences 3.7.0-alpha.al21 → 3.7.0-alpha.al23
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/dist/index.es.js +2547 -2519
- package/dist/index.es.js.map +1 -1
- package/dist/networth/api/NetWorthApi.d.ts +2 -2
- package/dist/networth/components/NetWorthChart.d.ts +2 -2
- package/dist/networth/components/NetWorthList.d.ts +2 -1
- package/dist/networth/components/NetWorthRow.d.ts +1 -1
- package/dist/networth/index.d.ts +1 -2
- package/dist/networth/stores/NetWorthStore.d.ts +4 -4
- package/dist/networth/types/NetWorth.d.ts +8 -10
- package/dist/networth/utils/NetWorth.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fetch } from '../../common';
|
|
2
2
|
|
|
3
3
|
export declare class NetWorthApi {
|
|
4
4
|
fetchInstance: Fetch;
|
|
5
5
|
constructor(endpoint: string, token: string);
|
|
6
6
|
getAccounts: () => Promise<any>;
|
|
7
7
|
getMembers: () => Promise<any>;
|
|
8
|
-
getMonthlyAccountBalances: (
|
|
8
|
+
getMonthlyAccountBalances: (guid: string) => Promise<any>;
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NetWorth } from '../types/NetWorth';
|
|
2
2
|
|
|
3
3
|
interface NetWorthChartProps {
|
|
4
|
-
chartData:
|
|
4
|
+
chartData: NetWorth[];
|
|
5
5
|
}
|
|
6
6
|
declare const _default: import('react').FunctionComponent<NetWorthChartProps>;
|
|
7
7
|
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { NetWorth } from '../types/NetWorth';
|
|
2
2
|
|
|
3
3
|
interface NetWorthListProps {
|
|
4
|
-
|
|
4
|
+
chartData: NetWorth[];
|
|
5
|
+
highlightedMonth?: string | null;
|
|
5
6
|
}
|
|
6
7
|
declare const _default: import('react').FunctionComponent<NetWorthListProps>;
|
|
7
8
|
export default _default;
|
package/dist/networth/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { default as NetWorthChart } from './components/NetWorthChart';
|
|
2
|
-
export type { NetWorth } from './types/NetWorth';
|
|
3
|
-
export type { xyData } from './types/NetWorth';
|
|
2
|
+
export type { NetWorth, NetWorthData, MonthlyAccountBalance } from './types/NetWorth';
|
|
4
3
|
export { default as NetWorthWidget } from './NetWorthWidget';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { GlobalStore } from '../../common';
|
|
2
|
-
import { MonthlyAccountBalance, NetWorth, NetWorthData, xyData } from '../types/NetWorth';
|
|
3
2
|
import { NetWorthApi } from '../api/NetWorthApi';
|
|
3
|
+
import { NetWorth, NetWorthData } from '../types/NetWorth';
|
|
4
4
|
|
|
5
5
|
export declare class NetWorthStore {
|
|
6
6
|
api: NetWorthApi;
|
|
7
7
|
globalStore: GlobalStore;
|
|
8
8
|
netWorthData: NetWorthData;
|
|
9
|
-
netWorthChartData:
|
|
10
|
-
|
|
9
|
+
netWorthChartData: NetWorth[];
|
|
10
|
+
numberOfMonths: number;
|
|
11
11
|
constructor(globalStore: GlobalStore);
|
|
12
12
|
initialize: (endpoint: string, token: string) => void;
|
|
13
13
|
loadNetWorthData: () => Promise<void>;
|
|
14
|
-
|
|
14
|
+
loadChartData: () => Promise<void>;
|
|
15
15
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Account } from '../../common';
|
|
2
|
+
|
|
1
3
|
export type MonthlyAccountBalance = {
|
|
2
4
|
account_guid: string;
|
|
3
5
|
balance: number;
|
|
@@ -10,7 +12,8 @@ export type MonthlyAccountBalance = {
|
|
|
10
12
|
year: number;
|
|
11
13
|
year_month: number;
|
|
12
14
|
};
|
|
13
|
-
type
|
|
15
|
+
export type MonthlyAccountSummary = {
|
|
16
|
+
balance: number;
|
|
14
17
|
change: number;
|
|
15
18
|
guid: string;
|
|
16
19
|
name: string;
|
|
@@ -18,18 +21,13 @@ type MonthlyAccountBalances = {
|
|
|
18
21
|
value: number;
|
|
19
22
|
};
|
|
20
23
|
export type NetWorth = {
|
|
21
|
-
|
|
22
|
-
accounts: MonthlyAccountBalances[];
|
|
24
|
+
accounts: MonthlyAccountSummary[];
|
|
23
25
|
x: number;
|
|
24
26
|
y: number;
|
|
25
27
|
change: number;
|
|
26
28
|
};
|
|
27
|
-
export type xyData = {
|
|
28
|
-
x: string;
|
|
29
|
-
y: number;
|
|
30
|
-
};
|
|
31
29
|
export type NetWorthData = {
|
|
32
|
-
accounts:
|
|
33
|
-
monthlyAccountBalances:
|
|
30
|
+
accounts: Account[];
|
|
31
|
+
monthlyAccountBalances: MonthlyAccountBalance[];
|
|
32
|
+
numberOfMonths: number;
|
|
34
33
|
};
|
|
35
|
-
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Account, Member } from '../../common/types';
|
|
2
|
+
import { MonthlyAccountBalance } from '../types/NetWorth';
|
|
3
|
+
|
|
4
|
+
export declare const filterAccounts: (accounts: Account[], members: Member[]) => Account[];
|
|
5
|
+
export declare const flattenBalances: (balances: any, balance: any) => any[];
|
|
6
|
+
export declare const sortByYearMonthAscending: (a: MonthlyAccountBalance, b: MonthlyAccountBalance) => number;
|
|
7
|
+
export declare const loadChartData: (accounts: Account[], monthlyAccountBalances: MonthlyAccountBalance[], numberOfMonths: number) => any;
|