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