@sheetxl/studio-mui 0.8.0-beta.4 → 0.8.0-beta.6
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/{BGvoJjUs21bbuE1i.cjs → 3RXtLkq7wTAV6y_e.cjs} +1 -1
- package/browser/cjs/{BXkdjAb4jpTr412c.cjs → BD50lsTki7wvzb5g.cjs} +1 -1
- package/browser/cjs/BlNKpwiG-Q7eIi5t.cjs +8 -0
- package/browser/cjs/ByIUHPOa02D7XbdC.cjs +1 -0
- package/browser/cjs/{eCw4rAEIYE3BftpG.cjs → CkroJ2FmfFvk6Eyv.cjs} +1 -1
- package/browser/cjs/{B9GcCj7sj8XdjPZF.cjs → CzJvR12QCQb-0Rtn.cjs} +1 -1
- package/browser/cjs/{3uprnzi2l0iT17Dg.cjs → D-Yo5aV9STT5KH4G.cjs} +1 -1
- package/browser/cjs/{BHb7TnK1NmimV4OX.cjs → DwkiLFWUtLC8ZcIQ.cjs} +1 -1
- package/browser/cjs/index.cjs +1 -1
- package/browser/cjs/xCAd86Y_REa3Xs1o.cjs +13 -0
- package/browser/esm/{wqS-qBYe9-awT5Rr.mjs → 27jPjqdDLWn5qbQ8.mjs} +3 -3
- package/browser/esm/{o8pQBbpRc03xny0J.mjs → 2_WF-hy6x4dXfEzW.mjs} +1 -1
- package/browser/esm/{Dj2-pD6jM9SjbPfX.mjs → 61ip_C1X9ls4svw6.mjs} +1 -1
- package/browser/esm/{BH7X6WilO_oB3j3h.mjs → 6EK3JgWrKYfqzAfV.mjs} +1 -1
- package/browser/esm/{CrTz-SMNtZoj2Z48.mjs → BFxtcKJBbfjtMft-.mjs} +2 -2
- package/browser/esm/{DRQzyIQfZQuviFBK.mjs → BGdZT1Ka4ohDCZpW.mjs} +3 -3
- package/browser/esm/{CimAg7LJqIb3ULYp.mjs → BPzT8gL3SgD0CG7V.mjs} +1131 -1091
- package/browser/esm/{CHqIzUemj2wQqlNO.mjs → BlWsO6M15Ii13NrV.mjs} +2 -2
- package/browser/esm/{DoU18LVtqUiePYs1.mjs → BofZe0q9bsHQr0Xd.mjs} +1 -1
- package/browser/esm/{DFbbRoJIDXqoF7nu.mjs → BybBaLxSKyGAsxqO.mjs} +3 -3
- package/browser/esm/{BJCaJYz86lNGZGh1.mjs → C5swGBbBLdDzg_bm.mjs} +2 -2
- package/browser/esm/{BVs5I1lTSja2b0B9.mjs → CKemMJZNIPnJ0dUE.mjs} +2 -2
- package/browser/esm/{ec1sT17zcL-gOSRO.mjs → CsNOEAKuHLfckItX.mjs} +1 -1
- package/browser/esm/CyQk62MFBCep2ZZs.mjs +223 -0
- package/browser/esm/{4zCEiqAUYE1FtC_Y.mjs → D-JQOjmAh6Gk6wVM.mjs} +2 -2
- package/browser/esm/{OwfpYCy5lgrQ-16J.mjs → D3b3dWTjvFd1Kj5g.mjs} +1 -1
- package/browser/esm/{Bv0eMxh_ZN44Ikgp.mjs → D8FEKUKVxH32duMx.mjs} +3 -3
- package/browser/esm/{nZ7NKFIakvUB_oNM.mjs → DRUKu2I27bidfyvH.mjs} +1 -1
- package/browser/esm/{CtOFBKJZWEJY5GOf.mjs → DTLKzrZGPkkNlncN.mjs} +2 -2
- package/browser/esm/{BWNmYjzGDBhZYgIO.mjs → Dzym1WSjYb_mnVkJ.mjs} +2 -2
- package/browser/esm/{CPDwT78ZJV0KhVfv.mjs → FK7vqizwRujDsqL2.mjs} +1825 -1743
- package/browser/esm/{DHYkgVTs7_z8sPt8.mjs → JYRkZ4iKzbWnNhEs.mjs} +2 -2
- package/browser/esm/{S7-XfIxL3I5D5tDS.mjs → aGoWX29-zbUaPh2U.mjs} +2 -2
- package/browser/esm/index.mjs +94 -94
- package/browser/esm/{BmVeug3PPG-mEUBe.mjs → p62JxLmjmWD2MQq1.mjs} +2 -2
- package/licenses/dependencies.txt +134 -134
- package/node/esm/{BVmpGvXDUqEmggq3.mjs → 3J2-TRYWEsvnTDnO.mjs} +1 -1
- package/node/esm/{BtruJA9z21K9pnuA.mjs → B2QOYsl1YmcwknsP.mjs} +9 -9
- package/node/esm/{DKzeeAeOVF2r68yb.mjs → CE6ZU2MVb3_-FzIk.mjs} +1 -1
- package/node/esm/{CUsUUWPxbO1IW9PY.mjs → CKOhL08sVy1N_Uza.mjs} +1 -1
- package/node/esm/{FxGz3tv6y2gcffmK.mjs → CksPMsHwUSCpFnpS.mjs} +1205 -1164
- package/node/esm/{B9iw8mqg0MDNDp5_.mjs → CtoRlEz1GwA88zTu.mjs} +1 -1
- package/node/esm/{BNROwD9ZMLgwtXL_.mjs → CzERDnu2VbNTjJgI.mjs} +8 -8
- package/node/esm/{2wtbIYdeGDT6UzN4.mjs → D3xcuMwJvLJhlPNV.mjs} +1 -1
- package/node/esm/{CGhj-BDkyrejG1Jj.mjs → DDVJs9oOFXR3RfSi.mjs} +1 -1
- package/node/esm/{DMbGl7mOdelCN7-u.mjs → Dc4t_AYLdTAnPOIT.mjs} +1 -1
- package/node/esm/{T3WcGiReCHGeKPOy.mjs → JUUre9pYia7feetw.mjs} +1 -1
- package/node/esm/{R1_Dii8zCHEAZKvZ.mjs → K6LEXUZkuqoEn5yJ.mjs} +1 -1
- package/node/esm/{B1z-keCkm0LI9ezw.mjs → ObY_iULY2ezBYD3q.mjs} +1 -1
- package/node/esm/index.mjs +2901 -2820
- package/node/esm/{DhZG-hcTUn-vLoZy.mjs → qu70N1tsIwi7LmT6.mjs} +1 -1
- package/node/esm/{7ZI8MoM6mY-P4VfQ.mjs → uIRinWE0OCKJvsGN.mjs} +2 -2
- package/package.json +9 -9
- package/resources/locales/de/ui.msg.json +3 -4
- package/resources/locales/en/ui.msg.json +3 -4
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +6 -0
- package/types/src/conditions/BetweenOption.d.ts +5 -0
- package/types/src/conditions/ScalarOption.d.ts +18 -0
- package/types/src/dialog/index.d.ts +0 -1
- package/types/src/filter/FilterList.d.ts +3 -3
- package/types/src/form/FormulaField.d.ts +6 -0
- package/types/src/format/AlignmentPanel.d.ts +1 -2
- package/types/src/format/BorderPreview.d.ts +23 -13
- package/types/src/format/useFormatSelection.d.ts +3 -2
- package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
- package/types/src/itemsPanel/EditorPanel.d.ts +1 -2
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +13 -0
- package/types/src/itemsPanel/index.d.ts +1 -0
- package/types/src/studio/CommandsWrapper.d.ts +2 -0
- package/types/src/studio/StudioCommandProvider.d.ts +7 -0
- package/types/src/studio/StudioCommands.d.ts +2 -2
- package/types/src/studio/StudioProps.d.ts +1 -1
- package/types/src/studio/StudioSplitPane.d.ts +1 -1
- package/browser/cjs/CucKgy044KxMHXrx.cjs +0 -13
- package/browser/cjs/Cy_XmYq6BsWmCXkk.cjs +0 -3
- package/browser/cjs/Dq9lIOzvxW3EKYkD.cjs +0 -8
- package/browser/cjs/QI6GKw7uo1f8gY8C.cjs +0 -1
- package/browser/esm/BiZHUr1gWhtKdzrE.mjs +0 -222
- package/browser/esm/Dg5qnLoncOqT-F5i.mjs +0 -97
- package/node/esm/XpqeM7yyMghtMgLc.mjs +0 -98
- package/types/src/dialog/CommentsDialog.d.ts +0 -11
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { AutoColorPosition as e, BorderPopupButton as t, ColorPopupButton as o, DocumentTitle as n,
|
|
8
|
-
import { Color as
|
|
9
|
-
import { COLOR_SCALE_PRESETS as
|
|
10
|
-
import { Command as
|
|
11
|
-
import
|
|
12
|
-
import { AnimatedLoadingPanel as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { Accordion as
|
|
15
|
-
import { CommonUtils as
|
|
16
|
-
import
|
|
17
|
-
import { mergeRefs as
|
|
18
|
-
import { useMeasure as
|
|
19
|
-
import { SnackbarContent as
|
|
20
|
-
var
|
|
7
|
+
import { AutoColorPosition as e, BorderPopupButton as t, ColorPopupButton as o, DocumentTitle as n, E as r, ExternalLinksPlugin as a, FormatPlugin as l, FormulaField as i, NamedPlugin as s, ProtectionPlugin as d, T as c, TablePlugin as p, WorkbookElement as u, _ as m, a as g, b as h, c as y, createStudioThemeCSS as f, d as b, f as x, g as v, h as C, i as k, l as w, m as S, n as T, p as F, r as D, registerStudioCommandCatalogs as N, registerStudioCommandGroups as I, renderWorkbookToolbars as P, s as O, t as M, tokensToMuiOptions as A, u as W, v as E, x as B, y as R } from "./index.mjs";
|
|
8
|
+
import { Color as L, CommonUtils as V, Condition as z, FormulaError as j, FormulaText as $, ICondition as K, IConditionalFormat as _, IDataValidation as H, IFill as U, IFont as q, IStyle as G, ScalarType as Q, getLocaleProfile as Y } from "@sheetxl/sdk";
|
|
9
|
+
import { COLOR_SCALE_PRESETS as J, CommandRootProvider as X, DATA_BAR_PRESETS as Z, DefaultTaskPaneRegistry as ee, ICON_CATALOG as te, IconSetGlyphs as oe, LogoNoPaddingIcon as ne, NO_CELL_ICON as re, PickerPanel as ae, STYLE_PRESETS as le, TaskPaneArea as ie, TaskPaneProvider as se, ThemeStateDefaults as de, ThemeStateKey as ce, WorkbookIO as pe, WorkbookProvider as ue, buildOOXMLThemeCSS as me, createEditable as ge, createSystemColorVars as he, defaultColorScale as ye, defaultDataBar as fe, defaultIconSet as be, defaultIconStops as xe, getConditionalIconSet as ve, iconSetSize as Ce, resolveIconSetIcons as ke, useDocThemes as we, useModelSync as Se, useReferenceModeStore as Te, useResolvedWorkbook as Fe, useSheet as De, useTaskPaneArea as Ne, useWorkbookEncrypted as Ie, useWorkbookName as Pe, useWorkbookSaveState as Oe, withIconOverride as Me } from "@sheetxl/react";
|
|
10
|
+
import { Command as Ae, DefaultIconService as We, DefaultReactNotifier as Ee, DynamicIcon as Be, KeyCodes as Re, LanguageStateKey as Le, NotifierType as Ve, ReactErrorBoundary as ze, ReactNotifierProvider as je, SplitPane as $e, UncaughtErrorBoundary as Ke, createBusyHandle as _e, floatThemeScopeProps as He, useCallbackRef as Ue, useFloatSurface as qe, useFullscreen as Ge, useImperativeElement as Qe, useLanguage as Ye, useNotifier as Je, usePersistentState as Xe, useResolvedThemeMode as Ze, useTokenThemeContext as et, useTranslator as tt } from "@sheetxl/utils-react";
|
|
11
|
+
import ot, { createContext as nt, forwardRef as rt, isValidElement as at, memo as lt, useCallback as it, useContext as st, useEffect as dt, useMemo as ct, useRef as pt, useState as ut } from "react";
|
|
12
|
+
import { AnimatedLoadingPanel as mt, AnimatedTraversingEllipsisIcon as gt, CommandGroup as ht, ExhibitFloatProvider as yt, ExhibitIconButton as ft, ExhibitPopupIconButton as bt, ExhibitTooltip as xt, ModalProvider as vt, SimpleTooltip as Ct, StackTrace as kt, createExhibitTheme as wt, defaultCreatePopupPanel as St, hideLoadingPanel as Tt, lazyModal as Ft, showLoadingPanel as Dt, useInputDialog as Nt, useLazyWindow as It, useModal as Pt, useOptionsDialog as Ot } from "@sheetxl/utils-mui";
|
|
13
|
+
import { Fragment as Mt, jsx as At, jsxs as Wt } from "react/jsx-runtime";
|
|
14
|
+
import { Accordion as Et, AccordionDetails as Bt, AccordionSummary as Rt, Box as Lt, Button as Vt, Card as zt, CardActions as jt, Checkbox as $t, Collapse as Kt, CssBaseline as _t, DialogTitle as Ht, Divider as Ut, FormControl as qt, FormControlLabel as Gt, FormHelperText as Qt, IconButton as Yt, InputLabel as Jt, ListSubheader as Xt, MenuItem as Zt, MenuList as eo, Paper as to, Popover as oo, Select as no, SvgIcon as ro, Tab as ao, Tabs as lo, TextField as io, ThemeProvider as so, ToggleButton as co, ToggleButtonGroup as po, Typography as uo, alpha as mo, useMediaQuery as go, useTheme as ho } from "@mui/material";
|
|
15
|
+
import { CommonUtils as yo, DOMUtils as fo, DefaultLanguagePackService as bo, ErrorUtils as xo, ExpectedError as vo, PartialError as Co, defineLazyModule as ko, formatMessage as wo, messageKey as So, t as To } from "@sheetxl/utils";
|
|
16
|
+
import Fo from "clsx";
|
|
17
|
+
import { mergeRefs as Do } from "react-merge-refs";
|
|
18
|
+
import { useMeasure as No } from "react-use";
|
|
19
|
+
import { SnackbarContent as Io, SnackbarProvider as Po, useSnackbar as Oo } from "notistack";
|
|
20
|
+
var Mo = lt((e) => {
|
|
21
21
|
const { option: t, onOptionChange: o, readOnly: n, ...r } = e;
|
|
22
|
-
return
|
|
22
|
+
return At(io, {
|
|
23
23
|
size: "small",
|
|
24
24
|
type: "text",
|
|
25
|
-
placeholder:
|
|
25
|
+
placeholder: tt()("condition.enterText"),
|
|
26
26
|
value: t ?? "",
|
|
27
27
|
onChange: (e) => o(String(e.target.value)),
|
|
28
28
|
disabled: n,
|
|
@@ -30,13 +30,13 @@ var Io = rt((e) => {
|
|
|
30
30
|
slotProps: { input: { sx: { backgroundColor: "background.paper" } } }
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
var
|
|
33
|
+
Mo.displayName = "StringOption";
|
|
34
|
+
var Ao = lt((e) => {
|
|
35
35
|
const { option: t, onOptionChange: o, readOnly: n, ...r } = e;
|
|
36
|
-
return
|
|
36
|
+
return At(io, {
|
|
37
37
|
size: "small",
|
|
38
38
|
type: "number",
|
|
39
|
-
placeholder:
|
|
39
|
+
placeholder: tt()("condition.enterNumber"),
|
|
40
40
|
value: "" + (t ?? ""),
|
|
41
41
|
onChange: (e) => o(Number(e.target.value)),
|
|
42
42
|
disabled: n,
|
|
@@ -44,14 +44,14 @@ var Oo = rt((e) => {
|
|
|
44
44
|
slotProps: { input: { sx: { backgroundColor: "background.paper" } } }
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
|
-
|
|
48
|
-
var
|
|
47
|
+
Ao.displayName = "NumberOption";
|
|
48
|
+
var Wo = nt(null), Eo = (e) => {
|
|
49
49
|
const { rowIndex: t, colIndex: o } = e.getSelectedCell().getCoords();
|
|
50
50
|
return {
|
|
51
51
|
rowIndex: t,
|
|
52
52
|
colIndex: o
|
|
53
53
|
};
|
|
54
|
-
},
|
|
54
|
+
}, Bo = (e, t) => {
|
|
55
55
|
const o = ((e) => {
|
|
56
56
|
const t = e?.getCoords();
|
|
57
57
|
if (!t || 0 === t.length) return null;
|
|
@@ -63,7 +63,7 @@ var Mo = tt(null), Ao = (e) => {
|
|
|
63
63
|
};
|
|
64
64
|
})(t?.getRanges() ?? null);
|
|
65
65
|
if (!e || !o) return null;
|
|
66
|
-
const { rowIndex: n, colIndex: r } =
|
|
66
|
+
const { rowIndex: n, colIndex: r } = Eo(e);
|
|
67
67
|
return n === o.rowIndex && r === o.colIndex ? null : {
|
|
68
68
|
active: {
|
|
69
69
|
rowIndex: n,
|
|
@@ -71,8 +71,8 @@ var Mo = tt(null), Ao = (e) => {
|
|
|
71
71
|
},
|
|
72
72
|
anchor: o
|
|
73
73
|
};
|
|
74
|
-
},
|
|
75
|
-
const e =
|
|
74
|
+
}, Ro = () => {
|
|
75
|
+
const e = De(), t = st(Wo), o = pt(null), n = e ? Eo(e) : null, r = e?.getName() ?? null, a = ct(() => n && r ? {
|
|
76
76
|
...n,
|
|
77
77
|
scope: r
|
|
78
78
|
} : void 0, [
|
|
@@ -80,12 +80,12 @@ var Mo = tt(null), Ao = (e) => {
|
|
|
80
80
|
n?.rowIndex,
|
|
81
81
|
n?.colIndex
|
|
82
82
|
]);
|
|
83
|
-
return
|
|
83
|
+
return ct(() => ({
|
|
84
84
|
home: a,
|
|
85
85
|
display: (n) => {
|
|
86
86
|
const r = o.current;
|
|
87
87
|
if (r && r.stored === n.getExpression()) return r.text;
|
|
88
|
-
const a =
|
|
88
|
+
const a = Bo(e, t);
|
|
89
89
|
if (a) try {
|
|
90
90
|
const t = e.createFormula(n.getExpression(), a.anchor).shift(a.active);
|
|
91
91
|
if (t) return t.getExpression({ target: "display" });
|
|
@@ -93,7 +93,7 @@ var Mo = tt(null), Ao = (e) => {
|
|
|
93
93
|
return n.getExpression({ target: "display" });
|
|
94
94
|
},
|
|
95
95
|
compile: (n) => {
|
|
96
|
-
const r =
|
|
96
|
+
const r = Bo(e, t);
|
|
97
97
|
let a = null;
|
|
98
98
|
try {
|
|
99
99
|
a = e?.createFormula(n, r?.active, { target: "display" }) ?? null, a && r && (a = a.shift(r.anchor));
|
|
@@ -110,48 +110,73 @@ var Mo = tt(null), Ao = (e) => {
|
|
|
110
110
|
t,
|
|
111
111
|
a
|
|
112
112
|
]);
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
}, Lo = (e, t) => !!t && "string" == typeof e && !e.startsWith("="), Vo = (e, t, o, n) => null == e ? "" : e.isIFormula ? "=" + t.display(e) : "boolean" == typeof e ? e ? "TRUE" : "FALSE" : j.isError(e) ? e.getLabel() : n && "number" == typeof e ? ((e, t, o) => {
|
|
114
|
+
if (!e || t < 0) return String(t);
|
|
115
|
+
const n = t >= 1, r = !Number.isInteger(t);
|
|
116
|
+
let a;
|
|
117
|
+
return a = "time" !== o || n ? r ? n ? "Short DateTime" : "Long Time" : "Short Date" : "Long Time", e.createCell({
|
|
118
|
+
value: t,
|
|
119
|
+
style: { numberFormat: a }
|
|
120
|
+
}).getText();
|
|
121
|
+
})(o, e, n) : String(e), zo = (e, t, o, n) => {
|
|
122
|
+
if (0 === e.length) return null;
|
|
123
|
+
if (e.startsWith("=")) {
|
|
124
|
+
const o = t.compile(e.substring(1));
|
|
125
|
+
return "string" == typeof o ? e : o;
|
|
126
|
+
}
|
|
127
|
+
const r = e.trim();
|
|
128
|
+
if (0 === r.length) return e;
|
|
129
|
+
if (n) return ((e, t) => {
|
|
130
|
+
if (!e) return null;
|
|
131
|
+
const o = e.createCell({ value: t }, void 0, { textParser: !0 });
|
|
132
|
+
return o.getType() === Q.Number ? o.getValue() : null;
|
|
133
|
+
})(o, r) ?? e;
|
|
134
|
+
const a = Number(r);
|
|
135
|
+
return Number.isFinite(a) ? a : e;
|
|
136
|
+
}, jo = lt((e) => {
|
|
137
|
+
const { option: t, onOptionChange: o, literal: n, readOnly: r, ...a } = e, l = tt(), s = De(), d = Ro(), p = pt(""), u = pt(null);
|
|
138
|
+
return c(() => {
|
|
139
|
+
const e = u.current;
|
|
140
|
+
return !e || !e.error && (e.dirty ? (e.commit(), !Lo(zo(p.current, d, s, n), n)) : !Lo(t, n));
|
|
141
|
+
}), At(i, {
|
|
116
142
|
size: "small",
|
|
117
|
-
home:
|
|
118
|
-
value:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
disabled: n,
|
|
143
|
+
home: d.home,
|
|
144
|
+
value: Vo(t, d, s, n),
|
|
145
|
+
changeOn: "done",
|
|
146
|
+
apiRef: u,
|
|
147
|
+
onChangeText: (e) => {
|
|
148
|
+
p.current = e;
|
|
149
|
+
},
|
|
150
|
+
onDone: (e, t) => {
|
|
151
|
+
"accept" === t.reason && (() => {
|
|
152
|
+
const e = zo(p.current, d, s, n);
|
|
153
|
+
o(e);
|
|
154
|
+
})();
|
|
155
|
+
},
|
|
156
|
+
validationError: Lo(t, n) ? So("condition.invalidDateTime") : null,
|
|
157
|
+
placeholder: l("condition.enterValueOrFormula"),
|
|
158
|
+
disabled: r,
|
|
134
159
|
fullWidth: !0,
|
|
135
160
|
equals: "literal",
|
|
136
161
|
pickAs: "absolute",
|
|
137
162
|
label: null,
|
|
138
163
|
showError: !1,
|
|
139
164
|
helperText: null,
|
|
140
|
-
...
|
|
165
|
+
...a
|
|
141
166
|
});
|
|
142
167
|
});
|
|
143
|
-
|
|
144
|
-
var
|
|
168
|
+
jo.displayName = "ScalarOption";
|
|
169
|
+
var $o = (e, t, o) => {
|
|
145
170
|
if (null == e) return "";
|
|
146
171
|
if (e.isIFormula) return "=" + o.display(e);
|
|
147
172
|
if (Array.isArray(e)) return e.map((e) => String(e ?? "")).join(t);
|
|
148
|
-
const n =
|
|
173
|
+
const n = z.parseListLiteral(e);
|
|
149
174
|
return n ? n.join(t) : e.length > 0 ? "=" + e : "";
|
|
150
|
-
},
|
|
151
|
-
const { option: t, onOptionChange: o, readOnly: n, sx: r, ...a } = e,
|
|
152
|
-
|
|
175
|
+
}, Ko = lt((e) => {
|
|
176
|
+
const { option: t, onOptionChange: o, readOnly: n, sx: r, ...a } = e, l = tt(), s = De(), d = st(Wo), c = Ro(), p = Y(s?.getWorkbook()?.getLocale() ?? "en").listSeparator, [u, m] = ut(null), g = t?.items, [h, y] = ut(null), f = pt(0);
|
|
177
|
+
dt(() => {
|
|
153
178
|
if (!d?.getListItemsAt || !s) return void y(null);
|
|
154
|
-
const e = ++f.current, { rowIndex: t, colIndex: o } =
|
|
179
|
+
const e = ++f.current, { rowIndex: t, colIndex: o } = Eo(s);
|
|
155
180
|
d.getListItemsAt(t, o).then((t) => {
|
|
156
181
|
e === f.current && y(t);
|
|
157
182
|
}, () => {
|
|
@@ -162,24 +187,24 @@ var Lo = (e, t, o) => {
|
|
|
162
187
|
s,
|
|
163
188
|
g
|
|
164
189
|
]);
|
|
165
|
-
const [b, x] =
|
|
166
|
-
return
|
|
190
|
+
const [b, x] = ut(null), { className: v } = He(qe()?.themeScope), C = ct(() => s?.getStyles().getNormal().getFont().toCSS("adaptive"), [s]), [k, w] = ut(null), S = k ?? u;
|
|
191
|
+
return Wt(Lt, {
|
|
167
192
|
sx: {
|
|
168
193
|
display: "flex",
|
|
169
194
|
flexDirection: "column",
|
|
170
195
|
mt: .75,
|
|
171
196
|
...r
|
|
172
197
|
},
|
|
173
|
-
children: [
|
|
198
|
+
children: [Wt(Lt, {
|
|
174
199
|
sx: {
|
|
175
200
|
display: "flex",
|
|
176
201
|
alignItems: "stretch",
|
|
177
202
|
gap: 1
|
|
178
203
|
},
|
|
179
|
-
children: [
|
|
204
|
+
children: [At(i, {
|
|
180
205
|
size: "small",
|
|
181
206
|
home: c.home,
|
|
182
|
-
value:
|
|
207
|
+
value: $o(g, p, c),
|
|
183
208
|
onChangeText: (e) => {
|
|
184
209
|
const n = ((e, t, o) => {
|
|
185
210
|
if (0 === e.length) return { items: "" };
|
|
@@ -190,18 +215,18 @@ var Lo = (e, t, o) => {
|
|
|
190
215
|
let t = e;
|
|
191
216
|
for (; "paren" === t?.type && 1 === t.inputs?.length;) t = t.inputs[0];
|
|
192
217
|
return "list" === t?.type || "paren" === t?.type && (t.inputs?.length ?? 0) > 1;
|
|
193
|
-
})(
|
|
218
|
+
})($.parse(t.getExpression())) ? { error: So("condition.listSourceOneRange") } : { items: t.getExpression() };
|
|
194
219
|
}
|
|
195
|
-
const n =
|
|
196
|
-
return null === n ? { error:
|
|
220
|
+
const n = z.formatListLiteral(e.split(t));
|
|
221
|
+
return null === n ? { error: So("condition.listItemHasComma") } : { items: n };
|
|
197
222
|
})(e, p, c);
|
|
198
223
|
m(n.error ?? null), void 0 !== n.items && o({
|
|
199
224
|
...t,
|
|
200
225
|
items: n.items
|
|
201
226
|
});
|
|
202
227
|
},
|
|
203
|
-
label:
|
|
204
|
-
placeholder:
|
|
228
|
+
label: l("condition.listSource"),
|
|
229
|
+
placeholder: l("condition.enterListSource"),
|
|
205
230
|
disabled: n,
|
|
206
231
|
fullWidth: !0,
|
|
207
232
|
equals: "literal",
|
|
@@ -212,28 +237,28 @@ var Lo = (e, t, o) => {
|
|
|
212
237
|
showError: !1,
|
|
213
238
|
helperText: null,
|
|
214
239
|
...a
|
|
215
|
-
}), null !== h && Mt
|
|
240
|
+
}), null !== h && Wt(Mt, { children: [At(Vt, {
|
|
216
241
|
size: "small",
|
|
217
242
|
variant: "outlined",
|
|
218
243
|
color: "inherit",
|
|
219
244
|
onClick: (e) => x(e.currentTarget),
|
|
220
|
-
endIcon:
|
|
245
|
+
endIcon: At(Be, { iconKey: "ExpandMore" }),
|
|
221
246
|
sx: {
|
|
222
247
|
flexShrink: 0,
|
|
223
248
|
width: "8.5em",
|
|
224
249
|
justifyContent: "space-between",
|
|
225
250
|
textTransform: "none"
|
|
226
251
|
},
|
|
227
|
-
children:
|
|
252
|
+
children: At(Lt, {
|
|
228
253
|
component: "span",
|
|
229
254
|
sx: {
|
|
230
255
|
overflow: "hidden",
|
|
231
256
|
textOverflow: "ellipsis",
|
|
232
257
|
whiteSpace: "nowrap"
|
|
233
258
|
},
|
|
234
|
-
children:
|
|
259
|
+
children: l("condition.listPreview", { count: h.length })
|
|
235
260
|
})
|
|
236
|
-
}),
|
|
261
|
+
}), At(oo, {
|
|
237
262
|
open: !!b,
|
|
238
263
|
anchorEl: b,
|
|
239
264
|
onClose: () => x(null),
|
|
@@ -246,29 +271,29 @@ var Lo = (e, t, o) => {
|
|
|
246
271
|
vertical: "top",
|
|
247
272
|
horizontal: "right"
|
|
248
273
|
},
|
|
249
|
-
children:
|
|
274
|
+
children: At(ae, {
|
|
250
275
|
items: h,
|
|
251
276
|
minWidth: b?.getBoundingClientRect().width,
|
|
252
277
|
style: C,
|
|
253
278
|
onChoose: () => x(null)
|
|
254
279
|
})
|
|
255
280
|
})] })]
|
|
256
|
-
}), S &&
|
|
281
|
+
}), S && At(Qt, {
|
|
257
282
|
error: !0,
|
|
258
|
-
children:
|
|
283
|
+
children: l(S)
|
|
259
284
|
})]
|
|
260
285
|
});
|
|
261
286
|
});
|
|
262
|
-
|
|
263
|
-
var
|
|
264
|
-
const { option: t, onOptionChange: o, className: n, readOnly: r, ...a } = e, l =
|
|
287
|
+
Ko.displayName = "ListSourceOption";
|
|
288
|
+
var _o = {}, Ho = lt((e) => {
|
|
289
|
+
const { option: t, onOptionChange: o, className: n, readOnly: r, ...a } = e, l = tt(), i = t?.type ?? K.AverageType.Above, s = t?.stdDevs ?? "";
|
|
265
290
|
let d = { backgroundColor: "background.paper" };
|
|
266
291
|
return r && (d = {
|
|
267
292
|
...d,
|
|
268
293
|
"& .MuiSelect-icon": { display: "none" },
|
|
269
294
|
"& .MuiOutlinedInput-notchedOutline": { borderColor: "action.disabled" }
|
|
270
|
-
}),
|
|
271
|
-
className:
|
|
295
|
+
}), Wt(Lt, {
|
|
296
|
+
className: Fo(n, _o.option),
|
|
272
297
|
...a,
|
|
273
298
|
sx: {
|
|
274
299
|
display: "flex",
|
|
@@ -276,13 +301,13 @@ var zo = {}, jo = rt((e) => {
|
|
|
276
301
|
gap: .25,
|
|
277
302
|
...a?.sx
|
|
278
303
|
},
|
|
279
|
-
children: [
|
|
304
|
+
children: [At(qt, {
|
|
280
305
|
sx: { flex: .5 },
|
|
281
306
|
size: "small",
|
|
282
|
-
children:
|
|
307
|
+
children: Wt(no, {
|
|
283
308
|
value: i,
|
|
284
309
|
sx: d,
|
|
285
|
-
IconComponent: (e) =>
|
|
310
|
+
IconComponent: (e) => At(Be, {
|
|
286
311
|
iconKey: "ExpandMore",
|
|
287
312
|
...e
|
|
288
313
|
}),
|
|
@@ -291,15 +316,15 @@ var zo = {}, jo = rt((e) => {
|
|
|
291
316
|
...t,
|
|
292
317
|
type: e.target.value
|
|
293
318
|
}),
|
|
294
|
-
children: [
|
|
295
|
-
value:
|
|
319
|
+
children: [At(Zt, {
|
|
320
|
+
value: K.AverageType.Above,
|
|
296
321
|
children: l("condition.above")
|
|
297
|
-
}),
|
|
298
|
-
value:
|
|
322
|
+
}), At(Zt, {
|
|
323
|
+
value: K.AverageType.Below,
|
|
299
324
|
children: l("condition.below")
|
|
300
325
|
})]
|
|
301
326
|
})
|
|
302
|
-
}),
|
|
327
|
+
}), At(io, {
|
|
303
328
|
size: "small",
|
|
304
329
|
placeholder: l("condition.stdDevs"),
|
|
305
330
|
value: s,
|
|
@@ -314,12 +339,12 @@ var zo = {}, jo = rt((e) => {
|
|
|
314
339
|
})]
|
|
315
340
|
});
|
|
316
341
|
});
|
|
317
|
-
|
|
318
|
-
var
|
|
319
|
-
let t =
|
|
320
|
-
return t || (t = "__ci_" +
|
|
321
|
-
},
|
|
322
|
-
const r = t ?? Object.values(
|
|
342
|
+
Ho.displayName = "AverageOption";
|
|
343
|
+
var Uo = 0, qo = /* @__PURE__ */ new WeakMap(), Go = (e) => {
|
|
344
|
+
let t = qo.get(e);
|
|
345
|
+
return t || (t = "__ci_" + ++Uo, qo.set(e, t)), t;
|
|
346
|
+
}, Qo = Object.freeze([K.BuiltInOperatorNames.Icon, K.BuiltInOperatorNames.Color]), Yo = (e, t, o, n = Qo) => {
|
|
347
|
+
const r = t ?? Object.values(z.BuiltInOperators), a = e?.getSelectType() ?? null, l = e?.isList;
|
|
323
348
|
return r.filter((t) => {
|
|
324
349
|
if (n.includes(t.getName())) return !1;
|
|
325
350
|
const o = t.acceptsList?.();
|
|
@@ -329,25 +354,25 @@ var $o = 0, Ko = /* @__PURE__ */ new WeakMap(), _o = (e) => {
|
|
|
329
354
|
const r = t.getAcceptsTypes?.();
|
|
330
355
|
return !r || r.includes(a);
|
|
331
356
|
}).sort((e, t) => (e.getTitle?.() ?? "").localeCompare(t.getTitle?.() ?? "", o));
|
|
332
|
-
},
|
|
357
|
+
}, Jo = (e, t, o, n) => {
|
|
333
358
|
const r = (e, t) => (e.getTitle?.() ?? "").localeCompare(t.getTitle?.() ?? "", n), a = e.filter((e) => !e.isCombinator?.()).sort(r), l = e.filter((e) => e.isCombinator?.()).sort(r), i = [];
|
|
334
|
-
return a.length > 0 && (i.push(
|
|
359
|
+
return a.length > 0 && (i.push(At(Xt, {
|
|
335
360
|
disableSticky: !0,
|
|
336
|
-
sx:
|
|
361
|
+
sx: Zo,
|
|
337
362
|
children: o("condition.groupBasic")
|
|
338
|
-
}, "__header:leaf")), a.forEach((e) => i.push(t(e)))), a.length > 0 && l.length > 0 && i.push(
|
|
363
|
+
}, "__header:leaf")), a.forEach((e) => i.push(t(e)))), a.length > 0 && l.length > 0 && i.push(At(Ut, {}, "__divider")), l.length > 0 && (i.push(At(Xt, {
|
|
339
364
|
disableSticky: !0,
|
|
340
|
-
sx:
|
|
365
|
+
sx: Zo,
|
|
341
366
|
children: o("condition.groupCombine")
|
|
342
367
|
}, "__header:combinator")), l.forEach((e) => i.push(t(e)))), i;
|
|
343
|
-
},
|
|
368
|
+
}, Xo = (e, t, o = null) => {
|
|
344
369
|
if (!e.isCombinator?.()) return e.createDefaultParam?.(o ?? void 0) ?? null;
|
|
345
370
|
const n = t.find((e) => !e.isCombinator?.()) ?? null, r = n ? {
|
|
346
371
|
operator: n.getName(),
|
|
347
372
|
param: n.createDefaultParam?.(o ?? void 0) ?? null
|
|
348
373
|
} : null;
|
|
349
374
|
return "not" === e.getName() ? r : r ? [r] : [];
|
|
350
|
-
},
|
|
375
|
+
}, Zo = {
|
|
351
376
|
userSelect: "none",
|
|
352
377
|
lineHeight: "2",
|
|
353
378
|
fontSize: "0.75rem",
|
|
@@ -355,8 +380,8 @@ var $o = 0, Ko = /* @__PURE__ */ new WeakMap(), _o = (e) => {
|
|
|
355
380
|
color: "text.secondary",
|
|
356
381
|
paddingLeft: 1,
|
|
357
382
|
paddingRight: 1
|
|
358
|
-
},
|
|
359
|
-
var
|
|
383
|
+
}, en = { pl: 2 };
|
|
384
|
+
var tn = lt((e) => {
|
|
360
385
|
const { option: t, onOptionChange: o, readOnly: n, ...r } = e, a = function(e, t) {
|
|
361
386
|
const o = (e) => new Intl.DateTimeFormat(t, { month: "long" }).format(new Date(2e3, e, 1));
|
|
362
387
|
return [
|
|
@@ -364,15 +389,15 @@ var Jo = rt((e) => {
|
|
|
364
389
|
header: e("condition.period.day"),
|
|
365
390
|
options: [
|
|
366
391
|
{
|
|
367
|
-
value:
|
|
392
|
+
value: K.TimePeriodType.Today,
|
|
368
393
|
label: e("condition.period.today")
|
|
369
394
|
},
|
|
370
395
|
{
|
|
371
|
-
value:
|
|
396
|
+
value: K.TimePeriodType.Yesterday,
|
|
372
397
|
label: e("condition.period.yesterday")
|
|
373
398
|
},
|
|
374
399
|
{
|
|
375
|
-
value:
|
|
400
|
+
value: K.TimePeriodType.Tomorrow,
|
|
376
401
|
label: e("condition.period.tomorrow")
|
|
377
402
|
}
|
|
378
403
|
]
|
|
@@ -381,15 +406,15 @@ var Jo = rt((e) => {
|
|
|
381
406
|
header: e("condition.period.week"),
|
|
382
407
|
options: [
|
|
383
408
|
{
|
|
384
|
-
value:
|
|
409
|
+
value: K.TimePeriodType.ThisWeek,
|
|
385
410
|
label: e("condition.period.thisWeek")
|
|
386
411
|
},
|
|
387
412
|
{
|
|
388
|
-
value:
|
|
413
|
+
value: K.TimePeriodType.LastWeek,
|
|
389
414
|
label: e("condition.period.lastWeek")
|
|
390
415
|
},
|
|
391
416
|
{
|
|
392
|
-
value:
|
|
417
|
+
value: K.TimePeriodType.NextWeek,
|
|
393
418
|
label: e("condition.period.nextWeek")
|
|
394
419
|
}
|
|
395
420
|
]
|
|
@@ -398,15 +423,15 @@ var Jo = rt((e) => {
|
|
|
398
423
|
header: e("condition.period.month"),
|
|
399
424
|
options: [
|
|
400
425
|
{
|
|
401
|
-
value:
|
|
426
|
+
value: K.TimePeriodType.ThisMonth,
|
|
402
427
|
label: e("condition.period.thisMonth")
|
|
403
428
|
},
|
|
404
429
|
{
|
|
405
|
-
value:
|
|
430
|
+
value: K.TimePeriodType.LastMonth,
|
|
406
431
|
label: e("condition.period.lastMonth")
|
|
407
432
|
},
|
|
408
433
|
{
|
|
409
|
-
value:
|
|
434
|
+
value: K.TimePeriodType.NextMonth,
|
|
410
435
|
label: e("condition.period.nextMonth")
|
|
411
436
|
}
|
|
412
437
|
]
|
|
@@ -414,10 +439,10 @@ var Jo = rt((e) => {
|
|
|
414
439
|
{
|
|
415
440
|
header: e("condition.period.year"),
|
|
416
441
|
options: [{
|
|
417
|
-
value:
|
|
442
|
+
value: K.TimePeriodType.YearToDate,
|
|
418
443
|
label: e("condition.period.yearToDate")
|
|
419
444
|
}, {
|
|
420
|
-
value:
|
|
445
|
+
value: K.TimePeriodType.LastYear,
|
|
421
446
|
label: e("condition.period.lastYear")
|
|
422
447
|
}]
|
|
423
448
|
},
|
|
@@ -425,51 +450,51 @@ var Jo = rt((e) => {
|
|
|
425
450
|
header: e("condition.period.byMonth"),
|
|
426
451
|
options: [
|
|
427
452
|
{
|
|
428
|
-
value:
|
|
453
|
+
value: K.TimePeriodType.M1,
|
|
429
454
|
label: o(0)
|
|
430
455
|
},
|
|
431
456
|
{
|
|
432
|
-
value:
|
|
457
|
+
value: K.TimePeriodType.M2,
|
|
433
458
|
label: o(1)
|
|
434
459
|
},
|
|
435
460
|
{
|
|
436
|
-
value:
|
|
461
|
+
value: K.TimePeriodType.M3,
|
|
437
462
|
label: o(2)
|
|
438
463
|
},
|
|
439
464
|
{
|
|
440
|
-
value:
|
|
465
|
+
value: K.TimePeriodType.M4,
|
|
441
466
|
label: o(3)
|
|
442
467
|
},
|
|
443
468
|
{
|
|
444
|
-
value:
|
|
469
|
+
value: K.TimePeriodType.M5,
|
|
445
470
|
label: o(4)
|
|
446
471
|
},
|
|
447
472
|
{
|
|
448
|
-
value:
|
|
473
|
+
value: K.TimePeriodType.M6,
|
|
449
474
|
label: o(5)
|
|
450
475
|
},
|
|
451
476
|
{
|
|
452
|
-
value:
|
|
477
|
+
value: K.TimePeriodType.M7,
|
|
453
478
|
label: o(6)
|
|
454
479
|
},
|
|
455
480
|
{
|
|
456
|
-
value:
|
|
481
|
+
value: K.TimePeriodType.M8,
|
|
457
482
|
label: o(7)
|
|
458
483
|
},
|
|
459
484
|
{
|
|
460
|
-
value:
|
|
485
|
+
value: K.TimePeriodType.M9,
|
|
461
486
|
label: o(8)
|
|
462
487
|
},
|
|
463
488
|
{
|
|
464
|
-
value:
|
|
489
|
+
value: K.TimePeriodType.M10,
|
|
465
490
|
label: o(9)
|
|
466
491
|
},
|
|
467
492
|
{
|
|
468
|
-
value:
|
|
493
|
+
value: K.TimePeriodType.M11,
|
|
469
494
|
label: o(10)
|
|
470
495
|
},
|
|
471
496
|
{
|
|
472
|
-
value:
|
|
497
|
+
value: K.TimePeriodType.M12,
|
|
473
498
|
label: o(11)
|
|
474
499
|
}
|
|
475
500
|
]
|
|
@@ -478,38 +503,38 @@ var Jo = rt((e) => {
|
|
|
478
503
|
header: e("condition.period.byQuarter"),
|
|
479
504
|
options: [
|
|
480
505
|
{
|
|
481
|
-
value:
|
|
506
|
+
value: K.TimePeriodType.ThisQuarter,
|
|
482
507
|
label: e("condition.period.thisQuarter")
|
|
483
508
|
},
|
|
484
509
|
{
|
|
485
|
-
value:
|
|
510
|
+
value: K.TimePeriodType.LastQuarter,
|
|
486
511
|
label: e("condition.period.lastQuarter")
|
|
487
512
|
},
|
|
488
513
|
{
|
|
489
|
-
value:
|
|
514
|
+
value: K.TimePeriodType.NextQuarter,
|
|
490
515
|
label: e("condition.period.nextQuarter")
|
|
491
516
|
},
|
|
492
517
|
{
|
|
493
|
-
value:
|
|
518
|
+
value: K.TimePeriodType.Q1,
|
|
494
519
|
label: e("condition.period.q1")
|
|
495
520
|
},
|
|
496
521
|
{
|
|
497
|
-
value:
|
|
522
|
+
value: K.TimePeriodType.Q2,
|
|
498
523
|
label: e("condition.period.q2")
|
|
499
524
|
},
|
|
500
525
|
{
|
|
501
|
-
value:
|
|
526
|
+
value: K.TimePeriodType.Q3,
|
|
502
527
|
label: e("condition.period.q3")
|
|
503
528
|
},
|
|
504
529
|
{
|
|
505
|
-
value:
|
|
530
|
+
value: K.TimePeriodType.Q4,
|
|
506
531
|
label: e("condition.period.q4")
|
|
507
532
|
}
|
|
508
533
|
]
|
|
509
534
|
}
|
|
510
535
|
];
|
|
511
|
-
}(
|
|
512
|
-
return
|
|
536
|
+
}(tt(), Ye()), l = t?.type ?? K.TimePeriodType.Today;
|
|
537
|
+
return At(Lt, {
|
|
513
538
|
...r,
|
|
514
539
|
sx: {
|
|
515
540
|
display: "flex",
|
|
@@ -517,12 +542,12 @@ var Jo = rt((e) => {
|
|
|
517
542
|
gap: 2,
|
|
518
543
|
...r?.sx
|
|
519
544
|
},
|
|
520
|
-
children:
|
|
545
|
+
children: At(qt, {
|
|
521
546
|
size: "small",
|
|
522
|
-
children:
|
|
547
|
+
children: At(no, {
|
|
523
548
|
value: l,
|
|
524
549
|
sx: { backgroundColor: "background.paper" },
|
|
525
|
-
IconComponent: (e) =>
|
|
550
|
+
IconComponent: (e) => At(Be, {
|
|
526
551
|
iconKey: "ExpandMore",
|
|
527
552
|
...e
|
|
528
553
|
}),
|
|
@@ -533,11 +558,11 @@ var Jo = rt((e) => {
|
|
|
533
558
|
disabled: n,
|
|
534
559
|
children: a.map((e, t) => {
|
|
535
560
|
const o = [];
|
|
536
|
-
return t > 0 && o.push(
|
|
537
|
-
sx:
|
|
561
|
+
return t > 0 && o.push(At(Ut, {}, `divider-${t}`)), o.push(At(Xt, {
|
|
562
|
+
sx: Zo,
|
|
538
563
|
children: e.header
|
|
539
|
-
}, `header-${t}`)), e.options.map((e) => o.push(
|
|
540
|
-
sx:
|
|
564
|
+
}, `header-${t}`)), e.options.map((e) => o.push(At(Zt, {
|
|
565
|
+
sx: en,
|
|
541
566
|
value: e.value,
|
|
542
567
|
children: e.label
|
|
543
568
|
}, e.value))), o;
|
|
@@ -546,10 +571,10 @@ var Jo = rt((e) => {
|
|
|
546
571
|
})
|
|
547
572
|
});
|
|
548
573
|
});
|
|
549
|
-
|
|
550
|
-
var
|
|
551
|
-
const { option: t, onOptionChange: o, readOnly: n, ...r } = e, a =
|
|
552
|
-
return
|
|
574
|
+
tn.displayName = "TimePeriodOption";
|
|
575
|
+
var on = lt((e) => {
|
|
576
|
+
const { option: t, onOptionChange: o, readOnly: n, ...r } = e, a = tt(), l = t?.top ?? !0, i = t?.limit ?? 10, s = t?.percent ?? !1;
|
|
577
|
+
return Wt(Lt, {
|
|
553
578
|
...r,
|
|
554
579
|
sx: {
|
|
555
580
|
display: "flex",
|
|
@@ -558,13 +583,13 @@ var Xo = rt((e) => {
|
|
|
558
583
|
...r?.sx
|
|
559
584
|
},
|
|
560
585
|
children: [
|
|
561
|
-
|
|
586
|
+
At(qt, {
|
|
562
587
|
size: "small",
|
|
563
588
|
sx: { flex: 1 },
|
|
564
|
-
children:
|
|
589
|
+
children: Wt(no, {
|
|
565
590
|
value: l ? "top" : "bottom",
|
|
566
591
|
sx: { backgroundColor: "background.paper" },
|
|
567
|
-
IconComponent: (e) =>
|
|
592
|
+
IconComponent: (e) => At(Be, {
|
|
568
593
|
iconKey: "ExpandMore",
|
|
569
594
|
...e
|
|
570
595
|
}),
|
|
@@ -573,16 +598,16 @@ var Xo = rt((e) => {
|
|
|
573
598
|
top: "top" === e.target.value
|
|
574
599
|
}),
|
|
575
600
|
disabled: n,
|
|
576
|
-
children: [
|
|
601
|
+
children: [At(Zt, {
|
|
577
602
|
value: "top",
|
|
578
603
|
children: a("condition.top")
|
|
579
|
-
}),
|
|
604
|
+
}), At(Zt, {
|
|
580
605
|
value: "bottom",
|
|
581
606
|
children: a("condition.bottom")
|
|
582
607
|
})]
|
|
583
608
|
})
|
|
584
609
|
}),
|
|
585
|
-
|
|
610
|
+
At(io, {
|
|
586
611
|
size: "small",
|
|
587
612
|
placeholder: "10",
|
|
588
613
|
value: i,
|
|
@@ -598,13 +623,13 @@ var Xo = rt((e) => {
|
|
|
598
623
|
slotProps: { input: { sx: { backgroundColor: "background.paper" } } },
|
|
599
624
|
sx: { flex: .6 }
|
|
600
625
|
}),
|
|
601
|
-
|
|
626
|
+
At(qt, {
|
|
602
627
|
size: "small",
|
|
603
628
|
sx: { flex: 1 },
|
|
604
|
-
children:
|
|
629
|
+
children: Wt(no, {
|
|
605
630
|
value: s ? "percent" : "items",
|
|
606
631
|
sx: { backgroundColor: "background.paper" },
|
|
607
|
-
IconComponent: (e) =>
|
|
632
|
+
IconComponent: (e) => At(Be, {
|
|
608
633
|
iconKey: "ExpandMore",
|
|
609
634
|
...e
|
|
610
635
|
}),
|
|
@@ -613,10 +638,10 @@ var Xo = rt((e) => {
|
|
|
613
638
|
percent: "percent" === e.target.value
|
|
614
639
|
}),
|
|
615
640
|
disabled: n,
|
|
616
|
-
children: [
|
|
641
|
+
children: [At(Zt, {
|
|
617
642
|
value: "items",
|
|
618
643
|
children: a("condition.items")
|
|
619
|
-
}),
|
|
644
|
+
}), At(Zt, {
|
|
620
645
|
value: "percent",
|
|
621
646
|
children: a("condition.percent")
|
|
622
647
|
})]
|
|
@@ -625,41 +650,50 @@ var Xo = rt((e) => {
|
|
|
625
650
|
]
|
|
626
651
|
});
|
|
627
652
|
});
|
|
628
|
-
|
|
629
|
-
var
|
|
630
|
-
const { option: t, onOptionChange: o,
|
|
631
|
-
|
|
632
|
-
|
|
653
|
+
on.displayName = "TopNOption";
|
|
654
|
+
var nn = lt((e) => {
|
|
655
|
+
const { option: t, onOptionChange: o, selector: n, readOnly: r, ...a } = e, l = tt(), i = ((e) => {
|
|
656
|
+
switch (e?.getName()) {
|
|
657
|
+
case K.BuiltInSelectorNames.Date: return "date";
|
|
658
|
+
case K.BuiltInSelectorNames.Time: return "time";
|
|
659
|
+
case K.BuiltInSelectorNames.DateTime: return "dateTime";
|
|
660
|
+
default: return;
|
|
661
|
+
}
|
|
662
|
+
})(n);
|
|
663
|
+
return Wt(Lt, {
|
|
664
|
+
...a,
|
|
633
665
|
sx: {
|
|
634
666
|
display: "flex",
|
|
635
667
|
flexDirection: "row",
|
|
636
668
|
gap: .25,
|
|
637
|
-
...
|
|
669
|
+
...a?.sx
|
|
638
670
|
},
|
|
639
|
-
children: [
|
|
671
|
+
children: [At(jo, {
|
|
640
672
|
option: t?.from ?? null,
|
|
641
|
-
|
|
673
|
+
literal: i,
|
|
674
|
+
placeholder: l("condition.from"),
|
|
642
675
|
onOptionChange: (e) => {
|
|
643
676
|
o({
|
|
644
677
|
...t,
|
|
645
678
|
from: e
|
|
646
679
|
});
|
|
647
680
|
},
|
|
648
|
-
readOnly:
|
|
681
|
+
readOnly: r,
|
|
649
682
|
sx: {
|
|
650
683
|
flex: .6,
|
|
651
684
|
minWidth: 0
|
|
652
685
|
}
|
|
653
|
-
}),
|
|
686
|
+
}), At(jo, {
|
|
654
687
|
option: t?.to ?? null,
|
|
655
|
-
|
|
688
|
+
literal: i,
|
|
689
|
+
placeholder: l("condition.to"),
|
|
656
690
|
onOptionChange: (e) => {
|
|
657
691
|
o({
|
|
658
692
|
...t,
|
|
659
693
|
to: e
|
|
660
694
|
});
|
|
661
695
|
},
|
|
662
|
-
readOnly:
|
|
696
|
+
readOnly: r,
|
|
663
697
|
sx: {
|
|
664
698
|
flex: .6,
|
|
665
699
|
minWidth: 0
|
|
@@ -667,14 +701,14 @@ var Zo = rt((e) => {
|
|
|
667
701
|
})]
|
|
668
702
|
});
|
|
669
703
|
});
|
|
670
|
-
|
|
671
|
-
var
|
|
672
|
-
const { option: t, onOptionChange: o, readOnly: n, ...r } = e, a =
|
|
673
|
-
return
|
|
704
|
+
nn.displayName = "BetweenOption";
|
|
705
|
+
var rn = lt((e) => {
|
|
706
|
+
const { option: t, onOptionChange: o, readOnly: n, ...r } = e, a = tt(), l = Ro(), s = t?.isIFormula ? l.display(t) : t ?? "";
|
|
707
|
+
return At(i, {
|
|
674
708
|
size: "small",
|
|
675
|
-
home:
|
|
709
|
+
home: l.home,
|
|
676
710
|
value: s,
|
|
677
|
-
onChangeText: (e) => o(e.trim().length > 0 ?
|
|
711
|
+
onChangeText: (e) => o(e.trim().length > 0 ? l.compile(e) : e),
|
|
678
712
|
placeholder: a("condition.enterFormula"),
|
|
679
713
|
disabled: n,
|
|
680
714
|
fullWidth: !0,
|
|
@@ -685,11 +719,11 @@ var en = rt((e) => {
|
|
|
685
719
|
...r
|
|
686
720
|
});
|
|
687
721
|
});
|
|
688
|
-
|
|
689
|
-
var
|
|
690
|
-
const { value: t = null, selectors: o, onChange: n, title: r, allowNull: a = !1, readOnly: l = !1, ...i } = e, s =
|
|
722
|
+
rn.displayName = "ExpressionOption";
|
|
723
|
+
var an = lt((e) => {
|
|
724
|
+
const { value: t = null, selectors: o, onChange: n, title: r, allowNull: a = !1, readOnly: l = !1, ...i } = e, s = tt(), d = r ?? s("condition.selectorTitle"), c = o.map((e) => {
|
|
691
725
|
const t = e.getName();
|
|
692
|
-
return
|
|
726
|
+
return At(Zt, {
|
|
693
727
|
value: t,
|
|
694
728
|
children: e.getTitle?.() ?? e.getName()
|
|
695
729
|
}, t);
|
|
@@ -699,14 +733,14 @@ var tn = rt((e) => {
|
|
|
699
733
|
...p,
|
|
700
734
|
"& .MuiSelect-icon": { display: "none" },
|
|
701
735
|
"& .MuiOutlinedInput-notchedOutline": { borderColor: "action.disabled" }
|
|
702
|
-
}),
|
|
736
|
+
}), Wt(qt, {
|
|
703
737
|
size: "small",
|
|
704
738
|
...i,
|
|
705
|
-
children: [
|
|
739
|
+
children: [At(Jt, { children: d }), Wt(no, {
|
|
706
740
|
value: t?.getName() ?? "null",
|
|
707
741
|
label: d,
|
|
708
742
|
readOnly: l,
|
|
709
|
-
IconComponent: (e) =>
|
|
743
|
+
IconComponent: (e) => At(Be, {
|
|
710
744
|
iconKey: "ExpandMore",
|
|
711
745
|
...e
|
|
712
746
|
}),
|
|
@@ -715,32 +749,32 @@ var tn = rt((e) => {
|
|
|
715
749
|
n(r);
|
|
716
750
|
},
|
|
717
751
|
sx: p,
|
|
718
|
-
children: [a &&
|
|
752
|
+
children: [a && At(Zt, {
|
|
719
753
|
value: "null",
|
|
720
754
|
children: s("condition.anySelector")
|
|
721
755
|
}), c]
|
|
722
756
|
})]
|
|
723
757
|
});
|
|
724
758
|
});
|
|
725
|
-
|
|
726
|
-
var
|
|
727
|
-
const { value: t, operators: o, onChange: n, title: r, readOnly: a = !1, ...l } = e, i =
|
|
759
|
+
an.displayName = "SelectorSelect";
|
|
760
|
+
var ln = lt((e) => {
|
|
761
|
+
const { value: t, operators: o, onChange: n, title: r, readOnly: a = !1, ...l } = e, i = tt(), s = Ye(), d = r ?? i("condition.operatorTitle"), c = /* @__PURE__ */ new Map();
|
|
728
762
|
o.forEach((e) => {
|
|
729
763
|
c.set(e.getName(), e);
|
|
730
764
|
});
|
|
731
|
-
const p =
|
|
765
|
+
const p = Jo(o, (e) => At(Zt, {
|
|
732
766
|
value: e.getName(),
|
|
733
|
-
sx:
|
|
767
|
+
sx: en,
|
|
734
768
|
children: e.getTitle?.()
|
|
735
769
|
}, e.getName()), i, s);
|
|
736
|
-
return
|
|
770
|
+
return Wt(qt, {
|
|
737
771
|
size: "small",
|
|
738
772
|
...l,
|
|
739
|
-
children: [
|
|
773
|
+
children: [At(Jt, { children: d }), At(no, {
|
|
740
774
|
value: t?.getName() ?? "null",
|
|
741
775
|
label: d,
|
|
742
776
|
readOnly: a,
|
|
743
|
-
IconComponent: (e) =>
|
|
777
|
+
IconComponent: (e) => At(Be, {
|
|
744
778
|
iconKey: "ExpandMore",
|
|
745
779
|
...e
|
|
746
780
|
}),
|
|
@@ -756,23 +790,23 @@ var on = rt((e) => {
|
|
|
756
790
|
})]
|
|
757
791
|
});
|
|
758
792
|
});
|
|
759
|
-
|
|
760
|
-
var
|
|
761
|
-
const { icon: o, tooltip: n, label: r, darkMode: a, propsPanel: l, value: i, operators: s, onChange: d, title: c, readOnly: p = !1, ...u } = e, m =
|
|
793
|
+
ln.displayName = "OperatorSelect";
|
|
794
|
+
var sn = lt(rt((e, t) => {
|
|
795
|
+
const { icon: o, tooltip: n, label: r, darkMode: a, propsPanel: l, value: i, operators: s, onChange: d, title: c, readOnly: p = !1, ...u } = e, m = tt(), g = Ye();
|
|
762
796
|
c ?? m("condition.operatorTitle");
|
|
763
|
-
const h = o ||
|
|
764
|
-
return y.current = d,
|
|
797
|
+
const h = o || At(Be, { iconKey: "Add" }), y = pt(d);
|
|
798
|
+
return y.current = d, At(bt, {
|
|
765
799
|
ref: t,
|
|
766
|
-
createPopupPanel:
|
|
767
|
-
const { closeFloatAll: t } = e, o =
|
|
768
|
-
sx:
|
|
800
|
+
createPopupPanel: it((e) => {
|
|
801
|
+
const { closeFloatAll: t } = e, o = Jo(s, (e) => At(Zt, {
|
|
802
|
+
sx: en,
|
|
769
803
|
value: e.getName(),
|
|
770
804
|
onClick: () => {
|
|
771
805
|
t?.(), y.current(e);
|
|
772
806
|
},
|
|
773
807
|
children: e.getTitle?.()
|
|
774
808
|
}, e.getName()), m, g);
|
|
775
|
-
return
|
|
809
|
+
return At("div", {
|
|
776
810
|
style: {
|
|
777
811
|
minWidth: 200,
|
|
778
812
|
paddingTop: "8px",
|
|
@@ -781,9 +815,9 @@ var nn = rt(ot((e, t) => {
|
|
|
781
815
|
},
|
|
782
816
|
...l,
|
|
783
817
|
onKeyDown: (e) => {
|
|
784
|
-
e.which ===
|
|
818
|
+
e.which === Re.Enter && t?.();
|
|
785
819
|
},
|
|
786
|
-
children:
|
|
820
|
+
children: At(eo, {
|
|
787
821
|
disablePadding: !0,
|
|
788
822
|
children: o
|
|
789
823
|
})
|
|
@@ -799,18 +833,18 @@ var nn = rt(ot((e, t) => {
|
|
|
799
833
|
icon: h,
|
|
800
834
|
...u
|
|
801
835
|
});
|
|
802
|
-
})),
|
|
803
|
-
const { operator: t, inputs: o, onOptionChange: n, operators: r, selector: a, readOnly: l, ...i } = e, s =
|
|
836
|
+
})), dn = lt((e) => {
|
|
837
|
+
const { operator: t, inputs: o, onOptionChange: n, operators: r, selector: a, readOnly: l, ...i } = e, s = tt(), d = "not" === t.getName(), c = d ? null : "and" === t.getName() ? s("condition.and") : s("condition.or"), p = (e, t) => {
|
|
804
838
|
const r = o.slice(), a = {
|
|
805
839
|
operator: t.operator,
|
|
806
840
|
param: t.param
|
|
807
841
|
};
|
|
808
842
|
((e, t) => {
|
|
809
|
-
const o =
|
|
810
|
-
o &&
|
|
843
|
+
const o = qo.get(e);
|
|
844
|
+
o && qo.set(t, o);
|
|
811
845
|
})(o[e], a), r[e] = a, n(r);
|
|
812
846
|
}, u = d ? s("condition.not") : c;
|
|
813
|
-
return
|
|
847
|
+
return At(Lt, {
|
|
814
848
|
sx: {
|
|
815
849
|
display: "flex",
|
|
816
850
|
flexDirection: "column",
|
|
@@ -820,7 +854,7 @@ var nn = rt(ot((e, t) => {
|
|
|
820
854
|
borderColor: "divider"
|
|
821
855
|
},
|
|
822
856
|
...i,
|
|
823
|
-
children: o.map((e, t) =>
|
|
857
|
+
children: o.map((e, t) => At(ot.Fragment, { children: At(yn, {
|
|
824
858
|
operatorTitle: t > 0 ? u ?? "" : "",
|
|
825
859
|
operatorParam: e,
|
|
826
860
|
onOperatorParamChange: (e) => p(t, e),
|
|
@@ -832,13 +866,13 @@ var nn = rt(ot((e, t) => {
|
|
|
832
866
|
selector: a,
|
|
833
867
|
readOnly: l,
|
|
834
868
|
required: d
|
|
835
|
-
}) },
|
|
869
|
+
}) }, Go(e)))
|
|
836
870
|
});
|
|
837
871
|
});
|
|
838
|
-
|
|
839
|
-
var
|
|
840
|
-
const { option: t, onOptionChange: o, readOnly: n } = e, r =
|
|
841
|
-
return
|
|
872
|
+
dn.displayName = "CombinatorOption";
|
|
873
|
+
var cn = lt((e) => {
|
|
874
|
+
const { option: t, onOptionChange: o, readOnly: n } = e, r = tt();
|
|
875
|
+
return Wt(po, {
|
|
842
876
|
exclusive: !0,
|
|
843
877
|
size: "small",
|
|
844
878
|
value: t ?? !0,
|
|
@@ -851,34 +885,34 @@ var an = rt((e) => {
|
|
|
851
885
|
backgroundColor: "background.paper"
|
|
852
886
|
},
|
|
853
887
|
disabled: n,
|
|
854
|
-
children: [
|
|
888
|
+
children: [At(co, {
|
|
855
889
|
value: !0,
|
|
856
890
|
children: r("condition.true")
|
|
857
|
-
}),
|
|
891
|
+
}), At(co, {
|
|
858
892
|
value: !1,
|
|
859
893
|
children: r("condition.false")
|
|
860
894
|
})]
|
|
861
895
|
});
|
|
862
896
|
});
|
|
863
|
-
function
|
|
864
|
-
if (!e) return
|
|
897
|
+
function pn(e, t) {
|
|
898
|
+
if (!e) return un(t);
|
|
865
899
|
const o = /* @__PURE__ */ new Date(`${e}T${t || "00:00"}`);
|
|
866
900
|
return isNaN(o.getTime()) ? null : o;
|
|
867
901
|
}
|
|
868
|
-
function
|
|
869
|
-
return e ?
|
|
902
|
+
function un(e) {
|
|
903
|
+
return e ? pn("1970-01-01", e) : null;
|
|
870
904
|
}
|
|
871
|
-
|
|
872
|
-
var
|
|
873
|
-
const { option: t, onOptionChange: o, allowFormula: n, readOnly: r, type: a = "dateTime", ...l } = e, i =
|
|
905
|
+
cn.displayName = "BooleanOption";
|
|
906
|
+
var mn = lt((e) => {
|
|
907
|
+
const { option: t, onOptionChange: o, allowFormula: n, readOnly: r, type: a = "dateTime", ...l } = e, i = tt(), s = "date" === a || "dateTime" === a, d = "time" === a || "dateTime" === a, c = De(), p = it((e) => {
|
|
874
908
|
if (!c || null === e) return null;
|
|
875
909
|
const t = c.createCell({ value: e }), o = t.getValue();
|
|
876
|
-
return t.getType() !==
|
|
877
|
-
}, [c]), u =
|
|
910
|
+
return t.getType() !== Q.Number ? null : o;
|
|
911
|
+
}, [c]), u = it((e) => c ? c.createCell({
|
|
878
912
|
value: e,
|
|
879
913
|
style: { numberFormat: "Short DateTime" }
|
|
880
914
|
}).getDate() : null, [c]);
|
|
881
|
-
if (n && ("string" == typeof t || t?.isIFormula)) return
|
|
915
|
+
if (n && ("string" == typeof t || t?.isIFormula)) return At(jo, {
|
|
882
916
|
option: t,
|
|
883
917
|
onOptionChange: (e) => o(e),
|
|
884
918
|
readOnly: r,
|
|
@@ -889,7 +923,7 @@ var dn = rt((e) => {
|
|
|
889
923
|
const y = function(e) {
|
|
890
924
|
return !e || isNaN(e.getTime()) ? "" : `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
|
|
891
925
|
}(m);
|
|
892
|
-
return
|
|
926
|
+
return Wt(Lt, {
|
|
893
927
|
...l,
|
|
894
928
|
sx: {
|
|
895
929
|
display: "flex",
|
|
@@ -897,22 +931,22 @@ var dn = rt((e) => {
|
|
|
897
931
|
gap: .5,
|
|
898
932
|
...l?.sx
|
|
899
933
|
},
|
|
900
|
-
children: [s &&
|
|
934
|
+
children: [s && At(Mo, {
|
|
901
935
|
option: g,
|
|
902
936
|
type: "date",
|
|
903
937
|
placeholder: i("condition.enterDate"),
|
|
904
938
|
onOptionChange: (e) => {
|
|
905
|
-
const t = p(
|
|
939
|
+
const t = p(pn(e, y));
|
|
906
940
|
o(t);
|
|
907
941
|
},
|
|
908
942
|
sx: { flex: 1.5 },
|
|
909
943
|
readOnly: r
|
|
910
|
-
}), d &&
|
|
944
|
+
}), d && At(Mo, {
|
|
911
945
|
option: y,
|
|
912
946
|
type: "time",
|
|
913
947
|
placeholder: i("condition.enterTime"),
|
|
914
948
|
onOptionChange: (e) => {
|
|
915
|
-
const t = p("time" === a ?
|
|
949
|
+
const t = p("time" === a ? un(e) : pn(g, e));
|
|
916
950
|
o(t);
|
|
917
951
|
},
|
|
918
952
|
sx: { flex: 1 },
|
|
@@ -920,28 +954,28 @@ var dn = rt((e) => {
|
|
|
920
954
|
})]
|
|
921
955
|
});
|
|
922
956
|
});
|
|
923
|
-
|
|
924
|
-
var
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
]),
|
|
935
|
-
const { operatorParam: t, onOperatorParamChange: o, onRemove: n, operators: r, selector: a, operatorTitle: l, readOnly: i, required: s, ...d } = e, c =
|
|
957
|
+
mn.displayName = "DateTimeOption";
|
|
958
|
+
var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
959
|
+
gn.EqualTo,
|
|
960
|
+
gn.GreaterThan,
|
|
961
|
+
gn.GreaterThanEqualTo,
|
|
962
|
+
gn.LessThan,
|
|
963
|
+
gn.LessThanEqualTo,
|
|
964
|
+
gn.After,
|
|
965
|
+
gn.AfterEqualTo,
|
|
966
|
+
gn.Before,
|
|
967
|
+
gn.BeforeEqualTo
|
|
968
|
+
]), yn = lt((e) => {
|
|
969
|
+
const { operatorParam: t, onOperatorParamChange: o, onRemove: n, operators: r, selector: a, operatorTitle: l, readOnly: i, required: s, ...d } = e, c = tt(), p = l ?? c("condition.when"), u = t?.operator ?? null, m = r.find((e) => e.getName() === u) ?? null, g = t?.param ?? null, h = !!m?.isCombinator?.(), [y, { width: f }] = No(), b = ct(() => !m || h ? null : m.getParamType?.(a ?? void 0) ?? null, [
|
|
936
970
|
m,
|
|
937
971
|
h,
|
|
938
972
|
a
|
|
939
|
-
]), x = !h && "list" !== b && f > 360, v =
|
|
973
|
+
]), x = !h && "list" !== b && f > 360, v = Ue((e) => {
|
|
940
974
|
o({
|
|
941
975
|
operator: u,
|
|
942
976
|
param: e
|
|
943
977
|
});
|
|
944
|
-
}, [o, u]), C =
|
|
978
|
+
}, [o, u]), C = ct(() => {
|
|
945
979
|
if (!m || h || !b) return null;
|
|
946
980
|
const e = {
|
|
947
981
|
sx: {
|
|
@@ -950,8 +984,8 @@ var cn = $.BuiltInOperatorNames, pn = /* @__PURE__ */ new Set([
|
|
|
950
984
|
},
|
|
951
985
|
option: g,
|
|
952
986
|
onOptionChange: v
|
|
953
|
-
}, t = !!u &&
|
|
954
|
-
return b ===
|
|
987
|
+
}, t = !!u && hn.has(u);
|
|
988
|
+
return b === K.BuiltInSelectorNames.Number || b === K.BuiltInSelectorNames.TextLength ? At(t ? jo : Ao, { ...e }) : b === K.BuiltInSelectorNames.Whole ? t ? At(jo, { ...e }) : At(Ao, {
|
|
955
989
|
...e,
|
|
956
990
|
placeholder: c("condition.enterWholeNumber"),
|
|
957
991
|
slotProps: { htmlInput: {
|
|
@@ -968,39 +1002,43 @@ var cn = $.BuiltInOperatorNames, pn = /* @__PURE__ */ new Set([
|
|
|
968
1002
|
/^-?\d+$/.test(e.clipboardData.getData("text")) || e.preventDefault();
|
|
969
1003
|
}
|
|
970
1004
|
} }
|
|
971
|
-
}) : b ===
|
|
1005
|
+
}) : b === K.BuiltInSelectorNames.Text ? At(t ? jo : Mo, { ...e }) : b === K.BuiltInSelectorNames.DateTime ? At(mn, {
|
|
972
1006
|
...e,
|
|
973
1007
|
allowFormula: t
|
|
974
|
-
}) : b ===
|
|
1008
|
+
}) : b === K.BuiltInSelectorNames.Date ? At(mn, {
|
|
975
1009
|
...e,
|
|
976
1010
|
type: "date",
|
|
977
1011
|
allowFormula: t
|
|
978
|
-
}) : b ===
|
|
1012
|
+
}) : b === K.BuiltInSelectorNames.Time ? At(mn, {
|
|
979
1013
|
...e,
|
|
980
1014
|
type: "time",
|
|
981
1015
|
allowFormula: t
|
|
982
|
-
}) : b ===
|
|
1016
|
+
}) : b === K.BuiltInSelectorNames.List ? At(Ko, { ...e }) : b === K.BuiltInSelectorNames.Logical ? At(cn, { ...e }) : b === K.BuiltInOperatorNames.Average ? At(Ho, { ...e }) : b === K.BuiltInOperatorNames.TimePeriod ? At(tn, { ...e }) : b === K.BuiltInOperatorNames.TopN ? At(on, { ...e }) : b === K.BuiltInOperatorNames.Between ? At(nn, {
|
|
1017
|
+
...e,
|
|
1018
|
+
selector: a
|
|
1019
|
+
}) : b === K.BuiltInOperatorNames.Expression ? At(rn, { ...e }) : null;
|
|
983
1020
|
}, [
|
|
984
1021
|
m,
|
|
985
1022
|
h,
|
|
986
1023
|
b,
|
|
987
1024
|
g,
|
|
1025
|
+
a,
|
|
988
1026
|
c
|
|
989
|
-
]), k =
|
|
1027
|
+
]), k = ct(() => h && g ? Array.isArray(g) ? g : [g] : [], [h, g]), w = h && "not" === m?.getName(), S = (e) => {
|
|
990
1028
|
if (!e || e === m) return;
|
|
991
1029
|
const t = !!e.isCombinator?.();
|
|
992
1030
|
let n;
|
|
993
|
-
if (t && h) n = "not" === e.getName() ? k[0] ??
|
|
1031
|
+
if (t && h) n = "not" === e.getName() ? k[0] ?? Xo(e, r, a) : k.length > 0 ? k : Xo(e, r, a);
|
|
994
1032
|
else {
|
|
995
1033
|
const o = m?.getParamType?.(a ?? void 0) ?? null, l = e.getParamType?.(a ?? void 0) ?? null;
|
|
996
|
-
n = !t && l && l === o ? g :
|
|
1034
|
+
n = !t && l && l === o ? g : Xo(e, r, a);
|
|
997
1035
|
}
|
|
998
1036
|
o({
|
|
999
1037
|
operator: e?.getName() ?? null,
|
|
1000
1038
|
param: n
|
|
1001
1039
|
});
|
|
1002
1040
|
};
|
|
1003
|
-
return
|
|
1041
|
+
return At(Lt, {
|
|
1004
1042
|
ref: y,
|
|
1005
1043
|
sx: {
|
|
1006
1044
|
display: "flex",
|
|
@@ -1013,7 +1051,7 @@ var cn = $.BuiltInOperatorNames, pn = /* @__PURE__ */ new Set([
|
|
|
1013
1051
|
p: 1
|
|
1014
1052
|
},
|
|
1015
1053
|
...d,
|
|
1016
|
-
children: x ?
|
|
1054
|
+
children: x ? Wt(Lt, {
|
|
1017
1055
|
sx: {
|
|
1018
1056
|
display: "flex",
|
|
1019
1057
|
flexDirection: "row",
|
|
@@ -1021,7 +1059,7 @@ var cn = $.BuiltInOperatorNames, pn = /* @__PURE__ */ new Set([
|
|
|
1021
1059
|
gap: .5
|
|
1022
1060
|
},
|
|
1023
1061
|
children: [
|
|
1024
|
-
|
|
1062
|
+
At(ln, {
|
|
1025
1063
|
title: p,
|
|
1026
1064
|
sx: { flex: .4 },
|
|
1027
1065
|
value: m,
|
|
@@ -1030,12 +1068,12 @@ var cn = $.BuiltInOperatorNames, pn = /* @__PURE__ */ new Set([
|
|
|
1030
1068
|
readOnly: i
|
|
1031
1069
|
}),
|
|
1032
1070
|
C,
|
|
1033
|
-
!i && !s &&
|
|
1034
|
-
icon:
|
|
1071
|
+
!i && !s && At(ft, {
|
|
1072
|
+
icon: At(Be, { iconKey: "Close" }),
|
|
1035
1073
|
onClick: n
|
|
1036
1074
|
})
|
|
1037
1075
|
]
|
|
1038
|
-
}) : Mt
|
|
1076
|
+
}) : Wt(Mt, { children: [Wt(Lt, {
|
|
1039
1077
|
sx: {
|
|
1040
1078
|
display: "flex",
|
|
1041
1079
|
flexDirection: "row",
|
|
@@ -1043,7 +1081,7 @@ var cn = $.BuiltInOperatorNames, pn = /* @__PURE__ */ new Set([
|
|
|
1043
1081
|
gap: .5
|
|
1044
1082
|
},
|
|
1045
1083
|
children: [
|
|
1046
|
-
|
|
1084
|
+
At(ln, {
|
|
1047
1085
|
title: p,
|
|
1048
1086
|
sx: { flex: 1 },
|
|
1049
1087
|
value: m,
|
|
@@ -1051,14 +1089,14 @@ var cn = $.BuiltInOperatorNames, pn = /* @__PURE__ */ new Set([
|
|
|
1051
1089
|
onChange: S,
|
|
1052
1090
|
readOnly: i
|
|
1053
1091
|
}),
|
|
1054
|
-
h && !w && !i &&
|
|
1092
|
+
h && !w && !i && At(sn, {
|
|
1055
1093
|
label: m?.getTitle?.(),
|
|
1056
|
-
icon:
|
|
1094
|
+
icon: At(Be, { iconKey: "Add" }),
|
|
1057
1095
|
operators: r,
|
|
1058
1096
|
value: null,
|
|
1059
1097
|
onChange: (e) => {
|
|
1060
1098
|
if (!e) return;
|
|
1061
|
-
const t =
|
|
1099
|
+
const t = Xo(e, r, a), n = [...k, {
|
|
1062
1100
|
operator: e?.getName() ?? null,
|
|
1063
1101
|
param: t
|
|
1064
1102
|
}];
|
|
@@ -1068,13 +1106,13 @@ var cn = $.BuiltInOperatorNames, pn = /* @__PURE__ */ new Set([
|
|
|
1068
1106
|
});
|
|
1069
1107
|
}
|
|
1070
1108
|
}),
|
|
1071
|
-
!i && !s &&
|
|
1072
|
-
icon:
|
|
1109
|
+
!i && !s && At(ft, {
|
|
1110
|
+
icon: At(Be, { iconKey: "Close" }),
|
|
1073
1111
|
disabled: i,
|
|
1074
1112
|
onClick: n
|
|
1075
1113
|
})
|
|
1076
1114
|
]
|
|
1077
|
-
}), h ?
|
|
1115
|
+
}), h ? At(dn, {
|
|
1078
1116
|
operator: m,
|
|
1079
1117
|
inputs: k,
|
|
1080
1118
|
onOptionChange: (e) => {
|
|
@@ -1089,13 +1127,13 @@ var cn = $.BuiltInOperatorNames, pn = /* @__PURE__ */ new Set([
|
|
|
1089
1127
|
}) : C] })
|
|
1090
1128
|
});
|
|
1091
1129
|
});
|
|
1092
|
-
|
|
1093
|
-
var
|
|
1094
|
-
const { condition: t, onConditionChange: o, showIncludeBlanks: n = !1, selectorTitle: r, readOnly: a, operators: l, selectors: i, ranges: s, ...d } = e, c =
|
|
1130
|
+
yn.displayName = "OperatorAndParamEditor";
|
|
1131
|
+
var fn = lt((e) => {
|
|
1132
|
+
const { condition: t, onConditionChange: o, showIncludeBlanks: n = !1, selectorTitle: r, readOnly: a, operators: l, selectors: i, ranges: s, ...d } = e, c = tt(), p = Ye(), [u, m] = ut(() => t?.getSelector() ?? null), [g, h] = ut(() => t?.getOperator() ? {
|
|
1095
1133
|
operator: t.getOperator().getName(),
|
|
1096
1134
|
param: t.getParam()
|
|
1097
|
-
} : null), [y, f] =
|
|
1098
|
-
|
|
1135
|
+
} : null), [y, f] = ut(() => t?.isIncludeBlanks() ?? !1);
|
|
1136
|
+
dt(() => {
|
|
1099
1137
|
if (!t) return m(null), void h(null);
|
|
1100
1138
|
const e = t.getOperator(), o = t.getSelector() ?? null;
|
|
1101
1139
|
m(o), h(e ? {
|
|
@@ -1103,12 +1141,12 @@ var mn = rt((e) => {
|
|
|
1103
1141
|
param: t.getParam()
|
|
1104
1142
|
} : null), f(t.isIncludeBlanks());
|
|
1105
1143
|
}, [t]);
|
|
1106
|
-
const b =
|
|
1144
|
+
const b = ct(() => (i ?? Object.values(z.BuiltInSelectors)).slice().sort((e, t) => (e.getTitle?.() ?? "").localeCompare(t.getTitle?.() ?? "", p)), [i, p]), x = ct(() => l ?? Object.values(z.BuiltInOperators), [l]), v = ct(() => Yo(u, x, p), [
|
|
1107
1145
|
u,
|
|
1108
1146
|
x,
|
|
1109
1147
|
p
|
|
1110
|
-
]), C =
|
|
1111
|
-
|
|
1148
|
+
]), C = pt(/* @__PURE__ */ new Map()), k = (e) => e?.getName() ?? "", w = pt(null), S = pt(!1);
|
|
1149
|
+
dt(() => {
|
|
1112
1150
|
if (!S.current) return;
|
|
1113
1151
|
S.current = !1;
|
|
1114
1152
|
const e = Array.from(w.current?.querySelectorAll("input:not([type=\"checkbox\"]):not([type=\"radio\"]):not([type=\"hidden\"]):not([tabindex=\"-1\"]), textarea") ?? []).find((e) => !e.disabled && !e.readOnly && "true" !== e.getAttribute("aria-hidden"));
|
|
@@ -1121,7 +1159,7 @@ var mn = rt((e) => {
|
|
|
1121
1159
|
includeBlanks: y
|
|
1122
1160
|
});
|
|
1123
1161
|
}, F = n;
|
|
1124
|
-
return
|
|
1162
|
+
return Wt(Lt, {
|
|
1125
1163
|
sx: {
|
|
1126
1164
|
display: "flex",
|
|
1127
1165
|
flexDirection: "column",
|
|
@@ -1135,27 +1173,27 @@ var mn = rt((e) => {
|
|
|
1135
1173
|
},
|
|
1136
1174
|
...d,
|
|
1137
1175
|
children: [
|
|
1138
|
-
|
|
1176
|
+
At(an, {
|
|
1139
1177
|
title: r,
|
|
1140
1178
|
selectors: b,
|
|
1141
1179
|
value: u,
|
|
1142
1180
|
onChange: (e) => {
|
|
1143
1181
|
g && C.current.set(k(u), g);
|
|
1144
1182
|
const t = ((e) => {
|
|
1145
|
-
const { from: t, to: o, current: n, remembered: r, operators: a, context: l } = e, i =
|
|
1183
|
+
const { from: t, to: o, current: n, remembered: r, operators: a, context: l } = e, i = Yo(o, a), s = (e) => e && i.find((t) => t.getName() === e) || null;
|
|
1146
1184
|
if (r && s(r.operator)) return r;
|
|
1147
1185
|
const d = s(n?.operator);
|
|
1148
1186
|
if (n && d) {
|
|
1149
1187
|
const e = (d.getParamType?.(t ?? void 0) ?? null) !== (d.getParamType?.(o ?? void 0) ?? null);
|
|
1150
1188
|
return d.isCombinator?.() || e ? {
|
|
1151
1189
|
operator: n.operator,
|
|
1152
|
-
param:
|
|
1190
|
+
param: Xo(d, i, o)
|
|
1153
1191
|
} : n;
|
|
1154
1192
|
}
|
|
1155
1193
|
const c = o?.getDefaultCondition?.(l) ?? null, p = s(c?.operator);
|
|
1156
1194
|
return c && p ? {
|
|
1157
1195
|
operator: c.operator,
|
|
1158
|
-
param: void 0 !== c.param ? c.param :
|
|
1196
|
+
param: void 0 !== c.param ? c.param : Xo(p, i, o)
|
|
1159
1197
|
} : null;
|
|
1160
1198
|
})({
|
|
1161
1199
|
from: u,
|
|
@@ -1177,10 +1215,10 @@ var mn = rt((e) => {
|
|
|
1177
1215
|
allowNull: !0,
|
|
1178
1216
|
readOnly: a
|
|
1179
1217
|
}),
|
|
1180
|
-
g ?
|
|
1218
|
+
g ? At(Lt, {
|
|
1181
1219
|
ref: w,
|
|
1182
1220
|
sx: { display: "contents" },
|
|
1183
|
-
children:
|
|
1221
|
+
children: At(yn, {
|
|
1184
1222
|
operatorParam: g,
|
|
1185
1223
|
onOperatorParamChange: T,
|
|
1186
1224
|
onRemove: () => {
|
|
@@ -1195,23 +1233,23 @@ var mn = rt((e) => {
|
|
|
1195
1233
|
selector: u,
|
|
1196
1234
|
readOnly: a
|
|
1197
1235
|
})
|
|
1198
|
-
}) : !a &&
|
|
1236
|
+
}) : !a && At(Lt, {
|
|
1199
1237
|
sx: { display: "flex" },
|
|
1200
|
-
children:
|
|
1238
|
+
children: At(sn, {
|
|
1201
1239
|
label: c("condition.when"),
|
|
1202
1240
|
operators: v,
|
|
1203
1241
|
value: null,
|
|
1204
1242
|
onChange: (e) => {
|
|
1205
1243
|
e && (S.current = !0, T({
|
|
1206
1244
|
operator: e?.getName() ?? null,
|
|
1207
|
-
param:
|
|
1245
|
+
param: Xo(e, v, u)
|
|
1208
1246
|
}));
|
|
1209
1247
|
},
|
|
1210
1248
|
readOnly: a
|
|
1211
1249
|
})
|
|
1212
1250
|
}),
|
|
1213
|
-
F &&
|
|
1214
|
-
control:
|
|
1251
|
+
F && At(Gt, {
|
|
1252
|
+
control: At($t, {
|
|
1215
1253
|
checked: y,
|
|
1216
1254
|
onChange: (e) => {
|
|
1217
1255
|
t = e.target.checked, f(t), o?.({
|
|
@@ -1229,10 +1267,10 @@ var mn = rt((e) => {
|
|
|
1229
1267
|
]
|
|
1230
1268
|
});
|
|
1231
1269
|
});
|
|
1232
|
-
|
|
1233
|
-
var
|
|
1270
|
+
fn.displayName = "ConditionEditor";
|
|
1271
|
+
var bn = lt((e) => {
|
|
1234
1272
|
const { variant: t = "format", children: o, sx: n, ...r } = e;
|
|
1235
|
-
return
|
|
1273
|
+
return At(Lt, {
|
|
1236
1274
|
className: `sxl-cf-rule-section sxl-cf-rule-section-${t}`,
|
|
1237
1275
|
sx: {
|
|
1238
1276
|
display: "flex",
|
|
@@ -1249,25 +1287,25 @@ var gn = rt((e) => {
|
|
|
1249
1287
|
children: o
|
|
1250
1288
|
});
|
|
1251
1289
|
});
|
|
1252
|
-
|
|
1253
|
-
var
|
|
1254
|
-
lightRedFillDarkRedText:
|
|
1255
|
-
yellowFillDarkYellowText:
|
|
1256
|
-
greenFillDarkGreenText:
|
|
1257
|
-
lightRedFill:
|
|
1258
|
-
redText:
|
|
1259
|
-
redBorder:
|
|
1260
|
-
},
|
|
1261
|
-
const { format: r, onFormatChange: a, readOnly: l, ...i } = n, s =
|
|
1290
|
+
bn.displayName = "RuleSection";
|
|
1291
|
+
var xn = new L("transparent"), vn = {
|
|
1292
|
+
lightRedFillDarkRedText: So("conditionalFormat.preset.lightRedFillDarkRedText"),
|
|
1293
|
+
yellowFillDarkYellowText: So("conditionalFormat.preset.yellowFillDarkYellowText"),
|
|
1294
|
+
greenFillDarkGreenText: So("conditionalFormat.preset.greenFillDarkGreenText"),
|
|
1295
|
+
lightRedFill: So("conditionalFormat.preset.lightRedFill"),
|
|
1296
|
+
redText: So("conditionalFormat.preset.redText"),
|
|
1297
|
+
redBorder: So("conditionalFormat.preset.redBorder")
|
|
1298
|
+
}, Cn = (e) => e ? "string" == typeof e ? e : e.type === U.Type.None ? null : e.color ?? e.foreground ?? null : null, kn = (e, t) => "auto" === e ? null : E(e, t), wn = lt((n) => {
|
|
1299
|
+
const { format: r, onFormatChange: a, readOnly: l, ...i } = n, s = tt(), { workbook: d, schemeLookup: c, themeKey: p, darkMode: u, propsColorPanel: m } = R(), g = r?.font ?? null, h = (g?.weight ?? 400) >= 600, y = g?.style === q.Style.Italic, f = !!g?.underline && g.underline !== q.UnderlineStyle.None, b = !!g?.strike, x = (e) => {
|
|
1262
1300
|
const t = { ...g };
|
|
1263
1301
|
for (const [o, n] of Object.entries(e)) void 0 === n ? delete t[o] : t[o] = n;
|
|
1264
1302
|
const o = { ...r };
|
|
1265
1303
|
0 === Object.keys(t).length ? delete o.font : o.font = t, a(0 === Object.keys(o).length ? null : o);
|
|
1266
|
-
}, v =
|
|
1304
|
+
}, v = ct(() => d?.getStyles().getNormal().getFont().getColor(), [d, p]), C = ct(() => kn(g?.color, d), [
|
|
1267
1305
|
g?.color,
|
|
1268
1306
|
d,
|
|
1269
1307
|
p
|
|
1270
|
-
]), k =
|
|
1308
|
+
]), k = ct(() => kn(Cn(r?.fill), d), [
|
|
1271
1309
|
r?.fill,
|
|
1272
1310
|
d,
|
|
1273
1311
|
p
|
|
@@ -1276,15 +1314,15 @@ var hn = new R("transparent"), yn = {
|
|
|
1276
1314
|
border: "none",
|
|
1277
1315
|
borderRadius: 1
|
|
1278
1316
|
};
|
|
1279
|
-
return
|
|
1317
|
+
return Wt(bn, {
|
|
1280
1318
|
...i,
|
|
1281
|
-
children: [
|
|
1319
|
+
children: [Wt(Lt, {
|
|
1282
1320
|
sx: {
|
|
1283
1321
|
display: "flex",
|
|
1284
1322
|
alignItems: "flex-start",
|
|
1285
1323
|
gap: 1
|
|
1286
1324
|
},
|
|
1287
|
-
children: [
|
|
1325
|
+
children: [At(Lt, {
|
|
1288
1326
|
sx: {
|
|
1289
1327
|
flex: "1 1 auto",
|
|
1290
1328
|
minWidth: 0,
|
|
@@ -1292,11 +1330,11 @@ var hn = new R("transparent"), yn = {
|
|
|
1292
1330
|
gap: .5,
|
|
1293
1331
|
flexWrap: "wrap"
|
|
1294
1332
|
},
|
|
1295
|
-
children:
|
|
1296
|
-
const o =
|
|
1297
|
-
return
|
|
1333
|
+
children: le.map((e, t) => {
|
|
1334
|
+
const o = kn(Cn(e.style.fill), d), n = kn(e.style.font?.color, d), r = e.style.borders ? kn(Object.values(e.style.borders)[0]?.color, d) : null;
|
|
1335
|
+
return At(W, {
|
|
1298
1336
|
sheet: !0,
|
|
1299
|
-
title: s(
|
|
1337
|
+
title: s(vn[e.key] ?? e.key),
|
|
1300
1338
|
disabled: l,
|
|
1301
1339
|
onClick: () => a(structuredClone(e.style)),
|
|
1302
1340
|
sx: {
|
|
@@ -1308,7 +1346,7 @@ var hn = new R("transparent"), yn = {
|
|
|
1308
1346
|
children: "Aa"
|
|
1309
1347
|
}, t);
|
|
1310
1348
|
})
|
|
1311
|
-
}),
|
|
1349
|
+
}), At(W, {
|
|
1312
1350
|
title: s("conditionalFormat.clearStyle"),
|
|
1313
1351
|
disabled: l || !r,
|
|
1314
1352
|
onClick: () => a(null),
|
|
@@ -1316,55 +1354,55 @@ var hn = new R("transparent"), yn = {
|
|
|
1316
1354
|
color: "text.secondary",
|
|
1317
1355
|
"&:disabled": { opacity: .4 }
|
|
1318
1356
|
},
|
|
1319
|
-
children:
|
|
1357
|
+
children: At(Be, {
|
|
1320
1358
|
iconKey: "ClearFormats",
|
|
1321
1359
|
size: 16
|
|
1322
1360
|
})
|
|
1323
1361
|
})]
|
|
1324
|
-
}),
|
|
1362
|
+
}), Wt(Lt, {
|
|
1325
1363
|
sx: {
|
|
1326
1364
|
display: "flex",
|
|
1327
1365
|
alignItems: "center",
|
|
1328
1366
|
gap: .25
|
|
1329
1367
|
},
|
|
1330
1368
|
children: [
|
|
1331
|
-
|
|
1369
|
+
At(co, {
|
|
1332
1370
|
value: "bold",
|
|
1333
1371
|
size: "small",
|
|
1334
1372
|
sx: w,
|
|
1335
1373
|
selected: h,
|
|
1336
1374
|
disabled: l,
|
|
1337
1375
|
onChange: () => x({ weight: h ? void 0 : 700 }),
|
|
1338
|
-
children:
|
|
1376
|
+
children: At(Be, { iconKey: "TextBold" })
|
|
1339
1377
|
}),
|
|
1340
|
-
|
|
1378
|
+
At(co, {
|
|
1341
1379
|
value: "italic",
|
|
1342
1380
|
size: "small",
|
|
1343
1381
|
sx: w,
|
|
1344
1382
|
selected: y,
|
|
1345
1383
|
disabled: l,
|
|
1346
|
-
onChange: () => x({ style: y ? void 0 :
|
|
1347
|
-
children:
|
|
1384
|
+
onChange: () => x({ style: y ? void 0 : q.Style.Italic }),
|
|
1385
|
+
children: At(Be, { iconKey: "TextItalic" })
|
|
1348
1386
|
}),
|
|
1349
|
-
|
|
1387
|
+
At(co, {
|
|
1350
1388
|
value: "underline",
|
|
1351
1389
|
size: "small",
|
|
1352
1390
|
sx: w,
|
|
1353
1391
|
selected: f,
|
|
1354
1392
|
disabled: l,
|
|
1355
|
-
onChange: () => x({ underline: f ? void 0 :
|
|
1356
|
-
children:
|
|
1393
|
+
onChange: () => x({ underline: f ? void 0 : q.UnderlineStyle.Single }),
|
|
1394
|
+
children: At(Be, { iconKey: "TextUnderline" })
|
|
1357
1395
|
}),
|
|
1358
|
-
|
|
1396
|
+
At(co, {
|
|
1359
1397
|
value: "strike",
|
|
1360
1398
|
size: "small",
|
|
1361
1399
|
sx: w,
|
|
1362
1400
|
selected: b,
|
|
1363
1401
|
disabled: l,
|
|
1364
1402
|
onChange: () => x({ strike: !b || void 0 }),
|
|
1365
|
-
children:
|
|
1403
|
+
children: At(Be, { iconKey: "TextStrike" })
|
|
1366
1404
|
}),
|
|
1367
|
-
d &&
|
|
1405
|
+
d && At(t, {
|
|
1368
1406
|
tooltip: s("conditionalFormat.border"),
|
|
1369
1407
|
selectedBorder: r?.borders,
|
|
1370
1408
|
createBorder: (e) => d.getStyles().getNormal().createStyle({ borders: e }).getBorders(),
|
|
@@ -1377,7 +1415,7 @@ var hn = new R("transparent"), yn = {
|
|
|
1377
1415
|
e && 0 !== Object.keys(e).length ? t.borders = e : delete t.borders, a(0 === Object.keys(t).length ? null : t);
|
|
1378
1416
|
})(e)
|
|
1379
1417
|
}),
|
|
1380
|
-
|
|
1418
|
+
At(o, {
|
|
1381
1419
|
icon: "fill.colored",
|
|
1382
1420
|
tooltip: s("conditionalFormat.fillColor"),
|
|
1383
1421
|
selectedColor: k,
|
|
@@ -1385,20 +1423,20 @@ var hn = new R("transparent"), yn = {
|
|
|
1385
1423
|
onSelectColor: (e) => ((e) => {
|
|
1386
1424
|
const t = { ...r };
|
|
1387
1425
|
e ? t.fill = {
|
|
1388
|
-
type:
|
|
1426
|
+
type: U.Type.Solid,
|
|
1389
1427
|
color: e.toString()
|
|
1390
1428
|
} : delete t.fill, a(0 === Object.keys(t).length ? null : t);
|
|
1391
1429
|
})(e),
|
|
1392
1430
|
darkMode: u,
|
|
1393
1431
|
propsPanel: {
|
|
1394
1432
|
disableAlpha: !0,
|
|
1395
|
-
autoColor:
|
|
1396
|
-
autoColorLabelKey:
|
|
1433
|
+
autoColor: xn,
|
|
1434
|
+
autoColorLabelKey: So("color.noFill"),
|
|
1397
1435
|
autoColorPosition: e.End,
|
|
1398
1436
|
...m
|
|
1399
1437
|
}
|
|
1400
1438
|
}),
|
|
1401
|
-
|
|
1439
|
+
At(o, {
|
|
1402
1440
|
icon: "text.colored",
|
|
1403
1441
|
tooltip: s("conditionalFormat.fontColor"),
|
|
1404
1442
|
selectedColor: C,
|
|
@@ -1415,24 +1453,24 @@ var hn = new R("transparent"), yn = {
|
|
|
1415
1453
|
})]
|
|
1416
1454
|
});
|
|
1417
1455
|
});
|
|
1418
|
-
|
|
1419
|
-
var
|
|
1420
|
-
[
|
|
1421
|
-
[
|
|
1422
|
-
[
|
|
1423
|
-
[
|
|
1424
|
-
[
|
|
1425
|
-
[
|
|
1426
|
-
[
|
|
1427
|
-
[
|
|
1428
|
-
},
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
]),
|
|
1434
|
-
const { label: t, stop: n, onStopChange: r, allowedTypes: a, showColor:
|
|
1435
|
-
return
|
|
1456
|
+
wn.displayName = "ConditionalFormatStylePicker";
|
|
1457
|
+
var Sn = {
|
|
1458
|
+
[_.ColorStopType.AutoMin]: So("conditionalFormat.stopType.autoMin"),
|
|
1459
|
+
[_.ColorStopType.AutoMax]: So("conditionalFormat.stopType.autoMax"),
|
|
1460
|
+
[_.ColorStopType.Min]: So("conditionalFormat.stopType.min"),
|
|
1461
|
+
[_.ColorStopType.Max]: So("conditionalFormat.stopType.max"),
|
|
1462
|
+
[_.ColorStopType.Num]: So("conditionalFormat.stopType.num"),
|
|
1463
|
+
[_.ColorStopType.Percent]: So("conditionalFormat.stopType.percent"),
|
|
1464
|
+
[_.ColorStopType.Percentile]: So("conditionalFormat.stopType.percentile"),
|
|
1465
|
+
[_.ColorStopType.Formula]: So("conditionalFormat.stopType.formula")
|
|
1466
|
+
}, Tn = /* @__PURE__ */ new Set([
|
|
1467
|
+
_.ColorStopType.AutoMin,
|
|
1468
|
+
_.ColorStopType.AutoMax,
|
|
1469
|
+
_.ColorStopType.Min,
|
|
1470
|
+
_.ColorStopType.Max
|
|
1471
|
+
]), Fn = lt((e) => {
|
|
1472
|
+
const { label: t, stop: n, onStopChange: r, allowedTypes: a, showColor: l = !1, leading: s, showExclusive: d = !1, readOnly: c, ...p } = e, u = tt(), { darkMode: m, toColor: g, propsColorPanel: h } = R(), y = Ro(), f = n.type ?? _.ColorStopType.Num, b = !Tn.has(f), x = c || !b, v = f === _.ColorStopType.Formula, C = n.value?.isIFormula ? n.value : null, k = n.color, w = l ? g(k) : null;
|
|
1473
|
+
return Wt(Lt, {
|
|
1436
1474
|
sx: {
|
|
1437
1475
|
display: "flex",
|
|
1438
1476
|
alignItems: "center",
|
|
@@ -1440,7 +1478,7 @@ var vn = {
|
|
|
1440
1478
|
},
|
|
1441
1479
|
...p,
|
|
1442
1480
|
children: [
|
|
1443
|
-
void 0 !== t &&
|
|
1481
|
+
void 0 !== t && At(uo, {
|
|
1444
1482
|
variant: "caption",
|
|
1445
1483
|
sx: {
|
|
1446
1484
|
color: "text.secondary",
|
|
@@ -1452,7 +1490,7 @@ var vn = {
|
|
|
1452
1490
|
children: t
|
|
1453
1491
|
}),
|
|
1454
1492
|
s,
|
|
1455
|
-
|
|
1493
|
+
l && At(o, {
|
|
1456
1494
|
tooltip: u("conditionalFormat.stopColor"),
|
|
1457
1495
|
selectedColor: w,
|
|
1458
1496
|
disabled: c,
|
|
@@ -1468,7 +1506,7 @@ var vn = {
|
|
|
1468
1506
|
...h
|
|
1469
1507
|
}
|
|
1470
1508
|
}),
|
|
1471
|
-
d &&
|
|
1509
|
+
d && Wt(no, {
|
|
1472
1510
|
size: "small",
|
|
1473
1511
|
value: n.exclusive ? "gt" : "gte",
|
|
1474
1512
|
disabled: c,
|
|
@@ -1480,15 +1518,15 @@ var vn = {
|
|
|
1480
1518
|
flex: "0 0 auto",
|
|
1481
1519
|
backgroundColor: "background.paper"
|
|
1482
1520
|
},
|
|
1483
|
-
children: [
|
|
1521
|
+
children: [At(Zt, {
|
|
1484
1522
|
value: "gte",
|
|
1485
1523
|
children: ">="
|
|
1486
|
-
}),
|
|
1524
|
+
}), At(Zt, {
|
|
1487
1525
|
value: "gt",
|
|
1488
1526
|
children: ">"
|
|
1489
1527
|
})]
|
|
1490
1528
|
}),
|
|
1491
|
-
|
|
1529
|
+
At(no, {
|
|
1492
1530
|
size: "small",
|
|
1493
1531
|
value: f,
|
|
1494
1532
|
disabled: c,
|
|
@@ -1497,9 +1535,9 @@ var vn = {
|
|
|
1497
1535
|
...n,
|
|
1498
1536
|
type: e
|
|
1499
1537
|
};
|
|
1500
|
-
if (
|
|
1501
|
-
else if (void 0 === t.value) t.value = e ===
|
|
1502
|
-
else if (e !==
|
|
1538
|
+
if (Tn.has(e)) delete t.value;
|
|
1539
|
+
else if (void 0 === t.value) t.value = e === _.ColorStopType.Formula ? "" : 0;
|
|
1540
|
+
else if (e !== _.ColorStopType.Formula && "number" != typeof t.value) {
|
|
1503
1541
|
const e = "string" == typeof t.value ? Number(t.value) : NaN;
|
|
1504
1542
|
t.value = Number.isFinite(e) ? e : 0;
|
|
1505
1543
|
}
|
|
@@ -1510,12 +1548,12 @@ var vn = {
|
|
|
1510
1548
|
minWidth: 0,
|
|
1511
1549
|
backgroundColor: "background.paper"
|
|
1512
1550
|
},
|
|
1513
|
-
children: a.map((e) =>
|
|
1551
|
+
children: a.map((e) => At(Zt, {
|
|
1514
1552
|
value: e,
|
|
1515
|
-
children: u(
|
|
1553
|
+
children: u(Sn[e])
|
|
1516
1554
|
}, e))
|
|
1517
1555
|
}),
|
|
1518
|
-
v ?
|
|
1556
|
+
v ? At(i, {
|
|
1519
1557
|
size: "small",
|
|
1520
1558
|
home: y.home,
|
|
1521
1559
|
value: C ? y.display(C) : `${n.value ?? ""}`,
|
|
@@ -1537,7 +1575,7 @@ var vn = {
|
|
|
1537
1575
|
minWidth: 0,
|
|
1538
1576
|
"& .MuiInputBase-root": { backgroundColor: x ? "action.disabledBackground" : "background.paper" }
|
|
1539
1577
|
}
|
|
1540
|
-
}) :
|
|
1578
|
+
}) : At(io, {
|
|
1541
1579
|
size: "small",
|
|
1542
1580
|
type: "number",
|
|
1543
1581
|
placeholder: b ? void 0 : u("conditionalFormat.stopFromData"),
|
|
@@ -1563,34 +1601,34 @@ var vn = {
|
|
|
1563
1601
|
]
|
|
1564
1602
|
});
|
|
1565
1603
|
});
|
|
1566
|
-
|
|
1567
|
-
var
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
],
|
|
1575
|
-
const { scale: t, onScaleChange: o, readOnly: n, ...r } = e, a =
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1604
|
+
Fn.displayName = "ScaleStopRow";
|
|
1605
|
+
var Dn = [
|
|
1606
|
+
_.ColorStopType.Min,
|
|
1607
|
+
_.ColorStopType.Max,
|
|
1608
|
+
_.ColorStopType.Num,
|
|
1609
|
+
_.ColorStopType.Percent,
|
|
1610
|
+
_.ColorStopType.Percentile,
|
|
1611
|
+
_.ColorStopType.Formula
|
|
1612
|
+
], Nn = lt((e) => {
|
|
1613
|
+
const { scale: t, onScaleChange: o, readOnly: n, ...r } = e, a = tt(), { workbook: l, toColor: i } = R(), s = t.stops ?? [], d = 2 === s.length ? [So("conditionalFormat.stop.minimum"), So("conditionalFormat.stop.maximum")] : [
|
|
1614
|
+
So("conditionalFormat.stop.minimum"),
|
|
1615
|
+
So("conditionalFormat.stop.midpoint"),
|
|
1616
|
+
So("conditionalFormat.stop.maximum")
|
|
1579
1617
|
];
|
|
1580
|
-
return
|
|
1618
|
+
return Wt(Lt, {
|
|
1581
1619
|
sx: {
|
|
1582
1620
|
display: "flex",
|
|
1583
1621
|
flexDirection: "column",
|
|
1584
1622
|
gap: 1
|
|
1585
1623
|
},
|
|
1586
1624
|
...r,
|
|
1587
|
-
children: [
|
|
1625
|
+
children: [At(bn, { children: Wt(Lt, {
|
|
1588
1626
|
sx: {
|
|
1589
1627
|
display: "flex",
|
|
1590
1628
|
alignItems: "flex-start",
|
|
1591
1629
|
gap: 1
|
|
1592
1630
|
},
|
|
1593
|
-
children: [
|
|
1631
|
+
children: [At(Lt, {
|
|
1594
1632
|
sx: {
|
|
1595
1633
|
flex: "1 1 auto",
|
|
1596
1634
|
minWidth: 0,
|
|
@@ -1598,13 +1636,13 @@ var wn = [
|
|
|
1598
1636
|
gap: .5,
|
|
1599
1637
|
flexWrap: "wrap"
|
|
1600
1638
|
},
|
|
1601
|
-
children:
|
|
1639
|
+
children: J.filter((e) => e.stops.length === (2 === s.length ? 2 : 3)).map((e, t) => At(W, {
|
|
1602
1640
|
sheet: !0,
|
|
1603
1641
|
disabled: n,
|
|
1604
1642
|
onClick: () => o(structuredClone(e)),
|
|
1605
|
-
children:
|
|
1643
|
+
children: At(C, { rows: v(e.stops ?? [], x, l) })
|
|
1606
1644
|
}, t))
|
|
1607
|
-
}),
|
|
1645
|
+
}), Wt(po, {
|
|
1608
1646
|
exclusive: !0,
|
|
1609
1647
|
size: "small",
|
|
1610
1648
|
value: 2 === s.length ? 2 : 3,
|
|
@@ -1621,7 +1659,7 @@ var wn = [
|
|
|
1621
1659
|
e = `#${n((t.red + o.red) / 2)}${n((t.green + o.green) / 2)}${n((t.blue + o.blue) / 2)}`;
|
|
1622
1660
|
}
|
|
1623
1661
|
n.splice(1, 0, {
|
|
1624
|
-
type:
|
|
1662
|
+
type: _.ColorStopType.Percentile,
|
|
1625
1663
|
value: 50,
|
|
1626
1664
|
color: e
|
|
1627
1665
|
});
|
|
@@ -1633,7 +1671,7 @@ var wn = [
|
|
|
1633
1671
|
})(n);
|
|
1634
1672
|
},
|
|
1635
1673
|
sx: { flex: "0 0 auto" },
|
|
1636
|
-
children: [
|
|
1674
|
+
children: [At(co, {
|
|
1637
1675
|
value: 2,
|
|
1638
1676
|
sx: {
|
|
1639
1677
|
textTransform: "none",
|
|
@@ -1641,7 +1679,7 @@ var wn = [
|
|
|
1641
1679
|
pb: .25
|
|
1642
1680
|
},
|
|
1643
1681
|
children: a("conditionalFormat.twoColor")
|
|
1644
|
-
}),
|
|
1682
|
+
}), At(co, {
|
|
1645
1683
|
value: 3,
|
|
1646
1684
|
sx: {
|
|
1647
1685
|
textTransform: "none",
|
|
@@ -1651,12 +1689,12 @@ var wn = [
|
|
|
1651
1689
|
children: a("conditionalFormat.threeColor")
|
|
1652
1690
|
})]
|
|
1653
1691
|
})]
|
|
1654
|
-
}) }),
|
|
1692
|
+
}) }), At(bn, {
|
|
1655
1693
|
variant: "config",
|
|
1656
|
-
children: s.map((e, r) =>
|
|
1694
|
+
children: s.map((e, r) => At(Fn, {
|
|
1657
1695
|
label: a(d[Math.min(r, d.length - 1)]),
|
|
1658
1696
|
stop: e,
|
|
1659
|
-
allowedTypes:
|
|
1697
|
+
allowedTypes: Dn,
|
|
1660
1698
|
showColor: !0,
|
|
1661
1699
|
readOnly: n,
|
|
1662
1700
|
onStopChange: (e) => {
|
|
@@ -1670,42 +1708,42 @@ var wn = [
|
|
|
1670
1708
|
})]
|
|
1671
1709
|
});
|
|
1672
1710
|
});
|
|
1673
|
-
|
|
1674
|
-
var
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
],
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
],
|
|
1689
|
-
const { scale: t, onScaleChange: n, readOnly: r, ...a } = e, l =
|
|
1711
|
+
Nn.displayName = "ColorScaleRulePanel";
|
|
1712
|
+
var In = [
|
|
1713
|
+
_.ColorStopType.AutoMin,
|
|
1714
|
+
_.ColorStopType.Min,
|
|
1715
|
+
_.ColorStopType.Num,
|
|
1716
|
+
_.ColorStopType.Percent,
|
|
1717
|
+
_.ColorStopType.Percentile,
|
|
1718
|
+
_.ColorStopType.Formula
|
|
1719
|
+
], Pn = [
|
|
1720
|
+
_.ColorStopType.AutoMax,
|
|
1721
|
+
_.ColorStopType.Max,
|
|
1722
|
+
_.ColorStopType.Num,
|
|
1723
|
+
_.ColorStopType.Percent,
|
|
1724
|
+
_.ColorStopType.Percentile,
|
|
1725
|
+
_.ColorStopType.Formula
|
|
1726
|
+
], On = "__auto__", Mn = lt((e) => {
|
|
1727
|
+
const { scale: t, onScaleChange: n, readOnly: r, ...a } = e, l = tt(), { darkMode: i, toColor: s, propsColorPanel: d } = R(), c = t.stops ?? [], p = s(t.color), u = s(t.negativeFillColor), g = s(t.borderColor), h = s(t.negativeBorderColor), y = t.gradient ?? !1, f = (e) => {
|
|
1690
1728
|
const o = { ...t };
|
|
1691
1729
|
for (const [t, n] of Object.entries(e)) void 0 === n ? delete o[t] : o[t] = n;
|
|
1692
1730
|
n(o);
|
|
1693
1731
|
}, b = { backgroundColor: "background.paper" };
|
|
1694
|
-
return
|
|
1732
|
+
return Wt(Lt, {
|
|
1695
1733
|
sx: {
|
|
1696
1734
|
display: "flex",
|
|
1697
1735
|
flexDirection: "column",
|
|
1698
1736
|
gap: 1
|
|
1699
1737
|
},
|
|
1700
1738
|
...a,
|
|
1701
|
-
children: [
|
|
1702
|
-
|
|
1739
|
+
children: [Wt(bn, { children: [
|
|
1740
|
+
Wt(Lt, {
|
|
1703
1741
|
sx: {
|
|
1704
1742
|
display: "flex",
|
|
1705
1743
|
alignItems: "flex-start",
|
|
1706
1744
|
gap: 1
|
|
1707
1745
|
},
|
|
1708
|
-
children: [
|
|
1746
|
+
children: [At(Lt, {
|
|
1709
1747
|
sx: {
|
|
1710
1748
|
flex: "1 1 auto",
|
|
1711
1749
|
minWidth: 0,
|
|
@@ -1713,7 +1751,7 @@ var Tn = [
|
|
|
1713
1751
|
gap: .5,
|
|
1714
1752
|
flexWrap: "wrap"
|
|
1715
1753
|
},
|
|
1716
|
-
children:
|
|
1754
|
+
children: Z.filter((e) => (e.gradient ?? !1) === y).map((e, t) => At(W, {
|
|
1717
1755
|
sheet: !0,
|
|
1718
1756
|
disabled: r,
|
|
1719
1757
|
onClick: () => f({
|
|
@@ -1721,9 +1759,9 @@ var Tn = [
|
|
|
1721
1759
|
gradient: e.gradient,
|
|
1722
1760
|
borderColor: e.borderColor
|
|
1723
1761
|
}),
|
|
1724
|
-
children:
|
|
1762
|
+
children: At(C, { rows: m(e, s(e.color)?.toCSS("adaptive") ?? "var(--sxl-color-primary, rgb(33, 115, 70))") })
|
|
1725
1763
|
}, t))
|
|
1726
|
-
}),
|
|
1764
|
+
}), Wt(po, {
|
|
1727
1765
|
exclusive: !0,
|
|
1728
1766
|
size: "small",
|
|
1729
1767
|
value: y,
|
|
@@ -1732,7 +1770,7 @@ var Tn = [
|
|
|
1732
1770
|
null !== t && f({ gradient: !!t || void 0 });
|
|
1733
1771
|
},
|
|
1734
1772
|
sx: { flex: "0 0 auto" },
|
|
1735
|
-
children: [
|
|
1773
|
+
children: [At(co, {
|
|
1736
1774
|
value: !1,
|
|
1737
1775
|
sx: {
|
|
1738
1776
|
textTransform: "none",
|
|
@@ -1740,7 +1778,7 @@ var Tn = [
|
|
|
1740
1778
|
pb: .25
|
|
1741
1779
|
},
|
|
1742
1780
|
children: l("conditionalFormat.solidFill")
|
|
1743
|
-
}),
|
|
1781
|
+
}), At(co, {
|
|
1744
1782
|
value: !0,
|
|
1745
1783
|
sx: {
|
|
1746
1784
|
textTransform: "none",
|
|
@@ -1751,26 +1789,26 @@ var Tn = [
|
|
|
1751
1789
|
})]
|
|
1752
1790
|
})]
|
|
1753
1791
|
}),
|
|
1754
|
-
|
|
1755
|
-
control:
|
|
1792
|
+
At(Gt, {
|
|
1793
|
+
control: At($t, {
|
|
1756
1794
|
size: "small",
|
|
1757
1795
|
checked: !1 === t.showValue,
|
|
1758
1796
|
disabled: r,
|
|
1759
1797
|
onChange: (e) => f({ showValue: !e.target.checked && void 0 })
|
|
1760
1798
|
}),
|
|
1761
|
-
label:
|
|
1799
|
+
label: At(uo, {
|
|
1762
1800
|
variant: "body2",
|
|
1763
1801
|
children: l("conditionalFormat.showBarsOnly")
|
|
1764
1802
|
})
|
|
1765
1803
|
}),
|
|
1766
|
-
|
|
1804
|
+
Wt(Lt, {
|
|
1767
1805
|
sx: {
|
|
1768
1806
|
display: "flex",
|
|
1769
1807
|
alignItems: "center",
|
|
1770
1808
|
gap: .5
|
|
1771
1809
|
},
|
|
1772
1810
|
children: [
|
|
1773
|
-
|
|
1811
|
+
At(uo, {
|
|
1774
1812
|
variant: "caption",
|
|
1775
1813
|
sx: {
|
|
1776
1814
|
color: "text.secondary",
|
|
@@ -1778,7 +1816,7 @@ var Tn = [
|
|
|
1778
1816
|
},
|
|
1779
1817
|
children: l("conditionalFormat.bar")
|
|
1780
1818
|
}),
|
|
1781
|
-
|
|
1819
|
+
At(o, {
|
|
1782
1820
|
icon: "fill.colored",
|
|
1783
1821
|
tooltip: l("conditionalFormat.barColor"),
|
|
1784
1822
|
selectedColor: p,
|
|
@@ -1790,7 +1828,7 @@ var Tn = [
|
|
|
1790
1828
|
...d
|
|
1791
1829
|
}
|
|
1792
1830
|
}),
|
|
1793
|
-
|
|
1831
|
+
At(o, {
|
|
1794
1832
|
icon: "stroke.colored",
|
|
1795
1833
|
tooltip: l("conditionalFormat.barBorderColor"),
|
|
1796
1834
|
selectedColor: g,
|
|
@@ -1804,14 +1842,14 @@ var Tn = [
|
|
|
1804
1842
|
})
|
|
1805
1843
|
]
|
|
1806
1844
|
}),
|
|
1807
|
-
|
|
1845
|
+
Wt(Lt, {
|
|
1808
1846
|
sx: {
|
|
1809
1847
|
display: "flex",
|
|
1810
1848
|
alignItems: "center",
|
|
1811
1849
|
gap: .5
|
|
1812
1850
|
},
|
|
1813
1851
|
children: [
|
|
1814
|
-
|
|
1852
|
+
At(uo, {
|
|
1815
1853
|
variant: "caption",
|
|
1816
1854
|
sx: {
|
|
1817
1855
|
color: "text.secondary",
|
|
@@ -1819,10 +1857,10 @@ var Tn = [
|
|
|
1819
1857
|
},
|
|
1820
1858
|
children: l("conditionalFormat.negative")
|
|
1821
1859
|
}),
|
|
1822
|
-
|
|
1860
|
+
At(o, {
|
|
1823
1861
|
icon: "fill.colored",
|
|
1824
1862
|
tooltip: l("conditionalFormat.negativeColor"),
|
|
1825
|
-
selectedColor:
|
|
1863
|
+
selectedColor: u ?? p,
|
|
1826
1864
|
disabled: r,
|
|
1827
1865
|
onSelectColor: (e) => f({ negativeFillColor: e ? e.toString() : void 0 }),
|
|
1828
1866
|
darkMode: i,
|
|
@@ -1831,7 +1869,7 @@ var Tn = [
|
|
|
1831
1869
|
...d
|
|
1832
1870
|
}
|
|
1833
1871
|
}),
|
|
1834
|
-
|
|
1872
|
+
At(o, {
|
|
1835
1873
|
icon: "stroke.colored",
|
|
1836
1874
|
tooltip: l("conditionalFormat.negativeBorderColor"),
|
|
1837
1875
|
selectedColor: h ?? g,
|
|
@@ -1843,7 +1881,7 @@ var Tn = [
|
|
|
1843
1881
|
...d
|
|
1844
1882
|
}
|
|
1845
1883
|
}),
|
|
1846
|
-
|
|
1884
|
+
At(W, {
|
|
1847
1885
|
title: l("conditionalFormat.sameAsPositive"),
|
|
1848
1886
|
disabled: r || !t.negativeFillColor && !t.negativeBorderColor,
|
|
1849
1887
|
onClick: () => f({
|
|
@@ -1854,74 +1892,74 @@ var Tn = [
|
|
|
1854
1892
|
color: "text.secondary",
|
|
1855
1893
|
"&:disabled": { opacity: .4 }
|
|
1856
1894
|
},
|
|
1857
|
-
children:
|
|
1895
|
+
children: At(Be, {
|
|
1858
1896
|
iconKey: "ClearFormats",
|
|
1859
1897
|
size: 16
|
|
1860
1898
|
})
|
|
1861
1899
|
})
|
|
1862
1900
|
]
|
|
1863
1901
|
}),
|
|
1864
|
-
|
|
1902
|
+
Wt(Lt, {
|
|
1865
1903
|
sx: {
|
|
1866
1904
|
display: "flex",
|
|
1867
1905
|
gap: 1,
|
|
1868
1906
|
mt: .5
|
|
1869
1907
|
},
|
|
1870
|
-
children: [
|
|
1908
|
+
children: [Wt(qt, {
|
|
1871
1909
|
size: "small",
|
|
1872
1910
|
sx: {
|
|
1873
1911
|
flex: 1,
|
|
1874
1912
|
minWidth: 0
|
|
1875
1913
|
},
|
|
1876
|
-
children: [
|
|
1914
|
+
children: [At(Jt, { children: l("conditionalFormat.axis") }), Wt(no, {
|
|
1877
1915
|
label: l("conditionalFormat.axis"),
|
|
1878
|
-
value: t.axisPosition ??
|
|
1916
|
+
value: t.axisPosition ?? On,
|
|
1879
1917
|
disabled: r,
|
|
1880
1918
|
sx: b,
|
|
1881
1919
|
onChange: (e) => {
|
|
1882
1920
|
const t = e.target.value;
|
|
1883
|
-
f({ axisPosition: t ===
|
|
1921
|
+
f({ axisPosition: t === On ? void 0 : t });
|
|
1884
1922
|
},
|
|
1885
1923
|
children: [
|
|
1886
|
-
|
|
1887
|
-
value:
|
|
1924
|
+
At(Zt, {
|
|
1925
|
+
value: On,
|
|
1888
1926
|
children: l("conditionalFormat.automatic")
|
|
1889
1927
|
}),
|
|
1890
|
-
|
|
1928
|
+
At(Zt, {
|
|
1891
1929
|
value: "middle",
|
|
1892
1930
|
children: l("conditionalFormat.axisMiddle")
|
|
1893
1931
|
}),
|
|
1894
|
-
|
|
1932
|
+
At(Zt, {
|
|
1895
1933
|
value: "none",
|
|
1896
1934
|
children: l("conditionalFormat.axisNone")
|
|
1897
1935
|
})
|
|
1898
1936
|
]
|
|
1899
1937
|
})]
|
|
1900
|
-
}),
|
|
1938
|
+
}), Wt(qt, {
|
|
1901
1939
|
size: "small",
|
|
1902
1940
|
sx: {
|
|
1903
1941
|
flex: 1,
|
|
1904
1942
|
minWidth: 0
|
|
1905
1943
|
},
|
|
1906
|
-
children: [
|
|
1944
|
+
children: [At(Jt, { children: l("conditionalFormat.direction") }), Wt(no, {
|
|
1907
1945
|
label: l("conditionalFormat.direction"),
|
|
1908
|
-
value: t.direction ??
|
|
1946
|
+
value: t.direction ?? On,
|
|
1909
1947
|
disabled: r,
|
|
1910
1948
|
sx: b,
|
|
1911
1949
|
onChange: (e) => {
|
|
1912
1950
|
const t = e.target.value;
|
|
1913
|
-
f({ direction: t ===
|
|
1951
|
+
f({ direction: t === On ? void 0 : t });
|
|
1914
1952
|
},
|
|
1915
1953
|
children: [
|
|
1916
|
-
|
|
1917
|
-
value:
|
|
1954
|
+
At(Zt, {
|
|
1955
|
+
value: On,
|
|
1918
1956
|
children: l("conditionalFormat.automatic")
|
|
1919
1957
|
}),
|
|
1920
|
-
|
|
1958
|
+
At(Zt, {
|
|
1921
1959
|
value: "leftToRight",
|
|
1922
1960
|
children: l("conditionalFormat.leftToRight")
|
|
1923
1961
|
}),
|
|
1924
|
-
|
|
1962
|
+
At(Zt, {
|
|
1925
1963
|
value: "rightToLeft",
|
|
1926
1964
|
children: l("conditionalFormat.rightToLeft")
|
|
1927
1965
|
})
|
|
@@ -1929,79 +1967,79 @@ var Tn = [
|
|
|
1929
1967
|
})]
|
|
1930
1968
|
})]
|
|
1931
1969
|
})
|
|
1932
|
-
] }),
|
|
1970
|
+
] }), Wt(bn, {
|
|
1933
1971
|
variant: "config",
|
|
1934
|
-
children: [
|
|
1972
|
+
children: [At(Fn, {
|
|
1935
1973
|
label: l("conditionalFormat.stop.minimum"),
|
|
1936
|
-
stop: c[0] ?? { type:
|
|
1937
|
-
allowedTypes:
|
|
1974
|
+
stop: c[0] ?? { type: _.ColorStopType.AutoMin },
|
|
1975
|
+
allowedTypes: In,
|
|
1938
1976
|
readOnly: r,
|
|
1939
1977
|
onStopChange: (e) => {
|
|
1940
1978
|
const t = c.slice();
|
|
1941
1979
|
t[0] = e, f({ stops: t });
|
|
1942
1980
|
}
|
|
1943
|
-
}),
|
|
1981
|
+
}), At(Fn, {
|
|
1944
1982
|
label: l("conditionalFormat.stop.maximum"),
|
|
1945
|
-
stop: c[1] ?? { type:
|
|
1946
|
-
allowedTypes:
|
|
1983
|
+
stop: c[1] ?? { type: _.ColorStopType.AutoMax },
|
|
1984
|
+
allowedTypes: Pn,
|
|
1947
1985
|
readOnly: r,
|
|
1948
1986
|
onStopChange: (e) => {
|
|
1949
1987
|
const t = c.slice();
|
|
1950
|
-
for (; t.length < 2;) t.push({ type:
|
|
1988
|
+
for (; t.length < 2;) t.push({ type: _.ColorStopType.AutoMax });
|
|
1951
1989
|
t[1] = e, f({ stops: t });
|
|
1952
1990
|
}
|
|
1953
1991
|
})]
|
|
1954
1992
|
})]
|
|
1955
1993
|
});
|
|
1956
1994
|
});
|
|
1957
|
-
|
|
1958
|
-
var
|
|
1995
|
+
Mn.displayName = "DataBarRulePanel";
|
|
1996
|
+
var An = So("conditionalFormat.noCellIcon"), Wn = So("conditionalFormat.cellIcon"), En = {
|
|
1959
1997
|
borderColor: "primary.main",
|
|
1960
1998
|
boxShadow: (e) => `inset 0 0 0 1px ${e.palette.primary.main}`
|
|
1961
|
-
},
|
|
1999
|
+
}, Bn = {
|
|
1962
2000
|
width: "28px",
|
|
1963
2001
|
height: "26px"
|
|
1964
|
-
},
|
|
1965
|
-
const { icon: t, onPick: o } = e, n =
|
|
1966
|
-
return
|
|
2002
|
+
}, Rn = lt((e) => {
|
|
2003
|
+
const { icon: t, onPick: o } = e, n = tt();
|
|
2004
|
+
return Wt(Lt, {
|
|
1967
2005
|
sx: {
|
|
1968
2006
|
display: "flex",
|
|
1969
2007
|
flexDirection: "column",
|
|
1970
2008
|
gap: "4px",
|
|
1971
2009
|
padding: "6px 8px"
|
|
1972
2010
|
},
|
|
1973
|
-
children: [
|
|
2011
|
+
children: [At(W, {
|
|
1974
2012
|
sheet: !0,
|
|
1975
|
-
title: n(
|
|
2013
|
+
title: n(An),
|
|
1976
2014
|
"aria-pressed": null === t,
|
|
1977
2015
|
sx: {
|
|
1978
|
-
...
|
|
1979
|
-
...null === t ?
|
|
2016
|
+
...Bn,
|
|
2017
|
+
...null === t ? En : null
|
|
1980
2018
|
},
|
|
1981
2019
|
onClick: () => {
|
|
1982
|
-
o({ ...
|
|
2020
|
+
o({ ...re });
|
|
1983
2021
|
},
|
|
1984
|
-
children:
|
|
2022
|
+
children: At(oe, {
|
|
1985
2023
|
icons: [null],
|
|
1986
2024
|
size: 16
|
|
1987
2025
|
})
|
|
1988
|
-
}),
|
|
2026
|
+
}), At(Lt, {
|
|
1989
2027
|
sx: {
|
|
1990
2028
|
display: "grid",
|
|
1991
2029
|
gridTemplateColumns: "repeat(8, auto)",
|
|
1992
2030
|
justifyContent: "start",
|
|
1993
2031
|
gap: "3px"
|
|
1994
2032
|
},
|
|
1995
|
-
children:
|
|
2033
|
+
children: te.map((e) => {
|
|
1996
2034
|
const r = (a = t, l = e.spec, !!a && a.iconKey === l.iconKey && a.color === l.color);
|
|
1997
2035
|
var a, l;
|
|
1998
|
-
return
|
|
2036
|
+
return At(W, {
|
|
1999
2037
|
sheet: !0,
|
|
2000
|
-
title:
|
|
2038
|
+
title: w(n, e.spec),
|
|
2001
2039
|
"aria-pressed": r,
|
|
2002
2040
|
sx: {
|
|
2003
|
-
...
|
|
2004
|
-
...r ?
|
|
2041
|
+
...Bn,
|
|
2042
|
+
...r ? En : null
|
|
2005
2043
|
},
|
|
2006
2044
|
onClick: () => {
|
|
2007
2045
|
o({
|
|
@@ -2009,7 +2047,7 @@ var Pn = ko("conditionalFormat.noCellIcon"), In = ko("conditionalFormat.cellIcon
|
|
|
2009
2047
|
id: e.id
|
|
2010
2048
|
});
|
|
2011
2049
|
},
|
|
2012
|
-
children:
|
|
2050
|
+
children: At(oe, {
|
|
2013
2051
|
icons: [e.spec],
|
|
2014
2052
|
size: 16
|
|
2015
2053
|
})
|
|
@@ -2018,25 +2056,25 @@ var Pn = ko("conditionalFormat.noCellIcon"), In = ko("conditionalFormat.cellIcon
|
|
|
2018
2056
|
})]
|
|
2019
2057
|
});
|
|
2020
2058
|
});
|
|
2021
|
-
|
|
2022
|
-
var
|
|
2023
|
-
const { icon: o, onPick: n, tooltip: r, ...a } = e, l =
|
|
2024
|
-
return
|
|
2059
|
+
Rn.displayName = "IconCatalogPanel";
|
|
2060
|
+
var Ln = lt(rt((e, t) => {
|
|
2061
|
+
const { icon: o, onPick: n, tooltip: r, ...a } = e, l = tt();
|
|
2062
|
+
return At(bt, {
|
|
2025
2063
|
ref: t,
|
|
2026
|
-
createPopupPanel:
|
|
2027
|
-
const { closeFloat: t } = e, r =
|
|
2064
|
+
createPopupPanel: it((e) => {
|
|
2065
|
+
const { closeFloat: t } = e, r = At(Rn, {
|
|
2028
2066
|
icon: o,
|
|
2029
2067
|
onPick: (e) => {
|
|
2030
2068
|
t?.(), n(e);
|
|
2031
2069
|
}
|
|
2032
2070
|
});
|
|
2033
|
-
return
|
|
2071
|
+
return St({
|
|
2034
2072
|
...e,
|
|
2035
2073
|
children: r
|
|
2036
2074
|
});
|
|
2037
2075
|
}, [o, n]),
|
|
2038
|
-
tooltip: r ?? l(
|
|
2039
|
-
icon:
|
|
2076
|
+
tooltip: r ?? l(Wn),
|
|
2077
|
+
icon: At(oe, {
|
|
2040
2078
|
icons: [o],
|
|
2041
2079
|
size: 16
|
|
2042
2080
|
}),
|
|
@@ -2044,27 +2082,27 @@ var Wn = rt(ot((e, t) => {
|
|
|
2044
2082
|
...a
|
|
2045
2083
|
});
|
|
2046
2084
|
}));
|
|
2047
|
-
|
|
2048
|
-
var
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
],
|
|
2054
|
-
const { scale: t, onScaleChange: o, readOnly: n, ...r } = e, a =
|
|
2085
|
+
Ln.displayName = "IconPickerPopupButton";
|
|
2086
|
+
var Vn = [
|
|
2087
|
+
_.ColorStopType.Percent,
|
|
2088
|
+
_.ColorStopType.Num,
|
|
2089
|
+
_.ColorStopType.Percentile,
|
|
2090
|
+
_.ColorStopType.Formula
|
|
2091
|
+
], zn = lt((e) => {
|
|
2092
|
+
const { scale: t, onScaleChange: o, readOnly: n, ...r } = e, a = tt(), l = t.iconSet ?? G.IconSet.TrafficLights3, i = 0 === ve(l).length, s = t.stops ?? [], d = s.length, c = ke(t), p = (e) => {
|
|
2055
2093
|
const n = { ...t };
|
|
2056
2094
|
for (const [t, o] of Object.entries(e)) void 0 === o ? delete n[t] : n[t] = o;
|
|
2057
2095
|
o(n);
|
|
2058
|
-
}, u =
|
|
2059
|
-
const { closeFloat: t } = e, o =
|
|
2060
|
-
groups:
|
|
2096
|
+
}, u = it((e) => {
|
|
2097
|
+
const { closeFloat: t } = e, o = At(y, {
|
|
2098
|
+
groups: O,
|
|
2061
2099
|
disabled: n,
|
|
2062
2100
|
onPick: (e) => {
|
|
2063
|
-
t?.(), e.type ===
|
|
2101
|
+
t?.(), e.type === _.ScaleType.IconSet && e.iconSet && ((e) => {
|
|
2064
2102
|
if (e === l) return;
|
|
2065
|
-
const t =
|
|
2103
|
+
const t = Ce(e);
|
|
2066
2104
|
let o = s;
|
|
2067
|
-
t !== s.length && (o =
|
|
2105
|
+
t !== s.length && (o = xe(t)), p({
|
|
2068
2106
|
iconSet: e,
|
|
2069
2107
|
stops: o,
|
|
2070
2108
|
icon: void 0
|
|
@@ -2072,42 +2110,42 @@ var En = [
|
|
|
2072
2110
|
})(e.iconSet);
|
|
2073
2111
|
}
|
|
2074
2112
|
});
|
|
2075
|
-
return
|
|
2113
|
+
return St({
|
|
2076
2114
|
...e,
|
|
2077
2115
|
children: o
|
|
2078
2116
|
});
|
|
2079
|
-
}, [n, t]), m =
|
|
2080
|
-
return
|
|
2117
|
+
}, [n, t]), m = V.camelToPrettyCase(l);
|
|
2118
|
+
return Wt(Lt, {
|
|
2081
2119
|
sx: {
|
|
2082
2120
|
display: "flex",
|
|
2083
2121
|
flexDirection: "column",
|
|
2084
2122
|
gap: 1
|
|
2085
2123
|
},
|
|
2086
2124
|
...r,
|
|
2087
|
-
children: [
|
|
2088
|
-
|
|
2125
|
+
children: [Wt(bn, { children: [
|
|
2126
|
+
At(Lt, {
|
|
2089
2127
|
sx: {
|
|
2090
2128
|
display: "flex",
|
|
2091
2129
|
alignItems: "center",
|
|
2092
2130
|
gap: 1
|
|
2093
2131
|
},
|
|
2094
|
-
children:
|
|
2132
|
+
children: At(bt, {
|
|
2095
2133
|
outlined: !0,
|
|
2096
2134
|
disabled: n,
|
|
2097
2135
|
label: m,
|
|
2098
2136
|
tooltip: m,
|
|
2099
|
-
icon:
|
|
2137
|
+
icon: At(Lt, {
|
|
2100
2138
|
sx: {
|
|
2101
2139
|
width: "82px",
|
|
2102
2140
|
display: "flex",
|
|
2103
2141
|
justifyContent: "center"
|
|
2104
2142
|
},
|
|
2105
|
-
children: i ?
|
|
2143
|
+
children: i ? At(uo, {
|
|
2106
2144
|
variant: "caption",
|
|
2107
2145
|
noWrap: !0,
|
|
2108
2146
|
children: m
|
|
2109
|
-
}) :
|
|
2110
|
-
icons:
|
|
2147
|
+
}) : At(oe, {
|
|
2148
|
+
icons: ve(l),
|
|
2111
2149
|
order: "descending",
|
|
2112
2150
|
size: 14,
|
|
2113
2151
|
gap: 3
|
|
@@ -2116,53 +2154,53 @@ var En = [
|
|
|
2116
2154
|
createPopupPanel: u
|
|
2117
2155
|
})
|
|
2118
2156
|
}),
|
|
2119
|
-
i &&
|
|
2157
|
+
i && At(uo, {
|
|
2120
2158
|
variant: "caption",
|
|
2121
2159
|
sx: { color: "text.secondary" },
|
|
2122
2160
|
children: a("conditionalFormat.adoptedIconSet")
|
|
2123
2161
|
}),
|
|
2124
|
-
|
|
2162
|
+
Wt(Lt, {
|
|
2125
2163
|
sx: {
|
|
2126
2164
|
display: "flex",
|
|
2127
2165
|
gap: 1
|
|
2128
2166
|
},
|
|
2129
|
-
children: [
|
|
2130
|
-
control:
|
|
2167
|
+
children: [At(Gt, {
|
|
2168
|
+
control: At($t, {
|
|
2131
2169
|
size: "small",
|
|
2132
2170
|
checked: !1 === t.showValue,
|
|
2133
2171
|
disabled: n,
|
|
2134
2172
|
onChange: (e) => p({ showValue: !e.target.checked && void 0 })
|
|
2135
2173
|
}),
|
|
2136
|
-
label:
|
|
2174
|
+
label: At(uo, {
|
|
2137
2175
|
variant: "body2",
|
|
2138
2176
|
children: a("conditionalFormat.showIconsOnly")
|
|
2139
2177
|
})
|
|
2140
|
-
}),
|
|
2141
|
-
control:
|
|
2178
|
+
}), At(Gt, {
|
|
2179
|
+
control: At($t, {
|
|
2142
2180
|
size: "small",
|
|
2143
2181
|
checked: t.reverse ?? !1,
|
|
2144
2182
|
disabled: n,
|
|
2145
2183
|
onChange: (e) => p({ reverse: !!e.target.checked || void 0 })
|
|
2146
2184
|
}),
|
|
2147
|
-
label:
|
|
2185
|
+
label: At(uo, {
|
|
2148
2186
|
variant: "body2",
|
|
2149
2187
|
children: a("conditionalFormat.reverseIcons")
|
|
2150
2188
|
})
|
|
2151
2189
|
})]
|
|
2152
2190
|
})
|
|
2153
|
-
] }),
|
|
2191
|
+
] }), At(bn, {
|
|
2154
2192
|
variant: "config",
|
|
2155
2193
|
children: s.map((e, r) => {
|
|
2156
2194
|
const a = t.reverse ? d - 1 - r : r;
|
|
2157
|
-
return
|
|
2195
|
+
return At(Fn, {
|
|
2158
2196
|
stop: e,
|
|
2159
|
-
allowedTypes:
|
|
2197
|
+
allowedTypes: Vn,
|
|
2160
2198
|
showExclusive: !0,
|
|
2161
2199
|
readOnly: n || 0 === r,
|
|
2162
|
-
leading:
|
|
2200
|
+
leading: At(Ln, {
|
|
2163
2201
|
icon: c[r] ?? null,
|
|
2164
2202
|
disabled: n || i,
|
|
2165
|
-
onPick: (e) => o(
|
|
2203
|
+
onPick: (e) => o(Me(t, a, e))
|
|
2166
2204
|
}),
|
|
2167
2205
|
onStopChange: (e) => {
|
|
2168
2206
|
const t = s.slice();
|
|
@@ -2173,26 +2211,26 @@ var En = [
|
|
|
2173
2211
|
})]
|
|
2174
2212
|
});
|
|
2175
2213
|
});
|
|
2176
|
-
|
|
2177
|
-
var
|
|
2214
|
+
zn.displayName = "IconSetRulePanel";
|
|
2215
|
+
var jn = (e, t, o) => E(e, t)?.toCSS("adaptive") ?? o, $n = (e, t, o) => {
|
|
2178
2216
|
if (!e) return o;
|
|
2179
|
-
if ("string" == typeof e) return
|
|
2180
|
-
if (e.type ===
|
|
2217
|
+
if ("string" == typeof e) return jn(e, t, o);
|
|
2218
|
+
if (e.type === U.Type.None) return o;
|
|
2181
2219
|
const n = e, r = e;
|
|
2182
|
-
return
|
|
2183
|
-
},
|
|
2184
|
-
const { conditionalFormat: t, size: o = 28, ...n } = e, { workbook: r, themeKey: a } =
|
|
2185
|
-
|
|
2186
|
-
const l = t.getScale(), i = t.getStyle(), s =
|
|
2220
|
+
return jn(r.foreground ?? n.color ?? r.background, t, o);
|
|
2221
|
+
}, Kn = lt((e) => {
|
|
2222
|
+
const { conditionalFormat: t, size: o = 28, ...n } = e, { workbook: r, themeKey: a } = R();
|
|
2223
|
+
Se(t, "onAnyChange");
|
|
2224
|
+
const l = t.getScale(), i = t.getStyle(), s = ct(() => {
|
|
2187
2225
|
try {
|
|
2188
2226
|
return r?.getStyles().getNormal().getFont().toCSS("adaptive") ?? {};
|
|
2189
2227
|
} catch {
|
|
2190
2228
|
return {};
|
|
2191
2229
|
}
|
|
2192
|
-
}, [r, a]), d =
|
|
2193
|
-
if (l?.type ===
|
|
2194
|
-
if (l?.type ===
|
|
2195
|
-
if (l?.type ===
|
|
2230
|
+
}, [r, a]), d = ct(() => {
|
|
2231
|
+
if (l?.type === _.ScaleType.ColorScale) return At(C, { rows: v(l.stops ?? [], x, r) });
|
|
2232
|
+
if (l?.type === _.ScaleType.DataBar) return At(C, { rows: m(l, jn(l.color, r, b), l.borderColor ? jn(l.borderColor, r, b) : void 0) });
|
|
2233
|
+
if (l?.type === _.ScaleType.IconSet) return At(Lt, {
|
|
2196
2234
|
sx: {
|
|
2197
2235
|
display: "flex",
|
|
2198
2236
|
alignItems: "center",
|
|
@@ -2201,15 +2239,15 @@ var Rn = (e, t, o) => W(e, t)?.toCSS("adaptive") ?? o, Ln = (e, t, o) => {
|
|
|
2201
2239
|
height: "100%",
|
|
2202
2240
|
px: .5
|
|
2203
2241
|
},
|
|
2204
|
-
children:
|
|
2205
|
-
icons:
|
|
2242
|
+
children: At(oe, {
|
|
2243
|
+
icons: ke(l),
|
|
2206
2244
|
order: "descending",
|
|
2207
2245
|
size: 14,
|
|
2208
2246
|
gap: 3
|
|
2209
2247
|
})
|
|
2210
2248
|
});
|
|
2211
|
-
const e = i?.font, t = e?.underline && e.underline !==
|
|
2212
|
-
return
|
|
2249
|
+
const e = i?.font, t = e?.underline && e.underline !== q.UnderlineStyle.None;
|
|
2250
|
+
return At(Lt, {
|
|
2213
2251
|
sx: {
|
|
2214
2252
|
width: "100%",
|
|
2215
2253
|
height: "100%",
|
|
@@ -2217,14 +2255,14 @@ var Rn = (e, t, o) => W(e, t)?.toCSS("adaptive") ?? o, Ln = (e, t, o) => {
|
|
|
2217
2255
|
alignItems: "center",
|
|
2218
2256
|
justifyContent: "center",
|
|
2219
2257
|
...s,
|
|
2220
|
-
backgroundColor:
|
|
2221
|
-
...e?.color && "auto" !== e.color ? { color:
|
|
2258
|
+
backgroundColor: $n(i?.fill, r, "transparent"),
|
|
2259
|
+
...e?.color && "auto" !== e.color ? { color: jn(e.color, r, S) } : null,
|
|
2222
2260
|
...e?.weight ? { fontWeight: e.weight } : null,
|
|
2223
2261
|
...e?.style ? { fontStyle: e.style } : null,
|
|
2224
2262
|
textDecoration: [t ? "underline" : "", e?.strike ? "line-through" : ""].join(" ").trim() || "none",
|
|
2225
2263
|
fontSize: `${Math.round(.5 * o)}px`,
|
|
2226
2264
|
lineHeight: 1,
|
|
2227
|
-
outline: i?.borders ? `1px solid ${
|
|
2265
|
+
outline: i?.borders ? `1px solid ${jn(Object.values(i.borders)[0]?.color, r, F)}` : void 0,
|
|
2228
2266
|
outlineOffset: "-3px"
|
|
2229
2267
|
},
|
|
2230
2268
|
children: "Aa"
|
|
@@ -2237,7 +2275,7 @@ var Rn = (e, t, o) => W(e, t)?.toCSS("adaptive") ?? o, Ln = (e, t, o) => {
|
|
|
2237
2275
|
r,
|
|
2238
2276
|
a
|
|
2239
2277
|
]);
|
|
2240
|
-
return
|
|
2278
|
+
return At(W, {
|
|
2241
2279
|
sheet: !0,
|
|
2242
2280
|
className: "sxl-cf-rule-preview",
|
|
2243
2281
|
sx: {
|
|
@@ -2249,25 +2287,25 @@ var Rn = (e, t, o) => W(e, t)?.toCSS("adaptive") ?? o, Ln = (e, t, o) => {
|
|
|
2249
2287
|
children: d
|
|
2250
2288
|
});
|
|
2251
2289
|
});
|
|
2252
|
-
|
|
2253
|
-
var
|
|
2290
|
+
Kn.displayName = "RulePreview";
|
|
2291
|
+
var _n = (e, t) => {
|
|
2254
2292
|
const o = e.getCondition()?.toString();
|
|
2255
2293
|
if (o) return o;
|
|
2256
2294
|
const n = e.getScale();
|
|
2257
|
-
return n ?
|
|
2258
|
-
},
|
|
2259
|
-
classic:
|
|
2260
|
-
[
|
|
2261
|
-
[
|
|
2262
|
-
[
|
|
2263
|
-
},
|
|
2264
|
-
const { conditionalFormat: t } = e, o =
|
|
2265
|
-
|
|
2266
|
-
const n = t.getScale(),
|
|
2295
|
+
return n ? V.camelToPrettyCase(n.type) : t("conditionalFormat.noCondition");
|
|
2296
|
+
}, Hn = {
|
|
2297
|
+
classic: So("conditionalFormat.tab.classic"),
|
|
2298
|
+
[_.ScaleType.ColorScale]: So("conditionalFormat.tab.colorScale"),
|
|
2299
|
+
[_.ScaleType.DataBar]: So("conditionalFormat.tab.dataBars"),
|
|
2300
|
+
[_.ScaleType.IconSet]: So("conditionalFormat.tab.iconSets")
|
|
2301
|
+
}, Un = lt((e) => {
|
|
2302
|
+
const { conditionalFormat: t } = e, o = tt();
|
|
2303
|
+
Se(t, "onAnyChange");
|
|
2304
|
+
const n = t.getScale(), a = t.getCondition(), l = t.getStyle(), i = t.isProtected(), s = n?.type ?? "classic", d = pt({ scales: {} }), c = (e) => {
|
|
2267
2305
|
t.update({ scale: e });
|
|
2268
|
-
}, p =
|
|
2306
|
+
}, p = Wt(to, {
|
|
2269
2307
|
tabIndex: 0,
|
|
2270
|
-
className:
|
|
2308
|
+
className: r["editor-panel"],
|
|
2271
2309
|
sx: {
|
|
2272
2310
|
gap: (e) => e.spacing(1),
|
|
2273
2311
|
paddingTop: (e) => e.spacing(1.25),
|
|
@@ -2279,7 +2317,7 @@ var zn = (e, t) => {
|
|
|
2279
2317
|
overflow: "auto"
|
|
2280
2318
|
},
|
|
2281
2319
|
children: [
|
|
2282
|
-
|
|
2320
|
+
Wt(Lt, {
|
|
2283
2321
|
sx: {
|
|
2284
2322
|
display: "flex",
|
|
2285
2323
|
flexDirection: "column",
|
|
@@ -2287,42 +2325,42 @@ var zn = (e, t) => {
|
|
|
2287
2325
|
margin: (e) => e.spacing(1.25),
|
|
2288
2326
|
marginBottom: 0
|
|
2289
2327
|
},
|
|
2290
|
-
children: [
|
|
2328
|
+
children: [Wt(Lt, {
|
|
2291
2329
|
sx: {
|
|
2292
2330
|
display: "flex",
|
|
2293
2331
|
alignItems: "center",
|
|
2294
2332
|
gap: (e) => e.spacing(1.5)
|
|
2295
2333
|
},
|
|
2296
|
-
children: [
|
|
2334
|
+
children: [At(Kn, {
|
|
2297
2335
|
conditionalFormat: t,
|
|
2298
2336
|
size: 48
|
|
2299
|
-
}),
|
|
2337
|
+
}), At(uo, {
|
|
2300
2338
|
variant: "body2",
|
|
2301
2339
|
sx: {
|
|
2302
2340
|
minWidth: 0,
|
|
2303
2341
|
wordBreak: "break-word"
|
|
2304
2342
|
},
|
|
2305
|
-
children:
|
|
2343
|
+
children: _n(t, o)
|
|
2306
2344
|
})]
|
|
2307
|
-
}),
|
|
2345
|
+
}), At(h, {
|
|
2308
2346
|
item: t,
|
|
2309
2347
|
label: o("conditionalFormat.applyTo")
|
|
2310
2348
|
})]
|
|
2311
2349
|
}),
|
|
2312
|
-
|
|
2313
|
-
value:
|
|
2350
|
+
At(lo, {
|
|
2351
|
+
value: s,
|
|
2314
2352
|
onChange: (e, o) => {
|
|
2315
|
-
|
|
2316
|
-
if (e !==
|
|
2317
|
-
condition:
|
|
2318
|
-
operator:
|
|
2353
|
+
i || ((e) => {
|
|
2354
|
+
if (e !== s) if ("classic" === s ? (d.current.condition = a?.toJSON() ?? null, d.current.style = l) : n && (d.current.scales[n.type] = n), "classic" === e) t.update({
|
|
2355
|
+
condition: d.current.condition ?? {
|
|
2356
|
+
operator: K.BuiltInOperatorNames.Between,
|
|
2319
2357
|
param: null
|
|
2320
2358
|
},
|
|
2321
|
-
style:
|
|
2359
|
+
style: d.current.style ?? null,
|
|
2322
2360
|
scale: null
|
|
2323
2361
|
});
|
|
2324
2362
|
else {
|
|
2325
|
-
const o =
|
|
2363
|
+
const o = d.current.scales[e] ?? (e === _.ScaleType.ColorScale ? ye() : e === _.ScaleType.DataBar ? fe() : be());
|
|
2326
2364
|
t.update({
|
|
2327
2365
|
scale: o,
|
|
2328
2366
|
condition: null,
|
|
@@ -2345,38 +2383,38 @@ var zn = (e, t) => {
|
|
|
2345
2383
|
minWidth: 0
|
|
2346
2384
|
}
|
|
2347
2385
|
},
|
|
2348
|
-
children: Object.keys(
|
|
2386
|
+
children: Object.keys(Hn).map((e) => At(ao, {
|
|
2349
2387
|
value: e,
|
|
2350
|
-
label: o(
|
|
2388
|
+
label: o(Hn[e])
|
|
2351
2389
|
}, e))
|
|
2352
2390
|
}),
|
|
2353
|
-
"classic" ===
|
|
2354
|
-
format:
|
|
2355
|
-
readOnly:
|
|
2391
|
+
"classic" === s && Wt(Mt, { children: [At(wn, {
|
|
2392
|
+
format: l,
|
|
2393
|
+
readOnly: i,
|
|
2356
2394
|
onFormatChange: (e) => t.update({ style: e })
|
|
2357
|
-
}),
|
|
2395
|
+
}), At(fn, {
|
|
2358
2396
|
selectorTitle: o("conditionalFormat.highlight"),
|
|
2359
|
-
condition:
|
|
2397
|
+
condition: a,
|
|
2360
2398
|
ranges: t.getRanges(),
|
|
2361
|
-
readOnly:
|
|
2399
|
+
readOnly: i,
|
|
2362
2400
|
onConditionChange: (e) => t.setCondition(e)
|
|
2363
2401
|
})] }),
|
|
2364
|
-
n?.type ===
|
|
2402
|
+
n?.type === _.ScaleType.ColorScale && At(Nn, {
|
|
2365
2403
|
scale: n,
|
|
2366
2404
|
onScaleChange: c,
|
|
2367
|
-
readOnly:
|
|
2405
|
+
readOnly: i
|
|
2368
2406
|
}),
|
|
2369
|
-
n?.type ===
|
|
2407
|
+
n?.type === _.ScaleType.DataBar && At(Mn, {
|
|
2370
2408
|
scale: n,
|
|
2371
2409
|
onScaleChange: c,
|
|
2372
|
-
readOnly:
|
|
2410
|
+
readOnly: i
|
|
2373
2411
|
}),
|
|
2374
|
-
n?.type ===
|
|
2412
|
+
n?.type === _.ScaleType.IconSet && At(zn, {
|
|
2375
2413
|
scale: n,
|
|
2376
2414
|
onScaleChange: c,
|
|
2377
|
-
readOnly:
|
|
2415
|
+
readOnly: i
|
|
2378
2416
|
}),
|
|
2379
|
-
"classic" ===
|
|
2417
|
+
"classic" === s && At(Lt, {
|
|
2380
2418
|
sx: {
|
|
2381
2419
|
pl: 2,
|
|
2382
2420
|
pr: 2,
|
|
@@ -2384,10 +2422,10 @@ var zn = (e, t) => {
|
|
|
2384
2422
|
borderColor: "divider",
|
|
2385
2423
|
borderRadius: 1
|
|
2386
2424
|
},
|
|
2387
|
-
children:
|
|
2388
|
-
control:
|
|
2425
|
+
children: At(Gt, {
|
|
2426
|
+
control: At($t, {
|
|
2389
2427
|
checked: t.isStopIfTrue(),
|
|
2390
|
-
disabled:
|
|
2428
|
+
disabled: i,
|
|
2391
2429
|
onChange: (e) => t.setStopIfTrue(e.target.checked)
|
|
2392
2430
|
}),
|
|
2393
2431
|
label: o("conditionalFormat.stopIfTrue")
|
|
@@ -2395,15 +2433,15 @@ var zn = (e, t) => {
|
|
|
2395
2433
|
})
|
|
2396
2434
|
]
|
|
2397
2435
|
});
|
|
2398
|
-
return
|
|
2436
|
+
return At(Wo.Provider, {
|
|
2399
2437
|
value: t,
|
|
2400
2438
|
children: p
|
|
2401
2439
|
});
|
|
2402
2440
|
});
|
|
2403
|
-
|
|
2404
|
-
var
|
|
2405
|
-
const t =
|
|
2406
|
-
return
|
|
2441
|
+
Un.displayName = "ConditionalFormatEditorPanel";
|
|
2442
|
+
var qn = lt(({ item: e }) => {
|
|
2443
|
+
const t = tt();
|
|
2444
|
+
return Se(e, "onAnyChange"), !e.isStopIfTrue() || e.getScale() ? null : At(Lt, {
|
|
2407
2445
|
sx: {
|
|
2408
2446
|
display: "inline-flex",
|
|
2409
2447
|
alignItems: "center",
|
|
@@ -2415,34 +2453,34 @@ var Kn = rt(({ item: e }) => {
|
|
|
2415
2453
|
borderRadius: 1,
|
|
2416
2454
|
color: "text.secondary"
|
|
2417
2455
|
},
|
|
2418
|
-
children:
|
|
2456
|
+
children: At(uo, {
|
|
2419
2457
|
variant: "caption",
|
|
2420
2458
|
children: t("conditionalFormat.stopIfTrue")
|
|
2421
2459
|
})
|
|
2422
2460
|
});
|
|
2423
2461
|
});
|
|
2424
|
-
|
|
2425
|
-
var
|
|
2462
|
+
qn.displayName = "StopIfTrueBadge";
|
|
2463
|
+
var Gn = lt(({ item: e }) => At(h, {
|
|
2426
2464
|
item: e,
|
|
2427
|
-
label:
|
|
2465
|
+
label: tt()("conditionalFormat.applyTo"),
|
|
2428
2466
|
helperText: null
|
|
2429
2467
|
}));
|
|
2430
|
-
|
|
2431
|
-
var
|
|
2468
|
+
Gn.displayName = "ConditionalFormatCardRanges";
|
|
2469
|
+
var Qn = {
|
|
2432
2470
|
key: "conditional-format",
|
|
2433
2471
|
messageKeys: {
|
|
2434
|
-
none:
|
|
2435
|
-
addPrompt:
|
|
2436
|
-
heading:
|
|
2437
|
-
insert:
|
|
2438
|
-
new:
|
|
2439
|
-
moveUp:
|
|
2440
|
-
moveDown:
|
|
2441
|
-
edit:
|
|
2442
|
-
duplicate:
|
|
2443
|
-
delete:
|
|
2444
|
-
cancel:
|
|
2445
|
-
save:
|
|
2472
|
+
none: So("conditionalFormat.none"),
|
|
2473
|
+
addPrompt: So("conditionalFormat.addPrompt"),
|
|
2474
|
+
heading: So("conditionalFormat.heading"),
|
|
2475
|
+
insert: So("conditionalFormat.insert"),
|
|
2476
|
+
new: So("conditionalFormat.new"),
|
|
2477
|
+
moveUp: So("conditionalFormat.moveUp"),
|
|
2478
|
+
moveDown: So("conditionalFormat.moveDown"),
|
|
2479
|
+
edit: So("conditionalFormat.edit"),
|
|
2480
|
+
duplicate: So("conditionalFormat.duplicate"),
|
|
2481
|
+
delete: So("conditionalFormat.delete"),
|
|
2482
|
+
cancel: So("conditionalFormat.cancel"),
|
|
2483
|
+
save: So("conditionalFormat.save")
|
|
2446
2484
|
},
|
|
2447
2485
|
getCollection: (e) => e.getConditionalFormats(),
|
|
2448
2486
|
changeEvents: ["onConditionalFormatsChange"],
|
|
@@ -2450,6 +2488,7 @@ var Hn = {
|
|
|
2450
2488
|
applyUpdate: (e, t) => {
|
|
2451
2489
|
e.update(t);
|
|
2452
2490
|
},
|
|
2491
|
+
validate: (e) => e.getCondition()?.validate() ?? null,
|
|
2453
2492
|
applySeed: (e, t) => {
|
|
2454
2493
|
e.update({
|
|
2455
2494
|
condition: t.condition ?? null,
|
|
@@ -2458,35 +2497,35 @@ var Hn = {
|
|
|
2458
2497
|
stopIfTrue: t.stopIfTrue ?? !1
|
|
2459
2498
|
});
|
|
2460
2499
|
},
|
|
2461
|
-
getCardTitle:
|
|
2462
|
-
CardMedia: ({ item: e }) =>
|
|
2500
|
+
getCardTitle: _n,
|
|
2501
|
+
CardMedia: ({ item: e }) => At(Kn, {
|
|
2463
2502
|
conditionalFormat: e,
|
|
2464
2503
|
size: 32
|
|
2465
2504
|
}),
|
|
2466
|
-
CardSubtitle:
|
|
2467
|
-
CardBody:
|
|
2468
|
-
EditorBody: ({ item: e }) =>
|
|
2469
|
-
},
|
|
2505
|
+
CardSubtitle: Gn,
|
|
2506
|
+
CardBody: qn,
|
|
2507
|
+
EditorBody: ({ item: e }) => At(Un, { conditionalFormat: e })
|
|
2508
|
+
}, Yn = lt(rt((e, t) => {
|
|
2470
2509
|
const { workbook: o, args: n, ...r } = e;
|
|
2471
|
-
return
|
|
2510
|
+
return At(B, {
|
|
2472
2511
|
ref: t,
|
|
2473
2512
|
workbook: o,
|
|
2474
|
-
descriptor:
|
|
2513
|
+
descriptor: Qn,
|
|
2475
2514
|
args: n,
|
|
2476
2515
|
dragReorder: !0,
|
|
2477
2516
|
...r
|
|
2478
2517
|
});
|
|
2479
2518
|
}));
|
|
2480
|
-
|
|
2481
|
-
var
|
|
2519
|
+
Yn.displayName = "ConditionalFormatDetailsPanel";
|
|
2520
|
+
var Jn = (e) => {
|
|
2482
2521
|
const { model: t, entryKey: o, frame: n, args: r, ref: a, ...l } = e;
|
|
2483
|
-
return
|
|
2522
|
+
return At(Yn, {
|
|
2484
2523
|
ref: a,
|
|
2485
2524
|
workbook: t,
|
|
2486
2525
|
args: r,
|
|
2487
2526
|
...l
|
|
2488
2527
|
});
|
|
2489
|
-
},
|
|
2528
|
+
}, Xn = {
|
|
2490
2529
|
card: "_card_h0jnt_7",
|
|
2491
2530
|
actionRoot: "_actionRoot_h0jnt_11",
|
|
2492
2531
|
icons: "_icons_h0jnt_16",
|
|
@@ -2496,63 +2535,63 @@ var qn = (e) => {
|
|
|
2496
2535
|
paper: "_paper_h0jnt_37",
|
|
2497
2536
|
checkIcon: "_checkIcon_h0jnt_42",
|
|
2498
2537
|
button: "_button_h0jnt_47"
|
|
2499
|
-
},
|
|
2500
|
-
const { id: o, message: n, iconVariant: r, error: a, hideIconVariant: l, ...i } = e, s =
|
|
2538
|
+
}, Zn = lt(rt((e, t) => {
|
|
2539
|
+
const { id: o, message: n, iconVariant: r, error: a, hideIconVariant: l, ...i } = e, s = tt(), { closeSnackbar: d } = Oo(), [c, p] = ut(!1), u = a ? xo.collectErrorChain(a, !0)?.[0]?.error : void 0, m = u && !(u instanceof vo), g = it(() => {
|
|
2501
2540
|
p((e) => !e);
|
|
2502
|
-
}, []), h =
|
|
2541
|
+
}, []), h = it(() => {
|
|
2503
2542
|
d(o);
|
|
2504
2543
|
}, [o, d]);
|
|
2505
2544
|
let y = u?.message;
|
|
2506
|
-
return !y &&
|
|
2545
|
+
return !y && at(n) && (y = n), y || "string" != typeof n || (y = n), y || (y = `Unknown Error: ${n}`), At(Io, {
|
|
2507
2546
|
ref: t,
|
|
2508
|
-
className:
|
|
2509
|
-
children:
|
|
2510
|
-
className:
|
|
2547
|
+
className: Fo(Xn.root, "error-snackbar"),
|
|
2548
|
+
children: Wt(zt, {
|
|
2549
|
+
className: Xn.card,
|
|
2511
2550
|
style: {
|
|
2512
2551
|
backgroundColor: "var(--sxl-color-error)",
|
|
2513
2552
|
color: "var(--sxl-color-error-content)",
|
|
2514
2553
|
border: "1px solid var(--sxl-color-error)"
|
|
2515
2554
|
},
|
|
2516
|
-
children: [
|
|
2517
|
-
className:
|
|
2555
|
+
children: [Wt(jt, {
|
|
2556
|
+
className: Xn.actionRoot,
|
|
2518
2557
|
children: [
|
|
2519
2558
|
l ? null : r?.error,
|
|
2520
|
-
|
|
2559
|
+
At(uo, {
|
|
2521
2560
|
variant: "body2",
|
|
2522
2561
|
component: "div",
|
|
2523
|
-
className:
|
|
2562
|
+
className: Xn.typography,
|
|
2524
2563
|
children: y
|
|
2525
2564
|
}),
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
className:
|
|
2529
|
-
children: [m ?
|
|
2565
|
+
At("div", { style: { flex: "1 1 auto" } }),
|
|
2566
|
+
Wt("div", {
|
|
2567
|
+
className: Xn.icons,
|
|
2568
|
+
children: [m ? At(Yt, {
|
|
2530
2569
|
"aria-label": s("toast.showMore"),
|
|
2531
2570
|
size: "small",
|
|
2532
|
-
className:
|
|
2571
|
+
className: Fo(Xn.expand, { [Xn.expandOpen]: c }),
|
|
2533
2572
|
onClick: g,
|
|
2534
|
-
children:
|
|
2535
|
-
}) : null,
|
|
2573
|
+
children: At(Be, { iconKey: "ExpandMore" })
|
|
2574
|
+
}) : null, At(Yt, {
|
|
2536
2575
|
size: "small",
|
|
2537
|
-
className:
|
|
2576
|
+
className: Xn.expand,
|
|
2538
2577
|
onClick: h,
|
|
2539
|
-
children:
|
|
2578
|
+
children: At(Be, {
|
|
2540
2579
|
iconKey: "Close",
|
|
2541
2580
|
style: { transform: "scale(0.8)" }
|
|
2542
2581
|
})
|
|
2543
2582
|
})]
|
|
2544
2583
|
})
|
|
2545
2584
|
]
|
|
2546
|
-
}), m ?
|
|
2585
|
+
}), m ? At(Kt, {
|
|
2547
2586
|
in: c,
|
|
2548
2587
|
timeout: "auto",
|
|
2549
|
-
children:
|
|
2550
|
-
className:
|
|
2588
|
+
children: At("div", {
|
|
2589
|
+
className: Xn.stackTraceContainer,
|
|
2551
2590
|
style: {
|
|
2552
2591
|
backgroundColor: "color-mix(in srgb, var(--sxl-color-error) 90%, var(--sxl-color-base-100))",
|
|
2553
2592
|
borderTop: "1px solid var(--sxl-color-error)"
|
|
2554
2593
|
},
|
|
2555
|
-
children:
|
|
2594
|
+
children: At(kt, {
|
|
2556
2595
|
error: a,
|
|
2557
2596
|
hideLineNumbers: !0
|
|
2558
2597
|
})
|
|
@@ -2561,11 +2600,11 @@ var qn = (e) => {
|
|
|
2561
2600
|
})
|
|
2562
2601
|
});
|
|
2563
2602
|
}));
|
|
2564
|
-
|
|
2565
|
-
var
|
|
2603
|
+
Zn.displayName = "ToastError";
|
|
2604
|
+
var er = At(() => At(xt, {
|
|
2566
2605
|
label: "SheetXL",
|
|
2567
|
-
description:
|
|
2568
|
-
children:
|
|
2606
|
+
description: tt()("logo.description"),
|
|
2607
|
+
children: At(Lt, {
|
|
2569
2608
|
component: "a",
|
|
2570
2609
|
href: "https://www.sheetxl.com",
|
|
2571
2610
|
target: "_blank",
|
|
@@ -2578,16 +2617,16 @@ var Yn = Ot(() => Ot(ft, {
|
|
|
2578
2617
|
marginLeft: "6px",
|
|
2579
2618
|
cursor: "pointer"
|
|
2580
2619
|
},
|
|
2581
|
-
children:
|
|
2620
|
+
children: At(ne, { style: {
|
|
2582
2621
|
width: "24px",
|
|
2583
2622
|
height: "24px"
|
|
2584
2623
|
} })
|
|
2585
2624
|
})
|
|
2586
|
-
}), {}),
|
|
2587
|
-
const { workbook: o, className: n, logo: r =
|
|
2588
|
-
return
|
|
2625
|
+
}), {}), tr = lt(rt((e, t) => {
|
|
2626
|
+
const { workbook: o, className: n, logo: r = er, mainElement: a, startElement: l, endElement: i, ...s } = e, [d, { width: c }] = No(), p = c < 530, u = pt(null);
|
|
2627
|
+
return At(Lt, {
|
|
2589
2628
|
...s,
|
|
2590
|
-
ref:
|
|
2629
|
+
ref: Do([
|
|
2591
2630
|
u,
|
|
2592
2631
|
d,
|
|
2593
2632
|
t
|
|
@@ -2595,7 +2634,7 @@ var Yn = Ot(() => Ot(ft, {
|
|
|
2595
2634
|
className: n,
|
|
2596
2635
|
children: P({
|
|
2597
2636
|
isCompact: p,
|
|
2598
|
-
wrapperSelect: (e) =>
|
|
2637
|
+
wrapperSelect: (e) => Wt(Lt, {
|
|
2599
2638
|
sx: {
|
|
2600
2639
|
display: "grid",
|
|
2601
2640
|
gridTemplateColumns: "1fr auto 1fr",
|
|
@@ -2606,7 +2645,7 @@ var Yn = Ot(() => Ot(ft, {
|
|
|
2606
2645
|
paddingRight: (e) => e.spacing(1)
|
|
2607
2646
|
},
|
|
2608
2647
|
children: [
|
|
2609
|
-
|
|
2648
|
+
Wt(Lt, {
|
|
2610
2649
|
sx: {
|
|
2611
2650
|
display: "flex",
|
|
2612
2651
|
flexDirection: "row",
|
|
@@ -2614,7 +2653,7 @@ var Yn = Ot(() => Ot(ft, {
|
|
|
2614
2653
|
justifyContent: "start",
|
|
2615
2654
|
gap: (e) => e.spacing(.5)
|
|
2616
2655
|
},
|
|
2617
|
-
children: [r,
|
|
2656
|
+
children: [r, Wt(Lt, {
|
|
2618
2657
|
sx: {
|
|
2619
2658
|
display: "flex",
|
|
2620
2659
|
flexDirection: "row",
|
|
@@ -2624,7 +2663,7 @@ var Yn = Ot(() => Ot(ft, {
|
|
|
2624
2663
|
children: [l, e]
|
|
2625
2664
|
})]
|
|
2626
2665
|
}),
|
|
2627
|
-
|
|
2666
|
+
At(Lt, {
|
|
2628
2667
|
sx: {
|
|
2629
2668
|
display: "flex",
|
|
2630
2669
|
flexDirection: "row",
|
|
@@ -2635,7 +2674,7 @@ var Yn = Ot(() => Ot(ft, {
|
|
|
2635
2674
|
},
|
|
2636
2675
|
children: a
|
|
2637
2676
|
}),
|
|
2638
|
-
|
|
2677
|
+
At(Lt, {
|
|
2639
2678
|
sx: {
|
|
2640
2679
|
display: "flex",
|
|
2641
2680
|
alignItems: "center",
|
|
@@ -2648,12 +2687,12 @@ var Yn = Ot(() => Ot(ft, {
|
|
|
2648
2687
|
})
|
|
2649
2688
|
});
|
|
2650
2689
|
}));
|
|
2651
|
-
|
|
2652
|
-
var
|
|
2690
|
+
tr.displayName = "StudioToolbar";
|
|
2691
|
+
var or = (e, t) => {
|
|
2653
2692
|
const o = new URL(window.location.pathname, window.location.origin);
|
|
2654
|
-
e && o.searchParams.set("source", e), e && t && o.searchParams.set("title", t), window.open(o.toString(), "sheetxl-" +
|
|
2693
|
+
e && o.searchParams.set("source", e), e && t && o.searchParams.set("title", t), window.open(o.toString(), "sheetxl-" + yo.uuidV4(), "popup=true");
|
|
2655
2694
|
};
|
|
2656
|
-
function
|
|
2695
|
+
function nr(e, t) {
|
|
2657
2696
|
const { workbook: o, setWorkbook: n, workbookTitle: r = "export", isDirty: a, notifier: l, refSave: i } = t;
|
|
2658
2697
|
let s = !1;
|
|
2659
2698
|
const d = async (e = null, t = null, o = null) => {
|
|
@@ -2662,20 +2701,20 @@ function Zn(e, t) {
|
|
|
2662
2701
|
typedCreateWorkbookOptions: t ?? void 0,
|
|
2663
2702
|
onPassword: async ({ origin: e, validate: t }) => {
|
|
2664
2703
|
const o = await l.showInput({
|
|
2665
|
-
title:
|
|
2666
|
-
description:
|
|
2704
|
+
title: To("dialog.password.title"),
|
|
2705
|
+
description: To("dialog.password.open.description", { name: e.getName() ?? "" }),
|
|
2667
2706
|
inputType: "password",
|
|
2668
2707
|
options: [{
|
|
2669
2708
|
id: "Open",
|
|
2670
|
-
label: () =>
|
|
2709
|
+
label: () => To("dialog.open")
|
|
2671
2710
|
}, "Cancel"],
|
|
2672
2711
|
defaultOption: "Open",
|
|
2673
2712
|
onValidateInput: async (e, o) => void 0 === o ? { valid: !0 } : e ? await t(e) ? { valid: !0 } : {
|
|
2674
2713
|
valid: !1,
|
|
2675
|
-
message:
|
|
2714
|
+
message: To("dialog.password.open.retry")
|
|
2676
2715
|
} : {
|
|
2677
2716
|
valid: !1,
|
|
2678
|
-
message:
|
|
2717
|
+
message: To("dialog.password.open.required")
|
|
2679
2718
|
}
|
|
2680
2719
|
});
|
|
2681
2720
|
return "Open" === o?.option ? o.input ?? null : null;
|
|
@@ -2687,11 +2726,11 @@ function Zn(e, t) {
|
|
|
2687
2726
|
let a;
|
|
2688
2727
|
o && (r.progress.onStart = o);
|
|
2689
2728
|
let i = -5;
|
|
2690
|
-
return
|
|
2729
|
+
return pe.read({
|
|
2691
2730
|
...r,
|
|
2692
2731
|
progress: {
|
|
2693
2732
|
async onStart(e, t) {
|
|
2694
|
-
await r?.progress?.onStart?.(e, t), a = await l?.showBusy?.(
|
|
2733
|
+
await r?.progress?.onStart?.(e, t), a = await l?.showBusy?.(To("workbook.opening", { name: e?.getName() ?? "" })), t && a?.setProgress?.(0, t);
|
|
2695
2734
|
},
|
|
2696
2735
|
onProgress(e, t) {
|
|
2697
2736
|
if (!t) return;
|
|
@@ -2704,7 +2743,7 @@ function Zn(e, t) {
|
|
|
2704
2743
|
o - i < 5 || (i = o, a?.setProgress?.(e, t));
|
|
2705
2744
|
},
|
|
2706
2745
|
onComplete() {
|
|
2707
|
-
a?.(), n.length > 0 && (l.showMessage(
|
|
2746
|
+
a?.(), n.length > 0 && (l.showMessage(To("workbook.importWarnings")), console.warn("Import warnings:\n" + n.join("\n")));
|
|
2708
2747
|
},
|
|
2709
2748
|
onWarning(e, t) {
|
|
2710
2749
|
r?.progress?.onWarning?.(e, t);
|
|
@@ -2717,7 +2756,7 @@ function Zn(e, t) {
|
|
|
2717
2756
|
format: t?.key,
|
|
2718
2757
|
progress: {
|
|
2719
2758
|
async onStart(e) {
|
|
2720
|
-
a = await l?.showBusy?.(
|
|
2759
|
+
a = await l?.showBusy?.(To("workbook.saving", { name: e?.getName() ?? "" }));
|
|
2721
2760
|
},
|
|
2722
2761
|
onComplete() {
|
|
2723
2762
|
a?.();
|
|
@@ -2725,55 +2764,55 @@ function Zn(e, t) {
|
|
|
2725
2764
|
},
|
|
2726
2765
|
onWarnings: n ?? (async ({ warnings: e, origin: t, canCancel: o }) => {
|
|
2727
2766
|
a?.(), console.warn(`Not written to '${t.getName()}':\n${e.map((e) => ` ${e.message}`).join("\n")}`);
|
|
2728
|
-
const n =
|
|
2767
|
+
const n = To("dialog.writeWarnings.title"), r = t.getFormat(), i = (r ? (await pe.getWriteFormats({ search: r }))[0] : void 0)?.description ?? r ?? "", s = To("dialog.writeWarnings.keep");
|
|
2729
2768
|
return o ? "Save" === await l.showOptions({
|
|
2730
2769
|
title: n,
|
|
2731
|
-
type:
|
|
2732
|
-
description: `${
|
|
2770
|
+
type: Ve.Warning,
|
|
2771
|
+
description: `${To("dialog.writeWarnings.confirm", { format: i })}\n\n${s}`,
|
|
2733
2772
|
options: [{
|
|
2734
2773
|
id: "Save",
|
|
2735
|
-
label: () =>
|
|
2774
|
+
label: () => To("dialog.save")
|
|
2736
2775
|
}, "Cancel"],
|
|
2737
2776
|
defaultOption: "Cancel"
|
|
2738
|
-
}) && (a = await l?.showBusy?.(
|
|
2777
|
+
}) && (a = await l?.showBusy?.(To("workbook.saving", { name: t?.getName() ?? "" })), !0) : (l.showOptions({
|
|
2739
2778
|
title: n,
|
|
2740
|
-
type:
|
|
2741
|
-
description: `${
|
|
2779
|
+
type: Ve.Warning,
|
|
2780
|
+
description: `${To("dialog.writeWarnings.saved", { format: i })}\n\n${s}`,
|
|
2742
2781
|
options: ["Ok"]
|
|
2743
2782
|
}), !0);
|
|
2744
2783
|
})
|
|
2745
2784
|
};
|
|
2746
2785
|
let s;
|
|
2747
2786
|
if (o) {
|
|
2748
|
-
const o = e.getOrigin(), n = t?.exts?.[0] ?? (o.getExtension() || "sxl"), a = `${r || o.getName() ||
|
|
2749
|
-
s = await
|
|
2787
|
+
const o = e.getOrigin(), n = t?.exts?.[0] ?? (o.getExtension() || "sxl"), a = `${r || o.getName() || To("workbook.defaultName")}.${n}`;
|
|
2788
|
+
s = await pe.writeAs(e, a, {
|
|
2750
2789
|
...i,
|
|
2751
2790
|
prompt: !0
|
|
2752
2791
|
});
|
|
2753
|
-
} else s = await
|
|
2792
|
+
} else s = await pe.write(e, void 0, i);
|
|
2754
2793
|
return s;
|
|
2755
2794
|
};
|
|
2756
2795
|
let p = null;
|
|
2757
2796
|
return e.updateCommand("newWorkbook", { callback: async (e) => {
|
|
2758
|
-
const t =
|
|
2797
|
+
const t = pe.canRead() && !a();
|
|
2759
2798
|
e?.source ? t && p ? await p({
|
|
2760
2799
|
url: e.source,
|
|
2761
2800
|
title: e.title
|
|
2762
|
-
}) :
|
|
2801
|
+
}) : or(e.source, e.title) : t ? n({}) : or();
|
|
2763
2802
|
} }), e.updateCommand("closeWorkbook", { callback: async () => {
|
|
2764
2803
|
a() && "Close" !== await l.showOptions({
|
|
2765
|
-
title:
|
|
2766
|
-
description:
|
|
2804
|
+
title: To("dialog.confirm.title"),
|
|
2805
|
+
description: To("dialog.unsavedChanges"),
|
|
2767
2806
|
options: [{
|
|
2768
2807
|
id: "Close",
|
|
2769
|
-
label: () =>
|
|
2808
|
+
label: () => To("dialog.close")
|
|
2770
2809
|
}, "Cancel"],
|
|
2771
2810
|
defaultOption: "Cancel"
|
|
2772
2811
|
}) || window.close();
|
|
2773
2812
|
} }), (async () => {
|
|
2774
|
-
const t = await
|
|
2813
|
+
const t = await pe.getWriteFormats();
|
|
2775
2814
|
if (s) return;
|
|
2776
|
-
const r =
|
|
2815
|
+
const r = pe.canWrite(), u = pe.canRead();
|
|
2777
2816
|
if (r) {
|
|
2778
2817
|
const n = (e) => {
|
|
2779
2818
|
const n = e ? t.find((t) => t.key === e) : void 0;
|
|
@@ -2787,13 +2826,13 @@ function Zn(e, t) {
|
|
|
2787
2826
|
for (const o of t) {
|
|
2788
2827
|
const t = o.key;
|
|
2789
2828
|
e.updateCommand(`saveWorkbookAs${t}`, {
|
|
2790
|
-
label: () =>
|
|
2829
|
+
label: () => To("command.saveAsFormat.label", { format: o.description }),
|
|
2791
2830
|
groupLabels: {
|
|
2792
|
-
workbook: () =>
|
|
2793
|
-
saveWorkbookOptions: () =>
|
|
2831
|
+
workbook: () => To("command.saveAsFormat.workbook", { format: o.description }),
|
|
2832
|
+
saveWorkbookOptions: () => To("command.saveAsFormat.compact", { format: o.description })
|
|
2794
2833
|
},
|
|
2795
2834
|
tags: o.tags,
|
|
2796
|
-
description: () =>
|
|
2835
|
+
description: () => To("command.saveAsFormat", { format: o.description }),
|
|
2797
2836
|
icon: "CSV" === t ? "FileDownloadAsCSV" : "Excel" === t ? "FileDownloadAsExcel" : "FileDownloadAsSheet",
|
|
2798
2837
|
callback: () => {
|
|
2799
2838
|
n(t);
|
|
@@ -2821,7 +2860,7 @@ function Zn(e, t) {
|
|
|
2821
2860
|
autoSelect: e === l.length - 1
|
|
2822
2861
|
}).getEntireRange().copyFrom(t.getEntireRange());
|
|
2823
2862
|
}
|
|
2824
|
-
},
|
|
2863
|
+
}, So("op.importData")), a.close();
|
|
2825
2864
|
} catch (e) {
|
|
2826
2865
|
l.showError(e);
|
|
2827
2866
|
}
|
|
@@ -2830,9 +2869,9 @@ function Zn(e, t) {
|
|
|
2830
2869
|
tags: ["noTransaction", "noRepeat"],
|
|
2831
2870
|
callback: async (e = null) => {
|
|
2832
2871
|
let t = e;
|
|
2833
|
-
if (t ||
|
|
2834
|
-
const e = await
|
|
2835
|
-
return
|
|
2872
|
+
if (t || pe.canRead() || (t = await (async () => {
|
|
2873
|
+
const e = await pe.getReadFormats(), t = [...new Set(e.flatMap((e) => e.exts))].map((e) => `.${e}`);
|
|
2874
|
+
return fo.openFileDialog(t.length ? t.join(",") : "*.*");
|
|
2836
2875
|
})(), t)) return m(t);
|
|
2837
2876
|
}
|
|
2838
2877
|
}), e.updateCommand("insertDataFromURL", {
|
|
@@ -2840,14 +2879,14 @@ function Zn(e, t) {
|
|
|
2840
2879
|
callback: async (e) => {
|
|
2841
2880
|
if (!e) {
|
|
2842
2881
|
const t = await l.showInput({
|
|
2843
|
-
title:
|
|
2844
|
-
description:
|
|
2845
|
-
inputLabel:
|
|
2882
|
+
title: To("dialog.importFromWeb.title"),
|
|
2883
|
+
description: To("dialog.importFromWeb.description"),
|
|
2884
|
+
inputLabel: To("dialog.webAddress.inputLabel"),
|
|
2846
2885
|
initialValue: "https://www.sheetxl.com/docs/examples/financial-calculators.xlsx",
|
|
2847
2886
|
propsInput: { style: { minWidth: "440px" } },
|
|
2848
2887
|
options: [{
|
|
2849
2888
|
id: "Import",
|
|
2850
|
-
label: () =>
|
|
2889
|
+
label: () => To("dialog.import")
|
|
2851
2890
|
}]
|
|
2852
2891
|
});
|
|
2853
2892
|
if ("Import" !== t.option) return;
|
|
@@ -2864,11 +2903,11 @@ function Zn(e, t) {
|
|
|
2864
2903
|
}
|
|
2865
2904
|
}), u) {
|
|
2866
2905
|
const t = async () => !a() || "Open" === await l.showOptions({
|
|
2867
|
-
title:
|
|
2868
|
-
description:
|
|
2906
|
+
title: To("dialog.confirm.title"),
|
|
2907
|
+
description: To("dialog.unsavedChanges"),
|
|
2869
2908
|
options: [{
|
|
2870
2909
|
id: "Open",
|
|
2871
|
-
label: () =>
|
|
2910
|
+
label: () => To("dialog.open")
|
|
2872
2911
|
}, "Cancel"],
|
|
2873
2912
|
defaultOption: "Cancel"
|
|
2874
2913
|
}), r = async (e = null) => {
|
|
@@ -2891,14 +2930,14 @@ function Zn(e, t) {
|
|
|
2891
2930
|
const n = "string" == typeof e ? void 0 : e?.title;
|
|
2892
2931
|
if (!o) {
|
|
2893
2932
|
const e = await l.showInput({
|
|
2894
|
-
title:
|
|
2895
|
-
description:
|
|
2896
|
-
inputLabel:
|
|
2933
|
+
title: To("dialog.openFromWeb.title"),
|
|
2934
|
+
description: To("dialog.openFromWeb.description"),
|
|
2935
|
+
inputLabel: To("dialog.webAddress.inputLabel"),
|
|
2897
2936
|
initialValue: "https://www.sheetxl.com/docs/examples/financial-calculators.xlsx",
|
|
2898
2937
|
propsInput: { style: { minWidth: "440px" } },
|
|
2899
2938
|
options: [{
|
|
2900
2939
|
id: "Open",
|
|
2901
|
-
label: () =>
|
|
2940
|
+
label: () => To("dialog.open")
|
|
2902
2941
|
}]
|
|
2903
2942
|
});
|
|
2904
2943
|
if ("Open" !== e.option) return;
|
|
@@ -2918,9 +2957,9 @@ function Zn(e, t) {
|
|
|
2918
2957
|
s = !0, i && (i.current = null);
|
|
2919
2958
|
};
|
|
2920
2959
|
}
|
|
2921
|
-
var
|
|
2922
|
-
|
|
2923
|
-
var
|
|
2960
|
+
var rr = Ft(ko("studio:shortcutKeysDialog", () => import("./D3xcuMwJvLJhlPNV.mjs")).load);
|
|
2961
|
+
N(), M();
|
|
2962
|
+
var ar = /* @__PURE__ */ new Set(["ui"]), lr = (e) => {
|
|
2924
2963
|
const t = (e) => {
|
|
2925
2964
|
if ("function" != typeof e) return e;
|
|
2926
2965
|
try {
|
|
@@ -2930,9 +2969,9 @@ var tr = /* @__PURE__ */ new Set(["ui"]), or = (e) => {
|
|
|
2930
2969
|
}
|
|
2931
2970
|
}, o = (e, o) => {
|
|
2932
2971
|
const n = t(e);
|
|
2933
|
-
return "string" == typeof n ?
|
|
2972
|
+
return "string" == typeof n ? wo(n, o, bo.getActive()) : void 0;
|
|
2934
2973
|
}, n = [];
|
|
2935
|
-
for (const r of e.names()) if (!
|
|
2974
|
+
for (const r of e.names()) if (!ar.has(r)) for (const a of e.keys(r)) {
|
|
2936
2975
|
const l = e.resolveDefinition(r, a);
|
|
2937
2976
|
n.push({
|
|
2938
2977
|
groupKey: r,
|
|
@@ -2942,29 +2981,29 @@ var tr = /* @__PURE__ */ new Set(["ui"]), or = (e) => {
|
|
|
2942
2981
|
getDescription: () => o(l?.description, l?.params) ?? "",
|
|
2943
2982
|
getShortcut: () => t(l?.shortcut) ?? null,
|
|
2944
2983
|
getScope: () => r,
|
|
2945
|
-
getScopeLabel: () =>
|
|
2984
|
+
getScopeLabel: () => Ae.DefaultCommandCatalogService.getScopeLabel(r)
|
|
2946
2985
|
}
|
|
2947
2986
|
});
|
|
2948
2987
|
}
|
|
2949
2988
|
return { getAllCommands: () => n };
|
|
2950
|
-
},
|
|
2951
|
-
const { children: t, workbook: o, setWorkbook: n, workbookTitle: r, isDirty: a, refSave: l } = e,
|
|
2952
|
-
|
|
2953
|
-
const
|
|
2954
|
-
const e =
|
|
2989
|
+
}, ir = (e) => {
|
|
2990
|
+
const { children: t, workbook: o, setWorkbook: n, workbookTitle: r, isDirty: a, refSave: l, fullscreenTarget: i } = e, s = Ae.useCommandScope(), d = Je(), { showModal: c } = Pt(), p = tt(), u = pt(a);
|
|
2991
|
+
u.current = a;
|
|
2992
|
+
const m = Ue(() => {
|
|
2993
|
+
const e = s?.getRoot().getRegistry();
|
|
2955
2994
|
if (!e) return;
|
|
2956
|
-
const t =
|
|
2957
|
-
title:
|
|
2958
|
-
commands:
|
|
2995
|
+
const t = c(rr, {
|
|
2996
|
+
title: p("dialog.shortcutKeys.title"),
|
|
2997
|
+
commands: lr(e),
|
|
2959
2998
|
onDone: () => t.hide(),
|
|
2960
2999
|
onLoadError: (e) => {
|
|
2961
|
-
t.destroy(),
|
|
3000
|
+
t.destroy(), d.showError(e);
|
|
2962
3001
|
}
|
|
2963
3002
|
});
|
|
2964
|
-
}, [
|
|
2965
|
-
|
|
2966
|
-
if (!
|
|
2967
|
-
const e =
|
|
3003
|
+
}, [s, c]);
|
|
3004
|
+
dt(() => {
|
|
3005
|
+
if (!s) return;
|
|
3006
|
+
const e = s.getRoot().contribution();
|
|
2968
3007
|
return function(e, t) {
|
|
2969
3008
|
const o = () => t.showShortcuts();
|
|
2970
3009
|
e.updateCommand("showKeyboardShortcuts", { callback: o }), e.updateCommand("help", { callback: o });
|
|
@@ -2976,12 +3015,12 @@ var tr = /* @__PURE__ */ new Set(["ui"]), or = (e) => {
|
|
|
2976
3015
|
})) e.updateCommand(t, { callback: () => {
|
|
2977
3016
|
window?.open(o);
|
|
2978
3017
|
} });
|
|
2979
|
-
}(e, { showShortcuts:
|
|
2980
|
-
}, [
|
|
2981
|
-
const
|
|
2982
|
-
|
|
2983
|
-
if (!
|
|
2984
|
-
const e =
|
|
3018
|
+
}(e, { showShortcuts: m }), () => e.remove();
|
|
3019
|
+
}, [s, m]);
|
|
3020
|
+
const g = go("(prefers-color-scheme: dark)"), { themeMode: h } = Ze(), [y, f] = Xe(ce.Mode, de[ce.Mode]), [b, x] = Xe(ce.DarkGrid, de[ce.DarkGrid]), [v, C] = Xe(ce.DarkImages, de[ce.DarkImages]);
|
|
3021
|
+
dt(() => {
|
|
3022
|
+
if (!s) return;
|
|
3023
|
+
const e = s.getRoot().contribution();
|
|
2985
3024
|
return function(e, t) {
|
|
2986
3025
|
e.updateCommand("themeMode", {
|
|
2987
3026
|
state: t.mode ?? null,
|
|
@@ -3000,32 +3039,32 @@ var tr = /* @__PURE__ */ new Set(["ui"]), or = (e) => {
|
|
|
3000
3039
|
callback: () => t.setEnableDarkImages((e) => !e)
|
|
3001
3040
|
});
|
|
3002
3041
|
}(e, {
|
|
3003
|
-
mode:
|
|
3004
|
-
setMode:
|
|
3005
|
-
isDark: "dark" ===
|
|
3006
|
-
systemDefaultDark:
|
|
3007
|
-
enableDarkGrid:
|
|
3008
|
-
setEnableDarkGrid:
|
|
3009
|
-
enableDarkImages:
|
|
3010
|
-
setEnableDarkImages:
|
|
3042
|
+
mode: y,
|
|
3043
|
+
setMode: f,
|
|
3044
|
+
isDark: "dark" === y || !y && "dark" === h,
|
|
3045
|
+
systemDefaultDark: g,
|
|
3046
|
+
enableDarkGrid: b,
|
|
3047
|
+
setEnableDarkGrid: x,
|
|
3048
|
+
enableDarkImages: v,
|
|
3049
|
+
setEnableDarkImages: C
|
|
3011
3050
|
}), () => e.remove();
|
|
3012
3051
|
}, [
|
|
3013
|
-
|
|
3052
|
+
s,
|
|
3053
|
+
y,
|
|
3014
3054
|
h,
|
|
3015
3055
|
g,
|
|
3016
|
-
|
|
3056
|
+
b,
|
|
3057
|
+
v,
|
|
3017
3058
|
f,
|
|
3018
3059
|
x,
|
|
3019
|
-
|
|
3020
|
-
b,
|
|
3021
|
-
v
|
|
3060
|
+
C
|
|
3022
3061
|
]);
|
|
3023
|
-
const [
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
}, [
|
|
3027
|
-
if (!
|
|
3028
|
-
const e =
|
|
3062
|
+
const [k, w] = Xe(Le.Active, null), [S, T] = ut(() => bo.getActive());
|
|
3063
|
+
dt(() => bo.addChangeListener(T), []), dt(() => {
|
|
3064
|
+
k && k !== bo.getActive() && bo.setActive(k);
|
|
3065
|
+
}, [k]), dt(() => {
|
|
3066
|
+
if (!s) return;
|
|
3067
|
+
const e = s.getRoot().contribution();
|
|
3029
3068
|
return function(e, t) {
|
|
3030
3069
|
e.updateCommand("language", {
|
|
3031
3070
|
state: t.active,
|
|
@@ -3034,44 +3073,44 @@ var tr = /* @__PURE__ */ new Set(["ui"]), or = (e) => {
|
|
|
3034
3073
|
}
|
|
3035
3074
|
});
|
|
3036
3075
|
}(e, {
|
|
3037
|
-
active:
|
|
3076
|
+
active: S,
|
|
3038
3077
|
setActive: (e) => {
|
|
3039
|
-
|
|
3078
|
+
w(e);
|
|
3040
3079
|
}
|
|
3041
3080
|
}), () => e.remove();
|
|
3042
3081
|
}, [
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3082
|
+
s,
|
|
3083
|
+
S,
|
|
3084
|
+
w
|
|
3046
3085
|
]);
|
|
3047
|
-
const { isFullscreenAvailable:
|
|
3048
|
-
|
|
3049
|
-
if (!
|
|
3050
|
-
const e =
|
|
3086
|
+
const { isFullscreenAvailable: F, isFullscreenEnabled: D, toggleFullscreen: N } = Ge({ target: ct(() => ({ current: i ?? null }), [i]) });
|
|
3087
|
+
dt(() => {
|
|
3088
|
+
if (!s) return;
|
|
3089
|
+
const e = s.getRoot().contribution();
|
|
3051
3090
|
return function(e, t) {
|
|
3052
3091
|
e.updateCommand("fullScreenToggle", {
|
|
3053
3092
|
state: t.isFullscreenEnabled,
|
|
3054
|
-
disabledReasons: t.isFullscreenAvailable ? [] : [
|
|
3093
|
+
disabledReasons: t.isFullscreenAvailable ? [] : [So("reason.fullscreenUnavailable")],
|
|
3055
3094
|
icon: t.isFullscreenEnabled ? "FullScreenOff" : "FullScreen",
|
|
3056
3095
|
callback: () => {
|
|
3057
3096
|
t.toggleFullscreen();
|
|
3058
3097
|
}
|
|
3059
3098
|
});
|
|
3060
3099
|
}(e, {
|
|
3061
|
-
isFullscreenAvailable:
|
|
3062
|
-
isFullscreenEnabled:
|
|
3063
|
-
toggleFullscreen:
|
|
3100
|
+
isFullscreenAvailable: F,
|
|
3101
|
+
isFullscreenEnabled: D,
|
|
3102
|
+
toggleFullscreen: N
|
|
3064
3103
|
}), () => e.remove();
|
|
3065
3104
|
}, [
|
|
3066
|
-
|
|
3067
|
-
T,
|
|
3105
|
+
s,
|
|
3068
3106
|
F,
|
|
3069
|
-
D
|
|
3107
|
+
D,
|
|
3108
|
+
N
|
|
3070
3109
|
]);
|
|
3071
|
-
const
|
|
3072
|
-
return
|
|
3073
|
-
if (!
|
|
3074
|
-
const e =
|
|
3110
|
+
const I = Ne(!0);
|
|
3111
|
+
return dt(() => {
|
|
3112
|
+
if (!s) return;
|
|
3113
|
+
const e = s.getRoot().contribution();
|
|
3075
3114
|
return function(e, t) {
|
|
3076
3115
|
e.updateCommand("protectWorkbook", {
|
|
3077
3116
|
tags: ["noTransaction", "noRepeat"],
|
|
@@ -3079,32 +3118,32 @@ var tr = /* @__PURE__ */ new Set(["ui"]), or = (e) => {
|
|
|
3079
3118
|
t("manageProtection", { args: { tab: "workbook" } });
|
|
3080
3119
|
}
|
|
3081
3120
|
});
|
|
3082
|
-
}(e, (e, t) =>
|
|
3083
|
-
}, [
|
|
3084
|
-
if (!
|
|
3085
|
-
const e =
|
|
3121
|
+
}(e, (e, t) => I.activate(e, t)), () => e.remove();
|
|
3122
|
+
}, [s, I]), dt(() => {
|
|
3123
|
+
if (!s || !o) return;
|
|
3124
|
+
const e = s.getRoot().contribution(), t = nr(e, {
|
|
3086
3125
|
workbook: o,
|
|
3087
3126
|
setWorkbook: n,
|
|
3088
3127
|
workbookTitle: r ?? void 0,
|
|
3089
|
-
isDirty: () =>
|
|
3090
|
-
notifier:
|
|
3128
|
+
isDirty: () => u.current?.() ?? !1,
|
|
3129
|
+
notifier: d,
|
|
3091
3130
|
refSave: l
|
|
3092
3131
|
});
|
|
3093
3132
|
return () => {
|
|
3094
3133
|
t(), e.remove();
|
|
3095
3134
|
};
|
|
3096
3135
|
}, [
|
|
3097
|
-
|
|
3136
|
+
s,
|
|
3098
3137
|
o,
|
|
3099
3138
|
n,
|
|
3100
3139
|
r,
|
|
3101
|
-
|
|
3140
|
+
d,
|
|
3102
3141
|
l
|
|
3103
3142
|
]), t;
|
|
3104
3143
|
};
|
|
3105
|
-
|
|
3106
|
-
var
|
|
3107
|
-
const t =
|
|
3144
|
+
ir.displayName = "StudioCommandProvider";
|
|
3145
|
+
var sr = ({ renderWorkbook: e }) => {
|
|
3146
|
+
const t = Ae.useCommandResolver(), o = pt(null), n = tt(), [r, a] = ut(null), l = it((e) => {
|
|
3108
3147
|
const o = e.dataTransfer;
|
|
3109
3148
|
if (t && o) {
|
|
3110
3149
|
if ("dragenter" === e.type || "dragover" === e.type) {
|
|
@@ -3121,7 +3160,7 @@ var rr = ({ renderWorkbook: e }) => {
|
|
|
3121
3160
|
}
|
|
3122
3161
|
e.preventDefault();
|
|
3123
3162
|
}
|
|
3124
|
-
}, [t]), i =
|
|
3163
|
+
}, [t]), i = Ue((e) => {
|
|
3125
3164
|
e.preventDefault();
|
|
3126
3165
|
const n = r;
|
|
3127
3166
|
if (a(null), n && t && (e.stopPropagation(), e.dataTransfer.files && e.dataTransfer.files.length > 0)) {
|
|
@@ -3146,15 +3185,15 @@ var rr = ({ renderWorkbook: e }) => {
|
|
|
3146
3185
|
} }
|
|
3147
3186
|
});
|
|
3148
3187
|
} else {
|
|
3149
|
-
if (!
|
|
3188
|
+
if (!pe.canRead()) return;
|
|
3150
3189
|
const o = e.dataTransfer.items?.[0], r = "undefined" != typeof window && window.isSecureContext ? o?.getAsFileSystemHandle?.() : void 0;
|
|
3151
3190
|
r ? r.then((e) => t.execute("openWorkbook", "file" === e?.kind ? e : n)).catch(() => t.execute("openWorkbook", n)) : t.execute("openWorkbook", n);
|
|
3152
3191
|
}
|
|
3153
3192
|
}
|
|
3154
|
-
}, [t, r]), s =
|
|
3193
|
+
}, [t, r]), s = ct(() => {
|
|
3155
3194
|
if (!r) return null;
|
|
3156
3195
|
const e = "insertImage" === r;
|
|
3157
|
-
return
|
|
3196
|
+
return At(Lt, {
|
|
3158
3197
|
className: "drop-overlay",
|
|
3159
3198
|
sx: {
|
|
3160
3199
|
position: "absolute",
|
|
@@ -3165,12 +3204,12 @@ var rr = ({ renderWorkbook: e }) => {
|
|
|
3165
3204
|
display: "flex",
|
|
3166
3205
|
justifyContent: "center",
|
|
3167
3206
|
alignItems: "center",
|
|
3168
|
-
backgroundColor: (e) =>
|
|
3207
|
+
backgroundColor: (e) => mo(e.palette.primary.main, .46),
|
|
3169
3208
|
outline: (e) => `2px dashed ${e.palette.primary.main}`,
|
|
3170
3209
|
outlineOffset: "-6px",
|
|
3171
3210
|
borderRadius: 2
|
|
3172
3211
|
},
|
|
3173
|
-
children:
|
|
3212
|
+
children: Wt(to, {
|
|
3174
3213
|
elevation: 6,
|
|
3175
3214
|
sx: {
|
|
3176
3215
|
display: "flex",
|
|
@@ -3182,11 +3221,11 @@ var rr = ({ renderWorkbook: e }) => {
|
|
|
3182
3221
|
color: "text.primary",
|
|
3183
3222
|
"& .drop-overlay-icon": { color: "primary.main" }
|
|
3184
3223
|
},
|
|
3185
|
-
children: [
|
|
3224
|
+
children: [At(Be, {
|
|
3186
3225
|
iconKey: e ? "InsertImage" : "FileOpen",
|
|
3187
3226
|
className: "drop-overlay-icon",
|
|
3188
3227
|
size: 32
|
|
3189
|
-
}),
|
|
3228
|
+
}), At(uo, {
|
|
3190
3229
|
variant: "h6",
|
|
3191
3230
|
component: "span",
|
|
3192
3231
|
children: n(e ? "drop.insertImage" : "drop.open")
|
|
@@ -3194,7 +3233,7 @@ var rr = ({ renderWorkbook: e }) => {
|
|
|
3194
3233
|
})
|
|
3195
3234
|
});
|
|
3196
3235
|
}, [r, n]);
|
|
3197
|
-
return Mt
|
|
3236
|
+
return Wt(Mt, { children: [e({
|
|
3198
3237
|
ref: o,
|
|
3199
3238
|
onDragStart: (e) => {
|
|
3200
3239
|
if (e.target.src) {
|
|
@@ -3207,49 +3246,49 @@ var rr = ({ renderWorkbook: e }) => {
|
|
|
3207
3246
|
onDragOver: l,
|
|
3208
3247
|
onDrop: i
|
|
3209
3248
|
}), s] });
|
|
3210
|
-
},
|
|
3211
|
-
const { workbook: t, setWorkbook: o, refDocumentTitle: n, titleWorkbook: r, setWorkbookTitle: a, isDirty: l, initialCommandAnchor: i, renderWorkbook: s, refSave: d } = e;
|
|
3212
|
-
return
|
|
3249
|
+
}, dr = lt((e) => {
|
|
3250
|
+
const { workbook: t, setWorkbook: o, refDocumentTitle: n, titleWorkbook: r, setWorkbookTitle: a, isDirty: l, initialCommandAnchor: i, renderWorkbook: s, refSave: d, host: c } = e;
|
|
3251
|
+
return At(X, {
|
|
3213
3252
|
initialAnchor: i,
|
|
3214
|
-
children:
|
|
3253
|
+
children: At(ir, {
|
|
3215
3254
|
workbook: t,
|
|
3216
3255
|
setWorkbook: o,
|
|
3217
3256
|
workbookTitle: r,
|
|
3218
3257
|
isDirty: l,
|
|
3219
3258
|
refSave: d,
|
|
3220
|
-
|
|
3259
|
+
fullscreenTarget: c,
|
|
3260
|
+
children: At(sr, { renderWorkbook: s })
|
|
3221
3261
|
})
|
|
3222
3262
|
});
|
|
3223
3263
|
});
|
|
3224
|
-
|
|
3225
|
-
var
|
|
3226
|
-
sort:
|
|
3227
|
-
hyperlink:
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
},
|
|
3238
|
-
const { children: t } = e, o = Po(), n = o ? o.enqueueSnackbar : () => {}, r = o ? o.closeSnackbar : () => {}, a = dt(/* @__PURE__ */ new Set()), l = dt(null), i = dt(null), [s, d] = ct({
|
|
3264
|
+
dr.displayName = "CommandsWrapper";
|
|
3265
|
+
var cr = {
|
|
3266
|
+
sort: ko("studio:sortDialog", () => import("./JUUre9pYia7feetw.mjs"), { tier: "common" }).load,
|
|
3267
|
+
hyperlink: ko("studio:hyperlinkDialog", () => import("./qu70N1tsIwi7LmT6.mjs"), { tier: "common" }).load,
|
|
3268
|
+
find: ko("studio:findReplaceWindow", () => import("./CE6ZU2MVb3_-FzIk.mjs"), { tier: "common" }).load,
|
|
3269
|
+
tableNew: ko("studio:tableNewDialog", () => import("./Dc4t_AYLdTAnPOIT.mjs"), { tier: "common" }).load,
|
|
3270
|
+
namedDetails: ko("studio:namedReferenceDialog", () => import("./CKOhL08sVy1N_Uza.mjs")).load,
|
|
3271
|
+
insertFunction: ko("studio:insertFunctionDialog", () => import("./DDVJs9oOFXR3RfSi.mjs"), { tier: "common" }).load,
|
|
3272
|
+
resizeHeader: ko("studio:resizeHeaderDialog", () => import("./ObY_iULY2ezBYD3q.mjs")).load,
|
|
3273
|
+
fillSeries: ko("studio:fillSeriesDialog", () => import("./K6LEXUZkuqoEn5yJ.mjs")).load,
|
|
3274
|
+
workbookStatistics: ko("studio:workbookStatisticsDialog", () => import("./CtoRlEz1GwA88zTu.mjs")).load,
|
|
3275
|
+
password: ko("studio:passwordDialog", () => import("./index.mjs").then((e) => e.o)).load
|
|
3276
|
+
}, pr = ["find"], ur = lt((e) => {
|
|
3277
|
+
const { children: t } = e, o = Oo(), n = o ? o.enqueueSnackbar : () => {}, r = o ? o.closeSnackbar : () => {}, a = pt(/* @__PURE__ */ new Set()), l = pt(null), i = pt(null), [s, d] = ut({
|
|
3239
3278
|
label: null,
|
|
3240
3279
|
progress: null
|
|
3241
|
-
}), c =
|
|
3242
|
-
|
|
3280
|
+
}), c = tt(), p = yo.EmptyObject, u = It(p), m = Ot(p), g = Nt(p), h = pt(!1);
|
|
3281
|
+
dt(() => {
|
|
3243
3282
|
if (h.current) return;
|
|
3244
3283
|
h.current = !0;
|
|
3245
3284
|
const e = window, t = e.requestIdleCallback ?? ((e) => setTimeout(e, 500)), o = e.cancelIdleCallback ?? clearTimeout, n = t(() => {
|
|
3246
|
-
for (const e of
|
|
3285
|
+
for (const e of pr) u(e, cr[e], { prewarm: !0 }).catch(() => {});
|
|
3247
3286
|
});
|
|
3248
3287
|
return () => o(n);
|
|
3249
3288
|
}, []);
|
|
3250
|
-
const y =
|
|
3251
|
-
return
|
|
3252
|
-
notifier:
|
|
3289
|
+
const y = pt(/* @__PURE__ */ new Set());
|
|
3290
|
+
return Wt(je, {
|
|
3291
|
+
notifier: ct(() => {
|
|
3253
3292
|
const e = (e, t) => {
|
|
3254
3293
|
if (t?.onceKey) {
|
|
3255
3294
|
if (y.current.has(t.onceKey)) return;
|
|
@@ -3257,16 +3296,16 @@ var lr = {
|
|
|
3257
3296
|
e.add(t.onceKey), y.current = e;
|
|
3258
3297
|
}
|
|
3259
3298
|
const o = {
|
|
3260
|
-
variant: t?.type ??
|
|
3299
|
+
variant: t?.type ?? Ve.Info,
|
|
3261
3300
|
anchorOrigin: {
|
|
3262
3301
|
vertical: "top",
|
|
3263
3302
|
horizontal: "center"
|
|
3264
3303
|
},
|
|
3265
3304
|
preventDuplicate: t?.preventDuplicate,
|
|
3266
|
-
persist: t?.persist ?? t?.type ===
|
|
3267
|
-
action: (e) =>
|
|
3305
|
+
persist: t?.persist ?? t?.type === Ve.Error,
|
|
3306
|
+
action: (e) => At(Yt, {
|
|
3268
3307
|
onClick: () => r(e),
|
|
3269
|
-
children:
|
|
3308
|
+
children: At(Be, { iconKey: "Cancel" })
|
|
3270
3309
|
})
|
|
3271
3310
|
};
|
|
3272
3311
|
t?.enqueueProps && Object.assign(o, t.enqueueProps), e || console.log("message is 'null'", t), n(e ?? "Alert", o);
|
|
@@ -3278,8 +3317,8 @@ var lr = {
|
|
|
3278
3317
|
...t,
|
|
3279
3318
|
label: e
|
|
3280
3319
|
});
|
|
3281
|
-
const n =
|
|
3282
|
-
a.current.delete(o) && (a.current.size > 0 || (
|
|
3320
|
+
const n = _e(() => {
|
|
3321
|
+
a.current.delete(o) && (a.current.size > 0 || (Tt(l.current), i.current = null, d((e) => null === e.label && null === e.progress ? e : {
|
|
3283
3322
|
label: null,
|
|
3284
3323
|
progress: null
|
|
3285
3324
|
})));
|
|
@@ -3290,11 +3329,11 @@ var lr = {
|
|
|
3290
3329
|
progress: o
|
|
3291
3330
|
});
|
|
3292
3331
|
}, (e) => {
|
|
3293
|
-
i.current = e, "string" == typeof e ?
|
|
3332
|
+
i.current = e, "string" == typeof e ? Dt(l.current, e) : d((t) => ({
|
|
3294
3333
|
...t,
|
|
3295
3334
|
label: e
|
|
3296
3335
|
}));
|
|
3297
|
-
}), r =
|
|
3336
|
+
}), r = Dt(l.current, "string" == typeof e ? e : void 0);
|
|
3298
3337
|
return r ? r.then(() => n) : n;
|
|
3299
3338
|
},
|
|
3300
3339
|
showWindow: (e, t) => {
|
|
@@ -3304,24 +3343,24 @@ var lr = {
|
|
|
3304
3343
|
onKeyDown: (e) => {
|
|
3305
3344
|
e.isDefaultPrevented() || e.isPropagationStopped() || o?.onKeyDown?.(e);
|
|
3306
3345
|
}
|
|
3307
|
-
}, u(e,
|
|
3346
|
+
}, u(e, cr[e], t);
|
|
3308
3347
|
},
|
|
3309
3348
|
showOptions: m,
|
|
3310
3349
|
showInput: g,
|
|
3311
3350
|
showError: (t) => {
|
|
3312
|
-
let o, n =
|
|
3313
|
-
"string" == typeof t ? r = t : t instanceof Error && (o = t, t.message && (r = c(t.message))), t instanceof
|
|
3351
|
+
let o, n = Ve.Error, r = c("error.unknown");
|
|
3352
|
+
"string" == typeof t ? r = t : t instanceof Error && (o = t, t.message && (r = c(t.message))), t instanceof Co && (n = Ve.Info), e(r, {
|
|
3314
3353
|
type: n,
|
|
3315
3354
|
enqueueProps: { error: o }
|
|
3316
3355
|
});
|
|
3317
3356
|
}
|
|
3318
|
-
}, o = new
|
|
3357
|
+
}, o = new Ee();
|
|
3319
3358
|
return o.setOverrides(t), o;
|
|
3320
3359
|
}, [c]),
|
|
3321
|
-
children: [
|
|
3360
|
+
children: [ct(() => At(mt, {
|
|
3322
3361
|
ref: l,
|
|
3323
3362
|
autoStart: !1,
|
|
3324
|
-
icon:
|
|
3363
|
+
icon: At(gt, { sx: {
|
|
3325
3364
|
transform: "scale(0.7)",
|
|
3326
3365
|
marginLeft: "-6px"
|
|
3327
3366
|
} }),
|
|
@@ -3340,14 +3379,14 @@ var lr = {
|
|
|
3340
3379
|
}), [s.label, s.progress]), t]
|
|
3341
3380
|
});
|
|
3342
3381
|
});
|
|
3343
|
-
|
|
3344
|
-
var
|
|
3345
|
-
const { children: o, title: n, taskPanes: r, onSelect: a, selected: l, registry: i =
|
|
3382
|
+
ur.displayName = "StudioNotifierProvider";
|
|
3383
|
+
var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2)))", gr = lt(rt((e, t) => {
|
|
3384
|
+
const { children: o, title: n, taskPanes: r, onSelect: a, selected: l, registry: i = ee, style: s, iconsOnly: d, side: c = "right", className: p, ...u } = e, m = "right" !== c, g = ct(() => r.map((t) => {
|
|
3346
3385
|
const o = i.getRegisteredTaskPane(t);
|
|
3347
3386
|
if (!o) return null;
|
|
3348
3387
|
let n = o.getIcon?.();
|
|
3349
|
-
"string" == typeof n && (n =
|
|
3350
|
-
const r = t === l, a = n ?
|
|
3388
|
+
"string" == typeof n && (n = At(Be, { iconKey: n }));
|
|
3389
|
+
const r = t === l, a = n ? At(Lt, {
|
|
3351
3390
|
sx: {
|
|
3352
3391
|
display: "inline-block",
|
|
3353
3392
|
transform: m ? "rotate(-90deg)" : "rotate(90deg)",
|
|
@@ -3355,20 +3394,20 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3355
3394
|
color: (e) => e.palette.text.secondary
|
|
3356
3395
|
},
|
|
3357
3396
|
children: n
|
|
3358
|
-
}) : null, s = !n || !d && r, c =
|
|
3397
|
+
}) : null, s = !n || !d && r, c = At(Lt, {
|
|
3359
3398
|
sx: {
|
|
3360
3399
|
display: "grid",
|
|
3361
3400
|
gridTemplateColumns: s ? "1fr" : "0fr",
|
|
3362
3401
|
opacity: s ? 1 : 0,
|
|
3363
3402
|
transition: (e) => e.transitions.create(["grid-template-columns", "opacity"], { duration: e.transitions.duration.short })
|
|
3364
3403
|
},
|
|
3365
|
-
children:
|
|
3404
|
+
children: At(Lt, {
|
|
3366
3405
|
sx: {
|
|
3367
3406
|
overflow: "hidden",
|
|
3368
3407
|
minWidth: 0,
|
|
3369
3408
|
minHeight: 0
|
|
3370
3409
|
},
|
|
3371
|
-
children:
|
|
3410
|
+
children: At(uo, {
|
|
3372
3411
|
component: "div",
|
|
3373
3412
|
sx: {
|
|
3374
3413
|
textTransform: "none",
|
|
@@ -3381,13 +3420,13 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3381
3420
|
})
|
|
3382
3421
|
})
|
|
3383
3422
|
});
|
|
3384
|
-
return
|
|
3423
|
+
return At(ao, {
|
|
3385
3424
|
value: t,
|
|
3386
|
-
label:
|
|
3425
|
+
label: At(Ct, {
|
|
3387
3426
|
disableInteractive: !0,
|
|
3388
3427
|
title: o.getTitle() ?? "",
|
|
3389
3428
|
placement: "left-start",
|
|
3390
|
-
children:
|
|
3429
|
+
children: Wt(Lt, {
|
|
3391
3430
|
sx: {
|
|
3392
3431
|
padding: "0px 0px",
|
|
3393
3432
|
writingMode: m ? "vertical-lr" : "vertical-rl",
|
|
@@ -3407,7 +3446,7 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3407
3446
|
minHeight: "0px",
|
|
3408
3447
|
borderRadius: "4px"
|
|
3409
3448
|
},
|
|
3410
|
-
className:
|
|
3449
|
+
className: Fo("taskpane-strip-item", { "Mui-selected": r }),
|
|
3411
3450
|
onClick: () => e.onSelect(t)
|
|
3412
3451
|
}, t);
|
|
3413
3452
|
}), [
|
|
@@ -3417,11 +3456,11 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3417
3456
|
i,
|
|
3418
3457
|
m,
|
|
3419
3458
|
d,
|
|
3420
|
-
|
|
3459
|
+
Ye()
|
|
3421
3460
|
]);
|
|
3422
|
-
return
|
|
3423
|
-
ref:
|
|
3424
|
-
className:
|
|
3461
|
+
return At(Lt, {
|
|
3462
|
+
ref: Qe(t, () => ({ isTaskPaneStrip: () => !0 }), []),
|
|
3463
|
+
className: ct(() => Fo("taskpane-strip", p), [p]),
|
|
3425
3464
|
sx: {
|
|
3426
3465
|
paddingLeft: m ? void 0 : "2px",
|
|
3427
3466
|
paddingRight: m ? "2px" : void 0,
|
|
@@ -3429,7 +3468,7 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3429
3468
|
...s
|
|
3430
3469
|
},
|
|
3431
3470
|
...u,
|
|
3432
|
-
children:
|
|
3471
|
+
children: At(lo, {
|
|
3433
3472
|
orientation: "vertical",
|
|
3434
3473
|
variant: "scrollable",
|
|
3435
3474
|
value: l,
|
|
@@ -3447,10 +3486,10 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3447
3486
|
children: g
|
|
3448
3487
|
})
|
|
3449
3488
|
});
|
|
3450
|
-
})),
|
|
3451
|
-
const { title: t, icon: o, onClose: n, readOnly: r, focused: a, ...l } = e, i =
|
|
3452
|
-
return
|
|
3453
|
-
className:
|
|
3489
|
+
})), hr = (e) => {
|
|
3490
|
+
const { title: t, icon: o, onClose: n, readOnly: r, focused: a, ...l } = e, i = pt(null), s = tt();
|
|
3491
|
+
return At(Ht, {
|
|
3492
|
+
className: Fo({ "Mui-selected": a }),
|
|
3454
3493
|
sx: {
|
|
3455
3494
|
display: "flex",
|
|
3456
3495
|
flex: "1 1 %0",
|
|
@@ -3464,11 +3503,11 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3464
3503
|
opacity: 1,
|
|
3465
3504
|
transitionDuration: (e) => e.transitions.duration.shortest / 2 + "ms"
|
|
3466
3505
|
},
|
|
3467
|
-
backgroundColor: (e) =>
|
|
3468
|
-
borderBottom: `solid ${
|
|
3506
|
+
backgroundColor: (e) => mo(e.palette.action.hover, .03),
|
|
3507
|
+
borderBottom: `solid ${mr} 1px`
|
|
3469
3508
|
},
|
|
3470
3509
|
...l,
|
|
3471
|
-
children:
|
|
3510
|
+
children: Wt(Lt, {
|
|
3472
3511
|
sx: {
|
|
3473
3512
|
display: "flex",
|
|
3474
3513
|
flex: "1 1 10%",
|
|
@@ -3479,15 +3518,15 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3479
3518
|
marginLeft: (e) => e.spacing(1),
|
|
3480
3519
|
marginRight: (e) => e.spacing(1)
|
|
3481
3520
|
},
|
|
3482
|
-
children: [
|
|
3521
|
+
children: [At(Lt, {
|
|
3483
3522
|
sx: {
|
|
3484
3523
|
flex: "1 1 100%",
|
|
3485
3524
|
paddingLeft: (e) => e.spacing(1)
|
|
3486
3525
|
},
|
|
3487
3526
|
children: t
|
|
3488
|
-
}),
|
|
3527
|
+
}), At(xt, {
|
|
3489
3528
|
label: s("taskPane.close"),
|
|
3490
|
-
children:
|
|
3529
|
+
children: At(Yt, {
|
|
3491
3530
|
"aria-label": "close",
|
|
3492
3531
|
sx: { color: (e) => e.palette.text.icon ?? e.palette.action.active },
|
|
3493
3532
|
touchRippleRef: i,
|
|
@@ -3497,24 +3536,24 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3497
3536
|
onPointerUp: () => {
|
|
3498
3537
|
n();
|
|
3499
3538
|
},
|
|
3500
|
-
children:
|
|
3539
|
+
children: At(Be, { iconKey: "Close" })
|
|
3501
3540
|
})
|
|
3502
3541
|
})]
|
|
3503
3542
|
})
|
|
3504
3543
|
});
|
|
3505
|
-
},
|
|
3506
|
-
const { model: o, side: n, ...r } = e, a =
|
|
3507
|
-
return
|
|
3544
|
+
}, yr = rt((e, t) => {
|
|
3545
|
+
const { model: o, side: n, ...r } = e, a = ho();
|
|
3546
|
+
return At(ie, {
|
|
3508
3547
|
model: o,
|
|
3509
3548
|
ref: t,
|
|
3510
3549
|
propsFrame: { style: {
|
|
3511
|
-
border: `solid ${
|
|
3550
|
+
border: `solid ${mr} 1px`,
|
|
3512
3551
|
borderRadius: `${a.shape.borderRadius ?? 4}px`,
|
|
3513
3552
|
marginBottom: `${a.spacing?.(.5) ?? 4}px`
|
|
3514
3553
|
} },
|
|
3515
3554
|
alwaysShowStrip: !0,
|
|
3516
|
-
componentTitle:
|
|
3517
|
-
componentStrip:
|
|
3555
|
+
componentTitle: hr,
|
|
3556
|
+
componentStrip: gr,
|
|
3518
3557
|
side: n,
|
|
3519
3558
|
...e,
|
|
3520
3559
|
onOpen: () => {
|
|
@@ -3525,28 +3564,28 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3525
3564
|
},
|
|
3526
3565
|
...r
|
|
3527
3566
|
});
|
|
3528
|
-
}),
|
|
3567
|
+
}), fr = "_styled-resizer_fdl5y_3", br = {}, xr = {
|
|
3529
3568
|
flex: "1 1 100%",
|
|
3530
3569
|
display: "flex",
|
|
3531
3570
|
boxSizing: "border-box"
|
|
3532
|
-
},
|
|
3533
|
-
const { mainElement: o, sidebarElement: n, position: r, persistKey: a, onPositionChange: l, className: i, style: s, taskSide: d = "right", ...c } = e, [p, u] =
|
|
3571
|
+
}, vr = lt(rt((e, t) => {
|
|
3572
|
+
const { mainElement: o, sidebarElement: n, position: r, persistKey: a, onPositionChange: l, className: i, style: s, taskSide: d = "right", ...c } = e, [p, u] = Xe(a ?? null, br), m = ho(), [g, { width: h }] = No(), y = h > 530 || 0 === h, f = pt(null);
|
|
3534
3573
|
let b, x, v = null, C = 4, k = 13;
|
|
3535
3574
|
y ? v = "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" : (v = "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", C = 13, k = 4);
|
|
3536
3575
|
let w, S = o, T = n;
|
|
3537
|
-
const F = "right" !== d, D = y ? "row" : "column", N = F && T ? "before" : "after",
|
|
3576
|
+
const F = "right" !== d, D = y ? "row" : "column", N = F && T ? "before" : "after", I = `${D}:${N}`, P = a ? p[I] : void 0, O = null != P ? `${P}%` : ((e, t) => {
|
|
3538
3577
|
if (null == e) return "40%";
|
|
3539
3578
|
if ("number" == typeof e || "string" == typeof e) return e;
|
|
3540
3579
|
const o = e[t];
|
|
3541
3580
|
return null != o ? `${o}%` : "40%";
|
|
3542
|
-
})(r,
|
|
3581
|
+
})(r, I), M = a || l ? (e) => {
|
|
3543
3582
|
a && u((t) => ({
|
|
3544
3583
|
...t,
|
|
3545
|
-
[
|
|
3584
|
+
[I]: e.percent
|
|
3546
3585
|
})), l?.(e, {
|
|
3547
3586
|
orientation: D,
|
|
3548
3587
|
side: N,
|
|
3549
|
-
key:
|
|
3588
|
+
key: I
|
|
3550
3589
|
});
|
|
3551
3590
|
} : void 0;
|
|
3552
3591
|
return F && T ? (S = n, T = o, x = { style: {
|
|
@@ -3569,22 +3608,22 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3569
3608
|
position: O,
|
|
3570
3609
|
minAfter: y ? "280px" : "120px",
|
|
3571
3610
|
splitDirection: y ? "row" : "column"
|
|
3572
|
-
}),
|
|
3573
|
-
ref:
|
|
3611
|
+
}), At($e, {
|
|
3612
|
+
ref: Do([
|
|
3574
3613
|
f,
|
|
3575
3614
|
g,
|
|
3576
3615
|
t
|
|
3577
3616
|
]),
|
|
3578
3617
|
className: i,
|
|
3579
3618
|
style: s ? {
|
|
3580
|
-
...
|
|
3619
|
+
...xr,
|
|
3581
3620
|
...s
|
|
3582
|
-
} :
|
|
3621
|
+
} : xr,
|
|
3583
3622
|
...c,
|
|
3584
3623
|
...w,
|
|
3585
3624
|
onPositionChange: M,
|
|
3586
3625
|
propsResizer: {
|
|
3587
|
-
className:
|
|
3626
|
+
className: Fo("styled-resizer", fr),
|
|
3588
3627
|
style: {
|
|
3589
3628
|
minWidth: y ? "7px" : void 0,
|
|
3590
3629
|
minHeight: y ? void 0 : "6px",
|
|
@@ -3599,40 +3638,40 @@ var dr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3599
3638
|
propsPaneAfter: x
|
|
3600
3639
|
});
|
|
3601
3640
|
}));
|
|
3602
|
-
|
|
3603
|
-
var
|
|
3604
|
-
[
|
|
3605
|
-
[
|
|
3606
|
-
[
|
|
3607
|
-
[
|
|
3608
|
-
[
|
|
3609
|
-
[
|
|
3610
|
-
[
|
|
3611
|
-
},
|
|
3641
|
+
vr.displayName = "StudioSplitPane";
|
|
3642
|
+
var Cr = K.BuiltInSelectorNames, kr = {
|
|
3643
|
+
[Cr.Whole]: "FormulaMathTrig",
|
|
3644
|
+
[Cr.Number]: "IncreaseDecimal",
|
|
3645
|
+
[Cr.List]: "Menu",
|
|
3646
|
+
[Cr.Date]: "FormulaDateTime",
|
|
3647
|
+
[Cr.DateTime]: "FormulaDateTime",
|
|
3648
|
+
[Cr.Time]: "FormulaDateTime",
|
|
3649
|
+
[Cr.TextLength]: "FormulaText"
|
|
3650
|
+
}, wr = (e) => {
|
|
3612
3651
|
const t = e.getCondition();
|
|
3613
3652
|
if (!t) return "DataValidation";
|
|
3614
3653
|
const o = t.toJSON();
|
|
3615
|
-
return o.operator ===
|
|
3616
|
-
},
|
|
3654
|
+
return o.operator === K.BuiltInOperatorNames.Expression ? "FormulaCustom" : "string" == typeof o.selector && kr[o.selector] || "DataValidation";
|
|
3655
|
+
}, Sr = lt(({ dataValidation: e, size: t = 28 }) => (Se(e, "onAnyChange"), At(W, {
|
|
3617
3656
|
className: "sxl-dv-icon",
|
|
3618
3657
|
sx: {
|
|
3619
3658
|
width: "auto",
|
|
3620
3659
|
minWidth: 1.7 * t + "px",
|
|
3621
3660
|
height: `${t}px`
|
|
3622
3661
|
},
|
|
3623
|
-
children:
|
|
3624
|
-
iconKey:
|
|
3662
|
+
children: At(Be, {
|
|
3663
|
+
iconKey: wr(e),
|
|
3625
3664
|
size: Math.round(.6 * t),
|
|
3626
3665
|
ariaHidden: !0
|
|
3627
3666
|
})
|
|
3628
3667
|
})));
|
|
3629
|
-
|
|
3630
|
-
var
|
|
3668
|
+
Sr.displayName = "DataValidationIcon";
|
|
3669
|
+
var Tr = (e, t) => {
|
|
3631
3670
|
const o = e.getCondition();
|
|
3632
3671
|
if (!o) return t("dataValidation.anyValue");
|
|
3633
3672
|
const n = o.toJSON();
|
|
3634
|
-
if (n.operator ===
|
|
3635
|
-
if (n.selector ===
|
|
3673
|
+
if (n.operator === K.BuiltInOperatorNames.Expression && "string" == typeof n.param) return t("dataValidation.titleCustom", { formula: n.param });
|
|
3674
|
+
if (n.selector === K.BuiltInSelectorNames.List && n.operator === K.BuiltInOperatorNames.InSet) {
|
|
3636
3675
|
const e = n.param?.items, o = Array.isArray(e) ? e.map((e) => String(e ?? "")) : "string" == typeof e ? ((e) => e.length < 2 || !e.startsWith("\"") || !e.endsWith("\"") ? null : e.slice(1, -1).replace(/""/g, "\"").split(",").map((e) => e.trimStart()))(e) : null;
|
|
3637
3676
|
if (o) return t("dataValidation.titleList", {
|
|
3638
3677
|
items: o.slice(0, 3).join(", "),
|
|
@@ -3641,15 +3680,15 @@ var Cr = (e, t) => {
|
|
|
3641
3680
|
if ("string" == typeof e) return t("dataValidation.titleListFrom", { source: e });
|
|
3642
3681
|
}
|
|
3643
3682
|
return o.toString();
|
|
3644
|
-
},
|
|
3645
|
-
[
|
|
3646
|
-
[
|
|
3647
|
-
[
|
|
3648
|
-
},
|
|
3649
|
-
[
|
|
3650
|
-
[
|
|
3651
|
-
[
|
|
3652
|
-
},
|
|
3683
|
+
}, Fr = {
|
|
3684
|
+
[H.AlertStyle.Stop]: "ValidationStop",
|
|
3685
|
+
[H.AlertStyle.Warning]: "ValidationWarning",
|
|
3686
|
+
[H.AlertStyle.Information]: "ValidationInformation"
|
|
3687
|
+
}, Dr = {
|
|
3688
|
+
[H.AlertStyle.Stop]: So("dataValidation.alertStop"),
|
|
3689
|
+
[H.AlertStyle.Warning]: So("dataValidation.alertWarning"),
|
|
3690
|
+
[H.AlertStyle.Information]: So("dataValidation.alertInformation")
|
|
3691
|
+
}, Nr = ({ checked: e, onCheckedChange: t, label: o, readOnly: n, children: r }) => Wt(Et, {
|
|
3653
3692
|
expanded: e,
|
|
3654
3693
|
onChange: (e, o) => {
|
|
3655
3694
|
n || t(o);
|
|
@@ -3668,15 +3707,15 @@ var Cr = (e, t) => {
|
|
|
3668
3707
|
mb: 1
|
|
3669
3708
|
}
|
|
3670
3709
|
},
|
|
3671
|
-
children: [
|
|
3672
|
-
expandIcon:
|
|
3710
|
+
children: [At(Rt, {
|
|
3711
|
+
expandIcon: At(Be, { iconKey: "ExpandMore" }),
|
|
3673
3712
|
sx: {
|
|
3674
3713
|
px: 2,
|
|
3675
3714
|
"& .MuiAccordionSummary-content": { my: 0 },
|
|
3676
3715
|
"&.Mui-expanded .MuiAccordionSummary-content": { my: 0 }
|
|
3677
3716
|
},
|
|
3678
|
-
children:
|
|
3679
|
-
control:
|
|
3717
|
+
children: At(Gt, {
|
|
3718
|
+
control: At($t, {
|
|
3680
3719
|
checked: e,
|
|
3681
3720
|
disabled: n,
|
|
3682
3721
|
onChange: (e) => {
|
|
@@ -3687,7 +3726,7 @@ var Cr = (e, t) => {
|
|
|
3687
3726
|
label: o,
|
|
3688
3727
|
onClick: (e) => e.stopPropagation()
|
|
3689
3728
|
})
|
|
3690
|
-
}),
|
|
3729
|
+
}), At(Bt, {
|
|
3691
3730
|
sx: {
|
|
3692
3731
|
pl: 2,
|
|
3693
3732
|
pr: 2,
|
|
@@ -3699,12 +3738,12 @@ var Cr = (e, t) => {
|
|
|
3699
3738
|
},
|
|
3700
3739
|
children: r
|
|
3701
3740
|
})]
|
|
3702
|
-
}),
|
|
3703
|
-
const { dataValidation: t } = e, o =
|
|
3704
|
-
|
|
3705
|
-
const n = t.isProtected(),
|
|
3741
|
+
}), Ir = lt((e) => {
|
|
3742
|
+
const { dataValidation: t } = e, o = tt();
|
|
3743
|
+
Se(t, "onAnyChange");
|
|
3744
|
+
const n = t.isProtected(), a = t.getRenderHints().includes("list"), l = Wt(to, {
|
|
3706
3745
|
tabIndex: 0,
|
|
3707
|
-
className:
|
|
3746
|
+
className: r["editor-panel"],
|
|
3708
3747
|
sx: {
|
|
3709
3748
|
gap: (e) => e.spacing(1),
|
|
3710
3749
|
paddingTop: (e) => e.spacing(1.25),
|
|
@@ -3716,7 +3755,7 @@ var Cr = (e, t) => {
|
|
|
3716
3755
|
overflow: "auto"
|
|
3717
3756
|
},
|
|
3718
3757
|
children: [
|
|
3719
|
-
|
|
3758
|
+
Wt(Lt, {
|
|
3720
3759
|
sx: {
|
|
3721
3760
|
display: "flex",
|
|
3722
3761
|
flexDirection: "column",
|
|
@@ -3724,29 +3763,29 @@ var Cr = (e, t) => {
|
|
|
3724
3763
|
margin: (e) => e.spacing(1.25),
|
|
3725
3764
|
marginBottom: 0
|
|
3726
3765
|
},
|
|
3727
|
-
children: [
|
|
3766
|
+
children: [Wt(Lt, {
|
|
3728
3767
|
sx: {
|
|
3729
3768
|
display: "flex",
|
|
3730
3769
|
alignItems: "center",
|
|
3731
3770
|
gap: (e) => e.spacing(1.5)
|
|
3732
3771
|
},
|
|
3733
|
-
children: [
|
|
3772
|
+
children: [At(Sr, {
|
|
3734
3773
|
dataValidation: t,
|
|
3735
3774
|
size: 48
|
|
3736
|
-
}),
|
|
3775
|
+
}), At(uo, {
|
|
3737
3776
|
variant: "body2",
|
|
3738
3777
|
sx: {
|
|
3739
3778
|
minWidth: 0,
|
|
3740
3779
|
wordBreak: "break-word"
|
|
3741
3780
|
},
|
|
3742
|
-
children:
|
|
3781
|
+
children: Tr(t, o)
|
|
3743
3782
|
})]
|
|
3744
|
-
}),
|
|
3783
|
+
}), At(h, {
|
|
3745
3784
|
item: t,
|
|
3746
3785
|
label: o("dataValidation.applyTo")
|
|
3747
3786
|
})]
|
|
3748
3787
|
}),
|
|
3749
|
-
|
|
3788
|
+
At(fn, {
|
|
3750
3789
|
selectorTitle: o("dataValidation.allow"),
|
|
3751
3790
|
showIncludeBlanks: !0,
|
|
3752
3791
|
condition: t.getCondition(),
|
|
@@ -3760,7 +3799,7 @@ var Cr = (e, t) => {
|
|
|
3760
3799
|
t.setCondition(o);
|
|
3761
3800
|
}
|
|
3762
3801
|
}),
|
|
3763
|
-
|
|
3802
|
+
a && At(Lt, {
|
|
3764
3803
|
sx: {
|
|
3765
3804
|
pl: 2,
|
|
3766
3805
|
pr: 2,
|
|
@@ -3768,8 +3807,8 @@ var Cr = (e, t) => {
|
|
|
3768
3807
|
borderColor: "divider",
|
|
3769
3808
|
borderRadius: 1
|
|
3770
3809
|
},
|
|
3771
|
-
children:
|
|
3772
|
-
control:
|
|
3810
|
+
children: At(Gt, {
|
|
3811
|
+
control: At($t, {
|
|
3773
3812
|
checked: !t.isHideDropdown(),
|
|
3774
3813
|
disabled: n,
|
|
3775
3814
|
onChange: (e) => t.setHideDropdown(!e.target.checked)
|
|
@@ -3777,12 +3816,12 @@ var Cr = (e, t) => {
|
|
|
3777
3816
|
label: o("dataValidation.inCellDropdown")
|
|
3778
3817
|
})
|
|
3779
3818
|
}),
|
|
3780
|
-
|
|
3819
|
+
Wt(Nr, {
|
|
3781
3820
|
checked: t.isShowPromptMessage(),
|
|
3782
3821
|
onCheckedChange: (e) => t.setShowPromptMessage(e),
|
|
3783
3822
|
label: o("dataValidation.prompt"),
|
|
3784
3823
|
readOnly: n,
|
|
3785
|
-
children: [
|
|
3824
|
+
children: [At(io, {
|
|
3786
3825
|
size: "small",
|
|
3787
3826
|
label: o("dataValidation.title"),
|
|
3788
3827
|
value: t.getPromptTitle(),
|
|
@@ -3791,7 +3830,7 @@ var Cr = (e, t) => {
|
|
|
3791
3830
|
fullWidth: !0,
|
|
3792
3831
|
slotProps: { htmlInput: { maxLength: 32 } },
|
|
3793
3832
|
sx: { backgroundColor: "background.paper" }
|
|
3794
|
-
}),
|
|
3833
|
+
}), At(io, {
|
|
3795
3834
|
size: "small",
|
|
3796
3835
|
label: o("dataValidation.message"),
|
|
3797
3836
|
value: t.getPromptMessage(),
|
|
@@ -3804,45 +3843,45 @@ var Cr = (e, t) => {
|
|
|
3804
3843
|
sx: { backgroundColor: "background.paper" }
|
|
3805
3844
|
})]
|
|
3806
3845
|
}),
|
|
3807
|
-
|
|
3846
|
+
Wt(Nr, {
|
|
3808
3847
|
checked: t.isShowAlertMessage(),
|
|
3809
3848
|
onCheckedChange: (e) => t.setShowAlertMessage(e),
|
|
3810
3849
|
label: o("dataValidation.alert"),
|
|
3811
3850
|
readOnly: n,
|
|
3812
3851
|
children: [
|
|
3813
|
-
|
|
3852
|
+
Wt(qt, {
|
|
3814
3853
|
fullWidth: !0,
|
|
3815
3854
|
size: "small",
|
|
3816
3855
|
disabled: n,
|
|
3817
3856
|
sx: { backgroundColor: "background.paper" },
|
|
3818
|
-
children: [
|
|
3857
|
+
children: [At(Jt, { children: o("dataValidation.alertStyle") }), At(no, {
|
|
3819
3858
|
value: t.getAlertStyle(),
|
|
3820
3859
|
label: o("dataValidation.alertStyle"),
|
|
3821
3860
|
onChange: (e) => t.setAlertStyle(e.target.value),
|
|
3822
|
-
renderValue: (e) =>
|
|
3861
|
+
renderValue: (e) => Wt(Lt, {
|
|
3823
3862
|
sx: {
|
|
3824
3863
|
display: "flex",
|
|
3825
3864
|
alignItems: "center",
|
|
3826
3865
|
gap: 1
|
|
3827
3866
|
},
|
|
3828
|
-
children: [
|
|
3829
|
-
iconKey:
|
|
3867
|
+
children: [At(Be, {
|
|
3868
|
+
iconKey: Fr[e],
|
|
3830
3869
|
size: 18,
|
|
3831
3870
|
ariaHidden: !0
|
|
3832
|
-
}), o(
|
|
3871
|
+
}), o(Dr[e])]
|
|
3833
3872
|
}),
|
|
3834
|
-
children: Object.keys(
|
|
3873
|
+
children: Object.keys(Fr).map((e) => Wt(Zt, {
|
|
3835
3874
|
value: e,
|
|
3836
3875
|
sx: { gap: 1 },
|
|
3837
|
-
children: [
|
|
3838
|
-
iconKey:
|
|
3876
|
+
children: [At(Be, {
|
|
3877
|
+
iconKey: Fr[e],
|
|
3839
3878
|
size: 18,
|
|
3840
3879
|
ariaHidden: !0
|
|
3841
|
-
}), o(
|
|
3880
|
+
}), o(Dr[e])]
|
|
3842
3881
|
}, e))
|
|
3843
3882
|
})]
|
|
3844
3883
|
}),
|
|
3845
|
-
|
|
3884
|
+
At(io, {
|
|
3846
3885
|
size: "small",
|
|
3847
3886
|
label: o("dataValidation.title"),
|
|
3848
3887
|
value: t.getAlertTitle(),
|
|
@@ -3852,7 +3891,7 @@ var Cr = (e, t) => {
|
|
|
3852
3891
|
slotProps: { htmlInput: { maxLength: 32 } },
|
|
3853
3892
|
sx: { backgroundColor: "background.paper" }
|
|
3854
3893
|
}),
|
|
3855
|
-
|
|
3894
|
+
At(io, {
|
|
3856
3895
|
size: "small",
|
|
3857
3896
|
label: o("dataValidation.message"),
|
|
3858
3897
|
value: t.getAlertMessage(),
|
|
@@ -3868,13 +3907,13 @@ var Cr = (e, t) => {
|
|
|
3868
3907
|
})
|
|
3869
3908
|
]
|
|
3870
3909
|
});
|
|
3871
|
-
return
|
|
3910
|
+
return At(Wo.Provider, {
|
|
3872
3911
|
value: t,
|
|
3873
|
-
children:
|
|
3912
|
+
children: l
|
|
3874
3913
|
});
|
|
3875
3914
|
});
|
|
3876
|
-
|
|
3877
|
-
var
|
|
3915
|
+
Ir.displayName = "DataValidationEditorPanel";
|
|
3916
|
+
var Pr = ({ children: e }) => At(Lt, {
|
|
3878
3917
|
sx: {
|
|
3879
3918
|
display: "inline-flex",
|
|
3880
3919
|
alignItems: "center",
|
|
@@ -3885,45 +3924,45 @@ var Fr = ({ children: e }) => Ot(Bt, {
|
|
|
3885
3924
|
borderRadius: 1,
|
|
3886
3925
|
color: "text.secondary"
|
|
3887
3926
|
},
|
|
3888
|
-
children:
|
|
3927
|
+
children: At(uo, {
|
|
3889
3928
|
variant: "caption",
|
|
3890
3929
|
children: e
|
|
3891
3930
|
})
|
|
3892
|
-
}),
|
|
3893
|
-
const t =
|
|
3894
|
-
|
|
3931
|
+
}), Or = lt(({ item: e }) => {
|
|
3932
|
+
const t = tt();
|
|
3933
|
+
Se(e, "onAnyChange");
|
|
3895
3934
|
const o = [];
|
|
3896
|
-
return e.isShowPromptMessage() && e.getPromptTitle() && o.push(t("dataValidation.promptPrefix", { title: e.getPromptTitle() })), e.getCondition() && (e.isShowAlertMessage() ? e.getAlertStyle() ===
|
|
3935
|
+
return e.isShowPromptMessage() && e.getPromptTitle() && o.push(t("dataValidation.promptPrefix", { title: e.getPromptTitle() })), e.getCondition() && (e.isShowAlertMessage() ? e.getAlertStyle() === H.AlertStyle.Warning ? o.push(t("dataValidation.alertWarning")) : e.getAlertStyle() === H.AlertStyle.Information && o.push(t("dataValidation.alertInformation")) : o.push(t("dataValidation.badgeNoAlert"))), e.isHideDropdown() && e.getRenderHints().includes("list") && o.push(t("dataValidation.badgeDropdownHidden")), 0 === o.length ? null : At(Lt, {
|
|
3897
3936
|
sx: {
|
|
3898
3937
|
display: "flex",
|
|
3899
3938
|
flexWrap: "wrap",
|
|
3900
3939
|
gap: .5
|
|
3901
3940
|
},
|
|
3902
|
-
children: o.map((e, t) =>
|
|
3941
|
+
children: o.map((e, t) => At(Pr, { children: e }, t))
|
|
3903
3942
|
});
|
|
3904
3943
|
});
|
|
3905
|
-
|
|
3906
|
-
var
|
|
3944
|
+
Or.displayName = "DataValidationCardBody";
|
|
3945
|
+
var Mr = lt(({ item: e }) => At(h, {
|
|
3907
3946
|
item: e,
|
|
3908
|
-
label:
|
|
3947
|
+
label: tt()("dataValidation.applyTo"),
|
|
3909
3948
|
helperText: null
|
|
3910
3949
|
}));
|
|
3911
|
-
|
|
3912
|
-
var
|
|
3950
|
+
Mr.displayName = "DataValidationCardRanges";
|
|
3951
|
+
var Ar = {
|
|
3913
3952
|
key: "data-validation",
|
|
3914
3953
|
messageKeys: {
|
|
3915
|
-
none:
|
|
3916
|
-
addPrompt:
|
|
3917
|
-
heading:
|
|
3918
|
-
insert:
|
|
3919
|
-
new:
|
|
3920
|
-
moveUp:
|
|
3921
|
-
moveDown:
|
|
3922
|
-
edit:
|
|
3923
|
-
duplicate:
|
|
3924
|
-
delete:
|
|
3925
|
-
cancel:
|
|
3926
|
-
save:
|
|
3954
|
+
none: So("dataValidation.none"),
|
|
3955
|
+
addPrompt: So("dataValidation.addPrompt"),
|
|
3956
|
+
heading: So("dataValidation.heading"),
|
|
3957
|
+
insert: So("dataValidation.insert"),
|
|
3958
|
+
new: So("dataValidation.new"),
|
|
3959
|
+
moveUp: So("dataValidation.moveUp"),
|
|
3960
|
+
moveDown: So("dataValidation.moveDown"),
|
|
3961
|
+
edit: So("dataValidation.edit"),
|
|
3962
|
+
duplicate: So("dataValidation.duplicate"),
|
|
3963
|
+
delete: So("dataValidation.delete"),
|
|
3964
|
+
cancel: So("dataValidation.cancel"),
|
|
3965
|
+
save: So("dataValidation.save")
|
|
3927
3966
|
},
|
|
3928
3967
|
getCollection: (e) => e.getDataValidations(),
|
|
3929
3968
|
changeEvents: ["onDataValidationsChange"],
|
|
@@ -3931,56 +3970,57 @@ var Pr = {
|
|
|
3931
3970
|
applyUpdate: (e, t) => {
|
|
3932
3971
|
e.update(t);
|
|
3933
3972
|
},
|
|
3973
|
+
validate: (e) => e.getCondition()?.validate() ?? null,
|
|
3934
3974
|
applyNewDefaults: (e) => {
|
|
3935
3975
|
e.update({
|
|
3936
|
-
alertStyle:
|
|
3976
|
+
alertStyle: H.AlertStyle.Stop,
|
|
3937
3977
|
showAlertMessage: !0
|
|
3938
3978
|
});
|
|
3939
3979
|
},
|
|
3940
3980
|
applySeed: (e, t) => {
|
|
3941
3981
|
e.update(t);
|
|
3942
3982
|
},
|
|
3943
|
-
getCardTitle:
|
|
3944
|
-
CardMedia: ({ item: e }) =>
|
|
3983
|
+
getCardTitle: Tr,
|
|
3984
|
+
CardMedia: ({ item: e }) => At(Sr, {
|
|
3945
3985
|
dataValidation: e,
|
|
3946
3986
|
size: 32
|
|
3947
3987
|
}),
|
|
3948
|
-
CardSubtitle:
|
|
3949
|
-
CardBody:
|
|
3950
|
-
EditorBody: ({ item: e }) =>
|
|
3951
|
-
},
|
|
3988
|
+
CardSubtitle: Mr,
|
|
3989
|
+
CardBody: Or,
|
|
3990
|
+
EditorBody: ({ item: e }) => At(Ir, { dataValidation: e })
|
|
3991
|
+
}, Wr = lt(rt((e, t) => {
|
|
3952
3992
|
const { workbook: o, args: n, ...r } = e;
|
|
3953
|
-
return
|
|
3993
|
+
return At(B, {
|
|
3954
3994
|
ref: t,
|
|
3955
3995
|
workbook: o,
|
|
3956
|
-
descriptor:
|
|
3996
|
+
descriptor: Ar,
|
|
3957
3997
|
args: n,
|
|
3958
3998
|
dragReorder: !0,
|
|
3959
3999
|
...r
|
|
3960
4000
|
});
|
|
3961
4001
|
}));
|
|
3962
|
-
|
|
3963
|
-
var
|
|
4002
|
+
Wr.displayName = "DataValidationDetailsPanel";
|
|
4003
|
+
var Er = (e) => {
|
|
3964
4004
|
const { model: t, entryKey: o, frame: n, args: r, ref: a, ...l } = e;
|
|
3965
|
-
return
|
|
4005
|
+
return At(Wr, {
|
|
3966
4006
|
ref: a,
|
|
3967
4007
|
workbook: t,
|
|
3968
4008
|
args: r,
|
|
3969
4009
|
...l
|
|
3970
4010
|
});
|
|
3971
4011
|
};
|
|
3972
|
-
|
|
4012
|
+
p(), We.register("plugin-table", { icons: {} }), ee.registerTaskPane({
|
|
3973
4013
|
key: "dataValidationDetails",
|
|
3974
4014
|
getTitle: () => "Data Validation",
|
|
3975
4015
|
getIcon: () => "DataValidation",
|
|
3976
|
-
component:
|
|
3977
|
-
}, !0),
|
|
4016
|
+
component: Er
|
|
4017
|
+
}, !0), ee.registerTaskPane({
|
|
3978
4018
|
key: "conditionalFormatDetails",
|
|
3979
4019
|
getTitle: () => "Conditional Formatting",
|
|
3980
4020
|
getIcon: () => "FormatPaint",
|
|
3981
|
-
component:
|
|
3982
|
-
}, !0),
|
|
3983
|
-
var
|
|
4021
|
+
component: Jn
|
|
4022
|
+
}, !0), d(), s(), a(), l(), I();
|
|
4023
|
+
var Br = () => {
|
|
3984
4024
|
let e, t;
|
|
3985
4025
|
const o = new Promise((o, n) => {
|
|
3986
4026
|
e = o, t = n;
|
|
@@ -3995,62 +4035,62 @@ var Mr = () => {
|
|
|
3995
4035
|
}
|
|
3996
4036
|
};
|
|
3997
4037
|
return o.catch(() => {}), n;
|
|
3998
|
-
},
|
|
4038
|
+
}, Rr = (e, t) => {
|
|
3999
4039
|
if (!e) return {};
|
|
4000
4040
|
const { colorSchemes: o, ...n } = e, r = o?.[t ? "dark" : "light"];
|
|
4001
|
-
return r && "object" == typeof r ?
|
|
4002
|
-
},
|
|
4003
|
-
const { host: o, scopeClass: r, square: a, elevation: l, variant: i, onWorkbookLoad: s, onDocumentError: d, renderDocumentError: c =
|
|
4041
|
+
return r && "object" == typeof r ? yo.deepMerge(n, r) : n;
|
|
4042
|
+
}, Lr = "taskPanePosition", Vr = lt(rt((e, t) => {
|
|
4043
|
+
const { host: o, scopeClass: r, square: a, elevation: l, variant: i, onWorkbookLoad: s, onDocumentError: d, renderDocumentError: c = T, propsDocumentError: p, propsTaskPaneArea: m, renderTaskPaneArea: h = zr, taskPaneSide: y = "right", onKeyDown: b, workbook: x, onWorkbookChange: v, logo: C, topLeft: w, topRight: S, muiTheme: F, tokens: N, cssBaseline: I, autoFocus: P = !1, title: O, onDirtyChange: M, propsDocumentTitle: W, renderDocumentLoading: E = k, propsDocumentLoading: B, propsWorkbook: R, showFormulaBar: L, propsFormulaBar: V, renderFormulaBar: z, editable: j, showStatusBar: $, propsStatusBar: K, renderStatusBar: _, propsToolbar: H, renderToolbar: U } = e, q = pt(null), G = pt(null), Q = pt(null), Y = Ue(() => {
|
|
4004
4044
|
Q.current?.getNamedCollectionEditorElement?.()?.focus?.();
|
|
4005
|
-
}, []), J =
|
|
4045
|
+
}, []), J = Ue(d ?? (() => {}), [d]), X = Ue(M ?? (() => {}), [M]), Z = W?.placeHolder, [ee] = Xe(ce.Mode, de[ce.Mode]), { themeMode: te } = Ze({ mode: ee ?? void 0 }), [oe] = Xe(Le.Active, null), ne = pt(oe);
|
|
4006
4046
|
ne.current = oe;
|
|
4007
|
-
const re =
|
|
4008
|
-
light:
|
|
4009
|
-
dark:
|
|
4047
|
+
const re = et(), ae = ct(() => ({
|
|
4048
|
+
light: wt(!1, yo.deepMerge(Rr(F, !1), A(re?.light))),
|
|
4049
|
+
dark: wt(!0, yo.deepMerge(Rr(F, !0), A(re?.dark)))
|
|
4010
4050
|
}), [
|
|
4011
|
-
|
|
4051
|
+
F,
|
|
4012
4052
|
re?.light,
|
|
4013
4053
|
re?.dark
|
|
4014
|
-
]), le = "dark" === te,
|
|
4054
|
+
]), le = "dark" === te, ie = ct(() => f(ae.light, ae.dark, `.${r}`, N), [
|
|
4015
4055
|
ae,
|
|
4016
4056
|
r,
|
|
4017
4057
|
N
|
|
4018
|
-
]),
|
|
4019
|
-
|
|
4020
|
-
|
|
4058
|
+
]), ye = ct(() => me("sxl-defaults", `.${r}`), [r]), fe = we(), [be, xe] = ut(() => x ?? null);
|
|
4059
|
+
dt(() => {
|
|
4060
|
+
xe(x ?? null);
|
|
4021
4061
|
}, [x]);
|
|
4022
|
-
const [
|
|
4023
|
-
|
|
4024
|
-
const
|
|
4025
|
-
io:
|
|
4026
|
-
defaultTheme:
|
|
4027
|
-
reloadKey:
|
|
4028
|
-
}),
|
|
4062
|
+
const [ve, Ce] = ut(0), ke = pt(null);
|
|
4063
|
+
ke.current || (ke.current = Br());
|
|
4064
|
+
const De = Fe(be, {
|
|
4065
|
+
io: pe,
|
|
4066
|
+
defaultTheme: fe.getDefaultTheme(),
|
|
4067
|
+
reloadKey: ve
|
|
4068
|
+
}), Ne = "loaded" === De.status ? De.workbook : null, Me = ct(() => "error" === De.status ? {
|
|
4029
4069
|
status: "error",
|
|
4030
|
-
error:
|
|
4031
|
-
} : "loaded" ===
|
|
4070
|
+
error: De.error
|
|
4071
|
+
} : "loaded" === De.status ? {
|
|
4032
4072
|
status: "loaded",
|
|
4033
|
-
workbook:
|
|
4034
|
-
} : { status: "loading" }, [
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
}, [
|
|
4038
|
-
"loaded" ===
|
|
4039
|
-
}, [
|
|
4040
|
-
const [Ee, Re] =
|
|
4041
|
-
|
|
4042
|
-
const Ve =
|
|
4043
|
-
|
|
4044
|
-
const $e =
|
|
4073
|
+
workbook: De.workbook
|
|
4074
|
+
} : { status: "loading" }, [De]);
|
|
4075
|
+
dt(() => {
|
|
4076
|
+
ke.current.settled && (ke.current = Br());
|
|
4077
|
+
}, [be, ve]), dt(() => {
|
|
4078
|
+
"loaded" === Me.status ? ke.current.resolve(Me.workbook) : "error" === Me.status && (J?.(Me.error), ke.current.reject(Me.error));
|
|
4079
|
+
}, [Me]);
|
|
4080
|
+
const [Ee, Re] = ut(null);
|
|
4081
|
+
Ne && !Ee && Re(Ne);
|
|
4082
|
+
const Ve = Ne && Ee && Ne !== Ee ? Ne : null, je = pt(Ve);
|
|
4083
|
+
je.current = Ve;
|
|
4084
|
+
const $e = pt(Ee);
|
|
4045
4085
|
$e.current = Ee;
|
|
4046
|
-
const
|
|
4086
|
+
const _e = pt([]), He = it((e) => {
|
|
4047
4087
|
const t = $e.current;
|
|
4048
|
-
t &&
|
|
4088
|
+
t && _e.current.push(t), xe(e);
|
|
4049
4089
|
}, []);
|
|
4050
|
-
|
|
4051
|
-
const e =
|
|
4090
|
+
dt(() => {
|
|
4091
|
+
const e = _e.current;
|
|
4052
4092
|
if (0 !== e.length) {
|
|
4053
|
-
|
|
4093
|
+
_e.current = e.filter((e) => e === Ee);
|
|
4054
4094
|
for (let t = 0; t < e.length; t++) {
|
|
4055
4095
|
const o = e[t];
|
|
4056
4096
|
if (o !== Ee) try {
|
|
@@ -4061,100 +4101,100 @@ var Mr = () => {
|
|
|
4061
4101
|
}
|
|
4062
4102
|
}
|
|
4063
4103
|
}, [Ee]);
|
|
4064
|
-
const
|
|
4065
|
-
|
|
4066
|
-
if (!
|
|
4067
|
-
let e =
|
|
4068
|
-
return
|
|
4104
|
+
const qe = j ? null : Ee, Ge = Te(), Ye = ct(() => qe ? ge(qe.getSelectedSheet(), { referenceMode: Ge }) : null, [qe, Ge]), Je = j ?? Ye, tt = pt(Je);
|
|
4105
|
+
tt.current = Je, dt(() => {
|
|
4106
|
+
if (!Je) return;
|
|
4107
|
+
let e = Je.getSession();
|
|
4108
|
+
return Je.subscribe(() => {
|
|
4069
4109
|
const t = e;
|
|
4070
|
-
e =
|
|
4110
|
+
e = Je.getSession(), t && !e && "formula-bar" === t.getActiveEditorId() && Q.current?.contains?.(document.activeElement) && q.current?.focus();
|
|
4071
4111
|
});
|
|
4072
|
-
}, [
|
|
4073
|
-
const
|
|
4074
|
-
lt.current =
|
|
4075
|
-
const
|
|
4076
|
-
|
|
4077
|
-
const [
|
|
4078
|
-
|
|
4112
|
+
}, [Je]);
|
|
4113
|
+
const ot = Pe(Ee), { isDirty: nt, saveState: rt } = Oe(Ee, pe), at = Ie(Ee), lt = pt(rt), st = pt(null);
|
|
4114
|
+
lt.current = rt;
|
|
4115
|
+
const mt = it(() => lt.current?.isDirty() ?? !1, []), gt = pt(Me);
|
|
4116
|
+
gt.current = Me;
|
|
4117
|
+
const [ft, bt] = ut(null), xt = O ?? W?.title, [Ct, kt] = ut(null);
|
|
4118
|
+
dt(() => {
|
|
4079
4119
|
kt(null);
|
|
4080
4120
|
}, [Ee]);
|
|
4081
|
-
const
|
|
4082
|
-
|
|
4083
|
-
X?.(
|
|
4084
|
-
}, [
|
|
4085
|
-
const
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
}, [
|
|
4089
|
-
const
|
|
4090
|
-
|
|
4091
|
-
const
|
|
4121
|
+
const St = xt ?? Ct ?? ot ?? "";
|
|
4122
|
+
dt(() => {
|
|
4123
|
+
X?.(nt);
|
|
4124
|
+
}, [nt]);
|
|
4125
|
+
const Tt = Ue(v ?? (() => {}), [v]);
|
|
4126
|
+
dt(() => {
|
|
4127
|
+
Tt?.(Ne);
|
|
4128
|
+
}, [Ne]);
|
|
4129
|
+
const Ft = pt(Ne);
|
|
4130
|
+
Ft.current = Ne, Se(Ee, "onViewChange");
|
|
4131
|
+
const Dt = ct(() => At(ht, {
|
|
4092
4132
|
groupKey: "helpOptions",
|
|
4093
4133
|
disableHover: !0,
|
|
4094
4134
|
sx: { padding: "0" },
|
|
4095
4135
|
propsButton: { sx: { maxHeight: "22px" } }
|
|
4096
|
-
}), []), [
|
|
4097
|
-
|
|
4136
|
+
}), []), [Nt, It] = ut(null), Pt = it((e) => {
|
|
4137
|
+
It(e);
|
|
4098
4138
|
}, []);
|
|
4099
|
-
|
|
4100
|
-
|
|
4139
|
+
dt(() => {
|
|
4140
|
+
We.prefetch().catch((e) => {
|
|
4101
4141
|
console.warn("Icons could not be loaded:", e);
|
|
4102
4142
|
});
|
|
4103
4143
|
}, []);
|
|
4104
|
-
const
|
|
4105
|
-
|
|
4106
|
-
const
|
|
4144
|
+
const Ot = pt(null);
|
|
4145
|
+
Ot.current || (Ot.current = Br());
|
|
4146
|
+
const Et = pt(null), Bt = it(() => Et.current?.getSheetElement()?.getGridSurface()?.getPane()?.getElement() ?? Ot.current.promise, []), Rt = Ue(async (e) => {
|
|
4107
4147
|
const t = ne.current;
|
|
4108
|
-
t && t !==
|
|
4109
|
-
}, []),
|
|
4148
|
+
t && t !== bo.getActive() && await bo.setActive(t), await Ae.DefaultCommandCatalogService.prefetch(t ?? void 0), bt(e), Et.current = e.source, Ot.current.settled || Ot.current.resolve(e.source.getSheetElement()?.getGridSurface()?.getPane()?.getElement() ?? null), s?.(e);
|
|
4149
|
+
}, []), Vt = pt(null), zt = it((e) => {
|
|
4110
4150
|
let t = null, o = {
|
|
4111
4151
|
readOnly: !0,
|
|
4112
4152
|
...W
|
|
4113
4153
|
};
|
|
4114
|
-
return W?.hidden || (t =
|
|
4154
|
+
return W?.hidden || (t = At(n, {
|
|
4115
4155
|
...o,
|
|
4116
4156
|
style: {
|
|
4117
4157
|
maxWidth: "100%",
|
|
4118
4158
|
...W?.style
|
|
4119
4159
|
},
|
|
4120
4160
|
workbook: e.workbook ?? q.current,
|
|
4121
|
-
ref:
|
|
4122
|
-
title:
|
|
4123
|
-
modified:
|
|
4124
|
-
encrypted:
|
|
4161
|
+
ref: Vt,
|
|
4162
|
+
title: St,
|
|
4163
|
+
modified: nt,
|
|
4164
|
+
encrypted: at,
|
|
4125
4165
|
placeHolder: Z,
|
|
4126
4166
|
onTitleChange: (e) => {
|
|
4127
4167
|
kt(e), W?.onTitleChange?.(e);
|
|
4128
4168
|
}
|
|
4129
|
-
})),
|
|
4169
|
+
})), At(tr, {
|
|
4130
4170
|
...e,
|
|
4131
|
-
logo:
|
|
4171
|
+
logo: C,
|
|
4132
4172
|
mainElement: t,
|
|
4133
4173
|
startElement: w,
|
|
4134
|
-
endElement:
|
|
4174
|
+
endElement: S
|
|
4135
4175
|
});
|
|
4136
4176
|
}, [
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4177
|
+
C,
|
|
4178
|
+
St,
|
|
4179
|
+
nt,
|
|
4180
|
+
at,
|
|
4141
4181
|
W,
|
|
4142
4182
|
w,
|
|
4143
|
-
|
|
4183
|
+
S
|
|
4144
4184
|
]);
|
|
4145
|
-
|
|
4185
|
+
dt(() => {
|
|
4146
4186
|
const e = q.current;
|
|
4147
4187
|
if (!e) return;
|
|
4148
4188
|
const t = (e) => e.preventDefault();
|
|
4149
4189
|
return e.addEventListener("wheel", t, { passive: !1 }), () => {
|
|
4150
4190
|
e.removeEventListener("wheel", t);
|
|
4151
4191
|
};
|
|
4152
|
-
}, [
|
|
4153
|
-
const [
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
}, [
|
|
4157
|
-
const Kt =
|
|
4192
|
+
}, [ft]);
|
|
4193
|
+
const [jt, $t] = ut(null);
|
|
4194
|
+
dt(() => {
|
|
4195
|
+
$t(ft?.source?.getCommandScope?.() ?? null);
|
|
4196
|
+
}, [ft]);
|
|
4197
|
+
const Kt = ct(() => ({
|
|
4158
4198
|
"& .SnackbarContainer-root": { position: "absolute !important" },
|
|
4159
4199
|
"& .notistack-SnackbarContainer > div": { maxWidth: "min(100%, 720px)" },
|
|
4160
4200
|
"& .notistack-Snackbar": { minWidth: "unset" },
|
|
@@ -4167,55 +4207,55 @@ var Mr = () => {
|
|
|
4167
4207
|
whiteSpace: "pre-wrap"
|
|
4168
4208
|
},
|
|
4169
4209
|
"*": { userSelect: "none" }
|
|
4170
|
-
}), []), [
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
}, [
|
|
4174
|
-
const
|
|
4210
|
+
}), []), [Ht, Ut] = ut(null), [, qt] = Xe(null, !1);
|
|
4211
|
+
dt(() => {
|
|
4212
|
+
qt(null != Ht);
|
|
4213
|
+
}, [Ht, qt]);
|
|
4214
|
+
const Gt = it((e) => h({
|
|
4175
4215
|
model: Ee,
|
|
4176
|
-
side:
|
|
4216
|
+
side: y,
|
|
4177
4217
|
...e,
|
|
4178
|
-
...
|
|
4218
|
+
...m
|
|
4179
4219
|
}), [
|
|
4180
4220
|
Ee,
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
]),
|
|
4184
|
-
|
|
4221
|
+
y,
|
|
4222
|
+
m
|
|
4223
|
+
]), Qt = pt(o);
|
|
4224
|
+
Qt.current = o, Qe(t, () => ({
|
|
4185
4225
|
isStudioElement: () => !0,
|
|
4186
4226
|
save: (e) => {
|
|
4187
|
-
const t =
|
|
4227
|
+
const t = st.current;
|
|
4188
4228
|
return t ? t(e) : Promise.reject(/* @__PURE__ */ new Error("The studio cannot save: no workbook, or the backing store cannot write."));
|
|
4189
4229
|
},
|
|
4190
4230
|
getWorkbookElement: () => q.current,
|
|
4191
|
-
getWorkbook: () =>
|
|
4231
|
+
getWorkbook: () => Ft.current ?? null,
|
|
4192
4232
|
isDirty: () => lt.current?.isDirty() ?? !1,
|
|
4193
|
-
getEditable: () =>
|
|
4233
|
+
getEditable: () => tt.current,
|
|
4194
4234
|
getFormulaBarElement: () => Q.current ?? null,
|
|
4195
4235
|
focus: () => q.current?.focus(),
|
|
4196
|
-
whenReady: () => (
|
|
4197
|
-
getWorkbookState: () =>
|
|
4198
|
-
retry: () =>
|
|
4236
|
+
whenReady: () => (ke.current || (ke.current = Br()), ke.current.promise),
|
|
4237
|
+
getWorkbookState: () => gt.current,
|
|
4238
|
+
retry: () => Ce((e) => e + 1)
|
|
4199
4239
|
}), [], o);
|
|
4200
|
-
const
|
|
4201
|
-
t ===
|
|
4202
|
-
t ===
|
|
4240
|
+
const Yt = pt(!1), Jt = Ue((e, t) => {
|
|
4241
|
+
t === je.current && requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
4242
|
+
t === je.current && (Yt.current = Qt.current?.contains(document.activeElement) ?? !0, Re(t), Rt(e));
|
|
4203
4243
|
}));
|
|
4204
4244
|
}, []);
|
|
4205
|
-
|
|
4206
|
-
|
|
4245
|
+
dt(() => {
|
|
4246
|
+
Yt.current && (Yt.current = !1, q.current?.focus());
|
|
4207
4247
|
}, [Ee]);
|
|
4208
|
-
const
|
|
4209
|
-
const { ref: t, ...o } = e, n = le ? ae.dark : ae.light, r = "error" ===
|
|
4210
|
-
...
|
|
4248
|
+
const Xt = it(() => At(Mt, {}), []), Zt = it((e) => {
|
|
4249
|
+
const { ref: t, ...o } = e, n = le ? ae.dark : ae.light, r = "error" === Me.status ? c({
|
|
4250
|
+
...p,
|
|
4211
4251
|
style: {
|
|
4212
4252
|
width: "100%",
|
|
4213
4253
|
height: "100%",
|
|
4214
|
-
...
|
|
4254
|
+
...p?.style
|
|
4215
4255
|
},
|
|
4216
|
-
error:
|
|
4256
|
+
error: Me.error
|
|
4217
4257
|
}) : null;
|
|
4218
|
-
if (r && !Ee) return
|
|
4258
|
+
if (r && !Ee) return At(to, {
|
|
4219
4259
|
style: {
|
|
4220
4260
|
width: "100%",
|
|
4221
4261
|
height: "100%",
|
|
@@ -4228,10 +4268,10 @@ var Mr = () => {
|
|
|
4228
4268
|
});
|
|
4229
4269
|
let s = null;
|
|
4230
4270
|
if (Ee) {
|
|
4231
|
-
const e = Ee, r = e.getView(), a = L ?? r?.isShowFormulaBar(), l = $ ?? r?.isShowStatusBar(), i =
|
|
4271
|
+
const e = Ee, r = e.getView(), a = L ?? r?.isShowFormulaBar(), l = $ ?? r?.isShowStatusBar(), i = ft?.source ?? q.current, d = (U ?? zt)({
|
|
4232
4272
|
workbook: i,
|
|
4233
4273
|
...H
|
|
4234
|
-
}), c = a ? (z ??
|
|
4274
|
+
}), c = a ? (z ?? D)({
|
|
4235
4275
|
ref: Q,
|
|
4236
4276
|
style: {
|
|
4237
4277
|
marginTop: n.spacing(.25),
|
|
@@ -4240,29 +4280,29 @@ var Mr = () => {
|
|
|
4240
4280
|
marginBottom: n.spacing(.75)
|
|
4241
4281
|
},
|
|
4242
4282
|
workbook: e,
|
|
4243
|
-
editable:
|
|
4283
|
+
editable: Je ?? void 0,
|
|
4244
4284
|
...V,
|
|
4245
4285
|
propsNamedCollectionEditor: {
|
|
4246
4286
|
restoreFocus: (e) => i?.focus(e),
|
|
4247
4287
|
...V?.propsNamedCollectionEditor
|
|
4248
4288
|
}
|
|
4249
|
-
}) : null,
|
|
4250
|
-
childrenEnd:
|
|
4289
|
+
}) : null, p = l ? (_ ?? g)({
|
|
4290
|
+
childrenEnd: Dt,
|
|
4251
4291
|
...K
|
|
4252
|
-
}) : null,
|
|
4292
|
+
}) : null, m = (e, n) => At(u, {
|
|
4253
4293
|
...R,
|
|
4254
4294
|
tabIndex: 0,
|
|
4255
|
-
autoFocus: !n &&
|
|
4295
|
+
autoFocus: !n && P,
|
|
4256
4296
|
workbook: e,
|
|
4257
|
-
editable: n ? void 0 :
|
|
4297
|
+
editable: n ? void 0 : Je ?? void 0,
|
|
4258
4298
|
focusNameBox: n ? void 0 : Y,
|
|
4259
|
-
ref: n ? G :
|
|
4260
|
-
onWorkbookLoad: n ? (t) =>
|
|
4299
|
+
ref: n ? G : Do([t, q]),
|
|
4300
|
+
onWorkbookLoad: n ? (t) => Jt(t, e) : Rt,
|
|
4261
4301
|
onKeyDown: (e) => {
|
|
4262
4302
|
b?.(e);
|
|
4263
4303
|
},
|
|
4264
4304
|
propsWorkbookLoading: B,
|
|
4265
|
-
renderWorkbookLoading:
|
|
4305
|
+
renderWorkbookLoading: Xt,
|
|
4266
4306
|
style: n ? {
|
|
4267
4307
|
...R?.style,
|
|
4268
4308
|
position: "absolute",
|
|
@@ -4276,14 +4316,14 @@ var Mr = () => {
|
|
|
4276
4316
|
onContextMenu: (e) => e.preventDefault(),
|
|
4277
4317
|
...n ? null : o
|
|
4278
4318
|
}, e.getId());
|
|
4279
|
-
s =
|
|
4319
|
+
s = Wt("div", {
|
|
4280
4320
|
style: {
|
|
4281
4321
|
display: "flex",
|
|
4282
4322
|
flexDirection: "column",
|
|
4283
4323
|
flex: "1 1 100%",
|
|
4284
4324
|
minWidth: 0,
|
|
4285
4325
|
minHeight: 0,
|
|
4286
|
-
...
|
|
4326
|
+
...he({
|
|
4287
4327
|
window: n.palette.background.default,
|
|
4288
4328
|
windowText: n.palette.text.primary
|
|
4289
4329
|
})
|
|
@@ -4291,14 +4331,14 @@ var Mr = () => {
|
|
|
4291
4331
|
children: [
|
|
4292
4332
|
d,
|
|
4293
4333
|
c,
|
|
4294
|
-
|
|
4295
|
-
taskSide:
|
|
4296
|
-
persistKey:
|
|
4297
|
-
sidebarElement:
|
|
4298
|
-
scope:
|
|
4299
|
-
children:
|
|
4334
|
+
At(vr, {
|
|
4335
|
+
taskSide: y,
|
|
4336
|
+
persistKey: Lr,
|
|
4337
|
+
sidebarElement: Ht ? At(Ae.CommandScopeProvider, {
|
|
4338
|
+
scope: jt,
|
|
4339
|
+
children: Ht
|
|
4300
4340
|
}) : void 0,
|
|
4301
|
-
mainElement:
|
|
4341
|
+
mainElement: Wt("div", {
|
|
4302
4342
|
style: {
|
|
4303
4343
|
position: "relative",
|
|
4304
4344
|
display: "flex",
|
|
@@ -4307,7 +4347,7 @@ var Mr = () => {
|
|
|
4307
4347
|
minWidth: 0,
|
|
4308
4348
|
minHeight: 0
|
|
4309
4349
|
},
|
|
4310
|
-
children: [[
|
|
4350
|
+
children: [[m(Ee, !1), Ve ? m(Ve, !0) : null], At(Lt, {
|
|
4311
4351
|
ref: Pt,
|
|
4312
4352
|
sx: {
|
|
4313
4353
|
position: "absolute",
|
|
@@ -4321,12 +4361,12 @@ var Mr = () => {
|
|
|
4321
4361
|
})]
|
|
4322
4362
|
})
|
|
4323
4363
|
}),
|
|
4324
|
-
|
|
4364
|
+
p
|
|
4325
4365
|
]
|
|
4326
4366
|
});
|
|
4327
4367
|
}
|
|
4328
|
-
const d =
|
|
4329
|
-
return
|
|
4368
|
+
const d = ft ? null : E({ ...B });
|
|
4369
|
+
return Wt(to, {
|
|
4330
4370
|
sx: Kt,
|
|
4331
4371
|
style: {
|
|
4332
4372
|
width: "100%",
|
|
@@ -4343,7 +4383,7 @@ var Mr = () => {
|
|
|
4343
4383
|
variant: i,
|
|
4344
4384
|
children: [
|
|
4345
4385
|
s,
|
|
4346
|
-
r ?
|
|
4386
|
+
r ? At(to, {
|
|
4347
4387
|
style: {
|
|
4348
4388
|
position: "absolute",
|
|
4349
4389
|
inset: 0,
|
|
@@ -4353,7 +4393,7 @@ var Mr = () => {
|
|
|
4353
4393
|
},
|
|
4354
4394
|
children: r
|
|
4355
4395
|
}) : null,
|
|
4356
|
-
d ?
|
|
4396
|
+
d ? At("div", {
|
|
4357
4397
|
style: {
|
|
4358
4398
|
position: "absolute",
|
|
4359
4399
|
inset: 0,
|
|
@@ -4367,30 +4407,30 @@ var Mr = () => {
|
|
|
4367
4407
|
]
|
|
4368
4408
|
});
|
|
4369
4409
|
}, [
|
|
4370
|
-
|
|
4410
|
+
Me,
|
|
4371
4411
|
Ee,
|
|
4372
4412
|
Ve,
|
|
4373
|
-
|
|
4374
|
-
|
|
4413
|
+
ft,
|
|
4414
|
+
St,
|
|
4375
4415
|
E,
|
|
4376
4416
|
B,
|
|
4377
|
-
|
|
4417
|
+
Xt,
|
|
4378
4418
|
R,
|
|
4379
4419
|
a,
|
|
4380
4420
|
l,
|
|
4381
4421
|
i,
|
|
4382
|
-
|
|
4422
|
+
Dt,
|
|
4383
4423
|
c,
|
|
4384
|
-
|
|
4385
|
-
Vt,
|
|
4386
|
-
Kt,
|
|
4387
|
-
_t,
|
|
4388
|
-
f,
|
|
4424
|
+
p,
|
|
4389
4425
|
zt,
|
|
4426
|
+
Kt,
|
|
4427
|
+
Ht,
|
|
4428
|
+
y,
|
|
4429
|
+
jt,
|
|
4390
4430
|
L,
|
|
4391
4431
|
V,
|
|
4392
4432
|
z,
|
|
4393
|
-
|
|
4433
|
+
Je,
|
|
4394
4434
|
$,
|
|
4395
4435
|
K,
|
|
4396
4436
|
_,
|
|
@@ -4399,9 +4439,9 @@ var Mr = () => {
|
|
|
4399
4439
|
ae,
|
|
4400
4440
|
le
|
|
4401
4441
|
]);
|
|
4402
|
-
let eo =
|
|
4442
|
+
let eo = At(Po, {
|
|
4403
4443
|
maxSnack: 3,
|
|
4404
|
-
domRoot:
|
|
4444
|
+
domRoot: Nt ?? void 0,
|
|
4405
4445
|
anchorOrigin: {
|
|
4406
4446
|
vertical: "bottom",
|
|
4407
4447
|
horizontal: "right"
|
|
@@ -4410,45 +4450,46 @@ var Mr = () => {
|
|
|
4410
4450
|
onClose: (e, t, o) => {
|
|
4411
4451
|
q.current?.focus();
|
|
4412
4452
|
},
|
|
4413
|
-
Components: { error:
|
|
4453
|
+
Components: { error: Zn },
|
|
4414
4454
|
iconVariant: {
|
|
4415
|
-
success:
|
|
4455
|
+
success: At(ro, {
|
|
4416
4456
|
style: { marginRight: "8px" },
|
|
4417
|
-
children:
|
|
4457
|
+
children: At("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" })
|
|
4418
4458
|
}),
|
|
4419
|
-
error:
|
|
4459
|
+
error: At(Be, {
|
|
4420
4460
|
iconKey: "ErrorAlert",
|
|
4421
4461
|
style: { marginRight: "8px" }
|
|
4422
4462
|
})
|
|
4423
4463
|
},
|
|
4424
|
-
children:
|
|
4464
|
+
children: At(ue, {
|
|
4425
4465
|
workbook: Ee,
|
|
4426
|
-
children:
|
|
4427
|
-
renderArea:
|
|
4466
|
+
children: At(se, {
|
|
4467
|
+
renderArea: Gt,
|
|
4428
4468
|
onUpdateArea: (e) => {
|
|
4429
|
-
|
|
4469
|
+
Ut(e);
|
|
4430
4470
|
},
|
|
4431
|
-
children:
|
|
4471
|
+
children: At(vt, { children: At(ur, { children: At(Ke, { children: At(ze, { children: At(dr, {
|
|
4432
4472
|
workbook: Ee,
|
|
4433
|
-
initialCommandAnchor:
|
|
4434
|
-
renderWorkbook:
|
|
4473
|
+
initialCommandAnchor: Bt,
|
|
4474
|
+
renderWorkbook: Zt,
|
|
4435
4475
|
setWorkbook: He,
|
|
4436
|
-
titleWorkbook:
|
|
4476
|
+
titleWorkbook: St,
|
|
4437
4477
|
setWorkbookTitle: kt,
|
|
4438
|
-
refDocumentTitle:
|
|
4439
|
-
isDirty:
|
|
4440
|
-
refSave:
|
|
4478
|
+
refDocumentTitle: Vt,
|
|
4479
|
+
isDirty: mt,
|
|
4480
|
+
refSave: st,
|
|
4481
|
+
host: o
|
|
4441
4482
|
}) }) }) }) })
|
|
4442
4483
|
})
|
|
4443
4484
|
})
|
|
4444
4485
|
});
|
|
4445
|
-
return eo =
|
|
4486
|
+
return eo = Wt(so, {
|
|
4446
4487
|
theme: le ? ae.dark : ae.light,
|
|
4447
4488
|
children: [
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4489
|
+
I ? At(_t, {}) : null,
|
|
4490
|
+
At("style", { children: ie }),
|
|
4491
|
+
At("style", { children: ye }),
|
|
4492
|
+
At(yt, {
|
|
4452
4493
|
themeScopeClass: r,
|
|
4453
4494
|
themeSurface: "app",
|
|
4454
4495
|
themeMode: te,
|
|
@@ -4457,6 +4498,6 @@ var Mr = () => {
|
|
|
4457
4498
|
]
|
|
4458
4499
|
}), eo;
|
|
4459
4500
|
}));
|
|
4460
|
-
|
|
4461
|
-
var
|
|
4462
|
-
export {
|
|
4501
|
+
Vr.displayName = "EagerStudio";
|
|
4502
|
+
var zr = (e) => At(yr, { ...e });
|
|
4503
|
+
export { Vr as EagerStudio, Vr as default };
|