@sheetxl/react 0.8.0-beta.1 → 0.8.0-beta.10
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/BHjeSMaycUkS5dVL.mjs +66 -0
- package/browser/esm/BZcQ-KYwS62Ut45c.mjs +20 -0
- package/browser/esm/Bow9CzRJrYxak2i5.mjs +318 -0
- package/browser/esm/BuvXl14hs-1CvjeA.mjs +2706 -0
- package/browser/esm/BwRduT8FTrk5n72r.mjs +32 -0
- package/browser/esm/C6urN77szrYwODXF.mjs +134 -0
- package/browser/esm/CYMRbtPIr6SklGpp.mjs +775 -0
- package/browser/esm/CYoUd5KIl7W3AsxH.mjs +196 -0
- package/browser/esm/Cfe0kofqVKGxLqO6.mjs +31 -0
- package/browser/esm/CiRN-woJZWYOgTn4.mjs +36 -0
- package/browser/esm/Dd-ZybXAgoq9pgGv.mjs +45 -0
- package/browser/esm/DjiBz4H74I6nPUY6.mjs +79 -0
- package/browser/esm/DyU9UInRnfkPYYlR.mjs +63 -0
- package/browser/esm/J8cPagZBeXz86Lnd.mjs +777 -0
- package/browser/esm/Sp6PJavGKpF8SJzA.mjs +75 -0
- package/browser/esm/cYjYjqEsyd63x8t4.mjs +67 -0
- package/browser/esm/chart.mjs +60 -0
- package/browser/esm/control.mjs +216 -0
- package/browser/esm/group.mjs +123 -0
- package/browser/esm/index.mjs +14070 -9138
- package/browser/esm/note.mjs +86 -0
- package/browser/esm/picture.mjs +86 -0
- package/{node/esm/DAE_NG8D9uT50zUH.mjs → browser/esm/shape.mjs} +2 -4
- package/browser/esm/slicer.mjs +276 -0
- package/licenses/dependencies.txt +6 -599
- package/node/esm/BJ7ZZm63j5O6cvrB.mjs +134 -0
- package/node/esm/BfRn5S5V4X8xIAEa.mjs +20 -0
- package/node/esm/BpwE3HqTnrLLzE3C.mjs +775 -0
- package/node/esm/Buw-VKYJy3y5dbaJ.mjs +197 -0
- package/node/esm/CFFlJxNwgyInjEnh.mjs +45 -0
- package/node/esm/CM5BT7h-hMtST2bE.mjs +2706 -0
- package/node/esm/CV3bT3Hql74GcHoU.mjs +37 -0
- package/node/esm/C_ANM4feA1xV-pri.mjs +32 -0
- package/node/esm/D3YXHeOyFp00Xk3m.mjs +323 -0
- package/node/esm/DPN0n6MGYQ9vZ2KO.mjs +80 -0
- package/node/esm/DYosMUJKp-3MSO4q.mjs +76 -0
- package/node/esm/DhSq680c5tgMFFbj.mjs +68 -0
- package/node/esm/Dxbm6ryIDCEi26RO.mjs +66 -0
- package/node/esm/GkmuxU7OwRZtm2Rf.mjs +63 -0
- package/node/esm/chart.mjs +60 -0
- package/node/esm/control.mjs +216 -0
- package/node/esm/group.mjs +123 -0
- package/node/esm/index.mjs +16618 -11534
- package/node/esm/note.mjs +87 -0
- package/node/esm/picture.mjs +86 -0
- package/node/esm/shape.mjs +783 -0
- package/node/esm/slicer.mjs +278 -0
- package/package.json +53 -14
- package/resources/contents.json +18 -0
- package/resources/locales/contents.json +42 -0
- package/resources/locales/de/movable.cmd.json +154 -0
- package/resources/locales/de/picture.cmd.json +31 -0
- package/resources/locales/de/selection.cmd.json +8 -0
- package/resources/locales/de/shape.cmd.json +17 -0
- package/resources/locales/de/sheet.cmd.json +328 -21
- package/resources/locales/de/slicer.cmd.json +17 -0
- package/resources/locales/de/table.cmd.json +9 -1
- package/resources/locales/de/ui.msg.json +309 -3
- package/resources/locales/de/workbook.cmd.json +10 -6
- package/resources/locales/en/movable.cmd.json +154 -0
- package/resources/locales/en/picture.cmd.json +31 -0
- package/resources/locales/en/selection.cmd.json +8 -0
- package/resources/locales/en/shape.cmd.json +17 -0
- package/resources/locales/en/sheet.cmd.json +342 -22
- package/resources/locales/en/slicer.cmd.json +17 -0
- package/resources/locales/en/table.cmd.json +9 -1
- package/resources/locales/en/ui.msg.json +309 -3
- package/resources/locales/en/workbook.cmd.json +11 -7
- package/types/chart.d.ts +2 -0
- package/types/control.d.ts +2 -0
- package/types/group.d.ts +2 -0
- package/types/note.d.ts +2 -0
- package/types/picture.d.ts +2 -0
- package/types/shape.d.ts +2 -0
- package/types/slicer.d.ts +2 -0
- package/types/src/annotation/RangeAnnotations.d.ts +119 -0
- package/types/src/annotation/index.d.ts +2 -0
- package/types/src/autoFill/AutoFillPresets.d.ts +14 -0
- package/types/src/autoFill/FillMenu.d.ts +36 -0
- package/types/src/autoFill/FillSeries.d.ts +38 -0
- package/types/src/autoFill/index.d.ts +4 -0
- package/types/src/border/StaticBorderRenderer.d.ts +2 -2
- package/types/src/border/useBorders.d.ts +7 -7
- package/types/src/cell/CornerTriangle.d.ts +6 -0
- package/types/src/cell/FormulaCellRenderer.d.ts +1 -1
- package/types/src/cell/OutlineButton.d.ts +123 -0
- package/types/src/cell/SheetCellRenderer.d.ts +2 -2
- package/types/src/cell/SheetHeaderRenderer.d.ts +5 -0
- package/types/src/cell/StaticCellRenderer.d.ts +57 -0
- package/types/src/cell/index.d.ts +2 -0
- package/types/src/cell/useFormulaViewAnchor.d.ts +1 -1
- package/types/src/chart/index.d.ts +0 -1
- package/types/src/checklist/ValueChecklist.d.ts +112 -0
- package/types/src/checklist/index.d.ts +2 -0
- package/types/src/commands/ContextualToolbar.d.ts +19 -0
- package/types/src/commands/createTransactionalMiddleware.d.ts +4 -1
- package/types/src/commands/index.d.ts +1 -0
- package/types/src/comment/CommentCardRequest.d.ts +94 -0
- package/types/src/comment/CommentUtils.d.ts +43 -0
- package/types/src/comment/NoteEditor.d.ts +20 -0
- package/types/src/comment/index.d.ts +5 -0
- package/types/src/comment/useCommentThread.d.ts +37 -0
- package/types/src/comment/useSheetComments.d.ts +28 -0
- package/types/src/{sheet → conditionalFormat}/ConditionalFormatPresets.d.ts +6 -6
- package/types/src/conditionalFormat/index.d.ts +1 -0
- package/types/src/control/FormControlRenderers.d.ts +22 -0
- package/types/src/editor/FunctionPreviewPanel.d.ts +15 -1
- package/types/src/editor/NamedItemLabel.d.ts +29 -0
- package/types/src/editor/NamedItemsPanel.d.ts +13 -2
- package/types/src/editor/SheetCellEditorLayer.d.ts +3 -7
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +44 -0
- package/types/src/editor/SheetCellInput.d.ts +26 -2
- package/types/src/editor/SheetEditable.d.ts +8 -2
- package/types/src/editor/formulaCaret.d.ts +39 -10
- package/types/src/editor/formulaEval.d.ts +9 -5
- package/types/src/editor/formulaLint.d.ts +36 -0
- package/types/src/editor/formulaPresentation.d.ts +7 -0
- package/types/src/editor/formulaText.d.ts +17 -5
- package/types/src/editor/functionArgs.d.ts +20 -0
- package/types/src/editor/index.d.ts +4 -1
- package/types/src/editor/pickedReference.d.ts +76 -0
- package/types/src/editor/useEditRejectedNotice.d.ts +32 -0
- package/types/src/editor/useFormulaHints.d.ts +93 -3
- package/types/src/editor/useFormulaInput.d.ts +30 -4
- package/types/src/editor/useReferenceMode.d.ts +12 -0
- package/types/src/editor/validationAlert.d.ts +24 -0
- package/types/src/externalLink/ExternalLinksPaneArgs.d.ts +23 -0
- package/types/src/externalLink/index.d.ts +2 -0
- package/types/src/form/FormulaInput.d.ts +18 -2
- package/types/src/form/FormulaInputParts.d.ts +10 -1
- package/types/src/form/useEditCommit.d.ts +23 -3
- package/types/src/form/useInputField.d.ts +2 -3
- package/types/src/frame/CommandContext.d.ts +188 -6
- package/types/src/group/GroupEditor.d.ts +25 -0
- package/types/src/index.d.ts +12 -2
- package/types/src/io/WorkbookIO.d.ts +2 -0
- package/types/src/layer/CellErrorLayer.d.ts +24 -7
- package/types/src/layer/CommentCardLayer.d.ts +43 -0
- package/types/src/layer/CommentsLayer.d.ts +35 -0
- package/types/src/layer/ConditionalIcons.d.ts +4 -4
- package/types/src/layer/FreezeDragLines.d.ts +17 -0
- package/types/src/layer/GridFreezeLayer.d.ts +11 -0
- package/types/src/layer/HeaderFreezeLayer.d.ts +12 -0
- package/types/src/layer/HeaderResizerLayer.d.ts +2 -1
- package/types/src/layer/HyperlinkLayer.d.ts +109 -0
- package/types/src/layer/MovableKindScope.d.ts +17 -0
- package/types/src/layer/ProtectionLayer.d.ts +52 -0
- package/types/src/layer/RangeAnnotationLayer.d.ts +71 -0
- package/types/src/layer/ResizeIndicator.d.ts +9 -8
- package/types/src/layer/ResizeTooltip.d.ts +13 -0
- package/types/src/layer/SheetHeaderCellLayer.d.ts +10 -1
- package/types/src/layer/SheetOutlineLayer.d.ts +40 -0
- package/types/src/layer/TableLayer.d.ts +5 -4
- package/types/src/layer/TableToolbar.d.ts +42 -0
- package/types/src/layer/ValidationDropdownLayer.d.ts +15 -5
- package/types/src/layer/ValidationIndicatorLayer.d.ts +9 -3
- package/types/src/layer/ValidationPromptLayer.d.ts +64 -0
- package/types/src/layer/_tableColor.d.ts +4 -0
- package/types/src/layer/cellTip.d.ts +13 -0
- package/types/src/layer/freezeDragState.d.ts +21 -0
- package/types/src/layer/index.d.ts +12 -1
- package/types/src/layer/resizeIndicatorState.d.ts +3 -1
- package/types/src/layer/useFreezeDrag.d.ts +22 -0
- package/types/src/layer/useValidationPicker.d.ts +35 -35
- package/types/src/layer/validationMark.d.ts +63 -0
- package/types/src/listener/useModelListener.d.ts +4 -4
- package/types/src/movable/ConnectionSites.d.ts +18 -0
- package/types/src/movable/IMovableArea.d.ts +56 -0
- package/types/src/movable/MovableAdornment.d.ts +26 -0
- package/types/src/movable/MovableCommandGroups.d.ts +40 -0
- package/types/src/movable/MovableCommands.d.ts +6 -1
- package/types/src/movable/MovableControl.d.ts +78 -0
- package/types/src/movable/MovableEdit.d.ts +22 -0
- package/types/src/movable/MovableFrame.d.ts +16 -13
- package/types/src/movable/MovableLayer.d.ts +25 -7
- package/types/src/movable/MovableRenderers.d.ts +210 -0
- package/types/src/movable/PlaceholderFrames.d.ts +11 -0
- package/types/src/movable/RotateHandle.d.ts +37 -0
- package/types/src/movable/TextBox.d.ts +34 -0
- package/types/src/movable/connect.d.ts +16 -0
- package/types/src/movable/framePlacement.d.ts +72 -0
- package/types/src/movable/geometry.d.ts +61 -0
- package/types/src/movable/index.d.ts +10 -0
- package/types/src/movable/pressTarget.d.ts +20 -0
- package/types/src/picker/PickerPanel.d.ts +52 -0
- package/types/src/picker/cellPickerOpen.d.ts +6 -0
- package/types/src/picker/index.d.ts +4 -0
- package/types/src/picker/useCellPicker.d.ts +95 -0
- package/types/src/picture/PictureCommands.d.ts +12 -0
- package/types/src/picture/PictureKind.d.ts +7 -0
- package/types/src/picture/index.d.ts +0 -1
- package/types/src/protection/ProtectionPaneArgs.d.ts +31 -0
- package/types/src/protection/index.d.ts +3 -0
- package/types/src/protection/unlockProtectedRanges.d.ts +23 -0
- package/types/src/richText/RichTextEditor.d.ts +41 -0
- package/types/src/richText/index.d.ts +2 -0
- package/types/src/selection/SheetSelectionLayer.d.ts +14 -10
- package/types/src/shape/ConnectorControl.d.ts +46 -0
- package/types/src/shape/ShapeCommands.d.ts +11 -0
- package/types/src/shape/ShapeControl.d.ts +8 -0
- package/types/src/shape/ShapeEditor.d.ts +15 -2
- package/types/src/shape/ShapeGallery.d.ts +31 -0
- package/types/src/shape/ShapeHandles.d.ts +28 -0
- package/types/src/shape/ShapeKind.d.ts +7 -0
- package/types/src/shape/ShapeSVG.d.ts +22 -0
- package/types/src/shape/ShapeText.d.ts +17 -0
- package/types/src/shape/icons/ShapeIcons.d.ts +16 -0
- package/types/src/shape/icons/_ShapeIconPack.d.ts +4 -0
- package/types/src/shape/index.d.ts +3 -1
- package/types/src/shape/shapeFrame.d.ts +50 -0
- package/types/src/shape/shapeStyle.d.ts +82 -0
- package/types/src/sheet/ISheetElement.d.ts +62 -65
- package/types/src/sheet/SheetCommandProvider.d.ts +9 -4
- package/types/src/sheet/SheetCommands.d.ts +21 -6
- package/types/src/sheet/SheetOutlineElement.d.ts +70 -0
- package/types/src/sheet/SheetScrollbar.d.ts +1 -10
- package/types/src/sheet/_freezeAt.d.ts +10 -0
- package/types/src/sheet/_useHeaderMetrics.d.ts +11 -0
- package/types/src/sheet/circularReferences.d.ts +9 -1
- package/types/src/sheet/index.d.ts +1 -1
- package/types/src/sheet/useCycleHighlight.d.ts +21 -0
- package/types/src/slicer/SlicerCommands.d.ts +10 -0
- package/types/src/slicer/SlicerEditor.d.ts +8 -2
- package/types/src/slicer/SlicerKind.d.ts +7 -0
- package/types/src/slicer/SlicerStylePreview.d.ts +18 -0
- package/types/src/slicer/index.d.ts +2 -1
- package/types/src/slicer/slicerStyles.d.ts +32 -0
- package/types/src/tabStrip/TabStrip.d.ts +7 -0
- package/types/src/taskPane/ITaskPane.d.ts +12 -1
- package/types/src/taskPane/MovablePane.d.ts +17 -0
- package/types/src/taskPane/index.d.ts +1 -0
- package/types/src/theme/ThemeState.d.ts +14 -1
- package/types/src/theme/useGridColorScheme.d.ts +1 -1
- package/types/src/workbook/DefaultMovableRenderers.d.ts +20 -0
- package/types/src/workbook/IWorkbookElement.d.ts +24 -0
- package/types/src/workbook/WorkbookCommands.d.ts +2 -4
- package/types/src/workbook/WorkbookStrip.d.ts +9 -0
- package/types/src/workbook/_followOrigin.d.ts +9 -0
- package/types/src/workbook/useWorkbookFormat.d.ts +3 -3
- package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
- package/browser/cjs/Pl04-kDEQSO8_qFU.cjs +0 -156
- package/browser/cjs/index.cjs +0 -35
- package/browser/esm/SJMJzBwlXTJ9QIO5.mjs +0 -6286
- package/types/src/editor/useProtectedEditNotice.d.ts +0 -14
- package/types/src/layer/validationList.d.ts +0 -84
- package/types/src/list/SheetValueList.d.ts +0 -93
- package/types/src/list/index.d.ts +0 -2
- package/types/src/movable/MoveableBundle.d.ts +0 -4
|
@@ -1,54 +1,16 @@
|
|
|
1
1
|
import { ISheet, ICell, IMovable } from '@sheetxl/sdk';
|
|
2
|
-
import {
|
|
3
|
-
import { ViewportMetrics, IShowToolTipProperties, ScrollPaneProps, Viewport, ThemeMode } from '@sheetxl/utils-react';
|
|
2
|
+
import { ViewportMetrics, ScrollPaneProps, Viewport, ThemeMode } from '@sheetxl/utils-react';
|
|
4
3
|
import { GridSurfaceProps, IGridSurface, IEditable, LayerNode } from '@sheetxl/grid-react';
|
|
5
|
-
import { SheetCellRendererProps, ColumnButtonConfigProps } from '../cell';
|
|
4
|
+
import { SheetCellRendererProps, ColumnButtonConfigProps, OutlineProps } from '../cell';
|
|
6
5
|
import { MovableElementProps } from '../movable';
|
|
6
|
+
import { CommentCardRenderProps } from '../comment';
|
|
7
|
+
import { HyperlinkCardRenderProps, HyperlinkLayerProps } from '../layer/HyperlinkLayer';
|
|
8
|
+
import { CellErrorTip } from '../layer/CellErrorLayer';
|
|
9
|
+
import { ValidationPrompt } from '../layer/ValidationPromptLayer';
|
|
10
|
+
import { ValidationAlert } from '../editor/validationAlert';
|
|
11
|
+
import { TableToolbarRenderProps } from '../layer/TableToolbar';
|
|
12
|
+
import { CommandContext } from '../frame';
|
|
7
13
|
import { ISheetHeaderElement, SheetHeaderProps } from './ISheetHeaderElement';
|
|
8
|
-
/**
|
|
9
|
-
* Describes how to begin an edit — the imperative "start editing" request the sheet element exposes
|
|
10
|
-
* ({@link ISheetElement.startEdit}), e.g. from a command or the formula bar. The element maps it onto
|
|
11
|
-
* the shared editable's start options.
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* Lives here (the host that owns the request) — grid-react's editor API takes `StartEditOptions`
|
|
15
|
-
* directly and does not carry this shape.
|
|
16
|
-
*/
|
|
17
|
-
export interface StartEditEvent {
|
|
18
|
-
/**
|
|
19
|
-
* Edit text. If this is null or undefined then this will not replace the text.
|
|
20
|
-
*
|
|
21
|
-
* @defaultValue null
|
|
22
|
-
*
|
|
23
|
-
* @remarks
|
|
24
|
-
* * A '' will clear the text.
|
|
25
|
-
*/
|
|
26
|
-
text?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Is editor starting in edit mode.
|
|
29
|
-
*
|
|
30
|
-
* @defaultValue false
|
|
31
|
-
*/
|
|
32
|
-
editMode?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Allows the initial selection position to be overridden. By default it's at the end
|
|
35
|
-
*/
|
|
36
|
-
initialSelection?: {
|
|
37
|
-
start: number;
|
|
38
|
-
end: number;
|
|
39
|
-
direction?: "forward" | "backward" | "none";
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Should the editor take focus when the edit starts.
|
|
43
|
-
*
|
|
44
|
-
* @defaultValue true
|
|
45
|
-
*/
|
|
46
|
-
autoFocus?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* The cell that should be edited
|
|
49
|
-
*/
|
|
50
|
-
cell?: CellCoords;
|
|
51
|
-
}
|
|
52
14
|
export interface SheetLocation {
|
|
53
15
|
clientX: number;
|
|
54
16
|
clientY: number;
|
|
@@ -131,6 +93,12 @@ export interface SheetElementProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
131
93
|
* Fire when a contentMenu is requested
|
|
132
94
|
*/
|
|
133
95
|
onSheetContextMenu?: (location: SheetLocation) => void;
|
|
96
|
+
/**
|
|
97
|
+
* Fired when a right-button drag of the fill handle is released — Excel's fill menu. Show a menu
|
|
98
|
+
* at `location` whose entries run `menu` (see {@link CommandContext.FillMenu}). Omit to leave the
|
|
99
|
+
* right-drag inert.
|
|
100
|
+
*/
|
|
101
|
+
onFillMenu?: (location: SheetLocation, menu: CommandContext.FillMenu) => void;
|
|
134
102
|
/**
|
|
135
103
|
* Called once when the sheet has been loaded but before it is rendered.
|
|
136
104
|
*/
|
|
@@ -154,19 +122,52 @@ export interface SheetElementProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
154
122
|
* @returns A React Element representing the IMovable.
|
|
155
123
|
*/
|
|
156
124
|
renderMovable?: (props: MovableElementProps) => React.ReactElement;
|
|
125
|
+
/**
|
|
126
|
+
* Renders the card of a threaded comment beside its cell: on hover, on selection, and as a draft
|
|
127
|
+
* when a command asks for one. Omit to show no card; the indicators are drawn either way.
|
|
128
|
+
*
|
|
129
|
+
* @param props - {@link CommentCardRenderProps}
|
|
130
|
+
*/
|
|
131
|
+
renderCommentCard?: (props: CommentCardRenderProps) => React.ReactNode;
|
|
132
|
+
/**
|
|
133
|
+
* Renders the card beside a hovered hyperlink cell: its address, copy, edit and remove. Omit for the
|
|
134
|
+
* plain default card.
|
|
135
|
+
*
|
|
136
|
+
* @param props - {@link HyperlinkCardRenderProps}
|
|
137
|
+
*/
|
|
138
|
+
renderHyperlinkCard?: (props: HyperlinkCardRenderProps) => React.ReactNode;
|
|
139
|
+
/** The hyperlink card's options — e.g. `preview` to show a picture of the linked page. */
|
|
140
|
+
propsHyperlink?: Omit<HyperlinkLayerProps, 'sheet' | 'renderCard'>;
|
|
141
|
+
/**
|
|
142
|
+
* Renders the tip beside a hovered cell that carries an error, a warning, a reference cycle or a
|
|
143
|
+
* failed validation. Omit for the plain default tip.
|
|
144
|
+
*
|
|
145
|
+
* @param tip - {@link CellErrorTip}
|
|
146
|
+
*/
|
|
147
|
+
renderCellErrorTip?: (tip: CellErrorTip) => React.ReactNode;
|
|
148
|
+
/**
|
|
149
|
+
* Renders the input prompt of a data validation under the selected cell. Spread `floatProps` on
|
|
150
|
+
* the returned element. Omit for the plain default box: the title in bold over the message.
|
|
151
|
+
*/
|
|
152
|
+
renderValidationPrompt?: (prompt: ValidationPrompt, floatProps: React.HTMLAttributes<HTMLElement>) => React.ReactNode;
|
|
153
|
+
/**
|
|
154
|
+
* Renders the alert a refused or questioned entry raises in the prompt's place. Spread `floatProps`
|
|
155
|
+
* on the returned element. Omit for the plain default card.
|
|
156
|
+
*/
|
|
157
|
+
renderValidationAlert?: (alert: ValidationAlert, floatProps: React.HTMLAttributes<HTMLElement>) => React.ReactNode;
|
|
158
|
+
/**
|
|
159
|
+
* Renders the toolbar that floats at a hovered table's top-right corner: a quick action and a
|
|
160
|
+
* dropdown of the table's commands. Omit for the plain default split button.
|
|
161
|
+
*
|
|
162
|
+
* @param props - {@link TableToolbarRenderProps}
|
|
163
|
+
*/
|
|
164
|
+
renderTableToolbar?: (props: TableToolbarRenderProps) => React.ReactNode;
|
|
157
165
|
/**
|
|
158
166
|
* Render element(s) directly onto the `GridSurface`, bottom → top — the same {@link LayerNode} the
|
|
159
167
|
* grid takes for its children (a node or an array of them). Each layer reads its pane from context
|
|
160
168
|
* ({@link useGridPane}); for a layer that must be built from the pane, call it in a small wrapper.
|
|
161
169
|
*/
|
|
162
170
|
layers?: LayerNode;
|
|
163
|
-
/**
|
|
164
|
-
* To show the tooltip
|
|
165
|
-
*
|
|
166
|
-
* @param props
|
|
167
|
-
*/
|
|
168
|
-
onShowTooltip?: (props: IShowToolTipProperties) => void;
|
|
169
|
-
onCloseTooltip?: () => void;
|
|
170
171
|
/**
|
|
171
172
|
* Customize the grid.
|
|
172
173
|
*
|
|
@@ -182,6 +183,13 @@ export interface SheetElementProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
182
183
|
* This does not invalidate the rendering
|
|
183
184
|
*/
|
|
184
185
|
propsCellRender?: Partial<SheetCellRendererProps> & ColumnButtonConfigProps;
|
|
186
|
+
/**
|
|
187
|
+
* Props for the outline: the gutters that show row and column groups, and their level buttons.
|
|
188
|
+
*
|
|
189
|
+
* @remarks
|
|
190
|
+
* Omitted renderers fall back to plain, unstyled buttons.
|
|
191
|
+
*/
|
|
192
|
+
propsOutline?: OutlineProps;
|
|
185
193
|
/**
|
|
186
194
|
* Ref to the sheet element.
|
|
187
195
|
*/
|
|
@@ -194,12 +202,6 @@ export type ISheetAttributes = {
|
|
|
194
202
|
getGridSurface: () => IGridSurface;
|
|
195
203
|
getRowHeaderElement: () => ISheetHeaderElement;
|
|
196
204
|
getColumnHeaderElement: () => ISheetHeaderElement;
|
|
197
|
-
rowHeaderHeight: () => number;
|
|
198
|
-
colHeaderWidth: () => number;
|
|
199
|
-
startEdit(event?: StartEditEvent): void;
|
|
200
|
-
submitEdit(): void;
|
|
201
|
-
cancelEdit(): void;
|
|
202
|
-
isEditing: boolean;
|
|
203
205
|
contains(element: Node | null): boolean;
|
|
204
206
|
invalidate: (coords?: ICell.Coords | null) => void;
|
|
205
207
|
/**
|
|
@@ -225,11 +227,6 @@ export type ISheetAttributes = {
|
|
|
225
227
|
* Returns the attached `ISheet`.
|
|
226
228
|
*/
|
|
227
229
|
getSheet: () => ISheet;
|
|
228
|
-
/**
|
|
229
|
-
* Wheel intercept (ctrl/⌘+wheel ⇒ zoom). Return `false` to consume the event. Exposed so an outer
|
|
230
|
-
* scroll wrapper can route wheel through the sheet's zoom handling.
|
|
231
|
-
*/
|
|
232
|
-
onWheelScroll: (event: globalThis.WheelEvent) => boolean | void;
|
|
233
230
|
/**
|
|
234
231
|
* For runtime introspection.
|
|
235
232
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ISheet } from '@sheetxl/sdk';
|
|
3
|
-
import { Command } from '@sheetxl/utils-react';
|
|
3
|
+
import { Command, IViewport } from '@sheetxl/utils-react';
|
|
4
4
|
import { SheetEditable } from '../editor';
|
|
5
5
|
import { SheetCommandData } from './SheetCommands';
|
|
6
6
|
/** The `data` bundle for the sheet contributor — the sheet-command data plus the shared editable (for the
|
|
@@ -20,8 +20,8 @@ interface SheetCommandProviderProps {
|
|
|
20
20
|
/** The shared cell editable — the **ready-mode** insert commands (`insertCurrent*`/`insertFunction*`) seed
|
|
21
21
|
* an edit through it. `undefined` on a bare grid ⇒ those commands stay chrome-only (disabled). */
|
|
22
22
|
editable?: SheetEditable | null;
|
|
23
|
-
/** Hand the created `sheet` scope back to the parent (see {@link CommandScopeProvider.scopeRef})
|
|
24
|
-
*
|
|
23
|
+
/** Hand the created `sheet` scope back to the parent (see {@link CommandScopeProvider.scopeRef}), for a
|
|
24
|
+
* host that executes sheet commands directly without a provide/consume wrapper split. */
|
|
25
25
|
scopeRef?: {
|
|
26
26
|
current: Command.CommandScope | null;
|
|
27
27
|
};
|
|
@@ -38,6 +38,11 @@ interface SheetCommandProviderProps {
|
|
|
38
38
|
elementRef?: {
|
|
39
39
|
readonly current: Element | null;
|
|
40
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* The sheet's scroll controller. Zoom to Selection fits the selection into its client size (the
|
|
43
|
+
* model has no viewport size). Omitted ⇒ that command is a no-op.
|
|
44
|
+
*/
|
|
45
|
+
viewport?: IViewport;
|
|
41
46
|
children: ReactNode;
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
@@ -52,6 +57,6 @@ interface SheetCommandProviderProps {
|
|
|
52
57
|
* Only the grid consumes the `sheet` scope, so it lives here (inside the workbook) rather than at studio
|
|
53
58
|
* level. Without an ambient command scope (a bare chromeless grid), this is a pass-through.
|
|
54
59
|
*/
|
|
55
|
-
export declare const SheetCommandProvider: ({ sheet, editable, scopeRef, elementRef, children }: SheetCommandProviderProps) => ReactNode;
|
|
60
|
+
export declare const SheetCommandProvider: ({ sheet, editable, scopeRef, elementRef, viewport, children }: SheetCommandProviderProps) => ReactNode;
|
|
56
61
|
export {};
|
|
57
62
|
//# sourceMappingURL=SheetCommandProvider.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditModeHandler, ReferenceableClipboard, RemoveListener, UndoManager } from '@sheetxl/utils';
|
|
2
|
-
import {
|
|
3
|
-
import { Command, IReactNotifier } from '@sheetxl/utils-react';
|
|
2
|
+
import { IBorders, IRange, IColor, ISheet } from '@sheetxl/sdk';
|
|
3
|
+
import { Command, IReactNotifier, IViewport } from '@sheetxl/utils-react';
|
|
4
4
|
import { ActivateFrameOptions, ITaskPaneArea } from '../taskPane';
|
|
5
5
|
/** Minimal shape of the global clipboard handle the insert-copied-cells path reads. */
|
|
6
6
|
interface GlobalClipboardLike {
|
|
@@ -31,8 +31,14 @@ export interface ContributeSheetCommandsOptions {
|
|
|
31
31
|
editModeHandler?: EditModeHandler;
|
|
32
32
|
/** Global clipboard — insert-cells reads a copied range reference to "insert copied cells". */
|
|
33
33
|
globalClipboard?: GlobalClipboardLike;
|
|
34
|
-
/** Persistent last-used values for the style pickers (color quick swatch + border) + memory. From the bridge's `
|
|
34
|
+
/** Persistent last-used values for the style pickers (color quick swatch + border) + memory. From the bridge's `usePersistentState`. */
|
|
35
35
|
pickerMemory?: PickerMemory;
|
|
36
|
+
/**
|
|
37
|
+
* The sheet's scroll controller — the cell area's client size, which Zoom to Selection fits the
|
|
38
|
+
* selection into. The model has no viewport size, so it cannot do this itself. Omitted ⇒ the command
|
|
39
|
+
* is a no-op (a bare grid).
|
|
40
|
+
*/
|
|
41
|
+
viewport?: IViewport;
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
44
|
* The single `data` bundle {@link contributeSheetCommands} takes — the sheet **and** its services
|
|
@@ -41,9 +47,18 @@ export interface ContributeSheetCommandsOptions {
|
|
|
41
47
|
export interface SheetCommandData extends ContributeSheetCommandsOptions {
|
|
42
48
|
sheet: ISheet | null;
|
|
43
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* The arguments of the `freezePanesAt` command.
|
|
52
|
+
*/
|
|
53
|
+
export interface FreezePanesAtArgs {
|
|
54
|
+
/** The axis to move: `Column` moves the vertical freeze line, `Row` the horizontal one. */
|
|
55
|
+
axis: IRange.Axis;
|
|
56
|
+
/** The number of rows or columns to freeze. `0` unfreezes the axis; the other axis is left as it is. */
|
|
57
|
+
index: number;
|
|
58
|
+
}
|
|
44
59
|
/**
|
|
45
60
|
* Persistent "last used" values for the style pickers — the quick swatch (`quickColor`/`quickBorder`) and the
|
|
46
|
-
* `onColorSelect`/`onBorderSelect` memory. Owned by the bridge (`
|
|
61
|
+
* `onColorSelect`/`onBorderSelect` memory. Owned by the bridge (`usePersistentState`) and passed as **live
|
|
47
62
|
* getters** so the lazy `context` closures read the current value without re-contributing. Only fill/font
|
|
48
63
|
* color + border persist; the tab/gridline color pickers don't (their `onColorSelect` is a no-op).
|
|
49
64
|
*/
|
|
@@ -52,8 +67,8 @@ export interface PickerMemory {
|
|
|
52
67
|
setLastFillColor?: (color: IColor | null) => void;
|
|
53
68
|
getLastFontColor?: () => IColor | null;
|
|
54
69
|
setLastFontColor?: (color: IColor | null) => void;
|
|
55
|
-
getLastBorder?: () => Partial<
|
|
56
|
-
setLastBorder?: (border: Partial<
|
|
70
|
+
getLastBorder?: () => Partial<IBorders.Properties> | null;
|
|
71
|
+
setLastBorder?: (border: Partial<IBorders.Properties> | null) => void;
|
|
57
72
|
}
|
|
58
73
|
/**
|
|
59
74
|
* The per-sheet command **behavior** (paired with {@link registerSheetDefinitions}). A plain
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FixedEdge } from '@sheetxl/utils';
|
|
3
|
+
import { IRange, ISheet } from '@sheetxl/sdk';
|
|
4
|
+
import { Viewport, ThemeMode } from '@sheetxl/utils-react';
|
|
5
|
+
import { OutlineButtonProps, OutlineLevelButtonProps } from '../cell/OutlineButton';
|
|
6
|
+
export interface SheetOutlineElementProps extends React.HTMLAttributes<HTMLElement> {
|
|
7
|
+
/** The sheet whose outline is drawn. */
|
|
8
|
+
sheet: ISheet;
|
|
9
|
+
/** Rows (the gutter left of the row headers) or columns (above the column headers). */
|
|
10
|
+
axis: IRange.Axis;
|
|
11
|
+
/** The lanes across the gutter: one per level, plus one. */
|
|
12
|
+
lanes: number;
|
|
13
|
+
/** The gutter's thickness across the axis, in pixels. */
|
|
14
|
+
thickness: number;
|
|
15
|
+
/** The headers frozen at the start of the axis. */
|
|
16
|
+
freezeStart?: number | FixedEdge;
|
|
17
|
+
/** The sheet's main viewport; the gutter follows it along the axis. */
|
|
18
|
+
viewport?: Viewport;
|
|
19
|
+
/** The app color scheme. */
|
|
20
|
+
colorScheme?: ThemeMode;
|
|
21
|
+
/** Renders a group's collapse / expand button. Defaults to `OutlineButton`. */
|
|
22
|
+
renderButton?: (props: OutlineButtonProps) => React.ReactNode;
|
|
23
|
+
/** The space around the buttons, in pixels: between neighbors, before the first and after the last. */
|
|
24
|
+
laneGap?: number;
|
|
25
|
+
/** Space between a bracket's end and its button, in pixels. */
|
|
26
|
+
bracketGap?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The outline gutter for one axis: the brackets and collapse buttons of the row or column groups.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Built like `SheetHeaderElement` — its own `GridSurface` over the header's offsets, following the
|
|
33
|
+
* sheet's viewport along the axis, so it scrolls, zooms, hides and freezes with the headers. The
|
|
34
|
+
* owner decides whether there is one (see `ISheetView.isShowOutlineSymbols` and `getLevelCount`) and sizes
|
|
35
|
+
* it.
|
|
36
|
+
*
|
|
37
|
+
* It is app chrome, not header: it declares the `app` surface and paints no fill, so it shows what
|
|
38
|
+
* the sheet sits on, as the level buttons beside it do.
|
|
39
|
+
*/
|
|
40
|
+
export declare const SheetOutlineElement: React.MemoExoticComponent<(props: SheetOutlineElementProps) => React.JSX.Element>;
|
|
41
|
+
export interface SheetOutlineLevelsProps extends React.HTMLAttributes<HTMLElement> {
|
|
42
|
+
/** The sheet whose outline the buttons show levels of. */
|
|
43
|
+
sheet: ISheet;
|
|
44
|
+
/** Rows or columns. */
|
|
45
|
+
axis: IRange.Axis;
|
|
46
|
+
/** The number of buttons: one per level, plus one. */
|
|
47
|
+
lanes: number;
|
|
48
|
+
/** The size of one lane, in pixels. */
|
|
49
|
+
laneSize: number;
|
|
50
|
+
/**
|
|
51
|
+
* The space around the buttons, in pixels: between neighbors, before the first and after the last.
|
|
52
|
+
*
|
|
53
|
+
* @defaultValue 1
|
|
54
|
+
*/
|
|
55
|
+
laneGap?: number;
|
|
56
|
+
/** The app color scheme. */
|
|
57
|
+
colorScheme?: ThemeMode;
|
|
58
|
+
/** Renders a level button. Defaults to `OutlineLevelButton`. */
|
|
59
|
+
renderLevelButton?: (props: OutlineLevelButtonProps) => React.ReactNode;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The level buttons `1`..`n` for one axis: button *k* shows the groups above level *k* and collapses
|
|
63
|
+
* the rest (`IOutline.setVisibleLevels`).
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* Row buttons run across the row gutter (beside the column headers); column buttons run down the
|
|
67
|
+
* column gutter (beside the row headers), one per lane.
|
|
68
|
+
*/
|
|
69
|
+
export declare const SheetOutlineLevels: React.MemoExoticComponent<(props: SheetOutlineLevelsProps) => React.JSX.Element>;
|
|
70
|
+
//# sourceMappingURL=SheetOutlineElement.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ISheet } from '@sheetxl/sdk';
|
|
3
|
-
import { ScrollbarOrientation, VirtualScrollbarProps, IScrollbarElement
|
|
3
|
+
import { ScrollbarOrientation, VirtualScrollbarProps, IScrollbarElement } from '@sheetxl/utils-react';
|
|
4
4
|
export interface SheetScrollbarProps extends VirtualScrollbarProps {
|
|
5
5
|
/**
|
|
6
6
|
* The `ISheet` for the given scrollbar.
|
|
@@ -14,15 +14,6 @@ export interface SheetScrollbarProps extends VirtualScrollbarProps {
|
|
|
14
14
|
* @defaultValue false
|
|
15
15
|
*/
|
|
16
16
|
showCustomScrollButtons?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* To show the tooltip
|
|
19
|
-
* @param properties
|
|
20
|
-
*/
|
|
21
|
-
onShowTooltip?: (properties: IShowToolTipProperties) => void;
|
|
22
|
-
/**
|
|
23
|
-
* Called to close the tooltip. Required is onShowTip is provided
|
|
24
|
-
*/
|
|
25
|
-
onCloseTooltip?: () => void;
|
|
26
17
|
}
|
|
27
18
|
export declare const SheetScrollbar: React.NamedExoticComponent<Omit<SheetScrollbarProps, "ref"> & React.RefAttributes<IScrollbarElement>>;
|
|
28
19
|
//# sourceMappingURL=SheetScrollbar.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ISheetView, IRange } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Move one axis's freeze to `index` (`0` unfreezes that axis), leaving the other axis as it is.
|
|
4
|
+
*
|
|
5
|
+
* Each frozen area keeps the start it already has; an axis that becomes frozen starts at the scrolled
|
|
6
|
+
* position. Either way what is on screen stays put — provided the scrolling area starts exactly at the
|
|
7
|
+
* current freeze, which is when the freeze grip allows a drag.
|
|
8
|
+
*/
|
|
9
|
+
export declare const freezeAt: (view: ISheetView, axis: IRange.Axis, index: number) => void;
|
|
10
|
+
//# sourceMappingURL=_freezeAt.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ISheetHeader } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* The header's metrics as last announced: replaced on `onMetricsChange` (heard once the operation that
|
|
4
|
+
* changed them closes), not read fresh on every render. Everything that lays out from the returned
|
|
5
|
+
* metrics agrees, whatever re-renders in between.
|
|
6
|
+
*
|
|
7
|
+
* @returns The held metrics, and `refresh` to take the header's current metrics early — e.g. on each
|
|
8
|
+
* move of a resize drag, while its operation is still open.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useHeaderMetrics: (header: ISheetHeader) => [ISheetHeader.IMetrics, () => void];
|
|
11
|
+
//# sourceMappingURL=_useHeaderMetrics.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRange, ISheet } from '@sheetxl/sdk';
|
|
2
2
|
/**
|
|
3
|
-
* The cell a sheet's status bar names for its circular references — Excel's
|
|
3
|
+
* The cell a sheet's status bar names for its UNRESOLVED circular references — Excel's
|
|
4
4
|
* `Worksheet.CircularReference`, one cell — or `null` when the sheet has none.
|
|
5
5
|
*
|
|
6
6
|
* @remarks
|
|
@@ -8,6 +8,14 @@ import { IRange, ISheet } from '@sheetxl/sdk';
|
|
|
8
8
|
* regions (engine-merged blocks, so a 1000-row downstream block costs one region). A sheet that
|
|
9
9
|
* only READS a cycle (every member is on another sheet) answers that cycle's representative,
|
|
10
10
|
* scoped to its own sheet, so the status bar can still point at the fix.
|
|
11
|
+
*
|
|
12
|
+
* A cycle that ITERATED is skipped, converged or stopped on the cap alike: iterative calculation
|
|
13
|
+
* makes a cycle a computation rather than a mistake, and its result is what the user turned the
|
|
14
|
+
* setting on for. Excel is the same and this is the measurement it comes from — its
|
|
15
|
+
* `Worksheet.CircularReference` answers `(none)` while iterating and names the cell again the
|
|
16
|
+
* moment `Iteration` is turned off (DESIGN-CIRCULAR-CALC §2.4). The cell keeps its marker either
|
|
17
|
+
* way, so an iterated cycle stays discoverable where it is; what goes quiet is the workbook-level
|
|
18
|
+
* alarm, which is the same line `ICell.getErrors()` draws (§7.3).
|
|
11
19
|
*/
|
|
12
20
|
export declare const findSheetCircularReference: (sheet: ISheet) => IRange.CellCoords | null;
|
|
13
21
|
/**
|
|
@@ -2,7 +2,7 @@ export type * from './ISheetElement';
|
|
|
2
2
|
export * from './SheetElement';
|
|
3
3
|
export * from './SheetScrollbar';
|
|
4
4
|
export * from './SheetCommands';
|
|
5
|
-
export * from './ConditionalFormatPresets';
|
|
6
5
|
export * from './SheetCommandProvider';
|
|
7
6
|
export * from './circularReferences';
|
|
7
|
+
export * from './useCycleHighlight';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ICalculation, ISheet } from '@sheetxl/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Outlines a reference cycle's MEMBERS on the grid for as long as the caller is mounted — the
|
|
4
|
+
* highlight behind a circular tooltip.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The cycle's `getMembers()` go onto the reference-mode bus as a detached selection with no active
|
|
8
|
+
* index, the same shape the formula-view fallback publishes for a formula's references
|
|
9
|
+
* (`SheetReferenceLayer`), so the members are outlined by the machinery that already colors
|
|
10
|
+
* references — and the tooltip's addresses, colored by the same index, line up with them.
|
|
11
|
+
*
|
|
12
|
+
* Marked `readOnly`, because these outlines are an annotation: there is no text behind them for a
|
|
13
|
+
* drag to write back to.
|
|
14
|
+
*
|
|
15
|
+
* **Only when nobody owns the bus.** An edit or a pick in progress always wins — the highlight is
|
|
16
|
+
* not published at all while one is live, and a producer that starts DURING a hover replaces it
|
|
17
|
+
* (the cleanup then finds someone else's state and leaves it alone, rather than clearing a live
|
|
18
|
+
* edit's references out from under it). A cycle with no live members publishes nothing.
|
|
19
|
+
*/
|
|
20
|
+
export declare const useCycleHighlight: (sheet: ISheet | null, cycle: ICalculation.ICircularReference | null | undefined) => void;
|
|
21
|
+
//# sourceMappingURL=useCycleHighlight.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Command } from '@sheetxl/utils-react';
|
|
2
|
+
import { MovableKindCommandData } from '../movable';
|
|
3
|
+
/**
|
|
4
|
+
* The slicer kind's commands, for the active slicer. Chrome is the `slicer` catalog.
|
|
5
|
+
*
|
|
6
|
+
* `formatSlicerStyle` takes a style name; its state is the slicer's style, and its context hands a
|
|
7
|
+
* gallery the slicer and the workbook's styles to draw previews with.
|
|
8
|
+
*/
|
|
9
|
+
export declare const contributeSlicerCommands: Command.DynamicCommandContributor<MovableKindCommandData>;
|
|
10
|
+
//# sourceMappingURL=SlicerCommands.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { ISlicer } from '@sheetxl/sdk';
|
|
2
3
|
import { MovableElementProps } from '../movable';
|
|
3
4
|
export interface SlicerEditorAttributes {
|
|
4
5
|
isSlicerEditor: () => true;
|
|
@@ -6,11 +7,16 @@ export interface SlicerEditorAttributes {
|
|
|
6
7
|
export interface ISlicerEditorElement extends HTMLDivElement, SlicerEditorAttributes {
|
|
7
8
|
}
|
|
8
9
|
export interface SlicerEditorProps extends MovableElementProps {
|
|
9
|
-
slicer:
|
|
10
|
+
slicer: ISlicer;
|
|
10
11
|
ref?: React.Ref<ISlicerEditorElement>;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Draws a slicer: its caption, and a button for each item that filters the column.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* A press on an item filters and never drags; the caption bar and the frame's edge drag, as in
|
|
18
|
+
* Excel. A click selects the item alone, Ctrl+click toggles it, Shift+click selects a run of
|
|
19
|
+
* items, and with multi-select on a plain click toggles.
|
|
14
20
|
*/
|
|
15
21
|
export declare const SlicerEditor: React.NamedExoticComponent<Omit<SlicerEditorProps, "ref"> & React.RefAttributes<ISlicerEditorElement>>;
|
|
16
22
|
//# sourceMappingURL=SlicerEditor.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MovableRendererModule } from '../movable/MovableRenderers';
|
|
2
|
+
/**
|
|
3
|
+
* The slicer kind, as the renderer registry loads it: one module, so a failed fetch can be
|
|
4
|
+
* imported again whole.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SlicerKind: MovableRendererModule;
|
|
7
|
+
//# sourceMappingURL=SlicerKind.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IStyleCollection } from '@sheetxl/sdk';
|
|
3
|
+
export interface SlicerStylePreviewProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** The slicer style's name. */
|
|
5
|
+
styleName: string;
|
|
6
|
+
/** The workbook's styles: they hold the style, and their theme resolves its colors. */
|
|
7
|
+
styles: IStyleCollection | null;
|
|
8
|
+
/** @defaultValue 56 */
|
|
9
|
+
width?: number;
|
|
10
|
+
/** @defaultValue 60 */
|
|
11
|
+
height?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A small picture of a slicer in a style: its frame, a header and four items in their states.
|
|
15
|
+
* What a style gallery shows for each style.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SlicerStylePreview: React.MemoExoticComponent<(props: SlicerStylePreviewProps) => React.ReactElement>;
|
|
18
|
+
//# sourceMappingURL=SlicerStylePreview.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IStyleCollection, ISlicerStyle, ICellStyle } from '@sheetxl/sdk';
|
|
3
|
+
/** The slicer styles' names, grouped as a style gallery lists them. */
|
|
4
|
+
export interface SlicerStyleNames {
|
|
5
|
+
/** The document's own styles, by name. A customized built-in stays in its built-in group. */
|
|
6
|
+
custom: string[];
|
|
7
|
+
light: string[];
|
|
8
|
+
other: string[];
|
|
9
|
+
dark: string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Returns the workbook's slicer styles' names, grouped as a style gallery lists them.
|
|
13
|
+
*
|
|
14
|
+
* @param styles The workbook's styles; without them every group is empty.
|
|
15
|
+
*/
|
|
16
|
+
export declare const getSlicerStyleNames: (styles: IStyleCollection | null) => SlicerStyleNames;
|
|
17
|
+
/**
|
|
18
|
+
* Returns a slicer style's elements by name, or the default style's for a name that is not one.
|
|
19
|
+
*
|
|
20
|
+
* @param styles The workbook's styles; without them there is no style, and `null` is returned.
|
|
21
|
+
*/
|
|
22
|
+
export declare const getSlicerStyle: (name: string, styles: IStyleCollection | null) => Readonly<ISlicerStyle.Properties> | null;
|
|
23
|
+
/** The style element an item is drawn with. */
|
|
24
|
+
export declare const slicerItemElement: (selected: boolean, hasData: boolean, hovered: boolean) => ISlicerStyle.ElementType;
|
|
25
|
+
/**
|
|
26
|
+
* Resolves a style element, a differential cell format, to CSS against the workbook's theme:
|
|
27
|
+
* its text color and weight, its fill and its border.
|
|
28
|
+
*
|
|
29
|
+
* @param styles The workbook's styles, whose theme resolves theme colors.
|
|
30
|
+
*/
|
|
31
|
+
export declare const slicerElementCSS: (element: ICellStyle.Properties | undefined, styles: IStyleCollection | null) => React.CSSProperties;
|
|
32
|
+
//# sourceMappingURL=slicerStyles.d.ts.map
|
|
@@ -31,6 +31,13 @@ export interface TabStripProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
31
31
|
*/
|
|
32
32
|
borderWidth?: number;
|
|
33
33
|
borderColor?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Draw the line along the strip's top edge (the one the selected tab notches). Off where the row
|
|
36
|
+
* above already separates the tabs from the grid.
|
|
37
|
+
*
|
|
38
|
+
* @defaultValue true
|
|
39
|
+
*/
|
|
40
|
+
seam?: boolean;
|
|
34
41
|
/** CSS color for the selected-tab accent. */
|
|
35
42
|
activeColor?: string;
|
|
36
43
|
}
|
|
@@ -45,7 +45,7 @@ export interface TaskPaneProps<T = any, A = any> extends React.HTMLAttributes<HT
|
|
|
45
45
|
* Threaded from a command through `activateTaskPane(key, { args })` — see
|
|
46
46
|
* `ItemsDescriptor.createSeededDraft` in `@sheetxl/studio-mui` for the receiving end.
|
|
47
47
|
*/
|
|
48
|
-
export interface ItemsPaneArgs<P = any> {
|
|
48
|
+
export interface ItemsPaneArgs<P = any, T = any> {
|
|
49
49
|
/**
|
|
50
50
|
* Open the pane editing a NEW, uncommitted item seeded with these properties, rather than on its
|
|
51
51
|
* list.
|
|
@@ -68,5 +68,16 @@ export interface ItemsPaneArgs<P = any> {
|
|
|
68
68
|
* Ignored by a pane whose list is read-only, which shows no add button either.
|
|
69
69
|
*/
|
|
70
70
|
insert?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Open the pane editing this EXISTING item — precisely what the item's own card edit does —
|
|
73
|
+
* rather than on its list. What an "Edit…" reaching the pane from elsewhere (the name box's
|
|
74
|
+
* menu) asks for.
|
|
75
|
+
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* The item itself, not its properties: it is already committed, and the pane needs its identity
|
|
78
|
+
* to write the edit back to. Ignored by a pane whose list is read-only; a `draft` or `insert`
|
|
79
|
+
* wins when both are given.
|
|
80
|
+
*/
|
|
81
|
+
edit?: T;
|
|
71
82
|
}
|
|
72
83
|
//# sourceMappingURL=ITaskPane.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TaskPaneProps } from './ITaskPane';
|
|
3
|
+
/** The key the format pane is registered under, and of the command that opens it. */
|
|
4
|
+
export declare const FORMAT_MOVABLE_PANE_KEY = "formatMovable";
|
|
5
|
+
/**
|
|
6
|
+
* The format pane: follows the movable selection and shows the active movable's kind name above the
|
|
7
|
+
* body its kind supplies (`MovableRendererModule.pane`, or one given with `registerMovablePane`). With
|
|
8
|
+
* nothing selected, or for a kind without a body, it says so.
|
|
9
|
+
*/
|
|
10
|
+
export declare const MovablePane: (props: TaskPaneProps) => React.ReactElement;
|
|
11
|
+
/**
|
|
12
|
+
* Registers the format pane ({@link MovablePane}) with the default task pane registry, unless a pane
|
|
13
|
+
* is already registered under its key. Its title and icon come from the `formatMovable` catalog
|
|
14
|
+
* entry. The `formatMovable` command calls it before opening the pane.
|
|
15
|
+
*/
|
|
16
|
+
export declare function registerFormatMovablePane(): void;
|
|
17
|
+
//# sourceMappingURL=MovablePane.d.ts.map
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import { ThemeMode } from '@sheetxl/utils-react';
|
|
1
2
|
/**
|
|
2
3
|
* Persistence keys for the spreadsheet's self-managed appearance state.
|
|
3
4
|
*
|
|
4
5
|
* @remarks
|
|
5
|
-
* Owned via `
|
|
6
|
+
* Owned via `usePersistentState` against the surrounding `PersistentStateProvider` (Studio, or a
|
|
6
7
|
* standalone host). A consumer that wants to read or set them (e.g. a VS Code host driving the mode from
|
|
7
8
|
* its editor theme) does so with the same key, or by supplying its own provider/store. They are
|
|
8
9
|
* intentionally not component props — appearance is *state*, theme customization is *config* (see
|
|
9
10
|
* `Studio.theme`).
|
|
11
|
+
*
|
|
12
|
+
* A host changes the starting value of any of these with `PersistentStateProvider`'s `defaultValues`;
|
|
13
|
+
* the user's own choice still wins.
|
|
10
14
|
*/
|
|
11
15
|
export declare const ThemeStateKey: {
|
|
12
16
|
/** The user's light/dark override (`null` = follow system). */
|
|
@@ -16,4 +20,13 @@ export declare const ThemeStateKey: {
|
|
|
16
20
|
/** Whether images invert in a dark grid. */
|
|
17
21
|
readonly DarkImages: "enableDarkImages";
|
|
18
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* The shipped defaults for {@link ThemeStateKey}, used when neither the store nor the provider's
|
|
25
|
+
* `defaultValues` has a value. They match Excel: follow the system mode, light grid, images unchanged.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ThemeStateDefaults: {
|
|
28
|
+
readonly themeMode: ThemeMode | null;
|
|
29
|
+
readonly enableDarkGrid: false;
|
|
30
|
+
readonly enableDarkImages: false;
|
|
31
|
+
};
|
|
19
32
|
//# sourceMappingURL=ThemeState.d.ts.map
|