@opencorestack/opengridx 3.7.1 → 3.8.1

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 (59) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/ai.cjs.map +1 -1
  3. package/dist/ai.es.js.map +1 -1
  4. package/dist/index.d.ts +2 -2
  5. package/dist/opengridx.css +1 -1
  6. package/dist/opengridx.es.js +6043 -5979
  7. package/dist/opengridx.es.js.map +1 -1
  8. package/dist/opengridx.umd.js +16 -16
  9. package/dist/opengridx.umd.js.map +1 -1
  10. package/docs/API_REFERENCE.md +28 -0
  11. package/docs/features/filtering.md +2 -0
  12. package/lib/components/AiAssistant/GridAiAssistantPanel.css +2 -2
  13. package/lib/components/Cell/Cell.css +1 -3
  14. package/lib/components/ColumnGroupHeader/ColumnGroupHeader.css +1 -2
  15. package/lib/components/DataGrid/DataGrid.css +1 -28
  16. package/lib/components/DataGrid/DataGrid.tsx +2 -4
  17. package/lib/components/DataGrid/GridListView.tsx +1 -1
  18. package/lib/components/DataGrid/GridPinnedRows.tsx +1 -1
  19. package/lib/components/DataGrid/GridVirtualRows.tsx +3 -2
  20. package/lib/components/FilterPanel/FilterPanel.tsx +7 -39
  21. package/lib/components/Header/Header.css +2 -11
  22. package/lib/components/HeaderFilter/HeaderFilterCell.tsx +6 -37
  23. package/lib/components/ListView/ListView.css +0 -16
  24. package/lib/components/Row/Row.tsx +4 -1
  25. package/lib/hooks/core/useDataGrid.ts +40 -35
  26. package/lib/hooks/core/useGridAggregationApi.ts +1 -1
  27. package/lib/hooks/core/useGridCellSelection.ts +3 -4
  28. package/lib/hooks/core/useGridClipboardPaste.ts +1 -1
  29. package/lib/hooks/core/useGridDetailPanel.ts +1 -1
  30. package/lib/hooks/core/useGridFillHandle.ts +1 -1
  31. package/lib/hooks/core/useGridHierarchy.ts +2 -2
  32. package/lib/hooks/core/useGridKeyboardNavigation.ts +1 -1
  33. package/lib/hooks/core/useGridLiveRowSelection.ts +9 -2
  34. package/lib/hooks/core/useGridRangeEditing.ts +1 -1
  35. package/lib/hooks/core/useGridRowInteractions.ts +3 -2
  36. package/lib/hooks/features/useGridSpanning.ts +4 -4
  37. package/lib/hooks/useRowGrouping.ts +19 -10
  38. package/lib/hooks/useRowReorder.ts +9 -3
  39. package/lib/styles/base/reset.css +6 -7
  40. package/lib/theme/__baseline__/default-theme.darwin.chromium.json +1 -1503
  41. package/lib/theme/__baseline__/default-theme.darwin.firefox.json +1 -1503
  42. package/lib/theme/__baseline__/default-theme.darwin.webkit.json +1 -1503
  43. package/lib/types/rows.ts +0 -2
  44. package/lib/types/state.ts +9 -0
  45. package/lib/utils/cellSelection.ts +0 -2
  46. package/lib/utils/editing/index.ts +1 -1
  47. package/lib/utils/editing/targets.ts +2 -3
  48. package/lib/utils/filtering/filterInput.ts +45 -0
  49. package/lib/utils/filtering/index.ts +0 -28
  50. package/lib/utils/gridApiRows.ts +1 -1
  51. package/lib/utils/grouping/groupedExportRows.ts +1 -1
  52. package/lib/utils/grouping/layeredMap.ts +52 -0
  53. package/lib/utils/pinning/index.ts +0 -107
  54. package/lib/utils/rowIndex.ts +67 -0
  55. package/lib/utils/sorting/index.ts +42 -33
  56. package/lib/utils/values.ts +5 -1
  57. package/llms.txt +7 -3
  58. package/package.json +1 -1
  59. package/lib/theme/defaultStyles.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,47 @@
5
5
 
6
6
  ---
7
7
 
