@mx-cartographer/experiences 8.0.25 → 8.1.0

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 (146) hide show
  1. package/CHANGELOG.md +4 -9
  2. package/dist/{AccountApi-ChQr5PAZ.mjs → AccountApi-WEM2M9tg.mjs} +1 -1
  3. package/dist/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-IPRH6Wja.mjs} +2 -2
  4. package/dist/{AccountFields-CxqONzjY.mjs → AccountFields-BbPSfzru.mjs} +3 -3
  5. package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-qpACFl6i.mjs} +2 -2
  6. package/dist/{AccountStore-B7zfcad7.mjs → AccountStore-BeEiLNhW.mjs} +2 -2
  7. package/dist/Analytics-CjZ0emfs.mjs +53 -0
  8. package/dist/{Fetch-B6tMJC1r.mjs → ApiEndpoints-C5IA97i7.mjs} +48 -50
  9. package/dist/{BeatApi-EFHXULDx.mjs → BeatApi-C6pBa0Rb.mjs} +1 -1
  10. package/dist/{BeatStore-C6CAT-ce.mjs → BeatStore-DuvvrljY.mjs} +1 -1
  11. package/dist/{BudgetUtil-DZpOoZQa.mjs → BudgetUtil-CLh4xtj4.mjs} +60 -60
  12. package/dist/CategoryApi-CogDFScz.mjs +29 -0
  13. package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-BG04ByUx.mjs} +1 -1
  14. package/dist/CategoryStore-Bp1kO9Z-.mjs +160 -0
  15. package/dist/{CategoryUtil-BVixr0d5.mjs → CategoryUtil-DKRCegQv.mjs} +1 -1
  16. package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-BkNVHxSV.mjs} +14 -13
  17. package/dist/{CurrencyText-CA-E5N_y.mjs → CurrencyText-oqd6cX3M.mjs} +1 -1
  18. package/dist/{DateFormats-BMpMrZpW.mjs → DateFormats-CaOj_4eI.mjs} +1 -1
  19. package/dist/{DateUtil-wcYTmDRD.mjs → DateUtil-C57sqxn4.mjs} +1 -1
  20. package/dist/{EmbeddedCard-qwIhF1VP.mjs → EmbeddedCard-j7IGx3s1.mjs} +5 -5
  21. package/dist/{ExportCsvAction-CHCmCCqf.mjs → ExportCsvAction-7sjz7AXQ.mjs} +1 -1
  22. package/dist/FinstrongApi-FpmsS_sy.mjs +19 -0
  23. package/dist/{FinstrongStore-BQxXxxYD.mjs → FinstrongStore-DgyDJTEP.mjs} +121 -137
  24. package/dist/GlobalCopyApi-DkS-2Zf_.mjs +41 -0
  25. package/dist/Goal-MFBpoOIC.mjs +29 -0
  26. package/dist/{GoalStore-fgXt--2Y.mjs → GoalStore-DcaT4fM6.mjs} +81 -104
  27. package/dist/{Help-BkmSY96v.mjs → Help-cTsMzSQh.mjs} +1 -1
  28. package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DkD_s9NN.mjs} +1 -1
  29. package/dist/Localization-C_HZg9tJ.mjs +15 -0
  30. package/dist/Localization-CkQ49EKr.mjs +26 -0
  31. package/dist/{ManageIncome-DqqI9HB1.mjs → ManageIncome-DwSE_a8L.mjs} +20 -20
  32. package/dist/MerchantApi-D8ahYxiG.mjs +15 -0
  33. package/dist/MerchantStore-CyZTv-BM.mjs +26 -0
  34. package/dist/{NetWorthStore-BqZ44-4M.mjs → NetWorthStore-Ba3q3VcH.mjs} +1 -1
  35. package/dist/NotificationApi-DF0obHoR.mjs +20 -0
  36. package/dist/{NotificationSettings-DBT37CVB.mjs → NotificationSettings-DB-eNgSv.mjs} +3 -3
  37. package/dist/NotificationStore-DlAM5Ue0.mjs +69 -0
  38. package/dist/{NumberFormatting-QCaNwbjv.mjs → NumberFormatting-CyrvFgfd.mjs} +1 -1
  39. package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-AB1TGb5P.mjs} +2 -2
  40. package/dist/{RecurringSettings-OBGLelZQ.mjs → RecurringSettings-CZKeZC4m.mjs} +8 -8
  41. package/dist/{RecurringTransactions-BbZ6MQsX.mjs → RecurringTransactions-kzlU8OFY.mjs} +5 -5
  42. package/dist/{RecurringTransactionsStore-BE_eUfTC.mjs → RecurringTransactionsStore-D62Dt2BF.mjs} +76 -90
  43. package/dist/{RepeatingTransaction-DF4vJn_v.mjs → RepeatingTransaction-D2gmBTd0.mjs} +3 -3
  44. package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +17 -0
  45. package/dist/SettingsApi-D9d7SLhB.mjs +22 -0
  46. package/dist/{SettingsStore-BoIoiRLj.mjs → SettingsStore-Dsz1mvd3.mjs} +41 -60
  47. package/dist/{SpendingData-Bz1bCWAs.mjs → SpendingData-CoZOmlZD.mjs} +1 -1
  48. package/dist/{SpendingLegend-CypdabwS.mjs → SpendingLegend-DljKEG69.mjs} +2 -2
  49. package/dist/{Transaction-C3Pg9TKf.mjs → Transaction-Cn5_iFm0.mjs} +2 -2
  50. package/dist/{TransactionApi-Ck5Ua-7F.mjs → TransactionApi-CLG2eSNe.mjs} +1 -1
  51. package/dist/{TransactionDetails-I1ny1ecc.mjs → TransactionDetails-CN-yZkin.mjs} +9 -9
  52. package/dist/{TransactionStore-BUsgGRL1.mjs → TransactionStore-6ovFO8P1.mjs} +10 -10
  53. package/dist/{TrendsStore-CYdTo7cN.mjs → TrendsStore-DZa6cyQC.mjs} +1 -1
  54. package/dist/{ViewMoreMicroCard-BJOZcYnB.mjs → ViewMoreMicroCard-BsEitNRJ.mjs} +10 -9
  55. package/dist/WidgetApi-C0BA2cFX.mjs +102 -0
  56. package/dist/{WidgetContainer-DYKMArWw.mjs → WidgetContainer-Bc75FqK7.mjs} +1 -1
  57. package/dist/accounts/index.d.ts +0 -1
  58. package/dist/accounts/index.es.js +63 -65
  59. package/dist/accounts/stores/AccountStore.d.ts +1 -1
  60. package/dist/budgets/index.es.js +11 -11
  61. package/dist/budgets/store/BudgetsStore.d.ts +1 -1
  62. package/dist/cashflow/index.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +428 -449
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +2 -1
  66. package/dist/common/constants/index.d.ts +0 -1
  67. package/dist/common/index.d.ts +0 -1
  68. package/dist/common/index.es.js +389 -521
  69. package/dist/common/stores/AppDataStore.d.ts +2 -2
  70. package/dist/common/stores/ConnectStore.d.ts +1 -1
  71. package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
  72. package/dist/common/stores/UserStore.d.ts +1 -1
  73. package/dist/common/utils/Localization.d.ts +0 -9
  74. package/dist/common/utils/index.d.ts +1 -2
  75. package/dist/{accounts → core}/api/AccountApi.d.ts +2 -2
  76. package/dist/{common → core}/api/AnalyticsApi.d.ts +1 -1
  77. package/dist/{common → core}/api/AppDataApi.d.ts +2 -2
  78. package/dist/{common → core}/api/BannerApi.d.ts +1 -1
  79. package/dist/{common → core}/api/BeatApi.d.ts +2 -2
  80. package/dist/{budgets → core}/api/BudgetsApi.d.ts +2 -2
  81. package/dist/{common → core}/api/CategoryApi.d.ts +2 -2
  82. package/dist/{finstrong → core}/api/FinstrongApi.d.ts +2 -2
  83. package/dist/{common → core}/api/GlobalCopyApi.d.ts +2 -2
  84. package/dist/{goals → core}/api/GoalApi.d.ts +2 -2
  85. package/dist/{help → core}/api/HelpApi.d.ts +2 -2
  86. package/dist/{investments → core}/api/HoldingApi.d.ts +2 -2
  87. package/dist/{merchants → core}/api/MerchantApi.d.ts +2 -2
  88. package/dist/{common → core}/api/NotificationApi.d.ts +2 -2
  89. package/dist/{recurringtransactions → core}/api/RepeatingTransactionsApi.d.ts +2 -2
  90. package/dist/{common → core}/api/ScheduledPaymentsApi.d.ts +2 -2
  91. package/dist/{settings → core}/api/SettingsApi.d.ts +2 -2
  92. package/dist/{transactions → core}/api/TransactionApi.d.ts +2 -2
  93. package/dist/{common → core}/api/UserApi.d.ts +2 -2
  94. package/dist/{common → core}/api/WidgetApi.d.ts +1 -1
  95. package/dist/core/api/index.d.ts +20 -0
  96. package/dist/{common → core}/constants/ApiEndpoints.d.ts +0 -2
  97. package/dist/core/constants/index.d.ts +1 -0
  98. package/dist/core/index.d.ts +2 -0
  99. package/dist/core/index.es.js +90 -38
  100. package/dist/{common → core}/utils/Fetch.d.ts +1 -1
  101. package/dist/core/utils/Localization.d.ts +9 -0
  102. package/dist/core/utils/index.d.ts +2 -0
  103. package/dist/debts/index.es.js +7 -7
  104. package/dist/{exportTransactionsToCSV-DgdB3TBt.mjs → exportTransactionsToCSV-Dnd5lVq7.mjs} +2 -2
  105. package/dist/finstrong/index.d.ts +0 -1
  106. package/dist/finstrong/index.es.js +16 -17
  107. package/dist/finstrong/stores/FinstrongStore.d.ts +1 -1
  108. package/dist/goals/index.d.ts +0 -1
  109. package/dist/goals/index.es.js +50 -51
  110. package/dist/goals/stores/GoalStore.d.ts +1 -1
  111. package/dist/help/index.es.js +2 -2
  112. package/dist/help/store/HelpStore.d.ts +1 -1
  113. package/dist/insights/index.es.js +6 -6
  114. package/dist/insights/store/BeatStore.d.ts +1 -1
  115. package/dist/investments/index.es.js +2 -2
  116. package/dist/investments/stores/HoldingStore.d.ts +1 -1
  117. package/dist/merchants/index.es.js +1 -1
  118. package/dist/merchants/stores/MerchantStore.d.ts +1 -1
  119. package/dist/microinsights/index.es.js +1 -1
  120. package/dist/microinsights/stores/CopyStore.d.ts +1 -1
  121. package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
  122. package/dist/networth/index.es.js +8 -8
  123. package/dist/networth/stores/NetWorthStore.d.ts +1 -1
  124. package/dist/notifications/index.es.js +5 -5
  125. package/dist/notifications/stores/NotificationStore.d.ts +2 -1
  126. package/dist/recurringtransactions/index.es.js +26 -25
  127. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -1
  128. package/dist/settings/index.d.ts +0 -1
  129. package/dist/settings/index.es.js +65 -66
  130. package/dist/settings/stores/SettingsStore.d.ts +2 -2
  131. package/dist/spending/index.es.js +6 -6
  132. package/dist/transactions/index.d.ts +0 -1
  133. package/dist/transactions/index.es.js +22 -24
  134. package/dist/transactions/stores/TransactionStore.d.ts +3 -2
  135. package/dist/trends/index.es.js +14 -14
  136. package/package.json +1 -1
  137. package/dist/CategoryStore-FTxUbn0f.mjs +0 -186
  138. package/dist/Goal-0loDagc5.mjs +0 -6
  139. package/dist/Localization-CPkpIwIx.mjs +0 -37
  140. package/dist/MerchantStore-BzGi4JAZ.mjs +0 -37
  141. package/dist/NotificationStore-D_e8zo5M.mjs +0 -86
  142. package/dist/cashflow/api/CashflowApi.d.ts +0 -13
  143. package/dist/common/api/LocalizedCopyApi.d.ts +0 -8
  144. package/dist/common/api/index.d.ts +0 -10
  145. package/dist/repeatingTransactions-DHIG94pi.mjs +0 -4
  146. package/dist/useCombineEvents-Bqojlv8q.mjs +0 -92
