@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
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as E } from "react/jsx-runtime";
|
|
2
|
-
import { memo as j, useMemo as O, useState as m, useCallback as b } from "react";
|
|
3
|
-
import { alpha as l, getOverlayAlpha as p } from "@mui/material/styles";
|
|
4
|
-
import { Box as S, FormControl as D, TextField as F } from "@mui/material";
|
|
5
|
-
import { useCallbackRef as f } from "@sheetxl/utils-react";
|
|
6
|
-
import { OptionsDialog as U } from "@sheetxl/utils-mui";
|
|
7
|
-
/**
|
|
8
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
|
|
9
|
-
*
|
|
10
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
-
*/
|
|
13
|
-
const V = ["Ok", "Cancel"], Q = j((P) => {
|
|
14
|
-
const { initialHyperlink: t = null, initialDisplay: v = null, onUpdateHyperlink: x, context: s, onOption: h, onValidateOption: r, onDone: d, options: y = V, defaultOption: c = y?.[0], cancelOption: i = "Cancel", sx: H, ...I } = P, w = O(() => (t ?? s?.()?.getHyperlink()) !== null, []), k = O(() => {
|
|
15
|
-
let e = null, n = null;
|
|
16
|
-
t && (typeof t == "string" ? n = t : e = t);
|
|
17
|
-
const g = e ?? s?.()?.getHyperlink();
|
|
18
|
-
return { address: n ?? g?.getAddress() ?? "", textToDisplay: g?.getDisplayText() ?? "" };
|
|
19
|
-
}, [t, s]), [a, M] = m(k.address), [u, B] = m(() => {
|
|
20
|
-
const e = s?.().toTextUnformatted() ?? v;
|
|
21
|
-
return e === k.address ? "" : e;
|
|
22
|
-
}), [$, T] = m(!1), A = b((e) => {
|
|
23
|
-
B(e.target.value);
|
|
24
|
-
}, []), C = b(async (e, n) => null, []), L = f(async (e) => {
|
|
25
|
-
e !== i && x?.(a === "" ? null : { address: a }, u), h?.(e, e === i, e === c), d?.();
|
|
26
|
-
}, [a, u, x, d, h, c, i]), W = f((e) => {
|
|
27
|
-
M(e.target.value), C(e.target.value, null);
|
|
28
|
-
}, [r]), z = f(async (e) => {
|
|
29
|
-
let n = await Promise.resolve(r?.(e));
|
|
30
|
-
try {
|
|
31
|
-
n !== !1 && (n = await C(a, e));
|
|
32
|
-
} catch {
|
|
33
|
-
}
|
|
34
|
-
return n ?? !0;
|
|
35
|
-
}, [r]);
|
|
36
|
-
return o(U, { title: (w ? "Edit" : "Insert") + " Link", options: y, onDone: d, onOption: (e) => L(e), onValidateOption: z, defaultOption: c, cancelOption: i, autoFocusSel: ".autoFocus", sx: { width: "480px", ...H }, ...I, children: E(S, { sx: { paddingTop: (e) => e.spacing(1), paddingBottom: (e) => e.spacing(0), rowGap: (e) => e.spacing(1), display: "flex", flexDirection: "column" }, children: [o(D, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(F, { label: "Address", placeholder: "Enter a url or cell reference.", onFocus: (e) => {
|
|
37
|
-
$ || e.target?.select(), T(!0);
|
|
38
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: a, onChange: W, onContextMenu: (e) => {
|
|
39
|
-
e.stopPropagation();
|
|
40
|
-
} }) }), o(D, { sx: { paddingTop: (e) => e.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: o(F, { label: "Display Text", placeholder: a?.startsWith("#") ? a.substring(1) : a, onFocus: () => {
|
|
41
|
-
T(!0);
|
|
42
|
-
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { spellCheck: !1, autoComplete: "off", sx: { paddingTop: (e) => e.spacing(1.25), paddingBottom: (e) => e.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", p(5))}, ${l("#fff", p(5))})` } } }, value: u, onChange: A, onContextMenu: (e) => {
|
|
43
|
-
e.stopPropagation();
|
|
44
|
-
} }) })] }) });
|
|
45
|
-
});
|
|
46
|
-
export {
|
|
47
|
-
Q as HyperlinkDialog,
|
|
48
|
-
Q as default
|
|
49
|
-
};
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { memo as ie, useRef as C, useState as b, useEffect as D, useLayoutEffect as ce, useMemo as pe } from "react";
|
|
3
|
-
import { alpha as I, getOverlayAlpha as k } from "@mui/material/styles";
|
|
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
|
-
import { ICell as c, IRange as R } from "@sheetxl/sdk";
|
|
7
|
-
import { useCallbackRef as $, KeyCodes as be, KeyModifiers as y } from "@sheetxl/utils-react";
|
|
8
|
-
import { InternalWindow as Te, ExhibitOptionButton as m, themeIcon as x, FindOptionsIcon as ve, FindReplaceToggleIcon as Re, FindCaseSensitiveIcon as Ie, FindWholeWordIcon as ke, FindRegExIcon as Fe, FindReplaceIcon as we, FindReplaceAllIcon as Ee, ExhibitDivider as Se } from "@sheetxl/utils-mui";
|
|
9
|
-
import { u as De } from "./CGVa4zFRRZyFzDvh.mjs";
|
|
10
|
-
/**
|
|
11
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
|
|
12
|
-
*
|
|
13
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
14
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
15
|
-
*/
|
|
16
|
-
const L = ie((F) => {
|
|
17
|
-
const { label: h, value: a, options: l, onSelect: d, tabIndex: T = 0, ...A } = F, [K, v] = b(() => te(a, l));
|
|
18
|
-
D(() => {
|
|
19
|
-
v(te(a, l));
|
|
20
|
-
}, [a, l]);
|
|
21
|
-
const P = $((u) => {
|
|
22
|
-
v(u.target.value), d?.(l[u.target.value]);
|
|
23
|
-
}, [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: K, label: h, onChange: P, sx: { backgroundImage: `linear-gradient(${I("#fff", k(5))}, ${I("#fff", k(5))})` }, ...A, children: s })] });
|
|
25
|
-
}), 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
|
-
delete le.Values;
|
|
27
|
-
const Ae = { "By Rows": !0, "By Columns": !1 }, te = (F, h) => {
|
|
28
|
-
const a = Object.keys(h);
|
|
29
|
-
for (let l = 0; l < a.length; l++) {
|
|
30
|
-
const d = a[l];
|
|
31
|
-
if (h[d] === F) return d;
|
|
32
|
-
}
|
|
33
|
-
}, Ne = ie((F) => {
|
|
34
|
-
const { replace: h = !1, findText: a, replaceText: l, findOptions: d, replaceOptions: T, title: A, onHide: K, onFindOrReplace: v, ...P } = F, s = C(null), u = C(null), V = C(null), j = C(null), N = C(null), H = C(null), z = (e, n) => {
|
|
35
|
-
n && (n.start(e, { center: !1 }), setTimeout(() => n.stop(e), 180));
|
|
36
|
-
}, [U, S] = b(!1), [M, se] = b(!1), [f, B] = b(h), [X, W] = b(!1), [G, 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 }), w = $(async (e, n, t, E) => {
|
|
37
|
-
if (!v) return;
|
|
38
|
-
const g = { ...o };
|
|
39
|
-
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: E, ...g });
|
|
41
|
-
W(ae === 0);
|
|
42
|
-
}, [o, v]);
|
|
43
|
-
D(() => {
|
|
44
|
-
W(!1);
|
|
45
|
-
}, [o, M, f]);
|
|
46
|
-
const J = $((e, n) => {
|
|
47
|
-
if (e.keyCode === be.Enter) {
|
|
48
|
-
if (!o.findText) return;
|
|
49
|
-
let t = !0, E = !1;
|
|
50
|
-
e.shiftKey && (t = !1), n ? (e.ctrlKey && e.altKey && (E = !0), z(e, E ? H.current : N.current)) : z(e, t ? j.current : V.current), w(t, n, E, !1);
|
|
51
|
-
}
|
|
52
|
-
}, [o]), Q = C(null);
|
|
53
|
-
ce(() => {
|
|
54
|
-
r((e) => {
|
|
55
|
-
const n = { ...e };
|
|
56
|
-
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
|
-
const t = !(!T && l === void 0);
|
|
58
|
-
return t && B(t), n;
|
|
59
|
-
}), G || Q.current?.focus();
|
|
60
|
-
}, [a, l, d, T]), D(() => {
|
|
61
|
-
f ? (o.findOptions.fields[0], c.Content.Values) : S(!0);
|
|
62
|
-
}, [f]), D(() => {
|
|
63
|
-
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
|
-
s.current?.select(), S(!1);
|
|
65
|
-
}, { once: !0 });
|
|
66
|
-
}, [U, o]);
|
|
67
|
-
const [re, { width: Y }] = De();
|
|
68
|
-
return i(Te, { ref: Q, title: A ?? (f ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: K, onFocus: () => q(!0), onBlur: () => {
|
|
69
|
-
q(!1), W(!1);
|
|
70
|
-
}, PaperProps: { elevation: G ? 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) => {
|
|
71
|
-
if (e.key === "h" && e.ctrlKey) B(!0), s.current?.contains(document.activeElement) && u.current?.focus();
|
|
72
|
-
else if (e.key === "f" && e.ctrlKey) s.current?.focus();
|
|
73
|
-
else if (e.key === "c" && e.altKey) r((n) => {
|
|
74
|
-
const t = { ...n };
|
|
75
|
-
return t.findOptions.matchCase = !n.findOptions.matchCase, t;
|
|
76
|
-
});
|
|
77
|
-
else if (e.key === "e" && e.altKey) r((n) => {
|
|
78
|
-
const t = { ...n };
|
|
79
|
-
return t.findOptions.matchEntireCell = !n.findOptions.matchEntireCell, t;
|
|
80
|
-
});
|
|
81
|
-
else {
|
|
82
|
-
if (e.key !== "r" || !e.altKey) return;
|
|
83
|
-
r((n) => {
|
|
84
|
-
const t = { ...n };
|
|
85
|
-
return t.findOptions.useRegex = !n.findOptions.useRegex, t;
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
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(m, { selected: M, onSelectToggle: (e) => {
|
|
90
|
-
se(e);
|
|
91
|
-
}, preventFocus: !0, label: "Toggle Additional Options", icon: x(i(ve, {})) }), i(m, { selected: f, onSelectToggle: (e) => {
|
|
92
|
-
B(e);
|
|
93
|
-
}, preventFocus: !0, label: "Toggle Replace", icon: x(i(Re, {})), shortcut: { key: f ? "F" : "H", modifiers: [y.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(${I("#fff", k(5))}, ${I("#fff", k(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(m, { selected: o.findOptions.matchCase, onSelectToggle: (e) => {
|
|
94
|
-
r((n) => {
|
|
95
|
-
const t = { ...n };
|
|
96
|
-
return t.findOptions.matchCase = e, t;
|
|
97
|
-
});
|
|
98
|
-
}, label: "Match Case", shortcut: { key: "C", modifiers: [y.Alt] }, icon: x(i(Ie, {})) }), i(m, { selected: o.findOptions.matchEntireCell, onSelectToggle: (e) => {
|
|
99
|
-
r((n) => {
|
|
100
|
-
const t = { ...n };
|
|
101
|
-
return t.findOptions.matchEntireCell = e, t;
|
|
102
|
-
});
|
|
103
|
-
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [y.Alt] }, icon: x(i(ke, {})) }), i(m, { selected: o.findOptions.useRegex, onSelectToggle: (e) => {
|
|
104
|
-
r((n) => {
|
|
105
|
-
const t = { ...n };
|
|
106
|
-
return t.findOptions.useRegex = e, t;
|
|
107
|
-
});
|
|
108
|
-
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [y.Alt] }, icon: x(i(Fe, {})) })] }) }) }, sx: { flex: "1 1 100%", marginRight: (e) => e.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e) => X ? `${e.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e) => X ? `${e.palette.error.main} !important` : void 0 } }, value: o.findText ?? "", onChange: (e) => {
|
|
109
|
-
r((n) => {
|
|
110
|
-
const t = { ...n };
|
|
111
|
-
return t.findText = e.target.value, t;
|
|
112
|
-
});
|
|
113
|
-
}, onKeyDown: (e) => J(e, !1), onContextMenu: (e) => {
|
|
114
|
-
e.stopPropagation();
|
|
115
|
-
} }), i(m, { selected: o.findOptions.reverse, onSelectToggle: (e) => {
|
|
116
|
-
w(!1, !1);
|
|
117
|
-
}, touchRippleRef: V, label: "", shortcut: { key: "Enter", modifiers: [y.Shift] }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(he, {}) : i(Oe, {})), disabled: !o.findText }), i(m, { selected: !o.findOptions.reverse, onSelectToggle: (e) => {
|
|
118
|
-
w(!0, !1);
|
|
119
|
-
}, touchRippleRef: j, label: "Next Match", shortcut: { key: "Enter" }, icon: x(o.findOptions.orientation !== R.Orientation.Column ? i(Ce, {}) : i(ye, {})), disabled: !o.findText })] }), i(_, { in: f, timeout: ne, onExit: () => {
|
|
120
|
-
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(${I("#fff", k(5))}, ${I("#fff", k(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
|
-
r((n) => {
|
|
123
|
-
const t = { ...n };
|
|
124
|
-
return t.replaceText = e.target.value, t;
|
|
125
|
-
});
|
|
126
|
-
}, onKeyDown: (e) => J(e, !0), onContextMenu: (e) => {
|
|
127
|
-
e.stopPropagation();
|
|
128
|
-
} }), i(m, { onSelectToggle: (e) => {
|
|
129
|
-
w(!0, !0);
|
|
130
|
-
}, touchRippleRef: N, label: "Replace", shortcut: { key: "Enter" }, icon: x(i(we, {})), disabled: !o.findText }), i(m, { onSelectToggle: (e) => {
|
|
131
|
-
w(!0, !0, !0);
|
|
132
|
-
}, touchRippleRef: H, label: "Replace All", shortcut: { key: "Enter", modifiers: [y.Ctrl, y.Alt] }, icon: x(i(Ee, {})), disabled: !o.findText })] }) })] })] }), i(_, { in: M, timeout: ne, onExit: () => {
|
|
133
|
-
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(Se, { 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(L, { label: "Within", value: o.scope, options: ee, onSelect: (e) => {
|
|
135
|
-
r((n) => {
|
|
136
|
-
const t = { ...n };
|
|
137
|
-
return t.scope = e, t;
|
|
138
|
-
});
|
|
139
|
-
} }), i(L, { label: "Search", value: o.findOptions.orientation !== R.Orientation.Column, options: Ae, onSelect: (e) => {
|
|
140
|
-
r((n) => {
|
|
141
|
-
const t = { ...n };
|
|
142
|
-
return t.findOptions.orientation = e ? R.Orientation.Row : R.Orientation.Column, t;
|
|
143
|
-
});
|
|
144
|
-
} }), i(L, { 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
|
-
r((n) => {
|
|
146
|
-
const t = { ...n };
|
|
147
|
-
return t.findOptions.fields = [e], t;
|
|
148
|
-
});
|
|
149
|
-
} })] })] }) })] }) });
|
|
150
|
-
});
|
|
151
|
-
export {
|
|
152
|
-
Ne as FindReplaceWindow,
|
|
153
|
-
ee as ScopeOptions,
|
|
154
|
-
Ne as default
|
|
155
|
-
};
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
8
|
-
import { memo as n, useRef as i, useState as o, useEffect as l, useLayoutEffect as r, useMemo as s } from "react";
|
|
9
|
-
import { useMeasure as a } from "react-use";
|
|
10
|
-
import { alpha as c, getOverlayAlpha as p } from "@mui/material/styles";
|
|
11
|
-
import { DialogContent as d, Box as u, TextField as f, InputAdornment as m, Collapse as g, MenuItem as x, FormControl as h, InputLabel as O, Select as C } from "@mui/material";
|
|
12
|
-
import { ArrowBack as y, ArrowUpward as b, ArrowForward as T, ArrowDownward as v } from "@mui/icons-material";
|
|
13
|
-
import { ICell as k, IRange as R } from "@sheetxl/sdk";
|
|
14
|
-
import { useCallbackRef as E, KeyCodes as S, KeyModifiers as F } from "@sheetxl/utils-react";
|
|
15
|
-
import { InternalWindow as I, ExhibitOptionButton as w, themeIcon as D, FindOptionsIcon as P, FindReplaceToggleIcon as K, FindCaseSensitiveIcon as $, FindWholeWordIcon as A, FindRegExIcon as M, FindReplaceIcon as B, FindReplaceAllIcon as L, ExhibitDivider as V } from "@sheetxl/utils-mui";
|
|
16
|
-
const N = n((n2) => {
|
|
17
|
-
const { label: i2, value: r2, options: a2, onSelect: d2, tabIndex: u2 = 0, ...f2 } = n2, [m2, g2] = o(() => U(r2, a2));
|
|
18
|
-
l(() => {
|
|
19
|
-
g2(U(r2, a2));
|
|
20
|
-
}, [r2, a2]);
|
|
21
|
-
const y2 = E((e2) => {
|
|
22
|
-
g2(e2.target.value), d2?.(a2[e2.target.value]);
|
|
23
|
-
}, [d2, a2]), b2 = s(() => Object.keys(a2).map((t2) => e(x, { value: t2, children: t2 }, t2)), [a2]);
|
|
24
|
-
return t(h, { sx: { minWidth: 135 }, size: "small", children: [e(O, { children: i2 }), e(C, { inputProps: { tabIndex: u2 }, value: m2, label: i2, onChange: y2, sx: { backgroundImage: `linear-gradient(${c("#fff", p(5))}, ${c("#fff", p(5))})` }, ...f2, children: b2 })] });
|
|
25
|
-
}), W = { Workbook: "workbook", Sheet: "sheet" }, j = { enter: 140, exit: 140 }, H = { Formulas: k.Content.Formulas, Values: k.Content.Values, Notes: k.Content.Notes, Comments: k.Content.Comments }, z = { ...H };
|
|
26
|
-
delete z.Values;
|
|
27
|
-
const G = { "By Rows": true, "By Columns": false }, U = (e2, t2) => {
|
|
28
|
-
const n2 = Object.keys(t2);
|
|
29
|
-
for (let i2 = 0; i2 < n2.length; i2++) {
|
|
30
|
-
const o2 = n2[i2];
|
|
31
|
-
if (t2[o2] === e2) return o2;
|
|
32
|
-
}
|
|
33
|
-
}, X = n((n2) => {
|
|
34
|
-
const { replace: s2 = false, findText: x2, replaceText: h2, findOptions: O2, replaceOptions: C2, title: U2, onHide: X2, onFindOrReplace: q, ...J } = n2, Q = i(null), Y = i(null), Z = i(null), _ = i(null), ee = i(null), te = i(null), ne = (e2, t2) => {
|
|
35
|
-
if (!t2) return;
|
|
36
|
-
t2.start(e2, { center: false }), setTimeout(() => t2.stop(e2), 180);
|
|
37
|
-
}, [ie, oe] = o(false), [le, re] = o(false), [se, ae] = o(s2), [ce, pe] = o(false), [de, ue] = o(false), [fe, me] = o({ findText: null, replaceText: null, replace: s2, replaceOptions: {}, findOptions: { matchCase: false, matchEntireCell: false, useRegex: false, orientation: R.Orientation.Row, fields: [k.Content.Formulas] }, scope: W.Sheet }), ge = E(async (e2, t2, n3, i2) => {
|
|
38
|
-
if (!q) return;
|
|
39
|
-
const o2 = { ...fe };
|
|
40
|
-
o2.replaceOptions = { ...o2.replaceOptions }, o2.findOptions = { ...o2.findOptions }, o2.replaceOptions.maxCount = n3 ? void 0 : 1, o2.replace = t2, t2 && fe.findOptions.fields?.[0] === k.Content.Values && (o2.findOptions.fields = [k.Content.Formulas]), o2.findOptions.reverse = !e2;
|
|
41
|
-
const l2 = await q({ autoFocus: i2, ...o2 });
|
|
42
|
-
pe(0 === l2);
|
|
43
|
-
}, [fe, q]);
|
|
44
|
-
l(() => {
|
|
45
|
-
pe(false);
|
|
46
|
-
}, [fe, le, se]);
|
|
47
|
-
const xe = E((e2, t2) => {
|
|
48
|
-
if (e2.keyCode === S.Enter) {
|
|
49
|
-
if (!fe.findText) return;
|
|
50
|
-
let n3 = true, i2 = false;
|
|
51
|
-
e2.shiftKey && (n3 = false), t2 ? (e2.ctrlKey && e2.altKey && (i2 = true), ne(e2, i2 ? te.current : ee.current)) : ne(e2, n3 ? _.current : Z.current), ge(n3, t2, i2, false);
|
|
52
|
-
}
|
|
53
|
-
}, [fe]), he = i(null);
|
|
54
|
-
r(() => {
|
|
55
|
-
me((e2) => {
|
|
56
|
-
const t2 = { ...e2 };
|
|
57
|
-
t2.findText = x2 && x2.length > 0 ? x2 : e2.findText ?? "", oe(true), void 0 !== h2 && (t2.replaceText = h2), O2 && (t2.findOptions = { ...t2.findOptions, ...O2 }), t2.replaceText || (t2.replaceText = ""), t2.replaceOptions && (t2.replaceOptions = { ...t2.replaceOptions }), C2 && (t2.replaceOptions = { ...t2.replaceOptions, ...C2 }), fe.findOptions.fields?.[0] || (fe.findOptions.fields = [k.Content.Formulas]);
|
|
58
|
-
const n3 = !(!C2 && void 0 === h2);
|
|
59
|
-
return n3 && ae(n3), t2;
|
|
60
|
-
}), de || he.current?.focus();
|
|
61
|
-
}, [x2, h2, O2, C2]), l(() => {
|
|
62
|
-
se ? (fe.findOptions.fields[0], k.Content.Values) : oe(true);
|
|
63
|
-
}, [se]), l(() => {
|
|
64
|
-
if (ie && Q.current && fe.findText === Q.current.value) return Q.current === document.activeElement || Q.current.contains(document.activeElement) ? (Q.current?.select(), void oe(false)) : void Q.current.addEventListener("focus", () => {
|
|
65
|
-
Q.current?.select(), oe(false);
|
|
66
|
-
}, { once: true });
|
|
67
|
-
}, [ie, fe]);
|
|
68
|
-
const [Oe, { width: Ce }] = a();
|
|
69
|
-
return e(I, { ref: he, title: U2 ?? (se ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: X2, onFocus: () => ue(true), onBlur: () => {
|
|
70
|
-
ue(false), pe(false);
|
|
71
|
-
}, PaperProps: { elevation: de ? 3 : 1 }, ...J, children: t(d, { dividers: true, ref: Oe, sx: { display: "flex", flexDirection: "column", paddingLeft: (e2) => e2.spacing(1.5), paddingRight: (e2) => e2.spacing(1.5) }, onKeyDown: (e2) => {
|
|
72
|
-
if ("h" === e2.key && e2.ctrlKey) ae(true), Q.current?.contains(document.activeElement) && Y.current?.focus();
|
|
73
|
-
else if ("f" === e2.key && e2.ctrlKey) Q.current?.focus();
|
|
74
|
-
else if ("c" === e2.key && e2.altKey) me((e3) => {
|
|
75
|
-
const t2 = { ...e3 };
|
|
76
|
-
return t2.findOptions.matchCase = !e3.findOptions.matchCase, t2;
|
|
77
|
-
});
|
|
78
|
-
else if ("e" === e2.key && e2.altKey) me((e3) => {
|
|
79
|
-
const t2 = { ...e3 };
|
|
80
|
-
return t2.findOptions.matchEntireCell = !e3.findOptions.matchEntireCell, t2;
|
|
81
|
-
});
|
|
82
|
-
else {
|
|
83
|
-
if ("r" !== e2.key || !e2.altKey) return;
|
|
84
|
-
me((e3) => {
|
|
85
|
-
const t2 = { ...e3 };
|
|
86
|
-
return t2.findOptions.useRegex = !e3.findOptions.useRegex, t2;
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
e2.preventDefault();
|
|
90
|
-
}, children: [t(u, { sx: { display: "flex", flexDirection: "row", gap: (e2) => e2.spacing(1) }, children: [t(u, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e2) => e2.spacing(0.25), paddingTop: "3px" }, children: [e(w, { selected: le, onSelectToggle: (e2) => {
|
|
91
|
-
re(e2);
|
|
92
|
-
}, preventFocus: true, label: "Toggle Additional Options", icon: D(e(P, {})) }), e(w, { selected: se, onSelectToggle: (e2) => {
|
|
93
|
-
ae(e2);
|
|
94
|
-
}, preventFocus: true, label: "Toggle Replace", icon: D(e(K, {})), shortcut: { key: se ? "F" : "H", modifiers: [F.Ctrl] } })] }), t(u, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [t(u, { sx: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [e(f, { label: "Find", InputLabelProps: { shrink: true }, InputProps: { sx: { paddingRight: (e2) => e2.spacing(1), minWidth: Ce > 460 ? "20em" : void 0, backgroundImage: `linear-gradient(${c("#fff", p(5))}, ${c("#fff", p(5))})` }, inputProps: { draggable: false, ref: Q, className: "input", autoFocus: true, spellCheck: false, autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1.25), paddingBottom: (e2) => e2.spacing(0.75) } }, endAdornment: e(m, { sx: { transform: "scale(0.75) translateX(16px)" }, position: "end", children: t(u, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "1px" }, children: [e(w, { selected: fe.findOptions.matchCase, onSelectToggle: (e2) => {
|
|
95
|
-
me((t2) => {
|
|
96
|
-
const n3 = { ...t2 };
|
|
97
|
-
return n3.findOptions.matchCase = e2, n3;
|
|
98
|
-
});
|
|
99
|
-
}, label: "Match Case", shortcut: { key: "C", modifiers: [F.Alt] }, icon: D(e($, {})) }), e(w, { selected: fe.findOptions.matchEntireCell, onSelectToggle: (e2) => {
|
|
100
|
-
me((t2) => {
|
|
101
|
-
const n3 = { ...t2 };
|
|
102
|
-
return n3.findOptions.matchEntireCell = e2, n3;
|
|
103
|
-
});
|
|
104
|
-
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [F.Alt] }, icon: D(e(A, {})) }), e(w, { selected: fe.findOptions.useRegex, onSelectToggle: (e2) => {
|
|
105
|
-
me((t2) => {
|
|
106
|
-
const n3 = { ...t2 };
|
|
107
|
-
return n3.findOptions.useRegex = e2, n3;
|
|
108
|
-
});
|
|
109
|
-
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [F.Alt] }, icon: D(e(M, {})) })] }) }) }, sx: { flex: "1 1 100%", marginRight: (e2) => e2.spacing(1), "& .MuiOutlinedInput-notchedOutline": { borderColor: (e2) => ce ? `${e2.palette.error.main} !important` : void 0 }, "& .MuiInputLabel-outlined": { color: (e2) => ce ? `${e2.palette.error.main} !important` : void 0 } }, value: fe.findText ?? "", onChange: (e2) => {
|
|
110
|
-
me((t2) => {
|
|
111
|
-
const n3 = { ...t2 };
|
|
112
|
-
return n3.findText = e2.target.value, n3;
|
|
113
|
-
});
|
|
114
|
-
}, onKeyDown: (e2) => xe(e2, false), onContextMenu: (e2) => {
|
|
115
|
-
e2.stopPropagation();
|
|
116
|
-
} }), e(w, { selected: fe.findOptions.reverse, onSelectToggle: (e2) => {
|
|
117
|
-
ge(false, false);
|
|
118
|
-
}, touchRippleRef: Z, label: "", shortcut: { key: "Enter", modifiers: [F.Shift] }, icon: D(fe.findOptions.orientation !== R.Orientation.Column ? e(y, {}) : e(b, {})), disabled: !fe.findText }), e(w, { selected: !fe.findOptions.reverse, onSelectToggle: (e2) => {
|
|
119
|
-
ge(true, false);
|
|
120
|
-
}, touchRippleRef: _, label: "Next Match", shortcut: { key: "Enter" }, icon: D(fe.findOptions.orientation !== R.Orientation.Column ? e(T, {}) : e(v, {})), disabled: !fe.findText })] }), e(g, { in: se, timeout: j, onExit: () => {
|
|
121
|
-
Q.current?.focus();
|
|
122
|
-
}, children: t(u, { sx: { display: "flex", flexDirection: "row", alignItems: "center", marginTop: (e2) => e2.spacing(2) }, children: [e(f, { label: "Replace", InputLabelProps: { shrink: true }, InputProps: { sx: { paddingRight: (e2) => e2.spacing(1), backgroundImage: `linear-gradient(${c("#fff", p(5))}, ${c("#fff", p(5))})` }, inputProps: { ref: Y, className: "input", spellCheck: false, autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1.25), paddingBottom: (e2) => e2.spacing(0.75) } } }, sx: { flex: "1 1 100%", marginRight: (e2) => e2.spacing(1) }, value: fe.replaceText ?? "", onChange: (e2) => {
|
|
123
|
-
me((t2) => {
|
|
124
|
-
const n3 = { ...t2 };
|
|
125
|
-
return n3.replaceText = e2.target.value, n3;
|
|
126
|
-
});
|
|
127
|
-
}, onKeyDown: (e2) => xe(e2, true), onContextMenu: (e2) => {
|
|
128
|
-
e2.stopPropagation();
|
|
129
|
-
} }), e(w, { onSelectToggle: (e2) => {
|
|
130
|
-
ge(true, true);
|
|
131
|
-
}, touchRippleRef: ee, label: "Replace", shortcut: { key: "Enter" }, icon: D(e(B, {})), disabled: !fe.findText }), e(w, { onSelectToggle: (e2) => {
|
|
132
|
-
ge(true, true, true);
|
|
133
|
-
}, touchRippleRef: te, label: "Replace All", shortcut: { key: "Enter", modifiers: [F.Ctrl, F.Alt] }, icon: D(e(L, {})), disabled: !fe.findText })] }) })] })] }), e(g, { in: le, timeout: j, onExit: () => {
|
|
134
|
-
Q.current?.focus();
|
|
135
|
-
}, children: t(u, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e2) => e2.spacing(0.5), marginTop: (e2) => e2.spacing(1) }, children: [e(V, { orientation: "horizontal", sx: { marginBottom: (e2) => e2.spacing(1.5) } }), t(u, { sx: { display: "flex", flexDirection: Ce >= 413 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", rowGap: (e2) => e2.spacing(2) }, tabIndex: -1, children: [e(N, { label: "Within", value: fe.scope, options: W, onSelect: (e2) => {
|
|
136
|
-
me((t2) => {
|
|
137
|
-
const n3 = { ...t2 };
|
|
138
|
-
return n3.scope = e2, n3;
|
|
139
|
-
});
|
|
140
|
-
} }), e(N, { label: "Search", value: fe.findOptions.orientation !== R.Orientation.Column, options: G, onSelect: (e2) => {
|
|
141
|
-
me((t2) => {
|
|
142
|
-
const n3 = { ...t2 };
|
|
143
|
-
return n3.findOptions.orientation = e2 ? R.Orientation.Row : R.Orientation.Column, n3;
|
|
144
|
-
});
|
|
145
|
-
} }), e(N, { label: "Look in", value: se && fe.findOptions.fields?.[0] === k.Content.Values ? k.Content.Formulas : fe.findOptions.fields?.[0], options: se ? z : H, onSelect: (e2) => {
|
|
146
|
-
me((t2) => {
|
|
147
|
-
const n3 = { ...t2 };
|
|
148
|
-
return n3.findOptions.fields = [e2], n3;
|
|
149
|
-
});
|
|
150
|
-
} })] })] }) })] }) });
|
|
151
|
-
});
|
|
152
|
-
export {
|
|
153
|
-
X as FindReplaceWindow,
|
|
154
|
-
W as ScopeOptions,
|
|
155
|
-
X as default
|
|
156
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.5
|
|
3
|
-
*
|
|
4
|
-
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
-
*/
|
|
7
|
-
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
8
|
-
import { memo as o, useState as n, useRef as i, useReducer as a, useMemo as l } from "react";
|
|
9
|
-
import { useMeasure as r } from "react-use";
|
|
10
|
-
import { DialogContent as s, Box as c } from "@mui/material";
|
|
11
|
-
import { useCommand as d, useCallbackRef as m, useNotifier as g, CommandButtonType as p } from "@sheetxl/utils-react";
|
|
12
|
-
import { InternalWindow as h, ExhibitDivider as u, CommandButton as x, themeIcon as f, InsertTableIcon as y } from "@sheetxl/utils-mui";
|
|
13
|
-
import { useModelListener as b } from "@sheetxl/react";
|
|
14
|
-
import { NamedInput as w, RangeInput as S, TableStyleOptionsPanel as C, TableStylePreview as N } from "./index.mjs";
|
|
15
|
-
const v = o((o2) => {
|
|
16
|
-
const { title: v2, onHide: R, autoFocusSel: T = ".range-input input", context: F, command: D, commands: H, ...B } = o2, [I, P] = n(false), [j, z] = n(false), L = i(null), [O, E] = a((e2) => e2 + 1, 0), [A, { width: M }] = r();
|
|
17
|
-
d(D);
|
|
18
|
-
const V = F ?? D.context(), W = V.table(), [k, q] = n(() => W ? V.getNames().getRanges(W.getRange()) : null), G = l(() => W?.getName() ?? "", [W]);
|
|
19
|
-
b(V.table(), { onAnchorCoordsChange(e2) {
|
|
20
|
-
q(V.getNames().getRanges(e2.getRange()));
|
|
21
|
-
}, onProtectedChange(e2) {
|
|
22
|
-
E();
|
|
23
|
-
} });
|
|
24
|
-
const J = m((e2) => {
|
|
25
|
-
V?.table().setName(e2);
|
|
26
|
-
}, [V]), K = m((e2) => {
|
|
27
|
-
V?.table().resize(e2.at(0));
|
|
28
|
-
}, [V]);
|
|
29
|
-
let Q = null;
|
|
30
|
-
V.table() || (Q = e("div", { style: { position: "absolute", top: "0", left: "0", width: "100%", height: "100%", opacity: 1, display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center", boxSizing: "border-box" }, children: e("div", { children: "No table selected" }) }));
|
|
31
|
-
const U = g();
|
|
32
|
-
return e(h, { ref: L, title: v2 ?? "Table Details", initialPosition: { y: "35" }, autoFocusSel: T, onHide: R, onFocus: () => P(true), onBlur: (e2) => {
|
|
33
|
-
L?.current?.contains(e2.relatedTarget) || P(false);
|
|
34
|
-
}, PaperProps: { elevation: I ? 3 : 1 }, ...B, children: t(s, { dividers: true, ref: A, sx: { display: "flex", flexDirection: "column", position: "relative", paddingLeft: (e2) => e2.spacing(1.5), paddingRight: (e2) => e2.spacing(1.5) }, children: [t(c, { sx: { display: "flex", flexDirection: "column", transition: "opacity 60ms", opacity: V.table() ? 1 : 0 }, children: [e(c, { sx: { display: "flex", flexDirection: "row", gap: (e2) => e2.spacing(1) }, children: e(c, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingLeft: (e2) => e2.spacing(2), paddingRight: (e2) => e2.spacing(2) }, children: t(c, { sx: { display: "flex", flexDirection: "column", alignItems: "center" }, children: [e(w, { formName: "name", defaultInput: G, value: W?.getName() ?? "No table", onChangeInput: J, onValidate: (e2) => {
|
|
35
|
-
W && W.getName().toLowerCase() === e2.toLowerCase() || V?.getNames().validateName(e2);
|
|
36
|
-
}, disabled: W?.isProtected() ?? true, onFocus: (e2) => {
|
|
37
|
-
j || e2.target?.select(), z(true);
|
|
38
|
-
} }), e(S, { formName: "range", value: k, onChangeInput: K, resolvedAddress: V.getNames().getRanges.bind(V.getNames()), disabled: W?.isProtected() ?? true, onFocus: (e2) => {
|
|
39
|
-
j || e2.target?.select(), z(true);
|
|
40
|
-
} })] }) }) }), t(c, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", gap: (e2) => e2.spacing(0.5), marginTop: (e2) => e2.spacing(1) }, children: [e(u, { orientation: "horizontal", sx: { marginTop: (e2) => e2.spacing(1.5), marginBottom: (e2) => e2.spacing(0.75) } }), e(C, { disabled: W?.isProtected(), styleOptions: W?.getStyleOptions() ?? null, onStyleOptionsChange: (e2) => {
|
|
41
|
-
W.updateStyleOptions(e2);
|
|
42
|
-
}, showHeaderRow: W?.getShowHeaders(), onShowHeaderRowChange: (e2) => {
|
|
43
|
-
try {
|
|
44
|
-
W.setShowHeaders(e2);
|
|
45
|
-
} catch (e3) {
|
|
46
|
-
U.showError(e3);
|
|
47
|
-
}
|
|
48
|
-
}, showTotalRow: W?.getShowTotals(), onShowTotalRowChange: (e2) => {
|
|
49
|
-
try {
|
|
50
|
-
W.setShowTotals(e2);
|
|
51
|
-
} catch (e3) {
|
|
52
|
-
U.showError(e3);
|
|
53
|
-
}
|
|
54
|
-
}, showFilterButton: W?.getFilter() ? W.getShowFilterButton() : null, onShowFilterButtonChange: (e2) => {
|
|
55
|
-
try {
|
|
56
|
-
W.setShowFilterButton(e2);
|
|
57
|
-
} catch (e3) {
|
|
58
|
-
U.showError(e3);
|
|
59
|
-
}
|
|
60
|
-
} }), e(c, { sx: { display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", marginTop: (e2) => e2.spacing(2), marginBottom: (e2) => e2.spacing(1) }, children: e(N, { table: W, styles: V.styles(), bodyStyle: V.bodyStyle(), cellHeight: 30, isLive: true }) }), e(u, { orientation: "horizontal" }), t(c, { sx: { display: "flex", flexDirection: "column", justifyContent: "center" }, children: [e(x, { variant: p.Menuitem, command: H.getCommand("convertTableToRange"), commandState: W, icon: f(e(y, {})) }), e(x, { variant: p.Menuitem, commandState: W, command: H.getCommand("deleteTable"), icon: f(e(y, {})) })] })] })] }), Q] }) });
|
|
61
|
-
});
|
|
62
|
-
export {
|
|
63
|
-
v as TableDetailsWindow,
|
|
64
|
-
v as default
|
|
65
|
-
};
|