@zambon-dev/ui 1.7.0 → 1.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 +44 -1
- package/fesm2022/zambon-dev-ui-framework.mjs +23 -5
- package/fesm2022/zambon-dev-ui-framework.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-library.mjs +3068 -2558
- package/fesm2022/zambon-dev-ui-library.mjs.map +1 -1
- package/i18n/framework/en.json +5 -0
- package/i18n/framework/pt.json +5 -0
- package/package.json +1 -1
- package/styles/components/input.scss +13 -0
- package/types/zambon-dev-ui-framework.d.ts +11 -1
- package/types/zambon-dev-ui-library.d.ts +330 -6
package/CHANGELOG.md
CHANGED
|
@@ -27,6 +27,47 @@ packages are listed under [Package history](#package-history) at the end.
|
|
|
27
27
|
|
|
28
28
|
### ⚠ Breaking Changes / Migration
|
|
29
29
|
|
|
30
|
+
## [1.9.0] - 2026-12-05
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- `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.
|
|
35
|
+
- `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.
|
|
36
|
+
- `DataGridDataset.moveFocusedRow(key)` focuses a row the way the arrow keys do: it selects only in a single-select grid.
|
|
37
|
+
- Screen readers hear the grid's loading, lazy-load, empty and failure messages through a polite status region.
|
|
38
|
+
- 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`).
|
|
39
|
+
- 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`).
|
|
40
|
+
- 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.
|
|
41
|
+
- `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.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- 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.
|
|
46
|
+
- 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.
|
|
47
|
+
- 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.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- The focused `lib-data-grid` row now gets the `focused` class and its stronger border. The class never applied.
|
|
52
|
+
- 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.
|
|
53
|
+
|
|
54
|
+
## [1.8.0] - 2026-12-05
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- A double click on a `lib-data-grid` row emits the new `rowActivated` event on the dataset, with the row's data. A disabled grid emits nothing.
|
|
59
|
+
- A multi-select grid has a select-all checkbox in its header. It is ticked when every loaded row is selected and mixed when some are. Clicking it selects or clears every loaded row; rows not loaded yet are not selected.
|
|
60
|
+
- The select-all and row checkboxes have accessible names, set with the new `selectAllText` and `selectRowText` grid settings. The library defaults are `Select all rows` and `Select row`. The framework's grid settings use the new `Grid-SelectAll` and `Grid-SelectRow` keys, in English and Portuguese.
|
|
61
|
+
- Grid columns with `type: 'actions'` show a compact icon button per entry of `actions` in each row, such as edit or delete. Each `IGridRowAction` has an `icon`, a `label` (accessible name and tooltip), a `handler` that receives the row, and optional `intent: 'danger'`, `visible` and `disabled`. A click runs the handler without selecting or opening the row.
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- In framework list views, a double click on a row now opens the record, the same way the Open button (`framework-button-open-record`) does. Screens with an Open button get it with no change. Set the new `openOnDoubleClick` grid setting to `false` to turn it off.
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- A `.form-input` checkbox in the partial ("some, not all") state shows a dash on the accent fill. It used to look empty.
|
|
70
|
+
|
|
30
71
|
## [1.7.0] - 2026-12-05
|
|
31
72
|
|
|
32
73
|
### Added
|
|
@@ -2777,7 +2818,9 @@ URL) in `AppConfig`, and implement a hub that pushes the notification list to cl
|
|
|
2777
2818
|
available via [GitHub Releases](https://github.com/RicardoZambon/ZLibraries/releases) and the
|
|
2778
2819
|
`shared-v*` tags.
|
|
2779
2820
|
|
|
2780
|
-
[Unreleased]: https://github.com/RicardoZambon/ZLibraries/compare/ui-v1.
|
|
2821
|
+
[Unreleased]: https://github.com/RicardoZambon/ZLibraries/compare/ui-v1.9.0...HEAD
|
|
2822
|
+
[1.9.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.9.0
|
|
2823
|
+
[1.8.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.8.0
|
|
2781
2824
|
[1.7.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.7.0
|
|
2782
2825
|
[1.6.1]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.6.1
|
|
2783
2826
|
[1.6.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.6.0
|
|
@@ -2576,19 +2576,32 @@ var ButtonOpenRecordComponent = class ButtonOpenRecordComponent extends BaseButt
|
|
|
2576
2576
|
get isSelectedOneRecord() {
|
|
2577
2577
|
return this.selectionCount() === 1;
|
|
2578
2578
|
}
|
|
2579
|
+
get canOpen() {
|
|
2580
|
+
return !this.disabled() && this.isAccessLoaded() && this.isVisible();
|
|
2581
|
+
}
|
|
2579
2582
|
ngOnInit() {
|
|
2580
2583
|
this.dataGridDataset.selectedRowsChanged.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
2581
2584
|
this.selectionCount.set(this.dataGridDataset.selectedRowKeys.length);
|
|
2582
2585
|
});
|
|
2586
|
+
this.dataGridDataset.rowActivated.pipe(takeUntil(this.destroy$)).subscribe((rowData) => {
|
|
2587
|
+
this.onRowActivated(rowData);
|
|
2588
|
+
});
|
|
2583
2589
|
}
|
|
2584
2590
|
onButtonClicked() {
|
|
2585
|
-
if (
|
|
2591
|
+
if (!this.canOpen || !this.isSelectedOneRecord) return;
|
|
2592
|
+
const selectedKey = this.dataGridDataset.selectedRowKeys[0];
|
|
2593
|
+
this.openRecord(this.dataGridDataset.getRowID(selectedKey));
|
|
2594
|
+
}
|
|
2595
|
+
onRowActivated(rowData) {
|
|
2596
|
+
if (this.dataGridDataset.configs?.openOnDoubleClick === false || !this.canOpen || !rowData) return;
|
|
2597
|
+
const key = this.dataGridDataset.getRowInternalKey(rowData);
|
|
2598
|
+
this.openRecord(this.dataGridDataset.getRowID(key));
|
|
2599
|
+
}
|
|
2600
|
+
openRecord(id) {
|
|
2586
2601
|
let path = this.rootPath() ?? this.router.url;
|
|
2587
2602
|
const elementPath = this.elementPath();
|
|
2588
2603
|
if (elementPath) path += `/${elementPath}`;
|
|
2589
|
-
|
|
2590
|
-
const selectedID = this.dataGridDataset.getRowID(selectedKey);
|
|
2591
|
-
path += `/${selectedID}`;
|
|
2604
|
+
path += `/${id}`;
|
|
2592
2605
|
this.tabService.navigateCurrentTab(new Tab({
|
|
2593
2606
|
entityBaseUrl: path,
|
|
2594
2607
|
url: path
|
|
@@ -5639,10 +5652,15 @@ var FrameworkGridConfigsProvider = class FrameworkGridConfigsProvider extends Da
|
|
|
5639
5652
|
messageOnEmpty: "Grid-Message-Empty",
|
|
5640
5653
|
messageOnFailed: "Grid-Message-Failed",
|
|
5641
5654
|
messageOnLazyLoad: "Grid-Message-LazyLoad",
|
|
5655
|
+
selectAllText: "Grid-SelectAll",
|
|
5656
|
+
selectRowText: "Grid-SelectRow",
|
|
5642
5657
|
totalRowsText: "Grid-TotalRows",
|
|
5643
5658
|
totalRowText: "Grid-TotalRow",
|
|
5644
5659
|
booleanTrueText: "Grid-Yes",
|
|
5645
|
-
booleanFalseText: "Grid-No"
|
|
5660
|
+
booleanFalseText: "Grid-No",
|
|
5661
|
+
columnChooserText: "Grid-Columns",
|
|
5662
|
+
resetColumnsText: "Grid-ResetColumns",
|
|
5663
|
+
resizeColumnText: "Grid-ResizeColumn"
|
|
5646
5664
|
});
|
|
5647
5665
|
}
|
|
5648
5666
|
static ɵfac = i0.ɵɵngDeclareFactory({
|