@mx-cartographer/experiences 6.0.23-alpha.mega1 → 6.0.23-alpha.mega2
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 +6 -6
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -13325,7 +13325,7 @@ class fo {
|
|
13325
13325
|
constructor(t, i) {
|
13326
13326
|
this.fetchInstance = new _A(t, i);
|
13327
13327
|
}
|
13328
|
-
getHoldings = async () => this.fetchInstance.get(Q.HOLDINGS).then((t) => t);
|
13328
|
+
getHoldings = async () => this.fetchInstance.get(Q.HOLDINGS).then((t) => t.holdings);
|
13329
13329
|
}
|
13330
13330
|
class Bl {
|
13331
13331
|
globalStore;
|
@@ -21868,13 +21868,13 @@ const H3 = g(() => {
|
|
21868
21868
|
}));
|
21869
21869
|
}, { holdings: n } = ha(), { visibleInvestmentAccounts: r, members: o } = zA();
|
21870
21870
|
console.log(JSON.parse(JSON.stringify(r)), "accounts"), console.log(JSON.parse(JSON.stringify(n)), "allHoldings");
|
21871
|
-
const a = r
|
21871
|
+
const a = r.reduce((d, f) => d + (f.balance || 0), 0) || 0, s = n.reduce((d, f) => {
|
21872
21872
|
const l = f.market_value ? f.market_value - (f.cost_basis || 0) : 0;
|
21873
21873
|
return d + l;
|
21874
|
-
}, 0)
|
21874
|
+
}, 0), c = n.reduce((d, f) => {
|
21875
21875
|
const l = f.market_value ? f.market_value - (f.cost_basis || 0) : 0;
|
21876
21876
|
return d + l;
|
21877
|
-
}, 0)
|
21877
|
+
}, 0), E = a ? c / a * 100 : 0;
|
21878
21878
|
return /* @__PURE__ */ I(oe, { sx: { alignItems: "center", pt: 48, gap: 48, width: "100%" }, children: [
|
21879
21879
|
/* @__PURE__ */ I(oe, { alignItems: "center", children: [
|
21880
21880
|
/* @__PURE__ */ e(R, { color: "#49505A", children: "Total Portfolio" }),
|
@@ -21920,10 +21920,10 @@ const H3 = g(() => {
|
|
21920
21920
|
// Calculate gain/loss
|
21921
21921
|
marketValue: X.market_value || 0,
|
21922
21922
|
description: X.description || ""
|
21923
|
-
})), u = v.length > 0, H = l.balance, P = v
|
21923
|
+
})), u = v.length > 0, H = l.balance, P = v.reduce(
|
21924
21924
|
(X, x) => x.totalGainLoss + X,
|
21925
21925
|
0
|
21926
|
-
)
|
21926
|
+
), C = H ? P / H * 100 : 0;
|
21927
21927
|
return /* @__PURE__ */ I(
|
21928
21928
|
Gi,
|
21929
21929
|
{
|