@gridkitjs/react 0.10.0 → 0.11.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/dist/index.d.ts +36 -3
- package/dist/index.js +1785 -362
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, SelectedCell as SelectedCell$1, SelectedColumn as SelectedColumn$1 } from '@gridkitjs/core';
|
|
4
|
-
export { Borders, CellSelectionMode, CellSelectionState, CellTemplateContext, ColumnResizeEvent, ColumnSizeDefaults, ColumnSizingState, ColumnVisibilityEvent, ColumnVisibilityState, FilterChangeEvent, FilterEntry, FilterState, GridMessages, GridOptions, GridState, GroupByBarVisibility, HoverableConfig, ResizeMode, ResolvedRow, RowPointerEvent, RowProps, RowSelectEvent, RowSelectionChangeEvent, RowsSelectEvent, SelectableConfig, SelectedCellRef, SelectionMode, SelectionState, SerializedGridState, serializeGridState } from '@gridkitjs/core';
|
|
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';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A column whose header and cells may render arbitrary React content.
|
|
@@ -186,6 +186,36 @@ interface DataGridApi<Row> {
|
|
|
186
186
|
* with no rows to measure, is left as it is.
|
|
187
187
|
*/
|
|
188
188
|
autoFitColumn(columnId: string): void;
|
|
189
|
+
/**
|
|
190
|
+
* `autoFitColumn` for each of the given columns, or for every column shown
|
|
191
|
+
* when given none.
|
|
192
|
+
*/
|
|
193
|
+
autoFitColumns(columnIds?: readonly string[]): void;
|
|
194
|
+
/**
|
|
195
|
+
* Opens the context menu `target` has, as a right-click there would —
|
|
196
|
+
* selecting it and focusing its cell first — beside `anchor`, a point in
|
|
197
|
+
* viewport coordinates or an element, or else below its cell. Says whether
|
|
198
|
+
* it opened: not for a target not on screen, nor where `contextMenu`
|
|
199
|
+
* gives no menu.
|
|
200
|
+
*/
|
|
201
|
+
openContextMenu(target: GridContextMenuTarget, anchor?: {
|
|
202
|
+
readonly x: number;
|
|
203
|
+
readonly y: number;
|
|
204
|
+
} | Element): boolean;
|
|
205
|
+
/** Closes the context menu, if one is open. */
|
|
206
|
+
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
|
+
/**
|
|
213
|
+
* Runs a command by id — a built-in or one of `commands` — on `target`,
|
|
214
|
+
* `{ area: "grid" }` when left out, when it is visible and enabled there.
|
|
215
|
+
* Reports it through `onCommand` with `source: "api"`, and says whether it
|
|
216
|
+
* ran.
|
|
217
|
+
*/
|
|
218
|
+
runCommand(commandId: string, target?: GridCommandTarget): boolean;
|
|
189
219
|
/** Scrolls the row with the given id into view, if it is currently shown. */
|
|
190
220
|
scrollToRow(rowId: string, options?: ScrollIntoViewOptions): void;
|
|
191
221
|
/** Scrolls the column with the given id into view. */
|
|
@@ -263,7 +293,8 @@ interface InfiniteScrollConfig {
|
|
|
263
293
|
/**
|
|
264
294
|
* The props that name a React type, and so have no place in the
|
|
265
295
|
* framework-free `GridOptions`: columns whose templates return `ReactNode`,
|
|
266
|
-
*
|
|
296
|
+
* the pager and infinite-scroll configs whose templates do too, and the
|
|
297
|
+
* toolbar's custom entries.
|
|
267
298
|
*/
|
|
268
299
|
interface ReactRenderSlots<Row> {
|
|
269
300
|
columns?: readonly ColumnDefinition<Row>[] | undefined;
|
|
@@ -277,6 +308,8 @@ interface ReactRenderSlots<Row> {
|
|
|
277
308
|
* bound, so the mounted row count never grows with it either.
|
|
278
309
|
*/
|
|
279
310
|
infiniteScroll?: InfiniteScrollConfig | undefined;
|
|
311
|
+
/** Draws the toolbar's custom entries — `{ type: "custom", id }` — by id. */
|
|
312
|
+
renderToolbarItem?: ((id: string) => ReactNode) | undefined;
|
|
280
313
|
}
|
|
281
314
|
/**
|
|
282
315
|
* Every grid setting in `@gridkitjs/core`'s `GridOptions`, plus what only
|