@mx-cartographer/experiences 7.0.7 → 7.0.8-alpha.al0

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.
@@ -1,16 +1,16 @@
1
1
  import { jsxs as o, Fragment as U, jsx as e } from "react/jsx-runtime";
2
- import f, { useState as K } from "react";
2
+ import p, { useState as K } from "react";
3
3
  import { observer as R } from "mobx-react-lite";
4
4
  import { addMonths as qe } from "date-fns/addMonths";
5
5
  import { startOfToday as $ } from "date-fns/startOfToday";
6
- import D from "@mui/material/Box";
6
+ import v from "@mui/material/Box";
7
7
  import H from "@mui/material/Button";
8
- import v from "@mui/material/Divider";
8
+ import E from "@mui/material/Divider";
9
9
  import r from "@mui/material/Stack";
10
10
  import ie from "@mui/material/styles/useTheme";
11
- import { Text as p, P as N, Icon as F, InstitutionLogo as xe, H1 as ce, H2 as Xe } from "@mxenabled/mxui";
12
- import { G as Ye, t as le, u as O, p as ae, c as Oe, a as X, o as de, h as P, e as Ne, f as ke } from "../hooks-02T565vf.mjs";
13
- import { C as L } from "../CurrencyText-YUhH2caW.mjs";
11
+ import { Text as f, P as O, Icon as F, InstitutionLogo as xe, H1 as ce, H2 as Xe } from "@mxenabled/mxui";
12
+ import { G as Ye, t as le, u as L, p as ae, c as Le, a as X, o as de, h as P, e as Oe, f as ke } from "../hooks-02T565vf.mjs";
13
+ import { C as N } from "../CurrencyText-YUhH2caW.mjs";
14
14
  import { u as me } from "../useScreenSize-B6JyS_Lj.mjs";
15
15
  import { L as re } from "../Loader-Dp1P2gNw.mjs";
16
16
  import { I as ue } from "../CashflowStore-D9Dpuz7X.mjs";
@@ -44,17 +44,17 @@ import { S as lt, b as dt } from "../TransactionDetails-BSfXqkpH.mjs";
44
44
  import { F as mt, R as Ie, e as De } from "../RepeatingTransaction-BW4J-jeJ.mjs";
45
45
  import { h as ut } from "../DateUtil-BcuH7ErC.mjs";
46
46
  import { endOfToday as ht } from "date-fns/endOfToday";
47
- import { W as ve, A as Ae } from "../WidgetContainer-BG-fdDOf.mjs";
47
+ import { W as ve, A as Ee } from "../WidgetContainer-BG-fdDOf.mjs";
48
48
  import { F as pt, A as z } from "../Fetch-CkFKy79O.mjs";
49
49
  const V = () => {
50
- if (!f.useContext(Ye))
50
+ if (!p.useContext(Ye))
51
51
  throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
52
52
  return le().uiStore;
53
53
  }, ft = ({ remaining: i }) => {
54
- const { cashflow: n } = O();
54
+ const { cashflow: n } = L();
55
55
  return /* @__PURE__ */ o(U, { children: [
56
56
  /* @__PURE__ */ e(
57
- D,
57
+ v,
58
58
  {
59
59
  sx: {
60
60
  borderRadius: "1px",
@@ -64,36 +64,38 @@ const V = () => {
64
64
  }
65
65
  }
66
66
  ),
67
- /* @__PURE__ */ e(p, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
68
- /* @__PURE__ */ e(L, { amount: i, bold: !0, sx: { fontSize: 12 } })
67
+ /* @__PURE__ */ e(f, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
68
+ /* @__PURE__ */ e(N, { amount: i, bold: !0, sx: { fontSize: 12 } })
69
69
  ] });
70
70
  }, he = R(ft), gt = ({ onAddIncomeClick: i }) => {
71
- const n = ie(), { availableWidth: t } = ae(), { isMobile: s } = me(), { visibleCashAccounts: m, visibleCashBalance: g } = Oe(), { selectedAccountGuids: c } = X(), { cashflow: l } = O(), { userProfile: C } = de(), {
71
+ const n = ie(), { availableWidth: t } = ae(), { isMobile: s } = me(), { visibleCashAccounts: d, visibleCashBalance: g } = Le(), { selectedAccountGuids: c } = X(), { cashflow: m } = L(), { userProfile: C } = de(), {
72
72
  daysUntilNextIncome: a,
73
- expensesTilNextIncome: h,
74
- selectedCashAccounts: d,
73
+ expensesTilNextIncome: u,
74
+ selectedCashAccounts: l,
75
75
  setNextIncome: b,
76
- setSelectedCashAccounts: _,
77
- setUpcomingExpenses: w
78
- } = V(), { isDataLoaded: A, nextIncomeRecurrence: u, upcomingExpenses: E } = P();
79
- f.useEffect(() => {
80
- _(
81
- m.filter((y) => c.includes(y.guid))
76
+ setSelectedCashAccounts: w,
77
+ setUpcomingExpenses: S
78
+ } = V(), { isDataLoaded: A, nextIncomeRecurrence: h, upcomingExpenses: I } = P();
79
+ p.useEffect(() => {
80
+ d && d.forEach((_) => console.log("cash account: ", _.guid)), c && c.forEach((_) => console.log("selectedAccount: ", _)), w(
81
+ d.filter((_) => c.includes(_.guid))
82
82
  );
83
- }, [m, c]), f.useEffect(() => {
84
- u && b(u), w(E);
85
- }, [u, E]);
86
- const S = f.useMemo(
87
- () => m.filter((y) => c.includes(y.guid)).reduce((y, I) => y + (I?.balance || 0), 0),
88
- [c, E]
89
- ), M = f.useMemo(
90
- () => h.filter((y) => c.includes(y.accountGuid || "")).reduce((y, I) => y + I.amount, 0),
91
- [c, h]
92
- ), G = f.useMemo(
93
- () => S - M,
94
- [S, M]
83
+ }, [d, c]), p.useEffect(() => {
84
+ console.log("upcoming exp: ", I), console.log("next income recurr: ", h), h && b(h), S(I);
85
+ }, [h, I]), p.useEffect(() => {
86
+ console.log("expensesTilNextIncome:", u), console.log("selectedCashAccounts:", l), console.log("daysUntilNextIncome:", a);
87
+ }, [u, l, a]);
88
+ const y = p.useMemo(
89
+ () => d.filter((_) => c.includes(_.guid)).reduce((_, D) => _ + (D?.balance || 0), 0),
90
+ [c, I]
91
+ ), M = p.useMemo(
92
+ () => u.filter((_) => c.includes(_.accountGuid || "")).reduce((_, D) => _ + D.amount, 0),
93
+ [c, u]
94
+ ), G = p.useMemo(
95
+ () => y - M,
96
+ [y, M]
95
97
  ), j = C?.has_completed_cash_flow_onboarding && !!i;
96
- return A ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: t > 610 ? /* @__PURE__ */ o(
98
+ return A ? /* @__PURE__ */ e(v, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: t > 610 ? /* @__PURE__ */ o(
97
99
  r,
98
100
  {
99
101
  border: `1px solid ${n.palette.border.light}`,
@@ -103,53 +105,53 @@ const V = () => {
103
105
  px: 24,
104
106
  children: [
105
107
  /* @__PURE__ */ o(r, { pb: 14, pt: 12, children: [
106
- /* @__PURE__ */ e(L, { amount: S, variant: "H2" }),
107
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: q(
108
- l.total_cash_accounts,
109
- d.length
108
+ /* @__PURE__ */ e(N, { amount: y, variant: "H2" }),
109
+ /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: q(
110
+ m.total_cash_accounts,
111
+ l.length
110
112
  ) })
111
113
  ] }),
112
114
  /* @__PURE__ */ e(r, { pt: 18, children: /* @__PURE__ */ e(F, { name: "remove" }) }),
113
115
  /* @__PURE__ */ o(r, { pb: 14, pt: 12, children: [
114
- /* @__PURE__ */ e(L, { amount: M, variant: "H2" }),
115
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: q(l.expenses_due, h.length) })
116
+ /* @__PURE__ */ e(N, { amount: M, variant: "H2" }),
117
+ /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: q(m.expenses_due, u.length) })
116
118
  ] }),
117
119
  /* @__PURE__ */ e(r, { pt: 18, children: /* @__PURE__ */ e(F, { name: "equal" }) }),
118
120
  /* @__PURE__ */ o(r, { pb: 14, pr: 24, pt: 12, children: [
119
- /* @__PURE__ */ e(L, { amount: G, variant: "H2" }),
121
+ /* @__PURE__ */ e(N, { amount: G, variant: "H2" }),
120
122
  /* @__PURE__ */ o(r, { alignItems: "center", direction: "row", gap: 8, children: [
121
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: l.available_to_spend }),
122
- /* @__PURE__ */ e(ue, { body: l.tooltip_body, title: l.tooltip_title })
123
+ /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: m.available_to_spend }),
124
+ /* @__PURE__ */ e(ue, { body: m.tooltip_body, title: m.tooltip_title })
123
125
  ] })
124
126
  ] }),
125
127
  /* @__PURE__ */ e(r, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: j ? /* @__PURE__ */ o(U, { children: [
126
- /* @__PURE__ */ e(p, { variant: "H2", children: q(l.days, a) }),
127
- /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: l.next_paycheck })
128
+ /* @__PURE__ */ e(f, { variant: "H2", children: q(m.days, a) }),
129
+ /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: m.next_paycheck })
128
130
  ] }) : /* @__PURE__ */ e(
129
131
  H,
130
132
  {
131
133
  onClick: i,
132
134
  startIcon: /* @__PURE__ */ e(F, { name: "add" }),
133
135
  sx: { fontSize: 13, lineHeight: "initial" },
134
- children: l.add_income
136
+ children: m.add_income
135
137
  }
136
138
  ) })
