@mx-cartographer/experiences 7.11.10 → 7.11.11

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 CHANGED
@@ -1,4 +1,8 @@
1
- ## [7.11.10] - 03-05-2026
1
+ ## [7.11.11] - 03-04-2026
2
+
3
+ - **FIXED** - Issue with including bi-weekly recurrences in past months
4
+
5
+ ## [7.11.10] - 03-04-2026
2
6
 
3
7
  - **FIXED** - Account Actions | toggle a11y
4
8
 
@@ -10,7 +10,7 @@ import se from "@mui/material/ListItem";
10
10
  import ce from "@mui/material/ListItemAvatar";
11
11
  import le from "@mui/material/ListItemButton";
12
12
  import de from "@mui/material/ListItemText";
13
- import { F as d, S as M, D as z, g as $, R as T, e as _e } from "./RecurringTransactions-B_I4_FGO.mjs";
13
+ import { F as d, S as M, D as z, g as $, R as T, e as _e } from "./RecurringTransactions-C8Cy-9DA.mjs";
14
14
  import { subDays as X } from "date-fns/subDays";
15
15
  import { startOfToday as E } from "date-fns/startOfToday";
16
16
  import { endOfMonth as ue } from "date-fns/endOfMonth";
@@ -7,9 +7,9 @@ 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-C389-HAc.mjs";
10
+ import { R as C, A as S, a as E, M as v } from "./ManageIncome-Bx6Uw4fv.mjs";
11
11
  import { u as _, j as A, g as f } from "./hooks-zu7yblbi.mjs";
12
- import { R as y, F as N } from "./RecurringTransactions-B_I4_FGO.mjs";
12
+ import { R as y, F as N } from "./RecurringTransactions-C8Cy-9DA.mjs";
13
13
  import { A as m } from "./Analytics-i5h6BxR1.mjs";
