@geovi/the-datagrid 0.0.9 → 0.0.10

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.
Files changed (121) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +163 -72
  3. package/THIRD_PARTY_NOTICES.md +10 -0
  4. package/community-api-manifest.json +324 -0
  5. package/dist/BoolEditor.cjs +2 -0
  6. package/dist/BoolEditor.js +3503 -0
  7. package/dist/BoolFilter.cjs +2 -0
  8. package/dist/BoolFilter.js +3527 -0
  9. package/dist/DateEditor.cjs +2 -0
  10. package/dist/DateEditor.js +2922 -0
  11. package/dist/DateFilter.cjs +2 -0
  12. package/dist/DateFilter.js +2979 -0
  13. package/dist/NumberFilter.cjs +2 -0
  14. package/dist/NumberFilter.js +2968 -0
  15. package/dist/NumericEditor.cjs +2 -0
  16. package/dist/NumericEditor.js +2923 -0
  17. package/dist/SelectFilter.cjs +42 -0
  18. package/dist/SelectFilter.js +8275 -0
  19. package/dist/StringFilter.cjs +2 -0
  20. package/dist/StringFilter.js +2949 -0
  21. package/dist/base.css +1 -0
  22. package/dist/community-api-manifest.json +324 -0
  23. package/dist/community-package-manifest.json +35 -0
  24. package/dist/components/ui/button.d.ts +1 -1
  25. package/dist/components/ui/dropdown-menu.d.ts +2 -2
  26. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  27. package/dist/components/ui/scroll-area.d.ts +14 -1
  28. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  29. package/dist/editors/BoolEditor.d.ts +8 -0
  30. package/dist/editors/BoolEditor.d.ts.map +1 -0
  31. package/dist/editors/DateEditor.d.ts +17 -0
  32. package/dist/editors/DateEditor.d.ts.map +1 -0
  33. package/dist/editors/NumericEditor.d.ts +11 -0
  34. package/dist/editors/NumericEditor.d.ts.map +1 -0
  35. package/dist/editors/editorTypes.d.ts +21 -0
  36. package/dist/editors/editorTypes.d.ts.map +1 -0
  37. package/dist/editors/index.d.ts +8 -0
  38. package/dist/editors/index.d.ts.map +1 -0
  39. package/dist/filters/editors/BoolFilter.d.ts +21 -0
  40. package/dist/filters/editors/BoolFilter.d.ts.map +1 -0
  41. package/dist/filters/editors/DateFilter.d.ts +8 -9
  42. package/dist/filters/editors/DateFilter.d.ts.map +1 -1
  43. package/dist/filters/editors/NumberFilter.d.ts +8 -9
  44. package/dist/filters/editors/NumberFilter.d.ts.map +1 -1
  45. package/dist/filters/editors/SelectFilter.d.ts +10 -11
  46. package/dist/filters/editors/SelectFilter.d.ts.map +1 -1
  47. package/dist/filters/editors/StringFilter.d.ts +25 -0
  48. package/dist/filters/editors/StringFilter.d.ts.map +1 -0
  49. package/dist/filters/editors/editorTypes.d.ts +13 -0
  50. package/dist/filters/editors/editorTypes.d.ts.map +1 -0
  51. package/dist/filters/editors/index.d.ts +8 -0
  52. package/dist/filters/editors/index.d.ts.map +1 -1
  53. package/dist/filters/utils.d.ts +9 -0
  54. package/dist/filters/utils.d.ts.map +1 -1
  55. package/dist/grid/ReactDataGrid.d.ts +6 -4
  56. package/dist/grid/ReactDataGrid.d.ts.map +1 -1
  57. package/dist/grid/components/ColumnGroupHeaderCell.d.ts +29 -0
  58. package/dist/grid/components/ColumnGroupHeaderCell.d.ts.map +1 -0
  59. package/dist/grid/components/FilterCell.d.ts +11 -1
  60. package/dist/grid/components/FilterCell.d.ts.map +1 -1
  61. package/dist/grid/components/FilterOperatorMenu.d.ts +10 -1
  62. package/dist/grid/components/FilterOperatorMenu.d.ts.map +1 -1
  63. package/dist/grid/components/GridBody.d.ts +29 -1
  64. package/dist/grid/components/GridBody.d.ts.map +1 -1
  65. package/dist/grid/components/GridContextMenuLayer.d.ts +27 -0
  66. package/dist/grid/components/GridContextMenuLayer.d.ts.map +1 -0
  67. package/dist/grid/components/GridHeader.d.ts +37 -2
  68. package/dist/grid/components/GridHeader.d.ts.map +1 -1
  69. package/dist/grid/components/HeaderCell.d.ts +14 -2
  70. package/dist/grid/components/HeaderCell.d.ts.map +1 -1
  71. package/dist/grid/components/MobileGridList.d.ts +13 -2
  72. package/dist/grid/components/MobileGridList.d.ts.map +1 -1
  73. package/dist/grid/engine/tanstackAdapter.d.ts.map +1 -1
  74. package/dist/grid/utils/columnGroups.d.ts +75 -0
  75. package/dist/grid/utils/columnGroups.d.ts.map +1 -0
  76. package/dist/grid/utils/columnSizing.d.ts +2 -1
  77. package/dist/grid/utils/columnSizing.d.ts.map +1 -1
  78. package/dist/grid/utils/contextMenuPosition.d.ts +8 -0
  79. package/dist/grid/utils/contextMenuPosition.d.ts.map +1 -0
  80. package/dist/grid/utils/editing.d.ts +6 -1
  81. package/dist/grid/utils/editing.d.ts.map +1 -1
  82. package/dist/index.cjs +48 -0
  83. package/dist/index.css +1 -1
  84. package/dist/index.js +14180 -9784
  85. package/dist/main.d.ts +5 -2
  86. package/dist/main.d.ts.map +1 -1
  87. package/dist/sorting/utils.d.ts +24 -7
  88. package/dist/sorting/utils.d.ts.map +1 -1
  89. package/dist/style/theme/amber-dark/index.css +1 -0
  90. package/dist/style/theme/amber-light/index.css +1 -0
  91. package/dist/style/theme/blue-dark/index.css +1 -0
  92. package/dist/style/theme/blue-light/index.css +1 -0
  93. package/dist/style/theme/default-dark/index.css +1 -0
  94. package/dist/style/theme/default-light/index.css +1 -0
  95. package/dist/style/theme/green-dark/index.css +1 -0
  96. package/dist/style/theme/green-light/index.css +1 -0
  97. package/dist/style/theme/pink-dark/index.css +1 -0
  98. package/dist/style/theme/pink-light/index.css +1 -0
  99. package/dist/types/TypeColumn.d.ts +2 -0
  100. package/dist/types/TypeColumn.d.ts.map +1 -0
  101. package/dist/types/TypeDataGridProps.d.ts +2 -0
  102. package/dist/types/TypeDataGridProps.d.ts.map +1 -0
  103. package/dist/types/TypeDataSource.d.ts +2 -0
  104. package/dist/types/TypeDataSource.d.ts.map +1 -0
  105. package/dist/types/TypeFilterValue.d.ts +2 -0
  106. package/dist/types/TypeFilterValue.d.ts.map +1 -0
  107. package/dist/types/TypePaginationProps.d.ts +2 -0
  108. package/dist/types/TypePaginationProps.d.ts.map +1 -0
  109. package/dist/types/TypeSelected.d.ts +2 -0
  110. package/dist/types/TypeSelected.d.ts.map +1 -0
  111. package/dist/types/TypeSize.d.ts +2 -0
  112. package/dist/types/TypeSize.d.ts.map +1 -0
  113. package/dist/types/TypeSortInfo.d.ts +2 -0
  114. package/dist/types/TypeSortInfo.d.ts.map +1 -0
  115. package/dist/types/index.cjs +2 -0
  116. package/dist/types/index.d.ts +4 -0
  117. package/dist/types/index.d.ts.map +1 -0
  118. package/dist/types/index.js +4 -0
  119. package/dist/types.d.ts +566 -20
  120. package/dist/types.d.ts.map +1 -1
  121. package/package.json +184 -8
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Geo Vi and the-datagrid contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -12,6 +12,7 @@ Documentation and live examples: https://geo-vi.github.io/the-datagrid/
12
12
  - Opt-in global table search through a separate, tree-shakeable entry
