@kanunilabs/datagrid-react 1.8.10 → 1.8.12

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.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { RefObject, ReactNode, FocusEvent, MouseEvent } from 'react';
3
- import { GridRowData, DataGridController, GridDataType, RowKey, LookupItem, GridDictionary, StateStoringConfig, RowNode, DataRowNode, CardField, RowSaveStatus, GridColumnDef, DataGridCoreConfig, FilterRenderContextBase, FilterNode, InferColumnsOptions, GridThemeName, GridPaletteName, DescribeFilterOptions, GridDensity, ToolbarOptions, PortalContainer, CardViewOptions, EditMode, RowChange, RowStatusSource, ColumnRuntime, ColumnLayout, SortDescriptor, ColumnLookup, ColumnModel, ColSpanPlan, SummaryDef, RemoteDistinctList, PortalKind, ToolbarSearchOptions, ToolbarIconName, ColumnState, BusyPhase, VirtualWindow, ChartBoxSpec, ChartBoxModel, ChartSpec, ChartModel, ChartXYSpec, ChartXYModel, CellRange, RangeSelectionEngine, ColumnSelectMode, EditingEngine, EditingApi, NewRowPosition, ValidationRule, CrudHandlers, EditingPermissions, CommitOn, RowEditSession, ColumnNumberFormat, LookupMatchMode, LookupMatchFold } from '@kanunilabs/datagrid-core';
3
+ import { GridRowData, DataGridController, GridDataType, RowKey, LookupItem, GridDictionary, StateStoringConfig, RowNode, DataRowNode, CardField, RowSaveStatus, GridColumnDef, DataGridCoreConfig, FilterRenderContextBase, FilterNode, InferColumnsOptions, GridThemeName, GridPaletteName, DescribeFilterOptions, GridDensity, ToolbarOptions, PortalContainer, CardViewOptions, EditMode, RowChange, RowStatusSource, ColumnRuntime, ColumnLayout, SortDescriptor, ColumnLookup, ColumnModel, ColSpanPlan, LookupMatchFold, SummaryDef, RemoteDistinctList, PortalKind, ToolbarSearchOptions, ToolbarIconName, ColumnState, BusyPhase, VirtualWindow, ChartBoxSpec, ChartBoxModel, ChartSpec, ChartModel, ChartXYSpec, ChartXYModel, CellRange, RangeSelectionEngine, ColumnSelectMode, EditingEngine, EditingApi, NewRowPosition, ValidationRule, CrudHandlers, EditingPermissions, CommitOn, RowEditSession, ColumnNumberFormat, LookupMatchMode, LookupListColumn } from '@kanunilabs/datagrid-core';
4
4
  export { BusyChangedEvent, BusyPhase, ChangesChangedEvent, ClientRowModel, ColumnLayout, ColumnLookup, ColumnModel, ColumnPin, ColumnRuntime, ColumnState, ColumnStateChangedEvent, CommitOn, ContentReadyEvent, CustomFilterOperator, CustomFilterOperatorId, DEFAULT_ROW_HEIGHT, DENSITY_ROW_HEIGHT, DataGridController, DataGridCoreConfig, DataRowNode, DataSource, EditingApi, 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, PortalContainer, RowDropPosition, RowKey, RowNode, SUMMARY_TYPE_LABEL, SaveRejected, SaveRowError, ScrollingConfig, SelectionDescriptor, SortChangedEvent, SortDescriptor, SortDirection, StateStoringConfig, SummaryDef, SummaryType, THEME_ROW_HEIGHT, ToolbarOptions, ToolbarSearchOptions, ViewportChangedEvent, VirtualWindow, VirtualWindowEngine, allowedSummaryTypes, andFilters, attachStateStoring, bandDepth, bandPath, computeColumnLayout, computeHeaderBands, createRestDataSource, describeFilter, downloadBlob, fillText, filterInputFromNode, formatSummaryValue, humanizeField, importCsv, inferColumns, isDataRow, isDataSource, isFilterGroup, isGroupRow, isPackagedTheme, isSaveRejected, lookupLabel, moveRowInArray, parseCsv, parseFilterInput, sniffDelimiter, summaryKey, summaryLabel, summaryTypeLabels, themeClassName } from '@kanunilabs/datagrid-core';
5
5
 
6
6
  /** Formats an export menu can offer. */
