@sheetxl/studio-mui 0.8.0-beta.2 → 0.8.0-beta.21
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/LICENSE.md +17 -7
- package/browser/esm/{xGJU5xUJx3HF317Q.mjs → -z5Wfuc02L-6kq1M.mjs} +14 -13
- package/browser/esm/0NmmzX7YcGCZAfjR.mjs +392 -0
- package/browser/esm/{BlZiWp3SB3wH5O38.mjs → 19wMLMJtWK0oeEVt.mjs} +4 -4
- package/browser/esm/3FkSn_nCNgxZsgIL.mjs +335 -0
- package/browser/esm/4V2MEotoMq61137z.mjs +412 -0
- package/browser/esm/ATq4TDNCeji9EzyV.mjs +141 -0
- package/browser/esm/B5WTcQ5DGtwQ0jkI.mjs +442 -0
- package/browser/esm/BB_QvUAlMtL59z9o.mjs +294 -0
- package/browser/esm/BCBAzHaXN9AV8sab.mjs +2699 -0
- package/browser/esm/BEf9LRQrSZ8r-xAT.mjs +8547 -0
- package/browser/esm/BRnkoDWmbvG8C1_N.mjs +68 -0
- package/browser/esm/{Dv3hSCyjvwo6GcH1.mjs → BTmU9XLPvYrHSqNS.mjs} +4 -4
- package/browser/esm/BbJU08YmJt-_qBF6.mjs +94 -0
- package/browser/esm/Bi0lTIkuP-DeqJcH.mjs +516 -0
- package/browser/esm/BloQOjPg78u-EF02.mjs +1288 -0
- package/browser/esm/BqbKAlU_mHU6NhT9.mjs +13 -0
- package/browser/esm/BseH-4GXYtDqvoqT.mjs +77 -0
- package/browser/esm/Bv82Dlpi9aSgFTW7.mjs +103 -0
- package/browser/esm/{C5-J1xiO3O1-qaaP.mjs → BzqmYkLttNHqg63Q.mjs} +83 -95
- package/browser/esm/C1XWND0Zi7LMcsm_.mjs +633 -0
- package/browser/esm/C2RXFrmqZeD3QqPh.mjs +975 -0
- package/browser/esm/CFBHs4m2-BlqZkEr.mjs +267 -0
- package/browser/esm/CL-QL6Z7zajam81k.mjs +225 -0
- package/browser/esm/CNcmM3o7opgAuBgV.mjs +14 -0
- package/browser/esm/{B1YOQZHyO_dmHUN4.mjs → COetbYqMtkntH82m.mjs} +2 -2
- package/browser/esm/{_v6Wbw_y3QgJy3qY.mjs → CQUfTuoSCwqQ0IMS.mjs} +2 -2
- package/browser/esm/CS3J1M5x0VrJ3ndM.mjs +973 -0
- package/browser/esm/CSc97nFWptJgbzHm.mjs +360 -0
- package/browser/esm/CTBTpY09hkS1rzas.mjs +517 -0
- package/browser/esm/{CppDmJ4ckCH3alQf.mjs → C_Gs7_-MyIUFd3GO.mjs} +156 -109
- package/browser/esm/{DSGFnb1gYyL22p0t.mjs → CgaSjzrOnWuwOhIc.mjs} +20 -18
- package/browser/esm/CmFDMGxQc2IWNQrh.mjs +831 -0
- package/browser/esm/Cn9HHObOgyeO5n59.mjs +252 -0
- package/browser/esm/D56YnBeIxJlew7m_.mjs +235 -0
- package/browser/esm/D6K4M0lTty-YfNwL.mjs +318 -0
- package/browser/esm/DBiaGhkvzLnkUxgI.mjs +197 -0
- package/browser/esm/{CNLLwRPWnd4PJgPO.mjs → DDraGX98UQjilEmH.mjs} +5 -5
- package/browser/esm/DI2OTnABUBEmEaqR.mjs +424 -0
- package/browser/esm/DP7rdmsD5vllWV3a.mjs +14 -0
- package/browser/esm/DR9p8nTF7Ac49NOk.mjs +161 -0
- package/browser/esm/Dhw4RvCFZ7-lER3m.mjs +31 -0
- package/browser/esm/{DE7MVTTfExTzvyMW.mjs → DlXxfHGCzQyswKls.mjs} +33 -31
- package/browser/esm/DqZOeLxpTB81KRea.mjs +8 -0
- package/browser/esm/{Bo74PCF42KVYJF0j.mjs → Drf5SnYtXPKJrneG.mjs} +4 -4
- package/browser/esm/DsJPi1PsaB1T96tB.mjs +106 -0
- package/browser/esm/Dtnkv-g21i8s_DmS.mjs +87 -0
- package/browser/esm/DypNzviXLejO7EFy.mjs +94 -0
- package/browser/esm/JbP9J8Lps9opfBEE.mjs +1550 -0
- package/browser/esm/{D7fA9EyCNSzQMgxg.mjs → MvwrF55lxVF8jCRR.mjs} +2 -2
- package/browser/esm/R475WpaxeXiWizBi.mjs +225 -0
- package/browser/esm/XHu8ZHNIkE6wwhdW.mjs +119 -0
- package/browser/esm/{C2Eke_9Dj_m6mtMj.mjs → XpFIJoW5f7WrDl7A.mjs} +47 -48
- package/browser/esm/_ufgBrmZqc27mJTC.mjs +242 -0
- package/browser/esm/iOjNj5iTG7nRxxjs.mjs +386 -0
- package/browser/esm/{DIGlcemS7napWyKW.mjs → iXPWuBCZoCbVaYmX.mjs} +8 -6
- package/browser/esm/index.mjs +1908 -289
- package/browser/esm/n8uT2YLiULcikick.mjs +414 -0
- package/browser/esm/oFMJAOPBUVDkFSdk.mjs +72 -0
- package/browser/esm/pCVoTlBjzq5Y0YwO.mjs +490 -0
- package/browser/esm/{iM5uEM9H4e8HGt5y.mjs → prIPxnV06vnSprPI.mjs} +3 -3
- package/licenses/dependencies.txt +113 -366
- package/node/esm/4dZy4IT0suoxZvbK.mjs +294 -0
- package/node/esm/{DVaQ6xIbKQgBk0uw.mjs → 66U7xo0GBu80pE9I.mjs} +70 -71
- package/node/esm/9Kq__XyQDKWxOU37.mjs +224 -0
- package/node/esm/{DvMAUBSQsZmIsRxi.mjs → B5izshUZ2MRDNb5s.mjs} +2 -2
- package/node/esm/{DAji2BXelmIUxioS.mjs → BCUH7DA5M8FLcqxw.mjs} +23 -23
- package/node/esm/BORgnY9dptVfd8wC.mjs +267 -0
- package/node/esm/BUqtenzZROfaeBgh.mjs +516 -0
- package/node/esm/{BJi0FlhIqCMEwROu.mjs → BYf9hvHJuKJNqqZO.mjs} +190 -141
- package/node/esm/B_07uId4kB51FCtK.mjs +972 -0
- package/node/esm/Bb5tJ1TuwZePhOI_.mjs +94 -0
- package/node/esm/BePpjuTMltMTtgmp.mjs +73 -0
- package/node/esm/Bsug_5tyxbKlPnjZ.mjs +425 -0
- package/node/esm/{CCWQ116Z67Kz78Uo.mjs → Bv3K0CqiXzYTm7CK.mjs} +33 -31
- package/node/esm/C75b6boqKp33EdpB.mjs +77 -0
- package/node/esm/CAr94CzmtttReoYz.mjs +975 -0
- package/node/esm/{DN-bhyNbuBbNB0Ky.mjs → CEQmZUAgMA3rIxe_.mjs} +3 -3
- package/node/esm/CRkzp1_dyeM1KUud.mjs +94 -0
- package/node/esm/{cJDXopFIX6f3_oi3.mjs → CaMuiNImC2zQQykf.mjs} +2 -2
- package/node/esm/CiIW_yB_qnJV5RUA.mjs +1283 -0
- package/node/esm/{C0M1VbsIRuRauUI-.mjs → CnPQj9mRZUhQycvE.mjs} +85 -97
- package/node/esm/Cv-r7t8eamR5ZFiz.mjs +197 -0
- package/node/esm/CyOrPZTUqjp45ABy.mjs +106 -0
- package/node/esm/D4ZsBsKhm6gdi5wO.mjs +519 -0
- package/node/esm/DB0nWZ9I881Gdoeo.mjs +142 -0
- package/node/esm/DJi__4aWX4wwGjnt.mjs +385 -0
- package/node/esm/DMqVb7WqCzqQX3wx.mjs +141 -0
- package/node/esm/D_3Mcts9e87EORIi.mjs +1838 -0
- package/node/esm/{BMoRatciTqOi1HkT.mjs → DoRaGvL9s79NZAYU.mjs} +21 -21
- package/node/esm/DpHH7fvV8jCBbKt5.mjs +412 -0
- package/node/esm/DxoOobdO06D16DYc.mjs +118 -0
- package/node/esm/{BoDCV8cDmFVAYtaW.mjs → Dz9GxMRQzPtOpqNo.mjs} +2 -2
- package/node/esm/Iji4gCNbD66TvfOS.mjs +391 -0
- package/node/esm/RqUCi1IOUIuPSFCu.mjs +14 -0
- package/node/esm/S1sK514tY4D0vLiA.mjs +638 -0
- package/node/esm/SNaalbjzQGIMnqPC.mjs +319 -0
- package/node/esm/{DVshSSmP5QZU7GoY.mjs → b32Mry1LI41o7I1O.mjs} +29 -29
- package/node/esm/b_lG4702kLpmFvGb.mjs +489 -0
- package/node/esm/cQkfTTXKtrzzwTj_.mjs +242 -0
- package/node/esm/index.mjs +10368 -8704
- package/node/esm/sKtXhZg7VoFWiL32.mjs +68 -0
- package/package.json +16 -19
- package/resources/contents.json +6 -0
- package/resources/locales/contents.json +14 -0
- package/resources/locales/de/groups.cmd.json +61 -10
- package/resources/locales/de/ui.msg.json +293 -17
- package/resources/locales/de/workbookAnomalies.cmd.json +14 -0
- package/resources/locales/en/groups.cmd.json +71 -11
- package/resources/locales/en/ui.msg.json +298 -17
- package/resources/locales/en/workbookAnomalies.cmd.json +14 -0
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +10 -4
- package/types/src/anomalies/AnomaliesCommands.d.ts +8 -0
- package/types/src/anomalies/AnomaliesMessages.d.ts +30 -0
- package/types/src/anomalies/AnomaliesPlugin.d.ts +12 -0
- package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
- package/types/src/anomalies/_source.d.ts +7 -0
- package/types/src/anomalies/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +1 -1
- package/types/src/border/BorderTemplateIcon.d.ts +6 -1
- package/types/src/chart/ChartFormatPanel.d.ts +20 -0
- package/types/src/chart/ChartPlugin.d.ts +6 -0
- package/types/src/chart/index.d.ts +3 -0
- package/types/src/color/ColorPopupButton.d.ts +1 -1
- package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
- package/types/src/command/ColorCommandButton.d.ts +5 -0
- package/types/src/command/DocThemeCommandButton.d.ts +1 -1
- package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
- package/types/src/command/FontSizeCommandButton.d.ts +1 -1
- package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
- package/types/src/command/LanguageCommandButton.d.ts +1 -1
- package/types/src/command/LocaleCommandButton.d.ts +1 -1
- package/types/src/command/PresetCellStylesCommandButton.d.ts +3 -3
- package/types/src/command/PresetPivotStylesCommandButton.d.ts +17 -0
- package/types/src/command/SheetZoomCommandButton.d.ts +4 -3
- package/types/src/command/index.d.ts +2 -0
- package/types/src/comments/CommentCard.d.ts +41 -0
- package/types/src/comments/CommentsPlugin.d.ts +6 -0
- package/types/src/comments/CommentsTaskPane.d.ts +23 -0
- package/types/src/comments/index.d.ts +4 -0
- package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +1 -1
- package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +4 -4
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +3 -3
- package/types/src/conditionalFormat/IconSetRulePanel.d.ts +1 -1
- package/types/src/conditions/BetweenOption.d.ts +5 -0
- package/types/src/conditions/CombinatorOption.d.ts +7 -0
- package/types/src/conditions/ConditionEditor.d.ts +55 -3
- package/types/src/conditions/ConditionUtils.d.ts +34 -6
- package/types/src/conditions/ExpressionOption.d.ts +6 -0
- package/types/src/conditions/MembershipOption.d.ts +67 -0
- package/types/src/conditions/OperatorAndParamEditor.d.ts +36 -1
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
- package/types/src/conditions/ScalarOption.d.ts +19 -0
- package/types/src/conditions/SelectorSelect.d.ts +16 -7
- package/types/src/conditions/index.d.ts +1 -1
- package/types/src/conditions/useFormulaOption.d.ts +2 -2
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +9 -5
- package/types/src/dataValidation/DataValidationIcon.d.ts +1 -1
- package/types/src/dataValidation/DataValidationPlugin.d.ts +1 -1
- package/types/src/dialog/HyperlinkDialog.d.ts +15 -0
- package/types/src/dialog/OutlineSettingsDialog.d.ts +12 -0
- package/types/src/dialog/PivotTableNewDialog.d.ts +11 -0
- package/types/src/dialog/SparklineEditDialog.d.ts +10 -0
- package/types/src/dialog/SparklineNewDialog.d.ts +23 -0
- package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
- package/types/src/dialog/_ShortcutSearch.d.ts +26 -0
- package/types/src/dialog/index.d.ts +0 -1
- package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +1 -1
- package/types/src/externalLink/ExternalLinksPlugin.d.ts +1 -1
- package/types/src/fill/GradientEditor.d.ts +15 -13
- package/types/src/fill/GradientStopsBar.d.ts +43 -0
- package/types/src/fill/PatternPopupButton.d.ts +1 -1
- package/types/src/fill/index.d.ts +1 -0
- package/types/src/filter/ColumnMenu.d.ts +31 -1
- package/types/src/filter/PivotMenu.d.ts +31 -0
- package/types/src/filter/index.d.ts +1 -1
- package/types/src/form/FormulaField.d.ts +10 -4
- package/types/src/form/InputField.d.ts +5 -5
- package/types/src/format/AlignmentPanel.d.ts +1 -2
- package/types/src/format/BorderPreview.d.ts +33 -16
- package/types/src/format/FillPanel.d.ts +42 -2
- package/types/src/format/FormatPanelParts.d.ts +3 -1
- package/types/src/format/FormatPlugin.d.ts +1 -6
- package/types/src/format/LinePanel.d.ts +53 -0
- package/types/src/format/LinePreviews.d.ts +71 -0
- package/types/src/format/index.d.ts +1 -0
- package/types/src/format/useFormatSelection.d.ts +7 -6
- package/types/src/formulaBar/IFormulaBar.d.ts +32 -3
- package/types/src/formulaBar/MobileFormulaBar.d.ts +42 -0
- package/types/src/formulaBar/MobileInputToolbar.d.ts +43 -0
- package/types/src/formulaBar/index.d.ts +3 -0
- package/types/src/formulaBar/useFormulaBarSession.d.ts +68 -0
- package/types/src/index.d.ts +19 -5
- package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
- package/types/src/itemsPanel/EditorPanel.d.ts +1 -2
- package/types/src/itemsPanel/ItemCard.d.ts +50 -7
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +13 -0
- package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
- package/types/src/itemsPanel/ItemsSearchField.d.ts +17 -0
- package/types/src/itemsPanel/index.d.ts +2 -0
- package/types/src/named/NamedDetailsPanel.d.ts +2 -2
- package/types/src/named/NamedPlugin.d.ts +1 -1
- package/types/src/picture/PicturePlugin.d.ts +6 -0
- package/types/src/picture/index.d.ts +2 -0
- package/types/src/pivot/PivotChipMenu.d.ts +10 -0
- package/types/src/pivot/PivotPlugin.d.ts +3 -0
- package/types/src/pivot/PivotStyleCanvasPreview.d.ts +23 -0
- package/types/src/pivot/PivotTableHeader.d.ts +12 -0
- package/types/src/pivot/PivotValueSettingsDialog.d.ts +15 -0
- package/types/src/pivot/_pivotSource.d.ts +7 -0
- package/types/src/presence/PresenceOverlay.d.ts +14 -0
- package/types/src/presence/PresencePlugin.d.ts +31 -0
- package/types/src/presence/PresenceStrip.d.ts +22 -0
- package/types/src/presence/PresenceTaskPane.d.ts +13 -0
- package/types/src/presence/Timeline.d.ts +29 -0
- package/types/src/presence/index.d.ts +5 -0
- package/types/src/protection/ProtectedCellsPanel.d.ts +3 -3
- package/types/src/protection/ProtectionPlugin.d.ts +1 -1
- package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
- package/types/src/protection/index.d.ts +1 -1
- package/types/src/shape/ShapeFormatPanel.d.ts +11 -0
- package/types/src/shape/ShapeGalleryCommandButton.d.ts +18 -0
- package/types/src/shape/ShapePlugin.d.ts +8 -0
- package/types/src/shape/index.d.ts +3 -0
- package/types/src/slicer/InsertSlicerCommandButton.d.ts +13 -0
- package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +12 -0
- package/types/src/slicer/SlicerPlugin.d.ts +6 -0
- package/types/src/slicer/index.d.ts +3 -0
- package/types/src/statusBar/PendingStatus.d.ts +19 -0
- package/types/src/statusBar/SheetZoomScale.d.ts +6 -0
- package/types/src/statusBar/index.d.ts +1 -0
- package/types/src/studio/CommandsWrapper.d.ts +2 -0
- package/types/src/studio/StudioCommandProvider.d.ts +7 -0
- package/types/src/studio/StudioCommands.d.ts +2 -2
- package/types/src/studio/StudioProps.d.ts +50 -22
- package/types/src/studio/StudioSplitPane.d.ts +1 -1
- package/types/src/studio/formulaBarPlacement.d.ts +35 -0
- package/types/src/studio/useStudioApp.d.ts +27 -26
- package/types/src/table/TablePlugin.d.ts +1 -1
- package/types/src/table/_drawStyleSwatch.d.ts +25 -0
- package/types/src/template/TemplateDialog.d.ts +1 -1
- package/types/src/template/TemplatePanel.d.ts +5 -1
- package/types/src/template/TemplateSearchField.d.ts +17 -1
- package/types/src/template/categoryColor.d.ts +8 -0
- package/types/src/template/useTemplateCatalog.d.ts +7 -5
- package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
- package/types/src/toolbar/WorkbookToolbars.d.ts +2 -2
- package/types/src/workbook/DefaultRenderers.d.ts +45 -15
- package/types/src/workbook/OutlineButtons.d.ts +11 -0
- package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
- package/types/src/workbook/WorkbookElement.d.ts +5 -4
- package/types/src/workbook/WorkbookStrip.d.ts +8 -7
- package/types/src/workbook/index.d.ts +1 -1
- package/browser/cjs/3k_KqDFr-AybPztc.cjs +0 -5
- package/browser/cjs/3uprnzi2l0iT17Dg.cjs +0 -1
- package/browser/cjs/B9GcCj7sj8XdjPZF.cjs +0 -1
- package/browser/cjs/BGvoJjUs21bbuE1i.cjs +0 -1
- package/browser/cjs/BHb7TnK1NmimV4OX.cjs +0 -1
- package/browser/cjs/BJ-wdkCaXqJaejKf.cjs +0 -1
- package/browser/cjs/BNqyPYRxYISp-uEg.cjs +0 -1
- package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
- package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
- package/browser/cjs/BXkdjAb4jpTr412c.cjs +0 -1
- package/browser/cjs/Bc-YisjBtD56vBAW.cjs +0 -1
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
- package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
- package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
- package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
- package/browser/cjs/CuqM721PsKey3yMP.cjs +0 -1
- package/browser/cjs/Cy_XmYq6BsWmCXkk.cjs +0 -3
- package/browser/cjs/D948H7ell-f87BX3.cjs +0 -1
- package/browser/cjs/Dy6O3OWbDBKIj_Ak.cjs +0 -8
- package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
- package/browser/cjs/M0_dvdYwhikqP9kg.cjs +0 -2
- package/browser/cjs/QI6GKw7uo1f8gY8C.cjs +0 -1
- package/browser/cjs/eCw4rAEIYE3BftpG.cjs +0 -1
- package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
- package/browser/cjs/index.cjs +0 -2
- package/browser/cjs/rCZbExyf1Q3aHloQ.cjs +0 -13
- package/browser/esm/894KM-_Oc5cB6ExA.mjs +0 -97
- package/browser/esm/BQSamOMBAoFdQdJe.mjs +0 -12903
- package/browser/esm/CIbDvsCeLOFHzzId.mjs +0 -152
- package/browser/esm/CyHNVjgkMYZYlJpY.mjs +0 -5315
- package/browser/esm/D8VPmFDvXDE778_x.mjs +0 -222
- package/browser/esm/DEEnXLhYlUARg6MU.mjs +0 -410
- package/browser/esm/DN4cwAPYCrtR4gS9.mjs +0 -236
- package/browser/esm/DlEshYp6NPfHxFvI.mjs +0 -115
- package/browser/esm/GmQ9XFFY3hi1L_Ej.mjs +0 -1150
- package/browser/esm/z3zkU7Jf3WJ2_Z_P.mjs +0 -52
- package/node/esm/BI8XFczUY--Db2n3.mjs +0 -98
- package/node/esm/BgxeTfCn3jZHGwd7.mjs +0 -414
- package/node/esm/C_oV7ldFStOF_fAd.mjs +0 -115
- package/node/esm/Dbv0IltYad9SQrj3.mjs +0 -236
- package/node/esm/OmUP1AfaJcOxWQAg.mjs +0 -4462
- package/types/src/conditions/DateTimeOption.d.ts +0 -43
- package/types/src/conditions/ListSourceOption.d.ts +0 -31
- package/types/src/dialog/CommentsDialog.d.ts +0 -11
- package/types/src/filter/FilterList.d.ts +0 -31
|
@@ -0,0 +1,1838 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.21
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
import { AnomaliesPlugin as e, CommentsPlugin as t, DocumentTitle as o, ExternalLinksPlugin as r, FormatPlugin as n, FormulaField as a, InputField as i, NamedPlugin as s, ProtectionPlugin as l, SlicerPlugin as c, TablePlugin as d, WorkbookElement as p, createStudioThemeCSS as u, defaultRenderFormulaBar as m, defaultRenderPivotMenu as g, defaultRenderStatusBar as h, defaultRenderToolbar as f, defaultRenderWorkbookError as k, defaultRenderWorkbookLoading as b, registerStudioCommandCatalogs as y, registerStudioCommandGroups as w, t as x, tokensToMuiOptions as v, u as C } from "./index.mjs";
|
|
8
|
+
import { CommandRootProvider as D, DefaultTaskPaneRegistry as S, LogoNoPaddingIcon as T, PivotTablePane as E, SHAPE_ICON_PACK as W, TaskPaneArea as F, TaskPaneKey as A, TaskPaneProvider as P, ThemeStateDefaults as I, ThemeStateKey as N, WorkbookIO as R, WorkbookProvider as j, buildOOXMLThemeCSS as O, createEditable as $, createSystemColorVars as M, registerMovablePane as L, useDocThemes as B, useModelSync as K, useReferenceModeStore as _, useResolvedWorkbook as z, useTaskPaneArea as H, useWorkbookEncrypted as V, useWorkbookName as U, useWorkbookSaveState as G } from "@sheetxl/react";
|
|
9
|
+
import { Command as q, DefaultCommandButtonRegistry as X, DefaultIconService as Y, DynamicIcon as Z, LanguageStateKey as J, NotifierType as Q, ReactErrorBoundary as ee, ReactNotifierProvider as te, ReactUtils as oe, RenderSlot as re, ScrollUtils as ne, SplitPane as ae, UncaughtErrorBoundary as ie, createBusyHandle as se, useCallbackRef as le, useFullscreen as ce, useImperativeElement as de, useKeyboardResize as pe, useLanguage as ue, useMeasure as me, useNotifier as ge, usePersistentState as he, useResolvedThemeMode as fe, useTokenThemeContext as ke, useTranslator as be } from "@sheetxl/utils-react";
|
|
10
|
+
import ye, { Fragment as we, forwardRef as xe, isValidElement as ve, memo as Ce, useCallback as De, useEffect as Se, useMemo as Te, useRef as Ee, useState as We } from "react";
|
|
11
|
+
import { AnimatedLoadingPanel as Fe, AnimatedTraversingEllipsisIcon as Ae, CommandGroup as Pe, ExhibitDivider as Ie, ExhibitFloatProvider as Ne, ExhibitMenuItem as Re, ExhibitTooltip as je, ModalProvider as Oe, SelectedIcon as $e, SimpleTooltip as Me, StackTrace as Le, createExhibitTheme as Be, hideLoadingPanel as Ke, lazyModal as _e, lazyPanel as ze, showLoadingPanel as He, useInputDialog as Ve, useLazyWindow as Ue, useModal as Ge, useOptionsDialog as qe } from "@sheetxl/utils-mui";
|
|
12
|
+
import { Fragment as Xe, jsx as Ye, jsxs as Ze } from "react/jsx-runtime";
|
|
13
|
+
import { Box as Je, Card as Qe, CardActions as et, Collapse as tt, CssBaseline as ot, DialogTitle as rt, IconButton as nt, Paper as at, SvgIcon as it, Tab as st, Tabs as lt, ThemeProvider as ct, Typography as dt, alpha as pt, useMediaQuery as ut, useTheme as mt } from "@mui/material";
|
|
14
|
+
import { CommonUtils as gt, DOMUtils as ht, DefaultLanguagePackService as ft, ErrorUtils as kt, ExpectedError as bt, PartialError as yt, defineLazyModule as wt, formatMessage as xt, messageKey as vt, t as Ct } from "@sheetxl/utils";
|
|
15
|
+
import Dt from "clsx";
|
|
16
|
+
import { mergeRefs as St, useMergeRefs as Tt } from "react-merge-refs";
|
|
17
|
+
import { SnackbarContent as Et, SnackbarProvider as Wt, useSnackbar as Ft } from "notistack";
|
|
18
|
+
var At = Object.defineProperty, Pt = (e, t) => {
|
|
19
|
+
let o = {};
|
|
20
|
+
for (var r in e) At(o, r, {
|
|
21
|
+
get: e[r],
|
|
22
|
+
enumerable: !0
|
|
23
|
+
});
|
|
24
|
+
return t || At(o, Symbol.toStringTag, { value: "Module" }), o;
|
|
25
|
+
}, It = ze(wt("studio:conditionalFormatDetailsTaskPane", () => import("./CiIW_yB_qnJV5RUA.mjs"), { select: (e) => ({ default: e.ConditionalFormatDetailsTaskPane }) }).load), Nt = ["lines"], Rt = /^[A-Za-z_\\][\w.\\]*$/, jt = /^\$?[A-Za-z]{1,3}\$?\d+$/, Ot = (e) => {
|
|
26
|
+
const t = e?.getReferences() ?? null;
|
|
27
|
+
if (!e || !t || 1 !== t.getCount()) return null;
|
|
28
|
+
const o = e.getExpression().trim();
|
|
29
|
+
return Rt.test(o) && !jt.test(o) ? o : t;
|
|
30
|
+
}, $t = {
|
|
31
|
+
card: "_card_h0jnt_7",
|
|
32
|
+
actionRoot: "_actionRoot_h0jnt_11",
|
|
33
|
+
icons: "_icons_h0jnt_16",
|
|
34
|
+
expand: "_expand_h0jnt_22",
|
|
35
|
+
expandOpen: "_expandOpen_h0jnt_29",
|
|
36
|
+
stackTraceContainer: "_stackTraceContainer_h0jnt_33",
|
|
37
|
+
paper: "_paper_h0jnt_37",
|
|
38
|
+
checkIcon: "_checkIcon_h0jnt_42",
|
|
39
|
+
button: "_button_h0jnt_47"
|
|
40
|
+
}, Mt = Ce(xe((e, t) => {
|
|
41
|
+
const { id: o, message: r, iconVariant: n, error: a, hideIconVariant: i, ...s } = e, l = be(), { closeSnackbar: c } = Ft(), [d, p] = We(!1), u = a ? kt.collectErrorChain(a, !0)?.[0]?.error : void 0, m = u && !(u instanceof bt), g = De(() => {
|
|
42
|
+
p((e) => !e);
|
|
43
|
+
}, []), h = De(() => {
|
|
44
|
+
c(o);
|
|
45
|
+
}, [o, c]);
|
|
46
|
+
let f = u?.message;
|
|
47
|
+
return !f && ve(r) && (f = r), f || "string" != typeof r || (f = r), f || (f = `Unknown Error: ${r}`), Ye(Et, {
|
|
48
|
+
ref: t,
|
|
49
|
+
className: Dt($t.root, "error-snackbar"),
|
|
50
|
+
children: Ze(Qe, {
|
|
51
|
+
className: $t.card,
|
|
52
|
+
style: {
|
|
53
|
+
backgroundColor: "var(--sxl-color-error)",
|
|
54
|
+
color: "var(--sxl-color-error-content)",
|
|
55
|
+
border: "1px solid var(--sxl-color-error)"
|
|
56
|
+
},
|
|
57
|
+
children: [Ze(et, {
|
|
58
|
+
className: $t.actionRoot,
|
|
59
|
+
children: [
|
|
60
|
+
i ? null : n?.error,
|
|
61
|
+
Ye(dt, {
|
|
62
|
+
variant: "body2",
|
|
63
|
+
component: "div",
|
|
64
|
+
className: $t.typography,
|
|
65
|
+
children: f
|
|
66
|
+
}),
|
|
67
|
+
Ye("div", { style: { flex: "1 1 auto" } }),
|
|
68
|
+
Ze("div", {
|
|
69
|
+
className: $t.icons,
|
|
70
|
+
children: [m ? Ye(nt, {
|
|
71
|
+
"aria-label": l("toast.showMore"),
|
|
72
|
+
size: "small",
|
|
73
|
+
className: Dt($t.expand, { [$t.expandOpen]: d }),
|
|
74
|
+
onClick: g,
|
|
75
|
+
children: Ye(Z, { iconKey: "ExpandMore" })
|
|
76
|
+
}) : null, Ye(nt, {
|
|
77
|
+
size: "small",
|
|
78
|
+
className: $t.expand,
|
|
79
|
+
onClick: h,
|
|
80
|
+
children: Ye(Z, {
|
|
81
|
+
iconKey: "Close",
|
|
82
|
+
style: { transform: "scale(0.8)" }
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
}), m ? Ye(tt, {
|
|
88
|
+
in: d,
|
|
89
|
+
timeout: "auto",
|
|
90
|
+
children: Ye("div", {
|
|
91
|
+
className: $t.stackTraceContainer,
|
|
92
|
+
style: {
|
|
93
|
+
backgroundColor: "color-mix(in srgb, var(--sxl-color-error) 90%, var(--sxl-color-base-100))",
|
|
94
|
+
borderTop: "1px solid var(--sxl-color-error)"
|
|
95
|
+
},
|
|
96
|
+
children: Ye(Le, {
|
|
97
|
+
error: a,
|
|
98
|
+
hideLineNumbers: !0
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
}) : null]
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
}));
|
|
105
|
+
Mt.displayName = "ToastError";
|
|
106
|
+
var Lt = () => {
|
|
107
|
+
const e = be();
|
|
108
|
+
return Ye(je, {
|
|
109
|
+
label: "SheetXL",
|
|
110
|
+
description: e("logo.description"),
|
|
111
|
+
children: Ye(Je, {
|
|
112
|
+
component: "a",
|
|
113
|
+
href: "https://www.sheetxl.com",
|
|
114
|
+
target: "_blank",
|
|
115
|
+
rel: "noopener noreferrer",
|
|
116
|
+
sx: {
|
|
117
|
+
display: "inline-flex",
|
|
118
|
+
width: "24px",
|
|
119
|
+
height: "24px",
|
|
120
|
+
marginBottom: "4px",
|
|
121
|
+
marginLeft: "6px",
|
|
122
|
+
cursor: "pointer"
|
|
123
|
+
},
|
|
124
|
+
children: Ye(T, { style: {
|
|
125
|
+
width: "24px",
|
|
126
|
+
height: "24px"
|
|
127
|
+
} })
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
}, Bt = Ye(Lt, {}), Kt = Ce(xe((e, t) => {
|
|
131
|
+
const { workbook: o, className: r, logo: n = Bt, mainElement: a, startElement: i, endElement: s, ...l } = e, [c, { width: d }] = me(), p = d < 530, u = Ee(null), m = Tt([
|
|
132
|
+
u,
|
|
133
|
+
c,
|
|
134
|
+
t
|
|
135
|
+
]);
|
|
136
|
+
return Ye(Je, {
|
|
137
|
+
...l,
|
|
138
|
+
ref: m,
|
|
139
|
+
className: r,
|
|
140
|
+
children: f({
|
|
141
|
+
isCompact: p,
|
|
142
|
+
wrapperSelect: (e) => Ze(Je, {
|
|
143
|
+
sx: {
|
|
144
|
+
display: "grid",
|
|
145
|
+
gridTemplateColumns: "1fr auto 1fr",
|
|
146
|
+
flex: "1",
|
|
147
|
+
alignItems: "stretch",
|
|
148
|
+
gap: (e) => e.spacing(1),
|
|
149
|
+
paddingLeft: (e) => e.spacing(1),
|
|
150
|
+
paddingRight: (e) => e.spacing(1)
|
|
151
|
+
},
|
|
152
|
+
children: [
|
|
153
|
+
Ze(Je, {
|
|
154
|
+
sx: {
|
|
155
|
+
display: "flex",
|
|
156
|
+
flexDirection: "row",
|
|
157
|
+
alignItems: "center",
|
|
158
|
+
justifyContent: "start",
|
|
159
|
+
gap: (e) => e.spacing(.5)
|
|
160
|
+
},
|
|
161
|
+
children: [n, Ze(Je, {
|
|
162
|
+
sx: {
|
|
163
|
+
display: "flex",
|
|
164
|
+
flexDirection: "row",
|
|
165
|
+
alignItems: "center",
|
|
166
|
+
gap: (e) => e.spacing(.25)
|
|
167
|
+
},
|
|
168
|
+
children: [i, e]
|
|
169
|
+
})]
|
|
170
|
+
}),
|
|
171
|
+
Ye(Je, {
|
|
172
|
+
sx: {
|
|
173
|
+
display: "flex",
|
|
174
|
+
flexDirection: "row",
|
|
175
|
+
minWidth: 0,
|
|
176
|
+
overflow: "hidden",
|
|
177
|
+
alignItems: "center",
|
|
178
|
+
justifyContent: "center"
|
|
179
|
+
},
|
|
180
|
+
children: a
|
|
181
|
+
}),
|
|
182
|
+
Ye(Je, {
|
|
183
|
+
sx: {
|
|
184
|
+
display: "flex",
|
|
185
|
+
alignItems: "center",
|
|
186
|
+
justifyContent: "end"
|
|
187
|
+
},
|
|
188
|
+
children: s
|
|
189
|
+
})
|
|
190
|
+
]
|
|
191
|
+
})
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
}));
|
|
195
|
+
Kt.displayName = "StudioToolbar";
|
|
196
|
+
var _t = (e, t) => {
|
|
197
|
+
const o = new URL(window.location.pathname, window.location.origin);
|
|
198
|
+
e && o.searchParams.set("source", e), e && t && o.searchParams.set("title", t), window.open(o.toString(), "sheetxl-" + gt.uuidV4(), "popup=true");
|
|
199
|
+
};
|
|
200
|
+
function zt(e, t) {
|
|
201
|
+
const { workbook: o, setWorkbook: r, workbookTitle: n = "export", isDirty: a, notifier: i, refSave: s } = t;
|
|
202
|
+
let l = !1;
|
|
203
|
+
const c = async (e = null, t = null, o = null) => {
|
|
204
|
+
const r = [], n = {
|
|
205
|
+
source: e && "string" != typeof e ? e : null,
|
|
206
|
+
typedCreateWorkbookOptions: t ?? void 0,
|
|
207
|
+
onPassword: async ({ origin: e, validate: t }) => {
|
|
208
|
+
const o = await i.showInput({
|
|
209
|
+
title: Ct("dialog.password.title"),
|
|
210
|
+
description: Ct("dialog.password.open.description", { name: e.getName() ?? "" }),
|
|
211
|
+
inputType: "password",
|
|
212
|
+
options: [{
|
|
213
|
+
id: "Open",
|
|
214
|
+
label: () => Ct("dialog.open")
|
|
215
|
+
}, "Cancel"],
|
|
216
|
+
defaultOption: "Open",
|
|
217
|
+
onValidateInput: async (e, o) => void 0 === o ? { valid: !0 } : e ? await t(e) ? { valid: !0 } : {
|
|
218
|
+
valid: !1,
|
|
219
|
+
message: Ct("dialog.password.open.retry")
|
|
220
|
+
} : {
|
|
221
|
+
valid: !1,
|
|
222
|
+
message: Ct("dialog.password.open.required")
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
return "Open" === o?.option ? o.input ?? null : null;
|
|
226
|
+
},
|
|
227
|
+
progress: { onWarning: (e) => {
|
|
228
|
+
r.push(e);
|
|
229
|
+
} }
|
|
230
|
+
};
|
|
231
|
+
let a;
|
|
232
|
+
o && (n.progress.onStart = o);
|
|
233
|
+
let s = -5;
|
|
234
|
+
return R.read({
|
|
235
|
+
...n,
|
|
236
|
+
progress: {
|
|
237
|
+
async onStart(e, t) {
|
|
238
|
+
await n?.progress?.onStart?.(e, t), a = await i?.showBusy?.(Ct("workbook.opening", { name: e?.getName() ?? "" })), t && a?.setProgress?.(0, t);
|
|
239
|
+
},
|
|
240
|
+
onProgress(e, t) {
|
|
241
|
+
if (!t) return;
|
|
242
|
+
const o = Math.min(100, Math.round(e / t * 100));
|
|
243
|
+
if (o >= 100) {
|
|
244
|
+
if (100 === s) return;
|
|
245
|
+
s = 100, a?.setProgress?.(e, t);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
o - s < 5 || (s = o, a?.setProgress?.(e, t));
|
|
249
|
+
},
|
|
250
|
+
onComplete() {
|
|
251
|
+
a?.(), r.length > 0 && (i.showMessage(Ct("workbook.importWarnings")), console.warn("Import warnings:\n" + r.join("\n")));
|
|
252
|
+
},
|
|
253
|
+
onWarning(e, t) {
|
|
254
|
+
n?.progress?.onWarning?.(e, t);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}, d = async (e, t, o = !1, r) => {
|
|
259
|
+
let a;
|
|
260
|
+
const s = {
|
|
261
|
+
format: t?.key,
|
|
262
|
+
progress: {
|
|
263
|
+
async onStart(e) {
|
|
264
|
+
a = await i?.showBusy?.(Ct("workbook.saving", { name: e?.getName() ?? "" }));
|
|
265
|
+
},
|
|
266
|
+
onComplete() {
|
|
267
|
+
a?.();
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
onWarnings: r ?? (async ({ warnings: e, origin: t, canCancel: o }) => {
|
|
271
|
+
a?.(), console.warn(`Not written to '${t.getName()}':\n${e.map((e) => ` ${e.message}`).join("\n")}`);
|
|
272
|
+
const r = Ct("dialog.writeWarnings.title"), n = t.getFormat(), s = (n ? (await R.getWriteFormats({ search: n }))[0] : void 0)?.description ?? n ?? "", l = Ct("dialog.writeWarnings.keep");
|
|
273
|
+
return o ? "Save" === await i.showOptions({
|
|
274
|
+
title: r,
|
|
275
|
+
type: Q.Warning,
|
|
276
|
+
description: `${Ct("dialog.writeWarnings.confirm", { format: s })}\n\n${l}`,
|
|
277
|
+
options: [{
|
|
278
|
+
id: "Save",
|
|
279
|
+
label: () => Ct("dialog.save")
|
|
280
|
+
}, "Cancel"],
|
|
281
|
+
defaultOption: "Cancel"
|
|
282
|
+
}) && (a = await i?.showBusy?.(Ct("workbook.saving", { name: t?.getName() ?? "" })), !0) : (i.showOptions({
|
|
283
|
+
title: r,
|
|
284
|
+
type: Q.Warning,
|
|
285
|
+
description: `${Ct("dialog.writeWarnings.saved", { format: s })}\n\n${l}`,
|
|
286
|
+
options: ["Ok"]
|
|
287
|
+
}), !0);
|
|
288
|
+
})
|
|
289
|
+
};
|
|
290
|
+
let l;
|
|
291
|
+
if (o) {
|
|
292
|
+
const o = e.getOrigin(), r = t?.exts?.[0] ?? (o.getExtension() || "sxl"), a = `${n || o.getName() || Ct("workbook.defaultName")}.${r}`;
|
|
293
|
+
l = await R.writeAs(e, a, {
|
|
294
|
+
...s,
|
|
295
|
+
prompt: !0
|
|
296
|
+
});
|
|
297
|
+
} else l = await R.write(e, void 0, s);
|
|
298
|
+
return l;
|
|
299
|
+
};
|
|
300
|
+
let p = null;
|
|
301
|
+
return e.updateCommand("newWorkbook", { callback: async (e) => {
|
|
302
|
+
const t = R.canRead() && !a();
|
|
303
|
+
e?.source ? t && p ? await p({
|
|
304
|
+
url: e.source,
|
|
305
|
+
title: e.title
|
|
306
|
+
}) : _t(e.source, e.title) : t ? r({}) : _t();
|
|
307
|
+
} }), e.updateCommand("closeWorkbook", { callback: async () => {
|
|
308
|
+
a() && "Close" !== await i.showOptions({
|
|
309
|
+
title: Ct("dialog.confirm.title"),
|
|
310
|
+
description: Ct("dialog.unsavedChanges"),
|
|
311
|
+
options: [{
|
|
312
|
+
id: "Close",
|
|
313
|
+
label: () => Ct("dialog.close")
|
|
314
|
+
}, "Cancel"],
|
|
315
|
+
defaultOption: "Cancel"
|
|
316
|
+
}) || window.close();
|
|
317
|
+
} }), (async () => {
|
|
318
|
+
const t = await R.getWriteFormats();
|
|
319
|
+
if (l) return;
|
|
320
|
+
const n = R.canWrite(), u = R.canRead();
|
|
321
|
+
if (n) {
|
|
322
|
+
const r = (e) => {
|
|
323
|
+
const r = e ? t.find((t) => t.key === e) : void 0;
|
|
324
|
+
d(o, r, !0).catch((e) => i.showError(e));
|
|
325
|
+
};
|
|
326
|
+
e.updateCommand("saveWorkbook", { callback: () => {
|
|
327
|
+
d(o, void 0, !1).catch((e) => i.showError(e));
|
|
328
|
+
} }), s && (s.current = (e) => d(o, void 0, !1, e?.onWarnings)), e.updateCommand("saveWorkbookAs", { callback: (e) => {
|
|
329
|
+
r(e);
|
|
330
|
+
} });
|
|
331
|
+
for (const o of t) {
|
|
332
|
+
const t = o.key;
|
|
333
|
+
e.updateCommand(`saveWorkbookAs${t}`, {
|
|
334
|
+
label: () => Ct("command.saveAsFormat.label", { format: o.description }),
|
|
335
|
+
groupLabels: {
|
|
336
|
+
workbook: () => Ct("command.saveAsFormat.workbook", { format: o.description }),
|
|
337
|
+
saveWorkbookOptions: () => Ct("command.saveAsFormat.compact", { format: o.description })
|
|
338
|
+
},
|
|
339
|
+
tags: o.tags,
|
|
340
|
+
description: () => Ct("command.saveAsFormat", { format: o.description }),
|
|
341
|
+
icon: "CSV" === t ? "FileDownloadAsCSV" : "Excel" === t ? "FileDownloadAsExcel" : "FileDownloadAsSheet",
|
|
342
|
+
callback: () => {
|
|
343
|
+
r(t);
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
const m = async (e = null) => {
|
|
349
|
+
const t = { csv: {
|
|
350
|
+
date1904: o.getRuntime().isDate1904(),
|
|
351
|
+
...o.options
|
|
352
|
+
} };
|
|
353
|
+
try {
|
|
354
|
+
let r = "";
|
|
355
|
+
const n = async (e) => {
|
|
356
|
+
r = e?.getName() ?? "";
|
|
357
|
+
}, a = await c(e, t, n);
|
|
358
|
+
if (!a) return;
|
|
359
|
+
const i = a.getWorksheets().getItems();
|
|
360
|
+
await o.doBatch(async () => {
|
|
361
|
+
for (let e = 0; e < i.length; e++) {
|
|
362
|
+
const t = i[e], n = 1 === i.length ? r : t.getName(), a = o.findValidSheetName(n);
|
|
363
|
+
await o.getWorksheets().add({
|
|
364
|
+
name: a,
|
|
365
|
+
autoSelect: e === i.length - 1
|
|
366
|
+
}).getEntireRange().copyFrom(t.getEntireRange());
|
|
367
|
+
}
|
|
368
|
+
}, vt("op.importData")), a.close();
|
|
369
|
+
} catch (e) {
|
|
370
|
+
i.showError(e);
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
if (e.updateCommand("insertDataFromFile", {
|
|
374
|
+
tags: ["noTransaction", "noRepeat"],
|
|
375
|
+
callback: async (e = null) => {
|
|
376
|
+
let t = e;
|
|
377
|
+
if (t || R.canRead() || (t = await (async () => {
|
|
378
|
+
const e = await R.getReadFormats(), t = [...new Set(e.flatMap((e) => e.exts))].map((e) => `.${e}`);
|
|
379
|
+
return ht.openFileDialog(t.length ? t.join(",") : "*.*");
|
|
380
|
+
})(), t)) return m(t);
|
|
381
|
+
}
|
|
382
|
+
}), e.updateCommand("insertDataFromURL", {
|
|
383
|
+
tags: ["noTransaction", "noRepeat"],
|
|
384
|
+
callback: async (e) => {
|
|
385
|
+
if (!e) {
|
|
386
|
+
const t = await i.showInput({
|
|
387
|
+
title: Ct("dialog.importFromWeb.title"),
|
|
388
|
+
description: Ct("dialog.importFromWeb.description"),
|
|
389
|
+
inputLabel: Ct("dialog.webAddress.inputLabel"),
|
|
390
|
+
initialValue: "https://www.sheetxl.com/docs/examples/loan-calculator.xlsx",
|
|
391
|
+
propsInput: { style: { minWidth: "440px" } },
|
|
392
|
+
options: [{
|
|
393
|
+
id: "Import",
|
|
394
|
+
label: () => Ct("dialog.import")
|
|
395
|
+
}]
|
|
396
|
+
});
|
|
397
|
+
if ("Import" !== t.option) return;
|
|
398
|
+
e = t.input;
|
|
399
|
+
}
|
|
400
|
+
if (e) try {
|
|
401
|
+
const t = await fetch(e);
|
|
402
|
+
if (!t.ok) throw new Error(`Could not fetch '${e}' (${t.status} ${t.statusText}).`);
|
|
403
|
+
const o = await t.blob(), r = decodeURIComponent(e.split("/").pop()?.split("?")[0] || "") || "import.xlsx";
|
|
404
|
+
await m(new File([o], r, { type: o.type }));
|
|
405
|
+
} catch (e) {
|
|
406
|
+
i.showError(e);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}), u) {
|
|
410
|
+
const t = async () => !a() || "Open" === await i.showOptions({
|
|
411
|
+
title: Ct("dialog.confirm.title"),
|
|
412
|
+
description: Ct("dialog.unsavedChanges"),
|
|
413
|
+
options: [{
|
|
414
|
+
id: "Open",
|
|
415
|
+
label: () => Ct("dialog.open")
|
|
416
|
+
}, "Cancel"],
|
|
417
|
+
defaultOption: "Cancel"
|
|
418
|
+
}), n = async (e = null) => {
|
|
419
|
+
const t = { csv: {
|
|
420
|
+
date1904: o.getRuntime().isDate1904(),
|
|
421
|
+
...o.options
|
|
422
|
+
} };
|
|
423
|
+
try {
|
|
424
|
+
const o = await c(e, t);
|
|
425
|
+
if (!o) return;
|
|
426
|
+
r(o);
|
|
427
|
+
} catch (e) {
|
|
428
|
+
i.showError(e);
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
e.updateCommand("openWorkbook", { callback: async (e = null) => {
|
|
432
|
+
await t() && await n(e);
|
|
433
|
+
} }), p = async (e) => {
|
|
434
|
+
let o = "string" == typeof e ? e : e?.url;
|
|
435
|
+
const r = "string" == typeof e ? void 0 : e?.title;
|
|
436
|
+
if (!o) {
|
|
437
|
+
const e = await i.showInput({
|
|
438
|
+
title: Ct("dialog.openFromWeb.title"),
|
|
439
|
+
description: Ct("dialog.openFromWeb.description"),
|
|
440
|
+
inputLabel: Ct("dialog.webAddress.inputLabel"),
|
|
441
|
+
initialValue: "https://www.sheetxl.com/docs/examples/loan-calculator.xlsx",
|
|
442
|
+
propsInput: { style: { minWidth: "440px" } },
|
|
443
|
+
options: [{
|
|
444
|
+
id: "Open",
|
|
445
|
+
label: () => Ct("dialog.open")
|
|
446
|
+
}]
|
|
447
|
+
});
|
|
448
|
+
if ("Open" !== e.option) return;
|
|
449
|
+
o = e.input;
|
|
450
|
+
}
|
|
451
|
+
if (o && await t()) try {
|
|
452
|
+
const e = await fetch(o);
|
|
453
|
+
if (!e.ok) throw new Error(`Could not fetch '${o}' (${e.status} ${e.statusText}).`);
|
|
454
|
+
const t = await e.blob(), a = decodeURIComponent(o.split("/").pop()?.split("?")[0] || "") || "workbook.xlsx", i = a.match(/\.[^/.]+$/)?.[0] ?? "", s = r ? `${r}${i}` : a;
|
|
455
|
+
await n(new File([t], s, { type: t.type }));
|
|
456
|
+
} catch (e) {
|
|
457
|
+
i.showError(e);
|
|
458
|
+
}
|
|
459
|
+
}, e.updateCommand("openWorkbookFromUrl", { callback: p });
|
|
460
|
+
}
|
|
461
|
+
})(), () => {
|
|
462
|
+
l = !0, s && (s.current = null);
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
var Ht = _e(wt("studio:shortcutKeysDialog", () => import("./BYf9hvHJuKJNqqZO.mjs")).load);
|
|
466
|
+
y(), x();
|
|
467
|
+
var Vt = /* @__PURE__ */ new Set(["ui"]), Ut = (e) => {
|
|
468
|
+
const t = (e) => {
|
|
469
|
+
if ("function" != typeof e) return e;
|
|
470
|
+
try {
|
|
471
|
+
return e();
|
|
472
|
+
} catch {
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
}, o = (e, o) => {
|
|
476
|
+
const r = t(e);
|
|
477
|
+
return "string" == typeof r ? xt(r, o, ft.getActive()) : void 0;
|
|
478
|
+
}, r = [];
|
|
479
|
+
for (const n of e.names()) if (!Vt.has(n)) for (const a of e.keys(n)) {
|
|
480
|
+
const i = e.resolveDefinition(n, a);
|
|
481
|
+
r.push({
|
|
482
|
+
groupKey: n,
|
|
483
|
+
command: {
|
|
484
|
+
getLabel: () => o(i?.label, i?.params) ?? a,
|
|
485
|
+
getIcon: () => t(i?.icon),
|
|
486
|
+
getDescription: () => o(i?.description, i?.params) ?? "",
|
|
487
|
+
getShortcut: () => t(i?.shortcut) ?? null,
|
|
488
|
+
getScope: () => n,
|
|
489
|
+
getScopeLabel: () => q.DefaultCommandCatalogService.getScopeLabel(n)
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
return { getAllCommands: () => r };
|
|
494
|
+
}, Gt = (e) => {
|
|
495
|
+
const { children: t, workbook: o, setWorkbook: r, workbookTitle: n, isDirty: a, refSave: i, fullscreenTarget: s } = e, l = q.useCommandScope(), c = ge(), { showModal: d } = Ge(), p = be(), u = Ee(a);
|
|
496
|
+
u.current = a;
|
|
497
|
+
const m = le(() => {
|
|
498
|
+
const e = l?.getRoot().getRegistry();
|
|
499
|
+
if (!e) return;
|
|
500
|
+
const t = d(Ht, {
|
|
501
|
+
title: p("dialog.shortcutKeys.title"),
|
|
502
|
+
commands: Ut(e),
|
|
503
|
+
onDone: () => t.hide(),
|
|
504
|
+
onLoadError: (e) => {
|
|
505
|
+
t.destroy(), c.showError(e);
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
}, [l, d]);
|
|
509
|
+
Se(() => {
|
|
510
|
+
if (!l) return;
|
|
511
|
+
const e = l.getRoot().contribution();
|
|
512
|
+
return function(e, t) {
|
|
513
|
+
const o = () => t.showShortcuts();
|
|
514
|
+
e.updateCommand("showKeyboardShortcuts", { callback: o }), e.updateCommand("help", { callback: o });
|
|
515
|
+
for (const [t, o] of Object.entries({
|
|
516
|
+
gotoUrlGithub: "https://github.com/sheetxl/sheetxl",
|
|
517
|
+
gotoUrlDiscord: "https://discord.gg/NTKdwUgK9p",
|
|
518
|
+
gotoUrlDocumentation: "https://www.sheetxl.com/docs",
|
|
519
|
+
gotoUrlIssue: "https://github.com/sheetxl/sheetxl/issues"
|
|
520
|
+
})) e.updateCommand(t, { callback: () => {
|
|
521
|
+
window?.open(o);
|
|
522
|
+
} });
|
|
523
|
+
}(e, { showShortcuts: m }), () => e.remove();
|
|
524
|
+
}, [l, m]);
|
|
525
|
+
const g = ut("(prefers-color-scheme: dark)"), { themeMode: h } = fe(), [f, k] = he(N.Mode, I[N.Mode]), [b, y] = he(N.DarkGrid, I[N.DarkGrid]), [w, x] = he(N.DarkImages, I[N.DarkImages]);
|
|
526
|
+
Se(() => {
|
|
527
|
+
if (!l) return;
|
|
528
|
+
const e = l.getRoot().contribution();
|
|
529
|
+
return function(e, t) {
|
|
530
|
+
e.updateCommand("themeMode", {
|
|
531
|
+
state: t.mode ?? null,
|
|
532
|
+
params: { dark: t.isDark },
|
|
533
|
+
icon: t.isDark ? "DarkMode" : "LightMode",
|
|
534
|
+
callback: () => t.setMode(t.isDark ? "light" : "dark")
|
|
535
|
+
}), e.updateCommand("defaultThemeMode", {
|
|
536
|
+
state: !t.mode,
|
|
537
|
+
icon: t.systemDefaultDark ? "SystemDefaultDarkMode" : "SystemDefaultLightMode",
|
|
538
|
+
callback: () => t.setMode(null)
|
|
539
|
+
}), e.updateCommand("enableDarkGrid", {
|
|
540
|
+
state: t.enableDarkGrid,
|
|
541
|
+
callback: () => t.setEnableDarkGrid((e) => !e)
|
|
542
|
+
}), e.updateCommand("enableDarkImages", {
|
|
543
|
+
state: t.enableDarkImages,
|
|
544
|
+
callback: () => t.setEnableDarkImages((e) => !e)
|
|
545
|
+
});
|
|
546
|
+
}(e, {
|
|
547
|
+
mode: f,
|
|
548
|
+
setMode: k,
|
|
549
|
+
isDark: "dark" === f || !f && "dark" === h,
|
|
550
|
+
systemDefaultDark: g,
|
|
551
|
+
enableDarkGrid: b,
|
|
552
|
+
setEnableDarkGrid: y,
|
|
553
|
+
enableDarkImages: w,
|
|
554
|
+
setEnableDarkImages: x
|
|
555
|
+
}), () => e.remove();
|
|
556
|
+
}, [
|
|
557
|
+
l,
|
|
558
|
+
f,
|
|
559
|
+
h,
|
|
560
|
+
g,
|
|
561
|
+
b,
|
|
562
|
+
w,
|
|
563
|
+
k,
|
|
564
|
+
y,
|
|
565
|
+
x
|
|
566
|
+
]);
|
|
567
|
+
const [v, C] = he(J.Active, null), [D, S] = We(() => ft.getActive());
|
|
568
|
+
Se(() => ft.addChangeListener(S), []), Se(() => {
|
|
569
|
+
v && v !== ft.getActive() && ft.setActive(v);
|
|
570
|
+
}, [v]), Se(() => {
|
|
571
|
+
if (!l) return;
|
|
572
|
+
const e = l.getRoot().contribution();
|
|
573
|
+
return function(e, t) {
|
|
574
|
+
e.updateCommand("language", {
|
|
575
|
+
state: t.active,
|
|
576
|
+
callback: (e) => {
|
|
577
|
+
e && t.setActive(e);
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
}(e, {
|
|
581
|
+
active: D,
|
|
582
|
+
setActive: (e) => {
|
|
583
|
+
C(e);
|
|
584
|
+
}
|
|
585
|
+
}), () => e.remove();
|
|
586
|
+
}, [
|
|
587
|
+
l,
|
|
588
|
+
D,
|
|
589
|
+
C
|
|
590
|
+
]);
|
|
591
|
+
const T = Te(() => ({ current: s ?? null }), [s]), { isFullscreenAvailable: E, isFullscreenEnabled: W, toggleFullscreen: F } = ce({ target: T });
|
|
592
|
+
Se(() => {
|
|
593
|
+
if (!l) return;
|
|
594
|
+
const e = l.getRoot().contribution();
|
|
595
|
+
return function(e, t) {
|
|
596
|
+
e.updateCommand("fullScreenToggle", {
|
|
597
|
+
state: t.isFullscreenEnabled,
|
|
598
|
+
disabledReasons: t.isFullscreenAvailable ? [] : [vt("reason.fullscreenUnavailable")],
|
|
599
|
+
icon: t.isFullscreenEnabled ? "FullScreenOff" : "FullScreen",
|
|
600
|
+
callback: () => {
|
|
601
|
+
t.toggleFullscreen();
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
}(e, {
|
|
605
|
+
isFullscreenAvailable: E,
|
|
606
|
+
isFullscreenEnabled: W,
|
|
607
|
+
toggleFullscreen: F
|
|
608
|
+
}), () => e.remove();
|
|
609
|
+
}, [
|
|
610
|
+
l,
|
|
611
|
+
E,
|
|
612
|
+
W,
|
|
613
|
+
F
|
|
614
|
+
]);
|
|
615
|
+
const P = H(!0);
|
|
616
|
+
return Se(() => {
|
|
617
|
+
if (!l) return;
|
|
618
|
+
const e = l.getRoot().contribution();
|
|
619
|
+
return function(e, t) {
|
|
620
|
+
e.updateCommand("protectWorkbook", {
|
|
621
|
+
tags: ["noTransaction", "noRepeat"],
|
|
622
|
+
callback: () => {
|
|
623
|
+
t(A.Protection, { args: { tab: "workbook" } });
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
}(e, (e, t) => P.activate(e, t)), () => e.remove();
|
|
627
|
+
}, [l, P]), Se(() => {
|
|
628
|
+
if (!l || !o) return;
|
|
629
|
+
const e = l.getRoot().contribution(), t = zt(e, {
|
|
630
|
+
workbook: o,
|
|
631
|
+
setWorkbook: r,
|
|
632
|
+
workbookTitle: n ?? void 0,
|
|
633
|
+
isDirty: () => u.current?.() ?? !1,
|
|
634
|
+
notifier: c,
|
|
635
|
+
refSave: i
|
|
636
|
+
});
|
|
637
|
+
return () => {
|
|
638
|
+
t(), e.remove();
|
|
639
|
+
};
|
|
640
|
+
}, [
|
|
641
|
+
l,
|
|
642
|
+
o,
|
|
643
|
+
r,
|
|
644
|
+
n,
|
|
645
|
+
c,
|
|
646
|
+
i
|
|
647
|
+
]), t;
|
|
648
|
+
};
|
|
649
|
+
Gt.displayName = "StudioCommandProvider";
|
|
650
|
+
var qt = ({ renderWorkbook: e }) => {
|
|
651
|
+
const t = q.useCommandResolver(), o = Ee(null), r = be(), [n, a] = We(null), i = De((e) => {
|
|
652
|
+
const o = e.dataTransfer;
|
|
653
|
+
if (t && o) {
|
|
654
|
+
if ("dragenter" === e.type || "dragover" === e.type) {
|
|
655
|
+
const e = o.types, t = o.items;
|
|
656
|
+
let r = !1;
|
|
657
|
+
for (let e = 0; e < t.length; e++) if (t[e].type.startsWith("image/")) {
|
|
658
|
+
r = !0;
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
r ? a("insertImage") : e.includes("Files") && t.length > 0 ? a("open") : (o.effectAllowed = "none", o.dropEffect = "none");
|
|
662
|
+
} else if ("dragleave" === e.type) {
|
|
663
|
+
const t = e.relatedTarget;
|
|
664
|
+
t && e.currentTarget.contains(t) || a(null);
|
|
665
|
+
}
|
|
666
|
+
e.preventDefault();
|
|
667
|
+
}
|
|
668
|
+
}, [t]), s = le((e) => {
|
|
669
|
+
e.preventDefault();
|
|
670
|
+
const r = n;
|
|
671
|
+
if (a(null), r && t && (e.stopPropagation(), e.dataTransfer.files && e.dataTransfer.files.length > 0)) {
|
|
672
|
+
const r = e.dataTransfer.files[0];
|
|
673
|
+
if (!r) return;
|
|
674
|
+
if (r?.type?.startsWith("image/")) {
|
|
675
|
+
const n = o.current?.getSheetElement()?.getGridSurface().getPaneFromClient(e.clientX, e.clientY);
|
|
676
|
+
if (!n) return;
|
|
677
|
+
const a = n.getPanePointFromPointer(e.clientX, e.clientY);
|
|
678
|
+
if (!a) return;
|
|
679
|
+
const i = n.toAbsoluteBounds({
|
|
680
|
+
x: a.x ?? 0,
|
|
681
|
+
y: a.y ?? 0,
|
|
682
|
+
width: 0,
|
|
683
|
+
height: 0
|
|
684
|
+
});
|
|
685
|
+
t.execute("insertImageFromFile", {
|
|
686
|
+
file: r,
|
|
687
|
+
options: { bounds: {
|
|
688
|
+
x: i.x,
|
|
689
|
+
y: i.y
|
|
690
|
+
} }
|
|
691
|
+
});
|
|
692
|
+
} else {
|
|
693
|
+
if (!R.canRead()) return;
|
|
694
|
+
const o = e.dataTransfer.items?.[0], n = "undefined" != typeof window && window.isSecureContext ? o?.getAsFileSystemHandle?.() : void 0;
|
|
695
|
+
n ? n.then((e) => t.execute("openWorkbook", "file" === e?.kind ? e : r)).catch(() => t.execute("openWorkbook", r)) : t.execute("openWorkbook", r);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}, [t, n]), l = Te(() => {
|
|
699
|
+
if (!n) return null;
|
|
700
|
+
const e = "insertImage" === n;
|
|
701
|
+
return Ye(Je, {
|
|
702
|
+
className: "drop-overlay",
|
|
703
|
+
sx: {
|
|
704
|
+
position: "absolute",
|
|
705
|
+
inset: 0,
|
|
706
|
+
zIndex: 1,
|
|
707
|
+
boxSizing: "border-box",
|
|
708
|
+
pointerEvents: "none",
|
|
709
|
+
display: "flex",
|
|
710
|
+
justifyContent: "center",
|
|
711
|
+
alignItems: "center",
|
|
712
|
+
backgroundColor: (e) => pt(e.palette.primary.main, .46),
|
|
713
|
+
outline: (e) => `2px dashed ${e.palette.primary.main}`,
|
|
714
|
+
outlineOffset: "-6px",
|
|
715
|
+
borderRadius: 2
|
|
716
|
+
},
|
|
717
|
+
children: Ze(at, {
|
|
718
|
+
elevation: 6,
|
|
719
|
+
sx: {
|
|
720
|
+
display: "flex",
|
|
721
|
+
alignItems: "center",
|
|
722
|
+
gap: 1.5,
|
|
723
|
+
px: 3,
|
|
724
|
+
py: 2,
|
|
725
|
+
borderRadius: 2,
|
|
726
|
+
color: "text.primary",
|
|
727
|
+
"& .drop-overlay-icon": { color: "primary.main" }
|
|
728
|
+
},
|
|
729
|
+
children: [Ye(Z, {
|
|
730
|
+
iconKey: e ? "InsertImage" : "FileOpen",
|
|
731
|
+
className: "drop-overlay-icon",
|
|
732
|
+
size: 32
|
|
733
|
+
}), Ye(dt, {
|
|
734
|
+
variant: "h6",
|
|
735
|
+
component: "span",
|
|
736
|
+
children: r(e ? "drop.insertImage" : "drop.open")
|
|
737
|
+
})]
|
|
738
|
+
})
|
|
739
|
+
});
|
|
740
|
+
}, [n, r]);
|
|
741
|
+
return Ze(Xe, { children: [e({
|
|
742
|
+
ref: o,
|
|
743
|
+
onDragStart: (e) => {
|
|
744
|
+
if (e.target.src) {
|
|
745
|
+
const t = new Image();
|
|
746
|
+
t.src = e.target.src, e.dataTransfer.setDragImage(t, 1, 1);
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
onDragEnter: i,
|
|
750
|
+
onDragLeave: i,
|
|
751
|
+
onDragOver: i,
|
|
752
|
+
onDrop: s
|
|
753
|
+
}), l] });
|
|
754
|
+
}, Xt = Ce((e) => {
|
|
755
|
+
const { workbook: t, setWorkbook: o, refDocumentTitle: r, titleWorkbook: n, setWorkbookTitle: a, isDirty: i, initialCommandAnchor: s, renderWorkbook: l, refSave: c, host: d } = e;
|
|
756
|
+
return Ye(D, {
|
|
757
|
+
initialAnchor: s,
|
|
758
|
+
children: Ye(Gt, {
|
|
759
|
+
workbook: t,
|
|
760
|
+
setWorkbook: o,
|
|
761
|
+
workbookTitle: n,
|
|
762
|
+
isDirty: i,
|
|
763
|
+
refSave: c,
|
|
764
|
+
fullscreenTarget: d,
|
|
765
|
+
children: Ye(qt, { renderWorkbook: l })
|
|
766
|
+
})
|
|
767
|
+
});
|
|
768
|
+
});
|
|
769
|
+
Xt.displayName = "CommandsWrapper";
|
|
770
|
+
var Yt = {
|
|
771
|
+
sort: wt("studio:sortDialog", () => import("./b32Mry1LI41o7I1O.mjs")).load,
|
|
772
|
+
hyperlink: wt("studio:hyperlinkDialog", () => import("./cQkfTTXKtrzzwTj_.mjs")).load,
|
|
773
|
+
find: wt("studio:findReplaceWindow", () => import("./66U7xo0GBu80pE9I.mjs")).load,
|
|
774
|
+
tableNew: wt("studio:tableNewDialog", () => import("./BCUH7DA5M8FLcqxw.mjs")).load,
|
|
775
|
+
pivotTableNew: wt("studio:pivotTableNewDialog", () => import("./DxoOobdO06D16DYc.mjs")).load,
|
|
776
|
+
sparklineNew: wt("studio:sparklineNewDialog", () => import("./CRkzp1_dyeM1KUud.mjs")).load,
|
|
777
|
+
sparklineEdit: wt("studio:sparklineEditDialog", () => import("./RqUCi1IOUIuPSFCu.mjs")).load,
|
|
778
|
+
namedDetails: wt("studio:namedReferenceDialog", () => import("./Dz9GxMRQzPtOpqNo.mjs")).load,
|
|
779
|
+
insertFunction: wt("studio:insertFunctionDialog", () => import("./DoRaGvL9s79NZAYU.mjs")).load,
|
|
780
|
+
resizeHeader: wt("studio:resizeHeaderDialog", () => import("./B5izshUZ2MRDNb5s.mjs")).load,
|
|
781
|
+
outlineSettings: wt("studio:outlineSettingsDialog", () => import("./sKtXhZg7VoFWiL32.mjs")).load,
|
|
782
|
+
fillSeries: wt("studio:fillSeriesDialog", () => import("./CaMuiNImC2zQQykf.mjs")).load,
|
|
783
|
+
workbookStatistics: wt("studio:workbookStatisticsDialog", () => import("./Bv3K0CqiXzYTm7CK.mjs")).load,
|
|
784
|
+
password: wt("studio:passwordDialog", () => import("./Bb5tJ1TuwZePhOI_.mjs")).load,
|
|
785
|
+
pivotValueSettings: wt("studio:pivotValueSettingsDialog", () => import("./4dZy4IT0suoxZvbK.mjs")).load
|
|
786
|
+
}, Zt = ["find"], Jt = Ce((e) => {
|
|
787
|
+
const { children: t } = e, o = Ft(), r = o ? o.enqueueSnackbar : () => {}, n = o ? o.closeSnackbar : () => {}, a = Ee(/* @__PURE__ */ new Set()), i = Ee(null), s = Ee(null), [l, c] = We({
|
|
788
|
+
label: null,
|
|
789
|
+
progress: null
|
|
790
|
+
}), d = be(), p = gt.EmptyObject, u = Ue(p), m = qe(p), g = Ve(p), h = Ee(!1);
|
|
791
|
+
Se(() => {
|
|
792
|
+
if (h.current) return;
|
|
793
|
+
h.current = !0;
|
|
794
|
+
const e = window, t = e.requestIdleCallback ?? ((e) => setTimeout(e, 500)), o = e.cancelIdleCallback ?? clearTimeout, r = t(() => {
|
|
795
|
+
for (const e of Zt) u(e, Yt[e], { prewarm: !0 }).catch(() => {});
|
|
796
|
+
});
|
|
797
|
+
return () => o(r);
|
|
798
|
+
}, []);
|
|
799
|
+
const f = Ee(/* @__PURE__ */ new Set()), k = Te(() => {
|
|
800
|
+
const e = (e, t) => {
|
|
801
|
+
if (t?.onceKey) {
|
|
802
|
+
if (f.current.has(t.onceKey)) return;
|
|
803
|
+
const e = new Set(f.current);
|
|
804
|
+
e.add(t.onceKey), f.current = e;
|
|
805
|
+
}
|
|
806
|
+
const o = {
|
|
807
|
+
variant: t?.type ?? Q.Info,
|
|
808
|
+
anchorOrigin: {
|
|
809
|
+
vertical: "top",
|
|
810
|
+
horizontal: "center"
|
|
811
|
+
},
|
|
812
|
+
preventDuplicate: t?.preventDuplicate,
|
|
813
|
+
persist: t?.persist ?? t?.type === Q.Error,
|
|
814
|
+
action: (e) => Ye(nt, {
|
|
815
|
+
onClick: () => n(e),
|
|
816
|
+
children: Ye(Z, { iconKey: "Cancel" })
|
|
817
|
+
})
|
|
818
|
+
};
|
|
819
|
+
t?.enqueueProps && Object.assign(o, t.enqueueProps), e || console.log("message is 'null'", t), r(e ?? "Alert", o);
|
|
820
|
+
};
|
|
821
|
+
return {
|
|
822
|
+
showMessage: e,
|
|
823
|
+
showBusy: (e, t) => {
|
|
824
|
+
const o = Symbol("busy");
|
|
825
|
+
a.current.add(o), s.current = e, null != e && "string" != typeof e && c((t) => t.label === e ? t : {
|
|
826
|
+
...t,
|
|
827
|
+
label: e
|
|
828
|
+
});
|
|
829
|
+
const r = se(() => {
|
|
830
|
+
a.current.delete(o) && (a.current.size > 0 || (Ke(i.current), s.current = null, c((e) => null === e.label && null === e.progress ? e : {
|
|
831
|
+
label: null,
|
|
832
|
+
progress: null
|
|
833
|
+
})));
|
|
834
|
+
}, (e, t) => {
|
|
835
|
+
const o = t && t > 0 && null != e ? Math.max(0, Math.min(1, e / t)) : null;
|
|
836
|
+
c((e) => e.progress === o ? e : {
|
|
837
|
+
...e,
|
|
838
|
+
progress: o
|
|
839
|
+
});
|
|
840
|
+
}, (e) => {
|
|
841
|
+
s.current = e, "string" == typeof e ? He(i.current, e) : c((t) => ({
|
|
842
|
+
...t,
|
|
843
|
+
label: e
|
|
844
|
+
}));
|
|
845
|
+
}), n = He(i.current, "string" == typeof e ? e : void 0);
|
|
846
|
+
return n ? n.then(() => r) : r;
|
|
847
|
+
},
|
|
848
|
+
showWindow: (e, t) => {
|
|
849
|
+
const o = t;
|
|
850
|
+
return t = {
|
|
851
|
+
...t,
|
|
852
|
+
onKeyDown: (e) => {
|
|
853
|
+
e.isDefaultPrevented() || e.isPropagationStopped() || o?.onKeyDown?.(e);
|
|
854
|
+
}
|
|
855
|
+
}, u(e, Yt[e], t);
|
|
856
|
+
},
|
|
857
|
+
showOptions: m,
|
|
858
|
+
showInput: g,
|
|
859
|
+
showError: (t) => {
|
|
860
|
+
let o, r = Q.Error, n = d("error.unknown");
|
|
861
|
+
"string" == typeof t ? n = t : t instanceof Error && (o = t, t.message && (n = d(t.message))), t instanceof yt && (r = Q.Info), e(n, {
|
|
862
|
+
type: r,
|
|
863
|
+
enqueueProps: { error: o }
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
}, [d]), b = Te(() => Ye(Fe, {
|
|
868
|
+
ref: i,
|
|
869
|
+
autoStart: !1,
|
|
870
|
+
icon: Ye(Ae, { sx: {
|
|
871
|
+
transform: "scale(0.7)",
|
|
872
|
+
marginLeft: "-6px"
|
|
873
|
+
} }),
|
|
874
|
+
panel: !0,
|
|
875
|
+
label: l.label ?? ("string" == typeof s.current ? s.current : void 0),
|
|
876
|
+
progress: l.progress,
|
|
877
|
+
sx: {
|
|
878
|
+
position: "absolute",
|
|
879
|
+
left: "0",
|
|
880
|
+
top: "0",
|
|
881
|
+
width: "100%",
|
|
882
|
+
height: "100%",
|
|
883
|
+
zIndex: "9999",
|
|
884
|
+
pointerEvents: "none"
|
|
885
|
+
}
|
|
886
|
+
}), [l.label, l.progress]);
|
|
887
|
+
return Ze(te, {
|
|
888
|
+
notifier: k,
|
|
889
|
+
children: [b, t]
|
|
890
|
+
});
|
|
891
|
+
});
|
|
892
|
+
Jt.displayName = "StudioNotifierProvider";
|
|
893
|
+
var Qt = "var(--sxl-color-input-border, light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2)))", eo = Ce(xe((e, t) => {
|
|
894
|
+
const { children: o, title: r, taskPanes: n, onSelect: a, selected: i, registry: s = S, style: l, iconsOnly: c, side: d = "right", className: p, ...u } = e, m = "right" !== d, g = ue(), h = Te(() => n.map((t) => {
|
|
895
|
+
const o = s.getRegisteredTaskPane(t);
|
|
896
|
+
if (!o) return null;
|
|
897
|
+
let r = o.getIcon?.();
|
|
898
|
+
"string" == typeof r && (r = Ye(Z, { iconKey: r }));
|
|
899
|
+
const n = t === i, a = r ? Ye(Je, {
|
|
900
|
+
sx: {
|
|
901
|
+
display: "inline-block",
|
|
902
|
+
transform: m ? "rotate(-90deg)" : "rotate(90deg)",
|
|
903
|
+
transformOrigin: "center",
|
|
904
|
+
color: (e) => e.palette.text.secondary
|
|
905
|
+
},
|
|
906
|
+
children: r
|
|
907
|
+
}) : null, l = !r || !c && n, d = Ye(Je, {
|
|
908
|
+
sx: {
|
|
909
|
+
display: "grid",
|
|
910
|
+
gridTemplateColumns: l ? "1fr" : "0fr",
|
|
911
|
+
opacity: l ? 1 : 0,
|
|
912
|
+
transition: (e) => e.transitions.create(["grid-template-columns", "opacity"], { duration: e.transitions.duration.short })
|
|
913
|
+
},
|
|
914
|
+
children: Ye(Je, {
|
|
915
|
+
sx: {
|
|
916
|
+
overflow: "hidden",
|
|
917
|
+
minWidth: 0,
|
|
918
|
+
minHeight: 0
|
|
919
|
+
},
|
|
920
|
+
children: Ye(dt, {
|
|
921
|
+
component: "div",
|
|
922
|
+
sx: {
|
|
923
|
+
textTransform: "none",
|
|
924
|
+
whiteSpace: "nowrap",
|
|
925
|
+
transform: m ? "rotate(180deg)" : void 0,
|
|
926
|
+
padding: "4px 0px",
|
|
927
|
+
color: (e) => n ? e.palette.primary.main : e.palette.text.secondary
|
|
928
|
+
},
|
|
929
|
+
children: o.getTitle()
|
|
930
|
+
})
|
|
931
|
+
})
|
|
932
|
+
});
|
|
933
|
+
return Ye(st, {
|
|
934
|
+
value: t,
|
|
935
|
+
label: Ye(Me, {
|
|
936
|
+
disableInteractive: !0,
|
|
937
|
+
title: o.getTitle() ?? "",
|
|
938
|
+
placement: "left-start",
|
|
939
|
+
children: Ze(Je, {
|
|
940
|
+
sx: {
|
|
941
|
+
padding: "0px 0px",
|
|
942
|
+
writingMode: m ? "vertical-lr" : "vertical-rl",
|
|
943
|
+
textOrientation: "mixed",
|
|
944
|
+
display: "flex",
|
|
945
|
+
alignItems: "center",
|
|
946
|
+
justifyContent: "space-between",
|
|
947
|
+
minWidth: "0px",
|
|
948
|
+
color: (e) => e.palette.text.secondary
|
|
949
|
+
},
|
|
950
|
+
children: [m ? d : a, m ? a : d]
|
|
951
|
+
})
|
|
952
|
+
}),
|
|
953
|
+
sx: {
|
|
954
|
+
padding: "4px 4px",
|
|
955
|
+
minWidth: "0px",
|
|
956
|
+
minHeight: "0px",
|
|
957
|
+
borderRadius: "4px"
|
|
958
|
+
},
|
|
959
|
+
className: Dt("taskpane-strip-item", { "Mui-selected": n }),
|
|
960
|
+
onClick: () => e.onSelect(t)
|
|
961
|
+
}, t);
|
|
962
|
+
}), [
|
|
963
|
+
n,
|
|
964
|
+
i,
|
|
965
|
+
a,
|
|
966
|
+
s,
|
|
967
|
+
m,
|
|
968
|
+
c,
|
|
969
|
+
g
|
|
970
|
+
]), f = de(t, () => ({ isTaskPaneStrip: () => !0 }), []), k = Te(() => Dt("taskpane-strip", p), [p]);
|
|
971
|
+
return Ye(Je, {
|
|
972
|
+
ref: f,
|
|
973
|
+
className: k,
|
|
974
|
+
sx: {
|
|
975
|
+
paddingLeft: m ? void 0 : "2px",
|
|
976
|
+
paddingRight: m ? "2px" : void 0,
|
|
977
|
+
paddingTop: "4px",
|
|
978
|
+
...l
|
|
979
|
+
},
|
|
980
|
+
...u,
|
|
981
|
+
children: Ye(lt, {
|
|
982
|
+
orientation: "vertical",
|
|
983
|
+
variant: "scrollable",
|
|
984
|
+
value: i,
|
|
985
|
+
onChange: (e, t) => {
|
|
986
|
+
a(t);
|
|
987
|
+
},
|
|
988
|
+
slotProps: {
|
|
989
|
+
list: { sx: { gap: "2px" } },
|
|
990
|
+
indicator: { sx: {
|
|
991
|
+
left: m ? void 0 : "0px",
|
|
992
|
+
right: m ? void 0 : "unset",
|
|
993
|
+
bottom: m ? "0px" : void 0
|
|
994
|
+
} }
|
|
995
|
+
},
|
|
996
|
+
children: h
|
|
997
|
+
})
|
|
998
|
+
});
|
|
999
|
+
})), to = (e) => {
|
|
1000
|
+
const { title: t, icon: o, onClose: r, readOnly: n, focused: a, ...i } = e, s = Ee(null), l = be();
|
|
1001
|
+
return Ye(rt, {
|
|
1002
|
+
className: Dt({ "Mui-selected": a }),
|
|
1003
|
+
sx: {
|
|
1004
|
+
display: "flex",
|
|
1005
|
+
flex: "1 1 %0",
|
|
1006
|
+
color: (e) => e.palette.text.secondary,
|
|
1007
|
+
boxSizing: "border-box",
|
|
1008
|
+
padding: "0 0",
|
|
1009
|
+
transitionProperty: "opacity",
|
|
1010
|
+
transitionDuration: (e) => `${e.transitions.duration.shortest}ms`,
|
|
1011
|
+
opacity: .7,
|
|
1012
|
+
"&.Mui-selected": {
|
|
1013
|
+
opacity: 1,
|
|
1014
|
+
transitionDuration: (e) => e.transitions.duration.shortest / 2 + "ms"
|
|
1015
|
+
},
|
|
1016
|
+
backgroundColor: (e) => pt(e.palette.action.hover, .03),
|
|
1017
|
+
borderBottom: `solid ${Qt} 1px`
|
|
1018
|
+
},
|
|
1019
|
+
...i,
|
|
1020
|
+
children: Ze(Je, {
|
|
1021
|
+
sx: {
|
|
1022
|
+
display: "flex",
|
|
1023
|
+
flex: "1 1 10%",
|
|
1024
|
+
flexDirection: "row",
|
|
1025
|
+
alignItems: "center",
|
|
1026
|
+
marginTop: (e) => e.spacing(.25),
|
|
1027
|
+
marginBottom: (e) => e.spacing(.25),
|
|
1028
|
+
marginLeft: (e) => e.spacing(1),
|
|
1029
|
+
marginRight: (e) => e.spacing(1)
|
|
1030
|
+
},
|
|
1031
|
+
children: [Ye(Je, {
|
|
1032
|
+
sx: {
|
|
1033
|
+
flex: "1 1 100%",
|
|
1034
|
+
paddingLeft: (e) => e.spacing(1)
|
|
1035
|
+
},
|
|
1036
|
+
children: t
|
|
1037
|
+
}), Ye(je, {
|
|
1038
|
+
label: l("taskPane.close"),
|
|
1039
|
+
children: Ye(nt, {
|
|
1040
|
+
"aria-label": "close",
|
|
1041
|
+
sx: { color: (e) => e.palette.text.icon ?? e.palette.action.active },
|
|
1042
|
+
touchRippleRef: s,
|
|
1043
|
+
onPointerDown: (e) => {
|
|
1044
|
+
s.current?.start(e, { center: !1 }), e.stopPropagation(), e.preventDefault();
|
|
1045
|
+
},
|
|
1046
|
+
onPointerUp: () => {
|
|
1047
|
+
r();
|
|
1048
|
+
},
|
|
1049
|
+
children: Ye(Z, { iconKey: "Close" })
|
|
1050
|
+
})
|
|
1051
|
+
})]
|
|
1052
|
+
})
|
|
1053
|
+
});
|
|
1054
|
+
}, oo = xe((e, t) => {
|
|
1055
|
+
const { model: o, side: r, ...n } = e, a = mt(), i = `solid ${Qt} 1px`, s = `${a.shape.borderRadius ?? 4}px`, l = `${a.spacing?.(.5) ?? 4}px`;
|
|
1056
|
+
return Ye(F, {
|
|
1057
|
+
model: o,
|
|
1058
|
+
ref: t,
|
|
1059
|
+
propsFrame: { style: {
|
|
1060
|
+
border: i,
|
|
1061
|
+
borderRadius: s,
|
|
1062
|
+
marginBottom: l
|
|
1063
|
+
} },
|
|
1064
|
+
alwaysShowStrip: !0,
|
|
1065
|
+
componentTitle: to,
|
|
1066
|
+
componentStrip: eo,
|
|
1067
|
+
side: r,
|
|
1068
|
+
...e,
|
|
1069
|
+
onOpen: () => {
|
|
1070
|
+
e?.onOpen?.();
|
|
1071
|
+
},
|
|
1072
|
+
onClose: () => {
|
|
1073
|
+
e?.onClose?.();
|
|
1074
|
+
},
|
|
1075
|
+
...n
|
|
1076
|
+
});
|
|
1077
|
+
}), ro = "_styled-resizer_li52w_3", no = {}, ao = {
|
|
1078
|
+
flex: "1 1 100%",
|
|
1079
|
+
display: "flex",
|
|
1080
|
+
boxSizing: "border-box"
|
|
1081
|
+
}, io = Ce(xe((e, t) => {
|
|
1082
|
+
const { mainElement: o, sidebarElement: r, position: n, persistKey: a, onPositionChange: i, className: s, style: l, taskSide: c = "right", ...d } = e, [p, u] = he(a ?? null, no), m = mt(), [g, { width: h }] = me(), f = h > 530 || 0 === h, k = Ee(null);
|
|
1083
|
+
let b, y, w = null, x = 4, v = 13;
|
|
1084
|
+
f ? w = "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" : (w = "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", x = 13, v = 4);
|
|
1085
|
+
let C, D = o, S = r;
|
|
1086
|
+
const T = "right" !== c, E = f ? "row" : "column", W = T && S ? "before" : "after", F = `${E}:${W}`, A = a ? p[F] : void 0, P = null != A ? `${A}%` : ((e, t) => {
|
|
1087
|
+
if (null == e) return "40%";
|
|
1088
|
+
if ("number" == typeof e || "string" == typeof e) return e;
|
|
1089
|
+
const o = e[t];
|
|
1090
|
+
return null != o ? `${o}%` : "40%";
|
|
1091
|
+
})(n, F), I = a || i ? (e) => {
|
|
1092
|
+
a && u((t) => ({
|
|
1093
|
+
...t,
|
|
1094
|
+
[F]: e.percent
|
|
1095
|
+
})), i?.(e, {
|
|
1096
|
+
orientation: E,
|
|
1097
|
+
side: W,
|
|
1098
|
+
key: F
|
|
1099
|
+
});
|
|
1100
|
+
} : void 0;
|
|
1101
|
+
T && S ? (D = r, S = o, y = { style: {
|
|
1102
|
+
flexDirection: "column",
|
|
1103
|
+
boxSizing: "border-box",
|
|
1104
|
+
paddingRight: "2px"
|
|
1105
|
+
} }, b = {}, C = {
|
|
1106
|
+
fixedPane: "before",
|
|
1107
|
+
position: P,
|
|
1108
|
+
minBefore: f ? "280px" : "120px",
|
|
1109
|
+
splitDirection: f ? "row" : "column"
|
|
1110
|
+
}) : (b = { style: {
|
|
1111
|
+
flexDirection: "column",
|
|
1112
|
+
marginRight: r ? void 0 : "6px"
|
|
1113
|
+
} }, y = { style: {
|
|
1114
|
+
marginLeft: f ? "0px" : "4px",
|
|
1115
|
+
marginRight: f ? "8px" : "4px"
|
|
1116
|
+
} }, C = {
|
|
1117
|
+
fixedPane: "after",
|
|
1118
|
+
position: P,
|
|
1119
|
+
minAfter: f ? "280px" : "120px",
|
|
1120
|
+
splitDirection: f ? "row" : "column"
|
|
1121
|
+
});
|
|
1122
|
+
const N = Tt([
|
|
1123
|
+
k,
|
|
1124
|
+
g,
|
|
1125
|
+
t
|
|
1126
|
+
]);
|
|
1127
|
+
return Ye(ae, {
|
|
1128
|
+
ref: N,
|
|
1129
|
+
className: s,
|
|
1130
|
+
style: l ? {
|
|
1131
|
+
...ao,
|
|
1132
|
+
...l
|
|
1133
|
+
} : ao,
|
|
1134
|
+
...d,
|
|
1135
|
+
...C,
|
|
1136
|
+
onPositionChange: I,
|
|
1137
|
+
propsResizer: {
|
|
1138
|
+
className: Dt("styled-resizer", ro),
|
|
1139
|
+
style: {
|
|
1140
|
+
minWidth: f ? "7px" : void 0,
|
|
1141
|
+
minHeight: f ? void 0 : "6px",
|
|
1142
|
+
maskImage: `url("data:image/svg+xml,%3Csvg width='${x}' height='${v}' viewBox='0 0 ${x} ${v}' 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='${w}' /%3E%3C/svg%3E%0A")`,
|
|
1143
|
+
maskRepeat: "no-repeat",
|
|
1144
|
+
maskPosition: T ? f ? "center center" : "bottom center" : f ? "left center" : "top center"
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
elementBefore: D,
|
|
1148
|
+
propsPaneBefore: b,
|
|
1149
|
+
elementAfter: S,
|
|
1150
|
+
propsPaneAfter: y
|
|
1151
|
+
});
|
|
1152
|
+
}));
|
|
1153
|
+
io.displayName = "StudioSplitPane";
|
|
1154
|
+
var so = () => Ye("div", { style: {
|
|
1155
|
+
flex: "none",
|
|
1156
|
+
height: 0,
|
|
1157
|
+
borderTop: "solid var(--sxl-color-base-border, light-dark(rgba(0, 0, 0, 0.26), rgba(255, 255, 255, 0.3))) 1px"
|
|
1158
|
+
} }), lo = (e, t) => {
|
|
1159
|
+
const o = (e) => Ye(ye.Fragment, { children: t[e] }, e);
|
|
1160
|
+
if ("bottom" === e) {
|
|
1161
|
+
const e = t.statusBar && t.formulaBar ? Ye(so, {}, "divider") : null;
|
|
1162
|
+
return [
|
|
1163
|
+
o("toolbar"),
|
|
1164
|
+
o("main"),
|
|
1165
|
+
o("statusBar"),
|
|
1166
|
+
e,
|
|
1167
|
+
o("formulaBar")
|
|
1168
|
+
];
|
|
1169
|
+
}
|
|
1170
|
+
return [
|
|
1171
|
+
o("toolbar"),
|
|
1172
|
+
o("formulaBar"),
|
|
1173
|
+
o("main"),
|
|
1174
|
+
o("statusBar")
|
|
1175
|
+
];
|
|
1176
|
+
}, co = (e) => {
|
|
1177
|
+
const { groups: t } = e;
|
|
1178
|
+
return Ye(Je, {
|
|
1179
|
+
role: "menu",
|
|
1180
|
+
sx: {
|
|
1181
|
+
paddingTop: "4px",
|
|
1182
|
+
paddingBottom: "4px"
|
|
1183
|
+
},
|
|
1184
|
+
children: t.map((e, t) => Ze(we, { children: [t > 0 ? Ye(Ie, { orientation: "horizontal" }) : null, e.map((e) => Ye(Re, {
|
|
1185
|
+
role: void 0 === e.checked ? "menuitem" : "menuitemradio",
|
|
1186
|
+
"aria-checked": e.checked,
|
|
1187
|
+
disabled: e.disabled,
|
|
1188
|
+
selected: e.checked,
|
|
1189
|
+
icon: e.checked ? Ye($e, {}) : void 0,
|
|
1190
|
+
onClick: e.run,
|
|
1191
|
+
children: e.label
|
|
1192
|
+
}, e.key))] }, t))
|
|
1193
|
+
});
|
|
1194
|
+
}, po = (e) => Ye(co, { ...e }), uo = (e) => {
|
|
1195
|
+
const { pivot: t, name: o, source: r, onError: n } = e, s = be(), l = t.getWorksheet(), c = l.getProtection().isLocked(), d = Te(() => ({ scope: l.getName() }), [l]), p = le((e, o) => {
|
|
1196
|
+
"accept" === o.reason && e !== t.getName() && t.setName(e).catch(n);
|
|
1197
|
+
}, [t, n]), u = le((e) => {
|
|
1198
|
+
if (0 === e.length || e.length > 255) throw new bt(s("error.pivotTable.nameInvalid"));
|
|
1199
|
+
const o = l.getPivotTables().getByName(e);
|
|
1200
|
+
if (o && o.getName() !== t.getName()) throw new bt(s("error.pivotTable.nameExists"));
|
|
1201
|
+
}, [
|
|
1202
|
+
l,
|
|
1203
|
+
t,
|
|
1204
|
+
s
|
|
1205
|
+
]), m = le((e, o) => {
|
|
1206
|
+
if ("accept" !== o.reason) return;
|
|
1207
|
+
const r = Ot(e);
|
|
1208
|
+
r && t.setSource("string" == typeof r ? r : r.at(0)).catch(n);
|
|
1209
|
+
}, [t, n]);
|
|
1210
|
+
return Ze(Je, {
|
|
1211
|
+
className: "sxl-pivot-table-header",
|
|
1212
|
+
sx: {
|
|
1213
|
+
display: "flex",
|
|
1214
|
+
flexDirection: "column",
|
|
1215
|
+
rowGap: (e) => e.spacing(1),
|
|
1216
|
+
paddingTop: (e) => e.spacing(1)
|
|
1217
|
+
},
|
|
1218
|
+
children: [Ye(i, {
|
|
1219
|
+
formName: "name",
|
|
1220
|
+
value: o,
|
|
1221
|
+
changeOn: "done",
|
|
1222
|
+
onDone: p,
|
|
1223
|
+
onValidate: u,
|
|
1224
|
+
disabled: c
|
|
1225
|
+
}), Ye(a, {
|
|
1226
|
+
grammar: "reference",
|
|
1227
|
+
formName: "source",
|
|
1228
|
+
label: s("pivotTableNew.source"),
|
|
1229
|
+
value: r,
|
|
1230
|
+
allowMulti: !1,
|
|
1231
|
+
home: d,
|
|
1232
|
+
pickAs: "absolute",
|
|
1233
|
+
changeOn: "done",
|
|
1234
|
+
onDone: m,
|
|
1235
|
+
disabled: c || null === r
|
|
1236
|
+
})]
|
|
1237
|
+
});
|
|
1238
|
+
}, mo = (e) => Ye(uo, { ...e }), go = (e) => Ye(E, {
|
|
1239
|
+
renderMenu: po,
|
|
1240
|
+
renderFilter: g,
|
|
1241
|
+
renderHeader: mo,
|
|
1242
|
+
...e
|
|
1243
|
+
}), ho = ze(wt("studio:dataValidationDetailsTaskPane", () => import("./DpHH7fvV8jCBbKt5.mjs"), { select: (e) => ({ default: e.DataValidationDetailsTaskPane }) }).load), fo = Pt({
|
|
1244
|
+
EagerStudio: () => wo,
|
|
1245
|
+
default: () => wo
|
|
1246
|
+
});
|
|
1247
|
+
d(), S.registerTaskPane({
|
|
1248
|
+
key: A.PivotTable,
|
|
1249
|
+
component: go
|
|
1250
|
+
}, !0), (() => {
|
|
1251
|
+
X.register({
|
|
1252
|
+
key: "changeShapeGallery",
|
|
1253
|
+
contributions: { shapeToolbar: {
|
|
1254
|
+
order: -1,
|
|
1255
|
+
divider: "after"
|
|
1256
|
+
} },
|
|
1257
|
+
render: (e) => Ye(C, {
|
|
1258
|
+
...e,
|
|
1259
|
+
commandKey: "changeShape",
|
|
1260
|
+
excludeCategories: Nt
|
|
1261
|
+
})
|
|
1262
|
+
}, !0);
|
|
1263
|
+
L("shape", () => import("./BePpjuTMltMTtgmp.mjs").then((e) => e.ShapeFormatPanel));
|
|
1264
|
+
})(), L("chart", () => import("./BUqtenzZROfaeBgh.mjs").then((e) => e.ChartFormatPanel)), (() => {
|
|
1265
|
+
const e = q.DefaultCommandButtonRegistry, t = [];
|
|
1266
|
+
t.push(e.register({
|
|
1267
|
+
key: "changePictureOptions",
|
|
1268
|
+
defaultKey: "changePictureFromFile",
|
|
1269
|
+
members: ["changePictureFromFile", "changePictureFromURL"],
|
|
1270
|
+
contributions: { pictureToolbar: { order: -3 } }
|
|
1271
|
+
}, !0)), t.push(e.register({
|
|
1272
|
+
key: "pictureHyperlinkOptions",
|
|
1273
|
+
defaultKey: "updatePictureHyperlink",
|
|
1274
|
+
members: [
|
|
1275
|
+
"updatePictureHyperlink",
|
|
1276
|
+
"openPictureHyperlink",
|
|
1277
|
+
"deletePictureHyperlink"
|
|
1278
|
+
],
|
|
1279
|
+
contributions: { pictureToolbar: { order: -2 } }
|
|
1280
|
+
}, !0)), t.push(e.register({
|
|
1281
|
+
key: "cropAspectOptions",
|
|
1282
|
+
members: [
|
|
1283
|
+
"cropAspect1x1",
|
|
1284
|
+
"-",
|
|
1285
|
+
"cropAspect2x3",
|
|
1286
|
+
"cropAspect3x4",
|
|
1287
|
+
"cropAspect3x5",
|
|
1288
|
+
"cropAspect4x5",
|
|
1289
|
+
"-",
|
|
1290
|
+
"cropAspect3x2",
|
|
1291
|
+
"cropAspect4x3",
|
|
1292
|
+
"cropAspect5x3",
|
|
1293
|
+
"cropAspect5x4",
|
|
1294
|
+
"cropAspect16x9",
|
|
1295
|
+
"cropAspect16x10"
|
|
1296
|
+
]
|
|
1297
|
+
}, !0)), t.push(e.register({
|
|
1298
|
+
key: "cropOptions",
|
|
1299
|
+
members: [
|
|
1300
|
+
{
|
|
1301
|
+
key: "cropToShapeGallery",
|
|
1302
|
+
render: (e) => Ye(C, {
|
|
1303
|
+
...e,
|
|
1304
|
+
commandKey: "cropToShape",
|
|
1305
|
+
excludeCategories: Nt
|
|
1306
|
+
})
|
|
1307
|
+
},
|
|
1308
|
+
"cropAspectOptions",
|
|
1309
|
+
"-",
|
|
1310
|
+
"cropFill",
|
|
1311
|
+
"cropFit"
|
|
1312
|
+
],
|
|
1313
|
+
contributions: { pictureToolbar: {
|
|
1314
|
+
order: -1,
|
|
1315
|
+
divider: "after"
|
|
1316
|
+
} }
|
|
1317
|
+
}, !0));
|
|
1318
|
+
})(), c(), S.registerTaskPane({
|
|
1319
|
+
key: A.DataValidation,
|
|
1320
|
+
component: ho
|
|
1321
|
+
}, !0), S.registerTaskPane({
|
|
1322
|
+
key: A.ConditionalFormat,
|
|
1323
|
+
component: It
|
|
1324
|
+
}, !0), l(), s(), r(), t(), e(), n(), w();
|
|
1325
|
+
var ko = () => {
|
|
1326
|
+
let e, t;
|
|
1327
|
+
const o = new Promise((o, r) => {
|
|
1328
|
+
e = o, t = r;
|
|
1329
|
+
}), r = {
|
|
1330
|
+
promise: o,
|
|
1331
|
+
settled: !1,
|
|
1332
|
+
resolve: (t) => {
|
|
1333
|
+
r.settled = !0, e(t);
|
|
1334
|
+
},
|
|
1335
|
+
reject: (e) => {
|
|
1336
|
+
r.settled = !0, t(e);
|
|
1337
|
+
}
|
|
1338
|
+
};
|
|
1339
|
+
return o.catch(() => {}), r;
|
|
1340
|
+
}, bo = (e, t) => {
|
|
1341
|
+
if (!e) return {};
|
|
1342
|
+
const { colorSchemes: o, ...r } = e, n = o?.[t ? "dark" : "light"];
|
|
1343
|
+
return n && "object" == typeof n ? gt.deepMerge(r, n) : r;
|
|
1344
|
+
}, yo = "taskPanePosition", wo = Ce(xe((e, t) => {
|
|
1345
|
+
const { host: r, scopeClass: n, square: a, elevation: i, variant: s, onWorkbookLoad: l, prefetch: c, onDocumentError: d, renderDocumentError: g = k, propsDocumentError: f, propsTaskPaneArea: y, renderTaskPaneArea: w = xo, taskPaneSide: x = "right", onKeyDown: C, workbook: D, onWorkbookChange: S, logo: T, topLeft: E, topRight: F, muiTheme: A, tokens: L, cssBaseline: H, autoFocus: X = !1, title: Q, onDirtyChange: te, propsDocumentTitle: ae, renderDocumentLoading: se = b, propsDocumentLoading: ce, propsWorkbook: ue, showFormulaBar: me, propsFormulaBar: ge, renderFormulaBar: be, formulaBarPlacement: ye, virtualKeyboard: we = "float", editable: xe, showStatusBar: ve, propsStatusBar: Ce, renderStatusBar: Fe, propsToolbar: Ae, renderToolbar: Ie } = e, Re = Ee(null), je = Ee(null), $e = Ee(null), Me = le(() => {
|
|
1346
|
+
$e.current?.getNamedCollectionEditorElement?.()?.focus?.();
|
|
1347
|
+
}, []), Le = ((e, t = "undefined" == typeof window ? "mouse" : oe.detectIt().primaryInput) => "top" === e || "bottom" === e ? e : "touch" === t ? "bottom" : "top")(ye), Ke = "bottom" === Le ? we : "none", { inset: _e, offsetTop: ze } = pe("resize" === Ke), He = le(d ?? (() => {}), [d]), Ve = le(te ?? (() => {}), [te]), Ue = ae?.placeHolder, [Ge] = he(N.Mode, I[N.Mode]), { themeMode: qe } = fe({ mode: Ge ?? void 0 }), [Xe] = he(J.Active, null), Qe = Ee(Xe);
|
|
1348
|
+
Qe.current = Xe;
|
|
1349
|
+
const et = ke(), tt = Te(() => ({
|
|
1350
|
+
light: Be(!1, gt.deepMerge(bo(A, !1), v(et?.light))),
|
|
1351
|
+
dark: Be(!0, gt.deepMerge(bo(A, !0), v(et?.dark)))
|
|
1352
|
+
}), [
|
|
1353
|
+
A,
|
|
1354
|
+
et?.light,
|
|
1355
|
+
et?.dark
|
|
1356
|
+
]), rt = "dark" === qe, nt = Te(() => u(tt.light, tt.dark, `.${n}`, L), [
|
|
1357
|
+
tt,
|
|
1358
|
+
n,
|
|
1359
|
+
L
|
|
1360
|
+
]), st = Te(() => O("sxl-defaults", `.${n}`), [n]), lt = B(), [dt, pt] = We(() => D ?? null);
|
|
1361
|
+
Se(() => {
|
|
1362
|
+
pt(D ?? null);
|
|
1363
|
+
}, [D]);
|
|
1364
|
+
const [ut, mt] = We(0), ht = Ee(null);
|
|
1365
|
+
ht.current || (ht.current = ko());
|
|
1366
|
+
const kt = z(dt, {
|
|
1367
|
+
io: R,
|
|
1368
|
+
defaultTheme: lt.getDefaultTheme(),
|
|
1369
|
+
reloadKey: ut
|
|
1370
|
+
}), bt = "loaded" === kt.status ? kt.workbook : null, yt = Te(() => "error" === kt.status ? {
|
|
1371
|
+
status: "error",
|
|
1372
|
+
error: kt.error
|
|
1373
|
+
} : "loaded" === kt.status ? {
|
|
1374
|
+
status: "loaded",
|
|
1375
|
+
workbook: kt.workbook
|
|
1376
|
+
} : { status: "loading" }, [kt]);
|
|
1377
|
+
Se(() => {
|
|
1378
|
+
ht.current.settled && (ht.current = ko());
|
|
1379
|
+
}, [dt, ut]), Se(() => {
|
|
1380
|
+
if ("loaded" === yt.status) {
|
|
1381
|
+
const e = ht.current, t = yt.workbook;
|
|
1382
|
+
t.whenFontsReady().then(() => e.resolve(t), () => e.resolve(t));
|
|
1383
|
+
} else "error" === yt.status && (He?.(yt.error), ht.current.reject(yt.error));
|
|
1384
|
+
}, [yt]);
|
|
1385
|
+
const [wt, xt] = We(null);
|
|
1386
|
+
bt && !wt && xt(bt);
|
|
1387
|
+
const vt = bt && wt && bt !== wt ? bt : null, Ct = Ee(vt);
|
|
1388
|
+
Ct.current = vt;
|
|
1389
|
+
const Dt = Ee(wt);
|
|
1390
|
+
Dt.current = wt;
|
|
1391
|
+
const Tt = Ee([]), Et = De((e) => {
|
|
1392
|
+
const t = Dt.current;
|
|
1393
|
+
t && Tt.current.push(t), pt(e);
|
|
1394
|
+
}, []);
|
|
1395
|
+
Se(() => {
|
|
1396
|
+
const e = Tt.current;
|
|
1397
|
+
if (0 !== e.length) {
|
|
1398
|
+
Tt.current = e.filter((e) => e === wt);
|
|
1399
|
+
for (let t = 0; t < e.length; t++) {
|
|
1400
|
+
const o = e[t];
|
|
1401
|
+
if (o !== wt) try {
|
|
1402
|
+
o.close();
|
|
1403
|
+
} catch (e) {
|
|
1404
|
+
console.warn("Unable to close the replaced workbook", e);
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
}, [wt]);
|
|
1409
|
+
const Ft = xe ? null : wt, At = _(), Pt = Te(() => {
|
|
1410
|
+
const e = Ft?.getSelectedWorksheet() ?? Ft?.getWorksheets().getItems({ visibility: "veryHidden" })[0];
|
|
1411
|
+
return e ? $(e, { referenceMode: At }) : null;
|
|
1412
|
+
}, [Ft, At]), It = xe ?? Pt, Nt = Ee(It);
|
|
1413
|
+
Nt.current = It, Se(() => {
|
|
1414
|
+
if (!It) return;
|
|
1415
|
+
let e = It.getSession();
|
|
1416
|
+
return It.subscribe(() => {
|
|
1417
|
+
const t = e;
|
|
1418
|
+
if (e = It.getSession(), !t || e) return;
|
|
1419
|
+
if ("formula-bar" !== t.getActiveEditorId()) return;
|
|
1420
|
+
const o = $e.current;
|
|
1421
|
+
(o?.isFocusWithin?.() ?? o?.contains?.(document.activeElement)) && Re.current?.focus();
|
|
1422
|
+
});
|
|
1423
|
+
}, [It]);
|
|
1424
|
+
const Rt = U(wt), { isDirty: jt, saveState: Ot } = G(wt, R), $t = V(wt), Lt = Ee(Ot), Bt = Ee(null);
|
|
1425
|
+
Lt.current = Ot;
|
|
1426
|
+
const _t = De(() => Lt.current?.isDirty() ?? !1, []), zt = Ee(yt);
|
|
1427
|
+
zt.current = yt;
|
|
1428
|
+
const [Ht, Vt] = We(null), Ut = Q ?? ae?.title, [Gt, qt] = We(null);
|
|
1429
|
+
Se(() => {
|
|
1430
|
+
qt(null);
|
|
1431
|
+
}, [wt]);
|
|
1432
|
+
const Yt = Ut ?? Gt ?? Rt ?? "";
|
|
1433
|
+
Se(() => {
|
|
1434
|
+
Ve?.(jt);
|
|
1435
|
+
}, [jt]);
|
|
1436
|
+
const Zt = le(S ?? (() => {}), [S]);
|
|
1437
|
+
Se(() => {
|
|
1438
|
+
Zt?.(bt);
|
|
1439
|
+
}, [bt]);
|
|
1440
|
+
const Qt = Ee(bt);
|
|
1441
|
+
Qt.current = bt, K(wt, "onViewChange");
|
|
1442
|
+
const eo = Te(() => Ye(Pe, {
|
|
1443
|
+
groupKey: "helpOptions",
|
|
1444
|
+
disableHover: !0,
|
|
1445
|
+
sx: { padding: "0" },
|
|
1446
|
+
propsButton: { sx: { maxHeight: "22px" } }
|
|
1447
|
+
}), []), [to, oo] = We(null), ro = De((e) => {
|
|
1448
|
+
oo(e);
|
|
1449
|
+
}, []);
|
|
1450
|
+
Se(() => {
|
|
1451
|
+
Y.prefetch([Y.getActive(), W]).catch((e) => {
|
|
1452
|
+
console.warn("Icons could not be loaded:", e);
|
|
1453
|
+
});
|
|
1454
|
+
}, []);
|
|
1455
|
+
const no = Ee(null);
|
|
1456
|
+
no.current || (no.current = ko());
|
|
1457
|
+
const ao = Ee(null), so = De(() => ao.current?.getSheetElement()?.getGridSurface()?.getPane()?.getElement() ?? no.current.promise, []), co = le(async (e) => {
|
|
1458
|
+
const t = Qe.current;
|
|
1459
|
+
t && t !== ft.getActive() && await ft.setActive(t), await q.DefaultCommandCatalogService.prefetch(t ?? void 0), Vt(e), ao.current = e.source, no.current.settled || no.current.resolve(e.source.getSheetElement()?.getGridSurface()?.getPane()?.getElement() ?? null), l?.(e);
|
|
1460
|
+
}, []), po = Ee(null), uo = De((e) => {
|
|
1461
|
+
let t = null, r = {
|
|
1462
|
+
readOnly: !0,
|
|
1463
|
+
...ae
|
|
1464
|
+
};
|
|
1465
|
+
return ae?.hidden || (t = Ye(o, {
|
|
1466
|
+
...r,
|
|
1467
|
+
style: {
|
|
1468
|
+
maxWidth: "100%",
|
|
1469
|
+
...ae?.style
|
|
1470
|
+
},
|
|
1471
|
+
workbook: e.workbook ?? Re.current,
|
|
1472
|
+
ref: po,
|
|
1473
|
+
title: Yt,
|
|
1474
|
+
modified: jt,
|
|
1475
|
+
encrypted: $t,
|
|
1476
|
+
placeHolder: Ue,
|
|
1477
|
+
onTitleChange: (e) => {
|
|
1478
|
+
qt(e), ae?.onTitleChange?.(e);
|
|
1479
|
+
}
|
|
1480
|
+
})), Ye(Kt, {
|
|
1481
|
+
...e,
|
|
1482
|
+
logo: T,
|
|
1483
|
+
mainElement: t,
|
|
1484
|
+
startElement: E,
|
|
1485
|
+
endElement: F
|
|
1486
|
+
});
|
|
1487
|
+
}, [
|
|
1488
|
+
T,
|
|
1489
|
+
Yt,
|
|
1490
|
+
jt,
|
|
1491
|
+
$t,
|
|
1492
|
+
ae,
|
|
1493
|
+
E,
|
|
1494
|
+
F
|
|
1495
|
+
]);
|
|
1496
|
+
Se(() => {
|
|
1497
|
+
const e = Re.current;
|
|
1498
|
+
if (!e) return;
|
|
1499
|
+
const t = (t) => {
|
|
1500
|
+
(t.ctrlKey || t.metaKey || "native" !== ne.getWheelOwner(t, e)) && t.preventDefault();
|
|
1501
|
+
};
|
|
1502
|
+
return e.addEventListener("wheel", t, { passive: !1 }), () => {
|
|
1503
|
+
e.removeEventListener("wheel", t);
|
|
1504
|
+
};
|
|
1505
|
+
}, [Ht]);
|
|
1506
|
+
const [mo, go] = We(null);
|
|
1507
|
+
Se(() => {
|
|
1508
|
+
go(Ht?.source?.getCommandScope?.() ?? null);
|
|
1509
|
+
}, [Ht]);
|
|
1510
|
+
const ho = Te(() => ({
|
|
1511
|
+
"& .SnackbarContainer-root": { position: "absolute !important" },
|
|
1512
|
+
"& .notistack-SnackbarContainer > div": { maxWidth: "min(100%, 720px)" },
|
|
1513
|
+
"& .notistack-Snackbar": { minWidth: "unset" },
|
|
1514
|
+
"& .notistack-Snackbar > .error-snackbar .MuiTypography-root": { color: (e) => e.palette.getContrastText(e.palette.error.main) },
|
|
1515
|
+
"& .notistack-Snackbar > .error-snackbar .MuiCardActions-root": { color: (e) => e.palette.getContrastText(e.palette.error.main) },
|
|
1516
|
+
"& .notistack-Snackbar > .error-snackbar .MuiButtonBase-root": { color: (e) => e.palette.getContrastText(e.palette.error.main) },
|
|
1517
|
+
"& .notistack-MuiContent *": { fontFamily: (e) => e.typography.fontFamily },
|
|
1518
|
+
"& #notistack-snackbar": {
|
|
1519
|
+
maxWidth: "560px",
|
|
1520
|
+
whiteSpace: "pre-wrap"
|
|
1521
|
+
},
|
|
1522
|
+
"*": { userSelect: "none" }
|
|
1523
|
+
}), []), [fo, wo] = We(null), [, vo] = he(null, !1);
|
|
1524
|
+
Se(() => {
|
|
1525
|
+
vo(null != fo);
|
|
1526
|
+
}, [fo, vo]);
|
|
1527
|
+
const Co = De((e) => w({
|
|
1528
|
+
model: wt,
|
|
1529
|
+
side: x,
|
|
1530
|
+
...e,
|
|
1531
|
+
...y
|
|
1532
|
+
}), [
|
|
1533
|
+
wt,
|
|
1534
|
+
x,
|
|
1535
|
+
y
|
|
1536
|
+
]), Do = Ee(r);
|
|
1537
|
+
Do.current = r, de(t, () => ({
|
|
1538
|
+
isStudioElement: () => !0,
|
|
1539
|
+
save: (e) => {
|
|
1540
|
+
const t = Bt.current;
|
|
1541
|
+
return t ? t(e) : Promise.reject(/* @__PURE__ */ new Error("The studio cannot save: no workbook, or the backing store cannot write."));
|
|
1542
|
+
},
|
|
1543
|
+
getWorkbookElement: () => Re.current,
|
|
1544
|
+
getWorkbook: () => Qt.current ?? null,
|
|
1545
|
+
isDirty: () => Lt.current?.isDirty() ?? !1,
|
|
1546
|
+
getEditable: () => Nt.current,
|
|
1547
|
+
getFormulaBarElement: () => $e.current ?? null,
|
|
1548
|
+
focus: () => Re.current?.focus(),
|
|
1549
|
+
whenReady: () => (ht.current || (ht.current = ko()), ht.current.promise),
|
|
1550
|
+
getWorkbookState: () => zt.current,
|
|
1551
|
+
retry: () => mt((e) => e + 1)
|
|
1552
|
+
}), [], r);
|
|
1553
|
+
const So = Ee(!1), To = le((e, t) => {
|
|
1554
|
+
t === Ct.current && requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
1555
|
+
t === Ct.current && (So.current = Do.current?.contains(document.activeElement) ?? !0, xt(t), co(e));
|
|
1556
|
+
}));
|
|
1557
|
+
}, []);
|
|
1558
|
+
Se(() => {
|
|
1559
|
+
So.current && (So.current = !1, Re.current?.focus());
|
|
1560
|
+
}, [wt]);
|
|
1561
|
+
const Eo = De((e) => {
|
|
1562
|
+
const { ref: t, ...o } = e, r = rt ? tt.dark : tt.light, n = "error" === yt.status && g ? Ye(re, {
|
|
1563
|
+
render: g,
|
|
1564
|
+
props: {
|
|
1565
|
+
...f,
|
|
1566
|
+
style: {
|
|
1567
|
+
width: "100%",
|
|
1568
|
+
height: "100%",
|
|
1569
|
+
...f?.style
|
|
1570
|
+
},
|
|
1571
|
+
error: yt.error
|
|
1572
|
+
}
|
|
1573
|
+
}) : null;
|
|
1574
|
+
if (n && !wt) return Ye(at, {
|
|
1575
|
+
style: {
|
|
1576
|
+
width: "100%",
|
|
1577
|
+
height: "100%",
|
|
1578
|
+
position: "absolute",
|
|
1579
|
+
display: "flex",
|
|
1580
|
+
alignItems: "stretch",
|
|
1581
|
+
justifyContent: "stretch"
|
|
1582
|
+
},
|
|
1583
|
+
children: n
|
|
1584
|
+
});
|
|
1585
|
+
let l = null;
|
|
1586
|
+
if (wt) {
|
|
1587
|
+
const e = wt, n = e.getView(), a = me ?? n?.isShowFormulaBar(), i = ve ?? n?.isShowStatusBar(), s = Ht?.source ?? Re.current, d = Ye(re, {
|
|
1588
|
+
render: void 0 === Ie ? uo : Ie,
|
|
1589
|
+
props: {
|
|
1590
|
+
workbook: s,
|
|
1591
|
+
...Ae
|
|
1592
|
+
}
|
|
1593
|
+
}), u = "bottom" === Le, g = a ? Ye(re, {
|
|
1594
|
+
render: void 0 === be ? m : be,
|
|
1595
|
+
props: {
|
|
1596
|
+
ref: $e,
|
|
1597
|
+
style: {
|
|
1598
|
+
marginTop: r.spacing(u ? .5 : .25),
|
|
1599
|
+
marginLeft: r.spacing(1),
|
|
1600
|
+
marginRight: r.spacing(1),
|
|
1601
|
+
marginBottom: r.spacing(u ? .5 : .75)
|
|
1602
|
+
},
|
|
1603
|
+
workbook: e,
|
|
1604
|
+
editable: It ?? void 0,
|
|
1605
|
+
placement: Le,
|
|
1606
|
+
floatOnKeyboard: "float" === Ke,
|
|
1607
|
+
...ge,
|
|
1608
|
+
propsNamedCollectionEditor: {
|
|
1609
|
+
restoreFocus: (e) => s?.focus(e),
|
|
1610
|
+
...ge?.propsNamedCollectionEditor
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
}) : null, f = i ? Ye(re, {
|
|
1614
|
+
render: void 0 === Fe ? h : Fe,
|
|
1615
|
+
props: {
|
|
1616
|
+
childrenEnd: eo,
|
|
1617
|
+
...Ce
|
|
1618
|
+
}
|
|
1619
|
+
}) : null, k = (e, r) => Ye(p, {
|
|
1620
|
+
...ue,
|
|
1621
|
+
tabIndex: 0,
|
|
1622
|
+
autoFocus: !r && X,
|
|
1623
|
+
workbook: e,
|
|
1624
|
+
editable: r ? void 0 : It ?? void 0,
|
|
1625
|
+
focusNameBox: r ? void 0 : Me,
|
|
1626
|
+
prefetch: !r && c,
|
|
1627
|
+
ref: r ? je : St([t, Re]),
|
|
1628
|
+
onWorkbookLoad: r ? (t) => To(t, e) : co,
|
|
1629
|
+
onKeyDown: (e) => {
|
|
1630
|
+
C?.(e);
|
|
1631
|
+
},
|
|
1632
|
+
propsWorkbookLoading: ce,
|
|
1633
|
+
renderWorkbookLoading: null,
|
|
1634
|
+
style: r ? {
|
|
1635
|
+
...ue?.style,
|
|
1636
|
+
position: "absolute",
|
|
1637
|
+
inset: 0,
|
|
1638
|
+
visibility: "hidden"
|
|
1639
|
+
} : {
|
|
1640
|
+
flex: "1 1 100%",
|
|
1641
|
+
minHeight: 0,
|
|
1642
|
+
...ue?.style
|
|
1643
|
+
},
|
|
1644
|
+
onContextMenu: (e) => e.preventDefault(),
|
|
1645
|
+
...r ? null : o
|
|
1646
|
+
}, e.getId());
|
|
1647
|
+
l = Ye("div", {
|
|
1648
|
+
style: {
|
|
1649
|
+
display: "flex",
|
|
1650
|
+
flexDirection: "column",
|
|
1651
|
+
flex: "1 1 100%",
|
|
1652
|
+
minWidth: 0,
|
|
1653
|
+
minHeight: 0,
|
|
1654
|
+
...M({
|
|
1655
|
+
window: r.palette.background.default,
|
|
1656
|
+
windowText: r.palette.text.primary
|
|
1657
|
+
})
|
|
1658
|
+
},
|
|
1659
|
+
children: lo(Le, {
|
|
1660
|
+
toolbar: d,
|
|
1661
|
+
formulaBar: g,
|
|
1662
|
+
statusBar: f,
|
|
1663
|
+
main: Ye(io, {
|
|
1664
|
+
taskSide: x,
|
|
1665
|
+
persistKey: yo,
|
|
1666
|
+
sidebarElement: fo ? Ye(q.CommandScopeProvider, {
|
|
1667
|
+
scope: mo,
|
|
1668
|
+
children: fo
|
|
1669
|
+
}) : void 0,
|
|
1670
|
+
mainElement: Ze("div", {
|
|
1671
|
+
style: {
|
|
1672
|
+
position: "relative",
|
|
1673
|
+
display: "flex",
|
|
1674
|
+
flexDirection: "column",
|
|
1675
|
+
flex: "1 1 100%",
|
|
1676
|
+
minWidth: 0,
|
|
1677
|
+
minHeight: 0
|
|
1678
|
+
},
|
|
1679
|
+
children: [[k(wt, !1), vt ? k(vt, !0) : null], Ye(Je, {
|
|
1680
|
+
ref: ro,
|
|
1681
|
+
sx: {
|
|
1682
|
+
position: "absolute",
|
|
1683
|
+
top: "10%",
|
|
1684
|
+
left: 0,
|
|
1685
|
+
right: 0,
|
|
1686
|
+
bottom: 0,
|
|
1687
|
+
pointerEvents: "none",
|
|
1688
|
+
"& > :first-of-type": { position: "relative" }
|
|
1689
|
+
}
|
|
1690
|
+
})]
|
|
1691
|
+
})
|
|
1692
|
+
})
|
|
1693
|
+
})
|
|
1694
|
+
});
|
|
1695
|
+
}
|
|
1696
|
+
const d = !Ht && se ? Ye(re, {
|
|
1697
|
+
render: se,
|
|
1698
|
+
props: { ...ce }
|
|
1699
|
+
}) : null;
|
|
1700
|
+
return Ze(at, {
|
|
1701
|
+
sx: ho,
|
|
1702
|
+
style: {
|
|
1703
|
+
width: "100%",
|
|
1704
|
+
height: _e ? `calc(100% - ${_e}px)` : "100%",
|
|
1705
|
+
transform: ze ? `translateY(${ze}px)` : void 0,
|
|
1706
|
+
position: "absolute",
|
|
1707
|
+
display: "flex",
|
|
1708
|
+
alignItems: "stretch",
|
|
1709
|
+
justifyContent: "stretch",
|
|
1710
|
+
backgroundColor: "var(--sxl-color-base-200)"
|
|
1711
|
+
},
|
|
1712
|
+
className: "eager-studio",
|
|
1713
|
+
square: a,
|
|
1714
|
+
elevation: i,
|
|
1715
|
+
variant: s,
|
|
1716
|
+
children: [
|
|
1717
|
+
l,
|
|
1718
|
+
n ? Ye(at, {
|
|
1719
|
+
style: {
|
|
1720
|
+
position: "absolute",
|
|
1721
|
+
inset: 0,
|
|
1722
|
+
display: "flex",
|
|
1723
|
+
alignItems: "stretch",
|
|
1724
|
+
justifyContent: "stretch"
|
|
1725
|
+
},
|
|
1726
|
+
children: n
|
|
1727
|
+
}) : null,
|
|
1728
|
+
d ? Ye("div", {
|
|
1729
|
+
style: {
|
|
1730
|
+
position: "absolute",
|
|
1731
|
+
inset: 0,
|
|
1732
|
+
display: "flex",
|
|
1733
|
+
alignItems: "center",
|
|
1734
|
+
justifyContent: "center",
|
|
1735
|
+
background: `var(--sxl-color-base-100, ${rt ? "#121212" : "#fff"})`
|
|
1736
|
+
},
|
|
1737
|
+
children: d
|
|
1738
|
+
}) : null
|
|
1739
|
+
]
|
|
1740
|
+
});
|
|
1741
|
+
}, [
|
|
1742
|
+
yt,
|
|
1743
|
+
wt,
|
|
1744
|
+
vt,
|
|
1745
|
+
Ht,
|
|
1746
|
+
Yt,
|
|
1747
|
+
se,
|
|
1748
|
+
ce,
|
|
1749
|
+
ue,
|
|
1750
|
+
a,
|
|
1751
|
+
i,
|
|
1752
|
+
s,
|
|
1753
|
+
eo,
|
|
1754
|
+
g,
|
|
1755
|
+
f,
|
|
1756
|
+
uo,
|
|
1757
|
+
ho,
|
|
1758
|
+
fo,
|
|
1759
|
+
x,
|
|
1760
|
+
mo,
|
|
1761
|
+
me,
|
|
1762
|
+
ge,
|
|
1763
|
+
be,
|
|
1764
|
+
Le,
|
|
1765
|
+
It,
|
|
1766
|
+
ve,
|
|
1767
|
+
Ce,
|
|
1768
|
+
Fe,
|
|
1769
|
+
Ae,
|
|
1770
|
+
Ie,
|
|
1771
|
+
Ke,
|
|
1772
|
+
_e,
|
|
1773
|
+
ze,
|
|
1774
|
+
tt,
|
|
1775
|
+
rt
|
|
1776
|
+
]);
|
|
1777
|
+
let Wo = Ye(Wt, {
|
|
1778
|
+
maxSnack: 3,
|
|
1779
|
+
domRoot: to ?? void 0,
|
|
1780
|
+
anchorOrigin: {
|
|
1781
|
+
vertical: "bottom",
|
|
1782
|
+
horizontal: "right"
|
|
1783
|
+
},
|
|
1784
|
+
autoHideDuration: 3500,
|
|
1785
|
+
onClose: (e, t, o) => {
|
|
1786
|
+
Re.current?.focus();
|
|
1787
|
+
},
|
|
1788
|
+
Components: { error: Mt },
|
|
1789
|
+
iconVariant: {
|
|
1790
|
+
success: Ye(it, {
|
|
1791
|
+
style: { marginRight: "8px" },
|
|
1792
|
+
children: Ye("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" })
|
|
1793
|
+
}),
|
|
1794
|
+
error: Ye(Z, {
|
|
1795
|
+
iconKey: "ErrorAlert",
|
|
1796
|
+
style: { marginRight: "8px" }
|
|
1797
|
+
})
|
|
1798
|
+
},
|
|
1799
|
+
children: Ye(j, {
|
|
1800
|
+
workbook: wt,
|
|
1801
|
+
children: Ye(P, {
|
|
1802
|
+
renderArea: Co,
|
|
1803
|
+
onUpdateArea: (e) => {
|
|
1804
|
+
wo(e);
|
|
1805
|
+
},
|
|
1806
|
+
children: Ye(Oe, { children: Ye(Jt, { children: Ye(ie, { children: Ye(ee, { children: Ye(Xt, {
|
|
1807
|
+
workbook: wt,
|
|
1808
|
+
initialCommandAnchor: so,
|
|
1809
|
+
renderWorkbook: Eo,
|
|
1810
|
+
setWorkbook: Et,
|
|
1811
|
+
titleWorkbook: Yt,
|
|
1812
|
+
setWorkbookTitle: qt,
|
|
1813
|
+
refDocumentTitle: po,
|
|
1814
|
+
isDirty: _t,
|
|
1815
|
+
refSave: Bt,
|
|
1816
|
+
host: r
|
|
1817
|
+
}) }) }) }) })
|
|
1818
|
+
})
|
|
1819
|
+
})
|
|
1820
|
+
});
|
|
1821
|
+
return Wo = Ze(ct, {
|
|
1822
|
+
theme: rt ? tt.dark : tt.light,
|
|
1823
|
+
children: [
|
|
1824
|
+
H ? Ye(ot, {}) : null,
|
|
1825
|
+
Ye("style", { children: nt }),
|
|
1826
|
+
Ye("style", { children: st }),
|
|
1827
|
+
Ye(Ne, {
|
|
1828
|
+
themeScopeClass: n,
|
|
1829
|
+
themeSurface: "app",
|
|
1830
|
+
themeMode: qe,
|
|
1831
|
+
children: Wo
|
|
1832
|
+
})
|
|
1833
|
+
]
|
|
1834
|
+
}), Wo;
|
|
1835
|
+
}));
|
|
1836
|
+
wo.displayName = "EagerStudio";
|
|
1837
|
+
var xo = (e) => Ye(oo, { ...e });
|
|
1838
|
+
export { wo as EagerStudio, wo as default, Ot as n, fo as t };
|