@mx-cartographer/experiences 7.2.10 → 7.2.12

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,3 +1,11 @@
1
+ ## [7.2.12] - 11-20-2025
2
+
3
+ - **FIXED** - Accessibility label on split transaction amount input
4
+
5
+ ## [7.2.11] - 11-19-2025
6
+
7
+ - **FIXED** - transactions widget to not announce until copy loaded
8
+
1
9
  ## [7.2.10] - 11-18-2025
2
10
 
3
11
  - **FIXED** - transactions widget to announce dynamic updates via aria live region
@@ -6,7 +6,7 @@ import nt from "@mui/material/Tabs";
6
6
  import $ from "@mui/material/List";
7
7
  import Y from "@mui/material/ListSubheader";
8
8
  import ot from "@mui/material/Switch";
9
- import { Text as A, Icon as I, THEMES as G } from "@mxenabled/mxui";
9
+ import { Text as b, Icon as I, THEMES as G } from "@mxenabled/mxui";
10
10
  import M from "@mui/material/Divider";
11
11
  import v from "@mui/material/ListItem";
12
12
  import N from "@mui/material/ListItemButton";
@@ -18,11 +18,11 @@ import { A as k } from "./WidgetContainer-C88Ecu2W.mjs";
18
18
  import { a as V, f as B, D as K } from "./Dialog-CWW597AF.mjs";
19
19
  import { b as h } from "./Localization-2MODESHW.mjs";
20
20
  import { D as J } from "./Drawer-kEE73B87.mjs";
21
- import R from "@mui/material/ListItemAvatar";
21
+ import P from "@mui/material/ListItemAvatar";
22
22
  import ct from "@mui/material/Stack";
23
23
  import st from "@mui/material/styles/useTheme";
24
24
  import { Error as q, CheckCircle as it, Language as rt } from "@mxenabled/mx-icons";
25
- import { n as m, N as Q, l as Z, F as P } from "./ConnectDrawer-DaFRU5st.mjs";
25
+ import { n as m, N as Q, l as Z, F as R } from "./ConnectDrawer-DaFRU5st.mjs";
26
26
  import { fromUnixTime as lt } from "date-fns/fromUnixTime";
27
27
  import { isToday as dt } from "date-fns/isToday";
28
28
  import { isYesterday as ut } from "date-fns/isYesterday";
@@ -34,17 +34,17 @@ import { DateCalendar as ht } from "@mui/x-date-pickers/DateCalendar";
34
34
  import gt from "@mui/material/FormControl";
35
35
  import Ct from "@mui/material/InputLabel";
36
36
  import { LocalizationProvider as ft } from "@mui/x-date-pickers-pro";
37
- import At from "@mui/material/MenuItem";
38
- import bt from "@mui/material/Select";
37
+ import bt from "@mui/material/MenuItem";
38
+ import At from "@mui/material/Select";
39
39
  import Tt from "@mui/material/TextField";
40
- import { C as St } from "./CurrencyInput-CsCy7uaS.mjs";
40
+ import { C as St } from "./CurrencyInput-DUsQbkXb.mjs";
41
41
  import { b as Dt } from "./AccountFields-cUP-9Hm6.mjs";
42
42
  import Et from "@mui/material/Alert";
43
43
  import yt from "@mui/material/AlertTitle";
44
44
  import xt from "@mui/material/Link";
45
45
  import wt from "@mui/material/Paper";
46
46
  import { subDays as kt, startOfToday as It, endOfToday as Mt } from "date-fns";
47
- import { T as vt, a as Lt } from "./TransactionDetails-BWffqew4.mjs";
47
+ import { T as vt, a as Lt } from "./TransactionDetails-DW7T0W0z.mjs";
48
48
  import { T as j } from "./TabContentContainer-j01JYR_7.mjs";
