@akcelik/strct 5.17.0 → 5.18.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akcelik/strct",
3
- "version": "5.17.0",
3
+ "version": "5.18.0",
4
4
  "description": "UIStruct — a standalone Angular component library with a tokenised, multi-palette theme system, built for datacenter / infrastructure management UIs.",
5
5
  "author": "Serkan Akcelik <serkan.akcelik@gmail.com>",
6
6
  "license": "MIT",
@@ -4189,6 +4189,16 @@ interface StrctDatagridLabels {
4189
4189
  loadMore: string;
4190
4190
  /** `paging="more"`: what the footer says it is showing. */
4191
4191
  showing: (shown: number, total?: number) => string;
4192
+ /**
4193
+ * What the grid announces after it changes under the reader: sorting
4194
+ * reorders every row, a page replaces them, a filter hides most of them —
4195
+ * none of it is visible to someone who cannot see the table.
4196
+ */
4197
+ sortedAscending: (column: string) => string;
4198
+ sortedDescending: (column: string) => string;
4199
+ sortCleared: string;
4200
+ pageOf: (page: number, pages: number) => string;
4201
+ rowsMatch: (shown: number, total: number) => string;
4192
4202
  }
4193
4203
  /** Resolves a stable identity for a row: a property key, or a function. */
4194
4204
  type StrctRowId = string | ((row: StrctRow) => unknown);
@@ -4520,6 +4530,11 @@ declare class StrctDatagrid {
4520
4530
  quickFilter: string;
4521
4531
  loadMore: string;
4522
4532
  showing: (shown: number, total?: number) => string;
4533
+ sortedAscending: (column: string) => string;
4534
+ sortedDescending: (column: string) => string;
4535
+ sortCleared: string;
4536
+ pageOf: (page: number, pages: number) => string;
4537
+ rowsMatch: (shown: number, total: number) => string;
4523
4538
  }>;
4524
4539
  /**
4525
4540
  * Virtual scrolling for large data sets: only the rows inside the viewport
@@ -4656,6 +4671,10 @@ declare class StrctDatagrid {
4656
4671
  private readonly cellDefs;
4657
4672
  private readonly cellMap;
4658
4673
  readonly page: _angular_core.WritableSignal<number>;
4674
+ /** What the polite region is saying right now; '' until something happens. */
4675
+ protected readonly announcement: _angular_core.WritableSignal<string>;
4676
+ /** The first filtered() run is the initial render, which announces nothing. */
4677
+ private filterSettled;
4659
4678
  private readonly sort;
4660
4679
  /** Selection / expansion are tracked by row id (see {@link rowId}). */
4661
4680
  private readonly selected;
@@ -4940,6 +4959,13 @@ declare class StrctDatagrid {
4940
4959
  /** Open the row-action menu next to the clicked kebab button. */
4941
4960
  protected openRowMenu(row: StrctRow, event: MouseEvent): void;
4942
4961
  sortBy(key: string): void;
4962
+ /** The pager's own change, plus what it means for a reader. */
4963
+ protected goToPage(page: number): void;
4964
+ /**
4965
+ * Says something once. The same text twice in a row would be dropped by a
4966
+ * screen reader, so a repeat is nudged with a trailing space.
4967
+ */
4968
+ private announce;
4943
4969
  protected sortIcon(key: string): string;
4944
4970
  protected ariaSort(key: string): 'ascending' | 'descending' | 'none';
4945
4971
  protected onHeaderSpace(event: Event, key: string): void;