@mx-cartographer/experiences 3.7.0-alpha.al17 → 3.7.0-alpha.al19
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
CHANGED
|
@@ -9911,7 +9911,7 @@ class Tr {
|
|
|
9911
9911
|
};
|
|
9912
9912
|
getAccounts = async () => this.fetchInstance.get(N.ACCOUNTS).then((e) => e.accounts).catch((e) => e);
|
|
9913
9913
|
getMembers = async () => this.fetchInstance.get(N.MEMBERS).then((e) => e.members).catch((e) => e);
|
|
9914
|
-
getMonthlyAccountBalances = async (e) => this.fetchInstance.get(`${N.ACCOUNTS}/${e.guid}/monthly_account_balances`).then((n) => n).catch((n) => n);
|
|
9914
|
+
getMonthlyAccountBalances = async (e) => this.fetchInstance.get(`${N.ACCOUNTS}/${e.guid}/monthly_account_balances`).then((n) => n.monthly_account_balances).catch((n) => n);
|
|
9915
9915
|
getNetWorthChartData = async () => wr.map((n) => ({ x: this.formatMonth(n.x), y: n.y }));
|
|
9916
9916
|
getNetWorthMonthlyList = async () => wr;
|
|
9917
9917
|
}
|
|
@@ -9924,13 +9924,13 @@ class Yu {
|
|
|
9924
9924
|
constructor(e) {
|
|
9925
9925
|
this.globalStore = e, bA(this);
|
|
9926
9926
|
}
|
|
9927
|
-
initialize =
|
|
9928
|
-
this.api = new Tr(e, n)
|
|
9927
|
+
initialize = (e, n) => {
|
|
9928
|
+
this.api = new Tr(e, n);
|
|
9929
9929
|
};
|
|
9930
9930
|
loadNetWorthData = async () => {
|
|
9931
9931
|
try {
|
|
9932
9932
|
const e = await this.api.getAccounts(), n = e.map((r) => this.api.getMonthlyAccountBalances(r)), a = await Promise.all(n);
|
|
9933
|
-
Y(() => {
|
|
9933
|
+
console.log(a), Y(() => {
|
|
9934
9934
|
this.netWorthData = {
|
|
9935
9935
|
accounts: e,
|
|
9936
9936
|
monthlyAccountBalances: a
|
|
@@ -14585,12 +14585,12 @@ const Dt = g.createContext(null), Ih = ({
|
|
|
14585
14585
|
] })) })
|
|
14586
14586
|
] });
|
|
14587
14587
|
}, s3 = x(o3), c3 = ({ onBackClick: A }) => {
|
|
14588
|
-
const { accounts: e } = DA(), { isInitialized: n } = an(), {
|
|
14588
|
+
const { accounts: e } = DA(), { isInitialized: n } = an(), { loadNetWorthData: a, loadChartData: r, netWorthChartData: i, netWorthMonthlyList: o } = Hc(), [s, c] = g.useState(!1);
|
|
14589
14589
|
return g.useEffect(() => {
|
|
14590
|
-
n && (
|
|
14591
|
-
}, [n
|
|
14592
|
-
/* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(n3, { chartData:
|
|
14593
|
-
/* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(s3, { netWorthList:
|
|
14590
|
+
n && (a(), r(), c(!0));
|
|
14591
|
+
}, [n]), !n || !s ? /* @__PURE__ */ t(Ce, {}) : /* @__PURE__ */ u(Re, { accountOptions: e, onBackClick: A, sx: { px: 16 }, children: [
|
|
14592
|
+
/* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(n3, { chartData: i }) }),
|
|
14593
|
+
/* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(s3, { netWorthList: o }) })
|
|
14594
14594
|
] });
|
|
14595
14595
|
}, W7 = x(c3), xn = 5, l3 = (A, e) => e.reduce((n, a) => {
|
|
14596
14596
|
if (a.total > 0) {
|