13
13
  - Opt-in contextual column-visibility toolbar with a right-side action slot
14
14
  - Column management (reorder, resize, auto-size)
15
+ - Stacked and nested column headers with split/rejoin and group resizing
15
16
  - Pagination (local + remote)
16
17
  - Row selection (checkbox column)
17
18
  - Modern shadcn-aligned look-and-feel with packaged styles
@@ -26,13 +27,14 @@ public API and observable behavior of
26
27
  After changing the package dependency and import specifier, public
27
28
  Inovua-shaped application business logic should not require a rewrite.
28
29
 
29
- That statement is the product contract, **not a claim that the current release
30
- has already completed parity**. Compatibility covers more than similarly named
31
- TypeScript fields: it includes defaults, runtime behavior, callback payloads
32
- and timing, controlled/uncontrolled state, local and remote data flow, layout,
33
- keyboard and focus interaction, and accessibility behavior.
30
+ The audited Community 5.10.2 release gate is implemented and backed by
31
+ type, runtime, browser, packed-package, and performance tests. Compatibility
32
+ covers more than similarly named TypeScript fields: it includes defaults,
33
+ runtime behavior, callback payloads and timing, controlled/uncontrolled state,
34
+ local and remote data flow, layout, keyboard and focus interaction, and
35
+ accessibility behavior.
34
36
 
