@mx-cartographer/experiences 7.1.3-alpha.mm1 → 7.1.4-ram1-alpha-finstrong-credit-score-graph-check

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.
Files changed (129) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{Account-DKy2na__.mjs → Account-CpRTVIHg.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CCOCsdoL.mjs → AccountDetailsContent-6aPMU6Hp.mjs} +10 -10
  4. package/dist/{AccountDetailsHeader-Ca9SPAjA.mjs → AccountDetailsHeader-BkUZYoV8.mjs} +8 -8
  5. package/dist/{AccountFields-DDAr5SEq.mjs → AccountFields-DOLjKu5l.mjs} +5 -5
  6. package/dist/{AccountListItem-CMes1Q7Z.mjs → AccountListItem-CTT5m4qx.mjs} +4 -4
  7. package/dist/{AccountStore-DYOG9MYj.mjs → AccountStore-DTfpr3h0.mjs} +60 -41
  8. package/dist/{Accounts-BNvFndCa.mjs → Accounts-D0BmvNxn.mjs} +1 -1
  9. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-D2Jcp-E-.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-DomNyubP.mjs} +3 -3
  11. package/dist/{CategoryStore-BCcpI3oJ.mjs → CategoryStore-C1IfDPCE.mjs} +1 -1
  12. package/dist/{CategoryUtil-BR3H5i6n.mjs → CategoryUtil-DUM8NuGO.mjs} +1 -1
  13. package/dist/{ConnectDrawer-CHG5Lv_B.mjs → ConnectDrawer--gJHyp-S.mjs} +9 -9
  14. package/dist/{ConnectionsDrawer-BeB6ab8V.mjs → ConnectionsDrawer-DabiwV9L.mjs} +3 -3
  15. package/dist/{CurrencyInput-CsCy7uaS.mjs → CurrencyInput-CC5cwVit.mjs} +1 -1
  16. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  17. package/dist/{DebtsStore-BblTVTMD.mjs → DebtsStore-9aR2sTJQ.mjs} +1 -1
  18. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  19. package/dist/Drawer-BEtCk82g.mjs +163 -0
  20. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-Um-CDa4C.mjs} +3 -3
  21. package/dist/FinstrongStore-CC4SrBjA.mjs +436 -0
  22. package/dist/{GoalStore-CSsU4LR2.mjs → GoalStore-CiBKZvTg.mjs} +3 -3
  23. package/dist/{Help-B6dIcujh.mjs → Help-BZ8pIkkR.mjs} +2 -2
  24. package/dist/LineChart-CE3oLBQ0.mjs +566 -0
  25. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-DGaxy7oz.mjs} +10 -10
  26. package/dist/{ManageIncome-DqG75uQd.mjs → ManageIncome-BaNgfwr5.mjs} +63 -61
  27. package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-C3iV1FBR.mjs} +1 -1
  28. package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-LtXXgZ6H.mjs} +1 -1
  29. package/dist/{NetWorthStore-BbA7H83o.mjs → NetWorthStore-MnpP5KEc.mjs} +2 -2
  30. package/dist/{NotificationSettings-BRm_EJZV.mjs → NotificationSettings-Ckx8tgQj.mjs} +5 -5
  31. package/dist/{OriginalBalanceAction-CAaVbVMO.mjs → OriginalBalanceAction-CGZDUsCc.mjs} +3 -3
  32. package/dist/{RecurringSettings-B9l_Axnd.mjs → RecurringSettings-DE4T4yQy.mjs} +4 -4
  33. package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-CngsRZ3K.mjs} +45 -44
  34. package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4RVULF8.mjs} +1 -1
  35. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
  36. package/dist/SpendingLegend-D24CEkL3.mjs +170 -0
  37. package/dist/{TransactionDetails-DPvvi4Iu.mjs → TransactionDetails-DRlrltGq.mjs} +11 -8
  38. package/dist/{TransactionStore-CBrJOY0H.mjs → TransactionStore-D8MKYDMb.mjs} +3 -3
  39. package/dist/{TrendsStore-DCYbpXPO.mjs → TrendsStore-DL3Vuh71.mjs} +14 -14
  40. package/dist/{User-BQUxBeZV.mjs → User-BthIKO4w.mjs} +2 -2
  41. package/dist/{WidgetContainer-BMWagbIl.mjs → WidgetContainer-DJA1bxLn.mjs} +12 -12
  42. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  43. package/dist/accounts/index.es.js +14 -14
  44. package/dist/accounts/stores/AccountStore.d.ts +4 -0
  45. package/dist/analytics/index.es.js +2 -2
  46. package/dist/budgets/index.es.js +12 -12
  47. package/dist/cashflow/index.es.js +383 -389
  48. package/dist/categories/index.es.js +2 -2
  49. package/dist/common/components/Select.d.ts +4 -2
  50. package/dist/common/components/charts/LineChart.d.ts +2 -0
  51. package/dist/common/components/charts/linechart/CustomMark.d.ts +2 -0
  52. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  53. package/dist/common/components/drawer/Footer.d.ts +17 -0
  54. package/dist/common/context/GlobalDataProvider.d.ts +0 -1
  55. package/dist/common/context/hooks.d.ts +0 -3
  56. package/dist/common/context/index.d.ts +1 -1
  57. package/dist/common/index.es.js +57 -58
  58. package/dist/common/types/Finstrong.d.ts +50 -0
  59. package/dist/common/types/index.d.ts +1 -1
  60. package/dist/common/types/localization/FinstrongCopy.d.ts +57 -1
  61. package/dist/dashboard/index.es.js +77 -79
  62. package/dist/debts/index.es.js +11 -11
  63. package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-XqdHNe2V.mjs} +2 -2
  64. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  65. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +2 -1
  66. package/dist/finstrong/components/CreditOverTimeGraph.d.ts +1 -0
  67. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  68. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  69. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  70. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  71. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  72. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  73. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  74. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +1 -1
  75. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  76. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  77. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  78. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  79. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  80. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  81. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  82. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  83. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  84. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  85. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  86. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  87. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  88. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  89. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  90. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  91. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  92. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +11 -0
  93. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  94. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  95. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  96. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  97. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  98. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  99. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  100. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  101. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  102. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  103. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  104. package/dist/finstrong/components/shared/TransactionList.d.ts +15 -0
  105. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  106. package/dist/finstrong/constants/index.d.ts +8 -0
  107. package/dist/finstrong/index.es.js +2899 -1017
  108. package/dist/finstrong/stores/FinstrongStore.d.ts +9 -1
  109. package/dist/finstrong/util/finstrongUtils.d.ts +65 -1
  110. package/dist/goals/index.es.js +54 -54
  111. package/dist/help/index.es.js +3 -3
  112. package/dist/hooks-CBST3rkm.mjs +74 -0
  113. package/dist/investments/index.es.js +4 -4
  114. package/dist/merchants/index.es.js +1 -1
  115. package/dist/networth/index.es.js +34 -34
  116. package/dist/notifications/index.es.js +4 -4
  117. package/dist/recurringtransactions/index.es.js +24 -24
  118. package/dist/settings/index.es.js +8 -8
  119. package/dist/spending/index.es.js +222 -373
  120. package/dist/transactions/index.es.js +15 -15
  121. package/dist/trends/index.es.js +451 -451
  122. package/dist/{useAccountDisplayName-BEorBm5u.mjs → useAccountDisplayName-DH1CuQ9R.mjs} +2 -2
  123. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-jdvS1ppf.mjs} +1 -1
  124. package/package.json +1 -1
  125. package/dist/Drawer-kEE73B87.mjs +0 -113
  126. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  127. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  128. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  129. package/dist/hooks-D6XlXHf4.mjs +0 -77
