@mx-cartographer/experiences 9.0.2 → 9.1.0-alpha.bb1

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 (120) hide show
  1. package/dist/Analytics-BKzTPees.mjs +61 -0
  2. package/dist/GlobalCopyApi-BeXzaDH9.mjs +487 -0
  3. package/dist/HeaderCell-EhCUSjvj.mjs +10 -0
  4. package/dist/Loader-BlVzRtUd.mjs +73 -0
  5. package/dist/MiniWidgetContainer-COwnjfy7.mjs +110 -0
  6. package/dist/OriginalBalanceAction-sbiqaxok.mjs +110 -0
  7. package/dist/SpendingLegend-D15ixlQ1.mjs +222 -0
  8. package/dist/accounts/index.es.js +12 -1598
  9. package/dist/accounts-DkyAiLpg.mjs +15632 -0
  10. package/dist/analytics/index.es.js +155 -139
  11. package/dist/budgets/index.es.js +1317 -1266
  12. package/dist/cashflow/index.es.js +1047 -942
  13. package/dist/categories/index.es.js +4 -4
  14. package/dist/common/index.es.js +101 -310
  15. package/dist/core/index.es.js +80 -104
  16. package/dist/core-BexP5oiV.mjs +4047 -0
  17. package/dist/dashboard/index.es.js +185 -141
  18. package/dist/debts/index.es.js +1384 -1272
  19. package/dist/finstrong/index.es.js +3366 -3471
  20. package/dist/goals/index.es.js +1103 -984
  21. package/dist/help/index.es.js +3 -25
  22. package/dist/help-CctDYrAH.mjs +2308 -0
  23. package/dist/insights/index.es.js +93 -4843
  24. package/dist/investments/index.es.js +1533 -1522
  25. package/dist/merchants/index.es.js +75 -64
  26. package/dist/microinsights/index.es.js +15 -824
  27. package/dist/microinsights-CRf3ChsJ.mjs +1814 -0
  28. package/dist/networth/index.es.js +550 -503
  29. package/dist/notifications/index.es.js +169 -161
  30. package/dist/recurringtransactions/index.es.js +10 -962
  31. package/dist/recurringtransactions-gbJ_NA8u.mjs +1564 -0
  32. package/dist/settings/index.es.js +13 -880
  33. package/dist/settings-ZMHe439l.mjs +1526 -0
  34. package/dist/spending/index.es.js +400 -456
  35. package/dist/transactions/index.es.js +10 -603
  36. package/dist/trends/index.es.js +1268 -1407
  37. package/package.json +28 -28
  38. package/dist/Account-BaJmiJAG.mjs +0 -118
  39. package/dist/Account-BxHMlV9R.mjs +0 -30
  40. package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
  41. package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
  42. package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
  43. package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
  44. package/dist/AccountUtils-T5_Odvos.mjs +0 -27
  45. package/dist/Accounts-CseLC3lL.mjs +0 -5
  46. package/dist/Analytics-CkYXKvco.mjs +0 -53
  47. package/dist/Analytics-CzGzz_sE.mjs +0 -136
  48. package/dist/ApiEndpoints-DXwIYNUV.mjs +0 -49
  49. package/dist/BudgetUtil-Bg2AQJpQ.mjs +0 -74
  50. package/dist/Category-DEKZGLYe.mjs +0 -301
  51. package/dist/CategorySelectorDrawer-8soGrhB8.mjs +0 -430
  52. package/dist/Connect-Dk6GZEsA.mjs +0 -39
  53. package/dist/ConnectCard-CCep7Zqe.mjs +0 -54
  54. package/dist/ConnectDrawer-Cnjr3Ddg.mjs +0 -58
  55. package/dist/ConnectionsDrawer-CtfPXk0M.mjs +0 -54
  56. package/dist/CurrencyDialog-DumQCTPO.mjs +0 -373
  57. package/dist/CurrencyInput-adTIRtL3.mjs +0 -87
  58. package/dist/CurrencyText-CCbE6MmF.mjs +0 -20
  59. package/dist/DateFormats-HudZ3Bjs.mjs +0 -64
  60. package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
  61. package/dist/DebtUtils-DD3186U-.mjs +0 -153
  62. package/dist/Dialog-Bvd2n8hz.mjs +0 -66
  63. package/dist/Donut-SzzfZDHF.mjs +0 -88
  64. package/dist/Drawer-BXqqBMxg.mjs +0 -174
  65. package/dist/EmbeddedCard-DPwJjqMH.mjs +0 -856
  66. package/dist/EmptyState-CJUDc3kD.mjs +0 -84
  67. package/dist/Error-Dogaw2jO.mjs +0 -84
  68. package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -23
  69. package/dist/ExportCsvAction-Bw02ZJEj.mjs +0 -24
  70. package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +0 -237
  71. package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -128
  72. package/dist/GoalsUtil-C9EnLWvC.mjs +0 -107
  73. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  74. package/dist/Help-CkQTjORd.mjs +0 -299
  75. package/dist/Help-DJ8PrVHX.mjs +0 -3209
  76. package/dist/IconBacking-DgT8DCeh.mjs +0 -39
  77. package/dist/InformationTooltip-4su8bn1e.mjs +0 -41
  78. package/dist/InvestmentUtil-BItV7uEs.mjs +0 -134
  79. package/dist/LineChart-CejWS_rh.mjs +0 -612
  80. package/dist/ListItemAction-CzZ8s39Z.mjs +0 -69
  81. package/dist/ListItemRow-kH1rn8Xu.mjs +0 -67
  82. package/dist/ListItemWrapper-B5r-YQQ_.mjs +0 -42
  83. package/dist/Loader-CxeBwuPG.mjs +0 -21
  84. package/dist/Localization-DnoVyBNK.mjs +0 -38
  85. package/dist/ManageIncome-D1yBODQi.mjs +0 -595
  86. package/dist/MicroWidgetContainer-CfKdQfhi.mjs +0 -45
  87. package/dist/MiniWidgetContainer-BdPiUU-u.mjs +0 -66
  88. package/dist/NetWorthUtils-DilGN1nW.mjs +0 -95
  89. package/dist/Notification-DTNYSd8P.mjs +0 -7
  90. package/dist/NotificationSettings-B4JA5IKE.mjs +0 -677
  91. package/dist/NotificationUtils-BRGFTePr.mjs +0 -23
  92. package/dist/NumberFormatting--XMeeBfr.mjs +0 -49
  93. package/dist/OriginalBalanceAction-BybTXDtO.mjs +0 -114
  94. package/dist/RecurringSettings-D2xbNb67.mjs +0 -88
  95. package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
  96. package/dist/ResponsiveButton-CC9F_Ezk.mjs +0 -45
  97. package/dist/SearchBox-Cpgu_gdO.mjs +0 -50
  98. package/dist/Select-BFt-HD-L.mjs +0 -55
  99. package/dist/SelectionBox-B4xELRgp.mjs +0 -48
  100. package/dist/SingleSegmentDonut-7Uy6VEld.mjs +0 -69
  101. package/dist/Sizes-DISGrlUg.mjs +0 -6
  102. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  103. package/dist/SpendingData-PKlh8caU.mjs +0 -53
  104. package/dist/SpendingLegend-5Ct_FZ8o.mjs +0 -193
  105. package/dist/StatusBar-CPfSXe80.mjs +0 -30
  106. package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
  107. package/dist/ToggleListItem-Dl1lXNwj.mjs +0 -91
  108. package/dist/TransactionDetails-DctXr07p.mjs +0 -1714
  109. package/dist/TransactionUtils-BphBJBbU.mjs +0 -234
  110. package/dist/TrendsUtil-D9z3kIj_.mjs +0 -69
  111. package/dist/UserStore-CRpKQjpP.mjs +0 -3002
  112. package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +0 -1295
  113. package/dist/WidgetContainer-CmbU4CBH.mjs +0 -482
  114. package/dist/hooks-BaO_gOI6.mjs +0 -77
  115. package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
  116. package/dist/useAriaLive-MkYebyUR.mjs +0 -35
  117. package/dist/useDimensions-CeDR9V8N.mjs +0 -36
  118. package/dist/useInsightsEnabled-DaNLPmUU.mjs +0 -11
  119. package/dist/useScreenSize-mWpmnh5w.mjs +0 -36
  120. package/dist/useWidgetLoadTimer-CJb-RELP.mjs +0 -19
