@sheetxl/utils-mui 0.5.1 → 0.6.0
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/{MHFMRtrXP_CJzetR.cjs → BPi0A9UfWn1_4G-r.cjs} +7 -7
- package/browser/cjs/{CTM20zCIDhaukb4f.cjs → RtzvbbrFTJAPS2PA.cjs} +2 -2
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{DeTiJkPPGJNaKq-L.mjs → BRzBZNk26VNaAxCQ.mjs} +2 -2
- package/browser/esm/{DHegxfSwg6us76aH.mjs → CesLTDLLqhvz7oP6.mjs} +248 -247
- package/browser/esm/index.mjs +109 -108
- package/node/esm/{D8InLKm-2lbs00yQ.mjs → CBkOcYriJ00VJ4Wf.mjs} +1 -1
- package/node/esm/index.mjs +53 -52
- package/package.json +3 -3
- package/types/index.d.ts +2 -0
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.
|
|
2
|
+
* @license @sheetxl/utils-mui - Utilities MUI - Utilities for MUI Components needed for all SheetXL components. - v0.6.0
|
|
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.
|
|
@@ -12,21 +12,21 @@ import { SvgIcon as H, Box as V, IconButton as y, Divider as x, Typography as M,
|
|
|
12
12
|
import { CommonUtils as O } from "@sheetxl/utils";
|
|
13
13
|
import { useId as T, defaultCreateScrollEdgeButton as I, ScrollbarOrientation as B, useCallbackRef as F, useFullscreenPortal as W, KeyCodes as q, KeyModifiers as _, ReactUtils as j, useImperativeElement as Q, useCommand as U, CommandButtonType as K, useCommands as G } from "@sheetxl/utils-react";
|
|
14
14
|
import { styled as X, useTheme as Y, createTheme as J, useThemeProps as ee } from "@mui/material/styles";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { mergeRefs as
|
|
19
|
-
import { useIsomorphicLayoutEffect as
|
|
20
|
-
import
|
|
21
|
-
import { useModal as
|
|
15
|
+
import { deepmerge as te } from "@mui/utils";
|
|
16
|
+
import { detectOverflow as ce } from "@popperjs/core";
|
|
17
|
+
import { ArrowLeft as le, ArrowUpward as ne, ArrowRight as oe, ArrowDownward as ae, ContentCopy as re, BugReport as ie, Error as se, Close as de } from "@mui/icons-material";
|
|
18
|
+
import { mergeRefs as he } from "react-merge-refs";
|
|
19
|
+
import { useIsomorphicLayoutEffect as pe, useMeasure as me } from "react-use";
|
|
20
|
+
import ue from "tiny-invariant";
|
|
21
|
+
import { useModal as ve } from "mui-modal-provider";
|
|
22
22
|
export * from "mui-modal-provider";
|
|
23
23
|
import { default as default2 } from "mui-modal-provider";
|
|
24
|
-
import { createPortal as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import { primaryInput as
|
|
28
|
-
import { useForm as
|
|
29
|
-
const
|
|
24
|
+
import { createPortal as fe } from "react-dom";
|
|
25
|
+
import ze from "focus-trap-react";
|
|
26
|
+
import He from "react-draggable";
|
|
27
|
+
import { primaryInput as Ve } from "detect-it";
|
|
28
|
+
import { useForm as ye, FormProvider as xe } from "react-hook-form";
|
|
29
|
+
const Me = (t2) => e(H, { ...t2, children: e("path", {}) }), ge = (t2) => e(H, { ...t2, children: e("path", { className: "styled info", d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }) }), Ce = (t2) => e(H, { ...t2, children: e("path", { d: "M 11.711504,15.057122 6.7084873,9.6662629 7.4387237,8.8784728 11.711504,13.488062 15.978252,8.8784728 16.708487,9.6662629" }) }), be = (c2) => t(H, { ...c2, children: [e("path", { d: "m 12,21.888913 v -7 h 2 v 7 z M 12,9 V 2 h 2 V 9 Z M 4,2 V 21.999938 H 2 V 2 Z" }), e("path", { className: "styled info", d: "m 6,12.91274 h 3.9862992 3.8490838 4.160058 v 2.554311 L 22,11.635609 17.995441,7.8041663 V 10.358479 H 13.835383 9.9863002 6 Z" })] }), Le = (c2) => t(H, { ...c2, children: [e("path", { d: "M 22.062389,1.9999683 V 22.000032 h -2 V 1.9999683 Z m -18.062427,0 V 22.000032 h -2 V 1.9999683 Z" }), e("path", { className: "styled info", d: "m 6.0839844,6.3867187 h 7.4238286 c 2.442808,0 4.423828,1.995808 4.423828,4.4589843 0,2.463178 -1.981061,4.460938 -4.423828,4.460938 H 8.9316406 v 1.404296 L 6.1132812,13.871094 8.9316406,11.03125 v 1.404297 h 4.5761724 c 0.870956,0 1.576171,-0.713095 1.576171,-1.589844 0,-0.8767853 -0.70537,-1.5878905 -1.576171,-1.5878905 H 6.0839844 Z" })] }), Ze = (c2) => t(H, { ...c2, children: [e("path", { d: "M 4,3 V 21 H 2 V 3 Z m 18,5.573e-4 V 21.000557 H 20 V 3.0005573 Z" }), e("path", { className: "styled info", d: "m 8,10.715958 v 2.57 h 12 v -2.57 z" })] }), Ne = (c2) => t(H, { ...c2, children: [e("path", { d: "M 21.974894,2.0582915 V 22.058355 h -2 V 2.0582915 Z M 3.999962,1.9999683 V 22.000032 h -2 V 1.9999683 Z" }), e("path", { className: "styled info", d: "m 6.2289672,7.8040604 -6.3e-5,8.2560526 h 2.518176 l 2e-5,-2.642838 h 6.4753038 l -2e-5,2.642838 h 2.518175 l 6.1e-5,-8.2560526 h -2.518174 l -2.2e-5,2.9478576 H 8.7471192 l 2.3e-5,-2.9478576 z" })] }), ke = (t2) => e(H, { ...t2, children: e("path", { d: "M 9.2299627,5.1022181 V 7.0235319 H 11.052809 L 9.2996104,17.11043 H 7.3086489 v 1.921315 H 13.072591 V 17.11043 H 11.249744 L 13.002943,7.0235319 h 1.990962 V 5.1022181 Z" }) }), we = (t2) => e(H, { ...t2, children: e("path", { d: "m 15.500659,11.85365 c 0.97,-0.67 1.65,-1.77 1.65,-2.79 0,-2.2599999 -1.75,-3.9999999 -4,-3.9999999 H 6.9006595 V 19.06365 h 7.0399995 c 2.09,0 3.71,-1.7 3.71,-3.79 0,-1.52 -0.86,-2.82 -2.15,-3.42 M 9.9006595,7.5636501 h 2.9999995 c 0.83,0 1.5,0.6699999 1.5,1.4999999 0,0.83 -0.67,1.5 -1.5,1.5 H 9.9006595 Z M 13.400659,16.56365 H 9.9006595 v -3 h 3.4999995 c 0.83,0 1.5,0.67 1.5,1.5 0,0.83 -0.67,1.5 -1.5,1.5" }) }), Se = (c2) => t(H, { ...c2, children: [e("path", { d: "M 16.11036,4.2052293 C 15.637405,4.2051462 15.167307,4.3880965 14.807694,4.7470462 12.884011,6.6697055 6.3785302,13.175428 4.5724566,14.980637 c -0.816402,0.823942 -0.8166797,2.144871 0.00165,2.96929 l 4.7940106,4.79401 c 0.1560329,0.154865 0.3687977,0.250643 0.5978103,0.25197 h 9.4299205 c 1.106674,-0.02126 1.103958,-1.676706 -0.0099,-1.697913 H 14.27574 c 0.36412,-0.363115 0.7726,-0.769137 0.900832,-0.89754 l 0.06259,-0.05599 0.0018,-0.0018 v -0.0018 l 0.02306,-0.02964 c 0.01852,-0.01851 0.064,-0.064 0.154803,-0.154806 1.004947,-1.004932 6.080948,-6.082847 7.185253,-7.186898 0.0828,-0.08277 0.143524,-0.145217 0.176214,-0.177861 l 0.0066,-0.0066 0.005,-0.005 0.0018,-0.0018 0.0018,-0.0018 0.0018,-0.0018 0.01976,-0.01812 c 0.720325,-0.721604 0.720603,-1.883449 0,-2.605333 L 17.413027,4.7470462 C 17.053509,4.3879396 16.583014,4.2053121 16.11036,4.2052293 Z m 0,1.6962662 c 0.04001,1.39e-5 0.07896,0.013161 0.107046,0.041172 l 5.40335,5.4033495 c 0.05964,0.06023 0.05788,0.158934 0.0018,0.215738 L 14.647948,18.536208 9.0255673,12.915474 16.001667,5.9426669 c 0.02812,-0.028008 0.06743,-0.041186 0.108693,-0.041171 z M 7.8315934,14.111095 13.452328,19.73183 11.886163,21.297994 H 10.311765 L 5.7680774,16.755952 c -0.1588239,-0.160312 -0.1571288,-0.424381 0,-0.582988 z" }), e("path", { className: "styled info", d: "M 5.7580928,1.3371537 4.9319914,4.6570488 H 2.2351143 V 5.7189333 H 4.6566242 L 3.933785,8.6756882 H 1.3143556 V 9.7375737 H 3.6584179 L 2.840922,13.047141 H 3.8546168 L 4.6721135,9.7375737 H 6.7958823 L 6.1677007,12.277835 7.5152788,10.930257 7.8112989,9.7375737 H 8.709684 L 9.7715688,8.6756882 H 8.086666 L 8.8095044,5.7189333 H 11.428935 V 4.6570488 H 9.0848717 L 9.9109739,1.3371537 H 8.8955565 L 8.0694549,4.6570488 H 5.947407 L 6.7717875,1.3371537 Z M 5.6634348,5.701723 H 7.8181826 L 7.079855,8.6911775 H 4.9251067 Z" })] }), Pe = (t2) => e(H, { ...t2, children: e("path", { d: "M 15.03125,1.3183594 C 14.54185,1.3182736 14.053088,1.5042411 13.679688,1.8769531 11.398308,4.157118 3.6820968,11.87362 1.5410156,14.013672 c -0.86142447,0.86938 -0.86098491,2.265402 0.00195,3.134765 l 5.6855469,5.685547 c 0.1357951,0.134779 0.3202858,0.213709 0.515625,0.214844 H 18.921875 c 0.952769,-0.0183 0.952325,-1.440701 -0.0059,-1.458984 h -6.72461 c 0.52861,-0.528334 1.319592,-1.318068 1.550782,-1.548828 l 0.0293,-0.02734 0.0059,-0.0098 0.002,-0.002 0.0039,-0.0039 0.0059,-0.0059 0.0039,-0.0039 0.01172,-0.01172 0.0098,-0.0078 c 0.0012,-0.0011 0.01373,-0.01569 0.01563,-0.01758 0.0213,-0.02126 0.07807,-0.07612 0.1875,-0.185547 1.191778,-1.191762 7.211708,-7.213963 8.521484,-8.523437 0.0975,-0.09747 0.168608,-0.170617 0.208985,-0.210938 l 0.0078,-0.0078 0.0059,-0.0059 0.002,-0.002 0.0039,-0.0039 0.002,-0.002 0.002,-0.002 0.002,-0.002 0.01758,-0.01563 c 0.746601,-0.747927 0.74678,-1.9550164 0,-2.7031246 L 16.382812,1.8769531 C 16.009537,1.5041056 15.520443,1.3184452 15.03125,1.3183594 Z m 0,1.4570312 c 0.114653,3.98e-5 0.230973,0.043724 0.320313,0.1328125 l 6.408203,6.4082032 c 0.175951,0.1776856 0.17626,0.4665109 0.002,0.6425781 L 13.296875,18.423828 6.2421875,11.371094 14.708984,2.9082031 c 0.08956,-0.089187 0.207055,-0.1328525 0.322266,-0.1328125 z m -9.8183594,9.6269534 7.0527344,7.052734 -2.134766,2.134766 H 8.0449219 L 2.5722656,16.119141 c -0.2949291,-0.297692 -0.2937607,-0.781608 0,-1.078125 z" }) }), Ae = (c2) => t(H, { ...c2, children: [e("path", { d: "M 16.11036,4.2052293 C 15.637405,4.2051462 15.167307,4.3880965 14.807694,4.7470462 12.884011,6.6697055 6.3785302,13.175428 4.5724566,14.980637 c -0.816402,0.823942 -0.8166797,2.144871 0.00165,2.96929 l 4.7940106,4.79401 c 0.1560329,0.154865 0.3687977,0.250643 0.5978103,0.25197 h 9.4299205 c 1.106674,-0.02126 1.103958,-1.676706 -0.0099,-1.697913 H 14.27574 c 0.36412,-0.363115 0.7726,-0.769137 0.900832,-0.89754 l 0.06259,-0.05599 0.0018,-0.0018 v -0.0018 l 0.02306,-0.02964 c 0.01852,-0.01851 0.064,-0.064 0.154803,-0.154806 1.004947,-1.004932 6.080948,-6.082847 7.185253,-7.186898 0.0828,-0.08277 0.143524,-0.145217 0.176214,-0.177861 l 0.0066,-0.0066 0.005,-0.005 0.0018,-0.0018 0.0018,-0.0018 0.0018,-0.0018 0.01976,-0.01812 c 0.720325,-0.721604 0.720603,-1.883449 0,-2.605333 L 17.413027,4.7470462 C 17.053509,4.3879396 16.583014,4.2053121 16.11036,4.2052293 Z m 0,1.6962662 c 0.04001,1.39e-5 0.07896,0.013161 0.107046,0.041172 l 5.40335,5.4033495 c 0.05964,0.06023 0.05788,0.158934 0.0018,0.215738 L 14.647948,18.536208 9.0255673,12.915474 16.001667,5.9426669 c 0.02812,-0.028008 0.06743,-0.041186 0.108693,-0.041171 z M 7.8315934,14.111095 13.452328,19.73183 11.886163,21.297994 H 10.311765 L 5.7680774,16.755952 c -0.1588239,-0.160312 -0.1571288,-0.424381 0,-0.582988 z" }), e("path", { className: "styled info", d: "m 1.6679826,1.0184502 c -0.330106,0 -0.601562,0.314804 -0.601562,0.701172 v 2.810547 c 0,0.386369 0.271456,0.703125 0.601562,0.703125 h 7.201172 c 0.3301052,0 0.5996094,-0.316756 0.5996094,-0.703125 v -0.703125 h 0.601561 v 2.810547 H 4.0683736 v 7.3261708 l 2.40039,-2.363281 V 8.0418882 H 10.08595 l 1.183594,-1.164063 v -4.455078 h -1.80078 v -0.703125 c 0,-0.386368 -0.2695042,-0.701172 -0.5996094,-0.701172 z" })] }), Re = (e2) => {
|
|
30
30
|
if ("dark" !== e2.palette.mode) return;
|
|
31
31
|
return `drop-shadow(0px 0px 1px ${"dark" === e2.palette.mode ? e2.palette.text.primary : e2.palette.divider})`;
|
|
32
32
|
}, De = (e2 = 1) => (t2) => {
|
|
@@ -75,7 +75,7 @@ const ge = (t2) => e(H, { ...t2, children: e("path", {}) }), Ce = (t2) => e(H, {
|
|
|
75
75
|
}, Wl = (t2, c2, l2, n2) => {
|
|
76
76
|
const { style: o2, ...a2 } = t2, r2 = e(y, { component: "div", ...a2, style: { ...o2, padding: "0px" }, sx: { padding: "0" }, color: t2.disabled ? void 0 : "primary", "aria-label": l2, size: "small", children: c2 });
|
|
77
77
|
return e($n, { title: t2.disabled ? l2 : n2, enterDelay: 800, enterNextDelay: 1600, children: t2.disabled ? e("div", { style: { display: "flex" }, children: r2 }) : r2 });
|
|
78
|
-
}, ql = (t2) => Wl(t2, B.Horizontal ? e(
|
|
78
|
+
}, ql = (t2) => Wl(t2, B.Horizontal ? e(le, { fontSize: "small" }) : e(ne, { fontSize: "small" }), "Scroll " + (t2.orientation === B.Horizontal ? "Left" : "Up"), `Scroll ${t2.orientation === B.Horizontal ? "left" : "up"}, 'Ctrl+Click' to scroll to the beginning`), _l = (t2) => Wl(t2, B.Horizontal ? e(oe, { fontSize: "small" }) : e(ae, { fontSize: "small" }), "Scroll " + (t2.orientation === B.Horizontal ? "Right" : "Down"), `Scroll ${t2.orientation === B.Horizontal ? "right" : "down"}, 'Ctrl+Click' to scroll to the end`), jl = n(o((t2, c2) => {
|
|
79
79
|
const { orientation: l2 = "vertical", sx: n2, ...o2 } = t2, a2 = "vertical" === l2;
|
|
80
80
|
return e(x, { ref: c2, sx: { marginLeft: a2 ? "1px" : void 0, marginRight: a2 ? "1px" : void 0, backgroundColor: "transparent !important", borderColor: (e2) => e2.palette.divider, ...n2 }, orientation: l2, variant: "middle", flexItem: true, ...o2 });
|
|
81
81
|
})), Ql = "_traverse-ellipsis_14l1h_1", Ul = n((c2) => {
|
|
@@ -99,9 +99,9 @@ const ge = (t2) => e(H, { ...t2, children: e("path", {}) }), Ce = (t2) => e(H, {
|
|
|
99
99
|
}), en = e(Kl, {}), tn = n(o((c2, l2) => {
|
|
100
100
|
const { sx: n2, style: o2, onMount: s2, onUnmount: d2, transitionDelay: h2 = "1200ms", panel: p2 = false, transparentBackground: m2 = true, icon: u2 = en, label: f2, ...z2 } = c2, H2 = r(() => "string" == typeof f2 ? e(M, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: f2 }) : f2, [f2]), y2 = i(null), x2 = r(() => {
|
|
101
101
|
let c3 = t(V, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "8px" }, children: [H2, u2] });
|
|
102
|
-
return true === p2 && (c3 = e(g, { 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) => `${v(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: c3 })), e(V, { ref:
|
|
102
|
+
return true === p2 && (c3 = e(g, { 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) => `${v(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: c3 })), e(V, { ref: he([y2, l2]), 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: h2, transitionDuration: "320ms", transitionTimingFunction: "ease-in", overflow: "hidden", outline: "none", width: "100%", height: "100%", zIndex: 99999, "&.animating": { opacity: 1 }, "&.animating-exit": { opacity: 0, transition: "opacity 210ms" }, ...n2, ...o2 }, ...z2, 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" } }), c3] }) });
|
|
103
103
|
}, [n2, p2]), C2 = i(false), b2 = i(false);
|
|
104
|
-
return
|
|
104
|
+
return pe(() => {
|
|
105
105
|
if (y2.current && !C2.current && !b2.current) {
|
|
106
106
|
if (b2.current = true, y2.current.classList.contains("animatable") && !y2.current.classList.contains("animating")) {
|
|
107
107
|
let e2 = false;
|
|
@@ -165,9 +165,9 @@ const cn = /^\s*at\s+(?:(async|new|await)\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/, l
|
|
|
165
165
|
} catch (e2) {
|
|
166
166
|
a2("Can't copy!"), console.warn("Failed to copy stack trace:", e2);
|
|
167
167
|
}
|
|
168
|
-
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Copy stack trace", children: e(
|
|
168
|
+
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Copy stack trace", children: e(re, { sx: { fontSize: "0.875rem" } }) }), e(y, { size: "small", onClick: () => {
|
|
169
169
|
console.log(c2);
|
|
170
|
-
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: e(
|
|
170
|
+
}, sx: { color: "inherit", opacity: 0.7, "&:hover": { opacity: 1 } }, title: "Log error to console", children: e(ie, { sx: { 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((c3, l3) => c3.isBoundary ? e(V, { sx: { py: 1, mt: l3 > 0 ? 1 : 0, mb: 0.5, borderTop: l3 > 0 ? "1px solid rgba(255, 255, 255, 0.1)" : "none" }, children: e(M, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", fontWeight: "bold", color: (e2) => c3.isBoundary ? e2.palette.text.primary : e2.palette.text.secondary, display: "block" }, children: c3.line }) }, `error-${l3}`) : t(V, { sx: { display: "flex", alignItems: "flex-start", gap: 1, py: 0.25, pl: 1, "&:hover": { backgroundColor: "rgba(255, 255, 255, 0.05)" } }, children: [!n2 && e(M, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.5, minWidth: "20px", textAlign: "right", userSelect: "none" }, children: l3 + 1 }), t(V, { sx: { flex: 1, overflow: "hidden" }, children: [e(M, { variant: "caption", component: "div", sx: { fontSize: "0.75rem", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", color: "inherit" }, children: c3.line }), c3.location && c3.line !== c3.location && e(M, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic" }, children: c3.location })] })] }, `stack-${l3}`)), h2 && t(M, { variant: "caption", component: "div", sx: { fontSize: "0.625rem", opacity: 0.6, fontStyle: "italic", textAlign: "center", display: "block", mt: 1 }, children: ["... and ", i2.length - l2, " more frames"] })] })] });
|
|
171
171
|
});
|
|
172
172
|
on.displayName = "StackTrace";
|
|
173
173
|
const an = (c2, n2 = false, o2 = false) => {
|
|
@@ -176,7 +176,7 @@ const an = (c2, n2 = false, o2 = false) => {
|
|
|
176
176
|
const a2 = "string" === c2 ? c2 : `Unknown Error: ${String(c2)}`;
|
|
177
177
|
return e(M, { variant: "caption", component: "div", sx: { fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em" }, children: a2 });
|
|
178
178
|
}, rn = n(o((c2, l2) => {
|
|
179
|
-
const { sx: n2, icon: o2 = e(
|
|
179
|
+
const { sx: n2, icon: o2 = e(se, { style: { fontSize: 48 } }), error: a2, hideStackTrace: i2 = false, stackTraceExpanded: s2 = false, ...d2 } = c2, h2 = r(() => an(a2, i2, s2), [a2, i2, s2]);
|
|
180
180
|
return r(() => e(V, { ref: l2, sx: { boxSizing: "border-box", alignItems: "center", justifyContent: "center", display: "flex", flexDirection: "row", overflow: "hidden", width: "100%", height: "100%", ...n2 }, ...d2, children: t(V, { sx: { display: "flex", flex: "1 1 100%", height: "100%", alignItems: "center", justifyContent: "center", boxSizing: "border-box", position: "relative" }, children: [e(V, { className: "backdrop", sx: { backdropFilter: "blur(4px)", borderRadius: (e2) => `${e2.shape.borderRadius}px`, zIndex: -1, position: "absolute", width: "100%", height: "100%", boxSizing: "border-box" } }), e(g, { elevation: 0, sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", rowGap: "8px", alignSelf: "center", marginBottom: "5%", backgroundColor: (e2) => e2.palette.error.light, color: (e2) => e2.palette.error.contrastText, paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2), paddingTop: (e2) => e2.spacing(2), paddingBottom: (e2) => e2.spacing(2), borderRadius: (e2) => `${e2.shape.borderRadius}px`, boxShadow: (e2) => e2.shadows[2], "& .primary": { background: (e2) => `${e2.palette.error.contrastText} !important`, border: "solid transparent" }, zIndex: 1 }, children: e(V, { sx: { display: "flex", flexDirection: "column", alignItems: "center", gap: (e2) => e2.spacing(2), width: "100%", maxWidth: "600px" }, children: t(V, { sx: { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: (e2) => e2.spacing(2) }, children: [o2, h2] }) }) })] }) }), [n2]);
|
|
181
181
|
}));
|
|
182
182
|
rn.displayName = "ErrorPanel";
|
|
@@ -195,7 +195,7 @@ const sn = n(o((t2, c2) => {
|
|
|
195
195
|
}, [n2]);
|
|
196
196
|
return e(V, { ref: c2, sx: { display: "flex", flexDirection: "row", marginLeft: "4px", gap: "2px", ...o2 }, ...a2, children: r2 });
|
|
197
197
|
})), dn = { name: "maxSize", enabled: true, phase: "main", requiresIfExists: ["offset", "preventOverflow", "flip"], fn: function(e2) {
|
|
198
|
-
var t2 = e2.state, c2 = e2.name, l2 = e2.options, n2 =
|
|
198
|
+
var t2 = e2.state, c2 = e2.name, l2 = e2.options, n2 = ce(t2, l2), o2 = t2.modifiersData.preventOverflow || { x: 0, y: 0 }, a2 = o2.x, r2 = o2.y;
|
|
199
199
|
let i2 = t2.rects.popper, s2 = i2.width, d2 = i2.height, h2 = t2.placement.split("-")[0], p2 = "left" === h2 ? "left" : "right", m2 = "top" === h2 ? "top" : "bottom";
|
|
200
200
|
t2.modifiersData[c2] = { width: s2 - n2[p2] - a2, height: d2 - n2[m2] - r2 };
|
|
201
201
|
} }, hn = [0, 2], pn = n(o((t2, c2) => {
|
|
@@ -233,7 +233,7 @@ pn.displayName = "ExhibitPopper";
|
|
|
233
233
|
const mn = { Popup: "popup", Anchor: "anchor" }, un = { ByPopup: "popupDone", Cancel: "popupCancel", ClickAway: "clickAway" }, vn = { Toolbar: "toolbar", Menuitem: "menuitem" }, fn = (t2) => {
|
|
234
234
|
const { closeFloat: c2, closeFloatAll: l2, floatReference: n2, popupContainer: o2, children: a2, className: r2, sx: i2, ...s2 } = t2;
|
|
235
235
|
return e(V, { className: u("menu", r2), sx: { display: "flex", flexDirection: "column", ...i2 }, ...s2, children: a2 });
|
|
236
|
-
}, zn = (t2, c2, l2) => e(
|
|
236
|
+
}, zn = (t2, c2, l2) => e(Ce, { sx: { marginLeft: t2 ? void 0 : c2 ? "-5px" : "-3px", marginRight: t2 ? void 0 : c2 ? "-5px" : "-6px", transform: () => {
|
|
237
237
|
let e2;
|
|
238
238
|
return c2 && (e2 = (e2 ? e2 + " " : "") + "scale(0.8)"), l2 && (e2 = (e2 ? e2 + " " : "") + "rotate(180deg)"), e2;
|
|
239
239
|
} }, color: "inherit" }), Hn = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, Vn = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, yn = function(e2, t2 = null) {
|
|
@@ -257,11 +257,11 @@ const mn = { Popup: "popup", Anchor: "anchor" }, un = { ByPopup: "popupDone", Ca
|
|
|
257
257
|
} }, dirty: { fontStyle: "italic", color: function() {
|
|
258
258
|
return c2.palette.text.secondary;
|
|
259
259
|
} } } } } }, n2 = l2;
|
|
260
|
-
t2 && (n2 =
|
|
260
|
+
t2 && (n2 = te(l2, t2));
|
|
261
261
|
return J(n2);
|
|
262
262
|
};
|
|
263
263
|
function Cn(e2, t2) {
|
|
264
|
-
t2 =
|
|
264
|
+
t2 = te({ track: xn(e2.palette.background.paper, 0.05, e2?.palette.mode), thumb: xn(e2.palette.background.paper, 0.3, e2?.palette.mode), active: e2.palette.primary.main, corner: e2.palette.background.paper, outline: false }, t2 || {});
|
|
265
265
|
const c2 = { "&::-webkit-scrollbar, & *::-webkit-scrollbar": { backgroundColor: v(t2.track, 0.2), width: "13px", height: "13px" }, "&::-webkit-scrollbar-button": { display: "none" }, "& .scrollbar-button": { fill: t2.thumb, backgroundColor: "transparent", transition: "fill opacity 260ms ease", width: "13px", height: "13px" }, "& .scrollbar-button:hover:not([disabled])": { fill: t2.active }, "& .scrollbar-button:disabled": { opacity: 0.8 }, "&::-webkit-scrollbar-track, & *::-webkit-scrollbar-track": {}, "&::-webkit-scrollbar-track-piece, & *::-webkit-scrollbar-track-piece": {}, "&::-webkit-scrollbar-thumb, & *::-webkit-scrollbar-thumb": { borderRadius: 8, backgroundColor: t2.thumb, minHeight: "24px", minWidth: "24px", border: `2px solid ${t2.track}` }, "&::-webkit-scrollbar-thumb:focus, & *::-webkit-scrollbar-thumb:focus": { backgroundColor: t2.active, border: t2.outline ? t2.outline : void 0 }, "&::-webkit-scrollbar-thumb:active, & *::-webkit-scrollbar-thumb:active": { backgroundColor: t2.active, border: t2.outline ? t2.outline : void 0 }, "&::-webkit-scrollbar-thumb:hover, & *::-webkit-scrollbar-thumb:hover": { backgroundColor: t2.active, border: t2.outline ? t2.outline : void 0 }, "&::-webkit-scrollbar-corner, & *::-webkit-scrollbar-corner": { backgroundColor: t2.corner || t2.thumb } };
|
|
266
266
|
return O.getOS() === O.OSType.Firefox && (c2["* .pseudo-scrollbar"] = { scrollbarColor: `${t2.thumb} transparent` }, c2["* .pseudo-scrollbar:hover:not([disabled])"] = { scrollbarColor: `${t2.active} transparent` }), c2;
|
|
267
267
|
}
|
|
@@ -413,7 +413,7 @@ const wn = (e2 = null, t2, c2, l2) => {
|
|
|
413
413
|
return e(o2 === vn.Toolbar ? Yn : eo, { ...s2 });
|
|
414
414
|
})), Dn = { placement: "right-start" }, En = n(o((e2, n2) => {
|
|
415
415
|
const { children: o2, sx: i2, parentFloat: s2, createPopupPanel: d2, popperProps: h2 = Dn, label: p2, ...m2 } = e2;
|
|
416
|
-
|
|
416
|
+
ue(l.isValidElement(o2), "Must supply a child component to enable a context menu.");
|
|
417
417
|
const u2 = o2, v2 = r(() => ({ ...u2?.props, ...m2, onContextMenu: (e3) => {
|
|
418
418
|
u2?.props?.onContextMenu?.(e3), e3.isDefaultPrevented() || (m2?.onContextMenu?.(e3), e3.isDefaultPrevented() || (H2(e3), e3.preventDefault()));
|
|
419
419
|
} }), [m2, u2?.props]), f2 = F(d2, [d2]), [z2, H2] = l.useState(null), { reference: V2, component: y2 } = An({ label: p2 ?? "contextMenu", popperProps: h2, parentFloat: s2, anchor: { getBoundingClientRect: () => new DOMRect(z2?.clientX || 0, z2?.clientY || 0) }, onClose: () => H2(null), createPopupPanel: f2 });
|
|
@@ -479,7 +479,7 @@ function qn() {
|
|
|
479
479
|
function _n() {
|
|
480
480
|
return "undefined" == typeof window ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
481
481
|
}
|
|
482
|
-
const jn = e(
|
|
482
|
+
const jn = e(Me, {}), Qn = $e(e(ge, {})), Un = n(o((c2, l2) => {
|
|
483
483
|
const { dense: n2 = true, outlined: o2 = false, disableHover: a2 = false, parentFloat: i2, selected: d2, icon: h2, tooltipProps: p2, children: m2, primary: f2, sx: z2, className: H2, onFocus: x2, onBlur: M2, ...g2 } = c2, [C2, b2] = s(false), L2 = { marginRight: "0px", padding: n2 ? "2px" : "7px", borderRadius: (e2) => `${e2.shape.borderRadius}px`, color: (e2) => f2 ? void 0 : e2.palette.text.icon ?? e2.palette.action.active, border: (e2) => `solid ${o2 ? e2.palette.divider : "transparent"} 1px`, "& .MuiTouchRipple-child": { borderRadius: (e2) => `${e2.shape.borderRadius}px !important` }, "&.Mui-selected": { backgroundColor: (e2) => v(e2.palette.text.primary, e2.palette.action.selectedOpacity), border: (e2) => `solid ${o2 ? e2.palette.text?.primary : e2.palette.divider} 1px` }, "&.Mui-disabled": { border: (e2) => `solid ${o2 ? e2.palette.divider : "transparent"} 1px` }, "&.Mui-disabled path.styled": { filter: "grayscale(65%)", opacity: ".8" }, "&.Mui-focusVisible": { outline: "solid transparent 1px", border: "1px solid transparent" }, ...z2 }, Z2 = { "&:hover:not(.Mui-disabled, [disabled])": { color: (e2) => e2.palette.text.primary, border: (e2) => `solid ${o2 ? e2.palette.text?.primary : e2.palette.divider} 1px`, "&.Mui-selected": { backgroundColor: (e2) => v(e2.palette.text.primary, e2.palette.action.selectedOpacity + e2.palette.action.hoverOpacity) }, "> .outline-hover": { outline: (e2) => `solid ${o2 ? 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 } };
|
|
484
484
|
let N2 = L2;
|
|
485
485
|
a2 || (N2 = O.mergeContentful(L2, Z2));
|
|
@@ -580,7 +580,7 @@ const Jn = {}, eo = n(o((l2, n2) => {
|
|
|
580
580
|
A2(true), f2?.();
|
|
581
581
|
} }), _2 = F((e2) => {
|
|
582
582
|
0 === e2.button && (d2?.(e2), q2.reference.close(0));
|
|
583
|
-
}, [d2]), j2 = e(
|
|
583
|
+
}, [d2]), j2 = e(oe, { sx: { transform: () => {
|
|
584
584
|
let e2;
|
|
585
585
|
return e2;
|
|
586
586
|
} } }), Q2 = { "&.Mui-selected": { color: (e2) => e2.palette.text.primary, "& svg * ": { color: (e2) => e2.palette.text.primary } } }, U2 = h((t2) => {
|
|
@@ -631,10 +631,10 @@ const Jn = {}, eo = n(o((l2, n2) => {
|
|
|
631
631
|
if (n2) return v(e2.palette.text.icon ?? e2.palette.action.active, e2.palette.action.selectedOpacity);
|
|
632
632
|
} };
|
|
633
633
|
let s2 = l2;
|
|
634
|
-
return null === s2 && (s2 = e(
|
|
634
|
+
return null === s2 && (s2 = e(Me, {})), s2 || (s2 = e(ge, {})), s2 = $e(s2), e(V, { ref: c2, sx: { ...i2, ...a2 }, ...r2, children: s2 });
|
|
635
635
|
}));
|
|
636
636
|
function lo(e2) {
|
|
637
|
-
const [t2, c2] = s(() => /* @__PURE__ */ new Map()), { showModal: n2, updateModal: o2, destroyModal: a2, hideModal: r2 } =
|
|
637
|
+
const [t2, c2] = s(() => /* @__PURE__ */ new Map()), { showModal: n2, updateModal: o2, destroyModal: a2, hideModal: r2 } = ve({ disableAutoDestroy: true });
|
|
638
638
|
return (i2, s2, d2, h2) => new Promise((p2, m2) => {
|
|
639
639
|
const u2 = { ...e2, ...d2, onHide: () => {
|
|
640
640
|
const e3 = t2.get(i2);
|
|
@@ -660,15 +660,15 @@ const no = { x: 0, y: 0 }, oo = n(o((t2, c2) => {
|
|
|
660
660
|
!H2 && l2 && V2(l2 ?? no);
|
|
661
661
|
}, [l2]), a(() => {
|
|
662
662
|
z2 && H2 && x2({ x: Math.max(0, Math.min(H2.x, z2.right)), y: Math.max(0, Math.min(H2.y, z2.bottom)) });
|
|
663
|
-
}, [H2, z2]), e(
|
|
663
|
+
}, [H2, z2]), e(He, { nodeRef: f2, handle: h2, cancel: '[class*="MuiDialogContent-root"]', position: y2, bounds: z2 ?? ".MuiModal-root", onStop: o2, onStart: (e2, t3) => {
|
|
664
664
|
const c3 = e2;
|
|
665
665
|
C2({ x: (c3.clientX ?? c3.touches?.[0]?.clientX) - t3.x, y: (c3.clientY ?? c3.touches?.[0]?.clientY) - t3.y });
|
|
666
666
|
}, onDrag: (e2, t3) => {
|
|
667
667
|
const c3 = e2, l3 = c3.clientX ?? c3.touches?.[0]?.clientX, n3 = c3.clientY ?? c3.touches?.[0]?.clientY;
|
|
668
668
|
V2({ x: l3 - M2.x, y: n3 - M2.y });
|
|
669
|
-
}, children: e(n2, { ref:
|
|
669
|
+
}, children: e(n2, { ref: he([f2, c2]), ...v2 }) });
|
|
670
670
|
})), ao = { x: "50", y: "50" }, ro = n(o((c2, l2) => {
|
|
671
|
-
const n2 = ee({ props: c2, name: "MuiDialog" }), o2 = Y(), r2 = { enter: 0.66 * o2.transitions.duration.enteringScreen, exit: 0.66 * o2.transitions.duration.leavingScreen }, { title: d2 = "SheetXL", key: h2 = "draggable-window", onCancel: p2, onDone: m2, onShow: f2, onShown: z2, onHide: H2, open: x2, autoFocusSel: M2, children: C2, TransitionComponent: b2 = w, TransitionProps: L2, transitionDuration: Z2 = r2, BackdropComponent: N2 = S, BackdropProps: k2, PaperComponent: A2 = g, PaperProps: R2, onBackdropClick: D2, sx: E2, className: $2, onMouseDown: O2, initialPosition: T2 = ao, isModal: I2 = false, ...B2 } = n2, _2 = i(null), [j2, U2] = s(null), [K2, G2] = s(false), [X2, J2] = s(false), te2 = i(null), [ce2, le2] =
|
|
671
|
+
const n2 = ee({ props: c2, name: "MuiDialog" }), o2 = Y(), r2 = { enter: 0.66 * o2.transitions.duration.enteringScreen, exit: 0.66 * o2.transitions.duration.leavingScreen }, { title: d2 = "SheetXL", key: h2 = "draggable-window", onCancel: p2, onDone: m2, onShow: f2, onShown: z2, onHide: H2, open: x2, autoFocusSel: M2, children: C2, TransitionComponent: b2 = w, TransitionProps: L2, transitionDuration: Z2 = r2, BackdropComponent: N2 = S, BackdropProps: k2, PaperComponent: A2 = g, PaperProps: R2, onBackdropClick: D2, sx: E2, className: $2, onMouseDown: O2, initialPosition: T2 = ao, isModal: I2 = false, ...B2 } = n2, _2 = i(null), [j2, U2] = s(null), [K2, G2] = s(false), [X2, J2] = s(false), te2 = i(null), [ce2, le2] = me(), ne2 = i(null), [oe2, ae2] = me(), re2 = i(null);
|
|
672
672
|
a(() => {
|
|
673
673
|
j2 && G2(x2);
|
|
674
674
|
}, [x2, j2]);
|
|
@@ -681,19 +681,19 @@ const no = { x: 0, y: 0 }, oo = n(o((t2, c2) => {
|
|
|
681
681
|
let l3 = 0.5 * c3, n3 = 0.5 * t2;
|
|
682
682
|
"number" == typeof T2?.x ? l3 = T2.x : "string" == typeof T2?.x && (l3 = c3 * (parseFloat(T2.x) / 100)), "number" == typeof T2?.y ? n3 = T2.y : "string" == typeof T2?.y && (n3 = t2 * (parseFloat(T2.y) / 100)), U2({ x: l3, y: n3 });
|
|
683
683
|
}, [le2, ae2]);
|
|
684
|
-
const [
|
|
685
|
-
if (
|
|
684
|
+
const [se2, pe2] = s(false), [ue2, ve2] = s(null), [He2, Ve2] = s(null), ye2 = F((e2) => {
|
|
685
|
+
if (ue2) return ue2.focus(e2), true;
|
|
686
686
|
if (M2) {
|
|
687
687
|
const t2 = ne2.current?.querySelectorAll?.(M2);
|
|
688
688
|
if (t2 && t2.length > 0) return t2[0]?.focus?.(e2), true;
|
|
689
689
|
}
|
|
690
690
|
return ne2.current?.focus?.(e2), false;
|
|
691
|
-
}, [
|
|
691
|
+
}, [ue2, M2]), xe2 = Q(l2, () => ({ focus: (e2) => {
|
|
692
692
|
ye2(e2);
|
|
693
693
|
} }), []), Me2 = { ...L2, onExited: (e2) => {
|
|
694
694
|
m2?.(null), L2?.onExited?.(e2);
|
|
695
695
|
}, onExit: (e2) => {
|
|
696
|
-
const t2 =
|
|
696
|
+
const t2 = He2;
|
|
697
697
|
t2 && requestAnimationFrame(() => {
|
|
698
698
|
xe2.current?.contains(document.activeElement) && t2.focus();
|
|
699
699
|
}), H2?.(), J2(false), L2?.onExit?.(e2);
|
|
@@ -705,30 +705,30 @@ const no = { x: 0, y: 0 }, oo = n(o((t2, c2) => {
|
|
|
705
705
|
a(() => {
|
|
706
706
|
X2 && ye2();
|
|
707
707
|
}, [X2]);
|
|
708
|
-
let ge2 = e(
|
|
708
|
+
let ge2 = e(ze, { focusTrapOptions: { escapeDeactivates: false, allowOutsideClick: true, initialFocus: false }, ref: _2, active: X2, children: e(b2, { in: K2, timeout: Z2, role: "presentation", ...Me2, children: e(V, { className: "MuiDialog-container", ref: ne2, tabIndex: 0, sx: { outline: "none", position: "relative" }, onKeyDown: (e2) => {
|
|
709
709
|
e2.which === q.Escape && (ie2(), te2.current?.start(e2, { center: false }), setTimeout(() => te2.current?.stop(e2), 180)), e2.stopPropagation();
|
|
710
|
-
}, children: t(oo, { ref:
|
|
710
|
+
}, children: t(oo, { ref: he([re2, l2]), className: u({ "Mui-focusVisible": se2 }, $2, "draggable"), sx: { "& *": (e2) => Cn(e2), pointerEvents: "auto", userSelect: "none", "&:hover:not([disabled]):not(.Mui-focusVisible)": { outline: (e2) => `solid ${v(e2.palette.text?.primary, 0.2)} 1px` }, "&.Mui-focusVisible": { outline: (e2) => `solid ${v(e2.palette.text?.primary, 0.2)} 1px` }, position: "absolute", maxWidth: "100%", ...E2 }, defaultPosition: j2, titleSize: ae2, rootSize: le2, PaperComponent: A2, ...B2, ...R2, children: [d2 ? e(P, { className: u({ "Mui-selected": se2 }, "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) => v(e2.palette.action.hover, 0.03) }, ref: oe2, 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(Bn, { label: "Close", children: e(y, { "aria-label": "close", sx: { color: (e2) => e2.palette.text.icon ?? e2.palette.action.active }, touchRippleRef: te2, onPointerDown: (e2) => {
|
|
711
711
|
te2.current?.start(e2, { center: false }), e2.stopPropagation(), e2.preventDefault();
|
|
712
|
-
}, onPointerUp: ie2, children: e(
|
|
712
|
+
}, onPointerUp: ie2, children: e(de, {}) }) })] }) }) : null, C2] }) }) }) }), Ce2 = null;
|
|
713
713
|
I2 && (Ce2 = e(N2, { ...k2, open: K2, onMouseDown: (e2) => {
|
|
714
714
|
ie2(), k2?.onMouseDown?.(e2);
|
|
715
715
|
}, onClick: (e2) => {
|
|
716
716
|
D2?.(e2), k2?.onClick?.(e2);
|
|
717
717
|
}, sx: { pointerEvents: "auto", ...k2?.sx } }));
|
|
718
718
|
const { getPortalContainer: be2 } = W();
|
|
719
|
-
return
|
|
720
|
-
|
|
719
|
+
return fe(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: he([xe2, ce2]), onPointerDown: (e2) => {
|
|
720
|
+
se2 && (e2.target === ne2.current || e2.target.tabIndex < 0) && ne2.current?.contains(document.activeElement);
|
|
721
721
|
}, onContextMenu: (e2) => {
|
|
722
722
|
e2.isPropagationStopped() || e2.preventDefault();
|
|
723
723
|
}, onFocus: (e2) => {
|
|
724
|
-
!
|
|
724
|
+
!se2 && (e2.target === ne2.current || e2.target.tabIndex < 0) && setTimeout(() => {
|
|
725
725
|
ye2();
|
|
726
|
-
}, 100), _2.current?.focusTrap?.unpause(),
|
|
726
|
+
}, 100), _2.current?.focusTrap?.unpause(), pe2(true), ne2.current?.contains(e2.target) && e2.target !== ne2.current && ve2(e2.target), e2.relatedTarget && !He2 && Ve2(e2.relatedTarget);
|
|
727
727
|
}, onBlur: (e2) => {
|
|
728
|
-
xe2?.current?.contains(e2.relatedTarget) || (Ve2(null), _2.current?.focusTrap?.pause(),
|
|
728
|
+
xe2?.current?.contains(e2.relatedTarget) || (Ve2(null), _2.current?.focusTrap?.pause(), pe2(false));
|
|
729
729
|
}, children: [Ce2, ge2] }), be2(), h2 + "");
|
|
730
730
|
})), io = ["Ok", "Cancel"], so = n(o((c2, l2) => {
|
|
731
|
-
const { description: n2, icon: o2, onCancel: a2, onOption: s2, onDone: d2, onValidateOption: h2, createOptionsButton: p2, options: m2 = io, autoFocusSel: u2 = ".defaultOption", defaultOption: f2 = m2[0], cancelOption: z2 = "Cancel", children: H2, ...y2 } = c2, x2 =
|
|
731
|
+
const { description: n2, icon: o2, onCancel: a2, onOption: s2, onDone: d2, onValidateOption: h2, createOptionsButton: p2, options: m2 = io, autoFocusSel: u2 = ".defaultOption", defaultOption: f2 = m2[0], cancelOption: z2 = "Cancel", children: H2, ...y2 } = c2, x2 = ye({ shouldUseNativeValidation: false }), { handleSubmit: g2, formState: C2 } = x2, b2 = i(null), L2 = i(null), Z2 = i(null), N2 = F(async (e2) => {
|
|
732
732
|
let t2;
|
|
733
733
|
try {
|
|
734
734
|
if (t2 = await Promise.resolve(h2?.(e2)) ?? true, true !== t2) return;
|
|
@@ -762,7 +762,7 @@ const no = { x: 0, y: 0 }, oo = n(o((t2, c2) => {
|
|
|
762
762
|
}
|
|
763
763
|
return e2;
|
|
764
764
|
}, [m2, f2, C2]);
|
|
765
|
-
return e(ro, { onCancel: w2, initialPosition: { y: "touch" ===
|
|
765
|
+
return e(ro, { onCancel: w2, initialPosition: { y: "touch" === Ve ? "15" : "35" }, onDone: d2, autoFocusSel: u2, isModal: true, ref: l2, PaperProps: {}, ...y2, children: e(xe, { ...x2, children: t("form", { ref: Z2, onSubmit: g2(k2), children: [e(R, { dividers: true, onKeyDown: (e2) => {
|
|
766
766
|
if (e2.isDefaultPrevented()) return;
|
|
767
767
|
e2.stopPropagation();
|
|
768
768
|
let t2 = null, c3 = null;
|
|
@@ -777,7 +777,7 @@ const no = { x: 0, y: 0 }, oo = n(o((t2, c2) => {
|
|
|
777
777
|
}, 180));
|
|
778
778
|
}, children: t(V, { sx: { display: "flex", flexDirection: "column", whiteSpace: "pre-wrap", rowGap: (e2) => e2.spacing(o2 || n2 ? 1.5 : 0) }, children: [t(V, { sx: { display: "flex", flexDirection: "column" }, children: [o2, e(M, { children: n2 })] }), H2] }) }), e(D, { sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(1), paddingLeft: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1), backgroundColor: (e2) => v(e2.palette.action.hover, 0.03) }, children: E2 })] }) }) });
|
|
779
779
|
})), ho = Object.freeze(Object.defineProperty({ __proto__: null, OptionsDialog: so, default: so }, Symbol.toStringTag, { value: "Module" })), po = l.lazy(() => Promise.resolve().then(() => ho)), mo = (e2) => {
|
|
780
|
-
const { showModal: t2 } =
|
|
780
|
+
const { showModal: t2 } = ve();
|
|
781
781
|
return (c2) => new Promise((l2) => {
|
|
782
782
|
const n2 = t2(po, { ...e2, ...c2, onOption(e3) {
|
|
783
783
|
c2?.onOption?.(e3, e3 === c2.cancelOption, e3 === c2.defaultOption), l2(e3);
|
|
@@ -785,8 +785,8 @@ const no = { x: 0, y: 0 }, oo = n(o((t2, c2) => {
|
|
|
785
785
|
c2?.onDone?.(), n2.hide();
|
|
786
786
|
} });
|
|
787
787
|
});
|
|
788
|
-
}, uo = l.lazy(() => import("./
|
|
789
|
-
const { showModal: t2 } =
|
|
788
|
+
}, uo = l.lazy(() => import("./CBkOcYriJ00VJ4Wf.mjs")), vo = (e2) => {
|
|
789
|
+
const { showModal: t2 } = ve();
|
|
790
790
|
return (c2) => {
|
|
791
791
|
const { defaultOption: l2 = c2.options?.[0], cancelOption: n2 = "Cancel", ...o2 } = c2;
|
|
792
792
|
return new Promise((c3) => {
|
|
@@ -885,7 +885,7 @@ const no = { x: 0, y: 0 }, oo = n(o((t2, c2) => {
|
|
|
885
885
|
}));
|
|
886
886
|
Vo.displayName = "CommandPopupButton";
|
|
887
887
|
const yo = (c2) => {
|
|
888
|
-
const { command: l2, label: n2, scope: o2, icon: a2 = e(
|
|
888
|
+
const { command: l2, label: n2, scope: o2, icon: a2 = e(ge, {}), sx: r2, ...i2 } = c2;
|
|
889
889
|
return t(V, { sx: { display: "flex", flexDirection: "row", textTransform: "none", alignItems: "center", fontSize: (e2) => e2.typography.subtitle2.fontSize, ...r2 }, ...i2, children: [a2 ? $e(a2) : null, e(M, { component: "div", sx: { whiteSpace: "nowrap", lineHeight: "1", paddingLeft: (e2) => e2.spacing(0.25), paddingRight: (e2) => e2.spacing(0.25), fontSize: "inherit" }, children: l2?.label(o2) || n2 })] });
|
|
890
890
|
}, xo = n(o((t2, c2) => {
|
|
891
891
|
const { sx: l2, commands: n2, commandButtonProps: o2, parentFloat: a2, createToolbarPalette: i2, children: d2, ...p2 } = t2, u2 = Q(c2, () => ({}), []), [v2, f2] = s(null), { reference: z2 } = An({ label: "toolbar", anchor: u2.current, parentFloat: a2, createPopupPanel: null }), H2 = h(() => {
|
|
@@ -949,7 +949,7 @@ export {
|
|
|
949
949
|
Yl as AnimatedOrbitIcon,
|
|
950
950
|
Jl as AnimatedTraversingEllipsisIcon,
|
|
951
951
|
jn as BLANK_ICON,
|
|
952
|
-
|
|
952
|
+
Me as BlankIcon,
|
|
953
953
|
ic as BorderAllIcon,
|
|
954
954
|
fc as BorderBottomIcon,
|
|
955
955
|
dc as BorderHorizontalIcon,
|
|
@@ -965,7 +965,7 @@ export {
|
|
|
965
965
|
Uc as CellSelectionIcon,
|
|
966
966
|
Kc as CellSelectionInsertIcon,
|
|
967
967
|
Xc as CellSelectionRemoveIcon,
|
|
968
|
-
|
|
968
|
+
ge as CheckIcon,
|
|
969
969
|
Qc as CheckSuccessIcon,
|
|
970
970
|
sn as ChipStrip,
|
|
971
971
|
Pe as ClearAllIcon,
|
|
@@ -1090,6 +1090,7 @@ export {
|
|
|
1090
1090
|
ut as PasteTransposeIcon,
|
|
1091
1091
|
ht as PasteValuesIcon,
|
|
1092
1092
|
tt as PercentIcon,
|
|
1093
|
+
Ce as PopupArrowIcon,
|
|
1093
1094
|
mn as PopupAutoFocus,
|
|
1094
1095
|
vn as PopupButtonType,
|
|
1095
1096
|
Hc as PresetStylesIcon,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/utils-mui",
|
|
3
3
|
"description": "Utilities MUI - Utilities for MUI Components needed for all SheetXL components.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@popperjs/core": "^2.11.8",
|
|
35
|
-
"@sheetxl/utils": "^0.
|
|
36
|
-
"@sheetxl/utils-react": "^0.
|
|
35
|
+
"@sheetxl/utils": "^0.6.0",
|
|
36
|
+
"@sheetxl/utils-react": "^0.6.0",
|
|
37
37
|
"clsx": "^2.1.1",
|
|
38
38
|
"detect-it": "^4.0.1",
|
|
39
39
|
"focus-trap-react": "^10.1.4",
|
package/types/index.d.ts
CHANGED
|
@@ -1026,6 +1026,8 @@ export declare const PasteValuesIcon: (props: SvgIconProps) => JSX.Element;
|
|
|
1026
1026
|
|
|
1027
1027
|
export declare const PercentIcon: (props: SvgIconProps) => JSX.Element;
|
|
1028
1028
|
|
|
1029
|
+
export declare const PopupArrowIcon: (props: SvgIconProps) => JSX.Element;
|
|
1030
|
+
|
|
1029
1031
|
export declare const PopupAutoFocus: {
|
|
1030
1032
|
readonly Popup: "popup";
|
|
1031
1033
|
readonly Anchor: "anchor";
|