Repository navigation
v1.9.0
Minor Changes
-
f7eaabe: Add
react-smart-copy/table: spreadsheet-ready copy and paste for tables.- Copy:
tablePayload(data)returns anhtmlpayload, an HTML<table>plus tab-separated text, forcopy(),useCopyInterceptoranduseDragCopy. Rows paste as cells in Excel, Google Sheets, Numbers and LibreOffice, and as a table in Docs, Word and Notion. Numbers, bigints, booleans and dates stay typed; strings stay text, so leading zeros survive (preserveText). Text that would run as a formula is neutralised by default, following OWASP's CSV Injection guidance (formulaGuard). - Sources:
fromRowsfor your own objects (type-checked column keys),fromAgGridfor AG Grid v31+ (Community and Enterprise),fromTanStackTablefor TanStack Table v8 and v9 in any framework, andfromTableElementfor any rendered<table>. No dependency on any grid library. - Paste:
parseTablereads the HTML that Excel, Google Sheets, Word and web pages put on the clipboard (merged cells, line breaks, hidden rows) and falls back to tab-separated text, also on the server.toRecordsmaps a pasted range onto typed records by header, with aliases, and reports missing columns and parse errors. Explicit limits for rows, columns, cells and input length, reported throughtruncated.
Also: a
CopyFailurethrown inside acopy()source, a drag source or a copy transform now keeps its own error type (for exampletoo-large) instead of becoming a genericinvalid-payload. - Copy:
Patch Changes
- 06a4afe: Docs: the README roadmap now lists the
react-smart-copy/testingsubpackage under 1.6, the version it shipped in.