@sheetxl/studio-mui 0.8.0-beta.1 → 0.8.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/0BWO0bLZ8Vm_dKd2.mjs +582 -0
- package/browser/esm/BAbq4-I5f5oUiNaF.mjs +141 -0
- package/browser/esm/BED6h6YAwCf1HEQJ.mjs +161 -0
- package/browser/esm/{DMLXV4EKl1NCp_jk.mjs → BXhNFzyEGokTF-BL.mjs} +2 -2
- package/browser/esm/BYE9gCDWKyx6mnVs.mjs +381 -0
- package/browser/esm/BjvD_4t2KGsZP5V8.mjs +71 -0
- package/browser/esm/{zWTZ8BvT4hjgC2ua.mjs → BknfGJouygmnpFIU.mjs} +13 -12
- package/browser/esm/{DNDrQKMTzKzNMjl-.mjs → BlE_8o8tO2AgAlaj.mjs} +19 -17
- package/browser/esm/BokqKEpU6TFgfRs6.mjs +252 -0
- package/browser/esm/{BoLxSRdEWt-Yg2RI.mjs → Brsh5yscJ_4uKFXp.mjs} +130 -103
- package/browser/esm/Bujtz_Guj88d03vI.mjs +831 -0
- package/browser/esm/Buqcl7J75MJrhpVE.mjs +1379 -0
- package/browser/esm/BvhYPwX3GrRaO9CM.mjs +319 -0
- package/browser/esm/C0wlMAIn9iREPK6w.mjs +87 -0
- package/browser/esm/C8JU4KsMasmLvojI.mjs +103 -0
- package/browser/esm/C9pIZVACtl9unFOp.mjs +77 -0
- package/browser/esm/CBD4RiRKbbZtSXV-.mjs +318 -0
- package/browser/esm/CEtXsBzEjEKk9GOj.mjs +117 -0
- package/browser/esm/{BZBJG2tDdD3-VujP.mjs → COlZu93LRwuBvjE-.mjs} +195 -174
- package/browser/esm/{Cj2pgCNqBCGl4rTX.mjs → CTjqDD-swFMZzI-Y.mjs} +587 -556
- package/browser/esm/CWkOgdL7mOKiTR62.mjs +975 -0
- package/browser/esm/ChSVxkPTIjgcC8PL.mjs +412 -0
- package/browser/esm/{Cd6n1XUgF0VItpkH.mjs → ClBvNPeNCAhuVWrG.mjs} +7 -5
- package/browser/esm/CyLn6zOOp_biA3xU.mjs +335 -0
- package/browser/esm/CynTY0oNtyJnoaBq.mjs +14 -0
- package/browser/esm/D3rRUK4dIM5gUSmj.mjs +256 -0
- package/browser/esm/D9ISy7VkaRRFJl46.mjs +515 -0
- package/browser/esm/DDc6rDuU9JAo1DH_.mjs +225 -0
- package/browser/esm/DDczwkXhz_MHub4z.mjs +197 -0
- package/browser/esm/{3ydDykDMtDYbfVVn.mjs → DEv4pIEgYr5C7etm.mjs} +178 -129
- package/browser/esm/DG21x7RKDpge6zAE.mjs +31 -0
- package/browser/esm/DJOOed_OtB-XT7f3.mjs +437 -0
- package/browser/esm/{Bz5LiUe3SZ8g42Ia.mjs → DKtJxrpN0axtuQ0l.mjs} +1 -1
- package/browser/esm/DRSCS6aLiYmPjUz1.mjs +1543 -0
- package/browser/esm/{ChwS_ougBsogOEsP.mjs → DTpRkgsTm_zYnWfW.mjs} +46 -47
- package/browser/esm/DV6i9RQZfJiKtEaJ.mjs +2552 -0
- package/browser/esm/DdcZrjMLWVukWcU5.mjs +7473 -0
- package/browser/esm/Di3BUxA0SqFWWgeg.mjs +94 -0
- package/browser/esm/DnGaP5F7mLwCGUYG.mjs +408 -0
- package/browser/esm/DpD4fg2WcyiKX_2K.mjs +414 -0
- package/browser/esm/{BUGepznywvV0tUjW.mjs → Ds3XRkne7HxcXD8J.mjs} +2 -2
- package/browser/esm/DsoNMWDwHZP8UXQd.mjs +293 -0
- package/browser/esm/G0Inqm6Eqw47dMpa.mjs +212 -0
- package/browser/esm/HViD4Wfoi0mmqk9w.mjs +13 -0
- package/browser/esm/LZoYSQAYV2wksnDv.mjs +386 -0
- package/browser/esm/{rU8xNPVQtDSnujM-.mjs → QgaAIDUMmBQBsXP9.mjs} +3 -3
- package/browser/esm/YThnrg3PadGs7B4j.mjs +627 -0
- package/browser/esm/index.mjs +1208 -67
- package/browser/esm/ttjcNHcFn8O6hfnd.mjs +1288 -0
- package/browser/esm/w_JrR69vEpvoyeMy.mjs +68 -0
- package/browser/esm/{CVfuCNRpODUw04IH.mjs → xFqkfN8QMCxvsetB.mjs} +1 -1
- package/browser/esm/zqilJefihVd7At2T.mjs +517 -0
- package/licenses/dependencies.txt +96 -349
- package/node/esm/1bf4gn-2vld4BZ9u.mjs +294 -0
- package/node/esm/{BhqI3pQFkV8K_612.mjs → 3WghtBXAvCDwcVrq.mjs} +1 -1
- package/node/esm/4HmLH0bPVJCZLgik.mjs +116 -0
- package/node/esm/{DM7K7-284z-PczVz.mjs → B0bdb_6p7fQI_ivo.mjs} +28 -28
- package/node/esm/BIMkjQUwG4Ih-6Sh.mjs +142 -0
- package/node/esm/BNg4QQY0WAPLE0q7.mjs +141 -0
- package/node/esm/BPzcW4BejRqso338.mjs +72 -0
- package/node/esm/BR45ogAR-hY2bE60.mjs +318 -0
- package/node/esm/BlN7G0DVC24zauig.mjs +197 -0
- package/node/esm/Bph-sR3l6AYWeuxK.mjs +256 -0
- package/node/esm/CPq-MIdEnc-53JpF.mjs +319 -0
- package/node/esm/CSAnTp5rwId0DUb8.mjs +380 -0
- package/node/esm/CWcv7UVXF8IUB0PC.mjs +1379 -0
- package/node/esm/{BA7VzUQ2sKRLTZ5c.mjs → CYIoK22I6Yvv12_x.mjs} +20 -20
- package/node/esm/CZyA9uD4SkTvqp_G.mjs +1283 -0
- package/node/esm/{CHi3AuWEwEPOg9IZ.mjs → CjC6s3RUJQNCF7mP.mjs} +1 -1
- package/node/esm/{DXZrzWee8K5FPOW1.mjs → CuMePia6i_8yfJ6S.mjs} +9 -9
- package/node/esm/CvRbu8JPxFarsSR-.mjs +412 -0
- package/node/esm/CyafafEgfmjLqE5O.mjs +521 -0
- package/node/esm/D-xqQ5qOSd6WrzwJ.mjs +94 -0
- package/node/esm/DLqBHdFp6wvm6EGs.mjs +212 -0
- package/node/esm/{BwZcoHDBmLPIVOT5.mjs → DMXLxp3T0E0SRTQc.mjs} +69 -70
- package/node/esm/{CUMKTjYv6VTkcWYi.mjs → DWqvf4H5F2wMnZ0L.mjs} +32 -30
- package/node/esm/DatM6eEYPpAtIMy-.mjs +405 -0
- package/node/esm/Db3dbaYLKUO66T9s.mjs +1689 -0
- package/node/esm/DdEzhVqYTrGODXrz.mjs +68 -0
- package/node/esm/DeZJlLk8WJ3BLtLs.mjs +975 -0
- package/node/esm/DfCuL8AUxMFoEG2s.mjs +519 -0
- package/node/esm/Do-zCKziWhoG5eAv.mjs +77 -0
- package/node/esm/DpJ2gmZJioCyq8La.mjs +632 -0
- package/node/esm/{Qpuqm6xBr_da38Ht.mjs → XEDcegsv5AGKBfu2.mjs} +165 -137
- package/node/esm/index.mjs +10124 -6751
- package/node/esm/yCUxQuqVuC4DHKPx.mjs +385 -0
- package/node/esm/zITjZ7R4raDqhP-n.mjs +515 -0
- package/package.json +15 -18
- package/resources/locales/de/groups.cmd.json +29 -16
- package/resources/locales/de/studio.cmd.json +18 -1
- package/resources/locales/de/ui.msg.json +447 -40
- package/resources/locales/en/groups.cmd.json +39 -17
- package/resources/locales/en/studio.cmd.json +18 -1
- package/resources/locales/en/ui.msg.json +403 -40
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +21 -5
- package/types/src/anchorItems/AnchorItemsPanel.d.ts +14 -0
- package/types/src/anchorItems/AnchoredRangeField.d.ts +40 -0
- package/types/src/anchorItems/index.d.ts +1 -0
- package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
- package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
- package/types/src/anomalies/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +6 -6
- package/types/src/border/BorderStylePopupButton.d.ts +3 -3
- package/types/src/border/BorderTemplateIcon.d.ts +29 -0
- package/types/src/border/index.d.ts +1 -0
- 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/ColorPanel.d.ts +8 -2
- package/types/src/color/ColorPopupButton.d.ts +2 -1
- package/types/src/command/NumberFormatQuickButtons.d.ts +32 -0
- package/types/src/command/PresetCellStylesCommandButton.d.ts +3 -3
- package/types/src/command/SheetZoomCommandButton.d.ts +4 -3
- 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/ConditionalFormatStylePicker.d.ts +4 -4
- package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +2 -2
- package/types/src/conditionalFormat/IconSetRulePanel.d.ts +1 -1
- package/types/src/conditions/BetweenOption.d.ts +6 -1
- package/types/src/conditions/CombinatorOption.d.ts +7 -0
- package/types/src/conditions/ConditionEditor.d.ts +61 -4
- package/types/src/conditions/ConditionUtils.d.ts +65 -6
- package/types/src/conditions/ExpressionOption.d.ts +12 -6
- package/types/src/conditions/MembershipOption.d.ts +67 -0
- package/types/src/conditions/OperatorAndParamEditor.d.ts +36 -1
- package/types/src/conditions/ScalarOption.d.ts +25 -6
- 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 +54 -0
- package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +7 -1
- package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -2
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +13 -2
- package/types/src/dataValidation/DataValidationIcon.d.ts +22 -0
- package/types/src/dataValidation/DataValidationTitle.d.ts +13 -0
- package/types/src/dialog/FillSeriesDialog.d.ts +16 -0
- package/types/src/dialog/OutlineSettingsDialog.d.ts +12 -0
- package/types/src/dialog/TableNewDialog.d.ts +1 -4
- 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 -2
- package/types/src/externalLink/ExternalLinkCardBody.d.ts +9 -0
- package/types/src/externalLink/ExternalLinkChip.d.ts +18 -0
- package/types/src/externalLink/ExternalLinkLocation.d.ts +18 -0
- package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +18 -0
- package/types/src/externalLink/ExternalLinksPanel.d.ts +11 -0
- package/types/src/externalLink/ExternalLinksPlugin.d.ts +5 -0
- package/types/src/externalLink/ExternalLinksTaskPane.d.ts +19 -0
- package/types/src/externalLink/index.d.ts +8 -0
- package/types/src/fill/GradientEditor.d.ts +41 -0
- package/types/src/fill/GradientStopsBar.d.ts +43 -0
- package/types/src/fill/PatternPopupButton.d.ts +26 -0
- package/types/src/fill/PatternSwatch.d.ts +53 -0
- package/types/src/fill/index.d.ts +5 -0
- package/types/src/filter/ColumnMenu.d.ts +31 -1
- package/types/src/filter/index.d.ts +0 -1
- package/types/src/form/FormulaField.d.ts +35 -6
- package/types/src/form/InputField.d.ts +35 -5
- package/types/src/format/AlignmentPanel.d.ts +13 -0
- package/types/src/format/BorderPanel.d.ts +22 -0
- package/types/src/format/BorderPreview.d.ts +101 -0
- package/types/src/format/FillPanel.d.ts +65 -0
- package/types/src/format/FontPanel.d.ts +12 -0
- package/types/src/format/FormatCellPreview.d.ts +35 -0
- package/types/src/format/FormatPanelParts.d.ts +85 -0
- package/types/src/format/FormatPlugin.d.ts +11 -0
- package/types/src/format/FormatTaskPane.d.ts +39 -0
- package/types/src/format/LinePanel.d.ts +53 -0
- package/types/src/format/LinePreviews.d.ts +71 -0
- package/types/src/format/NumberFormatOption.d.ts +43 -0
- package/types/src/{numberFormat → format}/NumberFormatPanel.d.ts +20 -0
- package/types/src/format/index.d.ts +14 -0
- package/types/src/format/useFormatSelection.d.ts +93 -0
- package/types/src/formulaBar/IFormulaBar.d.ts +11 -0
- package/types/src/formulaBar/MobileFormulaBar.d.ts +33 -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 -4
- package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
- package/types/src/itemsPanel/EditorPanel.d.ts +4 -1
- package/types/src/itemsPanel/ItemCard.d.ts +60 -8
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +68 -19
- package/types/src/itemsPanel/ItemsPanel.d.ts +9 -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 +9 -2
- package/types/src/named/NamedDetailsTaskPane.d.ts +3 -2
- package/types/src/named/NamedEditorPanel.d.ts +1 -1
- package/types/src/named/NamedExpressionField.d.ts +32 -0
- package/types/src/named/NamedKindChip.d.ts +38 -0
- package/types/src/picture/PicturePlugin.d.ts +6 -0
- package/types/src/picture/index.d.ts +2 -0
- package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +6 -0
- package/types/src/protectedRange/ProtectedRangeDraft.d.ts +22 -0
- package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +0 -14
- package/types/src/protectedRange/index.d.ts +2 -1
- package/types/src/protection/ManageProtectionTaskPane.d.ts +29 -0
- package/types/src/protection/PasswordDialog.d.ts +32 -0
- package/types/src/protection/PasswordField.d.ts +35 -0
- package/types/src/protection/ProtectedCellsPanel.d.ts +20 -0
- package/types/src/protection/ProtectionPlugin.d.ts +11 -0
- package/types/src/protection/WorkbookProtectionPanel.d.ts +34 -15
- package/types/src/protection/WorkbookProtectionTab.d.ts +22 -0
- package/types/src/protection/WorksheetProtectionPanel.d.ts +35 -0
- package/types/src/protection/index.d.ts +7 -1
- package/types/src/shape/InsertShapeCommandButton.d.ts +20 -0
- package/types/src/shape/ShapeFormatPanel.d.ts +11 -0
- package/types/src/shape/ShapePlugin.d.ts +6 -0
- package/types/src/shape/index.d.ts +3 -0
- package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +18 -0
- package/types/src/slicer/SlicerPlugin.d.ts +6 -0
- package/types/src/slicer/index.d.ts +3 -0
- package/types/src/statusBar/SheetZoomScale.d.ts +6 -0
- package/types/src/studio/CommandsWrapper.d.ts +5 -0
- package/types/src/studio/EagerStudio.d.ts +14 -1
- package/types/src/studio/StudioCommandProvider.d.ts +10 -0
- package/types/src/studio/StudioCommands.d.ts +40 -4
- package/types/src/studio/StudioProps.d.ts +64 -2
- package/types/src/studio/StudioSplitPane.d.ts +1 -1
- package/types/src/studio/formulaBarPlacement.d.ts +35 -0
- package/types/src/studio/splitStudioProps.d.ts +7 -0
- package/types/src/studio/useStudioApp.d.ts +31 -18
- package/types/src/template/TemplateCommands.d.ts +29 -0
- package/types/src/template/TemplateDialog.d.ts +19 -0
- package/types/src/template/TemplatePanel.d.ts +50 -0
- package/types/src/template/TemplateSearchField.d.ts +29 -0
- package/types/src/template/WelcomeDialog.d.ts +29 -0
- package/types/src/template/categoryColor.d.ts +8 -0
- package/types/src/template/index.d.ts +3 -0
- package/types/src/template/useTemplateCatalog.d.ts +71 -0
- package/types/src/toolbar/WorkbookToolbars.d.ts +1 -1
- package/types/src/workbook/DefaultRenderers.d.ts +16 -2
- package/types/src/workbook/FillMenu.d.ts +21 -0
- 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 +1 -1
- package/types/src/workbook/index.d.ts +1 -0
- package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
- package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
- package/browser/cjs/B_D3JKseVvpRyX-E.cjs +0 -1
- package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +0 -2
- package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +0 -2
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/Bte6P3MhSjajJmmY.cjs +0 -7
- package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
- package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +0 -1
- package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
- package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
- package/browser/cjs/CYxc8vnRi8dNpDPk.cjs +0 -1
- package/browser/cjs/CZm1jVZaHQ246prW.cjs +0 -1
- package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
- package/browser/cjs/Cm1APq2MraYNNhyI.cjs +0 -1
- package/browser/cjs/DO8V31Z1ewgMA1di.cjs +0 -5
- package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +0 -1
- package/browser/cjs/IASAYG6qgv7lJY7y.cjs +0 -1
- package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
- package/browser/cjs/UnMhi28mbvLiOXQe.cjs +0 -1
- package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +0 -1
- package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
- package/browser/cjs/index.cjs +0 -2
- package/browser/cjs/w2GjebPlOFv3pCbm.cjs +0 -1
- package/browser/cjs/z0rB4fK6X1M6PpVD.cjs +0 -11
- package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +0 -1
- package/browser/esm/BuY3uV47Bwbqpasq.mjs +0 -219
- package/browser/esm/CAs1MWvJTcRfJy26.mjs +0 -217
- package/browser/esm/CBU3LgLYmqtQjJbu.mjs +0 -1150
- package/browser/esm/CDU0rqpLNVtMLI-f.mjs +0 -52
- package/browser/esm/CVBub6pgTsJzCc5m.mjs +0 -5429
- package/browser/esm/C_XvSsQ9BVdHffCO.mjs +0 -47
- package/browser/esm/FT29q8yNwsEpVZjt.mjs +0 -9257
- package/browser/esm/Hb1rlHT4tE5hLcjM.mjs +0 -82
- package/browser/esm/UJOXCQv6KrG1gY3l.mjs +0 -105
- package/browser/esm/s46El7mT6oKLSnYB.mjs +0 -411
- package/node/esm/9FY82fj1R1c-AczW.mjs +0 -47
- package/node/esm/C-boHCnJditFzng3.mjs +0 -106
- package/node/esm/DxXM8qHi0Oz4Zovl.mjs +0 -4575
- package/node/esm/sQt2wWGTRLzqeJdG.mjs +0 -82
- package/node/esm/yCHAZKxJR7qY_ySy.mjs +0 -470
- package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +0 -32
- package/types/src/conditions/DateTimeOption.d.ts +0 -43
- package/types/src/conditions/InSetOption.d.ts +0 -37
- package/types/src/dialog/CommentsDialog.d.ts +0 -11
- package/types/src/dialog/NumberFormatDialog.d.ts +0 -12
- package/types/src/filter/FilterList.d.ts +0 -28
- package/types/src/numberFormat/NumberFormatTaskPane.d.ts +0 -12
- package/types/src/numberFormat/index.d.ts +0 -8
- package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +0 -3
- package/types/src/protectedRange/ProtectedRangePlugin.d.ts +0 -2
- package/types/src/protection/WorkbookProtectionDialog.d.ts +0 -23
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { RemoveListener } from '@sheetxl/utils';
|
|
2
|
-
import { IWorkbook } from '@sheetxl/sdk';
|
|
2
|
+
import { IWorkbook, IWorkbookIO } from '@sheetxl/sdk';
|
|
3
3
|
import { Command, IReactNotifier, ThemeMode } from '@sheetxl/utils-react';
|
|
4
|
-
import { WorkbookInput } from '@sheetxl/react';
|
|
4
|
+
import { WorkbookInput, ActivateFrameOptions } from '@sheetxl/react';
|
|
5
|
+
import { StudioSaveOptions } from './StudioProps';
|
|
5
6
|
/**
|
|
6
7
|
* A port of the **studio**-level commands (`useStudioCommands`) — file I/O, theme,
|
|
7
8
|
* help. This is the **placeholder** for the studio slice of the port; only the help/shortcuts family
|
|
@@ -25,7 +26,7 @@ export interface ContributeStudioCommandsHandlers {
|
|
|
25
26
|
* the {@link Command.CommandContribution} handle, so `contribution.remove()` tears it down.
|
|
26
27
|
*/
|
|
27
28
|
export declare function contributeStudioCommands(contribution: Command.CommandContribution, handlers: ContributeStudioCommandsHandlers): void;
|
|
28
|
-
/** The resolved appearance state the bridge threads in (from `
|
|
29
|
+
/** The resolved appearance state the bridge threads in (from `usePersistentState` + theme hooks). */
|
|
29
30
|
export interface StudioAppearanceState {
|
|
30
31
|
/** The persisted mode override (`null` = follow system). */
|
|
31
32
|
mode: ThemeMode | null;
|
|
@@ -42,7 +43,7 @@ export interface StudioAppearanceState {
|
|
|
42
43
|
/**
|
|
43
44
|
* Contribute the studio **appearance** toggles — light/dark mode, system-default, dark-grid, dark-images.
|
|
44
45
|
* Their `state`/`label`/`icon` are dynamic, so this re-runs when the appearance state changes (the bridge
|
|
45
|
-
* owns the `
|
|
46
|
+
* owns the `usePersistentState` and re-invokes on change). Ported from `useStudioCommands` L569-600.
|
|
46
47
|
*/
|
|
47
48
|
export declare function contributeStudioAppearance(contribution: Command.CommandContribution, s: StudioAppearanceState): void;
|
|
48
49
|
/** The UI-language state the bridge threads in (from `DefaultLanguagePackService`). */
|
|
@@ -74,6 +75,34 @@ export interface StudioFullScreenState {
|
|
|
74
75
|
* disallows fullscreen, so the bridge re-runs this on change.
|
|
75
76
|
*/
|
|
76
77
|
export declare function contributeStudioFullScreen(contribution: Command.CommandContribution, s: StudioFullScreenState): void;
|
|
78
|
+
/**
|
|
79
|
+
* Protect Workbook: BOTH protections behind one entry, deliberately.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* Excel splits them by storage mechanism - encryption is the file container, structure is XML inside
|
|
83
|
+
* the package - and so puts them in unrelated parts of its UI. That is an implementation detail
|
|
84
|
+
* deciding menu placement, and it reliably leads people to believe "Protect Workbook" encrypts.
|
|
85
|
+
* Grouped by intent here, labelled by effect in the panel.
|
|
86
|
+
*
|
|
87
|
+
* The command now OPENS the Workbook tab of Manage Protection rather than a dialog of its own; the
|
|
88
|
+
* key and the File-menu entry stay exactly where they were. Contributed here, and not with the file
|
|
89
|
+
* commands, because it is neither io nor a workbook mutation - it is a pane opener that happens to
|
|
90
|
+
* carry a studio-catalog key.
|
|
91
|
+
*/
|
|
92
|
+
export declare function contributeStudioProtection(contribution: Command.CommandContribution, activateTaskPane: (key: string, options?: ActivateFrameOptions) => void): void;
|
|
93
|
+
/** What `openWorkbookFromUrl` accepts in place of a bare URL. */
|
|
94
|
+
export interface OpenWorkbookFromUrlArgs {
|
|
95
|
+
url: string;
|
|
96
|
+
/** The name to give the opened workbook. Defaults to the URL's file name. */
|
|
97
|
+
title?: string;
|
|
98
|
+
}
|
|
99
|
+
/** What `newWorkbook` accepts to start from an existing workbook rather than a blank one. */
|
|
100
|
+
export interface NewWorkbookArgs {
|
|
101
|
+
/** The URL of the workbook to start from. */
|
|
102
|
+
source?: string;
|
|
103
|
+
/** The name to give the new workbook. Defaults to the source's file name. */
|
|
104
|
+
title?: string;
|
|
105
|
+
}
|
|
77
106
|
/**
|
|
78
107
|
* The studio **app-shell** dependencies the file-I/O commands need — threaded from `CommandsWrapper` via
|
|
79
108
|
* `StudioCommandProvider` (they live in the studio shell, not the workbook model).
|
|
@@ -95,6 +124,13 @@ export interface StudioIODeps {
|
|
|
95
124
|
isDirty: () => boolean;
|
|
96
125
|
/** Busy / error / confirm UI. */
|
|
97
126
|
notifier: IReactNotifier;
|
|
127
|
+
/**
|
|
128
|
+
* Receives the studio's Save while the backing store can write, and `null` otherwise — what
|
|
129
|
+
* {@link IStudioAttributes.save} runs.
|
|
130
|
+
*/
|
|
131
|
+
refSave?: {
|
|
132
|
+
current: ((options?: StudioSaveOptions) => Promise<IWorkbookIO.Origin | null>) | null;
|
|
133
|
+
};
|
|
98
134
|
}
|
|
99
135
|
/**
|
|
100
136
|
* Contribute the studio **file-I/O** commands (the "studio slog", Batch 3) — `newWorkbook` /
|
|
@@ -6,7 +6,7 @@ import { TaskPaneAreaProps, ITaskPaneAreaElement, IWorkbookElement, WorkbookElem
|
|
|
6
6
|
import { ExplicitTokens } from '../theme/ThemeUtils';
|
|
7
7
|
import { DocumentTitleProps } from '../workbook';
|
|
8
8
|
import { WorkbookToolbarsProps } from '../toolbar';
|
|
9
|
-
import { FormulaBarProps, IFormulaBarElement } from '../formulaBar';
|
|
9
|
+
import { FormulaBarProps, IFormulaBarElement, FormulaBarPlacement } from '../formulaBar';
|
|
10
10
|
import { StatusBarProps } from '../statusBar';
|
|
11
11
|
/**
|
|
12
12
|
* Properties for the Studio component.
|
|
@@ -137,6 +137,32 @@ export interface StudioProps extends Omit<PaperProps, 'autoFocus' | 'ref'> {
|
|
|
137
137
|
* Render a custom formula bar (replaces the default).
|
|
138
138
|
*/
|
|
139
139
|
renderFormulaBar?: (props: FormulaBarProps) => React.ReactElement;
|
|
140
|
+
/**
|
|
141
|
+
* Where the formula bar sits: above the grid, or below it directly above the status bar, the way
|
|
142
|
+
* a phone spreadsheet lays it out.
|
|
143
|
+
*
|
|
144
|
+
* @defaultValue `'auto'` — `'bottom'` on a device whose primary pointer is a finger (a phone, a
|
|
145
|
+
* tablet), `'top'` everywhere else, including on the server.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* `'auto'` reads the device's primary pointer once, not the live input: a tablet that gets a mouse
|
|
149
|
+
* plugged in keeps its bar where it is. Force a value to develop the phone layout under device
|
|
150
|
+
* emulation, or when the host knows better than the device test.
|
|
151
|
+
*/
|
|
152
|
+
formulaBarPlacement?: FormulaBarPlacement | 'auto';
|
|
153
|
+
/**
|
|
154
|
+
* Whether the studio sizes itself to the visual viewport while the formula bar is at the bottom,
|
|
155
|
+
* so the bar stays above the virtual keyboard.
|
|
156
|
+
*
|
|
157
|
+
* @defaultValue `true`
|
|
158
|
+
*
|
|
159
|
+
* @remarks
|
|
160
|
+
* iOS Safari does not shrink the page for the keyboard; it scrolls the focused field into view
|
|
161
|
+
* instead. The studio undoes that: it takes the visual viewport's height, pins itself to the
|
|
162
|
+
* visual viewport's offset and scrolls the page back to the top after each keyboard change.
|
|
163
|
+
* A host page that already manages the keyboard turns this off. Ignored while the bar is at the top.
|
|
164
|
+
*/
|
|
165
|
+
manageVisualViewport?: boolean;
|
|
140
166
|
/**
|
|
141
167
|
* The shared cell editor. Supply a stable {@link SheetEditable} to drive the grid and
|
|
142
168
|
* formula bar through one instance (free two-way sync); omit to let the studio auto-create one.
|
|
@@ -197,7 +223,7 @@ export interface StudioProps extends Omit<PaperProps, 'autoFocus' | 'ref'> {
|
|
|
197
223
|
* @remarks
|
|
198
224
|
* This is *config*, not state. Light/dark **mode** and the dark-grid/dark-image toggles are self-managed by
|
|
199
225
|
* Studio as persisted preferences (see {@link @sheetxl/react!ThemeStateKey}), driven by the surrounding
|
|
200
|
-
* `
|
|
226
|
+
* `PersistentStateProvider` — not by props. A wrapping `TokenThemeProvider` layers token overrides on top.
|
|
201
227
|
*/
|
|
202
228
|
muiTheme?: ThemeOptions;
|
|
203
229
|
/**
|
|
@@ -249,6 +275,16 @@ export interface StudioProps extends Omit<PaperProps, 'autoFocus' | 'ref'> {
|
|
|
249
275
|
* This will only be used the first time.
|
|
250
276
|
*/
|
|
251
277
|
licenseKey?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Whether features are loaded ahead of use once the studio is showing, so their first use does
|
|
280
|
+
* not wait on the network; see {@link WorkbookElementProps.prefetch}.
|
|
281
|
+
*
|
|
282
|
+
* @remarks
|
|
283
|
+
* The script editor and its compiler are always loaded on first use.
|
|
284
|
+
*
|
|
285
|
+
* @defaultValue 'auto'
|
|
286
|
+
*/
|
|
287
|
+
prefetch?: boolean | 'auto';
|
|
252
288
|
/**
|
|
253
289
|
* MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/}
|
|
254
290
|
*/
|
|
@@ -281,11 +317,37 @@ export type WorkbookLoadState = {
|
|
|
281
317
|
* {@link IWorkbookElement} rather than being one — reach the chrome-free grid via
|
|
282
318
|
* {@link IStudioAttributes.getWorkbookElement}.
|
|
283
319
|
*/
|
|
320
|
+
/**
|
|
321
|
+
* Options for {@link IStudioAttributes.save}.
|
|
322
|
+
*/
|
|
323
|
+
export interface StudioSaveOptions {
|
|
324
|
+
/**
|
|
325
|
+
* Decides on a write that would lose something, in place of the studio's own dialog.
|
|
326
|
+
*
|
|
327
|
+
* @remarks
|
|
328
|
+
* For a host that cannot show the studio right now — an editor tab in the background, saved by
|
|
329
|
+
* the host's "Save All" — and so asks the user its own way. Omitted, the studio shows its dialog.
|
|
330
|
+
*/
|
|
331
|
+
onWarnings?: IWorkbookIO.WriteOptions['onWarnings'];
|
|
332
|
+
}
|
|
284
333
|
export interface IStudioAttributes {
|
|
285
334
|
/**
|
|
286
335
|
* For runtime type checking.
|
|
287
336
|
*/
|
|
288
337
|
isStudioElement: () => true;
|
|
338
|
+
/**
|
|
339
|
+
* Saves the workbook exactly as the studio's own Save does — back to its origin, or asking where
|
|
340
|
+
* when it has none — including the studio's dialog when the write would lose something.
|
|
341
|
+
*
|
|
342
|
+
* @returns The origin written, or `null` when the save was cancelled (a dismissed picker, a
|
|
343
|
+
* declined lossy write).
|
|
344
|
+
*
|
|
345
|
+
* @remarks
|
|
346
|
+
* For a host that owns the save gesture (a VS Code extension's native Save) and needs the studio's
|
|
347
|
+
* behavior plus the outcome. A failure rejects with the error rather than showing it, so the host
|
|
348
|
+
* can report it its own way. Rejects when the active backing store cannot write.
|
|
349
|
+
*/
|
|
350
|
+
save(options?: StudioSaveOptions): Promise<IWorkbookIO.Origin | null>;
|
|
289
351
|
/**
|
|
290
352
|
* Retrieve the chrome-free workbook grid element contained by this studio.
|
|
291
353
|
*
|
|
@@ -29,7 +29,7 @@ export interface StudioSplitPaneProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
29
29
|
*/
|
|
30
30
|
position?: number | string | Partial<Record<SplitPaneLayoutKey, number>>;
|
|
31
31
|
/**
|
|
32
|
-
* When set, the split position is self-managed and persisted under this key (via `
|
|
32
|
+
* When set, the split position is self-managed and persisted under this key (via `usePersistentState`
|
|
33
33
|
* against the surrounding persistence store) as a per-slot map. The resized position of each layout slot
|
|
34
34
|
* (horizontal vs vertical split, and eventually before/after side) is remembered independently. Any slot
|
|
35
35
|
* not yet resized is seeded from {@link position}; {@link onPositionChange} still fires if provided.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ReactUtils } from '@sheetxl/utils-react';
|
|
3
|
+
import { FormulaBarPlacement } from '../formulaBar';
|
|
4
|
+
/** What `detect-it` reports the device's primary pointer to be. */
|
|
5
|
+
type PrimaryInput = ReturnType<typeof ReactUtils.detectIt>['primaryInput'];
|
|
6
|
+
/**
|
|
7
|
+
* Resolve the studio's `formulaBarPlacement` prop to an edge.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* `'auto'` (or an omitted prop) follows the primary pointer `detect-it` measured at module load: a
|
|
11
|
+
* device whose primary pointer is a finger (`pointer: coarse`) gets the bar below the grid, everything
|
|
12
|
+
* else above. That is a static fact, not the live input modality, so the bar never jumps when a
|
|
13
|
+
* tablet gains a mouse. It is deliberately not `deviceType === 'touchOnly'`: a phone that advertises
|
|
14
|
+
* any fine pointer at all (an S Pen, a paired mouse, a screen-mirroring bridge) reports `hybrid`
|
|
15
|
+
* while its primary pointer is still a finger. The server has no device and resolves to `'top'`.
|
|
16
|
+
* `primaryInput` is a parameter so the rule can be exercised without the device.
|
|
17
|
+
*/
|
|
18
|
+
export declare const resolveFormulaBarPlacement: (placement: FormulaBarPlacement | "auto" | undefined, primaryInput?: PrimaryInput) => FormulaBarPlacement;
|
|
19
|
+
/** The studio chrome, top to bottom, before the formula bar's slot is decided. */
|
|
20
|
+
export interface StudioChromeParts {
|
|
21
|
+
toolbar: React.ReactNode;
|
|
22
|
+
formulaBar: React.ReactNode;
|
|
23
|
+
/** The grid and its task-pane split. */
|
|
24
|
+
main: React.ReactNode;
|
|
25
|
+
statusBar: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The studio's flex-column children in render order: the formula bar sits under the toolbar, or at
|
|
29
|
+
* the very bottom under the status bar when placed at the bottom, so on a phone the entry area and
|
|
30
|
+
* its input toolbar sit directly on the keyboard. The studio, not the status bar, draws the line
|
|
31
|
+
* between the two. The elements themselves are untouched.
|
|
32
|
+
*/
|
|
33
|
+
export declare const orderStudioChrome: (placement: FormulaBarPlacement, parts: StudioChromeParts) => React.ReactNode[];
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=formulaBarPlacement.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StudioProps } from './StudioProps';
|
|
3
|
+
/**
|
|
4
|
+
* Splits props into those the studio consumes and those for its root element.
|
|
5
|
+
*/
|
|
6
|
+
export declare const splitStudioProps: <P extends Partial<StudioProps>>(props: P) => [studioProps: Partial<StudioProps>, elementProps: React.HTMLAttributes<HTMLDivElement>];
|
|
7
|
+
//# sourceMappingURL=splitStudioProps.d.ts.map
|
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
import { IWorkbook, IWorkbookIO } from '@sheetxl/sdk';
|
|
2
|
-
import { WindowChromeOptions } from '@sheetxl/react';
|
|
2
|
+
import { WindowChromeOptions, WorkbookLoadEvent } from '@sheetxl/react';
|
|
3
|
+
import { StudioProps } from './StudioProps';
|
|
3
4
|
/**
|
|
4
5
|
* What the studio should open. An {@link IWorkbook} / `Promise` / {@link IWorkbookIO.ReadOptions} /
|
|
5
6
|
* source string. When omitted, the `?source` (and `?title`) URL query is used, else a blank
|
|
6
7
|
* workbook is created.
|
|
7
8
|
*/
|
|
8
9
|
export type StudioAppSource = IWorkbook | Promise<IWorkbook> | IWorkbookIO.ReadOptions | string;
|
|
9
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Options for {@link useStudioApp}: the app's own (what to open, the startup dialog, the window chrome)
|
|
12
|
+
* plus **any `Studio` prop**, passed through to the returned props — so the hook's result is the whole
|
|
13
|
+
* `<Studio>` spread. `workbook` is spelled {@link StudioAppOptions.source} here, since the app's source
|
|
14
|
+
* may also be a string.
|
|
15
|
+
*/
|
|
16
|
+
export interface StudioAppOptions extends WindowChromeOptions, Omit<StudioProps, 'workbook'> {
|
|
10
17
|
/**
|
|
11
18
|
* What to open. If omitted, the `?source` / `?title` URL query is read, else a blank workbook is
|
|
12
19
|
* created. See {@link StudioAppSource}.
|
|
13
20
|
*/
|
|
14
21
|
source?: StudioAppSource;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
/**
|
|
23
|
+
* What to show when the app starts with no source. `'welcome'` opens the welcome dialog (start
|
|
24
|
+
* blank, open a workbook, or pick a template) over the blank workbook.
|
|
25
|
+
* @defaultValue nothing; the blank workbook is shown
|
|
26
|
+
*/
|
|
27
|
+
startWith?: 'welcome';
|
|
28
|
+
/**
|
|
29
|
+
* The template catalog the welcome and "Choose a template" dialogs show: a URL serving
|
|
30
|
+
* `templates-workbook/contents.json`. Use it to pin a version or to serve your own templates.
|
|
31
|
+
* @defaultValue the latest published `@sheetxl/templates-workbook`
|
|
32
|
+
*/
|
|
33
|
+
templatePath?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The app's own `onWorkbookLoad` handler, run after the startup dialog. (The hook also chains your
|
|
36
|
+
* `onWorkbookChange` / `onDirtyChange`, which it needs for the window chrome.)
|
|
37
|
+
*/
|
|
38
|
+
onWorkbookLoad?: (event: WorkbookLoadEvent) => void | Promise<void>;
|
|
26
39
|
}
|
|
27
40
|
/**
|
|
28
41
|
* Single-call setup for a single-per-window **Studio** app: resolves what to open (an explicit
|
|
@@ -30,9 +43,9 @@ export interface StudioAppProps {
|
|
|
30
43
|
* window chrome — document/tab title (with an unsaved `●` marker), an unsaved-changes close prompt,
|
|
31
44
|
* and a browser keyboard guard.
|
|
32
45
|
*
|
|
33
|
-
* @returns
|
|
34
|
-
* `onWorkbookChange` / `onDirtyChange` callbacks the studio fires as
|
|
35
|
-
* so the chrome follows.
|
|
46
|
+
* @returns the `<Studio>` props: every `Studio` prop given in `options`, plus `workbook` (the value to
|
|
47
|
+
* open) and the `onWorkbookChange` / `onDirtyChange` / `onWorkbookLoad` callbacks the studio fires as
|
|
48
|
+
* it opens/replaces workbooks, so the chrome follows (yours are chained after the hook's).
|
|
36
49
|
*
|
|
37
50
|
* @remarks
|
|
38
51
|
* Studio owns the workbook lifecycle (resolve, Open/replace, save, dirty tracking) and reports the
|
|
@@ -43,9 +56,9 @@ export interface StudioAppProps {
|
|
|
43
56
|
*
|
|
44
57
|
* @example
|
|
45
58
|
* ```tsx
|
|
46
|
-
* const studioApp = useStudioApp(); // reads ?source, else a blank workbook
|
|
59
|
+
* const studioApp = useStudioApp({ startWith: 'welcome', propsWorkbook: { … } }); // reads ?source, else a blank workbook
|
|
47
60
|
* return <Studio {...studioApp} />;
|
|
48
61
|
* ```
|
|
49
62
|
*/
|
|
50
|
-
export declare const useStudioApp: (options?: StudioAppOptions) =>
|
|
63
|
+
export declare const useStudioApp: (options?: StudioAppOptions) => StudioProps;
|
|
51
64
|
//# sourceMappingURL=useStudioApp.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load the welcome dialog and its catalog while the first workbook loads, so a welcome shown at
|
|
3
|
+
* startup opens with the workbook rather than after it.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare const prefetchWelcome: (templatePath?: string) => void;
|
|
8
|
+
/** The argument `newWorkbookFromTemplate` and `showWelcome` accept. */
|
|
9
|
+
export interface TemplateDialogArgs {
|
|
10
|
+
/**
|
|
11
|
+
* The template catalog to show. Remembered for later dialogs, so a host passes it once.
|
|
12
|
+
* Defaults to the published SheetXL templates.
|
|
13
|
+
*/
|
|
14
|
+
templatePath?: string;
|
|
15
|
+
/**
|
|
16
|
+
* `showWelcome` only: the app is starting. The welcome is skipped when the user has unchecked
|
|
17
|
+
* "Show at startup".
|
|
18
|
+
*/
|
|
19
|
+
atStartup?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Registers the workbook templates feature: the template commands on the `app` scope and a
|
|
23
|
+
* "From Template…" entry in the New menu. Idempotent.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* The studio registers it by default. The command labels live in the studio catalog.
|
|
27
|
+
*/
|
|
28
|
+
export declare const TemplatesPlugin: () => void;
|
|
29
|
+
//# sourceMappingURL=TemplateCommands.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InternalWindowProps } from '@sheetxl/utils-mui';
|
|
3
|
+
import { TemplateEntry } from './useTemplateCatalog';
|
|
4
|
+
export interface TemplateDialogProps extends InternalWindowProps {
|
|
5
|
+
/** The catalog to show. Defaults to the published SheetXL templates. */
|
|
6
|
+
templatePath?: string;
|
|
7
|
+
/** Called when a template is chosen. */
|
|
8
|
+
onSelectTemplate?: (entry: TemplateEntry) => void;
|
|
9
|
+
/** Whether "Show at startup" is checked. Omit to hide the checkbox. */
|
|
10
|
+
showAtStartup?: boolean;
|
|
11
|
+
/** Called when "Show at startup" is toggled. */
|
|
12
|
+
onShowAtStartupChange?: (show: boolean) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* "Choose a template": the template gallery with a search that can be limited to categories.
|
|
16
|
+
*/
|
|
17
|
+
declare const TemplateDialog: React.FC<TemplateDialogProps>;
|
|
18
|
+
export default TemplateDialog;
|
|
19
|
+
//# sourceMappingURL=TemplateDialog.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/system';
|
|
3
|
+
import { TemplateCatalog, TemplateCategory, TemplateEntry } from './useTemplateCatalog';
|
|
4
|
+
export interface TemplatePanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
5
|
+
/** The catalog to show, from {@link useTemplateCatalog}. */
|
|
6
|
+
catalog: TemplateCatalog;
|
|
7
|
+
/** Called when a template is chosen. */
|
|
8
|
+
onSelect?: (entry: TemplateEntry) => void;
|
|
9
|
+
/** Show only the entries that pass. */
|
|
10
|
+
filter?: (entry: TemplateEntry) => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Group the tiles under headings. Returns the group key for an entry; groups are shown in the
|
|
13
|
+
* order of `categories` when the keys are category ids, else in first-seen order.
|
|
14
|
+
*/
|
|
15
|
+
groupBy?: (entry: TemplateEntry) => string;
|
|
16
|
+
/** Render a tile in place of the default one. */
|
|
17
|
+
renderTile?: (entry: TemplateEntry, props: TemplateTileProps) => React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* The smallest tile width, in pixels.
|
|
20
|
+
* @defaultValue 180
|
|
21
|
+
*/
|
|
22
|
+
tileMinWidth?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Shown when no entry passes the filter.
|
|
25
|
+
* @defaultValue "No templates here yet."
|
|
26
|
+
*/
|
|
27
|
+
emptyLabel?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Hold the panel at this many rows of tiles however many pass the filter; the rest scroll. A host
|
|
30
|
+
* short of room may shrink it, but not below one row.
|
|
31
|
+
* Unset, the panel is as tall as its content.
|
|
32
|
+
*/
|
|
33
|
+
visibleRows?: number;
|
|
34
|
+
/** MUI SX props {@link https://mui.com/system/getting-started/the-sx-prop/} */
|
|
35
|
+
sx?: SxProps<Theme>;
|
|
36
|
+
}
|
|
37
|
+
/** What the panel hands a tile. */
|
|
38
|
+
export interface TemplateTileProps {
|
|
39
|
+
category?: TemplateCategory;
|
|
40
|
+
onSelect: () => void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A gallery of workbook templates.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* Knows nothing about dialogs; a host decides what choosing a template does. Arrow keys move
|
|
47
|
+
* between tiles and Enter opens one.
|
|
48
|
+
*/
|
|
49
|
+
export declare const TemplatePanel: React.NamedExoticComponent<TemplatePanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
+
//# sourceMappingURL=TemplatePanel.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/system';
|
|
3
|
+
import { TemplateCategory, TemplateEntry } from './useTemplateCatalog';
|
|
4
|
+
/** Whether an entry matches a search: its title, description, tags or category title. */
|
|
5
|
+
export declare const matchesTemplateQuery: (entry: TemplateEntry, query: string, category?: TemplateCategory) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* The gallery filter for a search: entries in any of `categoryIds` (all categories when empty) that
|
|
8
|
+
* match `query`. `undefined` when nothing is filtered.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useTemplateFilter: (categories: readonly TemplateCategory[], query: string, categoryIds: readonly string[]) => ((entry: TemplateEntry) => boolean) | undefined;
|
|
11
|
+
export interface TemplateSearchFieldProps {
|
|
12
|
+
value: string;
|
|
13
|
+
onChange: (value: string) => void;
|
|
14
|
+
/** The categories offered as filters. With fewer than two, the field is a plain search. */
|
|
15
|
+
categories?: readonly TemplateCategory[];
|
|
16
|
+
/** The ids of the categories the search is limited to. Empty is every category. */
|
|
17
|
+
categoryIds?: readonly string[];
|
|
18
|
+
onCategoryIdsChange?: (categoryIds: string[]) => void;
|
|
19
|
+
sx?: SxProps<Theme>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The template search box. Same shape as the task panes' search fields.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Given categories, the search icon opens a list of them. A chosen category shows as a chip in the
|
|
26
|
+
* field and limits the search to it; with several chosen, an entry in any of them is shown.
|
|
27
|
+
*/
|
|
28
|
+
export declare const TemplateSearchField: (props: TemplateSearchFieldProps) => React.ReactElement;
|
|
29
|
+
//# sourceMappingURL=TemplateSearchField.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InternalWindowProps } from '@sheetxl/utils-mui';
|
|
3
|
+
import { TemplateEntry } from './useTemplateCatalog';
|
|
4
|
+
export interface WelcomeDialogProps extends InternalWindowProps {
|
|
5
|
+
/** The catalog to show. Defaults to the published SheetXL templates. */
|
|
6
|
+
templatePath?: string;
|
|
7
|
+
/** Shown at the top of the rail. Defaults to the SheetXL logo. */
|
|
8
|
+
logo?: React.ReactNode;
|
|
9
|
+
/** Keep the blank workbook. */
|
|
10
|
+
onBlank?: () => void;
|
|
11
|
+
/** Open a workbook from the device. */
|
|
12
|
+
onOpenFromDevice?: () => void;
|
|
13
|
+
/** Open a workbook from a web address. Omit to hide the entry. */
|
|
14
|
+
onOpenFromWeb?: () => void;
|
|
15
|
+
/** Called when a template is chosen. */
|
|
16
|
+
onSelectTemplate?: (entry: TemplateEntry) => void;
|
|
17
|
+
/** Whether "Show at startup" is checked. Omit to hide the checkbox. */
|
|
18
|
+
showAtStartup?: boolean;
|
|
19
|
+
/** Called when "Show at startup" is toggled. */
|
|
20
|
+
onShowAtStartupChange?: (show: boolean) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The startup surface: a rail of ways to begin (blank, open) beside the template gallery.
|
|
24
|
+
*/
|
|
25
|
+
declare const WelcomeDialog: React.FC<WelcomeDialogProps>;
|
|
26
|
+
/** @internal Fetch the catalog the dialog will show, ahead of showing it. */
|
|
27
|
+
export declare const prefetchCatalog: (templatePath?: string) => void;
|
|
28
|
+
export default WelcomeDialog;
|
|
29
|
+
//# sourceMappingURL=WelcomeDialog.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Theme } from '@mui/system';
|
|
2
|
+
import { TemplateCategory } from './useTemplateCatalog';
|
|
3
|
+
/** The category's color and the black or white that reads on it, for the theme in use. */
|
|
4
|
+
export declare const resolveCategoryColor: (category: TemplateCategory | undefined, theme: Theme) => {
|
|
5
|
+
fill: string;
|
|
6
|
+
text: string;
|
|
7
|
+
} | null;
|
|
8
|
+
//# sourceMappingURL=categoryColor.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ResourceIndex } from '@sheetxl/utils';
|
|
2
|
+
/**
|
|
3
|
+
* Where the template catalog is read from when no `templatePath` is given: the published
|
|
4
|
+
* `@sheetxl/templates-workbook` for this build's release channel.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEFAULT_TEMPLATE_PATH: string;
|
|
7
|
+
/** A group of templates. Each category is a folder in the catalog. */
|
|
8
|
+
export interface TemplateCategory {
|
|
9
|
+
/** The folder name. Entries refer to their category by this id. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** The display title. */
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
/** A CSS color for the light theme. The dark theme shows it inverted. */
|
|
16
|
+
color?: string;
|
|
17
|
+
}
|
|
18
|
+
/** One template in a catalog. */
|
|
19
|
+
export interface TemplateEntry {
|
|
20
|
+
/** The template's path within the catalog (`finance/invoice.xlsx`). Stable across renames of its title. */
|
|
21
|
+
id: string;
|
|
22
|
+
/** The display title. Also used as the name of the opened workbook. */
|
|
23
|
+
title: string;
|
|
24
|
+
/** The id of the {@link TemplateCategory} it belongs to. */
|
|
25
|
+
category: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
tags?: string[];
|
|
28
|
+
/** A preview image, when the catalog has one. */
|
|
29
|
+
thumbnailUrl?: string;
|
|
30
|
+
/** The preview on the dark grid, when the catalog has one. */
|
|
31
|
+
thumbnailDarkUrl?: string;
|
|
32
|
+
/** The workbook to open. */
|
|
33
|
+
sourceUrl: string;
|
|
34
|
+
}
|
|
35
|
+
/** The loaded state of a template catalog. */
|
|
36
|
+
export interface TemplateCatalog {
|
|
37
|
+
status: 'loading' | 'ready' | 'error';
|
|
38
|
+
/** The categories, in the catalog's display order. */
|
|
39
|
+
categories: TemplateCategory[];
|
|
40
|
+
entries: TemplateEntry[];
|
|
41
|
+
error?: unknown;
|
|
42
|
+
/** Fetch the catalog again, for use after an error. */
|
|
43
|
+
retry: () => void;
|
|
44
|
+
}
|
|
45
|
+
export interface TemplateCatalogOptions {
|
|
46
|
+
/**
|
|
47
|
+
* The catalog to read: a URL that serves `templates-workbook/contents.json`. Use it to pin a
|
|
48
|
+
* version (`https://unpkg.com/@sheetxl/templates-workbook@1.4.0/dist`) or to serve your own.
|
|
49
|
+
* @defaultValue {@link DEFAULT_TEMPLATE_PATH}
|
|
50
|
+
*/
|
|
51
|
+
path?: string;
|
|
52
|
+
}
|
|
53
|
+
type LoadedCatalog = Pick<TemplateCatalog, 'categories' | 'entries'>;
|
|
54
|
+
/**
|
|
55
|
+
* Map a catalog's resource index to categories and entries, with asset URLs resolved against
|
|
56
|
+
* `path`. Exported for tests.
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare const toTemplateCatalog: (index: ResourceIndex, path: string) => LoadedCatalog;
|
|
61
|
+
/** @internal Fetch a catalog ahead of the gallery that shows it. Shared with {@link useTemplateCatalog}. */
|
|
62
|
+
export declare const loadCatalog: (path?: string) => Promise<LoadedCatalog>;
|
|
63
|
+
/**
|
|
64
|
+
* Load a workbook template catalog.
|
|
65
|
+
*
|
|
66
|
+
* @remarks
|
|
67
|
+
* The catalog is fetched once per `path` and shared by every caller.
|
|
68
|
+
*/
|
|
69
|
+
export declare const useTemplateCatalog: (options?: TemplateCatalogOptions) => TemplateCatalog;
|
|
70
|
+
export {};
|
|
71
|
+
//# sourceMappingURL=useTemplateCatalog.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
3
|
import { PaperProps, ToolbarProps } from '@mui/material';
|
|
4
4
|
/**
|
|
5
|
-
* Fallback tab list used only when the {@link
|
|
5
|
+
* Fallback tab list used only when the {@link WORKBOOK_TOOLBARS_KEY} strip panel is not registered (a bare
|
|
6
6
|
* host that never called `registerWorkbookCommandGroups`). Normally the strip's members ARE the config.
|
|
7
7
|
*/
|
|
8
8
|
export declare const DefaultWorkbookToolbars: readonly string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WorksheetElementProps, SheetTabProps, CommentCardRenderProps, HyperlinkCardRenderProps, TableToolbarRenderProps, OutlineButtonProps, OutlineLevelButtonProps } from '@sheetxl/react';
|
|
3
3
|
import { AnimatedLoadingPanelProps, StackTraceErrorPanelProps } from '@sheetxl/utils-mui';
|
|
4
4
|
import { FormulaBarProps } from '../formulaBar';
|
|
5
5
|
import { ColumnMenuProps } from '../filter';
|
|
@@ -8,13 +8,27 @@ import { MovableContextMenuProps } from '../movable';
|
|
|
8
8
|
import { SheetsAllMenuProps, SheetTabMenuProps } from '../sheet';
|
|
9
9
|
import { WorkbookStripProps } from './WorkbookStrip';
|
|
10
10
|
import { WorkbookContextMenuProps } from './WorkbookContextMenu';
|
|
11
|
+
import { FillMenuProps } from './FillMenu';
|
|
12
|
+
/** The card of a threaded comment as it floats beside its cell. */
|
|
13
|
+
export declare const renderCommentCard: (props: CommentCardRenderProps) => React.ReactElement;
|
|
14
|
+
export declare const renderHyperlinkCard: (props: HyperlinkCardRenderProps) => React.ReactElement;
|
|
15
|
+
export declare const renderTableToolbar: (props: TableToolbarRenderProps) => React.ReactElement;
|
|
16
|
+
/** The collapse / expand button of a row or column group, in the outline gutter. */
|
|
17
|
+
export declare const renderOutlineButton: (props: OutlineButtonProps) => React.ReactElement;
|
|
18
|
+
/** A level button `1`..`n` of the outline. */
|
|
19
|
+
export declare const renderOutlineLevelButton: (props: OutlineLevelButtonProps) => React.ReactElement;
|
|
11
20
|
export declare const renderMovableContextMenu: (props: MovableContextMenuProps) => React.ReactElement;
|
|
21
|
+
export declare const renderFillMenu: (props: FillMenuProps) => React.ReactElement;
|
|
12
22
|
export declare const renderWorkbookContextMenu: (props: WorkbookContextMenuProps) => React.ReactElement;
|
|
13
23
|
export declare const renderColumnMenu: (props: ColumnMenuProps) => React.ReactElement;
|
|
24
|
+
/**
|
|
25
|
+
* The formula bar for the studio's placement: the desktop bar above the grid, the mobile host when
|
|
26
|
+
* the bar sits at the bottom.
|
|
27
|
+
*/
|
|
14
28
|
export declare const renderWorkbookFormulaBar: (props: FormulaBarProps) => React.ReactElement;
|
|
15
29
|
export declare const renderWorkbookLoading: (props: AnimatedLoadingPanelProps) => React.ReactElement;
|
|
16
30
|
export declare const renderWorkbookError: (props: StackTraceErrorPanelProps) => React.ReactElement;
|
|
17
|
-
export declare const
|
|
31
|
+
export declare const renderWorkbookWorksheet: (props: WorksheetElementProps) => React.ReactElement;
|
|
18
32
|
export declare const renderWorkbookStatusBar: (props: StatusBarProps) => React.ReactElement;
|
|
19
33
|
export declare const renderWorkbookStrip: (props: WorkbookStripProps) => React.ReactElement;
|
|
20
34
|
export declare const renderWorkbookStripContextMenu: (props: SheetTabMenuProps) => React.ReactElement;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
3
|
+
import { FloatReference } from '@sheetxl/utils-react';
|
|
4
|
+
import { CommandContext } from '@sheetxl/react';
|
|
5
|
+
export interface FillMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/** The workbook the drag happened in. */
|
|
7
|
+
workbook: IWorkbook;
|
|
8
|
+
/** What the drag offers and runs — see {@link CommandContext.FillMenu}. */
|
|
9
|
+
menu: CommandContext.FillMenu;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
floatReference: FloatReference;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Excel's fill menu — what a right-drag of the fill handle offers on release.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Presentation only: the entries and their order live here, their labels are the shared preset
|
|
18
|
+
* labels, and everything else (which apply, what an entry does) is the context's.
|
|
19
|
+
*/
|
|
20
|
+
export declare const FillMenu: React.NamedExoticComponent<FillMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
//# sourceMappingURL=FillMenu.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OutlineButtonProps, OutlineLevelButtonProps } from '@sheetxl/react';
|
|
3
|
+
/**
|
|
4
|
+
* The studio's collapse / expand button for a row or column group.
|
|
5
|
+
*/
|
|
6
|
+
export declare const OutlineButton: (props: OutlineButtonProps) => React.ReactElement;
|
|
7
|
+
/**
|
|
8
|
+
* The studio's level button `1`..`n`: the collapse button's hover, in the corner knob's colors.
|
|
9
|
+
*/
|
|
10
|
+
export declare const OutlineLevelButton: (props: OutlineLevelButtonProps) => React.ReactElement;
|
|
11
|
+
//# sourceMappingURL=OutlineButtons.d.ts.map
|