@sheetxl/studio-mui 0.8.0-beta.6 → 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/4_Zy3pR6YXkzISoK.cjs +1 -0
- package/browser/cjs/BcBrhEv9acaTxPkO.cjs +13 -0
- package/browser/cjs/{BlNKpwiG-Q7eIi5t.cjs → Clzu4HOXk3QSlzUD.cjs} +3 -3
- package/browser/cjs/{BQMCM3iFn4MNWAkB.cjs → HuPFsmz7kyZVo3c7.cjs} +1 -1
- package/browser/cjs/index.cjs +1 -1
- package/browser/esm/{CKemMJZNIPnJ0dUE.mjs → 0Rpk1T56LoSnDrmq.mjs} +2 -2
- package/browser/esm/{C5swGBbBLdDzg_bm.mjs → 3L04oqyfyjRxhmzg.mjs} +2 -2
- package/browser/esm/{CyQk62MFBCep2ZZs.mjs → 7gisHVXYgcPxWH8-.mjs} +2 -2
- package/browser/esm/{BofZe0q9bsHQr0Xd.mjs → B57WM1X24rsvTF_o.mjs} +1 -1
- package/browser/esm/{BybBaLxSKyGAsxqO.mjs → B7k8enrhC2Rvqhn1.mjs} +3 -3
- package/browser/esm/{BPzT8gL3SgD0CG7V.mjs → BK4OEmeaw-kC-vAN.mjs} +1302 -1302
- package/browser/esm/{2_WF-hy6x4dXfEzW.mjs → BWAIbfQZ6h5xVLdB.mjs} +1 -1
- package/browser/esm/{aGoWX29-zbUaPh2U.mjs → B_PhUn6yySwXt2wo.mjs} +2 -2
- package/browser/esm/{D-JQOjmAh6Gk6wVM.mjs → C36WT3I3aIR8y7I6.mjs} +2 -2
- package/browser/esm/{BlWsO6M15Ii13NrV.mjs → CH7ZfljN7ru0Y9Wg.mjs} +2 -2
- package/browser/esm/{CsNOEAKuHLfckItX.mjs → CpTqhDZotYaKGbLl.mjs} +1 -1
- package/browser/esm/{D3b3dWTjvFd1Kj5g.mjs → D3BwGfI_IEjay0dA.mjs} +1 -1
- package/browser/esm/{BFxtcKJBbfjtMft-.mjs → D7HOLngE_1FYF6y6.mjs} +3 -3
- package/browser/esm/{D8FEKUKVxH32duMx.mjs → D88iVsgfDG9k-qf_.mjs} +3 -3
- package/browser/esm/{61ip_C1X9ls4svw6.mjs → DErAKw-lIK3RY8m-.mjs} +1 -1
- package/browser/esm/{Dzym1WSjYb_mnVkJ.mjs → DNhLiDpvz3lAR190.mjs} +2 -2
- package/browser/esm/{JYRkZ4iKzbWnNhEs.mjs → DR95Rgl8ItgWla8V.mjs} +2 -2
- package/browser/esm/{p62JxLmjmWD2MQq1.mjs → DvYZOxsaTNeBKuFq.mjs} +98 -97
- package/browser/esm/{27jPjqdDLWn5qbQ8.mjs → DyNZEBlugP-x15kP.mjs} +3 -3
- package/browser/esm/{BGdZT1Ka4ohDCZpW.mjs → DzWcb3yuPXS0E4_P.mjs} +3 -3
- package/browser/esm/{DTLKzrZGPkkNlncN.mjs → WftYXVWvPKx99H0H.mjs} +2 -2
- package/browser/esm/{DRUKu2I27bidfyvH.mjs → eoNyVUe5ZEpHwJ7k.mjs} +1 -1
- package/browser/esm/{FK7vqizwRujDsqL2.mjs → hFLn30a6N1fEy7fz.mjs} +2159 -1562
- package/browser/esm/index.mjs +56 -56
- package/browser/esm/{6EK3JgWrKYfqzAfV.mjs → jkFhDHWwKoyTSSDL.mjs} +1 -1
- package/licenses/dependencies.txt +79 -79
- package/node/esm/{CE6ZU2MVb3_-FzIk.mjs → BTI9exTFHEYzVjw9.mjs} +1 -1
- package/node/esm/{DDVJs9oOFXR3RfSi.mjs → BbXHuDHRHOW_6Sbs.mjs} +1 -1
- package/node/esm/{CtoRlEz1GwA88zTu.mjs → BlD3bHo8AAxK7O1j.mjs} +1 -1
- package/node/esm/{uIRinWE0OCKJvsGN.mjs → CbpkRpNbQYYOJbxH.mjs} +3 -3
- package/node/esm/{K6LEXUZkuqoEn5yJ.mjs → Ccrq9TNkiiSHKw-m.mjs} +1 -1
- package/node/esm/{qu70N1tsIwi7LmT6.mjs → CpteKzMPi39jxmYL.mjs} +1 -1
- package/node/esm/{D3xcuMwJvLJhlPNV.mjs → Cul_Vgip2OE8yFBQ.mjs} +1 -1
- package/node/esm/{CksPMsHwUSCpFnpS.mjs → DA2gosTk8L-FUVI5.mjs} +1058 -1058
- package/node/esm/{3J2-TRYWEsvnTDnO.mjs → DP23-d6_VRFro0_D.mjs} +103 -102
- package/node/esm/{CKOhL08sVy1N_Uza.mjs → DQtpY5kX99aMHygs.mjs} +1 -1
- package/node/esm/{Dc4t_AYLdTAnPOIT.mjs → DifZAchLTKOmWpkv.mjs} +1 -1
- package/node/esm/{JUUre9pYia7feetw.mjs → Dvvg1Yo2e7OGd8sv.mjs} +1 -1
- package/node/esm/{B2QOYsl1YmcwknsP.mjs → YKY4d8_Ckc8nPQqI.mjs} +1 -1
- package/node/esm/index.mjs +3123 -2526
- package/node/esm/{CzERDnu2VbNTjJgI.mjs → lH1iFsECniBRMubb.mjs} +2 -2
- package/node/esm/{ObY_iULY2ezBYD3q.mjs → v0BFuYjhq2G8zDRe.mjs} +1 -1
- package/package.json +9 -9
- package/resources/locales/de/ui.msg.json +19 -0
- package/resources/locales/en/ui.msg.json +19 -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/index.d.ts +1 -0
- 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/iFPhqab5w95hHEsT.cjs +0 -1
- package/browser/cjs/xCAd86Y_REa3Xs1o.cjs +0 -13
|
@@ -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 Mo = lt((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 Ao = lt((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 Wo = nt(null), Eo = (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 Wo = nt(null), Eo = (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 Wo = nt(null), Eo = (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 Wo = nt(null), Eo = (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,7 +110,7 @@ var Wo = nt(null), Eo = (e) => {
|
|
|
110
110
|
t,
|
|
111
111
|
a
|
|
112
112
|
]);
|
|
113
|
-
},
|
|
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
114
|
if (!e || t < 0) return String(t);
|
|
115
115
|
const n = t >= 1, r = !Number.isInteger(t);
|
|
116
116
|
let a;
|
|
@@ -118,7 +118,7 @@ var Wo = nt(null), Eo = (e) => {
|
|
|
118
118
|
value: t,
|
|
119
119
|
style: { numberFormat: a }
|
|
120
120
|
}).getText();
|
|
121
|
-
})(o, e, n) : String(e),
|
|
121
|
+
})(o, e, n) : String(e), jo = (e, t, o, n) => {
|
|
122
122
|
if (0 === e.length) return null;
|
|
123
123
|
if (e.startsWith("=")) {
|
|
124
124
|
const o = t.compile(e.substring(1));
|
|
@@ -129,31 +129,31 @@ var Wo = nt(null), Eo = (e) => {
|
|
|
129
129
|
if (n) return ((e, t) => {
|
|
130
130
|
if (!e) return null;
|
|
131
131
|
const o = e.createCell({ value: t }, void 0, { textParser: !0 });
|
|
132
|
-
return o.getType() ===
|
|
132
|
+
return o.getType() === Y.Number ? o.getValue() : null;
|
|
133
133
|
})(o, r) ?? e;
|
|
134
134
|
const a = Number(r);
|
|
135
135
|
return Number.isFinite(a) ? a : e;
|
|
136
|
-
},
|
|
137
|
-
const { option: t, onOptionChange: o, literal: n, readOnly: r, ...a } = e, l =
|
|
138
|
-
return
|
|
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
139
|
const e = u.current;
|
|
140
|
-
return !e || !e.error && (e.dirty ? (e.commit(), !
|
|
141
|
-
}),
|
|
140
|
+
return !e || !e.error && (e.dirty ? (e.commit(), !Vo(jo(c.current, d, i, n), n)) : !Vo(t, n));
|
|
141
|
+
}), Wt(s, {
|
|
142
142
|
size: "small",
|
|
143
143
|
home: d.home,
|
|
144
|
-
value:
|
|
144
|
+
value: zo(t, d, i, n),
|
|
145
145
|
changeOn: "done",
|
|
146
146
|
apiRef: u,
|
|
147
147
|
onChangeText: (e) => {
|
|
148
|
-
|
|
148
|
+
c.current = e;
|
|
149
149
|
},
|
|
150
150
|
onDone: (e, t) => {
|
|
151
151
|
"accept" === t.reason && (() => {
|
|
152
|
-
const e =
|
|
152
|
+
const e = jo(c.current, d, i, n);
|
|
153
153
|
o(e);
|
|
154
154
|
})();
|
|
155
155
|
},
|
|
156
|
-
validationError:
|
|
156
|
+
validationError: Vo(t, n) ? To("condition.invalidDateTime") : null,
|
|
157
157
|
placeholder: l("condition.enterValueOrFormula"),
|
|
158
158
|
disabled: r,
|
|
159
159
|
fullWidth: !0,
|
|
@@ -165,18 +165,18 @@ var Wo = nt(null), Eo = (e) => {
|
|
|
165
165
|
...a
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
|
-
|
|
169
|
-
var
|
|
168
|
+
$o.displayName = "ScalarOption";
|
|
169
|
+
var Ko = (e, t, o) => {
|
|
170
170
|
if (null == e) return "";
|
|
171
171
|
if (e.isIFormula) return "=" + o.display(e);
|
|
172
172
|
if (Array.isArray(e)) return e.map((e) => String(e ?? "")).join(t);
|
|
173
|
-
const n =
|
|
173
|
+
const n = j.parseListLiteral(e);
|
|
174
174
|
return n ? n.join(t) : e.length > 0 ? "=" + e : "";
|
|
175
|
-
},
|
|
176
|
-
const { option: t, onOptionChange: o, readOnly: n, sx: r, ...a } = e, l =
|
|
177
|
-
|
|
178
|
-
if (!d?.getListItemsAt || !
|
|
179
|
-
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);
|
|
180
180
|
d.getListItemsAt(t, o).then((t) => {
|
|
181
181
|
e === f.current && y(t);
|
|
182
182
|
}, () => {
|
|
@@ -184,27 +184,27 @@ var $o = (e, t, o) => {
|
|
|
184
184
|
});
|
|
185
185
|
}, [
|
|
186
186
|
d,
|
|
187
|
-
|
|
187
|
+
i,
|
|
188
188
|
g
|
|
189
189
|
]);
|
|
190
|
-
const [b, x] =
|
|
191
|
-
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, {
|
|
192
192
|
sx: {
|
|
193
193
|
display: "flex",
|
|
194
194
|
flexDirection: "column",
|
|
195
195
|
mt: .75,
|
|
196
196
|
...r
|
|
197
197
|
},
|
|
198
|
-
children: [
|
|
198
|
+
children: [Et(Vt, {
|
|
199
199
|
sx: {
|
|
200
200
|
display: "flex",
|
|
201
201
|
alignItems: "stretch",
|
|
202
202
|
gap: 1
|
|
203
203
|
},
|
|
204
|
-
children: [
|
|
204
|
+
children: [Wt(s, {
|
|
205
205
|
size: "small",
|
|
206
206
|
home: c.home,
|
|
207
|
-
value:
|
|
207
|
+
value: Ko(g, p, c),
|
|
208
208
|
onChangeText: (e) => {
|
|
209
209
|
const n = ((e, t, o) => {
|
|
210
210
|
if (0 === e.length) return { items: "" };
|
|
@@ -215,10 +215,10 @@ var $o = (e, t, o) => {
|
|
|
215
215
|
let t = e;
|
|
216
216
|
for (; "paren" === t?.type && 1 === t.inputs?.length;) t = t.inputs[0];
|
|
217
217
|
return "list" === t?.type || "paren" === t?.type && (t.inputs?.length ?? 0) > 1;
|
|
218
|
-
})(
|
|
218
|
+
})(K.parse(t.getExpression())) ? { error: To("condition.listSourceOneRange") } : { items: t.getExpression() };
|
|
219
219
|
}
|
|
220
|
-
const n =
|
|
221
|
-
return null === n ? { error:
|
|
220
|
+
const n = j.formatListLiteral(e.split(t));
|
|
221
|
+
return null === n ? { error: To("condition.listItemHasComma") } : { items: n };
|
|
222
222
|
})(e, p, c);
|
|
223
223
|
m(n.error ?? null), void 0 !== n.items && o({
|
|
224
224
|
...t,
|
|
@@ -237,19 +237,19 @@ var $o = (e, t, o) => {
|
|
|
237
237
|
showError: !1,
|
|
238
238
|
helperText: null,
|
|
239
239
|
...a
|
|
240
|
-
}), null !== h &&
|
|
240
|
+
}), null !== h && Et(At, { children: [Wt(zt, {
|
|
241
241
|
size: "small",
|
|
242
242
|
variant: "outlined",
|
|
243
243
|
color: "inherit",
|
|
244
244
|
onClick: (e) => x(e.currentTarget),
|
|
245
|
-
endIcon:
|
|
245
|
+
endIcon: Wt(Re, { iconKey: "ExpandMore" }),
|
|
246
246
|
sx: {
|
|
247
247
|
flexShrink: 0,
|
|
248
248
|
width: "8.5em",
|
|
249
249
|
justifyContent: "space-between",
|
|
250
250
|
textTransform: "none"
|
|
251
251
|
},
|
|
252
|
-
children:
|
|
252
|
+
children: Wt(Vt, {
|
|
253
253
|
component: "span",
|
|
254
254
|
sx: {
|
|
255
255
|
overflow: "hidden",
|
|
@@ -258,7 +258,7 @@ var $o = (e, t, o) => {
|
|
|
258
258
|
},
|
|
259
259
|
children: l("condition.listPreview", { count: h.length })
|
|
260
260
|
})
|
|
261
|
-
}),
|
|
261
|
+
}), Wt(no, {
|
|
262
262
|
open: !!b,
|
|
263
263
|
anchorEl: b,
|
|
264
264
|
onClose: () => x(null),
|
|
@@ -271,29 +271,29 @@ var $o = (e, t, o) => {
|
|
|
271
271
|
vertical: "top",
|
|
272
272
|
horizontal: "right"
|
|
273
273
|
},
|
|
274
|
-
children:
|
|
274
|
+
children: Wt(le, {
|
|
275
275
|
items: h,
|
|
276
276
|
minWidth: b?.getBoundingClientRect().width,
|
|
277
277
|
style: C,
|
|
278
278
|
onChoose: () => x(null)
|
|
279
279
|
})
|
|
280
280
|
})] })]
|
|
281
|
-
}), S &&
|
|
281
|
+
}), S && Wt(Yt, {
|
|
282
282
|
error: !0,
|
|
283
283
|
children: l(S)
|
|
284
284
|
})]
|
|
285
285
|
});
|
|
286
286
|
});
|
|
287
|
-
|
|
288
|
-
var
|
|
289
|
-
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 ?? "";
|
|
290
290
|
let d = { backgroundColor: "background.paper" };
|
|
291
291
|
return r && (d = {
|
|
292
292
|
...d,
|
|
293
293
|
"& .MuiSelect-icon": { display: "none" },
|
|
294
294
|
"& .MuiOutlinedInput-notchedOutline": { borderColor: "action.disabled" }
|
|
295
|
-
}),
|
|
296
|
-
className:
|
|
295
|
+
}), Et(Vt, {
|
|
296
|
+
className: Do(n, Ho.option),
|
|
297
297
|
...a,
|
|
298
298
|
sx: {
|
|
299
299
|
display: "flex",
|
|
@@ -301,13 +301,13 @@ var _o = {}, Ho = lt((e) => {
|
|
|
301
301
|
gap: .25,
|
|
302
302
|
...a?.sx
|
|
303
303
|
},
|
|
304
|
-
children: [
|
|
304
|
+
children: [Wt(Gt, {
|
|
305
305
|
sx: { flex: .5 },
|
|
306
306
|
size: "small",
|
|
307
|
-
children:
|
|
307
|
+
children: Et(ro, {
|
|
308
308
|
value: i,
|
|
309
309
|
sx: d,
|
|
310
|
-
IconComponent: (e) =>
|
|
310
|
+
IconComponent: (e) => Wt(Re, {
|
|
311
311
|
iconKey: "ExpandMore",
|
|
312
312
|
...e
|
|
313
313
|
}),
|
|
@@ -316,15 +316,15 @@ var _o = {}, Ho = lt((e) => {
|
|
|
316
316
|
...t,
|
|
317
317
|
type: e.target.value
|
|
318
318
|
}),
|
|
319
|
-
children: [
|
|
320
|
-
value:
|
|
319
|
+
children: [Wt(eo, {
|
|
320
|
+
value: _.AverageType.Above,
|
|
321
321
|
children: l("condition.above")
|
|
322
|
-
}),
|
|
323
|
-
value:
|
|
322
|
+
}), Wt(eo, {
|
|
323
|
+
value: _.AverageType.Below,
|
|
324
324
|
children: l("condition.below")
|
|
325
325
|
})]
|
|
326
326
|
})
|
|
327
|
-
}),
|
|
327
|
+
}), Wt(so, {
|
|
328
328
|
size: "small",
|
|
329
329
|
placeholder: l("condition.stdDevs"),
|
|
330
330
|
value: s,
|
|
@@ -339,12 +339,12 @@ var _o = {}, Ho = lt((e) => {
|
|
|
339
339
|
})]
|
|
340
340
|
});
|
|
341
341
|
});
|
|
342
|
-
|
|
343
|
-
var
|
|
344
|
-
let t =
|
|
345
|
-
return t || (t = "__ci_" + ++
|
|
346
|
-
},
|
|
347
|
-
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;
|
|
348
348
|
return r.filter((t) => {
|
|
349
349
|
if (n.includes(t.getName())) return !1;
|
|
350
350
|
const o = t.acceptsList?.();
|
|
@@ -354,25 +354,25 @@ var Uo = 0, qo = /* @__PURE__ */ new WeakMap(), Go = (e) => {
|
|
|
354
354
|
const r = t.getAcceptsTypes?.();
|
|
355
355
|
return !r || r.includes(a);
|
|
356
356
|
}).sort((e, t) => (e.getTitle?.() ?? "").localeCompare(t.getTitle?.() ?? "", o));
|
|
357
|
-
},
|
|
357
|
+
}, Xo = (e, t, o, n) => {
|
|
358
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 = [];
|
|
359
|
-
return a.length > 0 && (i.push(
|
|
359
|
+
return a.length > 0 && (i.push(Wt(Zt, {
|
|
360
360
|
disableSticky: !0,
|
|
361
|
-
sx:
|
|
361
|
+
sx: en,
|
|
362
362
|
children: o("condition.groupBasic")
|
|
363
|
-
}, "__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, {
|
|
364
364
|
disableSticky: !0,
|
|
365
|
-
sx:
|
|
365
|
+
sx: en,
|
|
366
366
|
children: o("condition.groupCombine")
|
|
367
367
|
}, "__header:combinator")), l.forEach((e) => i.push(t(e)))), i;
|
|
368
|
-
},
|
|
368
|
+
}, Zo = (e, t, o = null) => {
|
|
369
369
|
if (!e.isCombinator?.()) return e.createDefaultParam?.(o ?? void 0) ?? null;
|
|
370
370
|
const n = t.find((e) => !e.isCombinator?.()) ?? null, r = n ? {
|
|
371
371
|
operator: n.getName(),
|
|
372
372
|
param: n.createDefaultParam?.(o ?? void 0) ?? null
|
|
373
373
|
} : null;
|
|
374
374
|
return "not" === e.getName() ? r : r ? [r] : [];
|
|
375
|
-
},
|
|
375
|
+
}, en = {
|
|
376
376
|
userSelect: "none",
|
|
377
377
|
lineHeight: "2",
|
|
378
378
|
fontSize: "0.75rem",
|
|
@@ -380,8 +380,8 @@ var Uo = 0, qo = /* @__PURE__ */ new WeakMap(), Go = (e) => {
|
|
|
380
380
|
color: "text.secondary",
|
|
381
381
|
paddingLeft: 1,
|
|
382
382
|
paddingRight: 1
|
|
383
|
-
},
|
|
384
|
-
var
|
|
383
|
+
}, tn = { pl: 2 };
|
|
384
|
+
var on = it((e) => {
|
|
385
385
|
const { option: t, onOptionChange: o, readOnly: n, ...r } = e, a = function(e, t) {
|
|
386
386
|
const o = (e) => new Intl.DateTimeFormat(t, { month: "long" }).format(new Date(2e3, e, 1));
|
|
387
387
|
return [
|
|
@@ -389,15 +389,15 @@ var tn = lt((e) => {
|
|
|
389
389
|
header: e("condition.period.day"),
|
|
390
390
|
options: [
|
|
391
391
|
{
|
|
392
|
-
value:
|
|
392
|
+
value: _.TimePeriodType.Today,
|
|
393
393
|
label: e("condition.period.today")
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
|
-
value:
|
|
396
|
+
value: _.TimePeriodType.Yesterday,
|
|
397
397
|
label: e("condition.period.yesterday")
|
|
398
398
|
},
|
|
399
399
|
{
|
|
400
|
-
value:
|
|
400
|
+
value: _.TimePeriodType.Tomorrow,
|
|
401
401
|
label: e("condition.period.tomorrow")
|
|
402
402
|
}
|
|
403
403
|
]
|
|
@@ -406,15 +406,15 @@ var tn = lt((e) => {
|
|
|
406
406
|
header: e("condition.period.week"),
|
|
407
407
|
options: [
|
|
408
408
|
{
|
|
409
|
-
value:
|
|
409
|
+
value: _.TimePeriodType.ThisWeek,
|
|
410
410
|
label: e("condition.period.thisWeek")
|
|
411
411
|
},
|
|
412
412
|
{
|
|
413
|
-
value:
|
|
413
|
+
value: _.TimePeriodType.LastWeek,
|
|
414
414
|
label: e("condition.period.lastWeek")
|
|
415
415
|
},
|
|
416
416
|
{
|
|
417
|
-
value:
|
|
417
|
+
value: _.TimePeriodType.NextWeek,
|
|
418
418
|
label: e("condition.period.nextWeek")
|
|
419
419
|
}
|
|
420
420
|
]
|
|
@@ -423,15 +423,15 @@ var tn = lt((e) => {
|
|
|
423
423
|
header: e("condition.period.month"),
|
|
424
424
|
options: [
|
|
425
425
|
{
|
|
426
|
-
value:
|
|
426
|
+
value: _.TimePeriodType.ThisMonth,
|
|
427
427
|
label: e("condition.period.thisMonth")
|
|
428
428
|
},
|
|
429
429
|
{
|
|
430
|
-
value:
|
|
430
|
+
value: _.TimePeriodType.LastMonth,
|
|
431
431
|
label: e("condition.period.lastMonth")
|
|
432
432
|
},
|
|
433
433
|
{
|
|
434
|
-
value:
|
|
434
|
+
value: _.TimePeriodType.NextMonth,
|
|
435
435
|
label: e("condition.period.nextMonth")
|
|
436
436
|
}
|
|
437
437
|
]
|
|
@@ -439,10 +439,10 @@ var tn = lt((e) => {
|
|
|
439
439
|
{
|
|
440
440
|
header: e("condition.period.year"),
|
|
441
441
|
options: [{
|
|
442
|
-
value:
|
|
442
|
+
value: _.TimePeriodType.YearToDate,
|
|
443
443
|
label: e("condition.period.yearToDate")
|
|
444
444
|
}, {
|
|
445
|
-
value:
|
|
445
|
+
value: _.TimePeriodType.LastYear,
|
|
446
446
|
label: e("condition.period.lastYear")
|
|
447
447
|
}]
|
|
448
448
|
},
|
|
@@ -450,51 +450,51 @@ var tn = lt((e) => {
|
|
|
450
450
|
header: e("condition.period.byMonth"),
|
|
451
451
|
options: [
|
|
452
452
|
{
|
|
453
|
-
value:
|
|
453
|
+
value: _.TimePeriodType.M1,
|
|
454
454
|
label: o(0)
|
|
455
455
|
},
|
|
456
456
|
{
|
|
457
|
-
value:
|
|
457
|
+
value: _.TimePeriodType.M2,
|
|
458
458
|
label: o(1)
|
|
459
459
|
},
|
|
460
460
|
{
|
|
461
|
-
value:
|
|
461
|
+
value: _.TimePeriodType.M3,
|
|
462
462
|
label: o(2)
|
|
463
463
|
},
|
|
464
464
|
{
|
|
465
|
-
value:
|
|
465
|
+
value: _.TimePeriodType.M4,
|
|
466
466
|
label: o(3)
|
|
467
467
|
},
|
|
468
468
|
{
|
|
469
|
-
value:
|
|
469
|
+
value: _.TimePeriodType.M5,
|
|
470
470
|
label: o(4)
|
|
471
471
|
},
|
|
472
472
|
{
|
|
473
|
-
value:
|
|
473
|
+
value: _.TimePeriodType.M6,
|
|
474
474
|
label: o(5)
|
|
475
475
|
},
|
|
476
476
|
{
|
|
477
|
-
value:
|
|
477
|
+
value: _.TimePeriodType.M7,
|
|
478
478
|
label: o(6)
|
|
479
479
|
},
|
|
480
480
|
{
|
|
481
|
-
value:
|
|
481
|
+
value: _.TimePeriodType.M8,
|
|
482
482
|
label: o(7)
|
|
483
483
|
},
|
|
484
484
|
{
|
|
485
|
-
value:
|
|
485
|
+
value: _.TimePeriodType.M9,
|
|
486
486
|
label: o(8)
|
|
487
487
|
},
|
|
488
488
|
{
|
|
489
|
-
value:
|
|
489
|
+
value: _.TimePeriodType.M10,
|
|
490
490
|
label: o(9)
|
|
491
491
|
},
|
|
492
492
|
{
|
|
493
|
-
value:
|
|
493
|
+
value: _.TimePeriodType.M11,
|
|
494
494
|
label: o(10)
|
|
495
495
|
},
|
|
496
496
|
{
|
|
497
|
-
value:
|
|
497
|
+
value: _.TimePeriodType.M12,
|
|
498
498
|
label: o(11)
|
|
499
499
|
}
|
|
500
500
|
]
|
|
@@ -503,38 +503,38 @@ var tn = lt((e) => {
|
|
|
503
503
|
header: e("condition.period.byQuarter"),
|
|
504
504
|
options: [
|
|
505
505
|
{
|
|
506
|
-
value:
|
|
506
|
+
value: _.TimePeriodType.ThisQuarter,
|
|
507
507
|
label: e("condition.period.thisQuarter")
|
|
508
508
|
},
|
|
509
509
|
{
|
|
510
|
-
value:
|
|
510
|
+
value: _.TimePeriodType.LastQuarter,
|
|
511
511
|
label: e("condition.period.lastQuarter")
|
|
512
512
|
},
|
|
513
513
|
{
|
|
514
|
-
value:
|
|
514
|
+
value: _.TimePeriodType.NextQuarter,
|
|
515
515
|
label: e("condition.period.nextQuarter")
|
|
516
516
|
},
|
|
517
517
|
{
|
|
518
|
-
value:
|
|
518
|
+
value: _.TimePeriodType.Q1,
|
|
519
519
|
label: e("condition.period.q1")
|
|
520
520
|
},
|
|
521
521
|
{
|
|
522
|
-
value:
|
|
522
|
+
value: _.TimePeriodType.Q2,
|
|
523
523
|
label: e("condition.period.q2")
|
|
524
524
|
},
|
|
525
525
|
{
|
|
526
|
-
value:
|
|
526
|
+
value: _.TimePeriodType.Q3,
|
|
527
527
|
label: e("condition.period.q3")
|
|
528
528
|
},
|
|
529
529
|
{
|
|
530
|
-
value:
|
|
530
|
+
value: _.TimePeriodType.Q4,
|
|
531
531
|
label: e("condition.period.q4")
|
|
532
532
|
}
|
|
533
533
|
]
|
|
534
534
|
}
|
|
535
535
|
];
|
|
536
|
-
}(
|
|
537
|
-
return
|
|
536
|
+
}(ot(), Je()), l = t?.type ?? _.TimePeriodType.Today;
|
|
537
|
+
return Wt(Vt, {
|
|
538
538
|
...r,
|
|
539
539
|
sx: {
|
|
540
540
|
display: "flex",
|
|
@@ -542,12 +542,12 @@ var tn = lt((e) => {
|
|
|
542
542
|
gap: 2,
|
|
543
543
|
...r?.sx
|
|
544
544
|
},
|
|
545
|
-
children:
|
|
545
|
+
children: Wt(Gt, {
|
|
546
546
|
size: "small",
|
|
547
|
-
children:
|
|
547
|
+
children: Wt(ro, {
|
|
548
548
|
value: l,
|
|
549
549
|
sx: { backgroundColor: "background.paper" },
|
|
550
|
-
IconComponent: (e) =>
|
|
550
|
+
IconComponent: (e) => Wt(Re, {
|
|
551
551
|
iconKey: "ExpandMore",
|
|
552
552
|
...e
|
|
553
553
|
}),
|
|
@@ -558,11 +558,11 @@ var tn = lt((e) => {
|
|
|
558
558
|
disabled: n,
|
|
559
559
|
children: a.map((e, t) => {
|
|
560
560
|
const o = [];
|
|
561
|
-
return t > 0 && o.push(
|
|
562
|
-
sx: Zo,
|
|
563
|
-
children: e.header
|
|
564
|
-
}, `header-${t}`)), e.options.map((e) => o.push(At(Zt, {
|
|
561
|
+
return t > 0 && o.push(Wt(qt, {}, `divider-${t}`)), o.push(Wt(Zt, {
|
|
565
562
|
sx: en,
|
|
563
|
+
children: e.header
|
|
564
|
+
}, `header-${t}`)), e.options.map((e) => o.push(Wt(eo, {
|
|
565
|
+
sx: tn,
|
|
566
566
|
value: e.value,
|
|
567
567
|
children: e.label
|
|
568
568
|
}, e.value))), o;
|
|
@@ -571,10 +571,10 @@ var tn = lt((e) => {
|
|
|
571
571
|
})
|
|
572
572
|
});
|
|
573
573
|
});
|
|
574
|
-
|
|
575
|
-
var
|
|
576
|
-
const { option: t, onOptionChange: o, readOnly: n, ...r } = e, a =
|
|
577
|
-
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, {
|
|
578
578
|
...r,
|
|
579
579
|
sx: {
|
|
580
580
|
display: "flex",
|
|
@@ -583,13 +583,13 @@ var on = lt((e) => {
|
|
|
583
583
|
...r?.sx
|
|
584
584
|
},
|
|
585
585
|
children: [
|
|
586
|
-
|
|
586
|
+
Wt(Gt, {
|
|
587
587
|
size: "small",
|
|
588
588
|
sx: { flex: 1 },
|
|
589
|
-
children:
|
|
589
|
+
children: Et(ro, {
|
|
590
590
|
value: l ? "top" : "bottom",
|
|
591
591
|
sx: { backgroundColor: "background.paper" },
|
|
592
|
-
IconComponent: (e) =>
|
|
592
|
+
IconComponent: (e) => Wt(Re, {
|
|
593
593
|
iconKey: "ExpandMore",
|
|
594
594
|
...e
|
|
595
595
|
}),
|
|
@@ -598,16 +598,16 @@ var on = lt((e) => {
|
|
|
598
598
|
top: "top" === e.target.value
|
|
599
599
|
}),
|
|
600
600
|
disabled: n,
|
|
601
|
-
children: [
|
|
601
|
+
children: [Wt(eo, {
|
|
602
602
|
value: "top",
|
|
603
603
|
children: a("condition.top")
|
|
604
|
-
}),
|
|
604
|
+
}), Wt(eo, {
|
|
605
605
|
value: "bottom",
|
|
606
606
|
children: a("condition.bottom")
|
|
607
607
|
})]
|
|
608
608
|
})
|
|
609
609
|
}),
|
|
610
|
-
|
|
610
|
+
Wt(so, {
|
|
611
611
|
size: "small",
|
|
612
612
|
placeholder: "10",
|
|
613
613
|
value: i,
|
|
@@ -623,13 +623,13 @@ var on = lt((e) => {
|
|
|
623
623
|
slotProps: { input: { sx: { backgroundColor: "background.paper" } } },
|
|
624
624
|
sx: { flex: .6 }
|
|
625
625
|
}),
|
|
626
|
-
|
|
626
|
+
Wt(Gt, {
|
|
627
627
|
size: "small",
|
|
628
628
|
sx: { flex: 1 },
|
|
629
|
-
children:
|
|
629
|
+
children: Et(ro, {
|
|
630
630
|
value: s ? "percent" : "items",
|
|
631
631
|
sx: { backgroundColor: "background.paper" },
|
|
632
|
-
IconComponent: (e) =>
|
|
632
|
+
IconComponent: (e) => Wt(Re, {
|
|
633
633
|
iconKey: "ExpandMore",
|
|
634
634
|
...e
|
|
635
635
|
}),
|
|
@@ -638,10 +638,10 @@ var on = lt((e) => {
|
|
|
638
638
|
percent: "percent" === e.target.value
|
|
639
639
|
}),
|
|
640
640
|
disabled: n,
|
|
641
|
-
children: [
|
|
641
|
+
children: [Wt(eo, {
|
|
642
642
|
value: "items",
|
|
643
643
|
children: a("condition.items")
|
|
644
|
-
}),
|
|
644
|
+
}), Wt(eo, {
|
|
645
645
|
value: "percent",
|
|
646
646
|
children: a("condition.percent")
|
|
647
647
|
})]
|
|
@@ -650,17 +650,17 @@ var on = lt((e) => {
|
|
|
650
650
|
]
|
|
651
651
|
});
|
|
652
652
|
});
|
|
653
|
-
|
|
654
|
-
var
|
|
655
|
-
const { option: t, onOptionChange: o, selector: n, readOnly: r, ...a } = e, l =
|
|
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
656
|
switch (e?.getName()) {
|
|
657
|
-
case
|
|
658
|
-
case
|
|
659
|
-
case
|
|
657
|
+
case _.BuiltInSelectorNames.Date: return "date";
|
|
658
|
+
case _.BuiltInSelectorNames.Time: return "time";
|
|
659
|
+
case _.BuiltInSelectorNames.DateTime: return "dateTime";
|
|
660
660
|
default: return;
|
|
661
661
|
}
|
|
662
662
|
})(n);
|
|
663
|
-
return
|
|
663
|
+
return Et(Vt, {
|
|
664
664
|
...a,
|
|
665
665
|
sx: {
|
|
666
666
|
display: "flex",
|
|
@@ -668,7 +668,7 @@ var nn = lt((e) => {
|
|
|
668
668
|
gap: .25,
|
|
669
669
|
...a?.sx
|
|
670
670
|
},
|
|
671
|
-
children: [
|
|
671
|
+
children: [Wt($o, {
|
|
672
672
|
option: t?.from ?? null,
|
|
673
673
|
literal: i,
|
|
674
674
|
placeholder: l("condition.from"),
|
|
@@ -683,7 +683,7 @@ var nn = lt((e) => {
|
|
|
683
683
|
flex: .6,
|
|
684
684
|
minWidth: 0
|
|
685
685
|
}
|
|
686
|
-
}),
|
|
686
|
+
}), Wt($o, {
|
|
687
687
|
option: t?.to ?? null,
|
|
688
688
|
literal: i,
|
|
689
689
|
placeholder: l("condition.to"),
|
|
@@ -701,13 +701,13 @@ var nn = lt((e) => {
|
|
|
701
701
|
})]
|
|
702
702
|
});
|
|
703
703
|
});
|
|
704
|
-
|
|
705
|
-
var
|
|
706
|
-
const { option: t, onOptionChange: o, readOnly: n, ...r } = e, a =
|
|
707
|
-
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, {
|
|
708
708
|
size: "small",
|
|
709
709
|
home: l.home,
|
|
710
|
-
value:
|
|
710
|
+
value: i,
|
|
711
711
|
onChangeText: (e) => o(e.trim().length > 0 ? l.compile(e) : e),
|
|
712
712
|
placeholder: a("condition.enterFormula"),
|
|
713
713
|
disabled: n,
|
|
@@ -719,11 +719,11 @@ var rn = lt((e) => {
|
|
|
719
719
|
...r
|
|
720
720
|
});
|
|
721
721
|
});
|
|
722
|
-
|
|
723
|
-
var
|
|
724
|
-
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) => {
|
|
725
725
|
const t = e.getName();
|
|
726
|
-
return
|
|
726
|
+
return Wt(eo, {
|
|
727
727
|
value: t,
|
|
728
728
|
children: e.getTitle?.() ?? e.getName()
|
|
729
729
|
}, t);
|
|
@@ -733,14 +733,14 @@ var an = lt((e) => {
|
|
|
733
733
|
...p,
|
|
734
734
|
"& .MuiSelect-icon": { display: "none" },
|
|
735
735
|
"& .MuiOutlinedInput-notchedOutline": { borderColor: "action.disabled" }
|
|
736
|
-
}),
|
|
736
|
+
}), Et(Gt, {
|
|
737
737
|
size: "small",
|
|
738
738
|
...i,
|
|
739
|
-
children: [
|
|
739
|
+
children: [Wt(Xt, { children: d }), Et(ro, {
|
|
740
740
|
value: t?.getName() ?? "null",
|
|
741
741
|
label: d,
|
|
742
742
|
readOnly: l,
|
|
743
|
-
IconComponent: (e) =>
|
|
743
|
+
IconComponent: (e) => Wt(Re, {
|
|
744
744
|
iconKey: "ExpandMore",
|
|
745
745
|
...e
|
|
746
746
|
}),
|
|
@@ -749,32 +749,32 @@ var an = lt((e) => {
|
|
|
749
749
|
n(r);
|
|
750
750
|
},
|
|
751
751
|
sx: p,
|
|
752
|
-
children: [a &&
|
|
752
|
+
children: [a && Wt(eo, {
|
|
753
753
|
value: "null",
|
|
754
754
|
children: s("condition.anySelector")
|
|
755
755
|
}), c]
|
|
756
756
|
})]
|
|
757
757
|
});
|
|
758
758
|
});
|
|
759
|
-
|
|
760
|
-
var
|
|
761
|
-
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();
|
|
762
762
|
o.forEach((e) => {
|
|
763
763
|
c.set(e.getName(), e);
|
|
764
764
|
});
|
|
765
|
-
const p =
|
|
765
|
+
const p = Xo(o, (e) => Wt(eo, {
|
|
766
766
|
value: e.getName(),
|
|
767
|
-
sx:
|
|
767
|
+
sx: tn,
|
|
768
768
|
children: e.getTitle?.()
|
|
769
769
|
}, e.getName()), i, s);
|
|
770
|
-
return
|
|
770
|
+
return Et(Gt, {
|
|
771
771
|
size: "small",
|
|
772
772
|
...l,
|
|
773
|
-
children: [
|
|
773
|
+
children: [Wt(Xt, { children: d }), Wt(ro, {
|
|
774
774
|
value: t?.getName() ?? "null",
|
|
775
775
|
label: d,
|
|
776
776
|
readOnly: a,
|
|
777
|
-
IconComponent: (e) =>
|
|
777
|
+
IconComponent: (e) => Wt(Re, {
|
|
778
778
|
iconKey: "ExpandMore",
|
|
779
779
|
...e
|
|
780
780
|
}),
|
|
@@ -790,23 +790,23 @@ var ln = lt((e) => {
|
|
|
790
790
|
})]
|
|
791
791
|
});
|
|
792
792
|
});
|
|
793
|
-
|
|
794
|
-
var
|
|
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 =
|
|
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();
|
|
796
796
|
c ?? m("condition.operatorTitle");
|
|
797
|
-
const h = o ||
|
|
798
|
-
return y.current = d,
|
|
797
|
+
const h = o || Wt(Re, { iconKey: "Add" }), y = ut(d);
|
|
798
|
+
return y.current = d, Wt(xt, {
|
|
799
799
|
ref: t,
|
|
800
|
-
createPopupPanel:
|
|
801
|
-
const { closeFloatAll: t } = e, o =
|
|
802
|
-
sx:
|
|
800
|
+
createPopupPanel: st((e) => {
|
|
801
|
+
const { closeFloatAll: t } = e, o = Xo(s, (e) => Wt(eo, {
|
|
802
|
+
sx: tn,
|
|
803
803
|
value: e.getName(),
|
|
804
804
|
onClick: () => {
|
|
805
805
|
t?.(), y.current(e);
|
|
806
806
|
},
|
|
807
807
|
children: e.getTitle?.()
|
|
808
808
|
}, e.getName()), m, g);
|
|
809
|
-
return
|
|
809
|
+
return Wt("div", {
|
|
810
810
|
style: {
|
|
811
811
|
minWidth: 200,
|
|
812
812
|
paddingTop: "8px",
|
|
@@ -815,9 +815,9 @@ var sn = lt(rt((e, t) => {
|
|
|
815
815
|
},
|
|
816
816
|
...l,
|
|
817
817
|
onKeyDown: (e) => {
|
|
818
|
-
e.which ===
|
|
818
|
+
e.which === Le.Enter && t?.();
|
|
819
819
|
},
|
|
820
|
-
children:
|
|
820
|
+
children: Wt(to, {
|
|
821
821
|
disablePadding: !0,
|
|
822
822
|
children: o
|
|
823
823
|
})
|
|
@@ -833,18 +833,18 @@ var sn = lt(rt((e, t) => {
|
|
|
833
833
|
icon: h,
|
|
834
834
|
...u
|
|
835
835
|
});
|
|
836
|
-
})),
|
|
837
|
-
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) => {
|
|
838
838
|
const r = o.slice(), a = {
|
|
839
839
|
operator: t.operator,
|
|
840
840
|
param: t.param
|
|
841
841
|
};
|
|
842
842
|
((e, t) => {
|
|
843
|
-
const o =
|
|
844
|
-
o &&
|
|
843
|
+
const o = Go.get(e);
|
|
844
|
+
o && Go.set(t, o);
|
|
845
845
|
})(o[e], a), r[e] = a, n(r);
|
|
846
846
|
}, u = d ? s("condition.not") : c;
|
|
847
|
-
return
|
|
847
|
+
return Wt(Vt, {
|
|
848
848
|
sx: {
|
|
849
849
|
display: "flex",
|
|
850
850
|
flexDirection: "column",
|
|
@@ -854,7 +854,7 @@ var sn = lt(rt((e, t) => {
|
|
|
854
854
|
borderColor: "divider"
|
|
855
855
|
},
|
|
856
856
|
...i,
|
|
857
|
-
children: o.map((e, t) =>
|
|
857
|
+
children: o.map((e, t) => Wt(nt.Fragment, { children: Wt(fn, {
|
|
858
858
|
operatorTitle: t > 0 ? u ?? "" : "",
|
|
859
859
|
operatorParam: e,
|
|
860
860
|
onOperatorParamChange: (e) => p(t, e),
|
|
@@ -866,13 +866,13 @@ var sn = lt(rt((e, t) => {
|
|
|
866
866
|
selector: a,
|
|
867
867
|
readOnly: l,
|
|
868
868
|
required: d
|
|
869
|
-
}) },
|
|
869
|
+
}) }, Qo(e)))
|
|
870
870
|
});
|
|
871
871
|
});
|
|
872
|
-
|
|
873
|
-
var
|
|
874
|
-
const { option: t, onOptionChange: o, readOnly: n } = e, r =
|
|
875
|
-
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, {
|
|
876
876
|
exclusive: !0,
|
|
877
877
|
size: "small",
|
|
878
878
|
value: t ?? !0,
|
|
@@ -885,34 +885,34 @@ var cn = lt((e) => {
|
|
|
885
885
|
backgroundColor: "background.paper"
|
|
886
886
|
},
|
|
887
887
|
disabled: n,
|
|
888
|
-
children: [
|
|
888
|
+
children: [Wt(po, {
|
|
889
889
|
value: !0,
|
|
890
890
|
children: r("condition.true")
|
|
891
|
-
}),
|
|
891
|
+
}), Wt(po, {
|
|
892
892
|
value: !1,
|
|
893
893
|
children: r("condition.false")
|
|
894
894
|
})]
|
|
895
895
|
});
|
|
896
896
|
});
|
|
897
|
-
function
|
|
898
|
-
if (!e) return
|
|
897
|
+
function un(e, t) {
|
|
898
|
+
if (!e) return mn(t);
|
|
899
899
|
const o = /* @__PURE__ */ new Date(`${e}T${t || "00:00"}`);
|
|
900
900
|
return isNaN(o.getTime()) ? null : o;
|
|
901
901
|
}
|
|
902
|
-
function
|
|
903
|
-
return e ?
|
|
902
|
+
function mn(e) {
|
|
903
|
+
return e ? un("1970-01-01", e) : null;
|
|
904
904
|
}
|
|
905
|
-
|
|
906
|
-
var
|
|
907
|
-
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) => {
|
|
908
908
|
if (!c || null === e) return null;
|
|
909
909
|
const t = c.createCell({ value: e }), o = t.getValue();
|
|
910
|
-
return t.getType() !==
|
|
911
|
-
}, [c]), u =
|
|
910
|
+
return t.getType() !== Y.Number ? null : o;
|
|
911
|
+
}, [c]), u = st((e) => c ? c.createCell({
|
|
912
912
|
value: e,
|
|
913
913
|
style: { numberFormat: "Short DateTime" }
|
|
914
914
|
}).getDate() : null, [c]);
|
|
915
|
-
if (n && ("string" == typeof t || t?.isIFormula)) return
|
|
915
|
+
if (n && ("string" == typeof t || t?.isIFormula)) return Wt($o, {
|
|
916
916
|
option: t,
|
|
917
917
|
onOptionChange: (e) => o(e),
|
|
918
918
|
readOnly: r,
|
|
@@ -923,7 +923,7 @@ var mn = lt((e) => {
|
|
|
923
923
|
const y = function(e) {
|
|
924
924
|
return !e || isNaN(e.getTime()) ? "" : `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
|
|
925
925
|
}(m);
|
|
926
|
-
return
|
|
926
|
+
return Et(Vt, {
|
|
927
927
|
...l,
|
|
928
928
|
sx: {
|
|
929
929
|
display: "flex",
|
|
@@ -931,22 +931,22 @@ var mn = lt((e) => {
|
|
|
931
931
|
gap: .5,
|
|
932
932
|
...l?.sx
|
|
933
933
|
},
|
|
934
|
-
children: [s &&
|
|
934
|
+
children: [s && Wt(Ao, {
|
|
935
935
|
option: g,
|
|
936
936
|
type: "date",
|
|
937
937
|
placeholder: i("condition.enterDate"),
|
|
938
938
|
onOptionChange: (e) => {
|
|
939
|
-
const t = p(
|
|
939
|
+
const t = p(un(e, y));
|
|
940
940
|
o(t);
|
|
941
941
|
},
|
|
942
942
|
sx: { flex: 1.5 },
|
|
943
943
|
readOnly: r
|
|
944
|
-
}), d &&
|
|
944
|
+
}), d && Wt(Ao, {
|
|
945
945
|
option: y,
|
|
946
946
|
type: "time",
|
|
947
947
|
placeholder: i("condition.enterTime"),
|
|
948
948
|
onOptionChange: (e) => {
|
|
949
|
-
const t = p("time" === a ?
|
|
949
|
+
const t = p("time" === a ? mn(e) : un(g, e));
|
|
950
950
|
o(t);
|
|
951
951
|
},
|
|
952
952
|
sx: { flex: 1 },
|
|
@@ -954,28 +954,28 @@ var mn = lt((e) => {
|
|
|
954
954
|
})]
|
|
955
955
|
});
|
|
956
956
|
});
|
|
957
|
-
|
|
958
|
-
var
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
]),
|
|
969
|
-
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, [
|
|
970
970
|
m,
|
|
971
971
|
h,
|
|
972
972
|
a
|
|
973
|
-
]), x = !h && "list" !== b && f > 360, v =
|
|
973
|
+
]), x = !h && "list" !== b && f > 360, v = qe((e) => {
|
|
974
974
|
o({
|
|
975
975
|
operator: u,
|
|
976
976
|
param: e
|
|
977
977
|
});
|
|
978
|
-
}, [o, u]), C =
|
|
978
|
+
}, [o, u]), C = pt(() => {
|
|
979
979
|
if (!m || h || !b) return null;
|
|
980
980
|
const e = {
|
|
981
981
|
sx: {
|
|
@@ -984,8 +984,8 @@ var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
|
984
984
|
},
|
|
985
985
|
option: g,
|
|
986
986
|
onOptionChange: v
|
|
987
|
-
}, t = !!u &&
|
|
988
|
-
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, {
|
|
989
989
|
...e,
|
|
990
990
|
placeholder: c("condition.enterWholeNumber"),
|
|
991
991
|
slotProps: { htmlInput: {
|
|
@@ -1002,21 +1002,21 @@ var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
|
1002
1002
|
/^-?\d+$/.test(e.clipboardData.getData("text")) || e.preventDefault();
|
|
1003
1003
|
}
|
|
1004
1004
|
} }
|
|
1005
|
-
}) : b ===
|
|
1005
|
+
}) : b === _.BuiltInSelectorNames.Text ? Wt(t ? $o : Ao, { ...e }) : b === _.BuiltInSelectorNames.DateTime ? Wt(gn, {
|
|
1006
1006
|
...e,
|
|
1007
1007
|
allowFormula: t
|
|
1008
|
-
}) : b ===
|
|
1008
|
+
}) : b === _.BuiltInSelectorNames.Date ? Wt(gn, {
|
|
1009
1009
|
...e,
|
|
1010
1010
|
type: "date",
|
|
1011
1011
|
allowFormula: t
|
|
1012
|
-
}) : b ===
|
|
1012
|
+
}) : b === _.BuiltInSelectorNames.Time ? Wt(gn, {
|
|
1013
1013
|
...e,
|
|
1014
1014
|
type: "time",
|
|
1015
1015
|
allowFormula: t
|
|
1016
|
-
}) : 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
1017
|
...e,
|
|
1018
1018
|
selector: a
|
|
1019
|
-
}) : b ===
|
|
1019
|
+
}) : b === _.BuiltInOperatorNames.Expression ? Wt(an, { ...e }) : null;
|
|
1020
1020
|
}, [
|
|
1021
1021
|
m,
|
|
1022
1022
|
h,
|
|
@@ -1024,21 +1024,21 @@ var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
|
1024
1024
|
g,
|
|
1025
1025
|
a,
|
|
1026
1026
|
c
|
|
1027
|
-
]), k =
|
|
1027
|
+
]), k = pt(() => h && g ? Array.isArray(g) ? g : [g] : [], [h, g]), w = h && "not" === m?.getName(), S = (e) => {
|
|
1028
1028
|
if (!e || e === m) return;
|
|
1029
1029
|
const t = !!e.isCombinator?.();
|
|
1030
1030
|
let n;
|
|
1031
|
-
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);
|
|
1032
1032
|
else {
|
|
1033
1033
|
const o = m?.getParamType?.(a ?? void 0) ?? null, l = e.getParamType?.(a ?? void 0) ?? null;
|
|
1034
|
-
n = !t && l && l === o ? g :
|
|
1034
|
+
n = !t && l && l === o ? g : Zo(e, r, a);
|
|
1035
1035
|
}
|
|
1036
1036
|
o({
|
|
1037
1037
|
operator: e?.getName() ?? null,
|
|
1038
1038
|
param: n
|
|
1039
1039
|
});
|
|
1040
1040
|
};
|
|
1041
|
-
return
|
|
1041
|
+
return Wt(Vt, {
|
|
1042
1042
|
ref: y,
|
|
1043
1043
|
sx: {
|
|
1044
1044
|
display: "flex",
|
|
@@ -1051,7 +1051,7 @@ var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
|
1051
1051
|
p: 1
|
|
1052
1052
|
},
|
|
1053
1053
|
...d,
|
|
1054
|
-
children: x ?
|
|
1054
|
+
children: x ? Et(Vt, {
|
|
1055
1055
|
sx: {
|
|
1056
1056
|
display: "flex",
|
|
1057
1057
|
flexDirection: "row",
|
|
@@ -1059,7 +1059,7 @@ var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
|
1059
1059
|
gap: .5
|
|
1060
1060
|
},
|
|
1061
1061
|
children: [
|
|
1062
|
-
|
|
1062
|
+
Wt(sn, {
|
|
1063
1063
|
title: p,
|
|
1064
1064
|
sx: { flex: .4 },
|
|
1065
1065
|
value: m,
|
|
@@ -1068,12 +1068,12 @@ var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
|
1068
1068
|
readOnly: i
|
|
1069
1069
|
}),
|
|
1070
1070
|
C,
|
|
1071
|
-
!i && !s &&
|
|
1072
|
-
icon:
|
|
1071
|
+
!i && !s && Wt(bt, {
|
|
1072
|
+
icon: Wt(Re, { iconKey: "Close" }),
|
|
1073
1073
|
onClick: n
|
|
1074
1074
|
})
|
|
1075
1075
|
]
|
|
1076
|
-
}) :
|
|
1076
|
+
}) : Et(At, { children: [Et(Vt, {
|
|
1077
1077
|
sx: {
|
|
1078
1078
|
display: "flex",
|
|
1079
1079
|
flexDirection: "row",
|
|
@@ -1081,7 +1081,7 @@ var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
|
1081
1081
|
gap: .5
|
|
1082
1082
|
},
|
|
1083
1083
|
children: [
|
|
1084
|
-
|
|
1084
|
+
Wt(sn, {
|
|
1085
1085
|
title: p,
|
|
1086
1086
|
sx: { flex: 1 },
|
|
1087
1087
|
value: m,
|
|
@@ -1089,14 +1089,14 @@ var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
|
1089
1089
|
onChange: S,
|
|
1090
1090
|
readOnly: i
|
|
1091
1091
|
}),
|
|
1092
|
-
h && !w && !i &&
|
|
1092
|
+
h && !w && !i && Wt(dn, {
|
|
1093
1093
|
label: m?.getTitle?.(),
|
|
1094
|
-
icon:
|
|
1094
|
+
icon: Wt(Re, { iconKey: "Add" }),
|
|
1095
1095
|
operators: r,
|
|
1096
1096
|
value: null,
|
|
1097
1097
|
onChange: (e) => {
|
|
1098
1098
|
if (!e) return;
|
|
1099
|
-
const t =
|
|
1099
|
+
const t = Zo(e, r, a), n = [...k, {
|
|
1100
1100
|
operator: e?.getName() ?? null,
|
|
1101
1101
|
param: t
|
|
1102
1102
|
}];
|
|
@@ -1106,13 +1106,13 @@ var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
|
1106
1106
|
});
|
|
1107
1107
|
}
|
|
1108
1108
|
}),
|
|
1109
|
-
!i && !s &&
|
|
1110
|
-
icon:
|
|
1109
|
+
!i && !s && Wt(bt, {
|
|
1110
|
+
icon: Wt(Re, { iconKey: "Close" }),
|
|
1111
1111
|
disabled: i,
|
|
1112
1112
|
onClick: n
|
|
1113
1113
|
})
|
|
1114
1114
|
]
|
|
1115
|
-
}), h ?
|
|
1115
|
+
}), h ? Wt(cn, {
|
|
1116
1116
|
operator: m,
|
|
1117
1117
|
inputs: k,
|
|
1118
1118
|
onOptionChange: (e) => {
|
|
@@ -1127,13 +1127,13 @@ var gn = K.BuiltInOperatorNames, hn = /* @__PURE__ */ new Set([
|
|
|
1127
1127
|
}) : C] })
|
|
1128
1128
|
});
|
|
1129
1129
|
});
|
|
1130
|
-
|
|
1131
|
-
var
|
|
1132
|
-
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() ? {
|
|
1133
1133
|
operator: t.getOperator().getName(),
|
|
1134
1134
|
param: t.getParam()
|
|
1135
|
-
} : null), [y, f] =
|
|
1136
|
-
|
|
1135
|
+
} : null), [y, f] = mt(() => t?.isIncludeBlanks() ?? !1);
|
|
1136
|
+
ct(() => {
|
|
1137
1137
|
if (!t) return m(null), void h(null);
|
|
1138
1138
|
const e = t.getOperator(), o = t.getSelector() ?? null;
|
|
1139
1139
|
m(o), h(e ? {
|
|
@@ -1141,12 +1141,12 @@ var fn = lt((e) => {
|
|
|
1141
1141
|
param: t.getParam()
|
|
1142
1142
|
} : null), f(t.isIncludeBlanks());
|
|
1143
1143
|
}, [t]);
|
|
1144
|
-
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), [
|
|
1145
1145
|
u,
|
|
1146
1146
|
x,
|
|
1147
1147
|
p
|
|
1148
|
-
]), C =
|
|
1149
|
-
|
|
1148
|
+
]), C = ut(/* @__PURE__ */ new Map()), k = (e) => e?.getName() ?? "", w = ut(null), S = ut(!1);
|
|
1149
|
+
ct(() => {
|
|
1150
1150
|
if (!S.current) return;
|
|
1151
1151
|
S.current = !1;
|
|
1152
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"));
|
|
@@ -1159,7 +1159,7 @@ var fn = lt((e) => {
|
|
|
1159
1159
|
includeBlanks: y
|
|
1160
1160
|
});
|
|
1161
1161
|
}, F = n;
|
|
1162
|
-
return
|
|
1162
|
+
return Et(Vt, {
|
|
1163
1163
|
sx: {
|
|
1164
1164
|
display: "flex",
|
|
1165
1165
|
flexDirection: "column",
|
|
@@ -1173,27 +1173,27 @@ var fn = lt((e) => {
|
|
|
1173
1173
|
},
|
|
1174
1174
|
...d,
|
|
1175
1175
|
children: [
|
|
1176
|
-
|
|
1176
|
+
Wt(ln, {
|
|
1177
1177
|
title: r,
|
|
1178
1178
|
selectors: b,
|
|
1179
1179
|
value: u,
|
|
1180
1180
|
onChange: (e) => {
|
|
1181
1181
|
g && C.current.set(k(u), g);
|
|
1182
1182
|
const t = ((e) => {
|
|
1183
|
-
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;
|
|
1184
1184
|
if (r && s(r.operator)) return r;
|
|
1185
1185
|
const d = s(n?.operator);
|
|
1186
1186
|
if (n && d) {
|
|
1187
1187
|
const e = (d.getParamType?.(t ?? void 0) ?? null) !== (d.getParamType?.(o ?? void 0) ?? null);
|
|
1188
1188
|
return d.isCombinator?.() || e ? {
|
|
1189
1189
|
operator: n.operator,
|
|
1190
|
-
param:
|
|
1190
|
+
param: Zo(d, i, o)
|
|
1191
1191
|
} : n;
|
|
1192
1192
|
}
|
|
1193
1193
|
const c = o?.getDefaultCondition?.(l) ?? null, p = s(c?.operator);
|
|
1194
1194
|
return c && p ? {
|
|
1195
1195
|
operator: c.operator,
|
|
1196
|
-
param: void 0 !== c.param ? c.param :
|
|
1196
|
+
param: void 0 !== c.param ? c.param : Zo(p, i, o)
|
|
1197
1197
|
} : null;
|
|
1198
1198
|
})({
|
|
1199
1199
|
from: u,
|
|
@@ -1215,10 +1215,10 @@ var fn = lt((e) => {
|
|
|
1215
1215
|
allowNull: !0,
|
|
1216
1216
|
readOnly: a
|
|
1217
1217
|
}),
|
|
1218
|
-
g ?
|
|
1218
|
+
g ? Wt(Vt, {
|
|
1219
1219
|
ref: w,
|
|
1220
1220
|
sx: { display: "contents" },
|
|
1221
|
-
children:
|
|
1221
|
+
children: Wt(fn, {
|
|
1222
1222
|
operatorParam: g,
|
|
1223
1223
|
onOperatorParamChange: T,
|
|
1224
1224
|
onRemove: () => {
|
|
@@ -1233,23 +1233,23 @@ var fn = lt((e) => {
|
|
|
1233
1233
|
selector: u,
|
|
1234
1234
|
readOnly: a
|
|
1235
1235
|
})
|
|
1236
|
-
}) : !a &&
|
|
1236
|
+
}) : !a && Wt(Vt, {
|
|
1237
1237
|
sx: { display: "flex" },
|
|
1238
|
-
children:
|
|
1238
|
+
children: Wt(dn, {
|
|
1239
1239
|
label: c("condition.when"),
|
|
1240
1240
|
operators: v,
|
|
1241
1241
|
value: null,
|
|
1242
1242
|
onChange: (e) => {
|
|
1243
1243
|
e && (S.current = !0, T({
|
|
1244
1244
|
operator: e?.getName() ?? null,
|
|
1245
|
-
param:
|
|
1245
|
+
param: Zo(e, v, u)
|
|
1246
1246
|
}));
|
|
1247
1247
|
},
|
|
1248
1248
|
readOnly: a
|
|
1249
1249
|
})
|
|
1250
1250
|
}),
|
|
1251
|
-
F &&
|
|
1252
|
-
control:
|
|
1251
|
+
F && Wt(Qt, {
|
|
1252
|
+
control: Wt(Kt, {
|
|
1253
1253
|
checked: y,
|
|
1254
1254
|
onChange: (e) => {
|
|
1255
1255
|
t = e.target.checked, f(t), o?.({
|
|
@@ -1267,10 +1267,10 @@ var fn = lt((e) => {
|
|
|
1267
1267
|
]
|
|
1268
1268
|
});
|
|
1269
1269
|
});
|
|
1270
|
-
|
|
1271
|
-
var
|
|
1270
|
+
bn.displayName = "ConditionEditor";
|
|
1271
|
+
var xn = it((e) => {
|
|
1272
1272
|
const { variant: t = "format", children: o, sx: n, ...r } = e;
|
|
1273
|
-
return
|
|
1273
|
+
return Wt(Vt, {
|
|
1274
1274
|
className: `sxl-cf-rule-section sxl-cf-rule-section-${t}`,
|
|
1275
1275
|
sx: {
|
|
1276
1276
|
display: "flex",
|
|
@@ -1287,25 +1287,25 @@ var bn = lt((e) => {
|
|
|
1287
1287
|
children: o
|
|
1288
1288
|
});
|
|
1289
1289
|
});
|
|
1290
|
-
|
|
1291
|
-
var
|
|
1292
|
-
lightRedFillDarkRedText:
|
|
1293
|
-
yellowFillDarkYellowText:
|
|
1294
|
-
greenFillDarkGreenText:
|
|
1295
|
-
lightRedFill:
|
|
1296
|
-
redText:
|
|
1297
|
-
redBorder:
|
|
1298
|
-
},
|
|
1299
|
-
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) => {
|
|
1300
1300
|
const t = { ...g };
|
|
1301
1301
|
for (const [o, n] of Object.entries(e)) void 0 === n ? delete t[o] : t[o] = n;
|
|
1302
1302
|
const o = { ...r };
|
|
1303
1303
|
0 === Object.keys(t).length ? delete o.font : o.font = t, a(0 === Object.keys(o).length ? null : o);
|
|
1304
|
-
}, v =
|
|
1304
|
+
}, v = pt(() => d?.getStyles().getNormal().getFont().getColor(), [d, p]), C = pt(() => wn(g?.color, d), [
|
|
1305
1305
|
g?.color,
|
|
1306
1306
|
d,
|
|
1307
1307
|
p
|
|
1308
|
-
]), k =
|
|
1308
|
+
]), k = pt(() => wn(kn(r?.fill), d), [
|
|
1309
1309
|
r?.fill,
|
|
1310
1310
|
d,
|
|
1311
1311
|
p
|
|
@@ -1314,15 +1314,15 @@ var xn = new L("transparent"), vn = {
|
|
|
1314
1314
|
border: "none",
|
|
1315
1315
|
borderRadius: 1
|
|
1316
1316
|
};
|
|
1317
|
-
return
|
|
1317
|
+
return Et(xn, {
|
|
1318
1318
|
...i,
|
|
1319
|
-
children: [
|
|
1319
|
+
children: [Et(Vt, {
|
|
1320
1320
|
sx: {
|
|
1321
1321
|
display: "flex",
|
|
1322
1322
|
alignItems: "flex-start",
|
|
1323
1323
|
gap: 1
|
|
1324
1324
|
},
|
|
1325
|
-
children: [
|
|
1325
|
+
children: [Wt(Vt, {
|
|
1326
1326
|
sx: {
|
|
1327
1327
|
flex: "1 1 auto",
|
|
1328
1328
|
minWidth: 0,
|
|
@@ -1330,11 +1330,11 @@ var xn = new L("transparent"), vn = {
|
|
|
1330
1330
|
gap: .5,
|
|
1331
1331
|
flexWrap: "wrap"
|
|
1332
1332
|
},
|
|
1333
|
-
children:
|
|
1334
|
-
const o = kn(
|
|
1335
|
-
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, {
|
|
1336
1336
|
sheet: !0,
|
|
1337
|
-
title: s(
|
|
1337
|
+
title: s(Cn[e.key] ?? e.key),
|
|
1338
1338
|
disabled: l,
|
|
1339
1339
|
onClick: () => a(structuredClone(e.style)),
|
|
1340
1340
|
sx: {
|
|
@@ -1346,7 +1346,7 @@ var xn = new L("transparent"), vn = {
|
|
|
1346
1346
|
children: "Aa"
|
|
1347
1347
|
}, t);
|
|
1348
1348
|
})
|
|
1349
|
-
}),
|
|
1349
|
+
}), Wt(E, {
|
|
1350
1350
|
title: s("conditionalFormat.clearStyle"),
|
|
1351
1351
|
disabled: l || !r,
|
|
1352
1352
|
onClick: () => a(null),
|
|
@@ -1354,55 +1354,55 @@ var xn = new L("transparent"), vn = {
|
|
|
1354
1354
|
color: "text.secondary",
|
|
1355
1355
|
"&:disabled": { opacity: .4 }
|
|
1356
1356
|
},
|
|
1357
|
-
children:
|
|
1357
|
+
children: Wt(Re, {
|
|
1358
1358
|
iconKey: "ClearFormats",
|
|
1359
1359
|
size: 16
|
|
1360
1360
|
})
|
|
1361
1361
|
})]
|
|
1362
|
-
}),
|
|
1362
|
+
}), Et(Vt, {
|
|
1363
1363
|
sx: {
|
|
1364
1364
|
display: "flex",
|
|
1365
1365
|
alignItems: "center",
|
|
1366
1366
|
gap: .25
|
|
1367
1367
|
},
|
|
1368
1368
|
children: [
|
|
1369
|
-
|
|
1369
|
+
Wt(po, {
|
|
1370
1370
|
value: "bold",
|
|
1371
1371
|
size: "small",
|
|
1372
1372
|
sx: w,
|
|
1373
1373
|
selected: h,
|
|
1374
1374
|
disabled: l,
|
|
1375
1375
|
onChange: () => x({ weight: h ? void 0 : 700 }),
|
|
1376
|
-
children:
|
|
1376
|
+
children: Wt(Re, { iconKey: "TextBold" })
|
|
1377
1377
|
}),
|
|
1378
|
-
|
|
1378
|
+
Wt(po, {
|
|
1379
1379
|
value: "italic",
|
|
1380
1380
|
size: "small",
|
|
1381
1381
|
sx: w,
|
|
1382
1382
|
selected: y,
|
|
1383
1383
|
disabled: l,
|
|
1384
|
-
onChange: () => x({ style: y ? void 0 :
|
|
1385
|
-
children:
|
|
1384
|
+
onChange: () => x({ style: y ? void 0 : G.Style.Italic }),
|
|
1385
|
+
children: Wt(Re, { iconKey: "TextItalic" })
|
|
1386
1386
|
}),
|
|
1387
|
-
|
|
1387
|
+
Wt(po, {
|
|
1388
1388
|
value: "underline",
|
|
1389
1389
|
size: "small",
|
|
1390
1390
|
sx: w,
|
|
1391
1391
|
selected: f,
|
|
1392
1392
|
disabled: l,
|
|
1393
|
-
onChange: () => x({ underline: f ? void 0 :
|
|
1394
|
-
children:
|
|
1393
|
+
onChange: () => x({ underline: f ? void 0 : G.UnderlineStyle.Single }),
|
|
1394
|
+
children: Wt(Re, { iconKey: "TextUnderline" })
|
|
1395
1395
|
}),
|
|
1396
|
-
|
|
1396
|
+
Wt(po, {
|
|
1397
1397
|
value: "strike",
|
|
1398
1398
|
size: "small",
|
|
1399
1399
|
sx: w,
|
|
1400
1400
|
selected: b,
|
|
1401
1401
|
disabled: l,
|
|
1402
1402
|
onChange: () => x({ strike: !b || void 0 }),
|
|
1403
|
-
children:
|
|
1403
|
+
children: Wt(Re, { iconKey: "TextStrike" })
|
|
1404
1404
|
}),
|
|
1405
|
-
d &&
|
|
1405
|
+
d && Wt(t, {
|
|
1406
1406
|
tooltip: s("conditionalFormat.border"),
|
|
1407
1407
|
selectedBorder: r?.borders,
|
|
1408
1408
|
createBorder: (e) => d.getStyles().getNormal().createStyle({ borders: e }).getBorders(),
|
|
@@ -1415,7 +1415,7 @@ var xn = new L("transparent"), vn = {
|
|
|
1415
1415
|
e && 0 !== Object.keys(e).length ? t.borders = e : delete t.borders, a(0 === Object.keys(t).length ? null : t);
|
|
1416
1416
|
})(e)
|
|
1417
1417
|
}),
|
|
1418
|
-
|
|
1418
|
+
Wt(o, {
|
|
1419
1419
|
icon: "fill.colored",
|
|
1420
1420
|
tooltip: s("conditionalFormat.fillColor"),
|
|
1421
1421
|
selectedColor: k,
|
|
@@ -1423,20 +1423,20 @@ var xn = new L("transparent"), vn = {
|
|
|
1423
1423
|
onSelectColor: (e) => ((e) => {
|
|
1424
1424
|
const t = { ...r };
|
|
1425
1425
|
e ? t.fill = {
|
|
1426
|
-
type:
|
|
1426
|
+
type: q.Type.Solid,
|
|
1427
1427
|
color: e.toString()
|
|
1428
1428
|
} : delete t.fill, a(0 === Object.keys(t).length ? null : t);
|
|
1429
1429
|
})(e),
|
|
1430
1430
|
darkMode: u,
|
|
1431
1431
|
propsPanel: {
|
|
1432
1432
|
disableAlpha: !0,
|
|
1433
|
-
autoColor:
|
|
1434
|
-
autoColorLabelKey:
|
|
1433
|
+
autoColor: vn,
|
|
1434
|
+
autoColorLabelKey: To("color.noFill"),
|
|
1435
1435
|
autoColorPosition: e.End,
|
|
1436
1436
|
...m
|
|
1437
1437
|
}
|
|
1438
1438
|
}),
|
|
1439
|
-
|
|
1439
|
+
Wt(o, {
|
|
1440
1440
|
icon: "text.colored",
|
|
1441
1441
|
tooltip: s("conditionalFormat.fontColor"),
|
|
1442
1442
|
selectedColor: C,
|
|
@@ -1453,24 +1453,24 @@ var xn = new L("transparent"), vn = {
|
|
|
1453
1453
|
})]
|
|
1454
1454
|
});
|
|
1455
1455
|
});
|
|
1456
|
-
|
|
1457
|
-
var
|
|
1458
|
-
[
|
|
1459
|
-
[
|
|
1460
|
-
[
|
|
1461
|
-
[
|
|
1462
|
-
[
|
|
1463
|
-
[
|
|
1464
|
-
[
|
|
1465
|
-
[
|
|
1466
|
-
},
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
]),
|
|
1472
|
-
const { label: t, stop: n, onStopChange: r, allowedTypes: a, showColor: l = !1, leading:
|
|
1473
|
-
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, {
|
|
1474
1474
|
sx: {
|
|
1475
1475
|
display: "flex",
|
|
1476
1476
|
alignItems: "center",
|
|
@@ -1478,7 +1478,7 @@ var Sn = {
|
|
|
1478
1478
|
},
|
|
1479
1479
|
...p,
|
|
1480
1480
|
children: [
|
|
1481
|
-
void 0 !== t &&
|
|
1481
|
+
void 0 !== t && Wt(mo, {
|
|
1482
1482
|
variant: "caption",
|
|
1483
1483
|
sx: {
|
|
1484
1484
|
color: "text.secondary",
|
|
@@ -1489,8 +1489,8 @@ var Sn = {
|
|
|
1489
1489
|
},
|
|
1490
1490
|
children: t
|
|
1491
1491
|
}),
|
|
1492
|
-
|
|
1493
|
-
l &&
|
|
1492
|
+
i,
|
|
1493
|
+
l && Wt(o, {
|
|
1494
1494
|
tooltip: u("conditionalFormat.stopColor"),
|
|
1495
1495
|
selectedColor: w,
|
|
1496
1496
|
disabled: c,
|
|
@@ -1506,7 +1506,7 @@ var Sn = {
|
|
|
1506
1506
|
...h
|
|
1507
1507
|
}
|
|
1508
1508
|
}),
|
|
1509
|
-
d &&
|
|
1509
|
+
d && Et(ro, {
|
|
1510
1510
|
size: "small",
|
|
1511
1511
|
value: n.exclusive ? "gt" : "gte",
|
|
1512
1512
|
disabled: c,
|
|
@@ -1518,15 +1518,15 @@ var Sn = {
|
|
|
1518
1518
|
flex: "0 0 auto",
|
|
1519
1519
|
backgroundColor: "background.paper"
|
|
1520
1520
|
},
|
|
1521
|
-
children: [
|
|
1521
|
+
children: [Wt(eo, {
|
|
1522
1522
|
value: "gte",
|
|
1523
1523
|
children: ">="
|
|
1524
|
-
}),
|
|
1524
|
+
}), Wt(eo, {
|
|
1525
1525
|
value: "gt",
|
|
1526
1526
|
children: ">"
|
|
1527
1527
|
})]
|
|
1528
1528
|
}),
|
|
1529
|
-
|
|
1529
|
+
Wt(ro, {
|
|
1530
1530
|
size: "small",
|
|
1531
1531
|
value: f,
|
|
1532
1532
|
disabled: c,
|
|
@@ -1535,9 +1535,9 @@ var Sn = {
|
|
|
1535
1535
|
...n,
|
|
1536
1536
|
type: e
|
|
1537
1537
|
};
|
|
1538
|
-
if (
|
|
1539
|
-
else if (void 0 === t.value) t.value = e ===
|
|
1540
|
-
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) {
|
|
1541
1541
|
const e = "string" == typeof t.value ? Number(t.value) : NaN;
|
|
1542
1542
|
t.value = Number.isFinite(e) ? e : 0;
|
|
1543
1543
|
}
|
|
@@ -1548,12 +1548,12 @@ var Sn = {
|
|
|
1548
1548
|
minWidth: 0,
|
|
1549
1549
|
backgroundColor: "background.paper"
|
|
1550
1550
|
},
|
|
1551
|
-
children: a.map((e) =>
|
|
1551
|
+
children: a.map((e) => Wt(eo, {
|
|
1552
1552
|
value: e,
|
|
1553
|
-
children: u(
|
|
1553
|
+
children: u(Tn[e])
|
|
1554
1554
|
}, e))
|
|
1555
1555
|
}),
|
|
1556
|
-
v ?
|
|
1556
|
+
v ? Wt(s, {
|
|
1557
1557
|
size: "small",
|
|
1558
1558
|
home: y.home,
|
|
1559
1559
|
value: C ? y.display(C) : `${n.value ?? ""}`,
|
|
@@ -1575,7 +1575,7 @@ var Sn = {
|
|
|
1575
1575
|
minWidth: 0,
|
|
1576
1576
|
"& .MuiInputBase-root": { backgroundColor: x ? "action.disabledBackground" : "background.paper" }
|
|
1577
1577
|
}
|
|
1578
|
-
}) :
|
|
1578
|
+
}) : Wt(so, {
|
|
1579
1579
|
size: "small",
|
|
1580
1580
|
type: "number",
|
|
1581
1581
|
placeholder: b ? void 0 : u("conditionalFormat.stopFromData"),
|
|
@@ -1601,34 +1601,34 @@ var Sn = {
|
|
|
1601
1601
|
]
|
|
1602
1602
|
});
|
|
1603
1603
|
});
|
|
1604
|
-
|
|
1605
|
-
var
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
],
|
|
1613
|
-
const { scale: t, onScaleChange: o, readOnly: n, ...r } = e, a =
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
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")
|
|
1617
1617
|
];
|
|
1618
|
-
return
|
|
1618
|
+
return Et(Vt, {
|
|
1619
1619
|
sx: {
|
|
1620
1620
|
display: "flex",
|
|
1621
1621
|
flexDirection: "column",
|
|
1622
1622
|
gap: 1
|
|
1623
1623
|
},
|
|
1624
1624
|
...r,
|
|
1625
|
-
children: [
|
|
1625
|
+
children: [Wt(xn, { children: Et(Vt, {
|
|
1626
1626
|
sx: {
|
|
1627
1627
|
display: "flex",
|
|
1628
1628
|
alignItems: "flex-start",
|
|
1629
1629
|
gap: 1
|
|
1630
1630
|
},
|
|
1631
|
-
children: [
|
|
1631
|
+
children: [Wt(Vt, {
|
|
1632
1632
|
sx: {
|
|
1633
1633
|
flex: "1 1 auto",
|
|
1634
1634
|
minWidth: 0,
|
|
@@ -1636,13 +1636,13 @@ var Dn = [
|
|
|
1636
1636
|
gap: .5,
|
|
1637
1637
|
flexWrap: "wrap"
|
|
1638
1638
|
},
|
|
1639
|
-
children:
|
|
1639
|
+
children: X.filter((e) => e.stops.length === (2 === s.length ? 2 : 3)).map((e, t) => Wt(E, {
|
|
1640
1640
|
sheet: !0,
|
|
1641
1641
|
disabled: n,
|
|
1642
1642
|
onClick: () => o(structuredClone(e)),
|
|
1643
|
-
children:
|
|
1643
|
+
children: Wt(k, { rows: C(e.stops ?? [], v, l) })
|
|
1644
1644
|
}, t))
|
|
1645
|
-
}),
|
|
1645
|
+
}), Et(uo, {
|
|
1646
1646
|
exclusive: !0,
|
|
1647
1647
|
size: "small",
|
|
1648
1648
|
value: 2 === s.length ? 2 : 3,
|
|
@@ -1659,7 +1659,7 @@ var Dn = [
|
|
|
1659
1659
|
e = `#${n((t.red + o.red) / 2)}${n((t.green + o.green) / 2)}${n((t.blue + o.blue) / 2)}`;
|
|
1660
1660
|
}
|
|
1661
1661
|
n.splice(1, 0, {
|
|
1662
|
-
type:
|
|
1662
|
+
type: H.ColorStopType.Percentile,
|
|
1663
1663
|
value: 50,
|
|
1664
1664
|
color: e
|
|
1665
1665
|
});
|
|
@@ -1671,7 +1671,7 @@ var Dn = [
|
|
|
1671
1671
|
})(n);
|
|
1672
1672
|
},
|
|
1673
1673
|
sx: { flex: "0 0 auto" },
|
|
1674
|
-
children: [
|
|
1674
|
+
children: [Wt(po, {
|
|
1675
1675
|
value: 2,
|
|
1676
1676
|
sx: {
|
|
1677
1677
|
textTransform: "none",
|
|
@@ -1679,7 +1679,7 @@ var Dn = [
|
|
|
1679
1679
|
pb: .25
|
|
1680
1680
|
},
|
|
1681
1681
|
children: a("conditionalFormat.twoColor")
|
|
1682
|
-
}),
|
|
1682
|
+
}), Wt(po, {
|
|
1683
1683
|
value: 3,
|
|
1684
1684
|
sx: {
|
|
1685
1685
|
textTransform: "none",
|
|
@@ -1689,12 +1689,12 @@ var Dn = [
|
|
|
1689
1689
|
children: a("conditionalFormat.threeColor")
|
|
1690
1690
|
})]
|
|
1691
1691
|
})]
|
|
1692
|
-
}) }),
|
|
1692
|
+
}) }), Wt(xn, {
|
|
1693
1693
|
variant: "config",
|
|
1694
|
-
children: s.map((e, r) =>
|
|
1694
|
+
children: s.map((e, r) => Wt(Dn, {
|
|
1695
1695
|
label: a(d[Math.min(r, d.length - 1)]),
|
|
1696
1696
|
stop: e,
|
|
1697
|
-
allowedTypes:
|
|
1697
|
+
allowedTypes: Nn,
|
|
1698
1698
|
showColor: !0,
|
|
1699
1699
|
readOnly: n,
|
|
1700
1700
|
onStopChange: (e) => {
|
|
@@ -1708,42 +1708,42 @@ var Dn = [
|
|
|
1708
1708
|
})]
|
|
1709
1709
|
});
|
|
1710
1710
|
});
|
|
1711
|
-
|
|
1712
|
-
var
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
],
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
],
|
|
1727
|
-
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) => {
|
|
1728
1728
|
const o = { ...t };
|
|
1729
1729
|
for (const [t, n] of Object.entries(e)) void 0 === n ? delete o[t] : o[t] = n;
|
|
1730
1730
|
n(o);
|
|
1731
1731
|
}, b = { backgroundColor: "background.paper" };
|
|
1732
|
-
return
|
|
1732
|
+
return Et(Vt, {
|
|
1733
1733
|
sx: {
|
|
1734
1734
|
display: "flex",
|
|
1735
1735
|
flexDirection: "column",
|
|
1736
1736
|
gap: 1
|
|
1737
1737
|
},
|
|
1738
1738
|
...a,
|
|
1739
|
-
children: [
|
|
1740
|
-
|
|
1739
|
+
children: [Et(xn, { children: [
|
|
1740
|
+
Et(Vt, {
|
|
1741
1741
|
sx: {
|
|
1742
1742
|
display: "flex",
|
|
1743
1743
|
alignItems: "flex-start",
|
|
1744
1744
|
gap: 1
|
|
1745
1745
|
},
|
|
1746
|
-
children: [
|
|
1746
|
+
children: [Wt(Vt, {
|
|
1747
1747
|
sx: {
|
|
1748
1748
|
flex: "1 1 auto",
|
|
1749
1749
|
minWidth: 0,
|
|
@@ -1751,7 +1751,7 @@ var In = [
|
|
|
1751
1751
|
gap: .5,
|
|
1752
1752
|
flexWrap: "wrap"
|
|
1753
1753
|
},
|
|
1754
|
-
children:
|
|
1754
|
+
children: ee.filter((e) => (e.gradient ?? !1) === y).map((e, t) => Wt(E, {
|
|
1755
1755
|
sheet: !0,
|
|
1756
1756
|
disabled: r,
|
|
1757
1757
|
onClick: () => f({
|
|
@@ -1759,9 +1759,9 @@ var In = [
|
|
|
1759
1759
|
gradient: e.gradient,
|
|
1760
1760
|
borderColor: e.borderColor
|
|
1761
1761
|
}),
|
|
1762
|
-
children:
|
|
1762
|
+
children: Wt(k, { rows: g(e, s(e.color)?.toCSS("adaptive") ?? "var(--sxl-color-primary, rgb(33, 115, 70))") })
|
|
1763
1763
|
}, t))
|
|
1764
|
-
}),
|
|
1764
|
+
}), Et(uo, {
|
|
1765
1765
|
exclusive: !0,
|
|
1766
1766
|
size: "small",
|
|
1767
1767
|
value: y,
|
|
@@ -1770,7 +1770,7 @@ var In = [
|
|
|
1770
1770
|
null !== t && f({ gradient: !!t || void 0 });
|
|
1771
1771
|
},
|
|
1772
1772
|
sx: { flex: "0 0 auto" },
|
|
1773
|
-
children: [
|
|
1773
|
+
children: [Wt(po, {
|
|
1774
1774
|
value: !1,
|
|
1775
1775
|
sx: {
|
|
1776
1776
|
textTransform: "none",
|
|
@@ -1778,7 +1778,7 @@ var In = [
|
|
|
1778
1778
|
pb: .25
|
|
1779
1779
|
},
|
|
1780
1780
|
children: l("conditionalFormat.solidFill")
|
|
1781
|
-
}),
|
|
1781
|
+
}), Wt(po, {
|
|
1782
1782
|
value: !0,
|
|
1783
1783
|
sx: {
|
|
1784
1784
|
textTransform: "none",
|
|
@@ -1789,26 +1789,26 @@ var In = [
|
|
|
1789
1789
|
})]
|
|
1790
1790
|
})]
|
|
1791
1791
|
}),
|
|
1792
|
-
|
|
1793
|
-
control:
|
|
1792
|
+
Wt(Qt, {
|
|
1793
|
+
control: Wt(Kt, {
|
|
1794
1794
|
size: "small",
|
|
1795
1795
|
checked: !1 === t.showValue,
|
|
1796
1796
|
disabled: r,
|
|
1797
1797
|
onChange: (e) => f({ showValue: !e.target.checked && void 0 })
|
|
1798
1798
|
}),
|
|
1799
|
-
label:
|
|
1799
|
+
label: Wt(mo, {
|
|
1800
1800
|
variant: "body2",
|
|
1801
1801
|
children: l("conditionalFormat.showBarsOnly")
|
|
1802
1802
|
})
|
|
1803
1803
|
}),
|
|
1804
|
-
|
|
1804
|
+
Et(Vt, {
|
|
1805
1805
|
sx: {
|
|
1806
1806
|
display: "flex",
|
|
1807
1807
|
alignItems: "center",
|
|
1808
1808
|
gap: .5
|
|
1809
1809
|
},
|
|
1810
1810
|
children: [
|
|
1811
|
-
|
|
1811
|
+
Wt(mo, {
|
|
1812
1812
|
variant: "caption",
|
|
1813
1813
|
sx: {
|
|
1814
1814
|
color: "text.secondary",
|
|
@@ -1816,7 +1816,7 @@ var In = [
|
|
|
1816
1816
|
},
|
|
1817
1817
|
children: l("conditionalFormat.bar")
|
|
1818
1818
|
}),
|
|
1819
|
-
|
|
1819
|
+
Wt(o, {
|
|
1820
1820
|
icon: "fill.colored",
|
|
1821
1821
|
tooltip: l("conditionalFormat.barColor"),
|
|
1822
1822
|
selectedColor: p,
|
|
@@ -1828,10 +1828,10 @@ var In = [
|
|
|
1828
1828
|
...d
|
|
1829
1829
|
}
|
|
1830
1830
|
}),
|
|
1831
|
-
|
|
1831
|
+
Wt(o, {
|
|
1832
1832
|
icon: "stroke.colored",
|
|
1833
1833
|
tooltip: l("conditionalFormat.barBorderColor"),
|
|
1834
|
-
selectedColor:
|
|
1834
|
+
selectedColor: m,
|
|
1835
1835
|
disabled: r,
|
|
1836
1836
|
onSelectColor: (e) => f({ borderColor: e ? e.toString() : void 0 }),
|
|
1837
1837
|
darkMode: i,
|
|
@@ -1842,14 +1842,14 @@ var In = [
|
|
|
1842
1842
|
})
|
|
1843
1843
|
]
|
|
1844
1844
|
}),
|
|
1845
|
-
|
|
1845
|
+
Et(Vt, {
|
|
1846
1846
|
sx: {
|
|
1847
1847
|
display: "flex",
|
|
1848
1848
|
alignItems: "center",
|
|
1849
1849
|
gap: .5
|
|
1850
1850
|
},
|
|
1851
1851
|
children: [
|
|
1852
|
-
|
|
1852
|
+
Wt(mo, {
|
|
1853
1853
|
variant: "caption",
|
|
1854
1854
|
sx: {
|
|
1855
1855
|
color: "text.secondary",
|
|
@@ -1857,7 +1857,7 @@ var In = [
|
|
|
1857
1857
|
},
|
|
1858
1858
|
children: l("conditionalFormat.negative")
|
|
1859
1859
|
}),
|
|
1860
|
-
|
|
1860
|
+
Wt(o, {
|
|
1861
1861
|
icon: "fill.colored",
|
|
1862
1862
|
tooltip: l("conditionalFormat.negativeColor"),
|
|
1863
1863
|
selectedColor: u ?? p,
|
|
@@ -1869,10 +1869,10 @@ var In = [
|
|
|
1869
1869
|
...d
|
|
1870
1870
|
}
|
|
1871
1871
|
}),
|
|
1872
|
-
|
|
1872
|
+
Wt(o, {
|
|
1873
1873
|
icon: "stroke.colored",
|
|
1874
1874
|
tooltip: l("conditionalFormat.negativeBorderColor"),
|
|
1875
|
-
selectedColor: h ??
|
|
1875
|
+
selectedColor: h ?? m,
|
|
1876
1876
|
disabled: r,
|
|
1877
1877
|
onSelectColor: (e) => f({ negativeBorderColor: e ? e.toString() : void 0 }),
|
|
1878
1878
|
darkMode: i,
|
|
@@ -1881,7 +1881,7 @@ var In = [
|
|
|
1881
1881
|
...d
|
|
1882
1882
|
}
|
|
1883
1883
|
}),
|
|
1884
|
-
|
|
1884
|
+
Wt(E, {
|
|
1885
1885
|
title: l("conditionalFormat.sameAsPositive"),
|
|
1886
1886
|
disabled: r || !t.negativeFillColor && !t.negativeBorderColor,
|
|
1887
1887
|
onClick: () => f({
|
|
@@ -1892,74 +1892,74 @@ var In = [
|
|
|
1892
1892
|
color: "text.secondary",
|
|
1893
1893
|
"&:disabled": { opacity: .4 }
|
|
1894
1894
|
},
|
|
1895
|
-
children:
|
|
1895
|
+
children: Wt(Re, {
|
|
1896
1896
|
iconKey: "ClearFormats",
|
|
1897
1897
|
size: 16
|
|
1898
1898
|
})
|
|
1899
1899
|
})
|
|
1900
1900
|
]
|
|
1901
1901
|
}),
|
|
1902
|
-
|
|
1902
|
+
Et(Vt, {
|
|
1903
1903
|
sx: {
|
|
1904
1904
|
display: "flex",
|
|
1905
1905
|
gap: 1,
|
|
1906
1906
|
mt: .5
|
|
1907
1907
|
},
|
|
1908
|
-
children: [
|
|
1908
|
+
children: [Et(Gt, {
|
|
1909
1909
|
size: "small",
|
|
1910
1910
|
sx: {
|
|
1911
1911
|
flex: 1,
|
|
1912
1912
|
minWidth: 0
|
|
1913
1913
|
},
|
|
1914
|
-
children: [
|
|
1914
|
+
children: [Wt(Xt, { children: l("conditionalFormat.axis") }), Et(ro, {
|
|
1915
1915
|
label: l("conditionalFormat.axis"),
|
|
1916
|
-
value: t.axisPosition ??
|
|
1916
|
+
value: t.axisPosition ?? Mn,
|
|
1917
1917
|
disabled: r,
|
|
1918
1918
|
sx: b,
|
|
1919
1919
|
onChange: (e) => {
|
|
1920
1920
|
const t = e.target.value;
|
|
1921
|
-
f({ axisPosition: t ===
|
|
1921
|
+
f({ axisPosition: t === Mn ? void 0 : t });
|
|
1922
1922
|
},
|
|
1923
1923
|
children: [
|
|
1924
|
-
|
|
1925
|
-
value:
|
|
1924
|
+
Wt(eo, {
|
|
1925
|
+
value: Mn,
|
|
1926
1926
|
children: l("conditionalFormat.automatic")
|
|
1927
1927
|
}),
|
|
1928
|
-
|
|
1928
|
+
Wt(eo, {
|
|
1929
1929
|
value: "middle",
|
|
1930
1930
|
children: l("conditionalFormat.axisMiddle")
|
|
1931
1931
|
}),
|
|
1932
|
-
|
|
1932
|
+
Wt(eo, {
|
|
1933
1933
|
value: "none",
|
|
1934
1934
|
children: l("conditionalFormat.axisNone")
|
|
1935
1935
|
})
|
|
1936
1936
|
]
|
|
1937
1937
|
})]
|
|
1938
|
-
}),
|
|
1938
|
+
}), Et(Gt, {
|
|
1939
1939
|
size: "small",
|
|
1940
1940
|
sx: {
|
|
1941
1941
|
flex: 1,
|
|
1942
1942
|
minWidth: 0
|
|
1943
1943
|
},
|
|
1944
|
-
children: [
|
|
1944
|
+
children: [Wt(Xt, { children: l("conditionalFormat.direction") }), Et(ro, {
|
|
1945
1945
|
label: l("conditionalFormat.direction"),
|
|
1946
|
-
value: t.direction ??
|
|
1946
|
+
value: t.direction ?? Mn,
|
|
1947
1947
|
disabled: r,
|
|
1948
1948
|
sx: b,
|
|
1949
1949
|
onChange: (e) => {
|
|
1950
1950
|
const t = e.target.value;
|
|
1951
|
-
f({ direction: t ===
|
|
1951
|
+
f({ direction: t === Mn ? void 0 : t });
|
|
1952
1952
|
},
|
|
1953
1953
|
children: [
|
|
1954
|
-
|
|
1955
|
-
value:
|
|
1954
|
+
Wt(eo, {
|
|
1955
|
+
value: Mn,
|
|
1956
1956
|
children: l("conditionalFormat.automatic")
|
|
1957
1957
|
}),
|
|
1958
|
-
|
|
1958
|
+
Wt(eo, {
|
|
1959
1959
|
value: "leftToRight",
|
|
1960
1960
|
children: l("conditionalFormat.leftToRight")
|
|
1961
1961
|
}),
|
|
1962
|
-
|
|
1962
|
+
Wt(eo, {
|
|
1963
1963
|
value: "rightToLeft",
|
|
1964
1964
|
children: l("conditionalFormat.rightToLeft")
|
|
1965
1965
|
})
|
|
@@ -1967,79 +1967,79 @@ var In = [
|
|
|
1967
1967
|
})]
|
|
1968
1968
|
})]
|
|
1969
1969
|
})
|
|
1970
|
-
] }),
|
|
1970
|
+
] }), Et(xn, {
|
|
1971
1971
|
variant: "config",
|
|
1972
|
-
children: [
|
|
1972
|
+
children: [Wt(Dn, {
|
|
1973
1973
|
label: l("conditionalFormat.stop.minimum"),
|
|
1974
|
-
stop: c[0] ?? { type:
|
|
1975
|
-
allowedTypes:
|
|
1974
|
+
stop: c[0] ?? { type: H.ColorStopType.AutoMin },
|
|
1975
|
+
allowedTypes: Pn,
|
|
1976
1976
|
readOnly: r,
|
|
1977
1977
|
onStopChange: (e) => {
|
|
1978
1978
|
const t = c.slice();
|
|
1979
1979
|
t[0] = e, f({ stops: t });
|
|
1980
1980
|
}
|
|
1981
|
-
}),
|
|
1981
|
+
}), Wt(Dn, {
|
|
1982
1982
|
label: l("conditionalFormat.stop.maximum"),
|
|
1983
|
-
stop: c[1] ?? { type:
|
|
1984
|
-
allowedTypes:
|
|
1983
|
+
stop: c[1] ?? { type: H.ColorStopType.AutoMax },
|
|
1984
|
+
allowedTypes: On,
|
|
1985
1985
|
readOnly: r,
|
|
1986
1986
|
onStopChange: (e) => {
|
|
1987
1987
|
const t = c.slice();
|
|
1988
|
-
for (; t.length < 2;) t.push({ type:
|
|
1988
|
+
for (; t.length < 2;) t.push({ type: H.ColorStopType.AutoMax });
|
|
1989
1989
|
t[1] = e, f({ stops: t });
|
|
1990
1990
|
}
|
|
1991
1991
|
})]
|
|
1992
1992
|
})]
|
|
1993
1993
|
});
|
|
1994
1994
|
});
|
|
1995
|
-
|
|
1996
|
-
var
|
|
1995
|
+
An.displayName = "DataBarRulePanel";
|
|
1996
|
+
var Wn = To("conditionalFormat.noCellIcon"), En = To("conditionalFormat.cellIcon"), Bn = {
|
|
1997
1997
|
borderColor: "primary.main",
|
|
1998
1998
|
boxShadow: (e) => `inset 0 0 0 1px ${e.palette.primary.main}`
|
|
1999
|
-
},
|
|
1999
|
+
}, Rn = {
|
|
2000
2000
|
width: "28px",
|
|
2001
2001
|
height: "26px"
|
|
2002
|
-
},
|
|
2003
|
-
const { icon: t, onPick: o } = e, n =
|
|
2004
|
-
return
|
|
2002
|
+
}, Ln = it((e) => {
|
|
2003
|
+
const { icon: t, onPick: o } = e, n = ot();
|
|
2004
|
+
return Et(Vt, {
|
|
2005
2005
|
sx: {
|
|
2006
2006
|
display: "flex",
|
|
2007
2007
|
flexDirection: "column",
|
|
2008
2008
|
gap: "4px",
|
|
2009
2009
|
padding: "6px 8px"
|
|
2010
2010
|
},
|
|
2011
|
-
children: [
|
|
2011
|
+
children: [Wt(E, {
|
|
2012
2012
|
sheet: !0,
|
|
2013
|
-
title: n(
|
|
2013
|
+
title: n(Wn),
|
|
2014
2014
|
"aria-pressed": null === t,
|
|
2015
2015
|
sx: {
|
|
2016
|
-
...
|
|
2017
|
-
...null === t ?
|
|
2016
|
+
...Rn,
|
|
2017
|
+
...null === t ? Bn : null
|
|
2018
2018
|
},
|
|
2019
2019
|
onClick: () => {
|
|
2020
|
-
o({ ...
|
|
2020
|
+
o({ ...ae });
|
|
2021
2021
|
},
|
|
2022
|
-
children:
|
|
2022
|
+
children: Wt(ne, {
|
|
2023
2023
|
icons: [null],
|
|
2024
2024
|
size: 16
|
|
2025
2025
|
})
|
|
2026
|
-
}),
|
|
2026
|
+
}), Wt(Vt, {
|
|
2027
2027
|
sx: {
|
|
2028
2028
|
display: "grid",
|
|
2029
2029
|
gridTemplateColumns: "repeat(8, auto)",
|
|
2030
2030
|
justifyContent: "start",
|
|
2031
2031
|
gap: "3px"
|
|
2032
2032
|
},
|
|
2033
|
-
children:
|
|
2033
|
+
children: oe.map((e) => {
|
|
2034
2034
|
const r = (a = t, l = e.spec, !!a && a.iconKey === l.iconKey && a.color === l.color);
|
|
2035
2035
|
var a, l;
|
|
2036
|
-
return
|
|
2036
|
+
return Wt(E, {
|
|
2037
2037
|
sheet: !0,
|
|
2038
|
-
title:
|
|
2038
|
+
title: S(n, e.spec),
|
|
2039
2039
|
"aria-pressed": r,
|
|
2040
2040
|
sx: {
|
|
2041
|
-
...
|
|
2042
|
-
...r ?
|
|
2041
|
+
...Rn,
|
|
2042
|
+
...r ? Bn : null
|
|
2043
2043
|
},
|
|
2044
2044
|
onClick: () => {
|
|
2045
2045
|
o({
|
|
@@ -2047,7 +2047,7 @@ var An = So("conditionalFormat.noCellIcon"), Wn = So("conditionalFormat.cellIcon
|
|
|
2047
2047
|
id: e.id
|
|
2048
2048
|
});
|
|
2049
2049
|
},
|
|
2050
|
-
children:
|
|
2050
|
+
children: Wt(ne, {
|
|
2051
2051
|
icons: [e.spec],
|
|
2052
2052
|
size: 16
|
|
2053
2053
|
})
|
|
@@ -2056,25 +2056,25 @@ var An = So("conditionalFormat.noCellIcon"), Wn = So("conditionalFormat.cellIcon
|
|
|
2056
2056
|
})]
|
|
2057
2057
|
});
|
|
2058
2058
|
});
|
|
2059
|
-
|
|
2060
|
-
var
|
|
2061
|
-
const { icon: o, onPick: n, tooltip: r, ...a } = e, l =
|
|
2062
|
-
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, {
|
|
2063
2063
|
ref: t,
|
|
2064
|
-
createPopupPanel:
|
|
2065
|
-
const { closeFloat: t } = e, r =
|
|
2064
|
+
createPopupPanel: st((e) => {
|
|
2065
|
+
const { closeFloat: t } = e, r = Wt(Ln, {
|
|
2066
2066
|
icon: o,
|
|
2067
2067
|
onPick: (e) => {
|
|
2068
2068
|
t?.(), n(e);
|
|
2069
2069
|
}
|
|
2070
2070
|
});
|
|
2071
|
-
return
|
|
2071
|
+
return Tt({
|
|
2072
2072
|
...e,
|
|
2073
2073
|
children: r
|
|
2074
2074
|
});
|
|
2075
2075
|
}, [o, n]),
|
|
2076
|
-
tooltip: r ?? l(
|
|
2077
|
-
icon:
|
|
2076
|
+
tooltip: r ?? l(En),
|
|
2077
|
+
icon: Wt(ne, {
|
|
2078
2078
|
icons: [o],
|
|
2079
2079
|
size: 16
|
|
2080
2080
|
}),
|
|
@@ -2082,27 +2082,27 @@ var Ln = lt(rt((e, t) => {
|
|
|
2082
2082
|
...a
|
|
2083
2083
|
});
|
|
2084
2084
|
}));
|
|
2085
|
-
|
|
2086
|
-
var
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
],
|
|
2092
|
-
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) => {
|
|
2093
2093
|
const n = { ...t };
|
|
2094
2094
|
for (const [t, o] of Object.entries(e)) void 0 === o ? delete n[t] : n[t] = o;
|
|
2095
2095
|
o(n);
|
|
2096
|
-
}, u =
|
|
2097
|
-
const { closeFloat: t } = e, o =
|
|
2098
|
-
groups:
|
|
2096
|
+
}, u = st((e) => {
|
|
2097
|
+
const { closeFloat: t } = e, o = Wt(f, {
|
|
2098
|
+
groups: M,
|
|
2099
2099
|
disabled: n,
|
|
2100
2100
|
onPick: (e) => {
|
|
2101
|
-
t?.(), e.type ===
|
|
2101
|
+
t?.(), e.type === H.ScaleType.IconSet && e.iconSet && ((e) => {
|
|
2102
2102
|
if (e === l) return;
|
|
2103
|
-
const t =
|
|
2103
|
+
const t = ke(e);
|
|
2104
2104
|
let o = s;
|
|
2105
|
-
t !== s.length && (o =
|
|
2105
|
+
t !== s.length && (o = ve(t)), p({
|
|
2106
2106
|
iconSet: e,
|
|
2107
2107
|
stops: o,
|
|
2108
2108
|
icon: void 0
|
|
@@ -2110,42 +2110,42 @@ var Vn = [
|
|
|
2110
2110
|
})(e.iconSet);
|
|
2111
2111
|
}
|
|
2112
2112
|
});
|
|
2113
|
-
return
|
|
2113
|
+
return Tt({
|
|
2114
2114
|
...e,
|
|
2115
2115
|
children: o
|
|
2116
2116
|
});
|
|
2117
|
-
}, [n, t]), m =
|
|
2118
|
-
return
|
|
2117
|
+
}, [n, t]), m = z.camelToPrettyCase(l);
|
|
2118
|
+
return Et(Vt, {
|
|
2119
2119
|
sx: {
|
|
2120
2120
|
display: "flex",
|
|
2121
2121
|
flexDirection: "column",
|
|
2122
2122
|
gap: 1
|
|
2123
2123
|
},
|
|
2124
2124
|
...r,
|
|
2125
|
-
children: [
|
|
2126
|
-
|
|
2125
|
+
children: [Et(xn, { children: [
|
|
2126
|
+
Wt(Vt, {
|
|
2127
2127
|
sx: {
|
|
2128
2128
|
display: "flex",
|
|
2129
2129
|
alignItems: "center",
|
|
2130
2130
|
gap: 1
|
|
2131
2131
|
},
|
|
2132
|
-
children:
|
|
2132
|
+
children: Wt(xt, {
|
|
2133
2133
|
outlined: !0,
|
|
2134
2134
|
disabled: n,
|
|
2135
2135
|
label: m,
|
|
2136
2136
|
tooltip: m,
|
|
2137
|
-
icon:
|
|
2137
|
+
icon: Wt(Vt, {
|
|
2138
2138
|
sx: {
|
|
2139
2139
|
width: "82px",
|
|
2140
2140
|
display: "flex",
|
|
2141
2141
|
justifyContent: "center"
|
|
2142
2142
|
},
|
|
2143
|
-
children: i ?
|
|
2143
|
+
children: i ? Wt(mo, {
|
|
2144
2144
|
variant: "caption",
|
|
2145
2145
|
noWrap: !0,
|
|
2146
2146
|
children: m
|
|
2147
|
-
}) :
|
|
2148
|
-
icons:
|
|
2147
|
+
}) : Wt(ne, {
|
|
2148
|
+
icons: Ce(l),
|
|
2149
2149
|
order: "descending",
|
|
2150
2150
|
size: 14,
|
|
2151
2151
|
gap: 3
|
|
@@ -2154,53 +2154,53 @@ var Vn = [
|
|
|
2154
2154
|
createPopupPanel: u
|
|
2155
2155
|
})
|
|
2156
2156
|
}),
|
|
2157
|
-
i &&
|
|
2157
|
+
i && Wt(mo, {
|
|
2158
2158
|
variant: "caption",
|
|
2159
2159
|
sx: { color: "text.secondary" },
|
|
2160
2160
|
children: a("conditionalFormat.adoptedIconSet")
|
|
2161
2161
|
}),
|
|
2162
|
-
|
|
2162
|
+
Et(Vt, {
|
|
2163
2163
|
sx: {
|
|
2164
2164
|
display: "flex",
|
|
2165
2165
|
gap: 1
|
|
2166
2166
|
},
|
|
2167
|
-
children: [
|
|
2168
|
-
control:
|
|
2167
|
+
children: [Wt(Qt, {
|
|
2168
|
+
control: Wt(Kt, {
|
|
2169
2169
|
size: "small",
|
|
2170
2170
|
checked: !1 === t.showValue,
|
|
2171
2171
|
disabled: n,
|
|
2172
2172
|
onChange: (e) => p({ showValue: !e.target.checked && void 0 })
|
|
2173
2173
|
}),
|
|
2174
|
-
label:
|
|
2174
|
+
label: Wt(mo, {
|
|
2175
2175
|
variant: "body2",
|
|
2176
2176
|
children: a("conditionalFormat.showIconsOnly")
|
|
2177
2177
|
})
|
|
2178
|
-
}),
|
|
2179
|
-
control:
|
|
2178
|
+
}), Wt(Qt, {
|
|
2179
|
+
control: Wt(Kt, {
|
|
2180
2180
|
size: "small",
|
|
2181
2181
|
checked: t.reverse ?? !1,
|
|
2182
2182
|
disabled: n,
|
|
2183
2183
|
onChange: (e) => p({ reverse: !!e.target.checked || void 0 })
|
|
2184
2184
|
}),
|
|
2185
|
-
label:
|
|
2185
|
+
label: Wt(mo, {
|
|
2186
2186
|
variant: "body2",
|
|
2187
2187
|
children: a("conditionalFormat.reverseIcons")
|
|
2188
2188
|
})
|
|
2189
2189
|
})]
|
|
2190
2190
|
})
|
|
2191
|
-
] }),
|
|
2191
|
+
] }), Wt(xn, {
|
|
2192
2192
|
variant: "config",
|
|
2193
2193
|
children: s.map((e, r) => {
|
|
2194
2194
|
const a = t.reverse ? d - 1 - r : r;
|
|
2195
|
-
return
|
|
2195
|
+
return Wt(Dn, {
|
|
2196
2196
|
stop: e,
|
|
2197
|
-
allowedTypes:
|
|
2197
|
+
allowedTypes: zn,
|
|
2198
2198
|
showExclusive: !0,
|
|
2199
2199
|
readOnly: n || 0 === r,
|
|
2200
|
-
leading:
|
|
2200
|
+
leading: Wt(Vn, {
|
|
2201
2201
|
icon: c[r] ?? null,
|
|
2202
2202
|
disabled: n || i,
|
|
2203
|
-
onPick: (e) => o(
|
|
2203
|
+
onPick: (e) => o(Ae(t, a, e))
|
|
2204
2204
|
}),
|
|
2205
2205
|
onStopChange: (e) => {
|
|
2206
2206
|
const t = s.slice();
|
|
@@ -2211,26 +2211,26 @@ var Vn = [
|
|
|
2211
2211
|
})]
|
|
2212
2212
|
});
|
|
2213
2213
|
});
|
|
2214
|
-
|
|
2215
|
-
var
|
|
2214
|
+
jn.displayName = "IconSetRulePanel";
|
|
2215
|
+
var $n = (e, t, o) => B(e, t)?.toCSS("adaptive") ?? o, Kn = (e, t, o) => {
|
|
2216
2216
|
if (!e) return o;
|
|
2217
|
-
if ("string" == typeof e) return
|
|
2218
|
-
if (e.type ===
|
|
2217
|
+
if ("string" == typeof e) return $n(e, t, o);
|
|
2218
|
+
if (e.type === q.Type.None) return o;
|
|
2219
2219
|
const n = e, r = e;
|
|
2220
|
-
return
|
|
2221
|
-
},
|
|
2222
|
-
const { conditionalFormat: t, size: o = 28, ...n } = e, { workbook: r, themeKey: a } =
|
|
2223
|
-
|
|
2224
|
-
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(() => {
|
|
2225
2225
|
try {
|
|
2226
2226
|
return r?.getStyles().getNormal().getFont().toCSS("adaptive") ?? {};
|
|
2227
2227
|
} catch {
|
|
2228
2228
|
return {};
|
|
2229
2229
|
}
|
|
2230
|
-
}, [r, a]), d =
|
|
2231
|
-
if (l?.type ===
|
|
2232
|
-
if (l?.type ===
|
|
2233
|
-
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, {
|
|
2234
2234
|
sx: {
|
|
2235
2235
|
display: "flex",
|
|
2236
2236
|
alignItems: "center",
|
|
@@ -2239,15 +2239,15 @@ var jn = (e, t, o) => E(e, t)?.toCSS("adaptive") ?? o, $n = (e, t, o) => {
|
|
|
2239
2239
|
height: "100%",
|
|
2240
2240
|
px: .5
|
|
2241
2241
|
},
|
|
2242
|
-
children:
|
|
2243
|
-
icons:
|
|
2242
|
+
children: Wt(ne, {
|
|
2243
|
+
icons: we(l),
|
|
2244
2244
|
order: "descending",
|
|
2245
2245
|
size: 14,
|
|
2246
2246
|
gap: 3
|
|
2247
2247
|
})
|
|
2248
2248
|
});
|
|
2249
|
-
const e = i?.font, t = e?.underline && e.underline !==
|
|
2250
|
-
return
|
|
2249
|
+
const e = i?.font, t = e?.underline && e.underline !== G.UnderlineStyle.None;
|
|
2250
|
+
return Wt(Vt, {
|
|
2251
2251
|
sx: {
|
|
2252
2252
|
width: "100%",
|
|
2253
2253
|
height: "100%",
|
|
@@ -2255,14 +2255,14 @@ var jn = (e, t, o) => E(e, t)?.toCSS("adaptive") ?? o, $n = (e, t, o) => {
|
|
|
2255
2255
|
alignItems: "center",
|
|
2256
2256
|
justifyContent: "center",
|
|
2257
2257
|
...s,
|
|
2258
|
-
backgroundColor:
|
|
2259
|
-
...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,
|
|
2260
2260
|
...e?.weight ? { fontWeight: e.weight } : null,
|
|
2261
2261
|
...e?.style ? { fontStyle: e.style } : null,
|
|
2262
2262
|
textDecoration: [t ? "underline" : "", e?.strike ? "line-through" : ""].join(" ").trim() || "none",
|
|
2263
2263
|
fontSize: `${Math.round(.5 * o)}px`,
|
|
2264
2264
|
lineHeight: 1,
|
|
2265
|
-
outline: i?.borders ? `1px solid ${
|
|
2265
|
+
outline: i?.borders ? `1px solid ${$n(Object.values(i.borders)[0]?.color, r, D)}` : void 0,
|
|
2266
2266
|
outlineOffset: "-3px"
|
|
2267
2267
|
},
|
|
2268
2268
|
children: "Aa"
|
|
@@ -2275,7 +2275,7 @@ var jn = (e, t, o) => E(e, t)?.toCSS("adaptive") ?? o, $n = (e, t, o) => {
|
|
|
2275
2275
|
r,
|
|
2276
2276
|
a
|
|
2277
2277
|
]);
|
|
2278
|
-
return
|
|
2278
|
+
return Wt(E, {
|
|
2279
2279
|
sheet: !0,
|
|
2280
2280
|
className: "sxl-cf-rule-preview",
|
|
2281
2281
|
sx: {
|
|
@@ -2287,25 +2287,25 @@ var jn = (e, t, o) => E(e, t)?.toCSS("adaptive") ?? o, $n = (e, t, o) => {
|
|
|
2287
2287
|
children: d
|
|
2288
2288
|
});
|
|
2289
2289
|
});
|
|
2290
|
-
|
|
2291
|
-
var
|
|
2290
|
+
_n.displayName = "RulePreview";
|
|
2291
|
+
var Hn = (e, t) => {
|
|
2292
2292
|
const o = e.getCondition()?.toString();
|
|
2293
2293
|
if (o) return o;
|
|
2294
2294
|
const n = e.getScale();
|
|
2295
|
-
return n ?
|
|
2296
|
-
},
|
|
2297
|
-
classic:
|
|
2298
|
-
[
|
|
2299
|
-
[
|
|
2300
|
-
[
|
|
2301
|
-
},
|
|
2302
|
-
const { conditionalFormat: t } = e, o =
|
|
2303
|
-
|
|
2304
|
-
const n = t.getScale(),
|
|
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) => {
|
|
2305
2305
|
t.update({ scale: e });
|
|
2306
|
-
}, p =
|
|
2306
|
+
}, p = Et(oo, {
|
|
2307
2307
|
tabIndex: 0,
|
|
2308
|
-
className:
|
|
2308
|
+
className: a["editor-panel"],
|
|
2309
2309
|
sx: {
|
|
2310
2310
|
gap: (e) => e.spacing(1),
|
|
2311
2311
|
paddingTop: (e) => e.spacing(1.25),
|
|
@@ -2317,7 +2317,7 @@ var _n = (e, t) => {
|
|
|
2317
2317
|
overflow: "auto"
|
|
2318
2318
|
},
|
|
2319
2319
|
children: [
|
|
2320
|
-
|
|
2320
|
+
Et(Vt, {
|
|
2321
2321
|
sx: {
|
|
2322
2322
|
display: "flex",
|
|
2323
2323
|
flexDirection: "column",
|
|
@@ -2325,42 +2325,42 @@ var _n = (e, t) => {
|
|
|
2325
2325
|
margin: (e) => e.spacing(1.25),
|
|
2326
2326
|
marginBottom: 0
|
|
2327
2327
|
},
|
|
2328
|
-
children: [
|
|
2328
|
+
children: [Et(Vt, {
|
|
2329
2329
|
sx: {
|
|
2330
2330
|
display: "flex",
|
|
2331
2331
|
alignItems: "center",
|
|
2332
2332
|
gap: (e) => e.spacing(1.5)
|
|
2333
2333
|
},
|
|
2334
|
-
children: [
|
|
2334
|
+
children: [Wt(_n, {
|
|
2335
2335
|
conditionalFormat: t,
|
|
2336
2336
|
size: 48
|
|
2337
|
-
}),
|
|
2337
|
+
}), Wt(mo, {
|
|
2338
2338
|
variant: "body2",
|
|
2339
2339
|
sx: {
|
|
2340
2340
|
minWidth: 0,
|
|
2341
2341
|
wordBreak: "break-word"
|
|
2342
2342
|
},
|
|
2343
|
-
children:
|
|
2343
|
+
children: Hn(t, o)
|
|
2344
2344
|
})]
|
|
2345
|
-
}),
|
|
2345
|
+
}), Wt(y, {
|
|
2346
2346
|
item: t,
|
|
2347
2347
|
label: o("conditionalFormat.applyTo")
|
|
2348
2348
|
})]
|
|
2349
2349
|
}),
|
|
2350
|
-
|
|
2350
|
+
Wt(io, {
|
|
2351
2351
|
value: s,
|
|
2352
2352
|
onChange: (e, o) => {
|
|
2353
2353
|
i || ((e) => {
|
|
2354
|
-
if (e !== s) if ("classic" === s ? (d.current.condition =
|
|
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
2355
|
condition: d.current.condition ?? {
|
|
2356
|
-
operator:
|
|
2356
|
+
operator: _.BuiltInOperatorNames.Between,
|
|
2357
2357
|
param: null
|
|
2358
2358
|
},
|
|
2359
2359
|
style: d.current.style ?? null,
|
|
2360
2360
|
scale: null
|
|
2361
2361
|
});
|
|
2362
2362
|
else {
|
|
2363
|
-
const o = d.current.scales[e] ?? (e ===
|
|
2363
|
+
const o = d.current.scales[e] ?? (e === H.ScaleType.ColorScale ? fe() : e === H.ScaleType.DataBar ? be() : xe());
|
|
2364
2364
|
t.update({
|
|
2365
2365
|
scale: o,
|
|
2366
2366
|
condition: null,
|
|
@@ -2383,38 +2383,38 @@ var _n = (e, t) => {
|
|
|
2383
2383
|
minWidth: 0
|
|
2384
2384
|
}
|
|
2385
2385
|
},
|
|
2386
|
-
children: Object.keys(
|
|
2386
|
+
children: Object.keys(Un).map((e) => Wt(lo, {
|
|
2387
2387
|
value: e,
|
|
2388
|
-
label: o(
|
|
2388
|
+
label: o(Un[e])
|
|
2389
2389
|
}, e))
|
|
2390
2390
|
}),
|
|
2391
|
-
"classic" === s &&
|
|
2391
|
+
"classic" === s && Et(At, { children: [Wt(Sn, {
|
|
2392
2392
|
format: l,
|
|
2393
2393
|
readOnly: i,
|
|
2394
2394
|
onFormatChange: (e) => t.update({ style: e })
|
|
2395
|
-
}),
|
|
2395
|
+
}), Wt(bn, {
|
|
2396
2396
|
selectorTitle: o("conditionalFormat.highlight"),
|
|
2397
|
-
condition:
|
|
2397
|
+
condition: r,
|
|
2398
2398
|
ranges: t.getRanges(),
|
|
2399
2399
|
readOnly: i,
|
|
2400
2400
|
onConditionChange: (e) => t.setCondition(e)
|
|
2401
2401
|
})] }),
|
|
2402
|
-
n?.type ===
|
|
2402
|
+
n?.type === H.ScaleType.ColorScale && Wt(In, {
|
|
2403
2403
|
scale: n,
|
|
2404
2404
|
onScaleChange: c,
|
|
2405
2405
|
readOnly: i
|
|
2406
2406
|
}),
|
|
2407
|
-
n?.type ===
|
|
2407
|
+
n?.type === H.ScaleType.DataBar && Wt(An, {
|
|
2408
2408
|
scale: n,
|
|
2409
2409
|
onScaleChange: c,
|
|
2410
2410
|
readOnly: i
|
|
2411
2411
|
}),
|
|
2412
|
-
n?.type ===
|
|
2412
|
+
n?.type === H.ScaleType.IconSet && Wt(jn, {
|
|
2413
2413
|
scale: n,
|
|
2414
2414
|
onScaleChange: c,
|
|
2415
2415
|
readOnly: i
|
|
2416
2416
|
}),
|
|
2417
|
-
"classic" === s &&
|
|
2417
|
+
"classic" === s && Wt(Vt, {
|
|
2418
2418
|
sx: {
|
|
2419
2419
|
pl: 2,
|
|
2420
2420
|
pr: 2,
|
|
@@ -2422,8 +2422,8 @@ var _n = (e, t) => {
|
|
|
2422
2422
|
borderColor: "divider",
|
|
2423
2423
|
borderRadius: 1
|
|
2424
2424
|
},
|
|
2425
|
-
children:
|
|
2426
|
-
control:
|
|
2425
|
+
children: Wt(Qt, {
|
|
2426
|
+
control: Wt(Kt, {
|
|
2427
2427
|
checked: t.isStopIfTrue(),
|
|
2428
2428
|
disabled: i,
|
|
2429
2429
|
onChange: (e) => t.setStopIfTrue(e.target.checked)
|
|
@@ -2433,15 +2433,15 @@ var _n = (e, t) => {
|
|
|
2433
2433
|
})
|
|
2434
2434
|
]
|
|
2435
2435
|
});
|
|
2436
|
-
return
|
|
2436
|
+
return Wt(Eo.Provider, {
|
|
2437
2437
|
value: t,
|
|
2438
2438
|
children: p
|
|
2439
2439
|
});
|
|
2440
2440
|
});
|
|
2441
|
-
|
|
2442
|
-
var
|
|
2443
|
-
const t =
|
|
2444
|
-
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, {
|
|
2445
2445
|
sx: {
|
|
2446
2446
|
display: "inline-flex",
|
|
2447
2447
|
alignItems: "center",
|
|
@@ -2453,34 +2453,34 @@ var qn = lt(({ item: e }) => {
|
|
|
2453
2453
|
borderRadius: 1,
|
|
2454
2454
|
color: "text.secondary"
|
|
2455
2455
|
},
|
|
2456
|
-
children:
|
|
2456
|
+
children: Wt(mo, {
|
|
2457
2457
|
variant: "caption",
|
|
2458
2458
|
children: t("conditionalFormat.stopIfTrue")
|
|
2459
2459
|
})
|
|
2460
2460
|
});
|
|
2461
2461
|
});
|
|
2462
|
-
|
|
2463
|
-
var
|
|
2462
|
+
Gn.displayName = "StopIfTrueBadge";
|
|
2463
|
+
var Qn = it(({ item: e }) => Wt(y, {
|
|
2464
2464
|
item: e,
|
|
2465
|
-
label:
|
|
2465
|
+
label: ot()("conditionalFormat.applyTo"),
|
|
2466
2466
|
helperText: null
|
|
2467
2467
|
}));
|
|
2468
|
-
|
|
2469
|
-
var
|
|
2468
|
+
Qn.displayName = "ConditionalFormatCardRanges";
|
|
2469
|
+
var Yn = {
|
|
2470
2470
|
key: "conditional-format",
|
|
2471
2471
|
messageKeys: {
|
|
2472
|
-
none:
|
|
2473
|
-
addPrompt:
|
|
2474
|
-
heading:
|
|
2475
|
-
insert:
|
|
2476
|
-
new:
|
|
2477
|
-
moveUp:
|
|
2478
|
-
moveDown:
|
|
2479
|
-
edit:
|
|
2480
|
-
duplicate:
|
|
2481
|
-
delete:
|
|
2482
|
-
cancel:
|
|
2483
|
-
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")
|
|
2484
2484
|
},
|
|
2485
2485
|
getCollection: (e) => e.getConditionalFormats(),
|
|
2486
2486
|
changeEvents: ["onConditionalFormatsChange"],
|
|
@@ -2497,35 +2497,35 @@ var Qn = {
|
|
|
2497
2497
|
stopIfTrue: t.stopIfTrue ?? !1
|
|
2498
2498
|
});
|
|
2499
2499
|
},
|
|
2500
|
-
getCardTitle:
|
|
2501
|
-
CardMedia: ({ item: e }) =>
|
|
2500
|
+
getCardTitle: Hn,
|
|
2501
|
+
CardMedia: ({ item: e }) => Wt(_n, {
|
|
2502
2502
|
conditionalFormat: e,
|
|
2503
2503
|
size: 32
|
|
2504
2504
|
}),
|
|
2505
|
-
CardSubtitle:
|
|
2506
|
-
CardBody:
|
|
2507
|
-
EditorBody: ({ item: e }) =>
|
|
2508
|
-
},
|
|
2505
|
+
CardSubtitle: Qn,
|
|
2506
|
+
CardBody: Gn,
|
|
2507
|
+
EditorBody: ({ item: e }) => Wt(qn, { conditionalFormat: e })
|
|
2508
|
+
}, Jn = it(at((e, t) => {
|
|
2509
2509
|
const { workbook: o, args: n, ...r } = e;
|
|
2510
|
-
return
|
|
2510
|
+
return Wt(R, {
|
|
2511
2511
|
ref: t,
|
|
2512
2512
|
workbook: o,
|
|
2513
|
-
descriptor:
|
|
2513
|
+
descriptor: Yn,
|
|
2514
2514
|
args: n,
|
|
2515
2515
|
dragReorder: !0,
|
|
2516
2516
|
...r
|
|
2517
2517
|
});
|
|
2518
2518
|
}));
|
|
2519
|
-
|
|
2520
|
-
var
|
|
2519
|
+
Jn.displayName = "ConditionalFormatDetailsPanel";
|
|
2520
|
+
var Xn = (e) => {
|
|
2521
2521
|
const { model: t, entryKey: o, frame: n, args: r, ref: a, ...l } = e;
|
|
2522
|
-
return
|
|
2522
|
+
return Wt(Jn, {
|
|
2523
2523
|
ref: a,
|
|
2524
2524
|
workbook: t,
|
|
2525
2525
|
args: r,
|
|
2526
2526
|
...l
|
|
2527
2527
|
});
|
|
2528
|
-
},
|
|
2528
|
+
}, Zn = {
|
|
2529
2529
|
card: "_card_h0jnt_7",
|
|
2530
2530
|
actionRoot: "_actionRoot_h0jnt_11",
|
|
2531
2531
|
icons: "_icons_h0jnt_16",
|
|
@@ -2535,63 +2535,63 @@ var Jn = (e) => {
|
|
|
2535
2535
|
paper: "_paper_h0jnt_37",
|
|
2536
2536
|
checkIcon: "_checkIcon_h0jnt_42",
|
|
2537
2537
|
button: "_button_h0jnt_47"
|
|
2538
|
-
},
|
|
2539
|
-
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(() => {
|
|
2540
2540
|
p((e) => !e);
|
|
2541
|
-
}, []), h =
|
|
2541
|
+
}, []), h = st(() => {
|
|
2542
2542
|
d(o);
|
|
2543
2543
|
}, [o, d]);
|
|
2544
2544
|
let y = u?.message;
|
|
2545
|
-
return !y &&
|
|
2545
|
+
return !y && lt(n) && (y = n), y || "string" != typeof n || (y = n), y || (y = `Unknown Error: ${n}`), Wt(Po, {
|
|
2546
2546
|
ref: t,
|
|
2547
|
-
className:
|
|
2548
|
-
children:
|
|
2549
|
-
className:
|
|
2547
|
+
className: Do(Zn.root, "error-snackbar"),
|
|
2548
|
+
children: Et(jt, {
|
|
2549
|
+
className: Zn.card,
|
|
2550
2550
|
style: {
|
|
2551
2551
|
backgroundColor: "var(--sxl-color-error)",
|
|
2552
2552
|
color: "var(--sxl-color-error-content)",
|
|
2553
2553
|
border: "1px solid var(--sxl-color-error)"
|
|
2554
2554
|
},
|
|
2555
|
-
children: [
|
|
2556
|
-
className:
|
|
2555
|
+
children: [Et($t, {
|
|
2556
|
+
className: Zn.actionRoot,
|
|
2557
2557
|
children: [
|
|
2558
2558
|
l ? null : r?.error,
|
|
2559
|
-
|
|
2559
|
+
Wt(mo, {
|
|
2560
2560
|
variant: "body2",
|
|
2561
2561
|
component: "div",
|
|
2562
|
-
className:
|
|
2562
|
+
className: Zn.typography,
|
|
2563
2563
|
children: y
|
|
2564
2564
|
}),
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
className:
|
|
2568
|
-
children: [m ?
|
|
2565
|
+
Wt("div", { style: { flex: "1 1 auto" } }),
|
|
2566
|
+
Et("div", {
|
|
2567
|
+
className: Zn.icons,
|
|
2568
|
+
children: [m ? Wt(Jt, {
|
|
2569
2569
|
"aria-label": s("toast.showMore"),
|
|
2570
2570
|
size: "small",
|
|
2571
|
-
className:
|
|
2571
|
+
className: Do(Zn.expand, { [Zn.expandOpen]: c }),
|
|
2572
2572
|
onClick: g,
|
|
2573
|
-
children:
|
|
2574
|
-
}) : null,
|
|
2573
|
+
children: Wt(Re, { iconKey: "ExpandMore" })
|
|
2574
|
+
}) : null, Wt(Jt, {
|
|
2575
2575
|
size: "small",
|
|
2576
|
-
className:
|
|
2576
|
+
className: Zn.expand,
|
|
2577
2577
|
onClick: h,
|
|
2578
|
-
children:
|
|
2578
|
+
children: Wt(Re, {
|
|
2579
2579
|
iconKey: "Close",
|
|
2580
2580
|
style: { transform: "scale(0.8)" }
|
|
2581
2581
|
})
|
|
2582
2582
|
})]
|
|
2583
2583
|
})
|
|
2584
2584
|
]
|
|
2585
|
-
}), m ?
|
|
2585
|
+
}), m ? Wt(_t, {
|
|
2586
2586
|
in: c,
|
|
2587
2587
|
timeout: "auto",
|
|
2588
|
-
children:
|
|
2589
|
-
className:
|
|
2588
|
+
children: Wt("div", {
|
|
2589
|
+
className: Zn.stackTraceContainer,
|
|
2590
2590
|
style: {
|
|
2591
2591
|
backgroundColor: "color-mix(in srgb, var(--sxl-color-error) 90%, var(--sxl-color-base-100))",
|
|
2592
2592
|
borderTop: "1px solid var(--sxl-color-error)"
|
|
2593
2593
|
},
|
|
2594
|
-
children:
|
|
2594
|
+
children: Wt(wt, {
|
|
2595
2595
|
error: a,
|
|
2596
2596
|
hideLineNumbers: !0
|
|
2597
2597
|
})
|
|
@@ -2600,11 +2600,11 @@ var Jn = (e) => {
|
|
|
2600
2600
|
})
|
|
2601
2601
|
});
|
|
2602
2602
|
}));
|
|
2603
|
-
|
|
2604
|
-
var
|
|
2603
|
+
er.displayName = "ToastError";
|
|
2604
|
+
var tr = Wt(() => Wt(vt, {
|
|
2605
2605
|
label: "SheetXL",
|
|
2606
|
-
description:
|
|
2607
|
-
children:
|
|
2606
|
+
description: ot()("logo.description"),
|
|
2607
|
+
children: Wt(Vt, {
|
|
2608
2608
|
component: "a",
|
|
2609
2609
|
href: "https://www.sheetxl.com",
|
|
2610
2610
|
target: "_blank",
|
|
@@ -2617,24 +2617,24 @@ var er = At(() => At(xt, {
|
|
|
2617
2617
|
marginLeft: "6px",
|
|
2618
2618
|
cursor: "pointer"
|
|
2619
2619
|
},
|
|
2620
|
-
children:
|
|
2620
|
+
children: Wt(re, { style: {
|
|
2621
2621
|
width: "24px",
|
|
2622
2622
|
height: "24px"
|
|
2623
2623
|
} })
|
|
2624
2624
|
})
|
|
2625
|
-
}), {}),
|
|
2626
|
-
const { workbook: o, className: n, logo: r =
|
|
2627
|
-
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, {
|
|
2628
2628
|
...s,
|
|
2629
|
-
ref:
|
|
2629
|
+
ref: No([
|
|
2630
2630
|
u,
|
|
2631
2631
|
d,
|
|
2632
2632
|
t
|
|
2633
2633
|
]),
|
|
2634
2634
|
className: n,
|
|
2635
|
-
children:
|
|
2635
|
+
children: O({
|
|
2636
2636
|
isCompact: p,
|
|
2637
|
-
wrapperSelect: (e) =>
|
|
2637
|
+
wrapperSelect: (e) => Et(Vt, {
|
|
2638
2638
|
sx: {
|
|
2639
2639
|
display: "grid",
|
|
2640
2640
|
gridTemplateColumns: "1fr auto 1fr",
|
|
@@ -2645,7 +2645,7 @@ var er = At(() => At(xt, {
|
|
|
2645
2645
|
paddingRight: (e) => e.spacing(1)
|
|
2646
2646
|
},
|
|
2647
2647
|
children: [
|
|
2648
|
-
|
|
2648
|
+
Et(Vt, {
|
|
2649
2649
|
sx: {
|
|
2650
2650
|
display: "flex",
|
|
2651
2651
|
flexDirection: "row",
|
|
@@ -2653,7 +2653,7 @@ var er = At(() => At(xt, {
|
|
|
2653
2653
|
justifyContent: "start",
|
|
2654
2654
|
gap: (e) => e.spacing(.5)
|
|
2655
2655
|
},
|
|
2656
|
-
children: [r,
|
|
2656
|
+
children: [r, Et(Vt, {
|
|
2657
2657
|
sx: {
|
|
2658
2658
|
display: "flex",
|
|
2659
2659
|
flexDirection: "row",
|
|
@@ -2663,7 +2663,7 @@ var er = At(() => At(xt, {
|
|
|
2663
2663
|
children: [l, e]
|
|
2664
2664
|
})]
|
|
2665
2665
|
}),
|
|
2666
|
-
|
|
2666
|
+
Wt(Vt, {
|
|
2667
2667
|
sx: {
|
|
2668
2668
|
display: "flex",
|
|
2669
2669
|
flexDirection: "row",
|
|
@@ -2674,7 +2674,7 @@ var er = At(() => At(xt, {
|
|
|
2674
2674
|
},
|
|
2675
2675
|
children: a
|
|
2676
2676
|
}),
|
|
2677
|
-
|
|
2677
|
+
Wt(Vt, {
|
|
2678
2678
|
sx: {
|
|
2679
2679
|
display: "flex",
|
|
2680
2680
|
alignItems: "center",
|
|
@@ -2687,12 +2687,12 @@ var er = At(() => At(xt, {
|
|
|
2687
2687
|
})
|
|
2688
2688
|
});
|
|
2689
2689
|
}));
|
|
2690
|
-
|
|
2691
|
-
var
|
|
2690
|
+
or.displayName = "StudioToolbar";
|
|
2691
|
+
var nr = (e, t) => {
|
|
2692
2692
|
const o = new URL(window.location.pathname, window.location.origin);
|
|
2693
|
-
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");
|
|
2694
2694
|
};
|
|
2695
|
-
function
|
|
2695
|
+
function rr(e, t) {
|
|
2696
2696
|
const { workbook: o, setWorkbook: n, workbookTitle: r = "export", isDirty: a, notifier: l, refSave: i } = t;
|
|
2697
2697
|
let s = !1;
|
|
2698
2698
|
const d = async (e = null, t = null, o = null) => {
|
|
@@ -2701,20 +2701,20 @@ function nr(e, t) {
|
|
|
2701
2701
|
typedCreateWorkbookOptions: t ?? void 0,
|
|
2702
2702
|
onPassword: async ({ origin: e, validate: t }) => {
|
|
2703
2703
|
const o = await l.showInput({
|
|
2704
|
-
title:
|
|
2705
|
-
description:
|
|
2704
|
+
title: Fo("dialog.password.title"),
|
|
2705
|
+
description: Fo("dialog.password.open.description", { name: e.getName() ?? "" }),
|
|
2706
2706
|
inputType: "password",
|
|
2707
2707
|
options: [{
|
|
2708
2708
|
id: "Open",
|
|
2709
|
-
label: () =>
|
|
2709
|
+
label: () => Fo("dialog.open")
|
|
2710
2710
|
}, "Cancel"],
|
|
2711
2711
|
defaultOption: "Open",
|
|
2712
2712
|
onValidateInput: async (e, o) => void 0 === o ? { valid: !0 } : e ? await t(e) ? { valid: !0 } : {
|
|
2713
2713
|
valid: !1,
|
|
2714
|
-
message:
|
|
2714
|
+
message: Fo("dialog.password.open.retry")
|
|
2715
2715
|
} : {
|
|
2716
2716
|
valid: !1,
|
|
2717
|
-
message:
|
|
2717
|
+
message: Fo("dialog.password.open.required")
|
|
2718
2718
|
}
|
|
2719
2719
|
});
|
|
2720
2720
|
return "Open" === o?.option ? o.input ?? null : null;
|
|
@@ -2726,11 +2726,11 @@ function nr(e, t) {
|
|
|
2726
2726
|
let a;
|
|
2727
2727
|
o && (r.progress.onStart = o);
|
|
2728
2728
|
let i = -5;
|
|
2729
|
-
return
|
|
2729
|
+
return ue.read({
|
|
2730
2730
|
...r,
|
|
2731
2731
|
progress: {
|
|
2732
2732
|
async onStart(e, t) {
|
|
2733
|
-
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);
|
|
2734
2734
|
},
|
|
2735
2735
|
onProgress(e, t) {
|
|
2736
2736
|
if (!t) return;
|
|
@@ -2743,7 +2743,7 @@ function nr(e, t) {
|
|
|
2743
2743
|
o - i < 5 || (i = o, a?.setProgress?.(e, t));
|
|
2744
2744
|
},
|
|
2745
2745
|
onComplete() {
|
|
2746
|
-
a?.(), n.length > 0 && (l.showMessage(
|
|
2746
|
+
a?.(), n.length > 0 && (l.showMessage(Fo("workbook.importWarnings")), console.warn("Import warnings:\n" + n.join("\n")));
|
|
2747
2747
|
},
|
|
2748
2748
|
onWarning(e, t) {
|
|
2749
2749
|
r?.progress?.onWarning?.(e, t);
|
|
@@ -2756,7 +2756,7 @@ function nr(e, t) {
|
|
|
2756
2756
|
format: t?.key,
|
|
2757
2757
|
progress: {
|
|
2758
2758
|
async onStart(e) {
|
|
2759
|
-
a = await l?.showBusy?.(
|
|
2759
|
+
a = await l?.showBusy?.(Fo("workbook.saving", { name: e?.getName() ?? "" }));
|
|
2760
2760
|
},
|
|
2761
2761
|
onComplete() {
|
|
2762
2762
|
a?.();
|
|
@@ -2764,55 +2764,55 @@ function nr(e, t) {
|
|
|
2764
2764
|
},
|
|
2765
2765
|
onWarnings: n ?? (async ({ warnings: e, origin: t, canCancel: o }) => {
|
|
2766
2766
|
a?.(), console.warn(`Not written to '${t.getName()}':\n${e.map((e) => ` ${e.message}`).join("\n")}`);
|
|
2767
|
-
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");
|
|
2768
2768
|
return o ? "Save" === await l.showOptions({
|
|
2769
2769
|
title: n,
|
|
2770
|
-
type:
|
|
2771
|
-
description: `${
|
|
2770
|
+
type: ze.Warning,
|
|
2771
|
+
description: `${Fo("dialog.writeWarnings.confirm", { format: i })}\n\n${s}`,
|
|
2772
2772
|
options: [{
|
|
2773
2773
|
id: "Save",
|
|
2774
|
-
label: () =>
|
|
2774
|
+
label: () => Fo("dialog.save")
|
|
2775
2775
|
}, "Cancel"],
|
|
2776
2776
|
defaultOption: "Cancel"
|
|
2777
|
-
}) && (a = await l?.showBusy?.(
|
|
2777
|
+
}) && (a = await l?.showBusy?.(Fo("workbook.saving", { name: t?.getName() ?? "" })), !0) : (l.showOptions({
|
|
2778
2778
|
title: n,
|
|
2779
|
-
type:
|
|
2780
|
-
description: `${
|
|
2779
|
+
type: ze.Warning,
|
|
2780
|
+
description: `${Fo("dialog.writeWarnings.saved", { format: i })}\n\n${s}`,
|
|
2781
2781
|
options: ["Ok"]
|
|
2782
2782
|
}), !0);
|
|
2783
2783
|
})
|
|
2784
2784
|
};
|
|
2785
2785
|
let s;
|
|
2786
2786
|
if (o) {
|
|
2787
|
-
const o = e.getOrigin(), n = t?.exts?.[0] ?? (o.getExtension() || "sxl"), a = `${r || o.getName() ||
|
|
2788
|
-
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, {
|
|
2789
2789
|
...i,
|
|
2790
2790
|
prompt: !0
|
|
2791
2791
|
});
|
|
2792
|
-
} else s = await
|
|
2792
|
+
} else s = await ue.write(e, void 0, i);
|
|
2793
2793
|
return s;
|
|
2794
2794
|
};
|
|
2795
2795
|
let p = null;
|
|
2796
2796
|
return e.updateCommand("newWorkbook", { callback: async (e) => {
|
|
2797
|
-
const t =
|
|
2797
|
+
const t = ue.canRead() && !a();
|
|
2798
2798
|
e?.source ? t && p ? await p({
|
|
2799
2799
|
url: e.source,
|
|
2800
2800
|
title: e.title
|
|
2801
|
-
}) :
|
|
2801
|
+
}) : nr(e.source, e.title) : t ? n({}) : nr();
|
|
2802
2802
|
} }), e.updateCommand("closeWorkbook", { callback: async () => {
|
|
2803
2803
|
a() && "Close" !== await l.showOptions({
|
|
2804
|
-
title:
|
|
2805
|
-
description:
|
|
2804
|
+
title: Fo("dialog.confirm.title"),
|
|
2805
|
+
description: Fo("dialog.unsavedChanges"),
|
|
2806
2806
|
options: [{
|
|
2807
2807
|
id: "Close",
|
|
2808
|
-
label: () =>
|
|
2808
|
+
label: () => Fo("dialog.close")
|
|
2809
2809
|
}, "Cancel"],
|
|
2810
2810
|
defaultOption: "Cancel"
|
|
2811
2811
|
}) || window.close();
|
|
2812
2812
|
} }), (async () => {
|
|
2813
|
-
const t = await
|
|
2813
|
+
const t = await ue.getWriteFormats();
|
|
2814
2814
|
if (s) return;
|
|
2815
|
-
const r =
|
|
2815
|
+
const r = ue.canWrite(), u = ue.canRead();
|
|
2816
2816
|
if (r) {
|
|
2817
2817
|
const n = (e) => {
|
|
2818
2818
|
const n = e ? t.find((t) => t.key === e) : void 0;
|
|
@@ -2826,13 +2826,13 @@ function nr(e, t) {
|
|
|
2826
2826
|
for (const o of t) {
|
|
2827
2827
|
const t = o.key;
|
|
2828
2828
|
e.updateCommand(`saveWorkbookAs${t}`, {
|
|
2829
|
-
label: () =>
|
|
2829
|
+
label: () => Fo("command.saveAsFormat.label", { format: o.description }),
|
|
2830
2830
|
groupLabels: {
|
|
2831
|
-
workbook: () =>
|
|
2832
|
-
saveWorkbookOptions: () =>
|
|
2831
|
+
workbook: () => Fo("command.saveAsFormat.workbook", { format: o.description }),
|
|
2832
|
+
saveWorkbookOptions: () => Fo("command.saveAsFormat.compact", { format: o.description })
|
|
2833
2833
|
},
|
|
2834
2834
|
tags: o.tags,
|
|
2835
|
-
description: () =>
|
|
2835
|
+
description: () => Fo("command.saveAsFormat", { format: o.description }),
|
|
2836
2836
|
icon: "CSV" === t ? "FileDownloadAsCSV" : "Excel" === t ? "FileDownloadAsExcel" : "FileDownloadAsSheet",
|
|
2837
2837
|
callback: () => {
|
|
2838
2838
|
n(t);
|
|
@@ -2860,7 +2860,7 @@ function nr(e, t) {
|
|
|
2860
2860
|
autoSelect: e === l.length - 1
|
|
2861
2861
|
}).getEntireRange().copyFrom(t.getEntireRange());
|
|
2862
2862
|
}
|
|
2863
|
-
},
|
|
2863
|
+
}, To("op.importData")), a.close();
|
|
2864
2864
|
} catch (e) {
|
|
2865
2865
|
l.showError(e);
|
|
2866
2866
|
}
|
|
@@ -2869,9 +2869,9 @@ function nr(e, t) {
|
|
|
2869
2869
|
tags: ["noTransaction", "noRepeat"],
|
|
2870
2870
|
callback: async (e = null) => {
|
|
2871
2871
|
let t = e;
|
|
2872
|
-
if (t ||
|
|
2873
|
-
const e = await
|
|
2874
|
-
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(",") : "*.*");
|
|
2875
2875
|
})(), t)) return m(t);
|
|
2876
2876
|
}
|
|
2877
2877
|
}), e.updateCommand("insertDataFromURL", {
|
|
@@ -2879,14 +2879,14 @@ function nr(e, t) {
|
|
|
2879
2879
|
callback: async (e) => {
|
|
2880
2880
|
if (!e) {
|
|
2881
2881
|
const t = await l.showInput({
|
|
2882
|
-
title:
|
|
2883
|
-
description:
|
|
2884
|
-
inputLabel:
|
|
2882
|
+
title: Fo("dialog.importFromWeb.title"),
|
|
2883
|
+
description: Fo("dialog.importFromWeb.description"),
|
|
2884
|
+
inputLabel: Fo("dialog.webAddress.inputLabel"),
|
|
2885
2885
|
initialValue: "https://www.sheetxl.com/docs/examples/financial-calculators.xlsx",
|
|
2886
2886
|
propsInput: { style: { minWidth: "440px" } },
|
|
2887
2887
|
options: [{
|
|
2888
2888
|
id: "Import",
|
|
2889
|
-
label: () =>
|
|
2889
|
+
label: () => Fo("dialog.import")
|
|
2890
2890
|
}]
|
|
2891
2891
|
});
|
|
2892
2892
|
if ("Import" !== t.option) return;
|
|
@@ -2903,11 +2903,11 @@ function nr(e, t) {
|
|
|
2903
2903
|
}
|
|
2904
2904
|
}), u) {
|
|
2905
2905
|
const t = async () => !a() || "Open" === await l.showOptions({
|
|
2906
|
-
title:
|
|
2907
|
-
description:
|
|
2906
|
+
title: Fo("dialog.confirm.title"),
|
|
2907
|
+
description: Fo("dialog.unsavedChanges"),
|
|
2908
2908
|
options: [{
|
|
2909
2909
|
id: "Open",
|
|
2910
|
-
label: () =>
|
|
2910
|
+
label: () => Fo("dialog.open")
|
|
2911
2911
|
}, "Cancel"],
|
|
2912
2912
|
defaultOption: "Cancel"
|
|
2913
2913
|
}), r = async (e = null) => {
|
|
@@ -2930,14 +2930,14 @@ function nr(e, t) {
|
|
|
2930
2930
|
const n = "string" == typeof e ? void 0 : e?.title;
|
|
2931
2931
|
if (!o) {
|
|
2932
2932
|
const e = await l.showInput({
|
|
2933
|
-
title:
|
|
2934
|
-
description:
|
|
2935
|
-
inputLabel:
|
|
2933
|
+
title: Fo("dialog.openFromWeb.title"),
|
|
2934
|
+
description: Fo("dialog.openFromWeb.description"),
|
|
2935
|
+
inputLabel: Fo("dialog.webAddress.inputLabel"),
|
|
2936
2936
|
initialValue: "https://www.sheetxl.com/docs/examples/financial-calculators.xlsx",
|
|
2937
2937
|
propsInput: { style: { minWidth: "440px" } },
|
|
2938
2938
|
options: [{
|
|
2939
2939
|
id: "Open",
|
|
2940
|
-
label: () =>
|
|
2940
|
+
label: () => Fo("dialog.open")
|
|
2941
2941
|
}]
|
|
2942
2942
|
});
|
|
2943
2943
|
if ("Open" !== e.option) return;
|
|
@@ -2957,9 +2957,9 @@ function nr(e, t) {
|
|
|
2957
2957
|
s = !0, i && (i.current = null);
|
|
2958
2958
|
};
|
|
2959
2959
|
}
|
|
2960
|
-
var
|
|
2961
|
-
|
|
2962
|
-
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) => {
|
|
2963
2963
|
const t = (e) => {
|
|
2964
2964
|
if ("function" != typeof e) return e;
|
|
2965
2965
|
try {
|
|
@@ -2969,9 +2969,9 @@ var ar = /* @__PURE__ */ new Set(["ui"]), lr = (e) => {
|
|
|
2969
2969
|
}
|
|
2970
2970
|
}, o = (e, o) => {
|
|
2971
2971
|
const n = t(e);
|
|
2972
|
-
return "string" == typeof n ?
|
|
2972
|
+
return "string" == typeof n ? So(n, o, xo.getActive()) : void 0;
|
|
2973
2973
|
}, n = [];
|
|
2974
|
-
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)) {
|
|
2975
2975
|
const l = e.resolveDefinition(r, a);
|
|
2976
2976
|
n.push({
|
|
2977
2977
|
groupKey: r,
|
|
@@ -2981,27 +2981,27 @@ var ar = /* @__PURE__ */ new Set(["ui"]), lr = (e) => {
|
|
|
2981
2981
|
getDescription: () => o(l?.description, l?.params) ?? "",
|
|
2982
2982
|
getShortcut: () => t(l?.shortcut) ?? null,
|
|
2983
2983
|
getScope: () => r,
|
|
2984
|
-
getScopeLabel: () =>
|
|
2984
|
+
getScopeLabel: () => We.DefaultCommandCatalogService.getScopeLabel(r)
|
|
2985
2985
|
}
|
|
2986
2986
|
});
|
|
2987
2987
|
}
|
|
2988
2988
|
return { getAllCommands: () => n };
|
|
2989
|
-
},
|
|
2990
|
-
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);
|
|
2991
2991
|
u.current = a;
|
|
2992
|
-
const m =
|
|
2992
|
+
const m = qe(() => {
|
|
2993
2993
|
const e = s?.getRoot().getRegistry();
|
|
2994
2994
|
if (!e) return;
|
|
2995
|
-
const t = c(
|
|
2995
|
+
const t = c(ar, {
|
|
2996
2996
|
title: p("dialog.shortcutKeys.title"),
|
|
2997
|
-
commands:
|
|
2997
|
+
commands: ir(e),
|
|
2998
2998
|
onDone: () => t.hide(),
|
|
2999
2999
|
onLoadError: (e) => {
|
|
3000
3000
|
t.destroy(), d.showError(e);
|
|
3001
3001
|
}
|
|
3002
3002
|
});
|
|
3003
3003
|
}, [s, c]);
|
|
3004
|
-
|
|
3004
|
+
ct(() => {
|
|
3005
3005
|
if (!s) return;
|
|
3006
3006
|
const e = s.getRoot().contribution();
|
|
3007
3007
|
return function(e, t) {
|
|
@@ -3017,8 +3017,8 @@ var ar = /* @__PURE__ */ new Set(["ui"]), lr = (e) => {
|
|
|
3017
3017
|
} });
|
|
3018
3018
|
}(e, { showShortcuts: m }), () => e.remove();
|
|
3019
3019
|
}, [s, m]);
|
|
3020
|
-
const g =
|
|
3021
|
-
|
|
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(() => {
|
|
3022
3022
|
if (!s) return;
|
|
3023
3023
|
const e = s.getRoot().contribution();
|
|
3024
3024
|
return function(e, t) {
|
|
@@ -3059,10 +3059,10 @@ var ar = /* @__PURE__ */ new Set(["ui"]), lr = (e) => {
|
|
|
3059
3059
|
x,
|
|
3060
3060
|
C
|
|
3061
3061
|
]);
|
|
3062
|
-
const [k, w] =
|
|
3063
|
-
|
|
3064
|
-
k && k !==
|
|
3065
|
-
}, [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(() => {
|
|
3066
3066
|
if (!s) return;
|
|
3067
3067
|
const e = s.getRoot().contribution();
|
|
3068
3068
|
return function(e, t) {
|
|
@@ -3083,14 +3083,14 @@ var ar = /* @__PURE__ */ new Set(["ui"]), lr = (e) => {
|
|
|
3083
3083
|
S,
|
|
3084
3084
|
w
|
|
3085
3085
|
]);
|
|
3086
|
-
const { isFullscreenAvailable: F, isFullscreenEnabled: D, toggleFullscreen: N } =
|
|
3087
|
-
|
|
3086
|
+
const { isFullscreenAvailable: F, isFullscreenEnabled: D, toggleFullscreen: N } = Qe({ target: pt(() => ({ current: i ?? null }), [i]) });
|
|
3087
|
+
ct(() => {
|
|
3088
3088
|
if (!s) return;
|
|
3089
3089
|
const e = s.getRoot().contribution();
|
|
3090
3090
|
return function(e, t) {
|
|
3091
3091
|
e.updateCommand("fullScreenToggle", {
|
|
3092
3092
|
state: t.isFullscreenEnabled,
|
|
3093
|
-
disabledReasons: t.isFullscreenAvailable ? [] : [
|
|
3093
|
+
disabledReasons: t.isFullscreenAvailable ? [] : [To("reason.fullscreenUnavailable")],
|
|
3094
3094
|
icon: t.isFullscreenEnabled ? "FullScreenOff" : "FullScreen",
|
|
3095
3095
|
callback: () => {
|
|
3096
3096
|
t.toggleFullscreen();
|
|
@@ -3107,8 +3107,8 @@ var ar = /* @__PURE__ */ new Set(["ui"]), lr = (e) => {
|
|
|
3107
3107
|
D,
|
|
3108
3108
|
N
|
|
3109
3109
|
]);
|
|
3110
|
-
const I =
|
|
3111
|
-
return
|
|
3110
|
+
const I = Ie(!0);
|
|
3111
|
+
return ct(() => {
|
|
3112
3112
|
if (!s) return;
|
|
3113
3113
|
const e = s.getRoot().contribution();
|
|
3114
3114
|
return function(e, t) {
|
|
@@ -3119,9 +3119,9 @@ var ar = /* @__PURE__ */ new Set(["ui"]), lr = (e) => {
|
|
|
3119
3119
|
}
|
|
3120
3120
|
});
|
|
3121
3121
|
}(e, (e, t) => I.activate(e, t)), () => e.remove();
|
|
3122
|
-
}, [s, I]),
|
|
3122
|
+
}, [s, I]), ct(() => {
|
|
3123
3123
|
if (!s || !o) return;
|
|
3124
|
-
const e = s.getRoot().contribution(), t =
|
|
3124
|
+
const e = s.getRoot().contribution(), t = rr(e, {
|
|
3125
3125
|
workbook: o,
|
|
3126
3126
|
setWorkbook: n,
|
|
3127
3127
|
workbookTitle: r ?? void 0,
|
|
@@ -3141,9 +3141,9 @@ var ar = /* @__PURE__ */ new Set(["ui"]), lr = (e) => {
|
|
|
3141
3141
|
l
|
|
3142
3142
|
]), t;
|
|
3143
3143
|
};
|
|
3144
|
-
|
|
3145
|
-
var
|
|
3146
|
-
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) => {
|
|
3147
3147
|
const o = e.dataTransfer;
|
|
3148
3148
|
if (t && o) {
|
|
3149
3149
|
if ("dragenter" === e.type || "dragover" === e.type) {
|
|
@@ -3160,7 +3160,7 @@ var sr = ({ renderWorkbook: e }) => {
|
|
|
3160
3160
|
}
|
|
3161
3161
|
e.preventDefault();
|
|
3162
3162
|
}
|
|
3163
|
-
}, [t]), i =
|
|
3163
|
+
}, [t]), i = qe((e) => {
|
|
3164
3164
|
e.preventDefault();
|
|
3165
3165
|
const n = r;
|
|
3166
3166
|
if (a(null), n && t && (e.stopPropagation(), e.dataTransfer.files && e.dataTransfer.files.length > 0)) {
|
|
@@ -3185,15 +3185,15 @@ var sr = ({ renderWorkbook: e }) => {
|
|
|
3185
3185
|
} }
|
|
3186
3186
|
});
|
|
3187
3187
|
} else {
|
|
3188
|
-
if (!
|
|
3188
|
+
if (!ue.canRead()) return;
|
|
3189
3189
|
const o = e.dataTransfer.items?.[0], r = "undefined" != typeof window && window.isSecureContext ? o?.getAsFileSystemHandle?.() : void 0;
|
|
3190
3190
|
r ? r.then((e) => t.execute("openWorkbook", "file" === e?.kind ? e : n)).catch(() => t.execute("openWorkbook", n)) : t.execute("openWorkbook", n);
|
|
3191
3191
|
}
|
|
3192
3192
|
}
|
|
3193
|
-
}, [t, r]), s =
|
|
3193
|
+
}, [t, r]), s = pt(() => {
|
|
3194
3194
|
if (!r) return null;
|
|
3195
3195
|
const e = "insertImage" === r;
|
|
3196
|
-
return
|
|
3196
|
+
return Wt(Vt, {
|
|
3197
3197
|
className: "drop-overlay",
|
|
3198
3198
|
sx: {
|
|
3199
3199
|
position: "absolute",
|
|
@@ -3204,12 +3204,12 @@ var sr = ({ renderWorkbook: e }) => {
|
|
|
3204
3204
|
display: "flex",
|
|
3205
3205
|
justifyContent: "center",
|
|
3206
3206
|
alignItems: "center",
|
|
3207
|
-
backgroundColor: (e) =>
|
|
3207
|
+
backgroundColor: (e) => go(e.palette.primary.main, .46),
|
|
3208
3208
|
outline: (e) => `2px dashed ${e.palette.primary.main}`,
|
|
3209
3209
|
outlineOffset: "-6px",
|
|
3210
3210
|
borderRadius: 2
|
|
3211
3211
|
},
|
|
3212
|
-
children:
|
|
3212
|
+
children: Et(oo, {
|
|
3213
3213
|
elevation: 6,
|
|
3214
3214
|
sx: {
|
|
3215
3215
|
display: "flex",
|
|
@@ -3221,11 +3221,11 @@ var sr = ({ renderWorkbook: e }) => {
|
|
|
3221
3221
|
color: "text.primary",
|
|
3222
3222
|
"& .drop-overlay-icon": { color: "primary.main" }
|
|
3223
3223
|
},
|
|
3224
|
-
children: [
|
|
3224
|
+
children: [Wt(Re, {
|
|
3225
3225
|
iconKey: e ? "InsertImage" : "FileOpen",
|
|
3226
3226
|
className: "drop-overlay-icon",
|
|
3227
3227
|
size: 32
|
|
3228
|
-
}),
|
|
3228
|
+
}), Wt(mo, {
|
|
3229
3229
|
variant: "h6",
|
|
3230
3230
|
component: "span",
|
|
3231
3231
|
children: n(e ? "drop.insertImage" : "drop.open")
|
|
@@ -3233,7 +3233,7 @@ var sr = ({ renderWorkbook: e }) => {
|
|
|
3233
3233
|
})
|
|
3234
3234
|
});
|
|
3235
3235
|
}, [r, n]);
|
|
3236
|
-
return
|
|
3236
|
+
return Et(At, { children: [e({
|
|
3237
3237
|
ref: o,
|
|
3238
3238
|
onDragStart: (e) => {
|
|
3239
3239
|
if (e.target.src) {
|
|
@@ -3246,49 +3246,49 @@ var sr = ({ renderWorkbook: e }) => {
|
|
|
3246
3246
|
onDragOver: l,
|
|
3247
3247
|
onDrop: i
|
|
3248
3248
|
}), s] });
|
|
3249
|
-
},
|
|
3249
|
+
}, cr = it((e) => {
|
|
3250
3250
|
const { workbook: t, setWorkbook: o, refDocumentTitle: n, titleWorkbook: r, setWorkbookTitle: a, isDirty: l, initialCommandAnchor: i, renderWorkbook: s, refSave: d, host: c } = e;
|
|
3251
|
-
return
|
|
3251
|
+
return Wt(Z, {
|
|
3252
3252
|
initialAnchor: i,
|
|
3253
|
-
children:
|
|
3253
|
+
children: Wt(sr, {
|
|
3254
3254
|
workbook: t,
|
|
3255
3255
|
setWorkbook: o,
|
|
3256
3256
|
workbookTitle: r,
|
|
3257
3257
|
isDirty: l,
|
|
3258
3258
|
refSave: d,
|
|
3259
3259
|
fullscreenTarget: c,
|
|
3260
|
-
children:
|
|
3260
|
+
children: Wt(dr, { renderWorkbook: s })
|
|
3261
3261
|
})
|
|
3262
3262
|
});
|
|
3263
3263
|
});
|
|
3264
|
-
|
|
3265
|
-
var
|
|
3266
|
-
sort:
|
|
3267
|
-
hyperlink:
|
|
3268
|
-
find:
|
|
3269
|
-
tableNew:
|
|
3270
|
-
namedDetails:
|
|
3271
|
-
insertFunction:
|
|
3272
|
-
resizeHeader:
|
|
3273
|
-
fillSeries:
|
|
3274
|
-
workbookStatistics:
|
|
3275
|
-
password:
|
|
3276
|
-
},
|
|
3277
|
-
const { children: t } = e, o =
|
|
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({
|
|
3278
3278
|
label: null,
|
|
3279
3279
|
progress: null
|
|
3280
|
-
}), c =
|
|
3281
|
-
|
|
3280
|
+
}), c = ot(), p = fo.EmptyObject, u = Pt(p), m = Mt(p), g = It(p), h = ut(!1);
|
|
3281
|
+
ct(() => {
|
|
3282
3282
|
if (h.current) return;
|
|
3283
3283
|
h.current = !0;
|
|
3284
3284
|
const e = window, t = e.requestIdleCallback ?? ((e) => setTimeout(e, 500)), o = e.cancelIdleCallback ?? clearTimeout, n = t(() => {
|
|
3285
|
-
for (const e of
|
|
3285
|
+
for (const e of ur) u(e, pr[e], { prewarm: !0 }).catch(() => {});
|
|
3286
3286
|
});
|
|
3287
3287
|
return () => o(n);
|
|
3288
3288
|
}, []);
|
|
3289
|
-
const y =
|
|
3290
|
-
return
|
|
3291
|
-
notifier:
|
|
3289
|
+
const y = ut(/* @__PURE__ */ new Set());
|
|
3290
|
+
return Et($e, {
|
|
3291
|
+
notifier: pt(() => {
|
|
3292
3292
|
const e = (e, t) => {
|
|
3293
3293
|
if (t?.onceKey) {
|
|
3294
3294
|
if (y.current.has(t.onceKey)) return;
|
|
@@ -3296,16 +3296,16 @@ var cr = {
|
|
|
3296
3296
|
e.add(t.onceKey), y.current = e;
|
|
3297
3297
|
}
|
|
3298
3298
|
const o = {
|
|
3299
|
-
variant: t?.type ??
|
|
3299
|
+
variant: t?.type ?? ze.Info,
|
|
3300
3300
|
anchorOrigin: {
|
|
3301
3301
|
vertical: "top",
|
|
3302
3302
|
horizontal: "center"
|
|
3303
3303
|
},
|
|
3304
3304
|
preventDuplicate: t?.preventDuplicate,
|
|
3305
|
-
persist: t?.persist ?? t?.type ===
|
|
3306
|
-
action: (e) =>
|
|
3305
|
+
persist: t?.persist ?? t?.type === ze.Error,
|
|
3306
|
+
action: (e) => Wt(Jt, {
|
|
3307
3307
|
onClick: () => r(e),
|
|
3308
|
-
children:
|
|
3308
|
+
children: Wt(Re, { iconKey: "Cancel" })
|
|
3309
3309
|
})
|
|
3310
3310
|
};
|
|
3311
3311
|
t?.enqueueProps && Object.assign(o, t.enqueueProps), e || console.log("message is 'null'", t), n(e ?? "Alert", o);
|
|
@@ -3317,8 +3317,8 @@ var cr = {
|
|
|
3317
3317
|
...t,
|
|
3318
3318
|
label: e
|
|
3319
3319
|
});
|
|
3320
|
-
const n =
|
|
3321
|
-
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 : {
|
|
3322
3322
|
label: null,
|
|
3323
3323
|
progress: null
|
|
3324
3324
|
})));
|
|
@@ -3329,11 +3329,11 @@ var cr = {
|
|
|
3329
3329
|
progress: o
|
|
3330
3330
|
});
|
|
3331
3331
|
}, (e) => {
|
|
3332
|
-
i.current = e, "string" == typeof e ?
|
|
3332
|
+
i.current = e, "string" == typeof e ? Nt(l.current, e) : d((t) => ({
|
|
3333
3333
|
...t,
|
|
3334
3334
|
label: e
|
|
3335
3335
|
}));
|
|
3336
|
-
}), r =
|
|
3336
|
+
}), r = Nt(l.current, "string" == typeof e ? e : void 0);
|
|
3337
3337
|
return r ? r.then(() => n) : n;
|
|
3338
3338
|
},
|
|
3339
3339
|
showWindow: (e, t) => {
|
|
@@ -3343,24 +3343,24 @@ var cr = {
|
|
|
3343
3343
|
onKeyDown: (e) => {
|
|
3344
3344
|
e.isDefaultPrevented() || e.isPropagationStopped() || o?.onKeyDown?.(e);
|
|
3345
3345
|
}
|
|
3346
|
-
}, u(e,
|
|
3346
|
+
}, u(e, pr[e], t);
|
|
3347
3347
|
},
|
|
3348
3348
|
showOptions: m,
|
|
3349
3349
|
showInput: g,
|
|
3350
3350
|
showError: (t) => {
|
|
3351
|
-
let o, n =
|
|
3352
|
-
"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, {
|
|
3353
3353
|
type: n,
|
|
3354
3354
|
enqueueProps: { error: o }
|
|
3355
3355
|
});
|
|
3356
3356
|
}
|
|
3357
|
-
}, o = new
|
|
3357
|
+
}, o = new Be();
|
|
3358
3358
|
return o.setOverrides(t), o;
|
|
3359
3359
|
}, [c]),
|
|
3360
|
-
children: [
|
|
3360
|
+
children: [pt(() => Wt(gt, {
|
|
3361
3361
|
ref: l,
|
|
3362
3362
|
autoStart: !1,
|
|
3363
|
-
icon:
|
|
3363
|
+
icon: Wt(ht, { sx: {
|
|
3364
3364
|
transform: "scale(0.7)",
|
|
3365
3365
|
marginLeft: "-6px"
|
|
3366
3366
|
} }),
|
|
@@ -3379,14 +3379,14 @@ var cr = {
|
|
|
3379
3379
|
}), [s.label, s.progress]), t]
|
|
3380
3380
|
});
|
|
3381
3381
|
});
|
|
3382
|
-
|
|
3383
|
-
var
|
|
3384
|
-
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) => {
|
|
3385
3385
|
const o = i.getRegisteredTaskPane(t);
|
|
3386
3386
|
if (!o) return null;
|
|
3387
3387
|
let n = o.getIcon?.();
|
|
3388
|
-
"string" == typeof n && (n =
|
|
3389
|
-
const r = t === l, a = n ?
|
|
3388
|
+
"string" == typeof n && (n = Wt(Re, { iconKey: n }));
|
|
3389
|
+
const r = t === l, a = n ? Wt(Vt, {
|
|
3390
3390
|
sx: {
|
|
3391
3391
|
display: "inline-block",
|
|
3392
3392
|
transform: m ? "rotate(-90deg)" : "rotate(90deg)",
|
|
@@ -3394,20 +3394,20 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3394
3394
|
color: (e) => e.palette.text.secondary
|
|
3395
3395
|
},
|
|
3396
3396
|
children: n
|
|
3397
|
-
}) : null, s = !n || !d && r, c =
|
|
3397
|
+
}) : null, s = !n || !d && r, c = Wt(Vt, {
|
|
3398
3398
|
sx: {
|
|
3399
3399
|
display: "grid",
|
|
3400
3400
|
gridTemplateColumns: s ? "1fr" : "0fr",
|
|
3401
3401
|
opacity: s ? 1 : 0,
|
|
3402
3402
|
transition: (e) => e.transitions.create(["grid-template-columns", "opacity"], { duration: e.transitions.duration.short })
|
|
3403
3403
|
},
|
|
3404
|
-
children:
|
|
3404
|
+
children: Wt(Vt, {
|
|
3405
3405
|
sx: {
|
|
3406
3406
|
overflow: "hidden",
|
|
3407
3407
|
minWidth: 0,
|
|
3408
3408
|
minHeight: 0
|
|
3409
3409
|
},
|
|
3410
|
-
children:
|
|
3410
|
+
children: Wt(mo, {
|
|
3411
3411
|
component: "div",
|
|
3412
3412
|
sx: {
|
|
3413
3413
|
textTransform: "none",
|
|
@@ -3420,13 +3420,13 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3420
3420
|
})
|
|
3421
3421
|
})
|
|
3422
3422
|
});
|
|
3423
|
-
return
|
|
3423
|
+
return Wt(lo, {
|
|
3424
3424
|
value: t,
|
|
3425
|
-
label:
|
|
3425
|
+
label: Wt(kt, {
|
|
3426
3426
|
disableInteractive: !0,
|
|
3427
3427
|
title: o.getTitle() ?? "",
|
|
3428
3428
|
placement: "left-start",
|
|
3429
|
-
children:
|
|
3429
|
+
children: Et(Vt, {
|
|
3430
3430
|
sx: {
|
|
3431
3431
|
padding: "0px 0px",
|
|
3432
3432
|
writingMode: m ? "vertical-lr" : "vertical-rl",
|
|
@@ -3446,7 +3446,7 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3446
3446
|
minHeight: "0px",
|
|
3447
3447
|
borderRadius: "4px"
|
|
3448
3448
|
},
|
|
3449
|
-
className:
|
|
3449
|
+
className: Do("taskpane-strip-item", { "Mui-selected": r }),
|
|
3450
3450
|
onClick: () => e.onSelect(t)
|
|
3451
3451
|
}, t);
|
|
3452
3452
|
}), [
|
|
@@ -3456,11 +3456,11 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3456
3456
|
i,
|
|
3457
3457
|
m,
|
|
3458
3458
|
d,
|
|
3459
|
-
|
|
3459
|
+
Je()
|
|
3460
3460
|
]);
|
|
3461
|
-
return
|
|
3462
|
-
ref:
|
|
3463
|
-
className:
|
|
3461
|
+
return Wt(Vt, {
|
|
3462
|
+
ref: Ye(t, () => ({ isTaskPaneStrip: () => !0 }), []),
|
|
3463
|
+
className: pt(() => Do("taskpane-strip", p), [p]),
|
|
3464
3464
|
sx: {
|
|
3465
3465
|
paddingLeft: m ? void 0 : "2px",
|
|
3466
3466
|
paddingRight: m ? "2px" : void 0,
|
|
@@ -3468,7 +3468,7 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3468
3468
|
...s
|
|
3469
3469
|
},
|
|
3470
3470
|
...u,
|
|
3471
|
-
children:
|
|
3471
|
+
children: Wt(io, {
|
|
3472
3472
|
orientation: "vertical",
|
|
3473
3473
|
variant: "scrollable",
|
|
3474
3474
|
value: l,
|
|
@@ -3486,10 +3486,10 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3486
3486
|
children: g
|
|
3487
3487
|
})
|
|
3488
3488
|
});
|
|
3489
|
-
})),
|
|
3490
|
-
const { title: t, icon: o, onClose: n, readOnly: r, focused: a, ...l } = e, i =
|
|
3491
|
-
return
|
|
3492
|
-
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 }),
|
|
3493
3493
|
sx: {
|
|
3494
3494
|
display: "flex",
|
|
3495
3495
|
flex: "1 1 %0",
|
|
@@ -3503,11 +3503,11 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3503
3503
|
opacity: 1,
|
|
3504
3504
|
transitionDuration: (e) => e.transitions.duration.shortest / 2 + "ms"
|
|
3505
3505
|
},
|
|
3506
|
-
backgroundColor: (e) =>
|
|
3507
|
-
borderBottom: `solid ${
|
|
3506
|
+
backgroundColor: (e) => go(e.palette.action.hover, .03),
|
|
3507
|
+
borderBottom: `solid ${gr} 1px`
|
|
3508
3508
|
},
|
|
3509
3509
|
...l,
|
|
3510
|
-
children:
|
|
3510
|
+
children: Et(Vt, {
|
|
3511
3511
|
sx: {
|
|
3512
3512
|
display: "flex",
|
|
3513
3513
|
flex: "1 1 10%",
|
|
@@ -3518,15 +3518,15 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3518
3518
|
marginLeft: (e) => e.spacing(1),
|
|
3519
3519
|
marginRight: (e) => e.spacing(1)
|
|
3520
3520
|
},
|
|
3521
|
-
children: [
|
|
3521
|
+
children: [Wt(Vt, {
|
|
3522
3522
|
sx: {
|
|
3523
3523
|
flex: "1 1 100%",
|
|
3524
3524
|
paddingLeft: (e) => e.spacing(1)
|
|
3525
3525
|
},
|
|
3526
3526
|
children: t
|
|
3527
|
-
}),
|
|
3527
|
+
}), Wt(vt, {
|
|
3528
3528
|
label: s("taskPane.close"),
|
|
3529
|
-
children:
|
|
3529
|
+
children: Wt(Jt, {
|
|
3530
3530
|
"aria-label": "close",
|
|
3531
3531
|
sx: { color: (e) => e.palette.text.icon ?? e.palette.action.active },
|
|
3532
3532
|
touchRippleRef: i,
|
|
@@ -3536,24 +3536,24 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3536
3536
|
onPointerUp: () => {
|
|
3537
3537
|
n();
|
|
3538
3538
|
},
|
|
3539
|
-
children:
|
|
3539
|
+
children: Wt(Re, { iconKey: "Close" })
|
|
3540
3540
|
})
|
|
3541
3541
|
})]
|
|
3542
3542
|
})
|
|
3543
3543
|
});
|
|
3544
|
-
},
|
|
3545
|
-
const { model: o, side: n, ...r } = e, a =
|
|
3546
|
-
return
|
|
3544
|
+
}, fr = at((e, t) => {
|
|
3545
|
+
const { model: o, side: n, ...r } = e, a = yo();
|
|
3546
|
+
return Wt(se, {
|
|
3547
3547
|
model: o,
|
|
3548
3548
|
ref: t,
|
|
3549
3549
|
propsFrame: { style: {
|
|
3550
|
-
border: `solid ${
|
|
3550
|
+
border: `solid ${gr} 1px`,
|
|
3551
3551
|
borderRadius: `${a.shape.borderRadius ?? 4}px`,
|
|
3552
3552
|
marginBottom: `${a.spacing?.(.5) ?? 4}px`
|
|
3553
3553
|
} },
|
|
3554
3554
|
alwaysShowStrip: !0,
|
|
3555
|
-
componentTitle:
|
|
3556
|
-
componentStrip:
|
|
3555
|
+
componentTitle: yr,
|
|
3556
|
+
componentStrip: hr,
|
|
3557
3557
|
side: n,
|
|
3558
3558
|
...e,
|
|
3559
3559
|
onOpen: () => {
|
|
@@ -3564,12 +3564,12 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3564
3564
|
},
|
|
3565
3565
|
...r
|
|
3566
3566
|
});
|
|
3567
|
-
}),
|
|
3567
|
+
}), br = "_styled-resizer_fdl5y_3", xr = {}, vr = {
|
|
3568
3568
|
flex: "1 1 100%",
|
|
3569
3569
|
display: "flex",
|
|
3570
3570
|
boxSizing: "border-box"
|
|
3571
|
-
},
|
|
3572
|
-
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);
|
|
3573
3573
|
let b, x, v = null, C = 4, k = 13;
|
|
3574
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);
|
|
3575
3575
|
let w, S = o, T = n;
|
|
@@ -3608,22 +3608,22 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3608
3608
|
position: O,
|
|
3609
3609
|
minAfter: y ? "280px" : "120px",
|
|
3610
3610
|
splitDirection: y ? "row" : "column"
|
|
3611
|
-
}),
|
|
3612
|
-
ref:
|
|
3611
|
+
}), Wt(Ke, {
|
|
3612
|
+
ref: No([
|
|
3613
3613
|
f,
|
|
3614
3614
|
g,
|
|
3615
3615
|
t
|
|
3616
3616
|
]),
|
|
3617
3617
|
className: i,
|
|
3618
3618
|
style: s ? {
|
|
3619
|
-
...
|
|
3619
|
+
...vr,
|
|
3620
3620
|
...s
|
|
3621
|
-
} :
|
|
3621
|
+
} : vr,
|
|
3622
3622
|
...c,
|
|
3623
3623
|
...w,
|
|
3624
3624
|
onPositionChange: M,
|
|
3625
3625
|
propsResizer: {
|
|
3626
|
-
className:
|
|
3626
|
+
className: Do("styled-resizer", br),
|
|
3627
3627
|
style: {
|
|
3628
3628
|
minWidth: y ? "7px" : void 0,
|
|
3629
3629
|
minHeight: y ? void 0 : "6px",
|
|
@@ -3638,40 +3638,40 @@ var mr = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255,
|
|
|
3638
3638
|
propsPaneAfter: x
|
|
3639
3639
|
});
|
|
3640
3640
|
}));
|
|
3641
|
-
|
|
3642
|
-
var
|
|
3643
|
-
[
|
|
3644
|
-
[
|
|
3645
|
-
[
|
|
3646
|
-
[
|
|
3647
|
-
[
|
|
3648
|
-
[
|
|
3649
|
-
[
|
|
3650
|
-
},
|
|
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) => {
|
|
3651
3651
|
const t = e.getCondition();
|
|
3652
3652
|
if (!t) return "DataValidation";
|
|
3653
3653
|
const o = t.toJSON();
|
|
3654
|
-
return o.operator ===
|
|
3655
|
-
},
|
|
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, {
|
|
3656
3656
|
className: "sxl-dv-icon",
|
|
3657
3657
|
sx: {
|
|
3658
3658
|
width: "auto",
|
|
3659
3659
|
minWidth: 1.7 * t + "px",
|
|
3660
3660
|
height: `${t}px`
|
|
3661
3661
|
},
|
|
3662
|
-
children:
|
|
3663
|
-
iconKey:
|
|
3662
|
+
children: Wt(Re, {
|
|
3663
|
+
iconKey: Sr(e),
|
|
3664
3664
|
size: Math.round(.6 * t),
|
|
3665
3665
|
ariaHidden: !0
|
|
3666
3666
|
})
|
|
3667
3667
|
})));
|
|
3668
|
-
|
|
3669
|
-
var
|
|
3668
|
+
Tr.displayName = "DataValidationIcon";
|
|
3669
|
+
var Fr = (e, t) => {
|
|
3670
3670
|
const o = e.getCondition();
|
|
3671
3671
|
if (!o) return t("dataValidation.anyValue");
|
|
3672
3672
|
const n = o.toJSON();
|
|
3673
|
-
if (n.operator ===
|
|
3674
|
-
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) {
|
|
3675
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;
|
|
3676
3676
|
if (o) return t("dataValidation.titleList", {
|
|
3677
3677
|
items: o.slice(0, 3).join(", "),
|
|
@@ -3680,15 +3680,15 @@ var Tr = (e, t) => {
|
|
|
3680
3680
|
if ("string" == typeof e) return t("dataValidation.titleListFrom", { source: e });
|
|
3681
3681
|
}
|
|
3682
3682
|
return o.toString();
|
|
3683
|
-
}, Fr = {
|
|
3684
|
-
[H.AlertStyle.Stop]: "ValidationStop",
|
|
3685
|
-
[H.AlertStyle.Warning]: "ValidationWarning",
|
|
3686
|
-
[H.AlertStyle.Information]: "ValidationInformation"
|
|
3687
3683
|
}, Dr = {
|
|
3688
|
-
[
|
|
3689
|
-
[
|
|
3690
|
-
[
|
|
3691
|
-
}, Nr =
|
|
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, {
|
|
3692
3692
|
expanded: e,
|
|
3693
3693
|
onChange: (e, o) => {
|
|
3694
3694
|
n || t(o);
|
|
@@ -3707,15 +3707,15 @@ var Tr = (e, t) => {
|
|
|
3707
3707
|
mb: 1
|
|
3708
3708
|
}
|
|
3709
3709
|
},
|
|
3710
|
-
children: [
|
|
3711
|
-
expandIcon:
|
|
3710
|
+
children: [Wt(Lt, {
|
|
3711
|
+
expandIcon: Wt(Re, { iconKey: "ExpandMore" }),
|
|
3712
3712
|
sx: {
|
|
3713
3713
|
px: 2,
|
|
3714
3714
|
"& .MuiAccordionSummary-content": { my: 0 },
|
|
3715
3715
|
"&.Mui-expanded .MuiAccordionSummary-content": { my: 0 }
|
|
3716
3716
|
},
|
|
3717
|
-
children:
|
|
3718
|
-
control:
|
|
3717
|
+
children: Wt(Qt, {
|
|
3718
|
+
control: Wt(Kt, {
|
|
3719
3719
|
checked: e,
|
|
3720
3720
|
disabled: n,
|
|
3721
3721
|
onChange: (e) => {
|
|
@@ -3726,7 +3726,7 @@ var Tr = (e, t) => {
|
|
|
3726
3726
|
label: o,
|
|
3727
3727
|
onClick: (e) => e.stopPropagation()
|
|
3728
3728
|
})
|
|
3729
|
-
}),
|
|
3729
|
+
}), Wt(Rt, {
|
|
3730
3730
|
sx: {
|
|
3731
3731
|
pl: 2,
|
|
3732
3732
|
pr: 2,
|
|
@@ -3738,12 +3738,12 @@ var Tr = (e, t) => {
|
|
|
3738
3738
|
},
|
|
3739
3739
|
children: r
|
|
3740
3740
|
})]
|
|
3741
|
-
}),
|
|
3742
|
-
const { dataValidation: t } = e, o =
|
|
3743
|
-
|
|
3744
|
-
const n = t.isProtected(),
|
|
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, {
|
|
3745
3745
|
tabIndex: 0,
|
|
3746
|
-
className:
|
|
3746
|
+
className: a["editor-panel"],
|
|
3747
3747
|
sx: {
|
|
3748
3748
|
gap: (e) => e.spacing(1),
|
|
3749
3749
|
paddingTop: (e) => e.spacing(1.25),
|
|
@@ -3755,7 +3755,7 @@ var Tr = (e, t) => {
|
|
|
3755
3755
|
overflow: "auto"
|
|
3756
3756
|
},
|
|
3757
3757
|
children: [
|
|
3758
|
-
|
|
3758
|
+
Et(Vt, {
|
|
3759
3759
|
sx: {
|
|
3760
3760
|
display: "flex",
|
|
3761
3761
|
flexDirection: "column",
|
|
@@ -3763,29 +3763,29 @@ var Tr = (e, t) => {
|
|
|
3763
3763
|
margin: (e) => e.spacing(1.25),
|
|
3764
3764
|
marginBottom: 0
|
|
3765
3765
|
},
|
|
3766
|
-
children: [
|
|
3766
|
+
children: [Et(Vt, {
|
|
3767
3767
|
sx: {
|
|
3768
3768
|
display: "flex",
|
|
3769
3769
|
alignItems: "center",
|
|
3770
3770
|
gap: (e) => e.spacing(1.5)
|
|
3771
3771
|
},
|
|
3772
|
-
children: [
|
|
3772
|
+
children: [Wt(Tr, {
|
|
3773
3773
|
dataValidation: t,
|
|
3774
3774
|
size: 48
|
|
3775
|
-
}),
|
|
3775
|
+
}), Wt(mo, {
|
|
3776
3776
|
variant: "body2",
|
|
3777
3777
|
sx: {
|
|
3778
3778
|
minWidth: 0,
|
|
3779
3779
|
wordBreak: "break-word"
|
|
3780
3780
|
},
|
|
3781
|
-
children:
|
|
3781
|
+
children: Fr(t, o)
|
|
3782
3782
|
})]
|
|
3783
|
-
}),
|
|
3783
|
+
}), Wt(y, {
|
|
3784
3784
|
item: t,
|
|
3785
3785
|
label: o("dataValidation.applyTo")
|
|
3786
3786
|
})]
|
|
3787
3787
|
}),
|
|
3788
|
-
|
|
3788
|
+
Wt(bn, {
|
|
3789
3789
|
selectorTitle: o("dataValidation.allow"),
|
|
3790
3790
|
showIncludeBlanks: !0,
|
|
3791
3791
|
condition: t.getCondition(),
|
|
@@ -3799,7 +3799,7 @@ var Tr = (e, t) => {
|
|
|
3799
3799
|
t.setCondition(o);
|
|
3800
3800
|
}
|
|
3801
3801
|
}),
|
|
3802
|
-
|
|
3802
|
+
r && Wt(Vt, {
|
|
3803
3803
|
sx: {
|
|
3804
3804
|
pl: 2,
|
|
3805
3805
|
pr: 2,
|
|
@@ -3807,8 +3807,8 @@ var Tr = (e, t) => {
|
|
|
3807
3807
|
borderColor: "divider",
|
|
3808
3808
|
borderRadius: 1
|
|
3809
3809
|
},
|
|
3810
|
-
children:
|
|
3811
|
-
control:
|
|
3810
|
+
children: Wt(Qt, {
|
|
3811
|
+
control: Wt(Kt, {
|
|
3812
3812
|
checked: !t.isHideDropdown(),
|
|
3813
3813
|
disabled: n,
|
|
3814
3814
|
onChange: (e) => t.setHideDropdown(!e.target.checked)
|
|
@@ -3816,12 +3816,12 @@ var Tr = (e, t) => {
|
|
|
3816
3816
|
label: o("dataValidation.inCellDropdown")
|
|
3817
3817
|
})
|
|
3818
3818
|
}),
|
|
3819
|
-
|
|
3819
|
+
Et(Ir, {
|
|
3820
3820
|
checked: t.isShowPromptMessage(),
|
|
3821
3821
|
onCheckedChange: (e) => t.setShowPromptMessage(e),
|
|
3822
3822
|
label: o("dataValidation.prompt"),
|
|
3823
3823
|
readOnly: n,
|
|
3824
|
-
children: [
|
|
3824
|
+
children: [Wt(so, {
|
|
3825
3825
|
size: "small",
|
|
3826
3826
|
label: o("dataValidation.title"),
|
|
3827
3827
|
value: t.getPromptTitle(),
|
|
@@ -3830,7 +3830,7 @@ var Tr = (e, t) => {
|
|
|
3830
3830
|
fullWidth: !0,
|
|
3831
3831
|
slotProps: { htmlInput: { maxLength: 32 } },
|
|
3832
3832
|
sx: { backgroundColor: "background.paper" }
|
|
3833
|
-
}),
|
|
3833
|
+
}), Wt(so, {
|
|
3834
3834
|
size: "small",
|
|
3835
3835
|
label: o("dataValidation.message"),
|
|
3836
3836
|
value: t.getPromptMessage(),
|
|
@@ -3843,45 +3843,45 @@ var Tr = (e, t) => {
|
|
|
3843
3843
|
sx: { backgroundColor: "background.paper" }
|
|
3844
3844
|
})]
|
|
3845
3845
|
}),
|
|
3846
|
-
|
|
3846
|
+
Et(Ir, {
|
|
3847
3847
|
checked: t.isShowAlertMessage(),
|
|
3848
3848
|
onCheckedChange: (e) => t.setShowAlertMessage(e),
|
|
3849
3849
|
label: o("dataValidation.alert"),
|
|
3850
3850
|
readOnly: n,
|
|
3851
3851
|
children: [
|
|
3852
|
-
|
|
3852
|
+
Et(Gt, {
|
|
3853
3853
|
fullWidth: !0,
|
|
3854
3854
|
size: "small",
|
|
3855
3855
|
disabled: n,
|
|
3856
3856
|
sx: { backgroundColor: "background.paper" },
|
|
3857
|
-
children: [
|
|
3857
|
+
children: [Wt(Xt, { children: o("dataValidation.alertStyle") }), Wt(ro, {
|
|
3858
3858
|
value: t.getAlertStyle(),
|
|
3859
3859
|
label: o("dataValidation.alertStyle"),
|
|
3860
3860
|
onChange: (e) => t.setAlertStyle(e.target.value),
|
|
3861
|
-
renderValue: (e) =>
|
|
3861
|
+
renderValue: (e) => Et(Vt, {
|
|
3862
3862
|
sx: {
|
|
3863
3863
|
display: "flex",
|
|
3864
3864
|
alignItems: "center",
|
|
3865
3865
|
gap: 1
|
|
3866
3866
|
},
|
|
3867
|
-
children: [
|
|
3868
|
-
iconKey:
|
|
3867
|
+
children: [Wt(Re, {
|
|
3868
|
+
iconKey: Dr[e],
|
|
3869
3869
|
size: 18,
|
|
3870
3870
|
ariaHidden: !0
|
|
3871
|
-
}), o(
|
|
3871
|
+
}), o(Nr[e])]
|
|
3872
3872
|
}),
|
|
3873
|
-
children: Object.keys(
|
|
3873
|
+
children: Object.keys(Dr).map((e) => Et(eo, {
|
|
3874
3874
|
value: e,
|
|
3875
3875
|
sx: { gap: 1 },
|
|
3876
|
-
children: [
|
|
3877
|
-
iconKey:
|
|
3876
|
+
children: [Wt(Re, {
|
|
3877
|
+
iconKey: Dr[e],
|
|
3878
3878
|
size: 18,
|
|
3879
3879
|
ariaHidden: !0
|
|
3880
|
-
}), o(
|
|
3880
|
+
}), o(Nr[e])]
|
|
3881
3881
|
}, e))
|
|
3882
3882
|
})]
|
|
3883
3883
|
}),
|
|
3884
|
-
|
|
3884
|
+
Wt(so, {
|
|
3885
3885
|
size: "small",
|
|
3886
3886
|
label: o("dataValidation.title"),
|
|
3887
3887
|
value: t.getAlertTitle(),
|
|
@@ -3891,7 +3891,7 @@ var Tr = (e, t) => {
|
|
|
3891
3891
|
slotProps: { htmlInput: { maxLength: 32 } },
|
|
3892
3892
|
sx: { backgroundColor: "background.paper" }
|
|
3893
3893
|
}),
|
|
3894
|
-
|
|
3894
|
+
Wt(so, {
|
|
3895
3895
|
size: "small",
|
|
3896
3896
|
label: o("dataValidation.message"),
|
|
3897
3897
|
value: t.getAlertMessage(),
|
|
@@ -3907,13 +3907,13 @@ var Tr = (e, t) => {
|
|
|
3907
3907
|
})
|
|
3908
3908
|
]
|
|
3909
3909
|
});
|
|
3910
|
-
return
|
|
3910
|
+
return Wt(Eo.Provider, {
|
|
3911
3911
|
value: t,
|
|
3912
3912
|
children: l
|
|
3913
3913
|
});
|
|
3914
3914
|
});
|
|
3915
|
-
|
|
3916
|
-
var
|
|
3915
|
+
Pr.displayName = "DataValidationEditorPanel";
|
|
3916
|
+
var Or = ({ children: e }) => Wt(Vt, {
|
|
3917
3917
|
sx: {
|
|
3918
3918
|
display: "inline-flex",
|
|
3919
3919
|
alignItems: "center",
|
|
@@ -3924,45 +3924,45 @@ var Pr = ({ children: e }) => At(Lt, {
|
|
|
3924
3924
|
borderRadius: 1,
|
|
3925
3925
|
color: "text.secondary"
|
|
3926
3926
|
},
|
|
3927
|
-
children:
|
|
3927
|
+
children: Wt(mo, {
|
|
3928
3928
|
variant: "caption",
|
|
3929
3929
|
children: e
|
|
3930
3930
|
})
|
|
3931
|
-
}),
|
|
3932
|
-
const t =
|
|
3933
|
-
|
|
3931
|
+
}), Mr = it(({ item: e }) => {
|
|
3932
|
+
const t = ot();
|
|
3933
|
+
Te(e, "onAnyChange");
|
|
3934
3934
|
const o = [];
|
|
3935
|
-
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, {
|
|
3936
3936
|
sx: {
|
|
3937
3937
|
display: "flex",
|
|
3938
3938
|
flexWrap: "wrap",
|
|
3939
3939
|
gap: .5
|
|
3940
3940
|
},
|
|
3941
|
-
children: o.map((e, t) =>
|
|
3941
|
+
children: o.map((e, t) => Wt(Or, { children: e }, t))
|
|
3942
3942
|
});
|
|
3943
3943
|
});
|
|
3944
|
-
|
|
3945
|
-
var
|
|
3944
|
+
Mr.displayName = "DataValidationCardBody";
|
|
3945
|
+
var Ar = it(({ item: e }) => Wt(y, {
|
|
3946
3946
|
item: e,
|
|
3947
|
-
label:
|
|
3947
|
+
label: ot()("dataValidation.applyTo"),
|
|
3948
3948
|
helperText: null
|
|
3949
3949
|
}));
|
|
3950
|
-
|
|
3951
|
-
var
|
|
3950
|
+
Ar.displayName = "DataValidationCardRanges";
|
|
3951
|
+
var Wr = {
|
|
3952
3952
|
key: "data-validation",
|
|
3953
3953
|
messageKeys: {
|
|
3954
|
-
none:
|
|
3955
|
-
addPrompt:
|
|
3956
|
-
heading:
|
|
3957
|
-
insert:
|
|
3958
|
-
new:
|
|
3959
|
-
moveUp:
|
|
3960
|
-
moveDown:
|
|
3961
|
-
edit:
|
|
3962
|
-
duplicate:
|
|
3963
|
-
delete:
|
|
3964
|
-
cancel:
|
|
3965
|
-
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")
|
|
3966
3966
|
},
|
|
3967
3967
|
getCollection: (e) => e.getDataValidations(),
|
|
3968
3968
|
changeEvents: ["onDataValidationsChange"],
|
|
@@ -3973,54 +3973,54 @@ var Ar = {
|
|
|
3973
3973
|
validate: (e) => e.getCondition()?.validate() ?? null,
|
|
3974
3974
|
applyNewDefaults: (e) => {
|
|
3975
3975
|
e.update({
|
|
3976
|
-
alertStyle:
|
|
3976
|
+
alertStyle: U.AlertStyle.Stop,
|
|
3977
3977
|
showAlertMessage: !0
|
|
3978
3978
|
});
|
|
3979
3979
|
},
|
|
3980
3980
|
applySeed: (e, t) => {
|
|
3981
3981
|
e.update(t);
|
|
3982
3982
|
},
|
|
3983
|
-
getCardTitle:
|
|
3984
|
-
CardMedia: ({ item: e }) =>
|
|
3983
|
+
getCardTitle: Fr,
|
|
3984
|
+
CardMedia: ({ item: e }) => Wt(Tr, {
|
|
3985
3985
|
dataValidation: e,
|
|
3986
3986
|
size: 32
|
|
3987
3987
|
}),
|
|
3988
|
-
CardSubtitle:
|
|
3989
|
-
CardBody:
|
|
3990
|
-
EditorBody: ({ item: e }) =>
|
|
3991
|
-
},
|
|
3988
|
+
CardSubtitle: Ar,
|
|
3989
|
+
CardBody: Mr,
|
|
3990
|
+
EditorBody: ({ item: e }) => Wt(Pr, { dataValidation: e })
|
|
3991
|
+
}, Er = it(at((e, t) => {
|
|
3992
3992
|
const { workbook: o, args: n, ...r } = e;
|
|
3993
|
-
return
|
|
3993
|
+
return Wt(R, {
|
|
3994
3994
|
ref: t,
|
|
3995
3995
|
workbook: o,
|
|
3996
|
-
descriptor:
|
|
3996
|
+
descriptor: Wr,
|
|
3997
3997
|
args: n,
|
|
3998
3998
|
dragReorder: !0,
|
|
3999
3999
|
...r
|
|
4000
4000
|
});
|
|
4001
4001
|
}));
|
|
4002
|
-
|
|
4003
|
-
var
|
|
4002
|
+
Er.displayName = "DataValidationDetailsPanel";
|
|
4003
|
+
var Br = (e) => {
|
|
4004
4004
|
const { model: t, entryKey: o, frame: n, args: r, ref: a, ...l } = e;
|
|
4005
|
-
return
|
|
4005
|
+
return Wt(Er, {
|
|
4006
4006
|
ref: a,
|
|
4007
4007
|
workbook: t,
|
|
4008
4008
|
args: r,
|
|
4009
4009
|
...l
|
|
4010
4010
|
});
|
|
4011
4011
|
};
|
|
4012
|
-
|
|
4012
|
+
u(), Ee.register("plugin-table", { icons: {} }), te.registerTaskPane({
|
|
4013
4013
|
key: "dataValidationDetails",
|
|
4014
4014
|
getTitle: () => "Data Validation",
|
|
4015
4015
|
getIcon: () => "DataValidation",
|
|
4016
|
-
component:
|
|
4017
|
-
}, !0),
|
|
4016
|
+
component: Br
|
|
4017
|
+
}, !0), te.registerTaskPane({
|
|
4018
4018
|
key: "conditionalFormatDetails",
|
|
4019
4019
|
getTitle: () => "Conditional Formatting",
|
|
4020
4020
|
getIcon: () => "FormatPaint",
|
|
4021
|
-
component:
|
|
4022
|
-
}, !0), d(),
|
|
4023
|
-
var
|
|
4021
|
+
component: Xn
|
|
4022
|
+
}, !0), c(), d(), l(), n(), i(), P();
|
|
4023
|
+
var Rr = () => {
|
|
4024
4024
|
let e, t;
|
|
4025
4025
|
const o = new Promise((o, n) => {
|
|
4026
4026
|
e = o, t = n;
|
|
@@ -4035,74 +4035,74 @@ var Br = () => {
|
|
|
4035
4035
|
}
|
|
4036
4036
|
};
|
|
4037
4037
|
return o.catch(() => {}), n;
|
|
4038
|
-
},
|
|
4038
|
+
}, Lr = (e, t) => {
|
|
4039
4039
|
if (!e) return {};
|
|
4040
4040
|
const { colorSchemes: o, ...n } = e, r = o?.[t ? "dark" : "light"];
|
|
4041
|
-
return r && "object" == typeof r ?
|
|
4042
|
-
},
|
|
4043
|
-
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(() => {
|
|
4044
4044
|
Q.current?.getNamedCollectionEditorElement?.()?.focus?.();
|
|
4045
|
-
}, []), 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);
|
|
4046
4046
|
ne.current = oe;
|
|
4047
|
-
const re =
|
|
4048
|
-
light:
|
|
4049
|
-
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)))
|
|
4050
4050
|
}), [
|
|
4051
|
-
|
|
4051
|
+
T,
|
|
4052
4052
|
re?.light,
|
|
4053
4053
|
re?.dark
|
|
4054
|
-
]), le = "dark" === te, ie =
|
|
4054
|
+
]), le = "dark" === te, ie = pt(() => b(ae.light, ae.dark, `.${n}`, D), [
|
|
4055
4055
|
ae,
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
]),
|
|
4059
|
-
|
|
4056
|
+
n,
|
|
4057
|
+
D
|
|
4058
|
+
]), se = pt(() => ge("sxl-defaults", `.${n}`), [n]), fe = Se(), [be, xe] = mt(() => x ?? null);
|
|
4059
|
+
ct(() => {
|
|
4060
4060
|
xe(x ?? null);
|
|
4061
4061
|
}, [x]);
|
|
4062
|
-
const [ve, Ce] =
|
|
4063
|
-
ke.current || (ke.current =
|
|
4064
|
-
const
|
|
4065
|
-
io:
|
|
4062
|
+
const [ve, Ce] = mt(0), ke = ut(null);
|
|
4063
|
+
ke.current || (ke.current = Rr());
|
|
4064
|
+
const we = De(be, {
|
|
4065
|
+
io: ue,
|
|
4066
4066
|
defaultTheme: fe.getDefaultTheme(),
|
|
4067
4067
|
reloadKey: ve
|
|
4068
|
-
}), Ne = "loaded" ===
|
|
4068
|
+
}), Ne = "loaded" === we.status ? we.workbook : null, Ie = pt(() => "error" === we.status ? {
|
|
4069
4069
|
status: "error",
|
|
4070
|
-
error:
|
|
4071
|
-
} : "loaded" ===
|
|
4070
|
+
error: we.error
|
|
4071
|
+
} : "loaded" === we.status ? {
|
|
4072
4072
|
status: "loaded",
|
|
4073
|
-
workbook:
|
|
4074
|
-
} : { status: "loading" }, [
|
|
4075
|
-
|
|
4076
|
-
ke.current.settled && (ke.current =
|
|
4077
|
-
}, [be, ve]),
|
|
4078
|
-
"loaded" ===
|
|
4079
|
-
}, [
|
|
4080
|
-
const [
|
|
4081
|
-
Ne && !
|
|
4082
|
-
const
|
|
4083
|
-
|
|
4084
|
-
const $e =
|
|
4085
|
-
$e.current =
|
|
4086
|
-
const
|
|
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
4087
|
const t = $e.current;
|
|
4088
|
-
t &&
|
|
4088
|
+
t && Ke.current.push(t), xe(e);
|
|
4089
4089
|
}, []);
|
|
4090
|
-
|
|
4091
|
-
const e =
|
|
4090
|
+
ct(() => {
|
|
4091
|
+
const e = Ke.current;
|
|
4092
4092
|
if (0 !== e.length) {
|
|
4093
|
-
|
|
4093
|
+
Ke.current = e.filter((e) => e === Ae);
|
|
4094
4094
|
for (let t = 0; t < e.length; t++) {
|
|
4095
4095
|
const o = e[t];
|
|
4096
|
-
if (o !==
|
|
4096
|
+
if (o !== Ae) try {
|
|
4097
4097
|
o.close();
|
|
4098
4098
|
} catch (e) {
|
|
4099
4099
|
console.warn("Unable to close the replaced workbook", e);
|
|
4100
4100
|
}
|
|
4101
4101
|
}
|
|
4102
4102
|
}
|
|
4103
|
-
}, [
|
|
4104
|
-
const
|
|
4105
|
-
|
|
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
4106
|
if (!Je) return;
|
|
4107
4107
|
let e = Je.getSession();
|
|
4108
4108
|
return Je.subscribe(() => {
|
|
@@ -4110,91 +4110,91 @@ var Br = () => {
|
|
|
4110
4110
|
e = Je.getSession(), t && !e && "formula-bar" === t.getActiveEditorId() && Q.current?.contains?.(document.activeElement) && q.current?.focus();
|
|
4111
4111
|
});
|
|
4112
4112
|
}, [Je]);
|
|
4113
|
-
const ot =
|
|
4113
|
+
const ot = Oe(Ae), { isDirty: nt, saveState: rt } = Me(Ae, ue), at = Pe(Ae), lt = ut(rt), it = ut(null);
|
|
4114
4114
|
lt.current = rt;
|
|
4115
|
-
const
|
|
4116
|
-
gt.current =
|
|
4117
|
-
const [
|
|
4118
|
-
|
|
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
4119
|
kt(null);
|
|
4120
|
-
}, [
|
|
4121
|
-
const
|
|
4122
|
-
|
|
4120
|
+
}, [Ae]);
|
|
4121
|
+
const wt = xt ?? vt ?? ot ?? "";
|
|
4122
|
+
ct(() => {
|
|
4123
4123
|
X?.(nt);
|
|
4124
4124
|
}, [nt]);
|
|
4125
|
-
const Tt =
|
|
4126
|
-
|
|
4125
|
+
const Tt = qe(v ?? (() => {}), [v]);
|
|
4126
|
+
ct(() => {
|
|
4127
4127
|
Tt?.(Ne);
|
|
4128
4128
|
}, [Ne]);
|
|
4129
|
-
const Ft =
|
|
4130
|
-
Ft.current = Ne,
|
|
4131
|
-
const Dt =
|
|
4129
|
+
const Ft = ut(Ne);
|
|
4130
|
+
Ft.current = Ne, Te(Ae, "onViewChange");
|
|
4131
|
+
const Dt = pt(() => Wt(yt, {
|
|
4132
4132
|
groupKey: "helpOptions",
|
|
4133
4133
|
disableHover: !0,
|
|
4134
4134
|
sx: { padding: "0" },
|
|
4135
4135
|
propsButton: { sx: { maxHeight: "22px" } }
|
|
4136
|
-
}), []), [Nt, It] =
|
|
4136
|
+
}), []), [Nt, It] = mt(null), Pt = st((e) => {
|
|
4137
4137
|
It(e);
|
|
4138
4138
|
}, []);
|
|
4139
|
-
|
|
4140
|
-
|
|
4139
|
+
ct(() => {
|
|
4140
|
+
Ee.prefetch().catch((e) => {
|
|
4141
4141
|
console.warn("Icons could not be loaded:", e);
|
|
4142
4142
|
});
|
|
4143
4143
|
}, []);
|
|
4144
|
-
const Ot =
|
|
4145
|
-
Ot.current || (Ot.current =
|
|
4146
|
-
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) => {
|
|
4147
4147
|
const t = ne.current;
|
|
4148
|
-
t && t !==
|
|
4149
|
-
}, []),
|
|
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) => {
|
|
4150
4150
|
let t = null, o = {
|
|
4151
4151
|
readOnly: !0,
|
|
4152
|
-
...
|
|
4152
|
+
...A
|
|
4153
4153
|
};
|
|
4154
|
-
return
|
|
4154
|
+
return A?.hidden || (t = Wt(r, {
|
|
4155
4155
|
...o,
|
|
4156
4156
|
style: {
|
|
4157
4157
|
maxWidth: "100%",
|
|
4158
|
-
...
|
|
4158
|
+
...A?.style
|
|
4159
4159
|
},
|
|
4160
4160
|
workbook: e.workbook ?? q.current,
|
|
4161
|
-
ref:
|
|
4162
|
-
title:
|
|
4161
|
+
ref: Lt,
|
|
4162
|
+
title: wt,
|
|
4163
4163
|
modified: nt,
|
|
4164
4164
|
encrypted: at,
|
|
4165
4165
|
placeHolder: Z,
|
|
4166
4166
|
onTitleChange: (e) => {
|
|
4167
|
-
kt(e),
|
|
4167
|
+
kt(e), A?.onTitleChange?.(e);
|
|
4168
4168
|
}
|
|
4169
|
-
})),
|
|
4169
|
+
})), Wt(or, {
|
|
4170
4170
|
...e,
|
|
4171
4171
|
logo: C,
|
|
4172
4172
|
mainElement: t,
|
|
4173
|
-
startElement:
|
|
4173
|
+
startElement: k,
|
|
4174
4174
|
endElement: S
|
|
4175
4175
|
});
|
|
4176
4176
|
}, [
|
|
4177
4177
|
C,
|
|
4178
|
-
|
|
4178
|
+
wt,
|
|
4179
4179
|
nt,
|
|
4180
4180
|
at,
|
|
4181
|
-
|
|
4182
|
-
|
|
4181
|
+
A,
|
|
4182
|
+
k,
|
|
4183
4183
|
S
|
|
4184
4184
|
]);
|
|
4185
|
-
|
|
4185
|
+
ct(() => {
|
|
4186
4186
|
const e = q.current;
|
|
4187
4187
|
if (!e) return;
|
|
4188
4188
|
const t = (e) => e.preventDefault();
|
|
4189
4189
|
return e.addEventListener("wheel", t, { passive: !1 }), () => {
|
|
4190
4190
|
e.removeEventListener("wheel", t);
|
|
4191
4191
|
};
|
|
4192
|
-
}, [
|
|
4193
|
-
const [jt, $t] =
|
|
4194
|
-
|
|
4195
|
-
$t(
|
|
4196
|
-
}, [
|
|
4197
|
-
const Kt =
|
|
4192
|
+
}, [ht]);
|
|
4193
|
+
const [jt, $t] = mt(null);
|
|
4194
|
+
ct(() => {
|
|
4195
|
+
$t(ht?.source?.getCommandScope?.() ?? null);
|
|
4196
|
+
}, [ht]);
|
|
4197
|
+
const Kt = pt(() => ({
|
|
4198
4198
|
"& .SnackbarContainer-root": { position: "absolute !important" },
|
|
4199
4199
|
"& .notistack-SnackbarContainer > div": { maxWidth: "min(100%, 720px)" },
|
|
4200
4200
|
"& .notistack-Snackbar": { minWidth: "unset" },
|
|
@@ -4207,55 +4207,55 @@ var Br = () => {
|
|
|
4207
4207
|
whiteSpace: "pre-wrap"
|
|
4208
4208
|
},
|
|
4209
4209
|
"*": { userSelect: "none" }
|
|
4210
|
-
}), []), [
|
|
4211
|
-
|
|
4212
|
-
qt(null !=
|
|
4213
|
-
}, [
|
|
4214
|
-
const Gt =
|
|
4215
|
-
model:
|
|
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
4216
|
side: y,
|
|
4217
4217
|
...e,
|
|
4218
|
-
...
|
|
4218
|
+
...u
|
|
4219
4219
|
}), [
|
|
4220
|
-
|
|
4220
|
+
Ae,
|
|
4221
4221
|
y,
|
|
4222
|
-
|
|
4223
|
-
]), Qt =
|
|
4224
|
-
Qt.current = o,
|
|
4222
|
+
u
|
|
4223
|
+
]), Qt = ut(o);
|
|
4224
|
+
Qt.current = o, Ye(t, () => ({
|
|
4225
4225
|
isStudioElement: () => !0,
|
|
4226
4226
|
save: (e) => {
|
|
4227
|
-
const t =
|
|
4227
|
+
const t = it.current;
|
|
4228
4228
|
return t ? t(e) : Promise.reject(/* @__PURE__ */ new Error("The studio cannot save: no workbook, or the backing store cannot write."));
|
|
4229
4229
|
},
|
|
4230
4230
|
getWorkbookElement: () => q.current,
|
|
4231
4231
|
getWorkbook: () => Ft.current ?? null,
|
|
4232
4232
|
isDirty: () => lt.current?.isDirty() ?? !1,
|
|
4233
|
-
getEditable: () =>
|
|
4233
|
+
getEditable: () => Xe.current,
|
|
4234
4234
|
getFormulaBarElement: () => Q.current ?? null,
|
|
4235
4235
|
focus: () => q.current?.focus(),
|
|
4236
|
-
whenReady: () => (ke.current || (ke.current =
|
|
4236
|
+
whenReady: () => (ke.current || (ke.current = Rr()), ke.current.promise),
|
|
4237
4237
|
getWorkbookState: () => gt.current,
|
|
4238
4238
|
retry: () => Ce((e) => e + 1)
|
|
4239
4239
|
}), [], o);
|
|
4240
|
-
const Yt =
|
|
4241
|
-
t ===
|
|
4242
|
-
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));
|
|
4243
4243
|
}));
|
|
4244
4244
|
}, []);
|
|
4245
|
-
|
|
4245
|
+
ct(() => {
|
|
4246
4246
|
Yt.current && (Yt.current = !1, q.current?.focus());
|
|
4247
|
-
}, [
|
|
4248
|
-
const Xt =
|
|
4249
|
-
const { ref: t, ...o } = e, n = le ? ae.dark : ae.light, r = "error" ===
|
|
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
4250
|
...p,
|
|
4251
4251
|
style: {
|
|
4252
4252
|
width: "100%",
|
|
4253
4253
|
height: "100%",
|
|
4254
4254
|
...p?.style
|
|
4255
4255
|
},
|
|
4256
|
-
error:
|
|
4256
|
+
error: Ie.error
|
|
4257
4257
|
}) : null;
|
|
4258
|
-
if (r && !
|
|
4258
|
+
if (r && !Ae) return Wt(oo, {
|
|
4259
4259
|
style: {
|
|
4260
4260
|
width: "100%",
|
|
4261
4261
|
height: "100%",
|
|
@@ -4267,11 +4267,11 @@ var Br = () => {
|
|
|
4267
4267
|
children: r
|
|
4268
4268
|
});
|
|
4269
4269
|
let s = null;
|
|
4270
|
-
if (
|
|
4271
|
-
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)({
|
|
4272
4272
|
workbook: i,
|
|
4273
4273
|
...H
|
|
4274
|
-
}), c = a ? (z ??
|
|
4274
|
+
}), c = a ? (z ?? N)({
|
|
4275
4275
|
ref: Q,
|
|
4276
4276
|
style: {
|
|
4277
4277
|
marginTop: n.spacing(.25),
|
|
@@ -4286,20 +4286,20 @@ var Br = () => {
|
|
|
4286
4286
|
restoreFocus: (e) => i?.focus(e),
|
|
4287
4287
|
...V?.propsNamedCollectionEditor
|
|
4288
4288
|
}
|
|
4289
|
-
}) : null, p = l ? (_ ??
|
|
4289
|
+
}) : null, p = l ? (_ ?? h)({
|
|
4290
4290
|
childrenEnd: Dt,
|
|
4291
4291
|
...K
|
|
4292
|
-
}) : null,
|
|
4292
|
+
}) : null, u = (e, n) => Wt(m, {
|
|
4293
4293
|
...R,
|
|
4294
4294
|
tabIndex: 0,
|
|
4295
4295
|
autoFocus: !n && P,
|
|
4296
4296
|
workbook: e,
|
|
4297
4297
|
editable: n ? void 0 : Je ?? void 0,
|
|
4298
4298
|
focusNameBox: n ? void 0 : Y,
|
|
4299
|
-
ref: n ? G :
|
|
4299
|
+
ref: n ? G : No([t, q]),
|
|
4300
4300
|
onWorkbookLoad: n ? (t) => Jt(t, e) : Rt,
|
|
4301
4301
|
onKeyDown: (e) => {
|
|
4302
|
-
|
|
4302
|
+
f?.(e);
|
|
4303
4303
|
},
|
|
4304
4304
|
propsWorkbookLoading: B,
|
|
4305
4305
|
renderWorkbookLoading: Xt,
|
|
@@ -4316,14 +4316,14 @@ var Br = () => {
|
|
|
4316
4316
|
onContextMenu: (e) => e.preventDefault(),
|
|
4317
4317
|
...n ? null : o
|
|
4318
4318
|
}, e.getId());
|
|
4319
|
-
s =
|
|
4319
|
+
s = Et("div", {
|
|
4320
4320
|
style: {
|
|
4321
4321
|
display: "flex",
|
|
4322
4322
|
flexDirection: "column",
|
|
4323
4323
|
flex: "1 1 100%",
|
|
4324
4324
|
minWidth: 0,
|
|
4325
4325
|
minHeight: 0,
|
|
4326
|
-
...
|
|
4326
|
+
...ye({
|
|
4327
4327
|
window: n.palette.background.default,
|
|
4328
4328
|
windowText: n.palette.text.primary
|
|
4329
4329
|
})
|
|
@@ -4331,14 +4331,14 @@ var Br = () => {
|
|
|
4331
4331
|
children: [
|
|
4332
4332
|
d,
|
|
4333
4333
|
c,
|
|
4334
|
-
|
|
4334
|
+
Wt(Cr, {
|
|
4335
4335
|
taskSide: y,
|
|
4336
|
-
persistKey:
|
|
4337
|
-
sidebarElement:
|
|
4336
|
+
persistKey: Vr,
|
|
4337
|
+
sidebarElement: _t ? Wt(We.CommandScopeProvider, {
|
|
4338
4338
|
scope: jt,
|
|
4339
|
-
children:
|
|
4339
|
+
children: _t
|
|
4340
4340
|
}) : void 0,
|
|
4341
|
-
mainElement:
|
|
4341
|
+
mainElement: Et("div", {
|
|
4342
4342
|
style: {
|
|
4343
4343
|
position: "relative",
|
|
4344
4344
|
display: "flex",
|
|
@@ -4347,7 +4347,7 @@ var Br = () => {
|
|
|
4347
4347
|
minWidth: 0,
|
|
4348
4348
|
minHeight: 0
|
|
4349
4349
|
},
|
|
4350
|
-
children: [[
|
|
4350
|
+
children: [[u(Ae, !1), Le ? u(Le, !0) : null], Wt(Vt, {
|
|
4351
4351
|
ref: Pt,
|
|
4352
4352
|
sx: {
|
|
4353
4353
|
position: "absolute",
|
|
@@ -4365,8 +4365,8 @@ var Br = () => {
|
|
|
4365
4365
|
]
|
|
4366
4366
|
});
|
|
4367
4367
|
}
|
|
4368
|
-
const d =
|
|
4369
|
-
return
|
|
4368
|
+
const d = ht ? null : E({ ...B });
|
|
4369
|
+
return Et(oo, {
|
|
4370
4370
|
sx: Kt,
|
|
4371
4371
|
style: {
|
|
4372
4372
|
width: "100%",
|
|
@@ -4383,7 +4383,7 @@ var Br = () => {
|
|
|
4383
4383
|
variant: i,
|
|
4384
4384
|
children: [
|
|
4385
4385
|
s,
|
|
4386
|
-
r ?
|
|
4386
|
+
r ? Wt(oo, {
|
|
4387
4387
|
style: {
|
|
4388
4388
|
position: "absolute",
|
|
4389
4389
|
inset: 0,
|
|
@@ -4393,7 +4393,7 @@ var Br = () => {
|
|
|
4393
4393
|
},
|
|
4394
4394
|
children: r
|
|
4395
4395
|
}) : null,
|
|
4396
|
-
d ?
|
|
4396
|
+
d ? Wt("div", {
|
|
4397
4397
|
style: {
|
|
4398
4398
|
position: "absolute",
|
|
4399
4399
|
inset: 0,
|
|
@@ -4407,11 +4407,11 @@ var Br = () => {
|
|
|
4407
4407
|
]
|
|
4408
4408
|
});
|
|
4409
4409
|
}, [
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4410
|
+
Ie,
|
|
4411
|
+
Ae,
|
|
4412
|
+
Le,
|
|
4413
|
+
ht,
|
|
4414
|
+
wt,
|
|
4415
4415
|
E,
|
|
4416
4416
|
B,
|
|
4417
4417
|
Xt,
|
|
@@ -4424,7 +4424,7 @@ var Br = () => {
|
|
|
4424
4424
|
p,
|
|
4425
4425
|
zt,
|
|
4426
4426
|
Kt,
|
|
4427
|
-
|
|
4427
|
+
_t,
|
|
4428
4428
|
y,
|
|
4429
4429
|
jt,
|
|
4430
4430
|
L,
|
|
@@ -4439,7 +4439,7 @@ var Br = () => {
|
|
|
4439
4439
|
ae,
|
|
4440
4440
|
le
|
|
4441
4441
|
]);
|
|
4442
|
-
let eo =
|
|
4442
|
+
let eo = Wt(Oo, {
|
|
4443
4443
|
maxSnack: 3,
|
|
4444
4444
|
domRoot: Nt ?? void 0,
|
|
4445
4445
|
anchorOrigin: {
|
|
@@ -4450,47 +4450,47 @@ var Br = () => {
|
|
|
4450
4450
|
onClose: (e, t, o) => {
|
|
4451
4451
|
q.current?.focus();
|
|
4452
4452
|
},
|
|
4453
|
-
Components: { error:
|
|
4453
|
+
Components: { error: er },
|
|
4454
4454
|
iconVariant: {
|
|
4455
|
-
success:
|
|
4455
|
+
success: Wt(ao, {
|
|
4456
4456
|
style: { marginRight: "8px" },
|
|
4457
|
-
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" })
|
|
4458
4458
|
}),
|
|
4459
|
-
error:
|
|
4459
|
+
error: Wt(Re, {
|
|
4460
4460
|
iconKey: "ErrorAlert",
|
|
4461
4461
|
style: { marginRight: "8px" }
|
|
4462
4462
|
})
|
|
4463
4463
|
},
|
|
4464
|
-
children:
|
|
4465
|
-
workbook:
|
|
4466
|
-
children:
|
|
4464
|
+
children: Wt(me, {
|
|
4465
|
+
workbook: Ae,
|
|
4466
|
+
children: Wt(de, {
|
|
4467
4467
|
renderArea: Gt,
|
|
4468
4468
|
onUpdateArea: (e) => {
|
|
4469
4469
|
Ut(e);
|
|
4470
4470
|
},
|
|
4471
|
-
children:
|
|
4472
|
-
workbook:
|
|
4471
|
+
children: Wt(Ct, { children: Wt(mr, { children: Wt(_e, { children: Wt(je, { children: Wt(cr, {
|
|
4472
|
+
workbook: Ae,
|
|
4473
4473
|
initialCommandAnchor: Bt,
|
|
4474
4474
|
renderWorkbook: Zt,
|
|
4475
4475
|
setWorkbook: He,
|
|
4476
|
-
titleWorkbook:
|
|
4476
|
+
titleWorkbook: wt,
|
|
4477
4477
|
setWorkbookTitle: kt,
|
|
4478
|
-
refDocumentTitle:
|
|
4479
|
-
isDirty:
|
|
4480
|
-
refSave:
|
|
4478
|
+
refDocumentTitle: Lt,
|
|
4479
|
+
isDirty: dt,
|
|
4480
|
+
refSave: it,
|
|
4481
4481
|
host: o
|
|
4482
4482
|
}) }) }) }) })
|
|
4483
4483
|
})
|
|
4484
4484
|
})
|
|
4485
4485
|
});
|
|
4486
|
-
return eo =
|
|
4486
|
+
return eo = Et(co, {
|
|
4487
4487
|
theme: le ? ae.dark : ae.light,
|
|
4488
4488
|
children: [
|
|
4489
|
-
I ?
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
themeScopeClass:
|
|
4489
|
+
I ? Wt(Ht, {}) : null,
|
|
4490
|
+
Wt("style", { children: ie }),
|
|
4491
|
+
Wt("style", { children: se }),
|
|
4492
|
+
Wt(ft, {
|
|
4493
|
+
themeScopeClass: n,
|
|
4494
4494
|
themeSurface: "app",
|
|
4495
4495
|
themeMode: te,
|
|
4496
4496
|
children: eo
|
|
@@ -4498,6 +4498,6 @@ var Br = () => {
|
|
|
4498
4498
|
]
|
|
4499
4499
|
}), eo;
|
|
4500
4500
|
}));
|
|
4501
|
-
|
|
4502
|
-
var
|
|
4503
|
-
export {
|
|
4501
|
+
zr.displayName = "EagerStudio";
|
|
4502
|
+
var jr = (e) => Wt(fr, { ...e });
|
|
4503
|
+
export { zr as EagerStudio, zr as default };
|