@gravionlabs/helix-ui 22.2.6 → 22.2.8

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.
@@ -1,7 +1,7 @@
1
1
  import * as i1 from "@angular/cdk/accordion";
2
2
  import { CdkAccordionItem } from "@angular/cdk/accordion";
3
3
  import * as i0 from "@angular/core";
4
- import { EnvironmentProviders, InjectionToken, OnInit, TemplateRef, Type } from "@angular/core";
4
+ import { ElementRef, EnvironmentProviders, InjectionToken, OnInit, TemplateRef, Type } from "@angular/core";
5
5
  import { ConnectedOverlayPositionChange, ConnectedPosition } from "@angular/cdk/overlay";
6
6
  import { ControlValueAccessor } from "@angular/forms";
7
7
  import { FormValueControl } from "@angular/forms/signals";
@@ -857,137 +857,6 @@ export declare class HxCarousel<T = unknown> {
857
857
  "page": "pageChange";
858
858
  }, ["itemTemplate"], ["[hxCarouselHeader]", "[hxCarouselFooter]"], true, never>;
859
859
  }
860
- type HxChartType = 'bar' | 'line' | 'scatter' | 'bubble' | 'pie' | 'doughnut' | 'polarArea' | 'radar';
861
- /** What `(dataSelect)` carries: the click and what chart.js found under it. */
862
- interface HxChartSelectEvent {
863
- originalEvent: Event;
864
- /** The nearest element under the pointer (chart.js `{ datasetIndex, index, element }`). */
865
- element: unknown;
866
- /** The elements of that dataset. */
867
- dataset: unknown[];
868
- }
869
- /** The part of chart.js this component uses; the real module is `chart.js/auto`. */
870
- interface HxChartModule {
871
- default: new (canvas: HTMLCanvasElement, config: unknown) => HxChartInstance;
872
- }
873
- interface HxChartInstance {
874
- data: unknown;
875
- options: unknown;
876
- update(mode?: string): void;
877
- destroy(): void;
878
- getElementsAtEventForMode(event: Event, mode: string, options: object, useFinalPosition: boolean): unknown[];
879
- }
880
- /**
881
- * Loads chart.js. The default is a dynamic `import('chart.js/auto')`, so chart.js is only fetched by apps that show
882
- * a chart; provide another function to register a smaller set of chart.js parts or to replace it in tests.
883
- */
884
- export declare const HX_CHART_LOADER: InjectionToken<() => Promise<HxChartModule>>;
885
- type Json = Record<string, unknown>;
886
- /** The parts of chart.js data and datasets that are read here; everything else is passed on untouched. */
887
- interface ChartDataLike extends Json {
888
- datasets?: unknown;
889
- }
890
- /**
891
- * A chart.js chart whose colours, grid and font come from the Helix tokens.
892
- *
893
- * ```html
894
- * <hx-chart type="bar" [data]="data" [options]="options" height="20rem" ariaLabel="Sales per month">
895
- * <table hxChartFallback>…the same numbers as text…</table>
896
- * </hx-chart>
897
- * ```
898
- *
899
- * chart.js is an optional peer dependency, loaded with a dynamic import (see `HX_CHART_LOADER`) the first time a
900
- * chart is shown. Datasets without colours get the Helix palette; text, grid and legend colours come from
901
- * `--h-text-muted-color` and `--h-content-border-color` of the element. Your `options` win over these defaults.
902
- * The chart is redrawn when `class` or `style` of `<html>` change (dark mode, the primary colour).
903
- *
904
- * The canvas is an `img` named by `ariaLabel` / `ariaLabelledBy`; content marked `hxChartFallback` becomes the
905
- * canvas fallback content, which assistive technology reads: put the numbers there as text or as a table.
906
- */
907
- export declare class HxChart {
908
- #private;
909
- private readonly canvas;
910
- readonly type: import("@angular/core").InputSignal<HxChartType>;
911
- /** chart.js data: `{ labels, datasets }`. Pass a new object to update the chart. */
912
- readonly data: import("@angular/core").InputSignal<ChartDataLike>;
913
- /** chart.js options, on top of the token defaults. Pass a new object to update the chart. */
914
- readonly options: import("@angular/core").InputSignal<Json>;
915
- /** Extra chart.js plugins for this chart. */
916
- readonly plugins: import("@angular/core").InputSignal<readonly unknown[]>;
917
- /** CSS width of the frame, e.g. `30rem`; the chart fills its container by default. */
918
- readonly width: import("@angular/core").InputSignal<string | undefined>;
919
- /** CSS height of the frame; without it chart.js keeps its aspect ratio. */
920
- readonly height: import("@angular/core").InputSignal<string | undefined>;
921
- /** Resize with the container. */
922
- readonly responsive: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
923
- readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
924
- readonly ariaLabelledBy: import("@angular/core").InputSignal<string | undefined>;
925
- /** Delay of a redraw after the theme changed, in ms; the style change is usually followed by more. */
926
- readonly themeDelay: import("@angular/core").InputSignalWithTransform<number, unknown>;
927
- /** A data point or dataset was clicked. */
928
- readonly dataSelect: import("@angular/core").OutputEmitterRef<HxChartSelectEvent>;
929
- constructor();
930
- /** The chart.js instance, once it exists; `undefined` before chart.js has loaded. */
931
- get chart(): HxChartInstance | undefined;
932
- /** Redraws the chart, e.g. after the theme changed in a way the component cannot see. */
933
- refresh(): void;
934
- protected onClick(event: MouseEvent): void;
935
- static ɵfac: i0.ɵɵFactoryDeclaration<HxChart, never>;
936
- static ɵcmp: i0.ɵɵComponentDeclaration<HxChart, "hx-chart", never, {
937
- "type": {
938
- "alias": "type";
939
- "required": false;
940
- "isSignal": true;
941
- };
942
- "data": {
943
- "alias": "data";
944
- "required": false;
945
- "isSignal": true;
946
- };
947
- "options": {
948
- "alias": "options";
949
- "required": false;
950
- "isSignal": true;
951
- };
952
- "plugins": {
953
- "alias": "plugins";
954
- "required": false;
955
- "isSignal": true;
956
- };
957
- "width": {
958
- "alias": "width";
959
- "required": false;
960
- "isSignal": true;
961
- };
962
- "height": {
963
- "alias": "height";
964
- "required": false;
965
- "isSignal": true;
966
- };
967
- "responsive": {
968
- "alias": "responsive";
969
- "required": false;
970
- "isSignal": true;
971
- };
972
- "ariaLabel": {
973
- "alias": "ariaLabel";
974
- "required": false;
975
- "isSignal": true;
976
- };
977
- "ariaLabelledBy": {
978
- "alias": "ariaLabelledBy";
979
- "required": false;
980
- "isSignal": true;
981
- };
982
- "themeDelay": {
983
- "alias": "themeDelay";
984
- "required": false;
985
- "isSignal": true;
986
- };
987
- }, {
988
- "dataSelect": "dataSelect";
989
- }, never, ["[hxChartFallback]"], true, never>;
990
- }
991
860
  type HxCheckboxSize = 'small' | 'medium' | 'large';
