@sheetxl/studio-mui 0.6.12 → 0.6.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/{X_QtYHYH9ht4XZW0.cjs → BQxxS6muGRFYXvUF.cjs} +2 -2
- package/browser/cjs/{BXt8uMQ52Aco51CA.cjs → BUMcGVazpDM6KEn4.cjs} +1 -1
- package/browser/cjs/{DaiVK3Jma7IA404G.cjs → Bp2eLYFNvWgdHaEK.cjs} +1 -1
- package/browser/cjs/{Bv-QM2xw1182mYqk.cjs → BqAxyBkxHI9YvYoI.cjs} +2 -2
- package/browser/cjs/{Db03YcMQ9maTwJ9D.cjs → CKxpf8fGr0tYMT54.cjs} +5 -5
- package/browser/cjs/{C462q3C-1i37-WcU.cjs → CrP1SeXEjD5z2kO9.cjs} +1 -1
- package/browser/cjs/{DcNlcX3qO6sqvxQf.cjs → DUL7ill4zxukej0l.cjs} +2 -2
- package/browser/cjs/{BlpnGAbo58UgDQza.cjs → DUnNpuXAjXuBii_N.cjs} +2 -2
- package/browser/cjs/{BDR5nFOWX7NnyMoM.cjs → DXAJnkt5-kE3qsyF.cjs} +1 -1
- package/browser/cjs/{DEcDM8irq4LIav7r.cjs → M_HfZgTRPMWR_Dk-.cjs} +2 -2
- package/browser/cjs/{nHyclCVg5asgz1Py.cjs → Ybt7Mp-bRpT9Mk6H.cjs} +1 -1
- package/browser/cjs/index.cjs +2 -2
- package/browser/cjs/{Dfn2Lw7IOO4phi45.cjs → iuoocQ-M6lashFtX.cjs} +3 -3
- package/browser/esm/{PcyaGm6Ks_ug6tAh.mjs → B199XiibGphLZrXQ.mjs} +2 -2
- package/browser/esm/{On696rEx9BC35NND.mjs → BGH4JI5_Y2myilnk.mjs} +1 -1
- package/browser/esm/{CPpr3_WRDtllZc1x.mjs → BI4wh920NPkWujDP.mjs} +2 -2
- package/browser/esm/{B3VQ5Lla2rVfNvoU.mjs → BTfgoZRgUPUwvb0c.mjs} +2 -2
- package/browser/esm/{1aZt8s1N3IwPtg0I.mjs → BbLyHyLMgPVrNHV7.mjs} +2 -2
- package/browser/esm/{DIm7aUgG-G4Cjytb.mjs → Bze6aQavB3PhqIdO.mjs} +1 -1
- package/browser/esm/{RYweFvFtXKvPatSu.mjs → C0t3tTXJfCa-OSQR.mjs} +2 -2
- package/browser/esm/{HhIqNSmKsD_3vRst.mjs → CFjfD15EsnTlMlc2.mjs} +713 -713
- package/browser/esm/{D9OxV_CsDvcbDc4m.mjs → DvObASTOT-4DToJz.mjs} +1 -1
- package/browser/esm/{CqYqRJFt_MMSJjPm.mjs → IgB4VJkYazowEboE.mjs} +1 -1
- package/browser/esm/{B7jlirA4L119wA18.mjs → IwGsANxAJE1W0MS8.mjs} +3 -3
- package/browser/esm/{DcQAbZC7Pyl8H0Du.mjs → S9lMSxFPx_FXOTaR.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/node/esm/{PbVay6TywQ6hnERf.mjs → B602KxC_3fiNFPpe.mjs} +1 -1
- package/node/esm/{BeLD1GQMpb-3tagW.mjs → BpQiLxP8DQDmrHtY.mjs} +1 -1
- package/node/esm/{ClVFqEPum-4R1nLc.mjs → C_tYZi5ecOkqDYUy.mjs} +1 -1
- package/node/esm/{CfjM1J3URUX2QGVY.mjs → CeUhT8vbhB5VHd6-.mjs} +1 -1
- package/node/esm/{b6kGExDaA7mRDL2O.mjs → CxVrmF0K2K6ftKzV.mjs} +1 -1
- package/node/esm/{Blb4cEHQ_lYuMe3Q.mjs → D4ujfc4Ugqcdqzg1.mjs} +1 -1
- package/node/esm/{CDYO1tY_wsBp0pz2.mjs → D7s8wJBpX6SKSl76.mjs} +1 -1
- package/node/esm/{BV6xXCI8xc1LWPTh.mjs → Dts5yAtSO_1mPq94.mjs} +1 -1
- package/node/esm/{CUj8Wnq_-HuKB_Ss.mjs → DzzBNKNsbkuloUVy.mjs} +1 -1
- package/node/esm/index.mjs +684 -684
- package/node/esm/{CdaO7TfZOk6GEFJm.mjs → tiKem60RN2pWD1NY.mjs} +1 -1
- package/package.json +8 -8
package/node/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.6.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.6.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.
|
|
@@ -9,65 +9,65 @@ import { LicenseManager } from "@sheetxl/sdk";
|
|
|
9
9
|
import { jsx as x, jsxs as b, Fragment as y } from "react/jsx-runtime";
|
|
10
10
|
import w, { memo as k, forwardRef as S, useMemo as C, useCallback as v, isValidElement as T, useState as D, useEffect as P, Suspense as R, useRef as M, createElement as F, useReducer as B, useImperativeHandle as N, useLayoutEffect as E } from "react";
|
|
11
11
|
import { Box as A, Typography as I, IconButton as L, MenuItem as H, Divider as W, Button as z, SvgIcon as $, Input as O, FormControlLabel as V, Checkbox as G, useMediaQuery as U, FormControl as j, TextField as _, InputAdornment as q, Slider as K, Paper as X, CircularProgress as Z, DialogTitle as J, Select as Y, Tabs as Q, Tab as ee, Card as te, CardActions as oe, Collapse as ne, CssBaseline as ae } from "@mui/material";
|
|
12
|
-
import { themeIcon as re, CommandButton as le, ExhibitDivider as ie, FormatIndentDecreaseIcon as se, FormatIndentIncreaseIcon as de, defaultCreatePopupPanel as ce, CommandPopupButton as me, TextVerticalTopIcon as pe, TextVerticalCenterIcon as ue, TextVerticalBottomIcon as ge, TextHorizontalOverflowIcon as he, TextHorizontalWrapIcon as fe, TextHorizontalClipIcon as xe, TextHorizontalShrinkIcon as be, TextRotation315Icon as ye, TextRotation45Icon as we, TextRotation90Icon as ke, TextRotation2702Icon as Se, TextRotationCustomIcon as Ce, TextRotation0Icon as ve, InputCommandButton as Te, SimpleTooltip as De, LoadingPanel as Pe, PopupButtonType as Re, ExhibitPopupIconButton as Me, ExhibitPopupMenuItem as Fe, ColorizedCircleIcon as Be, ExhibitMenuItem as Ne, createStrokeShadowFilter as Ee, strokeShadowFilter as Ae, ColorizedStrokeIcon as Ie, ExhibitTooltip as Le, ExhibitIconButton as He, CommandTooltip as We, MergeAllIcon as ze, MergeHorizontalIcon as $e, MergeVerticalIcon as Oe, MergeUnMergeIcon as Ve, FreezeBothIcon as Ge, FreezeRowsIcon as Ue, FreezeColumnsIcon as je, FreezeIcon as _e, FindIcon as qe, FindReplaceIcon as Ke, GotoIcon as Xe, TextSizeIncreaseIcon as Ze, TextSizeDecreaseIcon as Je, SelectedIcon as Ye, CurrencyDollarIcon as Qe, PercentIcon as et, CommaIcon as tt, IncreaseDecimalIcon2 as ot, DecreaseDecimalIcon2 as nt, ClearAllIcon as at, ClearFormatsIcon as rt, ClearContentsIcon as lt, FillDownIcon as it, InsertCells as st, InsertRowIcon as dt, InsertColumn2Icon as ct, BlankIcon as mt, RemoveCellsIcon as pt, RemoveRowIcon as ut, RemoveColumn2Icon as gt, LabelIcon as ht, SortIncreaseIcon as ft, SortDecreaseIcon as xt, SortCustomIcon as bt, FilterToggleIcon as yt, FilterClearIcon as wt, FilterReapplyIcon as kt, RedoIcon as St, UndoIcon as Ct, TextStrikeIcon as vt, TextSuperscriptIcon as Tt, TextSubscriptIcon as Dt, TextUnderlineIcon as Pt, TextUnderlineDoubleIcon as Rt, TextUnderlineAccountingIcon as Mt, TextUnderlineAccountingDoubleIcon as Ft, PasteIcon as Bt, PasteValuesIcon as Nt, PasteFormatsIcon as Et, PasteFormulasIcon as At, PasteTransposeIcon as It, PasteLinksIcon as Lt, NewPresetStylesIcon as Ht, PresetStylesIcon as Wt, ExhibitMenuHeader as zt, ContextMenu as $t, Theme2Icon as Ot, SystemDefaultDarkMode as Vt, SystemDefaultLightMode as Gt, GithubIcon as Ut, DiscordIcon as jt, DocumentationIcon as _t, TicketIcon as qt, HelpIcon as Kt, InsertImageIcon as Xt, WalkingCopyIcon as Zt, SimpleCommandPopupButton as Jt, FunctionThinIcon as Yt, FunctionSumIcon as Qt, FormulaGroupIcon as eo, FormulaFinancialIcon as to, FormulaLogicalIcon as oo, FormulaTextIcon as no, FormulaDateTimeIcon as ao, FormulaLookupReferenceIcon as ro, FormulaMathTrigIcon as lo, FormulaStatisticalIcon as io, FormulaEngineeringIcon as so, FormulaInformationIcon as co, FormulaCubeIcon as mo, FormulaDatabaseIcon as po, FormulaWebIcon as uo, FormulaCustomIcon as go, ExhibitOptionButton as ho, SelectRangeModeIcon as fo, hexToRGB as xo, useFloatStack as bo, CellSelectionIcon as yo, CellSelectionRemoveIcon as wo, CellSelectionEditIcon as ko, InsertTableIcon as So, CellSelectionInsertIcon as Co, CloseErrorIcon as vo, CheckSuccessIcon as To, FunctionIcon as Do, VisibilityOffIcon as Po, elevateColor as Ro, ThemedIcon as Mo, ScriptNewIcon as Fo, ScriptFormulaIcon as Bo, ScriptMacroIcon as No, ScriptSaveIcon as Eo, CommandToolbar as Ao, CodeIcon as Io, ScriptRunIcon as Lo, ColorizedTextIcon as Ho, ColorizedFillIcon as Wo, FormatPaintIcon as zo, TextBoldIcon as $o, TextItalicIcon as Oo, InsertHyperlinkIcon as Vo, InsertCommentIcon as Go,
|
|
13
|
-
import
|
|
14
|
-
import { FormatAlignLeft as
|
|
15
|
-
import { useCommands as
|
|
16
|
-
import { useTheme as
|
|
17
|
-
import { StyledStrokePath as
|
|
18
|
-
import { alpha as
|
|
19
|
-
import { useFormContext as
|
|
20
|
-
import { ResizableBox as
|
|
21
|
-
import { mergeRefs as
|
|
22
|
-
import { CommonUtils as
|
|
23
|
-
import { useMeasure as
|
|
24
|
-
import { CSSTransition as
|
|
25
|
-
import { useFullscreen as
|
|
26
|
-
import { IOUtils as
|
|
27
|
-
import { ErrorBoundary as
|
|
28
|
-
import { useSnackbar as
|
|
29
|
-
const
|
|
30
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 =
|
|
12
|
+
import { themeIcon as re, CommandButton as le, ExhibitDivider as ie, FormatIndentDecreaseIcon as se, FormatIndentIncreaseIcon as de, defaultCreatePopupPanel as ce, CommandPopupButton as me, TextVerticalTopIcon as pe, TextVerticalCenterIcon as ue, TextVerticalBottomIcon as ge, TextHorizontalOverflowIcon as he, TextHorizontalWrapIcon as fe, TextHorizontalClipIcon as xe, TextHorizontalShrinkIcon as be, TextRotation315Icon as ye, TextRotation45Icon as we, TextRotation90Icon as ke, TextRotation2702Icon as Se, TextRotationCustomIcon as Ce, TextRotation0Icon as ve, InputCommandButton as Te, SimpleTooltip as De, LoadingPanel as Pe, PopupButtonType as Re, ExhibitPopupIconButton as Me, ExhibitPopupMenuItem as Fe, ColorizedCircleIcon as Be, ExhibitMenuItem as Ne, createStrokeShadowFilter as Ee, strokeShadowFilter as Ae, ColorizedStrokeIcon as Ie, ExhibitTooltip as Le, ExhibitIconButton as He, CommandTooltip as We, MergeAllIcon as ze, MergeHorizontalIcon as $e, MergeVerticalIcon as Oe, MergeUnMergeIcon as Ve, FreezeBothIcon as Ge, FreezeRowsIcon as Ue, FreezeColumnsIcon as je, FreezeIcon as _e, FindIcon as qe, FindReplaceIcon as Ke, GotoIcon as Xe, TextSizeIncreaseIcon as Ze, TextSizeDecreaseIcon as Je, SelectedIcon as Ye, CurrencyDollarIcon as Qe, PercentIcon as et, CommaIcon as tt, IncreaseDecimalIcon2 as ot, DecreaseDecimalIcon2 as nt, ClearAllIcon as at, ClearFormatsIcon as rt, ClearContentsIcon as lt, FillDownIcon as it, InsertCells as st, InsertRowIcon as dt, InsertColumn2Icon as ct, BlankIcon as mt, RemoveCellsIcon as pt, RemoveRowIcon as ut, RemoveColumn2Icon as gt, LabelIcon as ht, SortIncreaseIcon as ft, SortDecreaseIcon as xt, SortCustomIcon as bt, FilterToggleIcon as yt, FilterClearIcon as wt, FilterReapplyIcon as kt, RedoIcon as St, UndoIcon as Ct, TextStrikeIcon as vt, TextSuperscriptIcon as Tt, TextSubscriptIcon as Dt, TextUnderlineIcon as Pt, TextUnderlineDoubleIcon as Rt, TextUnderlineAccountingIcon as Mt, TextUnderlineAccountingDoubleIcon as Ft, PasteIcon as Bt, PasteValuesIcon as Nt, PasteFormatsIcon as Et, PasteFormulasIcon as At, PasteTransposeIcon as It, PasteLinksIcon as Lt, NewPresetStylesIcon as Ht, PresetStylesIcon as Wt, ExhibitMenuHeader as zt, ContextMenu as $t, Theme2Icon as Ot, SystemDefaultDarkMode as Vt, SystemDefaultLightMode as Gt, GithubIcon as Ut, DiscordIcon as jt, DocumentationIcon as _t, TicketIcon as qt, HelpIcon as Kt, InsertImageIcon as Xt, WalkingCopyIcon as Zt, SimpleCommandPopupButton as Jt, FunctionThinIcon as Yt, FunctionSumIcon as Qt, FormulaGroupIcon as eo, FormulaFinancialIcon as to, FormulaLogicalIcon as oo, FormulaTextIcon as no, FormulaDateTimeIcon as ao, FormulaLookupReferenceIcon as ro, FormulaMathTrigIcon as lo, FormulaStatisticalIcon as io, FormulaEngineeringIcon as so, FormulaInformationIcon as co, FormulaCubeIcon as mo, FormulaDatabaseIcon as po, FormulaWebIcon as uo, FormulaCustomIcon as go, ExhibitOptionButton as ho, SelectRangeModeIcon as fo, hexToRGB as xo, useFloatStack as bo, CellSelectionIcon as yo, CellSelectionRemoveIcon as wo, CellSelectionEditIcon as ko, InsertTableIcon as So, CellSelectionInsertIcon as Co, CloseErrorIcon as vo, CheckSuccessIcon as To, FunctionIcon as Do, VisibilityOffIcon as Po, elevateColor as Ro, ThemedIcon as Mo, ScriptNewIcon as Fo, ScriptFormulaIcon as Bo, ScriptMacroIcon as No, ScriptSaveIcon as Eo, CommandToolbar as Ao, CodeIcon as Io, ScriptRunIcon as Lo, ColorizedTextIcon as Ho, ColorizedFillIcon as Wo, FormatPaintIcon as zo, TextBoldIcon as $o, TextItalicIcon as Oo, InsertHyperlinkIcon as Vo, InsertCommentIcon as Go, FormulaViewIcon as Uo, ViewZeroIcon as jo, FullScreenOffIcon as _o, FullScreenIcon as qo, createScrollEdgeButton as Ko, createScrollEndButton as Xo, createScrollStartButton as Zo, HideColumnIcon as Jo, ShowColumnIcon as Yo, HideRowIcon as Qo, ShowRowIcon as en, ColumnsResizeAutoIcon as tn, RowsResizeAutoIcon as on, CutIcon as nn, DrawAspectIcon as an, DrawAlignLeftIcon as rn, DrawResizeIcon as ln, DrawAlignDistributeVertIcon as sn, DrawAlignDistributeHorzIcon as dn, DrawAlignBottomIcon as cn, DrawAlignMiddleIcon as mn, DrawAlignTopIcon as pn, DrawAlignRightIcon as un, DrawAlignCenterIcon as gn, DrawMoveBackwardIcon as hn, DrawToBackIcon as fn, DrawMoveForwardIcon as xn, DrawToFrontIcon as bn, scrollbarTheming as yn, StackTrace as wn, FileNewIcon as kn, FileOpenIcon as Sn, FileDownloadAsCSVIcon as Cn, FileDownloadAsExcelIcon as vn, FileDownloadAsSheetIcon as Tn, useResolvedThemeMode as Dn, ThemeMode as Pn, useModal as Rn, useLazyWindow as Mn, useOptionsDialog as Fn, useInputDialog as Bn, AnimatedTraversingEllipsisIcon as Nn, ErrorPanel as En, createExhibitTheme as An, ModalProvider as In, ErrorAlertIcon as Ln } from "@sheetxl/utils-mui";
|
|
13
|
+
import Hn from "clsx";
|
|
14
|
+
import { FormatAlignLeft as Wn, FormatAlignCenter as zn, FormatAlignRight as $n, FormatAlignJustify as On, Colorize as Vn, DarkMode as Gn, LightMode as Un, Keyboard as jn, Remove as _n, Add as qn, ExpandLess as Kn, ExpandMore as Xn, Lock as Zn, MoreHoriz as Jn, WebhookOutlined as Yn, Close as Qn, AddCircleOutline as ea, Menu as ta, CancelOutlined as oa } from "@mui/icons-material";
|
|
15
|
+
import { useCommands as na, CommandButtonType as aa, useCallbackRef as ra, ReactUtils as la, KeyCodes as ia, useCommand as sa, useEditMode as da, useMouseDownAndHoldListener as ca, NotificationType as ma, useImperativeElement as pa, SplitPane as ua, RoundedTab as ga, SimpleCommand as ha, Command as fa, KeyModifiers as xa, CommandGroup as ba, ToolTipPlacement as ya, ScrollPane as wa, useUndoManager as ka } from "@sheetxl/utils-react";
|
|
16
|
+
import { useTheme as Sa, alpha as Ca, getOverlayAlpha as va, ThemeProvider as Ta } from "@mui/material/styles";
|
|
17
|
+
import { StyledStrokePath as Da, StaticBorderRenderer as Pa, FontUtils as Ra, useModelListener as Ma, createCellEditStateFromCell as Fa, SheetCellEditor as Ba, ScriptEditor as Na, useDocThemes as Ea, TabStrip as Aa, SheetElement as Ia, SheetScrollbar as La, PictureEditor as Ha, ChartEditor as Wa, EmptyFrame as za, LogoNoPaddingIcon as $a } from "@sheetxl/react";
|
|
18
|
+
import { alpha as Oa } from "@mui/system";
|
|
19
|
+
import { useFormContext as Va } from "react-hook-form";
|
|
20
|
+
import { ResizableBox as Ga } from "react-resizable";
|
|
21
|
+
import { mergeRefs as Ua } from "react-merge-refs";
|
|
22
|
+
import { CommonUtils as ja, ChainedError as _a, PartialError as qa, UndoManager as Ka } from "@sheetxl/utils";
|
|
23
|
+
import { useMeasure as Xa } from "react-use";
|
|
24
|
+
import { CSSTransition as Za } from "react-transition-group";
|
|
25
|
+
import { useFullscreen as Ja } from "rooks";
|
|
26
|
+
import { IOUtils as Ya } from "@sheetxl/io";
|
|
27
|
+
import { ErrorBoundary as Qa } from "react-error-boundary";
|
|
28
|
+
import { useSnackbar as er, SnackbarContent as tr, SnackbarProvider as or } from "notistack";
|
|
29
|
+
const nr = k(S((e2, t2) => {
|
|
30
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = na(o2, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), d2 = C(() => {
|
|
31
31
|
for (let e3 = 0; e3 < s2.length; e3++) if (s2[e3]?.state()) return s2[e3].key();
|
|
32
32
|
return s2[0]?.key();
|
|
33
33
|
}, [s2]), c2 = C(() => {
|
|
34
34
|
const e3 = /* @__PURE__ */ new Map();
|
|
35
|
-
return e3.set("formatAlignLeftToggle", re(x(
|
|
35
|
+
return e3.set("formatAlignLeftToggle", re(x(Wn, {}))), e3.set("formatAlignCenterToggle", re(x(zn, {}))), e3.set("formatAlignRightToggle", re(x($n, {}))), e3.set("formatAlignJustifyToggle", re(x(On, {}))), e3.set("formatAlignCenterContinuousToggle", re(x(zn, {}))), e3.set("formatAlignFillToggle", re(x(On, {}))), e3.set("formatAlignDistributedHorizontalToggle", re(x(On, {}))), e3;
|
|
36
36
|
}, []), m2 = C(() => {
|
|
37
37
|
if (!n2) return null;
|
|
38
38
|
const e3 = { ...n2 };
|
|
39
39
|
return delete e3.beforeExecute, e3;
|
|
40
40
|
}, [n2]), p2 = v((e3, t3) => {
|
|
41
|
-
const o3 = { variant:
|
|
41
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatAlignLeftToggle"), icon: c2.get("formatAlignLeftToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignCenterToggle"), icon: c2.get("formatAlignCenterToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignRightToggle"), icon: c2.get("formatAlignRightToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignJustifyToggle"), icon: c2.get("formatAlignJustifyToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatAlignCenterContinuousToggle"), icon: c2.get("formatAlignCenterContinuousToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignFillToggle"), icon: c2.get("formatAlignFillToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignDistributedHorizontalToggle"), icon: c2.get("formatAlignDistributedHorizontalToggle") })] }), s3 = b(A, { sx: { className: Hn("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [x(le, { command: t3.getCommand("formatIndentDecrease"), commandHook: m2, scope: a2, disabled: r2, icon: re(x(se, {})) }), x(le, { command: t3.getCommand("formatIndentIncrease"), commandHook: m2, scope: a2, disabled: r2, icon: re(x(de, {})) })] }), d3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...i2, children: [s3, x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: l3 })] });
|
|
42
42
|
return ce({ ...e3, children: d3 });
|
|
43
43
|
}, [r2, n2]);
|
|
44
|
-
return x(me, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: p2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d2, icon: c2.get(d2) ?? x(
|
|
45
|
-
})),
|
|
46
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 =
|
|
44
|
+
return x(me, { ref: t2, parentFloat: l2, commands: o2, commandHook: n2, scope: a2, createPopupPanel: p2, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: d2, icon: c2.get(d2) ?? x(Wn, {}), ...i2 });
|
|
45
|
+
})), ar = k(S((e2, t2) => {
|
|
46
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), s2 = C(() => {
|
|
47
47
|
for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
|
|
48
48
|
return i2[0]?.key();
|
|
49
49
|
}, [i2]), d2 = C(() => {
|
|
50
50
|
const e3 = /* @__PURE__ */ new Map();
|
|
51
|
-
return e3.set("formatAlignTopToggle", re(x(pe, {}))), e3.set("formatAlignMiddleToggle", re(x(ue, {}))), e3.set("formatAlignBottomToggle", re(x(ge, {}))), e3.set("formatAlignJustifyVerticalToggle", re(x(
|
|
51
|
+
return e3.set("formatAlignTopToggle", re(x(pe, {}))), e3.set("formatAlignMiddleToggle", re(x(ue, {}))), e3.set("formatAlignBottomToggle", re(x(ge, {}))), e3.set("formatAlignJustifyVerticalToggle", re(x(On, {}))), e3.set("formatAlignDistributedVerticalToggle", re(x(On, {}))), e3;
|
|
52
52
|
}, []), c2 = v((e3, t3) => {
|
|
53
|
-
const o3 = { variant:
|
|
53
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatAlignTopToggle"), icon: d2.get("formatAlignTopToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignMiddleToggle"), icon: d2.get("formatAlignMiddleToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignBottomToggle"), icon: d2.get("formatAlignBottomToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatAlignJustifyVerticalToggle"), icon: d2.get("formatAlignJustifyVerticalToggle") }), x(le, { ...o3, command: t3.getCommand("formatAlignDistributedVerticalToggle"), icon: d2.get("formatAlignDistributedVerticalToggle") })] });
|
|
54
54
|
return ce({ ...e3, children: l3 });
|
|
55
55
|
}, [r2, n2, d2]);
|
|
56
56
|
return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: c2, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: d2.get(s2) ?? re(x(ge, {})), ...l2 });
|
|
57
|
-
})),
|
|
58
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 =
|
|
57
|
+
})), rr = k(S((e2, t2) => {
|
|
58
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), s2 = C(() => {
|
|
59
59
|
for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
|
|
60
60
|
return i2[0]?.key();
|
|
61
61
|
}, [i2]), d2 = C(() => {
|
|
62
62
|
const e3 = /* @__PURE__ */ new Map();
|
|
63
63
|
return e3.set("formatTextOverflowVisibleToggle", re(x(he, {}))), e3.set("formatTextOverflowWrapToggle", re(x(fe, {}))), e3.set("formatTextOverflowClipToggle", re(x(xe, {}))), e3.set("formatTextOverflowShrinkToggle", re(x(be, {}))), e3;
|
|
64
|
-
}, []), c2 =
|
|
65
|
-
const o3 = { variant:
|
|
64
|
+
}, []), c2 = ra((e3, t3) => {
|
|
65
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatTextOverflowVisibleToggle"), icon: d2.get("formatTextOverflowVisibleToggle") }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowWrapToggle"), icon: d2.get("formatTextOverflowWrapToggle") }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowClipToggle"), icon: d2.get("formatTextOverflowClipToggle") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatTextOverflowShrinkToggle"), icon: d2.get("formatTextOverflowShrinkToggle") })] });
|
|
66
66
|
return ce({ ...e3, children: l3 });
|
|
67
67
|
}, [r2, n2, a2]);
|
|
68
68
|
return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: c2, icon: d2.get(s2) ?? re(x(he, {})), ...l2 });
|
|
69
|
-
})),
|
|
70
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 =
|
|
69
|
+
})), lr = k(S((e2, t2) => {
|
|
70
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), s2 = C(() => {
|
|
71
71
|
const e3 = i2.length;
|
|
72
72
|
for (let t3 = 0; t3 < e3; t3++) {
|
|
73
73
|
const e4 = i2[t3];
|
|
@@ -78,13 +78,13 @@ const tr = k(S((e2, t2) => {
|
|
|
78
78
|
const e3 = /* @__PURE__ */ new Map();
|
|
79
79
|
return e3.set("formatTextRotate0", re(x(ye, {}))), e3.set("formatTextRotate315", re(x(ye, {}))), e3.set("formatTextRotate45", re(x(we, {}))), e3.set("formatTextRotate90", re(x(ke, {}))), e3.set("formatTextRotate270", re(x(Se, {}))), e3.set("formatTextRotateCustom", re(x(Ce, {}))), e3;
|
|
80
80
|
}, []), c2 = v((e3, t3) => {
|
|
81
|
-
const o3 = { variant:
|
|
81
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatTextRotate0"), icon: re(x(ve, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("formatTextRotate315"), icon: re(x(ye, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate45"), icon: re(x(we, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate90"), icon: re(x(ke, {})) }), x(le, { ...o3, command: t3.getCommand("formatTextRotate270"), icon: re(x(Se, {})) }), x(ie, { orientation: "horizontal" }), x(Te, { ...o3, command: t3.getCommand("formatTextRotateCustom"), icon: re(x(Ce, {})), label: "Custom" })] });
|
|
82
82
|
return ce({ ...e3, children: l3 });
|
|
83
83
|
}, [r2, n2, a2, o2]), m2 = C(() => 0 !== (o2.getCommand("formatTextRotateCustom")?.state() ?? 0), [i2]);
|
|
84
84
|
return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, selected: m2, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: c2, quickCommand: m2 ? "formatTextRotate0" : "formatTextRotate315", icon: re(d2.get(s2) ?? x(ye, {})), ...l2 });
|
|
85
|
-
})),
|
|
85
|
+
})), ir = { Preset: "preset", Custom: "custom" }, sr = { Start: "start", End: "end" }, dr = {}, cr = (e2, t2, o2, n2) => {
|
|
86
86
|
const a2 = e2 + "-" + t2 + "-" + o2 + (n2 ? "-server" : "");
|
|
87
|
-
if (
|
|
87
|
+
if (dr[a2]) return dr[a2];
|
|
88
88
|
const r2 = ((e3, t3, o3, n3) => {
|
|
89
89
|
if ("undefined" == typeof document && !n3) return null;
|
|
90
90
|
const a3 = n3 ? new n3() : document.createElement("canvas");
|
|
@@ -92,12 +92,12 @@ const tr = k(S((e2, t2) => {
|
|
|
92
92
|
const r3 = a3.getContext("2d");
|
|
93
93
|
return r3 ? (r3.fillStyle = e3, r3.fillRect(0, 0, a3.width, a3.height), r3.fillStyle = t3, r3.fillRect(0, 0, o3, o3), r3.translate(o3, o3), r3.fillRect(0, 0, o3, o3), a3.toDataURL()) : null;
|
|
94
94
|
})(e2, t2, o2, n2);
|
|
95
|
-
return
|
|
96
|
-
},
|
|
97
|
-
const { className: t2, style: o2 =
|
|
95
|
+
return dr[a2] = r2, r2;
|
|
96
|
+
}, mr = {}, pr = k((e2) => {
|
|
97
|
+
const { className: t2, style: o2 = la.EmptyCssProperties, white: n2 = "transparent", grey: a2 = "grey", size: r2 = 8, borderRadius: l2, boxShadow: i2, renderers: s2 = mr, children: d2, ...c2 } = e2, m2 = d2, p2 = C(() => Object.assign({ borderRadius: l2, boxShadow: i2, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${cr(n2, a2, r2, s2?.canvas)}) center left` }, o2), [n2, a2, r2, s2]);
|
|
98
98
|
return T(d2) ? w.cloneElement(d2, { ...m2.props }) : x("div", { style: p2, ...c2 });
|
|
99
|
-
}),
|
|
100
|
-
const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: a2, onKeyDown: r2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 =
|
|
99
|
+
}), ur = k((e2) => {
|
|
100
|
+
const { selectedColor: t2, onSelectColor: o2, onPreviewColor: n2, onClick: a2, onKeyDown: r2, onMouseOver: l2, onMouseLeave: i2, onFocus: s2, style: d2 = la.EmptyCssProperties, children: c2, alphaWhite: m2, alphaGrey: p2, darkMode: u2, alphaCheckSize: g2 = 7, ...h2 } = e2;
|
|
101
101
|
if (!t2) throw new Error("a selectedColor is required");
|
|
102
102
|
const f2 = v((e3) => {
|
|
103
103
|
a2?.(e3), e3.isDefaultPrevented() || (e3.ctrlKey ? n2?.(t2.toRGBA()) : o2?.(t2.toRGBA()));
|
|
@@ -108,10 +108,10 @@ const tr = k(S((e2, t2) => {
|
|
|
108
108
|
}, [n2, i2]), k2 = v((e3) => {
|
|
109
109
|
s2?.(e3), e3.isDefaultPrevented() || n2?.(t2.toRGBA());
|
|
110
110
|
}, [n2, s2, t2]), S2 = v((e3) => {
|
|
111
|
-
r2?.(e3), e3.isDefaultPrevented() || e3.keyCode ===
|
|
112
|
-
}, [o2, r2, t2]), T2 = C(() => 1 === t2.toRGBA().alpha ? null : x(
|
|
111
|
+
r2?.(e3), e3.isDefaultPrevented() || e3.keyCode === ia.Enter && o2?.(t2.toRGBA());
|
|
112
|
+
}, [o2, r2, t2]), T2 = C(() => 1 === t2.toRGBA().alpha ? null : x(pr, { 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]);
|
|
113
113
|
return b("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...d2 }, tabIndex: 0, ...h2, onClick: f2, onKeyDown: S2, onMouseOver: y2, onMouseLeave: w2, onFocus: k2, children: [T2, x("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: t2.toCSS(u2) }, children: c2 })] });
|
|
114
|
-
}),
|
|
114
|
+
}), gr = k((o2) => {
|
|
115
115
|
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(), y2 = a2 && (p2 ? a2.toRGBA().toString() : a2.toString()) === f2, w2 = r2 && (p2 ? r2.toRGBA().toString() : r2.toString()) === f2, k2 = [];
|
|
116
116
|
k2.push({ [t.AdjustmentType.Inv]: true }), k2.push({ [t.AdjustmentType.Alpha]: 100 });
|
|
117
117
|
const S2 = h2.adjust(k2), C2 = v(() => {
|
|
@@ -119,9 +119,9 @@ const tr = k(S((e2, t2) => {
|
|
|
119
119
|
}, [i2, l2]), T2 = v((e2) => {
|
|
120
120
|
s2?.(e2 ? l2 : null);
|
|
121
121
|
}, [s2, l2]);
|
|
122
|
-
return x(De, { 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: x("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: b(
|
|
123
|
-
}),
|
|
124
|
-
const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 =
|
|
122
|
+
return x(De, { 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: x("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: b(ur, { selectedColor: h2, title: null, onSelectColor: C2, onPreviewColor: T2, alphaCheckSize: m2 ? 9 : void 0, darkMode: u2, ...d2, children: [x("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: S2.toRGBA(u2).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: y2 ? "1" : "0" } }), x("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: S2.toRGBA(u2).toString(), borderRadius: "50%", opacity: w2 ? "1" : "0" } })] }) }) });
|
|
123
|
+
}), hr = k((e2) => {
|
|
124
|
+
const { title: t2, schemeColorLookup: o2, colorDefs: n2, selectedColor: a2, previewColor: r2, onSelectColorDef: l2, onPreviewColorDef: i2, style: s2 = la.EmptyCssProperties, compareRGB: d2 = false, darkMode: c2, swatchProps: m2, ...p2 } = e2;
|
|
125
125
|
let u2;
|
|
126
126
|
if (Array.isArray(n2[0])) u2 = n2;
|
|
127
127
|
else {
|
|
@@ -138,7 +138,7 @@ const tr = k(S((e2, t2) => {
|
|
|
138
138
|
let n3 = [], l3 = u2[t3];
|
|
139
139
|
for (let e4 = 0; e4 < l3.length; e4++) {
|
|
140
140
|
let i4 = l3[e4];
|
|
141
|
-
n3.push(x(
|
|
141
|
+
n3.push(x(gr, { schemeColorLookup: o2, colorDef: i4, selectedColor: a2, previewColor: r2, onSelectColorDef: g2, onPreviewColorDef: h2, swatchProps: m2, compareRGB: d2, darkMode: c2 }, t3 + " " + e4));
|
|
142
142
|
}
|
|
143
143
|
let i3 = x(A, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (e4) => e4.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: n3 }, "" + t3);
|
|
144
144
|
e3.push(i3);
|
|
@@ -146,19 +146,19 @@ const tr = k(S((e2, t2) => {
|
|
|
146
146
|
return e3;
|
|
147
147
|
}, [u2, a2, r2, g2, h2]), y2 = C(() => t2 ? x(I, { noWrap: true, component: "div", sx: { display: "flex", flexShrink: "0", paddingLeft: "6px", paddingBottom: "4px", paddingTop: "0px", userSelect: "none", color: (e3) => e3.palette.text.secondary }, children: t2 }) : null, [t2]);
|
|
148
148
|
return b(A, { style: { ...s2 }, children: [y2, x(A, { sx: { display: "flex", flexDirection: "row", gap: "6px", marginBottom: "14px", flexWrap: "wrap", justifyContent: "flex-start" }, ...p2, children: f2 })] });
|
|
149
|
-
}),
|
|
150
|
-
const i2 =
|
|
149
|
+
}), fr = (e2, t2) => ({ description: e2, definition: { val: t2, adjs: [] } }), xr = (t2, o2, n2, a2, r2, l2) => {
|
|
150
|
+
const i2 = fr(t2, o2);
|
|
151
151
|
a2?.push(i2);
|
|
152
152
|
const s2 = new e({ val: i2.definition.val, adjs: i2.definition.adjs }, n2), d2 = s2.toString();
|
|
153
153
|
r2?.set(d2, s2);
|
|
154
154
|
const c2 = s2.toRGBA().toString();
|
|
155
155
|
l2?.set(c2, s2);
|
|
156
|
-
},
|
|
157
|
-
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: w2, onPreviewColor: k2, onPreviewColorImmediate: S2, onSelectColor: T2, autoColor: M2, autoColorLabel: F2 = "Automatic", autoColorPosition: B2 =
|
|
156
|
+
}, br = w.lazy(() => import("./C_tYZi5ecOkqDYUy.mjs")), yr = k(S((t2, a2) => {
|
|
157
|
+
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: w2, onPreviewColor: k2, onPreviewColorImmediate: S2, onSelectColor: T2, autoColor: M2, autoColorLabel: F2 = "Automatic", autoColorPosition: B2 = sr.Start, compareRGB: N2 = false, darkMode: E2 = false, ...$2 } = t2, O2 = l2 || r2, V2 = ra(k2, [k2]), G2 = ra(S2, [S2]), U2 = ra(T2, [T2]), j2 = ra(f2, [f2]), _2 = ra(w2, [w2]), [q2, K2] = D(false), X2 = Sa(), Z2 = C(() => s2 || e.getDefaultSchemeLookup(), [s2]), J2 = C(() => {
|
|
158
158
|
const e2 = /* @__PURE__ */ new Map(), t3 = /* @__PURE__ */ new Map(), n2 = [];
|
|
159
|
-
|
|
159
|
+
xr("Primary Background", "bg1", Z2, n2, e2, t3), xr("Primary Text", "tx1", Z2, n2, e2, t3), xr("Secondary Background", "bg2", Z2, n2, e2, t3), xr("Secondary Text", "tx2", Z2, n2, e2, t3), xr("Accent 1", "accent1", Z2, n2, e2, t3), xr("Accent 2", "accent2", Z2, n2, e2, t3), xr("Accent 3", "accent3", Z2, n2, e2, t3), xr("Accent 4", "accent4", Z2, n2, e2, t3), xr("Accent 5", "accent5", Z2, n2, e2, t3), xr("Accent 6", "accent6", Z2, n2, e2, t3);
|
|
160
160
|
const a3 = o.buildPalette(n2, Z2, e2, t3), r3 = [];
|
|
161
|
-
if (
|
|
161
|
+
if (xr("Dark Red", "C00000", Z2, r3, e2, t3), xr("Red", "FF0000", Z2, r3, e2, t3), xr("Orange", "FFC000", Z2, r3, e2, t3), xr("Yellow", "FFFF00", Z2, r3, e2, t3), xr("Light Green", "92D050", Z2, r3, e2, t3), xr("Green", "00B050", Z2, r3, e2, t3), xr("Light Blue", "00B0F0", Z2, r3, e2, t3), xr("Blue", "0070C0", Z2, r3, e2, t3), xr("Dark Blue", "002060", Z2, r3, e2, t3), d2 ? xr("Purple Is A Fruit", "7030A0", Z2, r3, e2, t3) : xr("Transparent", "00000000", Z2, r3, e2, t3), M2) {
|
|
162
162
|
const t4 = M2.toString();
|
|
163
163
|
e2.set(t4, M2);
|
|
164
164
|
}
|
|
@@ -176,7 +176,7 @@ const tr = k(S((e2, t2) => {
|
|
|
176
176
|
Q2((e2) => !e2);
|
|
177
177
|
}, []);
|
|
178
178
|
P(() => {
|
|
179
|
-
if (m2) Q2(m2 ===
|
|
179
|
+
if (m2) Q2(m2 === ir.Custom);
|
|
180
180
|
else if (r2) {
|
|
181
181
|
let e2 = r2.toString(), t3 = J2.mapAllPresets.get(e2);
|
|
182
182
|
t3 || (e2 = r2.toRGBA().toString(), t3 = J2.mapAllPresetsRGB.get(e2));
|
|
@@ -190,25 +190,25 @@ const tr = k(S((e2, t2) => {
|
|
|
190
190
|
P(() => {
|
|
191
191
|
ne2(l2 || r2);
|
|
192
192
|
}, [l2, r2]);
|
|
193
|
-
const ae2 =
|
|
193
|
+
const ae2 = ra((e2) => {
|
|
194
194
|
G2 && (G2(e2), te2(e2));
|
|
195
|
-
}, [G2]), re2 =
|
|
195
|
+
}, [G2]), re2 = ra((t3) => {
|
|
196
196
|
ae2(t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, Z2) : null);
|
|
197
197
|
}, [Z2]), le2 = v((e2) => {
|
|
198
198
|
e2.ctrlKey && Q2(true);
|
|
199
|
-
}, []), ie2 =
|
|
199
|
+
}, []), ie2 = ra((e2) => {
|
|
200
200
|
let t3 = false;
|
|
201
201
|
if (e2) {
|
|
202
202
|
const o2 = e2.toString();
|
|
203
203
|
t3 = !J2.mapAllPresets.has(o2);
|
|
204
204
|
}
|
|
205
205
|
U2?.(e2, t3);
|
|
206
|
-
}, [U2, J2]), se2 =
|
|
206
|
+
}, [U2, J2]), se2 = ra((t3) => {
|
|
207
207
|
const o2 = t3 ? new e({ val: t3.definition.val, adjs: t3.definition.adjs }, Z2) : null;
|
|
208
208
|
Promise.resolve(h2?.()).then(() => {
|
|
209
209
|
ie2(o2);
|
|
210
210
|
});
|
|
211
|
-
}, [Z2, h2]), de2 =
|
|
211
|
+
}, [Z2, h2]), de2 = ra((t3) => {
|
|
212
212
|
ae2(t3 ? new e(t3, Z2) : null);
|
|
213
213
|
}, [Z2]), ce2 = C(() => {
|
|
214
214
|
if (void 0 === window.EyeDropper) return x(y, {});
|
|
@@ -228,11 +228,11 @@ const tr = k(S((e2, t2) => {
|
|
|
228
228
|
}).catch((e2) => {
|
|
229
229
|
K2(false), "AbortError" !== e2?.name && console.error(e2);
|
|
230
230
|
});
|
|
231
|
-
}, children: x(
|
|
231
|
+
}, children: x(Vn, {}) });
|
|
232
232
|
}, [J2, E2]), me2 = C(() => {
|
|
233
233
|
if (!Y2) return;
|
|
234
234
|
const e2 = { opacity: Y2 ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
|
|
235
|
-
return x(R, { fallback: x("div", { style: e2, children: x(Pe, {}) }), children: x(
|
|
235
|
+
return x(R, { fallback: x("div", { style: e2, children: x(Pe, {}) }), children: x(br, { style: e2, selectedColor: O2 ? O2.toRGBA().toString() : "transparent", onColorChange: de2, disableAlpha: d2 }) });
|
|
236
236
|
}, [Y2, O2]), pe2 = C(() => ({ onClick: le2, alphaGrey: X2.palette.text.icon ?? X2.palette.action.active }), [le2, X2]), ue2 = C(() => {
|
|
237
237
|
if (!M2) return null;
|
|
238
238
|
const e2 = { description: F2, definition: { val: M2.getVal(), adjs: M2.getAdjustments() } };
|
|
@@ -240,68 +240,68 @@ const tr = k(S((e2, t2) => {
|
|
|
240
240
|
re2(null);
|
|
241
241
|
}, onClick: () => {
|
|
242
242
|
se2(null);
|
|
243
|
-
}, children: [x(A, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: x(
|
|
243
|
+
}, children: [x(A, { sx: { flex: "none", boxShadow: (e3) => e3.shadows[2], borderRadius: (e3) => e3.spacing(0.5), overflow: "hidden" }, children: x(gr, { schemeColorLookup: Z2, colorDef: e2, selectedColor: null === r2 ? M2 : r2, previewColor: null === l2 ? M2 : l2, defaultButtonSize: p2, isLarge: true, darkMode: E2, compareRGB: N2, swatchProps: pe2 }) }), x(I, { noWrap: true, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: F2 })] }) });
|
|
244
244
|
}, [M2, F2, Z2, r2, l2]);
|
|
245
|
-
return b(A, { ref: a2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...$2, children: [b("div", { style: { position: "relative", display: "flex" }, children: [b("div", { style: { opacity: Y2 ? "0" : 1 }, children: [ue2 && B2 ===
|
|
245
|
+
return b(A, { ref: a2, sx: { width: u2, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...$2, children: [b("div", { style: { position: "relative", display: "flex" }, children: [b("div", { style: { opacity: Y2 ? "0" : 1 }, children: [ue2 && B2 === sr.Start ? b(y, { children: [ue2, x(W, { light: true, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, x(hr, { title: "Theme Colors", schemeColorLookup: Z2, colorDefs: J2.primaryColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), x(hr, { schemeColorLookup: Z2, colorDefs: J2.modifiedPresets, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), x(W, { light: true, style: { marginBottom: "10px" } }), x(hr, { title: "Standard Colors", schemeColorLookup: Z2, colorDefs: J2.standardColors, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 }), b("div", { style: { opacity: 0 === J2.recentColorsLimited.length ? "0" : void 0, display: 0 === J2.recentColorsLimited.length ? "none" : void 0 }, children: [x(W, { light: true, style: { marginBottom: "10px" } }), x(hr, { title: "Recent Colors", schemeColorLookup: Z2, colorDefs: J2.recentColorsLimited, selectedColor: r2, previewColor: void 0 === l2 ? r2 : l2, swatchProps: pe2, onPreviewColorDef: re2, onSelectColorDef: se2, compareRGB: N2, darkMode: E2 })] }), ue2 && B2 === sr.End ? b(y, { children: [x(W, { light: true, sx: { marginTop: "2px", marginBottom: "2px" } }), ue2, x("div", { style: { marginBottom: "2px" } })] }) : null] }), me2] }), x(W, { light: true, style: { marginBottom: "10px" } }), b("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [ce2, x("div", { style: { flex: "1 1 100%", background: "pink" } }), x(z, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
|
|
246
246
|
ee2();
|
|
247
247
|
}, children: x("div", Y2 ? { children: "Preset" } : { children: "Custom" }) }), x(z, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
|
|
248
248
|
Promise.resolve(h2?.()).then(() => {
|
|
249
249
|
ie2(oe2);
|
|
250
250
|
});
|
|
251
251
|
}, children: "Done" })] })] });
|
|
252
|
-
})),
|
|
253
|
-
const { selectedColor: o2, quickColor: n2, icon: a2 =
|
|
252
|
+
})), wr = x(Be, {}), kr = k(S((e2, t2) => {
|
|
253
|
+
const { selectedColor: o2, quickColor: n2, icon: a2 = wr, tooltip: r2, label: l2, onPreviewColor: i2, onPreviewColorImmediate: s2, onSelectColor: d2, variant: c2 = Re.Toolbar, panelProps: m2, shouldCloseFloatAll: p2 = true, compareRGB: u2 = false, darkMode: g2 = false, ...h2 } = e2, f2 = ra(i2, [i2]), b2 = ra(s2, [s2]), y2 = ra(d2, [d2]), [w2, k2] = D(() => {
|
|
254
254
|
}), S2 = n2 || (w2 || o2) || m2?.autoColor, T2 = M(false), P2 = v(() => {
|
|
255
|
-
}, []), R2 =
|
|
255
|
+
}, []), R2 = ra(() => {
|
|
256
256
|
k2(o2);
|
|
257
|
-
}, [o2]), F2 =
|
|
257
|
+
}, [o2]), F2 = ra((e3) => {
|
|
258
258
|
T2.current || (k2(e3), f2?.(e3));
|
|
259
|
-
}, [f2]), B2 =
|
|
259
|
+
}, [f2]), B2 = ra((e3) => {
|
|
260
260
|
T2.current || (k2(e3), b2?.(e3));
|
|
261
|
-
}, [b2]), N2 =
|
|
261
|
+
}, [b2]), N2 = ra((e3, t3) => {
|
|
262
262
|
T2.current || (k2(void 0), y2?.(e3, t3));
|
|
263
|
-
}, [y2]), E2 = C(() => x(A, { sx: { width: "24px", height: "24px", 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]), I2 =
|
|
263
|
+
}, [y2]), E2 = C(() => x(A, { sx: { width: "24px", height: "24px", 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]), I2 = ra((e3) => {
|
|
264
264
|
y2?.(n2, false);
|
|
265
265
|
}, [y2, n2]), [L2, H2] = D(false), W2 = v((e3) => {
|
|
266
266
|
const { closeFloat: t3, closeFloatAll: n3 } = e3;
|
|
267
|
-
return x(
|
|
268
|
-
e4.which ===
|
|
267
|
+
return x(yr, { ...m2, selectedColor: o2, previewColor: w2, onDone: p2 ? n3 : t3, onKeyDown: (e4) => {
|
|
268
|
+
e4.which === ia.Enter && (p2 ? n3() : t3());
|
|
269
269
|
}, onPreviewColorImmediate: B2, onPreviewColor: F2, onSelectColor: N2, onEyeDropStart: () => H2(true), onEyeDropStop: () => H2(false), compareRGB: u2, darkMode: g2 });
|
|
270
270
|
}, [o2, w2, p2, S2, m2?.autoColor, g2]), z2 = { onQuickClick: n2 ? I2 : void 0, createPopupPanel: W2, popupProps: { popperProps: { resizeOnOverflow: false } }, onPopupOpen: R2, onPopupClose: P2, tooltip: r2 || l2 || "Color", label: l2, icon: E2, ...h2 };
|
|
271
271
|
return c2 === Re.Toolbar ? x(Me, { ref: t2, ...z2 }) : x(Fe, { ref: t2, ...z2 });
|
|
272
|
-
})),
|
|
273
|
-
const { styleColor: t2, length: o2 =
|
|
274
|
-
return x($, { 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: x(
|
|
275
|
-
},
|
|
276
|
-
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 =
|
|
272
|
+
})), Sr = 82, Cr = (e2) => {
|
|
273
|
+
const { styleColor: t2, length: o2 = Sr, width: n2 = 1, dashArray: a2 = null, sx: r2, isDouble: l2 = false, isAngled: i2 = false, darkMode: s2 = false, ...d2 } = e2;
|
|
274
|
+
return x($, { 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: x(Da, { length: o2, width: n2, dashArray: a2, isDouble: l2, isAngled: i2, className: "activeColor" }) });
|
|
275
|
+
}, vr = k(S((e2, t2) => {
|
|
276
|
+
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 = ra(d2, []), h2 = v((e3) => {
|
|
277
277
|
const { popupContainer: t3, floatReference: o3, closeFloat: l3, ...d3 } = e3, p3 = [], u3 = a.BuiltInDefinitionsArray;
|
|
278
278
|
for (let e4 = 0; e4 < u3.length; e4++) {
|
|
279
279
|
const t4 = u3[e4];
|
|
280
280
|
if ("None" === t4.description && !c2) continue;
|
|
281
|
-
const a2 = x(
|
|
281
|
+
const a2 = x(Cr, { styleColor: i2, length: Sr, width: t4.width, darkMode: m2, dashArray: t4.pattern, isDouble: t4.description.toLowerCase().includes("double"), isAngled: t4.description.toLowerCase().includes("slant") });
|
|
282
282
|
let d4 = null;
|
|
283
|
-
d4 = n2 ? b(y, { children: [x(A, { sx: { marginRight: "6px" }, children: t4.description }), b(A, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [x("div", { style: { flex: "1 1 100%" } }), a2] })] }) : "None" === t4.description ? "None" : a2, p3.push(x(Ne, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ee(4) }, paddingLeft: "16px", background: `linear-gradient(${
|
|
283
|
+
d4 = n2 ? b(y, { children: [x(A, { sx: { marginRight: "6px" }, children: t4.description }), b(A, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [x("div", { style: { flex: "1 1 100%" } }), a2] })] }) : "None" === t4.description ? "None" : a2, p3.push(x(Ne, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Ee(4) }, paddingLeft: "16px", background: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, tooltipProps: { description: n2 ? "" : t4.description }, icon: null, disabled: r2, onMouseDown: (e5) => e5.preventDefault(), onMouseUp: () => {
|
|
284
284
|
l3(), g2(t4.style);
|
|
285
285
|
}, onKeyDown: (e5) => {
|
|
286
|
-
e5.which ===
|
|
286
|
+
e5.which === ia.Enter && l3();
|
|
287
287
|
}, selected: t4.style === s2, parentFloat: o3, children: d4 }, e4));
|
|
288
288
|
}
|
|
289
289
|
return x(A, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: p3 });
|
|
290
290
|
}, [r2, c2, i2, s2, m2]), f2 = C(() => {
|
|
291
291
|
const e3 = a.BuiltInDefinitions.get(s2);
|
|
292
292
|
let t3;
|
|
293
|
-
return t3 = "None" === e3.description ? x(A, { sx: { minWidth: `${
|
|
294
|
-
}, [s2, i2]), w2 = C(() => a.BuiltInDefinitions.get(s2), [s2]), k2 = { disabled: r2, icon: f2, tooltip: "Border Style: " + w2.description, sx: { background: `linear-gradient(${
|
|
293
|
+
return t3 = "None" === e3.description ? x(A, { sx: { minWidth: `${Sr}px` }, children: "None" }) : x(Cr, { styleColor: i2, length: Sr, width: e3.width, dashArray: e3.pattern, darkMode: m2, isDouble: e3.description.toLowerCase().includes("double"), isAngled: e3.description.toLowerCase().includes("slant") }), x(A, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Ee() } }, children: t3 });
|
|
294
|
+
}, [s2, i2]), w2 = C(() => a.BuiltInDefinitions.get(s2), [s2]), k2 = { disabled: r2, icon: f2, tooltip: "Border Style: " + w2.description, sx: { background: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, ...p2 }, createPopupPanel: h2, ...u2 };
|
|
295
295
|
return o2 === Re.Toolbar ? x(Me, { ...k2 }) : x(Fe, { ...k2 });
|
|
296
|
-
})),
|
|
297
|
-
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 =
|
|
296
|
+
})), Tr = k(S((t2, o2) => {
|
|
297
|
+
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 = ra(c2, [c2]), f2 = ra(m2, [m2]), [w2, k2] = D(), [S2, T2] = D(), P2 = w2 ?? l2, R2 = S2 ?? n2, M2 = p2 || { bottom: { style: l2, color: n2?.toString() } }, F2 = ra((e2) => {
|
|
298
298
|
const t3 = {}, o3 = e2 ? Object.keys(e2) : [];
|
|
299
299
|
let n3 = false;
|
|
300
300
|
for (let r4 = 0; r4 < o3.length; r4++) e2[o3[r4]]?.style && (t3[o3[r4]] = { style: e2[o3[r4]].style, color: e2[o3[r4]].color }, n3 || t3[o3[r4]].style === a.StrokeStyle.None || (n3 = true));
|
|
301
301
|
o3.length < 6 && (n3 = true);
|
|
302
302
|
const r3 = n3 ? t3.left : null, l3 = n3 ? t3.top : null, i3 = n3 ? t3.right : null, d3 = n3 ? t3.bottom : null, c3 = n3 ? t3.vertical : null, m3 = n3 ? t3.horizontal : null;
|
|
303
303
|
let p3 = "";
|
|
304
|
-
return l3 || r3 || (p3 += "M 3,5 H 5 V 3 H 3 "), l3 || (p3 += "M 7,5 H 9 V 3 H 7 "), l3 || c3 || (p3 += "M 11,5 h 2 V 3 h -2 "), l3 || (p3 += "M 15,5 h 2 V 3 h -2 "), l3 || i3 || (p3 += "M 19,5 h 2 V 3 h -2 "), r3 || (p3 += "M 3,9 H 5 V 7 H 3 "), c3 || (p3 += "M 11,9 h 2 V 7 h -2 "), i3 || (p3 += "M 19,9 h 2 V 7 h -2 "), m3 || r3 || (p3 += "M 3,13 H 5 V 11 H 3 "), m3 || (p3 += "M 7,13 H 9 V 11 H 7 "), m3 || c3 || (p3 += "M 11,13 h 2 v -2 h -2 "), m3 || i3 || (p3 += "M 19,13 h 2 v -2 h -2 "), m3 || (p3 += "M 15,13 h 2 v -2 h -2 "), r3 || (p3 += "M 3,17 H 5 V 15 H 3 "), c3 || (p3 += "M 11,17 h 2 v -2 h -2 "), i3 || (p3 += "M 19,17 h 2 v -2 h -2 "), d3 || r3 || (p3 += "M 3,21 H 5 V 19 H 3 "), d3 || (p3 += "M 7,21 H 9 V 19 H 7 "), d3 || c3 || (p3 += "M 11,21 h 2 v -2 h -2 "), d3 || (p3 += "M 15,21 h 2 v -2 h -2 "), d3 || i3 || (p3 += "M 19,21 h 2 v -2 h -2 "), b("div", { style: { width: "24px", height: "24px", position: "relative" }, children: [x($, { sx: { position: "absolute", top: "0px", left: "0px", "& path": { opacity: "0.8", transform: "translate(-0.5px, -0.5px)" } }, children: x("path", { d: p3 }) }), x(A, { sx: { width: "24px", height: "24px", display: "flex", alignItems: "center", justifyContent: "center", position: "absolute", top: "-1px", left: "-1px", "& svg path": { filter: Ae } }, children: x(
|
|
304
|
+
return l3 || r3 || (p3 += "M 3,5 H 5 V 3 H 3 "), l3 || (p3 += "M 7,5 H 9 V 3 H 7 "), l3 || c3 || (p3 += "M 11,5 h 2 V 3 h -2 "), l3 || (p3 += "M 15,5 h 2 V 3 h -2 "), l3 || i3 || (p3 += "M 19,5 h 2 V 3 h -2 "), r3 || (p3 += "M 3,9 H 5 V 7 H 3 "), c3 || (p3 += "M 11,9 h 2 V 7 h -2 "), i3 || (p3 += "M 19,9 h 2 V 7 h -2 "), m3 || r3 || (p3 += "M 3,13 H 5 V 11 H 3 "), m3 || (p3 += "M 7,13 H 9 V 11 H 7 "), m3 || c3 || (p3 += "M 11,13 h 2 v -2 h -2 "), m3 || i3 || (p3 += "M 19,13 h 2 v -2 h -2 "), m3 || (p3 += "M 15,13 h 2 v -2 h -2 "), r3 || (p3 += "M 3,17 H 5 V 15 H 3 "), c3 || (p3 += "M 11,17 h 2 v -2 h -2 "), i3 || (p3 += "M 19,17 h 2 v -2 h -2 "), d3 || r3 || (p3 += "M 3,21 H 5 V 19 H 3 "), d3 || (p3 += "M 7,21 H 9 V 19 H 7 "), d3 || c3 || (p3 += "M 11,21 h 2 v -2 h -2 "), d3 || (p3 += "M 15,21 h 2 v -2 h -2 "), d3 || i3 || (p3 += "M 19,21 h 2 v -2 h -2 "), b("div", { style: { width: "24px", height: "24px", position: "relative" }, children: [x($, { sx: { position: "absolute", top: "0px", left: "0px", "& path": { opacity: "0.8", transform: "translate(-0.5px, -0.5px)" } }, children: x("path", { d: p3 }) }), x(A, { sx: { width: "24px", height: "24px", display: "flex", alignItems: "center", justifyContent: "center", position: "absolute", top: "-1px", left: "-1px", "& svg path": { filter: Ae } }, children: x(Pa, { getBorderAt: (e3, n4) => {
|
|
305
305
|
if (!u2 || 0 === o3.length) return null;
|
|
306
306
|
const a2 = e3.rowIndex, r4 = e3.colIndex, l4 = {};
|
|
307
307
|
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);
|
|
@@ -321,50 +321,50 @@ const tr = k(S((e2, t2) => {
|
|
|
321
321
|
}, []), I2 = v((t3) => {
|
|
322
322
|
const { closeFloatAll: o3, floatReference: l3 } = t3, c3 = (e2, t4, n3 = "bottom", r3 = false) => {
|
|
323
323
|
const l4 = B2(e2, R2 ?? null, r3 ? a.StrokeStyle.None : P2 ?? null), i3 = r3 ? B2([], R2 ?? null, P2 ?? null) : l4;
|
|
324
|
-
return x(He, { icon: F2(i3), sx: { background: `linear-gradient(${
|
|
324
|
+
return x(He, { icon: F2(i3), sx: { background: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, tooltipProps: { label: t4, simple: true, placement: n3 }, onClick: () => {
|
|
325
325
|
o3(), E2(l4), N2(l4);
|
|
326
326
|
} });
|
|
327
|
-
}, m3 = b(y, { children: [b(A, { 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")] }), b(A, { 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 = x(y, { children: b(A, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [x(
|
|
327
|
+
}, m3 = b(y, { children: [b(A, { 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")] }), b(A, { 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 = x(y, { children: b(A, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [x(kr, { variant: Re.Toolbar, icon: x(Ie, {}), selectedColor: P2 === a.StrokeStyle.None ? new e("transparent") : R2, onPreviewColor: (e2) => {
|
|
328
328
|
T2(e2);
|
|
329
329
|
}, onSelectColor: (e2, t4) => {
|
|
330
330
|
T2(e2);
|
|
331
|
-
}, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || P2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), x(
|
|
331
|
+
}, darkMode: s2, tooltip: "Border Color", panelProps: { disableAlpha: true, autoColor: n2, schemeLookup: r2 }, disabled: i2 || P2 === a.StrokeStyle.None, parentFloat: l3, shouldCloseFloatAll: false }), x(vr, { selectedStyle: P2, onSelectStyle: k2, styleColor: R2, darkMode: s2, variant: Re.Toolbar, parentFloat: l3 })] }) });
|
|
332
332
|
return b(A, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (e2) => e2.stopPropagation(), children: [d2 ? p3 : m3, x(ie, { orientation: "horizontal" }), d2 ? m3 : p3] });
|
|
333
333
|
}, [P2, R2, n2, r2, s2]), L2 = C(() => F2(M2), [M2, s2]);
|
|
334
334
|
return x(Me, { ref: o2, createPopupPanel: I2, popupProps: { popperProps: { resizeOnOverflow: false } }, createTooltip: ({ children: e2 }, t3) => x(Le, { label: "Borders", description: "Set the borders.", disabled: t3, children: e2 }), onQuickClick: () => {
|
|
335
335
|
h2?.(M2);
|
|
336
336
|
}, quickButtonProps: { sx: {} }, disabled: i2, icon: L2, ...g2 });
|
|
337
|
-
})),
|
|
338
|
-
const { commands: o2, command: n2, commandHook: a2, variant: r2 =
|
|
337
|
+
})), Dr = k(S((e2, t2) => {
|
|
338
|
+
const { commands: o2, command: n2, commandHook: a2, variant: r2 = aa.Toolbar, disabled: l2 = false, autoColor: i2, autoStrokeStyle: s2, schemeLookup: d2, createTemporaryBorder: c2, selectedBorder: m2, onSelectBorder: p2, darkMode: u2, icon: g2, label: h2, ...f2 } = e2, b2 = na(o2, ["formatBorder"]), y2 = n2 ?? b2[0], w2 = y2?.context() ?? null, k2 = w2?.autoColor ?? i2, S2 = w2?.autoStyle ?? s2, C2 = m2 ?? w2?.quickBorder, T2 = u2 ?? w2?.darkMode, D2 = c2 ?? w2?.createTemporaryBorder, P2 = d2 ?? w2?.schemeLookup, R2 = ra((e3) => {
|
|
339
339
|
w2?.onBorderSelect && w2.onBorderSelect(e3), p2?.(e3), y2?.execute(e3, a2);
|
|
340
340
|
}, [y2, p2, a2]), M2 = v((e3, t3) => {
|
|
341
341
|
const { children: o3, title: n3, ...a3 } = e3;
|
|
342
342
|
let i3 = e3.children;
|
|
343
|
-
return (y2?.disabled() || l2) && (i3 = x("div", { children: i3 })), x(We, { command: y2, placement: r2 ===
|
|
343
|
+
return (y2?.disabled() || l2) && (i3 = x("div", { children: i3 })), x(We, { command: y2, placement: r2 === aa.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...a3, children: i3 });
|
|
344
344
|
}, [y2, l2]);
|
|
345
|
-
return x(
|
|
346
|
-
})),
|
|
345
|
+
return x(Tr, { ref: t2, autoColor: k2, darkMode: T2, autoStrokeStyle: S2, createTemporaryBorder: D2, schemeLookup: P2, selectedBorder: C2, onSelectBorder: R2, createTooltip: M2, disabled: l2 || !y2 || y2.disabled(), ...f2 });
|
|
346
|
+
})), Pr = k(S((e2, t2) => {
|
|
347
347
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
|
|
348
|
-
const o3 = { variant:
|
|
348
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("mergeToggle"), icon: re(x(ze, {})) }), x(le, { ...o3, command: t3.getCommand("mergeHorizontal"), icon: re(x($e, {})) }), x(le, { ...o3, command: t3.getCommand("mergeVertical"), icon: re(x(Oe, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("unmerge"), icon: re(x(Ve, {})) })] });
|
|
349
349
|
return ce({ ...e3, children: l3 });
|
|
350
350
|
}, [r2, n2, a2]);
|
|
351
351
|
return x(me, { ref: t2, commands: o2, quickCommand: "mergeToggle", commandHook: n2, scope: a2, tooltip: "Combine or split cells.", createPopupPanel: i2, icon: re(x(ze, {})), ...l2 });
|
|
352
|
-
})),
|
|
352
|
+
})), Rr = k(S((e2, t2) => {
|
|
353
353
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
|
|
354
|
-
const o3 = { variant:
|
|
354
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("freezeToggle"), icon: re(x(Ge, {})) }), x(le, { ...o3, command: t3.getCommand("freezeToggleHorizontal"), icon: re(x(Ue, {})) }), x(le, { ...o3, command: t3.getCommand("freezeToggleVertical"), icon: re(x(je, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("unfreeze"), icon: x(Ve, {}) })] });
|
|
355
355
|
return ce({ ...e3, children: l3 });
|
|
356
356
|
}, [r2, n2, a2]);
|
|
357
357
|
return x(me, { 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: x(_e, {}), ...l2 });
|
|
358
|
-
})),
|
|
358
|
+
})), Mr = k(S((e2, t2) => {
|
|
359
359
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
|
|
360
|
-
const o3 = { variant:
|
|
360
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("find"), icon: re(x(qe, {})) }), x(le, { ...o3, command: t3.getCommand("findReplace"), icon: re(x(Ke, {})) }), x(le, { ...o3, command: t3.getCommand("goto"), icon: re(x(Xe, {})) })] });
|
|
361
361
|
return ce({ ...e3, children: l3 });
|
|
362
362
|
}, [r2, n2, a2]);
|
|
363
363
|
return x(me, { 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: re(x(qe, {})), ...l2 });
|
|
364
|
-
})),
|
|
365
|
-
const { command: o2, commandHook: n2, showQuickButtons: a2 = !!e2.commands, commands: l2, fontSizes: i2 =
|
|
366
|
-
|
|
367
|
-
const g2 = () => o2?.state()?.toString() || "11", [h2, f2] = D(g2), y2 =
|
|
364
|
+
})), Fr = k(S((e2, t2) => {
|
|
365
|
+
const { command: o2, commandHook: n2, showQuickButtons: a2 = !!e2.commands, commands: l2, fontSizes: i2 = Ra.DefaultFontSizes, disabled: s2 = false, parentFloat: d2, icon: c2, label: m2, sx: p2, ...u2 } = e2;
|
|
366
|
+
sa(o2);
|
|
367
|
+
const g2 = () => o2?.state()?.toString() || "11", [h2, f2] = D(g2), y2 = ra(() => {
|
|
368
368
|
const e3 = parseFloat(h2);
|
|
369
369
|
isNaN(e3) ? f2(g2()) : parseFloat(g2()) !== e3 && o2.execute(e3, n2);
|
|
370
370
|
}, [g2, o2, h2, n2]);
|
|
@@ -375,19 +375,19 @@ const tr = k(S((e2, t2) => {
|
|
|
375
375
|
if (!n2) return null;
|
|
376
376
|
const e3 = { ...n2 };
|
|
377
377
|
return delete e3.beforeExecute, e3;
|
|
378
|
-
}, [n2]), k2 =
|
|
378
|
+
}, [n2]), k2 = na(l2, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), S2 = C(() => k2 ? b(A, { className: Hn("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e3) => e3.stopPropagation(), children: [x(le, { command: k2[0], commandHook: w2, icon: re(x(Ze, {})) }), x(le, { command: k2[1], icon: re(x(Je, {})) })] }) : null, [k2]), T2 = Sa(), R2 = C(() => `${r.getSharedMeasurer()("12.3", Math.round(T2.typography.fontSize), T2.typography.fontFamily).width}px`, [T2]), M2 = v((e3) => {
|
|
379
379
|
const { onMouseDown: t3, onMouseUp: n3, ...a3 } = e3;
|
|
380
380
|
return x(L, { component: "div", ...a3, disableRipple: true, children: x(O, { inputMode: "numeric", disabled: s2 || !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: R2, color: (e4) => e4.palette.text.secondary, input: { padding: "0 0", textAlign: "center", 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" }, minHeight: "24px" }, value: h2, onFocus: (e4) => {
|
|
381
381
|
e4.target?.select();
|
|
382
382
|
}, onKeyDown: (e4) => {
|
|
383
|
-
if (e4.which ===
|
|
384
|
-
else if (e4.which ===
|
|
383
|
+
if (e4.which === ia.Enter) g2() !== h2 && (e4.stopPropagation(), e4.preventDefault(), y2());
|
|
384
|
+
else if (e4.which === ia.Escape) g2() !== h2 && (f2(g2()), setTimeout(() => {
|
|
385
385
|
e4.target?.select();
|
|
386
386
|
}, 0), e4.stopPropagation(), e4.preventDefault());
|
|
387
387
|
else {
|
|
388
388
|
if (e4.key.match("[-]")) return e4.stopPropagation(), void e4.preventDefault();
|
|
389
389
|
if (e4.key.match("[0-9.]") && (h2 + e4.key).length > 4) return e4.stopPropagation(), void e4.preventDefault();
|
|
390
|
-
if (e4.which ===
|
|
390
|
+
if (e4.which === ia.Space) return void e4.preventDefault();
|
|
391
391
|
}
|
|
392
392
|
}, onBlur: () => {
|
|
393
393
|
y2();
|
|
@@ -406,24 +406,24 @@ const tr = k(S((e2, t2) => {
|
|
|
406
406
|
}, onMouseUp: (o3) => {
|
|
407
407
|
0 === o3.button && t3(i2[e4]);
|
|
408
408
|
}, onKeyDown: (o3) => {
|
|
409
|
-
o3.keyCode !==
|
|
409
|
+
o3.keyCode !== ia.Enter && o3.keyCode !== ia.Space || t3(i2[e4]);
|
|
410
410
|
}, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: x(A, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: i2[e4] }) }, "fontSize-" + e4));
|
|
411
411
|
}
|
|
412
412
|
const l3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...u2, children: [S2, x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 })] });
|
|
413
413
|
return ce({ ...e3, children: l3 });
|
|
414
414
|
}, [s2, o2?.state(), n2]);
|
|
415
415
|
return x(Me, { ref: t2, sx: { ...p2 }, tabIndex: -1, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: F2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: o2?.label(), description: o2?.description(), disabled: t3 || o2?.disabled(), children: e3 }), createQuickButton: M2, ...u2 });
|
|
416
|
-
})),
|
|
416
|
+
})), Br = k((e2) => {
|
|
417
417
|
const { selected: t2, disabled: o2, formattedValue: n2, handleSetFormat: a2, format: r2, sx: i2, ...s2 } = e2;
|
|
418
418
|
return x(Ne, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...i2 }, disabled: o2, selected: t2, icon: t2 ? x(Ye, {}) : void 0, onMouseDown: (e3) => {
|
|
419
419
|
0 === e3.button && e3.preventDefault();
|
|
420
420
|
}, onMouseUp: (e3) => {
|
|
421
421
|
0 === e3.button && a2(r2.numberFormat);
|
|
422
422
|
}, onKeyDown: (e3) => {
|
|
423
|
-
e3.keyCode !==
|
|
424
|
-
}, ...s2, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [b(I, { component: "div", children: [r2.formatType, r2.formatType === l.Type.Custom ? "…" : ""] }), x(I, { variant: "caption", component: "div", sx: { color: (e3) =>
|
|
425
|
-
}),
|
|
426
|
-
const { commands: o2, commandHook: n2, scope: a2, sx: i2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 =
|
|
423
|
+
e3.keyCode !== ia.Enter && e3.keyCode !== ia.Space || a2(r2.numberFormat);
|
|
424
|
+
}, ...s2, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [b(I, { component: "div", children: [r2.formatType, r2.formatType === l.Type.Custom ? "…" : ""] }), x(I, { variant: "caption", component: "div", sx: { color: (e3) => Oa(e3.palette.text.primary, 0.6), paddingTop: n2 && n2.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: n2 && n2.length > 0 ? n2 : " " })] }) });
|
|
425
|
+
}), Nr = k(S((e2, t2) => {
|
|
426
|
+
const { commands: o2, commandHook: n2, scope: a2, sx: i2, disabled: s2 = false, parentFloat: d2, ...c2 } = e2, m2 = na(o2, ["formatNumberFormat"])[0], p2 = m2?.state() ? l.Styles.lookupStyle(m2?.state()).formatType : l.Type.General, u2 = C(() => {
|
|
427
427
|
if (!n2) return null;
|
|
428
428
|
const e3 = { ...n2 };
|
|
429
429
|
return delete e3.beforeExecute, e3;
|
|
@@ -440,100 +440,100 @@ const tr = k(S((e2, t2) => {
|
|
|
440
440
|
}
|
|
441
441
|
"" === t4 && i3[e4].formatType === l.Type.General && (t4 = "No specific format");
|
|
442
442
|
const n3 = i3[e4].formatType === p2;
|
|
443
|
-
d3.push(x(
|
|
443
|
+
d3.push(x(Br, { selected: n3, disabled: s2 || !m2 || m2.disabled(), formattedValue: t4, handleSetFormat: o3, format: i3[e4] }, i3[e4].formatType));
|
|
444
444
|
}
|
|
445
|
-
const g3 = { numberFormat: "", formatType: l.Type.Custom }, h3 = p2 === l.Type.Custom, f3 = x(
|
|
445
|
+
const g3 = { numberFormat: "", formatType: l.Type.Custom }, h3 = p2 === l.Type.Custom, f3 = x(Br, { selected: h3, disabled: s2 || !m2 || m2.disabled(), formattedValue: h3 ? r2.getNumberFormat().displayText : "", handleSetFormat: () => {
|
|
446
446
|
n2?.beforeExecute?.(m2, m2?.state()), t3.getCommand("formatNumberDialog")?.execute(m2?.state()), n2?.onExecute?.(m2, m2?.state());
|
|
447
447
|
}, format: g3, sx: { flex: "0", width: "100%" } }, l.Type.Custom), y2 = b(A, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (e4) => e4.stopPropagation(), children: [x(le, { command: t3.getCommand("formatNumberFormatAccountingStyle"), commandHook: u2, scope: a2, icon: x(Qe, {}) }), x(le, { command: t3.getCommand("formatNumberFormatPercentStyle"), commandHook: u2, scope: a2, icon: x(et, {}) }), x(le, { command: t3.getCommand("formatNumberFormatCommaStyle"), commandHook: u2, scope: a2, icon: x(tt, {}) }), x(le, { command: t3.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: u2, scope: a2, icon: re(x(ot, {})) }), x(le, { command: t3.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: u2, scope: a2, icon: re(x(nt, {})) })] }), w2 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...c2, children: [y2, x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: d3 }), x(ie, { orientation: "horizontal" }), f3] });
|
|
448
448
|
return ce({ ...e3, children: w2 });
|
|
449
|
-
}, [m2?.context(), m2?.state(), n2, a2]), h2 =
|
|
449
|
+
}, [m2?.context(), m2?.state(), n2, a2]), h2 = Sa(), f2 = C(() => {
|
|
450
450
|
const e3 = l.Type.MediumTime;
|
|
451
451
|
return `${r.getSharedMeasurer()(e3, Math.round(h2.typography.fontSize), h2.typography.fontFamily).width}px`;
|
|
452
452
|
}, [h2]);
|
|
453
453
|
return x(me, { ref: t2, commands: o2, sx: i2, outlined: true, disabled: s2, parentFloat: d2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: m2?.label(), description: m2?.description(), disabled: t3, children: e3 }), icon: x(A, { 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: x(A, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: p2 }) }), ...c2 });
|
|
454
|
-
})),
|
|
454
|
+
})), Er = k(S((e2, t2) => {
|
|
455
455
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
|
|
456
|
-
const o3 = { variant:
|
|
456
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "clear", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("clearAll"), icon: x(at, {}) }), x(le, { ...o3, command: t3.getCommand("clearFormats"), icon: re(x(rt, {})) }), x(le, { ...o3, command: t3.getCommand("clearContents"), icon: re(x(lt, {})) }), x(le, { ...o3, command: t3.getCommand("clearComments") }), x(le, { ...o3, command: t3.getCommand("clearHyperlinks") })] });
|
|
457
457
|
return ce({ ...e3, children: a3 });
|
|
458
458
|
}, [r2, n2, a2]);
|
|
459
459
|
return x(me, { 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: x(at, {}), ...l2 });
|
|
460
|
-
})),
|
|
460
|
+
})), Ar = k(S((e2, t2) => {
|
|
461
461
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
|
|
462
|
-
const o3 = { variant:
|
|
462
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "fill", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("fillDown"), icon: re(x(it, {})) }), x(le, { ...o3, command: t3.getCommand("fillRight"), icon: re(x(it, { sx: { transform: "rotate(270deg)" } })) }), x(le, { ...o3, command: t3.getCommand("fillUp"), icon: re(x(it, { sx: { transform: "rotate(180deg)" } })) }), x(le, { ...o3, command: t3.getCommand("fillLeft"), icon: re(x(it, { sx: { transform: "rotate(90deg)" } })) })] });
|
|
463
463
|
return ce({ ...e3, children: a3 });
|
|
464
464
|
}, [r2, n2, a2]);
|
|
465
465
|
return x(me, { 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: re(x(it, {})), ...l2 });
|
|
466
|
-
})),
|
|
467
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 =
|
|
466
|
+
})), Ir = k(S((e2, t2) => {
|
|
467
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = aa.Toolbar, ...c2 } = e2, m2 = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"], p2 = na(o2, m2), { singleCommand: u2, allDisabled: g2 } = C(() => {
|
|
468
468
|
let e3 = null, t3 = 0;
|
|
469
|
-
for (let o3 = 0; o3 < p2.length; o3++) p2[o3] && !p2[o3]?.disabled() && (i2 && d2 ===
|
|
469
|
+
for (let o3 = 0; o3 < p2.length; o3++) p2[o3] && !p2[o3]?.disabled() && (i2 && d2 === aa.Menuitem && (e3 = 0 === t3 ? p2[o3] : null), t3++);
|
|
470
470
|
return { singleCommand: e3, allDisabled: 0 === t3 };
|
|
471
471
|
}, [p2]), h2 = C(() => {
|
|
472
472
|
const e3 = /* @__PURE__ */ new Map();
|
|
473
473
|
return e3.set("insertCellsShiftDown", re(x(st, {}))), e3.set("insertCellsShiftRight", re(x(st, { sx: { transform: "rotate(270deg)" } }))), e3.set("insertRows", re(x(dt, {}))), e3.set("insertColumns", re(x(ct, {}))), e3;
|
|
474
474
|
}, []), f2 = v((e3, t3) => {
|
|
475
475
|
let o3 = null;
|
|
476
|
-
const a3 = { variant:
|
|
476
|
+
const a3 = { variant: aa.Menuitem, commandHook: n2, scope: "insertCells", disabled: r2 };
|
|
477
477
|
l2 || (o3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { ...a3, command: t3.getCommand("addSheet"), icon: re(x(mt, {})) })] }));
|
|
478
478
|
const i3 = b(y, { children: [x(le, { ...a3, command: p2[0], icon: h2.get(m2[0]) }), x(le, { ...a3, command: p2[1], icon: h2.get(m2[1]) }), x(ie, { orientation: "horizontal" }), x(le, { ...a3, command: p2[2], icon: h2.get(m2[2]) }), x(le, { ...a3, command: p2[3], icon: h2.get(m2[3]) }), o3] });
|
|
479
479
|
return ce({ ...e3, children: i3 });
|
|
480
480
|
}, [r2, p2, n2, a2, h2]);
|
|
481
481
|
return u2 ? x(le, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: u2, icon: h2.get(u2.key()), ...c2 }) : x(me, { ref: t2, variant: d2, quickCommand: "insertCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || g2, tooltip: b(y, { children: [x("span", { children: "Insert new cells, rows or columns to your workbook." }), x("br", {}), x("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: f2, icon: re(x(ct, {})), ...c2 });
|
|
482
|
-
})),
|
|
483
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 =
|
|
482
|
+
})), Lr = k(S((e2, t2) => {
|
|
483
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, disableSheet: l2 = false, preferSingleMenu: i2 = true, showQuickButton: s2 = true, variant: d2 = aa.Toolbar, ...c2 } = e2, m2 = na(o2, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: p2, allDisabled: u2 } = C(() => {
|
|
484
484
|
let e3 = null, t3 = 0;
|
|
485
|
-
for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && d2 ===
|
|
485
|
+
for (let o3 = 0; o3 < m2.length; o3++) m2[o3] && !m2[o3]?.disabled() && (i2 && d2 === aa.Menuitem && (e3 = 0 === t3 ? m2[o3] : null), t3++);
|
|
486
486
|
return { singleCommand: e3, allDisabled: 0 === t3 };
|
|
487
487
|
}, [m2]), g2 = C(() => {
|
|
488
488
|
const e3 = /* @__PURE__ */ new Map();
|
|
489
489
|
return e3.set("deleteCellsShiftUp", re(x(pt, { sx: { transform: "rotate(0deg)" } }))), e3.set("deleteCellsShiftLeft", re(x(pt, { sx: { transform: "rotate(270deg)" } }))), e3.set("deleteRows", re(x(ut, {}))), e3.set("deleteColumns", re(x(gt, {}))), e3;
|
|
490
490
|
}, []), h2 = v((e3, t3) => {
|
|
491
|
-
const o3 = { variant:
|
|
491
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "deleteCells", disabled: r2 };
|
|
492
492
|
let a3 = null;
|
|
493
493
|
l2 || (a3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("deleteSheet"), icon: re(x(mt, {})) })] }));
|
|
494
494
|
const i3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("deleteCellsShiftUp"), icon: g2.get("deleteCellsShiftUp") }), x(le, { ...o3, command: t3.getCommand("deleteCellsShiftLeft"), icon: g2.get("deleteCellsShiftLeft") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("deleteRows"), icon: g2.get("deleteRows") }), x(le, { ...o3, command: t3.getCommand("deleteColumns"), icon: g2.get("deleteColumns") }), a3] });
|
|
495
495
|
return ce({ ...e3, children: i3 });
|
|
496
496
|
}, [r2, n2, a2, g2]);
|
|
497
497
|
return p2 ? x(le, { ref: t2, variant: d2, commandHook: n2, disabled: r2, command: p2, icon: g2.get(p2.key()), ...c2 }) : x(me, { ref: t2, variant: d2, quickCommand: "deleteCells", commands: o2, commandHook: n2, scope: a2, disabled: r2 || u2, tooltip: b(y, { children: [x("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), x("br", {}), x("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: h2, icon: re(x(gt, {})), ...c2 });
|
|
498
|
-
})),
|
|
499
|
-
const { command: n2, commandHook: a2, onSelectColor: r2, disabled: l2 = false, variant: i2 =
|
|
498
|
+
})), Hr = k(S((t2, o2) => {
|
|
499
|
+
const { command: n2, commandHook: a2, onSelectColor: r2, disabled: l2 = false, variant: i2 = aa.Toolbar, quickColor: s2, panelProps: d2, isSplit: c2 = false, darkMode: m2, icon: p2, ...u2 } = t2, { autoColor: g2, schemeLookup: h2, recentColors: f2, ...b2 } = d2;
|
|
500
500
|
if (u2.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
|
|
501
|
-
|
|
501
|
+
sa(n2);
|
|
502
502
|
const y2 = n2?.context();
|
|
503
503
|
let w2 = s2 ?? y2?.quickColor;
|
|
504
504
|
c2 && !w2 && (w2 = new e("transparent"));
|
|
505
|
-
const k2 = g2 ?? y2?.autoColor, S2 = h2 ?? y2?.schemeLookup, T2 = f2 ?? y2?.recentColors, D2 = m2 ?? y2?.darkMode, P2 = C(() => ({ autoColor: k2, schemeLookup: S2, recentColors: T2, darkMode: D2, ...b2 }), [k2, S2, T2, D2]), R2 =
|
|
505
|
+
const k2 = g2 ?? y2?.autoColor, S2 = h2 ?? y2?.schemeLookup, T2 = f2 ?? y2?.recentColors, D2 = m2 ?? y2?.darkMode, P2 = C(() => ({ autoColor: k2, schemeLookup: S2, recentColors: T2, darkMode: D2, ...b2 }), [k2, S2, T2, D2]), R2 = ra((e2, t3) => {
|
|
506
506
|
e2 && t3 && y2?.addRecentColor && y2.addRecentColor(e2), y2?.onColorSelect && y2.onColorSelect(e2), r2?.(e2, t3), n2?.execute(e2, a2);
|
|
507
507
|
}, [n2, r2, a2, y2]), M2 = v((e2, t3) => {
|
|
508
508
|
const { children: o3, title: a3, ...r3 } = e2;
|
|
509
509
|
let s3 = e2.children;
|
|
510
|
-
return (n2?.disabled() || l2) && (s3 = x("div", { children: s3 })), x(We, { command: n2, placement: i2 ===
|
|
510
|
+
return (n2?.disabled() || l2) && (s3 = x("div", { children: s3 })), x(We, { command: n2, placement: i2 === aa.Toolbar ? "bottom-start" : "right-start", disabled: t3, ...r3, children: s3 });
|
|
511
511
|
}, [n2, l2]);
|
|
512
|
-
return x(
|
|
512
|
+
return x(kr, { ref: o2, panelProps: P2, icon: p2, quickColor: w2, selectedColor: n2?.state(), onSelectColor: R2, variant: i2 === aa.Menuitem ? Re.Menuitem : Re.Toolbar, createTooltip: M2, label: n2?.label(), disabled: l2 || !n2 || n2.disabled(), compareRGB: true, darkMode: D2, ...u2 });
|
|
513
513
|
}));
|
|
514
|
-
|
|
515
|
-
const
|
|
516
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 =
|
|
517
|
-
const o3 = { variant:
|
|
514
|
+
Hr.displayName = "ColorCommandButton";
|
|
515
|
+
const Wr = k(S((e2, t2) => {
|
|
516
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = na(o2, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), d2 = v((e3, t3) => {
|
|
517
|
+
const o3 = { variant: aa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("gridlinesToggle") }), x(Hr, { ...o3, command: t3.getCommand("sheetViewFormatGridlinesColor"), icon: x(Ie, {}), panelProps: { disableAlpha: true } }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesColumns") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleGridlinesRows") })] });
|
|
518
518
|
return ce({ ...e3, children: l3 });
|
|
519
519
|
}, [r2, n2]);
|
|
520
520
|
return x(me, { 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: x(ht, { command: s2[0], scope: "view" }), ...i2 });
|
|
521
|
-
})),
|
|
521
|
+
})), zr = k(S((e2, t2) => {
|
|
522
522
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
|
|
523
|
-
const o3 = { variant:
|
|
523
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = t3.getCommand("sortCustom"), l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("sortAscending"), icon: re(x(ft, {})) }), x(le, { ...o3, command: t3.getCommand("sortDescending"), icon: re(x(xt, {})) }), a3 ? x(le, { ...o3, command: a3, icon: re(x(bt, {})) }) : null, x(ie, { orientation: "horizontal" }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: re(x(yt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: re(x(wt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: re(x(kt, {})) })] });
|
|
524
524
|
return ce({ ...e3, children: l3 });
|
|
525
525
|
}, [r2, n2, a2]);
|
|
526
526
|
return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Sort", tooltip: b(y, { children: [x("span", { children: "Organize your data so it's easier to analyze." }), x("br", {}), x("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: re(x(ft, {})), ...l2 });
|
|
527
|
-
})),
|
|
527
|
+
})), $r = k(S((e2, t2) => {
|
|
528
528
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = v((e3, t3) => {
|
|
529
|
-
const o3 = { variant:
|
|
529
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "sort", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterToggle"), icon: re(x(yt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterClear"), icon: re(x(wt, {})) }), x(le, { ...o3, scope: "filter", command: t3.getCommand("autoFilterReapply"), icon: re(x(kt, {})) })] });
|
|
530
530
|
return ce({ ...e3, children: a3 });
|
|
531
531
|
}, [r2, n2, a2]);
|
|
532
532
|
return x(me, { ref: t2, commands: o2, commandHook: n2, scope: a2, disabled: r2, label: "Filter", tooltip: b(y, { children: [x("span", { children: "Organize your data so it's easier to analyze." }), x("br", {}), x("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: i2, icon: re(x(yt, {})), ...l2 });
|
|
533
|
-
})),
|
|
533
|
+
})), Or = k(S((e2, t2) => {
|
|
534
534
|
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];
|
|
535
535
|
!a2 && r2 && p2.push("redo");
|
|
536
|
-
const u2 =
|
|
536
|
+
const u2 = na(c2, p2), g2 = u2[0], h2 = u2[1], f2 = l2 ?? g2?.context?.()?.undoManager;
|
|
537
537
|
let w2 = d2;
|
|
538
538
|
d2 || (w2 = !g2 || g2.disabled(), h2 && !h2.disabled() && (w2 = false));
|
|
539
539
|
const [k2, S2] = D(0), C2 = v((e3, t3) => {
|
|
@@ -548,7 +548,7 @@ const Lr = k(S((e2, t2) => {
|
|
|
548
548
|
}, onMouseUp: (e4) => {
|
|
549
549
|
0 === e4.button && l3(k2);
|
|
550
550
|
}, onKeyDown: (e4) => {
|
|
551
|
-
e4.isDefaultPrevented() || e4.keyCode !==
|
|
551
|
+
e4.isDefaultPrevented() || e4.keyCode !== ia.Enter && e4.keyCode !== ia.Space || l3(k2);
|
|
552
552
|
}, children: x(I, { component: "div", variant: "caption", sx: { fontSize: "0.875rem", letterSpacing: "0.01071em" }, children: o3 }) });
|
|
553
553
|
if (n3) return i3;
|
|
554
554
|
const s3 = a2 ? f2?.getRedoDescriptions() : f2?.getUndoDescriptions(), d3 = [];
|
|
@@ -561,13 +561,13 @@ const Lr = k(S((e2, t2) => {
|
|
|
561
561
|
}, onMouseUp: (t5) => {
|
|
562
562
|
0 === t5.button && l3(e4 + 1);
|
|
563
563
|
}, onKeyDown: (t5) => {
|
|
564
|
-
t5.isDefaultPrevented() || t5.keyCode !==
|
|
564
|
+
t5.isDefaultPrevented() || t5.keyCode !== ia.Enter && t5.keyCode !== ia.Space || l3(e4 + 1);
|
|
565
565
|
}, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [x(I, { component: "div", children: t4 }), x(mt, {})] }) }, `action:${e4}`));
|
|
566
566
|
}
|
|
567
567
|
let c3 = null;
|
|
568
568
|
if (!a2 && r2) {
|
|
569
|
-
const o4 = { scope: "undo", commands: t3, variant:
|
|
570
|
-
c3 = [], c3.push(x(
|
|
569
|
+
const o4 = { scope: "undo", commands: t3, variant: aa.Menuitem, parentFloat: e3.floatReference };
|
|
570
|
+
c3 = [], c3.push(x(Or, { ...o4, quickCommand: "redo", isRedo: true }, "nested:redo")), f2.hasRedo() && f2.hasUndo() && c3.push(x(ie, { orientation: "horizontal" }, "action:redo-div"));
|
|
571
571
|
}
|
|
572
572
|
const m3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
|
|
573
573
|
e3.closeFloatAll();
|
|
@@ -577,17 +577,17 @@ const Lr = k(S((e2, t2) => {
|
|
|
577
577
|
return ce({ ...e3, children: m3 });
|
|
578
578
|
}, [g2?.context(), g2?.state(), i2, f2, k2, w2]);
|
|
579
579
|
return x(me, { ref: t2, commands: c2, quickCommand: o2, scope: i2, disabled: w2, label: g2?.label() ?? (a2 ? "Redo" : "Undo"), tooltip: x(y, { children: x("span", { children: `${g2?.label() ?? "No"} last actions.` }) }), createPopupPanel: C2, icon: n2 ?? re(x(a2 ? St : Ct, {})), selected: false, ...m2 });
|
|
580
|
-
})),
|
|
581
|
-
for (let e2 = 0; e2 <
|
|
582
|
-
const
|
|
580
|
+
})), Vr = i.getFontList(), Gr = /* @__PURE__ */ new Map();
|
|
581
|
+
for (let e2 = 0; e2 < Vr.length; e2++) Gr.set(Vr[e2].fontRef.getFamily(), Vr[e2]);
|
|
582
|
+
const Ur = k(S((e2, t2) => {
|
|
583
583
|
const { command: o2, commandHook: n2, sx: a2, disabled: l2 = false, parentFloat: i2, icon: s2, label: d2, ...c2 } = e2;
|
|
584
|
-
|
|
585
|
-
const m2 = o2?.state(), p2 =
|
|
584
|
+
sa(o2);
|
|
585
|
+
const m2 = o2?.state(), p2 = Sa(), u2 = C(() => `${r.getSharedMeasurer()("Times New Roman", Math.round(p2.typography.fontSize), p2.typography.fontFamily).width}px`, [p2]), g2 = v((e3) => {
|
|
586
586
|
const t3 = (e4) => {
|
|
587
587
|
o2?.execute(e4, n2);
|
|
588
588
|
}, a3 = [];
|
|
589
|
-
for (let e4 = 0; e4 <
|
|
590
|
-
|
|
589
|
+
for (let e4 = 0; e4 < Vr.length; e4++) a3.push({ key: Vr[e4].fontRef.getFamily(), description: Vr[e4].fontRef.getFamily() });
|
|
590
|
+
Gr.get(m2) || a3.unshift({ key: m2, description: m2 });
|
|
591
591
|
const r2 = [];
|
|
592
592
|
for (let e4 = 0; e4 < a3.length; e4++) {
|
|
593
593
|
const n3 = a3[e4].key === m2;
|
|
@@ -596,78 +596,78 @@ const Vr = k(S((e2, t2) => {
|
|
|
596
596
|
}, onMouseDown: (e5) => {
|
|
597
597
|
0 === e5.button && e5.preventDefault();
|
|
598
598
|
}, onKeyDown: (o3) => {
|
|
599
|
-
o3.keyCode !==
|
|
599
|
+
o3.keyCode !== ia.Enter && o3.keyCode !== ia.Space || t3(a3[e4].key);
|
|
600
600
|
}, children: x(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: x(I, { component: "div", sx: { whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", fontFamily: () => a3[e4]?.key }, children: a3[e4].description }) }) }, e4 + "" + a3[e4].key));
|
|
601
601
|
}
|
|
602
602
|
const i3 = x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ...c2, children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: r2 }) });
|
|
603
603
|
return ce({ ...e3, children: i3 });
|
|
604
604
|
}, [l2, o2?.state()]);
|
|
605
605
|
return x(Me, { ref: t2, sx: { ...a2 }, outlined: true, disabled: l2, parentFloat: i2, createPopupPanel: g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: o2?.label(), description: o2?.description(), disabled: t3, children: e3 }), icon: x(A, { 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: x(A, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m2 }) }), ...c2 });
|
|
606
|
-
})),
|
|
607
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 =
|
|
606
|
+
})), jr = k(S((e2, t2) => {
|
|
607
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), s2 = C(() => {
|
|
608
608
|
for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
|
|
609
609
|
return i2[0]?.key();
|
|
610
610
|
}, [i2]), d2 = C(() => {
|
|
611
611
|
const e3 = /* @__PURE__ */ new Map();
|
|
612
612
|
return e3.set("formatStrikeThroughToggle", re(x(vt, {}))), e3.set("formatSuperscriptToggle", re(x(Tt, {}))), e3.set("formatSubscriptToggle", re(x(Dt, {}))), e3;
|
|
613
613
|
}, []), c2 = v((e3, t3) => {
|
|
614
|
-
const o3 = { variant:
|
|
614
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "textEffects", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatStrikeThroughToggle"), icon: d2.get("formatStrikeThroughToggle") }), x(le, { ...o3, command: t3.getCommand("formatSuperscriptToggle"), icon: d2.get("formatSuperscriptToggle") }), x(le, { ...o3, command: t3.getCommand("formatSubscriptToggle"), icon: d2.get("formatSubscriptToggle") })] });
|
|
615
615
|
return ce({ ...e3, children: a3 });
|
|
616
616
|
}, [r2, n2, a2]);
|
|
617
617
|
return x(me, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, createPopupPanel: c2, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: d2.get(s2) ?? re(x(vt, {})), ...l2 });
|
|
618
|
-
})),
|
|
619
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 =
|
|
618
|
+
})), _r = k(S((e2, t2) => {
|
|
619
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), s2 = C(() => {
|
|
620
620
|
for (let e3 = 0; e3 < i2.length; e3++) if (i2[e3]?.state()) return i2[e3].key();
|
|
621
621
|
return i2[0]?.key();
|
|
622
622
|
}, [i2]), d2 = C(() => {
|
|
623
623
|
const e3 = /* @__PURE__ */ new Map();
|
|
624
624
|
return e3.set("formatUnderlinedToggle", re(x(Pt, {}))), e3.set("formatUnderlinedDoubleToggle", re(x(Rt, {}))), e3.set("formatUnderlinedAccountingToggle", re(x(Mt, {}))), e3.set("formatUnderlinedAccountingDoubleToggle", re(x(Ft, {}))), e3;
|
|
625
625
|
}, []), c2 = v((e3, t3) => {
|
|
626
|
-
const o3 = { variant:
|
|
626
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "underline", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("formatUnderlinedToggle"), icon: re(x(Pt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedDoubleToggle"), icon: re(x(Rt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedAccountingToggle"), commandHook: n2, icon: re(x(Mt, {})) }), x(le, { ...o3, command: t3.getCommand("formatUnderlinedAccountingDoubleToggle"), icon: re(x(Ft, {})) })] });
|
|
627
627
|
return ce({ ...e3, children: a3 });
|
|
628
628
|
}, [r2, n2, a2]);
|
|
629
629
|
return x(me, { ref: t2, quickCommand: s2, commands: o2, commandHook: n2, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: c2, icon: d2.get(s2) ?? re(x(Pt, {})), ...l2 });
|
|
630
|
-
})),
|
|
631
|
-
const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 =
|
|
632
|
-
const o3 = { variant:
|
|
630
|
+
})), qr = k(S((e2, t2) => {
|
|
631
|
+
const { command: o2, commands: n2, commandHook: a2, scope: r2, includePasteAllInPopup: l2 = true, disabled: i2 = false, ...s2 } = e2, d2 = ra((e3, t3) => {
|
|
632
|
+
const o3 = { variant: aa.Menuitem, commandHook: a2, scope: "paste", disabled: i2 }, n3 = [];
|
|
633
633
|
return l2 && (n3.push(F(le, { ...o3, command: t3.getCommand("paste"), key: "paste", icon: x(Bt, {}) })), n3.push(x(ie, { orientation: "horizontal" }, "paste-div"))), n3.push(F(le, { ...o3, command: t3.getCommand("pasteValues"), key: "pasteValues", icon: re(x(Nt, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteFormats"), key: "pasteFormats", icon: re(x(Et, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteFormulas"), key: "pasteFormulas", icon: re(x(At, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteTranspose"), key: "pasteTranspose", icon: re(x(It, {})) })), n3.push(F(le, { ...o3, command: t3.getCommand("pasteLinks"), key: "pasteLinks", icon: re(x(Lt, {})) })), ce({ ...e3, children: n3 });
|
|
634
634
|
}, [i2, a2, r2, l2]);
|
|
635
635
|
return x(me, { ref: t2, commands: n2, commandHook: a2, scope: r2, createPopupPanel: d2, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", icon: x(Bt, {}), ...s2 });
|
|
636
|
-
})),
|
|
637
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 =
|
|
638
|
-
const o3 = { variant:
|
|
636
|
+
})), Kr = k(S((e2, t2) => {
|
|
637
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, parentFloat: l2, ...i2 } = e2, s2 = na(o2, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), d2 = v((e3, t3) => {
|
|
638
|
+
const o3 = { variant: aa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadings") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingsNumeric") }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingColumns") }), x(le, { ...o3, command: t3.getCommand("sheetViewToggleShowHeadingRows") })] });
|
|
639
639
|
return ce({ ...e3, children: l3 });
|
|
640
640
|
}, [r2, n2, a2]);
|
|
641
641
|
return x(me, { 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: x(ht, { command: s2[0], scope: "view" }), ...i2 });
|
|
642
|
-
})),
|
|
642
|
+
})), Xr = k(S((e2, t2) => {
|
|
643
643
|
const { commands: o2, commandHook: n2, scope: a2 = "view", disabled: r2 = false, ...l2 } = e2, i2 = v((e3) => {
|
|
644
|
-
const t3 = { variant:
|
|
644
|
+
const t3 = { variant: aa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowFormulaBar") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowTabs") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowStatusBar") }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowHorizontalScrollBar") }), x(le, { ...t3, command: o2.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
|
|
645
645
|
return ce({ ...e3, children: l3 });
|
|
646
646
|
}, [r2, o2, n2, a2]);
|
|
647
647
|
return x(me, { 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: x(ht, { icon: null, label: "Workbook View" }), ...l2 });
|
|
648
|
-
})),
|
|
648
|
+
})), Zr = k(S((e2, t2) => {
|
|
649
649
|
const { value: o2, cellStyle: n2, styles: a2, createTemporaryCell: r2, bodyStyle: l2, sx: i2, borderProps: s2, disabled: c2, ...m2 } = e2, p2 = C(() => r2({ value: o2, style: n2 }), [o2, n2, r2]), u2 = C(() => p2.getStyle(), [p2, l2]), g2 = C(() => u2.getFill().toCSS(l2?.darkMode ?? false), [u2]), h2 = u2.getInsets(), f2 = u2.getFont(), b2 = v(() => u2.getBorder(), [u2]);
|
|
650
|
-
return x(A, { ref: t2, sx: { width: "100px", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter: c2 ? "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: d.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: x(
|
|
651
|
-
})),
|
|
650
|
+
return x(A, { ref: t2, sx: { width: "100px", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: l2?.fill, filter: c2 ? "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: d.toCSSHorizontalTextAlign(p2.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...i2 }, ...m2, children: x(Pa, { getBorderAt: b2, darkMode: l2?.darkMode ?? false, rowCount: 1, columnCount: 1, style: { display: "flex", flex: "1 1 100%", width: "100%", maxWidth: "100%", justifyContent: "start", alignItems: "stretch", ...s2?.style }, ...s2, children: x(A, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-1px", marginBottom: "-1px", overflow: "hidden", display: "flex", alignItems: "center" }, children: x(A, { className: "text", children: o2 }) }) }) });
|
|
651
|
+
})), Jr = k((e2) => {
|
|
652
652
|
const { styles: t2, namedStyle: o2, selectedNamed: n2, hasContextMenu: a2 = true, bodyStyle: r2, onSelectNamed: l2, createTemporaryCell: i2, parentFloat: d2, commands: c2, disabled: m2, commandHook: p2, ...u2 } = e2, g2 = v((e3) => {
|
|
653
|
-
const t3 = { variant:
|
|
653
|
+
const t3 = { variant: aa.Menuitem, commandHook: p2, context: "cellStyle" }, n3 = b(y, { children: [x(le, { ...t3, sx: { fontWeight: 550 }, command: c2.getCommand("formatCellStyle"), commandState: o2, disabled: m2, icon: re(x(Wt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: c2.getCommand("modifyCellStyle"), commandState: { named: o2 } }), x(le, { ...t3, command: c2.getCommand("deleteCellStyle"), commandState: o2, disabled: m2 || o2?.getName() === s.BuiltInName.Normal })] });
|
|
654
654
|
return ce({ ...e3, children: x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
|
|
655
655
|
}, []), h2 = o2?.getName() === n2?.getName();
|
|
656
656
|
let f2 = x(He, { 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: () => {
|
|
657
657
|
l2?.(o2);
|
|
658
|
-
}, ...u2, children: x(
|
|
658
|
+
}, ...u2, children: x(Zr, { value: o2.getName(), cellStyle: { named: o2.getName() }, styles: t2, createTemporaryCell: i2, bodyStyle: r2 }) }, o2.getName());
|
|
659
659
|
return a2 && (f2 = x($t, { label: o2.getName(), parentFloat: d2, createPopupPanel: g2, children: f2 })), f2;
|
|
660
|
-
}),
|
|
660
|
+
}), Yr = k(S((e2, t2) => {
|
|
661
661
|
const { commands: o2, command: n2, commandHook: a2, selectedNamed: l2, onSelectNamed: i2, disabled: d2 = false, bodyStyle: c2, usePreviewIcon: m2 = true, ...p2 } = e2;
|
|
662
|
-
|
|
663
|
-
const u2 = n2?.context(), g2 = u2?.styles, h2 = l2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), y2 =
|
|
662
|
+
sa(n2);
|
|
663
|
+
const u2 = n2?.context(), g2 = u2?.styles, h2 = l2 ?? u2?.named(), f2 = c2 ?? u2?.bodyStyle(), y2 = ra((e3) => {
|
|
664
664
|
i2?.(e3), n2?.execute(e3, a2);
|
|
665
665
|
}, [n2, i2, a2]), w2 = v((e3, t3) => {
|
|
666
666
|
const n3 = { onSelectNamed: y2, styles: g2(), parentFloat: e3.floatReference }, r2 = g2().getCustomNamed(), l3 = /* @__PURE__ */ new Map(), i3 = [];
|
|
667
667
|
for (let e4 = 0; e4 < r2.length; e4++) l3.set(r2[e4].getName(), r2[e4]), null === g2().getNamed(r2[e4].getName()).getBuiltInID() && i3.push(r2[e4].getName());
|
|
668
668
|
const c3 = (e4) => {
|
|
669
669
|
let t4 = l3.get(e4);
|
|
670
|
-
return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : x(
|
|
670
|
+
return t4 || (t4 = g2().getNamed(e4)), !t4 || t4.isHidden() ? null : x(Jr, { namedStyle: t4, selectedNamed: h2, bodyStyle: u2.bodyStyle(), createTemporaryCell: u2.createTemporaryCell, commands: o2, commandHook: a2, ...n3 }, e4);
|
|
671
671
|
}, m3 = (e4, t4, o3 = true) => {
|
|
672
672
|
const n4 = [];
|
|
673
673
|
for (let e5 = 0; e5 < t4.length; e5++) {
|
|
@@ -687,14 +687,14 @@ const Vr = k(S((e2, t2) => {
|
|
|
687
687
|
let w3 = [];
|
|
688
688
|
var k3, S3;
|
|
689
689
|
return w3.push(p3("Accent 1", [s.BuiltInName.Accent1_20, s.BuiltInName.Accent1_40, s.BuiltInName.Accent1_60, s.BuiltInName.Accent1])), w3.push(p3("Accent 2", [s.BuiltInName.Accent2_20, s.BuiltInName.Accent2_40, s.BuiltInName.Accent2_60, s.BuiltInName.Accent2])), w3.push(p3("Accent 3", [s.BuiltInName.Accent3_20, s.BuiltInName.Accent3_40, s.BuiltInName.Accent3_60, s.BuiltInName.Accent3])), w3.push(p3("Accent 4", [s.BuiltInName.Accent4_20, s.BuiltInName.Accent4_40, s.BuiltInName.Accent4_60, s.BuiltInName.Accent4])), w3.push(p3("Accent 5", [s.BuiltInName.Accent5_20, s.BuiltInName.Accent5_40, s.BuiltInName.Accent5_60, s.BuiltInName.Accent5])), w3.push(p3("Accent 6", [s.BuiltInName.Accent6_20, s.BuiltInName.Accent6_40, s.BuiltInName.Accent6_60, s.BuiltInName.Accent6])), f3.push((k3 = "Themed Cell Styles", S3 = w3, b(A, { children: [x(ie, { orientation: "horizontal" }), x(zt, { children: k3 }, k3 + "-header"), x(A, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: S3 }, k3 + "-presets")] }, k3))), f3.push(m3("Number Format", [s.BuiltInName.Comma, s.BuiltInName.Comma0, s.BuiltInName.Currency, s.BuiltInName.Currency0, s.BuiltInName.Percent])), b(A, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [x(A, { onContextMenu: () => {
|
|
690
|
-
}, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), x(ie, { orientation: "horizontal" }), x(le, { variant:
|
|
691
|
-
}, [h2, g2?.().getTheme(), f2]), k2 =
|
|
690
|
+
}, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: f3 }), x(ie, { orientation: "horizontal" }), x(le, { variant: aa.Menuitem, commandState: h2, command: t3.getCommand("newCellStyle"), context: "styles", commandHook: a2, disabled: d2, icon: re(x(Ht, {})) })] });
|
|
691
|
+
}, [h2, g2?.().getTheme(), f2]), k2 = ra((e3) => {
|
|
692
692
|
const t3 = 18 / r.getDeviceScale(), o3 = u2?.createTemporaryCell(e3);
|
|
693
693
|
return o3.getStyle().getFont().getSize() <= t3 ? o3 : o3.createTemporaryCell({ style: { font: { size: t3 } } });
|
|
694
|
-
}, [u2?.createTemporaryCell]), S2 = d2 || !n2 || n2.disabled(), T2 = C(() => u2 && m2 ? x(
|
|
694
|
+
}, [u2?.createTemporaryCell]), S2 = d2 || !n2 || n2.disabled(), T2 = C(() => u2 && m2 ? x(Zr, { value: h2?.getName() ?? "Custom", cellStyle: h2 ? { named: h2.getName() } : void 0, styles: u2.styles(), createTemporaryCell: k2, bodyStyle: u2.bodyStyle(), className: "outline-hover", disabled: S2, sx: { maxHeight: "24px", height: "24px", marginRight: "2px", outline: (e3) => `1px solid ${e3.palette.action.hover}` }, borderProps: {} }) : re(x(Wt, {})), [h2, f2, S2]);
|
|
695
695
|
return x(me, { ref: t2, createPopupPanel: w2, outlined: m2, commands: o2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), selected: false, disabled: S2, label: n2?.label(), icon: T2, ...p2 });
|
|
696
|
-
})),
|
|
697
|
-
const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 =
|
|
696
|
+
})), Qr = "_sheetxl-reset_ods65_1", el = 10, tl = k(S((e2, t2) => {
|
|
697
|
+
const { styles: o2, table: n2, tableStyle: a2 = n2?.getStyle() ?? o2.getDefaultTableStyle(), bodyStyle: r2, sx: l2, disabled: i2, className: s2, forceThinBorder: d2, cellHeight: m2 = el, isLive: p2 = false, ...u2 } = e2, g2 = Math.ceil(1.3 * m2), [h2, f2] = B((e3) => e3 + 1, 0);
|
|
698
698
|
P(() => {
|
|
699
699
|
if (p2 && n2) return n2.addListeners({ onAnyChange: () => {
|
|
700
700
|
f2();
|
|
@@ -727,10 +727,10 @@ const Vr = k(S((e2, t2) => {
|
|
|
727
727
|
}
|
|
728
728
|
return t3;
|
|
729
729
|
}, [b2, a2, r2]), k2 = v((e3, t3) => y2[t3].getBorder() ?? null, [y2]);
|
|
730
|
-
return x(A, { 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: x(
|
|
731
|
-
})),
|
|
730
|
+
return x(A, { 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: x(Pa, { getBorderAt: k2, rowCount: 5, columnCount: 5, forceThinBorder: d2, width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1, darkMode: r2?.darkMode ?? false, style: { pointerEvents: "none" }, children: x("table", { className: Hn(s2, "sheetxl-table-preview", Qr), style: { borderCollapse: "collapse", width: 5 * (g2 - 1) + 1, height: 5 * (m2 - 1) + 1 }, children: x("tbody", { children: w2 }) }) }) });
|
|
731
|
+
})), ol = (e2, t2, o2, n2, a2) => {
|
|
732
732
|
e2.beginPath(), e2.moveTo(t2 + 0.5, o2 + 0.5), e2.lineTo(n2 + 0.5, a2 + 0.5), e2.stroke();
|
|
733
|
-
},
|
|
733
|
+
}, nl = k(S((e2, t2) => {
|
|
734
734
|
const { table: o2, tableStyle: n2, styles: a2, bodyStyle: r2, disabled: l2, style: i2, className: s2, canvas: d2, ...p2 } = e2, u2 = C(() => {
|
|
735
735
|
const e3 = o2.toJSON(), t3 = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
|
|
736
736
|
return e3.styleOptions = { ...e3.styleOptions, name: n2.getName() }, e3.ref = t3, new c({ initialAnchor: t3, json: e3, styles: a2 });
|
|
@@ -760,22 +760,22 @@ const Vr = k(S((e2, t2) => {
|
|
|
760
760
|
const r3 = g2[5 * e4 + a3], l3 = a3 * o3, i3 = 9 * e4, s3 = r3.getBorder();
|
|
761
761
|
if (!s3.isEmpty()) {
|
|
762
762
|
const a4 = s3.getLeft();
|
|
763
|
-
a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false),
|
|
763
|
+
a4.isNone() || (t3.strokeStyle = a4.getColor().toCSS(n3, false), ol(t3, l3, i3, l3, i3 + 9));
|
|
764
764
|
const r4 = s3.getTop();
|
|
765
|
-
r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false),
|
|
765
|
+
r4.isNone() || (t3.strokeStyle = r4.getColor().toCSS(n3, false), ol(t3, l3, i3, l3 + o3, 9 * e4));
|
|
766
766
|
const d4 = s3.getRight();
|
|
767
|
-
d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false),
|
|
767
|
+
d4.isNone() || (t3.strokeStyle = d4.getColor().toCSS(n3, false), ol(t3, l3 + o3, i3, l3 + o3, i3 + 9));
|
|
768
768
|
const c3 = s3.getBottom();
|
|
769
|
-
c3.isNone() || (t3.strokeStyle = c3.getColor().toCSS(n3, false),
|
|
769
|
+
c3.isNone() || (t3.strokeStyle = c3.getColor().toCSS(n3, false), ol(t3, l3, i3 + 9, l3 + o3, i3 + 9));
|
|
770
770
|
}
|
|
771
771
|
t3.strokeStyle = r3.getFont().getFill().toCSS(n3, false);
|
|
772
772
|
const d3 = 4, c2 = 2.5;
|
|
773
|
-
|
|
773
|
+
ol(t3, a3 * o3 + c2, 9 * e4 + d3, a3 * o3 + c2 + 7, 9 * e4 + d3);
|
|
774
774
|
}
|
|
775
775
|
return `url(${e3.toDataURL()})`;
|
|
776
776
|
}, [d2, u2, n2, r2]);
|
|
777
|
-
return x("div", { ref: t2, className:
|
|
778
|
-
})),
|
|
777
|
+
return x("div", { ref: t2, className: Hn("table-style-preview", s2), style: { backgroundImage: h2, width: 61, height: 46, ...i2 }, ...p2 });
|
|
778
|
+
})), al = k(S((e2, t2) => {
|
|
779
779
|
const { styleOptions: o2, onStyleOptionsChange: n2, showHeaderRow: a2, onShowHeaderRowChange: r2, showTotalRow: l2, onShowTotalRowChange: i2, showFilterButton: s2, onShowFilterButtonChange: d2, sx: c2, disabled: m2, ...p2 } = e2;
|
|
780
780
|
return b(A, { sx: { display: "flex", flexDirection: "column", flexWrap: "wrap", userSelect: "none", 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 }, ...p2, ref: t2, children: [r2 && x(V, { control: x(G, { checked: a2 ?? false, indeterminate: null == a2, onChange: () => r2(!a2), disabled: m2 || null == a2 }), label: "Header Row", labelPlacement: "end" }), i2 && x(V, { control: x(G, { checked: l2 ?? false, indeterminate: null == l2, onChange: () => i2(!l2), disabled: m2 || null == l2 }), label: "Total Row", labelPlacement: "end" }), x(V, { control: x(G, { checked: o2?.showRowStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
|
|
781
781
|
n2?.({ ...o2, showRowStripes: !o2?.showRowStripes });
|
|
@@ -786,21 +786,21 @@ const Vr = k(S((e2, t2) => {
|
|
|
786
786
|
} }), label: "Last Column", labelPlacement: "end" }), x(V, { control: x(G, { checked: o2?.showColumnStripes ?? false, indeterminate: !o2, disabled: m2 || !o2, onChange: () => {
|
|
787
787
|
n2?.({ ...o2, showColumnStripes: !o2?.showColumnStripes });
|
|
788
788
|
} }), label: "Banded Columns", labelPlacement: "end" }), d2 && x(V, { control: x(G, { checked: s2 ?? false, indeterminate: null == s2, disabled: m2 || !o2 || null == s2, onChange: () => d2(!s2) }), label: "Filter Button", labelPlacement: "end" })] });
|
|
789
|
-
})),
|
|
789
|
+
})), rl = k((e2) => {
|
|
790
790
|
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 = v((e3) => {
|
|
791
|
-
const t3 = { variant:
|
|
791
|
+
const t3 = { variant: aa.Menuitem, commandHook: m2, context: "table" }, n3 = b(y, { children: [x(le, { ...t3, command: d2.getCommand("formatTableStyleClearCellStyles"), commandState: o2, disabled: c2, icon: re(x(Wt, {})) }), x(le, { ...t3, sx: { fontWeight: 550 }, command: d2.getCommand("formatTableStyle"), commandState: { name: o2.getName() }, disabled: c2, icon: re(x(Wt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: d2.getCommand("setDefaultTableStyle"), commandState: o2.getName(), disabled: c2 }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: d2.getCommand("deleteTableStyle"), commandState: o2?.getName(), disabled: c2 || !o2 || o2.isBuiltIn() })] });
|
|
792
792
|
return ce({ ...e3, children: x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: n3 }) }) });
|
|
793
793
|
}, [d2]), f2 = o2?.getName() === n2, w2 = C(() => {
|
|
794
794
|
const e3 = { table: t2, tableStyle: o2, styles: r2, bodyStyle: i2 };
|
|
795
|
-
return p2 ? x(
|
|
795
|
+
return p2 ? x(nl, { canvas: u2, ...e3 }) : x(tl, { ...e3 });
|
|
796
796
|
}, [t2, o2, r2, i2]);
|
|
797
797
|
let k2 = x(He, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${f2 ? e3.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o2.getName() ?? "None", placement: "bottom-start" }, disabled: c2, icon: null, onClick: () => {
|
|
798
798
|
a2?.(o2?.getName());
|
|
799
799
|
}, ...g2, children: w2 }, o2.getName());
|
|
800
800
|
return l2 && (k2 = x($t, { label: t2.getStyleOptions().name, parentFloat: s2, createPopupPanel: h2, children: k2 })), k2;
|
|
801
|
-
}),
|
|
801
|
+
}), ll = k(S((e2, t2) => {
|
|
802
802
|
const { commands: o2, command: n2, commandHook: a2, selectedTable: r2, onSelectTableStyleName: l2, disabled: i2 = false, bodyStyle: s2, usePreviewIcon: d2 = false, ...m2 } = e2;
|
|
803
|
-
|
|
803
|
+
sa(n2);
|
|
804
804
|
const p2 = n2?.context(), u2 = p2?.styles, g2 = r2 ?? p2?.table?.();
|
|
805
805
|
let h2 = "insertTable";
|
|
806
806
|
g2 && (h2 = "editTable");
|
|
@@ -811,14 +811,14 @@ const Vr = k(S((e2, t2) => {
|
|
|
811
811
|
P(() => {
|
|
812
812
|
S2(w2);
|
|
813
813
|
}, [w2]);
|
|
814
|
-
const T2 = s2 ?? p2?.bodyStyle(), R2 =
|
|
814
|
+
const T2 = s2 ?? p2?.bodyStyle(), R2 = ra((e3) => {
|
|
815
815
|
l2?.(e3), n2?.execute({ name: e3 }, a2);
|
|
816
816
|
}, [n2, l2, a2]), F2 = M(null), B2 = v((e3, t3) => {
|
|
817
817
|
const o3 = { onSelectTableStyleName: R2, styles: u2(), parentFloat: e3.floatReference };
|
|
818
818
|
F2.current || (F2.current = document.createElement("canvas"));
|
|
819
819
|
const n3 = (e4) => {
|
|
820
820
|
const n4 = u2().getTableStyle(e4);
|
|
821
|
-
return n4 ? x(
|
|
821
|
+
return n4 ? x(rl, { table: k2, tableStyle: n4, selectedTableStyleName: k2.getStyleOptions().name, bodyStyle: p2.bodyStyle(), commands: t3, commandHook: a2, canvas: F2.current, ...o3 }, e4) : null;
|
|
822
822
|
}, r3 = (e4, t4, o4 = true) => {
|
|
823
823
|
const a3 = [];
|
|
824
824
|
for (let e5 = 0; e5 < t4.length; e5++) {
|
|
@@ -842,96 +842,96 @@ const Vr = k(S((e2, t2) => {
|
|
|
842
842
|
for (let e4 = 0; e4 < 11; e4++) h3.push("TableStyleDark" + (e4 + 1));
|
|
843
843
|
l3.push(r3("Dark", h3));
|
|
844
844
|
let f3 = null;
|
|
845
|
-
return g2 && (f3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { variant:
|
|
845
|
+
return g2 && (f3 = b(y, { children: [x(ie, { orientation: "horizontal" }), x(le, { variant: aa.Menuitem, command: t3.getCommand("formatTableStyleClearTableStyle"), commandHook: a2, disabled: i2, icon: re(x(rt, {})) })] })), b(A, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (e4) => `${e4.shape.borderRadius}px`, paddingBottom: (e4) => `${e4.shape.borderRadius}px` }, children: [x(A, { onContextMenu: () => {
|
|
846
846
|
}, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: l3 }), f3] });
|
|
847
847
|
}, [u2, u2?.().getTheme(), T2, k2]), N2 = i2 || !n2 || n2.disabled(), E2 = C(() => {
|
|
848
848
|
if (!p2 || !d2) return re(x(Wt, {}));
|
|
849
849
|
}, [k2, T2, N2]);
|
|
850
850
|
return x(me, { ref: t2, quickCommand: h2, createPopupPanel: B2, commands: o2, label: n2?.label(), commandState: g2, commandHook: a2, selected: null !== g2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: n2?.label(), description: n2?.description(), disabled: t3, children: e3 }), disabled: N2, icon: E2, ...m2 });
|
|
851
|
-
})),
|
|
852
|
-
|
|
853
|
-
const
|
|
854
|
-
const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 =
|
|
851
|
+
})), il = [];
|
|
852
|
+
il.push(fr("Primary Background", "bg1")), il.push(fr("Primary Text", "tx1")), il.push(fr("Secondary Background", "bg2")), il.push(fr("Secondary Text", "tx2")), il.push(fr("Accent 1", "accent1")), il.push(fr("Accent 2", "accent2")), il.push(fr("Accent 3", "accent3")), il.push(fr("Accent 4", "accent4")), il.push(fr("Accent 5", "accent5")), il.push(fr("Accent 6", "accent6"));
|
|
853
|
+
const sl = (e2) => {
|
|
854
|
+
const { docTheme: t2, onSelectTheme: o2, darkMode: n2, isSelected: a2, outlined: r2, sx: l2, ...i2 } = e2, s2 = Sa(), d2 = C(() => {
|
|
855
855
|
let e3 = [];
|
|
856
|
-
for (let o3 = 0; o3 <
|
|
857
|
-
const a3 =
|
|
858
|
-
e3.push(x(
|
|
856
|
+
for (let o3 = 0; o3 < il.length; o3++) {
|
|
857
|
+
const a3 = il[o3];
|
|
858
|
+
e3.push(x(gr, { schemeColorLookup: t2.schemeLookup(), colorDef: a3, darkMode: n2, selectedColor: null }, o3 + "-colorDef"));
|
|
859
859
|
}
|
|
860
860
|
return x(A, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: x(A, { sx: { display: "flex", boxShadow: (e4) => e4.shadows[2] }, children: e3 }) });
|
|
861
861
|
}, [t2, s2]);
|
|
862
862
|
return x(He, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (e3) => `solid ${a2 ? e3.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (e3) => `solid ${e3.palette.text.primary} 1px !important` } }, icon: null, ...i2, children: b(A, { sx: { border: (e3) => `solid ${e3.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (e3) => a2 ? e3.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (e3) => e3.palette.text.primary } }, children: [x(A, { sx: {}, children: t2.getName() }), b(A, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [d2, x(A, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => t2.getFontScheme().getMajorFont() }, children: x(De, { disableInteractive: true, PopperProps: { style: { pointerEvents: "none" }, disablePortal: true, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: true, options: { boundariesElement: "viewport" } }] } }, title: x("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
|
|
863
863
|
The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: x("div", { children: t2.getFontScheme().getMinorFont() }) }) })] })] }) });
|
|
864
|
-
},
|
|
864
|
+
}, dl = k(S((e2, t2) => {
|
|
865
865
|
const { themes: o2, selectedTheme: n2, onSelectTheme: a2, sx: r2, disabled: l2 = false, darkMode: i2, ...s2 } = e2, d2 = C(() => {
|
|
866
866
|
const e3 = o2?.getItems({ selected: n2 }) ?? [], t3 = [];
|
|
867
867
|
if (0 === e3.length) return x(zt, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
|
|
868
868
|
const r3 = e3.length;
|
|
869
869
|
for (let o3 = 0; o3 < r3; o3++) {
|
|
870
870
|
const r4 = e3[o3], s3 = n2 && r4?.getName() === n2.getName(), d3 = e3[o3 + 1];
|
|
871
|
-
d3 && d3.isCustom() !== r4.isCustom() && t3.push(x(ie, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(x(
|
|
871
|
+
d3 && d3.isCustom() !== r4.isCustom() && t3.push(x(ie, { orientation: "horizontal", sx: { marginBottom: "4px" } }, `divider-${o3}`)), t3.push(x(sl, { docTheme: r4, onSelectTheme: () => a2(r4), isSelected: s3, disabled: l2, darkMode: i2, onMouseDown: (e4) => {
|
|
872
872
|
0 === e4.button && e4.preventDefault();
|
|
873
873
|
}, onMouseUp: (e4) => {
|
|
874
874
|
0 === e4.button && a2(r4);
|
|
875
875
|
}, onKeyDown: (e4) => {
|
|
876
|
-
e4.keyCode !==
|
|
876
|
+
e4.keyCode !== ia.Enter && e4.keyCode !== ia.Space || a2(r4);
|
|
877
877
|
} }, r4.getName()));
|
|
878
878
|
}
|
|
879
879
|
return t3;
|
|
880
880
|
}, [n2, a2, i2]);
|
|
881
881
|
return x(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: t2, ...s2, children: b(A, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [x(zt, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), x(ie, {}), x(A, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: d2 })] }) });
|
|
882
|
-
})),
|
|
882
|
+
})), cl = k(S((e2, t2) => {
|
|
883
883
|
const { themes: o2, selectedTheme: n2, onSelectTheme: a2, icon: r2, tooltip: l2, label: i2, variant: s2 = Re.Toolbar, darkMode: d2, panelProps: c2, ...m2 } = e2, p2 = r2 || re(x(Ot, {})), u2 = { createPopupPanel: v((e3) => {
|
|
884
884
|
const { closeFloatAll: t3 } = e3;
|
|
885
|
-
return x(
|
|
886
|
-
e4.which ===
|
|
885
|
+
return x(dl, { ...c2, themes: o2, selectedTheme: n2, onSelectTheme: a2, darkMode: d2, onKeyDown: (e4) => {
|
|
886
|
+
e4.which === ia.Enter && t3();
|
|
887
887
|
} });
|
|
888
888
|
}, [o2, n2, a2, c2, d2]), tooltip: l2 || i2 || "Theme", label: i2, icon: p2, ...m2 };
|
|
889
889
|
return s2 === Re.Toolbar ? x(Me, { ref: t2, ...u2 }) : x(Fe, { ref: t2, ...u2 });
|
|
890
|
-
})),
|
|
890
|
+
})), ml = k(S((e2, t2) => {
|
|
891
891
|
const { command: o2, commandHook: n2, selectedTheme: a2, onSelectTheme: r2, disabled: l2 = false, darkMode: i2, label: s2, icon: d2, variant: c2, ...m2 } = e2;
|
|
892
|
-
|
|
893
|
-
const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 =
|
|
892
|
+
sa(o2);
|
|
893
|
+
const p2 = o2?.context()?.themes, u2 = a2 || o2?.context()?.theme, g2 = i2 ?? o2?.context()?.darkMode, h2 = l2 || o2?.disabled(), f2 = ra((e3) => {
|
|
894
894
|
r2?.(e3), o2?.execute(e3, n2);
|
|
895
895
|
}, [r2, n2]), b2 = v((e3, t3) => {
|
|
896
896
|
const { children: n3, title: a3, ...r3 } = e3;
|
|
897
897
|
let l3 = e3.children;
|
|
898
|
-
return (h2 || t3) && (l3 = x("div", { children: l3 })), x(We, { command: o2, placement: c2 ===
|
|
898
|
+
return (h2 || t3) && (l3 = x("div", { children: l3 })), x(We, { command: o2, placement: c2 === aa.Toolbar ? "bottom-start" : "right-start", disabled: h2 || t3, ...r3, children: l3 });
|
|
899
899
|
}, [o2, h2]);
|
|
900
|
-
return x(
|
|
901
|
-
})),
|
|
902
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 =
|
|
903
|
-
const o3 = { variant:
|
|
900
|
+
return x(cl, { ref: t2, themes: p2, selectedTheme: u2, onSelectTheme: f2, variant: c2 === aa.Menuitem ? Re.Menuitem : Re.Toolbar, createTooltip: b2, disabled: h2, darkMode: g2, icon: re(x(Ot, {})), ...m2 });
|
|
901
|
+
})), pl = k(S((e2, t2) => {
|
|
902
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = na(o2, ["themeMode"])[0], s2 = i2?.state(), d2 = null !== i2?.state(), c2 = U("(prefers-color-scheme: dark)"), m2 = "dark" === s2 || null === s2 && c2, p2 = ra((e3, t3) => {
|
|
903
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "appearance", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: i2, icon: re(x(m2 ? Gn : Un, {})) }), x(le, { ...o3, command: t3.getCommand("defaultThemeMode"), icon: re(x(c2 ? Vt : Gt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("enableDarkGrid") }), x(le, { ...o3, command: t3.getCommand("enableDarkImages") })] });
|
|
904
904
|
return ce({ ...e3, children: a3 });
|
|
905
905
|
}, [r2, i2, n2, a2, c2, s2, d2]);
|
|
906
906
|
return x(me, { ref: t2, quickCommand: "themeMode", commands: o2, commandHook: n2, createPopupPanel: p2, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
|
|
907
907
|
i2?.execute(m2 ? "light" : "dark", n2);
|
|
908
|
-
}, selected: d2, icon: re(x(m2 ?
|
|
909
|
-
})),
|
|
908
|
+
}, selected: d2, icon: re(x(m2 ? Gn : Un, {})), ...l2 });
|
|
909
|
+
})), ul = k(S((e2, t2) => {
|
|
910
910
|
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, sx: l2, ...i2 } = e2, s2 = v((e3, t3) => {
|
|
911
|
-
const o3 = { variant:
|
|
911
|
+
const o3 = { variant: aa.Menuitem, scope: "help", commandHook: { ...n2, beforeExecute: (t4, o4) => {
|
|
912
912
|
const a4 = n2?.beforeExecute?.(t4, o4);
|
|
913
913
|
return false !== a4 && e3.floatReference.closeAll();
|
|
914
|
-
} }, disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("showKeyboardShortcuts"), icon: re(x(
|
|
914
|
+
} }, disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("showKeyboardShortcuts"), icon: re(x(jn, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...o3, command: t3.getCommand("gotoUrlGithub"), icon: re(x(Ut, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlDiscord"), icon: re(x(jt, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlDocumentation"), icon: re(x(_t, {})) }), x(le, { ...o3, command: t3.getCommand("gotoUrlIssue"), icon: re(x(qt, {})) })] });
|
|
915
915
|
return ce({ ...e3, children: a3 });
|
|
916
916
|
}, [r2, n2]);
|
|
917
917
|
return x(me, { ref: t2, sx: l2, commands: o2, disabled: r2, commandHook: n2, scope: a2, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: s2, icon: re(x(Kt, { sx: { transform: "scale(0.75)" } })), ...i2 });
|
|
918
|
-
})),
|
|
919
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 =
|
|
918
|
+
})), gl = k(S((e2, t2) => {
|
|
919
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, preferSingleMenu: l2 = true, showQuickButton: i2 = true, variant: s2 = aa.Toolbar, ...d2 } = e2, c2 = na(o2, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: m2, allDisabled: p2 } = C(() => {
|
|
920
920
|
let e3 = null, t3 = 0;
|
|
921
|
-
for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 ===
|
|
921
|
+
for (let o3 = 0; o3 < c2.length; o3++) c2[o3] && !c2[o3]?.disabled() && (l2 && s2 === aa.Menuitem && (e3 = 0 === t3 ? c2[o3] : null), t3++);
|
|
922
922
|
return { singleMenuCommand: e3, allDisabled: 0 === t3 };
|
|
923
923
|
}, [c2]), u2 = v((e3, t3) => {
|
|
924
|
-
const o3 = { variant:
|
|
924
|
+
const o3 = { variant: aa.Menuitem, commandHook: n2, scope: "insertImage", disabled: r2 }, a3 = b(y, { children: [x(le, { ...o3, command: t3.getCommand("insertImageFromFile"), icon: re(x(Xt, {})) }), x(le, { ...o3, command: t3.getCommand("insertImageFromURL"), icon: re(x(Xt, {})) })] });
|
|
925
925
|
return ce({ ...e3, children: a3 });
|
|
926
926
|
}, [r2, n2, a2]);
|
|
927
927
|
return m2 ? x(le, { ref: t2, variant: s2, commandHook: n2, disabled: r2, command: m2, icon: re(x(Xt, {})), ...d2 }) : x(me, { 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: re(x(Xt, {})), ...d2 });
|
|
928
|
-
})),
|
|
929
|
-
const { command: o2, ...n2 } = e2, a2 =
|
|
928
|
+
})), hl = k(S((e2, t2) => {
|
|
929
|
+
const { command: o2, ...n2 } = e2, a2 = da(), [r2, l2] = D(false), [i2, s2] = D("info");
|
|
930
930
|
return P(() => {
|
|
931
931
|
const e3 = a2.getMode();
|
|
932
932
|
l2("copy" === e3?.key || "cut" === e3?.key), s2("cut" === e3?.key ? "warning" : "info");
|
|
933
933
|
}, [a2]), x(le, { ref: t2, command: o2, icon: re(x(Zt, { isWalking: r2, themedType: i2 })), ...n2 });
|
|
934
|
-
})),
|
|
934
|
+
})), fl = k(S((e2, t2) => {
|
|
935
935
|
const { ...o2 } = e2;
|
|
936
936
|
return x(Jt, { ref: t2, ...o2, popupCommandKeys: ["insertFunctionSum", "insertFunctionAverage", "insertFunctionCount", "insertFunctionMax", "insertFunctionMin", null, "insertFunction"], quickCommand: "insertFunctionSum", popupScope: "insertFunction", label: "Quick Function", tooltip: "More functions.", icon: (e3) => {
|
|
937
937
|
const t3 = e3?.key();
|
|
@@ -945,8 +945,8 @@ The heading font is '${t2.getFontScheme().getMajorFont()}'.` }), placement: "bot
|
|
|
945
945
|
}
|
|
946
946
|
} });
|
|
947
947
|
}));
|
|
948
|
-
|
|
949
|
-
const
|
|
948
|
+
fl.displayName = "InsertFunctionSumCommandPopupButton";
|
|
949
|
+
const xl = new Map([{ key: "financial", label: "Financial", icon: x(to, {}) }, { key: "logical", label: "Logical", icon: x(oo, {}) }, { key: "text", label: "Text", icon: x(no, {}) }, { key: "dateTime", label: "Date & Time", icon: x(ao, {}) }, { key: "lookupReference", label: "Lookup & Reference", icon: x(ro, {}) }, { key: "mathTrig", label: "Math & Trig", icon: x(lo, {}) }, { key: "statDist", label: "Statistical", icon: x(io, {}) }, { key: "engineering", label: "Engineering", icon: x(so, {}) }, { key: "information", label: "Information", icon: x(co, {}) }, { key: "cube", label: "Cube", icon: x(mo, {}) }, { key: "database", label: "Database", icon: x(po, {}) }, { key: "web", label: "Web", icon: x(uo, {}) }, { key: "custom", label: "Custom", icon: x(go, {}) }].map((e2) => [e2.key, e2])), bl = k((e2) => {
|
|
950
950
|
const { command: t2, formulaFunction: o2, commandHook: n2, disabled: a2 = false, parentFloat: r2, handleInsert: l2, icon: i2, label: s2, sx: d2, ...c2 } = e2, m2 = new Promise((e3) => {
|
|
951
951
|
o2.getDescriptor().then((t3) => {
|
|
952
952
|
e3(t3.getSummary());
|
|
@@ -957,20 +957,20 @@ const hl = new Map([{ key: "financial", label: "Financial", icon: x(to, {}) }, {
|
|
|
957
957
|
}, onMouseUp: (e3) => {
|
|
958
958
|
0 === e3.button && l2(o2);
|
|
959
959
|
}, onKeyDown: (e3) => {
|
|
960
|
-
e3.keyCode ===
|
|
960
|
+
e3.keyCode === ia.Enter || (e3.keyCode, ia.Space);
|
|
961
961
|
}, ...c2, children: x(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: x(I, { component: "div", children: o2.getName() }) }) });
|
|
962
|
-
}),
|
|
963
|
-
const { category: o2, commands: n2, commandHook: a2, scope: r2, sx: l2, disabled: i2 = false, parentFloat: s2, ...d2 } = e2, c2 =
|
|
964
|
-
const n3 =
|
|
962
|
+
}), yl = k(S((e2, t2) => {
|
|
963
|
+
const { category: o2, commands: n2, commandHook: a2, scope: r2, sx: l2, disabled: i2 = false, parentFloat: s2, ...d2 } = e2, c2 = na(n2, ["insertFunction"])[0], m2 = v((e3, t3) => {
|
|
964
|
+
const n3 = xl.get(o2);
|
|
965
965
|
if (!n3) return console.warn("invalidate category", o2), null;
|
|
966
|
-
const r3 = { commandHook: a2, ...e3 }, l3 = x(
|
|
966
|
+
const r3 = { commandHook: a2, ...e3 }, l3 = x(wl, { category: n3.label, ...r3, commands: t3 });
|
|
967
967
|
return ce({ ...e3, children: l3 });
|
|
968
|
-
}, [o2, c2, a2, r2]), p2 =
|
|
969
|
-
return x(me, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: re(
|
|
968
|
+
}, [o2, c2, a2, r2]), p2 = xl.get(o2);
|
|
969
|
+
return x(me, { ref: t2, commands: n2, commandHook: a2, createPopupPanel: m2, label: p2.label, tooltip: "Insert Function", icon: re(xl.get(o2)?.icon ?? x(eo, {})), ...d2 });
|
|
970
970
|
}));
|
|
971
|
-
|
|
972
|
-
const
|
|
973
|
-
const { commands: o2, category: n2, commandHook: a2, ...r2 } = e2, l2 =
|
|
971
|
+
yl.displayName = "InsertFunctionCommandPopupButton";
|
|
972
|
+
const wl = k(S((e2, t2) => {
|
|
973
|
+
const { commands: o2, category: n2, commandHook: a2, ...r2 } = e2, l2 = na(o2, ["insertFunction"]), [i2, s2] = D([]), [d2, c2] = D(false);
|
|
974
974
|
P(() => {
|
|
975
975
|
(async () => {
|
|
976
976
|
c2(true);
|
|
@@ -983,15 +983,15 @@ const bl = k(S((e2, t2) => {
|
|
|
983
983
|
};
|
|
984
984
|
for (let e3 = 0; e3 < m2; e3++) {
|
|
985
985
|
const t3 = i2[e3];
|
|
986
|
-
p2[e3] = x(
|
|
986
|
+
p2[e3] = x(bl, { command: u2, formulaFunction: t3, handleInsert: g2 }, `formula-${t3.getName()}-${e3}`);
|
|
987
987
|
}
|
|
988
988
|
return ce({ ...r2, children: x(A, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: m2 > 0 ? x(y, { children: x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: p2 }) }) : null }) });
|
|
989
|
-
})),
|
|
990
|
-
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 =
|
|
989
|
+
})), kl = k(S((e2, t2) => {
|
|
990
|
+
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 = Va(), h2 = s2 && g2 ? g2.register(s2, d2) : null, [f2, b2] = D(""), [y2, w2] = D(""), [k2, S2] = D(i2);
|
|
991
991
|
P(() => {
|
|
992
992
|
S2(i2), w2("");
|
|
993
993
|
}, [i2]);
|
|
994
|
-
const C2 =
|
|
994
|
+
const C2 = ra((e3) => {
|
|
995
995
|
let t3 = "";
|
|
996
996
|
try {
|
|
997
997
|
S2(e3), m2?.(e3), c2?.(e3);
|
|
@@ -999,56 +999,56 @@ const bl = k(S((e2, t2) => {
|
|
|
999
999
|
t3 = e4.message ?? "Invalid Name";
|
|
1000
1000
|
}
|
|
1001
1001
|
s2 && g2 && (t3 ? g2.setError(s2, { message: t3 }) : g2.clearErrors(s2)), w2(t3);
|
|
1002
|
-
}, [i2, m2, c2]), T2 =
|
|
1003
|
-
e3.keyCode ===
|
|
1004
|
-
}, [p2, f2, i2, g2]), R2 =
|
|
1002
|
+
}, [i2, m2, c2]), T2 = ra(async (e3) => {
|
|
1003
|
+
e3.keyCode === ia.Escape && f2 !== i2 && (C2(f2), g2?.setValue(s2, f2), g2?.clearErrors(s2), e3.stopPropagation()), p2?.(e3);
|
|
1004
|
+
}, [p2, f2, i2, g2]), R2 = ra((e3) => {
|
|
1005
1005
|
b2(e3.target.value ?? "");
|
|
1006
|
-
}, []), M2 =
|
|
1006
|
+
}, []), M2 = ra((e3) => {
|
|
1007
1007
|
b2(""), h2?.onBlur(e3);
|
|
1008
1008
|
}, []), F2 = v((e3) => {
|
|
1009
1009
|
C2(e3.target.value), h2?.onChange(e3);
|
|
1010
1010
|
}, [h2]);
|
|
1011
|
-
return x(j, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...r2 }, size: "small", ref: t2, className:
|
|
1011
|
+
return x(j, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...r2 }, size: "small", ref: t2, className: Hn("named-input", a2), ...u2, children: x(_, { label: "Name", placeholder: l2, onFocus: R2, onBlur: M2, inputRef: h2?.ref, disabled: o2, error: !!y2, helperText: y2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { 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(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` } } }, value: k2 ?? "", onChange: F2, onKeyDownCapture: T2, onContextMenu: (e3) => {
|
|
1012
1012
|
e3.stopPropagation();
|
|
1013
1013
|
} }) });
|
|
1014
1014
|
}));
|
|
1015
|
-
|
|
1016
|
-
const
|
|
1017
|
-
const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 =
|
|
1015
|
+
kl.displayName = "NamedInput";
|
|
1016
|
+
const Sl = (e2) => null === e2 ? "" : e2.toString(), Cl = k(S((e2, t2) => {
|
|
1017
|
+
const { formName: o2, formOptions: n2, disabled: a2, style: r2, className: l2, sx: i2, onKeyDown: s2, value: d2, onChangeInput: c2, resolvedAddress: m2, ...p2 } = e2, u2 = Va(), g2 = o2 && u2 ? u2.register(o2, n2) : null, [h2, f2] = D(""), [b2, y2] = D(false), [w2, k2] = D(() => Sl(d2));
|
|
1018
1018
|
P(() => {
|
|
1019
|
-
k2(
|
|
1019
|
+
k2(Sl(d2)), f2(""), o2 && u2 && u2.clearErrors(o2), y2(false);
|
|
1020
1020
|
}, [d2]);
|
|
1021
|
-
const S2 =
|
|
1021
|
+
const S2 = ra((e3) => {
|
|
1022
1022
|
let t3 = "";
|
|
1023
1023
|
try {
|
|
1024
1024
|
k2(e3);
|
|
1025
|
-
const t4 =
|
|
1025
|
+
const t4 = Sl(d2), o3 = m2(e3);
|
|
1026
1026
|
o3.toString() !== t4 && c2?.(o3);
|
|
1027
1027
|
} catch (e4) {
|
|
1028
1028
|
t3 = "Invalid Range";
|
|
1029
1029
|
}
|
|
1030
1030
|
o2 && u2 && (t3 ? u2.setError(o2, { message: t3 }) : u2.clearErrors(o2)), f2(t3), y2(true);
|
|
1031
|
-
}, [w2, c2, o2, u2]), T2 =
|
|
1032
|
-
if (b2 && e3.keyCode ===
|
|
1033
|
-
const t3 =
|
|
1031
|
+
}, [w2, c2, o2, u2]), T2 = ra(async (e3) => {
|
|
1032
|
+
if (b2 && e3.keyCode === ia.Escape) {
|
|
1033
|
+
const t3 = Sl(d2);
|
|
1034
1034
|
k2(t3), f2(""), y2(false), e3.stopPropagation();
|
|
1035
1035
|
}
|
|
1036
1036
|
s2?.(e3);
|
|
1037
|
-
}, [d2, c2, s2, b2]), R2 =
|
|
1037
|
+
}, [d2, c2, s2, b2]), R2 = ra((e3) => {
|
|
1038
1038
|
g2?.onBlur(e3);
|
|
1039
1039
|
}, [g2]), M2 = v((e3) => {
|
|
1040
1040
|
S2(e3.target.value), g2?.onChange(e3);
|
|
1041
1041
|
}, [g2]), [F2, B2] = D(false), N2 = C(() => x(q, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: x(ho, { disabled: true, selected: F2, onSelectToggle: (e3) => {
|
|
1042
1042
|
B2(e3);
|
|
1043
1043
|
}, label: "Select Range", icon: re(x(fo, {})) }) }), [F2]);
|
|
1044
|
-
return x(j, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className:
|
|
1044
|
+
return x(j, { sx: { paddingTop: (e3) => e3.spacing(1.5), minWidth: 135, width: "100%", ...i2 }, size: "small", ref: t2, className: Hn("range-input", l2), ...p2, children: x(_, { label: "Range", placeholder: "Enter Range", onBlur: R2, disabled: a2, error: !!h2, inputRef: g2?.ref, helperText: h2 || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (e3) => e3.spacing(0.5) } }, InputLabelProps: { shrink: true }, InputProps: { inputProps: { spellCheck: false, autoComplete: "off", readOnly: a2, name: o2, sx: { paddingTop: (e3) => e3.spacing(1.25), paddingBottom: (e3) => e3.spacing(0.75) } }, sx: { backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, endAdornment: N2 }, value: w2 ?? "", onChange: M2, onKeyDownCapture: T2, onContextMenu: (e3) => {
|
|
1045
1045
|
e3.stopPropagation();
|
|
1046
1046
|
} }) });
|
|
1047
1047
|
}));
|
|
1048
|
-
|
|
1049
|
-
const
|
|
1048
|
+
Cl.displayName = "RangeInput";
|
|
1049
|
+
const vl = k(S((e2, t2) => {
|
|
1050
1050
|
const { sheet: o2, className: a2, debounceDelay: l2 = 220, sx: i2, ...s2 } = e2, [d2, c2] = D(() => o2.getView().getZoomScale()), [m2, p2] = D(null), u2 = M(0);
|
|
1051
|
-
|
|
1051
|
+
Ma(o2, { onViewChange: () => {
|
|
1052
1052
|
p2(true), 0 === u2.current && c2(o2.getView().getZoomScale());
|
|
1053
1053
|
} }), P(() => {
|
|
1054
1054
|
u2.current = 0, p2(false), c2(o2.getView().getZoomScale());
|
|
@@ -1057,7 +1057,7 @@ const Sl = k(S((e2, t2) => {
|
|
|
1057
1057
|
d2 === u2.current && (u2.current = 0, o2.getView().update({ zoomScale: d2 }));
|
|
1058
1058
|
}, l2)();
|
|
1059
1059
|
}, [d2, l2]);
|
|
1060
|
-
const g2 =
|
|
1060
|
+
const g2 = ra((e3) => {
|
|
1061
1061
|
let t3 = e3;
|
|
1062
1062
|
e3 < 100 ? t3 = Math.round(e3 / (10 / 9) + 10) : e3 > 100 && (t3 = Math.round(3 * e3 - 200)), u2.current = t3, p2(true), c2(t3);
|
|
1063
1063
|
}, [o2]), h2 = (e3) => {
|
|
@@ -1068,10 +1068,10 @@ const Sl = k(S((e2, t2) => {
|
|
|
1068
1068
|
e3 && requestAnimationFrame(() => {
|
|
1069
1069
|
k2.current?.contains(document.activeElement) && e3.focus();
|
|
1070
1070
|
});
|
|
1071
|
-
}, []), T2 =
|
|
1071
|
+
}, []), T2 = ca(() => {
|
|
1072
1072
|
g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10)));
|
|
1073
|
-
}), R2 =
|
|
1074
|
-
return b(A, { ref: t2, className:
|
|
1073
|
+
}), R2 = ca(() => g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10)))), F2 = Sa(), B2 = C(() => `${r.getSharedMeasurer()("100%", Math.round(F2.typography.fontSize), F2.typography.fontFamily).width}px`, [F2]);
|
|
1074
|
+
return b(A, { ref: t2, className: Hn(a2), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (e3) => e3.palette.text.secondary, ...i2 }, onFocus: (e3) => {
|
|
1075
1075
|
e3.relatedTarget && !y2 && w2(e3.relatedTarget);
|
|
1076
1076
|
}, onBlur: (e3) => {
|
|
1077
1077
|
y2 && !k2?.current?.contains(e3.relatedTarget) && w2(null);
|
|
@@ -1081,20 +1081,20 @@ const Sl = k(S((e2, t2) => {
|
|
|
1081
1081
|
0 === e3.button && S2();
|
|
1082
1082
|
}, ...s2, children: [x(De, { disableInteractive: true, title: "Zoom Out", children: x(L, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
|
|
1083
1083
|
0 !== e3.button ? e3.preventDefault() : T2(e3);
|
|
1084
|
-
}, children: x(
|
|
1084
|
+
}, children: x(_n, {}) }) }), x(K, { ref: k2, 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 ${xo(e3.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (e3) => `0px 0px 0px 2px ${xo(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) => {
|
|
1085
1085
|
g2(h2(n.findNextStep(o2.getView().getZoomScale(), e3.deltaY < 0, 10)));
|
|
1086
1086
|
}, onKeyDown: (e3) => {
|
|
1087
|
-
e3.which ===
|
|
1087
|
+
e3.which === ia.Down || e3.which === ia.Right ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), true, 10))), e3.preventDefault()) : e3.which === ia.Up || e3.which === ia.Left ? (g2(h2(n.findNextStep(o2.getView().getZoomScale(), false, 10))), e3.preventDefault()) : e3.which !== ia.Enter && e3.which !== ia.Escape || S2();
|
|
1088
1088
|
}, onChange: (e3, t3) => {
|
|
1089
1089
|
Math.abs(t3 - 100) < 3 ? g2(100) : g2(t3);
|
|
1090
1090
|
}, valueLabelFormat: (e3, t3) => `Zoom: ${Math.round(d2)}%` }), x(De, { disableInteractive: true, title: "Zoom In", children: x(L, { sx: { padding: "0", "&:hover:not([disabled])": { color: (e3) => e3.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (e3) => {
|
|
1091
1091
|
0 !== e3.button ? e3.preventDefault() : R2(e3);
|
|
1092
|
-
}, children: x(
|
|
1092
|
+
}, children: x(qn, {}) }) }), b(A, { sx: { display: "flex", flexDirection: "row" }, children: [x(A, { sx: { minWidth: "8px" } }), x(I, { noWrap: true, component: "div", onClick: () => {
|
|
1093
1093
|
g2(100);
|
|
1094
1094
|
}, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: B2 }, children: x("div", { children: Math.round(d2) + "%" }) })] })] });
|
|
1095
1095
|
}));
|
|
1096
|
-
|
|
1097
|
-
const
|
|
1096
|
+
vl.displayName = "SheetZoomScale";
|
|
1097
|
+
const Tl = k(S((e2, t2) => {
|
|
1098
1098
|
const { sx: o2, sheet: n2, gridStyle: a2, children: r2, childrenEnd: l2, ...i2 } = e2;
|
|
1099
1099
|
N(t2, () => ({}));
|
|
1100
1100
|
const s2 = M(null);
|
|
@@ -1104,15 +1104,15 @@ const Cl = k(S((e2, t2) => {
|
|
|
1104
1104
|
s2.current?.removeEventListener("wheel", e3);
|
|
1105
1105
|
};
|
|
1106
1106
|
}, []);
|
|
1107
|
-
const d2 =
|
|
1107
|
+
const d2 = da(), c2 = C(() => {
|
|
1108
1108
|
const e3 = d2.getMode();
|
|
1109
1109
|
return e3?.description ? e3.description : "Ready";
|
|
1110
1110
|
}, [d2]), [m2, p2] = D(false);
|
|
1111
|
-
return b(A, { 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, x("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? x(A, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, x(ie, { style: { marginTop: "6px", marginBottom: "6px" } }), x(
|
|
1111
|
+
return b(A, { 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, x("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: x(I, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (e3) => e3.palette.text.secondary }, variant: "caption", children: c2 }) }), l2 ? x(A, { sx: { display: "flex", alignItems: "center" }, children: l2 }) : null, x(ie, { style: { marginTop: "6px", marginBottom: "6px" } }), x(vl, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: n2 })] });
|
|
1112
1112
|
}));
|
|
1113
|
-
|
|
1114
|
-
const
|
|
1115
|
-
const { disabled: o2, names: a2, workbook: l2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, notifier: u2, ...g2 } = e2, [h2, f2] = D(null), [w2, k2] = D(() => l2.getSelectedRanges().getCoords()), [S2, C2] = D(false), { reference: T2 } = bo({ parentFloat: c2?.parentFloat }), [R2, B2] = D(() => s2 || !l2.getProtection().isStructureAllowed()), N2 = () => h2?.text ?? "", [E2, I2] = D(N2), H2 =
|
|
1113
|
+
Tl.displayName = "StatusBar";
|
|
1114
|
+
const Dl = k(S((e2, t2) => {
|
|
1115
|
+
const { disabled: o2, names: a2, workbook: l2, restoreFocus: i2, readonly: s2 = false, disabled: d2 = false, commandPopupButtonProps: c2, sx: m2, notifier: u2, ...g2 } = e2, [h2, f2] = D(null), [w2, k2] = D(() => l2.getSelectedRanges().getCoords()), [S2, C2] = D(false), { reference: T2 } = bo({ parentFloat: c2?.parentFloat }), [R2, B2] = D(() => s2 || !l2.getProtection().isStructureAllowed()), N2 = () => h2?.text ?? "", [E2, I2] = D(N2), H2 = ra(() => {
|
|
1116
1116
|
if (T2?.closeAll(), !E2) {
|
|
1117
1117
|
const e4 = N2();
|
|
1118
1118
|
return I2(N2()), e4;
|
|
@@ -1141,10 +1141,10 @@ const vl = k(S((e2, t2) => {
|
|
|
1141
1141
|
let e4 = a2.getByName(E2);
|
|
1142
1142
|
R2 || e4 || (e4 = a2.addReference(E2, o3)), e4 && f2({ text: e4.getName() });
|
|
1143
1143
|
} catch (e4) {
|
|
1144
|
-
I2(N2()), u2.showMessage?.(e4.message, { type:
|
|
1144
|
+
I2(N2()), u2.showMessage?.(e4.message, { type: ma.Error });
|
|
1145
1145
|
}
|
|
1146
1146
|
return null;
|
|
1147
|
-
}, [E2, a2, T2, R2]), W2 =
|
|
1147
|
+
}, [E2, a2, T2, R2]), W2 = ra(() => {
|
|
1148
1148
|
if (l2.isClosed()) return;
|
|
1149
1149
|
const e3 = [];
|
|
1150
1150
|
for (let t4 = 0; t4 < w2.length; t4++) {
|
|
@@ -1159,7 +1159,7 @@ const vl = k(S((e2, t2) => {
|
|
|
1159
1159
|
let o3 = null;
|
|
1160
1160
|
o3 = t3?.length > 0 ? t3[0].getName() : l2.getSelectedSheet().getSelectedRange().toString(), f2({ text: o3 });
|
|
1161
1161
|
}, [l2, w2]), [z2, $2] = D(() => a2?.getItems() ?? null);
|
|
1162
|
-
|
|
1162
|
+
Ma(a2, { onCollectionChange(e3) {
|
|
1163
1163
|
$2(a2.getItems()), W2();
|
|
1164
1164
|
}, onClose(e3) {
|
|
1165
1165
|
$2([]);
|
|
@@ -1167,15 +1167,15 @@ const vl = k(S((e2, t2) => {
|
|
|
1167
1167
|
I2(N2());
|
|
1168
1168
|
}, [h2, w2]);
|
|
1169
1169
|
const [V2, G2] = D(l2?.getSelectedSheet());
|
|
1170
|
-
|
|
1170
|
+
Ma(l2, { onProtectionChange: (e3) => {
|
|
1171
1171
|
B2(s2 || !e3.getProtection().isStructureAllowed());
|
|
1172
1172
|
}, onSheetsChange: (e3) => {
|
|
1173
1173
|
G2(e3?.getSelectedSheet());
|
|
1174
1174
|
}, onViewChange(e3) {
|
|
1175
1175
|
G2(e3?.getSelectedSheet());
|
|
1176
1176
|
} });
|
|
1177
|
-
const [U2, j2] = D(null), _2 =
|
|
1178
|
-
|
|
1177
|
+
const [U2, j2] = D(null), _2 = ra(n.debounce(W2, U2 ? 320 : 0), []);
|
|
1178
|
+
Ma(V2.getSelection(), { onChange: () => {
|
|
1179
1179
|
k2((e3) => {
|
|
1180
1180
|
const t3 = l2.getSelectedRanges().getCoords();
|
|
1181
1181
|
return p.isEqualRangesArrays(t3, e3) ? e3 : t3;
|
|
@@ -1195,31 +1195,31 @@ const vl = k(S((e2, t2) => {
|
|
|
1195
1195
|
return x(L, { ...n2, sx: { ...n2?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: true, children: x(O, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: false, spellCheck: false, autoComplete: "off", ref: q2 }, 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", fontSize: 11 * r.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", 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: E2, onFocus: (e4) => {
|
|
1196
1196
|
e4.target?.select();
|
|
1197
1197
|
}, onKeyDown: (e4) => {
|
|
1198
|
-
if (e4.which ===
|
|
1198
|
+
if (e4.which === ia.Enter || e4.which === ia.Tab) {
|
|
1199
1199
|
let t4 = E2;
|
|
1200
1200
|
N2() !== E2 && (e4.stopPropagation(), e4.preventDefault(), t4 = H2()), t4 ? X2(t4) : i2?.();
|
|
1201
|
-
} else if (e4.which ===
|
|
1201
|
+
} else if (e4.which === ia.Escape) N2() !== E2 ? (I2(N2()), setTimeout(() => {
|
|
1202
1202
|
e4.target?.select();
|
|
1203
1203
|
}, 0), e4.stopPropagation(), e4.preventDefault()) : i2?.();
|
|
1204
|
-
else if (e4.which ===
|
|
1204
|
+
else if (e4.which === ia.Space) return void e4.stopPropagation();
|
|
1205
1205
|
}, onBlur: () => {
|
|
1206
1206
|
I2(N2());
|
|
1207
1207
|
}, onChange: (e4) => {
|
|
1208
1208
|
I2(e4.target.value);
|
|
1209
1209
|
} }) });
|
|
1210
|
-
}, [E2, h2]), X2 =
|
|
1210
|
+
}, [E2, h2]), X2 = ra(async (e3) => {
|
|
1211
1211
|
try {
|
|
1212
1212
|
T2?.closeAll();
|
|
1213
1213
|
const t3 = a2.lookupByRanges(e3)?.[0];
|
|
1214
1214
|
t3 && await t3?.select(), await l2.getRanges(e3)?.select();
|
|
1215
1215
|
} catch (e4) {
|
|
1216
|
-
u2.showMessage?.(e4.message, { type:
|
|
1216
|
+
u2.showMessage?.(e4.message, { type: ma.Error });
|
|
1217
1217
|
}
|
|
1218
1218
|
}, [a2, u2, l2]), Z2 = v((e3) => {
|
|
1219
1219
|
setTimeout(() => {
|
|
1220
1220
|
C2(true);
|
|
1221
1221
|
}, 0);
|
|
1222
|
-
const t3 = { variant:
|
|
1222
|
+
const t3 = { variant: aa.Menuitem, parentFloat: e3.floatReference, commandHook: { ...c2?.commandHook, beforeExecute: (e4, t4) => (T2?.closeAll(), c2?.commandHook?.beforeExecute?.(e4, t4)) }, scope: c2?.scope, commands: c2?.commands };
|
|
1223
1223
|
let o3 = a2.getItems({ scope: l2?.getSelectedSheet().getName() });
|
|
1224
1224
|
o3 = o3.sort((e4, t4) => e4.getType() === t4.getType() ? e4.getName().localeCompare(t4.getName()) : "range" === e4.getType() ? -1 : 1);
|
|
1225
1225
|
const n2 = R2 ? null : ["editNamedReference", "deleteNamedReference"], r2 = R2 ? null : ["editTable", null, "convertTableToRange", "deleteTable"], i3 = [], s3 = o3.length;
|
|
@@ -1243,38 +1243,38 @@ const vl = k(S((e2, t2) => {
|
|
|
1243
1243
|
}
|
|
1244
1244
|
const m3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g2, children: [R2 ? null : x(le, { ...t3, scope: "namedItem", command: c2?.commands.getCommand("addNamedReference"), icon: re(x(Co, {})) }), i3 && i3.length > 0 ? b(y, { children: [R2 ? null : x(ie, { orientation: "horizontal" }), x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 })] }) : null] });
|
|
1245
1245
|
return ce({ ...e3, children: m3 });
|
|
1246
|
-
}, [l2, z2, a2, h2, R2]), J2 =
|
|
1246
|
+
}, [l2, z2, a2, h2, R2]), J2 = pa(t2, () => ({ focus(e3) {
|
|
1247
1247
|
q2.current?.focus(e3);
|
|
1248
1248
|
} }), []);
|
|
1249
|
-
return x(A, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref:
|
|
1249
|
+
return x(A, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...m2 }, ref: Ua([J2, t2]), ...g2, children: x(Me, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%", height: "27px" }, ...m2 }, buttonProps: { sx: { backgroundColor: (e3) => e3.palette.background.paper, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` } }, tabIndex: -1, outlined: { color: (e3) => o2 ? e3.palette.action.disabled : Ca(e3.palette.divider, 0.2) }, parentFloat: T2, createPopupPanel: Z2, onPopupOpen: () => C2(true), onPopupClose: () => C2(false), createTooltip: ({ children: e3 }, t3) => x(Le, { title: t3 || S2 ? "" : "Name Box", disabled: t3, leaveDelay: 0, sx: { opacity: t3 || S2 ? 0 : 1 }, children: e3 }), createQuickButton: K2 }) });
|
|
1250
1250
|
}));
|
|
1251
|
-
|
|
1252
|
-
const
|
|
1253
|
-
const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 =
|
|
1254
|
-
|
|
1251
|
+
Dl.displayName = "NamedCollectionEditor";
|
|
1252
|
+
const Pl = (e2, t2) => x(Dl, { ref: t2, ...e2 }), Rl = k(S((e2, t2) => {
|
|
1253
|
+
const { sx: o2, workbook: n2, sheetElement: a2, gridStyle: l2, showNamedCollectionEditor: i2 = true, NamedCollectionEditorProps: s2, renderNamedCollectionEditor: d2 = Pl, disabled: c2, commands: m2, ...p2 } = e2, [u2, g2] = D(n2?.getSelectedSheet());
|
|
1254
|
+
Ma(n2, { onSheetsChange: (e3) => {
|
|
1255
1255
|
g2(e3?.getSelectedSheet());
|
|
1256
1256
|
}, onViewChange(e3) {
|
|
1257
1257
|
g2(e3?.getSelectedSheet());
|
|
1258
1258
|
} });
|
|
1259
1259
|
const [h2, f2] = D(u2.getSelection().getCoords().cell), w2 = u2.getRange(h2).getCell(), k2 = c2 || !w2.isEditAllowed(), S2 = M(null), v2 = C(() => ({ fontSize: 11 }), []);
|
|
1260
|
-
|
|
1260
|
+
Ma(u2.getSelection(), { onChange: () => {
|
|
1261
1261
|
f2(u2.getSelection().getCoords().cell);
|
|
1262
|
-
} }),
|
|
1262
|
+
} }), Ma(u2, { onProtectionChange() {
|
|
1263
1263
|
f2(u2.getSelection().getCoords().cell);
|
|
1264
1264
|
} });
|
|
1265
|
-
const T2 = S2.current?.getLineHeight() ?? 20, [P2, R2] = D(T2), [F2, B2] = D(5), [N2, E2] = D(1), I2 =
|
|
1265
|
+
const T2 = S2.current?.getLineHeight() ?? 20, [P2, R2] = D(T2), [F2, B2] = D(5), [N2, E2] = D(1), I2 = ra((e3, { size: t3 }) => {
|
|
1266
1266
|
e3.preventDefault(), e3.stopPropagation();
|
|
1267
1267
|
const o3 = Math.floor(t3.height / T2);
|
|
1268
1268
|
R2(o3 * T2 + 1), o3 > 1 && B2(o3);
|
|
1269
|
-
}, [T2]), L2 =
|
|
1269
|
+
}, [T2]), L2 = ra((e3, { size: t3 }) => {
|
|
1270
1270
|
const o3 = Math.floor(t3.height / T2);
|
|
1271
1271
|
E2(o3);
|
|
1272
|
-
}, [T2]), H2 =
|
|
1272
|
+
}, [T2]), H2 = da(), W2 = H2.getMode();
|
|
1273
1273
|
let z2 = null;
|
|
1274
1274
|
"edit" === W2?.key && (z2 = W2.args?.stateAndCoords);
|
|
1275
1275
|
const $2 = C(() => {
|
|
1276
1276
|
let e3 = z2?.editState;
|
|
1277
|
-
return e3 || (e3 =
|
|
1277
|
+
return e3 || (e3 = Fa(() => u2.getRange(h2).getCell())), x(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: x(Ba, { ref: S2, activeCoords: h2, sheet: u2, onFocus: () => {
|
|
1278
1278
|
a2?.startEdit({ autoFocus: false, editMode: true, cell: h2 });
|
|
1279
1279
|
}, defaultTextStyle: v2, useRichStyling: false, disabled: k2, onChangeEdit: (e4) => {
|
|
1280
1280
|
if (void 0 !== e4.dirty) {
|
|
@@ -1286,7 +1286,7 @@ const Tl = (e2, t2) => x(vl, { ref: t2, ...e2 }), Dl = k(S((e2, t2) => {
|
|
|
1286
1286
|
}, onSubmitEdit: () => {
|
|
1287
1287
|
a2?.submitEdit(), a2?.focus();
|
|
1288
1288
|
}, linesVisible: N2 }) });
|
|
1289
|
-
}, [u2, z2, h2, N2, a2]), O2 = M(null), V2 = C(() => i2 ? d2({ names: n2.getNames(), workbook: n2, ...s2 }, O2) : null, [d2, s2, i2, u2, n2, k2]), G2 = C(() => b(X, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${
|
|
1289
|
+
}, [u2, z2, h2, N2, a2]), O2 = M(null), V2 = C(() => i2 ? d2({ names: n2.getNames(), workbook: n2, ...s2 }, O2) : null, [d2, s2, i2, u2, n2, k2]), G2 = C(() => b(X, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, border: (e3) => `solid ${k2 ? e3.palette.action.disabled : Ca(e3.palette.divider, 0.2)} 1px` }, children: [x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, color: "warning", "aria-label": "cancel-formula-edit", icon: re(x(vo, {})), tooltipProps: { label: "Cancel", simple: true }, disabled: k2 || null === z2, onMouseDown: (e3) => {
|
|
1290
1290
|
0 === e3.button && e3.preventDefault();
|
|
1291
1291
|
}, onClick: () => {
|
|
1292
1292
|
a2.cancelEdit();
|
|
@@ -1296,40 +1296,40 @@ const Tl = (e2, t2) => x(vl, { ref: t2, ...e2 }), Dl = k(S((e2, t2) => {
|
|
|
1296
1296
|
a2.submitEdit();
|
|
1297
1297
|
} }), x(He, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: true, outlined: false, disabled: true, "aria-label": "commit-formula-function", icon: re(x(Do, { sx: { transform: "scale(0.85)" } })), tooltipProps: { label: "Insert Function", simple: true }, onMouseDown: (e3) => {
|
|
1298
1298
|
0 === e3.button && e3.preventDefault();
|
|
1299
|
-
} })] }), [k2, z2]), U2 =
|
|
1299
|
+
} })] }), [k2, z2]), U2 = Sa(), [j2, _2] = D(false), q2 = C(() => b(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (e3) => e3.spacing(0.5), alignItems: "start" }, children: [G2, b(X, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (e3) => e3.typography.fontFamily, fontSize: 11 * r.getDeviceScale(), "& .editor-placement": { top: "2px !important" }, boxShadow: "none", borderRadius: (e3) => `${e3.shape.borderRadius}px`, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, border: (e3) => `solid ${k2 ? e3.palette.action.disabled : Ca(e3.palette.divider, 0.2)} 1px`, "& textarea": { color: (e3) => k2 ? `${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) => {
|
|
1300
1300
|
e3.target?.classList.contains("react-resizable-handle") && e3.preventDefault();
|
|
1301
|
-
}, children: [x(A, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignSelf: "baseline", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: x(
|
|
1301
|
+
}, children: [x(A, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignSelf: "baseline", paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }, children: x(Ga, { height: P2, draggableOpts: { grid: [T2, T2] }, minConstraints: [T2, T2], maxConstraints: [15 * T2, 15 * T2], onResize: L2, onResizeStop: I2, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: $2 }) }), x(He, { 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: re(x(N2 > 1 ? Kn : Xn, {})), tooltipProps: { label: (N2 > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: true }, onMouseDown: (e3) => {
|
|
1302
1302
|
0 === e3.button && e3.preventDefault();
|
|
1303
1303
|
}, onClick: () => {
|
|
1304
1304
|
const e3 = N2 > 1 ? 1 : F2;
|
|
1305
1305
|
R2(e3 * T2 + 1), E2(e3);
|
|
1306
|
-
} }), x(A, { 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` } })] })] }), [G2, $2, j2, N2, T2]), K2 = C(() => V2 || q2 ? !V2 && q2 ? q2 : V2 && !q2 ? V2 : x(y, { children: x(
|
|
1306
|
+
} }), x(A, { 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` } })] })] }), [G2, $2, j2, N2, T2]), K2 = C(() => V2 || q2 ? !V2 && q2 ? q2 : V2 && !q2 ? V2 : x(y, { children: x(ua, { 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='${U2.palette.text.icon ?? U2.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: V2, elementAfter: q2 }) }) : null, [V2, q2]), Z2 = pa(t2, () => ({ isFormulaBarElement: () => true, getNamedCollectionEditorElement: () => O2.current }), []);
|
|
1307
1307
|
return x(A, { sx: { display: "flex", flexDirection: "row", gap: (e3) => e3.spacing(0.5), ...o2 }, ref: Z2, ...p2, children: K2 });
|
|
1308
1308
|
}));
|
|
1309
|
-
|
|
1310
|
-
const
|
|
1309
|
+
Rl.displayName = "FormulaBar";
|
|
1310
|
+
const Ml = k(S((e2, t2) => {
|
|
1311
1311
|
const { filter: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2, s2 = C(() => ({}), []), d2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
|
|
1312
1312
|
}, onError() {
|
|
1313
1313
|
console.log("onError");
|
|
1314
|
-
} }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = C(() => ({ ...s2, ...d2, variant:
|
|
1314
|
+
} }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = C(() => ({ ...s2, ...d2, variant: aa.Menuitem }), [s2, d2]), m2 = b(y, { children: [x(le, { ...c2, command: n2.getCommand("sortAscending"), icon: re(x(ft, {})) }), x(le, { ...c2, command: n2.getCommand("sortDescending"), icon: re(x(xt, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...c2, command: n2.getCommand("autoFilterClear"), icon: re(x(wt, {})) }), []] });
|
|
1315
1315
|
return x(A, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...r2 }, ...i2, children: m2 });
|
|
1316
1316
|
}));
|
|
1317
|
-
|
|
1318
|
-
const
|
|
1319
|
-
const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 =
|
|
1320
|
-
return x("div", { ref: s2, className:
|
|
1317
|
+
Ml.displayName = "FilterColumnMenu";
|
|
1318
|
+
const Fl = k(S((e2, t2) => {
|
|
1319
|
+
const { children: o2, className: n2, disabled: a2, style: r2, filter: l2, ...i2 } = e2, s2 = pa(t2, () => ({ isFilters: () => true }), []);
|
|
1320
|
+
return x("div", { ref: s2, className: Hn("filters", n2), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...r2 }, ...i2, children: b("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: [x("div", { children: l2.getName() }), x("div", { children: "Filter Widget" })] }) });
|
|
1321
1321
|
}));
|
|
1322
|
-
|
|
1323
|
-
const
|
|
1322
|
+
Fl.displayName = "Filters";
|
|
1323
|
+
const Bl = k(S((e2, t2) => {
|
|
1324
1324
|
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: w2 = 4, gridTheme: k2, ...S2 } = e2, [C2, v2] = D(() => !!n2 && n2.getProtection().isLocked()), [T2, P2] = D(() => n2 ? n2.getTabColor() : null);
|
|
1325
|
-
|
|
1325
|
+
Ma(n2, { onProtectionChange: () => {
|
|
1326
1326
|
v2(n2.getProtection().isLocked());
|
|
1327
1327
|
}, onTabColorChange: () => {
|
|
1328
1328
|
P2(n2.getTabColor());
|
|
1329
1329
|
}, onStyleChange: () => {
|
|
1330
1330
|
P2(n2.getTabColor());
|
|
1331
1331
|
} });
|
|
1332
|
-
const R2 =
|
|
1332
|
+
const R2 = Sa(), M2 = m2 === i2;
|
|
1333
1333
|
let F2 = null, B2 = null;
|
|
1334
1334
|
if (T2 || p2) {
|
|
1335
1335
|
let e3 = f2;
|
|
@@ -1338,30 +1338,30 @@ const Ml = k(S((e2, t2) => {
|
|
|
1338
1338
|
let N2 = null;
|
|
1339
1339
|
"string" == typeof u2 ? N2 = u2 : u2?.toCSS && (N2 = u2.toCSS());
|
|
1340
1340
|
const E2 = M2 ? x(A, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (e3) => e3.palette.primary.main } }) : null;
|
|
1341
|
-
return x(
|
|
1341
|
+
return x(Ta, { theme: M2 ? k2 ?? R2 : R2, children: x(A, { ref: t2, className: Hn(r2), sx: { ...a2, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: M2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: p2 ? "grabbing" : void 0 }, ...S2, children: x(ga, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: w2, strokeColor: M2 ? N2 : "transparent", children: x(z, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: M2 ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: p2 ? "grabbing" : void 0, color: M2 ? "primary" : B2 || "text.secondary", backgroundColor: M2 ? f2 : "transparent", "&:hover:not([disabled])": { backgroundColor: M2 ? f2 : "transparent" }, "& input": { color: (e3) => `${e3.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: c2, disableRipple: s2, component: "div", children: b(y, { children: [F2, b(A, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [b(A, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: M2 ? void 0 : "1px" }, children: [o2, E2] }), C2 ? x(Zn, { sx: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : x(A, { sx: { minHeight: "22px" } })] })] }) }, l2 + ":" + i2) }) }) });
|
|
1342
1342
|
}));
|
|
1343
|
-
|
|
1344
|
-
const
|
|
1343
|
+
Bl.displayName = "SheetTab";
|
|
1344
|
+
const Nl = k(S((e2, t2) => {
|
|
1345
1345
|
const { workbook: o2, index: n2, commands: a2, scope: r2 = "sheet", disabled: l2, floatReference: i2, sx: s2, className: d2, tabStripRef: c2, ...m2 } = e2, [p2, u2] = D(o2?.getProtection());
|
|
1346
|
-
|
|
1346
|
+
Ma(o2, { onProtectionChange: (e3) => {
|
|
1347
1347
|
u2(e3?.getProtection());
|
|
1348
1348
|
} });
|
|
1349
1349
|
const g2 = C(() => ({}), []), h2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => i2.closeAll(), onExecute() {
|
|
1350
1350
|
}, onError() {
|
|
1351
1351
|
console.log("onError");
|
|
1352
|
-
} }, scope: r2, commandState: n2, disabled: l2 || void 0 === n2, parentFloat: i2 }), [l2, i2]), f2 = C(() => ({ ...g2, ...h2 }), [g2, h2]), w2 = b(y, { children: [x(le, { command: a2.getCommand("addSheet"), commandState: n2, ...f2, variant:
|
|
1352
|
+
} }, scope: r2, commandState: n2, disabled: l2 || void 0 === n2, parentFloat: i2 }), [l2, i2]), f2 = C(() => ({ ...g2, ...h2 }), [g2, h2]), w2 = b(y, { children: [x(le, { command: a2.getCommand("addSheet"), commandState: n2, ...f2, variant: aa.Menuitem }), x(le, { command: a2.getCommand("deleteSheet"), ...f2, variant: aa.Menuitem }), b(Ne, { onMouseDown: (e3) => {
|
|
1353
1353
|
0 === e3.button && e3.preventDefault();
|
|
1354
1354
|
}, onMouseUp: () => {
|
|
1355
1355
|
Promise.resolve(i2.closeAll()).then(() => {
|
|
1356
1356
|
c2?.startEdit(n2);
|
|
1357
1357
|
});
|
|
1358
|
-
}, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== r2 ? " Sheet" : ""] }), x(le, { command: a2.getCommand("duplicateSheet"), ...f2, variant:
|
|
1359
|
-
return x(A, { ref: t2, className:
|
|
1358
|
+
}, disabled: l2 || !p2.isStructureAllowed(), parentFloat: i2, children: ["Rename", "sheet" !== r2 ? " Sheet" : ""] }), x(le, { command: a2.getCommand("duplicateSheet"), ...f2, variant: aa.Menuitem }), x(le, { command: a2?.getCommand("protectionSheetToggle"), ...f2, variant: aa.Menuitem, icon: x(Zn, {}) }), x(Hr, { variant: aa.Menuitem, command: a2.getCommand("formatSheetTabColor"), icon: x(Ie, {}), panelProps: { disableAlpha: true, autoColorLabel: "No Tab Color", autoColorPosition: sr.End }, parentFloat: i2 }), x(ie, { orientation: "horizontal" }), x(le, { command: a2.getCommand("hideSheet"), ...f2, variant: aa.Menuitem, icon: re(x(Po, {})) })] });
|
|
1359
|
+
return x(A, { ref: t2, className: Hn("menu", d2), sx: { ...s2 }, ...m2, children: w2 });
|
|
1360
1360
|
}));
|
|
1361
|
-
|
|
1362
|
-
const
|
|
1361
|
+
Nl.displayName = "SheetTabMenu";
|
|
1362
|
+
const El = k(S((e2, t2) => {
|
|
1363
1363
|
const { workbook: o2, gridStyle: n2, floatReference: a2, closeFloatAll: r2, className: l2, ...i2 } = e2, [s2, d2] = D(o2?.getSheets().getItems()), [c2, m2] = D(o2?.getProtection());
|
|
1364
|
-
|
|
1364
|
+
Ma(o2, { onSheetsChange: (e3) => {
|
|
1365
1365
|
d2(e3.getSheets().getItems());
|
|
1366
1366
|
}, onProtectionChange: (e3) => {
|
|
1367
1367
|
m2(e3?.getProtection());
|
|
@@ -1375,9 +1375,9 @@ const Bl = k(S((e2, t2) => {
|
|
|
1375
1375
|
let g2 = null, h2 = null, f2 = p3;
|
|
1376
1376
|
m3 && (f2 = m3.toCSS(), s3 || (h2 = m3.toBlackOrWhite().toCSS()), g2 = x(A, { 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: x(A, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: s3 || i3 === u.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" } }) }));
|
|
1377
1377
|
let w2 = null;
|
|
1378
|
-
d3 && (w2 = x(
|
|
1378
|
+
d3 && (w2 = x(Zn, { color: "secondary" })), i3 !== u.Visibility.Visible && (w2 = re(x(Po, { style: { opacity: c2.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" }))), w2 && (w2 = x(A, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: w2 })), e3.push(x(Ne, { disabled: !c2.isStructureAllowed() && i3 === u.Visibility.Hidden, sx: { color: (e4) => {
|
|
1379
1379
|
let t4 = s3 ? e4.palette.primary.main : e4.palette.text.secondary;
|
|
1380
|
-
return h2 && (t4 = h2), i3 === u.Visibility.Hidden && (t4 =
|
|
1380
|
+
return h2 && (t4 = h2), i3 === u.Visibility.Hidden && (t4 = Oa(t4, e4.palette.action.disabledOpacity)), t4;
|
|
1381
1381
|
}, borderLeft: (e4) => `${s3 ? e4.palette.primary.main : "transparent"} solid 2px`, paddingLeft: "4px", fontWeight: s3 ? "700" : "400", "&:hover": { fontWeight: "700" } }, icon: s3 ? x(Ye, {}) : void 0, onMouseDown: (e4) => e4.preventDefault(), onMouseUp: () => {
|
|
1382
1382
|
Promise.resolve(a2.closeAll()).then(() => {
|
|
1383
1383
|
try {
|
|
@@ -1390,27 +1390,27 @@ const Bl = k(S((e2, t2) => {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
return e3;
|
|
1392
1392
|
}, [o2, c2, s2, a2, n2]);
|
|
1393
|
-
return x(A, { ref: t2, className:
|
|
1393
|
+
return x(A, { ref: t2, className: Hn("menu", l2), ...i2, children: p2 });
|
|
1394
1394
|
}));
|
|
1395
|
-
|
|
1396
|
-
let
|
|
1397
|
-
let
|
|
1398
|
-
const
|
|
1395
|
+
El.displayName = "SheetsAllMenu";
|
|
1396
|
+
let Al = false, Il = false;
|
|
1397
|
+
let Ll = null;
|
|
1398
|
+
const Hl = async (e2) => {
|
|
1399
1399
|
const t2 = await g.getDetails();
|
|
1400
|
-
if (
|
|
1400
|
+
if (Il || t2.isEval()) {
|
|
1401
1401
|
try {
|
|
1402
1402
|
const e3 = top ?? window;
|
|
1403
|
-
e3.SheetXL || (e3.SheetXL = Object.freeze({ getSelectedWorkbook: () =>
|
|
1403
|
+
e3.SheetXL || (e3.SheetXL = Object.freeze({ getSelectedWorkbook: () => Ll?.getWorkbook(), getSelectedSheet: () => Ll?.getWorkbook().getSelectedSheet(), getSelectedRange: () => Ll?.getWorkbook().getSelectedRange(), getRange: (e4) => Ll?.getWorkbook().getRange(e4), getSelectedWorkbookElement: () => Ll, getLicenseManager: () => g, moreExamples: () => {
|
|
1404
1404
|
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().updateStyle({ fill: 'accent4' })": { Summary: "Set fill to theme color 4." }, "SheetXL.getRange('E:L').updateStyle({ fill: 'accent1 lumMod 90 lumOff 40' })": { Summary: "Set some columns to a modified theme color." }, "SheetXL.getRange('e5:f10').updateStyle({ 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).updateStyle({ 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').updateStyle({ 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." } };
|
|
1405
1405
|
console.table(e4);
|
|
1406
1406
|
} }));
|
|
1407
1407
|
} catch (e3) {
|
|
1408
|
-
e3 instanceof DOMException || console.error(e3),
|
|
1408
|
+
e3 instanceof DOMException || console.error(e3), Al = true;
|
|
1409
1409
|
}
|
|
1410
|
-
if (
|
|
1411
|
-
|
|
1410
|
+
if (Ll !== e2 && (Ll = e2, !Al)) try {
|
|
1411
|
+
Al = true;
|
|
1412
1412
|
(top ?? window).SheetXL && (await g._validate(true), g.wasPrinted() && (() => {
|
|
1413
|
-
|
|
1413
|
+
ja.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;"), Al = true;
|
|
1414
1414
|
const e3 = document.getElementById("openEditorLink");
|
|
1415
1415
|
e3 && e3.addEventListener("click", (e4) => {
|
|
1416
1416
|
e4.preventDefault(), console.log("openScriptEditor called from console");
|
|
@@ -1420,20 +1420,20 @@ const Il = async (e2) => {
|
|
|
1420
1420
|
e3 instanceof DOMException || console.error(e3);
|
|
1421
1421
|
}
|
|
1422
1422
|
}
|
|
1423
|
-
},
|
|
1424
|
-
|
|
1425
|
-
},
|
|
1423
|
+
}, Wl = (e2) => {
|
|
1424
|
+
Il = e2;
|
|
1425
|
+
}, zl = 0.12, $l = (e2, t2) => {
|
|
1426
1426
|
const o2 = {}, n2 = (e3) => {
|
|
1427
1427
|
const t3 = e3.palette?.background.default ?? "rgba(255,255,255,1)";
|
|
1428
|
-
return { text: { fontFamily: e3.typography?.fontFamily ?? "Calibri", fontSize: e3.typography?.fontSize ?? 8.25, fontWeight: e3.typography?.fontWeightRegular ?? "400", fill: "dark" === e3.palette.mode ? e3.palette?.text?.secondary : e3.palette?.text?.primary }, fill: t3, strokeFill: Ro(t3,
|
|
1428
|
+
return { text: { fontFamily: e3.typography?.fontFamily ?? "Calibri", fontSize: e3.typography?.fontSize ?? 8.25, fontWeight: e3.typography?.fontWeightRegular ?? "400", fill: "dark" === e3.palette.mode ? e3.palette?.text?.secondary : e3.palette?.text?.primary }, fill: t3, strokeFill: Ro(t3, zl, e3.palette?.mode), darkMode: "dark" === e3.palette.mode };
|
|
1429
1429
|
}, a2 = n2(t2);
|
|
1430
|
-
o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: Ro(o2.body.fill,
|
|
1430
|
+
o2.body = n2(e2), o2.header = { ...o2.body, strokeFill: Ro(o2.body.fill, zl, e2.palette?.mode), fill: t2 && "dark" === e2.palette.mode && t2.palette.mode !== e2.palette.mode ? o2.body.fill : Ro(o2.body.fill, 0.055, e2.palette?.mode), edgeStrokeFill: "dark" === e2.palette.mode ? o2.body.strokeFill : Ro(o2.body.fill, 0.328, e2.palette?.mode) }, o2.headerHover = (t3) => ({ ...o2.header, strokeFill: Ro(t3?.fill ?? o2.body.fill, 0.22, e2.palette?.mode), fill: Ro(t3?.fill ?? o2.header.fill, 0.065, e2.palette?.mode), text: { ...t3?.text, fontWeight: e2.typography?.fontWeightBold } });
|
|
1431
1431
|
const r2 = Ro("dark" !== e2.palette.mode ? e2.palette.primary.light : e2.palette.primary.main, 0.055, e2.palette?.mode);
|
|
1432
|
-
o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill:
|
|
1432
|
+
o2.headerSelect = { ...o2.header, strokeFill: e2.palette.primary.main, fill: Oa(r2, 0.2), text: { ...o2.header.text, fill: e2.palette.primary.main }, dividerStrokeFill: Oa(r2, 0.7) }, o2.headerSelectAll = { ...o2.headerSelect, fill: Oa(r2, 0.9), text: { ...o2.headerSelect.text, fill: e2.palette.primary.contrastText }, edgeStrokeFill: o2.headerSelect.strokeFill }, o2.buttonSurface = { ...a2, strokeFill: Ro(a2.fill, zl, t2.palette?.mode), fill: t2 && "dark" === t2.palette.mode && t2.palette.mode !== e2.palette.mode ? a2.fill : Ro(a2.fill, 0.055, t2.palette?.mode), edgeStrokeFill: "dark" === t2.palette.mode ? a2.strokeFill : Ro(a2.fill, 0.328, t2.palette?.mode) }, o2.headerSelection = { fill: e2.palette?.primary?.main ? Oa(e2.palette?.primary?.main, 0.1) : void 0, strokeFill: e2.palette?.primary?.main }, o2.headerSelectionInactive = { ...o2.headerSelection, fill: e2.palette?.divider ? Oa(e2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
|
|
1433
1433
|
const l2 = t2 ?? e2, i2 = "dark" === l2.palette.mode;
|
|
1434
|
-
return o2.selection = { fill: l2.palette?.primary?.main ?
|
|
1435
|
-
},
|
|
1436
|
-
const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 =
|
|
1434
|
+
return o2.selection = { fill: l2.palette?.primary?.main ? Oa(l2.palette?.primary?.main, 0.1) : void 0, strokeFill: l2.palette?.primary?.main }, o2.selectionInactive = { ...o2.selection, fill: l2.palette?.divider ? Oa(l2.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, o2.selectionRemove = { ...o2.selection, fill: Oa(l2.palette.warning.light, 0.05), strokeFill: l2.palette.warning.dark }, t2 && (o2.body = n2(t2)), o2.colorShadow = Oa(l2.palette.action.active, 0.5), o2.colorGrey = l2.palette.action.active, o2.filterDarkInvert = i2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", o2;
|
|
1435
|
+
}, Ol = k(S((e2, t2) => {
|
|
1436
|
+
const { children: o2, sx: n2, parentFloat: a2, ...r2 } = e2, l2 = pa(t2, () => ({}), []), [i2, s2] = Xa(), d2 = M(null), c2 = M(null), [m2, p2] = w.useReducer((e3) => e3 + 1, 0), [u2, g2] = D(null), [h2, f2] = D(null), [y2, k2] = D(null), { reference: S2 } = bo({ parentFloat: a2, label: "overflow" });
|
|
1437
1437
|
E(() => {
|
|
1438
1438
|
c2.current = { refs: [] };
|
|
1439
1439
|
const e3 = [], t3 = w.Children.toArray(o2);
|
|
@@ -1475,7 +1475,7 @@ const Il = async (e2) => {
|
|
|
1475
1475
|
}
|
|
1476
1476
|
f2(n3.length > 0 ? n3 : null), k2(a3.length > 0 ? a3 : null);
|
|
1477
1477
|
}, [o2, u2, s2, S2, m2]);
|
|
1478
|
-
const C2 =
|
|
1478
|
+
const C2 = ra((e3) => {
|
|
1479
1479
|
const t3 = [], o3 = y2.length;
|
|
1480
1480
|
for (let n4 = 0; n4 < o3; n4++) {
|
|
1481
1481
|
const o4 = w.Children.toArray(y2[n4])[0];
|
|
@@ -1489,18 +1489,18 @@ const Il = async (e2) => {
|
|
|
1489
1489
|
const n3 = x(A, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (e4) => e4.spacing(0.25), paddingTop: (e4) => e4.spacing(0.5), paddingBottom: (e4) => e4.spacing(0.5), paddingLeft: (e4) => e4.spacing(1), paddingRight: (e4) => e4.spacing(1), overflow: "hidden" }, children: t3 });
|
|
1490
1490
|
return ce({ ...e3, children: n3 });
|
|
1491
1491
|
}, [y2]);
|
|
1492
|
-
return b(A, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref:
|
|
1493
|
-
})),
|
|
1492
|
+
return b(A, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...n2 }, ref: Ua([l2, i2, t2]), ...r2, children: [x(A, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%" }, children: h2 ?? u2 }), x(A, { sx: { display: null !== y2 && 0 === y2.length ? "none" : "flex", flex: "1 1 0" }, children: x(Me, { createPopupPanel: C2, ref: d2, parentFloat: S2, createTooltip: ({ children: e3 }, t3) => x(Le, { label: "More", description: "More toolbar options…", disabled: t3, children: e3 }), icon: x(Mo, { children: x(Jn, {}) }) }) })] });
|
|
1493
|
+
})), Vl = "https://unpkg.com/@sheetxl/scripting-templates/dist", Gl = (e2) => {
|
|
1494
1494
|
if (e2.metadata?.name) return e2.metadata.name;
|
|
1495
1495
|
let t2 = (e2.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
|
|
1496
1496
|
if ("formula" === e2.metadata?.icon) return t2.toUpperCase();
|
|
1497
1497
|
t2 = t2.replace(/([a-z])([A-Z])/g, "$1 $2");
|
|
1498
1498
|
return t2.replace(/[-_]/g, " ").trim().split(/\s+/).map((e3) => e3.charAt(0).toUpperCase() + e3.slice(1)).join(" ");
|
|
1499
|
-
},
|
|
1500
|
-
const t2 =
|
|
1501
|
-
if (!o2.ok) throw new
|
|
1499
|
+
}, Ul = async (e2) => {
|
|
1500
|
+
const t2 = Ya.relativePath(e2, "./manifest.json"), o2 = await fetch(t2);
|
|
1501
|
+
if (!o2.ok) throw new _a(`Failed to retrieve directory at '${e2}': ${o2.statusText}`);
|
|
1502
1502
|
const n2 = await o2.text();
|
|
1503
|
-
if (n2.trim().toLowerCase().startsWith("<!doctype html") || n2.trim().toLowerCase().startsWith("<html")) throw new
|
|
1503
|
+
if (n2.trim().toLowerCase().startsWith("<!doctype html") || n2.trim().toLowerCase().startsWith("<html")) throw new _a(`Failed to retrieve directory at '${e2}'`);
|
|
1504
1504
|
let a2;
|
|
1505
1505
|
try {
|
|
1506
1506
|
a2 = JSON.parse(n2);
|
|
@@ -1509,11 +1509,11 @@ const Il = async (e2) => {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
const r2 = a2.map(async (t3) => {
|
|
1511
1511
|
try {
|
|
1512
|
-
const o3 =
|
|
1512
|
+
const o3 = Ya.relativePath(e2, t3.path), n3 = await fetch(o3);
|
|
1513
1513
|
if (!n3.ok) throw new Error(`Failed to fetch file at '${t3.path}': ${n3.statusText}`);
|
|
1514
1514
|
const a3 = await n3.text();
|
|
1515
1515
|
let r3 = t3.metadata;
|
|
1516
|
-
r3?.title || (r3 = { title:
|
|
1516
|
+
r3?.title || (r3 = { title: Gl(t3), ...r3 });
|
|
1517
1517
|
return { path: t3.path, content: a3, metadata: r3 };
|
|
1518
1518
|
} catch (e3) {
|
|
1519
1519
|
console.error(e3.message);
|
|
@@ -1521,22 +1521,22 @@ const Il = async (e2) => {
|
|
|
1521
1521
|
return null;
|
|
1522
1522
|
});
|
|
1523
1523
|
return (await Promise.all(r2)).filter((e3) => null !== e3);
|
|
1524
|
-
},
|
|
1524
|
+
}, jl = { fontSize: "0.8rem", marginRight: "4px" }, _l = k((e2) => {
|
|
1525
1525
|
const { disabled: t2, snippet: o2, description: n2, handleInsert: a2, sx: r2, ...l2 } = e2;
|
|
1526
1526
|
let i2;
|
|
1527
|
-
return i2 = "formula" === o2.metadata?.icon ? x(Bo, { sx:
|
|
1527
|
+
return i2 = "formula" === o2.metadata?.icon ? x(Bo, { sx: jl }) : "macro" === o2.metadata?.icon ? x(No, { sx: jl }) : x(Yn, { sx: jl }), x(Ne, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...r2 }, disabled: t2, icon: i2, onMouseDown: (e3) => {
|
|
1528
1528
|
0 === e3.button && e3.preventDefault();
|
|
1529
1529
|
}, onMouseUp: (e3) => {
|
|
1530
1530
|
0 === e3.button && a2(o2);
|
|
1531
1531
|
}, onKeyDown: (e3) => {
|
|
1532
|
-
e3.keyCode !==
|
|
1533
|
-
}, ...l2, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [x(I, { component: "div", children: o2.metadata?.title ?? o2.path }), x(I, { variant: "caption", component: "div", sx: { color: (e3) =>
|
|
1534
|
-
}),
|
|
1535
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 =
|
|
1532
|
+
e3.keyCode !== ia.Enter && e3.keyCode !== ia.Space || a2(o2);
|
|
1533
|
+
}, ...l2, children: b(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [x(I, { component: "div", children: o2.metadata?.title ?? o2.path }), x(I, { variant: "caption", component: "div", sx: { color: (e3) => Oa(e3.palette.text.secondary ?? e3.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o2.metadata?.summary })] }) });
|
|
1534
|
+
}), ql = k(S((e2, t2) => {
|
|
1535
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, scriptPath: l2 = Vl, ...i2 } = e2, [s2, d2] = D([]), [c2, m2] = D(true), p2 = na(o2, ["executeSelectedScript"]), u2 = p2[0]?.context?.();
|
|
1536
1536
|
P(() => {
|
|
1537
1537
|
(async () => {
|
|
1538
1538
|
try {
|
|
1539
|
-
const e3 = await
|
|
1539
|
+
const e3 = await Ul(l2);
|
|
1540
1540
|
d2(e3);
|
|
1541
1541
|
} catch (e3) {
|
|
1542
1542
|
} finally {
|
|
@@ -1546,55 +1546,55 @@ const Il = async (e2) => {
|
|
|
1546
1546
|
}, [l2]);
|
|
1547
1547
|
const g2 = v((e3, t3) => {
|
|
1548
1548
|
if (c2) return x("div", { children: "Loading..." });
|
|
1549
|
-
const a3 = { variant:
|
|
1549
|
+
const a3 = { variant: aa.Menuitem, commandHook: n2, scope: "scripts", disabled: r2 }, l3 = (t4) => {
|
|
1550
1550
|
u2.getEditor()?.insertSnippet(t4.content), e3.closeFloat();
|
|
1551
1551
|
}, i3 = [];
|
|
1552
1552
|
for (let e4 = 0; e4 < s2.length; e4++) {
|
|
1553
1553
|
const t4 = s2[e4];
|
|
1554
|
-
t4 && i3.push(x(
|
|
1554
|
+
t4 && i3.push(x(_l, { handleInsert: l3, snippet: t4 }, t4.path));
|
|
1555
1555
|
}
|
|
1556
1556
|
const d3 = b(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [i3.length > 0 ? b(y, { children: [x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: i3 }), x(ie, { orientation: "horizontal" })] }) : null, F(le, { ...a3, key: "help", command: o2.getCommand("help"), icon: re(x(_t, {})) })] });
|
|
1557
1557
|
return ce({ ...e3, children: d3 });
|
|
1558
1558
|
}, [r2, n2, a2, c2, u2]);
|
|
1559
1559
|
return x(me, { 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: re(x(Fo, {})), ...i2 });
|
|
1560
|
-
})),
|
|
1561
|
-
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 =
|
|
1560
|
+
})), Kl = k(S((e2, t2) => {
|
|
1561
|
+
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = ra((e3) => {
|
|
1562
1562
|
const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
|
|
1563
|
-
return x(y, { children: b("div", { style: { display: "flex", flex: "1 1 100%" }, children: [x("div", { children: x(
|
|
1563
|
+
return x(y, { children: b("div", { style: { display: "flex", flex: "1 1 100%" }, children: [x("div", { children: x(Ol, { parentFloat: n2, style: {}, children: x(le, { ...t3, command: o2.getCommand("saveScripts"), icon: re(x(Eo, {})) }) }) }), x("div", { style: { flex: "1 1 100%" } }), x("div", { children: x(Ol, { parentFloat: n2, style: {}, children: x(ql, { ...t3, commands: o2 }) }) })] }) });
|
|
1564
1564
|
}, [o2]);
|
|
1565
1565
|
return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
|
|
1566
1566
|
}));
|
|
1567
|
-
|
|
1568
|
-
const
|
|
1569
|
-
const { scriptPath: o2 =
|
|
1567
|
+
Kl.displayName = "ScriptEditorToolbar";
|
|
1568
|
+
const Xl = { fontSize: "1rem" }, Zl = k(S((e2, t2) => {
|
|
1569
|
+
const { scriptPath: o2 = Vl, onScriptSelect: n2, sx: a2 = la.EmptyCssProperties, className: r2, buttonMinWidth: l2 = 210, buttonMinHeight: i2 = 80, gap: s2 = 12, ...d2 } = e2, [c2, m2] = D([]), [p2, u2] = D(true), [g2, h2] = D(null);
|
|
1570
1570
|
if (P(() => {
|
|
1571
1571
|
(async () => {
|
|
1572
1572
|
const e3 = [{ path: null, metadata: { title: "Blank Template...", summary: "Start with an empty script." }, content: "" }];
|
|
1573
1573
|
try {
|
|
1574
1574
|
u2(true), h2(null);
|
|
1575
|
-
const t3 = await
|
|
1575
|
+
const t3 = await Ul(o2);
|
|
1576
1576
|
for (let o3 = 0; o3 < t3.length; o3++) {
|
|
1577
1577
|
const n3 = t3[o3];
|
|
1578
1578
|
n3 && e3.push(n3);
|
|
1579
1579
|
}
|
|
1580
1580
|
} catch (e4) {
|
|
1581
|
-
h2(e4 instanceof Error ? e4.message : "Failed to load scripts"), e4 instanceof
|
|
1581
|
+
h2(e4 instanceof Error ? e4.message : "Failed to load scripts"), e4 instanceof _a || console.error("Error loading scripts:", e4);
|
|
1582
1582
|
} finally {
|
|
1583
1583
|
m2(e3), u2(false);
|
|
1584
1584
|
}
|
|
1585
1585
|
})();
|
|
1586
|
-
}, [o2]), p2) return x(A, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className:
|
|
1586
|
+
}, [o2]), p2) return x(A, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: Hn(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, ...a2 }, ...d2, children: x(Z, {}) });
|
|
1587
1587
|
let f2 = null;
|
|
1588
|
-
g2 && (f2 = b(A, { display: "flex", justifyContent: "center", alignItems: "center", className:
|
|
1588
|
+
g2 && (f2 = b(A, { display: "flex", justifyContent: "center", alignItems: "center", className: Hn(r2, "script-select", "error-results"), sx: { background: (e3) => e3.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (e3) => e3.spacing(1), border: (e3) => `1px solid ${e3.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, ...d2, children: [x(I, { color: "error", variant: "h6", component: "div", gutterBottom: true, children: "Error loading Templates" }), x(I, { color: "error", component: "div", children: g2 })] }));
|
|
1589
1589
|
const y2 = (e3) => {
|
|
1590
1590
|
const t3 = e3.metadata?.icon;
|
|
1591
|
-
return "macro" === t3 ? x(No, { sx:
|
|
1591
|
+
return "macro" === t3 ? x(No, { sx: Xl }) : "formula" === t3 ? x(Bo, { sx: Xl }) : "autostart" === t3 ? x(Yn, { sx: Xl }) : null;
|
|
1592
1592
|
};
|
|
1593
|
-
return b(A, { ref: t2, className:
|
|
1593
|
+
return b(A, { ref: t2, className: Hn(r2, "script-select"), sx: { background: (e3) => e3.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, ...a2 }, ...d2, children: [b(A, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [x(I, { variant: "h6", gutterBottom: true, children: "Script Template" }), x(I, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), x(I, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: true, children: "Templates provide a foundation to customize and meet your specific needs." }), x(A, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${l2}px, 1fr))`, gap: `${s2}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: c2.map((e3, t3) => b(z, { variant: "outlined", sx: { minWidth: l2, minHeight: i2, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...0 === t3 && { borderStyle: "dashed", marginBottom: "8px" }, ...1 === t3 && { gridColumn: "1" } }, onClick: () => n2?.(e3), children: [b(A, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [x(I, { variant: "subtitle2", component: "div", children: e3.metadata?.title || e3.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), y2(e3)] }), e3.metadata?.summary && x(I, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: e3.metadata.summary })] }, `${e3.path}-${t3}`)) })] }), f2] });
|
|
1594
1594
|
}));
|
|
1595
|
-
|
|
1596
|
-
const
|
|
1597
|
-
const { className: o2, sx: n2, editorProps: a2, commands: r2, readOnly: l2 = false, onClose: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 =
|
|
1595
|
+
Zl.displayName = "TemplateSelectPanel";
|
|
1596
|
+
const Jl = k(S((e2, t2) => {
|
|
1597
|
+
const { className: o2, sx: n2, editorProps: a2, commands: r2, readOnly: l2 = false, onClose: i2, autoFocusSel: s2, autoFocus: d2 = true, scripts: c2, ...m2 } = e2, p2 = Sa(), [u2, g2] = D(false), h2 = M(false), [f2, y2] = D({ message: "Loading", cursor: "", dirty: false }), [w2, k2] = D(null);
|
|
1598
1598
|
P(() => {
|
|
1599
1599
|
let e3 = false;
|
|
1600
1600
|
return k2(null), (async function() {
|
|
@@ -1608,27 +1608,27 @@ const Xl = k(S((e2, t2) => {
|
|
|
1608
1608
|
}, [c2]);
|
|
1609
1609
|
const S2 = v((e3) => {
|
|
1610
1610
|
y2((t3) => ({ ...t3, ...e3 }));
|
|
1611
|
-
}, []), T2 = M(null), R2 = M(null), [F2, B2] = D(null), N2 = M(null), E2 =
|
|
1611
|
+
}, []), T2 = M(null), R2 = M(null), [F2, B2] = D(null), N2 = M(null), E2 = ra((e3) => {
|
|
1612
1612
|
if (F2) return F2.focus(e3), true;
|
|
1613
1613
|
if (s2) {
|
|
1614
1614
|
const t3 = R2.current?.querySelectorAll?.(s2);
|
|
1615
1615
|
if (t3 && t3.length > 0) return t3[0]?.focus?.(e3), true;
|
|
1616
1616
|
}
|
|
1617
1617
|
return R2.current?.focus?.(e3), false;
|
|
1618
|
-
}, [F2, s2, d2]), H2 = C(() => x(Pe, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), W2 = C(() => x(X, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${
|
|
1618
|
+
}, [F2, s2, d2]), H2 = C(() => x(Pe, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: false }), []), W2 = C(() => x(X, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, marginLeft: (e3) => e3.spacing(0.5), marginRight: (e3) => e3.spacing(0.5), marginTop: (e3) => e3.spacing(1), marginBottom: (e3) => e3.spacing(1) }, children: x(Kl, { commands: r2 }) }), [p2, r2]), z2 = C(() => x(A, { className: Hn("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: b("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [x(I, { 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 }), x(I, { 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" : "" }), x(I, { 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]), $2 = C(() => b(A, { className: Hn("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [W2, x(A, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: x(Na, { ref: R2, loadingPanel: H2, readOnly: l2, onClose: i2, autoFocus: d2, commands: r2, onStatusChange: S2, darkMode: "dark" === p2.palette.mode, ...a2 }) }), z2] }), [p2, r2, W2, z2, u2, H2, l2, a2, d2, s2, i2, S2]), O2 = C(() => x(J, { className: Hn({ "Mui-selected": h2.current }), sx: { display: "flex", color: (e3) => e3.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (e3) => `${e3.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (e3) => e3.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (e3) => Ca(e3.palette.action.hover, 0.03), borderBottom: (e3) => `solid ${Ca(e3.palette.divider, 0.2)} 1px` }, onPointerDown: (e3) => {
|
|
1619
1619
|
e3.isDefaultPrevented() || (e3.preventDefault(), E2());
|
|
1620
1620
|
}, children: b(A, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (e3) => e3.spacing(0.25), marginBottom: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, children: [x(A, { sx: { flex: "1 1 100%", paddingLeft: (e3) => e3.spacing(1) }, children: "Script (Typescript)" }), x(Le, { label: "Close", children: x(L, { "aria-label": "close", sx: { color: (e3) => e3.palette.text.icon ?? e3.palette.action.active }, touchRippleRef: T2, onPointerDown: (e3) => {
|
|
1621
1621
|
T2.current?.start(e3, { center: false }), e3.stopPropagation(), e3.preventDefault();
|
|
1622
1622
|
}, onPointerUp: () => {
|
|
1623
1623
|
R2.current?.close();
|
|
1624
|
-
}, children: x(
|
|
1624
|
+
}, children: x(Qn, {}) }) })] }) }), [p2, u2]), V2 = C(() => {
|
|
1625
1625
|
let e3;
|
|
1626
|
-
return null === w2 ? null : (null === w2.source && (e3 = x(
|
|
1626
|
+
return null === w2 ? null : (null === w2.source && (e3 = x(Zl, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (e4) => {
|
|
1627
1627
|
R2.current?.getEditor().insertSnippet(e4.content), k2({ source: e4.content ?? "" });
|
|
1628
|
-
} })), b(A, { tabIndex: 0, className:
|
|
1628
|
+
} })), b(A, { tabIndex: 0, className: Hn("script-workspace", o2), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none", backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, onPointerDown: (e4) => {
|
|
1629
1629
|
e4.isDefaultPrevented() || R2.current?.focus();
|
|
1630
1630
|
}, children: [O2, b(A, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [$2, e3] })] }));
|
|
1631
|
-
}, [W2, $2, o2, w2]), G2 =
|
|
1631
|
+
}, [W2, $2, o2, w2]), G2 = pa(t2, () => ({ isScriptWorkspaceElement: () => true, focus: (e3) => {
|
|
1632
1632
|
E2(e3);
|
|
1633
1633
|
} }), []);
|
|
1634
1634
|
return x(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...n2 }, ref: G2, ...m2, onFocus: (e3) => {
|
|
@@ -1637,9 +1637,9 @@ const Xl = k(S((e2, t2) => {
|
|
|
1637
1637
|
G2?.current?.contains(e3.relatedTarget) || G2?.current === e3.relatedTarget || (N2.current = null, h2.current = false, g2(false)), m2?.onBlur?.(e3);
|
|
1638
1638
|
}, children: V2 });
|
|
1639
1639
|
}));
|
|
1640
|
-
|
|
1641
|
-
const
|
|
1642
|
-
const { commands: o2, ...n2 } = e2, a2 =
|
|
1640
|
+
Jl.displayName = "ScriptWorkspace";
|
|
1641
|
+
const Yl = k(S((e2, t2) => {
|
|
1642
|
+
const { commands: o2, ...n2 } = e2, a2 = na(o2, ["executeScript", "showScriptEditor"]), [r2, l2] = D([]), [i2, s2] = D(false), d2 = a2[0]?.context?.();
|
|
1643
1643
|
P(() => {
|
|
1644
1644
|
const e3 = d2?.getScripts();
|
|
1645
1645
|
if (!e3) return;
|
|
@@ -1649,7 +1649,7 @@ const Zl = k(S((e2, t2) => {
|
|
|
1649
1649
|
l2(t3), s2(false);
|
|
1650
1650
|
})();
|
|
1651
1651
|
}, []);
|
|
1652
|
-
const c2 = { variant:
|
|
1652
|
+
const c2 = { variant: aa.Menuitem, parentFloat: e2.floatReference, scope: "scripts", shortcut: null }, m2 = [], p2 = r2.length;
|
|
1653
1653
|
for (let e3 = 0; e3 < p2; e3++) {
|
|
1654
1654
|
const t3 = r2[e3];
|
|
1655
1655
|
m2.push(x(le, { ...c2, command: o2.getCommand("executeScript"), commandState: { declaration: t3 }, tooltipProps: { description: `Execute ${t3.getName() ?? "macro"}` }, icon: re(x(No, {})), label: t3.getName() ?? `Script '${t3.getName()}'` }, `macro-${t3.getName()}-${e3}`));
|
|
@@ -1657,15 +1657,15 @@ const Zl = k(S((e2, t2) => {
|
|
|
1657
1657
|
const u2 = b(A, { ref: t2, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [m2.length > 0 ? b(y, { children: [x(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: m2 }), x(ie, { orientation: "horizontal" })] }) : null, F(le, { ...c2, key: "show-editor", command: o2.getCommand("showScriptEditor"), icon: re(x(Io, {})) })] });
|
|
1658
1658
|
return ce({ ...n2, children: u2 });
|
|
1659
1659
|
}));
|
|
1660
|
-
|
|
1661
|
-
const
|
|
1662
|
-
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = "showScriptEditor", s2 =
|
|
1663
|
-
const o3 = x(
|
|
1660
|
+
Yl.displayName = "RunScriptPopupPanel";
|
|
1661
|
+
const Ql = k(S((e2, t2) => {
|
|
1662
|
+
const { commands: o2, commandHook: n2, scope: a2, disabled: r2 = false, ...l2 } = e2, i2 = "showScriptEditor", s2 = na(o2, ["executeScript", "showScriptEditor"])[0].context(), d2 = v((e3, t3) => {
|
|
1663
|
+
const o3 = x(Yl, { ...e3, commands: t3 });
|
|
1664
1664
|
return ce({ ...e3, children: o3 });
|
|
1665
1665
|
}, [r2, s2, n2, a2]);
|
|
1666
1666
|
return x(me, { ref: t2, commands: o2, commandHook: n2, createPopupPanel: d2, selected: o2.getCommand(i2).state(), label: "Macros", tooltip: "Run or manage macros.", quickCommand: i2, icon: re(x(Lo, {})), ...l2 });
|
|
1667
|
-
})),
|
|
1668
|
-
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, [l2, i2] = D(false), s2 =
|
|
1667
|
+
})), ei = k(S((e2, t2) => {
|
|
1668
|
+
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, [l2, i2] = D(false), s2 = na(o2, ["executeScript", "showScriptEditor"]), d2 = s2[0]?.context?.();
|
|
1669
1669
|
P(() => {
|
|
1670
1670
|
const e3 = d2?.getScripts();
|
|
1671
1671
|
if (!e3) return;
|
|
@@ -1689,45 +1689,45 @@ const Jl = k(S((e2, t2) => {
|
|
|
1689
1689
|
};
|
|
1690
1690
|
}, [d2]);
|
|
1691
1691
|
const c2 = v((e3) => {
|
|
1692
|
-
const { commandButtonProps: t3, commandPopupProps: a3 } = e3, r3 = x(
|
|
1692
|
+
const { commandButtonProps: t3, commandPopupProps: a3 } = e3, r3 = x(Hr, { ...a3, command: o2.getCommand("formatFontColor"), icon: x(Ho, {}), isSplit: true, panelProps: { disableAlpha: true } }), i3 = x(Hr, { ...a3, command: o2.getCommand("formatFillColor"), icon: x(Wo, {}), isSplit: true, panelProps: { disableAlpha: true, autoColorLabel: "No Fill", autoColorPosition: sr.End } }), s3 = o2.getCommand("undo") ? x(y, { children: x(Or, { ...a3, quickCommand: "undo" }) }) : null, d3 = o2.getCommand("find") ? x(y, { children: x(Mr, { ...a3 }) }) : null;
|
|
1693
1693
|
let c3 = null;
|
|
1694
|
-
l2 && (c3 = b(y, { children: [x(ie, {}), x(
|
|
1695
|
-
return b(
|
|
1694
|
+
l2 && (c3 = b(y, { children: [x(ie, {}), x(Ql, { ...a3 })] }));
|
|
1695
|
+
return b(Ol, { parentFloat: n2, children: [s3, null, s3 ? x(ie, {}) : null, x(qr, { ...a3, command: o2.getCommand("paste") }), x(le, { ...t3, command: o2.getCommand("formatPainterToggle"), icon: re(x(zo, {})) }), x(hl, { ...t3, command: o2.getCommand("copy") }), x(ie, {}), x(Ur, { ...a3, command: o2.getCommand("formatFontFamily") }), x(Fr, { ...a3, command: o2.getCommand("formatFontSize") }), x(le, { ...t3, command: o2.getCommand("formatBoldToggle"), icon: x($o, {}) }), x(le, { ...t3, command: o2.getCommand("formatItalicToggle"), icon: x(Oo, {}) }), x(_r, { ...a3 }), x(jr, { ...a3 }), r3, x(ie, {}), i3, x(Dr, { ...a3 }), x(Pr, { ...a3 }), x(ie, {}), x(nr, { ...a3 }), x(ar, { ...a3 }), x(rr, { ...a3 }), x(lr, { ...a3 }), x(ie, {}), x(Nr, { ...a3 }), x(Yr, { command: o2.getCommand("formatCellStyle"), ...a3 }), x(ll, { command: o2.getCommand("formatTableStyle"), ...a3 }), x(ie, {}), x(Ir, { ...a3 }), x(Lr, { ...a3 }), x(ie, {}), x(Ar, { ...a3 }), null, x(Er, { ...a3 }), x(zr, { ...a3 }), d3, c3] });
|
|
1696
1696
|
}, [o2, s2, l2]);
|
|
1697
1697
|
return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: c2, ...r2 });
|
|
1698
1698
|
}));
|
|
1699
|
-
|
|
1700
|
-
const
|
|
1701
|
-
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 =
|
|
1699
|
+
ei.displayName = "HomeToolbar";
|
|
1700
|
+
const ti = k(S((e2, t2) => {
|
|
1701
|
+
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = ra((e3) => {
|
|
1702
1702
|
const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
|
|
1703
|
-
return b(
|
|
1703
|
+
return b(Ol, { parentFloat: n2, children: [null, x(le, { ...t3, command: o2.getCommand("updateHyperlink"), icon: re(x(Vo, {})) }), x(le, { ...t3, command: o2.getCommand("updateComments"), icon: re(x(Go, {})) }), x(gl, { ...a3 }), x(le, { ...t3, command: o2.getCommand("insertTable"), icon: re(x(So, {})) })] });
|
|
1704
1704
|
}, [o2]);
|
|
1705
1705
|
return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
|
|
1706
1706
|
}));
|
|
1707
|
-
|
|
1708
|
-
const
|
|
1709
|
-
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 =
|
|
1707
|
+
ti.displayName = "InsertToolbar";
|
|
1708
|
+
const oi = k(S((e2, t2) => {
|
|
1709
|
+
const { commands: o2, parentFloat: n2, commandButtonProps: a2, ...r2 } = e2, l2 = ra((e3) => {
|
|
1710
1710
|
const { commandButtonProps: t3, commandPopupProps: a3 } = e3;
|
|
1711
|
-
return b(
|
|
1711
|
+
return b(Ol, { parentFloat: n2, children: [x(Rr, { ...a3 }), x(le, { ...t3, command: o2.getCommand("protectionSheetToggle"), icon: x(Zn, { color: "secondary" }) }), x(ie, {}), x(Wr, { ...a3 }), x(Kr, { ...a3 }), x(ie, {}), x(le, { ...t3, command: o2.getCommand("sheetViewToggleFormulaView"), scope: "view", icon: re(x(Uo, {})) }), x(le, { ...t3, command: o2.getCommand("sheetViewToggleShowZeros"), scope: "view", icon: re(x(jo, {})) }), x(ie, {}), x(Xr, { ...a3 }), x(ml, { command: o2.getCommand("selectTheme"), ...a3 }), x(ie, {}), x(Ql, { ...a3, scope: "view" }), x(ie, {}), x(le, { ...t3, command: o2.getCommand("fullScreenToggle"), scope: "view", icon: () => re(o2.getCommand("fullScreenToggle").state() ? x(_o, {}) : x(qo, {})) })] });
|
|
1712
1712
|
}, [o2]);
|
|
1713
1713
|
return x(Ao, { ref: t2, commands: o2, parentFloat: n2, commandButtonProps: a2, createToolbarPalette: l2, ...r2 });
|
|
1714
1714
|
}));
|
|
1715
|
-
|
|
1716
|
-
const
|
|
1715
|
+
oi.displayName = "ViewToolbar";
|
|
1716
|
+
const ni = (e2) => x(ii, { ...e2 }), ai = k((e2) => {
|
|
1717
1717
|
const { sx: t2, ...o2 } = e2;
|
|
1718
|
-
return b(A, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${
|
|
1718
|
+
return b(A, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (e3) => `${Ca(e3.palette.primary.main, 0.35)} solid 2px` } }, children: [x(ee, { disableRipple: true, onMouseDown: (e3) => {
|
|
1719
1719
|
0 === e3.button && e3.preventDefault();
|
|
1720
1720
|
}, 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 }), x(A, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
|
|
1721
|
-
}),
|
|
1721
|
+
}), ri = k((e2) => {
|
|
1722
1722
|
const { toolbars: t2, value: o2, onToolbarChange: n2, sx: a2, ...r2 } = e2, l2 = C(() => {
|
|
1723
1723
|
const e3 = [];
|
|
1724
|
-
for (let o3 = 0; o3 < t2.length; o3++) e3.push(x(
|
|
1724
|
+
for (let o3 = 0; o3 < t2.length; o3++) e3.push(x(ai, { label: t2[o3].label }, t2[o3].label));
|
|
1725
1725
|
return e3;
|
|
1726
1726
|
}, [t2]);
|
|
1727
1727
|
return x(Q, { value: o2, onChange: (e3, t3) => {
|
|
1728
1728
|
n2?.(t3);
|
|
1729
1729
|
}, 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 }, TabIndicatorProps: { children: x("span", { className: "MuiTabs-indicatorSpan" }) }, ...r2, children: l2 });
|
|
1730
|
-
}),
|
|
1730
|
+
}), li = k((e2) => {
|
|
1731
1731
|
const { toolbars: t2, value: o2, onToolbarChange: n2, selectProps: a2, ...r2 } = e2, l2 = v((e3) => {
|
|
1732
1732
|
n2?.(e3.target.value);
|
|
1733
1733
|
}, [n2]), i2 = C(() => {
|
|
@@ -1740,30 +1740,30 @@ const ti = (e2) => x(ri, { ...e2 }), oi = k((e2) => {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
return e3;
|
|
1742
1742
|
}, [t2, o2]);
|
|
1743
|
-
return x(j, { 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: x(Y, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${
|
|
1744
|
-
}),
|
|
1743
|
+
return x(j, { 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: x(Y, { value: o2, onChange: l2, variant: "outlined", sx: { backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` }, ...r2, children: i2 }) });
|
|
1744
|
+
}), ii = k(S((e2, t2) => {
|
|
1745
1745
|
const { commands: o2, selectWrapper: n2, selectProps: a2 = {}, renderCompact: r2 = false, paletteWrapper: l2, toolbarsProps: i2, paletteProps: s2 = {}, workbook: d2, sx: c2, ...m2 } = e2, p2 = C(() => {
|
|
1746
1746
|
const e3 = [], { ref: t3, ...n3 } = i2?.Home || {};
|
|
1747
|
-
e3.push({ label: "Home", component: x(
|
|
1747
|
+
e3.push({ label: "Home", component: x(ei, { commands: o2, ...n3 }) });
|
|
1748
1748
|
const { ref: a3, ...r3 } = i2?.Insert || {};
|
|
1749
|
-
e3.push({ label: "Insert", component: x(
|
|
1749
|
+
e3.push({ label: "Insert", component: x(ti, { commands: o2, ...r3 }) });
|
|
1750
1750
|
const { ref: l3, ...s3 } = i2?.View || {};
|
|
1751
|
-
return e3.push({ label: "View", component: x(
|
|
1751
|
+
return e3.push({ label: "View", component: x(oi, { commands: o2, ...s3 }) }), e3;
|
|
1752
1752
|
}, [o2, d2]), u2 = C(() => {
|
|
1753
1753
|
const e3 = [];
|
|
1754
1754
|
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 }));
|
|
1755
1755
|
return e3;
|
|
1756
1756
|
}, [p2]), [g2, h2] = D(0), f2 = (e3) => {
|
|
1757
1757
|
h2(e3);
|
|
1758
|
-
}, y2 = C(() => x(r2 ?
|
|
1758
|
+
}, y2 = C(() => x(r2 ? li : ri, { toolbars: p2, value: g2, onToolbarChange: f2, sx: a2 }), [p2, g2, a2, r2]), { sx: k2, ...S2 } = s2, v2 = x(X, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, borderRadius: "8px", backgroundImage: `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})`, marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1), marginTop: (e3) => e3.spacing(0.5), marginBottom: (e3) => e3.spacing(0.5), ...k2 }, ...S2, children: u2[g2] });
|
|
1759
1759
|
return b(A, { ref: t2, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (e3) => e3.spacing(0.5), "*": { userSelect: "none" }, ...c2 }, ...m2, children: [n2 ? n2(y2) : y2, l2 ? l2(v2) : v2] });
|
|
1760
1760
|
}));
|
|
1761
|
-
|
|
1762
|
-
const
|
|
1763
|
-
const { workbook: t2, workbookElement: o2, notifier: n2, target: a2, commands: r2, darkMode: l2, onShowSidebar: i2, onNewWorkbook: s2 =
|
|
1761
|
+
ii.displayName = "WorkbookToolbars";
|
|
1762
|
+
const si = (e2) => {
|
|
1763
|
+
const { workbook: t2, workbookElement: o2, notifier: n2, target: a2, commands: r2, darkMode: l2, onShowSidebar: i2, onNewWorkbook: s2 = di } = e2, [d2, c2] = D(t2?.getSelectedSheet()), [m2, p2] = D(t2?.getSheets().getItems()), g2 = ra(i2, [i2]), h2 = ra(s2, [s2]), f2 = C(() => [new ha("workbookStatistics", a2, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [xa.Ctrl, xa.Shift] } }), new ha("showFormat", a2, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [xa.Ctrl, xa.Shift] } }), new fa("newCellStyle", a2, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later." }), new fa("deleteCellStyle", a2, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new fa("modifyCellStyle", a2, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new ha("find", a2, { label: "Find", description: "Open the Find window.", shortcut: [{ key: "F", modifiers: [xa.Ctrl] }, { key: "F5", modifiers: [xa.Shift] }] }), new ha("findReplace", a2, { label: "Find & Replace", description: "Open the Find & Replace window.", shortcut: [{ key: "H", modifiers: [xa.Ctrl] }, { key: "H", modifiers: [xa.Ctrl, xa.Alt] }] }), new ha("goto", a2, { label: "Go To", description: "Open the 'Go To' window.", shortcut: [{ key: "G", modifiers: [xa.Ctrl] }] }), new ha("workbookViewToggleExpandFormulaBar", a2, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [xa.Ctrl, xa.Shift] } }), new ha("workbookViewToggleShowFormulaBar", a2, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new ha("workbookViewToggleShowTabs", a2, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new ha("workbookViewToggleShowStatusBar", a2, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new ha("workbookViewToggleShowHorizontalScrollBar", a2, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new ha("workbookViewToggleShowVerticalScrollBar", a2, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new fa("hideSheet", a2, { label: "Hide Sheet", scopedLabels: { sheet: "Hide" }, description: "Hide the sheet from appearing in the tabs. This keeps the data but de-clutters the tabs." }), new fa("deleteSheet", a2, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new fa("addSheet", a2, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [xa.Shift] }, { key: "F1", modifiers: [xa.Alt, xa.Shift] }] }), new fa("duplicateSheet", a2, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new fa("nextSheet", a2, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [xa.Ctrl] }] }), new fa("previousSheet", a2, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [xa.Ctrl] }] }), new fa("selectNextSheet", a2, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [xa.Ctrl, xa.Shift] }] }), new fa("selectPreviousSheet", a2, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [xa.Ctrl, xa.Shift] }] }), new fa("selectTheme", a2, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new fa("selectNamed", a2, { label: (e3) => e3?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (e3) => e3?.getName() ?? "Select" }, description: "Select the item." }), new fa("addNamedReference", a2, { label: "Define Named Reference", scopedLabels: { namedItem: "Define Name…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new fa("editNamedReference", a2, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new fa("deleteNamedReference", a2, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference." }), new ha("activeNameBox", a2, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [xa.Alt] } }), new ha("createNamedReferenceFromSelection", a2, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [xa.Ctrl, xa.Shift] } }), new ha("activeNameManager", a2, { 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: [xa.Ctrl] } }), new fa("fullScreenToggle", a2, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" } }), new fa("showScriptEditor", a2, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", shortcut: [{ key: "F11", modifiers: [xa.Alt] }] }), new fa("executeScript", a2, { label: "Run Script", description: "Run the selected or last executed script.", shortcut: { key: "F8" } }), new fa("executeSelectedScript", a2, { label: "Run Script", description: "Run the selected script.", shortcut: { key: "F8" } }), new fa("saveScripts", a2, { label: "Save Script", description: "Save the current scripts." }), new fa("maximumWorkbookToggle", a2, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [xa.Ctrl] } }), new fa("spellCheck", a2, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new fa("calculateAll", a2, { label: "Calculate Now", description: "Recalculate all formulas.", shortcut: { key: "F9" } }), new ha("closeWorkbook", a2, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [xa.Ctrl] } }), new ha("newWorkbook", a2, { label: "New Workbook", description: "Create a new workbook in another tab." })], []), x2 = C(() => {
|
|
1764
1764
|
let e3 = null;
|
|
1765
|
-
return e3 = r2 ? r2.createChildGroup(a2, "workbook", false) : new
|
|
1766
|
-
}, [r2, f2]), b2 =
|
|
1765
|
+
return e3 = r2 ? r2.createChildGroup(a2, "workbook", false) : new ba(a2, "workbook"), e3.addCommands(f2, true), e3;
|
|
1766
|
+
}, [r2, f2]), b2 = da(), y2 = w.useRef(null), k2 = ra(() => {
|
|
1767
1767
|
let e3, o3 = null;
|
|
1768
1768
|
const a3 = x2.getCommand("executeScript");
|
|
1769
1769
|
if (a3.update({ disabled: false, context: { getScripts: () => t2.getScripts() } }), !a3) return;
|
|
@@ -1806,7 +1806,7 @@ const li = (e2) => {
|
|
|
1806
1806
|
}, getScripts: () => t2.getScripts() };
|
|
1807
1807
|
l3.update({ context: i3 });
|
|
1808
1808
|
}, [x2, t2, o2, n2]), S2 = w.useRef(null);
|
|
1809
|
-
|
|
1809
|
+
Ma(t2, { onBeforeSave: async () => {
|
|
1810
1810
|
await S2.current?.onBeforeSave();
|
|
1811
1811
|
}, onProtectionChange: () => {
|
|
1812
1812
|
S2.current?.onReadonlyChange();
|
|
@@ -1814,7 +1814,7 @@ const li = (e2) => {
|
|
|
1814
1814
|
(async () => {
|
|
1815
1815
|
await t2.getCalculation().start(), t2.getScripts().start(), S2.current?.onScriptChange();
|
|
1816
1816
|
})();
|
|
1817
|
-
} }),
|
|
1817
|
+
} }), Ma(t2, { onSheetsChange: (e3) => {
|
|
1818
1818
|
p2(e3.getSheets().getItems());
|
|
1819
1819
|
}, onViewChange(e3) {
|
|
1820
1820
|
c2(e3?.getSelectedSheet());
|
|
@@ -1824,11 +1824,11 @@ const li = (e2) => {
|
|
|
1824
1824
|
}, onScriptsChange: (e3) => {
|
|
1825
1825
|
k2();
|
|
1826
1826
|
} });
|
|
1827
|
-
const { isFullscreenAvailable: v2, isFullscreenEnabled: T2, toggleFullscreen: R2 } =
|
|
1827
|
+
const { isFullscreenAvailable: v2, isFullscreenEnabled: T2, toggleFullscreen: R2 } = Ja({ target: { current: o2 ?? document.body } }), M2 = Ea();
|
|
1828
1828
|
P(() => {
|
|
1829
1829
|
x2.getCommand("selectTheme").update({ state: () => t2.getTheme(), context: () => ({ theme: t2.getTheme(), themes: M2, darkMode: l2 }) });
|
|
1830
1830
|
}, [t2?.getTheme(), l2]);
|
|
1831
|
-
const F2 =
|
|
1831
|
+
const F2 = ra(async function(e3, o3) {
|
|
1832
1832
|
let a3 = null;
|
|
1833
1833
|
const r3 = t2.getScripts();
|
|
1834
1834
|
if (e3?.declaration || e3?.functionName) {
|
|
@@ -1901,7 +1901,7 @@ const li = (e2) => {
|
|
|
1901
1901
|
h2?.();
|
|
1902
1902
|
}), x2.getCommand("executeScript").updateCallback(F2), x2.getCommand("executeSelectedScript").updateCallback(F2);
|
|
1903
1903
|
}, [t2, n2]);
|
|
1904
|
-
const B2 =
|
|
1904
|
+
const B2 = ra(async (e3) => {
|
|
1905
1905
|
let o3 = 0, a3 = null, r3 = "Find & Replace";
|
|
1906
1906
|
e3?.replace && !e3?.replaceOptions?.maxCount && (r3 = "Replace All");
|
|
1907
1907
|
const l3 = await n2?.showBusy?.(r3);
|
|
@@ -1921,7 +1921,7 @@ const li = (e2) => {
|
|
|
1921
1921
|
l3?.(), n2?.showError?.(e4);
|
|
1922
1922
|
}
|
|
1923
1923
|
return o3;
|
|
1924
|
-
}, [t2, o2]), N2 =
|
|
1924
|
+
}, [t2, o2]), N2 = ra((e3) => {
|
|
1925
1925
|
const o3 = { value: e3, context: { selection: () => {
|
|
1926
1926
|
const e4 = t2.getSelectedRanges(), o4 = [];
|
|
1927
1927
|
for (let t3 = 0; t3 < e4.getCount(); t3++) {
|
|
@@ -1933,7 +1933,7 @@ const li = (e2) => {
|
|
|
1933
1933
|
try {
|
|
1934
1934
|
await e4.select();
|
|
1935
1935
|
} catch (e5) {
|
|
1936
|
-
n2?.showMessage?.(e5.message, { type:
|
|
1936
|
+
n2?.showMessage?.(e5.message, { type: ma.Error });
|
|
1937
1937
|
}
|
|
1938
1938
|
} };
|
|
1939
1939
|
return n2.showWindow?.("namedDetails", o3);
|
|
@@ -1954,7 +1954,7 @@ const li = (e2) => {
|
|
|
1954
1954
|
try {
|
|
1955
1955
|
await t2.getRanges(e5).select();
|
|
1956
1956
|
} catch (e6) {
|
|
1957
|
-
n2?.showMessage?.(e6.message, { type:
|
|
1957
|
+
n2?.showMessage?.(e6.message, { type: ma.Error });
|
|
1958
1958
|
}
|
|
1959
1959
|
}, onKeyDown: (e5) => {
|
|
1960
1960
|
x2.findCommandByEvent(e5) === x2.getCommand("goto") && e5.preventDefault();
|
|
@@ -1975,7 +1975,7 @@ const li = (e2) => {
|
|
|
1975
1975
|
}), x2.getCommand("activeNameBox")?.updateCallback(async function() {
|
|
1976
1976
|
o2?.getFormulaBarElement()?.getNamedCollectionEditorElement()?.focus();
|
|
1977
1977
|
});
|
|
1978
|
-
}, [o2, t2, n2]),
|
|
1978
|
+
}, [o2, t2, n2]), Ma(t2?.getView(), { onViewChange: (e3) => {
|
|
1979
1979
|
x2.getCommand("workbookViewToggleShowFormulaBar").update({ state: e3.isShowFormulaBar() }).updateCallback(() => {
|
|
1980
1980
|
e3.setShowFormulaBar(!e3.isShowFormulaBar());
|
|
1981
1981
|
}), x2.getCommand("workbookViewToggleShowTabs").update({ state: e3.isShowTabs() }).updateCallback(() => {
|
|
@@ -1995,11 +1995,11 @@ const li = (e2) => {
|
|
|
1995
1995
|
const e3 = t2.getProtection().isStructureAllowed();
|
|
1996
1996
|
x2.getCommand("hideSheet").update({ disabled: m2.length <= 1 || !e3 }), x2.getCommand("deleteSheet").update({ disabled: m2.length <= 1 || !e3 });
|
|
1997
1997
|
}, [m2, d2]), x2;
|
|
1998
|
-
},
|
|
1998
|
+
}, di = () => {
|
|
1999
1999
|
window.open(window.origin.toString(), "sheetxl-" + n.uuidV4(), "popup=true");
|
|
2000
|
-
},
|
|
2001
|
-
const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 =
|
|
2002
|
-
|
|
2000
|
+
}, ci = "_sheetxl-theme_4opcr_2", mi = "_sheetxl-workbook_1j3lu_5", pi = (e2) => x(Nl, { ...e2 }), ui = (e2) => x(El, { ...e2 }), gi = (e2) => x(Bl, { ...e2 }), hi = k(S((e2, t2) => {
|
|
2001
|
+
const { workbook: o2, commands: n2, onBeforeUserChange: a2, onUserChange: r2, disabled: l2 = false, readOnly: i2 = false, contextMenuProps: s2, renderContextMenu: d2 = pi, sheetsAllProps: c2, renderSheetsAll: m2 = ui, sheetTabProps: p2, renderSheetTab: u2, background: g2 = "transparent", className: h2, notifier: f2, sx: y2, borderWidth: w2, borderColor: k2, gridTheme: S2, gridStyle: T2, ...R2 } = e2, [F2, B2] = D(o2?.getSelectedSheetIndex()), [N2, E2] = D(o2?.getSheets().getItems()), [I2, H2] = D(o2?.getProtection());
|
|
2002
|
+
Ma(o2, { onViewChange(e3) {
|
|
2003
2003
|
B2(e3?.getSelectedSheetIndex());
|
|
2004
2004
|
}, onSheetsChange: (e3) => {
|
|
2005
2005
|
E2(e3.getSheets().getItems());
|
|
@@ -2016,7 +2016,7 @@ const li = (e2) => {
|
|
|
2016
2016
|
o2.getSheetAt(e3).setName(t3), r2?.(e3);
|
|
2017
2017
|
}, [o2, r2]), V2 = v((e3, t3) => {
|
|
2018
2018
|
o2.getSheetAt(e3).setPosition(t3), r2?.(t3);
|
|
2019
|
-
}, [o2, r2]), G2 =
|
|
2019
|
+
}, [o2, r2]), G2 = ra(() => {
|
|
2020
2020
|
if (false === a2?.(F2)) return;
|
|
2021
2021
|
const e3 = F2 + 1;
|
|
2022
2022
|
o2.getSheets().add({ name: void 0, autoSelect: true }), r2?.(e3);
|
|
@@ -2032,22 +2032,22 @@ const li = (e2) => {
|
|
|
2032
2032
|
}, [Y2]);
|
|
2033
2033
|
const ne2 = v((e3, t3) => {
|
|
2034
2034
|
e3.preventDefault(), Q2({ left: e3.clientX - 2, top: e3.clientY - 4, index: t3 });
|
|
2035
|
-
}, []), ae2 =
|
|
2035
|
+
}, []), ae2 = ra((e3) => {
|
|
2036
2036
|
let t3;
|
|
2037
2037
|
try {
|
|
2038
2038
|
t3 = o2?.getSheetAt(e3.index);
|
|
2039
2039
|
} catch (e4) {
|
|
2040
2040
|
}
|
|
2041
2041
|
if (!t3) return null;
|
|
2042
|
-
return (u2 ??
|
|
2042
|
+
return (u2 ?? gi)({ sheet: t3, gridTheme: S2, onContextMenu: (t4) => {
|
|
2043
2043
|
$2(e3.index), ne2(t4, e3.index);
|
|
2044
2044
|
}, ...e3, ...p2 });
|
|
2045
2045
|
}, [u2, p2, o2, S2]), re2 = C(() => W2 ? null : x(De, { disableInteractive: true, title: "New sheet", children: x(L, { 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) => {
|
|
2046
2046
|
0 === e3.button && e3.preventDefault();
|
|
2047
|
-
}, onClick: () => G2(), children: x(
|
|
2048
|
-
return b(A, { ref: t2, className:
|
|
2047
|
+
}, onClick: () => G2(), children: x(ea, {}) }) }), [l2, W2, G2]);
|
|
2048
|
+
return b(A, { ref: t2, className: Hn(h2), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...y2 }, ...R2, children: [x(Aa, { ref: J2, selectedTabIndex: F2, tabNames: z2, onSelectedTabIndexChange: $2, onTabNameChange: O2, onTabMove: V2, background: g2, borderColor: k2, borderWidth: w2, activeColor: null, disabled: l2, disableDrag: W2, createScrollStartButton: Zo, createScrollEndButton: Xo, createScrollEdgeButton: Ko, createTabButton: ae2, createTabDivider: (e3) => {
|
|
2049
2049
|
const { key: t3, ...o3 } = e3;
|
|
2050
|
-
return x(ie, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) =>
|
|
2050
|
+
return x(ie, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (e4) => Ca(e4.palette.divider, 0.25) }, ...o3 }, t3);
|
|
2051
2051
|
}, editLabelProps: { readOnly: W2, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (e3) => {
|
|
2052
2052
|
o2.isValidSheetNameCharacter(e3.key) || e3.preventDefault();
|
|
2053
2053
|
}, onCancel: () => {
|
|
@@ -2056,26 +2056,26 @@ const li = (e2) => {
|
|
|
2056
2056
|
0 === e3.button && e3.preventDefault();
|
|
2057
2057
|
}, onClick: () => {
|
|
2058
2058
|
_2 ? X2.close(0) : X2.open(0);
|
|
2059
|
-
}, icon: x(
|
|
2059
|
+
}, icon: x(ta, {}) }) }) }), x("div", { style: { borderTop: `solid ${k2} ${w2}px`, minWidth: "4px" } }), x("div", { style: { borderTop: `solid ${k2} ${w2}px`, flex: "none", display: "flex", alignItems: "center" }, children: re2 }), x("div", { style: { borderTop: `solid ${k2} ${w2}px`, flex: 1, minWidth: "24px" } }), oe2, Z2] });
|
|
2060
2060
|
}));
|
|
2061
|
-
|
|
2062
|
-
const
|
|
2061
|
+
hi.displayName = "WorkbookStrip";
|
|
2062
|
+
const fi = k(S((e2, t2) => {
|
|
2063
2063
|
const { workbook: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, className: i2, ...s2 } = e2, [d2, c2] = B((e3) => e3 + 1, 0), [m2, p2] = D(o2.getSelectedSheet()), [u2, g2] = D(m2.getSelectedRanges()), [h2, f2] = D(m2.getSelectedCell());
|
|
2064
|
-
|
|
2064
|
+
Ma(o2, { onSheetsChange() {
|
|
2065
2065
|
p2(o2.getSelectedSheet());
|
|
2066
|
-
} }),
|
|
2066
|
+
} }), Ma(m2.getSelection(), { onChange() {
|
|
2067
2067
|
g2(m2.getSelectedRanges()), f2(m2.getSelectedCell());
|
|
2068
|
-
} }),
|
|
2068
|
+
} }), na(n2, [], { onChange: () => {
|
|
2069
2069
|
c2();
|
|
2070
2070
|
} });
|
|
2071
2071
|
const w2 = C(() => ({}), []), k2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
|
|
2072
2072
|
}, onError() {
|
|
2073
2073
|
console.log("onError");
|
|
2074
|
-
} }, disabled: a2, scope: "contextMenu", parentFloat: l2 }), [a2, l2]), S2 = C(() => ({ ...w2, ...k2, variant:
|
|
2074
|
+
} }, disabled: a2, scope: "contextMenu", parentFloat: l2 }), [a2, l2]), S2 = C(() => ({ ...w2, ...k2, variant: aa.Menuitem }), [w2, k2]), v2 = C(() => ({ commands: n2, variant: aa.Menuitem, parentFloat: l2, ...k2 }), [n2, k2, l2]), T2 = [];
|
|
2075
2075
|
let P2 = u2.isEntireRows(), R2 = u2.isEntireColumns();
|
|
2076
|
-
u2 && (P2 && (T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), T2.push(F(le, { command: n2.getCommand("hideColumns"), ...S2, icon: re(x(
|
|
2076
|
+
u2 && (P2 && (T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), T2.push(F(le, { command: n2.getCommand("hideColumns"), ...S2, icon: re(x(Jo, {})), key: "context:" + T2.length })), T2.push(F(le, { command: n2.getCommand("unhideColumns"), ...S2, icon: re(x(Yo, {})), key: "context:" + T2.length }))), R2 && (T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), T2.push(F(le, { command: n2.getCommand("hideRows"), ...S2, icon: re(x(Qo, {})), key: "context:" + T2.length })), T2.push(F(le, { command: n2.getCommand("unhideRows"), ...S2, icon: re(x(en, {})), key: "context:" + T2.length }))), (P2 || R2) && T2.push(x(ie, { orientation: "horizontal" }, "context:" + T2.length)), P2 && T2.push(F(le, { command: n2.getCommand("autoFitColumns"), ...S2, icon: re(x(tn, {})), key: "context:" + T2.length })), R2 && T2.push(F(le, { command: n2.getCommand("autoFitRows"), ...S2, icon: re(x(on, {})), key: "context:" + T2.length })));
|
|
2077
2077
|
const M2 = [], N2 = n2.getCommand("formatTableStyle"), E2 = N2?.context()?.table();
|
|
2078
|
-
if (
|
|
2078
|
+
if (sa(N2), !P2 && !R2) {
|
|
2079
2079
|
if (M2.push(x(ie, { orientation: "horizontal" }, "contextBefore:" + M2.length)), h2?.getHyperlink()) M2.push(F(Jt, { ...v2, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + M2.length, quickCommand: "openHyperlink", icon: (e3) => "openHyperlink" === e3.key() ? re(x(Vo, {})) : null }));
|
|
2080
2080
|
else {
|
|
2081
2081
|
const e3 = n2.getCommand("updateHyperlink");
|
|
@@ -2086,120 +2086,120 @@ const gi = k(S((e2, t2) => {
|
|
|
2086
2086
|
const e3 = n2.getCommand("updateComments");
|
|
2087
2087
|
M2.push(F(le, { command: e3, ...S2, icon: re(x(Go, {})), key: "contextBefore:" + M2.length }));
|
|
2088
2088
|
}
|
|
2089
|
-
E2 ? M2.push(F(Jt, { ...v2, variant:
|
|
2089
|
+
E2 ? M2.push(F(Jt, { ...v2, variant: aa.Menuitem, key: "contextBefore:" + M2.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: E2, quickCommand: "editTable", icon: (e3) => {
|
|
2090
2090
|
e3.key();
|
|
2091
2091
|
return re(x(So, {}));
|
|
2092
|
-
} })) : M2.push(F(le, { command: n2.getCommand("insertTable"), ...S2, icon: re(x(So, {})), key: "context:" + T2.length })), M2.push(F(
|
|
2092
|
+
} })) : M2.push(F(le, { command: n2.getCommand("insertTable"), ...S2, icon: re(x(So, {})), key: "context:" + T2.length })), M2.push(F(gl, { ...v2, key: "contextBefore:" + M2.length }));
|
|
2093
2093
|
}
|
|
2094
|
-
const I2 = b(y, { children: [x(le, { command: n2.getCommand("cut"), ...S2, icon: x(
|
|
2095
|
-
return x(A, { ref: t2, className:
|
|
2094
|
+
const I2 = b(y, { children: [x(le, { command: n2.getCommand("cut"), ...S2, icon: x(nn, {}) }), x(hl, { command: n2.getCommand("copy"), ...S2 }), x(qr, { command: n2.getCommand("paste"), ...v2, includePasteAllInPopup: false }), x(ie, { orientation: "horizontal" }), x(zr, { ...v2 }), x(ie, { orientation: "horizontal" }), x(Ir, { commands: n2, ...v2, disableSheet: true }), x(Lr, { commands: n2, ...v2, disableSheet: true }), x(Er, { ...v2 }), M2, T2] });
|
|
2095
|
+
return x(A, { ref: t2, className: Hn("menu", i2), sx: { ...r2 }, ...s2, children: I2 });
|
|
2096
2096
|
}));
|
|
2097
|
-
|
|
2098
|
-
const
|
|
2097
|
+
fi.displayName = "WorkbookContextMenu";
|
|
2098
|
+
const xi = k(S((e2, t2) => {
|
|
2099
2099
|
const { movable: o2, commands: n2, disabled: a2, sx: r2, floatReference: l2, ...i2 } = e2;
|
|
2100
|
-
|
|
2100
|
+
Ma(o2, { onAnyChange(e3) {
|
|
2101
2101
|
} });
|
|
2102
2102
|
const s2 = C(() => ({}), []), d2 = C(() => ({ commandHook: { beforeExecute: (e3, t3) => l2.closeAll(), onExecute() {
|
|
2103
2103
|
}, onError() {
|
|
2104
2104
|
console.log("onError");
|
|
2105
|
-
} }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = C(() => ({ variant:
|
|
2105
|
+
} }, disabled: a2, parentFloat: l2 }), [a2, l2]), c2 = C(() => ({ variant: aa.Menuitem, ...s2, ...d2 }), [s2, d2]), m2 = C(() => ({ commands: n2, variant: aa.Menuitem, parentFloat: l2, ...d2 }), [n2, d2, l2]), p2 = (e3) => {
|
|
2106
2106
|
const t3 = e3?.key();
|
|
2107
2107
|
switch (t3) {
|
|
2108
2108
|
case "moveToFront":
|
|
2109
|
-
return re(x(
|
|
2109
|
+
return re(x(bn, {}));
|
|
2110
2110
|
case "moveForward":
|
|
2111
|
-
return re(x(
|
|
2111
|
+
return re(x(xn, {}));
|
|
2112
2112
|
case "moveToBack":
|
|
2113
|
-
return re(x(
|
|
2113
|
+
return re(x(fn, {}));
|
|
2114
2114
|
case "moveBackward":
|
|
2115
|
-
return re(x(
|
|
2115
|
+
return re(x(hn, {}));
|
|
2116
2116
|
case "toggleLockAspectRatio":
|
|
2117
|
-
return re(x(
|
|
2117
|
+
return re(x(an, {}));
|
|
2118
2118
|
case "formatDrawAlignLeft":
|
|
2119
|
-
return re(x(
|
|
2119
|
+
return re(x(rn, {}));
|
|
2120
2120
|
case "formatDrawAlignCenter":
|
|
2121
|
-
return re(x(
|
|
2121
|
+
return re(x(gn, {}));
|
|
2122
2122
|
case "formatDrawAlignRight":
|
|
2123
|
-
return re(x(
|
|
2123
|
+
return re(x(un, {}));
|
|
2124
2124
|
case "formatDrawAlignTop":
|
|
2125
|
-
return re(x(
|
|
2125
|
+
return re(x(pn, {}));
|
|
2126
2126
|
case "formatDrawAlignMiddle":
|
|
2127
|
-
return re(x(
|
|
2127
|
+
return re(x(mn, {}));
|
|
2128
2128
|
case "formatDrawAlignBottom":
|
|
2129
|
-
return re(x(
|
|
2129
|
+
return re(x(cn, {}));
|
|
2130
2130
|
case "formatDrawDistributeHorz":
|
|
2131
|
-
return re(x(
|
|
2131
|
+
return re(x(dn, {}));
|
|
2132
2132
|
case "formatDrawDistributeVert":
|
|
2133
|
-
return re(x(
|
|
2133
|
+
return re(x(sn, {}));
|
|
2134
2134
|
case "formatAnchorTypeTwoCell":
|
|
2135
2135
|
case "formatAnchorTypeOneCell":
|
|
2136
2136
|
case "formatAnchorTypeAbsolute":
|
|
2137
|
-
return re(x(
|
|
2137
|
+
return re(x(ln, {}));
|
|
2138
2138
|
default:
|
|
2139
2139
|
return null;
|
|
2140
2140
|
}
|
|
2141
|
-
}, u2 = b(y, { children: [x(
|
|
2141
|
+
}, u2 = b(y, { children: [x(hl, { command: n2.getCommand("copy"), ...c2, variant: aa.Menuitem }), [], x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront", icon: p2 }), x(Jt, { ...m2, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack", icon: p2 }), x(ie, { orientation: "horizontal" }), x(le, { ...c2, command: n2.getCommand("toggleLockAspectRatio"), icon: re(x(an, {})) }), x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: (e3) => {
|
|
2142
2142
|
const t3 = p2(e3);
|
|
2143
|
-
return t3 || re(x(
|
|
2143
|
+
return t3 || re(x(rn, {}));
|
|
2144
2144
|
}, tooltip: "Quickly change the placement of your drawings." }), x(ie, { orientation: "horizontal" }), x(Jt, { ...m2, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: (e3) => {
|
|
2145
2145
|
const t3 = p2(e3);
|
|
2146
|
-
return t3 || re(x(
|
|
2146
|
+
return t3 || re(x(ln, {}));
|
|
2147
2147
|
}, tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
|
|
2148
2148
|
return x(A, { ref: t2, sx: { paddingTop: "4px", paddingBottom: "4px", ...r2 }, ...i2, children: u2 });
|
|
2149
2149
|
}));
|
|
2150
|
-
|
|
2151
|
-
const
|
|
2152
|
-
const { workbook: o2, createWorkbookOptions: a2, onNewWorkbook: r2, onElementLoad: l2, notifier: i2, autoFocus: s2 = false, sx: d2, style: c2, className: m2, onFocus: p2, onBlur: u2, onKeyDown: g2, onRepeatCommandChange: k2, commands: S2, showFormulaBar: T2, formulaBarProps: R2, renderFormulaBar: F2 =
|
|
2150
|
+
xi.displayName = "MovableContextMenu";
|
|
2151
|
+
const bi = (e2) => x(xi, { ...e2 }), yi = (e2) => x(fi, { ...e2 }), wi = (e2) => x(Ml, { ...e2 }), ki = (e2, t2) => x(Rl, { ref: t2, ...e2 }), Si = (e2) => x(Pe, { ...e2 }), Ci = (e2, t2) => x(Ia, { ref: t2, ...e2 }), vi = (e2) => x(Tl, { ...e2 }), Ti = (e2) => x(hi, { ...e2 }), Di = { fireOnModelChange: false }, Pi = { flex: "1 1 100%", display: "flex" }, Ri = k(S((e2, t2) => {
|
|
2152
|
+
const { workbook: o2, createWorkbookOptions: a2, onNewWorkbook: r2, onElementLoad: l2, notifier: i2, autoFocus: s2 = false, sx: d2, style: c2, className: m2, onFocus: p2, onBlur: u2, onKeyDown: g2, onRepeatCommandChange: k2, commands: S2, showFormulaBar: T2, formulaBarProps: R2, renderFormulaBar: F2 = ki, showTabs: N2, tabsProps: L2, renderTabs: H2 = Ti, showStatusBar: W2, statusBarProps: z2, renderStatusBar: $2 = vi, toolbarProps: O2, renderToolbar: V2 = ni, contextMenuSx: G2, renderContextMenu: U2 = yi, renderFilterMenu: j2 = wi, renderMovableMenu: _2 = bi, renderLoadingPanel: q2 = Si, loadingPanelProps: K2, sheetProps: Z2, renderSheet: J2 = Ci, showHorizontalScrollbar: Y2, showVerticalScrollbar: Q2, gridTheme: ee2, headersTheme: te2, enableDarkImages: oe2, ...ne2 } = e2, ae2 = Sa(), re2 = Ea(), le2 = C(() => {
|
|
2153
2153
|
const e3 = { theme: re2.getDefaultTheme(), ...a2 };
|
|
2154
2154
|
return o2 ?? new h(e3);
|
|
2155
2155
|
}, [o2]), ie2 = M(null), [se2, de2] = D(false), ce2 = M(null), me2 = C(() => x(A, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: ce2 }), []), [pe2, ue2] = D(false), [ge2, he2] = D(false), fe2 = v(() => {
|
|
2156
2156
|
ue2(true);
|
|
2157
|
-
}, []), xe2 = M(null), be2 =
|
|
2157
|
+
}, []), xe2 = M(null), be2 = pa(t2, () => ({ isWorkbookElement: () => true, getWorkbook: () => le2, getSheetElement: () => ie2.current, getViewportElement: () => ce2.current, getFormulaBarElement: () => xe2.current, focus() {
|
|
2158
2158
|
ie2 && ie2.current && ie2.current.focus();
|
|
2159
2159
|
} }), [le2]), ye2 = M(null);
|
|
2160
2160
|
E(() => {
|
|
2161
2161
|
pe2 && be2.current && (he2(true), ye2.current !== l2 && (l2?.({ source: be2.current }), ye2.current = l2));
|
|
2162
|
-
}, [pe2, be2.current]),
|
|
2162
|
+
}, [pe2, be2.current]), Hl(be2.current);
|
|
2163
2163
|
const we2 = v((e3) => (ie2.current?.submitEdit(), true), []), ke2 = v(() => {
|
|
2164
2164
|
requestAnimationFrame(() => {
|
|
2165
2165
|
ie2?.current?.focus();
|
|
2166
2166
|
});
|
|
2167
2167
|
}, []), [Se2, Ce2] = D(le2?.getSelectedSheet()), [ve2, Te2] = D(le2?.getProtection());
|
|
2168
|
-
|
|
2168
|
+
Ma(le2, { onSheetsChange: (e3) => {
|
|
2169
2169
|
Ce2(e3?.getSelectedSheet());
|
|
2170
2170
|
}, onViewChange(e3) {
|
|
2171
2171
|
Ce2(e3?.getSelectedSheet());
|
|
2172
2172
|
}, onProtectionChange: (e3) => {
|
|
2173
2173
|
Te2(e3?.getProtection());
|
|
2174
|
-
} }),
|
|
2174
|
+
} }), Ma(le2, { onRequestSelect: async (e3, t3) => new Promise((e4) => {
|
|
2175
2175
|
ie2.current.getSheet() !== t3 ? ie2.current.getGridElement()?.onViewChangeOnce(() => {
|
|
2176
2176
|
ie2.current.getSheet() !== t3 && e4(false), e4(true);
|
|
2177
2177
|
}) : e4(true);
|
|
2178
|
-
}) },
|
|
2178
|
+
}) }, Di);
|
|
2179
2179
|
const [Re2, Me2] = B((e3) => e3 + 1, 0), Fe2 = le2?.getView();
|
|
2180
|
-
|
|
2180
|
+
Ma(Fe2, { onViewChange: (e3) => {
|
|
2181
2181
|
Me2();
|
|
2182
2182
|
} });
|
|
2183
|
-
const Be2 = ee2 ?? ae2, Ne2 = C(() =>
|
|
2183
|
+
const Be2 = ee2 ?? ae2, Ne2 = C(() => $l(ae2, Be2), [ae2, Be2]), Ee2 = te2 ?? ae2, Ae2 = C(() => $l(ae2, Ee2), [ae2, Ee2]), [Ie2, Le2] = D(null);
|
|
2184
2184
|
v(() => {
|
|
2185
2185
|
ie2.current.focus();
|
|
2186
2186
|
}, []);
|
|
2187
|
-
const [He2, We2] = D(false), ze2 = M(null), $e2 =
|
|
2187
|
+
const [He2, We2] = D(false), ze2 = M(null), $e2 = si({ workbook: le2, workbookElement: be2.current, target: () => ie2.current, notifier: i2, commands: S2, darkMode: Ne2.body.darkMode, onNewWorkbook: r2, onShowSidebar: () => {
|
|
2188
2188
|
He2 ? ze2.current?.focus() : We2(true);
|
|
2189
|
-
} }), Oe2 = M(null), [Ve2, Ge2] = D(false), [Ue2, je2] = D(null), [_e2, qe2] = D(
|
|
2189
|
+
} }), Oe2 = M(null), [Ve2, Ge2] = D(false), [Ue2, je2] = D(null), [_e2, qe2] = D(ya.Top), [Ke2, Xe2] = D(f.EmptyBounds), Ze2 = () => {
|
|
2190
2190
|
Ge2(false), je2(null);
|
|
2191
|
-
}, Je2 = (e3, t3, o3 =
|
|
2191
|
+
}, Je2 = (e3, t3, o3 = ya.Top) => {
|
|
2192
2192
|
Xe2(e3), qe2(o3), je2(t3), null !== Oe2.current && Oe2.current.update(), Ge2(true);
|
|
2193
|
-
}, [Ye2, Qe2] = D("sheet"), et2 = N2 ?? Fe2?.isShowTabs(), tt2 = Y2 ?? Fe2?.isShowHorizontalScrollbar(), ot2 = T2 ?? Fe2?.isShowFormulaBar(), nt2 = W2 ?? Fe2?.isShowStatusBar(), at2 = Q2 ?? Fe2?.isShowVerticalScrollbar(), rt2 = Ne2?.header?.edgeStrokeFill || "rgb(171,171,171)", lt2 = C(() => nt2 ? $2({ sheet: Se2, gridStyle: Ne2, ...z2 }) : null, [$2, z2, nt2, Ne2, Se2]), it2 = C(() => V2({ commands: $e2, workbook: be2.current, ...O2 }), [$e2, V2, O2, ae2]), [st2, { width: dt2 }] =
|
|
2193
|
+
}, [Ye2, Qe2] = D("sheet"), et2 = N2 ?? Fe2?.isShowTabs(), tt2 = Y2 ?? Fe2?.isShowHorizontalScrollbar(), ot2 = T2 ?? Fe2?.isShowFormulaBar(), nt2 = W2 ?? Fe2?.isShowStatusBar(), at2 = Q2 ?? Fe2?.isShowVerticalScrollbar(), rt2 = Ne2?.header?.edgeStrokeFill || "rgb(171,171,171)", lt2 = C(() => nt2 ? $2({ sheet: Se2, gridStyle: Ne2, ...z2 }) : null, [$2, z2, nt2, Ne2, Se2]), it2 = C(() => V2({ commands: $e2, workbook: be2.current, ...O2 }), [$e2, V2, O2, ae2]), [st2, { width: dt2 }] = Xa(), ct2 = 0 === dt2 || dt2 > 560, mt2 = C(() => {
|
|
2194
2194
|
if (!et2) return null;
|
|
2195
2195
|
let e3 = H2({ background: Ne2.body.fill, borderWidth: 1, borderColor: rt2, gridTheme: Be2, gridStyle: Ne2, onBeforeUserChange: we2, onUserChange: ke2, workbook: le2, commands: $e2, sheetTabProps: {}, notifier: i2, ...L2 });
|
|
2196
2196
|
return ct2 || (e3 = x("div", { style: { flex: "none", display: "flex" }, children: e3 })), e3;
|
|
2197
2197
|
}, [H2, L2, i2, ae2, le2, Be2, ct2, $e2, et2]), pt2 = v((e3) => {
|
|
2198
2198
|
const t3 = n.getOS() === n.OSType.Firefox;
|
|
2199
2199
|
let o3 = null, a3 = null, r3 = null;
|
|
2200
|
-
if (tt2 && (a3 = x("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${rt2} 1px`, maxWidth: "100%" }, children: x(
|
|
2200
|
+
if (tt2 && (a3 = x("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${rt2} 1px`, maxWidth: "100%" }, children: x(La, { style: { alignItems: "center", borderTop: (t3 ? 6 : 3) + "px solid transparent", borderBottom: (ct2 ? 6 : 3) + "px solid transparent", borderLeft: (t3 ? 3 : 0) + "px solid transparent", borderRight: (t3 ? 3 : 0) + "px solid transparent" }, ...e3, endGap: 700, sheet: Se2, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
|
|
2201
2201
|
Je2({ x: e4.anchor.x, y: e4.anchor.y, width: 0, height: 0 }, e4.display, e4.placement);
|
|
2202
|
-
}, onCloseTooltip: () => Ze2() }) })), et2 && ct2 && (r3 = mt2), et2 && ct2 && !tt2 && (r3 = b(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [r3, x(A, { sx: { borderTop: `solid ${rt2} 1px`, flex: "1" } })] })), r3 && tt2) o3 = x(
|
|
2202
|
+
}, onCloseTooltip: () => Ze2() }) })), et2 && ct2 && (r3 = mt2), et2 && ct2 && !tt2 && (r3 = b(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [r3, x(A, { sx: { borderTop: `solid ${rt2} 1px`, flex: "1" } })] })), r3 && tt2) o3 = x(ua, { position: le2.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: e4 }) => {
|
|
2203
2203
|
le2.getView().setTabRatio(Math.round(10 * e4));
|
|
2204
2204
|
}, minBefore: "200px", minAfter: "180px", resizerProps: { style: { minWidth: "11px", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${ae2.palette.text.icon ?? ae2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center", borderTop: `solid ${rt2} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: r3, elementAfter: a3 });
|
|
2205
2205
|
else if (tt2) o3 = a3;
|
|
@@ -2212,19 +2212,19 @@ const fi = (e2) => x(hi, { ...e2 }), xi = (e2) => x(gi, { ...e2 }), bi = (e2) =>
|
|
|
2212
2212
|
P(() => {
|
|
2213
2213
|
ut2 ? ft2.open(0) : ft2.close(0);
|
|
2214
2214
|
}, [ut2]);
|
|
2215
|
-
const bt2 =
|
|
2215
|
+
const bt2 = ra((e3, t3) => {
|
|
2216
2216
|
if (e3?.isDefaultPrevented()) return true;
|
|
2217
2217
|
e3.preventDefault(), ut2 && ut2.anchor === e3.currentTarget ? gt2(null) : gt2({ anchor: e3.currentTarget, popperProps: { offsets: [-4, 2] }, createPopupPanel: (e4) => {
|
|
2218
2218
|
const { floatReference: o3 } = e4;
|
|
2219
2219
|
return j2({ filter: t3, commands: $e2, floatReference: o3, sx: { ...G2 } });
|
|
2220
2220
|
} });
|
|
2221
|
-
}, [j2, G2, $e2, le2, ut2]), yt2 =
|
|
2221
|
+
}, [j2, G2, $e2, le2, ut2]), yt2 = ra((e3) => {
|
|
2222
2222
|
if (e3.originalEvent?.isDefaultPrevented()) return true;
|
|
2223
2223
|
e3.originalEvent?.preventDefault(), gt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
|
|
2224
2224
|
const { floatReference: t3 } = e4;
|
|
2225
2225
|
return U2({ commands: $e2, workbook: le2, floatReference: t3, sx: { ...G2 } });
|
|
2226
2226
|
} });
|
|
2227
|
-
}, [U2, G2, $e2, le2]), wt2 =
|
|
2227
|
+
}, [U2, G2, $e2, le2]), wt2 = ra((e3, t3) => {
|
|
2228
2228
|
if (e3?.isDefaultPrevented()) return true;
|
|
2229
2229
|
e3.preventDefault(), gt2({ clientX: e3.clientX, clientY: e3.clientY, createPopupPanel: (e4) => {
|
|
2230
2230
|
const { floatReference: o3 } = e4;
|
|
@@ -2232,7 +2232,7 @@ const fi = (e2) => x(hi, { ...e2 }), xi = (e2) => x(gi, { ...e2 }), bi = (e2) =>
|
|
|
2232
2232
|
} });
|
|
2233
2233
|
}, [_2, G2, $e2]);
|
|
2234
2234
|
C(() => {
|
|
2235
|
-
const e3 = [new
|
|
2235
|
+
const e3 = [new ha("openContextMenu", () => ie2.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [xa.Shift] }, { key: "ContextMenu" }] })];
|
|
2236
2236
|
$e2.addCommands(e3, true);
|
|
2237
2237
|
}, [$e2]), P(() => {
|
|
2238
2238
|
$e2.getCommand("openContextMenu").updateCallback(() => {
|
|
@@ -2245,18 +2245,18 @@ const fi = (e2) => x(hi, { ...e2 }), xi = (e2) => x(gi, { ...e2 }), bi = (e2) =>
|
|
|
2245
2245
|
});
|
|
2246
2246
|
});
|
|
2247
2247
|
}, [Se2]);
|
|
2248
|
-
const kt2 =
|
|
2248
|
+
const kt2 = ra((e3) => {
|
|
2249
2249
|
$e2?.dispatchToFocusedCommand(e3);
|
|
2250
|
-
}, [$e2]), St2 =
|
|
2251
|
-
|
|
2250
|
+
}, [$e2]), St2 = ra(() => {
|
|
2251
|
+
Hl(be2.current);
|
|
2252
2252
|
}, [le2, be2.current]), Ct2 = v(() => {
|
|
2253
2253
|
Qe2("sheet");
|
|
2254
2254
|
}, []), vt2 = v(() => {
|
|
2255
2255
|
Qe2("formulaBar");
|
|
2256
|
-
}, []), Tt2 =
|
|
2256
|
+
}, []), Tt2 = ra((e3) => {
|
|
2257
2257
|
const t3 = n.getOS() === n.OSType.Firefox;
|
|
2258
|
-
return x(
|
|
2259
|
-
Je2(e4.anchor, e4.display,
|
|
2258
|
+
return x(La, { style: { borderLeft: "3px solid transparent", borderRight: "0px solid transparent", borderTop: (t3 ? 3 : 0) + "px solid transparent", borderBottom: (t3 ? 3 : 0) + "px solid transparent", width: t3 ? "13px" : void 0 }, ...e3, sheet: Se2, endGap: 700, showCustomScrollButtons: !t3, onShowTooltip: (e4) => {
|
|
2259
|
+
Je2(e4.anchor, e4.display, ya.Left);
|
|
2260
2260
|
}, onCloseTooltip: () => Ze2() });
|
|
2261
2261
|
}, [Se2]);
|
|
2262
2262
|
P(() => {
|
|
@@ -2264,7 +2264,7 @@ const fi = (e2) => x(hi, { ...e2 }), xi = (e2) => x(gi, { ...e2 }), bi = (e2) =>
|
|
|
2264
2264
|
}, []);
|
|
2265
2265
|
const [Dt2, Pt2] = w.useState(null), Rt2 = v((e3) => {
|
|
2266
2266
|
$e2?.getCommand("openWorkbook") && ("dragenter" === e3.type || "dragover" === e3.type ? e3.dataTransfer?.types.includes("Files") ? e3.dataTransfer.files[0]?.type?.startsWith("image/") || e3.dataTransfer.items[0]?.type?.startsWith("image/") || 1 === e3.dataTransfer.types.length && Pt2("Drop to open") : (e3.dataTransfer?.types.includes("text/html") || e3.dataTransfer?.types.includes("text/plain"), e3.dataTransfer.effectAllowed = "none", e3.dataTransfer.dropEffect = "none") : "dragleave" === e3.type && Pt2(null), e3.preventDefault());
|
|
2267
|
-
}, [$e2]), Mt2 =
|
|
2267
|
+
}, [$e2]), Mt2 = ra((e3) => {
|
|
2268
2268
|
if ($e2?.getCommand("openWorkbook") && (e3.preventDefault(), e3.stopPropagation(), Pt2(null), e3.dataTransfer.files && e3.dataTransfer.files.length > 0)) {
|
|
2269
2269
|
const t3 = e3.dataTransfer.files[0];
|
|
2270
2270
|
if (!t3) return;
|
|
@@ -2276,27 +2276,27 @@ const fi = (e2) => x(hi, { ...e2 }), xi = (e2) => x(gi, { ...e2 }), bi = (e2) =>
|
|
|
2276
2276
|
$e2?.getCommand("insertImageFromFile")?.execute({ file: t3, options: { bounds: { x: a3.x, y: a3.y } }, goto: { range: { ...r3 } } });
|
|
2277
2277
|
} else $e2?.getCommand("openWorkbook")?.execute(t3);
|
|
2278
2278
|
}
|
|
2279
|
-
}, [$e2, Dt2]), Ft2 = C(() => Dt2 ? x(A, { 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: x(I, { variant: "h4", children: Dt2 }) }) : null, [Dt2]), Bt2 = M(null), Nt2 = C(() => x(
|
|
2279
|
+
}, [$e2, Dt2]), Ft2 = C(() => Dt2 ? x(A, { 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: x(I, { variant: "h4", children: Dt2 }) }) : null, [Dt2]), Bt2 = M(null), Nt2 = C(() => x(Za, { in: !ge2, nodeRef: Bt2, timeout: 500, classNames: "animating", unmountOnExit: true, children: x(A, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: ge2 ? "none" : d2?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: q2({ ref: Bt2, transitionDelay: "0", transparentBackground: false, sx: { opacity: ge2 ? 0 : d2?.opacity, pointerEvents: ge2 ? "none" : d2?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...K2 } }) }) }), [ge2, q2, K2]), Et2 = C(() => F2({ sx: { marginTop: (e3) => e3.spacing(0.25), marginLeft: (e3) => e3.spacing(1), marginRight: (e3) => e3.spacing(1) }, workbook: le2, sheetElement: ie2.current, gridStyle: Ne2, onFocus: vt2, ...R2, NamedCollectionEditorProps: { restoreFocus: (e3) => ie2.current.focus(e3), notifier: i2, ...R2?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: $e2, ...R2?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, xe2), [F2, R2, le2, Ne2, $e2, ge2]), At2 = v((e3) => {
|
|
2280
2280
|
const { movable: t3, ...o3 } = e3, n2 = { movable: t3, onContextMenuCapture: (e4) => {
|
|
2281
2281
|
wt2(e4, t3);
|
|
2282
2282
|
}, ...o3 }, a3 = t3.getContent().getType();
|
|
2283
2283
|
let r3 = null;
|
|
2284
|
-
if ("picture" === a3) return x(
|
|
2284
|
+
if ("picture" === a3) return x(Ha, { loadingPanel: x(Pe, { transitionDelay: "100", style: { position: "absolute" }, sx: { border: (e4) => `solid 1px ${e4.palette.action.active}` } }), picture: t3.getContent(), description: t3.getDescription() ?? t3?.getName(), ...n2 });
|
|
2285
2285
|
if ("chart" === a3) {
|
|
2286
2286
|
const e4 = { ...n2, chart: t3.getContent() };
|
|
2287
|
-
return x(
|
|
2287
|
+
return x(Wa, { ...e4 });
|
|
2288
2288
|
}
|
|
2289
2289
|
if (r3 = `Float of type '${a3}'.`, "string" == typeof r3) {
|
|
2290
2290
|
const e4 = { ...n2, description: r3 };
|
|
2291
|
-
r3 = x(
|
|
2291
|
+
r3 = x(za, { ...e4 });
|
|
2292
2292
|
}
|
|
2293
2293
|
return x("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: r3 }, t3.getUUID());
|
|
2294
|
-
}, []), It2 = C(() => J2({ style:
|
|
2294
|
+
}, []), It2 = C(() => J2({ style: Pi, onFocus: Ct2, notifier: i2, gridStyle: Ne2, headersStyle: Ae2, sheet: Se2, commands: $e2, onSheetContextMenu: yt2, onViewportChange: (e3) => {
|
|
2295
2295
|
Le2(e3);
|
|
2296
2296
|
}, showScrollbars: false, viewportComponent: me2, onRepeatCommandChange: k2, onElementLoad: fe2, onShowColumnTooltip: (e3) => {
|
|
2297
|
-
Je2(e3.anchor, e3.display,
|
|
2297
|
+
Je2(e3.anchor, e3.display, ya.Top);
|
|
2298
2298
|
}, onShowRowTooltip: (e3) => {
|
|
2299
|
-
Je2(e3.anchor, e3.display,
|
|
2299
|
+
Je2(e3.anchor, e3.display, ya.Right);
|
|
2300
2300
|
}, onShowTooltip: (e3) => {
|
|
2301
2301
|
Je2({ x: e3.anchor.x, y: e3.anchor.y, width: 0, height: 0 }, e3.display, e3.placement);
|
|
2302
2302
|
}, onCloseTooltip: () => Ze2(), renderMovable: At2, ...Z2, cellRenderProps: { onFilterButtonMouseDown: (e3, t3) => {
|
|
@@ -2304,21 +2304,21 @@ const fi = (e2) => x(hi, { ...e2 }), xi = (e2) => x(gi, { ...e2 }), bi = (e2) =>
|
|
|
2304
2304
|
}, ...Z2?.cellRenderProps } }, ie2), [J2, $e2, Z2, Se2, Ne2, i2, k2]), Lt2 = C(() => {
|
|
2305
2305
|
if (!He2) return null;
|
|
2306
2306
|
const e3 = !ve2.isStructureAllowed();
|
|
2307
|
-
return x(
|
|
2307
|
+
return x(Jl, { sx: { marginBottom: (e4) => e4.spacing(0.5), border: (t3) => `solid ${e3 ? t3.palette.action.disabled : Ca(t3.palette.divider, 0.2)} 1px`, borderRadius: (e4) => `${e4.shape.borderRadius}px`, overflow: "hidden" }, onClose: () => {
|
|
2308
2308
|
We2(false), requestAnimationFrame(() => {
|
|
2309
2309
|
ie2.current.focus();
|
|
2310
2310
|
});
|
|
2311
2311
|
}, readOnly: e3, commands: $e2, ref: ze2, scripts: le2.getScripts() });
|
|
2312
2312
|
}, [He2, $e2, le2, i2, ve2]), Ht2 = C(() => {
|
|
2313
|
-
const e3 = x(
|
|
2313
|
+
const e3 = x(wa, { style: { ...Pi, marginRight: Lt2 && ct2 ? "0px" : "6px" }, viewport: Ie2, touchElement: ie2.current?.getGridElement()?.stage, onScrollViewport: (e4) => {
|
|
2314
2314
|
ie2.current?.getGridElement()?.scrollTo(e4);
|
|
2315
2315
|
}, showHorizontalScrollbar: tt2 || et2, showVerticalScrollbar: at2, createHorizontalScrollbar: pt2, createVerticalScrollbar: Tt2, children: It2 });
|
|
2316
2316
|
let t3 = e3;
|
|
2317
2317
|
ct2 || (t3 = b(y, { children: [e3, mt2] }));
|
|
2318
2318
|
let o3 = null, n2 = 4, a3 = 13;
|
|
2319
|
-
return ct2 ? o3 = "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" : (o3 = "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", n2 = 13, a3 = 4), x(
|
|
2320
|
-
}, [tt2, et2, pt2, at2, Ie2, Lt2, It2, mt2, ae2, ct2]), Wt2 = C(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? Ne2.header.fill : e3.palette.background.paper, "& *": { ...
|
|
2321
|
-
return b(X, { className:
|
|
2319
|
+
return ct2 ? o3 = "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" : (o3 = "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", n2 = 13, a3 = 4), x(ua, { fixedPane: "after", position: "40%", minAfter: ct2 ? "280px" : "120px", splitDirection: ct2 ? "row" : "column", style: Pi, ref: st2, resizerProps: { className: "styled-resizer", style: { minWidth: ct2 ? "6px" : void 0, minHeight: ct2 ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${n2}' height='${a3}' viewBox='0 0 ${n2} ${a3}' version='1.1' fill='${ae2.palette.text.icon ?? ae2.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${o3}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: ct2 ? "left center" : "top center" } }, elementBefore: t3, paneBeforeProps: { style: { flexDirection: "column" } }, elementAfter: Lt2, paneAfterProps: { style: { marginLeft: ct2 ? "0px" : "4px", marginRight: ct2 ? "8px" : "4px" } } });
|
|
2320
|
+
}, [tt2, et2, pt2, at2, Ie2, Lt2, It2, mt2, ae2, ct2]), Wt2 = C(() => ({ boxSizing: "border-box", background: (e3) => "dark" !== e3.palette.mode ? Ne2.header.fill : e3.palette.background.paper, "& *": { ...yn(ae2), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${rt2} 1px` }, ...d2 }), [d2, Ne2]);
|
|
2321
|
+
return b(X, { className: Hn("sheetxl-workbook", mi, { "Mui-focusVisible": se2 }, ci, m2), sx: Wt2, style: c2, square: false, ...ne2, ref: be2, onFocus: (e3) => {
|
|
2322
2322
|
de2(true), St2(), p2?.(e3);
|
|
2323
2323
|
}, onBlur: (e3) => {
|
|
2324
2324
|
de2(false), u2?.(e3);
|
|
@@ -2329,11 +2329,11 @@ const fi = (e2) => x(hi, { ...e2 }), xi = (e2) => x(gi, { ...e2 }), bi = (e2) =>
|
|
|
2329
2329
|
const t3 = new Image();
|
|
2330
2330
|
t3.src = e3.target.src, e3.dataTransfer.setDragImage(t3, 1, 1);
|
|
2331
2331
|
}
|
|
2332
|
-
}, onDragEnter: Rt2, onDragLeave: Rt2, onDragOver: Rt2, onDrop: Mt2, children: [b("div", { className:
|
|
2332
|
+
}, onDragEnter: Rt2, onDragLeave: Rt2, onDragOver: Rt2, onDrop: Mt2, children: [b("div", { className: Hn(Qr), style: { flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: ge2 ? void 0 : 0, "--sxl-app-color-high-contrast": ae2.palette.primary.main, "--sxl-app-color-primary": ae2.palette.primary.main, "--sxl-app-color-primary-dark": ae2.palette.primary.dark, "--sxl-app-color-primary-light": ae2.palette.primary.light, "--sxl-app-color-info": ae2.palette.info.main, "--sxl-app-color-info-dark": ae2.palette.info.dark, "--sxl-app-color-info-light": ae2.palette.info.light, "--sxl-app-color-secondary": ae2.palette.secondary.main, "--sxl-app-color-secondary-dark": ae2.palette.secondary.dark, "--sxl-app-color-secondary-light": ae2.palette.secondary.light, "--sxl-app-color-success": ae2.palette.success.main, "--sxl-app-color-success-dark": ae2.palette.success.dark, "--sxl-app-color-success-light": ae2.palette.success.light, "--sxl-app-color-warning": ae2.palette.warning.main, "--sxl-app-color-warning-dark": ae2.palette.warning.dark, "--sxl-app-color-warning-light": ae2.palette.warning.light, "--sxl-app-color-error": ae2.palette.error.main, "--sxl-app-color-error-dark": ae2.palette.error.dark, "--sxl-app-color-error-light": ae2.palette.error.light, "--sxl-app-color-text": ae2.palette.text.primary, "--sxl-app-color-text-secondary": ae2.palette.text.secondary, "--sxl-app-color-text-disabled": ae2.palette.text.disabled, "--sxl-app-color-background": ae2.palette.background.paper, "--sxl-app-color-button-surface": ae2.palette.grey[600], "--sxl-app-color-shadow": ae2.palette.action.focus, "--sxl-app-color-grey": ae2.palette.grey[500], "--sxl-app-filter-dark-invert": Ne2.body.darkMode && oe2 ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": Ne2.body.darkMode ? `linear-gradient(${Ca("#fff", va(5))}, ${Ca("#fff", va(5))})` : void 0 }, children: [it2, ot2 ? Et2 : null, x(A, { sx: { marginBottom: (e3) => e3.spacing(0.75) } }), Ht2, lt2, x(De, { arrow: true, disableInteractive: true, open: Ve2, title: x(I, { variant: "subtitle2", component: "div", children: Ue2 }), placement: _e2, TransitionProps: { timeout: { exit: 0 } }, PopperProps: { popperRef: Oe2, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Ve2 ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Ke2.x, Ke2.y, Ke2.width, Ke2.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] }, children: x(A, {}) }), xt2, Ft2] }), Nt2] });
|
|
2333
2333
|
}));
|
|
2334
|
-
|
|
2335
|
-
const
|
|
2336
|
-
const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = D(false), [p2, u2] = D(false), [g2, h2] = D(a2 ?? ""), [f2, y2] = D(""), [w2, { width: k2 }] =
|
|
2334
|
+
Ri.displayName = "WorkbookElement";
|
|
2335
|
+
const Mi = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:hover)": { color: (e3) => e3.palette.text.secondary }, backgroundColor: (e3) => Ca(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` } }, Fi = k(S((e2, t2) => {
|
|
2336
|
+
const { sx: o2, workbook: n2, title: a2 = "", placeHolder: r2 = "Untitled", onTitleChange: l2, readOnly: i2 = false, hidden: s2, ...d2 } = e2, [c2, m2] = D(false), [p2, u2] = D(false), [g2, h2] = D(a2 ?? ""), [f2, y2] = D(""), [w2, { width: k2 }] = Xa(), [S2, { width: C2 }] = Xa(), [v2, T2] = D(false), R2 = M(null), F2 = M(null), B2 = pa(t2, () => ({ requestWorkbookTitle: (e3 = null, t3) => {
|
|
2337
2337
|
F2.current = { onAccept: e3, requestReason: t3?.requestReason }, t3?.selectAll && R2.current?.select(), R2.current?.focus(t3);
|
|
2338
2338
|
}, focus: (e3) => {
|
|
2339
2339
|
R2.current?.focus(e3);
|
|
@@ -2341,38 +2341,38 @@ const Pi = (e2 = false, t2 = false) => t2 ? null : { "& input:not(:focus):not(:h
|
|
|
2341
2341
|
return E(() => {
|
|
2342
2342
|
T2(a2 !== g2), y2(a2), h2(a2);
|
|
2343
2343
|
}, [a2]), P(() => {
|
|
2344
|
-
v2 && 0 !== k2 &&
|
|
2344
|
+
v2 && 0 !== k2 && ja.debounce(() => {
|
|
2345
2345
|
T2(false);
|
|
2346
2346
|
}, 300)();
|
|
2347
2347
|
}, [v2, k2]), P(() => {
|
|
2348
|
-
u2(g2 && !
|
|
2349
|
-
}, [g2]), s2 ? null : x(A, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: v2 ? "0" : "1", transition: v2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref:
|
|
2348
|
+
u2(g2 && !Ya.isValidWindowsFilename(g2));
|
|
2349
|
+
}, [g2]), s2 ? null : x(A, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: v2 ? "0" : "1", transition: v2 ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Ua([B2, S2, t2]), ...d2, children: x(Le, { label: F2.current?.requestReason ?? "Workbook Name", children: b(A, { className: Hn({ "Mui-focusVisible": c2 }), sx: { visibility: 0 === k2 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ...Mi(true, i2), ...o2 }, children: [i2 ? x(I, { 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 }) : x(O, { sx: { width: `${Math.min(k2 + 3, Math.max(C2, B2.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) => {
|
|
2350
2350
|
m2(true), e3.target?.select();
|
|
2351
2351
|
}, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: R2 }, onBlur: () => {
|
|
2352
2352
|
m2(false), p2 ? h2(f2) : (g2 !== f2 && (l2?.(g2), g2 && F2.current?.onAccept?.(g2, "blur")), F2.current = null);
|
|
2353
2353
|
}, onChange: (e3) => {
|
|
2354
|
-
if (e3.target.value.length >
|
|
2354
|
+
if (e3.target.value.length > Ya.MAX_WORKBOOK_NAME_SIZE) return e3.stopPropagation(), void e3.preventDefault();
|
|
2355
2355
|
h2(e3.target.value);
|
|
2356
2356
|
}, onKeyDown: (e3) => {
|
|
2357
|
-
(
|
|
2357
|
+
(Ya.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(e3.key) || e3.target?.value.length > Ya.MAX_WORKBOOK_NAME_SIZE) && e3.preventDefault(), e3.which === ia.Enter || e3.which === ia.Tab ? (p2 ? h2(f2) : (l2?.(g2), g2 && (F2.current?.onAccept?.(g2, "keydown"), F2.current = null)), e3.stopPropagation(), e3.preventDefault(), n2?.focus()) : e3.which === ia.Escape && (g2 === f2 ? n2?.focus() : (h2(f2), setTimeout(() => {
|
|
2358
2358
|
e3.target?.select();
|
|
2359
2359
|
}, 0)), F2.current = null, e3.stopPropagation(), e3.preventDefault());
|
|
2360
2360
|
}, value: g2 }), x(A, { ref: w2, 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 })] }) }) });
|
|
2361
2361
|
}));
|
|
2362
|
-
|
|
2363
|
-
const
|
|
2362
|
+
Fi.displayName = "WorkbookTitle";
|
|
2363
|
+
const Bi = k(S((e2, t2) => {
|
|
2364
2364
|
const { sx: o2, style: n2, className: a2, licenseKey: r2, renderLoadingPanel: l2, ...i2 } = e2;
|
|
2365
2365
|
r2 && g.setLicenseKey(r2);
|
|
2366
2366
|
const s2 = C(() => {
|
|
2367
2367
|
const e3 = { transitionDelay: "160ms", transparentBackground: true };
|
|
2368
2368
|
return x(A, { sx: o2, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, children: l2?.(e3) ?? x(Pe, { ...e3 }) });
|
|
2369
|
-
}, [o2, n2, l2]), d2 = C(() => w.lazy(async () => await Promise.resolve().then(() =>
|
|
2369
|
+
}, [o2, n2, l2]), d2 = C(() => w.lazy(async () => await Promise.resolve().then(() => Gi)), []);
|
|
2370
2370
|
return x(y, { children: x(R, { fallback: s2, children: x(d2, { ...i2, className: a2, renderLoadingPanel: l2, sx: o2, style: n2, ref: t2 }) }) });
|
|
2371
2371
|
}));
|
|
2372
|
-
|
|
2373
|
-
const
|
|
2374
|
-
class
|
|
2375
|
-
constructor(e2 =
|
|
2372
|
+
Bi.displayName = "Studio";
|
|
2373
|
+
const Ni = [{ key: "SheetXL", description: "SheetXL", mimeType: ".sxl", exts: ["sxl"], handler: null, isDefault: true }, { key: "CSV", description: "Comma Delimited", mimeType: "text/csv", exts: ["csv"], handler: null }, { key: "Excel", description: "Excel Workbook", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", exts: ["xlsx", "xls", "xlsm"], handler: null }], Ei = [{ key: "SheetXL", mimeType: "application/vnd.sheetxl.sheet", description: "SheetXL", ext: "sxl", handler: null, isDefault: true }, { key: "CSV", mimeType: "text/csv", description: "Comma Delimited", ext: "csv", handler: null }, { key: "Excel", mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", description: "Excel Workbook", ext: "xlsx", tags: ["SheetJS Pro"], handler: null }];
|
|
2374
|
+
class Ai {
|
|
2375
|
+
constructor(e2 = Ni, t2 = Ei) {
|
|
2376
2376
|
this._readFormatType = [], this._writeFormatType = [], this._readFormatType = Object.freeze([...e2]), this._writeFormatType = Object.freeze([...t2]);
|
|
2377
2377
|
}
|
|
2378
2378
|
getReadFormats() {
|
|
@@ -2413,24 +2413,24 @@ class Ni {
|
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
2415
|
}
|
|
2416
|
-
const
|
|
2417
|
-
const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } =
|
|
2416
|
+
const Ii = new Ai(), Li = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a398_11", icons: "_icons_1a398_16", expand: "_expand_1a398_22", expandOpen: "_expandOpen_1a398_29", stackTraceContainer: "_stackTraceContainer_1a398_33" }, Hi = S((e2, t2) => {
|
|
2417
|
+
const { id: o2, message: n2, iconVariant: a2, error: r2, hideIconVariant: l2, ...i2 } = e2, { closeSnackbar: s2 } = er(), d2 = Sa(), [c2, m2] = D(false), p2 = v(() => {
|
|
2418
2418
|
m2((e3) => !e3);
|
|
2419
2419
|
}, []), u2 = v(() => {
|
|
2420
2420
|
s2(o2);
|
|
2421
2421
|
}, [o2, s2]);
|
|
2422
2422
|
let g2 = r2?.message;
|
|
2423
|
-
return !g2 && T(n2) && (g2 = n2), g2 || "string" != typeof n2 || (g2 = n2), g2 || (g2 = `Unknown Error: ${n2}`), x(
|
|
2423
|
+
return !g2 && T(n2) && (g2 = n2), g2 || "string" != typeof n2 || (g2 = n2), g2 || (g2 = `Unknown Error: ${n2}`), x(tr, { ref: t2, className: Hn(Li.root, "error-snackbar"), children: b(te, { className: Li.card, style: { backgroundColor: d2.palette.error.dark, border: `1px solid ${d2.palette.error.dark}` }, children: [b(oe, { className: Li.actionRoot, children: [l2 ? null : a2?.error, x(I, { variant: "body2", component: "div", className: Li.typography, children: g2 }), x("div", { style: { flex: "1 1 auto" } }), b("div", { className: Li.icons, children: [r2 ? x(L, { "aria-label": "Show more", size: "small", className: Hn(Li.expand, { [Li.expandOpen]: c2 }), onClick: p2, children: x(Xn, {}) }) : null, x(L, { size: "small", className: Li.expand, onClick: u2, children: x(Qn, { fontSize: "small" }) })] })] }), r2 ? x(ne, { in: c2, timeout: "auto", unmountOnExit: true, children: x("div", { className: Li.stackTraceContainer, style: { backgroundColor: d2.palette.error.light, borderTop: `1px solid ${d2.palette.error.main}` }, children: x(wn, { error: r2, hideLineNumbers: true }) }) }) : null] }) });
|
|
2424
2424
|
});
|
|
2425
|
-
|
|
2426
|
-
const
|
|
2427
|
-
const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, i2 =
|
|
2428
|
-
const t3 = { variant:
|
|
2425
|
+
Hi.displayName = "ToastError";
|
|
2426
|
+
const Wi = k(S((e2, t2) => {
|
|
2427
|
+
const { commands: o2, commandHook: n2, scope: a2 = "workbook", disabled: r2 = false, ...l2 } = e2, i2 = ra((e3) => {
|
|
2428
|
+
const t3 = { variant: aa.Menuitem, parentFloat: e3.floatReference, commandHook: n2, scope: a2, disabled: r2 }, l3 = b(y, { children: [x(le, { ...t3, command: o2.getCommand("newWorkbook"), icon: re(x(kn, {})) }), x(ie, { orientation: "horizontal" }), x(le, { ...t3, command: o2.getCommand("openWorkbook"), icon: re(x(Sn, {})) }), x(me, { ...t3, commands: o2, quickCommand: "saveWorkbook", icon: re(x(Tn, {})), createPopupPanel: (e4) => {
|
|
2429
2429
|
const n3 = { ...t3, parentFloat: e4.floatReference, scope: "saveWorkbook" }, a3 = [];
|
|
2430
|
-
return
|
|
2430
|
+
return Ii.getWriteFormats().forEach((e5) => {
|
|
2431
2431
|
if (e5.isDefault) return;
|
|
2432
2432
|
let t4 = null;
|
|
2433
|
-
"CSV" === e5.key ? t4 = re(x(
|
|
2433
|
+
"CSV" === e5.key ? t4 = re(x(Cn, {})) : "Excel" === e5.key && (t4 = re(x(vn, {})));
|
|
2434
2434
|
const r3 = o2.getCommand(`saveWorkbookAs${e5.key}`);
|
|
2435
2435
|
r3 ? a3.push(F(le, { ...n3, key: e5.key, command: r3, icon: t4 })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${e5.key}'`);
|
|
2436
2436
|
}), ce({ ...e4, children: a3, onClick: () => {
|
|
@@ -2443,35 +2443,35 @@ const Li = k(S((e2, t2) => {
|
|
|
2443
2443
|
}, [r2, o2, n2, a2]), s2 = "File";
|
|
2444
2444
|
return x(me, { 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: x(ht, { className: "label", icon: null, label: s2 }) });
|
|
2445
2445
|
}));
|
|
2446
|
-
|
|
2447
|
-
const
|
|
2446
|
+
Wi.displayName = "StandaloneFileCommandButton";
|
|
2447
|
+
const zi = x(Le, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: x(A, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: x($a, { onClick: () => {
|
|
2448
2448
|
window?.open("https://www.sheetxl.com", "_blank");
|
|
2449
|
-
}, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }),
|
|
2450
|
-
const { commands: o2, workbook: n2, logo: a2 =
|
|
2449
|
+
}, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), $i = k(S((e2, t2) => {
|
|
2450
|
+
const { commands: o2, workbook: n2, logo: a2 = zi, mainElement: r2, showFileMenu: l2 = true, showAppearanceMenu: i2 = true, ...s2 } = e2, { reference: d2 } = bo(), [c2, { width: m2 }] = Xa(), p2 = m2 < 530, u2 = l2 ? x(Wi, { commands: o2, commandHook: { beforeExecute() {
|
|
2451
2451
|
d2?.closeAll();
|
|
2452
2452
|
}, onError(e3, t3, o3) {
|
|
2453
|
-
} } }) : null, g2 = i2 ? x(
|
|
2453
|
+
} } }) : null, g2 = i2 ? x(pl, { commands: o2, commandHook: { beforeExecute() {
|
|
2454
2454
|
d2?.closeAll();
|
|
2455
2455
|
}, onError(e3, t3, o3) {
|
|
2456
2456
|
} } }) : null, h2 = C(() => ({ paddingLeft: (e3) => e3.spacing(1), paddingRight: (e3) => e3.spacing(1) }), []), f2 = M(null);
|
|
2457
|
-
return x(A, { ref:
|
|
2457
|
+
return x(A, { ref: Ua([f2, c2, t2]), ...s2, children: ni({ commands: o2, renderCompact: p2, workbook: n2, selectWrapper: (e3) => b(A, { 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: [b(A, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (e4) => e4.spacing(0.5) }, children: [a2, b(A, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (e4) => e4.spacing(0.25) }, children: [u2, e3] })] }), x(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: r2 }), x(A, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: p2 && !g2 ? "0 0 auto" : "1 1 100%" }, children: g2 })] }), selectProps: h2, toolbarsProps: { Home: { sx: {} } } }) });
|
|
2458
2458
|
}));
|
|
2459
|
-
|
|
2460
|
-
const
|
|
2461
|
-
const { workbook: o2, setWorkbook: n2, refWorkbookTitle: a2, titleWorkbook: r2, setWorkbookTitle: l2, titlePlaceHolder: i2, children: s2, undoManager: d2, commands: c2, importExportDisabled: m2, themeOptions: p2 } = e2, u2 =
|
|
2459
|
+
$i.displayName = "StudioToolbar";
|
|
2460
|
+
const Oi = k(S((e2, t2) => {
|
|
2461
|
+
const { workbook: o2, setWorkbook: n2, refWorkbookTitle: a2, titleWorkbook: r2, setWorkbookTitle: l2, titlePlaceHolder: i2, children: s2, undoManager: d2, commands: c2, importExportDisabled: m2, themeOptions: p2 } = e2, u2 = er(), g2 = u2 ? u2.enqueueSnackbar : () => {
|
|
2462
2462
|
}, h2 = u2 ? u2.closeSnackbar : () => {
|
|
2463
2463
|
}, [f2, k2] = D({ isMounted: false, label: null, starting: /* @__PURE__ */ new Map(), running: /* @__PURE__ */ new Map() }), S2 = v(() => {
|
|
2464
2464
|
k2((e3) => ({ ...e3, isMounted: true }));
|
|
2465
2465
|
}, []), T2 = v(() => {
|
|
2466
2466
|
k2((e3) => ({ ...e3, isMounted: false }));
|
|
2467
|
-
}, []), R2 = {}, F2 =
|
|
2467
|
+
}, []), R2 = {}, F2 = Mn(R2), B2 = Fn(R2), N2 = Bn(R2), E2 = M(/* @__PURE__ */ new Set()), A2 = C(() => {
|
|
2468
2468
|
const e3 = (e4, t3) => {
|
|
2469
2469
|
if (t3?.onceKey) {
|
|
2470
2470
|
if (E2.current.has(t3.onceKey)) return;
|
|
2471
2471
|
const e5 = new Set(E2.current);
|
|
2472
2472
|
e5.add(t3.onceKey), E2.current = e5;
|
|
2473
2473
|
}
|
|
2474
|
-
const o3 = { variant: t3?.type ??
|
|
2474
|
+
const o3 = { variant: t3?.type ?? ma.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: t3?.preventDuplicate, persist: t3?.persist ?? t3?.type === ma.Error, action: (e5) => x(L, { onClick: () => h2(e5), children: x(oa, {}) }) };
|
|
2475
2475
|
t3?.enqueueProps && Object.assign(o3, t3.enqueueProps), e4 || console.log("message is 'null'", t3), g2(e4 ?? "Alert", o3);
|
|
2476
2476
|
};
|
|
2477
2477
|
return { showMessage: e3, showBusy: (e4, t3) => {
|
|
@@ -2488,44 +2488,44 @@ const zi = k(S((e2, t2) => {
|
|
|
2488
2488
|
const n3 = { ...t3, onKeyDown: (e5) => {
|
|
2489
2489
|
c2?.dispatchToFocusedCommand(e5), e5.isDefaultPrevented() || e5.isPropagationStopped() || t3?.onKeyDown?.(e5);
|
|
2490
2490
|
} };
|
|
2491
|
-
return F2(e4, { sort: () => import("./
|
|
2491
|
+
return F2(e4, { sort: () => import("./B602KxC_3fiNFPpe.mjs"), numberFormat: () => import("./CxVrmF0K2K6ftKzV.mjs"), hyperlink: () => import("./tiKem60RN2pWD1NY.mjs"), comments: () => import("./CeUhT8vbhB5VHd6-.mjs"), find: () => import("./BpQiLxP8DQDmrHtY.mjs"), tableDetails: () => import("./D4ujfc4Ugqcdqzg1.mjs"), tableNew: () => import("./D7s8wJBpX6SKSl76.mjs"), namedDetails: () => import("./DzzBNKNsbkuloUVy.mjs") }[e4], n3, o3);
|
|
2492
2492
|
}, showOptions: B2, showInputOptions: N2, showError: (t3) => {
|
|
2493
|
-
let o3, n3 =
|
|
2494
|
-
"string" == typeof t3 ? a3 = t3 : t3 instanceof Error && (o3 = t3, t3.message && (a3 = t3.message)), t3 instanceof
|
|
2493
|
+
let o3, n3 = ma.Error, a3 = "Unknown Error";
|
|
2494
|
+
"string" == typeof t3 ? a3 = t3 : t3 instanceof Error && (o3 = t3, t3.message && (a3 = t3.message)), t3 instanceof qa && (n3 = ma.Info), e3(a3, { type: n3, enqueueProps: { error: o3 } });
|
|
2495
2495
|
} };
|
|
2496
2496
|
}, []), I2 = v(() => {
|
|
2497
2497
|
}, []), H2 = ((e3) => {
|
|
2498
|
-
const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, notifier: l3, requestWorkbookTitle: i3, themeOptions: s3, undoManager: d3, commands: c3, onExecute: m3 } = e3, p3 =
|
|
2498
|
+
const { workbook: t3, setWorkbook: o3, importExportDisabled: n3, workbookTitle: a3 = "export", setWorkbookTitle: r3, notifier: l3, requestWorkbookTitle: i3, themeOptions: s3, undoManager: d3, commands: c3, onExecute: m3 } = e3, p3 = ra(s3?.onModeChange, [s3?.onModeChange]), u3 = ra(s3?.onEnabledDarkGridChange, [s3?.onEnabledDarkGridChange]), g3 = ra(s3?.onEnabledDarkImagesChange, [s3?.onEnabledDarkImagesChange]), h3 = ra(async (e4 = null, t4 = null) => {
|
|
2499
2499
|
const o4 = [];
|
|
2500
2500
|
let n4, a4 = null, r4 = null;
|
|
2501
|
-
if ("string" == typeof e4 ? r4 = e4 : a4 = e4, n4 = a4 ? e4 : await
|
|
2501
|
+
if ("string" == typeof e4 ? r4 = e4 : a4 = e4, n4 = a4 ? e4 : await ja.openFileDialog(r4 ?? Ii.getAllReadFormatTypeAsString().join(",")), !n4) return null;
|
|
2502
2502
|
const i4 = { source: n4, createWorkbookOptions: t4, onWarning: (e5) => {
|
|
2503
2503
|
o4.push(e5);
|
|
2504
|
-
} }, s4 = await
|
|
2504
|
+
} }, s4 = await Ii.read(i4, l3);
|
|
2505
2505
|
return o4.length > 0 && (l3?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn("Import warnings:\n" + o4.join("\n"))), s4;
|
|
2506
|
-
}, [m3, l3, t3]), f3 =
|
|
2506
|
+
}, [m3, l3, t3]), f3 = ra(async (e4, t4, o4) => {
|
|
2507
2507
|
if (!t4 && i3) {
|
|
2508
2508
|
const t5 = await i3("Enter Workbook name to " + (o4.isDefault ? "Save." : `Export as ${o4.description}.`));
|
|
2509
|
-
return null !== t5 &&
|
|
2509
|
+
return null !== t5 && Ii.writeFile(t5, e4, { formatType: o4.key });
|
|
2510
2510
|
}
|
|
2511
|
-
return
|
|
2511
|
+
return Ii.writeFile(t4, e4, { formatType: o4.key });
|
|
2512
2512
|
}, [l3, t3, i3]), x2 = v(() => ({ contains: (e4) => true, focus() {
|
|
2513
2513
|
} }), []), b2 = C(() => {
|
|
2514
2514
|
const e4 = [];
|
|
2515
|
-
n3 || (
|
|
2515
|
+
n3 || (Ii.getWriteFormats().forEach((o4) => {
|
|
2516
2516
|
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}`}.` };
|
|
2517
|
-
n4 && (r4.shortcut = { key: "S", modifiers: [
|
|
2517
|
+
n4 && (r4.shortcut = { key: "S", modifiers: [xa.Ctrl] }, e4.push(new fa("saveWorkbookAs", x2, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [xa.Shift, xa.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
|
|
2518
2518
|
f3(t3, null, o4).catch((e5) => {
|
|
2519
2519
|
l3?.showError?.(e5);
|
|
2520
2520
|
});
|
|
2521
2521
|
})));
|
|
2522
2522
|
const i5 = n4 ? "saveWorkbook" : `saveWorkbookAs${o4.key}`;
|
|
2523
|
-
e4.push(new
|
|
2523
|
+
e4.push(new fa(i5, x2, r4, (e5) => {
|
|
2524
2524
|
f3(t3, e5 ?? a3, o4).catch((e6) => {
|
|
2525
2525
|
l3?.showError?.(e6);
|
|
2526
2526
|
});
|
|
2527
2527
|
}));
|
|
2528
|
-
}), e4.push(new
|
|
2528
|
+
}), e4.push(new fa("openWorkbook", x2, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [xa.Ctrl] } }, async (e5 = null) => {
|
|
2529
2529
|
const n4 = { date1904: t3.isDate1904(), ...t3.options };
|
|
2530
2530
|
try {
|
|
2531
2531
|
const a4 = await h3(e5, n4);
|
|
@@ -2543,7 +2543,7 @@ const zi = k(S((e2, t2) => {
|
|
|
2543
2543
|
} catch (e6) {
|
|
2544
2544
|
l3?.showError?.(e6);
|
|
2545
2545
|
}
|
|
2546
|
-
})), e4.push(new
|
|
2546
|
+
})), e4.push(new fa("openWorkbookFromUrl", x2, { label: "Open Workbook From Web", scopedLabels: { insert: "From Web", workbook: "From Web…" }, description: "Open a workbook from the web." }, async function(e5) {
|
|
2547
2547
|
if (!e5) {
|
|
2548
2548
|
const t4 = await l3?.showInputOptions?.({ title: "Open Workbook from the Web", description: "Enter the web address for the workbook to open.", inputLabel: "Address", initialValue: "https://www.sheetxl.com/examples/features-checklist.xlsx", inputProps: { style: { minWidth: "440px" } }, options: ["Open"] });
|
|
2549
2549
|
if ("Open" !== t4.option) return;
|
|
@@ -2552,28 +2552,28 @@ const zi = k(S((e2, t2) => {
|
|
|
2552
2552
|
e5 && console.log("openWorkbookFromUrl", e5);
|
|
2553
2553
|
})));
|
|
2554
2554
|
let i4 = [];
|
|
2555
|
-
return s3 && (i4 = [new
|
|
2556
|
-
}), new
|
|
2557
|
-
}), new
|
|
2555
|
+
return s3 && (i4 = [new fa("themeMode", x2, { label: "Light/Dark Mode", scopedLabels: { appearance: "Light/Dark Mode" }, description: "Toggle the application styling between light and dark mode." }), new fa("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 fa("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 fa("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, ...i4, new ha("help", x2, { label: "Show Help", description: "Provide Help.", shortcut: { key: "F1" } }, () => {
|
|
2556
|
+
}), new ha("showKeyboardShortcuts", x2, { label: "Keyboard Shortcuts", description: "Show keyboard shortcuts.", shortcut: { key: "/", modifiers: [xa.Ctrl] } }, () => {
|
|
2557
|
+
}), new fa("gotoUrlGithub", x2, { label: "Github", description: "Download examples, explore source code, and leave a star." }, () => {
|
|
2558
2558
|
window?.open("https://github.com/sheetxl/sheetxl");
|
|
2559
|
-
}), new
|
|
2559
|
+
}), new fa("gotoUrlDiscord", x2, { label: "Discord", description: "Join our community on discord." }, () => {
|
|
2560
2560
|
window?.open("https://discord.gg/NTKdwUgK9p");
|
|
2561
|
-
}), new
|
|
2561
|
+
}), new fa("gotoUrlDocumentation", x2, { label: "Documentation", description: "Read the documentation." }, () => {
|
|
2562
2562
|
window?.open("https://www.sheetxl.com/docs");
|
|
2563
|
-
}), new
|
|
2563
|
+
}), new fa("gotoUrlIssue", x2, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
|
|
2564
2564
|
window?.open("https://github.com/sheetxl/sheetxl/issues");
|
|
2565
2565
|
})];
|
|
2566
2566
|
}, [t3, a3, l3, n3, s3, c3, d3]), y2 = C(() => {
|
|
2567
2567
|
let e4 = null;
|
|
2568
|
-
return e4 = c3 ? c3.createChildGroup(x2, "standaloneWorkbook", false) : new
|
|
2568
|
+
return e4 = c3 ? c3.createChildGroup(x2, "standaloneWorkbook", false) : new ba(x2, "standaloneWorkbook"), e4.addCommands(b2, true), e4;
|
|
2569
2569
|
}, [c3, b2]);
|
|
2570
|
-
|
|
2571
|
-
const { themeMode: k3 } =
|
|
2570
|
+
ka({ manager: d3, commands: y2, notifier: l3 });
|
|
2571
|
+
const { themeMode: k3 } = Dn();
|
|
2572
2572
|
P(() => {
|
|
2573
2573
|
if (!s3 || !y2) return;
|
|
2574
2574
|
const e4 = "dark" === s3.mode || !s3.mode && "dark" === k3;
|
|
2575
2575
|
y2.getCommand("themeMode").update({ state: s3.mode ?? null, label: e4 ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: e4 ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
|
|
2576
|
-
p3(e4 ?
|
|
2576
|
+
p3(e4 ? Pn.Light : Pn.Dark);
|
|
2577
2577
|
}), y2.getCommand("defaultThemeMode").update({ state: !s3.mode }).updateCallback(() => {
|
|
2578
2578
|
p3(null);
|
|
2579
2579
|
}), y2.getCommand("enableDarkGrid").update({ state: s3.enableDarkGrid }).updateCallback(() => {
|
|
@@ -2582,10 +2582,10 @@ const zi = k(S((e2, t2) => {
|
|
|
2582
2582
|
g3(!s3.enableDarkImages);
|
|
2583
2583
|
});
|
|
2584
2584
|
}, [k3, s3, b2]);
|
|
2585
|
-
const { showModal: S3 } =
|
|
2585
|
+
const { showModal: S3 } = Rn();
|
|
2586
2586
|
return P(() => {
|
|
2587
2587
|
const e4 = () => new Promise((e5, t4) => {
|
|
2588
|
-
const o4 = w.lazy(() => import("./
|
|
2588
|
+
const o4 = w.lazy(() => import("./Dts5yAtSO_1mPq94.mjs")), n4 = S3(o4, { title: "Shortcut Keys Reference", commands: y2, onDone: () => {
|
|
2589
2589
|
n4.hide();
|
|
2590
2590
|
}, TransitionProps: { onExited: () => {
|
|
2591
2591
|
e5(true);
|
|
@@ -2616,20 +2616,20 @@ const zi = k(S((e2, t2) => {
|
|
|
2616
2616
|
}, [f2]);
|
|
2617
2617
|
const [W2, z2] = D(null);
|
|
2618
2618
|
P(() => {
|
|
2619
|
-
0 !== f2.starting.size || 0 !== f2.running.size ? z2(x(Pe, { icon: x(
|
|
2619
|
+
0 !== f2.starting.size || 0 !== f2.running.size ? z2(x(Pe, { icon: x(Nn, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: true, label: f2.label, onMount: S2, onUnmount: T2, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : z2(null);
|
|
2620
2620
|
}, [f2.starting, f2.running]);
|
|
2621
|
-
const $2 = C(() => x(
|
|
2621
|
+
const $2 = C(() => x(ul, { commands: H2, disableHover: true, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [H2]), O2 = { notifier: A2, commands: H2 };
|
|
2622
2622
|
return o2 && (O2.statusBarProps = { childrenEnd: $2 }), b(y, { children: [W2, s2 ? w.cloneElement(s2, O2) : null] });
|
|
2623
2623
|
}));
|
|
2624
|
-
|
|
2625
|
-
const
|
|
2626
|
-
const { className: o2, sx: n2, style: a2, onElementLoad: r2, onError: l2, undoManager: i2, errorPanel: s2 =
|
|
2624
|
+
Oi.displayName = "SnackbarAndCommandsWrapper";
|
|
2625
|
+
const Vi = k(S((e2, t2) => {
|
|
2626
|
+
const { className: o2, sx: n2, style: a2, onElementLoad: r2, onError: l2, undoManager: i2, errorPanel: s2 = En, onKeyDown: d2, workbook: c2, createWorkbookOptions: m2, onWorkbookChange: p2, logo: u2, importExportDisabled: g2 = false, themeOptions: f2, autoFocus: y2 = false, commands: w2, title: k2, onTitleChange: S2, titleProps: T2, renderLoadingPanel: R2, ...F2 } = e2, B2 = M(null), N2 = ra(p2, [p2]), I2 = ra(S2 ?? T2?.onTitleChange, [S2 ?? T2?.onTitleChange]), L2 = T2?.placeHolder ?? "Untitled", H2 = f2?.mode, { themeMode: W2, source: z2 } = Dn({ mode: H2 }), O2 = C(() => ({ ...f2, light: An(false, ja.deepMerge(f2?.theme ?? {}, f2?.light ?? {})), dark: An(true, ja.deepMerge(f2?.theme ?? {}, f2?.dark ?? {})) }), [f2]), V2 = W2 === Pn.Dark, [G2, U2] = D(null);
|
|
2627
2627
|
P(() => {
|
|
2628
|
-
U2(i2 ?? new
|
|
2628
|
+
U2(i2 ?? new Ka());
|
|
2629
2629
|
}, [i2]);
|
|
2630
|
-
const [j2, _2] = D(null), [q2, K2] = D(null), X2 =
|
|
2630
|
+
const [j2, _2] = D(null), [q2, K2] = D(null), X2 = Ea();
|
|
2631
2631
|
E(() => {
|
|
2632
|
-
if (!c2 || 0 === Object.keys(c2).length && !
|
|
2632
|
+
if (!c2 || 0 === Object.keys(c2).length && !ja.isPromiseLike(c2)) {
|
|
2633
2633
|
const e3 = { theme: X2.getDefaultTheme(), ...m2 };
|
|
2634
2634
|
K2(new h(e3));
|
|
2635
2635
|
} else K2(c2);
|
|
@@ -2639,7 +2639,7 @@ const $i = k(S((e2, t2) => {
|
|
|
2639
2639
|
(async () => {
|
|
2640
2640
|
try {
|
|
2641
2641
|
let e3, t3 = await Promise.resolve(q2);
|
|
2642
|
-
t3 && t3.source && (t3 = await
|
|
2642
|
+
t3 && t3.source && (t3 = await Ii.read(t3)), t3.workbook ? (ee2(t3.title), e3 = t3.workbook) : e3 = t3, N2?.(e3), _2({ workbook: e3 });
|
|
2643
2643
|
} catch (e3) {
|
|
2644
2644
|
N2?.(null), _2({ error: e3 });
|
|
2645
2645
|
}
|
|
@@ -2657,7 +2657,7 @@ const $i = k(S((e2, t2) => {
|
|
|
2657
2657
|
}) }) : console.warn("commit has no description", t3);
|
|
2658
2658
|
} });
|
|
2659
2659
|
}, [G2, j2, Z2]);
|
|
2660
|
-
const Y2 =
|
|
2660
|
+
const Y2 = ra((e3) => {
|
|
2661
2661
|
e3 ? G2.setRepeatableOperation({ description: e3.label(), repeat: async () => e3.execute() }) : G2.setRepeatableOperation(null);
|
|
2662
2662
|
}, [G2]), [Q2, ee2] = D(k2 ?? T2?.title ?? "");
|
|
2663
2663
|
P(() => {
|
|
@@ -2668,8 +2668,8 @@ const $i = k(S((e2, t2) => {
|
|
|
2668
2668
|
const [te2, oe2] = D(null), ne2 = C(() => {
|
|
2669
2669
|
const e3 = () => ({ contains: (e4) => true, focus() {
|
|
2670
2670
|
} });
|
|
2671
|
-
return w2 ? w2.createChildGroup(e3, "application", false) : new
|
|
2672
|
-
}, [w2]), re2 =
|
|
2671
|
+
return w2 ? w2.createChildGroup(e3, "application", false) : new ba(e3, "application");
|
|
2672
|
+
}, [w2]), re2 = ra((e3) => {
|
|
2673
2673
|
oe2(e3.source.getViewportElement()), J2(e3), ne2.activate("sheet"), r2?.(e3);
|
|
2674
2674
|
}, [ne2]);
|
|
2675
2675
|
P(() => {
|
|
@@ -2677,9 +2677,9 @@ const $i = k(S((e2, t2) => {
|
|
|
2677
2677
|
}, [Z2]);
|
|
2678
2678
|
const le2 = M(null), ie2 = v((e3) => {
|
|
2679
2679
|
let t3 = null;
|
|
2680
|
-
return T2?.hidden || (t3 = x(
|
|
2680
|
+
return T2?.hidden || (t3 = x(Fi, { ...T2, style: { maxWidth: "100%", ...T2?.style }, workbook: B2.current, ref: le2, title: Q2, placeHolder: L2, onTitleChange: (e4) => {
|
|
2681
2681
|
ee2(e4);
|
|
2682
|
-
} })), x(
|
|
2682
|
+
} })), x($i, { ...e3, logo: u2, mainElement: t3, showFileMenu: !g2, showAppearanceMenu: !!(O2?.onEnabledDarkGridChange || O2?.onEnabledDarkImagesChange || O2?.onModeChange) });
|
|
2683
2683
|
}, [u2, Q2, T2, O2, g2, ne2]);
|
|
2684
2684
|
P(() => {
|
|
2685
2685
|
const e3 = (e4) => e4.preventDefault();
|
|
@@ -2690,98 +2690,98 @@ const $i = k(S((e2, t2) => {
|
|
|
2690
2690
|
const se2 = C(() => {
|
|
2691
2691
|
const e3 = { transparentBackground: true };
|
|
2692
2692
|
return x(A, { sx: n2, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...a2 }, children: R2?.(e3) ?? x(Pe, { ...e3 }) });
|
|
2693
|
-
}, [n2, a2, R2]), de2 = v(({ error: e3 }) => (l2?.(e3), x(s2, { sx: n2, style: a2, error: e3 ?? "Unable to display empty workbook." })), [n2, a2, l2]), ce2 = C(() => ({ ...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]), me2 =
|
|
2693
|
+
}, [n2, a2, R2]), de2 = v(({ error: e3 }) => (l2?.(e3), x(s2, { sx: n2, style: a2, error: e3 ?? "Unable to display empty workbook." })), [n2, a2, l2]), ce2 = C(() => ({ ...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]), me2 = Ua([B2, t2]), pe2 = C(() => {
|
|
2694
2694
|
if (!j2) return se2;
|
|
2695
2695
|
if (j2.error || !j2.workbook) return de2({ error: j2.error });
|
|
2696
2696
|
let e3 = null, t3 = null, n3 = false;
|
|
2697
|
-
return O2 && (e3 = V2 ? O2.dark : O2.light, t3 = V2 && O2.enableDarkGrid ? O2.dark : O2.light, n3 = O2.enableDarkImages), x(
|
|
2697
|
+
return O2 && (e3 = V2 ? O2.dark : O2.light, t3 = V2 && O2.enableDarkGrid ? O2.dark : O2.light, n3 = O2.enableDarkImages), x(Ri, { sx: ce2, style: a2, tabIndex: 0, autoFocus: true, workbook: j2.workbook, ref: me2, renderToolbar: ie2, onElementLoad: re2, onRepeatCommandChange: Y2, onKeyDown: (e4) => {
|
|
2698
2698
|
d2?.(e4);
|
|
2699
|
-
}, renderLoadingPanel: R2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, className:
|
|
2699
|
+
}, renderLoadingPanel: R2, gridTheme: t3, headersTheme: e3, enableDarkImages: n3, className: Hn(o2, "sheetxl-workbook"), onContextMenu: (e4) => e4.preventDefault(), ...F2 }, "WorkbookElement");
|
|
2700
2700
|
}, [j2, Q2, G2, se2, R2, O2, F2, ie2, ce2]);
|
|
2701
|
-
let ue2 = x(
|
|
2701
|
+
let ue2 = x(Qa, { fallbackRender: de2, children: x(or, { maxSnack: 3, domRoot: te2, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (e3, t3, o3) => {
|
|
2702
2702
|
B2.current?.focus();
|
|
2703
|
-
}, Components: { error:
|
|
2704
|
-
return O2 && (ue2 = b(
|
|
2703
|
+
}, Components: { error: Hi }, iconVariant: { success: x($, { style: { marginRight: "8px" }, children: x("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: x(Ln, { style: { marginRight: "8px" } }) }, children: x(In, { children: x(Oi, { workbook: j2?.workbook, setWorkbook: K2, importExportDisabled: g2, titlePlaceHolder: L2, titleWorkbook: Q2, setWorkbookTitle: ee2, refWorkbookTitle: le2, commands: ne2, undoManager: G2, themeOptions: O2, children: pe2 }) }) }) });
|
|
2704
|
+
return O2 && (ue2 = b(Ta, { theme: V2 ? O2.dark : O2.light, children: [O2.cssBaseline ? x(ae, {}) : null, ue2] })), ue2;
|
|
2705
2705
|
}));
|
|
2706
|
-
|
|
2707
|
-
const
|
|
2706
|
+
Vi.displayName = "EagerStudio";
|
|
2707
|
+
const Gi = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: Vi, default: Vi }, Symbol.toStringTag, { value: "Module" }));
|
|
2708
2708
|
export {
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2709
|
+
pl as AppearanceCommandButton,
|
|
2710
|
+
sr as AutoColorPosition,
|
|
2711
|
+
Dr as BorderCommandButton,
|
|
2712
|
+
Tr as BorderPopupButton,
|
|
2713
|
+
vr as BorderStyleButton,
|
|
2714
|
+
pr as C,
|
|
2715
|
+
Er as ClearCommandButton,
|
|
2716
|
+
gr as ColorButton,
|
|
2717
|
+
Hr as ColorCommandButton,
|
|
2718
|
+
yr as ColorPanel,
|
|
2719
|
+
ir as ColorPanelType,
|
|
2720
|
+
kr as ColorPopupButton,
|
|
2721
|
+
Lr as DeleteCellsCommandButton,
|
|
2722
|
+
ml as DocThemeCommandButton,
|
|
2723
|
+
Vi as EagerStudio,
|
|
2724
|
+
Ar as FillCommandButton,
|
|
2725
|
+
Ml as FilterColumnMenu,
|
|
2726
|
+
$r as FilterCommandButton,
|
|
2727
|
+
Fl as Filters,
|
|
2728
|
+
Mr as FindCommandButton,
|
|
2729
|
+
Ur as FontFamilyCommandButton,
|
|
2730
|
+
Fr as FontSizeCommandButton,
|
|
2731
|
+
Rl as FormulaBar,
|
|
2732
|
+
Rr as FreezeCommandButton,
|
|
2733
|
+
ul as HelpCommandButton,
|
|
2734
|
+
nr as HorizontalAlignCommandButton,
|
|
2735
|
+
Ir as InsertCellsCommandButton,
|
|
2736
|
+
yl as InsertFunctionCommandPopupButton,
|
|
2737
|
+
fl as InsertFunctionSumCommandPopupButton,
|
|
2738
|
+
gl as InsertImageCommandButton,
|
|
2739
|
+
ql as InsertScriptCommandButton,
|
|
2740
2740
|
LicenseManager,
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2741
|
+
Pr as MergeCommandButton,
|
|
2742
|
+
Dl as NamedCollectionEditor,
|
|
2743
|
+
kl as NamedInput,
|
|
2744
|
+
Nr as NumberFormatCommandButton,
|
|
2745
|
+
qr as PasteCommandButton,
|
|
2746
|
+
Yr as PresetCellStylesCommandButton,
|
|
2747
|
+
ll as PresetTableStylesCommandButton,
|
|
2748
|
+
Cl as RangeInput,
|
|
2749
|
+
Ql as RunScriptCommandButton,
|
|
2750
|
+
Kl as ScriptEditorToolbar,
|
|
2751
|
+
Jl as ScriptWorkspace,
|
|
2752
|
+
Bl as SheetTab,
|
|
2753
|
+
Nl as SheetTabMenu,
|
|
2754
|
+
vl as SheetZoomScale,
|
|
2755
|
+
El as SheetsAllMenu,
|
|
2756
|
+
zr as SortFilterCommandButton,
|
|
2757
|
+
Tl as StatusBar,
|
|
2758
|
+
Bi as Studio,
|
|
2759
|
+
Cr as StyledStrokeIcon,
|
|
2760
|
+
nl as TableStyleCanvasPreview,
|
|
2761
|
+
al as TableStyleOptionsPanel,
|
|
2762
|
+
tl as TableStylePreview,
|
|
2763
|
+
jr as TextEffectsCommandButton,
|
|
2764
|
+
rr as TextOverflowCommandButton,
|
|
2765
|
+
lr as TextRotateCommandButton,
|
|
2766
|
+
sl as ThemeSelectButton,
|
|
2767
|
+
dl as ThemeSelectPanel,
|
|
2768
|
+
cl as ThemeSelectPopupButton,
|
|
2769
|
+
_r as UnderlineCommandButton,
|
|
2770
|
+
Or as UndoRedoCommandButton,
|
|
2771
|
+
ar as VerticalAlignCommandButton,
|
|
2772
|
+
Wr as ViewGridLinesCommandButton,
|
|
2773
|
+
Kr as ViewHeadingsCommandButton,
|
|
2774
|
+
hl as WalkingCopyCommandButton,
|
|
2775
|
+
fi as WorkbookContextMenu,
|
|
2776
|
+
Ri as WorkbookElement,
|
|
2777
|
+
Ii as WorkbookIO,
|
|
2778
|
+
hi as WorkbookStrip,
|
|
2779
|
+
Fi as WorkbookTitle,
|
|
2780
|
+
Xr as WorkbookViewCommandButton,
|
|
2781
|
+
Ai as _WorkbookIO,
|
|
2782
|
+
$l as createGridStyleFromMUITheme,
|
|
2783
|
+
Bi as default,
|
|
2784
|
+
di as defaultNewWorkbook,
|
|
2785
|
+
Wl as setPrintExamplesOnLoad,
|
|
2786
|
+
si as useWorkbookCommands
|
|
2787
2787
|
};
|