@sheetxl/studio-mui 0.7.12 → 0.7.14
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/-SJdVflEYXFC2raH.cjs +6 -0
- package/browser/cjs/BE0n-qrL7I0lr2f8.cjs +7 -0
- package/browser/cjs/CAxeR5WYtM_OKUqg.cjs +6 -0
- package/browser/cjs/CC-q_GCvhI_uweI4.cjs +6 -0
- package/browser/cjs/{wyak0LMoe5SYbD51.cjs → CHc92OjHJrS2B3rB.cjs} +2 -2
- package/browser/cjs/CN5q08lr4Coj9gzy.cjs +6 -0
- package/browser/cjs/{CcsfLc43Qp-vN_dY.cjs → CYMqmv5IamB1x14k.cjs} +3 -3
- package/browser/cjs/CwHuP4ot4XxM1FbL.cjs +6 -0
- package/browser/cjs/{CMEmwUuGpnOyILAu.cjs → DjU4LQ7p0jFx8PsW.cjs} +1 -1
- package/browser/cjs/DqwSkMX3TSwbvSfO.cjs +20 -0
- package/browser/cjs/Ij3b1ONhNaWLtkRT.cjs +6 -0
- package/browser/cjs/NpKL7qsDwzMarfjO.cjs +6 -0
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/BLiSCviFgWhD9SmC.mjs +53 -0
- package/browser/esm/BNF5wwVTFO0bKhDb.mjs +50 -0
- package/browser/esm/BlDN4JPF9n_TeCyQ.mjs +155 -0
- package/browser/esm/{DK1cCQD1jHxZbFAp.mjs → BzS-7g64cdTk8pFd.mjs} +1 -1
- package/browser/esm/BzkODf-EDNHsbeYC.mjs +26 -0
- package/browser/esm/{B7ChnkonDRA2zazH.mjs → Cd127EllJy0H1x8s.mjs} +3 -3
- package/browser/esm/CfkKWfDbYhDDort6.mjs +46 -0
- package/browser/esm/{CRmCo9Jr1gvSFGVp.mjs → D8YtOXZWnL-YI48g.mjs} +2121 -2108
- package/browser/esm/DezB6LbrlA_MqNpH.mjs +50 -0
- package/browser/esm/{fsGSNDVe9urk2cLB.mjs → DlZXGLXt7KBqpCgX.mjs} +2 -2
- package/browser/esm/{aeHM-2IGRQaGFohd.mjs → XGwUZoREuZ029cPM.mjs} +28 -27
- package/browser/esm/aWQ7-rGmyvVU_nRK.mjs +25 -0
- package/browser/esm/index.mjs +2 -2
- package/licenses/dependencies.txt +142 -142
- package/node/esm/4D3fLVzYqPTas9nR.mjs +25 -0
- package/node/esm/B6-CF_32FCaDZJDm.mjs +52 -0
- package/node/esm/C21w0yQGlygcFqHI.mjs +156 -0
- package/node/esm/{H012qdl97RHln5MW.mjs → C62EF6LSsPD4LAL6.mjs} +1 -1
- package/node/esm/{Df6HNjgJTgShGC-O.mjs → C8TcDhw9hCrJxqfJ.mjs} +1 -1
- package/node/esm/{CwKoYwlrp9nnVHln.mjs → CM8Jkahi0myGVt_v.mjs} +22 -22
- package/node/esm/{CGaHni9C2sipjSMn.mjs → CREPL1yvIjmYpU-r.mjs} +9 -7
- package/node/esm/CeJ5myvgfYOUSKGq.mjs +26 -0
- package/node/esm/{BEFwnAOkyd0CWlex.mjs → D9PLpUGQqMmk1V9n.mjs} +13 -13
- package/node/esm/index.mjs +531 -523
- package/node/esm/{BSTIZiKBGgwjXLtp.mjs → xCdMLxN5xcpczFUI.mjs} +18 -18
- package/package.json +17 -15
- package/browser/cjs/BYfcSe1JgcohGr-C.cjs +0 -7
- package/browser/cjs/BZPmbh6TWeAN2tiY.cjs +0 -6
- package/browser/cjs/CrkutQSHB1Buy5oQ.cjs +0 -6
- package/browser/cjs/D2KC31HOMCGQMLvD.cjs +0 -6
- package/browser/cjs/DiQXaxwfHcQfkYKX.cjs +0 -6
- package/browser/cjs/Dmw2IW35YLNmLgvP.cjs +0 -20
- package/browser/cjs/bItCE_-c88dO7Izw.cjs +0 -6
- package/browser/cjs/fa-Q2vHsld47aqrE.cjs +0 -6
- package/browser/esm/BZPlU0oT2oGTQQgK.mjs +0 -46
- package/browser/esm/BzGH26JDt4xKZfM7.mjs +0 -49
- package/browser/esm/CA-_Kya2gsMrF9Ef.mjs +0 -26
- package/browser/esm/CGBRrUgnGzuP9FGo.mjs +0 -156
- package/browser/esm/csScKLYnqrrlL197.mjs +0 -25
- package/browser/esm/lm9H6CMj_7o_ra2l.mjs +0 -53
- package/node/esm/BqLlyKyVXFNiRaJv.mjs +0 -25
- package/node/esm/Cq6TadzONqFlX07d.mjs +0 -26
- package/node/esm/D71WQjM6hP5FzBql.mjs +0 -157
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.14
|
|
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
|
-
import { Color as e, IColor as t, ITheme as o, CommonUtils as n, IBorder as a,
|
|
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
|
|
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 D, SheetElement as P, 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
|
-
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
|
|
14
|
-
import { CommandButton as ve, ExhibitDivider as Te, defaultCreatePopupPanel as Re, CommandPopupButton as
|
|
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 De, InputCommandButton as Pe, 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
|
|
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 Dt, Command as Pt, 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,25 +37,35 @@ 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(De, { 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
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), s2 = V(() => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
const e3 = i2.length;
|
|
44
|
+
let t3, o3 = 0;
|
|
45
|
+
for (let n3 = 0; n3 < e3; n3++) {
|
|
46
|
+
const e4 = i2[n3];
|
|
47
|
+
e4 && !e4.disabled() && (!t3 && e4?.state() && (t3 = e4), o3++);
|
|
48
|
+
}
|
|
49
|
+
return t3 = t3 ?? i2[0], { activeCommand: t3, allDisabled: 0 === o3 };
|
|
50
|
+
}, [i2]), c2 = K((e3, t3) => {
|
|
46
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") })] });
|
|
47
52
|
return Re({ ...e3, children: l3 });
|
|
48
53
|
}, [r2, n2]);
|
|
49
|
-
return z(
|
|
54
|
+
return z(De, { 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 });
|
|
50
55
|
})), io = $(O((e2, t2) => {
|
|
51
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), s2 = V(() => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
+
const e3 = i2.length;
|
|
58
|
+
let t3, o3 = 0;
|
|
59
|
+
for (let n3 = 0; n3 < e3; n3++) {
|
|
60
|
+
const e4 = i2[n3];
|
|
61
|
+
e4 && !e4.disabled() && (!t3 && e4?.state() && (t3 = e4), o3++);
|
|
62
|
+
}
|
|
63
|
+
return t3 = t3 ?? i2[0], { activeCommand: t3, allDisabled: 0 === o3 };
|
|
64
|
+
}, [i2]), c2 = gt((e3, t3) => {
|
|
55
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") })] });
|
|
56
66
|
return Re({ ...e3, children: l3 });
|
|
57
67
|
}, [r2, n2, a2]);
|
|
58
|
-
return z(
|
|
68
|
+
return z(De, { 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 });
|
|
59
69
|
})), so = $(O((e2, t2) => {
|
|
60
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(() => {
|
|
61
71
|
const e3 = i2.length;
|
|
@@ -65,10 +75,10 @@ const ro = $(O((e2, t2) => {
|
|
|
65
75
|
}
|
|
66
76
|
return i2[1];
|
|
67
77
|
}, [i2]), d2 = K((e3, t3) => {
|
|
68
|
-
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(Pe, { ...o3, command: t3.getCommand("formatTextRotateCustom"), label: "Custom" })] });
|
|
69
79
|
return Re({ ...e3, children: l3 });
|
|
70
80
|
}, [r2, n2, a2, o2]), c2 = V(() => 0 !== (o2.getCommand("formatTextRotateCustom")?.state() ?? 0), [i2]);
|
|
71
|
-
return z(
|
|
81
|
+
return z(De, { 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 });
|
|
72
82
|
})), co = { Preset: "preset", Custom: "custom" }, mo = { Start: "start", End: "end" }, po = {}, uo = (e2, t2, o2, n2) => {
|
|
73
83
|
const a2 = e2 + "-" + t2 + "-" + o2 + (n2 ? "-server" : "");
|
|
74
84
|
if (po[a2]) return po[a2];
|
|
@@ -96,17 +106,17 @@ const ro = $(O((e2, t2) => {
|
|
|
96
106
|
s2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
|
|
97
107
|
}, [n2, s2, t2]), w2 = K((e3) => {
|
|
98
108
|
r2?.(e3), e3.isDefaultPrevented() || e3.keyCode === ft.Enter && o2?.(t2.toRGBA());
|
|
99
|
-
}, [o2, r2, t2]),
|
|
100
|
-
return L("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d2 }, tabIndex: 0, ...h2, onClick: f2, onKeyDown: w2, onMouseOver: x2, onMouseLeave: b2, onFocus: y2, children: [
|
|
109
|
+
}, [o2, r2, t2]), S2 = V(() => 1 === t2.toRGBA().alpha ? null : z(ho, { size: g2, white: m2, grey: p2, style: { position: "absolute", width: "calc(100% - 1.5px)", height: "calc(100% - 1.5px)", top: "0.75px", left: "0.75px" } }), [m2, p2, t2]);
|
|
110
|
+
return L("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d2 }, tabIndex: 0, ...h2, onClick: f2, onKeyDown: w2, onMouseOver: x2, onMouseLeave: b2, onFocus: y2, children: [S2, z("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: t2.toCSS(u2) }, children: c2 })] });
|
|
101
111
|
}), xo = $((o2) => {
|
|
102
112
|
const { schemeColorLookup: n2, selectedColor: a2, previewColor: r2, colorDef: l2, onSelectColorDef: i2, onPreviewColorDef: s2, swatchProps: d2, defaultButtonSize: c2 = 24, isLarge: m2 = false, compareRGB: p2 = false, darkMode: u2 = false, ...g2 } = o2, h2 = new e({ val: l2.definition.val, adjs: l2.definition.adjs }, (e2) => n2(e2)), f2 = p2 ? h2.toRGBA().toString() : h2.toString(), x2 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, b2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, y2 = [];
|
|
103
113
|
y2.push({ [t.AdjustmentType.Inv]: true }), y2.push({ [t.AdjustmentType.Alpha]: 100 });
|
|
104
|
-
const w2 = h2.adjust(y2),
|
|
114
|
+
const w2 = h2.adjust(y2), S2 = K(() => {
|
|
105
115
|
i2?.(l2);
|
|
106
|
-
}, [i2, l2]),
|
|
116
|
+
}, [i2, l2]), k2 = K((e2) => {
|
|
107
117
|
s2?.(e2 ? l2 : null);
|
|
108
118
|
}, [s2, l2]);
|
|
109
|
-
return z(Me, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: l2.description, placement: "bottom-start", children: z("div", { style: { width: c2 * (m2 ? 1.2 : 1) + "px", height: c2 * (m2 ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g2, children: L(fo, { selectedColor: h2, title: null, onSelectColor:
|
|
119
|
+
return z(Me, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: l2.description, placement: "bottom-start", children: z("div", { style: { width: c2 * (m2 ? 1.2 : 1) + "px", height: c2 * (m2 ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...g2, children: L(fo, { selectedColor: h2, title: null, onSelectColor: S2, onPreviewColor: k2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...d2, children: [z("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: w2.toRGBA(u2).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: x2 ? "1" : "0" } }), z("div", { style: { position: "absolute", width: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", height: 0.33 * c2 * (m2 ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: w2.toRGBA(u2).toString(), borderRadius: "50%", opacity: b2 ? "1" : "0" } })] }) }) });
|
|
110
120
|
}), bo = $((e2) => {
|
|
111
121
|
const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = ht.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, swatchProps: m2, ...p2 } = e2;
|
|
112
122
|
let u2;
|
|
@@ -140,14 +150,14 @@ const ro = $(O((e2, t2) => {
|
|
|
140
150
|
r2?.set(d2, s2);
|
|
141
151
|
const c2 = s2.toRGBA().toString();
|
|
142
152
|
l2?.set(c2, s2);
|
|
143
|
-
},
|
|
144
|
-
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:
|
|
153
|
+
}, So = W.lazy(() => import("./C8TcDhw9hCrJxqfJ.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, D2 = l2 || r2, P2 = 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(() => {
|
|
145
155
|
const e2 = /* @__PURE__ */ new Map(), t3 = /* @__PURE__ */ new Map(), n2 = [];
|
|
146
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);
|
|
147
157
|
const a3 = o.buildPalette(n2, W2, e2, t3), r3 = [];
|
|
148
|
-
if (wo("Dark Red", "C00000", W2, r3, e2, t3), wo("Red", "FF0000", W2, r3, e2, t3), wo("Orange", "FFC000", W2, r3, e2, t3), wo("Yellow", "FFFF00", W2, r3, e2, t3), wo("Light Green", "92D050", W2, r3, e2, t3), wo("Green", "00B050", W2, r3, e2, t3), wo("Light Blue", "00B0F0", W2, r3, e2, t3), wo("Blue", "0070C0", W2, r3, e2, t3), wo("Dark Blue", "002060", W2, r3, e2, t3), d2 ? wo("Purple Is A Fruit", "7030A0", W2, r3, e2, t3) : wo("Transparent", "00000000", W2, r3, e2, t3),
|
|
149
|
-
const t4 =
|
|
150
|
-
e2.set(t4,
|
|
158
|
+
if (wo("Dark Red", "C00000", W2, r3, e2, t3), wo("Red", "FF0000", W2, r3, e2, t3), wo("Orange", "FFC000", W2, r3, e2, t3), wo("Yellow", "FFFF00", W2, r3, e2, t3), wo("Light Green", "92D050", W2, r3, e2, t3), wo("Green", "00B050", W2, r3, e2, t3), wo("Light Blue", "00B0F0", W2, r3, e2, t3), wo("Blue", "0070C0", W2, r3, e2, t3), wo("Dark Blue", "002060", W2, r3, e2, t3), d2 ? wo("Purple Is A Fruit", "7030A0", W2, r3, e2, t3) : wo("Transparent", "00000000", W2, r3, e2, t3), S2) {
|
|
159
|
+
const t4 = S2.toString();
|
|
160
|
+
e2.set(t4, S2);
|
|
151
161
|
}
|
|
152
162
|
const l3 = /* @__PURE__ */ new Map(), s3 = "function" == typeof i2 ? i2() : i2, c3 = [];
|
|
153
163
|
for (let e3 = 0; s3 && e3 < s3.length; e3++) {
|
|
@@ -155,7 +165,7 @@ const ro = $(O((e2, t2) => {
|
|
|
155
165
|
l3.set(t4, s3[e3]), c3.push({ description: "Recent " + (e3 + 1), definition: { val: s3[e3].toString() } });
|
|
156
166
|
}
|
|
157
167
|
return { primaryColors: n2, modifiedPresets: a3, standardColors: r3, recentColorsLimited: c3, mapAllPresets: e2, mapAllPresetsRGB: t3, mapRecent: l3 };
|
|
158
|
-
}, [W2, i2, d2,
|
|
168
|
+
}, [W2, i2, d2, S2]);
|
|
159
169
|
j(() => {
|
|
160
170
|
g2?.();
|
|
161
171
|
}, []);
|
|
@@ -172,8 +182,8 @@ const ro = $(O((e2, t2) => {
|
|
|
172
182
|
}
|
|
173
183
|
}, [r2, m2]);
|
|
174
184
|
const X2 = K(n.debounce((e2) => {
|
|
175
|
-
|
|
176
|
-
}, c2), [
|
|
185
|
+
P2?.(e2);
|
|
186
|
+
}, c2), [P2, c2]), [Z2, Y2] = U();
|
|
177
187
|
j(() => {
|
|
178
188
|
Y2(l2 || r2);
|
|
179
189
|
}, [l2, r2]);
|
|
@@ -219,16 +229,16 @@ const ro = $(O((e2, t2) => {
|
|
|
219
229
|
}, [$2, T2]), me2 = V(() => {
|
|
220
230
|
if (!O2) return;
|
|
221
231
|
const e2 = { opacity: O2 ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
|
|
222
|
-
return z(_, { fallback: z("div", { style: e2, children: z(Fe, {}) }), children: z(
|
|
223
|
-
}, [O2,
|
|
224
|
-
if (!
|
|
225
|
-
const e2 = { description:
|
|
232
|
+
return z(_, { fallback: z("div", { style: e2, children: z(Fe, {}) }), children: z(So, { style: e2, selectedColor: D2 ? D2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
|
|
233
|
+
}, [O2, D2]), pe2 = V(() => ({ onClick: le2, alphaGrey: I2.palette.text.icon ?? I2.palette.action.active }), [le2, I2]), ue2 = V(() => {
|
|
234
|
+
if (!S2) return null;
|
|
235
|
+
const e2 = { description: k2, definition: { val: S2.getVal(), adjs: S2.getAdjustments() } };
|
|
226
236
|
return z(H, { children: L(oe, { sx: { display: "flex", color: (e3) => e3.palette.text.secondary }, onMouseOver: () => {
|
|
227
237
|
re2(null);
|
|
228
238
|
}, onClick: () => {
|
|
229
239
|
se2(null);
|
|
230
|
-
}, children: [z(J, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: z(xo, { schemeColorLookup: W2, colorDef: e2, selectedColor: null === r2 ?
|
|
231
|
-
}, [
|
|
240
|
+
}, children: [z(J, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: z(xo, { schemeColorLookup: W2, colorDef: e2, selectedColor: null === r2 ? S2 : r2, previewColor: null === l2 ? S2 : l2, defaultButtonSize: p2, isLarge: true, darkMode: T2, compareRGB: v2, swatchProps: pe2 }) }), z(ee, { noWrap: true, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: k2 })] }) });
|
|
241
|
+
}, [S2, k2, W2, r2, l2]);
|
|
232
242
|
return L(J, { ref: a2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...R2, children: [L("div", { style: { position: "relative", display: "flex" }, children: [L("div", { style: { opacity: O2 ? "0" : 1 }, children: [ue2 && C2 === mo.Start ? L(H, { children: [ue2, z(ne, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, z(bo, { title: "Theme Colors", schemeColorLookup: W2, colorDefs: $2.primaryColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), z(bo, { schemeColorLookup: W2, colorDefs: $2.modifiedPresets, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), z(ne, { light: true, style: { marginBottom: "10px" } }), z(bo, { title: "Standard Colors", schemeColorLookup: W2, colorDefs: $2.standardColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 }), L("div", { style: { opacity: 0 === $2.recentColorsLimited.length ? "0" : void 0, display: 0 === $2.recentColorsLimited.length ? "none" : void 0 }, children: [z(ne, { light: true, style: { marginBottom: "10px" } }), z(bo, { title: "Recent Colors", schemeColorLookup: W2, colorDefs: $2.recentColorsLimited, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: v2, darkMode: T2 })] }), ue2 && C2 === mo.End ? L(H, { children: [z(ne, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, z("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), z(ne, { light: true, style: { marginBottom: "10px" } }), L("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [ce2, z("div", { style: { flex: "1 1 100%", background: "pink" } }), z(ae, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
|
|
233
243
|
q2();
|
|
234
244
|
}, children: z("div", O2 ? { children: "Preset" } : { children: "Custom" }) }), z(ae, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
|
|
@@ -238,28 +248,28 @@ const ro = $(O((e2, t2) => {
|
|
|
238
248
|
}, children: "Done" })] })] });
|
|
239
249
|
})), Co = z(xt, { iconKey: "circle.colored" }), vo = $(O((e2, t2) => {
|
|
240
250
|
const { selectedColor: o2, quickColor: n2, icon: a2 = Co, tooltip: r2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Ne.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = gt(i2, [i2]), x2 = gt(s2, [s2]), b2 = gt(d2, [d2]), [y2, w2] = U(() => {
|
|
241
|
-
}),
|
|
251
|
+
}), S2 = n2 || (y2 || o2) || m2?.autoColor, k2 = q(false), C2 = K(() => {
|
|
242
252
|
}, []), v2 = gt(() => {
|
|
243
253
|
w2(o2);
|
|
244
254
|
}, [o2]), T2 = gt((e3) => {
|
|
245
|
-
|
|
255
|
+
k2.current || (w2(e3), f2?.(e3));
|
|
246
256
|
}, [f2]), R2 = gt((e3) => {
|
|
247
|
-
|
|
248
|
-
}, [x2]),
|
|
249
|
-
|
|
250
|
-
}, [b2]),
|
|
257
|
+
k2.current || (w2(e3), x2?.(e3));
|
|
258
|
+
}, [x2]), D2 = gt((e3, t3) => {
|
|
259
|
+
k2.current || (w2(void 0), b2?.(e3, t3));
|
|
260
|
+
}, [b2]), P2 = 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) => {
|
|
251
261
|
b2?.(n2, false);
|
|
252
262
|
}, [b2, n2]), [F2, N2] = U(false), B2 = K((e3) => {
|
|
253
263
|
const { closeFloat: t3, closeFloatAll: n3 } = e3;
|
|
254
|
-
return z(
|
|
264
|
+
return z(ko, { ...m2, selectedColor: o2, previewColor: y2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
|
|
255
265
|
e4.which === ft.Enter && (p2 ? n3() : t3());
|
|
256
|
-
}, onPreviewColorImmediate: R2, onPreviewColor: T2, onSelectColor:
|
|
257
|
-
}, [o2, y2, p2,
|
|
266
|
+
}, onPreviewColorImmediate: R2, onPreviewColor: T2, onSelectColor: D2, 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: P2, ...h2 };
|
|
258
268
|
return c2 === Ne.Toolbar ? z(Be, { ref: t2, ...E2 }) : z(Ee, { ref: t2, ...E2 });
|
|
259
269
|
})), To = 82, Ro = (e2) => {
|
|
260
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;
|
|
261
|
-
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(
|
|
262
|
-
},
|
|
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
|
+
}, Do = $(O((e2, t2) => {
|
|
263
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) => {
|
|
264
274
|
const { popupContainer: t3, floatReference: o3, closeFloat: l3, ...d3 } = e3, p3 = [], u3 = a.BuiltInDefinitionsArray;
|
|
265
275
|
for (let e4 = 0; e4 < u3.length; e4++) {
|
|
@@ -280,8 +290,8 @@ const ro = $(O((e2, t2) => {
|
|
|
280
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 });
|
|
281
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 };
|
|
282
292
|
return o2 === Ne.Toolbar ? z(Be, { ...b2 }) : z(Ee, { ...b2 });
|
|
283
|
-
})),
|
|
284
|
-
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,
|
|
293
|
+
})), Po = $(O((t2, o2) => {
|
|
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) => {
|
|
285
295
|
const t3 = {}, o3 = e2 ? Object.keys(e2) : [];
|
|
286
296
|
let n3 = false;
|
|
287
297
|
const r3 = o3.length;
|
|
@@ -292,12 +302,12 @@ const ro = $(O((e2, t2) => {
|
|
|
292
302
|
o3.length < 6 && (n3 = true);
|
|
293
303
|
const l3 = n3 ? t3.left : null, i3 = n3 ? t3.top : null, d3 = n3 ? t3.right : null, c3 = n3 ? t3.bottom : null, m3 = n3 ? t3.vertical : null, p3 = n3 ? t3.horizontal : null;
|
|
294
304
|
let g3 = "";
|
|
295
|
-
return i3 || l3 || (g3 += "M 3,5 H 5 V 3 H 3 "), i3 || (g3 += "M 7,5 H 9 V 3 H 7 "), i3 || m3 || (g3 += "M 11,5 h 2 V 3 h -2 "), i3 || (g3 += "M 15,5 h 2 V 3 h -2 "), i3 || d3 || (g3 += "M 19,5 h 2 V 3 h -2 "), l3 || (g3 += "M 3,9 H 5 V 7 H 3 "), m3 || (g3 += "M 11,9 h 2 V 7 h -2 "), d3 || (g3 += "M 19,9 h 2 V 7 h -2 "), p3 || l3 || (g3 += "M 3,13 H 5 V 11 H 3 "), p3 || (g3 += "M 7,13 H 9 V 11 H 7 "), p3 || m3 || (g3 += "M 11,13 h 2 v -2 h -2 "), p3 || d3 || (g3 += "M 19,13 h 2 v -2 h -2 "), p3 || (g3 += "M 15,13 h 2 v -2 h -2 "), l3 || (g3 += "M 3,17 H 5 V 15 H 3 "), m3 || (g3 += "M 11,17 h 2 v -2 h -2 "), d3 || (g3 += "M 19,17 h 2 v -2 h -2 "), c3 || l3 || (g3 += "M 3,21 H 5 V 19 H 3 "), c3 || (g3 += "M 7,21 H 9 V 19 H 7 "), c3 || m3 || (g3 += "M 11,21 h 2 v -2 h -2 "), c3 || (g3 += "M 15,21 h 2 v -2 h -2 "), c3 || d3 || (g3 += "M 19,21 h 2 v -2 h -2 "), L(xt, { children: [" ", L(J, { className: "border-icon", sx: { width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", position: "relative", "& .grid > path": { opacity: "0.8" } }, children: [z("svg", { viewBox: "0 0 24 24", className: "grid", style: { top: "0px", left: "0px", width: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", height: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", position: "absolute" }, children: z("path", { className: "fill", d: g3 }) }), z(J, { className: "border-container", sx: { position: "absolute", display: "flex", justifyContent: "stretch", alignItems: "stretch", top: "0px", left: "0px", width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", padding: "1px 1px", "& svg path": { filter: Le } }, children: z(
|
|
305
|
+
return i3 || l3 || (g3 += "M 3,5 H 5 V 3 H 3 "), i3 || (g3 += "M 7,5 H 9 V 3 H 7 "), i3 || m3 || (g3 += "M 11,5 h 2 V 3 h -2 "), i3 || (g3 += "M 15,5 h 2 V 3 h -2 "), i3 || d3 || (g3 += "M 19,5 h 2 V 3 h -2 "), l3 || (g3 += "M 3,9 H 5 V 7 H 3 "), m3 || (g3 += "M 11,9 h 2 V 7 h -2 "), d3 || (g3 += "M 19,9 h 2 V 7 h -2 "), p3 || l3 || (g3 += "M 3,13 H 5 V 11 H 3 "), p3 || (g3 += "M 7,13 H 9 V 11 H 7 "), p3 || m3 || (g3 += "M 11,13 h 2 v -2 h -2 "), p3 || d3 || (g3 += "M 19,13 h 2 v -2 h -2 "), p3 || (g3 += "M 15,13 h 2 v -2 h -2 "), l3 || (g3 += "M 3,17 H 5 V 15 H 3 "), m3 || (g3 += "M 11,17 h 2 v -2 h -2 "), d3 || (g3 += "M 19,17 h 2 v -2 h -2 "), c3 || l3 || (g3 += "M 3,21 H 5 V 19 H 3 "), c3 || (g3 += "M 7,21 H 9 V 19 H 7 "), c3 || m3 || (g3 += "M 11,21 h 2 v -2 h -2 "), c3 || (g3 += "M 15,21 h 2 v -2 h -2 "), c3 || d3 || (g3 += "M 19,21 h 2 v -2 h -2 "), L(xt, { children: [" ", L(J, { className: "border-icon", sx: { width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", position: "relative", "& .grid > path": { opacity: "0.8" } }, children: [z("svg", { viewBox: "0 0 24 24", className: "grid", style: { top: "0px", left: "0px", width: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", height: "calc(var(--icon-size, var(--icon-size-md)) + 1px)", position: "absolute" }, children: z("path", { className: "fill", d: g3 }) }), z(J, { className: "border-container", sx: { position: "absolute", display: "flex", justifyContent: "stretch", alignItems: "stretch", top: "0px", left: "0px", width: "var(--icon-size, var(--icon-size-md))", height: "var(--icon-size, var(--icon-size-md))", padding: "1px 1px", "& svg path": { filter: Le } }, children: z(y, { getBorderAt: (e3, n4) => {
|
|
296
306
|
if (!u2 || 0 === o3.length) return null;
|
|
297
307
|
const a2 = e3.rowIndex, r4 = e3.colIndex, l4 = {};
|
|
298
308
|
return 0 === a2 ? (l4.top = t3.top, l4.bottom = t3.horizontal) : (l4.top = t3.horizontal, l4.bottom = t3.bottom), 0 === r4 ? (l4.left = t3.left, l4.right = t3.vertical) : (l4.left = t3.vertical, l4.right = t3.right), u2?.(l4);
|
|
299
309
|
}, darkMode: s2, style: { top: "2px", left: "2px", width: "calc(100% - 5px)", height: "calc(100% - 5px)", position: "absolute" } }) })] })] });
|
|
300
|
-
}, [C2,
|
|
310
|
+
}, [C2, k2, s2]), R2 = K((e2, t3, o3) => {
|
|
301
311
|
let n3 = null;
|
|
302
312
|
if (e2 && e2.length > 0) {
|
|
303
313
|
let a2 = null;
|
|
@@ -306,187 +316,181 @@ const ro = $(O((e2, t2) => {
|
|
|
306
316
|
for (let t4 = 0; t4 < r3; t4++) n3[e2[t4]] = a2;
|
|
307
317
|
}
|
|
308
318
|
return n3;
|
|
309
|
-
}, []), P2 = K((e2) => {
|
|
310
|
-
h2?.(e2);
|
|
311
319
|
}, []), D2 = K((e2) => {
|
|
320
|
+
h2?.(e2);
|
|
321
|
+
}, []), P2 = K((e2) => {
|
|
312
322
|
f2?.(e2);
|
|
313
323
|
}, []), M2 = K((t3) => {
|
|
314
324
|
const { closeFloatAll: o3, floatReference: l3 } = t3, c3 = (e2, t4, n3 = "bottom", r3 = false) => {
|
|
315
|
-
const l4 = R2(e2, C2 ?? null, r3 ? a.StrokeStyle.None :
|
|
325
|
+
const l4 = R2(e2, C2 ?? null, r3 ? a.StrokeStyle.None : k2 ?? null), i3 = r3 ? R2([], C2 ?? null, k2 ?? null) : l4;
|
|
316
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: () => {
|
|
317
|
-
o3(),
|
|
327
|
+
o3(), P2(l4), D2(l4);
|
|
318
328
|
} });
|
|
319
|
-
}, 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:
|
|
320
|
-
|
|
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
|
+
S2(e2);
|
|
321
331
|
}, onSelectColor: (e2, t4) => {
|
|
322
|
-
|
|
323
|
-
}, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 ||
|
|
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(Do, { selectedStyle: k2, onSelectStyle: b2, styleColor: C2, darkMode: s2, variant: Ne.Toolbar, parentFloat: l3 })] }) });
|
|
324
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] });
|
|
325
|
-
}, [
|
|
335
|
+
}, [k2, C2, n2, r2, s2]), F2 = V(() => T2(v2), [v2, s2]);
|
|
326
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: () => {
|
|
327
337
|
h2?.(v2);
|
|
328
338
|
}, quickButtonProps: { sx: {} }, disabled: i2, icon: F2, ...g2 });
|
|
329
339
|
})), Mo = $(O((e2, t2) => {
|
|
330
|
-
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,
|
|
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) => {
|
|
331
341
|
y2?.onBorderSelect && y2.onBorderSelect(e3), p2?.(e3), b2?.execute(e3, a2);
|
|
332
|
-
}, [b2, p2, a2]),
|
|
342
|
+
}, [b2, p2, a2]), D2 = K((e3, t3) => {
|
|
333
343
|
const { children: o3, title: n3, ...a3 } = e3;
|
|
334
344
|
let i3 = e3.children;
|
|
335
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 });
|
|
336
346
|
}, [b2, l2]);
|
|
337
|
-
return z(
|
|
347
|
+
return z(Po, { ref: t2, autoColor: w2, darkMode: C2, autoStrokeStyle: S2, createTemporaryBorder: v2, schemeLookup: T2, selectedBorder: k2, onSelectBorder: R2, createTooltip: D2, disabled: l2 || !b2 || b2.disabled(), ...f2 });
|
|
338
348
|
})), Fo = $(O((e2, t2) => {
|
|
339
349
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
|
|
340
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") })] });
|
|
341
351
|
return Re({ ...e3, children: l3 });
|
|
342
352
|
}, [r2, n2, a2]);
|
|
343
|
-
return z(
|
|
353
|
+
return z(De, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: "MergeAll", ...l2 });
|
|
344
354
|
})), No = $(O((e2, t2) => {
|
|
345
355
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
|
|
346
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") })] });
|
|
347
357
|
return Re({ ...e3, children: l3 });
|
|
348
358
|
}, [r2, n2, a2]);
|
|
349
|
-
return z(
|
|
350
|
-
})), Bo = $(O((e2, t2) => {
|
|
351
|
-
const {
|
|
352
|
-
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("find") }), z(ve, { ...o3, command: t3.getCommand("findReplace") }), z(ve, { ...o3, command: t3.getCommand("goto") })] });
|
|
353
|
-
return Re({ ...e3, children: l3 });
|
|
354
|
-
}, [r2, n2, a2]);
|
|
355
|
-
return z(Pe, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: i2, label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: "Find", ...l2 });
|
|
356
|
-
})), Eo = $(O((e2, t2) => {
|
|
357
|
-
const { command: o2, commandHook: n2, showQuickButtons: a2 = !!e2.commands, commands: l2, fontSizes: i2 = y.DefaultFontSizes, disabled: s2 = false, parentFloat: d2, icon: c2, label: m2, sx: p2, ...u2 } = e2;
|
|
359
|
+
return z(De, { 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
|
+
})), 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
|
+
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;
|
|
358
362
|
bt(o2);
|
|
359
|
-
const
|
|
360
|
-
const e3 = parseFloat(
|
|
361
|
-
isNaN(e3) ?
|
|
362
|
-
}, [
|
|
363
|
+
const h2 = () => o2?.state()?.toString() || "11", [f2, x2] = U(h2), b2 = gt(() => {
|
|
364
|
+
const e3 = parseFloat(f2);
|
|
365
|
+
isNaN(e3) ? x2(h2()) : parseFloat(h2()) !== e3 && o2.execute(e3, n2);
|
|
366
|
+
}, [h2, o2, f2, n2]);
|
|
363
367
|
j(() => {
|
|
364
|
-
|
|
368
|
+
x2(h2());
|
|
365
369
|
}, [o2?.state()]);
|
|
366
|
-
const
|
|
370
|
+
const y2 = V(() => {
|
|
367
371
|
if (!n2) return null;
|
|
368
372
|
const e3 = { ...n2 };
|
|
369
373
|
return delete e3.beforeExecute, e3;
|
|
370
|
-
}, [n2]), w2 = pt(
|
|
374
|
+
}, [n2]), w2 = pt(i2, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), S2 = V(() => w2 ? L(J, { className: mt("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e3) => e3.stopPropagation(), children: [z(ve, { command: w2[0], commandHook: y2 }), z(ve, { command: w2[1], commandHook: y2 })] }) : null, [w2]), k2 = zt(), C2 = V(() => `${l.getSharedMeasurer()("12.3", Math.round(k2.typography.fontSize), k2.typography.fontFamily).width}px`, [k2]), v2 = K((e3) => {
|
|
371
375
|
const { onMouseDown: t3, onMouseUp: n3, ...a3 } = e3;
|
|
372
|
-
return z(te, { component: "div", ...a3, disableRipple: true, children: z(le, { inputMode: "numeric", disabled:
|
|
376
|
+
return z(te, { component: "div", ...a3, disableRipple: true, children: z(le, { inputMode: "numeric", disabled: d2 || !o2 || o2.disabled(), inputProps: { name: "font-input", autoComplete: "off", tabIndex: 0, type: "number", maxLength: 4, max: 409, min: 2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.error.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (e4) => `${Math.round(e4.typography.fontSize)}px`, width: C2, color: (e4) => e4.palette.text.secondary, input: { padding: "0 0", textAlign: "center", height: "1rem", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" } }, value: f2, onFocus: (e4) => {
|
|
373
377
|
e4.target?.select();
|
|
374
378
|
}, onKeyDown: (e4) => {
|
|
375
|
-
if (e4.which === ft.Enter)
|
|
376
|
-
else if (e4.which === ft.Escape)
|
|
379
|
+
if (e4.which === ft.Enter) h2() !== f2 && (e4.stopPropagation(), e4.preventDefault(), b2());
|
|
380
|
+
else if (e4.which === ft.Escape) h2() !== f2 && (x2(h2()), setTimeout(() => {
|
|
377
381
|
e4.target?.select();
|
|
378
382
|
}, 0), e4.stopPropagation(), e4.preventDefault());
|
|
379
383
|
else {
|
|
380
384
|
if (e4.key.match("[-]")) return e4.stopPropagation(), void e4.preventDefault();
|
|
381
|
-
if (e4.key.match("[0-9.]") && (
|
|
385
|
+
if (e4.key.match("[0-9.]") && (f2 + e4.key).length > 4) return e4.stopPropagation(), void e4.preventDefault();
|
|
382
386
|
if (e4.which === ft.Space) return void e4.preventDefault();
|
|
383
387
|
}
|
|
384
388
|
}, onBlur: () => {
|
|
385
|
-
|
|
389
|
+
b2();
|
|
386
390
|
}, onChange: (e4) => {
|
|
387
391
|
if (e4.target.value.length > 4) return e4.stopPropagation(), void e4.preventDefault();
|
|
388
|
-
|
|
392
|
+
x2(e4.target.value);
|
|
389
393
|
} }) });
|
|
390
|
-
}, [
|
|
394
|
+
}, [f2, d2, o2]), T2 = K((e3) => {
|
|
391
395
|
const t3 = (e4) => {
|
|
392
396
|
o2?.execute(e4, n2);
|
|
393
397
|
}, a3 = o2?.state(), r2 = [];
|
|
394
|
-
for (let e4 = 0; e4 <
|
|
395
|
-
const n3 =
|
|
396
|
-
r2.push(z(Ae, { selected: n3, icon: n3 ? z(
|
|
398
|
+
for (let e4 = 0; e4 < s2.length; e4++) {
|
|
399
|
+
const n3 = s2[e4] === a3;
|
|
400
|
+
r2.push(z(Ae, { selected: n3, icon: n3 ? z(Oe, {}) : void 0, disabled: d2 || !o2 || o2.disabled(), onMouseDown: (e5) => {
|
|
397
401
|
0 === e5.button && e5.preventDefault();
|
|
398
402
|
}, onMouseUp: (o3) => {
|
|
399
|
-
0 === o3.button && t3(
|
|
403
|
+
0 === o3.button && t3(s2[e4]);
|
|
400
404
|
}, onKeyDown: (o3) => {
|
|
401
|
-
o3.keyCode !== ft.Enter && o3.keyCode !== ft.Space || t3(
|
|
402
|
-
}, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: z(J, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children:
|
|
405
|
+
o3.keyCode !== ft.Enter && o3.keyCode !== ft.Space || t3(s2[e4]);
|
|
406
|
+
}, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: z(J, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: s2[e4] }) }, "fontSize-" + e4));
|
|
403
407
|
}
|
|
404
|
-
const
|
|
405
|
-
return Re({ ...e3, children:
|
|
406
|
-
}, [
|
|
407
|
-
return z(Be, { ref: t2, sx: { ...
|
|
408
|
+
const l2 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g2, children: [S2, z(Te, { orientation: "horizontal" }), z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 })] });
|
|
409
|
+
return Re({ ...e3, children: l2 });
|
|
410
|
+
}, [d2, o2?.state(), n2]);
|
|
411
|
+
return z(Be, { ref: t2, sx: { ...u2 }, tabIndex: -1, outlined: true, disabled: d2, parentFloat: c2, createPopupPanel: T2, createTooltip: ({ children: e3 }, t3) => z(He, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: v2, ...g2 });
|
|
408
412
|
})), Ao = $((e2) => {
|
|
409
|
-
const { selected: t2, disabled: o2, formattedValue: n2, handleSetFormat: a2, format: r2, sx:
|
|
410
|
-
return z(Ae, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...
|
|
413
|
+
const { selected: t2, disabled: o2, formattedValue: n2, handleSetFormat: a2, format: r2, sx: l2, ...s2 } = e2;
|
|
414
|
+
return z(Ae, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...l2 }, disabled: o2, selected: t2, icon: t2 ? z(Oe, {}) : void 0, onMouseDown: (e3) => {
|
|
411
415
|
0 === e3.button && e3.preventDefault();
|
|
412
416
|
}, onMouseUp: (e3) => {
|
|
413
417
|
0 === e3.button && a2(r2.numberFormat);
|
|
414
418
|
}, onKeyDown: (e3) => {
|
|
415
419
|
e3.keyCode !== ft.Enter && e3.keyCode !== ft.Space || a2(r2.numberFormat);
|
|
416
|
-
}, ...s2, children: L(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [L(ee, { component: "div", children: [r2.formatType, r2.formatType ===
|
|
420
|
+
}, ...s2, children: L(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [L(ee, { component: "div", children: [r2.formatType, r2.formatType === i.Type.Custom ? "…" : ""] }), z(ee, { variant: "caption", component: "div", sx: { color: (e3) => Vt(e3.palette.text.primary, 0.6), paddingTop: n2 && n2.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: n2 && n2.length > 0 ? n2 : " " })] }) });
|
|
417
421
|
}), Io = $(O((e2, t2) => {
|
|
418
|
-
const { commands: o2, commandHook: n2, scope: a2, sx:
|
|
422
|
+
const { commands: o2, commandHook: n2, scope: a2, sx: r2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = pt(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? i.Styles.lookupStyle(m2?.state()).formatType : i.Type.General, u2 = V(() => {
|
|
419
423
|
if (!n2) return null;
|
|
420
424
|
const e3 = { ...n2 };
|
|
421
425
|
return delete e3.beforeExecute, e3;
|
|
422
426
|
}, [n2]), g2 = K((e3, t3) => {
|
|
423
427
|
const o3 = (e4) => {
|
|
424
428
|
n2?.beforeExecute?.(m2, m2?.state()), m2.execute(e4, n2), n2?.onExecute?.(m2, m2?.state());
|
|
425
|
-
},
|
|
426
|
-
for (let e4 = 0; e4 <
|
|
429
|
+
}, r3 = m2?.context()(), l2 = i.Styles.lookupPrimary(), d3 = [];
|
|
430
|
+
for (let e4 = 0; e4 < l2.length; e4++) {
|
|
427
431
|
let t4 = "";
|
|
428
|
-
if (
|
|
429
|
-
t4 =
|
|
432
|
+
if (r3 && !r3.isEmpty()) try {
|
|
433
|
+
t4 = r3.getNumberFormat(l2[e4].numberFormat).displayText;
|
|
430
434
|
} catch (e5) {
|
|
431
435
|
console.warn(e5);
|
|
432
436
|
}
|
|
433
|
-
"" === t4 &&
|
|
434
|
-
const n3 =
|
|
435
|
-
d3.push(z(Ao, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format:
|
|
437
|
+
"" === t4 && l2[e4].formatType === i.Type.General && (t4 = "No specific format");
|
|
438
|
+
const n3 = l2[e4].formatType === p2;
|
|
439
|
+
d3.push(z(Ao, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: l2[e4] }, l2[e4].formatType));
|
|
436
440
|
}
|
|
437
|
-
const g3 = { numberFormat: "", formatType:
|
|
441
|
+
const g3 = { numberFormat: "", formatType: i.Type.Custom }, h3 = p2 === i.Type.Custom, f3 = z(Ao, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? r3.getNumberFormat().displayText : "", handleSetFormat: () => {
|
|
438
442
|
n2?.beforeExecute?.(m2, m2?.state()), t3.getCommand("formatNumberDialog")?.execute(m2?.state()), n2?.onExecute?.(m2, m2?.state());
|
|
439
|
-
}, format: g3, sx: { flex: "0", width: "100%" } },
|
|
443
|
+
}, format: g3, sx: { flex: "0", width: "100%" } }, i.Type.Custom), x2 = L(J, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [z(ve, { command: t3.getCommand("formatNumberFormatAccountingStyle"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: a2 }), z(ve, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: a2 })] }), b2 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...c2, children: [x2, z(Te, { orientation: "horizontal" }), z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(Te, { orientation: "horizontal" }), f3] });
|
|
440
444
|
return Re({ ...e3, children: b2 });
|
|
441
445
|
}, [m2?.context(), m2?.state(), n2, a2]), h2 = zt(), f2 = V(() => {
|
|
442
|
-
const e3 =
|
|
443
|
-
return `${
|
|
446
|
+
const e3 = i.Type.MediumTime;
|
|
447
|
+
return `${l.getSharedMeasurer()(e3, Math.round(h2.typography.fontSize), h2.typography.fontFamily).width}px`;
|
|
444
448
|
}, [h2]);
|
|
445
|
-
return z(
|
|
446
|
-
})), Lo = $(O((e2, t2) => {
|
|
447
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false,
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
}, [r2, n2, a2]);
|
|
451
|
-
return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", createPopupPanel: i2, icon: "ClearAll", ...l2 });
|
|
452
|
-
})), Ho = $(O((e2, t2) => {
|
|
453
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
|
|
454
|
-
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "fill", disabled: r2 }, a3 = L(H, { children: [z(ve, { ...o3, command: t3.getCommand("fillDown") }), z(ve, { ...o3, command: t3.getCommand("fillRight") }), z(ve, { ...o3, command: t3.getCommand("fillUp") }), z(ve, { ...o3, command: t3.getCommand("fillLeft") })] });
|
|
455
|
-
return Re({ ...e3, children: a3 });
|
|
456
|
-
}, [r2, n2, a2]);
|
|
457
|
-
return z(Pe, { ref: t2, commands: o2, disabled: r2, commandHook: n2, label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", createPopupPanel: i2, icon: "FillDown", ...l2 });
|
|
458
|
-
})), zo = $(O((e2, t2) => {
|
|
459
|
-
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 = pt(o2, ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"]), { singleCommand: p2, allDisabled: u2 } = V(() => {
|
|
449
|
+
return z(De, { 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
|
+
})), 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
|
+
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
|
+
l2 || m2.push("addSheet");
|
|
453
|
+
const p2 = pt(o2, m2), { singleCommand: u2, allDisabled: g2 } = V(() => {
|
|
460
454
|
let e3 = null, t3 = 0;
|
|
461
|
-
|
|
455
|
+
const o3 = p2.length;
|
|
456
|
+
for (let n3 = 0; n3 < o3; n3++) {
|
|
457
|
+
const o4 = p2[n3];
|
|
458
|
+
o4 && !o4.disabled() && (i2 && d2 === ut.Menuitem && (e3 = 0 === t3 ? o4 : null), t3++);
|
|
459
|
+
}
|
|
462
460
|
return { singleCommand: e3, allDisabled: 0 === t3 };
|
|
463
|
-
}, [
|
|
461
|
+
}, [p2]), h2 = K((e3, t3) => {
|
|
464
462
|
let o3 = null;
|
|
465
463
|
const a3 = { variant: ut.Menuitem, commandHook: n2, scope: "insertCells", disabled: r2 };
|
|
466
464
|
l2 || (o3 = L(H, { children: [z(Te, { orientation: "horizontal" }), z(ve, { ...a3, command: t3.getCommand("addSheet") })] }));
|
|
467
|
-
const i3 = L(H, { children: [z(ve, { ...a3, command:
|
|
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] });
|
|
468
466
|
return Re({ ...e3, children: i3 });
|
|
469
|
-
}, [r2,
|
|
470
|
-
return
|
|
467
|
+
}, [r2, p2, n2, a2]);
|
|
468
|
+
return u2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, ...c2 }) : z(De, { 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 });
|
|
471
469
|
})), Wo = $(O((e2, t2) => {
|
|
472
|
-
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 =
|
|
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
|
+
l2 || m2.push("deleteSheet");
|
|
472
|
+
const p2 = pt(o2, m2), { singleCommand: u2, allDisabled: g2 } = V(() => {
|
|
473
473
|
let e3 = null, t3 = 0;
|
|
474
|
-
|
|
474
|
+
const o3 = p2.length;
|
|
475
|
+
for (let n3 = 0; n3 < o3; n3++) {
|
|
476
|
+
const o4 = p2[n3];
|
|
477
|
+
o4 && !o4.disabled() && (i2 && d2 === ut.Menuitem && (e3 = 0 === t3 ? o4 : null), t3++);
|
|
478
|
+
}
|
|
475
479
|
return { singleCommand: e3, allDisabled: 0 === t3 };
|
|
476
|
-
}, [
|
|
480
|
+
}, [p2]), h2 = K((e3, t3) => {
|
|
477
481
|
const o3 = { variant: ut.Menuitem, commandHook: n2, scope: "deleteCells", disabled: r2 };
|
|
478
482
|
let a3 = null;
|
|
479
483
|
l2 || (a3 = L(H, { children: [z(Te, { orientation: "horizontal" }), z(ve, { ...o3, command: t3.getCommand("deleteSheet") })] }));
|
|
480
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] });
|
|
481
485
|
return Re({ ...e3, children: i3 });
|
|
482
486
|
}, [r2, n2, a2]);
|
|
483
|
-
return
|
|
487
|
+
return u2 ? z(ve, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, ...c2 }) : z(De, { 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 });
|
|
484
488
|
})), $o = $(O((e2, t2) => {
|
|
485
489
|
const { commands: o2, commandHook: n2, scope: a2, ...r2 } = e2, l2 = K((e3, o3) => {
|
|
486
|
-
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(
|
|
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" })] });
|
|
487
491
|
return Re({ ...e3, children: l3 });
|
|
488
492
|
}, [n2, a2]);
|
|
489
|
-
return z(
|
|
493
|
+
return z(De, { ref: t2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: l2, icon: "CellsFormat", label: "Format Cells", tooltip: "Change row and column sizes or visibility.", ...r2 });
|
|
490
494
|
}));
|
|
491
495
|
$o.displayName = "CellsFormatCommandButton";
|
|
492
496
|
const Oo = $(O((t2, o2) => {
|
|
@@ -496,14 +500,14 @@ const Oo = $(O((t2, o2) => {
|
|
|
496
500
|
const b2 = n2?.context();
|
|
497
501
|
let y2 = s2 ?? b2?.quickColor;
|
|
498
502
|
c2 && !y2 && (y2 = new e("transparent"));
|
|
499
|
-
const w2 = g2 ?? b2?.autoColor,
|
|
503
|
+
const w2 = g2 ?? b2?.autoColor, S2 = h2 ?? b2?.schemeLookup, k2 = f2 ?? b2?.recentColors, C2 = m2 ?? b2?.darkMode, v2 = V(() => ({ autoColor: w2, schemeLookup: S2, recentColors: k2, darkMode: C2, ...x2 }), [w2, S2, k2, C2]), T2 = gt((e2, t3) => {
|
|
500
504
|
e2 && t3 && b2?.addRecentColor && b2.addRecentColor(e2), b2?.onColorSelect && b2.onColorSelect(e2), r2?.(e2, t3), n2?.execute(e2, a2);
|
|
501
505
|
}, [n2, r2, a2, b2]), R2 = K((e2, t3) => {
|
|
502
506
|
const { children: o3, title: a3, ...r3 } = e2;
|
|
503
507
|
let s3 = e2.children;
|
|
504
508
|
return (n2?.disabled() || l2) && (s3 = z("div", { children: s3 })), z(We, { command: n2, placement: i2 === ut.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...r3, children: s3 });
|
|
505
509
|
}, [n2, l2]);
|
|
506
|
-
return z(vo, { ref: o2, panelProps: v2, icon: p2, quickColor: y2, selectedColor: n2?.state(), onSelectColor: T2, variant: i2 === ut.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: R2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: C2, ...u2 });
|
|
510
|
+
return z(vo, { ref: o2, panelProps: v2, icon: p2 ?? n2?.icon(b2), quickColor: y2, selectedColor: n2?.state(), onSelectColor: T2, variant: i2 === ut.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: R2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: C2, ...u2 });
|
|
507
511
|
}));
|
|
508
512
|
Oo.displayName = "ColorCommandButton";
|
|
509
513
|
const Vo = $(O((e2, t2) => {
|
|
@@ -511,19 +515,19 @@ const Vo = $(O((e2, t2) => {
|
|
|
511
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") })] });
|
|
512
516
|
return Re({ ...e3, children: l3 });
|
|
513
517
|
}, [r2, n2]);
|
|
514
|
-
return z(
|
|
518
|
+
return z(De, { 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 });
|
|
515
519
|
})), Ko = $(O((e2, t2) => {
|
|
516
520
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
|
|
517
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") })] });
|
|
518
522
|
return Re({ ...e3, children: l3 });
|
|
519
523
|
}, [r2, n2, a2]);
|
|
520
|
-
return z(
|
|
524
|
+
return z(De, { 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 });
|
|
521
525
|
})), Go = $(O((e2, t2) => {
|
|
522
526
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = K((e3, t3) => {
|
|
523
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") })] });
|
|
524
528
|
return Re({ ...e3, children: a3 });
|
|
525
529
|
}, [r2, n2, a2]);
|
|
526
|
-
return z(
|
|
530
|
+
return z(De, { 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 });
|
|
527
531
|
})), Uo = $(O((e2, t2) => {
|
|
528
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];
|
|
529
533
|
!a2 && r2 && p2.push("redo");
|
|
@@ -570,22 +574,22 @@ const Vo = $(O((e2, t2) => {
|
|
|
570
574
|
}, children: [c3, z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), z(Te, { orientation: "horizontal" }), i3] });
|
|
571
575
|
return Re({ ...e3, children: m3 });
|
|
572
576
|
}, [g2?.context(), g2?.state(), i2, f2, b2, x2]);
|
|
573
|
-
return z(
|
|
574
|
-
})), jo =
|
|
577
|
+
return z(De, { 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
|
+
})), jo = s.getFontList(), _o = /* @__PURE__ */ new Map();
|
|
575
579
|
for (let e2 = 0; e2 < jo.length; e2++) _o.set(jo[e2].fontRef.getFamily(), jo[e2]);
|
|
576
580
|
const qo = $(O((e2, t2) => {
|
|
577
|
-
const { command: o2, commandHook: n2, sx: a2, disabled:
|
|
581
|
+
const { command: o2, commandHook: n2, sx: a2, disabled: r2 = false, parentFloat: i2, icon: s2, label: d2, ...c2 } = e2;
|
|
578
582
|
bt(o2);
|
|
579
|
-
const m2 = o2?.state(), p2 = zt(), u2 = V(() => `${
|
|
583
|
+
const m2 = o2?.state(), p2 = zt(), u2 = V(() => `${l.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = K((e3) => {
|
|
580
584
|
const t3 = (e4) => {
|
|
581
585
|
o2?.execute(e4, n2);
|
|
582
586
|
}, a3 = [];
|
|
583
587
|
for (let e4 = 0; e4 < jo.length; e4++) a3.push({ key: jo[e4].fontRef.getFamily(), description: jo[e4].fontRef.getFamily() });
|
|
584
588
|
_o.get(m2) || a3.unshift({ key: m2, description: m2 });
|
|
585
|
-
const
|
|
589
|
+
const l2 = [];
|
|
586
590
|
for (let e4 = 0; e4 < a3.length; e4++) {
|
|
587
591
|
const n3 = a3[e4].key === m2;
|
|
588
|
-
|
|
592
|
+
l2.push(z(Ae, { sx: { display: "flex", paddingTop: "4px", paddingBottom: "4px" }, selected: n3, disabled: r2 || !o2 || o2.disabled(), icon: n3 ? z(Oe, {}) : void 0, onMouseUp: (o3) => {
|
|
589
593
|
0 === o3.button && t3(a3[e4].key);
|
|
590
594
|
}, onMouseDown: (e5) => {
|
|
591
595
|
0 === e5.button && e5.preventDefault();
|
|
@@ -593,68 +597,73 @@ const qo = $(O((e2, t2) => {
|
|
|
593
597
|
o3.keyCode !== ft.Enter && o3.keyCode !== ft.Space || t3(a3[e4].key);
|
|
594
598
|
}, children: z(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: z(ee, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => a3[e4]?.key }, children: a3[e4].description }) }) }, e4 + "" + a3[e4].key));
|
|
595
599
|
}
|
|
596
|
-
const i3 = z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...c2, children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children:
|
|
600
|
+
const i3 = z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...c2, children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l2 }) });
|
|
597
601
|
return Re({ ...e3, children: i3 });
|
|
598
|
-
}, [
|
|
599
|
-
return z(Be, { ref: t2, sx: { ...a2 }, outlined: true, disabled:
|
|
602
|
+
}, [r2, o2?.state()]);
|
|
603
|
+
return z(Be, { ref: t2, sx: { ...a2 }, outlined: true, disabled: r2, parentFloat: i2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => z(He, { label: o2?.label(), description: o2?.description(), disabled: t3, children: e3 }), icon: z(J, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (e3) => `${Math.round(e3.typography.fontSize)}px`, fontFamily: (e3) => e3.typography.fontFamily, color: (e3) => e3.palette.text.secondary, width: u2 }, children: z(J, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m2 }) }), ...c2 });
|
|
600
604
|
})), Xo = $(O((e2, t2) => {
|
|
601
605
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), s2 = V(() => {
|
|
602
|
-
|
|
606
|
+
const e3 = i2.length;
|
|
607
|
+
for (let t3 = 0; t3 < e3; t3++) {
|
|
608
|
+
const e4 = i2[t3];
|
|
609
|
+
if (e4?.state()) return e4;
|
|
610
|
+
}
|
|
603
611
|
return i2[0];
|
|
604
612
|
}, [i2]), d2 = K((e3, t3) => {
|
|
605
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") })] });
|
|
606
614
|
return Re({ ...e3, children: a3 });
|
|
607
615
|
}, [r2, n2, a2]);
|
|
608
|
-
return z(
|
|
616
|
+
return z(De, { 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 });
|
|
609
617
|
})), Zo = $(O((e2, t2) => {
|
|
610
618
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = V(() => {
|
|
611
|
-
|
|
619
|
+
const e3 = i2.length;
|
|
620
|
+
for (let t3 = 0; t3 < e3; t3++) if (i2[t3]?.state()) return i2[t3];
|
|
612
621
|
return i2[0];
|
|
613
622
|
}, [i2]), d2 = K((e3, t3) => {
|
|
614
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") })] });
|
|
615
624
|
return Re({ ...e3, children: a3 });
|
|
616
625
|
}, [r2, n2, a2]);
|
|
617
|
-
return z(
|
|
626
|
+
return z(De, { ref: t2, quickCommand: s2?.key(), commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: d2, icon: s2?.icon() ?? "TextUnderline", ...l2 });
|
|
618
627
|
})), Yo = $(O((e2, t2) => {
|
|
619
628
|
const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = gt((e3, t3) => {
|
|
620
629
|
const o3 = { variant: ut.Menuitem, commandHook: a2, scope: "paste", disabled: i2 }, n3 = [];
|
|
621
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 });
|
|
622
631
|
}, [i2, a2, r2, l2]);
|
|
623
|
-
return z(
|
|
632
|
+
return z(De, { ref: t2, commands: n2, commandHook: a2, scope: r2, createPopupPanel: d2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", ...s2 });
|
|
624
633
|
})), Qo = $(O((e2, t2) => {
|
|
625
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) => {
|
|
626
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") })] });
|
|
627
636
|
return Re({ ...e3, children: l3 });
|
|
628
637
|
}, [r2, n2, a2]);
|
|
629
|
-
return z(
|
|
638
|
+
return z(De, { 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 });
|
|
630
639
|
})), Jo = $(O((e2, t2) => {
|
|
631
640
|
const { commands: o2, commandHook: n2, scope: a2 = "view", disabled: r2 = false, ...l2 } = e2, i2 = K((e3) => {
|
|
632
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") })] });
|
|
633
642
|
return Re({ ...e3, children: l3 });
|
|
634
643
|
}, [r2, o2, n2, a2]);
|
|
635
|
-
return z(
|
|
644
|
+
return z(De, { 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 });
|
|
636
645
|
})), en = $(O((e2, t2) => {
|
|
637
|
-
const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled:
|
|
638
|
-
return z(J, { ref: t2, sx: { width: "100px", height: "100%", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter:
|
|
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
|
+
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 }) }) }) });
|
|
639
648
|
})), tn = $((e2) => {
|
|
640
|
-
const { styles: t2, namedStyle: o2, selectedNamed: n2, hasContextMenu: a2 = true, bodyStyle: r2, onSelectNamed: l2, createTemporaryCell: i2, parentFloat:
|
|
641
|
-
const t3 = { variant: ut.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = L(H, { children: [z(ve, { ...t3, style: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2 }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: c2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), z(ve, { ...t3, command: c2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() ===
|
|
649
|
+
const { styles: t2, namedStyle: o2, selectedNamed: n2, hasContextMenu: a2 = true, bodyStyle: r2, onSelectNamed: l2, createTemporaryCell: i2, parentFloat: s2, commands: c2, disabled: m2, commandHook: p2, ...u2 } = e2, g2 = K((e3) => {
|
|
650
|
+
const t3 = { variant: ut.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = L(H, { children: [z(ve, { ...t3, style: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2 }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: c2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), z(ve, { ...t3, command: c2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() === d.BuiltInName.Normal })] });
|
|
642
651
|
return Re({ ...e3, children: z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
|
|
643
652
|
}, []), h2 = o2?.getName() === n2?.getName();
|
|
644
653
|
let f2 = z(ze, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${h2 ? e3.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o2.getName(), placement: "bottom-start" }, disabled: m2, icon: null, onClick: () => {
|
|
645
654
|
l2?.(o2);
|
|
646
655
|
}, ...u2, children: z(en, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
|
|
647
|
-
return a2 && (f2 = z(Ge, { label: o2.getName(), parentFloat:
|
|
656
|
+
return a2 && (f2 = z(Ge, { label: o2.getName(), parentFloat: s2, createPopupPanel: g2, children: f2 })), f2;
|
|
648
657
|
}), on = $(O((e2, t2) => {
|
|
649
|
-
const { commands: o2, command: n2, commandHook: a2, selectedNamed:
|
|
658
|
+
const { commands: o2, command: n2, commandHook: a2, selectedNamed: r2, onSelectNamed: i2, disabled: s2 = false, bodyStyle: c2, usePreviewIcon: m2 = true, ...p2 } = e2;
|
|
650
659
|
bt(n2);
|
|
651
|
-
const u2 = n2?.context(), g2 = u2?.styles, h2 =
|
|
660
|
+
const u2 = n2?.context(), g2 = u2?.styles, h2 = r2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), x2 = gt((e3) => {
|
|
652
661
|
i2?.(e3), n2?.execute(e3, a2);
|
|
653
662
|
}, [n2, i2, a2]), b2 = K((e3, t3) => {
|
|
654
|
-
const n3 = { onSelectNamed: x2, styles: g2(), parentFloat: e3.floatReference },
|
|
655
|
-
for (let e4 = 0; e4 <
|
|
663
|
+
const n3 = { onSelectNamed: x2, styles: g2(), parentFloat: e3.floatReference }, r3 = g2().getCustomNamed(), l2 = /* @__PURE__ */ new Map(), i3 = [];
|
|
664
|
+
for (let e4 = 0; e4 < r3.length; e4++) l2.set(r3[e4].getName(), r3[e4]), null === g2().getNamed(r3[e4].getName()).getBuiltInID() && i3.push(r3[e4].getName());
|
|
656
665
|
const c3 = (e4) => {
|
|
657
|
-
let t4 =
|
|
666
|
+
let t4 = l2.get(e4);
|
|
658
667
|
return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : z(tn, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: a2, ...n3 }, e4);
|
|
659
668
|
}, m3 = (e4, t4, o3 = true) => {
|
|
660
669
|
const n4 = [];
|
|
@@ -671,18 +680,18 @@ const qo = $(O((e2, t2) => {
|
|
|
671
680
|
}
|
|
672
681
|
return 0 === o3.length ? null : z(J, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: o3 }, e4 + "-presets");
|
|
673
682
|
}, f3 = [];
|
|
674
|
-
f3.push(m3("Custom", i3, false)), f3.push(m3("Good, Bad and Neutral", [
|
|
683
|
+
f3.push(m3("Custom", i3, false)), f3.push(m3("Good, Bad and Neutral", [d.BuiltInName.Normal, d.BuiltInName.Bad, d.BuiltInName.Good, d.BuiltInName.Neutral], i3.length > 0)), f3.push(m3("Data and Model", [d.BuiltInName.Calculation, d.BuiltInName.CheckCell, d.BuiltInName.ExplanatoryText, d.BuiltInName.FollowedHyperlink, d.BuiltInName.Hyperlink, d.BuiltInName.Input, d.BuiltInName.LinkedCell, d.BuiltInName.Note, d.BuiltInName.Output, d.BuiltInName.WarningText])), f3.push(m3("Titles and Headings", [d.BuiltInName.Heading1, d.BuiltInName.Heading2, d.BuiltInName.Heading3, d.BuiltInName.Heading4, d.BuiltInName.Title, d.BuiltInName.Total]));
|
|
675
684
|
let b3 = [];
|
|
676
685
|
var y3, w3;
|
|
677
|
-
return b3.push(p3("Accent 1", [
|
|
678
|
-
}, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), z(Te, { orientation: "horizontal" }), z(ve, { variant: ut.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: a2, disabled:
|
|
686
|
+
return b3.push(p3("Accent 1", [d.BuiltInName.Accent1_20, d.BuiltInName.Accent1_40, d.BuiltInName.Accent1_60, d.BuiltInName.Accent1])), b3.push(p3("Accent 2", [d.BuiltInName.Accent2_20, d.BuiltInName.Accent2_40, d.BuiltInName.Accent2_60, d.BuiltInName.Accent2])), b3.push(p3("Accent 3", [d.BuiltInName.Accent3_20, d.BuiltInName.Accent3_40, d.BuiltInName.Accent3_60, d.BuiltInName.Accent3])), b3.push(p3("Accent 4", [d.BuiltInName.Accent4_20, d.BuiltInName.Accent4_40, d.BuiltInName.Accent4_60, d.BuiltInName.Accent4])), b3.push(p3("Accent 5", [d.BuiltInName.Accent5_20, d.BuiltInName.Accent5_40, d.BuiltInName.Accent5_60, d.BuiltInName.Accent5])), b3.push(p3("Accent 6", [d.BuiltInName.Accent6_20, d.BuiltInName.Accent6_40, d.BuiltInName.Accent6_60, d.BuiltInName.Accent6])), f3.push((y3 = "Themed Cell Styles", w3 = b3, L(J, { children: [z(Te, { orientation: "horizontal" }), z(Ke, { children: y3 }, y3 + "-header"), z(J, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: w3 }, y3 + "-presets")] }, y3))), f3.push(m3("Number Format", [d.BuiltInName.Comma, d.BuiltInName.Comma0, d.BuiltInName.Currency, d.BuiltInName.Currency0, d.BuiltInName.Percent])), L(J, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [z(J, { onContextMenu: () => {
|
|
687
|
+
}, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), z(Te, { orientation: "horizontal" }), z(ve, { variant: ut.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: a2, disabled: s2 })] });
|
|
679
688
|
}, [h2, g2?.().getTheme(), f2]), y2 = gt((e3) => {
|
|
680
|
-
const t3 = 18 /
|
|
689
|
+
const t3 = 18 / l.getDeviceScale(), o3 = u2?.createTemporaryCell(e3);
|
|
681
690
|
return o3.getStyle().getFont().getSize() <= t3 ? o3 : o3.createTemporaryCell({ style: { font: { size: t3 } } });
|
|
682
|
-
}, [u2?.createTemporaryCell]), w2 =
|
|
683
|
-
return z(
|
|
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(De, { 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 });
|
|
684
693
|
})), nn = "_sheetxl-reset_11z3j_1", an = 10, rn = $(O((e2, t2) => {
|
|
685
|
-
const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight:
|
|
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);
|
|
686
695
|
j(() => {
|
|
687
696
|
if (p2 && n2) return n2.addListeners({ onAnyChange: () => {
|
|
688
697
|
f2();
|
|
@@ -691,8 +700,8 @@ const qo = $(O((e2, t2) => {
|
|
|
691
700
|
const x2 = V(() => {
|
|
692
701
|
let e3 = n2?.toJSON() ?? {};
|
|
693
702
|
const t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
|
|
694
|
-
return e3 && (e3.styleOptions = { ...e3.styleOptions, name: a2.getName() }), e3.ref = t3, new
|
|
695
|
-
}, [h2, n2, a2, o2]),
|
|
703
|
+
return e3 && (e3.styleOptions = { ...e3.styleOptions, name: a2.getName() }), e3.ref = t3, new m({ initialAnchor: t3, json: e3, styles: o2 });
|
|
704
|
+
}, [h2, n2, a2, o2]), b2 = V(() => {
|
|
696
705
|
const e3 = [];
|
|
697
706
|
for (let t3 = 0; t3 < 5; t3++) for (let o3 = 0; o3 < 5; o3++) {
|
|
698
707
|
const n3 = x2.getStyleAt({ colIndex: o3, rowIndex: t3 });
|
|
@@ -702,26 +711,26 @@ const qo = $(O((e2, t2) => {
|
|
|
702
711
|
}, [x2]), w2 = V(() => {
|
|
703
712
|
const e3 = (e4, t4, o3) => {
|
|
704
713
|
let n3 = o3.getFill().toCSS(r2?.darkMode ?? false);
|
|
705
|
-
const a3 = g2 - (t4 < 4 ? 1 : 0), l3 =
|
|
706
|
-
return n3 = { ...n3, position: "absolute", boxSizing: "border-box", left: t4 * (g2 - 1), top: e4 * (
|
|
714
|
+
const a3 = g2 - (t4 < 4 ? 1 : 0), l3 = c2 - (e4 < 4 ? 1 : 0), i3 = o3.getFont().getFill().toCSS(r2?.darkMode ?? false);
|
|
715
|
+
return n3 = { ...n3, position: "absolute", boxSizing: "border-box", left: t4 * (g2 - 1), top: e4 * (c2 - 1), width: a3, height: l3 }, z("td", { className: `table-style-fill ${e4}-${t4}`, style: n3, children: z("div", { className: `table-style-text ${e4}-${t4}`, style: { position: "absolute", boxSizing: "border-box", width: "6px", left: (a3 - 6) / 2, top: (l3 - 1) / 2, borderTop: `1px solid ${i3}` } }) }, `${e4}-${t4}`);
|
|
707
716
|
}, t3 = [];
|
|
708
717
|
for (let o3 = 0; o3 < 5; o3++) {
|
|
709
718
|
const n3 = [];
|
|
710
719
|
for (let t4 = 0; t4 < 5; t4++) {
|
|
711
|
-
const a3 =
|
|
720
|
+
const a3 = b2[5 * o3 + t4];
|
|
712
721
|
n3.push(e3(o3, t4, a3));
|
|
713
722
|
}
|
|
714
723
|
t3.push(z("tr", { children: n3 }, o3));
|
|
715
724
|
}
|
|
716
725
|
return t3;
|
|
717
|
-
}, [x2, a2, r2]),
|
|
718
|
-
return z(J, { ref: t2, className: "table-format-preview", sx: { background: r2?.fill, filter: i2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...l2 }, ...u2, children: z(
|
|
726
|
+
}, [x2, a2, r2]), S2 = K((e3, t3) => b2[t3].getBorder() ?? null, [b2]);
|
|
727
|
+
return z(J, { ref: t2, className: "table-format-preview", sx: { background: r2?.fill, filter: i2 ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...l2 }, ...u2, children: z(y, { getBorderAt: S2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (c2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: z("table", { className: mt(s2, "sheetxl-table-preview", nn), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (c2 - 1) + 1 }, children: z("tbody", { children: w2 }) }) }) });
|
|
719
728
|
})), ln = (e2, t2, o2, n2, a2) => {
|
|
720
729
|
e2.beginPath(), e2.moveTo(t2 + 0.5, o2 + 0.5), e2.lineTo(n2 + 0.5, a2 + 0.5), e2.stroke();
|
|
721
730
|
}, sn = $(O((e2, t2) => {
|
|
722
|
-
const { table: o2, tableStyle: n2, styles: a2, bodyStyle: r2, disabled: l2, style: i2, className: s2, canvas: d2, ...
|
|
731
|
+
const { table: o2, tableStyle: n2, styles: a2, bodyStyle: r2, disabled: l2, style: i2, className: s2, canvas: d2, ...c2 } = e2, u2 = V(() => {
|
|
723
732
|
const e3 = o2.toJSON(), t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
|
|
724
|
-
return e3.styleOptions = { ...e3.styleOptions, name: n2.getName() }, e3.ref = t3, new
|
|
733
|
+
return e3.styleOptions = { ...e3.styleOptions, name: n2.getName() }, e3.ref = t3, new m({ initialAnchor: t3, json: e3, styles: a2 });
|
|
725
734
|
}, [o2, n2, a2]), g2 = V(() => {
|
|
726
735
|
const e3 = [];
|
|
727
736
|
for (let t3 = 0; t3 < 5; t3++) for (let o3 = 0; o3 < 5; o3++) {
|
|
@@ -739,7 +748,7 @@ const qo = $(O((e2, t2) => {
|
|
|
739
748
|
for (let e4 = 0; e4 < 5; e4++) for (let a3 = 0; a3 < 5; a3++) {
|
|
740
749
|
const l3 = g2[5 * e4 + a3].getFill();
|
|
741
750
|
let i3 = r2?.fill;
|
|
742
|
-
l3.getType() ===
|
|
751
|
+
l3.getType() === p.Type.Solid ? i3 = l3.getColor().toCSS(n3, false) : l3.getType() === p.Type.Gradient ? i3 = l3.getStops[0]?.color.toCSS(n3, false) : l3.getType() === p.Type.Pattern && (i3 = l3.getForeground().toCSS(n3, false)), t3.fillStyle = i3;
|
|
743
752
|
const s3 = a3 * o3, d3 = 9 * e4;
|
|
744
753
|
t3.fillRect(s3, d3, 13, 10);
|
|
745
754
|
}
|
|
@@ -753,16 +762,16 @@ const qo = $(O((e2, t2) => {
|
|
|
753
762
|
r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), ln(t3, l3, i3, l3 + o3, 9 * e4));
|
|
754
763
|
const d4 = s3.getRight();
|
|
755
764
|
d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), ln(t3, l3 + o3, i3, l3 + o3, i3 + 9));
|
|
756
|
-
const
|
|
757
|
-
|
|
765
|
+
const c4 = s3.getBottom();
|
|
766
|
+
c4.isNone() || (t3.strokeStyle = c4.getColor().toCSS(n3, false), ln(t3, l3, i3 + 9, l3 + o3, i3 + 9));
|
|
758
767
|
}
|
|
759
768
|
t3.strokeStyle = r3.getFont().getFill().toCSS(n3, false);
|
|
760
|
-
const d3 = 4,
|
|
761
|
-
ln(t3, a3 * o3 +
|
|
769
|
+
const d3 = 4, c3 = 2.5;
|
|
770
|
+
ln(t3, a3 * o3 + c3, 9 * e4 + d3, a3 * o3 + c3 + 7, 9 * e4 + d3);
|
|
762
771
|
}
|
|
763
772
|
return `url(${e3.toDataURL()})`;
|
|
764
773
|
}, [d2, u2, n2, r2]);
|
|
765
|
-
return z("div", { ref: t2, className: mt("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...
|
|
774
|
+
return z("div", { ref: t2, className: mt("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...c2 });
|
|
766
775
|
})), dn = "_table-style-options-container_1kfn2_1", cn = "_table-style-options_1kfn2_1", mn = $(O((e2, t2) => {
|
|
767
776
|
const { styleOptions: o2, onStyleOptionsChange: n2, showHeaderRow: a2, onShowHeaderRowChange: r2, showTotalRow: l2, onShowTotalRowChange: i2, showFilterButton: s2, onShowFilterButtonChange: d2, sx: c2, className: m2, disabled: p2, ...u2 } = e2;
|
|
768
777
|
return z("div", { className: dn, children: L(J, { sx: { pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (e3) => `${e3.spacing(2)}`, marginRight: (e3) => `${e3.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (e3) => `${e3.spacing(0.5)}` }, ...c2 }, ...u2, ref: t2, className: mt(m2, cn), children: [r2 && z(ie, { control: z(se, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: p2 || null == a2 }), label: "Header Row", labelPlacement: "end" }), i2 && z(ie, { control: z(se, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: p2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), z(ie, { control: z(se, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: p2 || !o2, onChange: () => {
|
|
@@ -775,26 +784,26 @@ const qo = $(O((e2, t2) => {
|
|
|
775
784
|
n2?.({ ...o2, showColumnStripes: !o2?.showColumnStripes });
|
|
776
785
|
} }), label: "Banded Columns", labelPlacement: "end" }), d2 && z(ie, { control: z(se, { checked: s2 ?? false, indeterminate: null == s2, disabled: p2 || !o2 || null == s2, onChange: () => d2(!s2) }), label: "Filter Button", labelPlacement: "end" })] }) });
|
|
777
786
|
})), pn = "_range-row_akhf4_1", un = "_action-row_akhf4_15", gn = $(O((e2, t2) => {
|
|
778
|
-
const { disabled: o2, style: n2, className: a2, sx: r2, defaultInput: l2, value: i2, formName: s2, formOptions: d2, onChangeInput: c2, onValidate: m2, onKeyDown: p2, ...u2 } = e2, g2 = Kt(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, x2] = U(""), [b2, y2] = U(""), [w2,
|
|
787
|
+
const { disabled: o2, style: n2, className: a2, sx: r2, defaultInput: l2, value: i2, formName: s2, formOptions: d2, onChangeInput: c2, onValidate: m2, onKeyDown: p2, ...u2 } = e2, g2 = Kt(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, x2] = U(""), [b2, y2] = U(""), [w2, S2] = U(i2);
|
|
779
788
|
j(() => {
|
|
780
|
-
|
|
789
|
+
S2(i2), y2("");
|
|
781
790
|
}, [i2]);
|
|
782
|
-
const
|
|
791
|
+
const k2 = gt((e3) => {
|
|
783
792
|
let t3 = "";
|
|
784
793
|
try {
|
|
785
|
-
|
|
794
|
+
S2(e3), m2?.(e3), c2?.(e3);
|
|
786
795
|
} catch (e4) {
|
|
787
796
|
t3 = e4.message ?? "Invalid Name";
|
|
788
797
|
}
|
|
789
798
|
s2 && g2 && (t3 ? g2.setError(s2, { message: t3 }) : g2.clearErrors(s2)), y2(t3);
|
|
790
799
|
}, [i2, m2, c2]), C2 = gt(async (e3) => {
|
|
791
|
-
e3.keyCode === ft.Escape && f2 !== i2 && (
|
|
800
|
+
e3.keyCode === ft.Escape && f2 !== i2 && (k2(f2), g2?.setValue(s2, f2), g2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
|
|
792
801
|
}, [p2, f2, i2, g2]), v2 = gt((e3) => {
|
|
793
802
|
x2(e3.target.value ?? "");
|
|
794
803
|
}, []), T2 = gt((e3) => {
|
|
795
804
|
x2(""), h2?.onBlur(e3);
|
|
796
805
|
}, []), R2 = K((e3) => {
|
|
797
|
-
|
|
806
|
+
k2(e3.target.value), h2?.onChange(e3);
|
|
798
807
|
}, [h2]);
|
|
799
808
|
return z(de, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...r2 }, size: "small", ref: t2, className: mt("named-input", a2), ...u2, children: z(ce, { label: "Name", placeholder: l2, onFocus: v2, onBlur: T2, inputRef: h2?.ref, disabled: o2, error: !!b2, helperText: b2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, slotProps: { inputLabel: { shrink: true }, htmlInput: { className: "autoFocus", name: s2, spellCheck: false, autoComplete: "off", readOnly: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75), backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` } } }, value: w2 ?? "", onChange: R2, onKeyDownCapture: C2, onContextMenu: (e3) => {
|
|
800
809
|
e3.stopPropagation();
|
|
@@ -806,7 +815,7 @@ const hn = (e2) => null === e2 ? "" : e2.toString(), fn = $(O((e2, t2) => {
|
|
|
806
815
|
j(() => {
|
|
807
816
|
w2(hn(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), b2(false);
|
|
808
817
|
}, [d2]);
|
|
809
|
-
const
|
|
818
|
+
const S2 = gt((e3) => {
|
|
810
819
|
let t3 = "";
|
|
811
820
|
try {
|
|
812
821
|
w2(e3);
|
|
@@ -816,7 +825,7 @@ const hn = (e2) => null === e2 ? "" : e2.toString(), fn = $(O((e2, t2) => {
|
|
|
816
825
|
t3 = "Invalid Range";
|
|
817
826
|
}
|
|
818
827
|
o2 && u2 && (t3 ? u2.setError(o2, { message: t3 }) : u2.clearErrors(o2)), f2(t3), b2(true);
|
|
819
|
-
}, [y2, c2, o2, u2]),
|
|
828
|
+
}, [y2, c2, o2, u2]), k2 = gt(async (e3) => {
|
|
820
829
|
if (x2 && e3.keyCode === ft.Escape) {
|
|
821
830
|
const t3 = hn(d2);
|
|
822
831
|
w2(t3), f2(""), b2(false), e3.stopPropagation();
|
|
@@ -825,11 +834,11 @@ const hn = (e2) => null === e2 ? "" : e2.toString(), fn = $(O((e2, t2) => {
|
|
|
825
834
|
}, [d2, c2, s2, x2]), C2 = gt((e3) => {
|
|
826
835
|
g2?.onBlur(e3);
|
|
827
836
|
}, [g2]), v2 = K((e3) => {
|
|
828
|
-
|
|
829
|
-
}, [g2]), [T2, R2] = U(false),
|
|
837
|
+
S2(e3.target.value), g2?.onChange(e3);
|
|
838
|
+
}, [g2]), [T2, R2] = U(false), D2 = V(() => z(me, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: z(Ue, { disabled: true, selected: T2, onSelectToggle: (e3) => {
|
|
830
839
|
R2(e3);
|
|
831
840
|
}, label: "Select Range", icon: z(xt, { iconKey: "SelectRangeMode" }) }) }), [T2]);
|
|
832
|
-
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: D2 }, 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) => {
|
|
833
842
|
e3.stopPropagation();
|
|
834
843
|
} }) });
|
|
835
844
|
}));
|
|
@@ -873,8 +882,8 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
|
|
|
873
882
|
} });
|
|
874
883
|
}, [o2, n2, a2, c2, d2]), tooltip: l2 || i2 || "Theme", label: i2, icon: p2, ...m2 };
|
|
875
884
|
return s2 === Ne.Toolbar ? z(Be, { ref: t2, ...u2 }) : z(Ee, { ref: t2, ...u2 });
|
|
876
|
-
})),
|
|
877
|
-
const { sheet: o2, className: a2, debounceDelay:
|
|
885
|
+
})), Sn = $(O((e2, t2) => {
|
|
886
|
+
const { sheet: o2, className: a2, debounceDelay: r2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = U(() => o2.getView().getZoomScale()), [m2, p2] = U(null), u2 = q(0);
|
|
878
887
|
w(o2, { onViewChange: () => {
|
|
879
888
|
p2(true), 0 === u2.current && c2(o2.getView().getZoomScale());
|
|
880
889
|
} }), j(() => {
|
|
@@ -882,22 +891,22 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
|
|
|
882
891
|
}, [o2]), j(() => {
|
|
883
892
|
0 !== u2.current && n.debounce(() => {
|
|
884
893
|
d2 === u2.current && (u2.current = 0, o2.getView().update({ zoomScale: d2 }));
|
|
885
|
-
},
|
|
886
|
-
}, [d2,
|
|
894
|
+
}, r2)();
|
|
895
|
+
}, [d2, r2]);
|
|
887
896
|
const g2 = gt((e3) => {
|
|
888
897
|
let t3 = e3;
|
|
889
898
|
e3 < 100 ? t3 = Math.round(e3 / (10 / 9) + 10) : e3 > 100 && (t3 = Math.round(3 * e3 - 200)), u2.current = t3, p2(true), c2(t3);
|
|
890
899
|
}, [o2]), h2 = (e3) => {
|
|
891
900
|
let t3 = e3;
|
|
892
901
|
return e3 < 100 ? t3 = 10 / 9 * (e3 - 10) : e3 > 100 && (t3 = (e3 + 200) / 3), t3;
|
|
893
|
-
}, f2 = h2(d2), [x2, b2] = U(null), y2 = q(null),
|
|
902
|
+
}, f2 = h2(d2), [x2, b2] = U(null), y2 = q(null), S2 = K(() => {
|
|
894
903
|
const e3 = x2;
|
|
895
904
|
e3 && requestAnimationFrame(() => {
|
|
896
905
|
y2.current?.contains(document.activeElement) && e3.focus();
|
|
897
906
|
});
|
|
898
|
-
}, []),
|
|
907
|
+
}, []), k2 = yt(() => {
|
|
899
908
|
g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10)));
|
|
900
|
-
}), C2 = yt(() => g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), v2 = zt(), T2 = V(() => `${
|
|
909
|
+
}), C2 = yt(() => g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), v2 = zt(), T2 = V(() => `${l.getSharedMeasurer()("100%", Math.round(v2.typography.fontSize), v2.typography.fontFamily).width}px`, [v2]);
|
|
901
910
|
return L(J, { ref: t2, className: mt(a2), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (e3) => e3.palette.text.secondary, ...i2 }, onFocus: (e3) => {
|
|
902
911
|
e3.relatedTarget && !x2 && b2(e3.relatedTarget);
|
|
903
912
|
}, onBlur: (e3) => {
|
|
@@ -905,13 +914,13 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
|
|
|
905
914
|
}, onMouseDown: (e3) => {
|
|
906
915
|
0 === e3.button && e3.preventDefault();
|
|
907
916
|
}, onMouseUp: (e3) => {
|
|
908
|
-
0 === e3.button &&
|
|
917
|
+
0 === e3.button && S2();
|
|
909
918
|
}, ...s2, children: [z(Me, { disableInteractive: true, title: "Zoom Out", children: z(te, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
|
|
910
|
-
0 !== e3.button ? e3.preventDefault() :
|
|
919
|
+
0 !== e3.button ? e3.preventDefault() : k2(e3);
|
|
911
920
|
}, children: z(xt, { iconKey: "Remove" }) }) }), z(pe, { ref: y2, sx: { flex: "1 1 100%", padding: "6px 0px !important", marginRight: "2px", marginLeft: "2px", "& .MuiSlider-thumb": { height: 14, width: 6, borderRadius: 0.75, "&.Mui-focusVisible": { boxShadow: (e3) => `0px 0px 0px 3px ${je(e3.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (e3) => `0px 0px 0px 2px ${je(e3.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: m2 ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: false, min: 0, step: 1, value: f2, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => p2(false), onWheel: (e3) => {
|
|
912
921
|
g2(h2(n.findNextStep(o2.getView().getZoomScale(), e3.deltaY < 0, 10)));
|
|
913
922
|
}, onKeyDown: (e3) => {
|
|
914
|
-
e3.which === ft.Down || e3.which === ft.Right ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === ft.Up || e3.which === ft.Left ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== ft.Enter && e3.which !== ft.Escape ||
|
|
923
|
+
e3.which === ft.Down || e3.which === ft.Right ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === ft.Up || e3.which === ft.Left ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== ft.Enter && e3.which !== ft.Escape || S2();
|
|
915
924
|
}, onChange: (e3, t3) => {
|
|
916
925
|
Math.abs(t3 - 100) < 3 ? g2(100) : g2(t3);
|
|
917
926
|
}, valueLabelFormat: (e3, t3) => `Zoom: ${Math.round(d2)}%` }), z(Me, { disableInteractive: true, title: "Zoom In", children: z(te, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
|
|
@@ -920,8 +929,8 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
|
|
|
920
929
|
g2(100);
|
|
921
930
|
}, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: T2 }, children: z("div", { children: Math.round(d2) + "%" }) })] })] });
|
|
922
931
|
}));
|
|
923
|
-
|
|
924
|
-
const
|
|
932
|
+
Sn.displayName = "SheetZoomScale";
|
|
933
|
+
const kn = $(O((e2, t2) => {
|
|
925
934
|
const { sx: o2, sheet: n2, gridStyle: a2, children: r2, childrenEnd: l2, ...i2 } = e2;
|
|
926
935
|
Y(t2, () => ({}));
|
|
927
936
|
const s2 = q(null);
|
|
@@ -935,20 +944,20 @@ const Sn = $(O((e2, t2) => {
|
|
|
935
944
|
const e3 = d2.getMode();
|
|
936
945
|
return e3?.description ? e3.description : "Ready";
|
|
937
946
|
}, [d2]), [m2, p2] = U(false);
|
|
938
|
-
return L(J, { ref: s2, sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: m2 ? "visible" : "hidden", boxShadow: `0px -1px 0px ${a2.header.edgeStrokeFill}`, ...o2 }, onMouseOver: () => p2(true), onMouseLeave: () => p2(false), ...i2, children: [r2, z("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? z(J, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, z(Te, { style: { marginTop: "6px", marginBottom: "6px" } }), z(
|
|
947
|
+
return L(J, { ref: s2, sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: m2 ? "visible" : "hidden", boxShadow: `0px -1px 0px ${a2.header.edgeStrokeFill}`, ...o2 }, onMouseOver: () => p2(true), onMouseLeave: () => p2(false), ...i2, children: [r2, z("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: z(ee, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? z(J, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, z(Te, { style: { marginTop: "6px", marginBottom: "6px" } }), z(Sn, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
|
|
939
948
|
}));
|
|
940
|
-
|
|
949
|
+
kn.displayName = "StatusBar";
|
|
941
950
|
const Cn = $(O((e2, t2) => {
|
|
942
|
-
const { disabled: o2, names: a2, workbook:
|
|
943
|
-
if (
|
|
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, D2] = U(T2), P2 = gt(() => {
|
|
952
|
+
if (k2?.closeAll(), !R2) {
|
|
944
953
|
const e4 = T2();
|
|
945
|
-
return
|
|
954
|
+
return D2(T2()), e4;
|
|
946
955
|
}
|
|
947
956
|
if (T2() === R2) return R2;
|
|
948
957
|
const e3 = R2.trim().toLowerCase();
|
|
949
958
|
if ("r" === e3 || "c" === e3) return R2;
|
|
950
959
|
try {
|
|
951
|
-
const e4 =
|
|
960
|
+
const e4 = r2.getRanges(R2);
|
|
952
961
|
if (e4) return e4.toString();
|
|
953
962
|
} catch (e4) {
|
|
954
963
|
}
|
|
@@ -956,23 +965,23 @@ const Cn = $(O((e2, t2) => {
|
|
|
956
965
|
if (t3 && t3.getRanges()) return R2;
|
|
957
966
|
let o3 = null;
|
|
958
967
|
try {
|
|
959
|
-
const e4 =
|
|
960
|
-
o3 =
|
|
968
|
+
const e4 = r2.getRanges(R2), t4 = e4.getCoords().map((e5) => ({ $colEnd: true, $rowEnd: true, $colStart: true, $rowStart: true, ...e5 }));
|
|
969
|
+
o3 = r2.getRanges(t4);
|
|
961
970
|
} catch (e4) {
|
|
962
971
|
}
|
|
963
972
|
if (!o3) {
|
|
964
|
-
const e4 =
|
|
965
|
-
o3 =
|
|
973
|
+
const e4 = r2.getSelectedRanges().getCoords().map((e5) => ({ $colEnd: true, $rowEnd: true, $colStart: true, $rowStart: true, ...e5 }));
|
|
974
|
+
o3 = r2.getRanges(e4);
|
|
966
975
|
}
|
|
967
976
|
try {
|
|
968
977
|
let e4 = a2.getByName(R2);
|
|
969
978
|
C2 || e4 || (e4 = a2.addReference(R2, o3)), e4 && f2({ text: e4.getName() });
|
|
970
979
|
} catch (e4) {
|
|
971
|
-
|
|
980
|
+
D2(T2()), g2.showMessage?.(e4.message, { type: kt.Error });
|
|
972
981
|
}
|
|
973
982
|
return null;
|
|
974
|
-
}, [R2, a2,
|
|
975
|
-
if (
|
|
983
|
+
}, [R2, a2, k2, C2, g2]), M2 = gt(() => {
|
|
984
|
+
if (r2.isClosed()) return;
|
|
976
985
|
const e3 = [];
|
|
977
986
|
for (let t4 = 0; t4 < x2.length; t4++) {
|
|
978
987
|
const o4 = x2[t4];
|
|
@@ -984,17 +993,17 @@ const Cn = $(O((e2, t2) => {
|
|
|
984
993
|
} catch (e4) {
|
|
985
994
|
}
|
|
986
995
|
let o3 = null;
|
|
987
|
-
o3 = t3?.length > 0 ? t3[0].getName() :
|
|
988
|
-
}, [
|
|
996
|
+
o3 = t3?.length > 0 ? t3[0].getName() : r2.getSelectedSheet().getSelectedRange().toString(), f2({ text: o3 });
|
|
997
|
+
}, [r2, x2]), [F2, N2] = U(() => a2?.getItems() ?? null);
|
|
989
998
|
w(a2, { onCollectionChange(e3) {
|
|
990
999
|
N2(a2.getItems()), M2();
|
|
991
1000
|
}, onClose(e3) {
|
|
992
1001
|
N2([]);
|
|
993
1002
|
} }), j(() => {
|
|
994
|
-
|
|
1003
|
+
D2(T2());
|
|
995
1004
|
}, [h2, x2]);
|
|
996
|
-
const [B2, E2] = U(
|
|
997
|
-
w(
|
|
1005
|
+
const [B2, E2] = U(r2?.getSelectedSheet());
|
|
1006
|
+
w(r2, { onProtectionChange: (e3) => {
|
|
998
1007
|
v2(s2 || !e3.getProtection().isStructureAllowed());
|
|
999
1008
|
}, onSheetsChange: (e3) => {
|
|
1000
1009
|
E2(e3?.getSelectedSheet());
|
|
@@ -1004,68 +1013,68 @@ const Cn = $(O((e2, t2) => {
|
|
|
1004
1013
|
const [A2, I2] = U(null), W2 = gt(n.debounce(M2, A2 ? 320 : 0), []);
|
|
1005
1014
|
w(B2.getSelection(), { onChange: () => {
|
|
1006
1015
|
b2((e3) => {
|
|
1007
|
-
const t3 =
|
|
1008
|
-
return
|
|
1016
|
+
const t3 = r2.getSelectedRanges().getCoords();
|
|
1017
|
+
return u.isEqualRangesArrays(t3, e3) ? e3 : t3;
|
|
1009
1018
|
});
|
|
1010
1019
|
}, onAdjustingChange: (e3) => {
|
|
1011
1020
|
I2(e3.getAdjusting());
|
|
1012
1021
|
} }), j(() => {
|
|
1013
1022
|
if (A2) {
|
|
1014
|
-
const e3 =
|
|
1023
|
+
const e3 = r2.getSelectedRange(), t3 = e3.getRowCount(), o3 = e3.getColumnCount();
|
|
1015
1024
|
let n2 = `${t3}R x ${o3}C`;
|
|
1016
1025
|
if (n2.length > 17 && (n2 = `${t3}x${o3}`), t3 > 1 || o3 > 1) return void f2({ text: n2, fontStyle: "italic", justifyContent: "center" });
|
|
1017
1026
|
}
|
|
1018
|
-
f2({ text:
|
|
1019
|
-
}, [x2,
|
|
1027
|
+
f2({ text: r2.getSelectedSheet().getSelectedRange().toString() }), W2();
|
|
1028
|
+
}, [x2, r2, A2]);
|
|
1020
1029
|
const $2 = q(null), O2 = K((e3) => {
|
|
1021
1030
|
const { onMouseDown: t3, onMouseUp: o3, ...n2 } = e3;
|
|
1022
|
-
return z(te, { ...n2, sx: { ...n2?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: true, children: z(le, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: false, spellCheck: false, autoComplete: "off", ref: $2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", height: "1rem", fontSize: 11 *
|
|
1031
|
+
return z(te, { ...n2, sx: { ...n2?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: true, children: z(le, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: false, spellCheck: false, autoComplete: "off", ref: $2 }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.text.icon ?? e4.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, "::after": { borderBottom: (e4) => `1px solid ${e4.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", height: "1rem", fontSize: 11 * l.getDeviceScale(), fontStyle: h2?.fontStyle, paddingLeft: (e4) => e4.spacing(0.75), paddingRight: (e4) => e4.spacing(0.75), boxShadow: "none", flex: "1", color: (e4) => e4.palette.text.secondary, input: { padding: "0", height: "1rem", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (e4) => e4.palette.text.primary } } }, value: R2, onFocus: (e4) => {
|
|
1023
1032
|
e4.target?.select();
|
|
1024
1033
|
}, onKeyDown: (e4) => {
|
|
1025
1034
|
if (e4.which === ft.Enter || e4.which === ft.Tab) {
|
|
1026
1035
|
let t4 = R2;
|
|
1027
|
-
T2() !== R2 && (e4.stopPropagation(), e4.preventDefault(), t4 =
|
|
1028
|
-
} else if (e4.which === ft.Escape) T2() !== R2 ? (
|
|
1036
|
+
T2() !== R2 && (e4.stopPropagation(), e4.preventDefault(), t4 = P2()), t4 ? V2(t4) : i2?.();
|
|
1037
|
+
} else if (e4.which === ft.Escape) T2() !== R2 ? (D2(T2()), setTimeout(() => {
|
|
1029
1038
|
e4.target?.select();
|
|
1030
1039
|
}, 0), e4.stopPropagation(), e4.preventDefault()) : i2?.();
|
|
1031
1040
|
else if (e4.which === ft.Space) return void e4.stopPropagation();
|
|
1032
1041
|
}, onBlur: () => {
|
|
1033
|
-
|
|
1042
|
+
D2(T2());
|
|
1034
1043
|
}, onChange: (e4) => {
|
|
1035
|
-
|
|
1044
|
+
D2(e4.target.value);
|
|
1036
1045
|
} }) });
|
|
1037
1046
|
}, [R2, h2]), V2 = gt(async (e3) => {
|
|
1038
1047
|
try {
|
|
1039
|
-
|
|
1048
|
+
k2?.closeAll();
|
|
1040
1049
|
const t3 = a2.lookupByRanges(e3)?.[0];
|
|
1041
|
-
t3 && await t3?.select(), await
|
|
1050
|
+
t3 && await t3?.select(), await r2.getRanges(e3)?.select();
|
|
1042
1051
|
} catch (e4) {
|
|
1043
|
-
g2.showMessage?.(e4.message, { type:
|
|
1052
|
+
g2.showMessage?.(e4.message, { type: kt.Error });
|
|
1044
1053
|
}
|
|
1045
|
-
}, [a2, g2,
|
|
1054
|
+
}, [a2, g2, r2]), G2 = K((e3) => {
|
|
1046
1055
|
setTimeout(() => {
|
|
1047
|
-
|
|
1056
|
+
S2(true);
|
|
1048
1057
|
}, 0);
|
|
1049
|
-
const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (
|
|
1050
|
-
let o3 = a2.getItems({ scope:
|
|
1058
|
+
const t3 = { variant: ut.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (k2?.closeAll(), c2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: c2?.scope, commands: c2?.commands };
|
|
1059
|
+
let o3 = a2.getItems({ scope: r2?.getSelectedSheet().getName() });
|
|
1051
1060
|
o3 = o3.sort((e4, t4) => e4.getType() === t4.getType() ? e4.getName().localeCompare(t4.getName()) : "range" === e4.getType() ? -1 : 1);
|
|
1052
|
-
const n2 = C2 ? null : ["editNamedReference", "deleteNamedReference"],
|
|
1061
|
+
const n2 = C2 ? null : ["editNamedReference", "deleteNamedReference"], l2 = C2 ? null : ["editTable", null, "convertTableToRange", "deleteTable"], i3 = [], s3 = o3.length;
|
|
1053
1062
|
for (let e4 = 0; e4 < s3; e4++) {
|
|
1054
|
-
const a3 = o3[e4],
|
|
1055
|
-
if (!
|
|
1063
|
+
const a3 = o3[e4], r3 = a3.getRanges();
|
|
1064
|
+
if (!r3 || a3.isHidden()) continue;
|
|
1056
1065
|
const s4 = a3.getType();
|
|
1057
|
-
s4 !== o3[e4 - 1]?.getType() && (e4 > 0 && i3.push(z(Te, { orientation: "horizontal" }, `type-divider-${i3.length}`)), i3.push(z(Ke, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: "reference" === a3.getType() ? "Ranges" : "Tables" }, `type-header-${i3.length}`))), "reference" === s4 ? i3.push(X(
|
|
1066
|
+
s4 !== o3[e4 - 1]?.getType() && (e4 > 0 && i3.push(z(Te, { orientation: "horizontal" }, `type-divider-${i3.length}`)), i3.push(z(Ke, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: "reference" === a3.getType() ? "Ranges" : "Tables" }, `type-header-${i3.length}`))), "reference" === s4 ? i3.push(X($e, { ...t3, key: "named-" + i3.length, popupCommandKeys: n2, popupScope: "namedItem", scope: "namedItem", commandState: a3, commands: c2?.commands, label: a3.getName(), quickCommand: "selectNamed", disabled: !a3.getRanges() || d2, icon: "NamedRange" })) : "table" === s4 && i3.push(X($e, { ...t3, key: "namedItem-" + i3.length, popupCommandKeys: l2, popupScope: "namedItem", scope: "namedItem", commands: c2?.commands, commandState: a3, label: a3.getName(), quickCommand: "selectNamed", disabled: !r3 || d2, icon: "InsertTable" }));
|
|
1058
1067
|
}
|
|
1059
|
-
const m3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...
|
|
1068
|
+
const m3 = L(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...p2, children: [C2 ? null : z(ve, { ...t3, scope: "namedItem", command: c2?.commands.getCommand("addNamedReference") }), i3 && i3.length > 0 ? L(H, { children: [C2 ? null : z(Te, { orientation: "horizontal" }), z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 })] }) : null] });
|
|
1060
1069
|
return Re({ ...e3, children: m3 });
|
|
1061
|
-
}, [
|
|
1070
|
+
}, [r2, F2, a2, h2, C2]), _2 = Ct(t2, () => ({ focus(e3) {
|
|
1062
1071
|
$2.current?.focus(e3);
|
|
1063
1072
|
} }), []);
|
|
1064
|
-
return z(J, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Ut([_2, t2]), ...
|
|
1073
|
+
return z(J, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Ut([_2, t2]), ...p2, children: z(Be, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%" }, ...m2 }, buttonProps: { sx: { backgroundColor: (e3) => e3.palette.background.paper, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : Wt(e3.palette.divider, 0.2) }, parentFloat: k2, createPopupPanel: G2, onPopupOpen: () => S2(true), onPopupClose: () => S2(false), createTooltip: ({ children: e3 }, t3) => z(He, { title: t3 || y2 ? "" : "Name Box", disabled: t3, leaveDelay: 0, sx: { opacity: t3 || y2 ? 0 : 1 }, children: e3 }), createQuickButton: O2 }) });
|
|
1065
1074
|
}));
|
|
1066
1075
|
Cn.displayName = "NamedCollectionEditor";
|
|
1067
1076
|
const vn = (e2, t2) => z(Cn, { ref: t2, ...e2 }), Tn = $(O((e2, t2) => {
|
|
1068
|
-
const { sx: o2, workbook: n2, sheetElement: a2, gridStyle:
|
|
1077
|
+
const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: r2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = vn, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = U(n2?.getSelectedSheet());
|
|
1069
1078
|
w(n2, { onSheetsChange: (e3) => {
|
|
1070
1079
|
g2(e3?.getSelectedSheet());
|
|
1071
1080
|
}, onViewChange(e3) {
|
|
@@ -1077,10 +1086,10 @@ const vn = (e2, t2) => z(Cn, { ref: t2, ...e2 }), Tn = $(O((e2, t2) => {
|
|
|
1077
1086
|
} }), w(u2, { onProtectionChange() {
|
|
1078
1087
|
f2(u2.getSelection().getCoords().cell);
|
|
1079
1088
|
} });
|
|
1080
|
-
const v2 = y2.current?.getLineHeight() ?? 20, [T2, R2] = U(v2), [
|
|
1089
|
+
const v2 = y2.current?.getLineHeight() ?? 20, [T2, R2] = U(v2), [D2, P2] = U(5), [M2, F2] = U(1), N2 = gt((e3, { size: t3 }) => {
|
|
1081
1090
|
e3.preventDefault(), e3.stopPropagation();
|
|
1082
1091
|
const o3 = Math.floor(t3.height / v2);
|
|
1083
|
-
R2(o3 * v2 + 1), o3 > 1 &&
|
|
1092
|
+
R2(o3 * v2 + 1), o3 > 1 && P2(o3);
|
|
1084
1093
|
}, [v2]), B2 = gt((e3, { size: t3 }) => {
|
|
1085
1094
|
const o3 = Math.floor(t3.height / v2);
|
|
1086
1095
|
F2(o3);
|
|
@@ -1089,7 +1098,7 @@ const vn = (e2, t2) => z(Cn, { ref: t2, ...e2 }), Tn = $(O((e2, t2) => {
|
|
|
1089
1098
|
"edit" === A2?.key && (I2 = A2.args?.stateAndCoords);
|
|
1090
1099
|
const W2 = V(() => {
|
|
1091
1100
|
let e3 = I2?.editState;
|
|
1092
|
-
return e3 || (e3 =
|
|
1101
|
+
return e3 || (e3 = S(() => u2.getRange(h2).getCell())), z(J, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: z(k, { ref: y2, activeCoords: h2, sheet: u2, onFocus: () => {
|
|
1093
1102
|
a2?.startEdit({ autoFocus: false, editMode: true, cell: h2 });
|
|
1094
1103
|
}, defaultTextStyle: C2, useRichStyling: false, disabled: b2, onChangeEdit: (e4) => {
|
|
1095
1104
|
if (void 0 !== e4.dirty) {
|
|
@@ -1111,12 +1120,12 @@ const vn = (e2, t2) => z(Cn, { ref: t2, ...e2 }), Tn = $(O((e2, t2) => {
|
|
|
1111
1120
|
a2.submitEdit();
|
|
1112
1121
|
} }), z(ze, { sx: { border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, disabled: true, "aria-label": "commit-formula-function", icon: z(xt, { iconKey: "Function", style: { transform: "scale(0.85)" } }), tooltipProps: { label: "Insert Function", simple: true }, onMouseDown: (e3) => {
|
|
1113
1122
|
0 === e3.button && e3.preventDefault();
|
|
1114
|
-
} })] }), [b2, I2]), G2 = zt(), [j2, _2] = U(false), X2 = V(() => L(J, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [K2, L(ue, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 *
|
|
1123
|
+
} })] }), [b2, I2]), G2 = zt(), [j2, _2] = U(false), X2 = V(() => L(J, { className: "formula-bar", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [K2, L(ue, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 * l.getDeviceScale(), alignItems: "stretch", paddingTop: "2px", paddingBottom: "2px", boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, border: (e3) => `solid ${b2 ? e3.palette.action.disabled : Wt(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => b2 ? `${e3.palette.text.disabled} !important` : e3.palette.text.primary }, "& .react-resizable-handle": { width: "100%", height: "8px", backgroundColor: "transparent", boxSizing: "content-box", zIndex: 1e3 }, "& .react-resizable-handle-s": { position: "absolute", bottom: "-10px", cursor: "s-resize" } }, onFocus: () => _2(true), onBlur: () => _2(false), onMouseDown: (e3) => {
|
|
1115
1124
|
e3.target?.classList.contains("react-resizable-handle") && e3.preventDefault();
|
|
1116
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) => {
|
|
1117
1126
|
0 === e3.button && e3.preventDefault();
|
|
1118
1127
|
}, onClick: () => {
|
|
1119
|
-
const e3 = M2 > 1 ? 1 :
|
|
1128
|
+
const e3 = M2 > 1 ? 1 : D2;
|
|
1120
1129
|
R2(e3 * v2 + 1), F2(e3);
|
|
1121
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 6.5px", minWidth: "18px" } }, elementBefore: O2, elementAfter: X2 }) }) : null, [O2, X2]), Y2 = Ct(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => $2.current }), []);
|
|
1122
1131
|
return z(J, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Y2, ...p2, children: Z2 });
|
|
@@ -1130,32 +1139,32 @@ const Rn = $(O((e2, t2) => {
|
|
|
1130
1139
|
return z(J, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
|
|
1131
1140
|
}));
|
|
1132
1141
|
Rn.displayName = "FilterColumnMenu";
|
|
1133
|
-
const
|
|
1142
|
+
const Dn = $(O((e2, t2) => {
|
|
1134
1143
|
const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = Ct(t2, () => ({ isFilters: () => true }), []);
|
|
1135
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" })] }) });
|
|
1136
1145
|
}));
|
|
1137
|
-
|
|
1138
|
-
const
|
|
1139
|
-
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, [
|
|
1146
|
+
Dn.displayName = "Filters";
|
|
1147
|
+
const Pn = $(O((e2, t2) => {
|
|
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);
|
|
1140
1149
|
w(n2, { onProtectionChange: () => {
|
|
1141
|
-
|
|
1150
|
+
k2(n2.getProtection().isLocked());
|
|
1142
1151
|
}, onTabColorChange: () => {
|
|
1143
1152
|
v2(n2.getTabColor());
|
|
1144
1153
|
}, onStyleChange: () => {
|
|
1145
1154
|
v2(n2.getTabColor());
|
|
1146
1155
|
} });
|
|
1147
1156
|
const T2 = zt(), R2 = m2 === i2;
|
|
1148
|
-
let
|
|
1157
|
+
let D2 = null, P2 = null;
|
|
1149
1158
|
if (C2 || p2) {
|
|
1150
1159
|
let e3 = f2;
|
|
1151
|
-
C2 ? (
|
|
1160
|
+
C2 ? (P2 = C2.toBlackOrWhite().toCSS(), e3 = C2?.toCSS()) : R2 || (e3 = T2.palette.background.paper), D2 = 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 } });
|
|
1152
1161
|
}
|
|
1153
1162
|
let M2 = null;
|
|
1154
1163
|
"string" == typeof u2 ? M2 = u2 : u2?.toCSS && (M2 = u2.toCSS());
|
|
1155
1164
|
const F2 = R2 ? z(J, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
|
|
1156
|
-
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" : P2 || "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: [D2, 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) }) }) });
|
|
1157
1166
|
}));
|
|
1158
|
-
|
|
1167
|
+
Pn.displayName = "SheetTab";
|
|
1159
1168
|
const Mn = $(O((e2, t2) => {
|
|
1160
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());
|
|
1161
1170
|
w(o2, { onProtectionChange: (e3) => {
|
|
@@ -1182,18 +1191,18 @@ const Fn = $(O((e2, t2) => {
|
|
|
1182
1191
|
m2(e3?.getProtection());
|
|
1183
1192
|
} });
|
|
1184
1193
|
const p2 = V(() => {
|
|
1185
|
-
const e3 = [], t3 = o2.getSheets().getItems({ visibility:
|
|
1194
|
+
const e3 = [], t3 = o2.getSheets().getItems({ visibility: g.Visibility.Hidden }), r3 = o2.getSelectedSheet();
|
|
1186
1195
|
for (let o3 = 0; o3 < t3.length; o3++) {
|
|
1187
1196
|
const l3 = t3[o3], i3 = l3.getVisibility();
|
|
1188
|
-
if (i3 ===
|
|
1197
|
+
if (i3 === g.Visibility.VeryHidden) continue;
|
|
1189
1198
|
const s3 = r3 === l3, d3 = l3.getProtection().isLocked(), m3 = l3.getTabColor(), p3 = n2?.body.fill ?? "transparent";
|
|
1190
|
-
let
|
|
1191
|
-
m3 && (f2 = m3.toCSS(), s3 || (h2 = m3.toBlackOrWhite().toCSS()),
|
|
1199
|
+
let u2 = null, h2 = null, f2 = p3;
|
|
1200
|
+
m3 && (f2 = m3.toCSS(), s3 || (h2 = m3.toBlackOrWhite().toCSS()), u2 = z(J, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: s3 ? f2 : "transparent", borderRadius: "4px", border: `solid 1px ${n2.header.edgeStrokeFill}` }, children: z(J, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: s3 || i3 === g.Visibility.Hidden ? "50%" : "100%", border: (e4) => s3 ? `${p3} solid 1.5px` : `${e4.palette.divider} solid 1px`, background: s3 && m3 ? `linear-gradient(0deg, ${f2} 0%, ${p3})` : f2, borderRadius: "4px" } }) }));
|
|
1192
1201
|
let x2 = null;
|
|
1193
|
-
d3 && (x2 = z(xt, { iconKey: "Lock" })), i3 !==
|
|
1202
|
+
d3 && (x2 = z(xt, { iconKey: "Lock" })), i3 !== g.Visibility.Visible && (x2 = z(xt, { iconKey: "VisibilityOff", style: { opacity: c2.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" })), x2 && (x2 = z(J, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: x2 })), e3.push(z(Ae, { disabled: !c2.isStructureAllowed() && i3 === g.Visibility.Hidden, sx: { color: (e4) => {
|
|
1194
1203
|
let t4 = s3 ? e4.palette.primary.main : e4.palette.text.secondary;
|
|
1195
|
-
return h2 && (t4 = h2), i3 ===
|
|
1196
|
-
}, borderLeft: (e4) => `${s3 ? e4.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", paddingTop: "4px", paddingBottom: "4px", fontWeight: s3 ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: s3 ? z(
|
|
1204
|
+
return h2 && (t4 = h2), i3 === g.Visibility.Hidden && (t4 = Vt(t4, e4.palette.action.disabledOpacity)), t4;
|
|
1205
|
+
}, borderLeft: (e4) => `${s3 ? e4.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", paddingTop: "4px", paddingBottom: "4px", fontWeight: s3 ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: s3 ? z(Oe, {}) : void 0, onMouseDown: (e4) => e4.preventDefault(), onMouseUp: () => {
|
|
1197
1206
|
Promise.resolve(a2.closeAll()).then(() => {
|
|
1198
1207
|
try {
|
|
1199
1208
|
l3.select();
|
|
@@ -1201,7 +1210,7 @@ const Fn = $(O((e2, t2) => {
|
|
|
1201
1210
|
console.error(e4);
|
|
1202
1211
|
}
|
|
1203
1212
|
});
|
|
1204
|
-
}, children: L(H, { children: [
|
|
1213
|
+
}, children: L(H, { children: [u2, L(J, { sx: { paddingRight: "0px", paddingLeft: "4px", display: "flex", flexDirection: "row", flex: "1 1 100%", overflow: "hidden", alignItems: "center", zIndex: 2 }, children: [L(J, { className: "sheet-name", sx: { display: "flex", flexDirection: "column", paddingLeft: "8px", paddingRight: "8px", alignItems: "center" }, children: [l3.getName(), z(J, { sx: { height: "0px", opacity: "0", fontWeight: "700" }, children: l3.getName() })] }), x2] })] }) }, "" + o3));
|
|
1205
1214
|
}
|
|
1206
1215
|
return e3;
|
|
1207
1216
|
}, [o2, c2, s2, a2, n2]);
|
|
@@ -1211,11 +1220,11 @@ Fn.displayName = "SheetsAllMenu";
|
|
|
1211
1220
|
let Nn = false, Bn = false;
|
|
1212
1221
|
let En = null;
|
|
1213
1222
|
const An = async (e2) => {
|
|
1214
|
-
const t2 = await
|
|
1223
|
+
const t2 = await h.getDetails();
|
|
1215
1224
|
if (Bn || t2.isEval()) {
|
|
1216
1225
|
try {
|
|
1217
1226
|
const e3 = top ?? window;
|
|
1218
|
-
e3.SheetXL || (e3.SheetXL = Object.freeze({ getSelectedWorkbook: () => En?.getWorkbook(), getSelectedSheet: () => En?.getWorkbook().getSelectedSheet(), getSelectedRange: () => En?.getWorkbook().getSelectedRange(), getRange: (e4) => En?.getWorkbook().getRange(e4), getSelectedWorkbookElement: () => En, getLicenseManager: () =>
|
|
1227
|
+
e3.SheetXL || (e3.SheetXL = Object.freeze({ getSelectedWorkbook: () => En?.getWorkbook(), getSelectedSheet: () => En?.getWorkbook().getSelectedSheet(), getSelectedRange: () => En?.getWorkbook().getSelectedRange(), getSelectedRanges: () => En?.getWorkbook().getSelectedRanges(), getRange: (e4) => En?.getWorkbook().getRange(e4), getSelectedWorkbookElement: () => En, getLicenseManager: () => h, moreExamples: () => {
|
|
1219
1228
|
const e4 = { "SheetXL.getRange('Sheet1!e5:f6').setValues([[110, 220], [210, 220]])": { Summary: "Set an array of values." }, "SheetXL.getRange('a1:e5').setValue(100)": { Summary: "Set a single repeating value to a range." }, "SheetXL.getRange('Sheet1!e5:f6').getValues()": { Summary: "Get the values as a 2d array (see forEach)." }, "SheetXL.getSelectedRange().setValue(new Date())": { Summary: "Set current date/time using Javascript Date." }, "SheetXL.getSelectedRange().setValue('10/23/95')": { Summary: "Set current date/time using string." }, "SheetXL.getSelectedSheet().getUsedRange().getValues()": { Summary: "Get all of the values in a sheet." }, "SheetXL.getSelectedRange().getStyle().update({ fill: 'accent4' })": { Summary: "Set fill to theme color 4." }, "SheetXL.getRange('E:L').getStyle().update({ fill: 'accent1 lumMod 90 lumOff 40' })": { Summary: "Set some columns to a modified theme color." }, "SheetXL.getRange('e5:f10').getStyle().update({ style: { border: 'double blue' }})": { Summary: "Set border." }, "SheetXL.getCell().getStyle().fill.toCSS()": { Summary: "Get the fill style as css for the selected cell." }, "SheetXL.getRange('a1:a3').autoFill('a1:a7')": { Summary: "Autofill down." }, "SheetXL.getRange('e7:i9').merge({ orientation: 'rows' })": { Summary: "Merge cells horizontally." }, "SheetXL.getSelectedRange().sort({ ascending: false, hasHeader: false })": { Summary: "Sort selected cells ascending with a header." }, "SheetXL.getSelectedRange().clear('all')": { Summary: "Clear the current range a different way." }, "SheetXL.getSelectedSheet().getTables().add('b2:e9')": { Summary: "Create a 4x8 table at b2 for current sheet." }, "SheetXL.getRange('a1:c3').copyFrom('e1:g3')": { Summary: "Copy cells." }, "SheetXL.getRange('c:t').getColumnHeaders().setSize(30)": { Summary: "Set the size of columns to 30 pixels." }, "SheetXL.getRange('2:3').delete()": { Summary: "Remove rows 2 and 3 and shift up." }, "SheetXL.getSelectedSheet().getMovables().addImage('https://www.sheetxl.com/logo-text.svg')": { Summary: "Add an image." }, "SheetXL.getSelectedSheet().getMovables().addImage('https://www.sheetxl.com/logo-text.svg', { bounds: { height: 100 } })": { Summary: "Add an image of height 100." }, "SheetXL.getSelectedRange().doBatch(() => { SheetXL.getSelectedRange().setValue(1.50).getStyle().update({ numberFormat: '0%' }).autoFit(); }, 'Enter 150%')": { Summary: "Set value to 100 and numberformat to 0% as a single." }, "SheetXL.getSelectedRange().doBatch(() => { SheetXL.getSelectedRange().setValue('Remind Me Later').getStyle().update({ namedStyle: 'Note'}).autoFit(); }, 'Set Reminder')": { Summary: "Set a value and style to Note style and autofit text." }, "SheetXL.getSelectedWorkbook().getNames().addReference('Small_Range', 'A2:E5');": { Summary: "Add a named range." }, "SheetXL.getSelectedWorkbook().getRange('a1:e5').addListener((e) => { console.log('got an update for:', e.getSource().toString()) })": { Summary: "Listen for updates at a range." } };
|
|
1220
1229
|
console.table(e4);
|
|
1221
1230
|
} }));
|
|
@@ -1224,7 +1233,7 @@ const An = async (e2) => {
|
|
|
1224
1233
|
}
|
|
1225
1234
|
if (En !== e2 && (En = e2, !Nn)) try {
|
|
1226
1235
|
Nn = true;
|
|
1227
|
-
(top ?? window).SheetXL && (await
|
|
1236
|
+
(top ?? window).SheetXL && (await h._validate(true), h.wasPrinted() && (() => {
|
|
1228
1237
|
_t.consoleWithNoSource("%cTip: You can access the API directly in the console.\nTry\n%c>%c SheetXL.getRange('b2:c3').setValues([[42, 'Hello Word'], [new Date(), true]]) %c\n>%c SheetXL.moreExamples()", "color:#ffa726;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;", "font-family:monospace;color:#1976d2;font-size:12px;", "font-family:monospace;"), Nn = true;
|
|
1229
1238
|
const e3 = document.getElementById("openEditorLink");
|
|
1230
1239
|
e3 && e3.addEventListener("click", (e4) => {
|
|
@@ -1372,7 +1381,7 @@ const An = async (e2) => {
|
|
|
1372
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") })] });
|
|
1373
1382
|
return Re({ ...e3, children: d3 });
|
|
1374
1383
|
}, [r2, n2, a2, c2, u2]);
|
|
1375
|
-
return z(
|
|
1384
|
+
return z(De, { 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 });
|
|
1376
1385
|
})), jn = $(O((e2, t2) => {
|
|
1377
1386
|
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
|
|
1378
1387
|
const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
|
|
@@ -1424,21 +1433,21 @@ const qn = $(O((e2, t2) => {
|
|
|
1424
1433
|
}, [c2]);
|
|
1425
1434
|
const w2 = K((e3) => {
|
|
1426
1435
|
x2((t3) => ({ ...t3, ...e3 }));
|
|
1427
|
-
}, []),
|
|
1428
|
-
if (
|
|
1436
|
+
}, []), S2 = q(null), [k2, v2] = U(null), T2 = q(null), R2 = gt((e3) => {
|
|
1437
|
+
if (k2) return k2.focus(e3), true;
|
|
1429
1438
|
if (s2) {
|
|
1430
|
-
const t3 =
|
|
1439
|
+
const t3 = S2.current?.querySelectorAll?.(s2);
|
|
1431
1440
|
if (t3 && t3.length > 0) return t3[0]?.focus?.(e3), true;
|
|
1432
1441
|
}
|
|
1433
|
-
return
|
|
1434
|
-
}, [
|
|
1442
|
+
return S2.current?.focus?.(e3), false;
|
|
1443
|
+
}, [k2, s2, d2]), D2 = V(() => z(Fe, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), P2 = 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: [P2, z(J, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: z(C, { ref: S2, loadingPanel: D2, readOnly: l2, frame: i2, autoFocus: d2, commands: r2, onStatusChange: w2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), M2] }), [p2, r2, P2, M2, u2, D2, l2, a2, d2, s2, i2, w2]), N2 = V(() => {
|
|
1435
1444
|
let e3;
|
|
1436
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) => {
|
|
1437
|
-
|
|
1446
|
+
S2.current?.getEditor()?.insertSnippet(e4.content), y2({ source: e4.content ?? "" });
|
|
1438
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) => {
|
|
1439
|
-
e4.isDefaultPrevented() ||
|
|
1448
|
+
e4.isDefaultPrevented() || S2.current?.focus();
|
|
1440
1449
|
}, children: L(J, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [F2, e3] }) }));
|
|
1441
|
-
}, [
|
|
1450
|
+
}, [P2, F2, o2, b2]), B2 = Ct(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
|
|
1442
1451
|
R2(e3);
|
|
1443
1452
|
} }), []);
|
|
1444
1453
|
return z(J, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: B2, ...m2, onFocus: (e3) => {
|
|
@@ -1476,7 +1485,7 @@ const Yn = $(O((e2, t2) => {
|
|
|
1476
1485
|
const o3 = z(Zn, { ...e3, commands: t3 });
|
|
1477
1486
|
return Re({ ...e3, children: o3 });
|
|
1478
1487
|
}, [r2, s2, n2, a2]);
|
|
1479
|
-
return z(
|
|
1488
|
+
return z(De, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, selected: o2.getCommand(i2).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: i2, ...l2 });
|
|
1480
1489
|
})), Qn = (e2) => z(ve, { ...e2 }), Jn = $(O((e2, t2) => {
|
|
1481
1490
|
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, [l2, i2] = U(false), s2 = pt(o2, ["executeScript", "showScriptEditor"]), d2 = s2[0]?.context?.();
|
|
1482
1491
|
j(() => {
|
|
@@ -1514,55 +1523,45 @@ const Yn = $(O((e2, t2) => {
|
|
|
1514
1523
|
i3.push(l3);
|
|
1515
1524
|
}
|
|
1516
1525
|
}
|
|
1517
|
-
const d3 = z(Oo, { ...a3, command: o2.getCommand("formatFontColor"),
|
|
1526
|
+
const d3 = z(Oo, { ...a3, command: o2.getCommand("formatFontColor"), isSplit: true, panelProps: { disableAlpha: true } }), m3 = z(Oo, { ...a3, command: o2.getCommand("formatFillColor"), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: mo.End } }), p2 = o2.getCommand("undo") ? z(H, { children: z(Uo, { ...a3, quickCommand: "undo" }) }) : null, u2 = o2.getCommand("find") ? z(H, { children: z(Bo, { ...a3 }) }) : null;
|
|
1518
1527
|
let g2 = null;
|
|
1519
1528
|
l2 && (g2 = L(H, { children: [z(Te, {}), z(Yn, { ...a3 })] }));
|
|
1520
|
-
return L(zn, { parentFloat: n2, children: [p2, null, p2 ? z(Te, {}) : null, z(Yo, { ...a3, command: o2.getCommand("paste") }), z(ve, { ...t3, command: o2.getCommand("formatPainterToggle") }), z(
|
|
1529
|
+
return L(zn, { parentFloat: n2, children: [p2, null, p2 ? z(Te, {}) : null, z(Yo, { ...a3, command: o2.getCommand("paste") }), z(ve, { ...t3, command: o2.getCommand("formatPainterToggle") }), z(fa, { ...t3, command: o2.getCommand("copy") }), z(Te, {}), z(qo, { ...a3, command: o2.getCommand("formatFontFamily") }), z(Eo, { ...a3, command: o2.getCommand("formatFontSize") }), z(ve, { ...t3, command: o2.getCommand("formatBoldToggle") }), z(ve, { ...t3, command: o2.getCommand("formatItalicToggle") }), z(Zo, { ...a3 }), z(Xo, { ...a3 }), z(Mo, { ...a3 }), m3, d3, z(Te, {}), z(ro, { ...a3 }), z(lo, { ...a3 }), z(so, { ...a3 }), z(io, { ...a3 }), z(Fo, { ...a3 }), z(Te, {}), z(Io, { ...a3 }), z(Te, {}), z(on, { command: o2.getCommand("formatCellStyle"), ...a3 }), z(Ia, { command: o2.getCommand("formatTableStyle"), ...a3 }), z(Te, {}), z(zo, { ...a3 }), z(Wo, { ...a3 }), z($o, { ...a3 }), z(Te, {}), z($a, { ...a3 }), z(Ho, { ...a3 }), z(Lo, { ...a3 }), z(Ko, { ...a3 }), u2, g2, i3] });
|
|
1521
1530
|
}, [o2, s2, l2, c2]);
|
|
1522
1531
|
return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: m2, ...r2 });
|
|
1523
1532
|
}));
|
|
1524
1533
|
Jn.displayName = "HomeToolbar";
|
|
1525
1534
|
const ea = $(O((e2, t2) => {
|
|
1526
|
-
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(() => {
|
|
1527
|
-
let e3 = null, t3 = 0;
|
|
1528
|
-
for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === ut.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
|
|
1529
|
-
return { singleMenuCommand: e3, allDisabled: 0 === t3 };
|
|
1530
|
-
}, [c2]), u2 = K((e3, t3) => {
|
|
1531
|
-
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") })] });
|
|
1532
|
-
return Re({ ...e3, children: a3 });
|
|
1533
|
-
}, [r2, n2, a2]);
|
|
1534
|
-
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 });
|
|
1535
|
-
})), ta = $(O((e2, t2) => {
|
|
1536
1535
|
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
|
|
1537
1536
|
const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
|
|
1538
|
-
return L(zn, { parentFloat: n2, children: [z(ve, { ...t3, command: o2.getCommand("insertTable") }), z(
|
|
1537
|
+
return L(zn, { parentFloat: n2, children: [z(ve, { ...t3, command: o2.getCommand("insertTable") }), z(Wa, { ...a3 }), null, z(ve, { ...t3, command: o2.getCommand("updateHyperlink") }), z(ve, { ...t3, command: o2.getCommand("updateComments") })] });
|
|
1539
1538
|
}, [o2]);
|
|
1540
1539
|
return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
|
|
1541
1540
|
}));
|
|
1542
|
-
|
|
1543
|
-
const
|
|
1541
|
+
ea.displayName = "InsertToolbar";
|
|
1542
|
+
const ta = $(O((e2, t2) => {
|
|
1544
1543
|
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = gt((e3) => {
|
|
1545
1544
|
const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
|
|
1546
|
-
return L(zn, { parentFloat: n2, children: [z(No, { ...a3 }), z(ve, { ...t3, command: o2.getCommand("protectionSheetToggle") }), z(Te, {}), z(Vo, { ...a3 }), z(Qo, { ...a3 }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view" }), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view" }), z(Te, {}), z(Jo, { ...a3 }), z(
|
|
1545
|
+
return L(zn, { parentFloat: n2, children: [z(No, { ...a3 }), z(ve, { ...t3, command: o2.getCommand("protectionSheetToggle") }), z(Te, {}), z(Vo, { ...a3 }), z(Qo, { ...a3 }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view" }), z(ve, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view" }), z(Te, {}), z(Jo, { ...a3 }), z(La, { command: o2.getCommand("selectTheme"), ...a3 }), z(Te, {}), z(Yn, { ...a3, scope: "view" }), z(Te, {}), z(ve, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view" })] });
|
|
1547
1546
|
}, [o2]);
|
|
1548
1547
|
return z(Xe, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
|
|
1549
1548
|
}));
|
|
1550
|
-
|
|
1551
|
-
const
|
|
1549
|
+
ta.displayName = "ViewToolbar";
|
|
1550
|
+
const oa = (e2) => z(la, { ...e2 }), na = $((e2) => {
|
|
1552
1551
|
const { sx: t2, ...o2 } = e2;
|
|
1553
1552
|
return L(J, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${Wt(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [z(xe, { disableRipple: true, onMouseDown: (e3) => {
|
|
1554
1553
|
0 === e3.button && e3.preventDefault();
|
|
1555
1554
|
}, sx: { textTransform: "none", flex: "1 1 100%", fontWeight: (e3) => e3.typography.fontWeightRegular, padding: "2px 6px", minHeight: "0px", minWidth: "0px", marginRight: (e3) => e3.spacing(0.5), "&.Mui-selected": {}, "&.Mui-focusVisible": {}, ...t2 }, ...o2 }), z(J, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
|
|
1556
|
-
}),
|
|
1555
|
+
}), aa = $((e2) => {
|
|
1557
1556
|
const { toolbars: t2, value: o2, onToolbarChange: n2, sx: a2, ...r2 } = e2, l2 = V(() => {
|
|
1558
1557
|
const e3 = [];
|
|
1559
|
-
for (let o3 = 0; o3 < t2.length; o3++) e3.push(z(
|
|
1558
|
+
for (let o3 = 0; o3 < t2.length; o3++) e3.push(z(na, { label: t2[o3].label }, t2[o3].label));
|
|
1560
1559
|
return e3;
|
|
1561
1560
|
}, [t2]);
|
|
1562
1561
|
return z(fe, { value: o2, onChange: (e3, t3) => {
|
|
1563
1562
|
n2?.(t3);
|
|
1564
1563
|
}, variant: "scrollable", scrollButtons: false, sx: { paddingLeft: (e3) => e3.spacing(1.5), paddingRight: (e3) => e3.spacing(1.5), paddingTop: (e3) => e3.spacing(0), paddingBottom: (e3) => e3.spacing(0), minHeight: "26px", alignItems: "center", "& .MuiTabs-indicator": { display: "flex", justifyContent: "center", backgroundColor: "transparent" }, "& .MuiTabs-indicatorSpan": { width: "90%", borderRadius: "4px", minWidth: "4px", backgroundColor: (e3) => e3.palette.primary.main }, "& .MuiTab-root": { marginRight: "0px" }, ...a2 }, slotProps: { indicator: { children: z("span", { className: "MuiTabs-indicatorSpan" }) } }, ...r2, children: l2 });
|
|
1565
|
-
}),
|
|
1564
|
+
}), ra = $((e2) => {
|
|
1566
1565
|
const { toolbars: t2, value: o2, onToolbarChange: n2, selectProps: a2, ...r2 } = e2, l2 = K((e3) => {
|
|
1567
1566
|
n2?.(e3.target.value);
|
|
1568
1567
|
}, [n2]), i2 = V(() => {
|
|
@@ -1576,26 +1575,26 @@ const na = (e2) => z(ia, { ...e2 }), aa = $((e2) => {
|
|
|
1576
1575
|
return e3;
|
|
1577
1576
|
}, [t2, o2]);
|
|
1578
1577
|
return z(de, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (e3) => e3.spacing(0.5), paddingBottom: (e3) => e3.spacing(0.5), paddingLeft: (e3) => e3.spacing(2), color: (e3) => e3.palette.primary.main }, "& .MuiSelect-icon": { fill: (e3) => e3.palette.text.icon ?? e3.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active } }, ...a2 }, size: "small", children: z(he, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})` }, ...r2, children: i2 }) });
|
|
1579
|
-
}),
|
|
1578
|
+
}), la = $(O((e2, t2) => {
|
|
1580
1579
|
const { commands: o2, selectWrapper: n2, selectProps: a2 = {}, renderCompact: r2 = false, paletteWrapper: l2, toolbarsProps: i2, paletteProps: s2 = {}, workbook: d2, sx: c2, ...m2 } = e2, p2 = V(() => {
|
|
1581
1580
|
const e3 = [], { ref: t3, ...n3 } = i2?.Home || {};
|
|
1582
1581
|
e3.push({ label: "Home", component: z(Jn, { commands: o2, ...n3 }) });
|
|
1583
1582
|
const { ref: a3, ...r3 } = i2?.Insert || {};
|
|
1584
|
-
e3.push({ label: "Insert", component: z(
|
|
1583
|
+
e3.push({ label: "Insert", component: z(ea, { commands: o2, ...r3 }) });
|
|
1585
1584
|
const { ref: l3, ...s3 } = i2?.View || {};
|
|
1586
|
-
return e3.push({ label: "View", component: z(
|
|
1585
|
+
return e3.push({ label: "View", component: z(ta, { commands: o2, ...s3 }) }), e3;
|
|
1587
1586
|
}, [o2, d2]), u2 = V(() => {
|
|
1588
1587
|
const e3 = [];
|
|
1589
1588
|
for (let t3 = 0; t3 < p2.length; t3++) e3.push(W.cloneElement(p2[t3].component, { ...p2[t3].component.props, key: p2[t3].key ?? p2[t3].label }));
|
|
1590
1589
|
return e3;
|
|
1591
1590
|
}, [p2]), [g2, h2] = U(0), f2 = (e3) => {
|
|
1592
1591
|
h2(e3);
|
|
1593
|
-
}, x2 = V(() => z(r2 ?
|
|
1592
|
+
}, x2 = V(() => z(r2 ? ra : aa, { toolbars: p2, value: g2, onToolbarChange: f2, sx: a2 }), [p2, g2, a2, r2]), { sx: b2, ...y2 } = s2, w2 = z(ue, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${Wt("#fff", $t(5))}, ${Wt("#fff", $t(5))})`, marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1), marginTop: (e3) => e3.spacing(0.5), marginBottom: (e3) => e3.spacing(0.5), ...b2 }, ...y2, children: u2[g2] });
|
|
1594
1593
|
return L(J, { ref: t2, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (e3) => e3.spacing(0.5), "*": { userSelect: "none" }, ...c2 }, ...m2, children: [n2 ? n2(x2) : x2, l2 ? l2(w2) : w2] });
|
|
1595
1594
|
}));
|
|
1596
|
-
|
|
1597
|
-
const
|
|
1598
|
-
const { workbook: t2, workbookElement: o2, target: n2, commands: a2, darkMode: r2, onNewWorkbook: l2 =
|
|
1595
|
+
la.displayName = "WorkbookToolbars";
|
|
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 Dt("activateTask", n2, { label: "Activate Task", description: "Activate Task Pane.", shortcut: { key: "F6" } }), new Dt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Mt.Ctrl, Mt.Shift] } }), new Dt("workbookStatistics", n2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [Mt.Ctrl, Mt.Shift] } }), new Dt("showFormat", n2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [Mt.Ctrl, Mt.Shift] } }), new Pt("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 Pt("deleteCellStyle", n2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new Pt("modifyCellStyle", n2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Dt("find", n2, { label: "Find", description: "Open the Find window.", icon: "Find", shortcut: [{ key: "F", modifiers: [Mt.Ctrl] }, { key: "F5", modifiers: [Mt.Shift] }] }), new Dt("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 Dt("goto", n2, { label: "Go To", description: "Open the 'Go To' window.", icon: "GoTo", shortcut: [{ key: "G", modifiers: [Mt.Ctrl] }] }), new Dt("workbookViewToggleExpandFormulaBar", n2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [Mt.Ctrl, Mt.Shift] } }), new Dt("workbookViewToggleShowFormulaBar", n2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Dt("workbookViewToggleShowTabs", n2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Dt("workbookViewToggleShowStatusBar", n2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Dt("workbookViewToggleShowHorizontalScrollBar", n2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Dt("workbookViewToggleShowVerticalScrollBar", n2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new Pt("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 Pt("deleteSheet", n2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new Pt("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 Pt("duplicateSheet", n2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new Pt("nextSheet", n2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Mt.Ctrl] }] }), new Pt("previousSheet", n2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Mt.Ctrl] }] }), new Pt("selectNextSheet", n2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [Mt.Ctrl, Mt.Shift] }] }), new Pt("selectPreviousSheet", n2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [Mt.Ctrl, Mt.Shift] }] }), new Pt("selectTheme", n2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new Pt("selectNamed", n2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new Pt("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 Pt("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 Pt("deleteNamedReference", n2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference.", icon: "DeleteNamedRange" }), new Dt("activeNameBox", n2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [Mt.Alt] } }), new Dt("createNamedReferenceFromSelection", n2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [Mt.Ctrl, Mt.Shift] } }), new Dt("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 Pt("fullScreenToggle", n2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" }, icon: "FullScreen" }), new Pt("showScriptEditor", n2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", icon: "ScriptRun", shortcut: [{ key: "F11", modifiers: [Mt.Alt] }] }), new Pt("executeScript", n2, { label: "Run Script", description: "Run the selected or last executed script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Pt("executeSelectedScript", n2, { label: "Run Script", description: "Run the selected script.", icon: "ScriptRun", shortcut: { key: "F8" } }), new Pt("saveScripts", n2, { label: "Save Script", description: "Save the current scripts.", icon: "ScriptSave" }), new Pt("maximumWorkbookToggle", n2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [Mt.Ctrl] } }), new Pt("spellCheck", n2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new Pt("calculateAll", n2, { label: "Calculate Now", description: "Recalculate all formulas.", icon: "Calculate", shortcut: { key: "F9" } }), new Dt("closeWorkbook", n2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [Mt.Ctrl] } }), new Dt("newWorkbook", n2, { label: "New Workbook", description: "Create a new workbook in another tab.", icon: "FileNew" })], []), f2 = V(() => {
|
|
1599
1598
|
let e3 = null;
|
|
1600
1599
|
return e3 = a2 ? a2.createChildGroup(n2, "workbook", false) : new Ft(n2, "workbook"), e3.addCommands(h2, true), e3;
|
|
1601
1600
|
}, [a2, h2]), x2 = wt(), b2 = W.useRef(null), y2 = gt(() => {
|
|
@@ -1604,7 +1603,7 @@ const sa = (e2) => {
|
|
|
1604
1603
|
if (n3.update({ disabled: false, context: { getScripts: () => t2.getScripts() } }), !n3) return;
|
|
1605
1604
|
const a3 = f2.getCommand("showScriptEditor");
|
|
1606
1605
|
a3.updateCallback(function(e4 = true) {
|
|
1607
|
-
o3 ? o3.close() :
|
|
1606
|
+
o3 ? o3.close() : u2.activateTaskPane("scriptEditor", {});
|
|
1608
1607
|
});
|
|
1609
1608
|
const r3 = f2.getCommand("executeSelectedScript");
|
|
1610
1609
|
if (!r3) return;
|
|
@@ -1621,8 +1620,8 @@ const sa = (e2) => {
|
|
|
1621
1620
|
n4?.(), console.warn("Unable to compile", e5), i2.showError(e5);
|
|
1622
1621
|
}
|
|
1623
1622
|
return o4;
|
|
1624
|
-
}, addContainerListener: (e4) => (
|
|
1625
|
-
|
|
1623
|
+
}, addContainerListener: (e4) => (S2.current = e4, () => {
|
|
1624
|
+
S2.current = null;
|
|
1626
1625
|
}), setSelectedFunction: (t3) => {
|
|
1627
1626
|
e3 = t3 ?? b2.current ?? null, Promise.resolve(e3).then((e4) => {
|
|
1628
1627
|
r3.update({ disabled: null === e4 });
|
|
@@ -1640,14 +1639,14 @@ const sa = (e2) => {
|
|
|
1640
1639
|
return null;
|
|
1641
1640
|
}, getScripts: () => t2.getScripts() };
|
|
1642
1641
|
r3.update({ context: l3 });
|
|
1643
|
-
}, [f2, t2, o2, i2]),
|
|
1642
|
+
}, [f2, t2, o2, i2]), S2 = W.useRef(null);
|
|
1644
1643
|
w(t2, { onBeforeSave: async () => {
|
|
1645
|
-
await
|
|
1644
|
+
await S2.current?.onBeforeSave();
|
|
1646
1645
|
}, onProtectionChange: () => {
|
|
1647
|
-
|
|
1646
|
+
S2.current?.onReadonlyChange();
|
|
1648
1647
|
}, onLoad: () => {
|
|
1649
1648
|
(async () => {
|
|
1650
|
-
await t2.getCalculation().start(), t2.getScripts().start(),
|
|
1649
|
+
await t2.getCalculation().start(), t2.getScripts().start(), S2.current?.onScriptChange();
|
|
1651
1650
|
})();
|
|
1652
1651
|
} }), w(t2, { onSheetsChange: (e3) => {
|
|
1653
1652
|
m2(e3.getSheets().getItems());
|
|
@@ -1659,11 +1658,11 @@ const sa = (e2) => {
|
|
|
1659
1658
|
}, onScriptsChange: (e3) => {
|
|
1660
1659
|
y2();
|
|
1661
1660
|
} });
|
|
1662
|
-
const { isFullscreenAvailable:
|
|
1661
|
+
const { isFullscreenAvailable: k2, isFullscreenEnabled: C2, toggleFullscreen: v2 } = eo({ target: { current: o2 ?? document.body } }), D2 = R();
|
|
1663
1662
|
j(() => {
|
|
1664
|
-
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: D2, darkMode: r2 }) });
|
|
1665
1664
|
}, [t2?.getTheme(), r2]);
|
|
1666
|
-
const
|
|
1665
|
+
const P2 = gt(async function(e3, o3) {
|
|
1667
1666
|
let n3 = null;
|
|
1668
1667
|
const a3 = t2.getScripts();
|
|
1669
1668
|
if (e3?.declaration || e3?.functionName) {
|
|
@@ -1679,7 +1678,7 @@ const sa = (e2) => {
|
|
|
1679
1678
|
}, [t2, i2]);
|
|
1680
1679
|
j(() => {
|
|
1681
1680
|
f2.getCommand("newCellStyle").updateCallback((e3) => {
|
|
1682
|
-
i2.
|
|
1681
|
+
i2.showInput({ initialValue: (() => {
|
|
1683
1682
|
let e4 = 0;
|
|
1684
1683
|
for (; ; ) {
|
|
1685
1684
|
e4++;
|
|
@@ -1689,7 +1688,7 @@ const sa = (e2) => {
|
|
|
1689
1688
|
} catch (e5) {
|
|
1690
1689
|
}
|
|
1691
1690
|
}
|
|
1692
|
-
})(), title: f2.getCommand("newCellStyle")?.label("cellStyle"), description: "Enter a name for the new cell style.", inputLabel: "Style Name", inputProps: { style: { minWidth: "300px" } }, options: ["Ok", "Cancel"], defaultOption: "Ok",
|
|
1691
|
+
})(), title: f2.getCommand("newCellStyle")?.label("cellStyle"), description: "Enter a name for the new cell style.", inputLabel: "Style Name", inputProps: { style: { minWidth: "300px" } }, options: ["Ok", "Cancel"], defaultOption: "Ok", onValidateInput: async (e4, o3) => {
|
|
1693
1692
|
let n3 = null;
|
|
1694
1693
|
try {
|
|
1695
1694
|
t2.getStyles().validateStyleName(e4, false);
|
|
@@ -1710,7 +1709,7 @@ const sa = (e2) => {
|
|
|
1710
1709
|
const o3 = t2.getSelectedSheet().getSelectedRange();
|
|
1711
1710
|
t2.getStyles().setNamed({ name: e3.getName(), style: o3.getCell().getStyle() });
|
|
1712
1711
|
}), f2.getCommand("hideSheet").updateCallback((e3) => {
|
|
1713
|
-
t2.getSheetAt(e3).setVisibility(
|
|
1712
|
+
t2.getSheetAt(e3).setVisibility(g.Visibility.Hidden);
|
|
1714
1713
|
}), f2.getCommand("deleteSheet").updateCallback(async (e3) => {
|
|
1715
1714
|
t2.getSheetAt(e3 ?? t2.getSelectedSheetIndex())?.delete();
|
|
1716
1715
|
}), f2.getCommand("addSheet").updateCallback((e3) => {
|
|
@@ -1734,7 +1733,7 @@ const sa = (e2) => {
|
|
|
1734
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();
|
|
1735
1734
|
}), f2.getCommand("newWorkbook").updateCallback(() => {
|
|
1736
1735
|
p2?.();
|
|
1737
|
-
}), f2.getCommand("executeScript").updateCallback(
|
|
1736
|
+
}), f2.getCommand("executeScript").updateCallback(P2), f2.getCommand("executeSelectedScript").updateCallback(P2);
|
|
1738
1737
|
}, [t2, i2]);
|
|
1739
1738
|
const M2 = gt(async (e3) => {
|
|
1740
1739
|
let o3 = 0, n3 = null, a3 = "Find & Replace";
|
|
@@ -1757,53 +1756,51 @@ const sa = (e2) => {
|
|
|
1757
1756
|
}
|
|
1758
1757
|
return o3;
|
|
1759
1758
|
}, [t2, o2]), F2 = gt((e3) => {
|
|
1760
|
-
const o3 = {
|
|
1761
|
-
const e4 = t2.getSelectedRanges(), o4 =
|
|
1762
|
-
for (let t3 = 0; t3 <
|
|
1763
|
-
const
|
|
1764
|
-
|
|
1759
|
+
const o3 = { selection: () => {
|
|
1760
|
+
const e4 = t2.getSelectedRanges(), o4 = e4.getCount(), n4 = new Array(o4);
|
|
1761
|
+
for (let t3 = 0; t3 < o4; t3++) {
|
|
1762
|
+
const o5 = e4.at(t3).getFixed(true).getCoords();
|
|
1763
|
+
n4[t3] = o5;
|
|
1765
1764
|
}
|
|
1766
|
-
return t2.getRanges(
|
|
1767
|
-
}, getNames: () => t2.getNames() },
|
|
1765
|
+
return t2.getRanges(n4);
|
|
1766
|
+
}, getNames: () => t2.getNames() }, n3 = { initialValue: e3, context: () => o3, onInput: async (e4) => {
|
|
1768
1767
|
try {
|
|
1769
1768
|
await e4.select();
|
|
1770
1769
|
} catch (e5) {
|
|
1771
|
-
i2.showMessage(e5.message, { type:
|
|
1770
|
+
i2.showMessage(e5.message, { type: kt.Error });
|
|
1772
1771
|
}
|
|
1773
1772
|
} };
|
|
1774
|
-
return i2.showWindow("namedDetails",
|
|
1773
|
+
return i2.showWindow("namedDetails", n3);
|
|
1775
1774
|
}, [i2, t2, o2]);
|
|
1776
1775
|
return j(() => {
|
|
1777
1776
|
const e3 = (e4 = false) => {
|
|
1778
|
-
const o3 = t2.getSelectedCell(),
|
|
1777
|
+
const o3 = { initialValue: { findOptions: { text: t2.getSelectedCell().toTextUnformatted(true) }, replace: e4 }, context: () => M2, onKeyDown: (e5) => {
|
|
1779
1778
|
f2.findCommandByEvent(e5) !== f2.getCommand("find") && f2.findCommandByEvent(e5) !== f2.getCommand("findReplace") || e5.preventDefault();
|
|
1780
|
-
},
|
|
1781
|
-
|
|
1779
|
+
}, autoFocus: true, disableAutoDestroy: true };
|
|
1780
|
+
i2.showWindow("find", o3);
|
|
1782
1781
|
};
|
|
1783
1782
|
f2.getCommand("find")?.update({ disabled: !i2.showWindow }).updateCallback(() => {
|
|
1784
1783
|
e3();
|
|
1785
1784
|
}), f2.getCommand("findReplace")?.update({ disabled: !i2.showWindow }).updateCallback(() => {
|
|
1786
1785
|
e3(true);
|
|
1787
1786
|
}), f2.getCommand("activateTask")?.update({ disabled: !i2 }).updateCallback(() => {
|
|
1788
|
-
const e4 = {
|
|
1787
|
+
const e4 = { onInput: async (e5) => {
|
|
1789
1788
|
try {
|
|
1790
|
-
|
|
1789
|
+
u2.activateTaskPane(e5);
|
|
1791
1790
|
} catch (e6) {
|
|
1792
1791
|
i2.showError(e6.message);
|
|
1793
1792
|
}
|
|
1794
1793
|
}, title: f2.getCommand("activateTask")?.label(), inputLabel: "Task Name", options: ["Activate"] };
|
|
1795
|
-
i2.
|
|
1794
|
+
i2.showInput(e4);
|
|
1796
1795
|
}), f2.getCommand("goto")?.update({ disabled: !i2 }).updateCallback(() => {
|
|
1797
|
-
const e4 = {
|
|
1796
|
+
const e4 = { onInput: async (e5) => {
|
|
1798
1797
|
try {
|
|
1799
1798
|
await t2.getRanges(e5).select();
|
|
1800
1799
|
} catch (e6) {
|
|
1801
|
-
i2.showMessage(e6.message, { type:
|
|
1800
|
+
i2.showMessage(e6.message, { type: kt.Error });
|
|
1802
1801
|
}
|
|
1803
|
-
}, onKeyDown: (e5) => {
|
|
1804
|
-
f2.findCommandByEvent(e5) === f2.getCommand("goto") && e5.preventDefault();
|
|
1805
1802
|
}, title: f2.getCommand("goto")?.label(), inputLabel: "Location", options: ["Go To"] };
|
|
1806
|
-
i2.
|
|
1803
|
+
i2.showInput(e4);
|
|
1807
1804
|
}), f2.getCommand("selectNamed")?.update({ disabled: !i2 }).updateCallback(async (e4) => {
|
|
1808
1805
|
if (e4) try {
|
|
1809
1806
|
await e4.select();
|
|
@@ -1832,17 +1829,17 @@ const sa = (e2) => {
|
|
|
1832
1829
|
e3.setShowVerticalScrollbar(!e3.isShowVerticalScrollbar());
|
|
1833
1830
|
});
|
|
1834
1831
|
} }), j(() => {
|
|
1835
|
-
f2.getCommand("fullScreenToggle").update({ state: C2, disabled: !
|
|
1832
|
+
f2.getCommand("fullScreenToggle").update({ state: C2, disabled: !k2, icon: C2 ? "FullScreenOff" : "FullScreen" }).updateCallback(() => {
|
|
1836
1833
|
v2();
|
|
1837
1834
|
});
|
|
1838
|
-
}, [C2,
|
|
1835
|
+
}, [C2, k2]), j(() => {
|
|
1839
1836
|
const e3 = t2.getProtection().isStructureAllowed();
|
|
1840
1837
|
f2.getCommand("hideSheet").update({ disabled: c2.length <= 1 || !e3 }), f2.getCommand("deleteSheet").update({ disabled: c2.length <= 1 || !e3 });
|
|
1841
1838
|
}, [c2, s2]), f2;
|
|
1842
|
-
},
|
|
1839
|
+
}, sa = () => {
|
|
1843
1840
|
window.open(window.origin.toString(), "sheetxl-" + n.uuidV4(), "popup=true");
|
|
1844
|
-
},
|
|
1845
|
-
const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 =
|
|
1841
|
+
}, da = "_sheetxl-theme_4opcr_2", ca = "_sheetxl-workbook_g5t6x_5", ma = (e2) => z(Mn, { ...e2 }), pa = (e2) => z(Fn, { ...e2 }), ua = (e2) => z(Pn, { ...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()), [P2, M2] = U(o2?.getProtection());
|
|
1846
1843
|
w(o2, { onViewChange(e3) {
|
|
1847
1844
|
v2(e3?.getSelectedSheetIndex());
|
|
1848
1845
|
}, onSheetsChange: (e3) => {
|
|
@@ -1850,7 +1847,7 @@ const sa = (e2) => {
|
|
|
1850
1847
|
}, onProtectionChange: (e3) => {
|
|
1851
1848
|
M2(e3?.getProtection());
|
|
1852
1849
|
} });
|
|
1853
|
-
const F2 = i2 || !
|
|
1850
|
+
const F2 = i2 || !P2.isStructureAllowed(), N2 = V(() => {
|
|
1854
1851
|
const e3 = [];
|
|
1855
1852
|
for (let t3 = 0; t3 < T2.length; t3++) e3.push(T2[t3].getName());
|
|
1856
1853
|
return e3;
|
|
@@ -1866,8 +1863,8 @@ const sa = (e2) => {
|
|
|
1866
1863
|
o2.getSheets().add({ name: void 0, autoSelect: true }), r2?.(e3);
|
|
1867
1864
|
}, [o2, a2, r2, C2]), H2 = V(() => ({ placement: "top-start" }), []), W2 = q(null), [$2, O2] = U(false), G2 = K((e3) => {
|
|
1868
1865
|
const { closeFloatAll: t3, floatReference: n3 } = e3;
|
|
1869
|
-
return m2({ workbook: o2, gridStyle:
|
|
1870
|
-
}, [m2, c2, l2, o2,
|
|
1866
|
+
return m2({ workbook: o2, gridStyle: S2, floatReference: n3, closeFloatAll: t3, ...c2 });
|
|
1867
|
+
}, [m2, c2, l2, o2, S2]), { reference: _2, component: X2 } = _e({ label: "allSheet", popperProps: H2, anchor: W2.current, onOpen: () => O2(true), onClose: () => O2(false), createPopupPanel: G2 }), Z2 = q(null), [Y2, Q2] = U(null), ee2 = K((e3) => {
|
|
1871
1868
|
const { floatReference: t3 } = e3;
|
|
1872
1869
|
return d2?.({ workbook: o2, index: Y2?.index, tabStripRef: Z2.current, commands: n2, disabled: l2, floatReference: t3, ...s2 });
|
|
1873
1870
|
}, [d2, s2, l2, o2, n2, Y2]), { reference: oe2, component: ne2 } = _e({ label: "sheetTab", popperProps: H2, anchor: { getBoundingClientRect: () => new DOMRect(Y2?.left || 0, Y2?.top || 0, 0, 0) }, onClose: () => Q2(null), createPopupPanel: ee2 });
|
|
@@ -1883,13 +1880,13 @@ const sa = (e2) => {
|
|
|
1883
1880
|
} catch (e4) {
|
|
1884
1881
|
}
|
|
1885
1882
|
if (!t3) return null;
|
|
1886
|
-
return (u2 ??
|
|
1883
|
+
return (u2 ?? ua)({ sheet: t3, gridTheme: y2, onContextMenu: (t4) => {
|
|
1887
1884
|
B2(e3.index), ae2(t4, e3.index);
|
|
1888
1885
|
}, ...e3, ...p2 });
|
|
1889
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) => {
|
|
1890
1887
|
0 === e3.button && e3.preventDefault();
|
|
1891
1888
|
}, onClick: () => I2(), children: z(xt, { iconKey: "AddCircle" }) }) }), [l2, F2, I2]);
|
|
1892
|
-
return L(J, { ref: t2, className: mt(h2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...f2 }, ...
|
|
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(D, { 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) => {
|
|
1893
1890
|
const { key: t3, ...o3 } = e3;
|
|
1894
1891
|
return z(Te, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => Wt(e4.palette.divider, 0.25) }, ...o3 }, t3);
|
|
1895
1892
|
}, editLabelProps: { readOnly: F2, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (e3) => {
|
|
@@ -1902,8 +1899,8 @@ const sa = (e2) => {
|
|
|
1902
1899
|
$2 ? _2.close(0) : _2.open(0);
|
|
1903
1900
|
}, icon: z(xt, { iconKey: "Menu" }) }) }) }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, minWidth: "4px" } }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, flex: "none", display: "flex", alignItems: "center" }, children: le2 }), z("div", { style: { borderTop: `solid ${b2} ${x2}px`, flex: 1, minWidth: "24px" } }), ne2, X2] });
|
|
1904
1901
|
}));
|
|
1905
|
-
|
|
1906
|
-
const
|
|
1902
|
+
ga.displayName = "WorkbookStrip";
|
|
1903
|
+
const ha = $(O((e2, t2) => {
|
|
1907
1904
|
const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = Z((e3) => e3 + 1, 0), [m2, p2] = U(o2.getSelectedSheet()), [u2, g2] = U(m2.getSelectedRanges()), [h2, f2] = U(m2.getSelectedCell());
|
|
1908
1905
|
w(o2, { onSheetsChange() {
|
|
1909
1906
|
p2(o2.getSelectedSheet());
|
|
@@ -1915,51 +1912,51 @@ const fa = $(O((e2, t2) => {
|
|
|
1915
1912
|
const x2 = V(() => ({}), []), b2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
|
|
1916
1913
|
}, onError() {
|
|
1917
1914
|
console.log("onError");
|
|
1918
|
-
} }, disabled: a2, scope: "contextMenu", parentFloat: l2 }), [a2, l2]), y2 = V(() => ({ ...x2, ...b2, variant: ut.Menuitem }), [x2, b2]),
|
|
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 = [];
|
|
1919
1916
|
let C2 = u2.isEntireRows(), v2 = u2.isEntireColumns();
|
|
1920
|
-
u2 && (C2 && (
|
|
1921
|
-
const T2 = [], R2 = n2.getCommand("formatTableStyle"),
|
|
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"), D2 = R2?.context()?.table();
|
|
1922
1919
|
if (bt(R2), !C2 && !v2) {
|
|
1923
|
-
if (T2.push(z(Te, { orientation: "horizontal" }, "contextBefore:" + T2.length)), h2?.getHyperlink()) T2.push(X(
|
|
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" }));
|
|
1924
1921
|
else {
|
|
1925
1922
|
const e3 = n2.getCommand("updateHyperlink");
|
|
1926
1923
|
T2.push(X(ve, { command: e3, ...y2, key: "contextBefore:" + T2.length }));
|
|
1927
1924
|
}
|
|
1928
|
-
if (h2?.getComments()) T2.push(X(
|
|
1925
|
+
if (h2?.getComments()) T2.push(X($e, { ...S2, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + T2.length, quickCommand: "updateComments" }));
|
|
1929
1926
|
else {
|
|
1930
1927
|
const e3 = n2.getCommand("updateComments");
|
|
1931
1928
|
T2.push(X(ve, { command: e3, ...y2, key: "contextBefore:" + T2.length }));
|
|
1932
1929
|
}
|
|
1933
|
-
|
|
1930
|
+
D2 ? T2.push(X($e, { ...S2, variant: ut.Menuitem, key: "contextBefore:" + T2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: D2, quickCommand: "editTable" })) : T2.push(X(ve, { command: n2.getCommand("insertTable"), ...y2, key: "context:" + k2.length })), T2.push(X(Wa, { ...S2, key: "contextBefore:" + T2.length }));
|
|
1934
1931
|
}
|
|
1935
|
-
const
|
|
1936
|
-
return z(J, { ref: t2, className: mt("menu", i2), sx: { ...r2 }, ...s2, children:
|
|
1932
|
+
const P2 = 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: P2 });
|
|
1937
1934
|
}));
|
|
1938
|
-
|
|
1939
|
-
const
|
|
1935
|
+
ha.displayName = "WorkbookContextMenu";
|
|
1936
|
+
const fa = $(O((e2, t2) => {
|
|
1940
1937
|
const { command: o2, ...n2 } = e2, a2 = wt(), [r2, l2] = U(false), [i2, s2] = U("info");
|
|
1941
1938
|
return j(() => {
|
|
1942
1939
|
const e3 = a2.getMode();
|
|
1943
1940
|
l2("copy" === e3?.key || "cut" === e3?.key), s2("cut" === e3?.key ? "warn" : "accent");
|
|
1944
1941
|
}, [a2]), z(ve, { ref: t2, command: o2, icon: z(xt, { iconKey: "copy.walking", sourceProps: { isWalking: r2, themedType: i2 } }), ...n2 });
|
|
1945
|
-
})),
|
|
1942
|
+
})), xa = $(O((e2, t2) => {
|
|
1946
1943
|
const { movable: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2;
|
|
1947
1944
|
w(o2, { onAnyChange(e3) {
|
|
1948
1945
|
} });
|
|
1949
1946
|
const s2 = V(() => ({}), []), d2 = V(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
|
|
1950
1947
|
}, onError() {
|
|
1951
1948
|
console.log("onError");
|
|
1952
|
-
} }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = V(() => ({ variant: ut.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = V(() => ({ commands: n2, variant: ut.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = L(H, { children: [z(
|
|
1949
|
+
} }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = V(() => ({ variant: ut.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = V(() => ({ commands: n2, variant: ut.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = L(H, { children: [z(fa, { command: n2.getCommand("copy"), ...c2, variant: ut.Menuitem }), [], z(Te, { orientation: "horizontal" }), z($e, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront" }), z($e, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack" }), z(Te, { orientation: "horizontal" }), z(ve, { ...c2, command: n2.getCommand("toggleLockAspectRatio") }), z(Te, { orientation: "horizontal" }), z($e, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: "DrawAlignLeft", tooltip: "Quickly change the placement of your drawings." }), z(Te, { orientation: "horizontal" }), z($e, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: "DrawResize", tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
|
|
1953
1950
|
return z(J, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: p2 });
|
|
1954
1951
|
}));
|
|
1955
|
-
|
|
1956
|
-
const
|
|
1957
|
-
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:
|
|
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(P, { ref: t2, ...e2 }), va = (e2) => z(kn, { ...e2 }), Ta = (e2) => z(ga, { ...e2 }), Ra = { fireOnModelChange: false }, Da = { flex: "1 1 100%", display: "flex", boxSizing: "border-box" }, Pa = $(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: D2 = va, toolbarProps: P2, 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(() => {
|
|
1958
1955
|
const e3 = { theme: de2.getDefaultTheme(), ...n2 };
|
|
1959
|
-
return o2 ?? new
|
|
1960
|
-
}, [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),
|
|
1956
|
+
return o2 ?? new f(e3);
|
|
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(() => {
|
|
1961
1958
|
be2(true);
|
|
1962
|
-
}, []),
|
|
1959
|
+
}, []), ke2 = q(null), Ce2 = Ct(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => ce2, getSheetElement: () => me2.current, getViewportElement: () => he2.current, getFormulaBarElement: () => ke2.current, focus() {
|
|
1963
1960
|
me2 && me2.current && me2.current.focus();
|
|
1964
1961
|
} }), [ce2]), ve2 = q(null);
|
|
1965
1962
|
Q(() => {
|
|
@@ -1972,18 +1969,18 @@ const ya = (e2) => z(ba, { ...e2 }), wa = (e2) => z(fa, { ...e2 }), ka = (e2) =>
|
|
|
1972
1969
|
requestAnimationFrame(() => {
|
|
1973
1970
|
me2?.current?.focus();
|
|
1974
1971
|
});
|
|
1975
|
-
}, []), [
|
|
1972
|
+
}, []), [De2, Pe2] = U(ce2?.getSelectedSheet()), [Ne2, Be2] = U(ce2?.getProtection());
|
|
1976
1973
|
w(ce2, { onSheetsChange: (e3) => {
|
|
1977
|
-
|
|
1974
|
+
Pe2(e3?.getSelectedSheet());
|
|
1978
1975
|
}, onViewChange(e3) {
|
|
1979
|
-
|
|
1976
|
+
Pe2(e3?.getSelectedSheet());
|
|
1980
1977
|
}, onProtectionChange: (e3) => {
|
|
1981
1978
|
Be2(e3?.getProtection());
|
|
1982
1979
|
} }), w(ce2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
|
|
1983
1980
|
me2.current.getSheet() !== t3 ? me2.current.getGridElement()?.onViewChangeOnce(() => {
|
|
1984
1981
|
me2.current.getSheet() !== t3 && e4(false), e4(true);
|
|
1985
1982
|
}) : e4(true);
|
|
1986
|
-
}) },
|
|
1983
|
+
}) }, Ra);
|
|
1987
1984
|
const [Ee2, Ae2] = Z((e3) => e3 + 1, 0), Ie2 = ce2?.getView();
|
|
1988
1985
|
w(Ie2, { onViewChange: (e3) => {
|
|
1989
1986
|
Ae2();
|
|
@@ -1992,20 +1989,20 @@ const ya = (e2) => z(ba, { ...e2 }), wa = (e2) => z(fa, { ...e2 }), ka = (e2) =>
|
|
|
1992
1989
|
K(() => {
|
|
1993
1990
|
me2.current.focus();
|
|
1994
1991
|
}, []);
|
|
1995
|
-
const Ve2 =
|
|
1992
|
+
const Ve2 = ia({ workbook: ce2, workbookElement: Ce2.current, target: () => me2.current, commands: g2, darkMode: He2.body.darkMode, onNewWorkbook: a2 }), Ke2 = q(null), [Ge2, Ue2] = U(false), [je2, qe2] = U(null), [Xe2, Ze2] = U(Nt.Top), [Ye2, Qe2] = U(x.EmptyBounds), et2 = K(() => {
|
|
1996
1993
|
Ue2(false), qe2(null);
|
|
1997
1994
|
}, []), tt2 = K((e3, t3, o3 = Nt.Top) => {
|
|
1998
1995
|
Qe2(e3), Ze2(o3), qe2(t3), null !== Ke2.current && setTimeout(() => {
|
|
1999
1996
|
null !== Ke2.current && Ke2.current.update();
|
|
2000
1997
|
}, 160), Ue2(true);
|
|
2001
|
-
}, []), [ot2, nt2] = U("sheet"), at2 =
|
|
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 ? D2({ sheet: De2, gridStyle: He2, ...T2 }) : null, [D2, T2, it2, He2, De2]), pt2 = V(() => E2({ commands: Ve2, workbook: Ce2.current, ...P2 }), [Ve2, E2, P2, se2]), [ut2, { width: ht2 }] = jt(), ft2 = 0 === ht2 || ht2 > 560, xt2 = V(() => {
|
|
2002
1999
|
if (!at2) return null;
|
|
2003
|
-
let e3 = C2({ background: He2.body.fill, borderWidth: 1, borderColor: dt2, gridTheme: Le2, gridStyle: He2, onBeforeUserChange: Te2, onUserChange: Re2, workbook: ce2, commands: Ve2, sheetTabProps: {}, ...
|
|
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 });
|
|
2004
2001
|
return ft2 || (e3 = z("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
|
|
2005
|
-
}, [C2,
|
|
2002
|
+
}, [C2, k2, se2, ce2, Le2, ft2, Ve2, at2]), bt2 = K((e3) => {
|
|
2006
2003
|
const { style: t3, ...o3 } = e3;
|
|
2007
2004
|
let n3 = null, a3 = null, r3 = null;
|
|
2008
|
-
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 }, endGap: 700, sheet: De2, onShowTooltip: (e4) => {
|
|
2009
2006
|
tt2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
|
|
2010
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 }) => {
|
|
2011
2008
|
ce2.getView().setTabRatio(Math.round(10 * e4));
|
|
@@ -2016,9 +2013,9 @@ const ya = (e2) => z(ba, { ...e2 }), wa = (e2) => z(fa, { ...e2 }), ka = (e2) =>
|
|
|
2016
2013
|
n3 = r3;
|
|
2017
2014
|
}
|
|
2018
2015
|
return z(J, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: n3 });
|
|
2019
|
-
}, [
|
|
2016
|
+
}, [De2, 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 });
|
|
2020
2017
|
j(() => {
|
|
2021
|
-
yt2 ?
|
|
2018
|
+
yt2 ? kt2.open(0) : kt2.close(0);
|
|
2022
2019
|
}, [yt2]);
|
|
2023
2020
|
const Rt2 = gt((e3, t3) => {
|
|
2024
2021
|
if (e3?.isDefaultPrevented()) return true;
|
|
@@ -2026,7 +2023,7 @@ const ya = (e2) => z(ba, { ...e2 }), wa = (e2) => z(fa, { ...e2 }), ka = (e2) =>
|
|
|
2026
2023
|
const { floatReference: o3 } = e4;
|
|
2027
2024
|
return $2({ filter: t3, commands: Ve2, floatReference: o3, sx: { ...A2 } });
|
|
2028
2025
|
} });
|
|
2029
|
-
}, [$2, A2, Ve2, ce2, yt2]),
|
|
2026
|
+
}, [$2, A2, Ve2, ce2, yt2]), Pt2 = gt((e3) => {
|
|
2030
2027
|
if (e3.originalEvent?.isDefaultPrevented()) return true;
|
|
2031
2028
|
e3.originalEvent?.preventDefault(), wt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
|
|
2032
2029
|
const { floatReference: t3 } = e4;
|
|
@@ -2040,19 +2037,19 @@ const ya = (e2) => z(ba, { ...e2 }), wa = (e2) => z(fa, { ...e2 }), ka = (e2) =>
|
|
|
2040
2037
|
} });
|
|
2041
2038
|
}, [O2, A2, Ve2]);
|
|
2042
2039
|
V(() => {
|
|
2043
|
-
const e3 = [new
|
|
2040
|
+
const e3 = [new Dt("openContextMenu", () => me2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [Mt.Shift] }, { key: "ContextMenu" }] })];
|
|
2044
2041
|
Ve2.addCommands(e3, true);
|
|
2045
2042
|
}, [Ve2]), j(() => {
|
|
2046
2043
|
Ve2.getCommand("openContextMenu").updateCallback(() => {
|
|
2047
|
-
const e3 =
|
|
2044
|
+
const e3 = De2.getSelection().getCoords().cell;
|
|
2048
2045
|
me2.current?.getGridElement()?.scrollCellCoordsIntoView(e3).then((t3) => {
|
|
2049
2046
|
requestAnimationFrame(() => {
|
|
2050
|
-
const o3 =
|
|
2051
|
-
|
|
2047
|
+
const o3 = De2.getView().getZoomScale() / 100, n3 = De2.getColumnHeaders().findOffset(e3.colIndex + 1) * o3, a3 = De2.getRowHeaders().findOffset(e3.rowIndex + 1) * o3, r3 = me2.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
|
|
2048
|
+
Pt2({ clientX: n3 - r3.x - t3.left + 6, clientY: a3 - r3.y - t3.top + 6 });
|
|
2052
2049
|
});
|
|
2053
2050
|
});
|
|
2054
2051
|
});
|
|
2055
|
-
}, [
|
|
2052
|
+
}, [De2]);
|
|
2056
2053
|
const Et2 = gt((e3) => {
|
|
2057
2054
|
Ve2?.dispatchToFocusedCommand(e3);
|
|
2058
2055
|
}, [Ve2]), At2 = gt(() => {
|
|
@@ -2063,10 +2060,10 @@ const ya = (e2) => z(ba, { ...e2 }), wa = (e2) => z(fa, { ...e2 }), ka = (e2) =>
|
|
|
2063
2060
|
nt2("formulaBar");
|
|
2064
2061
|
}, []), Ht2 = gt((e3) => {
|
|
2065
2062
|
const { style: t3, ...o3 } = e3;
|
|
2066
|
-
return z(M, { style: { ...t3, paddingTop: "4px", paddingBottom: "4px" }, ...o3, sheet:
|
|
2063
|
+
return z(M, { style: { ...t3, paddingTop: "4px", paddingBottom: "4px" }, ...o3, sheet: De2, endGap: 700, onShowTooltip: (e4) => {
|
|
2067
2064
|
tt2(e4.anchor, e4.display, Nt.Left);
|
|
2068
2065
|
}, onCloseTooltip: () => et2() });
|
|
2069
|
-
}, [
|
|
2066
|
+
}, [De2]);
|
|
2070
2067
|
j(() => {
|
|
2071
2068
|
l2 && me2 && me2.current && me2.current.focus();
|
|
2072
2069
|
}, []);
|
|
@@ -2084,7 +2081,7 @@ const ya = (e2) => z(ba, { ...e2 }), wa = (e2) => z(fa, { ...e2 }), ka = (e2) =>
|
|
|
2084
2081
|
Ve2?.getCommand("insertImageFromFile")?.execute({ file: t3, options: { bounds: { x: a3.x, y: a3.y } }, goto: { range: { ...r3 } } });
|
|
2085
2082
|
} else Ve2?.getCommand("openWorkbook")?.execute(t3);
|
|
2086
2083
|
}
|
|
2087
|
-
}, [Ve2, Ot2]), Ut2 = V(() => Ot2 ? z(J, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: (e3) => e3.palette.divider, color: (e3) => e3.palette.primary.dark }, children: z(ee, { variant: "h4", children: Ot2 }) }) : null, [Ot2]), _t2 = q(null), qt2 = V(() => z(Jt, { in: !ye2, nodeRef: _t2, timeout: 500, classNames: "animating", unmountOnExit: true, children: z(J, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: ye2 ? "none" : i2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: G2({ ref: _t2, transitionDelay: "0", transparentBackground: false, sx: { opacity: ye2 ? 0 : i2?.opacity, pointerEvents: ye2 ? "none" : i2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ..._2 } }) }) }), [ye2, G2, _2]), Xt2 = V(() => y2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: ce2, sheetElement: me2.current, gridStyle: He2, onFocus: Lt2, ...b2, NamedCollectionEditorProps: { restoreFocus: (e3) => me2.current.focus(e3), ...b2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Ve2, ...b2?.NamedCollectionEditorProps?.commandPopupButtonProps } } },
|
|
2084
|
+
}, [Ve2, Ot2]), Ut2 = V(() => Ot2 ? z(J, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: (e3) => e3.palette.divider, color: (e3) => e3.palette.primary.dark }, children: z(ee, { variant: "h4", children: Ot2 }) }) : null, [Ot2]), _t2 = q(null), qt2 = V(() => z(Jt, { in: !ye2, nodeRef: _t2, timeout: 500, classNames: "animating", unmountOnExit: true, children: z(J, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: ye2 ? "none" : i2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: G2({ ref: _t2, transitionDelay: "0", transparentBackground: false, sx: { opacity: ye2 ? 0 : i2?.opacity, pointerEvents: ye2 ? "none" : i2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ..._2 } }) }) }), [ye2, G2, _2]), Xt2 = V(() => y2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: ce2, sheetElement: me2.current, gridStyle: He2, onFocus: Lt2, ...b2, NamedCollectionEditorProps: { restoreFocus: (e3) => me2.current.focus(e3), ...b2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Ve2, ...b2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, ke2), [y2, b2, ce2, He2, Ve2, ye2]), Zt2 = K((e3) => {
|
|
2088
2085
|
const { movable: t3, ...o3 } = e3, n3 = { movable: t3, onContextMenuCapture: (e4) => {
|
|
2089
2086
|
Ft2(e4, t3);
|
|
2090
2087
|
}, ...o3 }, a3 = t3.getContent().getType();
|
|
@@ -2099,9 +2096,9 @@ const ya = (e2) => z(ba, { ...e2 }), wa = (e2) => z(fa, { ...e2 }), ka = (e2) =>
|
|
|
2099
2096
|
r3 = z(B, { ...e4 });
|
|
2100
2097
|
}
|
|
2101
2098
|
return z("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: r3 }, t3.getUUID());
|
|
2102
|
-
}, []), Yt2 = V(() => Y2({ style: Da, onFocus: It2, gridStyle: He2, headersStyle: We2, sheet:
|
|
2099
|
+
}, []), Yt2 = V(() => Y2({ style: Da, onFocus: It2, gridStyle: He2, headersStyle: We2, sheet: De2, commands: Ve2, onSheetContextMenu: Pt2, onViewportChange: (e3) => {
|
|
2103
2100
|
Oe2(e3);
|
|
2104
|
-
}, showScrollbars: false, viewportComponent: fe2, onRepeatCommandChange: u2, onElementLoad:
|
|
2101
|
+
}, showScrollbars: false, viewportComponent: fe2, onRepeatCommandChange: u2, onElementLoad: Se2, onShowColumnTooltip: (e3) => {
|
|
2105
2102
|
tt2(e3.anchor, e3.display, Nt.Top);
|
|
2106
2103
|
}, onShowRowTooltip: (e3) => {
|
|
2107
2104
|
tt2(e3.anchor, e3.display, Nt.Right);
|
|
@@ -2109,13 +2106,13 @@ const ya = (e2) => z(ba, { ...e2 }), wa = (e2) => z(fa, { ...e2 }), ka = (e2) =>
|
|
|
2109
2106
|
tt2({ x: e3.anchor.x, y: e3.anchor.y, width: 0, height: 0 }, e3.display, e3.placement);
|
|
2110
2107
|
}, onCloseTooltip: () => et2(), renderMovable: Zt2, ...X2, cellRenderProps: { onFilterButtonMouseDown: (e3, t3) => {
|
|
2111
2108
|
X2?.cellRenderProps?.onFilterButtonMouseDown(e3, t3), Rt2(e3, t3);
|
|
2112
|
-
}, ...X2?.cellRenderProps } }, me2), [Ve2, X2,
|
|
2109
|
+
}, ...X2?.cellRenderProps } }, me2), [Ve2, X2, De2, He2, u2]), Qt2 = V(() => {
|
|
2113
2110
|
let e3 = z(Bt, { ref: ut2, style: Da, viewport: $e2, touchElement: me2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
|
|
2114
2111
|
me2.current?.getGridElement()?.scrollTo(e4);
|
|
2115
2112
|
}, showHorizontalScrollbar: rt2 || at2, showVerticalScrollbar: st2, createHorizontalScrollbar: bt2, createVerticalScrollbar: Ht2, children: Yt2 });
|
|
2116
2113
|
return ft2 || 0 === ht2 || (e3 = L(H, { children: [e3, xt2] })), te2 ? te2(e3) : e3;
|
|
2117
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), []);
|
|
2118
|
-
return L(ue, { className: mt("sheetxl-workbook",
|
|
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) => {
|
|
2119
2116
|
ge2(true), At2(), c2?.(e3);
|
|
2120
2117
|
}, onBlur: (e3) => {
|
|
2121
2118
|
ge2(false), m2?.(e3);
|
|
@@ -2128,9 +2125,9 @@ const ya = (e2) => z(ba, { ...e2 }), wa = (e2) => z(fa, { ...e2 }), ka = (e2) =>
|
|
|
2128
2125
|
}
|
|
2129
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] });
|
|
2130
2127
|
}));
|
|
2131
|
-
|
|
2132
|
-
const
|
|
2133
|
-
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:
|
|
2128
|
+
Pa.displayName = "WorkbookElement";
|
|
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
|
+
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) => {
|
|
2134
2131
|
T2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && v2.current?.select(), v2.current?.focus(t3);
|
|
2135
2132
|
}, focus: (e3) => {
|
|
2136
2133
|
v2.current?.focus(e3);
|
|
@@ -2138,12 +2135,12 @@ const Fa = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:h
|
|
|
2138
2135
|
return Q(() => {
|
|
2139
2136
|
C2(a2 !== g2), x2(a2), h2(a2);
|
|
2140
2137
|
}, [a2]), j(() => {
|
|
2141
|
-
|
|
2138
|
+
k2 && 0 !== y2 && _t.debounce(() => {
|
|
2142
2139
|
C2(false);
|
|
2143
2140
|
}, 300)();
|
|
2144
|
-
}, [
|
|
2141
|
+
}, [k2, y2]), j(() => {
|
|
2145
2142
|
u2(g2 && !to.isValidWindowsFilename(g2));
|
|
2146
|
-
}, [g2]), s2 ? null : z(J, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity:
|
|
2143
|
+
}, [g2]), s2 ? null : z(J, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: k2 ? "0" : "1", transition: k2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Ut([R2, w2, t2]), ...d2, children: z(He, { label: T2.current?.requestReason ?? "Workbook Name", children: L(J, { className: mt({ "Mui-focusVisible": c2 }), sx: { visibility: 0 === y2 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...Ma(true, i2), ...o2 }, children: [i2 ? z(ee, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: g2 !== f2 ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (e3) => p2 ? e3.palette.error.dark : void 0 }, children: a2 ?? r2 }) : z(le, { sx: { width: `${Math.min(y2 + 3, Math.max(S2, R2.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (e3) => p2 ? e3.palette.error.dark : void 0, fontStyle: g2 !== f2 ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: true, fullWidth: false, multiline: false, readOnly: i2, spellCheck: false, placeholder: r2, onFocus: (e3) => {
|
|
2147
2144
|
m2(true), e3.target?.select();
|
|
2148
2145
|
}, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: v2 }, onBlur: () => {
|
|
2149
2146
|
m2(false), p2 ? h2(f2) : (g2 !== f2 && (l2?.(g2), g2 && T2.current?.onAccept?.(g2, "blur")), T2.current = null);
|
|
@@ -2156,15 +2153,15 @@ const Fa = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:h
|
|
|
2156
2153
|
}, 0)), T2.current = null, e3.stopPropagation(), e3.preventDefault());
|
|
2157
2154
|
}, value: g2 }), z(J, { ref: b2, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: g2 !== f2 ? "italic" : void 0, fontFamily: (e3) => e3.typography.fontFamily, letterSpacing: "0.00938em" }, children: g2 || r2 })] }) }) });
|
|
2158
2155
|
}));
|
|
2159
|
-
|
|
2160
|
-
const
|
|
2161
|
-
const { title: o2, commands: n2, className: a2, ...r2 } = e2, l2 =
|
|
2156
|
+
Fa.displayName = "WorkbookTitle";
|
|
2157
|
+
const Na = $(O((e2, t2) => {
|
|
2158
|
+
const { title: o2, commands: n2, className: a2, ...r2 } = e2, l2 = St(), [i2, s2] = U(false), [d2, c2] = U(false), m2 = q(null), [p2, u2] = Z((e3) => e3 + 1, 0), [g2, { width: h2 }] = jt(), f2 = pt(n2, ["editTable"])[0].context(), x2 = f2.table(), [b2, y2] = U(() => x2 ? f2.getNames().getRanges(x2.getRange()) : null), S2 = V(() => x2?.getName() ?? "", [x2]);
|
|
2162
2159
|
w(f2.table(), { onAnchorCoordsChange(e3) {
|
|
2163
2160
|
y2(f2.getNames().getRanges(e3.getRange()));
|
|
2164
2161
|
}, onProtectedChange(e3) {
|
|
2165
2162
|
u2();
|
|
2166
2163
|
} });
|
|
2167
|
-
const
|
|
2164
|
+
const k2 = gt((e3) => {
|
|
2168
2165
|
f2?.table().setName(e3);
|
|
2169
2166
|
}, [f2]), C2 = gt((e3) => {
|
|
2170
2167
|
f2?.table().resize(e3.at(0));
|
|
@@ -2172,13 +2169,13 @@ const Ba = $(O((e2, t2) => {
|
|
|
2172
2169
|
let v2 = null;
|
|
2173
2170
|
return f2.table() || (v2 = z(ee, { component: "div", style: { top: "0", left: "0", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyItems: "center", justifyContent: "center" }, children: "No table selected" })), z(ue, { square: true, onFocus: () => s2(true), onBlur: (e3) => {
|
|
2174
2171
|
m2?.current?.contains(e3.relatedTarget) || s2(false);
|
|
2175
|
-
}, ref: Ut([m2, g2, t2]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (e3) => e3.spacing(1.5), paddingRight: (e3) => e3.spacing(1.5), paddingTop: (e3) => e3.spacing(1.5), paddingBottom: (e3) => e3.spacing(1.5), boxSizing: "border-box" }, className: mt("sxl-table-details-panel", a2, { "sxl-has-focus": i2 }), ...r2, children: v2 || L(J, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: f2.table() ? 1 : 0 }, children: [z(J, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (e3) => e3.spacing(2), paddingLeft: (e3) => e3.spacing(2), paddingRight: (e3) => e3.spacing(2) }, children: L(J, { className: pn, children: [z(gn, { formName: "name", defaultInput:
|
|
2172
|
+
}, ref: Ut([m2, g2, t2]), sx: { display: "flex", flexDirection: "column", flex: "1 1 auto", width: "100%", height: "100%", overflow: "auto", paddingLeft: (e3) => e3.spacing(1.5), paddingRight: (e3) => e3.spacing(1.5), paddingTop: (e3) => e3.spacing(1.5), paddingBottom: (e3) => e3.spacing(1.5), boxSizing: "border-box" }, className: mt("sxl-table-details-panel", a2, { "sxl-has-focus": i2 }), ...r2, children: v2 || L(J, { sx: { display: "flex", flex: "1 1 auto", flexDirection: "column", transition: "opacity 60ms", opacity: f2.table() ? 1 : 0 }, children: [z(J, { sx: { containerType: "inline-size", display: "flex", flexDirection: "column", maxWidth: "100%", boxSizing: "border-box", paddingTop: (e3) => e3.spacing(2), paddingLeft: (e3) => e3.spacing(2), paddingRight: (e3) => e3.spacing(2) }, children: L(J, { className: pn, children: [z(gn, { formName: "name", defaultInput: S2, value: x2?.getName() ?? "No table", onChangeInput: k2, onValidate: (e3) => {
|
|
2176
2173
|
x2 && x2.getName().toLowerCase() === e3.toLowerCase() || f2?.getNames().validateName(e3);
|
|
2177
2174
|
}, disabled: x2?.isProtected() ?? true, onFocus: (e3) => {
|
|
2178
2175
|
d2 || e3.target?.select(), c2(true);
|
|
2179
2176
|
} }), z(fn, { formName: "range", value: b2, onChangeInput: C2, resolvedAddress: f2.getNames().getRanges.bind(f2.getNames()), disabled: x2?.isProtected() ?? true, onFocus: (e3) => {
|
|
2180
2177
|
d2 || e3.target?.select(), c2(true);
|
|
2181
|
-
} })] }) }), L(J, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1) }, children: [z(Te, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(mn, { disabled: x2?.isProtected(), styleOptions: x2?.getStyleOptions() ?? null, onStyleOptionsChange: (e3) => {
|
|
2178
|
+
} })] }) }), L(J, { sx: { minHeight: "10px", flex: "1 1 100%", display: "flex", flexDirection: "column", containerType: "inline-size", gap: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1) }, children: [z(Te, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(J, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", justifyContent: "start", flexDirection: "column", marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: L("div", { style: { display: "flex", alignItems: "start", gap: "2px" }, children: [z(rn, { table: x2, styles: f2.styles(), bodyStyle: f2.bodyStyle(), cellHeight: 30, isLive: true }), z(Ia, { command: n2.getCommand("formatTableStyle"), commands: n2, disabledQuickKey: true })] }) }), z(Te, { orientation: "horizontal", sx: { marginTop: (e3) => e3.spacing(1.5), marginBottom: (e3) => e3.spacing(0.75) } }), z(mn, { disabled: x2?.isProtected(), styleOptions: x2?.getStyleOptions() ?? null, onStyleOptionsChange: (e3) => {
|
|
2182
2179
|
x2.updateStyleOptions(e3);
|
|
2183
2180
|
}, showHeaderRow: x2?.getShowHeaders(), onShowHeaderRowChange: (e3) => {
|
|
2184
2181
|
try {
|
|
@@ -2198,13 +2195,13 @@ const Ba = $(O((e2, t2) => {
|
|
|
2198
2195
|
} catch (e4) {
|
|
2199
2196
|
l2.showError(e4);
|
|
2200
2197
|
}
|
|
2201
|
-
} }), z(Te, { orientation: "horizontal"
|
|
2202
|
-
})),
|
|
2198
|
+
} }), z(Te, { orientation: "horizontal" }), L(J, { className: un, children: [z(ve, { variant: ut.Menuitem, command: n2.getCommand("convertTableToRange"), commandState: x2 }), z(ve, { variant: ut.Menuitem, commandState: x2, command: n2.getCommand("deleteTable") })] })] })] }) });
|
|
2199
|
+
})), Ba = (e2, t2) => {
|
|
2203
2200
|
const { model: o2, commands: n2, entryKey: a2, frame: r2, ...l2 } = e2;
|
|
2204
|
-
return z(
|
|
2205
|
-
},
|
|
2206
|
-
Rt.register("plugin-table", { icons: {} }), v.registerTaskPane({ key: "tableDetails", getTitle: () => "Table Details", getIcon: () => "Table", renderTaskPane:
|
|
2207
|
-
},
|
|
2201
|
+
return z(Na, { ref: t2, commands: n2, ...l2 });
|
|
2202
|
+
}, Ea = () => {
|
|
2203
|
+
Rt.register("plugin-table", { icons: {} }), v.registerTaskPane({ key: "tableDetails", getTitle: () => "Table Details", getIcon: () => "Table", renderTaskPane: Ba }, true);
|
|
2204
|
+
}, Aa = $((e2) => {
|
|
2208
2205
|
const { table: t2, tableStyle: o2, selectedTableStyleName: n2, onSelectTableStyleName: a2, styles: r2, hasContextMenu: l2 = true, bodyStyle: i2, parentFloat: s2, commands: d2, disabled: c2, commandHook: m2, useCanvasPreview: p2 = true, canvas: u2, ...g2 } = e2, h2 = K((e3) => {
|
|
2209
2206
|
const t3 = { variant: ut.Menuitem, commandHook: m2, context: "table" }, n3 = L(H, { children: [z(ve, { ...t3, command: d2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: c2 }), z(ve, { ...t3, style: { fontWeight: 550 }, command: d2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: c2 }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: d2.getCommand("setDefaultTableStyle"), commandState: o2.getName(), disabled: c2 }), z(Te, { orientation: "horizontal" }), z(ve, { ...t3, command: d2.getCommand("deleteTableStyle"), commandState: o2?.getName(), disabled: c2 || !o2 || o2.isBuiltIn() })] });
|
|
2210
2207
|
return Re({ ...e3, children: z(J, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
|
|
@@ -2216,27 +2213,27 @@ const Ba = $(O((e2, t2) => {
|
|
|
2216
2213
|
a2?.(o2?.getName());
|
|
2217
2214
|
}, ...g2, children: x2 }, o2.getName());
|
|
2218
2215
|
return l2 && (b2 = z(Ge, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: b2 })), b2;
|
|
2219
|
-
}),
|
|
2220
|
-
const { commands: o2, command: n2, commandHook: a2, selectedTable: r2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, disabledQuickKey: d2 = false, usePreviewIcon:
|
|
2216
|
+
}), Ia = $(O((e2, t2) => {
|
|
2217
|
+
const { commands: o2, command: n2, commandHook: a2, selectedTable: r2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, disabledQuickKey: d2 = false, usePreviewIcon: c2 = false, ...p2 } = e2;
|
|
2221
2218
|
bt(n2);
|
|
2222
2219
|
const u2 = n2?.context(), g2 = u2?.styles, h2 = r2 ?? u2?.table?.();
|
|
2223
2220
|
let f2 = "insertTable";
|
|
2224
2221
|
h2 && (f2 = "editTable");
|
|
2225
2222
|
const x2 = V(() => ((e3, t3) => {
|
|
2226
2223
|
const o3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
|
|
2227
|
-
return new
|
|
2224
|
+
return new m({ initialAnchor: o3, styles: t3, json: { name: "PreviewTable", ref: o3, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: e3 } });
|
|
2228
2225
|
})(h2?.getStyleOptions(), g2?.()), [g2?.().getDefaultTableStyle(), h2?.getStyleOptions()]), b2 = h2 ?? x2, [y2, w2] = U(b2);
|
|
2229
2226
|
j(() => {
|
|
2230
2227
|
w2(b2);
|
|
2231
2228
|
}, [b2]);
|
|
2232
|
-
const
|
|
2229
|
+
const S2 = s2 ?? u2?.bodyStyle(), k2 = gt((e3) => {
|
|
2233
2230
|
l2?.(e3), n2?.execute({ name: e3 }, a2);
|
|
2234
2231
|
}, [n2, l2, a2]), C2 = q(null), v2 = K((e3, t3) => {
|
|
2235
|
-
const o3 = { onSelectTableStyleName:
|
|
2232
|
+
const o3 = { onSelectTableStyleName: k2, styles: g2(), parentFloat: e3.floatReference };
|
|
2236
2233
|
C2.current || (C2.current = document.createElement("canvas"));
|
|
2237
2234
|
const n3 = (e4) => {
|
|
2238
2235
|
const n4 = g2().getTableStyle(e4);
|
|
2239
|
-
return n4 ? z(
|
|
2236
|
+
return n4 ? z(Aa, { table: y2, tableStyle: n4, selectedTableStyleName: y2.getStyleOptions().name, bodyStyle: u2.bodyStyle(), commands: t3, commandHook: a2, canvas: C2.current, ...o3 }, e4) : null;
|
|
2240
2237
|
}, r3 = (e4, t4, o4 = true) => {
|
|
2241
2238
|
const a3 = [];
|
|
2242
2239
|
for (let e5 = 0; e5 < t4.length; e5++) {
|
|
@@ -2249,24 +2246,24 @@ const Ba = $(O((e2, t2) => {
|
|
|
2249
2246
|
for (let e4 = 0; e4 < s3.length; e4++) s3[e4].isShownInTableStyles() && d3.push(s3[e4].getName());
|
|
2250
2247
|
l3.push(r3("Custom", d3, false));
|
|
2251
2248
|
}
|
|
2252
|
-
const
|
|
2253
|
-
h2 && !h2.getStyleOptions().name &&
|
|
2254
|
-
for (let e4 = 0; e4 < 21; e4++)
|
|
2255
|
-
l3.push(r3("Light",
|
|
2256
|
-
const
|
|
2257
|
-
for (let e4 = 0; e4 < 28; e4++)
|
|
2258
|
-
l3.push(r3("Medium",
|
|
2249
|
+
const c3 = [];
|
|
2250
|
+
h2 && !h2.getStyleOptions().name && c3.push(null);
|
|
2251
|
+
for (let e4 = 0; e4 < 21; e4++) c3.push("TableStyleLight" + (e4 + 1));
|
|
2252
|
+
l3.push(r3("Light", c3, d3.length > 0));
|
|
2253
|
+
const m2 = [];
|
|
2254
|
+
for (let e4 = 0; e4 < 28; e4++) m2.push("TableStyleMedium" + (e4 + 1));
|
|
2255
|
+
l3.push(r3("Medium", m2));
|
|
2259
2256
|
const p3 = [];
|
|
2260
2257
|
for (let e4 = 0; e4 < 11; e4++) p3.push("TableStyleDark" + (e4 + 1));
|
|
2261
2258
|
l3.push(r3("Dark", p3));
|
|
2262
2259
|
let f3 = null;
|
|
2263
2260
|
return h2 && (f3 = L(H, { children: [z(Te, { orientation: "horizontal" }), z(ve, { variant: ut.Menuitem, command: t3.getCommand("formatTableStyleClearTableStyle"), commandHook: a2, disabled: i2 })] })), L(J, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [z(J, { onContextMenu: () => {
|
|
2264
2261
|
}, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: l3 }), f3] });
|
|
2265
|
-
}, [g2, g2?.().getTheme(),
|
|
2266
|
-
if (!u2 || !
|
|
2267
|
-
}, [y2,
|
|
2268
|
-
return z(
|
|
2269
|
-
})),
|
|
2262
|
+
}, [g2, g2?.().getTheme(), S2, y2]), T2 = i2 || !n2 || n2.disabled(), R2 = V(() => {
|
|
2263
|
+
if (!u2 || !c2) return n2?.icon();
|
|
2264
|
+
}, [y2, S2, T2, n2]);
|
|
2265
|
+
return z(De, { 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
|
+
})), La = $(O((e2, t2) => {
|
|
2270
2267
|
const { command: o2, commandHook: n2, selectedTheme: a2, onSelectTheme: r2, disabled: l2 = false, darkMode: i2, label: s2, icon: d2, variant: c2, ...m2 } = e2;
|
|
2271
2268
|
bt(o2);
|
|
2272
2269
|
const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = gt((e3) => {
|
|
@@ -2277,15 +2274,15 @@ const Ba = $(O((e2, t2) => {
|
|
|
2277
2274
|
return (h2 || t3) && (l3 = z("div", { children: l3 })), z(We, { command: o2, placement: c2 === ut.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...r3, children: l3 });
|
|
2278
2275
|
}, [o2, h2]);
|
|
2279
2276
|
return z(wn, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === ut.Menuitem ? Ne.Menuitem : Ne.Toolbar, createTooltip: x2, disabled: h2, darkMode: g2, ...m2 });
|
|
2280
|
-
})),
|
|
2277
|
+
})), Ha = $(O((e2, t2) => {
|
|
2281
2278
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = pt(o2, ["themeMode"])[0], s2 = gt((e3, t3) => {
|
|
2282
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") })] });
|
|
2283
2280
|
return Re({ ...e3, children: a3 });
|
|
2284
2281
|
}, [r2, i2, n2, a2]), d2 = i2?.state(), c2 = be("(prefers-color-scheme: dark)"), m2 = "dark" === d2 || null === d2 && c2, p2 = null !== i2?.state();
|
|
2285
|
-
return z(
|
|
2282
|
+
return z(De, { 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: () => {
|
|
2286
2283
|
i2?.execute(m2 ? "light" : "dark", n2);
|
|
2287
2284
|
}, selected: p2, ...l2 });
|
|
2288
|
-
})),
|
|
2285
|
+
})), za = $(O((e2, t2) => {
|
|
2289
2286
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, sx: l2, ...i2 } = e2, s2 = K((e3, t3) => {
|
|
2290
2287
|
const o3 = { variant: ut.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
|
|
2291
2288
|
const a4 = n2?.beforeExecute?.(t4, o4);
|
|
@@ -2293,10 +2290,20 @@ const Ba = $(O((e2, t2) => {
|
|
|
2293
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") })] });
|
|
2294
2291
|
return Re({ ...e3, children: a3 });
|
|
2295
2292
|
}, [r2, n2]);
|
|
2296
|
-
return z(
|
|
2293
|
+
return z(De, { 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
|
+
})), Wa = $(O((e2, t2) => {
|
|
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
|
+
let e3 = null, t3 = 0;
|
|
2297
|
+
for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === ut.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
|
|
2298
|
+
return { singleMenuCommand: e3, allDisabled: 0 === t3 };
|
|
2299
|
+
}, [c2]), u2 = K((e3, t3) => {
|
|
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
|
+
return Re({ ...e3, children: a3 });
|
|
2302
|
+
}, [r2, n2, a2]);
|
|
2303
|
+
return m2 ? z(ve, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, ...d2 }) : z(De, { 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 });
|
|
2297
2304
|
})), $a = $(O((e2, t2) => {
|
|
2298
2305
|
const { ...o2 } = e2;
|
|
2299
|
-
return z(
|
|
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." });
|
|
2300
2307
|
}));
|
|
2301
2308
|
$a.displayName = "InsertFunctionSumCommandPopupButton";
|
|
2302
2309
|
const Oa = new Map([{ key: "financial", label: "Financial", icon: "FormulaFinancial" }, { key: "logical", label: "Logical", icon: "FormulaLogical" }, { key: "text", label: "Text", icon: "FormulaText" }, { key: "dateTime", label: "Date & Time", icon: "FormulaDateTime" }, { key: "lookupReference", label: "Lookup & Reference", icon: "FormulaLookupReference" }, { key: "mathTrig", label: "Math & Trig", icon: "FormulaMathTrig" }, { key: "statDist", label: "Statistical", icon: "FormulaStatistical" }, { key: "engineering", label: "Engineering", icon: "FormulaEngineering" }, { key: "information", label: "Information", icon: "FormulaInformation" }, { key: "cube", label: "Cube", icon: "FormulaCube" }, { key: "database", label: "Database", icon: "FormulaDatabase" }, { key: "web", label: "Web", icon: "FormulaWeb" }, { key: "custom", label: "Custom", icon: "FormulaCustom" }].map((e2) => [e2.key, e2])), Va = $((e2) => {
|
|
@@ -2319,7 +2326,7 @@ const Oa = new Map([{ key: "financial", label: "Financial", icon: "FormulaFinanc
|
|
|
2319
2326
|
const r3 = { commandHook: a2, ...e3 }, l3 = z(Ga, { category: n3.label, ...r3, commands: t3 });
|
|
2320
2327
|
return Re({ ...e3, children: l3 });
|
|
2321
2328
|
}, [o2, c2, a2, r2]), p2 = Oa.get(o2);
|
|
2322
|
-
return z(
|
|
2329
|
+
return z(De, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: Oa.get(o2)?.icon ?? "FormulaGroup", ...d2 });
|
|
2323
2330
|
}));
|
|
2324
2331
|
Ka.displayName = "InsertFunctionCommandPopupButton";
|
|
2325
2332
|
const Ga = $(O((e2, t2) => {
|
|
@@ -2341,7 +2348,7 @@ const Ga = $(O((e2, t2) => {
|
|
|
2341
2348
|
return Re({ ...r2, children: z(J, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: m2 > 0 ? z(H, { children: z(J, { sx: { overflow: "auto", flex: "1 1 100%" }, children: p2 }) }) : null }) });
|
|
2342
2349
|
})), Ua = $(O((e2, t2) => {
|
|
2343
2350
|
const { sx: o2, style: n2, className: a2, licenseKey: r2, renderLoadingPanel: l2, ...i2 } = e2;
|
|
2344
|
-
r2 &&
|
|
2351
|
+
r2 && h.setLicenseKey(r2);
|
|
2345
2352
|
const s2 = V(() => {
|
|
2346
2353
|
const e3 = { transitionDelay: "160ms", transparentBackground: true };
|
|
2347
2354
|
return z(J, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? z(Fe, { ...e3 }) });
|
|
@@ -2399,12 +2406,12 @@ const Xa = new qa(), Za = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a39
|
|
|
2399
2406
|
s2(o2);
|
|
2400
2407
|
}, [o2, s2]);
|
|
2401
2408
|
let f2 = p2?.message;
|
|
2402
|
-
return !f2 && G(n2) && (f2 = n2), f2 || "string" != typeof n2 || (f2 = n2), f2 || (f2 = `Unknown Error: ${n2}`), z(no, { ref: t2, className: mt(Za.root, "error-snackbar"), children: L(ye, { className: Za.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [L(we, { className: Za.actionRoot, children: [l2 ? null : a2?.error, z(ee, { variant: "body2", component: "div", className: Za.typography, children: f2 }), z("div", { style: { flex: "1 1 auto" } }), L("div", { className: Za.icons, children: [u2 ? z(te, { "aria-label": "Show more", size: "small", className: mt(Za.expand, { [Za.expandOpen]: c2 }), onClick: g2, children: z(xt, { iconKey: "ExpandMore" }) }) : null, z(te, { size: "small", className: Za.expand, onClick: h2, children: z(xt, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), u2 ? z(
|
|
2409
|
+
return !f2 && G(n2) && (f2 = n2), f2 || "string" != typeof n2 || (f2 = n2), f2 || (f2 = `Unknown Error: ${n2}`), z(no, { ref: t2, className: mt(Za.root, "error-snackbar"), children: L(ye, { className: Za.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [L(we, { className: Za.actionRoot, children: [l2 ? null : a2?.error, z(ee, { variant: "body2", component: "div", className: Za.typography, children: f2 }), z("div", { style: { flex: "1 1 auto" } }), L("div", { className: Za.icons, children: [u2 ? z(te, { "aria-label": "Show more", size: "small", className: mt(Za.expand, { [Za.expandOpen]: c2 }), onClick: g2, children: z(xt, { iconKey: "ExpandMore" }) }) : null, z(te, { size: "small", className: Za.expand, onClick: h2, children: z(xt, { iconKey: "Close", style: { transform: "scale(0.8)" } }) })] })] }), u2 ? z(Se, { in: c2, timeout: "auto", children: z("div", { className: Za.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: z(et, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
|
|
2403
2410
|
}));
|
|
2404
2411
|
Ya.displayName = "ToastError";
|
|
2405
2412
|
const Qa = $(O((e2, t2) => {
|
|
2406
2413
|
const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, i2 = gt((e3) => {
|
|
2407
|
-
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(De, { ...t3, commands: o2, quickCommand: "saveWorkbook", createPopupPanel: (e4) => {
|
|
2408
2415
|
const n3 = { ...t3, parentFloat: e4.floatReference, scope: "saveWorkbook" }, a3 = [];
|
|
2409
2416
|
return Xa.getWriteFormats().forEach((e5) => {
|
|
2410
2417
|
if (e5.isDefault) return;
|
|
@@ -2418,7 +2425,7 @@ const Qa = $(O((e2, t2) => {
|
|
|
2418
2425
|
t4.isDefaultPrevented || e3.closeFloatAll();
|
|
2419
2426
|
} });
|
|
2420
2427
|
}, [r2, o2, n2, a2]), s2 = "File";
|
|
2421
|
-
return z(
|
|
2428
|
+
return z(De, { 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 }) });
|
|
2422
2429
|
}));
|
|
2423
2430
|
Qa.displayName = "StandaloneFileCommandButton";
|
|
2424
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: () => {
|
|
@@ -2427,16 +2434,16 @@ const Ja = z(He, { label: "SheetXL", description: "Visit me at sheetxl.com.", ch
|
|
|
2427
2434
|
const { commands: o2, workbook: n2, logo: a2 = Ja, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = _e(), [c2, { width: m2 }] = jt(), p2 = m2 < 530, u2 = l2 ? z(Qa, { commands: o2, commandHook: { beforeExecute() {
|
|
2428
2435
|
d2?.closeAll();
|
|
2429
2436
|
}, onError(e3, t3, o3) {
|
|
2430
|
-
} } }) : null, g2 = i2 ? z(
|
|
2437
|
+
} } }) : null, g2 = i2 ? z(Ha, { commands: o2, commandHook: { beforeExecute() {
|
|
2431
2438
|
d2?.closeAll();
|
|
2432
2439
|
}, onError(e3, t3, o3) {
|
|
2433
2440
|
} } }) : null, h2 = V(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = q(null);
|
|
2434
|
-
return z(J, { ref: Ut([f2, c2, t2]), ...s2, children:
|
|
2441
|
+
return z(J, { ref: Ut([f2, c2, t2]), ...s2, children: oa({ commands: o2, renderCompact: p2, workbook: n2, selectWrapper: (e3) => L(J, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (e4) => e4.spacing(1), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1) }, children: [L(J, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e4) => e4.spacing(0.5) }, children: [a2, L(J, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e4) => e4.spacing(0.25) }, children: [u2, e3] })] }), z(J, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: r2 }), z(J, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p2 && !g2 ? "0 0 auto" : "1 1 100%" }, children: g2 })] }), selectProps: h2, toolbarsProps: { Home: { sx: {} } } }) });
|
|
2435
2442
|
}));
|
|
2436
2443
|
er.displayName = "StudioToolbar";
|
|
2437
2444
|
const tr = $((e2) => {
|
|
2438
2445
|
const { workbook: t2, setWorkbook: o2, refWorkbookTitle: n2, titleWorkbook: a2, setWorkbookTitle: r2, titlePlaceHolder: l2, children: i2, undoManager: s2, commands: d2, importExportDisabled: c2, themeOptions: m2 } = e2, p2 = ((e3) => {
|
|
2439
|
-
const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, requestWorkbookTitle: l3, themeOptions: i3, undoManager: s3, commands: d3, onExecute: c3 } = e3, m3 =
|
|
2446
|
+
const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, requestWorkbookTitle: l3, themeOptions: i3, undoManager: s3, commands: d3, onExecute: c3 } = e3, m3 = St(), p3 = gt(i3?.onModeChange, [i3?.onModeChange]), u3 = gt(i3?.onEnabledDarkGridChange, [i3?.onEnabledDarkGridChange]), g3 = gt(i3?.onEnabledDarkImagesChange, [i3?.onEnabledDarkImagesChange]), h2 = gt(async (e4 = null, t4 = null) => {
|
|
2440
2447
|
const o4 = [];
|
|
2441
2448
|
let n4, a4 = null, r4 = null;
|
|
2442
2449
|
if ("string" == typeof e4 ? r4 = e4 : a4 = e4, n4 = a4 ? e4 : await _t.openFileDialog(r4 ?? Xa.getAllReadFormatTypeAsString().join(",")), !n4) return null;
|
|
@@ -2455,18 +2462,18 @@ const tr = $((e2) => {
|
|
|
2455
2462
|
const e4 = [];
|
|
2456
2463
|
n3 || (Xa.getWriteFormats().forEach((o4) => {
|
|
2457
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" };
|
|
2458
|
-
n4 && (r4.shortcut = { key: "S", modifiers: [Mt.Ctrl] }, e4.push(new
|
|
2465
|
+
n4 && (r4.shortcut = { key: "S", modifiers: [Mt.Ctrl] }, e4.push(new Pt("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." }, () => {
|
|
2459
2466
|
f2(t3, null, o4).catch((e5) => {
|
|
2460
2467
|
m3.showError(e5);
|
|
2461
2468
|
});
|
|
2462
2469
|
})));
|
|
2463
2470
|
const l5 = o4.key, i4 = n4 ? "saveWorkbook" : `saveWorkbookAs${l5}`;
|
|
2464
|
-
"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 Pt(i4, x2, r4, (e5) => {
|
|
2465
2472
|
f2(t3, e5 ?? a3, o4).catch((e6) => {
|
|
2466
2473
|
m3.showError(e6);
|
|
2467
2474
|
});
|
|
2468
2475
|
}));
|
|
2469
|
-
}), e4.push(new
|
|
2476
|
+
}), e4.push(new Pt("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) => {
|
|
2470
2477
|
const n4 = { date1904: t3.isDate1904(), ...t3.options };
|
|
2471
2478
|
try {
|
|
2472
2479
|
const a4 = await h2(e5, n4);
|
|
@@ -2486,24 +2493,24 @@ const tr = $((e2) => {
|
|
|
2486
2493
|
} catch (e6) {
|
|
2487
2494
|
m3.showError(e6);
|
|
2488
2495
|
}
|
|
2489
|
-
})), e4.push(new
|
|
2496
|
+
})), e4.push(new Pt("openWorkbookFromUrl", x2, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
|
|
2490
2497
|
if (!e5) {
|
|
2491
|
-
const t4 = await m3.
|
|
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"] });
|
|
2492
2499
|
if ("Open" !== t4.option) return;
|
|
2493
2500
|
e5 = t4.input;
|
|
2494
2501
|
}
|
|
2495
2502
|
e5 && console.log("openWorkbookFromUrl", e5);
|
|
2496
2503
|
})));
|
|
2497
2504
|
let l4 = [];
|
|
2498
|
-
return i3 && (l4 = [new
|
|
2499
|
-
}), new
|
|
2500
|
-
}), new
|
|
2505
|
+
return i3 && (l4 = [new Pt("themeMode", x2, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new Pt("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 Pt("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 Pt("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 Dt("help", x2, { label: "Show Help", description: "Provide Help.", icon: "Documentation", shortcut: { key: "F1" } }, () => {
|
|
2506
|
+
}), new Dt("showKeyboardShortcuts", x2, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", icon: "Keyboard", shortcut: { key: "/", modifiers: [Mt.Ctrl] } }, () => {
|
|
2507
|
+
}), new Pt("gotoUrlGithub", x2, { label: "Github", description: "Download examples, explore source code, and leave a star.", icon: "Github" }, () => {
|
|
2501
2508
|
window?.open("https://github.com/sheetxl/sheetxl");
|
|
2502
|
-
}), new
|
|
2509
|
+
}), new Pt("gotoUrlDiscord", x2, { label: "Discord", description: "Join our community on discord.", icon: "Discord" }, () => {
|
|
2503
2510
|
window?.open("https://discord.gg/NTKdwUgK9p");
|
|
2504
|
-
}), new
|
|
2511
|
+
}), new Pt("gotoUrlDocumentation", x2, { label: "Documentation", description: "Read the documentation.", icon: "Documentation" }, () => {
|
|
2505
2512
|
window?.open("https://www.sheetxl.com/docs");
|
|
2506
|
-
}), new
|
|
2513
|
+
}), new Pt("gotoUrlIssue", x2, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request.", icon: "Ticket" }, () => {
|
|
2507
2514
|
window?.open("https://github.com/sheetxl/sheetxl/issues");
|
|
2508
2515
|
})];
|
|
2509
2516
|
}, [t3, a3, m3, n3, i3, d3, s3]), y2 = V(() => {
|
|
@@ -2511,10 +2518,10 @@ const tr = $((e2) => {
|
|
|
2511
2518
|
return e4 = d3 ? d3.createChildGroup(x2, "standaloneWorkbook", false) : new Ft(x2, "standaloneWorkbook"), e4.addCommands(b2, true), e4;
|
|
2512
2519
|
}, [d3, b2]);
|
|
2513
2520
|
Et({ manager: s3, commands: y2 });
|
|
2514
|
-
const w2 = be("(prefers-color-scheme: dark)"), { themeMode:
|
|
2521
|
+
const w2 = be("(prefers-color-scheme: dark)"), { themeMode: S2 } = tt();
|
|
2515
2522
|
j(() => {
|
|
2516
2523
|
if (!i3 || !y2) return;
|
|
2517
|
-
const e4 = "dark" === i3.mode || !i3.mode && "dark" ===
|
|
2524
|
+
const e4 = "dark" === i3.mode || !i3.mode && "dark" === S2;
|
|
2518
2525
|
y2.getCommand("themeMode").update({ state: i3.mode ?? null, label: e4 ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: e4 ? "Dark Mode" : "Light Mode" }, icon: e4 ? "DarkMode" : "LightMode" }).updateCallback(() => {
|
|
2519
2526
|
p3(e4 ? ot.Light : ot.Dark);
|
|
2520
2527
|
}), y2.getCommand("defaultThemeMode").update({ state: !i3.mode, icon: w2 ? "SystemDefaultDarkMode" : "SystemDefaultLightMode" }).updateCallback(() => {
|
|
@@ -2524,11 +2531,11 @@ const tr = $((e2) => {
|
|
|
2524
2531
|
}), y2.getCommand("enableDarkImages").update({ state: i3.enableDarkImages }).updateCallback(() => {
|
|
2525
2532
|
g3(!i3.enableDarkImages);
|
|
2526
2533
|
});
|
|
2527
|
-
}, [
|
|
2528
|
-
const { showModal:
|
|
2534
|
+
}, [S2, i3, b2]);
|
|
2535
|
+
const { showModal: k2 } = nt();
|
|
2529
2536
|
return j(() => {
|
|
2530
2537
|
const e4 = () => new Promise((e5, t4) => {
|
|
2531
|
-
const o4 = W.lazy(() => import("./
|
|
2538
|
+
const o4 = W.lazy(() => import("./C62EF6LSsPD4LAL6.mjs")), n4 = k2(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
|
|
2532
2539
|
n4.hide();
|
|
2533
2540
|
}, slotProps: { transition: { onExited: () => {
|
|
2534
2541
|
e5(true);
|
|
@@ -2541,7 +2548,7 @@ const tr = $((e2) => {
|
|
|
2541
2548
|
t3(e4);
|
|
2542
2549
|
}, { selectAll: true, requestReason: e3 }) : t3(l2);
|
|
2543
2550
|
}), themeOptions: m2, undoManager: s2, onExecute: K(() => {
|
|
2544
|
-
}, []) }), u2 = V(() => z(
|
|
2551
|
+
}, []) }), u2 = V(() => z(za, { commands: p2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [p2]), g2 = { commands: p2 };
|
|
2545
2552
|
return t2 && (g2.statusBarProps = { childrenEnd: u2 }), i2 ? W.cloneElement(i2, g2) : null;
|
|
2546
2553
|
});
|
|
2547
2554
|
tr.displayName = "CommandsWrapper";
|
|
@@ -2559,7 +2566,7 @@ const or = $((e2) => {
|
|
|
2559
2566
|
const e5 = new Set(u2.current);
|
|
2560
2567
|
e5.add(t4.onceKey), u2.current = e5;
|
|
2561
2568
|
}
|
|
2562
|
-
const o4 = { variant: t4?.type ??
|
|
2569
|
+
const o4 = { variant: t4?.type ?? kt.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t4?.preventDuplicate, persist: t4?.persist ?? t4?.type === kt.Error, action: (e5) => z(te, { onClick: () => a2(e5), children: z(xt, { iconKey: "Cancel" }) }) };
|
|
2563
2570
|
t4?.enqueueProps && Object.assign(o4, t4.enqueueProps), e4 || console.log("message is 'null'", t4), n2(e4 ?? "Alert", o4);
|
|
2564
2571
|
}, t3 = { showMessage: e3, showBusy: (e4, t4) => {
|
|
2565
2572
|
let o4 = null;
|
|
@@ -2571,14 +2578,15 @@ const or = $((e2) => {
|
|
|
2571
2578
|
a3.set(n3, o4);
|
|
2572
2579
|
return { ...t5, label: e4, starting: a3 };
|
|
2573
2580
|
}), n3;
|
|
2574
|
-
}, showWindow: (e4, t4
|
|
2575
|
-
const
|
|
2576
|
-
|
|
2581
|
+
}, showWindow: (e4, t4) => {
|
|
2582
|
+
const o4 = t4;
|
|
2583
|
+
t4 = { ...t4, onKeyDown: (e5) => {
|
|
2584
|
+
e5.isDefaultPrevented() || e5.isPropagationStopped() || o4?.onKeyDown?.(e5);
|
|
2577
2585
|
} };
|
|
2578
|
-
return c2(e4, { sort: () => import("./
|
|
2579
|
-
}, showOptions: m2,
|
|
2580
|
-
let o4, n3 =
|
|
2581
|
-
"string" == typeof t4 ? a3 = t4 : t4 instanceof Error && (o4 = t4, t4.message && (a3 = t4.message)), t4 instanceof Yt && (n3 =
|
|
2586
|
+
return c2(e4, { sort: () => import("./CeJ5myvgfYOUSKGq.mjs"), numberFormat: () => import("./CREPL1yvIjmYpU-r.mjs"), hyperlink: () => import("./CM8Jkahi0myGVt_v.mjs"), comments: () => import("./xCdMLxN5xcpczFUI.mjs"), find: () => import("./C21w0yQGlygcFqHI.mjs"), tableNew: () => import("./4D3fLVzYqPTas9nR.mjs"), namedDetails: () => import("./D9PLpUGQqMmk1V9n.mjs"), resizeHeader: () => import("./B6-CF_32FCaDZJDm.mjs") }[e4], t4);
|
|
2587
|
+
}, showOptions: m2, showInput: p2, showError: (t4) => {
|
|
2588
|
+
let o4, n3 = kt.Error, a3 = "Unknown Error";
|
|
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 } });
|
|
2582
2590
|
} }, o3 = new At();
|
|
2583
2591
|
return o3.setOverrides(t3), o3;
|
|
2584
2592
|
}, []);
|
|
@@ -2620,7 +2628,7 @@ const nr = $(O((e2, t2) => {
|
|
|
2620
2628
|
const { commands: o2, model: n2, ...a2 } = e2, r2 = zt(), l2 = `solid ${Wt(r2.palette.divider, 0.2)} 1px`, i2 = `${r2.shape.borderRadius ?? 4}px`, s2 = `${r2.spacing?.(0.5) ?? 4}px`, d2 = q(null);
|
|
2621
2629
|
return z(A, { model: n2, ref: t2, frameProps: { style: { border: l2, borderRadius: i2, marginBottom: s2 } }, alwaysShowStrip: true, renderTaskPanelTitle: (e3, t3) => {
|
|
2622
2630
|
const { title: o3, icon: n3, onClose: a3, readOnly: r3, focused: l3, ...i3 } = e3;
|
|
2623
|
-
return z(
|
|
2631
|
+
return z(ke, { className: mt({ "Mui-selected": l3 }), sx: { display: "flex", flex: "1 1 %0", color: (e4) => e4.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e4) => `${e4.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e4) => e4.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e4) => Wt(e4.palette.action.hover, 0.03), borderBottom: (e4) => `solid ${Wt(e4.palette.divider, 0.2)} 1px` }, ...i3, children: L(J, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e4) => e4.spacing(0.25), marginBottom: (e4) => e4.spacing(0.25), marginLeft: (e4) => e4.spacing(1), marginRight: (e4) => e4.spacing(1) }, children: [z(J, { sx: { flex: "1 1 100%", paddingLeft: (e4) => e4.spacing(1) }, children: o3 }), z(He, { label: "Close", children: z(te, { "aria-label": "close", sx: { color: (e4) => e4.palette.text.icon ?? e4.palette.action.active }, touchRippleRef: d2, onPointerDown: (e4) => {
|
|
2624
2632
|
d2.current?.start(e4, { center: false }), e4.stopPropagation(), e4.preventDefault();
|
|
2625
2633
|
}, onPointerUp: () => {
|
|
2626
2634
|
a3();
|
|
@@ -2635,9 +2643,9 @@ const nr = $(O((e2, t2) => {
|
|
|
2635
2643
|
let p2 = null, u2 = 4, g2 = 13;
|
|
2636
2644
|
return c2 ? p2 = "m 3.6261898,11.36243 c 0,0.88365 -0.71627,1.59991 -1.59991,1.59991 -0.8836498,0 -1.60004965,-0.71626 -1.60004965,-1.59991 0,-0.88365 0.71639985,-1.6000508 1.60004965,-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.8836498,0 -1.60004965,-0.7164 -1.60004965,-1.60004 0,-0.88365 0.71639985,-1.60005 1.60004965,-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 C 1.14263,3.19996 0.42623015,2.48356 0.42623015,1.59991 0.42623015,0.71626 1.14263,0 2.0262798,0 c 0.88364,0 1.59991,0.71626 1.59991,1.59991" : (p2 = "M 1.59991,3.62619 C 0.71626,3.62619 0,2.90992 0,2.02628 0,1.1426301 0.71626,0.42623015 1.59991,0.42623015 c 0.88365,0 1.6000508,0.71639995 1.6000508,1.60004985 0,0.88364 -0.7164008,1.59991 -1.6000508,1.59991 m 4.881294,0 c -0.88364,0 -1.60004,-0.71627 -1.60004,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60004,-1.60004985 0.88365,0 1.60005,0.71639995 1.60005,1.60004985 0,0.88364 -0.7164,1.59991 -1.60005,1.59991 m 4.881226,0 c -0.88365,0 -1.60005,-0.71627 -1.60005,-1.59991 0,-0.8836499 0.7164,-1.60004985 1.60005,-1.60004985 0.88365,0 1.59991,0.71639995 1.59991,1.60004985 0,0.88364 -0.71626,1.59991 -1.59991,1.59991", u2 = 13, g2 = 4), z(vt, { ref: Ut([m2, s2, t2]), className: a2, style: r2 ? { ...lr, ...r2 } : lr, ...l2, fixedPane: "after", position: "40%", minAfter: c2 ? "280px" : "120px", splitDirection: c2 ? "row" : "column", resizerProps: { className: "styled-resizer", style: { minWidth: c2 ? "6px" : void 0, minHeight: c2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${u2}' height='${g2}' viewBox='0 0 ${u2} ${g2}' version='1.1' fill='${i2.palette.text.icon ?? i2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${p2}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: c2 ? "left center" : "top center" } }, elementBefore: o2, paneBeforeProps: { style: { flexDirection: "column", marginRight: n2 ? void 0 : "6px" } }, elementAfter: n2, paneAfterProps: { style: { marginLeft: c2 ? "0px" : "4px", marginRight: c2 ? "8px" : "4px" } } });
|
|
2637
2645
|
}));
|
|
2638
|
-
ir.displayName = "StudioSplitPane",
|
|
2646
|
+
ir.displayName = "StudioSplitPane", Ea(), Rt.register("plugin-scripts", { icons: {} }), v.registerTaskPane({ key: "scriptEditor", getTitle: () => "Script (Typescript)", getIcon: () => "ScriptRun", renderTaskPane: Xn }, true);
|
|
2639
2647
|
const sr = $(O((e2, t2) => {
|
|
2640
|
-
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:
|
|
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]), D2 = gt(w2 ?? S2?.onTitleChange, [w2 ?? S2?.onTitleChange]), P2 = 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);
|
|
2641
2649
|
j(() => {
|
|
2642
2650
|
H2(i2 ?? new Qt());
|
|
2643
2651
|
}, [i2]);
|
|
@@ -2645,11 +2653,11 @@ const sr = $(O((e2, t2) => {
|
|
|
2645
2653
|
Q(() => {
|
|
2646
2654
|
if (!c2 || 0 === Object.keys(c2).length && !_t.isPromiseLike(c2)) {
|
|
2647
2655
|
const e3 = { theme: _2.getDefaultTheme(), ...m2 };
|
|
2648
|
-
G2(new
|
|
2656
|
+
G2(new f(e3));
|
|
2649
2657
|
} else G2(c2);
|
|
2650
2658
|
}, [c2]), Q(() => {
|
|
2651
2659
|
if (!O2) return;
|
|
2652
|
-
if (O2 instanceof
|
|
2660
|
+
if (O2 instanceof f) return $2({ workbook: O2 }), void (c2 !== O2 && T2?.(O2));
|
|
2653
2661
|
(async () => {
|
|
2654
2662
|
try {
|
|
2655
2663
|
let e3, t3 = await Promise.resolve(O2);
|
|
@@ -2673,11 +2681,11 @@ const sr = $(O((e2, t2) => {
|
|
|
2673
2681
|
}, [A2, W2, X2]);
|
|
2674
2682
|
const Y2 = gt((e3) => {
|
|
2675
2683
|
e3 ? A2.setRepeatableOperation({ description: e3.label(), repeat: async () => e3.execute() }) : A2.setRepeatableOperation(null);
|
|
2676
|
-
}, [A2]), [ee2, te2] = U(y2 ??
|
|
2684
|
+
}, [A2]), [ee2, te2] = U(y2 ?? S2?.title ?? "");
|
|
2677
2685
|
j(() => {
|
|
2678
|
-
te2(y2 ??
|
|
2679
|
-
}, [y2 ??
|
|
2680
|
-
|
|
2686
|
+
te2(y2 ?? S2?.title ?? "");
|
|
2687
|
+
}, [y2 ?? S2?.title]), j(() => {
|
|
2688
|
+
D2?.(ee2);
|
|
2681
2689
|
}, [ee2]);
|
|
2682
2690
|
const [oe2, ne2] = U(null), ae2 = V(() => {
|
|
2683
2691
|
const e3 = () => ({ contains: (e4) => true, focus() {
|
|
@@ -2691,10 +2699,10 @@ const sr = $(O((e2, t2) => {
|
|
|
2691
2699
|
}, [X2]);
|
|
2692
2700
|
const ie2 = q(null), se2 = K((e3) => {
|
|
2693
2701
|
let t3 = null;
|
|
2694
|
-
return
|
|
2702
|
+
return S2?.hidden || (t3 = z(Fa, { ...S2, style: { maxWidth: "100%", ...S2?.style }, workbook: v2.current, ref: ie2, title: ee2, placeHolder: P2, onTitleChange: (e4) => {
|
|
2695
2703
|
te2(e4);
|
|
2696
2704
|
} })), z(er, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(B2?.onEnabledDarkGridChange || B2?.onEnabledDarkImagesChange || B2?.onModeChange) });
|
|
2697
|
-
}, [u2, ee2,
|
|
2705
|
+
}, [u2, ee2, S2, B2, g2, ae2]);
|
|
2698
2706
|
j(() => {
|
|
2699
2707
|
const e3 = (e4) => e4.preventDefault();
|
|
2700
2708
|
return v2.current?.addEventListener("wheel", e3, { passive: false }), () => {
|
|
@@ -2703,30 +2711,30 @@ const sr = $(O((e2, t2) => {
|
|
|
2703
2711
|
}, []);
|
|
2704
2712
|
const de2 = V(() => {
|
|
2705
2713
|
const e3 = { transparentBackground: true };
|
|
2706
|
-
return z(J, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...a2 }, children:
|
|
2707
|
-
}, [n2, a2,
|
|
2714
|
+
return z(J, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...a2 }, children: k2?.(e3) ?? z(Fe, { ...e3 }) });
|
|
2715
|
+
}, [n2, a2, k2]), ce2 = K(({ error: e3 }) => (l2?.(e3), z(s2, { sx: n2, style: a2, error: e3 ?? "Unable to display empty workbook." })), [n2, a2, l2]), me2 = V(() => ({ ...n2, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (e3) => e3.palette.getContrastText(e3.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (e3) => e3.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [n2]), [pe2, ue2] = U(null), ge2 = K((e3, t3) => z(rr, { ref: t3, model: O2, commands: ae2, ...e3 }), [ae2, O2]), he2 = K((e3) => z(ir, { mainElement: e3, sidebarElement: pe2 }), [pe2]), fe2 = Ut([v2, t2]), xe2 = V(() => {
|
|
2708
2716
|
if (!W2) return de2;
|
|
2709
2717
|
if (W2.error || !W2.workbook) return ce2({ error: W2.error });
|
|
2710
2718
|
let e3 = null, t3 = null, n3 = false;
|
|
2711
|
-
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(Pa, { sx: me2, style: a2, tabIndex: 0, autoFocus: true, workbook: W2.workbook, ref: fe2, renderToolbar: se2, onElementLoad: le2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
|
|
2712
2720
|
d2?.(e4);
|
|
2713
|
-
}, renderLoadingPanel:
|
|
2714
|
-
}, [W2, ee2, A2, de2,
|
|
2721
|
+
}, renderLoadingPanel: k2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, mainWrapper: he2, className: mt(o2), onContextMenu: (e4) => e4.preventDefault(), ...C2 }, "WorkbookElement");
|
|
2722
|
+
}, [W2, ee2, A2, de2, k2, B2, C2, se2, me2, he2]);
|
|
2715
2723
|
let be2 = z(ao, { maxSnack: 3, domRoot: oe2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
|
|
2716
2724
|
v2.current?.focus();
|
|
2717
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) => {
|
|
2718
2726
|
ue2(e3);
|
|
2719
|
-
}, 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: P2, titleWorkbook: ee2, setWorkbookTitle: te2, refWorkbookTitle: ie2, commands: ae2, undoManager: A2, themeOptions: B2, children: xe2 }) }) }) }) }) }) });
|
|
2720
2728
|
return B2 && (be2 = L(Ot, { theme: E2 ? B2.dark : B2.light, children: [B2.cssBaseline ? z(Ce, {}) : null, be2] })), be2;
|
|
2721
2729
|
}));
|
|
2722
2730
|
sr.displayName = "EagerStudio";
|
|
2723
2731
|
const dr = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: sr, default: sr }, Symbol.toStringTag, { value: "Module" }));
|
|
2724
2732
|
export {
|
|
2725
|
-
|
|
2733
|
+
Ha as AppearanceCommandButton,
|
|
2726
2734
|
mo as AutoColorPosition,
|
|
2727
2735
|
Mo as BorderCommandButton,
|
|
2728
|
-
|
|
2729
|
-
|
|
2736
|
+
Po as BorderPopupButton,
|
|
2737
|
+
Do as BorderStylePopupButton,
|
|
2730
2738
|
ho as C,
|
|
2731
2739
|
Wo as CellsDeleteCommandButton,
|
|
2732
2740
|
$o as CellsFormatCommandButton,
|
|
@@ -2735,26 +2743,26 @@ export {
|
|
|
2735
2743
|
xo as ColorButton,
|
|
2736
2744
|
bo as ColorButtonList,
|
|
2737
2745
|
Oo as ColorCommandButton,
|
|
2738
|
-
|
|
2746
|
+
ko as ColorPanel,
|
|
2739
2747
|
co as ColorPanelType,
|
|
2740
2748
|
vo as ColorPopupButton,
|
|
2741
2749
|
DefaultTaskPaneRegistry,
|
|
2742
|
-
|
|
2750
|
+
La as DocThemeCommandButton,
|
|
2743
2751
|
sr as EagerStudio,
|
|
2744
2752
|
Ho as FillCommandButton,
|
|
2745
2753
|
Rn as FilterColumnMenu,
|
|
2746
2754
|
Go as FilterCommandButton,
|
|
2747
|
-
|
|
2755
|
+
Dn as Filters,
|
|
2748
2756
|
Bo as FindCommandButton,
|
|
2749
2757
|
qo as FontFamilyCommandButton,
|
|
2750
2758
|
Eo as FontSizeCommandButton,
|
|
2751
2759
|
Tn as FormulaBar,
|
|
2752
2760
|
No as FreezeCommandButton,
|
|
2753
|
-
|
|
2761
|
+
za as HelpCommandButton,
|
|
2754
2762
|
ro as HorizontalAlignCommandButton,
|
|
2755
2763
|
Ka as InsertFunctionCommandPopupButton,
|
|
2756
2764
|
$a as InsertFunctionSumCommandPopupButton,
|
|
2757
|
-
|
|
2765
|
+
Wa as InsertImageCommandButton,
|
|
2758
2766
|
LicenseManager,
|
|
2759
2767
|
Fo as MergeCommandButton,
|
|
2760
2768
|
Cn as NamedCollectionEditor,
|
|
@@ -2762,19 +2770,19 @@ export {
|
|
|
2762
2770
|
Io as NumberFormatCommandButton,
|
|
2763
2771
|
Yo as PasteCommandButton,
|
|
2764
2772
|
on as PresetCellStylesCommandButton,
|
|
2765
|
-
|
|
2773
|
+
Ia as PresetTableStylesCommandButton,
|
|
2766
2774
|
fn as RangeInput,
|
|
2767
|
-
|
|
2775
|
+
Pn as SheetTab,
|
|
2768
2776
|
Mn as SheetTabMenu,
|
|
2769
|
-
|
|
2777
|
+
Sn as SheetZoomScale,
|
|
2770
2778
|
Fn as SheetsAllMenu,
|
|
2771
2779
|
Ko as SortFilterCommandButton,
|
|
2772
|
-
|
|
2780
|
+
kn as StatusBar,
|
|
2773
2781
|
Ua as Studio,
|
|
2774
2782
|
Ro as StyledStrokeIcon,
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2783
|
+
Na as TableDetailsPanel,
|
|
2784
|
+
Ba as TableDetailsTaskPane,
|
|
2785
|
+
Ea as TablePlugin,
|
|
2778
2786
|
sn as TableStyleCanvasPreview,
|
|
2779
2787
|
mn as TableStyleOptionsPanel,
|
|
2780
2788
|
rn as TableStylePreview,
|
|
@@ -2789,19 +2797,19 @@ export {
|
|
|
2789
2797
|
lo as VerticalAlignCommandButton,
|
|
2790
2798
|
Vo as ViewGridLinesCommandButton,
|
|
2791
2799
|
Qo as ViewHeadingsCommandButton,
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2800
|
+
fa as WalkingCopyCommandButton,
|
|
2801
|
+
ha as WorkbookContextMenu,
|
|
2802
|
+
Pa as WorkbookElement,
|
|
2795
2803
|
Xa as WorkbookIO,
|
|
2796
|
-
|
|
2797
|
-
|
|
2804
|
+
ga as WorkbookStrip,
|
|
2805
|
+
Fa as WorkbookTitle,
|
|
2798
2806
|
Jo as WorkbookViewCommandButton,
|
|
2799
2807
|
qa as _WorkbookIO,
|
|
2800
2808
|
Hn as createGridStyleFromMUITheme,
|
|
2801
2809
|
Ua as default,
|
|
2802
|
-
|
|
2810
|
+
sa as defaultNewWorkbook,
|
|
2803
2811
|
In as setPrintExamplesOnLoad,
|
|
2804
2812
|
useModelListener,
|
|
2805
2813
|
useRangeListener,
|
|
2806
|
-
|
|
2814
|
+
ia as useWorkbookCommands
|
|
2807
2815
|
};
|