137
139
  ]
138
140
  }
139
141
  ) : /* @__PURE__ */ o(r, { border: `1px solid ${n.palette.border.light}`, borderRadius: 1, children: [
140
142
  /* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
141
- /* @__PURE__ */ e(p, { variant: "Small", children: q(
142
- l.total_cash_accounts,
143
- d.length
143
+ /* @__PURE__ */ e(f, { variant: "Small", children: q(
144
+ m.total_cash_accounts,
145
+ l.length
144
146
  ) }),
145
- /* @__PURE__ */ e(L, { amount: g, bold: !0, variant: "XSmall" })
147
+ /* @__PURE__ */ e(N, { amount: g, bold: !0, variant: "XSmall" })
146
148
  ] }),
147
- /* @__PURE__ */ e(v, {}),
149
+ /* @__PURE__ */ e(E, {}),
148
150
  /* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
149
- /* @__PURE__ */ e(p, { variant: "Small", children: q(l.expenses_due, h.length) }),
150
- /* @__PURE__ */ e(L, { amount: M, bold: !0, symbol: "-", variant: "XSmall" })
151
+ /* @__PURE__ */ e(f, { variant: "Small", children: q(m.expenses_due, u.length) }),
152
+ /* @__PURE__ */ e(N, { amount: M, bold: !0, symbol: "-", variant: "XSmall" })
151
153
  ] }),
152
- /* @__PURE__ */ e(v, {}),
154
+ /* @__PURE__ */ e(E, {}),
153
155
  /* @__PURE__ */ e(
154
156
  r,
155
157
  {
@@ -164,10 +166,10 @@ const V = () => {
164
166
  children: /* @__PURE__ */ e(he, { remaining: G })
165
167
  }
166
168
  ),
167
- /* @__PURE__ */ e(v, {}),
169
+ /* @__PURE__ */ e(E, {}),
168
170
  j ? /* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
169
- /* @__PURE__ */ e(p, { variant: "Small", children: l.next_paycheck }),
170
- /* @__PURE__ */ e(p, { bold: !0, variant: "XSmall", children: q(l.days, a) })
171
+ /* @__PURE__ */ e(f, { variant: "Small", children: m.next_paycheck }),
172
+ /* @__PURE__ */ e(f, { bold: !0, variant: "XSmall", children: q(m.days, a) })
171
173
  ] }) : /* @__PURE__ */ o(
172
174
  r,
173
175
  {
@@ -178,14 +180,14 @@ const V = () => {
178
180
  pr: 2,
179
181
  py: 2,
180
182
  children: [
181
- /* @__PURE__ */ e(p, { variant: "Small", children: l.next_paycheck }),
183
+ /* @__PURE__ */ e(f, { variant: "Small", children: m.next_paycheck }),
182
184
  /* @__PURE__ */ e(
183
185
  H,
184
186
  {
185
187
  onClick: i,
186
188
  startIcon: /* @__PURE__ */ e(F, { name: "add" }),
187
189
  sx: { fontSize: 13 },
188
- children: l.add_income
190
+ children: m.add_income
189
191
  }
190
192
  )
191
193
  ]
@@ -193,10 +195,10 @@ const V = () => {
193
195
  )
194
196
  ] }) }) : /* @__PURE__ */ e(re, { height: s ? 210 : 120 });