8
+ ## [3.8.1] — 2026-10-13
9
+
10
+ ### Fixed
11
+
12
+ - **Buttons inside the grid show their own background and border again.** A reset rule from the first release (`.ogx button:not(.ogx-menu-item)`) out-ranked the buttons' own classes and removed their background and border: the AI assistant's Ask button had no fill (dark text on the dark panel in dark mode), its suggestions and the Undo / microphone buttons had no outline, and the open or active states of the toolbar's Columns / Filters buttons and the header filter's operator button had no background. The reset's background and border now have zero specificity (`:where()`); its font and cursor rules are unchanged. The default-theme baseline (`lib/theme/__baseline__/`) was regenerated: the only differences are those three open / active backgrounds.
13
+ - **`bigint` values sort exactly.** Values beyond ±2^53 were compared as their nearest double, so neighbours could tie or swap. When a column holds such a value, its numbers are ranked with an exact comparison (other columns are unchanged).
14
+ - **Number filters no longer read `0x10`, `0b1`, `0o7`, `Infinity` or `1e999` typed as text as numbers** (`toNumber` in `lib/utils/values.ts`, which number filters, the number column's quick-filter and sorting coercion share).
15
+ - The AI assistant's suggestion pills and change chips were drawn as ellipses: they read `--ogx-border-radius-round`, which is `50%`. They use a fixed pill radius now.
16
+
17
+
18
+ ### Internal
19
+
20
+ - Removed code nothing called: seven pinning helpers (`isColumnPinnable`, `pinColumn`, `unpinColumn`, `getPinnedColumnsWidth`, `pinRow`, `unpinRow`, `getPinnedRowsCount`), `isRowMatchingFilter`, `getDefaultOperator`, `compareRowsBySortModel`, `isSingleCellRange` and the empty `lib/theme/defaultStyles.ts` (none were exported from the package). Removed the CSS rules of nine classes the grid never sets: `ogx--dark`, `ogx--density-compact`, `ogx--density-comfortable`, `ogx--dragging`, `ogx--list-auto`, `ogx--loading`, `ogx__cell--editable`, `ogx__header-cell--focus-visible` and `ogx__menu-icon-btn--active`. CSS variables are kept (they are public tokens).
21
+ - Infinite-scroll placeholder rows are drawn through a `skeleton` prop on the internal `Row` instead of a `_isSkeleton` field, which is gone from `GridRowModel` (it was marked internal; the type's index signature still accepts any field).
22
+ - The filter panel and the header filter row share their value helpers (`lib/utils/filtering/filterInput.ts`) instead of two copies.
23
+
24
+ ### Documentation
25
+
26
+ - `llms.txt` updated to 3.8.1: corrected the row-limit note (Firefox's lower limit, the 3.5.1 height cap) and the RTL note (pinned columns work since 3.6), and added notes on replacing rows instead of mutating them, large-grid timings, styling buttons inside the grid and the quick filter's displayed text.
27
+ - `docs/API_REFERENCE.md` covers every export of the package: the export option types (`CsvExportOptions`, `JsonExportOptions`, `ExcelExportOptions`, `ExcelAdvancedExportOptions`, `ExcelSheetDefinition`, `ExcelColumnStyle`), the theme part types and `DataGridThemeProviderProps`, and `GridAlignment`, `GridSortDirection`, `GridSortModel`, `GridPinnedPosition`.
28
+
29
+ ---
30
+
31
+ ## [3.8.0] — 2026-10-13
32
+
33
+ ### Performance
34
+
35
+ - **Cell edits, paste, undo, redo and fill no longer re-process every row.** A committed edit updates the row store's id maps in place and patches only the edited positions of the row array, instead of copying two maps and rebuilding the array. The row-reorder index comes from the store. The id lists that cell selection, paste / fill / undo targets and row selection derive from the displayed rows are reused when an edit leaves every row at its position with its id (a reference comparison per row, a lookup only for replaced rows). Measured at 1,000,000 rows in Chromium (Apple M1): one cell edit 561 → ~35 ms, paste of 1,000 × 10 cells ~790 → ~45 ms, undo / redo ~790 → ~45 ms, fill of 1,000 cells 809 → ~50 ms.
36
+ - **Expanding and collapsing a group no longer rebuilds row metadata for every row.** Leaf rows' `GridRowMeta` objects are built once per grouping tree; a toggle rebuilds only the group rows' entries and reads both through one read-only map. At 1,000,000 rows: expand 279 → ~135 ms, collapse ~120 → ~1 ms.
37
+ - Row selection checks for removed ids before copying the selection, so selecting all rows no longer copies the selection once more.
38
+
39
+ ### Documentation
40
+
41
+ - `docs/features/filtering.md` (*Quick Filter*): the searched text is cached per row object, so rows must be replaced, not mutated, and a `valueFormatter` that reads outside state needs new column definitions when that state changes.
42
+
43
+ ### Internal
44
+
45
+ - `GridInternalState.rows` also holds `rows` (the stored rows in order) and `indexById`. `GridApi.getAllRows()` returns a copy of it. New `lib/utils/rowIndex.ts` (`getRowIndex`) and `lib/utils/grouping/layeredMap.ts` (`LayeredMap`); internal `rowMetaMap` parameters are typed `ReadonlyMap`.
46
+
47
+ ---
48
+
8
49
  ## [3.7.1] — 2026-10-13
9
50
 
10
51
  ### Fixed