@extend-ai/react-xlsx 0.14.0 → 0.14.1

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.d.cts CHANGED
@@ -539,6 +539,8 @@ interface XlsxFormControl {
539
539
  id: string;
540
540
  increment?: number;
541
541
  inputRange?: string;
542
+ /** Current formatted labels resolved from a dropdown or list box input range. */
543
+ items?: string[];
542
544
  kind: XlsxFormControlKind;
543
545
  label?: string;
544
546
  lines?: number;
@@ -570,6 +572,38 @@ interface XlsxFormControlChangeEvent {
570
572
  previousControl: XlsxFormControl;
571
573
  type: "change";
572
574
  }
575
+ interface XlsxFormControlRenderProps {
576
+ /** Activates a button control. No-ops in read-only mode. */
577
+ activate: () => void;
578
+ /** Current checked state for checkbox and radio controls. */
579
+ checked: boolean;
580
+ /** Full parsed control metadata. Switch on `control.kind` to render a kind-specific component. */
581
+ control: XlsxFormControl;
582
+ /** True when this control cannot be changed through the viewer. */
583
+ disabled: boolean;
584
+ /** Current formatted dropdown or list box items resolved from the control input range. */
585
+ items: string[];
586
+ /** Display label after placeholder Excel names have been removed. */
587
+ label: string;
588
+ /** True when a checkbox is in Excel's indeterminate state. */
589
+ mixed: boolean;
590
+ /** True when the viewer is rendering without workbook mutation support. */
591
+ readOnly: boolean;
592
+ /** Calculated worksheet-relative control rectangle in CSS pixels. */
593
+ rect: XlsxImageRect;
594
+ /** Persists a dropdown or list box selection. No-ops for other control kinds or in read-only mode. */
595
+ setSelected: (selected: number | number[] | undefined) => boolean;
596
+ /** Persists a checkbox or radio state. No-ops for other control kinds or in read-only mode. */
597
+ setState: (state: XlsxFormControlState) => boolean;
598
+ /** Persists a scrollbar or spinner value. No-ops for other control kinds or in read-only mode. */
599
+ setValue: (value: number) => boolean;
600
+ /** Stops an event from leaking into worksheet selection. */
601
+ stopPropagation: (event: React.SyntheticEvent) => void;
602
+ /** Apply this style to the custom control root to preserve worksheet positioning and sizing. */
603
+ style: React.CSSProperties;
604
+ /** Current worksheet zoom multiplier, where `1` is 100%. */
605
+ zoomFactor: number;
606
+ }
573
607
  interface XlsxChartReference {
574
608
  formula?: string;
575
609
  refType?: string;
@@ -1456,6 +1490,12 @@ interface XlsxViewerProps extends UseXlsxViewerControllerOptions {
1456
1490
  onFormControlChange?: (event: XlsxFormControlChangeEvent) => void;
1457
1491
  /** Replaces the chart loading placeholder. */
1458
1492
  renderChartLoading?: (props: XlsxChartLoadingRenderProps) => React.ReactNode;
1493
+ /**
1494
+ * Replaces built-in worksheet form-control rendering.
1495
+ * Apply `style` to the custom root and use `stopPropagation` on pointer/click handlers.
1496
+ * The supplied setters preserve Duke mutation, linked-cell, undo/redo, and change-event behavior.
1497
+ */
1498
+ renderFormControl?: (props: XlsxFormControlRenderProps) => React.ReactNode;
1459
1499
  /**
1460
1500
  * Replaces worksheet images while preserving their calculated rect and style.
1461
1501
  *
@@ -1560,4 +1600,4 @@ declare function useXlsxViewerThumbnails(options?: UseXlsxViewerThumbnailsOption
1560
1600
  declare function XlsxViewer(props: XlsxViewerProps): react_jsx_runtime.JSX.Element;
1561
1601
  declare function DefaultXlsxToolbar(): react_jsx_runtime.JSX.Element;
1562
1602
 
1563
- 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 XlsxFormControlAnchor, type XlsxFormControlChangeEvent, type XlsxFormControlInput, type XlsxFormControlKind, type XlsxFormControlKindInput, type XlsxFormControlPatch, 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 };
1603
+ 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 XlsxFormControlAnchor, 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
@@ -539,6 +539,8 @@ interface XlsxFormControl {
539
539
  id: string;
540
540
  increment?: number;
541
541
  inputRange?: string;
542
+ /** Current formatted labels resolved from a dropdown or list box input range. */
543
+ items?: string[];
542
544
  kind: XlsxFormControlKind;
543
545
  label?: string;
544
546
  lines?: number;
@@ -570,6 +572,38 @@ interface XlsxFormControlChangeEvent {
570
572
  previousControl: XlsxFormControl;
571
573
  type: "change";
572
574
  }
575
+ interface XlsxFormControlRenderProps {
576
+ /** Activates a button control. No-ops in read-only mode. */
577
+ activate: () => void;
578
+ /** Current checked state for checkbox and radio controls. */
579
+ checked: boolean;
580
+ /** Full parsed control metadata. Switch on `control.kind` to render a kind-specific component. */
581
+ control: XlsxFormControl;
582
+ /** True when this control cannot be changed through the viewer. */
583
+ disabled: boolean;
584
+ /** Current formatted dropdown or list box items resolved from the control input range. */
585
+ items: string[];
586
+ /** Display label after placeholder Excel names have been removed. */
587
+ label: string;
588
+ /** True when a checkbox is in Excel's indeterminate state. */
589
+ mixed: boolean;
590
+ /** True when the viewer is rendering without workbook mutation support. */
591
+ readOnly: boolean;
592
+ /** Calculated worksheet-relative control rectangle in CSS pixels. */
593
+ rect: XlsxImageRect;
594
+ /** Persists a dropdown or list box selection. No-ops for other control kinds or in read-only mode. */
595
+ setSelected: (selected: number | number[] | undefined) => boolean;
596
+ /** Persists a checkbox or radio state. No-ops for other control kinds or in read-only mode. */
597
+ setState: (state: XlsxFormControlState) => boolean;
598
+ /** Persists a scrollbar or spinner value. No-ops for other control kinds or in read-only mode. */
599
+ setValue: (value: number) => boolean;
600
+ /** Stops an event from leaking into worksheet selection. */
601
+ stopPropagation: (event: React.SyntheticEvent) => void;
602
+ /** Apply this style to the custom control root to preserve worksheet positioning and sizing. */
603
+ style: React.CSSProperties;
604
+ /** Current worksheet zoom multiplier, where `1` is 100%. */
605
+ zoomFactor: number;
606
+ }
573
607
  interface XlsxChartReference {
574
608
  formula?: string;
575
609
  refType?: string;
@@ -1456,6 +1490,12 @@ interface XlsxViewerProps extends UseXlsxViewerControllerOptions {
1456
1490
  onFormControlChange?: (event: XlsxFormControlChangeEvent) => void;
1457
1491
  /** Replaces the chart loading placeholder. */
1458
1492
  renderChartLoading?: (props: XlsxChartLoadingRenderProps) => React.ReactNode;
1493
+ /**
1494
+ * Replaces built-in worksheet form-control rendering.
1495
+ * Apply `style` to the custom root and use `stopPropagation` on pointer/click handlers.
1496
+ * The supplied setters preserve Duke mutation, linked-cell, undo/redo, and change-event behavior.
1497
+ */
1498
+ renderFormControl?: (props: XlsxFormControlRenderProps) => React.ReactNode;
1459
1499
  /**
1460
1500
  * Replaces worksheet images while preserving their calculated rect and style.
1461
1501
  *
@@ -1560,4 +1600,4 @@ declare function useXlsxViewerThumbnails(options?: UseXlsxViewerThumbnailsOption
1560
1600
  declare function XlsxViewer(props: XlsxViewerProps): react_jsx_runtime.JSX.Element;
1561
1601
  declare function DefaultXlsxToolbar(): react_jsx_runtime.JSX.Element;
1562
1602
 
1563
- 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 XlsxFormControlAnchor, type XlsxFormControlChangeEvent, type XlsxFormControlInput, type XlsxFormControlKind, type XlsxFormControlKindInput, type XlsxFormControlPatch, 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 };
1603
+ 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 XlsxFormControlAnchor, 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 };