@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
|
Name: @sheetxl/utils-mui
|
|
2
|
-
Version: 0.4.
|
|
2
|
+
Version: 0.4.9
|
|
3
3
|
License: SEE LICENSE IN <LICENSE>
|
|
4
4
|
Private: false
|
|
5
5
|
Description: Utilities MUI - Utilities for MUI Components needed for all SheetXL components.
|
|
@@ -148,7 +148,7 @@ Licensed under the **MIT** license
|
|
|
148
148
|
---
|
|
149
149
|
|
|
150
150
|
Name: @sheetxl/react
|
|
151
|
-
Version: 0.4.
|
|
151
|
+
Version: 0.4.9
|
|
152
152
|
License: SEE LICENSE IN <LICENSE>
|
|
153
153
|
Private: false
|
|
154
154
|
Description: React - React components needed to build advanced grid and spreadsheet UIs.
|
|
@@ -434,7 +434,7 @@ terms above.
|
|
|
434
434
|
---
|
|
435
435
|
|
|
436
436
|
Name: @sheetxl/io
|
|
437
|
-
Version: 0.4.
|
|
437
|
+
Version: 0.4.9
|
|
438
438
|
License: SEE LICENSE IN <LICENSE>
|
|
439
439
|
Private: false
|
|
440
440
|
Description: IO - Import/Export Libraries for SheetXL.
|
|
@@ -880,7 +880,7 @@ License Copyright:
|
|
|
880
880
|
---
|
|
881
881
|
|
|
882
882
|
Name: @sheetxl/utils
|
|
883
|
-
Version: 0.4.
|
|
883
|
+
Version: 0.4.9
|
|
884
884
|
License: SEE LICENSE IN <LICENSE>
|
|
885
885
|
Private: false
|
|
886
886
|
Description: Utils - Utilities used by most SheetXL components.
|
|
@@ -902,7 +902,7 @@ https://www.sheetxl.com/licensing-pricing
|
|
|
902
902
|
---
|
|
903
903
|
|
|
904
904
|
Name: @sheetxl/utils-react
|
|
905
|
-
Version: 0.4.
|
|
905
|
+
Version: 0.4.9
|
|
906
906
|
License: SEE LICENSE IN <LICENSE>
|
|
907
907
|
Private: false
|
|
908
908
|
Description: Utils React - Utilities for React capabilities needed for all SheetXL components.
|
|
@@ -993,7 +993,7 @@ SOFTWARE.
|
|
|
993
993
|
---
|
|
994
994
|
|
|
995
995
|
Name: @sheetxl/grid-react
|
|
996
|
-
Version: 0.4.
|
|
996
|
+
Version: 0.4.9
|
|
997
997
|
License: SEE LICENSE IN <LICENSE>
|
|
998
998
|
Private: false
|
|
999
999
|
Description: Grid React - Advanced grid component for React
|
|
@@ -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,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,11 +1,11 @@
|
|
|
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 { e as t } from "./index.mjs";
|
|
8
|
-
import { c as e, b as s, r, t as o, a as i, p as n, d as l } from "./
|
|
8
|
+
import { c as e, b as s, r, t as o, a as i, p as n, d as l } from "./uY021f9cZSWYX0--.mjs";
|
|
9
9
|
import { IFont as a, IAutoFilter as c, Sort as u, IRange as h, AddressUtils as p, IFill as g, IStyle as d, ITextFrame as m, FormulaError as b, IBorder as f } from "@sheetxl/sdk";
|
|
10
10
|
class A {
|
|
11
11
|
constructor(t2) {
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.4.9
|
|
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 o, Fragment as t } from "react/jsx-runtime";
|
|
8
|
+
import n, { forwardRef as r, useState as a, useCallback as s, isValidElement as i, memo as l, createElement as c, useMemo as d, useRef as p, useEffect as m, useLayoutEffect as k } from "react";
|
|
9
|
+
import u from "clsx";
|
|
10
|
+
import { mergeRefs as h } from "react-merge-refs";
|
|
11
|
+
import { ErrorBoundary as b } from "react-error-boundary";
|
|
12
|
+
import { useSnackbar as g, SnackbarContent as w, SnackbarProvider as f } from "notistack";
|
|
13
|
+
import { useTheme as y, ThemeProvider as x } from "@mui/material/styles/index.js";
|
|
14
|
+
import { Card as C, CardActions as D, Typography as W, IconButton as E, Collapse as v, Box as S, SvgIcon as M, CssBaseline as T } from "@mui/material";
|
|
15
|
+
import { PartialError as L, CommonUtils as O, UndoManager as F, Workbook as I } from "@sheetxl/sdk";
|
|
16
|
+
import { _ as P, P as A, E as j, a as N, t as R, j as _, d as U, F as H, T as K, WorkbookIO as $, U as G, b as z, N as q, W as V, k as B, K as X, r as J, l as Y, V as Z, AppearanceCommandButton as Q, e as ee, Y as oe, c as te, X as ne, f as re, g as ae, useResolvedThemeMode as se, ThemeMode as ie, u as le, h as ce, i as de, L as pe, m as me, y as ke, HelpCommandButton as ue, o as he, n as be, $ as ge, p as we, WorkbookTitle as fe, WorkbookElement as ye, M as xe, s as Ce } from "./index.mjs";
|
|
17
|
+
import { useMeasure as De } from "react-use";
|
|
18
|
+
import { ExpandMore as We, Close as Ee, CancelOutlined as ve } from "@mui/icons-material";
|
|
19
|
+
const Se = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, Me = r((t2, n2) => {
|
|
20
|
+
const { id: r2, message: l2, iconVariant: c2, error: d2, hideIconVariant: p2, ...m2 } = t2, { closeSnackbar: k2 } = g(), h2 = y(), [b2, f2] = a(false), x2 = s(() => {
|
|
21
|
+
f2((e2) => !e2);
|
|
22
|
+
}, []), S2 = s(() => {
|
|
23
|
+
k2(r2);
|
|
24
|
+
}, [r2, k2]);
|
|
25
|
+
let M2 = d2?.message;
|
|
26
|
+
return !M2 && i(l2) && (M2 = l2), M2 || "string" != typeof l2 || (M2 = l2), M2 || (M2 = `Unknown Error: ${l2}`), e(w, { ref: n2, className: u(Se.root, "error-snackbar"), children: o(C, { className: Se.card, style: { backgroundColor: h2.palette.error.dark, border: `1px solid ${h2.palette.error.dark}` }, children: [o(D, { className: Se.actionRoot, children: [p2 ? null : c2?.error, e(W, { variant: "body2", component: "div", className: Se.typography, style: { color: h2.palette.text.primary }, children: M2 }), e("div", { style: { flex: "1 1 auto" } }), o("div", { className: Se.icons, children: [d2 ? e(E, { "aria-label": "Show more", size: "small", className: u(Se.expand, { [Se.expandOpen]: b2 }), style: { color: h2.palette.action.active }, onClick: x2, children: e(We, {}) }) : null, e(E, { size: "small", className: Se.expand, style: { color: h2.palette.action.active }, onClick: S2, children: e(Ee, { fontSize: "small" }) })] })] }), d2 ? e(v, { in: b2, timeout: "auto", unmountOnExit: true, children: e("div", { className: Se.stackTraceContainer, style: { backgroundColor: h2.palette.error.light, borderTop: `1px solid ${h2.palette.error.main}` }, children: e(P, { error: d2, hideLineNumbers: true }) }) }) : null] }) });
|
|
27
|
+
});
|
|
28
|
+
Me.displayName = "ToastError";
|
|
29
|
+
const Te = l(r((n2, r2) => {
|
|
30
|
+
const { commands: a2, commandHook: s2, scope: i2 = "workbook", disabled: l2 = false, ...d2 } = n2, p2 = A((n3) => {
|
|
31
|
+
const r3 = { variant: R.Menuitem, parentFloat: n3.floatReference, commandHook: s2, scope: i2, disabled: l2 }, d3 = o(t, { children: [e(j, { ...r3, command: a2.getCommand("newWorkbook"), icon: N(e(_, {})) }), e(U, { orientation: "horizontal" }), e(j, { ...r3, command: a2.getCommand("openWorkbook"), icon: N(e(H, {})) }), e(K, { ...r3, commands: a2, quickCommand: "saveWorkbook", icon: N(e(V, {})), createPopupPanel: (o2) => {
|
|
32
|
+
const t2 = { ...r3, parentFloat: o2.floatReference, scope: "saveWorkbook" }, n4 = [];
|
|
33
|
+
return $.getWriteFormats().forEach((o3) => {
|
|
34
|
+
if (o3.isDefault) return;
|
|
35
|
+
let r4 = null;
|
|
36
|
+
"CSV" === o3.key ? r4 = N(e(G, {})) : "Excel" === o3.key && (r4 = N(e(z, {})));
|
|
37
|
+
const s3 = a2.getCommand(`saveWorkbookAs${o3.key}`);
|
|
38
|
+
s3 ? n4.push(c(j, { ...t2, key: o3.key, command: s3, icon: r4 })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${o3.key}'`);
|
|
39
|
+
}), q({ ...o2, children: n4, onClick: () => {
|
|
40
|
+
o2.closeFloatAll();
|
|
41
|
+
} });
|
|
42
|
+
} })] });
|
|
43
|
+
return q({ ...n3, children: d3, onClick: (e2) => {
|
|
44
|
+
e2.isDefaultPrevented || n3.closeFloatAll();
|
|
45
|
+
} });
|
|
46
|
+
}, [l2, a2, s2, i2]), m2 = "File";
|
|
47
|
+
return e(K, { commands: a2, disabled: l2, commandHook: s2, scope: i2, label: m2, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (e2) => `calc(1.25rem + ${e2.spacing(2)}px)` } }, ...d2, createPopupPanel: p2, icon: e(B, { className: "label", icon: null, label: m2 }) });
|
|
48
|
+
}));
|
|
49
|
+
Te.displayName = "StandaloneFileCommandButton";
|
|
50
|
+
const Le = e(Y, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: e(S, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: e(Z, { onClick: () => {
|
|
51
|
+
window?.open("https://www.sheetxl.com", "_blank");
|
|
52
|
+
}, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Oe = l(r((t2, n2) => {
|
|
53
|
+
const { commands: r2, workbook: a2, logo: s2 = Le, mainElement: i2, showFileMenu: l2 = true, showAppearanceMenu: c2 = true, ...m2 } = t2, { reference: k2 } = X(), [u2, { width: b2 }] = De(), g2 = b2 < 530, w2 = l2 ? e(Te, { commands: r2, commandHook: { beforeExecute() {
|
|
54
|
+
k2?.closeAll();
|
|
55
|
+
}, onError(e2, o2, t3) {
|
|
56
|
+
} } }) : null, f2 = c2 ? e(Q, { commands: r2, commandHook: { beforeExecute() {
|
|
57
|
+
k2?.closeAll();
|
|
58
|
+
}, onError(e2, o2, t3) {
|
|
59
|
+
} } }) : null, y2 = d(() => ({ paddingLeft: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1) }), []), x2 = p(null);
|
|
60
|
+
return e(S, { ref: h([x2, u2, n2]), ...m2, children: J({ commands: r2, renderCompact: g2, workbook: a2, selectWrapper: (t3) => o(S, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (e2) => e2.spacing(1), paddingLeft: (e2) => e2.spacing(1), paddingRight: (e2) => e2.spacing(1) }, children: [o(S, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e2) => e2.spacing(0.5) }, children: [s2, o(S, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e2) => e2.spacing(0.25) }, children: [w2, t3] })] }), e(S, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: i2 }), e(S, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: g2 && !f2 ? "0 0 auto" : "1 1 100%" }, children: f2 })] }), selectProps: y2, toolbarsProps: { Home: { sx: {} } } }) });
|
|
61
|
+
}));
|
|
62
|
+
Oe.displayName = "StudioToolbar";
|
|
63
|
+
const Fe = l(r((r2, i2) => {
|
|
64
|
+
const { workbook: l2, setWorkbook: c2, refWorkbookTitle: k2, titleWorkbook: u2, setWorkbookTitle: h2, titlePlaceHolder: b2, children: w2, undoManager: f2, commands: y2, importExportDisabled: x2, themeOptions: C2 } = r2, D2 = g(), W2 = D2 ? D2.enqueueSnackbar : () => {
|
|
65
|
+
}, v2 = D2 ? D2.closeSnackbar : () => {
|
|
66
|
+
}, [S2, M2] = a({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), T2 = s(() => {
|
|
67
|
+
M2((e2) => ({ ...e2, isMounted: true }));
|
|
68
|
+
}, []), O2 = s(() => {
|
|
69
|
+
M2((e2) => ({ ...e2, isMounted: false }));
|
|
70
|
+
}, []), F2 = ce(), I2 = de(), P2 = pe(), j2 = p(/* @__PURE__ */ new Set()), N2 = d(() => {
|
|
71
|
+
const o2 = (o3, t2) => {
|
|
72
|
+
if (t2?.onceKey) {
|
|
73
|
+
if (j2.current.has(t2.onceKey)) return;
|
|
74
|
+
const e2 = new Set(j2.current);
|
|
75
|
+
e2.add(t2.onceKey), j2.current = e2;
|
|
76
|
+
}
|
|
77
|
+
const n2 = { variant: t2?.type ?? he.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t2?.preventDuplicate, persist: t2?.persist ?? t2?.type === he.Error, action: (o4) => e(E, { onClick: () => v2(o4), children: e(ve, {}) }) };
|
|
78
|
+
t2?.enqueueProps && Object.assign(n2, t2.enqueueProps), o3 || console.log("message is 'null'", t2), W2(o3 ?? "Alert", n2);
|
|
79
|
+
};
|
|
80
|
+
return { showMessage: o2, showBusy: (e2, o3) => {
|
|
81
|
+
let t2 = null;
|
|
82
|
+
const n2 = new Promise((e3) => {
|
|
83
|
+
t2 = e3;
|
|
84
|
+
});
|
|
85
|
+
return M2((o4) => {
|
|
86
|
+
const r3 = new Map(o4.starting);
|
|
87
|
+
r3.set(n2, t2);
|
|
88
|
+
return { ...o4, label: e2, starting: r3 };
|
|
89
|
+
}), n2;
|
|
90
|
+
}, showWindow: (e2, o3, t2) => {
|
|
91
|
+
const n2 = { ...o3, onKeyDown: (e3) => {
|
|
92
|
+
y2?.dispatchToFocusedCommand(e3), e3.isDefaultPrevented() || e3.isPropagationStopped() || o3?.onKeyDown?.(e3);
|
|
93
|
+
} };
|
|
94
|
+
return F2(e2, { sort: () => import("./B18g9zjzyR9YL3Mv.mjs"), numberFormat: () => import("./BfuG4JD3t3n1uOci.mjs"), hyperlink: () => import("./DODhKM0Qeycx3Hvp.mjs"), comments: () => import("./CsbP0EYKOHobzZCu.mjs"), find: () => import("./v4fR5lIq2IqY_Clq.mjs"), tableDetails: () => import("./DWKLdf_rn5dajRBA.mjs"), tableNew: () => import("./CijBL1IDWaxPgQ_E.mjs"), namedDetails: () => import("./CILOMzOF30-XSZqR.mjs") }[e2], n2, t2);
|
|
95
|
+
}, showOptions: I2, showInputOptions: P2, showError: (e2) => {
|
|
96
|
+
let t2, n2 = he.Error, r3 = "Unknown Error";
|
|
97
|
+
"string" == typeof e2 ? r3 = e2 : e2 instanceof Error && (t2 = e2, e2.message && (r3 = e2.message)), e2 instanceof L && (n2 = he.Info), o2(r3, { type: n2, enqueueProps: { error: t2 } });
|
|
98
|
+
} };
|
|
99
|
+
}, []), R2 = s(() => {
|
|
100
|
+
}, []), _2 = ((e2) => {
|
|
101
|
+
const { workbook: o2, setWorkbook: t2, importExportDisabled: r3, workbookTitle: a2 = "export", setWorkbookTitle: i3, notifier: l3, requestWorkbookTitle: c3, themeOptions: p2, undoManager: k3, commands: u3, onExecute: h3 } = e2, b3 = A(p2?.onModeChange, [p2?.onModeChange]), g2 = A(p2?.onEnabledDarkGridChange, [p2?.onEnabledDarkGridChange]), w3 = A(p2?.onEnabledDarkImagesChange, [p2?.onEnabledDarkImagesChange]), f3 = A(async (e3 = null, o3 = null) => {
|
|
102
|
+
const t3 = [];
|
|
103
|
+
let n2, r4 = null, a3 = null;
|
|
104
|
+
if ("string" == typeof e3 ? a3 = e3 : r4 = e3, n2 = r4 ? e3 : await ee.openFileDialog(a3 ?? $.getAllReadFormatTypeAsString().join(",")), !n2) return null;
|
|
105
|
+
const s2 = { source: n2, createWorkbookOptions: o3, onWarning: (e4) => {
|
|
106
|
+
t3.push(e4);
|
|
107
|
+
} }, i4 = await $.read(s2, l3);
|
|
108
|
+
return t3.length > 0 && (l3?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn("Import warnings:\n" + t3.join("\n"))), i4;
|
|
109
|
+
}, [h3, l3, o2]), y3 = A(async (e3, o3, t3) => {
|
|
110
|
+
if (!o3 && c3) {
|
|
111
|
+
const o4 = await c3("Enter Workbook name to " + (t3.isDefault ? "Save." : `Export as ${t3.description}.`));
|
|
112
|
+
return null !== o4 && $.writeFile(o4, e3, { formatType: t3.key });
|
|
113
|
+
}
|
|
114
|
+
return $.writeFile(o3, e3, { formatType: t3.key });
|
|
115
|
+
}, [l3, o2, c3]), x3 = s(() => ({ contains: (e3) => true, focus() {
|
|
116
|
+
} }), []), C3 = d(() => {
|
|
117
|
+
const e3 = [];
|
|
118
|
+
r3 || ($.getWriteFormats().forEach((t3) => {
|
|
119
|
+
const n3 = t3.isDefault, r4 = { label: n3 ? "Save Workbook" : `Save Workbook as ${t3.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${t3.description}` }, tags: t3.tags, description: `Save the workbook to the desktop${n3 ? "" : ` as ${t3.description}`}.` };
|
|
120
|
+
n3 && (r4.shortcut = { key: "S", modifiers: [te.Ctrl] }, e3.push(new oe("saveWorkbookAs", x3, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [te.Shift, te.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
|
|
121
|
+
y3(o2, null, t3).catch((e4) => {
|
|
122
|
+
l3?.showError?.(e4);
|
|
123
|
+
});
|
|
124
|
+
})));
|
|
125
|
+
const s2 = n3 ? "saveWorkbook" : `saveWorkbookAs${t3.key}`;
|
|
126
|
+
e3.push(new oe(s2, x3, r4, (e4) => {
|
|
127
|
+
y3(o2, e4 ?? a2, t3).catch((e5) => {
|
|
128
|
+
l3?.showError?.(e5);
|
|
129
|
+
});
|
|
130
|
+
}));
|
|
131
|
+
}), e3.push(new oe("openWorkbook", x3, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [te.Ctrl] } }, async (e4 = null) => {
|
|
132
|
+
const n3 = { date1904: o2.isDate1904(), ...o2.options };
|
|
133
|
+
try {
|
|
134
|
+
const r4 = await f3(e4, n3);
|
|
135
|
+
if (!r4) return;
|
|
136
|
+
const a3 = r4.title, s2 = r4.workbook, c4 = s2.getSelectedSheet();
|
|
137
|
+
if ("text/csv" === r4.formatType.mimeType) {
|
|
138
|
+
const e5 = o2.findValidSheetName(a3);
|
|
139
|
+
await o2.doBatch(async () => {
|
|
140
|
+
const t3 = c4.getUsedRange();
|
|
141
|
+
if (!t3) return void l3?.showMessage("The file appears to be blank.");
|
|
142
|
+
const n4 = o2.getSheets().add({ name: e5, autoSelect: true }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 });
|
|
143
|
+
await n4.copyFrom(t3);
|
|
144
|
+
}, `Import CSV '${a3}'`);
|
|
145
|
+
} else o2?.close(), i3?.(a3), t2(s2);
|
|
146
|
+
} catch (e5) {
|
|
147
|
+
l3?.showError?.(e5);
|
|
148
|
+
}
|
|
149
|
+
})), e3.push(new oe("openWorkbookFromUrl", x3, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e4) {
|
|
150
|
+
if (!e4) {
|
|
151
|
+
const o3 = await l3?.showInputOptions?.({ title: "Open Workbook from the Web", description: "Enter the web address for the workbook to open.", inputLabel: "Address", initialValue: "https://www.sheetxl.com/examples/features-checklist.xlsx", inputProps: { style: { minWidth: "440px" } }, options: ["Open"] });
|
|
152
|
+
if ("Open" !== o3.option) return;
|
|
153
|
+
e4 = o3.input;
|
|
154
|
+
}
|
|
155
|
+
e4 && console.log("openWorkbookFromUrl", e4);
|
|
156
|
+
})));
|
|
157
|
+
let n2 = [];
|
|
158
|
+
return p2 && (n2 = [new oe("themeMode", x3, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new oe("defaultThemeMode", x3, { label: "Use System Light/Dark Mode", scopedLabels: { appearance: "Use System Default" }, description: "Use the system settings to determine styling for light and dark mode." }), new oe("enableDarkGrid", x3, { label: "Enable Dark Grid", description: "Allow the grid to render in dark mode if dark mode is being used. This is ensures that the grid will render the colors as specified in another tools (for example Excel)." }), new oe("enableDarkImages", x3, { label: "Enable Dark Images", description: "Allow the images to render in dark mode if dark mode is being used. This is ensures that the images will render the colors as specified in another tools (for example Excel). This only has any effect if the grid is in dark mode." })]), [...e3, ...n2, new ne("help", x3, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
|
|
159
|
+
}), new ne("showKeyboardShortcuts", x3, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [te.Ctrl] } }, () => {
|
|
160
|
+
}), new oe("gotoUrlGithub", x3, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
|
|
161
|
+
window?.open("https://github.com/sheetxl/sheetxl");
|
|
162
|
+
}), new oe("gotoUrlDiscord", x3, { label: "Discord", description: "Join our community on discord." }, () => {
|
|
163
|
+
window?.open("https://discord.gg/NTKdwUgK9p");
|
|
164
|
+
}), new oe("gotoUrlDocumentation", x3, { label: "Documentation", description: "Read the documentation." }, () => {
|
|
165
|
+
window?.open("https://www.sheetxl.com/docs");
|
|
166
|
+
}), new oe("gotoUrlIssue", x3, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
|
|
167
|
+
window?.open("https://github.com/sheetxl/sheetxl/issues");
|
|
168
|
+
})];
|
|
169
|
+
}, [o2, a2, l3, r3, p2, u3, k3]), D3 = d(() => {
|
|
170
|
+
let e3 = null;
|
|
171
|
+
return e3 = u3 ? u3.createChildGroup(x3, "standaloneWorkbook", false) : new re(x3, "standaloneWorkbook"), e3.addCommands(C3, true), e3;
|
|
172
|
+
}, [u3, C3]);
|
|
173
|
+
ae({ manager: k3, commands: D3, notifier: l3 });
|
|
174
|
+
const { themeMode: W3 } = se();
|
|
175
|
+
m(() => {
|
|
176
|
+
if (!p2 || !D3) return;
|
|
177
|
+
const e3 = "dark" === p2.mode || !p2.mode && "dark" === W3;
|
|
178
|
+
D3.getCommand("themeMode").update({ state: p2.mode ?? null, label: e3 ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: e3 ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
|
|
179
|
+
b3(e3 ? ie.Light : ie.Dark);
|
|
180
|
+
}), D3.getCommand("defaultThemeMode").update({ state: !p2.mode }).updateCallback(() => {
|
|
181
|
+
b3(null);
|
|
182
|
+
}), D3.getCommand("enableDarkGrid").update({ state: p2.enableDarkGrid }).updateCallback(() => {
|
|
183
|
+
g2(!p2.enableDarkGrid);
|
|
184
|
+
}), D3.getCommand("enableDarkImages").update({ state: p2.enableDarkImages }).updateCallback(() => {
|
|
185
|
+
w3(!p2.enableDarkImages);
|
|
186
|
+
});
|
|
187
|
+
}, [W3, p2, C3]);
|
|
188
|
+
const { showModal: E2 } = le();
|
|
189
|
+
return m(() => {
|
|
190
|
+
const e3 = () => new Promise((e4, o3) => {
|
|
191
|
+
const t3 = n.lazy(() => import("./DHmVr6jRLzt6lD1x.mjs")), r4 = E2(t3, { title: "Shortcut Keys Reference", commands: D3, onDone: () => {
|
|
192
|
+
r4.hide();
|
|
193
|
+
}, TransitionProps: { onExited: () => {
|
|
194
|
+
e4(true);
|
|
195
|
+
} } });
|
|
196
|
+
});
|
|
197
|
+
D3.getCommand("showKeyboardShortcuts").updateCallback(() => e3()), D3.getCommand("help").updateCallback(() => e3());
|
|
198
|
+
}, [C3, D3]), D3;
|
|
199
|
+
})({ workbook: l2, setWorkbook: c2, importExportDisabled: x2, workbookTitle: u2, setWorkbookTitle: h2, commands: y2, requestWorkbookTitle: (e2) => new Promise((o2) => {
|
|
200
|
+
k2.current ? k2.current.requestWorkbookTitle((e3, t2) => {
|
|
201
|
+
o2(e3);
|
|
202
|
+
}, { selectAll: true, requestReason: e2 }) : o2(b2);
|
|
203
|
+
}), themeOptions: C2, undoManager: f2, notifier: N2, onExecute: R2 });
|
|
204
|
+
m(() => {
|
|
205
|
+
S2.starting.size <= 0 || !S2.isMounted || M2((e2) => {
|
|
206
|
+
const o2 = new Map(e2.running);
|
|
207
|
+
e2.starting.forEach((e3, t2) => {
|
|
208
|
+
const n2 = () => {
|
|
209
|
+
M2((e4) => {
|
|
210
|
+
const o3 = new Map(e4.running);
|
|
211
|
+
o3.delete(t2);
|
|
212
|
+
return { ...e4, running: o3 };
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
o2.set(t2, n2), e3(n2);
|
|
216
|
+
});
|
|
217
|
+
return { ...e2, starting: /* @__PURE__ */ new Map(), running: o2 };
|
|
218
|
+
});
|
|
219
|
+
}, [S2]);
|
|
220
|
+
const [U2, H2] = a(null);
|
|
221
|
+
m(() => {
|
|
222
|
+
0 !== S2.starting.size || 0 !== S2.running.size ? H2(e(me, { icon: e(ke, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: true, label: S2.label, onMount: T2, onUnmount: O2, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : H2(null);
|
|
223
|
+
}, [S2.starting, S2.running]);
|
|
224
|
+
const K2 = d(() => e(ue, { commands: _2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [_2]), G2 = { notifier: N2, commands: _2 };
|
|
225
|
+
return l2 && (G2.statusBarProps = { childrenEnd: K2 }), o(t, { children: [U2, w2 ? n.cloneElement(w2, G2) : null] });
|
|
226
|
+
}));
|
|
227
|
+
Fe.displayName = "SnackbarAndCommandsWrapper";
|
|
228
|
+
const Ie = l(r((t2, n2) => {
|
|
229
|
+
const { className: r2, sx: i2, style: l2, onElementLoad: c2, onError: g2, undoManager: w2, errorPanel: y2 = be, onKeyDown: C2, workbook: D2, createWorkbookOptions: W2, onWorkbookChange: E2, logo: v2, importExportDisabled: L2 = false, themeOptions: P2, autoFocus: j2 = false, commands: N2, title: R2, onTitleChange: _2, titleProps: U2, renderLoadingPanel: H2, ...K2 } = t2, G2 = p(null), z2 = A(E2, [E2]), q2 = A(_2 ?? U2?.onTitleChange, [_2 ?? U2?.onTitleChange]), V2 = U2?.placeHolder ?? "Untitled", B2 = P2?.mode, { themeMode: X2, source: J2 } = se({ mode: B2 }), Y2 = d(() => ({ ...P2, light: ge(false, O.deepMerge(P2?.theme ?? {}, P2?.light ?? {})), dark: ge(true, O.deepMerge(P2?.theme ?? {}, P2?.dark ?? {})) }), [P2]), Z2 = X2 === ie.Dark, [Q2, ee2] = a(null);
|
|
230
|
+
m(() => {
|
|
231
|
+
ee2(w2 ?? new F());
|
|
232
|
+
}, [w2]);
|
|
233
|
+
const [oe2, te2] = a(null), [ne2, ae2] = a(null), le2 = we();
|
|
234
|
+
k(() => {
|
|
235
|
+
if (!D2 || 0 === Object.keys(D2).length && !O.isPromiseLike(D2)) {
|
|
236
|
+
const e2 = { theme: le2.getDefaultTheme(), ...W2 };
|
|
237
|
+
ae2(new I(e2));
|
|
238
|
+
} else ae2(D2);
|
|
239
|
+
}, [D2]), k(() => {
|
|
240
|
+
if (!ne2) return;
|
|
241
|
+
if (ne2 instanceof I) return te2({ workbook: ne2 }), void (D2 !== ne2 && z2?.(ne2));
|
|
242
|
+
(async () => {
|
|
243
|
+
try {
|
|
244
|
+
let e2, o2 = await Promise.resolve(ne2);
|
|
245
|
+
o2 && o2.source && (o2 = await $.read(o2)), o2.workbook ? (ue2(o2.title), e2 = o2.workbook) : e2 = o2, z2?.(e2), te2({ workbook: e2 });
|
|
246
|
+
} catch (e2) {
|
|
247
|
+
z2?.(null), te2({ error: e2 });
|
|
248
|
+
}
|
|
249
|
+
})();
|
|
250
|
+
}, [ne2]);
|
|
251
|
+
const [ce2, de2] = a(null);
|
|
252
|
+
m(() => {
|
|
253
|
+
if (!Q2 || !oe2) return;
|
|
254
|
+
Q2.clear();
|
|
255
|
+
const e2 = oe2?.workbook?.getTransactions();
|
|
256
|
+
if (!e2) return;
|
|
257
|
+
return e2.addListener({ onCommitEnd: (o2) => {
|
|
258
|
+
o2.getDescription() ? Q2.addUndoOperation({ description: o2.getDescription(), undo: () => (e2.revert(o2.getId()), ce2.source?.focus(), () => {
|
|
259
|
+
e2.restore(o2.getId()), ce2.source?.focus();
|
|
260
|
+
}) }) : console.warn("commit has no description", o2);
|
|
261
|
+
} });
|
|
262
|
+
}, [Q2, oe2, ce2]);
|
|
263
|
+
const pe2 = A((e2) => {
|
|
264
|
+
e2 ? Q2.setRepeatableOperation({ description: e2.label(), repeat: async () => e2.execute() }) : Q2.setRepeatableOperation(null);
|
|
265
|
+
}, [Q2]), [ke2, ue2] = a(R2 ?? U2?.title ?? "");
|
|
266
|
+
m(() => {
|
|
267
|
+
ue2(R2 ?? U2?.title ?? "");
|
|
268
|
+
}, [R2 ?? U2?.title]), m(() => {
|
|
269
|
+
q2?.(ke2);
|
|
270
|
+
}, [ke2]);
|
|
271
|
+
const [he2, De2] = a(null), We2 = d(() => {
|
|
272
|
+
const e2 = () => ({ contains: (e3) => true, focus() {
|
|
273
|
+
} });
|
|
274
|
+
return N2 ? N2.createChildGroup(e2, "application", false) : new re(e2, "application");
|
|
275
|
+
}, [N2]), Ee2 = A((e2) => {
|
|
276
|
+
De2(e2.source.getViewportElement()), de2(e2), We2.activate("sheet"), c2?.(e2);
|
|
277
|
+
}, [We2]);
|
|
278
|
+
m(() => {
|
|
279
|
+
ce2 && j2 && ce2.source?.focus("object" == typeof j2 ? j2 : void 0);
|
|
280
|
+
}, [ce2]);
|
|
281
|
+
const ve2 = p(null), Se2 = s((o2) => {
|
|
282
|
+
let t3 = null;
|
|
283
|
+
return U2?.hidden || (t3 = e(fe, { ...U2, style: { maxWidth: "100%", ...U2?.style }, workbook: G2.current, ref: ve2, title: ke2, placeHolder: V2, onTitleChange: (e2) => {
|
|
284
|
+
ue2(e2);
|
|
285
|
+
} })), e(Oe, { ...o2, logo: v2, mainElement: t3, showFileMenu: !L2, showAppearanceMenu: !!(Y2?.onEnabledDarkGridChange || Y2?.onEnabledDarkImagesChange || Y2?.onModeChange) });
|
|
286
|
+
}, [v2, ke2, U2, Y2, L2, We2]);
|
|
287
|
+
m(() => {
|
|
288
|
+
const e2 = (e3) => e3.preventDefault();
|
|
289
|
+
return G2.current?.addEventListener("wheel", e2, { passive: false }), () => {
|
|
290
|
+
G2.current?.removeEventListener("wheel", e2);
|
|
291
|
+
};
|
|
292
|
+
}, []);
|
|
293
|
+
const Te2 = d(() => {
|
|
294
|
+
const o2 = { transparentBackground: true };
|
|
295
|
+
return e(S, { sx: i2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...l2 }, children: H2?.(o2) ?? e(me, { ...o2 }) });
|
|
296
|
+
}, [i2, l2, H2]), Le2 = s(({ error: o2 }) => (g2?.(o2), e(y2, { sx: i2, style: l2, error: o2 ?? "Unable to display empty workbook." })), [i2, l2, g2]), Ie2 = d(() => ({ ...i2, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-MuiContent *": { fontFamily: (e2) => e2.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [i2]), Pe = h([G2, n2]), Ae = d(() => {
|
|
297
|
+
if (!oe2) return Te2;
|
|
298
|
+
if (oe2.error || !oe2.workbook) return Le2({ error: oe2.error });
|
|
299
|
+
let o2 = null, t3 = null, n3 = false;
|
|
300
|
+
return Y2 && (o2 = Z2 ? Y2.dark : Y2.light, t3 = Z2 && Y2.enableDarkGrid ? Y2.dark : Y2.light, n3 = Y2.enableDarkImages), e(ye, { sx: Ie2, style: l2, tabIndex: 0, autoFocus: true, workbook: oe2.workbook, ref: Pe, renderToolbar: Se2, onElementLoad: Ee2, onRepeatCommandChange: pe2, onKeyDown: (e2) => {
|
|
301
|
+
C2?.(e2);
|
|
302
|
+
}, renderLoadingPanel: H2, gridTheme: t3, headersTheme: o2, enableDarkImages: n3, className: u(r2, "sheetxl-workbook"), onContextMenu: (e2) => e2.preventDefault(), ...K2 }, "WorkbookElement");
|
|
303
|
+
}, [oe2, ke2, Q2, Te2, H2, Y2, K2, Se2, Ie2]);
|
|
304
|
+
let je = e(b, { fallbackRender: Le2, children: e(f, { maxSnack: 3, domRoot: he2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e2, o2, t3) => {
|
|
305
|
+
G2.current?.focus();
|
|
306
|
+
}, Components: { error: Me }, iconVariant: { success: e(M, { style: { marginRight: "8px" }, children: e("path", { d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" }) }), error: e(Ce, { style: { marginRight: "8px" } }) }, children: e(xe, { children: e(Fe, { workbook: oe2?.workbook, setWorkbook: ae2, importExportDisabled: L2, titlePlaceHolder: V2, titleWorkbook: ke2, setWorkbookTitle: ue2, refWorkbookTitle: ve2, commands: We2, undoManager: Q2, themeOptions: Y2, children: Ae }) }) }) });
|
|
307
|
+
return Y2 && (je = o(x, { theme: Z2 ? Y2.dark : Y2.light, children: [Y2.cssBaseline ? e(T, {}) : null, je] })), je;
|
|
308
|
+
}));
|
|
309
|
+
Ie.displayName = "EagerStudio";
|
|
310
|
+
export {
|
|
311
|
+
Ie as default
|
|
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.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,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,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,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,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,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,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,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,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,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,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,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,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.
|
|
@@ -10,27 +10,27 @@ import { useMeasure as s } from "react-use";
|
|
|
10
10
|
import { DialogContent as r, Box as c } from "@mui/material";
|
|
11
11
|
import { R as d, S as g, Z as m, P as p, A as h, NamedInput as u, RangeInput as x, d as f, TableStyleOptionsPanel as y, TableStylePreview as b, E as w, a as S, t as C, a0 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: B, ...I } = o2, [P, j] = n(false), [z, L] = n(false), E = a(null), [O, A] = i((e2) => e2 + 1, 0), [M, { width:
|
|
13
|
+
const { title: v2, onHide: R, autoFocusSel: T = ".range-input input", context: F, notifier: D = d, command: H, commands: B, ...I } = o2, [P, j] = n(false), [z, L] = n(false), E = a(null), [O, A] = i((e2) => e2 + 1, 0), [M, { width: V }] = s();
|
|
14
14
|
g(H);
|
|
15
|
-
const
|
|
16
|
-
m(
|
|
17
|
-
q(
|
|
15
|
+
const W = F ?? H.context(), Z = W.table(), [k, q] = n(() => Z ? W.getNames().getRanges(Z.getRange()) : null), G = l(() => Z?.getName() ?? "", [Z]);
|
|
16
|
+
m(W.table(), { onAnchorCoordsChange(e2) {
|
|
17
|
+
q(W.getNames().getRanges(e2.getRange()));
|
|
18
18
|
}, onProtectedChange(e2) {
|
|
19
19
|
A();
|
|
20
20
|
} });
|
|
21
21
|
const J = p((e2) => {
|
|
22
|
-
|
|
23
|
-
}, [
|
|
24
|
-
|
|
25
|
-
}, [
|
|
22
|
+
W?.table().setName(e2);
|
|
23
|
+
}, [W]), K = p((e2) => {
|
|
24
|
+
W?.table().resize(e2.at(0));
|
|
25
|
+
}, [W]);
|
|
26
26
|
let Q = null;
|
|
27
|
-
return
|
|
27
|
+
return W.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: E, title: v2 ?? "Table Details", initialPosition: { y: "35" }, autoFocusSel: T, onHide: R, onFocus: () => j(true), onBlur: (e2) => {
|
|
28
28
|
E?.current?.contains(e2.relatedTarget) || j(false);
|
|
29
|
-
}, PaperProps: { elevation: P ? 3 : 1 }, ...I, 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:
|
|
30
|
-
Z && Z.getName().toLowerCase() === e2.toLowerCase() ||
|
|
29
|
+
}, PaperProps: { elevation: P ? 3 : 1 }, ...I, 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: W.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: Z?.getName() ?? "No table", onChangeInput: J, onValidate: (e2) => {
|
|
30
|
+
Z && Z.getName().toLowerCase() === e2.toLowerCase() || W?.getNames().validateName(e2);
|
|
31
31
|
}, disabled: Z?.isProtected() ?? true, onFocus: (e2) => {
|
|
32
32
|
z || e2.target?.select(), L(true);
|
|
33
|
-
} }), e(x, { formName: "range", value: k, onChangeInput: K, resolvedAddress:
|
|
33
|
+
} }), e(x, { formName: "range", value: k, onChangeInput: K, resolvedAddress: W.getNames().getRanges.bind(W.getNames()), disabled: Z?.isProtected() ?? true, onFocus: (e2) => {
|
|
34
34
|
z || e2.target?.select(), L(true);
|
|
35
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: Z?.isProtected(), styleOptions: Z?.getStyleOptions() ?? null, onStyleOptionsChange: (e2) => {
|
|
36
36
|
Z.updateStyleOptions(e2);
|
|
@@ -52,7 +52,7 @@ const v = o((o2) => {
|
|
|
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: Z, styles:
|
|
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: Z, styles: W.styles(), bodyStyle: W.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: B.getCommand("convertTableToRange"), commandState: Z, icon: S(e(N, {})) }), e(w, { variant: C.Menuitem, commandState: Z, command: B.getCommand("deleteTable"), icon: S(e(N, {})) })] })] })] }), Q] }) });
|
|
56
56
|
});
|
|
57
57
|
export {
|
|
58
58
|
v as TableDetailsWindow,
|
|
@@ -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.
|
|
@@ -16,23 +16,23 @@ const r = async (e2, r2) => {
|
|
|
16
16
|
}
|
|
17
17
|
return function e4(r4, n4, o2, f2) {
|
|
18
18
|
if (null == r4 || "object" != typeof r4) return JSON.stringify(r4);
|
|
19
|
-
const i2 = t2(n4),
|
|
19
|
+
const i2 = t2(n4), a = t2(n4 + 1);
|
|
20
20
|
if (Array.isArray(r4)) {
|
|
21
21
|
const t3 = r4.length;
|
|
22
22
|
if (0 === t3) return "[]";
|
|
23
23
|
if (0 !== o2) return JSON.stringify(r4);
|
|
24
24
|
let f3 = "[\n";
|
|
25
|
-
for (let i3 = 0; i3 < t3; i3++) f3 +=
|
|
25
|
+
for (let i3 = 0; i3 < t3; i3++) f3 += a + e4(r4[i3], n4 + 1, o2 + 1, true), i3 < t3 - 1 && (f3 += ",\n");
|
|
26
26
|
return f3 += "\n" + i2 + "]", f3;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const s = Object.keys(r4), u = s.length;
|
|
29
29
|
if (0 === u) return "{}";
|
|
30
30
|
if (!(o2 < 2)) return JSON.stringify(r4);
|
|
31
31
|
let c = "{\n";
|
|
32
32
|
f2 || (o2 = 0);
|
|
33
33
|
for (let t3 = 0; t3 < u; t3++) {
|
|
34
|
-
const f3 =
|
|
35
|
-
c +=
|
|
34
|
+
const f3 = s[t3];
|
|
35
|
+
c += a + JSON.stringify(f3) + ": " + e4(r4[f3], n4 + 1, o2, false), t3 < u - 1 && (c += ",\n");
|
|
36
36
|
}
|
|
37
37
|
return c += "\n" + i2 + "}", c;
|
|
38
38
|
}(e3, 0, 0, false);
|
|
@@ -69,7 +69,7 @@ const r = async (e2, r2) => {
|
|
|
69
69
|
return (await new Response(f2).blob()).arrayBuffer();
|
|
70
70
|
}(t));
|
|
71
71
|
let o = new TextDecoder().decode(t);
|
|
72
|
-
const f = JSON.parse(o), i = { ...n2?.
|
|
72
|
+
const f = JSON.parse(o), i = { ...n2?.createWorkbookOptions ?? {}, json: f };
|
|
73
73
|
return new e(i);
|
|
74
74
|
};
|
|
75
75
|
export {
|
|
@@ -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.
|