@opencorestack/opengridx 3.8.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.es.js.map +1 -1
- package/dist/index.d.ts +342 -3
- package/dist/opengridx.css +1 -1
- package/dist/opengridx.es.js +6952 -6697
- package/dist/opengridx.es.js.map +1 -1
- package/dist/opengridx.umd.js +17 -17
- package/dist/opengridx.umd.js.map +1 -1
- package/docs/API_REFERENCE.md +121 -4
- package/docs/customization/theming.md +11 -2
- package/docs/features/ai-toolkit.md +1 -1
- package/lib/components/AiAssistant/GridAiAssistantPanel.css +2 -2
- package/lib/components/AiAssistant/GridAiAssistantPanel.tsx +16 -14
- package/lib/components/Cell/Cell.css +1 -3
- package/lib/components/Cell/CellErrorBoundary.tsx +17 -10
- package/lib/components/CellSelectionStats/CellSelectionStats.tsx +5 -3
- package/lib/components/ColumnGroupHeader/ColumnGroupHeader.css +1 -2
- package/lib/components/ColumnResizeHandle/ColumnResizeHandle.tsx +3 -1
- package/lib/components/ColumnVisibilityPanel/ColumnVisibilityPanel.tsx +6 -4
- package/lib/components/DataGrid/DataGrid.css +1 -28
- package/lib/components/DataGrid/GridAggregationFooter.tsx +3 -1
- package/lib/components/DataGrid/GridErrorOverlay.tsx +4 -2
- package/lib/components/DataGrid/GridListView.tsx +7 -5
- package/lib/components/DataGrid/GridLiveRegion.tsx +5 -3
- package/lib/components/DataGrid/GridLoadingOverlay.tsx +3 -1
- package/lib/components/DataGrid/GridPinnedRows.tsx +1 -1
- package/lib/components/DataGrid/GridRoot.tsx +8 -1
- package/lib/components/DataGrid/GridStandaloneColumnPanel.tsx +3 -1
- package/lib/components/DataGrid/GridViewport.tsx +3 -1
- package/lib/components/DataGrid/GridVirtualRows.tsx +3 -2
- package/lib/components/DataGrid/gridLocaleContext.ts +13 -0
- package/lib/components/FilterPanel/FilterPanel.tsx +25 -56
- package/lib/components/Header/ColumnMenu.css +5 -5
- package/lib/components/Header/ColumnMenu.tsx +17 -15
- package/lib/components/Header/Header.css +2 -11
- package/lib/components/Header/Header.tsx +8 -6
- package/lib/components/HeaderFilter/HeaderFilterCell.tsx +6 -37
- package/lib/components/HeaderFilter/HeaderFilterRow.tsx +3 -1
- package/lib/components/ListView/ListView.css +0 -16
- package/lib/components/ListView/ListViewRow.tsx +3 -1
- package/lib/components/Pagination/Pagination.tsx +15 -18
- package/lib/components/QuickFilter/QuickFilter.tsx +5 -2
- package/lib/components/Row/Row.tsx +9 -4
- package/lib/components/Toolbar/GlobalSearch.tsx +6 -3
- package/lib/components/Toolbar/GridToolbar.tsx +35 -29
- package/lib/components/Toolbar/PivotPanel.tsx +26 -24
- package/lib/components/ui/Checkbox.css +5 -5
- package/lib/components/ui/DragHandleIcon.tsx +3 -1
- package/lib/components/ui/ExpandIcon.css +3 -3
- package/lib/components/ui/ExpandIcon.tsx +3 -1
- package/lib/hooks/core/useGridRowInteractions.ts +13 -3
- package/lib/hooks/core/useGridToolbarStack.ts +2 -2
- package/lib/hooks/core/useGridVirtualization.ts +40 -25
- package/lib/hooks/core/useShallowStableValue.ts +29 -0
- package/lib/hooks/features/useGridAiAssistant.ts +52 -22
- package/lib/hooks/features/useGridSpanning.ts +1 -1
- package/lib/styles/base/reset.css +6 -7
- package/lib/theme/DataGridThemeProvider.tsx +9 -0
- package/lib/theme/__baseline__/default-theme.darwin.chromium.json +1 -1503
- package/lib/theme/__baseline__/default-theme.darwin.firefox.json +1 -1503
- package/lib/theme/__baseline__/default-theme.darwin.webkit.json +1 -1503
- package/lib/theme/types.ts +18 -0
- package/lib/types/locale.ts +344 -0
- package/lib/types/rows.ts +0 -2
- package/lib/utils/cellSelection.ts +0 -2
- package/lib/utils/editing/index.ts +1 -1
- package/lib/utils/filtering/filterInput.ts +45 -0
- package/lib/utils/filtering/index.ts +0 -28
- package/lib/utils/gridLocale.ts +241 -0
- package/lib/utils/pinning/index.ts +0 -107
- package/lib/utils/sorting/index.ts +42 -33
- package/lib/utils/values.ts +5 -1
- package/llms.txt +9 -3
- package/package.json +1 -1
- package/lib/theme/defaultStyles.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,53 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [3.9.0] — 2026-10-13
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Nine theme keys** (additive; each defaults to exactly what the grid draws today, checked by the default-theme baseline in Chromium, Firefox and WebKit): `grid.checkboxCheckedBackground` (`--ogx-checkbox-checked-bg`, the fill and border of a checked or indeterminate checkbox, default the primary colour), `grid.checkboxCheckmark` (`--ogx-checkbox-checkmark`, default white), `grid.expandIconColor` / `expandIconHoverColor` (`--ogx-expand-icon-color` / `-hover-color`, the group and tree chevron, default header text / row text), and for menus `overlays.itemIndicatorColor` (`--ogx-overlay-item-indicator`, the selection dot, default the selected item text), `itemSelectedIcon` (`--ogx-overlay-item-selected-icon`, default primary), `iconColor` (`--ogx-overlay-icon`, default gray-400), `sectionLabelText` (`--ogx-overlay-section-label-text`, default gray-400) and `dividerColor` (`--ogx-overlay-divider`, default the overlay border).
|
|
13
|
+
- **Theme Builder controls** for those keys and for existing keys it did not offer: a *Checkboxes* group (background, border, checked fill, check mark), a *Group and tree rows* group (chevron, chevron hover), *Selected row hover*, a *Toolbar and search box* group (toolbar text, search box background, text, border, focus border), and in *Column menu and panels* the item hover text, selected item text, selection dot, selected item icon, icons, section labels, dividers and danger item colours.
|
|
14
|
+
|
|
15
|
+
- **`localeText` covers every built-in UI string** (196 optional keys, additive; without them the grid shows the same English as before): the column menu, toolbar and quick search, filter panel (including operator names), columns panel, pivot panel, AI assistant panel and its status line, pagination buttons, row and header checkboxes and handles, cell selection statistics, list view, loading and error overlays, the error cell and screen-reader announcements. The strings are resolved once per grid and shared through a context, so rows read them without a new prop. Components used outside a grid (`GridToolbar`, `ColumnVisibilityPanel`, `FilterPanel`) show English; their explicit props still win. Not covered: the AI assistant's change-chip texts, the grouping column's default header (`groupingColDef.headerName` sets it), and row data or file contents such as the pivot "Grand Total" row and export subtotals. An inline `localeText` object of strings keeps the rows memoised; function entries are compared by identity. See *Locale text for every UI string* in `docs/API_REFERENCE.md`; the Locale Text demo shows a French grid.
|
|
16
|
+
|
|
17
|
+
### Demo
|
|
18
|
+
|
|
19
|
+
- **Sidebar reorganised by what developers look for first**: *Getting started* (with Basic Usage and the API reference), *Sorting & filtering*, *Editing*, *Pagination & server data*, *Export & clipboard*, *Grouping & aggregation*, *Selection & spreadsheet*, *Layout*, *Theming & customization*, *AI*, *Advanced*, *Tutorials*, then *Resources* (licensing, support, migration guides). Page URLs are unchanged. Text pages are marked `doc` (full width) instead of relying on their category.
|
|
20
|
+
- The header shows the package version from `package.json` (it was fixed at v3.7.0).
|
|
21
|
+
|
|
22
|
+
### Performance
|
|
23
|
+
|
|
24
|
+
- **Selecting a row, starting or committing an edit, and scrolling no longer re-render every visible row.** Three props broke the rows' memoisation: the row click and checkbox handlers changed identity on every selection change (they now keep one identity and read the latest handlers when called), `editingCell` was passed to every row (now only to the row being edited), and the visible column list was rebuilt on every row change or vertical scroll (it now has its own memo over column widths and the horizontal scroll). Measured on the editing demo: a click re-rendered all 14 visible rows, now 1; starting an edit re-rendered all rows twice, now 2 renders in total. Guarded by `DataGrid.rowMemo.test.tsx`.
|
|
25
|
+
|
|
26
|
+
### Internal
|
|
27
|
+
|
|
28
|
+
- Four tests that failed now and then under load are steadier: the row and column drag-reorder browser test releases the mouse before and after each test and waits for layout; the header-filter scroll test clicks at the cell's coordinates (Playwright's click scrolled the cell into view, which re-rendered the virtualized rows and detached it); the PDF heartbeat test takes the better of two runs; the tree-data linear-time test interleaves its two sizes over five rounds.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## [3.8.1] — 2026-10-13
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- **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.
|
|
37
|
+
- **`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).
|
|
38
|
+
- **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).
|
|
39
|
+
- 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.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Internal
|
|
43
|
+
|
|
44
|
+
- 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).
|
|
45
|
+
- 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).
|
|
46
|
+
- The filter panel and the header filter row share their value helpers (`lib/utils/filtering/filterInput.ts`) instead of two copies.
|
|
47
|
+
|
|
48
|
+
### Documentation
|
|
49
|
+
|
|
50
|
+
- `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.
|
|
51
|
+
- `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`.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
8
55
|
## [3.8.0] — 2026-10-13
|
|
9
56
|
|
|
10
57
|
### Performance
|