@sheetxl/studio-mui 0.8.0-beta.9 → 1.0.0
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/{DT71hr6qq9QMKf7Q.mjs → 2dGXbxSvPxpMpoQB.mjs} +2 -2
- package/browser/esm/AKfq7wiKunwYv5Co.mjs +87 -0
- package/browser/esm/{C--IZ8To0PhVLhoX.mjs → B16SyYhTCohin7vO.mjs} +4 -4
- package/browser/esm/B4qh8uSPezvUgs_C.mjs +414 -0
- package/browser/esm/BGR0Hv_mjOPfYxiD.mjs +975 -0
- package/browser/esm/{ipftNUxAU0HR-0YP.mjs → BVbTWo0j5ttMcIWs.mjs} +3 -3
- package/browser/esm/BctMjTuii_LaWmHJ.mjs +119 -0
- package/browser/esm/{DiKCs9R7e4MgyayQ.mjs → Bf-pwjpYBKNwL4f8.mjs} +4 -4
- package/browser/esm/Bh7XfTPJIFjaL6fa.mjs +13 -0
- package/browser/esm/BjH_mK6445rm6PL1.mjs +94 -0
- package/browser/esm/BqJSEK805PP8lILC.mjs +197 -0
- package/browser/esm/BrIWEn7tabhEreBm.mjs +973 -0
- package/browser/esm/{BscaD3SzYM6ysjgy.mjs → BsFK55lPALVUu31_.mjs} +5 -5
- package/browser/esm/{BdkeyaHAtiNa6jqW.mjs → C0PinnqWu_JwK9l_.mjs} +33 -31
- package/browser/esm/C1KcphZVjVAE638t.mjs +415 -0
- package/browser/esm/{80XYmJwiiFLBmpH2.mjs → C3V7EwPHHPx9aEkE.mjs} +47 -48
- package/browser/esm/CCAPeyEqlStPrh6B.mjs +294 -0
- package/browser/esm/{BNYKPFICOYt2VRsP.mjs → CF2Az5oBVjAigMRt.mjs} +2 -2
- package/browser/esm/CIqEqDyl8JZRMblX.mjs +225 -0
- package/browser/esm/CJERhz_1u40JkHfH.mjs +235 -0
- package/browser/esm/CNtF9Fix0G6BEVEl.mjs +424 -0
- package/browser/esm/{a5G-3nVFn86pvt8H.mjs → CWP52da2iNOs3Qtz.mjs} +82 -94
- package/browser/esm/CWpF_0HjYiRiddX6.mjs +31 -0
- package/browser/esm/CbedwfwBLBaagGD-.mjs +360 -0
- package/browser/esm/{ffz9LGAgGiWQQav9.mjs → Cc9tcBSYzJIv-dZw.mjs} +156 -109
- package/browser/esm/CcPLziOAdWTbG7xx.mjs +141 -0
- package/browser/esm/CdRnGw_9tvkn9d9o.mjs +335 -0
- package/browser/esm/{BXQPMQyxdiYwawjE.mjs → CgLDSZ8XvBqAB-Y2.mjs} +20 -18
- package/browser/esm/CgZLR7ijzsUoawf8.mjs +1281 -0
- package/browser/esm/Cn6OsV-MbO0rIM-o.mjs +442 -0
- package/browser/esm/{CHLqCxo3afOV1Otw.mjs → CnDnNU6GGzM05K8w.mjs} +4 -4
- package/browser/esm/CnVHQ6i6a8VCMsn1.mjs +106 -0
- package/browser/esm/D06He-Tw4moPdM5f.mjs +103 -0
- package/browser/esm/D9lQwTAJ9RO60ovS.mjs +72 -0
- package/browser/esm/{Cykd-NaZAtHJlQmQ.mjs → D9xw1YuRJUjPMaqA.mjs} +2 -2
- package/browser/esm/DBr6lCvWLLwnzSGy.mjs +386 -0
- package/browser/esm/DEdHwT-2JZO9HyZN.mjs +14 -0
- package/browser/esm/DH4SdW-02-I8082_.mjs +14 -0
- package/browser/esm/DHbnrUh5rdi62fgO.mjs +516 -0
- package/browser/esm/DJRKcOT0Xv-1r0OP.mjs +161 -0
- package/browser/esm/DPycoTH_4RNdK2hu.mjs +252 -0
- package/browser/esm/{BIZX_0jxF9Fmaxuy.mjs → DXQTN_6-MvPivCrz.mjs} +8 -6
- package/browser/esm/DaNVYYZLCql8_n0i.mjs +831 -0
- package/browser/esm/Dakiv-oEU8ty2ILI.mjs +77 -0
- package/browser/esm/DfCd-MxLjE3gZ5jl.mjs +392 -0
- package/browser/esm/DhZqt49Ue-lveZv3.mjs +2692 -0
- package/browser/esm/DkxgFV6jJb6pO6lM.mjs +490 -0
- package/browser/esm/{DpdMtsE7oOAIJqFo.mjs → QKDgV7kur90Bzexo.mjs} +14 -13
- package/browser/esm/R8q92QTpUT-sB4Nq.mjs +8547 -0
- package/browser/esm/RaV_j7qhH97TUb6P.mjs +1550 -0
- package/browser/esm/S-MJsifSUY334In9.mjs +8 -0
- package/browser/esm/UW74C3TpyGhFEOFO.mjs +267 -0
- package/browser/esm/W-jkQJTDojDSK93k.mjs +242 -0
- package/browser/esm/czz-Du13p5saoAex.mjs +318 -0
- package/browser/esm/{CawSvjLj4-2Qqyef.mjs → ilgUW6eI60262DJU.mjs} +2 -2
- package/browser/esm/index.mjs +1910 -289
- package/browser/esm/kbx_7Y2kVGMGIWtW.mjs +633 -0
- package/browser/esm/vCWRBUPIH8HXlYjO.mjs +94 -0
- package/browser/esm/w0DasqEtSJvoQVk2.mjs +517 -0
- package/browser/esm/w5dY32V2IxkbDBsT.mjs +225 -0
- package/licenses/dependencies.txt +106 -359
- package/node/esm/7GlVS1uyKRUAAjw9.mjs +1831 -0
- package/node/esm/B0mjDApnDOWo9UGr.mjs +412 -0
- package/node/esm/B19kx8jtLWU7WYCa.mjs +142 -0
- package/node/esm/BAFf7hg6qgFyQDW8.mjs +73 -0
- package/node/esm/BDdBcx7cNTM1hIXu.mjs +972 -0
- package/node/esm/BGBolrjPvNncjS1h.mjs +94 -0
- package/node/esm/BI3dFg_vx1Vgxgps.mjs +516 -0
- package/node/esm/BO19LMEPFqVsK1xu.mjs +267 -0
- package/node/esm/{b05_u9WnJaVGO0nq.mjs → BSrtVTtNqcTg8QKK.mjs} +2 -2
- package/node/esm/BcLccq7CvZiJXCDZ.mjs +319 -0
- package/node/esm/BeZ1ZY1UJepW8u1f.mjs +118 -0
- package/node/esm/BkLwJxkD4pyrume5.mjs +425 -0
- package/node/esm/{CTtj1NR0IrcN8PTy.mjs → Bl_AT6xOKzBqc3PT.mjs} +10 -10
- package/node/esm/{Defb5qpSal98J5ay.mjs → Bqah1dCUEhmRmY3c.mjs} +2 -2
- package/node/esm/Bv5awmbwVUdl4rma.mjs +106 -0
- package/node/esm/C3mSFWiCu7iONlk6.mjs +638 -0
- package/node/esm/CAJhvJU0gj93fPWl.mjs +141 -0
- package/node/esm/CJobW3iRAQ5vHeQr.mjs +14 -0
- package/node/esm/{Dyd7va4aqC1jIzAk.mjs → CSJTM9SCqIDkHlpm.mjs} +21 -21
- package/node/esm/CUnv4ewRTvuP0si8.mjs +1276 -0
- package/node/esm/CWnezGEPuX9UeJ8E.mjs +385 -0
- package/node/esm/{BHuZQ-LJ2GgDLYSz.mjs → CarjiReyjevcMdlI.mjs} +190 -141
- package/node/esm/CoG2fq6dYCvhC5yu.mjs +224 -0
- package/node/esm/Cpegk2BA6FOrOkZ0.mjs +77 -0
- package/node/esm/Cq1V2i0dRTWnoU1K.mjs +94 -0
- package/node/esm/{9k03YHFiw-wlUS8d.mjs → CyPtKWjud-Y-Pvq8.mjs} +2 -2
- package/node/esm/DEVN1ZPedFq8Bnui.mjs +197 -0
- package/node/esm/{BkoorcOtOEh_Y7ck.mjs → DFUPAGKlHT2-8dyC.mjs} +33 -31
- package/node/esm/DMxfzW-UQdMaV-Gx.mjs +975 -0
- package/node/esm/DWbMD1KaT8mlCUfO.mjs +519 -0
- package/node/esm/{DHHgNbakbpNnu0oW.mjs → DffuRwJI_5oVtzZb.mjs} +23 -23
- package/node/esm/Dg9rTwnydI2UVmGG.mjs +242 -0
- package/node/esm/{D4KDk-w7Khu7LrSi.mjs → DmQMejdH1-aYq99z.mjs} +70 -71
- package/node/esm/{BiHw3x2LPWT-kK8G.mjs → DvSoGqy_51YQZzYM.mjs} +84 -96
- package/node/esm/DzTvKGqU1I9m-_qd.mjs +391 -0
- package/node/esm/{CNkqJbFlITxBA0t4.mjs → PKRuDgaA8RrsqSNn.mjs} +29 -29
- package/node/esm/{C5g2gBoUk3-cn94h.mjs → POUGgaN5BmOnEPPl.mjs} +2 -2
- package/node/esm/WqxW6Up5_6oeJrSr.mjs +489 -0
- package/node/esm/ehyFZGpXZSmR7Q7-.mjs +294 -0
- package/node/esm/index.mjs +9717 -8954
- 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 +59 -10
- package/resources/locales/de/ui.msg.json +267 -14
- package/resources/locales/de/workbookAnomalies.cmd.json +14 -0
- package/resources/locales/en/groups.cmd.json +63 -11
- package/resources/locales/en/ui.msg.json +272 -14
- package/resources/locales/en/workbookAnomalies.cmd.json +14 -0
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -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 +2 -2
- package/types/src/comments/CommentsPlugin.d.ts +1 -1
- 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/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 +5 -4
- 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/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/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 +4 -4
- package/types/src/form/InputField.d.ts +5 -5
- package/types/src/format/BorderPreview.d.ts +11 -4
- 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 +6 -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 -6
- package/types/src/itemsPanel/ItemCard.d.ts +50 -7
- 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 +1 -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 +2 -1
- 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/StudioProps.d.ts +62 -27
- package/types/src/studio/formulaBarPlacement.d.ts +35 -0
- package/types/src/studio/useStudioApp.d.ts +25 -24
- 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 +2 -0
- package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
- package/types/src/theme/ThemeUtils.d.ts +8 -27
- package/types/src/toolbar/WorkbookToolbars.d.ts +2 -2
- package/types/src/workbook/DefaultRenderers.d.ts +42 -18
- 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/2tG9HJLr-WjsOCP3.cjs +0 -1
- package/browser/cjs/3RXtLkq7wTAV6y_e.cjs +0 -1
- package/browser/cjs/3k_KqDFr-AybPztc.cjs +0 -5
- package/browser/cjs/4_Zy3pR6YXkzISoK.cjs +0 -1
- package/browser/cjs/BD50lsTki7wvzb5g.cjs +0 -1
- package/browser/cjs/BJ-wdkCaXqJaejKf.cjs +0 -1
- package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
- package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
- package/browser/cjs/Bc-YisjBtD56vBAW.cjs +0 -1
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/BpG4iwTKbAnpi0wM.cjs +0 -1
- package/browser/cjs/ByIUHPOa02D7XbdC.cjs +0 -1
- package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
- package/browser/cjs/CMfoKJ3ehdXuld_7.cjs +0 -14
- package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
- package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
- package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
- package/browser/cjs/CkroJ2FmfFvk6Eyv.cjs +0 -1
- package/browser/cjs/CzJvR12QCQb-0Rtn.cjs +0 -1
- package/browser/cjs/D-Yo5aV9STT5KH4G.cjs +0 -1
- package/browser/cjs/DwkiLFWUtLC8ZcIQ.cjs +0 -1
- package/browser/cjs/HuPFsmz7kyZVo3c7.cjs +0 -1
- package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
- package/browser/cjs/M0_dvdYwhikqP9kg.cjs +0 -2
- package/browser/cjs/g1WhGOz5epV7Hqsg.cjs +0 -8
- package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
- package/browser/cjs/index.cjs +0 -2
- package/browser/esm/BoLRDhnoO3gvviYD.mjs +0 -13811
- package/browser/esm/CH-Y2-p8GRvCHvd4.mjs +0 -52
- package/browser/esm/CUhtBLyaGSkcKB_1.mjs +0 -236
- package/browser/esm/D-Kit71xiitqCWVY.mjs +0 -5356
- package/browser/esm/DkUDZxFxx9n2Cked.mjs +0 -223
- package/browser/esm/F6kkwcBr0l-496tC.mjs +0 -152
- package/browser/esm/Q8r5yuh8Yx2ROnhC.mjs +0 -115
- package/browser/esm/iRFlbG6hQyKLVagS.mjs +0 -411
- package/browser/esm/lftI5b4ZCHVYc6OZ.mjs +0 -1150
- package/node/esm/BTZGnNrgV1na62gd.mjs +0 -415
- package/node/esm/Be0G9parvc2CTpFQ.mjs +0 -4504
- package/node/esm/CTJqjeq3smY8jw5J.mjs +0 -236
- package/node/esm/DbLFR_dnQQmZC_jm.mjs +0 -115
- package/types/src/conditions/DateTimeOption.d.ts +0 -43
- package/types/src/conditions/ListSourceOption.d.ts +0 -31
- package/types/src/filter/FilterList.d.ts +0 -32
- package/types/src/shape/InsertShapeCommandButton.d.ts +0 -10
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v1.0.0
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
import { t as e } from "./DXQTN_6-MvPivCrz.mjs";
|
|
8
|
+
import { IFill as t, Table as n } from "@sheetxl/sdk";
|
|
9
|
+
import { StaticBorderRenderer as r, useGridColorScheme as i } from "@sheetxl/react";
|
|
10
|
+
import { CommandButtonType as a, useCallbackRef as o, useCommands as s, useTranslator as c } from "@sheetxl/utils-react";
|
|
11
|
+
import { forwardRef as l, memo as u, useCallback as d, useEffect as f, useLayoutEffect as p, useMemo as m, useReducer as h, useRef as g, useState as _ } from "react";
|
|
12
|
+
import { CommandButton as v, CommandPopupButton as y, ContextMenu as b, ExhibitDivider as x, ExhibitIconButton as S, ExhibitMenuHeader as C, ExhibitTooltip as w, defaultRenderPopupPanel as T } from "@sheetxl/utils-mui";
|
|
13
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
14
|
+
import { Box as k } from "@mui/material";
|
|
15
|
+
var A = "_sheetxl-reset_11z3j_1", j = 10, M = u(l((t, a) => {
|
|
16
|
+
let { styles: o, table: s, tableStyle: c = s?.getStyle() ?? o.getTableStyles().getDefault(), sx: l, disabled: u, className: p, forceThinBorder: g, cellHeight: _ = j, isLive: v = !1, ...y } = t, b = i(), x = b === "dark", S = Math.ceil(1.3 * _), [C, w] = h((e) => e + 1, 0);
|
|
17
|
+
f(() => {
|
|
18
|
+
if (v && s) return s.addListeners({ onAnyChange: () => {
|
|
19
|
+
w();
|
|
20
|
+
} });
|
|
21
|
+
}, [s, v]);
|
|
22
|
+
let T = m(() => {
|
|
23
|
+
let e = s?.toJSON() ?? {}, t = {
|
|
24
|
+
width: 5,
|
|
25
|
+
height: 5
|
|
26
|
+
};
|
|
27
|
+
return e && (e.style = {
|
|
28
|
+
...e.style,
|
|
29
|
+
name: c.getName()
|
|
30
|
+
}), new n({
|
|
31
|
+
size: t,
|
|
32
|
+
json: e,
|
|
33
|
+
styles: o
|
|
34
|
+
});
|
|
35
|
+
}, [
|
|
36
|
+
C,
|
|
37
|
+
s,
|
|
38
|
+
c,
|
|
39
|
+
o
|
|
40
|
+
]), E = m(() => {
|
|
41
|
+
let e = [];
|
|
42
|
+
for (let t = 0; t < 5; t++) for (let n = 0; n < 5; n++) {
|
|
43
|
+
let r = T.getStyleAt(t, n);
|
|
44
|
+
e.push(r);
|
|
45
|
+
}
|
|
46
|
+
return e;
|
|
47
|
+
}, [T]), M = m(() => {
|
|
48
|
+
let e = T.isHiddenButtons() || !T.isShowHeaders(), t = (t, n, r) => {
|
|
49
|
+
let i = !e && t === 0, a = r.getFill().toCSS(x), o = S - +(n < 4), s = _ - +(t < 4), c = r.getFont().getColor().toCSS(x);
|
|
50
|
+
a = {
|
|
51
|
+
...a,
|
|
52
|
+
position: "absolute",
|
|
53
|
+
display: "flex",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
justifyContent: i ? "space-evenly" : "center",
|
|
56
|
+
boxSizing: "border-box",
|
|
57
|
+
left: n * (S - 1),
|
|
58
|
+
top: t * (_ - 1),
|
|
59
|
+
width: o,
|
|
60
|
+
height: s
|
|
61
|
+
};
|
|
62
|
+
let l = null;
|
|
63
|
+
return i && (l = D("svg", {
|
|
64
|
+
width: "15",
|
|
65
|
+
height: "15",
|
|
66
|
+
viewBox: "0 0 15 15",
|
|
67
|
+
style: { fill: c },
|
|
68
|
+
children: D("path", { d: "M 7.4530672,10.134098 2.6725085,5.2978998 3.370275,4.5911648 7.4530672,8.7264777 11.530095,4.5911648 l 0.697764,0.706735M 7.4529247,10.134098 2.9086709,5.2978998 3.5719465,4.5911648 7.4529247,8.7264777 11.328423,4.5911648 l 0.663274,0.70673" })
|
|
69
|
+
})), O("td", {
|
|
70
|
+
className: `table-style-fill ${t}-${n}`,
|
|
71
|
+
style: a,
|
|
72
|
+
children: [D("div", {
|
|
73
|
+
className: `table-style-text ${t}-${n}`,
|
|
74
|
+
style: {
|
|
75
|
+
boxSizing: "border-box",
|
|
76
|
+
width: "6px",
|
|
77
|
+
borderTop: `1px solid ${c}`
|
|
78
|
+
}
|
|
79
|
+
}), l]
|
|
80
|
+
}, `${t}-${n}`);
|
|
81
|
+
}, n = [];
|
|
82
|
+
for (let e = 0; e < 5; e++) {
|
|
83
|
+
let r = [];
|
|
84
|
+
for (let n = 0; n < 5; n++) {
|
|
85
|
+
let i = E[5 * e + n];
|
|
86
|
+
r.push(t(e, n, i));
|
|
87
|
+
}
|
|
88
|
+
n.push(D("tr", { children: r }, e));
|
|
89
|
+
}
|
|
90
|
+
return n;
|
|
91
|
+
}, [
|
|
92
|
+
T,
|
|
93
|
+
c,
|
|
94
|
+
x,
|
|
95
|
+
T.isHiddenButtons()
|
|
96
|
+
]), N = d((e, t) => E[t].getBorders() ?? null, [E]);
|
|
97
|
+
return D(k, {
|
|
98
|
+
ref: a,
|
|
99
|
+
className: "table-format-preview",
|
|
100
|
+
"data-sxl-theme-surface": "grid",
|
|
101
|
+
"data-sxl-theme-mode": b,
|
|
102
|
+
sx: {
|
|
103
|
+
background: "var(--sxl-color-base-100)",
|
|
104
|
+
filter: u ? "grayscale(0.4) opacity(0.8);" : "none",
|
|
105
|
+
"& .styled-element": { position: "absolute" },
|
|
106
|
+
...l
|
|
107
|
+
},
|
|
108
|
+
...y,
|
|
109
|
+
children: D(r, {
|
|
110
|
+
getBorderAt: N,
|
|
111
|
+
rowCount: 5,
|
|
112
|
+
columnCount: 5,
|
|
113
|
+
forceThinBorder: g,
|
|
114
|
+
width: 5 * (S - 1) + 1,
|
|
115
|
+
height: 5 * (_ - 1) + 1,
|
|
116
|
+
style: { pointerEvents: "none" },
|
|
117
|
+
children: D("table", {
|
|
118
|
+
className: e(p, "sheetxl-table-preview", A),
|
|
119
|
+
style: {
|
|
120
|
+
borderCollapse: "collapse",
|
|
121
|
+
width: 5 * (S - 1) + 1,
|
|
122
|
+
height: 5 * (_ - 1) + 1
|
|
123
|
+
},
|
|
124
|
+
children: D("tbody", { children: M })
|
|
125
|
+
})
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
})), N = (e) => ({
|
|
129
|
+
width: e.columns * e.cellWidth - (e.columns - 1),
|
|
130
|
+
height: e.rows * e.cellHeight - (e.rows - 1)
|
|
131
|
+
}), P = (e, t, n, r, i) => {
|
|
132
|
+
e.beginPath(), e.moveTo(t + .5, n + .5), e.lineTo(r + .5, i + .5), e.stroke();
|
|
133
|
+
}, F = (e, n, r, i, a, o) => {
|
|
134
|
+
let { rows: s, columns: c } = n, l = [];
|
|
135
|
+
for (let e = 0; e < s; e++) for (let t = 0; t < c; t++) l.push(r(e, t));
|
|
136
|
+
let { width: u, height: d } = N(n);
|
|
137
|
+
e.width !== u && (e.width = u), e.height !== d && (e.height = d);
|
|
138
|
+
let f = e.getContext("2d", {
|
|
139
|
+
alpha: !1,
|
|
140
|
+
willReadFrequently: !0
|
|
141
|
+
});
|
|
142
|
+
if (!f) return null;
|
|
143
|
+
let p = n.cellWidth - 1, m = n.cellHeight - 1;
|
|
144
|
+
for (let e = 0; e < s; e++) for (let n = 0; n < c; n++) {
|
|
145
|
+
let r = l[e * c + n].getFill(), o = a;
|
|
146
|
+
r.getType() === t.Type.Solid ? o = r.getColor().toRGBA(i).toString() : r.getType() === t.Type.Gradient ? o = r.getStops()[0]?.getColor().toRGBA(i).toString() : r.getType() === t.Type.Pattern && (o = r.getForeground().toRGBA(i).toString()), f.fillStyle = o ?? a;
|
|
147
|
+
let s = n * p, u = e * m;
|
|
148
|
+
f.fillRect(s, u, p + 1, m + 1);
|
|
149
|
+
}
|
|
150
|
+
f.lineWidth = 1;
|
|
151
|
+
for (let e = 0; e < s; e++) for (let t = 0; t < c; t++) {
|
|
152
|
+
let n = l[e * c + t], r = t * p, a = e * m, s = n.getBorders();
|
|
153
|
+
if (!s.isEmpty()) {
|
|
154
|
+
let t = s.getLeft();
|
|
155
|
+
t.isNone() || (f.strokeStyle = t.getColor().toRGBA(i).toString(), P(f, r, a, r, a + m));
|
|
156
|
+
let n = s.getTop();
|
|
157
|
+
n.isNone() || (f.strokeStyle = n.getColor().toRGBA(i).toString(), P(f, r, a, r + p, e * m));
|
|
158
|
+
let o = s.getRight();
|
|
159
|
+
o.isNone() || (f.strokeStyle = o.getColor().toRGBA(i).toString(), P(f, r + p, a, r + p, a + m));
|
|
160
|
+
let c = s.getBottom();
|
|
161
|
+
c.isNone() || (f.strokeStyle = c.getColor().toRGBA(i).toString(), P(f, r, a + m, r + p, a + m));
|
|
162
|
+
}
|
|
163
|
+
if (o && !o(e, t)) continue;
|
|
164
|
+
f.strokeStyle = n.getFont().getColor().toRGBA(i).toString();
|
|
165
|
+
let u = Math.floor((m - 1 + 1) / 2), d = (p - 7) / 2;
|
|
166
|
+
P(f, t * p + d, e * m + u, t * p + d + 7, e * m + u);
|
|
167
|
+
}
|
|
168
|
+
return `url(${e.toDataURL()})`;
|
|
169
|
+
}, I = /* @__PURE__ */ new WeakMap(), L = {
|
|
170
|
+
rows: 5,
|
|
171
|
+
columns: 5,
|
|
172
|
+
cellWidth: 13,
|
|
173
|
+
cellHeight: 10
|
|
174
|
+
}, { width: R, height: z } = N(L), B = u(l((t, r) => {
|
|
175
|
+
let { table: a, tableStyle: o, styles: s, disabled: c, style: l, className: u, canvas: f, ...h } = t, g = i(), v = g === "dark", [y, b] = _(null), [x, S] = _(void 0), C = d((e) => {
|
|
176
|
+
b(e), typeof r == "function" ? r(e) : r && (r.current = e);
|
|
177
|
+
}, [r]);
|
|
178
|
+
p(() => {
|
|
179
|
+
y && S(getComputedStyle(y).getPropertyValue("--sxl-color-base-100").trim() || "#ffffff");
|
|
180
|
+
}, [y, g]);
|
|
181
|
+
let w = m(() => {
|
|
182
|
+
if (x === void 0) return null;
|
|
183
|
+
let e = a.toJSON();
|
|
184
|
+
if (!e) return null;
|
|
185
|
+
e.style = {
|
|
186
|
+
...e.style,
|
|
187
|
+
name: o.getName()
|
|
188
|
+
};
|
|
189
|
+
let t = x, r = s?.getTheme(), i = `${JSON.stringify(e.style)}|h${e.headerRowCount ?? 0}|t${e.totalsRowCount ?? 0}|${v ? "dark" : "light"}|${t}` + (o.isBuiltIn() ? "" : `|${JSON.stringify(o.toJSON())}`), c = r ? I.get(r) : void 0, l = c?.get(i);
|
|
190
|
+
if (l) return l;
|
|
191
|
+
let u = new n({
|
|
192
|
+
size: {
|
|
193
|
+
width: 5,
|
|
194
|
+
height: 5
|
|
195
|
+
},
|
|
196
|
+
json: e,
|
|
197
|
+
styles: s
|
|
198
|
+
}), d = F(f ?? document.createElement("canvas"), L, (e, t) => u.getStyleAt(e, t), v, t);
|
|
199
|
+
return d ? (r && (c || (c = /* @__PURE__ */ new Map(), I.set(r, c)), c.set(i, d)), d) : null;
|
|
200
|
+
}, [
|
|
201
|
+
f,
|
|
202
|
+
a,
|
|
203
|
+
o,
|
|
204
|
+
s,
|
|
205
|
+
v,
|
|
206
|
+
x
|
|
207
|
+
]);
|
|
208
|
+
return D("div", {
|
|
209
|
+
ref: C,
|
|
210
|
+
"data-sxl-theme-surface": "grid",
|
|
211
|
+
"data-sxl-theme-mode": g,
|
|
212
|
+
className: e("table-style-preview", u),
|
|
213
|
+
style: {
|
|
214
|
+
backgroundImage: w ?? void 0,
|
|
215
|
+
width: R,
|
|
216
|
+
height: z,
|
|
217
|
+
...l
|
|
218
|
+
},
|
|
219
|
+
...h
|
|
220
|
+
});
|
|
221
|
+
})), V = u((e) => {
|
|
222
|
+
let { table: t, tableStyle: n, selectedTableStyleName: r, onSelectTableStyleName: i, styles: o, hasContextMenu: s = !0, disabled: l, useCanvasPreview: u = !0, canvas: f, ...p } = e, h = c(), g = d((e) => {
|
|
223
|
+
let t = {
|
|
224
|
+
variant: a.Menuitem,
|
|
225
|
+
groupKey: "tableStyleOptions"
|
|
226
|
+
}, r = O(E, { children: [
|
|
227
|
+
D(v, {
|
|
228
|
+
...t,
|
|
229
|
+
commandKey: "formatTableStyleClearCellStyles",
|
|
230
|
+
commandState: n,
|
|
231
|
+
disabled: l
|
|
232
|
+
}),
|
|
233
|
+
D(v, {
|
|
234
|
+
...t,
|
|
235
|
+
style: { fontWeight: 550 },
|
|
236
|
+
commandKey: "formatTableStyle",
|
|
237
|
+
commandState: { name: n.getName() },
|
|
238
|
+
disabled: l
|
|
239
|
+
}),
|
|
240
|
+
D(x, { orientation: "horizontal" }),
|
|
241
|
+
D(v, {
|
|
242
|
+
...t,
|
|
243
|
+
commandKey: "setDefaultTableStyle",
|
|
244
|
+
commandState: n.getName(),
|
|
245
|
+
disabled: l
|
|
246
|
+
}),
|
|
247
|
+
D(x, { orientation: "horizontal" }),
|
|
248
|
+
D(v, {
|
|
249
|
+
...t,
|
|
250
|
+
commandKey: "deleteTableStyle",
|
|
251
|
+
commandState: n?.getName(),
|
|
252
|
+
disabled: l || !n || n.isBuiltIn()
|
|
253
|
+
})
|
|
254
|
+
] });
|
|
255
|
+
return T({
|
|
256
|
+
...e,
|
|
257
|
+
children: D(k, {
|
|
258
|
+
sx: {
|
|
259
|
+
display: "flex",
|
|
260
|
+
flexDirection: "column",
|
|
261
|
+
flex: "1 1 100%",
|
|
262
|
+
overflow: "hidden"
|
|
263
|
+
},
|
|
264
|
+
children: D(k, {
|
|
265
|
+
sx: {
|
|
266
|
+
overflow: "auto",
|
|
267
|
+
flex: "1 1 100%"
|
|
268
|
+
},
|
|
269
|
+
children: r
|
|
270
|
+
})
|
|
271
|
+
})
|
|
272
|
+
});
|
|
273
|
+
}, []), _ = n?.getName() === r, y = m(() => {
|
|
274
|
+
let e = {
|
|
275
|
+
table: t,
|
|
276
|
+
tableStyle: n,
|
|
277
|
+
styles: o
|
|
278
|
+
};
|
|
279
|
+
return u ? D(B, {
|
|
280
|
+
canvas: f,
|
|
281
|
+
...e
|
|
282
|
+
}) : D(M, { ...e });
|
|
283
|
+
}, [
|
|
284
|
+
t,
|
|
285
|
+
n,
|
|
286
|
+
o
|
|
287
|
+
]), C = D(S, {
|
|
288
|
+
sx: {
|
|
289
|
+
borderRadius: "2px",
|
|
290
|
+
padding: "2px",
|
|
291
|
+
margin: "0px 0px",
|
|
292
|
+
display: "flex",
|
|
293
|
+
border: (e) => `solid ${_ ? e.palette.primary.dark : "transparent"} 1px`
|
|
294
|
+
},
|
|
295
|
+
propsTooltip: {
|
|
296
|
+
label: n.getName() ?? h("tableStyle.none"),
|
|
297
|
+
placement: "bottom-start"
|
|
298
|
+
},
|
|
299
|
+
disabled: l,
|
|
300
|
+
icon: null,
|
|
301
|
+
onClick: () => {
|
|
302
|
+
i?.(n?.getName());
|
|
303
|
+
},
|
|
304
|
+
...p,
|
|
305
|
+
children: y
|
|
306
|
+
}, n.getName());
|
|
307
|
+
return s && (C = D(b, {
|
|
308
|
+
label: t.getStyleOptions().name,
|
|
309
|
+
renderPopupPanel: g,
|
|
310
|
+
children: C
|
|
311
|
+
})), C;
|
|
312
|
+
}), H = u(l((e, t) => {
|
|
313
|
+
let { commandKey: r, selectedTable: i, onSelectTableStyleName: l, disabled: u, disabledQuickKey: p = !1, usePreviewIcon: h = !1, groupKey: b, ...S } = e, T = c(), A = s([r])[0], j = A?.getContext(), M = j?.styles, N = M?.(), P = i ?? j?.table?.() ?? null, F = "insertTable";
|
|
314
|
+
P && (F = "editTable");
|
|
315
|
+
let I = m(() => ((e, t) => new n({
|
|
316
|
+
size: {
|
|
317
|
+
width: 5,
|
|
318
|
+
height: 5
|
|
319
|
+
},
|
|
320
|
+
styles: t,
|
|
321
|
+
json: {
|
|
322
|
+
name: "PreviewTable",
|
|
323
|
+
description: "PreviewTable",
|
|
324
|
+
headerRowCount: 1,
|
|
325
|
+
totalsRowCount: 0,
|
|
326
|
+
style: e
|
|
327
|
+
}
|
|
328
|
+
}))(P?.getStyleOptions(), N), [N?.getTableStyles().getDefault(), P?.getStyleOptions()]), L = P ?? I, [R, z] = _(L);
|
|
329
|
+
f(() => {
|
|
330
|
+
z(L);
|
|
331
|
+
}, [L]);
|
|
332
|
+
let B = o((e) => {
|
|
333
|
+
l?.(e), A?.execute({ name: e });
|
|
334
|
+
}, [A, l]), H = g(null), U = d((e) => {
|
|
335
|
+
let t = {
|
|
336
|
+
onSelectTableStyleName: B,
|
|
337
|
+
styles: N
|
|
338
|
+
};
|
|
339
|
+
H.current ||= document.createElement("canvas");
|
|
340
|
+
let n = (e) => {
|
|
341
|
+
if (!e) return null;
|
|
342
|
+
let n = N?.getTableStyles().getByName(e);
|
|
343
|
+
return n ? D(V, {
|
|
344
|
+
table: R,
|
|
345
|
+
tableStyle: n,
|
|
346
|
+
selectedTableStyleName: R.getStyleOptions().name,
|
|
347
|
+
canvas: H.current,
|
|
348
|
+
...t
|
|
349
|
+
}, e) : null;
|
|
350
|
+
}, r = (e, t, r = !0) => {
|
|
351
|
+
let i = [];
|
|
352
|
+
for (let e = 0; e < t.length; e++) {
|
|
353
|
+
let r = n(t[e]);
|
|
354
|
+
r && i.push(r);
|
|
355
|
+
}
|
|
356
|
+
return i.length === 0 ? null : O(k, { children: [
|
|
357
|
+
r ? D(x, { orientation: "horizontal" }) : null,
|
|
358
|
+
D(C, { children: e }, e + "-header"),
|
|
359
|
+
D(k, {
|
|
360
|
+
sx: {
|
|
361
|
+
display: "flex",
|
|
362
|
+
gap: "2px",
|
|
363
|
+
marginBottom: "6px",
|
|
364
|
+
flexWrap: "wrap",
|
|
365
|
+
width: "481px",
|
|
366
|
+
maxWidth: "100%"
|
|
367
|
+
},
|
|
368
|
+
children: i
|
|
369
|
+
}, e + "-presets")
|
|
370
|
+
] }, e);
|
|
371
|
+
}, i = [], o = N?.getTableStyles().getItems({ type: "custom" }), s = [], c = o ? o.length : 0;
|
|
372
|
+
if (c > 0) {
|
|
373
|
+
for (let e = 0; e < c; e++) {
|
|
374
|
+
let t = o[e];
|
|
375
|
+
t.isShownInTableStyles() && s.push(t.getName());
|
|
376
|
+
}
|
|
377
|
+
i.push(r(T("tableStyle.category.custom"), s, !1));
|
|
378
|
+
}
|
|
379
|
+
let l = [];
|
|
380
|
+
P && !P.getStyleOptions().name && l.push(null);
|
|
381
|
+
for (let e = 0; e < 21; e++) l.push("TableStyleLight" + (e + 1));
|
|
382
|
+
i.push(r(T("tableStyle.category.light"), l, s.length > 0));
|
|
383
|
+
let d = [];
|
|
384
|
+
for (let e = 0; e < 28; e++) d.push("TableStyleMedium" + (e + 1));
|
|
385
|
+
i.push(r(T("tableStyle.category.medium"), d));
|
|
386
|
+
let f = [];
|
|
387
|
+
for (let e = 0; e < 11; e++) f.push("TableStyleDark" + (e + 1));
|
|
388
|
+
i.push(r(T("tableStyle.category.dark"), f));
|
|
389
|
+
let p = null;
|
|
390
|
+
return P && (p = O(E, { children: [D(x, { orientation: "horizontal" }), D(v, {
|
|
391
|
+
variant: a.Menuitem,
|
|
392
|
+
commandKey: "formatTableStyleClearTableStyle",
|
|
393
|
+
disabled: u
|
|
394
|
+
})] })), O(k, {
|
|
395
|
+
sx: {
|
|
396
|
+
display: "flex",
|
|
397
|
+
flexDirection: "column",
|
|
398
|
+
maxWidth: "100%",
|
|
399
|
+
paddingTop: (e) => `${e.shape.borderRadius}px`,
|
|
400
|
+
paddingBottom: (e) => `${e.shape.borderRadius}px`
|
|
401
|
+
},
|
|
402
|
+
children: [D(k, {
|
|
403
|
+
onContextMenu: () => {},
|
|
404
|
+
sx: {
|
|
405
|
+
display: "flex",
|
|
406
|
+
flexDirection: "column",
|
|
407
|
+
padding: "6px 16px"
|
|
408
|
+
},
|
|
409
|
+
children: i
|
|
410
|
+
}), p]
|
|
411
|
+
});
|
|
412
|
+
}, [
|
|
413
|
+
N,
|
|
414
|
+
N?.getTheme(),
|
|
415
|
+
R,
|
|
416
|
+
T
|
|
417
|
+
]), W = u ?? (!A || A.disabled()), G = m(() => {
|
|
418
|
+
if (!j || !h) return A?.getIcon();
|
|
419
|
+
}, [
|
|
420
|
+
R,
|
|
421
|
+
W,
|
|
422
|
+
A
|
|
423
|
+
]);
|
|
424
|
+
return D(y, {
|
|
425
|
+
ref: t,
|
|
426
|
+
quickCommand: p ? void 0 : F,
|
|
427
|
+
renderPopupPanel: U,
|
|
428
|
+
label: A?.getLabel(b),
|
|
429
|
+
groupKey: b,
|
|
430
|
+
commandState: P,
|
|
431
|
+
renderTooltip: ({ children: e, disabled: t }) => D(w, {
|
|
432
|
+
label: A?.getLabel(),
|
|
433
|
+
description: A?.getDescription(),
|
|
434
|
+
disabled: t,
|
|
435
|
+
children: e
|
|
436
|
+
}),
|
|
437
|
+
disabled: W,
|
|
438
|
+
icon: G,
|
|
439
|
+
...S
|
|
440
|
+
});
|
|
441
|
+
}));
|
|
442
|
+
export { M as a, N as i, B as n, F as r, H as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. -
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v1.0.0
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
-
* License:
|
|
5
|
+
* License: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { n as e, t } from "./
|
|
7
|
+
import { n as e, t } from "./w5dY32V2IxkbDBsT.mjs";
|
|
8
8
|
import { FunctionArgIcons as n, FunctionPreviewContent as r, FunctionSignature as i, NamedItemLabel as a, argTypeKey as o, assembleCall as s, createFunctionDescriptor as c, createFunctionHint as l, formatEvalValue as u, toArgRows as d, useWorkbook as f } from "@sheetxl/react";
|
|
9
9
|
import { DynamicIcon as p, KeyCodes as m, useCallbackRef as h, useTranslator as ee } from "@sheetxl/utils-react";
|
|
10
10
|
import { memo as g, useEffect as _, useId as te, useMemo as v, useRef as y, useState as b } from "react";
|
|
@@ -328,7 +328,7 @@ var j = g((r) => {
|
|
|
328
328
|
});
|
|
329
329
|
}, [K]);
|
|
330
330
|
_(() => {
|
|
331
|
-
let e = D ? D.
|
|
331
|
+
let e = D ? D.getSelectedWorksheet()?.getCalculation() ?? D.getCalculation() : null, t = U.some((e, t) => !e.optional && !O[t]?.trim());
|
|
332
332
|
if (!e || t || U.length > 0 && !O.some((e) => e?.trim())) return K(-1), void F(null);
|
|
333
333
|
let n = K(-1);
|
|
334
334
|
(async () => {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v1.0.0
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
import { InputField as e } from "./index.mjs";
|
|
8
|
+
import { memo as t, useRef as n } from "react";
|
|
9
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
10
|
+
import { Box as a, Typography as o } from "@mui/material";
|
|
11
|
+
var s = (e, t, n) => () => {
|
|
12
|
+
t === e && n();
|
|
13
|
+
}, c = t((t) => {
|
|
14
|
+
let { label: i, value: a, min: o, max: s, step: c = 1, decimals: l = !1, width: u, disabled: d, onChange: f } = t, p = n(null), m = (e) => Math.max(o, Math.min(s, e)), h = (e) => {
|
|
15
|
+
let t = l ? parseFloat(e) : parseInt(e, 10);
|
|
16
|
+
return Number.isNaN(t) ? null : m(t);
|
|
17
|
+
};
|
|
18
|
+
return r(e, {
|
|
19
|
+
label: i,
|
|
20
|
+
value: String(a),
|
|
21
|
+
disabled: d,
|
|
22
|
+
hideAdornment: !0,
|
|
23
|
+
helperText: null,
|
|
24
|
+
propsInput: {
|
|
25
|
+
type: "number",
|
|
26
|
+
min: o,
|
|
27
|
+
max: s,
|
|
28
|
+
step: c
|
|
29
|
+
},
|
|
30
|
+
sx: {
|
|
31
|
+
width: u,
|
|
32
|
+
minWidth: 0,
|
|
33
|
+
"& input": { textAlign: "right" }
|
|
34
|
+
},
|
|
35
|
+
onChangeInput: (e) => {
|
|
36
|
+
let t = h(e);
|
|
37
|
+
t !== null && (p.current = t, f(t));
|
|
38
|
+
},
|
|
39
|
+
onDone: (e) => {
|
|
40
|
+
let t = h(e) ?? m(0), n = p.current;
|
|
41
|
+
p.current = null, n !== t && f(t);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
c.displayName = "FormatNumberField";
|
|
46
|
+
var l = {
|
|
47
|
+
display: "flex",
|
|
48
|
+
flexDirection: "column",
|
|
49
|
+
gap: 1.5,
|
|
50
|
+
minWidth: 0
|
|
51
|
+
}, u = t((e) => {
|
|
52
|
+
let { label: t, children: n, sx: s, ...c } = e;
|
|
53
|
+
return i(a, {
|
|
54
|
+
sx: {
|
|
55
|
+
display: "flex",
|
|
56
|
+
flexDirection: "column",
|
|
57
|
+
gap: .75,
|
|
58
|
+
minWidth: 0,
|
|
59
|
+
...s
|
|
60
|
+
},
|
|
61
|
+
...c,
|
|
62
|
+
children: [t ? r(o, {
|
|
63
|
+
variant: "caption",
|
|
64
|
+
component: "div",
|
|
65
|
+
sx: {
|
|
66
|
+
color: "text.secondary",
|
|
67
|
+
lineHeight: 1.4
|
|
68
|
+
},
|
|
69
|
+
children: t
|
|
70
|
+
}) : null, n]
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
u.displayName = "FormatSection";
|
|
74
|
+
var d = t((e) => {
|
|
75
|
+
let { children: t, sx: n, ...i } = e;
|
|
76
|
+
return r(a, {
|
|
77
|
+
sx: {
|
|
78
|
+
display: "flex",
|
|
79
|
+
flexWrap: "wrap",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
gap: 1,
|
|
82
|
+
minWidth: 0,
|
|
83
|
+
...n
|
|
84
|
+
},
|
|
85
|
+
...i,
|
|
86
|
+
children: t
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
d.displayName = "FormatRow";
|
|
90
|
+
var f = t((e) => {
|
|
91
|
+
let { children: t, sx: n, ...i } = e;
|
|
92
|
+
return r(a, {
|
|
93
|
+
sx: {
|
|
94
|
+
display: "flex",
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
gap: .25,
|
|
97
|
+
flexWrap: "wrap",
|
|
98
|
+
minWidth: 0,
|
|
99
|
+
...n
|
|
100
|
+
},
|
|
101
|
+
...i,
|
|
102
|
+
children: t
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
f.displayName = "FormatButtonGroup";
|
|
106
|
+
export { s as a, u as i, c as n, l as o, d as r, f as t };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v1.0.0
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: MIT
|
|
6
|
+
*/
|
|
7
|
+
import { IBorders as e } from "@sheetxl/sdk";
|
|
8
|
+
import { StaticBorderRenderer as t } from "@sheetxl/react";
|
|
9
|
+
import { DynamicIcon as n, useDevicePixelRatio as r, useMeasure as i } from "@sheetxl/utils-react";
|
|
10
|
+
import { strokeShadowFilter as a } from "@sheetxl/utils-mui";
|
|
11
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
12
|
+
import { Box as l } from "@mui/material";
|
|
13
|
+
var u = (u) => {
|
|
14
|
+
let { border: d, createBorder: m } = u, [h, { width: g, height: _ }] = i(), v = r(), y = {}, b = d ? Object.keys(d) : [], x = b.length;
|
|
15
|
+
for (let t = 0; t < x; t++) {
|
|
16
|
+
let n = b[t], r = d?.[n];
|
|
17
|
+
r?.style && r.style !== e.StrokeStyle.None && (y[n] = {
|
|
18
|
+
style: r.style,
|
|
19
|
+
color: r.color
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
let S = Object.keys(y).length > 0, C = Math.min(g, _), w = C > 0 ? p(C, v) : null, T = "";
|
|
23
|
+
if (w) {
|
|
24
|
+
let { start: e, span: t, dot: n } = w, r = (e, t) => t === 0 && !!y.top || t === 2 && !!y.horizontal || t === 4 && !!y.bottom || e === 0 && !!y.left || e === 2 && !!y.vertical || e === 4 && !!y.right || e === t && !!y.diagonalDown || e + t === 4 && !!y.diagonalUp, i = n / v, a = i / 2;
|
|
25
|
+
for (let n = 0; n < 5; n++) for (let o = 0; o < 5; o++) o % 2 != 0 && n % 2 != 0 || r(o, n) || (T += `M ${(e + o * t / 4 + .5) / v - a},${(e + n * t / 4 + .5) / v - a} h ${i} v ${i} h ${-i} Z `);
|
|
26
|
+
}
|
|
27
|
+
return c(n, { children: [" ", s(l, {
|
|
28
|
+
ref: h,
|
|
29
|
+
className: "border-icon",
|
|
30
|
+
sx: {
|
|
31
|
+
width: "var(--icon-size, var(--icon-size-md))",
|
|
32
|
+
height: "var(--icon-size, var(--icon-size-md))",
|
|
33
|
+
position: "relative",
|
|
34
|
+
"& .grid > path": {
|
|
35
|
+
fill: (e) => e.palette.text.secondary,
|
|
36
|
+
opacity: "0.7"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
children: w ? c(o, { children: [s("svg", {
|
|
40
|
+
viewBox: `0 0 ${C} ${C}`,
|
|
41
|
+
className: "grid",
|
|
42
|
+
style: {
|
|
43
|
+
top: "0px",
|
|
44
|
+
left: "0px",
|
|
45
|
+
width: `${C}px`,
|
|
46
|
+
height: `${C}px`,
|
|
47
|
+
position: "absolute",
|
|
48
|
+
overflow: "visible"
|
|
49
|
+
},
|
|
50
|
+
children: s("path", {
|
|
51
|
+
className: "fill",
|
|
52
|
+
d: T
|
|
53
|
+
})
|
|
54
|
+
}), s(l, {
|
|
55
|
+
className: "border-container",
|
|
56
|
+
sx: {
|
|
57
|
+
position: "absolute",
|
|
58
|
+
top: "0px",
|
|
59
|
+
left: "0px",
|
|
60
|
+
width: `${C}px`,
|
|
61
|
+
height: `${C}px`,
|
|
62
|
+
"& svg path": { filter: a }
|
|
63
|
+
},
|
|
64
|
+
children: s(t, {
|
|
65
|
+
getBorderAt: (e, t) => {
|
|
66
|
+
if (!m || !S) return null;
|
|
67
|
+
let n = {
|
|
68
|
+
diagonalUp: y.diagonalUp,
|
|
69
|
+
diagonalDown: y.diagonalDown
|
|
70
|
+
};
|
|
71
|
+
return e.rowIndex === 0 ? (n.top = y.top, n.bottom = y.horizontal) : (n.top = y.horizontal, n.bottom = y.bottom), e.colIndex === 0 ? (n.left = y.left, n.right = y.vertical) : (n.left = y.vertical, n.right = y.right), m(n);
|
|
72
|
+
},
|
|
73
|
+
getMergeAt: f,
|
|
74
|
+
width: w.span / v,
|
|
75
|
+
height: w.span / v,
|
|
76
|
+
style: {
|
|
77
|
+
top: w.start / v + "px",
|
|
78
|
+
left: w.start / v + "px",
|
|
79
|
+
width: w.span / v + "px",
|
|
80
|
+
height: w.span / v + "px",
|
|
81
|
+
position: "absolute"
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
})] }) : null
|
|
85
|
+
})] });
|
|
86
|
+
};
|
|
87
|
+
u.displayName = "BorderTemplateIcon";
|
|
88
|
+
var d = Object.freeze({
|
|
89
|
+
rowStart: 0,
|
|
90
|
+
colStart: 0,
|
|
91
|
+
rowEnd: 1,
|
|
92
|
+
colEnd: 1
|
|
93
|
+
}), f = () => d, p = (e, t) => {
|
|
94
|
+
let n = Math.floor(e * t), r = Math.max(1, Math.round(t));
|
|
95
|
+
r % 2 == 0 && r++;
|
|
96
|
+
let i = Math.max(1, (r - 1) / 2), a = 4 * Math.floor((n - 2 * i - 1) / 4);
|
|
97
|
+
return a < 4 ? null : {
|
|
98
|
+
start: Math.floor((n - a - 1) / 2),
|
|
99
|
+
span: a,
|
|
100
|
+
dot: r
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export { u as t };
|