@extend-ai/react-xlsx 0.9.2 → 0.10.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/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/index.cjs +641 -640
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +641 -640
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -539,6 +539,17 @@ interface XlsxFileTooLargeRenderProps {
|
|
|
539
539
|
/** Configured maximum file size in bytes. */
|
|
540
540
|
maxFileSizeBytes: number;
|
|
541
541
|
}
|
|
542
|
+
interface XlsxScrollerRenderProps {
|
|
543
|
+
/** Workbook grid content that should be rendered inside the scrollable viewport. */
|
|
544
|
+
children: React.ReactNode;
|
|
545
|
+
/** Props that must be applied to the actual scrollable viewport element. */
|
|
546
|
+
viewportProps: React.HTMLAttributes<HTMLDivElement> & {
|
|
547
|
+
key: React.Key;
|
|
548
|
+
ref: React.Ref<HTMLDivElement>;
|
|
549
|
+
style: React.CSSProperties;
|
|
550
|
+
tabIndex: number;
|
|
551
|
+
};
|
|
552
|
+
}
|
|
542
553
|
interface UseXlsxViewerControllerOptions {
|
|
543
554
|
/**
|
|
544
555
|
* Allows row and column resizing even while editing is disabled by `readOnly`.
|
|
@@ -976,6 +987,23 @@ interface XlsxViewerProps extends UseXlsxViewerControllerOptions {
|
|
|
976
987
|
renderImage?: (props: XlsxImageRenderProps) => React.ReactNode;
|
|
977
988
|
/** Replaces the selected-image outline and resize handles. */
|
|
978
989
|
renderImageSelection?: (props: XlsxImageSelectionRenderProps) => React.ReactNode;
|
|
990
|
+
/**
|
|
991
|
+
* Replaces the scroll viewport shell. Spread `viewportProps` onto the actual scrollable viewport element.
|
|
992
|
+
*
|
|
993
|
+
* @example
|
|
994
|
+
* ```tsx
|
|
995
|
+
* <XlsxViewer
|
|
996
|
+
* renderScroller={({ children, viewportProps }) => (
|
|
997
|
+
* <ScrollAreaPrimitive.Root className="h-full min-h-0 w-full min-w-0 flex-1">
|
|
998
|
+
* <ScrollAreaPrimitive.Viewport {...viewportProps}>{children}</ScrollAreaPrimitive.Viewport>
|
|
999
|
+
* <ScrollBar />
|
|
1000
|
+
* <ScrollAreaPrimitive.Corner />
|
|
1001
|
+
* </ScrollAreaPrimitive.Root>
|
|
1002
|
+
* )}
|
|
1003
|
+
* />
|
|
1004
|
+
* ```
|
|
1005
|
+
*/
|
|
1006
|
+
renderScroller?: (props: XlsxScrollerRenderProps) => React.ReactNode;
|
|
979
1007
|
/**
|
|
980
1008
|
* Toggles the default rounded outer shell.
|
|
981
1009
|
*
|
|
@@ -1048,4 +1076,4 @@ declare function useXlsxViewerThumbnails(options?: UseXlsxViewerThumbnailsOption
|
|
|
1048
1076
|
declare function XlsxViewer(props: XlsxViewerProps): react_jsx_runtime.JSX.Element;
|
|
1049
1077
|
declare function DefaultXlsxToolbar(): react_jsx_runtime.JSX.Element;
|
|
1050
1078
|
|
|
1051
|
-
export { DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxCellAddress, type XlsxCellRange, type XlsxChart, type XlsxChartAxis, type XlsxChartDataLabels, type XlsxChartLoadingRenderProps, type XlsxChartReference, type XlsxChartSeries, type XlsxChartsheet, XlsxFileSizeLimitExceededError, type XlsxFileTooLargeRenderProps, type XlsxImage, type XlsxImageAnchor, type XlsxImageRect, type XlsxImageRenderProps, type XlsxImageResizeHandlePosition, type XlsxImageSelectionRenderProps, 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 XlsxWorkbookTab, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|
|
1079
|
+
export { DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxCellAddress, type XlsxCellRange, type XlsxChart, type XlsxChartAxis, type XlsxChartDataLabels, type XlsxChartLoadingRenderProps, type XlsxChartReference, type XlsxChartSeries, type XlsxChartsheet, XlsxFileSizeLimitExceededError, type XlsxFileTooLargeRenderProps, 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 XlsxWorkbookTab, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|
package/dist/index.d.ts
CHANGED
|
@@ -539,6 +539,17 @@ interface XlsxFileTooLargeRenderProps {
|
|
|
539
539
|
/** Configured maximum file size in bytes. */
|
|
540
540
|
maxFileSizeBytes: number;
|
|
541
541
|
}
|
|
542
|
+
interface XlsxScrollerRenderProps {
|
|
543
|
+
/** Workbook grid content that should be rendered inside the scrollable viewport. */
|
|
544
|
+
children: React.ReactNode;
|
|
545
|
+
/** Props that must be applied to the actual scrollable viewport element. */
|
|
546
|
+
viewportProps: React.HTMLAttributes<HTMLDivElement> & {
|
|
547
|
+
key: React.Key;
|
|
548
|
+
ref: React.Ref<HTMLDivElement>;
|
|
549
|
+
style: React.CSSProperties;
|
|
550
|
+
tabIndex: number;
|
|
551
|
+
};
|
|
552
|
+
}
|
|
542
553
|
interface UseXlsxViewerControllerOptions {
|
|
543
554
|
/**
|
|
544
555
|
* Allows row and column resizing even while editing is disabled by `readOnly`.
|
|
@@ -976,6 +987,23 @@ interface XlsxViewerProps extends UseXlsxViewerControllerOptions {
|
|
|
976
987
|
renderImage?: (props: XlsxImageRenderProps) => React.ReactNode;
|
|
977
988
|
/** Replaces the selected-image outline and resize handles. */
|
|
978
989
|
renderImageSelection?: (props: XlsxImageSelectionRenderProps) => React.ReactNode;
|
|
990
|
+
/**
|
|
991
|
+
* Replaces the scroll viewport shell. Spread `viewportProps` onto the actual scrollable viewport element.
|
|
992
|
+
*
|
|
993
|
+
* @example
|
|
994
|
+
* ```tsx
|
|
995
|
+
* <XlsxViewer
|
|
996
|
+
* renderScroller={({ children, viewportProps }) => (
|
|
997
|
+
* <ScrollAreaPrimitive.Root className="h-full min-h-0 w-full min-w-0 flex-1">
|
|
998
|
+
* <ScrollAreaPrimitive.Viewport {...viewportProps}>{children}</ScrollAreaPrimitive.Viewport>
|
|
999
|
+
* <ScrollBar />
|
|
1000
|
+
* <ScrollAreaPrimitive.Corner />
|
|
1001
|
+
* </ScrollAreaPrimitive.Root>
|
|
1002
|
+
* )}
|
|
1003
|
+
* />
|
|
1004
|
+
* ```
|
|
1005
|
+
*/
|
|
1006
|
+
renderScroller?: (props: XlsxScrollerRenderProps) => React.ReactNode;
|
|
979
1007
|
/**
|
|
980
1008
|
* Toggles the default rounded outer shell.
|
|
981
1009
|
*
|
|
@@ -1048,4 +1076,4 @@ declare function useXlsxViewerThumbnails(options?: UseXlsxViewerThumbnailsOption
|
|
|
1048
1076
|
declare function XlsxViewer(props: XlsxViewerProps): react_jsx_runtime.JSX.Element;
|
|
1049
1077
|
declare function DefaultXlsxToolbar(): react_jsx_runtime.JSX.Element;
|
|
1050
1078
|
|
|
1051
|
-
export { DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxCellAddress, type XlsxCellRange, type XlsxChart, type XlsxChartAxis, type XlsxChartDataLabels, type XlsxChartLoadingRenderProps, type XlsxChartReference, type XlsxChartSeries, type XlsxChartsheet, XlsxFileSizeLimitExceededError, type XlsxFileTooLargeRenderProps, type XlsxImage, type XlsxImageAnchor, type XlsxImageRect, type XlsxImageRenderProps, type XlsxImageResizeHandlePosition, type XlsxImageSelectionRenderProps, 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 XlsxWorkbookTab, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|
|
1079
|
+
export { DefaultXlsxToolbar, type UseXlsxViewerControllerOptions, type UseXlsxViewerThumbnailsOptions, type XlsxCellAddress, type XlsxCellRange, type XlsxChart, type XlsxChartAxis, type XlsxChartDataLabels, type XlsxChartLoadingRenderProps, type XlsxChartReference, type XlsxChartSeries, type XlsxChartsheet, XlsxFileSizeLimitExceededError, type XlsxFileTooLargeRenderProps, 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 XlsxWorkbookTab, useXlsxViewer, useXlsxViewerCharts, useXlsxViewerController, useXlsxViewerEditing, useXlsxViewerImages, useXlsxViewerSelection, useXlsxViewerTables, useXlsxViewerThumbnails, useXlsxViewerZoom };
|