@sheetxl/utils-mui 0.7.21 → 0.7.23
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/browser/cjs/{Ai0ovAjYzGfMAB7q.cjs → Det_KEDoT8nDWsx0.cjs} +2 -2
- package/browser/cjs/DpuyZ6OwV2vHfhHe.cjs +11 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{CMpdAXnJ5EbLrOu2.mjs → B_OtM1MMIR9xz4dC.mjs} +2 -2
- package/browser/esm/{BqMhjTIvQt09x92t.mjs → CiyyitwReU8GINeo.mjs} +866 -866
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{ojE1YgJ2zWQ8Q_AP.mjs → ev0GfCEwO6si6eml.mjs} +1 -1
- package/node/esm/index.mjs +111 -111
- package/package.json +3 -3
- package/types/index.d.ts +1 -2
- package/browser/cjs/L-4HMtCOn7QHkDi2.cjs +0 -11
package/node/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.
|
|
2
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.7.23
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
import { jsx as e, jsxs as t, Fragment as o } from "react/jsx-runtime";
|
|
8
8
|
import n, { memo as r, forwardRef as i, useMemo as a, useRef as l, useEffect as s, useState as c, useImperativeHandle as d, useCallback as p, useLayoutEffect as u, useReducer as m } from "react";
|
|
9
9
|
import h from "clsx";
|
|
10
|
-
import { alpha as f, darken as x, lighten as
|
|
11
|
-
import { IconButton as
|
|
10
|
+
import { alpha as f, darken as x, lighten as g } from "@mui/system";
|
|
11
|
+
import { IconButton as b, Divider as y, Box as v, Typography as k, Paper as w, Chip as C, Popper as M, Grow as S, Tooltip as R, ListItemIcon as P, MenuItem as D, Fade as E, Backdrop as T, DialogTitle as z, Button as $, DialogContent as O, DialogActions as I, Input as N, Toolbar as B } from "@mui/material";
|
|
12
12
|
import { ErrorUtils as L, CommonUtils as F } from "@sheetxl/utils";
|
|
13
13
|
import { defaultCreateScrollEdgeButton as A, ScrollbarOrientation as H, DynamicIcon as W, useCallbackRef as K, useFullscreenPortal as V, KeyCodes as j, KeyModifiers as _, ReactUtils as q, useImperativeElement as Q, useCommand as U, CommandButtonType as G, useCommands as X } from "@sheetxl/utils-react";
|
|
14
14
|
import { useTheme as Y, styled as J, createTheme as Z, useThemeProps as ee } from "@mui/material/styles";
|
|
@@ -29,9 +29,9 @@ const he = (e2) => {
|
|
|
29
29
|
const t2 = { style: { cursor: "pointer" }, ...e2 };
|
|
30
30
|
return A(t2);
|
|
31
31
|
}, fe = (t2, o2, n2, r2) => {
|
|
32
|
-
const { style: i2, ...a2 } = t2, l2 = e(
|
|
33
|
-
return e(
|
|
34
|
-
}, xe = (t2) => fe(t2, H.Horizontal ? e(W, { iconKey: "ArrowLeft", size: "small" }) : e(W, { iconKey: "ArrowUpward", size: "small" }), "Scroll " + (t2.orientation === H.Horizontal ? "Left" : "Up"), `Scroll ${t2.orientation === H.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`),
|
|
32
|
+
const { style: i2, ...a2 } = t2, l2 = e(b, { component: "div", ...a2, style: { ...i2, padding: "0px" }, sx: { padding: "0" }, color: t2.disabled ? void 0 : "primary", "aria-label": n2, size: "small", children: o2 });
|
|
33
|
+
return e(bt, { title: t2.disabled ? n2 : r2, enterDelay: 800, enterNextDelay: 1600, children: t2.disabled ? e("div", { style: { display: "flex" }, children: l2 }) : l2 });
|
|
34
|
+
}, xe = (t2) => fe(t2, H.Horizontal ? e(W, { iconKey: "ArrowLeft", size: "small" }) : e(W, { iconKey: "ArrowUpward", size: "small" }), "Scroll " + (t2.orientation === H.Horizontal ? "Left" : "Up"), `Scroll ${t2.orientation === H.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), ge = (t2) => fe(t2, H.Horizontal ? e(W, { iconKey: "ArrowRight", size: "small" }) : e(W, { iconKey: "ArrowDownward", size: "small" }), "Scroll " + (t2.orientation === H.Horizontal ? "Right" : "Down"), `Scroll ${t2.orientation === H.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), be = r(i((t2, o2) => {
|
|
35
35
|
const { orientation: n2 = "vertical", sx: r2, ...i2 } = t2, a2 = "vertical" === n2;
|
|
36
36
|
return e(y, { ref: o2, sx: { marginLeft: a2 ? "2px" : void 0, marginRight: a2 ? "2px" : void 0, backgroundColor: "transparent !important", minHeight: a2 ? "1em" : void 0, minWidth: a2 ? void 0 : "1em", borderColor: (e2) => e2.palette.divider, ...r2 }, orientation: n2, variant: "middle", flexItem: true, ...i2 });
|
|
37
37
|
})), ye = "_traverse-ellipsis_14l1h_1", ve = r((o2) => {
|
|
@@ -53,9 +53,9 @@ const he = (e2) => {
|
|
|
53
53
|
const { sx: n2, speed: r2 = 1, size: i2 = 13, width: a2 = 64, height: l2 = 17, ...s2 } = o2;
|
|
54
54
|
return t(v, { sx: { width: `${a2}px`, height: `${l2}px`, "& .primary": { backgroundColor: (e2) => e2.palette.grey[600], top: `${(l2 - i2) / 2}px`, width: () => `${i2}px`, height: () => `${i2}px` }, ...n2 }, className: h(ye, "animated-icon"), ...s2, children: [e("div", { className: "primary" }), e("div", { className: "primary" }), e("div", { className: "primary" }), e("div", { className: "primary" })] });
|
|
55
55
|
}), Re = e(ke, {}), Pe = r(i((o2, n2) => {
|
|
56
|
-
const { sx: r2, style: i2, onMount: c2, onUnmount: d2, transitionDelay: p2 = "1200ms", panel: u2 = false, transparentBackground: m2 = true, icon: h2 = Re, label: x2, ...
|
|
57
|
-
let o3 = t(v, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [
|
|
58
|
-
return true === u2 && (o3 = e(w, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", alignSelf: "center", marginBottom: "5%", backgroundColor: (e2) => e2.palette.info.light, color: (e2) => e2.palette.info.contrastText, paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2), paddingTop: (e2) => e2.spacing(2), paddingBottom: (e2) => e2.spacing(1), rowGap: (e2) => e2.spacing(1), borderRadius: (e2) => `${e2.shape.borderRadius}px`, boxShadow: (e2) => e2.shadows[2], "& .primary": { background: (e2) => `${f(e2.palette.info.contrastText, 0.9)} !important`, boxShadow: (e2) => `0 0 0 1px ${"dark" === e2.palette.mode ? e2.palette.text.secondary : e2.palette.divider}`, boxSizing: "content-box", border: "solid transparent" }, zIndex: 1 }, children: o3 })), e(v, { ref: ne([y2, n2]), className: "animatable", sx: { cursor: "wait", boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "column", willChange: "opacity", opacity: m2 ? 1e-3 : 1, transitionProperty: "opacity", transitionDelay: p2, transitionDuration: "320ms", transitionTimingFunction: "ease-in", overflow: "hidden", outline: "none", width: "100%", height: "100%", minWidth: 0, minHeight: 0, zIndex: 99999, "&.animating": { opacity: 1 }, "&.animating-exit": { opacity: 0, transition: "opacity 210ms" }, ...r2, ...i2 }, ...
|
|
56
|
+
const { sx: r2, style: i2, onMount: c2, onUnmount: d2, transitionDelay: p2 = "1200ms", panel: u2 = false, transparentBackground: m2 = true, icon: h2 = Re, label: x2, ...g2 } = o2, b2 = a(() => "string" == typeof x2 ? e(k, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: x2 }) : x2, [x2]), y2 = l(null), C2 = a(() => {
|
|
57
|
+
let o3 = t(v, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [b2, h2] });
|
|
58
|
+
return true === u2 && (o3 = e(w, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", alignSelf: "center", marginBottom: "5%", backgroundColor: (e2) => e2.palette.info.light, color: (e2) => e2.palette.info.contrastText, paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2), paddingTop: (e2) => e2.spacing(2), paddingBottom: (e2) => e2.spacing(1), rowGap: (e2) => e2.spacing(1), borderRadius: (e2) => `${e2.shape.borderRadius}px`, boxShadow: (e2) => e2.shadows[2], "& .primary": { background: (e2) => `${f(e2.palette.info.contrastText, 0.9)} !important`, boxShadow: (e2) => `0 0 0 1px ${"dark" === e2.palette.mode ? e2.palette.text.secondary : e2.palette.divider}`, boxSizing: "content-box", border: "solid transparent" }, zIndex: 1 }, children: o3 })), e(v, { ref: ne([y2, n2]), className: "animatable", sx: { cursor: "wait", boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "column", willChange: "opacity", opacity: m2 ? 1e-3 : 1, transitionProperty: "opacity", transitionDelay: p2, transitionDuration: "320ms", transitionTimingFunction: "ease-in", overflow: "hidden", outline: "none", width: "100%", height: "100%", minWidth: 0, minHeight: 0, zIndex: 99999, "&.animating": { opacity: 1 }, "&.animating-exit": { opacity: 0, transition: "opacity 210ms" }, ...r2, ...i2 }, ...g2, children: t(v, { className: "center", sx: { display: "flex", flex: "1 1 100%", height: "100%", width: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [e(v, { className: "backdrop", sx: { opacity: (e2) => m2 ? 1.5 * e2.palette.action.disabledOpacity : void 0, background: (e2) => m2 ? void 0 : e2.palette.background.paper, backdropFilter: "blur(4px)", borderRadius: (e2) => `${e2.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), o3] }) });
|
|
59
59
|
}, [r2, u2]), M2 = l(false), S2 = l(false);
|
|
60
60
|
return re(() => {
|
|
61
61
|
if (y2.current && !M2.current && !S2.current) {
|
|
@@ -103,7 +103,7 @@ const De = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, E
|
|
|
103
103
|
o3.length && (s2.push({ line: t2 ? `Caused by: ${o3[0].line}` : o3[0].line, isBoundary: true }), s2.push(...o3.slice(1)));
|
|
104
104
|
});
|
|
105
105
|
const d2 = n2 ? s2.slice(0, n2) : s2, p2 = n2 && s2.length > n2;
|
|
106
|
-
return t(v, { sx: { width: "100%", mt: 1 }, children: [t(v, { sx: { display: "flex", alignItems: "center", gap: 1, borderRadius: 1, px: 1, py: 0.5 }, children: [t(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", opacity: 0.8 }, children: ["Stack Trace(", l2.length > 1 ? ` (${l2.length} frames)` : "", ")"] }), e(v, { sx: { flex: 1 } }), i2 && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.8 }, children: i2 }), e(
|
|
106
|
+
return t(v, { sx: { width: "100%", mt: 1 }, children: [t(v, { sx: { display: "flex", alignItems: "center", gap: 1, borderRadius: 1, px: 1, py: 0.5 }, children: [t(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", opacity: 0.8 }, children: ["Stack Trace(", l2.length > 1 ? ` (${l2.length} frames)` : "", ")"] }), e(v, { sx: { flex: 1 } }), i2 && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.8 }, children: i2 }), e(b, { size: "small", onClick: async () => {
|
|
107
107
|
try {
|
|
108
108
|
let e2 = 0;
|
|
109
109
|
const t2 = s2.map((t3) => {
|
|
@@ -116,7 +116,7 @@ const De = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, E
|
|
|
116
116
|
} catch (e2) {
|
|
117
117
|
a2("Can't copy!"), console.warn("Failed to copy stack trace:", e2);
|
|
118
118
|
}
|
|
119
|
-
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Copy stack trace", children: e(W, { iconKey: "ContentCopy", style: { fontSize: "0.875rem" } }) }), e(
|
|
119
|
+
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Copy stack trace", children: e(W, { iconKey: "ContentCopy", style: { fontSize: "0.875rem" } }) }), e(b, { size: "small", onClick: () => {
|
|
120
120
|
a2("Logged!"), setTimeout(() => a2(null), 2e3), console.log(o2);
|
|
121
121
|
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: e(W, { iconKey: "BugReport", style: { fontSize: "0.875rem" } }) })] }), t(v, { sx: { mt: 1, backgroundColor: "rgba(0, 0, 0, 0.2)", borderRadius: 1, p: 1, maxHeight: "300px", overflow: "auto", fontFamily: "monospace", fontSize: "0.75rem", lineHeight: 1.4 }, children: [d2.map((o3, n3) => o3.isBoundary ? e(v, { sx: { py: 1, mt: n3 > 0 ? 1 : 0, mb: 0.5, borderTop: n3 > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none" }, children: e(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", fontWeight: "bold", color: (e2) => o3.isBoundary ? e2.palette.text.primary : e2.palette.text.secondary, display: "block" }, children: o3.line }) }, `error-${n3}`) : t(v, { sx: { display: "flex", alignItems: "flex-start", gap: 1, py: 0.25, pl: 1, "&:hover": { backgroundColor: "rgba(255, 255, 255, 0.05)" } }, children: [!r2 && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.5, minWidth: "20px", textAlign: "right", userSelect: "none" }, children: n3 + 1 }), t(v, { sx: { flex: 1, overflow: "hidden" }, children: [e(k, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", color: "inherit" }, children: o3.line }), o3.location && o3.line !== o3.location && e(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic" }, children: o3.location })] })] }, `stack-${n3}`)), p2 && t(k, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic", textAlign: "center", display: "block", mt: 1 }, children: ["... and ", s2.length - n2, " more frames"] })] })] });
|
|
122
122
|
});
|
|
@@ -150,7 +150,7 @@ const Oe = (o2, r2 = false, i2 = false, a2 = false) => {
|
|
|
150
150
|
let s2 = t2.rects.popper, c2 = s2.width, d2 = s2.height, p2 = t2.placement.split("-")[0], u2 = "left" === p2 ? "left" : "right", m2 = "top" === p2 ? "top" : "bottom";
|
|
151
151
|
t2.modifiersData[o2] = { width: c2 - r2[u2] - a2, height: d2 - r2[m2] - l2 };
|
|
152
152
|
} }, Be = [0, 2], Le = r(i((t2, o2) => {
|
|
153
|
-
const { sx: r2, open: i2, children: l2, label: p2, offsets: u2 = Be, anchorEl: m2, anchorPosition: h2, onMount: f2, onOpening: x2, onOpen:
|
|
153
|
+
const { sx: r2, open: i2, children: l2, label: p2, offsets: u2 = Be, anchorEl: m2, anchorPosition: h2, onMount: f2, onOpening: x2, onOpen: g2, onClosing: b2, onClose: y2, resizeOnOverflow: v2 = true, ...k2 } = t2;
|
|
154
154
|
if (Array.isArray(l2)) throw new Error("children can not be an array");
|
|
155
155
|
const w2 = Y(), C2 = { name: "applyMaxSize", enabled: true, phase: "beforeWrite", requires: ["maxSize"], fn({ state: e2 }) {
|
|
156
156
|
const { height: t3 } = e2.modifiersData.maxSize;
|
|
@@ -160,7 +160,7 @@ const Oe = (o2, r2 = false, i2 = false, a2 = false) => {
|
|
|
160
160
|
return v2 && e2.unshift(Ne, C2), e2;
|
|
161
161
|
}, [v2, u2]), [P2, D2] = c(false), E2 = n.useRef(null), T2 = K(() => {
|
|
162
162
|
f2?.(L2.current, E2.current);
|
|
163
|
-
}, [x2]), z2 = K(x2, [x2]), $2 = K(
|
|
163
|
+
}, [x2]), z2 = K(x2, [x2]), $2 = K(g2, [g2]), O2 = K(b2, [b2]), I2 = K(() => {
|
|
164
164
|
D2(false), y2?.();
|
|
165
165
|
}, [y2]), [N2, B2] = c(false), L2 = n.useRef(null), A2 = n.useRef(true), H2 = a(() => ({ onFirstUpdate: () => {
|
|
166
166
|
A2.current && (B2(true), T2?.(), A2.current = false);
|
|
@@ -202,7 +202,7 @@ const Fe = (e2) => {
|
|
|
202
202
|
}, qe = function(e2, t2 = 0.2, o2 = "light") {
|
|
203
203
|
if (!e2) return e2;
|
|
204
204
|
let n2 = "dark" !== o2;
|
|
205
|
-
return t2 < 0 && (n2 = !n2, t2 *= -1), e2 = _e(e2), n2 ? x(e2, Math.max(0, Math.min(1, 1 * t2))) :
|
|
205
|
+
return t2 < 0 && (n2 = !n2, t2 *= -1), e2 = _e(e2), n2 ? x(e2, Math.max(0, Math.min(1, 1 * t2))) : g(e2, Math.max(0, Math.min(1, 1.5 * t2)));
|
|
206
206
|
}, Qe = function(e2) {
|
|
207
207
|
let t2 = 0;
|
|
208
208
|
return t2 = e2 < 1 ? 5.11916 * e2 ** 2 : 4.5 * Math.log(e2 + 1) + 2, (t2 / 100).toFixed(2);
|
|
@@ -266,12 +266,12 @@ const tt = { Popup: "popup", Anchor: "anchor" }, ot = { ByPopup: "popupDone", Ca
|
|
|
266
266
|
let r2;
|
|
267
267
|
return n2 && (r2 = (r2 ? r2 + " " : "") + "rotate(180deg)"), e(He, { style: { marginLeft: t2 ? void 0 : o2 ? "-0.25rem" : "-3px", marginRight: t2 ? void 0 : o2 ? "-0.25rem" : "-6px", transform: r2 }, color: "inherit" });
|
|
268
268
|
}, at = r(i((t2, o2) => {
|
|
269
|
-
const { open: n2, anchorEl: r2, anchorPosition: i2, label: s2, floatReference: d2, createPopupPanel: p2 = rt, propsPopper: u2, onMount: m2, onClosing: h2, onClose: f2, onOpening: x2, onOpen:
|
|
269
|
+
const { open: n2, anchorEl: r2, anchorPosition: i2, label: s2, floatReference: d2, createPopupPanel: p2 = rt, propsPopper: u2, onMount: m2, onClosing: h2, onClose: f2, onOpening: x2, onOpen: g2, children: b2, sx: y2, ...v2 } = t2, k2 = K(h2, [h2]), C2 = K(f2, [f2]), M2 = K(x2, [x2]), S2 = K(g2, [g2]), [R2, P2] = c(), D2 = l(null), E2 = K((e2, t3) => {
|
|
270
270
|
P2(e2), m2?.(D2.current, t3);
|
|
271
271
|
}, [m2]), T2 = a(() => {
|
|
272
|
-
const t3 = { popupContainer: R2, floatReference: d2, children:
|
|
272
|
+
const t3 = { popupContainer: R2, floatReference: d2, children: b2, ...v2 }, o3 = p2(t3);
|
|
273
273
|
return e(w, { elevation: 8, ref: D2, sx: { display: "flex", overflow: "auto", outline: "none", "&.MuiPaper-root": (e2) => Xe(e2) }, tabIndex: 0, children: o3 });
|
|
274
|
-
}, [p2,
|
|
274
|
+
}, [p2, b2, R2, d2]);
|
|
275
275
|
return e(Le, { ref: o2, anchorEl: r2, anchorPosition: i2, label: s2, open: n2, onMount: E2, onOpening: M2, onOpen: S2, onClosing: k2, onClose: C2, ...u2, children: T2 });
|
|
276
276
|
}));
|
|
277
277
|
at.displayName = "ExhibitFloatPanel";
|
|
@@ -295,7 +295,7 @@ const pt = (e2 = null, t2, o2, n2) => {
|
|
|
295
295
|
const t2 = /* @__PURE__ */ new Set();
|
|
296
296
|
return ut(t2, e2), t2;
|
|
297
297
|
}, ht = (t2) => {
|
|
298
|
-
const { anchor: o2, label: r2 = null, parentFloat: i2 = null, onOpen: l2, onClose: d2, propsPopper: u2, createPopupPanel: m2 = rt } = t2 ?? {}, h2 = K(l2, [l2]), f2 = K(d2, [d2]), [x2,
|
|
298
|
+
const { anchor: o2, label: r2 = null, parentFloat: i2 = null, onOpen: l2, onClose: d2, propsPopper: u2, createPopupPanel: m2 = rt } = t2 ?? {}, h2 = K(l2, [l2]), f2 = K(d2, [d2]), [x2, g2] = c(null), [b2, y2] = c(false), [v2, k2] = c(false), w2 = a(() => null === i2 ? (null === st && (st = { key: { label: "root" }, isRoot: true, parent: null, open: () => null, close: (e2) => null, closeChild: (e2) => null, onChildVisible: () => {
|
|
299
299
|
}, onChildHidden: () => {
|
|
300
300
|
}, closeAll: () => F2(0), floatElement: () => null, anchorElement: () => null }), st) : i2, []), C2 = a(() => ({ label: r2 }), []), M2 = n.useRef(null), S2 = n.useRef(o2);
|
|
301
301
|
s(() => {
|
|
@@ -314,11 +314,11 @@ const pt = (e2 = null, t2, o2, n2) => {
|
|
|
314
314
|
const e2 = new Promise((e3, t3) => {
|
|
315
315
|
E2((o3) => ({ resolve: e3, reject: t3 }));
|
|
316
316
|
});
|
|
317
|
-
return P2(), lt.delete(w2.key),
|
|
317
|
+
return P2(), lt.delete(w2.key), g2(false), e2;
|
|
318
318
|
};
|
|
319
319
|
s(() => {
|
|
320
320
|
D2 && (D2.resolve(), E2(null));
|
|
321
|
-
}, [
|
|
321
|
+
}, [b2, v2, D2]);
|
|
322
322
|
const z2 = p(() => {
|
|
323
323
|
let e2 = w2;
|
|
324
324
|
for (; e2.parent; ) e2 = e2.parent;
|
|
@@ -335,7 +335,7 @@ const pt = (e2 = null, t2, o2, n2) => {
|
|
|
335
335
|
t3?.close(0);
|
|
336
336
|
}
|
|
337
337
|
requestAnimationFrame(() => {
|
|
338
|
-
lt.set(w2.key, W2.key),
|
|
338
|
+
lt.set(w2.key, W2.key), g2(true);
|
|
339
339
|
});
|
|
340
340
|
}, [O2, I2] = n.useReducer((e2) => e2 + 1, 0), N2 = p((e2) => null === m2 ? null : m2({ closeFloat: F2, closeFloatAll: H2, ...e2 }), [m2]), B2 = null === m2, L2 = K((e2 = 120) => pt(e2, $2, /* @__PURE__ */ new Set([W2]), false)(), [$2]), F2 = K((e2 = 60) => pt(e2, T2, mt(W2), true)(), [T2]), A2 = K((e2 = 360) => pt(e2, P2, mt(((e3) => {
|
|
341
341
|
const t3 = lt.get(e3.key);
|
|
@@ -370,14 +370,14 @@ const pt = (e2 = null, t2, o2, n2) => {
|
|
|
370
370
|
});
|
|
371
371
|
}, []), [U2, G2] = c();
|
|
372
372
|
s(() => {
|
|
373
|
-
B2 && (x2 ? h2?.() : false === x2 && f2?.()), G2(
|
|
373
|
+
B2 && (x2 ? h2?.() : false === x2 && f2?.()), G2(b2 ? e(at, { floatReference: W2, open: x2, label: r2, anchorEl: o2, onOpening: () => {
|
|
374
374
|
h2?.(), w2.onChildVisible();
|
|
375
375
|
}, onClosing: q2, onClose: () => {
|
|
376
376
|
y2(false), w2.onChildHidden();
|
|
377
377
|
}, onMount: Q2, propsPopper: { onKeyDown: V2, onMouseEnter: (e2) => {
|
|
378
378
|
x2 && dt?.isClose && dt.setReferences.has(W2) && (dt.fn.clear(), dt = null, W2.closeChild());
|
|
379
379
|
}, ...u2 }, createPopupPanel: N2 }) : null);
|
|
380
|
-
}, [
|
|
380
|
+
}, [b2, x2, r2, B2, u2, N2, O2]);
|
|
381
381
|
const X2 = K((e2) => {
|
|
382
382
|
if (0 === lt.size) return;
|
|
383
383
|
let t3 = false;
|
|
@@ -411,20 +411,20 @@ const pt = (e2 = null, t2, o2, n2) => {
|
|
|
411
411
|
return t(v, { ref: n2, sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: ["Children here", c3, e(Dt, { parentFloat: a3, children: "Close other children" })] });
|
|
412
412
|
}, [r2]), ...s2 };
|
|
413
413
|
return e(i2 === nt.Toolbar ? Tt : $t, { ...c2 });
|
|
414
|
-
})), xt = { placement: "right-start" },
|
|
414
|
+
})), xt = { placement: "right-start" }, gt = r(i((e2, r2) => {
|
|
415
415
|
const { children: i2, sx: l2, parentFloat: c2, createPopupPanel: d2, propsPopper: p2 = xt, label: u2, ...m2 } = e2;
|
|
416
416
|
ae(n.isValidElement(i2), "Must supply a child component to enable a context menu.");
|
|
417
417
|
const h2 = i2, f2 = a(() => ({ ...h2?.props, ...m2, onContextMenu: (e3) => {
|
|
418
|
-
h2?.props?.onContextMenu?.(e3), e3.isDefaultPrevented() || (m2?.onContextMenu?.(e3), e3.isDefaultPrevented() || (
|
|
419
|
-
} }), [m2, h2?.props]), x2 = K(d2, [d2]), [
|
|
418
|
+
h2?.props?.onContextMenu?.(e3), e3.isDefaultPrevented() || (m2?.onContextMenu?.(e3), e3.isDefaultPrevented() || (b2(e3), e3.preventDefault()));
|
|
419
|
+
} }), [m2, h2?.props]), x2 = K(d2, [d2]), [g2, b2] = n.useState(null), { reference: y2, component: v2 } = ht({ label: u2 ?? "contextMenu", propsPopper: p2, parentFloat: c2, anchor: { getBoundingClientRect: () => new DOMRect(g2?.clientX || 0, g2?.clientY || 0) }, onClose: () => b2(null), createPopupPanel: x2 });
|
|
420
420
|
return s(() => {
|
|
421
|
-
|
|
422
|
-
}, [
|
|
423
|
-
})),
|
|
421
|
+
g2 ? y2.open(0) : y2.close(0);
|
|
422
|
+
}, [g2]), t(o, { children: [n.cloneElement(i2, f2), v2] });
|
|
423
|
+
})), bt = i((t2, o2) => {
|
|
424
424
|
const { slotProps: n2, ...r2 } = t2, { getPortalContainer: i2 } = V();
|
|
425
425
|
return e(R, { ref: o2, slotProps: { ...n2, popper: { container: i2, ...n2?.popper || {} } }, ...r2 });
|
|
426
426
|
});
|
|
427
|
-
|
|
427
|
+
bt.displayName = "SimpleTooltip";
|
|
428
428
|
const yt = r((t2) => {
|
|
429
429
|
const { modifier: o2, sx: n2, ...r2 } = t2;
|
|
430
430
|
return e(v, { sx: { marginLeft: "1px", marginRight: "1px", borderRadius: "4px", borderStyle: "solid", borderTopWidth: "1px", borderLeftWidth: "1px", borderRightWidth: "1px", borderBottomWidth: "2px", borderTopColor: (e2) => f(e2.palette.background.paper, e2.palette.action.disabledOpacity), borderLeftColor: (e2) => f(e2.palette.background.paper, e2.palette.action.disabledOpacity), borderRightColor: (e2) => f(e2.palette.background.paper, e2.palette.action.disabledOpacity), borderBottomColor: (e2) => f(e2.palette.background.paper, 1 - e2.palette.action.disabledOpacity), backgroundColor: (e2) => f(e2.palette.action.hover, e2.palette.action.disabledOpacity), paddingLeft: "4px", paddingRight: "4px", minHeight: "1.6em", display: "flex", justifyContent: "center", alignItems: "center", boxSizing: "content-box", overflow: "hidden", ...n2 }, ...r2, children: e(v, { sx: { display: "flex", alignItems: "center", justifyContent: "center", textAlign: "center", "& *": { fontWeight: "500" } }, children: o2 }) });
|
|
@@ -440,7 +440,7 @@ const yt = r((t2) => {
|
|
|
440
440
|
const i2 = [];
|
|
441
441
|
return r2?.[_.Ctrl] && (i2.push(e(yt, { modifier: o2 ? "^" : e("div", { style: { paddingRight: "1px" }, children: vt }) }, "ctrl")), i2.push("+")), r2?.[_.Alt] && (i2.push(e(yt, { modifier: o2 ? "⌥" : "Alt" }, "alt")), i2.push("+")), r2?.[_.Shift] && (i2.push(e(yt, { modifier: o2 ? "⇧" : e("div", { style: { paddingRight: "1px" }, children: "Shift" }) }, "shift")), i2.push("+")), r2?.[_.Meta] && (i2.push(e(yt, { modifier: o2 ? e("div", { style: { paddingTop: "1px" }, children: "⌘" }) : "Meta" }, "meta")), i2.push("+")), i2.push(e(yt, { modifier: q.toPrettyKeyCode(t2.key) }, "character")), e(v, { sx: { display: "flex", alignItems: "center" }, children: i2 }, n2);
|
|
442
442
|
}, wt = r(i((n2, r2) => {
|
|
443
|
-
const { disabled: i2 = false, label: a2, shortcut: l2, chips: d2, description: p2, maxWidth: u2 = 280, useModifierSymbols: m2 = false, children: h2, simple: f2, componentDisabled: x2 = false, sx:
|
|
443
|
+
const { disabled: i2 = false, label: a2, shortcut: l2, chips: d2, description: p2, maxWidth: u2 = 280, useModifierSymbols: m2 = false, children: h2, simple: f2, componentDisabled: x2 = false, sx: g2, ...b2 } = n2;
|
|
444
444
|
let y2 = null;
|
|
445
445
|
l2 && (y2 = kt(l2, m2));
|
|
446
446
|
const [w2, C2] = c(null);
|
|
@@ -449,31 +449,31 @@ const yt = r((t2) => {
|
|
|
449
449
|
C2(e2);
|
|
450
450
|
});
|
|
451
451
|
}, [a2]);
|
|
452
|
-
return e(
|
|
452
|
+
return e(bt, { slotProps: { popper: { sx: { "& .MuiTooltip-tooltip": { marginTop: "0px !important" }, ...g2 }, modifiers: [{ name: "offset", options: { offset: [0, 14] } }] } }, className: "tooltip-wrapper", tabIndex: -1, title: !i2 && w2 ? t(v, { sx: { maxWidth: `${u2}px` }, ref: r2, children: [t(v, { sx: { display: "flex", flexDirection: "row", marginBottom: p2 ? "4px" : "0px" }, children: [e(k, { variant: "subtitle1", component: "div", flex: "1 1 100%", children: w2 }), d2 ? e(Ie, { chips: d2 }) : null, y2 ? e(v, { sx: { marginLeft: "8px" } }, "leadingSpace") : e(o, {}), y2] }), p2 ? e(k, { variant: "caption", sx: { whiteSpace: "pre-line", lineHeight: "1.4" }, children: p2 }) : e(o, {})] }) : "", enterDelay: 260, enterNextDelay: 130, leaveDelay: 230, disableInteractive: true, ...b2, children: e("div", { style: { display: "flex", alignItems: "stretch", justifyContent: "stretch" }, children: h2 }) });
|
|
453
453
|
})), Ct = e(W, {}), Mt = e(W, { iconKey: "Check" }), St = r(i((o2, n2) => {
|
|
454
|
-
const { dense: r2 = true, outlined: i2 = false, disableHover: l2 = false, parentFloat: s2, selected: d2, icon: p2, propsTooltip: u2, children: m2, primary: x2, sx:
|
|
454
|
+
const { dense: r2 = true, outlined: i2 = false, disableHover: l2 = false, parentFloat: s2, selected: d2, icon: p2, propsTooltip: u2, children: m2, primary: x2, sx: g2, disabled: y2, className: k2, onFocus: w2, onBlur: C2, ...M2 } = o2, [S2, R2] = c(false), P2 = { marginRight: "0px", padding: r2 ? "2px" : "7px", borderRadius: (e2) => `${e2.shape.borderRadius}px`, color: (e2) => x2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active, border: (e2) => `solid ${i2 ? e2.palette.divider : "transparent"} 1px`, "& .MuiTouchRipple-child": { borderRadius: (e2) => `${e2.shape.borderRadius}px !important` }, "&.Mui-selected": { backgroundColor: (e2) => f(e2.palette.text.primary, e2.palette.action.selectedOpacity), border: (e2) => `solid ${i2 ? e2.palette.text?.primary : e2.palette.divider} 1px` }, "&.Mui-disabled": { border: (e2) => `solid ${i2 ? e2.palette.divider : "transparent"} 1px` }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)", opacity: ".8" }, "&.Mui-focusVisible": { outline: "solid transparent 1px", border: "1px solid transparent" }, ...g2 }, D2 = { "&:hover:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary, border: (e2) => `solid ${i2 ? e2.palette.text?.primary : e2.palette.divider} 1px`, "&.Mui-selected": { backgroundColor: (e2) => f(e2.palette.text.primary, e2.palette.action.selectedOpacity + e2.palette.action.hoverOpacity) }, "> .outline-hover": { outline: (e2) => `solid ${i2 ? e2.palette.text?.primary : e2.palette.divider} 1px` }, backgroundColor: null }, "&.Mui-focusVisible": { outline: (e2) => `solid ${e2.palette.primary.main} 1px`, border: (e2) => `1px solid ${e2.palette?.primary?.main}`, zIndex: 1 } };
|
|
455
455
|
let E2 = P2;
|
|
456
456
|
l2 || (E2 = F.mergeContentful(P2, D2));
|
|
457
457
|
const T2 = a(() => {
|
|
458
458
|
let e2 = "function" == typeof p2 ? p2() : p2;
|
|
459
459
|
return null === e2 ? e2 : e2 || (void 0 === d2 ? Ct : Mt);
|
|
460
460
|
}, [p2, d2]);
|
|
461
|
-
let z2 = t(
|
|
461
|
+
let z2 = t(b, { component: "div", ref: n2, className: h({ "Mui-focusVisible": S2, "Mui-selected": d2, "Mui-disabled": y2 }, k2), onFocus: (e2) => {
|
|
462
462
|
R2(true), w2?.(e2);
|
|
463
463
|
}, onBlur: (e2) => {
|
|
464
464
|
R2(false), C2?.(e2);
|
|
465
465
|
}, size: "small", TouchRippleProps: { center: false }, sx: E2, edge: "end", ...M2, disabled: y2 || false, children: [T2, m2] });
|
|
466
466
|
if (u2) if (u2.simple && u2.label && !u2.disabled) {
|
|
467
467
|
const { label: t2, description: o3, maxWidth: n3, shortcut: r3, useModifierSymbols: i3, componentDisabled: a2, simple: l3, chips: s3, ref: c2, ...d3 } = u2;
|
|
468
|
-
z2 = e(
|
|
468
|
+
z2 = e(bt, { disableInteractive: true, title: t2 ?? "", ...d3, children: e(v, { sx: { display: "flex" }, children: z2 }) });
|
|
469
469
|
} else z2 = e(wt, { children: z2, ...u2 });
|
|
470
470
|
return z2;
|
|
471
471
|
})), Rt = e(W, {}), Pt = (e2) => e2.icon, Dt = r(i((o2, n2) => {
|
|
472
|
-
const { icon: r2 = Rt, renderIcon: i2 = Pt, parentFloat: l2, className: s2, onFocus: d2, selected: p2, onBlur: u2, onMouseOver: m2, onMouseOut: f2, onMouseEnter: x2, disabled:
|
|
473
|
-
const t2 = i2?.({ icon: r2, disabled:
|
|
472
|
+
const { icon: r2 = Rt, renderIcon: i2 = Pt, parentFloat: l2, className: s2, onFocus: d2, selected: p2, onBlur: u2, onMouseOver: m2, onMouseOut: f2, onMouseEnter: x2, disabled: g2, children: b2, sx: y2, propsTooltip: v2, chips: k2, primary: w2, ...C2 } = o2, [M2, S2] = c(false), [R2, E2] = c(false), T2 = a(() => {
|
|
473
|
+
const t2 = i2?.({ icon: r2, disabled: g2, selected: p2 });
|
|
474
474
|
return t2 ? e(P, { className: h({ "Mui-focusVisible": M2, "Mui-hovered": R2 }), sx: { "& .MuiSvgIcon-root": { color: (e2) => w2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active }, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { "& .MuiSvgIcon-root": { color: (e2) => e2.palette.text.primary } } }, children: t2 }) : null;
|
|
475
|
-
}, [i2,
|
|
476
|
-
let z2 = t(D, { ref: n2, disabled:
|
|
475
|
+
}, [i2, g2, r2, M2, R2, w2, p2]);
|
|
476
|
+
let z2 = t(D, { ref: n2, disabled: g2, onMouseOver: (e2) => {
|
|
477
477
|
m2?.(e2), e2.isDefaultPrevented() || E2(true);
|
|
478
478
|
}, onMouseOut: (e2) => {
|
|
479
479
|
f2?.(e2), e2.isDefaultPrevented() || E2(false);
|
|
@@ -483,19 +483,19 @@ const yt = r((t2) => {
|
|
|
483
483
|
d2?.(e2), S2(true);
|
|
484
484
|
}, onBlur: (e2) => {
|
|
485
485
|
u2?.(e2), S2(false);
|
|
486
|
-
}, sx: { flex: "1 1 100%", "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, "&.Mui-selected": { color: (e2) => e2.palette.text.primary }, color: (e2) => e2.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary }, ...y2 }, ...C2, children: [T2,
|
|
486
|
+
}, sx: { flex: "1 1 100%", "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, "&.Mui-selected": { color: (e2) => e2.palette.text.primary }, color: (e2) => e2.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary }, ...y2 }, ...C2, children: [T2, b2, k2 ? e(Ie, { chips: k2 }) : null] });
|
|
487
487
|
return v2 && (z2 = e(wt, { children: z2, placement: "right-start", ...v2 })), z2;
|
|
488
488
|
})), Et = r(i((t2, n2) => {
|
|
489
489
|
const { children: r2, sx: i2, primary: a2 = false, variant: l2 = "subtitle1", ...s2 } = t2;
|
|
490
490
|
return e(o, { children: e(k, { ref: n2, variant: l2, component: "div", sx: { userSelect: "none", fontWeight: "500", paddingLeft: "8px", paddingTop: "subtitle1" === l2 ? "2px" : void 0, paddingBottom: "subtitle1" === l2 ? "2px" : void 0, color: (e2) => a2 ? void 0 : e2.palette.text.secondary, ...i2 }, ...s2, children: r2 }) });
|
|
491
491
|
})), Tt = r(i((n2, r2) => {
|
|
492
|
-
const { dense: i2 = true, outlined: s2 = false, label: d2, selected: p2 = false, onQuickClick: u2, parentFloat: m2, createPopupPanel: x2, propsPopup:
|
|
492
|
+
const { dense: i2 = true, outlined: s2 = false, label: d2, selected: p2 = false, onQuickClick: u2, parentFloat: m2, createPopupPanel: x2, propsPopup: g2, onPopupOpen: y2, onPopupClose: k2, propsQuickButton: w2, renderQuickButton: C2, tooltip: M2 = "", createTooltip: S2, icon: R2, disabled: P2, propsButton: D2 = F.EmptyObject, disableHover: E2, touchRippleRef: T2, primary: z2, children: $2, sx: O2, className: I2, ...N2 } = n2, B2 = Y(), L2 = a(() => {
|
|
493
493
|
const e2 = (e3, t2, o2, n3 = o2) => {
|
|
494
494
|
const r3 = "boolean" == typeof s2 ? null : s2[e3];
|
|
495
495
|
return "function" == typeof r3 ? r3(t2) : r3 || (s2 ? o2 : n3);
|
|
496
496
|
};
|
|
497
497
|
return { outline: { color: (t2) => e2("color", t2, t2.palette.divider, "transparent"), hoverColor: (t2) => e2("hoverColor", t2, t2.palette.text?.primary, t2.palette.divider), focusColor: (t2) => e2("focusColor", t2, t2.palette?.primary?.main) }, active: "dark" === B2.palette.mode ? B2.palette.text.secondary : B2.palette.text.primary, text: B2.palette.text.icon ?? B2.palette.action.active };
|
|
498
|
-
}, [s2, B2]), [A2, H2] = c(false), [W2, V2] = c(false), [_2, q2] = c(false), Q2 = l(null), U2 = l(null), G2 = ht({ anchor: Q2.current, label: d2, createPopupPanel: x2, parentFloat: m2, propsPopper:
|
|
498
|
+
}, [s2, B2]), [A2, H2] = c(false), [W2, V2] = c(false), [_2, q2] = c(false), Q2 = l(null), U2 = l(null), G2 = ht({ anchor: Q2.current, label: d2, createPopupPanel: x2, parentFloat: m2, propsPopper: g2?.propsPopper, onClose: () => {
|
|
499
499
|
H2(false), k2?.();
|
|
500
500
|
}, onOpen: () => {
|
|
501
501
|
H2(true), y2?.();
|
|
@@ -508,10 +508,10 @@ const yt = r((t2) => {
|
|
|
508
508
|
return { quickButtonStyling: n3, openQuickButtonStyling: r3, compoundStyling: a2, openCompoundStyling: F.mergeContentful(a2, t2) };
|
|
509
509
|
}, [L2, E2]), ee2 = K((t2) => {
|
|
510
510
|
const { children: o2, ref: n3, ...r3 } = t2;
|
|
511
|
-
return e(
|
|
511
|
+
return e(bt, { ref: n3, ...r3, disableInteractive: true, children: o2 });
|
|
512
512
|
}, []), te2 = u2 || C2, oe2 = te2 && (w2?.tooltip || w2?.createTooltip), ne2 = (t2) => {
|
|
513
513
|
const { tooltip: o2, createTooltip: n3, sx: r3, ...i3 } = t2;
|
|
514
|
-
let a2 = e(
|
|
514
|
+
let a2 = e(b, { sx: { ...r3 }, component: "div", ...i3 });
|
|
515
515
|
return oe2 ? (a2 = (n3 ?? ee2)({ title: A2 ? "" : o2 ?? M2, children: e("div", { children: a2 }) }, A2), a2) : a2;
|
|
516
516
|
}, re2 = { onKeyDown: (e2) => {
|
|
517
517
|
e2.keyCode === j.Space ? J2() : e2.keyCode === j.F4 || e2.keyCode === j.Down ? G2.reference.open(0) : e2.keyCode === j.Up && G2.reference.close(0);
|
|
@@ -526,7 +526,7 @@ const yt = r((t2) => {
|
|
|
526
526
|
0 === e2.button && (e2.preventDefault(), X2(e2));
|
|
527
527
|
}, touchRippleRef: T2, children: ae2, ...w2, className: h({ "Mui-focusVisible": W2 || A2, "Mui-selected": p2, "Mui-hovered": _2 || A2, "Mui-disabled": P2, bordered: true, left: true, "hard-right": true }, w2?.className), sx: { ...Z2.quickButtonStyling, height: "100%", ...w2?.sx } });
|
|
528
528
|
let a2 = it(true, i2, A2);
|
|
529
|
-
oe2 && (a2 = (S2 ?? ee2)({ title: A2 ? "" : M2, children: a2 }, A2)), ie2 = t(o, { children: [r3, e(
|
|
529
|
+
oe2 && (a2 = (S2 ?? ee2)({ title: A2 ? "" : M2, children: a2 }, A2)), ie2 = t(o, { children: [r3, e(b, { ref: U2, component: "div", className: h({ "Mui-selected": A2, "Mui-hovered": _2 || A2, "Mui-disabled": P2, "Mui-focusVisible": W2 || A2, bordered: true, right: true, divider: true }), sx: { paddingLeft: (i2 ? 0 : 2) + "px", paddingRight: (i2 ? 0 : 2) + "px", width: () => "calc(var(--icon-size, 1.25em) * 0.8)", ...Z2.quickButtonStyling, ...n3 }, TouchRippleProps: { center: false }, tabIndex: -1, disabled: P2, size: "small", edge: "end", onMouseDown: (e2) => {
|
|
530
530
|
0 === e2.button && (e2.preventDefault(), J2());
|
|
531
531
|
}, children: a2 })] });
|
|
532
532
|
} else {
|
|
@@ -541,19 +541,19 @@ const yt = r((t2) => {
|
|
|
541
541
|
}));
|
|
542
542
|
Tt.displayName = "ExhibitPopupIconButton";
|
|
543
543
|
const zt = {}, $t = r(i((n2, r2) => {
|
|
544
|
-
const { selected: i2 = false, label: s2, onQuickClick: d2, parentFloat: u2, createPopupPanel: m2, propsPopup: f2 = zt, onPopupOpen: x2, onPopupClose:
|
|
544
|
+
const { selected: i2 = false, label: s2, onQuickClick: d2, parentFloat: u2, createPopupPanel: m2, propsPopup: f2 = zt, onPopupOpen: x2, onPopupClose: g2, propsQuickButton: b2, renderQuickButton: k2, tooltip: w2 = "", createTooltip: C2, icon: M2, disabled: S2, touchRippleRef: R2, primary: P2, children: E2, sx: T2, ...z2 } = n2, [$2, O2] = c(false), [I2, N2] = c(false), [B2, L2] = c(false), [F2, A2] = c(false), H2 = l(null), W2 = l(null), V2 = a(() => {
|
|
545
545
|
if (!f2) return;
|
|
546
546
|
const { propsPopper: e2 } = f2;
|
|
547
547
|
return { placement: "right-start", offsets: [-4, -2], ...e2 };
|
|
548
548
|
}, [f2]), j2 = ht({ anchor: H2.current, label: s2, createPopupPanel: m2, parentFloat: u2, propsPopper: V2, onClose: () => {
|
|
549
|
-
O2(false),
|
|
549
|
+
O2(false), g2?.();
|
|
550
550
|
}, onOpen: () => {
|
|
551
551
|
O2(true), x2?.();
|
|
552
552
|
} }), _2 = K((e2) => {
|
|
553
553
|
0 === e2.button && (d2?.(e2), j2.reference.close(0));
|
|
554
554
|
}, [d2]), q2 = e(We, {}), Q2 = { "&.Mui-selected": { color: (e2) => e2.palette.text.primary, "& svg * ": { color: (e2) => e2.palette.text.primary } } }, U2 = p((t2) => {
|
|
555
555
|
const { children: o2, ref: n3, ...r3 } = t2;
|
|
556
|
-
return e(
|
|
556
|
+
return e(bt, { ref: n3, ...r3, disableInteractive: true, children: o2 });
|
|
557
557
|
}, []), G2 = d2 || k2, X2 = (t2) => {
|
|
558
558
|
const { tooltip: o2, createTooltip: n3, ...r3 } = t2;
|
|
559
559
|
return e(Dt, { icon: M2, className: h({ "Mui-hovered": B2 }), sx: { flex: "1 1 100%", ...Q2 }, ...r3, children: s2 });
|
|
@@ -574,7 +574,7 @@ const zt = {}, $t = r(i((n2, r2) => {
|
|
|
574
574
|
j2.reference.parent.closeChild();
|
|
575
575
|
}, onMouseDown: (e2) => {
|
|
576
576
|
0 === e2.button && (e2.preventDefault(), _2(e2));
|
|
577
|
-
}, className: h("quick-left", {},
|
|
577
|
+
}, className: h("quick-left", {}, b2?.className), ...b2 });
|
|
578
578
|
J2 = t(o, { children: [n3, e(y, { sx: { ml: "0px", mr: "0px" }, orientation: "vertical", variant: "middle", flexItem: true }), e(D, { ref: W2, className: h({ "Mui-selected": $2, "Mui-hovered": B2 }), sx: { borderTopLeftRadius: "0px", borderBottomLeftRadius: "0px", paddingLeft: "0px", paddingRight: "0px", marginLeft: "0px", color: (e2) => P2 ? void 0 : e2.palette.text.secondary, "&.Mui-hovered:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary }, ...Q2 }, tabIndex: -1, disabled: S2, ...Y2, children: e(v, { className: "expand-icon", sx: { flex: "none", display: "flex", border: "1px solid transparent", paddingTop: "1px", paddingBottom: "1px", color: (e2) => P2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active }, onMouseOver: (e2) => {
|
|
579
579
|
e2.preventDefault(), A2(true);
|
|
580
580
|
}, onMouseLeave: () => {
|
|
@@ -586,7 +586,7 @@ const zt = {}, $t = r(i((n2, r2) => {
|
|
|
586
586
|
e2.preventDefault(), $2 ? j2.reference.close() : j2.reference.open();
|
|
587
587
|
}, ...Y2, children: [e("div", { style: { flex: "1 1 100%" }, children: s2 }), e(v, { className: "expand-icon", sx: { flex: "none", display: "flex", color: (e2) => P2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active }, children: q2 })] });
|
|
588
588
|
let Z2 = e(v, { "aria-label": "split button", ref: H2, tabIndex: S2 ? void 0 : 0, className: h({ "Mui-disabled": S2, "Mui-selected": $2, "Mui-focusVisible": I2 || $2, "Mui-hovered": B2 }), sx: { display: "flex", flex: "1 1 100%", alignItems: "center", width: "fit-content", "& .quick-left": { borderTopRightRadius: "0px", borderBottomRightRadius: "0px", marginRight: "-1px" }, "&.Mui-disabled > .icon path": { filter: "grayscale(65%)" }, ...T2 }, ...z2, children: J2 });
|
|
589
|
-
return G2 && !F2 && (
|
|
589
|
+
return G2 && !F2 && (b2?.tooltip || b2?.createTooltip) && (Z2 = (b2?.createTooltip ?? U2)({ title: $2 ? "" : Z2 ?? b2?.tooltip, children: Z2 }, $2)), t(v, { ref: r2, sx: { zIndex: I2 || $2 ? 2 : void 0, display: "flex", " .tooltip-wrapper": { display: "flex", flex: "1 1 100%" } }, children: [Z2, j2.component] });
|
|
590
590
|
})), Ot = r(i((t2, o2) => {
|
|
591
591
|
const { onSelectToggle: n2, selected: r2 = false, label: i2, shortcut: a2, tabIndex: l2 = 0, preventFocus: s2 = false, ...c2 } = t2;
|
|
592
592
|
return e(wt, { label: i2, shortcut: a2, children: e(St, { ref: o2, outlined: false, tabIndex: l2, selected: r2, onMouseDown: (e2) => {
|
|
@@ -620,17 +620,17 @@ function Lt(e2) {
|
|
|
620
620
|
}, open: true }, x2 = t2.get(s2);
|
|
621
621
|
if (x2) return i2(x2.id, f2), u2(x2.element), void (f2.autoFocus && x2.element?.focus());
|
|
622
622
|
if (!c2) return void m2(`Invalid function for window '${s2}'`);
|
|
623
|
-
const
|
|
624
|
-
o2((e3) => (e3.set(s2, { id:
|
|
623
|
+
const g2 = n.lazy(c2), b2 = r2(g2, f2, { destroyOnClose: !h2 });
|
|
624
|
+
o2((e3) => (e3.set(s2, { id: b2.id, element: null }), e3));
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
627
|
const Ft = { x: 0, y: 0 }, At = r(i((t2, o2) => {
|
|
628
|
-
const { defaultPosition: n2 = Ft, PaperComponent: r2 = w, onDragStop: i2, rootSel: d2 = ".MuiModal-root", handleSel: p2 = ".draggable-title", titleSize: m2, rootSize: h2, ...f2 } = t2, x2 = l(null),
|
|
628
|
+
const { defaultPosition: n2 = Ft, PaperComponent: r2 = w, onDragStop: i2, rootSel: d2 = ".MuiModal-root", handleSel: p2 = ".draggable-title", titleSize: m2, rootSize: h2, ...f2 } = t2, x2 = l(null), g2 = a(() => m2 && h2 ? { left: 0, top: 0, right: h2.width - m2.width, bottom: h2.height - m2.height } : null, [m2, h2]), [b2, y2] = c(null), [v2, k2] = c(null), [C2, M2] = c(null);
|
|
629
629
|
return u(() => {
|
|
630
|
-
!
|
|
630
|
+
!b2 && n2 && y2(n2 ?? Ft);
|
|
631
631
|
}, [n2]), s(() => {
|
|
632
|
-
|
|
633
|
-
}, [
|
|
632
|
+
g2 && b2 && k2({ x: Math.max(0, Math.min(b2.x, g2.right)), y: Math.max(0, Math.min(b2.y, g2.bottom)) });
|
|
633
|
+
}, [b2, g2]), e(de, { nodeRef: x2, handle: p2, cancel: '[class*="MuiDialogContent-root"]', position: v2, bounds: g2 ?? ".MuiModal-root", onStop: i2, onStart: (e2, t3) => {
|
|
634
634
|
const o3 = e2;
|
|
635
635
|
M2({ x: (o3.clientX ?? o3.touches?.[0]?.clientX) - t3.x, y: (o3.clientY ?? o3.touches?.[0]?.clientY) - t3.y });
|
|
636
636
|
}, onDrag: (e2, t3) => {
|
|
@@ -638,7 +638,7 @@ const Ft = { x: 0, y: 0 }, At = r(i((t2, o2) => {
|
|
|
638
638
|
y2({ x: n3 - C2.x, y: r3 - C2.y });
|
|
639
639
|
}, children: e(r2, { ref: ne([x2, o2]), ...f2 }) });
|
|
640
640
|
})), Ht = { x: "50", y: "50" }, Wt = r(i((o2, n2) => {
|
|
641
|
-
const r2 = ee({ props: o2, name: "MuiDialog" }), i2 = Y(), a2 = { enter: 0.66 * i2.transitions.duration.enteringScreen, exit: 0.66 * i2.transitions.duration.leavingScreen }, { title: d2 = "SheetXL", key: p2 = "draggable-window", onCancel: u2, onDone: m2, onShow: x2, onShown:
|
|
641
|
+
const r2 = ee({ props: o2, name: "MuiDialog" }), i2 = Y(), a2 = { enter: 0.66 * i2.transitions.duration.enteringScreen, exit: 0.66 * i2.transitions.duration.leavingScreen }, { title: d2 = "SheetXL", key: p2 = "draggable-window", onCancel: u2, onDone: m2, onShow: x2, onShown: g2, onHide: y2, onClose: k2, open: C2, autoFocusSel: M2, children: S2, transitionDuration: R2 = a2, TransitionProps: P2, slots: D2 = F.EmptyArray, slotProps: $2 = F.EmptyArray, sx: O2, className: I2, onMouseDown: N2, initialPosition: B2 = Ht, isModal: L2 = false, ...A2 } = r2;
|
|
642
642
|
let H2 = D2.transition ?? E;
|
|
643
643
|
const _2 = D2.backdrop ?? T, q2 = D2.paper ?? w;
|
|
644
644
|
let U2 = $2.transition;
|
|
@@ -647,7 +647,7 @@ const Ft = { x: 0, y: 0 }, At = r(i((t2, o2) => {
|
|
|
647
647
|
s(() => {
|
|
648
648
|
Z2 && re2(C2);
|
|
649
649
|
}, [C2, Z2]);
|
|
650
|
-
const
|
|
650
|
+
const ge2 = K(() => {
|
|
651
651
|
u2?.(), re2(false);
|
|
652
652
|
}, [u2]);
|
|
653
653
|
s(() => {
|
|
@@ -656,7 +656,7 @@ const Ft = { x: 0, y: 0 }, At = r(i((t2, o2) => {
|
|
|
656
656
|
let n3 = 0.5 * o3, r3 = 0.5 * t2;
|
|
657
657
|
"number" == typeof B2?.x ? n3 = B2.x : "string" == typeof B2?.x && (n3 = o3 * (parseFloat(B2.x) / 100)), "number" == typeof B2?.y ? r3 = B2.y : "string" == typeof B2?.y && (r3 = t2 * (parseFloat(B2.y) / 100)), te2({ x: n3, y: r3 });
|
|
658
658
|
}, [ue2, fe2]);
|
|
659
|
-
const [
|
|
659
|
+
const [be2, ye2] = c(false), [ve2, ke2] = c(null), [we2, Ce2] = c(null), Me2 = K((e2) => {
|
|
660
660
|
if (ve2) return ve2.focus(e2), true;
|
|
661
661
|
if (M2) {
|
|
662
662
|
const t2 = me2.current?.querySelectorAll?.(M2);
|
|
@@ -675,49 +675,49 @@ const Ft = { x: 0, y: 0 }, At = r(i((t2, o2) => {
|
|
|
675
675
|
}, onEntered: (e2, t2) => {
|
|
676
676
|
x2?.(), U2?.onEntered?.(e2, t2);
|
|
677
677
|
}, onEntering: (e2, t2) => {
|
|
678
|
-
le2(true),
|
|
678
|
+
le2(true), g2?.(Se2.current);
|
|
679
679
|
} };
|
|
680
680
|
s(() => {
|
|
681
681
|
ae2 && Me2();
|
|
682
682
|
}, [ae2]);
|
|
683
683
|
let Pe2 = e(ce, { focusTrapOptions: { escapeDeactivates: false, allowOutsideClick: true, initialFocus: false }, ref: J2, active: ae2, children: e(H2, { in: oe2, timeout: R2, role: "presentation", ...Re2, children: e(v, { className: "MuiDialog-container", ref: me2, tabIndex: 0, sx: { outline: "none", position: "relative" }, onKeyDown: (e2) => {
|
|
684
|
-
e2.which === j.Escape && (
|
|
685
|
-
}, children: t(At, { ref: ne([xe2, n2]), className: h({ "Mui-focusVisible":
|
|
684
|
+
e2.which === j.Escape && (ge2(), de2.current?.start(e2, { center: false }), setTimeout(() => de2.current?.stop(e2), 180)), e2.stopPropagation();
|
|
685
|
+
}, children: t(At, { ref: ne([xe2, n2]), className: h({ "Mui-focusVisible": be2 }, I2, "draggable"), sx: { "& *": (e2) => Xe(e2), pointerEvents: "auto", userSelect: "none", "&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: (e2) => `solid ${f(e2.palette.text?.primary, 0.2)} 1px` }, "&.Mui-focusVisible": { outline: (e2) => `solid ${f(e2.palette.text?.primary, 0.2)} 1px` }, position: "absolute", maxWidth: "100%", ...O2 }, defaultPosition: Z2, titleSize: fe2, rootSize: ue2, PaperComponent: q2, ...A2, ...X2, children: [d2 ? e(z, { className: h({ "Mui-selected": be2 }, "draggable-title"), sx: { cursor: "move", display: "flex", color: (e2) => e2.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e2) => `${e2.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e2) => e2.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e2) => f(e2.palette.action.hover, 0.03) }, ref: he2, children: t(v, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e2) => e2.spacing(1), marginLeft: (e2) => e2.spacing(1), marginRight: (e2) => e2.spacing(1) }, children: [e(v, { sx: { flex: "1 1 100%", paddingLeft: (e2) => e2.spacing(1) }, children: d2 }), e(wt, { label: "Close", children: e(b, { "aria-label": "close", sx: { color: (e2) => e2.palette.text.icon ?? e2.palette.action.active }, touchRippleRef: de2, onPointerDown: (e2) => {
|
|
686
686
|
de2.current?.start(e2, { center: false }), e2.stopPropagation(), e2.preventDefault();
|
|
687
|
-
}, onPointerUp:
|
|
687
|
+
}, onPointerUp: ge2, children: e(W, { iconKey: "Close" }) }) })] }) }) : null, S2] }) }) }) }), De2 = null;
|
|
688
688
|
L2 && (De2 = e(_2, { ...G2, open: oe2, onMouseDown: (e2) => {
|
|
689
|
-
|
|
689
|
+
ge2(), G2?.onMouseDown?.(e2);
|
|
690
690
|
}, onClick: (e2) => {
|
|
691
691
|
k2?.(e2, "backdropClick"), G2?.onClick?.(e2);
|
|
692
692
|
}, sx: { pointerEvents: "auto", ...G2?.sx } }));
|
|
693
693
|
const { getPortalContainer: Ee2 } = V();
|
|
694
694
|
return se(t(v, { className: "MuiModal-root", sx: { position: "fixed", zIndex: "1300", right: "0", bottom: "0", top: "0", left: "0", outline: "0", display: "block", pointerEvents: "none" }, ref: ne([Se2, pe2]), onPointerDown: (e2) => {
|
|
695
|
-
|
|
695
|
+
be2 && (e2.target === me2.current || e2.target.tabIndex < 0) && me2.current?.contains(document.activeElement);
|
|
696
696
|
}, onContextMenu: (e2) => {
|
|
697
697
|
e2.isPropagationStopped() || e2.preventDefault();
|
|
698
698
|
}, onFocus: (e2) => {
|
|
699
|
-
!
|
|
699
|
+
!be2 && (e2.target === me2.current || e2.target.tabIndex < 0) && setTimeout(() => {
|
|
700
700
|
Me2();
|
|
701
701
|
}, 100), J2.current?.focusTrap?.unpause(), ye2(true), me2.current?.contains(e2.target) && e2.target !== me2.current && ke2(e2.target), e2.relatedTarget && !we2 && Ce2(e2.relatedTarget);
|
|
702
702
|
}, onBlur: (e2) => {
|
|
703
703
|
Se2?.current?.contains(e2.relatedTarget) || (Ce2(null), J2.current?.focusTrap?.pause(), ye2(false));
|
|
704
704
|
}, children: [De2, Pe2] }), Ee2(), p2 + "");
|
|
705
705
|
})), Kt = ["Ok", "Cancel"], Vt = r(i((o2, n2) => {
|
|
706
|
-
const { description: r2, icon: i2, onCancel: s2, onOption: c2, onDone: d2, onValidateOption: p2, createOptionsButton: u2, options: m2 = Kt, autoFocusSel: h2 = ".defaultOption", defaultOption: x2 = m2[0], cancelOption:
|
|
706
|
+
const { description: r2, icon: i2, onCancel: s2, onOption: c2, onDone: d2, onValidateOption: p2, createOptionsButton: u2, options: m2 = Kt, autoFocusSel: h2 = ".defaultOption", defaultOption: x2 = m2[0], cancelOption: g2 = "Cancel", autoFocus: b2, children: y2, ...w2 } = o2, C2 = ue({ shouldUseNativeValidation: false }), { handleSubmit: M2, formState: S2 } = C2, R2 = l(null), P2 = l(null), D2 = l(null), E2 = K(async (e2) => {
|
|
707
707
|
let t2;
|
|
708
708
|
try {
|
|
709
709
|
if (t2 = await Promise.resolve(p2?.(e2)) ?? true, true !== t2) return;
|
|
710
|
-
await Promise.resolve(c2?.(e2, e2 ===
|
|
710
|
+
await Promise.resolve(c2?.(e2, e2 === g2, e2 === x2)), d2?.(e2);
|
|
711
711
|
} catch (e3) {
|
|
712
712
|
}
|
|
713
|
-
}, [c2, d2, p2,
|
|
713
|
+
}, [c2, d2, p2, g2, x2]), T2 = K((e2, t2) => {
|
|
714
714
|
setTimeout(() => {
|
|
715
715
|
E2(x2);
|
|
716
716
|
}, 180);
|
|
717
717
|
}, [E2]), z2 = K(() => {
|
|
718
|
-
c2?.(
|
|
719
|
-
}, [c2,
|
|
720
|
-
const n3 = t2 ===
|
|
718
|
+
c2?.(g2, true, false), s2?.(), d2?.(null);
|
|
719
|
+
}, [c2, g2, s2, d2]), N2 = S2 && (Object.keys(S2.errors).length > 0 || S2.disabled || S2.isSubmitted), B2 = K((t2, o3) => {
|
|
720
|
+
const n3 = t2 === g2, r3 = { className: o3 ? "defaultOption" : "action", type: o3 ? "submit" : "button", style: { minWidth: "75px" }, onClick: () => {
|
|
721
721
|
n3 ? z2() : o3 || E2(t2);
|
|
722
722
|
} };
|
|
723
723
|
if (u2) return u2(t2, r3, o3);
|
|
@@ -729,7 +729,7 @@ const Ft = { x: 0, y: 0 }, At = r(i((t2, o2) => {
|
|
|
729
729
|
};
|
|
730
730
|
}
|
|
731
731
|
return e($, { ...i3, children: e("div", { style: { paddingTop: "3px" }, children: t2 }) }, `action:${t2}`);
|
|
732
|
-
}, [m2, x2,
|
|
732
|
+
}, [m2, x2, g2, u2, S2]), L2 = a(() => {
|
|
733
733
|
const e2 = [];
|
|
734
734
|
for (let t2 = 0; t2 < m2.length; t2++) {
|
|
735
735
|
const o3 = m2[t2], n3 = x2 ? o3 === x2 : 0 === t2;
|
|
@@ -741,8 +741,8 @@ const Ft = { x: 0, y: 0 }, At = r(i((t2, o2) => {
|
|
|
741
741
|
if (e2.isDefaultPrevented()) return;
|
|
742
742
|
e2.stopPropagation();
|
|
743
743
|
let t2 = null, o3 = null;
|
|
744
|
-
const n3 = e2.which === j.Escape &&
|
|
745
|
-
if (n3) t2 =
|
|
744
|
+
const n3 = e2.which === j.Escape && g2;
|
|
745
|
+
if (n3) t2 = g2, o3 = P2;
|
|
746
746
|
else {
|
|
747
747
|
if (N2) return;
|
|
748
748
|
e2.which === j.Enter && (t2 = x2 ?? m2[0], o3 = R2);
|
|
@@ -760,7 +760,7 @@ const Ft = { x: 0, y: 0 }, At = r(i((t2, o2) => {
|
|
|
760
760
|
o2?.onDone?.(), r2.hide();
|
|
761
761
|
} });
|
|
762
762
|
});
|
|
763
|
-
}, Qt = n.lazy(() => import("./
|
|
763
|
+
}, Qt = n.lazy(() => import("./ev0GfCEwO6si6eml.mjs")), Ut = (e2) => {
|
|
764
764
|
const { showModal: t2 } = le();
|
|
765
765
|
return (o2) => {
|
|
766
766
|
const { defaultOption: n2 = o2.options?.[0], cancelOption: r2 = "Cancel", ...i2 } = o2;
|
|
@@ -776,11 +776,11 @@ const Ft = { x: 0, y: 0 }, At = r(i((t2, o2) => {
|
|
|
776
776
|
};
|
|
777
777
|
}, Gt = r(i((t2, o2) => {
|
|
778
778
|
const { command: n2, disabled: r2 = false, shortcut: i2, children: a2, ...l2 } = t2;
|
|
779
|
-
return U(n2), e(wt, { ref: o2, label: void 0 !== r2 ? n2?.
|
|
779
|
+
return U(n2), e(wt, { ref: o2, label: void 0 !== r2 ? n2?.getLabel() : "", shortcut: void 0 !== i2 ? i2 : Array.isArray(n2?.getShortcut()) ? n2?.getShortcut()[0] : n2?.getShortcut(), description: n2?.getDescription(), disabled: r2, chips: n2?.getTags(), componentDisabled: n2?.disabled(), ...l2, children: e("div", { style: { display: "flex", flex: "1 1 0%" }, children: a2 }) });
|
|
780
780
|
})), Xt = e(W, {}), Yt = r(i((t2, o2) => {
|
|
781
|
-
const { command: n2, commandHook: r2, scope: i2, context: s2, icon: c2, label: d2, disabled: u2 = false, variant: m2 = G.Toolbar, shortcut: h2, commandState: f2, propsTooltip: x2, ...
|
|
781
|
+
const { command: n2, commandHook: r2, scope: i2, context: s2, icon: c2, label: d2, disabled: u2 = false, variant: m2 = G.Toolbar, shortcut: h2, commandState: f2, propsTooltip: x2, ...g2 } = t2, b2 = l(null), y2 = l(false), v2 = a(() => {
|
|
782
782
|
const e2 = { onExecute(e3, t3) {
|
|
783
|
-
r2?.onExecute?.(e3, t3), y2.current || (
|
|
783
|
+
r2?.onExecute?.(e3, t3), y2.current || (b2.current?.start({ center: false }), setTimeout(() => b2.current?.stop({}), 180)), y2.current = false;
|
|
784
784
|
}, onError(e3, t3, o3) {
|
|
785
785
|
r2?.onError(e3, t3, o3);
|
|
786
786
|
} };
|
|
@@ -793,36 +793,36 @@ const Ft = { x: 0, y: 0 }, At = r(i((t2, o2) => {
|
|
|
793
793
|
e2.keyCode !== j.Enter && e2.keyCode !== j.Space || n2?.execute(f2, r2);
|
|
794
794
|
}, [k2, r2, f2]), S2 = a(() => {
|
|
795
795
|
if (c2) return "function" == typeof c2 ? c2(n2) : c2;
|
|
796
|
-
let t3 = n2?.
|
|
797
|
-
return t3 ? ("string" == typeof t3 && (t3 = e(W, { iconKey: t3 })), t3) : m2 === G.Toolbar || n2?.
|
|
798
|
-
}, [k2, c2]), R2 = a(() => ({ tabIndex: 0, ref: o2, selected: n2?.
|
|
796
|
+
let t3 = n2?.getIcon(s2);
|
|
797
|
+
return t3 ? ("string" == typeof t3 && (t3 = e(W, { iconKey: t3 })), t3) : m2 === G.Toolbar || n2?.getState() ? void 0 : Xt;
|
|
798
|
+
}, [k2, c2]), R2 = a(() => ({ tabIndex: 0, ref: o2, selected: n2?.getState(), icon: m2 === G.Toolbar ? S2 : e(Bt, { selected: n2?.getState() ?? false, children: S2 }), touchRippleRef: b2, disabled: u2 || !n2 || n2.disabled(), onMouseDown: w2, onMouseUp: C2, onKeyDown: M2 }), [k2, r2, u2, S2]);
|
|
799
799
|
let P2;
|
|
800
|
-
return P2 = m2 === G.Menuitem ? e(Dt, { ...
|
|
800
|
+
return P2 = m2 === G.Menuitem ? e(Dt, { ...g2, chips: n2?.getTags(), ...R2, children: d2 ?? n2?.getLabel(i2, s2) }) : e(St, { ...g2, ...R2 }), d2 || n2?.getLabel() ? ((n2.disabled() || u2) && (P2 = e("div", { children: P2 })), P2 = e(Gt, { command: n2, placement: m2 === G.Toolbar ? "bottom-start" : "right-start", shortcut: h2, ...x2, children: P2 }), P2) : P2;
|
|
801
801
|
}));
|
|
802
802
|
Yt.displayName = "CommandButton";
|
|
803
803
|
const Jt = e(W, {}), Zt = r(i((o2, n2) => {
|
|
804
|
-
const { command: r2, scope: i2, icon: d2 = Jt, label: p2, variant: u2 = G.Toolbar, disabled: m2 = false, commandHook: h2, ...f2 } = o2, x2 = l(null),
|
|
804
|
+
const { command: r2, scope: i2, icon: d2 = Jt, label: p2, variant: u2 = G.Toolbar, disabled: m2 = false, commandHook: h2, ...f2 } = o2, x2 = l(null), g2 = l(false), y2 = a(() => {
|
|
805
805
|
const e2 = { onExecute(e3, t2) {
|
|
806
|
-
h2?.onExecute?.(e3, t2),
|
|
806
|
+
h2?.onExecute?.(e3, t2), g2.current || (x2.current?.start({ center: false }), setTimeout(() => x2.current?.stop({}), 180)), g2.current = false;
|
|
807
807
|
}, onError(e3, t2, o3) {
|
|
808
808
|
h2?.onError(e3, t2, o3);
|
|
809
809
|
} };
|
|
810
810
|
return h2?.beforeExecute && (e2.beforeExecute = h2.beforeExecute), e2;
|
|
811
|
-
}, [h2]), v2 = U(r2, y2), k2 = () => r2?.
|
|
811
|
+
}, [h2]), v2 = U(r2, y2), k2 = () => r2?.getState()?.toString() || "0", [w2, C2] = c(k2), M2 = K(() => {
|
|
812
812
|
const e2 = parseFloat(w2);
|
|
813
813
|
isNaN(e2) ? C2(k2()) : parseFloat(k2()) !== e2 && r2.execute(e2, h2);
|
|
814
814
|
}, [k2, r2, w2, h2]);
|
|
815
815
|
s(() => {
|
|
816
816
|
C2(k2());
|
|
817
|
-
}, [r2?.
|
|
817
|
+
}, [r2?.getState()]);
|
|
818
818
|
const S2 = a(() => {
|
|
819
819
|
let t2 = "function" == typeof d2 ? d2(r2) : d2;
|
|
820
|
-
return t2 && (t2 = r2?.
|
|
821
|
-
}, [v2, d2, r2?.
|
|
820
|
+
return t2 && (t2 = r2?.getIcon()), "string" == typeof t2 && (t2 = e(W, { iconKey: t2 })), t2;
|
|
821
|
+
}, [v2, d2, r2?.getIcon]), R2 = a(() => void 0 === p2 ? r2?.getLabel(i2) : "function" == typeof p2 ? p2() : p2, [v2]), P2 = a(() => e(b, { ...f2, sx: { paddingTop: "0px", paddingBottom: "0px" }, component: "div", disableRipple: true, onClick: (e2) => e2.stopPropagation(), onMouseDown: (e2) => {
|
|
822
822
|
0 === e2.button && e2.stopPropagation();
|
|
823
823
|
}, onMouseUp: (e2) => {
|
|
824
824
|
0 === e2.button && e2.stopPropagation();
|
|
825
|
-
}, children: e(N, { inputMode: "numeric", disabled: m2 || !r2 || r2.disabled(), inputProps: { tabIndex: 0, name: `input-${r2.
|
|
825
|
+
}, children: e(N, { inputMode: "numeric", disabled: m2 || !r2 || r2.disabled(), inputProps: { tabIndex: 0, name: `input-${r2.getKey()}`, autoComplete: "off", type: "number", maxLength: 4 }, sx: { paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (e2) => `${Math.round(e2.typography.fontSize)}px`, width: (e2) => "3.2em", input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield" }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: w2, onFocus: (e2) => {
|
|
826
826
|
e2.target?.select();
|
|
827
827
|
}, onKeyDown: (e2) => {
|
|
828
828
|
if (e2.which === j.Enter) k2() !== w2 && (e2.stopPropagation(), e2.preventDefault(), M2());
|
|
@@ -842,14 +842,14 @@ const Jt = e(W, {}), Zt = r(i((o2, n2) => {
|
|
|
842
842
|
} }) }), [w2, m2, r2]), D2 = { tabIndex: 0, ref: n2, icon: S2, touchRippleRef: x2, disabled: m2 || !r2 || r2.disabled(), onMouseDown: (e2) => {
|
|
843
843
|
0 === e2.button && e2.preventDefault();
|
|
844
844
|
}, onMouseUp: (e2) => {
|
|
845
|
-
0 !== e2.button || e2.isPropagationStopped() || e2.isDefaultPrevented() || e2.isDefaultPrevented() || (e2.preventDefault(), r2?.execute(!r2?.
|
|
845
|
+
0 !== e2.button || e2.isPropagationStopped() || e2.isDefaultPrevented() || e2.isDefaultPrevented() || (e2.preventDefault(), r2?.execute(!r2?.getState(), y2));
|
|
846
846
|
}, onKeyDown: (e2) => {
|
|
847
|
-
e2.keyCode !== j.Enter && e2.keyCode !== j.Space || r2?.execute(!r2?.
|
|
847
|
+
e2.keyCode !== j.Enter && e2.keyCode !== j.Space || r2?.execute(!r2?.getState(), y2);
|
|
848
848
|
} };
|
|
849
849
|
let E2;
|
|
850
|
-
return E2 = u2 === G.Menuitem ? t(Dt, { ...f2, chips: r2?.
|
|
850
|
+
return E2 = u2 === G.Menuitem ? t(Dt, { ...f2, chips: r2?.getTags(), ...D2, children: [R2, P2] }) : e(St, { ...f2, ...D2 }), r2?.getLabel() ? ((r2.disabled() || m2) && (E2 = e("div", { children: E2 })), E2 = e(Gt, { command: r2, placement: u2 === G.Toolbar ? "bottom-start" : "right-start", children: E2 }), E2) : E2;
|
|
851
851
|
})), eo = r(i((t2, o2) => {
|
|
852
|
-
const { variant: n2 = G.Toolbar, quickCommand: r2, onQuickClick: i2, commands: s2, commandState: c2, commandHook: d2, disabled: p2, label: u2, icon: m2, createPopupPanel: h2, tooltip: f2, selected: x2, scope:
|
|
852
|
+
const { variant: n2 = G.Toolbar, quickCommand: r2, onQuickClick: i2, commands: s2, commandState: c2, commandHook: d2, disabled: p2, label: u2, icon: m2, createPopupPanel: h2, tooltip: f2, selected: x2, scope: g2, ...b2 } = t2, y2 = l(null), v2 = l(false), k2 = a(() => {
|
|
853
853
|
const e2 = { onExecute(e3, t3) {
|
|
854
854
|
d2?.onExecute?.(e3, t3), v2.current || (y2.current?.start({ center: false }), setTimeout(() => y2.current?.stop({}), 180)), v2.current = false;
|
|
855
855
|
}, onError(e3, t3, o3) {
|
|
@@ -858,21 +858,21 @@ const Jt = e(W, {}), Zt = r(i((o2, n2) => {
|
|
|
858
858
|
return d2?.beforeExecute && (e2.beforeExecute = d2.beforeExecute), e2;
|
|
859
859
|
}, [d2]), w2 = X(s2, [r2], null, [r2]), C2 = w2[0], { label: M2, icon: S2 } = a(() => {
|
|
860
860
|
let t3 = null;
|
|
861
|
-
u2 && (t3 = "function" == typeof u2 ? u2(C2) : u2), t3 || (t3 = C2?.
|
|
861
|
+
u2 && (t3 = "function" == typeof u2 ? u2(C2) : u2), t3 || (t3 = C2?.getLabel?.(g2));
|
|
862
862
|
let o3 = m2;
|
|
863
|
-
return o3 || (o3 = C2?.
|
|
864
|
-
}, [w2, u2, m2]), R2 = { disabled: p2, scope:
|
|
863
|
+
return o3 || (o3 = C2?.getIcon?.()), "string" == typeof o3 ? o3 = e(W, { iconKey: o3 }) : "function" == typeof o3 && (o3 = o3(C2)), { label: t3, icon: o3 };
|
|
864
|
+
}, [w2, u2, m2]), R2 = { disabled: p2, scope: g2, touchRippleRef: y2, onQuickClick: i2, tooltip: f2, label: M2, icon: S2 };
|
|
865
865
|
(M2 || f2) && (R2.createTooltip = ({ children: t3 }, o3) => e(wt, { label: M2, description: f2, disabled: o3, children: t3 }));
|
|
866
866
|
const P2 = K((e2) => h2?.(e2, s2), [h2, w2]), D2 = K((e2) => C2?.execute(c2, k2), [C2]);
|
|
867
867
|
return C2 ? (R2.propsQuickButton = {}, R2.propsQuickButton.createTooltip = ({ children: t3, placement: o3 }, r3) => e(Gt, { command: C2, placement: o3 ?? n2 === G.Toolbar ? "bottom-start" : "right-start", disabled: r3, children: t3 }), R2.disabled = R2.disabled ?? C2?.disabled(), i2 || (R2.onQuickClick = D2)) : r2 && (R2.onQuickClick = () => {
|
|
868
|
-
}), R2.selected = x2 ?? C2?.
|
|
868
|
+
}), R2.selected = x2 ?? C2?.getState(), R2.createPopupPanel = P2, n2 === G.Toolbar ? e(Tt, { ...b2, ...R2, ref: o2 }) : e($t, { ...b2, ...R2, ref: o2 });
|
|
869
869
|
}));
|
|
870
870
|
eo.displayName = "CommandPopupButton";
|
|
871
871
|
const to = e(W, { iconKey: "Check" }), oo = (o2) => {
|
|
872
872
|
const { command: n2, label: r2, scope: i2, icon: a2 = to, sx: l2, ...s2 } = o2;
|
|
873
|
-
return t(v, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (e2) => e2.typography.subtitle2.fontSize, ...l2 }, ...s2, children: [a2, e(k, { component: "div", sx: { whiteSpace: "nowrap", lineHeight: "1", paddingLeft: (e2) => e2.spacing(0.25), paddingRight: (e2) => e2.spacing(0.25), fontSize: "inherit" }, children: n2?.
|
|
873
|
+
return t(v, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (e2) => e2.typography.subtitle2.fontSize, ...l2 }, ...s2, children: [a2, e(k, { component: "div", sx: { whiteSpace: "nowrap", lineHeight: "1", paddingLeft: (e2) => e2.spacing(0.25), paddingRight: (e2) => e2.spacing(0.25), fontSize: "inherit" }, children: n2?.getLabel(i2) || r2 })] });
|
|
874
874
|
}, no = r(i((t2, o2) => {
|
|
875
|
-
const { sx: n2, commands: r2, propsCommandButton: i2, parentFloat: l2, renderToolbarPalette: s2, children: d2, ...u2 } = t2, h2 = Q(o2, () => ({}), []), [f2, x2] = c(null), { reference:
|
|
875
|
+
const { sx: n2, commands: r2, propsCommandButton: i2, parentFloat: l2, renderToolbarPalette: s2, children: d2, ...u2 } = t2, h2 = Q(o2, () => ({}), []), [f2, x2] = c(null), { reference: g2 } = ht({ label: "toolbar", anchor: h2.current, parentFloat: l2, createPopupPanel: null }), b2 = p(() => {
|
|
876
876
|
const e2 = f2;
|
|
877
877
|
e2 && requestAnimationFrame(() => {
|
|
878
878
|
h2.current?.contains(document.activeElement) && e2.focus();
|
|
@@ -881,17 +881,17 @@ const to = e(W, { iconKey: "Check" }), oo = (o2) => {
|
|
|
881
881
|
const { commandHook: e2, ...t3 } = i2 || {};
|
|
882
882
|
return { commandHook: { beforeExecute: (t4, o3) => {
|
|
883
883
|
const n3 = e2?.beforeExecute?.(t4, o3);
|
|
884
|
-
return false !== n3 &&
|
|
884
|
+
return false !== n3 && g2.closeAll();
|
|
885
885
|
}, onExecute(t4, o3) {
|
|
886
|
-
e2?.onExecute?.(t4, o3),
|
|
886
|
+
e2?.onExecute?.(t4, o3), b2();
|
|
887
887
|
}, onError(t4, o3, n3) {
|
|
888
888
|
e2?.onError?.(t4, o3, n3);
|
|
889
889
|
} }, ...t3 };
|
|
890
|
-
}, [
|
|
890
|
+
}, [g2, i2]), k2 = a(() => ({ ...y2, ...v2 }), [y2, v2]), [w2, C2] = m((e2) => e2 + 1, 0);
|
|
891
891
|
X(r2, [], { onChange: () => {
|
|
892
892
|
C2();
|
|
893
893
|
} });
|
|
894
|
-
const M2 = a(() => ({ commands: r2, parentFloat:
|
|
894
|
+
const M2 = a(() => ({ commands: r2, parentFloat: g2, ...v2 }), [w2, k2, g2, i2]);
|
|
895
895
|
let S2 = 0;
|
|
896
896
|
y2.dense || (S2 += 2), y2.outlined && S2++;
|
|
897
897
|
let R2 = 2;
|
|
@@ -918,12 +918,12 @@ const ro = (t2) => {
|
|
|
918
918
|
t4 && !t4.disabled() && e2++;
|
|
919
919
|
}
|
|
920
920
|
return { allDisabled: 0 === e2 };
|
|
921
|
-
}, [f2]),
|
|
921
|
+
}, [f2]), g2 = p((t3, o3) => {
|
|
922
922
|
const a2 = { variant: G.Menuitem, commandHook: u2, commandState: d2, scope: c2 ?? i2, disabled: m2 }, l3 = [], s3 = n2 ? n2.length : 0;
|
|
923
923
|
for (let t4 = 0; t4 < s3; t4++) {
|
|
924
924
|
const i3 = n2[t4];
|
|
925
925
|
if (null === i3 || "-" === i3) {
|
|
926
|
-
l3.push(e(
|
|
926
|
+
l3.push(e(be, { orientation: "horizontal" }, `element-${l3.length}`));
|
|
927
927
|
continue;
|
|
928
928
|
}
|
|
929
929
|
const s4 = o3.getCommand(i3), c3 = { key: `${i3}-${l3.length}`, command: s4, ...a2 }, d3 = r2(c3);
|
|
@@ -931,7 +931,7 @@ const ro = (t2) => {
|
|
|
931
931
|
}
|
|
932
932
|
return rt({ ...t3, children: l3 });
|
|
933
933
|
}, [m2, u2, d2, c2, n2, r2]);
|
|
934
|
-
return n2 ? e(eo, { ref: o2, commands: l2, disabled: m2 || x2, commandHook: u2, commandState: d2, scope: i2, quickCommand: s2, createPopupPanel:
|
|
934
|
+
return n2 ? e(eo, { ref: o2, commands: l2, disabled: m2 || x2, commandHook: u2, commandState: d2, scope: i2, quickCommand: s2, createPopupPanel: g2, ...h2 }) : r2({ ref: o2, disabled: m2, commandHook: u2, commandState: d2, scope: i2, command: f2[0], ...h2 });
|
|
935
935
|
}));
|
|
936
936
|
export {
|
|
937
937
|
Ce as AnimatedBouncingEllipsisIcon,
|
|
@@ -949,8 +949,8 @@ export {
|
|
|
949
949
|
eo as CommandPopupButton,
|
|
950
950
|
no as CommandToolbar,
|
|
951
951
|
Gt as CommandTooltip,
|
|
952
|
-
|
|
953
|
-
|
|
952
|
+
gt as ContextMenu,
|
|
953
|
+
be as ExhibitDivider,
|
|
954
954
|
at as ExhibitFloatPanel,
|
|
955
955
|
St as ExhibitIconButton,
|
|
956
956
|
Et as ExhibitMenuHeader,
|
|
@@ -970,7 +970,7 @@ export {
|
|
|
970
970
|
nt as PopupButtonType,
|
|
971
971
|
Bt as SelectedIcon,
|
|
972
972
|
io as SimpleCommandPopupButton,
|
|
973
|
-
|
|
973
|
+
bt as SimpleTooltip,
|
|
974
974
|
ze as StackTrace,
|
|
975
975
|
$e as StackTraceErrorPanel,
|
|
976
976
|
Ye as ThemeMode,
|
|
@@ -985,7 +985,7 @@ export {
|
|
|
985
985
|
_e as hexToRGB,
|
|
986
986
|
Qe as overlayAlpha,
|
|
987
987
|
he as renderScrollButtonEdge,
|
|
988
|
-
|
|
988
|
+
ge as renderScrollButtonEnd,
|
|
989
989
|
xe as renderScrollButtonStart,
|
|
990
990
|
Xe as scrollbarTheming,
|
|
991
991
|
Fe as strokeShadowFilter,
|