@mx-cartographer/experiences 8.0.0-alpha.bb3 → 8.0.0-alpha.sms1

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 (182) hide show
  1. package/CHANGELOG.md +128 -1
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-BDXA6PWh.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-CUztd3-b.mjs} +87 -83
  4. package/dist/AccountDetailsHeader-i3KFhNuo.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-QZspYAji.mjs} +6 -6
  6. package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-DX5upmCS.mjs} +5 -5
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-BcnDpyLL.mjs} +19 -8
  8. package/dist/{Accounts-BRf_YeTf.mjs → Accounts-DXfZotRC.mjs} +1 -1
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-Df2nII9u.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +23 -21
  13. package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-DTgyAMM7.mjs} +12 -10
  14. package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-C5cR-nfQ.mjs} +1 -1
  15. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-BIbTqYOH.mjs} +2 -2
  16. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-BFfY3_zB.mjs} +3 -3
  17. package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-BFKcs-_K.mjs} +2 -2
  18. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  19. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  20. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-BbJB0nmu.mjs} +1 -1
  21. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  22. package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
  23. package/dist/Drawer-BEtCk82g.mjs +163 -0
  24. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  25. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
  26. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  27. package/dist/FinstrongStore-BIrX0Xg2.mjs +451 -0
  28. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-DpWY3gVb.mjs} +5 -5
  29. package/dist/{Help-B6dIcujh.mjs → Help-BnPXM_N2.mjs} +2 -2
  30. package/dist/LineChart-bc1D9xBE.mjs +581 -0
  31. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-uobBrm_a.mjs} +10 -10
  32. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-NpXHhO1n.mjs} +177 -174
  33. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  34. package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
  35. package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
  36. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-lsuhEpn6.mjs} +2 -2
  37. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-CNmJWVeI.mjs} +241 -238
  38. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
  39. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  40. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +4 -4
  41. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-CqZh1SQa.mjs} +17 -17
  42. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-BKcYmpv3.mjs} +46 -45
  43. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-Ni5tSQIO.mjs} +80 -73
  44. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
  45. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  46. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
  47. package/dist/SpendingLegend-CjX-hX2O.mjs +193 -0
  48. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  49. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  50. package/dist/TransactionDetails-5M2vfr59.mjs +1379 -0
  51. package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-D-Q3BU9Z.mjs} +119 -121
  52. package/dist/TrendsStore-BW9FGQeE.mjs +182 -0
  53. package/dist/{User-BQUxBeZV.mjs → User-wXzDI4M8.mjs} +2 -2
  54. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-C0832BMe.mjs} +702 -723
  55. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-BhQ1Kx2z.mjs} +4 -4
  56. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  57. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  58. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  59. package/dist/accounts/index.es.js +229 -222
  60. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  61. package/dist/analytics/index.es.js +2 -2
  62. package/dist/budgets/index.es.js +380 -382
  63. package/dist/cashflow/index.es.js +405 -413
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +1 -1
  66. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  67. package/dist/common/components/Select.d.ts +4 -2
  68. package/dist/common/components/charts/LineChart.d.ts +12 -2
  69. package/dist/common/components/charts/index.d.ts +0 -3
  70. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  71. package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
  72. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  73. package/dist/common/components/drawer/Footer.d.ts +17 -0
  74. package/dist/common/hooks/index.d.ts +0 -1
  75. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  76. package/dist/common/index.es.js +320 -321
  77. package/dist/common/stores/GlobalStore.d.ts +7 -1
  78. package/dist/common/types/Finstrong.d.ts +54 -0
  79. package/dist/common/types/Global.d.ts +1 -0
  80. package/dist/common/types/Widgets.d.ts +1 -0
  81. package/dist/common/types/index.d.ts +1 -1
  82. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  83. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  84. package/dist/dashboard/index.es.js +2 -2
  85. package/dist/debts/index.es.js +506 -498
  86. package/dist/exportTransactionsToCSV-Cz2t0lmA.mjs +48 -0
  87. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  88. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  89. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  90. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  91. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  92. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  93. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  94. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  95. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  96. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  97. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  98. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  99. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  100. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  101. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  102. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  103. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  104. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  105. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  106. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  107. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  108. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  109. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  110. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  111. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  112. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  113. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  114. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  115. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  116. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  117. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  118. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  119. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  120. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  121. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  122. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  123. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  124. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  125. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  126. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  127. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  128. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  129. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  130. package/dist/finstrong/constants/index.d.ts +9 -0
  131. package/dist/finstrong/index.es.js +3171 -1063
  132. package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
  133. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  134. package/dist/goals/index.es.js +566 -562
  135. package/dist/help/index.es.js +3 -3
  136. package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
  137. package/dist/insights/index.es.js +1 -1
  138. package/dist/investments/index.es.js +437 -435
  139. package/dist/merchants/index.es.js +2 -2
  140. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
  141. package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
  142. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
  143. package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
  144. package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
  145. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
  146. package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
  147. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  148. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
  149. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
  150. package/dist/microinsights/constants/App.d.ts +0 -1
  151. package/dist/microinsights/index.d.ts +3 -3
  152. package/dist/microinsights/index.es.js +7 -7
  153. package/dist/microinsights/interfaces.d.ts +0 -6
  154. package/dist/networth/index.es.js +188 -186
  155. package/dist/notifications/index.es.js +95 -96
  156. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  157. package/dist/recurringtransactions/index.es.js +584 -560
  158. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
  159. package/dist/settings/index.es.js +286 -280
  160. package/dist/spending/index.es.js +269 -421
  161. package/dist/spending/utils/SpendingData.d.ts +2 -1
  162. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  163. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  164. package/dist/transactions/index.es.js +226 -220
  165. package/dist/transactions/stores/TransactionStore.d.ts +1 -1
  166. package/dist/transactions/stores/UiStore.d.ts +0 -2
  167. package/dist/trends/index.es.js +963 -586
  168. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CFNF8766.mjs} +2 -2
  169. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
  170. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  171. package/package.json +7 -7
  172. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  173. package/dist/Drawer-kEE73B87.mjs +0 -113
  174. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  175. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  176. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  177. package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
  178. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  179. package/dist/common/hooks/usePrevious.d.ts +0 -2
  180. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  181. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  182. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -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,86 +0,0 @@
