@kanunilabs/datagrid-react 1.8.1 → 1.8.2
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.cjs +3 -3
- package/dist/index.d.cts +42 -7
- package/dist/index.d.ts +42 -7
- package/dist/index.js +3 -3
- package/dist/styles.css +268 -1
- package/dist/themes/all.css +108 -0
- package/dist/themes/amber.css +3 -0
- package/dist/themes/aubergine.css +3 -0
- package/dist/themes/azure.css +3 -0
- package/dist/themes/burgundy.css +3 -0
- package/dist/themes/charcoal.css +3 -0
- package/dist/themes/contrast-dark.css +3 -0
- package/dist/themes/contrast-light.css +3 -0
- package/dist/themes/coral.css +3 -0
- package/dist/themes/corporate.css +3 -0
- package/dist/themes/deep-sea.css +3 -0
- package/dist/themes/editorial.css +3 -0
- package/dist/themes/ember.css +3 -0
- package/dist/themes/emerald.css +3 -0
- package/dist/themes/forest.css +3 -0
- package/dist/themes/glacier.css +3 -0
- package/dist/themes/graphite.css +3 -0
- package/dist/themes/indigo-night.css +3 -0
- package/dist/themes/indigo.css +3 -0
- package/dist/themes/ivory.css +3 -0
- package/dist/themes/lagoon.css +3 -0
- package/dist/themes/linen.css +3 -0
- package/dist/themes/midnight.css +3 -0
- package/dist/themes/mist.css +3 -0
- package/dist/themes/monochrome.css +3 -0
- package/dist/themes/onyx.css +3 -0
- package/dist/themes/orchid.css +3 -0
- package/dist/themes/porcelain.css +3 -0
- package/dist/themes/rose.css +3 -0
- package/dist/themes/sandstone.css +3 -0
- package/dist/themes/slate-night.css +3 -0
- package/dist/themes/slate.css +3 -0
- package/dist/themes/steel.css +3 -0
- package/dist/themes/stone.css +3 -0
- package/dist/themes/taupe.css +3 -0
- package/dist/themes/teal.css +3 -0
- package/dist/themes/terminal.css +3 -0
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, RefObject } from 'react';
|
|
3
|
-
import { GridRowData, DataGridController, GridDataType, RowKey, LookupItem, GridDictionary, StateStoringConfig, RowNode, GridColumnDef, DataGridCoreConfig, FilterRenderContextBase, FilterNode, InferColumnsOptions, GridThemeName, GridPaletteName, DescribeFilterOptions, GridDensity, CardViewOptions, EditMode, RowChange, ColumnRuntime, ColumnLayout, SortDescriptor, ColumnModel, DataRowNode, ColSpanPlan, SummaryDef, ToolbarIconName, ColumnState, BusyPhase, VirtualWindow, ChartBoxSpec, ChartBoxModel, ChartSpec, ChartModel, ChartXYSpec, ChartXYModel, CellRange, RangeSelectionEngine, ColumnSelectMode, EditingEngine, ValidationRule, CrudHandlers, EditingPermissions, NewRowPosition, RowEditSession, LookupMatchMode } from '@kanunilabs/datagrid-core';
|
|
3
|
+
import { GridRowData, DataGridController, GridDataType, RowKey, LookupItem, GridDictionary, StateStoringConfig, RowNode, GridColumnDef, DataGridCoreConfig, FilterRenderContextBase, FilterNode, InferColumnsOptions, GridThemeName, GridPaletteName, DescribeFilterOptions, GridDensity, CardViewOptions, EditMode, RowChange, RowStatusSource, ColumnRuntime, ColumnLayout, SortDescriptor, ColumnModel, RowSaveStatus, DataRowNode, ColSpanPlan, SummaryDef, ToolbarIconName, ColumnState, BusyPhase, VirtualWindow, ChartBoxSpec, ChartBoxModel, ChartSpec, ChartModel, ChartXYSpec, ChartXYModel, CellRange, RangeSelectionEngine, ColumnSelectMode, EditingEngine, ValidationRule, CrudHandlers, EditingPermissions, NewRowPosition, RowEditSession, LookupMatchMode } from '@kanunilabs/datagrid-core';
|
|
4
4
|
export { BusyChangedEvent, BusyPhase, ClientRowModel, ColumnLayout, ColumnLookup, ColumnModel, ColumnPin, ColumnRuntime, ColumnState, ColumnStateChangedEvent, ContentReadyEvent, CustomFilterOperator, CustomFilterOperatorId, DEFAULT_ROW_HEIGHT, DENSITY_ROW_HEIGHT, DataGridController, DataGridCoreConfig, DataRowNode, DataSource, FilterChangedEvent, FilterCondition, FilterGroupNode, FilterNode, FilterOperator, FocusedRowChangedEvent, GRID_COLOR_SCHEMES, GRID_PALETTES, GRID_THEMES, GridColorScheme, GridColumnDef, GridDataType, GridDensity, GridEventMap, GridPalette, GridPaletteName, 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. */
|
|
@@ -950,6 +950,12 @@ interface DataGridProps<TRow = GridRowData> extends Omit<DataGridCoreConfig<TRow
|
|
|
950
950
|
renderCellContent?: (ctx: CellSlotContext<TRow>) => ReactNode | undefined;
|
|
951
951
|
/** Extra class names per cell (dirty marker, range highlight, invalid). */
|
|
952
952
|
getCellClassName?: (ctx: CellSlotContext<TRow>) => string | undefined;
|
|
953
|
+
/**
|
|
954
|
+
* Where `rowStatus` reads each row's save state — `EnterpriseDataGrid`'s
|
|
955
|
+
* editing engine. With this grid's own `editing` on, its engine answers and
|
|
956
|
+
* this is not asked.
|
|
957
|
+
*/
|
|
958
|
+
rowStatusSource?: RowStatusSource | null;
|
|
953
959
|
/** Absolutely-positioned layer over the viewport (fill handle, watermark). */
|
|
954
960
|
renderOverlay?: () => ReactNode;
|
|
955
961
|
/** Pointer down on a cell, with the view coordinates the range engine needs. */
|
|
@@ -1037,6 +1043,8 @@ interface GridHeaderProps<TRow = GridRowData> {
|
|
|
1037
1043
|
/** Leading expander column for master-detail (Enterprise). */
|
|
1038
1044
|
detailColumn?: boolean;
|
|
1039
1045
|
/** Leading row-number column (gap analysis P3.5). */
|
|
1046
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1047
|
+
statusColumn?: boolean;
|
|
1040
1048
|
rowNumberColumn?: boolean;
|
|
1041
1049
|
/** What the row-number column's header shows. Defaults to `#`. */
|
|
1042
1050
|
rowNumberHeader?: React.ReactNode;
|
|
@@ -1084,7 +1092,7 @@ interface GridHeaderProps<TRow = GridRowData> {
|
|
|
1084
1092
|
/** Replace a header's label (the Enterprise rename box, G-CORE-06). Undefined = the label. */
|
|
1085
1093
|
renderHeaderLabel?: (columnId: string) => React.ReactNode | undefined;
|
|
1086
1094
|
}
|
|
1087
|
-
declare function GridHeaderImpl<TRow = GridRowData>({ bandOffset, stickyInsets, layout, centerColumns, leadingSpacer, trailingSpacer, sort, sortable, onSort, headerFilter, filteredColumns, onOpenFilter, filterIconMode, checkboxColumn, detailColumn, rowNumberColumn, rowNumberHeader, selectAllState, selectAllDisabled, onToggleSelectAll, draggable, reorderable, onReorder, resizable, onResize, onAutoFit, onHeaderContextMenu, groupLevels, onHeaderClick, getHeaderClassName, renderHeaderLabel, }: GridHeaderProps<TRow>): react.JSX.Element;
|
|
1095
|
+
declare function GridHeaderImpl<TRow = GridRowData>({ bandOffset, stickyInsets, layout, centerColumns, leadingSpacer, trailingSpacer, sort, sortable, onSort, headerFilter, filteredColumns, onOpenFilter, filterIconMode, checkboxColumn, detailColumn, statusColumn, rowNumberColumn, rowNumberHeader, selectAllState, selectAllDisabled, onToggleSelectAll, draggable, reorderable, onReorder, resizable, onResize, onAutoFit, onHeaderContextMenu, groupLevels, onHeaderClick, getHeaderClassName, renderHeaderLabel, }: GridHeaderProps<TRow>): react.JSX.Element;
|
|
1088
1096
|
declare const GridHeader: typeof GridHeaderImpl;
|
|
1089
1097
|
|
|
1090
1098
|
/**
|
|
@@ -1104,6 +1112,8 @@ interface GridHeaderBandsProps<TRow = GridRowData> {
|
|
|
1104
1112
|
checkboxColumn?: boolean;
|
|
1105
1113
|
detailColumn?: boolean;
|
|
1106
1114
|
/** Leading row-number column (gap analysis P3.5). */
|
|
1115
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1116
|
+
statusColumn?: boolean;
|
|
1107
1117
|
rowNumberColumn?: boolean;
|
|
1108
1118
|
/** Height of one band row, in px. Defaults to `BAND_ROW_HEIGHT`. */
|
|
1109
1119
|
rowHeight?: number;
|
|
@@ -1123,7 +1133,7 @@ interface GridHeaderBandsProps<TRow = GridRowData> {
|
|
|
1123
1133
|
};
|
|
1124
1134
|
};
|
|
1125
1135
|
}
|
|
1126
|
-
declare function GridHeaderBandsImpl<TRow = GridRowData>({ layout, centerColumns, leadingSpacer, trailingSpacer, depth, checkboxColumn, detailColumn, rowNumberColumn, rowHeight, bandFold, }: GridHeaderBandsProps<TRow>): react.JSX.Element | null;
|
|
1136
|
+
declare function GridHeaderBandsImpl<TRow = GridRowData>({ layout, centerColumns, leadingSpacer, trailingSpacer, depth, checkboxColumn, detailColumn, statusColumn, rowNumberColumn, rowHeight, bandFold, }: GridHeaderBandsProps<TRow>): react.JSX.Element | null;
|
|
1127
1137
|
declare const GridHeaderBands: typeof GridHeaderBandsImpl;
|
|
1128
1138
|
|
|
1129
1139
|
interface GridRowProps<TRow = GridRowData> {
|
|
@@ -1199,6 +1209,19 @@ interface GridRowProps<TRow = GridRowData> {
|
|
|
1199
1209
|
rowDrag?: RowDragHandlers;
|
|
1200
1210
|
/** Which edge to draw the drop line on, or null. */
|
|
1201
1211
|
dropSide?: 'before' | 'after' | null;
|
|
1212
|
+
/**
|
|
1213
|
+
* `rowStatus.messages`: the content of a message row (a refused save's
|
|
1214
|
+
* reason and its buttons), for the parent row's key.
|
|
1215
|
+
*/
|
|
1216
|
+
renderRowMessage?: (rowKey: RowKey, row: TRow) => React.ReactNode;
|
|
1217
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1218
|
+
statusColumn?: boolean;
|
|
1219
|
+
/** `rowStatus`: this row's save state, when it has one. */
|
|
1220
|
+
rowStatus?: RowSaveStatus;
|
|
1221
|
+
/** The words a screen reader hears for `rowStatus` (`aria-description`). */
|
|
1222
|
+
rowStatusText?: string;
|
|
1223
|
+
/** `rowStatus.tint`: wash the whole row, not only the marker. */
|
|
1224
|
+
rowStatusTint?: boolean;
|
|
1202
1225
|
/** Renders the leading checkbox cell. */
|
|
1203
1226
|
checkboxColumn: boolean;
|
|
1204
1227
|
/** Renders the leading row-number cell (gap analysis P3.5). */
|
|
@@ -1326,7 +1349,7 @@ interface GridRowProps<TRow = GridRowData> {
|
|
|
1326
1349
|
onCellPointerEnter?: (ctx: CellSlotContext<TRow>, event: React.MouseEvent) => void;
|
|
1327
1350
|
onCellDoubleClick?: (ctx: CellSlotContext<TRow>) => void;
|
|
1328
1351
|
}
|
|
1329
|
-
declare function GridRowImpl<TRow = GridRowData>({ gridId, node, index, layout, columnModel, centerColumns, centerIndices, stickyInsets, leadingSpacer, trailingSpacer, striped, selected, ariaSelectable, selectable, groupSelection, onToggleGroupSelect, groupDisplay, focusedColumnId, rowFocused, renderRow, checkboxColumn, rowNumberColumn, rowNumber, getNote, getSpan, resolveColSpans, findKind, headerRowCount, onRowClick, onRowMouseDown, onRowDoubleClick, onToggleSelect, onCellMouseDown, onRowContextMenu, searchNeedle, onToggleGroup, summaryDefs, detailColumn, detailExpanded, onToggleDetail, onToggleTreeRow, renderDetail, renderEditForm, renderCellContent, getCellClassName, onCellPointerDown, onCellPointerEnter, onCellDoubleClick, rowDrag, dropSide, height, }: GridRowProps<TRow>): react.JSX.Element | null;
|
|
1352
|
+
declare function GridRowImpl<TRow = GridRowData>({ gridId, node, index, layout, columnModel, centerColumns, centerIndices, stickyInsets, leadingSpacer, trailingSpacer, striped, selected, ariaSelectable, selectable, groupSelection, onToggleGroupSelect, groupDisplay, focusedColumnId, rowFocused, renderRow, checkboxColumn, statusColumn, rowNumberColumn, rowNumber, getNote, getSpan, resolveColSpans, findKind, headerRowCount, onRowClick, onRowMouseDown, onRowDoubleClick, onToggleSelect, onCellMouseDown, onRowContextMenu, searchNeedle, onToggleGroup, summaryDefs, detailColumn, detailExpanded, onToggleDetail, onToggleTreeRow, renderDetail, renderEditForm, renderRowMessage, renderCellContent, getCellClassName, onCellPointerDown, onCellPointerEnter, onCellDoubleClick, rowDrag, dropSide, rowStatus, rowStatusText, rowStatusTint, height, }: GridRowProps<TRow>): react.JSX.Element | null;
|
|
1330
1353
|
declare const GridRow: typeof GridRowImpl;
|
|
1331
1354
|
|
|
1332
1355
|
interface GridFilterRowProps<TRow = GridRowData> {
|
|
@@ -1353,6 +1376,8 @@ interface GridFilterRowProps<TRow = GridRowData> {
|
|
|
1353
1376
|
checkboxColumn?: boolean;
|
|
1354
1377
|
detailColumn?: boolean;
|
|
1355
1378
|
/** Leading row-number column (gap analysis P3.5). */
|
|
1379
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1380
|
+
statusColumn?: boolean;
|
|
1356
1381
|
rowNumberColumn?: boolean;
|
|
1357
1382
|
placeholder?: string;
|
|
1358
1383
|
onChange: (columnId: string, raw: string) => void;
|
|
@@ -1417,7 +1442,7 @@ interface FilterInputSyncProbe {
|
|
|
1417
1442
|
* re-render entirely.
|
|
1418
1443
|
*/
|
|
1419
1444
|
declare function reconcileFilterInputs(prev: Record<string, string>, probe: FilterInputSyncProbe, columnIds?: readonly string[]): Record<string, string>;
|
|
1420
|
-
declare function GridFilterRowImpl<TRow = GridRowData>({ bandOffset, stickyInsets, layout, centerColumns, leadingSpacer, trailingSpacer, values, checkboxColumn, detailColumn, rowNumberColumn, placeholder, onChange, onCommit, periodSuggestions, periodListId, operators, onOperatorChange, renderCustom, }: GridFilterRowProps<TRow>): react.JSX.Element;
|
|
1445
|
+
declare function GridFilterRowImpl<TRow = GridRowData>({ bandOffset, stickyInsets, layout, centerColumns, leadingSpacer, trailingSpacer, values, checkboxColumn, detailColumn, statusColumn, rowNumberColumn, placeholder, onChange, onCommit, periodSuggestions, periodListId, operators, onOperatorChange, renderCustom, }: GridFilterRowProps<TRow>): react.JSX.Element;
|
|
1421
1446
|
declare const GridFilterRow: typeof GridFilterRowImpl;
|
|
1422
1447
|
|
|
1423
1448
|
interface DistinctEntry {
|
|
@@ -1530,6 +1555,8 @@ interface GridFooterRowProps<TRow = GridRowData> {
|
|
|
1530
1555
|
checkboxColumn?: boolean;
|
|
1531
1556
|
detailColumn?: boolean;
|
|
1532
1557
|
/** Leading row-number column (gap analysis P3.5). */
|
|
1558
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1559
|
+
statusColumn?: boolean;
|
|
1533
1560
|
rowNumberColumn?: boolean;
|
|
1534
1561
|
/** Opens the aggregation menu for a column. */
|
|
1535
1562
|
onPickSummary?: (columnId: string, event: React.MouseEvent) => void;
|
|
@@ -1546,7 +1573,7 @@ interface GridFooterRowProps<TRow = GridRowData> {
|
|
|
1546
1573
|
/** Header-height rows between this row and its edge. See GridPinnedRows. */
|
|
1547
1574
|
headerRowsBetween?: number;
|
|
1548
1575
|
}
|
|
1549
|
-
declare function GridFooterRowImpl<TRow = GridRowData>({ layout, centerColumns, leadingSpacer, trailingSpacer, defs, values, checkboxColumn, detailColumn, rowNumberColumn, onPickSummary, emptyHint, position, bandOffset, headerRowsBetween, }: GridFooterRowProps<TRow>): react.JSX.Element;
|
|
1576
|
+
declare function GridFooterRowImpl<TRow = GridRowData>({ layout, centerColumns, leadingSpacer, trailingSpacer, defs, values, checkboxColumn, detailColumn, statusColumn, rowNumberColumn, onPickSummary, emptyHint, position, bandOffset, headerRowsBetween, }: GridFooterRowProps<TRow>): react.JSX.Element;
|
|
1550
1577
|
declare const GridFooterRow: typeof GridFooterRowImpl;
|
|
1551
1578
|
|
|
1552
1579
|
interface GridFilterPanelProps<TRow = GridRowData> {
|
|
@@ -1884,6 +1911,8 @@ interface GridPinnedRowsProps<TRow = GridRowData> {
|
|
|
1884
1911
|
checkboxColumn?: boolean;
|
|
1885
1912
|
detailColumn?: boolean;
|
|
1886
1913
|
/** Leading row-number column (gap analysis P3.5). */
|
|
1914
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1915
|
+
statusColumn?: boolean;
|
|
1887
1916
|
rowNumberColumn?: boolean;
|
|
1888
1917
|
rowHeight: number;
|
|
1889
1918
|
/** Pixels of BAND rows above. Zero on a grid without column bands. */
|
|
@@ -1908,7 +1937,7 @@ interface GridPinnedRowsProps<TRow = GridRowData> {
|
|
|
1908
1937
|
*/
|
|
1909
1938
|
ariaRowBase: number;
|
|
1910
1939
|
}
|
|
1911
|
-
declare function GridPinnedRowsImpl<TRow = GridRowData>({ gridId, side, rows, rowKeys, onUserRowContextMenu, layout, columnModel, centerColumns, centerIndices, stickyInsets, leadingSpacer, trailingSpacer, checkboxColumn, detailColumn, rowNumberColumn, rowHeight, bandOffset, headerRowsBetween, ariaRowBase, }: GridPinnedRowsProps<TRow>): react.JSX.Element | null;
|
|
1940
|
+
declare function GridPinnedRowsImpl<TRow = GridRowData>({ gridId, side, rows, rowKeys, onUserRowContextMenu, layout, columnModel, centerColumns, centerIndices, stickyInsets, leadingSpacer, trailingSpacer, checkboxColumn, detailColumn, statusColumn, rowNumberColumn, rowHeight, bandOffset, headerRowsBetween, ariaRowBase, }: GridPinnedRowsProps<TRow>): react.JSX.Element | null;
|
|
1912
1941
|
declare const GridPinnedRows: typeof GridPinnedRowsImpl;
|
|
1913
1942
|
|
|
1914
1943
|
type UseDataGridOptions<TRow = GridRowData> = DataGridCoreConfig<TRow>;
|
|
@@ -2052,6 +2081,12 @@ interface UseGridEditingOptions<TRow = GridRowData> {
|
|
|
2052
2081
|
confirmDeleteMessage?: string;
|
|
2053
2082
|
/** Disables editing entirely (`editing={{ enabled: false }}`). */
|
|
2054
2083
|
enabled?: boolean;
|
|
2084
|
+
/**
|
|
2085
|
+
* How long a row reads `'saved'` after its save (`engine.getRowStatus`),
|
|
2086
|
+
* in ms; 0 never shows it. Left out, the engine's default (1500) stays.
|
|
2087
|
+
* The grids pass `rowStatus.savedDuration`, or 0 when `rowStatus` is off.
|
|
2088
|
+
*/
|
|
2089
|
+
savedDuration?: number;
|
|
2055
2090
|
/**
|
|
2056
2091
|
* `editing.range` — the rectangle, the fill handle and the clipboard
|
|
2057
2092
|
* gestures (cut / paste). Default true. Off means Ctrl+X and Ctrl+V are left
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, RefObject } from 'react';
|
|
3
|
-
import { GridRowData, DataGridController, GridDataType, RowKey, LookupItem, GridDictionary, StateStoringConfig, RowNode, GridColumnDef, DataGridCoreConfig, FilterRenderContextBase, FilterNode, InferColumnsOptions, GridThemeName, GridPaletteName, DescribeFilterOptions, GridDensity, CardViewOptions, EditMode, RowChange, ColumnRuntime, ColumnLayout, SortDescriptor, ColumnModel, DataRowNode, ColSpanPlan, SummaryDef, ToolbarIconName, ColumnState, BusyPhase, VirtualWindow, ChartBoxSpec, ChartBoxModel, ChartSpec, ChartModel, ChartXYSpec, ChartXYModel, CellRange, RangeSelectionEngine, ColumnSelectMode, EditingEngine, ValidationRule, CrudHandlers, EditingPermissions, NewRowPosition, RowEditSession, LookupMatchMode } from '@kanunilabs/datagrid-core';
|
|
3
|
+
import { GridRowData, DataGridController, GridDataType, RowKey, LookupItem, GridDictionary, StateStoringConfig, RowNode, GridColumnDef, DataGridCoreConfig, FilterRenderContextBase, FilterNode, InferColumnsOptions, GridThemeName, GridPaletteName, DescribeFilterOptions, GridDensity, CardViewOptions, EditMode, RowChange, RowStatusSource, ColumnRuntime, ColumnLayout, SortDescriptor, ColumnModel, RowSaveStatus, DataRowNode, ColSpanPlan, SummaryDef, ToolbarIconName, ColumnState, BusyPhase, VirtualWindow, ChartBoxSpec, ChartBoxModel, ChartSpec, ChartModel, ChartXYSpec, ChartXYModel, CellRange, RangeSelectionEngine, ColumnSelectMode, EditingEngine, ValidationRule, CrudHandlers, EditingPermissions, NewRowPosition, RowEditSession, LookupMatchMode } from '@kanunilabs/datagrid-core';
|
|
4
4
|
export { BusyChangedEvent, BusyPhase, ClientRowModel, ColumnLayout, ColumnLookup, ColumnModel, ColumnPin, ColumnRuntime, ColumnState, ColumnStateChangedEvent, ContentReadyEvent, CustomFilterOperator, CustomFilterOperatorId, DEFAULT_ROW_HEIGHT, DENSITY_ROW_HEIGHT, DataGridController, DataGridCoreConfig, DataRowNode, DataSource, FilterChangedEvent, FilterCondition, FilterGroupNode, FilterNode, FilterOperator, FocusedRowChangedEvent, GRID_COLOR_SCHEMES, GRID_PALETTES, GRID_THEMES, GridColorScheme, GridColumnDef, GridDataType, GridDensity, GridEventMap, GridPalette, GridPaletteName, 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. */
|
|
@@ -950,6 +950,12 @@ interface DataGridProps<TRow = GridRowData> extends Omit<DataGridCoreConfig<TRow
|
|
|
950
950
|
renderCellContent?: (ctx: CellSlotContext<TRow>) => ReactNode | undefined;
|
|
951
951
|
/** Extra class names per cell (dirty marker, range highlight, invalid). */
|
|
952
952
|
getCellClassName?: (ctx: CellSlotContext<TRow>) => string | undefined;
|
|
953
|
+
/**
|
|
954
|
+
* Where `rowStatus` reads each row's save state — `EnterpriseDataGrid`'s
|
|
955
|
+
* editing engine. With this grid's own `editing` on, its engine answers and
|
|
956
|
+
* this is not asked.
|
|
957
|
+
*/
|
|
958
|
+
rowStatusSource?: RowStatusSource | null;
|
|
953
959
|
/** Absolutely-positioned layer over the viewport (fill handle, watermark). */
|
|
954
960
|
renderOverlay?: () => ReactNode;
|
|
955
961
|
/** Pointer down on a cell, with the view coordinates the range engine needs. */
|
|
@@ -1037,6 +1043,8 @@ interface GridHeaderProps<TRow = GridRowData> {
|
|
|
1037
1043
|
/** Leading expander column for master-detail (Enterprise). */
|
|
1038
1044
|
detailColumn?: boolean;
|
|
1039
1045
|
/** Leading row-number column (gap analysis P3.5). */
|
|
1046
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1047
|
+
statusColumn?: boolean;
|
|
1040
1048
|
rowNumberColumn?: boolean;
|
|
1041
1049
|
/** What the row-number column's header shows. Defaults to `#`. */
|
|
1042
1050
|
rowNumberHeader?: React.ReactNode;
|
|
@@ -1084,7 +1092,7 @@ interface GridHeaderProps<TRow = GridRowData> {
|
|
|
1084
1092
|
/** Replace a header's label (the Enterprise rename box, G-CORE-06). Undefined = the label. */
|
|
1085
1093
|
renderHeaderLabel?: (columnId: string) => React.ReactNode | undefined;
|
|
1086
1094
|
}
|
|
1087
|
-
declare function GridHeaderImpl<TRow = GridRowData>({ bandOffset, stickyInsets, layout, centerColumns, leadingSpacer, trailingSpacer, sort, sortable, onSort, headerFilter, filteredColumns, onOpenFilter, filterIconMode, checkboxColumn, detailColumn, rowNumberColumn, rowNumberHeader, selectAllState, selectAllDisabled, onToggleSelectAll, draggable, reorderable, onReorder, resizable, onResize, onAutoFit, onHeaderContextMenu, groupLevels, onHeaderClick, getHeaderClassName, renderHeaderLabel, }: GridHeaderProps<TRow>): react.JSX.Element;
|
|
1095
|
+
declare function GridHeaderImpl<TRow = GridRowData>({ bandOffset, stickyInsets, layout, centerColumns, leadingSpacer, trailingSpacer, sort, sortable, onSort, headerFilter, filteredColumns, onOpenFilter, filterIconMode, checkboxColumn, detailColumn, statusColumn, rowNumberColumn, rowNumberHeader, selectAllState, selectAllDisabled, onToggleSelectAll, draggable, reorderable, onReorder, resizable, onResize, onAutoFit, onHeaderContextMenu, groupLevels, onHeaderClick, getHeaderClassName, renderHeaderLabel, }: GridHeaderProps<TRow>): react.JSX.Element;
|
|
1088
1096
|
declare const GridHeader: typeof GridHeaderImpl;
|
|
1089
1097
|
|
|
1090
1098
|
/**
|
|
@@ -1104,6 +1112,8 @@ interface GridHeaderBandsProps<TRow = GridRowData> {
|
|
|
1104
1112
|
checkboxColumn?: boolean;
|
|
1105
1113
|
detailColumn?: boolean;
|
|
1106
1114
|
/** Leading row-number column (gap analysis P3.5). */
|
|
1115
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1116
|
+
statusColumn?: boolean;
|
|
1107
1117
|
rowNumberColumn?: boolean;
|
|
1108
1118
|
/** Height of one band row, in px. Defaults to `BAND_ROW_HEIGHT`. */
|
|
1109
1119
|
rowHeight?: number;
|
|
@@ -1123,7 +1133,7 @@ interface GridHeaderBandsProps<TRow = GridRowData> {
|
|
|
1123
1133
|
};
|
|
1124
1134
|
};
|
|
1125
1135
|
}
|
|
1126
|
-
declare function GridHeaderBandsImpl<TRow = GridRowData>({ layout, centerColumns, leadingSpacer, trailingSpacer, depth, checkboxColumn, detailColumn, rowNumberColumn, rowHeight, bandFold, }: GridHeaderBandsProps<TRow>): react.JSX.Element | null;
|
|
1136
|
+
declare function GridHeaderBandsImpl<TRow = GridRowData>({ layout, centerColumns, leadingSpacer, trailingSpacer, depth, checkboxColumn, detailColumn, statusColumn, rowNumberColumn, rowHeight, bandFold, }: GridHeaderBandsProps<TRow>): react.JSX.Element | null;
|
|
1127
1137
|
declare const GridHeaderBands: typeof GridHeaderBandsImpl;
|
|
1128
1138
|
|
|
1129
1139
|
interface GridRowProps<TRow = GridRowData> {
|
|
@@ -1199,6 +1209,19 @@ interface GridRowProps<TRow = GridRowData> {
|
|
|
1199
1209
|
rowDrag?: RowDragHandlers;
|
|
1200
1210
|
/** Which edge to draw the drop line on, or null. */
|
|
1201
1211
|
dropSide?: 'before' | 'after' | null;
|
|
1212
|
+
/**
|
|
1213
|
+
* `rowStatus.messages`: the content of a message row (a refused save's
|
|
1214
|
+
* reason and its buttons), for the parent row's key.
|
|
1215
|
+
*/
|
|
1216
|
+
renderRowMessage?: (rowKey: RowKey, row: TRow) => React.ReactNode;
|
|
1217
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1218
|
+
statusColumn?: boolean;
|
|
1219
|
+
/** `rowStatus`: this row's save state, when it has one. */
|
|
1220
|
+
rowStatus?: RowSaveStatus;
|
|
1221
|
+
/** The words a screen reader hears for `rowStatus` (`aria-description`). */
|
|
1222
|
+
rowStatusText?: string;
|
|
1223
|
+
/** `rowStatus.tint`: wash the whole row, not only the marker. */
|
|
1224
|
+
rowStatusTint?: boolean;
|
|
1202
1225
|
/** Renders the leading checkbox cell. */
|
|
1203
1226
|
checkboxColumn: boolean;
|
|
1204
1227
|
/** Renders the leading row-number cell (gap analysis P3.5). */
|
|
@@ -1326,7 +1349,7 @@ interface GridRowProps<TRow = GridRowData> {
|
|
|
1326
1349
|
onCellPointerEnter?: (ctx: CellSlotContext<TRow>, event: React.MouseEvent) => void;
|
|
1327
1350
|
onCellDoubleClick?: (ctx: CellSlotContext<TRow>) => void;
|
|
1328
1351
|
}
|
|
1329
|
-
declare function GridRowImpl<TRow = GridRowData>({ gridId, node, index, layout, columnModel, centerColumns, centerIndices, stickyInsets, leadingSpacer, trailingSpacer, striped, selected, ariaSelectable, selectable, groupSelection, onToggleGroupSelect, groupDisplay, focusedColumnId, rowFocused, renderRow, checkboxColumn, rowNumberColumn, rowNumber, getNote, getSpan, resolveColSpans, findKind, headerRowCount, onRowClick, onRowMouseDown, onRowDoubleClick, onToggleSelect, onCellMouseDown, onRowContextMenu, searchNeedle, onToggleGroup, summaryDefs, detailColumn, detailExpanded, onToggleDetail, onToggleTreeRow, renderDetail, renderEditForm, renderCellContent, getCellClassName, onCellPointerDown, onCellPointerEnter, onCellDoubleClick, rowDrag, dropSide, height, }: GridRowProps<TRow>): react.JSX.Element | null;
|
|
1352
|
+
declare function GridRowImpl<TRow = GridRowData>({ gridId, node, index, layout, columnModel, centerColumns, centerIndices, stickyInsets, leadingSpacer, trailingSpacer, striped, selected, ariaSelectable, selectable, groupSelection, onToggleGroupSelect, groupDisplay, focusedColumnId, rowFocused, renderRow, checkboxColumn, statusColumn, rowNumberColumn, rowNumber, getNote, getSpan, resolveColSpans, findKind, headerRowCount, onRowClick, onRowMouseDown, onRowDoubleClick, onToggleSelect, onCellMouseDown, onRowContextMenu, searchNeedle, onToggleGroup, summaryDefs, detailColumn, detailExpanded, onToggleDetail, onToggleTreeRow, renderDetail, renderEditForm, renderRowMessage, renderCellContent, getCellClassName, onCellPointerDown, onCellPointerEnter, onCellDoubleClick, rowDrag, dropSide, rowStatus, rowStatusText, rowStatusTint, height, }: GridRowProps<TRow>): react.JSX.Element | null;
|
|
1330
1353
|
declare const GridRow: typeof GridRowImpl;
|
|
1331
1354
|
|
|
1332
1355
|
interface GridFilterRowProps<TRow = GridRowData> {
|
|
@@ -1353,6 +1376,8 @@ interface GridFilterRowProps<TRow = GridRowData> {
|
|
|
1353
1376
|
checkboxColumn?: boolean;
|
|
1354
1377
|
detailColumn?: boolean;
|
|
1355
1378
|
/** Leading row-number column (gap analysis P3.5). */
|
|
1379
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1380
|
+
statusColumn?: boolean;
|
|
1356
1381
|
rowNumberColumn?: boolean;
|
|
1357
1382
|
placeholder?: string;
|
|
1358
1383
|
onChange: (columnId: string, raw: string) => void;
|
|
@@ -1417,7 +1442,7 @@ interface FilterInputSyncProbe {
|
|
|
1417
1442
|
* re-render entirely.
|
|
1418
1443
|
*/
|
|
1419
1444
|
declare function reconcileFilterInputs(prev: Record<string, string>, probe: FilterInputSyncProbe, columnIds?: readonly string[]): Record<string, string>;
|
|
1420
|
-
declare function GridFilterRowImpl<TRow = GridRowData>({ bandOffset, stickyInsets, layout, centerColumns, leadingSpacer, trailingSpacer, values, checkboxColumn, detailColumn, rowNumberColumn, placeholder, onChange, onCommit, periodSuggestions, periodListId, operators, onOperatorChange, renderCustom, }: GridFilterRowProps<TRow>): react.JSX.Element;
|
|
1445
|
+
declare function GridFilterRowImpl<TRow = GridRowData>({ bandOffset, stickyInsets, layout, centerColumns, leadingSpacer, trailingSpacer, values, checkboxColumn, detailColumn, statusColumn, rowNumberColumn, placeholder, onChange, onCommit, periodSuggestions, periodListId, operators, onOperatorChange, renderCustom, }: GridFilterRowProps<TRow>): react.JSX.Element;
|
|
1421
1446
|
declare const GridFilterRow: typeof GridFilterRowImpl;
|
|
1422
1447
|
|
|
1423
1448
|
interface DistinctEntry {
|
|
@@ -1530,6 +1555,8 @@ interface GridFooterRowProps<TRow = GridRowData> {
|
|
|
1530
1555
|
checkboxColumn?: boolean;
|
|
1531
1556
|
detailColumn?: boolean;
|
|
1532
1557
|
/** Leading row-number column (gap analysis P3.5). */
|
|
1558
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1559
|
+
statusColumn?: boolean;
|
|
1533
1560
|
rowNumberColumn?: boolean;
|
|
1534
1561
|
/** Opens the aggregation menu for a column. */
|
|
1535
1562
|
onPickSummary?: (columnId: string, event: React.MouseEvent) => void;
|
|
@@ -1546,7 +1573,7 @@ interface GridFooterRowProps<TRow = GridRowData> {
|
|
|
1546
1573
|
/** Header-height rows between this row and its edge. See GridPinnedRows. */
|
|
1547
1574
|
headerRowsBetween?: number;
|
|
1548
1575
|
}
|
|
1549
|
-
declare function GridFooterRowImpl<TRow = GridRowData>({ layout, centerColumns, leadingSpacer, trailingSpacer, defs, values, checkboxColumn, detailColumn, rowNumberColumn, onPickSummary, emptyHint, position, bandOffset, headerRowsBetween, }: GridFooterRowProps<TRow>): react.JSX.Element;
|
|
1576
|
+
declare function GridFooterRowImpl<TRow = GridRowData>({ layout, centerColumns, leadingSpacer, trailingSpacer, defs, values, checkboxColumn, detailColumn, statusColumn, rowNumberColumn, onPickSummary, emptyHint, position, bandOffset, headerRowsBetween, }: GridFooterRowProps<TRow>): react.JSX.Element;
|
|
1550
1577
|
declare const GridFooterRow: typeof GridFooterRowImpl;
|
|
1551
1578
|
|
|
1552
1579
|
interface GridFilterPanelProps<TRow = GridRowData> {
|
|
@@ -1884,6 +1911,8 @@ interface GridPinnedRowsProps<TRow = GridRowData> {
|
|
|
1884
1911
|
checkboxColumn?: boolean;
|
|
1885
1912
|
detailColumn?: boolean;
|
|
1886
1913
|
/** Leading row-number column (gap analysis P3.5). */
|
|
1914
|
+
/** `rowStatus.icons`: the leading status column is showing. */
|
|
1915
|
+
statusColumn?: boolean;
|
|
1887
1916
|
rowNumberColumn?: boolean;
|
|
1888
1917
|
rowHeight: number;
|
|
1889
1918
|
/** Pixels of BAND rows above. Zero on a grid without column bands. */
|
|
@@ -1908,7 +1937,7 @@ interface GridPinnedRowsProps<TRow = GridRowData> {
|
|
|
1908
1937
|
*/
|
|
1909
1938
|
ariaRowBase: number;
|
|
1910
1939
|
}
|
|
1911
|
-
declare function GridPinnedRowsImpl<TRow = GridRowData>({ gridId, side, rows, rowKeys, onUserRowContextMenu, layout, columnModel, centerColumns, centerIndices, stickyInsets, leadingSpacer, trailingSpacer, checkboxColumn, detailColumn, rowNumberColumn, rowHeight, bandOffset, headerRowsBetween, ariaRowBase, }: GridPinnedRowsProps<TRow>): react.JSX.Element | null;
|
|
1940
|
+
declare function GridPinnedRowsImpl<TRow = GridRowData>({ gridId, side, rows, rowKeys, onUserRowContextMenu, layout, columnModel, centerColumns, centerIndices, stickyInsets, leadingSpacer, trailingSpacer, checkboxColumn, detailColumn, statusColumn, rowNumberColumn, rowHeight, bandOffset, headerRowsBetween, ariaRowBase, }: GridPinnedRowsProps<TRow>): react.JSX.Element | null;
|
|
1912
1941
|
declare const GridPinnedRows: typeof GridPinnedRowsImpl;
|
|
1913
1942
|
|
|
1914
1943
|
type UseDataGridOptions<TRow = GridRowData> = DataGridCoreConfig<TRow>;
|
|
@@ -2052,6 +2081,12 @@ interface UseGridEditingOptions<TRow = GridRowData> {
|
|
|
2052
2081
|
confirmDeleteMessage?: string;
|
|
2053
2082
|
/** Disables editing entirely (`editing={{ enabled: false }}`). */
|
|
2054
2083
|
enabled?: boolean;
|
|
2084
|
+
/**
|
|
2085
|
+
* How long a row reads `'saved'` after its save (`engine.getRowStatus`),
|
|
2086
|
+
* in ms; 0 never shows it. Left out, the engine's default (1500) stays.
|
|
2087
|
+
* The grids pass `rowStatus.savedDuration`, or 0 when `rowStatus` is off.
|
|
2088
|
+
*/
|
|
2089
|
+
savedDuration?: number;
|
|
2055
2090
|
/**
|
|
2056
2091
|
* `editing.range` — the rectangle, the fill handle and the clipboard
|
|
2057
2092
|
* gestures (cut / paste). Default true. Off means Ctrl+X and Ctrl+V are left
|