@sheetxl/studio-mui 0.7.5 → 0.7.7
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/LICENSE.md +1 -1
- package/browser/cjs/BCf8BQb2c8ANexW4.cjs +7 -0
- package/browser/cjs/BJ4pZo7s81ynDlzw.cjs +6 -0
- package/browser/cjs/{CuHwOikK2J1MLsHN.cjs → Bf70UQlMT3b0NoOZ.cjs} +1 -1
- package/browser/cjs/Bpq9GrV7al7xxJ_d.cjs +6 -0
- package/browser/cjs/BxlQ6aLh5_jUvk9w.cjs +20 -0
- package/browser/cjs/{B4uj1Smd-98Hab_l.cjs → CJSNNa8ySxzuEmoy.cjs} +2 -2
- package/browser/cjs/{D4c72fkCJiL-S_-a.cjs → CUND2W1xMwqPOHwD.cjs} +7 -7
- package/browser/cjs/{CJQkIVFa7S1AZcBP.cjs → Cg95aBJ4kuUq7jrz.cjs} +1 -1
- package/browser/cjs/Dcoq8P2O8-40waHl.cjs +6 -0
- package/browser/cjs/{JURSrTjvLJ8bc4Yl.cjs → DeoOsY5TkIAydt9W.cjs} +2 -2
- package/browser/cjs/index.cjs +3 -3
- package/browser/cjs/{D6pUyWwmIliDWT8B.cjs → j0lD5RrJ86CRlUNT.cjs} +2 -2
- package/browser/esm/{B7CJX7fKvv1vBk8-.mjs → 7tCRjNmDM5kf3BFa.mjs} +2 -2
- package/browser/esm/{hWToTYtpa0PFzhRm.mjs → BWxmPJd4f8qZMxaa.mjs} +17 -18
- package/browser/esm/{COI8Eg7HQcdPFGcZ.mjs → BbHGWXif6ytyfyHI.mjs} +1 -1
- package/browser/esm/{CajWEWsYWzynjFKw.mjs → BkhHyCmy1MwVFS1b.mjs} +2 -2
- package/browser/esm/{BbfPde9B9b4p64_L.mjs → Bo3cXzeDcP_Q9YvX.mjs} +2 -2
- package/browser/esm/CRDu7VFAa8NGcoHj.mjs +49 -0
- package/browser/esm/{C48fXszXYqcJMQni.mjs → Cd02kMBZDsozIA98.mjs} +12 -12
- package/browser/esm/CzdBzjYgP1i3pkPL.mjs +4455 -0
- package/browser/esm/DFppS_p4spncePDm.mjs +156 -0
- package/browser/esm/{KULqIIHcvNriSu7F.mjs → db-2uDA7mYS4QpHj.mjs} +1 -1
- package/browser/esm/index.mjs +70 -72
- package/browser/esm/{gpytxNaiTkBoZ6aj.mjs → nzc1811Pk5-sKDu5.mjs} +7 -7
- package/licenses/dependencies.txt +189 -222
- package/node/assets/style.css +1 -1
- package/node/esm/BVKo3uc0IreLNkkN.mjs +157 -0
- package/node/esm/{CuIak_iZn0ApypmT.mjs → BfnEq4EhLf8jJ0Gp.mjs} +1 -1
- package/node/esm/{BHFc6-pxJ_X3esj1.mjs → BgR1PWucIb0Zucr4.mjs} +1 -1
- package/node/esm/{DEnAvzkXoQEvscd-.mjs → BimlBylqyslj9fNg.mjs} +1 -1
- package/node/esm/{DExsoaMD7hWNhceb.mjs → BnGsbrQwjcaUFAdt.mjs} +13 -13
- package/node/esm/{DKhoTrOwIfMtft9r.mjs → CQhaL28vV1X6Xt2N.mjs} +43 -44
- package/node/esm/{NYFZEGBg9dFXwfFf.mjs → DB2ryaj4_Y8Lgyy_.mjs} +1 -1
- package/node/esm/{DQIYBoarjlonhEEn.mjs → X3qO0PKREgY9FMZU.mjs} +8 -8
- package/node/esm/index.mjs +1575 -1576
- package/node/esm/{DH3yxwtQR5c61iv3.mjs → rOozeXREjiU8jjPd.mjs} +14 -14
- package/package.json +15 -17
- package/types/index.d.ts +25 -93
- package/browser/cjs/BnpPHKTC6_96pDcW.cjs +0 -6
- package/browser/cjs/CHyGxDKCce-XV53l.cjs +0 -7
- package/browser/cjs/F4v-BOmzUXzCO3uz.cjs +0 -6
- package/browser/cjs/QQ4l7f6lYZb7S6td.cjs +0 -20
- package/browser/cjs/Td2md8ruASYOp_Rr.cjs +0 -6
- package/browser/cjs/jHU6TwhWd2lZX-VA.cjs +0 -6
- package/browser/esm/BhP57_jo4NnvHBgF.mjs +0 -64
- package/browser/esm/CGVa4zFRRZyFzDvh.mjs +0 -4489
- package/browser/esm/CkXFR3hHwNp6jfJV.mjs +0 -49
- package/browser/esm/CwAqw5gJ2yzuXbLx.mjs +0 -155
- package/node/esm/8qD_FXFKXbOqF2_X.mjs +0 -156
- package/node/esm/DQKU8gdXpx4S0S0D.mjs +0 -65
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { jsx as i, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { memo as oe, useRef as y, useState as b, useEffect as K, useLayoutEffect as pe, useMemo as de } from "react";
|
|
3
|
+
import { alpha as F, getOverlayAlpha as w } from "@mui/material/styles";
|
|
4
|
+
import { DialogContent as ue, Box as O, TextField as _, InputAdornment as fe, Collapse as ee, MenuItem as ge, FormControl as me, InputLabel as xe, Select as he } from "@mui/material";
|
|
5
|
+
import { ICell as c, IRange as k } from "@sheetxl/sdk";
|
|
6
|
+
import { useCallbackRef as z, KeyCodes as Oe, DynamicIcon as m, KeyModifiers as C } from "@sheetxl/utils-react";
|
|
7
|
+
import { InternalWindow as ye, ExhibitOptionButton as x, ExhibitDivider as Ce } from "@sheetxl/utils-mui";
|
|
8
|
+
import { u as be } from "./CzdBzjYgP1i3pkPL.mjs";
|
|
9
|
+
/**
|
|
10
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
|
|
11
|
+
*
|
|
12
|
+
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
13
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
14
|
+
*/
|
|
15
|
+
const P = { width: "1.5rem", height: "1.5rem" }, $ = oe((T) => {
|
|
16
|
+
const { label: h, value: a, options: l, onSelect: d, tabIndex: v = 0, ...D } = T, [A, R] = b(() => ie(a, l));
|
|
17
|
+
K(() => {
|
|
18
|
+
R(ie(a, l));
|
|
19
|
+
}, [a, l]);
|
|
20
|
+
const M = z((u) => {
|
|
21
|
+
R(u.target.value), d?.(l[u.target.value]);
|
|
22
|
+
}, [d, l]), s = de(() => Object.keys(l).map((u) => i(ge, { value: u, children: u }, u)), [l]);
|
|
23
|
+
return p(me, { sx: { minWidth: 135 }, size: "small", children: [i(xe, { children: h }), i(he, { inputProps: { tabIndex: v }, value: A, label: h, onChange: M, sx: { backgroundImage: `linear-gradient(${F("#fff", w(5))}, ${F("#fff", w(5))})` }, ...D, children: s })] });
|
|
24
|
+
}), ne = { Workbook: "workbook", Sheet: "sheet" }, te = { enter: 140, exit: 140 }, le = { Formulas: c.Content.Formulas, Values: c.Content.Values, Notes: c.Content.Notes, Comments: c.Content.Comments }, se = { ...le };
|
|
25
|
+
delete se.Values;
|
|
26
|
+
const ve = { "By Rows": !0, "By Columns": !1 }, ie = (T, h) => {
|
|
27
|
+
const a = Object.keys(h);
|
|
28
|
+
for (let l = 0; l < a.length; l++) {
|
|
29
|
+
const d = a[l];
|
|
30
|
+
if (h[d] === T) return d;
|
|
31
|
+
}
|
|
32
|
+
}, Ke = oe((T) => {
|
|
33
|
+
const { replace: h = !1, findText: a, replaceText: l, findOptions: d, replaceOptions: v, title: D, onHide: A, onFindOrReplace: R, ...M } = T, s = y(null), u = y(null), V = y(null), j = y(null), N = y(null), H = y(null), U = (e, n) => {
|
|
34
|
+
n && (n.start(e, { center: !1 }), setTimeout(() => n.stop(e), 180));
|
|
35
|
+
}, [G, I] = b(!1), [B, re] = b(!1), [f, W] = b(h), [q, L] = b(!1), [J, Q] = b(!1), [o, r] = b({ replaceText: null, replace: h, replaceOptions: {}, findOptions: { text: null, matchCase: !1, matchEntireCell: !1, useRegex: !1, orientation: k.Orientation.Row, fields: [c.Content.Formulas] }, scope: ne.Sheet }), E = z(async (e, n, t, S) => {
|
|
36
|
+
if (!R) return;
|
|
37
|
+
const g = { ...o };
|
|
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;
|
|
39
|
+
const ce = await R({ autoFocus: S, ...g });
|
|
40
|
+
L(ce === 0);
|
|
41
|
+
}, [o, R]);
|
|
42
|
+
K(() => {
|
|
43
|
+
L(!1);
|
|
44
|
+
}, [o, B, f]);
|
|
45
|
+
const X = z((e, n) => {
|
|
46
|
+
if (e.keyCode === Oe.Enter) {
|
|
47
|
+
if (!o.findOptions.text) return;
|
|
48
|
+
let t = !0, S = !1;
|
|
49
|
+
e.shiftKey && (t = !1), n ? (e.ctrlKey && e.altKey && (S = !0), U(e, S ? H.current : N.current)) : U(e, t ? j.current : V.current), E(t, n, S, !1);
|
|
50
|
+
}
|
|
51
|
+
}, [o]), Y = y(null);
|
|
52
|
+
pe(() => {
|
|
53
|
+
r((e) => {
|
|
54
|
+
const n = { ...e };
|
|
55
|
+
n.findOptions.text = a && a.length > 0 ? a : e.findOptions.text ?? "", I(!0), l !== void 0 && (n.replaceText = l), d && (n.findOptions = { ...n.findOptions, ...d }), n.replaceText || (n.replaceText = ""), n.replaceOptions && (n.replaceOptions = { ...n.replaceOptions }), v && (n.replaceOptions = { ...n.replaceOptions, ...v }), o.findOptions.fields?.[0] || (o.findOptions.fields = [c.Content.Formulas]);
|
|
56
|
+
const t = !(!v && l === void 0);
|
|
57
|
+
return t && W(t), n;
|
|
58
|
+
}), J || Y.current?.focus();
|
|
59
|
+
}, [a, l, d, v]), K(() => {
|
|
60
|
+
f ? (o.findOptions.fields[0], c.Content.Values) : I(!0);
|
|
61
|
+
}, [f]), K(() => {
|
|
62
|
+
if (G && s.current && o.findOptions.text === s.current.value) return s.current === document.activeElement || s.current.contains(document.activeElement) ? (s.current?.select(), void I(!1)) : void s.current.addEventListener("focus", () => {
|
|
63
|
+
s.current?.select(), I(!1);
|
|
64
|
+
}, { once: !0 });
|
|
65
|
+
}, [G, o]);
|
|
66
|
+
const [ae, { width: Z }] = be();
|
|
67
|
+
return i(ye, { ref: Y, title: D ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: A, onFocus: () => Q(!0), onBlur: () => {
|
|
68
|
+
Q(!1), L(!1);
|
|
69
|
+
}, slotProps: { paper: { elevation: J ? 3 : 1 } }, ...M, children: p(ue, { dividers: !0, ref: ae, 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) W(!0), s.current?.contains(document.activeElement) && u.current?.focus();
|
|
71
|
+
else if (e.key === "f" && e.ctrlKey) s.current?.focus();
|
|
72
|
+
else if (e.key === "c" && e.altKey) r((n) => {
|
|
73
|
+
const t = { ...n };
|
|
74
|
+
return t.findOptions.matchCase = !n.findOptions.matchCase, t;
|
|
75
|
+
});
|
|
76
|
+
else if (e.key === "e" && e.altKey) r((n) => {
|
|
77
|
+
const t = { ...n };
|
|
78
|
+
return t.findOptions.matchEntireCell = !n.findOptions.matchEntireCell, t;
|
|
79
|
+
});
|
|
80
|
+
else {
|
|
81
|
+
if (e.key !== "r" || !e.altKey) return;
|
|
82
|
+
r((n) => {
|
|
83
|
+
const t = { ...n };
|
|
84
|
+
return t.findOptions.useRegex = !n.findOptions.useRegex, t;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
e.preventDefault();
|
|
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) => {
|
|
89
|
+
re(e);
|
|
90
|
+
}, preventFocus: !0, label: "Toggle Additional Options", icon: i(m, { iconKey: "FindOptions" }) }), i(x, { selected: f, onSelectToggle: (e) => {
|
|
91
|
+
W(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(_, { label: "Find", slotProps: { input: { sx: { paddingRight: (e) => e.spacing(1), minWidth: Z > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${F("#fff", w(5))}, ${F("#fff", w(5))})` }, endAdornment: i(fe, { position: "end", children: p(O, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "2px" }, children: [i(x, { style: P, selected: o.findOptions.matchCase, onBlur: () => {
|
|
93
|
+
console.log("blur");
|
|
94
|
+
}, onSelectToggle: (e) => {
|
|
95
|
+
r((n) => {
|
|
96
|
+
const t = { ...n };
|
|
97
|
+
return t.findOptions.matchCase = e, t;
|
|
98
|
+
});
|
|
99
|
+
}, label: "Match Case", shortcut: { key: "C", modifiers: [C.Alt] }, icon: i(m, { iconKey: "FindCaseSensitive", size: "1rem" }) }), i(x, { style: P, selected: o.findOptions.matchEntireCell, onSelectToggle: (e) => {
|
|
100
|
+
r((n) => {
|
|
101
|
+
const t = { ...n };
|
|
102
|
+
return t.findOptions.matchEntireCell = e, t;
|
|
103
|
+
});
|
|
104
|
+
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [C.Alt] }, icon: i(m, { iconKey: "FindWholeWord", size: "1rem" }) }), i(x, { style: P, selected: o.findOptions.useRegex, onSelectToggle: (e) => {
|
|
105
|
+
r((n) => {
|
|
106
|
+
const t = { ...n };
|
|
107
|
+
return t.findOptions.useRegex = e, t;
|
|
108
|
+
});
|
|
109
|
+
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [C.Alt] }, icon: i(m, { iconKey: "FindRegEx", size: "1rem" }) })] }) }) }, inputLabel: { shrink: !0 }, htmlInput: { 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) } } }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => q ? `${e.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e) => q ? `${e.palette.error.main} !important` : void 0 } }, value: o.findOptions.text ?? "", onChange: (e) => {
|
|
110
|
+
r((n) => {
|
|
111
|
+
const t = { ...n };
|
|
112
|
+
return t.findOptions.text = e.target.value, t;
|
|
113
|
+
});
|
|
114
|
+
}, onKeyDown: (e) => X(e, !1), onContextMenu: (e) => {
|
|
115
|
+
e.stopPropagation();
|
|
116
|
+
} }), i(x, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
|
|
117
|
+
E(!1, !1);
|
|
118
|
+
}, touchRippleRef: V, label: "", shortcut: { key: "Enter", modifiers: [C.Shift] }, icon: i(m, { iconKey: o.findOptions.orientation !== k.Orientation.Column ? "ArrowBack" : "ArrowUpward" }), disabled: !o.findOptions.text }), i(x, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
|
|
119
|
+
E(!0, !1);
|
|
120
|
+
}, touchRippleRef: j, label: "Next Match", shortcut: { key: "Enter" }, icon: i(m, { iconKey: o.findOptions.orientation !== k.Orientation.Column ? "ArrowForward" : "ArrowDownward" }), disabled: !o.findOptions.text })] }), i(ee, { in: f, timeout: te, onExit: () => {
|
|
121
|
+
s.current?.focus();
|
|
122
|
+
}, children: p(O, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e) => e.spacing(2) }, children: [i(_, { label: "Replace", slotProps: { input: { sx: { paddingRight: (e) => e.spacing(1), backgroundImage: `linear-gradient(${F("#fff", w(5))}, ${F("#fff", w(5))})` } }, inputLabel: { shrink: !0 }, htmlInput: { 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) => {
|
|
123
|
+
r((n) => {
|
|
124
|
+
const t = { ...n };
|
|
125
|
+
return t.replaceText = e.target.value, t;
|
|
126
|
+
});
|
|
127
|
+
}, onKeyDown: (e) => X(e, !0), onContextMenu: (e) => {
|
|
128
|
+
e.stopPropagation();
|
|
129
|
+
} }), i(x, { onSelectToggle: (e) => {
|
|
130
|
+
E(!0, !0);
|
|
131
|
+
}, touchRippleRef: N, label: "Replace", shortcut: { key: "Enter" }, icon: i(m, { iconKey: "FindReplace" }), disabled: !o.findOptions.text }), i(x, { onSelectToggle: (e) => {
|
|
132
|
+
E(!0, !0, !0);
|
|
133
|
+
}, touchRippleRef: H, label: "Replace All", shortcut: { key: "Enter", modifiers: [C.Ctrl, C.Alt] }, icon: i(m, { iconKey: "FindReplaceAll" }), disabled: !o.findOptions.text })] }) })] })] }), i(ee, { in: B, timeout: te, onExit: () => {
|
|
134
|
+
s.current?.focus();
|
|
135
|
+
}, children: p(O, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e) => e.spacing(1.5), marginTop: (e) => e.spacing(1) }, children: [i(Ce, { orientation: "horizontal", sx: { marginBottom: (e) => e.spacing(1.5) } }), p(O, { sx: { display: "flex", flexDirection: Z >= 383 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", gap: (e) => e.spacing(1), rowGap: (e) => e.spacing(2) }, tabIndex: -1, children: [i($, { label: "Within", value: o.scope, options: ne, onSelect: (e) => {
|
|
136
|
+
r((n) => {
|
|
137
|
+
const t = { ...n };
|
|
138
|
+
return t.scope = e, t;
|
|
139
|
+
});
|
|
140
|
+
} }), i($, { label: "Search", value: o.findOptions.orientation !== k.Orientation.Column, options: ve, onSelect: (e) => {
|
|
141
|
+
r((n) => {
|
|
142
|
+
const t = { ...n };
|
|
143
|
+
return t.findOptions.orientation = e ? k.Orientation.Row : k.Orientation.Column, t;
|
|
144
|
+
});
|
|
145
|
+
} }), i($, { label: "Look in", value: f && o.findOptions.fields?.[0] === c.Content.Values ? c.Content.Formulas : o.findOptions.fields?.[0], options: f ? se : le, onSelect: (e) => {
|
|
146
|
+
r((n) => {
|
|
147
|
+
const t = { ...n };
|
|
148
|
+
return t.findOptions.fields = [e], t;
|
|
149
|
+
});
|
|
150
|
+
} })] })] }) })] }) });
|
|
151
|
+
});
|
|
152
|
+
export {
|
|
153
|
+
Ke as FindReplaceWindow,
|
|
154
|
+
ne as ScopeOptions,
|
|
155
|
+
Ke as default
|
|
156
|
+
};
|
|
@@ -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.7
|
|
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.
|
package/browser/esm/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._sheetxl-reset_11z3j_1{display:block;margin:0;padding:0;line-height:1}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:block;width:auto;height:auto;margin:0;padding:0;border:none;border-collapse:inherit;border-spacing:0;border-color:inherit;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0}._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4{fill:currentColor}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .activeColor{fill:var(--sxl-color-active)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .background{fill:var(--sxl-app-color-background)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .grey{fill:var(--sxl-app-color-grey)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .highContrast{fill:var(--sxl-app-color-high)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info{fill:var(--sxl-app-color-info)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.light{fill:var(--sxl-app-color-info-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.dark{fill:var(--sxl-app-color-info-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary{fill:var(--sxl-app-color-secondary)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.light{fill:var(--sxl-app-color-secondary-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.dark{fill:var(--sxl-app-color-secondary-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success{fill:var(--sxl-app-color-success)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.light{fill:var(--sxl-app-color-success-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.dark{fill:var(--sxl-app-color-success-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning{fill:var(--sxl-app-color-warning)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .light{fill:var(--sxl-app-color-warning-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .dark{fill:var(--sxl-app-color-warning-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error{fill:var(--sxl-app-color-error)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .light{fill:var(--sxl-app-color-error-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .dark{fill:var(--sxl-app-color-error-dark)}._sheetxl-workbook_g5t6x_5{display:flex;position:relative;overflow:hidden;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;outline:none}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer{background-color:var(--sxl-app-color-grey, grey)}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer:hover,._sheetxl-workbook_g5t6x_5 .splitPane.dragging .styled-resizer{background-color:var(--sxl-app-color-primary, blue)}._card_1a398_7{width:100%}._actionRoot_1a398_11{padding:8px 8px 8px 16px;justify-content:space-between}._icons_1a398_16{margin-left:auto;display:flex;align-items:center}._expand_1a398_22{padding:8px;transform:rotate(0);color:#d32f2f;transition:all .2s ease-in-out}._expandOpen_1a398_29{transform:rotate(180deg)}._stackTraceContainer_1a398_33{padding:16px}._paper_1a398_37{background-color:#fff;padding:16px}._checkIcon_1a398_42{font-size:20px;padding-right:4px}._button_1a398_47{padding:0;text-transform:none}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._sheetxl-reset_11z3j_1{display:block;margin:0;padding:0;line-height:1}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:block;width:auto;height:auto;margin:0;padding:0;border:none;border-collapse:inherit;border-spacing:0;border-color:inherit;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0}._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._table-style-options-container_1kfn2_1{container-type:inline-size}._table-style-options_1kfn2_1{display:grid;grid-template-columns:1fr;user-select:none}@container (width > 600px){._table-style-options_1kfn2_1{grid-template-rows:repeat(3,auto);grid-auto-flow:column;grid-auto-columns:1fr;gap:2px}}._range-row_akhf4_1{display:flex;flex-direction:column;flex:1 1 100%;width:100%;align-items:center}@container (width > 600px){._range-row_akhf4_1{flex-direction:row;gap:12px;justify-content:space-between}}._action-row_akhf4_15{display:flex;align-items:start;flex-direction:column;width:100%;gap:4px}@container (width > 600px){._action-row_akhf4_15{align-items:center;flex-direction:row;justify-content:space-evenly}}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4{fill:currentColor}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .activeColor{fill:var(--sxl-color-active)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .background{fill:var(--sxl-app-color-background)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .grey{fill:var(--sxl-app-color-grey)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .highContrast{fill:var(--sxl-app-color-high)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info{fill:var(--sxl-app-color-info)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.light{fill:var(--sxl-app-color-info-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .info.dark{fill:var(--sxl-app-color-info-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary{fill:var(--sxl-app-color-secondary)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.light{fill:var(--sxl-app-color-secondary-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .secondary.dark{fill:var(--sxl-app-color-secondary-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success{fill:var(--sxl-app-color-success)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.light{fill:var(--sxl-app-color-success-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .success.dark{fill:var(--sxl-app-color-success-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning{fill:var(--sxl-app-color-warning)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .light{fill:var(--sxl-app-color-warning-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .warning .dark{fill:var(--sxl-app-color-warning-dark)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error{fill:var(--sxl-app-color-error)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .light{fill:var(--sxl-app-color-error-light)}._sheetxl-theme_4opcr_2 svg._themed_4opcr_4 .error .dark{fill:var(--sxl-app-color-error-dark)}._sheetxl-workbook_g5t6x_5{display:flex;position:relative;overflow:hidden;flex-direction:column;width:100%;height:100%;min-width:0;min-height:0;outline:none}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer{background-color:var(--sxl-app-color-grey, grey)}._sheetxl-workbook_g5t6x_5 .splitPane .styled-resizer:hover,._sheetxl-workbook_g5t6x_5 .splitPane.dragging .styled-resizer{background-color:var(--sxl-app-color-primary, blue)}._card_1a398_7{width:100%}._actionRoot_1a398_11{padding:8px 8px 8px 16px;justify-content:space-between}._icons_1a398_16{margin-left:auto;display:flex;align-items:center}._expand_1a398_22{padding:8px;transform:rotate(0);color:#d32f2f;transition:all .2s ease-in-out}._expandOpen_1a398_29{transform:rotate(180deg)}._stackTraceContainer_1a398_33{padding:16px}._paper_1a398_37{background-color:#fff;padding:16px}._checkIcon_1a398_42{font-size:20px;padding-right:4px}._button_1a398_47{padding:0;text-transform:none}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
2
|
import { LicenseManager as t } from "@sheetxl/sdk";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { DefaultTaskPaneRegistry as n, useModelListener as s, useRangeListener as m } from "@sheetxl/react";
|
|
4
|
+
import { A as r, Y as u, B as d, L as C, Q as B, k as i, $ as S, p, Z as k, X as P, a0 as T, D as b, y as F, ap as c, l as y, a8 as g, o as I, a9 as f, h, q as W, i as x, a6 as M, F as w, z as A, H as E, I as L, K as O, J as R, E as v, M as D, a7 as N, N as V, j as z, P as H, w as U, x as G, R as j, ae as q, af as Z, a5 as J, ag as K, n as Q, a4 as X, S as Y, O as _, ad as $, ab as aa, ac as oa, aa as ta, s as ea, T as na, f as sa, a1 as ma, a2 as la, a3 as ra, t as ua, U as da, V as Ca, m as Ba, v as ia, G as Sa, ak as pa, ai as ka, ar as Pa, al as Ta, aj as ba, W as Fa, aq as ca, ao as ya, S as ga, an as Ia, ah as fa, am as ha } from "./CzdBzjYgP1i3pkPL.mjs";
|
|
5
5
|
/**
|
|
6
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
6
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.7
|
|
7
7
|
*
|
|
8
8
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
9
9
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -11,81 +11,79 @@ import { E as r, $ as u, B as l, Q as d, Y as C, m as B, a1 as i, s as p, a0 as
|
|
|
11
11
|
export {
|
|
12
12
|
r as AppearanceCommandButton,
|
|
13
13
|
u as AutoColorPosition,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
d as BorderCommandButton,
|
|
15
|
+
C as BorderPopupButton,
|
|
16
|
+
B as BorderStyleButton,
|
|
17
|
+
i as ClearCommandButton,
|
|
18
|
+
S as ColorButton,
|
|
19
19
|
p as ColorCommandButton,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
k as ColorPanel,
|
|
21
|
+
P as ColorPanelType,
|
|
22
|
+
T as ColorPopupButton,
|
|
23
|
+
n as DefaultTaskPaneRegistry,
|
|
23
24
|
b as DeleteCellsCommandButton,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
F as DocThemeCommandButton,
|
|
26
|
+
c as EagerStudio,
|
|
27
|
+
y as FillCommandButton,
|
|
28
|
+
g as FilterColumnMenu,
|
|
29
|
+
I as FilterCommandButton,
|
|
30
|
+
f as Filters,
|
|
31
|
+
h as FindCommandButton,
|
|
32
|
+
W as FontFamilyCommandButton,
|
|
33
|
+
x as FontSizeCommandButton,
|
|
34
|
+
M as FormulaBar,
|
|
35
|
+
w as FreezeCommandButton,
|
|
36
|
+
A as HelpCommandButton,
|
|
36
37
|
E as HorizontalAlignCommandButton,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
v as InsertScriptCommandButton,
|
|
38
|
+
L as InsertCellsCommandButton,
|
|
39
|
+
O as InsertFunctionCommandPopupButton,
|
|
40
|
+
R as InsertFunctionSumCommandPopupButton,
|
|
41
|
+
v as InsertImageCommandButton,
|
|
42
42
|
t as LicenseManager,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
D as MergeCommandButton,
|
|
44
|
+
N as NamedCollectionEditor,
|
|
45
|
+
V as NamedInput,
|
|
46
|
+
z as NumberFormatCommandButton,
|
|
47
|
+
H as PasteCommandButton,
|
|
48
|
+
U as PresetCellStylesCommandButton,
|
|
49
49
|
G as PresetTableStylesCommandButton,
|
|
50
50
|
j as RangeInput,
|
|
51
|
-
q as
|
|
52
|
-
Z as
|
|
53
|
-
J as
|
|
54
|
-
K as
|
|
55
|
-
Q as
|
|
56
|
-
X as
|
|
57
|
-
Y as
|
|
58
|
-
_ as
|
|
59
|
-
$ as
|
|
60
|
-
aa as
|
|
61
|
-
oa as
|
|
62
|
-
ta as
|
|
63
|
-
ea as
|
|
64
|
-
na as
|
|
65
|
-
sa as
|
|
66
|
-
ma as
|
|
67
|
-
ra as TextRotateCommandButton,
|
|
68
|
-
ua as ThemeSelectButton,
|
|
51
|
+
q as SheetTab,
|
|
52
|
+
Z as SheetTabMenu,
|
|
53
|
+
J as SheetZoomScale,
|
|
54
|
+
K as SheetsAllMenu,
|
|
55
|
+
Q as SortFilterCommandButton,
|
|
56
|
+
X as StatusBar,
|
|
57
|
+
Y as Studio,
|
|
58
|
+
_ as StyledStrokeIcon,
|
|
59
|
+
$ as TableDetailsPanel,
|
|
60
|
+
aa as TableStyleCanvasPreview,
|
|
61
|
+
oa as TableStyleOptionsPanel,
|
|
62
|
+
ta as TableStylePreview,
|
|
63
|
+
ea as TextEffectsCommandButton,
|
|
64
|
+
na as TextOverflowCommandButton,
|
|
65
|
+
sa as TextRotateCommandButton,
|
|
66
|
+
ma as ThemeSelectButton,
|
|
69
67
|
la as ThemeSelectPanel,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
68
|
+
ra as ThemeSelectPopupButton,
|
|
69
|
+
ua as UnderlineCommandButton,
|
|
70
|
+
da as UndoRedoCommandButton,
|
|
71
|
+
Ca as VerticalAlignCommandButton,
|
|
72
|
+
Ba as ViewGridLinesCommandButton,
|
|
73
|
+
ia as ViewHeadingsCommandButton,
|
|
74
|
+
Sa as WalkingCopyCommandButton,
|
|
75
|
+
pa as WorkbookContextMenu,
|
|
76
|
+
ka as WorkbookElement,
|
|
77
|
+
Pa as WorkbookIO,
|
|
78
|
+
Ta as WorkbookStrip,
|
|
79
|
+
ba as WorkbookTitle,
|
|
80
|
+
Fa as WorkbookViewCommandButton,
|
|
81
|
+
ca as _WorkbookIO,
|
|
82
|
+
ya as createGridStyleFromMUITheme,
|
|
85
83
|
ga as default,
|
|
86
|
-
|
|
84
|
+
Ia as defaultNewWorkbook,
|
|
87
85
|
fa as setPrintExamplesOnLoad,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
s as useModelListener,
|
|
87
|
+
m as useRangeListener,
|
|
88
|
+
ha as useWorkbookCommands
|
|
91
89
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as P, useMemo as E, useState as h, useCallback as S } from "react";
|
|
3
3
|
import { alpha as C, getOverlayAlpha as O } from "@mui/material/styles";
|
|
4
4
|
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.7
|
|
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.
|
|
12
12
|
*/
|
|
13
|
-
const A = ["Ok", "Cancel"], W =
|
|
13
|
+
const A = ["Ok", "Cancel"], W = P((F) => {
|
|
14
14
|
const { initialComments: k = null, onUpdateComments: u, context: y, onOption: d, onValidateOption: p, onDone: r, options: g = A, defaultOption: c = g?.[0], cancelOption: s = "Cancel", sx: T, ...b } = F, f = E(() => {
|
|
15
15
|
const t = k ?? y?.()?.getComments();
|
|
16
16
|
let o = "";
|
|
@@ -22,7 +22,7 @@ const A = ["Ok", "Cancel"], W = M((F) => {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
return o;
|
|
25
|
-
}, []), [n, v] = h(f), [w, D] = h(!1), x = S(async (t, o) => null, []),
|
|
25
|
+
}, []), [n, v] = h(f), [w, D] = h(!1), x = S(async (t, o) => null, []), B = m(async (t) => {
|
|
26
26
|
const o = n === "" ? [] : n.split(`
|
|
27
27
|
`);
|
|
28
28
|
if (t !== s) {
|
|
@@ -33,7 +33,7 @@ const A = ["Ok", "Cancel"], W = M((F) => {
|
|
|
33
33
|
d?.(t, t === s, t === c), r?.();
|
|
34
34
|
}, [n, u, r, d, c, s]), I = m((t) => {
|
|
35
35
|
v(t.target.value), x(t.target.value, null);
|
|
36
|
-
}, [p]),
|
|
36
|
+
}, [p]), M = m(async (t) => {
|
|
37
37
|
let o = await Promise.resolve(p?.(t));
|
|
38
38
|
try {
|
|
39
39
|
o !== !1 && (o = await x(n, t));
|
|
@@ -41,9 +41,9 @@ const A = ["Ok", "Cancel"], W = M((F) => {
|
|
|
41
41
|
}
|
|
42
42
|
return o ?? !0;
|
|
43
43
|
}, [p, n]);
|
|
44
|
-
return l(z, { title: (f ? "Edit" : "Insert") + " Comments", options: g, onDone: r, onOption: (t) =>
|
|
44
|
+
return l(z, { title: (f ? "Edit" : "Insert") + " Comments", options: g, onDone: r, onOption: (t) => B(t), onValidateOption: M, defaultOption: c, cancelOption: s, autoFocusSel: ".autoFocus", sx: { width: "480px", ...T }, ...b, children: l(V, { sx: { paddingTop: (t) => t.spacing(1), paddingBottom: (t) => t.spacing(0), rowGap: (t) => t.spacing(1), display: "flex", flexDirection: "column" }, children: l($, { sx: { paddingTop: (t) => t.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: l(j, { label: "Comments", placeholder: "Enter a comment.", onFocus: (t) => {
|
|
45
45
|
w || t.target?.select(), D(!0);
|
|
46
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (t) => t.spacing(0.5) } },
|
|
46
|
+
}, sx: { "& .MuiFormHelperText-root": { marginTop: (t) => t.spacing(0.5) } }, slotProps: { inputLabel: { shrink: !0 }, htmlInput: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (t) => t.spacing(1.25), paddingBottom: (t) => t.spacing(0.75), backgroundImage: `linear-gradient(${C("#fff", O(5))}, ${C("#fff", O(5))})` } } }, value: n, onChange: I, onContextMenu: (t) => {
|
|
47
47
|
t.stopPropagation();
|
|
48
48
|
} }) }) }) });
|
|
49
49
|
});
|