@zambon-dev/ui 1.8.0 → 1.10.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 CHANGED
@@ -27,6 +27,46 @@ packages are listed under [Package history](#package-history) at the end.
27
27
 
28
28
  ### ⚠ Breaking Changes / Migration
29
29
 
30
+ ## [1.10.0] - 2026-12-05
31
+
32
+ ### Added
33
+
34
+ - Ctrl+C, or Cmd+C on a Mac, on a focused `lib-data-grid` row copies rows as tab-separated text, one line per row, ready to paste into a spreadsheet. A multi-select grid with ticked rows copies those; otherwise the focused row. Cells are copied as they show: typed columns formatted, `enum` and `badge` values translated, booleans as their screen-reader text. `actions` and hidden columns are left out. Without the Clipboard API the keys do nothing, and a text selection is left to the browser's own copy. Screen readers hear the new `copiedText` and `copiedRowText` settings ("Copied {{ count }} rows" and "Copied 1 row", or the framework keys `Grid-Copied` and `Grid-CopiedRow`, in English and Portuguese).
35
+ - The new `density` grid setting takes `comfortable` (the default, as before) or `compact`, which uses 32px rows, a slimmer header and tighter cells. A `rowHeight` other than the default 41.6px still wins. `DataGridDataset.effectiveRowHeight` gives the height in use, and `DEFAULT_GRID_ROW_HEIGHT`, `COMPACT_GRID_ROW_HEIGHT` and `DataGridDensity` are exported.
36
+ - The new `pinFirstColumn` grid setting keeps the first visible column, and the selection column of a multi-select grid, in place while the grid scrolls sideways, with a line where the pinned part ends. Default `false`.
37
+
38
+ ### Changed
39
+
40
+ - The text in `lib-data-grid` cells can now be selected and copied. The header, the selection checkboxes and the action buttons stay unselectable. A click that ends a text selection no longer selects or focuses the row, and a double click still opens the record without selecting a word.
41
+
42
+ ### Fixed
43
+
44
+ - When the `lib-data-grid` columns are wider than the grid, the horizontal scrollbar no longer covers half of the last row, and a few rows no longer get a vertical scrollbar. The grid grows by the scrollbar's height.
45
+
46
+ ## [1.9.0] - 2026-12-05
47
+
48
+ ### Added
49
+
50
+ - `lib-data-grid` follows the WAI-ARIA grid pattern, at row level. The header and rows have the `grid`, `row`, `columnheader` and `gridcell` roles, with `aria-rowindex`, `aria-rowcount` (from `totalRows` when the load returns it), `aria-selected` and, in a multi-select grid, `aria-multiselectable`. The new `gridLabel` setting names the grid for screen readers, as a translation key or plain text; it has no default.
51
+ - `lib-data-grid` works from the keyboard. The grid is one Tab stop: the focused row, or the first row. Arrow Up and Down, Home, End, Page Up and Page Down move between rows and make the row the dataset's focused row; a single-select grid selects it, as a click does. A row outside the rendered rows is scrolled into view and focused, and moving near the end loads the next block. Space selects or clears the row in a multi-select grid. Enter emits `rowActivated`, so the framework's Open button opens the record on Enter as it does on a double click. A disabled grid ignores the keys. The focused row shows a `--color-focus-ring` outline.
52
+ - `DataGridDataset.moveFocusedRow(key)` focuses a row the way the arrow keys do: it selects only in a single-select grid.
53
+ - Screen readers hear the grid's loading, lazy-load, empty and failure messages through a polite status region.
54
+ - Users can hide and show `lib-data-grid` columns. The new `columnChooser` grid setting adds a button at the end of the header that opens a list of the columns with a checkbox each, and a Reset columns button. The last visible data column cannot be hidden. New column props: `hidden` starts a column hidden, and `hideable: false` keeps one always visible; `actions` columns are not hideable unless they say so. The button and the reset have the new `columnChooserText` and `resetColumnsText` settings ("Choose columns" and "Reset columns", or the framework keys `Grid-Columns` and `Grid-ResetColumns`).
55
+ - Users can resize `lib-data-grid` columns. The new `resizableColumns` grid setting adds a handle at the end of each header cell, except on the selection and `actions` columns. Drag it, or focus it and press Arrow Left or Arrow Right to change the width by 16px; a double click gives the column its declared `size` back. Columns are at least 48px wide. The handle is a `separator` named by the new `resizeColumnText` setting ("Resize {{ column }}", or the framework key `Grid-ResizeColumn`).
56
+ - The new `columnsStateKey` grid setting keeps the hidden columns and the widths in `localStorage` under `zambon-dev.grid.{key}`, as `{ hidden, widths }` by column `field`, and restores them when the grid starts. Reset columns clears it.
57
+ - `DataGridDataset` has `visibleColumns`, `isColumnHidden`, `isColumnHideable`, `canHideColumn`, `setColumnHidden`, `getColumnWidth`, `setColumnWidth`, `resetColumns`, `restoreColumnsState` and `saveColumnsState`, to read and change the columns from code. `IGridColumnsState` and `MIN_GRID_COLUMN_WIDTH` are exported.
58
+
59
+ ### Changed
60
+
61
+ - The row checkbox of `lib-data-grid` is no longer a Tab stop (`tabindex="-1"`); keyboard users select with Space and open with Enter on the row. Row action buttons are Tab stops only in the grid's tabbable row, so Tab goes from that row to its actions, then out of the grid. The select-all checkbox stays a Tab stop.
62
+ - The selection cell of a `lib-data-grid` row is now a `div` with a `label` inside, instead of a `label`. Styles that targeted `label.cell.selection` need `.cell.selection` instead.
63
+ - The header and rows of `lib-data-grid` sit in a new wrapper with the `grid` class, inside a `grid-frame` wrapper, between the toolbar and the total. Each heading's text is in a `header-text` span. Styles that relied on `.header` or `.body` being direct children of the host need updating.
64
+
65
+ ### Fixed
66
+
67
+ - The focused `lib-data-grid` row now gets the `focused` class and its stronger border. The class never applied.
68
+ - A click on the edge of a row's selection cell, next to the checkbox, selects or clears the row once. It used to toggle it twice, so the row stayed as it was; with `selectOnClick: false` the checkbox showed ticked anyway.
69
+
30
70
  ## [1.8.0] - 2026-12-05
31
71
 
32
72
  ### Added
@@ -2794,7 +2834,9 @@ URL) in `AppConfig`, and implement a hub that pushes the notification list to cl
2794
2834
  available via [GitHub Releases](https://github.com/RicardoZambon/ZLibraries/releases) and the
2795
2835
  `shared-v*` tags.
2796
2836
 
2797
- [Unreleased]: https://github.com/RicardoZambon/ZLibraries/compare/ui-v1.8.0...HEAD
2837
+ [Unreleased]: https://github.com/RicardoZambon/ZLibraries/compare/ui-v1.10.0...HEAD
2838
+ [1.10.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.10.0
2839
+ [1.9.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.9.0
2798
2840
  [1.8.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.8.0
2799
2841
  [1.7.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.7.0
2800
2842
  [1.6.1]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.6.1
@@ -5657,7 +5657,12 @@ var FrameworkGridConfigsProvider = class FrameworkGridConfigsProvider extends Da
5657
5657
  totalRowsText: "Grid-TotalRows",
5658
5658
  totalRowText: "Grid-TotalRow",
5659
5659
  booleanTrueText: "Grid-Yes",
5660
- booleanFalseText: "Grid-No"
5660
+ booleanFalseText: "Grid-No",
5661
+ columnChooserText: "Grid-Columns",
5662
+ resetColumnsText: "Grid-ResetColumns",
5663
+ resizeColumnText: "Grid-ResizeColumn",
5664
+ copiedText: "Grid-Copied",
5665
+ copiedRowText: "Grid-CopiedRow"
5661
5666
  });
5662
5667
  }
5663
5668
  static ɵfac = i0.ɵɵngDeclareFactory({