@@ -0,0 +1,160 @@
1
+ import { makeAutoObservable as c } from "mobx";
2
+ import { getUnixTime as i } from "date-fns/getUnixTime";
3
+ import { subMonths as n } from "date-fns/subMonths";
4
+ import { startOfMonth as y } from "date-fns/startOfMonth";
5
+ import { endOfMonth as g } from "date-fns/endOfMonth";
6
+ import { C as d } from "./CategoryApi-CogDFScz.mjs";
7
+ import { a as u, g as C } from "./CategoryUtil-DKRCegQv.mjs";
8
+ import { b as l, c as T } from "./Category-CevNQ03n.mjs";
9
+ class m {
10
+ expandedGuid = null;
11
+ selectedGuid = null;
12
+ searchValue = "";
13
+ showSelected = !0;
14
+ shouldDisableDrawerScroll = !1;
15
+ unselectable = [];
16
+ unselectableText = "";
17
+ savedOnSelect;
18
+ // todo
19
+ constructor() {
20
+ c(this);
21
+ }
22
+ setExpandedGuid = (e) => this.expandedGuid = e;
23
+ setSelectedGuid = (e) => this.selectedGuid = e;
24
+ setSearchValue = (e) => this.searchValue = e;
25
+ setShouldDisableDrawerScroll = (e) => this.shouldDisableDrawerScroll = e;
26
+ setShowSelected = (e) => this.showSelected = e;
27
+ setUnselectable = (e) => this.unselectable = e;
28
+ setUnselectableText = (e) => this.unselectableText = e;
29
+ onSelect = (e) => this.savedOnSelect(e);
30
+ setOnSelect = (e) => this.savedOnSelect = e;
31
+ }
32
+ class E {
33
+ globalStore;
34
+ uiStore;
35
+ api = new d("/", "");
36
+ categories = [];
37
+ categoriesLoaded = !1;
38
+ categoriesLoading = !1;
39
+ dateRangeCategoryTotals = [];
40
+ monthlyCategoryTotals = [];
41
+ dateRangeTotalsLoaded = !1;
42
+ dateRangeTotalsLoading = !1;
43
+ monthlyTotalsLoaded = !1;
44
+ monthlyTotalsLoading = !1;
45
+ constructor(e) {
46
+ this.globalStore = e, this.uiStore = new m(), this.api = new d(e.endpoint, e.sessionToken, e.onError), c(this);
47
+ }
48
+ get detailedCategories() {
49
+ return this.globalStore.isInitialized ? u(
50
+ this.categories,
51
+ this.globalStore.copyStore.copy.categories,
52
+ this.dateRangeCategoryTotals,
53
+ this.monthlyCategoryTotals
54
+ ) : [];
55
+ }
56
+ get detailedCategoriesWithTransactions() {
57
+ return C(
58
+ this.detailedCategories,
59
+ this.globalStore.transactionStore.sortedTransactions
60
+ );
61
+ }
62
+ get incomeCategories() {
63
+ return this.detailedCategories.filter((e) => e.is_income);
64
+ }
65
+ get spendCategories() {
66
+ return this.detailedCategories.filter(
67
+ (e) => !e.is_income && !e.isTransfer && e.guid !== l.INVESTMENTS
68
+ );
69
+ }
70
+ get transferCategories() {
71
+ return this.detailedCategories.filter((e) => e.isTransfer);
72
+ }
73
+ setCategories = (e) => {
74
+ this.categories = e, this.categoriesLoading = !1, this.categoriesLoaded = !0;
75
+ };
76
+ setMonthlyCategoryTotals = (e) => {
77
+ this.monthlyCategoryTotals = e, this.monthlyTotalsLoading = !1, this.monthlyTotalsLoaded = !0;
78
+ };
79
+ setDateRangeCategoryTotals = (e) => {
80
+ this.dateRangeCategoryTotals = e, this.dateRangeTotalsLoading = !1, this.dateRangeTotalsLoaded = !0;
81
+ };
82
+ get trendsCategories() {
83
+ return this.detailedCategories.filter((e) => e.totalAmount !== 0).filter((e) => e.guid !== l.INVESTMENTS && e.guid !== l.TRANSFER);
84
+ }
85
+ addCategory = async (e, t) => {
86
+ const o = { name: e, parent_guid: t };
87
+ try {
88
+ await this.api.addCategory(o), await this.loadCategories();
89
+ } catch (a) {
90
+ console.error(`Error occurred while adding category: ${a}`);
91
+ }
92
+ };
93
+ loadCategories = async () => {
94
+ if (!this.categoriesLoading) {
95
+ this.categoriesLoading = !0;
96
+ try {
97
+ const e = await this.api.getCategories();
98
+ this.setCategories(e);
99
+ } catch (e) {
100
+ console.error(`Error occurred while getting categories: ${e}`);
101
+ }
102
+ }
103
+ };
104
+ loadDateRangeCategoryTotals = async (e, t, o) => {
105
+ if (!this.dateRangeTotalsLoading) {
106
+ this.dateRangeTotalsLoading = !0;
107
+ try {
108
+ const a = await this.api.getDateRangeCategoryTotals(
109
+ i(t),
110
+ i(o),
111
+ e
112
+ );
113
+ this.setDateRangeCategoryTotals(a);
114
+ } catch (a) {
115
+ console.error(`Error occurred while getting date range category totals: ${a}`);
116
+ }
117
+ }
118
+ };
119
+ loadMonthlyCategoryTotals = async (e = this.globalStore.globalUiStore.selectedAccounts, t, o) => {
120
+ if (this.monthlyTotalsLoading) return;
121
+ this.monthlyTotalsLoading = !0;
122
+ const a = i(y(t ?? n(/* @__PURE__ */ new Date(), 11))), s = i(g(o ?? /* @__PURE__ */ new Date()));
123
+ try {
124
+ const r = await this.api.getMonthlyCategoryTotals(a, s, e);
125
+ this.setMonthlyCategoryTotals(r);
126
+ } catch (r) {
127
+ console.error(`Error occurred while getting monthly category totals: ${r}`);
128
+ }
129
+ };
130
+ reloadCategoryTotals = async (e, t, o) => {
131
+ const a = t ?? n(/* @__PURE__ */ new Date(), 11), s = o ?? g(/* @__PURE__ */ new Date());
132
+ try {
133
+ await Promise.all([
134
+ this.loadMonthlyCategoryTotals(e, a, s),
135
+ this.loadDateRangeCategoryTotals(e, a, s)
136
+ ]);
137
+ } catch (r) {
138
+ console.error(`Error occurred while getting category totals: ${r}`);
139
+ }
140
+ };
141
+ removeCategory = async (e) => {
142
+ try {
143
+ await this.api.removeCategory(e), await this.loadCategories();
144
+ } catch (t) {
145
+ console.error(`Error occurred while removing category: ${t}`);
146
+ }
147
+ };
148
+ updateCategory = async (e) => {
149
+ try {
150
+ await this.api.updateCategory(e), await this.loadCategories();
151
+ } catch (t) {
152
+ console.error(`Error occurred while updating category: ${t}`);
153
+ }
154
+ };
155
+ // TODO: Remove this after refactoring Trends components to use detailedCategories
156
+ getCategoryName = (e) => this.categories.find((o) => o.guid === e)?.name ?? T[e];
157
+ }
158
+ export {
159
+ E as C
160
+ };
@@ -4,7 +4,7 @@ import { startOfToday as C } from "date-fns/startOfToday";
4
4
  import { subMonths as N } from "date-fns/subMonths";
