@mx-cartographer/experiences 7.2.9 → 7.2.10

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,7 @@
1
+ ## [7.2.10] - 11-18-2025
2
+
3
+ - **FIXED** - transactions widget to announce dynamic updates via aria live region
4
+
1
5
  ## [7.2.9] - 11-17-2025
2
6
 
3
7
  - **UPDATED** - components directory `microinsights`
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ export type AriaLivePoliteness = 'polite' | 'assertive';
3
+ interface UseAriaLiveResult {
4
+ announce: (message: string, politeness?: AriaLivePoliteness) => void;
5
+ ariaLive: React.ReactElement | null;
6
+ }
7
+ export declare const useAriaLive: (initialPoliteness?: AriaLivePoliteness) => UseAriaLiveResult;
8
+ export default useAriaLive;
@@ -44,6 +44,7 @@ export interface TransactionsCopy {
44
44
  memo_desc_aria: string;
45
45
  memo_title: string;
46
46
  merchant_logo_desc: string;
47
+ showing_transactions_count: string;
47
48
  merchant_logo_modal_desc: string;
48
49
  merchant_logo_modal_desc_bold: string;
49
50
  merchant_logo_modal_title: string;
@@ -1,57 +1,57 @@
1
- import { T as Ca } from "../TransactionApi-B3Tksf7L.mjs";
2
- import { u as P, C as He, D as Be, M as Pe, c as $e, T as Ve, a as We } from "../TransactionDetails-BWffqew4.mjs";
3
- import { B as ba, d as Ta, b as Aa } from "../TransactionDetails-BWffqew4.mjs";
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";
4
4
  import { T as M } from "../User-BQUxBeZV.mjs";
5
- import { O as xa } from "../User-BQUxBeZV.mjs";
6
- import { S as ee, D as Ge } from "../TransactionStore-DxPLdF3B.mjs";
7
- import { T as Ia } from "../TransactionStore-DxPLdF3B.mjs";
8
- import { e as Ue } from "../exportTransactionsToCSV-7bVS7KXf.mjs";
9
- import { E as Da } from "../ExportCsvAction-sX8Rg4Ov.mjs";
5
+ import { O as Ia } from "../User-BQUxBeZV.mjs";
6
+ import { S as ae, D as Fe } from "../TransactionStore-DxPLdF3B.mjs";
7
+ import { T as Na } from "../TransactionStore-DxPLdF3B.mjs";
8
+ import { e as ze } from "../exportTransactionsToCSV-7bVS7KXf.mjs";
9
+ import { E as Oa } from "../ExportCsvAction-sX8Rg4Ov.mjs";
10
10
  import { jsxs as _, jsx as e } from "react/jsx-runtime";
11
- import m from "react";
11
+ import c from "react";
12
12
  import { observer as S } from "mobx-react-lite";
13
- import Fe from "@mui/material/Paper";
14
- import { DataGridPro as ze } from "@mui/x-data-grid-pro";
15
- import A from "@mui/material/Box";
16
- import { useTheme as Ke } from "@mui/material/styles";
17
- import { Text as C, Icon as B, MerchantLogo as qe, TextField as te, P as je } from "@mxenabled/mxui";
18
- import { h as $, u as x, b as K, d as re, m as Xe, a as Ye, g as Je, p as Qe } from "../hooks-D6XlXHf4.mjs";
19
- import { fromUnixTime as Ze } from "date-fns/fromUnixTime";
20
- import { f as et, D as tt, a as se } from "../Dialog-CWW597AF.mjs";
13
+ import Ke from "@mui/material/Paper";
14
+ import { DataGridPro as qe } from "@mui/x-data-grid-pro";
15
+ import T from "@mui/material/Box";
16
+ import { useTheme as je } from "@mui/material/styles";
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";
19
+ import { fromUnixTime as tt } from "date-fns/fromUnixTime";
20
+ import { f as at, D as nt, a as ie } from "../Dialog-CWW597AF.mjs";
21
21
  import D from "@mui/material/Stack";
22
- import { f as ie } from "../NumberFormatting-Buh7u8Oi.mjs";
23
- import { L as q } from "../Loader-DUaFpDGv.mjs";
24
- import { endOfMonth as at } from "date-fns/endOfMonth";
25
- import { getUnixTime as nt } from "date-fns/getUnixTime";
26
- import { startOfMonth as ot } from "date-fns/startOfMonth";
27
- import { startOfToday as z } from "date-fns/startOfToday";
28
- import rt from "@mui/material/styles/useTheme";
29
- import { l as st } from "../ConnectDrawer-DaFRU5st.mjs";
30
- import it from "@mui/material/Divider";
31
- import ct from "@mui/material/MenuItem";
32
- import lt from "@mui/material/RadioGroup";
33
- import { ExpandMore as dt } from "@mxenabled/mx-icons";
34
- import { C as ut } from "../CurrencyInput-CsCy7uaS.mjs";
35
- import { a as mt, u as _t } from "../CategorySelectorDrawer-DUe4lH5-.mjs";
36
- import { b as ae } from "../Localization-2MODESHW.mjs";
37
- import { A as T, W as pt } from "../WidgetContainer-C88Ecu2W.mjs";
38
- import { u as gt } from "../useScreenSize-B6JyS_Lj.mjs";
39
- import { S as ht } from "../SearchBox-B2_zLv8-.mjs";
40
- import { D as ne } from "../Drawer-kEE73B87.mjs";
41
- const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small", children: [
22
+ import { f as ce } from "../NumberFormatting-Buh7u8Oi.mjs";
23
+ import { L as X } from "../Loader-DUaFpDGv.mjs";
24
+ import { endOfMonth as ot } from "date-fns/endOfMonth";
25
+ import { getUnixTime as rt } from "date-fns/getUnixTime";
26
+ import { startOfMonth as st } from "date-fns/startOfMonth";
27
+ import { startOfToday as K } from "date-fns/startOfToday";
28
+ import it from "@mui/material/styles/useTheme";
29
+ import { l as ct } from "../ConnectDrawer-DaFRU5st.mjs";
30
+ import lt from "@mui/material/Divider";
31
+ import dt from "@mui/material/MenuItem";
32
+ import ut from "@mui/material/RadioGroup";
33
+ import { ExpandMore as mt } from "@mxenabled/mx-icons";
34
+ import { C as _t } from "../CurrencyInput-CsCy7uaS.mjs";
35
+ import { a as pt, u as gt } from "../CategorySelectorDrawer-DUe4lH5-.mjs";
36
+ import { b as q } from "../Localization-2MODESHW.mjs";
37
+ import { A, W as ht } from "../WidgetContainer-C88Ecu2W.mjs";
38
+ import { u as ft } from "../useScreenSize-B6JyS_Lj.mjs";
39
+ import { S as Ct } from "../SearchBox-B2_zLv8-.mjs";
40
+ import { D as oe } from "../Drawer-kEE73B87.mjs";
41
+ const yt = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small", children: [
42
42
  `${t.row.account}`,
43
43
  t.row.number && ` | ${t.row.number}`
44
- ] }), Ct = (t) => {
45
- const { associatedBeats: s } = $(), { showInsights: o } = P(), { amount: a, transaction_type: i } = t.row, l = s.find((p) => p.associated_transaction_guid === t.row.guid), d = i === M.CREDIT;
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
46
  return /* @__PURE__ */ _(D, { alignItems: "flex-end", tabIndex: t.tabIndex, children: [
47
47
  /* @__PURE__ */ _(C, { color: d ? "success.main" : "text.primary", variant: "Small", children: [
48
48
  d ? "+" : "",
49
- ie(a, "0,0.00")
49
+ ce(a, "0,0.00")
50
50
  ] }),
51
- l && o && /* @__PURE__ */ e(C, { bold: !0, color: "primary.light", variant: "XSmall", children: l.short_title })
51
+ l && n && /* @__PURE__ */ e(C, { bold: !0, color: "primary.light", variant: "XSmall", children: l.short_title })
52
52
  ] });
53
- }, yt = (t) => {
54
- const { transactions: s } = x(), [o, a] = m.useState(!1);
53
+ }, Tt = (t) => {
54
+ const { transactions: r } = x(), [n, a] = c.useState(!1);
55
55
  return /* @__PURE__ */ _(
56
56
  D,
57
57
  {
@@ -63,22 +63,22 @@ const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
63
63
  onMouseLeave: () => a(!1),
64
64
  width: "100%",
65
65
  children: [
66
- t.row.has_been_split && /* @__PURE__ */ e(B, { name: "call_split", size: 16 }),
67
- /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: t.row.has_been_split ? s.split_transaction_category_label : t.row.category }),
68
- !t.row.has_been_split && o && /* @__PURE__ */ e(B, { name: "edit", sx: { color: "action.active" } })
66
+ t.row.has_been_split && /* @__PURE__ */ e(P, { name: "call_split", size: 16 }),
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" } })
69
69
  ]
70
70
  }
