@ishibashi0112/spreadsheet-grid 0.6.0 → 0.7.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.
@@ -0,0 +1,8 @@
1
+ import type { GridColumn, GridExportData } from '../model/gridTypes';
2
+ export type BuildGridExportDataParams<T> = {
3
+ getRow: (viewIndex: number) => T;
4
+ startRow: number;
5
+ endRow: number;
6
+ columns: GridColumn<T>[];
7
+ };
8
+ export declare const buildGridExportData: <T>({ getRow, startRow, endRow, columns, }: BuildGridExportDataParams<T>) => GridExportData;
@@ -253,6 +253,20 @@ export type CsvExportOptions = {
253
253
  delimiter?: string;
254
254
  bom?: boolean;
255
255
  };
256
+ export type GridExportOptions = {
257
+ scope?: CsvExportScope;
258
+ };
259
+ export type GridExportCell = {
260
+ value: unknown;
261
+ text: string;
262
+ };
263
+ export type GridExportData = {
264
+ columns: {
265
+ key: string;
266
+ title: string;
267
+ }[];
268
+ rows: GridExportCell[][];
269
+ };
256
270
  export type GridColumnState = {
257
271
  key: string;
258
272
  visible?: boolean;
@@ -293,6 +307,7 @@ export type SpreadsheetGridHandle<T> = {
293
307
  getSelectedRows: () => T[];
294
308
  exportCsv: (options?: CsvExportOptions) => string;
295
309
  downloadCsv: (filename?: string, options?: CsvExportOptions) => void;
310
+ getExportData: (options?: GridExportOptions) => GridExportData;
296
311
  getState: () => GridState;
297
312
  applyState: (state: GridState) => void;
298
313
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ishibashi0112/spreadsheet-grid",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "React 19 製のカスタム仮想化データグリッド。100 万行対応の仮想化・3 ペイン固定列・ソート/フィルター・クライアント/サーバーサイド行モデル対応。",
5
5
  "keywords": [
6
6
  "react",