@mx-cartographer/experiences 9.2.4-alpha.al5 → 9.2.5

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{AccountDetailsDrawer-DVZTB7Dp.mjs → AccountDetailsDrawer-CwDPr4i5.mjs} +5 -5
  3. package/dist/{AccountDetailsDrawer-DVZTB7Dp.mjs.map → AccountDetailsDrawer-CwDPr4i5.mjs.map} +1 -1
  4. package/dist/{CategorySelectorDrawer-CWZoNePh.mjs → CategorySelectorDrawer-NJsFsKP1.mjs} +2 -2
  5. package/dist/{CategorySelectorDrawer-CWZoNePh.mjs.map → CategorySelectorDrawer-NJsFsKP1.mjs.map} +1 -1
  6. package/dist/{ConnectCard-CVMLPujx.mjs → ConnectCard-D7uxoH5Y.mjs} +2 -2
  7. package/dist/{ConnectCard-CVMLPujx.mjs.map → ConnectCard-D7uxoH5Y.mjs.map} +1 -1
  8. package/dist/{ConnectDrawer-L-UwjKiw.mjs → ConnectDrawer-CW4LA3H3.mjs} +2 -2
  9. package/dist/{ConnectDrawer-L-UwjKiw.mjs.map → ConnectDrawer-CW4LA3H3.mjs.map} +1 -1
  10. package/dist/{ConnectionsDrawer-B2-IGB21.mjs → ConnectionsDrawer-CZU9ku-k.mjs} +2 -2
  11. package/dist/{ConnectionsDrawer-B2-IGB21.mjs.map → ConnectionsDrawer-CZU9ku-k.mjs.map} +1 -1
  12. package/dist/Drawer-DsnW2o0v.mjs +175 -0
  13. package/dist/Drawer-DsnW2o0v.mjs.map +1 -0
  14. package/dist/{EmbeddedCard-B1xiWlSD.mjs → EmbeddedCard-CQEnrozC.mjs} +2 -2
  15. package/dist/{EmbeddedCard-B1xiWlSD.mjs.map → EmbeddedCard-CQEnrozC.mjs.map} +1 -1
  16. package/dist/{ExportCsvAction-BmhxpUxp.mjs → ExportCsvAction-B_8I-Le6.mjs} +2 -2
  17. package/dist/{ExportCsvAction-BmhxpUxp.mjs.map → ExportCsvAction-B_8I-Le6.mjs.map} +1 -1
  18. package/dist/GlobalAccountFilter-z4N1ElqC.mjs +208 -0
  19. package/dist/GlobalAccountFilter-z4N1ElqC.mjs.map +1 -0
  20. package/dist/{Help-CsyZsI4_.mjs → Help-D4sOpItq.mjs} +2 -2
  21. package/dist/{Help-CsyZsI4_.mjs.map → Help-D4sOpItq.mjs.map} +1 -1
  22. package/dist/{ManageIncome-Cy_iopks.mjs → ManageIncome-Br11zvAT.mjs} +5 -5
  23. package/dist/{ManageIncome-Cy_iopks.mjs.map → ManageIncome-Br11zvAT.mjs.map} +1 -1
  24. package/dist/{NotificationSettings-C7-S6PC1.mjs → NotificationSettings-CW7okUrk.mjs} +2 -2
  25. package/dist/{NotificationSettings-C7-S6PC1.mjs.map → NotificationSettings-CW7okUrk.mjs.map} +1 -1
  26. package/dist/{RecurringSettings-UHjXxW8J.mjs → RecurringSettings-BkRz-uzd.mjs} +2 -2
  27. package/dist/{RecurringSettings-UHjXxW8J.mjs.map → RecurringSettings-BkRz-uzd.mjs.map} +1 -1
  28. package/dist/{TransactionDetails-Nuyunc5m.mjs → TransactionDetails-CLc7oeHT.mjs} +106 -106
  29. package/dist/TransactionDetails-CLc7oeHT.mjs.map +1 -0
  30. package/dist/{WidgetContainer-By47tuTw.mjs → WidgetContainer-DvKtBdhn.mjs} +3 -3
  31. package/dist/{WidgetContainer-By47tuTw.mjs.map → WidgetContainer-DvKtBdhn.mjs.map} +1 -1
  32. package/dist/accounts/index.es.js +5 -5
  33. package/dist/budgets/index.es.js +7 -7
  34. package/dist/cashflow/index.es.js +6 -6
  35. package/dist/categories/index.es.js +1 -1
  36. package/dist/common/index.es.js +5 -5
  37. package/dist/dashboard/index.es.js +2 -2
  38. package/dist/debts/index.es.js +3 -3
  39. package/dist/finstrong/index.es.js +7 -7
  40. package/dist/goals/index.es.js +3 -3
  41. package/dist/help/index.es.js +2 -2
  42. package/dist/insights/index.es.js +3 -3
  43. package/dist/investments/index.es.js +3 -3
  44. package/dist/networth/index.es.js +3 -3
  45. package/dist/notifications/index.es.js +2 -2
  46. package/dist/recurringtransactions/index.es.js +6 -6
  47. package/dist/settings/index.es.js +6 -6
  48. package/dist/spending/index.es.js +4 -4
  49. package/dist/transactions/index.es.js +9 -9
  50. package/dist/trends/index.es.js +6 -6
  51. package/package.json +1 -1
  52. package/dist/Drawer-BDN1RgiP.mjs +0 -233
  53. package/dist/Drawer-BDN1RgiP.mjs.map +0 -1
  54. package/dist/GlobalAccountFilter-BhzR5Vb1.mjs +0 -230
  55. package/dist/GlobalAccountFilter-BhzR5Vb1.mjs.map +0 -1
  56. package/dist/TransactionDetails-Nuyunc5m.mjs.map +0 -1
