@sheetxl/react 0.8.0-beta.10 → 0.8.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{CYoUd5KIl7W3AsxH.mjs → 1-LEUre9ZLG0OYYB.mjs} +24 -23
- package/browser/esm/94dxo1A-z8lgiiGw.mjs +128 -0
- package/browser/esm/{BwRduT8FTrk5n72r.mjs → B26QVfjer2oY2ewK.mjs} +1 -1
- package/browser/esm/B93LSmhnvkxNXTq-.mjs +42 -0
- package/browser/esm/{BZcQ-KYwS62Ut45c.mjs → BQYS2Yf-EAV_tBLr.mjs} +1 -1
- package/browser/esm/BegvsXeRs7e-9t8k.mjs +8 -0
- package/browser/esm/Bl2BFCQ00fotauKB.mjs +36 -0
- package/browser/esm/{Cfe0kofqVKGxLqO6.mjs → Bos4Rkp8UTF7QXUB.mjs} +1 -1
- package/browser/esm/{Dd-ZybXAgoq9pgGv.mjs → C1pc9F4Rt2C5FKUo.mjs} +1 -1
- package/browser/esm/{C6urN77szrYwODXF.mjs → CPnnESfZz2jjJd82.mjs} +1 -1
- package/browser/esm/CRi6DQ3UXmPEv-w_.mjs +729 -0
- package/browser/esm/{BuvXl14hs-1CvjeA.mjs → ClAtIfYbsUPA073B.mjs} +1 -1
- package/browser/esm/CzRIbc-Lk__VMLKM.mjs +60 -0
- package/browser/esm/{DyU9UInRnfkPYYlR.mjs → D2u6THGErqw64KQI.mjs} +1 -1
- package/browser/esm/{cYjYjqEsyd63x8t4.mjs → DMdsMPT0fWBbTkNn.mjs} +1 -1
- package/browser/esm/{Bow9CzRJrYxak2i5.mjs → DS66lAIM-9M-YoZQ.mjs} +5 -8
- package/browser/esm/DgL7Dy-Lqcr1TvW6.mjs +23528 -0
- package/browser/esm/{DjiBz4H74I6nPUY6.mjs → Dnh1kpz3v1JKtRD_.mjs} +2 -2
- package/browser/esm/{Sp6PJavGKpF8SJzA.mjs → cQ6xdPFkEcuDlNTN.mjs} +1 -1
- package/browser/esm/chart.mjs +32 -52
- package/browser/esm/control.mjs +2 -2
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +6590 -4824
- package/browser/esm/note.mjs +73 -47
- package/browser/esm/picture.mjs +2 -2
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +5 -5
- package/browser/esm/ugfE7YeZALQURDKF.mjs +241 -0
- package/licenses/dependencies.txt +313 -1
- package/node/esm/6zApGj9DozhFy-bx.mjs +35 -0
- package/node/esm/{DPN0n6MGYQ9vZ2KO.mjs → BMVK5plvmBOAIlxP.mjs} +1 -1
- package/node/esm/{Dxbm6ryIDCEi26RO.mjs → BaRfst1euuhquupX.mjs} +1 -1
- package/node/esm/{BJ7ZZm63j5O6cvrB.mjs → Be9c1GwQkPo8Piuh.mjs} +1 -1
- package/node/esm/{DhSq680c5tgMFFbj.mjs → BiaDWnN3tT7neoRL.mjs} +1 -1
- package/node/esm/BlxXufqBBg1PtsXd.mjs +8 -0
- package/node/esm/{CM5BT7h-hMtST2bE.mjs → C_SNx7TlFEcwbYjx.mjs} +1 -1
- package/node/esm/DJPgbB1X22YmhbaR.mjs +242 -0
- package/node/esm/DTMTIrYIK1eZswsM.mjs +37 -0
- package/node/esm/{Buw-VKYJy3y5dbaJ.mjs → D_pCpfdQowV_4Aje.mjs} +23 -22
- package/node/esm/{DYosMUJKp-3MSO4q.mjs → DgGEHydEjD7nfsDB.mjs} +1 -1
- package/node/esm/{CFFlJxNwgyInjEnh.mjs → Dj5FM7_-YWhCtCCt.mjs} +1 -1
- package/node/esm/{GkmuxU7OwRZtm2Rf.mjs → DxQZmb-j4NLUO9Af.mjs} +1 -1
- package/node/esm/{BfRn5S5V4X8xIAEa.mjs → JiQGhLkoL8CJpVvA.mjs} +1 -1
- package/node/esm/b-XRVRI1fYQQMkTC.mjs +1664 -0
- package/node/esm/chart.mjs +32 -52
- package/node/esm/control.mjs +2 -2
- package/node/esm/{C_ANM4feA1xV-pri.mjs → gpD-9LDW92phhoma.mjs} +1 -1
- package/node/esm/group.mjs +3 -3
- package/node/esm/index.mjs +9005 -7225
- package/node/esm/note.mjs +86 -60
- package/node/esm/picture.mjs +2 -2
- package/node/esm/shape.mjs +292 -340
- package/node/esm/sigD1UFqvPlWUw_9.mjs +128 -0
- package/node/esm/slicer.mjs +15 -15
- package/node/esm/{D3YXHeOyFp00Xk3m.mjs → umljAT66yb3_rURh.mjs} +53 -56
- 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 +11 -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 +5 -0
- package/resources/locales/en/chart.cmd.json +82 -0
- package/resources/locales/en/sheet.cmd.json +11 -0
- package/resources/locales/en/table.cmd.json +1 -1
- package/resources/locales/en/ui.msg.json +12 -0
- package/resources/locales/en/workbook.cmd.json +5 -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 +74 -1
- package/types/src/cell/FormulaCellRenderer.d.ts +5 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +2 -2
- package/types/src/chart/ChartCommands.d.ts +15 -0
- package/types/src/chart/ChartEditor.d.ts +10 -2
- package/types/src/chart/ChartElement.d.ts +111 -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/echarts.d.ts +30 -0
- package/types/src/chart/paint/index.d.ts +12 -0
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +132 -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 +31 -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/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/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 +2 -2
- 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 +2 -2
- package/types/src/layer/CellFillLayer.d.ts +2 -2
- 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/HyperlinkLayer.d.ts +3 -3
- package/types/src/layer/MovableKindScope.d.ts +2 -2
- package/types/src/layer/ProtectionLayer.d.ts +3 -3
- 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 +4 -4
- 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 +2 -2
- package/types/src/layer/SheetOutlineLayer.d.ts +2 -2
- 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 +2 -2
- package/types/src/layer/TableToolbar.d.ts +3 -3
- 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 +5 -4
- package/types/src/layer/_tableColor.d.ts +2 -2
- package/types/src/layer/index.d.ts +2 -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/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/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 +1 -1
- package/types/src/sheet/{ISheetElement.d.ts → IWorksheetElement.d.ts} +46 -13
- package/types/src/sheet/OpaqueSheetElement.d.ts +21 -0
- package/types/src/sheet/SheetCommandProvider.d.ts +2 -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 +4 -4
- 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/table/TableCommands.d.ts +2 -2
- package/types/src/taskPane/TaskPaneArea.d.ts +7 -0
- 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 +3 -2
- package/types/src/workbook/IWorkbookElement.d.ts +27 -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/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,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,14 +1,14 @@
|
|
|
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
4
|
import { SheetCellRendererProps, ColumnButtonConfigProps } from '../cell';
|
|
5
5
|
export interface SheetCellLayerProps extends LayerProps {
|
|
6
6
|
/** Class for the layer (devtools identification). */
|
|
7
7
|
className?: string;
|
|
8
8
|
/** The sheet whose cells are rendered. */
|
|
9
|
-
sheet:
|
|
9
|
+
sheet: IWorksheet;
|
|
10
10
|
/** The sheet view — drives show-zeros / show-formulas (which cells are worth rendering). */
|
|
11
|
-
sheetView:
|
|
11
|
+
sheetView: IWorksheetView;
|
|
12
12
|
/**
|
|
13
13
|
* Custom per-cell renderer. Default: {@link SheetCellRenderer} wired to the sheet (doc theme,
|
|
14
14
|
* hyperlink taps, formula-view flags) — the layer owns cell styling, so most hosts never pass this.
|
|
@@ -39,7 +39,7 @@ export interface SheetCellLayerProps extends LayerProps {
|
|
|
39
39
|
* Beside the immutable tile snapshots ({@link CellTileDiv}) the layer owns the two LIVE per-cell
|
|
40
40
|
* concerns that must never touch a tile:
|
|
41
41
|
* - the edited cell is suppressed while its editor is open (live CSS `suppressCell` channel);
|
|
42
|
-
* - **formula view** ({@link
|
|
42
|
+
* - **formula view** ({@link IWorksheetView.isShowFormulas}): when the selection anchor sits on a
|
|
43
43
|
* formula cell, that cell's plain snapshot is suppressed through the SAME channel and a
|
|
44
44
|
* tokenized, syntax-colored {@link FormulaCellRenderer} overlay is drawn in its place — the
|
|
45
45
|
* references themselves are outlined by `SheetReferenceLayer`, both keyed off
|
|
@@ -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
|
|
@@ -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 { IMovableLayerElement, MovableLayerProps, MovableElementProps } from '../movable';
|
|
5
5
|
export interface SheetMovableLayerProps extends LayerProps {
|
|
6
6
|
/** Class forwarded to the inner layer's host box (devtools identification). */
|
|
7
7
|
className?: string;
|
|
8
|
-
sheet:
|
|
8
|
+
sheet: IWorksheet;
|
|
9
9
|
/**
|
|
10
10
|
* Render a movable element
|
|
11
11
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { IRange,
|
|
2
|
+
import { IRange, IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
4
|
import { OutlineButtonProps } from '../cell/OutlineButton';
|
|
5
5
|
export interface SheetOutlineLayerProps extends LayerProps {
|
|
6
6
|
/** The sheet whose outline is drawn. */
|
|
7
|
-
sheet:
|
|
7
|
+
sheet: IWorksheet;
|
|
8
8
|
/** Rows or columns. */
|
|
9
9
|
axis: IRange.Axis;
|
|
10
10
|
/** The lanes across the gutter: one per level, plus one. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { LayerProps } from '@sheetxl/grid-react';
|
|
4
4
|
export interface SheetTableCommandLayerProps extends LayerProps {
|
|
5
|
-
sheet:
|
|
5
|
+
sheet: IWorksheet;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* **Command-only layer for the `table` scope** — no visuals (the visual chrome lives in {@link TableLayer});
|
|
@@ -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 SpillLayerProps extends LayerProps {
|
|
5
5
|
/** Style for the outline box. */
|
|
@@ -7,7 +7,7 @@ export interface SpillLayerProps extends LayerProps {
|
|
|
7
7
|
/**
|
|
8
8
|
* The sheet.
|
|
9
9
|
*/
|
|
10
|
-
sheet:
|
|
10
|
+
sheet: IWorksheet;
|
|
11
11
|
/**
|
|
12
12
|
* The animation time in milliseconds.
|
|
13
13
|
*
|
|
@@ -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
|
import { TableToolbarRenderProps } from './TableToolbar';
|
|
5
5
|
export interface TableLayerProps extends LayerProps {
|
|
6
6
|
/**
|
|
7
7
|
* The sheet.
|
|
8
8
|
*/
|
|
9
|
-
sheet:
|
|
9
|
+
sheet: IWorksheet;
|
|
10
10
|
/**
|
|
11
11
|
* The toolbar that floats at a hovered table's top-right corner.
|
|
12
12
|
* @defaultValue a plain split button: edit the table · a menu of the table commands
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet, ITable } from '@sheetxl/sdk';
|
|
3
3
|
import { HoverTipProps, StickyState } from '@sheetxl/grid-react';
|
|
4
4
|
/** What the table toolbar is handed. */
|
|
5
5
|
export interface TableToolbarRenderProps {
|
|
6
|
-
sheet:
|
|
6
|
+
sheet: IWorksheet;
|
|
7
7
|
/** The hovered table. A press anywhere on the toolbar makes it the current table first, so the table commands act on it. */
|
|
8
8
|
table: ITable;
|
|
9
9
|
/** The table's theme color, for chrome that wears it. */
|
|
@@ -19,7 +19,7 @@ export interface TableToolbarRenderProps {
|
|
|
19
19
|
}
|
|
20
20
|
/** What {@link TableLayer} hands its toolbar float. */
|
|
21
21
|
export interface TableToolbarFloatProps {
|
|
22
|
-
sheet:
|
|
22
|
+
sheet: IWorksheet;
|
|
23
23
|
/** The table under the pointer, as the table layer's hover found it. */
|
|
24
24
|
hovered: ITable | null;
|
|
25
25
|
renderToolbar?: (props: TableToolbarRenderProps) => React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { CellCoords } from '@sheetxl/utils';
|
|
3
|
-
import {
|
|
3
|
+
import { IWorksheet, IDataValidation, IRange } from '@sheetxl/sdk';
|
|
4
4
|
import { IEditable, LayerProps } from '@sheetxl/grid-react';
|
|
5
5
|
/** What the probe hands the button: the validations to offer, and the cell they belong to. */
|
|
6
6
|
export interface ValidationDropdown {
|
|
@@ -22,7 +22,7 @@ export interface ValidationDropdownLayerProps extends Omit<LayerProps, 'children
|
|
|
22
22
|
/** Style for the floated button container. */
|
|
23
23
|
style?: React.CSSProperties;
|
|
24
24
|
/** The sheet whose selection is followed. */
|
|
25
|
-
sheet:
|
|
25
|
+
sheet: IWorksheet;
|
|
26
26
|
/**
|
|
27
27
|
* The editable a pick is entered through — the sheet's shared one, so a pick is a typed entry:
|
|
28
28
|
* coerced, formatted and checked as one. Without it the button opens nothing.
|
|
@@ -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 ValidationIndicatorLayerProps extends LayerProps {
|
|
5
5
|
/** Class for the layer (devtools identification). */
|
|
@@ -7,7 +7,7 @@ export interface ValidationIndicatorLayerProps extends LayerProps {
|
|
|
7
7
|
/** Style for the indicators host box. */
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
9
|
/** The sheet whose data validations are indicated. */
|
|
10
|
-
sheet:
|
|
10
|
+
sheet: IWorksheet;
|
|
11
11
|
/** Size (px, unzoomed) of the invalid-value corner mark. @defaultValue 7 */
|
|
12
12
|
markSize?: number;
|
|
13
13
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { CellCoords, RangeCoords } from '@sheetxl/utils';
|
|
3
|
-
import { IDataValidation,
|
|
3
|
+
import { IDataValidation, IWorksheet } from '@sheetxl/sdk';
|
|
4
4
|
import { IEditable, LayerProps } from '@sheetxl/grid-react';
|
|
5
5
|
import { ValidationAlert } from '../editor/validationAlert';
|
|
6
6
|
/** The prompt a cell shows: the rule's title and message, and the range it hangs under. */
|
|
@@ -16,16 +16,17 @@ export interface ValidationPrompt {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* The input prompt for the cell at `coords`: from the first covering rule, by priority, that shows
|
|
19
|
-
* a prompt and has a title or a message to show. `null` when none does
|
|
19
|
+
* a prompt and has a title or a message to show. `null` when none does, or when the sheet disables
|
|
20
|
+
* prompts.
|
|
20
21
|
*/
|
|
21
|
-
export declare const findValidationPrompt: (sheet:
|
|
22
|
+
export declare const findValidationPrompt: (sheet: IWorksheet, coords: CellCoords) => ValidationPrompt | null;
|
|
22
23
|
export interface ValidationPromptLayerProps extends Omit<LayerProps, 'children'> {
|
|
23
24
|
/** Class for the floated container. */
|
|
24
25
|
className?: string;
|
|
25
26
|
/** Style for the floated container. */
|
|
26
27
|
style?: React.CSSProperties;
|
|
27
28
|
/** The sheet whose selection is followed, and whose entries are checked. */
|
|
28
|
-
sheet:
|
|
29
|
+
sheet: IWorksheet;
|
|
29
30
|
/**
|
|
30
31
|
* The editable entries are typed through. It tells an alert on an open edit, which stays while
|
|
31
32
|
* the edit does, from one left behind, which the next key or press clears.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet, ITable } from '@sheetxl/sdk';
|
|
2
2
|
/** The table's theme color (header fill / whole-table top border) as CSS; grey when the style has none. */
|
|
3
|
-
export declare const tableLabelColor: (table: ITable, sheet:
|
|
3
|
+
export declare const tableLabelColor: (table: ITable, sheet: IWorksheet) => string;
|
|
4
4
|
//# sourceMappingURL=_tableColor.d.ts.map
|
|
@@ -28,6 +28,8 @@ export * from './CircularIndicatorLayer';
|
|
|
28
28
|
export * from './CommentsLayer';
|
|
29
29
|
export * from './CommentCardLayer';
|
|
30
30
|
export * from './RangeAnnotationLayer';
|
|
31
|
+
export * from './SheetLayers';
|
|
32
|
+
export * from './CellInsertLayer';
|
|
31
33
|
export * from './ProtectionLayer';
|
|
32
34
|
export * from './HeaderSelectionLayer';
|
|
33
35
|
export * from './HeaderResizerLayer';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet, IRange } from '@sheetxl/sdk';
|
|
2
2
|
import { FreezeDragPosition } from '@sheetxl/grid-react';
|
|
3
3
|
export interface FreezeDrag {
|
|
4
4
|
disabled: boolean;
|
|
@@ -18,5 +18,5 @@ export interface FreezeDrag {
|
|
|
18
18
|
* The drag is allowed only when the scrolling area starts exactly at the freeze — otherwise the frozen
|
|
19
19
|
* and scrolling areas are not contiguous and a drop could not land where it was let go.
|
|
20
20
|
*/
|
|
21
|
-
export declare const useFreezeDrag: (sheet:
|
|
21
|
+
export declare const useFreezeDrag: (sheet: IWorksheet, axis: IRange.Axis) => FreezeDrag;
|
|
22
22
|
//# sourceMappingURL=useFreezeDrag.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
2
|
+
import { BorderNormalLine } from '../border';
|
|
3
|
+
/**
|
|
4
|
+
* The Normal style's border as one line per axis — a border on every cell, blank ones included.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* A boundary is the trailing edge of one cell and the leading edge of the next; the Normal style's
|
|
8
|
+
* two edges meet there and the one Excel draws wins. `null` on an axis with no Normal border.
|
|
9
|
+
* Identity is stable while the resolved style is. The caller re-renders on `onStyleChange`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useNormalBorderLines: (sheet: IWorksheet) => {
|
|
12
|
+
rows: BorderNormalLine | null;
|
|
13
|
+
columns: BorderNormalLine | null;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useNormalBorderLines.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICellRange, ICellRegion, IRange,
|
|
1
|
+
import { ICellRange, ICellRegion, IRange, IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
import { IGridPane } from '@sheetxl/grid-react';
|
|
3
3
|
export interface SheetFeatureRegions {
|
|
4
4
|
/** The viewport's regions for the feature — engine-merged blocks, ready to place. */
|
|
@@ -17,5 +17,5 @@ export interface SheetFeatureRegions {
|
|
|
17
17
|
* {@link useSheetVisibleCells}'s shape — per-pane, cached by range key, token-invalidated — so
|
|
18
18
|
* layers can swap sources without changing their contract.
|
|
19
19
|
*/
|
|
20
|
-
export declare const useSheetFeatureRegions: (sheet:
|
|
20
|
+
export declare const useSheetFeatureRegions: (sheet: IWorksheet, feature: ICellRange.Feature) => SheetFeatureRegions;
|
|
21
21
|
//# sourceMappingURL=useSheetFeatureRegions.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet, ICell, IRange } from '@sheetxl/sdk';
|
|
2
2
|
import { IGridPane } from '@sheetxl/grid-react';
|
|
3
3
|
export type SheetVisibleCell = {
|
|
4
4
|
cell: ICell.Coords;
|
|
@@ -56,5 +56,5 @@ export interface SheetVisibleCells {
|
|
|
56
56
|
* layer(s) that asked, never the grid above them. Used by {@link SheetCellLayer} and
|
|
57
57
|
* {@link SheetGridLineLayer}.
|
|
58
58
|
*/
|
|
59
|
-
export declare const useSheetVisibleCells: (sheet:
|
|
59
|
+
export declare const useSheetVisibleCells: (sheet: IWorksheet, options?: SheetVisibleCellsOptions) => SheetVisibleCells;
|
|
60
60
|
//# sourceMappingURL=useSheetVisibleCells.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet, ICell, IRange, IConditionalFormat } from '@sheetxl/sdk';
|
|
2
2
|
import { IGridPane } from '@sheetxl/grid-react';
|
|
3
3
|
/** One visible cell a conditional-format rule DRAWS in. */
|
|
4
4
|
export interface SheetDecoratedCell {
|
|
@@ -38,5 +38,5 @@ export interface SheetVisibleDecorations {
|
|
|
38
38
|
* (`onConditionalFormatsChange`), or a value moves within a rule's range — which can restripe every
|
|
39
39
|
* cell the rule covers, not just the edited one, because the domain is range-wide.
|
|
40
40
|
*/
|
|
41
|
-
export declare const useSheetVisibleDecorations: (sheet:
|
|
41
|
+
export declare const useSheetVisibleDecorations: (sheet: IWorksheet, kind: SheetDecorationKind) => SheetVisibleDecorations;
|
|
42
42
|
//# sourceMappingURL=useSheetVisibleDecorations.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet } from '@sheetxl/sdk';
|
|
2
2
|
import { SheetVisibleCells } from './useSheetVisibleCells';
|
|
3
3
|
/**
|
|
4
4
|
* The "which cells host a column (filter/sort) button" source for a single pane, plus
|
|
@@ -18,5 +18,5 @@ import { SheetVisibleCells } from './useSheetVisibleCells';
|
|
|
18
18
|
* table add/remove/auto-table/layout/undo (sheet events) and hidden-button / show-headers / column
|
|
19
19
|
* add-remove / resize (which fire `onAnyChange` on the TABLE, so we subscribe to each table too).
|
|
20
20
|
*/
|
|
21
|
-
export declare const useTableHeaderCells: (sheet:
|
|
21
|
+
export declare const useTableHeaderCells: (sheet: IWorksheet) => SheetVisibleCells;
|
|
22
22
|
//# sourceMappingURL=useTableHeaderCells.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CellCoords } from '@sheetxl/utils';
|
|
2
|
-
import {
|
|
2
|
+
import { IWorksheet, IDataValidation } from '@sheetxl/sdk';
|
|
3
3
|
import { GridAnchor, IEditable } from '@sheetxl/grid-react';
|
|
4
4
|
import { CellPicker } from '../picker';
|
|
5
5
|
/**
|
|
@@ -8,7 +8,7 @@ import { CellPicker } from '../picker';
|
|
|
8
8
|
*/
|
|
9
9
|
export interface ValidationPickerOptions {
|
|
10
10
|
/** The sheet the chosen value is written to. */
|
|
11
|
-
sheet:
|
|
11
|
+
sheet: IWorksheet;
|
|
12
12
|
/**
|
|
13
13
|
* The editable the pick is entered through — the same path as typing the item's text, so the value
|
|
14
14
|
* coerces and formats as a typed one does. `null` offers nothing.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWorksheet, ITable } from '@sheetxl/sdk';
|
|
2
2
|
export interface VisibleTables {
|
|
3
3
|
/** The tables intersecting this pane's visible range (empty array — stable identity — when none). */
|
|
4
4
|
visibleTables: readonly ITable[];
|
|
@@ -23,5 +23,5 @@ export interface VisibleTables {
|
|
|
23
23
|
* PLUS each visible table's `onAnyChange` — table mutations (hidden-button toggle, show-headers, column
|
|
24
24
|
* add/remove, resize) fire on the TABLE, not the sheet.
|
|
25
25
|
*/
|
|
26
|
-
export declare const useVisibleTables: (sheet:
|
|
26
|
+
export declare const useVisibleTables: (sheet: IWorksheet) => VisibleTables;
|
|
27
27
|
//# sourceMappingURL=useVisibleTables.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CellCoords, RangeCoords } from '@sheetxl/utils';
|
|
2
|
-
import { IDataValidation,
|
|
2
|
+
import { IDataValidation, IWorksheet } from '@sheetxl/sdk';
|
|
3
3
|
import { VisibleCell } from '@sheetxl/grid-react';
|
|
4
4
|
/**
|
|
5
5
|
* How a cell's value fails its data validations: `'failed'` when every failing rule raises no
|
|
@@ -38,7 +38,7 @@ export declare const resolveValidationMark: (rules: readonly IDataValidation[],
|
|
|
38
38
|
* Only cells holding a value are visited, unless a rule has Ignore blank off: an empty cell can fail
|
|
39
39
|
* that one, so the window's empty cells are visited too — bounded by the window, as painting is.
|
|
40
40
|
*/
|
|
41
|
-
export declare const findVisibleValidationMarks: (sheet:
|
|
41
|
+
export declare const findVisibleValidationMarks: (sheet: IWorksheet, coords: RangeCoords) => VisibleCell[];
|
|
42
42
|
/**
|
|
43
43
|
* What the hover tip over a cell's invalid-value mark says.
|
|
44
44
|
*/
|
|
@@ -55,7 +55,7 @@ export interface ValidationTip {
|
|
|
55
55
|
* (Show Invalid off), the value passes, or the cell is the active one and its input prompt is
|
|
56
56
|
* already saying what it wants.
|
|
57
57
|
*/
|
|
58
|
-
export declare const findValidationTip: (sheet:
|
|
58
|
+
export declare const findValidationTip: (sheet: IWorksheet, coords: CellCoords) => ValidationTip | null;
|
|
59
59
|
/** The color a mark is drawn in, per state: the theme's severity colors, neutral for no alert. */
|
|
60
60
|
export declare const VALIDATION_MARK_COLORS: Record<ValidationMarkState, string>;
|
|
61
61
|
/** The glyph for each state (the Base icon pack), the same the rule editor shows for a style. */
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export * from './useModelListener';
|
|
2
2
|
export * from './useRangeListener';
|
|
3
|
+
export * from './useCellRange';
|
|
4
|
+
export * from './useCellValue';
|
|
5
|
+
export * from './useCell';
|
|
6
|
+
export type { CellRangeTarget, CellRangeHookOptions } from './useRangeSnapshot';
|
|
7
|
+
export * from './useTable';
|
|
3
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ICell, ICellRange } from '@sheetxl/sdk';
|
|
2
|
+
import { CellRangeTarget, CellRangeHookOptions } from './useRangeSnapshot';
|
|
3
|
+
/**
|
|
4
|
+
* Binds a single cell: returns a snapshot of it and an updater, and re-renders with a new snapshot when
|
|
5
|
+
* the cell changes.
|
|
6
|
+
*
|
|
7
|
+
* @param target The workbook or sheet to read from, or `null` while there is none.
|
|
8
|
+
* @param address The cell's address. A larger range binds its top-left cell.
|
|
9
|
+
* @param options Listener options, and an optional `onChange` that receives each change event.
|
|
10
|
+
* @returns The cell, or `null` while `target` is `null`, and an updater that does nothing until there
|
|
11
|
+
* is a target.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* The cell is a snapshot: it does not change after it is returned, so it is safe to compare or memoize
|
|
15
|
+
* on. Its formatted text, type, formula, and errors are all available alongside the value.
|
|
16
|
+
*
|
|
17
|
+
* The updater takes anything {@link ICellRange.updateCells} does: a value, a cell, or
|
|
18
|
+
* {@link ICell.Modifiers} such as `{ value, style }`. Text is parsed by default, so `'=SUM(A1:A3)'`
|
|
19
|
+
* becomes a formula; pass `{ textParser: false }` to store it as text. For a plain value, see
|
|
20
|
+
* {@link useCellValue}.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* const [total] = useCell(sheet, 'D23');
|
|
25
|
+
* return <output>{total?.getText()}</output>;
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const useCell: (target: CellRangeTarget | null | undefined, address: ICellRange.Address, options?: CellRangeHookOptions) => [ICell | null, (update: ICell.Update, options?: ICellRange.UpdateCellsOptions) => void];
|
|
29
|
+
//# sourceMappingURL=useCell.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ICellRange } from '@sheetxl/sdk';
|
|
2
|
+
import { CellRangeTarget, CellRangeHookOptions } from './useRangeSnapshot';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the range at `address` and re-renders whenever anything in it changes: values (including
|
|
5
|
+
* recalculated formula results), styles, or its address.
|
|
6
|
+
*
|
|
7
|
+
* @param target The workbook or sheet to read from, or `null` while there is none.
|
|
8
|
+
* @param address The range's address. An object address is compared by identity, so keep it stable.
|
|
9
|
+
* @param options Listener options, and an optional `onChange` that receives each change event.
|
|
10
|
+
* @returns The range, or `null` while `target` is `null`.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* The returned range is the same object across renders; read from it during render. For a single
|
|
14
|
+
* value use {@link useCellValue}, and for a single cell's full state use {@link useCell}.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const items = useCellRange(sheet, 'A7:C18');
|
|
19
|
+
* const rows = items?.getValues() ?? [];
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const useCellRange: (target: CellRangeTarget | null | undefined, address: ICellRange.Address, options?: CellRangeHookOptions) => ICellRange | null;
|
|
23
|
+
//# sourceMappingURL=useCellRange.d.ts.map
|