@extend-ai/react-xlsx 0.24.1 → 0.24.3
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 +22 -1
- package/dist/{chunk-WW6G674Q.cjs → chunk-6TAWBCPV.cjs} +1974 -1796
- package/dist/chunk-6TAWBCPV.cjs.map +1 -0
- package/dist/{chunk-HAV76TR2.js → chunk-EDUJZDOK.js} +33 -1
- package/dist/{chunk-HAV76TR2.js.map → chunk-EDUJZDOK.js.map} +1 -1
- package/dist/{chunk-MNIFKMIL.js → chunk-MCS2EQEF.js} +33 -1
- package/dist/chunk-MCS2EQEF.js.map +1 -0
- package/dist/{chunk-Z4WMURVU.cjs → chunk-TLEC4K6W.cjs} +33 -1
- package/dist/chunk-TLEC4K6W.cjs.map +1 -0
- package/dist/{chunk-XUHSQ3GF.js → chunk-TVUCGYTJ.js} +239 -61
- package/dist/chunk-TVUCGYTJ.js.map +1 -0
- package/dist/{chunk-YOLIVKZD.cjs → chunk-UXJAG7MU.cjs} +33 -1
- package/dist/chunk-UXJAG7MU.cjs.map +1 -0
- package/dist/index.cjs +115 -84
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +318 -287
- package/dist/index.js.map +1 -1
- package/dist/{internal-D5HReXVR.d.cts → internal-BhZTIzgZ.d.cts} +19 -1
- package/dist/{internal-D5HReXVR.d.ts → internal-BhZTIzgZ.d.ts} +19 -1
- package/dist/internal.cjs +3 -3
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +2 -2
- package/dist/{shared-chart-CGEK7EAB.js → shared-chart-NR4KWDQM.js} +2 -2
- package/dist/{shared-chart-24MCGSFJ.js → shared-chart-PMIN7YMP.js} +2 -2
- package/dist/{shared-chart-7E6KMGTG.cjs → shared-chart-QIS7OPL3.cjs} +3 -3
- package/dist/{shared-chart-7E6KMGTG.cjs.map → shared-chart-QIS7OPL3.cjs.map} +1 -1
- package/dist/{shared-chart-GKNMM72Q.cjs → shared-chart-ZP5J6OSZ.cjs} +15 -15
- package/dist/{shared-chart-GKNMM72Q.cjs.map → shared-chart-ZP5J6OSZ.cjs.map} +1 -1
- package/dist/vanilla.cjs +3 -3
- package/dist/vanilla.d.cts +2 -2
- package/dist/vanilla.d.ts +2 -2
- package/dist/vanilla.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-MNIFKMIL.js.map +0 -1
- package/dist/chunk-WW6G674Q.cjs.map +0 -1
- package/dist/chunk-XUHSQ3GF.js.map +0 -1
- package/dist/chunk-YOLIVKZD.cjs.map +0 -1
- package/dist/chunk-Z4WMURVU.cjs.map +0 -1
- /package/dist/{shared-chart-CGEK7EAB.js.map → shared-chart-NR4KWDQM.js.map} +0 -0
- /package/dist/{shared-chart-24MCGSFJ.js.map → shared-chart-PMIN7YMP.js.map} +0 -0
package/README.md
CHANGED
|
@@ -274,7 +274,7 @@ viewer.destroy();
|
|
|
274
274
|
|
|
275
275
|
`subscribe` also exposes `isLoadDeferred` and `continueDeferredLoad()` for deferred workbooks.
|
|
276
276
|
|
|
277
|
-
`XlsxVanillaViewerOptions` supports the non-React viewer options, including `getCellStyle`, form-control events, themes, worker settings, and highlighting. `toolbar`, loading/empty/error states, and the `renderActiveCellOverlay`, `renderCellEditorOverlay`, `renderSelectionPopover`, `renderChartLoading`, `renderContextMenu`, `renderFormControl`, and `renderImage` callbacks accept text or DOM nodes. Their vanilla callback props omit React's `defaultNode`. React-specific custom scroller, image-selection, and table-header render callbacks are not available through this entry point.
|
|
277
|
+
`XlsxVanillaViewerOptions` supports the non-React viewer options, including `getCellStyle`, form-control events, themes, worker settings, and highlighting. `toolbar`, loading/empty/error states, and the `renderActiveCellOverlay`, `renderCellEditorOverlay`, `renderSelectionPopover`, `renderChartLoading`, `renderContextMenu`, `renderHiddenRangeMarker`, `renderFormControl`, and `renderImage` callbacks accept text or DOM nodes. Their vanilla callback props omit React's `defaultNode`. React-specific custom scroller, image-selection, and table-header render callbacks are not available through this entry point.
|
|
278
278
|
|
|
279
279
|
The vanilla entry also exports `setWasmSource`, `initWasm`, `parseXlsxRange`, and workbook types. The same WASM, worker, font, and chart assets need to be served as in the React integration.
|
|
280
280
|
|
|
@@ -537,6 +537,27 @@ In read-only mode, set `allowFreezeInReadOnly` to allow freezing and unfreezing
|
|
|
537
537
|
|
|
538
538
|
Read `canChangeVisibility` and `canChangeFreezePanes` to enable layout menus. Use `canFreezePanes` to enable a freeze command for the current selection and `frozenPanes` for the current row and column counts, or `null` when unfrozen. To unhide a block from the grid, select headers on both sides and choose **Unhide**. For hidden leading rows or columns, select the first visible header.
|
|
539
539
|
|
|
540
|
+
### Hidden row and column markers
|
|
541
|
+
|
|
542
|
+
The row and column headers mark each contiguous hidden range with a thick line in the selection border color. Click the line or right-click it and choose **Unhide** to reveal that range. In read-only mode, `allowHideInReadOnly` enables unhiding for the current session. Otherwise, the line is a visual indicator.
|
|
543
|
+
|
|
544
|
+
Use `renderHiddenRangeMarker` to replace the line. It receives the `axis` (`"row"` or `"column"`), inclusive zero-based `start` and `end`, a localized `label`, `readOnly`, `canUnhide`, and an `unhide()` action for that range. React also supplies `defaultNode`. Return `null` to omit a marker. Vanilla JavaScript accepts the same option and can return a DOM node or text.
|
|
545
|
+
|
|
546
|
+
```tsx
|
|
547
|
+
import type { XlsxHiddenRangeMarkerRenderProps } from "@extend-ai/react-xlsx";
|
|
548
|
+
|
|
549
|
+
function renderMarker({ axis, label, canUnhide, unhide }: XlsxHiddenRangeMarkerRenderProps) {
|
|
550
|
+
const icon = axis === "row" ? "↕" : "↔";
|
|
551
|
+
return canUnhide
|
|
552
|
+
? <button type="button" aria-label={label} onClick={unhide}>{icon}</button>
|
|
553
|
+
: <span role="img" aria-label={label}>{icon}</span>;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
<XlsxViewer src={url} renderHiddenRangeMarker={renderMarker} />
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
Both grid modes mount markers alongside virtualized headers. Keep the renderer reference stable to reuse its content while scrolling or changing the selection.
|
|
560
|
+
|
|
540
561
|
## Merging Cells
|
|
541
562
|
|
|
542
563
|
The controller and `useXlsxViewerEditing()` expose `mergeSelection(mode?)` and `unmergeSelection()`. The merge modes are:
|