195
197
  }, bt = R(gt), xt = ({ onPrimaryCtaClick: i, sx: n = {} }) => {
196
- const { cashflow: t } = O(), { isCopyLoaded: s, isInitialized: m } = X(), { loadRepeatingTransactions: g, setDateRange: c } = P();
197
- return f.useEffect(() => {
198
- m && (c({ start: $(), end: qe($(), 1) }), g().finally());
199
- }, [m]), s ? /* @__PURE__ */ e(
198
+ const { cashflow: t } = L(), { isCopyLoaded: s, isInitialized: d } = X(), { loadRepeatingTransactions: g, setDateRange: c } = P();
199
+ return p.useEffect(() => {
200
+ d && (c({ start: $(), end: qe($(), 1) }), g().finally());
201
+ }, [d]), s ? /* @__PURE__ */ e(
200
202
  Qe,
201
203
  {
202
204
  className: "mx-exp-cashflow-miniwidget",
@@ -208,7 +210,7 @@ const V = () => {
208
210
  children: /* @__PURE__ */ e(bt, { onAddIncomeClick: i })
209
211
  }
210
212
  ) : /* @__PURE__ */ e(re, {});
211
- }, On = R(xt), Ct = ({ remaining: i }) => /* @__PURE__ */ e(
213
+ }, Ln = R(xt), Ct = ({ remaining: i }) => /* @__PURE__ */ e(
212
214
  ee,
213
215
  {
214
216
  sx: {
@@ -228,12 +230,12 @@ var te = /* @__PURE__ */ ((i) => (i.EXPENSE = "expense", i.INCOME = "income", i)
228
230
  const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
229
231
  /* @__PURE__ */ o(ee, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
230
232
  /* @__PURE__ */ o(r, { alignItems: "center", height: 32, width: 32, children: [
231
- /* @__PURE__ */ e(p, { bold: !0, sx: { fontSize: 11 }, children: Y(i.expectedDate, Q.MONTH) }),
232
- /* @__PURE__ */ e(p, { bold: !0, sx: { fontSize: 11 }, children: Y(i.expectedDate, Q.DAY) })
233
+ /* @__PURE__ */ e(f, { bold: !0, sx: { fontSize: 11 }, children: Y(i.expectedDate, Q.MONTH) }),
234
+ /* @__PURE__ */ e(f, { bold: !0, sx: { fontSize: 11 }, children: Y(i.expectedDate, Q.DAY) })
233
235
  ] }),
234
- /* @__PURE__ */ e(p, { sx: { flexGrow: 1, fontSize: 13 }, children: i.name }),
236
+ /* @__PURE__ */ e(f, { sx: { flexGrow: 1, fontSize: 13 }, children: i.name }),
235
237
  /* @__PURE__ */ e(
236
- L,
238
+ N,
237
239
  {
238
240
  amount: i.amount,
239
241
  bold: !0,
@@ -241,9 +243,9 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
241
243
  }
242
244
  )
243
245
  ] }),
244
- /* @__PURE__ */ e(v, {})
245
- ] }), Ee = R(_t), wt = ({ total: i, type: n }) => {
246
- const { cashflow: t } = O();
246
+ /* @__PURE__ */ e(E, {})
247
+ ] }), Ae = R(_t), wt = ({ total: i, type: n }) => {
248
+ const { cashflow: t } = L();
247
249
  return /* @__PURE__ */ o(U, { children: [
248
250
  /* @__PURE__ */ o(
249
251
  Ze,
@@ -258,36 +260,36 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
258
260
  px: 24
259
261
  },
260
262
  children: [
261
- /* @__PURE__ */ e(p, { bold: !0, sx: { fontSize: 12 }, children: n === te.EXPENSE ? t.expenses : t.income }),
262
- /* @__PURE__ */ o(p, { bold: !0, sx: { fontSize: 13 }, children: [
263
+ /* @__PURE__ */ e(f, { bold: !0, sx: { fontSize: 12 }, children: n === te.EXPENSE ? t.expenses : t.income }),
264
+ /* @__PURE__ */ o(f, { bold: !0, sx: { fontSize: 13 }, children: [
263
265
  n === te.EXPENSE ? "-" : "+",
264
266
  J(i, "0,0.00")
265
267
  ] })
266
268
  ]
267
269
  }
268
270
  ),
269
- /* @__PURE__ */ e(v, {})
271
+ /* @__PURE__ */ e(E, {})
270
272
  ] });
271
273
  }, Te = R(wt), oe = (i, n) => (t) => t.accountGuid === i.guid && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), St = () => {
272
- const { availableWidth: i } = ae(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: s } = P(), { dateRange: m, selectedCashAccounts: g } = V();
274
+ const { availableWidth: i } = ae(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: s } = P(), { dateRange: d, selectedCashAccounts: g } = V();
273
275
  return /* @__PURE__ */ o(r, { children: [
274
276
  /* @__PURE__ */ o(r, { direction: i < 400 ? "column" : "row", justifyContent: "space-between", children: [
275
- /* @__PURE__ */ e(p, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
276
- /* @__PURE__ */ o(p, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
277
- Y(m.start, Q.FULL_MONTH_DAY),
277
+ /* @__PURE__ */ e(f, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
278
+ /* @__PURE__ */ o(f, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
279
+ Y(d.start, Q.FULL_MONTH_DAY),
278
280
  " -",
279
281
  " ",
280
- Y(m.end, Q.FULL_MONTH_DAY)
282
+ Y(d.end, Q.FULL_MONTH_DAY)
281
283
  ] })
282
284
  ] }),
283
285
  /* @__PURE__ */ e(r, { children: g.map((c) => {
284
- const l = s.filter(oe(c, m)).sort((d, b) => B(d.expectedDate) - B(b.expectedDate)), C = t.filter(
285
- oe(c, m)
286
- ), a = l.reduce(
287
- (d, b) => d + b.amount,
286
+ const m = s.filter(oe(c, d)).sort((l, b) => B(l.expectedDate) - B(b.expectedDate)), C = t.filter(
287
+ oe(c, d)
288
+ ), a = m.reduce(
289
+ (l, b) => l + b.amount,
288
290
  0
289
- ), h = C.reduce(
290
- (d, b) => d + b.amount,
291
+ ), u = C.reduce(
292
+ (l, b) => l + b.amount,
291
293
  0
292
294
  );
293
295
  return /* @__PURE__ */ o(
@@ -311,27 +313,27 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
311
313
  }
312
314
  }
313
315
  ),
314
- /* @__PURE__ */ e(v, {}),
315
- l.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
316
+ /* @__PURE__ */ e(E, {}),
317
+ m.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
316
318
  Z,
317
319
  {
318
320
  subheader: /* @__PURE__ */ e(Te, { total: a, type: te.INCOME }),
319
321
  sx: { width: "100%" },
320
- children: l.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
322
+ children: m.map((l) => /* @__PURE__ */ e(Ae, { recurrence: l }, l.repeatingTransactionGuid))
321
323
  }
322
324
  ) }),
323
325
  C.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
324
326
  Z,
325
327
  {
326
- subheader: /* @__PURE__ */ e(Te, { total: h, type: te.EXPENSE }),
328
+ subheader: /* @__PURE__ */ e(Te, { total: u, type: te.EXPENSE }),
327
329
  sx: { width: "100%" },
328
- children: C.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
330
+ children: C.map((l) => /* @__PURE__ */ e(Ae, { recurrence: l }, l.repeatingTransactionGuid))
329
331
  }
330
332
  ) }),
331
333
  /* @__PURE__ */ e(
332
334
  Ct,
333
335
  {
334
- remaining: (c.available_balance || c.balance || 0) + a - h
336
+ remaining: (c.available_balance || c.balance || 0) + a - u
335
337
  }
336
338
  )
337
339
  ]
@@ -341,23 +343,23 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
341
343
  }) })
