@sheetxl/studio-mui 0.7.27 → 0.7.28-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/browser/cjs/BQJKf40kttQWOzLw.cjs +20 -0
- package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +1 -0
- package/browser/cjs/B_D3JKseVvpRyX-E.cjs +1 -0
- package/browser/cjs/B_WyRpeiesnEiNP4.cjs +11 -0
- package/browser/cjs/BeKpqOx8It0RD0Rf.cjs +2 -0
- package/browser/cjs/Bj-EvSYeDfqmU0V6.cjs +2 -0
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +1 -0
- package/browser/cjs/ByIEqNsvj52sihT9.cjs +5 -0
- package/browser/cjs/C3moehR3VOd0LnmM.cjs +1 -0
- package/browser/cjs/C97KHSuikAbr1qVM.cjs +1 -0
- package/browser/cjs/CJLwX_A3y3TQUmzj.cjs +1 -0
- package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +1 -0
- package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +1 -0
- package/browser/cjs/CZm1jVZaHQ246prW.cjs +1 -0
- package/browser/cjs/CdDYyAfccXme8w6m.cjs +1 -0
- package/browser/cjs/DBJLJGiCGXesx5n6.cjs +1 -0
- package/browser/cjs/DLScL5AOXhHu9O9H.cjs +7 -0
- package/browser/cjs/Djsiad0Qha1Y-YaS.cjs +1 -0
- package/browser/cjs/IASAYG6qgv7lJY7y.cjs +1 -0
- package/browser/cjs/KZvriGbhEOVkQD0b.cjs +1 -0
- package/browser/cjs/UnMhi28mbvLiOXQe.cjs +1 -0
- package/browser/cjs/Vbigo0kFP3PFfmeA.cjs +1 -0
- package/browser/cjs/iMWEL01eC83oU-YY.cjs +1 -0
- package/browser/cjs/index.cjs +2 -7
- package/browser/cjs/w2GjebPlOFv3pCbm.cjs +1 -0
- package/browser/cjs/zQsyZpeXAvcVXJMs.cjs +1 -0
- package/browser/esm/BFnJuOSao7TjbB-2.mjs +1150 -0
- package/browser/esm/BGngIqHYTFzsezh-.mjs +105 -0
- package/browser/esm/BH0fLaa4Vfda2U-T.mjs +155 -0
- package/browser/esm/BKadOi_4tf3UqilJ.mjs +8878 -0
- package/browser/esm/BNhUUeacBwGsPLBQ.mjs +42 -0
- package/browser/esm/BkP8c-zrLAqdNL5E.mjs +82 -0
- package/browser/esm/BlykPulAqes3JMee.mjs +1376 -0
- package/browser/esm/Bt_J_RX2M5EfualB.mjs +217 -0
- package/browser/esm/CIvpm_sHFmNjZQ7A.mjs +52 -0
- package/browser/esm/Cwku0NEsbyq9Q_RE.mjs +129 -0
- package/browser/esm/D4-E6nt8hrlNPIFy.mjs +5391 -0
- package/browser/esm/D5kzg7IfEtrExqiB.mjs +47 -0
- package/browser/esm/DLG0lDeb0t2L5dW4.mjs +468 -0
- package/browser/esm/DN5ACcUVdZeTSdLP.mjs +411 -0
- package/browser/esm/DP50mI7SOk1spPHv.mjs +516 -0
- package/browser/esm/DfZkO9tkYUlBUgXw.mjs +508 -0
- package/browser/esm/DhSHhyt16cHMvS_1.mjs +612 -0
- package/browser/esm/DxEzstNhMkJ0uzic.mjs +191 -0
- package/browser/esm/DxurARMNTQF7_rno.mjs +99 -0
- package/browser/esm/EK3JudzGAPbSIzUc.mjs +2207 -0
- package/browser/esm/Lds8JbV0rmFse8IO.mjs +113 -0
- package/browser/esm/gdfNDmwpOOPidxVx.mjs +20 -0
- package/browser/esm/gr4KpbaVpVfm8KOB.mjs +219 -0
- package/browser/esm/index.mjs +152 -91
- package/licenses/dependencies.txt +137 -627
- package/node/esm/-xXP4QK8hYGcJeug.mjs +509 -0
- package/node/esm/BVNe-px0vKah_sh2.mjs +516 -0
- package/node/esm/CLqRv2FWsGMrPoB0.mjs +47 -0
- package/node/esm/CSaiKMpmmQJY2xtl.mjs +113 -0
- package/node/esm/CTVMIjaQZQtJ05F8.mjs +129 -0
- package/node/esm/CWDr4rcpYux8bSQk.mjs +82 -0
- package/node/esm/CgDlduchq8t6DdhF.mjs +190 -0
- package/node/esm/Ck1Im-zWbwJqZNU1.mjs +470 -0
- package/node/esm/Ctakr7TocM8RykpC.mjs +679 -0
- package/node/esm/DMhU1sS3kX-Im83k.mjs +106 -0
- package/node/esm/Dh2MI-_NSwxjrRP8.mjs +99 -0
- package/node/esm/ED4g6Bsz9syAhAW3.mjs +155 -0
- package/node/esm/VuLRDpv46Yib6fpp.mjs +4536 -0
- package/node/esm/index.mjs +10603 -2832
- package/package.json +27 -27
- package/resources/contents.json +30 -0
- package/resources/locales/contents.json +44 -0
- package/resources/locales/de/groups.cmd.json +219 -0
- package/resources/locales/de/studio.cmd.json +159 -0
- package/resources/locales/de/ui.msg.json +507 -0
- package/resources/locales/en/groups.cmd.json +219 -0
- package/resources/locales/en/studio.cmd.json +159 -0
- package/resources/locales/en/ui.msg.json +508 -0
- package/types/index.d.ts +2 -1761
- package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +131 -0
- package/types/src/anchorItems/AnchorItemsPanel.d.ts +29 -0
- package/types/src/anchorItems/index.d.ts +3 -0
- package/types/src/border/BorderPopupButton.d.ts +30 -0
- package/types/src/border/BorderStylePopupButton.d.ts +40 -0
- package/types/src/border/index.d.ts +3 -0
- package/types/src/chart/command/InsertChartCommandButton.d.ts +10 -0
- package/types/src/chart/command/index.d.ts +2 -0
- package/types/src/color/Alpha.d.ts +36 -0
- package/types/src/color/Checkboard.d.ts +11 -0
- package/types/src/color/CheckboardUtils.d.ts +3 -0
- package/types/src/color/ColorButton.d.ts +21 -0
- package/types/src/color/ColorButtonList.d.ts +17 -0
- package/types/src/color/ColorPanel.d.ts +71 -0
- package/types/src/color/ColorPopupButton.d.ts +29 -0
- package/types/src/color/CustomColorPanel.d.ts +16 -0
- package/types/src/color/EditableInput.d.ts +22 -0
- package/types/src/color/Hue.d.ts +29 -0
- package/types/src/color/Saturation.d.ts +45 -0
- package/types/src/color/SketchFields.d.ts +9 -0
- package/types/src/color/Swatch.d.ts +16 -0
- package/types/src/color/Types.d.ts +11 -0
- package/types/src/color/_Utils.d.ts +4 -0
- package/types/src/color/index.d.ts +7 -0
- package/types/src/command/AccountingStyleCommandButton.d.ts +18 -0
- package/types/src/command/AppearanceCommandButton.d.ts +3 -0
- package/types/src/command/BorderCommandButton.d.ts +20 -0
- package/types/src/command/ColorCommandButton.d.ts +23 -0
- package/types/src/command/DocThemeCommandButton.d.ts +19 -0
- package/types/src/command/FileCommandButton.d.ts +8 -0
- package/types/src/command/FontFamilyCommandButton.d.ts +9 -0
- package/types/src/command/FontSizeCommandButton.d.ts +21 -0
- package/types/src/command/InsertFunctionCommandPopupButton.d.ts +9 -0
- package/types/src/command/InsertFunctionSumCommandPopupButton.d.ts +8 -0
- package/types/src/command/LanguageCommandButton.d.ts +19 -0
- package/types/src/command/LocaleCommandButton.d.ts +17 -0
- package/types/src/command/NumberFormatCommandButton.d.ts +6 -0
- package/types/src/command/PasteCommandButton.d.ts +14 -0
- package/types/src/command/PresetCellStylesCommandButton.d.ts +11 -0
- package/types/src/command/PresetTableStylesCommandButton.d.ts +12 -0
- package/types/src/command/RegisterCatalog.d.ts +3 -0
- package/types/src/command/SheetCommandGroups.d.ts +10 -0
- package/types/src/command/SheetZoomCommandButton.d.ts +9 -0
- package/types/src/command/StudioCommandGroups.d.ts +11 -0
- package/types/src/command/TextEffectsCommandButton.d.ts +6 -0
- package/types/src/command/TextRotateGroupButton.d.ts +14 -0
- package/types/src/command/UndoRedoCommandButton.d.ts +14 -0
- package/types/src/command/WalkingCopyCommandButton.d.ts +6 -0
- package/types/src/command/WorkbookCommandGroups.d.ts +11 -0
- package/types/src/command/index.d.ts +23 -0
- package/types/src/conditionalFormat/ColorScaleRulePanel.d.ts +18 -0
- package/types/src/conditionalFormat/ConditionalFormatDetailsPanel.d.ts +23 -0
- package/types/src/conditionalFormat/ConditionalFormatDetailsTaskPane.d.ts +4 -0
- package/types/src/conditionalFormat/ConditionalFormatEditorPanel.d.ts +20 -0
- package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +2 -0
- package/types/src/conditionalFormat/ConditionalFormatRangeField.d.ts +32 -0
- package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +34 -0
- package/types/src/conditionalFormat/ConditionalFormatTitle.d.ts +10 -0
- package/types/src/conditionalFormat/DataBarRulePanel.d.ts +23 -0
- package/types/src/conditionalFormat/IconSetRulePanel.d.ts +23 -0
- package/types/src/conditionalFormat/PresetChip.d.ts +30 -0
- package/types/src/conditionalFormat/PresetScalesCommandButton.d.ts +20 -0
- package/types/src/conditionalFormat/RulePreview.d.ts +23 -0
- package/types/src/conditionalFormat/RuleSection.d.ts +20 -0
- package/types/src/conditionalFormat/ScaleMiniGrid.d.ts +59 -0
- package/types/src/conditionalFormat/ScaleStopRow.d.ts +34 -0
- package/types/src/conditionalFormat/index.d.ts +3 -0
- package/types/src/conditionalFormat/previewColor.d.ts +50 -0
- package/types/src/conditions/AverageOption.d.ts +25 -0
- package/types/src/conditions/BetweenOption.d.ts +25 -0
- package/types/src/conditions/BooleanOption.d.ts +24 -0
- package/types/src/conditions/CombinatorOption.d.ts +41 -0
- package/types/src/conditions/ConditionEditor.d.ts +57 -0
- package/types/src/conditions/ConditionUtils.d.ts +83 -0
- package/types/src/conditions/DateTimeOption.d.ts +43 -0
- package/types/src/conditions/ExpressionOption.d.ts +26 -0
- package/types/src/conditions/InSetOption.d.ts +37 -0
- package/types/src/conditions/NumberOption.d.ts +24 -0
- package/types/src/conditions/OperatorAndParamEditor.d.ts +55 -0
- package/types/src/conditions/OperatorSelect.d.ts +35 -0
- package/types/src/conditions/OperatorSelectPopupButton.d.ts +39 -0
- package/types/src/conditions/ScalarOption.d.ts +29 -0
- package/types/src/conditions/SelectorSelect.d.ts +43 -0
- package/types/src/conditions/StringOption.d.ts +24 -0
- package/types/src/conditions/TimePeriodOption.d.ts +25 -0
- package/types/src/conditions/TopNOption.d.ts +25 -0
- package/types/src/conditions/index.d.ts +13 -0
- package/types/src/dataValidation/DataValidationDetailsPanel.d.ts +16 -0
- package/types/src/dataValidation/DataValidationDetailsTaskPane.d.ts +3 -0
- package/types/src/dataValidation/DataValidationEditorPanel.d.ts +12 -0
- package/types/src/dataValidation/DataValidationPlugin.d.ts +2 -0
- package/types/src/dataValidation/index.d.ts +2 -0
- package/types/src/debug/DebugUtils.d.ts +4 -0
- package/types/src/debug/index.d.ts +2 -0
- package/types/src/dialog/CommentsDialog.d.ts +11 -0
- package/types/src/dialog/FindReplaceWindow.d.ts +13 -0
- package/types/src/dialog/HyperlinkDialog.d.ts +28 -0
- package/types/src/dialog/InsertFunctionDialog.d.ts +25 -0
- package/types/src/dialog/NamedReferenceDialog.d.ts +17 -0
- package/types/src/dialog/NumberFormatDialog.d.ts +12 -0
- package/types/src/dialog/ResizeHeaderDialog.d.ts +15 -0
- package/types/src/dialog/ShortcutKeysDialog.d.ts +9 -0
- package/types/src/dialog/ShortcutKeysPanel.d.ts +28 -0
- package/types/src/dialog/SortDialog.d.ts +9 -0
- package/types/src/dialog/TableNewDialog.d.ts +14 -0
- package/types/src/dialog/WorkbookStatisticsDialog.d.ts +13 -0
- package/types/src/dialog/index.d.ts +10 -0
- package/types/src/filter/ColumnMenu.d.ts +13 -0
- package/types/src/filter/FilterList.d.ts +28 -0
- package/types/src/filter/index.d.ts +3 -0
- package/types/src/form/FormulaField.d.ts +221 -0
- package/types/src/form/InputField.d.ts +89 -0
- package/types/src/form/index.d.ts +3 -0
- package/types/src/formulaBar/FormulaBar.d.ts +8 -0
- package/types/src/formulaBar/IFormulaBar.d.ts +51 -0
- package/types/src/formulaBar/index.d.ts +3 -0
- package/types/src/function/FunctionArgumentsPanel.d.ts +57 -0
- package/types/src/function/FunctionSearchPanel.d.ts +35 -0
- package/types/src/function/InsertFunctionWizard.d.ts +79 -0
- package/types/src/function/index.d.ts +4 -0
- package/types/src/function/paneMetrics.d.ts +33 -0
- package/types/src/index.d.ts +21 -0
- package/types/src/itemsPanel/EditorPanel.d.ts +21 -0
- package/types/src/itemsPanel/ItemCard.d.ts +57 -0
- package/types/src/itemsPanel/ItemsDescriptor.d.ts +215 -0
- package/types/src/itemsPanel/ItemsPanel.d.ts +45 -0
- package/types/src/itemsPanel/SortableCards.d.ts +67 -0
- package/types/src/itemsPanel/index.d.ts +6 -0
- package/types/src/movable/MovableContextMenu.d.ts +13 -0
- package/types/src/movable/index.d.ts +2 -0
- package/types/src/named/INamedCollectionEditor.d.ts +37 -0
- package/types/src/named/NamedCollectionEditor.d.ts +7 -0
- package/types/src/named/NamedDetailsPanel.d.ts +11 -0
- package/types/src/named/NamedDetailsTaskPane.d.ts +3 -0
- package/types/src/named/NamedDraft.d.ts +68 -0
- package/types/src/named/NamedEditorPanel.d.ts +19 -0
- package/types/src/named/NamedPlugin.d.ts +2 -0
- package/types/src/named/index.d.ts +8 -0
- package/types/src/numberFormat/NumberFormatPanel.d.ts +29 -0
- package/types/src/numberFormat/NumberFormatTaskPane.d.ts +12 -0
- package/types/src/numberFormat/index.d.ts +8 -0
- package/types/src/protectedRange/ProtectedRangeDetailsPanel.d.ts +20 -0
- package/types/src/protectedRange/ProtectedRangeDetailsTaskPane.d.ts +3 -0
- package/types/src/protectedRange/ProtectedRangeEditorPanel.d.ts +27 -0
- package/types/src/protectedRange/ProtectedRangePlugin.d.ts +2 -0
- package/types/src/protectedRange/index.d.ts +2 -0
- package/types/src/protection/WorkbookProtectionDialog.d.ts +23 -0
- package/types/src/protection/WorkbookProtectionPanel.d.ts +51 -0
- package/types/src/protection/index.d.ts +3 -0
- package/types/src/sheet/SheetTabMenu.d.ts +21 -0
- package/types/src/sheet/SheetsAllMenu.d.ts +16 -0
- package/types/src/sheet/index.d.ts +3 -0
- package/types/src/statusBar/NumberStats.d.ts +27 -0
- package/types/src/statusBar/SheetZoomScale.d.ts +11 -0
- package/types/src/statusBar/StatusBar.d.ts +35 -0
- package/types/src/statusBar/index.d.ts +4 -0
- package/types/src/studio/CommandsWrapper.d.ts +36 -0
- package/types/src/studio/DefaultLogo.d.ts +3 -0
- package/types/src/studio/EagerStudio.d.ts +5 -0
- package/types/src/studio/Studio.d.ts +26 -0
- package/types/src/studio/StudioCommandProvider.d.ts +26 -0
- package/types/src/studio/StudioCommands.d.ts +115 -0
- package/types/src/studio/StudioNotifierProvider.d.ts +10 -0
- package/types/src/studio/StudioProps.d.ts +372 -0
- package/types/src/studio/StudioSplitPane.d.ts +60 -0
- package/types/src/studio/StudioTaskPaneArea.d.ts +8 -0
- package/types/src/studio/StudioToolbar.d.ts +37 -0
- package/types/src/studio/index.d.ts +4 -0
- package/types/src/studio/useStudioApp.d.ts +51 -0
- package/types/src/table/TableDetailsPanel.d.ts +17 -0
- package/types/src/table/TableDetailsTaskPane.d.ts +3 -0
- package/types/src/table/TablePlugin.d.ts +2 -0
- package/types/src/table/TableStyleCanvasPreview.d.ts +21 -0
- package/types/src/table/TableStyleOptionsPanel.d.ts +38 -0
- package/types/src/table/TableStylePreview.d.ts +43 -0
- package/types/src/table/index.d.ts +7 -0
- package/types/src/theme/ThemeSelectButton.d.ts +23 -0
- package/types/src/theme/ThemeSelectPanel.d.ts +17 -0
- package/types/src/theme/ThemeSelectPopupButton.d.ts +24 -0
- package/types/src/theme/ThemeUtils.d.ts +57 -0
- package/types/src/theme/index.d.ts +5 -0
- package/types/src/toast/ToastError.d.ts +10 -0
- package/types/src/toast/index.d.ts +2 -0
- package/types/src/toolbar/WorkbookToolbars.d.ts +46 -0
- package/types/src/toolbar/index.d.ts +2 -0
- package/types/src/workbook/DefaultRenderers.d.ts +23 -0
- package/types/src/workbook/DocumentTitle.d.ts +69 -0
- package/types/src/workbook/WorkbookContextMenu.d.ts +13 -0
- package/types/src/workbook/WorkbookElement.d.ts +12 -0
- package/types/src/workbook/WorkbookStrip.d.ts +37 -0
- package/types/src/workbook/index.d.ts +7 -0
- package/browser/cjs/0DtrpXkQQehBmvSv.cjs +0 -6
- package/browser/cjs/6C3ia2nz4Zm-AdMZ.cjs +0 -7
- package/browser/cjs/BR_EGEaHisRrXAtK.cjs +0 -6
- package/browser/cjs/B_v_M4TiavtofChs.cjs +0 -42
- package/browser/cjs/C17p-h_nw582H7WD.cjs +0 -20
- package/browser/cjs/CInmVysdoHEvvW9h.cjs +0 -6
- package/browser/cjs/CMvQZPQsE7MuTMy_.cjs +0 -6
- package/browser/cjs/CkNt54AXVfJjIWja.cjs +0 -6
- package/browser/cjs/CtRvyhDzQxsk7dkI.cjs +0 -6
- package/browser/cjs/DN9cQ4_4ERQvzKn6.cjs +0 -6
- package/browser/cjs/DUTuBWUNF-w3Fxtb.cjs +0 -6
- package/browser/cjs/pTzEs1wlZj5Bb6xc.cjs +0 -18
- package/browser/esm/8ZnwcsRrGO3Nlw9Y.mjs +0 -54
- package/browser/esm/BFZ4oCbQukelEVLI.mjs +0 -53
- package/browser/esm/BP3nTf4-SLftsj61.mjs +0 -640
- package/browser/esm/BSMkBkXBQgZhX1xk.mjs +0 -2159
- package/browser/esm/CPLIJbynjEkwF2T0.mjs +0 -4533
- package/browser/esm/CuC13VFjBYFE7kub.mjs +0 -155
- package/browser/esm/Cw3i8T1tVnm8o6eB.mjs +0 -46
- package/browser/esm/D6E8W2KK4dGVRQO_.mjs +0 -25
- package/browser/esm/D8xc3AM9QHEqmpb9.mjs +0 -50
- package/browser/esm/DA_bEpA5kkn89fmW.mjs +0 -2411
- package/browser/esm/DVqOr-7nEXA7IjKJ.mjs +0 -26
- package/browser/esm/VAUOzclLs-dR9nt_.mjs +0 -50
- package/node/assets/style.css +0 -1
- package/node/esm/B9dvpdCD_p2q8aNP.mjs +0 -156
- package/node/esm/BBxZemzbmUkoOYdq.mjs +0 -46
- package/node/esm/BDdkV45Cf7BLs5jE.mjs +0 -25
- package/node/esm/BoX8OuVRgUNgw0Wb.mjs +0 -91
- package/node/esm/CPbwVoL6mq66TtTR.mjs +0 -53
- package/node/esm/DMd6h1vz-USluank.mjs +0 -88
- package/node/esm/DYgtaT_soTbSP8M9.mjs +0 -52
- package/node/esm/DxDGSRoOYlWydiwL.mjs +0 -57
- package/node/esm/OMgXBbHk-VRNKAop.mjs +0 -26
- package/node/esm/bGXLfLFngllNb8U1.mjs +0 -50
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ItemBodyProps, ItemMessageKeys } from './ItemsDescriptor';
|
|
3
|
+
export interface ItemCardProps<T = any> extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
item: T;
|
|
5
|
+
/**
|
|
6
|
+
* The feature's catalog keys for the action tooltips.
|
|
7
|
+
*/
|
|
8
|
+
messageKeys: Pick<ItemMessageKeys, 'moveUp' | 'moveDown' | 'edit' | 'duplicate' | 'delete'>;
|
|
9
|
+
/**
|
|
10
|
+
* The one-line header.
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* The emphasized line below the header. `null` renders nothing.
|
|
15
|
+
*/
|
|
16
|
+
subtitle?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Hides every action affordance.
|
|
19
|
+
*/
|
|
20
|
+
readOnly?: boolean;
|
|
21
|
+
canMoveUp?: boolean;
|
|
22
|
+
canMoveDown?: boolean;
|
|
23
|
+
onEdit: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Omit to hide the move affordances (unordered list).
|
|
26
|
+
*/
|
|
27
|
+
onMoveBy?: (delta: number) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Omit to hide the duplicate affordance.
|
|
30
|
+
*/
|
|
31
|
+
onDuplicate?: () => void;
|
|
32
|
+
onDelete: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Subscribes to the item's own events to re-render this card.
|
|
35
|
+
*/
|
|
36
|
+
subscribeItem?: (item: T, onChange: () => void) => () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Leading visual at the card's top-left, before the title.
|
|
39
|
+
*/
|
|
40
|
+
Media?: React.ComponentType<ItemBodyProps<T>>;
|
|
41
|
+
/**
|
|
42
|
+
* Feature content below the subtitle.
|
|
43
|
+
*/
|
|
44
|
+
Body?: React.ComponentType<ItemBodyProps<T>>;
|
|
45
|
+
/**
|
|
46
|
+
* Renders the subtitle line instead of {@link subtitle}, for a feature whose subtitle is a
|
|
47
|
+
* control rather than a string — a range the card lets you edit in place.
|
|
48
|
+
*/
|
|
49
|
+
Subtitle?: React.ComponentType<ItemBodyProps<T>>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Card chrome for one listed item: hover/focus action row (move/edit/duplicate/delete), title,
|
|
53
|
+
* subtitle (a string, or a feature's own control via {@link ItemCardProps.Subtitle}), and an
|
|
54
|
+
* optional feature body.
|
|
55
|
+
*/
|
|
56
|
+
export declare const ItemCard: React.MemoExoticComponent<(<T = any>(props: ItemCardProps<T>) => React.JSX.Element)>;
|
|
57
|
+
//# sourceMappingURL=ItemCard.d.ts.map
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* How an {@link ItemsPanel} is told that what it is showing has changed.
|
|
5
|
+
*/
|
|
6
|
+
export interface ItemsSubscriber {
|
|
7
|
+
/**
|
|
8
|
+
* The list changed — items added, removed, reordered, renamed, or otherwise re-rendered.
|
|
9
|
+
*/
|
|
10
|
+
onChange(): void;
|
|
11
|
+
/**
|
|
12
|
+
* The underlying model was restored beneath the panel (undo/redo).
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Closes any open editor as well as re-reading the list: a draft taken from state that has since
|
|
16
|
+
* been rolled back would be saved back over the restored model.
|
|
17
|
+
*/
|
|
18
|
+
onInvalidated(): void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Props for the per-feature card body.
|
|
22
|
+
*/
|
|
23
|
+
export interface ItemBodyProps<T> {
|
|
24
|
+
item: T;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props for the per-feature editor body.
|
|
28
|
+
*/
|
|
29
|
+
export interface ItemEditorProps<D> {
|
|
30
|
+
/**
|
|
31
|
+
* The editor's working value — see {@link ItemsDescriptor.createDraft}.
|
|
32
|
+
*/
|
|
33
|
+
draft: D;
|
|
34
|
+
/**
|
|
35
|
+
* The workbook the draft will be saved into.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* An editor commonly needs more than the draft to render its fields — the sheet list behind a
|
|
39
|
+
* scope picker, say. The panel already holds it, so it is passed rather than re-resolved.
|
|
40
|
+
*/
|
|
41
|
+
workbook: IWorkbook;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The catalog keys the generic panel, card and editor render for one feature.
|
|
45
|
+
*
|
|
46
|
+
* @remarks
|
|
47
|
+
* Each feature declares these literally — `messageKey('dataValidation.moveUp')` — rather than the
|
|
48
|
+
* generic components building `` `${ns}.moveUp` `` at render. Extraction only sees literal keys, so a
|
|
49
|
+
* composed key is invisible to it and the next `pnpm i18n:extract` would drop the string from the
|
|
50
|
+
* English catalog while it is still in use.
|
|
51
|
+
*/
|
|
52
|
+
export interface ItemMessageKeys {
|
|
53
|
+
/** Empty-list text when nothing can be added (read-only). */
|
|
54
|
+
none: string;
|
|
55
|
+
/** Empty-list text inviting the first item. */
|
|
56
|
+
addPrompt: string;
|
|
57
|
+
/** List header. */
|
|
58
|
+
heading: string;
|
|
59
|
+
/** Tooltip on the header's add affordance. */
|
|
60
|
+
insert: string;
|
|
61
|
+
/** Label of the empty-list add button. */
|
|
62
|
+
new: string;
|
|
63
|
+
/** Card action tooltips. */
|
|
64
|
+
edit: string;
|
|
65
|
+
delete: string;
|
|
66
|
+
/** Card duplicate tooltip. Required when the feature supplies {@link ItemsDescriptor.duplicate}. */
|
|
67
|
+
duplicate?: string;
|
|
68
|
+
/** Editor buttons. */
|
|
69
|
+
cancel: string;
|
|
70
|
+
save: string;
|
|
71
|
+
/** Card reorder tooltips. Required when the feature supplies {@link ItemsDescriptor.moveBy}. */
|
|
72
|
+
moveUp?: string;
|
|
73
|
+
moveDown?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Describes one listable feature to the generic {@link ItemsPanel}: where its items come from,
|
|
77
|
+
* what signals change, and the feature-specific card and editor content.
|
|
78
|
+
*
|
|
79
|
+
* @typeParam T - The listed item.
|
|
80
|
+
* @typeParam D - The editor's working value. Often `T` itself (a detached model the feature can
|
|
81
|
+
* mutate freely), but it does not have to be — see {@link createDraft}.
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* Deliberately says nothing about *how* items are stored. Anchored collections (data validations,
|
|
85
|
+
* conditional formats, protected ranges) reach it through an adapter over `AnchorItemsDescriptor`;
|
|
86
|
+
* defined names bind to it directly. Neither shape is privileged here.
|
|
87
|
+
*/
|
|
88
|
+
export interface ItemsDescriptor<T = any, D = T> {
|
|
89
|
+
/**
|
|
90
|
+
* Class-name slug, e.g. `'data-validation'`. Rendered as `sxl-<key>-details` on the panel.
|
|
91
|
+
*/
|
|
92
|
+
key: string;
|
|
93
|
+
/**
|
|
94
|
+
* The catalog keys the generic components render, e.g. `messageKey('dataValidation.moveUp')`.
|
|
95
|
+
*/
|
|
96
|
+
messageKeys: ItemMessageKeys;
|
|
97
|
+
/**
|
|
98
|
+
* The items to list, in display order.
|
|
99
|
+
*/
|
|
100
|
+
getItems(workbook: IWorkbook): readonly T[];
|
|
101
|
+
/**
|
|
102
|
+
* Subscribes to everything that can change {@link getItems} or the read-only state.
|
|
103
|
+
*
|
|
104
|
+
* @returns An unsubscribe callback.
|
|
105
|
+
*
|
|
106
|
+
* @remarks
|
|
107
|
+
* Implementations must pass `{ transactional: false }` to `addListeners`. A UI subscription left
|
|
108
|
+
* transactional lands in the bucket that is only visited inside a commit — and is reverted by an
|
|
109
|
+
* undo, leaving the panel permanently silent.
|
|
110
|
+
*/
|
|
111
|
+
subscribe(workbook: IWorkbook, subscriber: ItemsSubscriber): () => void;
|
|
112
|
+
/**
|
|
113
|
+
* Whether the list as a whole cannot be modified — hides add, and every card's actions.
|
|
114
|
+
*/
|
|
115
|
+
isReadOnly(workbook: IWorkbook): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Per-item override of {@link isReadOnly}, for a list that mixes editable and derived items.
|
|
118
|
+
*
|
|
119
|
+
* @defaultValue The list-level {@link isReadOnly}.
|
|
120
|
+
*/
|
|
121
|
+
isItemReadOnly?(item: T, workbook: IWorkbook): boolean;
|
|
122
|
+
/**
|
|
123
|
+
* A stable React key for an item.
|
|
124
|
+
*
|
|
125
|
+
* @defaultValue An identity key held against the item object, so reorders animate correctly.
|
|
126
|
+
*/
|
|
127
|
+
getItemKey?(item: T): string;
|
|
128
|
+
/**
|
|
129
|
+
* Subscribes to one item's own events, to re-render just its card.
|
|
130
|
+
*
|
|
131
|
+
* @returns An unsubscribe callback.
|
|
132
|
+
*/
|
|
133
|
+
subscribeItem?(item: T, onChange: () => void): () => void;
|
|
134
|
+
/**
|
|
135
|
+
* Creates the editor's working value.
|
|
136
|
+
*
|
|
137
|
+
* @param template The item being edited or duplicated; absent when adding.
|
|
138
|
+
*
|
|
139
|
+
* @remarks
|
|
140
|
+
* What a "draft" is belongs to the feature. An anchored collection mints a detached model via
|
|
141
|
+
* `createItem` and edits that. A collection with no such notion — defined names are
|
|
142
|
+
* aggregated from registries that own them, so there is nothing to detach — returns a plain
|
|
143
|
+
* object instead, and {@link save} applies it. The panel only ever hands it back.
|
|
144
|
+
*/
|
|
145
|
+
createDraft(workbook: IWorkbook, template?: T): D;
|
|
146
|
+
/**
|
|
147
|
+
* Creates a draft from an ACTIVATION seed — the `draft` of the task pane's `ItemsPaneArgs`, put
|
|
148
|
+
* there by whatever opened the pane (a conditional-format preset command, say). The panel opens
|
|
149
|
+
* straight into the editor on what this returns, exactly as if the user had pressed add.
|
|
150
|
+
*
|
|
151
|
+
* @returns The seeded draft, or `null` to ignore a seed this feature does not recognize.
|
|
152
|
+
*
|
|
153
|
+
* @remarks
|
|
154
|
+
* The seed is the feature's PROPERTIES, not a model object: the caller is a command that knows
|
|
155
|
+
* the shape but holds none of the panel's models, and nothing is committed until save.
|
|
156
|
+
*
|
|
157
|
+
* Omit to opt out — a pane with nothing to seed ignores the argument.
|
|
158
|
+
*/
|
|
159
|
+
createSeededDraft?(workbook: IWorkbook, seed: any): D | null;
|
|
160
|
+
/**
|
|
161
|
+
* Flushes editor state that could not be written to the draft synchronously, before
|
|
162
|
+
* {@link save} reads it (hashing a password, say).
|
|
163
|
+
*/
|
|
164
|
+
beforeSave?(draft: D): Promise<void> | void;
|
|
165
|
+
/**
|
|
166
|
+
* Persists the draft.
|
|
167
|
+
*
|
|
168
|
+
* @param target The item being edited, or `null` when adding.
|
|
169
|
+
*
|
|
170
|
+
* @remarks
|
|
171
|
+
* The single write point, so the feature — not the panel — decides how the change is committed.
|
|
172
|
+
* Whatever spans more than one model write belongs in one transaction here, or undo unwinds a
|
|
173
|
+
* single edit a field at a time.
|
|
174
|
+
*/
|
|
175
|
+
save(workbook: IWorkbook, draft: D, target: T | null): Promise<void> | void;
|
|
176
|
+
/**
|
|
177
|
+
* Removes an item.
|
|
178
|
+
*/
|
|
179
|
+
delete(item: T, workbook: IWorkbook): void;
|
|
180
|
+
/**
|
|
181
|
+
* Copies an item. Omit to hide the duplicate affordance.
|
|
182
|
+
*/
|
|
183
|
+
duplicate?(item: T, workbook: IWorkbook): void;
|
|
184
|
+
/**
|
|
185
|
+
* Moves an item by `delta` positions. Omit for an unordered list (defined names) to hide the
|
|
186
|
+
* move affordances.
|
|
187
|
+
*/
|
|
188
|
+
moveBy?(item: T, delta: number, workbook: IWorkbook): void;
|
|
189
|
+
/**
|
|
190
|
+
* The one-line card header.
|
|
191
|
+
*/
|
|
192
|
+
getCardTitle(item: T, t: (key: string, options?: any) => string): string;
|
|
193
|
+
/**
|
|
194
|
+
* The emphasized line below the header — the ranges, the expression. `null` renders nothing.
|
|
195
|
+
*/
|
|
196
|
+
getCardSubtitle?(item: T, t: (key: string, options?: any) => string): string | null;
|
|
197
|
+
/**
|
|
198
|
+
* Leading visual at the card's top-left, before the title — a preview swatch, an icon.
|
|
199
|
+
*/
|
|
200
|
+
CardMedia?: React.ComponentType<ItemBodyProps<T>>;
|
|
201
|
+
/**
|
|
202
|
+
* Card content below the subtitle.
|
|
203
|
+
*/
|
|
204
|
+
CardBody?: React.ComponentType<ItemBodyProps<T>>;
|
|
205
|
+
/**
|
|
206
|
+
* Renders the subtitle line instead of {@link getCardSubtitle}, for a feature whose subtitle is
|
|
207
|
+
* a control rather than a string.
|
|
208
|
+
*/
|
|
209
|
+
CardSubtitle?: React.ComponentType<ItemBodyProps<T>>;
|
|
210
|
+
/**
|
|
211
|
+
* The feature editor, rendered inside the save/cancel shell.
|
|
212
|
+
*/
|
|
213
|
+
EditorBody: React.ComponentType<ItemEditorProps<D>>;
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=ItemsDescriptor.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
3
|
+
import { ItemsPaneArgs } from '@sheetxl/react';
|
|
4
|
+
import { ItemsDescriptor } from './ItemsDescriptor';
|
|
5
|
+
export interface ItemsPanelProps<T = any, D = T> extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
workbook: IWorkbook;
|
|
7
|
+
descriptor: ItemsDescriptor<T, D>;
|
|
8
|
+
/**
|
|
9
|
+
* The task pane's activation argument. A `draft` in it opens the panel editing a new item seeded
|
|
10
|
+
* from it (via {@link ItemsDescriptor.createSeededDraft}) instead of on the list; an `insert`
|
|
11
|
+
* opens the same editor on an unseeded one.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* One activation's worth, so it is consumed on ARRIVAL, not on presence: the panel acts when the
|
|
15
|
+
* value changes identity and never again, or every re-render would reopen the editor.
|
|
16
|
+
*/
|
|
17
|
+
args?: ItemsPaneArgs;
|
|
18
|
+
/**
|
|
19
|
+
* Rendered in the list header, left of the insert button — filters, view toggles.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* A prop rather than part of the descriptor: these controls own view state that also feeds
|
|
23
|
+
* `descriptor.getItems`, so the feature panel holds both and rebuilds the descriptor.
|
|
24
|
+
*/
|
|
25
|
+
headerActions?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Enables drag reordering of the cards, and animates every reorder — dropped drags and the
|
|
28
|
+
* move up/down buttons alike.
|
|
29
|
+
*
|
|
30
|
+
* Only meaningful for an ordered list: without {@link ItemsDescriptor.moveBy} (or when the list
|
|
31
|
+
* is read-only) the flag is inert.
|
|
32
|
+
*
|
|
33
|
+
* @defaultValue false
|
|
34
|
+
*/
|
|
35
|
+
dragReorder?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Generic task-pane panel for a listable collection: a card list with add/edit/delete (and
|
|
39
|
+
* optionally duplicate/reorder), plus an in-place editor over a draft with save/cancel.
|
|
40
|
+
*
|
|
41
|
+
* Everything feature-specific — where items come from, what a draft is, how a save is committed,
|
|
42
|
+
* the card and editor content — comes from an {@link ItemsDescriptor}.
|
|
43
|
+
*/
|
|
44
|
+
export declare const ItemsPanel: React.NamedExoticComponent<ItemsPanelProps<any, any> & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
//# sourceMappingURL=ItemsPanel.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SortableCardsProps {
|
|
3
|
+
/**
|
|
4
|
+
* The card ids, in display order. Must match the `id` each {@link SortableCard} was given.
|
|
5
|
+
*/
|
|
6
|
+
ids: string[];
|
|
7
|
+
/**
|
|
8
|
+
* Called on drop with the display indices. The model write; the list re-renders from it.
|
|
9
|
+
*/
|
|
10
|
+
onMove: (indexFrom: number, indexTo: number) => void;
|
|
11
|
+
/**
|
|
12
|
+
* The scrollable list container, to scope auto-scroll — dnd-kit otherwise offers the document
|
|
13
|
+
* scrolling element as a scroll target and will scroll the page on drag.
|
|
14
|
+
*/
|
|
15
|
+
scrollRef: React.RefObject<HTMLElement | null>;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Drag-reorder context for an {@link ItemsPanel} card list.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* Deliberately leaner than the TabStrip `Sortable`: a vertical list dragging inside its own
|
|
23
|
+
* scroll container needs no `DragOverlay` — the card never leaves its `@scope` root, so none of
|
|
24
|
+
* the portal/theme-scope carrying applies. The drag is restricted to the vertical axis and the
|
|
25
|
+
* list bounds instead.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SortableCards: React.MemoExoticComponent<(props: SortableCardsProps) => React.JSX.Element>;
|
|
28
|
+
/**
|
|
29
|
+
* FLIP-animates the cards through non-drag layout changes: the move up/down buttons, and the
|
|
30
|
+
* shifts around an add or delete.
|
|
31
|
+
*
|
|
32
|
+
* @param container The list container the card wrappers live in.
|
|
33
|
+
* @param enabled Off = no tracking at all (the `dragReorder` flag).
|
|
34
|
+
* @param skipNext Set before a model write to hand that one layout change to dnd-kit instead —
|
|
35
|
+
* a drop is animated by `useSortable` itself (`wasDragging`), and a second animation on top of
|
|
36
|
+
* it would fight it.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* dnd-kit's own layout-change animation (`animateLayoutChanges: () => true`) is NOT used for
|
|
40
|
+
* this, deliberately: it sets the inverted transform in a layout effect and clears it in a
|
|
41
|
+
* passive effect, assuming the browser paints in between. A reorder here produces more than one
|
|
42
|
+
* change event, and the follow-up render flushes those effects before paint — both transform
|
|
43
|
+
* states then collapse into a single style pass and no animation plays (intermittently, since it
|
|
44
|
+
* is a race). This version is immune: it writes both states imperatively with a forced style
|
|
45
|
+
* flush between them, so the browser is guaranteed to see the offset start position.
|
|
46
|
+
*
|
|
47
|
+
* Positions are read via `offsetTop`, which ignores transforms — re-running mid-animation (or
|
|
48
|
+
* mid-drag, where dnd-kit is transforming the cards) sees the stable layout and does nothing.
|
|
49
|
+
*/
|
|
50
|
+
export declare function useReorderFlip(container: React.RefObject<HTMLElement | null>, enabled: boolean, skipNext: React.RefObject<boolean>): void;
|
|
51
|
+
export interface SortableCardProps {
|
|
52
|
+
/**
|
|
53
|
+
* Stable id, the same one used as the React key.
|
|
54
|
+
*/
|
|
55
|
+
id: string;
|
|
56
|
+
/**
|
|
57
|
+
* Read-only card — listed and displaced by drags, but not draggable itself.
|
|
58
|
+
*/
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
children: React.ReactNode;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Sortable wrapper around one {@link ItemCard}. The card itself stays drag-unaware; this wrapper
|
|
64
|
+
* owns the dnd-kit node ref, transform and activation listeners.
|
|
65
|
+
*/
|
|
66
|
+
export declare const SortableCard: React.MemoExoticComponent<(props: SortableCardProps) => React.JSX.Element>;
|
|
67
|
+
//# sourceMappingURL=SortableCards.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IMovable } from '@sheetxl/sdk';
|
|
3
|
+
import { FloatReference } from '@sheetxl/utils-react';
|
|
4
|
+
export interface MovableContextMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
movable: IMovable;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
floatReference: FloatReference;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Context menu for a movable elements.
|
|
11
|
+
*/
|
|
12
|
+
export declare const MovableContextMenu: React.NamedExoticComponent<MovableContextMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
//# sourceMappingURL=MovableContextMenu.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { INamedCollection, IWorkbook } from '@sheetxl/sdk';
|
|
3
|
+
import { CommandPopupButtonProps } from '@sheetxl/utils-mui';
|
|
4
|
+
import { FloatReference } from '@sheetxl/utils-react';
|
|
5
|
+
export interface NamedCollectionEditorAttributes {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Type returned via ref property
|
|
9
|
+
*/
|
|
10
|
+
export interface INamedCollectionEditorElement extends NamedCollectionEditorAttributes, HTMLDivElement {
|
|
11
|
+
}
|
|
12
|
+
export interface NamedCollectionEditorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
/**
|
|
14
|
+
* The named ranges
|
|
15
|
+
*/
|
|
16
|
+
names: INamedCollection;
|
|
17
|
+
/**
|
|
18
|
+
* The workbook
|
|
19
|
+
*/
|
|
20
|
+
workbook: IWorkbook;
|
|
21
|
+
/**
|
|
22
|
+
* Returns focus to primary.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Removes the FloatReference is used.
|
|
26
|
+
*/
|
|
27
|
+
restoreFocus?: (options?: FocusOptions) => void;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
readonly?: boolean;
|
|
30
|
+
parentFloat?: FloatReference;
|
|
31
|
+
propsCommandPopupButton?: CommandPopupButtonProps;
|
|
32
|
+
/**
|
|
33
|
+
* Reference to the underlying element
|
|
34
|
+
*/
|
|
35
|
+
ref?: React.Ref<INamedCollectionEditorElement>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=INamedCollectionEditor.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NamedCollectionEditorProps, INamedCollectionEditorElement } from './INamedCollectionEditor';
|
|
3
|
+
/**
|
|
4
|
+
* Editor used for selecting, editing, or removing named ranges.
|
|
5
|
+
*/
|
|
6
|
+
export declare const NamedCollectionEditor: React.NamedExoticComponent<Omit<NamedCollectionEditorProps, "ref"> & React.RefAttributes<INamedCollectionEditorElement>>;
|
|
7
|
+
//# sourceMappingURL=NamedCollectionEditor.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
3
|
+
export interface NamedDetailsPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
workbook: IWorkbook;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The managed-names task pane: every defined name in the workbook — across all scopes and of every
|
|
8
|
+
* type — with add/edit/delete and a hidden-names toggle.
|
|
9
|
+
*/
|
|
10
|
+
export declare const NamedDetailsPanel: React.NamedExoticComponent<NamedDetailsPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
//# sourceMappingURL=NamedDetailsPanel.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IWorkbook, INamed } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* The `INamed.getType()` of the defined names the calculation engine owns.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Everything calc owns is a `'formula'` — a name that "is a range" is just one whose expression is
|
|
7
|
+
* a pure reference. There is no separate reference type.
|
|
8
|
+
*/
|
|
9
|
+
export declare const NAMED_TYPE_FORMULA = "formula";
|
|
10
|
+
/**
|
|
11
|
+
* Whether a name can be redefined through this pane.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Only names the calculation engine owns. The others are *derived* — a table's `INamed` reports the
|
|
15
|
+
* table's name and range, and nothing else names it. Editing one here would not do what it looks
|
|
16
|
+
* like: `NamedTable` overrides `getName()` to delegate to the table but inherits `AbstractNamed`'s
|
|
17
|
+
* `setName`, which writes to the wrapper's own state — so a "rename" would be written, be undoable,
|
|
18
|
+
* and change nothing the user can see. Renaming a table belongs to the table.
|
|
19
|
+
*/
|
|
20
|
+
export declare const isEditableNamed: (item: INamed) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The editor's working value for one name.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* A plain object rather than a detached model, because there is no model to detach. An
|
|
26
|
+
* `INamedCollection` is a pure aggregator over the registries that own the items, so it has no
|
|
27
|
+
* `createItem` and nothing that could hold an uncommitted edit. {@link saveNamedDraft} is
|
|
28
|
+
* what turns this back into model writes.
|
|
29
|
+
*/
|
|
30
|
+
export interface NamedDraft {
|
|
31
|
+
name: string;
|
|
32
|
+
/**
|
|
33
|
+
* The "refers to" expression, with or without a leading `=` — the editor authors it WITH one (it is
|
|
34
|
+
* a formula field), and {@link saveNamedDraft} normalizes it off before the model sees it.
|
|
35
|
+
*/
|
|
36
|
+
expression: string;
|
|
37
|
+
/** The sheet name this is scoped to, or `null` for workbook (global) scope. */
|
|
38
|
+
scope: string | null;
|
|
39
|
+
comment: string;
|
|
40
|
+
hidden: boolean;
|
|
41
|
+
/** {@link isEditableNamed} for the item this was taken from; `true` when adding. */
|
|
42
|
+
readonly editable: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The "refers to" text for a name.
|
|
46
|
+
*/
|
|
47
|
+
export declare const expressionOf: (item: INamed) => string;
|
|
48
|
+
/**
|
|
49
|
+
* Builds the editor's working value — from an existing name, or seeded for a new one.
|
|
50
|
+
*/
|
|
51
|
+
export declare const createNamedDraft: (workbook: IWorkbook, template?: INamed) => NamedDraft;
|
|
52
|
+
/**
|
|
53
|
+
* Applies a draft: defines a new name, or writes the changed fields of an existing one.
|
|
54
|
+
*
|
|
55
|
+
* @param target The name being edited, or `null` when adding.
|
|
56
|
+
* @throws `Error` if the name is invalid or already taken — the panel surfaces it and keeps the
|
|
57
|
+
* editor open.
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* Every edit is ONE undo entry. Each setter opens its own commit, so a rename plus a redefinition
|
|
61
|
+
* would otherwise unwind a field at a time — and `setName` re-keys the item in the collection, so a
|
|
62
|
+
* half-undone edit leaves the map keyed on something the item no longer carries.
|
|
63
|
+
*
|
|
64
|
+
* Changing the SCOPE is not a field write at all but a delete plus a define, for the reason given
|
|
65
|
+
* at that branch; it is wrapped in its own commit to keep the same one-entry guarantee.
|
|
66
|
+
*/
|
|
67
|
+
export declare const saveNamedDraft: (workbook: IWorkbook, draft: NamedDraft, target: INamed | null) => void;
|
|
68
|
+
//# sourceMappingURL=NamedDraft.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbook } from '@sheetxl/sdk';
|
|
3
|
+
import { NamedDraft } from './NamedDraft';
|
|
4
|
+
export interface NamedEditorPanelProps {
|
|
5
|
+
/**
|
|
6
|
+
* The working value to edit. Written through on every change — the panel saves this object.
|
|
7
|
+
*/
|
|
8
|
+
draft: NamedDraft;
|
|
9
|
+
workbook: IWorkbook;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Editor panel for one defined name: its name, scope, expression, comment and visibility.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Writes straight through to {@link NamedDraft} while mirroring each field in local state to
|
|
16
|
+
* render — the draft is a plain object, so it cannot notify anything on its own.
|
|
17
|
+
*/
|
|
18
|
+
export declare const NamedEditorPanel: React.NamedExoticComponent<NamedEditorPanelProps>;
|
|
19
|
+
//# sourceMappingURL=NamedEditorPanel.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './INamedCollectionEditor';
|
|
2
|
+
export * from './NamedCollectionEditor';
|
|
3
|
+
export * from './NamedDraft';
|
|
4
|
+
export * from './NamedEditorPanel';
|
|
5
|
+
export * from './NamedDetailsPanel';
|
|
6
|
+
export * from './NamedDetailsTaskPane';
|
|
7
|
+
export * from './NamedPlugin';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ICell } from '@sheetxl/sdk';
|
|
3
|
+
export interface NumberFormatPanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
4
|
+
/** The current format code (controlled). */
|
|
5
|
+
value: string;
|
|
6
|
+
/** Called with the new format code whenever the user changes a control. */
|
|
7
|
+
onChange: (code: string) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Optional accessor for the cell whose value drives the live preview
|
|
10
|
+
* (and the workbook date-system/locale). Falls back to a category sample.
|
|
11
|
+
*/
|
|
12
|
+
context?: () => ICell | null;
|
|
13
|
+
/**
|
|
14
|
+
* Called when the user presses Enter (so a hosting dialog can commit/close).
|
|
15
|
+
* Not used in a task pane, where the panel applies live.
|
|
16
|
+
*/
|
|
17
|
+
onCommit?: () => void;
|
|
18
|
+
/** Disable all controls. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Standalone Excel-like "Format Cells → Number" panel: a category list plus
|
|
23
|
+
* per-category controls that synthesize an Excel format code (via
|
|
24
|
+
* {@link NumberFormat.Builder}). Controlled by `value`/`onChange` so it can be
|
|
25
|
+
* dropped into a dialog, a task pane, or a larger format dialog unchanged.
|
|
26
|
+
*/
|
|
27
|
+
export declare const NumberFormatPanel: React.NamedExoticComponent<NumberFormatPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export default NumberFormatPanel;
|
|
29
|
+
//# sourceMappingURL=NumberFormatPanel.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TaskPaneProps } from '@sheetxl/react';
|
|
2
|
+
/**
|
|
3
|
+
* Task-pane adapter for {@link NumberFormatPanel}: binds the panel to the live
|
|
4
|
+
* selection (Excel-style live apply). The panel itself stays presentational —
|
|
5
|
+
* this adapter supplies `value`/`onChange`/`context` from the workbook model.
|
|
6
|
+
*
|
|
7
|
+
* Register it with `DefaultTaskPaneRegistry.registerTaskPane(...)` (see
|
|
8
|
+
* {@link registerNumberFormatTaskPane}) to surface it in the ribbon.
|
|
9
|
+
*/
|
|
10
|
+
export declare const NumberFormatTaskPane: (props: TaskPaneProps) => import("react").JSX.Element;
|
|
11
|
+
export default NumberFormatTaskPane;
|
|
12
|
+
//# sourceMappingURL=NumberFormatTaskPane.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './NumberFormatPanel';
|
|
2
|
+
export * from './NumberFormatTaskPane';
|
|
3
|
+
/**
|
|
4
|
+
* Opt-in: register the Number Format panel as a ribbon task pane. Call this from
|
|
5
|
+
* the studio bootstrap if you want it surfaced (mirrors `DataValidationPlugin`).
|
|
6
|
+
*/
|
|
7
|
+
export declare const registerNumberFormatTaskPane: () => void;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbook, IProtectedRange } from '@sheetxl/sdk';
|
|
3
|
+
import { AnchorItemsDescriptor } from '../anchorItems';
|
|
4
|
+
/**
|
|
5
|
+
* Binds protected ranges to the generic {@link AnchorItemsPanel}.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* `reorderable` is off: OOXML models `protectedRanges` as an unordered set, so the move up/down
|
|
9
|
+
* affordances would present an ordering that carries no meaning.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ProtectedRangeItemsDescriptor: AnchorItemsDescriptor<IProtectedRange>;
|
|
12
|
+
export interface ProtectedRangeDetailsPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
workbook: IWorkbook;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The protected-ranges task pane: the generic anchored-items list driven by
|
|
17
|
+
* {@link ProtectedRangeItemsDescriptor}.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ProtectedRangeDetailsPanel: React.NamedExoticComponent<ProtectedRangeDetailsPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
//# sourceMappingURL=ProtectedRangeDetailsPanel.d.ts.map
|