@@ -1,541 +0,0 @@
1
- import { jsxs as i, Fragment as B, jsx as e } from "react/jsx-runtime";
2
- import nt from "@mui/material/Box";
3
- import { useTheme as X } from "@mui/material/styles";
4
- import { ResponsiveChartContainer as at, ChartsReferenceLine as rt, AreaPlot as it, LinePlot as ot, MarkPlot as lt, BarPlot as st, ChartsXAxis as ct, ChartsYAxis as dt, ChartsAxisHighlight as ht } from "@mui/x-charts";
5
- import { f as b, c as mt } from "./NumberFormatting-Buh7u8Oi.mjs";
6
- import ut from "@mui/material/useMediaQuery";
7
- import { observer as xt } from "mobx-react-lite";
8
- import { Stack as u, Box as N, useTheme as ft } from "@mui/material";
9
- import { Text as l } from "@mxenabled/mxui";
10
- import { u as gt } from "./hooks-D6XlXHf4.mjs";
11
- import { ChartsTooltip as yt } from "@mui/x-charts/ChartsTooltip";
12
- const pt = (t) => {
13
- const r = X(), o = t.showLabel, s = t.style, y = Number(t.x), m = Number(t.y), x = t.handlers?.onMarkClick, f = t.handlers?.onMouseEnter, c = t.handlers?.onMouseLeave, d = ut(r.breakpoints.up("sm")), a = t.valueFormatterString ? b(t.yData[t.dataIndex], t.valueFormatterString) : String(t.yData[t.dataIndex]), h = d ? r.typography.Small?.fontSize : r.typography.XSmall?.fontSize, k = h ? parseFloat(h.toString()) * 0.6 : 8, D = a.length * k + 8 + 8, T = 24, $ = y - D / 2, M = m - 30;
14
- return /* @__PURE__ */ i(B, { children: [
15
- o && /* @__PURE__ */ i(B, { children: [
16
- t.labelBackgroundColor && /* @__PURE__ */ e(
17
- "rect",
18
- {
19
- fill: t.labelBackgroundColor,
20
- height: T,
21
- rx: "3",
22
- width: D,
23
- x: $,
24
- y: M
25
- }
26
- ),
27
- /* @__PURE__ */ e(
28
- "text",
29
- {
30
- className: "MuiLineChart-markLabel",
31
- dominantBaseline: "middle",
32
- fill: t.labelFontColor ? t.labelFontColor : r.palette.text.primary,
33
- style: {
34
- fontSize: t.labelFontSize ? t.labelFontSize : h
35
- },
36
- textAnchor: "middle",
37
- x: y,
38
- y: m - 28 + T / 2,
39
- children: a
40
- }
41
- )
42
- ] }),
43
- /* @__PURE__ */ e(
44
- "path",
45
- {
46
- cursor: x ? "pointer" : "unset",
47
- d: "M4.514,0A4.514,4.514,0,1,1,-4.514,0A4.514,4.514,0,1,1,4.514,0",
48
- height: "20px",
49
- onClick: (R) => {
50
- x?.(R, t.dataIndex);
51
- },
52
- onMouseEnter: () => {
53
- f?.(t.dataIndex);
54
- },
55
- onMouseLeave: () => {
56
- c?.();
57
- },
58
- style: {
59
- fill: s?.fill ? s.fill : r.palette.background.paper,
60
- stroke: s?.stroke ? s.stroke : r.palette.primary.main,
61
- strokeWidth: 2,
62
- transform: `translate(${t.x}px, ${t.y}px)`,
63
- transformOrigin: `${t.x}px, ${t.y}px`,
64
- filter: s?.filter ? s.filter : "none"
65
- },
66
- width: "20px"
67
- }
68
- )
69
- ] });
70
- }, bt = (t) => /* @__PURE__ */ i(B, { children: [
71
- /* @__PURE__ */ e("clipPath", { id: t.id, children: /* @__PURE__ */ e("rect", { height: t.height, width: t.width, x: "0", y: "0" }) }),
72
- /* @__PURE__ */ e("g", { children: /* @__PURE__ */ e(
73
- "path",
74
- {
75
- cursor: "unset",
76
- d: t.d,
77
- style: {
78
- strokeWidth: 2,
79
- strokeLinejoin: "round",
80
- fill: "none",
81
- stroke: t.lineColor ? t.lineColor : t.stroke,
82
- transition: "opacity 0.2s ease-in, stroke 0.2s ease-in",
83
- opacity: 1
84
- }
85
- }
86
- ) })
87
- ] }), kt = ({
88
- label: t,
89
- customLegendVariant: r
90
- }) => {
91
- const o = r || "Small";
92
- return typeof t == "string" ? /* @__PURE__ */ e(l, { variant: o, children: t }) : typeof t == "object" && t.amount && t.label ? /* @__PURE__ */ i(B, { children: [
93
- /* @__PURE__ */ e(l, { variant: o, children: t.label }),
94
- /* @__PURE__ */ e(l, { bold: !0, sx: { marginLeft: 8 }, variant: o, children: b(t.amount, "0,0") })
95
- ] }) : null;
96
- }, Ct = ({
97
- average: t,
98
- customLegendVariant: r,
99
- labels: o = [],
100
- series: s,
101
- style: y,
102
- title: m,
103
- valueFormatterString: x
104
- }) => {
105
- const { common: f } = gt(), c = r || "Small";
106
- return /* @__PURE__ */ i(u, { style: { flexDirection: "row", gap: 24, ...y }, children: [
107
- s.map((d, a) => {
108
- const h = o[a];
109
- return h ? /* @__PURE__ */ i(
110
- u,
111
- {
112
- style: { alignItems: "center", flexDirection: "row", flexWrap: "wrap" },
113
- children: [
114
- /* @__PURE__ */ e(
115
- N,
116
- {
117
- sx: {
118
- width: 10,
119
- height: 10,
120
- backgroundColor: d.color,
121
- marginRight: 8
122
- }
123
- }
124
- ),
125
- /* @__PURE__ */ e(kt, { customLegendVariant: r, label: h })
126
- ]
127
- },
128
- a
129
- ) : null;
130
- }),
131
- t && /* @__PURE__ */ i(u, { sx: { alignItems: "center", flexDirection: "row" }, children: [
132
- /* @__PURE__ */ e(l, { bold: !0, sx: { marginRight: 8 }, variant: c, children: "– –" }),
133
- /* @__PURE__ */ i(l, { variant: c, children: [
134
- m || f.average,
135
- "  "
136
- ] }),
137
- /* @__PURE__ */ e(l, { bold: !0, variant: c, children: x ? b(t, x) : t })
138
- ] })
139
- ] });
140
- }, Mt = xt(Ct);
141
- function wt({
142
- customLabels: t,
143
- labels: r = [],
144
- valueFormatterString: o = "0,0"
145
- }) {
146
- const s = ft();
147
- return /* @__PURE__ */ e(
148
- yt,
149
- {
150
- showCrosshair: !0,
151
- slots: {
152
- axisContent: (y) => {
153
- const { axisValue: m, dataIndex: x, series: f } = y, c = x ?? 0;
154
- if (t) {
155
- const d = t[c]?.[0]?.header || String(m);
156
- return /* @__PURE__ */ i(
157
- u,
158
- {
159
- sx: {
160
- backgroundColor: s.palette.background.paper,
161
- boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.12)",
162
- flexDirection: "column",
163
- alignItems: "flex-start",
164
- borderRadius: "4px",
165
- width: 250,
166
- gap: 8,
167
- px: 16,
168
- py: 12
169
- },
170
- children: [
171
- /* @__PURE__ */ i(
172
- u,
173
- {
174
- sx: {
175
- flexDirection: "row",
176
- justifyContent: "space-between",
177
- alignItems: "center",
178
- alignSelf: "stretch",
179
- gap: 8,
180
- marginTop: 4
181
- },
182
- children: [
183
- /* @__PURE__ */ e(l, { variant: "H3", children: d }),
184
- /* @__PURE__ */ e(l, { bold: !0, variant: "H3", children: b(f[0]?.data[c], o) })
185
- ]
186
- }
187
- ),
188
- t[c]?.some((a) => (typeof a == "string" ? 0 : a.amount) !== 0) ? t[c]?.map((a) => {
189
- const h = typeof a == "string" ? a : a.label, k = typeof a == "string" ? 0 : a.amount;
190
- return k === 0 ? null : /* @__PURE__ */ i(
191
- u,
192
- {
193
- sx: {
194
- flexDirection: "row",
195
- justifyContent: "space-between",
196
- alignItems: "center",
197
- alignSelf: "stretch",
198
- gap: 8,
199
- marginTop: 4
200
- },
201
- children: [
202
- /* @__PURE__ */ i(
203
- u,
204
- {
205
- sx: {
206
- flexDirection: "row",
207
- alignItems: "center",
208
- gap: 8,
209
- flex: 1,
210
- minWidth: 0
211
- },
212
- children: [
213
- /* @__PURE__ */ e(
214
- N,
215
- {
216
- sx: {
217
- width: "12px",
218
- height: "12px",
219
- backgroundColor: f[0]?.color,
220
- borderRadius: "4px"
221
- }
222
- }
223
- ),
224
- /* @__PURE__ */ e(l, { variant: "Body", children: h })
225
- ]
226
- }
227
- ),
228
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: b(Math.abs(k), o) })
229
- ]
230
- },
231
- h
232
- );
233
- }) : /* @__PURE__ */ e(l, { variant: "Body", children: "No data" })
234
- ]
235
- }
236
- );
237
- }
238
- return /* @__PURE__ */ i(
239
- u,
240
- {
241
- sx: {
242
- backgroundColor: s.palette.background.paper,
243
- boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.12)",
244
- flexDirection: "column",
245
- alignItems: "flex-start",
246
- borderRadius: "4px",
247
- width: 225,
248
- gap: 8,
249
- px: 16,
250
- py: 12
251
- },
252
- children: [
253
- /* @__PURE__ */ e(l, { variant: "H3", children: String(m) }),
254
- f.map((d, a) => /* @__PURE__ */ i(
255
- u,
256
- {
257
- sx: {
258
- flexDirection: "row",
259
- justifyContent: "space-between",
260
- alignItems: "center",
261
- alignSelf: "stretch",
262
- gap: 8,
263
- marginTop: 4
264
- },
265
- children: [
266
- /* @__PURE__ */ i(u, { sx: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
267
- /* @__PURE__ */ e(
268
- N,
269
- {
270
- sx: {
271
- width: "12px",
272
- height: "12px",
273
- backgroundColor: d.color,
274
- borderRadius: "4px"
275
- }
276
- }
277
- ),
278
- /* @__PURE__ */ e(l, { variant: "Body", children: typeof r[a] == "string" ? r[a] : r[a]?.label })
279
- ] }),
280
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: b(d.data[c], o) })
281
- ]
282
- },
283
- d.id
284
- ))
285
- ]
286
- }
287
- );
288
- }
289
- },
290
- trigger: "axis"
291
- }
292
- );
293
- }
294
- const zt = ({
295
- axisColor: t,
296
- baseline: r = "max",
297
- chartFor: o,
298
- chartXaxisSx: s,
299
- chartYaxisSx: y,
300
- colors: m,
301
- curveType: x = "linear",
302
- customLegendVariant: f,
303
- customTooltipLabels: c,
304
- datasets: d,
305
- height: a,
306
- isGraphClippingXAxis: h = !1,
307
- labels: k,
308
- labelBackgroundColor: I,
309
- labelFontColor: P,
310
- labelFontSize: E,
311
- margin: D,
312
- markHandlers: T,
313
- markStyles: $,
314
- onItemClick: M,
315
- showArea: R = !1,
316
- showAverage: H = !1,
317
- showAxisHighlight: Y = !1,
318
- showBars: j = !1,
319
- showLegend: q = !1,
320
- showMarkLabel: G = !1,
321
- showTooltip: O = !1,
322
- showXAxis: Q = !1,
323
- showXAxisTicks: U = !1,
324
- showYAxis: V = !1,
325
- showYAxisTicks: J = !1,
326
- title: K,
327
- useCustomMark: Z = !1,
328
- valueFormatterString: C,
329
- width: _
330
- }) => {
331
- const g = X(), tt = d.flat().map((n) => n.x), w = d.flat().map((n) => n.y), F = Math.round(w.reduce((n, v) => v + n, 0) / w.length), L = Math.floor(Math.min(...w) / 100) * 100, S = Math.ceil(Math.max(...w) / 100) * 100, z = d.map((n, v) => ({
332
- type: j ? "bar" : "line",
333
- curve: x,
334
- color: j ? g.palette.chart?.chart6 : m[v] ?? g.palette.primary.main,
335
- data: n.map((p) => p.y),
336
- area: R,
337
- baseline: r,
338
- showMark: !0,
339
- valueFormatter: (p) => C ? b(p || 0, C) : String(p)
340
- })), et = {
341
- ...{
342
- top: 60,
343
- right: 35,
344
- bottom: 50,
345
- left: 50
346
- },
347
- ...D
348
- };
349
- let A = L, W = S;
350
- if (o === "networthChart") {
351
- const n = S - L, v = n < S * 0.05 ? 0.25 : 0.2, p = Math.max(n * v, S * 0.015);
352
- A = L - p < 0 ? L : L - p, W = S + p;
353
- }
354
- return /* @__PURE__ */ i(
355
- nt,
356
- {
357
- sx: {
358
- position: "relative",
359
- touchAction: "pan-y",
360
- // Allow vertical scrolling
361
- "& svg": {
362
- touchAction: "pan-y",
363
- // Allow vertical scrolling on SVG
364
- userSelect: "none"
365
- // Prevent text selection
366
- },
367
- "& .recharts-wrapper": {
368
- touchAction: "pan-y"
369
- // For Recharts library specifically
370
- }
371
- },
372
- children: [
373
- /* @__PURE__ */ i(
374
- at,
375
- {
376
- height: a,
377
- margin: et,
378
- series: z,
379
- sx: {
380
- p: 4,
381
- "& .MuiBarLabel-root": {
382
- fontSize: 10,
383
- fontWeight: 600
384
- },
385
- "& .MuiAreaElement-root": {
386
- opacity: 0.15
387
- },
388
- "& .MuiChartsAxis-tickLabel > tspan": {
389
- fontFamily: g.typography.Small.fontFamily
390
- },
391
- "& .MuiLineChart-markLabel": {
392
- fontFamily: g.typography.Small.fontFamily
393
- }
394
- },
395
- width: _,
396
- xAxis: [{ data: tt, scaleType: j ? "band" : "point" }],
397
- yAxis: [
398
- {
399
- tickInterval: o === "networthChart" ? mt(A, W, 5) : void 0,
400
- min: h ? -22 : A,
401
- max: W || 100,
402
- colorMap: R && z.length < 2 ? {
403
- type: "continuous",
404
- min: A,
405
- max: W,
406
- color: [
407
- g.palette.background.paper,
408
- m[0] ?? g.palette.primary.main
409
- ]
410
- } : void 0,
411
- valueFormatter: (n) => C ? b(n, C) : String(n)
412
- }
413
- ],
414
- children: [
415
- H && /* @__PURE__ */ e(
416
- rt,
417
- {
418
- lineStyle: {
419
- stroke: I ? g.palette.neutral.main : g.palette.neutral.dark,
420
- strokeDasharray: "10, 8",
421
- strokeWidth: 2
422
- },
423
- y: F
424
- }
425
- ),
426
- /* @__PURE__ */ e(it, { onItemClick: M }),
427
- /* @__PURE__ */ e(
428
- ot,
429
- {
430
- onItemClick: M,
431
- slots: {
432
- line: (n) => /* @__PURE__ */ e(
433
- bt,
434
- {
435
- ...n,
436
- lineColor: n.ownerState.color ?? g.palette.primary.main
437
- }
438
- )
439
- }
440
- }
441
- ),
442
- /* @__PURE__ */ e(
443
- lt,
444
- {
445
- onItemClick: M,
446
- slots: Z ? {
447
- mark: (n) => /* @__PURE__ */ e(
448
- pt,
449
- {
450
- handlers: T,
451
- labelBackgroundColor: I,
452
- labelFontColor: P,
453
- labelFontSize: E,
454
- showLabel: G,
455
- style: $?.(n.dataIndex) ?? {},
456
- valueFormatterString: C,
457
- yData: w,
458
- ...n
459
- }
460
- )
461
- } : void 0
462
- }
463
- ),
464
- /* @__PURE__ */ e(
465
- st,
466
- {
467
- barLabel: (n) => Number(n.value) > 0 ? `$${n.value}` : null,
468
- borderRadius: 10
469
- }
470
- ),
471
- /* @__PURE__ */ e(
472
- ct,
473
- {
474
- disableLine: !Q,
475
- disableTicks: !U,
476
- slotProps: t ? {
477
- axisLine: {
478
- style: {
479
- stroke: t
480
- }
481
- },
482
- axisTick: {
483
- style: {
484
- stroke: t
485
- }
486
- }
487
- } : {},
488
- sx: { ...s }
489
- }
490
- ),
491
- /* @__PURE__ */ e(
492
- dt,
493
- {
494
- disableLine: !V,
495
- disableTicks: !J,
496
- sx: { ...y },
497
- slotProps: t ? {
498
- axisLine: {
499
- style: {
500
- stroke: t
501
- }
502
- },
503
- axisTick: {
504
- style: {
505
- stroke: t
506
- }
507
- }
508
- } : {}
509
- }
510
- ),
511
- Y && /* @__PURE__ */ e(ht, { x: "line" }),
512
- O && /* @__PURE__ */ e(
513
- wt,
514
- {
515
- customLabels: c,
516
- labels: k,
517
- valueFormatterString: C
518
- }
519
- )
520
- ]
521
- }
522
- ),
523
- q && /* @__PURE__ */ e(
524
- Mt,
525
- {
526
- average: H ? F : void 0,
527
- customLegendVariant: f,
528
- labels: k,
529
- series: z,
530
- style: { position: "absolute", top: 16, left: 16 },
531
- title: K,
532
- valueFormatterString: C
533
- }
534
- )
535
- ]
536
- }
537
- );
538
- };
539
- export {
540
- zt as L
541
- };
@@ -1,6 +0,0 @@
1
- export declare const augmentChartData: (averageHealthScores: {
2
- health_scores: any[];
3
- }) => {
4
- x: string;
5
- y: any;
6
- }[];
@@ -1,77 +0,0 @@
1
- import r from "react";
2
- import { jsx as n } from "react/jsx-runtime";
3
- const a = r.createContext(null), C = ({
4
- children: t,
5
- globalStore: e,
6
- onError: s,
7
- onEvent: l,
8
- onLoad: u,
9
- onPageView: c
10
- }) => /* @__PURE__ */ n(
11
- a.Provider,
12
- {
13
- value: {
14
- globalStore: e,
15
- onError: s,
16
- onEvent: l,
17
- onLoad: u,
18
- onPageView: c,
19
- children: t
20
- },
21
- children: t
22
- }
23
- ), S = r.createContext(null), d = ({ children: t, availableHeight: e, availableWidth: s }) => /* @__PURE__ */ n(
24
- S.Provider,
25
- {
26
- value: {
27
- availableHeight: e,
28
- availableWidth: s,
29
- children: t
30
- },
31
- children: t
32
- }
33
- ), o = (t = "useGlobalStore") => {
34
- const e = r.useContext(a);
35
- if (!e)
36
- throw new Error(`${t}() must be used within the GlobalDataContext`);
37
- return e;
38
- }, p = () => o("useAccountStore").globalStore.accountStore, h = () => o("useAppConfig").globalStore.appDataStore.appConfig, x = () => o("useAnalyticsStore").globalStore.analyticsStore, f = () => o("useBudgetsStore").globalStore.budgetsStore, w = () => o("useCashflowStore").globalStore.cashflowStore, G = () => o("useCategoryStore").globalStore.categoryStore, v = () => o("useConnectStore").globalStore.connectStore, y = () => o("useDebtsStore").globalStore.debtsStore, W = () => o("useFinstrongStore").globalStore.finstrongStore, m = () => o("useGlobalStore").globalStore, D = () => o("useGlobalUiStore").globalStore.globalUiStore, E = () => o("globalCopyStore").globalStore.copyStore.copy, P = () => o("useGoalStore").globalStore.goalStore, A = () => o("useHelpStore").globalStore.helpStore, T = () => o("useHoldingStore").globalStore.holdingStore, U = () => o("useMerchantStore").globalStore.merchantStore, H = () => o("useNetWorthStore").globalStore.netWorthStore, N = () => o("useNotificationStore").globalStore.notificationStore, B = () => o("useRecurringTransactionsStore").globalStore.recurringTransactionsStore, L = () => o("useSettingsStore").globalStore.settingsStore, R = () => o("useTransactionStore").globalStore.transactionStore, V = () => o("useTrendsStore").globalStore.trendsStore, j = () => o("useUserStore").globalStore.userStore, F = () => ({ onError: o().onError }), M = () => ({ onEvent: o().onEvent }), $ = () => ({ onLoad: o().onLoad }), k = () => ({ onPageView: o().onPageView }), i = (t = "useWidgetContainerContext") => {
39
- const e = r.useContext(S);
40
- if (!e)
41
- throw new Error(`${t}() must be used within the WidgetContainerContext`);
42
- return e;
43
- }, q = () => i();
44
- export {
45
- A,
46
- k as B,
47
- C,
48
- S as D,
49
- a as G,
50
- d as W,
51
- h as a,
52
- D as b,
53
- U as c,
54
- p as d,
55
- v as e,
56
- m as f,
57
- M as g,
58
- R as h,
59
- f as i,
60
- B as j,
61
- x as k,
62
- P as l,
63
- G as m,
64
- $ as n,
65
- N as o,
66
- j as p,
67
- q,
68
- H as r,
69
- L as s,
70
- T as t,
71
- E as u,
72
- w as v,
73
- V as w,
74
- W as x,
75
- y,
76
- F as z
77
- };