@sheetxl/studio-mui 0.7.27 → 0.7.28-beta.1
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/README.md +2 -2
- package/browser/cjs/BQJKf40kttQWOzLw.cjs +20 -0
- package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +1 -0
- package/browser/cjs/B_D3JKseVvpRyX-E.cjs +1 -0
- package/browser/cjs/B_WyRpeiesnEiNP4.cjs +11 -0
- package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +2 -0
- package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +2 -0
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +1 -0
- package/browser/cjs/ByIEqNsvj52sihT9.cjs +5 -0
- package/browser/cjs/C3moehR3VOd0LnmM.cjs +1 -0
- package/browser/cjs/C97KHSuikAbr1qVM.cjs +1 -0
- package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +1 -0
- package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +1 -0
- package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +1 -0
- package/browser/cjs/CZm1jVZaHQ246prW.cjs +1 -0
- package/browser/cjs/CdDYyAfccXme8w6m.cjs +1 -0
- package/browser/cjs/DBJLJGiCGXesx5n6.cjs +1 -0
- package/browser/cjs/DLScL5AOXhHu9O9H.cjs +7 -0
- package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +1 -0
- package/browser/cjs/IASAYG6qgv7lJY7y.cjs +1 -0
- package/browser/cjs/KZvriGbhEOVkQD0b.cjs +1 -0
- package/browser/cjs/UnMhi28mbvLiOXQe.cjs +1 -0
- package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +1 -0
- package/browser/cjs/iMWEL01eC83oU-YY.cjs +1 -0
- package/browser/cjs/index.cjs +2 -7
- package/browser/cjs/w2GjebPlOFv3pCbm.cjs +1 -0
- package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +1 -0
- package/browser/esm/0EONOhVZ7oT0C_G2.mjs +1150 -0
- package/browser/esm/5x7evORpymnb5SfW.mjs +129 -0
- package/browser/esm/BACBR1jjcpJbhOWA.mjs +191 -0
- package/browser/esm/BPZne8WpzrkWOH6L.mjs +47 -0
- package/browser/esm/BeKa8xVj69hAVKRN.mjs +155 -0
- package/browser/esm/BeQ9bqOvNNP-arFP.mjs +219 -0
- package/browser/esm/Bf3PIOM6U-NmWk2O.mjs +20 -0
- package/browser/esm/C4BPDYeqgN59wMGp.mjs +411 -0
- package/browser/esm/CGbn_xdhgTvk2mvb.mjs +612 -0
- package/browser/esm/CKADOp3hTx0MSNY7.mjs +52 -0
- package/browser/esm/CR2sUEZyRqVv2SNl.mjs +105 -0
- package/browser/esm/CTN8J8c1AneJu3Lu.mjs +2207 -0
- package/browser/esm/Cc5akPEmIwbgKIfc.mjs +516 -0
- package/browser/esm/CePKCTL6D05kDy2E.mjs +82 -0
- package/browser/esm/DBM1blcMTZMAM-eR.mjs +217 -0
- package/browser/esm/DPBnKqhSuJ414Pxx.mjs +99 -0
- package/browser/esm/F51tGfYHocox80zY.mjs +468 -0
- package/browser/esm/SDzKpaiuhQux7tAh.mjs +5391 -0
- package/browser/esm/TDH9XceS8cAkO5d3.mjs +508 -0
- package/browser/esm/XKVlG-x_9q5dbVIW.mjs +8878 -0
- package/browser/esm/fJiwyUQJ18X-cCQz.mjs +1376 -0
- package/browser/esm/fel6EbPAcZOsBmks.mjs +42 -0
- package/browser/esm/flvjZEXrSDrtDzLB.mjs +113 -0
- package/browser/esm/index.mjs +152 -91
- package/licenses/dependencies.txt +137 -627
- package/node/esm/B9-0usA1hSoD0Nk3.mjs +679 -0
- package/node/esm/BO1vNzjGWYdZdbq9.mjs +113 -0
- package/node/esm/BYigefA8bf9FOVib.mjs +47 -0
- package/node/esm/BdrLZp98HQaVMykZ.mjs +82 -0
- package/node/esm/BlubX7gm8wTUNiZ-.mjs +106 -0
- package/node/esm/C8a6QwMGW1tMiWA6.mjs +516 -0
- package/node/esm/CCCnorMn30oUDDIY.mjs +4536 -0
- package/node/esm/CKpik3HRSANKEy4G.mjs +99 -0
- package/node/esm/CTZcfST8pUcLMail.mjs +509 -0
- package/node/esm/D1K9Ji7iQwnOnd1-.mjs +190 -0
- package/node/esm/DuUiuB59bQRPQi-D.mjs +155 -0
- package/node/esm/eKP73GEWmonTXpfv.mjs +470 -0
- package/node/esm/g3y8kxL1Ln214UNr.mjs +129 -0
- package/node/esm/index.mjs +10603 -2832
- package/package.json +27 -27
- package/resources/contents.json +30 -0
- package/resources/locales/contents.json +44 -0
- package/resources/locales/de/groups.cmd.json +219 -0
- package/resources/locales/de/studio.cmd.json +159 -0
- package/resources/locales/de/ui.msg.json +507 -0
- package/resources/locales/en/groups.cmd.json +219 -0
- package/resources/locales/en/studio.cmd.json +159 -0
- package/resources/locales/en/ui.msg.json +508 -0
- package/types/index.d.ts +2 -1761
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +131 -0
- package/types/src/anchorItems/AnchorItemsPanel.d.ts +29 -0
- package/types/src/anchorItems/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +30 -0
- package/types/src/border/BorderStylePopupButton.d.ts +40 -0
- package/types/src/border/index.d.ts +3 -0
- package/types/src/chart/command/InsertChartCommandButton.d.ts +10 -0
- package/types/src/chart/command/index.d.ts +2 -0
- package/types/src/color/Alpha.d.ts +36 -0
- package/types/src/color/Checkboard.d.ts +11 -0
- package/types/src/color/CheckboardUtils.d.ts +3 -0
- package/types/src/color/ColorButton.d.ts +21 -0
- package/types/src/color/ColorButtonList.d.ts +17 -0
- package/types/src/color/ColorPanel.d.ts +71 -0
- package/types/src/color/ColorPopupButton.d.ts +29 -0
- package/types/src/color/CustomColorPanel.d.ts +16 -0
- package/types/src/color/EditableInput.d.ts +22 -0
- package/types/src/color/Hue.d.ts +29 -0
- package/types/src/color/Saturation.d.ts +45 -0
- package/types/src/color/SketchFields.d.ts +9 -0
- package/types/src/color/Swatch.d.ts +16 -0
- package/types/src/color/Types.d.ts +11 -0
- package/types/src/color/_Utils.d.ts +4 -0
- package/types/src/color/index.d.ts +7 -0
- package/types/src/command/AccountingStyleCommandButton.d.ts +18 -0
- package/types/src/command/AppearanceCommandButton.d.ts +3 -0
- package/types/src/command/BorderCommandButton.d.ts +20 -0
- package/types/src/command/ColorCommandButton.d.ts +23 -0
- package/types/src/command/DocThemeCommandButton.d.ts +19 -0
- package/types/src/command/FileCommandButton.d.ts +8 -0
- package/types/src/command/FontFamilyCommandButton.d.ts +9 -0
- package/types/src/command/FontSizeCommandButton.d.ts +21 -0
- package/types/src/command/InsertFunctionCommandPopupButton.d.ts +9 -0
- package/types/src/command/InsertFunctionSumCommandPopupButton.d.ts +8 -0
- package/types/src/command/LanguageCommandButton.d.ts +19 -0
- package/types/src/command/LocaleCommandButton.d.ts +17 -0
- package/types/src/command/NumberFormatCommandButton.d.ts +6 -0
- package/types/src/command/PasteCommandButton.d.ts +14 -0
- package/types/src/command/PresetCellStylesCommandButton.d.ts +11 -0
- package/types/src/command/PresetTableStylesCommandButton.d.ts +12 -0
- package/types/src/command/RegisterCatalog.d.ts +3 -0
- package/types/src/command/SheetCommandGroups.d.ts +10 -0
- package/types/src/command/SheetZoomCommandButton.d.ts +9 -0
- package/types/src/command/StudioCommandGroups.d.ts +11 -0
- package/types/src/command/TextEffectsCommandButton.d.ts +6 -0
- package/types/src/command/TextRotateGroupButton.d.ts +14 -0
- package/types/src/command/UndoRedoCommandButton.d.ts +14 -0
- package/types/src/command/WalkingCopyCommandButton.d.ts +6 -0
- package/types/src/command/WorkbookCommandGroups.d.ts +11 -0
- package/types/src/command/index.d.ts +23 -0
- package/types/src/conditionalFormat/ColorScaleRulePanel.d.ts +18 -0
- package/types/src/conditionalFormat/ConditionalFormatDetailsPanel.d.ts +23 -0
- package/types/src/conditionalFormat/ConditionalFormatDetailsTaskPane.d.ts +4 -0
- package/types/src/conditionalFormat/ConditionalFormatEditorPanel.d.ts +20 -0
- package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +2 -0
- package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +32 -0
- package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +34 -0
- package/types/src/conditionalFormat/ConditionalFormatTitle.d.ts +10 -0
- package/types/src/conditionalFormat/DataBarRulePanel.d.ts +23 -0
- package/types/src/conditionalFormat/IconSetRulePanel.d.ts +23 -0
- package/types/src/conditionalFormat/PresetChip.d.ts +30 -0
- package/types/src/conditionalFormat/PresetScalesCommandButton.d.ts +20 -0
- package/types/src/conditionalFormat/RulePreview.d.ts +23 -0
- package/types/src/conditionalFormat/RuleSection.d.ts +20 -0
- package/types/src/conditionalFormat/ScaleMiniGrid.d.ts +59 -0
- package/types/src/conditionalFormat/ScaleStopRow.d.ts +34 -0
- package/types/src/conditionalFormat/index.d.ts +3 -0
- package/types/src/conditionalFormat/previewColor.d.ts +50 -0
- package/types/src/conditions/AverageOption.d.ts +25 -0
- package/types/src/conditions/BetweenOption.d.ts +25 -0
- package/types/src/conditions/BooleanOption.d.ts +24 -0
- package/types/src/conditions/CombinatorOption.d.ts +41 -0
- package/types/src/conditions/ConditionEditor.d.ts +57 -0
- package/types/src/conditions/ConditionUtils.d.ts +83 -0
- package/types/src/conditions/DateTimeOption.d.ts +43 -0
- package/types/src/conditions/ExpressionOption.d.ts +26 -0
- package/types/src/conditions/InSetOption.d.ts +37 -0
- package/types/src/conditions/NumberOption.d.ts +24 -0
- package/types/src/conditions/OperatorAndParamEditor.d.ts +55 -0
- package/types/src/conditions/OperatorSelect.d.ts +35 -0
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +39 -0
- package/types/src/conditions/ScalarOption.d.ts +29 -0
- package/types/src/conditions/SelectorSelect.d.ts +43 -0
- package/types/src/conditions/StringOption.d.ts +24 -0
- package/types/src/conditions/TimePeriodOption.d.ts +25 -0
- package/types/src/conditions/TopNOption.d.ts +25 -0
- package/types/src/conditions/index.d.ts +13 -0
- package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +16 -0
- package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -0
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +12 -0
- package/types/src/dataValidation/DataValidationPlugin.d.ts +2 -0
- package/types/src/dataValidation/index.d.ts +2 -0
- package/types/src/debug/DebugUtils.d.ts +4 -0
- package/types/src/debug/index.d.ts +2 -0
- package/types/src/dialog/CommentsDialog.d.ts +11 -0
- package/types/src/dialog/FindReplaceWindow.d.ts +13 -0
- package/types/src/dialog/HyperlinkDialog.d.ts +28 -0
- package/types/src/dialog/InsertFunctionDialog.d.ts +25 -0
- package/types/src/dialog/NamedReferenceDialog.d.ts +17 -0
- package/types/src/dialog/NumberFormatDialog.d.ts +12 -0
- package/types/src/dialog/ResizeHeaderDialog.d.ts +15 -0
- package/types/src/dialog/ShortcutKeysDialog.d.ts +9 -0
- package/types/src/dialog/ShortcutKeysPanel.d.ts +28 -0
- package/types/src/dialog/SortDialog.d.ts +9 -0
- package/types/src/dialog/TableNewDialog.d.ts +14 -0
- package/types/src/dialog/WorkbookStatisticsDialog.d.ts +13 -0
- package/types/src/dialog/index.d.ts +10 -0
- package/types/src/filter/ColumnMenu.d.ts +13 -0
- package/types/src/filter/FilterList.d.ts +28 -0
- package/types/src/filter/index.d.ts +3 -0
- package/types/src/form/FormulaField.d.ts +221 -0
- package/types/src/form/InputField.d.ts +89 -0
- package/types/src/form/index.d.ts +3 -0
- package/types/src/formulaBar/FormulaBar.d.ts +8 -0
- package/types/src/formulaBar/IFormulaBar.d.ts +51 -0
- package/types/src/formulaBar/index.d.ts +3 -0
- package/types/src/function/FunctionArgumentsPanel.d.ts +57 -0
- package/types/src/function/FunctionSearchPanel.d.ts +35 -0
- package/types/src/function/InsertFunctionWizard.d.ts +79 -0
- package/types/src/function/index.d.ts +4 -0
- package/types/src/function/paneMetrics.d.ts +33 -0
- package/types/src/index.d.ts +21 -0
- package/types/src/itemsPanel/EditorPanel.d.ts +21 -0
- package/types/src/itemsPanel/ItemCard.d.ts +57 -0
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +215 -0
- package/types/src/itemsPanel/ItemsPanel.d.ts +45 -0
- package/types/src/itemsPanel/SortableCards.d.ts +67 -0
- package/types/src/itemsPanel/index.d.ts +6 -0
- package/types/src/movable/MovableContextMenu.d.ts +13 -0
- package/types/src/movable/index.d.ts +2 -0
- package/types/src/named/INamedCollectionEditor.d.ts +37 -0
- package/types/src/named/NamedCollectionEditor.d.ts +7 -0
- package/types/src/named/NamedDetailsPanel.d.ts +11 -0
- package/types/src/named/NamedDetailsTaskPane.d.ts +3 -0
- package/types/src/named/NamedDraft.d.ts +68 -0
- package/types/src/named/NamedEditorPanel.d.ts +19 -0
- package/types/src/named/NamedPlugin.d.ts +2 -0
- package/types/src/named/index.d.ts +8 -0
- package/types/src/numberFormat/NumberFormatPanel.d.ts +29 -0
- package/types/src/numberFormat/NumberFormatTaskPane.d.ts +12 -0
- package/types/src/numberFormat/index.d.ts +8 -0
- package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +20 -0
- package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +3 -0
- package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +27 -0
- package/types/src/protectedRange/ProtectedRangePlugin.d.ts +2 -0
- package/types/src/protectedRange/index.d.ts +2 -0
- package/types/src/protection/WorkbookProtectionDialog.d.ts +23 -0
- package/types/src/protection/WorkbookProtectionPanel.d.ts +51 -0
- package/types/src/protection/index.d.ts +3 -0
- package/types/src/sheet/SheetTabMenu.d.ts +21 -0
- package/types/src/sheet/SheetsAllMenu.d.ts +16 -0
- package/types/src/sheet/index.d.ts +3 -0
- package/types/src/statusBar/NumberStats.d.ts +27 -0
- package/types/src/statusBar/SheetZoomScale.d.ts +11 -0
- package/types/src/statusBar/StatusBar.d.ts +35 -0
- package/types/src/statusBar/index.d.ts +4 -0
- package/types/src/studio/CommandsWrapper.d.ts +36 -0
- package/types/src/studio/DefaultLogo.d.ts +3 -0
- package/types/src/studio/EagerStudio.d.ts +5 -0
- package/types/src/studio/Studio.d.ts +26 -0
- package/types/src/studio/StudioCommandProvider.d.ts +26 -0
- package/types/src/studio/StudioCommands.d.ts +115 -0
- package/types/src/studio/StudioNotifierProvider.d.ts +10 -0
- package/types/src/studio/StudioProps.d.ts +372 -0
- package/types/src/studio/StudioSplitPane.d.ts +60 -0
- package/types/src/studio/StudioTaskPaneArea.d.ts +8 -0
- package/types/src/studio/StudioToolbar.d.ts +37 -0
- package/types/src/studio/index.d.ts +4 -0
- package/types/src/studio/useStudioApp.d.ts +51 -0
- package/types/src/table/TableDetailsPanel.d.ts +17 -0
- package/types/src/table/TableDetailsTaskPane.d.ts +3 -0
- package/types/src/table/TablePlugin.d.ts +2 -0
- package/types/src/table/TableStyleCanvasPreview.d.ts +21 -0
- package/types/src/table/TableStyleOptionsPanel.d.ts +38 -0
- package/types/src/table/TableStylePreview.d.ts +43 -0
- package/types/src/table/index.d.ts +7 -0
- package/types/src/theme/ThemeSelectButton.d.ts +23 -0
- package/types/src/theme/ThemeSelectPanel.d.ts +17 -0
- package/types/src/theme/ThemeSelectPopupButton.d.ts +24 -0
- package/types/src/theme/ThemeUtils.d.ts +57 -0
- package/types/src/theme/index.d.ts +5 -0
- package/types/src/toast/ToastError.d.ts +10 -0
- package/types/src/toast/index.d.ts +2 -0
- package/types/src/toolbar/WorkbookToolbars.d.ts +46 -0
- package/types/src/toolbar/index.d.ts +2 -0
- package/types/src/workbook/DefaultRenderers.d.ts +23 -0
- package/types/src/workbook/DocumentTitle.d.ts +69 -0
- package/types/src/workbook/WorkbookContextMenu.d.ts +13 -0
- package/types/src/workbook/WorkbookElement.d.ts +12 -0
- package/types/src/workbook/WorkbookStrip.d.ts +37 -0
- package/types/src/workbook/index.d.ts +7 -0
- package/browser/cjs/0DtrpXkQQehBmvSv.cjs +0 -6
- package/browser/cjs/6C3ia2nz4Zm-AdMZ.cjs +0 -7
- package/browser/cjs/BR_EGEaHisRrXAtK.cjs +0 -6
- package/browser/cjs/B_v_M4TiavtofChs.cjs +0 -42
- package/browser/cjs/C17p-h_nw582H7WD.cjs +0 -20
- package/browser/cjs/CInmVysdoHEvvW9h.cjs +0 -6
- package/browser/cjs/CMvQZPQsE7MuTMy_.cjs +0 -6
- package/browser/cjs/CkNt54AXVfJjIWja.cjs +0 -6
- package/browser/cjs/CtRvyhDzQxsk7dkI.cjs +0 -6
- package/browser/cjs/DN9cQ4_4ERQvzKn6.cjs +0 -6
- package/browser/cjs/DUTuBWUNF-w3Fxtb.cjs +0 -6
- package/browser/cjs/pTzEs1wlZj5Bb6xc.cjs +0 -18
- package/browser/esm/8ZnwcsRrGO3Nlw9Y.mjs +0 -54
- package/browser/esm/BFZ4oCbQukelEVLI.mjs +0 -53
- package/browser/esm/BP3nTf4-SLftsj61.mjs +0 -640
- package/browser/esm/BSMkBkXBQgZhX1xk.mjs +0 -2159
- package/browser/esm/CPLIJbynjEkwF2T0.mjs +0 -4533
- package/browser/esm/CuC13VFjBYFE7kub.mjs +0 -155
- package/browser/esm/Cw3i8T1tVnm8o6eB.mjs +0 -46
- package/browser/esm/D6E8W2KK4dGVRQO_.mjs +0 -25
- package/browser/esm/D8xc3AM9QHEqmpb9.mjs +0 -50
- package/browser/esm/DA_bEpA5kkn89fmW.mjs +0 -2411
- package/browser/esm/DVqOr-7nEXA7IjKJ.mjs +0 -26
- package/browser/esm/VAUOzclLs-dR9nt_.mjs +0 -50
- package/node/assets/style.css +0 -1
- package/node/esm/B9dvpdCD_p2q8aNP.mjs +0 -156
- package/node/esm/BBxZemzbmUkoOYdq.mjs +0 -46
- package/node/esm/BDdkV45Cf7BLs5jE.mjs +0 -25
- package/node/esm/BoX8OuVRgUNgw0Wb.mjs +0 -91
- package/node/esm/CPbwVoL6mq66TtTR.mjs +0 -53
- package/node/esm/DMd6h1vz-USluank.mjs +0 -88
- package/node/esm/DYgtaT_soTbSP8M9.mjs +0 -52
- package/node/esm/DxDGSRoOYlWydiwL.mjs +0 -57
- package/node/esm/OMgXBbHk-VRNKAop.mjs +0 -26
- package/node/esm/bGXLfLFngllNb8U1.mjs +0 -50
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-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 { n as e, t } from "./DBM1blcMTZMAM-eR.mjs";
|
|
8
|
+
import { FunctionArgIcons as n, FunctionPreviewContent as r, FunctionSignature as i, argTypeKey as a, assembleCall as o, createFunctionDescriptor as s, createFunctionHint as c, formatEvalValue as l, toArgRows as u, useWorkbook as d } from "@sheetxl/react";
|
|
9
|
+
import { DynamicIcon as f, KeyCodes as p, useCallbackRef as m, useTranslator as h } from "@sheetxl/utils-react";
|
|
10
|
+
import { memo as g, useEffect as _, useId as v, useMemo as y, useRef as b, useState as x } from "react";
|
|
11
|
+
import { ExhibitIconButton as ee } from "@sheetxl/utils-mui";
|
|
12
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
13
|
+
import { Box as T, InputAdornment as E, MenuItem as D, TextField as O, Typography as te } from "@mui/material";
|
|
14
|
+
var k = g((e) => {
|
|
15
|
+
let { context: t, selected: n, onChangeSelected: a, onActivate: o, autoFocus: l = !1, className: u } = e, g = h(), k = d(), [A, j] = x([]), [M, N] = x("*"), [P, F] = x(""), [I, L] = x(""), [R, z] = x([]), [B, V] = x(null), H = (U = M) === "*" ? void 0 : U;
|
|
16
|
+
var U;
|
|
17
|
+
let W = b(null), G = b(null), K = v(), q = (e) => `${K}${e}`;
|
|
18
|
+
_(() => {
|
|
19
|
+
let e = setTimeout(() => L(P.trim()), 150);
|
|
20
|
+
return () => clearTimeout(e);
|
|
21
|
+
}, [P]), _(() => {
|
|
22
|
+
l && G.current?.focus();
|
|
23
|
+
}, [l]), _(() => {
|
|
24
|
+
let e = !1;
|
|
25
|
+
return (async () => {
|
|
26
|
+
let n = await t?.()?.getCategories() ?? [];
|
|
27
|
+
e || j(n);
|
|
28
|
+
})(), () => {
|
|
29
|
+
e = !0;
|
|
30
|
+
};
|
|
31
|
+
}, [t]);
|
|
32
|
+
let J = m(a, [a]);
|
|
33
|
+
_(() => {
|
|
34
|
+
let e = !1;
|
|
35
|
+
return (async () => {
|
|
36
|
+
let n = t?.();
|
|
37
|
+
if (!n) return;
|
|
38
|
+
let r = I ? await n.searchByText(I, {
|
|
39
|
+
category: H,
|
|
40
|
+
limit: 100
|
|
41
|
+
}) : await n.searchByCategory(H);
|
|
42
|
+
e || (z(r), J(r[0] ?? null));
|
|
43
|
+
})(), () => {
|
|
44
|
+
e = !0;
|
|
45
|
+
};
|
|
46
|
+
}, [
|
|
47
|
+
t,
|
|
48
|
+
H,
|
|
49
|
+
I,
|
|
50
|
+
J
|
|
51
|
+
]), _(() => {
|
|
52
|
+
if (!n) return void V(null);
|
|
53
|
+
let e = !1, t = n.getName();
|
|
54
|
+
return n.getDescriptor().then((n) => {
|
|
55
|
+
e || V(s(t, n));
|
|
56
|
+
}).catch(() => {
|
|
57
|
+
e || V(null);
|
|
58
|
+
}), () => {
|
|
59
|
+
e = !0;
|
|
60
|
+
};
|
|
61
|
+
}, [n]);
|
|
62
|
+
let Y = y(() => n ? c(n, { locale: k?.getLocale() }) : null, [n, k]), X = m((e) => {
|
|
63
|
+
R.length !== 0 && J(R[Math.min(R.length - 1, Math.max(0, e))]);
|
|
64
|
+
}, [R, J]), Z = m((e) => {
|
|
65
|
+
let t = n ? R.indexOf(n) : -1;
|
|
66
|
+
X(t + e);
|
|
67
|
+
}, [
|
|
68
|
+
R,
|
|
69
|
+
n,
|
|
70
|
+
X
|
|
71
|
+
]), Q = m((e) => {
|
|
72
|
+
if (e.isDefaultPrevented()) return;
|
|
73
|
+
let t = W.current?.contains(e.target) ?? !1;
|
|
74
|
+
switch (e.keyCode) {
|
|
75
|
+
case p.Down:
|
|
76
|
+
Z(1);
|
|
77
|
+
break;
|
|
78
|
+
case p.Up:
|
|
79
|
+
Z(-1);
|
|
80
|
+
break;
|
|
81
|
+
case p.PageDown:
|
|
82
|
+
Z(10);
|
|
83
|
+
break;
|
|
84
|
+
case p.PageUp:
|
|
85
|
+
Z(-10);
|
|
86
|
+
break;
|
|
87
|
+
case p.Home:
|
|
88
|
+
if (!t) return;
|
|
89
|
+
X(0);
|
|
90
|
+
break;
|
|
91
|
+
case p.End:
|
|
92
|
+
if (!t) return;
|
|
93
|
+
X(R.length - 1);
|
|
94
|
+
break;
|
|
95
|
+
default: return;
|
|
96
|
+
}
|
|
97
|
+
e.preventDefault();
|
|
98
|
+
}, [
|
|
99
|
+
Z,
|
|
100
|
+
X,
|
|
101
|
+
R
|
|
102
|
+
]);
|
|
103
|
+
_(() => {
|
|
104
|
+
n && (W.current?.querySelector("[data-selected=\"true\"]"))?.scrollIntoView?.({ block: "nearest" });
|
|
105
|
+
}, [n]);
|
|
106
|
+
let $ = y(() => R.map((e) => {
|
|
107
|
+
let t = e.getName(), r = e === n;
|
|
108
|
+
return C(T, {
|
|
109
|
+
id: q(t),
|
|
110
|
+
component: "div",
|
|
111
|
+
role: "option",
|
|
112
|
+
"aria-selected": r,
|
|
113
|
+
"data-selected": r,
|
|
114
|
+
onMouseDown: (e) => {
|
|
115
|
+
e.button === 0 && e.preventDefault();
|
|
116
|
+
},
|
|
117
|
+
onClick: () => J(e),
|
|
118
|
+
onDoubleClick: () => {
|
|
119
|
+
o?.();
|
|
120
|
+
},
|
|
121
|
+
sx: {
|
|
122
|
+
padding: "3px 8px",
|
|
123
|
+
cursor: "default",
|
|
124
|
+
whiteSpace: "nowrap",
|
|
125
|
+
fontFamily: "var(--sxl-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)",
|
|
126
|
+
backgroundColor: r ? "action.selected" : void 0,
|
|
127
|
+
"&:hover": { backgroundColor: r ? "action.selected" : "action.hover" }
|
|
128
|
+
},
|
|
129
|
+
children: t
|
|
130
|
+
}, t);
|
|
131
|
+
}), [
|
|
132
|
+
R,
|
|
133
|
+
n,
|
|
134
|
+
J,
|
|
135
|
+
o
|
|
136
|
+
]);
|
|
137
|
+
return w(T, {
|
|
138
|
+
className: u,
|
|
139
|
+
onKeyDown: Q,
|
|
140
|
+
sx: {
|
|
141
|
+
height: "415px",
|
|
142
|
+
flex: "1 1 auto",
|
|
143
|
+
minHeight: 0,
|
|
144
|
+
boxSizing: "border-box",
|
|
145
|
+
paddingTop: (e) => e.spacing(1.5),
|
|
146
|
+
display: "flex",
|
|
147
|
+
flexDirection: "column",
|
|
148
|
+
rowGap: (e) => e.spacing(2)
|
|
149
|
+
},
|
|
150
|
+
children: [
|
|
151
|
+
C(O, {
|
|
152
|
+
size: "small",
|
|
153
|
+
fullWidth: !0,
|
|
154
|
+
label: g("insertFunction.searchLabel"),
|
|
155
|
+
value: P,
|
|
156
|
+
inputRef: G,
|
|
157
|
+
onChange: (e) => F(e.target.value),
|
|
158
|
+
sx: { flexShrink: 0 },
|
|
159
|
+
slotProps: {
|
|
160
|
+
input: {
|
|
161
|
+
startAdornment: C(E, {
|
|
162
|
+
position: "start",
|
|
163
|
+
children: C(f, { iconKey: "Find" })
|
|
164
|
+
}),
|
|
165
|
+
endAdornment: P ? C(E, {
|
|
166
|
+
position: "end",
|
|
167
|
+
children: C(ee, {
|
|
168
|
+
"aria-label": g("insertFunction.clearSearch"),
|
|
169
|
+
propsTooltip: { label: g("insertFunction.clearSearch") },
|
|
170
|
+
onMouseDown: (e) => {
|
|
171
|
+
e.button === 0 && e.preventDefault();
|
|
172
|
+
},
|
|
173
|
+
onClick: () => F(""),
|
|
174
|
+
icon: C(f, { iconKey: "Close" }),
|
|
175
|
+
size: "small"
|
|
176
|
+
})
|
|
177
|
+
}) : void 0
|
|
178
|
+
},
|
|
179
|
+
htmlInput: {
|
|
180
|
+
className: "autoFocus",
|
|
181
|
+
spellCheck: !1,
|
|
182
|
+
autoComplete: "off"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}),
|
|
186
|
+
w(O, {
|
|
187
|
+
select: !0,
|
|
188
|
+
size: "small",
|
|
189
|
+
fullWidth: !0,
|
|
190
|
+
label: g("insertFunction.categoryLabel"),
|
|
191
|
+
value: M,
|
|
192
|
+
onChange: (e) => N(e.target.value),
|
|
193
|
+
slotProps: { inputLabel: { shrink: !0 } },
|
|
194
|
+
sx: { flexShrink: 0 },
|
|
195
|
+
children: [C(D, {
|
|
196
|
+
value: "*",
|
|
197
|
+
children: g("insertFunction.categoryAll")
|
|
198
|
+
}), A.map((e) => C(D, {
|
|
199
|
+
value: e.name,
|
|
200
|
+
children: e.name
|
|
201
|
+
}, e.name))]
|
|
202
|
+
}),
|
|
203
|
+
C(T, {
|
|
204
|
+
ref: W,
|
|
205
|
+
role: "listbox",
|
|
206
|
+
className: "function-list",
|
|
207
|
+
"aria-label": g("insertFunction.listLabel"),
|
|
208
|
+
tabIndex: 0,
|
|
209
|
+
"aria-activedescendant": n ? q(n.getName()) : void 0,
|
|
210
|
+
onFocus: () => {
|
|
211
|
+
n || X(0);
|
|
212
|
+
},
|
|
213
|
+
sx: {
|
|
214
|
+
flex: "1 1 0",
|
|
215
|
+
minHeight: "80px",
|
|
216
|
+
overflowY: "auto",
|
|
217
|
+
border: "1px solid",
|
|
218
|
+
borderColor: "divider",
|
|
219
|
+
borderRadius: "4px",
|
|
220
|
+
"&:focus-visible": {
|
|
221
|
+
outline: "2px solid",
|
|
222
|
+
outlineColor: "primary.main",
|
|
223
|
+
outlineOffset: "-1px"
|
|
224
|
+
},
|
|
225
|
+
"&:focus-within [data-selected=\"true\"], &:focus [data-selected=\"true\"]": {
|
|
226
|
+
backgroundColor: "action.selected",
|
|
227
|
+
boxShadow: (e) => `inset 2px 0 0 ${e.palette.primary.main}`
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
children: $.length > 0 ? $ : C(te, {
|
|
231
|
+
sx: {
|
|
232
|
+
padding: "8px",
|
|
233
|
+
color: "text.secondary",
|
|
234
|
+
fontSize: "0.85rem"
|
|
235
|
+
},
|
|
236
|
+
children: g("insertFunction.noResults")
|
|
237
|
+
})
|
|
238
|
+
}),
|
|
239
|
+
C(T, {
|
|
240
|
+
sx: {
|
|
241
|
+
height: "5.5rem",
|
|
242
|
+
flexShrink: 0,
|
|
243
|
+
overflowY: "auto",
|
|
244
|
+
fontFamily: (e) => e.typography.fontFamily,
|
|
245
|
+
fontSize: "0.8rem",
|
|
246
|
+
lineHeight: "16px"
|
|
247
|
+
},
|
|
248
|
+
children: Y ? w(S, { children: [C(T, {
|
|
249
|
+
sx: { padding: "0 10px" },
|
|
250
|
+
children: C(i, {
|
|
251
|
+
hint: Y,
|
|
252
|
+
wrap: !0
|
|
253
|
+
})
|
|
254
|
+
}), C(r, {
|
|
255
|
+
hint: Y,
|
|
256
|
+
descriptor: B,
|
|
257
|
+
showParameters: !1
|
|
258
|
+
})] }) : null
|
|
259
|
+
})
|
|
260
|
+
]
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
k.displayName = "FunctionSearchPanel";
|
|
264
|
+
var A = g((r) => {
|
|
265
|
+
let { func: i, workbook: f, home: p, autoFocus: g = !1, onChangeCall: v, className: ee } = r, E = h(), D = d(), O = f === void 0 ? D : f, [k, A] = x([]), [j, M] = x([]), [N, P] = x([]), [F, I] = x(null), [L, R] = x(0), [z, B] = x(null), V = b(null), H = b(/* @__PURE__ */ new Map()), U = y(() => i.getDeclaration().getParameters(), [i]), W = y(() => u(U, k), [U, k]), G = y(() => c(i, { locale: O?.getLocale() }), [i, O]), K = y(() => o(G.nameLocal ?? G.name, W, k, { separator: G.argSeparator }), [
|
|
266
|
+
G,
|
|
267
|
+
W,
|
|
268
|
+
k
|
|
269
|
+
]);
|
|
270
|
+
_(() => {
|
|
271
|
+
v?.(K);
|
|
272
|
+
}, [K, v]), _(() => {
|
|
273
|
+
let e = !1, t = i.getName();
|
|
274
|
+
return i.getDescriptor().then((n) => {
|
|
275
|
+
e || B(s(t, n));
|
|
276
|
+
}).catch(() => {
|
|
277
|
+
e || B(null);
|
|
278
|
+
}), () => {
|
|
279
|
+
e = !0;
|
|
280
|
+
};
|
|
281
|
+
}, [i]), _(() => {
|
|
282
|
+
g && (V.current?.querySelector("input"))?.focus();
|
|
283
|
+
}, [g]);
|
|
284
|
+
let q = m((e) => {
|
|
285
|
+
let t = (H.current.get(e) ?? 0) + 1;
|
|
286
|
+
return H.current.set(e, t), t;
|
|
287
|
+
}, []), J = m((e, t) => {
|
|
288
|
+
A((n) => {
|
|
289
|
+
let r = n.slice();
|
|
290
|
+
for (; r.length <= e;) r.push("");
|
|
291
|
+
return r[e] = t, r;
|
|
292
|
+
}), q(e), M((t) => {
|
|
293
|
+
if (t[e] === void 0 || t[e] === null) return t;
|
|
294
|
+
let n = t.slice();
|
|
295
|
+
return n[e] = null, n;
|
|
296
|
+
});
|
|
297
|
+
}, [q]), Y = m((e, t) => {
|
|
298
|
+
P((n) => {
|
|
299
|
+
if ((n[e] ?? null) === t) return n;
|
|
300
|
+
let r = n.slice();
|
|
301
|
+
for (; r.length <= e;) r.push(null);
|
|
302
|
+
return r[e] = t, r;
|
|
303
|
+
});
|
|
304
|
+
}, []), X = m(async (e, t) => {
|
|
305
|
+
let n = q(e), r = null;
|
|
306
|
+
try {
|
|
307
|
+
r = t ? l(await t.evaluate()) : null;
|
|
308
|
+
} catch {
|
|
309
|
+
r = null;
|
|
310
|
+
}
|
|
311
|
+
H.current.get(e) === n && M((t) => {
|
|
312
|
+
let n = t.slice();
|
|
313
|
+
for (; n.length <= e;) n.push(null);
|
|
314
|
+
return n[e] = r, n;
|
|
315
|
+
});
|
|
316
|
+
}, [q]);
|
|
317
|
+
_(() => {
|
|
318
|
+
let e = O ? O.getSelectedSheet()?.getCalculation() ?? O.getCalculation() : null, t = W.some((e, t) => !e.optional && !k[t]?.trim());
|
|
319
|
+
if (!e || t || W.length > 0 && !k.some((e) => e?.trim())) return q(-1), void I(null);
|
|
320
|
+
let n = q(-1);
|
|
321
|
+
(async () => {
|
|
322
|
+
let t = null;
|
|
323
|
+
try {
|
|
324
|
+
t = l(await e.evaluate(K, p));
|
|
325
|
+
} catch {
|
|
326
|
+
t = null;
|
|
327
|
+
}
|
|
328
|
+
H.current.get(-1) === n && I(t);
|
|
329
|
+
})();
|
|
330
|
+
}, [
|
|
331
|
+
K,
|
|
332
|
+
O,
|
|
333
|
+
p,
|
|
334
|
+
k,
|
|
335
|
+
W,
|
|
336
|
+
q
|
|
337
|
+
]);
|
|
338
|
+
let Z = y(() => {
|
|
339
|
+
let e = N[L] ? L : N.findIndex((e, t) => !!e && !!W[t]), t = e >= 0 ? N[e] : null;
|
|
340
|
+
return t ? `${W[e]?.label}: ${E(t)}` : null;
|
|
341
|
+
}, [
|
|
342
|
+
N,
|
|
343
|
+
L,
|
|
344
|
+
W,
|
|
345
|
+
E
|
|
346
|
+
]), Q = y(() => {
|
|
347
|
+
let e = W[L];
|
|
348
|
+
if (e && z?.name === i.getName()) return z?.params?.[e.descKey]?.description;
|
|
349
|
+
}, [
|
|
350
|
+
W,
|
|
351
|
+
L,
|
|
352
|
+
z,
|
|
353
|
+
i
|
|
354
|
+
]), $ = y(() => W.map((r, i) => w(T, {
|
|
355
|
+
sx: {
|
|
356
|
+
display: "flex",
|
|
357
|
+
alignItems: "stretch",
|
|
358
|
+
columnGap: (e) => e.spacing(1)
|
|
359
|
+
},
|
|
360
|
+
children: [C(e, {
|
|
361
|
+
labelPlacement: "above",
|
|
362
|
+
label: w(S, { children: [C(T, {
|
|
363
|
+
component: "span",
|
|
364
|
+
sx: {
|
|
365
|
+
overflow: "hidden",
|
|
366
|
+
textOverflow: "ellipsis",
|
|
367
|
+
fontFamily: "var(--sxl-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)",
|
|
368
|
+
fontWeight: r.optional ? 400 : 700
|
|
369
|
+
},
|
|
370
|
+
children: r.label
|
|
371
|
+
}), C(n, {
|
|
372
|
+
param: r.param,
|
|
373
|
+
repeat: r.repeat,
|
|
374
|
+
optional: r.optional,
|
|
375
|
+
showType: !1,
|
|
376
|
+
size: 14
|
|
377
|
+
})] }),
|
|
378
|
+
placeholder: E(a(r.param)),
|
|
379
|
+
showError: !1,
|
|
380
|
+
helperText: null,
|
|
381
|
+
onChangeError: (e) => Y(i, e),
|
|
382
|
+
workbook: O,
|
|
383
|
+
home: p,
|
|
384
|
+
value: null,
|
|
385
|
+
onChangeText: (e) => J(i, e),
|
|
386
|
+
onChangeInput: (e) => {
|
|
387
|
+
X(i, e);
|
|
388
|
+
},
|
|
389
|
+
onFocus: () => R(i),
|
|
390
|
+
sx: {
|
|
391
|
+
minWidth: 0,
|
|
392
|
+
flex: "1 1 55%"
|
|
393
|
+
}
|
|
394
|
+
}), w(te, {
|
|
395
|
+
component: "span",
|
|
396
|
+
sx: {
|
|
397
|
+
flex: "1 1 45%",
|
|
398
|
+
minWidth: 0,
|
|
399
|
+
display: "flex",
|
|
400
|
+
boxSizing: "border-box",
|
|
401
|
+
paddingTop: t,
|
|
402
|
+
alignItems: "center",
|
|
403
|
+
columnGap: "4px",
|
|
404
|
+
overflow: "hidden",
|
|
405
|
+
whiteSpace: "nowrap",
|
|
406
|
+
color: "text.secondary",
|
|
407
|
+
fontFamily: "var(--sxl-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)",
|
|
408
|
+
fontSize: "0.8rem"
|
|
409
|
+
},
|
|
410
|
+
title: j[i] ?? "",
|
|
411
|
+
children: [C(T, {
|
|
412
|
+
component: "span",
|
|
413
|
+
"aria-hidden": !0,
|
|
414
|
+
children: "="
|
|
415
|
+
}), C(T, {
|
|
416
|
+
component: "span",
|
|
417
|
+
className: "function-arg-value",
|
|
418
|
+
sx: {
|
|
419
|
+
minWidth: 0,
|
|
420
|
+
overflow: "hidden",
|
|
421
|
+
textOverflow: "ellipsis"
|
|
422
|
+
},
|
|
423
|
+
children: j[i] ?? ""
|
|
424
|
+
})]
|
|
425
|
+
})]
|
|
426
|
+
}, r.key)), [
|
|
427
|
+
W,
|
|
428
|
+
j,
|
|
429
|
+
O,
|
|
430
|
+
p,
|
|
431
|
+
J,
|
|
432
|
+
Y,
|
|
433
|
+
X,
|
|
434
|
+
E
|
|
435
|
+
]);
|
|
436
|
+
return w(T, {
|
|
437
|
+
ref: V,
|
|
438
|
+
className: ee,
|
|
439
|
+
sx: {
|
|
440
|
+
height: "450px",
|
|
441
|
+
flex: "1 1 auto",
|
|
442
|
+
minHeight: 0,
|
|
443
|
+
boxSizing: "border-box",
|
|
444
|
+
paddingTop: (e) => e.spacing(1),
|
|
445
|
+
display: "flex",
|
|
446
|
+
flexDirection: "column",
|
|
447
|
+
rowGap: (e) => e.spacing(1),
|
|
448
|
+
fontFamily: (e) => e.typography.fontFamily,
|
|
449
|
+
fontSize: "0.8rem",
|
|
450
|
+
lineHeight: "16px"
|
|
451
|
+
},
|
|
452
|
+
children: [
|
|
453
|
+
w(T, {
|
|
454
|
+
sx: {
|
|
455
|
+
height: "70px",
|
|
456
|
+
flexShrink: 0,
|
|
457
|
+
overflow: "hidden"
|
|
458
|
+
},
|
|
459
|
+
children: [C(T, {
|
|
460
|
+
sx: {
|
|
461
|
+
fontFamily: "var(--sxl-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)",
|
|
462
|
+
color: "primary.main",
|
|
463
|
+
fontWeight: 600,
|
|
464
|
+
fontSize: "0.95rem",
|
|
465
|
+
lineHeight: "20px",
|
|
466
|
+
whiteSpace: "nowrap",
|
|
467
|
+
overflow: "hidden",
|
|
468
|
+
textOverflow: "ellipsis"
|
|
469
|
+
},
|
|
470
|
+
children: G.nameLocal ?? G.name
|
|
471
|
+
}), z?.name === i.getName() ? C(T, {
|
|
472
|
+
sx: {
|
|
473
|
+
paddingTop: "2px",
|
|
474
|
+
color: "text.secondary"
|
|
475
|
+
},
|
|
476
|
+
children: z.summary
|
|
477
|
+
}) : null]
|
|
478
|
+
}),
|
|
479
|
+
C(T, {
|
|
480
|
+
sx: {
|
|
481
|
+
display: "flex",
|
|
482
|
+
flexDirection: "column",
|
|
483
|
+
flex: "1 1 0",
|
|
484
|
+
minHeight: "80px",
|
|
485
|
+
rowGap: "4px",
|
|
486
|
+
overflowY: "auto",
|
|
487
|
+
border: "1px solid",
|
|
488
|
+
borderColor: "divider",
|
|
489
|
+
borderRadius: "4px",
|
|
490
|
+
padding: (e) => e.spacing(.5, 1)
|
|
491
|
+
},
|
|
492
|
+
children: $
|
|
493
|
+
}),
|
|
494
|
+
C(T, {
|
|
495
|
+
sx: {
|
|
496
|
+
height: "48px",
|
|
497
|
+
flexShrink: 0,
|
|
498
|
+
overflowY: "auto",
|
|
499
|
+
color: "text.secondary"
|
|
500
|
+
},
|
|
501
|
+
children: Q ? w(S, { children: [w(T, {
|
|
502
|
+
component: "span",
|
|
503
|
+
sx: { fontWeight: 600 },
|
|
504
|
+
children: [W[L]?.label, ": "]
|
|
505
|
+
}), Q] }) : null
|
|
506
|
+
}),
|
|
507
|
+
C(T, {
|
|
508
|
+
sx: {
|
|
509
|
+
display: "flex",
|
|
510
|
+
flexShrink: 0,
|
|
511
|
+
columnGap: (e) => e.spacing(1),
|
|
512
|
+
borderTop: "1px solid",
|
|
513
|
+
borderColor: "divider",
|
|
514
|
+
paddingTop: (e) => e.spacing(1)
|
|
515
|
+
},
|
|
516
|
+
children: Z ? C(T, {
|
|
517
|
+
className: "function-error",
|
|
518
|
+
sx: {
|
|
519
|
+
color: "error.main",
|
|
520
|
+
minWidth: 0,
|
|
521
|
+
overflow: "hidden",
|
|
522
|
+
textOverflow: "ellipsis"
|
|
523
|
+
},
|
|
524
|
+
children: Z
|
|
525
|
+
}) : w(S, { children: [C(T, {
|
|
526
|
+
sx: { color: "text.secondary" },
|
|
527
|
+
children: E("functionArguments.result")
|
|
528
|
+
}), C(T, {
|
|
529
|
+
className: "function-result",
|
|
530
|
+
sx: {
|
|
531
|
+
flex: "1 1 auto",
|
|
532
|
+
minWidth: 0,
|
|
533
|
+
overflow: "hidden",
|
|
534
|
+
textOverflow: "ellipsis",
|
|
535
|
+
whiteSpace: "nowrap",
|
|
536
|
+
fontFamily: "var(--sxl-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)"
|
|
537
|
+
},
|
|
538
|
+
title: F ?? "",
|
|
539
|
+
children: F ?? ""
|
|
540
|
+
})] })
|
|
541
|
+
})
|
|
542
|
+
]
|
|
543
|
+
});
|
|
544
|
+
});
|
|
545
|
+
A.displayName = "FunctionArgumentsPanel";
|
|
546
|
+
var j = "insert-function-page", M = Object.freeze({
|
|
547
|
+
Next: "Next",
|
|
548
|
+
Back: "Back",
|
|
549
|
+
Insert: "Insert"
|
|
550
|
+
}), N = (e, t) => {
|
|
551
|
+
let n = {
|
|
552
|
+
id: M.Insert,
|
|
553
|
+
label: () => t("insertFunction.insert")
|
|
554
|
+
};
|
|
555
|
+
return e === "arguments" ? [
|
|
556
|
+
n,
|
|
557
|
+
{
|
|
558
|
+
id: M.Back,
|
|
559
|
+
label: () => t("insertFunction.back")
|
|
560
|
+
},
|
|
561
|
+
"Cancel"
|
|
562
|
+
] : [
|
|
563
|
+
{
|
|
564
|
+
id: M.Next,
|
|
565
|
+
label: () => t("insertFunction.next")
|
|
566
|
+
},
|
|
567
|
+
n,
|
|
568
|
+
"Cancel"
|
|
569
|
+
];
|
|
570
|
+
}, P = g((e) => {
|
|
571
|
+
let { context: t, page: n, selected: r, onChangeSelected: i, onActivate: a, onChangeCall: o, workbook: s, home: c, className: l } = e, [u, d] = x(null);
|
|
572
|
+
n === "arguments" && r && r !== u && d(r);
|
|
573
|
+
let f = n === "arguments" && !!u;
|
|
574
|
+
return w(T, {
|
|
575
|
+
sx: {
|
|
576
|
+
display: "flex",
|
|
577
|
+
flexDirection: "column",
|
|
578
|
+
height: "450px",
|
|
579
|
+
flex: "1 1 auto",
|
|
580
|
+
minHeight: 0
|
|
581
|
+
},
|
|
582
|
+
children: [C(T, {
|
|
583
|
+
className: j,
|
|
584
|
+
"data-page": "search",
|
|
585
|
+
hidden: f,
|
|
586
|
+
sx: { display: f ? "none" : "contents" },
|
|
587
|
+
children: C(k, {
|
|
588
|
+
className: l,
|
|
589
|
+
context: t,
|
|
590
|
+
selected: r,
|
|
591
|
+
onChangeSelected: i,
|
|
592
|
+
onActivate: a,
|
|
593
|
+
autoFocus: !f
|
|
594
|
+
})
|
|
595
|
+
}), u ? C(T, {
|
|
596
|
+
className: j,
|
|
597
|
+
"data-page": "arguments",
|
|
598
|
+
hidden: !f,
|
|
599
|
+
sx: { display: f ? "contents" : "none" },
|
|
600
|
+
children: C(A, {
|
|
601
|
+
className: l,
|
|
602
|
+
func: u,
|
|
603
|
+
workbook: s,
|
|
604
|
+
home: c,
|
|
605
|
+
autoFocus: f,
|
|
606
|
+
onChangeCall: o
|
|
607
|
+
}, u.getName())
|
|
608
|
+
}) : null]
|
|
609
|
+
});
|
|
610
|
+
});
|
|
611
|
+
P.displayName = "InsertFunctionWizard";
|
|
612
|
+
export { A as a, N as i, M as n, k as o, P as r, j as t };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.7.28-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 { useEffect as e, useLayoutEffect as t, useMemo as n, useState as r } from "react";
|
|
8
|
+
var i = function() {};
|
|
9
|
+
function a(e) {
|
|
10
|
+
var t = [...arguments].slice(1);
|
|
11
|
+
e && e.addEventListener && e.addEventListener.apply(e, t);
|
|
12
|
+
}
|
|
13
|
+
function o(e) {
|
|
14
|
+
var t = [...arguments].slice(1);
|
|
15
|
+
e && e.removeEventListener && e.removeEventListener.apply(e, t);
|
|
16
|
+
}
|
|
17
|
+
var s = typeof window < "u", c = s ? t : e, l = {
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0,
|
|
20
|
+
width: 0,
|
|
21
|
+
height: 0,
|
|
22
|
+
top: 0,
|
|
23
|
+
left: 0,
|
|
24
|
+
bottom: 0,
|
|
25
|
+
right: 0
|
|
26
|
+
}, u = s && window.ResizeObserver !== void 0 ? function() {
|
|
27
|
+
var e = r(null), t = e[0], i = e[1], a = r(l), o = a[0], s = a[1], u = n(function() {
|
|
28
|
+
return new window.ResizeObserver(function(e) {
|
|
29
|
+
if (e[0]) {
|
|
30
|
+
var t = e[0].contentRect, n = t.x, r = t.y, i = t.width, a = t.height, o = t.top, c = t.left, l = t.bottom, u = t.right;
|
|
31
|
+
s({
|
|
32
|
+
x: n,
|
|
33
|
+
y: r,
|
|
34
|
+
width: i,
|
|
35
|
+
height: a,
|
|
36
|
+
top: o,
|
|
37
|
+
left: c,
|
|
38
|
+
bottom: l,
|
|
39
|
+
right: u
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}, []);
|
|
44
|
+
return c(function() {
|
|
45
|
+
if (t) return u.observe(t), function() {
|
|
46
|
+
u.disconnect();
|
|
47
|
+
};
|
|
48
|
+
}, [t]), [i, o];
|
|
49
|
+
} : function() {
|
|
50
|
+
return [i, l];
|
|
51
|
+
};
|
|
52
|
+
export { a as i, s as n, o as r, u as t };
|