@angular/aria 21.0.1 → 21.0.3
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/fesm2022/_combobox-chunk.mjs +425 -0
- package/fesm2022/_combobox-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-listbox-chunk.mjs +522 -0
- package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -0
- package/fesm2022/_combobox-popup-chunk.mjs +46 -0
- package/fesm2022/_combobox-popup-chunk.mjs.map +1 -0
- package/fesm2022/_list-navigation-chunk.mjs +116 -0
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -0
- package/fesm2022/_pointer-event-manager-chunk.mjs +134 -0
- package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -0
- package/fesm2022/_widget-chunk.mjs +4 -246
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +17 -4
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +96 -120
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +225 -201
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +173 -161
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +256 -238
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +9 -932
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +182 -168
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +15 -3
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +4 -2
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/types/_combobox-chunk.d.ts +98 -0
- package/types/_combobox-chunk.d2.ts +193 -0
- package/types/_grid-chunk.d.ts +3 -210
- package/types/_list-chunk.d.ts +212 -0
- package/types/_list-navigation-chunk.d.ts +212 -0
- package/types/_listbox-chunk.d.ts +106 -0
- package/types/accordion.d.ts +52 -49
- package/types/combobox.d.ts +25 -111
- package/types/grid.d.ts +37 -32
- package/types/listbox.d.ts +8 -5
- package/types/menu.d.ts +113 -113
- package/types/private.d.ts +12 -498
- package/types/tabs.d.ts +89 -84
- package/types/toolbar.d.ts +69 -66
- package/types/tree.d.ts +106 -103
- package/_adev_assets/aria-accordion.json +0 -743
- package/_adev_assets/aria-combobox.json +0 -607
- package/_adev_assets/aria-grid.json +0 -901
- package/_adev_assets/aria-listbox.json +0 -544
- package/_adev_assets/aria-menu.json +0 -1049
- package/_adev_assets/aria-tabs.json +0 -880
- package/_adev_assets/aria-toolbar.json +0 -545
- package/_adev_assets/aria-tree.json +0 -861
package/types/grid.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal, ElementRef } from '@angular/core';
|
|
3
3
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
|
-
import { GridPattern,
|
|
4
|
+
import { GridPattern, GridCellPattern, GridRowPattern, GridCellWidgetPattern } from './_grid-chunk.js';
|
|
5
|
+
import * as _angular_aria_private_public_api from '@angular/aria/private/public-api';
|
|
6
|
+
import './_list-navigation-chunk.js';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* The container for a grid. It provides keyboard navigation and focus management for the grid's
|
|
@@ -82,37 +84,7 @@ declare class Grid {
|
|
|
82
84
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Grid, never>;
|
|
83
85
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Grid, "[ngGrid]", ["ngGrid"], { "enableSelection": { "alias": "enableSelection"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "rowWrap": { "alias": "rowWrap"; "required": false; "isSignal": true; }; "colWrap": { "alias": "colWrap"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "enableRangeSelection": { "alias": "enableRangeSelection"; "required": false; "isSignal": true; }; }, {}, ["_rows"], never, true, never>;
|
|
84
86
|
}
|
|
85
|
-
|
|
86
|
-
* Represents a row within a grid. It is a container for `ngGridCell` directives.
|
|
87
|
-
*
|
|
88
|
-
* ```html
|
|
89
|
-
* <tr ngGridRow>
|
|
90
|
-
* <!-- ... cells ... -->
|
|
91
|
-
* </tr>
|
|
92
|
-
* ```
|
|
93
|
-
*
|
|
94
|
-
* @developerPreview 21.0
|
|
95
|
-
*/
|
|
96
|
-
declare class GridRow {
|
|
97
|
-
/** A reference to the host element. */
|
|
98
|
-
private readonly _elementRef;
|
|
99
|
-
/** A reference to the host element. */
|
|
100
|
-
readonly element: HTMLElement;
|
|
101
|
-
/** The cells that make up this row. */
|
|
102
|
-
private readonly _cells;
|
|
103
|
-
/** The UI patterns for the cells in this row. */
|
|
104
|
-
private readonly _cellPatterns;
|
|
105
|
-
/** The parent grid. */
|
|
106
|
-
private readonly _grid;
|
|
107
|
-
/** The parent grid UI pattern. */
|
|
108
|
-
readonly _gridPattern: Signal<GridPattern>;
|
|
109
|
-
/** The index of this row within the grid. */
|
|
110
|
-
readonly rowIndex: _angular_core.InputSignal<number | undefined>;
|
|
111
|
-
/** The UI pattern for the grid row. */
|
|
112
|
-
readonly _pattern: GridRowPattern;
|
|
113
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridRow, never>;
|
|
114
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridRow, "[ngGridRow]", ["ngGridRow"], { "rowIndex": { "alias": "rowIndex"; "required": false; "isSignal": true; }; }, {}, ["_cells"], never, true, never>;
|
|
115
|
-
}
|
|
87
|
+
|
|
116
88
|
/**
|
|
117
89
|
* Represents a cell within a grid row. It is the primary focusable element
|
|
118
90
|
* within the grid. It can be disabled and can have its selection state managed
|
|
@@ -178,6 +150,39 @@ declare class GridCell {
|
|
|
178
150
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridCell, never>;
|
|
179
151
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridCell, "[ngGridCell]", ["ngGridCell"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "rowSpan": { "alias": "rowSpan"; "required": false; "isSignal": true; }; "colSpan": { "alias": "colSpan"; "required": false; "isSignal": true; }; "rowIndex": { "alias": "rowIndex"; "required": false; "isSignal": true; }; "colIndex": { "alias": "colIndex"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, { "selected": "selectedChange"; }, ["_widgets"], never, true, never>;
|
|
180
152
|
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Represents a row within a grid. It is a container for `ngGridCell` directives.
|
|
156
|
+
*
|
|
157
|
+
* ```html
|
|
158
|
+
* <tr ngGridRow>
|
|
159
|
+
* <!-- ... cells ... -->
|
|
160
|
+
* </tr>
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
* @developerPreview 21.0
|
|
164
|
+
*/
|
|
165
|
+
declare class GridRow {
|
|
166
|
+
/** A reference to the host element. */
|
|
167
|
+
private readonly _elementRef;
|
|
168
|
+
/** A reference to the host element. */
|
|
169
|
+
readonly element: HTMLElement;
|
|
170
|
+
/** The cells that make up this row. */
|
|
171
|
+
private readonly _cells;
|
|
172
|
+
/** The UI patterns for the cells in this row. */
|
|
173
|
+
private readonly _cellPatterns;
|
|
174
|
+
/** The parent grid. */
|
|
175
|
+
private readonly _grid;
|
|
176
|
+
/** The parent grid UI pattern. */
|
|
177
|
+
readonly _gridPattern: Signal<_angular_aria_private_public_api.GridPattern>;
|
|
178
|
+
/** The index of this row within the grid. */
|
|
179
|
+
readonly rowIndex: _angular_core.InputSignal<number | undefined>;
|
|
180
|
+
/** The UI pattern for the grid row. */
|
|
181
|
+
readonly _pattern: GridRowPattern;
|
|
182
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridRow, never>;
|
|
183
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<GridRow, "[ngGridRow]", ["ngGridRow"], { "rowIndex": { "alias": "rowIndex"; "required": false; "isSignal": true; }; }, {}, ["_cells"], never, true, never>;
|
|
184
|
+
}
|
|
185
|
+
|
|
181
186
|
/**
|
|
182
187
|
* Represents an interactive element inside a `GridCell`. It allows for pausing grid navigation to
|
|
183
188
|
* interact with the widget.
|
package/types/listbox.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import * as _angular_aria_private_public_api from '@angular/aria/private/public-api';
|
|
1
2
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
2
3
|
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { ListboxPattern, OptionPattern } from '
|
|
4
|
-
import { ComboboxPopup } from './
|
|
4
|
+
import { ListboxPattern, OptionPattern } from './_listbox-chunk.js';
|
|
5
|
+
import { ComboboxPopup } from './_combobox-chunk.js';
|
|
6
|
+
import './_list-navigation-chunk.js';
|
|
7
|
+
import './_list-chunk.js';
|
|
8
|
+
import '@angular/aria/private';
|
|
5
9
|
|
|
6
10
|
/**
|
|
7
11
|
* Represents a container used to display a list of items for a user to select from.
|
|
@@ -38,7 +42,7 @@ declare class Listbox<V> {
|
|
|
38
42
|
/** A signal wrapper for directionality. */
|
|
39
43
|
protected textDirection: _angular_core.Signal<_angular_cdk_bidi.Direction>;
|
|
40
44
|
/** The Option UIPatterns of the child Options. */
|
|
41
|
-
protected items: _angular_core.Signal<any[]>;
|
|
45
|
+
protected items: _angular_core.Signal<_angular_aria_private_public_api.OptionPattern<any>[]>;
|
|
42
46
|
/** Whether the list is vertically or horizontally oriented. */
|
|
43
47
|
orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
|
|
44
48
|
/** Whether multiple items in the list can be selected at once. */
|
|
@@ -82,6 +86,7 @@ declare class Listbox<V> {
|
|
|
82
86
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Listbox<any>, never>;
|
|
83
87
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Listbox<any>, "[ngListbox]", ["ngListbox"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "focusMode": { "alias": "focusMode"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; }, { "values": "valuesChange"; }, ["_options"], never, true, [{ directive: typeof ComboboxPopup; inputs: {}; outputs: {}; }]>;
|
|
84
88
|
}
|
|
89
|
+
|
|
85
90
|
/**
|
|
86
91
|
* A selectable option in an `ngListbox`.
|
|
87
92
|
*
|
|
@@ -98,8 +103,6 @@ declare class Listbox<V> {
|
|
|
98
103
|
* @developerPreview 21.0
|
|
99
104
|
*/
|
|
100
105
|
declare class Option<V> {
|
|
101
|
-
/** A reference to the host element. */
|
|
102
|
-
private readonly _elementRef;
|
|
103
106
|
/** A reference to the host element. */
|
|
104
107
|
readonly element: HTMLElement;
|
|
105
108
|
/** Whether the option is currently active (focused). */
|
package/types/menu.d.ts
CHANGED
|
@@ -2,53 +2,115 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { Signal } from '@angular/core';
|
|
3
3
|
import * as _angular_cdk_bidi from '@angular/cdk/bidi';
|
|
4
4
|
import * as i1 from '@angular/aria/private';
|
|
5
|
-
import {
|
|
5
|
+
import { SignalLike, MenuBarPattern, MenuItemPattern, MenuPattern, MenuTriggerPattern } from '@angular/aria/private';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* A
|
|
8
|
+
* A menu bar of menu items.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* Like the `ngMenu`, a `ngMenuBar` is used to offer a list of menu item choices to users.
|
|
11
|
+
* However, a menubar is used to display a persistent, top-level, always-visible set of
|
|
12
|
+
* menu item choices, typically found at the top of an application window.
|
|
13
13
|
*
|
|
14
14
|
* ```html
|
|
15
|
-
* <
|
|
15
|
+
* <div ngMenuBar>
|
|
16
|
+
* <button ngMenuTrigger [menu]="fileMenu">File</button>
|
|
17
|
+
* <button ngMenuTrigger [menu]="editMenu">Edit</button>
|
|
18
|
+
* </div>
|
|
16
19
|
*
|
|
17
|
-
* <div ngMenu #
|
|
18
|
-
* <div ngMenuItem>
|
|
19
|
-
* <div ngMenuItem>
|
|
20
|
+
* <div ngMenu #fileMenu="ngMenu">
|
|
21
|
+
* <div ngMenuItem>New</div>
|
|
22
|
+
* <div ngMenuItem>Open</div>
|
|
23
|
+
* </div>
|
|
24
|
+
*
|
|
25
|
+
* <div ngMenu #editMenu="ngMenu">
|
|
26
|
+
* <div ngMenuItem>Cut</div>
|
|
27
|
+
* <div ngMenuItem>Copy</div>
|
|
20
28
|
* </div>
|
|
21
29
|
* ```
|
|
22
30
|
*
|
|
23
31
|
* @developerPreview 21.0
|
|
24
32
|
*/
|
|
25
|
-
declare class
|
|
33
|
+
declare class MenuBar<V> {
|
|
34
|
+
/** The menu items contained in the menubar. */
|
|
35
|
+
readonly _allItems: _angular_core.Signal<readonly MenuItem<V>[]>;
|
|
36
|
+
readonly _items: SignalLike<MenuItem<V>[]>;
|
|
26
37
|
/** A reference to the host element. */
|
|
27
38
|
private readonly _elementRef;
|
|
28
39
|
/** A reference to the host element. */
|
|
29
40
|
readonly element: HTMLElement;
|
|
41
|
+
/** Whether the menubar is disabled. */
|
|
42
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
43
|
+
/** Whether the menubar is soft disabled. */
|
|
44
|
+
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
30
45
|
/** The directionality (LTR / RTL) context for the application (or a subtree of it). */
|
|
31
46
|
readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
32
|
-
/** The
|
|
33
|
-
|
|
47
|
+
/** The values of the currently selected menu items. */
|
|
48
|
+
readonly values: _angular_core.ModelSignal<V[]>;
|
|
49
|
+
/** Whether the menu should wrap its items. */
|
|
50
|
+
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
51
|
+
/** The delay in milliseconds before the typeahead buffer is cleared. */
|
|
52
|
+
readonly typeaheadDelay: _angular_core.InputSignal<number>;
|
|
53
|
+
/** The menu ui pattern instance. */
|
|
54
|
+
readonly _pattern: MenuBarPattern<V>;
|
|
55
|
+
/** The menu items as a writable signal. */
|
|
56
|
+
private readonly _itemPatterns;
|
|
57
|
+
/** A callback function triggered when a menu item is selected. */
|
|
58
|
+
onSelect: _angular_core.OutputEmitterRef<V>;
|
|
59
|
+
constructor();
|
|
60
|
+
/** Closes the menubar. */
|
|
61
|
+
close(): void;
|
|
62
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuBar<any>, never>;
|
|
63
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuBar<any>, "[ngMenuBar]", ["ngMenuBar"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; }, { "values": "valuesChange"; "onSelect": "onSelect"; }, ["_allItems"], never, true, never>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* An item in a Menu.
|
|
68
|
+
*
|
|
69
|
+
* `ngMenuItem` directives can be used in `ngMenu` and `ngMenuBar` to represent a choice
|
|
70
|
+
* or action a user can take. They can also act as triggers for sub-menus.
|
|
71
|
+
*
|
|
72
|
+
* ```html
|
|
73
|
+
* <div ngMenuItem (onSelect)="doAction()">Action Item</div>
|
|
74
|
+
*
|
|
75
|
+
* <div ngMenuItem [submenu]="anotherMenu">Submenu Trigger</div>
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @developerPreview 21.0
|
|
79
|
+
*/
|
|
80
|
+
declare class MenuItem<V> {
|
|
81
|
+
/** A reference to the host element. */
|
|
82
|
+
private readonly _elementRef;
|
|
83
|
+
/** A reference to the host element. */
|
|
84
|
+
readonly element: HTMLElement;
|
|
85
|
+
/** The unique ID of the menu item. */
|
|
86
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
87
|
+
/** The value of the menu item. */
|
|
88
|
+
readonly value: _angular_core.InputSignal<V>;
|
|
89
|
+
/** Whether the menu item is disabled. */
|
|
90
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
91
|
+
/** The search term associated with the menu item. */
|
|
92
|
+
readonly searchTerm: _angular_core.ModelSignal<string>;
|
|
93
|
+
/** A reference to the parent menu or menubar. */
|
|
94
|
+
readonly parent: Menu<V> | MenuBar<V> | null;
|
|
95
|
+
/** The submenu associated with the menu item. */
|
|
96
|
+
readonly submenu: _angular_core.InputSignal<Menu<V> | undefined>;
|
|
97
|
+
/** Whether the menu item is active. */
|
|
98
|
+
readonly active: _angular_core.Signal<boolean>;
|
|
34
99
|
/** Whether the menu is expanded. */
|
|
35
|
-
readonly expanded: Signal<boolean>;
|
|
36
|
-
/** Whether the menu
|
|
37
|
-
readonly hasPopup: Signal<boolean>;
|
|
38
|
-
/**
|
|
39
|
-
readonly
|
|
40
|
-
/** Whether the menu trigger is soft disabled. */
|
|
41
|
-
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
42
|
-
/** The menu trigger ui pattern instance. */
|
|
43
|
-
_pattern: MenuTriggerPattern<V>;
|
|
100
|
+
readonly expanded: _angular_core.Signal<boolean | null>;
|
|
101
|
+
/** Whether the menu item has a popup. */
|
|
102
|
+
readonly hasPopup: _angular_core.Signal<boolean>;
|
|
103
|
+
/** The menu item ui pattern instance. */
|
|
104
|
+
readonly _pattern: MenuItemPattern<V>;
|
|
44
105
|
constructor();
|
|
45
|
-
/** Opens the
|
|
106
|
+
/** Opens the submenu focusing on the first menu item. */
|
|
46
107
|
open(): void;
|
|
47
|
-
/** Closes the
|
|
108
|
+
/** Closes the submenu. */
|
|
48
109
|
close(): void;
|
|
49
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
50
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<
|
|
110
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuItem<any>, never>;
|
|
111
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuItem<any>, "[ngMenuItem]", ["ngMenuItem"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "searchTerm": { "alias": "searchTerm"; "required": false; "isSignal": true; }; "submenu": { "alias": "submenu"; "required": false; "isSignal": true; }; }, { "searchTerm": "searchTermChange"; }, never, never, true, never>;
|
|
51
112
|
}
|
|
113
|
+
|
|
52
114
|
/**
|
|
53
115
|
* A list of menu items.
|
|
54
116
|
*
|
|
@@ -120,115 +182,53 @@ declare class Menu<V> {
|
|
|
120
182
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Menu<any>, never>;
|
|
121
183
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Menu<any>, "[ngMenu]", ["ngMenu"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "expansionDelay": { "alias": "expansionDelay"; "required": false; "isSignal": true; }; }, { "onSelect": "onSelect"; }, ["_allItems"], never, true, [{ directive: typeof i1.DeferredContentAware; inputs: { "preserveContent": "preserveContent"; }; outputs: {}; }]>;
|
|
122
184
|
}
|
|
185
|
+
|
|
123
186
|
/**
|
|
124
|
-
* A
|
|
187
|
+
* A trigger for a menu.
|
|
125
188
|
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
189
|
+
* The `ngMenuTrigger` directive is used to open and close menus. It can be applied to
|
|
190
|
+
* any interactive element (e.g., a button) to associate it with a `ngMenu` instance.
|
|
191
|
+
* It also supports linking to sub-menus when applied to a `ngMenuItem`.
|
|
129
192
|
*
|
|
130
193
|
* ```html
|
|
131
|
-
* <
|
|
132
|
-
* <button ngMenuTrigger [menu]="fileMenu">File</button>
|
|
133
|
-
* <button ngMenuTrigger [menu]="editMenu">Edit</button>
|
|
134
|
-
* </div>
|
|
135
|
-
*
|
|
136
|
-
* <div ngMenu #fileMenu="ngMenu">
|
|
137
|
-
* <div ngMenuItem>New</div>
|
|
138
|
-
* <div ngMenuItem>Open</div>
|
|
139
|
-
* </div>
|
|
194
|
+
* <button ngMenuTrigger [menu]="myMenu">Open Menu</button>
|
|
140
195
|
*
|
|
141
|
-
* <div ngMenu #
|
|
142
|
-
* <div ngMenuItem>
|
|
143
|
-
* <div ngMenuItem>
|
|
196
|
+
* <div ngMenu #myMenu="ngMenu">
|
|
197
|
+
* <div ngMenuItem>Item 1</div>
|
|
198
|
+
* <div ngMenuItem>Item 2</div>
|
|
144
199
|
* </div>
|
|
145
200
|
* ```
|
|
146
201
|
*
|
|
147
202
|
* @developerPreview 21.0
|
|
148
203
|
*/
|
|
149
|
-
declare class
|
|
150
|
-
/** The menu items contained in the menubar. */
|
|
151
|
-
readonly _allItems: Signal<readonly MenuItem<V>[]>;
|
|
152
|
-
readonly _items: SignalLike<MenuItem<V>[]>;
|
|
204
|
+
declare class MenuTrigger<V> {
|
|
153
205
|
/** A reference to the host element. */
|
|
154
206
|
private readonly _elementRef;
|
|
155
207
|
/** A reference to the host element. */
|
|
156
208
|
readonly element: HTMLElement;
|
|
157
|
-
/** Whether the menubar is disabled. */
|
|
158
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
159
|
-
/** Whether the menubar is soft disabled. */
|
|
160
|
-
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
161
209
|
/** The directionality (LTR / RTL) context for the application (or a subtree of it). */
|
|
162
210
|
readonly textDirection: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>;
|
|
163
|
-
/** The
|
|
164
|
-
|
|
165
|
-
/** Whether the menu should wrap its items. */
|
|
166
|
-
readonly wrap: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
167
|
-
/** The delay in milliseconds before the typeahead buffer is cleared. */
|
|
168
|
-
readonly typeaheadDelay: _angular_core.InputSignal<number>;
|
|
169
|
-
/** The menu ui pattern instance. */
|
|
170
|
-
readonly _pattern: MenuBarPattern<V>;
|
|
171
|
-
/** The menu items as a writable signal. */
|
|
172
|
-
private readonly _itemPatterns;
|
|
173
|
-
/** A callback function triggered when a menu item is selected. */
|
|
174
|
-
onSelect: _angular_core.OutputEmitterRef<V>;
|
|
175
|
-
constructor();
|
|
176
|
-
/** Closes the menubar. */
|
|
177
|
-
close(): void;
|
|
178
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuBar<any>, never>;
|
|
179
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuBar<any>, "[ngMenuBar]", ["ngMenuBar"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; "typeaheadDelay": { "alias": "typeaheadDelay"; "required": false; "isSignal": true; }; }, { "values": "valuesChange"; "onSelect": "onSelect"; }, ["_allItems"], never, true, never>;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* An item in a Menu.
|
|
183
|
-
*
|
|
184
|
-
* `ngMenuItem` directives can be used in `ngMenu` and `ngMenuBar` to represent a choice
|
|
185
|
-
* or action a user can take. They can also act as triggers for sub-menus.
|
|
186
|
-
*
|
|
187
|
-
* ```html
|
|
188
|
-
* <div ngMenuItem (onSelect)="doAction()">Action Item</div>
|
|
189
|
-
*
|
|
190
|
-
* <div ngMenuItem [submenu]="anotherMenu">Submenu Trigger</div>
|
|
191
|
-
* ```
|
|
192
|
-
*
|
|
193
|
-
* @developerPreview 21.0
|
|
194
|
-
*/
|
|
195
|
-
declare class MenuItem<V> {
|
|
196
|
-
/** A reference to the host element. */
|
|
197
|
-
private readonly _elementRef;
|
|
198
|
-
/** A reference to the host element. */
|
|
199
|
-
readonly element: HTMLElement;
|
|
200
|
-
/** The unique ID of the menu item. */
|
|
201
|
-
readonly id: _angular_core.InputSignal<string>;
|
|
202
|
-
/** The value of the menu item. */
|
|
203
|
-
readonly value: _angular_core.InputSignal<V>;
|
|
204
|
-
/** Whether the menu item is disabled. */
|
|
205
|
-
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
206
|
-
/** The search term associated with the menu item. */
|
|
207
|
-
readonly searchTerm: _angular_core.ModelSignal<string>;
|
|
208
|
-
/** A reference to the parent menu. */
|
|
209
|
-
private readonly _menu;
|
|
210
|
-
/** A reference to the parent menu bar. */
|
|
211
|
-
private readonly _menuBar;
|
|
212
|
-
/** A reference to the parent menu or menubar. */
|
|
213
|
-
readonly parent: Menu<V> | MenuBar<V> | null;
|
|
214
|
-
/** The submenu associated with the menu item. */
|
|
215
|
-
readonly submenu: _angular_core.InputSignal<Menu<V> | undefined>;
|
|
216
|
-
/** Whether the menu item is active. */
|
|
217
|
-
readonly active: Signal<boolean>;
|
|
211
|
+
/** The menu associated with the trigger. */
|
|
212
|
+
menu: _angular_core.InputSignal<Menu<V> | undefined>;
|
|
218
213
|
/** Whether the menu is expanded. */
|
|
219
|
-
readonly expanded: Signal<boolean
|
|
220
|
-
/** Whether the menu
|
|
221
|
-
readonly hasPopup: Signal<boolean>;
|
|
222
|
-
/**
|
|
223
|
-
readonly
|
|
214
|
+
readonly expanded: _angular_core.Signal<boolean>;
|
|
215
|
+
/** Whether the menu trigger has a popup. */
|
|
216
|
+
readonly hasPopup: _angular_core.Signal<boolean>;
|
|
217
|
+
/** Whether the menu trigger is disabled. */
|
|
218
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
219
|
+
/** Whether the menu trigger is soft disabled. */
|
|
220
|
+
readonly softDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
221
|
+
/** The menu trigger ui pattern instance. */
|
|
222
|
+
_pattern: MenuTriggerPattern<V>;
|
|
224
223
|
constructor();
|
|
225
|
-
/** Opens the
|
|
224
|
+
/** Opens the menu focusing on the first menu item. */
|
|
226
225
|
open(): void;
|
|
227
|
-
/** Closes the
|
|
226
|
+
/** Closes the menu. */
|
|
228
227
|
close(): void;
|
|
229
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<
|
|
230
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<
|
|
228
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MenuTrigger<any>, never>;
|
|
229
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuTrigger<any>, "button[ngMenuTrigger]", ["ngMenuTrigger"], { "menu": { "alias": "menu"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "softDisabled": { "alias": "softDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
231
230
|
}
|
|
231
|
+
|
|
232
232
|
/**
|
|
233
233
|
* Defers the rendering of the menu content.
|
|
234
234
|
*
|