14
14
  const I = h(() => {
15
15
  const { recurring: g } = _(), { detailedRepeatingTransactions: n } = A(), { onEvent: a } = f(), l = (r) => {
@@ -0,0 +1,302 @@
1
+ import { jsxs as O, Fragment as L, jsx as d } from "react/jsx-runtime";
2
+ import U from "@mui/material/Avatar";
3
+ import M from "@mui/material/ListItem";
4
+ import G from "@mui/material/ListItemAvatar";
5
+ import S from "@mui/material/ListItemButton";
6
+ import C from "@mui/material/ListItemText";
7
+ import { Icon as w, IconWeight as $ } from "@mxenabled/mxui";
8
+ import j from "@mui/material/ListItemIcon";
9
+ import z from "@mui/material/MenuItem";
10
+ import K from "@mui/material/TextField";
11
+ import { ExpandMore as H } from "@mxenabled/mx-icons";
12
+ import { addDays as A } from "date-fns/addDays";
13
+ import { addMonths as h } from "date-fns/addMonths";
14
+ import { addQuarters as Y } from "date-fns/addQuarters";
15
+ import { addWeeks as W } from "date-fns/addWeeks";
16
+ import { addYears as V } from "date-fns/addYears";
17
+ import { formatISO as X } from "date-fns/formatISO";
18
+ import { fromUnixTime as J } from "date-fns/fromUnixTime";
19
+ import { getUnixTime as y } from "date-fns/getUnixTime";
20
+ import { isAfter as f } from "date-fns/isAfter";
21
+ import { isBefore as u } from "date-fns/isBefore";
22
+ import { isSameDay as Z } from "date-fns/isSameDay";
23
+ import { lastDayOfMonth as T } from "date-fns/lastDayOfMonth";
24
+ import { nextDay as E } from "date-fns/nextDay";
25
+ import { parseISO as F } from "date-fns/parseISO";
26
+ import { setDate as D } from "date-fns/setDate";
27
+ import { setDay as R } from "date-fns/setDay";
28
+ import { setDayOfYear as N } from "date-fns/setDayOfYear";
29
+ import { startOfToday as g } from "date-fns/startOfToday";
30
+ import { subDays as I } from "date-fns/subDays";
31
+ import { subMonths as q } from "date-fns/subMonths";
32
+ import { subQuarters as B } from "date-fns/subQuarters";
33
+ import { subWeeks as ee } from "date-fns/subWeeks";
34
+ import { subYears as te } from "date-fns/subYears";
35
+ import { g as re, a as oe, b as ae, c as se, d as ne, e as ce, f as ie } from "./DateUtil-CVXVMbjf.mjs";
36
+ import { b as Q } from "./NumberFormatting-DjTD0t3W.mjs";
37
+ import { b as l } from "./Localization-2MODESHW.mjs";
38
+ import { f as x, D as k } from "./DateFormats-Cs-NbEZ7.mjs";
39
+ const ue = ({ iconName: e, label: a, onClick: r, value: o }) => {
40
+ const t = /* @__PURE__ */ O(L, { children: [
41
+ /* @__PURE__ */ d(G, { children: /* @__PURE__ */ d(U, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ d(w, { name: e, sx: { color: "text.primary" }, weight: $.Dark }) }) }),
42
+ /* @__PURE__ */ d(
43
+ C,
44
+ {
45
+ primary: a,
46
+ primaryTypographyProps: { variant: "XSmall" },
47
+ secondary: o,
48
+ secondaryTypographyProps: { color: "text.default", variant: "Body", fontWeight: 600 }
49
+ }
50
+ )
51
+ ] });
52
+ return r ? /* @__PURE__ */ d(M, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ O(S, { onClick: r, children: [
53
+ t,
54
+ /* @__PURE__ */ d(j, { children: /* @__PURE__ */ d(w, { name: "chevron_right", size: 24 }) })
55
+ ] }) }) : /* @__PURE__ */ d(M, { disableGutters: !1, disablePadding: !1, children: t });
56
+ }, at = ue, st = ({ label: e, onChange: a, options: r, value: o, ...t }) => /* @__PURE__ */ d(
57
+ K,
58
+ {
59
+ InputLabelProps: { shrink: !0 },
60
+ SelectProps: {
61
+ IconComponent: (c) => /* @__PURE__ */ d(H, { size: 20, sx: { mr: 4 }, ...c })
62
+ },
63
+ defaultValue: 0,
64
+ label: e,
65
+ onChange: (c) => {
66
+ a(Number(c.target.value));
67
+ },
68
+ select: !0,
69
+ value: o,
70
+ variant: "outlined",
71
+ ...t,
72
+ children: r.map((c) => /* @__PURE__ */ d(z, { value: c.id, children: c.label }, c.id))
73
+ }
74
+ );
75
+ var n = /* @__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))(n || {}), p = /* @__PURE__ */ ((e) => (e[e.Paid = 0] = "Paid", e[e.Missed = 1] = "Missed", e[e.Upcoming = 2] = "Upcoming", e))(p || {}), b = /* @__PURE__ */ ((e) => (e[e.Expense = 0] = "Expense", e[e.Income = 1] = "Income", e))(b || {}), P = /* @__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))(P || {});
76
+ const de = (e) => {
77
+ if (!e) return "";
78
+ let a = e.user_name || e.feed_name || "";
79
+ return e.account_number && (a = `${a} *${e.account_number}`), a;
80
+ }, me = (e, a) => {
81
+ const r = [], o = e.transactions.find(
82
+ (m) => m.repeating_transaction_guid === e.guid
83
+ );
84
+ if (!o) return [];
85
+ const t = F(e.predicted_occurs_on), s = {
86
+ accountGuid: e.account?.guid || "",
87
+ amount: e.amount,
88
+ categoryGuid: o.category_guid || "",
89
+ expectedDate: t,
90
+ frequency: e.recurrence_type,
91
+ institutionGuid: e.account?.institution_guid || "",
92
+ institutionName: de(e.account),
93
+ merchantGuid: e.merchant_guid,
94
+ name: e.description,
95
+ recurrenceDay: e.recurrence_day,
96
+ repeatingTransactionGuid: e.guid,
97
+ secondRecurrenceDay: e.second_recurrence_day,
98
+ status: p.Upcoming,
99
+ type: e.repeating_transaction_type === P.Income ? b.Income : b.Expense,
100
+ transaction: void 0
101
+ }, c = a.start, i = a.end;
102
+ switch (e.recurrence_type) {
103
+ case n.EveryWeek:
104
+ r.push(...le(s, c, i));
105
+ break;
106
+ case n.EveryOtherWeek:
107
+ r.push(...he(s, c, i));
108
+ break;
109
+ case n.TwiceAMonth:
110
+ r.push(...fe(s, c, i));
111
+ break;
112
+ case n.EveryMonth:
113
+ r.push(...pe(s, c, i));
114
+ break;
115
+ case n.EveryOtherMonth:
116
+ r.push(...ye(s, c, i));
117
+ break;
118
+ case n.EveryQuarter:
119
+ r.push(...De(s, c, i));
120
+ break;
121
+ case n.EveryOtherQuarter:
122
+ r.push(..._e(s, c, i));
123
+ break;
124
+ case n.EveryYear:
125
+ r.push(...ve(s, c, i));
126
+ break;
127
+ }
128
+ for (const m of r) {
129
+ const _ = e.transactions.find(
130
+ (v) => v.repeating_transaction_guid === e.guid && v.date > y(I(m.expectedDate, 5)) && v.date < y(A(m.expectedDate, 5))
131
+ );
132
+ _ ? (m.transaction = _, m.status = p.Paid, m.occurredOnDate = J(_.date)) : u(m.expectedDate, I(g(), 3)) && (m.status = p.Missed);
133
+ }
134
+ return r;
135
+ }, le = (e, a, r) => {
136
+ const o = [];
137
+ let t = E(a, e.recurrenceDay);
138
+ for (; u(t, r); )
139
+ o.push({ ...e, expectedDate: t }), t = E(t, e.recurrenceDay);
140
+ return o;
141
+ }, he = (e, a, r) => {
142
+ const o = [];
143
+ let t = e.expectedDate;
144
+ if (u(t, a))
145
+ for (; u(t, a); )
146
+ t = W(t, 2);
147
+ else {
148
+ for (; f(t, a) || Z(t, a); )
149
+ t = ee(t, 2);
150
+ t = W(t, 2);
151
+ }
152
+ for (; u(t, r); )
153
+ o.push({ ...e, expectedDate: t }), t = A(t, 14);
154
+ return o;
155
+ }, fe = (e, a, r) => {
156
+ const o = [];
157
+ let t = D(a, e.recurrenceDay);
158
+ for (; u(t, r); )
159
+ o.push({ ...e, expectedDate: t }), t = h(t, 1);
160
+ let s = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? D(a, e.secondRecurrenceDay) : T(a);
161
+ for (; u(s, r); )
162
+ o.push({ ...e, expectedDate: s }), s = h(s, 1);
163
+ return o;
164
+ }, pe = (e, a, r) => {
165
+ const o = [];
166
+ let t = D(a, e.recurrenceDay);
167
+ for (o.push({ ...e, expectedDate: t }), t = h(t, 1); u(t, r); )
168
+ o.push({ ...e, expectedDate: t }), t = h(t, 1);
169
+ return o;
170
+ }, ye = (e, a, r) => {
171
+ const o = [], t = e.expectedDate;
172
+ let s = u(t, r) ? t : q(t, 2);
173
+ for (; u(s, r); )
174
+ f(s, a) && o.push({ ...e, expectedDate: s }), s = h(s, 2);
175
+ return o;
176
+ }, De = (e, a, r) => {
177
+ const o = [], t = e.expectedDate;
178
+ let s = u(t, r) ? t : B(t, 1);
179
+ for (; u(s, r); )
180
+ f(s, a) && o.push({ ...e, expectedDate: s }), s = Y(s, 1);
181
+ return o;
182
+ }, _e = (e, a, r) => {
183
+ const o = [], t = e.expectedDate;
184
+ let s = u(t, r) ? t : B(t, 2);
185
+ for (; u(s, r); )
186
+ f(s, a) && o.push({ ...e, expectedDate: s }), s = Y(s, 2);
187
+ return o;
188
+ }, ve = (e, a, r) => {
189
+ const o = [], t = e.expectedDate;
190
+ let s = u(t, r) ? t : te(t, 1);
191
+ for (; u(s, r); )
192
+ f(s, a) && o.push({ ...e, expectedDate: s }), s = V(s, 1);
193
+ return o;
194
+ }, nt = (e, a) => {
195
+ const r = [];
196
+ for (const o of e) {
197
+ const t = me(o, a);
198
+ r.push(...t);
199
+ }
200
+ return r.sort(
201
+ (o, t) => y(o.occurredOnDate || o.expectedDate) - y(t.occurredOnDate || t.expectedDate)
202
+ );
203
+ }, ct = (e, a, r) => {
204
+ const o = [];
205
+ for (const t of a) {
206
+ const s = r.filter(
207
+ (c) => c.repeating_transaction_guid === t.guid
208
+ );
209
+ r.length > 0 && o.push({
210
+ ...t,
211
+ account: e.find((c) => c.guid === t.account_guid),
212
+ transactions: s
213
+ });
214
+ }
215
+ return o;
216
+ }, it = (e) => e.reduce((a, r) => {
217
+ const o = X(r.expectedDate, { representation: "date" }), t = a.find(
218
+ (s) => s.date.toString() === r.expectedDate.toString()
219
+ );
220
+ return t ? t.recurrences.push(r) : a.push({
221
+ date: r.expectedDate,
222
+ id: `date-${o}`,
223
+ recurrences: [r]
224
+ }), a;
225
+ }, []), ut = (e, a, r) => {
226
+ const o = E(g(), a.recurrence_day), t = N(g(), a.recurrence_day), s = Q(a.recurrence_day), c = a.second_recurrence_day ? Q(a.second_recurrence_day) : "";
227
+ let i = r ? l(e.monthly_ordinal, s) : e.monthly;
228
+ switch (a.recurrence_type) {
229
+ case n.EveryQuarter:
230
+ i = r ? l(e.quarterly_ordinal, s) : e.quarterly;
231
+ break;
232
+ case n.EveryWeek:
233
+ i = r ? l(
234
+ e.weekly_ordinal,
235
+ x(o, k.DAY_OF_WEEK)
236
+ ) : e.weekly;
237
+ break;
238
+ case n.EveryYear:
239
+ i = r ? l(
240
+ e.anually_ordinal,
241
+ x(t, k.MONTH_DAY)
242
+ ) : e.anually;
243
+ break;
244
+ case n.EveryOtherWeek:
245
+ i = r ? l(
246
+ e.every_other_week_ordinal,
247
+ x(o, k.DAY_OF_WEEK)
248
+ ) : e.every_other_week;
249
+ break;
250
+ case n.EveryOtherMonth:
251
+ i = r ? l(e.every_other_month_ordinal, s) : e.every_other_month;
252
+ break;
253
+ case n.EveryOtherQuarter:
254
+ i = r ? l(e.every_other_quarter_ordinal, s) : e.every_other_quarter;
255
+ break;
256
+ case n.TwiceAMonth:
257
+ i = r ? l(e.twice_a_month_ordinal, s, c) : e.twice_a_month;
258
+ break;
259
+ }
260
+ return i;
261
+ }, dt = (e, a, r) => {
262
+ let o = a;
263
+ r !== void 0 && (e === n.EveryWeek || e === n.EveryOtherWeek ? o = R(a, r) : e === n.EveryYear ? o = N(a, r) : o = D(a, r));
264
+ let t = o;
265
+ switch (e) {
266
+ case n.EveryWeek:
267
+ t = ie(o);
268
+ break;
269
+ case n.EveryOtherWeek:
270
+ t = ce(o);
271
+ break;
272
+ case n.EveryMonth:
273
+ t = ne(o);
274
+ break;
275
+ case n.EveryOtherMonth:
276
+ t = se(o);
277
+ break;
278
+ case n.EveryQuarter:
279
+ t = ae(o);
280
+ break;
281
+ case n.EveryOtherQuarter:
282
+ t = oe(o);
283
+ break;
284
+ case n.EveryYear:
285
+ t = re(o);
286
+ break;
287
+ }
288
+ return t;
289
+ };
290
+ export {
291
+ at as D,
292
+ n as F,
293
+ P as R,
294
+ st as S,
295
+ ct as a,
296
+ nt as b,
297
+ p as c,
298
+ b as d,
299
+ dt as e,
300
+ it as f,
301
+ ut as g
302
+ };
@@ -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-C67go-m2.mjs";
11
- import { a as u, b as A, c as r, d } from "./RecurringTransactions-B_I4_FGO.mjs";
11
+ import { a as u, b as A, c as r, d } from "./RecurringTransactions-C8Cy-9DA.mjs";
12
12
  var E = /* @__PURE__ */ ((a) => (a.Small = "small", a.Medium = "medium", a.Large = "large", a))(E || {});
13
13
  const G = 44;
14
14
  class h {
@@ -46,7 +46,7 @@ import { u as it, b as ct } from "../CategorySelectorDrawer-BMmxw2oY.mjs";
46
46
  import We from "@mui/material/CardHeader";
47
47
  import { subDays as lt } from "date-fns/subDays";
48
48
  import dt from "@mui/material/IconButton";
49
- import { M as ut } from "../ManageIncome-C389-HAc.mjs";
49
+ import { M as ut } from "../ManageIncome-Bx6Uw4fv.mjs";
50
50
  import { u as He } from "../useWidgetLoadTimer-Bmgv_UeH.mjs";
51
51
  import { W as mt } from "../WidgetContainer-sC5KLXHI.mjs";
52
52
  import { u as gt } from "../BudgetUtil-CTpLz9lw.mjs";
@@ -18,7 +18,7 @@ import { b as $ } from "../Localization-2MODESHW.mjs";
18
18
  import { M as Je } from "../MiniWidgetContainer-DhEx4qKi.mjs";
19
19
  import { E as Ze } from "../EmptyState-DHAkGsjk.mjs";
20
20
  import { u as Oe } from "../useWidgetLoadTimer-Bmgv_UeH.mjs";
21
- import { R as et } from "../RecurringSettings-CLtfXCFT.mjs";
21
+ import { R as et } from "../RecurringSettings-DYx5S95u.mjs";
22
22
  import tt from "@mui/material/Tabs";
23
23
  import ye from "@mui/material/Tab";
24
24
  import { getUnixTime as z } from "date-fns/getUnixTime";
@@ -36,7 +36,7 @@ import { alpha as at, keyframes as it } from "@mui/material/styles";
36
36
  import { DataGridPro as rt } from "@mui/x-data-grid-pro";
37
37
  import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
38
38
  import G from "@mui/material/Button";
39
- import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-C389-HAc.mjs";
39
+ import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-Bx6Uw4fv.mjs";
40
40
  import { D as Ge } from "../Drawer-DV4NTsFg.mjs";
41
41
  import { subDays as Me } from "date-fns/subDays";
42
42
  import { endOfToday as mt } from "date-fns/endOfToday";
@@ -47,7 +47,7 @@ import { formatISO as ht } from "date-fns/formatISO";
47
47
  import { fromUnixTime as De } from "date-fns/fromUnixTime";
48
48
  import { startOfMonth as pt } from "date-fns/startOfMonth";
49
49
  import { S as ft, a as gt } from "../TransactionList-BibbhhS9.mjs";
50
- import { F as bt, R as ve, e as Ae } from "../RecurringTransactions-B_I4_FGO.mjs";
50
+ import { F as bt, R as ve, e as Ae } from "../RecurringTransactions-C8Cy-9DA.mjs";
51
51
  import { h as xt } from "../DateUtil-CVXVMbjf.mjs";
52
52
  import { F as Ct, A as j } from "../Fetch-C67go-m2.mjs";
53
53
  const V = () => {
@@ -23,7 +23,7 @@ import { T as W } from "../TransactionStore-Cv-7GLPT.mjs";
23
23
  import { S as ds } from "../TransactionStore-Cv-7GLPT.mjs";
24
24
  import { T as hs } from "../TabContentContainer-j01JYR_7.mjs";
25
25
  import { I as ps } from "../IconBacking-B9oC6uL2.mjs";
26
- import { D as fs, F as ms, c as ys, d as Ss, R as bs, S as ws } from "../RecurringTransactions-B_I4_FGO.mjs";
26
+ import { D as fs, F as ms, c as ys, d as Ss, R as bs, S as ws } from "../RecurringTransactions-C8Cy-9DA.mjs";
27
27
  import { C as q } from "../CashflowStore-DEdQJU5i.mjs";
28
28
  import { I as Ds } from "../CashflowStore-DEdQJU5i.mjs";
29
29
  import { d as Y } from "../GoalStore-XHAvX1lP.mjs";
@@ -49,8 +49,8 @@ import { I as dr, P as lr, S as hr } from "../Account-DuOz1a27.mjs";
49
49
  import { b as f } from "../Category-CevNQ03n.mjs";
50
50
  import { C as pr, c as _r, a as fr, P as mr } from "../Category-CevNQ03n.mjs";
51
51
  import { C as Sr, f as br, b as wr, a as Cr, g as Dr, i as Ar } from "../NumberFormatting-DjTD0t3W.mjs";
52
- import { R as V } from "../RecurringTransactionsStore-Ce7p6L0E.mjs";
53
- import { S as xr, T as Tr } from "../RecurringTransactionsStore-Ce7p6L0E.mjs";
52
+ import { R as V } from "../RecurringTransactionsStore-DH8DEIAz.mjs";
53
+ import { S as xr, T as Tr } from "../RecurringTransactionsStore-DH8DEIAz.mjs";
54
54
  import { G as Br, C as vr, D as Mr, W as kr, d as Nr, a as Ur, i as Lr, t as Or, m as Pr, v as Rr, w as $r, g as Fr, y as Gr, u as Hr, f as Wr, b as qr, l as Yr, z as Qr, s as Kr, x as zr, c as jr, q as Vr, n as Xr, A as Zr, j as Jr, r as to, h as eo, B as so, o as ro, p as oo } from "../hooks-zu7yblbi.mjs";
55
55
  import { u as io } from "../useAccountDisplayName-CxYB0Wpw.mjs";
56
56
  import { u as co } from "../useInsightsEnabled-CYLDtNYt.mjs";
@@ -37,7 +37,7 @@ import $n from "@mui/material/ListItemButton";
37
37
  import En from "@mui/material/ListSubheader";
38
38
  import { f as W } from "../NumberFormatting-DjTD0t3W.mjs";
39
39
  import { b as V } from "../Localization-2MODESHW.mjs";
40
- import { S as it, F as Mt, e as zn, R as Dt } from "../RecurringTransactions-B_I4_FGO.mjs";
40
+ import { S as it, F as Mt, e as zn, R as Dt } from "../RecurringTransactions-C8Cy-9DA.mjs";
41
41
  import { A as He } from "../Account-BiB1F8lL.mjs";
42
42
  import { S as Gn } from "../StatusBar-BK_uYHAB.mjs";
43
43
  import { h as It } from "../DateUtil-CVXVMbjf.mjs";
@@ -56,10 +56,10 @@ import { formatISO as oo } from "date-fns/formatISO";
56
56
  import { fromUnixTime as ro } from "date-fns/fromUnixTime";
57
57
  import { startOfToday as st } from "date-fns/startOfToday";
58
58
  import { subDays as ao } from "date-fns/subDays";
59
- import { c as io, d as ct, S as so, i as co } from "../ManageIncome-C389-HAc.mjs";
59
+ import { c as io, d as ct, S as so, i as co } from "../ManageIncome-Bx6Uw4fv.mjs";
60
60
  import { LocalizationProvider as lo, DatePicker as po, StaticDatePicker as _o } from "@mui/x-date-pickers";
61
61
  import { AdapterDateFns as Ot } from "@mui/x-date-pickers/AdapterDateFnsV3";
62
- import { R as uo } from "../RecurringSettings-CLtfXCFT.mjs";
62
+ import { R as uo } from "../RecurringSettings-DYx5S95u.mjs";
63
63
  import { LocalizationProvider as ho } from "@mui/x-date-pickers/LocalizationProvider";
64
64
  import { format as mo } from "date-fns/format";
65
65
  import go from "@mui/lab/Timeline";
@@ -6,8 +6,8 @@ import { endOfToday as Z } from "date-fns/endOfToday";
6
6
  import { startOfMonth as G } from "date-fns/startOfMonth";
7
7
  import { startOfToday as J } from "date-fns/startOfToday";
8
8
  import { subDays as Q } from "date-fns/subDays";
9
- import { R as Te } from "../RecurringSettings-CLtfXCFT.mjs";
10
- import { M as Ln } from "../RecurringSettings-CLtfXCFT.mjs";
9
+ import { R as Te } from "../RecurringSettings-DYx5S95u.mjs";
10
+ import { M as Ln } from "../RecurringSettings-DYx5S95u.mjs";
11
11
  import { addMonths as $e } from "date-fns/addMonths";
12
12
  import { subMonths as Be } from "date-fns/subMonths";
13
13
  import { isBefore as Pe } from "date-fns/isBefore";
@@ -28,9 +28,9 @@ import Je from "@mui/material/Badge";
28
28
  import { PickersDay as Qe } from "@mui/x-date-pickers/PickersDay";
29
29
  import { I as P } from "../IconBacking-B9oC6uL2.mjs";
30
30
  import { u as R, b as H, j as _, g as z, p as Se, h as ne } from "../hooks-zu7yblbi.mjs";
31
- import { d as I, c as T, g as xe, f as et } from "../RecurringTransactions-B_I4_FGO.mjs";
32
- import { T as O } from "../RecurringTransactionsStore-Ce7p6L0E.mjs";
33
- import { R as En } from "../RecurringTransactionsStore-Ce7p6L0E.mjs";
31
+ import { d as I, c as T, g as xe, f as et } from "../RecurringTransactions-C8Cy-9DA.mjs";
32
+ import { T as O } from "../RecurringTransactionsStore-DH8DEIAz.mjs";
33
+ import { R as En } from "../RecurringTransactionsStore-DH8DEIAz.mjs";
34
34
  import { A as S } from "../Analytics-i5h6BxR1.mjs";
35
35
  import tt from "@mui/material/Button";
36
36
  import q from "@mui/material/Divider";
@@ -40,8 +40,8 @@ import nt from "@mui/material/ListSubheader";
40
40
  import rt from "@mui/material/ListItemAvatar";
41
41
  import it from "@mui/material/ListItemButton";
42
42
  import ot from "@mui/material/ListItemText";
43
- import { b as at } from "../ManageIncome-C389-HAc.mjs";
44
- import { c as Gn, M as On, S as kn } from "../ManageIncome-C389-HAc.mjs";
43
+ import { b as at } from "../ManageIncome-Bx6Uw4fv.mjs";
44
+ import { c as Gn, M as On, S as kn } from "../ManageIncome-Bx6Uw4fv.mjs";
45
45
  import { f as M } from "../NumberFormatting-DjTD0t3W.mjs";
46
46
  import { D as re } from "../Drawer-DV4NTsFg.mjs";
47
47
  import { b as E } from "../Localization-2MODESHW.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.11.10",
3
+ "version": "7.11.11",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -1,296 +0,0 @@
1
- import { jsxs as M, Fragment as P, jsx as d } from "react/jsx-runtime";
2
- import L from "@mui/material/Avatar";
3
- import w from "@mui/material/ListItem";
4
- import U from "@mui/material/ListItemAvatar";
5
- import G from "@mui/material/ListItemButton";
6
- import S from "@mui/material/ListItemText";
7
- import { Icon as I, IconWeight as C } from "@mxenabled/mxui";
8
- import $ from "@mui/material/ListItemIcon";
9
- import j from "@mui/material/MenuItem";
10
- import z from "@mui/material/TextField";
11
- import { ExpandMore as K } from "@mxenabled/mx-icons";
12
- import { addDays as Q } from "date-fns/addDays";
13
- import { addMonths as f } from "date-fns/addMonths";
14
- import { addQuarters as A } from "date-fns/addQuarters";
15
- import { addYears as H } from "date-fns/addYears";
16
- import { formatISO as V } from "date-fns/formatISO";
17
- import { fromUnixTime as X } from "date-fns/fromUnixTime";
18
- import { getUnixTime as y } from "date-fns/getUnixTime";
19
- import { isAfter as h } from "date-fns/isAfter";
20
- import { isBefore as u } from "date-fns/isBefore";
21
- import { isSameDay as J } from "date-fns/isSameDay";
22
- import { lastDayOfMonth as Z } from "date-fns/lastDayOfMonth";
23
- import { nextDay as g } from "date-fns/nextDay";
24
- import { parseISO as T } from "date-fns/parseISO";
25
- import { setDate as D } from "date-fns/setDate";
26
- import { setDay as F } from "date-fns/setDay";
27
- import { setDayOfYear as Y } from "date-fns/setDayOfYear";
28
- import { startOfToday as b } from "date-fns/startOfToday";
29
- import { subDays as _ } from "date-fns/subDays";
30
- import { subMonths as R } from "date-fns/subMonths";
31
- import { subQuarters as N } from "date-fns/subQuarters";
32
- import { subYears as q } from "date-fns/subYears";
33
- import { g as ee, a as te, b as re, c as oe, d as ae, e as se, f as ne } from "./DateUtil-CVXVMbjf.mjs";
34
- import { b as W } from "./NumberFormatting-DjTD0t3W.mjs";
35
- import { b as l } from "./Localization-2MODESHW.mjs";
36
- import { f as k, D as E } from "./DateFormats-Cs-NbEZ7.mjs";
37
- const ce = ({ iconName: e, label: s, onClick: r, value: a }) => {
38
- const t = /* @__PURE__ */ M(P, { children: [
39
- /* @__PURE__ */ d(U, { children: /* @__PURE__ */ d(L, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ d(I, { name: e, sx: { color: "text.primary" }, weight: C.Dark }) }) }),
40
- /* @__PURE__ */ d(
41
- S,
42
- {
43
- primary: s,
44
- primaryTypographyProps: { variant: "XSmall" },
45
- secondary: a,
46
- secondaryTypographyProps: { color: "text.default", variant: "Body", fontWeight: 600 }
47
- }
48
- )
49
- ] });
50
- return r ? /* @__PURE__ */ d(w, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ M(G, { onClick: r, children: [
51
- t,
52
- /* @__PURE__ */ d($, { children: /* @__PURE__ */ d(I, { name: "chevron_right", size: 24 }) })
53
- ] }) }) : /* @__PURE__ */ d(w, { disableGutters: !1, disablePadding: !1, children: t });
54
- }, et = ce, tt = ({ label: e, onChange: s, options: r, value: a, ...t }) => /* @__PURE__ */ d(
55
- z,
56
- {
57
- InputLabelProps: { shrink: !0 },
58
- SelectProps: {
59
- IconComponent: (c) => /* @__PURE__ */ d(K, { size: 20, sx: { mr: 4 }, ...c })
60
- },
61
- defaultValue: 0,
62
- label: e,
63
- onChange: (c) => {
64
- s(Number(c.target.value));
65
- },
66
- select: !0,
67
- value: a,
68
- variant: "outlined",
69
- ...t,
70
- children: r.map((c) => /* @__PURE__ */ d(j, { value: c.id, children: c.label }, c.id))
71
- }
72
- );
73
- var n = /* @__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))(n || {}), 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 || {}), B = /* @__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))(B || {});
74
- const ie = (e) => {
75
- if (!e) return "";
76
- let s = e.user_name || e.feed_name || "";
77
- return e.account_number && (s = `${s} *${e.account_number}`), s;
78
- }, ue = (e, s) => {
79
- const r = [], a = e.transactions.find(
80
- (m) => m.repeating_transaction_guid === e.guid
81
- );
82
- if (!a) return [];
83
- const t = T(e.predicted_occurs_on), o = {
84
- accountGuid: e.account?.guid || "",
85
- amount: e.amount,
86
- categoryGuid: a.category_guid || "",
87
- expectedDate: t,
88
- frequency: e.recurrence_type,
89
- institutionGuid: e.account?.institution_guid || "",
90
- institutionName: ie(e.account),
91
- merchantGuid: e.merchant_guid,
92
- name: e.description,
93
- recurrenceDay: e.recurrence_day,
94
- repeatingTransactionGuid: e.guid,
95
- secondRecurrenceDay: e.second_recurrence_day,
96
- status: p.Upcoming,
97
- type: e.repeating_transaction_type === B.Income ? O.Income : O.Expense,
98
- transaction: void 0
99
- }, c = s.start, i = s.end;
100
- switch (e.recurrence_type) {
101
- case n.EveryWeek:
102
- r.push(...de(o, c, i));
103
- break;
104
- case n.EveryOtherWeek:
105
- r.push(...me(o, c, i));
106
- break;
107
- case n.TwiceAMonth:
108
- r.push(...le(o, c, i));
109
- break;
110
- case n.EveryMonth:
111
- r.push(...he(o, c, i));
112
- break;
113
- case n.EveryOtherMonth:
114
- r.push(...fe(o, c, i));
115
- break;
116
- case n.EveryQuarter:
117
- r.push(...pe(o, c, i));
118
- break;
119
- case n.EveryOtherQuarter:
120
- r.push(...ye(o, c, i));
121
- break;
122
- case n.EveryYear:
123
- r.push(...De(o, c, i));
124
- break;
125
- }
126
- for (const m of r) {
127
- const v = e.transactions.find(
128
- (x) => x.repeating_transaction_guid === e.guid && x.date > y(_(m.expectedDate, 5)) && x.date < y(Q(m.expectedDate, 5))
129
- );
130
- v ? (m.transaction = v, m.status = p.Paid, m.occurredOnDate = X(v.date)) : u(m.expectedDate, _(b(), 3)) && (m.status = p.Missed);
131
- }
132
- return r;
133
- }, de = (e, s, r) => {
134
- const a = [];
135
- let t = g(s, e.recurrenceDay);
136
- for (; u(t, r); )
137
- a.push({ ...e, expectedDate: t }), t = g(t, e.recurrenceDay);
138
- return a;
139
- }, me = (e, s, r) => {
140
- const a = [], t = e.expectedDate;
141
- if (u(t, r)) {
142
- let o = _(t, 14);
143
- for (; h(o, s) || J(o, s); )
144
- a.push({ ...e, expectedDate: o }), o = _(o, 14);
145
- for (o = t; h(o, s) && u(o, r); )
146
- a.push({ ...e, expectedDate: o }), o = Q(o, 14);
147
- }
148
- return a;
149
- }, le = (e, s, r) => {
150
- const a = [];
151
- let t = D(s, e.recurrenceDay);
152
- for (; u(t, r); )
153
- a.push({ ...e, expectedDate: t }), t = f(t, 1);
154
- let o = e.secondRecurrenceDay && e.secondRecurrenceDay < 28 ? D(s, e.secondRecurrenceDay) : Z(s);
155
- for (; u(o, r); )
156
- a.push({ ...e, expectedDate: o }), o = f(o, 1);
157
- return a;
158
- }, he = (e, s, r) => {
159
- const a = [];
160
- let t = D(s, e.recurrenceDay);
161
- for (a.push({ ...e, expectedDate: t }), t = f(t, 1); u(t, r); )
162
- a.push({ ...e, expectedDate: t }), t = f(t, 1);
163
- return a;
164
- }, fe = (e, s, r) => {
165
- const a = [], t = e.expectedDate;
166
- let o = u(t, r) ? t : R(t, 2);
167
- for (; u(o, r); )
168
- h(o, s) && a.push({ ...e, expectedDate: o }), o = f(o, 2);
169
- return a;
170
- }, pe = (e, s, r) => {
171
- const a = [], t = e.expectedDate;
172
- let o = u(t, r) ? t : N(t, 1);
173
- for (; u(o, r); )
174
- h(o, s) && a.push({ ...e, expectedDate: o }), o = A(o, 1);
175
- return a;
176
- }, ye = (e, s, r) => {
177
- const a = [], t = e.expectedDate;
178
- let o = u(t, r) ? t : N(t, 2);
179
- for (; u(o, r); )
180
- h(o, s) && a.push({ ...e, expectedDate: o }), o = A(o, 2);
181
- return a;
182
- }, De = (e, s, r) => {
183
- const a = [], t = e.expectedDate;
184
- let o = u(t, r) ? t : q(t, 1);
185
- for (; u(o, r); )
186
- h(o, s) && a.push({ ...e, expectedDate: o }), o = H(o, 1);
187
- return a;
188
- }, rt = (e, s) => {
189
- const r = [];
190
- for (const a of e) {
191
- const t = ue(a, s);
192
- r.push(...t);
193
- }
194
- return r.sort(
195
- (a, t) => y(a.occurredOnDate || a.expectedDate) - y(t.occurredOnDate || t.expectedDate)
196
- );
197
- }, ot = (e, s, r) => {
198
- const a = [];
199
- for (const t of s) {
200
- const o = r.filter(
201
- (c) => c.repeating_transaction_guid === t.guid
202
- );
203
- r.length > 0 && a.push({
204
- ...t,
205
- account: e.find((c) => c.guid === t.account_guid),
206
- transactions: o
207
- });
208
- }
209
- return a;
210
- }, at = (e) => e.reduce((s, r) => {
211
- const a = V(r.expectedDate, { representation: "date" }), t = s.find(
212
- (o) => o.date.toString() === r.expectedDate.toString()
213
- );
214
- return t ? t.recurrences.push(r) : s.push({
215
- date: r.expectedDate,
216
- id: `date-${a}`,
217
- recurrences: [r]
218
- }), s;
219
- }, []), st = (e, s, r) => {
220
- const a = g(b(), s.recurrence_day), t = Y(b(), s.recurrence_day), o = W(s.recurrence_day), c = s.second_recurrence_day ? W(s.second_recurrence_day) : "";
221
- let i = r ? l(e.monthly_ordinal, o) : e.monthly;
222
- switch (s.recurrence_type) {
223
- case n.EveryQuarter:
224
- i = r ? l(e.quarterly_ordinal, o) : e.quarterly;
225
- break;
226
- case n.EveryWeek:
227
- i = r ? l(
228
- e.weekly_ordinal,
229
- k(a, E.DAY_OF_WEEK)
230
- ) : e.weekly;
231
- break;
232
- case n.EveryYear:
233
- i = r ? l(
234
- e.anually_ordinal,
235
- k(t, E.MONTH_DAY)
236
- ) : e.anually;
237
- break;
238
- case n.EveryOtherWeek:
239
- i = r ? l(
240
- e.every_other_week_ordinal,
241
- k(a, E.DAY_OF_WEEK)
242
- ) : e.every_other_week;
243
- break;
244
- case n.EveryOtherMonth:
245
- i = r ? l(e.every_other_month_ordinal, o) : e.every_other_month;
246
- break;
247
- case n.EveryOtherQuarter:
248
- i = r ? l(e.every_other_quarter_ordinal, o) : e.every_other_quarter;
249
- break;
250
- case n.TwiceAMonth:
251
- i = r ? l(e.twice_a_month_ordinal, o, c) : e.twice_a_month;
252
- break;
253
- }
254
- return i;
255
- }, nt = (e, s, r) => {
256
- let a = s;
257
- r !== void 0 && (e === n.EveryWeek || e === n.EveryOtherWeek ? a = F(s, r) : e === n.EveryYear ? a = Y(s, r) : a = D(s, r));
258
- let t = a;
259
- switch (e) {
260
- case n.EveryWeek:
261
- t = ne(a);
262
- break;
263
- case n.EveryOtherWeek:
264
- t = se(a);
265
- break;
266
- case n.EveryMonth:
267
- t = ae(a);
268
- break;
269
- case n.EveryOtherMonth:
270
- t = oe(a);
271
- break;
272
- case n.EveryQuarter:
273
- t = re(a);
274
- break;
275
- case n.EveryOtherQuarter:
276
- t = te(a);
277
- break;
278
- case n.EveryYear:
279
- t = ee(a);
280
- break;
281
- }
282
- return t;
283
- };
284
- export {
285
- et as D,
286
- n as F,
287
- B as R,
288
- tt as S,
289
- ot as a,
290
- rt as b,
291
- p as c,
292
- O as d,
293
- nt as e,
294
- at as f,
295
- st as g
296
- };