@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,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { RangeCoords } from '@sheetxl/utils';
|
|
3
|
-
import { ICalculation, IRange,
|
|
3
|
+
import { ICalculation, IRange, IWorksheet } from '@sheetxl/sdk';
|
|
4
4
|
import { StickyState, GridPlacement, LayerProps } from '@sheetxl/grid-react';
|
|
5
5
|
import { ValidationMark } from './validationMark';
|
|
6
6
|
/** The kind of annotation a cell carries (drives the default tip styling). */
|
|
@@ -44,7 +44,7 @@ export interface CellErrorLayerProps extends Omit<LayerProps, 'children'> {
|
|
|
44
44
|
/** Class forwarded to the inner layer's host box (devtools identification). */
|
|
45
45
|
className?: string;
|
|
46
46
|
/** The sheet whose cells are probed for `getErrors()` / `getCircularReference()` / `getWarnings()`. */
|
|
47
|
-
sheet:
|
|
47
|
+
sheet: IWorksheet;
|
|
48
48
|
/** Which side of the cell the tip attaches to. @defaultValue `{ side: 'b', align: 'start' }`, as the input prompt's */
|
|
49
49
|
placement?: GridPlacement;
|
|
50
50
|
/** Gap (px) between the cell edge and the tip. @defaultValue 6 */
|
|
@@ -60,9 +60,10 @@ export interface CellErrorLayerProps extends Omit<LayerProps, 'children'> {
|
|
|
60
60
|
closeDelay?: number;
|
|
61
61
|
/**
|
|
62
62
|
* Optional custom tip renderer. Spread `tipProps` (from context via `useSticky`, or reuse the
|
|
63
|
-
* default) onto the returned element to keep the tip open while hovered. Omit for the default card
|
|
63
|
+
* default) onto the returned element to keep the tip open while hovered. Omit for the default card;
|
|
64
|
+
* `null` for none.
|
|
64
65
|
*/
|
|
65
|
-
renderTip?: (tip: CellErrorTip) => React.ReactNode;
|
|
66
|
+
renderTip?: ((tip: CellErrorTip) => React.ReactNode) | null;
|
|
66
67
|
}
|
|
67
68
|
/**
|
|
68
69
|
* A grid layer that shows a **hover tooltip on cells carrying errors / warnings**. A thin
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { IRange,
|
|
2
|
+
import { IRange, IWorksheet, ICell } from '@sheetxl/sdk';
|
|
3
3
|
import { IGridPane, LayerProps } from '@sheetxl/grid-react';
|
|
4
4
|
export interface CellFillLayerProps extends LayerProps {
|
|
5
5
|
/** Style for the fills host box. */
|
|
6
6
|
style?: React.CSSProperties;
|
|
7
|
-
sheet:
|
|
7
|
+
sheet: IWorksheet;
|
|
8
8
|
getVisibleCells: (pane: IGridPane) => {
|
|
9
9
|
cell: ICell.Coords;
|
|
10
10
|
value?: ICell;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
|
+
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
|
+
export interface CellIndicatorLayerProps extends LayerProps {
|
|
5
|
+
/** Class for the layer (devtools identification). */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Style for the indicators host box. */
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
/** The sheet whose cells are marked. */
|
|
10
|
+
sheet: IWorksheet;
|
|
11
|
+
/** Size (px, unzoomed) of the error triangle. @defaultValue 7 */
|
|
12
|
+
markSize?: number;
|
|
13
|
+
/** Height (px) of the pending bar. Not zoomed, like a gridline. @defaultValue 2 */
|
|
14
|
+
barHeight?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The marks a cell's **result** earns: the error-checking triangle at the top left of a cell
|
|
18
|
+
* holding an error (or whose calculation failed), and the pending bar along the bottom of a cell
|
|
19
|
+
* whose result has not settled (`ICalculation.ResultStatus.Pending` / `Waiting`).
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* A {@link CellTileDiv} over the cells in view, so the marks survive scroll and the cell renderer
|
|
23
|
+
* only paints text. The scan resolves only the calc state (and merges, for the box a mark sits
|
|
24
|
+
* in), never styles. `#BUSY!` and `#GETTING_DATA` take no triangle: they are placeholders for an
|
|
25
|
+
* answer still coming, not something to fix. A reference cycle has its own glyph (`CircularIndicatorLayer`); it takes the
|
|
26
|
+
* triangle only when iteration is off, when the cycle is an error (`ICell.getErrors`).
|
|
27
|
+
*
|
|
28
|
+
* Passive paint below the selection (`pointerEvents: none`).
|
|
29
|
+
*/
|
|
30
|
+
export declare const CellIndicatorLayer: React.MemoExoticComponent<(props: CellIndicatorLayerProps) => React.JSX.Element | null>;
|
|
31
|
+
//# sourceMappingURL=CellIndicatorLayer.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ICellRange, IRange } from '@sheetxl/sdk';
|
|
3
|
+
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
|
+
/** Props for the button that inserts a row or column. */
|
|
5
|
+
export interface CellInsertButtonProps extends React.ButtonHTMLAttributes<HTMLElement> {
|
|
6
|
+
/** Rows or columns. */
|
|
7
|
+
axis: IRange.Axis;
|
|
8
|
+
/** The cells a press inserts. */
|
|
9
|
+
range: ICellRange;
|
|
10
|
+
/** The edge of the square the button fills, in pixels (zoom applied). */
|
|
11
|
+
size: number;
|
|
12
|
+
/** A localized description of what a press does. */
|
|
13
|
+
title: string;
|
|
14
|
+
/** Inserts the cells. */
|
|
15
|
+
onInsert: () => void;
|
|
16
|
+
}
|
|
17
|
+
export interface CellInsertLayerProps extends Omit<LayerProps, 'children'> {
|
|
18
|
+
/** Class for the layer. */
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the button inserts rows, from the row headers, or columns, from the column headers.
|
|
22
|
+
* A host that wants both declares one layer for each.
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue 'row'
|
|
25
|
+
*/
|
|
26
|
+
axis?: IRange.Axis;
|
|
27
|
+
/**
|
|
28
|
+
* The cells to insert at the header border nearest the pointer, or `null` for no button. The
|
|
29
|
+
* preview line runs along the returned range. Called on every pointer move, so it should be cheap.
|
|
30
|
+
*
|
|
31
|
+
* @param range The entire row (column) just past the border: below it for rows, right of it for
|
|
32
|
+
* columns. A host usually narrows it, e.g. `range.getIntersect(table.getRange())`.
|
|
33
|
+
*
|
|
34
|
+
* Defaults to `range` when the sheet's protection allows inserting rows (columns).
|
|
35
|
+
*/
|
|
36
|
+
resolve?: (range: ICellRange) => ICellRange | null;
|
|
37
|
+
/** Called when the button is pressed. Defaults to `range.insert(axis)`. */
|
|
38
|
+
onInsert?: (range: ICellRange) => void;
|
|
39
|
+
/** Edge (px, unzoomed) of the button. @defaultValue 16 */
|
|
40
|
+
size?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Renders the button, filling the square it is placed in. Defaults to {@link CellInsertButton}.
|
|
43
|
+
*/
|
|
44
|
+
renderButton?: (props: CellInsertButtonProps) => React.ReactNode;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* An **insert** button in the headers, on the border nearest the pointer, as Word shows one in the
|
|
48
|
+
* margin beside a table. Pressing it inserts cells at that border; while it shows, a line across the
|
|
49
|
+
* cells previews where.
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* Declared on both the header strip and the cells, which a {@link SheetLayers} does:
|
|
53
|
+
*
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <WorksheetElement sheet={sheet}>
|
|
56
|
+
* <SheetLayers surface={['rowHeaders', 'cells']}>
|
|
57
|
+
* <CellInsertLayer />
|
|
58
|
+
* </SheetLayers>
|
|
59
|
+
* </WorksheetElement>
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* The button is offered from the headers only: hovering the cells shows nothing. Which cells an insert
|
|
63
|
+
* covers, and whether there is one at all, are the host's, through `resolve`. Left alone it inserts
|
|
64
|
+
* entire rows (columns) wherever the sheet's protection allows.
|
|
65
|
+
*/
|
|
66
|
+
export declare const CellInsertLayer: React.MemoExoticComponent<(props: CellInsertLayerProps) => React.JSX.Element | null>;
|
|
67
|
+
/**
|
|
68
|
+
* The chromeless insert button: a circled `+` in the primary color, filled while hovered.
|
|
69
|
+
*/
|
|
70
|
+
export declare const CellInsertButton: React.MemoExoticComponent<(props: CellInsertButtonProps) => React.JSX.Element>;
|
|
71
|
+
//# sourceMappingURL=CellInsertLayer.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
export interface CircularIndicatorLayerProps extends LayerProps {
|
|
5
5
|
/** Class for the layer (devtools identification). */
|
|
@@ -7,7 +7,7 @@ export interface CircularIndicatorLayerProps extends LayerProps {
|
|
|
7
7
|
/** Style for the indicators host box. */
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
/** The sheet whose circular references are marked. */
|
|
10
|
-
sheet:
|
|
10
|
+
sheet: IWorksheet;
|
|
11
11
|
/** Size (px, unzoomed) of the corner glyph. @defaultValue 9 */
|
|
12
12
|
markSize?: number;
|
|
13
13
|
/** Inset (px, unzoomed) of the glyph from the cell's top-left corner. @defaultValue 1 */
|
|
@@ -1,5 +1,5 @@
|
|
|
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 { CommentCardRenderProps } from '../comment/CommentCardRequest';
|
|
5
5
|
export interface CommentCardLayerProps extends Omit<LayerProps, 'children'> {
|
|
@@ -8,7 +8,7 @@ export interface CommentCardLayerProps extends Omit<LayerProps, 'children'> {
|
|
|
8
8
|
/** Style for the floated card container. */
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
10
|
/** The sheet whose threads are shown. */
|
|
11
|
-
sheet:
|
|
11
|
+
sheet: IWorksheet;
|
|
12
12
|
/**
|
|
13
13
|
* Renders the card. The layer places it, keeps it open and keeps its keystrokes and presses from
|
|
14
14
|
* the grid; what it looks like is the renderer's.
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
export interface CommentsLayerProps extends LayerProps {
|
|
5
5
|
/** Class for the layer (devtools identification). */
|
|
@@ -7,7 +7,7 @@ export interface CommentsLayerProps extends LayerProps {
|
|
|
7
7
|
/** Style for the indicators host box. */
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
/** The sheet whose comments are indicated. */
|
|
10
|
-
sheet:
|
|
10
|
+
sheet: IWorksheet;
|
|
11
11
|
/** Size (px, unzoomed) of the corner indicator. @defaultValue 7 */
|
|
12
12
|
markSize?: number;
|
|
13
13
|
/** Dwell (ms) on a note's cell before its box shows. @defaultValue 300 */
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
export interface ConditionalBarLayerProps extends LayerProps {
|
|
5
5
|
/** Class for the layer (devtools identification). */
|
|
@@ -7,7 +7,7 @@ export interface ConditionalBarLayerProps extends LayerProps {
|
|
|
7
7
|
/** Style for the bars host box. */
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
/** The sheet whose conditional data bars are drawn. */
|
|
10
|
-
sheet:
|
|
10
|
+
sheet: IWorksheet;
|
|
11
11
|
/**
|
|
12
12
|
* Margin (px, unzoomed) between the cell's edges and the bar, on ALL FOUR sides.
|
|
13
13
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
export interface ConditionalIconsLayerProps extends LayerProps {
|
|
5
5
|
/** Class for the layer (devtools identification). */
|
|
@@ -7,7 +7,7 @@ export interface ConditionalIconsLayerProps extends LayerProps {
|
|
|
7
7
|
/** Style for the icons host box. */
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
/** The sheet whose conditional icon sets are drawn. */
|
|
10
|
-
sheet:
|
|
10
|
+
sheet: IWorksheet;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* The sheet's **conditional icons** — the in-cell marks an `iconSet` rule draws.
|
|
@@ -1,10 +1,10 @@
|
|
|
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 { SheetLocation } from '../sheet';
|
|
5
5
|
export interface ContextMenuLayerProps extends LayerProps {
|
|
6
6
|
/** The sheet — the keyboard path anchors the menu to its selected cell (`getSelection().getCoords().cell`). */
|
|
7
|
-
sheet:
|
|
7
|
+
sheet: IWorksheet;
|
|
8
8
|
/**
|
|
9
9
|
* Returns the coordinates of the cell where the context menu was requested.
|
|
10
10
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
3
3
|
export interface GridFreezeLayerProps extends Omit<LayerProps, 'children'> {
|
|
4
|
-
sheet:
|
|
4
|
+
sheet: IWorksheet;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* The main grid's freeze grips (one per frozen axis, on its freeze line) and its slice of the drag lines.
|
|
@@ -49,11 +49,11 @@ export interface HeaderSelectionLayerProps extends LayerProps {
|
|
|
49
49
|
*/
|
|
50
50
|
scrollIntoView?: (coords: Partial<CellCoords>) => void;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* @defaultValue
|
|
52
|
+
* Hide the selection accent (the header underline for selected rows/columns). For a picker overlay,
|
|
53
|
+
* whose reference rectangles are drawn by `RangesPickerLayer` — the accent would compete.
|
|
54
|
+
* @defaultValue false
|
|
55
55
|
*/
|
|
56
|
-
|
|
56
|
+
hideAccent?: boolean;
|
|
57
57
|
/**
|
|
58
58
|
* Keep the current focus on pointer-up instead of focusing the grid pane. On for a picker overlay used
|
|
59
59
|
* while editing a formula (focusing the pane would blur the editor). @defaultValue false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { CellCoords } from '@sheetxl/utils';
|
|
3
|
-
import { IHyperlink,
|
|
3
|
+
import { IHyperlink, IWorksheet } from '@sheetxl/sdk';
|
|
4
4
|
import { StickyState, GridPlacement, HoverTipProps, LayerProps } from '@sheetxl/grid-react';
|
|
5
5
|
/** What a link preview service found for a page. Every field is optional; an empty one shows nothing. */
|
|
6
6
|
export interface LinkPreview {
|
|
@@ -21,7 +21,7 @@ export interface LinkPreview {
|
|
|
21
21
|
export type LinkPreviewLookup = (address: string) => LinkPreview | Promise<LinkPreview | null> | null;
|
|
22
22
|
/** What a hyperlink card is handed. The actions are bound to the hovered cell. */
|
|
23
23
|
export interface HyperlinkCardRenderProps {
|
|
24
|
-
sheet:
|
|
24
|
+
sheet: IWorksheet;
|
|
25
25
|
/** The hovered cell (the card anchors to its range, a merge included). */
|
|
26
26
|
coords: CellCoords;
|
|
27
27
|
hyperlink: IHyperlink;
|
|
@@ -29,10 +29,13 @@ export interface HyperlinkCardRenderProps {
|
|
|
29
29
|
open: () => Promise<void>;
|
|
30
30
|
/** Copy the address to the clipboard. */
|
|
31
31
|
copy: () => Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Select the cell and open the hyperlink editor. Absent for a read-only link
|
|
34
|
+
* ({@link IHyperlink.isReadOnly}).
|
|
35
|
+
*/
|
|
36
|
+
edit?: () => void;
|
|
37
|
+
/** Remove the link; the cell's text stays. Absent for a read-only link. */
|
|
38
|
+
remove?: () => void;
|
|
36
39
|
/**
|
|
37
40
|
* The linked page's preview once the lookup resolved, or `null` — see
|
|
38
41
|
* {@link HyperlinkLayerProps.preview}. Draw its picture with {@link LinkPreviewImage}, which shows it
|
|
@@ -47,9 +50,9 @@ export interface HyperlinkCardRenderProps {
|
|
|
47
50
|
* Props for {@link HyperlinkLayer}.
|
|
48
51
|
*/
|
|
49
52
|
export interface HyperlinkLayerProps extends Omit<LayerProps, 'children'> {
|
|
50
|
-
sheet:
|
|
53
|
+
sheet: IWorksheet;
|
|
51
54
|
/** The card. @defaultValue the plain card: address · copy · edit · remove */
|
|
52
|
-
renderCard?: (props: HyperlinkCardRenderProps) => React.ReactNode;
|
|
55
|
+
renderCard?: ((props: HyperlinkCardRenderProps) => React.ReactNode) | null;
|
|
53
56
|
/**
|
|
54
57
|
* Looks up a preview of the linked page to show under the actions. Off by default: it is a request to
|
|
55
58
|
* a third party per hovered web link. {@link linkPreviewMicrolink} (the page's social card) and
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
export interface MovableKindScopeProps {
|
|
4
|
-
sheet:
|
|
4
|
+
sheet: IWorksheet;
|
|
5
5
|
/** The movable layer's z. The kind's scope joins the pane's chain just above it. */
|
|
6
6
|
order: number;
|
|
7
7
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { RangeCoordValue } from '@sheetxl/utils';
|
|
3
|
-
import { ICellRegion,
|
|
2
|
+
import { ICellRegion, IWorksheet, IWorksheetView } from '@sheetxl/sdk';
|
|
4
3
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
5
4
|
/**
|
|
6
5
|
* The regions to punch out of the hatch, coalesced by appearance.
|
|
@@ -26,9 +25,9 @@ export interface ProtectionLayerProps extends LayerProps {
|
|
|
26
25
|
/** Class for the layer (devtools identification). */
|
|
27
26
|
className?: string;
|
|
28
27
|
/** The sheet whose locked area is hatched. */
|
|
29
|
-
sheet:
|
|
28
|
+
sheet: IWorksheet;
|
|
30
29
|
/** The view carrying `isShowLockedShading()` — the toggle this layer draws for. */
|
|
31
|
-
sheetView:
|
|
30
|
+
sheetView: IWorksheetView;
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
33
|
* The **locked-cell hatch** — the sheet's protected area, with the unlocked ranges cut out of it.
|
|
@@ -48,5 +47,5 @@ export interface ProtectionLayerProps extends LayerProps {
|
|
|
48
47
|
*
|
|
49
48
|
* Passive paint (`pointerEvents: none`), below the selection.
|
|
50
49
|
*/
|
|
51
|
-
export declare const ProtectionLayer:
|
|
50
|
+
export declare const ProtectionLayer: import('react').MemoExoticComponent<(props: ProtectionLayerProps) => import("react").JSX.Element | null>;
|
|
52
51
|
//# sourceMappingURL=ProtectionLayer.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet, IWorkbook } from '@sheetxl/sdk';
|
|
3
3
|
import { LayerProps, StickyState } from '@sheetxl/grid-react';
|
|
4
4
|
import { RangeAnnotation } from '../annotation';
|
|
5
5
|
/** How an intent is drawn: its box, and the chip's frame. */
|
|
@@ -34,7 +34,7 @@ export interface RangeAnnotationChipProps {
|
|
|
34
34
|
}
|
|
35
35
|
export interface RangeAnnotationLayerProps extends Omit<LayerProps, 'children'> {
|
|
36
36
|
/** The sheet whose annotations are drawn. @defaultValue the sheet in context (an injected layer needs none) */
|
|
37
|
-
sheet?:
|
|
37
|
+
sheet?: IWorksheet;
|
|
38
38
|
/** Per-intent look. Merged over {@link DEFAULT_ANNOTATION_STYLES}. */
|
|
39
39
|
styles?: Readonly<Record<string, RangeAnnotationStyle>>;
|
|
40
40
|
/** Render the chip beside an annotation that is in view. Omit for the default. */
|
|
@@ -1,12 +1,12 @@
|
|
|
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
|
/**
|
|
5
5
|
* Props for {@link ResizeIndicator}.
|
|
6
6
|
*/
|
|
7
7
|
export interface ResizeIndicatorProps extends Omit<LayerProps, 'children'> {
|
|
8
8
|
/** The sheet — for the entire-range extent. */
|
|
9
|
-
sheet:
|
|
9
|
+
sheet: IWorksheet;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* The **main-grid overlay** for an in-progress header resize: the before/after guide-lines that span the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
3
3
|
export interface SheetBackgroundLayerProps extends LayerProps {
|
|
4
4
|
/** Class for the background box (devtools identification). */
|
|
@@ -6,7 +6,7 @@ export interface SheetBackgroundLayerProps extends LayerProps {
|
|
|
6
6
|
/** Style for the background box. */
|
|
7
7
|
style?: React.CSSProperties;
|
|
8
8
|
/** The sheet whose background picture (a tiled fill rendered behind the cells) is rendered. */
|
|
9
|
-
sheet:
|
|
9
|
+
sheet: IWorksheet;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Renders the sheet's background.
|
|
@@ -16,7 +16,7 @@ export interface SheetBackgroundLayerProps extends LayerProps {
|
|
|
16
16
|
* through to the cells. The tile pattern is anchored to the sheet's A1 origin — the pane's screen
|
|
17
17
|
* position for cell `0,0` encodes the current scroll offset — so it scrolls with the content (one
|
|
18
18
|
* instance per pane). The caller adds this layer only when a picture is present (see
|
|
19
|
-
* `
|
|
19
|
+
* `IWorksheet.getPicture`) and places it FIRST, so it sits at the bottom of the z-stack.
|
|
20
20
|
*/
|
|
21
21
|
export declare const SheetBackgroundLayer: import('react').NamedExoticComponent<SheetBackgroundLayerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
22
22
|
//# sourceMappingURL=SheetBackgroundLayer.d.ts.map
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet, IWorksheetView } from '@sheetxl/sdk';
|
|
3
3
|
import { CellRendererProps, IEditable, LayerProps } from '@sheetxl/grid-react';
|
|
4
|
-
import {
|
|
4
|
+
import { CellTextRendererProps, ColumnButtonConfigProps } from '../cell';
|
|
5
|
+
import { EditRejectedNotice } from '../editor/useEditRejectedNotice';
|
|
5
6
|
export interface SheetCellLayerProps extends LayerProps {
|
|
6
7
|
/** Class for the layer (devtools identification). */
|
|
7
8
|
className?: string;
|
|
8
9
|
/** The sheet whose cells are rendered. */
|
|
9
|
-
sheet:
|
|
10
|
+
sheet: IWorksheet;
|
|
10
11
|
/** The sheet view — drives show-zeros / show-formulas (which cells are worth rendering). */
|
|
11
|
-
sheetView:
|
|
12
|
+
sheetView: IWorksheetView;
|
|
12
13
|
/**
|
|
13
|
-
* Custom per-cell renderer. Default: {@link
|
|
14
|
+
* Custom per-cell renderer. Default: {@link CellTextRenderer} wired to the sheet (doc theme,
|
|
14
15
|
* hyperlink taps, formula-view flags) — the layer owns cell styling, so most hosts never pass this.
|
|
15
16
|
*/
|
|
16
17
|
renderCell?: (props: CellRendererProps) => React.ReactNode;
|
|
@@ -19,13 +20,19 @@ export interface SheetCellLayerProps extends LayerProps {
|
|
|
19
20
|
* column-button members ride along on the shared type but are consumed by
|
|
20
21
|
* `SheetColumnButtonLayer`, not here — they are stripped before the spread.
|
|
21
22
|
*/
|
|
22
|
-
propsCellRender?: Partial<
|
|
23
|
+
propsCellRender?: Partial<CellTextRendererProps> & ColumnButtonConfigProps;
|
|
23
24
|
/**
|
|
24
25
|
* The shared editable. Subscribed so the edited cell is suppressed while its editor is open —
|
|
25
26
|
* via the layer's live CSS channel (`suppressCell`), so no tile is ever invalidated by an edit
|
|
26
27
|
* start/stop and the grid above is never touched.
|
|
27
28
|
*/
|
|
28
29
|
editable: IEditable<any, any, any>;
|
|
30
|
+
/**
|
|
31
|
+
* Told when a cell control's write is refused, as a click on a checkbox in a locked cell is.
|
|
32
|
+
* Share the host's callback ({@link useEditRejectedNotice}) so every pane forms one notice scope.
|
|
33
|
+
* @defaultValue this layer's own {@link useEditRejectedNotice}
|
|
34
|
+
*/
|
|
35
|
+
onEditRejected?: EditRejectedNotice;
|
|
29
36
|
}
|
|
30
37
|
/**
|
|
31
38
|
* The sheet's cell layer.
|
|
@@ -39,9 +46,9 @@ export interface SheetCellLayerProps extends LayerProps {
|
|
|
39
46
|
* Beside the immutable tile snapshots ({@link CellTileDiv}) the layer owns the two LIVE per-cell
|
|
40
47
|
* concerns that must never touch a tile:
|
|
41
48
|
* - the edited cell is suppressed while its editor is open (live CSS `suppressCell` channel);
|
|
42
|
-
* - **formula view** ({@link
|
|
49
|
+
* - **formula view** ({@link IWorksheetView.isShowFormulas}): when the selection anchor sits on a
|
|
43
50
|
* formula cell, that cell's plain snapshot is suppressed through the SAME channel and a
|
|
44
|
-
* tokenized, syntax-colored {@link
|
|
51
|
+
* tokenized, syntax-colored {@link CellFormulaRenderer} overlay is drawn in its place — the
|
|
45
52
|
* references themselves are outlined by `SheetReferenceLayer`, both keyed off
|
|
46
53
|
* {@link useFormulaViewAnchor} so text and rectangles share colors.
|
|
47
54
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
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 { ColumnButtonConfigProps } from '../cell/ColumnButton';
|
|
5
5
|
export interface SheetColumnButtonLayerProps extends LayerProps, ColumnButtonConfigProps {
|
|
6
6
|
/** The sheet whose table column (filter/sort) buttons are rendered. */
|
|
7
|
-
sheet:
|
|
7
|
+
sheet: IWorksheet;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* The sheet's column (filter/sort) button layer — a {@link CellLayer} (which roots the {@link Layer})
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ISheet, ISheetView } from '@sheetxl/sdk';
|
|
1
|
+
import { IWorksheet, IWorksheetView } from '@sheetxl/sdk';
|
|
3
2
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
3
|
export interface SheetGridLineLayerProps extends LayerProps {
|
|
5
4
|
/** The sheet whose gridlines are rendered. */
|
|
6
|
-
sheet:
|
|
5
|
+
sheet: IWorksheet;
|
|
7
6
|
/** The sheet view — drives styling, per-axis visibility, and which cells are scanned (for merges). */
|
|
8
|
-
sheetView:
|
|
7
|
+
sheetView: IWorksheetView;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
|
-
* The sheet's gridline layer
|
|
10
|
+
* The sheet's gridline layer: the view's gridline wherever no cell border owns the edge, so a
|
|
11
|
+
* dashed or double border never has a gridline under it. Sits below the fills, so a filled cell
|
|
12
|
+
* hides it. An axis whose Normal style has a border draws that border instead, in the
|
|
13
|
+
* {@link BorderLayer} (it is a border on every cell, and draws above the fills).
|
|
12
14
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* (view) and derives them from the sheet's normal style and the view's gridline color / zoom / show flags —
|
|
17
|
-
* decoupled from the grid above it. The *merges* the lines break around are data, so it also self-subscribes
|
|
18
|
-
* to its pane's visible range via {@link useSheetVisibleCells} and re-renders itself on a data change (busting
|
|
19
|
-
* the underlying grid-react {@link GridlineLayer} with its own token). One per pane.
|
|
15
|
+
* Self-subscribes to `onStyleChange` (sheet) and `onZoomScaleChange` (view) for the styling and
|
|
16
|
+
* per-axis visibility, and to its pane's visible range via {@link useSheetVisibleCells} for the
|
|
17
|
+
* merges and borders the lines break around. One per pane.
|
|
20
18
|
*/
|
|
21
|
-
export declare const SheetGridLineLayer:
|
|
19
|
+
export declare const SheetGridLineLayer: import('react').MemoExoticComponent<(props: SheetGridLineLayerProps) => import("react").JSX.Element | null>;
|
|
22
20
|
//# sourceMappingURL=SheetGridLineLayer.d.ts.map
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
|
+
/**
|
|
4
|
+
* A grid surface of a sheet: the cells, or one of the header strips. Each is its own grid, with its own
|
|
5
|
+
* layer stack.
|
|
6
|
+
*/
|
|
7
|
+
export type SheetSurface = 'cells' | 'rowHeaders' | 'columnHeaders';
|
|
8
|
+
/**
|
|
9
|
+
* Provides the {@link SheetSurface} a surface's layers are rendered on.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare const SheetSurfaceProvider: React.Provider<SheetSurface | null>;
|
|
14
|
+
/**
|
|
15
|
+
* The {@link SheetSurface} the calling layer is rendered on, or `null` outside a sheet's surfaces.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Only a layer declared on more than one surface needs it, to render the part that belongs on each:
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* const surface = useGridSurface();
|
|
22
|
+
* if (surface === 'rowHeaders') return <MyButtons />;
|
|
23
|
+
* if (surface === 'cells') return <MyPreview />;
|
|
24
|
+
* return null;
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const useGridSurface: () => SheetSurface | null;
|
|
28
|
+
/**
|
|
29
|
+
* Which sheets a {@link SheetLayers} applies to: a sheet, sheets, or a test. Not names: a sheet can be
|
|
30
|
+
* renamed, and a name can be reused by another sheet.
|
|
31
|
+
*/
|
|
32
|
+
export type SheetLayersFilter = IWorksheet | readonly IWorksheet[] | ((sheet: IWorksheet) => boolean);
|
|
33
|
+
export interface SheetLayersProps {
|
|
34
|
+
/**
|
|
35
|
+
* The sheets whose surfaces get the layers. Omitted, every sheet's do.
|
|
36
|
+
*/
|
|
37
|
+
sheets?: SheetLayersFilter;
|
|
38
|
+
/**
|
|
39
|
+
* The surfaces the layers are rendered on. A layer on more than one reads which it is on with
|
|
40
|
+
* {@link useGridSurface}.
|
|
41
|
+
*
|
|
42
|
+
* @defaultValue 'cells'
|
|
43
|
+
*/
|
|
44
|
+
surface?: SheetSurface | readonly SheetSurface[] | 'all';
|
|
45
|
+
/**
|
|
46
|
+
* The layers: each a grid child rooted in a `Layer`, as in a sheet's `layers`.
|
|
47
|
+
*/
|
|
48
|
+
children?: React.ReactNode;
|
|
49
|
+
}
|
|
50
|
+
interface Entry {
|
|
51
|
+
sheets?: SheetLayersFilter;
|
|
52
|
+
surfaces: readonly SheetSurface[];
|
|
53
|
+
children: React.ReactNode;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The {@link SheetLayers} declared under one scope, in declaration order.
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare class SheetLayersRegistry {
|
|
61
|
+
private _entries;
|
|
62
|
+
private _listeners;
|
|
63
|
+
private _version;
|
|
64
|
+
set(id: string, entry: Entry): void;
|
|
65
|
+
delete(id: string): void;
|
|
66
|
+
subscribe: (listener: () => void) => (() => void);
|
|
67
|
+
getVersion: () => number;
|
|
68
|
+
entries(): IterableIterator<[string, Entry]>;
|
|
69
|
+
private _changed;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The registry the {@link SheetLayers} under an element register with: the one of a scope above it, or
|
|
73
|
+
* its own. A workbook element resolves one around both its children and its sheet, and the sheet
|
|
74
|
+
* element inherits it; a standalone sheet element has its own. Provide it with
|
|
75
|
+
* {@link SheetLayersScope}.
|
|
76
|
+
*
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
export declare const useSheetLayersRegistry: () => SheetLayersRegistry;
|
|
80
|
+
/**
|
|
81
|
+
* Provides a {@link SheetLayersRegistry} to the {@link SheetLayers} and surfaces under it.
|
|
82
|
+
*
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
export declare const SheetLayersScope: React.Provider<SheetLayersRegistry | null>;
|
|
86
|
+
/**
|
|
87
|
+
* Declares layers for a sheet's surfaces, as children of a sheet (or workbook) element:
|
|
88
|
+
*
|
|
89
|
+
* ```tsx
|
|
90
|
+
* <WorksheetElement sheet={sheet}>
|
|
91
|
+
* <SheetLayers surface={['rowHeaders', 'cells']}>
|
|
92
|
+
* <CellInsertLayer />
|
|
93
|
+
* </SheetLayers>
|
|
94
|
+
* </WorksheetElement>
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
97
|
+
* @remarks
|
|
98
|
+
* It renders nothing where it is declared: each matching surface renders the layers as its own, on top
|
|
99
|
+
* of its built-in ones, so they read that surface's pane, sheet and state. A layer declared on several
|
|
100
|
+
* surfaces is mounted on each (and on each pane of a frozen sheet); its copies share state through
|
|
101
|
+
* `useSurfaceState`, which spans all of a sheet's surfaces.
|
|
102
|
+
*
|
|
103
|
+
* Layers of separate `SheetLayers` stack in declaration order, unless a layer sets `zIndex`.
|
|
104
|
+
*/
|
|
105
|
+
export declare const SheetLayers: React.FC<SheetLayersProps>;
|
|
106
|
+
/**
|
|
107
|
+
* The layers declared for one surface of a sheet, flattened into one list of grid children.
|
|
108
|
+
*
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
export declare const useSheetLayers: (sheet: IWorksheet | null | undefined, surface: SheetSurface,
|
|
112
|
+
/** The registry, when the caller provides it rather than sits under it. */
|
|
113
|
+
propRegistry?: SheetLayersRegistry) => React.ReactNode[];
|
|
114
|
+
export {};
|
|
115
|
+
//# sourceMappingURL=SheetLayers.d.ts.map
|