@@ -427,8 +427,11 @@ interface EditorRowApi {
427
427
  * **Escape** cancels the editor (`cancel()`), and **Tab / Shift+Tab** walk
428
428
  * the focusable elements INSIDE the box (text box → "…" button) and only
429
429
  * past the last (first) one commit and move to the next (previous) cell —
430
- * `commit({ move: 'next' })`. Enter is left to the editor: call
431
- * `commit({ move: 'down' })` from it for the built-in behaviour. The
430
+ * `commit({ move: 'next' })`. **Enter** commits like the built-in editor
431
+ * (moves down, or stays with `editKeys.enter`; Shift+Enter stays) — except
432
+ * in a `<textarea>` or an editable region, where it types a new line. An
433
+ * editor that uses Enter itself (picking from its own list) calls
434
+ * `preventDefault()` in its handler. The
432
435
  * editor's own shortcuts (F4, Alt+ArrowDown for its "…" button) are never
433
436
  * taken by the grid.
434
437
  * - Events from OUTSIDE the grid's DOM — a dialog the editor opens in a
@@ -451,8 +454,17 @@ interface EditorRowApi {
451
454
  * to the scroller when the editor has closed.
452
455
  */
453
456
  interface EditorRenderContext<TRow = GridRowData> {
454
- /** Current (uncommitted) editor value. */
457
+ /**
458
+ * Current (uncommitted) editor value — what the built-in editor would show:
459
+ * the column's `valueGetter` result when it has one.
460
+ */
455
461
  value: unknown;
462
+ /**
463
+ * The column's `field` as stored in the row (pending edits applied), before
464
+ * any `valueGetter` — the bit set behind a "E;D;S" summary, say. Undefined
465
+ * when the column has no `field`.
466
+ */
467
+ rawValue: unknown;
456
468
  /** The row with pending edits applied — what a cascading list should read. */
457
469
  row: TRow;
458
470
  columnId: string;
@@ -1200,6 +1212,14 @@ interface DataGridProps<TRow = GridRowData> extends Omit<DataGridCoreConfig<TRow
1200
1212
  * the totals are the headline; the rows below are then the evidence for it.
1201
1213
  */
1202
1214
  footerPosition?: 'top' | 'bottom';
1215
+ /**
1216
+ * Keep the bottom totals row on the grid's bottom edge when there are too few
1217
+ * rows to reach it (Tekax B.3), as a desktop data grid does. Default false:
1218
+ * the row follows the last data row and sticks to the edge only once the rows
1219
+ * scroll. Rows pinned to the bottom (`pinnedBottomRows`) move down with it.
1220
+ * No effect with `footerPosition: 'top'`.
1221
+ */
1222
+ pinFooterToBottom?: boolean;
1203
1223
  /**
1204
1224
  * What to do with the column widths once the grid knows how much room it has
1205
1225
  * (gap analysis P2.5). Default `'none'` — the configured widths are used as
@@ -1739,6 +1759,8 @@ interface GridRowProps<TRow = GridRowData> {
1739
1759
  * when it does not, they do not.
1740
1760
  */
1741
1761
  searchNeedle?: string;
1762
+ /** The grid's `searchFold`: how `searchNeedle` was folded, and so the cell text. */
1763
+ searchFold?: LookupMatchFold;
1742
1764
  /**
1743
1765
  * The grid's cache of FUNCTION lookup lists (P-5.1): a closed cell shows the
1744
1766
  * label, not the raw code. One stable object per grid; when a list arrives
@@ -1778,7 +1800,7 @@ interface GridRowProps<TRow = GridRowData> {
1778
1800
  onCellPointerEnter?: (ctx: CellSlotContext<TRow>, event: React.MouseEvent) => void;
1779
1801
  onCellDoubleClick?: (ctx: CellSlotContext<TRow>) => void;
1780
1802
  }
1781
- 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, lookupLabels, onToggleGroup, summaryDefs, detailColumn, detailExpanded, onToggleDetail, onToggleTreeRow, renderDetail, renderEditForm, renderRowMessage, renderCellContent, getCellClassName, onCellPointerDown, onCellPointerEnter, onCellDoubleClick, rowDrag, dropSide, rowStatus, rowStatusText, rowStatusTint, rowStatusStrike, rowClass, height, }: GridRowProps<TRow>): react.JSX.Element | null;
1803
+ 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, searchFold, lookupLabels, onToggleGroup, summaryDefs, detailColumn, detailExpanded, onToggleDetail, onToggleTreeRow, renderDetail, renderEditForm, renderRowMessage, renderCellContent, getCellClassName, onCellPointerDown, onCellPointerEnter, onCellDoubleClick, rowDrag, dropSide, rowStatus, rowStatusText, rowStatusTint, rowStatusStrike, rowClass, height, }: GridRowProps<TRow>): react.JSX.Element | null;
1782
1804
  declare const GridRow: typeof GridRowImpl;
1783
1805
 
1784
1806
  interface GridFilterRowProps<TRow = GridRowData> {
@@ -2738,11 +2760,12 @@ interface UseGridEditingResult<TRow = GridRowData> {
2738
2760
  /**
2739
2761
  * A custom editor's commit (`renderEditor`'s `ctx.commit`, P-4.2): `'none'`
2740
2762
  * stays on the cell, `'down'` moves down (whatever `editKeys.enter` says —
2741
- * the editor asked), `'next'` / `'previous'` walk to the adjacent editable
2763
+ * the editor asked), `'enter'` is the grid's own Enter (down unless
2764
+ * `editKeys.enter`), `'next'` / `'previous'` walk to the adjacent editable
2742
2765
  * cell like Tab, `'blur'` leaves focus where it is. False when a rule
2743
2766
  * refused the value.
2744
2767
  */
2745
- commitCustomEditor: (move: 'down' | 'next' | 'previous' | 'none' | 'blur') => boolean;
2768
+ commitCustomEditor: (move: 'down' | 'enter' | 'next' | 'previous' | 'none' | 'blur') => boolean;
2746
2769
  /**
2747
2770
  * `ctx.suspendBlurCommit` (P-4.1): while on, blur is not leaving the editor
2748
2771
  * (`ctx.commitOnBlur`, the `commitOn: 'row'` send). Turning it off puts focus
@@ -2977,6 +3000,20 @@ interface GridLookupEditorProps {
2977
3000
  * Deleting is always free; ignored with `allowCustom`.
2978
3001
  */
2979
3002
  restrictInput?: boolean;
3003
+ /**
3004
+ * Complete while typing (`lookup.typeAhead`, P-17), like a Delphi lookup
3005
+ * combo: the first item whose label STARTS with the text completes in the
3006
+ * box (the added part selected) and is highlighted; with no such item the
3007
+ * first match is only highlighted. Enter, Tab and leaving pick the
3008
+ * highlighted item; no match picks nothing. Ignored with `allowCustom`.
3009
+ */
3010
+ typeAhead?: boolean;
3011
+ /** A grip on the open list's corner to resize it (`lookup.listResizable`, B.4.3). */
3012
+ listResizable?: boolean;
3013
+ /** The list as a table with a header row (`lookup.listColumns`, B.4.2). */
3014
+ listColumns?: readonly LookupListColumn[];
3015
+ /** A ▾ button that opens and closes the list (`lookup.dropButton`, B.4.2). */
3016
+ dropButton?: boolean;
2980
3017
  /**
2981
3018
  * Complete typed text to the one item left / an exact label on leaving.
2982
3019
  * Default true. False: the "pick from the list" rule (K-3, see the top).
@@ -2995,6 +3032,8 @@ interface GridLookupEditorProps {
2995
3032
  */
2996
3033
  onPick?: (item: LookupItem) => boolean;
2997
3034
  invalid?: boolean;
3035
+ /** A read-only field (`LookupBox`): the box and its buttons do nothing. */
3036
+ disabled?: boolean;
2998
3037
  /**
2999
3038
  * Take focus on mount. True for a cell editor — it opened BECAUSE the user
3000
3039
  * asked to edit that one cell. False in `row` mode, where every editable cell
@@ -3024,6 +3063,16 @@ interface GridLookupEditorProps {
3024
3063
  * settles the typed text, as before.
3025
3064
  */
3026
3065
  onBlurCommit?: () => void;
3066
+ /**
3067
+ * `lookup.onPickerOpen` (Tekax B.4.1), bound to the row: a "…" button and
3068
+ * Ctrl+Enter open the app's picker; its item is picked like a list item.
3069
+ */
3070
+ onPickerOpen?: (text: string) => Promise<LookupItem | null> | LookupItem | null;
3071
+ /**
3072
+ * The grid's `suspendBlurCommit` (P-4.1): held while the picker is open, so
3073
+ * focus going to the app's dialog neither commits the cell nor sends the row.
3074
+ */
3075
+ suspendBlurCommit?: (on: boolean, restoreTo?: () => HTMLElement | null) => void;
3027
3076
  }
3028
3077
  /**
3029
3078
  * The same match, as items. Kept for callers and tests that want the simple
@@ -3031,7 +3080,7 @@ interface GridLookupEditorProps {
3031
3080
  */
3032
3081
  declare function matchOptions(options: readonly LookupItem[], query: string, mode: LookupMatchMode): readonly LookupItem[];
3033
3082
  /** The editor's settings that come straight from a column's `lookup`. */
3034
- type LookupEditorSettings = Pick<GridLookupEditorProps, 'matchMode' | 'codeMatchMode' | 'linked' | 'allowCustom' | 'autoCompleteSingle' | 'onNoMatch' | 'matchFold' | 'openOnEdit' | 'restrictInput'>;
3083
+ type LookupEditorSettings = Pick<GridLookupEditorProps, 'matchMode' | 'codeMatchMode' | 'linked' | 'allowCustom' | 'autoCompleteSingle' | 'onNoMatch' | 'matchFold' | 'openOnEdit' | 'restrictInput' | 'typeAhead' | 'listResizable' | 'listColumns' | 'dropButton'>;
3035
3084
  /** `lookup` → the editor's props, one reading for the cell, row and form editors. */
3036
3085
  declare function lookupEditorSettings(lookup: ColumnLookup<never> | undefined): LookupEditorSettings;
3037
3086
  /**
@@ -3040,10 +3089,16 @@ declare function lookupEditorSettings(lookup: ColumnLookup<never> | undefined):
3040
3089
  * neither — a plain pick, one cell, as before.
3041
3090
  */
3042
3091
  declare function lookupPickValues(lookup: ColumnLookup<never> | undefined, columnId: string, item: LookupItem): Record<string, unknown> | null;
3043
- declare function GridLookupEditor({ options, value, matchMode, codeMatchMode, matchFold, linked, allowCustom, openOnEdit, seeded, restrictInput, autoCompleteSingle, onNoMatch, onPick, invalid, autoFocus, testId, columnId, ariaLabel, onChange, onCommit, commitOnPick, onCancel, onTab, onBlurCommit, }: GridLookupEditorProps): react.JSX.Element;
3092
+ declare function GridLookupEditor({ options, value, matchMode, codeMatchMode, matchFold, linked, allowCustom, openOnEdit, seeded, restrictInput, typeAhead, listResizable, listColumns, dropButton, autoCompleteSingle, onNoMatch, onPick, invalid, disabled, autoFocus, testId, columnId, ariaLabel, onChange, onCommit, commitOnPick, onCancel, onTab, onBlurCommit, onPickerOpen, suspendBlurCommit, }: GridLookupEditorProps): react.JSX.Element;
3044
3093
 
3045
3094
  interface GridCellEditorProps {
3046
3095
  value: unknown;
3096
+ /** The column's lookup when it is `multiple` (Tekax B.6): the check-box editor. */
3097
+ multipleLookup?: ColumnLookup<never>;
3098
+ /** `lookup.onPickerOpen`, bound to this cell (Tekax B.4.1). */
3099
+ onPickerOpen?: GridLookupEditorProps['onPickerOpen'];
3100
+ /** The grid's `suspendBlurCommit`, held while that picker is open. */
3101
+ suspendBlurCommit?: GridLookupEditorProps['suspendBlurCommit'];
3047
3102
  dataType: GridDataType | undefined;
3048
3103
  /**
3049
3104
  * Choices for a lookup/select editor. `null` means the list is still being
@@ -3098,7 +3153,7 @@ interface GridCellEditorProps {
3098
3153
  onTab: (direction: 1 | -1) => void;
3099
3154
  onCancel: () => void;
3100
3155
  }
3101
- declare function GridCellEditor({ value, dataType, error, seeded, seedText, options, allowCustom, matchMode, lookupSettings, onPick, ariaLabel, dateFormat, numberFormat, numberLocale, onChange, onCommit, onTab, onCancel, }: GridCellEditorProps): react.JSX.Element;
3156
+ declare function GridCellEditor({ value, dataType, error, seeded, seedText, options, allowCustom, matchMode, lookupSettings, onPick, multipleLookup, onPickerOpen, suspendBlurCommit, ariaLabel, dateFormat, numberFormat, numberLocale, onChange, onCommit, onTab, onCancel, }: GridCellEditorProps): react.JSX.Element;
3102
3157
 
3103
3158
  interface GridDateEditorProps {
3104
3159
  value: unknown;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { RefObject, ReactNode, FocusEvent, MouseEvent } from 'react';
3
- import { GridRowData, DataGridController, GridDataType, RowKey, LookupItem, GridDictionary, StateStoringConfig, RowNode, DataRowNode, CardField, RowSaveStatus, GridColumnDef, DataGridCoreConfig, FilterRenderContextBase, FilterNode, InferColumnsOptions, GridThemeName, GridPaletteName, DescribeFilterOptions, GridDensity, ToolbarOptions, PortalContainer, CardViewOptions, EditMode, RowChange, RowStatusSource, ColumnRuntime, ColumnLayout, SortDescriptor, ColumnLookup, ColumnModel, ColSpanPlan, SummaryDef, RemoteDistinctList, PortalKind, ToolbarSearchOptions, ToolbarIconName, ColumnState, BusyPhase, VirtualWindow, ChartBoxSpec, ChartBoxModel, ChartSpec, ChartModel, ChartXYSpec, ChartXYModel, CellRange, RangeSelectionEngine, ColumnSelectMode, EditingEngine, EditingApi, NewRowPosition, ValidationRule, CrudHandlers, EditingPermissions, CommitOn, RowEditSession, ColumnNumberFormat, LookupMatchMode, LookupMatchFold } from '@kanunilabs/datagrid-core';
3
+ import { GridRowData, DataGridController, GridDataType, RowKey, LookupItem, GridDictionary, StateStoringConfig, RowNode, DataRowNode, CardField, RowSaveStatus, GridColumnDef, DataGridCoreConfig, FilterRenderContextBase, FilterNode, InferColumnsOptions, GridThemeName, GridPaletteName, DescribeFilterOptions, GridDensity, ToolbarOptions, PortalContainer, CardViewOptions, EditMode, RowChange, RowStatusSource, ColumnRuntime, ColumnLayout, SortDescriptor, ColumnLookup, ColumnModel, ColSpanPlan, LookupMatchFold, SummaryDef, RemoteDistinctList, PortalKind, ToolbarSearchOptions, ToolbarIconName, ColumnState, BusyPhase, VirtualWindow, ChartBoxSpec, ChartBoxModel, ChartSpec, ChartModel, ChartXYSpec, ChartXYModel, CellRange, RangeSelectionEngine, ColumnSelectMode, EditingEngine, EditingApi, NewRowPosition, ValidationRule, CrudHandlers, EditingPermissions, CommitOn, RowEditSession, ColumnNumberFormat, LookupMatchMode, LookupListColumn } from '@kanunilabs/datagrid-core';
4
4
  export { BusyChangedEvent, BusyPhase, ChangesChangedEvent, ClientRowModel, ColumnLayout, ColumnLookup, ColumnModel, ColumnPin, ColumnRuntime, ColumnState, ColumnStateChangedEvent, CommitOn, ContentReadyEvent, CustomFilterOperator, CustomFilterOperatorId, DEFAULT_ROW_HEIGHT, DENSITY_ROW_HEIGHT, DataGridController, DataGridCoreConfig, DataRowNode, DataSource, EditingApi, 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, PortalContainer, RowDropPosition, RowKey, RowNode, SUMMARY_TYPE_LABEL, SaveRejected, SaveRowError, ScrollingConfig, SelectionDescriptor, SortChangedEvent, SortDescriptor, SortDirection, StateStoringConfig, SummaryDef, SummaryType, THEME_ROW_HEIGHT, ToolbarOptions, ToolbarSearchOptions, ViewportChangedEvent, VirtualWindow, VirtualWindowEngine, allowedSummaryTypes, andFilters, attachStateStoring, bandDepth, bandPath, computeColumnLayout, computeHeaderBands, createRestDataSource, describeFilter, downloadBlob, fillText, filterInputFromNode, formatSummaryValue, humanizeField, importCsv, inferColumns, isDataRow, isDataSource, isFilterGroup, isGroupRow, isPackagedTheme, isSaveRejected, lookupLabel, moveRowInArray, parseCsv, parseFilterInput, sniffDelimiter, summaryKey, summaryLabel, summaryTypeLabels, themeClassName } from '@kanunilabs/datagrid-core';
5
5
 
6
6
  /** Formats an export menu can offer. */
@@ -427,8 +427,11 @@ interface EditorRowApi {
427
427
  * **Escape** cancels the editor (`cancel()`), and **Tab / Shift+Tab** walk
428
428
  * the focusable elements INSIDE the box (text box → "…" button) and only
429
429
  * past the last (first) one commit and move to the next (previous) cell —
430
- * `commit({ move: 'next' })`. Enter is left to the editor: call
431
- * `commit({ move: 'down' })` from it for the built-in behaviour. The
430
+ * `commit({ move: 'next' })`. **Enter** commits like the built-in editor
431
+ * (moves down, or stays with `editKeys.enter`; Shift+Enter stays) — except
432
+ * in a `<textarea>` or an editable region, where it types a new line. An
433
+ * editor that uses Enter itself (picking from its own list) calls
434
+ * `preventDefault()` in its handler. The
432
435
  * editor's own shortcuts (F4, Alt+ArrowDown for its "…" button) are never
433
436
  * taken by the grid.
434
437
  * - Events from OUTSIDE the grid's DOM — a dialog the editor opens in a
@@ -451,8 +454,17 @@ interface EditorRowApi {
451
454
  * to the scroller when the editor has closed.
452
455
  */
453
456
  interface EditorRenderContext<TRow = GridRowData> {
454
- /** Current (uncommitted) editor value. */
457
+ /**
458
+ * Current (uncommitted) editor value — what the built-in editor would show:
459
+ * the column's `valueGetter` result when it has one.
460
+ */
455
461
  value: unknown;
462
+ /**
463
+ * The column's `field` as stored in the row (pending edits applied), before
464
+ * any `valueGetter` — the bit set behind a "E;D;S" summary, say. Undefined
465
+ * when the column has no `field`.
466
+ */
467
+ rawValue: unknown;
456
468
  /** The row with pending edits applied — what a cascading list should read. */
457
469
  row: TRow;
458
470
  columnId: string;
@@ -1200,6 +1212,14 @@ interface DataGridProps<TRow = GridRowData> extends Omit<DataGridCoreConfig<TRow
1200
1212
  * the totals are the headline; the rows below are then the evidence for it.
1201
1213
  */
1202
1214
  footerPosition?: 'top' | 'bottom';
1215
+ /**
1216
+ * Keep the bottom totals row on the grid's bottom edge when there are too few
1217
+ * rows to reach it (Tekax B.3), as a desktop data grid does. Default false:
1218
+ * the row follows the last data row and sticks to the edge only once the rows
1219
+ * scroll. Rows pinned to the bottom (`pinnedBottomRows`) move down with it.
1220
+ * No effect with `footerPosition: 'top'`.
1221
+ */
1222
+ pinFooterToBottom?: boolean;
1203
1223
  /**
1204
1224
  * What to do with the column widths once the grid knows how much room it has
1205
1225
  * (gap analysis P2.5). Default `'none'` — the configured widths are used as
@@ -1739,6 +1759,8 @@ interface GridRowProps<TRow = GridRowData> {
1739
1759
  * when it does not, they do not.
1740
1760
  */
1741
1761
  searchNeedle?: string;
1762
+ /** The grid's `searchFold`: how `searchNeedle` was folded, and so the cell text. */
1763
+ searchFold?: LookupMatchFold;
1742
1764
  /**
1743
1765
  * The grid's cache of FUNCTION lookup lists (P-5.1): a closed cell shows the
1744
1766
  * label, not the raw code. One stable object per grid; when a list arrives
@@ -1778,7 +1800,7 @@ interface GridRowProps<TRow = GridRowData> {
1778
1800
  onCellPointerEnter?: (ctx: CellSlotContext<TRow>, event: React.MouseEvent) => void;
1779
1801
  onCellDoubleClick?: (ctx: CellSlotContext<TRow>) => void;
1780
1802
  }
1781
- 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, lookupLabels, onToggleGroup, summaryDefs, detailColumn, detailExpanded, onToggleDetail, onToggleTreeRow, renderDetail, renderEditForm, renderRowMessage, renderCellContent, getCellClassName, onCellPointerDown, onCellPointerEnter, onCellDoubleClick, rowDrag, dropSide, rowStatus, rowStatusText, rowStatusTint, rowStatusStrike, rowClass, height, }: GridRowProps<TRow>): react.JSX.Element | null;
1803
+ 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, searchFold, lookupLabels, onToggleGroup, summaryDefs, detailColumn, detailExpanded, onToggleDetail, onToggleTreeRow, renderDetail, renderEditForm, renderRowMessage, renderCellContent, getCellClassName, onCellPointerDown, onCellPointerEnter, onCellDoubleClick, rowDrag, dropSide, rowStatus, rowStatusText, rowStatusTint, rowStatusStrike, rowClass, height, }: GridRowProps<TRow>): react.JSX.Element | null;
1782
1804
  declare const GridRow: typeof GridRowImpl;
1783
1805
 
1784
1806
  interface GridFilterRowProps<TRow = GridRowData> {
@@ -2738,11 +2760,12 @@ interface UseGridEditingResult<TRow = GridRowData> {
2738
2760
  /**
2739
2761
  * A custom editor's commit (`renderEditor`'s `ctx.commit`, P-4.2): `'none'`
2740
2762
  * stays on the cell, `'down'` moves down (whatever `editKeys.enter` says —
2741
- * the editor asked), `'next'` / `'previous'` walk to the adjacent editable
2763
+ * the editor asked), `'enter'` is the grid's own Enter (down unless
2764
+ * `editKeys.enter`), `'next'` / `'previous'` walk to the adjacent editable
2742
2765
  * cell like Tab, `'blur'` leaves focus where it is. False when a rule
2743
2766
  * refused the value.
2744
2767
  */
2745
- commitCustomEditor: (move: 'down' | 'next' | 'previous' | 'none' | 'blur') => boolean;
2768
+ commitCustomEditor: (move: 'down' | 'enter' | 'next' | 'previous' | 'none' | 'blur') => boolean;
2746
2769
  /**
2747
2770
  * `ctx.suspendBlurCommit` (P-4.1): while on, blur is not leaving the editor
2748
2771
  * (`ctx.commitOnBlur`, the `commitOn: 'row'` send). Turning it off puts focus
@@ -2977,6 +3000,20 @@ interface GridLookupEditorProps {
2977
3000
  * Deleting is always free; ignored with `allowCustom`.
2978
3001
  */
2979
3002
  restrictInput?: boolean;
3003
+ /**
3004
+ * Complete while typing (`lookup.typeAhead`, P-17), like a Delphi lookup
3005
+ * combo: the first item whose label STARTS with the text completes in the
3006
+ * box (the added part selected) and is highlighted; with no such item the
3007
+ * first match is only highlighted. Enter, Tab and leaving pick the
3008
+ * highlighted item; no match picks nothing. Ignored with `allowCustom`.
3009
+ */
3010
+ typeAhead?: boolean;
3011
+ /** A grip on the open list's corner to resize it (`lookup.listResizable`, B.4.3). */
3012
+ listResizable?: boolean;
3013
+ /** The list as a table with a header row (`lookup.listColumns`, B.4.2). */
3014
+ listColumns?: readonly LookupListColumn[];
3015
+ /** A ▾ button that opens and closes the list (`lookup.dropButton`, B.4.2). */
3016
+ dropButton?: boolean;
2980
3017
  /**
2981
3018
  * Complete typed text to the one item left / an exact label on leaving.
2982
3019
  * Default true. False: the "pick from the list" rule (K-3, see the top).
@@ -2995,6 +3032,8 @@ interface GridLookupEditorProps {
2995
3032
  */
2996
3033
  onPick?: (item: LookupItem) => boolean;
2997
3034
  invalid?: boolean;
3035
+ /** A read-only field (`LookupBox`): the box and its buttons do nothing. */
3036
+ disabled?: boolean;
2998
3037
  /**
2999
3038
  * Take focus on mount. True for a cell editor — it opened BECAUSE the user
3000
3039
  * asked to edit that one cell. False in `row` mode, where every editable cell
@@ -3024,6 +3063,16 @@ interface GridLookupEditorProps {
3024
3063
  * settles the typed text, as before.
3025
3064
  */
3026
3065
  onBlurCommit?: () => void;
3066
+ /**
3067
+ * `lookup.onPickerOpen` (Tekax B.4.1), bound to the row: a "…" button and
3068
+ * Ctrl+Enter open the app's picker; its item is picked like a list item.
3069
+ */
3070
+ onPickerOpen?: (text: string) => Promise<LookupItem | null> | LookupItem | null;
3071
+ /**
3072
+ * The grid's `suspendBlurCommit` (P-4.1): held while the picker is open, so
3073
+ * focus going to the app's dialog neither commits the cell nor sends the row.
3074
+ */
3075
+ suspendBlurCommit?: (on: boolean, restoreTo?: () => HTMLElement | null) => void;
3027
3076
  }
3028
3077
  /**
3029
3078
  * The same match, as items. Kept for callers and tests that want the simple
@@ -3031,7 +3080,7 @@ interface GridLookupEditorProps {
3031
3080
  */
3032
3081
  declare function matchOptions(options: readonly LookupItem[], query: string, mode: LookupMatchMode): readonly LookupItem[];
3033
3082
  /** The editor's settings that come straight from a column's `lookup`. */
3034
- type LookupEditorSettings = Pick<GridLookupEditorProps, 'matchMode' | 'codeMatchMode' | 'linked' | 'allowCustom' | 'autoCompleteSingle' | 'onNoMatch' | 'matchFold' | 'openOnEdit' | 'restrictInput'>;
3083
+ type LookupEditorSettings = Pick<GridLookupEditorProps, 'matchMode' | 'codeMatchMode' | 'linked' | 'allowCustom' | 'autoCompleteSingle' | 'onNoMatch' | 'matchFold' | 'openOnEdit' | 'restrictInput' | 'typeAhead' | 'listResizable' | 'listColumns' | 'dropButton'>;
3035
3084
  /** `lookup` → the editor's props, one reading for the cell, row and form editors. */
3036
3085
  declare function lookupEditorSettings(lookup: ColumnLookup<never> | undefined): LookupEditorSettings;
3037
3086
  /**
@@ -3040,10 +3089,16 @@ declare function lookupEditorSettings(lookup: ColumnLookup<never> | undefined):
3040
3089
  * neither — a plain pick, one cell, as before.
3041
3090
  */
3042
3091
  declare function lookupPickValues(lookup: ColumnLookup<never> | undefined, columnId: string, item: LookupItem): Record<string, unknown> | null;
3043
- declare function GridLookupEditor({ options, value, matchMode, codeMatchMode, matchFold, linked, allowCustom, openOnEdit, seeded, restrictInput, autoCompleteSingle, onNoMatch, onPick, invalid, autoFocus, testId, columnId, ariaLabel, onChange, onCommit, commitOnPick, onCancel, onTab, onBlurCommit, }: GridLookupEditorProps): react.JSX.Element;
3092
+ declare function GridLookupEditor({ options, value, matchMode, codeMatchMode, matchFold, linked, allowCustom, openOnEdit, seeded, restrictInput, typeAhead, listResizable, listColumns, dropButton, autoCompleteSingle, onNoMatch, onPick, invalid, disabled, autoFocus, testId, columnId, ariaLabel, onChange, onCommit, commitOnPick, onCancel, onTab, onBlurCommit, onPickerOpen, suspendBlurCommit, }: GridLookupEditorProps): react.JSX.Element;
3044
3093
 
3045
3094
  interface GridCellEditorProps {
3046
3095
  value: unknown;
3096
+ /** The column's lookup when it is `multiple` (Tekax B.6): the check-box editor. */
3097
+ multipleLookup?: ColumnLookup<never>;
3098
+ /** `lookup.onPickerOpen`, bound to this cell (Tekax B.4.1). */
3099
+ onPickerOpen?: GridLookupEditorProps['onPickerOpen'];
3100
+ /** The grid's `suspendBlurCommit`, held while that picker is open. */
3101
+ suspendBlurCommit?: GridLookupEditorProps['suspendBlurCommit'];
3047
3102
  dataType: GridDataType | undefined;
3048
3103
  /**
3049
3104
  * Choices for a lookup/select editor. `null` means the list is still being
@@ -3098,7 +3153,7 @@ interface GridCellEditorProps {
3098
3153
  onTab: (direction: 1 | -1) => void;
3099
3154
  onCancel: () => void;
3100
3155
  }
3101
- declare function GridCellEditor({ value, dataType, error, seeded, seedText, options, allowCustom, matchMode, lookupSettings, onPick, ariaLabel, dateFormat, numberFormat, numberLocale, onChange, onCommit, onTab, onCancel, }: GridCellEditorProps): react.JSX.Element;
3156
+ declare function GridCellEditor({ value, dataType, error, seeded, seedText, options, allowCustom, matchMode, lookupSettings, onPick, multipleLookup, onPickerOpen, suspendBlurCommit, ariaLabel, dateFormat, numberFormat, numberLocale, onChange, onCommit, onTab, onCancel, }: GridCellEditorProps): react.JSX.Element;
3102
3157
 
3103
3158
  interface GridDateEditorProps {
3104
3159
  value: unknown;