35
- The audited Issue 17, Issue 31, and Issue 48 compatibility batches now implement and
37
+ The Issue 17 and Issue 31–45 compatibility batches implement and
36
38
  regression-test:
37
39
 
38
40
  - Inovua's `idProperty`, theme, row/filter height, text-selection, filter-menu,
@@ -49,6 +51,9 @@ regression-test:
49
51
  - inline editing (`editable`, `editStartEvent`, column editors, lifecycle
50
52
  callbacks, cancellation, focus, and keyboard navigation);
51
53
  - object- or function-valued whole-row `rowStyle`.
54
+ - stacked and nested column groups, custom group headers, split/rejoin
55
+ reordering, controlled group moves, proportional group resizing, and
56
+ horizontal-virtualization geometry;
52
57
  - the standalone
53
58
  `@geovi/the-datagrid/packages/TextInput` compatibility entry, including its
54
59
  value-first callbacks, clear tool, legacy class hooks, and imperative ref;
@@ -56,14 +61,14 @@ regression-test:
56
61
  - `getVirtualList().adjustHeights()` for instantiated variable-height rows in
57
62
  virtual and non-virtual layouts.
58
63
 
59
- This closes those audited differences; it does not certify the entire Inovua
60
- Community API as complete. Remaining mismatches stay in the public status
61
- ledger until their types and observable behavior have executable evidence. No
62
- technical-impossibility exceptions are currently approved. Any future exception
63
- must identify the exact upstream contract, prove why equivalent behavior is
64
- technically impossible, document consumer impact and a safe migration path, and
65
- carry executable coverage. Cost, bundle size, schedule, or architectural
66
- preference alone do not qualify.
64
+ This closes the audited Community gate. The
65
+ [source release ledger](docs/inovua-community-5.10.2-compatibility.md) maps
66
+ every child issue to executable evidence, and
67
+ [`community-api-manifest.json`](community-api-manifest.json) records the
68
+ behavior-backed computed API, plugins, types, and Enterprise exclusions.
69
+ Unknown computed method names are absent instead of being fabricated as no-op
70
+ functions. Any future mismatch is a compatibility regression and must be
71
+ tracked with executable coverage.
67
72
 
68
73
  Issue 48 explicitly adopts Inovua's standalone `TextInput` toolkit path. Migrate
69
74
  its default import to `@geovi/the-datagrid/packages/TextInput`; the package also
@@ -79,8 +84,7 @@ before treating the current package as a drop-in runtime replacement.
79
84
  ## Implemented today
80
85
 
81
86
  The following inventory describes behavior that ships in the current package.
