@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.
- package/CHANGELOG.md +4 -9
- package/dist/{AccountApi-ChQr5PAZ.mjs → AccountApi-WEM2M9tg.mjs} +1 -1
- package/dist/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-IPRH6Wja.mjs} +2 -2
- package/dist/{AccountFields-CxqONzjY.mjs → AccountFields-BbPSfzru.mjs} +3 -3
- package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-qpACFl6i.mjs} +2 -2
- package/dist/{AccountStore-B7zfcad7.mjs → AccountStore-BeEiLNhW.mjs} +2 -2
- package/dist/Analytics-CjZ0emfs.mjs +53 -0
- package/dist/{Fetch-B6tMJC1r.mjs → ApiEndpoints-C5IA97i7.mjs} +48 -50
- package/dist/{BeatApi-EFHXULDx.mjs → BeatApi-C6pBa0Rb.mjs} +1 -1
- package/dist/{BeatStore-C6CAT-ce.mjs → BeatStore-DuvvrljY.mjs} +1 -1
- package/dist/{BudgetUtil-DZpOoZQa.mjs → BudgetUtil-CLh4xtj4.mjs} +60 -60
- package/dist/CategoryApi-CogDFScz.mjs +29 -0
- package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-BG04ByUx.mjs} +1 -1
- package/dist/CategoryStore-Bp1kO9Z-.mjs +160 -0
- package/dist/{CategoryUtil-BVixr0d5.mjs → CategoryUtil-DKRCegQv.mjs} +1 -1
- package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-BkNVHxSV.mjs} +14 -13
- package/dist/{CurrencyText-CA-E5N_y.mjs → CurrencyText-oqd6cX3M.mjs} +1 -1
- package/dist/{DateFormats-BMpMrZpW.mjs → DateFormats-CaOj_4eI.mjs} +1 -1
- package/dist/{DateUtil-wcYTmDRD.mjs → DateUtil-C57sqxn4.mjs} +1 -1
- package/dist/{EmbeddedCard-qwIhF1VP.mjs → EmbeddedCard-j7IGx3s1.mjs} +5 -5
- package/dist/{ExportCsvAction-CHCmCCqf.mjs → ExportCsvAction-7sjz7AXQ.mjs} +1 -1
- package/dist/FinstrongApi-FpmsS_sy.mjs +19 -0
- package/dist/{FinstrongStore-BQxXxxYD.mjs → FinstrongStore-DgyDJTEP.mjs} +121 -137
- package/dist/GlobalCopyApi-DkS-2Zf_.mjs +41 -0
- package/dist/Goal-MFBpoOIC.mjs +29 -0
- package/dist/{GoalStore-fgXt--2Y.mjs → GoalStore-DcaT4fM6.mjs} +81 -104
- package/dist/{Help-BkmSY96v.mjs → Help-cTsMzSQh.mjs} +1 -1
- package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DkD_s9NN.mjs} +1 -1
- package/dist/Localization-C_HZg9tJ.mjs +15 -0
- package/dist/Localization-CkQ49EKr.mjs +26 -0
- package/dist/{ManageIncome-DqqI9HB1.mjs → ManageIncome-DwSE_a8L.mjs} +20 -20
- package/dist/MerchantApi-D8ahYxiG.mjs +15 -0
- package/dist/MerchantStore-CyZTv-BM.mjs +26 -0
- package/dist/{NetWorthStore-BqZ44-4M.mjs → NetWorthStore-Ba3q3VcH.mjs} +1 -1
- package/dist/NotificationApi-DF0obHoR.mjs +20 -0
- package/dist/{NotificationSettings-DBT37CVB.mjs → NotificationSettings-DB-eNgSv.mjs} +3 -3
- package/dist/NotificationStore-DlAM5Ue0.mjs +69 -0
- package/dist/{NumberFormatting-QCaNwbjv.mjs → NumberFormatting-CyrvFgfd.mjs} +1 -1
- package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-AB1TGb5P.mjs} +2 -2
- package/dist/{RecurringSettings-OBGLelZQ.mjs → RecurringSettings-CZKeZC4m.mjs} +8 -8
- package/dist/{RecurringTransactions-BbZ6MQsX.mjs → RecurringTransactions-kzlU8OFY.mjs} +5 -5
- package/dist/{RecurringTransactionsStore-BE_eUfTC.mjs → RecurringTransactionsStore-D62Dt2BF.mjs} +76 -90
- package/dist/{RepeatingTransaction-DF4vJn_v.mjs → RepeatingTransaction-D2gmBTd0.mjs} +3 -3
- package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +17 -0
- package/dist/SettingsApi-D9d7SLhB.mjs +22 -0
- package/dist/{SettingsStore-BoIoiRLj.mjs → SettingsStore-Dsz1mvd3.mjs} +41 -60
- package/dist/{SpendingData-Bz1bCWAs.mjs → SpendingData-CoZOmlZD.mjs} +1 -1
- package/dist/{SpendingLegend-CypdabwS.mjs → SpendingLegend-DljKEG69.mjs} +2 -2
- package/dist/{Transaction-C3Pg9TKf.mjs → Transaction-Cn5_iFm0.mjs} +2 -2
- package/dist/{TransactionApi-Ck5Ua-7F.mjs → TransactionApi-CLG2eSNe.mjs} +1 -1
- package/dist/{TransactionDetails-I1ny1ecc.mjs → TransactionDetails-CN-yZkin.mjs} +9 -9
- package/dist/{TransactionStore-BUsgGRL1.mjs → TransactionStore-6ovFO8P1.mjs} +10 -10
- package/dist/{TrendsStore-CYdTo7cN.mjs → TrendsStore-DZa6cyQC.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-BJOZcYnB.mjs → ViewMoreMicroCard-BsEitNRJ.mjs} +10 -9
- package/dist/WidgetApi-C0BA2cFX.mjs +102 -0
- package/dist/{WidgetContainer-DYKMArWw.mjs → WidgetContainer-Bc75FqK7.mjs} +1 -1
- package/dist/accounts/index.d.ts +0 -1
- package/dist/accounts/index.es.js +63 -65
- package/dist/accounts/stores/AccountStore.d.ts +1 -1
- package/dist/budgets/index.es.js +11 -11
- package/dist/budgets/store/BudgetsStore.d.ts +1 -1
- package/dist/cashflow/index.d.ts +0 -1
- package/dist/cashflow/index.es.js +428 -449
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +2 -1
- package/dist/common/constants/index.d.ts +0 -1
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.es.js +389 -521
- package/dist/common/stores/AppDataStore.d.ts +2 -2
- package/dist/common/stores/ConnectStore.d.ts +1 -1
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
- package/dist/common/stores/UserStore.d.ts +1 -1
- package/dist/common/utils/Localization.d.ts +0 -9
- package/dist/common/utils/index.d.ts +1 -2
- package/dist/{accounts → core}/api/AccountApi.d.ts +2 -2
- package/dist/{common → core}/api/AnalyticsApi.d.ts +1 -1
- package/dist/{common → core}/api/AppDataApi.d.ts +2 -2
- package/dist/{common → core}/api/BannerApi.d.ts +1 -1
- package/dist/{common → core}/api/BeatApi.d.ts +2 -2
- package/dist/{budgets → core}/api/BudgetsApi.d.ts +2 -2
- package/dist/{common → core}/api/CategoryApi.d.ts +2 -2
- package/dist/{finstrong → core}/api/FinstrongApi.d.ts +2 -2
- package/dist/{common → core}/api/GlobalCopyApi.d.ts +2 -2
- package/dist/{goals → core}/api/GoalApi.d.ts +2 -2
- package/dist/{help → core}/api/HelpApi.d.ts +2 -2
- package/dist/{investments → core}/api/HoldingApi.d.ts +2 -2
- package/dist/{merchants → core}/api/MerchantApi.d.ts +2 -2
- package/dist/{common → core}/api/NotificationApi.d.ts +2 -2
- package/dist/{recurringtransactions → core}/api/RepeatingTransactionsApi.d.ts +2 -2
- package/dist/{common → core}/api/ScheduledPaymentsApi.d.ts +2 -2
- package/dist/{settings → core}/api/SettingsApi.d.ts +2 -2
- package/dist/{transactions → core}/api/TransactionApi.d.ts +2 -2
- package/dist/{common → core}/api/UserApi.d.ts +2 -2
- package/dist/{common → core}/api/WidgetApi.d.ts +1 -1
- package/dist/core/api/index.d.ts +20 -0
- package/dist/{common → core}/constants/ApiEndpoints.d.ts +0 -2
- package/dist/core/constants/index.d.ts +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.es.js +90 -38
- package/dist/{common → core}/utils/Fetch.d.ts +1 -1
- package/dist/core/utils/Localization.d.ts +9 -0
- package/dist/core/utils/index.d.ts +2 -0
- package/dist/debts/index.es.js +7 -7
- package/dist/{exportTransactionsToCSV-DgdB3TBt.mjs → exportTransactionsToCSV-Dnd5lVq7.mjs} +2 -2
- package/dist/finstrong/index.d.ts +0 -1
- package/dist/finstrong/index.es.js +16 -17
- package/dist/finstrong/stores/FinstrongStore.d.ts +1 -1
- package/dist/goals/index.d.ts +0 -1
- package/dist/goals/index.es.js +50 -51
- package/dist/goals/stores/GoalStore.d.ts +1 -1
- package/dist/help/index.es.js +2 -2
- package/dist/help/store/HelpStore.d.ts +1 -1
- package/dist/insights/index.es.js +6 -6
- package/dist/insights/store/BeatStore.d.ts +1 -1
- package/dist/investments/index.es.js +2 -2
- package/dist/investments/stores/HoldingStore.d.ts +1 -1
- package/dist/merchants/index.es.js +1 -1
- package/dist/merchants/stores/MerchantStore.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/stores/CopyStore.d.ts +1 -1
- package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
- package/dist/networth/index.es.js +8 -8
- package/dist/networth/stores/NetWorthStore.d.ts +1 -1
- package/dist/notifications/index.es.js +5 -5
- package/dist/notifications/stores/NotificationStore.d.ts +2 -1
- package/dist/recurringtransactions/index.es.js +26 -25
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -1
- package/dist/settings/index.d.ts +0 -1
- package/dist/settings/index.es.js +65 -66
- package/dist/settings/stores/SettingsStore.d.ts +2 -2
- package/dist/spending/index.es.js +6 -6
- package/dist/transactions/index.d.ts +0 -1
- package/dist/transactions/index.es.js +22 -24
- package/dist/transactions/stores/TransactionStore.d.ts +3 -2
- package/dist/trends/index.es.js +14 -14
- package/package.json +1 -1
- package/dist/CategoryStore-FTxUbn0f.mjs +0 -186
- package/dist/Goal-0loDagc5.mjs +0 -6
- package/dist/Localization-CPkpIwIx.mjs +0 -37
- package/dist/MerchantStore-BzGi4JAZ.mjs +0 -37
- package/dist/NotificationStore-D_e8zo5M.mjs +0 -86
- package/dist/cashflow/api/CashflowApi.d.ts +0 -13
- package/dist/common/api/LocalizedCopyApi.d.ts +0 -8
- package/dist/common/api/index.d.ts +0 -10
- package/dist/repeatingTransactions-DHIG94pi.mjs +0 -4
- 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-
|
|
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
|
|
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-
|
|
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
|
|
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:
|
|
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 [
|
|
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
|
|
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
|
-
|
|
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: !!
|
|
62
|
-
helperText:
|
|
62
|
+
error: !!p,
|
|
63
|
+
helperText: p,
|
|
63
64
|
hiddenLabel: !a,
|
|
64
|
-
id: `currency-input-${
|
|
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-${
|
|
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
|
-
}),
|
|
83
|
+
}), K = j;
|
|
83
84
|
export {
|
|
84
|
-
|
|
85
|
+
K as C
|
|
85
86
|
};
|
|
@@ -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-
|
|
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-
|
|
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 {
|
|
18
|
-
import { f as B } from "./NumberFormatting-
|
|
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-
|
|
22
|
-
import { h as bt } from "./DateUtil-
|
|
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-
|
|
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
|
+
};
|