@@ -1,612 +0,0 @@
1
- import { jsxs as i, jsx as e, Fragment as E } from "react/jsx-runtime";
2
- import U from "@mui/material/Box";
3
- import { useTheme as N } from "@mui/material/styles";
4
- import { BarPlot as gt } from "@mui/x-charts/BarChart";
5
- import { ChartContainer as pt } from "@mui/x-charts/ChartContainer";
6
- import { ChartsAxisHighlight as Lt } from "@mui/x-charts/ChartsAxisHighlight";
7
- import { ChartsReferenceLine as bt } from "@mui/x-charts/ChartsReferenceLine";
8
- import { useAxesTooltip as kt, ChartsTooltipContainer as Mt } from "@mui/x-charts/ChartsTooltip";
9
- import { ChartsXAxis as wt } from "@mui/x-charts/ChartsXAxis";
10
- import { ChartsYAxis as Ct } from "@mui/x-charts/ChartsYAxis";
11
- import { AreaPlot as vt, LinePlot as St, MarkPlot as At } from "@mui/x-charts/LineChart";
12
- import { observer as Dt } from "mobx-react-lite";
13
- import z from "@mui/material/Stack";
14
- import { Text as d } from "@mxenabled/mxui";
15
- import { f as L, c as O } from "./NumberFormatting--XMeeBfr.mjs";
16
- import { u as Tt } from "./hooks-BaO_gOI6.mjs";
17
- import Rt from "@mui/material/useMediaQuery";
18
- import { Stack as M, Box as $t } from "@mui/material";
19
- const B = {
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
- }, _ = [
28
- "circle",
29
- "square",
30
- "wye",
31
- "star",
32
- "cross",
33
- "triangle",
34
- "diamond"
35
- ];
36
- function Z(t) {
37
- return _[t % _.length];
38
- }
39
- const Pt = ({
40
- label: t,
41
- customLegendVariant: a
42
- }) => {
43
- const l = a || "body2";
44
- return typeof t == "string" ? /* @__PURE__ */ e(d, { variant: l, children: t }) : typeof t == "object" && t.amount !== void 0 && t.label ? /* @__PURE__ */ i(E, { children: [
45
- /* @__PURE__ */ e(d, { variant: l, children: t.label }),
46
- /* @__PURE__ */ e(d, { bold: !0, sx: { marginLeft: 8 }, variant: l, children: L(t.amount, "0,0") })
47
- ] }) : null;
48
- }, Et = ({
49
- average: t,
50
- customLegendVariant: a,
51
- customLegendBoxSx: l,
52
- labels: o = [],
53
- series: f,
54
- style: y,
55
- title: m,
56
- valueFormatterString: u
57
- }) => {
58
- const { common: g } = Tt(), s = a || "body2";
59
- return /* @__PURE__ */ i(z, { style: { flexDirection: "row", gap: 24, ...y }, children: [
60
- f.map((c, n) => {
61
- const h = o[n];
62
- return h ? /* @__PURE__ */ i(
63
- z,
64
- {
65
- style: { alignItems: "center", flexDirection: "row", flexWrap: "wrap" },
66
- children: [
67
- l !== void 0 ? /* @__PURE__ */ e(
68
- U,
69
- {
70
- sx: {
71
- width: 10,
72
- height: 10,
73
- backgroundColor: c.color,
74
- marginRight: 8,
75
- ...l
76
- }
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: B[Z(n)],
90
- fill: c.color,
91
- stroke: c.color,
92
- strokeWidth: 1
93
- }
94
- )
95
- }
96
- ),
97
- /* @__PURE__ */ e(Pt, { customLegendVariant: a, label: h })
98
- ]
99
- },
100
- n
101
- ) : null;
102
- }),
103
- t !== void 0 && /* @__PURE__ */ i(z, { sx: { alignItems: "center", flexDirection: "row" }, children: [
104
- /* @__PURE__ */ e(d, { bold: !0, sx: { marginRight: 8 }, variant: s, children: "– –" }),
105
- /* @__PURE__ */ i(d, { variant: s, children: [
106
- m || g.average,
107
- "  "
108
- ] }),
109
- /* @__PURE__ */ e(d, { bold: !0, variant: s, children: u ? L(t, u) : t })
110
- ] })
111
- ] });
112
- }, It = Dt(Et), Wt = (t) => /* @__PURE__ */ i(E, { children: [
113
- /* @__PURE__ */ e("clipPath", { id: t.id, children: /* @__PURE__ */ e("rect", { height: t.height, width: t.width, x: "0", y: "0" }) }),
114
- /* @__PURE__ */ e("g", { children: /* @__PURE__ */ e(
115
- "path",
116
- {
117
- cursor: "unset",
118
- d: t.d,
119
- style: {
120
- strokeWidth: 2,
121
- strokeLinejoin: "round",
122
- fill: "none",
123
- stroke: t.lineColor ? t.lineColor : t.stroke,
124
- transition: "opacity 0.2s ease-in, stroke 0.2s ease-in",
125
- opacity: 1
126
- }
127
- }
128
- ) })
129
- ] }), jt = (t) => {
130
- const a = N(), l = t.showLabel, o = t.style, f = o?.markLabelStyles, y = Number(t.x), m = Number(t.y), u = t.handlers?.onMarkClick, g = t.handlers?.onMouseEnter, s = t.handlers?.onMouseLeave, c = Rt(a.breakpoints.up("sm")), n = t.valueFormatterString ? L(t.yData[t.dataIndex], t.valueFormatterString) : String(t.yData[t.dataIndex]), h = c ? a.typography.body2?.fontSize : a.typography.caption?.fontSize, b = 30, D = 24, I = y - b / 2, T = m - 30;
131
- return /* @__PURE__ */ i(E, { children: [
132
- l && /* @__PURE__ */ i(E, { children: [
133
- t.labelBackgroundColor && /* @__PURE__ */ e(
134
- "rect",
135
- {
136
- fill: t.labelBackgroundColor,
137
- height: D,
138
- rx: "3",
139
- width: b,
140
- x: I,
141
- y: T
142
- }
143
- ),
144
- /* @__PURE__ */ e(
145
- "text",
146
- {
147
- className: "MuiLineChart-markLabel",
148
- dominantBaseline: "middle",
149
- fill: t.labelFontColor ? t.labelFontColor : a.palette.text.primary,
150
- style: {
151
- fontSize: t.labelFontSize ? t.labelFontSize : h,
152
- ...f
153
- },
154
- textAnchor: "middle",
155
- x: y,
156
- y: m - 28 + D / 2,
157
- children: n
158
- }
159
- )
160
- ] }),
161
- t.showMark && /* @__PURE__ */ e(
162
- "path",
163
- {
164
- cursor: u ? "pointer" : "unset",
165
- d: B[t.shape ?? "circle"],
166
- height: "20px",
167
- onClick: (R) => {
168
- u?.(R, t.dataIndex);
169
- },
170
- onMouseEnter: () => {
171
- g?.(t.dataIndex);
172
- },
173
- onMouseLeave: () => {
174
- s?.();
175
- },
176
- style: {
177
- fill: o?.fill ? o.fill : a.palette.background.paper,
178
- stroke: o?.stroke ? o.stroke : a.palette.primary.main,
179
- strokeWidth: 2,
180
- transform: `translate(${t.x}px, ${t.y}px)`,
181
- transformOrigin: `${t.x}px, ${t.y}px`,
182
- filter: o?.filter ? o.filter : "none"
183
- },
184
- width: "20px"
185
- }
186
- )
187
- ] });
188
- };
189
- function zt({
190
- customLabels: t,
191
- isCurrency: a = !0,
192
- labels: l = [],
193
- series: o,
194
- valueFormatterString: f = "0,0"
195
- }) {
196
- const y = kt(), m = N(), u = y?.[0];
197
- if (!u) return null;
198
- const { axisValue: g, dataIndex: s = 0 } = u;
199
- if (t) {
200
- const c = t[s]?.[0]?.header || String(g);
201
- return /* @__PURE__ */ i(
202
- M,
203
- {
204
- sx: {
205
- backgroundColor: m.palette.background.paper,
206
- boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.12)",
207
- flexDirection: "column",
208
- alignItems: "flex-start",
209
- borderRadius: "4px",
210
- width: 250,
211
- gap: 8,
212
- px: 16,
213
- py: 12
214
- },
215
- children: [
216
- /* @__PURE__ */ i(
217
- M,
218
- {
219
- sx: {
220
- flexDirection: "row",
221
- justifyContent: "space-between",
222
- alignItems: "center",
223
- alignSelf: "stretch",
224
- gap: 8,
225
- marginTop: 4
226
- },
227
- children: [
228
- /* @__PURE__ */ e(d, { variant: "h3", children: c }),
229
- /* @__PURE__ */ e(d, { bold: !0, variant: "h3", children: L(o[0]?.data[s], f) })
230
- ]
231
- }
232
- ),
233
- t[s]?.some((n) => (typeof n == "string" ? 0 : n.amount) !== 0) ? t[s]?.map((n) => {
234
- const h = typeof n == "string" ? n : n.label, b = typeof n == "string" ? 0 : n.amount;
235
- return b === 0 ? null : /* @__PURE__ */ i(
236
- M,
237
- {
238
- sx: {
239
- flexDirection: "row",
240
- justifyContent: "space-between",
241
- alignItems: "center",
242
- alignSelf: "stretch",
243
- gap: 8,
244
- marginTop: 4
245
- },
246
- children: [
247
- /* @__PURE__ */ i(
248
- M,
249
- {
250
- sx: {
251
- flexDirection: "row",
252
- alignItems: "center",
253
- gap: 8,
254
- flex: 1,
255
- minWidth: 0
256
- },
257
- children: [
258
- /* @__PURE__ */ e(
259
- $t,
260
- {
261
- sx: {
262
- width: "12px",
263
- height: "12px",
264
- backgroundColor: o[0]?.color,
265
- borderRadius: "4px"
266
- }
267
- }
268
- ),
269
- /* @__PURE__ */ e(d, { variant: "body1", children: h })
270
- ]
271
- }
272
- ),
273
- /* @__PURE__ */ e(d, { bold: !0, variant: "body1", children: L(Math.abs(b), f) })
274
- ]
275
- },
276
- h
277
- );
278
- }) : /* @__PURE__ */ e(d, { variant: "body1", children: "No data" })
279
- ]
280
- }
281
- );
282
- }
283
- return /* @__PURE__ */ i(
284
- M,
285
- {
286
- sx: {
287
- backgroundColor: m.palette.background.paper,
288
- boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.12)",
289
- flexDirection: "column",
290
- alignItems: "flex-start",
291
- borderRadius: "4px",
292
- width: 225,
293
- gap: 8,
294
- px: 16,
295
- py: 12
296
- },
297
- children: [
298
- /* @__PURE__ */ e(d, { variant: "h3", children: String(g) }),
299
- o.map((c, n) => /* @__PURE__ */ i(
300
- M,
301
- {
302
- sx: {
303
- flexDirection: "row",
304
- justifyContent: "space-between",
305
- alignItems: "center",
306
- alignSelf: "stretch",
307
- gap: 8,
308
- marginTop: 4
309
- },
310
- children: [
311
- /* @__PURE__ */ i(M, { sx: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
312
- /* @__PURE__ */ e("svg", { "aria-hidden": "true", height: 12, viewBox: "-6 -6 12 12", width: 12, children: /* @__PURE__ */ e("path", { d: B[Z(n)], fill: c.color }) }),
313
- /* @__PURE__ */ e(d, { variant: "body1", children: typeof l[n] == "string" ? l[n] : l[n]?.label })
314
- ] }),
315
- /* @__PURE__ */ e(d, { bold: !0, variant: "body1", children: a ? L(c.data[s], f) : c.data[s] })
316
- ]
317
- },
318
- `${c.id}-${n}`
319
- ))
320
- ]
321
- }
322
- );
323
- }
324
- const ne = ({
325
- areaColor: t,
326
- axisColor: a,
327
- baseline: l = "max",
328
- chartFor: o,
329
- chartXaxisSx: f,
330
- chartYaxisSx: y,
331
- colors: m,
332
- curveType: u = "linear",
333
- customLegendVariant: g,
334
- customLegendSx: s,
335
- customLegendBoxSx: c,
336
- customTooltipLabels: n,
337
- datasets: h,
338
- height: b,
339
- isCurrency: D,
340
- isGraphClippingXAxis: I = !1,
341
- labels: T,
342
- labelBackgroundColor: R,
343
- labelFontColor: X,
344
- labelFontSize: Y,
345
- margin: K,
346
- markHandlers: Q,
347
- markStyles: V,
348
- minRange: J,
349
- maxRange: tt,
350
- onItemClick: W,
351
- peerAverage: H,
352
- showArea: G = !1,
353
- showAverage: q = !1,
354
- showAxisHighlight: et = !1,
355
- showBars: j = !1,
356
- showLegend: rt = !1,
357
- showMark: nt = !0,
358
- showMarkLabel: at = !1,
359
- showTooltip: it = !1,
360
- showXAxis: ot = !1,
361
- showXAxisTicks: lt = !1,
362
- showYAxis: st = !1,
363
- showYAxisTicks: ct = !1,
364
- title: dt,
365
- useCustomMark: ht = !1,
366
- valueFormatterString: k,
367
- width: mt,
368
- xAxisScaleType: ut
369
- }) => {
370
- const x = N(), ft = h.flat().map((r) => r.x), C = h.flat().map((r) => r.y), F = H || Math.round(C.reduce((r, w) => w + r, 0) / C.length), v = Math.floor(Math.min(...C) / 100) * 100, S = Math.ceil(Math.max(...C) / 100) * 100, $ = h.map((r, w) => ({
371
- type: j ? "bar" : "line",
372
- curve: u,
373
- color: j ? x.palette.chart?.chart6 : m[w] ?? x.palette.primary.main,
374
- data: r.map((p) => p.y),
375
- area: G,
376
- baseline: l,
377
- showMark: !0,
378
- shape: Z(w),
379
- valueFormatter: (p) => k ? L(p || 0, k) : String(p)
380
- })), xt = {
381
- ...{
382
- top: 60,
383
- right: 35,
384
- bottom: 25,
385
- left: -10
386
- },
387
- ...K
388
- };
389
- let A = J ?? v, P = tt ?? S;
390
- if (o === "networthChart") {
391
- const r = S - v, w = r < S * 0.05 ? 0.25 : 0.2, p = Math.max(r * w, S * 0.015);
392
- A = v - p < 0 ? v : v - p, P = S + p;
393
- }
394
- const yt = () => {
395
- if (o === "creditOverTime")
396
- return O(A, 850, 5);
397
- if (o === "networthChart")
398
- return O(A, P, 5);
399
- };
400
- return /* @__PURE__ */ i(
401
- U,
402
- {
403
- sx: {
404
- position: "relative",
405
- touchAction: "pan-y",
406
- // Allow vertical scrolling
407
- "& svg": {
408
- touchAction: "pan-y",
409
- // Allow vertical scrolling on SVG
410
- userSelect: "none"
411
- // Prevent text selection
412
- },
413
- "& .recharts-wrapper": {
414
- touchAction: "pan-y"
415
- // For Recharts library specifically
416
- }
417
- },
418
- children: [
419
- /* @__PURE__ */ i(
420
- pt,
421
- {
422
- height: b,
423
- margin: xt,
424
- series: $,
425
- sx: {
426
- "& .MuiBarLabel-root": {
427
- fontSize: 10,
428
- fontWeight: 600
429
- },
430
- "& .MuiAreaElement-root": {
431
- opacity: 0.15
432
- },
433
- "& .MuiChartsAxis-tickLabel > tspan": {
434
- fontFamily: x.typography.body2.fontFamily
435
- },
436
- "& .MuiLineChart-markLabel": {
437
- fontFamily: x.typography.body2.fontFamily
438
- }
439
- },
440
- width: mt,
441
- xAxis: [{ data: ft, scaleType: ut || (j ? "band" : "point") }],
442
- yAxis: [
443
- {
444
- tickInterval: yt(),
445
- min: I ? -22 : A,
446
- max: P || 100,
447
- colorMap: G && $.length < 2 ? {
448
- type: "continuous",
449
- min: A,
450
- max: P,
451
- color: [
452
- x.palette.background.paper,
453
- m[0] ?? x.palette.primary.main
454
- ]
455
- } : void 0,
456
- valueFormatter: (r) => k ? L(r, k) : String(r),
457
- width: 62
458
- }
459
- ],
460
- children: [
461
- q && /* @__PURE__ */ e(
462
- bt,
463
- {
464
- lineStyle: {
465
- stroke: R ? x.palette.neutral.main : x.palette.neutral.dark,
466
- strokeDasharray: "10, 8",
467
- strokeWidth: 2
468
- },
469
- y: F
470
- }
471
- ),
472
- /* @__PURE__ */ e(
473
- vt,
474
- {
475
- onItemClick: W,
476
- ...t && {
477
- slots: {
478
- area: (r) => /* @__PURE__ */ i("g", { children: [
479
- /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ i("linearGradient", { id: "customGradient", x1: "0", x2: "0", y1: "0", y2: "1", children: [
480
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: t }),
481
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: t, stopOpacity: 0.02 })
482
- ] }) }),
483
- /* @__PURE__ */ e("path", { ...r, fill: "url(#customGradient)" })
484
- ] })
485
- }
486
- }
487
- }
488
- ),
489
- /* @__PURE__ */ e(
490
- St,
491
- {
492
- onItemClick: W,
493
- slots: {
494
- line: (r) => /* @__PURE__ */ e(
495
- Wt,
496
- {
497
- ...r,
498
- lineColor: t ?? r.ownerState.color ?? x.palette.primary.main
499
- }
500
- )
501
- }
502
- }
503
- ),
504
- /* @__PURE__ */ e(
505
- At,
506
- {
507
- onItemClick: W,
508
- slots: ht ? {
509
- mark: (r) => /* @__PURE__ */ e(
510
- jt,
511
- {
512
- handlers: Q,
513
- labelBackgroundColor: R,
514
- labelFontColor: X,
515
- labelFontSize: Y,
516
- showLabel: at,
517
- showMark: nt || r.dataIndex === h[0].length - 1,
518
- style: V?.(r.dataIndex) ?? {},
519
- valueFormatterString: k,
520
- yData: C,
521
- ...r
522
- }
523
- )
524
- } : void 0
525
- }
526
- ),
527
- /* @__PURE__ */ e(
528
- gt,
529
- {
530
- barLabel: (r) => Number(r.value) > 0 ? `$${r.value}` : null,
531
- borderRadius: 10
532
- }
533
- ),
534
- /* @__PURE__ */ e(
535
- wt,
536
- {
537
- disableLine: !ot,
538
- disableTicks: !lt,
539
- slotProps: a ? {
540
- axisLine: {
541
- style: {
542
- stroke: a
543
- }
544
- },
545
- axisTick: {
546
- style: {
547
- stroke: a
548
- }
549
- }
550
- } : {},
551
- sx: { ...f }
552
- }
553
- ),
554
- /* @__PURE__ */ e(
555
- Ct,
556
- {
557
- disableLine: !st,
558
- disableTicks: !ct,
559
- slotProps: a ? {
560
- axisLine: {
561
- style: {
562
- stroke: a
563
- }
564
- },
565
- axisTick: {
566
- style: {
567
- stroke: a
568
- }
569
- }
570
- } : {},
571
- sx: { ...y }
572
- }
573
- ),
574
- et && /* @__PURE__ */ e(Lt, { x: "line" }),
575
- it && /* @__PURE__ */ e(Mt, { trigger: "axis", children: /* @__PURE__ */ e(
576
- zt,
577
- {
578
- customLabels: n,
579
- isCurrency: D,
580
- labels: T,
581
- series: $,
582
- valueFormatterString: k
583
- }
584
- ) })
585
- ]
586
- }
587
- ),
588
- rt && /* @__PURE__ */ e(
589
- It,
590
- {
591
- average: q ? F : void 0,
592
- customLegendBoxSx: c,
593
- customLegendVariant: g,
594
- labels: T,
595
- series: $,
596
- style: {
597
- position: "absolute",
598
- top: 16,
599
- left: 16,
600
- ...s
601
- },
602
- title: dt,
603
- valueFormatterString: k
604
- }
605
- )
606
- ]
607
- }
608
- );
609
- };
610
- export {
611
- ne as L
612
- };
@@ -1,69 +0,0 @@
1
- import { jsxs as e, jsx as o } from "react/jsx-runtime";
2
- import b from "react";
3
- import { observer as v } from "mobx-react-lite";
4
- import x from "@mui/material/ListItem";
5
- import C from "@mui/material/ListItemButton";
6
- import I from "@mui/material/ListItemText";
7
- import L from "@mui/material/Stack";
8
- import { ChevronRight as _ } from "@mxenabled/mx-icons";
9
- import { Text as a } from "@mxenabled/mxui";
10
- import { u as g } from "./hooks-BaO_gOI6.mjs";
11
- import { D as j } from "./Dialog-Bvd2n8hz.mjs";
12
- const q = v(
13
- ({
14
- children: n,
15
- isDisabled: i = !1,
16
- isSaveDisabled: s = !1,
17
- label: l,
18
- onCancel: c,
19
- onSave: p,
20
- primaryText: f,
21
- secondaryText: y,
22
- zeroStateText: r
23
- }) => {
24
- const { common: m } = g(), [d, t] = b.useState(!1), u = () => {
25
- t(!1), c?.();
26
- }, h = () => {
27
- t(!1), p();
28
- };
29
- return /* @__PURE__ */ e(x, { children: [
30
- /* @__PURE__ */ e(C, { onClick: () => t(!i), children: [
31
- /* @__PURE__ */ o(
32
- I,
33
- {
34
- primary: /* @__PURE__ */ e(L, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
35
- /* @__PURE__ */ o(a, { variant: "body1", children: f }),
36
- /* @__PURE__ */ o(
37
- a,
38
- {
39
- bold: !0,
40
- color: r ? "primary.main" : "text.primary",
41
- sx: { mr: 4 },
42
- variant: "body1",
43
- children: r || y
44
- }
45
- )
46
- ] }),
47
- slotProps: { primary: { variant: "body1" } }
48
- }
49
- ),
50
- !i && !r && /* @__PURE__ */ o(_, {})
51
- ] }),
52
- /* @__PURE__ */ o(
53
- j,
54
- {
55
- copy: { title: l, close_aria: m.close_aria },
56
- disablePrimaryButton: s,
57
- isOpen: d,
58
- onClose: u,
59
- onPrimaryAction: h,
60
- primaryText: m.save_button,
61
- children: n
62
- }
63
- )
64
- ] });
65
- }
66
- );
67
- export {
68
- q as L
69
- };