@mx-cartographer/experiences 7.11.18 → 7.11.20
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 +8 -0
- package/dist/{FinstrongStore-DO0IrhF4.mjs → FinstrongStore-BQxXxxYD.mjs} +95 -95
- package/dist/{LineChart-DvCvL2Ed.mjs → LineChart-DVn1AamK.mjs} +245 -216
- package/dist/accounts/index.es.js +1 -1
- package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
- package/dist/common/index.es.js +1 -1
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +1 -0
- package/dist/finstrong/index.es.js +4 -4
- package/dist/networth/index.es.js +1 -1
- package/dist/trends/index.es.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,15 +2,15 @@ import { makeAutoObservable as E, runInAction as d } from "mobx";
|
|
|
2
2
|
import { format as R } from "date-fns/format";
|
|
3
3
|
import { fromUnixTime as b } from "date-fns/fromUnixTime";
|
|
4
4
|
import { getUnixTime as T } from "date-fns/getUnixTime";
|
|
5
|
-
import { subMonths as
|
|
6
|
-
import { F as
|
|
5
|
+
import { subMonths as v } from "date-fns/subMonths";
|
|
6
|
+
import { F as H, A as h } from "./Fetch-B6tMJC1r.mjs";
|
|
7
7
|
import { jsx as c, jsxs as C } from "react/jsx-runtime";
|
|
8
|
-
import { addDays as
|
|
8
|
+
import { addDays as x } from "date-fns/addDays";
|
|
9
9
|
import { addMonths as M } from "date-fns/addMonths";
|
|
10
10
|
import { addYears as G } from "date-fns/addYears";
|
|
11
11
|
import { differenceInDays as L } from "date-fns/differenceInDays";
|
|
12
12
|
import { differenceInMonths as w } from "date-fns/differenceInMonths";
|
|
13
|
-
import { differenceInWeeks as
|
|
13
|
+
import { differenceInWeeks as y } from "date-fns/differenceInWeeks";
|
|
14
14
|
import { startOfToday as N } from "date-fns/startOfToday";
|
|
15
15
|
import { ChevronRight as P, Check as k } from "@mxenabled/mx-icons";
|
|
16
16
|
import $ from "react";
|
|
@@ -22,8 +22,8 @@ import U from "@mui/material/ListItem";
|
|
|
22
22
|
import X from "@mui/material/ListItemAvatar";
|
|
23
23
|
import V from "@mui/material/ListItemButton";
|
|
24
24
|
import W from "@mui/material/ListItemText";
|
|
25
|
-
import { Text as
|
|
26
|
-
import { f as
|
|
25
|
+
import { Text as A } from "@mxenabled/mxui";
|
|
26
|
+
import { f as I, D as O } from "./DateFormats-BMpMrZpW.mjs";
|
|
27
27
|
import { b as j } from "./Localization-CPkpIwIx.mjs";
|
|
28
28
|
import { f as q } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
29
29
|
const m = {
|
|
@@ -53,7 +53,7 @@ const m = {
|
|
|
53
53
|
OFF_TRACK: "OFF TRACK",
|
|
54
54
|
MISSING: "MISSING DATA"
|
|
55
55
|
};
|
|
56
|
-
var
|
|
56
|
+
var _ = /* @__PURE__ */ ((e) => (e.Connections = "connections", e.CreditScore = "credit_score", e.DateOfBirth = "date_of_birth", e.MonthlyIncome = "monthly_income", e))(_ || {});
|
|
57
57
|
const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(
|
|
58
58
|
Y,
|
|
59
59
|
{
|
|
@@ -63,14 +63,14 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
63
63
|
pr: 24
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
children: e.map((
|
|
67
|
-
/* @__PURE__ */ c(U, { secondaryAction: /* @__PURE__ */ c(P, {}), children: /* @__PURE__ */ C(V, { onClick: () => t(
|
|
66
|
+
children: e.map((r, n) => /* @__PURE__ */ C($.Fragment, { children: [
|
|
67
|
+
/* @__PURE__ */ c(U, { secondaryAction: /* @__PURE__ */ c(P, {}), children: /* @__PURE__ */ C(V, { onClick: () => t(r.key), children: [
|
|
68
68
|
/* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
69
69
|
z,
|
|
70
70
|
{
|
|
71
71
|
sx: {
|
|
72
72
|
bgcolor: "primary.main",
|
|
73
|
-
...!
|
|
73
|
+
...!r.isComplete && {
|
|
74
74
|
bgcolor: "transparent",
|
|
75
75
|
borderColor: "action.active",
|
|
76
76
|
borderStyle: "solid",
|
|
@@ -78,19 +78,19 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
78
78
|
color: "action.active"
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
children:
|
|
81
|
+
children: r.icon
|
|
82
82
|
}
|
|
83
83
|
) }),
|
|
84
84
|
/* @__PURE__ */ c(
|
|
85
85
|
W,
|
|
86
86
|
{
|
|
87
|
-
primary: /* @__PURE__ */ c(
|
|
88
|
-
secondary: /* @__PURE__ */ c(
|
|
87
|
+
primary: /* @__PURE__ */ c(A, { sx: { color: "text.secondary" }, variant: "caption", children: r.primaryText }),
|
|
88
|
+
secondary: /* @__PURE__ */ c(A, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: r.secondaryText })
|
|
89
89
|
}
|
|
90
90
|
)
|
|
91
91
|
] }) }),
|
|
92
|
-
/* @__PURE__ */ c(B, { sx: { color: "divider", ml:
|
|
93
|
-
] },
|
|
92
|
+
/* @__PURE__ */ c(B, { sx: { color: "divider", ml: n === e.length - 1 ? 0 : 68 } })
|
|
93
|
+
] }, r.key))
|
|
94
94
|
}
|
|
95
95
|
) }), Gt = J, Lt = (e) => e * (180 / Math.PI), wt = (e, t) => [
|
|
96
96
|
{
|
|
@@ -129,86 +129,86 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
129
129
|
GOOD: "#FFC02C",
|
|
130
130
|
VERY_GOOD: "#29C76B",
|
|
131
131
|
EXCEPTIONAL: "#008A5A"
|
|
132
|
-
}, Nt = (e, t,
|
|
133
|
-
status:
|
|
132
|
+
}, Nt = (e, t, r) => e >= 300 && e < 580 ? {
|
|
133
|
+
status: r.poor,
|
|
134
134
|
color: t ? u.POOR : g.POOR
|
|
135
135
|
} : e >= 580 && e < 670 ? {
|
|
136
|
-
status:
|
|
136
|
+
status: r.fair,
|
|
137
137
|
color: t ? u.FAIR : g.FAIR
|
|
138
138
|
} : e >= 670 && e < 740 ? {
|
|
139
|
-
status:
|
|
139
|
+
status: r.good,
|
|
140
140
|
color: t ? u.GOOD : g.GOOD
|
|
141
141
|
} : e >= 740 && e < 800 ? {
|
|
142
|
-
status:
|
|
142
|
+
status: r.very_good,
|
|
143
143
|
color: t ? u.VERY_GOOD : g.VERY_GOOD
|
|
144
144
|
} : e >= 800 && e <= 850 ? {
|
|
145
|
-
status:
|
|
145
|
+
status: r.exceptional,
|
|
146
146
|
color: t ? u.EXCEPTIONAL : g.EXCEPTIONAL
|
|
147
|
-
} : { status:
|
|
147
|
+
} : { status: r.missing_data }, Pt = (e, t, r, n) => {
|
|
148
148
|
const o = e.reduce((i, l) => i + l.value, 0);
|
|
149
149
|
let a = 0;
|
|
150
150
|
const s = e.map((i) => {
|
|
151
|
-
const l = i.value / o * t, p =
|
|
151
|
+
const l = i.value / o * t, p = r + a, f = p + l;
|
|
152
152
|
return a += l, {
|
|
153
153
|
...i,
|
|
154
154
|
startAngle: p,
|
|
155
155
|
endAngle: f
|
|
156
156
|
};
|
|
157
157
|
});
|
|
158
|
-
return [s[
|
|
159
|
-
}, kt = (e, t,
|
|
158
|
+
return [s[n].startAngle, s[n].endAngle];
|
|
159
|
+
}, kt = (e, t, r, n, o) => {
|
|
160
160
|
let a = 0, s = 0;
|
|
161
|
-
const i = Math.floor(
|
|
162
|
-
return i >
|
|
163
|
-
}, $t = (e, t,
|
|
164
|
-
const
|
|
165
|
-
return [
|
|
161
|
+
const i = Math.floor(n), l = n - i;
|
|
162
|
+
return i > r ? (a = e, s = t) : i === r && l > 0 && (a = e, s = o), [a, s];
|
|
163
|
+
}, $t = (e, t, r = 0) => {
|
|
164
|
+
const n = e * Math.sin(t - r), o = -e * Math.cos(t - r);
|
|
165
|
+
return [n, o];
|
|
166
166
|
}, zt = ({
|
|
167
167
|
dynamicCopy: e,
|
|
168
168
|
fallbackLabel: t,
|
|
169
|
-
icon:
|
|
170
|
-
key:
|
|
169
|
+
icon: r,
|
|
170
|
+
key: n,
|
|
171
171
|
label: o,
|
|
172
172
|
value: a
|
|
173
173
|
}) => {
|
|
174
|
-
const s = !!a, i = s ? Q(
|
|
174
|
+
const s = !!a, i = s ? Q(n, a) : e && j(e, t) || t;
|
|
175
175
|
return {
|
|
176
|
-
icon: s ? /* @__PURE__ */ c(k, {}) :
|
|
176
|
+
icon: s ? /* @__PURE__ */ c(k, {}) : r,
|
|
177
177
|
isComplete: s,
|
|
178
|
-
key:
|
|
178
|
+
key: n,
|
|
179
179
|
primaryText: o,
|
|
180
180
|
secondaryText: i
|
|
181
181
|
};
|
|
182
182
|
}, Q = (e, t) => ({
|
|
183
|
-
[
|
|
184
|
-
[
|
|
183
|
+
[_.DateOfBirth]: (n) => R(new Date(Number(n) * 1e3), "MMM d, yyyy"),
|
|
184
|
+
[_.MonthlyIncome]: (n) => q(Number(n), "0.00")
|
|
185
185
|
})[e]?.(t) ?? String(t), Kt = (e) => e !== null ? Math.round(e * 100) : null, Bt = (e) => {
|
|
186
186
|
const t = new Date((/* @__PURE__ */ new Date()).getFullYear(), e - 1, 1);
|
|
187
|
-
return
|
|
187
|
+
return I(t, O.MONTH_SHORT);
|
|
188
188
|
}, Yt = (e) => {
|
|
189
|
-
const { good: t, poor:
|
|
190
|
-
return e === null ? "MISSING" : e >= t ? "GOOD" : e >=
|
|
189
|
+
const { good: t, poor: r } = m.daysOfCashOnHand;
|
|
190
|
+
return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
|
|
191
191
|
}, Ut = (e) => {
|
|
192
|
-
const { good: t, poor:
|
|
193
|
-
return e === null ? "MISSING" : e >= t ? "GOOD" : e >=
|
|
192
|
+
const { good: t, poor: r } = m.emergencySavings;
|
|
193
|
+
return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
|
|
194
194
|
}, Xt = (e) => {
|
|
195
|
-
const { good: t, poor:
|
|
196
|
-
return e === null ? "MISSING" : e < t ? "GOOD" : e <
|
|
195
|
+
const { good: t, poor: r } = m.spendToIncomeRatio;
|
|
196
|
+
return e === null ? "MISSING" : e < t ? "GOOD" : e < r ? "FAIR" : "OFF_TRACK";
|
|
197
197
|
}, Vt = (e) => {
|
|
198
|
-
const { good: t, poor:
|
|
199
|
-
return e === null ? "MISSING" : e <= t ? "GOOD" : e <=
|
|
198
|
+
const { good: t, poor: r } = m.debtToIncomeRatio;
|
|
199
|
+
return e === null ? "MISSING" : e <= t ? "GOOD" : e <= r ? "FAIR" : "OFF_TRACK";
|
|
200
200
|
}, Wt = (e) => {
|
|
201
|
-
const { good: t, poor:
|
|
202
|
-
return e === null ? "MISSING" : e >= t ? "GOOD" : e >=
|
|
201
|
+
const { good: t, poor: r } = m.creditScore;
|
|
202
|
+
return e === null ? "MISSING" : e >= t ? "GOOD" : e >= r ? "FAIR" : "OFF_TRACK";
|
|
203
203
|
}, Z = (e) => e === null ? "MISSING" : e === 0 ? "GOOD" : "OFF_TRACK", jt = (e, t) => {
|
|
204
|
-
const
|
|
204
|
+
const r = Z(e), n = {
|
|
205
205
|
GOOD: t.count_good_description,
|
|
206
206
|
OFF_TRACK: t.count_off_track_description,
|
|
207
207
|
MISSING: t.count_missing_description
|
|
208
208
|
};
|
|
209
209
|
return {
|
|
210
|
-
cardState:
|
|
211
|
-
description: r
|
|
210
|
+
cardState: r,
|
|
211
|
+
description: n[r],
|
|
212
212
|
title: t.count_card_title
|
|
213
213
|
};
|
|
214
214
|
}, qt = (e) => ({
|
|
@@ -216,14 +216,14 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
216
216
|
[S.FAIR]: { backgroundColor: "warning.lighter", color: "warning.dark" },
|
|
217
217
|
[S.OFF_TRACK]: { backgroundColor: "error.lighter", color: "error.dark" },
|
|
218
218
|
[S.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
|
|
219
|
-
})[e], tt = 1, et = 1,
|
|
219
|
+
})[e], tt = 1, et = 1, rt = {
|
|
220
220
|
1: M,
|
|
221
221
|
2: G,
|
|
222
|
-
3:
|
|
223
|
-
},
|
|
222
|
+
3: x
|
|
223
|
+
}, nt = {
|
|
224
224
|
1: w,
|
|
225
|
-
2: (e, t) =>
|
|
226
|
-
3:
|
|
225
|
+
2: (e, t) => y(e, t) / 2,
|
|
226
|
+
3: y,
|
|
227
227
|
4: L
|
|
228
228
|
}, D = [
|
|
229
229
|
{ contributionPeriodIndex: 3, targetAmount: 6, upperLimit: 500 },
|
|
@@ -232,44 +232,44 @@ const J = ({ list: e, onClickItem: t }) => /* @__PURE__ */ c(K, { sx: { bgcolor:
|
|
|
232
232
|
], Jt = ({
|
|
233
233
|
contribution: e,
|
|
234
234
|
goalAmount: t,
|
|
235
|
-
goalPeriod:
|
|
236
|
-
targetPeriod:
|
|
235
|
+
goalPeriod: r,
|
|
236
|
+
targetPeriod: n,
|
|
237
237
|
totalSaved: o
|
|
238
238
|
}) => {
|
|
239
239
|
const a = t - o;
|
|
240
240
|
if (a <= 0) return 0;
|
|
241
|
-
const s = N(), i =
|
|
241
|
+
const s = N(), i = rt[n], l = nt[e];
|
|
242
242
|
if (!i || !l) return a;
|
|
243
|
-
const p = i(s,
|
|
243
|
+
const p = i(s, r), f = l(p, s);
|
|
244
244
|
return Math.max(a / (f || 1), 1);
|
|
245
|
-
}, Qt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Zt = (e) => D.find((
|
|
246
|
-
x:
|
|
247
|
-
y:
|
|
248
|
-
})), ot = (e) => e.sort((t,
|
|
249
|
-
x:
|
|
245
|
+
}, Qt = (e) => !e || e <= 0 ? "0%" : e >= 1e3 ? "100%" : `${Math.round(e / 10)}%`, Zt = (e) => D.find((r) => e < r.upperLimit)?.targetAmount ?? et, te = (e) => D.find((n) => e < n.upperLimit)?.contributionPeriodIndex ?? tt, ee = (e, t) => [...e].sort((n, o) => n.year === o.year ? n.month - o.month : n.year - o.year).map((n) => ({
|
|
246
|
+
x: I(new Date(0, n.month - 1, 1), O.MONTH_SHORT),
|
|
247
|
+
y: n[t]
|
|
248
|
+
})), ot = (e) => e.sort((t, r) => t.monthly_health_score_average.year !== r.monthly_health_score_average.year ? t.monthly_health_score_average.year - r.monthly_health_score_average.year : t.monthly_health_score_average.month - r.monthly_health_score_average.month).map((t) => ({
|
|
249
|
+
x: I(
|
|
250
250
|
new Date(0, t.monthly_health_score_average.month - 1, 1),
|
|
251
|
-
|
|
251
|
+
O.MONTH_SHORT
|
|
252
252
|
),
|
|
253
253
|
y: Math.round(t.monthly_health_score_average.average_health_score)
|
|
254
|
-
})), at = (e) => e.map(({ transaction:
|
|
255
|
-
...
|
|
256
|
-
})).sort((
|
|
254
|
+
})), at = (e) => e.map(({ transaction: r }) => ({
|
|
255
|
+
...r
|
|
256
|
+
})).sort((r, n) => n.date - r.date);
|
|
257
257
|
class F {
|
|
258
258
|
fetchInstance;
|
|
259
|
-
constructor(t,
|
|
260
|
-
this.fetchInstance = new
|
|
259
|
+
constructor(t, r, n) {
|
|
260
|
+
this.fetchInstance = new H(t, r, void 0, n);
|
|
261
261
|
}
|
|
262
262
|
calculateHealthScore = async () => this.fetchInstance.post(`${h.HEALTH_SCORES}/calculate`).then((t) => t.health_score);
|
|
263
263
|
getAverageHealthScores = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_averages`).then((t) => t);
|
|
264
264
|
getDebtSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/debt_spend`).then((t) => t);
|
|
265
265
|
getIncome = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/income`).then((t) => t);
|
|
266
266
|
getMonthlySummaries = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/monthly_summaries`).then((t) => t);
|
|
267
|
-
getHealthScoreChangeReports = async (t,
|
|
268
|
-
getPeerScore = async (t) => this.fetchInstance.get(`${h.HEALTH_SCORES}/average/${t}`).then((
|
|
267
|
+
getHealthScoreChangeReports = async (t, r) => this.fetchInstance.get(`${h.HEALTH_SCORES}/change_report/from/${t}/to/${r}`).then((n) => n);
|
|
268
|
+
getPeerScore = async (t) => this.fetchInstance.get(`${h.HEALTH_SCORES}/average/${t}`).then((r) => r);
|
|
269
269
|
getSpendingFeeTransactions = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/spending_fee`).then((t) => t);
|
|
270
270
|
getStandardSpend = async () => this.fetchInstance.get(`${h.HEALTH_SCORES}/transactions/standard_spend`).then((t) => t);
|
|
271
271
|
}
|
|
272
|
-
class
|
|
272
|
+
class re {
|
|
273
273
|
api = new F("/", "");
|
|
274
274
|
augmentedChartData = [];
|
|
275
275
|
averageHealthScores = [];
|
|
@@ -296,15 +296,15 @@ class ne {
|
|
|
296
296
|
};
|
|
297
297
|
calculateHealthScore = async (t = !0) => {
|
|
298
298
|
try {
|
|
299
|
-
const
|
|
300
|
-
let
|
|
299
|
+
const r = await this.api.calculateHealthScore();
|
|
300
|
+
let n = 0;
|
|
301
301
|
t && await this.loadHealthScoreChangeReports();
|
|
302
|
-
const o =
|
|
303
|
-
|
|
304
|
-
this.healthScore =
|
|
302
|
+
const o = r?.health_score || 0, a = this.healthScoreChangeReports.at(-1)?.older_health_score || 0;
|
|
303
|
+
n = o - a, d(() => {
|
|
304
|
+
this.healthScore = r, this.healthScoreChange = n;
|
|
305
305
|
});
|
|
306
|
-
} catch (
|
|
307
|
-
console.error("Error calculating health score:",
|
|
306
|
+
} catch (r) {
|
|
307
|
+
console.error("Error calculating health score:", r);
|
|
308
308
|
}
|
|
309
309
|
};
|
|
310
310
|
loadAverageHealthScores = async () => {
|
|
@@ -349,28 +349,28 @@ class ne {
|
|
|
349
349
|
}
|
|
350
350
|
};
|
|
351
351
|
loadHealthScoreChangeReports = async () => {
|
|
352
|
-
const t = T(
|
|
352
|
+
const t = T(v(/* @__PURE__ */ new Date(), 2)), r = T(/* @__PURE__ */ new Date());
|
|
353
353
|
try {
|
|
354
|
-
const
|
|
354
|
+
const n = await this.api.getHealthScoreChangeReports(
|
|
355
355
|
t,
|
|
356
|
-
|
|
356
|
+
r
|
|
357
357
|
);
|
|
358
358
|
d(() => {
|
|
359
|
-
this.healthScoreChangeReports =
|
|
359
|
+
this.healthScoreChangeReports = n;
|
|
360
360
|
});
|
|
361
|
-
} catch (
|
|
362
|
-
console.error("Error loading health score change reports:",
|
|
361
|
+
} catch (n) {
|
|
362
|
+
console.error("Error loading health score change reports:", n);
|
|
363
363
|
}
|
|
364
364
|
};
|
|
365
365
|
loadPeerScore = async () => {
|
|
366
366
|
const t = R(b(this.globalStore.appDataStore.user.birthday), "yyyy");
|
|
367
367
|
try {
|
|
368
|
-
const
|
|
368
|
+
const r = await this.api.getPeerScore(t);
|
|
369
369
|
d(() => {
|
|
370
|
-
this.peerScore =
|
|
370
|
+
this.peerScore = r;
|
|
371
371
|
});
|
|
372
|
-
} catch (
|
|
373
|
-
console.error("Error loading peer score:",
|
|
372
|
+
} catch (r) {
|
|
373
|
+
console.error("Error loading peer score:", r);
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
376
|
loadAugmentedChartData = async () => {
|
|
@@ -385,9 +385,9 @@ class ne {
|
|
|
385
385
|
};
|
|
386
386
|
getSpendingFeeTransactions = async () => {
|
|
387
387
|
try {
|
|
388
|
-
const t = await this.api.getSpendingFeeTransactions(),
|
|
388
|
+
const t = await this.api.getSpendingFeeTransactions(), r = at(t);
|
|
389
389
|
d(() => {
|
|
390
|
-
this.spendingFeeTransactions =
|
|
390
|
+
this.spendingFeeTransactions = r;
|
|
391
391
|
});
|
|
392
392
|
} catch (t) {
|
|
393
393
|
console.error(`Error occurred while getting spending fee transactions: ${t}`);
|
|
@@ -419,9 +419,9 @@ class ne {
|
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
421
|
export {
|
|
422
|
-
|
|
422
|
+
_ as A,
|
|
423
423
|
u as C,
|
|
424
|
-
|
|
424
|
+
re as F,
|
|
425
425
|
Gt as P,
|
|
426
426
|
kt as a,
|
|
427
427
|
$t as b,
|
|
@@ -1,77 +1,115 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { BarPlot as
|
|
5
|
-
import { ChartContainer as
|
|
6
|
-
import { ChartsAxisHighlight as
|
|
7
|
-
import { ChartsReferenceLine as
|
|
8
|
-
import { useAxesTooltip as
|
|
9
|
-
import { ChartsXAxis as
|
|
10
|
-
import { ChartsYAxis as
|
|
11
|
-
import { AreaPlot as
|
|
12
|
-
import { f as p, c as
|
|
13
|
-
import { observer as
|
|
14
|
-
import
|
|
15
|
-
import { Text as
|
|
16
|
-
import { u as
|
|
17
|
-
import
|
|
18
|
-
import { Stack as
|
|
19
|
-
const
|
|
1
|
+
import { jsxs as i, jsx as e, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import _ from "@mui/material/Box";
|
|
3
|
+
import { useTheme as j } from "@mui/material/styles";
|
|
4
|
+
import { BarPlot as gt } from "@mui/x-charts/BarChart";
|
|
5
|
+
import { ChartContainer as yt } from "@mui/x-charts/ChartContainer";
|
|
6
|
+
import { ChartsAxisHighlight as pt } from "@mui/x-charts/ChartsAxisHighlight";
|
|
7
|
+
import { ChartsReferenceLine as Lt } from "@mui/x-charts/ChartsReferenceLine";
|
|
8
|
+
import { useAxesTooltip as kt, ChartsTooltipContainer as bt } from "@mui/x-charts/ChartsTooltip";
|
|
9
|
+
import { ChartsXAxis as Mt } from "@mui/x-charts/ChartsXAxis";
|
|
10
|
+
import { ChartsYAxis as wt } from "@mui/x-charts/ChartsYAxis";
|
|
11
|
+
import { AreaPlot as St, LinePlot as Ct, MarkPlot as vt } from "@mui/x-charts/LineChart";
|
|
12
|
+
import { f as p, c as O } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
13
|
+
import { observer as At } from "mobx-react-lite";
|
|
14
|
+
import W from "@mui/material/Stack";
|
|
15
|
+
import { Text as s } from "@mxenabled/mxui";
|
|
16
|
+
import { u as Dt } from "./hooks-zu7yblbi.mjs";
|
|
17
|
+
import Tt from "@mui/material/useMediaQuery";
|
|
18
|
+
import { Stack as b, Box as Rt } from "@mui/material";
|
|
19
|
+
const z = {
|
|
20
|
+
circle: "M4.514,0A4.514,4.514,0,1,1,-4.514,0A4.514,4.514,0,1,1,4.514,0",
|
|
21
|
+
square: "M-4,-4L4,-4L4,4L-4,4Z",
|
|
22
|
+
wye: "M0.6,0.6L0.6,4.5L-0.6,4.5L-0.6,0.6L-4,2.6L-3.4,1.5L-0.6,-0.1L-3.4,-1.5L-4,-2.6L-0.6,-0.6L-0.6,-4.5L0.6,-4.5L0.6,-0.6L4,-2.6L3.4,-1.5L0.6,-0.1L3.4,1.5L4,2.6L0.6,0.6Z",
|
|
23
|
+
star: "M0,-5L1.1,-1.5L4.8,-1.5L1.8,0.9L2.9,4.5L0,2.2L-2.9,4.5L-1.8,0.9L-4.8,-1.5L-1.1,-1.5Z",
|
|
24
|
+
cross: "M-1.5,-5L1.5,-5L1.5,-1.5L5,-1.5L5,1.5L1.5,1.5L1.5,5L-1.5,5L-1.5,1.5L-5,1.5L-5,-1.5L-1.5,-1.5Z",
|
|
25
|
+
triangle: "M0,-5L4.33,3.5L-4.33,3.5Z",
|
|
26
|
+
diamond: "M0,-5.5L3.9,0L0,5.5L-3.9,0Z"
|
|
27
|
+
}, X = [
|
|
28
|
+
"circle",
|
|
29
|
+
"square",
|
|
30
|
+
"wye",
|
|
31
|
+
"star",
|
|
32
|
+
"cross",
|
|
33
|
+
"triangle",
|
|
34
|
+
"diamond"
|
|
35
|
+
];
|
|
36
|
+
function N(t) {
|
|
37
|
+
return X[t % X.length];
|
|
38
|
+
}
|
|
39
|
+
const Bt = ({
|
|
20
40
|
label: t,
|
|
21
41
|
customLegendVariant: r
|
|
22
42
|
}) => {
|
|
23
|
-
const
|
|
24
|
-
return typeof t == "string" ? /* @__PURE__ */ e(
|
|
25
|
-
/* @__PURE__ */ e(
|
|
26
|
-
/* @__PURE__ */ e(
|
|
43
|
+
const l = r || "Small";
|
|
44
|
+
return typeof t == "string" ? /* @__PURE__ */ e(s, { variant: l, children: t }) : typeof t == "object" && t.amount !== void 0 && t.label ? /* @__PURE__ */ i(E, { children: [
|
|
45
|
+
/* @__PURE__ */ e(s, { variant: l, children: t.label }),
|
|
46
|
+
/* @__PURE__ */ e(s, { bold: !0, sx: { marginLeft: 8 }, variant: l, children: p(t.amount, "0,0") })
|
|
27
47
|
] }) : null;
|
|
28
|
-
},
|
|
48
|
+
}, Pt = ({
|
|
29
49
|
average: t,
|
|
30
50
|
customLegendVariant: r,
|
|
31
|
-
customLegendBoxSx:
|
|
51
|
+
customLegendBoxSx: l,
|
|
32
52
|
labels: o = [],
|
|
33
|
-
series:
|
|
53
|
+
series: L,
|
|
34
54
|
style: x,
|
|
35
55
|
title: h,
|
|
36
|
-
valueFormatterString:
|
|
56
|
+
valueFormatterString: f
|
|
37
57
|
}) => {
|
|
38
|
-
const { common: m } =
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
const d = o[
|
|
42
|
-
return d ? /* @__PURE__ */
|
|
43
|
-
|
|
58
|
+
const { common: m } = Dt(), c = r || "Small";
|
|
59
|
+
return /* @__PURE__ */ i(W, { style: { flexDirection: "row", gap: 24, ...x }, children: [
|
|
60
|
+
L.map((a, u) => {
|
|
61
|
+
const d = o[u];
|
|
62
|
+
return d ? /* @__PURE__ */ i(
|
|
63
|
+
W,
|
|
44
64
|
{
|
|
45
65
|
style: { alignItems: "center", flexDirection: "row", flexWrap: "wrap" },
|
|
46
66
|
children: [
|
|
47
|
-
/* @__PURE__ */ e(
|
|
48
|
-
|
|
67
|
+
l !== void 0 ? /* @__PURE__ */ e(
|
|
68
|
+
_,
|
|
49
69
|
{
|
|
50
70
|
sx: {
|
|
51
71
|
width: 10,
|
|
52
72
|
height: 10,
|
|
53
|
-
backgroundColor:
|
|
73
|
+
backgroundColor: a.color,
|
|
54
74
|
marginRight: 8,
|
|
55
|
-
...
|
|
75
|
+
...l
|
|
56
76
|
}
|
|
57
77
|
}
|
|
78
|
+
) : /* @__PURE__ */ e(
|
|
79
|
+
"svg",
|
|
80
|
+
{
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
height: 14,
|
|
83
|
+
style: { marginRight: 8, flexShrink: 0 },
|
|
84
|
+
viewBox: "-6 -6 12 12",
|
|
85
|
+
width: 14,
|
|
86
|
+
children: /* @__PURE__ */ e(
|
|
87
|
+
"path",
|
|
88
|
+
{
|
|
89
|
+
d: z[N(u)],
|
|
90
|
+
fill: a.color,
|
|
91
|
+
stroke: a.color,
|
|
92
|
+
strokeWidth: 1
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
}
|
|
58
96
|
),
|
|
59
|
-
/* @__PURE__ */ e(
|
|
97
|
+
/* @__PURE__ */ e(Bt, { customLegendVariant: r, label: d })
|
|
60
98
|
]
|
|
61
99
|
},
|
|
62
|
-
|
|
100
|
+
u
|
|
63
101
|
) : null;
|
|
64
102
|
}),
|
|
65
|
-
t !== void 0 && /* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */ e(
|
|
67
|
-
/* @__PURE__ */
|
|
103
|
+
t !== void 0 && /* @__PURE__ */ i(W, { sx: { alignItems: "center", flexDirection: "row" }, children: [
|
|
104
|
+
/* @__PURE__ */ e(s, { bold: !0, sx: { marginRight: 8 }, variant: c, children: "– –" }),
|
|
105
|
+
/* @__PURE__ */ i(s, { variant: c, children: [
|
|
68
106
|
h || m.average,
|
|
69
107
|
" "
|
|
70
108
|
] }),
|
|
71
|
-
/* @__PURE__ */ e(
|
|
109
|
+
/* @__PURE__ */ e(s, { bold: !0, variant: c, children: f ? p(t, f) : t })
|
|
72
110
|
] })
|
|
73
111
|
] });
|
|
74
|
-
},
|
|
112
|
+
}, Et = At(Pt), It = (t) => /* @__PURE__ */ i(E, { children: [
|
|
75
113
|
/* @__PURE__ */ e("clipPath", { id: t.id, children: /* @__PURE__ */ e("rect", { height: t.height, width: t.width, x: "0", y: "0" }) }),
|
|
76
114
|
/* @__PURE__ */ e("g", { children: /* @__PURE__ */ e(
|
|
77
115
|
"path",
|
|
@@ -88,19 +126,19 @@ const Tt = ({
|
|
|
88
126
|
}
|
|
89
127
|
}
|
|
90
128
|
) })
|
|
91
|
-
] }),
|
|
92
|
-
const r =
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
|
|
129
|
+
] }), $t = (t) => {
|
|
130
|
+
const r = j(), l = t.showLabel, o = t.style, L = o?.markLabelStyles, x = Number(t.x), h = Number(t.y), f = t.handlers?.onMarkClick, m = t.handlers?.onMouseEnter, c = t.handlers?.onMouseLeave, a = Tt(r.breakpoints.up("sm")), u = t.valueFormatterString ? p(t.yData[t.dataIndex], t.valueFormatterString) : String(t.yData[t.dataIndex]), d = a ? r.typography.Small?.fontSize : r.typography.XSmall?.fontSize, A = 30, D = 24, T = x - A / 2, R = h - 30;
|
|
131
|
+
return /* @__PURE__ */ i(E, { children: [
|
|
132
|
+
l && /* @__PURE__ */ i(E, { children: [
|
|
95
133
|
t.labelBackgroundColor && /* @__PURE__ */ e(
|
|
96
134
|
"rect",
|
|
97
135
|
{
|
|
98
136
|
fill: t.labelBackgroundColor,
|
|
99
|
-
height:
|
|
137
|
+
height: D,
|
|
100
138
|
rx: "3",
|
|
101
|
-
width:
|
|
102
|
-
x:
|
|
103
|
-
y:
|
|
139
|
+
width: A,
|
|
140
|
+
x: T,
|
|
141
|
+
y: R
|
|
104
142
|
}
|
|
105
143
|
),
|
|
106
144
|
/* @__PURE__ */ e(
|
|
@@ -111,23 +149,23 @@ const Tt = ({
|
|
|
111
149
|
fill: t.labelFontColor ? t.labelFontColor : r.palette.text.primary,
|
|
112
150
|
style: {
|
|
113
151
|
fontSize: t.labelFontSize ? t.labelFontSize : d,
|
|
114
|
-
...
|
|
152
|
+
...L
|
|
115
153
|
},
|
|
116
154
|
textAnchor: "middle",
|
|
117
155
|
x,
|
|
118
|
-
y: h - 28 +
|
|
119
|
-
children:
|
|
156
|
+
y: h - 28 + D / 2,
|
|
157
|
+
children: u
|
|
120
158
|
}
|
|
121
159
|
)
|
|
122
160
|
] }),
|
|
123
161
|
t.showMark && /* @__PURE__ */ e(
|
|
124
162
|
"path",
|
|
125
163
|
{
|
|
126
|
-
cursor:
|
|
127
|
-
d:
|
|
164
|
+
cursor: f ? "pointer" : "unset",
|
|
165
|
+
d: z[t.shape ?? "circle"],
|
|
128
166
|
height: "20px",
|
|
129
|
-
onClick: (
|
|
130
|
-
|
|
167
|
+
onClick: (I) => {
|
|
168
|
+
f?.(I, t.dataIndex);
|
|
131
169
|
},
|
|
132
170
|
onMouseEnter: () => {
|
|
133
171
|
m?.(t.dataIndex);
|
|
@@ -148,19 +186,19 @@ const Tt = ({
|
|
|
148
186
|
)
|
|
149
187
|
] });
|
|
150
188
|
};
|
|
151
|
-
function
|
|
189
|
+
function Ht({
|
|
152
190
|
customLabels: t,
|
|
153
191
|
labels: r = [],
|
|
154
|
-
series:
|
|
192
|
+
series: l,
|
|
155
193
|
valueFormatterString: o = "0,0"
|
|
156
194
|
}) {
|
|
157
|
-
const
|
|
195
|
+
const L = kt(), x = j(), h = L?.[0];
|
|
158
196
|
if (!h) return null;
|
|
159
|
-
const { axisValue:
|
|
197
|
+
const { axisValue: f, dataIndex: m = 0 } = h;
|
|
160
198
|
if (t) {
|
|
161
|
-
const c = t[m]?.[0]?.header || String(
|
|
162
|
-
return /* @__PURE__ */
|
|
163
|
-
|
|
199
|
+
const c = t[m]?.[0]?.header || String(f);
|
|
200
|
+
return /* @__PURE__ */ i(
|
|
201
|
+
b,
|
|
164
202
|
{
|
|
165
203
|
sx: {
|
|
166
204
|
backgroundColor: x.palette.background.paper,
|
|
@@ -174,8 +212,8 @@ function $t({
|
|
|
174
212
|
py: 12
|
|
175
213
|
},
|
|
176
214
|
children: [
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
|
|
215
|
+
/* @__PURE__ */ i(
|
|
216
|
+
b,
|
|
179
217
|
{
|
|
180
218
|
sx: {
|
|
181
219
|
flexDirection: "row",
|
|
@@ -186,15 +224,15 @@ function $t({
|
|
|
186
224
|
marginTop: 4
|
|
187
225
|
},
|
|
188
226
|
children: [
|
|
189
|
-
/* @__PURE__ */ e(
|
|
190
|
-
/* @__PURE__ */ e(
|
|
227
|
+
/* @__PURE__ */ e(s, { variant: "H3", children: c }),
|
|
228
|
+
/* @__PURE__ */ e(s, { bold: !0, variant: "H3", children: p(l[0]?.data[m], o) })
|
|
191
229
|
]
|
|
192
230
|
}
|
|
193
231
|
),
|
|
194
|
-
t[m]?.some((
|
|
195
|
-
const
|
|
196
|
-
return d === 0 ? null : /* @__PURE__ */
|
|
197
|
-
|
|
232
|
+
t[m]?.some((a) => (typeof a == "string" ? 0 : a.amount) !== 0) ? t[m]?.map((a) => {
|
|
233
|
+
const u = typeof a == "string" ? a : a.label, d = typeof a == "string" ? 0 : a.amount;
|
|
234
|
+
return d === 0 ? null : /* @__PURE__ */ i(
|
|
235
|
+
b,
|
|
198
236
|
{
|
|
199
237
|
sx: {
|
|
200
238
|
flexDirection: "row",
|
|
@@ -205,8 +243,8 @@ function $t({
|
|
|
205
243
|
marginTop: 4
|
|
206
244
|
},
|
|
207
245
|
children: [
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
|
|
246
|
+
/* @__PURE__ */ i(
|
|
247
|
+
b,
|
|
210
248
|
{
|
|
211
249
|
sx: {
|
|
212
250
|
flexDirection: "row",
|
|
@@ -217,32 +255,32 @@ function $t({
|
|
|
217
255
|
},
|
|
218
256
|
children: [
|
|
219
257
|
/* @__PURE__ */ e(
|
|
220
|
-
|
|
258
|
+
Rt,
|
|
221
259
|
{
|
|
222
260
|
sx: {
|
|
223
261
|
width: "12px",
|
|
224
262
|
height: "12px",
|
|
225
|
-
backgroundColor:
|
|
263
|
+
backgroundColor: l[0]?.color,
|
|
226
264
|
borderRadius: "4px"
|
|
227
265
|
}
|
|
228
266
|
}
|
|
229
267
|
),
|
|
230
|
-
/* @__PURE__ */ e(
|
|
268
|
+
/* @__PURE__ */ e(s, { variant: "Body", children: u })
|
|
231
269
|
]
|
|
232
270
|
}
|
|
233
271
|
),
|
|
234
|
-
/* @__PURE__ */ e(
|
|
272
|
+
/* @__PURE__ */ e(s, { bold: !0, variant: "Body", children: p(Math.abs(d), o) })
|
|
235
273
|
]
|
|
236
274
|
},
|
|
237
|
-
|
|
275
|
+
u
|
|
238
276
|
);
|
|
239
|
-
}) : /* @__PURE__ */ e(
|
|
277
|
+
}) : /* @__PURE__ */ e(s, { variant: "Body", children: "No data" })
|
|
240
278
|
]
|
|
241
279
|
}
|
|
242
280
|
);
|
|
243
281
|
}
|
|
244
|
-
return /* @__PURE__ */
|
|
245
|
-
|
|
282
|
+
return /* @__PURE__ */ i(
|
|
283
|
+
b,
|
|
246
284
|
{
|
|
247
285
|
sx: {
|
|
248
286
|
backgroundColor: x.palette.background.paper,
|
|
@@ -256,9 +294,9 @@ function $t({
|
|
|
256
294
|
py: 12
|
|
257
295
|
},
|
|
258
296
|
children: [
|
|
259
|
-
/* @__PURE__ */ e(
|
|
260
|
-
|
|
261
|
-
|
|
297
|
+
/* @__PURE__ */ e(s, { variant: "H3", children: String(f) }),
|
|
298
|
+
l.map((c, a) => /* @__PURE__ */ i(
|
|
299
|
+
b,
|
|
262
300
|
{
|
|
263
301
|
sx: {
|
|
264
302
|
flexDirection: "row",
|
|
@@ -269,21 +307,11 @@ function $t({
|
|
|
269
307
|
marginTop: 4
|
|
270
308
|
},
|
|
271
309
|
children: [
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
/* @__PURE__ */ e(
|
|
274
|
-
|
|
275
|
-
{
|
|
276
|
-
sx: {
|
|
277
|
-
width: "12px",
|
|
278
|
-
height: "12px",
|
|
279
|
-
backgroundColor: c.color,
|
|
280
|
-
borderRadius: "4px"
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
),
|
|
284
|
-
/* @__PURE__ */ e(l, { variant: "Body", children: typeof r[i] == "string" ? r[i] : r[i]?.label })
|
|
310
|
+
/* @__PURE__ */ i(b, { sx: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
|
|
311
|
+
/* @__PURE__ */ e("svg", { "aria-hidden": "true", height: 12, viewBox: "-6 -6 12 12", width: 12, children: /* @__PURE__ */ e("path", { d: z[N(a)], fill: c.color }) }),
|
|
312
|
+
/* @__PURE__ */ e(s, { variant: "Body", children: typeof r[a] == "string" ? r[a] : r[a]?.label })
|
|
285
313
|
] }),
|
|
286
|
-
/* @__PURE__ */ e(
|
|
314
|
+
/* @__PURE__ */ e(s, { bold: !0, variant: "Body", children: p(c.data[m], o) })
|
|
287
315
|
]
|
|
288
316
|
},
|
|
289
317
|
c.id
|
|
@@ -292,82 +320,83 @@ function $t({
|
|
|
292
320
|
}
|
|
293
321
|
);
|
|
294
322
|
}
|
|
295
|
-
const
|
|
323
|
+
const ne = ({
|
|
296
324
|
areaColor: t,
|
|
297
325
|
axisColor: r,
|
|
298
|
-
baseline:
|
|
326
|
+
baseline: l = "max",
|
|
299
327
|
chartFor: o,
|
|
300
|
-
chartXaxisSx:
|
|
328
|
+
chartXaxisSx: L,
|
|
301
329
|
chartYaxisSx: x,
|
|
302
330
|
colors: h,
|
|
303
|
-
curveType:
|
|
331
|
+
curveType: f = "linear",
|
|
304
332
|
customLegendVariant: m,
|
|
305
333
|
customLegendSx: c,
|
|
306
|
-
customLegendBoxSx:
|
|
307
|
-
customTooltipLabels:
|
|
334
|
+
customLegendBoxSx: a,
|
|
335
|
+
customTooltipLabels: u,
|
|
308
336
|
datasets: d,
|
|
309
|
-
height:
|
|
310
|
-
isGraphClippingXAxis:
|
|
311
|
-
labels:
|
|
312
|
-
labelBackgroundColor:
|
|
313
|
-
labelFontColor:
|
|
314
|
-
labelFontSize:
|
|
315
|
-
margin:
|
|
316
|
-
markHandlers:
|
|
317
|
-
markStyles:
|
|
318
|
-
minRange:
|
|
319
|
-
maxRange:
|
|
320
|
-
onItemClick:
|
|
321
|
-
peerAverage:
|
|
322
|
-
showArea:
|
|
323
|
-
showAverage:
|
|
324
|
-
showAxisHighlight:
|
|
325
|
-
showBars:
|
|
326
|
-
showLegend:
|
|
327
|
-
showMark:
|
|
328
|
-
showMarkLabel:
|
|
329
|
-
showTooltip:
|
|
330
|
-
showXAxis:
|
|
331
|
-
showXAxisTicks:
|
|
332
|
-
showYAxis:
|
|
333
|
-
showYAxisTicks:
|
|
334
|
-
title:
|
|
335
|
-
useCustomMark:
|
|
337
|
+
height: A,
|
|
338
|
+
isGraphClippingXAxis: D = !1,
|
|
339
|
+
labels: T,
|
|
340
|
+
labelBackgroundColor: R,
|
|
341
|
+
labelFontColor: I,
|
|
342
|
+
labelFontSize: U,
|
|
343
|
+
margin: Y,
|
|
344
|
+
markHandlers: K,
|
|
345
|
+
markStyles: Q,
|
|
346
|
+
minRange: V,
|
|
347
|
+
maxRange: J,
|
|
348
|
+
onItemClick: $,
|
|
349
|
+
peerAverage: Z,
|
|
350
|
+
showArea: G = !1,
|
|
351
|
+
showAverage: q = !1,
|
|
352
|
+
showAxisHighlight: tt = !1,
|
|
353
|
+
showBars: H = !1,
|
|
354
|
+
showLegend: et = !1,
|
|
355
|
+
showMark: nt = !0,
|
|
356
|
+
showMarkLabel: rt = !1,
|
|
357
|
+
showTooltip: at = !1,
|
|
358
|
+
showXAxis: it = !1,
|
|
359
|
+
showXAxisTicks: ot = !1,
|
|
360
|
+
showYAxis: lt = !1,
|
|
361
|
+
showYAxisTicks: st = !1,
|
|
362
|
+
title: ct,
|
|
363
|
+
useCustomMark: dt = !1,
|
|
336
364
|
valueFormatterString: k,
|
|
337
|
-
width:
|
|
338
|
-
xAxisScaleType:
|
|
365
|
+
width: ht,
|
|
366
|
+
xAxisScaleType: mt
|
|
339
367
|
}) => {
|
|
340
|
-
const
|
|
341
|
-
type:
|
|
342
|
-
curve:
|
|
343
|
-
color:
|
|
344
|
-
data: n.map((
|
|
345
|
-
area:
|
|
346
|
-
baseline:
|
|
368
|
+
const g = j(), ut = d.flat().map((n) => n.x), w = d.flat().map((n) => n.y), F = Z || Math.round(w.reduce((n, M) => M + n, 0) / w.length), S = Math.floor(Math.min(...w) / 100) * 100, C = Math.ceil(Math.max(...w) / 100) * 100, B = d.map((n, M) => ({
|
|
369
|
+
type: H ? "bar" : "line",
|
|
370
|
+
curve: f,
|
|
371
|
+
color: H ? g.palette.chart?.chart6 : h[M] ?? g.palette.primary.main,
|
|
372
|
+
data: n.map((y) => y.y),
|
|
373
|
+
area: G,
|
|
374
|
+
baseline: l,
|
|
347
375
|
showMark: !0,
|
|
348
|
-
|
|
349
|
-
|
|
376
|
+
shape: N(M),
|
|
377
|
+
valueFormatter: (y) => k ? p(y || 0, k) : String(y)
|
|
378
|
+
})), ft = {
|
|
350
379
|
...{
|
|
351
380
|
top: 60,
|
|
352
381
|
right: 35,
|
|
353
382
|
bottom: 25,
|
|
354
383
|
left: -10
|
|
355
384
|
},
|
|
356
|
-
...
|
|
385
|
+
...Y
|
|
357
386
|
};
|
|
358
|
-
let
|
|
387
|
+
let v = V ?? S, P = J ?? C;
|
|
359
388
|
if (o === "networthChart") {
|
|
360
|
-
const n =
|
|
361
|
-
|
|
389
|
+
const n = C - S, M = n < C * 0.05 ? 0.25 : 0.2, y = Math.max(n * M, C * 0.015);
|
|
390
|
+
v = S - y < 0 ? S : S - y, P = C + y;
|
|
362
391
|
}
|
|
363
|
-
const
|
|
392
|
+
const xt = () => {
|
|
364
393
|
if (o === "creditOverTime")
|
|
365
|
-
return
|
|
394
|
+
return O(v, 850, 5);
|
|
366
395
|
if (o === "networthChart")
|
|
367
|
-
return
|
|
396
|
+
return O(v, P, 5);
|
|
368
397
|
};
|
|
369
|
-
return /* @__PURE__ */
|
|
370
|
-
|
|
398
|
+
return /* @__PURE__ */ i(
|
|
399
|
+
_,
|
|
371
400
|
{
|
|
372
401
|
sx: {
|
|
373
402
|
position: "relative",
|
|
@@ -385,12 +414,12 @@ const _t = ({
|
|
|
385
414
|
}
|
|
386
415
|
},
|
|
387
416
|
children: [
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
417
|
+
/* @__PURE__ */ i(
|
|
418
|
+
yt,
|
|
390
419
|
{
|
|
391
|
-
height:
|
|
392
|
-
margin:
|
|
393
|
-
series:
|
|
420
|
+
height: A,
|
|
421
|
+
margin: ft,
|
|
422
|
+
series: B,
|
|
394
423
|
sx: {
|
|
395
424
|
"& .MuiBarLabel-root": {
|
|
396
425
|
fontSize: 10,
|
|
@@ -400,26 +429,26 @@ const _t = ({
|
|
|
400
429
|
opacity: 0.15
|
|
401
430
|
},
|
|
402
431
|
"& .MuiChartsAxis-tickLabel > tspan": {
|
|
403
|
-
fontFamily:
|
|
432
|
+
fontFamily: g.typography.Small.fontFamily
|
|
404
433
|
},
|
|
405
434
|
"& .MuiLineChart-markLabel": {
|
|
406
|
-
fontFamily:
|
|
435
|
+
fontFamily: g.typography.Small.fontFamily
|
|
407
436
|
}
|
|
408
437
|
},
|
|
409
|
-
width:
|
|
410
|
-
xAxis: [{ data:
|
|
438
|
+
width: ht,
|
|
439
|
+
xAxis: [{ data: ut, scaleType: mt || (H ? "band" : "point") }],
|
|
411
440
|
yAxis: [
|
|
412
441
|
{
|
|
413
|
-
tickInterval:
|
|
414
|
-
min:
|
|
415
|
-
max:
|
|
416
|
-
colorMap:
|
|
442
|
+
tickInterval: xt(),
|
|
443
|
+
min: D ? -22 : v,
|
|
444
|
+
max: P || 100,
|
|
445
|
+
colorMap: G && B.length < 2 ? {
|
|
417
446
|
type: "continuous",
|
|
418
|
-
min:
|
|
419
|
-
max:
|
|
447
|
+
min: v,
|
|
448
|
+
max: P,
|
|
420
449
|
color: [
|
|
421
|
-
|
|
422
|
-
h[0] ??
|
|
450
|
+
g.palette.background.paper,
|
|
451
|
+
h[0] ?? g.palette.primary.main
|
|
423
452
|
]
|
|
424
453
|
} : void 0,
|
|
425
454
|
valueFormatter: (n) => k ? p(n, k) : String(n),
|
|
@@ -427,25 +456,25 @@ const _t = ({
|
|
|
427
456
|
}
|
|
428
457
|
],
|
|
429
458
|
children: [
|
|
430
|
-
|
|
431
|
-
|
|
459
|
+
q && /* @__PURE__ */ e(
|
|
460
|
+
Lt,
|
|
432
461
|
{
|
|
433
462
|
lineStyle: {
|
|
434
|
-
stroke:
|
|
463
|
+
stroke: R ? g.palette.neutral.main : g.palette.neutral.dark,
|
|
435
464
|
strokeDasharray: "10, 8",
|
|
436
465
|
strokeWidth: 2
|
|
437
466
|
},
|
|
438
|
-
y:
|
|
467
|
+
y: F
|
|
439
468
|
}
|
|
440
469
|
),
|
|
441
470
|
/* @__PURE__ */ e(
|
|
442
|
-
|
|
471
|
+
St,
|
|
443
472
|
{
|
|
444
|
-
onItemClick:
|
|
473
|
+
onItemClick: $,
|
|
445
474
|
...t && {
|
|
446
475
|
slots: {
|
|
447
|
-
area: (n) => /* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */
|
|
476
|
+
area: (n) => /* @__PURE__ */ i("g", { children: [
|
|
477
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ i("linearGradient", { id: "customGradient", x1: "0", x2: "0", y1: "0", y2: "1", children: [
|
|
449
478
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: t }),
|
|
450
479
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: t, stopOpacity: 0.02 })
|
|
451
480
|
] }) }),
|
|
@@ -456,37 +485,37 @@ const _t = ({
|
|
|
456
485
|
}
|
|
457
486
|
),
|
|
458
487
|
/* @__PURE__ */ e(
|
|
459
|
-
|
|
488
|
+
Ct,
|
|
460
489
|
{
|
|
461
|
-
onItemClick:
|
|
490
|
+
onItemClick: $,
|
|
462
491
|
slots: {
|
|
463
492
|
line: (n) => /* @__PURE__ */ e(
|
|
464
493
|
It,
|
|
465
494
|
{
|
|
466
495
|
...n,
|
|
467
|
-
lineColor: t ?? n.ownerState.color ??
|
|
496
|
+
lineColor: t ?? n.ownerState.color ?? g.palette.primary.main
|
|
468
497
|
}
|
|
469
498
|
)
|
|
470
499
|
}
|
|
471
500
|
}
|
|
472
501
|
),
|
|
473
502
|
/* @__PURE__ */ e(
|
|
474
|
-
|
|
503
|
+
vt,
|
|
475
504
|
{
|
|
476
|
-
onItemClick:
|
|
477
|
-
slots:
|
|
505
|
+
onItemClick: $,
|
|
506
|
+
slots: dt ? {
|
|
478
507
|
mark: (n) => /* @__PURE__ */ e(
|
|
479
|
-
|
|
508
|
+
$t,
|
|
480
509
|
{
|
|
481
|
-
handlers:
|
|
482
|
-
labelBackgroundColor:
|
|
483
|
-
labelFontColor:
|
|
484
|
-
labelFontSize:
|
|
485
|
-
showLabel:
|
|
486
|
-
showMark:
|
|
487
|
-
style:
|
|
510
|
+
handlers: K,
|
|
511
|
+
labelBackgroundColor: R,
|
|
512
|
+
labelFontColor: I,
|
|
513
|
+
labelFontSize: U,
|
|
514
|
+
showLabel: rt,
|
|
515
|
+
showMark: nt || n.dataIndex === d[0].length - 1,
|
|
516
|
+
style: Q?.(n.dataIndex) ?? {},
|
|
488
517
|
valueFormatterString: k,
|
|
489
|
-
yData:
|
|
518
|
+
yData: w,
|
|
490
519
|
...n
|
|
491
520
|
}
|
|
492
521
|
)
|
|
@@ -494,17 +523,17 @@ const _t = ({
|
|
|
494
523
|
}
|
|
495
524
|
),
|
|
496
525
|
/* @__PURE__ */ e(
|
|
497
|
-
|
|
526
|
+
gt,
|
|
498
527
|
{
|
|
499
528
|
barLabel: (n) => Number(n.value) > 0 ? `$${n.value}` : null,
|
|
500
529
|
borderRadius: 10
|
|
501
530
|
}
|
|
502
531
|
),
|
|
503
532
|
/* @__PURE__ */ e(
|
|
504
|
-
|
|
533
|
+
Mt,
|
|
505
534
|
{
|
|
506
|
-
disableLine: !
|
|
507
|
-
disableTicks: !
|
|
535
|
+
disableLine: !it,
|
|
536
|
+
disableTicks: !ot,
|
|
508
537
|
slotProps: r ? {
|
|
509
538
|
axisLine: {
|
|
510
539
|
style: {
|
|
@@ -517,14 +546,14 @@ const _t = ({
|
|
|
517
546
|
}
|
|
518
547
|
}
|
|
519
548
|
} : {},
|
|
520
|
-
sx: { ...
|
|
549
|
+
sx: { ...L }
|
|
521
550
|
}
|
|
522
551
|
),
|
|
523
552
|
/* @__PURE__ */ e(
|
|
524
|
-
|
|
553
|
+
wt,
|
|
525
554
|
{
|
|
526
|
-
disableLine: !
|
|
527
|
-
disableTicks: !
|
|
555
|
+
disableLine: !lt,
|
|
556
|
+
disableTicks: !st,
|
|
528
557
|
slotProps: r ? {
|
|
529
558
|
axisLine: {
|
|
530
559
|
style: {
|
|
@@ -540,34 +569,34 @@ const _t = ({
|
|
|
540
569
|
sx: { ...x }
|
|
541
570
|
}
|
|
542
571
|
),
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
572
|
+
tt && /* @__PURE__ */ e(pt, { x: "line" }),
|
|
573
|
+
at && /* @__PURE__ */ e(bt, { trigger: "axis", children: /* @__PURE__ */ e(
|
|
574
|
+
Ht,
|
|
546
575
|
{
|
|
547
|
-
customLabels:
|
|
548
|
-
labels:
|
|
549
|
-
series:
|
|
576
|
+
customLabels: u,
|
|
577
|
+
labels: T,
|
|
578
|
+
series: B,
|
|
550
579
|
valueFormatterString: k
|
|
551
580
|
}
|
|
552
581
|
) })
|
|
553
582
|
]
|
|
554
583
|
}
|
|
555
584
|
),
|
|
556
|
-
|
|
557
|
-
|
|
585
|
+
et && /* @__PURE__ */ e(
|
|
586
|
+
Et,
|
|
558
587
|
{
|
|
559
|
-
average:
|
|
560
|
-
customLegendBoxSx:
|
|
588
|
+
average: q ? F : void 0,
|
|
589
|
+
customLegendBoxSx: a,
|
|
561
590
|
customLegendVariant: m,
|
|
562
|
-
labels:
|
|
563
|
-
series:
|
|
591
|
+
labels: T,
|
|
592
|
+
series: B,
|
|
564
593
|
style: {
|
|
565
594
|
position: "absolute",
|
|
566
595
|
top: 16,
|
|
567
596
|
left: 16,
|
|
568
597
|
...c
|
|
569
598
|
},
|
|
570
|
-
title:
|
|
599
|
+
title: ct,
|
|
571
600
|
valueFormatterString: k
|
|
572
601
|
}
|
|
573
602
|
)
|
|
@@ -576,5 +605,5 @@ const _t = ({
|
|
|
576
605
|
);
|
|
577
606
|
};
|
|
578
607
|
export {
|
|
579
|
-
|
|
608
|
+
ne as L
|
|
580
609
|
};
|
|
@@ -11,7 +11,7 @@ import B from "@mui/material/ListSubheader";
|
|
|
11
11
|
import W from "@mui/system/Stack";
|
|
12
12
|
import { useTheme as M1, alpha as y1 } from "@mui/material/styles";
|
|
13
13
|
import { u as R, A as x1 } from "../AccountDetailsHeader-DCTCLB3K.mjs";
|
|
14
|
-
import { L as w1 } from "../LineChart-
|
|
14
|
+
import { L as w1 } from "../LineChart-DVn1AamK.mjs";
|
|
15
15
|
import { g as b1, a as S1, b as R1 } from "../SpendingData-Bz1bCWAs.mjs";
|
|
16
16
|
import { m as T1, u as y, d as k, g as I, h as m1, b as G, a as E1 } from "../hooks-zu7yblbi.mjs";
|
|
17
17
|
import { A as N, g as L, N as p1 } from "../Account-BiB1F8lL.mjs";
|
package/dist/common/index.es.js
CHANGED
|
@@ -67,7 +67,7 @@ import { startOfToday as D } from "date-fns/startOfToday";
|
|
|
67
67
|
import { f as rt, a as ot, b as A } from "../BudgetUtil-QbRXtLKn.mjs";
|
|
68
68
|
import { g as _o, e as fo, c as mo, d as yo, i as So } from "../BudgetUtil-QbRXtLKn.mjs";
|
|
69
69
|
import { D as at } from "../DebtsStore-BZqNLaqd.mjs";
|
|
70
|
-
import { F as it } from "../FinstrongStore-
|
|
70
|
+
import { F as it } from "../FinstrongStore-BQxXxxYD.mjs";
|
|
71
71
|
import { A as nt, m as ct, a as ut, b as dt } from "../InvestmentUtil-BItV7uEs.mjs";
|
|
72
72
|
import { M as lt } from "../MerchantStore-BzGi4JAZ.mjs";
|
|
73
73
|
import { N as ht } from "../NetWorthStore-DP78lgZ0.mjs";
|
|
@@ -5,8 +5,8 @@ import { useTheme as z, alpha as ce } from "@mui/material/styles";
|
|
|
5
5
|
import { PieChart as tn } from "@mui/x-charts/PieChart";
|
|
6
6
|
import { P as D, H3 as X, Text as I, InstitutionLogo as pt, H2 as Fe, MerchantLogo as nn, Icon as on } from "@mxenabled/mxui";
|
|
7
7
|
import { TrendingUp as rn, ArrowRightAlt as an, TrendingDown as sn, AccountBalance as _t, ChevronRight as Z, CheckCircle as cn, Cancel as ln, CreditCard as ut, Savings as dn, ContentCopy as pn, MultilineChart as _n, Add as ht, Cardiology as un, Payments as hn, CalendarMonth as mn, ExpandMore as gn } from "@mxenabled/mx-icons";
|
|
8
|
-
import { g as yn, a as bn, r as et, b as fn, c as Ne, d as mt, C as ke, e as Me, f as xn, h as Sn, i as Cn, j as gt, k as tt, l as vn, m as nt, n as wn, o as yt, p as kn, q as bt, s as Oe, t as ft, u as Mn, v as xt, w as Dn, A as oe, x as In, P as Tn } from "../FinstrongStore-
|
|
9
|
-
import { y as Ci, F as vi } from "../FinstrongStore-
|
|
8
|
+
import { g as yn, a as bn, r as et, b as fn, c as Ne, d as mt, C as ke, e as Me, f as xn, h as Sn, i as Cn, j as gt, k as tt, l as vn, m as nt, n as wn, o as yt, p as kn, q as bt, s as Oe, t as ft, u as Mn, v as xt, w as Dn, A as oe, x as In, P as Tn } from "../FinstrongStore-BQxXxxYD.mjs";
|
|
9
|
+
import { y as Ci, F as vi } from "../FinstrongStore-BQxXxxYD.mjs";
|
|
10
10
|
import * as ot from "d3";
|
|
11
11
|
import { observer as k } from "mobx-react-lite";
|
|
12
12
|
import { u as v, b as J, a as je, o as ee, y as L, p as An, d as Se, m as Ke, f as On, j as Ve, h as Rn, i as Ln } from "../hooks-zu7yblbi.mjs";
|
|
@@ -14,7 +14,7 @@ import { L as U } from "../Loader-D3rjKx72.mjs";
|
|
|
14
14
|
import h, { useState as Fn, useRef as Bn, useCallback as rt, useEffect as at } from "react";
|
|
15
15
|
import P from "@mui/material/Button";
|
|
16
16
|
import Y from "@mui/material/Card";
|
|
17
|
-
import { L as Xe } from "../LineChart-
|
|
17
|
+
import { L as Xe } from "../LineChart-DVn1AamK.mjs";
|
|
18
18
|
import { C as St } from "../ConnectionsDrawer-c7HaKeRj.mjs";
|
|
19
19
|
import { C as ae } from "../ConnectDrawer-CVt-8rPJ.mjs";
|
|
20
20
|
import le from "@mui/material/Tab";
|
|
@@ -1709,7 +1709,7 @@ const zo = ({ total: t }) => {
|
|
|
1709
1709
|
totalMain: d
|
|
1710
1710
|
}) => {
|
|
1711
1711
|
const p = z(), u = qn(p.breakpoints.down("xs")), m = h.useMemo(
|
|
1712
|
-
() => o.sort((g, y) => g.month - y.month).map((g) => {
|
|
1712
|
+
() => o.sort((g, y) => g.year !== y.year ? g.year - y.year : g.month - y.month).map((g) => {
|
|
1713
1713
|
const y = Mn(g.month), A = {
|
|
1714
1714
|
spending_vs_income: {
|
|
1715
1715
|
main: g.standard_spend,
|
|
@@ -3,7 +3,7 @@ import { fromUnixTime as oe } from "date-fns/fromUnixTime";
|
|
|
3
3
|
import { observer as S } from "mobx-react-lite";
|
|
4
4
|
import ie from "@mui/material/Stack/Stack";
|
|
5
5
|
import { useTheme as j } from "@mui/material/styles";
|
|
6
|
-
import { L as ae } from "../LineChart-
|
|
6
|
+
import { L as ae } from "../LineChart-DVn1AamK.mjs";
|
|
7
7
|
import { p as se, q as R, u as N, g as z, d as ce, b as Y } from "../hooks-zu7yblbi.mjs";
|
|
8
8
|
import { u as q } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
9
9
|
import { f as le, D as me } from "../DateFormats-BMpMrZpW.mjs";
|
package/dist/trends/index.es.js
CHANGED
|
@@ -41,7 +41,7 @@ import { D as We } from "../Drawer-DV4NTsFg.mjs";
|
|
|
41
41
|
import { u as Ie } from "../useWidgetLoadTimer-Bmgv_UeH.mjs";
|
|
42
42
|
import { L as Le } from "../Loader-D3rjKx72.mjs";
|
|
43
43
|
import { W as dt } from "../WidgetContainer-DSs6lJbr.mjs";
|
|
44
|
-
import { L as Be } from "../LineChart-
|
|
44
|
+
import { L as Be } from "../LineChart-DVn1AamK.mjs";
|
|
45
45
|
import { M as Xt } from "../MiniWidgetContainer-DhEx4qKi.mjs";
|
|
46
46
|
import { subMonths as Zt } from "date-fns";
|
|
47
47
|
import { TrendingUp as Qt, TrendingDown as qt, MultilineChart as Jt, ExpandLess as eo, ExpandMore as to, ArrowBack as oo } from "@mxenabled/mx-icons";
|