1
- import { F as T, A as e } from "./Fetch-87LIQbEA.mjs";
2
- class u {
3
- fetchInstance;
4
- constructor(t, n, a) {
5
- this.fetchInstance = new T(t, n, void 0, a);
6
- }
7
- addTag = async (t) => this.fetchInstance.post(e.TAGS, t).then((n) => n.tag);
8
- addTagging = async (t) => this.fetchInstance.post(e.TAGGINGS, t).then((n) => n.tagging);
9
- addTransaction = async (t) => this.fetchInstance.post(e.TRANSACTIONS, t).then((n) => n.transaction);
10
- addTransactionRule = async (t) => this.fetchInstance.post(e.TRANSACTION_RULES, t).then((n) => n);
11
- getTaggings = async () => this.fetchInstance.get(e.TAGGINGS).then((t) => t.map((n) => n.tagging));
12
- getTags = async () => this.fetchInstance.get(e.TAGS).then((t) => t.map((n) => n.tag));
13
- getTransactionRules = async () => this.fetchInstance.get(e.TRANSACTION_RULES).then((t) => t.transaction_rules);
14
- getTransactionsByDateRange = async (t, n) => this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${t}/${n}`).then((a) => a.map((s) => s.transaction));
15
- // DEPRECATED
16
- getTransactionsByAccountsAndDateRange = async (t, n, a) => {
17
- console.warn("DEPRECATED: getTransactionsByAccountsAndDateRange will be removed");
18
- const s = t.reduce(
19
- (o, c, r) => `${o}account_guids[]=${c}${r !== t.length - 1 ? "&" : ""}`,
20
- ""
21
- );
22
- return this.fetchInstance.get(`${e.TRANSACTIONS}/by_date/${n}/${a}?${s}`).then((o) => o.map((c) => c.transaction));
23
- };
24
- // DEPRECATED
25
- getTransactionsByGuids = async (t) => (console.warn("DEPRECATED: getTransactionsByGuids will be removed"), this.fetchInstance.post(`${e.TRANSACTIONS}/by_guids`, { guids: t.join("+") }).then((n) => n.map((a) => a.transaction)));
26
- // DEPRECATED
27
- getTransactionsByCategoryAndDate = async (t, n, a) => (console.warn("DEPRECATED: getTransactionsByCategoryAndDate will be removed"), this.fetchInstance.get(
28
- `${e.TRANSACTIONS}/by_category_guid/${t}/by_date/${n}/${a}`
29
- ).then((s) => s.map((o) => o.transaction)));
30
- // DEPRECATED
31
- getTransactionsByCategoryDateAndAccounts = async (t, n, a, s) => {
32
- console.warn("DEPRECATED: getTransactionsByCategoryDateAndAccounts will be removed");
33
- const o = s.reduce(
34
- (c, r, i) => `${c}account_guids[]=${r}${i !== s.length - 1 ? "&" : ""}`,
35
- ""
36
- );
37
- return this.fetchInstance.get(
38
- `${e.TRANSACTIONS}/by_category_guid/${t}/by_date/${n}/${a}?${o}`
39
- ).then((c) => c.map((r) => r.transaction));
40
- };
41
- // DEPRECATED
42
- getTransactionsByCategoriesDateAndAccounts = async (t, n, a, s) => {
43
- console.warn("DEPRECATED: getTransactionsByCategoriesDateAndAccounts will be removed");
44
- const o = s.reduce(
45
- (c, r, i) => `${c}account_guids[]=${r}${i !== s.length - 1 ? "&" : ""}`,
46
- ""
47
- );
48
- return this.fetchInstance.get(
49
- `${e.TRANSACTIONS}/by_category_guids/${t.join(
50
- "+"
51
- )}/by_date/${n}/${a}?${o}`
52
- ).then((c) => c.map((r) => r.transaction));
53
- };
54
- /**
55
- * DEPRECATED
56
- * Get all transactions by the top level category, between begin date and end date, and optionally
57
- * filtered by accounts
58
- * @param categoryGuid The top level category guid
59
- * @param beginDate the start date
60
- * @param endDate the end date
61
- * @param accountGuids an optional list of account guids
62
- */
63
- getTransactionsByTopLevelCategoryAndDate = async (t, n, a, s = []) => {
64
- console.warn("DEPRECATED: getTransactionsByTopLevelCategoryAndDate will be removed");
65
- let o = `${e.TRANSACTIONS}/by_top_level_category_guid/${t}/by_date/${n}/${a}`;
66
- if (s.length > 0) {
67
- const c = s.reduce(
68
- (r, i, g) => `${r}account_guids[]=${i}${g !== s.length - 1 ? "&" : ""}`,
69
- ""
70
- );
71
- o += `?${c}`;
72
- }
73
- return this.fetchInstance.get(o).then((c) => c.map((r) => r.transaction));
74
- };
75
- removeTag = async (t) => this.fetchInstance.delete(`${e.TAGS}/${t}`).then((n) => n);
76
- removeTagging = async (t) => this.fetchInstance.delete(`${e.TAGGINGS}/${t}`).then((n) => n);
77
- removeTransaction = async (t) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${t}`).then((n) => n);
78
- removeTransactionRule = async (t) => this.fetchInstance.delete(`${e.TRANSACTION_RULES}/${t}`);
79
- removeTransactionSplit = async (t) => this.fetchInstance.delete(`${e.TRANSACTIONS}/${t}/unsplit`).then((n) => n);
80
- updateTransactionRule = async (t) => this.fetchInstance.put(`${e.TRANSACTION_RULES}/${t.guid}`, t).then((n) => n);
81
- updateTag = async (t) => this.fetchInstance.put(`${e.TAGS}/${t.guid}`, t).then((n) => n.tag);
82
- updateTransaction = async (t) => this.fetchInstance.put(`${e.TRANSACTIONS}/${t.guid}`, t).then((n) => n.transaction);
83
- }
84
- export {
85
- u as T
86
- };