82
- It is a statement of current capability, not a declaration that the wider
83
- Inovua compatibility audit is complete. The public docs contain the full
87
+ The public docs contain the full
84
88
  [source-backed implemented-surface reference](https://geo-vi.github.io/the-datagrid/docs/reference/implemented-surface),
85
89
  including exact defaults, timing, transform order, exports, and imperative
86
90
  method allowlists.
@@ -107,7 +111,9 @@ method allowlists.
107
111
  - **Columns and cells:** stable `id`/`name` identity, controlled rendered order,
108
112
  callback-driven drag reordering, explicit visibility, custom headers and cell
109
113
  renderers, per-column sorting/filtering/search configuration, alignment, cell
110
- classes/styles, and header props.
114
+ classes/styles, and header props. Root `groups`, `column.group`, and nested
115
+ `groups[].group` render accessible stacked headers with automatic split/rejoin
116
+ segments, block dragging, and proportional min/max-clamped resizing.
111
117
  - **Column and row sizing:** controlled `width`/`flex`, uncontrolled
112
118
  `defaultWidth`/`defaultFlex`, `minWidth`/`maxWidth` clamps, proportional flex
113
119
  allocation, the upstream 40px implicit column minimum (while preserving an
@@ -119,9 +125,10 @@ method allowlists.
119
125
  - **Filtering and sorting:** inferred or explicitly controlled filter-row
120
126
  visibility, uncontrolled local filters, externally owned controlled filter
121
127
  state, custom filter registries and editors, filter operator menus, single
122
- sorting, Shift-assisted multi-sorting, configurable initial direction, and
123
- optional unsorting. Filter and sort changes reset pagination to the first
124
- page.
128
+ sorting, persistent array-valued multi-sorting, custom comparator registries
129
+ and sort tools, configurable initial direction, optional unsorting, and
130
+ configurable scroll reset behavior. Filter and sort changes reset pagination
131
+ to the first page.
125
132
  - **Pagination:** controlled or uncontrolled `skip` and `limit`, local and remote
126
133
  modes, configurable page sizes, a built-in accessible pager, an
127
134
  Inovua-shaped `renderPaginationToolbar` contract, and reload/refresh/page
@@ -165,9 +172,8 @@ method allowlists.
165
172
  observers.
166
173
  The editing subset includes `startEdit`, `tryStartEdit`, `completeEdit`,
167
174
  `cancelEdit`, `getCurrentEditInfo`, `isInEdit`, and
168
- `currentEditCompletePromise`. This is an implemented subset;
169
- compatibility-shaped placeholder methods are not a claim of working
170
- behavior.
175
+ `currentEditCompletePromise`. The API is explicit and behavior-backed;
176
+ unknown method-like properties resolve to `undefined`.
171
177
 
172
178
  ### Migration: data-transform ownership
173
179
 
@@ -193,30 +199,41 @@ for rationale and migration examples.
193
199
 
194
200
  The main entry, `@geovi/the-datagrid`, exports:
195
201
 
196
- - default and named `ReactDataGrid`, plus the compatibility-shaped `plugins`
197
- empty list;
198
- - `DateFilter`, `NumberFilter`, `SelectFilter`, `CheckBox`, and the named
202
+ - default and named `ReactDataGrid`, plus executable descriptors for the
203
+ built-in sorting, filtering, menu, and cell-selection plugins;
204
+ - `BoolEditor`, `DateEditor`, `NumericEditor`, `StringFilter`, `BoolFilter`,
205
+ `DateFilter`, `NumberFilter`, `SelectFilter`, `CheckBox`, and the named
199
206
  `TextInput`;
200
207
  - `DEFAULT_FILTER_TYPES` and its `filterTypes` alias;
201
208
  - the public types `CellProps`, `IColumn`, `SortDirection`, `TypeColumn`,
202
209
  `TypeColumns`, `TypeColumnEditorProps`, `TypeColumnResizeContext`,
203
210
  `TypeColumnResizeInfo`, `TypeColumnEditorCell`, `TypeComputedColumn`,
204
211
  `TypeComputedColumnsMap`, `TypeComputedProps`, `TypeDataGridProps`,
205
- `TypeDataSourceArgs`, `TypeDataSource`, `TypeDataSourceResult`,
212
+ `TypeColumnGroup`, `TypeColumnGroupDOMProps`,
213
+ `TypeColumnGroupHeaderProps`, `TypeDataSourceArgs`, `TypeDataSource`,
214
+ `TypeDataSourceResult`,
206
215
  `TypePaginationProps`, `TypeLoadMaskProps`, `TypeEditInfo`, `TypeStartEditArgs`,
207
216
  `TypeTryStartEditArgs`, `TypeCompleteEditArgs`, `TypeCancelEditArgs`,
208
217
  `TypeFilterOperator`, `TypeFilterType`, `TypeFilterTypes`, `TypeFilterValue`,
209
218
  `TypeGetColumnByParam`, `TypeI18n`, `TypeOnSelectionChangeArg`,
210
219
  `TypePaginationMode`, `TypeRowSelection`, `TypeRowStyle`, `TypeRowStyleArgs`,
211
220
  `TypeRowStyleProps`, `TypeShowCellBorders`, `TypeSize`, `TypeSingleFilterValue`,
212
- `TypeSingleSortInfo`, `TypeSortInfo`, `TypeCheckboxColumn`,
213
- `TypeCheckboxProps`, `TextInputProps`, `TypeTextInputProps`, and the
214
- TextInput callback/input/wrapper/clear-button helper types.
221
+ `TypeSingleSortInfo`, `TypeSortInfo`, `TypeSortFunction`,
222
+ `TypeSortFunctions`, `TypeColumnSort`, `TypeSortToolProps`,
223
+ `TypeRenderSortTool`, `TypeCheckboxColumn`, `TypeCheckboxProps`,
224
+ `TextInputProps`, `TypeTextInputProps`, and the TextInput
225
+ callback/input/wrapper/clear-button helper types.
226
+
227
+ The same editors and filters are available through their documented deep
228
+ imports. `@geovi/the-datagrid/types` and the documented
229
+ `@geovi/the-datagrid/types/Type*` paths expose the migration type vocabulary.
230
+ The main and Community compatibility entries publish both ESM and CommonJS.
215
231
 
216
232
  The optional `@geovi/the-datagrid/search` entry exports `RDGSearchProvider`,
217
233
  `RDGSearchBar`, `RDGSearchTarget`, and their prop types. The explicit stylesheet
218
- fallbacks are `@geovi/the-datagrid/style.css` and
219
- `@geovi/the-datagrid/search/style.css`.
234
+ fallbacks include `@geovi/the-datagrid/index.css`,
235
+ `@geovi/the-datagrid/base.css`, every documented default/amber/blue/green/pink
236
+ light/dark theme path, and `@geovi/the-datagrid/search/style.css`.
220
237
 
221
238
  The optional `@geovi/the-datagrid/components` entry is the one-import choice for
222
239
  mixed contextual controls. It exports `RDGProvider`, `RDGTarget`,
@@ -250,9 +267,9 @@ number comparison/range operators, and date/time comparison/range operators.
250
267
  Operator definitions can opt into empty-value filtering, initialize a value
251
268
  when selected, or disable the editor for value-free operations.
252
269
 
253
- Current caveat: an unseeded `bool`/`boolean` filter resolves through the generic
254
- `contains` fallback even though those registries expose only `eq`/`neq`. Seed an
255
- `eq` or `neq` filter entry until that implementation gap is corrected.
270
+ Unseeded `bool` and `boolean` filters default to `eq`, matching their shipped
271
+ operator registry. Other defaults are `contains` for strings, `gte` for
272
+ numbers, `eq` for selects, and `afterOrOn` for date/time values.
256
273
 
257
274
  Custom filter types are shallow-merged by registry key with the built-ins:
258
275
 
@@ -640,11 +657,13 @@ fallbacks, omits columns with `hideable={false}`, and does not allow the final
640
657
  visible column to be hidden. Button state is exposed through `aria-pressed`; no
641
658
  eye icon or parallel application visibility state is required.
642
659
 
643
- Set `visible: false` on a column that should start hidden and `hideable: false`
644
- on one that must not be toggled. `defaultVisible` and `defaultHidden` remain
645
- ignored compatibility fields. Visibility clicks update grid-owned runtime
646
- state; a real grid remount discards those overrides and initializes again from
647
- the current column props.
660
+ Set controlled `visible: false`, uncontrolled `defaultVisible: false`, or the
661
+ legacy `defaultHidden: true` alias on a column that should start hidden.
662
+ `hideable: false` disables menu/toolbar toggles but does not block the
663
+ imperative API. `onColumnVisibleChange({ column, visible })` receives every
664
+ effective proposal. A declarative `visible` value remains authoritative until
665
+ the parent applies that proposal; otherwise the grid persists the change in
666
+ its own runtime state.
648
667
 
649
668
  The default title is a level-two heading that labels the toolbar region. The
650
669
  toggle group keeps its `ariaLabel`, and the description is associated with both
@@ -763,11 +782,12 @@ Note: this is a curated overview. For the complete contract, refer to the export
763
782
 
764
783
  ### Core
765
784
 
766
- | Prop | Type | Default | Description |
767
- | ------------ | ---------------- | -------- | ------------------------------------------------------------ |
768
- | `idProperty` | `string` | `"id"` | Property name used as unique row identifier; JSX may omit it |
769
- | `columns` | `TypeColumns` | required | Column definitions |
770
- | `dataSource` | `TypeDataSource` | required | Data source (array, function, or promise) |
785
+ | Prop | Type | Default | Description |
786
+ | ------------ | ------------------- | -------- | ------------------------------------------------------------ |
787
+ | `idProperty` | `string` | `"id"` | Property name used as unique row identifier; JSX may omit it |
788
+ | `columns` | `TypeColumns` | required | Column definitions |
789
+ | `groups` | `TypeColumnGroup[]` | `[]` | Stacked and nested column-header descriptors |
790
+ | `dataSource` | `TypeDataSource` | required | Data source (array, function, or promise) |
771
791
 
772
792
  ### Display
773
793
 
@@ -807,17 +827,41 @@ custom cell metadata. That callback value preserves upstream’s raw shape:
807
827
 
808
828
  ### Columns
809
829
 
810
- | Prop | Type | Default | Description |
811
- | ---------------------- | --------------------------- | ------- | ----------------------------------------------------------------------------- |
812
- | `columnOrder` | `string[]` | - | Ordered array of column ids/names |
813
- | `onColumnOrderChange` | `(order: string[]) => void` | - | Fired when column order changes; drag reordering requires this callback |
814
- | `reorderColumns` | `boolean` | `true` | Disable user drag reordering while continuing to render `columnOrder` |
815
- | `resizable` | `boolean` | `true` | Enable header resize handles |
816
- | `liveColumnResize` | `boolean` | `false` | Resize header and body geometry during drag; callbacks remain completion-only |
817
- | `onColumnResize` | `(info, context) => void` | - | Reports proposed width/flex and reserved viewport width |
818
- | `enableColumnAutosize` | `boolean` | `true` | Estimate widths from a bounded row sample when no numeric width is supplied |
819
- | `skipHeaderOnAutoSize` | `boolean` | `false` | Skip header text when estimating an automatic width |
820
- | `showColumnMenuTool` | `boolean` | `true` | Show the header menu tool |
830
+ | Prop | Type | Default | Description |
831
+ | -------------------------- | ------------------------------- | ------- | ------------------------------------------------------------------------------- |
832
+ | `columnOrder` | `string[]` | - | Controlled ordered array of column ids/names |
833
+ | `defaultColumnOrder` | `string[]` | columns | Initial order for grid-owned ordering |
834
+ | `onColumnOrderChange` | `(order: string[]) => void` | - | Receives reorder proposals; optional for grid-owned ordering |
835
+ | `onColumnVisibleChange` | `({ column, visible }) => void` | - | Receives controlled or uncontrolled visibility proposals |
836
+ | `reorderColumns` | `boolean` | `true` | Disable user drag reordering |
837
+ | `allowGroupSplitOnReorder` | `boolean` | `true` | Allow reordering to split one logical group into visual segments |
838
+ | `resizable` | `boolean` | `true` | Enable header resize handles |
839
+ | `columnDefaultWidth` | `number` | `150` | Root fallback when a column has no width/defaultWidth |
840
+ | `columnMinWidth` | `number` | `40` | Root fallback when a column has no minWidth |
841
+ | `columnMaxWidth` | `number \| null` | `null` | Root fallback when a column has no maxWidth |
842
+ | `shareSpaceOnResize` | `boolean` | `false` | Resize the adjacent visible column in the opposite direction |
843
+ | `columnResizeHandleWidth` | `number` | `24` | Header resize pointer-target width |
844
+ | `columnResizeProxyWidth` | `number` | `5` | Deferred resize-proxy width |
845
+ | `liveColumnResize` | `boolean` | `false` | Resize rendered geometry during drag; callbacks remain completion-only |
846
+ | `onColumnResize` | `(info, context) => void` | - | Reports each proposed width/flex and reserved viewport width |
847
+ | `onBatchColumnResize` | `(entries, context) => void` | - | Reports one coherent callback for every resize transaction |
848
+ | `enableColumnAutosize` | `boolean` | `true` | Estimate widths from a bounded row sample when no numeric width is supplied |
849
+ | `skipHeaderOnAutoSize` | `boolean` | `false` | Skip header text when estimating an automatic width |
850
+ | `showColumnMenuTool` | `boolean` | `true` | Show sort, visibility, auto-size, and fit actions in the accessible column menu |
851
+
852
+ When `columnOrder` is omitted, `defaultColumnOrder` seeds grid-owned ordering
853
+ and drag changes persist even without a callback. When `columnOrder` is
854
+ supplied, it is authoritative: `onColumnOrderChange` receives the proposal and
855
+ the display changes only after the parent returns it. The same ownership rule
856
+ applies to `column.visible` versus `defaultVisible`/`defaultHidden`.
857
+
858
+ Column sizing precedence is controlled `width`, column `defaultWidth` and
859
+ `minWidth`/`maxWidth`, then the root fallbacks. An uncontrolled flex column
860
+ retains flex ownership by default; set `column.keepFlex: false` to convert it to
861
+ fixed sizing after a no-share resize. Shared-space resize preserves the adjacent
862
+ pair's total width and handles fixed/fixed, flex/flex, and mixed pairs.
863
+ Controlled `width` and `flex` values remain prop-owned while both resize
864
+ callbacks receive the proposal.
821
865
 
822
866
  Set `column.locked` to `"start"` or `"end"` to keep it visible at that
823
867
  horizontal edge; `true` is the Inovua-compatible alias for `"start"`. Locked
@@ -844,15 +888,21 @@ those compatibility metrics.
844
888
 
845
889
  ### Filtering
846
890
 
847
- | Prop | Type | Default | Description |
848
- | ------------------------------- | ---------------------------------- | ----------------- | --------------------------------------------------------- |
849
- | `enableFiltering` | `boolean` | inferred | Explicitly show or hide the filter row |
850
- | `filterValue` | `TypeFilterValue` | - | Controlled display state; data ownership remains external |
851
- | `defaultFilterValue` | `TypeFilterValue` | - | Uncontrolled initial state and local filtering input |
852
- | `onFilterValueChange` | `(value: TypeFilterValue) => void` | - | Fired on filter change |
853
- | `filterTypes` | `TypeFilterTypes` | built-in registry | Extend or override filter types and operators |
854
- | `enableColumnFilterContextMenu` | `boolean` | `true` | Operator, activation, Clear, and Clear All menu |
855
- | `filteredRowsCount` | `(count: number) => void` | - | Reports filtered row count |
891
+ | Prop | Type | Default | Description |
892
+ | --------------------------------------- | ---------------------------------------------- | ------------------ | --------------------------------------------------------- |
893
+ | `enableFiltering` | `boolean` | inferred | Explicitly show or hide the filter row |
894
+ | `filterValue` | `TypeFilterValue` | - | Controlled display state; data ownership remains external |
895
+ | `defaultFilterValue` | `TypeFilterValue` | - | Uncontrolled initial state and local filtering input |
896
+ | `onFilterValueChange` | `(value: TypeFilterValue) => void` | - | Fired on filter change |
897
+ | `filterTypes` | `TypeFilterTypes` | built-in registry | Extend or override filter types and operators |
898
+ | `enableColumnFilterContextMenu` | `boolean` | `true` | Operator, activation, Clear, and Clear All menu |
899
+ | `scrollTopOnFilter` | `boolean` | `true` | Reset vertical scroll after a filter commits |
900
+ | `renderColumnFilterContextMenu` | `TypeRenderColumnFilterContextMenu` | - | Render a custom operator menu with grid/cell context |
901
+ | `columnFilterContextMenuAlignPositions` | `string[]` | built-in fallbacks | Configure custom/operator menu alignment candidates |
902
+ | `columnFilterContextMenuConstrainTo` | `boolean \| HTMLElement \| string \| function` | `true` | Supply the custom menu constraint target |
903
+ | `columnFilterContextMenuPosition` | `string` | `"absolute"` | Supply the custom menu positioning mode |
904
+ | `updateMenuPositionOnScroll` | `boolean` | `true` | Request custom menu repositioning while scrolling |
905
+ | `filteredRowsCount` | `(count: number) => void` | - | Reports filtered row count |
856
906
 
857
907
  For Inovua 5.10.2 compatibility, filter-row visibility and local array
858
908
  transformation are separate decisions. With no explicit `enableFiltering`, a
@@ -869,13 +919,42 @@ Disable are explicit menu actions, and Clear All emits one aggregate update.
869
919
 
870
920
  ### Sorting
871
921
 
872
- | Prop | Type | Default | Description |
873
- | ------------------------- | ------------------------------ | ------- | ----------------------------- |
874
- | `sortInfo` | `TypeSortInfo` | - | Controlled sort state |
875
- | `defaultSortInfo` | `TypeSortInfo` | - | Uncontrolled initial sort |
876
- | `onSortInfoChange` | `(info: TypeSortInfo) => void` | - | Fired on sort change |
877
- | `allowUnsort` | `boolean` | `true` | Allow returning to “unsorted” |
878
- | `defaultSortingDirection` | `"asc" \| "desc"` | `"asc"` | Default sort direction |
922
+ | Prop | Type | Default | Description |
923
+ | ------------------------- | ------------------------------ | ------------- | -------------------------------------------------------------- |
924
+ | `sortInfo` | `TypeSortInfo` | - | Controlled sort state |
925
+ | `defaultSortInfo` | `TypeSortInfo` | - | Uncontrolled initial sort |
926
+ | `onSortInfoChange` | `(info: TypeSortInfo) => void` | - | Fired on sort change |
927
+ | `sortable` | `boolean` | `true` | Root sorting switch; `column.sortable` can override it |
928
+ | `allowUnsort` | `boolean` | `true` | Allow a single sort to return to “unsorted” |
929
+ | `defaultSortingDirection` | `"asc" \| "desc"` | `"asc"` | Default sort direction |
930
+ | `sortFunctions` | `TypeSortFunctions` | date registry | Comparator registry addressed by `column.type` |
931
+ | `renderSortTool` | `TypeRenderSortTool` | built-in icon | Root sort-indicator renderer; `column.renderSortTool` wins |
932
+ | `scrollTopOnSort` | `boolean \| "always"` | `true` | Reset vertical scroll on sort, never, or on every data refresh |
933
+
934
+ An object-valued `sortInfo` is single-sort mode. An array-valued sort state is
935
+ persistent multi-sort mode, including when the array contains zero or one
936
+ descriptor; ordinary click, Enter, Space, header-menu, mobile, and imperative
937
+ sort actions retain that array shape without requiring Shift. Descriptor order
938
+ is sort priority, and retoggling a descriptor preserves its position until it
939
+ is removed.
940
+
941
+ Local sorting uses `column.sort` first, then a descriptor `fn`, a
942
+ `sortFunctions[column.type]` registry entry, and finally the built-in
943
+ `number`/`date`/`string` comparator. A named column comparator receives
944
+ `(value1, value2, column, data1, data2, sortInfo)`. An id-only column receives
945
+ the complete rows as `value1` and `value2`. Controlled `sortInfo` remains
946
+ externally owned and is not applied again to local array order.
947
+
948
+ Migration notes for the completed Inovua sorting contract:
949
+
950
+ - Previous releases inferred numeric ordering when both values were
951
+ number-like. Untyped columns now use Inovua's string comparator; declare
952
+ `type: "number"` (or provide a comparator) for numeric ordering.
953
+ - Shift no longer changes a single descriptor into multi-sort mode. Initialize
954
+ `sortInfo` or `defaultSortInfo` as an array to opt into persistent multi-sort.
955
+ - `TypeSingleSortInfo.fn`, `column.sort`, and registered sort functions now
956
+ expose their exact comparator argument lists while retaining Inovua's
957
+ `number | boolean` result compatibility.
879
958
 
880
959
  ### Selection
881
960
 
@@ -944,6 +1023,18 @@ The stable `TypeComputedProps` ref exposes these editing methods and fields:
944
1023
  | `isInEdit.current` | Exposes the upstream lifecycle edit flag. |
945
1024
  | `currentEditCompletePromise.current` | Tracks the current completion callback promise. |
946
1025
 
1026
+ It also exposes behavior-backed column-state methods:
1027
+
1028
+ | Member | Behavior |
1029
+ | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
1030
+ | `setColumnVisible(column, visible)` | Uses the same controlled/uncontrolled ownership and callback path as the built-in menu and optional toolbar. |
1031
+ | `setColumnOrder(order)` | Applies an uncontrolled order or emits a controlled proposal without mutating consumer state. |
1032
+ | `setColumnSizes(action)` / `setColumnFlexes(action)` | Replace grid-owned width/flex maps; declarative `width`/`flex` values remain authoritative. |
1033
+ | `onBatchColumnResize(entries, context?)` | Applies a width/flex transaction and emits per-column plus batch completion callbacks. |
1034
+ | `setColumnSizeAuto(id, skipHeader?)` | Deterministically auto-sizes one resizable visible column. |
1035
+ | `setColumnsSizesAuto(config?)` | Auto-sizes selected or all resizable visible columns as one batch. |
1036
+ | `setColumnSizesToFit()` | Fits resizable visible columns to the viewport while honoring min/max bounds. |
1037
+
947
1038
  Completion is session-safe: an older async completion settling cannot clear or
948
1039
  navigate a newer edit. The editor is already stopped when `onEditComplete`
949
1040
  runs; rejecting its Promise leaves it stopped and suppresses keyboard
@@ -0,0 +1,10 @@
1
+ # Third-party notices
2
+
3
+ the-datagrid provides a compatibility layer for the public Community API of
4
+ `@inovua/reactdatagrid-community@5.10.2`. Inovua ReactDataGrid is Copyright
5
+ INOVUA TRADING and is distributed under the MIT License. Its license is
6
+ available in the upstream package and repository:
7
+ https://github.com/inovua/reactdatagrid
8
+
9
+ This notice documents API provenance. the-datagrid's implementation and
10
+ shadcn/Tailwind presentation are maintained independently.