@zambon-dev/ui 1.12.0 → 1.12.2

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,26 @@ packages are listed under [Package history](#package-history) at the end.
27
27
 
28
28
  ### ⚠ Breaking Changes / Migration
29
29
 
30
+ ## [1.12.2] - 2026-12-06
31
+
32
+ ### Changed
33
+
34
+ - **`selectedRowKeys` on a data grid dataset gives a copy.** Before, it gave the dataset's own
35
+ list, so a list you kept changed with the next selection, and removing the selected rows emptied
36
+ it. Keep the copy as long as you need. Setting `selectedRowKeys` keeps a copy of your list too.
37
+ Code that kept the list to see the selection change, or changed the list to change the selection,
38
+ must change. Read `selectedRowKeys` again when you need it, or listen to `selectedRowsChanged`.
39
+ Change the selection with `selectRow`, `deselectRow`, `selectRows` or `clearSelection`.
40
+
41
+ ### Fixed
42
+
43
+ - **`utcDate` showed a date with no time as the day before.** A value such as `2026-12-05` is a
44
+ calendar day, but the pipe shifted it by the time zone, so west of Greenwich, as in Brazil, it
45
+ showed 4 December. It now comes back as the start of the same day in local time. A day the
46
+ calendar does not have, such as `2026-02-30`, gives `null`.
47
+ - **`ng add` said components render before the packages were installed.** Its closing message
48
+ now says they render once its packages are installed.
49
+
30
50
  ## [1.12.0] - 2026-12-06
31
51
 
32
52
  ### Added
@@ -2921,7 +2941,8 @@ URL) in `AppConfig`, and implement a hub that pushes the notification list to cl
2921
2941
  available via [GitHub Releases](https://github.com/RicardoZambon/ZLibraries/releases) and the
2922
2942
  `shared-v*` tags.
2923
2943
 
2924
- [Unreleased]: https://github.com/RicardoZambon/ZLibraries/compare/ui-v1.12.0...HEAD
2944
+ [Unreleased]: https://github.com/RicardoZambon/ZLibraries/compare/ui-v1.12.2...HEAD
2945
+ [1.12.2]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.12.2
2925
2946
  [1.12.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.12.0
2926
2947
  [1.11.1]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.11.1
2927
2948
  [1.11.0]: https://github.com/RicardoZambon/ZLibraries/releases/tag/ui-v1.11.0
@@ -1466,10 +1466,10 @@ var DataGridDataset = class DataGridDataset extends GridDataset {
1466
1466
  columnWidths = signal({}, ...ngDevMode ? [{ debugName: "columnWidths" }] : /* istanbul ignore next */ []);
1467
1467
  get selectedRowKeys() {
1468
1468
  this.tracked();
1469
- return this._selectedRowKeys;
1469
+ return [...this._selectedRowKeys];
1470
1470
  }
1471
1471
  set selectedRowKeys(value) {
1472
- this._selectedRowKeys = value;
1472
+ this._selectedRowKeys = [...value];
1473
1473
  this.touched();
1474
1474
  }
1475
1475
  get columnsSize() {
@@ -1491,7 +1491,8 @@ var DataGridDataset = class DataGridDataset extends GridDataset {
1491
1491
  return rowHeight;
1492
1492
  }
1493
1493
  get hasSelectedRows() {
1494
- return this.selectedRowKeys.length > 0;
1494
+ this.tracked();
1495
+ return this._selectedRowKeys.length > 0;
1495
1496
  }
1496
1497
  constructor() {
1497
1498
  super();
@@ -1610,7 +1611,8 @@ var DataGridDataset = class DataGridDataset extends GridDataset {
1610
1611
  return this.selectedRowKeys.map((key) => this.loadedKeys.indexOf(key)).filter((index) => index >= 0).map((index) => this.loadedRows[index]);
1611
1612
  }
1612
1613
  isKeySelected(key) {
1613
- return this.selectedRowKeys.indexOf(key) >= 0;
1614
+ this.tracked();
1615
+ return this._selectedRowKeys.indexOf(key) >= 0;
1614
1616
  }
1615
1617
  refresh() {
1616
1618
  if (this.hasSelectedRows) this.clearSelection();
@@ -1637,7 +1639,7 @@ var DataGridDataset = class DataGridDataset extends GridDataset {
1637
1639
  if (!this.hasLoadedRows) return;
1638
1640
  if (!this.configs.multiSelect) {
1639
1641
  if (this.isKeySelected(key)) return;
1640
- this.removeSelectedRow(this.selectedRowKeys[0]);
1642
+ this.removeSelectedRow(this._selectedRowKeys[0]);
1641
1643
  }
1642
1644
  if (!this.isKeySelected(key)) {
1643
1645
  this._selectedRowKeys.push(key);
@@ -1692,7 +1694,7 @@ var DataGridDataset = class DataGridDataset extends GridDataset {
1692
1694
  return (this.columns ?? []).filter((column) => this.isColumnHidden(column)).map((column) => column.field).filter((field, index, fields) => fields.indexOf(field) === index);
1693
1695
  }
1694
1696
  removeSelectedRow(key) {
1695
- const index = this.selectedRowKeys.indexOf(key);
1697
+ const index = this._selectedRowKeys.indexOf(key);
1696
1698
  if (index >= 0) {
1697
1699
  this._selectedRowKeys.splice(index, 1);
1698
1700
  this.touched();