342
344
  ] });
343
345
  }, yt = R(St), It = () => {
344
- const { availableWidth: i } = ae(), n = ie(), { cashflow: t } = O(), { upcomingExpenses: s, upcomingIncome: m } = P(), { dateRange: g, selectedCashAccounts: c } = V(), l = [
346
+ const { availableWidth: i } = ae(), n = ie(), { cashflow: t } = L(), { upcomingExpenses: s, upcomingIncome: d } = P(), { dateRange: g, selectedCashAccounts: c } = V(), m = [
345
347
  {
346
348
  field: "account",
347
349
  flex: 1.5,
348
350
  headerName: t.accounts,
349
- renderCell: ({ value: { name: a, nickname: h, institution_guid: d, account_number: b } }) => {
350
- const _ = h || a;
351
+ renderCell: ({ value: { name: a, nickname: u, institution_guid: l, account_number: b } }) => {
352
+ const w = u || a;
351
353
  return /* @__PURE__ */ o(r, { alignItems: "center", flexDirection: "row", gap: 12, children: [
352
354
  /* @__PURE__ */ e(
353
355
  xe,
354
356
  {
355
357
  alt: t.institution_logo,
356
- institutionGuid: d || "",
358
+ institutionGuid: l || "",
357
359
  size: 16
358
360
  }
359
361
  ),
360
- `${_} ${b ? `*${b}` : ""}`
362
+ `${w} ${b ? `*${b}` : ""}`
361
363
  ] });
362
364
  }
363
365
  },
@@ -388,34 +390,34 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
388
390
  headerName: t.remaining,
389
391
  type: "number",
390
392
  renderCell: (a) => {
391
- const h = a.row.balance + a.row.income - a.row.expenses;
393
+ const u = a.row.balance + a.row.income - a.row.expenses;
392
394
  return /* @__PURE__ */ e(
393
- p,
395
+ f,
394
396
  {
395
- color: Math.sign(h) === -1 ? n.palette.error.main : n.palette.text.primary,
397
+ color: Math.sign(u) === -1 ? n.palette.error.main : n.palette.text.primary,
396
398
  variant: "Small",
397
- children: J(h, "0,0.00")
399
+ children: J(u, "0,0.00")
398
400
  }
399
401
  );
400
402
  }
401
403
  }
402
- ], C = f.useMemo(() => c.map((a) => {
403
- const h = s.filter(
404
+ ], C = p.useMemo(() => c.map((a) => {
405
+ const u = s.filter(
404
406
  oe(a, { start: $(), end: _e($(), 30) })
405
- ).reduce((_, w) => _ + w.amount, 0), d = m.filter(
407
+ ).reduce((w, S) => w + S.amount, 0), l = d.filter(
406
408
  oe(a, { start: $(), end: _e($(), 30) })
407
- ).reduce((_, w) => _ + w.amount, 0), b = (a.balance || 0) + d - h;
409
+ ).reduce((w, S) => w + S.amount, 0), b = (a.balance || 0) + l - u;
408
410
  return {
409
411
  account: a,
410
412
  balance: a.balance || 0,
411
413
  id: a.guid,
412
- income: d,
413
- expenses: h,
414
+ income: l,
415
+ expenses: u,
414
416
  remaining: b
415
417
  };
416
- }), [c, s, m]);
418
+ }), [c, s, d]);
417
419
  return /* @__PURE__ */ o(
418
- D,
420
+ v,
419
421
  {
420
422
  sx: {
421
423
  width: "100%"
@@ -430,7 +432,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
430
432
  children: [
431
433
  /* @__PURE__ */ o(r, { alignItems: "center", direction: "row", gap: 8, children: [
432
434
  /* @__PURE__ */ e(
433
- p,
435
+ f,
434
436
  {
435
437
  bold: !0,
436
438
  sx: {
@@ -448,7 +450,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
448
450
  }
449
451
  )
450
452
  ] }),
451
- /* @__PURE__ */ o(p, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
453
+ /* @__PURE__ */ o(f, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
452
454
  Y(g.start, Q.FULL_MONTH_DAY),
453
455
  " -",
454
456
  " ",
@@ -461,7 +463,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
461
463
  nt,
462
464
  {
463
465
  columnHeaderHeight: 48,
464
- columns: l,
466
+ columns: m,
465
467
  density: "standard",
466
468
  disableColumnMenu: !0,
467
469
  disableRowSelectionOnClick: !0,
@@ -484,7 +486,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
484
486
  }
485
487
  }
486
488
  ) : C.map((a) => {
487
- const { name: h, nickname: d, institution_guid: b, account_number: _ } = a.account, w = d || h;
489
+ const { name: u, nickname: l, institution_guid: b, account_number: w } = a.account, S = l || u;
488
490
  return /* @__PURE__ */ e(
489
491
  Z,
490
492
  {
@@ -513,13 +515,13 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
513
515
  size: 16
514
516
  }
515
517
  ),
516
- /* @__PURE__ */ e(p, { variant: "Small", children: `${w} ${_ ? `*${_}` : ""}` })
518
+ /* @__PURE__ */ e(f, { variant: "Small", children: `${S} ${w ? `*${w}` : ""}` })
517
519
  ] }),
518
- /* @__PURE__ */ e(L, { amount: a.balance, bold: !0, variant: "Small" })
520
+ /* @__PURE__ */ e(N, { amount: a.balance, bold: !0, variant: "Small" })
519
521
  ]
520
522
  }
521
523
  ),
522
- /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
524
+ /* @__PURE__ */ e(E, { sx: { width: "100%" } }),
523
525
  /* @__PURE__ */ o(
524
526
  r,
525
527
  {
@@ -529,12 +531,12 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
529
531
  px: 16,
530
532
  py: 12,
531
533
  children: [
532
- /* @__PURE__ */ e(p, { variant: "Small", children: t.projected_income }),
533
- /* @__PURE__ */ e(L, { amount: a.income, bold: !0, symbol: "+", variant: "Small" })
534
+ /* @__PURE__ */ e(f, { variant: "Small", children: t.projected_income }),
535
+ /* @__PURE__ */ e(N, { amount: a.income, bold: !0, symbol: "+", variant: "Small" })
534
536
  ]
535
537
  }
536
538
  ),
537
- /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
539
+ /* @__PURE__ */ e(E, { sx: { width: "100%" } }),
538
540
  /* @__PURE__ */ o(
539
541
  r,
540
542
  {
@@ -544,12 +546,12 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
544
546
  px: 16,
545
547
  py: 12,
546
548
  children: [
547
- /* @__PURE__ */ e(p, { variant: "Small", children: t.projected_expenses }),
548
- /* @__PURE__ */ e(L, { amount: a.expenses, bold: !0, symbol: "-", variant: "Small" })
549
+ /* @__PURE__ */ e(f, { variant: "Small", children: t.projected_expenses }),
550
+ /* @__PURE__ */ e(N, { amount: a.expenses, bold: !0, symbol: "-", variant: "Small" })
549
551
  ]
550
552
  }
551
553
  ),
552
- /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
554
+ /* @__PURE__ */ e(E, { sx: { width: "100%" } }),
553
555
  /* @__PURE__ */ e(
554
556
  r,
555
557
  {
@@ -573,12 +575,12 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
573
575
  }
574
576
  );
575
577
  }, Dt = R(It), vt = () => {
576
- const { cashflow: i } = O(), { isDesktop: n } = me(), { onEvent: t } = Ne(), [s, m] = f.useState(0), g = (c, l) => {
577
- m(l);
578
+ const { cashflow: i } = L(), { isDesktop: n } = me(), { onEvent: t } = Oe(), [s, d] = p.useState(0), g = (c, m) => {
579
+ d(m);
578
580
  };
579
- return f.useEffect(() => {
581
+ return p.useEffect(() => {
580
582
  t(s === 0 ? "cash_flow_summary" : "cash_flow_details");
581
- }, [s]), /* @__PURE__ */ o(D, { children: [
583
+ }, [s]), /* @__PURE__ */ o(v, { children: [
582
584
  /* @__PURE__ */ o(
583
585
  Ke,
584
586
  {
@@ -614,16 +616,16 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
614
616
  ]
615
617
  }
616
618
  ),
617
- /* @__PURE__ */ e(D, { sx: { mb: 32 } }),
618
- /* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: s, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Dt, {}) }) }),
619
- /* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: s, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(yt, {}) }) })
619
+ /* @__PURE__ */ e(v, { sx: { mb: 32 } }),
620
+ /* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: s, children: /* @__PURE__ */ e(v, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Dt, {}) }) }),
621
+ /* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: s, children: /* @__PURE__ */ e(v, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(yt, {}) }) })
620
622
  ] });
