@sheetxl/studio-mui 0.6.7 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/cjs/{CG7Z-lZAq5czFOc4.cjs → BK-SPf2iAdtY2v2r.cjs} +2 -2
- package/browser/cjs/{DmM-DjGh015RZXzh.cjs → BMUK7WDOHjdCTlnL.cjs} +2 -2
- package/browser/cjs/{CRAcvjlcqcZK3WEL.cjs → Bo0KAIoyc8wjrX0Z.cjs} +9 -9
- package/browser/cjs/{0lIBM05Oo-mPaz-z.cjs → CybaPr_tDqBYYm7l.cjs} +1 -1
- package/browser/cjs/{dW-tltmR8b4Fnr8g.cjs → D11dQP9ASVFsBy2m.cjs} +1 -1
- package/browser/cjs/{BaMk9jpFcmdBLRiR.cjs → DQUtpkYC0M_fQv5_.cjs} +1 -1
- package/browser/cjs/{BOqCECEhgUXx-4kI.cjs → DSWZ0c6YrATHKT05.cjs} +2 -2
- package/browser/cjs/{aiA3IvXgAikOrMwA.cjs → Dy8tMdAvieDNFyNN.cjs} +1 -1
- package/browser/cjs/{CCynZK017xahlNmi.cjs → LeRvKTH-iRno1m6n.cjs} +3 -3
- package/browser/cjs/{U3YgQ0fN5bvp9-Kq.cjs → NYv7o9QPsXmI71mF.cjs} +2 -2
- package/browser/cjs/{CtkBZTjdHqYp7xft.cjs → P_MTTr3k6LbqArTi.cjs} +1 -1
- package/browser/cjs/{5JvwHMk_pfEj4cZH.cjs → StodJUERc9sXjDM3.cjs} +2 -2
- package/browser/cjs/index.cjs +2 -2
- package/browser/esm/{he9qd0KA2ONjy_rM.mjs → 5ec1MS8QFxg_wTk6.mjs} +3 -3
- package/browser/esm/{COc-f5ehGeQiPNRP.mjs → 7bB6IyFR78AK_xsc.mjs} +2 -2
- package/browser/esm/{Ck2WRaGuINSXU-Ds.mjs → BrkDPL7uUPTUnJf1.mjs} +2 -2
- package/browser/esm/{BxFzIKTovnlqjZa-.mjs → C-SjjwB782n9nBYJ.mjs} +1 -1
- package/browser/esm/{DnJZFwOGICYRq_KW.mjs → CQdHuWRKrc46Ov6t.mjs} +1 -1
- package/browser/esm/{MgTnV8wS66lhumxT.mjs → CjX3_GVACz2x1KDj.mjs} +696 -694
- package/browser/esm/{C9vgT92BfuOKSqpB.mjs → CkNOojlllvYRHHW-.mjs} +1 -1
- package/browser/esm/{C1aztXQ58ekuzis6.mjs → D0-6I_5PCSF8a7L7.mjs} +1 -1
- package/browser/esm/index.mjs +2 -2
- package/browser/esm/{DVbgcz-P2Z8D_yei.mjs → oJGEc64Ccgag_PQZ.mjs} +2 -2
- package/browser/esm/{EmQd5txQ_ErHLAeT.mjs → q6UgUqJldJL6n2-x.mjs} +2 -2
- package/browser/esm/{Dcag5-NLJslhyfpE.mjs → q8P-1V6WnCy4m7sv.mjs} +2 -2
- package/browser/esm/{_08whbc3oA7BY_S7.mjs → qGhUWftd5xiC-hxc.mjs} +1 -1
- package/node/esm/{CHNFCXGADLFVCwYo.mjs → BTK5i03GS-FeY98T.mjs} +1 -1
- package/node/esm/{DESr6vZQNH2lHWZ9.mjs → BTkpV3euK14xAUB8.mjs} +1 -1
- package/node/esm/{BfPfvgdZrUoZvEme.mjs → BVBW-cMRTjK6KVFg.mjs} +1 -1
- package/node/esm/{BAHfO9ALnEUni4Ts.mjs → BYoYizxJTZD7MEGg.mjs} +1 -1
- package/node/esm/{IID7UVIiXTHvqYHK.mjs → BqgO5jB5pGXA3Hk4.mjs} +1 -1
- package/node/esm/{Cgxo3ZcSke1eBYVG.mjs → CLc5xV4p8QWx-rjD.mjs} +1 -1
- package/node/esm/{DhN2m_4WFHDBADx-.mjs → CNeOpyGVrqmfLHyT.mjs} +1 -1
- package/node/esm/{Ciwkv8DXp86zUjTb.mjs → D1dqpyBV7ZLrMRVk.mjs} +1 -1
- package/node/esm/{B5K3cjwd0usYef8w.mjs → DeCgfM0e20R-VV0G.mjs} +1 -1
- package/node/esm/{BqPC_rbjZN2Jy_y4.mjs → cm-ecS0S68xhC_Yj.mjs} +1 -1
- package/node/esm/index.mjs +512 -510
- package/package.json +8 -8
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Color as ft, IColor as
|
|
2
|
-
import { jsx as e, jsxs as
|
|
3
|
-
import ae, { memo as Y, forwardRef as J, useMemo as
|
|
4
|
-
import { Box as A, Typography as Oe, IconButton as dt, MenuItem as pi, Divider as lo, Button as nn, SvgIcon as
|
|
5
|
-
import { themeIcon as D, CommandButton as F, ExhibitDivider as re, FormatIndentDecreaseIcon as Os, FormatIndentIncreaseIcon as As, defaultCreatePopupPanel as xe, CommandPopupButton as Re, TextVerticalTopIcon as Bs, TextVerticalCenterIcon as Ls, TextVerticalBottomIcon as
|
|
6
|
-
import { FormatAlignLeft as
|
|
7
|
-
import { useCommands as He, CommandButtonType as ie, useCallbackRef as te, ReactUtils as pn, KeyCodes as be, useCommand as Ht, useEditMode as un, useMouseDownAndHoldListener as
|
|
8
|
-
import { useTheme as at, alpha as he, getOverlayAlpha as
|
|
9
|
-
import { StyledStrokePath as ap, StaticBorderRenderer as
|
|
1
|
+
import { Color as ft, IColor as zr, ITheme as us, CommonUtils as Ze, IBorder as Ce, IFont as Bt, NumberFormat as gt, IFontCollection as ms, IStyle as pe, ITextFrame as gs, Table as nr, IFill as kn, CoordUtils as hs, ISheet as Rt, LicenseManager as vo, Workbook as $n, TypesUtils as fs } from "@sheetxl/sdk";
|
|
2
|
+
import { jsx as e, jsxs as j, Fragment as se } from "react/jsx-runtime";
|
|
3
|
+
import ae, { memo as Y, forwardRef as J, useMemo as W, useCallback as G, isValidElement as rr, useState as U, useEffect as ue, Suspense as ci, useRef as Se, createElement as Pe, useReducer as ar, useImperativeHandle as bs, version as xs, useLayoutEffect as St, Component as di, createContext as ys, useContext as ws, cloneElement as Ss } from "react";
|
|
4
|
+
import { Box as A, Typography as Oe, IconButton as dt, MenuItem as pi, Divider as lo, Button as nn, SvgIcon as ir, Input as lr, FormControlLabel as Et, Checkbox as Dt, useMediaQuery as vs, FormControl as sr, TextField as ui, InputAdornment as Cs, Slider as ks, Paper as Po, CircularProgress as Ts, DialogTitle as Es, Select as Ds, Tabs as Ps, Tab as Rs, Card as Ms, CardActions as Is, Collapse as Ns, CssBaseline as Fs } from "@mui/material";
|
|
5
|
+
import { themeIcon as D, CommandButton as F, ExhibitDivider as re, FormatIndentDecreaseIcon as Os, FormatIndentIncreaseIcon as As, defaultCreatePopupPanel as xe, CommandPopupButton as Re, TextVerticalTopIcon as Bs, TextVerticalCenterIcon as Ls, TextVerticalBottomIcon as Wr, TextHorizontalOverflowIcon as jr, TextHorizontalWrapIcon as Hs, TextHorizontalClipIcon as zs, TextHorizontalShrinkIcon as Ws, TextRotation315Icon as zo, TextRotation45Icon as $r, TextRotation90Icon as Vr, TextRotation2702Icon as _r, TextRotationCustomIcon as Ur, TextRotation0Icon as js, InputCommandButton as $s, SimpleTooltip as At, LoadingPanel as Lt, PopupButtonType as nt, ExhibitPopupIconButton as vt, ExhibitPopupMenuItem as cr, ColorizedCircleIcon as Vs, ExhibitMenuItem as pt, createStrokeShadowFilter as Gr, strokeShadowFilter as _s, ColorizedStrokeIcon as dr, ExhibitTooltip as rt, ExhibitIconButton as bt, CommandTooltip as pr, MergeAllIcon as qr, MergeHorizontalIcon as Us, MergeVerticalIcon as Gs, MergeUnMergeIcon as mi, FreezeBothIcon as qs, FreezeRowsIcon as Xs, FreezeColumnsIcon as Ks, FreezeIcon as Ys, FindIcon as Xr, FindReplaceIcon as Zs, GotoIcon as Js, TextSizeIncreaseIcon as Qs, TextSizeDecreaseIcon as ec, SelectedIcon as sn, CurrencyDollarIcon as tc, PercentIcon as oc, CommaIcon as nc, IncreaseDecimalIcon2 as rc, DecreaseDecimalIcon2 as ac, ClearAllIcon as Kr, ClearFormatsIcon as gi, ClearContentsIcon as ic, FillDownIcon as so, InsertCells as Yr, InsertRowIcon as lc, InsertColumn2Icon as Zr, BlankIcon as rn, RemoveCellsIcon as Jr, RemoveRowIcon as sc, RemoveColumn2Icon as Qr, LabelIcon as eo, SortIncreaseIcon as Vn, SortDecreaseIcon as hi, SortCustomIcon as cc, FilterToggleIcon as _n, FilterClearIcon as ur, FilterReapplyIcon as fi, RedoIcon as dc, UndoIcon as pc, TextStrikeIcon as ea, TextSuperscriptIcon as uc, TextSubscriptIcon as mc, TextUnderlineIcon as Tn, TextUnderlineDoubleIcon as ta, TextUnderlineAccountingIcon as oa, TextUnderlineAccountingDoubleIcon as na, PasteIcon as ra, PasteValuesIcon as gc, PasteFormatsIcon as hc, PasteFormulasIcon as fc, PasteTransposeIcon as bc, PasteLinksIcon as xc, NewPresetStylesIcon as yc, PresetStylesIcon as Ro, ExhibitMenuHeader as to, ContextMenu as bi, Theme2Icon as xi, SystemDefaultDarkMode as wc, SystemDefaultLightMode as Sc, GithubIcon as vc, DiscordIcon as Cc, DocumentationIcon as yi, TicketIcon as kc, HelpIcon as Tc, InsertImageIcon as Wo, WalkingCopyIcon as Ec, SimpleCommandPopupButton as ct, FunctionThinIcon as Dc, FunctionSumIcon as Pc, FormulaGroupIcon as Rc, FormulaFinancialIcon as Mc, FormulaLogicalIcon as Ic, FormulaTextIcon as Nc, FormulaDateTimeIcon as Fc, FormulaLookupReferenceIcon as Oc, FormulaMathTrigIcon as Ac, FormulaStatisticalIcon as Bc, FormulaEngineeringIcon as Lc, FormulaInformationIcon as Hc, FormulaCubeIcon as zc, FormulaDatabaseIcon as Wc, FormulaWebIcon as jc, FormulaCustomIcon as $c, ExhibitOptionButton as Vc, SelectRangeModeIcon as _c, hexToRGB as aa, useFloatStack as oo, CellSelectionIcon as Uc, CellSelectionRemoveIcon as Gc, CellSelectionEditIcon as qc, InsertTableIcon as an, CellSelectionInsertIcon as Xc, CloseErrorIcon as Kc, CheckSuccessIcon as Yc, FunctionIcon as Zc, VisibilityOffIcon as wi, elevateColor as it, ThemedIcon as Jc, ScriptNewIcon as Qc, ScriptFormulaIcon as Si, ScriptMacroIcon as mr, ScriptSaveIcon as ed, CommandToolbar as cn, CodeIcon as td, ScriptRunIcon as od, ColorizedTextIcon as nd, ColorizedFillIcon as rd, FormatPaintIcon as ad, TextBoldIcon as id, TextItalicIcon as ld, InsertHyperlinkIcon as Un, InsertCommentIcon as Gn, FullScreenOffIcon as sd, FullScreenIcon as cd, createScrollEdgeButton as dd, createScrollEndButton as pd, createScrollStartButton as ud, HideColumnIcon as md, ShowColumnIcon as gd, HideRowIcon as hd, ShowRowIcon as fd, ColumnsResizeAutoIcon as bd, RowsResizeAutoIcon as xd, CutIcon as yd, DrawAspectIcon as ia, DrawAlignLeftIcon as la, DrawResizeIcon as sa, DrawAlignDistributeVertIcon as wd, DrawAlignDistributeHorzIcon as Sd, DrawAlignBottomIcon as vd, DrawAlignMiddleIcon as Cd, DrawAlignTopIcon as kd, DrawAlignRightIcon as Td, DrawAlignCenterIcon as Ed, DrawMoveBackwardIcon as Dd, DrawToBackIcon as Pd, DrawMoveForwardIcon as Rd, DrawToFrontIcon as Md, scrollbarTheming as Id, StackTrace as Nd, FileNewIcon as Fd, FileOpenIcon as Od, FileDownloadAsCSVIcon as Ad, FileDownloadAsExcelIcon as Bd, FileDownloadAsSheetIcon as Ld, useResolvedThemeMode as vi, ThemeMode as qn, useModal as Hd, useLazyWindow as zd, useOptionsDialog as Wd, useInputDialog as jd, AnimatedTraversingEllipsisIcon as $d, ErrorPanel as Vd, createExhibitTheme as ca, ModalProvider as _d, ErrorAlertIcon as Ud } from "@sheetxl/utils-mui";
|
|
6
|
+
import { FormatAlignLeft as da, FormatAlignCenter as pa, FormatAlignRight as Gd, FormatAlignJustify as To, Colorize as qd, DarkMode as ua, LightMode as ma, Keyboard as Xd, Remove as Kd, Add as Yd, ExpandLess as Zd, ExpandMore as Ci, Lock as dn, MoreHoriz as Jd, WebhookOutlined as ki, Close as Ti, AddCircleOutline as Qd, Menu as ep, CancelOutlined as tp } from "@mui/icons-material";
|
|
7
|
+
import { useCommands as He, CommandButtonType as ie, useCallbackRef as te, ReactUtils as pn, KeyCodes as be, useCommand as Ht, useEditMode as un, useMouseDownAndHoldListener as ga, NotificationType as wt, useImperativeElement as zt, SplitPane as Xn, RoundedTab as op, SimpleCommand as Ge, Command as we, KeyModifiers as ke, CommandGroup as gr, ToolTipPlacement as co, ScrollPane as np, useUndoManager as rp } from "@sheetxl/utils-react";
|
|
8
|
+
import { useTheme as at, alpha as he, getOverlayAlpha as De, ThemeProvider as Ei } from "@mui/material/styles";
|
|
9
|
+
import { StyledStrokePath as ap, StaticBorderRenderer as hr, FontUtils as ip, useModelListener as _e, createCellEditStateFromCell as lp, SheetCellEditor as sp, ScriptEditor as cp, useDocThemes as fr, TabStrip as dp, SheetElement as pp, SheetScrollbar as ha, PictureEditor as up, ChartEditor as mp, EmptyFrame as gp, LogoNoPaddingIcon as hp } from "@sheetxl/react";
|
|
10
10
|
import { alpha as Qe } from "@mui/system";
|
|
11
11
|
import Kt, { createPortal as fp } from "react-dom";
|
|
12
|
-
import { CommonUtils as Jt, ChainedError as
|
|
12
|
+
import { CommonUtils as Jt, ChainedError as Kn, PartialError as bp, UndoManager as xp } from "@sheetxl/utils";
|
|
13
13
|
import { IOUtils as Yt } from "@sheetxl/io";
|
|
14
14
|
/**
|
|
15
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.6.
|
|
15
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.6.9
|
|
16
16
|
*
|
|
17
17
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
18
18
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -31,60 +31,60 @@ function Ae() {
|
|
|
31
31
|
return t;
|
|
32
32
|
}
|
|
33
33
|
const yp = Y(J((r, i) => {
|
|
34
|
-
const { commands: o, commandHook: t, scope: n, disabled: l = !1, parentFloat: c, ...g } = r, a = He(o, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), s =
|
|
34
|
+
const { commands: o, commandHook: t, scope: n, disabled: l = !1, parentFloat: c, ...g } = r, a = He(o, ["formatAlignLeftToggle", "formatAlignCenterToggle", "formatAlignRightToggle", "formatAlignJustifyToggle", "formatAlignCenterContinuousToggle", "formatAlignFillToggle", "formatAlignDistributedHorizontalToggle"]), s = W(() => {
|
|
35
35
|
for (let d = 0; d < a.length; d++) if (a[d]?.state()) return a[d].key();
|
|
36
36
|
return a[0]?.key();
|
|
37
|
-
}, [a]), m =
|
|
37
|
+
}, [a]), m = W(() => {
|
|
38
38
|
const d = /* @__PURE__ */ new Map();
|
|
39
|
-
return d.set("formatAlignLeftToggle", D(e(
|
|
40
|
-
}, []), p =
|
|
39
|
+
return d.set("formatAlignLeftToggle", D(e(da, {}))), d.set("formatAlignCenterToggle", D(e(pa, {}))), d.set("formatAlignRightToggle", D(e(Gd, {}))), d.set("formatAlignJustifyToggle", D(e(To, {}))), d.set("formatAlignCenterContinuousToggle", D(e(pa, {}))), d.set("formatAlignFillToggle", D(e(To, {}))), d.set("formatAlignDistributedHorizontalToggle", D(e(To, {}))), d;
|
|
40
|
+
}, []), p = W(() => {
|
|
41
41
|
if (!t) return null;
|
|
42
42
|
const d = { ...t };
|
|
43
43
|
return delete d.beforeExecute, d;
|
|
44
44
|
}, [t]), h = G((d, u) => {
|
|
45
|
-
const y = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, x =
|
|
45
|
+
const y = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, x = j(se, { children: [e(F, { ...y, command: u.getCommand("formatAlignLeftToggle"), icon: m.get("formatAlignLeftToggle") }), e(F, { ...y, command: u.getCommand("formatAlignCenterToggle"), icon: m.get("formatAlignCenterToggle") }), e(F, { ...y, command: u.getCommand("formatAlignRightToggle"), icon: m.get("formatAlignRightToggle") }), e(F, { ...y, command: u.getCommand("formatAlignJustifyToggle"), icon: m.get("formatAlignJustifyToggle") }), e(re, { orientation: "horizontal" }), e(F, { ...y, command: u.getCommand("formatAlignCenterContinuousToggle"), icon: m.get("formatAlignCenterContinuousToggle") }), e(F, { ...y, command: u.getCommand("formatAlignFillToggle"), icon: m.get("formatAlignFillToggle") }), e(F, { ...y, command: u.getCommand("formatAlignDistributedHorizontalToggle"), icon: m.get("formatAlignDistributedHorizontalToggle") })] }), b = j(A, { sx: { className: Ae("quick-buttons"), display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (w) => w.stopPropagation(), children: [e(F, { command: u.getCommand("formatIndentDecrease"), commandHook: p, scope: n, disabled: l, icon: D(e(Os, {})) }), e(F, { command: u.getCommand("formatIndentIncrease"), commandHook: p, scope: n, disabled: l, icon: D(e(As, {})) })] }), f = j(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...g, children: [b, e(re, { orientation: "horizontal" }), e(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: x })] });
|
|
46
46
|
return xe({ ...d, children: f });
|
|
47
47
|
}, [l, t]);
|
|
48
|
-
return e(Re, { ref: i, parentFloat: c, commands: o, commandHook: t, scope: n, createPopupPanel: h, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: s, icon: m.get(s) ?? e(
|
|
48
|
+
return e(Re, { ref: i, parentFloat: c, commands: o, commandHook: t, scope: n, createPopupPanel: h, label: "Horizontal Alignment", tooltip: "Configure how text is placed in the horizontal direction of the cell.", quickCommand: s, icon: m.get(s) ?? e(da, {}), ...g });
|
|
49
49
|
})), wp = Y(J((r, i) => {
|
|
50
|
-
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), a =
|
|
50
|
+
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["formatAlignTopToggle", "formatAlignMiddleToggle", "formatAlignBottomToggle", "formatAlignJustifyVerticalToggle", "formatAlignDistributedVerticalToggle"]), a = W(() => {
|
|
51
51
|
for (let p = 0; p < g.length; p++) if (g[p]?.state()) return g[p].key();
|
|
52
52
|
return g[0]?.key();
|
|
53
|
-
}, [g]), s =
|
|
53
|
+
}, [g]), s = W(() => {
|
|
54
54
|
const p = /* @__PURE__ */ new Map();
|
|
55
|
-
return p.set("formatAlignTopToggle", D(e(Bs, {}))), p.set("formatAlignMiddleToggle", D(e(Ls, {}))), p.set("formatAlignBottomToggle", D(e(
|
|
55
|
+
return p.set("formatAlignTopToggle", D(e(Bs, {}))), p.set("formatAlignMiddleToggle", D(e(Ls, {}))), p.set("formatAlignBottomToggle", D(e(Wr, {}))), p.set("formatAlignJustifyVerticalToggle", D(e(To, {}))), p.set("formatAlignDistributedVerticalToggle", D(e(To, {}))), p;
|
|
56
56
|
}, []), m = G((p, h) => {
|
|
57
|
-
const d = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, u =
|
|
57
|
+
const d = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, u = j(se, { children: [e(F, { ...d, command: h.getCommand("formatAlignTopToggle"), icon: s.get("formatAlignTopToggle") }), e(F, { ...d, command: h.getCommand("formatAlignMiddleToggle"), icon: s.get("formatAlignMiddleToggle") }), e(F, { ...d, command: h.getCommand("formatAlignBottomToggle"), icon: s.get("formatAlignBottomToggle") }), e(re, { orientation: "horizontal" }), e(F, { ...d, command: h.getCommand("formatAlignJustifyVerticalToggle"), icon: s.get("formatAlignJustifyVerticalToggle") }), e(F, { ...d, command: h.getCommand("formatAlignDistributedVerticalToggle"), icon: s.get("formatAlignDistributedVerticalToggle") })] });
|
|
58
58
|
return xe({ ...p, children: u });
|
|
59
59
|
}, [l, t, s]);
|
|
60
|
-
return e(Re, { ref: i, commands: o, commandHook: t, createPopupPanel: m, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: s.get(a) ?? D(e(
|
|
60
|
+
return e(Re, { ref: i, commands: o, commandHook: t, createPopupPanel: m, label: "Vertical Alignment", tooltip: "Configure how text is placed in the vertical direction of the cell.", icon: s.get(a) ?? D(e(Wr, {})), ...c });
|
|
61
61
|
})), Sp = Y(J((r, i) => {
|
|
62
|
-
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), a =
|
|
62
|
+
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["formatTextOverflowVisibleToggle", "formatTextOverflowWrapToggle", "formatTextOverflowClipToggle", "formatTextOverflowShrinkToggle"]), a = W(() => {
|
|
63
63
|
for (let p = 0; p < g.length; p++) if (g[p]?.state()) return g[p].key();
|
|
64
64
|
return g[0]?.key();
|
|
65
|
-
}, [g]), s =
|
|
65
|
+
}, [g]), s = W(() => {
|
|
66
66
|
const p = /* @__PURE__ */ new Map();
|
|
67
|
-
return p.set("formatTextOverflowVisibleToggle", D(e(
|
|
67
|
+
return p.set("formatTextOverflowVisibleToggle", D(e(jr, {}))), p.set("formatTextOverflowWrapToggle", D(e(Hs, {}))), p.set("formatTextOverflowClipToggle", D(e(zs, {}))), p.set("formatTextOverflowShrinkToggle", D(e(Ws, {}))), p;
|
|
68
68
|
}, []), m = te((p, h) => {
|
|
69
|
-
const d = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, u =
|
|
69
|
+
const d = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, u = j(se, { children: [e(F, { ...d, command: h.getCommand("formatTextOverflowVisibleToggle"), icon: s.get("formatTextOverflowVisibleToggle") }), e(F, { ...d, command: h.getCommand("formatTextOverflowWrapToggle"), icon: s.get("formatTextOverflowWrapToggle") }), e(F, { ...d, command: h.getCommand("formatTextOverflowClipToggle"), icon: s.get("formatTextOverflowClipToggle") }), e(re, { orientation: "horizontal" }), e(F, { ...d, command: h.getCommand("formatTextOverflowShrinkToggle"), icon: s.get("formatTextOverflowShrinkToggle") })] });
|
|
70
70
|
return xe({ ...p, children: u });
|
|
71
71
|
}, [l, t, n]);
|
|
72
|
-
return e(Re, { ref: i, commands: o, commandHook: t, scope: n, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: m, icon: s.get(a) ?? D(e(
|
|
72
|
+
return e(Re, { ref: i, commands: o, commandHook: t, scope: n, label: "Text Overflow", tooltip: "Configure how text behaves when it doesn't fit within a cell.", createPopupPanel: m, icon: s.get(a) ?? D(e(jr, {})), ...c });
|
|
73
73
|
})), vp = Y(J((r, i) => {
|
|
74
|
-
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), a =
|
|
74
|
+
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["formatTextRotate0", "formatTextRotate315", "formatTextRotate45", "formatTextRotate90", "formatTextRotate270", "formatSubscriptToggle", "formatTextRotateCustom"]), a = W(() => {
|
|
75
75
|
const h = g.length;
|
|
76
76
|
for (let d = 0; d < h; d++) {
|
|
77
77
|
const u = g[d];
|
|
78
78
|
if (u?.state()) return u.key();
|
|
79
79
|
}
|
|
80
80
|
return g[1]?.key();
|
|
81
|
-
}, [g]), s =
|
|
81
|
+
}, [g]), s = W(() => {
|
|
82
82
|
const h = /* @__PURE__ */ new Map();
|
|
83
|
-
return h.set("formatTextRotate0", D(e(zo, {}))), h.set("formatTextRotate315", D(e(zo, {}))), h.set("formatTextRotate45", D(e(
|
|
83
|
+
return h.set("formatTextRotate0", D(e(zo, {}))), h.set("formatTextRotate315", D(e(zo, {}))), h.set("formatTextRotate45", D(e($r, {}))), h.set("formatTextRotate90", D(e(Vr, {}))), h.set("formatTextRotate270", D(e(_r, {}))), h.set("formatTextRotateCustom", D(e(Ur, {}))), h;
|
|
84
84
|
}, []), m = G((h, d) => {
|
|
85
|
-
const u = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, y =
|
|
85
|
+
const u = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, y = j(se, { children: [e(F, { ...u, command: d.getCommand("formatTextRotate0"), icon: D(e(js, {})) }), e(re, { orientation: "horizontal" }), e(F, { ...u, command: d.getCommand("formatTextRotate315"), icon: D(e(zo, {})) }), e(F, { ...u, command: d.getCommand("formatTextRotate45"), icon: D(e($r, {})) }), e(F, { ...u, command: d.getCommand("formatTextRotate90"), icon: D(e(Vr, {})) }), e(F, { ...u, command: d.getCommand("formatTextRotate270"), icon: D(e(_r, {})) }), e(re, { orientation: "horizontal" }), e($s, { ...u, command: d.getCommand("formatTextRotateCustom"), icon: D(e(Ur, {})), label: "Custom" })] });
|
|
86
86
|
return xe({ ...h, children: y });
|
|
87
|
-
}, [l, t, n, o]), p =
|
|
87
|
+
}, [l, t, n, o]), p = W(() => (o.getCommand("formatTextRotateCustom")?.state() ?? 0) !== 0, [g]);
|
|
88
88
|
return e(Re, { ref: i, commands: o, commandHook: t, scope: n, selected: p, label: "Text Orientation", tooltip: "Rotate your text diagonally or vertically. This is a great way to label narrow columns.", createPopupPanel: m, quickCommand: p ? "formatTextRotate0" : "formatTextRotate315", icon: D(s.get(a) ?? e(zo, {})), ...c });
|
|
89
89
|
})), Cp = { Preset: "preset", Custom: "custom" }, Eo = { Start: "start", End: "end" }, En = {}, kp = (r, i, o, t) => {
|
|
90
90
|
const n = r + "-" + i + "-" + o + (t ? "-server" : "");
|
|
@@ -98,8 +98,8 @@ const yp = Y(J((r, i) => {
|
|
|
98
98
|
})(r, i, o, t);
|
|
99
99
|
return En[n] = l, l;
|
|
100
100
|
}, Tp = {}, Ep = Y((r) => {
|
|
101
|
-
const { className: i, style: o = pn.EmptyCssProperties, white: t = "transparent", grey: n = "grey", size: l = 8, borderRadius: c, boxShadow: g, renderers: a = Tp, children: s, ...m } = r, p = s, h =
|
|
102
|
-
return
|
|
101
|
+
const { className: i, style: o = pn.EmptyCssProperties, white: t = "transparent", grey: n = "grey", size: l = 8, borderRadius: c, boxShadow: g, renderers: a = Tp, children: s, ...m } = r, p = s, h = W(() => Object.assign({ borderRadius: c, boxShadow: g, position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", background: `url(${kp(t, n, l, a?.canvas)}) center left` }, o), [t, n, l, a]);
|
|
102
|
+
return rr(s) ? ae.cloneElement(s, { ...p.props }) : e("div", { style: h, ...m });
|
|
103
103
|
}), Dp = Y((r) => {
|
|
104
104
|
const { selectedColor: i, onSelectColor: o, onPreviewColor: t, onClick: n, onKeyDown: l, onMouseOver: c, onMouseLeave: g, onFocus: a, style: s = pn.EmptyCssProperties, children: m, alphaWhite: p, alphaGrey: h, darkMode: d, alphaCheckSize: u = 7, ...y } = r;
|
|
105
105
|
if (!i) throw new Error("a selectedColor is required");
|
|
@@ -113,17 +113,17 @@ const yp = Y(J((r, i) => {
|
|
|
113
113
|
a?.(k), k.isDefaultPrevented() || t?.(i.toRGBA());
|
|
114
114
|
}, [t, a, i]), C = G((k) => {
|
|
115
115
|
l?.(k), k.isDefaultPrevented() || k.keyCode === be.Enter && o?.(i.toRGBA());
|
|
116
|
-
}, [o, l, i]), v =
|
|
117
|
-
return
|
|
118
|
-
}),
|
|
116
|
+
}, [o, l, i]), v = W(() => i.toRGBA().alpha === 1 ? null : e(Ep, { size: u, white: p, grey: h, style: { position: "absolute", width: "calc(100% - 1.5px)", height: "calc(100% - 1.5px)", top: "0.75px", left: "0.75px" } }), [p, h, i]);
|
|
117
|
+
return j("div", { style: { position: "absolute", height: "100%", width: "100%", top: "0px", left: "0px", cursor: "pointer", outline: "none", ...s }, tabIndex: 0, ...y, onClick: x, onKeyDown: C, onMouseOver: b, onMouseLeave: f, onFocus: w, children: [v, e("div", { style: { position: "absolute", top: "0px", left: "0px", height: "100%", width: "100%", background: i.toCSS(d) }, children: m })] });
|
|
118
|
+
}), br = Y((r) => {
|
|
119
119
|
const { schemeColorLookup: i, selectedColor: o, previewColor: t, colorDef: n, onSelectColorDef: l, onPreviewColorDef: c, swatchProps: g, defaultButtonSize: a = 24, isLarge: s = !1, compareRGB: m = !1, darkMode: p = !1, ...h } = r, d = new ft({ val: n.definition.val, adjs: n.definition.adjs }, (v) => i(v)), u = m ? d.toRGBA().toString() : d.toString(), y = o && (m ? o.toRGBA().toString() : o.toString()) === u, x = t && (m ? t.toRGBA().toString() : t.toString()) === u, b = [];
|
|
120
|
-
b.push({ [
|
|
120
|
+
b.push({ [zr.AdjustmentType.Inv]: !0 }), b.push({ [zr.AdjustmentType.Alpha]: 100 });
|
|
121
121
|
const f = d.adjust(b), w = G(() => {
|
|
122
122
|
l?.(n);
|
|
123
123
|
}, [l, n]), C = G((v) => {
|
|
124
124
|
c?.(v ? n : null);
|
|
125
125
|
}, [c, n]);
|
|
126
|
-
return e(At, { disableInteractive: !0, PopperProps: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } }, title: n.description, placement: "bottom-start", children: e("div", { style: { width: a * (s ? 1.2 : 1) + "px", height: a * (s ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...h, children:
|
|
126
|
+
return e(At, { disableInteractive: !0, PopperProps: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } }, title: n.description, placement: "bottom-start", children: e("div", { style: { width: a * (s ? 1.2 : 1) + "px", height: a * (s ? 1.2 : 1) + "px", position: "relative", boxSizing: "border-box", cursor: "pointer", outline: "none" }, ...h, children: j(Dp, { selectedColor: d, title: null, onSelectColor: w, onPreviewColor: C, alphaCheckSize: s ? 9 : void 0, darkMode: p, ...g, children: [e("div", { style: { position: "absolute", width: "100%", height: "100%", top: "0px", left: "0px", pointerEvents: "none", borderColor: f.toRGBA(p).toString(), borderWidth: "2px", borderStyle: "solid", boxSizing: "border-box", opacity: y ? "1" : "0" } }), e("div", { style: { position: "absolute", width: 0.33 * a * (s ? 1.2 : 1) + "px", height: 0.33 * a * (s ? 1.2 : 1) + "px", left: "calc(50% - 0.5px)", top: "calc(50% - 0.5px)", transform: "translate(-50%,-50%)", pointerEvents: "none", background: f.toRGBA(p).toString(), borderRadius: "50%", opacity: x ? "1" : "0" } })] }) }) });
|
|
127
127
|
}), jo = Y((r) => {
|
|
128
128
|
const { title: i, schemeColorLookup: o, colorDefs: t, selectedColor: n, previewColor: l, onSelectColorDef: c, onPreviewColorDef: g, style: a = pn.EmptyCssProperties, compareRGB: s = !1, darkMode: m, swatchProps: p, ...h } = r;
|
|
129
129
|
let d;
|
|
@@ -136,20 +136,20 @@ const yp = Y(J((r, i) => {
|
|
|
136
136
|
c?.(f);
|
|
137
137
|
}, [c]), y = G((f) => {
|
|
138
138
|
g?.(f);
|
|
139
|
-
}, [g]), x =
|
|
139
|
+
}, [g]), x = W(() => {
|
|
140
140
|
let f = [];
|
|
141
141
|
for (let w = 0; w < d.length; w++) {
|
|
142
142
|
let C = [], v = d[w];
|
|
143
143
|
for (let T = 0; T < v.length; T++) {
|
|
144
144
|
let R = v[T];
|
|
145
|
-
C.push(e(
|
|
145
|
+
C.push(e(br, { schemeColorLookup: o, colorDef: R, selectedColor: n, previewColor: l, onSelectColorDef: u, onPreviewColorDef: y, swatchProps: p, compareRGB: s, darkMode: m }, w + " " + T));
|
|
146
146
|
}
|
|
147
147
|
let k = e(A, { className: "button-col", sx: { display: "flex", flexDirection: "column", justifyContent: "space-between", boxShadow: (T) => T.shadows[2], borderRadius: "2px", overflow: "hidden" }, children: C }, "" + w);
|
|
148
148
|
f.push(k);
|
|
149
149
|
}
|
|
150
150
|
return f;
|
|
151
|
-
}, [d, n, l, u, y]), b =
|
|
152
|
-
return
|
|
151
|
+
}, [d, n, l, u, y]), b = W(() => i ? e(Oe, { noWrap: !0, component: "div", sx: { display: "flex", flexShrink: "0", paddingLeft: "6px", paddingBottom: "4px", paddingTop: "0px", userSelect: "none", color: (f) => f.palette.text.secondary }, children: i }) : null, [i]);
|
|
152
|
+
return j(A, { style: { ...a }, children: [b, e(A, { sx: { display: "flex", flexDirection: "row", gap: "6px", marginBottom: "14px", flexWrap: "wrap", justifyContent: "flex-start" }, ...h, children: x })] });
|
|
153
153
|
}), ot = (r, i) => ({ description: r, definition: { val: i, adjs: [] } }), ze = (r, i, o, t, n, l) => {
|
|
154
154
|
const c = ot(r, i);
|
|
155
155
|
t?.push(c);
|
|
@@ -157,12 +157,12 @@ const yp = Y(J((r, i) => {
|
|
|
157
157
|
n?.set(a, g);
|
|
158
158
|
const s = g.toRGBA().toString();
|
|
159
159
|
l?.set(s, g);
|
|
160
|
-
}, Pp = ae.lazy(() => import("./
|
|
161
|
-
const { selectedColor: o = null, previewColor: t = r.selectedColor ?? null, recentColors: n, schemeLookup: l, disableAlpha: c = !1, previewDebounceTime: g = 100, initialPanelType: a, defaultButtonSize: s = 24, width: m, onElementLoad: p, onDone: h, onEyeDropStart: d, onEyeDropStop: u, onPreviewColor: y, onPreviewColorImmediate: x, onSelectColor: b, autoColor: f, autoColorLabel: w = "Automatic", autoColorPosition: C = Eo.Start, compareRGB: v = !1, darkMode: k = !1, ...T } = r, R = t || o,
|
|
160
|
+
}, Pp = ae.lazy(() => import("./7bB6IyFR78AK_xsc.mjs")), Rp = Y(J((r, i) => {
|
|
161
|
+
const { selectedColor: o = null, previewColor: t = r.selectedColor ?? null, recentColors: n, schemeLookup: l, disableAlpha: c = !1, previewDebounceTime: g = 100, initialPanelType: a, defaultButtonSize: s = 24, width: m, onElementLoad: p, onDone: h, onEyeDropStart: d, onEyeDropStop: u, onPreviewColor: y, onPreviewColorImmediate: x, onSelectColor: b, autoColor: f, autoColorLabel: w = "Automatic", autoColorPosition: C = Eo.Start, compareRGB: v = !1, darkMode: k = !1, ...T } = r, R = t || o, N = te(y, [y]), B = te(x, [x]), P = te(b, [b]), S = te(d, [d]), M = te(u, [u]), [L, O] = U(!1), V = at(), I = W(() => l || ft.getDefaultSchemeLookup(), [l]), E = W(() => {
|
|
162
162
|
const H = /* @__PURE__ */ new Map(), oe = /* @__PURE__ */ new Map(), Te = [];
|
|
163
|
-
ze("Primary Background", "bg1",
|
|
164
|
-
const ge = us.buildPalette(Te,
|
|
165
|
-
if (ze("Dark Red", "C00000",
|
|
163
|
+
ze("Primary Background", "bg1", I, Te, H, oe), ze("Primary Text", "tx1", I, Te, H, oe), ze("Secondary Background", "bg2", I, Te, H, oe), ze("Secondary Text", "tx2", I, Te, H, oe), ze("Accent 1", "accent1", I, Te, H, oe), ze("Accent 2", "accent2", I, Te, H, oe), ze("Accent 3", "accent3", I, Te, H, oe), ze("Accent 4", "accent4", I, Te, H, oe), ze("Accent 5", "accent5", I, Te, H, oe), ze("Accent 6", "accent6", I, Te, H, oe);
|
|
164
|
+
const ge = us.buildPalette(Te, I, H, oe), fe = [];
|
|
165
|
+
if (ze("Dark Red", "C00000", I, fe, H, oe), ze("Red", "FF0000", I, fe, H, oe), ze("Orange", "FFC000", I, fe, H, oe), ze("Yellow", "FFFF00", I, fe, H, oe), ze("Light Green", "92D050", I, fe, H, oe), ze("Green", "00B050", I, fe, H, oe), ze("Light Blue", "00B0F0", I, fe, H, oe), ze("Blue", "0070C0", I, fe, H, oe), ze("Dark Blue", "002060", I, fe, H, oe), c ? ze("Purple Is A Fruit", "7030A0", I, fe, H, oe) : ze("Transparent", "00000000", I, fe, H, oe), f) {
|
|
166
166
|
const ye = f.toString();
|
|
167
167
|
H.set(ye, f);
|
|
168
168
|
}
|
|
@@ -172,7 +172,7 @@ const yp = Y(J((r, i) => {
|
|
|
172
172
|
Z.set(qe, ce[ye]), Me.push({ description: "Recent " + (ye + 1), definition: { val: ce[ye].toString() } });
|
|
173
173
|
}
|
|
174
174
|
return { primaryColors: Te, modifiedPresets: ge, standardColors: fe, recentColorsLimited: Me, mapAllPresets: H, mapAllPresetsRGB: oe, mapRecent: Z };
|
|
175
|
-
}, [
|
|
175
|
+
}, [I, n, c, f]);
|
|
176
176
|
ue(() => {
|
|
177
177
|
p?.();
|
|
178
178
|
}, []);
|
|
@@ -189,16 +189,16 @@ const yp = Y(J((r, i) => {
|
|
|
189
189
|
}
|
|
190
190
|
}, [o, a]);
|
|
191
191
|
const _ = G(Ze.debounce((H) => {
|
|
192
|
-
|
|
193
|
-
}, g), [
|
|
192
|
+
N?.(H);
|
|
193
|
+
}, g), [N, g]), [ne, le] = U();
|
|
194
194
|
ue(() => {
|
|
195
195
|
le(t || o);
|
|
196
196
|
}, [t, o]);
|
|
197
197
|
const X = te((H) => {
|
|
198
198
|
B && (B(H), _(H));
|
|
199
|
-
}, [B]),
|
|
200
|
-
X(H ? new ft({ val: H.definition.val, adjs: H.definition.adjs },
|
|
201
|
-
}, [
|
|
199
|
+
}, [B]), z = te((H) => {
|
|
200
|
+
X(H ? new ft({ val: H.definition.val, adjs: H.definition.adjs }, I) : null);
|
|
201
|
+
}, [I]), ee = G((H) => {
|
|
202
202
|
H.ctrlKey && Q(!0);
|
|
203
203
|
}, []), me = te((H) => {
|
|
204
204
|
let oe = !1;
|
|
@@ -208,13 +208,13 @@ const yp = Y(J((r, i) => {
|
|
|
208
208
|
}
|
|
209
209
|
P?.(H, oe);
|
|
210
210
|
}, [P, E]), Le = te((H) => {
|
|
211
|
-
const oe = H ? new ft({ val: H.definition.val, adjs: H.definition.adjs },
|
|
211
|
+
const oe = H ? new ft({ val: H.definition.val, adjs: H.definition.adjs }, I) : null;
|
|
212
212
|
Promise.resolve(h?.()).then(() => {
|
|
213
213
|
me(oe);
|
|
214
214
|
});
|
|
215
|
-
}, [
|
|
216
|
-
X(H ? new ft(H,
|
|
217
|
-
}, [
|
|
215
|
+
}, [I, h]), Fe = te((H) => {
|
|
216
|
+
X(H ? new ft(H, I) : null);
|
|
217
|
+
}, [I]), Be = W(() => window.EyeDropper === void 0 ? e(se, {}) : e(dt, { "aria-label": "eye dropper", size: "small", sx: { color: (H) => H.palette.text.icon ?? H.palette.action.active }, onClick: async () => {
|
|
218
218
|
O(!0), S?.(), await new EyeDropper().open().then((H) => {
|
|
219
219
|
O(!1), M?.();
|
|
220
220
|
let oe = new ft(H.sRGBHex), Te = oe.toString(), ge = E.mapAllPresets.get(Te);
|
|
@@ -230,20 +230,20 @@ const yp = Y(J((r, i) => {
|
|
|
230
230
|
}).catch((H) => {
|
|
231
231
|
O(!1), H?.name !== "AbortError" && console.error(H);
|
|
232
232
|
});
|
|
233
|
-
}, children: e(qd, {}) }), [E, k]), Ye =
|
|
233
|
+
}, children: e(qd, {}) }), [E, k]), Ye = W(() => {
|
|
234
234
|
if (!K) return;
|
|
235
235
|
const H = { opacity: K ? 1 : "0", position: "absolute", top: "0px", left: "0px", width: "100%", height: "100%", boxSizing: "border-box" };
|
|
236
236
|
return e(ci, { fallback: e("div", { style: H, children: e(Lt, {}) }), children: e(Pp, { style: H, selectedColor: R ? R.toRGBA().toString() : "transparent", onColorChange: Fe, disableAlpha: c }) });
|
|
237
|
-
}, [K, R]), ve =
|
|
237
|
+
}, [K, R]), ve = W(() => ({ onClick: ee, alphaGrey: V.palette.text.icon ?? V.palette.action.active }), [ee, V]), je = W(() => {
|
|
238
238
|
if (!f) return null;
|
|
239
239
|
const H = { description: w, definition: { val: f.getVal(), adjs: f.getAdjustments() } };
|
|
240
|
-
return e(se, { children:
|
|
241
|
-
|
|
240
|
+
return e(se, { children: j(pi, { sx: { display: "flex", color: (oe) => oe.palette.text.secondary }, onMouseOver: () => {
|
|
241
|
+
z(null);
|
|
242
242
|
}, onClick: () => {
|
|
243
243
|
Le(null);
|
|
244
|
-
}, children: [e(A, { sx: { flex: "none", boxShadow: (oe) => oe.shadows[2], borderRadius: (oe) => oe.spacing(0.5), overflow: "hidden" }, children: e(
|
|
245
|
-
}, [f, w,
|
|
246
|
-
return
|
|
244
|
+
}, children: [e(A, { sx: { flex: "none", boxShadow: (oe) => oe.shadows[2], borderRadius: (oe) => oe.spacing(0.5), overflow: "hidden" }, children: e(br, { schemeColorLookup: I, colorDef: H, selectedColor: o === null ? f : o, previewColor: t === null ? f : t, defaultButtonSize: s, isLarge: !0, darkMode: k, compareRGB: v, swatchProps: ve }) }), e(Oe, { noWrap: !0, component: "div", style: { display: "flex", flex: "1 1 100%", marginLeft: "8px", userSelect: "none" }, children: w })] }) });
|
|
245
|
+
}, [f, w, I, o, t]);
|
|
246
|
+
return j(A, { ref: i, sx: { width: m, outline: "none", padding: "10px 10px", overflow: "hidden", boxSizing: "content-box" }, ...T, children: [j("div", { style: { position: "relative", display: "flex" }, children: [j("div", { style: { opacity: K ? "0" : 1 }, children: [je && C === Eo.Start ? j(se, { children: [je, e(lo, { light: !0, style: { marginTop: "2px", marginBottom: "10px" } })] }) : null, e(jo, { title: "Theme Colors", schemeColorLookup: I, colorDefs: E.primaryColors, selectedColor: o, previewColor: t === void 0 ? o : t, swatchProps: ve, onPreviewColorDef: z, onSelectColorDef: Le, compareRGB: v, darkMode: k }), e(jo, { schemeColorLookup: I, colorDefs: E.modifiedPresets, selectedColor: o, previewColor: t === void 0 ? o : t, swatchProps: ve, onPreviewColorDef: z, onSelectColorDef: Le, compareRGB: v, darkMode: k }), e(lo, { light: !0, style: { marginBottom: "10px" } }), e(jo, { title: "Standard Colors", schemeColorLookup: I, colorDefs: E.standardColors, selectedColor: o, previewColor: t === void 0 ? o : t, swatchProps: ve, onPreviewColorDef: z, onSelectColorDef: Le, compareRGB: v, darkMode: k }), j("div", { style: { opacity: E.recentColorsLimited.length === 0 ? "0" : void 0, display: E.recentColorsLimited.length === 0 ? "none" : void 0 }, children: [e(lo, { light: !0, style: { marginBottom: "10px" } }), e(jo, { title: "Recent Colors", schemeColorLookup: I, colorDefs: E.recentColorsLimited, selectedColor: o, previewColor: t === void 0 ? o : t, swatchProps: ve, onPreviewColorDef: z, onSelectColorDef: Le, compareRGB: v, darkMode: k })] }), je && C === Eo.End ? j(se, { children: [e(lo, { light: !0, sx: { marginTop: "2px", marginBottom: "2px" } }), je, e("div", { style: { marginBottom: "2px" } })] }) : null] }), Ye] }), e(lo, { light: !0, style: { marginBottom: "10px" } }), j("div", { style: { display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "space-around", gap: "8px", paddingLeft: "2px", paddingRight: "2px" }, children: [Be, e("div", { style: { flex: "1 1 100%", background: "pink" } }), e(nn, { style: { minWidth: "75px", maxWidth: "75px" }, value: "check", variant: "outlined", size: "small", onClick: () => {
|
|
247
247
|
q();
|
|
248
248
|
}, children: e("div", K ? { children: "Preset" } : { children: "Custom" }) }), e(nn, { variant: "contained", size: "small", style: { minWidth: "75px" }, onClick: () => {
|
|
249
249
|
Promise.resolve(h?.()).then(() => {
|
|
@@ -255,113 +255,113 @@ const yp = Y(J((r, i) => {
|
|
|
255
255
|
}), v = t || w || o || p?.autoColor, k = Se(!1), T = G(() => {
|
|
256
256
|
}, []), R = te(() => {
|
|
257
257
|
C(o);
|
|
258
|
-
}, [o]),
|
|
258
|
+
}, [o]), N = te((E) => {
|
|
259
259
|
k.current || (C(E), x?.(E));
|
|
260
260
|
}, [x]), B = te((E) => {
|
|
261
261
|
k.current || (C(E), b?.(E));
|
|
262
262
|
}, [b]), P = te((E, K) => {
|
|
263
263
|
k.current || (C(void 0), f?.(E, K));
|
|
264
|
-
}, [f]), S =
|
|
264
|
+
}, [f]), S = W(() => e(A, { sx: { width: "24px", height: "24px", color: "inherit", "--sxl-color-active": `${v?.toCSS(u) ?? "transparent"}`, "& .activeColor": { fill: `${v?.toCSS(u) ?? "transparent"}` }, "& .style_grey": { fill: (E) => E.palette.text.icon ?? E.palette.action.active } }, children: typeof n == "function" ? n() : n }), [v, n, u]), M = te((E) => {
|
|
265
265
|
f?.(t, !1);
|
|
266
266
|
}, [f, t]), [L, O] = U(!1), V = G((E) => {
|
|
267
267
|
const { closeFloat: K, closeFloatAll: Q } = E;
|
|
268
268
|
return e(Rp, { ...p, selectedColor: o, previewColor: w, onDone: h ? Q : K, onKeyDown: (q) => {
|
|
269
269
|
q.which === be.Enter && (h ? Q() : K());
|
|
270
|
-
}, onPreviewColorImmediate: B, onPreviewColor:
|
|
271
|
-
}, [o, w, h, v, p?.autoColor, u]),
|
|
272
|
-
return m === nt.Toolbar ? e(vt, { ref: i, ...
|
|
273
|
-
})), tn = 82,
|
|
270
|
+
}, onPreviewColorImmediate: B, onPreviewColor: N, onSelectColor: P, onEyeDropStart: () => O(!0), onEyeDropStop: () => O(!1), compareRGB: d, darkMode: u });
|
|
271
|
+
}, [o, w, h, v, p?.autoColor, u]), I = { onQuickClick: t ? M : void 0, createPopupPanel: V, popupProps: { popperProps: { resizeOnOverflow: !1 } }, onPopupOpen: R, onPopupClose: T, tooltip: l || c || "Color", label: c, icon: S, ...y };
|
|
272
|
+
return m === nt.Toolbar ? e(vt, { ref: i, ...I }) : e(cr, { ref: i, ...I });
|
|
273
|
+
})), tn = 82, fa = (r) => {
|
|
274
274
|
const { styleColor: i, length: o = tn, width: t = 1, dashArray: n = null, sx: l, isDouble: c = !1, isAngled: g = !1, darkMode: a = !1, ...s } = r;
|
|
275
|
-
return e(
|
|
276
|
-
},
|
|
275
|
+
return e(ir, { sx: { width: `${o}px`, height: `${t}px`, color: "inherit", overflow: "visible", "& .activeColor": { stroke: (m) => `${i ? i.toRGBA(a).toString() : m.palette.text.icon ?? m.palette.action.active}` }, "& .style_grey": { stroke: (m) => m.palette.text.icon ?? m.palette.action.active }, ...l }, height: t, width: o, viewBox: `0 0 ${o} ${t}`, ...s, children: e(ap, { length: o, width: t, dashArray: n, isDouble: c, isAngled: g, className: "activeColor" }) });
|
|
276
|
+
}, Ip = Y(J((r, i) => {
|
|
277
277
|
const { variant: o, showLabels: t = !1, disabled: n = !1, createPopupPanel: l, styleColor: c, selectedStyle: g, onSelectStyle: a, showNone: s = !0, darkMode: m, sx: p, ...h } = r, d = te(a, []), u = G((f) => {
|
|
278
278
|
const { popupContainer: w, floatReference: C, closeFloat: v, ...k } = f, T = [], R = Ce.BuiltInDefinitionsArray;
|
|
279
|
-
for (let
|
|
280
|
-
const B = R[
|
|
279
|
+
for (let N = 0; N < R.length; N++) {
|
|
280
|
+
const B = R[N];
|
|
281
281
|
if (B.description === "None" && !s) continue;
|
|
282
|
-
const P = e(
|
|
282
|
+
const P = e(fa, { styleColor: c, length: tn, width: B.width, darkMode: m, dashArray: B.pattern, isDouble: B.description.toLowerCase().includes("double"), isAngled: B.description.toLowerCase().includes("slant") });
|
|
283
283
|
let S = null;
|
|
284
|
-
S = t ?
|
|
284
|
+
S = t ? j(se, { children: [e(A, { sx: { marginRight: "6px" }, children: B.description }), j(A, { sx: { marginLeft: "6px", marginRight: "6px", display: "flex", alignItems: "center", flex: "1 1 100%" }, children: [e("div", { style: { flex: "1 1 100%" } }), P] })] }) : B.description === "None" ? "None" : P, T.push(e(pt, { className: "border-stroke", tabIndex: 0, sx: { height: "28px", "& svg path.activeColor": { filter: Gr(4) }, paddingLeft: "16px", background: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})` }, tooltipProps: { description: t ? "" : B.description }, icon: null, disabled: n, onMouseDown: (M) => M.preventDefault(), onMouseUp: () => {
|
|
285
285
|
v(), d(B.style);
|
|
286
286
|
}, onKeyDown: (M) => {
|
|
287
287
|
M.which === be.Enter && v();
|
|
288
|
-
}, selected: B.style === g, parentFloat: C, children: S },
|
|
288
|
+
}, selected: B.style === g, parentFloat: C, children: S }, N));
|
|
289
289
|
}
|
|
290
290
|
return e(A, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, children: T });
|
|
291
|
-
}, [n, s, c, g, m]), y =
|
|
291
|
+
}, [n, s, c, g, m]), y = W(() => {
|
|
292
292
|
const f = Ce.BuiltInDefinitions.get(g);
|
|
293
293
|
let w;
|
|
294
|
-
return w = f.description === "None" ? e(A, { sx: { minWidth: `${tn}px` }, children: "None" }) : e(
|
|
295
|
-
}, [g, c]), x =
|
|
296
|
-
return o === nt.Toolbar ? e(vt, { ...b }) : e(
|
|
297
|
-
})),
|
|
294
|
+
return w = f.description === "None" ? e(A, { sx: { minWidth: `${tn}px` }, children: "None" }) : e(fa, { styleColor: c, length: tn, width: f.width, dashArray: f.pattern, darkMode: m, isDouble: f.description.toLowerCase().includes("double"), isAngled: f.description.toLowerCase().includes("slant") }), e(A, { className: "border-stroke", sx: { paddingLeft: "12px", marginLeft: "4px", marginRight: "4px", height: "24px", display: "flex", alignItems: "center", "& svg path.activeColor": { filter: Gr() } }, children: w });
|
|
295
|
+
}, [g, c]), x = W(() => Ce.BuiltInDefinitions.get(g), [g]), b = { disabled: n, icon: y, tooltip: "Border Style: " + x.description, sx: { background: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})`, ...p }, createPopupPanel: u, ...h };
|
|
296
|
+
return o === nt.Toolbar ? e(vt, { ...b }) : e(cr, { ...b });
|
|
297
|
+
})), Np = Y(J((r, i) => {
|
|
298
298
|
const { autoColor: o = null, schemeLookup: t, autoStrokeStyle: n = Ce.StrokeStyle.Thin, disabled: l = !1, darkMode: c = !1, showStylingBefore: g = !0, onSelectBorder: a, onPreviewBorder: s, selectedBorder: m, createTemporaryBorder: p, ...h } = r, d = te(a, [a]), u = te(s, [s]), [y, x] = U(), [b, f] = U(), w = y ?? n, C = b ?? o, v = m || { bottom: { style: n, color: o?.toString() } }, k = te((S) => {
|
|
299
299
|
const M = {}, L = S ? Object.keys(S) : [];
|
|
300
300
|
let O = !1;
|
|
301
301
|
for (let ne = 0; ne < L.length; ne++) S[L[ne]]?.style && (M[L[ne]] = { style: S[L[ne]].style, color: S[L[ne]].color }, O || M[L[ne]].style === Ce.StrokeStyle.None || (O = !0));
|
|
302
302
|
L.length < 6 && (O = !0);
|
|
303
|
-
const V = O ? M.left : null,
|
|
303
|
+
const V = O ? M.left : null, I = O ? M.top : null, E = O ? M.right : null, K = O ? M.bottom : null, Q = O ? M.vertical : null, q = O ? M.horizontal : null;
|
|
304
304
|
let _ = "";
|
|
305
|
-
return
|
|
305
|
+
return I || V || (_ += "M 3,5 H 5 V 3 H 3 "), I || (_ += "M 7,5 H 9 V 3 H 7 "), I || Q || (_ += "M 11,5 h 2 V 3 h -2 "), I || (_ += "M 15,5 h 2 V 3 h -2 "), I || E || (_ += "M 19,5 h 2 V 3 h -2 "), V || (_ += "M 3,9 H 5 V 7 H 3 "), Q || (_ += "M 11,9 h 2 V 7 h -2 "), E || (_ += "M 19,9 h 2 V 7 h -2 "), q || V || (_ += "M 3,13 H 5 V 11 H 3 "), q || (_ += "M 7,13 H 9 V 11 H 7 "), q || Q || (_ += "M 11,13 h 2 v -2 h -2 "), q || E || (_ += "M 19,13 h 2 v -2 h -2 "), q || (_ += "M 15,13 h 2 v -2 h -2 "), V || (_ += "M 3,17 H 5 V 15 H 3 "), Q || (_ += "M 11,17 h 2 v -2 h -2 "), E || (_ += "M 19,17 h 2 v -2 h -2 "), K || V || (_ += "M 3,21 H 5 V 19 H 3 "), K || (_ += "M 7,21 H 9 V 19 H 7 "), K || Q || (_ += "M 11,21 h 2 v -2 h -2 "), K || (_ += "M 15,21 h 2 v -2 h -2 "), K || E || (_ += "M 19,21 h 2 v -2 h -2 "), j("div", { style: { width: "24px", height: "24px", position: "relative" }, children: [e(ir, { sx: { position: "absolute", top: "0px", left: "0px", "& path": { opacity: "0.8", transform: "translate(-0.5px, -0.5px)" } }, children: e("path", { d: _ }) }), e(A, { sx: { width: "24px", height: "24px", display: "flex", alignItems: "center", justifyContent: "center", position: "absolute", top: "-1px", left: "-1px", "& svg path": { filter: _s } }, children: e(hr, { getBorderAt: (ne, le) => {
|
|
306
306
|
if (!p || L.length === 0) return null;
|
|
307
|
-
const X = ne.rowIndex,
|
|
308
|
-
return X === 0 ? (ee.top = M.top, ee.bottom = M.horizontal) : (ee.top = M.horizontal, ee.bottom = M.bottom),
|
|
307
|
+
const X = ne.rowIndex, z = ne.colIndex, ee = {};
|
|
308
|
+
return X === 0 ? (ee.top = M.top, ee.bottom = M.horizontal) : (ee.top = M.horizontal, ee.bottom = M.bottom), z === 0 ? (ee.left = M.left, ee.right = M.vertical) : (ee.left = M.vertical, ee.right = M.right), p?.(ee);
|
|
309
309
|
}, width: 18, height: 18, darkMode: c, style: { top: "0px", left: "0px", width: "18px", height: "18px", minWidth: "18px", minHeight: "18px", position: "relative" } }) })] });
|
|
310
310
|
}, [C, w, c]), T = G((S, M, L) => {
|
|
311
311
|
let O = null;
|
|
312
312
|
if (S && S.length > 0) {
|
|
313
313
|
let V = null;
|
|
314
314
|
(M || L) && (V = { style: L, color: M?.toString() ?? null }), O = {};
|
|
315
|
-
for (let
|
|
315
|
+
for (let I = 0; I < S.length; I++) O[S[I]] = V;
|
|
316
316
|
}
|
|
317
317
|
return O;
|
|
318
318
|
}, []), R = G((S) => {
|
|
319
319
|
d?.(S);
|
|
320
|
-
}, []),
|
|
320
|
+
}, []), N = G((S) => {
|
|
321
321
|
u?.(S);
|
|
322
322
|
}, []), B = G((S) => {
|
|
323
323
|
const { closeFloatAll: M, floatReference: L } = S, O = (E, K, Q = "bottom", q = !1) => {
|
|
324
324
|
const _ = T(E, C ?? null, q ? Ce.StrokeStyle.None : w ?? null), ne = q ? T([], C ?? null, w ?? null) : _;
|
|
325
|
-
return e(bt, { icon: k(ne), sx: { background: `linear-gradient(${he("#fff",
|
|
326
|
-
M(),
|
|
325
|
+
return e(bt, { icon: k(ne), sx: { background: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})` }, tooltipProps: { label: K, simple: !0, placement: Q }, onClick: () => {
|
|
326
|
+
M(), N(_), R(_);
|
|
327
327
|
} });
|
|
328
|
-
}, V =
|
|
328
|
+
}, V = j(se, { children: [j(A, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [O([Ce.Edge.Left, Ce.Edge.Top, Ce.Edge.Right, Ce.Edge.Bottom, Ce.Edge.Horizontal, Ce.Edge.Vertical], "All Borders", "top"), O([Ce.Edge.Horizontal, Ce.Edge.Vertical], "Inner Borders", "top"), O([Ce.Edge.Horizontal], "Inside Horizontal Borders", "top"), O([Ce.Edge.Vertical], "Inside Vertical Borders", "top"), O([Ce.Edge.Left, Ce.Edge.Top, Ce.Edge.Right, Ce.Edge.Bottom], "Outside Borders", "top")] }), j(A, { sx: { display: "flex", padding: "6px 16px", justifyContent: "center", rowGap: "2px", gap: "2px" }, children: [O([Ce.Edge.Left], "Left Borders"), O([Ce.Edge.Top], "Top Borders"), O([Ce.Edge.Right], "Right Borders"), O([Ce.Edge.Bottom], "Bottom Borders"), O([Ce.Edge.Left, Ce.Edge.Top, Ce.Edge.Right, Ce.Edge.Bottom, Ce.Edge.Horizontal, Ce.Edge.Vertical, Ce.Edge.DiagonalUp, Ce.Edge.DiagonalDown], "No Borders", "bottom", !0)] })] }), I = e(se, { children: j(A, { sx: { display: "flex", padding: "6px 16px", flexDirection: "row", gap: "6px" }, children: [e(Pi, { variant: nt.Toolbar, icon: e(dr, {}), selectedColor: w === Ce.StrokeStyle.None ? new ft("transparent") : C, onPreviewColor: (E) => {
|
|
329
329
|
f(E);
|
|
330
330
|
}, onSelectColor: (E, K) => {
|
|
331
331
|
f(E);
|
|
332
|
-
}, darkMode: c, tooltip: "Border Color", panelProps: { disableAlpha: !0, autoColor: o, schemeLookup: t }, disabled: l || w === Ce.StrokeStyle.None, parentFloat: L, shouldCloseFloatAll: !1 }), e(
|
|
333
|
-
return
|
|
334
|
-
}, [w, C, o, t, c]), P =
|
|
332
|
+
}, darkMode: c, tooltip: "Border Color", panelProps: { disableAlpha: !0, autoColor: o, schemeLookup: t }, disabled: l || w === Ce.StrokeStyle.None, parentFloat: L, shouldCloseFloatAll: !1 }), e(Ip, { selectedStyle: w, onSelectStyle: x, styleColor: C, darkMode: c, variant: nt.Toolbar, parentFloat: L })] }) });
|
|
333
|
+
return j(A, { sx: { display: "flex", flexDirection: "column", paddingTop: "4px", paddingBottom: "4px" }, onClick: (E) => E.stopPropagation(), children: [g ? I : V, e(re, { orientation: "horizontal" }), g ? V : I] });
|
|
334
|
+
}, [w, C, o, t, c]), P = W(() => k(v), [v, c]);
|
|
335
335
|
return e(vt, { ref: i, createPopupPanel: B, popupProps: { popperProps: { resizeOnOverflow: !1 } }, createTooltip: ({ children: S }, M) => e(rt, { label: "Borders", description: "Set the borders.", disabled: M, children: S }), onQuickClick: () => {
|
|
336
336
|
d?.(v);
|
|
337
337
|
}, quickButtonProps: { sx: {} }, disabled: l, icon: P, ...h });
|
|
338
338
|
})), Fp = Y(J((r, i) => {
|
|
339
|
-
const { commands: o, command: t, commandHook: n, variant: l = ie.Toolbar, disabled: c = !1, autoColor: g, autoStrokeStyle: a, schemeLookup: s, createTemporaryBorder: m, selectedBorder: p, onSelectBorder: h, darkMode: d, icon: u, label: y, ...x } = r, b = He(o, ["formatBorder"]), f = t ?? b[0], w = f?.context() ?? null, C = w?.autoColor ?? g, v = w?.autoStyle ?? a, k = p ?? w?.quickBorder, T = d ?? w?.darkMode, R = m ?? w?.createTemporaryBorder,
|
|
339
|
+
const { commands: o, command: t, commandHook: n, variant: l = ie.Toolbar, disabled: c = !1, autoColor: g, autoStrokeStyle: a, schemeLookup: s, createTemporaryBorder: m, selectedBorder: p, onSelectBorder: h, darkMode: d, icon: u, label: y, ...x } = r, b = He(o, ["formatBorder"]), f = t ?? b[0], w = f?.context() ?? null, C = w?.autoColor ?? g, v = w?.autoStyle ?? a, k = p ?? w?.quickBorder, T = d ?? w?.darkMode, R = m ?? w?.createTemporaryBorder, N = s ?? w?.schemeLookup, B = te((S) => {
|
|
340
340
|
w?.onBorderSelect && w.onBorderSelect(S), h?.(S), f?.execute(S, n);
|
|
341
341
|
}, [f, h, n]), P = G((S, M) => {
|
|
342
342
|
const { children: L, title: O, ...V } = S;
|
|
343
|
-
let
|
|
344
|
-
return (f?.disabled() || c) && (
|
|
343
|
+
let I = S.children;
|
|
344
|
+
return (f?.disabled() || c) && (I = e("div", { children: I })), e(pr, { command: f, placement: l === ie.Toolbar ? "bottom-start" : "right-start", disabled: M, ...V, children: I });
|
|
345
345
|
}, [f, c]);
|
|
346
|
-
return e(
|
|
346
|
+
return e(Np, { ref: i, autoColor: C, darkMode: T, autoStrokeStyle: v, createTemporaryBorder: R, schemeLookup: N, selectedBorder: k, onSelectBorder: B, createTooltip: P, disabled: c || !f || f.disabled(), ...x });
|
|
347
347
|
})), Op = Y(J((r, i) => {
|
|
348
348
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = G((a, s) => {
|
|
349
|
-
const m = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, p =
|
|
349
|
+
const m = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, p = j(se, { children: [e(F, { ...m, command: s.getCommand("mergeToggle"), icon: D(e(qr, {})) }), e(F, { ...m, command: s.getCommand("mergeHorizontal"), icon: D(e(Us, {})) }), e(F, { ...m, command: s.getCommand("mergeVertical"), icon: D(e(Gs, {})) }), e(re, { orientation: "horizontal" }), e(F, { ...m, command: s.getCommand("unmerge"), icon: D(e(mi, {})) })] });
|
|
350
350
|
return xe({ ...a, children: p });
|
|
351
351
|
}, [l, t, n]);
|
|
352
|
-
return e(Re, { ref: i, commands: o, quickCommand: "mergeToggle", commandHook: t, scope: n, tooltip: "Combine or split cells.", createPopupPanel: g, icon: D(e(
|
|
352
|
+
return e(Re, { ref: i, commands: o, quickCommand: "mergeToggle", commandHook: t, scope: n, tooltip: "Combine or split cells.", createPopupPanel: g, icon: D(e(qr, {})), ...c });
|
|
353
353
|
})), Ap = Y(J((r, i) => {
|
|
354
354
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = G((a, s) => {
|
|
355
|
-
const m = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, p =
|
|
355
|
+
const m = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, p = j(se, { children: [e(F, { ...m, command: s.getCommand("freezeToggle"), icon: D(e(qs, {})) }), e(F, { ...m, command: s.getCommand("freezeToggleHorizontal"), icon: D(e(Xs, {})) }), e(F, { ...m, command: s.getCommand("freezeToggleVertical"), icon: D(e(Ks, {})) }), e(re, { orientation: "horizontal" }), e(F, { ...m, command: s.getCommand("unfreeze"), icon: e(mi, {}) })] });
|
|
356
356
|
return xe({ ...a, children: p });
|
|
357
357
|
}, [l, t, n]);
|
|
358
358
|
return e(Re, { ref: i, commands: o, commandHook: t, createPopupPanel: g, 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: e(Ys, {}), ...c });
|
|
359
359
|
})), Bp = Y(J((r, i) => {
|
|
360
360
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = G((a, s) => {
|
|
361
|
-
const m = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, p =
|
|
361
|
+
const m = { variant: ie.Menuitem, commandHook: t, scope: n, disabled: l }, p = j(se, { children: [e(F, { ...m, command: s.getCommand("find"), icon: D(e(Xr, {})) }), e(F, { ...m, command: s.getCommand("findReplace"), icon: D(e(Zs, {})) }), e(F, { ...m, command: s.getCommand("goto"), icon: D(e(Js, {})) })] });
|
|
362
362
|
return xe({ ...a, children: p });
|
|
363
363
|
}, [l, t, n]);
|
|
364
|
-
return e(Re, { ref: i, commands: o, commandHook: t, createPopupPanel: g, label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: D(e(
|
|
364
|
+
return e(Re, { ref: i, commands: o, commandHook: t, createPopupPanel: g, label: "Find & Select", tooltip: "Find and replace cells or go to a specific location.", quickCommand: "find", icon: D(e(Xr, {})), ...c });
|
|
365
365
|
})), Lp = Y(J((r, i) => {
|
|
366
366
|
const { command: o, commandHook: t, showQuickButtons: n = !!r.commands, commands: l, fontSizes: c = ip.DefaultFontSizes, disabled: g = !1, parentFloat: a, icon: s, label: m, sx: p, ...h } = r;
|
|
367
367
|
Ht(o);
|
|
@@ -372,13 +372,13 @@ const yp = Y(J((r, i) => {
|
|
|
372
372
|
ue(() => {
|
|
373
373
|
y(d());
|
|
374
374
|
}, [o?.state()]);
|
|
375
|
-
const b =
|
|
375
|
+
const b = W(() => {
|
|
376
376
|
if (!t) return null;
|
|
377
377
|
const R = { ...t };
|
|
378
378
|
return delete R.beforeExecute, R;
|
|
379
|
-
}, [t]), f = He(l, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), w =
|
|
380
|
-
const { onMouseDown:
|
|
381
|
-
return e(dt, { component: "div", ...P, disableRipple: !0, children: e(
|
|
379
|
+
}, [t]), f = He(l, ["formatFontSizeIncrease", "formatFontSizeDecrease"]), w = W(() => f ? j(A, { className: Ae("quick-buttons", {}), sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (R) => R.stopPropagation(), children: [e(F, { command: f[0], commandHook: b, icon: D(e(Qs, {})) }), e(F, { command: f[1], icon: D(e(ec, {})) })] }) : null, [f]), C = at(), v = W(() => `${Bt.getSharedMeasurer()("12.3", Math.round(C.typography.fontSize), C.typography.fontFamily).width}px`, [C]), k = G((R) => {
|
|
380
|
+
const { onMouseDown: N, onMouseUp: B, ...P } = R;
|
|
381
|
+
return e(dt, { component: "div", ...P, disableRipple: !0, children: e(lr, { inputMode: "numeric", disabled: g || !o || o.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: (S) => `1px solid ${S.palette.text.icon ?? S.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (S) => `1px solid ${S.palette.error.main}` }, "::after": { borderBottom: (S) => `1px solid ${S.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", paddingLeft: "0px", paddingRight: "0px", fontSize: (S) => `${Math.round(S.typography.fontSize)}px`, width: v, color: (S) => S.palette.text.secondary, input: { padding: "0 0", textAlign: "center", MozAppearance: "textfield", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (S) => S.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (S) => S.palette.text.primary } }, "input::-webkit-inner-spin-button": { WebkitAppearance: "none", margin: "0" }, minHeight: "24px" }, value: u, onFocus: (S) => {
|
|
382
382
|
S.target?.select();
|
|
383
383
|
}, onKeyDown: (S) => {
|
|
384
384
|
if (S.which === be.Enter) d() !== u && (S.stopPropagation(), S.preventDefault(), x());
|
|
@@ -396,7 +396,7 @@ const yp = Y(J((r, i) => {
|
|
|
396
396
|
y(S.target.value);
|
|
397
397
|
} }) });
|
|
398
398
|
}, [u, g, o]), T = G((R) => {
|
|
399
|
-
const
|
|
399
|
+
const N = (M) => {
|
|
400
400
|
o?.execute(M, t);
|
|
401
401
|
}, B = o?.state(), P = [];
|
|
402
402
|
for (let M = 0; M < c.length; M++) {
|
|
@@ -404,16 +404,16 @@ const yp = Y(J((r, i) => {
|
|
|
404
404
|
P.push(e(pt, { selected: L, icon: L ? e(sn, {}) : void 0, disabled: g || !o || o.disabled(), onMouseDown: (O) => {
|
|
405
405
|
O.button === 0 && O.preventDefault();
|
|
406
406
|
}, onMouseUp: (O) => {
|
|
407
|
-
O.button === 0 &&
|
|
407
|
+
O.button === 0 && N(c[M]);
|
|
408
408
|
}, onKeyDown: (O) => {
|
|
409
|
-
O.keyCode !== be.Enter && O.keyCode !== be.Space ||
|
|
409
|
+
O.keyCode !== be.Enter && O.keyCode !== be.Space || N(c[M]);
|
|
410
410
|
}, sx: { paddingTop: "4px", paddingBottom: "4px" }, children: e(A, { sx: { display: "flex", flex: "1 1 100%", justifyContent: "end" }, children: c[M] }) }, "fontSize-" + M));
|
|
411
411
|
}
|
|
412
|
-
const S =
|
|
412
|
+
const S = j(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...h, children: [w, e(re, { orientation: "horizontal" }), e(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: P })] });
|
|
413
413
|
return xe({ ...R, children: S });
|
|
414
414
|
}, [g, o?.state(), t]);
|
|
415
|
-
return e(vt, { ref: i, sx: { ...p }, tabIndex: -1, outlined: !0, disabled: g, parentFloat: a, createPopupPanel: T, createTooltip: ({ children: R },
|
|
416
|
-
})),
|
|
415
|
+
return e(vt, { ref: i, sx: { ...p }, tabIndex: -1, outlined: !0, disabled: g, parentFloat: a, createPopupPanel: T, createTooltip: ({ children: R }, N) => e(rt, { label: o?.label(), description: o?.description(), disabled: N || o?.disabled(), children: R }), createQuickButton: k, ...h });
|
|
416
|
+
})), ba = Y((r) => {
|
|
417
417
|
const { selected: i, disabled: o, formattedValue: t, handleSetFormat: n, format: l, sx: c, ...g } = r;
|
|
418
418
|
return e(pt, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...c }, disabled: o, selected: i, icon: i ? e(sn, {}) : void 0, onMouseDown: (a) => {
|
|
419
419
|
a.button === 0 && a.preventDefault();
|
|
@@ -421,9 +421,9 @@ const yp = Y(J((r, i) => {
|
|
|
421
421
|
a.button === 0 && n(l.numberFormat);
|
|
422
422
|
}, onKeyDown: (a) => {
|
|
423
423
|
a.keyCode !== be.Enter && a.keyCode !== be.Space || n(l.numberFormat);
|
|
424
|
-
}, ...g, children:
|
|
424
|
+
}, ...g, children: j(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [j(Oe, { component: "div", children: [l.formatType, l.formatType === gt.Type.Custom ? "…" : ""] }), e(Oe, { variant: "caption", component: "div", sx: { color: (a) => Qe(a.palette.text.primary, 0.6), paddingTop: t && t.length > 0 ? "1px" : void 0, overflow: "hidden", textOverflow: "ellipsis" }, children: t && t.length > 0 ? t : " " })] }) });
|
|
425
425
|
}), Hp = Y(J((r, i) => {
|
|
426
|
-
const { commands: o, commandHook: t, scope: n, sx: l, disabled: c = !1, parentFloat: g, ...a } = r, s = He(o, ["formatNumberFormat"])[0], m = s?.state() ? gt.Styles.lookupStyle(s?.state()).formatType : gt.Type.General, p =
|
|
426
|
+
const { commands: o, commandHook: t, scope: n, sx: l, disabled: c = !1, parentFloat: g, ...a } = r, s = He(o, ["formatNumberFormat"])[0], m = s?.state() ? gt.Styles.lookupStyle(s?.state()).formatType : gt.Type.General, p = W(() => {
|
|
427
427
|
if (!t) return null;
|
|
428
428
|
const y = { ...t };
|
|
429
429
|
return delete y.beforeExecute, y;
|
|
@@ -440,61 +440,61 @@ const yp = Y(J((r, i) => {
|
|
|
440
440
|
}
|
|
441
441
|
P === "" && w[B].formatType === gt.Type.General && (P = "No specific format");
|
|
442
442
|
const S = w[B].formatType === m;
|
|
443
|
-
C.push(e(
|
|
443
|
+
C.push(e(ba, { selected: S, disabled: c || !s || s.disabled(), formattedValue: P, handleSetFormat: b, format: w[B] }, w[B].formatType));
|
|
444
444
|
}
|
|
445
|
-
const v = { numberFormat: "", formatType: gt.Type.Custom }, k = m === gt.Type.Custom, T = e(
|
|
445
|
+
const v = { numberFormat: "", formatType: gt.Type.Custom }, k = m === gt.Type.Custom, T = e(ba, { selected: k, disabled: c || !s || s.disabled(), formattedValue: k ? f.getNumberFormat().displayText : "", handleSetFormat: () => {
|
|
446
446
|
t?.beforeExecute?.(s, s?.state()), x.getCommand("formatNumberDialog")?.execute(s?.state()), t?.onExecute?.(s, s?.state());
|
|
447
|
-
}, format: v, sx: { flex: "0", width: "100%" } }, gt.Type.Custom), R =
|
|
448
|
-
return xe({ ...y, children:
|
|
449
|
-
}, [s?.context(), s?.state(), t, n]), d = at(), u =
|
|
447
|
+
}, format: v, sx: { flex: "0", width: "100%" } }, gt.Type.Custom), R = j(A, { className: "quick-buttons", sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClick: (B) => B.stopPropagation(), children: [e(F, { command: x.getCommand("formatNumberFormatAccountingStyle"), commandHook: p, scope: n, icon: e(tc, {}) }), e(F, { command: x.getCommand("formatNumberFormatPercentStyle"), commandHook: p, scope: n, icon: e(oc, {}) }), e(F, { command: x.getCommand("formatNumberFormatCommaStyle"), commandHook: p, scope: n, icon: e(nc, {}) }), e(F, { command: x.getCommand("formatNumberFormatIncreaseDecimal"), commandHook: p, scope: n, icon: D(e(rc, {})) }), e(F, { command: x.getCommand("formatNumberFormatDecreaseDecimal"), commandHook: p, scope: n, icon: D(e(ac, {})) })] }), N = j(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...a, children: [R, e(re, { orientation: "horizontal" }), e(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: C }), e(re, { orientation: "horizontal" }), T] });
|
|
448
|
+
return xe({ ...y, children: N });
|
|
449
|
+
}, [s?.context(), s?.state(), t, n]), d = at(), u = W(() => {
|
|
450
450
|
const y = gt.Type.MediumTime;
|
|
451
451
|
return `${Bt.getSharedMeasurer()(y, Math.round(d.typography.fontSize), d.typography.fontFamily).width}px`;
|
|
452
452
|
}, [d]);
|
|
453
453
|
return e(Re, { ref: i, commands: o, sx: l, outlined: !0, disabled: c, parentFloat: g, createPopupPanel: h, createTooltip: ({ children: y }, x) => e(rt, { label: s?.label(), description: s?.description(), disabled: x, children: y }), icon: e(A, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (y) => `${Math.round(y.typography.fontSize)}px`, color: (y) => y.palette.text.secondary, fontFamily: (y) => y.typography.fontFamily, width: u }, children: e(A, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m }) }), ...a });
|
|
454
454
|
})), Ri = Y(J((r, i) => {
|
|
455
455
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = G((a, s) => {
|
|
456
|
-
const m = { variant: ie.Menuitem, commandHook: t, scope: "clear", disabled: l }, p =
|
|
456
|
+
const m = { variant: ie.Menuitem, commandHook: t, scope: "clear", disabled: l }, p = j(se, { children: [e(F, { ...m, command: s.getCommand("clearAll"), icon: e(Kr, {}) }), e(F, { ...m, command: s.getCommand("clearFormats"), icon: D(e(gi, {})) }), e(F, { ...m, command: s.getCommand("clearContents"), icon: D(e(ic, {})) }), e(F, { ...m, command: s.getCommand("clearComments") }), e(F, { ...m, command: s.getCommand("clearHyperlinks") })] });
|
|
457
457
|
return xe({ ...a, children: p });
|
|
458
458
|
}, [l, t, n]);
|
|
459
|
-
return e(Re, { ref: i, commands: o, disabled: l, commandHook: t, scope: n, label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", createPopupPanel: g, icon: e(
|
|
459
|
+
return e(Re, { ref: i, commands: o, disabled: l, commandHook: t, scope: n, label: "Clear", tooltip: "Clear everything in the cell, or remove just the formatting or contents.", createPopupPanel: g, icon: e(Kr, {}), ...c });
|
|
460
460
|
})), zp = Y(J((r, i) => {
|
|
461
461
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = G((a, s) => {
|
|
462
|
-
const m = { variant: ie.Menuitem, commandHook: t, scope: "fill", disabled: l }, p =
|
|
462
|
+
const m = { variant: ie.Menuitem, commandHook: t, scope: "fill", disabled: l }, p = j(se, { children: [e(F, { ...m, command: s.getCommand("fillDown"), icon: D(e(so, {})) }), e(F, { ...m, command: s.getCommand("fillRight"), icon: D(e(so, { sx: { transform: "rotate(270deg)" } })) }), e(F, { ...m, command: s.getCommand("fillUp"), icon: D(e(so, { sx: { transform: "rotate(180deg)" } })) }), e(F, { ...m, command: s.getCommand("fillLeft"), icon: D(e(so, { sx: { transform: "rotate(90deg)" } })) })] });
|
|
463
463
|
return xe({ ...a, children: p });
|
|
464
464
|
}, [l, t, n]);
|
|
465
465
|
return e(Re, { ref: i, commands: o, disabled: l, commandHook: t, label: "Fill", tooltip: "Fill the selected cells with the value from one of the corners.", createPopupPanel: g, icon: D(e(so, {})), ...c });
|
|
466
466
|
})), Mi = Y(J((r, i) => {
|
|
467
|
-
const { commands: o, commandHook: t, scope: n, disabled: l = !1, disableSheet: c = !1, preferSingleMenu: g = !0, showQuickButton: a = !0, variant: s = ie.Toolbar, ...m } = r, p = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"], h = He(o, p), { singleCommand: d, allDisabled: u } =
|
|
467
|
+
const { commands: o, commandHook: t, scope: n, disabled: l = !1, disableSheet: c = !1, preferSingleMenu: g = !0, showQuickButton: a = !0, variant: s = ie.Toolbar, ...m } = r, p = ["insertCellsShiftDown", "insertCellsShiftRight", "insertRows", "insertColumns"], h = He(o, p), { singleCommand: d, allDisabled: u } = W(() => {
|
|
468
468
|
let b = null, f = 0;
|
|
469
469
|
for (let w = 0; w < h.length; w++) h[w] && !h[w]?.disabled() && (g && s === ie.Menuitem && (b = f === 0 ? h[w] : null), f++);
|
|
470
470
|
return { singleCommand: b, allDisabled: f === 0 };
|
|
471
|
-
}, [h]), y =
|
|
471
|
+
}, [h]), y = W(() => {
|
|
472
472
|
const b = /* @__PURE__ */ new Map();
|
|
473
|
-
return b.set("insertCellsShiftDown", D(e(
|
|
473
|
+
return b.set("insertCellsShiftDown", D(e(Yr, {}))), b.set("insertCellsShiftRight", D(e(Yr, { sx: { transform: "rotate(270deg)" } }))), b.set("insertRows", D(e(lc, {}))), b.set("insertColumns", D(e(Zr, {}))), b;
|
|
474
474
|
}, []), x = G((b, f) => {
|
|
475
475
|
let w = null;
|
|
476
476
|
const C = { variant: ie.Menuitem, commandHook: t, scope: "insertCells", disabled: l };
|
|
477
|
-
c || (w =
|
|
478
|
-
const v =
|
|
477
|
+
c || (w = j(se, { children: [e(re, { orientation: "horizontal" }), e(F, { ...C, command: f.getCommand("addSheet"), icon: D(e(rn, {})) })] }));
|
|
478
|
+
const v = j(se, { children: [e(F, { ...C, command: h[0], icon: y.get(p[0]) }), e(F, { ...C, command: h[1], icon: y.get(p[1]) }), e(re, { orientation: "horizontal" }), e(F, { ...C, command: h[2], icon: y.get(p[2]) }), e(F, { ...C, command: h[3], icon: y.get(p[3]) }), w] });
|
|
479
479
|
return xe({ ...b, children: v });
|
|
480
480
|
}, [l, h, t, n, y]);
|
|
481
|
-
return d ? e(F, { ref: i, variant: s, commandHook: t, disabled: l, command: d, icon: y.get(d.key()), ...m }) : e(Re, { ref: i, variant: s, quickCommand: "insertCells", commands: o, commandHook: t, scope: n, disabled: l || u, tooltip:
|
|
482
|
-
})),
|
|
483
|
-
const { commands: o, commandHook: t, scope: n, disabled: l = !1, disableSheet: c = !1, preferSingleMenu: g = !0, showQuickButton: a = !0, variant: s = ie.Toolbar, ...m } = r, p = He(o, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: h, allDisabled: d } =
|
|
481
|
+
return d ? e(F, { ref: i, variant: s, commandHook: t, disabled: l, command: d, icon: y.get(d.key()), ...m }) : e(Re, { ref: i, variant: s, quickCommand: "insertCells", commands: o, commandHook: t, scope: n, disabled: l || u, tooltip: j(se, { children: [e("span", { children: "Insert new cells, rows or columns to your workbook." }), e("br", {}), e("span", { children: "To insert multiple rows or columns at a time, select multiple rows or columns in the sheet and click Insert." })] }), createPopupPanel: x, icon: D(e(Zr, {})), ...m });
|
|
482
|
+
})), Ii = Y(J((r, i) => {
|
|
483
|
+
const { commands: o, commandHook: t, scope: n, disabled: l = !1, disableSheet: c = !1, preferSingleMenu: g = !0, showQuickButton: a = !0, variant: s = ie.Toolbar, ...m } = r, p = He(o, ["deleteCellsShiftUp", "deleteCellsShiftLeft", "deleteRows", "deleteColumns"]), { singleCommand: h, allDisabled: d } = W(() => {
|
|
484
484
|
let x = null, b = 0;
|
|
485
485
|
for (let f = 0; f < p.length; f++) p[f] && !p[f]?.disabled() && (g && s === ie.Menuitem && (x = b === 0 ? p[f] : null), b++);
|
|
486
486
|
return { singleCommand: x, allDisabled: b === 0 };
|
|
487
|
-
}, [p]), u =
|
|
487
|
+
}, [p]), u = W(() => {
|
|
488
488
|
const x = /* @__PURE__ */ new Map();
|
|
489
|
-
return x.set("deleteCellsShiftUp", D(e(
|
|
489
|
+
return x.set("deleteCellsShiftUp", D(e(Jr, { sx: { transform: "rotate(0deg)" } }))), x.set("deleteCellsShiftLeft", D(e(Jr, { sx: { transform: "rotate(270deg)" } }))), x.set("deleteRows", D(e(sc, {}))), x.set("deleteColumns", D(e(Qr, {}))), x;
|
|
490
490
|
}, []), y = G((x, b) => {
|
|
491
491
|
const f = { variant: ie.Menuitem, commandHook: t, scope: "deleteCells", disabled: l };
|
|
492
492
|
let w = null;
|
|
493
|
-
c || (w =
|
|
494
|
-
const C =
|
|
493
|
+
c || (w = j(se, { children: [e(re, { orientation: "horizontal" }), e(F, { ...f, command: b.getCommand("deleteSheet"), icon: D(e(rn, {})) })] }));
|
|
494
|
+
const C = j(se, { children: [e(F, { ...f, command: b.getCommand("deleteCellsShiftUp"), icon: u.get("deleteCellsShiftUp") }), e(F, { ...f, command: b.getCommand("deleteCellsShiftLeft"), icon: u.get("deleteCellsShiftLeft") }), e(re, { orientation: "horizontal" }), e(F, { ...f, command: b.getCommand("deleteRows"), icon: u.get("deleteRows") }), e(F, { ...f, command: b.getCommand("deleteColumns"), icon: u.get("deleteColumns") }), w] });
|
|
495
495
|
return xe({ ...x, children: C });
|
|
496
496
|
}, [l, t, n, u]);
|
|
497
|
-
return h ? e(F, { ref: i, variant: s, commandHook: t, disabled: l, command: h, icon: u.get(h.key()), ...m }) : e(Re, { ref: i, variant: s, quickCommand: "deleteCells", commands: o, commandHook: t, scope: n, disabled: l || d, tooltip:
|
|
497
|
+
return h ? e(F, { ref: i, variant: s, commandHook: t, disabled: l, command: h, icon: u.get(h.key()), ...m }) : e(Re, { ref: i, variant: s, quickCommand: "deleteCells", commands: o, commandHook: t, scope: n, disabled: l || d, tooltip: j(se, { children: [e("span", { children: "Delete cells, rows, columns or sheets from your workbook." }), e("br", {}), e("span", { children: "To delete multiple rows or columns at a time, select multiple rows or columns in the sheet and click Delete." })] }), createPopupPanel: y, icon: D(e(Qr, {})), ...m });
|
|
498
498
|
})), Mo = Y(J((r, i) => {
|
|
499
499
|
const { command: o, commandHook: t, onSelectColor: n, disabled: l = !1, variant: c = ie.Toolbar, quickColor: g, panelProps: a, isSplit: s = !1, darkMode: m, icon: p, ...h } = r, { autoColor: d, schemeLookup: u, recentColors: y, ...x } = a;
|
|
500
500
|
if (h.selectedColor) throw new Error("Command selectedColor will be used. Do not try to provide one as a direct argument");
|
|
@@ -502,34 +502,34 @@ const yp = Y(J((r, i) => {
|
|
|
502
502
|
const b = o?.context();
|
|
503
503
|
let f = g ?? b?.quickColor;
|
|
504
504
|
s && !f && (f = new ft("transparent"));
|
|
505
|
-
const w = d ?? b?.autoColor, C = u ?? b?.schemeLookup, v = y ?? b?.recentColors, k = m ?? b?.darkMode, T =
|
|
505
|
+
const w = d ?? b?.autoColor, C = u ?? b?.schemeLookup, v = y ?? b?.recentColors, k = m ?? b?.darkMode, T = W(() => ({ autoColor: w, schemeLookup: C, recentColors: v, darkMode: k, ...x }), [w, C, v, k]), R = te((B, P) => {
|
|
506
506
|
B && P && b?.addRecentColor && b.addRecentColor(B), b?.onColorSelect && b.onColorSelect(B), n?.(B, P), o?.execute(B, t);
|
|
507
|
-
}, [o, n, t, b]),
|
|
507
|
+
}, [o, n, t, b]), N = G((B, P) => {
|
|
508
508
|
const { children: S, title: M, ...L } = B;
|
|
509
509
|
let O = B.children;
|
|
510
|
-
return (o?.disabled() || l) && (O = e("div", { children: O })), e(
|
|
510
|
+
return (o?.disabled() || l) && (O = e("div", { children: O })), e(pr, { command: o, placement: c === ie.Toolbar ? "bottom-start" : "right-start", disabled: P, ...L, children: O });
|
|
511
511
|
}, [o, l]);
|
|
512
|
-
return e(Pi, { ref: i, panelProps: T, icon: p, quickColor: f, selectedColor: o?.state(), onSelectColor: R, variant: c === ie.Menuitem ? nt.Menuitem : nt.Toolbar, createTooltip:
|
|
512
|
+
return e(Pi, { ref: i, panelProps: T, icon: p, quickColor: f, selectedColor: o?.state(), onSelectColor: R, variant: c === ie.Menuitem ? nt.Menuitem : nt.Toolbar, createTooltip: N, label: o?.label(), disabled: l || !o || o.disabled(), compareRGB: !0, darkMode: k, ...h });
|
|
513
513
|
}));
|
|
514
514
|
Mo.displayName = "ColorCommandButton";
|
|
515
515
|
const Wp = Y(J((r, i) => {
|
|
516
516
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, parentFloat: c, ...g } = r, a = He(o, ["gridlinesToggle", "sheetViewToggleGridlinesColumns", "sheetViewToggleGridlinesRows"]), s = G((m, p) => {
|
|
517
|
-
const h = { variant: ie.Menuitem, parentFloat: m.floatReference, commandHook: t, scope: n, disabled: l }, d =
|
|
517
|
+
const h = { variant: ie.Menuitem, parentFloat: m.floatReference, commandHook: t, scope: n, disabled: l }, d = j(se, { children: [e(F, { ...h, command: p.getCommand("gridlinesToggle") }), e(Mo, { ...h, command: p.getCommand("sheetViewFormatGridlinesColor"), icon: e(dr, {}), panelProps: { disableAlpha: !0 } }), e(re, { orientation: "horizontal" }), e(F, { ...h, command: p.getCommand("sheetViewToggleGridlinesColumns") }), e(F, { ...h, command: p.getCommand("sheetViewToggleGridlinesRows") })] });
|
|
518
518
|
return xe({ ...m, children: d });
|
|
519
519
|
}, [l, t]);
|
|
520
520
|
return e(Re, { ref: i, parentFloat: c, quickCommand: a[0]?.key(), commands: o, commandHook: t, createPopupPanel: s, label: "Gridlines", tooltip: "Configure how the lines between rows and columns in the sheet are displayed.", icon: e(eo, { command: a[0], scope: "view" }), ...g });
|
|
521
|
-
})),
|
|
521
|
+
})), Ni = Y(J((r, i) => {
|
|
522
522
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = G((a, s) => {
|
|
523
|
-
const m = { variant: ie.Menuitem, commandHook: t, scope: "sort", disabled: l }, p = s.getCommand("sortCustom"), h =
|
|
523
|
+
const m = { variant: ie.Menuitem, commandHook: t, scope: "sort", disabled: l }, p = s.getCommand("sortCustom"), h = j(se, { children: [e(F, { ...m, command: s.getCommand("sortAscending"), icon: D(e(Vn, {})) }), e(F, { ...m, command: s.getCommand("sortDescending"), icon: D(e(hi, {})) }), p ? e(F, { ...m, command: p, icon: D(e(cc, {})) }) : null, e(re, { orientation: "horizontal" }), e(F, { ...m, scope: "filter", command: s.getCommand("autoFilterToggle"), icon: D(e(_n, {})) }), e(F, { ...m, scope: "filter", command: s.getCommand("autoFilterClear"), icon: D(e(ur, {})) }), e(F, { ...m, scope: "filter", command: s.getCommand("autoFilterReapply"), icon: D(e(fi, {})) })] });
|
|
524
524
|
return xe({ ...a, children: h });
|
|
525
525
|
}, [l, t, n]);
|
|
526
|
-
return e(Re, { ref: i, commands: o, commandHook: t, scope: n, disabled: l, label: "Sort", tooltip:
|
|
526
|
+
return e(Re, { ref: i, commands: o, commandHook: t, scope: n, disabled: l, label: "Sort", tooltip: j(se, { children: [e("span", { children: "Organize your data so it's easier to analyze." }), e("br", {}), e("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: g, icon: D(e(Vn, {})), ...c });
|
|
527
527
|
})), zm = Y(J((r, i) => {
|
|
528
528
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = G((a, s) => {
|
|
529
|
-
const m = { variant: ie.Menuitem, commandHook: t, scope: "sort", disabled: l }, p =
|
|
529
|
+
const m = { variant: ie.Menuitem, commandHook: t, scope: "sort", disabled: l }, p = j(se, { children: [e(F, { ...m, scope: "filter", command: s.getCommand("autoFilterToggle"), icon: D(e(_n, {})) }), e(F, { ...m, scope: "filter", command: s.getCommand("autoFilterClear"), icon: D(e(ur, {})) }), e(F, { ...m, scope: "filter", command: s.getCommand("autoFilterReapply"), icon: D(e(fi, {})) })] });
|
|
530
530
|
return xe({ ...a, children: p });
|
|
531
531
|
}, [l, t, n]);
|
|
532
|
-
return e(Re, { ref: i, commands: o, commandHook: t, scope: n, disabled: l, label: "Filter", tooltip:
|
|
532
|
+
return e(Re, { ref: i, commands: o, commandHook: t, scope: n, disabled: l, label: "Filter", tooltip: j(se, { children: [e("span", { children: "Organize your data so it's easier to analyze." }), e("br", {}), e("span", { children: "You can sort the selected data from smallest to largest or largest to smallest." })] }), createPopupPanel: g, icon: D(e(_n, {})), ...c });
|
|
533
533
|
})), Fi = Y(J((r, i) => {
|
|
534
534
|
const { quickCommand: o, icon: t, isRedo: n = !1, nestRedo: l = !0, undoManager: c, scope: g, sx: a, disabled: s, commands: m, ...p } = r, h = [o];
|
|
535
535
|
!n && l && h.push("redo");
|
|
@@ -539,16 +539,16 @@ const Wp = Y(J((r, i) => {
|
|
|
539
539
|
const [f, w] = U(0), C = G((v, k) => {
|
|
540
540
|
let T = f === 0 ? "Cancel" : `${u.label()} ${f} Action${f === 1 ? "" : "s"}`, R = !1;
|
|
541
541
|
x || (R = !0), R || (R = l ? !x.hasRedo() && !x.hasUndo() : !x.hasRedo());
|
|
542
|
-
const
|
|
542
|
+
const N = (O) => {
|
|
543
543
|
u.execute(O);
|
|
544
544
|
}, B = e(pt, { sx: { display: "flex", flex: "none", alignItems: "center", justifyContent: "center", padding: R ? void 0 : "0 0", minWidth: "180px" }, icon: null, onMouseEnter: () => {
|
|
545
545
|
w(0);
|
|
546
546
|
}, onMouseDown: (O) => {
|
|
547
547
|
O.button === 0 && O.preventDefault();
|
|
548
548
|
}, onMouseUp: (O) => {
|
|
549
|
-
O.button === 0 &&
|
|
549
|
+
O.button === 0 && N(f);
|
|
550
550
|
}, onKeyDown: (O) => {
|
|
551
|
-
O.isDefaultPrevented() || O.keyCode !== be.Enter && O.keyCode !== be.Space ||
|
|
551
|
+
O.isDefaultPrevented() || O.keyCode !== be.Enter && O.keyCode !== be.Space || N(f);
|
|
552
552
|
}, children: e(Oe, { component: "div", variant: "caption", sx: { fontSize: "0.875rem", letterSpacing: "0.01071em" }, children: T }) });
|
|
553
553
|
if (R) return B;
|
|
554
554
|
const P = n ? x?.getRedoDescriptions() : x?.getUndoDescriptions(), S = [];
|
|
@@ -556,20 +556,20 @@ const Wp = Y(J((r, i) => {
|
|
|
556
556
|
const V = P[O];
|
|
557
557
|
S.push(e(pt, { sx: { maxWidth: "360px", display: "flex" }, icon: e(rn, {}), disabled: b, selected: O < f, onMouseEnter: () => {
|
|
558
558
|
w(O + 1);
|
|
559
|
-
}, onMouseDown: (
|
|
560
|
-
|
|
561
|
-
}, onMouseUp: (
|
|
562
|
-
|
|
563
|
-
}, onKeyDown: (
|
|
564
|
-
|
|
565
|
-
}, children:
|
|
559
|
+
}, onMouseDown: (I) => {
|
|
560
|
+
I.button === 0 && I.preventDefault();
|
|
561
|
+
}, onMouseUp: (I) => {
|
|
562
|
+
I.button === 0 && N(O + 1);
|
|
563
|
+
}, onKeyDown: (I) => {
|
|
564
|
+
I.isDefaultPrevented() || I.keyCode !== be.Enter && I.keyCode !== be.Space || N(O + 1);
|
|
565
|
+
}, children: j(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", alignItems: "center", overflow: "hidden" }, children: [e(Oe, { component: "div", children: V }), e(rn, {})] }) }, `action:${O}`));
|
|
566
566
|
}
|
|
567
567
|
let M = null;
|
|
568
568
|
if (!n && l) {
|
|
569
569
|
const O = { scope: "undo", commands: k, variant: ie.Menuitem, parentFloat: v.floatReference };
|
|
570
570
|
M = [], M.push(e(Fi, { ...O, quickCommand: "redo", isRedo: !0 }, "nested:redo")), x.hasRedo() && x.hasUndo() && M.push(e(re, { orientation: "horizontal" }, "action:redo-div"));
|
|
571
571
|
}
|
|
572
|
-
const L =
|
|
572
|
+
const L = j(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, onClick: () => {
|
|
573
573
|
v.closeFloatAll();
|
|
574
574
|
}, onMouseLeave: () => {
|
|
575
575
|
w(0);
|
|
@@ -582,7 +582,7 @@ for (let r = 0; r < Qt.length; r++) Oi.set(Qt[r].fontRef.getFamily(), Qt[r]);
|
|
|
582
582
|
const jp = Y(J((r, i) => {
|
|
583
583
|
const { command: o, commandHook: t, sx: n, disabled: l = !1, parentFloat: c, icon: g, label: a, ...s } = r;
|
|
584
584
|
Ht(o);
|
|
585
|
-
const m = o?.state(), p = at(), h =
|
|
585
|
+
const m = o?.state(), p = at(), h = W(() => `${Bt.getSharedMeasurer()("Times New Roman", Math.round(p.typography.fontSize), p.typography.fontFamily).width}px`, [p]), d = G((u) => {
|
|
586
586
|
const y = (w) => {
|
|
587
587
|
o?.execute(w, t);
|
|
588
588
|
}, x = [];
|
|
@@ -604,53 +604,53 @@ const jp = Y(J((r, i) => {
|
|
|
604
604
|
}, [l, o?.state()]);
|
|
605
605
|
return e(vt, { ref: i, sx: { ...n }, outlined: !0, disabled: l, parentFloat: c, createPopupPanel: d, createTooltip: ({ children: u }, y) => e(rt, { label: o?.label(), description: o?.description(), disabled: y, children: u }), icon: e(A, { sx: { display: "flex", paddingLeft: "4px", paddingRight: "4px", fontSize: (u) => `${Math.round(u.typography.fontSize)}px`, fontFamily: (u) => u.typography.fontFamily, color: (u) => u.palette.text.secondary, width: h }, children: e(A, { sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "pre" }, children: m }) }), ...s });
|
|
606
606
|
})), $p = Y(J((r, i) => {
|
|
607
|
-
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), a =
|
|
607
|
+
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["formatStrikeThroughToggle", "formatSuperscriptToggle", "formatSubscriptToggle"]), a = W(() => {
|
|
608
608
|
for (let p = 0; p < g.length; p++) if (g[p]?.state()) return g[p].key();
|
|
609
609
|
return g[0]?.key();
|
|
610
|
-
}, [g]), s =
|
|
610
|
+
}, [g]), s = W(() => {
|
|
611
611
|
const p = /* @__PURE__ */ new Map();
|
|
612
|
-
return p.set("formatStrikeThroughToggle", D(e(
|
|
612
|
+
return p.set("formatStrikeThroughToggle", D(e(ea, {}))), p.set("formatSuperscriptToggle", D(e(uc, {}))), p.set("formatSubscriptToggle", D(e(mc, {}))), p;
|
|
613
613
|
}, []), m = G((p, h) => {
|
|
614
|
-
const d = { variant: ie.Menuitem, commandHook: t, scope: "textEffects", disabled: l }, u =
|
|
614
|
+
const d = { variant: ie.Menuitem, commandHook: t, scope: "textEffects", disabled: l }, u = j(se, { children: [e(F, { ...d, command: h.getCommand("formatStrikeThroughToggle"), icon: s.get("formatStrikeThroughToggle") }), e(F, { ...d, command: h.getCommand("formatSuperscriptToggle"), icon: s.get("formatSuperscriptToggle") }), e(F, { ...d, command: h.getCommand("formatSubscriptToggle"), icon: s.get("formatSubscriptToggle") })] });
|
|
615
615
|
return xe({ ...p, children: u });
|
|
616
616
|
}, [l, t, n]);
|
|
617
|
-
return e(Re, { ref: i, quickCommand: a, commands: o, commandHook: t, createPopupPanel: m, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: s.get(a) ?? D(e(
|
|
617
|
+
return e(Re, { ref: i, quickCommand: a, commands: o, commandHook: t, createPopupPanel: m, label: "Text Effects", tooltip: "Style your text to differentiate it.", icon: s.get(a) ?? D(e(ea, {})), ...c });
|
|
618
618
|
})), Vp = Y(J((r, i) => {
|
|
619
|
-
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), a =
|
|
619
|
+
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["formatUnderlinedToggle", "formatUnderlinedDoubleToggle", "formatUnderlinedAccountingToggle", "formatUnderlinedAccountingDoubleToggle"]), a = W(() => {
|
|
620
620
|
for (let p = 0; p < g.length; p++) if (g[p]?.state()) return g[p].key();
|
|
621
621
|
return g[0]?.key();
|
|
622
|
-
}, [g]), s =
|
|
622
|
+
}, [g]), s = W(() => {
|
|
623
623
|
const p = /* @__PURE__ */ new Map();
|
|
624
|
-
return p.set("formatUnderlinedToggle", D(e(Tn, {}))), p.set("formatUnderlinedDoubleToggle", D(e(
|
|
624
|
+
return p.set("formatUnderlinedToggle", D(e(Tn, {}))), p.set("formatUnderlinedDoubleToggle", D(e(ta, {}))), p.set("formatUnderlinedAccountingToggle", D(e(oa, {}))), p.set("formatUnderlinedAccountingDoubleToggle", D(e(na, {}))), p;
|
|
625
625
|
}, []), m = G((p, h) => {
|
|
626
|
-
const d = { variant: ie.Menuitem, commandHook: t, scope: "underline", disabled: l }, u =
|
|
626
|
+
const d = { variant: ie.Menuitem, commandHook: t, scope: "underline", disabled: l }, u = j(se, { children: [e(F, { ...d, command: h.getCommand("formatUnderlinedToggle"), icon: D(e(Tn, {})) }), e(F, { ...d, command: h.getCommand("formatUnderlinedDoubleToggle"), icon: D(e(ta, {})) }), e(F, { ...d, command: h.getCommand("formatUnderlinedAccountingToggle"), commandHook: t, icon: D(e(oa, {})) }), e(F, { ...d, command: h.getCommand("formatUnderlinedAccountingDoubleToggle"), icon: D(e(na, {})) })] });
|
|
627
627
|
return xe({ ...p, children: u });
|
|
628
628
|
}, [l, t, n]);
|
|
629
629
|
return e(Re, { ref: i, quickCommand: a, commands: o, commandHook: t, label: "Underline", tooltip: "All underline stylings.", createPopupPanel: m, icon: s.get(a) ?? D(e(Tn, {})), ...c });
|
|
630
630
|
})), Ai = Y(J((r, i) => {
|
|
631
631
|
const { command: o, commands: t, commandHook: n, scope: l, includePasteAllInPopup: c = !0, disabled: g = !1, ...a } = r, s = te((m, p) => {
|
|
632
632
|
const h = { variant: ie.Menuitem, commandHook: n, scope: "paste", disabled: g }, d = [];
|
|
633
|
-
return c && (d.push(
|
|
633
|
+
return c && (d.push(Pe(F, { ...h, command: p.getCommand("paste"), key: "paste", icon: e(ra, {}) })), d.push(e(re, { orientation: "horizontal" }, "paste-div"))), d.push(Pe(F, { ...h, command: p.getCommand("pasteValues"), key: "pasteValues", icon: D(e(gc, {})) })), d.push(Pe(F, { ...h, command: p.getCommand("pasteFormats"), key: "pasteFormats", icon: D(e(hc, {})) })), d.push(Pe(F, { ...h, command: p.getCommand("pasteFormulas"), key: "pasteFormulas", icon: D(e(fc, {})) })), d.push(Pe(F, { ...h, command: p.getCommand("pasteTranspose"), key: "pasteTranspose", icon: D(e(bc, {})) })), d.push(Pe(F, { ...h, command: p.getCommand("pasteLinks"), key: "pasteLinks", icon: D(e(xc, {})) })), xe({ ...m, children: d });
|
|
634
634
|
}, [g, n, l, c]);
|
|
635
|
-
return e(Re, { ref: i, commands: t, commandHook: n, scope: l, createPopupPanel: s, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", icon: e(
|
|
635
|
+
return e(Re, { ref: i, commands: t, commandHook: n, scope: l, createPopupPanel: s, label: "Paste", tooltip: "Add content to the clipboard to your document.", quickCommand: "paste", icon: e(ra, {}), ...a });
|
|
636
636
|
})), _p = Y(J((r, i) => {
|
|
637
637
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, parentFloat: c, ...g } = r, a = He(o, ["sheetViewToggleShowHeadings", "sheetViewToggleShowHeadingColumns", "sheetViewToggleShowHeadingRows"]), s = G((m, p) => {
|
|
638
|
-
const h = { variant: ie.Menuitem, parentFloat: m.floatReference, commandHook: t, scope: n, disabled: l }, d =
|
|
638
|
+
const h = { variant: ie.Menuitem, parentFloat: m.floatReference, commandHook: t, scope: n, disabled: l }, d = j(se, { children: [e(F, { ...h, command: p.getCommand("sheetViewToggleShowHeadings") }), e(F, { ...h, command: p.getCommand("sheetViewToggleShowHeadingsNumeric") }), e(re, { orientation: "horizontal" }), e(F, { ...h, command: p.getCommand("sheetViewToggleShowHeadingColumns") }), e(F, { ...h, command: p.getCommand("sheetViewToggleShowHeadingRows") })] });
|
|
639
639
|
return xe({ ...m, children: d });
|
|
640
640
|
}, [l, t, n]);
|
|
641
641
|
return e(Re, { ref: i, parentFloat: c, quickCommand: a[0]?.key(), commands: o, commandHook: t, createPopupPanel: s, label: "Headings", tooltip: "Configure how the column and rows headings in the sheet are displayed.", icon: e(eo, { command: a[0], scope: "view" }), ...g });
|
|
642
642
|
})), Up = Y(J((r, i) => {
|
|
643
643
|
const { commands: o, commandHook: t, scope: n = "view", disabled: l = !1, ...c } = r, g = G((a) => {
|
|
644
|
-
const s = { variant: ie.Menuitem, parentFloat: a.floatReference, commandHook: t, scope: n, disabled: l }, m =
|
|
644
|
+
const s = { variant: ie.Menuitem, parentFloat: a.floatReference, commandHook: t, scope: n, disabled: l }, m = j(se, { children: [e(F, { ...s, command: o.getCommand("workbookViewToggleShowFormulaBar") }), e(F, { ...s, command: o.getCommand("workbookViewToggleShowTabs") }), e(F, { ...s, command: o.getCommand("workbookViewToggleShowStatusBar") }), e(re, { orientation: "horizontal" }), e(F, { ...s, command: o.getCommand("workbookViewToggleShowHorizontalScrollBar") }), e(F, { ...s, command: o.getCommand("workbookViewToggleShowVerticalScrollBar") })] });
|
|
645
645
|
return xe({ ...a, children: m });
|
|
646
646
|
}, [l, o, t, n]);
|
|
647
647
|
return e(Re, { ref: i, commands: o, disabled: l, commandHook: t, scope: n, label: "Workbook View", tooltip: "Options to configure how the workbook is displayed.", createPopupPanel: g, icon: e(eo, { icon: null, label: "Workbook View" }), ...c });
|
|
648
648
|
})), Bi = Y(J((r, i) => {
|
|
649
|
-
const { value: o, cellStyle: t, styles: n, createTemporaryCell: l, bodyStyle: c, sx: g, borderProps: a, disabled: s, ...m } = r, p =
|
|
650
|
-
return e(A, { ref: i, sx: { width: "100px", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: c?.fill, filter: s ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...d }, "& .text": { flex: "1 1 100%", ...y.toCSS(c?.darkMode ?? !1, 1), boxSizing: "border-box", padding: `${u.top}px ${u.right}px ${u.bottom}px ${u.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: y.toCSS().textDecoration, textAlign: gs.toCSSHorizontalTextAlign(p.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...g }, ...m, children: e(
|
|
649
|
+
const { value: o, cellStyle: t, styles: n, createTemporaryCell: l, bodyStyle: c, sx: g, borderProps: a, disabled: s, ...m } = r, p = W(() => l({ value: o, style: t }), [o, t, l]), h = W(() => p.getStyle(), [p, c]), d = W(() => h.getFill().toCSS(c?.darkMode ?? !1), [h]), u = h.getInsets(), y = h.getFont(), x = G(() => h.getBorder(), [h]);
|
|
650
|
+
return e(A, { ref: i, sx: { width: "100px", textOverflow: "ellipsis", display: "flex", alignItems: "stretch", background: c?.fill, filter: s ? "grayscale(0.4) opacity(0.8);" : "none", "& .fill": { flex: "1 1 100%", overflow: "hidden", ...d }, "& .text": { flex: "1 1 100%", ...y.toCSS(c?.darkMode ?? !1, 1), boxSizing: "border-box", padding: `${u.top}px ${u.right}px ${u.bottom}px ${u.left}px`, margin: "0px", outline: "none", resize: "none", overflow: "hidden", textOverflow: "ellipsis", verticalAlign: "baseline", textDecoration: y.toCSS().textDecoration, textAlign: gs.toCSSHorizontalTextAlign(p.getRenderHorizontalAlignment()), background: "transparent", maxHeight: "100%", whiteSpace: "pre", wordWrap: "break-word" }, ...g }, ...m, children: e(hr, { getBorderAt: x, darkMode: c?.darkMode ?? !1, rowCount: 1, columnCount: 1, style: { display: "flex", flex: "1 1 100%", width: "100%", maxWidth: "100%", justifyContent: "start", alignItems: "stretch", ...a?.style }, ...a, children: e(A, { className: "fill", sx: { paddingLeft: "4px", paddingRight: "4px", marginLeft: "-1px", marginTop: "-1px", marginRight: "-1px", marginBottom: "-1px", overflow: "hidden", display: "flex", alignItems: "center" }, children: e(A, { className: "text", children: o }) }) }) });
|
|
651
651
|
})), Gp = Y((r) => {
|
|
652
652
|
const { styles: i, namedStyle: o, selectedNamed: t, hasContextMenu: n = !0, bodyStyle: l, onSelectNamed: c, createTemporaryCell: g, parentFloat: a, commands: s, disabled: m, commandHook: p, ...h } = r, d = G((x) => {
|
|
653
|
-
const b = { variant: ie.Menuitem, commandHook: p, context: "cellStyle" }, f =
|
|
653
|
+
const b = { variant: ie.Menuitem, commandHook: p, context: "cellStyle" }, f = j(se, { children: [e(F, { ...b, sx: { fontWeight: 550 }, command: s.getCommand("formatCellStyle"), commandState: o, disabled: m, icon: D(e(Ro, {})) }), e(re, { orientation: "horizontal" }), e(F, { ...b, command: s.getCommand("modifyCellStyle"), commandState: { named: o } }), e(F, { ...b, command: s.getCommand("deleteCellStyle"), commandState: o, disabled: m || o?.getName() === pe.BuiltInName.Normal })] });
|
|
654
654
|
return xe({ ...x, children: e(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: e(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: f }) }) });
|
|
655
655
|
}, []), u = o?.getName() === t?.getName();
|
|
656
656
|
let y = e(bt, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (x) => `solid ${u ? x.palette.primary.dark : "transparent"} 1px` }, tooltipProps: { label: o.getName(), placement: "bottom-start" }, disabled: m, icon: null, onClick: () => {
|
|
@@ -663,85 +663,85 @@ const jp = Y(J((r, i) => {
|
|
|
663
663
|
const p = t?.context(), h = p?.styles, d = l ?? p?.named(), u = a ?? p?.bodyStyle(), y = te((C) => {
|
|
664
664
|
c?.(C), t?.execute(C, n);
|
|
665
665
|
}, [t, c, n]), x = G((C, v) => {
|
|
666
|
-
const k = { onSelectNamed: y, styles: h(), parentFloat: C.floatReference }, T = h().getCustomNamed(), R = /* @__PURE__ */ new Map(),
|
|
667
|
-
for (let
|
|
668
|
-
const B = (
|
|
669
|
-
let E = R.get(
|
|
670
|
-
return E || (E = h().getNamed(
|
|
671
|
-
}, P = (
|
|
666
|
+
const k = { onSelectNamed: y, styles: h(), parentFloat: C.floatReference }, T = h().getCustomNamed(), R = /* @__PURE__ */ new Map(), N = [];
|
|
667
|
+
for (let I = 0; I < T.length; I++) R.set(T[I].getName(), T[I]), h().getNamed(T[I].getName()).getBuiltInID() === null && N.push(T[I].getName());
|
|
668
|
+
const B = (I) => {
|
|
669
|
+
let E = R.get(I);
|
|
670
|
+
return E || (E = h().getNamed(I)), !E || E.isHidden() ? null : e(Gp, { namedStyle: E, selectedNamed: d, bodyStyle: p.bodyStyle(), createTemporaryCell: p.createTemporaryCell, commands: o, commandHook: n, ...k }, I);
|
|
671
|
+
}, P = (I, E, K = !0) => {
|
|
672
672
|
const Q = [];
|
|
673
673
|
for (let q = 0; q < E.length; q++) {
|
|
674
674
|
const _ = B(E[q]);
|
|
675
675
|
_ && Q.push(_);
|
|
676
676
|
}
|
|
677
|
-
return Q.length === 0 ? null :
|
|
678
|
-
}, S = (
|
|
677
|
+
return Q.length === 0 ? null : j(A, { children: [K ? e(re, { orientation: "horizontal" }) : null, e(to, { children: I }, I + "-header"), e(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "646px", maxWidth: "100%" }, children: Q }, I + "-presets")] }, I);
|
|
678
|
+
}, S = (I, E) => {
|
|
679
679
|
const K = [];
|
|
680
680
|
for (let Q = 0; Q < E.length; Q++) {
|
|
681
681
|
const q = B(E[Q]);
|
|
682
682
|
q && K.push(q);
|
|
683
683
|
}
|
|
684
|
-
return K.length === 0 ? null : e(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: K },
|
|
684
|
+
return K.length === 0 ? null : e(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", flexDirection: "column", flex: "0 0 0%" }, children: K }, I + "-presets");
|
|
685
685
|
}, M = [];
|
|
686
|
-
M.push(P("Custom",
|
|
686
|
+
M.push(P("Custom", N, !1)), M.push(P("Good, Bad and Neutral", [pe.BuiltInName.Normal, pe.BuiltInName.Bad, pe.BuiltInName.Good, pe.BuiltInName.Neutral], N.length > 0)), M.push(P("Data and Model", [pe.BuiltInName.Calculation, pe.BuiltInName.CheckCell, pe.BuiltInName.ExplanatoryText, pe.BuiltInName.FollowedHyperlink, pe.BuiltInName.Hyperlink, pe.BuiltInName.Input, pe.BuiltInName.LinkedCell, pe.BuiltInName.Note, pe.BuiltInName.Output, pe.BuiltInName.WarningText])), M.push(P("Titles and Headings", [pe.BuiltInName.Heading1, pe.BuiltInName.Heading2, pe.BuiltInName.Heading3, pe.BuiltInName.Heading4, pe.BuiltInName.Title, pe.BuiltInName.Total]));
|
|
687
687
|
let L = [];
|
|
688
688
|
var O, V;
|
|
689
|
-
return L.push(S("Accent 1", [pe.BuiltInName.Accent1_20, pe.BuiltInName.Accent1_40, pe.BuiltInName.Accent1_60, pe.BuiltInName.Accent1])), L.push(S("Accent 2", [pe.BuiltInName.Accent2_20, pe.BuiltInName.Accent2_40, pe.BuiltInName.Accent2_60, pe.BuiltInName.Accent2])), L.push(S("Accent 3", [pe.BuiltInName.Accent3_20, pe.BuiltInName.Accent3_40, pe.BuiltInName.Accent3_60, pe.BuiltInName.Accent3])), L.push(S("Accent 4", [pe.BuiltInName.Accent4_20, pe.BuiltInName.Accent4_40, pe.BuiltInName.Accent4_60, pe.BuiltInName.Accent4])), L.push(S("Accent 5", [pe.BuiltInName.Accent5_20, pe.BuiltInName.Accent5_40, pe.BuiltInName.Accent5_60, pe.BuiltInName.Accent5])), L.push(S("Accent 6", [pe.BuiltInName.Accent6_20, pe.BuiltInName.Accent6_40, pe.BuiltInName.Accent6_60, pe.BuiltInName.Accent6])), M.push((O = "Themed Cell Styles", V = L,
|
|
689
|
+
return L.push(S("Accent 1", [pe.BuiltInName.Accent1_20, pe.BuiltInName.Accent1_40, pe.BuiltInName.Accent1_60, pe.BuiltInName.Accent1])), L.push(S("Accent 2", [pe.BuiltInName.Accent2_20, pe.BuiltInName.Accent2_40, pe.BuiltInName.Accent2_60, pe.BuiltInName.Accent2])), L.push(S("Accent 3", [pe.BuiltInName.Accent3_20, pe.BuiltInName.Accent3_40, pe.BuiltInName.Accent3_60, pe.BuiltInName.Accent3])), L.push(S("Accent 4", [pe.BuiltInName.Accent4_20, pe.BuiltInName.Accent4_40, pe.BuiltInName.Accent4_60, pe.BuiltInName.Accent4])), L.push(S("Accent 5", [pe.BuiltInName.Accent5_20, pe.BuiltInName.Accent5_40, pe.BuiltInName.Accent5_60, pe.BuiltInName.Accent5])), L.push(S("Accent 6", [pe.BuiltInName.Accent6_20, pe.BuiltInName.Accent6_40, pe.BuiltInName.Accent6_60, pe.BuiltInName.Accent6])), M.push((O = "Themed Cell Styles", V = L, j(A, { children: [e(re, { orientation: "horizontal" }), e(to, { children: O }, O + "-header"), e(A, { sx: { display: "flex", gap: "2px", flexWrap: "wrap", alignItems: "start", flexDirection: "row" }, children: V }, O + "-presets")] }, O))), M.push(P("Number Format", [pe.BuiltInName.Comma, pe.BuiltInName.Comma0, pe.BuiltInName.Currency, pe.BuiltInName.Currency0, pe.BuiltInName.Percent])), j(A, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (I) => `${I.shape.borderRadius}px`, paddingBottom: (I) => `${I.shape.borderRadius}px` }, children: [e(A, { onContextMenu: () => {
|
|
690
690
|
}, sx: { display: "flex", flexDirection: "column", paddingTop: "6px", paddingBottom: "0px", paddingLeft: "16px", paddingRight: "16px" }, children: M }), e(re, { orientation: "horizontal" }), e(F, { variant: ie.Menuitem, commandState: d, command: v.getCommand("newCellStyle"), context: "styles", commandHook: n, disabled: g, icon: D(e(yc, {})) })] });
|
|
691
691
|
}, [d, h?.().getTheme(), u]), b = te((C) => {
|
|
692
692
|
const v = 18 / Bt.getDeviceScale(), k = p?.createTemporaryCell(C);
|
|
693
693
|
return k.getStyle().getFont().getSize() <= v ? k : k.createTemporaryCell({ style: { font: { size: v } } });
|
|
694
|
-
}, [p?.createTemporaryCell]), f = g || !t || t.disabled(), w =
|
|
694
|
+
}, [p?.createTemporaryCell]), f = g || !t || t.disabled(), w = W(() => p && s ? e(Bi, { value: d?.getName() ?? "Custom", cellStyle: d ? { named: d.getName() } : void 0, styles: p.styles(), createTemporaryCell: b, bodyStyle: p.bodyStyle(), className: "outline-hover", disabled: f, sx: { maxHeight: "24px", height: "24px", marginRight: "2px", outline: (C) => `1px solid ${C.palette.action.hover}` }, borderProps: {} }) : D(e(Ro, {})), [d, u, f]);
|
|
695
695
|
return e(Re, { ref: i, createPopupPanel: x, outlined: s, commands: o, createTooltip: ({ children: C }, v) => e(rt, { label: t?.label(), description: t?.description(), disabled: v, children: C }), selected: !1, disabled: f, label: t?.label(), icon: w, ...m });
|
|
696
696
|
})), Li = "_sheetxl-reset_ods65_1", Xp = 10, Kp = Y(J((r, i) => {
|
|
697
|
-
const { styles: o, table: t, tableStyle: n = t?.getStyle() ?? o.getDefaultTableStyle(), bodyStyle: l, sx: c, disabled: g, className: a, forceThinBorder: s, cellHeight: m = Xp, isLive: p = !1, ...h } = r, d = Math.ceil(1.3 * m), [u, y] =
|
|
697
|
+
const { styles: o, table: t, tableStyle: n = t?.getStyle() ?? o.getDefaultTableStyle(), bodyStyle: l, sx: c, disabled: g, className: a, forceThinBorder: s, cellHeight: m = Xp, isLive: p = !1, ...h } = r, d = Math.ceil(1.3 * m), [u, y] = ar((C) => C + 1, 0);
|
|
698
698
|
ue(() => {
|
|
699
699
|
if (p && t) return t.addListeners({ onAnyChange: () => {
|
|
700
700
|
y();
|
|
701
701
|
} });
|
|
702
702
|
}, [t, p]);
|
|
703
|
-
const x =
|
|
703
|
+
const x = W(() => {
|
|
704
704
|
let C = t?.toJSON() ?? {};
|
|
705
705
|
const v = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
|
|
706
|
-
return C && (C.styleOptions = { ...C.styleOptions, name: n.getName() }), C.ref = v, new
|
|
707
|
-
}, [u, t, n, o]), b =
|
|
706
|
+
return C && (C.styleOptions = { ...C.styleOptions, name: n.getName() }), C.ref = v, new nr({ initialAnchor: v, json: C, styles: o });
|
|
707
|
+
}, [u, t, n, o]), b = W(() => {
|
|
708
708
|
const C = [];
|
|
709
709
|
for (let v = 0; v < 5; v++) for (let k = 0; k < 5; k++) {
|
|
710
710
|
const T = x.getStyleAt({ colIndex: k, rowIndex: v });
|
|
711
711
|
C.push(T);
|
|
712
712
|
}
|
|
713
713
|
return C;
|
|
714
|
-
}, [x]), f =
|
|
714
|
+
}, [x]), f = W(() => {
|
|
715
715
|
const C = (k, T, R) => {
|
|
716
|
-
let
|
|
716
|
+
let N = R.getFill().toCSS(l?.darkMode ?? !1);
|
|
717
717
|
const B = d - (T < 4 ? 1 : 0), P = m - (k < 4 ? 1 : 0), S = R.getFont().getFill().toCSS(l?.darkMode ?? !1);
|
|
718
|
-
return
|
|
718
|
+
return N = { ...N, position: "absolute", boxSizing: "border-box", left: T * (d - 1), top: k * (m - 1), width: B, height: P }, e("td", { className: `table-style-fill ${k}-${T}`, style: N, children: e("div", { className: `table-style-text ${k}-${T}`, style: { position: "absolute", boxSizing: "border-box", width: "6px", left: (B - 6) / 2, top: (P - 1) / 2, borderTop: `1px solid ${S}` } }) }, `${k}-${T}`);
|
|
719
719
|
}, v = [];
|
|
720
720
|
for (let k = 0; k < 5; k++) {
|
|
721
721
|
const T = [];
|
|
722
722
|
for (let R = 0; R < 5; R++) {
|
|
723
|
-
const
|
|
724
|
-
T.push(C(k, R,
|
|
723
|
+
const N = b[5 * k + R];
|
|
724
|
+
T.push(C(k, R, N));
|
|
725
725
|
}
|
|
726
726
|
v.push(e("tr", { children: T }, k));
|
|
727
727
|
}
|
|
728
728
|
return v;
|
|
729
729
|
}, [x, n, l]), w = G((C, v) => b[v].getBorder() ?? null, [b]);
|
|
730
|
-
return e(A, { ref: i, className: "table-format-preview", sx: { background: l?.fill, filter: g ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...c }, ...h, children: e(
|
|
730
|
+
return e(A, { ref: i, className: "table-format-preview", sx: { background: l?.fill, filter: g ? "grayscale(0.4) opacity(0.8);" : "none", "& .styled-element": { position: "absolute" }, ...c }, ...h, children: e(hr, { getBorderAt: w, rowCount: 5, columnCount: 5, forceThinBorder: s, width: 5 * (d - 1) + 1, height: 5 * (m - 1) + 1, darkMode: l?.darkMode ?? !1, style: { pointerEvents: "none" }, children: e("table", { className: Ae(a, "sheetxl-table-preview", Li), style: { borderCollapse: "collapse", width: 5 * (d - 1) + 1, height: 5 * (m - 1) + 1 }, children: e("tbody", { children: f }) }) }) });
|
|
731
731
|
})), po = (r, i, o, t, n) => {
|
|
732
732
|
r.beginPath(), r.moveTo(i + 0.5, o + 0.5), r.lineTo(t + 0.5, n + 0.5), r.stroke();
|
|
733
733
|
}, Yp = Y(J((r, i) => {
|
|
734
|
-
const { table: o, tableStyle: t, styles: n, bodyStyle: l, disabled: c, style: g, className: a, canvas: s, ...m } = r, p =
|
|
734
|
+
const { table: o, tableStyle: t, styles: n, bodyStyle: l, disabled: c, style: g, className: a, canvas: s, ...m } = r, p = W(() => {
|
|
735
735
|
const u = o.toJSON(), y = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
|
|
736
|
-
return u.styleOptions = { ...u.styleOptions, name: t.getName() }, u.ref = y, new
|
|
737
|
-
}, [o, t, n]), h =
|
|
736
|
+
return u.styleOptions = { ...u.styleOptions, name: t.getName() }, u.ref = y, new nr({ initialAnchor: y, json: u, styles: n });
|
|
737
|
+
}, [o, t, n]), h = W(() => {
|
|
738
738
|
const u = [];
|
|
739
739
|
for (let y = 0; y < 5; y++) for (let x = 0; x < 5; x++) {
|
|
740
740
|
const b = p.getStyleAt({ colIndex: x, rowIndex: y });
|
|
741
741
|
u.push(b);
|
|
742
742
|
}
|
|
743
743
|
return u;
|
|
744
|
-
}, [p]), d =
|
|
744
|
+
}, [p]), d = W(() => {
|
|
745
745
|
let u = s;
|
|
746
746
|
if (s || (u = document.createElement("canvas")), !u) return null;
|
|
747
747
|
u.width !== 61 && (u.width = 61), u.height !== 46 && (u.height = 46);
|
|
@@ -769,15 +769,15 @@ const jp = Y(J((r, i) => {
|
|
|
769
769
|
M.isNone() || (y.strokeStyle = M.getColor().toCSS(b, !1), po(y, v, k + 9, v + x, k + 9));
|
|
770
770
|
}
|
|
771
771
|
y.strokeStyle = C.getFont().getFill().toCSS(b, !1);
|
|
772
|
-
const R = 4,
|
|
773
|
-
po(y, w * x +
|
|
772
|
+
const R = 4, N = 2.5;
|
|
773
|
+
po(y, w * x + N, 9 * f + R, w * x + N + 7, 9 * f + R);
|
|
774
774
|
}
|
|
775
775
|
return `url(${u.toDataURL()})`;
|
|
776
776
|
}, [s, p, t, l]);
|
|
777
777
|
return e("div", { ref: i, className: Ae("table-style-preview", a), style: { backgroundImage: d, width: 61, height: 46, ...g }, ...m });
|
|
778
778
|
})), Wm = Y(J((r, i) => {
|
|
779
779
|
const { styleOptions: o, onStyleOptionsChange: t, showHeaderRow: n, onShowHeaderRowChange: l, showTotalRow: c, onShowTotalRowChange: g, showFilterButton: a, onShowFilterButtonChange: s, sx: m, disabled: p, ...h } = r;
|
|
780
|
-
return
|
|
780
|
+
return j(A, { sx: { display: "flex", flexDirection: "column", flexWrap: "wrap", userSelect: "none", pt: 1, pb: 1, "& .MuiFormControlLabel-root": { marginLeft: (d) => `${d.spacing(2)}`, marginRight: (d) => `${d.spacing(2)}` }, "& .MuiCheckbox-root": { padding: (d) => `${d.spacing(0.5)}` }, ...m }, ...h, ref: i, children: [l && e(Et, { control: e(Dt, { checked: n ?? !1, indeterminate: n == null, onChange: () => l(!n), disabled: p || n == null }), label: "Header Row", labelPlacement: "end" }), g && e(Et, { control: e(Dt, { checked: c ?? !1, indeterminate: c == null, onChange: () => g(!c), disabled: p || c == null }), label: "Total Row", labelPlacement: "end" }), e(Et, { control: e(Dt, { checked: o?.showRowStripes ?? !1, indeterminate: !o, disabled: p || !o, onChange: () => {
|
|
781
781
|
t?.({ ...o, showRowStripes: !o?.showRowStripes });
|
|
782
782
|
} }), label: "Banded Rows", labelPlacement: "end" }), e(Et, { control: e(Dt, { checked: o?.showFirstColumn ?? !1, indeterminate: !o, disabled: p || !o, onChange: () => {
|
|
783
783
|
t?.({ ...o, showFirstColumn: !o?.showFirstColumn });
|
|
@@ -788,9 +788,9 @@ const jp = Y(J((r, i) => {
|
|
|
788
788
|
} }), label: "Banded Columns", labelPlacement: "end" }), s && e(Et, { control: e(Dt, { checked: a ?? !1, indeterminate: a == null, disabled: p || !o || a == null, onChange: () => s(!a) }), label: "Filter Button", labelPlacement: "end" })] });
|
|
789
789
|
})), Zp = Y((r) => {
|
|
790
790
|
const { table: i, tableStyle: o, selectedTableStyleName: t, onSelectTableStyleName: n, styles: l, hasContextMenu: c = !0, bodyStyle: g, parentFloat: a, commands: s, disabled: m, commandHook: p, useCanvasPreview: h = !0, canvas: d, ...u } = r, y = G((w) => {
|
|
791
|
-
const C = { variant: ie.Menuitem, commandHook: p, context: "table" }, v =
|
|
791
|
+
const C = { variant: ie.Menuitem, commandHook: p, context: "table" }, v = j(se, { children: [e(F, { ...C, command: s.getCommand("formatTableStyleClearCellStyles"), commandState: o, disabled: m, icon: D(e(Ro, {})) }), e(F, { ...C, sx: { fontWeight: 550 }, command: s.getCommand("formatTableStyle"), commandState: { name: o.getName() }, disabled: m, icon: D(e(Ro, {})) }), e(re, { orientation: "horizontal" }), e(F, { ...C, command: s.getCommand("setDefaultTableStyle"), commandState: o.getName(), disabled: m }), e(re, { orientation: "horizontal" }), e(F, { ...C, command: s.getCommand("deleteTableStyle"), commandState: o?.getName(), disabled: m || !o || o.isBuiltIn() })] });
|
|
792
792
|
return xe({ ...w, children: e(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: e(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: v }) }) });
|
|
793
|
-
}, [s]), x = o?.getName() === t, b =
|
|
793
|
+
}, [s]), x = o?.getName() === t, b = W(() => {
|
|
794
794
|
const w = { table: i, tableStyle: o, styles: l, bodyStyle: g };
|
|
795
795
|
return h ? e(Yp, { canvas: d, ...w }) : e(Kp, { ...w });
|
|
796
796
|
}, [i, o, l, g]);
|
|
@@ -804,17 +804,17 @@ const jp = Y(J((r, i) => {
|
|
|
804
804
|
const p = t?.context(), h = p?.styles, d = l ?? p?.table?.();
|
|
805
805
|
let u = "insertTable";
|
|
806
806
|
d && (u = "editTable");
|
|
807
|
-
const y =
|
|
807
|
+
const y = W(() => ((N, B) => {
|
|
808
808
|
const P = { rowStart: 0, colStart: 0, rowEnd: 4, colEnd: 4 };
|
|
809
|
-
return new
|
|
809
|
+
return new nr({ initialAnchor: P, styles: B, json: { name: "PreviewTable", ref: P, description: "PreviewTable", headerRowCount: 1, totalsRowCount: 0, styleOptions: N } });
|
|
810
810
|
})(d?.getStyleOptions(), h?.()), [h?.().getDefaultTableStyle(), d?.getStyleOptions()]), x = d ?? y, [b, f] = U(x);
|
|
811
811
|
ue(() => {
|
|
812
812
|
f(x);
|
|
813
813
|
}, [x]);
|
|
814
|
-
const w = a ?? p?.bodyStyle(), C = te((
|
|
815
|
-
c?.(
|
|
816
|
-
}, [t, c, n]), v = Se(null), k = G((
|
|
817
|
-
const P = { onSelectTableStyleName: C, styles: h(), parentFloat:
|
|
814
|
+
const w = a ?? p?.bodyStyle(), C = te((N) => {
|
|
815
|
+
c?.(N), t?.execute({ name: N }, n);
|
|
816
|
+
}, [t, c, n]), v = Se(null), k = G((N, B) => {
|
|
817
|
+
const P = { onSelectTableStyleName: C, styles: h(), parentFloat: N.floatReference };
|
|
818
818
|
v.current || (v.current = document.createElement("canvas"));
|
|
819
819
|
const S = (q) => {
|
|
820
820
|
const _ = h().getTableStyle(q);
|
|
@@ -822,19 +822,19 @@ const jp = Y(J((r, i) => {
|
|
|
822
822
|
}, M = (q, _, ne = !0) => {
|
|
823
823
|
const le = [];
|
|
824
824
|
for (let X = 0; X < _.length; X++) {
|
|
825
|
-
const
|
|
826
|
-
|
|
825
|
+
const z = S(_[X]);
|
|
826
|
+
z && le.push(z);
|
|
827
827
|
}
|
|
828
|
-
return le.length === 0 ? null :
|
|
828
|
+
return le.length === 0 ? null : j(A, { children: [ne ? e(re, { orientation: "horizontal" }) : null, e(to, { children: q }, q + "-header"), e(A, { sx: { display: "flex", gap: "2px", marginBottom: "6px", flexWrap: "wrap", width: "481px", maxWidth: "100%" }, children: le }, q + "-presets")] }, q);
|
|
829
829
|
}, L = [], O = h().getCustomTableStyles(), V = [];
|
|
830
830
|
if (O.length > 0) {
|
|
831
831
|
for (let q = 0; q < O.length; q++) O[q].isShownInTableStyles() && V.push(O[q].getName());
|
|
832
832
|
L.push(M("Custom", V, !1));
|
|
833
833
|
}
|
|
834
|
-
const
|
|
835
|
-
d && !d.getStyleOptions().name &&
|
|
836
|
-
for (let q = 0; q < 21; q++)
|
|
837
|
-
L.push(M("Light",
|
|
834
|
+
const I = [];
|
|
835
|
+
d && !d.getStyleOptions().name && I.push(null);
|
|
836
|
+
for (let q = 0; q < 21; q++) I.push("TableStyleLight" + (q + 1));
|
|
837
|
+
L.push(M("Light", I, V.length > 0));
|
|
838
838
|
const E = [];
|
|
839
839
|
for (let q = 0; q < 28; q++) E.push("TableStyleMedium" + (q + 1));
|
|
840
840
|
L.push(M("Medium", E));
|
|
@@ -842,27 +842,27 @@ const jp = Y(J((r, i) => {
|
|
|
842
842
|
for (let q = 0; q < 11; q++) K.push("TableStyleDark" + (q + 1));
|
|
843
843
|
L.push(M("Dark", K));
|
|
844
844
|
let Q = null;
|
|
845
|
-
return d && (Q =
|
|
845
|
+
return d && (Q = j(se, { children: [e(re, { orientation: "horizontal" }), e(F, { variant: ie.Menuitem, command: B.getCommand("formatTableStyleClearTableStyle"), commandHook: n, disabled: g, icon: D(e(gi, {})) })] })), j(A, { sx: { display: "flex", flexDirection: "column", maxWidth: "100%", paddingTop: (q) => `${q.shape.borderRadius}px`, paddingBottom: (q) => `${q.shape.borderRadius}px` }, children: [e(A, { onContextMenu: () => {
|
|
846
846
|
}, sx: { display: "flex", flexDirection: "column", padding: "6px 16px" }, children: L }), Q] });
|
|
847
|
-
}, [h, h?.().getTheme(), w, b]), T = g || !t || t.disabled(), R =
|
|
847
|
+
}, [h, h?.().getTheme(), w, b]), T = g || !t || t.disabled(), R = W(() => {
|
|
848
848
|
if (!p || !s) return D(e(Ro, {}));
|
|
849
849
|
}, [b, w, T]);
|
|
850
|
-
return e(Re, { ref: i, quickCommand: u, createPopupPanel: k, commands: o, label: t?.label(), commandState: d, commandHook: n, selected: d !== null, createTooltip: ({ children:
|
|
850
|
+
return e(Re, { ref: i, quickCommand: u, createPopupPanel: k, commands: o, label: t?.label(), commandState: d, commandHook: n, selected: d !== null, createTooltip: ({ children: N }, B) => e(rt, { label: t?.label(), description: t?.description(), disabled: B, children: N }), disabled: T, icon: R, ...m });
|
|
851
851
|
})), Je = [];
|
|
852
852
|
Je.push(ot("Primary Background", "bg1")), Je.push(ot("Primary Text", "tx1")), Je.push(ot("Secondary Background", "bg2")), Je.push(ot("Secondary Text", "tx2")), Je.push(ot("Accent 1", "accent1")), Je.push(ot("Accent 2", "accent2")), Je.push(ot("Accent 3", "accent3")), Je.push(ot("Accent 4", "accent4")), Je.push(ot("Accent 5", "accent5")), Je.push(ot("Accent 6", "accent6"));
|
|
853
853
|
const Qp = (r) => {
|
|
854
|
-
const { docTheme: i, onSelectTheme: o, darkMode: t, isSelected: n, outlined: l, sx: c, ...g } = r, a = at(), s =
|
|
854
|
+
const { docTheme: i, onSelectTheme: o, darkMode: t, isSelected: n, outlined: l, sx: c, ...g } = r, a = at(), s = W(() => {
|
|
855
855
|
let m = [];
|
|
856
856
|
for (let p = 0; p < Je.length; p++) {
|
|
857
857
|
const h = Je[p];
|
|
858
|
-
m.push(e(
|
|
858
|
+
m.push(e(br, { schemeColorLookup: i.schemeLookup(), colorDef: h, darkMode: t, selectedColor: null }, p + "-colorDef"));
|
|
859
859
|
}
|
|
860
860
|
return e(A, { sx: { display: "flex", flexDirection: "row", flex: "none" }, children: e(A, { sx: { display: "flex", boxShadow: (p) => p.shadows[2] }, children: m }) });
|
|
861
861
|
}, [i, a]);
|
|
862
|
-
return e(bt, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (m) => `solid ${n ? m.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (m) => `solid ${m.palette.text.primary} 1px !important` } }, icon: null, ...g, children:
|
|
862
|
+
return e(bt, { sx: { borderRadius: "2px", padding: "2px", margin: "0px 0px", display: "flex", border: (m) => `solid ${n ? m.palette.text.primary : "transparent"} 1px`, "&:hover:not([disabled])": { border: (m) => `solid ${m.palette.text.primary} 1px !important` } }, icon: null, ...g, children: j(A, { sx: { border: (m) => `solid ${m.palette.divider} 1px`, minWidth: "200px", borderRadius: "2px", padding: "4px 4px", textAlign: "left", display: "flex", gap: "4px", flexDirection: "column", alignItems: "stretch", color: (m) => n ? m.palette.text.primary : void 0, "&:hover:not([disabled])": { color: (m) => m.palette.text.primary } }, children: [e(A, { sx: {}, children: i.getName() }), j(A, { sx: { paddingTop: "6px", paddingLeft: "12px", paddingRight: "12px", display: "flex", flexDirection: "column", alignItems: "stretch" }, children: [s, e(A, { sx: { flex: "1 1 100%", textOverflow: "ellipsis", overflow: "hidden", marginTop: "2px", whiteSpace: "pre", fontFamily: () => i.getFontScheme().getMajorFont() }, children: e(At, { disableInteractive: !0, PopperProps: { style: { pointerEvents: "none" }, disablePortal: !0, popperOptions: { strategy: "fixed", modifiers: [{ name: "preventOverflow", enabled: !0, options: { boundariesElement: "viewport" } }] } }, title: e("div", { style: { textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "pre" }, children: `The font used for the body.
|
|
863
863
|
The heading font is '${i.getFontScheme().getMajorFont()}'.` }), placement: "bottom-start", children: e("div", { children: i.getFontScheme().getMinorFont() }) }) })] })] }) });
|
|
864
864
|
}, eu = Y(J((r, i) => {
|
|
865
|
-
const { themes: o, selectedTheme: t, onSelectTheme: n, sx: l, disabled: c = !1, darkMode: g, ...a } = r, s =
|
|
865
|
+
const { themes: o, selectedTheme: t, onSelectTheme: n, sx: l, disabled: c = !1, darkMode: g, ...a } = r, s = W(() => {
|
|
866
866
|
const m = o?.getItems({ selected: t }) ?? [], p = [];
|
|
867
867
|
if (m.length === 0) return e(to, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "6px", paddingBottom: "6px" }, children: "No themes" });
|
|
868
868
|
const h = m.length;
|
|
@@ -878,7 +878,7 @@ The heading font is '${i.getFontScheme().getMajorFont()}'.` }), placement: "bott
|
|
|
878
878
|
}
|
|
879
879
|
return p;
|
|
880
880
|
}, [t, n, g]);
|
|
881
|
-
return e(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: i, ...a, children:
|
|
881
|
+
return e(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%" }, ref: i, ...a, children: j(A, { sx: { display: "flex", flexDirection: "column", overflow: "hidden" }, children: [e(to, { sx: { paddingLeft: "16px", paddingRight: "16px", paddingTop: "4px", paddingBottom: "2px" }, children: "Themes" }), e(re, {}), e(A, { sx: { flex: "1 1 100%", overflow: "auto", padding: "6px 16px" }, children: s })] }) });
|
|
882
882
|
})), tu = Y(J((r, i) => {
|
|
883
883
|
const { themes: o, selectedTheme: t, onSelectTheme: n, icon: l, tooltip: c, label: g, variant: a = nt.Toolbar, darkMode: s, panelProps: m, ...p } = r, h = l || D(e(xi, {})), d = G((y) => {
|
|
884
884
|
const { closeFloatAll: x } = y;
|
|
@@ -886,7 +886,7 @@ The heading font is '${i.getFontScheme().getMajorFont()}'.` }), placement: "bott
|
|
|
886
886
|
b.which === be.Enter && x();
|
|
887
887
|
} });
|
|
888
888
|
}, [o, t, n, m, s]), u = { createPopupPanel: d, tooltip: c || g || "Theme", label: g, icon: h, ...p };
|
|
889
|
-
return a === nt.Toolbar ? e(vt, { ref: i, ...u }) : e(
|
|
889
|
+
return a === nt.Toolbar ? e(vt, { ref: i, ...u }) : e(cr, { ref: i, ...u });
|
|
890
890
|
})), ou = Y(J((r, i) => {
|
|
891
891
|
const { command: o, commandHook: t, selectedTheme: n, onSelectTheme: l, disabled: c = !1, darkMode: g, label: a, icon: s, variant: m, ...p } = r;
|
|
892
892
|
Ht(o);
|
|
@@ -895,34 +895,34 @@ The heading font is '${i.getFontScheme().getMajorFont()}'.` }), placement: "bott
|
|
|
895
895
|
}, [l, t]), b = G((f, w) => {
|
|
896
896
|
const { children: C, title: v, ...k } = f;
|
|
897
897
|
let T = f.children;
|
|
898
|
-
return (y || w) && (T = e("div", { children: T })), e(
|
|
898
|
+
return (y || w) && (T = e("div", { children: T })), e(pr, { command: o, placement: m === ie.Toolbar ? "bottom-start" : "right-start", disabled: y || w, ...k, children: T });
|
|
899
899
|
}, [o, y]);
|
|
900
900
|
return e(tu, { ref: i, themes: h, selectedTheme: d, onSelectTheme: x, variant: m === ie.Menuitem ? nt.Menuitem : nt.Toolbar, createTooltip: b, disabled: y, darkMode: u, icon: D(e(xi, {})), ...p });
|
|
901
901
|
})), nu = Y(J((r, i) => {
|
|
902
902
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, ...c } = r, g = He(o, ["themeMode"])[0], a = g?.state(), s = g?.state() !== null, m = vs("(prefers-color-scheme: dark)"), p = a === "dark" || a === null && m, h = te((d, u) => {
|
|
903
|
-
const y = { variant: ie.Menuitem, commandHook: t, scope: "appearance", disabled: l }, x =
|
|
903
|
+
const y = { variant: ie.Menuitem, commandHook: t, scope: "appearance", disabled: l }, x = j(se, { children: [e(F, { ...y, command: g, icon: D(e(p ? ua : ma, {})) }), e(F, { ...y, command: u.getCommand("defaultThemeMode"), icon: D(e(m ? wc : Sc, {})) }), e(re, { orientation: "horizontal" }), e(F, { ...y, command: u.getCommand("enableDarkGrid") }), e(F, { ...y, command: u.getCommand("enableDarkImages") })] });
|
|
904
904
|
return xe({ ...d, children: x });
|
|
905
905
|
}, [l, g, t, n, m, a, s]);
|
|
906
906
|
return e(Re, { ref: i, quickCommand: "themeMode", commands: o, commandHook: t, createPopupPanel: h, label: "Appearance", tooltip: "Change the light/dark mode to match your viewing preference. This does not affect the view for others.", onQuickClick: () => {
|
|
907
907
|
g?.execute(p ? "light" : "dark", t);
|
|
908
|
-
}, selected: s, icon: D(e(p ?
|
|
908
|
+
}, selected: s, icon: D(e(p ? ua : ma, {})), ...c });
|
|
909
909
|
})), ru = Y(J((r, i) => {
|
|
910
910
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, sx: c, ...g } = r, a = G((s, m) => {
|
|
911
|
-
const p = { variant: ie.Menuitem, scope: "help", commandHook: { ...t, beforeExecute: (d, u) => t?.beforeExecute?.(d, u) !== !1 && s.floatReference.closeAll() }, disabled: l }, h =
|
|
911
|
+
const p = { variant: ie.Menuitem, scope: "help", commandHook: { ...t, beforeExecute: (d, u) => t?.beforeExecute?.(d, u) !== !1 && s.floatReference.closeAll() }, disabled: l }, h = j(se, { children: [e(F, { ...p, command: m.getCommand("showKeyboardShortcuts"), icon: D(e(Xd, {})) }), e(re, { orientation: "horizontal" }), e(F, { ...p, command: m.getCommand("gotoUrlGithub"), icon: D(e(vc, {})) }), e(F, { ...p, command: m.getCommand("gotoUrlDiscord"), icon: D(e(Cc, {})) }), e(F, { ...p, command: m.getCommand("gotoUrlDocumentation"), icon: D(e(yi, {})) }), e(F, { ...p, command: m.getCommand("gotoUrlIssue"), icon: D(e(kc, {})) })] });
|
|
912
912
|
return xe({ ...s, children: h });
|
|
913
913
|
}, [l, t]);
|
|
914
914
|
return e(Re, { ref: i, sx: c, commands: o, disabled: l, commandHook: t, scope: n, label: "Help", tooltip: "Help, feedback, and keyboard shortcuts.", createPopupPanel: a, icon: D(e(Tc, { sx: { transform: "scale(0.75)" } })), ...g });
|
|
915
915
|
})), Hi = Y(J((r, i) => {
|
|
916
|
-
const { commands: o, commandHook: t, scope: n, disabled: l = !1, preferSingleMenu: c = !0, showQuickButton: g = !0, variant: a = ie.Toolbar, ...s } = r, m = He(o, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: p, allDisabled: h } =
|
|
916
|
+
const { commands: o, commandHook: t, scope: n, disabled: l = !1, preferSingleMenu: c = !0, showQuickButton: g = !0, variant: a = ie.Toolbar, ...s } = r, m = He(o, ["insertImageFromFile", "insertImageFromURL"]), { singleMenuCommand: p, allDisabled: h } = W(() => {
|
|
917
917
|
let u = null, y = 0;
|
|
918
918
|
for (let x = 0; x < m.length; x++) m[x] && !m[x]?.disabled() && (c && a === ie.Menuitem && (u = y === 0 ? m[x] : null), y++);
|
|
919
919
|
return { singleMenuCommand: u, allDisabled: y === 0 };
|
|
920
920
|
}, [m]), d = G((u, y) => {
|
|
921
|
-
const x = { variant: ie.Menuitem, commandHook: t, scope: "insertImage", disabled: l }, b =
|
|
921
|
+
const x = { variant: ie.Menuitem, commandHook: t, scope: "insertImage", disabled: l }, b = j(se, { children: [e(F, { ...x, command: y.getCommand("insertImageFromFile"), icon: D(e(Wo, {})) }), e(F, { ...x, command: y.getCommand("insertImageFromURL"), icon: D(e(Wo, {})) })] });
|
|
922
922
|
return xe({ ...u, children: b });
|
|
923
923
|
}, [l, t, n]);
|
|
924
924
|
return p ? e(F, { ref: i, variant: a, commandHook: t, disabled: l, command: p, icon: D(e(Wo, {})), ...s }) : e(Re, { ref: i, variant: a, quickCommand: "insertImageFromFile", commands: o, commandHook: t, scope: n, disabled: l || h, tooltip: "Insert a picture from the web to complement your data.", createPopupPanel: d, icon: D(e(Wo, {})), ...s });
|
|
925
|
-
})),
|
|
925
|
+
})), xr = Y(J((r, i) => {
|
|
926
926
|
const { command: o, ...t } = r, n = un(), [l, c] = U(!1), [g, a] = U("info");
|
|
927
927
|
return ue(() => {
|
|
928
928
|
const s = n.getMode();
|
|
@@ -942,7 +942,7 @@ The heading font is '${i.getFontScheme().getMajorFont()}'.` }), placement: "bott
|
|
|
942
942
|
} });
|
|
943
943
|
}));
|
|
944
944
|
au.displayName = "InsertFunctionSumCommandPopupButton";
|
|
945
|
-
const
|
|
945
|
+
const Dn = new Map([{ key: "financial", label: "Financial", icon: e(Mc, {}) }, { key: "logical", label: "Logical", icon: e(Ic, {}) }, { key: "text", label: "Text", icon: e(Nc, {}) }, { key: "dateTime", label: "Date & Time", icon: e(Fc, {}) }, { key: "lookupReference", label: "Lookup & Reference", icon: e(Oc, {}) }, { key: "mathTrig", label: "Math & Trig", icon: e(Ac, {}) }, { key: "statDist", label: "Statistical", icon: e(Bc, {}) }, { key: "engineering", label: "Engineering", icon: e(Lc, {}) }, { key: "information", label: "Information", icon: e(Hc, {}) }, { key: "cube", label: "Cube", icon: e(zc, {}) }, { key: "database", label: "Database", icon: e(Wc, {}) }, { key: "web", label: "Web", icon: e(jc, {}) }, { key: "custom", label: "Custom", icon: e($c, {}) }].map((r) => [r.key, r]));
|
|
946
946
|
Y((r) => {
|
|
947
947
|
const { command: i, formulaFunction: o, commandHook: t, disabled: n = !1, parentFloat: l, handleInsert: c, icon: g, label: a, sx: s, ...m } = r;
|
|
948
948
|
return e(pt, { sx: { maxWidth: "360px", display: "flex", "*": { lineHeight: "1.2" }, ...s }, disabled: n, onMouseDown: (p) => {
|
|
@@ -955,10 +955,12 @@ Y((r) => {
|
|
|
955
955
|
});
|
|
956
956
|
const iu = Y(J((r, i) => {
|
|
957
957
|
const { category: o, commands: t, commandHook: n, scope: l, sx: c, disabled: g = !1, parentFloat: a, ...s } = r, m = He(t, ["insertFunction"])[0], p = G((d, u) => {
|
|
958
|
-
const y =
|
|
959
|
-
return
|
|
960
|
-
|
|
961
|
-
|
|
958
|
+
const y = Dn.get(o);
|
|
959
|
+
if (!y) return console.warn("invalidate category", o), null;
|
|
960
|
+
const x = e(lu, { category: y.label, ...d, commands: u });
|
|
961
|
+
return xe({ ...d, children: x });
|
|
962
|
+
}, [o, m, n, l]), h = Dn.get(o);
|
|
963
|
+
return e(Re, { ref: i, commands: t, commandHook: n, createPopupPanel: p, label: h.label ?? "Insert Function", tooltip: h.label, icon: D(Dn.get(o)?.icon ?? e(Rc, {})), ...s });
|
|
962
964
|
}));
|
|
963
965
|
iu.displayName = "InsertFunctionCommandPopupButton";
|
|
964
966
|
const lu = Y(J((r, i) => {
|
|
@@ -973,9 +975,9 @@ const lu = Y(J((r, i) => {
|
|
|
973
975
|
const m = { variant: ie.Menuitem, parentFloat: r.floatReference, scope: "scripts", shortcut: null }, p = [], h = c.length;
|
|
974
976
|
for (let u = 0; u < h; u++) {
|
|
975
977
|
const y = c[u];
|
|
976
|
-
p.push(e(F, { ...m, command: o.getCommand("executeScript"), commandState: { declaration: y }, tooltipProps: { description: `
|
|
978
|
+
p.push(e(F, { ...m, command: o.getCommand("executeScript"), commandState: { declaration: y }, tooltipProps: { description: `Insert ${y.getName() ?? "formula"}` }, label: y.getName() ?? `Script '${y.getName()}'` }, `formula-${y.getName()}-${u}`));
|
|
977
979
|
}
|
|
978
|
-
const d =
|
|
980
|
+
const d = e(A, { ref: i, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: p.length > 0 ? e(se, { children: e(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: p }) }) : null });
|
|
979
981
|
return xe({ ...n, children: d });
|
|
980
982
|
})), zi = ae.createContext(null);
|
|
981
983
|
zi.displayName = "HookFormContext";
|
|
@@ -998,12 +1000,12 @@ const su = Y(J((r, i) => {
|
|
|
998
1000
|
P.keyCode === be.Escape && x !== g && (k(x), u?.setValue(a, x), u?.clearErrors(a), P.stopPropagation()), h?.(P);
|
|
999
1001
|
}, [h, x, g, u]), R = te((P) => {
|
|
1000
1002
|
b(P.target.value ?? "");
|
|
1001
|
-
}, []),
|
|
1003
|
+
}, []), N = te((P) => {
|
|
1002
1004
|
b(""), y?.onBlur(P);
|
|
1003
1005
|
}, []), B = G((P) => {
|
|
1004
1006
|
k(P.target.value), y?.onChange(P);
|
|
1005
1007
|
}, [y]);
|
|
1006
|
-
return e(
|
|
1008
|
+
return e(sr, { sx: { paddingTop: (P) => P.spacing(1.5), minWidth: 135, width: "100%", ...l }, size: "small", ref: i, className: Ae("named-input", n), ...d, children: e(ui, { label: "Name", placeholder: c, onFocus: R, onBlur: N, inputRef: y?.ref, disabled: o, error: !!f, helperText: f || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (P) => P.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { className: "autoFocus", name: a, spellCheck: !1, autoComplete: "off", readOnly: o, sx: { paddingTop: (P) => P.spacing(1.25), paddingBottom: (P) => P.spacing(0.75), backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})` } } }, value: C ?? "", onChange: B, onKeyDownCapture: T, onContextMenu: (P) => {
|
|
1007
1009
|
P.stopPropagation();
|
|
1008
1010
|
} }) });
|
|
1009
1011
|
}));
|
|
@@ -1033,10 +1035,10 @@ const $o = (r) => r === null ? "" : r.toString(), cu = Y(J((r, i) => {
|
|
|
1033
1035
|
u?.onBlur(S);
|
|
1034
1036
|
}, [u]), R = G((S) => {
|
|
1035
1037
|
v(S.target.value), u?.onChange(S);
|
|
1036
|
-
}, [u]), [
|
|
1038
|
+
}, [u]), [N, B] = U(!1), P = W(() => e(Cs, { tabIndex: -1, sx: { display: "flex", position: "relative", flex: "0" }, position: "end", children: e(Vc, { disabled: !0, selected: N, onSelectToggle: (S) => {
|
|
1037
1039
|
B(S);
|
|
1038
|
-
}, label: "Select Range", icon: D(e(_c, {})) }) }), [
|
|
1039
|
-
return e(
|
|
1040
|
+
}, label: "Select Range", icon: D(e(_c, {})) }) }), [N]);
|
|
1041
|
+
return e(sr, { sx: { paddingTop: (S) => S.spacing(1.5), minWidth: 135, width: "100%", ...g }, size: "small", ref: i, className: Ae("range-input", c), ...h, children: e(ui, { label: "Range", placeholder: "Enter Range", onBlur: T, disabled: n, error: !!y, inputRef: u?.ref, helperText: y || " ", sx: { "& .MuiFormHelperText-root": { marginTop: (S) => S.spacing(0.5) } }, InputLabelProps: { shrink: !0 }, InputProps: { inputProps: { spellCheck: !1, autoComplete: "off", readOnly: n, name: o, sx: { paddingTop: (S) => S.spacing(1.25), paddingBottom: (S) => S.spacing(0.75) } }, sx: { backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})` }, endAdornment: P }, value: w ?? "", onChange: R, onKeyDownCapture: k, onContextMenu: (S) => {
|
|
1040
1042
|
S.stopPropagation();
|
|
1041
1043
|
} }) });
|
|
1042
1044
|
}));
|
|
@@ -1063,10 +1065,10 @@ const ji = Y(J((r, i) => {
|
|
|
1063
1065
|
T && requestAnimationFrame(() => {
|
|
1064
1066
|
b.current?.contains(document.activeElement) && T.focus();
|
|
1065
1067
|
});
|
|
1066
|
-
}, []), w =
|
|
1068
|
+
}, []), w = ga(() => {
|
|
1067
1069
|
h(d(Ze.findNextStep(o.getView().getZoomScale(), !1, 10)));
|
|
1068
|
-
}), C =
|
|
1069
|
-
return
|
|
1070
|
+
}), C = ga(() => h(d(Ze.findNextStep(o.getView().getZoomScale(), !0, 10)))), v = at(), k = W(() => `${Bt.getSharedMeasurer()("100%", Math.round(v.typography.fontSize), v.typography.fontFamily).width}px`, [v]);
|
|
1071
|
+
return j(A, { ref: i, className: Ae(t), sx: { padding: "0px 0px", display: "flex", alignItems: "center", color: (T) => T.palette.text.secondary, ...l }, onFocus: (T) => {
|
|
1070
1072
|
T.relatedTarget && !y && x(T.relatedTarget);
|
|
1071
1073
|
}, onBlur: (T) => {
|
|
1072
1074
|
y && !b?.current?.contains(T.relatedTarget) && x(null);
|
|
@@ -1076,7 +1078,7 @@ const ji = Y(J((r, i) => {
|
|
|
1076
1078
|
T.button === 0 && f();
|
|
1077
1079
|
}, ...c, children: [e(At, { disableInteractive: !0, title: "Zoom Out", children: e(dt, { sx: { padding: "0", "&:hover:not([disabled])": { color: (T) => T.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (T) => {
|
|
1078
1080
|
T.button !== 0 ? T.preventDefault() : w(T);
|
|
1079
|
-
}, children: e(Kd, {}) }) }), e(ks, { ref: b, 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: (T) => `0px 0px 0px 3px ${
|
|
1081
|
+
}, children: e(Kd, {}) }) }), e(ks, { ref: b, 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: (T) => `0px 0px 0px 3px ${aa(T.palette.primary.main, 0.16)}` }, "&:focus, &:hover, &.Mui-active": { boxShadow: (T) => `0px 0px 0px 2px ${aa(T.palette.primary.main, 0.16)}` } }, "& .MuiSlider-mark": { width: "1px", height: "8px" }, "& .MuiSlider-markActive": { backgroundColor: "currentColor" }, "& .MuiSlider-thumb:not(.MuiSlider-active)": { transition: s ? "left 260ms ease-in" : "none" } }, valueLabelDisplay: "auto", size: "small", track: !1, min: 0, step: 1, value: u, max: 200, marks: [{ value: 100 }], onAnimationEnd: () => m(!1), onWheel: (T) => {
|
|
1080
1082
|
h(d(Ze.findNextStep(o.getView().getZoomScale(), T.deltaY < 0, 10)));
|
|
1081
1083
|
}, onKeyDown: (T) => {
|
|
1082
1084
|
T.which === be.Down || T.which === be.Right ? (h(d(Ze.findNextStep(o.getView().getZoomScale(), !0, 10))), T.preventDefault()) : T.which === be.Up || T.which === be.Left ? (h(d(Ze.findNextStep(o.getView().getZoomScale(), !1, 10))), T.preventDefault()) : T.which !== be.Enter && T.which !== be.Escape || f();
|
|
@@ -1084,7 +1086,7 @@ const ji = Y(J((r, i) => {
|
|
|
1084
1086
|
Math.abs(R - 100) < 3 ? h(100) : h(R);
|
|
1085
1087
|
}, valueLabelFormat: (T, R) => `Zoom: ${Math.round(g)}%` }), e(At, { disableInteractive: !0, title: "Zoom In", children: e(dt, { sx: { padding: "0", "&:hover:not([disabled])": { color: (T) => T.palette.primary.main }, "& svg": { width: "12px", height: "12px" } }, size: "small", onPointerDown: (T) => {
|
|
1086
1088
|
T.button !== 0 ? T.preventDefault() : C(T);
|
|
1087
|
-
}, children: e(Yd, {}) }) }),
|
|
1089
|
+
}, children: e(Yd, {}) }) }), j(A, { sx: { display: "flex", flexDirection: "row" }, children: [e(A, { sx: { minWidth: "8px" } }), e(Oe, { noWrap: !0, component: "div", onClick: () => {
|
|
1088
1090
|
h(100);
|
|
1089
1091
|
}, sx: { cursor: "pointer", display: "flex", flex: "1 1 100%", fontSize: "0.70rem", marginLeft: "2px", marginRight: "2px", userSelect: "none", justifyContent: "center", width: k }, children: e("div", { children: Math.round(g) + "%" }) })] })] });
|
|
1090
1092
|
}));
|
|
@@ -1099,30 +1101,30 @@ const $i = Y(J((r, i) => {
|
|
|
1099
1101
|
a.current?.removeEventListener("wheel", d);
|
|
1100
1102
|
};
|
|
1101
1103
|
}, []);
|
|
1102
|
-
const s = un(), m =
|
|
1104
|
+
const s = un(), m = W(() => {
|
|
1103
1105
|
const d = s.getMode();
|
|
1104
1106
|
return d?.description ? d.description : "Ready";
|
|
1105
1107
|
}, [s]), [p, h] = U(!1);
|
|
1106
|
-
return
|
|
1108
|
+
return j(A, { ref: a, sx: { display: "flex", alignItems: "stretch", flexDirection: "row", flex: "0", paddingLeft: "12px", paddingRight: "12px", gap: "8px", paddingTop: "1px", minHeight: "calc(1em + 8px)", overflow: p ? "visible" : "hidden", boxShadow: `0px -1px 0px ${n.header.edgeStrokeFill}`, ...o }, onMouseOver: () => h(!0), onMouseLeave: () => h(!1), ...g, children: [l, e("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "end", overflow: "hidden" }, children: e(Oe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", color: (d) => d.palette.text.secondary }, variant: "caption", children: m }) }), c ? e(A, { sx: { display: "flex", alignItems: "center" }, children: c }) : null, e(re, { style: { marginTop: "6px", marginBottom: "6px" } }), e(ji, { sx: { paddingLeft: "4px", minWidth: "175px" }, sheet: t })] });
|
|
1107
1109
|
}));
|
|
1108
1110
|
$i.displayName = "StatusBar";
|
|
1109
1111
|
var Co = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1110
1112
|
function jm(r) {
|
|
1111
1113
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
1112
1114
|
}
|
|
1113
|
-
var xa, ya,
|
|
1115
|
+
var xa, ya, Pn, wa, Sa, Vo = { exports: {} }, uo = {}, mo = { exports: {} }, va = {}, Ca = { exports: {} };
|
|
1114
1116
|
function du() {
|
|
1115
1117
|
return ya ? xa : (ya = 1, xa = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
1116
1118
|
}
|
|
1117
1119
|
function pu() {
|
|
1118
|
-
if (wa) return
|
|
1120
|
+
if (wa) return Pn;
|
|
1119
1121
|
wa = 1;
|
|
1120
1122
|
var r = du();
|
|
1121
1123
|
function i() {
|
|
1122
1124
|
}
|
|
1123
1125
|
function o() {
|
|
1124
1126
|
}
|
|
1125
|
-
return o.resetWarningCache = i,
|
|
1127
|
+
return o.resetWarningCache = i, Pn = function() {
|
|
1126
1128
|
function t(c, g, a, s, m, p) {
|
|
1127
1129
|
if (p !== r) {
|
|
1128
1130
|
var h = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
|
|
@@ -1135,7 +1137,7 @@ function pu() {
|
|
|
1135
1137
|
t.isRequired = t;
|
|
1136
1138
|
var l = { array: t, bigint: t, bool: t, func: t, number: t, object: t, string: t, symbol: t, any: t, arrayOf: n, element: t, elementType: t, instanceOf: n, node: t, objectOf: n, oneOf: n, oneOfType: n, shape: n, exact: n, checkPropTypes: o, resetWarningCache: i };
|
|
1137
1139
|
return l.PropTypes = l, l;
|
|
1138
|
-
},
|
|
1140
|
+
}, Pn;
|
|
1139
1141
|
}
|
|
1140
1142
|
function mn() {
|
|
1141
1143
|
return Sa || (Sa = 1, Ca.exports = pu()()), Ca.exports;
|
|
@@ -1155,7 +1157,7 @@ function gn() {
|
|
|
1155
1157
|
}), xt;
|
|
1156
1158
|
}
|
|
1157
1159
|
var Ea, Da, yt = {};
|
|
1158
|
-
function
|
|
1160
|
+
function yr() {
|
|
1159
1161
|
if (Da) return We;
|
|
1160
1162
|
Da = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.addClassName = c, We.addEvent = function(a, s, m, p) {
|
|
1161
1163
|
if (!a) return;
|
|
@@ -1314,7 +1316,7 @@ function Vi() {
|
|
|
1314
1316
|
const c = Math.round(n / t[0]) * t[0], g = Math.round(l / t[1]) * t[1];
|
|
1315
1317
|
return [c, g];
|
|
1316
1318
|
};
|
|
1317
|
-
var r = gn(), i =
|
|
1319
|
+
var r = gn(), i = yr();
|
|
1318
1320
|
function o(t) {
|
|
1319
1321
|
const n = t.findDOMNode();
|
|
1320
1322
|
if (!n) throw new Error("<DraggableCore>: Unmounted during event!");
|
|
@@ -1322,7 +1324,7 @@ function Vi() {
|
|
|
1322
1324
|
}
|
|
1323
1325
|
return lt;
|
|
1324
1326
|
}
|
|
1325
|
-
var Ra, Ma,
|
|
1327
|
+
var Ra, Ma, Ia, Na, go = {}, Uo = {};
|
|
1326
1328
|
function _i() {
|
|
1327
1329
|
return Ra || (Ra = 1, Object.defineProperty(Uo, "__esModule", { value: !0 }), Uo.default = function() {
|
|
1328
1330
|
}), Uo;
|
|
@@ -1343,7 +1345,7 @@ function uu() {
|
|
|
1343
1345
|
for (const k in b) k !== "default" && {}.hasOwnProperty.call(b, k) && ((C = (w = Object.defineProperty) && Object.getOwnPropertyDescriptor(b, k)) && (C.get || C.set) ? w(v, k, C) : v[k] = b[k]);
|
|
1344
1346
|
return v;
|
|
1345
1347
|
})(d, u);
|
|
1346
|
-
})(ae), i = g(mn()), o = g(Kt), t =
|
|
1348
|
+
})(ae), i = g(mn()), o = g(Kt), t = yr(), n = Vi(), l = gn(), c = g(_i());
|
|
1347
1349
|
function g(d) {
|
|
1348
1350
|
return d && d.__esModule ? d : { default: d };
|
|
1349
1351
|
}
|
|
@@ -1439,7 +1441,7 @@ function uu() {
|
|
|
1439
1441
|
}, scale: 1 }), go;
|
|
1440
1442
|
}
|
|
1441
1443
|
function mu() {
|
|
1442
|
-
return
|
|
1444
|
+
return Ia || (Ia = 1, (function(r) {
|
|
1443
1445
|
Object.defineProperty(r, "__esModule", { value: !0 }), Object.defineProperty(r, "DraggableCore", { enumerable: !0, get: function() {
|
|
1444
1446
|
return a.default;
|
|
1445
1447
|
} }), r.default = void 0;
|
|
@@ -1472,7 +1474,7 @@ function mu() {
|
|
|
1472
1474
|
return w;
|
|
1473
1475
|
}
|
|
1474
1476
|
return ka = 1, _o.exports = y, _o.exports.clsx = y, _o.exports;
|
|
1475
|
-
})(), l =
|
|
1477
|
+
})(), l = yr(), c = Vi(), g = gn(), a = m(uu()), s = m(_i());
|
|
1476
1478
|
function m(u) {
|
|
1477
1479
|
return u && u.__esModule ? u : { default: u };
|
|
1478
1480
|
}
|
|
@@ -1542,20 +1544,20 @@ function mu() {
|
|
|
1542
1544
|
return this.props?.nodeRef?.current ?? t.default.findDOMNode(this);
|
|
1543
1545
|
}
|
|
1544
1546
|
render() {
|
|
1545
|
-
const { axis: y, bounds: x, children: b, defaultPosition: f, defaultClassName: w, defaultClassNameDragging: C, defaultClassNameDragged: v, position: k, positionOffset: T, scale: R, ...
|
|
1547
|
+
const { axis: y, bounds: x, children: b, defaultPosition: f, defaultClassName: w, defaultClassNameDragging: C, defaultClassNameDragged: v, position: k, positionOffset: T, scale: R, ...N } = this.props;
|
|
1546
1548
|
let B = {}, P = null;
|
|
1547
1549
|
const S = !k || this.state.dragging, M = k || f, L = { x: (0, c.canDragX)(this) && S ? this.state.x : M.x, y: (0, c.canDragY)(this) && S ? this.state.y : M.y };
|
|
1548
1550
|
this.state.isElementSVG ? P = (0, l.createSVGTransform)(L, T) : B = (0, l.createCSSTransform)(L, T);
|
|
1549
1551
|
const O = (0, n.clsx)(b.props.className || "", w, { [C]: this.state.dragging, [v]: this.state.dragged });
|
|
1550
|
-
return i.createElement(a.default, p({},
|
|
1552
|
+
return i.createElement(a.default, p({}, N, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), i.cloneElement(i.Children.only(b), { className: O, style: { ...b.props.style, ...B }, transform: P }));
|
|
1551
1553
|
}
|
|
1552
1554
|
}
|
|
1553
1555
|
r.default = d, h(d, "displayName", "Draggable"), h(d, "propTypes", { ...a.default.propTypes, axis: o.default.oneOf(["both", "x", "y", "none"]), bounds: o.default.oneOfType([o.default.shape({ left: o.default.number, right: o.default.number, top: o.default.number, bottom: o.default.number }), o.default.string, o.default.oneOf([!1])]), defaultClassName: o.default.string, defaultClassNameDragging: o.default.string, defaultClassNameDragged: o.default.string, defaultPosition: o.default.shape({ x: o.default.number, y: o.default.number }), positionOffset: o.default.shape({ x: o.default.oneOfType([o.default.number, o.default.string]), y: o.default.oneOfType([o.default.number, o.default.string]) }), position: o.default.shape({ x: o.default.number, y: o.default.number }), className: g.dontSetMe, style: g.dontSetMe, transform: g.dontSetMe }), h(d, "defaultProps", { ...a.default.defaultProps, axis: "both", bounds: !1, defaultClassName: "react-draggable", defaultClassNameDragging: "react-draggable-dragging", defaultClassNameDragged: "react-draggable-dragged", defaultPosition: { x: 0, y: 0 }, scale: 1 });
|
|
1554
1556
|
})(va)), va;
|
|
1555
1557
|
}
|
|
1556
1558
|
function Ui() {
|
|
1557
|
-
if (
|
|
1558
|
-
|
|
1559
|
+
if (Na) return mo.exports;
|
|
1560
|
+
Na = 1;
|
|
1559
1561
|
const { default: r, DraggableCore: i } = mu();
|
|
1560
1562
|
return mo.exports = r, mo.exports.default = r, mo.exports.DraggableCore = i, mo.exports;
|
|
1561
1563
|
}
|
|
@@ -1709,8 +1711,8 @@ function qi() {
|
|
|
1709
1711
|
var w = this.props, C = w.minConstraints, v = w.maxConstraints, k = w.lockAspectRatio;
|
|
1710
1712
|
if (!C && !v && !k) return [b, f];
|
|
1711
1713
|
if (k) {
|
|
1712
|
-
var T = this.props.width / this.props.height, R = b - this.props.width,
|
|
1713
|
-
Math.abs(R) > Math.abs(
|
|
1714
|
+
var T = this.props.width / this.props.height, R = b - this.props.width, N = f - this.props.height;
|
|
1715
|
+
Math.abs(R) > Math.abs(N * T) ? f = b / T : b = f * T;
|
|
1714
1716
|
}
|
|
1715
1717
|
var B = b, P = f, S = this.slack || [0, 0], M = S[0], L = S[1];
|
|
1716
1718
|
return b += M, f += L, C && (b = Math.max(C[0], b), f = Math.max(C[1], f)), v && (b = Math.min(v[0], b), f = Math.min(v[1], f)), this.slack = [M + (B - b), L + (P - f)], [b, f];
|
|
@@ -1719,14 +1721,14 @@ function qi() {
|
|
|
1719
1721
|
return function(C, v) {
|
|
1720
1722
|
var k = v.node, T = v.deltaX, R = v.deltaY;
|
|
1721
1723
|
b === "onResizeStart" && w.resetData();
|
|
1722
|
-
var
|
|
1723
|
-
if (
|
|
1724
|
+
var N = (w.props.axis === "both" || w.props.axis === "x") && f !== "n" && f !== "s", B = (w.props.axis === "both" || w.props.axis === "y") && f !== "e" && f !== "w";
|
|
1725
|
+
if (N || B) {
|
|
1724
1726
|
var P = f[0], S = f[f.length - 1], M = k.getBoundingClientRect();
|
|
1725
1727
|
w.lastHandleRect != null && (S === "w" && (T += M.left - w.lastHandleRect.left), P === "n" && (R += M.top - w.lastHandleRect.top)), w.lastHandleRect = M, S === "w" && (T = -T), P === "n" && (R = -R);
|
|
1726
|
-
var L = w.props.width + (
|
|
1728
|
+
var L = w.props.width + (N ? T / w.props.transformScale : 0), O = w.props.height + (B ? R / w.props.transformScale : 0), V = w.runConstraints(L, O);
|
|
1727
1729
|
L = V[0], O = V[1];
|
|
1728
|
-
var
|
|
1729
|
-
E && !(b === "onResize" && !
|
|
1730
|
+
var I = L !== w.props.width || O !== w.props.height, E = typeof w.props[b] == "function" ? w.props[b] : null;
|
|
1731
|
+
E && !(b === "onResize" && !I) && (C.persist == null || C.persist(), E(C, { node: k, size: { width: L, height: O }, handle: f })), b === "onResizeStop" && w.resetData();
|
|
1730
1732
|
}
|
|
1731
1733
|
};
|
|
1732
1734
|
}, x.renderResizeHandle = function(b, f) {
|
|
@@ -1740,14 +1742,14 @@ function qi() {
|
|
|
1740
1742
|
f.width, f.height, f.handle, f.handleSize, f.lockAspectRatio, f.axis, f.minConstraints, f.maxConstraints, f.onResize, f.onResizeStop, f.onResizeStart;
|
|
1741
1743
|
var k = f.resizeHandles;
|
|
1742
1744
|
f.transformScale;
|
|
1743
|
-
var T = (function(R,
|
|
1745
|
+
var T = (function(R, N) {
|
|
1744
1746
|
if (R == null) return {};
|
|
1745
1747
|
var B, P, S = {}, M = Object.keys(R);
|
|
1746
|
-
for (P = 0; P < M.length; P++) B = M[P],
|
|
1748
|
+
for (P = 0; P < M.length; P++) B = M[P], N.indexOf(B) >= 0 || (S[B] = R[B]);
|
|
1747
1749
|
return S;
|
|
1748
1750
|
})(f, n);
|
|
1749
1751
|
return (0, o.cloneElement)(w, a(a({}, T), {}, { className: (C ? C + " " : "") + "react-resizable", children: [].concat(w.props.children, k.map(function(R) {
|
|
1750
|
-
var
|
|
1752
|
+
var N, B = (N = b.handleRefs[R]) != null ? N : b.handleRefs[R] = r.createRef();
|
|
1751
1753
|
return r.createElement(i.DraggableCore, c({}, v, { nodeRef: B, key: "resizableHandle-" + R, onStop: b.resizeHandler("onResizeStop", R), onStart: b.resizeHandler("onResizeStart", R), onDrag: b.resizeHandler("onResize", R) }), b.renderResizeHandle(R, B));
|
|
1752
1754
|
})) }));
|
|
1753
1755
|
}, y;
|
|
@@ -1846,15 +1848,15 @@ function hu() {
|
|
|
1846
1848
|
}, x.prototype.render = function() {
|
|
1847
1849
|
var b = this.props, f = b.handle, w = b.handleSize;
|
|
1848
1850
|
b.onResize;
|
|
1849
|
-
var C = b.onResizeStart, v = b.onResizeStop, k = b.draggableOpts, T = b.minConstraints, R = b.maxConstraints,
|
|
1851
|
+
var C = b.onResizeStart, v = b.onResizeStop, k = b.draggableOpts, T = b.minConstraints, R = b.maxConstraints, N = b.lockAspectRatio, B = b.axis;
|
|
1850
1852
|
b.width, b.height;
|
|
1851
1853
|
var P = b.resizeHandles, S = b.style, M = b.transformScale, L = (function(O, V) {
|
|
1852
1854
|
if (O == null) return {};
|
|
1853
|
-
var
|
|
1854
|
-
for (E = 0; E < Q.length; E++)
|
|
1855
|
+
var I, E, K = {}, Q = Object.keys(O);
|
|
1856
|
+
for (E = 0; E < Q.length; E++) I = Q[E], V.indexOf(I) >= 0 || (K[I] = O[I]);
|
|
1855
1857
|
return K;
|
|
1856
1858
|
})(b, n);
|
|
1857
|
-
return r.createElement(o.default, { axis: B, draggableOpts: k, handle: f, handleSize: w, height: this.state.height, lockAspectRatio:
|
|
1859
|
+
return r.createElement(o.default, { axis: B, draggableOpts: k, handle: f, handleSize: w, height: this.state.height, lockAspectRatio: N, maxConstraints: R, minConstraints: T, onResizeStart: C, onResize: this.onResize, onResizeStop: v, resizeHandles: P, transformScale: M, width: this.state.width }, r.createElement("div", g({}, L, { style: s(s({}, S), {}, { width: this.state.width + "px", height: this.state.height + "px" }) })));
|
|
1858
1860
|
}, x;
|
|
1859
1861
|
})(r.Component);
|
|
1860
1862
|
return fo.default = h, h.propTypes = s(s({}, t.resizableProps), {}, { children: i.default.element }), fo;
|
|
@@ -1862,7 +1864,7 @@ function hu() {
|
|
|
1862
1864
|
var fu = (La || (La = 1, Vo.exports = function() {
|
|
1863
1865
|
throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable");
|
|
1864
1866
|
}, Vo.exports.Resizable = qi().default, Vo.exports.ResizableBox = hu().default), Vo.exports);
|
|
1865
|
-
function
|
|
1867
|
+
function Rn(r, i) {
|
|
1866
1868
|
if (typeof r == "function") return r(i);
|
|
1867
1869
|
r && (r.current = i);
|
|
1868
1870
|
}
|
|
@@ -1870,8 +1872,8 @@ var Fo = parseInt(xs.split(".")[0], 10) >= 19 ? function(r) {
|
|
|
1870
1872
|
return (i) => {
|
|
1871
1873
|
const o = [];
|
|
1872
1874
|
for (const t of r) {
|
|
1873
|
-
const n =
|
|
1874
|
-
o.push(l ? n : () =>
|
|
1875
|
+
const n = Rn(t, i), l = typeof n == "function";
|
|
1876
|
+
o.push(l ? n : () => Rn(t, null));
|
|
1875
1877
|
}
|
|
1876
1878
|
return () => {
|
|
1877
1879
|
for (const t of o) t();
|
|
@@ -1879,7 +1881,7 @@ var Fo = parseInt(xs.split(".")[0], 10) >= 19 ? function(r) {
|
|
|
1879
1881
|
};
|
|
1880
1882
|
} : function(r) {
|
|
1881
1883
|
return (i) => {
|
|
1882
|
-
for (const o of r)
|
|
1884
|
+
for (const o of r) Rn(o, i);
|
|
1883
1885
|
};
|
|
1884
1886
|
};
|
|
1885
1887
|
const Xi = Y(J((r, i) => {
|
|
@@ -1900,12 +1902,12 @@ const Xi = Y(J((r, i) => {
|
|
|
1900
1902
|
if (ne && ne.getRanges()) return k;
|
|
1901
1903
|
let le = null;
|
|
1902
1904
|
try {
|
|
1903
|
-
const X = n.getRanges(k),
|
|
1904
|
-
le = n.getRanges(
|
|
1905
|
+
const X = n.getRanges(k), z = X.getCoords().map((ee) => ({ $colEnd: !0, $rowEnd: !0, $colStart: !0, $rowStart: !0, ...ee }));
|
|
1906
|
+
le = n.getRanges(z);
|
|
1905
1907
|
} catch {
|
|
1906
1908
|
}
|
|
1907
1909
|
if (!le) {
|
|
1908
|
-
const X = n.getSelectedRanges().getCoords().map((
|
|
1910
|
+
const X = n.getSelectedRanges().getCoords().map((z) => ({ $colEnd: !0, $rowEnd: !0, $colStart: !0, $rowStart: !0, ...z }));
|
|
1909
1911
|
le = n.getRanges(X);
|
|
1910
1912
|
}
|
|
1911
1913
|
try {
|
|
@@ -1915,12 +1917,12 @@ const Xi = Y(J((r, i) => {
|
|
|
1915
1917
|
T(v()), m.showMessage?.(X.message, { type: wt.Error });
|
|
1916
1918
|
}
|
|
1917
1919
|
return null;
|
|
1918
|
-
}, [k, t, f, w]),
|
|
1920
|
+
}, [k, t, f, w]), N = te(() => {
|
|
1919
1921
|
if (n.isClosed()) return;
|
|
1920
1922
|
const _ = [];
|
|
1921
1923
|
for (let X = 0; X < u.length; X++) {
|
|
1922
|
-
const
|
|
1923
|
-
_.push({ $colEnd: !0, $rowEnd: !0, $colStart: !0, $rowStart: !0, ...
|
|
1924
|
+
const z = u[X];
|
|
1925
|
+
_.push({ $colEnd: !0, $rowEnd: !0, $colStart: !0, $rowStart: !0, ...z });
|
|
1924
1926
|
}
|
|
1925
1927
|
let ne = null;
|
|
1926
1928
|
try {
|
|
@@ -1931,7 +1933,7 @@ const Xi = Y(J((r, i) => {
|
|
|
1931
1933
|
le = ne?.length > 0 ? ne[0].getName() : n.getSelectedSheet().getSelectedRange().toString(), d({ text: le });
|
|
1932
1934
|
}, [n, u]), [B, P] = U(() => t?.getItems() ?? null);
|
|
1933
1935
|
_e(t, { onCollectionChange(_) {
|
|
1934
|
-
P(t.getItems()),
|
|
1936
|
+
P(t.getItems()), N();
|
|
1935
1937
|
}, onClose(_) {
|
|
1936
1938
|
P([]);
|
|
1937
1939
|
} }), ue(() => {
|
|
@@ -1945,7 +1947,7 @@ const Xi = Y(J((r, i) => {
|
|
|
1945
1947
|
}, onViewChange(_) {
|
|
1946
1948
|
M(_?.getSelectedSheet());
|
|
1947
1949
|
} });
|
|
1948
|
-
const [L, O] = U(null), V = te(Ze.debounce(
|
|
1950
|
+
const [L, O] = U(null), V = te(Ze.debounce(N, L ? 320 : 0), []);
|
|
1949
1951
|
_e(S.getSelection(), { onChange: () => {
|
|
1950
1952
|
y((_) => {
|
|
1951
1953
|
const ne = n.getSelectedRanges().getCoords();
|
|
@@ -1961,22 +1963,22 @@ const Xi = Y(J((r, i) => {
|
|
|
1961
1963
|
}
|
|
1962
1964
|
d({ text: n.getSelectedSheet().getSelectedRange().toString() }), V();
|
|
1963
1965
|
}, [u, n, L]);
|
|
1964
|
-
const
|
|
1966
|
+
const I = Se(null), E = G((_) => {
|
|
1965
1967
|
const { onMouseDown: ne, onMouseUp: le, ...X } = _;
|
|
1966
|
-
return e(dt, { ...X, sx: { ...X?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: !0, children: e(
|
|
1967
|
-
|
|
1968
|
-
}, onKeyDown: (
|
|
1969
|
-
if (
|
|
1968
|
+
return e(dt, { ...X, sx: { ...X?.sx, display: "flex", flex: "1 1 100%" }, disableRipple: !0, children: e(lr, { inputMode: "text", inputProps: { tabIndex: 0, name: "input-named-range", maxLength: 255, className: "input", autoFocus: !1, spellCheck: !1, autoComplete: "off", ref: I }, sx: { "&::before": { borderBottom: "1px solid transparent" }, "&:hover:not(.Mui-disabled):not(.Mui-focused):not(.Mui-error):before": { borderBottom: (z) => `1px solid ${z.palette.text.icon ?? z.palette.action.active}` }, "&:hover:not(.Mui-disabled):not(.Mui-error):before": { borderBottom: (z) => `1px solid ${z.palette.primary.main}` }, "::after": { borderBottom: (z) => `1px solid ${z.palette.primary.main}` }, paddingTop: "0px", paddingBottom: "0px", fontSize: 11 * Bt.getDeviceScale(), fontStyle: h?.fontStyle, paddingLeft: (z) => z.spacing(0.75), paddingRight: (z) => z.spacing(0.75), boxShadow: "none", flex: "1", color: (z) => z.palette.text.secondary, input: { padding: "0", textAlign: "left", "&:hover:not(.Mui-disabled):not(.Mui-error)": { color: (z) => z.palette.text.primary }, "&:focus:not(.Mui-disabled):not(.Mui-error)": { color: (z) => z.palette.text.primary } } }, value: k, onFocus: (z) => {
|
|
1969
|
+
z.target?.select();
|
|
1970
|
+
}, onKeyDown: (z) => {
|
|
1971
|
+
if (z.which === be.Enter || z.which === be.Tab) {
|
|
1970
1972
|
let ee = k;
|
|
1971
|
-
v() !== k && (
|
|
1972
|
-
} else if (
|
|
1973
|
-
|
|
1974
|
-
}, 0),
|
|
1975
|
-
else if (
|
|
1973
|
+
v() !== k && (z.stopPropagation(), z.preventDefault(), ee = R()), ee ? K(ee) : l?.();
|
|
1974
|
+
} else if (z.which === be.Escape) v() !== k ? (T(v()), setTimeout(() => {
|
|
1975
|
+
z.target?.select();
|
|
1976
|
+
}, 0), z.stopPropagation(), z.preventDefault()) : l?.();
|
|
1977
|
+
else if (z.which === be.Space) return void z.stopPropagation();
|
|
1976
1978
|
}, onBlur: () => {
|
|
1977
1979
|
T(v());
|
|
1978
|
-
}, onChange: (
|
|
1979
|
-
T(
|
|
1980
|
+
}, onChange: (z) => {
|
|
1981
|
+
T(z.target.value);
|
|
1980
1982
|
} }) });
|
|
1981
1983
|
}, [k, h]), K = te(async (_) => {
|
|
1982
1984
|
try {
|
|
@@ -1993,12 +1995,12 @@ const Xi = Y(J((r, i) => {
|
|
|
1993
1995
|
const ne = { variant: ie.Menuitem, parentFloat: _.floatReference, commandHook: { ...a?.commandHook, beforeExecute: (Fe, Be) => (f?.closeAll(), a?.commandHook?.beforeExecute?.(Fe, Be)) }, scope: a?.scope, commands: a?.commands };
|
|
1994
1996
|
let le = t.getItems({ scope: n?.getSelectedSheet().getName() });
|
|
1995
1997
|
le = le.sort((Fe, Be) => Fe.getType() === Be.getType() ? Fe.getName().localeCompare(Be.getName()) : Fe.getType() === "range" ? -1 : 1);
|
|
1996
|
-
const X = w ? null : ["editNamedReference", "deleteNamedReference"],
|
|
1998
|
+
const X = w ? null : ["editNamedReference", "deleteNamedReference"], z = w ? null : ["editTable", null, "convertTableToRange", "deleteTable"], ee = [], me = le.length;
|
|
1997
1999
|
for (let Fe = 0; Fe < me; Fe++) {
|
|
1998
2000
|
const Be = le[Fe], Ye = Be.getRanges();
|
|
1999
2001
|
if (!Ye || Be.isHidden()) continue;
|
|
2000
2002
|
const ve = Be.getType();
|
|
2001
|
-
ve !== le[Fe - 1]?.getType() && (Fe > 0 && ee.push(e(re, { orientation: "horizontal" }, `type-divider-${ee.length}`)), ee.push(e(to, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: Be.getType() === "reference" ? "Ranges" : "Tables" }, `type-header-${ee.length}`))), ve === "reference" ? ee.push(
|
|
2003
|
+
ve !== le[Fe - 1]?.getType() && (Fe > 0 && ee.push(e(re, { orientation: "horizontal" }, `type-divider-${ee.length}`)), ee.push(e(to, { variant: "subtitle2", sx: { paddingLeft: "16px" }, children: Be.getType() === "reference" ? "Ranges" : "Tables" }, `type-header-${ee.length}`))), ve === "reference" ? ee.push(Pe(ct, { ...ne, key: "named-" + ee.length, popupCommandKeys: X, popupScope: "namedItem", scope: "namedItem", commandState: Be, commands: a?.commands, label: Be.getName(), quickCommand: "selectNamed", disabled: !Be.getRanges() || g, icon: (je) => {
|
|
2002
2004
|
switch (je.key()) {
|
|
2003
2005
|
case "editNamedReference":
|
|
2004
2006
|
return D(e(qc, {}));
|
|
@@ -2007,85 +2009,85 @@ const Xi = Y(J((r, i) => {
|
|
|
2007
2009
|
default:
|
|
2008
2010
|
return D(e(Uc, {}));
|
|
2009
2011
|
}
|
|
2010
|
-
} })) : ve === "table" && ee.push(
|
|
2012
|
+
} })) : ve === "table" && ee.push(Pe(ct, { ...ne, key: "namedItem-" + ee.length, popupCommandKeys: z, popupScope: "namedItem", scope: "namedItem", commands: a?.commands, commandState: Be, label: Be.getName(), quickCommand: "selectNamed", disabled: !Ye || g, icon: (je) => (je.key(), D(e(an, {}))) }));
|
|
2011
2013
|
}
|
|
2012
|
-
const Le =
|
|
2014
|
+
const Le = j(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, ...p, children: [w ? null : e(F, { ...ne, scope: "namedItem", command: a?.commands.getCommand("addNamedReference"), icon: D(e(Xc, {})) }), ee && ee.length > 0 ? j(se, { children: [w ? null : e(re, { orientation: "horizontal" }), e(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: ee })] }) : null] });
|
|
2013
2015
|
return xe({ ..._, children: Le });
|
|
2014
2016
|
}, [n, B, t, h, w]), q = zt(i, () => ({ focus(_) {
|
|
2015
|
-
|
|
2017
|
+
I.current?.focus(_);
|
|
2016
2018
|
} }), []);
|
|
2017
|
-
return e(A, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...s }, ref: Fo([q, i]), ...p, children: e(vt, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%", height: "27px" }, ...s }, buttonProps: { sx: { backgroundColor: (_) => _.palette.background.paper, backgroundImage: `linear-gradient(${he("#fff",
|
|
2019
|
+
return e(A, { className: "outer", sx: { minWidth: 120, flex: "1 1 100%", display: "flex", alignItems: "center", justifyContent: "start", ...s }, ref: Fo([q, i]), ...p, children: e(vt, { className: "outer-button", sx: { display: "flex", flex: "1 1 100%", "& .tooltip-wrapper": { display: "flex", flex: "1 1 100%", width: "100%", height: "27px" }, ...s }, buttonProps: { sx: { backgroundColor: (_) => _.palette.background.paper, backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})` } }, tabIndex: -1, outlined: { color: (_) => o ? _.palette.action.disabled : he(_.palette.divider, 0.2) }, parentFloat: f, createPopupPanel: Q, onPopupOpen: () => b(!0), onPopupClose: () => b(!1), createTooltip: ({ children: _ }, ne) => e(rt, { title: ne || x ? "" : "Name Box", disabled: ne, leaveDelay: 0, sx: { opacity: ne || x ? 0 : 1 }, children: _ }), createQuickButton: E }) });
|
|
2018
2020
|
}));
|
|
2019
2021
|
Xi.displayName = "NamedCollectionEditor";
|
|
2020
2022
|
const bu = (r, i) => e(Xi, { ref: i, ...r }), Ki = Y(J((r, i) => {
|
|
2021
2023
|
const { sx: o, workbook: t, sheetElement: n, gridStyle: l, showNamedCollectionEditor: c = !0, NamedCollectionEditorProps: g, renderNamedCollectionEditor: a = bu, disabled: s, commands: m, ...p } = r, [h, d] = U(t?.getSelectedSheet());
|
|
2022
|
-
_e(t, { onSheetsChange: (
|
|
2023
|
-
d(
|
|
2024
|
-
}, onViewChange(
|
|
2025
|
-
d(
|
|
2024
|
+
_e(t, { onSheetsChange: (z) => {
|
|
2025
|
+
d(z?.getSelectedSheet());
|
|
2026
|
+
}, onViewChange(z) {
|
|
2027
|
+
d(z?.getSelectedSheet());
|
|
2026
2028
|
} });
|
|
2027
|
-
const [u, y] = U(h.getSelection().getCoords().cell), x = h.getRange(u).getCell(), b = s || !x.isEditAllowed(), f = Se(null), w =
|
|
2029
|
+
const [u, y] = U(h.getSelection().getCoords().cell), x = h.getRange(u).getCell(), b = s || !x.isEditAllowed(), f = Se(null), w = W(() => ({ fontSize: 11 }), []);
|
|
2028
2030
|
_e(h.getSelection(), { onChange: () => {
|
|
2029
2031
|
y(h.getSelection().getCoords().cell);
|
|
2030
2032
|
} }), _e(h, { onProtectionChange() {
|
|
2031
2033
|
y(h.getSelection().getCoords().cell);
|
|
2032
2034
|
} });
|
|
2033
|
-
const C = f.current?.getLineHeight() ?? 20, [v, k] = U(C), [T, R] = U(5), [
|
|
2034
|
-
|
|
2035
|
+
const C = f.current?.getLineHeight() ?? 20, [v, k] = U(C), [T, R] = U(5), [N, B] = U(1), P = te((z, { size: ee }) => {
|
|
2036
|
+
z.preventDefault(), z.stopPropagation();
|
|
2035
2037
|
const me = Math.floor(ee.height / C);
|
|
2036
2038
|
k(me * C + 1), me > 1 && R(me);
|
|
2037
|
-
}, [C]), S = te((
|
|
2039
|
+
}, [C]), S = te((z, { size: ee }) => {
|
|
2038
2040
|
const me = Math.floor(ee.height / C);
|
|
2039
2041
|
B(me);
|
|
2040
2042
|
}, [C]), M = un(), L = M.getMode();
|
|
2041
2043
|
let O = null;
|
|
2042
2044
|
L?.key === "edit" && (O = L.args?.stateAndCoords);
|
|
2043
|
-
const V =
|
|
2044
|
-
let
|
|
2045
|
-
return
|
|
2045
|
+
const V = W(() => {
|
|
2046
|
+
let z = O?.editState;
|
|
2047
|
+
return z || (z = lp(() => h.getRange(u).getCell())), e(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "row", gap: 4 }, children: e(sp, { ref: f, activeCoords: u, sheet: h, onFocus: () => {
|
|
2046
2048
|
n?.startEdit({ autoFocus: !1, editMode: !0, cell: u });
|
|
2047
2049
|
}, defaultTextStyle: w, useRichStyling: !1, disabled: b, onChangeEdit: (ee) => {
|
|
2048
2050
|
if (ee.dirty !== void 0) {
|
|
2049
2051
|
const me = { sheet: h, coords: u, editState: ee };
|
|
2050
2052
|
M.setMode((Le) => ({ ...Le, args: { ...Le?.args, stateAndCoords: me } }));
|
|
2051
2053
|
}
|
|
2052
|
-
}, editState:
|
|
2054
|
+
}, editState: z, commands: m, onCancelEdit: () => {
|
|
2053
2055
|
n?.cancelEdit(), n?.focus();
|
|
2054
2056
|
}, onSubmitEdit: () => {
|
|
2055
2057
|
n?.submitEdit(), n?.focus();
|
|
2056
|
-
}, linesVisible:
|
|
2057
|
-
}, [h, O, u,
|
|
2058
|
-
|
|
2058
|
+
}, linesVisible: N }) });
|
|
2059
|
+
}, [h, O, u, N, n]), I = Se(null), E = W(() => c ? a({ names: t.getNames(), workbook: t, ...g }, I) : null, [a, g, c, h, t, b]), K = W(() => j(Po, { elevation: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 0, backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})`, border: (z) => `solid ${b ? z.palette.action.disabled : he(z.palette.divider, 0.2)} 1px` }, children: [e(bt, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "warning", "aria-label": "cancel-formula-edit", icon: D(e(Kc, {})), tooltipProps: { label: "Cancel", simple: !0 }, disabled: b || O === null, onMouseDown: (z) => {
|
|
2060
|
+
z.button === 0 && z.preventDefault();
|
|
2059
2061
|
}, onClick: () => {
|
|
2060
2062
|
n.cancelEdit();
|
|
2061
|
-
} }), e(bt, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "primary", "aria-label": "commit-formula-edit", icon: D(e(Yc, {})), tooltipProps: { label: "Enter", simple: !0 }, disabled: b || O === null, onMouseDown: (
|
|
2062
|
-
|
|
2063
|
+
} }), e(bt, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, color: "primary", "aria-label": "commit-formula-edit", icon: D(e(Yc, {})), tooltipProps: { label: "Enter", simple: !0 }, disabled: b || O === null, onMouseDown: (z) => {
|
|
2064
|
+
z.button === 0 && z.preventDefault();
|
|
2063
2065
|
}, onClick: () => {
|
|
2064
2066
|
n.submitEdit();
|
|
2065
|
-
} }), e(bt, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, disabled: !0, "aria-label": "commit-formula-function", icon: D(e(Zc, { sx: { transform: "scale(0.85)" } })), tooltipProps: { label: "Insert Function", simple: !0 }, onMouseDown: (
|
|
2066
|
-
|
|
2067
|
-
} })] }), [b, O]), Q = at(), [q, _] = U(!1), ne =
|
|
2068
|
-
|
|
2069
|
-
}, children: [e(A, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignSelf: "baseline", paddingLeft: (
|
|
2070
|
-
|
|
2067
|
+
} }), e(bt, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, disabled: !0, "aria-label": "commit-formula-function", icon: D(e(Zc, { sx: { transform: "scale(0.85)" } })), tooltipProps: { label: "Insert Function", simple: !0 }, onMouseDown: (z) => {
|
|
2068
|
+
z.button === 0 && z.preventDefault();
|
|
2069
|
+
} })] }), [b, O]), Q = at(), [q, _] = U(!1), ne = W(() => j(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", gap: (z) => z.spacing(0.5), alignItems: "start" }, children: [K, j(Po, { elevation: 0, sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", fontFamily: (z) => z.typography.fontFamily, fontSize: 11 * Bt.getDeviceScale(), "& .editor-placement": { top: "2px !important" }, boxShadow: "none", borderRadius: (z) => `${z.shape.borderRadius}px`, backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})`, border: (z) => `solid ${b ? z.palette.action.disabled : he(z.palette.divider, 0.2)} 1px`, "& textarea": { color: (z) => b ? `${z.palette.text.disabled} !important` : z.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: () => _(!0), onBlur: () => _(!1), onMouseDown: (z) => {
|
|
2070
|
+
z.target?.classList.contains("react-resizable-handle") && z.preventDefault();
|
|
2071
|
+
}, children: [e(A, { className: "formula-editor", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", alignSelf: "baseline", paddingLeft: (z) => z.spacing(1), paddingRight: (z) => z.spacing(1) }, children: e(fu.ResizableBox, { height: v, draggableOpts: { grid: [C, C] }, minConstraints: [C, C], maxConstraints: [15 * C, 15 * C], onResize: S, onResizeStop: P, resizeHandles: ["s"], axis: "y", style: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: V }) }), e(bt, { sx: { padding: "0px", margin: "0px 0px", border: "none !important", "&.Mui-focusVisible": { border: "none" }, "&:hover:not([disabled])": { border: "none" } }, dense: !0, outlined: !1, "aria-label": "toggle-expand-formula-edit", icon: D(e(N > 1 ? Zd : Ci, {})), tooltipProps: { label: (N > 1 ? "Collapse" : "Expand") + " Formula Bar", simple: !0 }, onMouseDown: (z) => {
|
|
2072
|
+
z.button === 0 && z.preventDefault();
|
|
2071
2073
|
}, onClick: () => {
|
|
2072
|
-
const
|
|
2073
|
-
k(
|
|
2074
|
-
} }), e(A, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: q ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (
|
|
2075
|
-
return e(A, { sx: { display: "flex", flexDirection: "row", gap: (
|
|
2074
|
+
const z = N > 1 ? 1 : T;
|
|
2075
|
+
k(z * C + 1), B(z);
|
|
2076
|
+
} }), e(A, { sx: { position: "absolute", width: "100%", height: "2px", bottom: "0", willChange: "opacity", transition: "opacity 60ms ease-in", opacity: q ? 1 : 0, borderBottomWidth: "2px", borderBottomStyle: "solid", borderBottomColor: (z) => z.palette.primary.main, borderRadius: (z) => `${z.shape.borderRadius}px` } })] })] }), [K, V, q, N, C]), le = W(() => E || ne ? !E && ne ? ne : E && !ne ? E : e(se, { children: e(Xn, { 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='${Q.palette.text.icon ?? Q.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: E, elementAfter: ne }) }) : null, [E, ne]), X = zt(i, () => ({ isFormulaBarElement: () => !0, getNamedCollectionEditorElement: () => I.current }), []);
|
|
2077
|
+
return e(A, { sx: { display: "flex", flexDirection: "row", gap: (z) => z.spacing(0.5), ...o }, ref: X, ...p, children: le });
|
|
2076
2078
|
}));
|
|
2077
2079
|
Ki.displayName = "FormulaBar";
|
|
2078
2080
|
const Yi = Y(J((r, i) => {
|
|
2079
|
-
const { filter: o, commands: t, disabled: n, sx: l, floatReference: c, ...g } = r, a =
|
|
2081
|
+
const { filter: o, commands: t, disabled: n, sx: l, floatReference: c, ...g } = r, a = W(() => ({}), []), s = W(() => ({ commandHook: { beforeExecute: (h, d) => c.closeAll(), onExecute() {
|
|
2080
2082
|
}, onError() {
|
|
2081
2083
|
console.log("onError");
|
|
2082
|
-
} }, disabled: n, parentFloat: c }), [n, c]), m =
|
|
2084
|
+
} }, disabled: n, parentFloat: c }), [n, c]), m = W(() => ({ ...a, ...s, variant: ie.Menuitem }), [a, s]), p = j(se, { children: [e(F, { ...m, command: t.getCommand("sortAscending"), icon: D(e(Vn, {})) }), e(F, { ...m, command: t.getCommand("sortDescending"), icon: D(e(hi, {})) }), e(re, { orientation: "horizontal" }), e(F, { ...m, command: t.getCommand("autoFilterClear"), icon: D(e(ur, {})) }), []] });
|
|
2083
2085
|
return e(A, { ref: i, sx: { paddingTop: "4px", paddingBottom: "4px", display: "flex", flexDirection: "column", ...l }, ...g, children: p });
|
|
2084
2086
|
}));
|
|
2085
2087
|
Yi.displayName = "FilterColumnMenu";
|
|
2086
2088
|
const xu = Y(J((r, i) => {
|
|
2087
2089
|
const { children: o, className: t, disabled: n, style: l, filter: c, ...g } = r, a = zt(i, () => ({ isFilters: () => !0 }), []);
|
|
2088
|
-
return e("div", { ref: a, className: Ae("filters", t), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...l }, ...g, children:
|
|
2090
|
+
return e("div", { ref: a, className: Ae("filters", t), style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", gap: "8px", ...l }, ...g, children: j("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: [e("div", { children: c.getName() }), e("div", { children: "Filter Widget" })] }) });
|
|
2089
2091
|
}));
|
|
2090
2092
|
xu.displayName = "Filters";
|
|
2091
2093
|
const Zi = Y(J((r, i) => {
|
|
@@ -2097,16 +2099,16 @@ const Zi = Y(J((r, i) => {
|
|
|
2097
2099
|
}, onStyleChange: () => {
|
|
2098
2100
|
T(t.getTabColor());
|
|
2099
2101
|
} });
|
|
2100
|
-
const R = at(),
|
|
2102
|
+
const R = at(), N = p === g;
|
|
2101
2103
|
let B = null, P = null;
|
|
2102
2104
|
if (k || h) {
|
|
2103
2105
|
let L = x;
|
|
2104
|
-
k ? (P = k.toBlackOrWhite().toCSS(), L = k?.toCSS()) :
|
|
2106
|
+
k ? (P = k.toBlackOrWhite().toCSS(), L = k?.toCSS()) : N || (L = R.palette.background.paper), B = e(A, { sx: { position: "absolute", boxSizing: "border-box", top: "3px", left: "4px", right: "4.5px", bottom: "1.5px", opacity: N ? "50%" : "100%", borderRadius: "4px", border: (O) => N ? `${x} solid 1px` : `${O.palette.divider} solid 1px`, background: N && k ? `linear-gradient(0deg, ${L} 0%, transparent)` : L } });
|
|
2105
2107
|
}
|
|
2106
2108
|
let S = null;
|
|
2107
2109
|
typeof d == "string" ? S = d : d?.toCSS && (S = d.toCSS());
|
|
2108
|
-
const M =
|
|
2109
|
-
return e(Ei, { theme:
|
|
2110
|
+
const M = N ? e(A, { sx: { width: "100%", borderRadius: "4px", minWidth: "4px", height: "2px", backgroundColor: (L) => L.palette.primary.main } }) : null;
|
|
2111
|
+
return e(Ei, { theme: N ? f ?? R : R, children: e(A, { ref: i, className: Ae(l), sx: { ...n, display: "flex", flexDirection: "column", minHeight: "0px", fontWeight: N ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", lineHeight: "1", textTransform: "none", minWidth: "unset", cursor: h ? "grabbing" : void 0 }, ...w, children: e(op, { style: { flex: "1 1 100%", display: "flex", flexDirection: "row" }, radius: b, strokeColor: N ? S : "transparent", children: e(nn, { sx: { textTransform: "none", borderRadius: "0px", minHeight: "0px", paddingLeft: "11px", paddingRight: "12px", paddingTop: "3px", flex: "1 1 100%", paddingBottom: "3px", fontWeight: N ? "700" : "400", fontSize: "0.85rem", letterSpacing: "0", transition: "none", cursor: h ? "grabbing" : void 0, color: N ? "primary" : P || "text.secondary", backgroundColor: N ? x : "transparent", "&:hover:not([disabled])": { backgroundColor: N ? x : "transparent" }, "& input": { color: (L) => `${L.palette.text.primary}`, textAlign: "center", fontWeight: "500" }, marginTop: "0px", minWidth: "unset" }, disabled: m, disableRipple: a, component: "div", children: j(se, { children: [B, j(A, { sx: { zIndex: "1", display: "flex", flexDirection: "row", alignItems: "center" }, children: [j(A, { sx: { display: "flex", flexDirection: "column", alignItems: "center", rowGap: "1px", lineHeight: "1", marginTop: N ? void 0 : "1px" }, children: [o, M] }), C ? e(dn, { sx: { scale: "0.80", marginLeft: "2px", width: "22px", height: "22px" }, color: "secondary" }) : e(A, { sx: { minHeight: "22px" } })] })] }) }, c + ":" + g) }) }) });
|
|
2110
2112
|
}));
|
|
2111
2113
|
Zi.displayName = "SheetTab";
|
|
2112
2114
|
const Ji = Y(J((r, i) => {
|
|
@@ -2114,16 +2116,16 @@ const Ji = Y(J((r, i) => {
|
|
|
2114
2116
|
_e(o, { onProtectionChange: (f) => {
|
|
2115
2117
|
d(f?.getProtection());
|
|
2116
2118
|
} });
|
|
2117
|
-
const u =
|
|
2119
|
+
const u = W(() => ({}), []), y = W(() => ({ commandHook: { beforeExecute: (f, w) => g.closeAll(), onExecute() {
|
|
2118
2120
|
}, onError() {
|
|
2119
2121
|
console.log("onError");
|
|
2120
|
-
} }, scope: l, commandState: t, disabled: c || t === void 0, parentFloat: g }), [c, g]), x =
|
|
2122
|
+
} }, scope: l, commandState: t, disabled: c || t === void 0, parentFloat: g }), [c, g]), x = W(() => ({ ...u, ...y }), [u, y]), b = j(se, { children: [e(F, { command: n.getCommand("addSheet"), commandState: t, ...x, variant: ie.Menuitem }), e(F, { command: n.getCommand("deleteSheet"), ...x, variant: ie.Menuitem }), j(pt, { onMouseDown: (f) => {
|
|
2121
2123
|
f.button === 0 && f.preventDefault();
|
|
2122
2124
|
}, onMouseUp: () => {
|
|
2123
2125
|
Promise.resolve(g.closeAll()).then(() => {
|
|
2124
2126
|
m?.startEdit(t);
|
|
2125
2127
|
});
|
|
2126
|
-
}, disabled: c || !h.isStructureAllowed(), parentFloat: g, children: ["Rename", l !== "sheet" ? " Sheet" : ""] }), e(F, { command: n.getCommand("duplicateSheet"), ...x, variant: ie.Menuitem }), e(F, { command: n?.getCommand("protectionSheetToggle"), ...x, variant: ie.Menuitem, icon: e(dn, {}) }), e(Mo, { variant: ie.Menuitem, command: n.getCommand("formatSheetTabColor"), icon: e(
|
|
2128
|
+
}, disabled: c || !h.isStructureAllowed(), parentFloat: g, children: ["Rename", l !== "sheet" ? " Sheet" : ""] }), e(F, { command: n.getCommand("duplicateSheet"), ...x, variant: ie.Menuitem }), e(F, { command: n?.getCommand("protectionSheetToggle"), ...x, variant: ie.Menuitem, icon: e(dn, {}) }), e(Mo, { variant: ie.Menuitem, command: n.getCommand("formatSheetTabColor"), icon: e(dr, {}), panelProps: { disableAlpha: !0, autoColorLabel: "No Tab Color", autoColorPosition: Eo.End }, parentFloat: g }), e(re, { orientation: "horizontal" }), e(F, { command: n.getCommand("hideSheet"), ...x, variant: ie.Menuitem, icon: D(e(wi, {})) })] });
|
|
2127
2129
|
return e(A, { ref: i, className: Ae("menu", s), sx: { ...a }, ...p, children: b });
|
|
2128
2130
|
}));
|
|
2129
2131
|
Ji.displayName = "SheetTabMenu";
|
|
@@ -2134,14 +2136,14 @@ const Qi = Y(J((r, i) => {
|
|
|
2134
2136
|
}, onProtectionChange: (d) => {
|
|
2135
2137
|
p(d?.getProtection());
|
|
2136
2138
|
} });
|
|
2137
|
-
const h =
|
|
2139
|
+
const h = W(() => {
|
|
2138
2140
|
const d = [], u = o.getSheets().getItems({ visibility: Rt.Visibility.Hidden }), y = o.getSelectedSheet();
|
|
2139
2141
|
for (let x = 0; x < u.length; x++) {
|
|
2140
2142
|
const b = u[x], f = b.getVisibility();
|
|
2141
2143
|
if (f === Rt.Visibility.VeryHidden) continue;
|
|
2142
2144
|
const w = y === b, C = b.getProtection().isLocked(), v = b.getTabColor(), k = t?.body.fill ?? "transparent";
|
|
2143
|
-
let T = null, R = null,
|
|
2144
|
-
v && (
|
|
2145
|
+
let T = null, R = null, N = k;
|
|
2146
|
+
v && (N = v.toCSS(), w || (R = v.toBlackOrWhite().toCSS()), T = e(A, { sx: { position: "absolute", display: "flex", flexDirection: "column", top: "4px", left: "40px", right: "8px", bottom: "4px", background: w ? N : "transparent", borderRadius: "4px", border: `solid 1px ${t.header.edgeStrokeFill}` }, children: e(A, { sx: { flex: "1 1 100%", boxSizing: "content-box", opacity: w || f === Rt.Visibility.Hidden ? "50%" : "100%", border: (P) => w ? `${k} solid 1.5px` : `${P.palette.divider} solid 1px`, background: w && v ? `linear-gradient(0deg, ${N} 0%, ${k})` : N, borderRadius: "4px" } }) }));
|
|
2145
2147
|
let B = null;
|
|
2146
2148
|
C && (B = e(dn, { color: "secondary" })), f !== Rt.Visibility.Visible && (B = D(e(wi, { style: { opacity: m.isStructureAllowed() ? 1 : 0.7 }, color: "secondary" }))), B && (B = e(A, { sx: { display: "flex", flex: "1 1 100%", alignItems: "center", ml: "16px", "& *": { lineHeight: "1em", fontSize: "1.3em" } }, children: B })), d.push(e(pt, { disabled: !m.isStructureAllowed() && f === Rt.Visibility.Hidden, sx: { color: (P) => {
|
|
2147
2149
|
let S = w ? P.palette.primary.main : P.palette.text.secondary;
|
|
@@ -2154,7 +2156,7 @@ const Qi = Y(J((r, i) => {
|
|
|
2154
2156
|
console.error(P);
|
|
2155
2157
|
}
|
|
2156
2158
|
});
|
|
2157
|
-
}, children:
|
|
2159
|
+
}, children: j(se, { children: [T, j(A, { sx: { paddingRight: "0px", paddingLeft: "4px", display: "flex", flexDirection: "row", flex: "1 1 100%", overflow: "hidden", alignItems: "center", zIndex: 2 }, children: [j(A, { className: "sheet-name", sx: { display: "flex", flexDirection: "column", paddingLeft: "8px", paddingRight: "8px", alignItems: "center" }, children: [b.getName(), e(A, { sx: { height: "0px", opacity: "0", fontWeight: "700" }, children: b.getName() })] }), B] })] }) }, "" + x));
|
|
2158
2160
|
}
|
|
2159
2161
|
return d;
|
|
2160
2162
|
}, [o, m, a, n, t]);
|
|
@@ -2193,8 +2195,8 @@ Try
|
|
|
2193
2195
|
};
|
|
2194
2196
|
var yu = function() {
|
|
2195
2197
|
}, tl = typeof window < "u", wu = tl ? St : ue, za = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
|
|
2196
|
-
const
|
|
2197
|
-
var r = U(null), i = r[0], o = r[1], t = U(za), n = t[0], l = t[1], c =
|
|
2198
|
+
const Io = tl && window.ResizeObserver !== void 0 ? function() {
|
|
2199
|
+
var r = U(null), i = r[0], o = r[1], t = U(za), n = t[0], l = t[1], c = W(function() {
|
|
2198
2200
|
return new window.ResizeObserver(function(g) {
|
|
2199
2201
|
if (g[0]) {
|
|
2200
2202
|
var a = g[0].contentRect, s = a.x, m = a.y, p = a.width, h = a.height, d = a.top, u = a.left, y = a.bottom, x = a.right;
|
|
@@ -2210,14 +2212,14 @@ const No = tl && window.ResizeObserver !== void 0 ? function() {
|
|
|
2210
2212
|
} : function() {
|
|
2211
2213
|
return [yu, za];
|
|
2212
2214
|
};
|
|
2213
|
-
function
|
|
2214
|
-
return
|
|
2215
|
+
function Yn() {
|
|
2216
|
+
return Yn = Object.assign ? Object.assign.bind() : function(r) {
|
|
2215
2217
|
for (var i = 1; i < arguments.length; i++) {
|
|
2216
2218
|
var o = arguments[i];
|
|
2217
2219
|
for (var t in o) ({}).hasOwnProperty.call(o, t) && (r[t] = o[t]);
|
|
2218
2220
|
}
|
|
2219
2221
|
return r;
|
|
2220
|
-
},
|
|
2222
|
+
}, Yn.apply(null, arguments);
|
|
2221
2223
|
}
|
|
2222
2224
|
function ol(r, i) {
|
|
2223
2225
|
if (r == null) return {};
|
|
@@ -2228,13 +2230,13 @@ function ol(r, i) {
|
|
|
2228
2230
|
}
|
|
2229
2231
|
return o;
|
|
2230
2232
|
}
|
|
2231
|
-
function
|
|
2232
|
-
return
|
|
2233
|
+
function Zn(r, i) {
|
|
2234
|
+
return Zn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, t) {
|
|
2233
2235
|
return o.__proto__ = t, o;
|
|
2234
|
-
},
|
|
2236
|
+
}, Zn(r, i);
|
|
2235
2237
|
}
|
|
2236
2238
|
function nl(r, i) {
|
|
2237
|
-
r.prototype = Object.create(i.prototype), r.prototype.constructor = r,
|
|
2239
|
+
r.prototype = Object.create(i.prototype), r.prototype.constructor = r, Zn(r, i);
|
|
2238
2240
|
}
|
|
2239
2241
|
function Wa(r, i) {
|
|
2240
2242
|
return r.replace(new RegExp("(^|\\s)" + i + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
@@ -2242,12 +2244,12 @@ function Wa(r, i) {
|
|
|
2242
2244
|
const ja = !1, rl = ae.createContext(null);
|
|
2243
2245
|
var al = function(r) {
|
|
2244
2246
|
return r.scrollTop;
|
|
2245
|
-
}, ko = "unmounted", Mt = "exited",
|
|
2247
|
+
}, ko = "unmounted", Mt = "exited", It = "entering", qt = "entered", Jn = "exiting", ht = (function(r) {
|
|
2246
2248
|
function i(t, n) {
|
|
2247
2249
|
var l;
|
|
2248
2250
|
l = r.call(this, t, n) || this;
|
|
2249
2251
|
var c, g = n && !n.isMounting ? t.enter : t.appear;
|
|
2250
|
-
return l.appearStatus = null, t.in ? g ? (c = Mt, l.appearStatus =
|
|
2252
|
+
return l.appearStatus = null, t.in ? g ? (c = Mt, l.appearStatus = It) : c = qt : c = t.unmountOnExit || t.mountOnEnter ? ko : Mt, l.state = { status: c }, l.nextCallback = null, l;
|
|
2251
2253
|
}
|
|
2252
2254
|
nl(i, r), i.getDerivedStateFromProps = function(t, n) {
|
|
2253
2255
|
return t.in && n.status === ko ? { status: Mt } : null;
|
|
@@ -2259,7 +2261,7 @@ var al = function(r) {
|
|
|
2259
2261
|
var n = null;
|
|
2260
2262
|
if (t !== this.props) {
|
|
2261
2263
|
var l = this.state.status;
|
|
2262
|
-
this.props.in ? l !==
|
|
2264
|
+
this.props.in ? l !== It && l !== qt && (n = It) : l !== It && l !== qt || (n = Jn);
|
|
2263
2265
|
}
|
|
2264
2266
|
this.updateStatus(!1, n);
|
|
2265
2267
|
}, o.componentWillUnmount = function() {
|
|
@@ -2268,7 +2270,7 @@ var al = function(r) {
|
|
|
2268
2270
|
var t, n, l, c = this.props.timeout;
|
|
2269
2271
|
return t = n = l = c, c != null && typeof c != "number" && (t = c.exit, n = c.enter, l = c.appear !== void 0 ? c.appear : n), { exit: t, enter: n, appear: l };
|
|
2270
2272
|
}, o.updateStatus = function(t, n) {
|
|
2271
|
-
if (t === void 0 && (t = !1), n !== null) if (this.cancelNextCallback(), n ===
|
|
2273
|
+
if (t === void 0 && (t = !1), n !== null) if (this.cancelNextCallback(), n === It) {
|
|
2272
2274
|
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
2273
2275
|
var l = this.props.nodeRef ? this.props.nodeRef.current : Kt.findDOMNode(this);
|
|
2274
2276
|
l && al(l);
|
|
@@ -2280,7 +2282,7 @@ var al = function(r) {
|
|
|
2280
2282
|
var n = this, l = this.props.enter, c = this.context ? this.context.isMounting : t, g = this.props.nodeRef ? [c] : [Kt.findDOMNode(this), c], a = g[0], s = g[1], m = this.getTimeouts(), p = c ? m.appear : m.enter;
|
|
2281
2283
|
!t && !l || ja ? this.safeSetState({ status: qt }, function() {
|
|
2282
2284
|
n.props.onEntered(a);
|
|
2283
|
-
}) : (this.props.onEnter(a, s), this.safeSetState({ status:
|
|
2285
|
+
}) : (this.props.onEnter(a, s), this.safeSetState({ status: It }, function() {
|
|
2284
2286
|
n.props.onEntering(a, s), n.onTransitionEnd(p, function() {
|
|
2285
2287
|
n.safeSetState({ status: qt }, function() {
|
|
2286
2288
|
n.props.onEntered(a, s);
|
|
@@ -2289,7 +2291,7 @@ var al = function(r) {
|
|
|
2289
2291
|
}));
|
|
2290
2292
|
}, o.performExit = function() {
|
|
2291
2293
|
var t = this, n = this.props.exit, l = this.getTimeouts(), c = this.props.nodeRef ? void 0 : Kt.findDOMNode(this);
|
|
2292
|
-
n && !ja ? (this.props.onExit(c), this.safeSetState({ status:
|
|
2294
|
+
n && !ja ? (this.props.onExit(c), this.safeSetState({ status: Jn }, function() {
|
|
2293
2295
|
t.props.onExiting(c), t.onTransitionEnd(l.exit, function() {
|
|
2294
2296
|
t.safeSetState({ status: Mt }, function() {
|
|
2295
2297
|
t.props.onExited(c);
|
|
@@ -2330,13 +2332,13 @@ var al = function(r) {
|
|
|
2330
2332
|
})(ae.Component);
|
|
2331
2333
|
function Vt() {
|
|
2332
2334
|
}
|
|
2333
|
-
ht.contextType = rl, ht.propTypes = {}, ht.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: Vt, onEntering: Vt, onEntered: Vt, onExit: Vt, onExiting: Vt, onExited: Vt }, ht.UNMOUNTED = ko, ht.EXITED = Mt, ht.ENTERING =
|
|
2334
|
-
var
|
|
2335
|
+
ht.contextType = rl, ht.propTypes = {}, ht.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: Vt, onEntering: Vt, onEntered: Vt, onExit: Vt, onExiting: Vt, onExited: Vt }, ht.UNMOUNTED = ko, ht.EXITED = Mt, ht.ENTERING = It, ht.ENTERED = qt, ht.EXITING = Jn;
|
|
2336
|
+
var Mn = function(r, i) {
|
|
2335
2337
|
return r && i && i.split(" ").forEach(function(o) {
|
|
2336
2338
|
return n = o, void ((t = r).classList ? t.classList.remove(n) : typeof t.className == "string" ? t.className = Wa(t.className, n) : t.setAttribute("class", Wa(t.className && t.className.baseVal || "", n)));
|
|
2337
2339
|
var t, n;
|
|
2338
2340
|
});
|
|
2339
|
-
},
|
|
2341
|
+
}, Qn = (function(r) {
|
|
2340
2342
|
function i() {
|
|
2341
2343
|
for (var t, n = arguments.length, l = new Array(n), c = 0; c < n; c++) l[c] = arguments[c];
|
|
2342
2344
|
return (t = r.call.apply(r, [this].concat(l)) || this).appliedClasses = { appear: {}, enter: {}, exit: {} }, t.onEnter = function(g, a) {
|
|
@@ -2378,44 +2380,44 @@ var Rn = function(r, i) {
|
|
|
2378
2380
|
})(t, c));
|
|
2379
2381
|
}, o.removeClasses = function(t, n) {
|
|
2380
2382
|
var l = this.appliedClasses[n], c = l.base, g = l.active, a = l.done;
|
|
2381
|
-
this.appliedClasses[n] = {}, c &&
|
|
2383
|
+
this.appliedClasses[n] = {}, c && Mn(t, c), g && Mn(t, g), a && Mn(t, a);
|
|
2382
2384
|
}, o.render = function() {
|
|
2383
2385
|
var t = this.props;
|
|
2384
2386
|
t.classNames;
|
|
2385
2387
|
var n = ol(t, ["classNames"]);
|
|
2386
|
-
return ae.createElement(ht,
|
|
2388
|
+
return ae.createElement(ht, Yn({}, n, { onEnter: this.onEnter, onEntered: this.onEntered, onEntering: this.onEntering, onExit: this.onExit, onExiting: this.onExiting, onExited: this.onExited }));
|
|
2387
2389
|
}, i;
|
|
2388
2390
|
})(ae.Component);
|
|
2389
|
-
|
|
2390
|
-
const
|
|
2391
|
+
Qn.defaultProps = { classNames: "" }, Qn.propTypes = {};
|
|
2392
|
+
const In = 0.12, $a = (r, i) => {
|
|
2391
2393
|
const o = {}, t = (a) => {
|
|
2392
2394
|
const s = a.palette?.background.default ?? "rgba(255,255,255,1)";
|
|
2393
|
-
return { text: { fontFamily: a.typography?.fontFamily ?? "Calibri", fontSize: a.typography?.fontSize ?? 8.25, fontWeight: a.typography?.fontWeightRegular ?? "400", fill: a.palette.mode === "dark" ? a.palette?.text?.secondary : a.palette?.text?.primary }, fill: s, strokeFill: it(s,
|
|
2395
|
+
return { text: { fontFamily: a.typography?.fontFamily ?? "Calibri", fontSize: a.typography?.fontSize ?? 8.25, fontWeight: a.typography?.fontWeightRegular ?? "400", fill: a.palette.mode === "dark" ? a.palette?.text?.secondary : a.palette?.text?.primary }, fill: s, strokeFill: it(s, In, a.palette?.mode), darkMode: a.palette.mode === "dark" };
|
|
2394
2396
|
}, n = t(i);
|
|
2395
|
-
o.body = t(r), o.header = { ...o.body, strokeFill: it(o.body.fill,
|
|
2397
|
+
o.body = t(r), o.header = { ...o.body, strokeFill: it(o.body.fill, In, r.palette?.mode), fill: i && r.palette.mode === "dark" && i.palette.mode !== r.palette.mode ? o.body.fill : it(o.body.fill, 0.055, r.palette?.mode), edgeStrokeFill: r.palette.mode === "dark" ? o.body.strokeFill : it(o.body.fill, 0.328, r.palette?.mode) }, o.headerHover = (a) => ({ ...o.header, strokeFill: it(a?.fill ?? o.body.fill, 0.22, r.palette?.mode), fill: it(a?.fill ?? o.header.fill, 0.065, r.palette?.mode), text: { ...a?.text, fontWeight: r.typography?.fontWeightBold } });
|
|
2396
2398
|
const l = it(r.palette.mode !== "dark" ? r.palette.primary.light : r.palette.primary.main, 0.055, r.palette?.mode);
|
|
2397
|
-
o.headerSelect = { ...o.header, strokeFill: r.palette.primary.main, fill: Qe(l, 0.2), text: { ...o.header.text, fill: r.palette.primary.main }, dividerStrokeFill: Qe(l, 0.7) }, o.headerSelectAll = { ...o.headerSelect, fill: Qe(l, 0.9), text: { ...o.headerSelect.text, fill: r.palette.primary.contrastText }, edgeStrokeFill: o.headerSelect.strokeFill }, o.buttonSurface = { ...n, strokeFill: it(n.fill,
|
|
2399
|
+
o.headerSelect = { ...o.header, strokeFill: r.palette.primary.main, fill: Qe(l, 0.2), text: { ...o.header.text, fill: r.palette.primary.main }, dividerStrokeFill: Qe(l, 0.7) }, o.headerSelectAll = { ...o.headerSelect, fill: Qe(l, 0.9), text: { ...o.headerSelect.text, fill: r.palette.primary.contrastText }, edgeStrokeFill: o.headerSelect.strokeFill }, o.buttonSurface = { ...n, strokeFill: it(n.fill, In, i.palette?.mode), fill: i && i.palette.mode === "dark" && i.palette.mode !== r.palette.mode ? n.fill : it(n.fill, 0.055, i.palette?.mode), edgeStrokeFill: i.palette.mode === "dark" ? n.strokeFill : it(n.fill, 0.328, i.palette?.mode) }, o.headerSelection = { fill: r.palette?.primary?.main ? Qe(r.palette?.primary?.main, 0.1) : void 0, strokeFill: r.palette?.primary?.main }, o.headerSelectionInactive = { ...o.headerSelection, fill: r.palette?.divider ? Qe(r.palette?.divider, 0.05) : void 0, strokeFill: "transparent" };
|
|
2398
2400
|
const c = i ?? r, g = c.palette.mode === "dark";
|
|
2399
2401
|
return o.selection = { fill: c.palette?.primary?.main ? Qe(c.palette?.primary?.main, 0.1) : void 0, strokeFill: c.palette?.primary?.main }, o.selectionInactive = { ...o.selection, fill: c.palette?.divider ? Qe(c.palette?.divider, 0.05) : void 0, strokeFill: "transparent" }, o.selectionRemove = { ...o.selection, fill: Qe(c.palette.warning.light, 0.05), strokeFill: c.palette.warning.dark }, i && (o.body = t(i)), o.colorShadow = Qe(c.palette.action.active, 0.5), o.colorGrey = c.palette.action.active, o.filterDarkInvert = g ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", o;
|
|
2400
|
-
},
|
|
2401
|
-
const { children: o, sx: t, parentFloat: n, ...l } = r, c = zt(i, () => ({}), []), [g, a] =
|
|
2402
|
+
}, No = Y(J((r, i) => {
|
|
2403
|
+
const { children: o, sx: t, parentFloat: n, ...l } = r, c = zt(i, () => ({}), []), [g, a] = Io(), s = Se(null), m = Se(null), [p, h] = ae.useReducer((v) => v + 1, 0), [d, u] = U(null), [y, x] = U(null), [b, f] = U(null), { reference: w } = oo({ parentFloat: n, label: "overflow" });
|
|
2402
2404
|
St(() => {
|
|
2403
2405
|
m.current = { refs: [] };
|
|
2404
2406
|
const v = [], k = ae.Children.toArray(o);
|
|
2405
2407
|
let T = 0;
|
|
2406
|
-
k.forEach((R,
|
|
2408
|
+
k.forEach((R, N) => {
|
|
2407
2409
|
v.push(e(A, { sx: { display: "flex" }, ref: (B) => {
|
|
2408
2410
|
T++, T === k.length && h();
|
|
2409
2411
|
const P = { current: null };
|
|
2410
|
-
P.current = B, m.current.refs[
|
|
2411
|
-
}, children: R },
|
|
2412
|
+
P.current = B, m.current.refs[N] = P;
|
|
2413
|
+
}, children: R }, N));
|
|
2412
2414
|
}), u(v);
|
|
2413
2415
|
}, [o, a]), St(() => {
|
|
2414
2416
|
if (!d) return;
|
|
2415
2417
|
const v = m.current.refs;
|
|
2416
2418
|
if (!c.current || !v || v.length === 0) return x(null), void f(null);
|
|
2417
2419
|
const k = c.current?.getBoundingClientRect(), T = [], R = [];
|
|
2418
|
-
let
|
|
2420
|
+
let N = 0, B = !1;
|
|
2419
2421
|
for (let S = 0; !B && S < v.length; S++) {
|
|
2420
2422
|
const M = v[S];
|
|
2421
2423
|
if (!M) continue;
|
|
@@ -2424,17 +2426,17 @@ const Mn = 0.12, $a = (r, i) => {
|
|
|
2424
2426
|
continue;
|
|
2425
2427
|
}
|
|
2426
2428
|
const L = M.current.getBoundingClientRect();
|
|
2427
|
-
|
|
2429
|
+
N += L?.width, N > k.width && (B = !0);
|
|
2428
2430
|
}
|
|
2429
2431
|
if (!B) return x(null), void f([]);
|
|
2430
2432
|
const P = s.current?.getBoundingClientRect();
|
|
2431
|
-
|
|
2433
|
+
N = 0;
|
|
2432
2434
|
for (let S = 0; S < v.length; S++) {
|
|
2433
2435
|
const M = v[S];
|
|
2434
2436
|
let L = !1;
|
|
2435
2437
|
if (M.current) {
|
|
2436
2438
|
const O = M.current.getBoundingClientRect();
|
|
2437
|
-
|
|
2439
|
+
N += O?.width, N < k.width - P.width && (L = !0);
|
|
2438
2440
|
}
|
|
2439
2441
|
L ? T.push(d[S]) : R.push(d[S]);
|
|
2440
2442
|
}
|
|
@@ -2443,10 +2445,10 @@ const Mn = 0.12, $a = (r, i) => {
|
|
|
2443
2445
|
const C = te((v) => {
|
|
2444
2446
|
const k = [];
|
|
2445
2447
|
for (let R = 0; R < b.length; R++) {
|
|
2446
|
-
let
|
|
2447
|
-
const B =
|
|
2448
|
-
|
|
2449
|
-
const P =
|
|
2448
|
+
let N = ae.Children.toArray(b[R]);
|
|
2449
|
+
const B = N[0];
|
|
2450
|
+
N = ae.Children.toArray(B.props.children?.props.children ?? B.props.children);
|
|
2451
|
+
const P = N[0], S = { ...P.props };
|
|
2450
2452
|
S.parentFloat && (S.parentFloat = v.floatReference);
|
|
2451
2453
|
const M = ae.cloneElement(P, S);
|
|
2452
2454
|
k.push(M);
|
|
@@ -2454,16 +2456,16 @@ const Mn = 0.12, $a = (r, i) => {
|
|
|
2454
2456
|
const T = e(A, { className: "overflow-palette-popup-panel", sx: { display: "flex", flexDirection: "row", flexWrap: "wrap", rowGap: (R) => R.spacing(0.25), paddingTop: (R) => R.spacing(0.5), paddingBottom: (R) => R.spacing(0.5), paddingLeft: (R) => R.spacing(1), paddingRight: (R) => R.spacing(1), overflow: "hidden" }, children: k });
|
|
2455
2457
|
return xe({ ...v, children: T });
|
|
2456
2458
|
}, [b]);
|
|
2457
|
-
return
|
|
2459
|
+
return j(A, { className: "overflow-palette", sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", width: "100%", maxWidth: "100%", ...t }, ref: Fo([c, g, i]), ...l, children: [e(A, { sx: { flexDirection: "row", display: "flex", maxWidth: "100%", flex: "1 1 100%" }, children: y ?? d }), e(A, { sx: { display: b !== null && b.length === 0 ? "none" : "flex", flex: "1 1 0" }, children: e(vt, { createPopupPanel: C, ref: s, parentFloat: w, createTooltip: ({ children: v }, k) => e(rt, { label: "More", description: "More toolbar options…", disabled: k, children: v }), icon: e(Jc, { children: e(Jd, {}) }) }) })] });
|
|
2458
2460
|
})), il = "https://unpkg.com/@sheetxl/scripting-templates/dist", Su = (r) => {
|
|
2459
2461
|
if (r.metadata?.name) return r.metadata.name;
|
|
2460
2462
|
let i = (r.path.split("/").pop() || "").replace(/\.[^/.]+$/, "");
|
|
2461
2463
|
return r.metadata?.icon === "formula" ? i.toUpperCase() : (i = i.replace(/([a-z])([A-Z])/g, "$1 $2"), i.replace(/[-_]/g, " ").trim().split(/\s+/).map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join(" "));
|
|
2462
2464
|
}, ll = async (r) => {
|
|
2463
2465
|
const i = Yt.relativePath(r, "./manifest.json"), o = await fetch(i);
|
|
2464
|
-
if (!o.ok) throw new
|
|
2466
|
+
if (!o.ok) throw new Kn(`Failed to retrieve directory at '${r}': ${o.statusText}`);
|
|
2465
2467
|
const t = await o.text();
|
|
2466
|
-
if (t.trim().toLowerCase().startsWith("<!doctype html") || t.trim().toLowerCase().startsWith("<html")) throw new
|
|
2468
|
+
if (t.trim().toLowerCase().startsWith("<!doctype html") || t.trim().toLowerCase().startsWith("<html")) throw new Kn(`Failed to retrieve directory at '${r}'`);
|
|
2467
2469
|
let n;
|
|
2468
2470
|
try {
|
|
2469
2471
|
n = JSON.parse(t);
|
|
@@ -2486,13 +2488,13 @@ const Mn = 0.12, $a = (r, i) => {
|
|
|
2486
2488
|
}, Nn = { fontSize: "0.8rem", marginRight: "4px" }, vu = Y((r) => {
|
|
2487
2489
|
const { disabled: i, snippet: o, description: t, handleInsert: n, sx: l, ...c } = r;
|
|
2488
2490
|
let g;
|
|
2489
|
-
return g = o.metadata?.icon === "formula" ? e(Si, { sx: Nn }) : o.metadata?.icon === "macro" ? e(
|
|
2491
|
+
return g = o.metadata?.icon === "formula" ? e(Si, { sx: Nn }) : o.metadata?.icon === "macro" ? e(mr, { sx: Nn }) : e(ki, { sx: Nn }), e(pt, { sx: { maxWidth: "460px", display: "flex", "*": { lineHeight: "1.2" }, ...l }, disabled: i, icon: g, onMouseDown: (a) => {
|
|
2490
2492
|
a.button === 0 && a.preventDefault();
|
|
2491
2493
|
}, onMouseUp: (a) => {
|
|
2492
2494
|
a.button === 0 && n(o);
|
|
2493
2495
|
}, onKeyDown: (a) => {
|
|
2494
2496
|
a.keyCode !== be.Enter && a.keyCode !== be.Space || n(o);
|
|
2495
|
-
}, ...c, children:
|
|
2497
|
+
}, ...c, children: j(A, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden" }, children: [e(Oe, { component: "div", children: o.metadata?.title ?? o.path }), e(Oe, { variant: "caption", component: "div", sx: { color: (a) => Qe(a.palette.text.secondary ?? a.palette.text.primary, 0.6), overflow: "hidden", textOverflow: "ellipsis" }, children: o.metadata?.summary })] }) });
|
|
2496
2498
|
}), Cu = Y(J((r, i) => {
|
|
2497
2499
|
const { commands: o, commandHook: t, scope: n, disabled: l = !1, scriptPath: c = il, ...g } = r, [a, s] = U([]), [m, p] = U(!0), h = He(o, ["executeSelectedScript"]), d = h[0]?.context?.();
|
|
2498
2500
|
ue(() => {
|
|
@@ -2515,19 +2517,19 @@ const Mn = 0.12, $a = (r, i) => {
|
|
|
2515
2517
|
const k = a[v];
|
|
2516
2518
|
k && w.push(e(vu, { handleInsert: f, snippet: k }, k.path));
|
|
2517
2519
|
}
|
|
2518
|
-
const C =
|
|
2520
|
+
const C = j(A, { sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [w.length > 0 ? j(se, { children: [e(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: w }), e(re, { orientation: "horizontal" })] }) : null, Pe(F, { ...b, key: "help", command: o.getCommand("help"), icon: D(e(yi, {})) })] });
|
|
2519
2521
|
return xe({ ...y, children: C });
|
|
2520
2522
|
}, [l, t, n, m, d]);
|
|
2521
2523
|
return e(Re, { ref: i, commands: o, disabled: l, commandHook: t, scope: n, label: "Insert Script", tooltip: "Inserts a script from a set of templates.", createPopupPanel: u, icon: D(e(Qc, {})), ...g });
|
|
2522
2524
|
})), sl = Y(J((r, i) => {
|
|
2523
2525
|
const { commands: o, parentFloat: t, commandButtonProps: n, ...l } = r, c = te((g) => {
|
|
2524
2526
|
const { commandButtonProps: a, commandPopupProps: s } = g;
|
|
2525
|
-
return e(se, { children:
|
|
2527
|
+
return e(se, { children: j("div", { style: { display: "flex", flex: "1 1 100%" }, children: [e("div", { children: e(No, { parentFloat: t, style: {}, children: e(F, { ...a, command: o.getCommand("saveScripts"), icon: D(e(ed, {})) }) }) }), e("div", { style: { flex: "1 1 100%" } }), e("div", { children: e(No, { parentFloat: t, style: {}, children: e(Cu, { ...a, commands: o }) }) })] }) });
|
|
2526
2528
|
}, [o]);
|
|
2527
2529
|
return e(cn, { ref: i, commands: o, parentFloat: t, commandButtonProps: n, createToolbarPalette: c, ...l });
|
|
2528
2530
|
}));
|
|
2529
2531
|
sl.displayName = "ScriptEditorToolbar";
|
|
2530
|
-
const
|
|
2532
|
+
const Fn = { fontSize: "1rem" }, cl = Y(J((r, i) => {
|
|
2531
2533
|
const { scriptPath: o = il, onScriptSelect: t, sx: n = pn.EmptyCssProperties, className: l, buttonMinWidth: c = 210, buttonMinHeight: g = 80, gap: a = 12, ...s } = r, [m, p] = U([]), [h, d] = U(!0), [u, y] = U(null);
|
|
2532
2534
|
if (ue(() => {
|
|
2533
2535
|
(async () => {
|
|
@@ -2540,19 +2542,19 @@ const In = { fontSize: "1rem" }, cl = Y(J((r, i) => {
|
|
|
2540
2542
|
v && f.push(v);
|
|
2541
2543
|
}
|
|
2542
2544
|
} catch (w) {
|
|
2543
|
-
y(w instanceof Error ? w.message : "Failed to load scripts"), w instanceof
|
|
2545
|
+
y(w instanceof Error ? w.message : "Failed to load scripts"), w instanceof Kn || console.error("Error loading scripts:", w);
|
|
2544
2546
|
} finally {
|
|
2545
2547
|
p(f), d(!1);
|
|
2546
2548
|
}
|
|
2547
2549
|
})();
|
|
2548
|
-
}, [o]), h) return e(A, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: Ae(l, "script-select"), sx: { background: (f) => f.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${he("#fff",
|
|
2550
|
+
}, [o]), h) return e(A, { display: "flex", justifyContent: "center", alignItems: "center", height: "100%", className: Ae(l, "script-select"), sx: { background: (f) => f.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})`, ...n }, ...s, children: e(Ts, {}) });
|
|
2549
2551
|
let x = null;
|
|
2550
|
-
u && (x =
|
|
2552
|
+
u && (x = j(A, { display: "flex", justifyContent: "center", alignItems: "center", className: Ae(l, "script-select", "error-results"), sx: { background: (f) => f.palette.error.light, flex: "0", zIndex: 1e3, flexDirection: "column", padding: (f) => f.spacing(1), border: (f) => `1px solid ${f.palette.error.main}`, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})` }, ...s, children: [e(Oe, { color: "error", variant: "h6", component: "div", gutterBottom: !0, children: "Error loading Templates" }), e(Oe, { color: "error", component: "div", children: u })] }));
|
|
2551
2553
|
const b = (f) => {
|
|
2552
2554
|
const w = f.metadata?.icon;
|
|
2553
|
-
return w === "macro" ? e(
|
|
2555
|
+
return w === "macro" ? e(mr, { sx: Fn }) : w === "formula" ? e(Si, { sx: Fn }) : w === "autostart" ? e(ki, { sx: Fn }) : null;
|
|
2554
2556
|
};
|
|
2555
|
-
return
|
|
2557
|
+
return j(A, { ref: i, className: Ae(l, "script-select"), sx: { background: (f) => f.palette.background.paper, zIndex: 1e3, backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})`, ...n }, ...s, children: [j(A, { p: 3, className: "script-select-content", sx: { overflow: "auto", flex: "1 1 auto" }, children: [e(Oe, { variant: "h6", gutterBottom: !0, children: "Script Template" }), e(Oe, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Choose from a template to provide a starting point to automate tasks or create user defined functions." }), e(Oe, { variant: "body2", component: "div", color: "text.secondary", gutterBottom: !0, children: "Templates provide a foundation to customize and meet your specific needs." }), e(A, { sx: { display: "grid", gridTemplateColumns: `repeat(auto-fill, minmax(${c}px, 1fr))`, gap: `${a}px`, padding: 2, paddingLeft: "0px", paddingRight: "0px" }, children: m.map((f, w) => j(nn, { variant: "outlined", sx: { minWidth: c, minHeight: g, display: "flex", flexDirection: "column", justifyContent: "flex-start", alignItems: "flex-start", textAlign: "left", padding: 2, textTransform: "none", overflow: "hidden", ...w === 0 && { borderStyle: "dashed", marginBottom: "8px" }, ...w === 1 && { gridColumn: "1" } }, onClick: () => t?.(f), children: [j(A, { sx: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "center", width: "100%", marginBottom: 0.5 }, children: [e(Oe, { variant: "subtitle2", component: "div", children: f.metadata?.title || f.path.split("/").pop()?.replace(/\.\w+$/, "") || "Untitled" }), b(f)] }), f.metadata?.summary && e(Oe, { variant: "body2", component: "div", color: "text.secondary", sx: { overflow: "hidden", display: "flex", flexDirection: "column", textOverflow: "ellipsis", alignItems: "flex-start" }, children: f.metadata.summary })] }, `${f.path}-${w}`)) })] }), x] });
|
|
2556
2558
|
}));
|
|
2557
2559
|
cl.displayName = "TemplateSelectPanel";
|
|
2558
2560
|
const dl = Y(J((r, i) => {
|
|
@@ -2570,33 +2572,33 @@ const dl = Y(J((r, i) => {
|
|
|
2570
2572
|
}, [m]);
|
|
2571
2573
|
const C = G((E) => {
|
|
2572
2574
|
b((K) => ({ ...K, ...E }));
|
|
2573
|
-
}, []), v = Se(null), k = Se(null), [T, R] = U(null),
|
|
2575
|
+
}, []), v = Se(null), k = Se(null), [T, R] = U(null), N = Se(null), B = te((E) => {
|
|
2574
2576
|
if (T) return T.focus(E), !0;
|
|
2575
2577
|
if (a) {
|
|
2576
2578
|
const K = k.current?.querySelectorAll?.(a);
|
|
2577
2579
|
if (K && K.length > 0) return K[0]?.focus?.(E), !0;
|
|
2578
2580
|
}
|
|
2579
2581
|
return k.current?.focus?.(E), !1;
|
|
2580
|
-
}, [T, a, s]), P =
|
|
2582
|
+
}, [T, a, s]), P = W(() => e(Lt, { transitionDelay: "160ms", style: { position: "absolute", width: "100%", height: "100%" }, transparentBackground: !1 }), []), S = W(() => e(Po, { elevation: 1, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})`, marginLeft: (E) => E.spacing(0.5), marginRight: (E) => E.spacing(0.5), marginTop: (E) => E.spacing(1), marginBottom: (E) => E.spacing(1) }, children: e(sl, { commands: l }) }), [h, l]), M = W(() => e(A, { className: Ae("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 ${h.palette.divider}` }, children: j("div", { style: { flex: "1 1 100%", display: "flex", alignItems: "center", flexDirection: "row", justifyContent: "center" }, children: [e(Oe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "1 1 100%", color: (E) => E.palette.text.secondary }, variant: "caption", children: x.message }), e(Oe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", color: (E) => E.palette.text.secondary }, variant: "caption", children: x.dirty ? "Unsaved" : "" }), e(Oe, { component: "div", sx: { userSelect: "none", whiteSpace: "pre", overflow: "hidden", textOverflow: "ellipsis", flex: "none", marginLeft: "8px", minWidth: "90px", display: "flex", justifyContent: "end", color: (E) => E.palette.text.secondary }, variant: "caption", children: x.cursor })] }) }), [x]), L = W(() => j(A, { className: Ae("script-editor-content"), sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "column", boxSizing: "border-box" }, children: [S, e(A, { sx: { display: "flex", flex: "1 1 100%", width: "100%", flexDirection: "row", position: "relative", boxSizing: "border-box" }, children: e(cp, { ref: k, loadingPanel: P, readOnly: c, onClose: g, autoFocus: s, commands: l, onStatusChange: C, darkMode: h.palette.mode === "dark", ...n }) }), M] }), [h, l, S, M, d, P, c, n, s, a, g, C]), O = W(() => e(Es, { className: Ae({ "Mui-selected": y.current }), sx: { display: "flex", color: (E) => E.palette.text.secondary, boxSizing: "border-box", padding: "0 0", transitionProperty: "opacity", transitionDuration: (E) => `${E.transitions.duration.shortest}ms`, opacity: 0.7, "&.Mui-selected": { opacity: 1, transitionDuration: (E) => E.transitions.duration.shortest / 2 + "ms" }, backgroundColor: (E) => he(E.palette.action.hover, 0.03), borderBottom: (E) => `solid ${he(E.palette.divider, 0.2)} 1px` }, onPointerDown: (E) => {
|
|
2581
2583
|
E.isDefaultPrevented() || (E.preventDefault(), B());
|
|
2582
|
-
}, children:
|
|
2584
|
+
}, children: j(A, { sx: { display: "flex", flex: "1 1 10%", flexDirection: "row", alignItems: "center", marginTop: (E) => E.spacing(0.25), marginBottom: (E) => E.spacing(0.25), marginLeft: (E) => E.spacing(1), marginRight: (E) => E.spacing(1) }, children: [e(A, { sx: { flex: "1 1 100%", paddingLeft: (E) => E.spacing(1) }, children: "Script (Typescript)" }), e(rt, { label: "Close", children: e(dt, { "aria-label": "close", sx: { color: (E) => E.palette.text.icon ?? E.palette.action.active }, touchRippleRef: v, onPointerDown: (E) => {
|
|
2583
2585
|
v.current?.start(E, { center: !1 }), E.stopPropagation(), E.preventDefault();
|
|
2584
2586
|
}, onPointerUp: () => {
|
|
2585
2587
|
k.current?.close();
|
|
2586
|
-
}, children: e(Ti, {}) }) })] }) }), [h, d]), V =
|
|
2588
|
+
}, children: e(Ti, {}) }) })] }) }), [h, d]), V = W(() => {
|
|
2587
2589
|
let E;
|
|
2588
2590
|
return f === null ? null : (f.source === null && (E = e(cl, { sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", position: "absolute", boxSizing: "border-box", width: "100%", height: "100%" }, onScriptSelect: (K) => {
|
|
2589
2591
|
k.current?.getEditor().insertSnippet(K.content), w({ source: K.content ?? "" });
|
|
2590
|
-
} })),
|
|
2592
|
+
} })), j(A, { tabIndex: 0, className: Ae("script-workspace", o), sx: { display: "flex", flex: "1 1 100%", flexDirection: "column", overflow: "hidden", alignItems: "stretch", userSelect: "none", flexGrow: 0, outline: "none", backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})` }, onPointerDown: (K) => {
|
|
2591
2593
|
K.isDefaultPrevented() || k.current?.focus();
|
|
2592
|
-
}, children: [O,
|
|
2593
|
-
}, [S, L, o, f]),
|
|
2594
|
+
}, children: [O, j(A, { sx: { flex: "1 1 100%", position: "relative", display: "flex" }, children: [L, E] })] }));
|
|
2595
|
+
}, [S, L, o, f]), I = zt(i, () => ({ isScriptWorkspaceElement: () => !0, focus: (E) => {
|
|
2594
2596
|
B(E);
|
|
2595
2597
|
} }), []);
|
|
2596
|
-
return e(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...t }, ref:
|
|
2597
|
-
u(!0), y.current = !0,
|
|
2598
|
+
return e(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 100%", position: "relative", ...t }, ref: I, ...p, onFocus: (E) => {
|
|
2599
|
+
u(!0), y.current = !0, I.current?.contains(E.target) && E.target !== I.current && R(E.target), E.relatedTarget && !N.current && (N.current = E.relatedTarget), p?.onFocus?.(E);
|
|
2598
2600
|
}, onBlur: (E) => {
|
|
2599
|
-
|
|
2601
|
+
I?.current?.contains(E.relatedTarget) || I?.current === E.relatedTarget || (N.current = null, y.current = !1, u(!1)), p?.onBlur?.(E);
|
|
2600
2602
|
}, children: V });
|
|
2601
2603
|
}));
|
|
2602
2604
|
dl.displayName = "ScriptWorkspace";
|
|
@@ -2613,9 +2615,9 @@ const pl = Y(J((r, i) => {
|
|
|
2613
2615
|
const m = { variant: ie.Menuitem, parentFloat: r.floatReference, scope: "scripts", shortcut: null }, p = [], h = l.length;
|
|
2614
2616
|
for (let u = 0; u < h; u++) {
|
|
2615
2617
|
const y = l[u];
|
|
2616
|
-
p.push(e(F, { ...m, command: o.getCommand("executeScript"), commandState: { declaration: y }, tooltipProps: { description: `Execute ${y.getName() ?? "macro"}` }, icon: D(e(
|
|
2618
|
+
p.push(e(F, { ...m, command: o.getCommand("executeScript"), commandState: { declaration: y }, tooltipProps: { description: `Execute ${y.getName() ?? "macro"}` }, icon: D(e(mr, {})), label: y.getName() ?? `Script '${y.getName()}'` }, `macro-${y.getName()}-${u}`));
|
|
2617
2619
|
}
|
|
2618
|
-
const d =
|
|
2620
|
+
const d = j(A, { ref: i, sx: { display: "flex", flexDirection: "column", flex: "1 1 100%", overflow: "hidden" }, children: [p.length > 0 ? j(se, { children: [e(A, { sx: { overflow: "auto", flex: "1 1 100%" }, children: p }), e(re, { orientation: "horizontal" })] }) : null, Pe(F, { ...m, key: "show-editor", command: o.getCommand("showScriptEditor"), icon: D(e(td, {})) })] });
|
|
2619
2621
|
return xe({ ...t, children: d });
|
|
2620
2622
|
}));
|
|
2621
2623
|
pl.displayName = "RunScriptPopupPanel";
|
|
@@ -2652,7 +2654,7 @@ const ul = Y(J((r, i) => {
|
|
|
2652
2654
|
const m = G((p) => {
|
|
2653
2655
|
const { commandButtonProps: h, commandPopupProps: d } = p, u = e(Mo, { ...d, command: o.getCommand("formatFontColor"), icon: e(nd, {}), isSplit: !0, panelProps: { disableAlpha: !0 } }), y = e(Mo, { ...d, command: o.getCommand("formatFillColor"), icon: e(rd, {}), isSplit: !0, panelProps: { disableAlpha: !0, autoColorLabel: "No Fill", autoColorPosition: Eo.End } }), x = o.getCommand("undo") ? e(se, { children: e(Fi, { ...d, quickCommand: "undo" }) }) : null, b = o.getCommand("find") ? e(se, { children: e(Bp, { ...d }) }) : null;
|
|
2654
2656
|
let f = null;
|
|
2655
|
-
return c && (f =
|
|
2657
|
+
return c && (f = j(se, { children: [e(re, {}), e(ul, { ...d })] })), j(No, { parentFloat: t, children: [x, null, x ? e(re, {}) : null, e(Ai, { ...d, command: o.getCommand("paste") }), e(F, { ...h, command: o.getCommand("formatPainterToggle"), icon: D(e(ad, {})) }), e(xr, { ...h, command: o.getCommand("copy") }), e(re, {}), e(jp, { ...d, command: o.getCommand("formatFontFamily") }), e(Lp, { ...d, command: o.getCommand("formatFontSize") }), e(F, { ...h, command: o.getCommand("formatBoldToggle"), icon: e(id, {}) }), e(F, { ...h, command: o.getCommand("formatItalicToggle"), icon: e(ld, {}) }), e(Vp, { ...d }), e($p, { ...d }), u, e(re, {}), y, e(Fp, { ...d }), e(Op, { ...d }), e(re, {}), e(yp, { ...d }), e(wp, { ...d }), e(Sp, { ...d }), e(vp, { ...d }), e(re, {}), e(Hp, { ...d }), e(qp, { command: o.getCommand("formatCellStyle"), ...d }), e(Jp, { command: o.getCommand("formatTableStyle"), ...d }), e(re, {}), e(Mi, { ...d }), e(Ii, { ...d }), e(re, {}), e(zp, { ...d }), null, e(Ri, { ...d }), e(Ni, { ...d }), b, f] });
|
|
2656
2658
|
}, [o, a, c]);
|
|
2657
2659
|
return e(cn, { ref: i, commands: o, parentFloat: t, commandButtonProps: n, createToolbarPalette: m, ...l });
|
|
2658
2660
|
}));
|
|
@@ -2660,7 +2662,7 @@ ml.displayName = "HomeToolbar";
|
|
|
2660
2662
|
const gl = Y(J((r, i) => {
|
|
2661
2663
|
const { commands: o, parentFloat: t, commandButtonProps: n, ...l } = r, c = te((g) => {
|
|
2662
2664
|
const { commandButtonProps: a, commandPopupProps: s } = g;
|
|
2663
|
-
return
|
|
2665
|
+
return j(No, { parentFloat: t, children: [null, e(F, { ...a, command: o.getCommand("updateHyperlink"), icon: D(e(Un, {})) }), e(F, { ...a, command: o.getCommand("updateComments"), icon: D(e(Gn, {})) }), e(Hi, { ...s }), e(F, { ...a, command: o.getCommand("insertTable"), icon: D(e(an, {})) })] });
|
|
2664
2666
|
}, [o]);
|
|
2665
2667
|
return e(cn, { ref: i, commands: o, parentFloat: t, commandButtonProps: n, createToolbarPalette: c, ...l });
|
|
2666
2668
|
}));
|
|
@@ -2668,18 +2670,18 @@ gl.displayName = "InsertToolbar";
|
|
|
2668
2670
|
const hl = Y(J((r, i) => {
|
|
2669
2671
|
const { commands: o, parentFloat: t, commandButtonProps: n, ...l } = r, c = te((g) => {
|
|
2670
2672
|
const { commandButtonProps: a, commandPopupProps: s } = g;
|
|
2671
|
-
return
|
|
2673
|
+
return j(No, { parentFloat: t, children: [e(Ap, { ...s }), e(F, { ...a, command: o.getCommand("protectionSheetToggle"), icon: e(dn, { color: "secondary" }) }), e(re, {}), e(Wp, { ...s }), e(_p, { ...s }), e(re, {}), e(F, { ...a, command: o.getCommand("sheetViewToggleFormulaView"), scope: "view", icon: e(eo, { command: o.getCommand("sheetViewToggleFormulaView"), scope: "view" }) }), e(F, { ...a, command: o.getCommand("sheetViewToggleShowZeros"), scope: "view", icon: e(eo, { command: o.getCommand("sheetViewToggleShowZeros"), scope: "view" }) }), e(re, {}), e(Up, { ...s }), e(ou, { command: o.getCommand("selectTheme"), ...s }), e(re, {}), e(ul, { ...s, scope: "view" }), e(re, {}), e(F, { ...a, command: o.getCommand("fullScreenToggle"), scope: "view", icon: () => D(o.getCommand("fullScreenToggle").state() ? e(sd, {}) : e(cd, {})) })] });
|
|
2672
2674
|
}, [o]);
|
|
2673
2675
|
return e(cn, { ref: i, commands: o, parentFloat: t, commandButtonProps: n, createToolbarPalette: c, ...l });
|
|
2674
2676
|
}));
|
|
2675
2677
|
hl.displayName = "ViewToolbar";
|
|
2676
2678
|
const fl = (r) => e(bl, { ...r }), ku = Y((r) => {
|
|
2677
2679
|
const { sx: i, ...o } = r;
|
|
2678
|
-
return
|
|
2680
|
+
return j(A, { sx: { display: "flex", flexDirection: "column", position: "relative", "&:hover:not([disabled]) .indicator": { borderBottom: (t) => `${he(t.palette.primary.main, 0.35)} solid 2px` } }, children: [e(Rs, { disableRipple: !0, onMouseDown: (t) => {
|
|
2679
2681
|
t.button === 0 && t.preventDefault();
|
|
2680
2682
|
}, sx: { textTransform: "none", flex: "1 1 100%", fontWeight: (t) => t.typography.fontWeightRegular, padding: "2px 6px", minHeight: "0px", minWidth: "0px", marginRight: (t) => t.spacing(0.5), "&.Mui-selected": {}, "&.Mui-focusVisible": {}, ...i }, ...o }), e(A, { className: "indicator", sx: { width: "90%", borderRadius: "4px", minWidth: "4px", position: "absolute", bottom: "0", alignSelf: "center", display: "flex" } })] });
|
|
2681
2683
|
}), Tu = Y((r) => {
|
|
2682
|
-
const { toolbars: i, value: o, onToolbarChange: t, sx: n, ...l } = r, c =
|
|
2684
|
+
const { toolbars: i, value: o, onToolbarChange: t, sx: n, ...l } = r, c = W(() => {
|
|
2683
2685
|
const g = [];
|
|
2684
2686
|
for (let a = 0; a < i.length; a++) g.push(e(ku, { label: i[a].label }, i[a].label));
|
|
2685
2687
|
return g;
|
|
@@ -2690,7 +2692,7 @@ const fl = (r) => e(bl, { ...r }), ku = Y((r) => {
|
|
|
2690
2692
|
}), Eu = Y((r) => {
|
|
2691
2693
|
const { toolbars: i, value: o, onToolbarChange: t, selectProps: n, ...l } = r, c = G((a) => {
|
|
2692
2694
|
t?.(a.target.value);
|
|
2693
|
-
}, [t]), g =
|
|
2695
|
+
}, [t]), g = W(() => {
|
|
2694
2696
|
const a = [];
|
|
2695
2697
|
for (let s = 0; s < i.length; s++) {
|
|
2696
2698
|
const m = i[s].label;
|
|
@@ -2700,23 +2702,23 @@ const fl = (r) => e(bl, { ...r }), ku = Y((r) => {
|
|
|
2700
2702
|
}
|
|
2701
2703
|
return a;
|
|
2702
2704
|
}, [i, o]);
|
|
2703
|
-
return e(
|
|
2705
|
+
return e(sr, { sx: { minWidth: "125px", maxWidth: "125px", "& .MuiInputBase-root": { paddingLeft: "0px", paddingRight: "0px" }, "& .MuiSelect-select": { paddingTop: (a) => a.spacing(0.5), paddingBottom: (a) => a.spacing(0.5), paddingLeft: (a) => a.spacing(2), color: (a) => a.palette.primary.main }, "& .MuiSelect-icon": { fill: (a) => a.palette.text.icon ?? a.palette.action.active, "&:hover:not(.Mui-disabled)": { color: (a) => a.palette.text.icon ?? a.palette.action.active } }, ...n }, size: "small", children: e(Ds, { value: o, onChange: c, variant: "outlined", sx: { backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})` }, ...l, children: g }) });
|
|
2704
2706
|
}), bl = Y(J((r, i) => {
|
|
2705
|
-
const { commands: o, selectWrapper: t, selectProps: n = {}, renderCompact: l = !1, paletteWrapper: c, toolbarsProps: g, paletteProps: a = {}, workbook: s, sx: m, ...p } = r, h =
|
|
2707
|
+
const { commands: o, selectWrapper: t, selectProps: n = {}, renderCompact: l = !1, paletteWrapper: c, toolbarsProps: g, paletteProps: a = {}, workbook: s, sx: m, ...p } = r, h = W(() => {
|
|
2706
2708
|
const v = [], { ref: k, ...T } = g?.Home || {};
|
|
2707
2709
|
v.push({ label: "Home", component: e(ml, { commands: o, ...T }) });
|
|
2708
|
-
const { ref: R, ...
|
|
2709
|
-
v.push({ label: "Insert", component: e(gl, { commands: o, ...
|
|
2710
|
+
const { ref: R, ...N } = g?.Insert || {};
|
|
2711
|
+
v.push({ label: "Insert", component: e(gl, { commands: o, ...N }) });
|
|
2710
2712
|
const { ref: B, ...P } = g?.View || {};
|
|
2711
2713
|
return v.push({ label: "View", component: e(hl, { commands: o, ...P }) }), v;
|
|
2712
|
-
}, [o, s]), d =
|
|
2714
|
+
}, [o, s]), d = W(() => {
|
|
2713
2715
|
const v = [];
|
|
2714
2716
|
for (let k = 0; k < h.length; k++) v.push(ae.cloneElement(h[k].component, { ...h[k].component.props, key: h[k].key ?? h[k].label }));
|
|
2715
2717
|
return v;
|
|
2716
2718
|
}, [h]), [u, y] = U(0), x = (v) => {
|
|
2717
2719
|
y(v);
|
|
2718
|
-
}, b =
|
|
2719
|
-
return
|
|
2720
|
+
}, b = W(() => e(l ? Eu : Tu, { toolbars: h, value: u, onToolbarChange: x, sx: n }), [h, u, n, l]), { sx: f, ...w } = a, C = e(Po, { elevation: 2, tabIndex: 0, sx: { display: "flex", alignItems: "center", userSelect: "none", flexGrow: 1, backgroundImage: `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})`, marginLeft: (v) => v.spacing(1), marginRight: (v) => v.spacing(1), marginTop: (v) => v.spacing(0.5), marginBottom: (v) => v.spacing(0.5), ...f }, ...w, children: d[u] });
|
|
2721
|
+
return j(A, { ref: i, className: "toolbarWrappers", sx: { display: "flex", flexDirection: "column", paddingTop: (v) => v.spacing(0.5), "*": { userSelect: "none" }, ...m }, ...p, children: [t ? t(b) : b, c ? c(C) : C] });
|
|
2720
2722
|
}));
|
|
2721
2723
|
var Va, _a;
|
|
2722
2724
|
bl.displayName = "WorkbookToolbars", (function() {
|
|
@@ -2746,47 +2748,47 @@ bl.displayName = "WorkbookToolbars", (function() {
|
|
|
2746
2748
|
return x || t.test(u) ? n(u.slice(2), x ? 2 : 8) : i.test(u) ? NaN : +u;
|
|
2747
2749
|
}
|
|
2748
2750
|
Va = function(u, y, x) {
|
|
2749
|
-
var b, f, w, C, v, k, T = 0, R = !1,
|
|
2751
|
+
var b, f, w, C, v, k, T = 0, R = !1, N = !1, B = !0;
|
|
2750
2752
|
if (typeof u != "function") throw new TypeError("Expected a function");
|
|
2751
2753
|
function P(V) {
|
|
2752
|
-
var
|
|
2753
|
-
return b = f = void 0, T = V, C = u.apply(E,
|
|
2754
|
+
var I = b, E = f;
|
|
2755
|
+
return b = f = void 0, T = V, C = u.apply(E, I);
|
|
2754
2756
|
}
|
|
2755
2757
|
function S(V) {
|
|
2756
|
-
var
|
|
2757
|
-
return k === void 0 ||
|
|
2758
|
+
var I = V - k;
|
|
2759
|
+
return k === void 0 || I >= y || I < 0 || N && V - T >= w;
|
|
2758
2760
|
}
|
|
2759
2761
|
function M() {
|
|
2760
2762
|
var V = p();
|
|
2761
2763
|
if (S(V)) return L(V);
|
|
2762
|
-
v = setTimeout(M, (function(
|
|
2763
|
-
var E = y - (
|
|
2764
|
-
return
|
|
2764
|
+
v = setTimeout(M, (function(I) {
|
|
2765
|
+
var E = y - (I - k);
|
|
2766
|
+
return N ? m(E, w - (I - T)) : E;
|
|
2765
2767
|
})(V));
|
|
2766
2768
|
}
|
|
2767
2769
|
function L(V) {
|
|
2768
2770
|
return v = void 0, B && b ? P(V) : (b = f = void 0, C);
|
|
2769
2771
|
}
|
|
2770
2772
|
function O() {
|
|
2771
|
-
var V = p(),
|
|
2772
|
-
if (b = arguments, f = this, k = V,
|
|
2773
|
+
var V = p(), I = S(V);
|
|
2774
|
+
if (b = arguments, f = this, k = V, I) {
|
|
2773
2775
|
if (v === void 0) return (function(E) {
|
|
2774
2776
|
return T = E, v = setTimeout(M, y), R ? P(E) : C;
|
|
2775
2777
|
})(k);
|
|
2776
|
-
if (
|
|
2778
|
+
if (N) return v = setTimeout(M, y), P(k);
|
|
2777
2779
|
}
|
|
2778
2780
|
return v === void 0 && (v = setTimeout(M, y)), C;
|
|
2779
2781
|
}
|
|
2780
|
-
return y = d(y) || 0, h(x) && (R = !!x.leading, w = (
|
|
2782
|
+
return y = d(y) || 0, h(x) && (R = !!x.leading, w = (N = "maxWait" in x) ? s(d(x.maxWait) || 0, y) : w, B = "trailing" in x ? !!x.trailing : B), O.cancel = function() {
|
|
2781
2783
|
v !== void 0 && clearTimeout(v), T = 0, b = k = f = v = void 0;
|
|
2782
2784
|
}, O.flush = function() {
|
|
2783
2785
|
return v === void 0 ? C : L(p());
|
|
2784
2786
|
}, O;
|
|
2785
2787
|
};
|
|
2786
2788
|
})();
|
|
2787
|
-
var Ua, Ga, qa = { exports: {} },
|
|
2789
|
+
var Ua, Ga, qa = { exports: {} }, On = {};
|
|
2788
2790
|
Ga || (Ga = 1, qa.exports = (function() {
|
|
2789
|
-
if (Ua) return
|
|
2791
|
+
if (Ua) return On;
|
|
2790
2792
|
Ua = 1;
|
|
2791
2793
|
var r = ae, i = typeof Object.is == "function" ? Object.is : function(a, s) {
|
|
2792
2794
|
return a === s && (a !== 0 || 1 / a == 1 / s) || a != a && s != s;
|
|
@@ -2813,7 +2815,7 @@ Ga || (Ga = 1, qa.exports = (function() {
|
|
|
2813
2815
|
});
|
|
2814
2816
|
}, [a]), l(m), m;
|
|
2815
2817
|
};
|
|
2816
|
-
return
|
|
2818
|
+
return On.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : g, On;
|
|
2817
2819
|
})()), qa.exports;
|
|
2818
2820
|
var Xa, Ka, bo = { exports: {} }, Xt = { exports: {} }, Du = Xt.exports;
|
|
2819
2821
|
(function() {
|
|
@@ -2897,11 +2899,11 @@ var st = { DOM_UNAVAILABLE_ERROR: "DOM is unavailable server-side. Please use th
|
|
|
2897
2899
|
o && document.removeEventListener(o, i);
|
|
2898
2900
|
} };
|
|
2899
2901
|
const Pu = (r) => {
|
|
2900
|
-
const { workbook: i, workbookElement: o, notifier: t, target: n, commands: l, darkMode: c, onShowSidebar: g, onNewWorkbook: a = Ru } = r, [s, m] = U(i?.getSelectedSheet()), [p, h] = U(i?.getSheets().getItems()), d = te(g, [g]), u = te(a, [a]), y =
|
|
2902
|
+
const { workbook: i, workbookElement: o, notifier: t, target: n, commands: l, darkMode: c, onShowSidebar: g, onNewWorkbook: a = Ru } = r, [s, m] = U(i?.getSelectedSheet()), [p, h] = U(i?.getSheets().getItems()), d = te(g, [g]), u = te(a, [a]), y = W(() => [new Ge("workbookStatistics", n, { label: "Workbook Statistics", description: "Show the workbook statistics.", shortcut: { key: "G", modifiers: [ke.Ctrl, ke.Shift] } }), new Ge("showFormat", n, { label: "Show Format", description: "Open the format pane.", shortcut: { key: "F", modifiers: [ke.Ctrl, ke.Shift] } }), new we("newCellStyle", n, { label: "New Cell Style…", scopedLabels: { cellStyle: "New Cell Style" }, description: "Create a new named style can can be quickly used later." }), new we("deleteCellStyle", n, { label: "Delete Cell Style", scopedLabels: { cellStyle: "Delete" }, description: "Remove a named style that is no longer needed." }), new we("modifyCellStyle", n, { label: "Modify Cell Style", scopedLabels: { cellStyle: "Modify" }, description: "Update a style with the currently style." }), new Ge("find", n, { label: "Find", description: "Open the Find window.", shortcut: [{ key: "F", modifiers: [ke.Ctrl] }, { key: "F5", modifiers: [ke.Shift] }] }), new Ge("findReplace", n, { label: "Find & Replace", description: "Open the Find & Replace window.", shortcut: [{ key: "H", modifiers: [ke.Ctrl] }, { key: "H", modifiers: [ke.Ctrl, ke.Alt] }] }), new Ge("goto", n, { label: "Go To", description: "Open the 'Go To' window.", shortcut: [{ key: "G", modifiers: [ke.Ctrl] }] }), new Ge("workbookViewToggleExpandFormulaBar", n, { label: "Toggle Expand Formula bar", description: "Expand or collapse the formula bar.", shortcut: { key: "U", modifiers: [ke.Ctrl, ke.Shift] } }), new Ge("workbookViewToggleShowFormulaBar", n, { label: "View Formula bar", scopedLabels: { view: "Formula Bar" }, description: "Show or hide the formula bar." }), new Ge("workbookViewToggleShowTabs", n, { label: "View Sheet Tabs", description: "Show or hide the sheet tabs.", scopedLabels: { view: "Sheet Tabs" } }), new Ge("workbookViewToggleShowStatusBar", n, { label: "View Status Bar", description: "Show or hide the status bar.", scopedLabels: { view: "Status Bar" } }), new Ge("workbookViewToggleShowHorizontalScrollBar", n, { label: "View Horizontal Scrollbar", description: "Show or hide the horizontal scrollbar.", scopedLabels: { view: "Horizontal Scrollbar" } }), new Ge("workbookViewToggleShowVerticalScrollBar", n, { label: "View Vertical Scrollbar", description: "Show or hide the vertical scrollbar.", scopedLabels: { view: "Vertical Scrollbar" } }), new we("hideSheet", n, { 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 we("deleteSheet", n, { label: "Delete Sheet", scopedLabels: { sheet: "Delete" }, description: "Delete the sheet and all the data." }), new we("addSheet", n, { label: "Insert Sheet", scopedLabels: { sheet: "Insert" }, description: "Insert sheet before the current sheet.", shortcut: [{ key: "F11", modifiers: [ke.Shift] }, { key: "F1", modifiers: [ke.Alt, ke.Shift] }] }), new we("duplicateSheet", n, { label: "Duplicate Sheet", description: "Duplicate the current sheet.", scopedLabels: { sheet: "Duplicate" } }), new we("nextSheet", n, { label: "Next Sheet", scopedLabels: { sheet: "Next" }, description: "Activate the next sheet.", shortcut: [{ key: "PageDown", modifiers: [ke.Ctrl] }] }), new we("previousSheet", n, { label: "Previous Sheet", scopedLabels: { sheet: "Previous" }, description: "Activate the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [ke.Ctrl] }] }), new we("selectNextSheet", n, { label: "Select Next Sheet", scopedLabels: { sheet: "Select Next" }, description: "Select the next sheet.", shortcut: [{ key: "PageDown", modifiers: [ke.Ctrl, ke.Shift] }] }), new we("selectPreviousSheet", n, { label: "Select Previous Sheet", scopedLabels: { sheet: "Select Previous" }, description: "Select the previous sheet.", shortcut: [{ key: "PageUp", modifiers: [ke.Ctrl, ke.Shift] }] }), new we("selectTheme", n, { label: "Theme", description: "Select a theme that coveys a style suitable for your data." }), new we("selectNamed", n, { label: (S) => S?.getName() ?? "Select Named Item", scopedLabels: { namedItem: (S) => S?.getName() ?? "Select" }, description: "Select the item." }), new we("addNamedReference", n, { 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 we("editNamedReference", n, { label: "Edit Named Reference…", scopedLabels: { namedItem: "Edit…" }, description: "Add a new named reference. Names can be used as a substitute for cell references." }), new we("deleteNamedReference", n, { label: "Delete Named Reference", scopedLabels: { namedItem: "Delete" }, description: "Remove the named reference." }), new Ge("activeNameBox", n, { label: "Activate Name Box", description: "Move the focus to the name box.", shortcut: { key: "F3", modifiers: [ke.Alt] } }), new Ge("createNamedReferenceFromSelection", n, { label: "Create from Selection", description: "Automatically generate names from the selected cells.", shortcut: { key: "F3", modifiers: [ke.Ctrl, ke.Shift] } }), new Ge("activeNameManager", n, { label: "Activate Name Manager", description: `Create, edit, delete, and find all the names used in the workbook.
|
|
2901
2903
|
|
|
2902
|
-
Names can be used as a substitute for cell references.`, shortcut: { key: "F3", modifiers: [ke.Ctrl] } }), new we("fullScreenToggle", n, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" } }), new we("showScriptEditor", n, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", shortcut: [{ key: "F11", modifiers: [ke.Alt] }] }), new we("executeScript", n, { label: "Run Script", description: "Run the selected or last executed script.", shortcut: { key: "F8" } }), new we("executeSelectedScript", n, { label: "Run Script", description: "Run the selected script.", shortcut: { key: "F8" } }), new we("saveScripts", n, { label: "Save Script", description: "Save the current scripts." }), new we("maximumWorkbookToggle", n, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [ke.Ctrl] } }), new we("spellCheck", n, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new we("calculateAll", n, { label: "Calculate Now", description: "Recalculate all formulas.", shortcut: { key: "F9" } }), new Ge("closeWorkbook", n, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [ke.Ctrl] } }), new Ge("newWorkbook", n, { label: "New Workbook", description: "Create a new workbook in another tab." })], []), x =
|
|
2904
|
+
Names can be used as a substitute for cell references.`, shortcut: { key: "F3", modifiers: [ke.Ctrl] } }), new we("fullScreenToggle", n, { label: "FullScreen", description: "Toggle showing the workbook using the full screen.", shortcut: { key: "F11" } }), new we("showScriptEditor", n, { label: "Scripts", scopedLabels: { scripts: "Script Editor…" }, description: "Show the script editor.", shortcut: [{ key: "F11", modifiers: [ke.Alt] }] }), new we("executeScript", n, { label: "Run Script", description: "Run the selected or last executed script.", shortcut: { key: "F8" } }), new we("executeSelectedScript", n, { label: "Run Script", description: "Run the selected script.", shortcut: { key: "F8" } }), new we("saveScripts", n, { label: "Save Script", description: "Save the current scripts." }), new we("maximumWorkbookToggle", n, { label: "Maximize", description: "Toggle showing the workbook maximized.", shortcut: { key: "F10", modifiers: [ke.Ctrl] } }), new we("spellCheck", n, { label: "Spell Check", description: "Check the workbook for spelling mistakes.", shortcut: { key: "F7" } }), new we("calculateAll", n, { label: "Calculate Now", description: "Recalculate all formulas.", shortcut: { key: "F9" } }), new Ge("closeWorkbook", n, { label: "Close Workbook", description: "Close the workbook.", shortcut: { key: "W", modifiers: [ke.Ctrl] } }), new Ge("newWorkbook", n, { label: "New Workbook", description: "Create a new workbook in another tab." })], []), x = W(() => {
|
|
2903
2905
|
let S = null;
|
|
2904
|
-
return S = l ? l.createChildGroup(n, "workbook", !1) : new
|
|
2906
|
+
return S = l ? l.createChildGroup(n, "workbook", !1) : new gr(n, "workbook"), S.addCommands(y, !0), S;
|
|
2905
2907
|
}, [l, y]), b = un(), f = ae.useRef(null), w = te(() => {
|
|
2906
2908
|
let S, M = null;
|
|
2907
2909
|
const L = x.getCommand("executeScript");
|
|
@@ -2912,7 +2914,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2912
2914
|
});
|
|
2913
2915
|
const V = x.getCommand("executeSelectedScript");
|
|
2914
2916
|
if (!V) return;
|
|
2915
|
-
const
|
|
2917
|
+
const I = { saveSource: async (E) => {
|
|
2916
2918
|
let K = null, Q = null;
|
|
2917
2919
|
const q = i.getScripts();
|
|
2918
2920
|
try {
|
|
@@ -2939,7 +2941,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2939
2941
|
}
|
|
2940
2942
|
return null;
|
|
2941
2943
|
}, getScripts: () => i.getScripts() };
|
|
2942
|
-
V.update({ context:
|
|
2944
|
+
V.update({ context: I });
|
|
2943
2945
|
}, [x, i, o, t]), C = ae.useRef(null);
|
|
2944
2946
|
_e(i, { onBeforeSave: async () => {
|
|
2945
2947
|
await C.current?.onBeforeSave();
|
|
@@ -2958,7 +2960,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2958
2960
|
w();
|
|
2959
2961
|
} });
|
|
2960
2962
|
const { isFullscreenAvailable: v, isFullscreenEnabled: k, toggleFullscreen: T } = (function(S = {}) {
|
|
2961
|
-
const { target: M, onChange: L, onError: O, requestFullScreenOptions: V } = S, [
|
|
2963
|
+
const { target: M, onChange: L, onError: O, requestFullScreenOptions: V } = S, [I, E] = U(!1), [K, Q] = U(null), [q, _] = U(!1), ne = G(() => st.requestFullscreen(M?.current || null, V), [M, V]), le = G(() => st.exitFullscreen(), []), X = G(() => st.fullscreenElement ? le() : ne(), [ne, le]), z = G((me) => {
|
|
2962
2964
|
const Le = st.fullscreenElement;
|
|
2963
2965
|
Q(Le), _(!!Le), L?.(me);
|
|
2964
2966
|
}, [L]), ee = G((me) => {
|
|
@@ -2967,14 +2969,14 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
2967
2969
|
}, [O]);
|
|
2968
2970
|
return ue(() => {
|
|
2969
2971
|
E(st.fullscreenEnabled);
|
|
2970
|
-
}, []), ue(() => (st.on("change",
|
|
2971
|
-
st.off("change",
|
|
2972
|
-
}), [
|
|
2973
|
-
})({ target: { current: o ?? document.body } }), R =
|
|
2972
|
+
}, []), ue(() => (st.on("change", z), st.on("error", ee), () => {
|
|
2973
|
+
st.off("change", z), st.off("error", ee);
|
|
2974
|
+
}), [z, ee]), { isFullscreenAvailable: I, fullscreenElement: K, isFullscreenEnabled: q, enableFullscreen: ne, disableFullscreen: le, toggleFullscreen: X };
|
|
2975
|
+
})({ target: { current: o ?? document.body } }), R = fr();
|
|
2974
2976
|
ue(() => {
|
|
2975
2977
|
x.getCommand("selectTheme").update({ state: () => i.getTheme(), context: () => ({ theme: i.getTheme(), themes: R, darkMode: c }) });
|
|
2976
2978
|
}, [i?.getTheme(), c]);
|
|
2977
|
-
const
|
|
2979
|
+
const N = te(async function(S, M) {
|
|
2978
2980
|
let L = null;
|
|
2979
2981
|
const O = i.getScripts();
|
|
2980
2982
|
if (S?.declaration || S?.functionName) {
|
|
@@ -3006,8 +3008,8 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
3006
3008
|
} catch (E) {
|
|
3007
3009
|
O = E.message;
|
|
3008
3010
|
}
|
|
3009
|
-
let V = i.getStyles().getNamed(M),
|
|
3010
|
-
return !
|
|
3011
|
+
let V = i.getStyles().getNamed(M), I = O;
|
|
3012
|
+
return !I && V && (I = `Update style '${V.getName()}'.`), { valid: O === null, message: I };
|
|
3011
3013
|
} }).then(({ input: M, option: L }) => {
|
|
3012
3014
|
const O = i.getSelectedSheet().getSelectedRange();
|
|
3013
3015
|
if (L !== "Ok") return;
|
|
@@ -3043,17 +3045,17 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
3043
3045
|
await t?.showOptions({ title: "Confirm", description: "This will close the current workbook tab. Do you want to continue?", options: ["Close", "Cancel"], defaultOption: "Close" }) === "Close" && window.close();
|
|
3044
3046
|
}), x.getCommand("newWorkbook").updateCallback(() => {
|
|
3045
3047
|
u?.();
|
|
3046
|
-
}), x.getCommand("executeScript").updateCallback(
|
|
3048
|
+
}), x.getCommand("executeScript").updateCallback(N), x.getCommand("executeSelectedScript").updateCallback(N);
|
|
3047
3049
|
}, [i, t]);
|
|
3048
3050
|
const B = te(async (S) => {
|
|
3049
3051
|
let M = 0, L = null, O = "Find & Replace";
|
|
3050
3052
|
S?.replace && !S?.replaceOptions?.maxCount && (O = "Replace All");
|
|
3051
3053
|
const V = await t?.showBusy?.(O);
|
|
3052
3054
|
try {
|
|
3053
|
-
const
|
|
3055
|
+
const I = S?.scope ?? "sheet";
|
|
3054
3056
|
let E = null;
|
|
3055
3057
|
const K = i.getSelectedSheet(), Q = { from: K.getSelectedCell(), ...S.findOptions };
|
|
3056
|
-
if (E =
|
|
3058
|
+
if (E = I === "sheet" ? i.getSelectedSheet().find(S.findText, Q) : i.find(S.findText, Q), S.replace) {
|
|
3057
3059
|
const q = i.replace(E, S.replaceText, S.replaceOptions);
|
|
3058
3060
|
M = q.count, S.replaceOptions.maxCount && (L = q.last);
|
|
3059
3061
|
} else {
|
|
@@ -3061,16 +3063,16 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
3061
3063
|
q.done || (M++, L = q.value);
|
|
3062
3064
|
}
|
|
3063
3065
|
L?.select({ autoFocus: !1 }), V?.(), !S.replaceOptions.maxCount && M > 1 && t?.showMessage?.(`We replaced ${M} cells.`);
|
|
3064
|
-
} catch (
|
|
3065
|
-
V?.(), t?.showError?.(
|
|
3066
|
+
} catch (I) {
|
|
3067
|
+
V?.(), t?.showError?.(I);
|
|
3066
3068
|
}
|
|
3067
3069
|
return M;
|
|
3068
3070
|
}, [i, o]), P = te((S) => {
|
|
3069
3071
|
const M = { value: S, context: { selection: () => {
|
|
3070
3072
|
const L = i.getSelectedRanges(), O = [];
|
|
3071
3073
|
for (let V = 0; V < L.getCount(); V++) {
|
|
3072
|
-
const
|
|
3073
|
-
O.push(
|
|
3074
|
+
const I = L.at(V).getFixed(!0).getCoords();
|
|
3075
|
+
O.push(I);
|
|
3074
3076
|
}
|
|
3075
3077
|
return i.getRanges(O);
|
|
3076
3078
|
}, getNames: () => i.getNames() }, onUpdate: async (L) => {
|
|
@@ -3141,8 +3143,8 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
3141
3143
|
}, [p, s]), x;
|
|
3142
3144
|
}, Ru = () => {
|
|
3143
3145
|
window.open(window.origin.toString(), "sheetxl-" + Ze.uuidV4(), "popup=true");
|
|
3144
|
-
}, Mu = "_sheetxl-theme_4opcr_2",
|
|
3145
|
-
const { workbook: o, commands: t, onBeforeUserChange: n, onUserChange: l, disabled: c = !1, readOnly: g = !1, contextMenuProps: a, renderContextMenu: s =
|
|
3146
|
+
}, Mu = "_sheetxl-theme_4opcr_2", Iu = "_sheetxl-workbook_1j3lu_5", Nu = (r) => e(Ji, { ...r }), Fu = (r) => e(Qi, { ...r }), Ou = (r) => e(Zi, { ...r }), xl = Y(J((r, i) => {
|
|
3147
|
+
const { workbook: o, commands: t, onBeforeUserChange: n, onUserChange: l, disabled: c = !1, readOnly: g = !1, contextMenuProps: a, renderContextMenu: s = Nu, sheetsAllProps: m, renderSheetsAll: p = Fu, sheetTabProps: h, renderSheetTab: d, background: u = "transparent", className: y, notifier: x, sx: b, borderWidth: f, borderColor: w, gridTheme: C, gridStyle: v, ...k } = r, [T, R] = U(o?.getSelectedSheetIndex()), [N, B] = U(o?.getSheets().getItems()), [P, S] = U(o?.getProtection());
|
|
3146
3148
|
_e(o, { onViewChange(H) {
|
|
3147
3149
|
R(H?.getSelectedSheetIndex());
|
|
3148
3150
|
}, onSheetsChange: (H) => {
|
|
@@ -3150,26 +3152,26 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
3150
3152
|
}, onProtectionChange: (H) => {
|
|
3151
3153
|
S(H?.getProtection());
|
|
3152
3154
|
} });
|
|
3153
|
-
const M = g || !P.isStructureAllowed(), L =
|
|
3155
|
+
const M = g || !P.isStructureAllowed(), L = W(() => {
|
|
3154
3156
|
const H = [];
|
|
3155
|
-
for (let oe = 0; oe <
|
|
3157
|
+
for (let oe = 0; oe < N.length; oe++) H.push(N[oe].getName());
|
|
3156
3158
|
return H;
|
|
3157
|
-
}, [
|
|
3159
|
+
}, [N]), O = G((H) => {
|
|
3158
3160
|
n?.(H) !== !1 && (o.getSheetAt(H).select(), l?.(H));
|
|
3159
3161
|
}, [o, n, l]), V = G((H, oe) => {
|
|
3160
3162
|
o.getSheetAt(H).setName(oe), l?.(H);
|
|
3161
|
-
}, [o, l]),
|
|
3163
|
+
}, [o, l]), I = G((H, oe) => {
|
|
3162
3164
|
o.getSheetAt(H).setPosition(oe), l?.(oe);
|
|
3163
3165
|
}, [o, l]), E = te(() => {
|
|
3164
3166
|
if (n?.(T) === !1) return;
|
|
3165
3167
|
const H = T + 1;
|
|
3166
3168
|
o.getSheets().add({ name: void 0, autoSelect: !0 }), l?.(H);
|
|
3167
|
-
}, [o, n, l, T]), K =
|
|
3169
|
+
}, [o, n, l, T]), K = W(() => ({ placement: "top-start" }), []), Q = Se(null), [q, _] = U(!1), ne = G((H) => {
|
|
3168
3170
|
const { closeFloatAll: oe, floatReference: Te } = H;
|
|
3169
3171
|
return p({ workbook: o, gridStyle: v, floatReference: Te, closeFloatAll: oe, ...m });
|
|
3170
|
-
}, [p, m, c, o, v]), { reference: le, component: X } = oo({ label: "allSheet", popperProps: K, anchor: Q.current, onOpen: () => _(!0), onClose: () => _(!1), createPopupPanel: ne }),
|
|
3172
|
+
}, [p, m, c, o, v]), { reference: le, component: X } = oo({ label: "allSheet", popperProps: K, anchor: Q.current, onOpen: () => _(!0), onClose: () => _(!1), createPopupPanel: ne }), z = Se(null), [ee, me] = U(null), Le = G((H) => {
|
|
3171
3173
|
const { floatReference: oe } = H;
|
|
3172
|
-
return s?.({ workbook: o, index: ee?.index, tabStripRef:
|
|
3174
|
+
return s?.({ workbook: o, index: ee?.index, tabStripRef: z.current, commands: t, disabled: c, floatReference: oe, ...a });
|
|
3173
3175
|
}, [s, a, c, o, t, ee]), { reference: Fe, component: Be } = oo({ label: "sheetTab", popperProps: K, anchor: { getBoundingClientRect: () => new DOMRect(ee?.left || 0, ee?.top || 0, 0, 0) }, onClose: () => me(null), createPopupPanel: Le });
|
|
3174
3176
|
ue(() => {
|
|
3175
3177
|
ee ? Fe.open(0) : Fe.close(0);
|
|
@@ -3185,10 +3187,10 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
3185
3187
|
return oe ? (d ?? Ou)({ sheet: oe, gridTheme: C, onContextMenu: (Te) => {
|
|
3186
3188
|
O(H.index), Ye(Te, H.index);
|
|
3187
3189
|
}, ...H, ...h }) : null;
|
|
3188
|
-
}, [d, h, o, C]), je =
|
|
3190
|
+
}, [d, h, o, C]), je = W(() => M ? null : e(At, { disableInteractive: !0, title: "New sheet", children: e(dt, { disabled: c, component: "div", sx: { padding: "0", "&:hover:not([disabled])": { color: (H) => H.palette.primary.main }, color: (H) => H.palette.text.icon ?? H.palette.action.active, "& svg": { width: "18px", height: "18px" } }, "aria-label": "addTab", size: "small", onMouseDown: (H) => {
|
|
3189
3191
|
H.button === 0 && H.preventDefault();
|
|
3190
3192
|
}, onClick: () => E(), children: e(Qd, {}) }) }), [c, M, E]);
|
|
3191
|
-
return
|
|
3193
|
+
return j(A, { ref: i, className: Ae(y), sx: { position: "relative", display: "flex", alignItems: "stretch", flex: "1 1 100%", maxWidth: "100%", ...b }, ...k, children: [e(dp, { ref: z, selectedTabIndex: T, tabNames: L, onSelectedTabIndexChange: O, onTabNameChange: V, onTabMove: I, background: u, borderColor: w, borderWidth: f, activeColor: null, disabled: c, disableDrag: M, createScrollStartButton: ud, createScrollEndButton: pd, createScrollEdgeButton: dd, createTabButton: ve, createTabDivider: (H) => {
|
|
3192
3194
|
const { key: oe, ...Te } = H;
|
|
3193
3195
|
return e(re, { sx: { marginLeft: "-1px", marginRight: "0px", marginTop: "6px", marginBottom: "6px", background: (ge) => he(ge.palette.divider, 0.25) }, ...Te }, oe);
|
|
3194
3196
|
}, editLabelProps: { readOnly: M, maxLength: 31, styleHover: { fontWeight: "700" }, onKeyPress: (H) => {
|
|
@@ -3203,7 +3205,7 @@ Names can be used as a substitute for cell references.`, shortcut: { key: "F3",
|
|
|
3203
3205
|
}));
|
|
3204
3206
|
xl.displayName = "WorkbookStrip";
|
|
3205
3207
|
const yl = Y(J((r, i) => {
|
|
3206
|
-
const { workbook: o, commands: t, disabled: n, sx: l, floatReference: c, className: g, ...a } = r, [s, m] =
|
|
3208
|
+
const { workbook: o, commands: t, disabled: n, sx: l, floatReference: c, className: g, ...a } = r, [s, m] = ar((S) => S + 1, 0), [p, h] = U(o.getSelectedSheet()), [d, u] = U(p.getSelectedRanges()), [y, x] = U(p.getSelectedCell());
|
|
3207
3209
|
_e(o, { onSheetsChange() {
|
|
3208
3210
|
h(o.getSelectedSheet());
|
|
3209
3211
|
} }), _e(p.getSelection(), { onChange() {
|
|
@@ -3211,27 +3213,27 @@ const yl = Y(J((r, i) => {
|
|
|
3211
3213
|
} }), He(t, [], { onChange: () => {
|
|
3212
3214
|
m();
|
|
3213
3215
|
} });
|
|
3214
|
-
const b =
|
|
3216
|
+
const b = W(() => ({}), []), f = W(() => ({ commandHook: { beforeExecute: (S, M) => c.closeAll(), onExecute() {
|
|
3215
3217
|
}, onError() {
|
|
3216
3218
|
console.log("onError");
|
|
3217
|
-
} }, disabled: n, scope: "contextMenu", parentFloat: c }), [n, c]), w =
|
|
3219
|
+
} }, disabled: n, scope: "contextMenu", parentFloat: c }), [n, c]), w = W(() => ({ ...b, ...f, variant: ie.Menuitem }), [b, f]), C = W(() => ({ commands: t, variant: ie.Menuitem, parentFloat: c, ...f }), [t, f, c]), v = [];
|
|
3218
3220
|
let k = d.isEntireRows(), T = d.isEntireColumns();
|
|
3219
|
-
d && (k && (v.push(e(re, { orientation: "horizontal" }, "context:" + v.length)), v.push(
|
|
3220
|
-
const R = [],
|
|
3221
|
-
if (Ht(
|
|
3222
|
-
if (R.push(e(re, { orientation: "horizontal" }, "contextBefore:" + R.length)), y?.getHyperlink()) R.push(
|
|
3221
|
+
d && (k && (v.push(e(re, { orientation: "horizontal" }, "context:" + v.length)), v.push(Pe(F, { command: t.getCommand("hideColumns"), ...w, icon: D(e(md, {})), key: "context:" + v.length })), v.push(Pe(F, { command: t.getCommand("unhideColumns"), ...w, icon: D(e(gd, {})), key: "context:" + v.length }))), T && (v.push(e(re, { orientation: "horizontal" }, "context:" + v.length)), v.push(Pe(F, { command: t.getCommand("hideRows"), ...w, icon: D(e(hd, {})), key: "context:" + v.length })), v.push(Pe(F, { command: t.getCommand("unhideRows"), ...w, icon: D(e(fd, {})), key: "context:" + v.length }))), (k || T) && v.push(e(re, { orientation: "horizontal" }, "context:" + v.length)), k && v.push(Pe(F, { command: t.getCommand("autoFitColumns"), ...w, icon: D(e(bd, {})), key: "context:" + v.length })), T && v.push(Pe(F, { command: t.getCommand("autoFitRows"), ...w, icon: D(e(xd, {})), key: "context:" + v.length })));
|
|
3222
|
+
const R = [], N = t.getCommand("formatTableStyle"), B = N?.context()?.table();
|
|
3223
|
+
if (Ht(N), !k && !T) {
|
|
3224
|
+
if (R.push(e(re, { orientation: "horizontal" }, "contextBefore:" + R.length)), y?.getHyperlink()) R.push(Pe(ct, { ...C, popupCommandKeys: ["updateHyperlink", "deleteHyperlink"], popupScope: "hyperlink", key: "contextBefore:action" + R.length, quickCommand: "openHyperlink", icon: (S) => S.key() === "openHyperlink" ? D(e(Un, {})) : null }));
|
|
3223
3225
|
else {
|
|
3224
3226
|
const S = t.getCommand("updateHyperlink");
|
|
3225
|
-
R.push(
|
|
3227
|
+
R.push(Pe(F, { command: S, ...w, icon: D(e(Un, {})), key: "contextBefore:" + R.length }));
|
|
3226
3228
|
}
|
|
3227
|
-
if (y?.getComments()) R.push(
|
|
3229
|
+
if (y?.getComments()) R.push(Pe(ct, { ...C, popupCommandKeys: ["deleteComments"], key: "contextBefore:action" + R.length, quickCommand: "updateComments", icon: (S) => S.key() === "updateComments" ? D(e(Gn, {})) : null }));
|
|
3228
3230
|
else {
|
|
3229
3231
|
const S = t.getCommand("updateComments");
|
|
3230
|
-
R.push(
|
|
3232
|
+
R.push(Pe(F, { command: S, ...w, icon: D(e(Gn, {})), key: "contextBefore:" + R.length }));
|
|
3231
3233
|
}
|
|
3232
|
-
B ? R.push(
|
|
3234
|
+
B ? R.push(Pe(ct, { ...C, variant: ie.Menuitem, key: "contextBefore:" + R.length, popupCommandKeys: ["convertTableToRange", "deleteTable"], popupScope: "table", scope: "context", commandState: B, quickCommand: "editTable", icon: (S) => (S.key(), D(e(an, {}))) })) : R.push(Pe(F, { command: t.getCommand("insertTable"), ...w, icon: D(e(an, {})), key: "context:" + v.length })), R.push(Pe(Hi, { ...C, key: "contextBefore:" + R.length }));
|
|
3233
3235
|
}
|
|
3234
|
-
const P =
|
|
3236
|
+
const P = j(se, { children: [e(F, { command: t.getCommand("cut"), ...w, icon: e(yd, {}) }), e(xr, { command: t.getCommand("copy"), ...w }), e(Ai, { command: t.getCommand("paste"), ...C, includePasteAllInPopup: !1 }), e(re, { orientation: "horizontal" }), e(Ni, { ...C }), e(re, { orientation: "horizontal" }), e(Mi, { commands: t, ...C, disableSheet: !0 }), e(Ii, { commands: t, ...C, disableSheet: !0 }), e(Ri, { ...C }), R, v] });
|
|
3235
3237
|
return e(A, { ref: i, className: Ae("menu", g), sx: { ...l }, ...a, children: P });
|
|
3236
3238
|
}));
|
|
3237
3239
|
yl.displayName = "WorkbookContextMenu";
|
|
@@ -3239,10 +3241,10 @@ const wl = Y(J((r, i) => {
|
|
|
3239
3241
|
const { movable: o, commands: t, disabled: n, sx: l, floatReference: c, ...g } = r;
|
|
3240
3242
|
_e(o, { onAnyChange(u) {
|
|
3241
3243
|
} });
|
|
3242
|
-
const a =
|
|
3244
|
+
const a = W(() => ({}), []), s = W(() => ({ commandHook: { beforeExecute: (u, y) => c.closeAll(), onExecute() {
|
|
3243
3245
|
}, onError() {
|
|
3244
3246
|
console.log("onError");
|
|
3245
|
-
} }, disabled: n, parentFloat: c }), [n, c]), m =
|
|
3247
|
+
} }, disabled: n, parentFloat: c }), [n, c]), m = W(() => ({ variant: ie.Menuitem, ...a, ...s }), [a, s]), p = W(() => ({ commands: t, variant: ie.Menuitem, parentFloat: c, ...s }), [t, s, c]), h = (u) => {
|
|
3246
3248
|
switch (u?.key()) {
|
|
3247
3249
|
case "moveToFront":
|
|
3248
3250
|
return D(e(Md, {}));
|
|
@@ -3253,9 +3255,9 @@ const wl = Y(J((r, i) => {
|
|
|
3253
3255
|
case "moveBackward":
|
|
3254
3256
|
return D(e(Dd, {}));
|
|
3255
3257
|
case "toggleLockAspectRatio":
|
|
3256
|
-
return D(e(aa, {}));
|
|
3257
|
-
case "formatDrawAlignLeft":
|
|
3258
3258
|
return D(e(ia, {}));
|
|
3259
|
+
case "formatDrawAlignLeft":
|
|
3260
|
+
return D(e(la, {}));
|
|
3259
3261
|
case "formatDrawAlignCenter":
|
|
3260
3262
|
return D(e(Ed, {}));
|
|
3261
3263
|
case "formatDrawAlignRight":
|
|
@@ -3273,19 +3275,19 @@ const wl = Y(J((r, i) => {
|
|
|
3273
3275
|
case "formatAnchorTypeTwoCell":
|
|
3274
3276
|
case "formatAnchorTypeOneCell":
|
|
3275
3277
|
case "formatAnchorTypeAbsolute":
|
|
3276
|
-
return D(e(
|
|
3278
|
+
return D(e(sa, {}));
|
|
3277
3279
|
default:
|
|
3278
3280
|
return null;
|
|
3279
3281
|
}
|
|
3280
|
-
}, d =
|
|
3282
|
+
}, d = j(se, { children: [e(xr, { command: t.getCommand("copy"), ...m, variant: ie.Menuitem }), [], e(re, { orientation: "horizontal" }), e(ct, { ...p, popupCommandKeys: ["moveToFront", "moveForward"], quickCommand: "moveToFront", icon: h }), e(ct, { ...p, popupCommandKeys: ["moveToBack", "moveBackward"], quickCommand: "moveToBack", icon: h }), e(re, { orientation: "horizontal" }), e(F, { ...m, command: t.getCommand("toggleLockAspectRatio"), icon: D(e(ia, {})) }), e(re, { orientation: "horizontal" }), e(ct, { ...p, popupCommandKeys: ["formatDrawAlignLeft", "formatDrawAlignCenter", "formatDrawAlignRight", null, "formatDrawAlignTop", "formatDrawAlignMiddle", "formatDrawAlignBottom", null, "formatDrawDistributeHorz", "formatDrawDistributeVert"], label: "Align", icon: (u) => h(u) || D(e(la, {})), tooltip: "Quickly change the placement of your drawings." }), e(re, { orientation: "horizontal" }), e(ct, { ...p, popupCommandKeys: ["formatAnchorTypeTwoCell", "formatAnchorTypeOneCell", "formatAnchorTypeAbsolute"], label: "Sizing", icon: (u) => h(u) || D(e(sa, {})), tooltip: "Determine how the drawing size will adjust as the cell sizes adjust." }), []] });
|
|
3281
3283
|
return e(A, { ref: i, sx: { paddingTop: "4px", paddingBottom: "4px", ...l }, ...g, children: d });
|
|
3282
3284
|
}));
|
|
3283
3285
|
wl.displayName = "MovableContextMenu";
|
|
3284
|
-
const Au = (r) => e(wl, { ...r }), Bu = (r) => e(yl, { ...r }), Lu = (r) => e(Yi, { ...r }), Hu = (r, i) => e(Ki, { ref: i, ...r }), zu = (r) => e(Lt, { ...r }), Wu = (r, i) => e(pp, { ref: i, ...r }), ju = (r) => e($i, { ...r }), $u = (r) => e(xl, { ...r }), Vu = { fireOnModelChange: !1 },
|
|
3285
|
-
const { workbook: o, createWorkbookOptions: t, onNewWorkbook: n, onElementLoad: l, notifier: c, autoFocus: g = !1, sx: a, style: s, className: m, onFocus: p, onBlur: h, onKeyDown: d, onRepeatCommandChange: u, commands: y, showFormulaBar: x, formulaBarProps: b, renderFormulaBar: f = Hu, showTabs: w, tabsProps: C, renderTabs: v = $u, showStatusBar: k, statusBarProps: T, renderStatusBar: R = ju, toolbarProps:
|
|
3286
|
-
const $ = { theme:
|
|
3287
|
-
return o ?? new
|
|
3288
|
-
}, [o]), me = Se(null), [Le, Fe] = U(!1), Be = Se(null), Ye =
|
|
3286
|
+
const Au = (r) => e(wl, { ...r }), Bu = (r) => e(yl, { ...r }), Lu = (r) => e(Yi, { ...r }), Hu = (r, i) => e(Ki, { ref: i, ...r }), zu = (r) => e(Lt, { ...r }), Wu = (r, i) => e(pp, { ref: i, ...r }), ju = (r) => e($i, { ...r }), $u = (r) => e(xl, { ...r }), Vu = { fireOnModelChange: !1 }, An = { flex: "1 1 100%", display: "flex" }, Sl = Y(J((r, i) => {
|
|
3287
|
+
const { workbook: o, createWorkbookOptions: t, onNewWorkbook: n, onElementLoad: l, notifier: c, autoFocus: g = !1, sx: a, style: s, className: m, onFocus: p, onBlur: h, onKeyDown: d, onRepeatCommandChange: u, commands: y, showFormulaBar: x, formulaBarProps: b, renderFormulaBar: f = Hu, showTabs: w, tabsProps: C, renderTabs: v = $u, showStatusBar: k, statusBarProps: T, renderStatusBar: R = ju, toolbarProps: N, renderToolbar: B = fl, contextMenuSx: P, renderContextMenu: S = Bu, renderFilterMenu: M = Lu, renderMovableMenu: L = Au, renderLoadingPanel: O = zu, loadingPanelProps: V, sheetProps: I, renderSheet: E = Wu, showHorizontalScrollbar: K, showVerticalScrollbar: Q, gridTheme: q, headersTheme: _, enableDarkImages: ne, ...le } = r, X = at(), z = fr(), ee = W(() => {
|
|
3288
|
+
const $ = { theme: z.getDefaultTheme(), ...t };
|
|
3289
|
+
return o ?? new $n($);
|
|
3290
|
+
}, [o]), me = Se(null), [Le, Fe] = U(!1), Be = Se(null), Ye = W(() => e(A, { className: "sheetxl-viewport", sx: { width: "100%", height: "100%", boxSizing: "border-box", position: "absolute", pointerEvents: "none !important", "& > :first-of-type": { position: "relative" } }, ref: Be }), []), [ve, je] = U(!1), [H, oe] = U(!1), Te = G(() => {
|
|
3289
3291
|
je(!0);
|
|
3290
3292
|
}, []), ge = Se(null), fe = zt(i, () => ({ isWorkbookElement: () => !0, getWorkbook: () => ee, getSheetElement: () => me.current, getViewportElement: () => Be.current, getFormulaBarElement: () => ge.current, focus() {
|
|
3291
3293
|
me && me.current && me.current.focus();
|
|
@@ -3309,30 +3311,30 @@ const Au = (r) => e(wl, { ...r }), Bu = (r) => e(yl, { ...r }), Lu = (r) => e(Yi
|
|
|
3309
3311
|
me.current.getSheet() !== de && Ee(!1), Ee(!0);
|
|
3310
3312
|
}) : Ee(!0);
|
|
3311
3313
|
}) }, Vu);
|
|
3312
|
-
const [fn,
|
|
3314
|
+
const [fn, Cr] = ar(($) => $ + 1, 0), jt = ee?.getView();
|
|
3313
3315
|
_e(jt, { onViewChange: ($) => {
|
|
3314
|
-
|
|
3316
|
+
Cr();
|
|
3315
3317
|
} });
|
|
3316
|
-
const ro = q ?? X, Ke =
|
|
3318
|
+
const ro = q ?? X, Ke = W(() => $a(X, ro), [X, ro]), kr = _ ?? X, Wl = W(() => $a(X, kr), [X, kr]), [Tr, jl] = U(null);
|
|
3317
3319
|
G(() => {
|
|
3318
3320
|
me.current.focus();
|
|
3319
3321
|
}, []);
|
|
3320
|
-
const [bn,
|
|
3321
|
-
bn ?
|
|
3322
|
-
} }), xn = Se(null), [
|
|
3323
|
-
|
|
3322
|
+
const [bn, Er] = U(!1), Dr = Se(null), Ie = Pu({ workbook: ee, workbookElement: fe.current, target: () => me.current, notifier: c, commands: y, darkMode: Ke.body.darkMode, onNewWorkbook: n, onShowSidebar: () => {
|
|
3323
|
+
bn ? Dr.current?.focus() : Er(!0);
|
|
3324
|
+
} }), xn = Se(null), [Pr, Rr] = U(!1), [$l, Mr] = U(null), [Vl, _l] = U(co.Top), [Bo, Ul] = U(fs.EmptyBounds), yn = () => {
|
|
3325
|
+
Rr(!1), Mr(null);
|
|
3324
3326
|
}, ao = ($, de, Ee = co.Top) => {
|
|
3325
|
-
Ul($), _l(Ee),
|
|
3326
|
-
}, [Tm,
|
|
3327
|
+
Ul($), _l(Ee), Mr(de), xn.current !== null && xn.current.update(), Rr(!0);
|
|
3328
|
+
}, [Tm, Ir] = U("sheet"), Ct = w ?? jt?.isShowTabs(), kt = K ?? jt?.isShowHorizontalScrollbar(), Gl = x ?? jt?.isShowFormulaBar(), Lo = k ?? jt?.isShowStatusBar(), Nr = Q ?? jt?.isShowVerticalScrollbar(), $t = Ke?.header?.edgeStrokeFill || "rgb(171,171,171)", ql = W(() => Lo ? R({ sheet: ye, gridStyle: Ke, ...T }) : null, [R, T, Lo, Ke, ye]), Xl = W(() => B({ commands: Ie, workbook: fe.current, ...N }), [Ie, B, N, X]), [Kl, { width: Fr }] = Io(), Xe = Fr === 0 || Fr > 560, wn = W(() => {
|
|
3327
3329
|
if (!Ct) return null;
|
|
3328
|
-
let $ = v({ background: Ke.body.fill, borderWidth: 1, borderColor: $t, gridTheme: ro, gridStyle: Ke, onBeforeUserChange: ce, onUserChange: Me, workbook: ee, commands:
|
|
3330
|
+
let $ = v({ background: Ke.body.fill, borderWidth: 1, borderColor: $t, gridTheme: ro, gridStyle: Ke, onBeforeUserChange: ce, onUserChange: Me, workbook: ee, commands: Ie, sheetTabProps: {}, notifier: c, ...C });
|
|
3329
3331
|
return Xe || ($ = e("div", { style: { flex: "none", display: "flex" }, children: $ })), $;
|
|
3330
|
-
}, [v, C, c, X, ee, ro, Xe,
|
|
3332
|
+
}, [v, C, c, X, ee, ro, Xe, Ie, Ct]), Or = G(($) => {
|
|
3331
3333
|
const de = Ze.getOS() === Ze.OSType.Firefox;
|
|
3332
3334
|
let Ee = null, Ue = null, $e = null;
|
|
3333
|
-
if (kt && (Ue = e("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${$t} 1px`, maxWidth: "100%" }, children: e(
|
|
3335
|
+
if (kt && (Ue = e("div", { style: { display: "flex", flex: "1 1 100%", borderTop: `solid ${$t} 1px`, maxWidth: "100%" }, children: e(ha, { style: { alignItems: "center", borderTop: (de ? 6 : 3) + "px solid transparent", borderBottom: (Xe ? 6 : 3) + "px solid transparent", borderLeft: (de ? 3 : 0) + "px solid transparent", borderRight: (de ? 3 : 0) + "px solid transparent" }, ...$, endGap: 700, sheet: ye, showCustomScrollButtons: !de, onShowTooltip: (Ve) => {
|
|
3334
3336
|
ao({ x: Ve.anchor.x, y: Ve.anchor.y, width: 0, height: 0 }, Ve.display, Ve.placement);
|
|
3335
|
-
}, onCloseTooltip: () => yn() }) })), Ct && Xe && ($e = wn), Ct && Xe && !kt && ($e =
|
|
3337
|
+
}, onCloseTooltip: () => yn() }) })), Ct && Xe && ($e = wn), Ct && Xe && !kt && ($e = j(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: [$e, e(A, { sx: { borderTop: `solid ${$t} 1px`, flex: "1" } })] })), $e && kt) Ee = e(Xn, { position: ee.getView().getTabRatio() / 10 + "%", onPositionChange: ({ percent: Ve }) => {
|
|
3336
3338
|
ee.getView().setTabRatio(Math.round(10 * Ve));
|
|
3337
3339
|
}, 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='${X.palette.text.icon ?? X.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 ${$t} 1px`, borderBottom: "solid 3px transparent" } }, elementBefore: $e, elementAfter: Ue });
|
|
3338
3340
|
else if (kt) Ee = Ue;
|
|
@@ -3341,54 +3343,54 @@ const Au = (r) => e(wl, { ...r }), Bu = (r) => e(yl, { ...r }), Lu = (r) => e(Yi
|
|
|
3341
3343
|
Ee = $e;
|
|
3342
3344
|
}
|
|
3343
3345
|
return e(A, { sx: { display: "flex", flex: "1", position: "relative", alignContent: "center" }, children: Ee });
|
|
3344
|
-
}, [ye, ce, ee, Ke, ro,
|
|
3346
|
+
}, [ye, ce, ee, Ke, ro, Ie, Ct, kt, Lo, Xe]), [tt, io] = ae.useState(null), Yl = W(() => ({ placement: "right-start", ...tt?.popperProps }), [tt?.popperProps]), { reference: Ar, component: Zl } = oo({ label: "contextMenu", popperProps: Yl, anchor: tt?.anchor ?? { getBoundingClientRect: () => new DOMRect(tt?.clientX || 0, tt?.clientY || 0) }, onClose: () => io(null), createPopupPanel: tt?.createPopupPanel });
|
|
3345
3347
|
ue(() => {
|
|
3346
|
-
tt ?
|
|
3348
|
+
tt ? Ar.open(0) : Ar.close(0);
|
|
3347
3349
|
}, [tt]);
|
|
3348
3350
|
const Jl = te(($, de) => {
|
|
3349
3351
|
if ($?.isDefaultPrevented()) return !0;
|
|
3350
3352
|
$.preventDefault(), tt && tt.anchor === $.currentTarget ? io(null) : io({ anchor: $.currentTarget, popperProps: { offsets: [-4, 2] }, createPopupPanel: (Ee) => {
|
|
3351
3353
|
const { floatReference: Ue } = Ee;
|
|
3352
|
-
return M({ filter: de, commands:
|
|
3354
|
+
return M({ filter: de, commands: Ie, floatReference: Ue, sx: { ...P } });
|
|
3353
3355
|
} });
|
|
3354
|
-
}, [M, P,
|
|
3356
|
+
}, [M, P, Ie, ee, tt]), Br = te(($) => {
|
|
3355
3357
|
if ($.originalEvent?.isDefaultPrevented()) return !0;
|
|
3356
3358
|
$.originalEvent?.preventDefault(), io({ clientX: $.clientX, clientY: $.clientY, createPopupPanel: (de) => {
|
|
3357
3359
|
const { floatReference: Ee } = de;
|
|
3358
|
-
return S({ commands:
|
|
3360
|
+
return S({ commands: Ie, workbook: ee, floatReference: Ee, sx: { ...P } });
|
|
3359
3361
|
} });
|
|
3360
|
-
}, [S, P,
|
|
3362
|
+
}, [S, P, Ie, ee]), Ql = te(($, de) => {
|
|
3361
3363
|
if ($?.isDefaultPrevented()) return !0;
|
|
3362
3364
|
$.preventDefault(), io({ clientX: $.clientX, clientY: $.clientY, createPopupPanel: (Ee) => {
|
|
3363
3365
|
const { floatReference: Ue } = Ee;
|
|
3364
|
-
return L({ movable: de, commands:
|
|
3366
|
+
return L({ movable: de, commands: Ie, floatReference: Ue, sx: { ...P } });
|
|
3365
3367
|
} });
|
|
3366
|
-
}, [L, P,
|
|
3367
|
-
|
|
3368
|
+
}, [L, P, Ie]);
|
|
3369
|
+
W(() => {
|
|
3368
3370
|
const $ = [new Ge("openContextMenu", () => me.current, { label: "Context Menu", description: "Open the context menu.", shortcut: [{ key: "F10", modifiers: [ke.Shift] }, { key: "ContextMenu" }] })];
|
|
3369
|
-
|
|
3370
|
-
}, [
|
|
3371
|
-
|
|
3371
|
+
Ie.addCommands($, !0);
|
|
3372
|
+
}, [Ie]), ue(() => {
|
|
3373
|
+
Ie.getCommand("openContextMenu").updateCallback(() => {
|
|
3372
3374
|
const $ = ye.getSelection().getCoords().cell;
|
|
3373
3375
|
me.current?.getGridElement()?.scrollCellCoordsIntoView($).then((de) => {
|
|
3374
3376
|
requestAnimationFrame(() => {
|
|
3375
3377
|
const Ee = ye.getView().getZoomScale() / 100, Ue = ye.getColumnHeaders().findOffset($.colIndex + 1) * Ee, $e = ye.getRowHeaders().findOffset($.rowIndex + 1) * Ee, Ve = me.current?.getGridElement()?.getRelativePointFromClient(0, 0) || { x: 0, y: 0 };
|
|
3376
|
-
|
|
3378
|
+
Br({ clientX: Ue - Ve.x - de.left + 6, clientY: $e - Ve.y - de.top + 6 });
|
|
3377
3379
|
});
|
|
3378
3380
|
});
|
|
3379
3381
|
});
|
|
3380
3382
|
}, [ye]);
|
|
3381
3383
|
const es = te(($) => {
|
|
3382
|
-
|
|
3383
|
-
}, [
|
|
3384
|
+
Ie?.dispatchToFocusedCommand($);
|
|
3385
|
+
}, [Ie]), ts = te(() => {
|
|
3384
3386
|
Ha(fe.current);
|
|
3385
3387
|
}, [ee, fe.current]), os = G(() => {
|
|
3386
|
-
|
|
3388
|
+
Ir("sheet");
|
|
3387
3389
|
}, []), ns = G(() => {
|
|
3388
|
-
|
|
3390
|
+
Ir("formulaBar");
|
|
3389
3391
|
}, []), rs = te(($) => {
|
|
3390
3392
|
const de = Ze.getOS() === Ze.OSType.Firefox;
|
|
3391
|
-
return e(
|
|
3393
|
+
return e(ha, { style: { borderLeft: "3px solid transparent", borderRight: "0px solid transparent", borderTop: (de ? 3 : 0) + "px solid transparent", borderBottom: (de ? 3 : 0) + "px solid transparent", width: de ? "13px" : void 0 }, ...$, sheet: ye, endGap: 700, showCustomScrollButtons: !de, onShowTooltip: (Ee) => {
|
|
3392
3394
|
ao(Ee.anchor, Ee.display, co.Left);
|
|
3393
3395
|
}, onCloseTooltip: () => yn() });
|
|
3394
3396
|
}, [ye]);
|
|
@@ -3396,9 +3398,9 @@ const Au = (r) => e(wl, { ...r }), Bu = (r) => e(yl, { ...r }), Lu = (r) => e(Yi
|
|
|
3396
3398
|
g && me && me.current && me.current.focus();
|
|
3397
3399
|
}, []);
|
|
3398
3400
|
const [Ho, Sn] = ae.useState(null), vn = G(($) => {
|
|
3399
|
-
|
|
3400
|
-
}, [
|
|
3401
|
-
if (
|
|
3401
|
+
Ie?.getCommand("openWorkbook") && ($.type === "dragenter" || $.type === "dragover" ? $.dataTransfer?.types.includes("Files") ? $.dataTransfer.files[0]?.type?.startsWith("image/") || $.dataTransfer.items[0]?.type?.startsWith("image/") || $.dataTransfer.types.length === 1 && Sn("Drop to open") : ($.dataTransfer?.types.includes("text/html") || $.dataTransfer?.types.includes("text/plain"), $.dataTransfer.effectAllowed = "none", $.dataTransfer.dropEffect = "none") : $.type === "dragleave" && Sn(null), $.preventDefault());
|
|
3402
|
+
}, [Ie]), as = te(($) => {
|
|
3403
|
+
if (Ie?.getCommand("openWorkbook") && ($.preventDefault(), $.stopPropagation(), Sn(null), $.dataTransfer.files && $.dataTransfer.files.length > 0)) {
|
|
3402
3404
|
const de = $.dataTransfer.files[0];
|
|
3403
3405
|
if (!de) return;
|
|
3404
3406
|
if (de?.type?.startsWith("image/")) {
|
|
@@ -3406,10 +3408,10 @@ const Au = (r) => e(wl, { ...r }), Bu = (r) => e(yl, { ...r }), Lu = (r) => e(Yi
|
|
|
3406
3408
|
if (!Ee) return;
|
|
3407
3409
|
const Ue = Ee.getRelativePointFromClient($.clientX, $.clientY), $e = Ee.toAbsoluteBounds({ ...Ue, width: 0, height: 0 }), Ve = Ee.getCellCoordsFromClient($.clientX, $.clientY);
|
|
3408
3410
|
if (!Ve) return;
|
|
3409
|
-
|
|
3410
|
-
} else
|
|
3411
|
+
Ie?.getCommand("insertImageFromFile")?.execute({ file: de, options: { bounds: { x: $e.x, y: $e.y } }, goto: { range: { ...Ve } } });
|
|
3412
|
+
} else Ie?.getCommand("openWorkbook")?.execute(de);
|
|
3411
3413
|
}
|
|
3412
|
-
}, [
|
|
3414
|
+
}, [Ie, Ho]), is = W(() => Ho ? e(A, { sx: { position: "absolute", width: "100%", height: "100%", boxSizing: "border-box", pointerEvents: "none", display: "flex", justifyContent: "center", alignItems: "center", background: ($) => $.palette.divider, color: ($) => $.palette.primary.dark }, children: e(Oe, { variant: "h4", children: Ho }) }) : null, [Ho]), Lr = Se(null), ls = W(() => e(Qn, { in: !H, nodeRef: Lr, timeout: 500, classNames: "animating", unmountOnExit: !0, children: e(A, { style: { display: "flex", alignItems: "center", justifyContent: "center", left: "0px", top: "0px", width: "100%", height: "100%", pointerEvents: H ? "none" : a?.pointerEvents, position: "absolute", boxSizing: "border-box" }, children: O({ ref: Lr, transitionDelay: "0", transparentBackground: !1, sx: { opacity: H ? 0 : a?.opacity, pointerEvents: H ? "none" : a?.pointerEvents, position: "absolute", left: "0px", top: "0px", width: "100%", height: "100%", ...V } }) }) }), [H, O, V]), ss = W(() => f({ sx: { marginTop: ($) => $.spacing(0.25), marginLeft: ($) => $.spacing(1), marginRight: ($) => $.spacing(1) }, workbook: ee, sheetElement: me.current, gridStyle: Ke, onFocus: ns, ...b, NamedCollectionEditorProps: { restoreFocus: ($) => me.current.focus($), notifier: c, ...b?.NamedCollectionEditorProps, commandPopupButtonProps: { commands: Ie, ...b?.NamedCollectionEditorProps?.commandPopupButtonProps } } }, ge), [f, b, ee, Ke, Ie, H]), cs = G(($) => {
|
|
3413
3415
|
const { movable: de, ...Ee } = $, Ue = { movable: de, onContextMenuCapture: (Tt) => {
|
|
3414
3416
|
Ql(Tt, de);
|
|
3415
3417
|
}, ...Ee }, $e = de.getContent().getType();
|
|
@@ -3424,7 +3426,7 @@ const Au = (r) => e(wl, { ...r }), Bu = (r) => e(yl, { ...r }), Lu = (r) => e(Yi
|
|
|
3424
3426
|
Ve = e(gp, { ...Tt });
|
|
3425
3427
|
}
|
|
3426
3428
|
return e("div", { style: { position: "absolute", clipPath: "inset(0px)", display: "flex", alignItems: "stretch", justifyContent: "stretch", pointerEvents: "all" }, children: Ve }, de.getUUID());
|
|
3427
|
-
}, []),
|
|
3429
|
+
}, []), Hr = W(() => E({ style: An, onFocus: os, notifier: c, gridStyle: Ke, headersStyle: Wl, sheet: ye, commands: Ie, onSheetContextMenu: Br, onViewportChange: ($) => {
|
|
3428
3430
|
jl($);
|
|
3429
3431
|
}, showScrollbars: !1, viewportComponent: Ye, onRepeatCommandChange: u, onElementLoad: Te, onShowColumnTooltip: ($) => {
|
|
3430
3432
|
ao($.anchor, $.display, co.Top);
|
|
@@ -3432,26 +3434,26 @@ const Au = (r) => e(wl, { ...r }), Bu = (r) => e(yl, { ...r }), Lu = (r) => e(Yi
|
|
|
3432
3434
|
ao($.anchor, $.display, co.Right);
|
|
3433
3435
|
}, onShowTooltip: ($) => {
|
|
3434
3436
|
ao({ x: $.anchor.x, y: $.anchor.y, width: 0, height: 0 }, $.display, $.placement);
|
|
3435
|
-
}, onCloseTooltip: () => yn(), renderMovable: cs, ...
|
|
3436
|
-
|
|
3437
|
-
}, ...
|
|
3437
|
+
}, onCloseTooltip: () => yn(), renderMovable: cs, ...I, cellRenderProps: { onFilterButtonMouseDown: ($, de) => {
|
|
3438
|
+
I?.cellRenderProps?.onFilterButtonMouseDown($, de), Jl($, de);
|
|
3439
|
+
}, ...I?.cellRenderProps } }, me), [E, Ie, I, ye, Ke, c, u]), Cn = W(() => {
|
|
3438
3440
|
if (!bn) return null;
|
|
3439
3441
|
const $ = !et.isStructureAllowed();
|
|
3440
3442
|
return e(dl, { sx: { marginBottom: (de) => de.spacing(0.5), border: (de) => `solid ${$ ? de.palette.action.disabled : he(de.palette.divider, 0.2)} 1px`, borderRadius: (de) => `${de.shape.borderRadius}px`, overflow: "hidden" }, onClose: () => {
|
|
3441
|
-
|
|
3443
|
+
Er(!1), requestAnimationFrame(() => {
|
|
3442
3444
|
me.current.focus();
|
|
3443
3445
|
});
|
|
3444
|
-
}, readOnly: $, commands:
|
|
3445
|
-
}, [bn,
|
|
3446
|
-
const $ = e(np, { style: { ...
|
|
3446
|
+
}, readOnly: $, commands: Ie, ref: Dr, scripts: ee.getScripts() });
|
|
3447
|
+
}, [bn, Ie, ee, c, et]), ds = W(() => {
|
|
3448
|
+
const $ = e(np, { style: { ...An, marginRight: Cn && Xe ? "0px" : "6px" }, viewport: Tr, touchElement: me.current?.getGridElement()?.stage, onScrollViewport: (Ve) => {
|
|
3447
3449
|
me.current?.getGridElement()?.scrollTo(Ve);
|
|
3448
|
-
}, showHorizontalScrollbar: kt || Ct, showVerticalScrollbar: Nr, createHorizontalScrollbar:
|
|
3450
|
+
}, showHorizontalScrollbar: kt || Ct, showVerticalScrollbar: Nr, createHorizontalScrollbar: Or, createVerticalScrollbar: rs, children: Hr });
|
|
3449
3451
|
let de = $;
|
|
3450
|
-
Xe || (de =
|
|
3452
|
+
Xe || (de = j(se, { children: [$, wn] }));
|
|
3451
3453
|
let Ee = null, Ue = 4, $e = 13;
|
|
3452
|
-
return Xe ? Ee = "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" : (Ee = "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", Ue = 13, $e = 4), e(
|
|
3453
|
-
}, [kt, Ct,
|
|
3454
|
-
return
|
|
3454
|
+
return Xe ? Ee = "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" : (Ee = "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", Ue = 13, $e = 4), e(Xn, { fixedPane: "after", position: "40%", minAfter: Xe ? "280px" : "120px", splitDirection: Xe ? "row" : "column", style: An, ref: Kl, resizerProps: { className: "styled-resizer", style: { minWidth: Xe ? "6px" : void 0, minHeight: Xe ? void 0 : "6px", maskImage: `url("data:image/svg+xml,%3Csvg width='${Ue}' height='${$e}' viewBox='0 0 ${Ue} ${$e}' version='1.1' fill='${X.palette.text.icon ?? X.palette.action.active}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='${Ee}' /%3E%3C/svg%3E%0A")`, maskRepeat: "no-repeat", maskPosition: Xe ? "left center" : "top center" } }, elementBefore: de, paneBeforeProps: { style: { flexDirection: "column" } }, elementAfter: Cn, paneAfterProps: { style: { marginLeft: Xe ? "0px" : "4px", marginRight: Xe ? "8px" : "4px" } } });
|
|
3455
|
+
}, [kt, Ct, Or, Nr, Tr, Cn, Hr, wn, X, Xe]), ps = W(() => ({ boxSizing: "border-box", background: ($) => $.palette.mode !== "dark" ? Ke.header.fill : $.palette.background.paper, "& *": { ...Id(X), fontWeight: 400 }, "&.Mui-focusVisible": {}, "& .viewport-overlay": { borderRight: `solid ${$t} 1px` }, ...a }), [a, Ke]);
|
|
3456
|
+
return j(Po, { className: Ae("sheetxl-workbook", Iu, { "Mui-focusVisible": Le }, Mu, m), sx: ps, style: s, square: !1, ...le, ref: fe, onFocus: ($) => {
|
|
3455
3457
|
Fe(!0), ts(), p?.($);
|
|
3456
3458
|
}, onBlur: ($) => {
|
|
3457
3459
|
Fe(!1), h?.($);
|
|
@@ -3462,12 +3464,12 @@ const Au = (r) => e(wl, { ...r }), Bu = (r) => e(yl, { ...r }), Lu = (r) => e(Yi
|
|
|
3462
3464
|
const de = new Image();
|
|
3463
3465
|
de.src = $.target.src, $.dataTransfer.setDragImage(de, 1, 1);
|
|
3464
3466
|
}
|
|
3465
|
-
}, onDragEnter: vn, onDragLeave: vn, onDragOver: vn, onDrop: as, children: [
|
|
3467
|
+
}, onDragEnter: vn, onDragLeave: vn, onDragOver: vn, onDrop: as, children: [j("div", { className: Ae(Li), style: { flex: "1 1 100%", width: "100%", display: "flex", flexDirection: "column", opacity: H ? void 0 : 0, "--sxl-app-color-high-contrast": X.palette.primary.main, "--sxl-app-color-primary": X.palette.primary.main, "--sxl-app-color-primary-dark": X.palette.primary.dark, "--sxl-app-color-primary-light": X.palette.primary.light, "--sxl-app-color-info": X.palette.info.main, "--sxl-app-color-info-dark": X.palette.info.dark, "--sxl-app-color-info-light": X.palette.info.light, "--sxl-app-color-secondary": X.palette.secondary.main, "--sxl-app-color-secondary-dark": X.palette.secondary.dark, "--sxl-app-color-secondary-light": X.palette.secondary.light, "--sxl-app-color-success": X.palette.success.main, "--sxl-app-color-success-dark": X.palette.success.dark, "--sxl-app-color-success-light": X.palette.success.light, "--sxl-app-color-warning": X.palette.warning.main, "--sxl-app-color-warning-dark": X.palette.warning.dark, "--sxl-app-color-warning-light": X.palette.warning.light, "--sxl-app-color-error": X.palette.error.main, "--sxl-app-color-error-dark": X.palette.error.dark, "--sxl-app-color-error-light": X.palette.error.light, "--sxl-app-color-text": X.palette.text.primary, "--sxl-app-color-text-secondary": X.palette.text.secondary, "--sxl-app-color-text-disabled": X.palette.text.disabled, "--sxl-app-color-background": X.palette.background.paper, "--sxl-app-color-button-surface": X.palette.grey[600], "--sxl-app-color-shadow": X.palette.action.focus, "--sxl-app-color-grey": X.palette.grey[500], "--sxl-app-filter-dark-invert": Ke.body.darkMode && ne ? "hue-rotate(180deg) invert(1) brightness(95%)" : "none", "--sxl-app-image-background": Ke.body.darkMode ? `linear-gradient(${he("#fff", De(5))}, ${he("#fff", De(5))})` : void 0 }, children: [Xl, Gl ? ss : null, e(A, { sx: { marginBottom: ($) => $.spacing(0.75) } }), ds, ql, e(At, { arrow: !0, disableInteractive: !0, open: Pr, title: e(Oe, { variant: "subtitle2", component: "div", children: $l }), placement: Vl, TransitionProps: { timeout: { exit: 0 } }, PopperProps: { popperRef: xn, sx: { "& .MuiTooltip-tooltip": { padding: "2px 6px", "& .MuiTooltip-arrow": { display: Pr ? "visible" : "none" } } }, anchorEl: { getBoundingClientRect: () => new DOMRect(Bo.x, Bo.y, Bo.width, Bo.height) }, modifiers: [{ name: "offset", options: { offset: [0, 0] } }] }, children: e(A, {}) }), Zl, is] }), ls] });
|
|
3466
3468
|
}));
|
|
3467
3469
|
Sl.displayName = "WorkbookElement";
|
|
3468
3470
|
const _u = (r = !1, i = !1) => i ? null : { "& input:not(:focus):not(:hover)": { color: (o) => o.palette.text.secondary }, backgroundColor: (o) => he(o.palette.background.paper, 0.6), borderRadius: (o) => `${o.shape.borderRadius}px`, border: (o) => `solid ${r ? o.palette.divider : "transparent"} 1px`, "&.Mui-disabled": { border: (o) => `solid ${r ? o.palette.divider : "transparent"} 1px` }, "&:focus-within:not([disabled])": { backgroundColor: (o) => o.palette.background.paper }, "&:hover:not([disabled])": { border: (o) => `solid ${r ? o.palette.text?.primary : o.palette.divider} 1px`, backgroundColor: null }, "&.Mui-focusVisible": { outline: (o) => `solid ${o.palette.primary.main} 1px !important`, border: (o) => `1px solid ${o.palette?.primary?.main} !important` } }, vl = Y(J((r, i) => {
|
|
3469
|
-
const { sx: o, workbook: t, title: n = "", placeHolder: l = "Untitled", onTitleChange: c, readOnly: g = !1, hidden: a, ...s } = r, [m, p] = U(!1), [h, d] = U(!1), [u, y] = U(n ?? ""), [x, b] = U(""), [f, { width: w }] =
|
|
3470
|
-
|
|
3471
|
+
const { sx: o, workbook: t, title: n = "", placeHolder: l = "Untitled", onTitleChange: c, readOnly: g = !1, hidden: a, ...s } = r, [m, p] = U(!1), [h, d] = U(!1), [u, y] = U(n ?? ""), [x, b] = U(""), [f, { width: w }] = Io(), [C, { width: v }] = Io(), [k, T] = U(!1), R = Se(null), N = Se(null), B = zt(i, () => ({ requestWorkbookTitle: (P = null, S) => {
|
|
3472
|
+
N.current = { onAccept: P, requestReason: S?.requestReason }, S?.selectAll && R.current?.select(), R.current?.focus(S);
|
|
3471
3473
|
}, focus: (P) => {
|
|
3472
3474
|
R.current?.focus(P);
|
|
3473
3475
|
} }), []);
|
|
@@ -3479,34 +3481,34 @@ const _u = (r = !1, i = !1) => i ? null : { "& input:not(:focus):not(:hover)": {
|
|
|
3479
3481
|
}, 300)();
|
|
3480
3482
|
}, [k, w]), ue(() => {
|
|
3481
3483
|
d(u && !Yt.isValidWindowsFilename(u));
|
|
3482
|
-
}, [u]), a ? null : e(A, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: k ? "0" : "1", transition: k ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Fo([B, C, i]), ...s, children: e(rt, { label:
|
|
3484
|
+
}, [u]), a ? null : e(A, { sx: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", opacity: k ? "0" : "1", transition: k ? void 0 : "opacity .25s ease-in", "& .tooltip-wrapper": { maxWidth: "100%" } }, ref: Fo([B, C, i]), ...s, children: e(rt, { label: N.current?.requestReason ?? "Workbook Name", children: j(A, { className: Ae({ "Mui-focusVisible": m }), sx: { visibility: w === 0 ? "hidden" : "visible", display: "block", maxWidth: "100%", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", paddingLeft: "12px", paddingRight: "12px", marginLeft: "2px", marginRight: "2px", paddingTop: "2px", paddingBottom: "1px", ..._u(!0, g), ...o }, children: [g ? e(Oe, { variant: "subtitle1", component: "div", sx: { whiteSpace: "nowrap", fontStyle: u !== x ? "italic" : void 0, userSelect: "none", textOverflow: "ellipsis", lineHeight: "1.4375em", border: "transparent 1px solid", color: (P) => h ? P.palette.error.dark : void 0 }, children: n ?? l }) : e(lr, { sx: { width: `${Math.min(w + 3, Math.max(v, B.current?.getBoundingClientRect()?.width))}px`, overflow: "hidden", whiteSpace: "nowrap", fontWeight: "600", maxWidth: "100%", border: "none", padding: "0px", margin: "0px", color: (P) => h ? P.palette.error.dark : void 0, fontStyle: u !== x ? "italic" : void 0, "& input": { paddingTop: "0px", paddingBottom: "0px", textOverflow: "ellipsis" } }, disableUnderline: !0, fullWidth: !1, multiline: !1, readOnly: g, spellCheck: !1, placeholder: l, onFocus: (P) => {
|
|
3483
3485
|
p(!0), P.target?.select();
|
|
3484
3486
|
}, inputProps: { name: "input-workbook-title", autoComplete: "off", ref: R }, onBlur: () => {
|
|
3485
|
-
p(!1), h ? y(x) : (u !== x && (c?.(u), u &&
|
|
3487
|
+
p(!1), h ? y(x) : (u !== x && (c?.(u), u && N.current?.onAccept?.(u, "blur")), N.current = null);
|
|
3486
3488
|
}, onChange: (P) => {
|
|
3487
3489
|
if (P.target.value.length > Yt.MAX_WORKBOOK_NAME_SIZE) return P.stopPropagation(), void P.preventDefault();
|
|
3488
3490
|
y(P.target.value);
|
|
3489
3491
|
}, onKeyDown: (P) => {
|
|
3490
|
-
(Yt.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(P.key) || P.target?.value.length > Yt.MAX_WORKBOOK_NAME_SIZE) && P.preventDefault(), P.which === be.Enter || P.which === be.Tab ? (h ? y(x) : (c?.(u), u && (
|
|
3492
|
+
(Yt.WINDOW_FILENAME_CHAR_RESERVED_REGEX.test(P.key) || P.target?.value.length > Yt.MAX_WORKBOOK_NAME_SIZE) && P.preventDefault(), P.which === be.Enter || P.which === be.Tab ? (h ? y(x) : (c?.(u), u && (N.current?.onAccept?.(u, "keydown"), N.current = null)), P.stopPropagation(), P.preventDefault(), t?.focus()) : P.which === be.Escape && (u === x ? t?.focus() : (y(x), setTimeout(() => {
|
|
3491
3493
|
P.target?.select();
|
|
3492
|
-
}, 0)),
|
|
3494
|
+
}, 0)), N.current = null, P.stopPropagation(), P.preventDefault());
|
|
3493
3495
|
}, value: u }), e(A, { ref: f, sx: { position: "absolute", visibility: "hidden", top: "-9999px", fontWeight: "600 !important", whiteSpace: "pre", fontStyle: u !== x ? "italic" : void 0, fontFamily: (P) => P.typography.fontFamily, letterSpacing: "0.00938em" }, children: u || l })] }) }) });
|
|
3494
3496
|
}));
|
|
3495
3497
|
vl.displayName = "WorkbookTitle";
|
|
3496
3498
|
const Uu = Y(J((r, i) => {
|
|
3497
3499
|
const { sx: o, style: t, className: n, licenseKey: l, renderLoadingPanel: c, ...g } = r;
|
|
3498
3500
|
l && vo.setLicenseKey(l);
|
|
3499
|
-
const a =
|
|
3501
|
+
const a = W(() => {
|
|
3500
3502
|
const m = { transitionDelay: "160ms", transparentBackground: !0 };
|
|
3501
3503
|
return e(A, { sx: o, style: { width: "100%", height: "100%", position: "absolute", display: "flex", alignItems: "center", justifyContent: "center", ...t }, children: c?.(m) ?? e(Lt, { ...m }) });
|
|
3502
|
-
}, [o, t, c]), s =
|
|
3504
|
+
}, [o, t, c]), s = W(() => ae.lazy(async () => await Promise.resolve().then(() => km)), []);
|
|
3503
3505
|
return e(se, { children: e(ci, { fallback: a, children: e(s, { ...g, className: n, renderLoadingPanel: c, sx: o, style: t, ref: i }) }) });
|
|
3504
3506
|
}));
|
|
3505
3507
|
Uu.displayName = "Studio";
|
|
3506
|
-
const Gu = ys(null),
|
|
3508
|
+
const Gu = ys(null), Bn = { didCatch: !1, error: null };
|
|
3507
3509
|
class qu extends di {
|
|
3508
3510
|
constructor(i) {
|
|
3509
|
-
super(i), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
3511
|
+
super(i), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Bn;
|
|
3510
3512
|
}
|
|
3511
3513
|
static getDerivedStateFromError(i) {
|
|
3512
3514
|
return { didCatch: !0, error: i };
|
|
@@ -3515,7 +3517,7 @@ class qu extends di {
|
|
|
3515
3517
|
const { error: i } = this.state;
|
|
3516
3518
|
if (i !== null) {
|
|
3517
3519
|
for (var o, t, n = arguments.length, l = new Array(n), c = 0; c < n; c++) l[c] = arguments[c];
|
|
3518
|
-
(o = (t = this.props).onReset) === null || o === void 0 || o.call(t, { args: l, reason: "imperative-api" }), this.setState(
|
|
3520
|
+
(o = (t = this.props).onReset) === null || o === void 0 || o.call(t, { args: l, reason: "imperative-api" }), this.setState(Bn);
|
|
3519
3521
|
}
|
|
3520
3522
|
}
|
|
3521
3523
|
componentDidCatch(i, o) {
|
|
@@ -3528,7 +3530,7 @@ class qu extends di {
|
|
|
3528
3530
|
t && o.error !== null && (function() {
|
|
3529
3531
|
let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
3530
3532
|
return g.length !== a.length || g.some((s, m) => !Object.is(s, a[m]));
|
|
3531
|
-
})(i.resetKeys, n) && ((l = (c = this.props).onReset) === null || l === void 0 || l.call(c, { next: n, prev: i.resetKeys, reason: "keys" }), this.setState(
|
|
3533
|
+
})(i.resetKeys, n) && ((l = (c = this.props).onReset) === null || l === void 0 || l.call(c, { next: n, prev: i.resetKeys, reason: "keys" }), this.setState(Bn));
|
|
3532
3534
|
}
|
|
3533
3535
|
render() {
|
|
3534
3536
|
const { children: i, fallbackRender: o, FallbackComponent: t, fallback: n } = this.props, { didCatch: l, error: c } = this.state;
|
|
@@ -3536,13 +3538,13 @@ class qu extends di {
|
|
|
3536
3538
|
if (l) {
|
|
3537
3539
|
const a = { error: c, resetErrorBoundary: this.resetErrorBoundary };
|
|
3538
3540
|
if (typeof o == "function") g = o(a);
|
|
3539
|
-
else if (t) g =
|
|
3541
|
+
else if (t) g = Pe(t, a);
|
|
3540
3542
|
else {
|
|
3541
3543
|
if (n === void 0) throw c;
|
|
3542
3544
|
g = n;
|
|
3543
3545
|
}
|
|
3544
3546
|
}
|
|
3545
|
-
return
|
|
3547
|
+
return Pe(Gu.Provider, { value: { didCatch: l, error: c, resetErrorBoundary: this.resetErrorBoundary } }, g);
|
|
3546
3548
|
}
|
|
3547
3549
|
}
|
|
3548
3550
|
function Cl(r) {
|
|
@@ -3589,7 +3591,7 @@ let Xu = { data: "" }, Ku = (r) => typeof window == "object" ? ((r ? r.querySele
|
|
|
3589
3591
|
p ? s.data = s.data.replace(p, a) : s.data.indexOf(a) === -1 && (s.data = m ? a + s.data : s.data + a);
|
|
3590
3592
|
})(ut[c], i, t, g), c;
|
|
3591
3593
|
};
|
|
3592
|
-
function
|
|
3594
|
+
function er(r) {
|
|
3593
3595
|
let i = this || {}, o = r.call ? r(i.p) : r;
|
|
3594
3596
|
return Ju(o.unshift ? o.raw ? ((t, n, l) => t.reduce((c, g, a) => {
|
|
3595
3597
|
let s = n[a];
|
|
@@ -3608,14 +3610,14 @@ function Tl(r, i, o) {
|
|
|
3608
3610
|
}
|
|
3609
3611
|
})(r.prototype, i), r;
|
|
3610
3612
|
}
|
|
3611
|
-
function
|
|
3612
|
-
return
|
|
3613
|
+
function Ne() {
|
|
3614
|
+
return Ne = Object.assign || function(r) {
|
|
3613
3615
|
for (var i = 1; i < arguments.length; i++) {
|
|
3614
3616
|
var o = arguments[i];
|
|
3615
3617
|
for (var t in o) Object.prototype.hasOwnProperty.call(o, t) && (r[t] = o[t]);
|
|
3616
3618
|
}
|
|
3617
3619
|
return r;
|
|
3618
|
-
},
|
|
3620
|
+
}, Ne.apply(this, arguments);
|
|
3619
3621
|
}
|
|
3620
3622
|
function El(r, i) {
|
|
3621
3623
|
r.prototype = Object.create(i.prototype), r.prototype.constructor = r, r.__proto__ = i;
|
|
@@ -3630,16 +3632,16 @@ function Za(r) {
|
|
|
3630
3632
|
if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3631
3633
|
return r;
|
|
3632
3634
|
}
|
|
3633
|
-
|
|
3635
|
+
er.bind({ g: 1 }), er.bind({ k: 1 });
|
|
3634
3636
|
var Ja = function() {
|
|
3635
3637
|
return "";
|
|
3636
|
-
}, Dl = ae.createContext({ enqueueSnackbar: Ja, closeSnackbar: Ja }),
|
|
3638
|
+
}, Dl = ae.createContext({ enqueueSnackbar: Ja, closeSnackbar: Ja }), Ln = "@media (max-width:599.95px)", on = "@media (min-width:600px)", Qa = function(r) {
|
|
3637
3639
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
3638
|
-
},
|
|
3640
|
+
}, wr = function(r) {
|
|
3639
3641
|
return "" + Qa(r.vertical) + Qa(r.horizontal);
|
|
3640
3642
|
}, Xo = function(r) {
|
|
3641
3643
|
return !!r || r === 0;
|
|
3642
|
-
}, Ko = "unmounted", _t = "exited", Ut = "entering", xo = "entered", ei = "exiting",
|
|
3644
|
+
}, Ko = "unmounted", _t = "exited", Ut = "entering", xo = "entered", ei = "exiting", Sr = (function(r) {
|
|
3643
3645
|
function i(t) {
|
|
3644
3646
|
var n;
|
|
3645
3647
|
n = r.call(this, t) || this;
|
|
@@ -3719,8 +3721,8 @@ function Gt() {
|
|
|
3719
3721
|
function ti(r, i) {
|
|
3720
3722
|
typeof r == "function" ? r(i) : r && (r.current = i);
|
|
3721
3723
|
}
|
|
3722
|
-
function
|
|
3723
|
-
return
|
|
3724
|
+
function tr(r, i) {
|
|
3725
|
+
return W(function() {
|
|
3724
3726
|
return r == null && i == null ? null : function(o) {
|
|
3725
3727
|
ti(r, o), ti(i, o);
|
|
3726
3728
|
};
|
|
@@ -3730,7 +3732,7 @@ function ln(r) {
|
|
|
3730
3732
|
var i = r.timeout, o = r.style, t = o === void 0 ? {} : o, n = r.mode;
|
|
3731
3733
|
return { duration: typeof i == "object" ? i[n] || 0 : i, easing: t.transitionTimingFunction, delay: t.transitionDelay };
|
|
3732
3734
|
}
|
|
3733
|
-
|
|
3735
|
+
Sr.defaultProps = { in: !1, mountOnEnter: !1, unmountOnExit: !1, appear: !1, enter: !0, exit: !0, onEnter: Gt, onEntering: Gt, onEntered: Gt, onExit: Gt, onExiting: Gt, onExited: Gt };
|
|
3734
3736
|
var Qu = "cubic-bezier(0.4, 0, 0.2, 1)", em = "cubic-bezier(0.0, 0, 0.2, 1)", tm = "cubic-bezier(0.4, 0, 0.6, 1)", Pl = function(r) {
|
|
3735
3737
|
r.scrollTop = r.scrollTop;
|
|
3736
3738
|
}, oi = function(r) {
|
|
@@ -3779,7 +3781,7 @@ function Yo(r, i) {
|
|
|
3779
3781
|
}
|
|
3780
3782
|
}
|
|
3781
3783
|
var Ml = J(function(r, i) {
|
|
3782
|
-
var o = r.children, t = r.direction, n = t === void 0 ? "down" : t, l = r.in, c = r.style, g = r.timeout, a = g === void 0 ? 0 : g, s = r.onEnter, m = r.onEntered, p = r.onExit, h = r.onExited, d = Oo(r, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), u = Se(null), y =
|
|
3784
|
+
var o = r.children, t = r.direction, n = t === void 0 ? "down" : t, l = r.in, c = r.style, g = r.timeout, a = g === void 0 ? 0 : g, s = r.onEnter, m = r.onEntered, p = r.onExit, h = r.onExited, d = Oo(r, ["children", "direction", "in", "style", "timeout", "onEnter", "onEntered", "onExit", "onExited"]), u = Se(null), y = tr(o.ref, u), x = tr(y, i), b = G(function() {
|
|
3783
3785
|
u.current && Yo(n, u.current);
|
|
3784
3786
|
}, [n]);
|
|
3785
3787
|
return ue(function() {
|
|
@@ -3787,7 +3789,7 @@ var Ml = J(function(r, i) {
|
|
|
3787
3789
|
var f = (function(C, v) {
|
|
3788
3790
|
var k;
|
|
3789
3791
|
function T() {
|
|
3790
|
-
for (var R = this,
|
|
3792
|
+
for (var R = this, N = arguments.length, B = new Array(N), P = 0; P < N; P++) B[P] = arguments[P];
|
|
3791
3793
|
clearTimeout(k), k = setTimeout(function() {
|
|
3792
3794
|
C.apply(R, B);
|
|
3793
3795
|
}, v);
|
|
@@ -3804,18 +3806,18 @@ var Ml = J(function(r, i) {
|
|
|
3804
3806
|
}
|
|
3805
3807
|
}, [n, l]), ue(function() {
|
|
3806
3808
|
l || b();
|
|
3807
|
-
}, [l, b]),
|
|
3809
|
+
}, [l, b]), Pe(Sr, Object.assign({ appear: !0, nodeRef: u, onEnter: function(f, w) {
|
|
3808
3810
|
Yo(n, f), Pl(f), s && s(f, w);
|
|
3809
3811
|
}, onEntered: m, onEntering: function(f) {
|
|
3810
|
-
var w = c?.transitionTimingFunction || em, C = ln({ timeout: a, mode: "enter", style:
|
|
3812
|
+
var w = c?.transitionTimingFunction || em, C = ln({ timeout: a, mode: "enter", style: Ne({}, c, { transitionTimingFunction: w }) });
|
|
3811
3813
|
f.style.webkitTransition = Zt("-webkit-transform", C), f.style.transition = Zt("transform", C), f.style.webkitTransform = "none", f.style.transform = "none";
|
|
3812
3814
|
}, onExit: function(f) {
|
|
3813
|
-
var w = c?.transitionTimingFunction || tm, C = ln({ timeout: a, mode: "exit", style:
|
|
3815
|
+
var w = c?.transitionTimingFunction || tm, C = ln({ timeout: a, mode: "exit", style: Ne({}, c, { transitionTimingFunction: w }) });
|
|
3814
3816
|
f.style.webkitTransition = Zt("-webkit-transform", C), f.style.transition = Zt("transform", C), Yo(n, f), p && p(f);
|
|
3815
3817
|
}, onExited: function(f) {
|
|
3816
3818
|
f.style.webkitTransition = "", f.style.transition = "", h && h(f);
|
|
3817
3819
|
}, in: l, timeout: a }, d), function(f, w) {
|
|
3818
|
-
return Ss(o,
|
|
3820
|
+
return Ss(o, Ne({ ref: x, style: Ne({ visibility: f !== "exited" || l ? void 0 : "hidden" }, c, {}, o.props.style) }, w));
|
|
3819
3821
|
});
|
|
3820
3822
|
});
|
|
3821
3823
|
Ml.displayName = "Slide";
|
|
@@ -3833,35 +3835,35 @@ var hn = function(r) {
|
|
|
3833
3835
|
}, am = function() {
|
|
3834
3836
|
return ae.createElement(hn, null, ae.createElement("path", { d: `M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
|
|
3835
3837
|
0 22,12A10,10 0 0,0 12,2Z` }));
|
|
3836
|
-
},
|
|
3838
|
+
}, Nt = { maxSnack: 3, persist: !1, hideIconVariant: !1, disableWindowBlurListener: !1, variant: "default", autoHideDuration: 5e3, iconVariant: { default: void 0, success: ae.createElement(om, null), warning: ae.createElement(nm, null), error: ae.createElement(rm, null), info: ae.createElement(am, null) }, anchorOrigin: { vertical: "bottom", horizontal: "left" }, TransitionComponent: Ml, transitionDuration: { enter: 225, exit: 195 } }, im = function(r, i) {
|
|
3837
3839
|
return function(o, t) {
|
|
3838
|
-
return t === void 0 && (t = !1), t ?
|
|
3840
|
+
return t === void 0 && (t = !1), t ? Ne({}, Nt[o], {}, i[o], {}, r[o]) : o === "autoHideDuration" ? (n = r.autoHideDuration, l = i.autoHideDuration, (c = function(g) {
|
|
3839
3841
|
return typeof g == "number" || g === null;
|
|
3840
|
-
})(n) ? n : c(l) ? l :
|
|
3842
|
+
})(n) ? n : c(l) ? l : Nt.autoHideDuration) : o === "transitionDuration" ? (function(g, a) {
|
|
3841
3843
|
var s = function(m, p) {
|
|
3842
3844
|
return p.some(function(h) {
|
|
3843
3845
|
return typeof m === h;
|
|
3844
3846
|
});
|
|
3845
3847
|
};
|
|
3846
|
-
return s(g, ["string", "number"]) ? g : s(g, ["object"]) ?
|
|
3847
|
-
})(r.transitionDuration, i.transitionDuration) : r[o] || i[o] ||
|
|
3848
|
+
return s(g, ["string", "number"]) ? g : s(g, ["object"]) ? Ne({}, Nt.transitionDuration, {}, s(a, ["object"]) && a, {}, g) : s(a, ["string", "number"]) ? a : s(a, ["object"]) ? Ne({}, Nt.transitionDuration, {}, a) : Nt.transitionDuration;
|
|
3849
|
+
})(r.transitionDuration, i.transitionDuration) : r[o] || i[o] || Nt[o];
|
|
3848
3850
|
var n, l, c;
|
|
3849
3851
|
};
|
|
3850
3852
|
};
|
|
3851
3853
|
function Ao(r) {
|
|
3852
3854
|
return Object.entries(r).reduce(function(i, o) {
|
|
3853
3855
|
var t, n = o[0], l = o[1];
|
|
3854
|
-
return
|
|
3856
|
+
return Ne({}, i, ((t = {})[n] = er(l), t));
|
|
3855
3857
|
}, {});
|
|
3856
3858
|
}
|
|
3857
|
-
var lm = "notistack-SnackbarContainer", sm = "notistack-Snackbar",
|
|
3859
|
+
var lm = "notistack-SnackbarContainer", sm = "notistack-Snackbar", Il = "notistack-CollapseWrapper", cm = "notistack-MuiContent", dm = function(r) {
|
|
3858
3860
|
return "notistack-MuiContent-" + r;
|
|
3859
|
-
}, ni = Ao({ root: { height: 0 }, entered: { height: "auto" } }),
|
|
3860
|
-
var o = r.children, t = r.in, n = r.onExited, l = Se(null), c = Se(null), g =
|
|
3861
|
+
}, ni = Ao({ root: { height: 0 }, entered: { height: "auto" } }), Hn = "0px", Nl = J(function(r, i) {
|
|
3862
|
+
var o = r.children, t = r.in, n = r.onExited, l = Se(null), c = Se(null), g = tr(i, c), a = function() {
|
|
3861
3863
|
return l.current ? l.current.clientHeight : 0;
|
|
3862
3864
|
};
|
|
3863
|
-
return
|
|
3864
|
-
s.style.height =
|
|
3865
|
+
return Pe(Sr, { in: t, unmountOnExit: !0, onEnter: function(s) {
|
|
3866
|
+
s.style.height = Hn;
|
|
3865
3867
|
}, onEntered: function(s) {
|
|
3866
3868
|
s.style.height = "auto";
|
|
3867
3869
|
}, onEntering: function(s) {
|
|
@@ -3872,14 +3874,14 @@ var lm = "notistack-SnackbarContainer", sm = "notistack-Snackbar", Nl = "notista
|
|
|
3872
3874
|
}, onExited: n, onExiting: function(s) {
|
|
3873
3875
|
Pl(s);
|
|
3874
3876
|
var m = ln({ timeout: 175, mode: "exit" }), p = m.duration, h = m.easing;
|
|
3875
|
-
s.style.transitionDuration = typeof p == "string" ? p : p + "ms", s.style.height =
|
|
3877
|
+
s.style.transitionDuration = typeof p == "string" ? p : p + "ms", s.style.height = Hn, s.style.transitionTimingFunction = h || "";
|
|
3876
3878
|
}, nodeRef: c, timeout: 175 }, function(s, m) {
|
|
3877
|
-
return
|
|
3879
|
+
return Pe("div", Object.assign({ ref: g, className: Wt(ni.root, s === "entered" && ni.entered), style: Ne({ pointerEvents: "all", overflow: "hidden", minHeight: Hn, transition: Zt("height") }, s === "entered" && { overflow: "visible" }, {}, s === "exited" && !t && { visibility: "hidden" }) }, m), Pe("div", { ref: l, className: Il, style: { display: "flex", width: "100%" } }, o));
|
|
3878
3880
|
});
|
|
3879
3881
|
});
|
|
3880
|
-
|
|
3882
|
+
Nl.displayName = "Collapse";
|
|
3881
3883
|
var ri = { right: "left", left: "right", bottom: "up", top: "down" }, pm = function(r) {
|
|
3882
|
-
return "anchorOrigin" +
|
|
3884
|
+
return "anchorOrigin" + wr(r);
|
|
3883
3885
|
}, um = function() {
|
|
3884
3886
|
};
|
|
3885
3887
|
function Do(r, i) {
|
|
@@ -3900,7 +3902,7 @@ function ai(r) {
|
|
|
3900
3902
|
return i.current.apply(void 0, arguments);
|
|
3901
3903
|
}, []);
|
|
3902
3904
|
}
|
|
3903
|
-
var
|
|
3905
|
+
var zn, Fl = J(function(r, i) {
|
|
3904
3906
|
var o = r.children, t = r.className, n = r.autoHideDuration, l = r.disableWindowBlurListener, c = l !== void 0 && l, g = r.onClose, a = r.id, s = r.open, m = r.SnackbarProps, p = m === void 0 ? {} : m, h = Se(), d = ai(function() {
|
|
3905
3907
|
g && g.apply(void 0, arguments);
|
|
3906
3908
|
}), u = ai(function(b) {
|
|
@@ -3922,24 +3924,24 @@ var Hn, Fl = J(function(r, i) {
|
|
|
3922
3924
|
if (!c && s) return window.addEventListener("focus", x), window.addEventListener("blur", y), function() {
|
|
3923
3925
|
window.removeEventListener("focus", x), window.removeEventListener("blur", y);
|
|
3924
3926
|
};
|
|
3925
|
-
}, [c, x, s]),
|
|
3927
|
+
}, [c, x, s]), Pe("div", Object.assign({ ref: i }, p, { className: Wt(sm, t), onMouseEnter: function(b) {
|
|
3926
3928
|
p.onMouseEnter && p.onMouseEnter(b), y();
|
|
3927
3929
|
}, onMouseLeave: function(b) {
|
|
3928
3930
|
p.onMouseLeave && p.onMouseLeave(b), x();
|
|
3929
3931
|
} }), o);
|
|
3930
3932
|
});
|
|
3931
3933
|
Fl.displayName = "Snackbar";
|
|
3932
|
-
var gm = Ao({ root: (
|
|
3934
|
+
var gm = Ao({ root: (zn = { display: "flex", flexWrap: "wrap", flexGrow: 1 }, zn[on] = { flexGrow: "initial", minWidth: "288px" }, zn) }), vr = J(function(r, i) {
|
|
3933
3935
|
var o = r.className, t = Oo(r, ["className"]);
|
|
3934
3936
|
return ae.createElement("div", Object.assign({ ref: i, className: Wt(gm.root, o) }, t));
|
|
3935
3937
|
});
|
|
3936
|
-
|
|
3938
|
+
vr.displayName = "SnackbarContent";
|
|
3937
3939
|
var yo = Ao({ root: { backgroundColor: "#313131", fontSize: "0.875rem", lineHeight: 1.43, letterSpacing: "0.01071em", color: "#fff", alignItems: "center", padding: "6px 16px", borderRadius: "4px", boxShadow: "0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)" }, lessPadding: { paddingLeft: "20px" }, default: { backgroundColor: "#313131" }, success: { backgroundColor: "#43a047" }, error: { backgroundColor: "#d32f2f" }, warning: { backgroundColor: "#ff9800" }, info: { backgroundColor: "#2196f3" }, message: { display: "flex", alignItems: "center", padding: "8px 0" }, action: { display: "flex", alignItems: "center", marginLeft: "auto", paddingLeft: "16px", marginRight: "-8px" } }), ii = "notistack-snackbar", Ol = J(function(r, i) {
|
|
3938
3940
|
var o = r.id, t = r.message, n = r.action, l = r.iconVariant, c = r.variant, g = r.hideIconVariant, a = r.style, s = r.className, m = l[c], p = n;
|
|
3939
|
-
return typeof p == "function" && (p = p(o)), ae.createElement(
|
|
3941
|
+
return typeof p == "function" && (p = p(o)), ae.createElement(vr, { ref: i, role: "alert", "aria-describedby": ii, style: a, className: Wt(cm, dm(c), yo.root, yo[c], s, !g && m && yo.lessPadding) }, ae.createElement("div", { id: ii, className: yo.message }, g ? null : m, t), p && ae.createElement("div", { className: yo.action }, p));
|
|
3940
3942
|
});
|
|
3941
3943
|
Ol.displayName = "MaterialDesignContent";
|
|
3942
|
-
var wo,
|
|
3944
|
+
var wo, Wn, Zo, Jo, jn, hm = Y(Ol), fm = Ao({ wrappedRoot: { width: "100%", position: "relative", transform: "translateX(0)", top: 0, right: 0, bottom: 0, left: 0, minWidth: "288px" } }), bm = function(r) {
|
|
3943
3945
|
var i = Se(), o = U(!0), t = o[0], n = o[1], l = Do([r.snack.onClose, r.onClose]), c = G(function() {
|
|
3944
3946
|
i.current = setTimeout(function() {
|
|
3945
3947
|
n(function(R) {
|
|
@@ -3952,37 +3954,37 @@ var wo, zn, Zo, Jo, Wn, hm = Y(Ol), fm = Ao({ wrappedRoot: { width: "100%", posi
|
|
|
3952
3954
|
i.current && clearTimeout(i.current);
|
|
3953
3955
|
};
|
|
3954
3956
|
}, []);
|
|
3955
|
-
var g, a = r.snack, s = r.classes, m = r.Component, p = m === void 0 ? hm : m, h =
|
|
3957
|
+
var g, a = r.snack, s = r.classes, m = r.Component, p = m === void 0 ? hm : m, h = W(function() {
|
|
3956
3958
|
return (function(R) {
|
|
3957
3959
|
R === void 0 && (R = {});
|
|
3958
|
-
var
|
|
3960
|
+
var N = { containerRoot: !0, containerAnchorOriginTopCenter: !0, containerAnchorOriginBottomCenter: !0, containerAnchorOriginTopRight: !0, containerAnchorOriginBottomRight: !0, containerAnchorOriginTopLeft: !0, containerAnchorOriginBottomLeft: !0 };
|
|
3959
3961
|
return Object.keys(R).filter(function(B) {
|
|
3960
|
-
return !
|
|
3962
|
+
return !N[B];
|
|
3961
3963
|
}).reduce(function(B, P) {
|
|
3962
3964
|
var S;
|
|
3963
|
-
return
|
|
3965
|
+
return Ne({}, B, ((S = {})[P] = R[P], S));
|
|
3964
3966
|
}, {});
|
|
3965
3967
|
})(s);
|
|
3966
|
-
}, [s]), d = a.open, u = a.SnackbarProps, y = a.TransitionComponent, x = a.TransitionProps, b = a.transitionDuration, f = a.disableWindowBlurListener, w = a.content, C = Oo(a, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), v =
|
|
3968
|
+
}, [s]), d = a.open, u = a.SnackbarProps, y = a.TransitionComponent, x = a.TransitionProps, b = a.transitionDuration, f = a.disableWindowBlurListener, w = a.content, C = Oo(a, ["open", "SnackbarProps", "TransitionComponent", "TransitionProps", "transitionDuration", "disableWindowBlurListener", "content", "entered", "requestClose", "onEnter", "onEntered", "onExit", "onExited"]), v = Ne({ direction: (g = C.anchorOrigin, g.horizontal !== "center" ? ri[g.horizontal] : ri[g.vertical]), timeout: b }, x), k = w;
|
|
3967
3969
|
typeof k == "function" && (k = k(C.id, C.message));
|
|
3968
|
-
var T = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(R,
|
|
3970
|
+
var T = ["onEnter", "onEntered", "onExit", "onExited"].reduce(function(R, N) {
|
|
3969
3971
|
var B;
|
|
3970
|
-
return
|
|
3972
|
+
return Ne({}, R, ((B = {})[N] = Do([r.snack[N], r[N]], C.id), B));
|
|
3971
3973
|
}, {});
|
|
3972
|
-
return ae.createElement(
|
|
3974
|
+
return ae.createElement(Nl, { in: t, onExited: T.onExited }, ae.createElement(Fl, { open: d, id: C.id, disableWindowBlurListener: f, autoHideDuration: C.autoHideDuration, className: Wt(fm.wrappedRoot, h.root, h[pm(C.anchorOrigin)]), SnackbarProps: u, onClose: l }, ae.createElement(y, Object.assign({}, v, { appear: !0, in: d, onExit: T.onExit, onExited: c, onEnter: T.onEnter, onEntered: Do([T.onEntered, function() {
|
|
3973
3975
|
r.snack.requestClose && l(null, "instructed", r.snack.id);
|
|
3974
3976
|
}], C.id) }), k || ae.createElement(p, Object.assign({}, C)))));
|
|
3975
|
-
}, So = { default: 20 }, Qo = { default: 6, dense: 2 }, li = "." +
|
|
3976
|
-
var i = r.classes, o = i === void 0 ? {} : i, t = r.anchorOrigin, n = r.dense, l = r.children, c = Wt(lm, en[t.vertical], en[t.horizontal], en.root, o.containerRoot, o["containerAnchorOrigin" +
|
|
3977
|
+
}, So = { default: 20 }, Qo = { default: 6, dense: 2 }, li = "." + Il, en = Ao({ root: (wo = { boxSizing: "border-box", display: "flex", maxHeight: "100%", position: "fixed", zIndex: 1400, height: "auto", width: "auto", transition: Zt(["top", "right", "bottom", "left", "max-width"], { duration: 300, easing: "ease" }), pointerEvents: "none" }, wo[li] = { padding: Qo.default + "px 0px", transition: "padding 300ms ease 0ms" }, wo.maxWidth = "calc(100% - " + 2 * So.default + "px)", wo[Ln] = { width: "100%", maxWidth: "calc(100% - 32px)" }, wo), rootDense: (Wn = {}, Wn[li] = { padding: Qo.dense + "px 0px" }, Wn), top: { top: So.default - Qo.default + "px", flexDirection: "column" }, bottom: { bottom: So.default - Qo.default + "px", flexDirection: "column-reverse" }, left: (Zo = { left: So.default + "px" }, Zo[on] = { alignItems: "flex-start" }, Zo[Ln] = { left: "16px" }, Zo), right: (Jo = { right: So.default + "px" }, Jo[on] = { alignItems: "flex-end" }, Jo[Ln] = { right: "16px" }, Jo), center: (jn = { left: "50%", transform: "translateX(-50%)" }, jn[on] = { alignItems: "center" }, jn) }), xm = Y(function(r) {
|
|
3978
|
+
var i = r.classes, o = i === void 0 ? {} : i, t = r.anchorOrigin, n = r.dense, l = r.children, c = Wt(lm, en[t.vertical], en[t.horizontal], en.root, o.containerRoot, o["containerAnchorOrigin" + wr(t)], n && en.rootDense);
|
|
3977
3979
|
return ae.createElement("div", { className: c }, l);
|
|
3978
3980
|
}), si = function(r) {
|
|
3979
|
-
return !(typeof r == "string" ||
|
|
3981
|
+
return !(typeof r == "string" || rr(r));
|
|
3980
3982
|
}, ym = (function(r) {
|
|
3981
3983
|
function i(o) {
|
|
3982
3984
|
var t;
|
|
3983
3985
|
return (t = r.call(this, o) || this).enqueueSnackbar = function(n, l) {
|
|
3984
3986
|
if (l === void 0 && (l = {}), n == null) throw new Error("enqueueSnackbar called with invalid argument");
|
|
3985
|
-
var c = si(n) ? n : l, g = si(n) ? n.message : n, a = c.key, s = c.preventDuplicate, m = Oo(c, ["key", "preventDuplicate"]), p = Xo(a), h = p ? a : (/* @__PURE__ */ new Date()).getTime() + Math.random(), d = im(m, t.props), u =
|
|
3987
|
+
var c = si(n) ? n : l, g = si(n) ? n.message : n, a = c.key, s = c.preventDuplicate, m = Oo(c, ["key", "preventDuplicate"]), p = Xo(a), h = p ? a : (/* @__PURE__ */ new Date()).getTime() + Math.random(), d = im(m, t.props), u = Ne({ id: h }, m, { message: g, open: !0, entered: !1, requestClose: !1, persist: d("persist"), action: d("action"), content: d("content"), variant: d("variant"), anchorOrigin: d("anchorOrigin"), disableWindowBlurListener: d("disableWindowBlurListener"), autoHideDuration: d("autoHideDuration"), hideIconVariant: d("hideIconVariant"), TransitionComponent: d("TransitionComponent"), transitionDuration: d("transitionDuration"), TransitionProps: d("TransitionProps", !0), iconVariant: d("iconVariant", !0), style: d("style", !0), SnackbarProps: d("SnackbarProps", !0), className: Wt(t.props.className, m.className) });
|
|
3986
3988
|
return u.persist && (u.autoHideDuration = void 0), t.setState(function(y) {
|
|
3987
3989
|
if (s === void 0 && t.props.preventDuplicate || s) {
|
|
3988
3990
|
var x = function(w) {
|
|
@@ -3990,13 +3992,13 @@ var wo, zn, Zo, Jo, Wn, hm = Y(Ol), fm = Ao({ wrappedRoot: { width: "100%", posi
|
|
|
3990
3992
|
}, b = y.queue.findIndex(x) > -1, f = y.snacks.findIndex(x) > -1;
|
|
3991
3993
|
if (b || f) return y;
|
|
3992
3994
|
}
|
|
3993
|
-
return t.handleDisplaySnack(
|
|
3995
|
+
return t.handleDisplaySnack(Ne({}, y, { queue: [].concat(y.queue, [u]) }));
|
|
3994
3996
|
}), h;
|
|
3995
3997
|
}, t.handleDisplaySnack = function(n) {
|
|
3996
3998
|
return n.snacks.length >= t.maxSnack ? t.handleDismissOldest(n) : t.processQueue(n);
|
|
3997
3999
|
}, t.processQueue = function(n) {
|
|
3998
4000
|
var l = n.queue, c = n.snacks;
|
|
3999
|
-
return l.length > 0 ?
|
|
4001
|
+
return l.length > 0 ? Ne({}, n, { snacks: [].concat(c, [l[0]]), queue: l.slice(1, l.length) }) : n;
|
|
4000
4002
|
}, t.handleDismissOldest = function(n) {
|
|
4001
4003
|
if (n.snacks.some(function(a) {
|
|
4002
4004
|
return !a.open || a.requestClose;
|
|
@@ -4006,14 +4008,14 @@ var wo, zn, Zo, Jo, Wn, hm = Y(Ol), fm = Ao({ wrappedRoot: { width: "100%", posi
|
|
|
4006
4008
|
return a + (s.open && s.persist ? 1 : 0);
|
|
4007
4009
|
}, 0) === t.maxSnack && (c = !0);
|
|
4008
4010
|
var g = n.snacks.map(function(a) {
|
|
4009
|
-
return l || a.persist && !c ?
|
|
4011
|
+
return l || a.persist && !c ? Ne({}, a) : (l = !0, a.entered ? (a.onClose && a.onClose(null, "maxsnack", a.id), t.props.onClose && t.props.onClose(null, "maxsnack", a.id), Ne({}, a, { open: !1 })) : Ne({}, a, { requestClose: !0 }));
|
|
4010
4012
|
});
|
|
4011
|
-
return
|
|
4013
|
+
return Ne({}, n, { snacks: g });
|
|
4012
4014
|
}, t.handleEnteredSnack = function(n, l, c) {
|
|
4013
4015
|
if (!Xo(c)) throw new Error("handleEnteredSnack Cannot be called with undefined key");
|
|
4014
4016
|
t.setState(function(g) {
|
|
4015
4017
|
return { snacks: g.snacks.map(function(a) {
|
|
4016
|
-
return a.id === c ?
|
|
4018
|
+
return a.id === c ? Ne({}, a, { entered: !0 }) : Ne({}, a);
|
|
4017
4019
|
}) };
|
|
4018
4020
|
});
|
|
4019
4021
|
}, t.handleCloseSnack = function(n, l, c) {
|
|
@@ -4022,7 +4024,7 @@ var wo, zn, Zo, Jo, Wn, hm = Y(Ol), fm = Ao({ wrappedRoot: { width: "100%", posi
|
|
|
4022
4024
|
t.setState(function(a) {
|
|
4023
4025
|
var s = a.snacks, m = a.queue;
|
|
4024
4026
|
return { snacks: s.map(function(p) {
|
|
4025
|
-
return g || p.id === c ? p.entered ?
|
|
4027
|
+
return g || p.id === c ? p.entered ? Ne({}, p, { open: !1 }) : Ne({}, p, { requestClose: !0 }) : Ne({}, p);
|
|
4026
4028
|
}), queue: m.filter(function(p) {
|
|
4027
4029
|
return p.id !== c;
|
|
4028
4030
|
}) };
|
|
@@ -4035,7 +4037,7 @@ var wo, zn, Zo, Jo, Wn, hm = Y(Ol), fm = Ao({ wrappedRoot: { width: "100%", posi
|
|
|
4035
4037
|
}, t.handleExitedSnack = function(n, l) {
|
|
4036
4038
|
if (!Xo(l)) throw new Error("handleExitedSnack Cannot be called with undefined key");
|
|
4037
4039
|
t.setState(function(c) {
|
|
4038
|
-
var g = t.processQueue(
|
|
4040
|
+
var g = t.processQueue(Ne({}, c, { snacks: c.snacks.filter(function(a) {
|
|
4039
4041
|
return a.id !== l;
|
|
4040
4042
|
}) }));
|
|
4041
4043
|
return g.queue.length === 0 ? g : t.handleDismissOldest(g);
|
|
@@ -4044,8 +4046,8 @@ var wo, zn, Zo, Jo, Wn, hm = Y(Ol), fm = Ao({ wrappedRoot: { width: "100%", posi
|
|
|
4044
4046
|
}
|
|
4045
4047
|
return El(i, r), i.prototype.render = function() {
|
|
4046
4048
|
var o = this, t = this.state.contextValue, n = this.props, l = n.domRoot, c = n.children, g = n.dense, a = g !== void 0 && g, s = n.Components, m = s === void 0 ? {} : s, p = n.classes, h = this.state.snacks.reduce(function(u, y) {
|
|
4047
|
-
var x, b =
|
|
4048
|
-
return
|
|
4049
|
+
var x, b = wr(y.anchorOrigin), f = u[b] || [];
|
|
4050
|
+
return Ne({}, u, ((x = {})[b] = [].concat(f, [y]), x));
|
|
4049
4051
|
}, {}), d = Object.keys(h).map(function(u) {
|
|
4050
4052
|
var y = h[u], x = y[0];
|
|
4051
4053
|
return ae.createElement(xm, { key: u, dense: a, anchorOrigin: x.anchorOrigin, classes: p }, y.map(function(b) {
|
|
@@ -4054,7 +4056,7 @@ var wo, zn, Zo, Jo, Wn, hm = Y(Ol), fm = Ao({ wrappedRoot: { width: "100%", posi
|
|
|
4054
4056
|
});
|
|
4055
4057
|
return ae.createElement(Dl.Provider, { value: t }, c, l ? fp(d, l) : d);
|
|
4056
4058
|
}, Tl(i, [{ key: "maxSnack", get: function() {
|
|
4057
|
-
return this.props.maxSnack ||
|
|
4059
|
+
return this.props.maxSnack || Nt.maxSnack;
|
|
4058
4060
|
} }]), i;
|
|
4059
4061
|
})(di), Al = function() {
|
|
4060
4062
|
return ws(Dl);
|
|
@@ -4109,19 +4111,19 @@ const Ot = new vm(), mt = { card: "_card_1a398_7", actionRoot: "_actionRoot_1a39
|
|
|
4109
4111
|
a(o);
|
|
4110
4112
|
}, [o, a]);
|
|
4111
4113
|
let u = l?.message;
|
|
4112
|
-
return !u &&
|
|
4114
|
+
return !u && rr(t) && (u = t), u || typeof t != "string" || (u = t), u || (u = `Unknown Error: ${t}`), e(vr, { ref: i, className: Ae(mt.root, "error-snackbar"), children: j(Ms, { className: mt.card, style: { backgroundColor: s.palette.error.dark, border: `1px solid ${s.palette.error.dark}` }, children: [j(Is, { className: mt.actionRoot, children: [c ? null : n?.error, e(Oe, { variant: "body2", component: "div", className: mt.typography, children: u }), e("div", { style: { flex: "1 1 auto" } }), j("div", { className: mt.icons, children: [l ? e(dt, { "aria-label": "Show more", size: "small", className: Ae(mt.expand, { [mt.expandOpen]: m }), onClick: h, children: e(Ci, {}) }) : null, e(dt, { size: "small", className: mt.expand, onClick: d, children: e(Ti, { fontSize: "small" }) })] })] }), l ? e(Ns, { in: m, timeout: "auto", unmountOnExit: !0, children: e("div", { className: mt.stackTraceContainer, style: { backgroundColor: s.palette.error.light, borderTop: `1px solid ${s.palette.error.main}` }, children: e(Nd, { error: l, hideLineNumbers: !0 }) }) }) : null] }) });
|
|
4113
4115
|
});
|
|
4114
4116
|
Bl.displayName = "ToastError";
|
|
4115
4117
|
const Ll = Y(J((r, i) => {
|
|
4116
4118
|
const { commands: o, commandHook: t, scope: n = "workbook", disabled: l = !1, ...c } = r, g = te((s) => {
|
|
4117
|
-
const m = { variant: ie.Menuitem, parentFloat: s.floatReference, commandHook: t, scope: n, disabled: l }, p =
|
|
4119
|
+
const m = { variant: ie.Menuitem, parentFloat: s.floatReference, commandHook: t, scope: n, disabled: l }, p = j(se, { children: [e(F, { ...m, command: o.getCommand("newWorkbook"), icon: D(e(Fd, {})) }), e(re, { orientation: "horizontal" }), e(F, { ...m, command: o.getCommand("openWorkbook"), icon: D(e(Od, {})) }), e(Re, { ...m, commands: o, quickCommand: "saveWorkbook", icon: D(e(Ld, {})), createPopupPanel: (h) => {
|
|
4118
4120
|
const d = { ...m, parentFloat: h.floatReference, scope: "saveWorkbook" }, u = [];
|
|
4119
4121
|
return Ot.getWriteFormats().forEach((y) => {
|
|
4120
4122
|
if (y.isDefault) return;
|
|
4121
4123
|
let x = null;
|
|
4122
4124
|
y.key === "CSV" ? x = D(e(Ad, {})) : y.key === "Excel" && (x = D(e(Bd, {})));
|
|
4123
4125
|
const b = o.getCommand(`saveWorkbookAs${y.key}`);
|
|
4124
|
-
b ? u.push(
|
|
4126
|
+
b ? u.push(Pe(F, { ...d, key: y.key, command: b, icon: x })) : console.warn(`Unable to resolve command: 'saveWorkbookAs${y.key}'`);
|
|
4125
4127
|
}), xe({ ...h, children: u, onClick: () => {
|
|
4126
4128
|
h.closeFloatAll();
|
|
4127
4129
|
} });
|
|
@@ -4136,14 +4138,14 @@ Ll.displayName = "StandaloneFileCommandButton";
|
|
|
4136
4138
|
const Cm = e(rt, { label: "SheetXL", description: "Visit me at sheetxl.com.", children: e(A, { sx: { width: "24px", height: "24px", marginBottom: "4px", marginLeft: "6px" }, children: e(hp, { onClick: () => {
|
|
4137
4139
|
window?.open("https://www.sheetxl.com", "_blank");
|
|
4138
4140
|
}, style: { width: "24px", height: "24px", cursor: "pointer" } }) }) }), Hl = Y(J((r, i) => {
|
|
4139
|
-
const { commands: o, workbook: t, logo: n = Cm, mainElement: l, showFileMenu: c = !0, showAppearanceMenu: g = !0, ...a } = r, { reference: s } = oo(), [m, { width: p }] =
|
|
4141
|
+
const { commands: o, workbook: t, logo: n = Cm, mainElement: l, showFileMenu: c = !0, showAppearanceMenu: g = !0, ...a } = r, { reference: s } = oo(), [m, { width: p }] = Io(), h = p < 530, d = c ? e(Ll, { commands: o, commandHook: { beforeExecute() {
|
|
4140
4142
|
s?.closeAll();
|
|
4141
4143
|
}, onError(b, f, w) {
|
|
4142
4144
|
} } }) : null, u = g ? e(nu, { commands: o, commandHook: { beforeExecute() {
|
|
4143
4145
|
s?.closeAll();
|
|
4144
4146
|
}, onError(b, f, w) {
|
|
4145
|
-
} } }) : null, y =
|
|
4146
|
-
return e(A, { ref: Fo([x, m, i]), ...a, children: fl({ commands: o, renderCompact: h, workbook: t, selectWrapper: (b) =>
|
|
4147
|
+
} } }) : null, y = W(() => ({ paddingLeft: (b) => b.spacing(1), paddingRight: (b) => b.spacing(1) }), []), x = Se(null);
|
|
4148
|
+
return e(A, { ref: Fo([x, m, i]), ...a, children: fl({ commands: o, renderCompact: h, workbook: t, selectWrapper: (b) => j(A, { sx: { display: "flex", flex: "1", flexDirection: "row", alignItems: "stretch", gap: (f) => f.spacing(1), paddingLeft: (f) => f.spacing(1), paddingRight: (f) => f.spacing(1) }, children: [j(A, { sx: { display: "flex", flexDirection: "row", alignItems: "center", flex: "1 1 100%", gap: (f) => f.spacing(0.5) }, children: [n, j(A, { sx: { display: "flex", flexDirection: "row", alignItems: "center", gap: (f) => f.spacing(0.25) }, children: [d, b] })] }), e(A, { sx: { display: "flex", flexDirection: "row", flex: "1 1 300%", overflow: "hidden", alignItems: "center", justifyContent: "center" }, children: l }), e(A, { sx: { display: "flex", alignItems: "center", justifyContent: "end", flex: h && !u ? "0 0 auto" : "1 1 100%" }, children: u })] }), selectProps: y, toolbarsProps: { Home: { sx: {} } } }) });
|
|
4147
4149
|
}));
|
|
4148
4150
|
Hl.displayName = "StudioToolbar";
|
|
4149
4151
|
const zl = Y(J((r, i) => {
|
|
@@ -4153,37 +4155,37 @@ const zl = Y(J((r, i) => {
|
|
|
4153
4155
|
b((V) => ({ ...V, isMounted: !0 }));
|
|
4154
4156
|
}, []), w = G(() => {
|
|
4155
4157
|
b((V) => ({ ...V, isMounted: !1 }));
|
|
4156
|
-
}, []), C = {}, v = zd(C), k = Wd(C), T = jd(C), R = Se(/* @__PURE__ */ new Set()),
|
|
4157
|
-
const V = (
|
|
4158
|
+
}, []), C = {}, v = zd(C), k = Wd(C), T = jd(C), R = Se(/* @__PURE__ */ new Set()), N = W(() => {
|
|
4159
|
+
const V = (I, E) => {
|
|
4158
4160
|
if (E?.onceKey) {
|
|
4159
4161
|
if (R.current.has(E.onceKey)) return;
|
|
4160
4162
|
const Q = new Set(R.current);
|
|
4161
4163
|
Q.add(E.onceKey), R.current = Q;
|
|
4162
4164
|
}
|
|
4163
4165
|
const K = { variant: E?.type ?? wt.Info, anchorOrigin: { vertical: "top", horizontal: "center" }, preventDuplicate: E?.preventDuplicate, persist: E?.persist ?? E?.type === wt.Error, action: (Q) => e(dt, { onClick: () => y(Q), children: e(tp, {}) }) };
|
|
4164
|
-
E?.enqueueProps && Object.assign(K, E.enqueueProps),
|
|
4166
|
+
E?.enqueueProps && Object.assign(K, E.enqueueProps), I || console.log("message is 'null'", E), u(I ?? "Alert", K);
|
|
4165
4167
|
};
|
|
4166
|
-
return { showMessage: V, showBusy: (
|
|
4168
|
+
return { showMessage: V, showBusy: (I, E) => {
|
|
4167
4169
|
let K = null;
|
|
4168
4170
|
const Q = new Promise((q) => {
|
|
4169
4171
|
K = q;
|
|
4170
4172
|
});
|
|
4171
4173
|
return b((q) => {
|
|
4172
4174
|
const _ = new Map(q.starting);
|
|
4173
|
-
return _.set(Q, K), { ...q, label:
|
|
4175
|
+
return _.set(Q, K), { ...q, label: I, starting: _ };
|
|
4174
4176
|
}), Q;
|
|
4175
|
-
}, showWindow: (
|
|
4177
|
+
}, showWindow: (I, E, K) => {
|
|
4176
4178
|
const Q = { ...E, onKeyDown: (q) => {
|
|
4177
4179
|
m?.dispatchToFocusedCommand(q), q.isDefaultPrevented() || q.isPropagationStopped() || E?.onKeyDown?.(q);
|
|
4178
4180
|
} };
|
|
4179
|
-
return v(
|
|
4180
|
-
}, showOptions: k, showInputOptions: T, showError: (
|
|
4181
|
+
return v(I, { sort: () => import("./CQdHuWRKrc46Ov6t.mjs"), numberFormat: () => import("./qGhUWftd5xiC-hxc.mjs"), hyperlink: () => import("./D0-6I_5PCSF8a7L7.mjs"), comments: () => import("./CkNOojlllvYRHHW-.mjs"), find: () => import("./q6UgUqJldJL6n2-x.mjs"), tableDetails: () => import("./q8P-1V6WnCy4m7sv.mjs"), tableNew: () => import("./oJGEc64Ccgag_PQZ.mjs"), namedDetails: () => import("./BrkDPL7uUPTUnJf1.mjs") }[I], Q, K);
|
|
4182
|
+
}, showOptions: k, showInputOptions: T, showError: (I) => {
|
|
4181
4183
|
let E, K = wt.Error, Q = "Unknown Error";
|
|
4182
|
-
typeof
|
|
4184
|
+
typeof I == "string" ? Q = I : I instanceof Error && (E = I, I.message && (Q = I.message)), I instanceof bp && (K = wt.Info), V(Q, { type: K, enqueueProps: { error: E } });
|
|
4183
4185
|
} };
|
|
4184
4186
|
}, []), B = G(() => {
|
|
4185
4187
|
}, []), P = ((V) => {
|
|
4186
|
-
const { workbook:
|
|
4188
|
+
const { workbook: I, setWorkbook: E, importExportDisabled: K, workbookTitle: Q = "export", setWorkbookTitle: q, notifier: _, requestWorkbookTitle: ne, themeOptions: le, undoManager: X, commands: z, onExecute: ee } = V, me = te(le?.onModeChange, [le?.onModeChange]), Le = te(le?.onEnabledDarkGridChange, [le?.onEnabledDarkGridChange]), Fe = te(le?.onEnabledDarkImagesChange, [le?.onEnabledDarkImagesChange]), Be = te(async (ge = null, fe = null) => {
|
|
4187
4189
|
const Z = [];
|
|
4188
4190
|
let ce, Me = null, ye = null;
|
|
4189
4191
|
if (typeof ge == "string" ? ye = ge : Me = ge, ce = Me ? ge : await Jt.openFileDialog(ye ?? Ot.getAllReadFormatTypeAsString().join(",")), !ce) return null;
|
|
@@ -4193,42 +4195,42 @@ const zl = Y(J((r, i) => {
|
|
|
4193
4195
|
return Z.length > 0 && (_?.showMessage?.("Some elements were not able to be imported. See console for details."), console.warn(`Import warnings:
|
|
4194
4196
|
` + Z.join(`
|
|
4195
4197
|
`))), et;
|
|
4196
|
-
}, [ee, _,
|
|
4198
|
+
}, [ee, _, I]), Ye = te(async (ge, fe, Z) => {
|
|
4197
4199
|
if (!fe && ne) {
|
|
4198
4200
|
const ce = await ne("Enter Workbook name to " + (Z.isDefault ? "Save." : `Export as ${Z.description}.`));
|
|
4199
4201
|
return ce !== null && Ot.writeFile(ce, ge, { formatType: Z.key });
|
|
4200
4202
|
}
|
|
4201
4203
|
return Ot.writeFile(fe, ge, { formatType: Z.key });
|
|
4202
|
-
}, [_,
|
|
4203
|
-
} }), []), je =
|
|
4204
|
+
}, [_, I, ne]), ve = G(() => ({ contains: (ge) => !0, focus() {
|
|
4205
|
+
} }), []), je = W(() => {
|
|
4204
4206
|
const ge = [];
|
|
4205
4207
|
K || (Ot.getWriteFormats().forEach((Z) => {
|
|
4206
4208
|
const ce = Z.isDefault, Me = { label: ce ? "Save Workbook" : `Save Workbook as ${Z.description}`, scopedLabels: { workbook: "Save", saveWorkbook: `as ${Z.description}` }, tags: Z.tags, description: `Save the workbook to the desktop${ce ? "" : ` as ${Z.description}`}.` };
|
|
4207
4209
|
ce && (Me.shortcut = { key: "S", modifiers: [ke.Ctrl] }, ge.push(new we("saveWorkbookAs", ve, { label: "Save Workbook As…", scopedLabels: { workbook: "Save as…", saveWorkbook: "as…" }, shortcut: [{ key: "S", modifiers: [ke.Shift, ke.Ctrl] }, { key: "F12" }], description: "Save the workbook to the desktop with the provided name." }, () => {
|
|
4208
|
-
Ye(
|
|
4210
|
+
Ye(I, null, Z).catch((qe) => {
|
|
4209
4211
|
_?.showError?.(qe);
|
|
4210
4212
|
});
|
|
4211
4213
|
})));
|
|
4212
4214
|
const ye = ce ? "saveWorkbook" : `saveWorkbookAs${Z.key}`;
|
|
4213
4215
|
ge.push(new we(ye, ve, Me, (qe) => {
|
|
4214
|
-
Ye(
|
|
4216
|
+
Ye(I, qe ?? Q, Z).catch((et) => {
|
|
4215
4217
|
_?.showError?.(et);
|
|
4216
4218
|
});
|
|
4217
4219
|
}));
|
|
4218
4220
|
}), ge.push(new we("openWorkbook", ve, { label: "Open Workbook…", scopedLabels: { workbook: "Open…" }, description: "Open a workbook from the desktop.", shortcut: { key: "O", modifiers: [ke.Ctrl] } }, async (Z = null) => {
|
|
4219
|
-
const ce = { date1904:
|
|
4221
|
+
const ce = { date1904: I.isDate1904(), ...I.options };
|
|
4220
4222
|
try {
|
|
4221
4223
|
const Me = await Be(Z, ce);
|
|
4222
4224
|
if (!Me) return;
|
|
4223
4225
|
const ye = Me.title, qe = Me.workbook, et = qe.getSelectedSheet();
|
|
4224
4226
|
if (Me.formatType.mimeType === "text/csv") {
|
|
4225
|
-
const no =
|
|
4226
|
-
await
|
|
4227
|
+
const no = I.findValidSheetName(ye);
|
|
4228
|
+
await I.doBatch(async () => {
|
|
4227
4229
|
const fn = et.getUsedRange();
|
|
4228
4230
|
if (!fn) return void _?.showMessage("The file appears to be blank.");
|
|
4229
|
-
await
|
|
4231
|
+
await I.getSheets().add({ name: no, autoSelect: !0 }).getRange({ colStart: 0, rowStart: 0, colEnd: 0, rowEnd: 0 }).copyFrom(fn);
|
|
4230
4232
|
}, `Import CSV '${ye}'`);
|
|
4231
|
-
} else
|
|
4233
|
+
} else I?.close(), q?.(ye), E(qe);
|
|
4232
4234
|
} catch (Me) {
|
|
4233
4235
|
_?.showError?.(Me);
|
|
4234
4236
|
}
|
|
@@ -4252,17 +4254,17 @@ const zl = Y(J((r, i) => {
|
|
|
4252
4254
|
}), new we("gotoUrlIssue", ve, { label: "Create Issue", description: "Create an issue to identify a bug or a feature request." }, () => {
|
|
4253
4255
|
window?.open("https://github.com/sheetxl/sheetxl/issues");
|
|
4254
4256
|
})];
|
|
4255
|
-
}, [
|
|
4257
|
+
}, [I, Q, _, K, le, z, X]), H = W(() => {
|
|
4256
4258
|
let ge = null;
|
|
4257
|
-
return ge =
|
|
4258
|
-
}, [
|
|
4259
|
+
return ge = z ? z.createChildGroup(ve, "standaloneWorkbook", !1) : new gr(ve, "standaloneWorkbook"), ge.addCommands(je, !0), ge;
|
|
4260
|
+
}, [z, je]);
|
|
4259
4261
|
rp({ manager: X, commands: H, notifier: _ });
|
|
4260
4262
|
const { themeMode: oe } = vi();
|
|
4261
4263
|
ue(() => {
|
|
4262
4264
|
if (!le || !H) return;
|
|
4263
4265
|
const ge = le.mode === "dark" || !le.mode && oe === "dark";
|
|
4264
4266
|
H.getCommand("themeMode").update({ state: le.mode ?? null, label: ge ? "Dark Mode" : "Light Mode", scopedLabels: { appearance: ge ? "Dark Mode" : "Light Mode" } }).updateCallback(() => {
|
|
4265
|
-
me(ge ?
|
|
4267
|
+
me(ge ? qn.Light : qn.Dark);
|
|
4266
4268
|
}), H.getCommand("defaultThemeMode").update({ state: !le.mode }).updateCallback(() => {
|
|
4267
4269
|
me(null);
|
|
4268
4270
|
}), H.getCommand("enableDarkGrid").update({ state: le.enableDarkGrid }).updateCallback(() => {
|
|
@@ -4274,7 +4276,7 @@ const zl = Y(J((r, i) => {
|
|
|
4274
4276
|
const { showModal: Te } = Hd();
|
|
4275
4277
|
return ue(() => {
|
|
4276
4278
|
const ge = () => new Promise((fe, Z) => {
|
|
4277
|
-
const ce = ae.lazy(() => import("./
|
|
4279
|
+
const ce = ae.lazy(() => import("./5ec1MS8QFxg_wTk6.mjs")), Me = Te(ce, { title: "Shortcut Keys Reference", commands: H, onDone: () => {
|
|
4278
4280
|
Me.hide();
|
|
4279
4281
|
}, TransitionProps: { onExited: () => {
|
|
4280
4282
|
fe(!0);
|
|
@@ -4282,14 +4284,14 @@ const zl = Y(J((r, i) => {
|
|
|
4282
4284
|
});
|
|
4283
4285
|
H.getCommand("showKeyboardShortcuts").updateCallback(() => ge()), H.getCommand("help").updateCallback(() => ge());
|
|
4284
4286
|
}, [je, H]), H;
|
|
4285
|
-
})({ workbook: o, setWorkbook: t, importExportDisabled: p, workbookTitle: l, setWorkbookTitle: c, commands: m, requestWorkbookTitle: (V) => new Promise((
|
|
4287
|
+
})({ workbook: o, setWorkbook: t, importExportDisabled: p, workbookTitle: l, setWorkbookTitle: c, commands: m, requestWorkbookTitle: (V) => new Promise((I) => {
|
|
4286
4288
|
n.current ? n.current.requestWorkbookTitle((E, K) => {
|
|
4287
|
-
|
|
4288
|
-
}, { selectAll: !0, requestReason: V }) :
|
|
4289
|
-
}), themeOptions: h, undoManager: s, notifier:
|
|
4289
|
+
I(E);
|
|
4290
|
+
}, { selectAll: !0, requestReason: V }) : I(g);
|
|
4291
|
+
}), themeOptions: h, undoManager: s, notifier: N, onExecute: B });
|
|
4290
4292
|
ue(() => {
|
|
4291
4293
|
x.starting.size <= 0 || !x.isMounted || b((V) => {
|
|
4292
|
-
const
|
|
4294
|
+
const I = new Map(V.running);
|
|
4293
4295
|
return V.starting.forEach((E, K) => {
|
|
4294
4296
|
const Q = () => {
|
|
4295
4297
|
b((q) => {
|
|
@@ -4297,32 +4299,32 @@ const zl = Y(J((r, i) => {
|
|
|
4297
4299
|
return _.delete(K), { ...q, running: _ };
|
|
4298
4300
|
});
|
|
4299
4301
|
};
|
|
4300
|
-
|
|
4301
|
-
}), { ...V, starting: /* @__PURE__ */ new Map(), running:
|
|
4302
|
+
I.set(K, Q), E(Q);
|
|
4303
|
+
}), { ...V, starting: /* @__PURE__ */ new Map(), running: I };
|
|
4302
4304
|
});
|
|
4303
4305
|
}, [x]);
|
|
4304
4306
|
const [S, M] = U(null);
|
|
4305
4307
|
ue(() => {
|
|
4306
4308
|
x.starting.size !== 0 || x.running.size !== 0 ? M(e(Lt, { icon: e($d, { sx: { transform: "scale(0.7)", marginLeft: "-6px" } }), panel: !0, label: x.label, onMount: f, onUnmount: w, sx: { position: "absolute", left: "0", top: "0", width: "100%", height: "100%", zIndex: "9999" } })) : M(null);
|
|
4307
4309
|
}, [x.starting, x.running]);
|
|
4308
|
-
const L =
|
|
4309
|
-
return o && (O.statusBarProps = { childrenEnd: L }),
|
|
4310
|
+
const L = W(() => e(ru, { commands: P, disableHover: !0, sx: { padding: "0" }, buttonProps: { sx: { maxHeight: "22px" } } }), [P]), O = { notifier: N, commands: P };
|
|
4311
|
+
return o && (O.statusBarProps = { childrenEnd: L }), j(se, { children: [S, a ? ae.cloneElement(a, O) : null] });
|
|
4310
4312
|
}));
|
|
4311
4313
|
zl.displayName = "SnackbarAndCommandsWrapper";
|
|
4312
|
-
const
|
|
4313
|
-
const { className: o, sx: t, style: n, onElementLoad: l, onError: c, undoManager: g, errorPanel: a = Vd, onKeyDown: s, workbook: m, createWorkbookOptions: p, onWorkbookChange: h, logo: d, importExportDisabled: u = !1, themeOptions: y, autoFocus: x = !1, commands: b, title: f, onTitleChange: w, titleProps: C, renderLoadingPanel: v, ...k } = r, T = Se(null), R = te(h, [h]),
|
|
4314
|
+
const or = Y(J((r, i) => {
|
|
4315
|
+
const { className: o, sx: t, style: n, onElementLoad: l, onError: c, undoManager: g, errorPanel: a = Vd, onKeyDown: s, workbook: m, createWorkbookOptions: p, onWorkbookChange: h, logo: d, importExportDisabled: u = !1, themeOptions: y, autoFocus: x = !1, commands: b, title: f, onTitleChange: w, titleProps: C, renderLoadingPanel: v, ...k } = r, T = Se(null), R = te(h, [h]), N = te(w ?? C?.onTitleChange, [w ?? C?.onTitleChange]), B = C?.placeHolder ?? "Untitled", P = y?.mode, { themeMode: S, source: M } = vi({ mode: P }), L = W(() => ({ ...y, light: ca(!1, Jt.deepMerge(y?.theme ?? {}, y?.light ?? {})), dark: ca(!0, Jt.deepMerge(y?.theme ?? {}, y?.dark ?? {})) }), [y]), O = S === qn.Dark, [V, I] = U(null);
|
|
4314
4316
|
ue(() => {
|
|
4315
|
-
|
|
4317
|
+
I(g ?? new xp());
|
|
4316
4318
|
}, [g]);
|
|
4317
|
-
const [E, K] = U(null), [Q, q] = U(null), _ =
|
|
4319
|
+
const [E, K] = U(null), [Q, q] = U(null), _ = fr();
|
|
4318
4320
|
St(() => {
|
|
4319
4321
|
if (!m || Object.keys(m).length === 0 && !Jt.isPromiseLike(m)) {
|
|
4320
4322
|
const Z = { theme: _.getDefaultTheme(), ...p };
|
|
4321
|
-
q(new
|
|
4323
|
+
q(new $n(Z));
|
|
4322
4324
|
} else q(m);
|
|
4323
4325
|
}, [m]), St(() => {
|
|
4324
4326
|
if (Q) {
|
|
4325
|
-
if (Q instanceof
|
|
4327
|
+
if (Q instanceof $n) return K({ workbook: Q }), void (m !== Q && R?.(Q));
|
|
4326
4328
|
(async () => {
|
|
4327
4329
|
try {
|
|
4328
4330
|
let Z, ce = await Promise.resolve(Q);
|
|
@@ -4347,16 +4349,16 @@ const tr = Y(J((r, i) => {
|
|
|
4347
4349
|
}, [V, E, ne]);
|
|
4348
4350
|
const X = te((Z) => {
|
|
4349
4351
|
Z ? V.setRepeatableOperation({ description: Z.label(), repeat: async () => Z.execute() }) : V.setRepeatableOperation(null);
|
|
4350
|
-
}, [V]), [
|
|
4352
|
+
}, [V]), [z, ee] = U(f ?? C?.title ?? "");
|
|
4351
4353
|
ue(() => {
|
|
4352
4354
|
ee(f ?? C?.title ?? "");
|
|
4353
4355
|
}, [f ?? C?.title]), ue(() => {
|
|
4354
|
-
|
|
4355
|
-
}, [
|
|
4356
|
-
const [me, Le] = U(null), Fe =
|
|
4356
|
+
N?.(z);
|
|
4357
|
+
}, [z]);
|
|
4358
|
+
const [me, Le] = U(null), Fe = W(() => {
|
|
4357
4359
|
const Z = () => ({ contains: (ce) => !0, focus() {
|
|
4358
4360
|
} });
|
|
4359
|
-
return b ? b.createChildGroup(Z, "application", !1) : new
|
|
4361
|
+
return b ? b.createChildGroup(Z, "application", !1) : new gr(Z, "application");
|
|
4360
4362
|
}, [b]), Be = te((Z) => {
|
|
4361
4363
|
Le(Z.source.getViewportElement()), le(Z), Fe.activate("sheet"), l?.(Z);
|
|
4362
4364
|
}, [Fe]);
|
|
@@ -4365,66 +4367,66 @@ const tr = Y(J((r, i) => {
|
|
|
4365
4367
|
}, [ne]);
|
|
4366
4368
|
const Ye = Se(null), ve = G((Z) => {
|
|
4367
4369
|
let ce = null;
|
|
4368
|
-
return C?.hidden || (ce = e(vl, { ...C, style: { maxWidth: "100%", ...C?.style }, workbook: T.current, ref: Ye, title:
|
|
4370
|
+
return C?.hidden || (ce = e(vl, { ...C, style: { maxWidth: "100%", ...C?.style }, workbook: T.current, ref: Ye, title: z, placeHolder: B, onTitleChange: (Me) => {
|
|
4369
4371
|
ee(Me);
|
|
4370
4372
|
} })), e(Hl, { ...Z, logo: d, mainElement: ce, showFileMenu: !u, showAppearanceMenu: !!(L?.onEnabledDarkGridChange || L?.onEnabledDarkImagesChange || L?.onModeChange) });
|
|
4371
|
-
}, [d,
|
|
4373
|
+
}, [d, z, C, L, u, Fe]);
|
|
4372
4374
|
ue(() => {
|
|
4373
4375
|
const Z = (ce) => ce.preventDefault();
|
|
4374
4376
|
return T.current?.addEventListener("wheel", Z, { passive: !1 }), () => {
|
|
4375
4377
|
T.current?.removeEventListener("wheel", Z);
|
|
4376
4378
|
};
|
|
4377
4379
|
}, []);
|
|
4378
|
-
const je =
|
|
4380
|
+
const je = W(() => {
|
|
4379
4381
|
const Z = { transparentBackground: !0 };
|
|
4380
4382
|
return e(A, { sx: t, style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", alignItems: "center", justifyContent: "center", ...n }, children: v?.(Z) ?? e(Lt, { ...Z }) });
|
|
4381
|
-
}, [t, n, v]), H = G(({ error: Z }) => (c?.(Z), e(a, { sx: t, style: n, error: Z ?? "Unable to display empty workbook." })), [t, n, c]), oe =
|
|
4383
|
+
}, [t, n, v]), H = G(({ error: Z }) => (c?.(Z), e(a, { sx: t, style: n, error: Z ?? "Unable to display empty workbook." })), [t, n, c]), oe = W(() => ({ ...t, "& .SnackbarContainer-root": { position: "absolute !important" }, "& .notistack-SnackbarContainer > div": { maxWidth: "100%" }, "& .notistack-Snackbar": { minWidth: "unset" }, "& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (Z) => Z.palette.getContrastText(Z.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (Z) => Z.palette.getContrastText(Z.palette.error.main) }, "& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (Z) => Z.palette.getContrastText(Z.palette.error.main) }, "& .notistack-MuiContent *": { fontFamily: (Z) => Z.typography.fontFamily }, "& #notistack-snackbar": { maxWidth: "560px", whiteSpace: "pre-wrap" }, "*": { userSelect: "none" } }), [t]), Te = Fo([T, i]), ge = W(() => {
|
|
4382
4384
|
if (!E) return je;
|
|
4383
4385
|
if (E.error || !E.workbook) return H({ error: E.error });
|
|
4384
4386
|
let Z = null, ce = null, Me = !1;
|
|
4385
4387
|
return L && (Z = O ? L.dark : L.light, ce = O && L.enableDarkGrid ? L.dark : L.light, Me = L.enableDarkImages), e(Sl, { sx: oe, style: n, tabIndex: 0, autoFocus: !0, workbook: E.workbook, ref: Te, renderToolbar: ve, onElementLoad: Be, onRepeatCommandChange: X, onKeyDown: (ye) => {
|
|
4386
4388
|
s?.(ye);
|
|
4387
4389
|
}, renderLoadingPanel: v, gridTheme: ce, headersTheme: Z, enableDarkImages: Me, className: Ae(o, "sheetxl-workbook"), onContextMenu: (ye) => ye.preventDefault(), ...k }, "WorkbookElement");
|
|
4388
|
-
}, [E,
|
|
4390
|
+
}, [E, z, V, je, v, L, k, ve, oe]);
|
|
4389
4391
|
let fe = e(qu, { fallbackRender: H, children: e(ym, { maxSnack: 3, domRoot: me, anchorOrigin: { vertical: "bottom", horizontal: "right" }, autoHideDuration: 3500, onClose: (Z, ce, Me) => {
|
|
4390
4392
|
T.current?.focus();
|
|
4391
|
-
}, Components: { error: Bl }, iconVariant: { success: e(
|
|
4392
|
-
return L && (fe =
|
|
4393
|
+
}, Components: { error: Bl }, iconVariant: { success: e(ir, { style: { marginRight: "8px" }, children: e("path", { d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" }) }), error: e(Ud, { style: { marginRight: "8px" } }) }, children: e(_d, { children: e(zl, { workbook: E?.workbook, setWorkbook: q, importExportDisabled: u, titlePlaceHolder: B, titleWorkbook: z, setWorkbookTitle: ee, refWorkbookTitle: Ye, commands: Fe, undoManager: V, themeOptions: L, children: ge }) }) }) });
|
|
4394
|
+
return L && (fe = j(Ei, { theme: O ? L.dark : L.light, children: [L.cssBaseline ? e(Fs, {}) : null, fe] })), fe;
|
|
4393
4395
|
}));
|
|
4394
|
-
|
|
4395
|
-
const km = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio:
|
|
4396
|
+
or.displayName = "EagerStudio";
|
|
4397
|
+
const km = Object.freeze(Object.defineProperty({ __proto__: null, EagerStudio: or, default: or }, Symbol.toStringTag, { value: "Module" }));
|
|
4396
4398
|
export {
|
|
4397
4399
|
Eo as $,
|
|
4398
4400
|
ou as A,
|
|
4399
4401
|
Fp as B,
|
|
4400
4402
|
Ep as C,
|
|
4401
|
-
|
|
4403
|
+
Ii as D,
|
|
4402
4404
|
nu as E,
|
|
4403
4405
|
Ap as F,
|
|
4404
4406
|
ru as G,
|
|
4405
4407
|
yp as H,
|
|
4406
4408
|
Mi as I,
|
|
4407
4409
|
Hi as J,
|
|
4408
|
-
|
|
4410
|
+
xr as K,
|
|
4409
4411
|
au as L,
|
|
4410
4412
|
Op as M,
|
|
4411
4413
|
su as N,
|
|
4412
4414
|
iu as O,
|
|
4413
4415
|
Ai as P,
|
|
4414
|
-
|
|
4416
|
+
Np as Q,
|
|
4415
4417
|
cu as R,
|
|
4416
4418
|
Uu as S,
|
|
4417
4419
|
Wm as T,
|
|
4418
4420
|
Fi as U,
|
|
4419
4421
|
wp as V,
|
|
4420
4422
|
Up as W,
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
+
fa as X,
|
|
4424
|
+
Ip as Y,
|
|
4423
4425
|
Cp as Z,
|
|
4424
|
-
|
|
4426
|
+
Zn as _,
|
|
4425
4427
|
Kp as a,
|
|
4426
4428
|
Rp as a0,
|
|
4427
|
-
|
|
4429
|
+
br as a1,
|
|
4428
4430
|
Pi as a2,
|
|
4429
4431
|
Qp as a3,
|
|
4430
4432
|
eu as a4,
|
|
@@ -4447,7 +4449,7 @@ export {
|
|
|
4447
4449
|
Pu as al,
|
|
4448
4450
|
Ru as am,
|
|
4449
4451
|
$a as an,
|
|
4450
|
-
|
|
4452
|
+
or as ao,
|
|
4451
4453
|
vm as ap,
|
|
4452
4454
|
Ot as aq,
|
|
4453
4455
|
dl as ar,
|
|
@@ -4456,7 +4458,7 @@ export {
|
|
|
4456
4458
|
sl as au,
|
|
4457
4459
|
Wt as b,
|
|
4458
4460
|
Co as c,
|
|
4459
|
-
|
|
4461
|
+
Yn as d,
|
|
4460
4462
|
ol as e,
|
|
4461
4463
|
Ae as f,
|
|
4462
4464
|
jm as g,
|
|
@@ -4468,12 +4470,12 @@ export {
|
|
|
4468
4470
|
Ri as m,
|
|
4469
4471
|
zp as n,
|
|
4470
4472
|
Wp as o,
|
|
4471
|
-
|
|
4473
|
+
Ni as p,
|
|
4472
4474
|
zm as q,
|
|
4473
4475
|
mn as r,
|
|
4474
4476
|
Mo as s,
|
|
4475
4477
|
jp as t,
|
|
4476
|
-
|
|
4478
|
+
Io as u,
|
|
4477
4479
|
$p as v,
|
|
4478
4480
|
Vp as w,
|
|
4479
4481
|
_p as x,
|