992
861
  /**
993
862
  * A native `<input type="checkbox">` drawn as a Helix checkbox (CSS only). It is a real checkbox: `checked`,
@@ -1156,6 +1025,8 @@ interface HxPageEvent {
1156
1025
  /** The page, 0-based. */
1157
1026
  page: number;
1158
1027
  pageCount: number;
1028
+ /** Set when the "All" size is chosen: `rows` is then the number of all records (at least 1). */
1029
+ all?: true;
1159
1030
  }
1160
1031
  /**
1161
1032
  * Page navigation for a list or table: first, previous, page links, next, last, and a rows-per-page select.
@@ -1176,7 +1047,7 @@ export declare class HxPaginator {
1176
1047
  /** Index of the first record shown. */
1177
1048
  readonly first: import("@angular/core").ModelSignal<number>;
1178
1049
  /** Offers a rows-per-page select when given. */
1179
- readonly rowsPerPageOptions: import("@angular/core").InputSignal<readonly number[] | undefined>;
1050
+ readonly rowsPerPageOptions: import("@angular/core").InputSignal<readonly (number | "all")[] | undefined>;
1180
1051
  /** Page links shown at most (the current page stays in the middle). */
1181
1052
  readonly pageLinkSize: import("@angular/core").InputSignalWithTransform<number, unknown>;
1182
1053
  readonly showCurrentPageReport: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
@@ -1191,6 +1062,15 @@ export declare class HxPaginator {
1191
1062
  /** `{page}` is replaced by the page number (1-based). */
1192
1063
  readonly pageLabelTemplate: import("@angular/core").InputSignal<string>;
1193
1064
  readonly rowsPerPageLabel: import("@angular/core").InputSignal<string>;
1065
+ /** The label of the `'all'` entry of `rowsPerPageOptions`. */
1066
+ readonly allLabel: import("@angular/core").InputSignal<string>;
1067
+ /** The "All" size is chosen: one page with every record; `rows` is left as it was. */
1068
+ readonly showAll: import("@angular/core").ModelSignal<boolean>;
1069
+ /** "All" is chosen and still offered by `rowsPerPageOptions`. */
1070
+ private readonly allSelected;
1071
+ /** The records per page in effect: all of them when "All" is chosen. */
1072
+ private readonly perPage;
1073
+ protected readonly rowsValue: import("@angular/core").Signal<number | "all">;
1194
1074
  readonly pageChange: import("@angular/core").OutputEmitterRef<HxPageEvent>;
1195
1075
  protected readonly pageCount: import("@angular/core").Signal<number>;
1196
1076
  protected readonly page: import("@angular/core").Signal<number>;
@@ -1200,7 +1080,7 @@ export declare class HxPaginator {
1200
1080
  protected readonly links: import("@angular/core").Signal<number[]>;
1201
1081
  protected readonly rowsOptions: import("@angular/core").Signal<{
1202
1082
  label: string;
1203
- value: number;
1083
+ value: number | "all";
1204
1084
  }[]>;
1205
1085
  protected readonly report: import("@angular/core").Signal<string>;
1206
1086
  protected pageLabel(page: number): string;
@@ -1285,12 +1165,115 @@ export declare class HxPaginator {
1285
1165
  "required": false;
1286
1166
  "isSignal": true;
1287
1167
  };
1168
+ "allLabel": {
1169
+ "alias": "allLabel";
1170
+ "required": false;
1171
+ "isSignal": true;
1172
+ };
1173
+ "showAll": {
1174
+ "alias": "showAll";
1175
+ "required": false;
1176
+ "isSignal": true;
1177
+ };
1288
1178
  }, {
1289
1179
  "rows": "rowsChange";
1290
1180
  "first": "firstChange";
1181
+ "showAll": "showAllChange";
1291
1182
  "pageChange": "pageChange";
1292
1183
  }, never, never, true, never>;
1293
1184
  }
