@sheetxl/studio-mui 0.4.7 → 0.4.9
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/{CArewr_CDpxiRR66.cjs → 02LSJ7jnb-ovS7ex.cjs} +1 -1
- package/browser/cjs/{DQRGxRYSOKOEByUm.cjs → BDDJIe6JwgEYEtda.cjs} +2 -2
- package/browser/cjs/{BULArqiBp4j5hxyx.cjs → BGh6tEDK_1MFKfMU.cjs} +1 -1
- package/browser/cjs/{BbvqKmxn6Rum-bk6.cjs → BSRDKlVOTYHfOAF_.cjs} +6 -6
- package/browser/cjs/{CzHIyuIwxVQd9I_P.cjs → Bn0BSzVk_S-rvDwk.cjs} +2 -2
- package/browser/cjs/Bzf8jKmmZl374mof.cjs +6 -0
- package/browser/cjs/{BnHBKznz1O8QEPEE.cjs → C20NTPRE5_ExESDZ.cjs} +2 -2
- package/browser/cjs/{C0rgKqf5wJGFF0Pn.cjs → C5i9hklL-WNb8J_q.cjs} +2 -2
- package/browser/cjs/{B5H9gNIHdOkSXNhX.cjs → CLxYxjd0yz1LCTB-.cjs} +1 -1
- package/browser/cjs/{CmX_3VyTiwTzdJhI.cjs → CUo2iW5IL6UZJNWT.cjs} +2 -2
- package/browser/cjs/{DK6e7OLzcRQFuNAR.cjs → C_QWbWVBVc6YJ4Q3.cjs} +1 -1
- package/browser/cjs/{x5DxzBmBRyolQW8p.cjs → CeeZxww7wpF45vvp.cjs} +2 -2
- package/browser/cjs/{x0gHCGm4Ua404wtj.cjs → CekKZCV1J1HUFIqO.cjs} +2 -2
- package/browser/cjs/CgD0b2zJD8zElhuz.cjs +6 -0
- package/browser/cjs/CqwEnIUDMxWw5DX1.cjs +87 -0
- package/browser/cjs/{6ahm9L_JadTVTVKM.cjs → CwOKyPq_H2afJacv.cjs} +2 -2
- package/browser/cjs/{ojTdNwa8dIIVVsYa.cjs → D32t9wiFoNX7WVEo.cjs} +1 -1
- package/browser/cjs/{sia-JpDs1OJx3UqA.cjs → DILF3GzsMdg-Y2wu.cjs} +1 -1
- package/browser/cjs/Dr-PR7J1T91UjrPL.cjs +12 -0
- package/browser/cjs/{D0g5Yi1sFZedrm8U.cjs → DyR0_iZAINpjodWL.cjs} +2 -2
- package/browser/cjs/{ZmZmJzyx8f56di-3.cjs → LWuNxqu9MyiniH_g.cjs} +3 -3
- package/browser/cjs/{D5hBXjLlXQHJlC_R.cjs → O8r9K4Qh6Pgd6rXU.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{CnIoJa4rGjDIRDt_.cjs → jbTHHxJODyD10jVH.cjs} +1 -1
- package/browser/cjs/{D2F5d-KqoX6K87V-.cjs → n-4XaX3pkXUEEQ5u.cjs} +2 -2
- package/browser/cjs/qQGaIq5VhlZJU-xf.cjs +6 -0
- package/browser/esm/{CIEN20sJj9GKW3yE.mjs → AmErN6xXU01K_bEs.mjs} +1 -1
- package/browser/esm/{54Y6CqDofk0Ryz8B.mjs → B08nVBuOXar7x7in.mjs} +3 -3
- package/browser/esm/{CMiuTssM0lBVhuJS.mjs → B8xKZIF9fvamlvW5.mjs} +6 -6
- package/browser/esm/{BadcJIpfDDb6Oula.mjs → BGWd79IfMfoHoO6g.mjs} +1 -1
- package/browser/esm/{PjZRDfcmhPXxjS2K.mjs → BT8vduOS21nsJ6EQ.mjs} +1 -1
- package/browser/esm/{vs0v9un-v2S9Jnlo.mjs → Bz6NqTbktTH8Df6_.mjs} +4 -4
- package/browser/esm/{C2ogJhUgj6tBd2Ze.mjs → CDRALHzsBIsRPM5g.mjs} +13 -13
- package/browser/esm/{Ip_kfHi5bomcrUk6.mjs → CIH1rBtL9lK5ku-N.mjs} +1 -1
- package/browser/esm/{D0TAETGiUzsAjxPY.mjs → CVJee4uHPTdpZGEH.mjs} +16 -16
- package/browser/esm/{CevfhoT-xtAPuMWS.mjs → CXUv64T9mbQbJGgM.mjs} +2 -2
- package/browser/esm/{CAgqX2BO2DbnSbS0.mjs → Ca5nvvpeuP6Wsv5P.mjs} +2 -2
- package/browser/esm/{DBhNx8LLdmzo5Avs.mjs → CelDYTh0f7McDj4o.mjs} +2 -2
- package/browser/esm/{BUxotxJXTYkCxXGj.mjs → DHlS6l8ZPDMN2cwP.mjs} +1 -1
- package/browser/esm/{DHsxjQ98xXj3tRTJ.mjs → DXKQ9TZdaT7ytR1S.mjs} +1 -1
- package/browser/esm/{CRCvnu8AKE7fJq05.mjs → D_FJwwe-bsDiDGBV.mjs} +2 -2
- package/browser/esm/{D3DJPz0louDEmOOg.mjs → DduyjhwDREaxXNzm.mjs} +7 -7
- package/browser/esm/DffuCp_514AjqJLT.mjs +864 -0
- package/browser/esm/{BgQK3a-xYWlmvNDD.mjs → DgC_oaBYpwh1mBi_.mjs} +2 -2
- package/browser/esm/{ww-U-PglTS7Dtu3g.mjs → Dl-SlJoaP7EFX-GR.mjs} +2 -2
- package/browser/esm/{DJJZ-Mz0hVMWcKq8.mjs → DpTSO921EQ7L_abP.mjs} +2 -2
- package/browser/esm/{DXbciCQNKY4_r5Et.mjs → Dr5y4zmj1js9FjzE.mjs} +1 -1
- package/browser/esm/{CJ46XJddcTe9sn3Q.mjs → DuoEo0hJBssfAmB4.mjs} +2 -2
- package/browser/esm/index.mjs +26 -25
- package/browser/esm/{BRio-IBtU98oZf5v.mjs → jIv4VNLAAFANZjhN.mjs} +1 -1
- package/browser/esm/{B5ZVjFCvGZMlskn5.mjs → wysWhT4-jO-uukUH.mjs} +2 -2
- package/browser/esm/{BSQXNtEzcvD1nZ07.mjs → zZaxvhjZK5N3yZkw.mjs} +7971 -7961
- package/licenses/dependencies.txt +6 -6
- package/node/esm/{B_-60k30GZTVFJCG.mjs → 9iDXWtTOWeDVslQL.mjs} +1 -1
- package/node/esm/{BcfUxPgXAV1if9NT.mjs → B18g9zjzyR9YL3Mv.mjs} +1 -1
- package/node/esm/{HAKu1GEoK2wZht5-.mjs → B7xzqWxB07TdXnmo.mjs} +2 -2
- package/node/esm/BBWRiJSBxt6O1CfK.mjs +312 -0
- package/node/esm/{DW9fZUq5TEVyK05B.mjs → BUVA6vYXyFFnBCMg.mjs} +1 -1
- package/node/esm/{CTgcSkLGEwSlcrWM.mjs → BfuG4JD3t3n1uOci.mjs} +1 -1
- package/node/esm/{CiFa6r-hL-KsSx0I.mjs → C7t1ZHhSDgJnZ4Da.mjs} +1 -1
- package/node/esm/{CVheJHEYC7Bxc-m9.mjs → CG1T0Z1roNRSVlal.mjs} +1 -1
- package/node/esm/{BdwO--U2p6MiyekK.mjs → CGiJgZJFY-YsXWCX.mjs} +1 -1
- package/node/esm/{BK_IZrqK3_Xz2rfA.mjs → CILOMzOF30-XSZqR.mjs} +1 -1
- package/node/esm/{BeiZhSUAA8NyCua8.mjs → CijBL1IDWaxPgQ_E.mjs} +1 -1
- package/node/esm/{DQfxpSzOhUDp1tes.mjs → Cr5l_3AqPbv4mke9.mjs} +1 -1
- package/node/esm/{DEtck55hesGlXNoj.mjs → CsbP0EYKOHobzZCu.mjs} +1 -1
- package/node/esm/{xQKjfFNNUiXBnIeG.mjs → DGTK2YeARR5cTnft.mjs} +1 -1
- package/node/esm/{D9INCGl89jNGldla.mjs → DHmVr6jRLzt6lD1x.mjs} +1 -1
- package/node/esm/{1YvclnJ1eNd7ibD-.mjs → DODhKM0Qeycx3Hvp.mjs} +1 -1
- package/node/esm/{ClSJpKVPQuTKvJtg.mjs → DWKLdf_rn5dajRBA.mjs} +14 -14
- package/node/esm/{RPVynz_rpfz9lkAQ.mjs → Dn38s6pH3QNvdk-x.mjs} +7 -7
- package/node/esm/{DKqYePntZxW3fh6x.mjs → Dq49h62ihEYk_8VR.mjs} +1 -1
- package/node/esm/index.mjs +231 -221
- package/node/esm/{CJhxYk5D_7vcD7QG.mjs → qewbqty13W1sKrMC.mjs} +1 -1
- package/node/esm/{BkzwNHPzd0DSf0FL.mjs → tur4cwLbnCn69JK-.mjs} +19 -19
- package/node/esm/{C2SG9zLSqOGo3vCR.mjs → uY021f9cZSWYX0--.mjs} +5 -5
- package/node/esm/{C-WOcvkTBKxqQfEZ.mjs → v4fR5lIq2IqY_Clq.mjs} +20 -20
- package/package.json +8 -8
- package/types/index.d.ts +118 -81
- package/browser/cjs/Bi9ti1geH1gSoYX2.cjs +0 -6
- package/browser/cjs/Bt1aI3vb7h-PM53z.cjs +0 -6
- package/browser/cjs/CxMQIx_-k_XCclct.cjs +0 -87
- package/browser/cjs/DFkeNYQoyIagEEQ9.cjs +0 -6
- package/browser/cjs/iEu_JcRmrN7o_Gnt.cjs +0 -12
- package/browser/esm/BQoEwYUY9khnxsGk.mjs +0 -860
- package/node/esm/BlIGyiGNQyArtF2L.mjs +0 -308
|
@@ -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.9
|
|
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,44 +1,44 @@
|
|
|
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.9
|
|
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.
|
|
6
6
|
*/
|
|
7
7
|
import { Workbook as e, IRange as t } from "@sheetxl/sdk";
|
|
8
8
|
const n = async (e2, t2) => {
|
|
9
|
-
const { trimLeadingBlankRow: n2 = true, trimLeadingBlankColumn: r2 = true, excludeHidden: o = false, sheetKey: s = null, papaParseConfig: a = {} } = t2 || {}, l = await import("./
|
|
9
|
+
const { trimLeadingBlankRow: n2 = true, trimLeadingBlankColumn: r2 = true, excludeHidden: o = false, sheetKey: s = null, papaParseConfig: a = {} } = t2 || {}, l = await import("./C7t1ZHhSDgJnZ4Da.mjs").then((e3) => e3.p);
|
|
10
10
|
if (!e2) throw new Error("workbook must be specified");
|
|
11
11
|
let i = null;
|
|
12
12
|
if (null === s ? i = e2.getSelectedSheet() : "number" == typeof s ? i = e2.getSheets().search()[s] : "string" == typeof s && (i = e2.getSheets().getByName(s)), !i) throw new Error("invalid sheetKey specified");
|
|
13
|
-
let
|
|
14
|
-
const
|
|
15
|
-
let p = null,
|
|
16
|
-
if (!
|
|
13
|
+
let d = null;
|
|
14
|
+
const c = [];
|
|
15
|
+
let p = null, f = i.getUsedRange({ excludeHidden: o });
|
|
16
|
+
if (!f) throw new Error("Nothing to export");
|
|
17
17
|
if (!n2 || !r2) {
|
|
18
|
-
const e3 = n2 ?
|
|
19
|
-
|
|
18
|
+
const e3 = n2 ? f.getRowStart() : 0, t3 = r2 ? f.getColumnStart() : 0;
|
|
19
|
+
f = f.getOffsetTo(e3, t3);
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
f.forEach((e3, t3) => {
|
|
22
22
|
const n3 = t3.getCoords(), r3 = t3.getCell();
|
|
23
|
-
|
|
23
|
+
d !== n3.rowIndex && (p && c.push(p), p = [], d = n3.rowIndex);
|
|
24
24
|
const o2 = r3.toTextUnformatted() ?? "";
|
|
25
25
|
p.push(o2);
|
|
26
|
-
}, { includeEmpty: true, address: null }), p &&
|
|
27
|
-
const
|
|
26
|
+
}, { includeEmpty: true, address: null }), p && c.push(p);
|
|
27
|
+
const u = { ...a }, g = l.unparse(c, u);
|
|
28
28
|
return new TextEncoder().encode(g).buffer;
|
|
29
29
|
}, r = async (n2, r2) => {
|
|
30
|
-
const { papaParseConfig: o, setValuesOptions: s,
|
|
31
|
-
let
|
|
32
|
-
const
|
|
33
|
-
let
|
|
30
|
+
const { papaParseConfig: o, setValuesOptions: s, createWorkbookOptions: a } = r2 ?? {}, l = await import("./C7t1ZHhSDgJnZ4Da.mjs").then((e2) => e2.p), i = new TextDecoder().decode(n2);
|
|
31
|
+
let d = -1;
|
|
32
|
+
const c = new e(a), p = c.getSelectedSheet().getEntireRange().startIncrementalUpdates({ orientation: t.Orientation.Row }), f = r2?.onProgress;
|
|
33
|
+
let u = 0;
|
|
34
34
|
const g = { ...o, transform: (e2, t2) => {
|
|
35
35
|
o?.transform && (e2 = o.transform(e2, t2));
|
|
36
36
|
const n3 = t2;
|
|
37
|
-
0 === n3 &&
|
|
37
|
+
0 === n3 && d++;
|
|
38
38
|
let r3 = e2 ?? "";
|
|
39
|
-
return p.pushAt(
|
|
39
|
+
return p.pushAt(d, n3, r3), u++, u % 1e5 == 0 && f?.(u), e2;
|
|
40
40
|
} };
|
|
41
|
-
return l.parse(i, g).data, p.apply({ textParser: true, ...s }),
|
|
41
|
+
return l.parse(i, g).data, p.apply({ textParser: true, ...s }), c;
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
44
|
r as fromBufferCSV,
|
|
@@ -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.9
|
|
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,
|
|
903
|
+
const { password: f2, onWarning: m2, createWorkbookOptions: T2 = {}, ...y2 } = h2 ?? {}, b2 = import("./Dq49h62ihEYk_8VR.mjs"), x2 = import("./B7xzqWxB07TdXnmo.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("./Cr5l_3AqPbv4mke9.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("./qewbqty13W1sKrMC.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("./Dq49h62ihEYk_8VR.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.9
|
|
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,7 +11,7 @@ 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, z as S, A as I, B as
|
|
14
|
+
import { P as E, z as S, A as I, B as F, a as w, D, c as P, G as K, H as A, I as $, J as B, O as M, Q as j, d as L } from "./index.mjs";
|
|
15
15
|
const V = t((t2) => {
|
|
16
16
|
const { label: i2, value: r2, options: a2, onSelect: d2, tabIndex: u2 = 0, ...f2 } = t2, [m2, g2] = o(() => J(r2, a2));
|
|
17
17
|
l(() => {
|
|
@@ -21,7 +21,7 @@ const V = t((t2) => {
|
|
|
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
|
-
}),
|
|
24
|
+
}), H = { Workbook: "workbook", Sheet: "sheet" }, N = { enter: 140, exit: 140 }, W = { Formulas: k.Content.Formulas, Values: k.Content.Values, Notes: k.Content.Notes, Comments: k.Content.Comments }, z = { ...W };
|
|
25
25
|
delete z.Values;
|
|
26
26
|
const G = { "By Rows": true, "By Columns": false }, J = (e2, n2) => {
|
|
27
27
|
const t2 = Object.keys(n2);
|
|
@@ -33,7 +33,7 @@ const G = { "By Rows": true, "By Columns": false }, J = (e2, n2) => {
|
|
|
33
33
|
const { replace: s2 = false, findText: x2, replaceText: h2, findOptions: O2, replaceOptions: C2, title: J2, onHide: Q2, onFindOrReplace: U, ...X } = 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:
|
|
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: H.Sheet }), ge = E(async (e2, n2, t3, i2) => {
|
|
37
37
|
if (!U) 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;
|
|
@@ -65,7 +65,7 @@ const G = { "By Rows": true, "By Columns": false }, J = (e2, n2) => {
|
|
|
65
65
|
}, { once: true });
|
|
66
66
|
}, [ie, fe]);
|
|
67
67
|
const [Oe, { width: Ce }] = a();
|
|
68
|
-
return e(I, { title: J2 ?? (se ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input",
|
|
68
|
+
return e(I, { ref: he, title: J2 ?? (se ? "Find & Replace" : "Find"), initialPosition: { y: "35" }, autoFocusSel: ".input", onHide: Q2, onFocus: () => ue(true), onBlur: () => {
|
|
69
69
|
ue(false), pe(false);
|
|
70
70
|
}, PaperProps: { elevation: de ? 3 : 1 }, ...X, 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
71
|
if ("h" === e2.key && e2.ctrlKey) ae(true), q.current?.contains(document.activeElement) && Y.current?.focus();
|
|
@@ -86,37 +86,37 @@ 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(F, { selected: le, onSelectToggle: (e2) => {
|
|
90
90
|
re(e2);
|
|
91
|
-
}, preventFocus: true, label: "Toggle Additional Options", icon:
|
|
91
|
+
}, preventFocus: true, label: "Toggle Additional Options", icon: w(e(D, {})) }), e(F, { selected: se, onSelectToggle: (e2) => {
|
|
92
92
|
ae(e2);
|
|
93
|
-
}, preventFocus: true, label: "Toggle Replace", icon:
|
|
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(F, { 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:
|
|
98
|
+
}, label: "Match Case", shortcut: { key: "C", modifiers: [P.Alt] }, icon: w(e(A, {})) }), e(F, { 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:
|
|
103
|
+
}, label: "Match Entire Cell", shortcut: { key: "E", modifiers: [P.Alt] }, icon: w(e($, {})) }), e(F, { 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:
|
|
108
|
+
}, label: "Use Regular Expression", shortcut: { key: "R", modifiers: [P.Alt] }, icon: w(e(B, {})) })] }) }) }, 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(F, { selected: fe.findOptions.reverse, onSelectToggle: (e2) => {
|
|
116
116
|
ge(false, false);
|
|
117
|
-
}, touchRippleRef: Z, label: "", shortcut: { key: "Enter", modifiers: [P.Shift] }, icon:
|
|
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(F, { selected: !fe.findOptions.reverse, onSelectToggle: (e2) => {
|
|
118
118
|
ge(true, false);
|
|
119
|
-
}, touchRippleRef: _, label: "Next Match", shortcut: { key: "Enter" }, icon:
|
|
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: N, onExit: () => {
|
|
120
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) => {
|
|
@@ -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(F, { onSelectToggle: (e2) => {
|
|
129
129
|
ge(true, true);
|
|
130
|
-
}, touchRippleRef: ee, label: "Replace", shortcut: { key: "Enter" }, icon:
|
|
130
|
+
}, touchRippleRef: ee, label: "Replace", shortcut: { key: "Enter" }, icon: w(e(M, {})), disabled: !fe.findText }), e(F, { onSelectToggle: (e2) => {
|
|
131
131
|
ge(true, true, true);
|
|
132
|
-
}, touchRippleRef: ne, label: "Replace All", shortcut: { key: "Enter", modifiers: [P.Ctrl, P.Alt] }, icon:
|
|
132
|
+
}, touchRippleRef: ne, label: "Replace All", shortcut: { key: "Enter", modifiers: [P.Ctrl, P.Alt] }, icon: w(e(j, {})), disabled: !fe.findText })] }) })] })] }), e(g, { in: le, timeout: N, onExit: () => {
|
|
133
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:
|
|
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: H, 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 ? z :
|
|
144
|
+
} }), e(V, { label: "Look in", value: se && fe.findOptions.fields?.[0] === k.Content.Values ? k.Content.Formulas : fe.findOptions.fields?.[0], options: se ? z : W, onSelect: (e2) => {
|
|
145
145
|
me((n2) => {
|
|
146
146
|
const t3 = { ...n2 };
|
|
147
147
|
return t3.findOptions.fields = [e2], t3;
|
|
@@ -150,6 +150,6 @@ const G = { "By Rows": true, "By Columns": false }, J = (e2, n2) => {
|
|
|
150
150
|
});
|
|
151
151
|
export {
|
|
152
152
|
Q as FindReplaceWindow,
|
|
153
|
-
|
|
153
|
+
H as ScopeOptions,
|
|
154
154
|
Q as default
|
|
155
155
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/studio-mui",
|
|
3
3
|
"description": "Studio - Spreadsheet UI built with SheetXL SDK using React & MUI.",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.9",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"charting"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@sheetxl/grid-react": "^0.4.
|
|
40
|
-
"@sheetxl/io": "^0.4.
|
|
41
|
-
"@sheetxl/react": "^0.4.
|
|
42
|
-
"@sheetxl/utils": "^0.4.
|
|
43
|
-
"@sheetxl/utils-mui": "^0.4.
|
|
44
|
-
"@sheetxl/utils-react": "^0.4.
|
|
39
|
+
"@sheetxl/grid-react": "^0.4.9",
|
|
40
|
+
"@sheetxl/io": "^0.4.9",
|
|
41
|
+
"@sheetxl/react": "^0.4.9",
|
|
42
|
+
"@sheetxl/utils": "^0.4.9",
|
|
43
|
+
"@sheetxl/utils-mui": "^0.4.9",
|
|
44
|
+
"@sheetxl/utils-react": "^0.4.9",
|
|
45
45
|
"clsx": "^2.1.1",
|
|
46
46
|
"csstype": "^3.1.3",
|
|
47
47
|
"file-saver": "^2.0.5",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"tinycolor2": "^1.6.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@sheetxl/sdk": "^0.4.
|
|
62
|
+
"@sheetxl/sdk": "^0.4.9",
|
|
63
63
|
"@emotion/cache": "^11.14.0",
|
|
64
64
|
"@emotion/react": "^11.14.0",
|
|
65
65
|
"@emotion/styled": "^11.14.0",
|
package/types/index.d.ts
CHANGED
|
@@ -72,9 +72,11 @@ export declare type AutoColorPosition = typeof AutoColorPosition[keyof typeof Au
|
|
|
72
72
|
*/
|
|
73
73
|
export declare const BorderCommandButton: default_2.NamedExoticComponent<Omit<BorderCommandButtonProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
|
|
74
74
|
|
|
75
|
-
export declare interface BorderCommandButtonProps extends Partial<BorderPopupButtonProps> {
|
|
75
|
+
export declare interface BorderCommandButtonProps extends Omit<Partial<BorderPopupButtonProps>, "icon" | "label"> {
|
|
76
76
|
commands?: ICommands.IGroup;
|
|
77
77
|
command?: ICommand<Partial<IBorder.Properties>, CommandContext.Border>;
|
|
78
|
+
icon?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
|
|
79
|
+
label?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
|
|
78
80
|
/**
|
|
79
81
|
* Allow for listeners against a specific buttons execute rather than the command.
|
|
80
82
|
*
|
|
@@ -188,7 +190,7 @@ export declare const ColorCommandButton: default_2.NamedExoticComponent<Omit<Col
|
|
|
188
190
|
/**
|
|
189
191
|
* Wraps ColorPopupButton with a command.
|
|
190
192
|
*/
|
|
191
|
-
export declare interface ColorCommandButtonProps extends Omit<ColorPopupButtonProps, "selectedColor" | "variant"> {
|
|
193
|
+
export declare interface ColorCommandButtonProps extends Omit<ColorPopupButtonProps, "selectedColor" | "variant" | "icon" | "label"> {
|
|
192
194
|
command: Command<IColor, CommandContext.Color>;
|
|
193
195
|
/**
|
|
194
196
|
* Allow for listeners against a specific buttons execute rather than the command.
|
|
@@ -198,11 +200,8 @@ export declare interface ColorCommandButtonProps extends Omit<ColorPopupButtonPr
|
|
|
198
200
|
* (For example when closing menus or restoring focus)
|
|
199
201
|
*/
|
|
200
202
|
commandHook?: ICommandHook<any, any>;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
*
|
|
204
|
-
*/
|
|
205
|
-
icon?: default_2.ReactNode;
|
|
203
|
+
icon?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
|
|
204
|
+
label?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
|
|
206
205
|
/**
|
|
207
206
|
* Styling
|
|
208
207
|
* @defaultValue CommandButtonType.Toolbar
|
|
@@ -285,7 +284,7 @@ export declare type ColorPanelType = typeof ColorPanelType[keyof typeof ColorPan
|
|
|
285
284
|
|
|
286
285
|
export declare const ColorPopupButton: default_2.NamedExoticComponent<Omit<ColorPopupButtonProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
|
|
287
286
|
|
|
288
|
-
export declare interface ColorPopupButtonProps extends Omit<ExhibitPopupIconButtonProps, "color" | "
|
|
287
|
+
export declare interface ColorPopupButtonProps extends Omit<ExhibitPopupIconButtonProps, "color" | "createPopupPanel"> {
|
|
289
288
|
selectedColor: IColor;
|
|
290
289
|
onSelectColor?: (color: IColor | null, isCustom: boolean) => void;
|
|
291
290
|
onPreviewColor?: (color: IColor | null) => void;
|
|
@@ -294,8 +293,6 @@ export declare interface ColorPopupButtonProps extends Omit<ExhibitPopupIconButt
|
|
|
294
293
|
* A short cut for a quick color. This is generally the last color chosen
|
|
295
294
|
*/
|
|
296
295
|
quickColor?: IColor;
|
|
297
|
-
icon?: default_2.ReactNode;
|
|
298
|
-
label?: default_2.ReactNode;
|
|
299
296
|
/**
|
|
300
297
|
* Rendering styles
|
|
301
298
|
* @defaultValue to Toolbar
|
|
@@ -364,8 +361,10 @@ export declare interface DeleteCellsCommandButtonProps extends CommandPopupButto
|
|
|
364
361
|
|
|
365
362
|
export declare const DocThemeCommandButton: default_2.NamedExoticComponent<Omit<DocThemeCommandButtonProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
|
|
366
363
|
|
|
367
|
-
export declare interface DocThemeCommandButtonProps extends Omit<ThemeSelectPopupButtonProps, "createPopupPanel" | "variant" | "themes" | "icon"> {
|
|
364
|
+
export declare interface DocThemeCommandButtonProps extends Omit<ThemeSelectPopupButtonProps, "createPopupPanel" | "variant" | "themes" | "icon" | "label"> {
|
|
368
365
|
command: ICommand<ITheme, CommandContext.Theme>;
|
|
366
|
+
icon?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
|
|
367
|
+
label?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
|
|
369
368
|
/**
|
|
370
369
|
* Allow for listeners against a specific buttons execute rather than the command.
|
|
371
370
|
*
|
|
@@ -436,8 +435,10 @@ export declare interface FindCommandButtonProps extends CommandPopupButtonProps
|
|
|
436
435
|
|
|
437
436
|
export declare const FontFamilyCommandButton: default_2.NamedExoticComponent<Omit<FontFamilyCommandButtonProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
|
|
438
437
|
|
|
439
|
-
export declare interface FontFamilyCommandButtonProps extends Omit<ExhibitPopupIconButtonProps, "color" | "icon" | "createPopupPanel"> {
|
|
438
|
+
export declare interface FontFamilyCommandButtonProps extends Omit<ExhibitPopupIconButtonProps, "color" | "icon" | "label" | "createPopupPanel"> {
|
|
440
439
|
command: Command<string>;
|
|
440
|
+
icon?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
|
|
441
|
+
label?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
|
|
441
442
|
/**
|
|
442
443
|
* Allow for listeners against a specific buttons execute rather than the command.
|
|
443
444
|
*
|
|
@@ -453,8 +454,10 @@ export declare interface FontFamilyCommandButtonProps extends Omit<ExhibitPopupI
|
|
|
453
454
|
*/
|
|
454
455
|
export declare const FontSizeCommandButton: default_2.NamedExoticComponent<Omit<FontSizeCommandButtonProps, "ref"> & default_2.RefAttributes<HTMLElement>>;
|
|
455
456
|
|
|
456
|
-
export declare interface FontSizeCommandButtonProps extends Omit<ExhibitPopupIconButtonProps, "color" | "icon" | "createPopupPanel"> {
|
|
457
|
+
export declare interface FontSizeCommandButtonProps extends Omit<ExhibitPopupIconButtonProps, "color" | "icon" | "label" | "createPopupPanel"> {
|
|
457
458
|
command?: Command<number>;
|
|
459
|
+
icon?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
|
|
460
|
+
label?: default_2.ReactNode | ((command: ICommand) => default_2.ReactNode);
|
|
458
461
|
/**
|
|
459
462
|
* Allow for listeners against a specific buttons execute rather than the command.
|
|
460
463
|
*
|
|
@@ -669,6 +672,7 @@ export declare interface NamedCollectionEditorProps extends default_2.HTMLAttrib
|
|
|
669
672
|
*/
|
|
670
673
|
sx?: SxProps<Theme>;
|
|
671
674
|
disabled?: boolean;
|
|
675
|
+
readonly?: boolean;
|
|
672
676
|
parentFloat?: FloatReference;
|
|
673
677
|
commandPopupButtonProps?: CommandPopupButtonProps;
|
|
674
678
|
notifier?: Notifier;
|
|
@@ -825,6 +829,8 @@ export declare interface RangeInputProps extends FormControlProps {
|
|
|
825
829
|
resolvedAddress: (address: ICellRanges.Address) => ICellRanges;
|
|
826
830
|
}
|
|
827
831
|
|
|
832
|
+
export declare const renderWorkbookLoadingPanel: (props: LoadingPanelProps) => default_2.ReactElement;
|
|
833
|
+
|
|
828
834
|
export declare interface RequestTitleOptions extends FocusOptions {
|
|
829
835
|
selectAll?: boolean;
|
|
830
836
|
requestReason?: string;
|
|
@@ -969,7 +975,50 @@ export declare const SortFilterCommandButton: default_2.NamedExoticComponent<Omi
|
|
|
969
975
|
declare type Source = 'prop' | 'class' | 'media';
|
|
970
976
|
|
|
971
977
|
/**
|
|
972
|
-
*
|
|
978
|
+
* This show the current cell state as an unstyled editable field.
|
|
979
|
+
* This wraps this with material styling and submit and cancel buttons
|
|
980
|
+
*/
|
|
981
|
+
export declare const StatusBar: default_2.FC<StatusBarProps & StatusBarRefAttribute>;
|
|
982
|
+
|
|
983
|
+
export declare interface StatusBarItem {
|
|
984
|
+
/**
|
|
985
|
+
* Use for identifying the item
|
|
986
|
+
*/
|
|
987
|
+
key: string;
|
|
988
|
+
createElement(props: BoxProps): default_2.ReactElement;
|
|
989
|
+
/**
|
|
990
|
+
* If not provided, we will create a default menu item
|
|
991
|
+
* @param props
|
|
992
|
+
*/
|
|
993
|
+
createMenuItem?(props: BoxProps): default_2.ReactElement;
|
|
994
|
+
/**
|
|
995
|
+
* Should we show a divider before this item
|
|
996
|
+
*/
|
|
997
|
+
hasDivider?: boolean;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
export declare interface StatusBarProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
1001
|
+
/**
|
|
1002
|
+
* MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
|
|
1003
|
+
*/
|
|
1004
|
+
sx?: SxProps<Theme>;
|
|
1005
|
+
/**
|
|
1006
|
+
* The Sheet.
|
|
1007
|
+
*/
|
|
1008
|
+
sheet?: ISheet;
|
|
1009
|
+
gridStyle?: GridStyle;
|
|
1010
|
+
childrenEnd?: default_2.ReactNode | undefined;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
export declare interface StatusBarRef {
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
export declare type StatusBarRefAttribute = {
|
|
1017
|
+
ref?: default_2.Ref<StatusBarRef>;
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Studio
|
|
973
1022
|
*
|
|
974
1023
|
* Fully featured workbook component.
|
|
975
1024
|
* * controlled/uncontrolled workbook
|
|
@@ -985,21 +1034,21 @@ declare type Source = 'prop' | 'class' | 'media';
|
|
|
985
1034
|
*
|
|
986
1035
|
* API:
|
|
987
1036
|
*
|
|
988
|
-
* - [
|
|
1037
|
+
* - [Studio](https://api.sheetxl.com/variables/_sheetxl_studio-mui.Studio.html)
|
|
989
1038
|
*/
|
|
990
|
-
export declare const
|
|
1039
|
+
export declare const Studio: default_2.FC<StudioProps & WorkbookRefAttribute>;
|
|
991
1040
|
|
|
992
1041
|
/**
|
|
993
|
-
* Properties for the
|
|
1042
|
+
* Properties for the Studio component.
|
|
994
1043
|
*/
|
|
995
|
-
export declare interface
|
|
1044
|
+
export declare interface StudioProps extends Omit<WorkbookElementProps, "workbook" | "onError"> {
|
|
996
1045
|
/**
|
|
997
1046
|
* The model to use in the IWorkbookElement.
|
|
998
1047
|
*
|
|
999
1048
|
* @remarks
|
|
1000
1049
|
* If not provided a default model will be created.
|
|
1001
1050
|
*/
|
|
1002
|
-
workbook?: IWorkbook | Promise<IWorkbook> | WorkbookHandle | ReadWorkbookOptions;
|
|
1051
|
+
workbook?: IWorkbook | Promise<IWorkbook> | WorkbookHandle | Promise<WorkbookHandle> | ReadWorkbookOptions;
|
|
1003
1052
|
/**
|
|
1004
1053
|
* Called if the `IWorkbook` changes.
|
|
1005
1054
|
*
|
|
@@ -1049,15 +1098,15 @@ export declare interface StandaloneWorkbookProps extends Omit<WorkbookElementPro
|
|
|
1049
1098
|
*/
|
|
1050
1099
|
importExportDisabled?: boolean;
|
|
1051
1100
|
/**
|
|
1052
|
-
*
|
|
1101
|
+
* Studio will inherit the theme unless this is explicitly set.
|
|
1053
1102
|
*
|
|
1054
1103
|
* @remarks
|
|
1055
1104
|
* If this is set then there are two additional options that can be provided:
|
|
1056
|
-
* *
|
|
1057
|
-
* *
|
|
1058
|
-
* *
|
|
1105
|
+
* * onModeChange(mode: ThemeMode);
|
|
1106
|
+
* * onDarkGridChange(allow: boolean);
|
|
1107
|
+
* * onDarkImagesChange(allow: boolean);
|
|
1059
1108
|
*/
|
|
1060
|
-
|
|
1109
|
+
themeOptions?: ThemeModeOptions;
|
|
1061
1110
|
/**
|
|
1062
1111
|
* Autofocus on load. If loading multiple workbooks or using an a secondary component this
|
|
1063
1112
|
* should be set to false.
|
|
@@ -1079,49 +1128,6 @@ export declare interface StandaloneWorkbookProps extends Omit<WorkbookElementPro
|
|
|
1079
1128
|
licenseKey?: string;
|
|
1080
1129
|
}
|
|
1081
1130
|
|
|
1082
|
-
/**
|
|
1083
|
-
* This show the current cell state as an unstyled editable field.
|
|
1084
|
-
* This wraps this with material styling and submit and cancel buttons
|
|
1085
|
-
*/
|
|
1086
|
-
export declare const StatusBar: default_2.FC<StatusBarProps & StatusBarRefAttribute>;
|
|
1087
|
-
|
|
1088
|
-
export declare interface StatusBarItem {
|
|
1089
|
-
/**
|
|
1090
|
-
* Use for identifying the item
|
|
1091
|
-
*/
|
|
1092
|
-
key: string;
|
|
1093
|
-
createElement(props: BoxProps): default_2.ReactElement;
|
|
1094
|
-
/**
|
|
1095
|
-
* If not provided, we will create a default menu item
|
|
1096
|
-
* @param props
|
|
1097
|
-
*/
|
|
1098
|
-
createMenuItem?(props: BoxProps): default_2.ReactElement;
|
|
1099
|
-
/**
|
|
1100
|
-
* Should we show a divider before this item
|
|
1101
|
-
*/
|
|
1102
|
-
hasDivider?: boolean;
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
export declare interface StatusBarProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
1106
|
-
/**
|
|
1107
|
-
* MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
|
|
1108
|
-
*/
|
|
1109
|
-
sx?: SxProps<Theme>;
|
|
1110
|
-
/**
|
|
1111
|
-
* The Sheet.
|
|
1112
|
-
*/
|
|
1113
|
-
sheet?: ISheet;
|
|
1114
|
-
gridStyle?: GridStyle;
|
|
1115
|
-
childrenEnd?: default_2.ReactNode | undefined;
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
export declare interface StatusBarRef {
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
export declare type StatusBarRefAttribute = {
|
|
1122
|
-
ref?: default_2.Ref<StatusBarRef>;
|
|
1123
|
-
};
|
|
1124
|
-
|
|
1125
1131
|
export declare const StyledStrokeIcon: (props: StyledStrokeIconProps) => default_2.ReactElement;
|
|
1126
1132
|
|
|
1127
1133
|
export declare interface StyledStrokeIconProps extends SvgIconProps {
|
|
@@ -1260,6 +1266,12 @@ export declare const ThemeMode: {
|
|
|
1260
1266
|
export declare type ThemeMode = typeof ThemeMode[keyof typeof ThemeMode];
|
|
1261
1267
|
|
|
1262
1268
|
export declare interface ThemeModeOptions {
|
|
1269
|
+
/**
|
|
1270
|
+
* The user doesn't want to use the default.
|
|
1271
|
+
*
|
|
1272
|
+
* @defaultValue the system default
|
|
1273
|
+
*/
|
|
1274
|
+
mode?: ThemeMode;
|
|
1263
1275
|
/**
|
|
1264
1276
|
* Customizations to the theme.
|
|
1265
1277
|
*
|
|
@@ -1278,12 +1290,6 @@ export declare interface ThemeModeOptions {
|
|
|
1278
1290
|
* @defaultValue Theme values
|
|
1279
1291
|
*/
|
|
1280
1292
|
dark?: ThemeOptions;
|
|
1281
|
-
/**
|
|
1282
|
-
* The user doesn't want to use the default.
|
|
1283
|
-
*
|
|
1284
|
-
* @defaultValue null
|
|
1285
|
-
*/
|
|
1286
|
-
forceMode?: ThemeMode;
|
|
1287
1293
|
/**
|
|
1288
1294
|
* By default the the standalone workbook grid will be the same theme as the workbook.
|
|
1289
1295
|
* If forceGridLight is `true` then the grid will always use the light mode.
|
|
@@ -1294,16 +1300,16 @@ export declare interface ThemeModeOptions {
|
|
|
1294
1300
|
* When the grid has a dark theme it will attempt to use DocTheme dark colors
|
|
1295
1301
|
* but will 'force' non dark-themed colors to be light via an inversion algo.
|
|
1296
1302
|
*
|
|
1297
|
-
* @defaultValue
|
|
1303
|
+
* @defaultValue false
|
|
1298
1304
|
*/
|
|
1299
|
-
|
|
1305
|
+
enableDarkGrid?: boolean;
|
|
1300
1306
|
/**
|
|
1301
1307
|
* By default the the standalone workbook images will invert images if the grid
|
|
1302
1308
|
* is in dark mode.
|
|
1303
1309
|
*
|
|
1304
1310
|
* @defaultValue false
|
|
1305
1311
|
*/
|
|
1306
|
-
|
|
1312
|
+
enableDarkImages?: boolean;
|
|
1307
1313
|
/**
|
|
1308
1314
|
* When theming also apply the MUI CssBaseline.
|
|
1309
1315
|
*
|
|
@@ -1317,9 +1323,9 @@ export declare interface ThemeModeOptions {
|
|
|
1317
1323
|
* * This is only used if the themeOptions are not provided.
|
|
1318
1324
|
* * If `null` is sent then the theme should inherit.
|
|
1319
1325
|
*/
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1326
|
+
onModeChange?: (mode: ThemeMode | null) => void;
|
|
1327
|
+
onEnabledDarkGridChange?: (allow: boolean) => void;
|
|
1328
|
+
onEnabledDarkImagesChange?: (allow: boolean) => void;
|
|
1323
1329
|
}
|
|
1324
1330
|
|
|
1325
1331
|
export declare const ThemeSelectButton: default_2.FC<ThemeSelectButtonProps>;
|
|
@@ -1663,9 +1669,10 @@ export declare interface WorkbookElementProps extends Omit<PaperProps, 'autoFocu
|
|
|
1663
1669
|
headersTheme?: Theme;
|
|
1664
1670
|
/**
|
|
1665
1671
|
* If dark theme then the images will invert unless true.
|
|
1672
|
+
*
|
|
1666
1673
|
* @defaultValue false
|
|
1667
1674
|
*/
|
|
1668
|
-
|
|
1675
|
+
enableDarkImages?: boolean;
|
|
1669
1676
|
}
|
|
1670
1677
|
|
|
1671
1678
|
/**
|
|
@@ -1673,7 +1680,37 @@ export declare interface WorkbookElementProps extends Omit<PaperProps, 'autoFocu
|
|
|
1673
1680
|
*/
|
|
1674
1681
|
export declare const WorkbookIO: _WorkbookIO;
|
|
1675
1682
|
|
|
1676
|
-
|
|
1683
|
+
/**
|
|
1684
|
+
* Wraps the IO WorkbookIO class to provide lazy import.
|
|
1685
|
+
*
|
|
1686
|
+
* Documented
|
|
1687
|
+
*/
|
|
1688
|
+
export declare class _WorkbookIO {
|
|
1689
|
+
private _readFormatType;
|
|
1690
|
+
private _writeFormatType;
|
|
1691
|
+
constructor(readFormatType?: ReadFormatType[], writeFormatType?: WriteFormatType[]);
|
|
1692
|
+
getReadFormats(): readonly ReadFormatType[];
|
|
1693
|
+
getWriteFormats(): readonly WriteFormatType[];
|
|
1694
|
+
/**
|
|
1695
|
+
* A string array of all the mimeTYpes. Used for the input accept attribute.
|
|
1696
|
+
*
|
|
1697
|
+
* @returns An array of strings for the input types.
|
|
1698
|
+
*/
|
|
1699
|
+
getAllReadFormatTypeAsString(): string[];
|
|
1700
|
+
/**
|
|
1701
|
+
* Exports to the local file system attempting to use the fileName provided. This will
|
|
1702
|
+
* use the exportType to determine the export handler to use.
|
|
1703
|
+
*
|
|
1704
|
+
* @returns a Promise indicating success or failure.
|
|
1705
|
+
*/
|
|
1706
|
+
writeFile(fileName: string | null, workbook: IWorkbook, options?: WriteWorkbookOptions): Promise<boolean>;
|
|
1707
|
+
/**
|
|
1708
|
+
* Returns A record that includes a title and a promise for the workbook.
|
|
1709
|
+
*
|
|
1710
|
+
* @param options {@link ReadWorkbookOptions}
|
|
1711
|
+
*/
|
|
1712
|
+
read(options: ReadWorkbookOptions, notifier?: Notifier): Promise<WorkbookHandle>;
|
|
1713
|
+
}
|
|
1677
1714
|
|
|
1678
1715
|
export declare type WorkbookLoadEvent = {
|
|
1679
1716
|
source: IWorkbookElement;
|