@mx-cartographer/experiences 9.0.0-alpha.al4 → 9.0.0-alpha.al5
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 +22 -1
- package/dist/{AccountStore-DpYvNnql.mjs → AccountStore-B7zfcad7.mjs} +1 -1
- package/dist/{Analytics-BYItVAe-.mjs → Analytics-0Xm_BjHU.mjs} +1 -0
- package/dist/{BudgetUtil-CLhRnCoX.mjs → BudgetUtil-DZpOoZQa.mjs} +1 -1
- package/dist/{Help-D-laTbKu.mjs → Help-BkmSY96v.mjs} +2 -2
- package/dist/{ManageIncome-Cc-wba0I.mjs → ManageIncome-Dyv2dE4K.mjs} +4 -4
- package/dist/{NotificationSettings-D7VqsrZy.mjs → NotificationSettings-DBT37CVB.mjs} +1 -1
- package/dist/{RecurringSettings-BN9H5ALr.mjs → RecurringSettings-CE3n_QNd.mjs} +2 -2
- package/dist/RecurringTransactions-BbZ6MQsX.mjs +297 -0
- package/dist/{RecurringTransactionsStore-CkMA7gY3.mjs → RecurringTransactionsStore-BE_eUfTC.mjs} +1 -1
- package/dist/{SpendingLegend-BCnXkPCD.mjs → SpendingLegend-CypdabwS.mjs} +1 -1
- package/dist/{StatusIndicator-4tWnjeKS.mjs → StatusIndicator-DAWRKwmE.mjs} +1 -1
- package/dist/{TransactionDetails-D1I1XEsT.mjs → TransactionDetails-B5AP9wKy.mjs} +438 -431
- package/dist/{TransactionStore-Bx9euVrY.mjs → TransactionStore-CbZfz7-2.mjs} +75 -70
- package/dist/{WidgetContainer-CqskWiNX.mjs → WidgetContainer-CTefjn3q.mjs} +106 -93
- package/dist/accounts/index.es.js +6 -6
- package/dist/budgets/index.es.js +7 -7
- package/dist/cashflow/index.es.js +7 -7
- package/dist/common/constants/Analytics.d.ts +1 -0
- package/dist/common/hooks/useWidgetHeaderStyles.d.ts +20 -1
- package/dist/common/index.es.js +11 -11
- package/dist/dashboard/index.es.js +1 -1
- package/dist/debts/index.es.js +3 -3
- package/dist/finstrong/index.es.js +7 -7
- package/dist/goals/index.es.js +3 -3
- package/dist/help/index.es.js +2 -2
- package/dist/insights/components/index.d.ts +2 -0
- package/dist/insights/components/shared/AccountBalanceCard.d.ts +13 -0
- package/dist/insights/components/shared/P2P/P2PMultipleCategorization.d.ts +12 -0
- package/dist/insights/components/shared/SaveAnExtra100/SaveAnExtra100.d.ts +9 -0
- package/dist/insights/components/shared/index.d.ts +1 -0
- package/dist/insights/index.es.js +816 -664
- package/dist/investments/index.es.js +3 -3
- package/dist/networth/index.es.js +3 -3
- package/dist/notifications/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +10 -10
- package/dist/settings/index.es.js +5 -5
- package/dist/spending/index.es.js +6 -6
- package/dist/transactions/index.es.js +247 -247
- package/dist/trends/index.es.js +5 -5
- package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-CUcpY7aJ.mjs} +1 -1
- package/package.json +1 -1
- package/dist/RecurringTransactions-BCJp-Nap.mjs +0 -297
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
## [9.0.0] - 04-
|
|
1
|
+
## [9.0.0] - 04-10-2026
|
|
2
2
|
|
|
3
3
|
- **UPDATED** - common widget container to implement new styles, props (BREAKING CHANGE)
|
|
4
4
|
|
|
5
|
+
## [8.0.13] - 04-10-2026
|
|
6
|
+
|
|
7
|
+
- **FIXED** - `Transactions` - SplitTransaction Duplication Bug.
|
|
8
|
+
|
|
9
|
+
## [8.0.12] - 04-10-2026
|
|
10
|
+
|
|
11
|
+
- **ADDED** - `Save an extra $100` component card added
|
|
12
|
+
|
|
13
|
+
## [8.0.11] - 04-09-2026
|
|
14
|
+
|
|
15
|
+
- **ADDED** - Analytics for `TransactionTable` category cell click
|
|
16
|
+
- **FIXED** - `RecurringTransactions` to show yearly recurrences without past transactions within 90 days
|
|
17
|
+
|
|
18
|
+
## [8.0.10] - 04-09-2026
|
|
19
|
+
|
|
20
|
+
- **ADDED** - `P2PMultipleCategorization` component.
|
|
21
|
+
|
|
22
|
+
## [8.0.9] - 04-09-2026
|
|
23
|
+
|
|
24
|
+
- **ADDED** - `AccountBalanceCard` component.
|
|
25
|
+
|
|
5
26
|
## [8.0.8] - 04-09-2026
|
|
6
27
|
|
|
7
28
|
- **ADDED** - `Connection Details` drillDown.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { makeAutoObservable as h, runInAction as a } from "mobx";
|
|
2
|
-
import { i as g } from "./BudgetUtil-
|
|
2
|
+
import { i as g } from "./BudgetUtil-DZpOoZQa.mjs";
|
|
3
3
|
import { A as d } from "./AccountApi-ChQr5PAZ.mjs";
|
|
4
4
|
import { d as p } from "./Accounts-o7ohkngR.mjs";
|
|
5
5
|
import { A as s, d as u } from "./Account-BiB1F8lL.mjs";
|
|
@@ -96,6 +96,7 @@ const _ = {
|
|
|
96
96
|
TRANSACTION_DETAILS_CLICK_TAGS: "transaction_details_click_tags",
|
|
97
97
|
TRANSACTION_DETAILS_CLICK_UNSPLIT: "transaction_details_click_unsplit_transaction",
|
|
98
98
|
TRANSACTION_DETAILS_VIEW: "transaction_details",
|
|
99
|
+
TRANSACTIONS_TABLE_CLICK_CATEGORY: "transactions_table_click_category",
|
|
99
100
|
WIDGET_BACK_CLICK: "widget_back_button_click",
|
|
100
101
|
// NEW ANAYTICS EVENT FORMAT
|
|
101
102
|
// widget_action_subject
|
|
@@ -27,7 +27,7 @@ import ut from "@mui/material/IconButton";
|
|
|
27
27
|
import gt from "@mui/material/InputAdornment";
|
|
28
28
|
import E from "@mui/material/Stack";
|
|
29
29
|
import ft from "@mui/material/TextField";
|
|
30
|
-
import { u as pt } from "./useScreenSize-
|
|
30
|
+
import { u as pt } from "./useScreenSize-CUcpY7aJ.mjs";
|
|
31
31
|
import { m as ht } from "./hooks-BxkfR-Ff.mjs";
|
|
32
32
|
import { b as T } from "./Category-CevNQ03n.mjs";
|
|
33
33
|
import { b as j } from "./Localization-CPkpIwIx.mjs";
|
|
@@ -13,7 +13,7 @@ import C from "@mui/material/Stack";
|
|
|
13
13
|
import { H3 as it, P as U, Icon as Y, Text as E, H2 as at, InstitutionLogo as ft } from "@mxenabled/mxui";
|
|
14
14
|
import { ExpandMore as ct, ChevronRight as St } from "@mxenabled/mx-icons";
|
|
15
15
|
import { g as V, u as K, z as nt, d as It, b as Tt, o as Et, a as Ct } from "./hooks-BxkfR-Ff.mjs";
|
|
16
|
-
import { A as k } from "./Analytics-
|
|
16
|
+
import { A as k } from "./Analytics-0Xm_BjHU.mjs";
|
|
17
17
|
import At from "@mui/material/Breadcrumbs";
|
|
18
18
|
import { useTheme as Q } from "@mui/material/styles";
|
|
19
19
|
import { b as s } from "./Localization-CPkpIwIx.mjs";
|
|
@@ -28,7 +28,7 @@ import Dt from "@mui/material/ListItemAvatar";
|
|
|
28
28
|
import Rt from "@mui/material/ListItem";
|
|
29
29
|
import Pt from "@mui/material/ListItemIcon";
|
|
30
30
|
import Gt from "@mui/material/ListItemText";
|
|
31
|
-
import { u as Ft } from "./useScreenSize-
|
|
31
|
+
import { u as Ft } from "./useScreenSize-CUcpY7aJ.mjs";
|
|
32
32
|
const kt = (e, i, n) => {
|
|
33
33
|
const l = i.reduce((c, { institution_guid: d }) => (c[d] = (c[d] || 0) + 1, c), {});
|
|
34
34
|
return e.filter(({ guid: c }) => !!l[c]).map(({ guid: c, ...d }) => {
|
|
@@ -10,15 +10,15 @@ import ce from "@mui/material/ListItem";
|
|
|
10
10
|
import de from "@mui/material/ListItemAvatar";
|
|
11
11
|
import le from "@mui/material/ListItemButton";
|
|
12
12
|
import _e from "@mui/material/ListItemText";
|
|
13
|
-
import { S as M, D as z, g as H, c as X } from "./RecurringTransactions-
|
|
13
|
+
import { S as M, D as z, g as H, c as X } from "./RecurringTransactions-BbZ6MQsX.mjs";
|
|
14
14
|
import { subDays as Z } from "date-fns/subDays";
|
|
15
15
|
import { startOfToday as E } from "date-fns/startOfToday";
|
|
16
16
|
import { endOfMonth as ue } from "date-fns/endOfMonth";
|
|
17
17
|
import { parseISO as me } from "date-fns/parseISO";
|
|
18
18
|
import J from "@mui/material/Button";
|
|
19
19
|
import { Delete as pe, Add as ye, ReceiptLong as he } from "@mxenabled/mx-icons";
|
|
20
|
-
import { T as V, u as fe, S as ge, a as Ce } from "./StatusIndicator-
|
|
21
|
-
import { T as be } from "./TransactionDetails-
|
|
20
|
+
import { T as V, u as fe, S as ge, a as Ce } from "./StatusIndicator-DAWRKwmE.mjs";
|
|
21
|
+
import { T as be } from "./TransactionDetails-B5AP9wKy.mjs";
|
|
22
22
|
import { addYears as j } from "date-fns/addYears";
|
|
23
23
|
import { getDayOfYear as xe } from "date-fns/getDayOfYear";
|
|
24
24
|
import { setDayOfYear as Se } from "date-fns/setDayOfYear";
|
|
@@ -29,7 +29,7 @@ import { u as w, i as Y, g as P, b as Ae, h as ee, o as Ie } from "./hooks-BxkfR
|
|
|
29
29
|
import { F as l, R as L } from "./RepeatingTransaction-DF4vJn_v.mjs";
|
|
30
30
|
import { b as Re, f as te } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
31
31
|
import { D as N } from "./Drawer-Bbe4AMB1.mjs";
|
|
32
|
-
import { A as O } from "./Analytics-
|
|
32
|
+
import { A as O } from "./Analytics-0Xm_BjHU.mjs";
|
|
33
33
|
import { f as Ee, D as Le } from "./DateFormats-BMpMrZpW.mjs";
|
|
34
34
|
import { D as Oe } from "./Dialog-Ck34yr-d.mjs";
|
|
35
35
|
import { formatISO as Te } from "date-fns/formatISO";
|
|
@@ -21,7 +21,7 @@ import { b as me } from "./Localization-CPkpIwIx.mjs";
|
|
|
21
21
|
import { b as he, f as ue } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
22
22
|
import { D as B } from "./Dialog-Ck34yr-d.mjs";
|
|
23
23
|
import { C as _e } from "./CurrencyInput-DuMktPu3.mjs";
|
|
24
|
-
import { u as pe } from "./useScreenSize-
|
|
24
|
+
import { u as pe } from "./useScreenSize-CUcpY7aJ.mjs";
|
|
25
25
|
import { D as K } from "./Drawer-Bbe4AMB1.mjs";
|
|
26
26
|
import fe from "@mui/material/Collapse";
|
|
27
27
|
import ge from "@mui/material/Card";
|
|
@@ -7,10 +7,10 @@ import R from "@mui/material/Tabs";
|
|
|
7
7
|
import d from "@mui/material/Divider";
|
|
8
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-
|
|
10
|
+
import { R as C, A as S, a as E, M as v } from "./ManageIncome-Dyv2dE4K.mjs";
|
|
11
11
|
import { u as _, i as A, g as f } from "./hooks-BxkfR-Ff.mjs";
|
|
12
12
|
import { R as y, F as N } from "./RepeatingTransaction-DF4vJn_v.mjs";
|
|
13
|
-
import { A as m } from "./Analytics-
|
|
13
|
+
import { A as m } from "./Analytics-0Xm_BjHU.mjs";
|
|
14
14
|
const I = h(() => {
|
|
15
15
|
const { recurring: g } = _(), { detailedRepeatingTransactions: n } = A(), { onEvent: a } = f(), l = (r) => {
|
|
16
16
|
a(m.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { jsx as d, jsxs as O, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import R from "@mui/material/Avatar";
|
|
3
|
+
import M from "@mui/material/ListItem";
|
|
4
|
+
import F from "@mui/material/ListItemAvatar";
|
|
5
|
+
import G from "@mui/material/ListItemButton";
|
|
6
|
+
import P from "@mui/material/ListItemIcon";
|
|
7
|
+
import q from "@mui/material/ListItemText";
|
|
8
|
+
import { Icon as w } from "@mxenabled/mxui";
|
|
9
|
+
import C from "@mui/material/MenuItem";
|
|
10
|
+
import $ from "@mui/material/TextField";
|
|
11
|
+
import { ExpandMore as U } from "@mxenabled/mx-icons";
|
|
12
|
+
import { addDays as A } from "date-fns/addDays";
|
|
13
|
+
import { addMonths as p } from "date-fns/addMonths";
|
|
14
|
+
import { addQuarters as Q } from "date-fns/addQuarters";
|
|
15
|
+
import { addWeeks as W } from "date-fns/addWeeks";
|
|
16
|
+
import { addYears as j } from "date-fns/addYears";
|
|
17
|
+
import { formatISO as z } from "date-fns/formatISO";
|
|
18
|
+
import { fromUnixTime as K } from "date-fns/fromUnixTime";
|
|
19
|
+
import { getUnixTime as f } from "date-fns/getUnixTime";
|
|
20
|
+
import { isAfter as y } from "date-fns/isAfter";
|
|
21
|
+
import { isBefore as u } from "date-fns/isBefore";
|
|
22
|
+
import { isSameDay as H } from "date-fns/isSameDay";
|
|
23
|
+
import { lastDayOfMonth as T } from "date-fns/lastDayOfMonth";
|
|
24
|
+
import { nextDay as b } from "date-fns/nextDay";
|
|
25
|
+
import { parseISO as V } from "date-fns/parseISO";
|
|
26
|
+
import { setDate as _ } from "date-fns/setDate";
|
|
27
|
+
import { setDay as J } from "date-fns/setDay";
|
|
28
|
+
import { setDayOfYear as S } from "date-fns/setDayOfYear";
|
|
29
|
+
import { startOfToday as E } from "date-fns/startOfToday";
|
|
30
|
+
import { subDays as I } from "date-fns/subDays";
|
|
31
|
+
import { subMonths as X } from "date-fns/subMonths";
|
|
32
|
+
import { subQuarters as B } from "date-fns/subQuarters";
|
|
33
|
+
import { subWeeks as Z } from "date-fns/subWeeks";
|
|
34
|
+
import { subYears as ee } from "date-fns/subYears";
|
|
35
|
+
import { g as te, a as re, b as ae, c as oe, d as se, e as ne, f as ce } from "./DateUtil-wcYTmDRD.mjs";
|
|
36
|
+
import { F as n, a as g, R as ie, b as Y } from "./RepeatingTransaction-DF4vJn_v.mjs";
|
|
37
|
+
import { b as N } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
38
|
+
import { b as h } from "./Localization-CPkpIwIx.mjs";
|
|
39
|
+
import { f as v, D as k } from "./DateFormats-BMpMrZpW.mjs";
|
|
40
|
+
const ue = ({ iconName: e, label: o, onClick: r, value: a }) => {
|
|
41
|
+
const t = /* @__PURE__ */ O(L, { children: [
|
|
42
|
+
/* @__PURE__ */ d(F, { children: /* @__PURE__ */ d(R, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: /* @__PURE__ */ d(w, { name: e, sx: { color: "text.primary" } }) }) }),
|
|
43
|
+
/* @__PURE__ */ d(
|
|
44
|
+
q,
|
|
45
|
+
{
|
|
46
|
+
primary: o,
|
|
47
|
+
primaryTypographyProps: { variant: "caption" },
|
|
48
|
+
secondary: a,
|
|
49
|
+
secondaryTypographyProps: { color: "text.default", variant: "body1", fontWeight: 600 }
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] });
|
|
53
|
+
return r ? /* @__PURE__ */ d(M, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ O(G, { onClick: r, children: [
|
|
54
|
+
t,
|
|
55
|
+
/* @__PURE__ */ d(P, { children: /* @__PURE__ */ d(w, { name: "chevron_right", size: 24 }) })
|
|
56
|
+
] }) }) : /* @__PURE__ */ d(M, { disableGutters: !1, disablePadding: !1, children: t });
|
|
57
|
+
}, st = ue, nt = ({ label: e, onChange: o, options: r, value: a, ...t }) => /* @__PURE__ */ d(
|
|
58
|
+
$,
|
|
59
|
+
{
|
|
60
|
+
InputLabelProps: { shrink: !0 },
|
|
61
|
+
SelectProps: {
|
|
62
|
+
IconComponent: (c) => /* @__PURE__ */ d(U, { size: 20, sx: { mr: 4 }, ...c })
|
|
63
|
+
},
|
|
64
|
+
defaultValue: 0,
|
|
65
|
+
label: e,
|
|
66
|
+
onChange: (c) => {
|
|
67
|
+
o(Number(c.target.value));
|
|
68
|
+
},
|
|
69
|
+
select: !0,
|
|
70
|
+
value: a,
|
|
71
|
+
variant: "outlined",
|
|
72
|
+
...t,
|
|
73
|
+
children: r.map((c) => /* @__PURE__ */ d(C, { value: c.id, children: c.label }, c.id))
|
|
74
|
+
}
|
|
75
|
+
), de = (e) => {
|
|
76
|
+
if (!e) return "";
|
|
77
|
+
let o = e.user_name || e.feed_name || "";
|
|
78
|
+
return e.account_number && (o = `${o} *${e.account_number}`), o;
|
|
79
|
+
}, me = (e, o) => {
|
|
80
|
+
const r = [], a = e.recurrence_type === n.EveryYear, t = e.transactions.find(
|
|
81
|
+
(m) => m.repeating_transaction_guid === e.guid
|
|
82
|
+
);
|
|
83
|
+
if (!a && !t) return [];
|
|
84
|
+
const s = V(e.predicted_occurs_on), c = {
|
|
85
|
+
accountGuid: e.account?.guid || "",
|
|
86
|
+
amount: e.amount,
|
|
87
|
+
categoryGuid: t?.category_guid || "",
|
|
88
|
+
expectedDate: s,
|
|
89
|
+
frequency: e.recurrence_type,
|
|
90
|
+
institutionGuid: e.account?.institution_guid || "",
|
|
91
|
+
institutionName: de(e.account),
|
|
92
|
+
merchantGuid: e.merchant_guid,
|
|
93
|
+
name: e.description,
|
|
94
|
+
recurrenceDay: e.recurrence_day,
|
|
95
|
+
repeatingTransactionGuid: e.guid,
|
|
96
|
+
secondRecurrenceDay: e.second_recurrence_day,
|
|
97
|
+
status: g.Upcoming,
|
|
98
|
+
type: e.repeating_transaction_type === ie.Income ? Y.Income : Y.Expense,
|
|
99
|
+
transaction: void 0
|
|
100
|
+
}, i = o.start, l = o.end;
|
|
101
|
+
switch (e.recurrence_type) {
|
|
102
|
+
case n.EveryWeek:
|
|
103
|
+
r.push(...le(c, i, l));
|
|
104
|
+
break;
|
|
105
|
+
case n.EveryOtherWeek:
|
|
106
|
+
r.push(...he(c, i, l));
|
|
107
|
+
break;
|
|
108
|
+
case n.TwiceAMonth:
|
|
109
|
+
r.push(...pe(c, i, l));
|
|
110
|
+
break;
|
|
111
|
+
case n.EveryMonth:
|
|
112
|
+
r.push(...ye(c, i, l));
|
|
113
|
+
break;
|
|
114
|
+
case n.EveryOtherMonth:
|
|
115
|
+
r.push(...fe(c, i, l));
|
|
116
|
+
break;
|
|
117
|
+
case n.EveryQuarter:
|
|
118
|
+
r.push(..._e(c, i, l));
|
|
119
|
+
break;
|
|
120
|
+
case n.EveryOtherQuarter:
|
|
121
|
+
r.push(...De(c, i, l));
|
|
122
|
+
break;
|
|
123
|
+
case n.EveryYear:
|
|
124
|
+
r.push(...xe(c, i, l));
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
for (const m of r) {
|
|
128
|
+
const D = e.transactions.find(
|
|
129
|
+
(x) => x.repeating_transaction_guid === e.guid && x.date > f(I(m.expectedDate, 5)) && x.date < f(A(m.expectedDate, 5))
|
|
130
|
+
);
|
|
131
|
+
D ? (m.transaction = D, m.status = g.Paid, m.occurredOnDate = K(D.date)) : u(m.expectedDate, I(E(), 3)) && (m.status = g.Missed);
|
|
132
|
+
}
|
|
133
|
+
return r;
|
|
134
|
+
}, le = (e, o, r) => {
|
|
135
|
+
const a = [];
|
|
136
|
+
let t = b(o, e.recurrenceDay);
|
|
137
|
+
for (; u(t, r); )
|
|
138
|
+
a.push({ ...e, expectedDate: t }), t = b(t, e.recurrenceDay);
|
|
139
|
+
return a;
|
|
140
|
+
}, he = (e, o, r) => {
|
|
141
|
+
const a = [];
|
|
142
|
+
let t = e.expectedDate;
|
|
143
|
+
if (u(t, o))
|
|
144
|
+
for (; u(t, o); )
|
|
145
|
+
t = W(t, 2);
|
|
146
|
+
else {
|
|
147
|
+
for (; y(t, o) || H(t, o); )
|
|
148
|
+
t = Z(t, 2);
|
|
149
|
+
t = W(t, 2);
|
|
150
|
+
}
|
|
151
|
+
for (; u(t, r); )
|
|
152
|
+
a.push({ ...e, expectedDate: t }), t = A(t, 14);
|
|
153
|
+
return a;
|
|
154
|
+
}, pe = (e, o, r) => {
|
|
155
|
+
const a = [];
|
|
156
|
+
let t = _(o, e.recurrenceDay);
|
|
157
|
+
for (; u(t, r); )
|
|
158
|
+
a.push({ ...e, expectedDate: t }), t = p(t, 1);
|
|
159
|
+
let s = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? _(o, e.secondRecurrenceDay) : T(o);
|
|
160
|
+
for (; u(s, r); )
|
|
161
|
+
a.push({ ...e, expectedDate: s }), s = p(s, 1);
|
|
162
|
+
return a;
|
|
163
|
+
}, ye = (e, o, r) => {
|
|
164
|
+
const a = [];
|
|
165
|
+
let t = _(o, e.recurrenceDay);
|
|
166
|
+
for (a.push({ ...e, expectedDate: t }), t = p(t, 1); u(t, r); )
|
|
167
|
+
a.push({ ...e, expectedDate: t }), t = p(t, 1);
|
|
168
|
+
return a;
|
|
169
|
+
}, fe = (e, o, r) => {
|
|
170
|
+
const a = [], t = e.expectedDate;
|
|
171
|
+
let s = u(t, r) ? t : X(t, 2);
|
|
172
|
+
for (; u(s, r); )
|
|
173
|
+
y(s, o) && a.push({ ...e, expectedDate: s }), s = p(s, 2);
|
|
174
|
+
return a;
|
|
175
|
+
}, _e = (e, o, r) => {
|
|
176
|
+
const a = [], t = e.expectedDate;
|
|
177
|
+
let s = u(t, r) ? t : B(t, 1);
|
|
178
|
+
for (; u(s, r); )
|
|
179
|
+
y(s, o) && a.push({ ...e, expectedDate: s }), s = Q(s, 1);
|
|
180
|
+
return a;
|
|
181
|
+
}, De = (e, o, r) => {
|
|
182
|
+
const a = [], t = e.expectedDate;
|
|
183
|
+
let s = u(t, r) ? t : B(t, 2);
|
|
184
|
+
for (; u(s, r); )
|
|
185
|
+
y(s, o) && a.push({ ...e, expectedDate: s }), s = Q(s, 2);
|
|
186
|
+
return a;
|
|
187
|
+
}, xe = (e, o, r) => {
|
|
188
|
+
const a = [], t = e.expectedDate;
|
|
189
|
+
let s = u(t, r) ? t : ee(t, 1);
|
|
190
|
+
for (; u(s, r); )
|
|
191
|
+
y(s, o) && a.push({ ...e, expectedDate: s }), s = j(s, 1);
|
|
192
|
+
return a;
|
|
193
|
+
}, ct = (e, o) => {
|
|
194
|
+
const r = [];
|
|
195
|
+
for (const a of e) {
|
|
196
|
+
const t = me(a, o);
|
|
197
|
+
r.push(...t);
|
|
198
|
+
}
|
|
199
|
+
return r.sort(
|
|
200
|
+
(a, t) => f(a.occurredOnDate || a.expectedDate) - f(t.occurredOnDate || t.expectedDate)
|
|
201
|
+
);
|
|
202
|
+
}, it = (e, o, r) => {
|
|
203
|
+
const a = [];
|
|
204
|
+
for (const t of o) {
|
|
205
|
+
const s = r.filter(
|
|
206
|
+
(c) => c.repeating_transaction_guid === t.guid
|
|
207
|
+
);
|
|
208
|
+
r.length > 0 && a.push({
|
|
209
|
+
...t,
|
|
210
|
+
account: e.find((c) => c.guid === t.account_guid),
|
|
211
|
+
transactions: s
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
return a;
|
|
215
|
+
}, ut = (e) => e.reduce((o, r) => {
|
|
216
|
+
const a = z(r.expectedDate, { representation: "date" }), t = o.find(
|
|
217
|
+
(s) => s.date.toString() === r.expectedDate.toString()
|
|
218
|
+
);
|
|
219
|
+
return t ? t.recurrences.push(r) : o.push({
|
|
220
|
+
date: r.expectedDate,
|
|
221
|
+
id: `date-${a}`,
|
|
222
|
+
recurrences: [r]
|
|
223
|
+
}), o;
|
|
224
|
+
}, []), dt = (e, o, r) => {
|
|
225
|
+
const a = b(E(), o.recurrence_day), t = S(E(), o.recurrence_day), s = N(o.recurrence_day), c = o.second_recurrence_day ? N(o.second_recurrence_day) : "";
|
|
226
|
+
let i = r ? h(e.monthly_ordinal, s) : e.monthly;
|
|
227
|
+
switch (o.recurrence_type) {
|
|
228
|
+
case n.EveryQuarter:
|
|
229
|
+
i = r ? h(e.quarterly_ordinal, s) : e.quarterly;
|
|
230
|
+
break;
|
|
231
|
+
case n.EveryWeek:
|
|
232
|
+
i = r ? h(
|
|
233
|
+
e.weekly_ordinal,
|
|
234
|
+
v(a, k.DAY_OF_WEEK)
|
|
235
|
+
) : e.weekly;
|
|
236
|
+
break;
|
|
237
|
+
case n.EveryYear:
|
|
238
|
+
i = r ? h(
|
|
239
|
+
e.anually_ordinal,
|
|
240
|
+
v(t, k.MONTH_DAY)
|
|
241
|
+
) : e.anually;
|
|
242
|
+
break;
|
|
243
|
+
case n.EveryOtherWeek:
|
|
244
|
+
i = r ? h(
|
|
245
|
+
e.every_other_week_ordinal,
|
|
246
|
+
v(a, k.DAY_OF_WEEK)
|
|
247
|
+
) : e.every_other_week;
|
|
248
|
+
break;
|
|
249
|
+
case n.EveryOtherMonth:
|
|
250
|
+
i = r ? h(e.every_other_month_ordinal, s) : e.every_other_month;
|
|
251
|
+
break;
|
|
252
|
+
case n.EveryOtherQuarter:
|
|
253
|
+
i = r ? h(e.every_other_quarter_ordinal, s) : e.every_other_quarter;
|
|
254
|
+
break;
|
|
255
|
+
case n.TwiceAMonth:
|
|
256
|
+
i = r ? h(e.twice_a_month_ordinal, s, c) : e.twice_a_month;
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
return i;
|
|
260
|
+
}, mt = (e, o, r) => {
|
|
261
|
+
let a = o;
|
|
262
|
+
r !== void 0 && (e === n.EveryWeek || e === n.EveryOtherWeek ? a = J(o, r) : e === n.EveryYear ? a = S(o, r) : a = _(o, r));
|
|
263
|
+
let t = a;
|
|
264
|
+
switch (e) {
|
|
265
|
+
case n.EveryWeek:
|
|
266
|
+
t = ce(a);
|
|
267
|
+
break;
|
|
268
|
+
case n.EveryOtherWeek:
|
|
269
|
+
t = ne(a);
|
|
270
|
+
break;
|
|
271
|
+
case n.EveryMonth:
|
|
272
|
+
t = se(a);
|
|
273
|
+
break;
|
|
274
|
+
case n.EveryOtherMonth:
|
|
275
|
+
t = oe(a);
|
|
276
|
+
break;
|
|
277
|
+
case n.EveryQuarter:
|
|
278
|
+
t = ae(a);
|
|
279
|
+
break;
|
|
280
|
+
case n.EveryOtherQuarter:
|
|
281
|
+
t = re(a);
|
|
282
|
+
break;
|
|
283
|
+
case n.EveryYear:
|
|
284
|
+
t = te(a);
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
return t;
|
|
288
|
+
};
|
|
289
|
+
export {
|
|
290
|
+
st as D,
|
|
291
|
+
nt as S,
|
|
292
|
+
it as a,
|
|
293
|
+
ct as b,
|
|
294
|
+
mt as c,
|
|
295
|
+
ut as d,
|
|
296
|
+
dt as g
|
|
297
|
+
};
|
package/dist/{RecurringTransactionsStore-CkMA7gY3.mjs → RecurringTransactionsStore-BE_eUfTC.mjs}
RENAMED
|
@@ -8,7 +8,7 @@ import { startOfMonth as y } from "date-fns/startOfMonth";
|
|
|
8
8
|
import { startOfToday as i } from "date-fns/startOfToday";
|
|
9
9
|
import { subDays as I } from "date-fns/subDays";
|
|
10
10
|
import { F as x, A as o } from "./Fetch-B6tMJC1r.mjs";
|
|
11
|
-
import { a as u, b as A } from "./RecurringTransactions-
|
|
11
|
+
import { a as u, b as A } from "./RecurringTransactions-BbZ6MQsX.mjs";
|
|
12
12
|
import { a as r, b as d } from "./RepeatingTransaction-DF4vJn_v.mjs";
|
|
13
13
|
var E = /* @__PURE__ */ ((a) => (a.Small = "small", a.Medium = "medium", a.Large = "large", a))(E || {});
|
|
14
14
|
const U = 44;
|
|
@@ -11,7 +11,7 @@ import { CategoryIcon as G, CategoryIconVariants as O, Text as y, P as $ } from
|
|
|
11
11
|
import { D as j } from "./Donut-CpxJlVvJ.mjs";
|
|
12
12
|
import { u as R } from "./useAriaLive-MkYebyUR.mjs";
|
|
13
13
|
import { u as v } from "./hooks-BxkfR-Ff.mjs";
|
|
14
|
-
import { u as V } from "./useScreenSize-
|
|
14
|
+
import { u as V } from "./useScreenSize-CUcpY7aJ.mjs";
|
|
15
15
|
import { f as b } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
16
16
|
const D = 5, B = (i, l, g, m) => m.reduce((o, n) => {
|
|
17
17
|
const a = i.find((s) => s.guid === n.category_guid);
|
|
@@ -19,7 +19,7 @@ import { fromUnixTime as w } from "date-fns/fromUnixTime";
|
|
|
19
19
|
import { isSameDay as z } from "date-fns/isSameDay";
|
|
20
20
|
import { h as ne } from "./DateUtil-wcYTmDRD.mjs";
|
|
21
21
|
import { L as ie } from "./Loader-D3rjKx72.mjs";
|
|
22
|
-
import { A as se } from "./Analytics-
|
|
22
|
+
import { A as se } from "./Analytics-0Xm_BjHU.mjs";
|
|
23
23
|
const C = () => {
|
|
24
24
|
if (!u.useContext(K))
|
|
25
25
|
throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
|