621
- }, At = R(vt), ne = ({
623
+ }, Et = R(vt), ne = ({
622
624
  amount: i,
623
625
  isMobile: n = !1,
624
626
  isTotal: t = !1,
625
627
  label: s,
626
- symbol: m,
628
+ symbol: d,
627
629
  tooltip: g
628
630
  }) => /* @__PURE__ */ o(
629
631
  r,
@@ -634,54 +636,54 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
634
636
  padding: n ? "14px 16px" : 0,
635
637
  sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
636
638
  children: [
637
- !n && /* @__PURE__ */ e(L, { amount: i, component: "h2", variant: "H2" }),
639
+ !n && /* @__PURE__ */ e(N, { amount: i, component: "h2", variant: "H2" }),
638
640
  /* @__PURE__ */ o(r, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
639
- /* @__PURE__ */ e(p, { bold: t, variant: "Small", children: s }),
641
+ /* @__PURE__ */ e(f, { bold: t, variant: "Small", children: s }),
640
642
  g
641
643
  ] }),
642
- n && /* @__PURE__ */ e(L, { amount: i, component: "h2", symbol: m, variant: "Small" })
644
+ n && /* @__PURE__ */ e(N, { amount: i, component: "h2", symbol: d, variant: "Small" })
643
645
  ]
644
646
  }