@@ -15,8 +15,8 @@ import z from "@mui/material/Box";
15
15
  import Z from "@mui/material/Button";
16
16
  import I from "@mui/material/TextField";
17
17
  import { H3 as Y, P as M, Text as x, Icon as B } from "@mxenabled/mxui";
18
- import { V as xe, a as ve, N as J } from "../NotificationSettings-C7-S6PC1.mjs";
19
- import { A as Jt, B as Kt, I as Yt } from "../NotificationSettings-C7-S6PC1.mjs";
18
+ import { V as xe, a as ve, N as J } from "../NotificationSettings-CW7okUrk.mjs";
19
+ import { A as Jt, B as Kt, I as Yt } from "../NotificationSettings-CW7okUrk.mjs";
20
20
  import { u as k, i as G, A as E, C as Ce, a as ee, l as j } from "../hooks-97sNJ_lf.mjs";
21
21
  import { u as F } from "../useScreenSize-mWpmnh5w.mjs";
22
22
  import { D as $ } from "../Dialog-Bvd2n8hz.mjs";
@@ -33,16 +33,16 @@ import { L as ie } from "../Loader-CxeBwuPG.mjs";
33
33
  import Te from "@mui/material/List";
34
34
  import K from "@mui/material/Divider";
35
35
  import Ae from "@mui/material/ListSubheader";
36
- import { b as Ie, u as Ee } from "../CategorySelectorDrawer-CWZoNePh.mjs";
36
+ import { b as Ie, u as Ee } from "../CategorySelectorDrawer-NJsFsKP1.mjs";
37
37
  import Pe from "@mui/material/ListItem";
38
38
  import Re from "@mui/material/ListItemButton";
39
39
  import Ne from "@mui/material/ListItemIcon";
40
40
  import Me from "@mui/material/ListItemText";
41
41
  import { ChevronRight as Le, ChevronLeft as Be } from "@mxenabled/mx-icons";
42
- import { D as He } from "../Drawer-BDN1RgiP.mjs";
42
+ import { D as He } from "../Drawer-DsnW2o0v.mjs";
43
43
  import { u as ne } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
