@mx-cartographer/experiences 8.0.0-alpha.bb3 → 8.0.0-alpha.mega1
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 +178 -1
- package/dist/{Account-Bxw0_4FU.mjs → Account-CvR2-dSR.mjs} +1 -1
- package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-CitErkuS.mjs} +89 -82
- package/dist/AccountDetailsHeader-BkG3MNYo.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-zCMqet85.mjs} +6 -6
- package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-DHrz8Mml.mjs} +9 -9
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-LgfBcYMe.mjs} +112 -75
- package/dist/Accounts-Bzy1_REQ.mjs +9 -0
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-BmZXkL0C.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +23 -21
- package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
- package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-BkvlItWx.mjs} +11 -11
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
- package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-itK0R3wV.mjs} +2 -2
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-Bq-aPy-5.mjs} +1 -1
- package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
- package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
- package/dist/Drawer-By9V-B5L.mjs +178 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/FinstrongStore-BIrX0Xg2.mjs +451 -0
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-1P19goZ7.mjs} +112 -152
- package/dist/{Help-B6dIcujh.mjs → Help-Ea3BlXQp.mjs} +2 -2
- package/dist/LineChart-KpPw1phO.mjs +580 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BxTkF6Tz.mjs} +10 -10
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-CaoQl609.mjs} +91 -88
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
- package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-rC0q7P7t.mjs} +2 -2
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-uzM8tCoH.mjs} +236 -231
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-CDX_kqHa.mjs} +7 -15
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +4 -4
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-B4ybrS0B.mjs} +4 -4
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-BqijW_8S.mjs} +49 -48
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +26 -29
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DQ1b9uqq.mjs} +11 -13
- package/dist/SpendingLegend-CDO060GT.mjs +193 -0
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
- package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
- package/dist/TrendsStore-yO7qYv97.mjs +186 -0
- package/dist/{User-BQUxBeZV.mjs → User-Cnlegl1N.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +711 -728
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CoFDmQRE.mjs} +4 -4
- package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
- package/dist/accounts/index.es.js +245 -235
- package/dist/accounts/stores/AccountStore.d.ts +24 -25
- package/dist/accounts/utils/Accounts.d.ts +1 -2
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +611 -580
- package/dist/budgets/store/BudgetsStore.d.ts +0 -1
- package/dist/cashflow/index.es.js +187 -180
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +2 -5
- package/dist/categories/util/CategoryUtil.d.ts +2 -3
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/charts/LineChart.d.ts +12 -2
- package/dist/common/components/charts/index.d.ts +0 -3
- package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
- package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +397 -387
- package/dist/common/stores/AppDataStore.d.ts +1 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
- package/dist/common/stores/GlobalStore.d.ts +10 -4
- package/dist/common/stores/GlobalUiStore.d.ts +2 -3
- package/dist/common/stores/UserStore.d.ts +2 -3
- package/dist/common/types/Account.d.ts +6 -9
- package/dist/common/types/Finstrong.d.ts +54 -0
- package/dist/common/types/Global.d.ts +1 -0
- package/dist/common/types/Widgets.d.ts +1 -0
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
- package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
- package/dist/dashboard/index.es.js +90 -88
- package/dist/debts/index.es.js +458 -448
- package/dist/exportTransactionsToCSV-DuAaI5XA.mjs +48 -0
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
- package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
- package/dist/finstrong/components/ProgressBar.d.ts +15 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
- package/dist/finstrong/components/StatusChip.d.ts +5 -0
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
- package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +24 -0
- package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
- package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
- package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
- package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
- package/dist/finstrong/constants/index.d.ts +9 -0
- package/dist/finstrong/index.es.js +3190 -1073
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +302 -291
- package/dist/goals/stores/GoalStore.d.ts +4 -17
- package/dist/help/index.es.js +13 -9
- package/dist/{hooks-D6XlXHf4.mjs → hooks-ZMp65DFz.mjs} +12 -12
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +108 -104
- package/dist/investments/stores/HoldingStore.d.ts +0 -1
- package/dist/merchants/index.es.js +2 -2
- package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
- package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
- package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
- package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
- package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
- package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
- package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
- package/dist/microinsights/carousel/BeatList.d.ts +10 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
- package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
- package/dist/microinsights/constants/App.d.ts +0 -1
- package/dist/microinsights/index.d.ts +4 -3
- package/dist/microinsights/index.es.js +101 -14
- package/dist/microinsights/interfaces.d.ts +0 -6
- package/dist/networth/index.es.js +197 -190
- package/dist/notifications/index.es.js +25 -25
- package/dist/notifications/stores/NotificationStore.d.ts +1 -3
- package/dist/recurringtransactions/index.es.js +395 -351
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -3
- package/dist/settings/index.es.js +307 -298
- package/dist/spending/index.es.js +299 -438
- package/dist/spending/utils/SpendingData.d.ts +2 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
- package/dist/transactions/index.es.js +115 -112
- package/dist/transactions/stores/TransactionStore.d.ts +77 -21
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +1025 -604
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
- package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
- package/package.json +4 -4
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/Accounts-BRf_YeTf.mjs +0 -27
- package/dist/CategoryStore-yHI0hWmK.mjs +0 -174
- package/dist/CategoryUtil-pZRIYOgN.mjs +0 -80
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
- package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TransactionStore-ai3uII_r.mjs +0 -690
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/common/components/SkeletonLoader.d.ts +0 -7
- package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { makeAutoObservable as C, runInAction as l } from "mobx";
|
|
2
|
+
import { getUnixTime as r } from "date-fns/getUnixTime";
|
|
3
|
+
import { subMonths as h } from "date-fns/subMonths";
|
|
4
|
+
import { startOfMonth as d } from "date-fns/startOfMonth";
|
|
5
|
+
import { endOfMonth as y } from "date-fns/endOfMonth";
|
|
6
|
+
import { a as m, g as p } from "./CategoryUtil-DUM8NuGO.mjs";
|
|
7
|
+
import { F as f, A as i } from "./Fetch-DecPFeGU.mjs";
|
|
8
|
+
import { b as g, c as S } from "./Category-CevNQ03n.mjs";
|
|
9
|
+
class u {
|
|
10
|
+
fetchInstance;
|
|
11
|
+
constructor(t, e, o) {
|
|
12
|
+
this.fetchInstance = new f(t, e, void 0, o);
|
|
13
|
+
}
|
|
14
|
+
addCategory = async (t) => this.fetchInstance.post(i.CATEGORIES, t).then((e) => e.category);
|
|
15
|
+
getCategories = async () => this.fetchInstance.get(i.CATEGORIES).then((t) => t.categories);
|
|
16
|
+
getDateRangeCategoryTotals = async (t, e, o) => o.length === 0 ? [] : this.fetchInstance.post(`${i.DATE_RANGE_CATEGORY_TOTALS}/from/${t}/to/${e}`, {
|
|
17
|
+
account_guid: o.map((a) => a.guid)
|
|
18
|
+
}).then((a) => a.date_range_category_totals);
|
|
19
|
+
getMonthlyCategoryTotals = async (t, e, o) => {
|
|
20
|
+
try {
|
|
21
|
+
const a = `${i.MONTHLY_CATEGORY_TOTALS}/from/${t}/to/${e}`;
|
|
22
|
+
if (o) {
|
|
23
|
+
const s = o.length === 0 ? [""] : o.map((T) => T.guid);
|
|
24
|
+
return (await this.fetchInstance.post(a, { account_guid: s })).monthly_category_totals;
|
|
25
|
+
} else
|
|
26
|
+
return (await this.fetchInstance.get(a)).monthly_category_totals;
|
|
27
|
+
} catch (a) {
|
|
28
|
+
throw console.error("Error fetching monthly category totals:", a), a;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
removeCategory = async (t) => this.fetchInstance.delete(`${i.CATEGORIES}/${t}`);
|
|
32
|
+
updateCategory = async (t) => this.fetchInstance.put(`${i.CATEGORIES}/${t.guid}`, t).then((e) => e.category);
|
|
33
|
+
}
|
|
34
|
+
class w {
|
|
35
|
+
expandedGuid = null;
|
|
36
|
+
selectedGuid = null;
|
|
37
|
+
searchValue = "";
|
|
38
|
+
showSelected = !0;
|
|
39
|
+
shouldDisableDrawerScroll = !1;
|
|
40
|
+
unselectable = [];
|
|
41
|
+
unselectableText = "";
|
|
42
|
+
savedOnSelect;
|
|
43
|
+
// todo
|
|
44
|
+
constructor() {
|
|
45
|
+
C(this);
|
|
46
|
+
}
|
|
47
|
+
setExpandedGuid = (t) => this.expandedGuid = t;
|
|
48
|
+
setSelectedGuid = (t) => this.selectedGuid = t;
|
|
49
|
+
setSearchValue = (t) => this.searchValue = t;
|
|
50
|
+
setShouldDisableDrawerScroll = (t) => this.shouldDisableDrawerScroll = t;
|
|
51
|
+
setShowSelected = (t) => this.showSelected = t;
|
|
52
|
+
setUnselectable = (t) => this.unselectable = t;
|
|
53
|
+
setUnselectableText = (t) => this.unselectableText = t;
|
|
54
|
+
onSelect = (t) => this.savedOnSelect(t);
|
|
55
|
+
setOnSelect = (t) => this.savedOnSelect = t;
|
|
56
|
+
}
|
|
57
|
+
class G {
|
|
58
|
+
globalStore;
|
|
59
|
+
uiStore;
|
|
60
|
+
api = new u("/", "");
|
|
61
|
+
categories = [];
|
|
62
|
+
dateRangeCategoryTotals = [];
|
|
63
|
+
monthlyCategoryTotals = [];
|
|
64
|
+
dataRangeTotalsLoaded = !1;
|
|
65
|
+
isLoadingCategoryTotals = !1;
|
|
66
|
+
monthlyTotalsLoaded = !1;
|
|
67
|
+
constructor(t) {
|
|
68
|
+
this.globalStore = t, this.uiStore = new w(), this.api = new u(t.endpoint, t.sessionToken, t.onError), C(this);
|
|
69
|
+
}
|
|
70
|
+
get detailedCategories() {
|
|
71
|
+
return m(
|
|
72
|
+
this.categories,
|
|
73
|
+
this.dateRangeCategoryTotals,
|
|
74
|
+
this.monthlyCategoryTotals
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
get detailedCategoriesWithTransactions() {
|
|
78
|
+
return p(
|
|
79
|
+
this.detailedCategories,
|
|
80
|
+
this.globalStore.transactionStore.sortedTransactions
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
get incomeCategories() {
|
|
84
|
+
return this.detailedCategories.filter((t) => t.is_income);
|
|
85
|
+
}
|
|
86
|
+
get spendCategories() {
|
|
87
|
+
return this.detailedCategories.filter(
|
|
88
|
+
(t) => !t.is_income && !t.isTransfer && t.guid !== g.INVESTMENTS
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
get transferCategories() {
|
|
92
|
+
return this.detailedCategories.filter((t) => t.isTransfer);
|
|
93
|
+
}
|
|
94
|
+
get trendsCategories() {
|
|
95
|
+
return this.detailedCategories.filter((t) => t.totalAmount !== 0).filter((t) => t.guid !== g.INVESTMENTS && t.guid !== g.TRANSFER);
|
|
96
|
+
}
|
|
97
|
+
addCategory = async (t, e) => {
|
|
98
|
+
const o = { name: t, parent_guid: e };
|
|
99
|
+
try {
|
|
100
|
+
await this.api.addCategory(o), await this.loadCategories();
|
|
101
|
+
} catch (a) {
|
|
102
|
+
console.error(`Error occurred while adding category: ${a}`);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
loadCategories = async (t) => {
|
|
106
|
+
try {
|
|
107
|
+
const e = t || await this.api.getCategories(), { default_categories: o } = this.globalStore.copyStore.copy.categories;
|
|
108
|
+
l(() => {
|
|
109
|
+
this.categories = e.map((a) => ({
|
|
110
|
+
...a,
|
|
111
|
+
name: o[a.guid] ? o[a.guid].replace(/&/g, "&") : a.name
|
|
112
|
+
}));
|
|
113
|
+
});
|
|
114
|
+
} catch (e) {
|
|
115
|
+
console.error(`Error occurred while getting categories: ${e}`);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
loadDateRangeCategoryTotals = async (t, e, o) => {
|
|
119
|
+
this.setIsLoadingCategoryTotals(!0);
|
|
120
|
+
try {
|
|
121
|
+
const a = await this.api.getDateRangeCategoryTotals(
|
|
122
|
+
r(e),
|
|
123
|
+
r(o),
|
|
124
|
+
t
|
|
125
|
+
);
|
|
126
|
+
l(() => {
|
|
127
|
+
this.dateRangeCategoryTotals = a, this.setIsLoadingCategoryTotals(!1), this.dataRangeTotalsLoaded = !0;
|
|
128
|
+
});
|
|
129
|
+
} catch (a) {
|
|
130
|
+
this.setIsLoadingCategoryTotals(!1), console.error(`Error occurred while getting date range category totals: ${a}`);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
loadMonthlyCategoryTotals = async (t = this.globalStore.globalUiStore.selectedAccounts, e, o) => {
|
|
134
|
+
const a = r(d(e ?? h(/* @__PURE__ */ new Date(), 11))), s = r(y(o ?? /* @__PURE__ */ new Date()));
|
|
135
|
+
try {
|
|
136
|
+
const n = await this.api.getMonthlyCategoryTotals(a, s, t);
|
|
137
|
+
l(() => {
|
|
138
|
+
this.monthlyCategoryTotals = n, this.monthlyTotalsLoaded = !0;
|
|
139
|
+
});
|
|
140
|
+
} catch (n) {
|
|
141
|
+
console.error(`Error occurred while getting monthly category totals: ${n}`);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
reloadCategoryTotals = async (t, e, o) => {
|
|
145
|
+
this.setIsLoadingCategoryTotals(!0);
|
|
146
|
+
try {
|
|
147
|
+
const a = await this.api.getDateRangeCategoryTotals(
|
|
148
|
+
r(e),
|
|
149
|
+
r(o),
|
|
150
|
+
t
|
|
151
|
+
), s = await this.api.getMonthlyCategoryTotals(
|
|
152
|
+
r(d(h(o, 11))),
|
|
153
|
+
r(y(o)),
|
|
154
|
+
t
|
|
155
|
+
);
|
|
156
|
+
l(() => {
|
|
157
|
+
this.dateRangeCategoryTotals = a, this.monthlyCategoryTotals = s, this.dataRangeTotalsLoaded = !0, this.monthlyTotalsLoaded = !0, this.setIsLoadingCategoryTotals(!1);
|
|
158
|
+
});
|
|
159
|
+
} catch (a) {
|
|
160
|
+
console.error(`Error occurred while getting category totals: ${a}`);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
removeCategory = async (t) => {
|
|
164
|
+
try {
|
|
165
|
+
await this.api.removeCategory(t), await this.loadCategories();
|
|
166
|
+
} catch (e) {
|
|
167
|
+
console.error(`Error occurred while removing category: ${e}`);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
setIsLoadingCategoryTotals = (t) => {
|
|
171
|
+
this.isLoadingCategoryTotals = t;
|
|
172
|
+
};
|
|
173
|
+
updateCategory = async (t) => {
|
|
174
|
+
try {
|
|
175
|
+
await this.api.updateCategory(t), await this.loadCategories();
|
|
176
|
+
} catch (e) {
|
|
177
|
+
console.error(`Error occurred while updating category: ${e}`);
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
// TODO: Remove this after refactoring Trends components to use detailedCategories
|
|
181
|
+
getCategoryName = (t) => this.categories.find((o) => o.guid === t)?.name ?? S[t];
|
|
182
|
+
}
|
|
183
|
+
export {
|
|
184
|
+
G as C,
|
|
185
|
+
u as a
|
|
186
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { format as l } from "date-fns/format";
|
|
2
|
+
import { startOfMonth as h } from "date-fns/startOfMonth";
|
|
3
|
+
import { startOfToday as M } from "date-fns/startOfToday";
|
|
4
|
+
import { subMonths as T } from "date-fns/subMonths";
|
|
5
|
+
import { CategoryIconList as C } from "@mxenabled/mxui";
|
|
6
|
+
import { C as N, a as O, b } from "./Category-CevNQ03n.mjs";
|
|
7
|
+
import { f as D, a as E } from "./Dialog-BPTr3qHE.mjs";
|
|
8
|
+
const R = 3, d = 12, Y = (n, r, t) => n.filter((e) => !e.parent_guid).map(
|
|
9
|
+
(e) => _(
|
|
10
|
+
e,
|
|
11
|
+
r,
|
|
12
|
+
t,
|
|
13
|
+
n.filter((o) => o.parent_guid === e.guid)
|
|
14
|
+
)
|
|
15
|
+
), x = (n, r) => {
|
|
16
|
+
const t = C.find((e) => e.guid === n);
|
|
17
|
+
return t ? r.palette.categories[t.colorName] || "" : r.palette.categories.uncategorized || "";
|
|
18
|
+
}, _ = (n, r, t, e = []) => {
|
|
19
|
+
const o = n.guid, i = n.parent_guid || o, u = o === i, s = r.find((a) => a.category_guid === o)?.total || 0, c = f(
|
|
20
|
+
t.filter((a) => a.category_guid === o)
|
|
21
|
+
), g = f(
|
|
22
|
+
t.filter(
|
|
23
|
+
(a) => a.category_guid === o || a.top_level_category_guid === o
|
|
24
|
+
)
|
|
25
|
+
), m = e.map(
|
|
26
|
+
(a) => _(a, r, t)
|
|
27
|
+
), p = m.reduce(
|
|
28
|
+
(a, A) => a + A.currentAmount,
|
|
29
|
+
s
|
|
30
|
+
);
|
|
31
|
+
return {
|
|
32
|
+
...n,
|
|
33
|
+
currentAmount: s,
|
|
34
|
+
averageAmount: y(c),
|
|
35
|
+
color: N[i],
|
|
36
|
+
icon: O[i],
|
|
37
|
+
isTransfer: i === b.TRANSFER,
|
|
38
|
+
monthlyAmounts: c,
|
|
39
|
+
subCategories: m,
|
|
40
|
+
totalAmount: u ? p : 0,
|
|
41
|
+
totalAverageAmount: y(g),
|
|
42
|
+
totalMonthlyAmounts: u ? g : []
|
|
43
|
+
};
|
|
44
|
+
}, k = (n, r) => n.map((t) => {
|
|
45
|
+
const e = r.filter(
|
|
46
|
+
(o) => o.category_guid === t.guid || o.top_level_category_guid === t.guid
|
|
47
|
+
);
|
|
48
|
+
return {
|
|
49
|
+
...t,
|
|
50
|
+
transactions: e
|
|
51
|
+
};
|
|
52
|
+
}), y = (n, r = R) => {
|
|
53
|
+
const t = r > history.length ? history.length : r;
|
|
54
|
+
return Math.ceil(
|
|
55
|
+
Math.max(
|
|
56
|
+
0,
|
|
57
|
+
n.slice(-t).reduce((e, o) => e + o.amount, 0) / t
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
}, f = (n) => {
|
|
61
|
+
const r = [], t = M();
|
|
62
|
+
for (let e = 0; e <= d; e++) {
|
|
63
|
+
const o = h(T(t, d - e)), u = n.filter(
|
|
64
|
+
(s) => s.year_month === Number(l(o, "yyyyMM"))
|
|
65
|
+
).reduce((s, c) => s + c.total, 0);
|
|
66
|
+
r.push({
|
|
67
|
+
amount: u,
|
|
68
|
+
isoDate: l(o, "yyyy-MM-dd"),
|
|
69
|
+
label: D(o, E.MONTH_YEAR)
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return r;
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
Y as a,
|
|
76
|
+
x as b,
|
|
77
|
+
k as g
|
|
78
|
+
};
|
|
@@ -14,14 +14,14 @@ import EE from "@mui/material/ListItemText";
|
|
|
14
14
|
import IE from "@mui/material/Popover";
|
|
15
15
|
import F from "@mui/material/Stack";
|
|
16
16
|
import w from "@mui/material/Checkbox";
|
|
17
|
-
import { u as o, f as _E, d as NE, e as rE } from "./hooks-
|
|
17
|
+
import { u as o, f as _E, d as NE, e as rE } from "./hooks-ZMp65DFz.mjs";
|
|
18
18
|
import { b as W } from "./Localization-2MODESHW.mjs";
|
|
19
19
|
import { u as RE } from "./useScreenSize-B6JyS_Lj.mjs";
|
|
20
20
|
import { observer as Q } from "mobx-react-lite";
|
|
21
21
|
import iE from "@mui/material/styles/useTheme";
|
|
22
22
|
import { ConnectWidget as aE } from "@mxenabled/web-widget-sdk";
|
|
23
23
|
import lE from "@mui/material/CircularProgress";
|
|
24
|
-
import { D as OE } from "./Drawer-
|
|
24
|
+
import { D as OE } from "./Drawer-By9V-B5L.mjs";
|
|
25
25
|
var T = /* @__PURE__ */ ((E) => (E[E.ANY = 0] = "ANY", E[E.CHECKING = 1] = "CHECKING", E[E.SAVINGS = 2] = "SAVINGS", E[E.LOAN = 3] = "LOAN", E[E.CREDIT_CARD = 4] = "CREDIT_CARD", E[E.INVESTMENT = 5] = "INVESTMENT", E[E.LINE_OF_CREDIT = 6] = "LINE_OF_CREDIT", E[E.MORTGAGE = 7] = "MORTGAGE", E[E.PROPERTY = 8] = "PROPERTY", E[E.CASH = 9] = "CASH", E[E.INSURANCE = 10] = "INSURANCE", E[E.PREPAID = 11] = "PREPAID", E[E.CHECKING_LINE_OF_CREDIT = 12] = "CHECKING_LINE_OF_CREDIT", E[E.DIGITAL_WALLET = 13] = "DIGITAL_WALLET", E))(T || {}), sE = /* @__PURE__ */ ((E) => (E[E.NONE = 0] = "NONE", E[E.MONEY_MARKET = 1] = "MONEY_MARKET", E[E.CERTIFICATE_OF_DEPOSIT = 2] = "CERTIFICATE_OF_DEPOSIT", E[E.AUTO = 3] = "AUTO", E[E.STUDENT = 4] = "STUDENT", E[E.SMALL_BUSINESS = 5] = "SMALL_BUSINESS", E[E.PERSONAL = 6] = "PERSONAL", E[E.PERSONAL_WITH_COLLATERAL = 7] = "PERSONAL_WITH_COLLATERAL", E[E.HOME_EQUITY = 8] = "HOME_EQUITY", E[E.PLAN_401_K = 9] = "PLAN_401_K", E[E.PLAN_403_B = 10] = "PLAN_403_B", E[E.PLAN_529 = 11] = "PLAN_529", E[E.IRA = 12] = "IRA", E[E.ROLLOVER_IRA = 13] = "ROLLOVER_IRA", E[E.ROTH_IRA = 14] = "ROTH_IRA", E[E.TAXABLE = 15] = "TAXABLE", E[E.NON_TAXABLE = 16] = "NON_TAXABLE", E[E.BROKERAGE = 17] = "BROKERAGE", E[E.TRUST = 18] = "TRUST", E[E.UNIFORM_GIFTS_TO_MINORS_ACT = 19] = "UNIFORM_GIFTS_TO_MINORS_ACT", E[E.PLAN_457 = 20] = "PLAN_457", E[E.PENSION = 21] = "PENSION", E[E.EMPLOYEE_STOCK_OWNERSHIP_PLAN = 22] = "EMPLOYEE_STOCK_OWNERSHIP_PLAN", E[E.SIMPLIFIED_EMPLOYEE_PENSION = 23] = "SIMPLIFIED_EMPLOYEE_PENSION", E[E.SIMPLE_IRA = 24] = "SIMPLE_IRA", E[E.BOAT = 25] = "BOAT", E[E.POWERSPORTS = 26] = "POWERSPORTS", E[E.RV = 27] = "RV", E[E.HELOC = 28] = "HELOC", E[E.PLAN_ROTH_401_K = 29] = "PLAN_ROTH_401_K", E[E.FIXED_ANNUITY = 30] = "FIXED_ANNUITY", E[E.VARIABLE_ANNUITY = 31] = "VARIABLE_ANNUITY", E[E.VEHICLE_INSURANCE = 32] = "VEHICLE_INSURANCE", E[E.DISABILITY = 33] = "DISABILITY", E[E.HEALTH = 34] = "HEALTH", E[E.LONG_TERM_CARE = 35] = "LONG_TERM_CARE", E[E.PROPERTY_AND_CASUALTY = 36] = "PROPERTY_AND_CASUALTY", E[E.UNIVERSAL_LIFE = 37] = "UNIVERSAL_LIFE", E[E.TERM_LIFE = 38] = "TERM_LIFE", E[E.WHOLE_LIFE = 39] = "WHOLE_LIFE", E[E.ACCIDENTAL_DEATH_AND_DISMEMBERMENT = 40] = "ACCIDENTAL_DEATH_AND_DISMEMBERMENT", E[E.VARIABLE_UNIVERSAL_LIFE = 41] = "VARIABLE_UNIVERSAL_LIFE", E[E.HSA = 42] = "HSA", E[E.TAX_FREE_SAVINGS_ACCOUNT = 43] = "TAX_FREE_SAVINGS_ACCOUNT", E[E.INDIVIDUAL = 44] = "INDIVIDUAL", E[E.REGISTERED_RETIREMENT_INCOME_FUND = 45] = "REGISTERED_RETIREMENT_INCOME_FUND", E[E.CASH_MANAGEMENT_ACCOUNT = 46] = "CASH_MANAGEMENT_ACCOUNT", E[E.EMPLOYEE_STOCK_PURCHASE_PLAN = 47] = "EMPLOYEE_STOCK_PURCHASE_PLAN", E[E.REGISTERED_EDUCATION_SAVINGS_PLAN = 48] = "REGISTERED_EDUCATION_SAVINGS_PLAN", E[E.PROFIT_SHARING_PLAN = 49] = "PROFIT_SHARING_PLAN", E[E.UNIFORM_TRANSFER_TO_MINORS_ACT = 50] = "UNIFORM_TRANSFER_TO_MINORS_ACT", E[E.PLAN_401_A = 51] = "PLAN_401_A", E[E.SARSEP_IRA = 52] = "SARSEP_IRA", E[E.FIXED_ANNUITY_TRADITIONAL_IRA = 53] = "FIXED_ANNUITY_TRADITIONAL_IRA", E[E.VARIABLE_ANNUITY_TRADITIONAL_IRA = 54] = "VARIABLE_ANNUITY_TRADITIONAL_IRA", E[E.SEPP_IRA = 55] = "SEPP_IRA", E[E.INHERITED_TRADITIONAL_IRA = 56] = "INHERITED_TRADITIONAL_IRA", E[E.FIXED_ANNUITY_ROTH_IRA = 57] = "FIXED_ANNUITY_ROTH_IRA", E[E.VARIABLE_ANNUITY_ROTH_IRA = 58] = "VARIABLE_ANNUITY_ROTH_IRA", E[E.INHERITED_ROTH_IRA = 59] = "INHERITED_ROTH_IRA", E[E.COVERDELL = 60] = "COVERDELL", E[E.ADVISORY_ACCOUNT = 61] = "ADVISORY_ACCOUNT", E[E.BROKERAGE_MARGIN = 62] = "BROKERAGE_MARGIN", E[E.CHARITABLE_GIFT_ACCOUNT = 63] = "CHARITABLE_GIFT_ACCOUNT", E[E.CHURCH_ACCOUNT = 64] = "CHURCH_ACCOUNT", E[E.CONSERVATORSHIP = 65] = "CONSERVATORSHIP", E[E.CUSTODIAL = 66] = "CUSTODIAL", E[E.DEFINED_BENEFIT_PLAN = 67] = "DEFINED_BENEFIT_PLAN", E[E.DEFINED_CONTRIBUTION_PLAN = 68] = "DEFINED_CONTRIBUTION_PLAN", E[E.EDUCATIONAL = 69] = "EDUCATIONAL", E[E.ESTATE = 70] = "ESTATE", E[E.EXECUTOR = 71] = "EXECUTOR", E[E.GROUP_RETIREMENT_SAVINGS_PLAN = 72] = "GROUP_RETIREMENT_SAVINGS_PLAN", E[E.GUARANTEED_INVESTMENT_CERTIFICATE = 73] = "GUARANTEED_INVESTMENT_CERTIFICATE", E[E.HRA = 74] = "HRA", E[E.INDEXED_ANNUITY = 75] = "INDEXED_ANNUITY", E[E.INVESTMENT_CLUB = 76] = "INVESTMENT_CLUB", E[E.IRREVOCABLE_TRUST = 77] = "IRREVOCABLE_TRUST", E[E.JOINT_TENANTS_BY_ENTIRITY = 78] = "JOINT_TENANTS_BY_ENTIRITY", E[E.JOINT_TENANTS_COMMUNITY_PROPERTY = 79] = "JOINT_TENANTS_COMMUNITY_PROPERTY", E[E.JOINT_TENANTS_IN_COMMON = 80] = "JOINT_TENANTS_IN_COMMON", E[E.JOINT_TENANTS_WITH_RIGHTS_OF_SURVIVORSHIP = 81] = "JOINT_TENANTS_WITH_RIGHTS_OF_SURVIVORSHIP", E[E.KEOUGH_PLAN = 82] = "KEOUGH_PLAN", E[E.LIFE_INCOME_FUND = 83] = "LIFE_INCOME_FUND", E[E.LIVING_TRUST = 84] = "LIVING_TRUST", E[E.LOCKED_IN_RETIREMENT_ACCOUNT = 85] = "LOCKED_IN_RETIREMENT_ACCOUNT", E[E.LOCKED_IN_RETIREMENT_INVESTMENT_FUND = 86] = "LOCKED_IN_RETIREMENT_INVESTMENT_FUND", E[E.LOCKED_IN_RETIREMENT_SAVINGS_ACCOUNT = 87] = "LOCKED_IN_RETIREMENT_SAVINGS_ACCOUNT", E[E.MONEY_PURCHASE_PLAN = 88] = "MONEY_PURCHASE_PLAN", E[E.PARTNERSHIP = 89] = "PARTNERSHIP", E[E.PLAN_409_A = 90] = "PLAN_409_A", E[E.PLAN_ROTH_403_B = 91] = "PLAN_ROTH_403_B", E[E.REGISTERED_DISABILITY_SAVINGS_PLAN = 92] = "REGISTERED_DISABILITY_SAVINGS_PLAN", E[E.REGISTERED_LOCKED_IN_SAVINGS_PLAN = 93] = "REGISTERED_LOCKED_IN_SAVINGS_PLAN", E[E.REGISTERED_PENSION_PLAN = 94] = "REGISTERED_PENSION_PLAN", E[E.REGISTERED_RETIREMENT_SAVINGS_PLAN = 95] = "REGISTERED_RETIREMENT_SAVINGS_PLAN", E[E.REVOCABLE_TRUST = 96] = "REVOCABLE_TRUST", E[E.ROTH_CONVERSION = 97] = "ROTH_CONVERSION", E[E.SOLE_PROPRIETORSHIP = 98] = "SOLE_PROPRIETORSHIP", E[E.SPOUSAL_IRA = 99] = "SPOUSAL_IRA", E[E.SPOUSAL_ROTH_IRA = 100] = "SPOUSAL_ROTH_IRA", E[E.TESTAMENTARY_TRUST = 101] = "TESTAMENTARY_TRUST", E[E.THRIFT_SAVINGS_PLAN = 102] = "THRIFT_SAVINGS_PLAN", E[E.INHERITED_ANNUITY = 103] = "INHERITED_ANNUITY", E[E.CORPORATE_ACCOUNT = 104] = "CORPORATE_ACCOUNT", E[E.LIMITED_LIABILITY_ACCOUNT = 105] = "LIMITED_LIABILITY_ACCOUNT", E[E.HSA_SAVINGS = 106] = "HSA_SAVINGS", E[E.HSA_CHECKING = 107] = "HSA_CHECKING", E))(sE || {}), LE = /* @__PURE__ */ ((E) => (E[E.REAL_ESTATE = 0] = "REAL_ESTATE", E[E.VEHICLE = 1] = "VEHICLE", E[E.ART = 2] = "ART", E[E.JEWELRY = 3] = "JEWELRY", E[E.FURNITURE = 4] = "FURNITURE", E[E.APPLIANCES = 5] = "APPLIANCES", E[E.COMPUTER = 6] = "COMPUTER", E[E.ELECTRONICS = 7] = "ELECTRONICS", E[E.SPORTS_EQUIPMENT = 8] = "SPORTS_EQUIPMENT", E[E.MISCELLANEOUS = 9] = "MISCELLANEOUS", E))(LE || {}), eE = /* @__PURE__ */ ((E) => (E[E.CREATED = 0] = "CREATED", E[E.PREVENTED = 1] = "PREVENTED", E[E.DENIED = 2] = "DENIED", E[E.CHALLENGED = 3] = "CHALLENGED", E[E.REJECTED = 4] = "REJECTED", E[E.LOCKED = 5] = "LOCKED", E[E.CONNECTED = 6] = "CONNECTED", E[E.IMPEDED = 7] = "IMPEDED", E[E.RECONNECTED = 8] = "RECONNECTED", E[E.DEGRADED = 9] = "DEGRADED", E[E.DISCONNECTED = 10] = "DISCONNECTED", E[E.DISCONTINUED = 11] = "DISCONTINUED", E[E.CLOSED = 12] = "CLOSED", E[E.DELAYED = 13] = "DELAYED", E[E.FAILED = 14] = "FAILED", E[E.UPDATED = 15] = "UPDATED", E[E.DISABLED = 16] = "DISABLED", E[E.IMPORTED = 17] = "IMPORTED", E[E.RESUMED = 18] = "RESUMED", E[E.EXPIRED = 19] = "EXPIRED", E[E.IMPAIRED = 20] = "IMPAIRED", E[E.PENDING = 21] = "PENDING", E))(eE || {});
|
|
26
26
|
const bE = [
|
|
27
27
|
0,
|
|
@@ -520,23 +520,23 @@ const j = "connect_widget", rI = "connections_widget", HE = ({
|
|
|
520
520
|
}, RI = Q(HE);
|
|
521
521
|
export {
|
|
522
522
|
T as A,
|
|
523
|
-
|
|
523
|
+
rI as C,
|
|
524
524
|
CE as E,
|
|
525
525
|
tE as F,
|
|
526
|
-
|
|
526
|
+
t as M,
|
|
527
527
|
pE as N,
|
|
528
528
|
LE as P,
|
|
529
529
|
cE as S,
|
|
530
530
|
yE as a,
|
|
531
531
|
II as b,
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
532
|
+
J as c,
|
|
533
|
+
dE as d,
|
|
534
|
+
uE as e,
|
|
535
|
+
PE as f,
|
|
536
536
|
AE as g,
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
537
|
+
sE as h,
|
|
538
|
+
bE as i,
|
|
539
|
+
DE as j,
|
|
540
540
|
NI as k,
|
|
541
541
|
RI as l,
|
|
542
542
|
_I as m,
|
|
@@ -3,9 +3,9 @@ import s from "react";
|
|
|
3
3
|
import { observer as E } from "mobx-react-lite";
|
|
4
4
|
import { useTheme as b } from "@mui/material/styles";
|
|
5
5
|
import { ConnectionsWidget as D } from "@mxenabled/web-widget-sdk";
|
|
6
|
-
import {
|
|
7
|
-
import { d as L, e as w, u as _ } from "./hooks-
|
|
8
|
-
import { D as x } from "./Drawer-
|
|
6
|
+
import { C as a, c, M as i } from "./ConnectDrawer-BkvlItWx.mjs";
|
|
7
|
+
import { d as L, e as w, u as _ } from "./hooks-ZMp65DFz.mjs";
|
|
8
|
+
import { D as x } from "./Drawer-By9V-B5L.mjs";
|
|
9
9
|
const I = ({
|
|
10
10
|
onClose: l,
|
|
11
11
|
showConnectionsWidget: o,
|
|
@@ -47,7 +47,7 @@ const I = ({
|
|
|
47
47
|
] })
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
|
-
},
|
|
50
|
+
}, M = E(I);
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
M as C
|
|
53
53
|
};
|
|
@@ -4,8 +4,8 @@ import { css as q } from "@mxenabled/cssinjs";
|
|
|
4
4
|
import { v4 as B } from "uuid";
|
|
5
5
|
import { useTokens as L, TextField as O, P as _ } from "@mxenabled/mxui";
|
|
6
6
|
import { b as y, g as C } from "./Localization-2MODESHW.mjs";
|
|
7
|
-
import { g as W, C as j, f as g, M as b } from "./NumberFormatting-
|
|
8
|
-
import { u as D } from "./hooks-
|
|
7
|
+
import { g as W, C as j, f as g, M as b } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
8
|
+
import { u as D } from "./hooks-ZMp65DFz.mjs";
|
|
9
9
|
const F = ({
|
|
10
10
|
allowDecimals: o = !0,
|
|
11
11
|
ariaLabel: h,
|
|
@@ -7,8 +7,8 @@ import { isBefore as n } from "date-fns/isBefore";
|
|
|
7
7
|
import { nextDay as c } from "date-fns/nextDay";
|
|
8
8
|
import { setDate as d } from "date-fns/setDate";
|
|
9
9
|
import { startOfToday as o } from "date-fns/startOfToday";
|
|
10
|
-
import { fromUnixTime as
|
|
11
|
-
import { f as
|
|
10
|
+
import { fromUnixTime as i } from "date-fns/fromUnixTime";
|
|
11
|
+
import { f as D, a as f } from "./Dialog-BPTr3qHE.mjs";
|
|
12
12
|
const x = (t) => {
|
|
13
13
|
const e = y(t);
|
|
14
14
|
let r = c(t, e);
|
|
@@ -34,7 +34,7 @@ const x = (t) => {
|
|
|
34
34
|
}, Q = (t) => {
|
|
35
35
|
const e = p(t);
|
|
36
36
|
return a(e, 1);
|
|
37
|
-
}, w = (t) => l(t, 1), F = (t) => i(
|
|
37
|
+
}, w = (t) => l(t, 1), F = (t) => D(i(t), f.DAY_OF_WEEK_MONTH_DAY), H = (t) => t ? D(i(t), f.MONTH_YEAR) : "";
|
|
38
38
|
export {
|
|
39
39
|
Q as a,
|
|
40
40
|
p as b,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeAutoObservable as l } from "mobx";
|
|
2
2
|
import { getDate as r, fromUnixTime as _, startOfMonth as m } from "date-fns";
|
|
3
|
-
import { A as p } from "./ConnectDrawer-
|
|
3
|
+
import { A as p } from "./ConnectDrawer-BkvlItWx.mjs";
|
|
4
4
|
const E = 12, T = 100;
|
|
5
5
|
var c = /* @__PURE__ */ ((a) => (a[a.FASTEST_PAYOFF_FIRST = 1] = "FASTEST_PAYOFF_FIRST", a[a.HIGHEST_INTEREST = 2] = "HIGHEST_INTEREST", a[a.LOWEST_BALANCE = 3] = "LOWEST_BALANCE", a[a.HIGHEST_BALANCE = 4] = "HIGHEST_BALANCE", a))(c || {});
|
|
6
6
|
const b = {
|
|
@@ -3,11 +3,11 @@ import b from "react";
|
|
|
3
3
|
import { selectAll as m, interpolateString as x, arc as I } from "d3";
|
|
4
4
|
import d from "@mui/material/Box";
|
|
5
5
|
import { useTheme as S } from "@mui/material/styles";
|
|
6
|
-
const k = 100, E = 140, v = 10,
|
|
6
|
+
const k = 100, E = 140, v = 10, j = ({
|
|
7
7
|
data: u,
|
|
8
8
|
hoveredId: h,
|
|
9
|
-
onClick:
|
|
10
|
-
onMouseEnter:
|
|
9
|
+
onClick: a,
|
|
10
|
+
onMouseEnter: s,
|
|
11
11
|
onMouseLeave: l,
|
|
12
12
|
selectedId: i,
|
|
13
13
|
size: t = 300,
|
|
@@ -16,10 +16,10 @@ const k = 100, E = 140, v = 10, B = ({
|
|
|
16
16
|
const f = S();
|
|
17
17
|
let r = 0;
|
|
18
18
|
const g = (o, n) => {
|
|
19
|
-
(o.key === "Enter" || o.key === " ") && (o.preventDefault(),
|
|
19
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), a?.(n));
|
|
20
20
|
}, y = (o) => {
|
|
21
|
-
|
|
22
|
-
},
|
|
21
|
+
s?.(o);
|
|
22
|
+
}, w = (o) => {
|
|
23
23
|
l?.(o);
|
|
24
24
|
};
|
|
25
25
|
return b.useEffect(() => {
|
|
@@ -45,11 +45,11 @@ const k = 100, E = 140, v = 10, B = ({
|
|
|
45
45
|
/* @__PURE__ */ e("g", { children: u.map((o) => {
|
|
46
46
|
const n = r;
|
|
47
47
|
r = r + 2 * Math.PI * (o.value / 100);
|
|
48
|
-
const
|
|
48
|
+
const D = r, R = I().cornerRadius(4)({
|
|
49
49
|
innerRadius: k,
|
|
50
50
|
outerRadius: E + (o.id === i || o.id === h ? v : 0),
|
|
51
51
|
startAngle: n,
|
|
52
|
-
endAngle:
|
|
52
|
+
endAngle: D,
|
|
53
53
|
padAngle: 0.025
|
|
54
54
|
});
|
|
55
55
|
return /* @__PURE__ */ e(
|
|
@@ -60,11 +60,11 @@ const k = 100, E = 140, v = 10, B = ({
|
|
|
60
60
|
className: "arc-outer",
|
|
61
61
|
d: R,
|
|
62
62
|
fill: o.color,
|
|
63
|
-
onBlur: () =>
|
|
64
|
-
onClick: () =>
|
|
63
|
+
onBlur: () => w(o.id),
|
|
64
|
+
onClick: () => a?.(o.id),
|
|
65
65
|
onFocus: () => y(o.id),
|
|
66
66
|
onKeyDown: (A) => g(A, o.id),
|
|
67
|
-
onMouseEnter: () =>
|
|
67
|
+
onMouseEnter: () => s?.(o.id),
|
|
68
68
|
onMouseLeave: () => l?.(o.id),
|
|
69
69
|
role: "button",
|
|
70
70
|
style: {
|
|
@@ -80,7 +80,7 @@ const k = 100, E = 140, v = 10, B = ({
|
|
|
80
80
|
}
|
|
81
81
|
)
|
|
82
82
|
] });
|
|
83
|
-
}
|
|
83
|
+
};
|
|
84
84
|
export {
|
|
85
85
|
j as D
|
|
86
86
|
};
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import s from "@mui/material/Box";
|
|
3
|
+
import h from "@mui/material/Stack";
|
|
4
|
+
import { H2 as S, Drawer as B } from "@mxenabled/mxui";
|
|
5
|
+
import b from "@mui/material/Button";
|
|
6
|
+
import v from "@mui/material/IconButton";
|
|
7
|
+
import { ArrowBack as j } from "@mxenabled/mx-icons";
|
|
8
|
+
const $ = ({
|
|
9
|
+
footerStyles: a = {},
|
|
10
|
+
hasSecondaryAction: t = !0,
|
|
11
|
+
isPrimaryDisabled: i,
|
|
12
|
+
onPrimaryAction: o,
|
|
13
|
+
onSecondaryAction: e,
|
|
14
|
+
primaryButtonProps: n = {},
|
|
15
|
+
primaryColor: c = "primary",
|
|
16
|
+
primaryText: d = "Save",
|
|
17
|
+
secondaryColor: l = "primary",
|
|
18
|
+
secondaryText: p = "Cancel"
|
|
19
|
+
}) => /* @__PURE__ */ u(
|
|
20
|
+
h,
|
|
21
|
+
{
|
|
22
|
+
sx: {
|
|
23
|
+
bgcolor: "background.paper",
|
|
24
|
+
flexDirection: "row",
|
|
25
|
+
gap: 16,
|
|
26
|
+
justifyContent: "flex-end",
|
|
27
|
+
p: 24,
|
|
28
|
+
...a
|
|
29
|
+
},
|
|
30
|
+
children: [
|
|
31
|
+
t && /* @__PURE__ */ r(
|
|
32
|
+
b,
|
|
33
|
+
{
|
|
34
|
+
color: l,
|
|
35
|
+
onClick: e,
|
|
36
|
+
variant: o ? "outlined" : "contained",
|
|
37
|
+
children: p
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
o && /* @__PURE__ */ r(
|
|
41
|
+
b,
|
|
42
|
+
{
|
|
43
|
+
...n,
|
|
44
|
+
color: c,
|
|
45
|
+
disabled: i,
|
|
46
|
+
onClick: o,
|
|
47
|
+
variant: "contained",
|
|
48
|
+
children: d
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
), F = ({
|
|
54
|
+
ariaLabelClose: a,
|
|
55
|
+
onClose: t,
|
|
56
|
+
shouldShowBorders: i,
|
|
57
|
+
shouldShowShadow: o,
|
|
58
|
+
title: e
|
|
59
|
+
}) => /* @__PURE__ */ u(
|
|
60
|
+
h,
|
|
61
|
+
{
|
|
62
|
+
"aria-level": 1,
|
|
63
|
+
direction: "row",
|
|
64
|
+
role: "heading",
|
|
65
|
+
sx: {
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
backgroundColor: "background.paper",
|
|
68
|
+
...i && {
|
|
69
|
+
borderBottom: 1,
|
|
70
|
+
borderTop: 1,
|
|
71
|
+
borderColor: "border.light"
|
|
72
|
+
},
|
|
73
|
+
...o && {
|
|
74
|
+
boxShadow: "0px 2px 8px 0px #6A73811F"
|
|
75
|
+
},
|
|
76
|
+
padding: "8px 8px 8px 8px"
|
|
77
|
+
},
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ r(v, { "aria-label": a, color: "primary", onClick: t, children: /* @__PURE__ */ r(j, { color: "primary", sx: { fontSize: 22 } }) }),
|
|
80
|
+
/* @__PURE__ */ r(
|
|
81
|
+
s,
|
|
82
|
+
{
|
|
83
|
+
sx: {
|
|
84
|
+
flexGrow: 1,
|
|
85
|
+
margin: "auto",
|
|
86
|
+
textAlign: "center"
|
|
87
|
+
},
|
|
88
|
+
children: /* @__PURE__ */ r(
|
|
89
|
+
S,
|
|
90
|
+
{
|
|
91
|
+
bold: !0,
|
|
92
|
+
id: `${e?.replace(/\s+/g, "-").toLowerCase()}-header-title`,
|
|
93
|
+
variant: "Body",
|
|
94
|
+
children: e
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ r(s, { width: "44px" })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
), H = ({
|
|
103
|
+
ariaLabelClose: a = "Close",
|
|
104
|
+
children: t,
|
|
105
|
+
footerStyles: i = {},
|
|
106
|
+
hasSecondaryAction: o = !0,
|
|
107
|
+
id: e,
|
|
108
|
+
isOpen: n,
|
|
109
|
+
isPrimaryDisabled: c,
|
|
110
|
+
onClose: d,
|
|
111
|
+
onPrimaryAction: l,
|
|
112
|
+
onSecondaryAction: p,
|
|
113
|
+
primaryButtonProps: g,
|
|
114
|
+
primaryColor: m = "primary",
|
|
115
|
+
primaryText: w,
|
|
116
|
+
secondaryColor: f = "secondary",
|
|
117
|
+
secondaryText: k,
|
|
118
|
+
shouldShowHeaderBorders: C = !0,
|
|
119
|
+
shouldShowHeaderShadow: y = !1,
|
|
120
|
+
title: x,
|
|
121
|
+
...D
|
|
122
|
+
}) => /* @__PURE__ */ r(
|
|
123
|
+
B,
|
|
124
|
+
{
|
|
125
|
+
id: e,
|
|
126
|
+
isOpen: n,
|
|
127
|
+
onClose: d,
|
|
128
|
+
slotProps: {
|
|
129
|
+
root: {
|
|
130
|
+
role: "dialog",
|
|
131
|
+
"aria-modal": "true",
|
|
132
|
+
"aria-labelledby": `${x?.replace(/\s+/g, "-").toLowerCase()}-header-title`
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
sx: {
|
|
136
|
+
"& .MuiDrawer-paper": {
|
|
137
|
+
backgroundColor: "background.default",
|
|
138
|
+
borderRadius: 0
|
|
139
|
+
},
|
|
140
|
+
height: "100%",
|
|
141
|
+
"& .MuiToolbar-root": {
|
|
142
|
+
backgroundColor: "background.paper"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
...D,
|
|
146
|
+
children: /* @__PURE__ */ u(h, { height: "100%", justifyContent: "space-between", children: [
|
|
147
|
+
/* @__PURE__ */ r(
|
|
148
|
+
F,
|
|
149
|
+
{
|
|
150
|
+
ariaLabelClose: a,
|
|
151
|
+
onClose: d,
|
|
152
|
+
shouldShowBorders: C,
|
|
153
|
+
shouldShowShadow: y,
|
|
154
|
+
title: x
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ r(s, { height: "100%", overflow: "auto", children: t }),
|
|
158
|
+
l && /* @__PURE__ */ r(
|
|
159
|
+
$,
|
|
160
|
+
{
|
|
161
|
+
footerStyles: i,
|
|
162
|
+
hasSecondaryAction: o,
|
|
163
|
+
isPrimaryDisabled: c,
|
|
164
|
+
onPrimaryAction: l,
|
|
165
|
+
onSecondaryAction: p ?? d,
|
|
166
|
+
primaryButtonProps: g,
|
|
167
|
+
primaryColor: m,
|
|
168
|
+
primaryText: w,
|
|
169
|
+
secondaryColor: f,
|
|
170
|
+
secondaryText: k
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
] })
|
|
174
|
+
}
|
|
175
|
+
), R = H;
|
|
176
|
+
export {
|
|
177
|
+
R as D
|
|
178
|
+
};
|