@sheetxl/studio-mui 0.4.10 → 0.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/B7qLzxylqOaybl3H.cjs +7 -0
- package/browser/cjs/BNGixOiIsu8jZlvn.cjs +7 -0
- package/browser/cjs/BUYxt7KgFkIIIMyc.cjs +7 -0
- package/browser/cjs/Bk6VhhWsnCRyBu2F.cjs +7 -0
- package/browser/cjs/BpiMMYip132x0r1O.cjs +7 -0
- package/browser/cjs/ByZ_Q-J7jgF7AoWR.cjs +7 -0
- package/browser/cjs/BzD7LV8VmFKLAJyW.cjs +7 -0
- package/browser/cjs/C6_zcNM0Efa11KEE.cjs +7 -0
- package/browser/cjs/C8Azx_ZaQa4WvAtR.cjs +7 -0
- package/browser/cjs/CITvaW7L_iZfIyAN.cjs +7 -0
- package/browser/cjs/CNDDYOoLCrGsUMYL.cjs +7 -0
- package/browser/cjs/CYbeY5OVZDqHGSOm.cjs +7 -0
- package/browser/cjs/C_SgucbRn-v9IkNO.cjs +7 -0
- package/browser/cjs/CeTd2nFbE5yFzf7T.cjs +7 -0
- package/browser/cjs/Cfe7IbPNI8-CgoDI.cjs +7 -0
- package/browser/cjs/Ctyk-ajkSsTDJuvY.cjs +7 -0
- package/browser/cjs/DBhTQLbjAtU-A1YA.cjs +7 -0
- package/browser/cjs/Dc2rbOjtcmSIm8D4.cjs +7 -0
- package/browser/cjs/DcsvUmoS8zGG5GB8.cjs +7 -0
- package/browser/cjs/DqAlQQIZIyF7HMib.cjs +7 -0
- package/browser/cjs/DuwawlAm4aRBNTBm.cjs +7 -0
- package/browser/cjs/Dx9UUJj-yeubDjm4.cjs +7 -0
- package/browser/cjs/IC19hB4Ntvw1158j.cjs +7 -0
- package/browser/cjs/index.cjs +10 -4
- package/browser/cjs/reQ9miE5C5qMfbRJ.cjs +7 -0
- package/browser/esm/B1Ey4ZP8BHUzHW7G.mjs +7 -0
- package/browser/esm/B8dJHVZJta8QbNKG.mjs +7 -0
- package/browser/esm/BThbC01mtb7qq8_A.mjs +7 -0
- package/browser/esm/Bnt1M91BRyMvXrc4.mjs +7 -0
- package/browser/esm/BqN0SYrEO0RZQtv-.mjs +7 -0
- package/browser/esm/CHPXsEre3jry2-jF.mjs +7 -0
- package/browser/esm/CMCOU0nDlymDFS9l.mjs +7 -0
- package/browser/esm/Cc7y1nMDr5J8jWx-.mjs +7 -0
- package/browser/esm/CesL-3BNbMB1f_if.mjs +7 -0
- package/browser/esm/CfvNSnuQLa1SPbNL.mjs +7 -0
- package/browser/esm/CloqVDbJmTL4oFek.mjs +7 -0
- package/browser/esm/Cta0yn5UIrP2UoT4.mjs +7 -0
- package/browser/esm/CwRyQHiDoBLx5_1g.mjs +7 -0
- package/browser/esm/DI-ZGstUJFwkx4H6.mjs +7 -0
- package/browser/esm/DQTfmweCXjuIlITn.mjs +7 -0
- package/browser/esm/DUIfOO25d1fqtJzn.mjs +7 -0
- package/browser/esm/DhOXsRr8c7bDS1jM.mjs +7 -0
- package/browser/esm/JPwh2m5-pXkdPVzF.mjs +7 -0
- package/browser/esm/UkNAvQj0NVgeMpUl.mjs +7 -0
- package/browser/esm/ZUfck_LDsQb9gpvU.mjs +7 -0
- package/browser/esm/gHhqkr52cxXkga0T.mjs +7 -0
- package/browser/esm/index.mjs +8 -83
- package/browser/esm/obM68UOvA5HV7Lt1.mjs +7 -0
- package/browser/esm/x9MyDRdLE47dI9dF.mjs +7 -0
- package/browser/esm/yW9jxnamUqAhVQkJ.mjs +7 -0
- package/licenses/dependencies.txt +145 -145
- package/node/esm/{DxbGK6Zl1UgjOa4-.mjs → B3M2CzPvK2oKOfg5.mjs} +2 -2
- package/node/esm/{D9XxEDOFeim_xxQE.mjs → BIRLX0-9t62Lqats.mjs} +2 -2
- package/node/esm/{BmkBQUrL_kkRhzTh.mjs → BJY8yNMmN_yyRtIG.mjs} +1 -1
- package/node/esm/{bMROCCq764fn-xgi.mjs → Bj8uU2shfkvN4LnE.mjs} +6 -6
- package/node/esm/{sAnM1xQCuHDSOmip.mjs → Bt5y5wVaVAVjwHBl.mjs} +1 -1
- package/node/esm/{BPqOHRFTv--y9umX.mjs → C2P_M1JNT_WZZN3H.mjs} +8 -8
- package/node/esm/{CcretMZPKGn3lnR4.mjs → CBGAl2mih9mHDt5w.mjs} +1 -1
- package/node/esm/{Clurk3ikkAHRiukp.mjs → CKtVB9hMCfabQMxC.mjs} +2 -2
- package/node/esm/{Dc--wbPxmu3D8pbK.mjs → CVGxETc4rIE1gNAH.mjs} +38 -38
- package/node/esm/{BGArlD6RNgEObMgD.mjs → CryVonGjJnmo2dE_.mjs} +5 -5
- package/node/esm/{FBYT_1wWMsovwFUH.mjs → D1C8ifsmXsypL6pp.mjs} +13 -13
- package/node/esm/{DAGXTtxswgRevXcg.mjs → D1xD8cOQDGcbjIlG.mjs} +1 -1
- package/node/esm/{tOKSFYpLW-UAq6Gt.mjs → DUfB1ollhqU-JIk5.mjs} +4 -4
- package/node/esm/{M1FpuPZr9_2AafMV.mjs → Dx2vq1Hdt4pqmOF-.mjs} +2 -2
- package/node/esm/{wsJBzsqfI7PB1hMT.mjs → M3UB6IrhVERZziiJ.mjs} +2 -2
- package/node/esm/{BvRJoxdFTieQ7fmr.mjs → PF5CCBvapZxEzc7k.mjs} +1 -1
- package/node/esm/{p6vc6u8VPkFyCsYx.mjs → bv_GA6NGCT0sJaXy.mjs} +2 -2
- package/node/esm/{DhG888jHVhaxSY8F.mjs → h1y2hBFecTqRgUa-.mjs} +25 -25
- package/node/esm/index.mjs +5265 -4998
- package/node/esm/{BCPBJsft-CxWAdC2.mjs → kHsChOtl8GUkzj5Q.mjs} +2 -2
- package/node/esm/{CvPEjDQ6QhtpTabY.mjs → kIQFLB3nmEJdn_OT.mjs} +1 -1
- package/node/esm/{BBg45DshIWHYXywC.mjs → m8fyd2BoYkTOJlc1.mjs} +1 -1
- package/node/esm/{usxl4NgDVOQ7LrDb.mjs → wdtYNTNCynMMS4_P.mjs} +1 -1
- package/package.json +8 -8
- package/types/index.d.ts +11 -0
- package/browser/cjs/BKTBvSy7O4Xw2cgz.cjs +0 -12
- package/browser/cjs/BpePzZJYiqMlY5Tv.cjs +0 -6
- package/browser/cjs/C1kdA0ggDPxfA1rZ.cjs +0 -7
- package/browser/cjs/C3Ou4UjGdLm76uIO.cjs +0 -6
- package/browser/cjs/CFxDNxEIdtHFQI9Y.cjs +0 -7
- package/browser/cjs/CYBKL0vexMAhOhAv.cjs +0 -15
- package/browser/cjs/CdVTdaOLyLtwVswE.cjs +0 -6
- package/browser/cjs/ClsxZKYLxWzS4vf3.cjs +0 -12
- package/browser/cjs/Co1amcDxMGmeSblk.cjs +0 -161
- package/browser/cjs/CoKAO1N3hI6MCu8D.cjs +0 -6
- package/browser/cjs/CtsmtdeQOqFBoICs.cjs +0 -6
- package/browser/cjs/CuB7GbiZyoeSvc0Z.cjs +0 -6
- package/browser/cjs/D-N-VqvFR1gHQx1f.cjs +0 -11
- package/browser/cjs/DDFf-jFPulia8BBq.cjs +0 -11
- package/browser/cjs/Db8DWa6iDZSqedMi.cjs +0 -90
- package/browser/cjs/DeGIeKT9CooiCmKo.cjs +0 -6
- package/browser/cjs/LWz4eqzOyIvcl3ew.cjs +0 -6
- package/browser/cjs/bzV_pbhf0GMpQZ5j.cjs +0 -16
- package/browser/cjs/fCiaIJ9GEGrJHKcW.cjs +0 -18
- package/browser/cjs/g_d3i2WIzavP1fkJ.cjs +0 -6
- package/browser/cjs/jtJTqrtVCIIZdMGs.cjs +0 -6
- package/browser/cjs/lKYJYMC7FrPq5kHP.cjs +0 -42
- package/browser/cjs/niDPoiECJADuYx3e.cjs +0 -145
- package/browser/cjs/olo9IZBG5nwaup_7.cjs +0 -6
- package/browser/cjs/zKQuLycAjgd_X11q.cjs +0 -6
- package/browser/esm/3hWSR1m3EU7D5hi-.mjs +0 -1352
- package/browser/esm/536uCif-OpzkPpDe.mjs +0 -84
- package/browser/esm/BAKeXjQwj8pB6HZf.mjs +0 -3803
- package/browser/esm/BCEAVoasUKP7howp.mjs +0 -25
- package/browser/esm/BKPv5CXZmlt0Bt9q.mjs +0 -52
- package/browser/esm/BpaKIplfXogRA7Dy.mjs +0 -424
- package/browser/esm/C7S8lmNi8dvBvaaL.mjs +0 -13391
- package/browser/esm/C8g1cXW8UUjZ5aXU.mjs +0 -43
- package/browser/esm/CDg8_cQCaixUeVW5.mjs +0 -59
- package/browser/esm/COdRj-kRolpDnJJt.mjs +0 -153
- package/browser/esm/C_SmA3bhMniSBiJM.mjs +0 -2251
- package/browser/esm/CfhFPyNuH7O_8Ma5.mjs +0 -46
- package/browser/esm/Cq7Bvqjn_f2hb4Yu.mjs +0 -1703
- package/browser/esm/Cu4sFU_zvi2DcKL0.mjs +0 -864
- package/browser/esm/DRlIFEu_74fHh0Nd.mjs +0 -44
- package/browser/esm/DW_hf-cH6FfKvA2U.mjs +0 -1366
- package/browser/esm/D_9FRFbybIoGcpk5.mjs +0 -640
- package/browser/esm/DssrQc6563EzuV2p.mjs +0 -1467
- package/browser/esm/TCkOSlTdkEa2IszR.mjs +0 -392
- package/browser/esm/XunxgPz4pxTyfYZa.mjs +0 -19979
- package/browser/esm/YJTooL6WwG9eY3LG.mjs +0 -48
- package/browser/esm/ej-oxHSoVFxjTvis.mjs +0 -2410
- package/browser/esm/fbwdS1S_4A9RYV7u.mjs +0 -1672
- package/browser/esm/tZtCH_zqvCEW6mXy.mjs +0 -23
- package/browser/esm/tbB-JzXGTPYVXdKc.mjs +0 -52
- package/node/esm/BmYPa_c9Yu9hUbtH.mjs +0 -312
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
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.
|
|
@@ -11,35 +11,35 @@ import { alpha as c, getOverlayAlpha as p } from "@mui/material/styles/index.js"
|
|
|
11
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
12
|
import { ArrowBack as y, ArrowUpward as b, ArrowForward as T, ArrowDownward as v } from "@mui/icons-material";
|
|
13
13
|
import { ICell as k, IRange as R } from "@sheetxl/sdk";
|
|
14
|
-
import { P as E,
|
|
14
|
+
import { P as E, T as S, z as F, f as I, b as w, r as D, E as P, o as K, l as $, i as A, s as M, c as j, d as B, g as L } from "./index.mjs";
|
|
15
15
|
const V = t((t2) => {
|
|
16
|
-
const { label: i2, value: r2, options: a2, onSelect: d2, tabIndex: u2 = 0, ...f2 } = t2, [m2, g2] = o(() =>
|
|
16
|
+
const { label: i2, value: r2, options: a2, onSelect: d2, tabIndex: u2 = 0, ...f2 } = t2, [m2, g2] = o(() => U(r2, a2));
|
|
17
17
|
l(() => {
|
|
18
|
-
g2(
|
|
18
|
+
g2(U(r2, a2));
|
|
19
19
|
}, [r2, a2]);
|
|
20
20
|
const y2 = E((e2) => {
|
|
21
21
|
g2(e2.target.value), d2?.(a2[e2.target.value]);
|
|
22
22
|
}, [d2, a2]), b2 = s(() => Object.keys(a2).map((n2) => e(x, { value: n2, children: n2 }, n2)), [a2]);
|
|
23
23
|
return n(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 })] });
|
|
24
|
-
}),
|
|
25
|
-
delete
|
|
26
|
-
const G = { "By Rows": true, "By Columns": false },
|
|
24
|
+
}), N = { Workbook: "workbook", Sheet: "sheet" }, W = { enter: 140, exit: 140 }, z = { Formulas: k.Content.Formulas, Values: k.Content.Values, Notes: k.Content.Notes, Comments: k.Content.Comments }, H = { ...z };
|
|
25
|
+
delete H.Values;
|
|
26
|
+
const G = { "By Rows": true, "By Columns": false }, U = (e2, n2) => {
|
|
27
27
|
const t2 = Object.keys(n2);
|
|
28
28
|
for (let i2 = 0; i2 < t2.length; i2++) {
|
|
29
29
|
const o2 = t2[i2];
|
|
30
30
|
if (n2[o2] === e2) return o2;
|
|
31
31
|
}
|
|
32
|
-
},
|
|
33
|
-
const { replace: s2 = false, findText: x2, replaceText: h2, findOptions: O2, replaceOptions: C2, title:
|
|
32
|
+
}, X = t((t2) => {
|
|
33
|
+
const { replace: s2 = false, findText: x2, replaceText: h2, findOptions: O2, replaceOptions: C2, title: U2, onHide: X2, onFindOrReplace: q, ...J } = t2, Q = i(null), Y = i(null), Z = i(null), _ = i(null), ee = i(null), ne = i(null), te = (e2, n2) => {
|
|
34
34
|
if (!n2) return;
|
|
35
35
|
n2.start(e2, { center: false }), setTimeout(() => n2.stop(e2), 180);
|
|
36
|
-
}, [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:
|
|
37
|
-
if (!
|
|
36
|
+
}, [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: N.Sheet }), ge = E(async (e2, n2, t3, i2) => {
|
|
37
|
+
if (!q) return;
|
|
38
38
|
const o2 = { ...fe };
|
|
39
39
|
o2.replaceOptions = { ...o2.replaceOptions }, o2.findOptions = { ...o2.findOptions }, o2.replaceOptions.maxCount = t3 ? void 0 : 1, o2.replace = n2, n2 && fe.findOptions.fields?.[0] === k.Content.Values && (o2.findOptions.fields = [k.Content.Formulas]), o2.findOptions.reverse = !e2;
|
|
40
|
-
const l2 = await
|
|
40
|
+
const l2 = await q({ autoFocus: i2, ...o2 });
|
|
41
41
|
pe(0 === l2);
|
|
42
|
-
}, [fe,
|
|
42
|
+
}, [fe, q]);
|
|
43
43
|
l(() => {
|
|
44
44
|
pe(false);
|
|
45
45
|
}, [fe, le, se]);
|
|
@@ -60,16 +60,16 @@ const G = { "By Rows": true, "By Columns": false }, J = (e2, n2) => {
|
|
|
60
60
|
}, [x2, h2, O2, C2]), l(() => {
|
|
61
61
|
se ? (fe.findOptions.fields[0], k.Content.Values) : oe(true);
|
|
62
62
|
}, [se]), l(() => {
|
|
63
|
-
if (ie &&
|
|
64
|
-
|
|
63
|
+
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", () => {
|
|
64
|
+
Q.current?.select(), oe(false);
|
|
65
65
|
}, { once: true });
|
|
66
66
|
}, [ie, fe]);
|
|
67
67
|
const [Oe, { width: Ce }] = a();
|
|
68
|
-
return e(
|
|
68
|
+
return e(F, { ref: he, title: U2 ?? (se ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: X2, onFocus: () => ue(true), onBlur: () => {
|
|
69
69
|
ue(false), pe(false);
|
|
70
|
-
}, PaperProps: { elevation: de ? 3 : 1 }, ...
|
|
71
|
-
if ("h" === e2.key && e2.ctrlKey) ae(true),
|
|
72
|
-
else if ("f" === e2.key && e2.ctrlKey)
|
|
70
|
+
}, PaperProps: { elevation: de ? 3 : 1 }, ...J, children: n(d, { dividers: true, ref: Oe, sx: { display: "flex", flexDirection: "column", paddingLeft: (e2) => e2.spacing(1.5), paddingRight: (e2) => e2.spacing(1.5) }, onKeyDown: (e2) => {
|
|
71
|
+
if ("h" === e2.key && e2.ctrlKey) ae(true), Q.current?.contains(document.activeElement) && Y.current?.focus();
|
|
72
|
+
else if ("f" === e2.key && e2.ctrlKey) Q.current?.focus();
|
|
73
73
|
else if ("c" === e2.key && e2.altKey) me((e3) => {
|
|
74
74
|
const n2 = { ...e3 };
|
|
75
75
|
return n2.findOptions.matchCase = !e3.findOptions.matchCase, n2;
|
|
@@ -86,38 +86,38 @@ const G = { "By Rows": true, "By Columns": false }, J = (e2, n2) => {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
e2.preventDefault();
|
|
89
|
-
}, children: [n(u, { sx: { display: "flex", flexDirection: "row", gap: (e2) => e2.spacing(1) }, children: [n(u, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e2) => e2.spacing(0.25), paddingTop: "3px" }, children: [e(
|
|
89
|
+
}, children: [n(u, { sx: { display: "flex", flexDirection: "row", gap: (e2) => e2.spacing(1) }, children: [n(u, { sx: { display: "flex", flexDirection: "row", alignItems: "start", gap: (e2) => e2.spacing(0.25), paddingTop: "3px" }, children: [e(I, { selected: le, onSelectToggle: (e2) => {
|
|
90
90
|
re(e2);
|
|
91
|
-
}, preventFocus: true, label: "Toggle Additional Options", icon: w(e(D, {})) }), e(
|
|
91
|
+
}, preventFocus: true, label: "Toggle Additional Options", icon: w(e(D, {})) }), e(I, { selected: se, onSelectToggle: (e2) => {
|
|
92
92
|
ae(e2);
|
|
93
|
-
}, preventFocus: true, label: "Toggle Replace", icon: w(e(K, {})), shortcut: { key: se ? "F" : "H", modifiers: [P.Ctrl] } })] }), n(u, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [n(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:
|
|
93
|
+
}, preventFocus: true, label: "Toggle Replace", icon: w(e(K, {})), shortcut: { key: se ? "F" : "H", modifiers: [P.Ctrl] } })] }), n(u, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box" }, children: [n(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: n(u, { sx: { display: "flex", alignItems: "center", flexDirection: "row", gap: "1px" }, children: [e(I, { selected: fe.findOptions.matchCase, onSelectToggle: (e2) => {
|
|
94
94
|
me((n2) => {
|
|
95
95
|
const t3 = { ...n2 };
|
|
96
96
|
return t3.findOptions.matchCase = e2, t3;
|
|
97
97
|
});
|
|
98
|
-
}, label: "Match Case", shortcut: { key: "C", modifiers: [P.Alt] }, icon: w(e(
|
|
98
|
+
}, label: "Match Case", shortcut: { key: "C", modifiers: [P.Alt] }, icon: w(e($, {})) }), e(I, { selected: fe.findOptions.matchEntireCell, onSelectToggle: (e2) => {
|
|
99
99
|
me((n2) => {
|
|
100
100
|
const t3 = { ...n2 };
|
|
101
101
|
return t3.findOptions.matchEntireCell = e2, t3;
|
|
102
102
|
});
|
|
103
|
-
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [P.Alt] }, icon: w(e(
|
|
103
|
+
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [P.Alt] }, icon: w(e(A, {})) }), e(I, { selected: fe.findOptions.useRegex, onSelectToggle: (e2) => {
|
|
104
104
|
me((n2) => {
|
|
105
105
|
const t3 = { ...n2 };
|
|
106
106
|
return t3.findOptions.useRegex = e2, t3;
|
|
107
107
|
});
|
|
108
|
-
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [P.Alt] }, icon: w(e(
|
|
108
|
+
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [P.Alt] }, icon: w(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) => {
|
|
109
109
|
me((n2) => {
|
|
110
110
|
const t3 = { ...n2 };
|
|
111
111
|
return t3.findText = e2.target.value, t3;
|
|
112
112
|
});
|
|
113
113
|
}, onKeyDown: (e2) => xe(e2, false), onContextMenu: (e2) => {
|
|
114
114
|
e2.stopPropagation();
|
|
115
|
-
} }), e(
|
|
115
|
+
} }), e(I, { selected: fe.findOptions.reverse, onSelectToggle: (e2) => {
|
|
116
116
|
ge(false, false);
|
|
117
|
-
}, touchRippleRef: Z, label: "", shortcut: { key: "Enter", modifiers: [P.Shift] }, icon: w(fe.findOptions.orientation !== R.Orientation.Column ? e(y, {}) : e(b, {})), disabled: !fe.findText }), e(
|
|
117
|
+
}, touchRippleRef: Z, label: "", shortcut: { key: "Enter", modifiers: [P.Shift] }, icon: w(fe.findOptions.orientation !== R.Orientation.Column ? e(y, {}) : e(b, {})), disabled: !fe.findText }), e(I, { selected: !fe.findOptions.reverse, onSelectToggle: (e2) => {
|
|
118
118
|
ge(true, false);
|
|
119
|
-
}, touchRippleRef: _, label: "Next Match", shortcut: { key: "Enter" }, icon: w(fe.findOptions.orientation !== R.Orientation.Column ? e(T, {}) : e(v, {})), disabled: !fe.findText })] }), e(g, { in: se, timeout:
|
|
120
|
-
|
|
119
|
+
}, touchRippleRef: _, label: "Next Match", shortcut: { key: "Enter" }, icon: w(fe.findOptions.orientation !== R.Orientation.Column ? e(T, {}) : e(v, {})), disabled: !fe.findText })] }), e(g, { in: se, timeout: W, onExit: () => {
|
|
120
|
+
Q.current?.focus();
|
|
121
121
|
}, children: n(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) => {
|
|
122
122
|
me((n2) => {
|
|
123
123
|
const t3 = { ...n2 };
|
|
@@ -125,13 +125,13 @@ const G = { "By Rows": true, "By Columns": false }, J = (e2, n2) => {
|
|
|
125
125
|
});
|
|
126
126
|
}, onKeyDown: (e2) => xe(e2, true), onContextMenu: (e2) => {
|
|
127
127
|
e2.stopPropagation();
|
|
128
|
-
} }), e(
|
|
128
|
+
} }), e(I, { onSelectToggle: (e2) => {
|
|
129
129
|
ge(true, true);
|
|
130
|
-
}, touchRippleRef: ee, label: "Replace", shortcut: { key: "Enter" }, icon: w(e(
|
|
130
|
+
}, touchRippleRef: ee, label: "Replace", shortcut: { key: "Enter" }, icon: w(e(j, {})), disabled: !fe.findText }), e(I, { onSelectToggle: (e2) => {
|
|
131
131
|
ge(true, true, true);
|
|
132
|
-
}, touchRippleRef: ne, label: "Replace All", shortcut: { key: "Enter", modifiers: [P.Ctrl, P.Alt] }, icon: w(e(
|
|
133
|
-
|
|
134
|
-
}, children: n(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(L, { orientation: "horizontal", sx: { marginBottom: (e2) => e2.spacing(1.5) } }), n(u, { sx: { display: "flex", flexDirection: Ce >= 413 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", rowGap: (e2) => e2.spacing(2) }, tabIndex: -1, children: [e(V, { label: "Within", value: fe.scope, options:
|
|
132
|
+
}, touchRippleRef: ne, label: "Replace All", shortcut: { key: "Enter", modifiers: [P.Ctrl, P.Alt] }, icon: w(e(B, {})), disabled: !fe.findText })] }) })] })] }), e(g, { in: le, timeout: W, onExit: () => {
|
|
133
|
+
Q.current?.focus();
|
|
134
|
+
}, children: n(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(L, { orientation: "horizontal", sx: { marginBottom: (e2) => e2.spacing(1.5) } }), n(u, { sx: { display: "flex", flexDirection: Ce >= 413 ? "row" : "column", justifyContent: "space-evenly", alignItems: "center", rowGap: (e2) => e2.spacing(2) }, tabIndex: -1, children: [e(V, { label: "Within", value: fe.scope, options: N, onSelect: (e2) => {
|
|
135
135
|
me((n2) => {
|
|
136
136
|
const t3 = { ...n2 };
|
|
137
137
|
return t3.scope = e2, t3;
|
|
@@ -141,7 +141,7 @@ const G = { "By Rows": true, "By Columns": false }, J = (e2, n2) => {
|
|
|
141
141
|
const t3 = { ...n2 };
|
|
142
142
|
return t3.findOptions.orientation = e2 ? R.Orientation.Row : R.Orientation.Column, t3;
|
|
143
143
|
});
|
|
144
|
-
} }), e(V, { label: "Look in", value: se && fe.findOptions.fields?.[0] === k.Content.Values ? k.Content.Formulas : fe.findOptions.fields?.[0], options: se ?
|
|
144
|
+
} }), e(V, { label: "Look in", value: se && fe.findOptions.fields?.[0] === k.Content.Values ? k.Content.Formulas : fe.findOptions.fields?.[0], options: se ? H : z, onSelect: (e2) => {
|
|
145
145
|
me((n2) => {
|
|
146
146
|
const t3 = { ...n2 };
|
|
147
147
|
return t3.findOptions.fields = [e2], t3;
|
|
@@ -149,7 +149,7 @@ const G = { "By Rows": true, "By Columns": false }, J = (e2, n2) => {
|
|
|
149
149
|
} })] })] }) })] }) });
|
|
150
150
|
});
|
|
151
151
|
export {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
X as FindReplaceWindow,
|
|
153
|
+
N as ScopeOptions,
|
|
154
|
+
X as default
|
|
155
155
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
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.
|
|
@@ -900,14 +900,14 @@ class wt {
|
|
|
900
900
|
const vt = (t2, e2, s2) => {
|
|
901
901
|
if (t2[0].value[0] === t2[1].value[0]) return e2;
|
|
902
902
|
}, St = { colStart: 0, colEnd: 0, rowStart: 0, rowEnd: 0 }, Ct = Object.freeze(Object.defineProperty({ __proto__: null, fromBufferXLSX: async (t2, h2) => {
|
|
903
|
-
const { password: f2, onWarning: m2, createWorkbookOptions: T2 = {}, ...y2 } = h2 ?? {}, b2 = import("./
|
|
903
|
+
const { password: f2, onWarning: m2, createWorkbookOptions: T2 = {}, ...y2 } = h2 ?? {}, b2 = import("./CBGAl2mih9mHDt5w.mjs"), x2 = import("./kHsChOtl8GUkzj5Q.mjs");
|
|
904
904
|
let w2 = null;
|
|
905
905
|
try {
|
|
906
906
|
w2 = new DOMParser();
|
|
907
907
|
} catch (t3) {
|
|
908
908
|
}
|
|
909
909
|
let v2 = null;
|
|
910
|
-
w2 || (v2 = import("./
|
|
910
|
+
w2 || (v2 = import("./B3M2CzPvK2oKOfg5.mjs").then((t3) => t3.i));
|
|
911
911
|
let S2 = null, C2 = null, k2 = null;
|
|
912
912
|
try {
|
|
913
913
|
const t3 = await Promise.all([b2, x2, v2]);
|
|
@@ -1316,7 +1316,7 @@ const vt = (t2, e2, s2) => {
|
|
|
1316
1316
|
}, A2), a3 = ht(h4, P2), c3 = await (async (t6, e2 = 8388608) => {
|
|
1317
1317
|
await (async () => {
|
|
1318
1318
|
if ("undefined" == typeof ReadableStream) if ("undefined" == typeof window) {
|
|
1319
|
-
const { ReadableStream: t7 } = await import("./
|
|
1319
|
+
const { ReadableStream: t7 } = await import("./kIQFLB3nmEJdn_OT.mjs");
|
|
1320
1320
|
globalThis.ReadableStream = t7;
|
|
1321
1321
|
} else console.warn("Browser does not support ReadableStream; consider loading a polyfill.");
|
|
1322
1322
|
})();
|
|
@@ -1421,7 +1421,7 @@ const vt = (t2, e2, s2) => {
|
|
|
1421
1421
|
throw t3 instanceof p && (e2 = "Unable to open XLSX. There are too many rows or columns."), new Error(e2, { cause: t3 });
|
|
1422
1422
|
}
|
|
1423
1423
|
}, toBufferXLSX: async (s2, i2) => {
|
|
1424
|
-
const o2 = await import("./
|
|
1424
|
+
const o2 = await import("./CBGAl2mih9mHDt5w.mjs"), r2 = await s2.toJSON(true), n2 = o2.utils.book_new();
|
|
1425
1425
|
for (let i3 = 0; i3 < r2.sheets.length; i3++) {
|
|
1426
1426
|
const a2 = r2.sheets[i3], l2 = o2.utils.json_to_sheet([{}]);
|
|
1427
1427
|
o2.utils.book_append_sheet(n2, l2, a2.name);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
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.
|
|
@@ -9,33 +9,33 @@ import { memo as o, forwardRef as n, useState as a } from "react";
|
|
|
9
9
|
import e from "clsx";
|
|
10
10
|
import { alpha as i, getOverlayAlpha as p } from "@mui/material/styles/index.js";
|
|
11
11
|
import { Box as r, FormControl as s, TextField as l } from "@mui/material";
|
|
12
|
-
import {
|
|
12
|
+
import { V as c, M as u, a as d } from "./index.mjs";
|
|
13
13
|
const m = ["Input"], g = o(n((o2, n2) => {
|
|
14
|
-
const { initialValue: g2 = "", onOption: f, onValidateOption:
|
|
14
|
+
const { initialValue: g2 = "", onOption: f, onValidateOption: h, onInputOption: x, onValidateInputOption: y, onDone: O, inputProps: w, inputLabel: T, inputType: F, inputPlaceHolder: I, options: P = m, autoFocusSel: v = ".autoFocus", cancelOption: C, defaultOption: V = P?.[0], ...b } = o2, [k, j] = a(false), [D, M] = a(g2), [B, H] = a(""), [L, N] = a(true), S = c(async (t2, o3) => {
|
|
15
15
|
if (!y) return true;
|
|
16
16
|
const n3 = await y?.(t2, o3);
|
|
17
|
-
|
|
17
|
+
H(n3?.message ?? "");
|
|
18
18
|
const a2 = n3?.valid ?? true;
|
|
19
19
|
return N(a2), a2;
|
|
20
20
|
}, [y]), $ = c(async (t2) => {
|
|
21
|
-
|
|
22
|
-
}, [D,
|
|
21
|
+
x?.(D, t2);
|
|
22
|
+
}, [D, x, O, f, C, V]), z = c(async (t2) => {
|
|
23
23
|
t2.keyCode === u.Enter && await S?.(D, null);
|
|
24
24
|
}, [D, $]), E = c((t2) => {
|
|
25
|
-
|
|
26
|
-
}, [
|
|
25
|
+
M(t2.target.value), S?.(t2.target.value, null);
|
|
26
|
+
}, [h]), K = c(async (t2) => {
|
|
27
27
|
let o3 = await S(D, t2);
|
|
28
28
|
try {
|
|
29
29
|
false !== o3 && (o3 = await S(D, t2));
|
|
30
30
|
} catch (t3) {
|
|
31
31
|
}
|
|
32
32
|
return o3 ?? true;
|
|
33
|
-
}, [D,
|
|
34
|
-
return t(d, { options:
|
|
33
|
+
}, [D, h]);
|
|
34
|
+
return t(d, { options: P, onDone: O, onOption: (t2, o3) => {
|
|
35
35
|
o3 || $(t2);
|
|
36
|
-
}, onValidateOption: K, cancelOption: C, defaultOption:
|
|
37
|
-
|
|
38
|
-
}, type:
|
|
36
|
+
}, onValidateOption: K, cancelOption: C, defaultOption: V, autoFocusSel: v, ref: n2, ...b, children: t(r, { sx: { paddingTop: (t2) => t2.spacing(1), paddingBottom: (t2) => t2.spacing(0) }, children: t(s, { sx: { paddingTop: (t2) => t2.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: t(l, { onFocus: (t2) => {
|
|
37
|
+
k || t2.target?.select(), j(true);
|
|
38
|
+
}, type: F, label: T, helperText: B || " ", sx: { width: "100%", "& .MuiFormHelperText-root": { marginTop: (t2) => t2.spacing(0.5), color: L ? void 0 : "error.main" } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { placeholder: I, spellCheck: false, autoComplete: "off", ...w, className: e("autoFocus", w?.className), sx: { paddingTop: (t2) => t2.spacing(1.25), paddingBottom: (t2) => t2.spacing(0.75), backgroundImage: `linear-gradient(${i("#fff", p(5))}, ${i("#fff", p(5))})` } } }, value: D, onChange: E, onKeyDown: z, onContextMenu: (t2) => {
|
|
39
39
|
t2.stopPropagation();
|
|
40
40
|
} }) }) }) });
|
|
41
41
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
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.
|
|
@@ -9,9 +9,9 @@ import { memo as o, useState as a, useCallback as n, useEffect as i, useMemo as
|
|
|
9
9
|
import { alpha as l, getOverlayAlpha as s } from "@mui/material/styles/index.js";
|
|
10
10
|
import { Box as p, FormControl as c, InputLabel as d, Select as u, TextField as m, Typography as g, MenuItem as f } from "@mui/material";
|
|
11
11
|
import { NumberFormat as y } from "@sheetxl/sdk";
|
|
12
|
-
import { P as x,
|
|
12
|
+
import { P as x, T as h, a as C } from "./index.mjs";
|
|
13
13
|
const v = ["Ok", "Cancel"], b = o((o2) => {
|
|
14
|
-
const { initialValue: b2, context: T, onOption: k, onValidateOption: O, onInputOption: w, onDone: F, options: P = v, defaultOption: S = P?.[0], cancelOption: $ = "Cancel", sx: D, ...I } = o2, [j, V] = a(b2), [
|
|
14
|
+
const { initialValue: b2, context: T, onOption: k, onValidateOption: O, onInputOption: w, onDone: F, options: P = v, defaultOption: S = P?.[0], cancelOption: $ = "Cancel", sx: D, ...I } = o2, [j, V] = a(b2), [N, z] = a(false), B = n(async (e2, t2) => true, []), L = x(async (e2) => {
|
|
15
15
|
w?.(j, e2), k?.(e2, e2 === $, e2 === S), F?.();
|
|
16
16
|
}, [j, w, F, k, $, S]), M = x(async (e2) => {
|
|
17
17
|
if (e2.keyCode === h.Enter) {
|
|
@@ -43,7 +43,7 @@ const v = ["Ok", "Cancel"], b = o((o2) => {
|
|
|
43
43
|
return e2.createTemporaryCell({ value: e2.getValue() ?? 12345, style: { numberFormat: j } });
|
|
44
44
|
}, [E, j, T]);
|
|
45
45
|
return e(C, { title: "Number Format", options: P, onDone: F, onOption: (e2) => L(e2), onValidateOption: W, defaultOption: S, cancelOption: $, autoFocusSel: ".autoFocus", sx: { width: "580px", ...D }, ...I, children: t(p, { sx: { paddingTop: (e2) => e2.spacing(1), paddingBottom: (e2) => e2.spacing(0), rowGap: (e2) => e2.spacing(1), display: "flex", flexDirection: "column" }, children: [t(c, { sx: { minWidth: 135 }, size: "small", children: [e(d, { children: "Category" }), e(u, { value: E, label: "Category", onChange: K, sx: { backgroundImage: `linear-gradient(${l("#fff", s(5))}, ${l("#fff", s(5))})` }, children: H })] }), e(c, { sx: { paddingTop: (e2) => e2.spacing(1.5), minWidth: 135, width: "100%" }, size: "small", children: e(m, { label: "Code", onFocus: (e2) => {
|
|
46
|
-
|
|
46
|
+
N || e2.target?.select(), z(true);
|
|
47
47
|
}, sx: { "& .MuiFormHelperText-root": { marginTop: (e2) => e2.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { className: "autoFocus", spellCheck: false, autoComplete: "off", sx: { paddingTop: (e2) => e2.spacing(1.25), paddingBottom: (e2) => e2.spacing(0.75), backgroundImage: `linear-gradient(${l("#fff", s(5))}, ${l("#fff", s(5))})` } } }, value: j, onChange: R, onKeyDown: M, onContextMenu: (e2) => {
|
|
48
48
|
e2.stopPropagation();
|
|
49
49
|
} }) }), t(p, { children: [e(g, { variant: "caption", component: "div", sx: { paddingLeft: (e2) => e2.spacing(2) }, children: "Preview" }), e(g, { variant: "body2", component: "div", sx: { borderRadius: (e2) => `${e2.shape.borderRadius}px`, padding: (e2) => e2.spacing(1), border: (e2) => `1px solid ${e2.palette.grey[400]}` }, children: q.getNumberFormat().displayText || "(empty)" })] })] }) });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
8
8
|
import { memo as a, useMemo as n, useState as l, useCallback as o } from "react";
|
|
9
9
|
import { Box as i } from "@mui/material";
|
|
10
|
-
import { P as r,
|
|
10
|
+
import { P as r, a as s, NamedInput as d, RangeInput as p } from "./index.mjs";
|
|
11
11
|
const u = ["Ok", "Cancel"], c = a((a2) => {
|
|
12
12
|
const { value: c2 = null, context: m, onOption: g, onValidateOption: x, onDone: f, onUpdate: N, options: y = u, defaultOption: T = y?.[0], cancelOption: O = "Cancel", sx: V, ...h } = a2, v = n(() => m?.getNames().findValidName("Range1"), []), C = n(() => {
|
|
13
13
|
if (!c2) return true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
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.
|
|
@@ -8,7 +8,7 @@ import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
|
8
8
|
import { useState as t } from "react";
|
|
9
9
|
import { Box as i, FormControlLabel as o, Checkbox as l } from "@mui/material";
|
|
10
10
|
import { Sort as r, IRange as a } from "@sheetxl/sdk";
|
|
11
|
-
import { P as s,
|
|
11
|
+
import { P as s, a as c } from "./index.mjs";
|
|
12
12
|
const d = ({ range: d2, options: m, cell: p, onDone: h, ...u }) => {
|
|
13
13
|
const [v, C] = t(m ?? r.DefaultRangeOptions), O = s((e2) => {
|
|
14
14
|
let n2 = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
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.
|
|
@@ -8,7 +8,7 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
|
8
8
|
import { memo as e, useMemo as o, useState as a, useCallback as i } from "react";
|
|
9
9
|
import { alpha as s, getOverlayAlpha as l } from "@mui/material/styles/index.js";
|
|
10
10
|
import { Box as r, FormControl as p, TextField as d } from "@mui/material";
|
|
11
|
-
import { P as c,
|
|
11
|
+
import { P as c, a as u } from "./index.mjs";
|
|
12
12
|
const g = ["Ok", "Cancel"], m = e((e2) => {
|
|
13
13
|
const { initialHyperlink: m2 = null, initialDisplay: f = null, onUpdateHyperlink: x, context: h, onOption: y, onValidateOption: T, onDone: k, options: C = g, defaultOption: O = C?.[0], cancelOption: P = "Cancel", sx: b, ...D } = e2, F = o(() => null !== (m2 ?? h?.()?.getHyperlink()), []), I = o(() => {
|
|
14
14
|
let t2 = null, n2 = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.12
|
|
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.
|
|
@@ -8,51 +8,51 @@ import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
|
8
8
|
import { memo as o, useState as n, useRef as a, useReducer as i, useMemo as l } from "react";
|
|
9
9
|
import { useMeasure as s } from "react-use";
|
|
10
10
|
import { DialogContent as r, Box as c } from "@mui/material";
|
|
11
|
-
import {
|
|
11
|
+
import { h as d, j as g, k as m, P as p, z as h, NamedInput as u, RangeInput as x, g as f, TableStyleOptionsPanel as y, TableStylePreview as b, m as w, b as S, t as C, U as N } from "./index.mjs";
|
|
12
12
|
const v = o((o2) => {
|
|
13
|
-
const { title: v2, onHide: R, autoFocusSel: T = ".range-input input", context: F, notifier: D = d, command: H, commands:
|
|
13
|
+
const { title: v2, onHide: R, autoFocusSel: T = ".range-input input", context: F, notifier: D = d, command: H, commands: j, ...B } = o2, [I, P] = n(false), [z, L] = n(false), O = a(null), [E, A] = i((e2) => e2 + 1, 0), [M, { width: k }] = s();
|
|
14
14
|
g(H);
|
|
15
|
-
const
|
|
16
|
-
m(
|
|
17
|
-
q(
|
|
15
|
+
const U = F ?? H.context(), V = U.table(), [W, q] = n(() => V ? U.getNames().getRanges(V.getRange()) : null), G = l(() => V?.getName() ?? "", [V]);
|
|
16
|
+
m(U.table(), { onAnchorCoordsChange(e2) {
|
|
17
|
+
q(U.getNames().getRanges(e2.getRange()));
|
|
18
18
|
}, onProtectedChange(e2) {
|
|
19
19
|
A();
|
|
20
20
|
} });
|
|
21
21
|
const J = p((e2) => {
|
|
22
|
-
|
|
23
|
-
}, [
|
|
24
|
-
|
|
25
|
-
}, [
|
|
22
|
+
U?.table().setName(e2);
|
|
23
|
+
}, [U]), K = p((e2) => {
|
|
24
|
+
U?.table().resize(e2.at(0));
|
|
25
|
+
}, [U]);
|
|
26
26
|
let Q = null;
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
}, PaperProps: { elevation:
|
|
30
|
-
|
|
31
|
-
}, disabled:
|
|
27
|
+
return U.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" }) })), e(h, { ref: O, title: v2 ?? "Table Details", initialPosition: { y: "35" }, autoFocusSel: T, onHide: R, onFocus: () => P(true), onBlur: (e2) => {
|
|
28
|
+
O?.current?.contains(e2.relatedTarget) || P(false);
|
|
29
|
+
}, PaperProps: { elevation: I ? 3 : 1 }, ...B, children: t(r, { dividers: true, ref: M, 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: U.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(u, { formName: "name", defaultInput: G, value: V?.getName() ?? "No table", onChangeInput: J, onValidate: (e2) => {
|
|
30
|
+
V && V.getName().toLowerCase() === e2.toLowerCase() || U?.getNames().validateName(e2);
|
|
31
|
+
}, disabled: V?.isProtected() ?? true, onFocus: (e2) => {
|
|
32
32
|
z || e2.target?.select(), L(true);
|
|
33
|
-
} }), e(x, { formName: "range", value:
|
|
33
|
+
} }), e(x, { formName: "range", value: W, onChangeInput: K, resolvedAddress: U.getNames().getRanges.bind(U.getNames()), disabled: V?.isProtected() ?? true, onFocus: (e2) => {
|
|
34
34
|
z || e2.target?.select(), L(true);
|
|
35
|
-
} })] }) }) }), 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(f, { orientation: "horizontal", sx: { marginTop: (e2) => e2.spacing(1.5), marginBottom: (e2) => e2.spacing(0.75) } }), e(y, { disabled:
|
|
36
|
-
|
|
37
|
-
}, showHeaderRow:
|
|
35
|
+
} })] }) }) }), 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(f, { orientation: "horizontal", sx: { marginTop: (e2) => e2.spacing(1.5), marginBottom: (e2) => e2.spacing(0.75) } }), e(y, { disabled: V?.isProtected(), styleOptions: V?.getStyleOptions() ?? null, onStyleOptionsChange: (e2) => {
|
|
36
|
+
V.updateStyleOptions(e2);
|
|
37
|
+
}, showHeaderRow: V?.getShowHeaders(), onShowHeaderRowChange: (e2) => {
|
|
38
38
|
try {
|
|
39
|
-
|
|
39
|
+
V.setShowHeaders(e2);
|
|
40
40
|
} catch (e3) {
|
|
41
41
|
D.showError(e3);
|
|
42
42
|
}
|
|
43
|
-
}, showTotalRow:
|
|
43
|
+
}, showTotalRow: V?.getShowTotals(), onShowTotalRowChange: (e2) => {
|
|
44
44
|
try {
|
|
45
|
-
|
|
45
|
+
V.setShowTotals(e2);
|
|
46
46
|
} catch (e3) {
|
|
47
47
|
D.showError(e3);
|
|
48
48
|
}
|
|
49
|
-
}, showFilterButton:
|
|
49
|
+
}, showFilterButton: V?.getFilter() ? V.getShowFilterButton() : null, onShowFilterButtonChange: (e2) => {
|
|
50
50
|
try {
|
|
51
|
-
|
|
51
|
+
V.setShowFilterButton(e2);
|
|
52
52
|
} catch (e3) {
|
|
53
53
|
D.showError(e3);
|
|
54
54
|
}
|
|
55
|
-
} }), e(c, { sx: { display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", marginTop: (e2) => e2.spacing(2), marginBottom: (e2) => e2.spacing(1) }, children: e(b, { table:
|
|
55
|
+
} }), e(c, { sx: { display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", marginTop: (e2) => e2.spacing(2), marginBottom: (e2) => e2.spacing(1) }, children: e(b, { table: V, styles: U.styles(), bodyStyle: U.bodyStyle(), cellHeight: 30, isLive: true }) }), e(f, { orientation: "horizontal" }), t(c, { sx: { display: "flex", flexDirection: "column", justifyContent: "center" }, children: [e(w, { variant: C.Menuitem, command: j.getCommand("convertTableToRange"), commandState: V, icon: S(e(N, {})) }), e(w, { variant: C.Menuitem, commandState: V, command: j.getCommand("deleteTable"), icon: S(e(N, {})) })] })] })] }), Q] }) });
|
|
56
56
|
});
|
|
57
57
|
export {
|
|
58
58
|
v as TableDetailsWindow,
|