@mx-cartographer/experiences 8.0.0-alpha.bb2 → 8.0.0-alpha.bb4
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-B4CDD-zq.mjs} +1 -1
- package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
- package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
- package/dist/AccountListItem-wgmlex-_.mjs +90 -0
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
- package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.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-Jv8h9H9l.mjs} +33 -33
- package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
- package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
- package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
- package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
- package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
- package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
- package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
- package/dist/Drawer-BF40nbsH.mjs +163 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
- package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
- package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
- package/dist/LineChart-C1PxNf7P.mjs +581 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
- package/dist/Loader-Ckqi9Rx6.mjs +21 -0
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
- 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-2Y_3U_mg.mjs} +10 -10
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
- package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
- package/dist/SearchBox-B7km148n.mjs +39 -0
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
- package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
- package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
- package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
- package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
- package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
- package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
- package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
- 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 +228 -199
- package/dist/accounts/stores/AccountStore.d.ts +2 -0
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/index.es.js +459 -462
- package/dist/cashflow/index.es.js +419 -428
- 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/Loader.d.ts +1 -2
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/SkeletonLoader.d.ts +7 -0
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- 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 +5 -1
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/components/index.d.ts +0 -1
- package/dist/common/hooks/index.d.ts +0 -1
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +413 -674
- package/dist/common/stores/GlobalStore.d.ts +7 -1
- package/dist/common/stores/GlobalUiStore.d.ts +3 -2
- 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/utils/Theme.d.ts +1 -3
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +1 -2
- package/dist/debts/index.es.js +673 -665
- package/dist/exportTransactionsToCSV-BgV_wTLT.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 +3175 -1067
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +580 -570
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +6 -6
- package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +537 -536
- package/dist/merchants/index.es.js +9 -9
- 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/components/NetWorthChange.d.ts +3 -1
- package/dist/networth/index.es.js +262 -254
- package/dist/notifications/index.es.js +90 -91
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +586 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
- package/dist/settings/index.es.js +371 -365
- package/dist/spending/index.es.js +267 -419
- 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 +231 -226
- package/dist/transactions/stores/TransactionStore.d.ts +1 -1
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +988 -612
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
- package/package.json +51 -56
- package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/AccountListItem-JFMZROh7.mjs +0 -90
- package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/Loader-DUaFpDGv.mjs +0 -24
- package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
- package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/accounts/components/AccountsWidgetContent.d.ts +0 -3
- package/dist/common/components/barchart/Bar.d.ts +0 -25
- package/dist/common/components/barchart/BarChart.d.ts +0 -34
- package/dist/common/components/barchart/BarColumn.d.ts +0 -37
- package/dist/common/components/barchart/Legend.d.ts +0 -8
- package/dist/common/components/barchart/Util.d.ts +0 -42
- package/dist/common/components/barchart/index.d.ts +0 -1
- 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/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
- 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-BNCWQAN_.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-D1cjbdCI.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 };
|
|
@@ -39,7 +39,7 @@ const F = p(({ goal: e }) => {
|
|
|
39
39
|
)
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
}),
|
|
42
|
+
}), M = p(({ goal: e }) => {
|
|
43
43
|
const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.monthly_payment ?? 0), c = !e.guid, i = t < 0 || t > 9999999999e-2, d = async () => {
|
|
44
44
|
const n = { ...e, monthly_payment: t };
|
|
45
45
|
e.monthly_payment = t, c ? l(n) : (await m({ ...e, monthly_payment: t }), r(a.alert_goal_updated_payment));
|
|
@@ -68,12 +68,12 @@ const F = p(({ goal: e }) => {
|
|
|
68
68
|
fullWidth: !0,
|
|
69
69
|
minAmount: 0,
|
|
70
70
|
setAmount: (n) => s(isNaN(Number(n)) ? t : Number(n)),
|
|
71
|
-
sx: { ".MuiTypography-
|
|
71
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
72
72
|
}
|
|
73
73
|
)
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
|
-
}),
|
|
76
|
+
}), z = p(({ goal: e }) => {
|
|
77
77
|
const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.initial_amount), c = !e.guid, i = t < 0 || t > 9999999999e-2, d = async () => {
|
|
78
78
|
const n = { ...e, initial_amount: t };
|
|
79
79
|
e.initial_amount = t, c ? l(n) : (await m({ ...e, initial_amount: t }), r(a.alert_goal_updated_balance));
|
|
@@ -102,7 +102,7 @@ const F = p(({ goal: e }) => {
|
|
|
102
102
|
fullWidth: !0,
|
|
103
103
|
minAmount: 0,
|
|
104
104
|
setAmount: (n) => s(isNaN(Number(n)) ? t : Number(n)),
|
|
105
|
-
sx: { ".MuiTypography-
|
|
105
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
106
106
|
}
|
|
107
107
|
)
|
|
108
108
|
}
|
|
@@ -110,6 +110,6 @@ const F = p(({ goal: e }) => {
|
|
|
110
110
|
});
|
|
111
111
|
export {
|
|
112
112
|
F as I,
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
M,
|
|
114
|
+
z as O
|
|
115
115
|
};
|
|
@@ -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-8EsStyIQ.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-CxcSL1dY.mjs";
|
|
13
|
+
import { A as m } from "./WidgetContainer-CDh9fjpR.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
|
),
|
|
@@ -1,78 +1,79 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as d, jsxs as M, Fragment as B } from "react/jsx-runtime";
|
|
2
2
|
import P from "@mui/material/Avatar";
|
|
3
3
|
import w from "@mui/material/ListItem";
|
|
4
4
|
import L from "@mui/material/ListItemAvatar";
|
|
5
5
|
import U from "@mui/material/ListItemButton";
|
|
6
6
|
import G from "@mui/material/ListItemText";
|
|
7
|
-
import { Icon as I
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { ExpandMore as
|
|
7
|
+
import { Icon as I } from "@mxenabled/mxui";
|
|
8
|
+
import S from "@mui/material/ListItemIcon";
|
|
9
|
+
import C from "@mui/material/MenuItem";
|
|
10
|
+
import $ from "@mui/material/TextField";
|
|
11
|
+
import { ExpandMore as j } from "@mxenabled/mx-icons";
|
|
12
12
|
import { addDays as Q } from "date-fns/addDays";
|
|
13
13
|
import { addMonths as f } from "date-fns/addMonths";
|
|
14
14
|
import { addQuarters as A } from "date-fns/addQuarters";
|
|
15
|
-
import { addYears as
|
|
16
|
-
import { formatISO as
|
|
17
|
-
import { fromUnixTime as
|
|
15
|
+
import { addYears as z } from "date-fns/addYears";
|
|
16
|
+
import { formatISO as K } from "date-fns/formatISO";
|
|
17
|
+
import { fromUnixTime as H } 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
|
|
21
|
-
import { isSameDay as
|
|
20
|
+
import { isBefore as u } from "date-fns/isBefore";
|
|
21
|
+
import { isSameDay as V } from "date-fns/isSameDay";
|
|
22
22
|
import { nextDay as E } from "date-fns/nextDay";
|
|
23
23
|
import { parseISO as J } from "date-fns/parseISO";
|
|
24
24
|
import { setDate as g } from "date-fns/setDate";
|
|
25
25
|
import { startOfToday as b } from "date-fns/startOfToday";
|
|
26
|
-
import { subDays as
|
|
27
|
-
import { subMonths as
|
|
26
|
+
import { subDays as _ } from "date-fns/subDays";
|
|
27
|
+
import { subMonths as X } from "date-fns/subMonths";
|
|
28
28
|
import { subQuarters as N } from "date-fns/subQuarters";
|
|
29
|
-
import { subYears as
|
|
30
|
-
import { lastDayOfMonth as
|
|
31
|
-
import { setDayOfYear as
|
|
32
|
-
import { g as
|
|
33
|
-
import { b as W } from "./NumberFormatting-
|
|
34
|
-
import { f as v,
|
|
29
|
+
import { subYears as Z } from "date-fns/subYears";
|
|
30
|
+
import { lastDayOfMonth as T } from "date-fns/lastDayOfMonth";
|
|
31
|
+
import { setDayOfYear as q } from "date-fns/setDayOfYear";
|
|
32
|
+
import { g as F, a as R, b as ee, c as te, d as re, e as oe, f as ae } from "./DateUtil-CDPZw_-m.mjs";
|
|
33
|
+
import { b as W } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
34
|
+
import { f as v, a as k } from "./Dialog-CDV0kKxj.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
|
-
const
|
|
37
|
+
const Te = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
38
38
|
const o = /* @__PURE__ */ M(B, { children: [
|
|
39
|
-
/* @__PURE__ */ d(L, { children: /* @__PURE__ */ d(P, { sx: { bgcolor: "
|
|
39
|
+
/* @__PURE__ */ d(L, { children: /* @__PURE__ */ d(P, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ d(I, { name: e, sx: { color: "text.primary" } }) }) }),
|
|
40
40
|
/* @__PURE__ */ d(
|
|
41
41
|
G,
|
|
42
42
|
{
|
|
43
43
|
primary: a,
|
|
44
|
-
primaryTypographyProps: { variant: "
|
|
44
|
+
primaryTypographyProps: { variant: "caption" },
|
|
45
45
|
secondary: n,
|
|
46
|
-
secondaryTypographyProps: { color: "text.default", variant: "
|
|
46
|
+
secondaryTypographyProps: { color: "text.default", variant: "body1", fontWeight: 600 }
|
|
47
47
|
}
|
|
48
48
|
)
|
|
49
49
|
] });
|
|
50
50
|
return t ? /* @__PURE__ */ d(w, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ M(U, { onClick: t, children: [
|
|
51
51
|
o,
|
|
52
|
-
/* @__PURE__ */ d(
|
|
52
|
+
/* @__PURE__ */ d(S, { children: /* @__PURE__ */ d(I, { name: "chevron_right", size: 24 }) })
|
|
53
53
|
] }) }) : /* @__PURE__ */ d(w, { disableGutters: !1, disablePadding: !1, children: o });
|
|
54
|
-
},
|
|
55
|
-
|
|
54
|
+
}, qe = ({ label: e, onChange: a, options: t, value: n, ...o }) => /* @__PURE__ */ d(
|
|
55
|
+
$,
|
|
56
56
|
{
|
|
57
57
|
InputLabelProps: { shrink: !0 },
|
|
58
58
|
SelectProps: {
|
|
59
|
-
IconComponent: (
|
|
59
|
+
IconComponent: (c) => /* @__PURE__ */ d(j, { 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(C, { value: c.id, children: c.label }, c.id))
|
|
70
71
|
}
|
|
71
|
-
),
|
|
72
|
+
), ne = (e) => {
|
|
72
73
|
if (!e) return "";
|
|
73
74
|
let a = e.user_name || e.feed_name || "";
|
|
74
75
|
return e.account_number && (a = `${a} *${e.account_number}`), a;
|
|
75
|
-
},
|
|
76
|
+
}, se = (e, a) => {
|
|
76
77
|
const t = [], n = e.transactions.find(
|
|
77
78
|
(m) => m.repeating_transaction_guid === e.guid
|
|
78
79
|
);
|
|
@@ -84,7 +85,7 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
84
85
|
expectedDate: o,
|
|
85
86
|
frequency: e.recurrence_type,
|
|
86
87
|
institutionGuid: e.account?.institution_guid || "",
|
|
87
|
-
institutionName:
|
|
88
|
+
institutionName: ne(e.account),
|
|
88
89
|
merchantGuid: e.merchant_guid,
|
|
89
90
|
name: e.description,
|
|
90
91
|
recurrenceDay: e.recurrence_day,
|
|
@@ -93,119 +94,119 @@ 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(...
|
|
100
|
+
t.push(...ce(r, c, i));
|
|
100
101
|
break;
|
|
101
102
|
case s.EveryOtherWeek:
|
|
102
|
-
t.push(...
|
|
103
|
+
t.push(...ie(r, c, i));
|
|
103
104
|
break;
|
|
104
105
|
case s.TwiceAMonth:
|
|
105
|
-
t.push(...
|
|
106
|
+
t.push(...ue(r, c, i));
|
|
106
107
|
break;
|
|
107
108
|
case s.EveryMonth:
|
|
108
|
-
t.push(...
|
|
109
|
+
t.push(...de(r, c, i));
|
|
109
110
|
break;
|
|
110
111
|
case s.EveryOtherMonth:
|
|
111
|
-
t.push(...
|
|
112
|
+
t.push(...me(r, c, i));
|
|
112
113
|
break;
|
|
113
114
|
case s.EveryQuarter:
|
|
114
|
-
t.push(...
|
|
115
|
+
t.push(...le(r, c, i));
|
|
115
116
|
break;
|
|
116
117
|
case s.EveryOtherQuarter:
|
|
117
|
-
t.push(...
|
|
118
|
+
t.push(...he(r, c, i));
|
|
118
119
|
break;
|
|
119
120
|
case s.EveryYear:
|
|
120
|
-
t.push(...
|
|
121
|
+
t.push(...fe(r, c, i));
|
|
121
122
|
break;
|
|
122
123
|
}
|
|
123
124
|
for (const m of t) {
|
|
124
|
-
const
|
|
125
|
-
(x) => x.repeating_transaction_guid === e.guid && x.date > y(
|
|
125
|
+
const D = e.transactions.find(
|
|
126
|
+
(x) => x.repeating_transaction_guid === e.guid && x.date > y(_(m.expectedDate, 5)) && x.date < y(Q(m.expectedDate, 5))
|
|
126
127
|
);
|
|
127
|
-
|
|
128
|
+
D ? (m.transaction = D, m.status = p.Paid, m.occurredOnDate = H(D.date)) : u(m.expectedDate, _(b(), 3)) && (m.status = p.Missed);
|
|
128
129
|
}
|
|
129
130
|
return t;
|
|
130
|
-
},
|
|
131
|
+
}, ce = (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
|
+
}, ie = (e, a, t) => {
|
|
137
138
|
const n = [], o = e.expectedDate;
|
|
138
|
-
if (
|
|
139
|
-
let r =
|
|
140
|
-
for (; h(r, a) ||
|
|
141
|
-
n.push({ ...e, expectedDate: r }), r =
|
|
142
|
-
for (r = o; h(r, a) &&
|
|
139
|
+
if (u(o, t)) {
|
|
140
|
+
let r = _(o, 14);
|
|
141
|
+
for (; h(r, a) || V(r, a); )
|
|
142
|
+
n.push({ ...e, expectedDate: r }), r = _(r, 14);
|
|
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
|
+
}, ue = (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
|
-
let r = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? g(a, e.secondRecurrenceDay) :
|
|
152
|
-
for (;
|
|
152
|
+
let r = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? g(a, e.secondRecurrenceDay) : T(a);
|
|
153
|
+
for (; u(r, t); )
|
|
153
154
|
n.push({ ...e, expectedDate: r }), r = f(r, 1);
|
|
154
155
|
return n;
|
|
155
|
-
},
|
|
156
|
+
}, de = (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
|
+
}, me = (e, a, t) => {
|
|
162
163
|
const n = [], o = e.expectedDate;
|
|
163
|
-
let r =
|
|
164
|
-
for (;
|
|
164
|
+
let r = u(o, t) ? o : X(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
|
+
}, le = (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
|
+
}, he = (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
|
+
}, fe = (e, a, t) => {
|
|
180
181
|
const n = [], o = e.expectedDate;
|
|
181
|
-
let r =
|
|
182
|
-
for (;
|
|
183
|
-
h(r, a) && n.push({ ...e, expectedDate: r }), r =
|
|
182
|
+
let r = u(o, t) ? o : Z(o, 1);
|
|
183
|
+
for (; u(r, t); )
|
|
184
|
+
h(r, a) && n.push({ ...e, expectedDate: r }), r = z(r, 1);
|
|
184
185
|
return n;
|
|
185
|
-
},
|
|
186
|
+
}, Fe = (e, a) => {
|
|
186
187
|
const t = [];
|
|
187
188
|
for (const n of e) {
|
|
188
|
-
const o =
|
|
189
|
+
const o = se(n, a);
|
|
189
190
|
t.push(...o);
|
|
190
191
|
}
|
|
191
192
|
return t.sort(
|
|
192
193
|
(n, o) => y(n.occurredOnDate || n.expectedDate) - y(o.occurredOnDate || o.expectedDate)
|
|
193
194
|
);
|
|
194
|
-
},
|
|
195
|
+
}, Re = (e, a, t) => {
|
|
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
|
}
|
|
206
207
|
return n;
|
|
207
|
-
},
|
|
208
|
-
const n =
|
|
208
|
+
}, et = (e) => e.reduce((a, t) => {
|
|
209
|
+
const n = K(t.expectedDate, { representation: "date" }), o = a.find(
|
|
209
210
|
(r) => r.date.toString() === t.expectedDate.toString()
|
|
210
211
|
);
|
|
211
212
|
return o ? o.recurrences.push(t) : a.push({
|
|
@@ -213,79 +214,79 @@ const se = ({ iconName: e, label: a, onClick: t, value: n }) => {
|
|
|
213
214
|
id: `date-${n}`,
|
|
214
215
|
recurrences: [t]
|
|
215
216
|
}), a;
|
|
216
|
-
}, []),
|
|
217
|
-
const n = E(b(), a.recurrence_day), o =
|
|
218
|
-
let
|
|
217
|
+
}, []), tt = (e, a, t) => {
|
|
218
|
+
const n = E(b(), a.recurrence_day), o = q(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
|
-
},
|
|
252
|
+
return i;
|
|
253
|
+
}, rt = (e, a) => {
|
|
253
254
|
let t = a;
|
|
254
255
|
switch (e) {
|
|
255
256
|
case s.EveryWeek:
|
|
256
|
-
t =
|
|
257
|
+
t = ae(a);
|
|
257
258
|
break;
|
|
258
259
|
case s.EveryOtherWeek:
|
|
259
|
-
t =
|
|
260
|
+
t = oe(a);
|
|
260
261
|
break;
|
|
261
262
|
case s.EveryMonth:
|
|
262
|
-
t =
|
|
263
|
+
t = re(a);
|
|
263
264
|
break;
|
|
264
265
|
case s.EveryOtherMonth:
|
|
265
|
-
t =
|
|
266
|
+
t = te(a);
|
|
266
267
|
break;
|
|
267
268
|
case s.EveryQuarter:
|
|
268
|
-
t =
|
|
269
|
+
t = ee(a);
|
|
269
270
|
break;
|
|
270
271
|
case s.EveryOtherQuarter:
|
|
271
|
-
t =
|
|
272
|
+
t = R(a);
|
|
272
273
|
break;
|
|
273
274
|
case s.EveryYear:
|
|
274
|
-
t =
|
|
275
|
+
t = F(a);
|
|
275
276
|
break;
|
|
276
277
|
}
|
|
277
278
|
return t;
|
|
278
279
|
};
|
|
279
280
|
export {
|
|
280
|
-
|
|
281
|
+
Te as D,
|
|
281
282
|
s as F,
|
|
282
283
|
Y as R,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
qe as S,
|
|
285
|
+
Re as a,
|
|
286
|
+
Fe as b,
|
|
286
287
|
p as c,
|
|
287
288
|
O as d,
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
rt as e,
|
|
290
|
+
et as f,
|
|
291
|
+
tt as g
|
|
291
292
|
};
|