@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.
- package/CHANGELOG.md +128 -1
- package/dist/{Account-Bxw0_4FU.mjs → Account-BDXA6PWh.mjs} +1 -1
- package/dist/{AccountDetailsContent-CAM9y39M.mjs → AccountDetailsContent-CUztd3-b.mjs} +87 -83
- package/dist/AccountDetailsHeader-i3KFhNuo.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-QZspYAji.mjs} +6 -6
- package/dist/{AccountListItem-JFMZROh7.mjs → AccountListItem-DX5upmCS.mjs} +5 -5
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-BcnDpyLL.mjs} +19 -8
- package/dist/{Accounts-BRf_YeTf.mjs → Accounts-DXfZotRC.mjs} +1 -1
- 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-Df2nII9u.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +23 -21
- package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-DTgyAMM7.mjs} +12 -10
- package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-C5cR-nfQ.mjs} +1 -1
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-BIbTqYOH.mjs} +2 -2
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-BFfY3_zB.mjs} +3 -3
- package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-BFKcs-_K.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-BbJB0nmu.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-BEtCk82g.mjs +163 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DzTrtPzk.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-DpWY3gVb.mjs} +5 -5
- package/dist/{Help-B6dIcujh.mjs → Help-BnPXM_N2.mjs} +2 -2
- package/dist/LineChart-bc1D9xBE.mjs +581 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-uobBrm_a.mjs} +10 -10
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-NpXHhO1n.mjs} +177 -174
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
- package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-lsuhEpn6.mjs} +2 -2
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-CNmJWVeI.mjs} +241 -238
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +4 -4
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-CqZh1SQa.mjs} +17 -17
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-BKcYmpv3.mjs} +46 -45
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-Ni5tSQIO.mjs} +80 -73
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-krIRNwHK.mjs} +3 -3
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
- package/dist/SpendingLegend-CjX-hX2O.mjs +193 -0
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/TransactionDetails-5M2vfr59.mjs +1379 -0
- package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-D-Q3BU9Z.mjs} +119 -121
- package/dist/TrendsStore-BW9FGQeE.mjs +182 -0
- package/dist/{User-BQUxBeZV.mjs → User-wXzDI4M8.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-C0832BMe.mjs} +702 -723
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-BhQ1Kx2z.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 +229 -222
- package/dist/accounts/stores/AccountStore.d.ts +2 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +380 -382
- package/dist/cashflow/index.es.js +405 -413
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- 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/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/hooks/index.d.ts +0 -1
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +320 -321
- package/dist/common/stores/GlobalStore.d.ts +7 -1
- 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/dashboard/index.es.js +2 -2
- package/dist/debts/index.es.js +506 -498
- package/dist/exportTransactionsToCSV-Cz2t0lmA.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 +25 -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 +3171 -1063
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +566 -562
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +437 -435
- package/dist/merchants/index.es.js +2 -2
- 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 +3 -3
- package/dist/microinsights/index.es.js +7 -7
- package/dist/microinsights/interfaces.d.ts +0 -6
- package/dist/networth/index.es.js +188 -186
- package/dist/notifications/index.es.js +95 -96
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +584 -560
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
- package/dist/settings/index.es.js +286 -280
- package/dist/spending/index.es.js +269 -421
- 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 +226 -220
- package/dist/transactions/stores/TransactionStore.d.ts +1 -1
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +963 -586
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CFNF8766.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-CRwX-qWE.mjs} +1 -1
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/package.json +7 -7
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/common/hooks/usePrevious.d.ts +0 -2
- package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { makeAutoObservable as c, observable as f, runInAction as
|
|
2
|
-
import { fromUnixTime as
|
|
3
|
-
import { F as l, A as
|
|
1
|
+
import { makeAutoObservable as c, observable as f, runInAction as d } from "mobx";
|
|
2
|
+
import { fromUnixTime as a, isSameDay as h } from "date-fns";
|
|
3
|
+
import { F as l, A as o } from "./Fetch-DecPFeGU.mjs";
|
|
4
4
|
class s {
|
|
5
5
|
fetchInstance;
|
|
6
6
|
constructor(t, i, n) {
|
|
7
7
|
this.fetchInstance = new l(t, i, void 0, n);
|
|
8
8
|
}
|
|
9
|
-
getNotifications = () => this.fetchInstance.get(
|
|
9
|
+
getNotifications = () => this.fetchInstance.get(o.NOTIFICATIONS).then(
|
|
10
10
|
(t) => t.notifications.map((i) => i.notification)
|
|
11
11
|
).finally();
|
|
12
|
-
updateNotification = (t) => this.fetchInstance.put(`${
|
|
12
|
+
updateNotification = (t) => this.fetchInstance.put(`${o.NOTIFICATIONS}/${t.guid}`, {
|
|
13
13
|
guid: t.guid,
|
|
14
14
|
has_been_viewed: t.has_been_viewed
|
|
15
15
|
}).then((i) => i.notification).finally();
|
|
16
16
|
// Note: The notifications/mark_all_as_viewed endpoint is broken, but still returns 202.
|
|
17
17
|
// A bug ticket has been filed to fix it, but should not require any changes here.
|
|
18
|
-
markAllAsViewed = (t) => this.fetchInstance.put(`${
|
|
18
|
+
markAllAsViewed = (t) => this.fetchInstance.put(`${o.NOTIFICATIONS}/mark_all_as_viewed`, { channel: t }).finally();
|
|
19
19
|
}
|
|
20
20
|
const w = (e, t) => {
|
|
21
|
-
const i =
|
|
22
|
-
return !
|
|
21
|
+
const i = a(t[e].delivered_at), n = a(t[e - 1]?.delivered_at);
|
|
22
|
+
return !h(i, n);
|
|
23
23
|
};
|
|
24
24
|
function u(e) {
|
|
25
25
|
const i = Math.floor(Date.now() / 1e3);
|
|
@@ -59,13 +59,13 @@ class A {
|
|
|
59
59
|
} catch (t) {
|
|
60
60
|
console.error(`Error occurred while loading notifications: ${t}`);
|
|
61
61
|
} finally {
|
|
62
|
-
|
|
62
|
+
d(() => {
|
|
63
63
|
this.isLoading = !1;
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
markAllAsViewed = async () => {
|
|
68
|
-
|
|
68
|
+
await this.api.markAllAsViewed();
|
|
69
69
|
};
|
|
70
70
|
updateNotification = async (t) => {
|
|
71
71
|
t.has_been_viewed = !0, await this.api.updateNotification(t);
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import o from "numeral";
|
|
2
2
|
import { g as a } from "./Localization-2MODESHW.mjs";
|
|
3
|
-
const
|
|
3
|
+
const D = 9999999999e-2;
|
|
4
4
|
var c = /* @__PURE__ */ ((t) => (t.CAD = "CAD", t.USD = "USD", t))(c || {});
|
|
5
|
-
const
|
|
5
|
+
const h = (t, r, e) => {
|
|
6
6
|
const s = [], l = (r - t) / (e - 1);
|
|
7
7
|
for (let n = 0; n < e; n++) {
|
|
8
8
|
const i = t + n * l;
|
|
9
9
|
s.push(i);
|
|
10
10
|
}
|
|
11
|
-
return s[e - 1] = r, s;
|
|
12
|
-
},
|
|
11
|
+
return s[e - 1] = r, s.map(Math.round);
|
|
12
|
+
}, w = (t, r, e) => {
|
|
13
13
|
switch (a()) {
|
|
14
14
|
case "fr-ca":
|
|
15
15
|
return o(t).format(`${r} $`, e);
|
|
16
16
|
default:
|
|
17
17
|
return o(t).format(`$${r}`, e);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, $ = () => {
|
|
20
20
|
switch (a()) {
|
|
21
21
|
case "fr-ca":
|
|
22
22
|
return c.CAD;
|
|
@@ -38,11 +38,11 @@ const w = (t, r, e) => {
|
|
|
38
38
|
};
|
|
39
39
|
export {
|
|
40
40
|
c as C,
|
|
41
|
-
|
|
41
|
+
D as M,
|
|
42
42
|
N as a,
|
|
43
43
|
P as b,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
h as c,
|
|
45
|
+
w as f,
|
|
46
|
+
$ as g,
|
|
47
47
|
f as i
|
|
48
48
|
};
|
|
@@ -2,10 +2,10 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import _ from "react";
|
|
3
3
|
import { observer as p } from "mobx-react-lite";
|
|
4
4
|
import v from "@mui/material/TextField";
|
|
5
|
-
import { L as y } from "./ListItemAction-
|
|
6
|
-
import { u as h, l as b } from "./hooks-
|
|
7
|
-
import { a as T, f as S } from "./NumberFormatting-
|
|
8
|
-
import { C as f } from "./CurrencyInput-
|
|
5
|
+
import { L as y } from "./ListItemAction-uobBrm_a.mjs";
|
|
6
|
+
import { u as h, l as b } from "./hooks-C41HAxM5.mjs";
|
|
7
|
+
import { a as T, f as S } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
8
|
+
import { C as f } from "./CurrencyInput-BFKcs-_K.mjs";
|
|
9
9
|
const F = p(({ goal: e }) => {
|
|
10
10
|
const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
|
|
11
11
|
const n = { ...e, interest_rate: t };
|
|
@@ -3,21 +3,21 @@ import u from "react";
|
|
|
3
3
|
import { observer as h } from "mobx-react-lite";
|
|
4
4
|
import c from "@mui/material/Box";
|
|
5
5
|
import p from "@mui/material/Tab";
|
|
6
|
-
import
|
|
6
|
+
import R from "@mui/material/Tabs";
|
|
7
7
|
import d from "@mui/material/Divider";
|
|
8
|
-
import
|
|
8
|
+
import b from "@mui/material/List";
|
|
9
9
|
import T from "@mui/material/Stack";
|
|
10
|
-
import { R as C, A as S, a as E, M as v } from "./ManageIncome-
|
|
11
|
-
import { u as _, j as A, g as f } from "./hooks-
|
|
12
|
-
import { R as y, F as N } from "./RecurringTransactions-
|
|
13
|
-
import { A as m } from "./WidgetContainer-
|
|
10
|
+
import { R as C, A as S, a as E, M as v } from "./ManageIncome-NpXHhO1n.mjs";
|
|
11
|
+
import { u as _, j as A, g as f } from "./hooks-C41HAxM5.mjs";
|
|
12
|
+
import { R as y, F as N } from "./RecurringTransactions-BKcYmpv3.mjs";
|
|
13
|
+
import { A as m } from "./WidgetContainer-BhQ1Kx2z.mjs";
|
|
14
14
|
const I = h(() => {
|
|
15
|
-
const { recurring: g } = _(), {
|
|
16
|
-
|
|
15
|
+
const { recurring: g } = _(), { detailedRepeatingTransactions: n } = A(), { onEvent: a } = f(), l = (r) => {
|
|
16
|
+
a(m.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
|
17
17
|
repeating_transaction_guid: r.guid
|
|
18
18
|
});
|
|
19
|
-
},
|
|
20
|
-
|
|
19
|
+
}, o = () => {
|
|
20
|
+
a(m.RECURRING_TRANSACTIONS_CLICK_ADD_EXPENSE);
|
|
21
21
|
}, i = n.filter(
|
|
22
22
|
(r) => r.repeating_transaction_type !== y.Income && (r.transactions.length > 0 || r.recurrence_type === N.EveryYear)
|
|
23
23
|
);
|
|
@@ -29,7 +29,7 @@ const I = h(() => {
|
|
|
29
29
|
maxHeight: "calc(100vh - 109px)"
|
|
30
30
|
},
|
|
31
31
|
children: [
|
|
32
|
-
/* @__PURE__ */ e(c, { sx: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ e(
|
|
32
|
+
/* @__PURE__ */ e(c, { sx: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ e(b, { sx: { bgcolor: "background.paper" }, children: i.map((r, s) => /* @__PURE__ */ t(u.Fragment, { children: [
|
|
33
33
|
/* @__PURE__ */ e(C, { onClick: l, repeatingTransaction: r }),
|
|
34
34
|
/* @__PURE__ */ e(
|
|
35
35
|
d,
|
|
@@ -51,7 +51,7 @@ const I = h(() => {
|
|
|
51
51
|
py: 12,
|
|
52
52
|
textAlign: "right"
|
|
53
53
|
},
|
|
54
|
-
children: /* @__PURE__ */ e(S, { label: g.add_expense, onAddRecurringTransaction:
|
|
54
|
+
children: /* @__PURE__ */ e(S, { label: g.add_expense, onAddRecurringTransaction: o })
|
|
55
55
|
}
|
|
56
56
|
)
|
|
57
57
|
] })
|
|
@@ -59,13 +59,13 @@ const I = h(() => {
|
|
|
59
59
|
}
|
|
60
60
|
) : /* @__PURE__ */ e(E, { zeroStateFor: "expenses" }) });
|
|
61
61
|
}), X = h(({ defaultSelectedTab: g = 0 }) => {
|
|
62
|
-
const [n,
|
|
62
|
+
const [n, a] = u.useState(g), { onEvent: l } = f(), { recurring: o } = _();
|
|
63
63
|
return /* @__PURE__ */ t(c, { bgcolor: "background.default", height: "100%", children: [
|
|
64
64
|
/* @__PURE__ */ t(
|
|
65
|
-
|
|
65
|
+
R,
|
|
66
66
|
{
|
|
67
67
|
onChange: (r, s) => {
|
|
68
|
-
|
|
68
|
+
a(s), l(
|
|
69
69
|
s === 0 ? "recurring_transactions_widget_manage_expenses" : "recurring_transactions_widget_edit_income"
|
|
70
70
|
);
|
|
71
71
|
},
|
|
@@ -73,8 +73,8 @@ const I = h(() => {
|
|
|
73
73
|
value: n,
|
|
74
74
|
variant: "fullWidth",
|
|
75
75
|
children: [
|
|
76
|
-
/* @__PURE__ */ e(p, { label:
|
|
77
|
-
/* @__PURE__ */ e(p, { label:
|
|
76
|
+
/* @__PURE__ */ e(p, { label: o.expenses }),
|
|
77
|
+
/* @__PURE__ */ e(p, { label: o.income })
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
80
|
),
|
|
@@ -17,7 +17,7 @@ import { formatISO as H } from "date-fns/formatISO";
|
|
|
17
17
|
import { fromUnixTime as V } from "date-fns/fromUnixTime";
|
|
18
18
|
import { getUnixTime as y } from "date-fns/getUnixTime";
|
|
19
19
|
import { isAfter as h } from "date-fns/isAfter";
|
|
20
|
-
import { isBefore as
|
|
20
|
+
import { isBefore as u } from "date-fns/isBefore";
|
|
21
21
|
import { isSameDay as X } from "date-fns/isSameDay";
|
|
22
22
|
import { nextDay as E } from "date-fns/nextDay";
|
|
23
23
|
import { parseISO as J } from "date-fns/parseISO";
|
|
@@ -29,9 +29,9 @@ import { subQuarters as N } from "date-fns/subQuarters";
|
|
|
29
29
|
import { subYears as T } from "date-fns/subYears";
|
|
30
30
|
import { lastDayOfMonth as q } from "date-fns/lastDayOfMonth";
|
|
31
31
|
import { setDayOfYear as F } from "date-fns/setDayOfYear";
|
|
32
|
-
import { g as R, a as ee, b as te, c as re, d as oe, e as ae, f as ne } from "./DateUtil-
|
|
33
|
-
import { b as W } from "./NumberFormatting-
|
|
34
|
-
import { f as v,
|
|
32
|
+
import { g as R, a as ee, b as te, c as re, d as oe, e as ae, f as ne } from "./DateUtil-CBdcsyuk.mjs";
|
|
33
|
+
import { b as W } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
34
|
+
import { f as v, a as k } from "./Dialog-BPTr3qHE.mjs";
|
|
35
35
|
import { b as l } from "./Localization-2MODESHW.mjs";
|
|
36
36
|
var s = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EveryWeek = 1] = "EveryWeek", e[e.EveryOtherWeek = 2] = "EveryOtherWeek", e[e.EveryMonth = 3] = "EveryMonth", e[e.EveryOtherMonth = 4] = "EveryOtherMonth", e[e.EveryQuarter = 5] = "EveryQuarter", e[e.EveryOtherQuarter = 6] = "EveryOtherQuarter", e[e.EveryYear = 7] = "EveryYear", e[e.TwiceAMonth = 8] = "TwiceAMonth", e))(s || {}), p = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(p || {}), O = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(O || {}), Y = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Subscription = 1] = "Subscription", e[e.Bill = 2] = "Bill", e[e.Income = 3] = "Income", e[e.Transfer = 4] = "Transfer", e))(Y || {});
|
|
37
37
|
const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
@@ -51,22 +51,23 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
51
51
|
o,
|
|
52
52
|
/* @__PURE__ */ d(C, { children: /* @__PURE__ */ d(I, { name: "chevron_right", size: 24 }) })
|
|
53
53
|
] }) }) : /* @__PURE__ */ d(w, { disableGutters: !1, disablePadding: !1, children: o });
|
|
54
|
-
}, Fe = se, Re = ({ label: e, onChange: a, options: t, value: n }) => /* @__PURE__ */ d(
|
|
54
|
+
}, Fe = se, Re = ({ label: e, onChange: a, options: t, value: n, ...o }) => /* @__PURE__ */ d(
|
|
55
55
|
j,
|
|
56
56
|
{
|
|
57
57
|
InputLabelProps: { shrink: !0 },
|
|
58
58
|
SelectProps: {
|
|
59
|
-
IconComponent: (
|
|
59
|
+
IconComponent: (c) => /* @__PURE__ */ d(z, { size: 20, sx: { mr: 4 }, ...c })
|
|
60
60
|
},
|
|
61
61
|
defaultValue: 0,
|
|
62
62
|
label: e,
|
|
63
|
-
onChange: (
|
|
64
|
-
a(Number(
|
|
63
|
+
onChange: (c) => {
|
|
64
|
+
a(Number(c.target.value));
|
|
65
65
|
},
|
|
66
66
|
select: !0,
|
|
67
67
|
value: n,
|
|
68
68
|
variant: "outlined",
|
|
69
|
-
|
|
69
|
+
...o,
|
|
70
|
+
children: t.map((c) => /* @__PURE__ */ d($, { value: c.id, children: c.label }, c.id))
|
|
70
71
|
}
|
|
71
72
|
), ce = (e) => {
|
|
72
73
|
if (!e) return "";
|
|
@@ -93,93 +94,93 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
93
94
|
status: p.Upcoming,
|
|
94
95
|
type: e.repeating_transaction_type === Y.Income ? O.Income : O.Expense,
|
|
95
96
|
transaction: void 0
|
|
96
|
-
},
|
|
97
|
+
}, c = a.start, i = a.end;
|
|
97
98
|
switch (e.recurrence_type) {
|
|
98
99
|
case s.EveryWeek:
|
|
99
|
-
t.push(...ue(r,
|
|
100
|
+
t.push(...ue(r, c, i));
|
|
100
101
|
break;
|
|
101
102
|
case s.EveryOtherWeek:
|
|
102
|
-
t.push(...de(r,
|
|
103
|
+
t.push(...de(r, c, i));
|
|
103
104
|
break;
|
|
104
105
|
case s.TwiceAMonth:
|
|
105
|
-
t.push(...me(r,
|
|
106
|
+
t.push(...me(r, c, i));
|
|
106
107
|
break;
|
|
107
108
|
case s.EveryMonth:
|
|
108
|
-
t.push(...le(r,
|
|
109
|
+
t.push(...le(r, c, i));
|
|
109
110
|
break;
|
|
110
111
|
case s.EveryOtherMonth:
|
|
111
|
-
t.push(...he(r,
|
|
112
|
+
t.push(...he(r, c, i));
|
|
112
113
|
break;
|
|
113
114
|
case s.EveryQuarter:
|
|
114
|
-
t.push(...fe(r,
|
|
115
|
+
t.push(...fe(r, c, i));
|
|
115
116
|
break;
|
|
116
117
|
case s.EveryOtherQuarter:
|
|
117
|
-
t.push(...pe(r,
|
|
118
|
+
t.push(...pe(r, c, i));
|
|
118
119
|
break;
|
|
119
120
|
case s.EveryYear:
|
|
120
|
-
t.push(...ye(r,
|
|
121
|
+
t.push(...ye(r, c, i));
|
|
121
122
|
break;
|
|
122
123
|
}
|
|
123
124
|
for (const m of t) {
|
|
124
125
|
const _ = e.transactions.find(
|
|
125
126
|
(x) => x.repeating_transaction_guid === e.guid && x.date > y(D(m.expectedDate, 5)) && x.date < y(Q(m.expectedDate, 5))
|
|
126
127
|
);
|
|
127
|
-
_ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate = V(_.date)) :
|
|
128
|
+
_ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate = V(_.date)) : u(m.expectedDate, D(b(), 3)) && (m.status = p.Missed);
|
|
128
129
|
}
|
|
129
130
|
return t;
|
|
130
131
|
}, ue = (e, a, t) => {
|
|
131
132
|
const n = [];
|
|
132
133
|
let o = E(a, e.recurrenceDay);
|
|
133
|
-
for (;
|
|
134
|
+
for (; u(o, t); )
|
|
134
135
|
n.push({ ...e, expectedDate: o }), o = E(o, e.recurrenceDay);
|
|
135
136
|
return n;
|
|
136
137
|
}, de = (e, a, t) => {
|
|
137
138
|
const n = [], o = e.expectedDate;
|
|
138
|
-
if (
|
|
139
|
+
if (u(o, t)) {
|
|
139
140
|
let r = D(o, 14);
|
|
140
141
|
for (; h(r, a) || X(r, a); )
|
|
141
142
|
n.push({ ...e, expectedDate: r }), r = D(r, 14);
|
|
142
|
-
for (r = o; h(r, a) &&
|
|
143
|
+
for (r = o; h(r, a) && u(r, t); )
|
|
143
144
|
n.push({ ...e, expectedDate: r }), r = Q(r, 14);
|
|
144
145
|
}
|
|
145
146
|
return n;
|
|
146
147
|
}, me = (e, a, t) => {
|
|
147
148
|
const n = [];
|
|
148
149
|
let o = g(a, e.recurrenceDay);
|
|
149
|
-
for (;
|
|
150
|
+
for (; u(o, t); )
|
|
150
151
|
n.push({ ...e, expectedDate: o }), o = f(o, 1);
|
|
151
152
|
let r = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? g(a, e.secondRecurrenceDay) : q(a);
|
|
152
|
-
for (;
|
|
153
|
+
for (; u(r, t); )
|
|
153
154
|
n.push({ ...e, expectedDate: r }), r = f(r, 1);
|
|
154
155
|
return n;
|
|
155
156
|
}, le = (e, a, t) => {
|
|
156
157
|
const n = [];
|
|
157
158
|
let o = g(a, e.recurrenceDay);
|
|
158
|
-
for (n.push({ ...e, expectedDate: o }), o = f(o, 1);
|
|
159
|
+
for (n.push({ ...e, expectedDate: o }), o = f(o, 1); u(o, t); )
|
|
159
160
|
n.push({ ...e, expectedDate: o }), o = f(o, 1);
|
|
160
161
|
return n;
|
|
161
162
|
}, he = (e, a, t) => {
|
|
162
163
|
const n = [], o = e.expectedDate;
|
|
163
|
-
let r =
|
|
164
|
-
for (;
|
|
164
|
+
let r = u(o, t) ? o : Z(o, 2);
|
|
165
|
+
for (; u(r, t); )
|
|
165
166
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = f(r, 2);
|
|
166
167
|
return n;
|
|
167
168
|
}, fe = (e, a, t) => {
|
|
168
169
|
const n = [], o = e.expectedDate;
|
|
169
|
-
let r =
|
|
170
|
-
for (;
|
|
170
|
+
let r = u(o, t) ? o : N(o, 1);
|
|
171
|
+
for (; u(r, t); )
|
|
171
172
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = A(r, 1);
|
|
172
173
|
return n;
|
|
173
174
|
}, pe = (e, a, t) => {
|
|
174
175
|
const n = [], o = e.expectedDate;
|
|
175
|
-
let r =
|
|
176
|
-
for (;
|
|
176
|
+
let r = u(o, t) ? o : N(o, 2);
|
|
177
|
+
for (; u(r, t); )
|
|
177
178
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = A(r, 2);
|
|
178
179
|
return n;
|
|
179
180
|
}, ye = (e, a, t) => {
|
|
180
181
|
const n = [], o = e.expectedDate;
|
|
181
|
-
let r =
|
|
182
|
-
for (;
|
|
182
|
+
let r = u(o, t) ? o : T(o, 1);
|
|
183
|
+
for (; u(r, t); )
|
|
183
184
|
h(r, a) && n.push({ ...e, expectedDate: r }), r = K(r, 1);
|
|
184
185
|
return n;
|
|
185
186
|
}, et = (e, a) => {
|
|
@@ -195,11 +196,11 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
195
196
|
const n = [];
|
|
196
197
|
for (const o of a) {
|
|
197
198
|
const r = t.filter(
|
|
198
|
-
(
|
|
199
|
+
(c) => c.repeating_transaction_guid === o.guid
|
|
199
200
|
);
|
|
200
201
|
t.length > 0 && n.push({
|
|
201
202
|
...o,
|
|
202
|
-
account: e.find((
|
|
203
|
+
account: e.find((c) => c.guid === o.account_guid),
|
|
203
204
|
transactions: r
|
|
204
205
|
});
|
|
205
206
|
}
|
|
@@ -214,41 +215,41 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
214
215
|
recurrences: [t]
|
|
215
216
|
}), a;
|
|
216
217
|
}, []), ot = (e, a, t) => {
|
|
217
|
-
const n = E(b(), a.recurrence_day), o = F(b(), a.recurrence_day), r = W(a.recurrence_day),
|
|
218
|
-
let
|
|
218
|
+
const n = E(b(), a.recurrence_day), o = F(b(), a.recurrence_day), r = W(a.recurrence_day), c = a.second_recurrence_day ? W(a.second_recurrence_day) : "";
|
|
219
|
+
let i = t ? l(e.monthly_ordinal, r) : e.monthly;
|
|
219
220
|
switch (a.recurrence_type) {
|
|
220
221
|
case s.EveryQuarter:
|
|
221
|
-
|
|
222
|
+
i = t ? l(e.quarterly_ordinal, r) : e.quarterly;
|
|
222
223
|
break;
|
|
223
224
|
case s.EveryWeek:
|
|
224
|
-
|
|
225
|
+
i = t ? l(
|
|
225
226
|
e.weekly_ordinal,
|
|
226
227
|
v(n, k.DAY_OF_WEEK)
|
|
227
228
|
) : e.weekly;
|
|
228
229
|
break;
|
|
229
230
|
case s.EveryYear:
|
|
230
|
-
|
|
231
|
+
i = t ? l(
|
|
231
232
|
e.anually_ordinal,
|
|
232
233
|
v(o, k.MONTH_DAY)
|
|
233
234
|
) : e.anually;
|
|
234
235
|
break;
|
|
235
236
|
case s.EveryOtherWeek:
|
|
236
|
-
|
|
237
|
+
i = t ? l(
|
|
237
238
|
e.every_other_week_ordinal,
|
|
238
239
|
v(n, k.DAY_OF_WEEK)
|
|
239
240
|
) : e.every_other_week;
|
|
240
241
|
break;
|
|
241
242
|
case s.EveryOtherMonth:
|
|
242
|
-
|
|
243
|
+
i = t ? l(e.every_other_month_ordinal, r) : e.every_other_month;
|
|
243
244
|
break;
|
|
244
245
|
case s.EveryOtherQuarter:
|
|
245
|
-
|
|
246
|
+
i = t ? l(e.every_other_quarter_ordinal, r) : e.every_other_quarter;
|
|
246
247
|
break;
|
|
247
248
|
case s.TwiceAMonth:
|
|
248
|
-
|
|
249
|
+
i = t ? l(e.twice_a_month_ordinal, r, c) : e.twice_a_month;
|
|
249
250
|
break;
|
|
250
251
|
}
|
|
251
|
-
return
|
|
252
|
+
return i;
|
|
252
253
|
}, at = (e, a) => {
|
|
253
254
|
let t = a;
|
|
254
255
|
switch (e) {
|