@extend-ai/react-xlsx 0.16.2 → 0.16.4
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/dist/index.cjs +1244 -120
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -7
- package/dist/index.d.ts +31 -7
- package/dist/index.js +1244 -120
- package/dist/index.js.map +1 -1
- package/dist/xlsx-worker.js +89 -17
- package/dist/xlsx-worker.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -62,7 +62,25 @@ interface XlsxConditionalIconSetRule {
|
|
|
62
62
|
reverse?: boolean;
|
|
63
63
|
showValue?: boolean;
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
interface XlsxConditionalStyledRule {
|
|
66
|
+
aboveAverage?: boolean;
|
|
67
|
+
bottom?: boolean;
|
|
68
|
+
equalAverage?: boolean;
|
|
69
|
+
formulas: string[];
|
|
70
|
+
kind: "styled";
|
|
71
|
+
operator?: string;
|
|
72
|
+
percent?: boolean;
|
|
73
|
+
priority: number;
|
|
74
|
+
rank?: number;
|
|
75
|
+
ranges: XlsxCellRange[];
|
|
76
|
+
ruleType: string;
|
|
77
|
+
stdDev?: number;
|
|
78
|
+
stopIfTrue?: boolean;
|
|
79
|
+
style: XlsxResolvedCellStyle;
|
|
80
|
+
text?: string;
|
|
81
|
+
timePeriod?: string;
|
|
82
|
+
}
|
|
83
|
+
type XlsxConditionalFormatRule = XlsxConditionalColorScaleRule | XlsxConditionalStyledRule | XlsxConditionalDataBarRule | XlsxConditionalIconSetRule;
|
|
66
84
|
interface XlsxDataValidation {
|
|
67
85
|
allowBlank?: boolean;
|
|
68
86
|
errorMessage?: string;
|
|
@@ -81,6 +99,7 @@ interface XlsxFreezePanes {
|
|
|
81
99
|
}
|
|
82
100
|
type XlsxSheetVisibility = "hidden" | "veryHidden" | "visible";
|
|
83
101
|
interface XlsxSheetData {
|
|
102
|
+
autoFilterRanges: XlsxCellRange[];
|
|
84
103
|
cachedFormulaValues: Record<string, string>;
|
|
85
104
|
colWidthOverridesPx: Record<number, number>;
|
|
86
105
|
colStyleIds: Record<number, number>;
|
|
@@ -859,6 +878,11 @@ interface XlsxImageRect {
|
|
|
859
878
|
top: number;
|
|
860
879
|
width: number;
|
|
861
880
|
}
|
|
881
|
+
/** Rendered column widths and row heights in logical pixels, indexed by worksheet coordinates. */
|
|
882
|
+
interface XlsxDrawingLayout {
|
|
883
|
+
columnWidths: readonly number[];
|
|
884
|
+
rowHeights: readonly number[];
|
|
885
|
+
}
|
|
862
886
|
type XlsxImageResizeHandlePosition = "n" | "s" | "e" | "w" | "ne" | "nw" | "se" | "sw";
|
|
863
887
|
interface XlsxImageRenderProps {
|
|
864
888
|
/** The built-in image element that react-xlsx would render without customization. */
|
|
@@ -1156,8 +1180,8 @@ interface XlsxViewerController {
|
|
|
1156
1180
|
sortTable: (tableName: string, columnIndex: number, direction: XlsxTableSortDirection) => void;
|
|
1157
1181
|
setChartSeriesFormula: (chartId: string, seriesIndex: number, formula: string) => boolean;
|
|
1158
1182
|
selectImage: (id: string | null) => void;
|
|
1159
|
-
setChartRect: (id: string, rect: XlsxImageRect) => void;
|
|
1160
|
-
setImageRect: (id: string, rect: XlsxImageRect) => void;
|
|
1183
|
+
setChartRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
|
|
1184
|
+
setImageRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
|
|
1161
1185
|
getRowsBatchAsync?: (workbookSheetIndex: number, startRow: number, rowCount: number) => Promise<unknown[] | null>;
|
|
1162
1186
|
tables: XlsxTable[];
|
|
1163
1187
|
tabs: XlsxWorkbookTab[];
|
|
@@ -1300,8 +1324,8 @@ interface XlsxViewerImages {
|
|
|
1300
1324
|
selectChartElement: (selection: XlsxChartElementSelection | null) => void;
|
|
1301
1325
|
selectImage: (id: string | null) => void;
|
|
1302
1326
|
setChartSeriesFormula: (chartId: string, seriesIndex: number, formula: string) => boolean;
|
|
1303
|
-
setChartRect: (id: string, rect: XlsxImageRect) => void;
|
|
1304
|
-
setImageRect: (id: string, rect: XlsxImageRect) => void;
|
|
1327
|
+
setChartRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
|
|
1328
|
+
setImageRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
|
|
1305
1329
|
updateChart: (id: string, patch: Partial<XlsxChart>) => void;
|
|
1306
1330
|
}
|
|
1307
1331
|
interface XlsxViewerCharts {
|
|
@@ -1327,7 +1351,7 @@ interface XlsxViewerCharts {
|
|
|
1327
1351
|
selectChartElement: (selection: XlsxChartElementSelection | null) => void;
|
|
1328
1352
|
setChartSeriesFormula: (chartId: string, seriesIndex: number, formula: string) => boolean;
|
|
1329
1353
|
setActiveTabIndex: (index: number) => void;
|
|
1330
|
-
setChartRect: (id: string, rect: XlsxImageRect) => void;
|
|
1354
|
+
setChartRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
|
|
1331
1355
|
tabs: XlsxWorkbookTab[];
|
|
1332
1356
|
updateChart: (id: string, patch: Partial<XlsxChart>) => void;
|
|
1333
1357
|
}
|
|
@@ -1634,4 +1658,4 @@ declare function useXlsxViewerThumbnails(options?: UseXlsxViewerThumbnailsOption
|
|
|
1634
1658
|
declare function XlsxViewer(props: XlsxViewerProps): react_jsx_runtime.JSX.Element;
|
|
1635
1659
|
declare function DefaultXlsxToolbar(): react_jsx_runtime.JSX.Element;
|
|
1636
1660
|
|
|
1637
|
-
export { DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxCellAddress, type XlsxCellAlignmentInput, type XlsxCellBorderEdgeInput, type XlsxCellBorderStyleInput, 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, XlsxFileSizeLimitExceededError, 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 XlsxImage, type XlsxImageAnchor, type XlsxImageRect, type XlsxImageRenderProps, type XlsxImageResizeHandlePosition, type XlsxImageSelectionRenderProps, type XlsxScrollerRenderProps, 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 XlsxViewerProps, XlsxViewerProvider, type XlsxViewerProviderProps, type XlsxViewerSelection, type XlsxViewerTables, type XlsxViewerThumbnails, type XlsxViewerZoom, type XlsxWasmSource, type XlsxWorkbookTab, initWasm, setWasmSource, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|
|
1661
|
+
export { DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxCellAddress, type XlsxCellAlignmentInput, type XlsxCellBorderEdgeInput, type XlsxCellBorderStyleInput, 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 XlsxDrawingLayout, XlsxFileSizeLimitExceededError, 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 XlsxImage, type XlsxImageAnchor, type XlsxImageRect, type XlsxImageRenderProps, type XlsxImageResizeHandlePosition, type XlsxImageSelectionRenderProps, type XlsxScrollerRenderProps, 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 XlsxViewerProps, XlsxViewerProvider, type XlsxViewerProviderProps, type XlsxViewerSelection, type XlsxViewerTables, type XlsxViewerThumbnails, type XlsxViewerZoom, type XlsxWasmSource, type XlsxWorkbookTab, initWasm, setWasmSource, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|
package/dist/index.d.ts
CHANGED
|
@@ -62,7 +62,25 @@ interface XlsxConditionalIconSetRule {
|
|
|
62
62
|
reverse?: boolean;
|
|
63
63
|
showValue?: boolean;
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
interface XlsxConditionalStyledRule {
|
|
66
|
+
aboveAverage?: boolean;
|
|
67
|
+
bottom?: boolean;
|
|
68
|
+
equalAverage?: boolean;
|
|
69
|
+
formulas: string[];
|
|
70
|
+
kind: "styled";
|
|
71
|
+
operator?: string;
|
|
72
|
+
percent?: boolean;
|
|
73
|
+
priority: number;
|
|
74
|
+
rank?: number;
|
|
75
|
+
ranges: XlsxCellRange[];
|
|
76
|
+
ruleType: string;
|
|
77
|
+
stdDev?: number;
|
|
78
|
+
stopIfTrue?: boolean;
|
|
79
|
+
style: XlsxResolvedCellStyle;
|
|
80
|
+
text?: string;
|
|
81
|
+
timePeriod?: string;
|
|
82
|
+
}
|
|
83
|
+
type XlsxConditionalFormatRule = XlsxConditionalColorScaleRule | XlsxConditionalStyledRule | XlsxConditionalDataBarRule | XlsxConditionalIconSetRule;
|
|
66
84
|
interface XlsxDataValidation {
|
|
67
85
|
allowBlank?: boolean;
|
|
68
86
|
errorMessage?: string;
|
|
@@ -81,6 +99,7 @@ interface XlsxFreezePanes {
|
|
|
81
99
|
}
|
|
82
100
|
type XlsxSheetVisibility = "hidden" | "veryHidden" | "visible";
|
|
83
101
|
interface XlsxSheetData {
|
|
102
|
+
autoFilterRanges: XlsxCellRange[];
|
|
84
103
|
cachedFormulaValues: Record<string, string>;
|
|
85
104
|
colWidthOverridesPx: Record<number, number>;
|
|
86
105
|
colStyleIds: Record<number, number>;
|
|
@@ -859,6 +878,11 @@ interface XlsxImageRect {
|
|
|
859
878
|
top: number;
|
|
860
879
|
width: number;
|
|
861
880
|
}
|
|
881
|
+
/** Rendered column widths and row heights in logical pixels, indexed by worksheet coordinates. */
|
|
882
|
+
interface XlsxDrawingLayout {
|
|
883
|
+
columnWidths: readonly number[];
|
|
884
|
+
rowHeights: readonly number[];
|
|
885
|
+
}
|
|
862
886
|
type XlsxImageResizeHandlePosition = "n" | "s" | "e" | "w" | "ne" | "nw" | "se" | "sw";
|
|
863
887
|
interface XlsxImageRenderProps {
|
|
864
888
|
/** The built-in image element that react-xlsx would render without customization. */
|
|
@@ -1156,8 +1180,8 @@ interface XlsxViewerController {
|
|
|
1156
1180
|
sortTable: (tableName: string, columnIndex: number, direction: XlsxTableSortDirection) => void;
|
|
1157
1181
|
setChartSeriesFormula: (chartId: string, seriesIndex: number, formula: string) => boolean;
|
|
1158
1182
|
selectImage: (id: string | null) => void;
|
|
1159
|
-
setChartRect: (id: string, rect: XlsxImageRect) => void;
|
|
1160
|
-
setImageRect: (id: string, rect: XlsxImageRect) => void;
|
|
1183
|
+
setChartRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
|
|
1184
|
+
setImageRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
|
|
1161
1185
|
getRowsBatchAsync?: (workbookSheetIndex: number, startRow: number, rowCount: number) => Promise<unknown[] | null>;
|
|
1162
1186
|
tables: XlsxTable[];
|
|
1163
1187
|
tabs: XlsxWorkbookTab[];
|
|
@@ -1300,8 +1324,8 @@ interface XlsxViewerImages {
|
|
|
1300
1324
|
selectChartElement: (selection: XlsxChartElementSelection | null) => void;
|
|
1301
1325
|
selectImage: (id: string | null) => void;
|
|
1302
1326
|
setChartSeriesFormula: (chartId: string, seriesIndex: number, formula: string) => boolean;
|
|
1303
|
-
setChartRect: (id: string, rect: XlsxImageRect) => void;
|
|
1304
|
-
setImageRect: (id: string, rect: XlsxImageRect) => void;
|
|
1327
|
+
setChartRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
|
|
1328
|
+
setImageRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
|
|
1305
1329
|
updateChart: (id: string, patch: Partial<XlsxChart>) => void;
|
|
1306
1330
|
}
|
|
1307
1331
|
interface XlsxViewerCharts {
|
|
@@ -1327,7 +1351,7 @@ interface XlsxViewerCharts {
|
|
|
1327
1351
|
selectChartElement: (selection: XlsxChartElementSelection | null) => void;
|
|
1328
1352
|
setChartSeriesFormula: (chartId: string, seriesIndex: number, formula: string) => boolean;
|
|
1329
1353
|
setActiveTabIndex: (index: number) => void;
|
|
1330
|
-
setChartRect: (id: string, rect: XlsxImageRect) => void;
|
|
1354
|
+
setChartRect: (id: string, rect: XlsxImageRect, layout?: XlsxDrawingLayout) => void;
|
|
1331
1355
|
tabs: XlsxWorkbookTab[];
|
|
1332
1356
|
updateChart: (id: string, patch: Partial<XlsxChart>) => void;
|
|
1333
1357
|
}
|
|
@@ -1634,4 +1658,4 @@ declare function useXlsxViewerThumbnails(options?: UseXlsxViewerThumbnailsOption
|
|
|
1634
1658
|
declare function XlsxViewer(props: XlsxViewerProps): react_jsx_runtime.JSX.Element;
|
|
1635
1659
|
declare function DefaultXlsxToolbar(): react_jsx_runtime.JSX.Element;
|
|
1636
1660
|
|
|
1637
|
-
export { DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxCellAddress, type XlsxCellAlignmentInput, type XlsxCellBorderEdgeInput, type XlsxCellBorderStyleInput, 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, XlsxFileSizeLimitExceededError, 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 XlsxImage, type XlsxImageAnchor, type XlsxImageRect, type XlsxImageRenderProps, type XlsxImageResizeHandlePosition, type XlsxImageSelectionRenderProps, type XlsxScrollerRenderProps, 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 XlsxViewerProps, XlsxViewerProvider, type XlsxViewerProviderProps, type XlsxViewerSelection, type XlsxViewerTables, type XlsxViewerThumbnails, type XlsxViewerZoom, type XlsxWasmSource, type XlsxWorkbookTab, initWasm, setWasmSource, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|
|
1661
|
+
export { DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxCellAddress, type XlsxCellAlignmentInput, type XlsxCellBorderEdgeInput, type XlsxCellBorderStyleInput, 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 XlsxDrawingLayout, XlsxFileSizeLimitExceededError, 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 XlsxImage, type XlsxImageAnchor, type XlsxImageRect, type XlsxImageRenderProps, type XlsxImageResizeHandlePosition, type XlsxImageSelectionRenderProps, type XlsxScrollerRenderProps, 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 XlsxViewerProps, XlsxViewerProvider, type XlsxViewerProviderProps, type XlsxViewerSelection, type XlsxViewerTables, type XlsxViewerThumbnails, type XlsxViewerZoom, type XlsxWasmSource, type XlsxWorkbookTab, initWasm, setWasmSource, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|