@mx-cartographer/experiences 3.8.0 → 3.9.0-alpha.al1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { WidgetProps } from '../common';
3
+
4
+ declare const _default: React.FunctionComponent<WidgetProps>;
5
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { Fetch } from '../../common';
2
+
3
+ export declare class NetWorthApi {
4
+ fetchInstance: Fetch;
5
+ constructor(endpoint: string, token: string);
6
+ getAccounts: () => Promise<any>;
7
+ getMembers: () => Promise<any>;
8
+ getMonthlyAccountBalances: (guid: string) => Promise<any>;
9
+ }
@@ -0,0 +1,7 @@
1
+ import { xyData } from '../types/NetWorth';
2
+
3
+ interface NetWorthChartProps {
4
+ chartData: xyData[];
5
+ }
6
+ declare const _default: import('react').FunctionComponent<NetWorthChartProps>;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { NetWorth } from '../types/NetWorth';
2
+
3
+ interface NetWorthListProps {
4
+ netWorthList: NetWorth[];
5
+ }
6
+ declare const _default: import('react').FunctionComponent<NetWorthListProps>;
7
+ export default _default;
@@ -0,0 +1,6 @@
1
+ interface NetWorthRowProps {
2
+ month: string;
3
+ amount: number;
4
+ }
5
+ declare const _default: import('react').FunctionComponent<NetWorthRowProps>;
6
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default as NetWorthChart } from './components/NetWorthChart';
2
+ export type { NetWorth, NetWorthData, MonthlyAccountBalance, xyData } from './types/NetWorth';
3
+ export { default as NetWorthWidget } from './NetWorthWidget';
@@ -0,0 +1,15 @@
1
+ import { GlobalStore } from '../../common';
2
+ import { NetWorthApi } from '../api/NetWorthApi';
3
+ import { NetWorth, NetWorthData, xyData } from '../types/NetWorth';
4
+
5
+ export declare class NetWorthStore {
6
+ api: NetWorthApi;
7
+ globalStore: GlobalStore;
8
+ netWorthData: NetWorthData;
9
+ netWorthChartData: xyData[];
10
+ netWorthMonthlyList: NetWorth[];
11
+ constructor(globalStore: GlobalStore);
12
+ initialize: (endpoint: string, token: string) => void;
13
+ loadNetWorthData: () => Promise<void>;
14
+ _flattenBalances: (balances: any, balance: any) => any[];
15
+ }
@@ -0,0 +1,37 @@
1
+ import { Account } from '../../common';
2
+
3
+ export type MonthlyAccountBalance = {
4
+ account_guid: string;
5
+ balance: number;
6
+ credit_transaction_total: number;
7
+ debit_transaction_total: number;
8
+ id: string;
9
+ month: number;
10
+ transaction_total: number;
11
+ user_guid: string;
12
+ year: number;
13
+ year_month: number;
14
+ };
15
+ type MonthlyAccountBalances = {
16
+ change: number;
17
+ guid: string;
18
+ name: string;
19
+ type: number;
20
+ value: number;
21
+ };
22
+ export type NetWorth = {
23
+ id: number;
24
+ accounts: MonthlyAccountBalances[];
25
+ x: number;
26
+ y: number;
27
+ change: number;
28
+ };
29
+ export type xyData = {
30
+ x: string;
31
+ y: number;
32
+ };
33
+ export type NetWorthData = {
34
+ accounts: Account[];
35
+ monthlyAccountBalances: MonthlyAccountBalance[];
36
+ };
37
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Account, Member } from '../../common/types';
2
+
3
+ export declare const filterAccounts: (members: Member[], accounts: Account[]) => Account[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "3.8.0",
3
+ "version": "3.9.0-alpha.al1",
4
4
  "description": "Library containing experience widgets",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",