5
5
  import { CategoryIconList as O } from "@mxenabled/mxui";
6
6
  import { C as b, a as D, b as E } from "./Category-CevNQ03n.mjs";
7
- import { f as R, D as v } from "./DateFormats-BMpMrZpW.mjs";
7
+ import { f as R, D as v } from "./DateFormats-CaOj_4eI.mjs";
8
8
  const H = 3, f = 12, k = (t, o, e, r) => t.filter((n) => !n.parent_guid).map(
9
9
  (n) => p(
10
10
  n,
@@ -1,17 +1,18 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import u from "react";
2
+ import i from "react";
3
3
  import { css as k } from "@mxenabled/cssinjs";
4
4
  import { v4 as q } from "uuid";
5
5
  import { TextField as B, P as _ } from "@mxenabled/mxui";
6
- import { g as L, C as O, f as y, M as C } from "./NumberFormatting-QCaNwbjv.mjs";
6
+ import { g as L, C as O, f as y, M as C } from "./NumberFormatting-CyrvFgfd.mjs";
7
7
  import { u as W } from "./hooks-BxkfR-Ff.mjs";
8
- import { b, g } from "./Localization-CPkpIwIx.mjs";
8
+ import { b } from "./Localization-CkQ49EKr.mjs";
9
+ import { g } from "./Localization-C_HZg9tJ.mjs";
9
10
  const j = ({
10
11
  allowDecimals: o = !0,
11
12
  ariaLabel: h,
12
13
  amount: c,
13
14
  amountIsRequired: $ = !0,
14
- copy: i,
15
+ copy: u,
15
16
  customValidate: M = () => !0,
16
17
  errorText: S = "",
17
18
  label: a,
@@ -20,9 +21,9 @@ const j = ({
20
21
  setHasValidInput: e,
21
22
  ...N
22
23
  }) => {
23
- const [d, t] = u.useState(""), { common: P } = W(), n = i || P.currency_input, R = F(), A = /^[0-9]*$/, E = /^(\d)*(\,)?([0-9]{1,2})?$/, T = /^(\d)*(\.)?([0-9]{1,2})?$/;
24
+ const [p, t] = i.useState(""), { common: P } = W(), n = u || P.currency_input, R = F(), A = /^[0-9]*$/, E = /^(\d)*(\,)?([0-9]{1,2})?$/, T = /^(\d)*(\.)?([0-9]{1,2})?$/;
24
25
  let s;
25
- const p = u.useRef(q());
26
+ const d = i.useRef(q());
26
27
  if (o)
27
28
  switch (L()) {
28
29
  case O.CAD:
@@ -34,7 +35,7 @@ const j = ({
34
35
  }
35
36
  else
36
37
  s = A;
37
- u.useEffect(() => {
38
+ i.useEffect(() => {
38
39
  l(c);
39
40
  }, [c]);
40
41
  const l = (r) => {
@@ -58,10 +59,10 @@ const j = ({
58
59
  startAdornment: g().includes("fr-ca") ? void 0 : /* @__PURE__ */ m(_, { children: "$" })
59
60
  },
60
61
  className: `mx-cmn-currency-input ${R}`,
61
- error: !!d,
62
- helperText: d,
62
+ error: !!p,
63
+ helperText: p,
63
64
  hiddenLabel: !a,
64
- id: `currency-input-${p.current}`,
65
+ id: `currency-input-${d.current}`,
65
66
  inputMode: o ? "decimal" : "numeric",
66
67
  inputProps: {
67
68
  "aria-label": h || n.enter_amount,
@@ -69,7 +70,7 @@ const j = ({
69
70
  pattern: o ? "[0-9]*\\.?[0-9]*" : "[0-9]*"
70
71
  },
71
72
  label: a,
72
- name: `currency-input-${p.current}`,
73
+ name: `currency-input-${d.current}`,
73
74
  onChange: (r) => l(r.target.value),
74
75
  value: c,
75
76
  ...N
@@ -79,7 +80,7 @@ const j = ({
79
80
  "& .MuiInputBase-adornedStart > .p": {
80
81
  marginRight: 4
81
82
  }
82
- }), J = j;
83
+ }), K = j;
83
84
  export {
84
- J as C
85
+ K as C
85
86
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i } from "react/jsx-runtime";
2
2
  import { P as u } from "@mxenabled/mxui";
3
- import { f as a } from "./NumberFormatting-QCaNwbjv.mjs";
3
+ import { f as a } from "./NumberFormatting-CyrvFgfd.mjs";
4
4
  const y = ({
5
5
  isIncome: e = !1,
6
6
  amount: o = 0,
@@ -1,5 +1,5 @@
1
1
  import { intlFormat as t } from "date-fns/intlFormat";
2
- import { g as _ } from "./Localization-CPkpIwIx.mjs";
2
+ import { g as _ } from "./Localization-C_HZg9tJ.mjs";
3
3
  const m = "do", a = "MMM do, yyyy", O = {
4
4
  TIME_STAMP_HOUR_MINUTE: {
5
5
  hour: "numeric",
@@ -8,7 +8,7 @@ import { nextDay as p } from "date-fns/nextDay";
8
8
  import { setDate as y } from "date-fns/setDate";
9
9
  import { startOfToday as r } from "date-fns/startOfToday";
10
10
  import { fromUnixTime as i } from "date-fns/fromUnixTime";
11
- import { f as D, D as f } from "./DateFormats-BMpMrZpW.mjs";
11
+ import { f as D, D as f } from "./DateFormats-CaOj_4eI.mjs";
12
12
  const A = (e) => {
13
13
  const t = x(e);
14
14
  let o = p(e, t);
@@ -5,7 +5,7 @@ import Y from "@mui/material/Button";
5
5
  import c from "@mui/material/Stack";
6
6
  import { Icon as E, P as N, H3 as P, Text as f, MerchantLogo as tt, H2 as et } from "@mxenabled/mxui";
7
7
  import { Receipt as rt, Icon as nt } from "@mxenabled/mx-icons";
8
- import { L as it, O as ot, e as at } from "./exportTransactionsToCSV-DgdB3TBt.mjs";
8
+ import { L as it, O as ot, e as at } from "./exportTransactionsToCSV-Dnd5lVq7.mjs";
9
9
  import { observer as H } from "mobx-react-lite";
10
10
  import { useVirtualizer as st } from "@tanstack/react-virtual";
11
11
  import lt from "@mui/material/Divider";
@@ -14,12 +14,12 @@ import { G as dt, h as W, u as O, g as ht, b as mt } from "./hooks-BxkfR-Ff.mjs"
14
14
  import pt from "@mui/material/ListItemAvatar";
15
15
  import ut from "@mui/material/ListItemText";
16
16
  import { useTheme as z } from "@mui/material/styles";
17
- import { a as ft } from "./Transaction-C3Pg9TKf.mjs";
18
- import { f as B } from "./NumberFormatting-QCaNwbjv.mjs";
17
+ import { T as ft } from "./Transaction-Cn5_iFm0.mjs";
18
+ import { f as B } from "./NumberFormatting-CyrvFgfd.mjs";
19
19
  import { fromUnixTime as R } from "date-fns/fromUnixTime";
20
20
  import { isSameDay as Z } from "date-fns/isSameDay";
21
- import { f as gt, D as xt } from "./DateFormats-BMpMrZpW.mjs";
22
- import { h as bt } from "./DateUtil-wcYTmDRD.mjs";
21
+ import { f as gt, D as xt } from "./DateFormats-CaOj_4eI.mjs";
22
+ import { h as bt } from "./DateUtil-C57sqxn4.mjs";
23
23
  import { L as Q } from "./Loader-D3rjKx72.mjs";
24
24
  import { A as yt } from "./Analytics-0Xm_BjHU.mjs";
25
25
  import _t from "@mui/material/Tab";
@@ -1,7 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { observer as c } from "mobx-react-lite";
3
3
  import { Icon as i } from "@mxenabled/mxui";
4
- import { O as p, e as m } from "./exportTransactionsToCSV-DgdB3TBt.mjs";
4
+ import { O as p, e as m } from "./exportTransactionsToCSV-Dnd5lVq7.mjs";
5
5
  import { R as x } from "./ResponsiveButton-DZFp78fJ.mjs";
6
6
  import { g as _, h as C, u as l } from "./hooks-BxkfR-Ff.mjs";
7
7
  const v = ({ filter: t }) => {
@@ -0,0 +1,19 @@
1
+ import { F as a, A as e } from "./ApiEndpoints-C5IA97i7.mjs";
2
+ class h {
3
+ fetchInstance;
4
+ constructor(t, n, s) {
5
+ this.fetchInstance = new a(t, n, void 0, s);
6
+ }
7
+ calculateHealthScore = async () => this.fetchInstance.post(`${e.HEALTH_SCORES}/calculate`).then((t) => t.health_score);
8
+ getAverageHealthScores = async () => this.fetchInstance.get(`${e.HEALTH_SCORES}/monthly_averages`).then((t) => t);
9
+ getDebtSpend = async () => this.fetchInstance.get(`${e.HEALTH_SCORES}/transactions/debt_spend`).then((t) => t);
10
+ getIncome = async () => this.fetchInstance.get(`${e.HEALTH_SCORES}/transactions/income`).then((t) => t);
11
+ getMonthlySummaries = async () => this.fetchInstance.get(`${e.HEALTH_SCORES}/monthly_summaries`).then((t) => t);
12
+ getHealthScoreChangeReports = async (t, n) => this.fetchInstance.get(`${e.HEALTH_SCORES}/change_report/from/${t}/to/${n}`).then((s) => s);
13
+ getPeerScore = async (t) => this.fetchInstance.get(`${e.HEALTH_SCORES}/average/${t}`).then((n) => n);
14
+ getSpendingFeeTransactions = async () => this.fetchInstance.get(`${e.HEALTH_SCORES}/transactions/spending_fee`).then((t) => t);
15
+ getStandardSpend = async () => this.fetchInstance.get(`${e.HEALTH_SCORES}/transactions/standard_spend`).then((t) => t);
16
+ }
17
+ export {
18
+ h as F
19
+ };