1185
+ /**
1186
+ * A small panel anchored to an element, with arbitrary content and an arrow pointing at the element.
1187
+ *
1188
+ * ```html
1189
+ * <button hx-button aria-haspopup="dialog" (click)="op.toggle($event)">Share</button>
1190
+ * <hx-popover #op ariaLabel="Share this page">
1191
+ * <input hx-input aria-label="Link" value="https://…" />
1192
+ * </hx-popover>
1193
+ * ```
1194
+ *
1195
+ * `toggle(event, target?)`, `show(event, target?)` and `hide()` open it below the element of the event (or `target`),
1196
+ * or above when there is no room. An outside click and Escape close it. It is a non-modal `role="dialog"`: the focus
1197
+ * moves to its first control when it has one and returns to the element that opened it when it closes, and the page
1198
+ * behind stays reachable. Name it with `ariaLabel` or `ariaLabelledBy`, and put `aria-haspopup="dialog"` on the
1199
+ * trigger. Projected content is created with the popover, only shown while it is open.
1200
+ */
1201
+ export declare class HxPopover {
1202
+ #private;
1203
+ private readonly panel;
1204
+ /** Accessible name of the popover. */
1205
+ readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
1206
+ readonly ariaLabelledBy: import("@angular/core").InputSignal<string | undefined>;
1207
+ readonly ariaDescribedBy: import("@angular/core").InputSignal<string | undefined>;
1208
+ /** `alertdialog` for a question that needs an answer (the confirm popup). */
1209
+ readonly role: import("@angular/core").InputSignal<"dialog" | "alertdialog">;
1210
+ /** Extra CSS classes on the panel. */
1211
+ readonly panelClass: import("@angular/core").InputSignal<string | undefined>;
1212
+ /** A click outside closes it. */
1213
+ readonly dismissable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1214
+ readonly closeOnEscape: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1215
+ readonly shown: import("@angular/core").OutputEmitterRef<void>;
1216
+ readonly hidden: import("@angular/core").OutputEmitterRef<void>;
1217
+ readonly open: import("@angular/core").WritableSignal<boolean>;
1218
+ protected readonly origin: import("@angular/core").WritableSignal<Element | null>;
1219
+ protected readonly fallbackOrigin: HTMLElement;
1220
+ /** The popover is above the element (no room below). */
1221
+ protected readonly above: import("@angular/core").WritableSignal<boolean>;
1222
+ /** The popover is aligned to the end edge of the element (no room to extend to the right). */
1223
+ protected readonly end: import("@angular/core").WritableSignal<boolean>;
1224
+ protected readonly positions: ConnectedPosition[];
1225
+ /** Opens it at the element of the event (or `target`), or closes it when it is open. */
1226
+ toggle(event: Event | Element, target?: Element | null): void;
1227
+ /** Opens it at `target`, else at the element of the event; an element can be passed instead of an event. */
1228
+ show(event: Event | Element, target?: Element | null): void;
1229
+ hide(refocus?: boolean): void;
1230
+ protected onPosition(change: ConnectedOverlayPositionChange): void;
1231
+ protected onAttach(): void;
1232
+ protected onDetach(): void;
1233
+ protected onKeydown(event: KeyboardEvent): void;
1234
+ protected onOutsideClick(event: MouseEvent): void;
1235
+ static ɵfac: i0.ɵɵFactoryDeclaration<HxPopover, never>;
1236
+ static ɵcmp: i0.ɵɵComponentDeclaration<HxPopover, "hx-popover", never, {
1237
+ "ariaLabel": {
1238
+ "alias": "ariaLabel";
1239
+ "required": false;
1240
+ "isSignal": true;
1241
+ };
1242
+ "ariaLabelledBy": {
1243
+ "alias": "ariaLabelledBy";
1244
+ "required": false;
1245
+ "isSignal": true;
1246
+ };
1247
+ "ariaDescribedBy": {
1248
+ "alias": "ariaDescribedBy";
1249
+ "required": false;
1250
+ "isSignal": true;
1251
+ };
1252
+ "role": {
1253
+ "alias": "role";
1254
+ "required": false;
1255
+ "isSignal": true;
1256
+ };
1257
+ "panelClass": {
1258
+ "alias": "panelClass";
1259
+ "required": false;
1260
+ "isSignal": true;
1261
+ };
1262
+ "dismissable": {
1263
+ "alias": "dismissable";
1264
+ "required": false;
1265
+ "isSignal": true;
1266
+ };
1267
+ "closeOnEscape": {
1268
+ "alias": "closeOnEscape";
1269
+ "required": false;
1270
+ "isSignal": true;
1271
+ };
1272
+ }, {
1273
+ "shown": "shown";
1274
+ "hidden": "hidden";
1275
+ }, never, ["*"], true, never>;
1276
+ }
1294
1277
  type HxTableSize = 'small' | 'medium' | 'large';
1295
1278
  /**
1296
1279
  * A native `<table>` drawn as a Helix table (CSS only): header, body and footer rows, hover, stripes and gridlines
@@ -1359,15 +1342,23 @@ interface HxColumn {
1359
1342
  field: string;
1360
1343
  /** The header text. */
1361
1344
  header: string;
1345
+ /** The `title` attribute of the header cell (a tooltip). */
1346
+ title?: string;
1362
1347
  /** CSS width of the column (`8rem`, `20%`). */
1363
1348
  width?: string;
1364
1349
  /** Horizontal alignment of header and cells (the start edge by default). */
1365
1350
  align?: HxColumnAlign;
1366
1351
  /** The header is a button that sorts by the column. */
1367
1352
  sortable?: boolean;
1368
- /** The column gets a text filter in the filter row (`filterDisplay="row"`). */
1353
+ /** The column gets a text filter: in the filter row (`filterDisplay="row"`) or in a popover from its header (`"menu"`). */
1369
1354
  filter?: boolean;
1355
+ /** The direction of the first click on the sort button (the table's `sortFirstOrder` by default). */
1356
+ sortFirstOrder?: HxSortFirstOrder;
1370
1357
  }
1358
+ /** The direction a sort starts with. */
1359
+ type HxSortFirstOrder = 'asc' | 'desc';
1360
+ /** What `rowClass` may return: anything `[class]` accepts. */
1361
+ type HxRowClass = string | readonly string[] | Record<string, boolean | null | undefined> | null | undefined;
1371
1362
  /** One sorted column: `order` 1 is ascending, -1 descending. */
1372
1363
  interface HxSortMeta {
1373
1364
  field: string;
@@ -1409,6 +1400,26 @@ export declare class HxCell {
1409
1400
  };
1410
1401
  }, {}, never, never, true, never>;