71
71
  );
72
- }, bt = S(yt), Tt = (t) => /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: et(Ze(t.row.date), tt.MONTH_DAY) }), At = (t) => {
73
- const s = Ke(), { transactions: o } = x(), { is_flagged: a, is_hidden: i, has_been_viewed: l, parent_guid: d } = t.row, g = !l && !!!d;
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;
74
74
  return /* @__PURE__ */ _(
75
- A,
75
+ T,
76
76
  {
77
- "aria-label": i ? o.is_hidden : o.is_flagged,
77
+ "aria-label": i ? n.is_hidden : n.is_flagged,
78
78
  tabIndex: t.tabIndex,
79
79
  children: [
80
- a && /* @__PURE__ */ e(B, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
81
- !a && i && /* @__PURE__ */ e(B, { name: "visibility_off", size: 16 }),
80
+ a && /* @__PURE__ */ e(P, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
81
+ !a && i && /* @__PURE__ */ e(P, { name: "visibility_off", size: 16 }),
82
82
  g && /* @__PURE__ */ e(
83
83
  "svg",
84
84
  {
@@ -86,7 +86,7 @@ const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
86
86
  style: {
87
87
  display: "inline-block",
88
88
  height: 16,
89
- fill: s.palette.primary.light,
89
+ fill: r.palette.primary.light,
90
90
  verticalAlign: "middle",
91
91
  width: 16
92
92
  },
@@ -97,32 +97,32 @@ const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
97
97
  ]
98
98
  }
99
99
  );
100
- }, St = S(At), E = (t) => /* @__PURE__ */ e(C, { fontWeight: 600, variant: "Small", children: t.colDef.headerName }), xt = (t) => /* @__PURE__ */ _(D, { alignItems: "center", direction: "row", gap: 8, children: [
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: [
101
101
  /* @__PURE__ */ e(
102
- qe,
102
+ Xe,
103
103
  {
104
104
  categoryGuid: t.row.top_level_category_guid || "",
105
105
  merchantGuid: t.row.merchant_guid || ""
106
106
  }
107
107
  ),
108
108
  /* @__PURE__ */ e(C, { tabIndex: t.tabIndex, variant: "Small", children: t.row.payee })
109
- ] }), wt = ({
109
+ ] }), It = ({
110
110
  height: t = "100dvh",
111
- onCategoryClick: s,
112
- onRowClick: o
111
+ onCategoryClick: r,
112
+ onRowClick: n
113
113
  }) => {
114
- const { transactions: a } = x(), { isCopyLoaded: i } = K(), { isLoading: l, sortedTransactions: d } = $(), { clearExpandedSplits: p, toggleSplit: g } = P();
115
- m.useEffect(() => () => p(), []);
116
- const h = m.useMemo(
117
- () => d.map((n) => ({
118
- id: n.guid,
114
+ const { transactions: a } = x(), { isCopyLoaded: i } = j(), { isLoading: l, sortedTransactions: d } = $(), { clearExpandedSplits: p, toggleSplit: g } = B();
115
+ c.useEffect(() => () => p(), []);
116
+ const f = c.useMemo(
117
+ () => d.map((o) => ({
118
+ id: o.guid,
119
119
  isHovering: !1,
120
- ...n
120
+ ...o
121
121
  })),
122
122
  [d]
123
- ), u = ({ row: { id: n, guid: f, has_been_split: N }, field: O }) => N ? g(n) : O === "category" ? s?.(f) : o?.(f);
123
+ ), m = ({ row: { id: o, guid: h, has_been_split: N }, field: E }) => N ? g(o) : E === "category" ? r?.(h) : n?.(h);
124
124
  if (!i)
125
- return /* @__PURE__ */ e(q, {});
125
+ return /* @__PURE__ */ e(X, {});
126
126
  const w = [
127
127
  {
128
128
  field: "flag",
@@ -130,15 +130,15 @@ const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
130
130
  minWidth: 32,
131
131
  width: 32,
132
132
  sortable: !1,
133
- renderCell: (n) => /* @__PURE__ */ e(St, { ...n }),
133
+ renderCell: (o) => /* @__PURE__ */ e(wt, { ...o }),
134
134
  renderHeader: () => /* @__PURE__ */ e("span", { "aria-label": a.transaction_status, role: "presentation" })
135
135
  },
136
136
  {
137
137
  field: "date",
138
138
  headerName: a.date_title,
139
139
  width: 103,
140
- renderHeader: E,
141
- renderCell: (n) => n.row.parent_guid ? null : /* @__PURE__ */ e(Tt, { ...n }),
140
+ renderHeader: O,
141
+ renderCell: (o) => o.row.parent_guid ? null : /* @__PURE__ */ e(St, { ...o }),
142
142
  sortingOrder: ["desc", "asc"]
143
143
  },
144
144
  {
@@ -146,49 +146,49 @@ const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
146
146
  field: "payee",
147
147
  headerName: a.payee_title,
148
148
  flex: 0.33,
149
- renderHeader: E,
150
- renderCell: xt,
149
+ renderHeader: O,
150
+ renderCell: vt,
151
151
  sortingOrder: ["asc", "desc"]
152
152
  },
153
153
  {
154
154
  field: "category",
155
155
  headerName: a.category_title,
156
156
  flex: 0.25,
157
- renderHeader: E,
158
- renderCell: (n) => /* @__PURE__ */ e(bt, { ...n }),
157
+ renderHeader: O,
158
+ renderCell: (o) => /* @__PURE__ */ e(At, { ...o }),
159
159
  sortingOrder: ["asc", "desc"]
160
160
  },
161
161
  {
162
162
  field: "account",
163
163
  headerName: a.account_title,
164
164
  flex: 0.33,
165
- renderHeader: E,
166
- renderCell: (n) => n.row.parent_guid ? null : /* @__PURE__ */ e(ft, { ...n }),
165
+ renderHeader: O,
166
+ renderCell: (o) => o.row.parent_guid ? null : /* @__PURE__ */ e(yt, { ...o }),
167
167
  sortingOrder: ["asc", "desc"]
168
168
  },
169
169
  {
170
170
  field: "amount",
171
171
  headerName: a.amount_title,
172
172
  flex: 0.25,
173
- renderHeader: E,
174
- renderCell: Ct,
173
+ renderHeader: O,
174
+ renderCell: bt,
175
175
  align: "right",
176
176
  headerAlign: "right",
177
177
  sortingOrder: ["asc", "desc"]
178
178
  }
179
179
  ];
180
- return /* @__PURE__ */ e(Fe, { sx: { height: t, px: 24, width: "100%", boxShadow: "none" }, children: /* @__PURE__ */ e(
181
- ze,
180
+ return /* @__PURE__ */ e(Ke, { sx: { height: t, px: 24, width: "100%", boxShadow: "none" }, children: /* @__PURE__ */ e(
181
+ qe,
182
182
  {
183
183
  columns: w,
184
184
  disableColumnFilter: !0,
185
185
  disableColumnMenu: !0,
186
- getCellClassName: (n) => n.row.parent_guid ? "split-row" : "",
186
+ getCellClassName: (o) => o.row.parent_guid ? "split-row" : "",
187
187
  hideFooter: !0,
188
188
  initialState: { sorting: { sortModel: [{ field: "date", sort: "desc" }] } },
189
189
  loading: l,
190
- onCellClick: u,
191
- rows: h,
190
+ onCellClick: m,
191
+ rows: f,
192
192
  slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
193
193
  sx: {
194
194
  "& .split-row": {
@@ -197,16 +197,16 @@ const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
197
197
  }
198
198
  }
199
199
  ) });
200
- }, It = S(wt), vt = ({ copy: t, isOpen: s, onClose: o, onPrimaryAction: a }) => {
201
- const { common: i, transactions: l } = x(), { isCopyLoaded: d } = K();
200
+ }, Dt = S(It), Nt = ({ copy: t, isOpen: r, onClose: n, onPrimaryAction: a }) => {
201
+ const { common: i, transactions: l } = x(), { isCopyLoaded: d } = j();
202
202
  return d ? /* @__PURE__ */ _(
203
- se,
203
+ ie,
204
204
  {
205
205
  copy: {
206
206
  title: t.title
207
207
  },
208
- isOpen: s,
209
- onClose: o,
208
+ isOpen: r,
209
+ onClose: n,
210
210
  onPrimaryAction: a,
211
211
  primaryText: l.add_manual_account,
212
212
  secondaryText: i.cancel_button,
@@ -215,29 +215,29 @@ const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
215
215
  /* @__PURE__ */ e(C, { component: "p", truncate: !1, children: l.add_account_modal_cta })
216
216
  ]
217
217
  }
218
- ) : /* @__PURE__ */ e(q, {});
219
- }, Dt = S(vt), Nt = () => {
220
- const { visibleAccounts: t } = re(), { common: s, transactions: o } = x(), { manualTransaction: a, setIsAmountValid: i, updateManualTransaction: l } = P(), [d, p] = m.useState(""), [g, h] = m.useState(""), u = m.useMemo(
221
- () => t.filter((r) => r.is_manual),
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(
221
+ () => t.filter((s) => s.is_manual),
222
222
  [t]
223
- ).map((r) => ({
224
- label: `${r.name} | ${ie(r.balance, "0,0.00")}`,
225
- value: r.guid
223
+ ).map((s) => ({
224
+ label: `${s.name} | ${ce(s.balance, "0,0.00")}`,
225
+ value: s.guid
226
226
  })), w = {
227
- error_amount_is_invalid: s.currency_input.error_amount_is_invalid,
228
- error_amount_must_be_equal_to: s.currency_input.error_amount_must_be_equal_to,
229
- error_amount_must_be_less_than_or_equal_to: s.currency_input.error_amount_must_be_less_than_or_equal_to,
230
- enter_amount: s.currency_input.enter_amount
231
- }, n = (r) => {
232
- p(r), l({ ...a, amount: Number(r) });
233
- }, f = (r, k) => {
227
+ error_amount_is_invalid: r.currency_input.error_amount_is_invalid,
228
+ error_amount_must_be_equal_to: r.currency_input.error_amount_must_be_equal_to,
229
+ error_amount_must_be_less_than_or_equal_to: r.currency_input.error_amount_must_be_less_than_or_equal_to,
230
+ enter_amount: r.currency_input.enter_amount
231
+ }, o = (s) => {
232
+ p(s), l({ ...a, amount: Number(s) });
233
+ }, h = (s, k) => {
234
234
  l({ ...a, transaction_type: Number(k) });
235
- }, N = (r) => {
236
- h(r), l({ ...a, payee: r, description: r });
237
- }, O = (r) => {
238
- l({ ...a, account_guid: r });
235
+ }, N = (s) => {
236
+ f(s), l({ ...a, payee: s, description: s });
237
+ }, E = (s) => {
238
+ l({ ...a, account_guid: s });
239
239
  };
240
- return /* @__PURE__ */ _(A, { className: "mx-txn-manual-transaction-details", children: [
240
+ return /* @__PURE__ */ _(T, { className: "mx-txn-manual-transaction-details", children: [
241
241
  /* @__PURE__ */ _(D, { gap: 40, mx: 24, my: 32, children: [
242
242
  /* @__PURE__ */ _(
243
243
  D,
@@ -246,39 +246,39 @@ const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
246
246
  sx: { flexDirection: { xs: "column", sm: "row" }, gap: { xs: 40, sm: 8 } },
247
247
  children: [
248
248
  /* @__PURE__ */ e(
249
- ut,
249
+ _t,
250
250
  {
251
251
  allowDecimals: !0,
252
252
  amount: d,
253
- ariaLabel: o.amount_title,
253
+ ariaLabel: n.amount_title,
254
254
  copy: w,
255
255
  inputProps: {
256
256
  noValidate: !0
257
257
  },
258
- label: o.amount_title,
259
- setAmount: n,
258
+ label: n.amount_title,
259
+ setAmount: o,
260
260
  setHasValidInput: i,
261
261
  sx: { bgcolor: "background.paper" },
262
262
  type: "number"
263
263
  }
264
264
  ),
265
- /* @__PURE__ */ e(lt, { name: "TransactionType", onChange: f, row: !0, children: /* @__PURE__ */ _(D, { alignItems: "center", direction: "row", children: [
265
+ /* @__PURE__ */ e(ut, { name: "TransactionType", onChange: h, row: !0, children: /* @__PURE__ */ _(D, { alignItems: "center", direction: "row", children: [
266
266
  /* @__PURE__ */ e(
267
- ee,
267
+ ae,
268
268
  {
269
269
  checked: a.transaction_type === M.CREDIT,
270
- label: o.manual_transaction_credit_button_label,
270
+ label: n.manual_transaction_credit_button_label,
271
271
  sx: { ml: { xs: 0, sm: 8 } },
272
- tooltip: o.manual_transaction_credit_button_tooltip,
272
+ tooltip: n.manual_transaction_credit_button_tooltip,
273
273
  value: M.CREDIT
274
274
  }
275
275
  ),
276
276
  /* @__PURE__ */ e(
277
- ee,
277
+ ae,
278
278
  {
279
279
  checked: a.transaction_type === M.DEBIT,
280
- label: o.manual_transaction_debit_button_label,
281
- tooltip: o.manual_transaction_debit_button_tooltip,
280
+ label: n.manual_transaction_debit_button_label,
281
+ tooltip: n.manual_transaction_debit_button_tooltip,
282
282
  value: M.DEBIT
283
283
  }
284
284
  )
@@ -287,97 +287,125 @@ const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
287
287
  }
288
288
  ),
289
289
  /* @__PURE__ */ e(
290
- te,
290
+ ne,
291
291
  {
292
- label: o.payee_title,
292
+ label: n.payee_title,
293
293
  name: "payee",
294
- onChange: (r) => N(r.target.value),
294
+ onChange: (s) => N(s.target.value),
295
295
  sx: { bgcolor: "background.paper" },
296
296
  value: g
297
297
  }
298
298
  ),
299
299
  /* @__PURE__ */ e(
300
- te,
300
+ ne,
301
301
  {
302
302
  InputLabelProps: { shrink: !0 },
303
- SelectProps: { defaultValue: -1, IconComponent: dt },
304
- label: o.manual_transaction_select_an_account,
305
- onChange: (r) => O(r.target.value),
306
- placeholder: o.manual_transaction_select,
303
+ SelectProps: { defaultValue: -1, IconComponent: mt },
304
+ label: n.manual_transaction_select_an_account,
305
+ onChange: (s) => E(s.target.value),
306
+ placeholder: n.manual_transaction_select,
307
307
  select: !0,
308
308
  sx: { bgcolor: "background.paper" },
309
- children: u.map((r) => /* @__PURE__ */ e(ct, { value: r.value, children: r.label }, r.value))
309
+ children: m.map((s) => /* @__PURE__ */ e(dt, { value: s.value, children: s.label }, s.value))
310
310
  }
311
311
  )
312
312
  ] }),
313
- /* @__PURE__ */ e(it, { light: !0 }),
314
- /* @__PURE__ */ _(A, { bgcolor: "background.paper", children: [
315
- /* @__PURE__ */ e(He, { transaction: a }),
313
+ /* @__PURE__ */ e(lt, { light: !0 }),
314
+ /* @__PURE__ */ _(T, { bgcolor: "background.paper", children: [
316
315
  /* @__PURE__ */ e(Be, { transaction: a }),
317
- /* @__PURE__ */ e(Pe, { transaction: a }),
318
- /* @__PURE__ */ e($e, { transaction: a })
316
+ /* @__PURE__ */ e($e, { transaction: a }),
317
+ /* @__PURE__ */ e(Ve, { transaction: a }),
318
+ /* @__PURE__ */ e(We, { transaction: a })
319
319
  ] })
320
320
  ] });
321
- }, Ot = S(Nt), Et = ({ onClose: t, transaction: s }) => {
322
- const { addOrUpdateTransactionRule: o, updateTransaction: a } = $(), { transactions: i } = x(), { categories: l } = Xe(), [d, p] = m.useState(""), g = m.useMemo(
323
- () => l.find((u) => u.guid === d),
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(
323
+ () => l.find((m) => m.guid === d),
324
324
  [d]
325
- ), h = async (u) => {
326
- await a({ ...s, category_guid: d }), u && await o(d, s), p(""), t();
325
+ ), f = async (m) => {
326
+ await a({ ...r, category_guid: d }), m && await n(d, r), p(""), t();
327
327
  };
328
- return /* @__PURE__ */ _(A, { className: "mx-txn-edit-category-action", children: [
328
+ return /* @__PURE__ */ _(T, { className: "mx-txn-edit-category-action", children: [
329
329
  /* @__PURE__ */ e(
330
- mt,
330
+ pt,
331
331
  {
332
- initialSelected: s.category_guid,
332
+ initialSelected: r.category_guid,
333
333
  onClose: t,
334
- onSelect: (u) => p(u),
335
- showDrawer: !!s,
334
+ onSelect: (m) => p(m),
335
+ showDrawer: !!r,
336
336
  title: i.actions_select_a_category
337
337
  }
338
338
  ),
339
339
  /* @__PURE__ */ e(
340
- se,
340
+ ie,
341
341
  {
342
342
  copy: {
343
- title: ae(
343
+ title: q(
344
344
  i.actions_apply_to_all_transaction_types,
345
- s.description
345
+ r.description
346
346
  )
347
347
  },
348
348
  isOpen: !!d,
349
- onClose: () => h(!1),
350
- onPrimaryAction: () => h(!0),
351
- onSecondaryAction: () => h(!1),
349
+ onClose: () => f(!1),
350
+ onPrimaryAction: () => f(!0),
351
+ onSecondaryAction: () => f(!1),
352
352
  primaryText: i.actions_apply_to_all,
353
353
  secondaryText: i.actions_this_time_only,
354
- children: /* @__PURE__ */ e(je, { variant: "Paragraph", children: ae(
354
+ children: /* @__PURE__ */ e(Ye, { variant: "Paragraph", children: q(
355
355
  i.actions_all_past_and_future,
356
- s.description,
356
+ r.description,
357
357
  g?.name
358
358
  ) })
359
359
  }
360
360
  )
361
361
  ] });
362
- }, Mt = S(Et), oe = 120, kt = ({
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);
365
+ }, []), d = c.useMemo(
366
+ () => /* @__PURE__ */ e(
367
+ T,
368
+ {
369
+ "aria-atomic": "true",
370
+ "aria-live": a,
371
+ role: a === "assertive" ? "alert" : "status",
372
+ sx: {
373
+ position: "absolute",
374
+ width: "1px",
375
+ height: "1px",
376
+ padding: 0,
377
+ margin: "-1px",
378
+ overflow: "hidden",
379
+ clip: "rect(0 0 0 0)",
380
+ clipPath: "inset(50%)",
381
+ whiteSpace: "nowrap",
382
+ border: 0
383
+ },
384
+ children: r
385
+ }
386
+ ),
387
+ [r, a]
388
+ );
389
+ return { announce: l, ariaLive: d };
390
+ }, re = 120, Ht = ({
363
391
  onBackClick: t,
364
- height: s = "100dvh",
365
- showInsights: o = !1,
392
+ height: r = "100dvh",
393
+ showInsights: n = !1,
366
394
  sx: a = {}
367
395
  }) => {
368
- const { visibleAccounts: i, refreshAccounts: l } = re(), { is_mobile_webview: d, clientConfig: p, config: g } = Ye(), { setSearchValue: h } = _t(), { onEvent: u } = Je(), { common: w, transactions: n } = x(), {
369
- displayedDateRange: f,
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(), {
397
+ displayedDateRange: h,
370
398
  isCopyLoaded: N,
371
- isInitialized: O,
372
- selectedAccountGuids: r,
399
+ isInitialized: E,
400
+ selectedAccountGuids: s,
373
401
  setDisplayedDate: k,
374
- setSelectedAccounts: ce
375
- } = K(), { isDesktop: le, isTablet: de } = gt(), L = rt(), {
376
- addTransaction: ue,
377
- filter: j,
378
- loadAssociatedBeats: me,
402
+ setSelectedAccounts: le
403
+ } = j(), { isDesktop: de, isTablet: ue } = ft(), L = it(), {
404
+ addTransaction: me,
405
+ filter: Y,
406
+ loadAssociatedBeats: _e,
379
407
  setFilter: V,
380
- sortedTransactionsWithSplits: _e,
408
+ sortedTransactionsWithSplits: W,
381
409
  tags: pe,
382
410
  transactions: ge,
383
411
  updateTransaction: he
@@ -389,202 +417,210 @@ const ft = (t) => /* @__PURE__ */ _(C, { tabIndex: t.tabIndex, variant: "Small",
389
417
  setSearchValue: be,
390
418
  setShowInsights: Te,
391
419
  updateManualTransaction: Ae
392
- } = P(), { userProfile: Se } = Qe(), [W, y] = m.useState(""), [X, H] = m.useState(""), [xe, G] = m.useState(!1), [we, Y] = m.useState(!1), [U, Ie] = m.useState(!1), I = p?.transactions?.selected_account_guid;
393
- m.useEffect(() => {
394
- const c = I ? [{ guid: I }] : i.filter((v) => !v.is_hidden), Q = ot(z()), Z = at(z());
395
- I || ce(c), k(Q, Z), V({
396
- accounts: c.map((v) => v.guid),
397
- custom: (v) => !v.accountIsClosed && !v.accountIsHidden,
398
- dateRange: { start: Q, end: Z }
399
- }), Ie(!0), u(T.TRANSACTIONS_VIEW);
400
- }, [i]), m.useEffect(() => {
401
- U && (V({
402
- ...j,
403
- accounts: I ? [I] : r,
404
- dateRange: { start: f.start, end: f.end }
405
- }), me(f.start).finally());
406
- }, [U, f, r]), m.useEffect(() => {
407
- Te(o);
408
- }, [o]);
409
- const ve = m.useMemo(
410
- () => i.filter((c) => c.is_manual),
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;
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,
426
+ dateRange: { start: ee, end: te }
427
+ }), ve(!0), m(A.TRANSACTIONS_VIEW);
428
+ }, [i]), c.useEffect(() => {
429
+ F && (V({
430
+ ...Y,
431
+ accounts: v ? [v] : s,
432
+ dateRange: { start: h.start, end: h.end }
433
+ }), _e(h.start).finally());
434
+ }, [F, h, s]), c.useEffect(() => {
435
+ Te(n);
436
+ }, [n]), c.useEffect(() => {
437
+ Ie(
438
+ q(
439
+ o.showing_transactions_count,
440
+ W.length
441
+ )
442
+ );
443
+ }, [h, s, W]);
444
+ const Ne = c.useMemo(
445
+ () => i.filter((u) => u.is_manual),
411
446
  [i]
412
- ), b = X ? ge.find((c) => c.guid === X) : void 0, J = Ce && !!R.payee && !!R.account_guid && !!R.category_guid, De = (c) => {
413
- fe(), k(c[0], c[1]);
414
- }, Ne = (c) => {
415
- be(c), V({
416
- ...j,
417
- searchTerm: c
418
- }), u(T.TRANSACTIONS_CLICK_SEARCH, { search_term: c });
419
- }, Oe = () => {
420
- Ue(_e, pe), u(T.TRANSACTIONS_CLICK_EXPORT);
421
- }, Ee = () => {
422
- ve.length > 0 ? (Ae({
423
- ...Ge,
424
- date: nt(z()),
447
+ ), b = J ? ge.find((u) => u.guid === J) : void 0, Z = Ce && !!R.payee && !!R.account_guid && !!R.category_guid, Ee = (u) => {
448
+ fe(), k(u[0], u[1]);
449
+ }, Oe = (u) => {
450
+ be(u), V({
451
+ ...Y,
452
+ searchTerm: u
453
+ }), m(A.TRANSACTIONS_CLICK_SEARCH, { search_term: u });
454
+ }, Me = () => {
455
+ ze(W, pe), m(A.TRANSACTIONS_CLICK_EXPORT);
456
+ }, ke = () => {
457
+ Ne.length > 0 ? (Ae({
458
+ ...Fe,
459
+ date: rt(K()),
425
460
  user_guid: Se?.user_guid || ""
426
461
  }), y(
427
462
  "addTransaction"
428
463
  /* AddTransaction */
429
- ), u(T.TRANSACTIONS_CLICK_ADD)) : (G(!0), u(T.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
430
- }, Me = async () => {
431
- J && await ue(R), y("");
432
- }, ke = () => {
433
- G(!1), Y(!0);
464
+ ), m(A.TRANSACTIONS_CLICK_ADD)) : (U(!0), m(A.TRANSACTIONS_ADD_MANUAL_ACCOUNT_MODAL));
434
465
  }, Le = async () => {
435
- Y(!1), await l();
436
- }, Re = async () => {
466
+ Z && await me(R), y("");
467
+ }, Re = () => {
468
+ U(!1), Q(!0);
469
+ }, He = async () => {
470
+ Q(!1), await l();
471
+ }, Pe = async () => {
437
472
  b && !b.has_been_viewed && await he({ ...b, has_been_viewed: !0 }), y("");
438
473
  };
439
- if (!N || !O || !U)
440
- return /* @__PURE__ */ e(q, {});
441
- const F = [];
442
- return !d && (le || de) && F.push({
474
+ if (!N || !E || !F)
475
+ return /* @__PURE__ */ e(X, {});
476
+ const z = [];
477
+ return !d && (de || ue) && z.push({
443
478
  iconName: "open_in_new",
444
- label: n.export_csv_btn,
445
- onClick: Oe
446
- }), g.show_connections_widget_in_master && F.push({
479
+ label: o.export_csv_btn,
480
+ onClick: Me
481
+ }), g.show_connections_widget_in_master && z.push({
447
482
  iconName: "add",
448
- label: n.add_transaction_btn,
449
- onClick: Ee
483
+ label: o.add_transaction_btn,
484
+ onClick: ke
450
485
  }), /* @__PURE__ */ _(
451
- pt,
486
+ ht,
452
487
  {
453
- ...!I && { accountOptions: i },
454
- actions: F,
488
+ ...!v && { accountOptions: i },
489
+ actions: z,
455
490
  calendarActions: {
456
- onRangeChanged: De
491
+ onRangeChanged: Ee
457
492
  },
458
- onAccountsFilterClick: () => u(T.ACCOUNTS_CLICK_FILTER),
493
+ onAccountsFilterClick: () => m(A.ACCOUNTS_CLICK_FILTER),
459
494
  onBackClick: t,
460
495
  sx: a,
461
- title: n.transactions_title,
496
+ title: o.transactions_title,
462
497
  children: [
463
- /* @__PURE__ */ e(A, { mt: 16, children: /* @__PURE__ */ e(
464
- ht,
498
+ De,
499
+ /* @__PURE__ */ e(T, { mt: 16, children: /* @__PURE__ */ e(
500
+ Ct,
465
501
  {
466
- onChange: Ne,
467
- placeholder: n.action_bar_search_placeholder,
502
+ onChange: Oe,
503
+ placeholder: o.action_bar_search_placeholder,
468
504
  searchValue: ye
469
505
  }
470
506
  ) }),
471
507
  /* @__PURE__ */ e(
472
- A,
508
+ T,
473
509
  {
474
510
  sx: {
475
511
  [L.breakpoints.down("md")]: { display: "none" },
476
512
  [L.breakpoints.up("md")]: { display: "block" }
477
513
  },
478
514
  children: /* @__PURE__ */ e(
479
- It,
515
+ Dt,
480
516
  {
481
- height: `calc(${s} - ${oe}px)`,
482
- onCategoryClick: (c) => {
483
- H(c), y(
517
+ height: `calc(${r} - ${re}px)`,
518
+ onCategoryClick: (u) => {
519
+ H(u), y(
484
520
  "category"
485
521
  /* Category */
486
522
  );
487
523
  },
488
- onRowClick: (c) => {
489
- H(c), y(
524
+ onRowClick: (u) => {
525
+ H(u), y(
490
526
  "transaction"
491
527
  /* Transaction */
492
- ), u(T.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: c });
528
+ ), m(A.TRANSACTIONS_CLICK_DETAILS, { transaction_guid: u });
493
529
  }
494
530
  }
495
531
  )
496
532
  }
497
533
  ),
498
534
  /* @__PURE__ */ e(
499
- A,
535
+ T,
500
536
  {
501
537
  sx: {
502
538
  [L.breakpoints.down("md")]: { display: "block" },
503
539
  [L.breakpoints.up("md")]: { display: "none" }
504
540
  },
505
541
  children: /* @__PURE__ */ e(
506
- Ve,
542
+ Ge,
507
543
  {
508
- height: `calc(${s} - ${oe}px)`,
509
- onClick: (c) => {
510
- H(c), y(
544
+ height: `calc(${r} - ${re}px)`,
545
+ onClick: (u) => {
546
+ H(u), y(
511
547
  "transaction"
512
548
  /* Transaction */
513
549
  );
514
550
  },
515
551
  showHiddenTransactions: !0,
516
- showInsights: o
552
+ showInsights: n
517
553
  }
518
554
  )
519
555
  }
520
556
  ),
521
557
  /* @__PURE__ */ e(
522
- ne,
558
+ oe,
523
559
  {
524
560
  ariaLabelClose: w.close_aria,
525
- isOpen: W === "transaction" && !!b,
526
- onClose: Re,
527
- title: n.details_title,
528
- children: b && /* @__PURE__ */ e(We, { transaction: b })
561
+ isOpen: G === "transaction" && !!b,
562
+ onClose: Pe,
563
+ title: o.details_title,
564
+ children: b && /* @__PURE__ */ e(Ue, { transaction: b })
529
565
  }
530
566
  ),
531
- b && W === "category" && /* @__PURE__ */ e(
532
- Mt,
567
+ b && G === "category" && /* @__PURE__ */ e(
568
+ Lt,
533
569
  {
534
570
  onClose: () => {
535
- h(""), y(""), H("");
571
+ f(""), y(""), H("");
536
572
  },
537
573
  transaction: b
538
574
  }
539
575
  ),
540
576
  /* @__PURE__ */ e(
541
- ne,
577
+ oe,
542
578
  {
543
579
  ariaLabelClose: w.close_aria,
544
- isOpen: W === "addTransaction",
545
- isPrimaryDisabled: !J,
580
+ isOpen: G === "addTransaction",
581
+ isPrimaryDisabled: !Z,
546
582
  onClose: () => y(""),
547
- onPrimaryAction: Me,
548
- title: n.add_transaction_title,
549
- children: /* @__PURE__ */ e(Ot, {})
583
+ onPrimaryAction: Le,
584
+ title: o.add_transaction_title,
585
+ children: /* @__PURE__ */ e(Mt, {})
550
586
  }
551
587
  ),
552
588
  /* @__PURE__ */ e(
553
- Dt,
589
+ Et,
554
590
  {
555
- copy: { title: n.add_manual_account },
591
+ copy: { title: o.add_manual_account },
556
592
  isOpen: xe,
557
593
  onClose: () => {
558
- G(!1);
594
+ U(!1);
559
595
  },
560
- onPrimaryAction: ke
596
+ onPrimaryAction: Re
561
597
  }
562
598
  ),
563
599
  /* @__PURE__ */ e(
564
- st,
600
+ ct,
565
601
  {
566
- onClose: Le,
602
+ onClose: He,
567
603
  showConnectWidget: we,
568
- title: n.add_manual_account
604
+ title: o.add_manual_account
569
605
  }
570
606
  )
571
607
  ]
572
608
  }
573
609
  );
574
- }, ga = S(kt);
610
+ }, Ca = S(Ht);
575
611
  export {
576
- Dt as AddAccountModal,
577
- ba as BottomActions,
578
- Da as ExportCsvAction,
579
- xa as TRANSACTION_EVENTS,
580
- Ta as TopActions,
581
- Ca as TransactionApi,
582
- We as TransactionDetails,
583
- Ve as TransactionList,
584
- Aa as TransactionRow,
585
- Ia as TransactionStore,
586
- It as TransactionTable,
587
- ga as TransactionWidget,
588
- Ue as exportTransactionsToCSV,
589
- P as useTransactionsUiStore
612
+ Et as AddAccountModal,
613
+ Sa as BottomActions,
614
+ Oa as ExportCsvAction,
615
+ Ia as TRANSACTION_EVENTS,
616
+ xa as TopActions,
617
+ Ta as TransactionApi,
618
+ Ue as TransactionDetails,
619
+ Ge as TransactionList,
620
+ wa as TransactionRow,
621
+ Na as TransactionStore,
622
+ Dt as TransactionTable,
623
+ Ca as TransactionWidget,
624
+ ze as exportTransactionsToCSV,
625
+ B as useTransactionsUiStore
590
626
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.2.9",
3
+ "version": "7.2.10",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",