@akcelik/strct 5.20.0 → 5.21.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.20.0",
3
+ "version": "5.21.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",
@@ -4200,6 +4200,8 @@ interface StrctDatagridLabels {
4200
4200
  * reorders every row, a page replaces them, a filter hides most of them —
4201
4201
  * none of it is visible to someone who cannot see the table.
4202
4202
  */
4203
+ /** The resize separator's name, per column. */
4204
+ resizeColumn: (column: string) => string;
4203
4205
  /** The two empty states, and the way out of the filtered one. */
4204
4206
  noMatches: string;
4205
4207
  noMatchesFor: (query: string) => string;
@@ -4545,6 +4547,7 @@ declare class StrctDatagrid {
4545
4547
  quickFilter: string;
4546
4548
  loadMore: string;
4547
4549
  showing: (shown: number, total?: number) => string;
4550
+ resizeColumn: (column: string) => string;
4548
4551
  noMatches: string;
4549
4552
  noMatchesFor: (query: string) => string;
4550
4553
  clearFilters: string;
@@ -4725,13 +4728,31 @@ declare class StrctDatagrid {
4725
4728
  private readonly selected;
4726
4729
  protected readonly selectedCount: _angular_core.Signal<number>;
4727
4730
  private readonly expandedRows;
4728
- private readonly columnWidths;
4731
+ protected readonly columnWidths: _angular_core.WritableSignal<Map<string, number>>;
4729
4732
  protected readonly hiddenColumns: _angular_core.WritableSignal<Set<string>>;
4730
4733
  protected readonly chooserOpen: _angular_core.WritableSignal<boolean>;
4731
4734
  private resizeState;
4732
4735
  private readonly onMove;
4733
4736
  private readonly onUp;
4734
4737
  colWidth(key: string): string | null;
4738
+ /**
4739
+ * A focusable separator owes ARIA a value, and a column that has never been
4740
+ * resized has no stored width — so the header's real width is swept after
4741
+ * render and whenever the grid resizes. Without it every handle was an
4742
+ * `aria-required-attr` violation (12 of them on the showcase's own page).
4743
+ */
4744
+ private readonly measuredWidths;
4745
+ protected separatorValue(key: string): number | null;
4746
+ private sweepHeaderWidths;
4747
+ /**
4748
+ * The keyboard half of a resize: the arrows step 16px (4px with Shift for a
4749
+ * fine adjustment), Home gives the column back its natural width. Steps are
4750
+ * the only way a separator can be moved without a pointer.
4751
+ */
4752
+ protected onResizeKey(event: KeyboardEvent, key: string): void;
4753
+ /** Give the column back the width the content asks for. */
4754
+ protected resetWidth(key: string): void;
4755
+ private setColumnWidth;
4735
4756
  onResizeStart(e: MouseEvent, key: string): void;
4736
4757
  private onResizeMove;
4737
4758
  private onResizeEnd;
@@ -4933,6 +4954,13 @@ declare class StrctDatagrid {
4933
4954
  private readonly vRange;
4934
4955
  /** The rows actually rendered: the virtual window, or the current page. */
4935
4956
  protected readonly renderRows: _angular_core.Signal<StrctRow[]>;
4957
+ /**
4958
+ * A virtual grid draws 23 rows of 20.000 and, without these, says it has
4959
+ * 23. The count includes the header row, as the ARIA spec asks.
4960
+ */
4961
+ protected readonly ariaRowCount: _angular_core.Signal<number | null>;
4962
+ /** 1 is the header row, so data rows start at 2. */
4963
+ protected ariaRowIndex(row: StrctRow): number | null;
4936
4964
  protected readonly topPad: _angular_core.Signal<number>;
4937
4965
  protected readonly bottomPad: _angular_core.Signal<number>;
4938
4966
  protected readonly stickyActive: _angular_core.Signal<boolean>;
@@ -4994,6 +5022,8 @@ declare class StrctDatagrid {
4994
5022
  /** Last serialized column state pushed outward (loop guard). */
4995
5023
  private lastStateKey;
4996
5024
  constructor();
5025
+ /** Whether the saved (or bound) column state has been read yet. */
5026
+ private stateRestored;
4997
5027
  private readPersistedState;
4998
5028
  private applyColumnState;
4999
5029
  /** Whether a persisted or bound state has already decided what is hidden. */