49
49
  const U = ({
50
50
  children: e,
@@ -64,7 +64,7 @@ const U = ({
64
64
  (c) => c.member_guid === n.guid && n.successfully_aggregated_at && c.guid !== o.guid
65
65
  );
66
66
  }, Ot = () => {
67
- const [e, o] = _.useState(!1), [n, c] = _.useState(!1), [i, u] = _.useState(!1), [l, s] = _.useState({}), { selectedAccount: r } = D(), { mergeAccounts: y, updateAccount: S } = z(), { accounts: a } = E(), C = Nt(), { onEvent: b } = O(), { modifyTransactionByAccountGuid: x } = X(), L = async (f) => {
67
+ const [e, o] = _.useState(!1), [n, c] = _.useState(!1), [i, u] = _.useState(!1), [l, s] = _.useState({}), { selectedAccount: r } = D(), { mergeAccounts: y, updateAccount: S } = z(), { accounts: a } = E(), C = Nt(), { onEvent: A } = O(), { modifyTransactionByAccountGuid: x } = X(), L = async (f) => {
68
68
  await S({
69
69
  ...r,
70
70
  ...f
@@ -75,12 +75,12 @@ const U = ({
75
75
  );
76
76
  };
77
77
  return /* @__PURE__ */ d(g, { children: [
78
- /* @__PURE__ */ t(Y, { sx: { backgroundColor: "transparent", mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(A, { bold: !0, component: "h2", variant: "XSmall", children: a.actions }) }),
78
+ /* @__PURE__ */ t(Y, { sx: { backgroundColor: "transparent", mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(b, { bold: !0, component: "h2", variant: "XSmall", children: a.actions }) }),
79
79
  /* @__PURE__ */ t(
80
80
  U,
81
81
  {
82
82
  onClick: () => {
83
- L({ is_hidden: !r.is_hidden }), b(k.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: r.guid });
83
+ L({ is_hidden: !r.is_hidden }), A(k.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: r.guid });
84
84
  },
85
85
  primaryText: r.is_hidden ? a.unhide_account : a.hide_Account,
86
86
  secondaryText: r.is_hidden ? a.include_this_account : a.exclude_this_account,
@@ -91,7 +91,7 @@ const U = ({
91
91
  U,
92
92
  {
93
93
  onClick: () => {
94
- o(!0), b(k.ACCOUNT_DETAILS_CLICK_MARK_CLOSED, {
94
+ o(!0), A(k.ACCOUNT_DETAILS_CLICK_MARK_CLOSED, {
95
95
  account_guid: r.guid
96
96
  });
97
97
  },
@@ -105,7 +105,7 @@ const U = ({
105
105
  {
106
106
  isLast: !0,
107
107
  onClick: () => {
108
- c(!0), b(k.ACCOUNT_DETAILS_CLICK_MARK_DUPLICATE, {
108
+ c(!0), A(k.ACCOUNT_DETAILS_CLICK_MARK_DUPLICATE, {
109
109
  account_guid: r.guid
110
110
  });
111
111
  },
@@ -126,7 +126,7 @@ const U = ({
126
126
  o(!1);
127
127
  },
128
128
  onPrimaryAction: () => L({ is_closed: !r.is_closed }),
129
- children: /* @__PURE__ */ t(A, { truncate: !1, children: h(
129
+ children: /* @__PURE__ */ t(b, { truncate: !1, children: h(
130
130
  r.is_closed ? a.this_will_resume_updating_the_balance : a.this_will_set_the_balance_of_your_account,
131
131
  r.name
132
132
  ) })
@@ -167,17 +167,17 @@ const U = ({
167
167
  onClose: () => u(!1),
168
168
  onPrimaryAction: p,
169
169
  children: [
170
- /* @__PURE__ */ t(A, { truncate: !1, children: h(
170
+ /* @__PURE__ */ t(b, { truncate: !1, children: h(
171
171
  a.this_means_accounts_will_be_merged,
172
172
  r.name,
173
173
  l.name
174
174
  ) }),
175
- /* @__PURE__ */ t(A, { color: "error", sx: { mt: 24 }, children: a.this_action_cannot_be_undone })
175
+ /* @__PURE__ */ t(b, { color: "error", sx: { mt: 24 }, children: a.this_action_cannot_be_undone })
176
176
  ]
177
177
  }
178
178
  )
179
179
  ] });
180
- }, Rt = T(Ot), tt = (e, o) => {
180
+ }, Pt = T(Ot), tt = (e, o) => {
181
181
  const { connection_messages: n } = o;
182
182
  switch (e.connection_status) {
183
183
  case m.CHALLENGED:
@@ -335,7 +335,7 @@ const U = ({
335
335
  gridRow: 1,
336
336
  gridColumn: 1,
337
337
  zIndex: 2
338
- }, Pt = () => {
338
+ }, Rt = () => {
339
339
  const [e, o] = _.useState(!1), {
340
340
  palette: { mode: n }
341
341
  } = st(), { selectedMember: c } = D(), { accounts: i, connect: u } = E(), l = tt(c, u), s = Q.includes(c.connection_status) ? {
@@ -351,12 +351,12 @@ const U = ({
351
351
  secondaryMessage: l.title
352
352
  };
353
353
  return /* @__PURE__ */ d(g, { children: [
354
- /* @__PURE__ */ t(Y, { sx: { mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(A, { bold: !0, component: "h2", variant: "XSmall", children: i.connection_status }) }),
354
+ /* @__PURE__ */ t(Y, { sx: { mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ t(b, { bold: !0, component: "h2", variant: "XSmall", children: i.connection_status }) }),
355
355
  /* @__PURE__ */ t(v, { sx: { backgroundColor: "background.paper" }, children: c.is_manual || !s.ctaCopy ? /* @__PURE__ */ d(ct, { alignItems: "center", direction: "row", px: 24, py: 12, children: [
356
- /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(F, { backingSx: { backgroundColor: s.color, borderRadius: 1 }, size: 32, children: s.icon }) }),
356
+ /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(F, { backingSx: { backgroundColor: s.color, borderRadius: 1 }, size: 32, children: s.icon }) }),
357
357
  /* @__PURE__ */ t(w, { primary: s.mainMessage, secondary: s.secondaryMessage })
358
358
  ] }) : /* @__PURE__ */ d(N, { onClick: () => o(!0), children: [
359
- /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(F, { backingSx: { backgroundColor: s.color, borderRadius: 1 }, size: 32, children: s.icon }) }),
359
+ /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(F, { backingSx: { backgroundColor: s.color, borderRadius: 1 }, size: 32, children: s.icon }) }),
360
360
  /* @__PURE__ */ t(
361
361
  w,
362
362
  {
@@ -364,7 +364,7 @@ const U = ({
364
364
  secondary: s.secondaryMessage && /* @__PURE__ */ d(g, { children: [
365
365
  s.secondaryMessage,
366
366
  " ",
367
- /* @__PURE__ */ t(A, { bold: !0, sx: { color: "action.active" }, variant: "XSmall", children: s.ctaCopy })
367
+ /* @__PURE__ */ t(b, { bold: !0, sx: { color: "action.active" }, variant: "XSmall", children: s.ctaCopy })
368
368
  ] })
369
369
  }
370
370
  ),
@@ -373,7 +373,7 @@ const U = ({
373
373
  /* @__PURE__ */ t(M, { sx: { ml: c.is_manual || !c.institution_url ? 0 : 24 } }),
374
374
  !c.is_manual && c.institution_url && /* @__PURE__ */ d(g, { children: [
375
375
  /* @__PURE__ */ t(v, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ d(N, { component: "a", href: c.institution_url, target: "_blank", children: [
376
- /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
376
+ /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(
377
377
  F,
378
378
  {
379
379
  backingSx: {
@@ -407,16 +407,16 @@ const U = ({
407
407
  }
408
408
  )
409
409
  ] });
410
- }, Ft = T(Pt), Ut = ({ field: e, isOpen: o, onClose: n }) => {
410
+ }, Ft = T(Rt), Ut = ({ field: e, isOpen: o, onClose: n }) => {
411
411
  const { updateAccount: c } = z(), { selectedAccount: i } = D(), { accounts: u } = E(), [l, s] = _.useState(i[e.name]), [r, y] = _.useState(""), [S, a] = _.useState(!0), C = () => {
412
412
  s(""), y(""), n();
413
- }, b = () => {
413
+ }, A = () => {
414
414
  switch (e.type) {
415
- case P.Select:
415
+ case R.Select:
416
416
  return /* @__PURE__ */ d(gt, { fullWidth: !0, children: [
417
417
  /* @__PURE__ */ t(Ct, { id: `${e.label}-select-label`, children: e.label }),
418
418
  /* @__PURE__ */ t(
419
- bt,
419
+ At,
420
420
  {
421
421
  id: `${e.label}-select`,
422
422
  inputProps: {
@@ -429,15 +429,16 @@ const U = ({
429
429
  onChange: (p) => s(p.target.value),
430
430
  placeholder: e.placeholder,
431
431
  value: l,
432
- children: e.options?.map((p) => /* @__PURE__ */ t(At, { value: p.value, children: p.label }, p.value))
432
+ children: e.options?.map((p) => /* @__PURE__ */ t(bt, { value: p.value, children: p.label }, p.value))
433
433
  }
434
434
  )
435
435
  ] });
436
- case P.Currency:
436
+ case R.Currency:
437
437
  return /* @__PURE__ */ t(
438
438
  St,
439
439
  {
440
440
  amount: l || "",
441
+ ariaLabel: e.placeholder,
441
442
  fullWidth: !0,
442
443
  label: e.label,
443
444
  placeholder: e.placeholder,
@@ -445,7 +446,7 @@ const U = ({
445
446
  setHasValidInput: a
446
447
  }
447
448
  );
448
- case P.Date:
449
+ case R.Date:
449
450
  return /* @__PURE__ */ t(ft, { dateAdapter: pt, children: /* @__PURE__ */ t(
450
451
  ht,
451
452
  {
@@ -476,6 +477,9 @@ const U = ({
476
477
  error: !!r,
477
478
  fullWidth: !0,
478
479
  helperText: r,
480
+ inputProps: {
481
+ "aria-label": e.placeholder
482
+ },
479
483
  onChange: L,
480
484
  placeholder: e.placeholder
481
485
  }
@@ -501,7 +505,7 @@ const U = ({
501
505
  onClose: C,
502
506
  onPrimaryAction: x,
503
507
  primaryText: u.save,
504
- children: b()
508
+ children: A()
505
509
  }
506
510
  );
507
511
  }, Wt = T(Ut), $t = () => {
@@ -510,12 +514,12 @@ const U = ({
510
514
  );
511
515
  return /* @__PURE__ */ d(g, { children: [
512
516
  S.map((a) => {
513
- const C = n[a.name] || n[a.name] === 0, b = S.indexOf(a) === S.length - 1, x = /* @__PURE__ */ t(
517
+ const C = n[a.name] || n[a.name] === 0, A = S.indexOf(a) === S.length - 1, x = /* @__PURE__ */ t(
514
518
  w,
515
519
  {
516
520
  disableTypography: !0,
517
- primary: /* @__PURE__ */ t(A, { sx: { fontSize: 11 }, children: a.label }),
518
- secondary: /* @__PURE__ */ t(A, { bold: !0, sx: { fontSize: 15 }, children: C ? a.valueFormatter(n[a.name]) : a.placeholder })
521
+ primary: /* @__PURE__ */ t(b, { sx: { fontSize: 11 }, children: a.label }),
522
+ secondary: /* @__PURE__ */ t(b, { bold: !0, sx: { fontSize: 15 }, children: C ? a.valueFormatter(n[a.name]) : a.placeholder })
519
523
  }
520
524
  );
521
525
  return /* @__PURE__ */ t(_.Fragment, { children: u ? /* @__PURE__ */ d(g, { children: [
@@ -531,10 +535,10 @@ const U = ({
531
535
  ]
532
536
  }
533
537
  ) }),
534
- /* @__PURE__ */ t(M, { sx: { ml: b ? 0 : 24 } })
538
+ /* @__PURE__ */ t(M, { sx: { ml: A ? 0 : 24 } })
535
539
  ] }) : C && /* @__PURE__ */ d(g, { children: [
536
540
  /* @__PURE__ */ t(v, { sx: { backgroundColor: "background.paper", px: 24 }, children: x }),
537
- /* @__PURE__ */ t(M, { sx: { ml: b ? 0 : 24 } })
541
+ /* @__PURE__ */ t(M, { sx: { ml: A ? 0 : 24 } })
538
542
  ] }) }, a.name);
539
543
  }),
540
544
  l && r && /* @__PURE__ */ t(
@@ -551,7 +555,7 @@ const U = ({
551
555
  return _.useEffect(() => e(k.ACCOUNT_DETAILS_VIEW), []), /* @__PURE__ */ d($, { children: [
552
556
  /* @__PURE__ */ t(Vt, {}),
553
557
  /* @__PURE__ */ t(Ft, {}),
554
- /* @__PURE__ */ t(Rt, {})
558
+ /* @__PURE__ */ t(Pt, {})
555
559
  ] });
556
560
  }, Ht = T(zt), Gt = ({ setTabValue: e }) => {
557
561
  const [o, n] = _.useState(!1), { selectedMember: c } = D(), { accounts: i, connect: u } = E(), l = c.connection_status && Q.includes(c.connection_status);
@@ -585,7 +589,7 @@ const U = ({
585
589
  },
586
590
  children: [
587
591
  s.title && /* @__PURE__ */ t(yt, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: s.title }),
588
- /* @__PURE__ */ t(A, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: s.main }),
592
+ /* @__PURE__ */ t(b, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: s.main }),
589
593
  s.cta && /* @__PURE__ */ t(
590
594
  xt,
591
595
  {
@@ -0,0 +1,85 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import m from "react";
3
+ import { css as q } from "@mxenabled/cssinjs";
4
+ import { v4 as B } from "uuid";
5
+ import { useTokens as L, TextField as O, P as _ } from "@mxenabled/mxui";
6
+ import { b as y, g as C } from "./Localization-2MODESHW.mjs";
7
+ import { g as W, C as j, f as g, M as b } from "./NumberFormatting-Buh7u8Oi.mjs";
8
+ import { u as D } from "./hooks-D6XlXHf4.mjs";
9
+ const F = ({
10
+ allowDecimals: o = !0,
11
+ ariaLabel: h,
12
+ amount: c,
13
+ amountIsRequired: $ = !0,
14
+ copy: a,
15
+ customValidate: M = () => !0,
16
+ errorText: S = "",
17
+ label: u,
18
+ minAmount: f = 1,
19
+ setAmount: x,
20
+ setHasValidInput: r,
21
+ ...N
22
+ }) => {
23
+ const [l, t] = m.useState(""), { common: T } = D(), n = a || T.currency_input, k = L(), P = G(k), R = /^[0-9]*$/, A = /^(\d)*(\,)?([0-9]{1,2})?$/, E = /^(\d)*(\.)?([0-9]{1,2})?$/;
24
+ let s;
25
+ const p = m.useRef(B());
26
+ if (o)
27
+ switch (W()) {
28
+ case j.CAD:
29
+ s = A;
30
+ break;
31
+ default:
32
+ s = E;
33
+ break;
34
+ }
35
+ else
36
+ s = R;
37
+ m.useEffect(() => {
38
+ d(c);
39
+ }, [c]);
40
+ const d = (e) => {
41
+ !$ && (e === "" || e === "." || e === ",") ? (t(""), r?.(!1)) : Number(e) < f ? (t(
42
+ y(
43
+ n.error_amount_must_be_equal_to,
44
+ g(f, "0")
45
+ )
46
+ ), r?.(!1)) : Number(e) > b ? (t(
47
+ y(
48
+ n.error_amount_must_be_less_than_or_equal_to,
49
+ g(b, o ? "0,0.00" : "0,0", Math.floor)
50
+ )
51
+ ), r?.(!1)) : e.toString().match(s) ? M() ? (t(""), r?.(!0)) : (t(S), r?.(!1)) : (t(n.error_amount_is_invalid), r?.(!1)), x(e.toString());
52
+ };
53
+ return /* @__PURE__ */ i(
54
+ O,
55
+ {
56
+ InputProps: {
57
+ endAdornment: C().includes("fr-ca") ? /* @__PURE__ */ i(_, { children: "$" }) : void 0,
58
+ startAdornment: C().includes("fr-ca") ? void 0 : /* @__PURE__ */ i(_, { children: "$" })
59
+ },
60
+ className: `mx-cmn-currency-input ${P}`,
61
+ error: !!l,
62
+ helperText: l,
63
+ hiddenLabel: !u,
64
+ id: `currency-input-${p.current}`,
65
+ inputMode: o ? "decimal" : "numeric",
66
+ inputProps: {
67
+ "aria-label": h || n.enter_amount,
68
+ noValidate: !0,
69
+ pattern: "[0-9]*"
70
+ },
71
+ label: u,
72
+ name: `currency-input-${p.current}`,
73
+ onChange: (e) => d(e.target.value),
74
+ value: c,
75
+ ...N
76
+ }
77
+ );
78
+ }, G = (o) => q({
79
+ "& .MuiInputBase-adornedStart > .p": {
80
+ marginRight: o.Spacing.Tiny
81
+ }
82
+ }), Q = F;
83
+ export {
84
+ Q as C
85
+ };
@@ -16,7 +16,7 @@ import { startOfToday as z } from "date-fns/startOfToday";
16
16
  import { endOfMonth as _e } from "date-fns/endOfMonth";
17
17
  import $ from "@mui/material/Button";
18
18
  import { Delete as me, Add as pe, ReceiptLong as he } from "@mxenabled/mx-icons";
19
- import { T as X, a as ye, u as ge, S as fe, b as Ce } from "./TransactionDetails-BWffqew4.mjs";
19
+ import { T as X, a as ye, u as ge, S as fe, b as Ce } from "./TransactionDetails-DW7T0W0z.mjs";
20
20
  import { getDayOfYear as be } from "date-fns/getDayOfYear";
21
21
  import { setDayOfYear as xe } from "date-fns/setDayOfYear";
22
22
  import { AdapterDateFns as Se } from "@mui/x-date-pickers/AdapterDateFnsV3";
@@ -19,7 +19,7 @@ import { u as D, s as T, p as A, d as se, g as ae, a as W, b as le } from "./hoo
19
19
  import { b as ce } from "./Localization-2MODESHW.mjs";
20
20
  import { b as re, f as de } from "./NumberFormatting-Buh7u8Oi.mjs";
21
21
  import { a as M } from "./Dialog-CWW597AF.mjs";
22
- import { C as me } from "./CurrencyInput-CsCy7uaS.mjs";
22
+ import { C as me } from "./CurrencyInput-DUsQbkXb.mjs";
23
23
  import { u as he } from "./useScreenSize-B6JyS_Lj.mjs";
24
24
  import { D as J } from "./Drawer-kEE73B87.mjs";
25
25
  import _e from "@mui/material/Collapse";
@@ -5,7 +5,7 @@ import v from "@mui/material/TextField";
5
5
  import { L as y } from "./ListItemAction-DHa3KJPs.mjs";
6
6
  import { u as h, l as b } from "./hooks-D6XlXHf4.mjs";
7
7
  import { a as T, f as S } from "./NumberFormatting-Buh7u8Oi.mjs";
8
- import { C as f } from "./CurrencyInput-CsCy7uaS.mjs";
8
+ import { C as f } from "./CurrencyInput-DUsQbkXb.mjs";
9
9
  const F = p(({ goal: e }) => {
10
10
  const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
11
11
  const n = { ...e, interest_rate: t };
@@ -7,7 +7,7 @@ import b from "@mui/material/Tabs";
7
7
  import d from "@mui/material/Divider";
8
8
  import R 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-D3n1EWxe.mjs";
10
+ import { R as C, A as S, a as E, M as v } from "./ManageIncome-CQPFKdYB.mjs";
11
11
  import { u as _, j as A, g as f } from "./hooks-D6XlXHf4.mjs";
12
12
  import { R as y, F as N } from "./RecurringTransactions-ej39mgA6.mjs";
13
13
  import { A as m } from "./WidgetContainer-C88Ecu2W.mjs";
@@ -37,7 +37,7 @@ import { D as de } from "./Drawer-kEE73B87.mjs";
37
37
  import ye from "@mui/material/InputAdornment";
38
38
  import Je from "@mui/material/Checkbox";
39
39
  import ge from "@mui/material/Grid";
40
- import { C as Qe } from "./CurrencyInput-CsCy7uaS.mjs";
40
+ import { C as Qe } from "./CurrencyInput-DUsQbkXb.mjs";
41
41
  import et from "@mui/material/Switch";
42
42
  var q = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(q || {}), re = /* @__PURE__ */ ((t) => (t[t.SplitTransaction = 0] = "SplitTransaction", t[t.HideTransaction = 1] = "HideTransaction", t[t.MerchantLogo = 2] = "MerchantLogo", t))(re || {});
43
43
  const tt = [
@@ -649,10 +649,7 @@ const it = ({ transaction: t, onClick: r }) => {
649
649
  Qe,
650
650
  {
651
651
  amount: i,
652
- "aria-label": d.split_transaction_edit_split_amount,
653
- inputProps: {
654
- noValidate: !0
655
- },
652
+ ariaLabel: d.split_transaction_edit_split_amount,
656
653
  name: "split-amount-input",
657
654
  setAmount: x,
658
655
  sx: {
@@ -7,8 +7,8 @@ import E from "@mui/material/List";
7
7
  import O from "@mui/material/ListSubheader";
8
8
  import _ from "@mui/system/Stack";
9
9
  import { Text as v } from "@mxenabled/mxui";
10
- import { A as K } from "../AccountDetailsContent-DfzPOeMI.mjs";
11
- import { u as D1 } from "../AccountDetailsContent-DfzPOeMI.mjs";
10
+ import { A as K } from "../AccountDetailsContent-bqByD9ea.mjs";
11
+ import { u as D1 } from "../AccountDetailsContent-bqByD9ea.mjs";
12
12
  import { u as z, A as P } from "../AccountDetailsHeader-vcy67tuH.mjs";
13
13
  import { A as W } from "../AccountListItem-DChcf3SN.mjs";
14
14
  import { a as Y } from "../AccountFields-cUP-9Hm6.mjs";
@@ -19,7 +19,7 @@ import Y from "@mui/material/ListItemText";
19
19
  import { b as M } from "../Localization-2MODESHW.mjs";
20
20
  import { D as k } from "../Drawer-kEE73B87.mjs";
21
21
  import Fe from "@mui/material/ListItemSecondaryAction";
22
- import { C as He } from "../CurrencyInput-CsCy7uaS.mjs";
22
+ import { C as He } from "../CurrencyInput-DUsQbkXb.mjs";
23
23
  import { a as $ } from "../Dialog-CWW597AF.mjs";
24
24
  import { C as We } from "../ConnectionsDrawer-DHJ7qdWL.mjs";
25
25
  import * as O from "d3";
@@ -37,7 +37,7 @@ import Je from "@mui/material/Snackbar";
37
37
  import ye from "@mui/material/Tab";
38
38
  import Qe from "@mui/material/Tabs";
39
39
  import { e as et } from "../exportTransactionsToCSV-7bVS7KXf.mjs";
40
- import { T as Te, a as tt } from "../TransactionDetails-BWffqew4.mjs";
40
+ import { T as Te, a as tt } from "../TransactionDetails-DW7T0W0z.mjs";
41
41
  import pe from "@mui/material/Card";
42
42
  import he from "@mui/material/CardContent";
43
43
  import { S as ge } from "../StatusBar-BK_uYHAB.mjs";
@@ -46,7 +46,7 @@ import { u as nt, b as ot } from "../CategorySelectorDrawer-DUe4lH5-.mjs";
46
46
  import De from "@mui/material/CardHeader";
47
47
  import { subDays as at } from "date-fns/subDays";
48
48
  import rt from "@mui/material/IconButton";
49
- import { M as st } from "../ManageIncome-D3n1EWxe.mjs";
49
+ import { M as st } from "../ManageIncome-CQPFKdYB.mjs";
50
50
  const it = I(() => {
51
51
  const { budgets: t } = w(), { totalBudgeted: o } = D(), { incomeTotal: i } = ee(), s = i - o;
52
52
  return /* @__PURE__ */ m(S, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
@@ -17,7 +17,7 @@ import { C as jn } from "../CashflowStore-D9Dpuz7X.mjs";
17
17
  import { b as M } from "../Localization-2MODESHW.mjs";
18
18
  import { M as Ke } from "../MiniWidgetContainer-D0gfmbaF.mjs";
19
19
  import { E as Je } from "../EmptyState-DA_lfRBv.mjs";
20
- import { R as Ze } from "../RecurringSettings-C28GrQcP.mjs";
20
+ import { R as Ze } from "../RecurringSettings-DDaGTnfz.mjs";
21
21
  import et from "@mui/material/Tabs";
22
22
  import Ce from "@mui/material/Tab";
23
23
  import { getUnixTime as U } from "date-fns/getUnixTime";
@@ -35,13 +35,13 @@ import { alpha as ot, keyframes as at } from "@mui/material/styles";
35
35
  import { DataGridPro as it } from "@mui/x-data-grid-pro";
36
36
  import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
37
37
  import G from "@mui/material/Button";
38
- import { M as rt, S as st, i as ct, d as _e, c as lt } from "../ManageIncome-D3n1EWxe.mjs";
38
+ import { M as rt, S as st, i as ct, d as _e, c as lt } from "../ManageIncome-CQPFKdYB.mjs";
39
39
  import { D as Ge } from "../Drawer-kEE73B87.mjs";
40
40
  import { formatISO as dt } from "date-fns/formatISO";
41
41
  import { fromUnixTime as Ie } from "date-fns/fromUnixTime";
42
42
  import { startOfMonth as mt } from "date-fns/startOfMonth";
43
43
  import { subDays as je } from "date-fns/subDays";
44
- import { S as ut, b as ht } from "../TransactionDetails-BWffqew4.mjs";
44
+ import { S as ut, b as ht } from "../TransactionDetails-DW7T0W0z.mjs";
45
45
  import { F as pt, R as De, e as ve } from "../RecurringTransactions-ej39mgA6.mjs";
46
46
  import { h as ft } from "../DateUtil-BcuH7ErC.mjs";
47
47
  import { endOfToday as gt } from "date-fns/endOfToday";
@@ -14,7 +14,7 @@ import { M as bs } from "../MicroWidgetContainer-DpeqN9n3.mjs";
14
14
  import { M as xs } from "../MiniWidgetContainer-D0gfmbaF.mjs";
15
15
  import { A as vs, D as Ds, W as As } from "../WidgetContainer-C88Ecu2W.mjs";
16
16
  import { k as Ts, a as Bs, e as Is, h as Ns, A as Ms, f as ks, l as $s, d as Rs, n as Ps, E as Os, j as Us, N as Ls, i as Gs, P as Hs, o as Fs, S as Ws } from "../ConnectDrawer-DaFRU5st.mjs";
17
- import { C as Ys } from "../CurrencyInput-CsCy7uaS.mjs";
17
+ import { C as Ys } from "../CurrencyInput-DUsQbkXb.mjs";
18
18
  import { L as zs } from "../Loader-DUaFpDGv.mjs";
19
19
  import { R as js } from "../ResponsiveButton-DZFp78fJ.mjs";
20
20
  import { S as Vs } from "../SearchBox-B2_zLv8-.mjs";
@@ -28,10 +28,10 @@ import de from "@mui/material/Tab";
28
28
  import We from "@mui/material/Tabs";
29
29
  import _e from "@mui/material/List";
30
30
  import j from "@mui/material/Divider";
31
- import { M as Ge, I as je, O as ze } from "../OriginalBalanceAction-CAaVbVMO.mjs";
31
+ import { M as Ge, I as je, O as ze } from "../OriginalBalanceAction-CWuVvRq9.mjs";
32
32
  import Xe from "@mui/material/TextField";
33
33
  import { L as J } from "../ListItemAction-DHa3KJPs.mjs";
34
- import { C as ae } from "../CurrencyInput-CsCy7uaS.mjs";
34
+ import { C as ae } from "../CurrencyInput-DUsQbkXb.mjs";
35
35
  import pe from "@mui/material/Alert";
36
36
  import me from "@mui/material/AlertTitle";
37
37
  import he from "@mui/material/Paper";
@@ -30,7 +30,7 @@ import Ue from "@mui/material/AccordionSummary";
30
30
  import Ve from "@mui/material/CardHeader";
31
31
  import { u as Ye } from "../useDimensions-27p2evRx.mjs";
32
32
  import { C as qe } from "../ConnectionsDrawer-DHJ7qdWL.mjs";
33
- import { R as Je } from "../RecurringSettings-C28GrQcP.mjs";
33
+ import { R as Je } from "../RecurringSettings-DDaGTnfz.mjs";
34
34
  import Qe from "@mui/material/TextField";
35
35
  import { u as Ce } from "../useScreenSize-B6JyS_Lj.mjs";
36
36
  import { a as Ze } from "../Dialog-CWW597AF.mjs";
@@ -24,7 +24,7 @@ import { S as Je } from "../StatusBar-BK_uYHAB.mjs";
24
24
  import E from "@mui/material/Divider";
25
25
  import L from "@mui/material/List";
26
26
  import { L as ee } from "../ListItemAction-DHa3KJPs.mjs";
27
- import { C as ke } from "../CurrencyInput-CsCy7uaS.mjs";
27
+ import { C as ke } from "../CurrencyInput-DUsQbkXb.mjs";
28
28
  import { fromUnixTime as Q } from "date-fns/fromUnixTime";
29
29
  import N from "@mui/material/ListItem";
30
30
  import k from "@mui/material/ListItemButton";
@@ -39,10 +39,10 @@ import tt from "@mui/material/Collapse";
39
39
  import nt from "@mui/material/ListItemIcon";
40
40
  import ot from "@mui/material/Checkbox";
41
41
  import { u as at, A as rt } from "../AccountDetailsHeader-vcy67tuH.mjs";
42
- import { A as it } from "../AccountDetailsContent-DfzPOeMI.mjs";
42
+ import { A as it } from "../AccountDetailsContent-bqByD9ea.mjs";
43
43
  import { u as st } from "../useAccountDisplayName-BcRqfar8.mjs";
44
44
  import De from "@mui/material/TextField";
45
- import { M as lt, I as ct, O as dt } from "../OriginalBalanceAction-CAaVbVMO.mjs";
45
+ import { M as lt, I as ct, O as dt } from "../OriginalBalanceAction-CWuVvRq9.mjs";
46
46
  import { getUnixTime as mt } from "date-fns/getUnixTime";
47
47
  import { isValid as ut } from "date-fns/isValid";
48
48
  import { AdapterDateFns as _t } from "@mui/x-date-pickers/AdapterDateFnsV3";
@@ -17,7 +17,7 @@ import P from "@mui/material/Button";
17
17
  import W from "@mui/material/Stack";
18
18
  import { L as w } from "../Loader-DUaFpDGv.mjs";
19
19
  import $ from "@mui/material/IconButton";
20
- import { N as H } from "../NotificationSettings-BRm_EJZV.mjs";
20
+ import { N as H } from "../NotificationSettings-DqrkNMod.mjs";
21
21
  import { D as C } from "../Drawer-kEE73B87.mjs";
22
22
  const yt = (e) => {
23
23
  switch (e) {
@@ -8,8 +8,8 @@ import { startOfToday as ue } from "date-fns/startOfToday";
8
8
  import { subDays as me } from "date-fns/subDays";
9
9
  import ae from "@mui/material/Skeleton";
10
10
  import c from "@mui/material/Stack";
11
- import { R as Ee } from "../RecurringSettings-C28GrQcP.mjs";
12
- import { M as En } from "../RecurringSettings-C28GrQcP.mjs";
11
+ import { R as Ee } from "../RecurringSettings-DDaGTnfz.mjs";
12
+ import { M as En } from "../RecurringSettings-DDaGTnfz.mjs";
13
13
  import { addMonths as ze } from "date-fns/addMonths";
14
14
  import { subMonths as Fe } from "date-fns/subMonths";
15
15
  import { isBefore as Ue } from "date-fns/isBefore";
@@ -41,8 +41,8 @@ import ct from "@mui/material/ListSubheader";
41
41
  import lt from "@mui/material/ListItemAvatar";
42
42
  import dt from "@mui/material/ListItemButton";
43
43
  import ut from "@mui/material/ListItemText";
44
- import { b as mt } from "../ManageIncome-D3n1EWxe.mjs";
45
- import { c as kn, M as Wn, S as $n } from "../ManageIncome-D3n1EWxe.mjs";
44
+ import { b as mt } from "../ManageIncome-CQPFKdYB.mjs";
45
+ import { c as kn, M as Wn, S as $n } from "../ManageIncome-CQPFKdYB.mjs";
46
46
  import { f as L } from "../NumberFormatting-Buh7u8Oi.mjs";
47
47
  import { D as xe } from "../Drawer-kEE73B87.mjs";
48
48
  import { b as N } from "../Localization-2MODESHW.mjs";
@@ -16,8 +16,8 @@ import F from "@mui/material/Box";
16
16
  import Q from "@mui/material/Button";
17
17
  import I from "@mui/material/TextField";
18
18
  import { H3 as J, P as H, Text as x, Icon as M, ChevronRightIcon as xe } from "@mxenabled/mxui";
19
- import { V as ve, a as Ce, N as G } from "../NotificationSettings-BRm_EJZV.mjs";
20
- import { A as Yt, B as qt, I as Qt } from "../NotificationSettings-BRm_EJZV.mjs";
19
+ import { V as ve, a as Ce, N as G } from "../NotificationSettings-DqrkNMod.mjs";
20
+ import { A as Yt, B as qt, I as Qt } from "../NotificationSettings-DqrkNMod.mjs";
21
21
  import { u as k, a as $, s as A, p as De, b as Z, m as ee } from "../hooks-D6XlXHf4.mjs";
22
22
  import { u as L } from "../useScreenSize-B6JyS_Lj.mjs";
23
23
  import { a as W } from "../Dialog-CWW597AF.mjs";
@@ -20,7 +20,7 @@ import { D as bt } from "../Donut-1UMNcG67.mjs";
20
20
  import { L as F } from "../Loader-DUaFpDGv.mjs";
21
21
  import { M as St } from "../MiniWidgetContainer-D0gfmbaF.mjs";
22
22
  import { startOfToday as U } from "date-fns/startOfToday";
23
- import { T as Tt, a as Mt } from "../TransactionDetails-BWffqew4.mjs";
23
+ import { T as Tt, a as Mt } from "../TransactionDetails-DW7T0W0z.mjs";
24
24
  import Dt from "@mui/material/Collapse";
25
25
  import B from "@mui/material/Divider";
26
26
  import q from "@mui/material/List";
@@ -1,6 +1,6 @@
1
1
  import { T as Ta } from "../TransactionApi-B3Tksf7L.mjs";
2
- import { u as B, C as Be, D as $e, M as Ve, c as We, T as Ge, a as Ue } from "../TransactionDetails-BWffqew4.mjs";
3
- import { B as Sa, d as xa, b as wa } from "../TransactionDetails-BWffqew4.mjs";
2
+ import { u as B, C as Be, D as $e, M as Ve, c as We, T as Ge, a as Ue } from "../TransactionDetails-DW7T0W0z.mjs";
3
+ import { B as Sa, d as xa, b as wa } from "../TransactionDetails-DW7T0W0z.mjs";
4
4
  import { T as M } from "../User-BQUxBeZV.mjs";
5
5
  import { O as Ia } from "../User-BQUxBeZV.mjs";
6
6
  import { S as ae, D as Fe } from "../TransactionStore-DxPLdF3B.mjs";
@@ -9,16 +9,16 @@ import { e as ze } from "../exportTransactionsToCSV-7bVS7KXf.mjs";
9
9
  import { E as Oa } from "../ExportCsvAction-sX8Rg4Ov.mjs";
10
10
  import { jsxs as _, jsx as e } from "react/jsx-runtime";
11
11
  import c from "react";
12
- import { observer as S } from "mobx-react-lite";
12
+ import { observer as x } from "mobx-react-lite";
13
13
  import Ke from "@mui/material/Paper";
14
14
  import { DataGridPro as qe } from "@mui/x-data-grid-pro";
15
15
  import T from "@mui/material/Box";
16
16
  import { useTheme as je } from "@mui/material/styles";
17
17
  import { Text as C, Icon as P, MerchantLogo as Xe, TextField as ne, P as Ye } from "@mxenabled/mxui";
18
- import { h as $, u as x, b as j, d as se, m as Je, a as Qe, g as Ze, p as et } from "../hooks-D6XlXHf4.mjs";
18
+ import { h as $, u as w, b as j, d as se, m as Je, a as Qe, g as Ze, p as et } from "../hooks-D6XlXHf4.mjs";
19
19
  import { fromUnixTime as tt } from "date-fns/fromUnixTime";
20
20
  import { f as at, D as nt, a as ie } from "../Dialog-CWW597AF.mjs";
21
- import D from "@mui/material/Stack";
21
+ import N from "@mui/material/Stack";
22
22
  import { f as ce } from "../NumberFormatting-Buh7u8Oi.mjs";
23
23
  import { L as X } from "../Loader-DUaFpDGv.mjs";
24
24
  import { endOfMonth as ot } from "date-fns/endOfMonth";
@@ -31,10 +31,10 @@ import lt from "@mui/material/Divider";
31
31
  import dt from "@mui/material/MenuItem";
32
32
  import ut from "@mui/material/RadioGroup";
33
33
  import { ExpandMore as mt } from "@mxenabled/mx-icons";
34
- import { C as _t } from "../CurrencyInput-CsCy7uaS.mjs";
34
+ import { C as _t } from "../CurrencyInput-DUsQbkXb.mjs";
35
35
  import { a as pt, u as gt } from "../CategorySelectorDrawer-DUe4lH5-.mjs";
36
36
  import { b as q } from "../Localization-2MODESHW.mjs";
37
- import { A, W as ht } from "../WidgetContainer-C88Ecu2W.mjs";
37
+ import { A as S, W as ht } from "../WidgetContainer-C88Ecu2W.mjs";
38
38
  import { u as ft } from "../useScreenSize-B6JyS_Lj.mjs";
39
39
  import { S as Ct } from "../SearchBox-B2_zLv8-.mjs";
40
40
  import { D as oe } from "../Drawer-kEE73B87.mjs";
@@ -42,18 +42,18 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
42
42
  `${t.row.account}`,
43
43
  t.row.number && ` | ${t.row.number}`
44
44
  ] }), bt = (t) => {
45
- const { associatedBeats: r } = $(), { showInsights: n } = B(), { amount: a, transaction_type: i } = t.row, l = r.find((p) => p.associated_transaction_guid === t.row.guid), d = i === M.CREDIT;
46
- return /* @__PURE__ */ _(D, { alignItems: "flex-end", tabIndex: t.tabIndex, children: [
45
+ const { associatedBeats: r } = $(), { showInsights: o } = B(), { amount: a, transaction_type: i } = t.row, l = r.find((p) => p.associated_transaction_guid === t.row.guid), d = i === M.CREDIT;
46
+ return /* @__PURE__ */ _(N, { alignItems: "flex-end", tabIndex: t.tabIndex, children: [
47
47
  /* @__PURE__ */ _(C, { color: d ? "success.main" : "text.primary", variant: "Small", children: [
48
48
  d ? "+" : "",
49
49
  ce(a, "0,0.00")
50
50
  ] }),
51
- l && n && /* @__PURE__ */ e(C, { bold: !0, color: "primary.light", variant: "XSmall", children: l.short_title })
51
+ l && o && /* @__PURE__ */ e(C, { bold: !0, color: "primary.light", variant: "XSmall", children: l.short_title })
52
52
  ] });
53
53
  }, Tt = (t) => {
54
- const { transactions: r } = x(), [n, a] = c.useState(!1);
54
+ const { transactions: r } = w(), [o, a] = c.useState(!1);
55
55
  return /* @__PURE__ */ _(
56
- D,
56
+ N,
57
57
  {
58
58
  alignItems: "center",
59
59
  direction: "row",
@@ -65,16 +65,16 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
65
65
  children: [
66
66
  t.row.has_been_split && /* @__PURE__ */ e(P, { name: "call_split", size: 16 }),
67
67
  /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: t.row.has_been_split ? r.split_transaction_category_label : t.row.category }),
68
- !t.row.has_been_split && n && /* @__PURE__ */ e(P, { name: "edit", sx: { color: "action.active" } })
68
+ !t.row.has_been_split && o && /* @__PURE__ */ e(P, { name: "edit", sx: { color: "action.active" } })
69
69
  ]
70
70
  }
71
71
  );
72
- }, At = S(Tt), St = (t) => /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: at(tt(t.row.date), nt.MONTH_DAY) }), xt = (t) => {
73
- const r = je(), { transactions: n } = x(), { is_flagged: a, is_hidden: i, has_been_viewed: l, parent_guid: d } = t.row, g = !l && !!!d;
72
+ }, At = x(Tt), St = (t) => /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: at(tt(t.row.date), nt.MONTH_DAY) }), xt = (t) => {
73
+ const r = je(), { transactions: o } = w(), { is_flagged: a, is_hidden: i, has_been_viewed: l, parent_guid: d } = t.row, g = !l && !!!d;
74
74
  return /* @__PURE__ */ _(
75
75
  T,
76
76
  {
77
- "aria-label": i ? n.is_hidden : n.is_flagged,
77
+ "aria-label": i ? o.is_hidden : o.is_flagged,
78
78
  tabIndex: t.tabIndex,
79
79
  children: [
80
80
  a && /* @__PURE__ */ e(P, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
@@ -97,7 +97,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
97
97
  ]
98
98
  }
99
99
  );
100
- }, wt = S(xt), O = (t) => /* @__PURE__ */ e(C, { fontWeight: 600, variant: "Small", children: t.colDef.headerName }), vt = (t) => /* @__PURE__ */ _(D, { alignItems: "center", direction: "row", gap: 8, children: [
100
+ }, wt = x(xt), O = (t) => /* @__PURE__ */ e(C, { fontWeight: 600, variant: "Small", children: t.colDef.headerName }), vt = (t) => /* @__PURE__ */ _(N, { alignItems: "center", direction: "row", gap: 8, children: [
101
101
  /* @__PURE__ */ e(
102
102
  Xe,
103
103
  {
@@ -109,28 +109,28 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
109
109
  ] }), It = ({
110
110
  height: t = "100dvh",
111
111
  onCategoryClick: r,
112
- onRowClick: n
112
+ onRowClick: o
113
113
  }) => {
114
- const { transactions: a } = x(), { isCopyLoaded: i } = j(), { isLoading: l, sortedTransactions: d } = $(), { clearExpandedSplits: p, toggleSplit: g } = B();
114
+ const { transactions: a } = w(), { isCopyLoaded: i } = j(), { isLoading: l, sortedTransactions: d } = $(), { clearExpandedSplits: p, toggleSplit: g } = B();
115
115
  c.useEffect(() => () => p(), []);
116
116
  const f = c.useMemo(
117
- () => d.map((o) => ({
118
- id: o.guid,
117
+ () => d.map((n) => ({
118
+ id: n.guid,
119
119
  isHovering: !1,
120
- ...o
120
+ ...n
121
121
  })),
122
122
  [d]
123
- ), m = ({ row: { id: o, guid: h, has_been_split: N }, field: E }) => N ? g(o) : E === "category" ? r?.(h) : n?.(h);
123
+ ), m = ({ row: { id: n, guid: h, has_been_split: A }, field: E }) => A ? g(n) : E === "category" ? r?.(h) : o?.(h);
124
124
  if (!i)
125
125
  return /* @__PURE__ */ e(X, {});
126
- const w = [
126
+ const v = [
127
127
  {
128
128
  field: "flag",
129
129
  headerName: "",
130
130
  minWidth: 32,
131
131
  width: 32,
132
132
  sortable: !1,
133
- renderCell: (o) => /* @__PURE__ */ e(wt, { ...o }),
133
+ renderCell: (n) => /* @__PURE__ */ e(wt, { ...n }),
134
134
  renderHeader: () => /* @__PURE__ */ e("span", { "aria-label": a.transaction_status, role: "presentation" })
135
135
  },
136
136
  {
@@ -138,7 +138,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
138
138
  headerName: a.date_title,
139
139
  width: 103,
140
140
  renderHeader: O,
141
- renderCell: (o) => o.row.parent_guid ? null : /* @__PURE__ */ e(St, { ...o }),
141
+ renderCell: (n) => n.row.parent_guid ? null : /* @__PURE__ */ e(St, { ...n }),
142
142
  sortingOrder: ["desc", "asc"]
143
143
  },
144
144
  {
@@ -155,7 +155,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
155
155
  headerName: a.category_title,
156
156
  flex: 0.25,
157
157
  renderHeader: O,
158
- renderCell: (o) => /* @__PURE__ */ e(At, { ...o }),
158
+ renderCell: (n) => /* @__PURE__ */ e(At, { ...n }),
159
159
  sortingOrder: ["asc", "desc"]
160
160
  },
161
161
  {
@@ -163,7 +163,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
163
163
  headerName: a.account_title,
164
164
  flex: 0.33,
165
165
  renderHeader: O,
166
- renderCell: (o) => o.row.parent_guid ? null : /* @__PURE__ */ e(yt, { ...o }),
166
+ renderCell: (n) => n.row.parent_guid ? null : /* @__PURE__ */ e(yt, { ...n }),
167
167
  sortingOrder: ["asc", "desc"]
168
168
  },
169
169
  {
@@ -180,10 +180,10 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
180
180
  return /* @__PURE__ */ e(Ke, { sx: { height: t, px: 24, width: "100%", boxShadow: "none" }, children: /* @__PURE__ */ e(
181
181
  qe,
182
182
  {
183
- columns: w,
183
+ columns: v,
184
184
  disableColumnFilter: !0,
185
185
  disableColumnMenu: !0,
186
- getCellClassName: (o) => o.row.parent_guid ? "split-row" : "",
186
+ getCellClassName: (n) => n.row.parent_guid ? "split-row" : "",
187
187
  hideFooter: !0,
188
188
  initialState: { sorting: { sortModel: [{ field: "date", sort: "desc" }] } },
189
189
  loading: l,
@@ -197,8 +197,8 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
197
197
  }
198
198
  }
199
199
  ) });
200
- }, Dt = S(It), Nt = ({ copy: t, isOpen: r, onClose: n, onPrimaryAction: a }) => {
201
- const { common: i, transactions: l } = x(), { isCopyLoaded: d } = j();
200
+ }, Dt = x(It), Nt = ({ copy: t, isOpen: r, onClose: o, onPrimaryAction: a }) => {
201
+ const { common: i, transactions: l } = w(), { isCopyLoaded: d } = j();
202
202
  return d ? /* @__PURE__ */ _(
203
203
  ie,
204
204
  {
@@ -206,7 +206,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
206
206
  title: t.title
207
207
  },
208
208
  isOpen: r,
209
- onClose: n,
209
+ onClose: o,
210
210
  onPrimaryAction: a,
211
211
  primaryText: l.add_manual_account,
212
212
  secondaryText: i.cancel_button,
@@ -216,31 +216,31 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
216
216
  ]
217
217
  }
218
218
  ) : /* @__PURE__ */ e(X, {});
219
- }, Et = S(Nt), Ot = () => {
220
- const { visibleAccounts: t } = se(), { common: r, transactions: n } = x(), { manualTransaction: a, setIsAmountValid: i, updateManualTransaction: l } = B(), [d, p] = c.useState(""), [g, f] = c.useState(""), m = c.useMemo(
219
+ }, Et = x(Nt), Ot = () => {
220
+ const { visibleAccounts: t } = se(), { common: r, transactions: o } = w(), { manualTransaction: a, setIsAmountValid: i, updateManualTransaction: l } = B(), [d, p] = c.useState(""), [g, f] = c.useState(""), m = c.useMemo(
221
221
  () => t.filter((s) => s.is_manual),
222
222
  [t]
223
223
  ).map((s) => ({
224
224
  label: `${s.name} | ${ce(s.balance, "0,0.00")}`,
225
225
  value: s.guid
226
- })), w = {
226
+ })), v = {
227
227
  error_amount_is_invalid: r.currency_input.error_amount_is_invalid,
228
228
  error_amount_must_be_equal_to: r.currency_input.error_amount_must_be_equal_to,
229
229
  error_amount_must_be_less_than_or_equal_to: r.currency_input.error_amount_must_be_less_than_or_equal_to,
230
230
  enter_amount: r.currency_input.enter_amount
231
- }, o = (s) => {
231
+ }, n = (s) => {
232
232
  p(s), l({ ...a, amount: Number(s) });
233
233
  }, h = (s, k) => {
234
234
  l({ ...a, transaction_type: Number(k) });
235
- }, N = (s) => {
235
+ }, A = (s) => {
236
236
  f(s), l({ ...a, payee: s, description: s });
237
237
  }, E = (s) => {
238
238
  l({ ...a, account_guid: s });
239
239
  };
240
240
  return /* @__PURE__ */ _(T, { className: "mx-txn-manual-transaction-details", children: [
241
- /* @__PURE__ */ _(D, { gap: 40, mx: 24, my: 32, children: [
241
+ /* @__PURE__ */ _(N, { gap: 40, mx: 24, my: 32, children: [
242
242
  /* @__PURE__ */ _(
243
- D,
243
+ N,
244
244
  {
245
245
  direction: "row",
246
246
  sx: { flexDirection: { xs: "column", sm: "row" }, gap: { xs: 40, sm: 8 } },
@@ -250,26 +250,26 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
250
250
  {
251
251
  allowDecimals: !0,
252
252
  amount: d,
253
- ariaLabel: n.amount_title,
254
- copy: w,
253
+ ariaLabel: o.amount_title,
254
+ copy: v,
255
255
  inputProps: {
256
256
  noValidate: !0
257
257
  },
258
- label: n.amount_title,
259
- setAmount: o,
258
+ label: o.amount_title,
259
+ setAmount: n,
260
260
  setHasValidInput: i,
261
261
  sx: { bgcolor: "background.paper" },
262
262
  type: "number"
263
263
  }
264
264
  ),
265
- /* @__PURE__ */ e(ut, { name: "TransactionType", onChange: h, row: !0, children: /* @__PURE__ */ _(D, { alignItems: "center", direction: "row", children: [
265
+ /* @__PURE__ */ e(ut, { name: "TransactionType", onChange: h, row: !0, children: /* @__PURE__ */ _(N, { alignItems: "center", direction: "row", children: [
266
266
  /* @__PURE__ */ e(
267
267
  ae,
268
268
  {
269
269
  checked: a.transaction_type === M.CREDIT,
270
- label: n.manual_transaction_credit_button_label,
270
+ label: o.manual_transaction_credit_button_label,
271
271
  sx: { ml: { xs: 0, sm: 8 } },
272
- tooltip: n.manual_transaction_credit_button_tooltip,
272
+ tooltip: o.manual_transaction_credit_button_tooltip,
273
273
  value: M.CREDIT
274
274
  }
275
275
  ),
@@ -277,8 +277,8 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
277
277
  ae,
278
278
  {
279
279
  checked: a.transaction_type === M.DEBIT,
280
- label: n.manual_transaction_debit_button_label,
281
- tooltip: n.manual_transaction_debit_button_tooltip,
280
+ label: o.manual_transaction_debit_button_label,
281
+ tooltip: o.manual_transaction_debit_button_tooltip,
282
282
  value: M.DEBIT
283
283
  }
284
284
  )
@@ -289,9 +289,9 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
289
289
  /* @__PURE__ */ e(
290
290
  ne,
291
291
  {
292
- label: n.payee_title,
292
+ label: o.payee_title,
293
293
  name: "payee",
294
- onChange: (s) => N(s.target.value),
294
+ onChange: (s) => A(s.target.value),
295
295
  sx: { bgcolor: "background.paper" },
296
296
  value: g
297
297
  }
@@ -301,9 +301,9 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
301
301
  {
302
302
  InputLabelProps: { shrink: !0 },
303
303
  SelectProps: { defaultValue: -1, IconComponent: mt },
304
- label: n.manual_transaction_select_an_account,
304
+ label: o.manual_transaction_select_an_account,
305
305
  onChange: (s) => E(s.target.value),
306
- placeholder: n.manual_transaction_select,
306
+ placeholder: o.manual_transaction_select,
307
307
  select: !0,
308
308
  sx: { bgcolor: "background.paper" },
309
309
  children: m.map((s) => /* @__PURE__ */ e(dt, { value: s.value, children: s.label }, s.value))
@@ -318,12 +318,12 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
318
318
  /* @__PURE__ */ e(We, { transaction: a })
319
319
  ] })
320
320
  ] });
321
- }, Mt = S(Ot), kt = ({ onClose: t, transaction: r }) => {
322
- const { addOrUpdateTransactionRule: n, updateTransaction: a } = $(), { transactions: i } = x(), { categories: l } = Je(), [d, p] = c.useState(""), g = c.useMemo(
321
+ }, Mt = x(Ot), kt = ({ onClose: t, transaction: r }) => {
322
+ const { addOrUpdateTransactionRule: o, updateTransaction: a } = $(), { transactions: i } = w(), { categories: l } = Je(), [d, p] = c.useState(""), g = c.useMemo(
323
323
  () => l.find((m) => m.guid === d),
324
324
  [d]
325
325
  ), f = async (m) => {
326
- await a({ ...r, category_guid: d }), m && await n(d, r), p(""), t();
326
+ await a({ ...r, category_guid: d }), m && await o(d, r), p(""), t();
327
327
  };
328
328
  return /* @__PURE__ */ _(T, { className: "mx-txn-edit-category-action", children: [
329
329
  /* @__PURE__ */ e(
@@ -359,9 +359,9 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
359
359
  }
360
360
  )
361
361
  ] });
362
- }, Lt = S(kt), Rt = (t = "polite") => {
363
- const [r, n] = c.useState(""), [a, i] = c.useState(t), l = c.useCallback((p, g) => {
364
- g && i(g), n(p);
362
+ }, Lt = x(kt), Rt = (t = "polite") => {
363
+ const [r, o] = c.useState(""), [a, i] = c.useState(t), l = c.useCallback((p, g) => {
364
+ g && i(g), o(p);
365
365
  }, []), d = c.useMemo(
366
366
  () => /* @__PURE__ */ e(
367
367
  T,
@@ -390,12 +390,12 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
390
390
  }, re = 120, Ht = ({
391
391
  onBackClick: t,
392
392
  height: r = "100dvh",
393
- showInsights: n = !1,
393
+ showInsights: o = !1,
394
394
  sx: a = {}
395
395
  }) => {
396
- const { visibleAccounts: i, refreshAccounts: l } = se(), { is_mobile_webview: d, clientConfig: p, config: g } = Qe(), { setSearchValue: f } = gt(), { onEvent: m } = Ze(), { common: w, transactions: o } = x(), {
396
+ const { visibleAccounts: i, refreshAccounts: l } = se(), { is_mobile_webview: d, clientConfig: p, config: g } = Qe(), { setSearchValue: f } = gt(), { onEvent: m } = Ze(), { common: v, transactions: n } = w(), {
397
397
  displayedDateRange: h,
398
- isCopyLoaded: N,
398
+ isCopyLoaded: A,
399
399
  isInitialized: E,
400
400
  selectedAccountGuids: s,
401
401
  setDisplayedDate: k,
@@ -417,30 +417,30 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
417
417
  setSearchValue: be,
418
418
  setShowInsights: Te,
419
419
  updateManualTransaction: Ae
420
- } = B(), { userProfile: Se } = et(), [G, y] = c.useState(""), [J, H] = c.useState(""), [xe, U] = c.useState(!1), [we, Q] = c.useState(!1), [F, ve] = c.useState(!1), { announce: Ie, ariaLive: De } = Rt(), v = p?.transactions?.selected_account_guid;
420
+ } = B(), { userProfile: Se } = et(), [G, y] = c.useState(""), [J, H] = c.useState(""), [xe, U] = c.useState(!1), [we, Q] = c.useState(!1), [F, ve] = c.useState(!1), { announce: Ie, ariaLive: De } = Rt(), I = p?.transactions?.selected_account_guid;
421
421
  c.useEffect(() => {
422
- const u = v ? [{ guid: v }] : i.filter((I) => !I.is_hidden), ee = st(K()), te = ot(K());
423
- v || le(u), k(ee, te), V({
424
- accounts: u.map((I) => I.guid),
425
- custom: (I) => !I.accountIsClosed && !I.accountIsHidden,
422
+ const u = I ? [{ guid: I }] : i.filter((D) => !D.is_hidden), ee = st(K()), te = ot(K());
423
+ I || le(u), k(ee, te), V({
424
+ accounts: u.map((D) => D.guid),
425
+ custom: (D) => !D.accountIsClosed && !D.accountIsHidden,
426
426
  dateRange: { start: ee, end: te }
427
- }), ve(!0), m(A.TRANSACTIONS_VIEW);
427
+ }), ve(!0), m(S.TRANSACTIONS_VIEW);
428
428
  }, [i]), c.useEffect(() => {
429
429
  F && (V({
430
430
  ...Y,
431
- accounts: v ? [v] : s,
431
+ accounts: I ? [I] : s,
432
432
  dateRange: { start: h.start, end: h.end }
433
433
  }), _e(h.start).finally());
434
434
  }, [F, h, s]), c.useEffect(() => {
435
- Te(n);
436
- }, [n]), c.useEffect(() => {
437
- Ie(
435
+ Te(o);
436
+ }, [o]), c.useEffect(() => {
437
+ A && n.showing_transactions_count && Ie(
438
438
  q(
439
- o.showing_transactions_count,
439
+ n.showing_transactions_count,
440
440
  W.length
441
441
  )
442
442
  );
443
- }, [h, s, W]);
443
+ }, [A, h, s, W, n]);
444
444
  const Ne = c.useMemo(
445
445
  () => i.filter((u) => u.is_manual),
446
446
  [i]
@@ -450,9 +450,9 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
450
450
  be(u), V({
451
451
  ...Y,
452
452
  searchTerm: u
453
- }), m(A.TRANSACTIONS_CLICK_SEARCH, { search_term: u });
453
+ }), m(S.TRANSACTIONS_CLICK_SEARCH, { search_term: u });
454
454
  }, Me = () => {
455
- ze(W, pe), m(A.TRANSACTIONS_CLICK_EXPORT);
455
+ ze(W, pe), m(S.TRANSACTIONS_CLICK_EXPORT);
456
456
  }, ke = () => {
457
457
  Ne.length > 0 ? (Ae({
458
458
  ...Fe,
@@ -461,7 +461,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
461
461
  }), y(
462
462
  "addTransaction"
463
463
  /* AddTransaction */
464
- ), m(A.TRANSACTIONS_CLICK_ADD)) : (U(!0), m(A.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
464
+ ), m(S.TRANSACTIONS_CLICK_ADD)) : (U(!0), m(S.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
465
465
  }, Le = async () => {
466
466
  Z && await me(R), y("");
467
467
  }, Re = () => {
@@ -471,36 +471,36 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
471
471
  }, Pe = async () => {
472
472
  b && !b.has_been_viewed && await he({ ...b, has_been_viewed: !0 }), y("");
473
473
  };
474
- if (!N || !E || !F)
474
+ if (!A || !E || !F)
475
475
  return /* @__PURE__ */ e(X, {});
476
476
  const z = [];
477
477
  return !d && (de || ue) && z.push({
478
478
  iconName: "open_in_new",
479
- label: o.export_csv_btn,
479
+ label: n.export_csv_btn,
480
480
  onClick: Me
481
481
  }), g.show_connections_widget_in_master && z.push({
482
482
  iconName: "add",
483
- label: o.add_transaction_btn,
483
+ label: n.add_transaction_btn,
484
484
  onClick: ke
485
485
  }), /* @__PURE__ */ _(
486
486
  ht,
487
487
  {
488
- ...!v && { accountOptions: i },
488
+ ...!I && { accountOptions: i },
489
489
  actions: z,
490
490
  calendarActions: {
491
491
  onRangeChanged: Ee
492
492
  },
493
- onAccountsFilterClick: () => m(A.ACCOUNTS_CLICK_FILTER),
493
+ onAccountsFilterClick: () => m(S.ACCOUNTS_CLICK_FILTER),
494
494
  onBackClick: t,
495
495
  sx: a,
496
- title: o.transactions_title,
496
+ title: n.transactions_title,
497
497
  children: [
498
498
  De,
499
499
  /* @__PURE__ */ e(T, { mt: 16, children: /* @__PURE__ */ e(
500
500
  Ct,
501
501
  {
502
502
  onChange: Oe,
503
- placeholder: o.action_bar_search_placeholder,
503
+ placeholder: n.action_bar_search_placeholder,
504
504
  searchValue: ye
505
505
  }
506
506
  ) }),
@@ -525,7 +525,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
525
525
  H(u), y(
526
526
  "transaction"
527
527
  /* Transaction */
528
- ), m(A.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: u });
528
+ ), m(S.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: u });
529
529
  }
530
530
  }
531
531
  )
@@ -549,7 +549,7 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
549
549
  );
550
550
  },
551
551
  showHiddenTransactions: !0,
552
- showInsights: n
552
+ showInsights: o
553
553
  }
554
554
  )
555
555
  }
@@ -557,10 +557,10 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
557
557
  /* @__PURE__ */ e(
558
558
  oe,
559
559
  {
560
- ariaLabelClose: w.close_aria,
560
+ ariaLabelClose: v.close_aria,
561
561
  isOpen: G === "transaction" && !!b,
562
562
  onClose: Pe,
563
- title: o.details_title,
563
+ title: n.details_title,
564
564
  children: b && /* @__PURE__ */ e(Ue, { transaction: b })
565
565
  }
566
566
  ),
@@ -576,19 +576,19 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
576
576
  /* @__PURE__ */ e(
577
577
  oe,
578
578
  {
579
- ariaLabelClose: w.close_aria,
579
+ ariaLabelClose: v.close_aria,
580
580
  isOpen: G === "addTransaction",
581
581
  isPrimaryDisabled: !Z,
582
582
  onClose: () => y(""),
583
583
  onPrimaryAction: Le,
584
- title: o.add_transaction_title,
584
+ title: n.add_transaction_title,
585
585
  children: /* @__PURE__ */ e(Mt, {})
586
586
  }
587
587
  ),
588
588
  /* @__PURE__ */ e(
589
589
  Et,
590
590
  {
591
- copy: { title: o.add_manual_account },
591
+ copy: { title: n.add_manual_account },
592
592
  isOpen: xe,
593
593
  onClose: () => {
594
594
  U(!1);
@@ -601,13 +601,13 @@ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
601
601
  {
602
602
  onClose: He,
603
603
  showConnectWidget: we,
604
- title: o.add_manual_account
604
+ title: n.add_manual_account
605
605
  }
606
606
  )
607
607
  ]
608
608
  }
609
609
  );
610
- }, Ca = S(Ht);
610
+ }, Ca = x(Ht);
611
611
  export {
612
612
  Et as AddAccountModal,
613
613
  Sa as BottomActions,
@@ -22,7 +22,7 @@ import { H as Ie } from "../HeaderCell-DjuifqHJ.mjs";
22
22
  import { T as M, b as ft } from "../ViewMoreMicroCard-SCn2wt4i.mjs";
23
23
  import { A as _, W as ke } from "../WidgetContainer-C88Ecu2W.mjs";
24
24
  import { c as Tt } from "../Category-CevNQ03n.mjs";
25
- import { a as Ne, T as He } from "../TransactionDetails-BWffqew4.mjs";
25
+ import { a as Ne, T as He } from "../TransactionDetails-DW7T0W0z.mjs";
26
26
  import { D as Ce } from "../Drawer-kEE73B87.mjs";
27
27
  import { L as Q } from "../Loader-DUaFpDGv.mjs";
28
28
  import { useTheme as We } from "@mui/material/styles";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.2.10",
3
+ "version": "7.2.12",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -1,83 +0,0 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import a from "react";
3
- import { css as q } from "@mxenabled/cssinjs";
4
- import { v4 as B } from "uuid";
5
- import { useTokens as O, TextField as W, P as p } from "@mxenabled/mxui";
6
- import { b as _, g as d } from "./Localization-2MODESHW.mjs";
7
- import { g as j, C as D, f as y, M as C } from "./NumberFormatting-Buh7u8Oi.mjs";
8
- import { u as F } from "./hooks-D6XlXHf4.mjs";
9
- const G = ({
10
- allowDecimals: o = !0,
11
- ariaLabel: g,
12
- amount: c,
13
- amountIsRequired: b = !0,
14
- copy: i,
15
- customValidate: h = () => !0,
16
- errorText: M = "",
17
- label: $,
18
- minAmount: u = 1,
19
- setAmount: S,
20
- setHasValidInput: r,
21
- ...x
22
- }) => {
23
- const [f, t] = a.useState(""), { common: N } = F(), n = i || N.currency_input, T = O(), k = L(T), P = /^[0-9]*$/, R = /^(\d)*(\,)?([0-9]{1,2})?$/, A = /^(\d)*(\.)?([0-9]{1,2})?$/;
24
- let s;
25
- const E = a.useRef(B());
26
- if (o)
27
- switch (j()) {
28
- case D.CAD:
29
- s = R;
30
- break;
31
- default:
32
- s = A;
33
- break;
34
- }
35
- else
36
- s = P;
37
- a.useEffect(() => {
38
- l(c);
39
- }, [c]);
40
- const l = (e) => {
41
- !b && (e === "" || e === "." || e === ",") ? (t(""), r?.(!1)) : Number(e) < u ? (t(
42
- _(
43
- n.error_amount_must_be_equal_to,
44
- y(u, "0")
45
- )
46
- ), r?.(!1)) : Number(e) > C ? (t(
47
- _(
48
- n.error_amount_must_be_less_than_or_equal_to,
49
- y(C, o ? "0,0.00" : "0,0", Math.floor)
50
- )
51
- ), r?.(!1)) : e.toString().match(s) ? h() ? (t(""), r?.(!0)) : (t(M), r?.(!1)) : (t(n.error_amount_is_invalid), r?.(!1)), S(e.toString());
52
- };
53
- return /* @__PURE__ */ m(
54
- W,
55
- {
56
- InputProps: {
57
- endAdornment: d().includes("fr-ca") ? /* @__PURE__ */ m(p, { children: "$" }) : void 0,
58
- startAdornment: d().includes("fr-ca") ? void 0 : /* @__PURE__ */ m(p, { children: "$" })
59
- },
60
- "aria-label": g || n.enter_amount,
61
- className: `mx-cmn-currency-input ${k}`,
62
- error: !!f,
63
- helperText: f,
64
- inputMode: o ? "decimal" : "numeric",
65
- inputProps: {
66
- noValidate: !0,
67
- pattern: "[0-9]*"
68
- },
69
- label: $,
70
- name: `currency-input-${E.current}`,
71
- onChange: (e) => l(e.target.value),
72
- value: c,
73
- ...x
74
- }
75
- );
76
- }, L = (o) => q({
77
- "& .MuiInputBase-adornedStart > .p": {
78
- marginRight: o.Spacing.Tiny
79
- }
80
- }), Q = G;
81
- export {
82
- Q as C
83
- };