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