API reference
@salmonui/data-grid/engine/export-server
14 exported symbols: 5 functions, 5 interfaces and 4 types. Each name links its page with the signature, docs and members.
import { … } from '@salmonui/data-grid/engine/export-server';Functions
contentDispositionContent-Disposition for a download name (ASCII fallback plus RFC 5987 UTF-8 name).createExportDataGridCreates a headless grid (no React, no DOM) with the query modules and the export module (plus lookup when a column has one), for server-side export. query is a…createExportStreamStarts an export: raises onBeforeExport (null when prevented), builds the export model, and returns the file name, MIME type, download headers, and the bytes a…exportToResponseExports to a Web Response whose body streams the file, with Content-Type and Content-Disposition set: return it from a Next.js route handler or any fetch-style…exportToStreamStreams an export to a Node Writable (for example an http.ServerResponse or fs.createWriteStream) or a Web WritableStream, honoring backpressure, and ends the…
Interfaces
ExportDataGridOptionsRows and columns of a headless export grid.ExportStreamA started export: name, type, download headers, and the bytes as an async iterable.ExportStreamResultResult of exportToStream.NodeWritableLikeThe parts of a Node Writable the export uses.WebWritableStreamLikeThe parts of a Web WritableStream the export uses.
Types
PlatformResponseThe platform Response type where the consumer's environment declares one (DOM lib, @types/node).ServerExportHandlersHooks and onBeforeExport; there is no file promise, so no onExport.ServerExportOptionsOptions of one server export; format selects the writer and its options.ServerExportSourceA grid, an export model, or rows and columns.