1411
1402
  }
1403
+ /**
1404
+ * Extra content in the header of one column, beside the label and outside the sort button:
1405
+ * `<ng-template hxColumnHeader="price" let-column>…</ng-template>`. The context has the column (`$implicit`).
1406
+ */
1407
+ export declare class HxColumnHeader {
1408
+ /** The `field` of the column. */
1409
+ readonly field: import("@angular/core").InputSignal<string>;
1410
+ readonly template: TemplateRef<HxColumnHeaderContext>;
1411
+ static ɵfac: i0.ɵɵFactoryDeclaration<HxColumnHeader, never>;
1412
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HxColumnHeader, "ng-template[hxColumnHeader]", never, {
1413
+ "field": {
1414
+ "alias": "hxColumnHeader";
1415
+ "required": true;
1416
+ "isSignal": true;
1417
+ };
1418
+ }, {}, never, never, true, never>;
1419
+ }
1420
+ interface HxColumnHeaderContext {
1421
+ $implicit: HxColumn;
1422
+ }
1412
1423
  interface HxCellContext {
1413
1424
  $implicit: unknown;
1414
1425
  value: unknown;
@@ -1465,13 +1476,13 @@ interface HxTableRowContext {
1465
1476
  *
1466
1477
  * ```html
1467
1478
  * <hx-data-table [value]="invoices" [columns]="columns" dataKey="id" caption="Invoices" stripedRows>
1468
- * <ng-template hxCell="amount" let-value>{{ value | currency: 'EUR' }}</ng-template>
1479
+ * <ng-template hxCell="amount" let-value="value">{{ value | currency: 'EUR' }}</ng-template>
1469
1480
  * </hx-data-table>
1470
1481
  * ```
1471
1482
  *
1472
1483
  * The table keeps the native semantics: a `<caption>` (drawn as the table header; visually hidden when only
1473
1484
  * `ariaLabel` is set), `<th scope="col">` cells and `aria-busy` while `loading`. A scrolling table is a labelled,
1474
- * focusable `region`.
1485
+ * focusable `region`. `filterDisplay="menu"` puts the column filters in a popover opened from the header.
1475
1486
  */
1476
1487
  export declare class HxDataTable implements OnInit {
1477
1488
  /** The rows. */
@@ -1485,6 +1496,12 @@ export declare class HxDataTable implements OnInit {
1485
1496
  /** Rows change colour under the pointer (default on). */
1486
1497
  readonly hoverRows: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1487
1498
  readonly emptyMessage: import("@angular/core").InputSignal<string>;
1499
+ /** Classes for the `<tr>` of a row: a string, an array or an object, as for `[class]`. */
1500
+ readonly rowClass: import("@angular/core").InputSignal<((row: never) => HxRowClass) | undefined>;
1501
+ /** Text shown in a cell whose value is `null` or `undefined` (not for `0`, `false` or `''`). */
1502
+ readonly emptyValue: import("@angular/core").InputSignal<string>;
1503
+ /** The label of the `'all'` entry of `rowsPerPageOptions`. */
1504
+ readonly allLabel: import("@angular/core").InputSignal<string>;
1488
1505
  /** Covers the table with a spinner and sets `aria-busy`. */
1489
1506
  readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1490
1507
  /** Visible caption text above the table. */
@@ -1505,11 +1522,13 @@ export declare class HxDataTable implements OnInit {
1505
1522
  readonly multiSortMeta: import("@angular/core").ModelSignal<HxSortMeta[]>;
1506
1523
  /** Replaces the client-side sort. */
1507
1524
  readonly sortFunction: import("@angular/core").InputSignal<HxSortFunction | undefined>;
1525
+ /** The direction of the first click on a sortable column; a column's own `sortFirstOrder` wins. */
1526
+ readonly sortFirstOrder: import("@angular/core").InputSignal<HxSortFirstOrder>;
1508
1527
  /** Shows a paginator below the table. */
1509
1528
  readonly paginator: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1510
1529
  readonly rows: import("@angular/core").ModelSignal<number>;
1511
1530
  readonly first: import("@angular/core").ModelSignal<number>;
1512
- readonly rowsPerPageOptions: import("@angular/core").InputSignal<readonly number[] | undefined>;
1531
+ readonly rowsPerPageOptions: import("@angular/core").InputSignal<readonly (number | "all")[] | undefined>;
1513
1532
  readonly showCurrentPageReport: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
1514
1533
  /** The rows are paged and sorted elsewhere: the table only shows `value` and emits `lazyLoad`. */
1515
1534
  readonly lazy: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
@@ -1530,18 +1549,34 @@ export declare class HxDataTable implements OnInit {
1530
1549
  readonly selectRowLabel: import("@angular/core").InputSignal<string>;
1531
1550
  /** The properties of a row the global filter looks in (`filterGlobal`). */
1532
1551
  readonly globalFilterFields: import("@angular/core").InputSignal<readonly string[]>;
1533
- /** `row`: a filter row with a text input under the headers of columns with `filter: true`. */
1534
- readonly filterDisplay: import("@angular/core").InputSignal<"row" | undefined>;
1552
+ /**
1553
+ * `row`: a filter row with a text input under the headers of columns with `filter: true`. `menu`: a filter button in
1554
+ * those headers that opens a popover with the text input.
1555
+ */
1556
+ readonly filterDisplay: import("@angular/core").InputSignal<"menu" | "row" | undefined>;
1535
1557
  /** The text of the column filters, by field. */
1536
1558
  readonly filters: import("@angular/core").ModelSignal<Record<string, string>>;
1537
1559
  readonly filterLabel: import("@angular/core").InputSignal<string>;
1560
+ /** The text of the button that empties a filter in the header menu. */
1561
+ readonly clearLabel: import("@angular/core").InputSignal<string>;
1562
+ protected readonly filterPopover: import("@angular/core").Signal<HxPopover | undefined>;
1563
+ protected readonly filterInput: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
1564
+ /** The column whose filter popover is open. */
1565
+ protected readonly activeFilterColumn: import("@angular/core").WritableSignal<HxColumn | null>;
1566
+ private readonly injector;
1538
1567
  /** The rows that are open (by `dataKey`, or the row index without one); needs a `hxRowExpansion` template. */
1539
1568
  readonly expandedRowKeys: import("@angular/core").ModelSignal<Record<string, boolean>>;
1540
1569
  readonly expandLabel: import("@angular/core").InputSignal<string>;
1541
1570
  readonly collapseLabel: import("@angular/core").InputSignal<string>;
1542
1571
  protected readonly announcement: import("@angular/core").WritableSignal<string>;
1543
1572
  private readonly globalText;
1573
+ /** The paginator's "All" size is chosen: every row is shown, whatever `rows` says. */
1574
+ private readonly showAll;
1575
+ /** A `rows` set from outside (or by the user) ends "All". */
1576
+ private readonly resetAll;
1577
+ private readonly allActive;
1544
1578
  protected readonly cellTemplates: import("@angular/core").Signal<readonly HxCell[]>;
1579
+ protected readonly columnHeaderTemplates: import("@angular/core").Signal<readonly HxColumnHeader[]>;
1545
1580
  protected readonly headerTemplate: import("@angular/core").Signal<HxTableHeader | undefined>;
1546
1581
  protected readonly bodyTemplate: import("@angular/core").Signal<HxTableBody | undefined>;
1547
1582
  protected readonly footerTemplate: import("@angular/core").Signal<HxTableFooter | undefined>;
@@ -1557,6 +1592,8 @@ export declare class HxDataTable implements OnInit {
1557
1592
  /** The rows the table draws: sorted, then the current page. */
1558
1593
  protected readonly visibleRows: import("@angular/core").Signal<readonly unknown[]>;
1559
1594
  protected readonly cells: import("@angular/core").Signal<Map<string, TemplateRef<HxCellContext>>>;
1595
+ private readonly warnedFields;
1596
+ protected readonly columnHeaders: import("@angular/core").Signal<Map<string, TemplateRef<HxColumnHeaderContext>>>;
1560
1597
  protected readonly scrolls: import("@angular/core").Signal<boolean>;
1561
1598
  protected readonly hasCaption: import("@angular/core").Signal<boolean>;
1562
1599
  protected readonly captionHidden: import("@angular/core").Signal<boolean>;
@@ -1578,6 +1615,9 @@ export declare class HxDataTable implements OnInit {
1578
1615
  protected onRowKey(row: unknown, event: Event): void;
1579
1616
  /** Filters every column in `globalFilterFields` for a text (case-insensitive, contains). */
1580
1617
  filterGlobal(text: string): void;
1618
+ protected openFilter(event: Event, column: HxColumn): void;
1619
+ protected filterLabelFor(column: HxColumn): string;
1620
+ protected clearFilter(column: HxColumn): void;
1581
1621
  protected setFilter(column: HxColumn, text: string): void;
1582
1622
  protected rowKey(row: unknown, index: number): string;
1583
1623
  protected isExpanded(row: unknown, index: number): boolean;
@@ -1588,11 +1628,12 @@ export declare class HxDataTable implements OnInit {
1588
1628
  protected ariaSort(column: HxColumn): 'ascending' | 'descending' | 'none' | null;
1589
1629
  /** The position (1-based) of a column in a multi-column sort, when more than one column is sorted. */
1590
1630
  protected sortRank(column: HxColumn): number | null;
1591
- /** Sorts by a column: ascending, then descending, then not at all. */
1631
+ /** Sorts by a column: the first order, then the opposite, then not at all (ascending first by default). */
1592
1632
  sort(column: HxColumn): void;
1593
1633
  protected onPage(event: HxPageEvent): void;
1594
1634
  private emitLazy;
1595
1635
  protected trackRow(row: unknown, index: number): unknown;
1636
+ protected rowClassOf(row: unknown): HxRowClass;
1596
1637
  protected valueOf(row: unknown, column: HxColumn): unknown;
1597
1638
  static ɵfac: i0.ɵɵFactoryDeclaration<HxDataTable, never>;
1598
1639
  static ɵcmp: i0.ɵɵComponentDeclaration<HxDataTable, "hx-data-table", never, {
@@ -1636,6 +1677,21 @@ export declare class HxDataTable implements OnInit {
1636
1677
  "required": false;
1637
1678
  "isSignal": true;
1638
1679
  };
1680
+ "rowClass": {
1681
+ "alias": "rowClass";
1682
+ "required": false;
1683
+ "isSignal": true;
1684
+ };
1685
+ "emptyValue": {
1686
+ "alias": "emptyValue";
1687
+ "required": false;
1688
+ "isSignal": true;
1689
+ };
1690
+ "allLabel": {
1691
+ "alias": "allLabel";
1692
+ "required": false;
1693
+ "isSignal": true;
1694
+ };
1639
1695
  "loading": {
1640
1696
  "alias": "loading";
1641
1697
  "required": false;
@@ -1686,6 +1742,11 @@ export declare class HxDataTable implements OnInit {
1686
1742
  "required": false;
1687
1743
  "isSignal": true;
1688
1744
  };
1745
+ "sortFirstOrder": {
1746
+ "alias": "sortFirstOrder";
1747
+ "required": false;
1748
+ "isSignal": true;
1749
+ };
1689
1750
  "paginator": {
1690
1751
  "alias": "paginator";
1691
1752
  "required": false;
@@ -1771,6 +1832,11 @@ export declare class HxDataTable implements OnInit {
1771
1832
  "required": false;
1772
1833
  "isSignal": true;
1773
1834
  };
1835
+ "clearLabel": {
1836
+ "alias": "clearLabel";
1837
+ "required": false;
1838
+ "isSignal": true;
1839
+ };
1774
1840
  "expandedRowKeys": {
1775
1841
  "alias": "expandedRowKeys";
1776
1842
  "required": false;
@@ -1796,7 +1862,7 @@ export declare class HxDataTable implements OnInit {
1796
1862
  "selection": "selectionChange";
1797
1863
  "filters": "filtersChange";
1798
1864
  "expandedRowKeys": "expandedRowKeysChange";
1799
- }, ["cellTemplates", "headerTemplate", "bodyTemplate", "footerTemplate", "captionTemplate", "expansionTemplate", "emptyTemplate"], never, true, never>;
1865
+ }, ["cellTemplates", "columnHeaderTemplates", "headerTemplate", "bodyTemplate", "footerTemplate", "captionTemplate", "expansionTemplate", "emptyTemplate"], never, true, never>;
1800
1866
  }
1801
1867
  type CalendarView = 'day' | 'month' | 'year';
1802
1868
  interface DisabledRules {
@@ -2584,13 +2650,20 @@ interface HxDateTimeRangeValue {
2584
2650
  from: Date | null;
2585
2651
  to: Date | null;
2586
2652
  }
2653
+ /** A relative range in the popup's preset list; `from` and `to` are read when it is chosen (`now` stays current). */
2654
+ interface HxDateTimeRangePreset {
2655
+ label: string;
2656
+ from: () => Date;
2657
+ to: () => Date;
2658
+ }
2587
2659
  /**
2588
2660
  * A from and a to date-time range in one field with one button. The field shows the range as one text
2589
2661
  * (`1/1/2026 00:00 - 1/2/2026 00:15`); the popup holds one calendar (an inline range `hx-date-picker`) and a time picker for each end,
2590
2662
  * from and to. The value is `{ from, to }` (`null` while a side is empty); `to` is never before `from`: the `to`
2591
2663
  * time picker starts at `from` (including the time), the `from` time picker ends at `to`, and a choice that crosses the
2592
- * other side moves it. The field is read-only; the popup stays open until Escape, an outside click or the focus
2593
- * leaving it.
2664
+ * other side moves it. The field is read-only unless `typeable`, which lets the range be typed in the field's
2665
+ * format (Enter or leaving the field commits it, an unreadable range puts the value back); the popup stays open
2666
+ * until Escape, an outside click or the focus leaving it.
2594
2667
  *
2595
2668
  * ```html
2596
2669
  * <hx-date-time-range-picker [stepMinute]="15" [(ngModel)]="shift" />
@@ -2609,12 +2682,18 @@ export declare class HxDateTimeRangePicker implements ControlValueAccessor, Form
2609
2682
  /** The text between the two dates in the field. */
2610
2683
  readonly separator: import("@angular/core").InputSignal<string>;
2611
2684
  readonly placeholder: import("@angular/core").InputSignal<string>;
2685
+ /** The name of the group of preset buttons. */
2686
+ readonly presetsLabel: import("@angular/core").InputSignal<string>;
2687
+ /** Ready-made ranges listed in the popup; choosing one fills the draft, Submit applies it. */
2688
+ readonly presets: import("@angular/core").InputSignal<readonly HxDateTimeRangePreset[]>;
2612
2689
  readonly clearLabel: import("@angular/core").InputSignal<string>;
2613
2690
  readonly cancelLabel: import("@angular/core").InputSignal<string>;
2614
2691
  readonly submitLabel: import("@angular/core").InputSignal<string>;
2615
2692
  readonly chooseLabel: import("@angular/core").InputSignal<string>;
2616
2693
  /** The `id` of the text field, for a `<label for>`. */
2617
2694
  readonly inputId: import("@angular/core").InputSignal<string | undefined>;
2695
+ /** The range can be typed into the field (`from separator to`); otherwise the field is read-only. */
2696
+ readonly typeable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
2618
2697
  /** The time picker options, for both ends. */
2619
2698
  readonly showTime: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
2620
2699
  readonly timeOnly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
@@ -2655,6 +2734,7 @@ export declare class HxDateTimeRangePicker implements ControlValueAccessor, Form
2655
2734
  /** The values of the two time pickers: a fresh `Date` per draft change (midnight while a side is empty). */
2656
2735
  protected readonly fromValue: import("@angular/core").Signal<HxTimePickerValue>;
2657
2736
  protected readonly toValue: import("@angular/core").Signal<HxTimePickerValue>;
2737
+ constructor();
2658
2738
  writeValue(value: HxDateTimeRangeValue | null): void;
2659
2739
  registerOnChange(fn: (value: HxDateTimeRangeValue) => void): void;
2660
2740
  registerOnTouched(fn: () => void): void;
@@ -2665,10 +2745,17 @@ export declare class HxDateTimeRangePicker implements ControlValueAccessor, Form
2665
2745
  protected toggle(): void;
2666
2746
  protected close(refocus?: boolean): void;
2667
2747
  protected onAttach(): void;
2748
+ /** A typeable field opens with the button, Arrow Down or Alt+Arrow Up (click, Enter and Space are for typing). */
2749
+ protected onFieldClick(): void;
2668
2750
  protected onFieldKeydown(event: KeyboardEvent): void;
2751
+ protected onTyping(event: Event): void;
2752
+ /** Parses the typed range; an unreadable side, a disabled day or a time outside the limits puts the value back. */
2753
+ protected commitTyping(): void;
2669
2754
  protected onOverlayKeydown(event: KeyboardEvent): void;
2670
2755
  protected onOutsideClick(event: MouseEvent): void;
2671
2756
  protected clear(): void;
2757
+ /** Puts a preset into the draft (the calendar and the time pickers show it); Submit commits it. */
2758
+ protected applyPreset(preset: HxDateTimeRangePreset): void;
2672
2759
  protected submit(): void;
2673
2760
  /** The focus left the control (field, button and popup): the popup closes and the control is touched. */
2674
2761
  protected onHostFocusOut(event: FocusEvent): void;
@@ -2704,6 +2791,16 @@ export declare class HxDateTimeRangePicker implements ControlValueAccessor, Form
2704
2791
  "required": false;
2705
2792
  "isSignal": true;
2706
2793
  };
2794
+ "presetsLabel": {
2795
+ "alias": "presetsLabel";
2796
+ "required": false;
2797
+ "isSignal": true;
2798
+ };
2799
+ "presets": {
2800
+ "alias": "presets";
2801
+ "required": false;
2802
+ "isSignal": true;
2803
+ };
2707
2804
  "clearLabel": {
2708
2805
  "alias": "clearLabel";
2709
2806
  "required": false;
@@ -2729,6 +2826,11 @@ export declare class HxDateTimeRangePicker implements ControlValueAccessor, Form
2729
2826
  "required": false;
2730
2827
  "isSignal": true;
2731
2828
  };
2829
+ "typeable": {
2830
+ "alias": "typeable";
2831
+ "required": false;
2832
+ "isSignal": true;
2833
+ };
2732
2834
  "showTime": {
2733
2835
  "alias": "showTime";
2734
2836
  "required": false;
@@ -4835,98 +4937,6 @@ export declare class HxPassword implements ControlValueAccessor, FormValueContro
4835
4937
  "touch": "touch";
4836
4938
  }, never, never, true, never>;
4837
4939
  }
4838
- /**
4839
- * A small panel anchored to an element, with arbitrary content and an arrow pointing at the element.
4840
- *
4841
- * ```html
4842
- * <button hx-button aria-haspopup="dialog" (click)="op.toggle($event)">Share</button>
4843
- * <hx-popover #op ariaLabel="Share this page">
4844
- * <input hx-input aria-label="Link" value="https://…" />
4845
- * </hx-popover>
4846
- * ```
4847
- *
4848
- * `toggle(event, target?)`, `show(event, target?)` and `hide()` open it below the element of the event (or `target`),
4849
- * or above when there is no room. An outside click and Escape close it. It is a non-modal `role="dialog"`: the focus
4850
- * moves to its first control when it has one and returns to the element that opened it when it closes, and the page
4851
- * behind stays reachable. Name it with `ariaLabel` or `ariaLabelledBy`, and put `aria-haspopup="dialog"` on the
4852
- * trigger. Projected content is created with the popover, only shown while it is open.
4853
- */
4854
- export declare class HxPopover {
4855
- #private;
4856
- private readonly panel;
4857
- /** Accessible name of the popover. */
4858
- readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
4859
- readonly ariaLabelledBy: import("@angular/core").InputSignal<string | undefined>;
4860
- readonly ariaDescribedBy: import("@angular/core").InputSignal<string | undefined>;
4861
- /** `alertdialog` for a question that needs an answer (the confirm popup). */
4862
- readonly role: import("@angular/core").InputSignal<"dialog" | "alertdialog">;
4863
- /** Extra CSS classes on the panel. */
4864
- readonly panelClass: import("@angular/core").InputSignal<string | undefined>;
4865
- /** A click outside closes it. */
4866
- readonly dismissable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
4867
- readonly closeOnEscape: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
4868
- readonly shown: import("@angular/core").OutputEmitterRef<void>;
4869
- readonly hidden: import("@angular/core").OutputEmitterRef<void>;
4870
- readonly open: import("@angular/core").WritableSignal<boolean>;
4871
- protected readonly origin: import("@angular/core").WritableSignal<Element | null>;
4872
- protected readonly fallbackOrigin: HTMLElement;
4873
- /** The popover is above the element (no room below). */
4874
- protected readonly above: import("@angular/core").WritableSignal<boolean>;
4875
- /** The popover is aligned to the end edge of the element (no room to extend to the right). */
4876
- protected readonly end: import("@angular/core").WritableSignal<boolean>;
4877
- protected readonly positions: ConnectedPosition[];
4878
- /** Opens it at the element of the event (or `target`), or closes it when it is open. */
4879
- toggle(event: Event | Element, target?: Element | null): void;
4880
- /** Opens it at `target`, else at the element of the event; an element can be passed instead of an event. */
4881
- show(event: Event | Element, target?: Element | null): void;
4882
- hide(refocus?: boolean): void;
4883
- protected onPosition(change: ConnectedOverlayPositionChange): void;
4884
- protected onAttach(): void;
4885
- protected onDetach(): void;
4886
- protected onKeydown(event: KeyboardEvent): void;
4887
- protected onOutsideClick(event: MouseEvent): void;
4888
- static ɵfac: i0.ɵɵFactoryDeclaration<HxPopover, never>;
4889
- static ɵcmp: i0.ɵɵComponentDeclaration<HxPopover, "hx-popover", never, {
4890
- "ariaLabel": {
4891
- "alias": "ariaLabel";
4892
- "required": false;
4893
- "isSignal": true;
4894
- };
4895
- "ariaLabelledBy": {
4896
- "alias": "ariaLabelledBy";
4897
- "required": false;
4898
- "isSignal": true;
4899
- };
4900
- "ariaDescribedBy": {
4901
- "alias": "ariaDescribedBy";
4902
- "required": false;
4903
- "isSignal": true;
4904
- };
4905
- "role": {
4906
- "alias": "role";
4907
- "required": false;
4908
- "isSignal": true;
4909
- };
4910
- "panelClass": {
4911
- "alias": "panelClass";
4912
- "required": false;
4913
- "isSignal": true;
4914
- };
4915
- "dismissable": {
4916
- "alias": "dismissable";
4917
- "required": false;
4918
- "isSignal": true;
4919
- };
4920
- "closeOnEscape": {
4921
- "alias": "closeOnEscape";
4922
- "required": false;
4923
- "isSignal": true;
4924
- };
4925
- }, {
4926
- "shown": "shown";
4927
- "hidden": "hidden";
4928
- }, never, ["*"], true, never>;
4929
- }
4930
4940
  type HxProgressMode = 'determinate' | 'indeterminate';
4931
4941
  /**
4932
4942
  * A bar that fills from 0 to 100, or slides while the duration is unknown.
@@ -6133,6 +6143,11 @@ interface HxThemeOptions {
6133
6143
  * `tokens.css`) or an attribute (`[data-theme="dark"]`).
6134
6144
  */
6135
6145
  darkSelector?: string;
6146
+ /**
6147
+ * `false`: the host app owns the dark class/attribute (e.g. from `prefers-color-scheme`), HxTheme never writes it
6148
+ * to `<html>`. `dark()` still follows `setDark()` for the colour overrides. Default `true`.
6149
+ */
6150
+ manageDark?: boolean;
6136
6151
  /** Where the choice is remembered (localStorage). `null` (the default) remembers nothing. */
6137
6152
  storageKey?: string | null;
6138
6153
  /** Dark mode when nothing is remembered; by default the system setting (`prefers-color-scheme`). */
@@ -6700,4 +6715,4 @@ export declare class HxTree {
6700
6715
  "nodeCollapse": "nodeCollapse";
6701
6716
  }, ["template"], never, true, never>;
6702
6717
  }
6703
- export type { HxAccordionValue, HxAutoCompleteEvent, HxAutoCompleteSize, HxAvatarShape, HxAvatarSize, HxBadgeSeverity, HxBadgeSize, HxBreadcrumbItem, HxButtonSeverity, HxButtonSize, HxButtonVariant, HxCarouselItemContext, HxCarouselOrientation, HxCarouselResponsiveOption, HxCellContext, HxChartInstance, HxChartModule, HxChartSelectEvent, HxChartType, HxCheckboxSize, HxColumn, HxColumnAlign, HxConfirmation, HxDatePickerSelectionMode, HxDatePickerValue, HxDateTimePickerValue, HxDateTimeRangeValue, HxDialogConfig, HxDialogPosition, HxDividerAlign, HxDividerLayout, HxDividerType, HxDrawerPosition, HxFileUploadMode, HxFloatLabelVariant, HxGalleriaItem, HxGalleriaItemContext, HxGalleriaThumbnailsPosition, HxIconPosition, HxInputNumberButtonLayout, HxInputNumberMode, HxInputNumberSize, HxInputNumberVariant, HxInputSize, HxInputVariant, HxLazyLoadEvent, HxMenuItem, HxMenuItemCommandEvent, HxMessageSeverity, HxMessageSize, HxMessageVariant, HxMultiSelectDisplay, HxMultiSelectSize, HxMultiSelectVariant, HxPageEvent, HxPrimaryColor, HxProgressMode, HxRadioSize, HxSelectButtonSize, HxSelectItem, HxSelectSize, HxSelectVariant, HxSelectionMode, HxSkeletonAnimation, HxSkeletonShape, HxSliderOrientation, HxSliderValue, HxSortFunction, HxSortMeta, HxSortMode, HxStepContentContext, HxStepValue, HxSurface, HxTableColumnsContext, HxTableRowContext, HxTableSize, HxTagSeverity, HxThemeOptions, HxTimePickerValue, HxTimelineAlign, HxTimelineContext, HxTimelineLayout, HxToastMessage, HxToastMessageInput, HxToastPosition, HxToastSeverity, HxToggleButtonSize, HxTooltipEvent, HxTooltipPosition, HxTreeFilterMode, HxTreeNode, HxTreeNodeContext, HxTreeNodeEvent, HxTreeSelection, HxTreeSelectionMode };
6718
+ export type { HxAccordionValue, HxAutoCompleteEvent, HxAutoCompleteSize, HxAvatarShape, HxAvatarSize, HxBadgeSeverity, HxBadgeSize, HxBreadcrumbItem, HxButtonSeverity, HxButtonSize, HxButtonVariant, HxCarouselItemContext, HxCarouselOrientation, HxCarouselResponsiveOption, HxCellContext, HxCheckboxSize, HxColumn, HxColumnAlign, HxColumnHeaderContext, HxConfirmation, HxDatePickerSelectionMode, HxDatePickerValue, HxDateTimePickerValue, HxDateTimeRangePreset, HxDateTimeRangeValue, HxDialogConfig, HxDialogPosition, HxDividerAlign, HxDividerLayout, HxDividerType, HxDrawerPosition, HxFileUploadMode, HxFloatLabelVariant, HxGalleriaItem, HxGalleriaItemContext, HxGalleriaThumbnailsPosition, HxIconPosition, HxInputNumberButtonLayout, HxInputNumberMode, HxInputNumberSize, HxInputNumberVariant, HxInputSize, HxInputVariant, HxLazyLoadEvent, HxMenuItem, HxMenuItemCommandEvent, HxMessageSeverity, HxMessageSize, HxMessageVariant, HxMultiSelectDisplay, HxMultiSelectSize, HxMultiSelectVariant, HxPageEvent, HxPrimaryColor, HxProgressMode, HxRadioSize, HxRowClass, HxSelectButtonSize, HxSelectItem, HxSelectSize, HxSelectVariant, HxSelectionMode, HxSkeletonAnimation, HxSkeletonShape, HxSliderOrientation, HxSliderValue, HxSortFirstOrder, HxSortFunction, HxSortMeta, HxSortMode, HxStepContentContext, HxStepValue, HxSurface, HxTableColumnsContext, HxTableRowContext, HxTableSize, HxTagSeverity, HxThemeOptions, HxTimePickerValue, HxTimelineAlign, HxTimelineContext, HxTimelineLayout, HxToastMessage, HxToastMessageInput, HxToastPosition, HxToastSeverity, HxToggleButtonSize, HxTooltipEvent, HxTooltipPosition, HxTreeFilterMode, HxTreeNode, HxTreeNodeContext, HxTreeNodeEvent, HxTreeSelection, HxTreeSelectionMode };