ngwr 16.3.0 → 16.4.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/carousel/styles/_index.scss +53 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +24 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +67 -4
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +10 -23
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +16 -1
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +18 -4
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +7 -3
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +27 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +568 -7
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +8 -4
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +8 -4
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +8 -4
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +8 -4
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +8 -4
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +8 -4
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +8 -4
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +8 -4
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +8 -4
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +8 -4
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +8 -4
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +8 -4
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +8 -4
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +8 -4
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +8 -4
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +8 -4
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +8 -4
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +8 -4
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +8 -4
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +8 -4
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +8 -4
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +8 -4
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +2 -2
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +1 -0
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +1 -0
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +100 -3
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +2 -2
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +71 -3
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +171 -11
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tour-testing.mjs +13 -1
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +13 -9
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +12 -1
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +64 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/graph/styles/_index.scss +87 -0
- package/i18n/ar.json +8 -4
- package/i18n/cs.json +8 -4
- package/i18n/de.json +8 -4
- package/i18n/en.json +8 -4
- package/i18n/es.json +8 -4
- package/i18n/fr.json +8 -4
- package/i18n/he.json +8 -4
- package/i18n/hi.json +8 -4
- package/i18n/id.json +8 -4
- package/i18n/it.json +8 -4
- package/i18n/ja.json +8 -4
- package/i18n/ko.json +8 -4
- package/i18n/nl.json +8 -4
- package/i18n/pl.json +8 -4
- package/i18n/pt.json +8 -4
- package/i18n/ru.json +8 -4
- package/i18n/sv.json +8 -4
- package/i18n/tr.json +8 -4
- package/i18n/uk.json +8 -4
- package/i18n/vi.json +8 -4
- package/i18n/zh-TW.json +8 -4
- package/i18n/zh.json +8 -4
- package/llms-full.txt +4 -4
- package/llms.txt +57 -24
- package/package.json +1 -1
- package/schematics/collection.json +5 -0
- package/schematics/eject/index.js +158 -0
- package/schematics/eject/schema.js +8 -0
- package/schematics/eject/schema.json +24 -0
- package/schematics/eject/source.js +295 -0
- package/schematics/use/symbol-map.json +1 -0
- package/select/styles/_index.scss +13 -0
- package/skills/ngwr/SKILL.md +30 -3
- package/skills/ngwr/references/catalog.md +1 -1
- package/table/styles/_index.scss +24 -0
- package/theme/styles/_focus.scss +11 -1
- package/types/ngwr-carousel-testing.d.ts +27 -6
- package/types/ngwr-carousel.d.ts +42 -6
- package/types/ngwr-cascader.d.ts +3 -5
- package/types/ngwr-context-menu.d.ts +2 -0
- package/types/ngwr-dropdown.d.ts +2 -0
- package/types/ngwr-file-upload.d.ts +8 -2
- package/types/ngwr-graph-testing.d.ts +28 -0
- package/types/ngwr-graph.d.ts +247 -91
- package/types/ngwr-select.d.ts +37 -0
- package/types/ngwr-table-testing.d.ts +52 -1
- package/types/ngwr-table.d.ts +101 -9
- package/types/ngwr-tour-testing.d.ts +10 -0
- package/types/ngwr-tour.d.ts +11 -2
- package/types/ngwr-tree.d.ts +2 -0
- package/types/ngwr-utils.d.ts +79 -1
- package/types/ngwr-version.d.ts +1 -1
package/types/ngwr-table.d.ts
CHANGED
|
@@ -356,6 +356,25 @@ interface WrTableCellEdit<T extends WrTableRow = WrTableRow> {
|
|
|
356
356
|
/** The cell's value when the edit started. */
|
|
357
357
|
readonly previous: unknown;
|
|
358
358
|
}
|
|
359
|
+
/**
|
|
360
|
+
* @license
|
|
361
|
+
*
|
|
362
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
363
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
364
|
+
*/
|
|
365
|
+
/** One row of a column chooser: a column of the table, shown or hidden. */
|
|
366
|
+
interface WrTableChooserColumn {
|
|
367
|
+
/** The column's key in `columns`, the value `hiddenColumns` lists. */
|
|
368
|
+
readonly key: string;
|
|
369
|
+
/** The column's title, or its `headerHint`, or its key when it has neither. */
|
|
370
|
+
readonly title: string;
|
|
371
|
+
/** Whether the table leaves the column out. */
|
|
372
|
+
readonly hidden: boolean;
|
|
373
|
+
/** `false` for a `hideable: false` column, which is always shown. */
|
|
374
|
+
readonly hideable: boolean;
|
|
375
|
+
/** Whether the checkbox is disabled: a `hideable: false` column, or the last one shown. */
|
|
376
|
+
readonly locked: boolean;
|
|
377
|
+
}
|
|
359
378
|
/**
|
|
360
379
|
* Context passed to a `[wrTableEditCell]` template, the editor of one cell.
|
|
361
380
|
*
|
|
@@ -1052,14 +1071,24 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
|
|
|
1052
1071
|
key: string;
|
|
1053
1072
|
column: WrTableColumn<T>;
|
|
1054
1073
|
}[]>;
|
|
1055
|
-
/**
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1074
|
+
/**
|
|
1075
|
+
* One entry per column in column order, hidden ones included: what a column
|
|
1076
|
+
* chooser lists. `<wr-table-column-chooser>` reads it, and so can a menu of
|
|
1077
|
+
* your own.
|
|
1078
|
+
*/
|
|
1079
|
+
readonly chooserColumns: import("@angular/core").Signal<readonly WrTableChooserColumn[]>;
|
|
1080
|
+
/**
|
|
1081
|
+
* Hide a shown column or show a hidden one, as its checkbox in the column
|
|
1082
|
+
* chooser does: it writes `hiddenColumns` and reports a `stateChange`. A
|
|
1083
|
+
* locked column (`hideable: false`, or the last one shown) stays as it is.
|
|
1084
|
+
*/
|
|
1085
|
+
toggleColumn(key: string): void;
|
|
1086
|
+
/**
|
|
1087
|
+
* Write `hiddenColumns` as a reader action, so `stateChange` reports it. A
|
|
1088
|
+
* `hideable: false` column is left out of the list, and so is the first
|
|
1089
|
+
* column when the list would hide every one.
|
|
1090
|
+
*/
|
|
1091
|
+
setHiddenColumns(keys: readonly string[]): void;
|
|
1063
1092
|
/**
|
|
1064
1093
|
* Sticky offsets for pinned columns, measured from the header cells so any
|
|
1065
1094
|
* number of columns can stack per side. Also names the inner-edge column on
|
|
@@ -1850,6 +1879,69 @@ export declare class WrTableCell<T extends WrTableRow = WrSafeAny, K extends str
|
|
|
1850
1879
|
};
|
|
1851
1880
|
}, {}, never, never, true, never>;
|
|
1852
1881
|
}
|
|
1882
|
+
/**
|
|
1883
|
+
* The column list of a `<wr-table>`, for a menu of your own: one checkbox per
|
|
1884
|
+
* column, in column order, under a "Show all" row. Place it in a popover, a
|
|
1885
|
+
* dropdown or a drawer and hand it the table. Every toggle writes the table's
|
|
1886
|
+
* `hiddenColumns`, so `hiddenColumnsChange` and `stateChange` fire as they do
|
|
1887
|
+
* from the built-in `columnChooser`, which renders this same list.
|
|
1888
|
+
*
|
|
1889
|
+
* A `hideable: false` column and the last visible one stay checked and
|
|
1890
|
+
* disabled. "Show all" shows every column; pressed while all are shown, it
|
|
1891
|
+
* hides every column that can be hidden, less the first when none is
|
|
1892
|
+
* `hideable: false`.
|
|
1893
|
+
*
|
|
1894
|
+
* @example
|
|
1895
|
+
* ```html
|
|
1896
|
+
* <button wr-btn type="button" [wrPopover]="menu">Columns</button>
|
|
1897
|
+
* <ng-template #menu>
|
|
1898
|
+
* <wr-table-column-chooser [table]="table" />
|
|
1899
|
+
* </ng-template>
|
|
1900
|
+
*
|
|
1901
|
+
* <wr-table #table [columns]="columns" [items]="rows" [(hiddenColumns)]="hidden" />
|
|
1902
|
+
* ```
|
|
1903
|
+
*
|
|
1904
|
+
* @see https://ngwr.dev/reference/components/table
|
|
1905
|
+
*/
|
|
1906
|
+
export declare class WrTableColumnChooser {
|
|
1907
|
+
constructor();
|
|
1908
|
+
/** The table whose columns the list shows and hides. */
|
|
1909
|
+
readonly table: import("@angular/core").InputSignal<WrTable<any>>;
|
|
1910
|
+
/** Text of the "Show all" row. Falls back to `table.showAllColumns`. */
|
|
1911
|
+
readonly showAllLabel: import("@angular/core").InputSignal<string | null>;
|
|
1912
|
+
/** Accessible name of the list. Falls back to `table.columns`. */
|
|
1913
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
|
|
1914
|
+
protected readonly resolvedShowAll: import("@angular/core").Signal<string>;
|
|
1915
|
+
protected readonly resolvedLabel: import("@angular/core").Signal<string>;
|
|
1916
|
+
protected readonly columns: import("@angular/core").Signal<readonly WrTableChooserColumn[]>;
|
|
1917
|
+
/** How many of the hideable columns are shown: every one, some, or none. */
|
|
1918
|
+
protected readonly showAllState: import("@angular/core").Signal<"some" | "none" | "all">;
|
|
1919
|
+
/** No column can be shown or hidden, so the row has nothing to do. */
|
|
1920
|
+
protected readonly showAllDisabled: import("@angular/core").Signal<boolean>;
|
|
1921
|
+
/**
|
|
1922
|
+
* Shows every column while one is hidden. Once all are shown it hides every
|
|
1923
|
+
* hideable one, and the table keeps its first column when that would leave none.
|
|
1924
|
+
*/
|
|
1925
|
+
protected toggleShowAll(): void;
|
|
1926
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrTableColumnChooser, never>;
|
|
1927
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrTableColumnChooser, "wr-table-column-chooser", never, {
|
|
1928
|
+
"table": {
|
|
1929
|
+
"alias": "table";
|
|
1930
|
+
"required": true;
|
|
1931
|
+
"isSignal": true;
|
|
1932
|
+
};
|
|
1933
|
+
"showAllLabel": {
|
|
1934
|
+
"alias": "showAllLabel";
|
|
1935
|
+
"required": false;
|
|
1936
|
+
"isSignal": true;
|
|
1937
|
+
};
|
|
1938
|
+
"ariaLabel": {
|
|
1939
|
+
"alias": "ariaLabel";
|
|
1940
|
+
"required": false;
|
|
1941
|
+
"isSignal": true;
|
|
1942
|
+
};
|
|
1943
|
+
}, {}, never, never, true, never>;
|
|
1944
|
+
}
|
|
1853
1945
|
/**
|
|
1854
1946
|
* Provide the editor for a column's cells, and with it make the column
|
|
1855
1947
|
* editable: a double click, Enter, F2 or a typed character on a cell swaps its
|
|
@@ -2153,4 +2245,4 @@ export declare function wrReadField<T>(item: T, key: string): string | number;
|
|
|
2153
2245
|
* @param accessor Reads the value of a key; defaults to `wrReadField`.
|
|
2154
2246
|
*/
|
|
2155
2247
|
export declare function wrSortRows<T>(rows: readonly T[], sort: readonly WrTableSortState[], accessor?: WrTableSortAccessor<T>): readonly T[];
|
|
2156
|
-
export type { WrTableCellContext, WrTableCellEdit, WrTableColumn, WrTableColumnAlign, WrTableColumns, WrTableCsvOptions, WrTableEditCellContext, WrTableEditable, WrTableExpandContext, WrTableFilterChange, WrTableFilterItem, WrTableGroupContext, WrTableLoadingMode, WrTableRow, WrTableRowClass, WrTableRowClick, WrTableSelectionContext, WrTableSortAccessor, WrTableSortDirection, WrTableSortState, WrTableState, WrTableSummary, WrTableSummaryContext, WrTableTruncate };
|
|
2248
|
+
export type { WrTableCellContext, WrTableCellEdit, WrTableChooserColumn, WrTableColumn, WrTableColumnAlign, WrTableColumns, WrTableCsvOptions, WrTableEditCellContext, WrTableEditable, WrTableExpandContext, WrTableFilterChange, WrTableFilterItem, WrTableGroupContext, WrTableLoadingMode, WrTableRow, WrTableRowClass, WrTableRowClick, WrTableSelectionContext, WrTableSortAccessor, WrTableSortDirection, WrTableSortState, WrTableState, WrTableSummary, WrTableSummaryContext, WrTableTruncate };
|
|
@@ -87,6 +87,16 @@ export declare class WrTourHarness extends ComponentHarness {
|
|
|
87
87
|
* what an untitled step has instead of one.
|
|
88
88
|
*/
|
|
89
89
|
getAccessibleName(): Promise<string | null>;
|
|
90
|
+
/**
|
|
91
|
+
* What the card is described by, which is what a screen reader reads after the
|
|
92
|
+
* name when focus enters the dialog: the step's text.
|
|
93
|
+
*/
|
|
94
|
+
getDescription(): Promise<string | null>;
|
|
95
|
+
/**
|
|
96
|
+
* The text of the elements an id-list attribute of the card names, joined by a
|
|
97
|
+
* space, or `null` when the attribute is absent or names nothing in the card.
|
|
98
|
+
*/
|
|
99
|
+
private referenced;
|
|
90
100
|
/** Whether the card announces itself as a modal dialog. */
|
|
91
101
|
isModal(): Promise<boolean>;
|
|
92
102
|
/**
|
package/types/ngwr-tour.d.ts
CHANGED
|
@@ -171,12 +171,21 @@ export declare class WrTourPopup {
|
|
|
171
171
|
protected readonly backLabel: import("@angular/core").Signal<string>;
|
|
172
172
|
protected readonly doneLabel: import("@angular/core").Signal<string>;
|
|
173
173
|
protected readonly skipLabel: import("@angular/core").Signal<string>;
|
|
174
|
-
/** `Step {{current}} of {{total}}
|
|
174
|
+
/** `Step {{current}} of {{total}}`, the second half of the dialog's name. */
|
|
175
175
|
protected readonly progress: (params?: import("ngwr/i18n").WrI18nParams) => string;
|
|
176
176
|
protected readonly isLast: import("@angular/core").Signal<boolean>;
|
|
177
177
|
protected readonly isFirst: import("@angular/core").Signal<boolean>;
|
|
178
178
|
protected readonly progressText: import("@angular/core").Signal<string>;
|
|
179
|
-
protected readonly
|
|
179
|
+
protected readonly titleId: string;
|
|
180
|
+
protected readonly progressId: string;
|
|
181
|
+
protected readonly contentId: string;
|
|
182
|
+
/**
|
|
183
|
+
* The dialog is named by its title and the progress line, or by the progress
|
|
184
|
+
* line alone for an untitled step, and described by the step's text: a screen
|
|
185
|
+
* reader reads a dialog's name and description when focus enters it, and
|
|
186
|
+
* nothing else of what it holds.
|
|
187
|
+
*/
|
|
188
|
+
protected readonly labelledBy: import("@angular/core").Signal<string>;
|
|
180
189
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrTourPopup, never>;
|
|
181
190
|
static ɵcmp: i0.ɵɵComponentDeclaration<WrTourPopup, "wr-tour-popup", never, {}, {}, never, never, true, never>;
|
|
182
191
|
}
|
package/types/ngwr-tree.d.ts
CHANGED
|
@@ -314,6 +314,8 @@ export declare class WrTree<TId = string> implements FormValueControl<unknown> {
|
|
|
314
314
|
* `wrFollowDirection` in `openOverlay()` is where that lives.
|
|
315
315
|
*/
|
|
316
316
|
private readonly dir;
|
|
317
|
+
private readonly liveLocale;
|
|
318
|
+
private readonly typeahead;
|
|
317
319
|
/** Currently focused row's index in the flattened visible list. */
|
|
318
320
|
protected readonly focusedIndex: import("@angular/core").WritableSignal<number>;
|
|
319
321
|
/**
|
package/types/ngwr-utils.d.ts
CHANGED
|
@@ -872,6 +872,84 @@ export declare function wrIsPrintableKey(event: KeyboardEvent): boolean;
|
|
|
872
872
|
* ```
|
|
873
873
|
*/
|
|
874
874
|
export declare function wrIsComposing(event: KeyboardEvent): boolean;
|
|
875
|
+
/**
|
|
876
|
+
* @license
|
|
877
|
+
*
|
|
878
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
879
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
880
|
+
*/
|
|
881
|
+
/** Options of {@link wrTypeahead}. */
|
|
882
|
+
interface WrTypeaheadOptions {
|
|
883
|
+
/**
|
|
884
|
+
* The pause, in milliseconds, after which the next key starts a new run.
|
|
885
|
+
* @default 500
|
|
886
|
+
*/
|
|
887
|
+
readonly resetMs?: number;
|
|
888
|
+
/**
|
|
889
|
+
* The language the labels are written in, as a BCP 47 tag or a function that
|
|
890
|
+
* returns one, for the case folding (`I` and `ı` in Turkish). The browser's
|
|
891
|
+
* own locale when omitted.
|
|
892
|
+
*/
|
|
893
|
+
readonly locale?: string | (() => string | undefined);
|
|
894
|
+
}
|
|
895
|
+
/** One row of the list a {@link WrTypeahead} searches. */
|
|
896
|
+
interface WrTypeaheadItem {
|
|
897
|
+
/** The text the row is matched by. */
|
|
898
|
+
readonly label: string;
|
|
899
|
+
/** A disabled row is never a match. */
|
|
900
|
+
readonly disabled?: boolean;
|
|
901
|
+
}
|
|
902
|
+
/** What {@link wrTypeahead} returns. */
|
|
903
|
+
interface WrTypeahead {
|
|
904
|
+
/**
|
|
905
|
+
* Feed a `keydown` and get the row to move to: `type()` and `find()` in one
|
|
906
|
+
* call.
|
|
907
|
+
*
|
|
908
|
+
* @returns the index of the match, `-1` when the key joined the run and no row
|
|
909
|
+
* matches it, or `null` when the key is not a typeahead key and the caller's
|
|
910
|
+
* own handling goes on.
|
|
911
|
+
*/
|
|
912
|
+
handleKey(event: KeyboardEvent, items: readonly (string | WrTypeaheadItem)[], current: number): number | null;
|
|
913
|
+
/**
|
|
914
|
+
* Add a `keydown` to the run. Returns whether the key was taken: a printable
|
|
915
|
+
* character with no Ctrl, Meta or Alt, outside an IME composition and outside
|
|
916
|
+
* a text field. Space is taken only while a run is active, so it keeps its
|
|
917
|
+
* own job as the first key.
|
|
918
|
+
*/
|
|
919
|
+
type(event: KeyboardEvent): boolean;
|
|
920
|
+
/**
|
|
921
|
+
* The row the run points at, or `-1`. One letter, typed once or repeated,
|
|
922
|
+
* looks from the row after `current` and wraps, so the same letter cycles. A
|
|
923
|
+
* longer run looks from `current` itself, so the row it already matches stays.
|
|
924
|
+
*/
|
|
925
|
+
find(items: readonly (string | WrTypeaheadItem)[], current: number): number;
|
|
926
|
+
/** Whether a run is in progress: a key was taken less than `resetMs` ago. */
|
|
927
|
+
readonly active: boolean;
|
|
928
|
+
/** Drop the run. */
|
|
929
|
+
reset(): void;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Type-to-jump for a list: the letters typed in a row select the next row whose
|
|
933
|
+
* label starts with them, as the WAI-ARIA listbox, menu and tree patterns ask.
|
|
934
|
+
*
|
|
935
|
+
* It holds the letters typed so far and nothing else: the caller passes the
|
|
936
|
+
* labels and the current row with each key, and moves its own cursor to the
|
|
937
|
+
* index that comes back. Matching ignores case, skips disabled rows and wraps
|
|
938
|
+
* past the end.
|
|
939
|
+
*
|
|
940
|
+
* @example
|
|
941
|
+
* ```ts
|
|
942
|
+
* private readonly typeahead = wrTypeahead();
|
|
943
|
+
*
|
|
944
|
+
* protected onKeydown(event: KeyboardEvent): void {
|
|
945
|
+
* const index = this.typeahead.handleKey(event, this.labels(), this.cursor());
|
|
946
|
+
* if (index === null) return this.onOtherKey(event);
|
|
947
|
+
* event.preventDefault();
|
|
948
|
+
* if (index >= 0) this.cursor.set(index);
|
|
949
|
+
* }
|
|
950
|
+
* ```
|
|
951
|
+
*/
|
|
952
|
+
export declare function wrTypeahead(options?: WrTypeaheadOptions): WrTypeahead;
|
|
875
953
|
/**
|
|
876
954
|
* @license
|
|
877
955
|
*
|
|
@@ -1168,4 +1246,4 @@ export declare function wrKeyedAction<K, A = void, R = void>(fn: (key: K, arg: A
|
|
|
1168
1246
|
* @returns A read-only signal of the value.
|
|
1169
1247
|
*/
|
|
1170
1248
|
export declare function wrResourceValue<T>(resource: Resource<T | undefined>, fallback: NoInfer<T>): Signal<T>;
|
|
1171
|
-
export type { WrAction, WrActionStatus, WrClassInput, WrColorScheme, WrDebouncedFn, WrDecimalLike, WrFeature, WrInitialsOptions, WrInitialsOrder, WrInitialsStyle, WrKey, WrKeyedAction, WrMaybe, WrResolveCssSizeOptions, WrResolvedCssSize, WrSafeAny, WrThrottledFn, WrWatchColorSchemeOptions };
|
|
1249
|
+
export type { WrAction, WrActionStatus, WrClassInput, WrColorScheme, WrDebouncedFn, WrDecimalLike, WrFeature, WrInitialsOptions, WrInitialsOrder, WrInitialsStyle, WrKey, WrKeyedAction, WrMaybe, WrResolveCssSizeOptions, WrResolvedCssSize, WrSafeAny, WrThrottledFn, WrTypeahead, WrTypeaheadItem, WrTypeaheadOptions, WrWatchColorSchemeOptions };
|
package/types/ngwr-version.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { InjectionToken } from "@angular/core";
|
|
|
15
15
|
* Distinct from `Version` exported by `@angular/core`, which reports the
|
|
16
16
|
* loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.
|
|
17
17
|
*/
|
|
18
|
-
export declare const NGWR_VERSION = "16.
|
|
18
|
+
export declare const NGWR_VERSION = "16.4.0";
|
|
19
19
|
/**
|
|
20
20
|
* Injection token holding the ngwr library version string.
|
|
21
21
|
*
|