@sheetxl/studio-mui 0.7.14 → 0.7.15
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/{DqwSkMX3TSwbvSfO.cjs → BIVHB4D4Gd1WeeLi.cjs} +8 -8
- package/browser/cjs/{Ij3b1ONhNaWLtkRT.cjs → BaYmI4hURso6vppd.cjs} +2 -2
- package/browser/cjs/{CYMqmv5IamB1x14k.cjs → BbIg9meUh8UPbj5t.cjs} +3 -3
- package/browser/cjs/{CHc92OjHJrS2B3rB.cjs → BrHqwHQYxx_QoXOn.cjs} +2 -2
- package/browser/cjs/{CAxeR5WYtM_OKUqg.cjs → Caqz5dZzQdiFjnRX.cjs} +2 -2
- package/browser/cjs/{CC-q_GCvhI_uweI4.cjs → DGqqkGBv1nc0eMrE.cjs} +1 -1
- package/browser/cjs/{CwHuP4ot4XxM1FbL.cjs → DzrSXv2CLKkFc2iG.cjs} +2 -2
- package/browser/cjs/{CN5q08lr4Coj9gzy.cjs → NsGloilMLNL8CAF_.cjs} +1 -1
- package/browser/cjs/{-SJdVflEYXFC2raH.cjs → awYqXNcQZFnOqrrv.cjs} +1 -1
- package/browser/cjs/{NpKL7qsDwzMarfjO.cjs → byyZab6_Rq6ZwIYg.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{BE0n-qrL7I0lr2f8.cjs → ivFORJI1ljTPQpJ2.cjs} +1 -1
- package/browser/cjs/{DjU4LQ7p0jFx8PsW.cjs → tvv7jDqgAa8czbFA.cjs} +1 -1
- package/browser/esm/{BzkODf-EDNHsbeYC.mjs → 5qhzMLdi7OBuLx6W.mjs} +1 -1
- package/browser/esm/{D8YtOXZWnL-YI48g.mjs → B9PEZFokQCC6zWwX.mjs} +451 -451
- package/browser/esm/{Cd127EllJy0H1x8s.mjs → BPgEvjsqtBt1B2oO.mjs} +3 -3
- package/browser/esm/{BlDN4JPF9n_TeCyQ.mjs → BZduiiKwWAowYSJN.mjs} +2 -2
- package/browser/esm/{aWQ7-rGmyvVU_nRK.mjs → C5hFZQeTMy4agdCE.mjs} +2 -2
- package/browser/esm/{CfkKWfDbYhDDort6.mjs → CDCURsqip4PNsKB-.mjs} +2 -2
- package/browser/esm/{DezB6LbrlA_MqNpH.mjs → CM0ti_Ro-ofiPiXw.mjs} +1 -1
- package/browser/esm/{BzS-7g64cdTk8pFd.mjs → DA9w10YtGRm1py3s.mjs} +1 -1
- package/browser/esm/{XGwUZoREuZ029cPM.mjs → DC4JZaW8S6fOywMr.mjs} +1 -1
- package/browser/esm/{BLiSCviFgWhD9SmC.mjs → DDCEwJwqSNFJukUi.mjs} +1 -1
- package/browser/esm/{DlZXGLXt7KBqpCgX.mjs → DduI_lE9r-_xxx2i.mjs} +2 -2
- package/browser/esm/{BNF5wwVTFO0bKhDb.mjs → ZdlfLFFcDkayt99n.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{CM8Jkahi0myGVt_v.mjs → BXf4P001RgMA5mab.mjs} +1 -1
- package/node/esm/{B6-CF_32FCaDZJDm.mjs → BqynBoGwxZpdEh30.mjs} +1 -1
- package/node/esm/{C8TcDhw9hCrJxqfJ.mjs → ByMXScn3ChpsqcAb.mjs} +1 -1
- package/node/esm/{C62EF6LSsPD4LAL6.mjs → By_L4EWHTADEr1Le.mjs} +1 -1
- package/node/esm/{4D3fLVzYqPTas9nR.mjs → C0dHRankOSZU4PNG.mjs} +1 -1
- package/node/esm/{xCdMLxN5xcpczFUI.mjs → D9ZBRNgjCgvdTHiX.mjs} +1 -1
- package/node/esm/{D9PLpUGQqMmk1V9n.mjs → DCsofbikio_bDbqi.mjs} +1 -1
- package/node/esm/{CeJ5myvgfYOUSKGq.mjs → DL58IAMOmJKHu2ka.mjs} +1 -1
- package/node/esm/{C21w0yQGlygcFqHI.mjs → DhGAUFPxQRjIn4QH.mjs} +1 -1
- package/node/esm/{CREPL1yvIjmYpU-r.mjs → N3PqbkXORQ3Qfzls.mjs} +1 -1
- package/node/esm/index.mjs +132 -132
- package/package.json +8 -8
package/node/esm/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.15
|
|
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 { Color as e, IColor as t, ITheme as o, CommonUtils as n, IBorder as a, FontUtils as r, IFont as l, NumberFormat as i, IFontCollection as s, IStyle as d, ITextFrame as c, Table as m, IFill as p, CoordUtils as u, ISheet as g, LicenseManager as h, Workbook as f, TypesUtils as x } from "@sheetxl/sdk";
|
|
8
8
|
import { LicenseManager } from "@sheetxl/sdk";
|
|
9
|
-
import { StyledStrokePath as b, StaticBorderRenderer as y, useModelListener as w, createCellEditStateFromCell as S, SheetCellEditor as k, ScriptEditor as C, DefaultTaskPaneRegistry as v, useTaskPaneArea as T, useDocThemes as R, TabStrip as
|
|
9
|
+
import { StyledStrokePath as b, StaticBorderRenderer as y, useModelListener as w, createCellEditStateFromCell as S, SheetCellEditor as k, ScriptEditor as C, DefaultTaskPaneRegistry as v, useTaskPaneArea as T, useDocThemes as R, TabStrip as P, SheetElement as D, SheetScrollbar as M, PictureEditor as F, ChartEditor as N, EmptyFrame as B, LogoNoPaddingIcon as E, TaskPaneArea as A, TaskPaneProvider as I } from "@sheetxl/react";
|
|
10
10
|
import { DefaultTaskPaneRegistry, useModelListener, useRangeListener } from "@sheetxl/react";
|
|
11
11
|
import { jsxs as L, Fragment as H, jsx as z } from "react/jsx-runtime";
|
|
12
12
|
import W, { memo as $, forwardRef as O, useMemo as V, useCallback as K, isValidElement as G, useState as U, useEffect as j, Suspense as _, useRef as q, createElement as X, useReducer as Z, useImperativeHandle as Y, useLayoutEffect as Q } from "react";
|
|
13
13
|
import { Box as J, Typography as ee, IconButton as te, MenuItem as oe, Divider as ne, Button as ae, SvgIcon as re, Input as le, FormControlLabel as ie, Checkbox as se, FormControl as de, TextField as ce, InputAdornment as me, Slider as pe, Paper as ue, CircularProgress as ge, Select as he, Tabs as fe, Tab as xe, useMediaQuery as be, Card as ye, CardActions as we, Collapse as Se, DialogTitle as ke, CssBaseline as Ce } from "@mui/material";
|
|
14
|
-
import { CommandButton as ve, ExhibitDivider as Te, defaultCreatePopupPanel as Re, CommandPopupButton as
|
|
14
|
+
import { CommandButton as ve, ExhibitDivider as Te, defaultCreatePopupPanel as Re, CommandPopupButton as Pe, InputCommandButton as De, SimpleTooltip as Me, LoadingPanel as Fe, PopupButtonType as Ne, ExhibitPopupIconButton as Be, ExhibitPopupMenuItem as Ee, ExhibitMenuItem as Ae, createStrokeShadowFilter as Ie, strokeShadowFilter as Le, ExhibitTooltip as He, ExhibitIconButton as ze, CommandTooltip as We, SimpleCommandPopupButton as $e, SelectedIcon as Oe, LabelIcon as Ve, ExhibitMenuHeader as Ke, ContextMenu as Ge, ExhibitOptionButton as Ue, hexToRGB as je, useFloatStack as _e, elevateColor as qe, CommandToolbar as Xe, createScrollEdgeButton as Ze, createScrollEndButton as Ye, createScrollStartButton as Qe, scrollbarTheming as Je, StackTrace as et, useResolvedThemeMode as tt, ThemeMode as ot, useModal as nt, useLazyWindow as at, useOptionsDialog as rt, useInputDialog as lt, AnimatedTraversingEllipsisIcon as it, ErrorPanel as st, createExhibitTheme as dt, ModalProvider as ct } from "@sheetxl/utils-mui";
|
|
15
15
|
import mt from "clsx";
|
|
16
|
-
import { useCommands as pt, CommandButtonType as ut, useCallbackRef as gt, ReactUtils as ht, KeyCodes as ft, DynamicIcon as xt, useCommand as bt, useMouseDownAndHoldListener as yt, useEditMode as wt, useNotifier as St, NotifierType as kt, useImperativeElement as Ct, SplitPane as vt, RoundedTab as Tt, DefaultDynamicIconService as Rt, SimpleCommand as
|
|
16
|
+
import { useCommands as pt, CommandButtonType as ut, useCallbackRef as gt, ReactUtils as ht, KeyCodes as ft, DynamicIcon as xt, useCommand as bt, useMouseDownAndHoldListener as yt, useEditMode as wt, useNotifier as St, NotifierType as kt, useImperativeElement as Ct, SplitPane as vt, RoundedTab as Tt, DefaultDynamicIconService as Rt, SimpleCommand as Pt, Command as Dt, KeyModifiers as Mt, CommandGroup as Ft, ToolTipPlacement as Nt, ScrollPane as Bt, useUndoManager as Et, DefaultReactNotifier as At, NotifierProvider as It, UncaughtErrorBoundary as Lt, ReactErrorBoundary as Ht } from "@sheetxl/utils-react";
|
|
17
17
|
import { useTheme as zt, alpha as Wt, getOverlayAlpha as $t, ThemeProvider as Ot } from "@mui/material/styles";
|
|
18
18
|
import { alpha as Vt } from "@mui/system";
|
|
19
19
|
import { useFormContext as Kt } from "react-hook-form";
|
|
@@ -37,7 +37,7 @@ const ro = $(O((e2, t2) => {
|
|
|
37
37
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatAlignLeftToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignCenterToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignRightToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignJustifyToggle") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("formatAlignCenterContinuousToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignFillToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignDistributedHorizontalToggle") })] }), s3 = L(J, { sx: { className: mt("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [z(ve, { command: t3.getCommand("formatIndentDecrease"), commandHook: c2, scope: a2, disabled: r2 }), z(ve, { command: t3.getCommand("formatIndentIncrease"), commandHook: c2, scope: a2, disabled: r2 })] }), d3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i2, children: [s3, z(Te, { orientation: "horizontal" }), z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l3 })] });
|
|
38
38
|
return Re({ ...e3, children: d3 });
|
|
39
39
|
}, [r2, n2]);
|
|
40
|
-
return z(
|
|
40
|
+
return z(Pe, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: m2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d2?.key(), icon: d2?.icon() ?? "FormatAlignLeft", ...i2 });
|
|
41
41
|
})), lo = $(O((e2, t2) => {
|
|
42
42
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), { activeCommand: s2, allDisabled: d2 } = V(() => {
|
|
43
43
|
const e3 = i2.length;
|
|
@@ -51,7 +51,7 @@ const ro = $(O((e2, t2) => {
|
|
|
51
51
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatAlignTopToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignMiddleToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignBottomToggle") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("formatAlignJustifyVerticalToggle") }), z(ve, { ...o3, command: t3.getCommand("formatAlignDistributedVerticalToggle") })] });
|
|
52
52
|
return Re({ ...e3, children: l3 });
|
|
53
53
|
}, [r2, n2]);
|
|
54
|
-
return z(
|
|
54
|
+
return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: c2, disabled: r2 || d2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: s2?.icon() ?? "TextVerticalBottom", ...l2 });
|
|
55
55
|
})), io = $(O((e2, t2) => {
|
|
56
56
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), { activeCommand: s2, allDisabled: d2 } = V(() => {
|
|
57
57
|
const e3 = i2.length;
|
|
@@ -65,7 +65,7 @@ const ro = $(O((e2, t2) => {
|
|
|
65
65
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatTextOverflowVisibleToggle") }), z(ve, { ...o3, command: t3.getCommand("formatTextOverflowWrapToggle") }), z(ve, { ...o3, command: t3.getCommand("formatTextOverflowClipToggle") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("formatTextOverflowShrinkToggle") })] });
|
|
66
66
|
return Re({ ...e3, children: l3 });
|
|
67
67
|
}, [r2, n2, a2]);
|
|
68
|
-
return z(
|
|
68
|
+
return z(Pe, { ref: t2, commands: o2, commandHook: n2, disabled: r2 || d2, scope: a2, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: c2, icon: s2?.icon() ?? "TextHorizontalOverflow", ...l2 });
|
|
69
69
|
})), so = $(O((e2, t2) => {
|
|
70
70
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = V(() => {
|
|
71
71
|
const e3 = i2.length;
|
|
@@ -75,10 +75,10 @@ const ro = $(O((e2, t2) => {
|
|
|
75
75
|
}
|
|
76
76
|
return i2[1];
|
|
77
77
|
}, [i2]), d2 = K((e3, t3) => {
|
|
78
|
-
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatTextRotate0") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate315") }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate45") }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate90") }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate270") }), z(Te, { orientation: "horizontal" }), z(
|
|
78
|
+
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatTextRotate0") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate315") }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate45") }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate90") }), z(ve, { ...o3, command: t3.getCommand("formatTextRotate270") }), z(Te, { orientation: "horizontal" }), z(De, { ...o3, command: t3.getCommand("formatTextRotateCustom"), label: "Custom" })] });
|
|
79
79
|
return Re({ ...e3, children: l3 });
|
|
80
80
|
}, [r2, n2, a2, o2]), c2 = V(() => 0 !== (o2.getCommand("formatTextRotateCustom")?.state() ?? 0), [i2]);
|
|
81
|
-
return z(
|
|
81
|
+
return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, selected: c2, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: d2, quickCommand: c2 ? "formatTextRotate0" : "formatTextRotate315", icon: s2?.icon() ?? "TextRotation315", ...l2 });
|
|
82
82
|
})), co = { Preset: "preset", Custom: "custom" }, mo = { Start: "start", End: "end" }, po = {}, uo = (e2, t2, o2, n2) => {
|
|
83
83
|
const a2 = e2 + "-" + t2 + "-" + o2 + (n2 ? "-server" : "");
|
|
84
84
|
if (po[a2]) return po[a2];
|
|
@@ -150,8 +150,8 @@ const ro = $(O((e2, t2) => {
|
|
|
150
150
|
r2?.set(d2, s2);
|
|
151
151
|
const c2 = s2.toRGBA().toString();
|
|
152
152
|
l2?.set(c2, s2);
|
|
153
|
-
}, So = W.lazy(() => import("./
|
|
154
|
-
const { selectedColor: r2 = null, previewColor: l2 = t2.selectedColor ?? null, recentColors: i2, schemeLookup: s2, disableAlpha: d2 = false, previewDebounceTime: c2 = 100, initialPanelType: m2, defaultButtonSize: p2 = 24, width: u2, onElementLoad: g2, onDone: h2, onEyeDropStart: f2, onEyeDropStop: x2, onPreviewColor: b2, onPreviewColorImmediate: y2, onSelectColor: w2, autoColor: S2, autoColorLabel: k2 = "Automatic", autoColorPosition: C2 = mo.Start, compareRGB: v2 = false, darkMode: T2 = false, ...R2 } = t2,
|
|
153
|
+
}, So = W.lazy(() => import("./ByMXScn3ChpsqcAb.mjs")), ko = $(O((t2, a2) => {
|
|
154
|
+
const { selectedColor: r2 = null, previewColor: l2 = t2.selectedColor ?? null, recentColors: i2, schemeLookup: s2, disableAlpha: d2 = false, previewDebounceTime: c2 = 100, initialPanelType: m2, defaultButtonSize: p2 = 24, width: u2, onElementLoad: g2, onDone: h2, onEyeDropStart: f2, onEyeDropStop: x2, onPreviewColor: b2, onPreviewColorImmediate: y2, onSelectColor: w2, autoColor: S2, autoColorLabel: k2 = "Automatic", autoColorPosition: C2 = mo.Start, compareRGB: v2 = false, darkMode: T2 = false, ...R2 } = t2, P2 = l2 || r2, D2 = gt(b2, [b2]), M2 = gt(y2, [y2]), F2 = gt(w2, [w2]), N2 = gt(f2, [f2]), B2 = gt(x2, [x2]), [E2, A2] = U(false), I2 = zt(), W2 = V(() => s2 || e.getDefaultSchemeLookup(), [s2]), $2 = V(() => {
|
|
155
155
|
const e2 = /* @__PURE__ */ new Map(), t3 = /* @__PURE__ */ new Map(), n2 = [];
|
|
156
156
|
wo("Primary Background", "bg1", W2, n2, e2, t3), wo("Primary Text", "tx1", W2, n2, e2, t3), wo("Secondary Background", "bg2", W2, n2, e2, t3), wo("Secondary Text", "tx2", W2, n2, e2, t3), wo("Accent 1", "accent1", W2, n2, e2, t3), wo("Accent 2", "accent2", W2, n2, e2, t3), wo("Accent 3", "accent3", W2, n2, e2, t3), wo("Accent 4", "accent4", W2, n2, e2, t3), wo("Accent 5", "accent5", W2, n2, e2, t3), wo("Accent 6", "accent6", W2, n2, e2, t3);
|
|
157
157
|
const a3 = o.buildPalette(n2, W2, e2, t3), r3 = [];
|
|
@@ -182,8 +182,8 @@ const ro = $(O((e2, t2) => {
|
|
|
182
182
|
}
|
|
183
183
|
}, [r2, m2]);
|
|
184
184
|
const X2 = K(n.debounce((e2) => {
|
|
185
|
-
|
|
186
|
-
}, c2), [
|
|
185
|
+
D2?.(e2);
|
|
186
|
+
}, c2), [D2, c2]), [Z2, Y2] = U();
|
|
187
187
|
j(() => {
|
|
188
188
|
Y2(l2 || r2);
|
|
189
189
|
}, [l2, r2]);
|
|
@@ -229,8 +229,8 @@ const ro = $(O((e2, t2) => {
|
|
|
229
229
|
}, [$2, T2]), me2 = V(() => {
|
|
230
230
|
if (!O2) return;
|
|
231
231
|
const e2 = { opacity: O2 ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
|
|
232
|
-
return z(_, { fallback: z("div", { style: e2, children: z(Fe, {}) }), children: z(So, { style: e2, selectedColor:
|
|
233
|
-
}, [O2,
|
|
232
|
+
return z(_, { fallback: z("div", { style: e2, children: z(Fe, {}) }), children: z(So, { style: e2, selectedColor: P2 ? P2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
|
|
233
|
+
}, [O2, P2]), pe2 = V(() => ({ onClick: le2, alphaGrey: I2.palette.text.icon ?? I2.palette.action.active }), [le2, I2]), ue2 = V(() => {
|
|
234
234
|
if (!S2) return null;
|
|
235
235
|
const e2 = { description: k2, definition: { val: S2.getVal(), adjs: S2.getAdjustments() } };
|
|
236
236
|
return z(H, { children: L(oe, { sx: { display: "flex", color: (e3) => e3.palette.text.secondary }, onMouseOver: () => {
|
|
@@ -255,21 +255,21 @@ const ro = $(O((e2, t2) => {
|
|
|
255
255
|
k2.current || (w2(e3), f2?.(e3));
|
|
256
256
|
}, [f2]), R2 = gt((e3) => {
|
|
257
257
|
k2.current || (w2(e3), x2?.(e3));
|
|
258
|
-
}, [x2]),
|
|
258
|
+
}, [x2]), P2 = gt((e3, t3) => {
|
|
259
259
|
k2.current || (w2(void 0), b2?.(e3, t3));
|
|
260
|
-
}, [b2]),
|
|
260
|
+
}, [b2]), D2 = V(() => z(J, { className: "color-wrapper", sx: { lineHeight: "0", color: "inherit", "--sxl-color-active": `${S2?.toCSS(g2) ?? "transparent"}`, "& .activeColor": { fill: `${S2?.toCSS(g2) ?? "transparent"}` }, "& .style_grey": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, children: "function" == typeof a2 ? a2() : a2 }), [S2, a2, g2]), M2 = gt((e3) => {
|
|
261
261
|
b2?.(n2, false);
|
|
262
262
|
}, [b2, n2]), [F2, N2] = U(false), B2 = K((e3) => {
|
|
263
263
|
const { closeFloat: t3, closeFloatAll: n3 } = e3;
|
|
264
264
|
return z(ko, { ...m2, selectedColor: o2, previewColor: y2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
|
|
265
265
|
e4.which === ft.Enter && (p2 ? n3() : t3());
|
|
266
|
-
}, onPreviewColorImmediate: R2, onPreviewColor: T2, onSelectColor:
|
|
267
|
-
}, [o2, y2, p2, S2, m2?.autoColor, g2]), E2 = { onQuickClick: n2 ? M2 : void 0, createPopupPanel: B2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: v2, onPopupClose: C2, tooltip: r2 || l2 || "Color", label: l2, icon:
|
|
266
|
+
}, onPreviewColorImmediate: R2, onPreviewColor: T2, onSelectColor: P2, onEyeDropStart: () => N2(true), onEyeDropStop: () => N2(false), compareRGB: u2, darkMode: g2 });
|
|
267
|
+
}, [o2, y2, p2, S2, m2?.autoColor, g2]), E2 = { onQuickClick: n2 ? M2 : void 0, createPopupPanel: B2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: v2, onPopupClose: C2, tooltip: r2 || l2 || "Color", label: l2, icon: D2, ...h2 };
|
|
268
268
|
return c2 === Ne.Toolbar ? z(Be, { ref: t2, ...E2 }) : z(Ee, { ref: t2, ...E2 });
|
|
269
269
|
})), To = 82, Ro = (e2) => {
|
|
270
270
|
const { styleColor: t2, length: o2 = To, width: n2 = 1, dashArray: a2 = null, sx: r2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...d2 } = e2;
|
|
271
271
|
return z(re, { sx: { width: `${o2}px`, height: `${n2}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (e3) => `${t2 ? t2.toRGBA(s2).toString() : e3.palette.text.icon ?? e3.palette.action.active}` }, "& .style_grey": { stroke: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, ...r2 }, height: n2, width: o2, viewBox: `0 0 ${o2} ${n2}`, ...d2, children: z(b, { length: o2, width: n2, dashArray: a2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
|
|
272
|
-
},
|
|
272
|
+
}, Po = $(O((e2, t2) => {
|
|
273
273
|
const { variant: o2, showLabels: n2 = false, disabled: r2 = false, createPopupPanel: l2, styleColor: i2, selectedStyle: s2, onSelectStyle: d2, showNone: c2 = true, darkMode: m2, sx: p2, ...u2 } = e2, g2 = gt(d2, []), h2 = K((e3) => {
|
|
274
274
|
const { popupContainer: t3, floatReference: o3, closeFloat: l3, ...d3 } = e3, p3 = [], u3 = a.BuiltInDefinitionsArray;
|
|
275
275
|
for (let e4 = 0; e4 < u3.length; e4++) {
|
|
@@ -290,7 +290,7 @@ const ro = $(O((e2, t2) => {
|
|
|
290
290
|
return t3 = "None" === e3.description ? z(J, { sx: { minWidth: `${To}px` }, children: "None" }) : z(Ro, { styleColor: i2, length: To, width: e3.width, dashArray: e3.pattern, darkMode: m2, isDouble: e3.description.toLowerCase().includes("double"), isAngled: e3.description.toLowerCase().includes("slant") }), z(J, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Ie() } }, children: t3 });
|
|
291
291
|
}, [s2, i2]), x2 = V(() => a.BuiltInDefinitions.get(s2), [s2]), b2 = { disabled: r2, icon: f2, tooltip: "Border Style: " + x2.description, sx: { background: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, ...p2 }, createPopupPanel: h2, ...u2 };
|
|
292
292
|
return o2 === Ne.Toolbar ? z(Be, { ...b2 }) : z(Ee, { ...b2 });
|
|
293
|
-
})),
|
|
293
|
+
})), Do = $(O((t2, o2) => {
|
|
294
294
|
const { autoColor: n2 = null, schemeLookup: r2, autoStrokeStyle: l2 = a.StrokeStyle.Thin, disabled: i2 = false, darkMode: s2 = false, showStylingBefore: d2 = true, onSelectBorder: c2, onPreviewBorder: m2, selectedBorder: p2, createTemporaryBorder: u2, ...g2 } = t2, h2 = gt(c2, [c2]), f2 = gt(m2, [m2]), [x2, b2] = U(), [w2, S2] = U(), k2 = x2 ?? l2, C2 = w2 ?? n2, v2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, T2 = gt((e2) => {
|
|
295
295
|
const t3 = {}, o3 = e2 ? Object.keys(e2) : [];
|
|
296
296
|
let n3 = false;
|
|
@@ -316,21 +316,21 @@ const ro = $(O((e2, t2) => {
|
|
|
316
316
|
for (let t4 = 0; t4 < r3; t4++) n3[e2[t4]] = a2;
|
|
317
317
|
}
|
|
318
318
|
return n3;
|
|
319
|
-
}, []), D2 = K((e2) => {
|
|
320
|
-
h2?.(e2);
|
|
321
319
|
}, []), P2 = K((e2) => {
|
|
320
|
+
h2?.(e2);
|
|
321
|
+
}, []), D2 = K((e2) => {
|
|
322
322
|
f2?.(e2);
|
|
323
323
|
}, []), M2 = K((t3) => {
|
|
324
324
|
const { closeFloatAll: o3, floatReference: l3 } = t3, c3 = (e2, t4, n3 = "bottom", r3 = false) => {
|
|
325
325
|
const l4 = R2(e2, C2 ?? null, r3 ? a.StrokeStyle.None : k2 ?? null), i3 = r3 ? R2([], C2 ?? null, k2 ?? null) : l4;
|
|
326
326
|
return z(ze, { icon: T2(i3), sx: { background: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` }, tooltipProps: { label: t4, simple: true, placement: n3 }, onClick: () => {
|
|
327
|
-
o3(),
|
|
327
|
+
o3(), D2(l4), P2(l4);
|
|
328
328
|
} });
|
|
329
329
|
}, m3 = L(H, { children: [L(J, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical], "All Borders", "top"), c3([a.Edge.Horizontal, a.Edge.Vertical], "Inner Borders", "top"), c3([a.Edge.Horizontal], "Inside Horizontal Borders", "top"), c3([a.Edge.Vertical], "Inside Vertical Borders", "top"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom], "Outside Borders", "top")] }), L(J, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [c3([a.Edge.Left], "Left Borders"), c3([a.Edge.Top], "Top Borders"), c3([a.Edge.Right], "Right Borders"), c3([a.Edge.Bottom], "Bottom Borders"), c3([a.Edge.Left, a.Edge.Top, a.Edge.Right, a.Edge.Bottom, a.Edge.Horizontal, a.Edge.Vertical, a.Edge.DiagonalUp, a.Edge.DiagonalDown], "No Borders", "bottom", true)] })] }), p3 = z(H, { children: L(J, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [z(vo, { variant: Ne.Toolbar, icon: z(xt, { iconKey: "stroke.colored" }), selectedColor: k2 === a.StrokeStyle.None ? new e("transparent") : C2, onPreviewColor: (e2) => {
|
|
330
330
|
S2(e2);
|
|
331
331
|
}, onSelectColor: (e2, t4) => {
|
|
332
332
|
S2(e2);
|
|
333
|
-
}, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || k2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), z(
|
|
333
|
+
}, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || k2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), z(Po, { selectedStyle: k2, onSelectStyle: b2, styleColor: C2, darkMode: s2, variant: Ne.Toolbar, parentFloat: l3 })] }) });
|
|
334
334
|
return L(J, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [d2 ? p3 : m3, z(Te, { orientation: "horizontal" }), d2 ? m3 : p3] });
|
|
335
335
|
}, [k2, C2, n2, r2, s2]), F2 = V(() => T2(v2), [v2, s2]);
|
|
336
336
|
return z(Be, { ref: o2, createPopupPanel: M2, popupProps: { popperProps: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => z(He, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
|
|
@@ -339,24 +339,24 @@ const ro = $(O((e2, t2) => {
|
|
|
339
339
|
})), Mo = $(O((e2, t2) => {
|
|
340
340
|
const { commands: o2, command: n2, commandHook: a2, variant: r2 = ut.Toolbar, disabled: l2 = false, autoColor: i2, autoStrokeStyle: s2, schemeLookup: d2, createTemporaryBorder: c2, selectedBorder: m2, onSelectBorder: p2, darkMode: u2, icon: g2, label: h2, ...f2 } = e2, x2 = pt(o2, ["formatBorder"]), b2 = n2 ?? x2[0], y2 = b2?.context() ?? null, w2 = y2?.autoColor ?? i2, S2 = y2?.autoStyle ?? s2, k2 = m2 ?? y2?.quickBorder, C2 = u2 ?? y2?.darkMode, v2 = c2 ?? y2?.createTemporaryBorder, T2 = d2 ?? y2?.schemeLookup, R2 = gt((e3) => {
|
|
341
341
|
y2?.onBorderSelect && y2.onBorderSelect(e3), p2?.(e3), b2?.execute(e3, a2);
|
|
342
|
-
}, [b2, p2, a2]),
|
|
342
|
+
}, [b2, p2, a2]), P2 = K((e3, t3) => {
|
|
343
343
|
const { children: o3, title: n3, ...a3 } = e3;
|
|
344
344
|
let i3 = e3.children;
|
|
345
345
|
return (b2?.disabled() || l2) && (i3 = z("div", { children: i3 })), z(We, { command: b2, placement: r2 === ut.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...a3, children: i3 });
|
|
346
346
|
}, [b2, l2]);
|
|
347
|
-
return z(
|
|
347
|
+
return z(Do, { ref: t2, autoColor: w2, darkMode: C2, autoStrokeStyle: S2, createTemporaryBorder: v2, schemeLookup: T2, selectedBorder: k2, onSelectBorder: R2, createTooltip: P2, disabled: l2 || !b2 || b2.disabled(), ...f2 });
|
|
348
348
|
})), Fo = $(O((e2, t2) => {
|
|
349
349
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
|
|
350
350
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("mergeToggle") }), z(ve, { ...o3, command: t3.getCommand("mergeHorizontal") }), z(ve, { ...o3, command: t3.getCommand("mergeVertical") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("unmerge") })] });
|
|
351
351
|
return Re({ ...e3, children: l3 });
|
|
352
352
|
}, [r2, n2, a2]);
|
|
353
|
-
return z(
|
|
353
|
+
return z(Pe, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: "MergeAll", ...l2 });
|
|
354
354
|
})), No = $(O((e2, t2) => {
|
|
355
355
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
|
|
356
356
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("freezeToggle") }), z(ve, { ...o3, command: t3.getCommand("freezeToggleHorizontal") }), z(ve, { ...o3, command: t3.getCommand("freezeToggleVertical") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("unfreeze") })] });
|
|
357
357
|
return Re({ ...e3, children: l3 });
|
|
358
358
|
}, [r2, n2, a2]);
|
|
359
|
-
return z(
|
|
359
|
+
return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: i2, quickCommand: "freezeToggle", label: "Freeze Panes", tooltip: "Freeze a portion of the sheet to keep it visible while you scroll through the rest of the sheet.\\n\\nUseful for viewing data in other parts of your worksheet without losing your headers or labels.", icon: "Freeze", ...l2 });
|
|
360
360
|
})), Bo = $(O((e2, t2) => z($e, { ref: t2, ...e2, popupCommandKeys: ["find", "findReplace", "goto"], scope: "find", label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find" }))), Eo = $(O((e2, t2) => {
|
|
361
361
|
const { command: o2, commandHook: n2, showQuickButtons: a2 = !!e2.commands, commands: i2, fontSizes: s2 = r.DefaultFontSizes, disabled: d2 = false, parentFloat: c2, icon: m2, label: p2, sx: u2, ...g2 } = e2;
|
|
362
362
|
bt(o2);
|
|
@@ -446,7 +446,7 @@ const ro = $(O((e2, t2) => {
|
|
|
446
446
|
const e3 = i.Type.MediumTime;
|
|
447
447
|
return `${l.getSharedMeasurer()(e3, Math.round(h2.typography.fontSize), h2.typography.fontFamily).width}px`;
|
|
448
448
|
}, [h2]);
|
|
449
|
-
return z(
|
|
449
|
+
return z(Pe, { ref: t2, commands: o2, sx: r2, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => z(He, { label: m2?.label(), description: m2?.description(), disabled: t3, children: e3 }), icon: z(J, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, color: (e3) => e3.palette.text.secondary, fontFamily: (e3) => e3.typography.fontFamily, width: f2 }, children: z(J, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: p2 }) }), ...c2 });
|
|
450
450
|
})), Lo = $(O((e2, t2) => z($e, { ref: t2, ...e2, popupCommandKeys: ["clearAll", "clearFormats", "clearContents", "clearComments", "clearHyperlinks"], scope: "clear", label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", icon: "ClearAll" }))), Ho = $(O((e2, t2) => z($e, { ref: t2, ...e2, popupCommandKeys: ["fillDown", "fillRight", "fillUp", "fillLeft"], scope: "fill", label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", icon: "FillDown" }))), zo = $(O((e2, t2) => {
|
|
451
451
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = ut.Toolbar, ...c2 } = e2, m2 = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns", "addSheet"];
|
|
452
452
|
l2 || m2.push("addSheet");
|
|
@@ -465,7 +465,7 @@ const ro = $(O((e2, t2) => {
|
|
|
465
465
|
const i3 = L(H, { children: [z(ve, { ...a3, command: p2[0] }), z(ve, { ...a3, command: p2[1] }), z(Te, { orientation: "horizontal" }), z(ve, { ...a3, command: p2[2] }), z(ve, { ...a3, command: p2[3] }), o3] });
|
|
466
466
|
return Re({ ...e3, children: i3 });
|
|
467
467
|
}, [r2, p2, n2, a2]);
|
|
468
|
-
return u2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, ...c2 }) : z(
|
|
468
|
+
return u2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, ...c2 }) : z(Pe, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || g2, tooltip: L(H, { children: [z("span", { children: "Insert new cells, rows or columns to your workbook." }), z("br", {}), z("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: h2, ...c2 });
|
|
469
469
|
})), Wo = $(O((e2, t2) => {
|
|
470
470
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = ut.Toolbar, ...c2 } = e2, m2 = ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"];
|
|
471
471
|
l2 || m2.push("deleteSheet");
|
|
@@ -484,13 +484,13 @@ const ro = $(O((e2, t2) => {
|
|
|
484
484
|
const i3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("deleteCellsShiftUp") }), z(ve, { ...o3, command: t3.getCommand("deleteCellsShiftLeft") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("deleteRows") }), z(ve, { ...o3, command: t3.getCommand("deleteColumns") }), a3] });
|
|
485
485
|
return Re({ ...e3, children: i3 });
|
|
486
486
|
}, [r2, n2, a2]);
|
|
487
|
-
return u2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, ...c2 }) : z(
|
|
487
|
+
return u2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, ...c2 }) : z(Pe, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || g2, tooltip: L(H, { children: [z("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), z("br", {}), z("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: h2, ...c2 });
|
|
488
488
|
})), $o = $(O((e2, t2) => {
|
|
489
489
|
const { commands: o2, commandHook: n2, scope: a2, ...r2 } = e2, l2 = K((e3, o3) => {
|
|
490
490
|
const a3 = { variant: ut.Menuitem, commandHook: n2, scope: "formatCells" }, r3 = { commands: o3, parentFloat: e3.floatReference, ...a3 }, l3 = L(H, { children: [z(ve, { ...a3, command: o3.getCommand("resizeRows") }), z(ve, { ...a3, command: o3.getCommand("autoFitRows") }), z(Te, { orientation: "horizontal" }), z(ve, { ...a3, command: o3.getCommand("resizeColumns") }), z(ve, { ...a3, command: o3.getCommand("autoFitColumns") }), z(Te, { orientation: "horizontal" }), z($e, { ref: t2, ...r3, popupCommandKeys: ["hideColumns", "hideRows", null, "unhideColumns", "unhideRows"], popupScope: "hideUnhide", label: "Hide & Unhide" })] });
|
|
491
491
|
return Re({ ...e3, children: l3 });
|
|
492
492
|
}, [n2, a2]);
|
|
493
|
-
return z(
|
|
493
|
+
return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: l2, icon: "CellsFormat", label: "Format Cells", tooltip: "Change row and column sizes or visibility.", ...r2 });
|
|
494
494
|
}));
|
|
495
495
|
$o.displayName = "CellsFormatCommandButton";
|
|
496
496
|
const Oo = $(O((t2, o2) => {
|
|
@@ -515,19 +515,19 @@ const Vo = $(O((e2, t2) => {
|
|
|
515
515
|
const o3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("gridlinesToggle") }), z(Oo, { ...o3, command: t3.getCommand("sheetViewFormatGridlinesColor"), icon: z(xt, { iconKey: "stroke.colored" }), panelProps: { disableAlpha: true } }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesColumns") }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesRows") })] });
|
|
516
516
|
return Re({ ...e3, children: l3 });
|
|
517
517
|
}, [r2, n2]);
|
|
518
|
-
return z(
|
|
518
|
+
return z(Pe, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Gridlines", tooltip: "Configure how the lines between rows and columns in the sheet are displayed.", icon: z(Ve, { command: s2[0], scope: "view" }), ...i2 });
|
|
519
519
|
})), Ko = $(O((e2, t2) => {
|
|
520
520
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
|
|
521
521
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = t3.getCommand("sortCustom"), l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("sortAscending") }), z(ve, { ...o3, command: t3.getCommand("sortDescending") }), a3 ? z(ve, { ...o3, command: a3 }) : null, z(Te, { orientation: "horizontal" }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle") }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear") }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply") })] });
|
|
522
522
|
return Re({ ...e3, children: l3 });
|
|
523
523
|
}, [r2, n2, a2]);
|
|
524
|
-
return z(
|
|
524
|
+
return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Sort", tooltip: L(H, { children: [z("span", { children: "Organize your data so it's easier to analyze." }), z("br", {}), z("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: "SortFilter", ...l2 });
|
|
525
525
|
})), Go = $(O((e2, t2) => {
|
|
526
526
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
|
|
527
527
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle") }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear") }), z(ve, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply") })] });
|
|
528
528
|
return Re({ ...e3, children: a3 });
|
|
529
529
|
}, [r2, n2, a2]);
|
|
530
|
-
return z(
|
|
530
|
+
return z(Pe, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Filter", tooltip: L(H, { children: [z("span", { children: "Organize your data so it's easier to analyze." }), z("br", {}), z("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: "FilterToggle", ...l2 });
|
|
531
531
|
})), Uo = $(O((e2, t2) => {
|
|
532
532
|
const { quickCommand: o2, icon: n2, isRedo: a2 = false, nestRedo: r2 = true, undoManager: l2, scope: i2, sx: s2, disabled: d2, commands: c2, ...m2 } = e2, p2 = [o2];
|
|
533
533
|
!a2 && r2 && p2.push("redo");
|
|
@@ -574,7 +574,7 @@ const Vo = $(O((e2, t2) => {
|
|
|
574
574
|
}, children: [c3, z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(Te, { orientation: "horizontal" }), i3] });
|
|
575
575
|
return Re({ ...e3, children: m3 });
|
|
576
576
|
}, [g2?.context(), g2?.state(), i2, f2, b2, x2]);
|
|
577
|
-
return z(
|
|
577
|
+
return z(Pe, { ref: t2, commands: c2, quickCommand: o2, scope: i2, disabled: x2, label: g2?.label() ?? (a2 ? "Redo" : "Undo"), tooltip: z(H, { children: z("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: w2, icon: n2 ?? (a2 ? "Redo" : "Undo"), selected: false, ...m2 });
|
|
578
578
|
})), jo = s.getFontList(), _o = /* @__PURE__ */ new Map();
|
|
579
579
|
for (let e2 = 0; e2 < jo.length; e2++) _o.set(jo[e2].fontRef.getFamily(), jo[e2]);
|
|
580
580
|
const qo = $(O((e2, t2) => {
|
|
@@ -613,7 +613,7 @@ const qo = $(O((e2, t2) => {
|
|
|
613
613
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "textEffects", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatStrikeThroughToggle") }), z(ve, { ...o3, command: t3.getCommand("formatSuperscriptToggle") }), z(ve, { ...o3, command: t3.getCommand("formatSubscriptToggle") })] });
|
|
614
614
|
return Re({ ...e3, children: a3 });
|
|
615
615
|
}, [r2, n2, a2]);
|
|
616
|
-
return z(
|
|
616
|
+
return z(Pe, { ref: t2, quickCommand: s2?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: s2?.icon() ?? "TextStrike", ...l2 });
|
|
617
617
|
})), Zo = $(O((e2, t2) => {
|
|
618
618
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = V(() => {
|
|
619
619
|
const e3 = i2.length;
|
|
@@ -623,25 +623,25 @@ const qo = $(O((e2, t2) => {
|
|
|
623
623
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "underline", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("formatUnderlinedToggle") }), z(ve, { ...o3, command: t3.getCommand("formatUnderlinedDoubleToggle") }), z(ve, { ...o3, command: t3.getCommand("formatUnderlinedAccountingToggle"), commandHook: n2 }), z(ve, { ...o3, command: t3.getCommand("formatUnderlinedAccountingDoubleToggle") })] });
|
|
624
624
|
return Re({ ...e3, children: a3 });
|
|
625
625
|
}, [r2, n2, a2]);
|
|
626
|
-
return z(
|
|
626
|
+
return z(Pe, { ref: t2, quickCommand: s2?.key(), commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: d2, icon: s2?.icon() ?? "TextUnderline", ...l2 });
|
|
627
627
|
})), Yo = $(O((e2, t2) => {
|
|
628
628
|
const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = gt((e3, t3) => {
|
|
629
629
|
const o3 = { variant: ut.Menuitem, commandHook: a2, scope: "paste", disabled: i2 }, n3 = [];
|
|
630
630
|
return l2 && (n3.push(X(ve, { ...o3, command: t3.getCommand("paste"), key: "paste" })), n3.push(z(Te, { orientation: "horizontal" }, "paste-div"))), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose" })), n3.push(X(ve, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks" })), Re({ ...e3, children: n3 });
|
|
631
631
|
}, [i2, a2, r2, l2]);
|
|
632
|
-
return z(
|
|
632
|
+
return z(Pe, { ref: t2, commands: n2, commandHook: a2, scope: r2, createPopupPanel: d2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", ...s2 });
|
|
633
633
|
})), Qo = $(O((e2, t2) => {
|
|
634
634
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = pt(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = K((e3, t3) => {
|
|
635
635
|
const o3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadings") }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingsNumeric") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingColumns") }), z(ve, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingRows") })] });
|
|
636
636
|
return Re({ ...e3, children: l3 });
|
|
637
637
|
}, [r2, n2, a2]);
|
|
638
|
-
return z(
|
|
638
|
+
return z(Pe, { ref: t2, parentFloat: l2, quickCommand: s2[0]?.key(), commands: o2, commandHook: n2, createPopupPanel: d2, label: "Headings", tooltip: "Configure how the column and rows headings in the sheet are displayed.", icon: z(Ve, { command: s2[0], scope: "view" }), ...i2 });
|
|
639
639
|
})), Jo = $(O((e2, t2) => {
|
|
640
640
|
const { commands: o2, commandHook: n2, scope: a2 = "view", disabled: r2 = false, ...l2 } = e2, i2 = K((e3) => {
|
|
641
641
|
const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowFormulaBar") }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowTabs") }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowStatusBar") }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowHorizontalScrollBar") }), z(ve, { ...t3, command: o2.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
|
|
642
642
|
return Re({ ...e3, children: l3 });
|
|
643
643
|
}, [r2, o2, n2, a2]);
|
|
644
|
-
return z(
|
|
644
|
+
return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: i2, icon: z(Ve, { icon: null, label: "Workbook View" }), ...l2 });
|
|
645
645
|
})), en = $(O((e2, t2) => {
|
|
646
646
|
const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: d2, ...m2 } = e2, p2 = V(() => r2({ value: o2, style: n2 }), [o2, n2, r2]), u2 = V(() => p2.getStyle(), [p2, l2]), g2 = V(() => u2.getFill().toCSS(l2?.darkMode ?? false), [u2]), h2 = u2.getInsets(), f2 = u2.getFont(), x2 = K(() => u2.getBorder(), [u2]);
|
|
647
647
|
return z(J, { ref: t2, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter: d2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...g2 }, "& .text": { flex: "1 1 100%", ...f2.toCSS(l2?.darkMode ?? false, 1), boxSizing: "border-box", padding: `${h2.top}px ${h2.right}px ${h2.bottom}px ${h2.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: f2.toCSS().textDecoration, textAlign: c.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: z(y, { getBorderAt: x2, darkMode: l2?.darkMode ?? false, rowCount: 1, columnCount: 1, style: { height: "100%", width: "100%", ...s2?.style }, ...s2, children: z(J, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-2px", marginBottom: "-2px", display: "flex", alignItems: "center" }, children: z(J, { className: "text", children: o2 }) }) }) });
|
|
@@ -689,7 +689,7 @@ const qo = $(O((e2, t2) => {
|
|
|
689
689
|
const t3 = 18 / l.getDeviceScale(), o3 = u2?.createTemporaryCell(e3);
|
|
690
690
|
return o3.getStyle().getFont().getSize() <= t3 ? o3 : o3.createTemporaryCell({ style: { font: { size: t3 } } });
|
|
691
691
|
}, [u2?.createTemporaryCell]), w2 = s2 || !n2 || n2.disabled(), S2 = V(() => u2 && m2 ? z(en, { value: h2?.getName() ?? "Custom", cellStyle: h2 ? { named: h2.getName() } : void 0, styles: u2.styles(), createTemporaryCell: y2, bodyStyle: u2.bodyStyle(), className: "outline-hover", disabled: w2, sx: { marginRight: "4px", borderRadius: "2px", minHeight: "calc(100% - 2px)", overflow: "hidden", outline: (e3) => `1px solid ${e3.palette.action.hover}` }, borderProps: { style: { height: "calc(100% - 2px)", width: "calc(100% - 1px)" } } }) : n2?.icon(), [h2, f2, w2, n2]);
|
|
692
|
-
return z(
|
|
692
|
+
return z(Pe, { ref: t2, createPopupPanel: b2, outlined: m2, commands: o2, createTooltip: ({ children: e3 }, t3) => z(He, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), selected: false, disabled: w2, label: n2?.label(), icon: S2, ...p2 });
|
|
693
693
|
})), nn = "_sheetxl-reset_11z3j_1", an = 10, rn = $(O((e2, t2) => {
|
|
694
694
|
const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: c2 = an, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * c2), [h2, f2] = Z((e3) => e3 + 1, 0);
|
|
695
695
|
j(() => {
|
|
@@ -835,10 +835,10 @@ const hn = (e2) => null === e2 ? "" : e2.toString(), fn = $(O((e2, t2) => {
|
|
|
835
835
|
g2?.onBlur(e3);
|
|
836
836
|
}, [g2]), v2 = K((e3) => {
|
|
837
837
|
S2(e3.target.value), g2?.onChange(e3);
|
|
838
|
-
}, [g2]), [T2, R2] = U(false),
|
|
838
|
+
}, [g2]), [T2, R2] = U(false), P2 = V(() => z(me, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: z(Ue, { disabled: true, selected: T2, onSelectToggle: (e3) => {
|
|
839
839
|
R2(e3);
|
|
840
840
|
}, label: "Select Range", icon: z(xt, { iconKey: "SelectRangeMode" }) }) }), [T2]);
|
|
841
|
-
return z(de, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className: mt("range-input", l2), ...p2, children: z(ce, { label: "Range", placeholder: "Enter Range", onBlur: C2, disabled: a2, error: !!h2, inputRef: g2?.ref, helperText: h2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, slotProps: { input: { endAdornment:
|
|
841
|
+
return z(de, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className: mt("range-input", l2), ...p2, children: z(ce, { label: "Range", placeholder: "Enter Range", onBlur: C2, disabled: a2, error: !!h2, inputRef: g2?.ref, helperText: h2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, slotProps: { input: { endAdornment: P2 }, inputLabel: { shrink: true }, htmlInput: { spellCheck: false, autoComplete: "off", readOnly: a2, name: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75) } } }, value: y2 ?? "", onChange: v2, onKeyDownCapture: k2, onContextMenu: (e3) => {
|
|
842
842
|
e3.stopPropagation();
|
|
843
843
|
} }) });
|
|
844
844
|
}));
|
|
@@ -948,10 +948,10 @@ const kn = $(O((e2, t2) => {
|
|
|
948
948
|
}));
|
|
949
949
|
kn.displayName = "StatusBar";
|
|
950
950
|
const Cn = $(O((e2, t2) => {
|
|
951
|
-
const { disabled: o2, names: a2, workbook: r2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, ...p2 } = e2, g2 = St(), [h2, f2] = U(null), [x2, b2] = U(() => r2.getSelectedRanges().getCoords()), [y2, S2] = U(false), { reference: k2 } = _e({ parentFloat: c2?.parentFloat }), [C2, v2] = U(() => s2 || !r2.getProtection().isStructureAllowed()), T2 = () => h2?.text ?? "", [R2,
|
|
951
|
+
const { disabled: o2, names: a2, workbook: r2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, ...p2 } = e2, g2 = St(), [h2, f2] = U(null), [x2, b2] = U(() => r2.getSelectedRanges().getCoords()), [y2, S2] = U(false), { reference: k2 } = _e({ parentFloat: c2?.parentFloat }), [C2, v2] = U(() => s2 || !r2.getProtection().isStructureAllowed()), T2 = () => h2?.text ?? "", [R2, P2] = U(T2), D2 = gt(() => {
|
|
952
952
|
if (k2?.closeAll(), !R2) {
|
|
953
953
|
const e4 = T2();
|
|
954
|
-
return
|
|
954
|
+
return P2(T2()), e4;
|
|
955
955
|
}
|
|
956
956
|
if (T2() === R2) return R2;
|
|
957
957
|
const e3 = R2.trim().toLowerCase();
|
|
@@ -977,7 +977,7 @@ const Cn = $(O((e2, t2) => {
|
|
|
977
977
|
let e4 = a2.getByName(R2);
|
|
978
978
|
C2 || e4 || (e4 = a2.addReference(R2, o3)), e4 && f2({ text: e4.getName() });
|
|
979
979
|
} catch (e4) {
|
|
980
|
-
|
|
980
|
+
P2(T2()), g2.showMessage?.(e4.message, { type: kt.Error });
|
|
981
981
|
}
|
|
982
982
|
return null;
|
|
983
983
|
}, [R2, a2, k2, C2, g2]), M2 = gt(() => {
|
|
@@ -1000,7 +1000,7 @@ const Cn = $(O((e2, t2) => {
|
|
|
1000
1000
|
}, onClose(e3) {
|
|
1001
1001
|
N2([]);
|
|
1002
1002
|
} }), j(() => {
|
|
1003
|
-
|
|
1003
|
+
P2(T2());
|
|
1004
1004
|
}, [h2, x2]);
|
|
1005
1005
|
const [B2, E2] = U(r2?.getSelectedSheet());
|
|
1006
1006
|
w(r2, { onProtectionChange: (e3) => {
|
|
@@ -1033,15 +1033,15 @@ const Cn = $(O((e2, t2) => {
|
|
|
1033
1033
|
}, onKeyDown: (e4) => {
|
|
1034
1034
|
if (e4.which === ft.Enter || e4.which === ft.Tab) {
|
|
1035
1035
|
let t4 = R2;
|
|
1036
|
-
T2() !== R2 && (e4.stopPropagation(), e4.preventDefault(), t4 =
|
|
1037
|
-
} else if (e4.which === ft.Escape) T2() !== R2 ? (
|
|
1036
|
+
T2() !== R2 && (e4.stopPropagation(), e4.preventDefault(), t4 = D2()), t4 ? V2(t4) : i2?.();
|
|
1037
|
+
} else if (e4.which === ft.Escape) T2() !== R2 ? (P2(T2()), setTimeout(() => {
|
|
1038
1038
|
e4.target?.select();
|
|
1039
1039
|
}, 0), e4.stopPropagation(), e4.preventDefault()) : i2?.();
|
|
1040
1040
|
else if (e4.which === ft.Space) return void e4.stopPropagation();
|
|
1041
1041
|
}, onBlur: () => {
|
|
1042
|
-
|
|
1042
|
+
P2(T2());
|
|
1043
1043
|
}, onChange: (e4) => {
|
|
1044
|
-
|
|
1044
|
+
P2(e4.target.value);
|
|
1045
1045
|
} }) });
|
|
1046
1046
|
}, [R2, h2]), V2 = gt(async (e3) => {
|
|
1047
1047
|
try {
|
|
@@ -1086,10 +1086,10 @@ const vn = (e2, t2) => z(Cn, { ref: t2, ...e2 }), Tn = $(O((e2, t2) => {
|
|
|
1086
1086
|
} }), w(u2, { onProtectionChange() {
|
|
1087
1087
|
f2(u2.getSelection().getCoords().cell);
|
|
1088
1088
|
} });
|
|
1089
|
-
const v2 = y2.current?.getLineHeight() ?? 20, [T2, R2] = U(v2), [
|
|
1089
|
+
const v2 = y2.current?.getLineHeight() ?? 20, [T2, R2] = U(v2), [P2, D2] = U(5), [M2, F2] = U(1), N2 = gt((e3, { size: t3 }) => {
|
|
1090
1090
|
e3.preventDefault(), e3.stopPropagation();
|
|
1091
1091
|
const o3 = Math.floor(t3.height / v2);
|
|
1092
|
-
R2(o3 * v2 + 1), o3 > 1 &&
|
|
1092
|
+
R2(o3 * v2 + 1), o3 > 1 && D2(o3);
|
|
1093
1093
|
}, [v2]), B2 = gt((e3, { size: t3 }) => {
|
|
1094
1094
|
const o3 = Math.floor(t3.height / v2);
|
|
1095
1095
|
F2(o3);
|
|
@@ -1125,9 +1125,9 @@ const vn = (e2, t2) => z(Cn, { ref: t2, ...e2 }), Tn = $(O((e2, t2) => {
|
|
|
1125
1125
|
}, children: [z(J, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignItems: "center", marginTop: "0px", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: z(Gt, { height: T2, draggableOpts: { grid: [v2, v2] }, minConstraints: [v2, v2], maxConstraints: [15 * v2, 15 * v2], onResize: B2, onResizeStop: N2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: W2 }) }), z(ze, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, "aria-label": "toggle-expand-formula-edit", icon: z(xt, { iconKey: M2 > 1 ? "ExpandLess" : "ExpandMore" }), tooltipProps: { label: (M2 > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: true }, onMouseDown: (e3) => {
|
|
1126
1126
|
0 === e3.button && e3.preventDefault();
|
|
1127
1127
|
}, onClick: () => {
|
|
1128
|
-
const e3 = M2 > 1 ? 1 :
|
|
1128
|
+
const e3 = M2 > 1 ? 1 : P2;
|
|
1129
1129
|
R2(e3 * v2 + 1), F2(e3);
|
|
1130
|
-
} }), z(J, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: j2 ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (e3) => e3.palette.primary.main, borderRadius: (e3) => `${e3.shape.borderRadius}px` } })] })] }), [K2, W2, j2, M2, v2]), Z2 = V(() => O2 || X2 ? !O2 && X2 ? X2 : O2 && !X2 ? O2 : z(H, { children: z(vt, { fixedPane: "before", minBefore: "165px", minAfter: "200px", paneBeforeProps: { style: { alignItems: "flex-start" } }, paneAfterProps: { style: { overflow: "visible" } }, resizerProps: { style: { backgroundImage: `url("data:image/svg+xml,%3Csvg width='6' height='13' viewBox='0 0 6 13' version='1.1' fill='${G2.palette.text.icon ?? G2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='m 4.5961932,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.88365,0 -1.60005,-0.71626 -1.60005,-1.59991 0,-0.88365 0.7164,-1.6000508 1.60005,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60004 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60005 0,-0.88365 0.7164,-1.59991 1.60005,-1.59991 0.88364,0 1.59991,0.71626 1.59991,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center
|
|
1130
|
+
} }), z(J, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: j2 ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (e3) => e3.palette.primary.main, borderRadius: (e3) => `${e3.shape.borderRadius}px` } })] })] }), [K2, W2, j2, M2, v2]), Z2 = V(() => O2 || X2 ? !O2 && X2 ? X2 : O2 && !X2 ? O2 : z(H, { children: z(vt, { fixedPane: "before", minBefore: "165px", minAfter: "200px", paneBeforeProps: { style: { alignItems: "flex-start" } }, paneAfterProps: { style: { overflow: "visible" } }, resizerProps: { style: { backgroundImage: `url("data:image/svg+xml,%3Csvg width='6' height='13' viewBox='0 0 6 13' version='1.1' fill='${G2.palette.text.icon ?? G2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='m 4.5961932,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.88365,0 -1.60005,-0.71626 -1.60005,-1.59991 0,-0.88365 0.7164,-1.6000508 1.60005,-1.6000508 0.88364,0 1.59991,0.7164008 1.59991,1.6000508 m 0,-4.881294 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60004 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-4.881226 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 -0.88365,0 -1.60005,-0.7164 -1.60005,-1.60005 0,-0.88365 0.7164,-1.59991 1.60005,-1.59991 0.88364,0 1.59991,0.71626 1.59991,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center calc(((var(--icon-size, 24) - 13px + 5px) / 2))", minWidth: "18px", marginRight: "1px" } }, elementBefore: O2, elementAfter: X2 }) }) : null, [O2, X2]), Y2 = Ct(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => $2.current }), []);
|
|
1131
1131
|
return z(J, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Y2, ...p2, children: Z2 });
|
|
1132
1132
|
}));
|
|
1133
1133
|
Tn.displayName = "FormulaBar";
|
|
@@ -1139,12 +1139,12 @@ const Rn = $(O((e2, t2) => {
|
|
|
1139
1139
|
return z(J, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
|
|
1140
1140
|
}));
|
|
1141
1141
|
Rn.displayName = "FilterColumnMenu";
|
|
1142
|
-
const
|
|
1142
|
+
const Pn = $(O((e2, t2) => {
|
|
1143
1143
|
const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = Ct(t2, () => ({ isFilters: () => true }), []);
|
|
1144
1144
|
return z("div", { ref: s2, className: mt("filters", n2), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...r2 }, ...i2, children: L("div", { style: { flex: "1 1 100%", display: "flex", minHeight: "100px", minWidth: "220px", alignItems: "center", border: "grey solid 1px", padding: "4px 4px", overflow: "hidden", flexDirection: "column", justifyContent: "space-evenly", marginTop: "4px", marginBottom: "4px", marginLeft: "16px", marginRight: "16px" }, children: [z("div", { children: l2.getName() }), z("div", { children: "Filter Widget" })] }) });
|
|
1145
1145
|
}));
|
|
1146
|
-
|
|
1147
|
-
const
|
|
1146
|
+
Pn.displayName = "Filters";
|
|
1147
|
+
const Dn = $(O((e2, t2) => {
|
|
1148
1148
|
const { children: o2, sheet: n2, style: a2, className: r2, value: l2, index: i2, editing: s2, editable: d2, disabled: c2, selectedIndex: m2, dragging: p2, borderColor: u2, borderWidth: g2, activeColor: h2, background: f2 = "white", tabRadius: x2 = 4, gridTheme: b2, ...y2 } = e2, [S2, k2] = U(() => !!n2 && n2.getProtection().isLocked()), [C2, v2] = U(() => n2 ? n2.getTabColor() : null);
|
|
1149
1149
|
w(n2, { onProtectionChange: () => {
|
|
1150
1150
|
k2(n2.getProtection().isLocked());
|
|
@@ -1154,17 +1154,17 @@ const Pn = $(O((e2, t2) => {
|
|
|
1154
1154
|
v2(n2.getTabColor());
|
|
1155
1155
|
} });
|
|
1156
1156
|
const T2 = zt(), R2 = m2 === i2;
|
|
1157
|
-
let
|
|
1157
|
+
let P2 = null, D2 = null;
|
|
1158
1158
|
if (C2 || p2) {
|
|
1159
1159
|
let e3 = f2;
|
|
1160
|
-
C2 ? (
|
|
1160
|
+
C2 ? (D2 = C2.toBlackOrWhite().toCSS(), e3 = C2?.toCSS()) : R2 || (e3 = T2.palette.background.paper), P2 = z(J, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: R2 ? "50%" : "100%", borderRadius: "4px", border: (e4) => R2 ? `${f2} solid 1px` : `${e4.palette.divider} solid 1px`, background: R2 && C2 ? `linear-gradient(0deg, ${e3} 0%, transparent)` : e3 } });
|
|
1161
1161
|
}
|
|
1162
1162
|
let M2 = null;
|
|
1163
1163
|
"string" == typeof u2 ? M2 = u2 : u2?.toCSS && (M2 = u2.toCSS());
|
|
1164
1164
|
const F2 = R2 ? z(J, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
|
|
1165
|
-
return z(Ot, { theme: R2 ? b2 ?? T2 : T2, children: z(J, { ref: t2, className: mt(r2), sx: { ...a2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: R2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p2 ? "grabbing" : void 0 }, ...y2, children: z(Tt, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: x2, strokeColor: R2 ? M2 : "transparent", children: z(ae, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: R2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: R2 ? "primary" :
|
|
1165
|
+
return z(Ot, { theme: R2 ? b2 ?? T2 : T2, children: z(J, { ref: t2, className: mt(r2), sx: { ...a2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: R2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p2 ? "grabbing" : void 0 }, ...y2, children: z(Tt, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: x2, strokeColor: R2 ? M2 : "transparent", children: z(ae, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: R2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: R2 ? "primary" : D2 || "text.secondary", backgroundColor: R2 ? f2 : "transparent", "&:hover:not([disabled])": { backgroundColor: R2 ? f2 : "transparent" }, "& input": { color: (e3) => `${e3.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: c2, disableRipple: s2, component: "div", children: L(H, { children: [P2, L(J, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [L(J, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: R2 ? void 0 : "1px" }, children: [o2, F2] }), S2 ? z(xt, { iconKey: "Lock", style: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : z(J, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
|
|
1166
1166
|
}));
|
|
1167
|
-
|
|
1167
|
+
Dn.displayName = "SheetTab";
|
|
1168
1168
|
const Mn = $(O((e2, t2) => {
|
|
1169
1169
|
const { workbook: o2, index: n2, commands: a2, scope: r2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: d2, tabStripRef: c2, ...m2 } = e2, [p2, u2] = U(o2?.getProtection());
|
|
1170
1170
|
w(o2, { onProtectionChange: (e3) => {
|
|
@@ -1381,7 +1381,7 @@ const An = async (e2) => {
|
|
|
1381
1381
|
const d3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [i3.length > 0 ? L(H, { children: [z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 }), z(Te, { orientation: "horizontal" })] }) : null, X(ve, { ...a3, key: "help", command: o2.getCommand("help") })] });
|
|
1382
1382
|
return Re({ ...e3, children: d3 });
|
|
1383
1383
|
}, [r2, n2, a2, c2, u2]);
|
|
1384
|
-
return z(
|
|
1384
|
+
return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Insert Script", tooltip: "Inserts a script from a set of templates.", createPopupPanel: g2, icon: "ScriptInsert", ...i2 });
|
|
1385
1385
|
})), jn = $(O((e2, t2) => {
|
|
1386
1386
|
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
|
|
1387
1387
|
const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
|
|
@@ -1440,14 +1440,14 @@ const qn = $(O((e2, t2) => {
|
|
|
1440
1440
|
if (t3 && t3.length > 0) return t3[0]?.focus?.(e3), true;
|
|
1441
1441
|
}
|
|
1442
1442
|
return S2.current?.focus?.(e3), false;
|
|
1443
|
-
}, [k2, s2, d2]),
|
|
1443
|
+
}, [k2, s2, d2]), P2 = V(() => z(Fe, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), D2 = V(() => z(ue, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, marginLeft: (e3) => e3.spacing(0.5), marginRight: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: z(jn, { commands: r2 }) }), [p2, r2]), M2 = V(() => z(J, { className: mt("script-status-panel", "status-panel"), sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", margin: 0, borderTop: `solid 1px ${p2.palette.divider}` }, children: L("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.message }), z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.dirty ? "Unsaved" : "" }), z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: f2.cursor })] }) }), [f2]), F2 = V(() => L(J, { className: mt("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [D2, z(J, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: z(C, { ref: S2, loadingPanel: P2, readOnly: l2, frame: i2, autoFocus: d2, commands: r2, onStatusChange: w2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), M2] }), [p2, r2, D2, M2, u2, P2, l2, a2, d2, s2, i2, w2]), N2 = V(() => {
|
|
1444
1444
|
let e3;
|
|
1445
1445
|
return null === b2 ? null : (null === b2.source && (e3 = z(_n, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
|
|
1446
1446
|
S2.current?.getEditor()?.insertSnippet(e4.content), y2({ source: e4.content ?? "" });
|
|
1447
1447
|
} })), z(J, { tabIndex: 0, className: mt("script-workspace", o2), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none" }, onPointerDown: (e4) => {
|
|
1448
1448
|
e4.isDefaultPrevented() || S2.current?.focus();
|
|
1449
1449
|
}, children: L(J, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [F2, e3] }) }));
|
|
1450
|
-
}, [
|
|
1450
|
+
}, [D2, F2, o2, b2]), B2 = Ct(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
|
|
1451
1451
|
R2(e3);
|
|
1452
1452
|
} }), []);
|
|
1453
1453
|
return z(J, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: B2, ...m2, onFocus: (e3) => {
|
|
@@ -1485,7 +1485,7 @@ const Yn = $(O((e2, t2) => {
|
|
|
1485
1485
|
const o3 = z(Zn, { ...e3, commands: t3 });
|
|
1486
1486
|
return Re({ ...e3, children: o3 });
|
|
1487
1487
|
}, [r2, s2, n2, a2]);
|
|
1488
|
-
return z(
|
|
1488
|
+
return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, selected: o2.getCommand(i2).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: i2, ...l2 });
|
|
1489
1489
|
})), Qn = (e2) => z(ve, { ...e2 }), Jn = $(O((e2, t2) => {
|
|
1490
1490
|
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, [l2, i2] = U(false), s2 = pt(o2, ["executeScript", "showScriptEditor"]), d2 = s2[0]?.context?.();
|
|
1491
1491
|
j(() => {
|
|
@@ -1594,7 +1594,7 @@ const oa = (e2) => z(la, { ...e2 }), na = $((e2) => {
|
|
|
1594
1594
|
}));
|
|
1595
1595
|
la.displayName = "WorkbookToolbars";
|
|
1596
1596
|
const ia = (e2) => {
|
|
1597
|
-
const { workbook: t2, workbookElement: o2, target: n2, commands: a2, darkMode: r2, onNewWorkbook: l2 = sa } = e2, i2 = St(), [s2, d2] = U(t2?.getSelectedSheet()), [c2, m2] = U(t2?.getSheets().getItems()), p2 = gt(l2, [l2]), u2 = T(), h2 = V(() => [new
|
|
1597
|
+
const { workbook: t2, workbookElement: o2, target: n2, commands: a2, darkMode: r2, onNewWorkbook: l2 = sa } = e2, i2 = St(), [s2, d2] = U(t2?.getSelectedSheet()), [c2, m2] = U(t2?.getSheets().getItems()), p2 = gt(l2, [l2]), u2 = T(), h2 = V(() => [new Pt("activateTask", n2, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new Pt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Mt.Ctrl, Mt.Shift] } }), new Pt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Mt.Ctrl, Mt.Shift] } }), new Pt("showFormat", n2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [Mt.Ctrl, Mt.Shift] } }), new Dt("newCellStyle", n2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later.", icon: "NewPresetStyles" }), new Dt("deleteCellStyle", n2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new Dt("modifyCellStyle", n2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Pt("find", n2, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [Mt.Ctrl] }, { key: "F5", modifiers: [Mt.Shift] }] }), new Pt("findReplace", n2, { label: "Find & Replace", description: "Open the Find & Replace window.", icon: "FindReplace", shortcut: [{ key: "H", modifiers: [Mt.Ctrl] }, { key: "H", modifiers: [Mt.Ctrl, Mt.Alt] }] }), new Pt("goto", n2, { label: "Go To", description: "Open the 'Go To' window.", icon: "GoTo", shortcut: [{ key: "G", modifiers: [Mt.Ctrl] }] }), new Pt("workbookViewToggleExpandFormulaBar", n2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [Mt.Ctrl, Mt.Shift] } }), new Pt("workbookViewToggleShowFormulaBar", n2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Pt("workbookViewToggleShowTabs", n2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Pt("workbookViewToggleShowStatusBar", n2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Pt("workbookViewToggleShowHorizontalScrollBar", n2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Pt("workbookViewToggleShowVerticalScrollBar", n2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new Dt("hideSheet", n2, { label: "Hide Sheet", scopedLabels: { sheet: "Hide" }, description: "Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs.", icon: "VisibilityOff" }), new Dt("deleteSheet", n2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new Dt("addSheet", n2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [Mt.Shift] }, { key: "F1", modifiers: [Mt.Alt, Mt.Shift] }] }), new Dt("duplicateSheet", n2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new Dt("nextSheet", n2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Mt.Ctrl] }] }), new Dt("previousSheet", n2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Mt.Ctrl] }] }), new Dt("selectNextSheet", n2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Mt.Ctrl, Mt.Shift] }] }), new Dt("selectPreviousSheet", n2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Mt.Ctrl, Mt.Shift] }] }), new Dt("selectTheme", n2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new Dt("selectNamed", n2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new Dt("addNamedReference", n2, { label: "Define Named Reference", scopedLabels: { namedItem: "Define Name…" }, description: "Add a new named reference. Names can be used as a substitute for cell references.", icon: "InsertNamedRange" }), new Dt("editNamedReference", n2, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references.", icon: "NamedRangeEdit" }), new Dt("deleteNamedReference", n2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "DeleteNamedRange" }), new Pt("activeNameBox", n2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [Mt.Alt] } }), new Pt("createNamedReferenceFromSelection", n2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [Mt.Ctrl, Mt.Shift] } }), new Pt("activeNameManager", n2, { label: "Activate Name Manager", description: "Create, edit, delete, and find all the names used in the workbook.\n\nNames can be used as a substitute for cell references.", shortcut: { key: "F3", modifiers: [Mt.Ctrl] } }), new Dt("fullScreenToggle", n2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new Dt("showScriptEditor", n2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [Mt.Alt] }] }), new Dt("executeScript", n2, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Dt("executeSelectedScript", n2, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Dt("saveScripts", n2, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new Dt("maximumWorkbookToggle", n2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [Mt.Ctrl] } }), new Dt("spellCheck", n2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new Dt("calculateAll", n2, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } }), new Pt("closeWorkbook", n2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [Mt.Ctrl] } }), new Pt("newWorkbook", n2, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []), f2 = V(() => {
|
|
1598
1598
|
let e3 = null;
|
|
1599
1599
|
return e3 = a2 ? a2.createChildGroup(n2, "workbook", false) : new Ft(n2, "workbook"), e3.addCommands(h2, true), e3;
|
|
1600
1600
|
}, [a2, h2]), x2 = wt(), b2 = W.useRef(null), y2 = gt(() => {
|
|
@@ -1658,11 +1658,11 @@ const ia = (e2) => {
|
|
|
1658
1658
|
}, onScriptsChange: (e3) => {
|
|
1659
1659
|
y2();
|
|
1660
1660
|
} });
|
|
1661
|
-
const { isFullscreenAvailable: k2, isFullscreenEnabled: C2, toggleFullscreen: v2 } = eo({ target: { current: o2 ?? document.body } }),
|
|
1661
|
+
const { isFullscreenAvailable: k2, isFullscreenEnabled: C2, toggleFullscreen: v2 } = eo({ target: { current: o2 ?? document.body } }), P2 = R();
|
|
1662
1662
|
j(() => {
|
|
1663
|
-
f2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes:
|
|
1663
|
+
f2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: P2, darkMode: r2 }) });
|
|
1664
1664
|
}, [t2?.getTheme(), r2]);
|
|
1665
|
-
const
|
|
1665
|
+
const D2 = gt(async function(e3, o3) {
|
|
1666
1666
|
let n3 = null;
|
|
1667
1667
|
const a3 = t2.getScripts();
|
|
1668
1668
|
if (e3?.declaration || e3?.functionName) {
|
|
@@ -1733,7 +1733,7 @@ const ia = (e2) => {
|
|
|
1733
1733
|
"Close" === await i2.showOptions({ title: "Confirm", description: "This will close the current workbook tab. Do you want to continue?", options: ["Close", "Cancel"], defaultOption: "Close" }) && window.close();
|
|
1734
1734
|
}), f2.getCommand("newWorkbook").updateCallback(() => {
|
|
1735
1735
|
p2?.();
|
|
1736
|
-
}), f2.getCommand("executeScript").updateCallback(
|
|
1736
|
+
}), f2.getCommand("executeScript").updateCallback(D2), f2.getCommand("executeSelectedScript").updateCallback(D2);
|
|
1737
1737
|
}, [t2, i2]);
|
|
1738
1738
|
const M2 = gt(async (e3) => {
|
|
1739
1739
|
let o3 = 0, n3 = null, a3 = "Find & Replace";
|
|
@@ -1838,8 +1838,8 @@ const ia = (e2) => {
|
|
|
1838
1838
|
}, [c2, s2]), f2;
|
|
1839
1839
|
}, sa = () => {
|
|
1840
1840
|
window.open(window.origin.toString(), "sheetxl-" + n.uuidV4(), "popup=true");
|
|
1841
|
-
}, da = "_sheetxl-theme_4opcr_2", ca = "_sheetxl-workbook_g5t6x_5", ma = (e2) => z(Mn, { ...e2 }), pa = (e2) => z(Fn, { ...e2 }), ua = (e2) => z(
|
|
1842
|
-
const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = ma, sheetsAllProps: c2, renderSheetsAll: m2 = pa, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, sx: f2, borderWidth: x2, borderColor: b2, gridTheme: y2, gridStyle: S2, ...k2 } = e2, [C2, v2] = U(o2?.getSelectedSheetIndex()), [T2, R2] = U(o2?.getSheets().getItems()), [
|
|
1841
|
+
}, da = "_sheetxl-theme_4opcr_2", ca = "_sheetxl-workbook_g5t6x_5", ma = (e2) => z(Mn, { ...e2 }), pa = (e2) => z(Fn, { ...e2 }), ua = (e2) => z(Dn, { ...e2 }), ga = $(O((e2, t2) => {
|
|
1842
|
+
const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = ma, sheetsAllProps: c2, renderSheetsAll: m2 = pa, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, sx: f2, borderWidth: x2, borderColor: b2, gridTheme: y2, gridStyle: S2, ...k2 } = e2, [C2, v2] = U(o2?.getSelectedSheetIndex()), [T2, R2] = U(o2?.getSheets().getItems()), [D2, M2] = U(o2?.getProtection());
|
|
1843
1843
|
w(o2, { onViewChange(e3) {
|
|
1844
1844
|
v2(e3?.getSelectedSheetIndex());
|
|
1845
1845
|
}, onSheetsChange: (e3) => {
|
|
@@ -1847,7 +1847,7 @@ const ia = (e2) => {
|
|
|
1847
1847
|
}, onProtectionChange: (e3) => {
|
|
1848
1848
|
M2(e3?.getProtection());
|
|
1849
1849
|
} });
|
|
1850
|
-
const F2 = i2 || !
|
|
1850
|
+
const F2 = i2 || !D2.isStructureAllowed(), N2 = V(() => {
|
|
1851
1851
|
const e3 = [];
|
|
1852
1852
|
for (let t3 = 0; t3 < T2.length; t3++) e3.push(T2[t3].getName());
|
|
1853
1853
|
return e3;
|
|
@@ -1886,7 +1886,7 @@ const ia = (e2) => {
|
|
|
1886
1886
|
}, [u2, p2, o2, y2]), le2 = V(() => F2 ? null : z(Me, { disableInteractive: true, title: "New sheet", children: z(te, { disabled: l2, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, color: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (e3) => {
|
|
1887
1887
|
0 === e3.button && e3.preventDefault();
|
|
1888
1888
|
}, onClick: () => I2(), children: z(xt, { iconKey: "AddCircle" }) }) }), [l2, F2, I2]);
|
|
1889
|
-
return L(J, { ref: t2, className: mt(h2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...f2 }, ...k2, children: [z(
|
|
1889
|
+
return L(J, { ref: t2, className: mt(h2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...f2 }, ...k2, children: [z(P, { ref: Z2, selectedTabIndex: C2, tabNames: N2, onSelectedTabIndexChange: B2, onTabNameChange: E2, onTabMove: A2, background: g2, borderColor: b2, borderWidth: x2, activeColor: null, disabled: l2, disableDrag: F2, createScrollStartButton: Qe, createScrollEndButton: Ye, createScrollEdgeButton: Ze, createTabButton: re2, createTabDivider: (e3) => {
|
|
1890
1890
|
const { key: t3, ...o3 } = e3;
|
|
1891
1891
|
return z(Te, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => Wt(e4.palette.divider, 0.25) }, ...o3 }, t3);
|
|
1892
1892
|
}, editLabelProps: { readOnly: F2, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (e3) => {
|
|
@@ -1915,7 +1915,7 @@ const ha = $(O((e2, t2) => {
|
|
|
1915
1915
|
} }, disabled: a2, scope: "contextMenu", parentFloat: l2 }), [a2, l2]), y2 = V(() => ({ ...x2, ...b2, variant: ut.Menuitem }), [x2, b2]), S2 = V(() => ({ commands: n2, variant: ut.Menuitem, parentFloat: l2, ...b2 }), [n2, b2, l2]), k2 = [];
|
|
1916
1916
|
let C2 = u2.isEntireRows(), v2 = u2.isEntireColumns();
|
|
1917
1917
|
u2 && (C2 && (k2.push(z(Te, { orientation: "horizontal" }, "context:" + k2.length)), k2.push(X(ve, { command: n2.getCommand("hideColumns"), ...y2, key: "context:" + k2.length })), k2.push(X(ve, { command: n2.getCommand("unhideColumns"), ...y2, key: "context:" + k2.length }))), v2 && (k2.push(z(Te, { orientation: "horizontal" }, "context:" + k2.length)), k2.push(X(ve, { command: n2.getCommand("hideRows"), ...y2, key: "context:" + k2.length })), k2.push(X(ve, { command: n2.getCommand("unhideRows"), ...y2, key: "context:" + k2.length }))), (C2 || v2) && k2.push(z(Te, { orientation: "horizontal" }, "context:" + k2.length)), C2 && (k2.push(X(ve, { command: n2.getCommand("autoFitColumns"), ...y2, key: "context:" + k2.length })), k2.push(X(ve, { ...y2, command: n2.getCommand("resizeColumns"), key: "context:" + k2.length }))), v2 && (k2.push(X(ve, { command: n2.getCommand("autoFitRows"), ...y2, key: "context:" + k2.length })), k2.push(X(ve, { ...y2, command: n2.getCommand("resizeRows"), key: "context:" + k2.length }))));
|
|
1918
|
-
const T2 = [], R2 = n2.getCommand("formatTableStyle"),
|
|
1918
|
+
const T2 = [], R2 = n2.getCommand("formatTableStyle"), P2 = R2?.context()?.table();
|
|
1919
1919
|
if (bt(R2), !C2 && !v2) {
|
|
1920
1920
|
if (T2.push(z(Te, { orientation: "horizontal" }, "contextBefore:" + T2.length)), h2?.getHyperlink()) T2.push(X($e, { ...S2, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + T2.length, quickCommand: "openHyperlink" }));
|
|
1921
1921
|
else {
|
|
@@ -1927,10 +1927,10 @@ const ha = $(O((e2, t2) => {
|
|
|
1927
1927
|
const e3 = n2.getCommand("updateComments");
|
|
1928
1928
|
T2.push(X(ve, { command: e3, ...y2, key: "contextBefore:" + T2.length }));
|
|
1929
1929
|
}
|
|
1930
|
-
|
|
1930
|
+
P2 ? T2.push(X($e, { ...S2, variant: ut.Menuitem, key: "contextBefore:" + T2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: P2, quickCommand: "editTable" })) : T2.push(X(ve, { command: n2.getCommand("insertTable"), ...y2, key: "context:" + k2.length })), T2.push(X(Wa, { ...S2, key: "contextBefore:" + T2.length }));
|
|
1931
1931
|
}
|
|
1932
|
-
const
|
|
1933
|
-
return z(J, { ref: t2, className: mt("menu", i2), sx: { ...r2 }, ...s2, children:
|
|
1932
|
+
const D2 = L(H, { children: [z(ve, { command: n2.getCommand("cut"), ...y2 }), z(fa, { command: n2.getCommand("copy"), ...y2 }), z(Yo, { command: n2.getCommand("paste"), ...S2, includePasteAllInPopup: false }), z(Te, { orientation: "horizontal" }), z(Ko, { ...S2 }), z(Te, { orientation: "horizontal" }), z(zo, { commands: n2, ...S2, disableSheet: true }), z(Wo, { commands: n2, ...S2, disableSheet: true }), z(Lo, { ...S2 }), T2, k2] });
|
|
1933
|
+
return z(J, { ref: t2, className: mt("menu", i2), sx: { ...r2 }, ...s2, children: D2 });
|
|
1934
1934
|
}));
|
|
1935
1935
|
ha.displayName = "WorkbookContextMenu";
|
|
1936
1936
|
const fa = $(O((e2, t2) => {
|
|
@@ -1950,8 +1950,8 @@ const fa = $(O((e2, t2) => {
|
|
|
1950
1950
|
return z(J, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: p2 });
|
|
1951
1951
|
}));
|
|
1952
1952
|
xa.displayName = "MovableContextMenu";
|
|
1953
|
-
const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) => z(Rn, { ...e2 }), Sa = (e2, t2) => z(Tn, { ref: t2, ...e2 }), ka = (e2) => z(Fe, { ...e2 }), Ca = (e2, t2) => z(
|
|
1954
|
-
const { workbook: o2, createWorkbookOptions: n2, onNewWorkbook: a2, onElementLoad: r2, autoFocus: l2 = false, sx: i2, style: s2, className: d2, onFocus: c2, onBlur: m2, onKeyDown: p2, onRepeatCommandChange: u2, commands: g2, showFormulaBar: h2, formulaBarProps: b2, renderFormulaBar: y2 = Sa, showTabs: S2, tabsProps: k2, renderTabs: C2 = Ta, showStatusBar: v2, statusBarProps: T2, renderStatusBar:
|
|
1953
|
+
const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) => z(Rn, { ...e2 }), Sa = (e2, t2) => z(Tn, { ref: t2, ...e2 }), ka = (e2) => z(Fe, { ...e2 }), Ca = (e2, t2) => z(D, { ref: t2, ...e2 }), va = (e2) => z(kn, { ...e2 }), Ta = (e2) => z(ga, { ...e2 }), Ra = { fireOnModelChange: false }, Pa = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Da = $(O((e2, t2) => {
|
|
1954
|
+
const { workbook: o2, createWorkbookOptions: n2, onNewWorkbook: a2, onElementLoad: r2, autoFocus: l2 = false, sx: i2, style: s2, className: d2, onFocus: c2, onBlur: m2, onKeyDown: p2, onRepeatCommandChange: u2, commands: g2, showFormulaBar: h2, formulaBarProps: b2, renderFormulaBar: y2 = Sa, showTabs: S2, tabsProps: k2, renderTabs: C2 = Ta, showStatusBar: v2, statusBarProps: T2, renderStatusBar: P2 = va, toolbarProps: D2, renderToolbar: E2 = oa, contextMenuSx: A2, renderContextMenu: I2 = ya, renderFilterMenu: $2 = wa, renderMovableMenu: O2 = ba, renderLoadingPanel: G2 = ka, loadingPanelProps: _2, sheetProps: X2, renderSheet: Y2 = Ca, mainWrapper: te2, showHorizontalScrollbar: oe2, showVerticalScrollbar: ne2, gridTheme: ae2, headersTheme: re2, enableDarkImages: le2, ...ie2 } = e2, se2 = zt(), de2 = R(), ce2 = V(() => {
|
|
1955
1955
|
const e3 = { theme: de2.getDefaultTheme(), ...n2 };
|
|
1956
1956
|
return o2 ?? new f(e3);
|
|
1957
1957
|
}, [o2]), me2 = q(null), [pe2, ge2] = U(false), he2 = q(null), fe2 = V(() => z(J, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: he2 }), []), [xe2, be2] = U(false), [ye2, we2] = U(false), Se2 = K(() => {
|
|
@@ -1969,11 +1969,11 @@ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) =>
|
|
|
1969
1969
|
requestAnimationFrame(() => {
|
|
1970
1970
|
me2?.current?.focus();
|
|
1971
1971
|
});
|
|
1972
|
-
}, []), [
|
|
1972
|
+
}, []), [Pe2, De2] = U(ce2?.getSelectedSheet()), [Ne2, Be2] = U(ce2?.getProtection());
|
|
1973
1973
|
w(ce2, { onSheetsChange: (e3) => {
|
|
1974
|
-
|
|
1974
|
+
De2(e3?.getSelectedSheet());
|
|
1975
1975
|
}, onViewChange(e3) {
|
|
1976
|
-
|
|
1976
|
+
De2(e3?.getSelectedSheet());
|
|
1977
1977
|
}, onProtectionChange: (e3) => {
|
|
1978
1978
|
Be2(e3?.getProtection());
|
|
1979
1979
|
} }), w(ce2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
|
|
@@ -1995,14 +1995,14 @@ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) =>
|
|
|
1995
1995
|
Qe2(e3), Ze2(o3), qe2(t3), null !== Ke2.current && setTimeout(() => {
|
|
1996
1996
|
null !== Ke2.current && Ke2.current.update();
|
|
1997
1997
|
}, 160), Ue2(true);
|
|
1998
|
-
}, []), [ot2, nt2] = U("sheet"), at2 = S2 ?? Ie2?.isShowTabs(), rt2 = oe2 ?? Ie2?.isShowHorizontalScrollbar(), lt2 = h2 ?? Ie2?.isShowFormulaBar(), it2 = v2 ?? Ie2?.isShowStatusBar(), st2 = ne2 ?? Ie2?.isShowVerticalScrollbar(), dt2 = He2?.header?.edgeStrokeFill || "rgb(171,171,171)", ct2 = V(() => it2 ?
|
|
1998
|
+
}, []), [ot2, nt2] = U("sheet"), at2 = S2 ?? Ie2?.isShowTabs(), rt2 = oe2 ?? Ie2?.isShowHorizontalScrollbar(), lt2 = h2 ?? Ie2?.isShowFormulaBar(), it2 = v2 ?? Ie2?.isShowStatusBar(), st2 = ne2 ?? Ie2?.isShowVerticalScrollbar(), dt2 = He2?.header?.edgeStrokeFill || "rgb(171,171,171)", ct2 = V(() => it2 ? P2({ sheet: Pe2, gridStyle: He2, ...T2 }) : null, [P2, T2, it2, He2, Pe2]), pt2 = V(() => E2({ commands: Ve2, workbook: Ce2.current, ...D2 }), [Ve2, E2, D2, se2]), [ut2, { width: ht2 }] = jt(), ft2 = 0 === ht2 || ht2 > 560, xt2 = V(() => {
|
|
1999
1999
|
if (!at2) return null;
|
|
2000
2000
|
let e3 = C2({ background: He2.body.fill, borderWidth: 1, borderColor: dt2, gridTheme: Le2, gridStyle: He2, onBeforeUserChange: Te2, onUserChange: Re2, workbook: ce2, commands: Ve2, sheetTabProps: {}, ...k2 });
|
|
2001
2001
|
return ft2 || (e3 = z("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
|
|
2002
2002
|
}, [C2, k2, se2, ce2, Le2, ft2, Ve2, at2]), bt2 = K((e3) => {
|
|
2003
2003
|
const { style: t3, ...o3 } = e3;
|
|
2004
2004
|
let n3 = null, a3 = null, r3 = null;
|
|
2005
|
-
if (rt2 && (a3 = z("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${dt2} 1px`, flexDirection: "column", justifyContent: "center" }, children: z(M, { ...o3, style: { paddingLeft: "4px", paddingRight: "4px", ...t3 }, endGap: 700, sheet:
|
|
2005
|
+
if (rt2 && (a3 = z("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${dt2} 1px`, flexDirection: "column", justifyContent: "center" }, children: z(M, { ...o3, style: { paddingLeft: "4px", paddingRight: "4px", ...t3 }, touchThumbProps: { backgroundColor: Le2.palette.background.paper, borderColor: Le2.palette.primary.main, fillColor: "grey" }, endGap: 700, sheet: Pe2, onShowTooltip: (e4) => {
|
|
2006
2006
|
tt2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
|
|
2007
2007
|
}, onCloseTooltip: () => et2() }) })), at2 && ft2 && (r3 = xt2), at2 && ft2 && !rt2 && (r3 = L(J, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [r3, z(J, { sx: { borderTop: `solid ${dt2} 1px`, flex: "1" } })] })), r3 && rt2) n3 = z(vt, { position: ce2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
|
|
2008
2008
|
ce2.getView().setTabRatio(Math.round(10 * e4));
|
|
@@ -2013,7 +2013,7 @@ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) =>
|
|
|
2013
2013
|
n3 = r3;
|
|
2014
2014
|
}
|
|
2015
2015
|
return z(J, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: n3 });
|
|
2016
|
-
}, [
|
|
2016
|
+
}, [Pe2, Te2, ce2, He2, Le2, Ve2, at2, rt2, it2, ft2]), [yt2, wt2] = W.useState(null), St2 = V(() => ({ placement: "right-start", ...yt2?.popperProps }), [yt2?.popperProps]), { reference: kt2, component: Tt2 } = _e({ label: "contextMenu", popperProps: St2, anchor: yt2?.anchor ?? { getBoundingClientRect: () => new DOMRect(yt2?.clientX || 0, yt2?.clientY || 0) }, onClose: () => wt2(null), createPopupPanel: yt2?.createPopupPanel });
|
|
2017
2017
|
j(() => {
|
|
2018
2018
|
yt2 ? kt2.open(0) : kt2.close(0);
|
|
2019
2019
|
}, [yt2]);
|
|
@@ -2023,7 +2023,7 @@ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) =>
|
|
|
2023
2023
|
const { floatReference: o3 } = e4;
|
|
2024
2024
|
return $2({ filter: t3, commands: Ve2, floatReference: o3, sx: { ...A2 } });
|
|
2025
2025
|
} });
|
|
2026
|
-
}, [$2, A2, Ve2, ce2, yt2]),
|
|
2026
|
+
}, [$2, A2, Ve2, ce2, yt2]), Dt2 = gt((e3) => {
|
|
2027
2027
|
if (e3.originalEvent?.isDefaultPrevented()) return true;
|
|
2028
2028
|
e3.originalEvent?.preventDefault(), wt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
|
|
2029
2029
|
const { floatReference: t3 } = e4;
|
|
@@ -2037,19 +2037,19 @@ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) =>
|
|
|
2037
2037
|
} });
|
|
2038
2038
|
}, [O2, A2, Ve2]);
|
|
2039
2039
|
V(() => {
|
|
2040
|
-
const e3 = [new
|
|
2040
|
+
const e3 = [new Pt("openContextMenu", () => me2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [Mt.Shift] }, { key: "ContextMenu" }] })];
|
|
2041
2041
|
Ve2.addCommands(e3, true);
|
|
2042
2042
|
}, [Ve2]), j(() => {
|
|
2043
2043
|
Ve2.getCommand("openContextMenu").updateCallback(() => {
|
|
2044
|
-
const e3 =
|
|
2044
|
+
const e3 = Pe2.getSelection().getCoords().cell;
|
|
2045
2045
|
me2.current?.getGridElement()?.scrollCellCoordsIntoView(e3).then((t3) => {
|
|
2046
2046
|
requestAnimationFrame(() => {
|
|
2047
|
-
const o3 =
|
|
2048
|
-
|
|
2047
|
+
const o3 = Pe2.getView().getZoomScale() / 100, n3 = Pe2.getColumnHeaders().findOffset(e3.colIndex + 1) * o3, a3 = Pe2.getRowHeaders().findOffset(e3.rowIndex + 1) * o3, r3 = me2.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
|
|
2048
|
+
Dt2({ clientX: n3 - r3.x - t3.left + 6, clientY: a3 - r3.y - t3.top + 6 });
|
|
2049
2049
|
});
|
|
2050
2050
|
});
|
|
2051
2051
|
});
|
|
2052
|
-
}, [
|
|
2052
|
+
}, [Pe2]);
|
|
2053
2053
|
const Et2 = gt((e3) => {
|
|
2054
2054
|
Ve2?.dispatchToFocusedCommand(e3);
|
|
2055
2055
|
}, [Ve2]), At2 = gt(() => {
|
|
@@ -2058,12 +2058,12 @@ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) =>
|
|
|
2058
2058
|
nt2("sheet");
|
|
2059
2059
|
}, []), Lt2 = K(() => {
|
|
2060
2060
|
nt2("formulaBar");
|
|
2061
|
-
}, []), Ht2 =
|
|
2061
|
+
}, []), Ht2 = K((e3) => {
|
|
2062
2062
|
const { style: t3, ...o3 } = e3;
|
|
2063
|
-
return z(M, { style: { ...t3, paddingTop: "4px", paddingBottom: "4px" },
|
|
2063
|
+
return z(M, { ...o3, style: { ...t3, paddingTop: "4px", paddingBottom: "4px" }, touchThumbProps: { backgroundColor: Le2.palette.background.paper, borderColor: Le2.palette.primary.main, fillColor: "grey" }, sheet: Pe2, endGap: 700, onShowTooltip: (e4) => {
|
|
2064
2064
|
tt2(e4.anchor, e4.display, Nt.Left);
|
|
2065
2065
|
}, onCloseTooltip: () => et2() });
|
|
2066
|
-
}, [
|
|
2066
|
+
}, [Pe2, Le2]);
|
|
2067
2067
|
j(() => {
|
|
2068
2068
|
l2 && me2 && me2.current && me2.current.focus();
|
|
2069
2069
|
}, []);
|
|
@@ -2096,7 +2096,7 @@ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) =>
|
|
|
2096
2096
|
r3 = z(B, { ...e4 });
|
|
2097
2097
|
}
|
|
2098
2098
|
return z("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: r3 }, t3.getUUID());
|
|
2099
|
-
}, []), Yt2 = V(() => Y2({ style:
|
|
2099
|
+
}, []), Yt2 = V(() => Y2({ style: Pa, onFocus: It2, gridStyle: He2, headersStyle: We2, sheet: Pe2, commands: Ve2, onSheetContextMenu: Dt2, onViewportChange: (e3) => {
|
|
2100
2100
|
Oe2(e3);
|
|
2101
2101
|
}, showScrollbars: false, viewportComponent: fe2, onRepeatCommandChange: u2, onElementLoad: Se2, onShowColumnTooltip: (e3) => {
|
|
2102
2102
|
tt2(e3.anchor, e3.display, Nt.Top);
|
|
@@ -2106,12 +2106,12 @@ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) =>
|
|
|
2106
2106
|
tt2({ x: e3.anchor.x, y: e3.anchor.y, width: 0, height: 0 }, e3.display, e3.placement);
|
|
2107
2107
|
}, onCloseTooltip: () => et2(), renderMovable: Zt2, ...X2, cellRenderProps: { onFilterButtonMouseDown: (e3, t3) => {
|
|
2108
2108
|
X2?.cellRenderProps?.onFilterButtonMouseDown(e3, t3), Rt2(e3, t3);
|
|
2109
|
-
}, ...X2?.cellRenderProps } }, me2), [Ve2, X2,
|
|
2110
|
-
let e3 = z(Bt, { ref: ut2, style:
|
|
2109
|
+
}, ...X2?.cellRenderProps } }, me2), [Ve2, X2, Pe2, He2, u2]), Qt2 = V(() => {
|
|
2110
|
+
let e3 = z(Bt, { ref: ut2, style: Pa, viewport: $e2, touchElement: me2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
|
|
2111
2111
|
me2.current?.getGridElement()?.scrollTo(e4);
|
|
2112
2112
|
}, showHorizontalScrollbar: rt2 || at2, showVerticalScrollbar: st2, createHorizontalScrollbar: bt2, createVerticalScrollbar: Ht2, children: Yt2 });
|
|
2113
2113
|
return ft2 || 0 === ht2 || (e3 = L(H, { children: [e3, xt2] })), te2 ? te2(e3) : e3;
|
|
2114
|
-
}, [rt2, at2, bt2, st2, $e2, ft2, Yt2, xt2, se2, te2]), eo2 = V(() => z(Me, { arrow: true, disableInteractive: true, open: Ge2, title: z(ee, { variant: "subtitle2", component: "div", children: je2 }), placement: Xe2, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: Ke2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ge2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Ye2.x, Ye2.y, Ye2.width, Ye2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: z(J, {}) }), [Ge2, je2, Xe2, Ye2, Ke2]), to2 = V(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? He2.header.fill : e3.palette.background.paper, "& *": { ...Je(se2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${dt2} 1px` }, ...i2 }), [i2, He2]), oo2 = V(() => z(J, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), []), no2 = V(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: ye2 ? void 0 : 0, "--sxl-app-color-high-contrast": se2.palette.primary.main, "--sxl-app-color-primary": se2.palette.primary.main, "--sxl-app-color-primary-dark": se2.palette.primary.dark, "--sxl-app-color-primary-light": se2.palette.primary.light, "--sxl-app-color-info": se2.palette.info.main, "--sxl-app-color-info-dark": se2.palette.info.dark, "--sxl-app-color-info-light": se2.palette.info.light, "--sxl-app-color-secondary": se2.palette.secondary.main, "--sxl-app-color-secondary-dark": se2.palette.secondary.dark, "--sxl-app-color-secondary-light": se2.palette.secondary.light, "--sxl-app-color-success": se2.palette.success.main, "--sxl-app-color-success-dark": se2.palette.success.dark, "--sxl-app-color-success-light": se2.palette.success.light, "--sxl-app-color-warning": se2.palette.warning.main, "--sxl-app-color-warning-dark": se2.palette.warning.dark, "--sxl-app-color-warning-light": se2.palette.warning.light, "--sxl-app-color-error": se2.palette.error.main, "--sxl-app-color-error-dark": se2.palette.error.dark, "--sxl-app-color-error-light": se2.palette.error.light, "--sxl-app-color-text": se2.palette.text.primary, "--sxl-app-color-text-secondary": se2.palette.text.secondary, "--sxl-app-color-text-disabled": se2.palette.text.disabled, "--sxl-app-color-background": se2.palette.background.paper, "--sxl-app-color-button-surface": se2.palette.grey[600], "--sxl-app-color-shadow": se2.palette.action.focus, "--sxl-app-color-grey": se2.palette.grey[500], "--sxl-app-filter-dark-invert": He2.body.darkMode && le2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": He2.body.darkMode ? `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` : void 0 }), [He2, se2, ye2]), ao2 = V(() => mt(nn), []);
|
|
2114
|
+
}, [rt2, at2, bt2, st2, $e2, ft2, Yt2, xt2, se2, te2, Le2]), eo2 = V(() => z(Me, { arrow: true, disableInteractive: true, open: Ge2, title: z(ee, { variant: "subtitle2", component: "div", children: je2 }), placement: Xe2, slotProps: { transition: { timeout: { exit: 0 } }, popper: { popperRef: Ke2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ge2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Ye2.x, Ye2.y, Ye2.width, Ye2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] } }, children: z(J, {}) }), [Ge2, je2, Xe2, Ye2, Ke2]), to2 = V(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? He2.header.fill : e3.palette.background.paper, "& *": { ...Je(se2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${dt2} 1px` }, ...i2 }), [i2, He2]), oo2 = V(() => z(J, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), []), no2 = V(() => ({ flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: ye2 ? void 0 : 0, "--sxl-app-color-high-contrast": se2.palette.primary.main, "--sxl-app-color-primary": se2.palette.primary.main, "--sxl-app-color-primary-dark": se2.palette.primary.dark, "--sxl-app-color-primary-light": se2.palette.primary.light, "--sxl-app-color-info": se2.palette.info.main, "--sxl-app-color-info-dark": se2.palette.info.dark, "--sxl-app-color-info-light": se2.palette.info.light, "--sxl-app-color-secondary": se2.palette.secondary.main, "--sxl-app-color-secondary-dark": se2.palette.secondary.dark, "--sxl-app-color-secondary-light": se2.palette.secondary.light, "--sxl-app-color-success": se2.palette.success.main, "--sxl-app-color-success-dark": se2.palette.success.dark, "--sxl-app-color-success-light": se2.palette.success.light, "--sxl-app-color-warning": se2.palette.warning.main, "--sxl-app-color-warning-dark": se2.palette.warning.dark, "--sxl-app-color-warning-light": se2.palette.warning.light, "--sxl-app-color-error": se2.palette.error.main, "--sxl-app-color-error-dark": se2.palette.error.dark, "--sxl-app-color-error-light": se2.palette.error.light, "--sxl-app-color-text": se2.palette.text.primary, "--sxl-app-color-text-secondary": se2.palette.text.secondary, "--sxl-app-color-text-disabled": se2.palette.text.disabled, "--sxl-app-color-background": se2.palette.background.paper, "--sxl-app-color-button-surface": se2.palette.grey[600], "--sxl-app-color-shadow": se2.palette.action.focus, "--sxl-app-color-grey": se2.palette.grey[500], "--sxl-app-filter-dark-invert": He2.body.darkMode && le2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": He2.body.darkMode ? `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` : void 0 }), [He2, se2, ye2]), ao2 = V(() => mt(nn), []);
|
|
2115
2115
|
return L(ue, { className: mt("sheetxl-workbook", ca, { "Mui-focusVisible": pe2 }, da, d2), sx: to2, style: s2, square: false, ...ie2, ref: Ce2, onFocus: (e3) => {
|
|
2116
2116
|
ge2(true), At2(), c2?.(e3);
|
|
2117
2117
|
}, onBlur: (e3) => {
|
|
@@ -2125,7 +2125,7 @@ const ba = (e2) => z(xa, { ...e2 }), ya = (e2) => z(ha, { ...e2 }), wa = (e2) =>
|
|
|
2125
2125
|
}
|
|
2126
2126
|
}, onDragEnter: Kt2, onDragLeave: Kt2, onDragOver: Kt2, onDrop: Gt2, children: [L("div", { className: ao2, style: no2, children: [pt2, lt2 ? Xt2 : null, oo2, Qt2, ct2, eo2, Tt2, Ut2] }), qt2] });
|
|
2127
2127
|
}));
|
|
2128
|
-
|
|
2128
|
+
Da.displayName = "WorkbookElement";
|
|
2129
2129
|
const Ma = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => Wt(e3.palette.background.paper, 0.6), borderRadius: (e3) => `${e3.shape.borderRadius}px`, border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (t3) => `solid ${e2 ? t3.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (e3) => e3.palette.background.paper }, "&:hover:not([disabled])": { border: (t3) => `solid ${e2 ? t3.palette.text?.primary : t3.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (e3) => `solid ${e3.palette.primary.main} 1px !important`, border: (e3) => `1px solid ${e3.palette?.primary?.main} !important` } }, Fa = $(O((e2, t2) => {
|
|
2130
2130
|
const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = U(false), [p2, u2] = U(false), [g2, h2] = U(a2 ?? ""), [f2, x2] = U(""), [b2, { width: y2 }] = jt(), [w2, { width: S2 }] = jt(), [k2, C2] = U(false), v2 = q(null), T2 = q(null), R2 = Ct(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
|
|
2131
2131
|
T2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && v2.current?.select(), v2.current?.focus(t3);
|
|
@@ -2262,7 +2262,7 @@ const Na = $(O((e2, t2) => {
|
|
|
2262
2262
|
}, [g2, g2?.().getTheme(), S2, y2]), T2 = i2 || !n2 || n2.disabled(), R2 = V(() => {
|
|
2263
2263
|
if (!u2 || !c2) return n2?.icon();
|
|
2264
2264
|
}, [y2, S2, T2, n2]);
|
|
2265
|
-
return z(
|
|
2265
|
+
return z(Pe, { ref: t2, quickCommand: d2 ? void 0 : f2, createPopupPanel: v2, commands: o2, label: n2?.label(), commandState: h2, commandHook: a2, selected: null !== h2, createTooltip: ({ children: e3 }, t3) => z(He, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), disabled: T2, icon: R2, ...p2 });
|
|
2266
2266
|
})), La = $(O((e2, t2) => {
|
|
2267
2267
|
const { command: o2, commandHook: n2, selectedTheme: a2, onSelectTheme: r2, disabled: l2 = false, darkMode: i2, label: s2, icon: d2, variant: c2, ...m2 } = e2;
|
|
2268
2268
|
bt(o2);
|
|
@@ -2279,7 +2279,7 @@ const Na = $(O((e2, t2) => {
|
|
|
2279
2279
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "appearance", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: i2 }), z(ve, { ...o3, command: t3.getCommand("defaultThemeMode") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("enableDarkGrid") }), z(ve, { ...o3, command: t3.getCommand("enableDarkImages") })] });
|
|
2280
2280
|
return Re({ ...e3, children: a3 });
|
|
2281
2281
|
}, [r2, i2, n2, a2]), d2 = i2?.state(), c2 = be("(prefers-color-scheme: dark)"), m2 = "dark" === d2 || null === d2 && c2, p2 = null !== i2?.state();
|
|
2282
|
-
return z(
|
|
2282
|
+
return z(Pe, { ref: t2, quickCommand: "themeMode", commands: o2, commandHook: n2, createPopupPanel: s2, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
|
|
2283
2283
|
i2?.execute(m2 ? "light" : "dark", n2);
|
|
2284
2284
|
}, selected: p2, ...l2 });
|
|
2285
2285
|
})), za = $(O((e2, t2) => {
|
|
@@ -2290,7 +2290,7 @@ const Na = $(O((e2, t2) => {
|
|
|
2290
2290
|
} }, disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("showKeyboardShortcuts") }), z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("gotoUrlGithub") }), z(ve, { ...o3, command: t3.getCommand("gotoUrlDiscord") }), z(ve, { ...o3, command: t3.getCommand("gotoUrlDocumentation") }), z(ve, { ...o3, command: t3.getCommand("gotoUrlIssue") })] });
|
|
2291
2291
|
return Re({ ...e3, children: a3 });
|
|
2292
2292
|
}, [r2, n2]);
|
|
2293
|
-
return z(
|
|
2293
|
+
return z(Pe, { ref: t2, sx: l2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: s2, icon: z(xt, { iconKey: "Help", style: { transform: "scale(0.75)" } }), ...i2 });
|
|
2294
2294
|
})), Wa = $(O((e2, t2) => {
|
|
2295
2295
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = ut.Toolbar, ...d2 } = e2, c2 = pt(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = V(() => {
|
|
2296
2296
|
let e3 = null, t3 = 0;
|
|
@@ -2300,7 +2300,7 @@ const Na = $(O((e2, t2) => {
|
|
|
2300
2300
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "insertImage", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("insertImageFromFile") }), z(ve, { ...o3, command: t3.getCommand("insertImageFromURL") })] });
|
|
2301
2301
|
return Re({ ...e3, children: a3 });
|
|
2302
2302
|
}, [r2, n2, a2]);
|
|
2303
|
-
return m2 ? z(ve, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, ...d2 }) : z(
|
|
2303
|
+
return m2 ? z(ve, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, ...d2 }) : z(Pe, { ref: t2, variant: s2, quickCommand: "insertImageFromFile", commands: o2, commandHook: n2, scope: a2, disabled: r2 || p2, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: u2, icon: "InsertImage", ...d2 });
|
|
2304
2304
|
})), $a = $(O((e2, t2) => {
|
|
2305
2305
|
const { ...o2 } = e2;
|
|
2306
2306
|
return z($e, { ref: t2, ...o2, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions." });
|
|
@@ -2326,7 +2326,7 @@ const Oa = new Map([{ key: "financial", label: "Financial", icon: "FormulaFinanc
|
|
|
2326
2326
|
const r3 = { commandHook: a2, ...e3 }, l3 = z(Ga, { category: n3.label, ...r3, commands: t3 });
|
|
2327
2327
|
return Re({ ...e3, children: l3 });
|
|
2328
2328
|
}, [o2, c2, a2, r2]), p2 = Oa.get(o2);
|
|
2329
|
-
return z(
|
|
2329
|
+
return z(Pe, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: Oa.get(o2)?.icon ?? "FormulaGroup", ...d2 });
|
|
2330
2330
|
}));
|
|
2331
2331
|
Ka.displayName = "InsertFunctionCommandPopupButton";
|
|
2332
2332
|
const Ga = $(O((e2, t2) => {
|
|
@@ -2411,7 +2411,7 @@ const Xa = new qa(), Za = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a39
|
|
|
2411
2411
|
Ya.displayName = "ToastError";
|
|
2412
2412
|
const Qa = $(O((e2, t2) => {
|
|
2413
2413
|
const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, i2 = gt((e3) => {
|
|
2414
|
-
const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...t3, command: o2.getCommand("newWorkbook") }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: o2.getCommand("openWorkbook") }), z(
|
|
2414
|
+
const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...t3, command: o2.getCommand("newWorkbook") }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: o2.getCommand("openWorkbook") }), z(Pe, { ...t3, commands: o2, quickCommand: "saveWorkbook", createPopupPanel: (e4) => {
|
|
2415
2415
|
const n3 = { ...t3, parentFloat: e4.floatReference, scope: "saveWorkbook" }, a3 = [];
|
|
2416
2416
|
return Xa.getWriteFormats().forEach((e5) => {
|
|
2417
2417
|
if (e5.isDefault) return;
|
|
@@ -2425,7 +2425,7 @@ const Qa = $(O((e2, t2) => {
|
|
|
2425
2425
|
t4.isDefaultPrevented || e3.closeFloatAll();
|
|
2426
2426
|
} });
|
|
2427
2427
|
}, [r2, o2, n2, a2]), s2 = "File";
|
|
2428
|
-
return z(
|
|
2428
|
+
return z(Pe, { commands: o2, disabled: r2, commandHook: n2, scope: a2, label: s2, tooltip: "Options for saving and loading the workbook.", sx: { paddingBottom: "0px", "& button": { paddingTop: "0px", paddingBottom: "0px", height: (e3) => `calc(1.25rem + ${e3.spacing(2)}px)` } }, ...l2, createPopupPanel: i2, icon: z(Ve, { className: "label", icon: null, label: s2 }) });
|
|
2429
2429
|
}));
|
|
2430
2430
|
Qa.displayName = "StandaloneFileCommandButton";
|
|
2431
2431
|
const Ja = z(He, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: z(J, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: z(E, { onClick: () => {
|
|
@@ -2462,18 +2462,18 @@ const tr = $((e2) => {
|
|
|
2462
2462
|
const e4 = [];
|
|
2463
2463
|
n3 || (Xa.getWriteFormats().forEach((o4) => {
|
|
2464
2464
|
const n4 = o4.isDefault, r4 = { label: n4 ? "Save Workbook" : `Save Workbook as ${o4.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${o4.description}` }, tags: o4.tags, description: `Save the workbook to the desktop${n4 ? "" : ` as ${o4.description}`}.`, icon: "FileDownloadAsSheet" };
|
|
2465
|
-
n4 && (r4.shortcut = { key: "S", modifiers: [Mt.Ctrl] }, e4.push(new
|
|
2465
|
+
n4 && (r4.shortcut = { key: "S", modifiers: [Mt.Ctrl] }, e4.push(new Dt("saveWorkbookAs", x2, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [Mt.Shift, Mt.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
|
|
2466
2466
|
f2(t3, null, o4).catch((e5) => {
|
|
2467
2467
|
m3.showError(e5);
|
|
2468
2468
|
});
|
|
2469
2469
|
})));
|
|
2470
2470
|
const l5 = o4.key, i4 = n4 ? "saveWorkbook" : `saveWorkbookAs${l5}`;
|
|
2471
|
-
"CSV" === l5 ? r4.icon = "FileDownloadAsCSV" : "Excel" === l5 && (r4.icon = "FileDownloadAsExcel"), e4.push(new
|
|
2471
|
+
"CSV" === l5 ? r4.icon = "FileDownloadAsCSV" : "Excel" === l5 && (r4.icon = "FileDownloadAsExcel"), e4.push(new Dt(i4, x2, r4, (e5) => {
|
|
2472
2472
|
f2(t3, e5 ?? a3, o4).catch((e6) => {
|
|
2473
2473
|
m3.showError(e6);
|
|
2474
2474
|
});
|
|
2475
2475
|
}));
|
|
2476
|
-
}), e4.push(new
|
|
2476
|
+
}), e4.push(new Dt("openWorkbook", x2, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", icon: "FileOpen", shortcut: { key: "O", modifiers: [Mt.Ctrl] } }, async (e5 = null) => {
|
|
2477
2477
|
const n4 = { date1904: t3.isDate1904(), ...t3.options };
|
|
2478
2478
|
try {
|
|
2479
2479
|
const a4 = await h2(e5, n4);
|
|
@@ -2493,7 +2493,7 @@ const tr = $((e2) => {
|
|
|
2493
2493
|
} catch (e6) {
|
|
2494
2494
|
m3.showError(e6);
|
|
2495
2495
|
}
|
|
2496
|
-
})), e4.push(new
|
|
2496
|
+
})), e4.push(new Dt("openWorkbookFromUrl", x2, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
|
|
2497
2497
|
if (!e5) {
|
|
2498
2498
|
const t4 = await m3.showInput({ 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"] });
|
|
2499
2499
|
if ("Open" !== t4.option) return;
|
|
@@ -2502,15 +2502,15 @@ const tr = $((e2) => {
|
|
|
2502
2502
|
e5 && console.log("openWorkbookFromUrl", e5);
|
|
2503
2503
|
})));
|
|
2504
2504
|
let l4 = [];
|
|
2505
|
-
return i3 && (l4 = [new
|
|
2506
|
-
}), new
|
|
2507
|
-
}), new
|
|
2505
|
+
return i3 && (l4 = [new Dt("themeMode", x2, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new Dt("defaultThemeMode", x2, { 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 Dt("enableDarkGrid", x2, { 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 Dt("enableDarkImages", x2, { 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." })]), [...e4, ...l4, new Pt("help", x2, { label: "Show Help", description: "Provide Help.", icon: "Documentation", shortcut: { key: "F1" } }, () => {
|
|
2506
|
+
}), new Pt("showKeyboardShortcuts", x2, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", icon: "Keyboard", shortcut: { key: "/", modifiers: [Mt.Ctrl] } }, () => {
|
|
2507
|
+
}), new Dt("gotoUrlGithub", x2, { label: "Github", description: "Download examples, explore source code, and leave a star.", icon: "Github" }, () => {
|
|
2508
2508
|
window?.open("https://github.com/sheetxl/sheetxl");
|
|
2509
|
-
}), new
|
|
2509
|
+
}), new Dt("gotoUrlDiscord", x2, { label: "Discord", description: "Join our community on discord.", icon: "Discord" }, () => {
|
|
2510
2510
|
window?.open("https://discord.gg/NTKdwUgK9p");
|
|
2511
|
-
}), new
|
|
2511
|
+
}), new Dt("gotoUrlDocumentation", x2, { label: "Documentation", description: "Read the documentation.", icon: "Documentation" }, () => {
|
|
2512
2512
|
window?.open("https://www.sheetxl.com/docs");
|
|
2513
|
-
}), new
|
|
2513
|
+
}), new Dt("gotoUrlIssue", x2, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request.", icon: "Ticket" }, () => {
|
|
2514
2514
|
window?.open("https://github.com/sheetxl/sheetxl/issues");
|
|
2515
2515
|
})];
|
|
2516
2516
|
}, [t3, a3, m3, n3, i3, d3, s3]), y2 = V(() => {
|
|
@@ -2535,7 +2535,7 @@ const tr = $((e2) => {
|
|
|
2535
2535
|
const { showModal: k2 } = nt();
|
|
2536
2536
|
return j(() => {
|
|
2537
2537
|
const e4 = () => new Promise((e5, t4) => {
|
|
2538
|
-
const o4 = W.lazy(() => import("./
|
|
2538
|
+
const o4 = W.lazy(() => import("./By_L4EWHTADEr1Le.mjs")), n4 = k2(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
|
|
2539
2539
|
n4.hide();
|
|
2540
2540
|
}, slotProps: { transition: { onExited: () => {
|
|
2541
2541
|
e5(true);
|
|
@@ -2583,7 +2583,7 @@ const or = $((e2) => {
|
|
|
2583
2583
|
t4 = { ...t4, onKeyDown: (e5) => {
|
|
2584
2584
|
e5.isDefaultPrevented() || e5.isPropagationStopped() || o4?.onKeyDown?.(e5);
|
|
2585
2585
|
} };
|
|
2586
|
-
return c2(e4, { sort: () => import("./
|
|
2586
|
+
return c2(e4, { sort: () => import("./DL58IAMOmJKHu2ka.mjs"), numberFormat: () => import("./N3PqbkXORQ3Qfzls.mjs"), hyperlink: () => import("./BXf4P001RgMA5mab.mjs"), comments: () => import("./D9ZBRNgjCgvdTHiX.mjs"), find: () => import("./DhGAUFPxQRjIn4QH.mjs"), tableNew: () => import("./C0dHRankOSZU4PNG.mjs"), namedDetails: () => import("./DCsofbikio_bDbqi.mjs"), resizeHeader: () => import("./BqynBoGwxZpdEh30.mjs") }[e4], t4);
|
|
2587
2587
|
}, showOptions: m2, showInput: p2, showError: (t4) => {
|
|
2588
2588
|
let o4, n3 = kt.Error, a3 = "Unknown Error";
|
|
2589
2589
|
"string" == typeof t4 ? a3 = t4 : t4 instanceof Error && (o4 = t4, t4.message && (a3 = t4.message)), t4 instanceof Yt && (n3 = kt.Info), e3(a3, { type: n3, enqueueProps: { error: o4 } });
|
|
@@ -2645,7 +2645,7 @@ const nr = $(O((e2, t2) => {
|
|
|
2645
2645
|
}));
|
|
2646
2646
|
ir.displayName = "StudioSplitPane", Ea(), Rt.register("plugin-scripts", { icons: {} }), v.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: Xn }, true);
|
|
2647
2647
|
const sr = $(O((e2, t2) => {
|
|
2648
|
-
const { className: o2, sx: n2, style: a2, onElementLoad: r2, onError: l2, undoManager: i2, errorPanel: s2 = st, onKeyDown: d2, workbook: c2, createWorkbookOptions: m2, onWorkbookChange: p2, logo: u2, importExportDisabled: g2 = false, themeOptions: h2, autoFocus: x2 = false, commands: b2, title: y2, onTitleChange: w2, titleProps: S2, renderLoadingPanel: k2, ...C2 } = e2, v2 = q(null), T2 = gt(p2, [p2]),
|
|
2648
|
+
const { className: o2, sx: n2, style: a2, onElementLoad: r2, onError: l2, undoManager: i2, errorPanel: s2 = st, onKeyDown: d2, workbook: c2, createWorkbookOptions: m2, onWorkbookChange: p2, logo: u2, importExportDisabled: g2 = false, themeOptions: h2, autoFocus: x2 = false, commands: b2, title: y2, onTitleChange: w2, titleProps: S2, renderLoadingPanel: k2, ...C2 } = e2, v2 = q(null), T2 = gt(p2, [p2]), P2 = gt(w2 ?? S2?.onTitleChange, [w2 ?? S2?.onTitleChange]), D2 = S2?.placeHolder ?? "Untitled", M2 = h2?.mode, { themeMode: F2, source: N2 } = tt({ mode: M2 }), B2 = V(() => ({ ...h2, light: dt(false, _t.deepMerge(h2?.theme ?? {}, h2?.light ?? {})), dark: dt(true, _t.deepMerge(h2?.theme ?? {}, h2?.dark ?? {})) }), [h2]), E2 = F2 === ot.Dark, [A2, H2] = U(null);
|
|
2649
2649
|
j(() => {
|
|
2650
2650
|
H2(i2 ?? new Qt());
|
|
2651
2651
|
}, [i2]);
|
|
@@ -2685,7 +2685,7 @@ const sr = $(O((e2, t2) => {
|
|
|
2685
2685
|
j(() => {
|
|
2686
2686
|
te2(y2 ?? S2?.title ?? "");
|
|
2687
2687
|
}, [y2 ?? S2?.title]), j(() => {
|
|
2688
|
-
|
|
2688
|
+
P2?.(ee2);
|
|
2689
2689
|
}, [ee2]);
|
|
2690
2690
|
const [oe2, ne2] = U(null), ae2 = V(() => {
|
|
2691
2691
|
const e3 = () => ({ contains: (e4) => true, focus() {
|
|
@@ -2699,7 +2699,7 @@ const sr = $(O((e2, t2) => {
|
|
|
2699
2699
|
}, [X2]);
|
|
2700
2700
|
const ie2 = q(null), se2 = K((e3) => {
|
|
2701
2701
|
let t3 = null;
|
|
2702
|
-
return S2?.hidden || (t3 = z(Fa, { ...S2, style: { maxWidth: "100%", ...S2?.style }, workbook: v2.current, ref: ie2, title: ee2, placeHolder:
|
|
2702
|
+
return S2?.hidden || (t3 = z(Fa, { ...S2, style: { maxWidth: "100%", ...S2?.style }, workbook: v2.current, ref: ie2, title: ee2, placeHolder: D2, onTitleChange: (e4) => {
|
|
2703
2703
|
te2(e4);
|
|
2704
2704
|
} })), z(er, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(B2?.onEnabledDarkGridChange || B2?.onEnabledDarkImagesChange || B2?.onModeChange) });
|
|
2705
2705
|
}, [u2, ee2, S2, B2, g2, ae2]);
|
|
@@ -2716,7 +2716,7 @@ const sr = $(O((e2, t2) => {
|
|
|
2716
2716
|
if (!W2) return de2;
|
|
2717
2717
|
if (W2.error || !W2.workbook) return ce2({ error: W2.error });
|
|
2718
2718
|
let e3 = null, t3 = null, n3 = false;
|
|
2719
|
-
return B2 && (e3 = E2 ? B2.dark : B2.light, t3 = E2 && B2.enableDarkGrid ? B2.dark : B2.light, n3 = B2.enableDarkImages), z(
|
|
2719
|
+
return B2 && (e3 = E2 ? B2.dark : B2.light, t3 = E2 && B2.enableDarkGrid ? B2.dark : B2.light, n3 = B2.enableDarkImages), z(Da, { sx: me2, style: a2, tabIndex: 0, autoFocus: true, workbook: W2.workbook, ref: fe2, renderToolbar: se2, onElementLoad: le2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
|
|
2720
2720
|
d2?.(e4);
|
|
2721
2721
|
}, renderLoadingPanel: k2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, mainWrapper: he2, className: mt(o2), onContextMenu: (e4) => e4.preventDefault(), ...C2 }, "WorkbookElement");
|
|
2722
2722
|
}, [W2, ee2, A2, de2, k2, B2, C2, se2, me2, he2]);
|
|
@@ -2724,7 +2724,7 @@ const sr = $(O((e2, t2) => {
|
|
|
2724
2724
|
v2.current?.focus();
|
|
2725
2725
|
}, Components: { error: Ya }, iconVariant: { success: z(re, { style: { marginRight: "8px" }, children: z("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: z(xt, { iconKey: "ErrorAlert", style: { marginRight: "8px" } }) }, children: z(I, { createArea: ge2, onUpdateArea: (e3) => {
|
|
2726
2726
|
ue2(e3);
|
|
2727
|
-
}, children: z(ct, { children: z(or, { children: z(Lt, { children: z(Ht, { children: z(tr, { workbook: W2?.workbook, setWorkbook: G2, importExportDisabled: g2, titlePlaceHolder:
|
|
2727
|
+
}, children: z(ct, { children: z(or, { children: z(Lt, { children: z(Ht, { children: z(tr, { workbook: W2?.workbook, setWorkbook: G2, importExportDisabled: g2, titlePlaceHolder: D2, titleWorkbook: ee2, setWorkbookTitle: te2, refWorkbookTitle: ie2, commands: ae2, undoManager: A2, themeOptions: B2, children: xe2 }) }) }) }) }) }) });
|
|
2728
2728
|
return B2 && (be2 = L(Ot, { theme: E2 ? B2.dark : B2.light, children: [B2.cssBaseline ? z(Ce, {}) : null, be2] })), be2;
|
|
2729
2729
|
}));
|
|
2730
2730
|
sr.displayName = "EagerStudio";
|
|
@@ -2733,8 +2733,8 @@ export {
|
|
|
2733
2733
|
Ha as AppearanceCommandButton,
|
|
2734
2734
|
mo as AutoColorPosition,
|
|
2735
2735
|
Mo as BorderCommandButton,
|
|
2736
|
-
|
|
2737
|
-
|
|
2736
|
+
Do as BorderPopupButton,
|
|
2737
|
+
Po as BorderStylePopupButton,
|
|
2738
2738
|
ho as C,
|
|
2739
2739
|
Wo as CellsDeleteCommandButton,
|
|
2740
2740
|
$o as CellsFormatCommandButton,
|
|
@@ -2752,7 +2752,7 @@ export {
|
|
|
2752
2752
|
Ho as FillCommandButton,
|
|
2753
2753
|
Rn as FilterColumnMenu,
|
|
2754
2754
|
Go as FilterCommandButton,
|
|
2755
|
-
|
|
2755
|
+
Pn as Filters,
|
|
2756
2756
|
Bo as FindCommandButton,
|
|
2757
2757
|
qo as FontFamilyCommandButton,
|
|
2758
2758
|
Eo as FontSizeCommandButton,
|
|
@@ -2772,7 +2772,7 @@ export {
|
|
|
2772
2772
|
on as PresetCellStylesCommandButton,
|
|
2773
2773
|
Ia as PresetTableStylesCommandButton,
|
|
2774
2774
|
fn as RangeInput,
|
|
2775
|
-
|
|
2775
|
+
Dn as SheetTab,
|
|
2776
2776
|
Mn as SheetTabMenu,
|
|
2777
2777
|
Sn as SheetZoomScale,
|
|
2778
2778
|
Fn as SheetsAllMenu,
|
|
@@ -2799,7 +2799,7 @@ export {
|
|
|
2799
2799
|
Qo as ViewHeadingsCommandButton,
|
|
2800
2800
|
fa as WalkingCopyCommandButton,
|
|
2801
2801
|
ha as WorkbookContextMenu,
|
|
2802
|
-
|
|
2802
|
+
Da as WorkbookElement,
|
|
2803
2803
|
Xa as WorkbookIO,
|
|
2804
2804
|
ga as WorkbookStrip,
|
|
2805
2805
|
Fa as WorkbookTitle,
|