@sheetxl/studio-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/{DHwhTAQeNs4slttB.cjs → -KPuArqkAUBcjszr.cjs} +2 -2
- package/browser/cjs/{BWS4gFWp8lDPvR9C.cjs → BbXjdXO4UvGoCoVO.cjs} +1 -1
- package/browser/cjs/{rIy1Cx7HX-8zaQjY.cjs → BvOCb9eVNFZ-NjGT.cjs} +7 -7
- package/browser/cjs/{DbqHWelIXc-F2a9N.cjs → CBri_H_1bhlzGGJk.cjs} +1 -1
- package/browser/cjs/{7uRpnSJkNHg_E-KO.cjs → CEmnnw_iJc5uFhVr.cjs} +2 -2
- package/browser/cjs/{muTJOFrCXh156rjc.cjs → CaQE4lwF4Evn4XMp.cjs} +1 -1
- package/browser/cjs/{DX5ji_lT0Qlqznv7.cjs → CxrN1Rt-6yBADf20.cjs} +2 -2
- package/browser/cjs/{B4j_sdzJNzq1ZPbT.cjs → DT-xtu94jMxS1vzu.cjs} +1 -1
- package/browser/cjs/{CmSwD6NZAHhOcRi3.cjs → Q8W6Dep3TQu2J04B.cjs} +2 -2
- package/browser/cjs/QcsWOGxqO32TqdLc.cjs +20 -0
- package/browser/cjs/{DMOT_ixtKqRvPULq.cjs → _S5ijD6GMfUSZB2K.cjs} +1 -1
- package/browser/cjs/{saPH3d5fE-ugXp6m.cjs → hPGtVDnl2suhwpVF.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{BNmwaUWz2DJqWumP.mjs → 3qPgfs3EO220Us63.mjs} +2 -2
- package/browser/esm/{mqkuG-TcLS4nn4x0.mjs → 4QCCkY6WsoWZ03AW.mjs} +1230 -1228
- package/browser/esm/{DltuoFr9A-WJccbV.mjs → B8qPofRYyfXfaKdW.mjs} +1 -1
- package/browser/esm/{DUzVAMWTrS0u37LX.mjs → BCOknGbXQQKb8loh.mjs} +2 -2
- package/browser/esm/{0D8VtNalLeBTB51a.mjs → BlgKHagFH8J1V-X2.mjs} +1 -1
- package/browser/esm/{Btt4G85L5v01eySb.mjs → CKAjkBZYYig7J6bF.mjs} +2 -2
- package/browser/esm/{D5XNYGaC4Yw6vCRL.mjs → CYc3jUbKo7wM_Shj.mjs} +1 -1
- package/browser/esm/{CROTe62QHFVo8YMt.mjs → CxK4jk--rPP3-hhy.mjs} +2 -2
- package/browser/esm/{C7jHdVMf6Yr4eH_B.mjs → DMU5asHDVFdTZY6o.mjs} +1 -1
- package/browser/esm/{BMo7K5LaD7zuDVg9.mjs → DqXoz19beaellDDT.mjs} +7 -7
- package/browser/esm/{DtifaYF85GrfJ9_1.mjs → I_gM73yCmAsQ5fRv.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{aUkJls9HzxnrZSof.mjs → sdHBYqxl6tAGBXCO.mjs} +1 -1
- package/licenses/dependencies.txt +180 -180
- package/node/esm/{DCngEQG4um0yTeoj.mjs → 39P6173XmBosyXdQ.mjs} +28 -28
- package/node/esm/{CJU8jJhxtR3PEj2I.mjs → B2jYZ9hfqq6qUbet.mjs} +1 -1
- package/node/esm/{oYh6joioOWhFd_R3.mjs → B7Upiv_jfpg2G_X_.mjs} +1 -1
- package/node/esm/{CdUceTAldsMTIFnD.mjs → C3JmGbGYINw56SFo.mjs} +1 -1
- package/node/esm/{CS0OWM24rZpAGRKU.mjs → CKa96Jo-aE8KEh5a.mjs} +1 -1
- package/node/esm/{D6B7z_d11sd-U1fU.mjs → CczQC7tADbxLCqFL.mjs} +1 -1
- package/node/esm/{BYjJIMFsheqJcsEI.mjs → DXklMDQbTTXb0iO1.mjs} +1 -1
- package/node/esm/{DQnCFz2zJgMwLou_.mjs → DXxuK_DCGf3GQ6CU.mjs} +1 -1
- package/node/esm/{CACqTiBtxYlo1mu7.mjs → TkzWHIUMIV_BEELi.mjs} +1 -1
- package/node/esm/{Do7ts-uMkQANfvhq.mjs → dthfMvlWTTq_zZ1Q.mjs} +1 -1
- package/node/esm/index.mjs +680 -680
- package/package.json +8 -8
- package/types/index.d.ts +9 -10
- package/browser/cjs/B-O26BvbKDImp7pm.cjs +0 -20
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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,29 +7,29 @@
|
|
|
7
7
|
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
8
8
|
import { Box as i, TextField as n, InputAdornment as o, IconButton as r, FormControlLabel as l, Checkbox as a, Typography as d, TableCell as s, DialogContent as c } from "@mui/material";
|
|
9
9
|
import { KeyCodes as h, DynamicIcon as p } from "@sheetxl/utils-react";
|
|
10
|
-
import { toShortcutElements as
|
|
11
|
-
import
|
|
10
|
+
import { toShortcutElements as g, InternalWindow as m } from "@sheetxl/utils-mui";
|
|
11
|
+
import u, { useState as f, useMemo as x, useEffect as y } from "react";
|
|
12
12
|
import b from "clsx";
|
|
13
13
|
import { alpha as w, getOverlayAlpha as R, styled as C } from "@mui/material/styles";
|
|
14
14
|
import { AutoSizer as v, Table as k, Column as $ } from "react-virtualized";
|
|
15
15
|
import { CommonUtils as D } from "@sheetxl/utils";
|
|
16
|
-
const
|
|
17
|
-
class
|
|
16
|
+
const I = "ReactVirtualizedDemo-flexContainer", K = "ReactVirtualizedDemo-tableRow", S = "ReactVirtualizedDemo-tableRowHover", z = "ReactVirtualizedDemo-tableCell", L = "ReactVirtualizedDemo-noClick";
|
|
17
|
+
class H extends u.PureComponent {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments), this.getRowClassName = ({ index: e2 }) => {
|
|
20
20
|
const { onRowClick: t2 } = this.props;
|
|
21
|
-
return b(
|
|
21
|
+
return b(K, I, { [S]: -1 !== e2 && null != t2 });
|
|
22
22
|
}, this.cellRenderer = ({ cellData: i2, rowData: n2, dataKey: o2, columnIndex: r2, width: l2 }) => {
|
|
23
23
|
const { columns: a2, rowHeight: d2, onRowClick: c2 } = this.props;
|
|
24
|
-
let h2 = i2,
|
|
25
|
-
if ("shortcut" === o2 ? h2 =
|
|
24
|
+
let h2 = i2, m2 = { height: d2, paddingRight: "2px", paddingTop: "0px", paddingBottom: "0px", minWidth: `${l2}px`, maxWidth: `${l2}px` };
|
|
25
|
+
if ("shortcut" === o2 ? h2 = g(i2) : "description" === o2 && (m2 = { ...m2, fontSize: ".75rem", display: "block", paddingTop: "4px", paddingRight: "8px", whiteSpace: "pre-line" }), "label" === o2) {
|
|
26
26
|
let o3 = n2.icon;
|
|
27
27
|
o3 && "string" != typeof o3 || (o3 = t(p, { iconKey: o3 })), h2 = e("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [o3, i2] });
|
|
28
28
|
}
|
|
29
|
-
return t(s, { component: "div", className: b(
|
|
29
|
+
return t(s, { component: "div", className: b(z, I, { [L]: null == c2 }), variant: "body", style: m2, align: null != r2 && a2[r2].numeric ? "right" : "left", children: h2 });
|
|
30
30
|
}, this.headerRenderer = ({ label: e2, columnIndex: i2, dataKey: n2, width: o2 }) => {
|
|
31
31
|
const { headerHeight: r2, columns: l2 } = this.props, a2 = l2[i2];
|
|
32
|
-
return t(s, { component: "div", className: b(
|
|
32
|
+
return t(s, { component: "div", className: b(z, I, L), variant: "head", sx: { width: o2, height: r2, paddingLeft: "label" === n2 ? "calc(16px + 8px + var(--icon-size, 1rem))" : void 0, backgroundColor: (e3) => e3.palette.grey[300] }, align: a2.numeric ? "right" : "left", children: t("div", { children: a2.label }) });
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
static {
|
|
@@ -39,53 +39,53 @@ class N extends g.PureComponent {
|
|
|
39
39
|
const { columns: e2, rowHeight: i2, headerHeight: n2, ...o2 } = this.props;
|
|
40
40
|
return t(v, { children: ({ height: r2, width: l2 }) => t(k, { height: r2, width: l2, rowHeight: i2, gridStyle: { direction: "inherit" }, headerHeight: n2, ...o2, rowClassName: this.getRowClassName, children: e2.map(({ dataKey: e3, width: i3, widthLess: n3, ...o3 }, r3) => {
|
|
41
41
|
const a2 = n3 ? l2 - n3 : i3;
|
|
42
|
-
return t($, { style: { flex: `1 1 ${a2}px` }, headerRenderer: (e4) => this.headerRenderer({ ...e4, width: a2, columnIndex: r3 }), className:
|
|
42
|
+
return t($, { style: { flex: `1 1 ${a2}px` }, headerRenderer: (e4) => this.headerRenderer({ ...e4, width: a2, columnIndex: r3 }), className: I, cellDataGetter: ({ rowData: e4, columnData: t2, dataKey: i4 }) => e4[i4], cellRenderer: (e4) => this.cellRenderer({ ...e4, width: a2, columnIndex: r3 }), dataKey: e3, width: a2, ...o3 }, e3);
|
|
43
43
|
}) }) });
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
function
|
|
48
|
-
const { commands: c2, ...
|
|
46
|
+
const N = C(H)(({ theme: e2 }) => ({ "& .ReactVirtualized__Table__headerRow": { ..."rtl" === e2.direction && { paddingLeft: "0 !important" }, ..."rtl" !== e2.direction && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${I}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${K}`]: { cursor: "pointer" }, [`& .${S}`]: { "&:hover:not([disabled])": { backgroundColor: e2.palette.grey[200] } }, [`& .${z}`]: { flex: 1 }, [`& .${L}`]: { cursor: "initial" } }));
|
|
47
|
+
function T(s2) {
|
|
48
|
+
const { commands: c2, ...g2 } = s2, [m2, u2] = f(false), [b2, C2] = f(""), v2 = x(() => {
|
|
49
49
|
let e2 = c2.getAllCommands();
|
|
50
|
-
|
|
50
|
+
m2 || (e2 = e2.filter((e3) => e3.command.getShortcut())), e2.sort((e3, t3) => e3.command.getLabel().localeCompare(t3.command.getLabel()));
|
|
51
51
|
const t2 = [], i2 = (e3) => e3.replace(/\n\n/g, "\n"), n2 = e2.length;
|
|
52
52
|
for (let o2 = 0; o2 < n2; o2++) {
|
|
53
|
-
const n3 = e2[o2].command, r2 = n3.
|
|
53
|
+
const n3 = e2[o2].command, r2 = n3.getShortcut();
|
|
54
54
|
if (Array.isArray(r2)) {
|
|
55
55
|
const e3 = r2, o3 = e3.length;
|
|
56
|
-
for (let r3 = 0; r3 < o3; r3++) t2.push({ label: n3.
|
|
57
|
-
} else t2.push({ label: n3.
|
|
56
|
+
for (let r3 = 0; r3 < o3; r3++) t2.push({ label: n3.getLabel(), icon: n3.getIcon(), description: i2(n3.getDescription()), shortcut: e3[r3] });
|
|
57
|
+
} else t2.push({ label: n3.getLabel(), icon: n3.getIcon(), description: i2(n3.getDescription()), shortcut: n3.getShortcut() });
|
|
58
58
|
}
|
|
59
59
|
return t2;
|
|
60
|
-
}, [
|
|
60
|
+
}, [m2, c2]), [k2, $2] = f(null);
|
|
61
61
|
y(() => {
|
|
62
62
|
import("fuse.js").then((e2) => {
|
|
63
63
|
$2(new e2.default(v2, { threshold: 0, ignoreLocation: true, keys: ["label", "description"] }));
|
|
64
64
|
});
|
|
65
65
|
}, [v2]);
|
|
66
|
-
const [
|
|
66
|
+
const [I2, K2] = f(v2), S2 = b2.length > 0 && 0 === I2.length;
|
|
67
67
|
y(() => {
|
|
68
68
|
k2 && D.debounce(() => {
|
|
69
|
-
if (0 === b2.trim().length) return void
|
|
69
|
+
if (0 === b2.trim().length) return void K2(v2);
|
|
70
70
|
const e2 = k2.search(b2.trim()), t2 = new Array(e2.length);
|
|
71
71
|
for (let i2 = 0; i2 < e2.length; i2++) t2[i2] = e2[i2].item;
|
|
72
|
-
|
|
72
|
+
K2(t2);
|
|
73
73
|
}, 90)();
|
|
74
74
|
}, [k2, b2]);
|
|
75
|
-
return e(i, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...
|
|
75
|
+
return e(i, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...g2, children: [e(i, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (e2) => e2.spacing(2), color: (e2) => e2.palette.text.secondary }, children: [t(n, { slotProps: { input: { sx: { backgroundImage: `linear-gradient(${w("#fff", R(5))}, ${w("#fff", R(5))})` }, endAdornment: t(o, { sx: { opacity: b2.length > 0 ? 1 : 0, display: b2.length > 0 ? "flex" : "none" }, position: "end", children: t(r, { "aria-label": "clear search", onClick: () => C2(""), edge: "end", children: t(p, { iconKey: "Close" }) }) }) }, htmlInput: { className: "input", autoFocus: true, spellCheck: false, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(1) } } }, sx: { flex: "1 1 40%", marginRight: (e2) => e2.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e2) => S2 ? `${e2.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e2) => S2 ? `${e2.palette.error.main} !important` : void 0 } }, value: b2, onChange: (e2) => {
|
|
76
76
|
C2(e2.target.value);
|
|
77
77
|
}, onKeyDown: (e2) => {
|
|
78
78
|
e2.which === h.Escape && b2.length > 0 && (C2(""), e2.stopPropagation(), e2.preventDefault());
|
|
79
79
|
}, onContextMenu: (e2) => {
|
|
80
80
|
e2.stopPropagation();
|
|
81
|
-
} }), t(l, { sx: { flex: "1 1 60%" }, control: t(a, { checked:
|
|
81
|
+
} }), t(l, { sx: { flex: "1 1 60%" }, control: t(a, { checked: m2, onChange: () => u2(!m2) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), t(i, { sx: { flex: "1 1 100%", borderRadius: (e2) => `${e2.shape.borderRadius}px`, border: (e2) => `solid ${e2.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (e2) => e2.palette.background.paper, backgroundImage: `linear-gradient(${w("#fff", R(5))}, ${w("#fff", R(5))})` } }, children: t(N, { rowCount: I2.length, rowGetter: (e2) => I2[e2.index], columns: [{ width: 214, label: "Command", dataKey: "label" }, { width: 226, label: "Key Binding", dataKey: "shortcut" }, { label: "Description", dataKey: "description", widthLess: 453 }] }) }), t(i, { sx: { display: "flex", flexShrink: "0", paddingLeft: (e2) => e2.spacing(1), paddingTop: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: t(d, { noWrap: true, component: "div", sx: { color: (e2) => S2 ? e2.palette.error.main : e2.palette.text.secondary }, children: `${0 === I2.length ? "No" : I2.length} shortcut key${1 === I2.length ? "" : "s"}${b2.length > 0 ? " found" : ""}` }) })] });
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const _ = (e2) => {
|
|
84
84
|
const { title: i2 = "Shortcut Keys", commands: n2, sx: o2, ...r2 } = e2;
|
|
85
|
-
return t(
|
|
85
|
+
return t(m, { isModal: true, onKeyDown: (e3) => {
|
|
86
86
|
e3.keyCode === h.F1 && e3.preventDefault();
|
|
87
|
-
}, sx: { width: "780px", ...o2 }, title: i2, autoFocusSel: ".input", ...r2, children: t(c, { dividers: true, children: t(
|
|
87
|
+
}, sx: { width: "780px", ...o2 }, title: i2, autoFocusSel: ".input", ...r2, children: t(c, { dividers: true, children: t(T, { commands: n2, sx: { marginBottom: "8px" } }) }) });
|
|
88
88
|
};
|
|
89
89
|
export {
|
|
90
|
-
|
|
90
|
+
_ as default
|
|
91
91
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - 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.
|