@extend-ai/react-xlsx 0.23.2 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/dist/{chunk-UICWNF5V.js → chunk-2TLD35UF.js} +3 -27
- package/dist/chunk-2TLD35UF.js.map +1 -0
- package/dist/{chunk-M7QVMFYT.js → chunk-C4WTJIRG.js} +709 -487
- package/dist/chunk-C4WTJIRG.js.map +1 -0
- package/dist/{chunk-FGJY2TIS.cjs → chunk-DGNSB5M5.cjs} +2563 -2341
- package/dist/chunk-DGNSB5M5.cjs.map +1 -0
- package/dist/{chunk-A3WA6ZLI.cjs → chunk-GP5SOQQH.cjs} +3 -29
- package/dist/chunk-GP5SOQQH.cjs.map +1 -0
- package/dist/{chunk-MEZOJBL5.js → chunk-HAV76TR2.js} +57 -1
- package/dist/{chunk-MEZOJBL5.js.map → chunk-HAV76TR2.js.map} +1 -1
- package/dist/{chunk-JJJZYWAL.js → chunk-MNIFKMIL.js} +57 -1
- package/dist/chunk-MNIFKMIL.js.map +1 -0
- package/dist/{chunk-3JFYU42O.js → chunk-Q6YY3AB4.js} +2 -28
- package/dist/chunk-Q6YY3AB4.js.map +1 -0
- package/dist/{chunk-JCSAS3M2.cjs → chunk-XZJLPW64.cjs} +2 -26
- package/dist/chunk-XZJLPW64.cjs.map +1 -0
- package/dist/{chunk-TMYAG7GY.cjs → chunk-YOLIVKZD.cjs} +57 -1
- package/dist/chunk-YOLIVKZD.cjs.map +1 -0
- package/dist/{chunk-R3FQM7V3.cjs → chunk-Z4WMURVU.cjs} +57 -1
- package/dist/chunk-Z4WMURVU.cjs.map +1 -0
- package/dist/duke-sheets-provenance.json +5 -5
- package/dist/{duke_sheets_wasm-TLSZAVKP.cjs → duke_sheets_wasm-GM4K5QQX.cjs} +57 -1
- package/dist/duke_sheets_wasm-GM4K5QQX.cjs.map +1 -0
- package/dist/{duke_sheets_wasm-V4J6QYIZ.js → duke_sheets_wasm-MYY4ZNUI.js} +57 -1
- package/dist/duke_sheets_wasm-MYY4ZNUI.js.map +1 -0
- package/dist/{duke_sheets_wasm-R7KXJNYL.js → duke_sheets_wasm-UXZ2KTVD.js} +57 -1
- package/dist/duke_sheets_wasm-UXZ2KTVD.js.map +1 -0
- package/dist/duke_sheets_wasm_bg.wasm +0 -0
- package/dist/index.cjs +695 -606
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -7
- package/dist/index.d.ts +45 -7
- package/dist/index.js +674 -585
- package/dist/index.js.map +1 -1
- package/dist/{internal-BVZRgYaH.d.ts → internal-CwTqluL7.d.cts} +106 -64
- package/dist/{internal-BVZRgYaH.d.cts → internal-CwTqluL7.d.ts} +106 -64
- package/dist/internal.cjs +4 -4
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +3 -3
- package/dist/{shared-chart-V24MOVXX.js → shared-chart-24MCGSFJ.js} +2 -2
- package/dist/{shared-chart-N44DT2QV.cjs → shared-chart-7E6KMGTG.cjs} +3 -3
- package/dist/{shared-chart-N44DT2QV.cjs.map → shared-chart-7E6KMGTG.cjs.map} +1 -1
- package/dist/{shared-chart-64L5EL3Z.js → shared-chart-CGEK7EAB.js} +2 -2
- package/dist/{shared-chart-BZTEPO7C.cjs → shared-chart-GKNMM72Q.cjs} +15 -15
- package/dist/{shared-chart-BZTEPO7C.cjs.map → shared-chart-GKNMM72Q.cjs.map} +1 -1
- package/dist/vanilla.cjs +4 -4
- package/dist/vanilla.d.cts +2 -2
- package/dist/vanilla.d.ts +2 -2
- package/dist/vanilla.js +3 -3
- package/dist/{workbook-runtime-O3QY5UED.js → workbook-runtime-56Y3B64Y.js} +8 -12
- package/dist/workbook-runtime-56Y3B64Y.js.map +1 -0
- package/dist/{workbook-runtime-FXUSOOFT.js → workbook-runtime-7DSKESFL.js} +8 -12
- package/dist/workbook-runtime-7DSKESFL.js.map +1 -0
- package/dist/{workbook-runtime-2HYFRGZD.cjs → workbook-runtime-MEI3CEWO.cjs} +64 -68
- package/dist/workbook-runtime-MEI3CEWO.cjs.map +1 -0
- package/dist/{workbook-runtime-OJDBGHMM.cjs → workbook-runtime-QFXDLSSI.cjs} +66 -70
- package/dist/workbook-runtime-QFXDLSSI.cjs.map +1 -0
- package/dist/xlsx-worker.js +7 -11
- package/dist/xlsx-worker.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-3JFYU42O.js.map +0 -1
- package/dist/chunk-A3WA6ZLI.cjs.map +0 -1
- package/dist/chunk-FGJY2TIS.cjs.map +0 -1
- package/dist/chunk-JCSAS3M2.cjs.map +0 -1
- package/dist/chunk-JJJZYWAL.js.map +0 -1
- package/dist/chunk-M7QVMFYT.js.map +0 -1
- package/dist/chunk-R3FQM7V3.cjs.map +0 -1
- package/dist/chunk-TMYAG7GY.cjs.map +0 -1
- package/dist/chunk-UICWNF5V.js.map +0 -1
- package/dist/duke_sheets_wasm-R7KXJNYL.js.map +0 -1
- package/dist/duke_sheets_wasm-TLSZAVKP.cjs.map +0 -1
- package/dist/duke_sheets_wasm-V4J6QYIZ.js.map +0 -1
- package/dist/workbook-runtime-2HYFRGZD.cjs.map +0 -1
- package/dist/workbook-runtime-FXUSOOFT.js.map +0 -1
- package/dist/workbook-runtime-O3QY5UED.js.map +0 -1
- package/dist/workbook-runtime-OJDBGHMM.cjs.map +0 -1
- /package/dist/{shared-chart-V24MOVXX.js.map → shared-chart-24MCGSFJ.js.map} +0 -0
- /package/dist/{shared-chart-64L5EL3Z.js.map → shared-chart-CGEK7EAB.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -65,6 +65,13 @@ declare const englishMessages: {
|
|
|
65
65
|
mergeAcross: string;
|
|
66
66
|
mergeCells: string;
|
|
67
67
|
unmergeCells: string;
|
|
68
|
+
rowHeight: string;
|
|
69
|
+
columnWidth: string;
|
|
70
|
+
pixels: string;
|
|
71
|
+
cancel: string;
|
|
72
|
+
ok: string;
|
|
73
|
+
hide: string;
|
|
74
|
+
unhide: string;
|
|
68
75
|
selectRow: string;
|
|
69
76
|
selectColumn: string;
|
|
70
77
|
selectAll: string;
|
|
@@ -949,11 +956,14 @@ declare class Worksheet {
|
|
|
949
956
|
setCellStyle(address: string, style: any): void;
|
|
950
957
|
setCellStyleAt(row: number, col: number, style: any): void;
|
|
951
958
|
setColumnWidth(col: number, width: number): void;
|
|
959
|
+
setColumnsHidden(start: number, end: number, hidden: boolean): void;
|
|
952
960
|
setFormula(address: string, formula: string): void;
|
|
961
|
+
setFreezePanes(row: number, col: number): void;
|
|
953
962
|
setProtectedRanges(ranges: any): void;
|
|
954
963
|
setProtection(protection: any): void;
|
|
955
964
|
setRangeStyle(range_str: string, style: any): void;
|
|
956
965
|
setRowHeight(row: number, height: number): void;
|
|
966
|
+
setRowsHidden(start: number, end: number, hidden: boolean): void;
|
|
957
967
|
unmergeCells(range_str: string): boolean;
|
|
958
968
|
usedRange(): any;
|
|
959
969
|
readonly autoFilter: any;
|
|
@@ -975,6 +985,8 @@ declare class Worksheet {
|
|
|
975
985
|
*/
|
|
976
986
|
readonly formulaCount: number;
|
|
977
987
|
readonly freezePanes: any;
|
|
988
|
+
readonly hiddenColumns: Uint32Array;
|
|
989
|
+
readonly hiddenRows: Uint32Array;
|
|
978
990
|
readonly hyperlinkCount: number;
|
|
979
991
|
readonly hyperlinks: any;
|
|
980
992
|
readonly isEmpty: boolean;
|
|
@@ -2368,7 +2380,25 @@ interface UseXlsxViewerControllerOptions {
|
|
|
2368
2380
|
*/
|
|
2369
2381
|
useWorker?: boolean;
|
|
2370
2382
|
}
|
|
2371
|
-
interface
|
|
2383
|
+
interface XlsxViewerLayout {
|
|
2384
|
+
/** Frozen row and column counts on the active worksheet, or null when unfrozen. */
|
|
2385
|
+
frozenPanes: XlsxFreezePanes | null;
|
|
2386
|
+
/** Whether the current selection provides a usable freeze boundary on an editable worksheet. */
|
|
2387
|
+
canFreezePanes: boolean;
|
|
2388
|
+
/** Hide selected rows, or an inclusive, zero-based row interval. */
|
|
2389
|
+
hideRows: (start?: number, end?: number) => void;
|
|
2390
|
+
/** Reveal hidden rows in the selection or an inclusive, zero-based row interval. */
|
|
2391
|
+
unhideRows: (start?: number, end?: number) => void;
|
|
2392
|
+
/** Hide selected columns, or an inclusive, zero-based column interval. */
|
|
2393
|
+
hideColumns: (start?: number, end?: number) => void;
|
|
2394
|
+
/** Reveal hidden columns in the selection or an inclusive, zero-based column interval. */
|
|
2395
|
+
unhideColumns: (start?: number, end?: number) => void;
|
|
2396
|
+
/** Freeze rows above and columns left of the given cell, defaulting to the selected header or active cell. */
|
|
2397
|
+
freezePanes: (cell?: XlsxCellAddress) => void;
|
|
2398
|
+
/** Remove the freeze boundary on the active worksheet. */
|
|
2399
|
+
unfreezePanes: () => void;
|
|
2400
|
+
}
|
|
2401
|
+
interface XlsxViewerController extends XlsxViewerPivots, XlsxViewerLayout {
|
|
2372
2402
|
activeCell: XlsxCellAddress | null;
|
|
2373
2403
|
activeCellAddress: string | null;
|
|
2374
2404
|
activeSheet: XlsxSheetData | null;
|
|
@@ -2453,8 +2483,8 @@ interface XlsxViewerController extends XlsxViewerPivots {
|
|
|
2453
2483
|
resetZoom: () => void;
|
|
2454
2484
|
resizeChartBy: (id: string, handle: XlsxImageResizeHandlePosition, deltaX: number, deltaY: number) => void;
|
|
2455
2485
|
resizeImageBy: (id: string, handle: XlsxImageResizeHandlePosition, deltaX: number, deltaY: number) => void;
|
|
2456
|
-
resizeColumn: (col: number, widthPx: number) => void;
|
|
2457
|
-
resizeRow: (row: number, heightPx: number) => void;
|
|
2486
|
+
resizeColumn: (col: number | readonly number[], widthPx: number) => void;
|
|
2487
|
+
resizeRow: (row: number | readonly number[], heightPx: number) => void;
|
|
2458
2488
|
redo: () => void;
|
|
2459
2489
|
/** Reads browser clipboard representations. Pass paste-event data to retain image and text fallbacks. */
|
|
2460
2490
|
pasteFromClipboard: (clipboardData?: DataTransfer) => Promise<boolean>;
|
|
@@ -2509,7 +2539,7 @@ interface XlsxViewerController extends XlsxViewerPivots {
|
|
|
2509
2539
|
* @param range Zero-based cell range in the active worksheet.
|
|
2510
2540
|
* @param style Partial Excel style patch to apply to the target range.
|
|
2511
2541
|
*/
|
|
2512
|
-
setRangeStyle: (range: XlsxCellRange, style: XlsxCellStyleInput) => void;
|
|
2542
|
+
setRangeStyle: (range: XlsxCellRange | readonly XlsxCellRange[], style: XlsxCellStyleInput) => void;
|
|
2513
2543
|
setZoomScale: (zoomScale: number) => void;
|
|
2514
2544
|
selectCell: (cell: XlsxCellAddress, options?: {
|
|
2515
2545
|
extend?: boolean;
|
|
@@ -2517,6 +2547,9 @@ interface XlsxViewerController extends XlsxViewerPivots {
|
|
|
2517
2547
|
selectChart: (id: string | null) => void;
|
|
2518
2548
|
selectChartElement: (selection: XlsxChartElementSelection | null) => void;
|
|
2519
2549
|
selectRange: (range: XlsxCellRange) => void;
|
|
2550
|
+
selectRanges: (ranges: readonly XlsxCellRange[], activeCorner?: "start" | "end") => void;
|
|
2551
|
+
/** Selected areas in selection order. The last area is the active selection. */
|
|
2552
|
+
selectionRanges: readonly XlsxCellRange[];
|
|
2520
2553
|
selection: XlsxCellRange | null;
|
|
2521
2554
|
setActiveSheetIndex: (index: number) => void;
|
|
2522
2555
|
setActiveTabIndex: (index: number) => void;
|
|
@@ -2581,6 +2614,9 @@ interface XlsxViewerSelection {
|
|
|
2581
2614
|
extend?: boolean;
|
|
2582
2615
|
}) => void;
|
|
2583
2616
|
selectRange: (range: XlsxCellRange) => void;
|
|
2617
|
+
selectRanges: (ranges: readonly XlsxCellRange[], activeCorner?: "start" | "end") => void;
|
|
2618
|
+
/** Selected areas in selection order. The last area is the active selection. */
|
|
2619
|
+
selectionRanges: readonly XlsxCellRange[];
|
|
2584
2620
|
selection: XlsxCellRange | null;
|
|
2585
2621
|
}
|
|
2586
2622
|
interface XlsxViewerZoom {
|
|
@@ -2595,7 +2631,7 @@ interface XlsxViewerZoom {
|
|
|
2595
2631
|
zoomOut: () => void;
|
|
2596
2632
|
zoomScale: number;
|
|
2597
2633
|
}
|
|
2598
|
-
type XlsxContextMenuActionId = "bringToFront" | "bringForward" | "sendBackward" | "sendToBack" | "arrange" | "changeChartType" | `chartType:${string}` | `chartFamily:${string}` | "cut" | "copy" | "paste" | "clearContents" | "editCell" | "undo" | "redo" | "mergeCells" | "mergeAndCenter" | "mergeAcross" | "unmergeCells" | "sortAscending" | "sortDescending" | "refreshPivotTable" | "showPivotDetails" | "togglePivotFieldList" | "selectRow" | "selectColumn" | "selectAll";
|
|
2634
|
+
type XlsxContextMenuActionId = "bringToFront" | "bringForward" | "sendBackward" | "sendToBack" | "arrange" | "changeChartType" | `chartType:${string}` | `chartFamily:${string}` | "cut" | "copy" | "paste" | "clearContents" | "editCell" | "undo" | "redo" | "mergeCells" | "mergeAndCenter" | "mergeAcross" | "unmergeCells" | "sortAscending" | "sortDescending" | "refreshPivotTable" | "showPivotDetails" | "togglePivotFieldList" | "rowHeight" | "columnWidth" | "hideRows" | "unhideRows" | "hideColumns" | "unhideColumns" | "selectRow" | "selectColumn" | "selectAll";
|
|
2599
2635
|
interface XlsxContextMenuAction {
|
|
2600
2636
|
id: XlsxContextMenuActionId;
|
|
2601
2637
|
label: string;
|
|
@@ -2613,6 +2649,7 @@ interface XlsxContextMenuContext {
|
|
|
2613
2649
|
chart?: XlsxChart;
|
|
2614
2650
|
cell: XlsxCellAddress;
|
|
2615
2651
|
selection: XlsxCellRange;
|
|
2652
|
+
selectionRanges?: readonly XlsxCellRange[];
|
|
2616
2653
|
sheetIndex: number;
|
|
2617
2654
|
sheetName: string;
|
|
2618
2655
|
readOnly: boolean;
|
|
@@ -2700,7 +2737,7 @@ interface XlsxViewerEditing {
|
|
|
2700
2737
|
* @param range Zero-based cell range in the active worksheet.
|
|
2701
2738
|
* @param style Partial Excel style patch to apply to the target range.
|
|
2702
2739
|
*/
|
|
2703
|
-
setRangeStyle: (range: XlsxCellRange, style: XlsxCellStyleInput) => void;
|
|
2740
|
+
setRangeStyle: (range: XlsxCellRange | readonly XlsxCellRange[], style: XlsxCellStyleInput) => void;
|
|
2704
2741
|
setSelectedFormula: (formula: string) => boolean;
|
|
2705
2742
|
setSelectedCellFormula: (formula: string) => void;
|
|
2706
2743
|
/**
|
|
@@ -3190,6 +3227,7 @@ declare function XlsxViewer(props: XlsxViewerProps): react_jsx_runtime.JSX.Eleme
|
|
|
3190
3227
|
declare function XlsxViewerProvider({ children, controller, isDark, ...options }: XlsxViewerProviderProps): react_jsx_runtime.JSX.Element;
|
|
3191
3228
|
declare function useXlsxViewer(): XlsxViewerController;
|
|
3192
3229
|
declare function useXlsxViewerSelection(): XlsxViewerSelection;
|
|
3230
|
+
declare function useXlsxViewerLayout(): XlsxViewerLayout;
|
|
3193
3231
|
declare function useXlsxViewerZoom(): XlsxViewerZoom;
|
|
3194
3232
|
declare function useXlsxViewerEditing(): XlsxViewerEditing;
|
|
3195
3233
|
declare function useXlsxViewerTables(): XlsxViewerTables;
|
|
@@ -3224,4 +3262,4 @@ interface DefaultXlsxPivotTableFieldListProps {
|
|
|
3224
3262
|
}
|
|
3225
3263
|
declare function DefaultXlsxPivotTableFieldList({ editor, isDark, className, style }: DefaultXlsxPivotTableFieldListProps): react_jsx_runtime.JSX.Element;
|
|
3226
3264
|
|
|
3227
|
-
export { DefaultXlsxPivotTableFieldList, type DefaultXlsxPivotTableFieldListProps, DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxActiveCellOverlayRenderProps, type XlsxCellAddress, type XlsxCellAlignmentInput, type XlsxCellBorderEdgeInput, type XlsxCellBorderStyleInput, type XlsxCellEditorContext, type XlsxCellEditorOverlayRenderProps, type XlsxCellEditorSession, type XlsxCellFillStyleInput, type XlsxCellFontStyleInput, type XlsxCellGradientStopInput, type XlsxCellNumberFormatInput, type XlsxCellProtectionInput, type XlsxCellRange, type XlsxCellStyleColorInput, type XlsxCellStyleContext, type XlsxCellStyleInput, type XlsxChart, type XlsxChartAxis, type XlsxChartDataLabels, type XlsxChartElementSelection, type XlsxChartLoadingRenderProps, type XlsxChartReference, type XlsxChartSeries, type XlsxChartsheet, type XlsxContextMenuAction, type XlsxContextMenuActionId, type XlsxContextMenuContext, type XlsxContextMenuRenderProps, type XlsxDrawingLayout, type XlsxDrawingOrder, type XlsxFileTooLargeRenderProps, type XlsxFormControl, type XlsxFormControlActionEvent, type XlsxFormControlCaption, type XlsxFormControlCaptionInput, type XlsxFormControlCaptionRun, type XlsxFormControlChangeEvent, type XlsxFormControlInput, type XlsxFormControlKind, type XlsxFormControlKindInput, type XlsxFormControlPatch, type XlsxFormControlRenderProps, type XlsxFormControlSelectionMode, type XlsxFormControlState, type XlsxFormulaTarget, type XlsxHighlightRangeOptions, type XlsxImage, type XlsxImageAnchor, type XlsxImageRect, type XlsxImageRenderProps, type XlsxImageResizeHandlePosition, type XlsxImageSelectionRenderProps, type XlsxMergeMode, type XlsxParsedRange, type XlsxPivotAggregation, type XlsxPivotAxisField, type XlsxPivotCalculatedItem, type XlsxPivotChart, type XlsxPivotChartInput, type XlsxPivotChartType, type XlsxPivotDrillDown, type XlsxPivotFieldArea, type XlsxPivotFilter, type XlsxPivotGrouping, type XlsxPivotHeader, type XlsxPivotHeaderField, type XlsxPivotMember, type XlsxPivotShowAs, type XlsxPivotSource, type XlsxPivotSourceField, type XlsxPivotTable, type XlsxPivotTableControlsRenderProps, type XlsxPivotTableEditor, type XlsxPivotTableEditorOptions, type XlsxPivotTableHeaderMenuRenderProps, type XlsxPivotTableInput, type XlsxPivotTarget, type XlsxPivotToggle, type XlsxPivotValueField, type XlsxRangeHighlight, type XlsxScrollerRenderProps, type XlsxSelectionPopoverContext, type XlsxSelectionPopoverRenderProps, type XlsxShape, type XlsxShapeFill, type XlsxShapeParagraph, type XlsxShapeStroke, type XlsxShapeTextBox, type XlsxShapeTextRun, type XlsxSheetData, type XlsxSheetThumbnail, type XlsxSheetThumbnailResolution, type XlsxSheetVisibility, type XlsxTable, type XlsxTableColumn, type XlsxTableHeaderMenuRenderProps, type XlsxTableSortDirection, type XlsxTableSortState, type XlsxThemePalette, XlsxViewer, type XlsxViewerCharts, type XlsxViewerController, type XlsxViewerEditing, type XlsxViewerImages, type XlsxViewerMessages, type XlsxViewerPivots, type XlsxViewerProps, XlsxViewerProvider, type XlsxViewerProviderProps, type XlsxViewerSelection, type XlsxViewerTables, type XlsxViewerThumbnails, type XlsxViewerZoom, type XlsxWorkbookTab, useXlsxPivotTableEditor, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerPivots, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|
|
3265
|
+
export { DefaultXlsxPivotTableFieldList, type DefaultXlsxPivotTableFieldListProps, DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxActiveCellOverlayRenderProps, type XlsxCellAddress, type XlsxCellAlignmentInput, type XlsxCellBorderEdgeInput, type XlsxCellBorderStyleInput, type XlsxCellEditorContext, type XlsxCellEditorOverlayRenderProps, type XlsxCellEditorSession, type XlsxCellFillStyleInput, type XlsxCellFontStyleInput, type XlsxCellGradientStopInput, type XlsxCellNumberFormatInput, type XlsxCellProtectionInput, type XlsxCellRange, type XlsxCellStyleColorInput, type XlsxCellStyleContext, type XlsxCellStyleInput, type XlsxChart, type XlsxChartAxis, type XlsxChartDataLabels, type XlsxChartElementSelection, type XlsxChartLoadingRenderProps, type XlsxChartReference, type XlsxChartSeries, type XlsxChartsheet, type XlsxContextMenuAction, type XlsxContextMenuActionId, type XlsxContextMenuContext, type XlsxContextMenuRenderProps, type XlsxDrawingLayout, type XlsxDrawingOrder, type XlsxFileTooLargeRenderProps, type XlsxFormControl, type XlsxFormControlActionEvent, type XlsxFormControlCaption, type XlsxFormControlCaptionInput, type XlsxFormControlCaptionRun, type XlsxFormControlChangeEvent, type XlsxFormControlInput, type XlsxFormControlKind, type XlsxFormControlKindInput, type XlsxFormControlPatch, type XlsxFormControlRenderProps, type XlsxFormControlSelectionMode, type XlsxFormControlState, type XlsxFormulaTarget, type XlsxFreezePanes, type XlsxHighlightRangeOptions, type XlsxImage, type XlsxImageAnchor, type XlsxImageRect, type XlsxImageRenderProps, type XlsxImageResizeHandlePosition, type XlsxImageSelectionRenderProps, type XlsxMergeMode, type XlsxParsedRange, type XlsxPivotAggregation, type XlsxPivotAxisField, type XlsxPivotCalculatedItem, type XlsxPivotChart, type XlsxPivotChartInput, type XlsxPivotChartType, type XlsxPivotDrillDown, type XlsxPivotFieldArea, type XlsxPivotFilter, type XlsxPivotGrouping, type XlsxPivotHeader, type XlsxPivotHeaderField, type XlsxPivotMember, type XlsxPivotShowAs, type XlsxPivotSource, type XlsxPivotSourceField, type XlsxPivotTable, type XlsxPivotTableControlsRenderProps, type XlsxPivotTableEditor, type XlsxPivotTableEditorOptions, type XlsxPivotTableHeaderMenuRenderProps, type XlsxPivotTableInput, type XlsxPivotTarget, type XlsxPivotToggle, type XlsxPivotValueField, type XlsxRangeHighlight, type XlsxScrollerRenderProps, type XlsxSelectionPopoverContext, type XlsxSelectionPopoverRenderProps, type XlsxShape, type XlsxShapeFill, type XlsxShapeParagraph, type XlsxShapeStroke, type XlsxShapeTextBox, type XlsxShapeTextRun, type XlsxSheetData, type XlsxSheetThumbnail, type XlsxSheetThumbnailResolution, type XlsxSheetVisibility, type XlsxTable, type XlsxTableColumn, type XlsxTableHeaderMenuRenderProps, type XlsxTableSortDirection, type XlsxTableSortState, type XlsxThemePalette, XlsxViewer, type XlsxViewerCharts, type XlsxViewerController, type XlsxViewerEditing, type XlsxViewerImages, type XlsxViewerLayout, type XlsxViewerMessages, type XlsxViewerPivots, type XlsxViewerProps, XlsxViewerProvider, type XlsxViewerProviderProps, type XlsxViewerSelection, type XlsxViewerTables, type XlsxViewerThumbnails, type XlsxViewerZoom, type XlsxWorkbookTab, useXlsxPivotTableEditor, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerLayout, useXlsxViewerPivots, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,13 @@ declare const englishMessages: {
|
|
|
65
65
|
mergeAcross: string;
|
|
66
66
|
mergeCells: string;
|
|
67
67
|
unmergeCells: string;
|
|
68
|
+
rowHeight: string;
|
|
69
|
+
columnWidth: string;
|
|
70
|
+
pixels: string;
|
|
71
|
+
cancel: string;
|
|
72
|
+
ok: string;
|
|
73
|
+
hide: string;
|
|
74
|
+
unhide: string;
|
|
68
75
|
selectRow: string;
|
|
69
76
|
selectColumn: string;
|
|
70
77
|
selectAll: string;
|
|
@@ -949,11 +956,14 @@ declare class Worksheet {
|
|
|
949
956
|
setCellStyle(address: string, style: any): void;
|
|
950
957
|
setCellStyleAt(row: number, col: number, style: any): void;
|
|
951
958
|
setColumnWidth(col: number, width: number): void;
|
|
959
|
+
setColumnsHidden(start: number, end: number, hidden: boolean): void;
|
|
952
960
|
setFormula(address: string, formula: string): void;
|
|
961
|
+
setFreezePanes(row: number, col: number): void;
|
|
953
962
|
setProtectedRanges(ranges: any): void;
|
|
954
963
|
setProtection(protection: any): void;
|
|
955
964
|
setRangeStyle(range_str: string, style: any): void;
|
|
956
965
|
setRowHeight(row: number, height: number): void;
|
|
966
|
+
setRowsHidden(start: number, end: number, hidden: boolean): void;
|
|
957
967
|
unmergeCells(range_str: string): boolean;
|
|
958
968
|
usedRange(): any;
|
|
959
969
|
readonly autoFilter: any;
|
|
@@ -975,6 +985,8 @@ declare class Worksheet {
|
|
|
975
985
|
*/
|
|
976
986
|
readonly formulaCount: number;
|
|
977
987
|
readonly freezePanes: any;
|
|
988
|
+
readonly hiddenColumns: Uint32Array;
|
|
989
|
+
readonly hiddenRows: Uint32Array;
|
|
978
990
|
readonly hyperlinkCount: number;
|
|
979
991
|
readonly hyperlinks: any;
|
|
980
992
|
readonly isEmpty: boolean;
|
|
@@ -2368,7 +2380,25 @@ interface UseXlsxViewerControllerOptions {
|
|
|
2368
2380
|
*/
|
|
2369
2381
|
useWorker?: boolean;
|
|
2370
2382
|
}
|
|
2371
|
-
interface
|
|
2383
|
+
interface XlsxViewerLayout {
|
|
2384
|
+
/** Frozen row and column counts on the active worksheet, or null when unfrozen. */
|
|
2385
|
+
frozenPanes: XlsxFreezePanes | null;
|
|
2386
|
+
/** Whether the current selection provides a usable freeze boundary on an editable worksheet. */
|
|
2387
|
+
canFreezePanes: boolean;
|
|
2388
|
+
/** Hide selected rows, or an inclusive, zero-based row interval. */
|
|
2389
|
+
hideRows: (start?: number, end?: number) => void;
|
|
2390
|
+
/** Reveal hidden rows in the selection or an inclusive, zero-based row interval. */
|
|
2391
|
+
unhideRows: (start?: number, end?: number) => void;
|
|
2392
|
+
/** Hide selected columns, or an inclusive, zero-based column interval. */
|
|
2393
|
+
hideColumns: (start?: number, end?: number) => void;
|
|
2394
|
+
/** Reveal hidden columns in the selection or an inclusive, zero-based column interval. */
|
|
2395
|
+
unhideColumns: (start?: number, end?: number) => void;
|
|
2396
|
+
/** Freeze rows above and columns left of the given cell, defaulting to the selected header or active cell. */
|
|
2397
|
+
freezePanes: (cell?: XlsxCellAddress) => void;
|
|
2398
|
+
/** Remove the freeze boundary on the active worksheet. */
|
|
2399
|
+
unfreezePanes: () => void;
|
|
2400
|
+
}
|
|
2401
|
+
interface XlsxViewerController extends XlsxViewerPivots, XlsxViewerLayout {
|
|
2372
2402
|
activeCell: XlsxCellAddress | null;
|
|
2373
2403
|
activeCellAddress: string | null;
|
|
2374
2404
|
activeSheet: XlsxSheetData | null;
|
|
@@ -2453,8 +2483,8 @@ interface XlsxViewerController extends XlsxViewerPivots {
|
|
|
2453
2483
|
resetZoom: () => void;
|
|
2454
2484
|
resizeChartBy: (id: string, handle: XlsxImageResizeHandlePosition, deltaX: number, deltaY: number) => void;
|
|
2455
2485
|
resizeImageBy: (id: string, handle: XlsxImageResizeHandlePosition, deltaX: number, deltaY: number) => void;
|
|
2456
|
-
resizeColumn: (col: number, widthPx: number) => void;
|
|
2457
|
-
resizeRow: (row: number, heightPx: number) => void;
|
|
2486
|
+
resizeColumn: (col: number | readonly number[], widthPx: number) => void;
|
|
2487
|
+
resizeRow: (row: number | readonly number[], heightPx: number) => void;
|
|
2458
2488
|
redo: () => void;
|
|
2459
2489
|
/** Reads browser clipboard representations. Pass paste-event data to retain image and text fallbacks. */
|
|
2460
2490
|
pasteFromClipboard: (clipboardData?: DataTransfer) => Promise<boolean>;
|
|
@@ -2509,7 +2539,7 @@ interface XlsxViewerController extends XlsxViewerPivots {
|
|
|
2509
2539
|
* @param range Zero-based cell range in the active worksheet.
|
|
2510
2540
|
* @param style Partial Excel style patch to apply to the target range.
|
|
2511
2541
|
*/
|
|
2512
|
-
setRangeStyle: (range: XlsxCellRange, style: XlsxCellStyleInput) => void;
|
|
2542
|
+
setRangeStyle: (range: XlsxCellRange | readonly XlsxCellRange[], style: XlsxCellStyleInput) => void;
|
|
2513
2543
|
setZoomScale: (zoomScale: number) => void;
|
|
2514
2544
|
selectCell: (cell: XlsxCellAddress, options?: {
|
|
2515
2545
|
extend?: boolean;
|
|
@@ -2517,6 +2547,9 @@ interface XlsxViewerController extends XlsxViewerPivots {
|
|
|
2517
2547
|
selectChart: (id: string | null) => void;
|
|
2518
2548
|
selectChartElement: (selection: XlsxChartElementSelection | null) => void;
|
|
2519
2549
|
selectRange: (range: XlsxCellRange) => void;
|
|
2550
|
+
selectRanges: (ranges: readonly XlsxCellRange[], activeCorner?: "start" | "end") => void;
|
|
2551
|
+
/** Selected areas in selection order. The last area is the active selection. */
|
|
2552
|
+
selectionRanges: readonly XlsxCellRange[];
|
|
2520
2553
|
selection: XlsxCellRange | null;
|
|
2521
2554
|
setActiveSheetIndex: (index: number) => void;
|
|
2522
2555
|
setActiveTabIndex: (index: number) => void;
|
|
@@ -2581,6 +2614,9 @@ interface XlsxViewerSelection {
|
|
|
2581
2614
|
extend?: boolean;
|
|
2582
2615
|
}) => void;
|
|
2583
2616
|
selectRange: (range: XlsxCellRange) => void;
|
|
2617
|
+
selectRanges: (ranges: readonly XlsxCellRange[], activeCorner?: "start" | "end") => void;
|
|
2618
|
+
/** Selected areas in selection order. The last area is the active selection. */
|
|
2619
|
+
selectionRanges: readonly XlsxCellRange[];
|
|
2584
2620
|
selection: XlsxCellRange | null;
|
|
2585
2621
|
}
|
|
2586
2622
|
interface XlsxViewerZoom {
|
|
@@ -2595,7 +2631,7 @@ interface XlsxViewerZoom {
|
|
|
2595
2631
|
zoomOut: () => void;
|
|
2596
2632
|
zoomScale: number;
|
|
2597
2633
|
}
|
|
2598
|
-
type XlsxContextMenuActionId = "bringToFront" | "bringForward" | "sendBackward" | "sendToBack" | "arrange" | "changeChartType" | `chartType:${string}` | `chartFamily:${string}` | "cut" | "copy" | "paste" | "clearContents" | "editCell" | "undo" | "redo" | "mergeCells" | "mergeAndCenter" | "mergeAcross" | "unmergeCells" | "sortAscending" | "sortDescending" | "refreshPivotTable" | "showPivotDetails" | "togglePivotFieldList" | "selectRow" | "selectColumn" | "selectAll";
|
|
2634
|
+
type XlsxContextMenuActionId = "bringToFront" | "bringForward" | "sendBackward" | "sendToBack" | "arrange" | "changeChartType" | `chartType:${string}` | `chartFamily:${string}` | "cut" | "copy" | "paste" | "clearContents" | "editCell" | "undo" | "redo" | "mergeCells" | "mergeAndCenter" | "mergeAcross" | "unmergeCells" | "sortAscending" | "sortDescending" | "refreshPivotTable" | "showPivotDetails" | "togglePivotFieldList" | "rowHeight" | "columnWidth" | "hideRows" | "unhideRows" | "hideColumns" | "unhideColumns" | "selectRow" | "selectColumn" | "selectAll";
|
|
2599
2635
|
interface XlsxContextMenuAction {
|
|
2600
2636
|
id: XlsxContextMenuActionId;
|
|
2601
2637
|
label: string;
|
|
@@ -2613,6 +2649,7 @@ interface XlsxContextMenuContext {
|
|
|
2613
2649
|
chart?: XlsxChart;
|
|
2614
2650
|
cell: XlsxCellAddress;
|
|
2615
2651
|
selection: XlsxCellRange;
|
|
2652
|
+
selectionRanges?: readonly XlsxCellRange[];
|
|
2616
2653
|
sheetIndex: number;
|
|
2617
2654
|
sheetName: string;
|
|
2618
2655
|
readOnly: boolean;
|
|
@@ -2700,7 +2737,7 @@ interface XlsxViewerEditing {
|
|
|
2700
2737
|
* @param range Zero-based cell range in the active worksheet.
|
|
2701
2738
|
* @param style Partial Excel style patch to apply to the target range.
|
|
2702
2739
|
*/
|
|
2703
|
-
setRangeStyle: (range: XlsxCellRange, style: XlsxCellStyleInput) => void;
|
|
2740
|
+
setRangeStyle: (range: XlsxCellRange | readonly XlsxCellRange[], style: XlsxCellStyleInput) => void;
|
|
2704
2741
|
setSelectedFormula: (formula: string) => boolean;
|
|
2705
2742
|
setSelectedCellFormula: (formula: string) => void;
|
|
2706
2743
|
/**
|
|
@@ -3190,6 +3227,7 @@ declare function XlsxViewer(props: XlsxViewerProps): react_jsx_runtime.JSX.Eleme
|
|
|
3190
3227
|
declare function XlsxViewerProvider({ children, controller, isDark, ...options }: XlsxViewerProviderProps): react_jsx_runtime.JSX.Element;
|
|
3191
3228
|
declare function useXlsxViewer(): XlsxViewerController;
|
|
3192
3229
|
declare function useXlsxViewerSelection(): XlsxViewerSelection;
|
|
3230
|
+
declare function useXlsxViewerLayout(): XlsxViewerLayout;
|
|
3193
3231
|
declare function useXlsxViewerZoom(): XlsxViewerZoom;
|
|
3194
3232
|
declare function useXlsxViewerEditing(): XlsxViewerEditing;
|
|
3195
3233
|
declare function useXlsxViewerTables(): XlsxViewerTables;
|
|
@@ -3224,4 +3262,4 @@ interface DefaultXlsxPivotTableFieldListProps {
|
|
|
3224
3262
|
}
|
|
3225
3263
|
declare function DefaultXlsxPivotTableFieldList({ editor, isDark, className, style }: DefaultXlsxPivotTableFieldListProps): react_jsx_runtime.JSX.Element;
|
|
3226
3264
|
|
|
3227
|
-
export { DefaultXlsxPivotTableFieldList, type DefaultXlsxPivotTableFieldListProps, DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxActiveCellOverlayRenderProps, type XlsxCellAddress, type XlsxCellAlignmentInput, type XlsxCellBorderEdgeInput, type XlsxCellBorderStyleInput, type XlsxCellEditorContext, type XlsxCellEditorOverlayRenderProps, type XlsxCellEditorSession, type XlsxCellFillStyleInput, type XlsxCellFontStyleInput, type XlsxCellGradientStopInput, type XlsxCellNumberFormatInput, type XlsxCellProtectionInput, type XlsxCellRange, type XlsxCellStyleColorInput, type XlsxCellStyleContext, type XlsxCellStyleInput, type XlsxChart, type XlsxChartAxis, type XlsxChartDataLabels, type XlsxChartElementSelection, type XlsxChartLoadingRenderProps, type XlsxChartReference, type XlsxChartSeries, type XlsxChartsheet, type XlsxContextMenuAction, type XlsxContextMenuActionId, type XlsxContextMenuContext, type XlsxContextMenuRenderProps, type XlsxDrawingLayout, type XlsxDrawingOrder, type XlsxFileTooLargeRenderProps, type XlsxFormControl, type XlsxFormControlActionEvent, type XlsxFormControlCaption, type XlsxFormControlCaptionInput, type XlsxFormControlCaptionRun, type XlsxFormControlChangeEvent, type XlsxFormControlInput, type XlsxFormControlKind, type XlsxFormControlKindInput, type XlsxFormControlPatch, type XlsxFormControlRenderProps, type XlsxFormControlSelectionMode, type XlsxFormControlState, type XlsxFormulaTarget, type XlsxHighlightRangeOptions, type XlsxImage, type XlsxImageAnchor, type XlsxImageRect, type XlsxImageRenderProps, type XlsxImageResizeHandlePosition, type XlsxImageSelectionRenderProps, type XlsxMergeMode, type XlsxParsedRange, type XlsxPivotAggregation, type XlsxPivotAxisField, type XlsxPivotCalculatedItem, type XlsxPivotChart, type XlsxPivotChartInput, type XlsxPivotChartType, type XlsxPivotDrillDown, type XlsxPivotFieldArea, type XlsxPivotFilter, type XlsxPivotGrouping, type XlsxPivotHeader, type XlsxPivotHeaderField, type XlsxPivotMember, type XlsxPivotShowAs, type XlsxPivotSource, type XlsxPivotSourceField, type XlsxPivotTable, type XlsxPivotTableControlsRenderProps, type XlsxPivotTableEditor, type XlsxPivotTableEditorOptions, type XlsxPivotTableHeaderMenuRenderProps, type XlsxPivotTableInput, type XlsxPivotTarget, type XlsxPivotToggle, type XlsxPivotValueField, type XlsxRangeHighlight, type XlsxScrollerRenderProps, type XlsxSelectionPopoverContext, type XlsxSelectionPopoverRenderProps, type XlsxShape, type XlsxShapeFill, type XlsxShapeParagraph, type XlsxShapeStroke, type XlsxShapeTextBox, type XlsxShapeTextRun, type XlsxSheetData, type XlsxSheetThumbnail, type XlsxSheetThumbnailResolution, type XlsxSheetVisibility, type XlsxTable, type XlsxTableColumn, type XlsxTableHeaderMenuRenderProps, type XlsxTableSortDirection, type XlsxTableSortState, type XlsxThemePalette, XlsxViewer, type XlsxViewerCharts, type XlsxViewerController, type XlsxViewerEditing, type XlsxViewerImages, type XlsxViewerMessages, type XlsxViewerPivots, type XlsxViewerProps, XlsxViewerProvider, type XlsxViewerProviderProps, type XlsxViewerSelection, type XlsxViewerTables, type XlsxViewerThumbnails, type XlsxViewerZoom, type XlsxWorkbookTab, useXlsxPivotTableEditor, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerPivots, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|
|
3265
|
+
export { DefaultXlsxPivotTableFieldList, type DefaultXlsxPivotTableFieldListProps, DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxActiveCellOverlayRenderProps, type XlsxCellAddress, type XlsxCellAlignmentInput, type XlsxCellBorderEdgeInput, type XlsxCellBorderStyleInput, type XlsxCellEditorContext, type XlsxCellEditorOverlayRenderProps, type XlsxCellEditorSession, type XlsxCellFillStyleInput, type XlsxCellFontStyleInput, type XlsxCellGradientStopInput, type XlsxCellNumberFormatInput, type XlsxCellProtectionInput, type XlsxCellRange, type XlsxCellStyleColorInput, type XlsxCellStyleContext, type XlsxCellStyleInput, type XlsxChart, type XlsxChartAxis, type XlsxChartDataLabels, type XlsxChartElementSelection, type XlsxChartLoadingRenderProps, type XlsxChartReference, type XlsxChartSeries, type XlsxChartsheet, type XlsxContextMenuAction, type XlsxContextMenuActionId, type XlsxContextMenuContext, type XlsxContextMenuRenderProps, type XlsxDrawingLayout, type XlsxDrawingOrder, type XlsxFileTooLargeRenderProps, type XlsxFormControl, type XlsxFormControlActionEvent, type XlsxFormControlCaption, type XlsxFormControlCaptionInput, type XlsxFormControlCaptionRun, type XlsxFormControlChangeEvent, type XlsxFormControlInput, type XlsxFormControlKind, type XlsxFormControlKindInput, type XlsxFormControlPatch, type XlsxFormControlRenderProps, type XlsxFormControlSelectionMode, type XlsxFormControlState, type XlsxFormulaTarget, type XlsxFreezePanes, type XlsxHighlightRangeOptions, type XlsxImage, type XlsxImageAnchor, type XlsxImageRect, type XlsxImageRenderProps, type XlsxImageResizeHandlePosition, type XlsxImageSelectionRenderProps, type XlsxMergeMode, type XlsxParsedRange, type XlsxPivotAggregation, type XlsxPivotAxisField, type XlsxPivotCalculatedItem, type XlsxPivotChart, type XlsxPivotChartInput, type XlsxPivotChartType, type XlsxPivotDrillDown, type XlsxPivotFieldArea, type XlsxPivotFilter, type XlsxPivotGrouping, type XlsxPivotHeader, type XlsxPivotHeaderField, type XlsxPivotMember, type XlsxPivotShowAs, type XlsxPivotSource, type XlsxPivotSourceField, type XlsxPivotTable, type XlsxPivotTableControlsRenderProps, type XlsxPivotTableEditor, type XlsxPivotTableEditorOptions, type XlsxPivotTableHeaderMenuRenderProps, type XlsxPivotTableInput, type XlsxPivotTarget, type XlsxPivotToggle, type XlsxPivotValueField, type XlsxRangeHighlight, type XlsxScrollerRenderProps, type XlsxSelectionPopoverContext, type XlsxSelectionPopoverRenderProps, type XlsxShape, type XlsxShapeFill, type XlsxShapeParagraph, type XlsxShapeStroke, type XlsxShapeTextBox, type XlsxShapeTextRun, type XlsxSheetData, type XlsxSheetThumbnail, type XlsxSheetThumbnailResolution, type XlsxSheetVisibility, type XlsxTable, type XlsxTableColumn, type XlsxTableHeaderMenuRenderProps, type XlsxTableSortDirection, type XlsxTableSortState, type XlsxThemePalette, XlsxViewer, type XlsxViewerCharts, type XlsxViewerController, type XlsxViewerEditing, type XlsxViewerImages, type XlsxViewerLayout, type XlsxViewerMessages, type XlsxViewerPivots, type XlsxViewerProps, XlsxViewerProvider, type XlsxViewerProviderProps, type XlsxViewerSelection, type XlsxViewerTables, type XlsxViewerThumbnails, type XlsxViewerZoom, type XlsxWorkbookTab, useXlsxPivotTableEditor, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerLayout, useXlsxViewerPivots, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|