645
- ), Re = (i, n) => (t) => t.accountGuid && i.includes(t.accountGuid) && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), Et = () => {
646
- const { availableWidth: i } = ae(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: s } = P(), { selectedAccountGuids: m } = X(), { dateRange: g, selectedCashAccounts: c } = V(), { userProfile: l } = de(), [C, a] = f.useState(!1), h = f.useMemo(
647
- () => t.filter(Re(m, g)),
648
- [g, m, t]
649
- ), d = f.useMemo(
650
- () => s.filter(Re(m, g)),
651
- [g, m, s]
652
- ), b = f.useMemo(
653
- () => c.reduce((E, S) => E + (S?.balance || 0), 0),
647
+ ), Re = (i, n) => (t) => t.accountGuid && i.includes(t.accountGuid) && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), At = () => {
648
+ const { availableWidth: i } = ae(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: s } = P(), { selectedAccountGuids: d } = X(), { dateRange: g, selectedCashAccounts: c } = V(), { userProfile: m } = de(), [C, a] = p.useState(!1), u = p.useMemo(
649
+ () => t.filter(Re(d, g)),
650
+ [g, d, t]
651
+ ), l = p.useMemo(
652
+ () => s.filter(Re(d, g)),
653
+ [g, d, s]
654
+ ), b = p.useMemo(
655
+ () => c.reduce((I, y) => I + (y?.balance || 0), 0),
654
656
  [c]
655
- ), _ = h.reduce((E, S) => E + S.amount, 0), w = d.reduce((E, S) => E + S.amount, 0), A = b - _ + w, u = i < 725;
656
- return /* @__PURE__ */ o(r, { sx: { mx: u ? 16 : 0, my: u ? 24 : 42 }, children: [
657
+ ), w = u.reduce((I, y) => I + y.amount, 0), S = l.reduce((I, y) => I + y.amount, 0), A = b - w + S, h = i < 725;
658
+ return /* @__PURE__ */ o(r, { sx: { mx: h ? 16 : 0, my: h ? 24 : 42 }, children: [
657
659
  /* @__PURE__ */ o(
658
660
  r,
659
661
  {
660
- border: u ? "1px solid" : "none",
662
+ border: h ? "1px solid" : "none",
661
663
  borderColor: "border.light",
662
664
  borderRadius: 2,
663
- flexDirection: u ? "column" : "row",
664
- gap: u ? 0 : 24,
665
+ flexDirection: h ? "column" : "row",
666
+ gap: h ? 0 : 24,
665
667
  justifyContent: "center",
666
668
  children: [
667
669
  /* @__PURE__ */ e(
668
670
  ne,
669
671
  {
670
672
  amount: b,
671
- isMobile: u,
673
+ isMobile: h,
672
674
  label: n.cash_and_bank
673
675
  }
674
676
  ),
675
- u && /* @__PURE__ */ e(v, {}),
676
- l?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(U, { children: [
677
- !u && /* @__PURE__ */ e(p, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
677
+ h && /* @__PURE__ */ e(E, {}),
678
+ m?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(U, { children: [
679
+ !h && /* @__PURE__ */ e(f, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
678
680
  /* @__PURE__ */ e(
679
681
  ne,
680
682
  {
681
- amount: w,
682
- isMobile: u,
683
+ amount: S,
684
+ isMobile: h,
683
685
  label: n.to_be_received,
684
- symbol: u ? "+" : void 0
686
+ symbol: h ? "+" : void 0
685
687
  }
686
688
  )
687
689
  ] }) : /* @__PURE__ */ e(
@@ -693,23 +695,23 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
693
695
  children: n.add_income
694
696
  }
695
697
  ),
696
- u ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(p, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
698
+ h ? /* @__PURE__ */ e(E, {}) : /* @__PURE__ */ e(f, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
697
699
  /* @__PURE__ */ e(
698
700
  ne,
699
701
  {
700
- amount: _,
701
- isMobile: u,
702
+ amount: w,
703
+ isMobile: h,
702
704
  label: n.to_be_paid_out,
703
- symbol: u ? "-" : void 0
705
+ symbol: h ? "-" : void 0
704
706
  }
705
707
  ),
706
- u ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(p, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
708
+ h ? /* @__PURE__ */ e(E, {}) : /* @__PURE__ */ e(f, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
707
709
  /* @__PURE__ */ e(
708
710
  ne,
709
711
  {
710
712
  amount: A,
711
- isMobile: u,
712
- isTotal: u,
713
+ isMobile: h,
714
+ isTotal: h,
713
715
  label: n.remaining_cash,
714
716
  tooltip: /* @__PURE__ */ e(
715
717
  ue,
@@ -735,8 +737,8 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
735
737
  }
736
738
  )
737
739
  ] });
738
- }, Tt = R(Et), Rt = ({ handleNextStep: i }) => {
739
- const { completeOnboarding: n } = le(), { cashflow: t } = O(), s = ie();
740
+ }, Tt = R(At), Rt = ({ handleNextStep: i }) => {
741
+ const { completeOnboarding: n } = le(), { cashflow: t } = L(), s = ie();
740
742
  return /* @__PURE__ */ o(r, { children: [
741
743
  /* @__PURE__ */ e(ce, { pb: 12, children: t.welcome_title }),
742
744
  /* @__PURE__ */ e(
@@ -749,11 +751,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
749
751
  children: t.welcome_sub_title
750
752
  }
751
753
  ),
752
- /* @__PURE__ */ e(N, { pb: 32, children: t.welcome_description }),
754
+ /* @__PURE__ */ e(O, { pb: 32, children: t.welcome_description }),
753
755
  /* @__PURE__ */ o(r, { direction: "column", mb: 32, spacing: 32, children: [
754
- /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
756
+ /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
755
757
  /* @__PURE__ */ e(
756
- D,
758
+ v,
757
759
  {
758
760
  bgcolor: s.palette.primary.lighter,
759
761
  borderRadius: 1,
@@ -767,9 +769,9 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
767
769
  ),
768
770
  t.bullet_one
769
771
  ] }),
770
- /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
772
+ /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
771
773
  /* @__PURE__ */ e(
772
- D,
774
+ v,
773
775
  {
774
776
  bgcolor: s.palette.primary.lighter,
775
777
  borderRadius: 1,
@@ -783,9 +785,9 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
783
785
  ),
784
786
  t.bullet_two
785
787
  ] }),
786
- /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
788
+ /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
787
789
  /* @__PURE__ */ e(
788
- D,
790
+ v,
789
791
  {
790
792
  bgcolor: s.palette.primary.lighter,
791
793
  borderRadius: 1,
@@ -805,17 +807,17 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
805
807
  /* @__PURE__ */ e(H, { onClick: n, variant: "outlined", children: t.skip_button })
806
808
  ] })
807
809
  ] });
808
- }, Lt = R(Rt), Le = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Ge = {
809
- CASHFLOW_ONBOARDING: `${Le}/cashflow-onboarding.png`,
810
- CASHFLOW_LOADING_ANIMATION: `${Le}/loading-animation.gif`
811
- }, Ot = () => {
812
- const { cashflow: i } = O();
813
- return /* @__PURE__ */ o(f.Fragment, { children: [
810
+ }, Nt = R(Rt), Ne = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Ge = {
811
+ CASHFLOW_ONBOARDING: `${Ne}/cashflow-onboarding.png`,
812
+ CASHFLOW_LOADING_ANIMATION: `${Ne}/loading-animation.gif`
813
+ }, Lt = () => {
814
+ const { cashflow: i } = L();
815
+ return /* @__PURE__ */ o(p.Fragment, { children: [
814
816
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: Ge.CASHFLOW_LOADING_ANIMATION }) }),
815
817
  /* @__PURE__ */ e(ce, { pb: 12, children: i.loading_title }),
816
- /* @__PURE__ */ e(N, { children: i.loading_description })
818
+ /* @__PURE__ */ e(O, { children: i.loading_description })
817
819
  ] });
818
- }, Nt = R(Ot), kt = tt`
820
+ }, Ot = R(Lt), kt = tt`
819
821
  from {
820
822
  transform: rotate(0deg);
821
823
  }
@@ -823,9 +825,9 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
823
825
  transform: rotate(360deg);
824
826
  }
825
827
  `, Ht = () => {
826
- const { addRepeatingTransaction: i, repeatingTransactions: n } = P(), { cashflow: t, common: s } = O(), { completeOnboarding: m } = le(), { isDirty: g } = V(), { isMobile: c } = me(), { isCopyLoaded: l, setDisplayedDate: C } = X(), { filter: a, setFilter: h, transactions: d } = ke(), b = ie(), [_, w] = K(!0), [A, u] = f.useState(mt.EveryMonth), [E, S] = f.useState(1), [M, G] = f.useState(15), [j, y] = K(!1), [I, pe] = K(1), [k, je] = K([]), [fe, se] = K(""), W = f.useMemo(
827
- () => d.find((x) => x.guid === fe),
828
- [fe, d]
828
+ const { addRepeatingTransaction: i, repeatingTransactions: n } = P(), { cashflow: t, common: s } = L(), { completeOnboarding: d } = le(), { isDirty: g } = V(), { isMobile: c } = me(), { isCopyLoaded: m, setDisplayedDate: C } = X(), { filter: a, setFilter: u, transactions: l } = ke(), b = ie(), [w, S] = K(!0), [A, h] = p.useState(mt.EveryMonth), [I, y] = p.useState(1), [M, G] = p.useState(15), [j, _] = K(!1), [D, pe] = K(1), [k, je] = K([]), [fe, se] = K(""), W = p.useMemo(
829
+ () => l.find((x) => x.guid === fe),
830
+ [fe, l]
829
831
  ), ze = !!n.filter(
830
832
  (x) => x.repeating_transaction_type === Ie.Income
831
833
  ).length, ge = async () => {
@@ -833,10 +835,10 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
833
835
  // Beginning of the month, 90 days before today
834
836
  ct(Me($(), 90)),
835
837
  $()
836
- ), h({ ...a, custom: Se }), pe(3);
838
+ ), u({ ...a, custom: Se }), pe(3);
837
839
  }, Be = async () => {
838
840
  if (!(k.length < 1)) {
839
- y(!0);
841
+ _(!0);
840
842
  for (let x = 0; x < k.length; x++) {
841
843
  const T = k[x], be = De(A, ye(T.date)), Pe = {
842
844
  account_guid: T.account_guid,
@@ -851,11 +853,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
851
853
  };
852
854
  await i(Pe, T);
853
855
  }
854
- await m();
856
+ await d();
855
857
  }
856
- }, Ue = !W && _ || !W && k.length < 1;
857
- return l ? /* @__PURE__ */ o(
858
- D,
858
+ }, Ue = !W && w || !W && k.length < 1;
859
+ return m ? /* @__PURE__ */ o(
860
+ v,
859
861
  {
860
862
  sx: {
861
863
  display: "flex",
@@ -868,47 +870,47 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
868
870
  py: 24
869
871
  },
870
872
  children: [
871
- I === 1 && /* @__PURE__ */ e(
872
- D,
873
+ D === 1 && /* @__PURE__ */ e(
874
+ v,
873
875
  {
874
876
  sx: {
875
877
  ...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
876
878
  },
877
- children: /* @__PURE__ */ e(Lt, { handleNextStep: ge })
879
+ children: /* @__PURE__ */ e(Nt, { handleNextStep: ge })
878
880
  }
879
881
  ),
880
- I === 2 && /* @__PURE__ */ e(
881
- D,
882
+ D === 2 && /* @__PURE__ */ e(
883
+ v,
882
884
  {
883
885
  sx: {
884
886
  ...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
885
887
  },
886
- children: /* @__PURE__ */ e(Nt, {})
888
+ children: /* @__PURE__ */ e(Ot, {})
887
889
  }
888
890
  ),
889
- I === 3 && /* @__PURE__ */ o(
890
- D,
891
+ D === 3 && /* @__PURE__ */ o(
892
+ v,
891
893
  {
892
894
  sx: {
893
895
  ...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
894
896
  },
895
897
  children: [
896
898
  /* @__PURE__ */ e(ce, { pb: 12, children: t.add_income_title }),
897
- /* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
899
+ /* @__PURE__ */ e(O, { mb: 24, children: t.add_income_description }),
898
900
  k.length > 0 && !W && /* @__PURE__ */ o(U, { children: [
899
- /* @__PURE__ */ e(Z, { children: k.map((x, T) => /* @__PURE__ */ o(f.Fragment, { children: [
901
+ /* @__PURE__ */ e(Z, { children: k.map((x, T) => /* @__PURE__ */ o(p.Fragment, { children: [
900
902
  /* @__PURE__ */ e(lt, { bgcolor: "background.paper", children: ut(
901
903
  B(x.nextDate || x.date)
902
904
  ) }),
903
905
  /* @__PURE__ */ e(dt, { transaction: x }),
904
- T !== k.length - 1 && /* @__PURE__ */ e(v, {})
906
+ T !== k.length - 1 && /* @__PURE__ */ e(E, {})
905
907
  ] }, x.guid)) }),
906
908
  /* @__PURE__ */ o(r, { alignItems: "center", direction: "row", children: [
907
- /* @__PURE__ */ e(v, { sx: { flexGrow: 1 } }),
909
+ /* @__PURE__ */ e(E, { sx: { flexGrow: 1 } }),
908
910
  /* @__PURE__ */ e(
909
911
  H,
910
912
  {
911
- onClick: () => w(!0),
913
+ onClick: () => S(!0),
912
914
  startIcon: /* @__PURE__ */ e(F, { name: "add", size: 20 }),
913
915
  children: t.add_income
914
916
  }
@@ -919,25 +921,25 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
919
921
  it,
920
922
  {
921
923
  bgcolor: "background.paper",
922
- onSearch: (x) => h({
924
+ onSearch: (x) => u({
923
925
  ...a,
924
926
  custom: (T) => x ? at(T, x) : Se(T)
925
927
  }),
926
928
  onSelected: (x) => {
927
- se(x), w(!1);
929
+ se(x), S(!1);
928
930
  }
929
931
  }
930
932
  ),
931
- !ze && g && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
933
+ !ze && g && /* @__PURE__ */ e(O, { color: "error", mt: 16, children: t.confirm_error }),
932
934
  W && /* @__PURE__ */ o(U, { children: [
933
935
  /* @__PURE__ */ e(
934
936
  rt,
935
937
  {
936
938
  bgcolor: "background.paper",
937
- firstDay: E,
939
+ firstDay: I,
938
940
  frequency: A,
939
- onFirstDayChange: S,
940
- onFrequencyChange: u,
941
+ onFirstDayChange: y,
942
+ onFrequencyChange: h,
941
943
  onSecondDayChange: G,
942
944
  secondDay: M,
943
945
  transaction: W
@@ -964,7 +966,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
964
966
  H,
965
967
  {
966
968
  onClick: () => {
967
- se(""), w(!0), ge().finally();
969
+ se(""), S(!0), ge().finally();
968
970
  },
969
971
  variant: "outlined",
970
972
  children: s.cancel_button
@@ -991,7 +993,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
991
993
  children: t.confirm_income_button
992
994
  }
993
995
  ),
994
- /* @__PURE__ */ e(H, { onClick: m, variant: "outlined", children: t.skip_button })
996
+ /* @__PURE__ */ e(H, { onClick: d, variant: "outlined", children: t.skip_button })
995
997
  ] })
996
998
  ]
997
999
  }
@@ -1003,32 +1005,32 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
1003
1005
  const {
1004
1006
  selectedAccounts: t,
1005
1007
  selectedAccountGuids: s,
1006
- setSelectedAccounts: m,
1008
+ setSelectedAccounts: d,
1007
1009
  shouldDisableNextDate: g,
1008
1010
  shouldDisablePrevDate: c
1009
- } = X(), { onEvent: l } = Ne(), { visibleCashAccounts: C } = Oe(), { setFilter: a } = ke(), { userProfile: h } = de(), { dateRange: d, setSelectedCashAccounts: b } = V(), { loadRepeatingTransactions: _, setDateRange: w } = P(), { cashflow: A, recurring: u } = O(), { isCopyLoaded: E, isInitialized: S } = X(), [M, G] = f.useState(!1);
1010
- return f.useEffect(() => {
1011
- S && (w(d), _().finally());
1012
- }, [S]), f.useEffect(() => {
1013
- m(C);
1014
- }, [C]), f.useEffect(() => {
1015
- const j = C.map((I) => I.guid), y = t.filter(
1016
- (I) => s.includes(I.guid) && j.includes(I.guid)
1011
+ } = X(), { onEvent: m } = Oe(), { visibleCashAccounts: C } = Le(), { setFilter: a } = ke(), { userProfile: u } = de(), { dateRange: l, setSelectedCashAccounts: b } = V(), { loadRepeatingTransactions: w, setDateRange: S } = P(), { cashflow: A, recurring: h } = L(), { isCopyLoaded: I, isInitialized: y } = X(), [M, G] = p.useState(!1);
1012
+ return p.useEffect(() => {
1013
+ y && (S(l), w().finally());
1014
+ }, [y]), p.useEffect(() => {
1015
+ d(C);
1016
+ }, [C]), p.useEffect(() => {
1017
+ const j = C.map((D) => D.guid), _ = t.filter(
1018
+ (D) => s.includes(D.guid) && j.includes(D.guid)
1017
1019
  );
1018
- b(y), a({
1020
+ b(_), a({
1019
1021
  dateRange: { start: Me($(), 90), end: ht() },
1020
- accounts: y.map((I) => I.guid)
1022
+ accounts: _.map((D) => D.guid)
1021
1023
  });
1022
- }, [C, t]), !E || !S ? /* @__PURE__ */ e(re, {}) : h?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
1024
+ }, [C, t]), !I || !y ? /* @__PURE__ */ e(re, {}) : u?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
1023
1025
  ve,
1024
1026
  {
1025
1027
  accountOptions: C,
1026
1028
  actions: [
1027
1029
  {
1028
- label: u.action_title,
1030
+ label: h.action_title,
1029
1031
  iconName: "credit_card",
1030
1032
  onClick: () => {
1031
- G(!0), l(Ae.CASH_FLOW_CLICK_SETTINGS);
1033
+ G(!0), m(Ee.CASH_FLOW_CLICK_SETTINGS);
1032
1034
  }
1033
1035
  }
1034
1036
  ],
@@ -1039,15 +1041,15 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
1039
1041
  onRangeChanged: () => {
1040
1042
  }
1041
1043
  },
1042
- dateRange: d,
1044
+ dateRange: l,
1043
1045
  dateRangeVariant: "readonly",
1044
- onAccountsFilterClick: () => l(Ae.CASH_FLOW_CLICK_FILTER),
1046
+ onAccountsFilterClick: () => m(Ee.CASH_FLOW_CLICK_FILTER),
1045
1047
  onBackClick: i,
1046
1048
  sx: n,
1047
1049
  title: A.title,
1048
1050
  children: [
1049
1051
  /* @__PURE__ */ e(Tt, {}),
1050
- /* @__PURE__ */ e(At, {}),
1052
+ /* @__PURE__ */ e(Et, {}),
1051
1053
  /* @__PURE__ */ e(
1052
1054
  $e,
1053
1055
  {
@@ -1055,7 +1057,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
1055
1057
  isOpen: M,
1056
1058
  onClose: () => G(!1),
1057
1059
  shouldShowHeaderBorders: !1,
1058
- title: u.action_title,
1060
+ title: h.action_title,
1059
1061
  children: /* @__PURE__ */ e(Ve, {})
1060
1062
  }
1061
1063
  )
@@ -1070,7 +1072,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
1070
1072
  children: /* @__PURE__ */ e(Ft, {})
1071
1073
  }
1072
1074
  );
1073
- }, Nn = R(Wt);
1075
+ }, On = R(Wt);
1074
1076
  class kn {
1075
1077
  fetchInstance;
1076
1078
  constructor(n, t) {
@@ -1092,8 +1094,8 @@ class kn {
1092
1094
  }
1093
1095
  export {
1094
1096
  kn as CashflowApi,
1095
- On as CashflowMiniWidget,
1097
+ Ln as CashflowMiniWidget,
1096
1098
  Ft as CashflowOnboarding,
1097
1099
  Wn as CashflowStore,
1098
- Nn as CashflowWidget
1100
+ On as CashflowWidget
1099
1101
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.0.7",
3
+ "version": "7.0.8-alpha.al0",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",