@kanunilabs/datagrid-react 1.1.1 → 1.2.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/LICENSE +3 -3
- package/README.md +253 -247
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +15 -9
- package/dist/index.d.ts +15 -9
- package/dist/index.js +2 -2
- package/dist/styles.css +3160 -3125
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, RefObject } from 'react';
|
|
3
|
-
import { GridRowData, DataGridController, StateStoringConfig, RowKey, RowNode, GridColumnDef, DataGridCoreConfig, InferColumnsOptions,
|
|
4
|
-
export { BusyChangedEvent, BusyPhase, ClientRowModel, ColumnLayout, ColumnLookup, ColumnModel, ColumnPin, ColumnRuntime, ColumnState, ColumnStateChangedEvent, ContentReadyEvent, DEFAULT_ROW_HEIGHT, DENSITY_ROW_HEIGHT, DataGridController, DataGridCoreConfig, DataRowNode, DataSource, FilterChangedEvent, FilterCondition, FilterGroupNode, FilterNode, FilterOperator, FocusedRowChangedEvent, GRID_PALETTES, GRID_THEMES, GridColumnDef, GridDataType, GridDensity, GridEventMap, GridPalette, GridRowData, GridStateStore, GridTheme, GridViewState, GroupRowNode, GroupingConfig, HeaderBandCell, InferColumnsOptions, LoadOptions, LoadResult, LookupItem, NewRowPosition, RowDropPosition, RowKey, RowNode, SUMMARY_TYPE_LABEL, ScrollingConfig, SelectionDescriptor, SortChangedEvent, SortDescriptor, SortDirection, StateStoringConfig, SummaryDef, SummaryType, THEME_ROW_HEIGHT, ViewportChangedEvent, VirtualWindow, VirtualWindowEngine, allowedSummaryTypes, andFilters, attachStateStoring, bandDepth, bandPath, computeColumnLayout, computeHeaderBands, createRestDataSource, describeFilter, downloadBlob, fillText, filterInputFromNode, formatSummaryValue, humanizeField, importCsv, inferColumns, isDataRow, isDataSource, isFilterGroup, isGroupRow, lookupLabel, moveRowInArray, parseCsv, parseFilterInput, sniffDelimiter, summaryKey, summaryLabel, summaryTypeLabels, themeClassName } from '@kanunilabs/datagrid-core';
|
|
3
|
+
import { GridRowData, DataGridController, StateStoringConfig, RowKey, RowNode, GridColumnDef, DataGridCoreConfig, InferColumnsOptions, GridThemeName, GridPalette, DescribeFilterOptions, GridDensity, ColumnRuntime, ColumnLayout, SortDescriptor, ColumnModel, SummaryDef, FilterNode, ColumnState, BusyPhase, GridDictionary, DataRowNode, VirtualWindow, ChartSpec, ChartModel } from '@kanunilabs/datagrid-core';
|
|
4
|
+
export { BusyChangedEvent, BusyPhase, ClientRowModel, ColumnLayout, ColumnLookup, ColumnModel, ColumnPin, ColumnRuntime, ColumnState, ColumnStateChangedEvent, ContentReadyEvent, DEFAULT_ROW_HEIGHT, DENSITY_ROW_HEIGHT, DataGridController, DataGridCoreConfig, DataRowNode, DataSource, FilterChangedEvent, FilterCondition, FilterGroupNode, FilterNode, FilterOperator, FocusedRowChangedEvent, GRID_PALETTES, GRID_THEMES, GridColumnDef, GridDataType, GridDensity, GridEventMap, GridPalette, GridRowData, GridStateStore, GridTheme, GridThemeName, GridViewState, GroupRowNode, GroupingConfig, HeaderBandCell, InferColumnsOptions, LoadOptions, LoadResult, LookupItem, NewRowPosition, RowDropPosition, RowKey, RowNode, SUMMARY_TYPE_LABEL, ScrollingConfig, SelectionDescriptor, SortChangedEvent, SortDescriptor, SortDirection, StateStoringConfig, SummaryDef, SummaryType, THEME_ROW_HEIGHT, ViewportChangedEvent, VirtualWindow, VirtualWindowEngine, allowedSummaryTypes, andFilters, attachStateStoring, bandDepth, bandPath, computeColumnLayout, computeHeaderBands, createRestDataSource, describeFilter, downloadBlob, fillText, filterInputFromNode, formatSummaryValue, humanizeField, importCsv, inferColumns, isDataRow, isDataSource, isFilterGroup, isGroupRow, isPackagedTheme, lookupLabel, moveRowInArray, parseCsv, parseFilterInput, sniffDelimiter, summaryKey, summaryLabel, summaryTypeLabels, themeClassName } from '@kanunilabs/datagrid-core';
|
|
5
5
|
|
|
6
6
|
/** Formats an export menu can offer. */
|
|
7
7
|
type ExportKind = 'csv' | 'excel' | 'excel-selected' | 'pdf';
|
|
@@ -402,10 +402,16 @@ interface DataGridProps<TRow = GridRowData> extends Omit<DataGridCoreConfig<TRow
|
|
|
402
402
|
* is already dark and ignores the flag.
|
|
403
403
|
*
|
|
404
404
|
* Every colour, metric and border the stylesheet draws with is a `--dg-*`
|
|
405
|
-
* custom property, so a theme is a token override and nothing more
|
|
406
|
-
*
|
|
405
|
+
* custom property, so a theme is a token override and nothing more.
|
|
406
|
+
*
|
|
407
|
+
* YOUR OWN theme is a name here too: `theme="acme"` puts the class
|
|
408
|
+
* `kanuni-datagrid-theme-acme` on every surface a packaged theme reaches —
|
|
409
|
+
* the grid, the Enterprise wrapper and every popup and dialog — so tokens
|
|
410
|
+
* declared under `.kanuni-datagrid-theme-acme` restyle all of them. A custom
|
|
411
|
+
* theme has no row-height preset: set `rowHeight` (or `density`) with it.
|
|
412
|
+
* (`className` is not the channel for this: it lands on the grid root only.)
|
|
407
413
|
*/
|
|
408
|
-
theme?:
|
|
414
|
+
theme?: GridThemeName;
|
|
409
415
|
/**
|
|
410
416
|
* A colour scheme, on top of whatever `theme` decides about structure —
|
|
411
417
|
* `'nord'`, `'dracula'`, `'solarized'`, `'gruvbox'`, `'catppuccin'` or
|
|
@@ -443,8 +449,7 @@ interface DataGridProps<TRow = GridRowData> extends Omit<DataGridCoreConfig<TRow
|
|
|
443
449
|
filterDebounce?: number;
|
|
444
450
|
/**
|
|
445
451
|
* A bar under the footer stating the active filter in words, with a checkbox
|
|
446
|
-
* that suspends it and an `×` that removes it —
|
|
447
|
-
* panel.
|
|
452
|
+
* that suspends it and an `×` that removes it — a filter panel.
|
|
448
453
|
*
|
|
449
454
|
* `true` shows it only while something is filtered; `'always'` keeps it in
|
|
450
455
|
* place. It describes the FULL filter — the builder's conditions and every
|
|
@@ -743,7 +748,8 @@ interface DataGridProps<TRow = GridRowData> extends Omit<DataGridCoreConfig<TRow
|
|
|
743
748
|
* Community keeps: virtual scrolling at a million rows, worker offload,
|
|
744
749
|
* sorting, the column family, filtering, selection, pagination, single-level
|
|
745
750
|
* grouping, CSV export, themes, 12 locales and the whole event/imperative
|
|
746
|
-
* API. Boundary set with the user on 2026-08-14
|
|
751
|
+
* API. Boundary set with the user on 2026-08-14 to match how comparable
|
|
752
|
+
* grids draw this line.
|
|
747
753
|
*/
|
|
748
754
|
enterpriseEdition?: boolean;
|
|
749
755
|
/**
|
|
@@ -1608,7 +1614,7 @@ declare function writeClipboardText(text: string): void;
|
|
|
1608
1614
|
declare function buildCellMenuItems<TRow = GridRowData>(controller: DataGridController<TRow>, text: GridDictionary, option: boolean | CellMenuOptions | undefined, needsSeparator: boolean, onExportError?: (message: string) => void): GridMenuItem<RowMenuContext<TRow>>[];
|
|
1609
1615
|
|
|
1610
1616
|
interface GridSurfaceProviderProps {
|
|
1611
|
-
theme?:
|
|
1617
|
+
theme?: GridThemeName;
|
|
1612
1618
|
density?: GridDensity;
|
|
1613
1619
|
palette?: GridPalette;
|
|
1614
1620
|
children: ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, RefObject } from 'react';
|
|
3
|
-
import { GridRowData, DataGridController, StateStoringConfig, RowKey, RowNode, GridColumnDef, DataGridCoreConfig, InferColumnsOptions,
|
|
4
|
-
export { BusyChangedEvent, BusyPhase, ClientRowModel, ColumnLayout, ColumnLookup, ColumnModel, ColumnPin, ColumnRuntime, ColumnState, ColumnStateChangedEvent, ContentReadyEvent, DEFAULT_ROW_HEIGHT, DENSITY_ROW_HEIGHT, DataGridController, DataGridCoreConfig, DataRowNode, DataSource, FilterChangedEvent, FilterCondition, FilterGroupNode, FilterNode, FilterOperator, FocusedRowChangedEvent, GRID_PALETTES, GRID_THEMES, GridColumnDef, GridDataType, GridDensity, GridEventMap, GridPalette, GridRowData, GridStateStore, GridTheme, GridViewState, GroupRowNode, GroupingConfig, HeaderBandCell, InferColumnsOptions, LoadOptions, LoadResult, LookupItem, NewRowPosition, RowDropPosition, RowKey, RowNode, SUMMARY_TYPE_LABEL, ScrollingConfig, SelectionDescriptor, SortChangedEvent, SortDescriptor, SortDirection, StateStoringConfig, SummaryDef, SummaryType, THEME_ROW_HEIGHT, ViewportChangedEvent, VirtualWindow, VirtualWindowEngine, allowedSummaryTypes, andFilters, attachStateStoring, bandDepth, bandPath, computeColumnLayout, computeHeaderBands, createRestDataSource, describeFilter, downloadBlob, fillText, filterInputFromNode, formatSummaryValue, humanizeField, importCsv, inferColumns, isDataRow, isDataSource, isFilterGroup, isGroupRow, lookupLabel, moveRowInArray, parseCsv, parseFilterInput, sniffDelimiter, summaryKey, summaryLabel, summaryTypeLabels, themeClassName } from '@kanunilabs/datagrid-core';
|
|
3
|
+
import { GridRowData, DataGridController, StateStoringConfig, RowKey, RowNode, GridColumnDef, DataGridCoreConfig, InferColumnsOptions, GridThemeName, GridPalette, DescribeFilterOptions, GridDensity, ColumnRuntime, ColumnLayout, SortDescriptor, ColumnModel, SummaryDef, FilterNode, ColumnState, BusyPhase, GridDictionary, DataRowNode, VirtualWindow, ChartSpec, ChartModel } from '@kanunilabs/datagrid-core';
|
|
4
|
+
export { BusyChangedEvent, BusyPhase, ClientRowModel, ColumnLayout, ColumnLookup, ColumnModel, ColumnPin, ColumnRuntime, ColumnState, ColumnStateChangedEvent, ContentReadyEvent, DEFAULT_ROW_HEIGHT, DENSITY_ROW_HEIGHT, DataGridController, DataGridCoreConfig, DataRowNode, DataSource, FilterChangedEvent, FilterCondition, FilterGroupNode, FilterNode, FilterOperator, FocusedRowChangedEvent, GRID_PALETTES, GRID_THEMES, GridColumnDef, GridDataType, GridDensity, GridEventMap, GridPalette, GridRowData, GridStateStore, GridTheme, GridThemeName, GridViewState, GroupRowNode, GroupingConfig, HeaderBandCell, InferColumnsOptions, LoadOptions, LoadResult, LookupItem, NewRowPosition, RowDropPosition, RowKey, RowNode, SUMMARY_TYPE_LABEL, ScrollingConfig, SelectionDescriptor, SortChangedEvent, SortDescriptor, SortDirection, StateStoringConfig, SummaryDef, SummaryType, THEME_ROW_HEIGHT, ViewportChangedEvent, VirtualWindow, VirtualWindowEngine, allowedSummaryTypes, andFilters, attachStateStoring, bandDepth, bandPath, computeColumnLayout, computeHeaderBands, createRestDataSource, describeFilter, downloadBlob, fillText, filterInputFromNode, formatSummaryValue, humanizeField, importCsv, inferColumns, isDataRow, isDataSource, isFilterGroup, isGroupRow, isPackagedTheme, lookupLabel, moveRowInArray, parseCsv, parseFilterInput, sniffDelimiter, summaryKey, summaryLabel, summaryTypeLabels, themeClassName } from '@kanunilabs/datagrid-core';
|
|
5
5
|
|
|
6
6
|
/** Formats an export menu can offer. */
|
|
7
7
|
type ExportKind = 'csv' | 'excel' | 'excel-selected' | 'pdf';
|
|
@@ -402,10 +402,16 @@ interface DataGridProps<TRow = GridRowData> extends Omit<DataGridCoreConfig<TRow
|
|
|
402
402
|
* is already dark and ignores the flag.
|
|
403
403
|
*
|
|
404
404
|
* Every colour, metric and border the stylesheet draws with is a `--dg-*`
|
|
405
|
-
* custom property, so a theme is a token override and nothing more
|
|
406
|
-
*
|
|
405
|
+
* custom property, so a theme is a token override and nothing more.
|
|
406
|
+
*
|
|
407
|
+
* YOUR OWN theme is a name here too: `theme="acme"` puts the class
|
|
408
|
+
* `kanuni-datagrid-theme-acme` on every surface a packaged theme reaches —
|
|
409
|
+
* the grid, the Enterprise wrapper and every popup and dialog — so tokens
|
|
410
|
+
* declared under `.kanuni-datagrid-theme-acme` restyle all of them. A custom
|
|
411
|
+
* theme has no row-height preset: set `rowHeight` (or `density`) with it.
|
|
412
|
+
* (`className` is not the channel for this: it lands on the grid root only.)
|
|
407
413
|
*/
|
|
408
|
-
theme?:
|
|
414
|
+
theme?: GridThemeName;
|
|
409
415
|
/**
|
|
410
416
|
* A colour scheme, on top of whatever `theme` decides about structure —
|
|
411
417
|
* `'nord'`, `'dracula'`, `'solarized'`, `'gruvbox'`, `'catppuccin'` or
|
|
@@ -443,8 +449,7 @@ interface DataGridProps<TRow = GridRowData> extends Omit<DataGridCoreConfig<TRow
|
|
|
443
449
|
filterDebounce?: number;
|
|
444
450
|
/**
|
|
445
451
|
* A bar under the footer stating the active filter in words, with a checkbox
|
|
446
|
-
* that suspends it and an `×` that removes it —
|
|
447
|
-
* panel.
|
|
452
|
+
* that suspends it and an `×` that removes it — a filter panel.
|
|
448
453
|
*
|
|
449
454
|
* `true` shows it only while something is filtered; `'always'` keeps it in
|
|
450
455
|
* place. It describes the FULL filter — the builder's conditions and every
|
|
@@ -743,7 +748,8 @@ interface DataGridProps<TRow = GridRowData> extends Omit<DataGridCoreConfig<TRow
|
|
|
743
748
|
* Community keeps: virtual scrolling at a million rows, worker offload,
|
|
744
749
|
* sorting, the column family, filtering, selection, pagination, single-level
|
|
745
750
|
* grouping, CSV export, themes, 12 locales and the whole event/imperative
|
|
746
|
-
* API. Boundary set with the user on 2026-08-14
|
|
751
|
+
* API. Boundary set with the user on 2026-08-14 to match how comparable
|
|
752
|
+
* grids draw this line.
|
|
747
753
|
*/
|
|
748
754
|
enterpriseEdition?: boolean;
|
|
749
755
|
/**
|
|
@@ -1608,7 +1614,7 @@ declare function writeClipboardText(text: string): void;
|
|
|
1608
1614
|
declare function buildCellMenuItems<TRow = GridRowData>(controller: DataGridController<TRow>, text: GridDictionary, option: boolean | CellMenuOptions | undefined, needsSeparator: boolean, onExportError?: (message: string) => void): GridMenuItem<RowMenuContext<TRow>>[];
|
|
1609
1615
|
|
|
1610
1616
|
interface GridSurfaceProviderProps {
|
|
1611
|
-
theme?:
|
|
1617
|
+
theme?: GridThemeName;
|
|
1612
1618
|
density?: GridDensity;
|
|
1613
1619
|
palette?: GridPalette;
|
|
1614
1620
|
children: ReactNode;
|