@gridkitjs/react 0.11.1 → 0.12.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.
- package/README.md +1 -1
- package/dist/index.d.ts +48 -8
- package/dist/index.js +1286 -161
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ announces, and `locale` formats dates and numbers.
|
|
|
70
70
|
|
|
71
71
|
Requires React 19.
|
|
72
72
|
|
|
73
|
-
Full documentation: [github.com/
|
|
73
|
+
Full documentation: [github.com/gridkitjs/gridkitjs](https://github.com/gridkitjs/gridkitjs#readme)
|
|
74
74
|
|
|
75
75
|
## License
|
|
76
76
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,52 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, Ref, RefObject } from 'react';
|
|
3
|
-
import { CellSelectEvent as CellSelectEvent$1, CellSelectionChangeEvent as CellSelectionChangeEvent$1, ColumnDefinition as ColumnDefinition$1, ColumnSelectEvent as ColumnSelectEvent$1, ColumnSelectionChangeEvent as ColumnSelectionChangeEvent$1, ColumnsSelectEvent as ColumnsSelectEvent$1, DataColumn as DataColumn$1, GridOptions, PaginationState, SelectionCallbacks as SelectionCallbacks$1, ResolvedRow, DisplayRow, ResolvedColumn as ResolvedColumn$1, ColumnSizingState, ColumnOrderState, ColumnVisibilityState, ColumnSortState, FilterState, GroupByState, GroupExpansionState, AggregateResults, SelectionState, CellSelectionState, GridState, SerializedGridState, GridContextMenuTarget, GridCommandTarget, SelectedCell as SelectedCell$1, SelectedColumn as SelectedColumn$1 } from '@gridkitjs/core';
|
|
4
|
-
export { Borders, CellSelectionMode, CellSelectionState, CellTemplateContext, ColumnResizeEvent, ColumnSizeDefaults, ColumnSizingState, ColumnVisibilityEvent, ColumnVisibilityState, ContextMenuOpenChangeEvent, FilterChangeEvent, FilterEntry, FilterState, GridCommand, GridCommandEvent, GridCommandTarget, GridContextMenuOptions, GridContextMenuRequest, GridContextMenuTarget, GridMessages, GridOptions, GridState, GridToolbarOptions, GroupByBarVisibility, HoverableConfig, MenuEntry, ResizeMode, ResolvedRow, RowPointerEvent, RowProps, RowSelectEvent, RowSelectionChangeEvent, RowsSelectEvent, SelectableConfig, SelectedCellRef, SelectionMode, SelectionState, SerializedGridState, ToolbarEntry, serializeGridState } from '@gridkitjs/core';
|
|
3
|
+
import { ExportWriter, GridExportOptions, PrintOptions, CellSelectEvent as CellSelectEvent$1, CellSelectionChangeEvent as CellSelectionChangeEvent$1, ColumnDefinition as ColumnDefinition$1, ColumnSelectEvent as ColumnSelectEvent$1, ColumnSelectionChangeEvent as ColumnSelectionChangeEvent$1, ColumnsSelectEvent as ColumnsSelectEvent$1, DataColumn as DataColumn$1, GridOptions, PaginationState, SelectionCallbacks as SelectionCallbacks$1, ResolvedRow, DisplayRow, ResolvedColumn as ResolvedColumn$1, ColumnSizingState, ColumnOrderState, ColumnVisibilityState, ColumnSortState, FilterState, GroupByState, GroupExpansionState, AggregateResults, SelectionState, CellSelectionState, GridState, SerializedGridState, GridContextMenuTarget, GridCommandTarget, SelectedCell as SelectedCell$1, SelectedColumn as SelectedColumn$1 } from '@gridkitjs/core';
|
|
4
|
+
export { Borders, CellSelectionMode, CellSelectionState, CellTemplateContext, ColumnResizeEvent, ColumnSizeDefaults, ColumnSizingState, ColumnVisibilityEvent, ColumnVisibilityState, ContextMenuOpenChangeEvent, ExportFile, ExportOptions, ExportWriter, FilterChangeEvent, FilterEntry, FilterState, GridCommand, GridCommandEvent, GridCommandTarget, GridContextMenuOptions, GridContextMenuRequest, GridContextMenuTarget, GridExportOptions, GridMessages, GridOptions, GridState, GridToolbarOptions, GroupByBarVisibility, HoverableConfig, MenuEntry, PrintOptions, ResizeMode, ResolvedRow, RowPointerEvent, RowProps, RowSelectEvent, RowSelectionChangeEvent, RowsSelectEvent, SelectableConfig, SelectedCellRef, SelectionMode, SelectionState, SerializedGridState, ToolbarEntry, excelFilter, serializeGridState } from '@gridkitjs/core';
|
|
5
|
+
|
|
6
|
+
/** What `DataGridApi` carries for exporting. */
|
|
7
|
+
interface GridExportApi {
|
|
8
|
+
/**
|
|
9
|
+
* The grid's view exported as `format` — `"csv"`, `"json"`, a format
|
|
10
|
+
* registered through `exportWriters`, or a writer passed as it is — and
|
|
11
|
+
* handed back as a `Blob`, under the grid's `export` option with
|
|
12
|
+
* `options` over it, field by field. Nothing is downloaded:
|
|
13
|
+
* `runCommand("export.csv")` downloads.
|
|
14
|
+
*
|
|
15
|
+
* Rejects for a format no writer is registered for, and when the writer
|
|
16
|
+
* fails.
|
|
17
|
+
*/
|
|
18
|
+
exportData(format: string | ExportWriter, options?: GridExportOptions): Promise<Blob>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** What `DataGridApi` carries for the grid's panels. */
|
|
22
|
+
interface GridPanelApi {
|
|
23
|
+
/**
|
|
24
|
+
* Opens the column chooser at the grid's top-end corner, in place of any
|
|
25
|
+
* panel open; it gives focus back to what had it when it closes.
|
|
26
|
+
*/
|
|
27
|
+
openColumnChooser(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Opens the filter menu of the column `columnId` below its header, in
|
|
30
|
+
* place of any panel open, and says whether it opened: not for a column
|
|
31
|
+
* with no filter menu, nor one not shown. It gives focus back to the
|
|
32
|
+
* header when it closes.
|
|
33
|
+
*/
|
|
34
|
+
openFilterMenu(columnId: string): boolean;
|
|
35
|
+
/** Closes the filter menu, if one is open, leaving any other panel open. */
|
|
36
|
+
closeFilterMenu(): void;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** What `DataGridApi` carries for printing. */
|
|
40
|
+
interface GridPrintApi {
|
|
41
|
+
/**
|
|
42
|
+
* Prints the grid's view through the browser's print dialog — every row
|
|
43
|
+
* the filter leaves, across pages and collapsed groups, not only those
|
|
44
|
+
* drawn — under the grid's `print` option with `options` over it, field
|
|
45
|
+
* by field. Resolves once the dialog has closed, or at once while another
|
|
46
|
+
* print is open.
|
|
47
|
+
*/
|
|
48
|
+
print(options?: PrintOptions): Promise<void>;
|
|
49
|
+
}
|
|
5
50
|
|
|
6
51
|
/**
|
|
7
52
|
* A column whose header and cells may render arbitrary React content.
|
|
@@ -42,7 +87,7 @@ type SelectionCallbacks<Row> = SelectionCallbacks$1<Row, ReactNode>;
|
|
|
42
87
|
* notify channel for state that changes; see
|
|
43
88
|
* `packages/react/src/DataGrid/hooks/` for the public hooks built on it.
|
|
44
89
|
*/
|
|
45
|
-
interface DataGridApi<Row> {
|
|
90
|
+
interface DataGridApi<Row> extends GridExportApi, GridPrintApi, GridPanelApi {
|
|
46
91
|
/** The grid's scrollable viewport element. */
|
|
47
92
|
readonly element: HTMLDivElement | null;
|
|
48
93
|
/**
|
|
@@ -204,11 +249,6 @@ interface DataGridApi<Row> {
|
|
|
204
249
|
} | Element): boolean;
|
|
205
250
|
/** Closes the context menu, if one is open. */
|
|
206
251
|
closeContextMenu(): void;
|
|
207
|
-
/**
|
|
208
|
-
* Opens the column chooser at the grid's top-end corner, in place of any
|
|
209
|
-
* panel open; it gives focus back to what had it when it closes.
|
|
210
|
-
*/
|
|
211
|
-
openColumnChooser(): void;
|
|
212
252
|
/**
|
|
213
253
|
* Runs a command by id — a built-in or one of `commands` — on `target`,
|
|
214
254
|
* `{ area: "grid" }` when left out, when it is visible and enabled there.
|