@akcelik/strct 5.19.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.19.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",
@@ -1028,7 +1028,7 @@ declare class StrctTag {
1028
1028
  readonly activated: _angular_core.OutputEmitterRef<void>;
1029
1029
  protected onActivate(): void;
1030
1030
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StrctTag, never>;
1031
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctTag, "strct-tag", never, { "status": { "alias": "status"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "removeLabel": { "alias": "removeLabel"; "required": false; "isSignal": true; }; "activateLabel": { "alias": "activateLabel"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "mono": { "alias": "mono"; "required": false; "isSignal": true; }; }, { "removed": "removed"; "activated": "activated"; }, never, ["[strctTagLeading]", "*", "[strctTagLeading]", "*"], true, never>;
1031
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StrctTag, "strct-tag", never, { "status": { "alias": "status"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "removeLabel": { "alias": "removeLabel"; "required": false; "isSignal": true; }; "activateLabel": { "alias": "activateLabel"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "mono": { "alias": "mono"; "required": false; "isSignal": true; }; }, { "removed": "removed"; "activated": "activated"; }, never, ["[strctTagLeading]", "*"], true, never>;
1032
1032
  }
1033
1033
 
1034
1034
  /** Avatar size variants. */
@@ -4200,6 +4200,17 @@ 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;
4205
+ /** The two empty states, and the way out of the filtered one. */
4206
+ noMatches: string;
4207
+ noMatchesFor: (query: string) => string;
4208
+ clearFilters: string;
4209
+ /** The bulk-selection escape: the page is selected, everything is not. */
4210
+ pageSelected: (shown: number) => string;
4211
+ selectAllCount: (total: number) => string;
4212
+ allSelected: (total: number) => string;
4213
+ clearSelection: string;
4203
4214
  sortedAscending: (column: string) => string;
4204
4215
  sortedDescending: (column: string) => string;
4205
4216
  sortCleared: string;
@@ -4536,6 +4547,14 @@ declare class StrctDatagrid {
4536
4547
  quickFilter: string;
4537
4548
  loadMore: string;
4538
4549
  showing: (shown: number, total?: number) => string;
4550
+ resizeColumn: (column: string) => string;
4551
+ noMatches: string;
4552
+ noMatchesFor: (query: string) => string;
4553
+ clearFilters: string;
4554
+ pageSelected: (shown: number) => string;
4555
+ selectAllCount: (total: number) => string;
4556
+ allSelected: (total: number) => string;
4557
+ clearSelection: string;
4539
4558
  sortedAscending: (column: string) => string;
4540
4559
  sortedDescending: (column: string) => string;
4541
4560
  sortCleared: string;
@@ -4709,13 +4728,31 @@ declare class StrctDatagrid {
4709
4728
  private readonly selected;
4710
4729
  protected readonly selectedCount: _angular_core.Signal<number>;
4711
4730
  private readonly expandedRows;
4712
- private readonly columnWidths;
4731
+ protected readonly columnWidths: _angular_core.WritableSignal<Map<string, number>>;
4713
4732
  protected readonly hiddenColumns: _angular_core.WritableSignal<Set<string>>;
4714
4733
  protected readonly chooserOpen: _angular_core.WritableSignal<boolean>;
4715
4734
  private resizeState;
4716
4735
  private readonly onMove;
4717
4736
  private readonly onUp;
4718
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;
4719
4756
  onResizeStart(e: MouseEvent, key: string): void;
4720
4757
  private onResizeMove;
4721
4758
  private onResizeEnd;
@@ -4760,6 +4797,25 @@ declare class StrctDatagrid {
4760
4797
  protected setTextFilter(key: string, value: string): void;
4761
4798
  protected optionChecked(key: string, opt: unknown): boolean;
4762
4799
  protected toggleFilterOption(key: string, opt: unknown): void;
4800
+ /**
4801
+ * The escape every bulk workflow needs: the header tick selects the page,
4802
+ * and nothing says the other pages exist. Offered only when the grid holds
4803
+ * the rows — in `lazy` mode it cannot name rows the server has not sent,
4804
+ * and selecting them would be a lie.
4805
+ */
4806
+ protected readonly bulkHint: _angular_core.Signal<{
4807
+ text: string;
4808
+ action: string;
4809
+ run: () => void;
4810
+ } | null>;
4811
+ /** Select every row the filter allows, not only the page. */
4812
+ selectAllFiltered(): void;
4813
+ /** Rows exist, but nothing the filter allows — the undoable empty. */
4814
+ protected readonly filteredAway: _angular_core.Signal<boolean>;
4815
+ protected readonly anyFilter: _angular_core.Signal<boolean>;
4816
+ protected noMatchesDescription(): string;
4817
+ /** The way back out of the filtered empty state. */
4818
+ protected clearAllFilters(): void;
4763
4819
  protected clearFilter(key: string): void;
4764
4820
  protected onDocClickOverlays(event: MouseEvent): void;
4765
4821
  /** Escape closes the topmost transient surface and hands focus back to its
@@ -4898,6 +4954,13 @@ declare class StrctDatagrid {
4898
4954
  private readonly vRange;
4899
4955
  /** The rows actually rendered: the virtual window, or the current page. */
4900
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;
4901
4964
  protected readonly topPad: _angular_core.Signal<number>;
4902
4965
  protected readonly bottomPad: _angular_core.Signal<number>;
4903
4966
  protected readonly stickyActive: _angular_core.Signal<boolean>;
@@ -4959,6 +5022,8 @@ declare class StrctDatagrid {
4959
5022
  /** Last serialized column state pushed outward (loop guard). */
4960
5023
  private lastStateKey;
4961
5024
  constructor();
5025
+ /** Whether the saved (or bound) column state has been read yet. */
5026
+ private stateRestored;
4962
5027
  private readPersistedState;
4963
5028
  private applyColumnState;
4964
5029
  /** Whether a persisted or bound state has already decided what is hidden. */