@sheetxl/studio-mui 0.7.4 → 0.7.6
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/README.md +9 -5
- package/browser/cjs/{DwzNkpi_T8XJi3Cd.cjs → -u6vWH9DiYlO1rsa.cjs} +1 -1
- package/browser/cjs/1-LY_VyMGQ9MfeNB.cjs +20 -0
- package/browser/cjs/{B6o1iQp5wuulPhxo.cjs → 7MV1n9Y0yXU0hKpM.cjs} +1 -1
- package/browser/cjs/{BY3gQcuJkcK9yhlk.cjs → B8-dSgXI2XZKFvtp.cjs} +2 -2
- package/browser/cjs/BEmcHbiMOFhIa91S.cjs +6 -0
- package/browser/cjs/{CflDY3SthBCQg-9F.cjs → BdNRaXTgqRzPmg0L.cjs} +2 -2
- package/browser/cjs/{D5l5wPl8rDYzrVey.cjs → Ce6JLd3qejgMgM3r.cjs} +7 -7
- package/browser/cjs/{qd_yuub025U26HmN.cjs → D7AH724IJJvos02e.cjs} +1 -1
- package/browser/cjs/{yETr27p_AmaFufvo.cjs → DefYX_aeMZivbpEt.cjs} +2 -2
- package/browser/cjs/{HfdfBnRHde6LrsMc.cjs → KOj1qev47_vzzRFV.cjs} +1 -1
- package/browser/cjs/{BY1UZBLCxYes25sM.cjs → St8H4B5iT2fsqOb7.cjs} +1 -1
- package/browser/cjs/TS1uQTjkemJ22p1Y.cjs +6 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/BNxVvFkY3b2mERJf.mjs +64 -0
- package/browser/esm/{BqypjhYAei9BoIkg.mjs → BnVbG5kg41edf8oz.mjs} +2 -2
- package/browser/esm/{DUTXM-jsPX1poBAb.mjs → CJsYe8TqU6tqj4UH.mjs} +55 -56
- package/browser/esm/{CwE4P36bJkqx4fG2.mjs → CKLhWrNo1E4r3pG7.mjs} +1 -1
- package/browser/esm/{DpeZ0TCk2XtCsW7D.mjs → DVSjscO7zuDsOD4v.mjs} +2 -2
- package/browser/esm/{CX5p76lvGB80Gn7j.mjs → DdLujAMc-Cefddif.mjs} +1 -1
- package/browser/esm/{BMrxZUxFZxs_TprK.mjs → Dg_NRblGOcetqhnC.mjs} +17 -18
- package/browser/esm/{C43cFXvNQttM0tuv.mjs → YfJJd16cfjuXpb8G.mjs} +1 -1
- package/browser/esm/beUKtp_qQMnuYcVk.mjs +4452 -0
- package/browser/esm/index.mjs +68 -71
- package/browser/esm/{C-TjWH0Ll_dg6TXG.mjs → miaBr4cu9WKLs8Is.mjs} +1 -1
- package/browser/esm/{UKbQrJIwqIMUQ4dz.mjs → nwvZlIH9rheqctQz.mjs} +1 -1
- package/browser/esm/{DDCO6hne0WaKAsyz.mjs → yQgfM4ehXrfnEoUK.mjs} +2 -2
- package/node/esm/{DmbC0_ocWCB60DUY.mjs → B9TRK2jd_Ki2RifT.mjs} +1 -1
- package/node/esm/{g5IsTuP_M7p1bN41.mjs → BTp8XtWh47Y1g1MM.mjs} +1 -1
- package/node/esm/BcB8nCbI5HW5jv5q.mjs +65 -0
- package/node/esm/C5WzmLTAphEQU3CU.mjs +155 -0
- package/node/esm/{C0x0sq_I7hdqCuBB.mjs → CN79Z_qqLiF3V5r0.mjs} +1 -1
- package/node/esm/{x7VDppl2hKDhIcfj.mjs → CNCYE_ff8SnJJMPN.mjs} +41 -42
- package/node/esm/{nZVauB5xkNLVTaod.mjs → COoX8Ir66wNuWJ_m.mjs} +1 -1
- package/node/esm/{VjNnErE5lO5hNix_.mjs → CxbA2L1Ap9NSJcxm.mjs} +1 -1
- package/node/esm/{CdEdm8ItFMvEzr0O.mjs → Dln5o1FP_HWPs0Uf.mjs} +1 -1
- package/node/esm/index.mjs +1405 -1452
- package/node/esm/{DhjwHPKOhF-WGawL.mjs → qpKmKMfv4DDofXKf.mjs} +1 -1
- package/package.json +21 -10
- package/types/index.d.ts +14 -92
- package/browser/cjs/BCNKSDS1DahImiBd.cjs +0 -20
- package/browser/cjs/BrJIDDxcCb7loSqZ.cjs +0 -6
- package/browser/cjs/hRcxITGib5rp_kTW.cjs +0 -6
- package/browser/esm/BXa5jJK06vkHLfz_.mjs +0 -64
- package/browser/esm/zTa4aYOOiAsmWpM1.mjs +0 -4489
- package/node/esm/DUoSsHJRuVxAeHW-.mjs +0 -156
- package/node/esm/DuFKPKejduTq6L6F.mjs +0 -65
|
@@ -1,74 +1,73 @@
|
|
|
1
1
|
import { jsx as i, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { memo as ie, useRef as
|
|
3
|
-
import { alpha as
|
|
2
|
+
import { memo as ie, useRef as y, useState as b, useEffect as K, useLayoutEffect as ce, useMemo as pe } from "react";
|
|
3
|
+
import { alpha as k, getOverlayAlpha as F } from "@mui/material/styles";
|
|
4
4
|
import { DialogContent as de, Box as O, TextField as Z, InputAdornment as ue, Collapse as _, MenuItem as fe, FormControl as ge, InputLabel as me, Select as xe } from "@mui/material";
|
|
5
|
-
import { ArrowBack as he, ArrowUpward as Oe, ArrowForward as Ce, ArrowDownward as ye } from "@mui/icons-material";
|
|
6
5
|
import { ICell as c, IRange as R } from "@sheetxl/sdk";
|
|
7
|
-
import { useCallbackRef as
|
|
8
|
-
import { InternalWindow as
|
|
9
|
-
import { u as
|
|
6
|
+
import { useCallbackRef as L, KeyCodes as he, DynamicIcon as m, KeyModifiers as C } from "@sheetxl/utils-react";
|
|
7
|
+
import { InternalWindow as Oe, ExhibitOptionButton as x, ExhibitDivider as ye } from "@sheetxl/utils-mui";
|
|
8
|
+
import { u as Ce } from "./beUKtp_qQMnuYcVk.mjs";
|
|
10
9
|
/**
|
|
11
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
10
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.6
|
|
12
11
|
*
|
|
13
12
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
14
13
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
15
14
|
*/
|
|
16
|
-
const
|
|
17
|
-
const { label: h, value: a, options: l, onSelect: d, tabIndex: T = 0, ...
|
|
18
|
-
|
|
15
|
+
const $ = ie((w) => {
|
|
16
|
+
const { label: h, value: a, options: l, onSelect: d, tabIndex: T = 0, ...D } = w, [A, v] = b(() => te(a, l));
|
|
17
|
+
K(() => {
|
|
19
18
|
v(te(a, l));
|
|
20
19
|
}, [a, l]);
|
|
21
|
-
const P =
|
|
20
|
+
const P = L((u) => {
|
|
22
21
|
v(u.target.value), d?.(l[u.target.value]);
|
|
23
22
|
}, [d, l]), s = pe(() => Object.keys(l).map((u) => i(fe, { value: u, children: u }, u)), [l]);
|
|
24
|
-
return p(ge, { sx: { minWidth: 135 }, size: "small", children: [i(me, { children: h }), i(xe, { inputProps: { tabIndex: T }, value:
|
|
23
|
+
return p(ge, { sx: { minWidth: 135 }, size: "small", children: [i(me, { children: h }), i(xe, { inputProps: { tabIndex: T }, value: A, label: h, onChange: P, sx: { backgroundImage: `linear-gradient(${k("#fff", F(5))}, ${k("#fff", F(5))})` }, ...D, children: s })] });
|
|
25
24
|
}), ee = { Workbook: "workbook", Sheet: "sheet" }, ne = { enter: 140, exit: 140 }, oe = { Formulas: c.Content.Formulas, Values: c.Content.Values, Notes: c.Content.Notes, Comments: c.Content.Comments }, le = { ...oe };
|
|
26
25
|
delete le.Values;
|
|
27
|
-
const
|
|
26
|
+
const be = { "By Rows": !0, "By Columns": !1 }, te = (w, h) => {
|
|
28
27
|
const a = Object.keys(h);
|
|
29
28
|
for (let l = 0; l < a.length; l++) {
|
|
30
29
|
const d = a[l];
|
|
31
|
-
if (h[d] ===
|
|
30
|
+
if (h[d] === w) return d;
|
|
32
31
|
}
|
|
33
|
-
},
|
|
34
|
-
const { replace: h = !1, findText: a, replaceText: l, findOptions: d, replaceOptions: T, title:
|
|
32
|
+
}, Se = ie((w) => {
|
|
33
|
+
const { replace: h = !1, findText: a, replaceText: l, findOptions: d, replaceOptions: T, title: D, onHide: A, onFindOrReplace: v, ...P } = w, s = y(null), u = y(null), V = y(null), j = y(null), N = y(null), H = y(null), z = (e, n) => {
|
|
35
34
|
n && (n.start(e, { center: !1 }), setTimeout(() => n.stop(e), 180));
|
|
36
|
-
}, [U, S] = b(!1), [
|
|
35
|
+
}, [U, S] = b(!1), [B, se] = b(!1), [f, M] = b(h), [G, W] = b(!1), [X, q] = b(!1), [o, r] = b({ findText: null, replaceText: null, replace: h, replaceOptions: {}, findOptions: { matchCase: !1, matchEntireCell: !1, useRegex: !1, orientation: R.Orientation.Row, fields: [c.Content.Formulas] }, scope: ee.Sheet }), E = L(async (e, n, t, I) => {
|
|
37
36
|
if (!v) return;
|
|
38
37
|
const g = { ...o };
|
|
39
38
|
g.replaceOptions = { ...g.replaceOptions }, g.findOptions = { ...g.findOptions }, g.replaceOptions.maxCount = t ? void 0 : 1, g.replace = n, n && o.findOptions.fields?.[0] === c.Content.Values && (g.findOptions.fields = [c.Content.Formulas]), g.findOptions.reverse = !e;
|
|
40
|
-
const ae = await v({ autoFocus:
|
|
39
|
+
const ae = await v({ autoFocus: I, ...g });
|
|
41
40
|
W(ae === 0);
|
|
42
41
|
}, [o, v]);
|
|
43
|
-
|
|
42
|
+
K(() => {
|
|
44
43
|
W(!1);
|
|
45
|
-
}, [o,
|
|
46
|
-
const J =
|
|
47
|
-
if (e.keyCode ===
|
|
44
|
+
}, [o, B, f]);
|
|
45
|
+
const J = L((e, n) => {
|
|
46
|
+
if (e.keyCode === he.Enter) {
|
|
48
47
|
if (!o.findText) return;
|
|
49
|
-
let t = !0,
|
|
50
|
-
e.shiftKey && (t = !1), n ? (e.ctrlKey && e.altKey && (
|
|
48
|
+
let t = !0, I = !1;
|
|
49
|
+
e.shiftKey && (t = !1), n ? (e.ctrlKey && e.altKey && (I = !0), z(e, I ? H.current : N.current)) : z(e, t ? j.current : V.current), E(t, n, I, !1);
|
|
51
50
|
}
|
|
52
|
-
}, [o]), Q =
|
|
51
|
+
}, [o]), Q = y(null);
|
|
53
52
|
ce(() => {
|
|
54
53
|
r((e) => {
|
|
55
54
|
const n = { ...e };
|
|
56
55
|
n.findText = a && a.length > 0 ? a : e.findText ?? "", S(!0), l !== void 0 && (n.replaceText = l), d && (n.findOptions = { ...n.findOptions, ...d }), n.replaceText || (n.replaceText = ""), n.replaceOptions && (n.replaceOptions = { ...n.replaceOptions }), T && (n.replaceOptions = { ...n.replaceOptions, ...T }), o.findOptions.fields?.[0] || (o.findOptions.fields = [c.Content.Formulas]);
|
|
57
56
|
const t = !(!T && l === void 0);
|
|
58
|
-
return t &&
|
|
59
|
-
}),
|
|
60
|
-
}, [a, l, d, T]),
|
|
57
|
+
return t && M(t), n;
|
|
58
|
+
}), X || Q.current?.focus();
|
|
59
|
+
}, [a, l, d, T]), K(() => {
|
|
61
60
|
f ? (o.findOptions.fields[0], c.Content.Values) : S(!0);
|
|
62
|
-
}, [f]),
|
|
61
|
+
}, [f]), K(() => {
|
|
63
62
|
if (U && s.current && o.findText === s.current.value) return s.current === document.activeElement || s.current.contains(document.activeElement) ? (s.current?.select(), void S(!1)) : void s.current.addEventListener("focus", () => {
|
|
64
63
|
s.current?.select(), S(!1);
|
|
65
64
|
}, { once: !0 });
|
|
66
65
|
}, [U, o]);
|
|
67
|
-
const [re, { width: Y }] =
|
|
68
|
-
return i(
|
|
66
|
+
const [re, { width: Y }] = Ce();
|
|
67
|
+
return i(Oe, { ref: Q, title: D ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: A, onFocus: () => q(!0), onBlur: () => {
|
|
69
68
|
q(!1), W(!1);
|
|
70
|
-
}, PaperProps: { elevation:
|
|
71
|
-
if (e.key === "h" && e.ctrlKey)
|
|
69
|
+
}, PaperProps: { elevation: X ? 3 : 1 }, ...P, children: p(de, { dividers: !0, ref: re, sx: { display: "flex", flexDirection: "column", paddingLeft: (e) => e.spacing(1.5), paddingRight: (e) => e.spacing(1.5) }, onKeyDown: (e) => {
|
|
70
|
+
if (e.key === "h" && e.ctrlKey) M(!0), s.current?.contains(document.activeElement) && u.current?.focus();
|
|
72
71
|
else if (e.key === "f" && e.ctrlKey) s.current?.focus();
|
|
73
72
|
else if (e.key === "c" && e.altKey) r((n) => {
|
|
74
73
|
const t = { ...n };
|
|
@@ -86,62 +85,62 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, te = (F, h) => {
|
|
|
86
85
|
});
|
|
87
86
|
}
|
|
88
87
|
e.preventDefault();
|
|
89
|
-
}, children: [p(O, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(
|
|
88
|
+
}, children: [p(O, { sx: { display: "flex", flexDirection: "row", gap: (e) => e.spacing(1) }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e) => e.spacing(0.25), paddingTop: "3px" }, children: [i(x, { selected: B, onSelectToggle: (e) => {
|
|
90
89
|
se(e);
|
|
91
|
-
}, preventFocus: !0, label: "Toggle Additional Options", icon:
|
|
92
|
-
|
|
93
|
-
}, preventFocus: !0, label: "Toggle Replace", icon:
|
|
90
|
+
}, preventFocus: !0, label: "Toggle Additional Options", icon: i(m, { iconKey: "FindOptions" }) }), i(x, { selected: f, onSelectToggle: (e) => {
|
|
91
|
+
M(e);
|
|
92
|
+
}, preventFocus: !0, label: "Toggle Replace", icon: i(m, { iconKey: "FindReplaceToggle" }), shortcut: { key: f ? "F" : "H", modifiers: [C.Ctrl] } })] }), p(O, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [i(Z, { label: "Find", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), minWidth: Y > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${k("#fff", F(5))}, ${k("#fff", F(5))})` }, inputProps: { draggable: !1, ref: s, className: "input", autoFocus: !0, spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } }, endAdornment: i(ue, { sx: { transform: "scale(0.75) translateX(16px)" }, position: "end", children: p(O, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "1px" }, children: [i(x, { selected: o.findOptions.matchCase, onSelectToggle: (e) => {
|
|
94
93
|
r((n) => {
|
|
95
94
|
const t = { ...n };
|
|
96
95
|
return t.findOptions.matchCase = e, t;
|
|
97
96
|
});
|
|
98
|
-
}, label: "Match Case", shortcut: { key: "C", modifiers: [
|
|
97
|
+
}, label: "Match Case", shortcut: { key: "C", modifiers: [C.Alt] }, icon: i(m, { iconKey: "FindCaseSensitive" }) }), i(x, { selected: o.findOptions.matchEntireCell, onSelectToggle: (e) => {
|
|
99
98
|
r((n) => {
|
|
100
99
|
const t = { ...n };
|
|
101
100
|
return t.findOptions.matchEntireCell = e, t;
|
|
102
101
|
});
|
|
103
|
-
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [
|
|
102
|
+
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [C.Alt] }, icon: i(m, { iconKey: "FindWholeWord" }) }), i(x, { selected: o.findOptions.useRegex, onSelectToggle: (e) => {
|
|
104
103
|
r((n) => {
|
|
105
104
|
const t = { ...n };
|
|
106
105
|
return t.findOptions.useRegex = e, t;
|
|
107
106
|
});
|
|
108
|
-
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [
|
|
107
|
+
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [C.Alt] }, icon: i(m, { iconKey: "FindRegEx" }) })] }) }) }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => G ? `${e.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e) => G ? `${e.palette.error.main} !important` : void 0 } }, value: o.findText ?? "", onChange: (e) => {
|
|
109
108
|
r((n) => {
|
|
110
109
|
const t = { ...n };
|
|
111
110
|
return t.findText = e.target.value, t;
|
|
112
111
|
});
|
|
113
112
|
}, onKeyDown: (e) => J(e, !1), onContextMenu: (e) => {
|
|
114
113
|
e.stopPropagation();
|
|
115
|
-
} }), i(
|
|
116
|
-
|
|
117
|
-
}, touchRippleRef: V, label: "", shortcut: { key: "Enter", modifiers: [
|
|
118
|
-
|
|
119
|
-
}, touchRippleRef: j, label: "Next Match", shortcut: { key: "Enter" }, icon:
|
|
114
|
+
} }), i(x, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
|
|
115
|
+
E(!1, !1);
|
|
116
|
+
}, touchRippleRef: V, label: "", shortcut: { key: "Enter", modifiers: [C.Shift] }, icon: i(m, { iconKey: o.findOptions.orientation !== R.Orientation.Column ? "ArrowBack" : "ArrowUpward" }), disabled: !o.findText }), i(x, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
|
|
117
|
+
E(!0, !1);
|
|
118
|
+
}, touchRippleRef: j, label: "Next Match", shortcut: { key: "Enter" }, icon: i(m, { iconKey: o.findOptions.orientation !== R.Orientation.Column ? "ArrowForward" : "ArrowDownward" }), disabled: !o.findText })] }), i(_, { in: f, timeout: ne, onExit: () => {
|
|
120
119
|
s.current?.focus();
|
|
121
|
-
}, children: p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(Z, { label: "Replace", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), backgroundImage: `linear-gradient(${
|
|
120
|
+
}, children: p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(Z, { label: "Replace", InputLabelProps: { shrink: !0 }, InputProps: { sx: { paddingRight: (e) => e.spacing(1), backgroundImage: `linear-gradient(${k("#fff", F(5))}, ${k("#fff", F(5))})` }, inputProps: { ref: u, className: "input", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1) }, value: o.replaceText ?? "", onChange: (e) => {
|
|
122
121
|
r((n) => {
|
|
123
122
|
const t = { ...n };
|
|
124
123
|
return t.replaceText = e.target.value, t;
|
|
125
124
|
});
|
|
126
125
|
}, onKeyDown: (e) => J(e, !0), onContextMenu: (e) => {
|
|
127
126
|
e.stopPropagation();
|
|
128
|
-
} }), i(
|
|
129
|
-
|
|
130
|
-
}, touchRippleRef: N, label: "Replace", shortcut: { key: "Enter" }, icon:
|
|
131
|
-
|
|
132
|
-
}, touchRippleRef: H, label: "Replace All", shortcut: { key: "Enter", modifiers: [
|
|
127
|
+
} }), i(x, { onSelectToggle: (e) => {
|
|
128
|
+
E(!0, !0);
|
|
129
|
+
}, touchRippleRef: N, label: "Replace", shortcut: { key: "Enter" }, icon: i(m, { iconKey: "FindReplace" }), disabled: !o.findText }), i(x, { onSelectToggle: (e) => {
|
|
130
|
+
E(!0, !0, !0);
|
|
131
|
+
}, touchRippleRef: H, label: "Replace All", shortcut: { key: "Enter", modifiers: [C.Ctrl, C.Alt] }, icon: i(m, { iconKey: "FindReplaceAll" }), disabled: !o.findText })] }) })] })] }), i(_, { in: B, timeout: ne, onExit: () => {
|
|
133
132
|
s.current?.focus();
|
|
134
|
-
}, children: p(O, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(0.5), marginTop: (e) => e.spacing(1) }, children: [i(
|
|
133
|
+
}, children: p(O, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(0.5), marginTop: (e) => e.spacing(1) }, children: [i(ye, { orientation: "horizontal", sx: { marginBottom: (e) => e.spacing(1.5) } }), p(O, { sx: { display: "flex", flexDirection: Y >= 413 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", rowGap: (e) => e.spacing(2) }, tabIndex: -1, children: [i($, { label: "Within", value: o.scope, options: ee, onSelect: (e) => {
|
|
135
134
|
r((n) => {
|
|
136
135
|
const t = { ...n };
|
|
137
136
|
return t.scope = e, t;
|
|
138
137
|
});
|
|
139
|
-
} }), i(
|
|
138
|
+
} }), i($, { label: "Search", value: o.findOptions.orientation !== R.Orientation.Column, options: be, onSelect: (e) => {
|
|
140
139
|
r((n) => {
|
|
141
140
|
const t = { ...n };
|
|
142
141
|
return t.findOptions.orientation = e ? R.Orientation.Row : R.Orientation.Column, t;
|
|
143
142
|
});
|
|
144
|
-
} }), i(
|
|
143
|
+
} }), i($, { label: "Look in", value: f && o.findOptions.fields?.[0] === c.Content.Values ? c.Content.Formulas : o.findOptions.fields?.[0], options: f ? le : oe, onSelect: (e) => {
|
|
145
144
|
r((n) => {
|
|
146
145
|
const t = { ...n };
|
|
147
146
|
return t.findOptions.fields = [e], t;
|
|
@@ -149,7 +148,7 @@ const Ae = { "By Rows": !0, "By Columns": !1 }, te = (F, h) => {
|
|
|
149
148
|
} })] })] }) })] }) });
|
|
150
149
|
});
|
|
151
150
|
export {
|
|
152
|
-
|
|
151
|
+
Se as FindReplaceWindow,
|
|
153
152
|
ee as ScopeOptions,
|
|
154
|
-
|
|
153
|
+
Se as default
|
|
155
154
|
};
|
|
@@ -5,7 +5,7 @@ import { Box as V, FormControl as $, TextField as j } from "@mui/material";
|
|
|
5
5
|
import { useCallbackRef as m } from "@sheetxl/utils-react";
|
|
6
6
|
import { OptionsDialog as z } from "@sheetxl/utils-mui";
|
|
7
7
|
/**
|
|
8
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
8
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.6
|
|
9
9
|
*
|
|
10
10
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
11
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -2,10 +2,10 @@ import { jsxs as ie, jsx as U } from "react/jsx-runtime";
|
|
|
2
2
|
import O, { isValidElement as qu, PureComponent as pe, Component as de, memo as Ku, useState as ft, useCallback as ct, useLayoutEffect as Gu } from "react";
|
|
3
3
|
import { useTheme as Ju } from "@mui/material/styles";
|
|
4
4
|
import { Box as Qu } from "@mui/material";
|
|
5
|
-
import { g as mu, r as Zu, c as ve, C as es } from "./
|
|
5
|
+
import { g as mu, r as Zu, c as ve, C as es } from "./beUKtp_qQMnuYcVk.mjs";
|
|
6
6
|
import { ReactUtils as ts } from "@sheetxl/utils-react";
|
|
7
7
|
/**
|
|
8
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
8
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.6
|
|
9
9
|
*
|
|
10
10
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
11
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -5,7 +5,7 @@ import { Box as S, FormControl as D, TextField as F } from "@mui/material";
|
|
|
5
5
|
import { useCallbackRef as f } from "@sheetxl/utils-react";
|
|
6
6
|
import { OptionsDialog as U } from "@sheetxl/utils-mui";
|
|
7
7
|
/**
|
|
8
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
8
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.6
|
|
9
9
|
*
|
|
10
10
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
11
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { jsxs as Me, jsx as G } from "react/jsx-runtime";
|
|
2
2
|
import { Box as se, TextField as qt, InputAdornment as $t, IconButton as Xt, FormControlLabel as Yt, Checkbox as Jt, Typography as Zt, TableCell as Le, DialogContent as Qt } from "@mui/material";
|
|
3
|
-
import { KeyCodes as pt } from "@sheetxl/utils-react";
|
|
4
|
-
import { toShortcutElements as
|
|
3
|
+
import { KeyCodes as pt, DynamicIcon as eo } from "@sheetxl/utils-react";
|
|
4
|
+
import { toShortcutElements as to, InternalWindow as oo } from "@sheetxl/utils-mui";
|
|
5
5
|
import * as C from "react";
|
|
6
|
-
import mt, { cloneElement as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { alpha as ce, getOverlayAlpha as de, styled as
|
|
9
|
-
import { Close as so } from "@mui/icons-material";
|
|
6
|
+
import mt, { cloneElement as no, useState as ae, useMemo as ro, useEffect as Ge } from "react";
|
|
7
|
+
import { _ as io, b as N, d as U, e as lo, f as ge } from "./beUKtp_qQMnuYcVk.mjs";
|
|
8
|
+
import { alpha as ce, getOverlayAlpha as de, styled as so } from "@mui/material/styles";
|
|
10
9
|
import { CommonUtils as ao } from "@sheetxl/utils";
|
|
11
10
|
/**
|
|
12
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
11
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.6
|
|
13
12
|
*
|
|
14
13
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
15
14
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -61,7 +60,7 @@ function T(n) {
|
|
|
61
60
|
}
|
|
62
61
|
function H(n, e) {
|
|
63
62
|
if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function");
|
|
64
|
-
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e &&
|
|
63
|
+
n.prototype = Object.create(e && e.prototype, { constructor: { value: n, writable: !0, configurable: !0 } }), Object.defineProperty(n, "prototype", { writable: !1 }), e && io(n, e);
|
|
65
64
|
}
|
|
66
65
|
function p(n, e, t) {
|
|
67
66
|
return (e = gt(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
|
|
@@ -344,7 +343,7 @@ var co = (function() {
|
|
|
344
343
|
this._maybeMeasureCell();
|
|
345
344
|
} }, { key: "render", value: function() {
|
|
346
345
|
var e = this, t = this.props.children, o = typeof t == "function" ? t({ measure: this._measure, registerChild: this._registerChild }) : t;
|
|
347
|
-
return o === null ? o :
|
|
346
|
+
return o === null ? o : no(o, { ref: function(r) {
|
|
348
347
|
typeof o.ref == "function" ? o.ref(r) : o.ref && (o.ref.current = r), e._child.current = r;
|
|
349
348
|
} });
|
|
350
349
|
} }, { key: "_getCellMeasurements", value: function() {
|
|
@@ -623,7 +622,7 @@ function Ve(n) {
|
|
|
623
622
|
}
|
|
624
623
|
function ee(n, e) {
|
|
625
624
|
if (n == null) return {};
|
|
626
|
-
var t, o, r =
|
|
625
|
+
var t, o, r = lo(n, e);
|
|
627
626
|
if (Object.getOwnPropertySymbols) {
|
|
628
627
|
var l = Object.getOwnPropertySymbols(n);
|
|
629
628
|
for (o = 0; o < l.length; o++) t = l[o], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(n, t) && (r[t] = n[t]);
|
|
@@ -2091,7 +2090,7 @@ class Lo extends mt.PureComponent {
|
|
|
2091
2090
|
}, this.cellRenderer = ({ cellData: e, dataKey: t, columnIndex: o, width: r }) => {
|
|
2092
2091
|
const { columns: l, rowHeight: i, onRowClick: a } = this.props;
|
|
2093
2092
|
let s = e, c = { height: i, paddingRight: "2px", paddingTop: "0px", paddingBottom: "0px", minWidth: `${r}px`, maxWidth: `${r}px` };
|
|
2094
|
-
return t === "shortcut" ? s =
|
|
2093
|
+
return t === "shortcut" ? s = to(e) : t === "description" && (c = { ...c, fontSize: ".75rem", display: "block", paddingTop: "4px", whiteSpace: "pre-line" }), G(Le, { component: "div", className: ge(Te, oe, { [Ie]: a == null }), variant: "body", style: c, align: o != null && l[o].numeric ? "right" : "left", children: s });
|
|
2095
2094
|
}, this.headerRenderer = ({ label: e, columnIndex: t, width: o }) => {
|
|
2096
2095
|
const { headerHeight: r, columns: l } = this.props, i = l[t];
|
|
2097
2096
|
return G(Le, { component: "div", className: ge(Te, oe, Ie), variant: "head", sx: { width: o, height: r, backgroundColor: (a) => a.palette.grey[300] }, align: i.numeric ? "right" : "left", children: G("span", { children: i.label }) });
|
|
@@ -2108,9 +2107,9 @@ class Lo extends mt.PureComponent {
|
|
|
2108
2107
|
}) }) });
|
|
2109
2108
|
}
|
|
2110
2109
|
}
|
|
2111
|
-
const Go =
|
|
2110
|
+
const Go = so(Lo)(({ theme: n }) => ({ "& .ReactVirtualized__Table__headerRow": { ...n.direction === "rtl" && { paddingLeft: "0 !important" }, ...n.direction !== "rtl" && { paddingRight: void 0 } }, "& .ReactVirtualized__Table__Grid": { outline: "none" }, [`& .${oe}`]: { display: "flex", alignItems: "center", boxSizing: "border-box" }, [`& .${Vt}`]: { cursor: "pointer" }, [`& .${Kt}`]: { "&:hover:not([disabled])": { backgroundColor: n.palette.grey[200] } }, [`& .${Te}`]: { flex: 1 }, [`& .${Ie}`]: { cursor: "initial" } }));
|
|
2112
2111
|
function Ao(n) {
|
|
2113
|
-
const { commands: e, ...t } = n, [o, r] = ae(!1), [l, i] = ae(""), a =
|
|
2112
|
+
const { commands: e, ...t } = n, [o, r] = ae(!1), [l, i] = ae(""), a = ro(() => {
|
|
2114
2113
|
let h = e.getAllCommands();
|
|
2115
2114
|
o || (h = h.filter((_) => _.command.shortcut())), h.sort((_, S) => _.command.label().localeCompare(S.command.label()));
|
|
2116
2115
|
const v = [], g = (_) => _.replace(/\n\n/g, `
|
|
@@ -2125,7 +2124,7 @@ function Ao(n) {
|
|
|
2125
2124
|
return v;
|
|
2126
2125
|
}, [o, e]), [s, c] = ae(null);
|
|
2127
2126
|
Ge(() => {
|
|
2128
|
-
import("./
|
|
2127
|
+
import("./miaBr4cu9WKLs8Is.mjs").then((h) => {
|
|
2129
2128
|
c(new h.default(a, { threshold: 0, ignoreLocation: !0, keys: ["label", "description"] }));
|
|
2130
2129
|
});
|
|
2131
2130
|
}, [a]);
|
|
@@ -2137,7 +2136,7 @@ function Ao(n) {
|
|
|
2137
2136
|
for (let g = 0; g < h.length; g++) v[g] = h[g].item;
|
|
2138
2137
|
u(v);
|
|
2139
2138
|
}, 90)();
|
|
2140
|
-
}, [s, l]), Me(se, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...t, children: [Me(se, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (h) => h.spacing(2), color: (h) => h.palette.text.secondary }, children: [G(qt, { InputProps: { sx: { backgroundImage: `linear-gradient(${ce("#fff", de(5))}, ${ce("#fff", de(5))})` }, inputProps: { className: "input", autoFocus: !0, spellCheck: !1, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (h) => h.spacing(1), paddingBottom: (h) => h.spacing(1) } }, endAdornment: G($t, { sx: { opacity: l.length > 0 ? 1 : 0, display: l.length > 0 ? "flex" : "none" }, position: "end", children: G(Xt, { "aria-label": "clear search", onClick: () => i(""), edge: "end", children: G(
|
|
2139
|
+
}, [s, l]), Me(se, { style: { height: 440, width: "100%", display: "flex", flexDirection: "column" }, ...t, children: [Me(se, { sx: { display: "flex", alignItems: "center", justifyContent: "end", marginBottom: (h) => h.spacing(2), color: (h) => h.palette.text.secondary }, children: [G(qt, { InputProps: { sx: { backgroundImage: `linear-gradient(${ce("#fff", de(5))}, ${ce("#fff", de(5))})` }, inputProps: { className: "input", autoFocus: !0, spellCheck: !1, placeholder: "Type to search key bindings", autoComplete: "off", sx: { paddingTop: (h) => h.spacing(1), paddingBottom: (h) => h.spacing(1) } }, endAdornment: G($t, { sx: { opacity: l.length > 0 ? 1 : 0, display: l.length > 0 ? "flex" : "none" }, position: "end", children: G(Xt, { "aria-label": "clear search", onClick: () => i(""), edge: "end", children: G(eo, { iconKey: "Close" }) }) }) }, sx: { flex: "1 1 40%", marginRight: (h) => h.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (h) => f ? `${h.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (h) => f ? `${h.palette.error.main} !important` : void 0 } }, value: l, onChange: (h) => {
|
|
2141
2140
|
i(h.target.value);
|
|
2142
2141
|
}, onKeyDown: (h) => {
|
|
2143
2142
|
h.which === pt.Escape && l.length > 0 && (i(""), h.stopPropagation(), h.preventDefault());
|
|
@@ -2145,12 +2144,12 @@ function Ao(n) {
|
|
|
2145
2144
|
h.stopPropagation();
|
|
2146
2145
|
} }), G(Yt, { sx: { flex: "1 1 60%" }, control: G(Jt, { checked: o, onChange: () => r(!o) }), label: "Show commands without key bindings", labelPlacement: "start" })] }), G(se, { sx: { flex: "1 1 100%", borderRadius: (h) => `${h.shape.borderRadius}px`, border: (h) => `solid ${h.palette.divider} 1px`, paddingRight: "1px", overflow: "hidden", "* .MuiTableCell-head": { background: (h) => h.palette.background.paper, backgroundImage: `linear-gradient(${ce("#fff", de(5))}, ${ce("#fff", de(5))})` } }, children: G(Go, { rowCount: d.length, rowGetter: (h) => d[h.index], columns: [{ width: 180, label: "Command", dataKey: "label" }, { width: 260, label: "Key Binding", dataKey: "shortcut" }, { width: 240, label: "Description", dataKey: "description", widthLess: 440 }] }) }), G(se, { sx: { display: "flex", flexShrink: "0", paddingLeft: (h) => h.spacing(1), paddingTop: (h) => h.spacing(1), paddingRight: (h) => h.spacing(1), userSelect: "none", justifyContent: "flex-end" }, children: G(Zt, { noWrap: !0, component: "div", sx: { color: (h) => f ? h.palette.error.main : h.palette.text.secondary }, children: `${d.length === 0 ? "No" : d.length} shortcut key${d.length === 1 ? "" : "s"}${l.length > 0 ? " found" : ""}` }) })] });
|
|
2147
2146
|
}
|
|
2148
|
-
const
|
|
2147
|
+
const Uo = (n) => {
|
|
2149
2148
|
const { title: e = "Shortcut Keys", commands: t, sx: o, ...r } = n;
|
|
2150
|
-
return G(
|
|
2149
|
+
return G(oo, { isModal: !0, onKeyDown: (l) => {
|
|
2151
2150
|
l.keyCode === pt.F1 && l.preventDefault();
|
|
2152
2151
|
}, sx: { width: "780px", ...o }, title: e, autoFocusSel: ".input", ...r, children: G(Qt, { dividers: !0, children: G(Ao, { commands: t, sx: { marginBottom: "8px" } }) }) });
|
|
2153
2152
|
};
|
|
2154
2153
|
export {
|
|
2155
|
-
|
|
2154
|
+
Uo as default
|
|
2156
2155
|
};
|
|
@@ -5,7 +5,7 @@ import { Sort as s, IRange as r } from "@sheetxl/sdk";
|
|
|
5
5
|
import { useCallbackRef as b } from "@sheetxl/utils-react";
|
|
6
6
|
import { OptionsDialog as f } from "@sheetxl/utils-mui";
|
|
7
7
|
/**
|
|
8
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
8
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.6
|
|
9
9
|
*
|
|
10
10
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
11
|
* License: The license can be found at https://www.sheetxl.com/license.
|