@mx-cartographer/experiences 7.11.17 → 7.11.19

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.11.19] - 03-11-2026
2
+
3
+ - **ADDED** - A11y adjustments to chart markers, legends, tooltips
4
+
5
+ ## [7.11.18] - 03-10-2026
6
+
7
+ - **FIXED** - Filter ADA bug.
8
+
1
9
  ## [7.11.17] - 03-10-2026
2
10
 
3
11
  - **FIXED** - Chart layout and spacing issues
@@ -0,0 +1,237 @@
1
+ import { jsxs as d, jsx as e } 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 S from "@mui/material/Stack";
10
+ import D from "@mui/material/Tooltip";
11
+ import { FilterAlt as A } from "@mxenabled/mx-icons";
12
+ import F from "@mui/material/Checkbox";
13
+ import G from "@mui/material/List";
14
+ import y from "@mui/material/ListItem";
15
+ import _ from "@mui/material/ListItemButton";
16
+ import E from "@mui/material/ListItemIcon";
17
+ import v from "@mui/material/ListItemText";
18
+ import { b as z, u as M, d as L } from "./hooks-zu7yblbi.mjs";
19
+ import { u as H } from "./useScreenSize-B6JyS_Lj.mjs";
20
+ const N = I(
21
+ ({ allowedAccountTypes: a }) => {
22
+ const { accountFilterMap: s, updateAccountFilterMap: u } = z(), { accounts: g, common: x } = M(), { account_filter: c } = x, { accountsByTypeMap: n } = L(), k = B.useMemo(
23
+ () => Array.from(n.keys()).reduce((t, i) => {
24
+ if (!a || a && a.includes(i)) {
25
+ const o = n.get(i);
26
+ o && t.push(...o);
27
+ }
28
+ return t;
29
+ }, []),
30
+ [n, a]
31
+ ), p = new Map(
32
+ Array.from(s.entries()).filter(([t]) => k.some((i) => i.guid === t))
33
+ ), m = Array.from(p.values()).every((t) => t), h = Array.from(p.values()).some((t) => t), f = () => {
34
+ for (const t of p.keys())
35
+ u(t, !m);
36
+ }, b = (t) => {
37
+ const i = n.get(t);
38
+ if (!i) return;
39
+ const o = i.some((r) => s.get(r.guid));
40
+ for (const r of i)
41
+ u(r.guid, !o);
42
+ };
43
+ return /* @__PURE__ */ d(
44
+ G,
45
+ {
46
+ dense: !0,
47
+ id: "filter_accounts",
48
+ sx: { overflowY: "scroll", maxHeight: 350, minWidth: 280 },
49
+ children: [
50
+ /* @__PURE__ */ e(
51
+ y,
52
+ {
53
+ "aria-label": c.select_all_accounts,
54
+ disableGutters: !0,
55
+ disablePadding: !0,
56
+ role: "menuitem",
57
+ sx: { py: 16 },
58
+ children: /* @__PURE__ */ d(_, { disableGutters: !0, onClick: f, sx: { p: 0, px: 8 }, children: [
59
+ /* @__PURE__ */ e(
60
+ F,
61
+ {
62
+ "aria-checked": m,
63
+ checked: m,
64
+ disableRipple: !0,
65
+ indeterminate: !m && h,
66
+ inputProps: { "aria-labelledby": "label-select-all" },
67
+ size: "small",
68
+ tabIndex: -1
69
+ }
70
+ ),
71
+ /* @__PURE__ */ e(
72
+ v,
73
+ {
74
+ id: "label-select-all",
75
+ primary: c.select_all_accounts,
76
+ primaryTypographyProps: { variant: "body1" }
77
+ }
78
+ )
79
+ ] })
80
+ }
81
+ ),
82
+ Array.from(n.keys()).map((t) => {
83
+ const i = n.get(t), o = a ? !a.includes(t) : !1, r = g.account_type_accounts[t];
84
+ return (
85
+ // Account Type Header
86
+ /* @__PURE__ */ e(
87
+ y,
88
+ {
89
+ "aria-label": r,
90
+ disableGutters: !0,
91
+ disablePadding: !0,
92
+ children: /* @__PURE__ */ d(S, { sx: { pb: 8, width: "100%" }, children: [
93
+ /* @__PURE__ */ e(P, {}),
94
+ /* @__PURE__ */ e(
95
+ G,
96
+ {
97
+ dense: !0,
98
+ role: "menu",
99
+ subheader: /* @__PURE__ */ e(y, { "aria-label": r, role: "menu", children: /* @__PURE__ */ e(
100
+ _,
101
+ {
102
+ disableGutters: !0,
103
+ disabled: o,
104
+ onClick: () => b(t),
105
+ sx: { pl: 16, minHeight: 40, justifyContent: "left" },
106
+ children: /* @__PURE__ */ e(
107
+ v,
108
+ {
109
+ primary: r,
110
+ primaryTypographyProps: { variant: "body1", fontWeight: "bold" }
111
+ }
112
+ )
113
+ }
114
+ ) }),
115
+ children: i?.map((l) => (
116
+ // Account Checkbox
117
+ /* @__PURE__ */ e(y, { "aria-label": l.displayName, role: "menuitem", children: /* @__PURE__ */ d(
118
+ _,
119
+ {
120
+ disableGutters: !0,
121
+ disabled: o,
122
+ onClick: () => u(l.guid, !s.get(l.guid)),
123
+ sx: { p: 0, minHeight: 40 },
124
+ children: [
125
+ /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(
126
+ F,
127
+ {
128
+ "aria-checked": s.get(l.guid),
129
+ checked: s.get(l.guid),
130
+ disableRipple: !0,
131
+ inputProps: { "aria-labelledby": `label-${l.guid}` },
132
+ size: "small",
133
+ tabIndex: -1
134
+ }
135
+ ) }),
136
+ /* @__PURE__ */ e(
137
+ v,
138
+ {
139
+ id: `label-${l.guid}`,
140
+ primary: l.displayName,
141
+ primaryTypographyProps: { variant: "body1" }
142
+ }
143
+ )
144
+ ]
145
+ }
146
+ ) }, l.guid)
147
+ ))
148
+ }
149
+ )
150
+ ] })
151
+ },
152
+ t
153
+ )
154
+ );
155
+ })
156
+ ]
157
+ }
158
+ );
159
+ }
160
+ ), ne = I(
161
+ ({
162
+ allowedAccountTypes: a,
163
+ onAccountFilterClick: s,
164
+ sx: u = {},
165
+ variant: g = "text"
166
+ }) => {
167
+ const { isDesktop: x } = H(), { common: c } = M(), { accountFilterMap: n, resetAccountFilterMap: k } = z(), { detailedAccounts: p, updateAccountFilter: m } = L(), [h, f] = B.useState(null), b = (W) => {
168
+ k(), f(W.currentTarget), s?.();
169
+ }, t = () => {
170
+ f(null);
171
+ }, i = async () => {
172
+ await m(n), f(null);
173
+ }, o = c.account_filter, r = !!h, l = p.length === 0;
174
+ return /* @__PURE__ */ d(j, { m: 4, sx: { ...u }, children: [
175
+ x ? /* @__PURE__ */ e(
176
+ C,
177
+ {
178
+ "aria-controls": r ? "filter_accounts" : void 0,
179
+ "aria-expanded": r,
180
+ "aria-haspopup": !0,
181
+ "aria-label": o.title,
182
+ disabled: l,
183
+ onClick: b,
184
+ startIcon: /* @__PURE__ */ e(A, { size: 24 }),
185
+ sx: { p: 8, whiteSpace: "nowrap", minWidth: "max-content" },
186
+ variant: g,
187
+ children: c.filter_button
188
+ }
189
+ ) : /* @__PURE__ */ e(D, { id: "filter-accounts", placement: "bottom", title: o.title, children: /* @__PURE__ */ e(
190
+ w,
191
+ {
192
+ "aria-controls": r ? "filter_accounts" : void 0,
193
+ "aria-describedby": "filter-accounts",
194
+ "aria-expanded": r,
195
+ "aria-haspopup": !0,
196
+ "aria-label": o.title,
197
+ color: "primary",
198
+ disabled: l,
199
+ onClick: b,
200
+ sx: { p: 8 },
201
+ children: /* @__PURE__ */ e(A, { size: 24 })
202
+ }
203
+ ) }),
204
+ /* @__PURE__ */ e(
205
+ O,
206
+ {
207
+ anchorEl: h,
208
+ anchorOrigin: { vertical: "bottom", horizontal: "left" },
209
+ onClose: t,
210
+ open: r,
211
+ transformOrigin: { vertical: "top", horizontal: "left" },
212
+ children: /* @__PURE__ */ d(S, { children: [
213
+ /* @__PURE__ */ e(N, { allowedAccountTypes: a }),
214
+ /* @__PURE__ */ e(P, {}),
215
+ /* @__PURE__ */ d(S, { direction: "row", justifyContent: "space-between", spacing: 16, sx: { p: 16 }, children: [
216
+ /* @__PURE__ */ e(C, { fullWidth: !0, onClick: t, variant: "text", children: c.cancel_button }),
217
+ /* @__PURE__ */ e(
218
+ C,
219
+ {
220
+ "aria-label": o.filter_button_aria,
221
+ color: "primary",
222
+ fullWidth: !0,
223
+ onClick: i,
224
+ variant: "contained",
225
+ children: c.filter_button
226
+ }
227
+ )
228
+ ] })
229
+ ] })
230
+ }
231
+ )
232
+ ] });
233
+ }
234
+ );
235
+ export {
236
+ ne as G
237
+ };