@sheetxl/react 0.8.0-beta.10 → 0.8.0-beta.12
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/B4mT3G7GHwgDYFGP.mjs +128 -0
- package/browser/esm/{BwRduT8FTrk5n72r.mjs → BDlpRkuBok0Uu4Hn.mjs} +1 -1
- package/browser/esm/BR-AiOwuQlYh5-tr.mjs +730 -0
- package/browser/esm/{BuvXl14hs-1CvjeA.mjs → BapujiblfiXDlu67.mjs} +1 -1
- package/browser/esm/{DyU9UInRnfkPYYlR.mjs → CSFORKZ8zrVL_Y0w.mjs} +1 -1
- package/browser/esm/CUekkfE6uwwsdQpc.mjs +36 -0
- package/browser/esm/C_LUq-BnguetvGZz.mjs +23561 -0
- package/browser/esm/{BZcQ-KYwS62Ut45c.mjs → Ck1LbcsdSfKNi6xq.mjs} +1 -1
- package/browser/esm/{CYoUd5KIl7W3AsxH.mjs → Cslk_qRdBSuJIi1O.mjs} +24 -23
- package/browser/esm/CtGhA0kS2MCfEsHN.mjs +262 -0
- package/browser/esm/D22NJmTiky4NL8tM.mjs +8 -0
- package/browser/esm/D2GydDzPuvIjdpok.mjs +42 -0
- package/browser/esm/DGG1auUKsjFbAazu.mjs +60 -0
- package/browser/esm/{Cfe0kofqVKGxLqO6.mjs → DN3lqq95KY0K6f1x.mjs} +1 -1
- package/browser/esm/{DjiBz4H74I6nPUY6.mjs → D_usN3pWuCJU2GN-.mjs} +2 -2
- package/browser/esm/{Sp6PJavGKpF8SJzA.mjs → DhYQRc8L2kALmFNz.mjs} +1 -1
- package/browser/esm/{Bow9CzRJrYxak2i5.mjs → DxEczXCHTerDemDP.mjs} +113 -108
- package/browser/esm/{Dd-ZybXAgoq9pgGv.mjs → LBQDhVhz7S7i6a8i.mjs} +1 -1
- package/browser/esm/{C6urN77szrYwODXF.mjs → ZoS0cpNEBcv6p-Z1.mjs} +1 -1
- package/browser/esm/{cYjYjqEsyd63x8t4.mjs → _6Sb6ElRcZftxMNh.mjs} +1 -1
- package/browser/esm/chart.mjs +33 -52
- package/browser/esm/control.mjs +2 -2
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +8074 -5647
- package/browser/esm/note.mjs +73 -47
- package/browser/esm/picture.mjs +41 -41
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +5 -5
- package/licenses/dependencies.txt +313 -1
- package/node/esm/{Dxbm6ryIDCEi26RO.mjs → Apcuz4_QtBHt7G47.mjs} +1 -1
- package/node/esm/Bi2Jwc0zpweaNzKc.mjs +1697 -0
- package/node/esm/{Buw-VKYJy3y5dbaJ.mjs → C0KLMCRb3sbd5Q20.mjs} +23 -22
- package/node/esm/CH1DVfFhjdd_3pw1.mjs +128 -0
- package/node/esm/{BJ7ZZm63j5O6cvrB.mjs → CNOLkUDURBElaaIf.mjs} +1 -1
- package/node/esm/{DhSq680c5tgMFFbj.mjs → CalVk3o4-kX79s3v.mjs} +1 -1
- package/node/esm/{DYosMUJKp-3MSO4q.mjs → Cp1DuCae46eQKzWy.mjs} +1 -1
- package/node/esm/CzN6c6KyxVmNvayz.mjs +8 -0
- package/node/esm/DKqdv5JubgVaq-g9.mjs +35 -0
- package/node/esm/DWkPWuf5ZrLRMixG.mjs +328 -0
- package/node/esm/{BfRn5S5V4X8xIAEa.mjs → DXiNwr6ZnXBe7TlG.mjs} +1 -1
- package/node/esm/DayGI0Bt57FDNbVF.mjs +37 -0
- package/node/esm/{CM5BT7h-hMtST2bE.mjs → DyetXBW7vFLJWB22.mjs} +1 -1
- package/node/esm/{CFFlJxNwgyInjEnh.mjs → MWges5ywL3aEdChp.mjs} +1 -1
- package/node/esm/{DPN0n6MGYQ9vZ2KO.mjs → T5lfCrudsUnOTxEn.mjs} +1 -1
- package/node/esm/YB_qExw23Ci4nMYy.mjs +263 -0
- package/node/esm/{GkmuxU7OwRZtm2Rf.mjs → bRD1KCpSpAYTEs50.mjs} +1 -1
- package/node/esm/chart.mjs +32 -51
- package/node/esm/control.mjs +2 -2
- package/node/esm/group.mjs +3 -3
- package/node/esm/{C_ANM4feA1xV-pri.mjs → iL9jKJcnED6oi0B4.mjs} +1 -1
- package/node/esm/index.mjs +10998 -8556
- package/node/esm/note.mjs +86 -60
- package/node/esm/picture.mjs +41 -41
- package/node/esm/shape.mjs +285 -332
- package/node/esm/slicer.mjs +15 -15
- package/package.json +8 -6
- package/resources/contents.json +6 -0
- package/resources/locales/contents.json +14 -0
- package/resources/locales/de/chart.cmd.json +82 -0
- package/resources/locales/de/sheet.cmd.json +32 -0
- package/resources/locales/de/table.cmd.json +1 -1
- package/resources/locales/de/ui.msg.json +12 -0
- package/resources/locales/de/workbook.cmd.json +11 -0
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/sheet.cmd.json +32 -0
- package/resources/locales/en/table.cmd.json +1 -1
- package/resources/locales/en/ui.msg.json +14 -0
- package/resources/locales/en/workbook.cmd.json +11 -0
- package/types/src/autoFill/FillMenu.d.ts +2 -2
- package/types/src/autoFill/FillSeries.d.ts +2 -2
- package/types/src/border/StaticBorderRenderer.d.ts +18 -1
- package/types/src/border/useBorders.d.ts +76 -3
- package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
- package/types/src/cell/CellContent.d.ts +68 -0
- package/types/src/cell/CellControlContext.d.ts +37 -0
- package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +10 -7
- package/types/src/cell/CellImageRenderer.d.ts +11 -0
- package/types/src/cell/CellRenderers.d.ts +190 -0
- package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +9 -6
- package/types/src/cell/ColumnButton.d.ts +3 -3
- package/types/src/cell/OutlineButton.d.ts +4 -4
- package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
- package/types/src/cell/index.d.ts +8 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +3 -3
- package/types/src/cell/useInsertableCellControls.d.ts +25 -0
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +12 -2
- package/types/src/chart/ChartElement.d.ts +122 -0
- package/types/src/chart/ChartKind.d.ts +7 -0
- package/types/src/chart/PresetChartTypeDescriptors.d.ts +3 -1
- package/types/src/chart/index.d.ts +2 -0
- package/types/src/chart/paint/_fills.d.ts +24 -0
- package/types/src/chart/paint/_graphics.d.ts +46 -0
- package/types/src/chart/paint/_mode.d.ts +6 -0
- package/types/src/chart/paint/echarts.d.ts +33 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +140 -0
- package/types/src/chart/paint/kinds/_Area.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_BoxWhisker.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Funnel.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Histogram.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Line.d.ts +10 -0
- package/types/src/chart/paint/kinds/_OfPie.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Pie.d.ts +21 -0
- package/types/src/chart/paint/kinds/_Placeholder.d.ts +7 -0
- package/types/src/chart/paint/kinds/_Radar.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Scatter.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Sunburst.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Surface.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Treemap.d.ts +3 -0
- package/types/src/chart/paint/kinds/_Waterfall.d.ts +3 -0
- package/types/src/chart/paint/kinds/_builtIns.d.ts +12 -0
- package/types/src/chart/paint/toEChartsOption.d.ts +42 -0
- package/types/src/clipboard/ClipboardCommands.d.ts +3 -3
- package/types/src/clipboard/SheetClipboardLayer.d.ts +2 -2
- package/types/src/comment/CommentCardRequest.d.ts +9 -9
- package/types/src/comment/useSheetComments.d.ts +2 -2
- package/types/src/context/WorksheetContext.d.ts +18 -0
- package/types/src/context/index.d.ts +1 -1
- package/types/src/editableLabel/EditableLabel.d.ts +3 -1
- package/types/src/editor/EditorCommands.d.ts +3 -3
- package/types/src/editor/SheetCellEditorLayer.d.ts +2 -2
- package/types/src/editor/SheetCellEditorStartLayer.d.ts +22 -5
- package/types/src/editor/SheetEditable.d.ts +6 -6
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
- package/types/src/editor/SheetReferenceLayer.d.ts +4 -4
- package/types/src/editor/VirtualKeyboardLayer.d.ts +49 -0
- package/types/src/editor/formulaAnchor.d.ts +12 -0
- package/types/src/editor/index.d.ts +1 -0
- package/types/src/editor/pickedReference.d.ts +3 -3
- package/types/src/editor/useEditRejectedNotice.d.ts +3 -3
- package/types/src/editor/useFormulaHints.d.ts +3 -3
- package/types/src/editor/validationAlert.d.ts +3 -3
- package/types/src/frame/CommandContext.d.ts +7 -7
- package/types/src/index.d.ts +2 -0
- package/types/src/layer/BorderLayer.d.ts +2 -2
- package/types/src/layer/CellErrorLayer.d.ts +5 -4
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
- package/types/src/layer/CellInsertLayer.d.ts +71 -0
- package/types/src/layer/CircularIndicatorLayer.d.ts +2 -2
- package/types/src/layer/CommentCardLayer.d.ts +2 -2
- package/types/src/layer/CommentsLayer.d.ts +2 -2
- package/types/src/layer/ConditionalBarLayer.d.ts +2 -2
- package/types/src/layer/ConditionalIconsLayer.d.ts +2 -2
- package/types/src/layer/ContextMenuLayer.d.ts +2 -2
- package/types/src/layer/GridFreezeLayer.d.ts +2 -2
- package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
- package/types/src/layer/HyperlinkLayer.d.ts +11 -8
- package/types/src/layer/MovableKindScope.d.ts +2 -2
- package/types/src/layer/ProtectionLayer.d.ts +4 -5
- package/types/src/layer/RangeAnnotationLayer.d.ts +2 -2
- package/types/src/layer/ResizeIndicator.d.ts +2 -2
- package/types/src/layer/SheetBackgroundLayer.d.ts +3 -3
- package/types/src/layer/SheetCellLayer.d.ts +15 -8
- package/types/src/layer/SheetColumnButtonLayer.d.ts +2 -2
- package/types/src/layer/SheetGridLineLayer.d.ts +11 -13
- package/types/src/layer/SheetLayers.d.ts +115 -0
- package/types/src/layer/SheetMovableLayer.d.ts +4 -3
- package/types/src/layer/SheetOutlineLayer.d.ts +3 -3
- package/types/src/layer/SheetTableCommandLayer.d.ts +2 -2
- package/types/src/layer/SpillLayer.d.ts +2 -2
- package/types/src/layer/TableLayer.d.ts +3 -3
- package/types/src/layer/TableToolbar.d.ts +4 -4
- package/types/src/layer/ValidationDropdownLayer.d.ts +2 -2
- package/types/src/layer/ValidationIndicatorLayer.d.ts +2 -2
- package/types/src/layer/ValidationPromptLayer.d.ts +21 -8
- package/types/src/layer/_tableColor.d.ts +2 -2
- package/types/src/layer/index.d.ts +3 -0
- package/types/src/layer/useFreezeDrag.d.ts +2 -2
- package/types/src/layer/useNormalBorderLines.d.ts +15 -0
- package/types/src/layer/useSheetFeatureRegions.d.ts +2 -2
- package/types/src/layer/useSheetVisibleCells.d.ts +2 -2
- package/types/src/layer/useSheetVisibleDecorations.d.ts +2 -2
- package/types/src/layer/useTableHeaderCells.d.ts +2 -2
- package/types/src/layer/useValidationPicker.d.ts +2 -2
- package/types/src/layer/useVisibleTables.d.ts +2 -2
- package/types/src/layer/validationMark.d.ts +3 -3
- package/types/src/listener/index.d.ts +5 -0
- package/types/src/listener/useCell.d.ts +29 -0
- package/types/src/listener/useCellRange.d.ts +23 -0
- package/types/src/listener/useCellValue.d.ts +26 -0
- package/types/src/listener/useModelListener.d.ts +4 -4
- package/types/src/listener/useRangeListener.d.ts +13 -7
- package/types/src/listener/useRangeSnapshot.d.ts +35 -0
- package/types/src/listener/useTable.d.ts +26 -0
- package/types/src/movable/DefaultMovable.d.ts +8 -0
- package/types/src/movable/MovableCommands.d.ts +2 -2
- package/types/src/movable/MovableControl.d.ts +3 -1
- package/types/src/movable/MovableFrame.d.ts +2 -1
- package/types/src/movable/MovableLayer.d.ts +6 -3
- package/types/src/movable/MovableRenderers.d.ts +3 -3
- package/types/src/movable/index.d.ts +1 -0
- package/types/src/picker/cellPickerOpen.d.ts +3 -3
- package/types/src/picker/useCellPicker.d.ts +2 -2
- package/types/src/richText/RichTextEditor.d.ts +2 -2
- package/types/src/selection/SelectionCommands.d.ts +2 -2
- package/types/src/selection/SheetSelectionLayer.d.ts +2 -2
- package/types/src/sheet/ISheetHeaderElement.d.ts +3 -3
- package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +64 -32
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +5 -2
- package/types/src/sheet/SheetCommands.d.ts +2 -2
- package/types/src/sheet/SheetKindIcon.d.ts +14 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +6 -6
- package/types/src/sheet/SheetPanels.d.ts +11 -0
- package/types/src/sheet/SheetScrollbar.d.ts +3 -3
- package/types/src/sheet/TopLeftCorner.d.ts +2 -2
- package/types/src/sheet/WorksheetElement.d.ts +12 -0
- package/types/src/sheet/_freezeAt.d.ts +2 -2
- package/types/src/sheet/circularReferences.d.ts +3 -3
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/useCycleHighlight.d.ts +2 -2
- package/types/src/tabStrip/SheetTab.d.ts +1 -1
- package/types/src/tabStrip/Sortable.d.ts +5 -5
- package/types/src/tabStrip/TabStrip.d.ts +6 -6
- package/types/src/tabStrip/TabStripItem.d.ts +15 -13
- package/types/src/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/CellControlPane.d.ts +17 -0
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- package/types/src/taskPane/index.d.ts +1 -0
- package/types/src/taskPane/useTaskPane.d.ts +6 -3
- package/types/src/theme/buildOOXMLThemeCSS.d.ts +2 -2
- package/types/src/theme/useGridColorScheme.d.ts +1 -1
- package/types/src/theme/useSystemColors.d.ts +2 -2
- package/types/src/workbook/DefaultRenderers.d.ts +5 -4
- package/types/src/workbook/IWorkbookElement.d.ts +76 -22
- package/types/src/workbook/WorkbookStrip.d.ts +5 -5
- package/browser/esm/BHjeSMaycUkS5dVL.mjs +0 -66
- package/browser/esm/CYMRbtPIr6SklGpp.mjs +0 -775
- package/browser/esm/CiRN-woJZWYOgTn4.mjs +0 -36
- package/browser/esm/J8cPagZBeXz86Lnd.mjs +0 -777
- package/node/esm/BpwE3HqTnrLLzE3C.mjs +0 -775
- package/node/esm/CV3bT3Hql74GcHoU.mjs +0 -37
- package/node/esm/D3YXHeOyFp00Xk3m.mjs +0 -323
- package/types/src/chart/templates/area-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/area-template.json.d.ts +0 -9
- package/types/src/chart/templates/bar-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/bar-template.json.d.ts +0 -9
- package/types/src/chart/templates/column-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/column-template.json.d.ts +0 -9
- package/types/src/chart/templates/line-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-markers-template.json.d.ts +0 -11
- package/types/src/chart/templates/line-stacked-percent-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-stacked-template.json.d.ts +0 -10
- package/types/src/chart/templates/line-template.json.d.ts +0 -9
- package/types/src/chart/templates/pie-doughnut-template.json.d.ts +0 -10
- package/types/src/chart/templates/pie-template.json.d.ts +0 -9
- package/types/src/chart/templates/scatter-lines-markers-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-markers-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-smooth-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-lines-template.json.d.ts +0 -10
- package/types/src/chart/templates/scatter-markers-template.json.d.ts +0 -10
- package/types/src/context/SheetContext.d.ts +0 -18
- package/types/src/sheet/SheetElement.d.ts +0 -15
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { IMovable } from '@sheetxl/sdk';
|
|
3
|
+
import { RenderSlotFn } from '@sheetxl/utils-react';
|
|
3
4
|
import { MovableElementProps } from './IMovableArea';
|
|
4
5
|
import { MovableGestureHost } from './MovableControl';
|
|
5
6
|
import { MovablePreview } from './framePlacement';
|
|
@@ -14,7 +15,7 @@ export interface MovableFrameProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
14
15
|
* @param props - {@link MovableElementProps}
|
|
15
16
|
* @returns A React Element representing the IMovable.
|
|
16
17
|
*/
|
|
17
|
-
renderMovable:
|
|
18
|
+
renderMovable: RenderSlotFn<MovableElementProps>;
|
|
18
19
|
onRefLoad: (ref: HTMLElement) => void;
|
|
19
20
|
onRefUnload: (ref: HTMLElement) => void;
|
|
20
21
|
onHide: (hide: (movable: IMovable) => boolean | Promise<boolean> | void) => void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Bounds } from '@sheetxl/utils';
|
|
3
3
|
import { IMovableCollection, IMovableSelection, IMovable } from '@sheetxl/sdk';
|
|
4
|
+
import { RenderSlotFn } from '@sheetxl/utils-react';
|
|
4
5
|
import { MovableElementProps } from './IMovableArea';
|
|
6
|
+
import { ResizeDirectionName } from './MovableControl';
|
|
5
7
|
export interface MovableLayerAttributes {
|
|
6
8
|
/**
|
|
7
9
|
* Will put focus on the the movable object.
|
|
@@ -45,7 +47,7 @@ export interface MovableLayerProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
45
47
|
* @param props MovableElementProps
|
|
46
48
|
* @returns A React Element representing the IMovable.
|
|
47
49
|
*/
|
|
48
|
-
renderMovable:
|
|
50
|
+
renderMovable: RenderSlotFn<MovableElementProps>;
|
|
49
51
|
/**
|
|
50
52
|
* Called when the final movable is unselected.
|
|
51
53
|
*/
|
|
@@ -72,9 +74,10 @@ export interface MovableLayerProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
72
74
|
*/
|
|
73
75
|
disableResize?: boolean;
|
|
74
76
|
/**
|
|
75
|
-
*
|
|
77
|
+
* The resize handles to show, by compass name.
|
|
78
|
+
* @defaultValue all eight
|
|
76
79
|
*/
|
|
77
|
-
|
|
80
|
+
resizeDirections?: ResizeDirectionName[];
|
|
78
81
|
/**
|
|
79
82
|
* Called after the first render of a movable.
|
|
80
83
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { IMovable,
|
|
2
|
+
import { IMovable, IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { Command, IReactNotifier } from '@sheetxl/utils-react';
|
|
4
4
|
import { ActivateFrameOptions, ITaskPaneArea } from '../taskPane';
|
|
5
5
|
import { MovableElementProps } from './IMovableArea';
|
|
@@ -22,7 +22,7 @@ export type MovableRenderer = React.ComponentType<MovableRendererProps>;
|
|
|
22
22
|
*/
|
|
23
23
|
export interface MovablePaneProps {
|
|
24
24
|
movable: IMovable;
|
|
25
|
-
sheet:
|
|
25
|
+
sheet: IWorksheet;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* The `data` a kind's {@link MovableRendererModule.commands} contributor is handed while a movable of
|
|
@@ -30,7 +30,7 @@ export interface MovablePaneProps {
|
|
|
30
30
|
* movable of the kind becomes the active one, so it never tracks the selection itself.
|
|
31
31
|
*/
|
|
32
32
|
export interface MovableKindCommandData {
|
|
33
|
-
sheet:
|
|
33
|
+
sheet: IWorksheet;
|
|
34
34
|
/** The active selected movable, always of this kind. */
|
|
35
35
|
movable: IMovable;
|
|
36
36
|
notifier?: IReactNotifier;
|
|
@@ -9,6 +9,7 @@ export * from './MovableEdit';
|
|
|
9
9
|
export * from './EmptyFrame';
|
|
10
10
|
export * from './TextBox';
|
|
11
11
|
export * from './MovableRenderers';
|
|
12
|
+
export * from './DefaultMovable';
|
|
12
13
|
export * from './MovableCommandGroups';
|
|
13
14
|
export * from './ConnectionSites';
|
|
14
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
/** Record that `sheet`'s picker opened, or (`null`) that the open one closed. */
|
|
3
|
-
export declare const setCellPickerOpen: (sheet:
|
|
3
|
+
export declare const setCellPickerOpen: (sheet: IWorksheet | null) => void;
|
|
4
4
|
/** Whether `sheet` has a cell picker open (reactive). */
|
|
5
|
-
export declare const useCellPickerOpen: (sheet:
|
|
5
|
+
export declare const useCellPickerOpen: (sheet: IWorksheet) => boolean;
|
|
6
6
|
//# sourceMappingURL=cellPickerOpen.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { CellCoords, MaybePromise } from '@sheetxl/utils';
|
|
3
|
-
import {
|
|
3
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
4
4
|
import { GridAnchor, IEditable } from '@sheetxl/grid-react';
|
|
5
5
|
import { PickerItem } from './PickerPanel';
|
|
6
6
|
/**
|
|
@@ -10,7 +10,7 @@ import { PickerItem } from './PickerPanel';
|
|
|
10
10
|
*/
|
|
11
11
|
export interface CellPickerOptions {
|
|
12
12
|
/** The sheet the cell is on: its `Normal` font, its current text, and the open flag. */
|
|
13
|
-
sheet:
|
|
13
|
+
sheet: IWorksheet;
|
|
14
14
|
/**
|
|
15
15
|
* The editable a default choice is entered through — the same path as typing the item's text, so
|
|
16
16
|
* the value coerces and formats as a typed one does. Not needed when {@link onChoose} is given.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { IRichText,
|
|
2
|
+
import { IRichText, IFontStyle } from '@sheetxl/sdk';
|
|
3
3
|
/**
|
|
4
4
|
* The contract of a rich text editor: text in, edited text out. A host may supply its own in place
|
|
5
5
|
* of the default {@link RichTextEditor}.
|
|
@@ -26,7 +26,7 @@ export interface RichTextEditorProps extends Omit<React.HTMLAttributes<HTMLDivEl
|
|
|
26
26
|
/**
|
|
27
27
|
* The CSS for the font properties a run sets.
|
|
28
28
|
*/
|
|
29
|
-
runStyle?: (font:
|
|
29
|
+
runStyle?: (font: IFontStyle.JSON) => React.CSSProperties | undefined;
|
|
30
30
|
ref?: React.Ref<HTMLDivElement>;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RemoveListener } from '@sheetxl/utils';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { Command } from '@sheetxl/utils-react';
|
|
4
4
|
import { SelectionNavigation } from '@sheetxl/grid-react';
|
|
5
5
|
/** The single `data` bundle {@link contributeSelectionCommands} takes (the `DynamicCommandContributor` shape). */
|
|
6
6
|
export interface SelectionCommandData {
|
|
7
7
|
/** `null` on the first render — the layer's `SelectionNavigation` is produced by its child via a ref. */
|
|
8
8
|
navigation: SelectionNavigation | null;
|
|
9
|
-
sheet?:
|
|
9
|
+
sheet?: IWorksheet;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Contribute the selection **behavior** onto `contribution` (a per-pane layer scope's contribution), as thin
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
4
|
import { CommandContext } from '../frame';
|
|
5
5
|
import { SheetLocation } from '../sheet';
|
|
6
6
|
export interface SheetSelectionLayerProps extends LayerProps {
|
|
7
7
|
/** The sheet whose `getSelection()` this layer drives. */
|
|
8
|
-
sheet:
|
|
8
|
+
sheet: IWorksheet;
|
|
9
9
|
/** Whether this sheet/pane is the active one (gates move/fill interaction). */
|
|
10
10
|
isActive?: boolean;
|
|
11
11
|
/**
|
|
@@ -3,8 +3,8 @@ import { FixedEdge } from '@sheetxl/utils';
|
|
|
3
3
|
import { ISheetHeader } from '@sheetxl/sdk';
|
|
4
4
|
import { Viewport, ThemeMode } from '@sheetxl/utils-react';
|
|
5
5
|
import { IGridSurface } from '@sheetxl/grid-react';
|
|
6
|
-
import {
|
|
7
|
-
import { SheetLocation } from './
|
|
6
|
+
import { CellTextRendererProps, ColumnButtonConfigProps } from '../cell';
|
|
7
|
+
import { SheetLocation } from './IWorksheetElement';
|
|
8
8
|
/**
|
|
9
9
|
* Props for the SheetHeaderElement component.
|
|
10
10
|
*/
|
|
@@ -108,7 +108,7 @@ export interface SheetHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
108
108
|
* This is used to customize columnButton popup action and any other customizations desired.
|
|
109
109
|
* This does not invalidate the rendering.
|
|
110
110
|
*/
|
|
111
|
-
propsCellRender?: Partial<
|
|
111
|
+
propsCellRender?: Partial<CellTextRendererProps> & ColumnButtonConfigProps;
|
|
112
112
|
/**
|
|
113
113
|
* Ref for the HTMLDivElement.
|
|
114
114
|
*/
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ViewportMetrics, ScrollPaneProps, Viewport, ThemeMode } from '@sheetxl/utils-react';
|
|
1
|
+
import { IWorksheet, ICell, IMovable } from '@sheetxl/sdk';
|
|
2
|
+
import { ViewportMetrics, ScrollPaneProps, Viewport, ThemeMode, LoadingPanelProps, ErrorPanelProps, RenderSlotFn } from '@sheetxl/utils-react';
|
|
3
3
|
import { GridSurfaceProps, IGridSurface, IEditable, LayerNode } from '@sheetxl/grid-react';
|
|
4
|
-
import {
|
|
4
|
+
import { CellTextRendererProps, ColumnButtonConfigProps, OutlineProps } from '../cell';
|
|
5
5
|
import { MovableElementProps } from '../movable';
|
|
6
6
|
import { CommentCardRenderProps } from '../comment';
|
|
7
7
|
import { HyperlinkCardRenderProps, HyperlinkLayerProps } from '../layer/HyperlinkLayer';
|
|
8
8
|
import { CellErrorTip } from '../layer/CellErrorLayer';
|
|
9
|
-
import {
|
|
10
|
-
import { ValidationAlert } from '../editor/validationAlert';
|
|
9
|
+
import { ValidationPromptRenderProps, ValidationAlertRenderProps } from '../layer/ValidationPromptLayer';
|
|
11
10
|
import { TableToolbarRenderProps } from '../layer/TableToolbar';
|
|
12
11
|
import { CommandContext } from '../frame';
|
|
13
12
|
import { ISheetHeaderElement, SheetHeaderProps } from './ISheetHeaderElement';
|
|
@@ -21,13 +20,46 @@ export interface SheetLocation {
|
|
|
21
20
|
colIndex?: number;
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
|
-
* Props for the
|
|
23
|
+
* Props for the WorksheetElement component.
|
|
25
24
|
*/
|
|
26
|
-
export interface
|
|
25
|
+
export interface WorksheetElementProps extends React.HTMLAttributes<HTMLDivElement>, React.Attributes {
|
|
27
26
|
/**
|
|
28
|
-
* The `
|
|
27
|
+
* The sheet to render, or a `Promise` for one. The element is empty until the sheet resolves and
|
|
28
|
+
* its text can be measured; a later input keeps the current sheet showing until it resolves.
|
|
29
29
|
*/
|
|
30
|
-
sheet:
|
|
30
|
+
sheet: IWorksheet | Promise<IWorksheet>;
|
|
31
|
+
/**
|
|
32
|
+
* Called with the sheet once {@link WorksheetElementProps.sheet} resolves, and again whenever a new
|
|
33
|
+
* input resolves to a different one. Until the first input resolves, or if an input fails, the
|
|
34
|
+
* sheet is `null`.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Lets an app pass a `Promise` here and hold the live sheet in its own state, without awaiting or
|
|
38
|
+
* suspending.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* const [pending] = useState(() => createInvoice());
|
|
43
|
+
* const [sheet, setSheet] = useState<IWorksheet | null>(null);
|
|
44
|
+
* const [total] = useCellValue<number>(sheet, 'D23');
|
|
45
|
+
* return <WorksheetElement sheet={pending} onSheetChange={setSheet} />;
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
onSheetChange?: (sheet: IWorksheet | null) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Props passed to the loading panel.
|
|
51
|
+
*/
|
|
52
|
+
propsSheetLoading?: Partial<LoadingPanelProps>;
|
|
53
|
+
/**
|
|
54
|
+
* Custom loading panel, shown while a `Promise` {@link WorksheetElementProps.sheet} resolves or the
|
|
55
|
+
* text engine loads. Defaults to a spinner.
|
|
56
|
+
*/
|
|
57
|
+
renderSheetLoading?: RenderSlotFn<LoadingPanelProps> | null;
|
|
58
|
+
/**
|
|
59
|
+
* Custom error panel, shown when a `Promise` {@link WorksheetElementProps.sheet} fails to resolve.
|
|
60
|
+
* Defaults to a minimal message.
|
|
61
|
+
*/
|
|
62
|
+
renderSheetError?: RenderSlotFn<ErrorPanelProps> | null;
|
|
31
63
|
/**
|
|
32
64
|
* The app (chrome / header) color scheme — selects the header/app surface mode.
|
|
33
65
|
*/
|
|
@@ -106,7 +138,7 @@ export interface SheetElementProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
106
138
|
/**
|
|
107
139
|
* The app-created editor for the always-mounted cell editor. When provided, the grid edits through
|
|
108
140
|
* this shared {@link IEditable}; pass the SAME instance to the formula bar for free two-way sync. A
|
|
109
|
-
* stable reference. If omitted, a standalone
|
|
141
|
+
* stable reference. If omitted, a standalone WorksheetElement makes its own.
|
|
110
142
|
*/
|
|
111
143
|
editable?: IEditable<() => ICell, string>;
|
|
112
144
|
/**
|
|
@@ -116,52 +148,52 @@ export interface SheetElementProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
116
148
|
*/
|
|
117
149
|
viewportComponent?: React.ReactNode;
|
|
118
150
|
/**
|
|
119
|
-
* Render
|
|
151
|
+
* Render a movable element (a chart, shape or picture).
|
|
120
152
|
*
|
|
121
153
|
* @param props - {@link MovableElementProps}
|
|
122
|
-
* @returns A React Element representing the IMovable.
|
|
123
154
|
*/
|
|
124
|
-
renderMovable?:
|
|
155
|
+
renderMovable?: RenderSlotFn<MovableElementProps>;
|
|
125
156
|
/**
|
|
126
157
|
* 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.
|
|
158
|
+
* when a command asks for one. The default shows no card; the indicators are drawn either way.
|
|
128
159
|
*
|
|
129
160
|
* @param props - {@link CommentCardRenderProps}
|
|
130
161
|
*/
|
|
131
|
-
renderCommentCard?:
|
|
162
|
+
renderCommentCard?: RenderSlotFn<CommentCardRenderProps> | null;
|
|
132
163
|
/**
|
|
133
164
|
* Renders the card beside a hovered hyperlink cell: its address, copy, edit and remove. Omit for the
|
|
134
|
-
* plain default card.
|
|
165
|
+
* plain default card; `null` for none.
|
|
135
166
|
*
|
|
136
167
|
* @param props - {@link HyperlinkCardRenderProps}
|
|
137
168
|
*/
|
|
138
|
-
renderHyperlinkCard?:
|
|
169
|
+
renderHyperlinkCard?: RenderSlotFn<HyperlinkCardRenderProps> | null;
|
|
139
170
|
/** The hyperlink card's options — e.g. `preview` to show a picture of the linked page. */
|
|
140
171
|
propsHyperlink?: Omit<HyperlinkLayerProps, 'sheet' | 'renderCard'>;
|
|
141
172
|
/**
|
|
142
173
|
* 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.
|
|
174
|
+
* failed validation. Omit for the plain default tip; `null` for none.
|
|
144
175
|
*
|
|
145
176
|
* @param tip - {@link CellErrorTip}
|
|
146
177
|
*/
|
|
147
|
-
renderCellErrorTip?:
|
|
178
|
+
renderCellErrorTip?: RenderSlotFn<CellErrorTip> | null;
|
|
148
179
|
/**
|
|
149
180
|
* 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
|
|
181
|
+
* the returned element. Omit for the plain default box: the title in bold over the message; `null`
|
|
182
|
+
* for none.
|
|
151
183
|
*/
|
|
152
|
-
renderValidationPrompt?:
|
|
184
|
+
renderValidationPrompt?: RenderSlotFn<ValidationPromptRenderProps> | null;
|
|
153
185
|
/**
|
|
154
186
|
* 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.
|
|
187
|
+
* on the returned element. Omit for the plain default card; `null` for none.
|
|
156
188
|
*/
|
|
157
|
-
renderValidationAlert?:
|
|
189
|
+
renderValidationAlert?: RenderSlotFn<ValidationAlertRenderProps> | null;
|
|
158
190
|
/**
|
|
159
191
|
* 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.
|
|
192
|
+
* dropdown of the table's commands. Omit for the plain default split button; `null` for none.
|
|
161
193
|
*
|
|
162
194
|
* @param props - {@link TableToolbarRenderProps}
|
|
163
195
|
*/
|
|
164
|
-
renderTableToolbar?:
|
|
196
|
+
renderTableToolbar?: RenderSlotFn<TableToolbarRenderProps> | null;
|
|
165
197
|
/**
|
|
166
198
|
* Render element(s) directly onto the `GridSurface`, bottom → top — the same {@link LayerNode} the
|
|
167
199
|
* grid takes for its children (a node or an array of them). Each layer reads its pane from context
|
|
@@ -182,7 +214,7 @@ export interface SheetElementProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
182
214
|
* This is used to customize columnButton popup action and any other customizations desired.
|
|
183
215
|
* This does not invalidate the rendering
|
|
184
216
|
*/
|
|
185
|
-
propsCellRender?: Partial<
|
|
217
|
+
propsCellRender?: Partial<CellTextRendererProps> & ColumnButtonConfigProps;
|
|
186
218
|
/**
|
|
187
219
|
* Props for the outline: the gutters that show row and column groups, and their level buttons.
|
|
188
220
|
*
|
|
@@ -193,12 +225,12 @@ export interface SheetElementProps extends React.HTMLAttributes<HTMLDivElement>,
|
|
|
193
225
|
/**
|
|
194
226
|
* Ref to the sheet element.
|
|
195
227
|
*/
|
|
196
|
-
ref?: React.Ref<
|
|
228
|
+
ref?: React.Ref<IWorksheetElement>;
|
|
197
229
|
}
|
|
198
230
|
/**
|
|
199
231
|
* Attributes and methods available on the sheet element beyond the HTMLDivElement.
|
|
200
232
|
*/
|
|
201
|
-
export type
|
|
233
|
+
export type IWorksheetAttributes = {
|
|
202
234
|
getGridSurface: () => IGridSurface;
|
|
203
235
|
getRowHeaderElement: () => ISheetHeaderElement;
|
|
204
236
|
getColumnHeaderElement: () => ISheetHeaderElement;
|
|
@@ -224,9 +256,9 @@ export type ISheetAttributes = {
|
|
|
224
256
|
*/
|
|
225
257
|
focusMovable(movable?: IMovable): Promise<boolean>;
|
|
226
258
|
/**
|
|
227
|
-
* Returns the attached `
|
|
259
|
+
* Returns the attached `IWorksheet`.
|
|
228
260
|
*/
|
|
229
|
-
|
|
261
|
+
getWorksheet: () => IWorksheet;
|
|
230
262
|
/**
|
|
231
263
|
* For runtime introspection.
|
|
232
264
|
*/
|
|
@@ -235,6 +267,6 @@ export type ISheetAttributes = {
|
|
|
235
267
|
/**
|
|
236
268
|
* Type returned via ref property
|
|
237
269
|
*/
|
|
238
|
-
export interface
|
|
270
|
+
export interface IWorksheetElement extends HTMLDivElement, IWorksheetAttributes {
|
|
239
271
|
}
|
|
240
|
-
//# sourceMappingURL=
|
|
272
|
+
//# sourceMappingURL=IWorksheetElement.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IOpaqueSheet } from '@sheetxl/sdk';
|
|
3
|
+
export interface OpaqueSheetElementProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* The sheet.
|
|
6
|
+
*/
|
|
7
|
+
sheet: IOpaqueSheet;
|
|
8
|
+
/**
|
|
9
|
+
* Called once the pane has rendered, as a worksheet's grid calls it once it has.
|
|
10
|
+
*/
|
|
11
|
+
onFirstRender?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The pane shown for a chart sheet, a macro sheet or a dialog sheet while it is the active tab.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Such a sheet is carried as read and saved unchanged; this names its kind and says so. A chart
|
|
18
|
+
* sheet's chart is drawn here once chart sheets have their chart.
|
|
19
|
+
*/
|
|
20
|
+
export declare const OpaqueSheetElement: React.FC<OpaqueSheetElementProps>;
|
|
21
|
+
//# sourceMappingURL=OpaqueSheetElement.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { Command, IViewport } from '@sheetxl/utils-react';
|
|
4
4
|
import { SheetEditable } from '../editor';
|
|
5
5
|
import { SheetCommandData } from './SheetCommands';
|
|
@@ -7,6 +7,9 @@ import { SheetCommandData } from './SheetCommands';
|
|
|
7
7
|
* ready-mode `'startEdit'` insert commands). */
|
|
8
8
|
export interface SheetCommandContributorData extends SheetCommandData {
|
|
9
9
|
editable?: SheetEditable | null;
|
|
10
|
+
/** Set when the sheet owns `manager` (no workbook above publishes one): the sheet then also contributes
|
|
11
|
+
* `undo`/`redo`, which a workbook otherwise authors. */
|
|
12
|
+
ownsUndo?: boolean;
|
|
10
13
|
}
|
|
11
14
|
/**
|
|
12
15
|
* The `sheet` feature's command contributor: `static` seeds the catalog presentation; `dynamic` attaches the
|
|
@@ -16,7 +19,7 @@ export interface SheetCommandContributorData extends SheetCommandData {
|
|
|
16
19
|
export declare const SheetCommandContributor: Command.CommandContributor<SheetCommandContributorData>;
|
|
17
20
|
interface SheetCommandProviderProps {
|
|
18
21
|
/** The active sheet the cell/format commands operate on. */
|
|
19
|
-
sheet:
|
|
22
|
+
sheet: IWorksheet | null;
|
|
20
23
|
/** The shared cell editable — the **ready-mode** insert commands (`insertCurrent*`/`insertFunction*`) seed
|
|
21
24
|
* an edit through it. `undefined` on a bare grid ⇒ those commands stay chrome-only (disabled). */
|
|
22
25
|
editable?: SheetEditable | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditModeHandler, ReferenceableClipboard, RemoveListener, UndoManager } from '@sheetxl/utils';
|
|
2
|
-
import { IBorders, IRange, IColor,
|
|
2
|
+
import { IBorders, IRange, IColor, IWorksheet } from '@sheetxl/sdk';
|
|
3
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. */
|
|
@@ -45,7 +45,7 @@ export interface ContributeSheetCommandsOptions {
|
|
|
45
45
|
* together (the `DynamicCommandContributor` shape). `sheet` may be `null` on a bare grid (⇒ no behavior).
|
|
46
46
|
*/
|
|
47
47
|
export interface SheetCommandData extends ContributeSheetCommandsOptions {
|
|
48
|
-
sheet:
|
|
48
|
+
sheet: IWorksheet | null;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* The arguments of the `freezePanesAt` command.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ISheet } from '@sheetxl/sdk';
|
|
3
|
+
export interface SheetKindIconProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* The kind of sheet.
|
|
6
|
+
*/
|
|
7
|
+
kind: ISheet.Kind;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The glyph that marks a sheet of a kind other than a worksheet: on its tab, in sheet lists, and on
|
|
11
|
+
* its pane. A worksheet has none, so it renders nothing.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SheetKindIcon: React.FC<SheetKindIconProps>;
|
|
14
|
+
//# sourceMappingURL=SheetKindIcon.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { FixedEdge } from '@sheetxl/utils';
|
|
3
|
-
import { IRange,
|
|
3
|
+
import { IRange, IWorksheet } from '@sheetxl/sdk';
|
|
4
4
|
import { Viewport, ThemeMode } from '@sheetxl/utils-react';
|
|
5
5
|
import { OutlineButtonProps, OutlineLevelButtonProps } from '../cell/OutlineButton';
|
|
6
6
|
export interface SheetOutlineElementProps extends React.HTMLAttributes<HTMLElement> {
|
|
7
7
|
/** The sheet whose outline is drawn. */
|
|
8
|
-
sheet:
|
|
8
|
+
sheet: IWorksheet;
|
|
9
9
|
/** Rows (the gutter left of the row headers) or columns (above the column headers). */
|
|
10
10
|
axis: IRange.Axis;
|
|
11
11
|
/** The lanes across the gutter: one per level, plus one. */
|
|
@@ -19,7 +19,7 @@ export interface SheetOutlineElementProps extends React.HTMLAttributes<HTMLEleme
|
|
|
19
19
|
/** The app color scheme. */
|
|
20
20
|
colorScheme?: ThemeMode;
|
|
21
21
|
/** Renders a group's collapse / expand button. Defaults to `OutlineButton`. */
|
|
22
|
-
renderButton?: (props: OutlineButtonProps) => React.ReactNode;
|
|
22
|
+
renderButton?: ((props: OutlineButtonProps) => React.ReactNode) | null;
|
|
23
23
|
/** The space around the buttons, in pixels: between neighbors, before the first and after the last. */
|
|
24
24
|
laneGap?: number;
|
|
25
25
|
/** Space between a bracket's end and its button, in pixels. */
|
|
@@ -31,7 +31,7 @@ export interface SheetOutlineElementProps extends React.HTMLAttributes<HTMLEleme
|
|
|
31
31
|
* @remarks
|
|
32
32
|
* Built like `SheetHeaderElement` — its own `GridSurface` over the header's offsets, following the
|
|
33
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 `
|
|
34
|
+
* owner decides whether there is one (see `IWorksheetView.isShowOutlineSymbols` and `getLevelCount`) and sizes
|
|
35
35
|
* it.
|
|
36
36
|
*
|
|
37
37
|
* It is app chrome, not header: it declares the `app` surface and paints no fill, so it shows what
|
|
@@ -40,7 +40,7 @@ export interface SheetOutlineElementProps extends React.HTMLAttributes<HTMLEleme
|
|
|
40
40
|
export declare const SheetOutlineElement: React.MemoExoticComponent<(props: SheetOutlineElementProps) => React.JSX.Element>;
|
|
41
41
|
export interface SheetOutlineLevelsProps extends React.HTMLAttributes<HTMLElement> {
|
|
42
42
|
/** The sheet whose outline the buttons show levels of. */
|
|
43
|
-
sheet:
|
|
43
|
+
sheet: IWorksheet;
|
|
44
44
|
/** Rows or columns. */
|
|
45
45
|
axis: IRange.Axis;
|
|
46
46
|
/** The number of buttons: one per level, plus one. */
|
|
@@ -56,7 +56,7 @@ export interface SheetOutlineLevelsProps extends React.HTMLAttributes<HTMLElemen
|
|
|
56
56
|
/** The app color scheme. */
|
|
57
57
|
colorScheme?: ThemeMode;
|
|
58
58
|
/** Renders a level button. Defaults to `OutlineLevelButton`. */
|
|
59
|
-
renderLevelButton?: (props: OutlineLevelButtonProps) => React.ReactNode;
|
|
59
|
+
renderLevelButton?: ((props: OutlineLevelButtonProps) => React.ReactNode) | null;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* The level buttons `1`..`n` for one axis: button *k* shows the groups above level *k* and collapses
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ErrorPanelProps, LoadingPanelProps } from '@sheetxl/utils-react';
|
|
3
|
+
/**
|
|
4
|
+
* The default loading panel of a sheet or workbook element: a spinner, centered.
|
|
5
|
+
*/
|
|
6
|
+
export declare const defaultRenderSheetLoading: (props: LoadingPanelProps) => React.ReactElement;
|
|
7
|
+
/**
|
|
8
|
+
* The default error panel of a sheet or workbook element: the error's message, centered.
|
|
9
|
+
*/
|
|
10
|
+
export declare const defaultRenderSheetError: (props: ErrorPanelProps) => React.ReactElement;
|
|
11
|
+
//# sourceMappingURL=SheetPanels.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { ScrollbarOrientation, VirtualScrollbarProps, IScrollbarElement } from '@sheetxl/utils-react';
|
|
4
4
|
export interface SheetScrollbarProps extends VirtualScrollbarProps {
|
|
5
5
|
/**
|
|
6
|
-
* The `
|
|
6
|
+
* The `IWorksheet` for the given scrollbar.
|
|
7
7
|
*/
|
|
8
|
-
sheet:
|
|
8
|
+
sheet: IWorksheet;
|
|
9
9
|
/**
|
|
10
10
|
* The direction of the scrollbar.
|
|
11
11
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { ThemeMode } from '@sheetxl/utils-react';
|
|
4
4
|
export interface TopLeftCornerProps extends React.HTMLProps<HTMLElement> {
|
|
5
|
-
sheet:
|
|
5
|
+
sheet: IWorksheet;
|
|
6
6
|
/** The app (header) color scheme — headers follow the app surface; colors come from the header-surface
|
|
7
7
|
* tokens. */
|
|
8
8
|
colorScheme?: ThemeMode;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorksheetElement, WorksheetElementProps } from './IWorksheetElement';
|
|
3
|
+
/**
|
|
4
|
+
* UI representation for IWorksheet.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* It draws once the sheet has resolved and the text engine has loaded, so a sheet with no workbook
|
|
8
|
+
* needs no `whenReady()` first. Until then its box shows the loading panel, or the error panel if the
|
|
9
|
+
* sheet fails.
|
|
10
|
+
*/
|
|
11
|
+
export declare const WorksheetElement: React.NamedExoticComponent<Omit<WorksheetElementProps, "ref"> & React.RefAttributes<IWorksheetElement>>;
|
|
12
|
+
//# sourceMappingURL=WorksheetElement.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheetView, IRange } from '@sheetxl/sdk';
|
|
2
2
|
/**
|
|
3
3
|
* Move one axis's freeze to `index` (`0` unfreezes that axis), leaving the other axis as it is.
|
|
4
4
|
*
|
|
@@ -6,5 +6,5 @@ import { ISheetView, IRange } from '@sheetxl/sdk';
|
|
|
6
6
|
* position. Either way what is on screen stays put — provided the scrolling area starts exactly at the
|
|
7
7
|
* current freeze, which is when the freeze grip allows a drag.
|
|
8
8
|
*/
|
|
9
|
-
export declare const freezeAt: (view:
|
|
9
|
+
export declare const freezeAt: (view: IWorksheetView, axis: IRange.Axis, index: number) => void;
|
|
10
10
|
//# sourceMappingURL=_freezeAt.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRange,
|
|
1
|
+
import { IRange, IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
/**
|
|
3
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.
|
|
@@ -17,7 +17,7 @@ import { IRange, ISheet } from '@sheetxl/sdk';
|
|
|
17
17
|
* way, so an iterated cycle stays discoverable where it is; what goes quiet is the workbook-level
|
|
18
18
|
* alarm, which is the same line `ICell.getErrors()` draws (§7.3).
|
|
19
19
|
*/
|
|
20
|
-
export declare const findSheetCircularReference: (sheet:
|
|
20
|
+
export declare const findSheetCircularReference: (sheet: IWorksheet) => IRange.CellCoords | null;
|
|
21
21
|
/**
|
|
22
22
|
* A cell address the way a formula on `sheetName` would write it: bare on its own sheet
|
|
23
23
|
* (`A1`), sheet-qualified elsewhere (`'Other Sheet'!A1`).
|
|
@@ -30,5 +30,5 @@ export declare const formatCellAddress: (coords: IRange.CellCoords, sheetName: s
|
|
|
30
30
|
* The "go to" behind a circular tooltip's link and the status bar's readout. A `scope` this
|
|
31
31
|
* workbook does not know (a cycle member in a named formula's body) selects nothing.
|
|
32
32
|
*/
|
|
33
|
-
export declare const selectCell: (sheet:
|
|
33
|
+
export declare const selectCell: (sheet: IWorksheet, target: IRange.CellCoords) => Promise<unknown> | null;
|
|
34
34
|
//# sourceMappingURL=circularReferences.d.ts.map
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export type * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export type * from './IWorksheetElement';
|
|
2
|
+
export * from './WorksheetElement';
|
|
3
|
+
export * from './OpaqueSheetElement';
|
|
4
|
+
export * from './SheetPanels';
|
|
5
|
+
export * from './SheetKindIcon';
|
|
3
6
|
export * from './SheetScrollbar';
|
|
4
7
|
export * from './SheetCommands';
|
|
5
8
|
export * from './SheetCommandProvider';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICalculation,
|
|
1
|
+
import { ICalculation, IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
/**
|
|
3
3
|
* Outlines a reference cycle's MEMBERS on the grid for as long as the caller is mounted — the
|
|
4
4
|
* highlight behind a circular tooltip.
|
|
@@ -17,5 +17,5 @@ import { ICalculation, ISheet } from '@sheetxl/sdk';
|
|
|
17
17
|
* (the cleanup then finds someone else's state and leaves it alone, rather than clearing a live
|
|
18
18
|
* edit's references out from under it). A cycle with no live members publishes nothing.
|
|
19
19
|
*/
|
|
20
|
-
export declare const useCycleHighlight: (sheet:
|
|
20
|
+
export declare const useCycleHighlight: (sheet: IWorksheet | null, cycle: ICalculation.ICircularReference | null | undefined) => void;
|
|
21
21
|
//# sourceMappingURL=useCycleHighlight.d.ts.map
|