44
- import { H as Oe } from "../Help-CsyZsI4_.mjs";
45
- import { W as q } from "../WidgetContainer-By47tuTw.mjs";
44
+ import { H as Oe } from "../Help-D4sOpItq.mjs";
45
+ import { W as q } from "../WidgetContainer-DvKtBdhn.mjs";
46
46
  const Fe = ({ availableWidth: t, handleOnLeavClick: r }) => {
47
47
  const i = L(), { common: o, settings: n } = k(), { isDesktop: u, isMobile: s, isSmallMobile: a, isTablet: l } = F(t), { config: b } = G(), { updateUser: _ } = E(), { user: d } = Ce(), [h, w] = m.useState({
48
48
  first_name: d.first_name,
@@ -19,19 +19,19 @@ import { startOfToday as J } from "date-fns/startOfToday";
19
19
  import St from "@mui/material/Button";
20
20
  import { useTheme as Tt } from "@mui/material";
21
21
  import { e as Mt } from "../TransactionUtils-BphBJBbU.mjs";
22
- import { T as Dt } from "../EmbeddedCard-B1xiWlSD.mjs";
23
- import { T as xt } from "../TransactionDetails-Nuyunc5m.mjs";
22
+ import { T as Dt } from "../EmbeddedCard-CQEnrozC.mjs";
23
+ import { T as xt } from "../TransactionDetails-CLc7oeHT.mjs";
24
24
  import vt from "@mui/material/Collapse";
25
25
  import wt from "@mui/material/Divider";
26
26
  import Q from "@mui/material/List";
27
27
  import X from "@mui/material/ListItem";
28
28
  import Z from "@mui/material/ListItemButton";
29
29
  import { u as Lt } from "../useScreenSize-mWpmnh5w.mjs";
30
- import { D as tt } from "../Drawer-BDN1RgiP.mjs";
30
+ import { D as tt } from "../Drawer-DsnW2o0v.mjs";
31
31
  import { C as w } from "../Category-DEKZGLYe.mjs";
32
32
  import { parseISO as et } from "date-fns/parseISO";
33
33
  import { A as nt } from "../Analytics-D-jdcL72.mjs";
34
- import { W as It } from "../WidgetContainer-By47tuTw.mjs";
34
+ import { W as It } from "../WidgetContainer-DvKtBdhn.mjs";
35
35
  const G = ({ amount: n, label: d, variant: o = "full" }) => /* @__PURE__ */ p(y, { direction: "column", children: [
36
36
  /* @__PURE__ */ t(T, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: d }),
37
37
  /* @__PURE__ */ t(T, { variant: "caption", children: k(n, o === "mini" ? "0,0" : "0,0.00") })
@@ -1,8 +1,8 @@
1
- import { C as Be, D as He, M as Pe, a as We, T as $e } from "../TransactionDetails-Nuyunc5m.mjs";
2
- import { B as xa, b as Aa } from "../TransactionDetails-Nuyunc5m.mjs";
3
- import { u as B, T as Ge } from "../EmbeddedCard-B1xiWlSD.mjs";
4
- import { a as Sa } from "../EmbeddedCard-B1xiWlSD.mjs";
5
- import { E as va } from "../ExportCsvAction-BmhxpUxp.mjs";
1
+ import { C as Be, D as He, M as Pe, a as We, T as $e } from "../TransactionDetails-CLc7oeHT.mjs";
2
+ import { B as xa, b as Aa } from "../TransactionDetails-CLc7oeHT.mjs";
3
+ import { u as B, T as Ge } from "../EmbeddedCard-CQEnrozC.mjs";
4
+ import { a as Sa } from "../EmbeddedCard-CQEnrozC.mjs";
5
+ import { E as va } from "../ExportCsvAction-B_8I-Le6.mjs";
6
6
  import { jsxs as m, jsx as e } from "react/jsx-runtime";
7
7
  import u from "react";
8
8
  import { observer as D } from "mobx-react-lite";
@@ -24,7 +24,7 @@ import { getUnixTime as tt } from "date-fns/getUnixTime";
24
24
  import { startOfMonth as at } from "date-fns/startOfMonth";
25
25
  import { startOfToday as U } from "date-fns/startOfToday";
26
26
  import { b as F } from "../Localization-DnoVyBNK.mjs";
27
- import { C as nt } from "../ConnectDrawer-L-UwjKiw.mjs";
27
+ import { C as nt } from "../ConnectDrawer-CW4LA3H3.mjs";
28
28
  import ot from "@mui/material/Divider";
29
29
  import rt from "@mui/material/MenuItem";
30
30
  import it from "@mui/material/RadioGroup";
@@ -32,14 +32,14 @@ import { ExpandMore as st } from "@mxenabled/mx-icons";
32
32
  import { C as ct } from "../CurrencyInput-DaGEQaLW.mjs";
33
33
  import { S as ee } from "../SelectionBox-B4xELRgp.mjs";
34
34
  import { D as se } from "../Dialog-Bvd2n8hz.mjs";
35
- import { b as lt, u as dt } from "../CategorySelectorDrawer-CWZoNePh.mjs";
35
+ import { b as lt, u as dt } from "../CategorySelectorDrawer-NJsFsKP1.mjs";
36
36
  import { u as ut } from "../useAriaLive-MkYebyUR.mjs";
37
37
  import { S as mt } from "../SkeletonLoader-BaNboJjD.mjs";
38
38
  import { u as _t } from "../useScreenSize-mWpmnh5w.mjs";
39
39
  import { u as pt } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
40
- import { W as gt } from "../WidgetContainer-By47tuTw.mjs";
40
+ import { W as gt } from "../WidgetContainer-DvKtBdhn.mjs";
41
41
  import { S as ht } from "../SearchBox-Cpgu_gdO.mjs";
42
- import { D as te } from "../Drawer-BDN1RgiP.mjs";
42
+ import { D as te } from "../Drawer-DsnW2o0v.mjs";
43
43
  const ft = (t) => /* @__PURE__ */ m(y, { tabIndex: t.tabIndex, variant: "body2", children: [
44
44
  `${t.row.account}`,
45
45
  t.row.number && ` | ${t.row.number}`
@@ -34,12 +34,12 @@ import { useGridApiContext as Yt, useGridRootProps as jt, DataGridPro as Ut } fr
34
34
  import Xt from "@mui/material/Badge";
35
35
  import Zt from "@mui/material/IconButton";
36
36
  import { A as w } from "../Analytics-D-jdcL72.mjs";
37
- import { T as ct } from "../EmbeddedCard-B1xiWlSD.mjs";
38
- import { T as dt } from "../TransactionDetails-Nuyunc5m.mjs";
39
- import { D as Pe } from "../Drawer-BDN1RgiP.mjs";
37
+ import { T as ct } from "../EmbeddedCard-CQEnrozC.mjs";
38
+ import { T as dt } from "../TransactionDetails-CLc7oeHT.mjs";
39
+ import { D as Pe } from "../Drawer-DsnW2o0v.mjs";
40
40
  import { u as Ie } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
41
41
  import { L as Le } from "../Loader-CxeBwuPG.mjs";
42
- import { W as ut } from "../WidgetContainer-By47tuTw.mjs";
42
+ import { W as ut } from "../WidgetContainer-DvKtBdhn.mjs";
43
43
  import { L as Ve } from "../LineChart-CUfiH86G.mjs";
44
44
  import { M as Qt } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
45
45
  import { subMonths as qt } from "date-fns";
@@ -55,10 +55,10 @@ import { g as Oe } from "../TransactionUtils-BphBJBbU.mjs";
55
55
  import { L as uo } from "../ListItemRow-kH1rn8Xu.mjs";
56
56
  import { Stack as mo } from "@mui/material";
57
57
  import ho from "@mui/material/ListItemAvatar";
58
- import { E as go } from "../ExportCsvAction-BmhxpUxp.mjs";
58
+ import { E as go } from "../ExportCsvAction-B_8I-Le6.mjs";
59
59
  import { u as po } from "../useInsightsEnabled-D5Sdm0TJ.mjs";
60
60
  import { E as fo } from "../EmptyState-CJUDc3kD.mjs";
61
- import { C as yo } from "../ConnectDrawer-L-UwjKiw.mjs";
61
+ import { C as yo } from "../ConnectDrawer-CW4LA3H3.mjs";
62
62
  const gt = ({ categoryGuid: t, topLevelCategoryGuid: n }) => {
63
63
  const { categories: s } = R(), { getCategoryName: o } = q(), r = o(t);
64
64
  return /* @__PURE__ */ C(S, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.2.4-alpha.al5",
3
+ "version": "9.2.5",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -1,233 +0,0 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import h from "@mui/material/Box";
3
- import b from "@mui/material/Stack";
4
- import { H2 as I, Drawer as L } from "@mxenabled/mxui";
5
- import $ from "@mui/material/Button";
6
- import Y from "@mui/material/IconButton";
7
- import { ArrowBack as _ } from "@mxenabled/mx-icons";
8
- const E = ({
9
- footerStyles: n = {},
10
- hasSecondaryAction: a = !0,
11
- isPrimaryDisabled: i,
12
- onPrimaryAction: r,
13
- onSecondaryAction: o,
14
- primaryButtonProps: u = {},
15
- primaryColor: g = "primary",
16
- primaryText: d = "Save",
17
- secondaryColor: c = "primary",
18
- secondaryText: x = "Cancel"
19
- }) => /* @__PURE__ */ s(
20
- b,
21
- {
22
- sx: {
23
- bgcolor: "background.paper",
24
- flexDirection: "row",
25
- gap: 16,
26
- justifyContent: "flex-end",
27
- p: 24,
28
- ...n
29
- },
30
- children: [
31
- a && /* @__PURE__ */ e(
32
- $,
33
- {
34
- color: c,
35
- onClick: o,
36
- variant: r ? "outlined" : "contained",
37
- children: x
38
- }
39
- ),
40
- r && /* @__PURE__ */ e(
41
- $,
42
- {
43
- ...u,
44
- color: g,
45
- disabled: i,
46
- onClick: r,
47
- variant: "contained",
48
- children: d
49
- }
50
- )
51
- ]
52
- }
53
- ), F = ({
54
- ariaLabelClose: n,
55
- onClose: a,
56
- shouldShowBorders: i,
57
- shouldShowShadow: r,
58
- title: o
59
- }) => /* @__PURE__ */ s(
60
- b,
61
- {
62
- "aria-labelledby": `${o?.replace(/\s+/g, "-").toLowerCase()}-header-title`,
63
- direction: "row",
64
- sx: {
65
- alignItems: "center",
66
- backgroundColor: "background.paper",
67
- ...i && {
68
- borderBottom: 1,
69
- borderColor: "divider"
70
- },
71
- ...r && {
72
- boxShadow: "0px 2px 8px 0px #6A73811F"
73
- },
74
- padding: "8px 8px 8px 8px"
75
- },
76
- children: [
77
- /* @__PURE__ */ e(Y, { "aria-label": n, autoFocus: !0, color: "primary", onClick: a, children: /* @__PURE__ */ e(_, { color: "primary", sx: { fontSize: 22 } }) }),
78
- /* @__PURE__ */ e(
79
- h,
80
- {
81
- sx: {
82
- flexGrow: 1,
83
- margin: "auto",
84
- textAlign: "center"
85
- },
86
- children: /* @__PURE__ */ e(
87
- I,
88
- {
89
- bold: !0,
90
- id: `${o?.replace(/\s+/g, "-").toLowerCase()}-header-title`,
91
- variant: "body1",
92
- children: o
93
- }
94
- )
95
- }
96
- ),
97
- /* @__PURE__ */ e(h, { width: "44px" })
98
- ]
99
- }
100
- ), K = ({
101
- ariaLabelClose: n = "Close",
102
- children: a,
103
- footerStyles: i = {},
104
- hasSecondaryAction: r = !0,
105
- id: o,
106
- isOpen: u,
107
- isPrimaryDisabled: g,
108
- onClose: d,
109
- onPrimaryAction: c,
110
- onSecondaryAction: x,
111
- primaryButtonProps: k,
112
- primaryColor: y = "primary",
113
- primaryText: S,
114
- secondaryColor: D = "secondary",
115
- secondaryText: B,
116
- shouldShowHeaderBorders: H = !0,
117
- shouldShowHeaderShadow: M = !1,
118
- title: w,
119
- ...j
120
- }) => /* @__PURE__ */ e(
121
- L,
122
- {
123
- id: o,
124
- isOpen: u,
125
- onClose: d,
126
- slotProps: {
127
- paper: {
128
- "aria-labelledby": `${w?.replace(/\s+/g, "-").toLowerCase()}-header-title`
129
- }
130
- },
131
- sx: {
132
- "& .MuiDrawer-paper": {
133
- backgroundColor: "background.default",
134
- borderRadius: 0,
135
- // Small viewport height so the paper fits the visible area when the
136
- // browser reports it correctly (Safari iOS, most browsers). Chrome iOS
137
- // does not expose the region behind its bottom toolbar in any viewport
138
- // metric, so height units alone can't help there — the generous bottom
139
- // padding on the scroll container (below) is what clears the toolbar.
140
- height: "100svh"
141
- },
142
- height: "100%",
143
- "& .MuiToolbar-root": {
144
- backgroundColor: "background.paper"
145
- }
146
- },
147
- ...j,
148
- children: /* @__PURE__ */ s(b, { height: "100%", justifyContent: "space-between", children: [
149
- /* @__PURE__ */ e(
150
- F,
151
- {
152
- ariaLabelClose: n,
153
- onClose: d,
154
- shouldShowBorders: H,
155
- shouldShowShadow: M,
156
- title: w
157
- }
158
- ),
159
- /* @__PURE__ */ s(
160
- h,
161
- {
162
- height: "100%",
163
- overflow: "auto",
164
- ref: (t) => {
165
- if (!t || typeof window > "u") return;
166
- const f = window, l = t.closest(".MuiDrawer-paper"), m = () => {
167
- const C = t.getBoundingClientRect(), p = l?.getBoundingClientRect();
168
- f.__drawerDbg = `box: h=${Math.round(C.height)} bottom=${Math.round(C.bottom)} client=${t.clientHeight} scroll=${t.scrollHeight} overflowY=${getComputedStyle(t).overflowY}
169
- paper: h=${p ? Math.round(p.height) : "-"} bottom=${p ? Math.round(p.bottom) : "-"} client=${l?.clientHeight} scroll=${l?.scrollHeight} overflowY=${l ? getComputedStyle(l).overflowY : "-"}
170
- innerH=${window.innerHeight}`;
171
- const v = document.getElementById("drawer-dbg");
172
- v && (v.textContent = f.__drawerDbg);
173
- };
174
- setTimeout(m, 300), t.addEventListener("scroll", m);
175
- },
176
- children: [
177
- /* @__PURE__ */ e(
178
- "div",
179
- {
180
- id: "drawer-dbg",
181
- style: {
182
- position: "fixed",
183
- top: 0,
184
- left: 0,
185
- zIndex: 2147483647,
186
- background: "rgba(0,0,0,0.85)",
187
- color: "#0f0",
188
- font: "10px/1.3 monospace",
189
- padding: "4px 6px",
190
- whiteSpace: "pre",
191
- pointerEvents: "none"
192
- }
193
- }
194
- ),
195
- a,
196
- /* @__PURE__ */ e(
197
- h,
198
- {
199
- "aria-hidden": !0,
200
- sx: {
201
- flexShrink: 0,
202
- height: {
203
- xs: "calc(env(safe-area-inset-bottom, 0px) + 96px)",
204
- sm: "env(safe-area-inset-bottom, 0px)"
205
- }
206
- }
207
- }
208
- )
209
- ]
210
- }
211
- ),
212
- c && /* @__PURE__ */ e(
213
- E,
214
- {
215
- footerStyles: i,
216
- hasSecondaryAction: r,
217
- isPrimaryDisabled: g,
218
- onPrimaryAction: c,
219
- onSecondaryAction: x ?? d,
220
- primaryButtonProps: k,
221
- primaryColor: y,
222
- primaryText: S,
223
- secondaryColor: D,
224
- secondaryText: B
225
- }
226
- )
227
- ] })
228
- }
229
- );
230
- export {
231
- K as D
232
- };
233
- //# sourceMappingURL=Drawer-BDN1RgiP.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Drawer-BDN1RgiP.mjs","sources":["../src/common/components/drawer/Footer.tsx","../src/common/components/drawer/Header.tsx","../src/common/components/drawer/Drawer.tsx"],"sourcesContent":["import Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport { type SxProps } from '@mui/material/styles'\n\ntype Color = 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n\ntype FooterProps = {\n footerStyles?: SxProps\n hasSecondaryAction?: boolean\n isPrimaryDisabled?: boolean\n onPrimaryAction?: () => void\n onSecondaryAction?: () => void\n primaryButtonProps?: React.ComponentProps<typeof Button>\n primaryColor?: Color\n primaryText?: string\n secondaryColor?: Color\n secondaryText?: string\n}\n\nconst Footer = ({\n footerStyles = {},\n hasSecondaryAction = true,\n isPrimaryDisabled,\n onPrimaryAction,\n onSecondaryAction,\n primaryButtonProps = {},\n primaryColor = 'primary',\n primaryText = 'Save',\n secondaryColor = 'primary',\n secondaryText = 'Cancel',\n}: FooterProps) => {\n return (\n <Stack\n sx={{\n bgcolor: 'background.paper',\n flexDirection: 'row',\n gap: 16,\n justifyContent: 'flex-end',\n p: 24,\n ...footerStyles,\n }}\n >\n {hasSecondaryAction && (\n <Button\n color={secondaryColor}\n onClick={onSecondaryAction}\n variant={onPrimaryAction ? 'outlined' : 'contained'}\n >\n {secondaryText}\n </Button>\n )}\n\n {onPrimaryAction && (\n <Button\n {...primaryButtonProps}\n color={primaryColor}\n disabled={isPrimaryDisabled}\n onClick={onPrimaryAction}\n variant=\"contained\"\n >\n {primaryText}\n </Button>\n )}\n </Stack>\n )\n}\n\nexport default Footer\n","import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport IconButton from '@mui/material/IconButton'\n\nimport { ArrowBack } from '@mxenabled/mx-icons'\n\nimport { H2 } from '@mxenabled/mxui'\n\ninterface DrawerHeaderProps {\n ariaLabelClose: string\n onClose: () => void\n shouldShowBorders: boolean\n shouldShowShadow?: boolean\n title: string\n}\n\nconst DrawerHeader: React.FC<DrawerHeaderProps> = ({\n ariaLabelClose,\n onClose,\n shouldShowBorders,\n shouldShowShadow,\n title,\n}) => {\n return (\n <Stack\n aria-labelledby={`${title?.replace(/\\s+/g, '-').toLowerCase()}-header-title`}\n direction=\"row\"\n sx={{\n alignItems: 'center',\n backgroundColor: 'background.paper',\n ...(shouldShowBorders && {\n borderBottom: 1,\n borderColor: 'divider',\n }),\n ...(shouldShowShadow && {\n boxShadow: '0px 2px 8px 0px #6A73811F',\n }),\n padding: '8px 8px 8px 8px',\n }}\n >\n <IconButton aria-label={ariaLabelClose} autoFocus={true} color=\"primary\" onClick={onClose}>\n <ArrowBack color=\"primary\" sx={{ fontSize: 22 }} />\n </IconButton>\n <Box\n sx={{\n flexGrow: 1,\n margin: 'auto',\n textAlign: 'center',\n }}\n >\n <H2\n bold={true}\n id={`${title?.replace(/\\s+/g, '-').toLowerCase()}-header-title`}\n variant=\"body1\"\n >\n {title}\n </H2>\n </Box>\n {/* placeholder for when we add a button here, this also ensures the title text is centered */}\n <Box width=\"44px\" />\n </Stack>\n )\n}\n\nexport default DrawerHeader\n","import React from 'react'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Drawer as KMuiDrawer } from '@mxenabled/mxui'\n\nimport Footer from './Footer'\nimport Header from './Header'\n\nexport type CopyObject = {\n close_drawer_aria: string\n}\n\ninterface DrawerProps {\n ariaLabelClose?: string\n className?: string\n footerStyles?: SxProps\n hasSecondaryAction?: boolean\n id?: string\n isOpen: boolean\n isPrimaryDisabled?: boolean\n onClose: () => void\n onPrimaryAction?: () => void\n onSecondaryAction?: () => void\n primaryButtonProps?: React.ComponentProps<typeof Button>\n primaryColor?: 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n primaryText?: string\n secondaryColor?: 'primary' | 'inherit' | 'secondary' | 'success' | 'error' | 'info' | 'warning'\n secondaryText?: string\n shouldShowHeaderBorders?: boolean\n shouldShowHeaderShadow?: boolean\n sx?: SxProps\n title: string\n}\n\nconst Drawer: React.FC<React.PropsWithChildren<DrawerProps>> = ({\n ariaLabelClose = 'Close',\n children,\n footerStyles = {},\n hasSecondaryAction = true,\n id,\n isOpen,\n isPrimaryDisabled,\n onClose,\n onPrimaryAction,\n onSecondaryAction,\n primaryButtonProps,\n primaryColor = 'primary',\n primaryText,\n secondaryColor = 'secondary',\n secondaryText,\n shouldShowHeaderBorders = true,\n shouldShowHeaderShadow = false,\n title,\n ...rest\n}) => {\n return (\n <KMuiDrawer\n id={id}\n isOpen={isOpen}\n onClose={onClose}\n slotProps={{\n paper: {\n 'aria-labelledby': `${title?.replace(/\\s+/g, '-').toLowerCase()}-header-title`,\n },\n }}\n sx={{\n '& .MuiDrawer-paper': {\n backgroundColor: 'background.default',\n borderRadius: 0,\n // Small viewport height so the paper fits the visible area when the\n // browser reports it correctly (Safari iOS, most browsers). Chrome iOS\n // does not expose the region behind its bottom toolbar in any viewport\n // metric, so height units alone can't help there — the generous bottom\n // padding on the scroll container (below) is what clears the toolbar.\n height: '100svh',\n },\n height: '100%',\n '& .MuiToolbar-root': {\n backgroundColor: 'background.paper',\n },\n }}\n {...rest}\n >\n <Stack height=\"100%\" justifyContent=\"space-between\">\n <Header\n ariaLabelClose={ariaLabelClose}\n onClose={onClose}\n shouldShowBorders={shouldShowHeaderBorders}\n shouldShowShadow={shouldShowHeaderShadow}\n title={title}\n />\n\n <Box\n height=\"100%\"\n overflow=\"auto\"\n ref={(el: HTMLDivElement | null) => {\n // TEMP DEBUG (MEW-3820): report the real scroll geometry of THIS box\n // vs the paper, so we know which element actually scrolls on Chrome iOS.\n if (!el || typeof window === 'undefined') return\n const w = window as unknown as { __drawerDbg?: string }\n const paper = el.closest('.MuiDrawer-paper') as HTMLElement | null\n const report = () => {\n const r = el.getBoundingClientRect()\n const pr = paper?.getBoundingClientRect()\n w.__drawerDbg =\n `box: h=${Math.round(r.height)} bottom=${Math.round(r.bottom)} ` +\n `client=${el.clientHeight} scroll=${el.scrollHeight} ` +\n `overflowY=${getComputedStyle(el).overflowY}\\n` +\n `paper: h=${pr ? Math.round(pr.height) : '-'} bottom=${pr ? Math.round(pr.bottom) : '-'} ` +\n `client=${paper?.clientHeight} scroll=${paper?.scrollHeight} ` +\n `overflowY=${paper ? getComputedStyle(paper).overflowY : '-'}\\n` +\n `innerH=${window.innerHeight}`\n const box = document.getElementById('drawer-dbg')\n if (box) box.textContent = w.__drawerDbg\n }\n setTimeout(report, 300)\n el.addEventListener('scroll', report)\n }}\n >\n <div\n id=\"drawer-dbg\"\n style={{\n position: 'fixed',\n top: 0,\n left: 0,\n zIndex: 2147483647,\n background: 'rgba(0,0,0,0.85)',\n color: '#0f0',\n font: '10px/1.3 monospace',\n padding: '4px 6px',\n whiteSpace: 'pre',\n pointerEvents: 'none',\n }}\n />\n {children}\n {/*\n Spacer instead of padding-bottom: WebKit / Chrome iOS drop a scroll\n container's own padding-bottom at the scroll extreme, so padding here\n is not scrollable. A block-level child with explicit height IS part\n of the scroll range, so it reliably lets the last item clear Chrome\n iOS's bottom toolbar (~80px, which no viewport metric exposes) and\n the native-webview home-indicator safe area. Compact screens only.\n TODO(MEW-3820 follow-up): revisit with a proper mobile scroll model\n that lets the document scroll (retracting Chrome's toolbar).\n */}\n <Box\n aria-hidden={true}\n sx={{\n flexShrink: 0,\n height: {\n xs: 'calc(env(safe-area-inset-bottom, 0px) + 96px)',\n sm: 'env(safe-area-inset-bottom, 0px)',\n },\n }}\n />\n </Box>\n\n {onPrimaryAction && (\n <Footer\n footerStyles={footerStyles}\n hasSecondaryAction={hasSecondaryAction}\n isPrimaryDisabled={isPrimaryDisabled}\n onPrimaryAction={onPrimaryAction}\n onSecondaryAction={onSecondaryAction ?? onClose}\n primaryButtonProps={primaryButtonProps}\n primaryColor={primaryColor}\n primaryText={primaryText}\n secondaryColor={secondaryColor}\n secondaryText={secondaryText}\n />\n )}\n </Stack>\n </KMuiDrawer>\n )\n}\n\nexport default Drawer\n"],"names":["Footer","footerStyles","hasSecondaryAction","isPrimaryDisabled","onPrimaryAction","onSecondaryAction","primaryButtonProps","primaryColor","primaryText","secondaryColor","secondaryText","jsxs","Stack","jsx","Button","DrawerHeader","ariaLabelClose","onClose","shouldShowBorders","shouldShowShadow","title","IconButton","ArrowBack","Box","H2","Drawer","children","id","isOpen","shouldShowHeaderBorders","shouldShowHeaderShadow","rest","KMuiDrawer","Header","el","w","paper","report","r","pr","box"],"mappings":";;;;;;;AAmBA,MAAMA,IAAS,CAAC;AAAA,EACd,cAAAC,IAAe,CAAA;AAAA,EACf,oBAAAC,IAAqB;AAAA,EACrB,mBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,oBAAAC,IAAqB,CAAA;AAAA,EACrB,cAAAC,IAAe;AAAA,EACf,aAAAC,IAAc;AAAA,EACd,gBAAAC,IAAiB;AAAA,EACjB,eAAAC,IAAgB;AAClB,MAEI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,IAAI;AAAA,MACF,SAAS;AAAA,MACT,eAAe;AAAA,MACf,KAAK;AAAA,MACL,gBAAgB;AAAA,MAChB,GAAG;AAAA,MACH,GAAGX;AAAA,IAAA;AAAA,IAGJ,UAAA;AAAA,MAAAC,KACC,gBAAAW;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,OAAOL;AAAA,UACP,SAASJ;AAAA,UACT,SAASD,IAAkB,aAAa;AAAA,UAEvC,UAAAM;AAAA,QAAA;AAAA,MAAA;AAAA,MAIJN,KACC,gBAAAS;AAAA,QAACC;AAAA,QAAA;AAAA,UACE,GAAGR;AAAA,UACJ,OAAOC;AAAA,UACP,UAAUJ;AAAA,UACV,SAASC;AAAA,UACT,SAAQ;AAAA,UAEP,UAAAI;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAAA,GC3CFO,IAA4C,CAAC;AAAA,EAC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oBAAAC;AAAA,UACA,mBAAAC;AAAA,UACA,iBAAAC;AAAA,UACA,mBAAmBC,KAAqBY;AAAA,UACxC,oBAAAX;AAAA,UACA,cAAAC;AAAA,UACA,aAAAC;AAAA,UACA,gBAAAC;AAAA,UACA,eAAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IACF,EAAA,CAEJ;AAAA,EAAA;AAAA;"}
@@ -1,230 +0,0 @@
1
- import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
- import B from "react";
3
- import { observer as I } from "mobx-react-lite";
4
- import j from "@mui/material/Box";
5
- import C from "@mui/material/Button";
6
- import P from "@mui/material/Divider";
7
- import w from "@mui/material/IconButton";
8
- import O from "@mui/material/Popover";
9
- import A from "@mui/material/Stack";
10
- import E from "@mui/material/Tooltip";
11
- import { FilterAlt as F } from "@mxenabled/mx-icons";
12
- import S from "@mui/material/Checkbox";
13
- import G from "@mui/material/List";
14
- import g from "@mui/material/ListItem";
15
- import _ from "@mui/material/ListItemButton";
16
- import H from "@mui/material/ListItemIcon";
17
- import v from "@mui/material/ListItemText";
18
- import { a as M, u as W, c as z } from "./hooks-97sNJ_lf.mjs";
19
- const R = I(
20
- ({ allowedAccountTypes: l }) => {
21
- const { accountFilterMap: s, updateAccountFilterMap: m } = M(), { accounts: x, common: y } = W(), { account_filter: u } = y, { accountsByTypeMap: a } = z(), k = B.useMemo(
22
- () => Array.from(a.keys()).reduce((e, r) => {
23
- if (!l || l && l.includes(r)) {
24
- const i = a.get(r);
25
- i && e.push(...i);
26
- }
27
- return e;
28
- }, []),
29
- [a, l]
30
- ), p = new Map(
31
- Array.from(s.entries()).filter(([e]) => k.some((r) => r.guid === e))
32
- ), c = Array.from(p.values()).every((e) => e), f = Array.from(p.values()).some((e) => e), h = () => {
33
- for (const e of p.keys())
34
- m(e, !c);
35
- }, b = (e) => {
36
- const r = a.get(e);
37
- if (!r) return;
38
- const i = r.some((o) => s.get(o.guid));
39
- for (const o of r)
40
- m(o.guid, !i);
41
- };
42
- return /* @__PURE__ */ d(
43
- G,
44
- {
45
- dense: !0,
46
- id: "filter_accounts",
47
- sx: { overflowY: "scroll", maxHeight: 350, minWidth: 280 },
48
- children: [
49
- /* @__PURE__ */ t(g, { disableGutters: !0, disablePadding: !0, sx: { py: 16 }, children: /* @__PURE__ */ d(
50
- _,
51
- {
52
- "aria-checked": !c && f ? "mixed" : c,
53
- disableGutters: !0,
54
- onClick: h,
55
- role: "checkbox",
56
- sx: { p: 0, px: 8 },
57
- children: [
58
- /* @__PURE__ */ t(
59
- S,
60
- {
61
- "aria-hidden": !0,
62
- checked: c,
63
- disableRipple: !0,
64
- indeterminate: !c && f,
65
- size: "small",
66
- slotProps: { input: { "aria-hidden": !0 } },
67
- tabIndex: -1
68
- }
69
- ),
70
- /* @__PURE__ */ t(
71
- v,
72
- {
73
- id: "label-select-all",
74
- primary: u.select_all_accounts,
75
- slotProps: { primary: { variant: "body1", fontWeight: "normal" } }
76
- }
77
- )
78
- ]
79
- }
80
- ) }),
81
- Array.from(a.keys()).map((e) => {
82
- const r = a.get(e), i = l ? !l.includes(e) : !1, o = x.account_type_accounts[e];
83
- return (
84
- // Account Type Header
85
- /* @__PURE__ */ t(g, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ d(A, { sx: { pb: 8, width: "100%" }, children: [
86
- /* @__PURE__ */ t(P, {}),
87
- /* @__PURE__ */ t(
88
- G,
89
- {
90
- dense: !0,
91
- subheader: /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(
92
- _,
93
- {
94
- disableGutters: !0,
95
- disabled: i,
96
- onClick: () => b(e),
97
- sx: { pl: 16, minHeight: 40, justifyContent: "left" },
98
- children: /* @__PURE__ */ t(
99
- v,
100
- {
101
- primary: o,
102
- slotProps: { primary: { variant: "body1", fontWeight: "bold" } }
103
- }
104
- )
105
- }
106
- ) }),
107
- children: r?.map((n) => (
108
- // Account Checkbox
109
- /* @__PURE__ */ t(g, { children: /* @__PURE__ */ d(
110
- _,
111
- {
112
- "aria-checked": !!s.get(n.guid),
113
- disableGutters: !0,
114
- disabled: i,
115
- onClick: () => m(n.guid, !s.get(n.guid)),
116
- role: "checkbox",
117
- sx: { p: 0, minHeight: 40 },
118
- children: [
119
- /* @__PURE__ */ t(H, { children: /* @__PURE__ */ t(
120
- S,
121
- {
122
- "aria-hidden": !0,
123
- checked: !!s.get(n.guid),
124
- disableRipple: !0,
125
- size: "small",
126
- slotProps: { input: { "aria-hidden": !0 } },
127
- tabIndex: -1
128
- }
129
- ) }),
130
- /* @__PURE__ */ t(
131
- v,
132
- {
133
- id: `label-${n.guid}`,
134
- primary: n.displayName,
135
- slotProps: { primary: { variant: "body1", fontWeight: "normal" } }
136
- }
137
- )
138
- ]
139
- }
140
- ) }, n.guid)
141
- ))
142
- }
143
- )
144
- ] }) }, e)
145
- );
146
- })
147
- ]
148
- }
149
- );
150
- }
151
- ), nt = I(
152
- ({
153
- allowedAccountTypes: l,
154
- isDesktop: s,
155
- onAccountFilterClick: m,
156
- sx: x = {},
157
- variant: y = "text"
158
- }) => {
159
- const { common: u } = W(), { accountFilterMap: a, resetAccountFilterMap: k } = M(), { detailedAccounts: p, updateAccountFilter: c } = z(), [f, h] = B.useState(null), b = (L) => {
160
- k(), h(L.currentTarget), m?.();
161
- }, e = () => {
162
- h(null);
163
- }, r = async () => {
164
- await c(a), h(null);
165
- }, i = u.account_filter, o = !!f, n = p.length === 0;
166
- return /* @__PURE__ */ d(j, { sx: { ...x }, children: [
167
- s ? /* @__PURE__ */ t(
168
- C,
169
- {
170
- "aria-controls": o ? "filter_accounts" : void 0,
171
- "aria-expanded": o,
172
- "aria-haspopup": !0,
173
- "aria-label": i.title,
174
- disabled: n,
175
- onClick: b,
176
- startIcon: /* @__PURE__ */ t(F, { size: 24 }),
177
- sx: { p: 8, whiteSpace: "nowrap", minWidth: "max-content" },
178
- variant: y,
179
- children: u.filter_button
180
- }
181
- ) : /* @__PURE__ */ t(E, { id: "filter-accounts", placement: "bottom", title: i.title, children: /* @__PURE__ */ t(
182
- w,
183
- {
184
- "aria-controls": o ? "filter_accounts" : void 0,
185
- "aria-describedby": "filter-accounts",
186
- "aria-expanded": o,
187
- "aria-haspopup": !0,
188
- "aria-label": i.title,
189
- color: "primary",
190
- disabled: n,
191
- onClick: b,
192
- sx: { p: 8 },
193
- children: /* @__PURE__ */ t(F, { size: 24 })
194
- }
195
- ) }),
196
- /* @__PURE__ */ t(
197
- O,
198
- {
199
- anchorEl: f,
200
- anchorOrigin: { vertical: "bottom", horizontal: "left" },
201
- onClose: e,
202
- open: o,
203
- transformOrigin: { vertical: "top", horizontal: "left" },
204
- children: /* @__PURE__ */ d(A, { children: [
205
- /* @__PURE__ */ t(R, { allowedAccountTypes: l }),
206
- /* @__PURE__ */ t(P, {}),
207
- /* @__PURE__ */ d(A, { direction: "row", justifyContent: "space-between", spacing: 16, sx: { p: 16 }, children: [
208
- /* @__PURE__ */ t(C, { fullWidth: !0, onClick: e, variant: "text", children: u.cancel_button }),
209
- /* @__PURE__ */ t(
210
- C,
211
- {
212
- "aria-label": i.filter_button_generic_aria,
213
- color: "primary",
214
- fullWidth: !0,
215
- onClick: r,
216
- variant: "contained",
217
- children: u.filter_button
218
- }
219
- )
220
- ] })
221
- ] })
222
- }
223
- )
224
- ] });
225
- }
226
- );
227
- export {
228
- nt as G
229
- };
230
- //# sourceMappingURL=GlobalAccountFilter-BhzR5Vb1.mjs.map